Merge branch 'main' of github.com:ueberdosis/tiptap-next into main

This commit is contained in:
Hans Pagel
2020-09-23 09:37:49 +02:00
73 changed files with 805 additions and 599 deletions

View File

@@ -2,4 +2,7 @@ module.exports = {
presets: [
'@babel/preset-env',
],
plugins: [
'@babel/plugin-proposal-optional-chaining',
],
}

View File

@@ -3,4 +3,7 @@ module.exports = {
'@babel/preset-env',
'@babel/preset-react',
],
plugins: [
'@babel/plugin-proposal-optional-chaining',
],
}

View File

@@ -71,7 +71,7 @@ module.exports = function (api) {
.test(/\.tsx?$/)
.use()
.loader('ts-loader')
.options({ appendTsSuffixTo: [/\.vue$/] })
.options({ transpileOnly: false, appendTsSuffixTo: [/\.vue$/] })
config.module
.rule('jsx')

View File

@@ -10,26 +10,27 @@
"@gridsome/remark-prismjs": "^0.4.0",
"@gridsome/source-filesystem": "^0.6.2",
"@gridsome/transformer-json": "^0.2.1",
"@gridsome/vue-remark": "^0.2.4",
"@gridsome/vue-remark": "^0.2.5",
"@mvasilkov/outdent": "^1.0.4",
"collect.js": "^4.28.2",
"globby": "^11.0.0",
"gridsome": "0.7.20",
"gridsome": "0.7.21",
"gridsome-plugin-simple-analytics": "^1.1.0",
"raw-loader": "^4.0.0",
"react": "^16.13.1",
"react-dom": "^16.13.1",
"remark-container": "^0.1.2",
"typescript": "^4.0.2",
"typescript": "^4.0.3",
"vue-github-button": "^1.1.2"
},
"devDependencies": {
"@babel/plugin-proposal-optional-chaining": "^7.11.0",
"@babel/preset-env": "^7.11.5",
"@babel/preset-react": "^7.10.4",
"html-loader": "^1.1.0",
"html-loader": "^1.3.1",
"node-sass": "^4.14.1",
"sass-loader": "^9.0.3",
"style-resources-loader": "^1.3.3",
"ts-loader": "^8.0.3"
"ts-loader": "^8.0.4"
}
}

View File

@@ -1,58 +1,58 @@
<template>
<div>
<div v-if="editor">
<button @click="editor.focus().removeMarks()">
<button @click="editor.chain().focus().removeMarks().run()">
clear format
</button>
<button @click="editor.focus().bold()" :class="{ 'is-active': editor.isActive('bold') }">
<button @click="editor.chain().focus().bold().run()" :class="{ 'is-active': editor.isActive('bold') }">
bold
</button>
<button @click="editor.focus().italic()" :class="{ 'is-active': editor.isActive('italic') }">
<button @click="editor.chain().focus().italic().run()" :class="{ 'is-active': editor.isActive('italic') }">
italic
</button>
<button @click="editor.focus().underline()" :class="{ 'is-active': editor.isActive('underline') }">
<button @click="editor.chain().focus().underline().run()" :class="{ 'is-active': editor.isActive('underline') }">
underline
</button>
<button @click="editor.focus().strike()" :class="{ 'is-active': editor.isActive('strike') }">
<button @click="editor.chain().focus().strike().run()" :class="{ 'is-active': editor.isActive('strike') }">
strike
</button>
<button @click="editor.focus().code()" :class="{ 'is-active': editor.isActive('code') }">
<button @click="editor.chain().focus().code().run()" :class="{ 'is-active': editor.isActive('code') }">
code
</button>
<button @click="editor.focus().codeBlock()" :class="{ 'is-active': editor.isActive('codeBlock') }">
<button @click="editor.chain().focus().codeBlock().run()" :class="{ 'is-active': editor.isActive('codeBlock') }">
code block
</button>
<button @click="editor.focus().heading({ level: 1 })" :class="{ 'is-active': editor.isActive('heading', { level: 1 }) }">
<button @click="editor.chain().focus().heading({ level: 1 }).run()" :class="{ 'is-active': editor.isActive('heading', { level: 1 }) }">
h1
</button>
<button @click="editor.focus().heading({ level: 2 })" :class="{ 'is-active': editor.isActive('heading', { level: 2 }) }">
<button @click="editor.chain().focus().heading({ level: 2 }).run()" :class="{ 'is-active': editor.isActive('heading', { level: 2 }) }">
h2
</button>
<button @click="editor.focus().heading({ level: 3 })" :class="{ 'is-active': editor.isActive('heading', { level: 3 }) }">
<button @click="editor.chain().focus().heading({ level: 3 }).run()" :class="{ 'is-active': editor.isActive('heading', { level: 3 }) }">
h3
</button>
<button @click="editor.focus().heading({ level: 4 })" :class="{ 'is-active': editor.isActive('heading', { level: 4 }) }">
<button @click="editor.chain().focus().heading({ level: 4 }).run()" :class="{ 'is-active': editor.isActive('heading', { level: 4 }) }">
h4
</button>
<button @click="editor.focus().heading({ level: 5 })" :class="{ 'is-active': editor.isActive('heading', { level: 5 }) }">
<button @click="editor.chain().focus().heading({ level: 5 }).run()" :class="{ 'is-active': editor.isActive('heading', { level: 5 }) }">
h5
</button>
<button @click="editor.focus().heading({ level: 6 })" :class="{ 'is-active': editor.isActive('heading', { level: 6 }) }">
<button @click="editor.chain().focus().heading({ level: 6 }).run()" :class="{ 'is-active': editor.isActive('heading', { level: 6 }) }">
h6
</button>
<button @click="editor.focus().blockquote()" :class="{ 'is-active': editor.isActive('blockquote') }">
<button @click="editor.chain().focus().blockquote().run()" :class="{ 'is-active': editor.isActive('blockquote') }">
blockquote
</button>
<button @click="editor.focus().horizontalRule()">
<button @click="editor.chain().focus().horizontalRule().run()">
horizontal rule
</button>
<button @click="editor.focus().hardBreak()">
<button @click="editor.chain().focus().hardBreak().run()">
hard break
</button>
<button @click="editor.focus().undo()">
<button @click="editor.chain().focus().undo().run()">
undo
</button>
<button @click="editor.focus().redo()">
<button @click="editor.chain().focus().redo().run()">
redo
</button>
</div>

View File

@@ -1,10 +1,10 @@
<template>
<div>
<div v-if="editor">
<button @click="editor.focus().undo()">
<button @click="editor.chain().focus().undo().run()">
undo
</button>
<button @click="editor.focus().redo()">
<button @click="editor.chain().focus().redo().run()">
redo
</button>
</div>

View File

@@ -1,6 +1,6 @@
<template>
<div v-if="editor">
<button @click="editor.focus().blockquote()" :class="{ 'is-active': editor.isActive('blockquote') }">
<button @click="editor.chain().focus().blockquote().run()" :class="{ 'is-active': editor.isActive('blockquote') }">
blockquote
</button>

View File

@@ -1,6 +1,6 @@
<template>
<div v-if="editor">
<button @click="editor.focus().bold()" :class="{ 'is-active': editor.isActive('bold') }">
<button @click="editor.chain().focus().bold().run()" :class="{ 'is-active': editor.isActive('bold') }">
bold
</button>

View File

@@ -16,7 +16,7 @@ context('/api/extensions/bullet-list', () => {
})
cy.get('.ProseMirror')
.type('* List Item 1{enter}+ List Item 2{enter}- List Item 3')
.type('* List Item 1{enter}{enter}+ List Item 2{enter}{enter}- List Item 3')
cy.get('.ProseMirror')
.find('li:nth-child(1)')

View File

@@ -1,8 +1,8 @@
<template>
<div v-if="editor">
<!-- <button @click="editor.focus().bulletList()" :class="{ 'is-active': editor.isActive('bulletList') }">
<button @click="editor.chain().focus().bulletList().run()" :class="{ 'is-active': editor.isActive('bulletList') }">
bullet list
</button> -->
</button>
<editor-content :editor="editor" />
</div>

View File

@@ -1,6 +1,6 @@
<template>
<div v-if="editor">
<button @click="editor.focus().code()" :class="{ 'is-active': editor.isActive('code') }">
<button @click="editor.chain().focus().code().run()" :class="{ 'is-active': editor.isActive('code') }">
code
</button>

View File

@@ -1,6 +1,6 @@
<template>
<div v-if="editor">
<button @click="editor.focus().codeBlock()" :class="{ 'is-active': editor.isActive('codeBlock') }">
<button @click="editor.chain().focus().codeBlock().run()" :class="{ 'is-active': editor.isActive('codeBlock') }">
code block
</button>

View File

@@ -1,6 +1,6 @@
<template>
<div v-if="editor">
<button @click="editor.focus().hardBreak()">
<button @click="editor.chain().focus().hardBreak().run()">
hardBreak
</button>

View File

@@ -1,12 +1,12 @@
<template>
<div v-if="editor">
<button @click="editor.focus().heading({ level: 1 })" :class="{ 'is-active': editor.isActive('heading', { level: 1 }) }">
<button @click="editor.chain().focus().heading({ level: 1 }).run()" :class="{ 'is-active': editor.isActive('heading', { level: 1 }) }">
h1
</button>
<button @click="editor.focus().heading({ level: 2 })" :class="{ 'is-active': editor.isActive('heading', { level: 2 }) }">
<button @click="editor.chain().focus().heading({ level: 2 }).run()" :class="{ 'is-active': editor.isActive('heading', { level: 2 }) }">
h2
</button>
<button @click="editor.focus().heading({ level: 3 })" :class="{ 'is-active': editor.isActive('heading', { level: 3 }) }">
<button @click="editor.chain().focus().heading({ level: 3 }).run()" :class="{ 'is-active': editor.isActive('heading', { level: 3 }) }">
h3
</button>

View File

@@ -1,9 +1,9 @@
<template>
<div v-if="editor">
<button @click="editor.focus().undo()">
<button @click="editor.chain().focus().undo().run()">
undo
</button>
<button @click="editor.focus().redo()">
<button @click="editor.chain().focus().redo().run()">
redo
</button>

View File

@@ -1,6 +1,6 @@
<template>
<div v-if="editor">
<button @click="editor.focus().horizontalRule()">
<button @click="editor.chain().focus().horizontalRule().run()">
horizontalRule
</button>

View File

@@ -1,6 +1,6 @@
<template>
<div v-if="editor">
<button @click="editor.focus().italic()" :class="{ 'is-active': editor.isActive('italic') }">
<button @click="editor.chain().focus().italic().run()" :class="{ 'is-active': editor.isActive('italic') }">
italic
</button>

View File

@@ -1,6 +1,6 @@
<template>
<div v-if="editor">
<button @click="editor.focus().strike()" :class="{ 'is-active': editor.isActive('strike') }">
<button @click="editor.chain().focus().strike().run()" :class="{ 'is-active': editor.isActive('strike') }">
strike
</button>

View File

@@ -1,6 +1,6 @@
<template>
<div v-if="editor">
<button @click="editor.focus().underline()" :class="{ 'is-active': editor.isActive('underline') }">
<button @click="editor.chain().focus().underline().run()" :class="{ 'is-active': editor.isActive('underline') }">
underline
</button>

View File

@@ -1,25 +1,25 @@
<template>
<div>
<div v-if="editor">
<button @click="editor.focus().removeMarks()">
<button @click="editor.chain().focus().removeMarks().run()">
clear formatting
</button>
<button @click="editor.focus().undo()">
<button @click="editor.chain().focus().undo().run()">
undo
</button>
<button @click="editor.focus().redo()">
<button @click="editor.chain().focus().redo().run()">
redo
</button>
<button @click="editor.focus().bold()" :class="{ 'is-active': editor.isActive('bold') }">
<button @click="editor.chain().focus().bold().run()" :class="{ 'is-active': editor.isActive('bold') }">
bold
</button>
<button @click="editor.focus().italic()" :class="{ 'is-active': editor.isActive('italic') }">
<button @click="editor.chain().focus().italic().run()" :class="{ 'is-active': editor.isActive('italic') }">
italic
</button>
<button @click="editor.focus().heading({ level: 1 })" :class="{ 'is-active': editor.isActive('heading', { level: 1 }) }">
<button @click="editor.chain().focus().heading({ level: 1 }).run()" :class="{ 'is-active': editor.isActive('heading', { level: 1 }) }">
h1
</button>
<button @click="editor.focus().heading({ level: 2 })" :class="{ 'is-active': editor.isActive('heading', { level: 2 }) }">
<button @click="editor.chain().focus().heading({ level: 2 }).run()" :class="{ 'is-active': editor.isActive('heading', { level: 2 }) }">
h2
</button>
</div>

View File

@@ -9,12 +9,12 @@ const MenuBar = () => {
return (
<>
<button onClick={() => editor.focus().removeMarks()}>
<button onClick={() => editor.chain().focus().removeMarks().run()}>
Clear formatting
</button>
<button
className={`${editor.isActive('bold') ? 'is-active' : ''}`}
onClick={() => editor.focus().bold()}
onClick={() => editor.chain().focus().bold().run()}
>
Bold
</button>

View File

@@ -5,7 +5,7 @@
<button
class="menubar__button"
:class="{ 'is-active': editor.isActive('bold') }"
@click="editor.focus().bold()"
@click="editor.chain().focus().bold().run()"
>
Bold
</button>

View File

@@ -100,5 +100,5 @@ Currently, blockquotes must not be nested anymore. That said, were working on
We tried to hide the `.focus()` command from you with tiptap 1 and executed that on every other command. That led to issues in specific use cases, where you want to run a command, but dont want to focus the editor. With tiptap 2.x you have to explicitly call the `focus()` and you probably want to do that in a lot of places. Here is an example:
```js
editor.focus().bold()
editor.chain().focus().bold().run()
```

View File

@@ -20,6 +20,7 @@
"reset": "yarn clean:packages && rm -rf ./**/.cache && rm -rf ./**/node_modules && rm -rf ./yarn.lock && yarn install"
},
"devDependencies": {
"@babel/plugin-proposal-optional-chaining": "^7.11.0",
"@babel/preset-env": "^7.11.5",
"@types/prosemirror-commands": "^1.0.3",
"@types/prosemirror-history": "^1.0.1",
@@ -29,12 +30,12 @@
"@types/prosemirror-state": "^1.2.5",
"@types/prosemirror-transform": "^1.1.1",
"@types/prosemirror-view": "^1.15.0",
"cypress": "^5.1.0",
"cypress": "^5.2.0",
"lerna": "^3.22.1",
"microbundle": "^0.12.3",
"sass-loader": "^9.0.3",
"typedoc": "^0.18.0",
"typescript": "^4.0.2",
"typescript": "^4.0.3",
"vue": "^2.6.12"
}
}

View File

@@ -1,7 +1,7 @@
import { Editor, CommandSpec } from './src/Editor'
import { Editor, Command, CommandsSpec } from './src/Editor'
export default Editor
export { Editor, CommandSpec }
export { Editor, Command, CommandsSpec }
export { default as ComponentRenderer } from './src/ComponentRenderer'
export { default as Extension } from './src/Extension'
export { default as Node } from './src/Node'

View File

@@ -22,9 +22,9 @@
"prosemirror-commands": "^1.1.3",
"prosemirror-dropcursor": "^1.3.2",
"prosemirror-gapcursor": "^1.1.5",
"prosemirror-inputrules": "^1.1.2",
"prosemirror-inputrules": "^1.1.3",
"prosemirror-keymap": "^1.1.3",
"prosemirror-model": "^1.9.1",
"prosemirror-model": "^1.11.2",
"prosemirror-schema-list": "^1.1.4",
"prosemirror-state": "^1.3.3",
"prosemirror-tables": "^1.1.1",

View File

@@ -0,0 +1,149 @@
import { EditorState, Transaction } from "prosemirror-state"
import { ChainedCommands, Editor, CommandSpec } from "./Editor"
import getAllMethodNames from './utils/getAllMethodNames'
export default class CommandManager {
editor: Editor
commands: { [key: string]: any } = {}
constructor(editor: Editor) {
this.editor = editor
}
/**
* Register a command.
*
* @param name The name of your command
* @param callback The method of your command
*/
public registerCommand(name: string, callback: CommandSpec): Editor {
if (this.commands[name]) {
throw new Error(`tiptap: command '${name}' is already defined.`)
}
if (getAllMethodNames(this.editor).includes(name)) {
throw new Error(`tiptap: '${name}' is a protected name.`)
}
this.commands[name] = callback
return this.editor
}
public runSingleCommand(name: string) {
const { commands, editor } = this
const { state, view } = editor
const command = commands[name]
if (!command) {
// TODO: prevent vue devtools to throw error
// throw new Error(`tiptap: command '${name}' not found.`)
return
}
return (...args: any) => {
const { tr } = state
const props = this.buildProps(tr)
const callback = command(...args)(props)
view.dispatch(tr)
return callback
}
}
public createChain(startTr?: Transaction) {
const { commands, editor } = this
const { state, view } = editor
const callbacks: boolean[] = []
const hasStartTransaction = !!startTr
const tr = hasStartTransaction ? startTr : state.tr
if (!tr) {
return
}
return new Proxy({}, {
get: (_, name: string, proxy) => {
if (name === 'run') {
if (!hasStartTransaction) {
view.dispatch(tr)
}
return () => callbacks.every(callback => callback === true)
}
const command = commands[name]
if (!command) {
throw new Error(`tiptap: command '${name}' not found.`)
}
return (...args: any) => {
const props = this.buildProps(tr)
const callback = command(...args)(props)
callbacks.push(callback)
return proxy
}
}
}) as ChainedCommands
}
public buildProps(tr: Transaction) {
const { editor, commands } = this
const { state, view } = editor
const props = {
tr,
editor,
view,
state: this.chainableState(tr, state),
dispatch: () => false,
chain: () => this.createChain(tr),
get commands() {
return Object.fromEntries(Object
.entries(commands)
.map(([name, command]) => {
return [name, (...args: any[]) => command(...args)(props)]
}))
}
}
return props
}
public chainableState(tr: Transaction, state: EditorState): EditorState {
let selection = tr.selection
let doc = tr.doc
let storedMarks = tr.storedMarks
return {
...state,
schema: state.schema,
plugins: state.plugins,
apply: state.apply.bind(state),
applyTransaction: state.applyTransaction.bind(state),
reconfigure: state.reconfigure.bind(state),
toJSON: state.toJSON.bind(state),
get storedMarks() {
return storedMarks
},
get selection() {
return selection
},
get doc() {
return doc
},
get tr() {
selection = tr.selection
doc = tr.doc
storedMarks = tr.storedMarks
return tr
},
};
}
}

View File

@@ -3,7 +3,6 @@ import { EditorView} from 'prosemirror-view'
import { Schema, DOMParser, DOMSerializer } from 'prosemirror-model'
import magicMethods from './utils/magicMethods'
import elementFromString from './utils/elementFromString'
import getAllMethodNames from './utils/getAllMethodNames'
import nodeIsActive from './utils/nodeIsActive'
import markIsActive from './utils/markIsActive'
import getNodeAttrs from './utils/getNodeAttrs'
@@ -11,6 +10,7 @@ import getMarkAttrs from './utils/getMarkAttrs'
import removeElement from './utils/removeElement'
import getSchemaTypeByName from './utils/getSchemaTypeByName'
import getHtmlFromFragment from './utils/getHtmlFromFragment'
import CommandManager from './CommandManager'
import ExtensionManager from './ExtensionManager'
import EventEmitter from './EventEmitter'
import Extension from './Extension'
@@ -20,24 +20,46 @@ import ComponentRenderer from './ComponentRenderer'
import defaultPlugins from './plugins'
import * as commands from './commands'
export type Command = (next: Function, editor: Editor) => (...args: any) => any
export type Command = (props: {
editor: Editor,
tr: Transaction,
commands: SingleCommands,
chain: () => ChainedCommands,
state: EditorState,
view: EditorView,
dispatch: (args?: any) => any,
}) => boolean
export interface CommandSpec {
[key: string]: Command
export type CommandSpec = (...args: any[]) => Command
export interface CommandsSpec {
[key: string]: CommandSpec
}
export interface Commands {}
export type CommandNames = Extract<keyof Commands, string>
export type SingleCommands = {
[Command in keyof Commands]: Commands[Command] extends (...args: any[]) => any
? (...args: Parameters<Commands[Command]>) => boolean
: never
}
export type ChainedCommands = {
[Command in keyof Commands]: Commands[Command] extends (...args: any[]) => any
? (...args: Parameters<Commands[Command]>) => ChainedCommands
: never
} & {
run: () => boolean
}
type EditorContent = string | JSON | null
// interface Element {
// editor?: Editor
// }
interface HTMLElement {
editor?: Editor
}
// Element.prototype.editor = Editor
interface EditorOptions {
element: Element,
content: EditorContent,
@@ -47,16 +69,18 @@ interface EditorOptions {
editable: boolean,
}
declare module './Editor' {
interface Editor extends SingleCommands {}
}
@magicMethods
export class Editor extends EventEmitter {
public renderer!: any
private proxy!: Editor
private commandManager!: CommandManager
private extensionManager!: ExtensionManager
private commands: { [key: string]: any } = {}
private css!: HTMLStyleElement
private lastCommand = Promise.resolve()
public lastCommandValue: any = undefined
public schema!: Schema
public view!: EditorView
public selection = { from: 0, to: 0 }
@@ -70,7 +94,6 @@ export class Editor extends EventEmitter {
editable: true,
}
constructor(options: Partial<EditorOptions> = {}) {
super()
this.options = { ...this.options, ...options }
@@ -81,6 +104,7 @@ export class Editor extends EventEmitter {
* This method is called after the proxy is initialized.
*/
private init() {
this.createCommandManager()
this.createExtensionManager()
this.createSchema()
this.extensionManager.resolveConfigs()
@@ -100,15 +124,14 @@ export class Editor extends EventEmitter {
* @param name The name of the command
*/
private __get(name: string) {
const command = this.commands[name]
if (!command) {
// TODO: prevent vue devtools to throw error
// throw new Error(`tiptap: command '${name}' not found.`)
return
return this.commandManager.runSingleCommand(name)
}
return (...args: any) => command(...args)
/**
* Create a command chain to call multiple commands at once.
*/
public chain() {
return this.commandManager.createChain()
}
/**
@@ -143,7 +166,7 @@ export class Editor extends EventEmitter {
*
* @param commands A list of commands
*/
public registerCommands(commands: CommandSpec) {
public registerCommands(commands: CommandsSpec) {
Object
.entries(commands)
.forEach(([name, command]) => this.registerCommand(name, command))
@@ -155,56 +178,8 @@ export class Editor extends EventEmitter {
* @param name The name of your command
* @param callback The method of your command
*/
public registerCommand(name: string, callback: Command): Editor {
if (this.commands[name]) {
throw new Error(`tiptap: command '${name}' is already defined.`)
}
if (getAllMethodNames(this).includes(name)) {
throw new Error(`tiptap: '${name}' is a protected name.`)
}
this.commands[name] = this.chainCommand((...args: any) => {
// console.log('command', this.lastCommandValue)
const commandValue = callback(() => {}, this.proxy)(...args)
// if (commandValue !== undefined) {
this.lastCommandValue = commandValue
// }
return this.proxy
})
return this.proxy
}
/**
* Call a command.
*
* @param name The name of the command you want to call.
* @param options The options of the command.
*/
public command(name: string, ...options: any) {
return this.commands[name](...options)
}
/**
* Wraps a command to make it chainable.
*
* @param method
*/
private chainCommand = (method: Function) => (...args: any) => {
// console.log('chain', this.lastCommandValue)
// this.lastCommand = this.lastCommand
// .then(() => {
// const jo = method.apply(this, args)
// console.log({jo})
// })
// // .then(method.apply(this, args))
// .catch(console.error)
method.apply(this, args)
public registerCommand(name: string, callback: CommandSpec): Editor {
this.commandManager.registerCommand(name, callback)
return this.proxy
}
@@ -246,6 +221,13 @@ export class Editor extends EventEmitter {
this.extensionManager = new ExtensionManager(this.options.extensions, this.proxy)
}
/**
* Creates an command manager.
*/
private createCommandManager() {
this.commandManager = new CommandManager(this.proxy)
}
/**
* Creates a ProseMirror schema.
*/

View File

@@ -1,6 +1,6 @@
import cloneDeep from 'clone-deep'
import { Plugin } from 'prosemirror-state'
import { Editor, CommandSpec } from './Editor'
import { Editor, CommandsSpec } from './Editor'
type AnyObject = {
[key: string]: any
@@ -26,7 +26,7 @@ export interface ExtensionProps<Options> {
export interface ExtensionMethods<Props, Options> {
name: string
options: Options
commands: (params: Props) => CommandSpec
commands: (params: Props) => CommandsSpec
inputRules: (params: Props) => any[]
pasteRules: (params: Props) => any[]
keys: (params: Props) => {

View File

@@ -94,18 +94,7 @@ export default class ExtensionManager {
return collect(this.extensions)
.map(extension => extension.config.keys)
.filter(keys => keys)
.map(keys => {
const values = Object.entries(keys).map(([key, action]) => {
return [key, () => {
this.editor.lastCommandValue = undefined
// @ts-ignore
const bla = action().lastCommandValue
// console.log({bla})
return bla
}]
})
return keymap(Object.fromEntries(values))
})
.map(keys => keymap(keys))
.toArray()
}

View File

@@ -1,16 +1,17 @@
import { Editor } from '../Editor'
import { Command } from '../Editor'
type BlurCommand = () => Editor
type BlurCommand = () => Command
declare module '../Editor' {
interface Editor {
interface Commands {
blur: BlurCommand,
}
}
export default (next: Function, { view }: Editor) => () => {
export const blur: BlurCommand = () => ({ view }) => {
const element = view.dom as HTMLElement
element.blur()
next()
return true
}

View File

@@ -1,14 +1,13 @@
import { Editor } from '../Editor'
import { Command } from '../Editor'
type ClearContentCommand = (emitUpdate?: Boolean) => Editor
type ClearContentCommand = (emitUpdate?: Boolean) => Command
declare module '../Editor' {
interface Editor {
interface Commands {
clearContent: ClearContentCommand,
}
}
export default (next: Function, editor: Editor) => (emitUpdate = false) => {
editor.setContent('', emitUpdate)
next()
export const clearContent: ClearContentCommand = (emitUpdate = false) => ({ commands }) => {
return commands.setContent('', emitUpdate)
}

View File

@@ -1,15 +1,14 @@
import { Editor } from '../Editor'
import { deleteSelection } from 'prosemirror-commands'
import { Command } from '../Editor'
import { deleteSelection as originalDeleteSelection } from 'prosemirror-commands'
type DeleteSelectionCommand = () => Editor
type DeleteSelectionCommand = () => Command
declare module '../Editor' {
interface Editor {
interface Commands {
deleteSelection: DeleteSelectionCommand,
}
}
export default (next: Function, { state, view }: Editor) => () => {
deleteSelection(state, view.dispatch)
next()
export const deleteSelection: DeleteSelectionCommand = () => ({ state, dispatch }) => {
return originalDeleteSelection(state, dispatch)
}

View File

@@ -1,11 +1,11 @@
import { Editor } from '../Editor'
import { Editor, Command } from '../Editor'
import { TextSelection } from 'prosemirror-state'
import minMax from '../utils/minMax'
type FocusCommand = (position?: Position) => Editor
type FocusCommand = (position?: Position) => Command
declare module '../Editor' {
interface Editor {
interface Commands {
focus: FocusCommand
}
}
@@ -44,25 +44,19 @@ function resolveSelection(editor: Editor, position: Position = null): ResolvedSe
}
}
export default (next: Function, editor: Editor) => (position = null) => {
const { view, state } = editor
export const focus: FocusCommand = (position = null) => ({ editor, view, tr }) => {
if ((view.hasFocus() && position === null) || position === false) {
next()
return
return true
}
const { from, to } = resolveSelection(editor, position)
const { doc, tr } = state
const { doc } = tr
const resolvedFrom = minMax(from, 0, doc.content.size)
const resolvedEnd = minMax(to, 0, doc.content.size)
const selection = TextSelection.create(doc, resolvedFrom, resolvedEnd)
const transaction = tr.setSelection(selection)
view.dispatch(transaction)
tr.setSelection(selection)
view.focus()
//@ts-ignore
// console.log(bla)
// return 'FOCUS'
next()
return true
}

View File

@@ -1,18 +1,19 @@
export { default as blur } from './blur'
export { default as clearContent } from './clearContent'
export { default as deleteSelection } from './deleteSelection'
export { default as focus } from './focus'
export { default as insertHTML } from './insertHTML'
export { default as insertText } from './insertText'
export { default as liftListItem } from './liftListItem'
export { default as removeMark } from './removeMark'
export { default as removeMarks } from './removeMarks'
export { default as replaceWithNode } from './replaceWithNode'
export { default as selectAll } from './selectAll'
export { default as selectParentNode } from './selectParentNode'
export { default as setContent } from './setContent'
export { default as sinkListItem } from './sinkListItem'
export { default as splitListItem } from './splitListItem'
export { default as toggleMark } from './toggleMark'
export { default as toggleNode } from './toggleNode'
export { default as updateMark } from './updateMark'
export { blur } from './blur'
export { clearContent } from './clearContent'
export { deleteSelection } from './deleteSelection'
export { focus } from './focus'
export { insertHTML } from './insertHTML'
export { insertText } from './insertText'
export { liftListItem } from './liftListItem'
export { removeMark } from './removeMark'
export { removeMarks } from './removeMarks'
export { replaceWithNode } from './replaceWithNode'
export { selectAll } from './selectAll'
export { selectParentNode } from './selectParentNode'
export { setContent } from './setContent'
export { sinkListItem } from './sinkListItem'
export { splitListItem } from './splitListItem'
export { toggleList } from './toggleList'
export { toggleMark } from './toggleMark'
export { toggleNode } from './toggleNode'
export { updateMark } from './updateMark'

View File

@@ -1,22 +1,37 @@
import { DOMParser } from 'prosemirror-model'
import { Editor } from '../Editor'
import { Selection, Transaction } from 'prosemirror-state'
import { Command } from '../Editor'
import elementFromString from '../utils/elementFromString'
import {ReplaceStep, ReplaceAroundStep} from "prosemirror-transform"
type InsertHTMLCommand = (value: string) => Editor
type InsertHTMLCommand = (value: string) => Command
declare module '../Editor' {
interface Editor {
interface Commands {
insertHTML: InsertHTMLCommand,
}
}
export default (next: Function, editor: Editor) => (value: string) => {
const { view, state } = editor
const { selection } = state
// TODO: move to utils
// https://github.com/ProseMirror/prosemirror-state/blob/master/src/selection.js#L466
function selectionToInsertionEnd(tr: Transaction, startLen: number, bias: number) {
let last = tr.steps.length - 1
if (last < startLen) return
let step = tr.steps[last]
if (!(step instanceof ReplaceStep || step instanceof ReplaceAroundStep)) return
let map = tr.mapping.maps[last]
let end = 0
map.forEach((_from, _to, _newFrom, newTo) => { if (end == 0) end = newTo })
tr.setSelection(Selection.near(tr.doc.resolve(end as unknown as number), bias))
}
export const insertHTML: InsertHTMLCommand = value => ({ tr, state }) => {
const { selection } = tr
const element = elementFromString(value)
const slice = DOMParser.fromSchema(state.schema).parseSlice(element)
const transaction = state.tr.insert(selection.anchor, slice.content)
view.dispatch(transaction)
next()
tr.insert(selection.anchor, slice.content)
selectionToInsertionEnd(tr, tr.steps.length - 1, -1)
return true
}

View File

@@ -1,17 +1,15 @@
import { Editor } from '../Editor'
import { Command } from '../Editor'
type InsertTextCommand = (value: string) => Editor
type InsertTextCommand = (value: string) => Command
declare module '../Editor' {
interface Editor {
interface Commands {
insertText: InsertTextCommand,
}
}
export default (next: Function, editor: Editor) => (value: string) => {
const { view, state } = editor
const transaction = state.tr.insertText(value)
export const insertText: InsertTextCommand = value => ({ tr }) => {
tr.insertText(value)
view.dispatch(transaction)
next()
return true
}

View File

@@ -1,20 +1,18 @@
import { Editor } from '../Editor'
import { liftListItem } from 'prosemirror-schema-list'
import { Command } from '../Editor'
import { liftListItem as originalLiftListItem } from 'prosemirror-schema-list'
import { NodeType } from 'prosemirror-model'
import getNodeType from '../utils/getNodeType'
type LiftListItem = (typeOrName: string | NodeType) => Editor
type LiftListItem = (typeOrName: string | NodeType) => Command
declare module '../Editor' {
interface Editor {
interface Commands {
liftListItem: LiftListItem,
}
}
export default (next: Function, editor: Editor) => (typeOrName: string | NodeType) => {
const { view, state, schema } = editor
const type = getNodeType(typeOrName, schema)
export const liftListItem: LiftListItem = (typeOrName) => ({ state, dispatch }) => {
const type = getNodeType(typeOrName, state.schema)
liftListItem(type)(state, view.dispatch)
next()
return originalLiftListItem(type)(state, dispatch)
}

View File

@@ -1,20 +1,19 @@
import { Editor } from '../Editor'
import { Command } from '../Editor'
import { MarkType } from 'prosemirror-model'
import getMarkType from '../utils/getMarkType'
import getMarkRange from '../utils/getMarkRange'
type RemoveMarkCommand = (typeOrName: string | MarkType) => Editor
type RemoveMarkCommand = (typeOrName: string | MarkType) => Command
declare module '../Editor' {
interface Editor {
interface Commands {
toggleMark: RemoveMarkCommand,
}
}
export default (next: Function, editor: Editor) => (typeOrName: string | MarkType) => {
const { view, state, schema } = editor
const { tr, selection } = state
const type = getMarkType(typeOrName, schema)
export const removeMark: RemoveMarkCommand = (typeOrName) => ({ tr, state }) => {
const { selection } = tr
const type = getMarkType(typeOrName, state.schema)
let { from, to, $from, empty } = selection
if (empty) {
@@ -27,6 +26,6 @@ export default (next: Function, editor: Editor) => (typeOrName: string | MarkTyp
}
tr.removeMark(from, to, type)
view.dispatch(tr)
next()
return true
}

View File

@@ -1,30 +1,26 @@
import { Editor } from '../Editor'
import { Command } from '../Editor'
type RemoveMarksCommand = () => Editor
type RemoveMarksCommand = () => Command
declare module '../Editor' {
interface Editor {
interface Commands {
removeMarks: RemoveMarksCommand,
}
}
export default (next: Function, editor: Editor) => () => {
const { state, view, schema } = editor
const { selection, tr } = state
export const removeMarks: RemoveMarksCommand = () => ({ tr, state, view }) => {
const { selection } = tr
const { from, to, empty } = selection
let transaction = tr
if (empty) {
next()
return
return true
}
Object
.entries(schema.marks)
.entries(state.schema.marks)
.forEach(([name, mark]) => {
transaction.removeMark(from, to, mark)
tr.removeMark(from, to, mark as any)
})
view.dispatch(transaction)
next()
return true
}

View File

@@ -1,4 +1,4 @@
import { Editor } from '../Editor'
import { Command } from '../Editor'
import { NodeType } from 'prosemirror-model'
import getNodeType from '../utils/getNodeType'
@@ -11,25 +11,26 @@ type ReplaceWithNodeCommand = (
typeOrName: NodeType,
attrs: {},
range?: Range,
) => Editor
) => Command
declare module '../Editor' {
interface Editor {
interface Commands {
replaceText: ReplaceWithNodeCommand,
}
}
export default (next: Function, editor: Editor) => (typeOrName: NodeType, attrs: {}, range?: Range) => {
const { view, state, schema } = editor
const { $from, $to } = state.selection
const type = getNodeType(typeOrName, schema)
export const replaceWithNode: ReplaceWithNodeCommand = (typeOrName, attrs = {}, range) => ({ view, tr, state }) => {
const { $from, $to } = tr.selection
const type = getNodeType(typeOrName, state.schema)
const index = $from.index()
const from = range ? range.from : $from.pos
const to = range ? range.to : $to.pos
if ($from.parent.canReplaceWith(index, index, type)) {
view.dispatch(state.tr.replaceWith(from, to, type.create(attrs)))
if (!$from.parent.canReplaceWith(index, index, type)) {
return false
}
next()
view.dispatch(tr.replaceWith(from, to, type.create(attrs)))
return true
}

View File

@@ -1,15 +1,14 @@
import { Editor } from '../Editor'
import { selectAll } from 'prosemirror-commands'
import { Command } from '../Editor'
import { selectAll as originalSelectAll } from 'prosemirror-commands'
type SelectAllCommand = () => Editor
type SelectAllCommand = () => Command
declare module '../Editor' {
interface Editor {
interface Commands {
selectAll: SelectAllCommand,
}
}
export default (next: Function, { state, view }: Editor) => () => {
selectAll(state, view.dispatch)
next()
export const selectAll: SelectAllCommand = () => ({ state, dispatch }) => {
return originalSelectAll(state, dispatch)
}

View File

@@ -1,15 +1,14 @@
import { Editor } from '../Editor'
import { selectParentNode } from 'prosemirror-commands'
import { Command } from '../Editor'
import { selectParentNode as originalSelectParentNode } from 'prosemirror-commands'
type SelectParentNodeCommand = () => Editor
type SelectParentNodeCommand = () => Command
declare module '../Editor' {
interface Editor {
interface Commands {
selectParentNode: SelectParentNodeCommand,
}
}
export default (next: Function, { state, view }: Editor) => () => {
selectParentNode(state, view.dispatch)
next()
export const selectParentNode: SelectParentNodeCommand = () => ({ state, dispatch }) => {
return originalSelectParentNode(state, dispatch)
}

View File

@@ -1,33 +1,27 @@
import { Editor } from '../Editor'
import { Command } from '../Editor'
import { TextSelection } from 'prosemirror-state'
type SetContentCommand = (
content: string,
emitUpdate?: Boolean,
parseOptions?: any,
) => Editor
) => Command
declare module '../Editor' {
interface Editor {
interface Commands {
setContent: SetContentCommand,
}
}
export default (next: Function, editor: Editor) => (content: string, emitUpdate: Boolean = false, parseOptions = {}) => {
if (content === null) {
next()
return
}
const { view, state, createDocument } = editor
const { doc, tr } = state
export const setContent: SetContentCommand = (content = '', emitUpdate = false, parseOptions = {}) => ({ tr, editor }) => {
const { createDocument } = editor
const { doc } = tr
const document = createDocument(content, parseOptions)
const selection = TextSelection.create(doc, 0, doc.content.size)
const transaction = tr
.setSelection(selection)
tr.setSelection(selection)
.replaceSelectionWith(document, false)
.setMeta('preventUpdate', !emitUpdate)
view.dispatch(transaction)
next()
return true
}

View File

@@ -1,20 +1,18 @@
import { Editor } from '../Editor'
import { sinkListItem } from 'prosemirror-schema-list'
import { Command } from '../Editor'
import { sinkListItem as originalSinkListItem } from 'prosemirror-schema-list'
import { NodeType } from 'prosemirror-model'
import getNodeType from '../utils/getNodeType'
type SinkListItem = (typeOrName: string | NodeType) => Editor
type SinkListItem = (typeOrName: string | NodeType) => Command
declare module '../Editor' {
interface Editor {
interface Commands {
sinkListItem: SinkListItem,
}
}
export default (next: Function, editor: Editor) => (typeOrName: string | NodeType) => {
const { view, state, schema } = editor
const type = getNodeType(typeOrName, schema)
export const sinkListItem: SinkListItem = (typeOrName) => ({ state, dispatch }) => {
const type = getNodeType(typeOrName, state.schema)
sinkListItem(type)(state, view.dispatch)
next()
return originalSinkListItem(type)(state, dispatch)
}

View File

@@ -1,20 +1,18 @@
import { Editor } from '../Editor'
import { splitListItem } from 'prosemirror-schema-list'
import { Command } from '../Editor'
import { splitListItem as originalSplitListItem } from 'prosemirror-schema-list'
import { NodeType } from 'prosemirror-model'
import getNodeType from '../utils/getNodeType'
type SplitListItem = (typeOrName: string | NodeType) => Editor
type SplitListItem = (typeOrName: string | NodeType) => Command
declare module '../Editor' {
interface Editor {
interface Commands {
splitListItem: SplitListItem,
}
}
export default (next: Function, editor: Editor) => (typeOrName: string | NodeType) => {
const { view, state, schema } = editor
const type = getNodeType(typeOrName, schema)
export const splitListItem: SplitListItem = (typeOrName) => ({ state, dispatch }) => {
const type = getNodeType(typeOrName, state.schema)
return splitListItem(type)(state, view.dispatch)
// next()
return originalSplitListItem(type)(state, dispatch)
}

View File

@@ -0,0 +1,50 @@
import { Command } from '../Editor'
import { wrapInList, liftListItem } from 'prosemirror-schema-list'
import { findParentNode } from 'prosemirror-utils'
import { Node, NodeType, Schema } from 'prosemirror-model'
import getNodeType from '../utils/getNodeType'
type ToggleListCommand = (
listType: string | NodeType,
itemType: string | NodeType,
) => Command
declare module '../Editor' {
interface Commands {
toggleList: ToggleListCommand,
}
}
function isList(node: Node, schema: Schema) {
return (node.type === schema.nodes.bullet_list
|| node.type === schema.nodes.ordered_list
|| node.type === schema.nodes.todo_list)
}
export const toggleList: ToggleListCommand = (listTypeOrName, itemTypeOrName) => ({ tr, state, dispatch }) => {
const listType = getNodeType(listTypeOrName, state.schema)
const itemType = getNodeType(itemTypeOrName, state.schema)
const { schema, selection } = state
const { $from, $to } = selection
const range = $from.blockRange($to)
if (!range) {
return false
}
const parentList = findParentNode(node => isList(node, schema))(selection)
if (range.depth >= 1 && parentList && range.depth - parentList.depth <= 1) {
if (parentList.node.type === listType) {
return liftListItem(itemType)(state, dispatch)
}
if (isList(parentList.node, schema) && listType.validContent(parentList.node.content)) {
tr.setNodeMarkup(parentList.pos, listType)
return false
}
}
return wrapInList(listType)(state, dispatch)
}

View File

@@ -1,20 +1,18 @@
import { Editor } from '../Editor'
import { toggleMark } from 'prosemirror-commands'
import { Command } from '../Editor'
import { toggleMark as originalToggleMark } from 'prosemirror-commands'
import { MarkType } from 'prosemirror-model'
import getMarkType from '../utils/getMarkType'
type ToggleMarkCommand = (typeOrName: string | MarkType) => Editor
type ToggleMarkCommand = (typeOrName: string | MarkType) => Command
declare module '../Editor' {
interface Editor {
interface Commands {
toggleMark: ToggleMarkCommand,
}
}
export default (next: Function, editor: Editor) => (typeOrName: string | MarkType) => {
const { view, state, schema } = editor
const type = getMarkType(typeOrName, schema)
export const toggleMark: ToggleMarkCommand = (typeOrName) => ({ state, dispatch }) => {
const type = getMarkType(typeOrName, state.schema)
toggleMark(type)(state, view.dispatch)
next()
return originalToggleMark(type)(state, dispatch)
}

View File

@@ -1,6 +1,6 @@
import { NodeType } from 'prosemirror-model'
import { setBlockType } from 'prosemirror-commands'
import { Editor } from '../Editor'
import { Command } from '../Editor'
import nodeIsActive from '../utils/nodeIsActive'
import getNodeType from '../utils/getNodeType'
@@ -8,25 +8,22 @@ type ToggleNodeCommand = (
typeOrName: string | NodeType,
toggleType: string | NodeType,
attrs?: {}
) => Editor
) => Command
declare module '../Editor' {
interface Editor {
interface Commands {
toggleNode: ToggleNodeCommand,
}
}
export default (next: Function, editor: Editor) => (typeOrName: string | NodeType, toggleTypeOrName: string | NodeType, attrs = {}) => {
const { view, state, schema } = editor
const type = getNodeType(typeOrName, schema)
const toggleType = getNodeType(toggleTypeOrName, schema)
export const toggleNode: ToggleNodeCommand = (typeOrName, toggleTypeOrName, attrs = {}) => ({ state, dispatch }) => {
const type = getNodeType(typeOrName, state.schema)
const toggleType = getNodeType(toggleTypeOrName, state.schema)
const isActive = nodeIsActive(state, type, attrs)
if (isActive) {
setBlockType(toggleType)(view.state, view.dispatch)
return setBlockType(toggleType)(state, dispatch)
} else {
setBlockType(type, attrs)(view.state, view.dispatch)
return setBlockType(type, attrs)(state, dispatch)
}
next()
}

View File

@@ -1,4 +1,4 @@
import { Editor } from '../Editor'
import { Command } from '../Editor'
import { MarkType } from 'prosemirror-model'
import getMarkType from '../utils/getMarkType'
import getMarkRange from '../utils/getMarkRange'
@@ -6,19 +6,18 @@ import getMarkRange from '../utils/getMarkRange'
type UpdateMarkCommand = (
typeOrName: string | MarkType,
attrs: {},
) => Editor
) => Command
declare module '../Editor' {
interface Editor {
interface Commands {
updateMark: UpdateMarkCommand,
}
}
export default (next: Function, editor: Editor) => (typeOrName: string | MarkType, attrs = {}) => {
const { view, state, schema } = editor
const { tr, selection, doc } = state
export const updateMark: UpdateMarkCommand = (typeOrName, attrs = {}) => ({ tr, state }) => {
const { selection, doc } = tr
let { from, to, $from, empty } = selection
const type = getMarkType(typeOrName, schema)
const type = getMarkType(typeOrName, state.schema)
if (empty) {
const range = getMarkRange($from, type)
@@ -36,6 +35,6 @@ export default (next: Function, editor: Editor) => (typeOrName: string | MarkTyp
}
tr.addMark(from, to, type.create(attrs))
view.dispatch(tr)
next()
return true
}

View File

@@ -4,7 +4,7 @@ import { dropCursor } from 'prosemirror-dropcursor'
import { gapCursor } from 'prosemirror-gapcursor'
import editable from './editable'
import focus from './focus'
import undoInputRule from '../utils/undoInputRule'
import { undoInputRule } from 'prosemirror-inputrules'
export default [
() => dropCursor(),

View File

@@ -1,32 +0,0 @@
import { EditorState, Transaction } from 'prosemirror-state'
// source: https://github.com/ProseMirror/prosemirror-inputrules/blob/2d3ae3abe3428a1b4d343808915aafeff8563371/src/inputrules.js#L101
export default function undoInputRule(state: EditorState, dispatch?: (tr: Transaction<any>) => void) {
let plugins = state.plugins
for (let i = 0; i < plugins.length; i++) {
let plugin = plugins[i], undoable
// @ts-ignore
if (plugin.spec.isInputRules && (undoable = plugin.getState(state))) {
if (dispatch) {
let tr = state.tr, toUndo = undoable.transform
for (let j = toUndo.steps.length - 1; j >= 0; j--) {
tr.step(toUndo.steps[j].invert(toUndo.docs[j]))
}
let marks = tr.doc.resolve(undoable.from).marks()
if (!undoable.text) {
return false
}
dispatch(tr.replaceWith(undoable.from, undoable.to, state.schema.text(undoable.text, marks)))
}
return true
}
}
return false
}

View File

@@ -1,9 +1,11 @@
import { Node } from '@tiptap/core'
import { Command, Node } from '@tiptap/core'
import { textblockTypeInputRule } from 'prosemirror-inputrules'
export type BlockquoteCommand = () => Command
declare module '@tiptap/core/src/Editor' {
interface Editor {
blockquote(): Editor,
interface Commands {
blockquote: BlockquoteCommand,
}
}
@@ -21,10 +23,9 @@ export default new Node()
],
toDOM: () => ['blockquote', 0],
}))
.commands(({ editor, name }) => ({
[name]: next => attrs => {
editor.toggleNode(name, 'paragraph', attrs)
next()
.commands(({ name }) => ({
[name]: attrs => ({ commands }) => {
return commands.toggleNode(name, 'paragraph', attrs)
},
}))
.keys(({ editor }) => ({

View File

@@ -1,8 +1,10 @@
import { Mark, markInputRule, markPasteRule } from '@tiptap/core'
import { Command, Mark, markInputRule, markPasteRule } from '@tiptap/core'
export type BoldCommand = () => Command
declare module '@tiptap/core/src/Editor' {
interface Editor {
bold(): Editor,
interface Commands {
bold: BoldCommand,
}
}
@@ -29,10 +31,9 @@ export default new Mark()
],
toDOM: () => ['strong', 0],
}))
.commands(({ editor, name }) => ({
bold: next => () => {
editor.toggleMark(name)
next()
.commands(({ name }) => ({
bold: () => ({ commands }) => {
return commands.toggleMark(name)
},
}))
.keys(({ editor }) => ({

View File

@@ -1,9 +1,11 @@
import { Node } from '@tiptap/core'
import { Command, Node } from '@tiptap/core'
import { wrappingInputRule } from 'prosemirror-inputrules'
export type BulletListCommand = () => Command
declare module '@tiptap/core/src/Editor' {
interface Editor {
bulletList(): Editor,
interface Commands {
bulletList: BulletListCommand,
}
}
@@ -17,10 +19,9 @@ export default new Node()
],
toDOM: () => ['ul', 0],
}))
.commands(({ editor, type }) => ({
[name]: next => attrs => {
// editor.toggleList(type, editor.schema.nodes.list_item)
next()
.commands(({ name }) => ({
bulletList: () => ({ commands }) => {
return commands.toggleList(name, 'list_item')
},
}))
.keys(({ editor }) => ({

View File

@@ -1,14 +1,16 @@
import { Node } from '@tiptap/core'
import { Command, Node } from '@tiptap/core'
import { textblockTypeInputRule } from 'prosemirror-inputrules'
export type CodeBlockCommand = () => Command
declare module '@tiptap/core/src/Editor' {
interface Editor {
codeBlock(): Editor,
interface Commands {
codeBlock: CodeBlockCommand,
}
}
export default new Node()
.name('codeBlock')
.name('code_block')
.schema(() => ({
content: 'text*',
marks: '',
@@ -21,10 +23,9 @@ export default new Node()
],
toDOM: () => ['pre', ['code', 0]],
}))
.commands(({ editor, name }) => ({
[name]: next => attrs => {
editor.toggleNode(name, 'paragraph', attrs)
next()
.commands(({ name }) => ({
codeBlock: attrs => ({ commands }) => {
return commands.toggleNode(name, 'paragraph', attrs)
},
}))
.keys(({ editor }) => ({

View File

@@ -1,8 +1,10 @@
import { Mark, markInputRule, markPasteRule } from '@tiptap/core'
import { Command, Mark, markInputRule, markPasteRule } from '@tiptap/core'
export type CodeCommand = () => Command
declare module '@tiptap/core/src/Editor' {
interface Editor {
code(): Editor,
interface Commands {
code: CodeCommand,
}
}
@@ -18,10 +20,9 @@ export default new Mark()
],
toDOM: () => ['code', 0],
}))
.commands(({ editor, name }) => ({
code: next => () => {
editor.toggleMark(name)
next()
.commands(({ name }) => ({
code: () => ({ commands }) => {
return commands.toggleMark(name)
},
}))
.keys(({ editor }) => ({

View File

@@ -1,9 +1,11 @@
import { Node } from '@tiptap/core'
import { Command, Node } from '@tiptap/core'
import { chainCommands, exitCode } from 'prosemirror-commands'
export type HardBreakCommand = () => Command
declare module '@tiptap/core/src/Editor' {
interface Editor {
hardBreak(): Editor,
interface Commands {
hardBreak: HardBreakCommand,
}
}
@@ -19,16 +21,11 @@ export default new Node()
toDOM: () => ['br'],
}))
.commands(({ editor, type }) => ({
hardBreak: next => () => {
const { state, view } = editor
const { dispatch } = view
chainCommands(exitCode, () => {
dispatch(state.tr.replaceSelectionWith(type.create()).scrollIntoView())
hardBreak: () => ({ tr, state, dispatch, view }) => {
return chainCommands(exitCode, () => {
dispatch(tr.replaceSelectionWith(type.create()).scrollIntoView())
return true
})(state, dispatch, view)
next()
},
}))
.keys(({ editor }) => ({

View File

@@ -1,4 +1,4 @@
import { Node } from '@tiptap/core'
import { Command, Node } from '@tiptap/core'
import { textblockTypeInputRule } from 'prosemirror-inputrules'
type Level = 1 | 2 | 3 | 4 | 5 | 6
@@ -7,9 +7,11 @@ export interface HeadingOptions {
levels: Level[],
}
export type HeadingCommand = (level: Level) => Command
declare module '@tiptap/core/src/Editor' {
interface Editor {
heading(level: Level): Editor,
interface Commands {
heading: HeadingCommand,
}
}
@@ -35,10 +37,9 @@ export default new Node<HeadingOptions>()
})),
toDOM: node => [`h${node.attrs.level}`, 0],
}))
.commands(({ editor, name }) => ({
[name]: next => attrs => {
editor.toggleNode(name, 'paragraph', attrs)
next()
.commands(({ name }) => ({
[name]: attrs => ({ commands }) => {
return commands.toggleNode(name, 'paragraph', attrs)
},
}))
// TODO: Keyboard Shortcuts

View File

@@ -1,4 +1,4 @@
import { Extension } from '@tiptap/core'
import { Command, Extension } from '@tiptap/core'
import {
history,
undo,
@@ -8,9 +8,9 @@ import {
} from 'prosemirror-history'
declare module '@tiptap/core/src/Editor' {
interface Editor {
undo(): Editor,
redo(): Editor,
interface Commands {
undo: () => Command,
redo: () => Command,
}
}
@@ -24,13 +24,11 @@ export default new Extension<HistoryOptions>()
historyPluginOptions: {},
})
.commands(() => ({
undo: (next, { view }) => () => {
undo(view.state, view.dispatch)
next()
undo: () => ({ state, dispatch }) => {
return undo(state, dispatch)
},
redo: (next, { view }) => () => {
redo(view.state, view.dispatch)
next()
redo: () => ({ state, dispatch }) => {
return redo(state, dispatch)
},
}))
.keys(({ editor }) => ({

View File

@@ -1,8 +1,10 @@
import { Node, nodeInputRule } from '@tiptap/core'
import { Command, Node, nodeInputRule } from '@tiptap/core'
export type HorizontalRuleCommand = () => Command
declare module '@tiptap/core/src/Editor' {
interface Editor {
horizontalRule(): Editor,
interface Commands {
horizontalRule: HorizontalRuleCommand,
}
}
@@ -13,13 +15,11 @@ export default new Node()
parseDOM: [{ tag: 'hr' }],
toDOM: () => ['hr'],
}))
.commands(({ editor, type }) => ({
horizontalRule: next => () => {
const { state, view } = editor
const { dispatch } = view
.commands(({ type }) => ({
horizontalRule: () => ({ tr }) => {
tr.replaceSelectionWith(type.create())
dispatch(state.tr.replaceSelectionWith(type.create()))
next()
return true
},
}))
.inputRules(({ type }) => [

View File

@@ -1,8 +1,10 @@
import { Mark, markInputRule, markPasteRule } from '@tiptap/core'
import { Command, Mark, markInputRule, markPasteRule } from '@tiptap/core'
export type ItalicCommand = () => Command
declare module '@tiptap/core/src/Editor' {
interface Editor {
italic(): Editor,
interface Commands {
italic: ItalicCommand,
}
}
@@ -21,10 +23,9 @@ export default new Mark()
],
toDOM: () => ['em', 0],
}))
.commands(({ editor, name }) => ({
italic: next => () => {
editor.toggleMark(name)
next()
.commands(({ name }) => ({
italic: () => ({ commands }) => {
return commands.toggleMark(name)
},
}))
.keys(({ editor }) => ({

View File

@@ -6,14 +6,12 @@ export default new Node()
content: 'paragraph block*',
defining: true,
draggable: false,
parseDOM: [
{ tag: 'li' },
],
parseDOM: [{ tag: 'li' }],
toDOM: () => ['li', 0],
}))
.keys(({ editor, name }) => ({
Enter: () => editor.splitListItem(name).focus()
// Tab: () => editor.sinkListItem(name),
// 'Shift-Tab': () => editor.liftListItem(name),
Enter: () => editor.splitListItem(name),
Tab: () => editor.sinkListItem(name),
'Shift-Tab': () => editor.liftListItem(name),
}))
.create()

View File

@@ -0,0 +1,51 @@
import { Command, Node } from '@tiptap/core'
import { wrappingInputRule } from 'prosemirror-inputrules'
export type OrderedListCommand = () => Command
declare module '@tiptap/core/src/Editor' {
interface Commands {
orderedList: OrderedListCommand,
}
}
export default new Node()
.name('ordered_list')
.schema(() => ({
attrs: {
order: {
default: 1,
},
},
content: 'list_item+',
group: 'block',
parseDOM: [{
tag: 'ol',
getAttrs: node => ({
order: (node as HTMLElement).hasAttribute('start')
? parseInt((node as HTMLElement).getAttribute('start') || '')
: 1,
}),
}],
toDOM: node => (node.attrs.order === 1
? ['ol', 0]
: ['ol', { start: node.attrs.order }, 0]
),
}))
.commands(({ name }) => ({
orderedList: () => ({ commands }) => {
return commands.toggleList(name, 'list_item')
},
}))
.keys(({ editor }) => ({
'Shift-Ctrl-9': () => editor.orderedList(),
}))
.inputRules(({ type }) => [
wrappingInputRule(
/^(\d+)\.\s$/,
type,
match => ({ order: +match[1] }),
(match, node) => node.childCount + node.attrs.order === +match[1],
),
])
.create()

View File

@@ -0,0 +1,17 @@
{
"name": "@tiptap/extension-ordered-list",
"version": "1.0.0",
"source": "index.ts",
"main": "dist/tiptap-extension-ordered-list.js",
"umd:main": "dist/tiptap-extension-ordered-list.umd.js",
"module": "dist/tiptap-extension-ordered-list.mjs",
"unpkg": "dist/tiptap-extension-ordered-list.js",
"jsdelivr": "dist/tiptap-extension-ordered-list.js",
"files": [
"src",
"dist"
],
"peerDependencies": {
"@tiptap/core": "2.x"
}
}

View File

@@ -1,8 +1,10 @@
import { Mark, markInputRule, markPasteRule } from '@tiptap/core'
import { Command, Mark, markInputRule, markPasteRule } from '@tiptap/core'
type StrikeCommand = () => Command
declare module '@tiptap/core/src/Editor' {
interface Editor {
strike(): Editor,
interface Commands {
strike: StrikeCommand,
}
}
@@ -29,10 +31,9 @@ export default new Mark()
],
toDOM: () => ['s', 0],
}))
.commands(({ editor, name }) => ({
strike: next => () => {
editor.toggleMark(name)
next()
.commands(({ name }) => ({
strike: () => ({ commands }) => {
return commands.toggleMark(name)
},
}))
.keys(({ editor }) => ({

View File

@@ -1,8 +1,10 @@
import { Mark } from '@tiptap/core'
import { Command, Mark } from '@tiptap/core'
export type UnderlineCommand = () => Command
declare module '@tiptap/core/src/Editor' {
interface Editor {
underline(): Editor,
interface Commands {
underline: UnderlineCommand,
}
}
@@ -21,9 +23,8 @@ export default new Mark()
toDOM: () => ['u', 0],
}))
.commands(({ editor, name }) => ({
underline: next => () => {
editor.toggleMark(name)
next()
underline: () => ({ commands }) => {
return commands.toggleMark(name)
},
}))
.keys(({ editor }) => ({

View File

@@ -10,6 +10,6 @@
"@tiptap/core": "2.x",
"@types/jsdom": "^16.2.4",
"jsdom": "^16.4.0",
"prosemirror-model": "^1.11.0"
"prosemirror-model": "^1.11.2"
}
}

View File

@@ -13,6 +13,7 @@ import Underline from '@tiptap/extension-underline'
import Blockquote from '@tiptap/extension-blockquote'
import HorizontalRule from '@tiptap/extension-horizontal-rule'
import BulletList from '@tiptap/extension-bullet-list'
import OrderedList from '@tiptap/extension-ordered-list'
import ListItem from '@tiptap/extension-list-item'
export default function defaultExtensions() {
@@ -32,6 +33,7 @@ export default function defaultExtensions() {
Blockquote(),
HorizontalRule(),
BulletList(),
OrderedList(),
ListItem(),
]
}

View File

@@ -27,6 +27,7 @@
"@tiptap/extension-blockquote": "1.x",
"@tiptap/extension-horizontal-rule": "1.x",
"@tiptap/extension-bullet-list": "1.x",
"@tiptap/extension-ordered-list": "1.x",
"@tiptap/extension-list-item": "1.x"
}
}

View File

@@ -15,6 +15,7 @@ import Underline from '@tiptap/extension-underline'
import Blockquote from '@tiptap/extension-blockquote'
import HorizontalRule from '@tiptap/extension-horizontal-rule'
import BulletList from '@tiptap/extension-bullet-list'
import OrderedList from '@tiptap/extension-ordered-list'
import ListItem from '@tiptap/extension-list-item'
export function defaultExtensions() {
@@ -34,6 +35,7 @@ export function defaultExtensions() {
Blockquote(),
HorizontalRule(),
BulletList(),
OrderedList(),
ListItem(),
]
}

View File

@@ -28,6 +28,7 @@
"@tiptap/extension-blockquote": "1.x",
"@tiptap/extension-horizontal-rule": "1.x",
"@tiptap/extension-bullet-list": "1.x",
"@tiptap/extension-ordered-list": "1.x",
"@tiptap/extension-list-item": "1.x"
}
}

265
yarn.lock
View File

@@ -1146,10 +1146,10 @@
dependencies:
json-parse-better-errors "^1.0.2"
"@gridsome/transformer-remark@^0.6.2":
version "0.6.2"
resolved "https://registry.yarnpkg.com/@gridsome/transformer-remark/-/transformer-remark-0.6.2.tgz#ab8822556cdbc9dd4a53115aa125668b233d6998"
integrity sha512-6kkdKg35vuCiZYfNxM+rqkZjG9ztgCAVT8bb3Kqqu+/FNCwMYUInIfWeW7ApAjj+ng/YFG1tB+fAABCeH3sEbw==
"@gridsome/transformer-remark@^0.6.3":
version "0.6.3"
resolved "https://registry.yarnpkg.com/@gridsome/transformer-remark/-/transformer-remark-0.6.3.tgz#bac601e7f7aa8c346d83137334168059b6a26c9d"
integrity sha512-pU98Kn+/DIK1fBaop6QbL4+HMchbg3Nz57duBWVAtQ0WDLjNzYm1EnqsTjQyxrgt077sEjSLScrVmoAsxlsLZQ==
dependencies:
gray-matter "^4.0.2"
hash-sum "^1.0.2"
@@ -1167,17 +1167,17 @@
unist-util-visit "^1.4.0"
vfile "^4.0.0"
"@gridsome/vue-remark@^0.2.4":
version "0.2.4"
resolved "https://registry.yarnpkg.com/@gridsome/vue-remark/-/vue-remark-0.2.4.tgz#42bf05135269e4b550ca0ab34ba634b5e7d89627"
integrity sha512-l6MMzkcsWcwruuV9Ug3CFHA9187qgAK0BHe45/9cSG/Byqh78wsgC9ltZ8b0LroZTdKOb5m83pD0ptNlGETBnQ==
"@gridsome/vue-remark@^0.2.5":
version "0.2.5"
resolved "https://registry.yarnpkg.com/@gridsome/vue-remark/-/vue-remark-0.2.5.tgz#cb84a09b62b57eca26599ddc29427fe4788b7f9c"
integrity sha512-zK/cQ/kf8T0p9cjHKa4ZiTbZKBTSi79hhkFemT3ubOJVTKwaPFiU2mw3lJYjiJn/RWViwWBHUrDRTktL8bnyZQ==
dependencies:
"@babel/core" "^7.0.0"
"@babel/parser" "^7.0.0"
"@babel/preset-env" "^7.0.0"
"@babel/traverse" "^7.0.0"
"@gridsome/source-filesystem" "^0.6.2"
"@gridsome/transformer-remark" "^0.6.2"
"@gridsome/transformer-remark" "^0.6.3"
hash-sum "^1.0.2"
hast-util-to-html "^5.0.0"
he "^1.2.0"
@@ -2021,16 +2021,16 @@
once "^1.4.0"
"@octokit/request@^5.2.0":
version "5.4.8"
resolved "https://registry.yarnpkg.com/@octokit/request/-/request-5.4.8.tgz#13ad36e172bb57e78bacf02cd86210d1f7412f04"
integrity sha512-mWbxjsARJzAq5xp+ZrQfotc+MHFz3/Am2qATJwflv4PZ1TjhgIJnr60PCVdZT9Z/tl+uPXooaVgeviy1KkDlLQ==
version "5.4.9"
resolved "https://registry.yarnpkg.com/@octokit/request/-/request-5.4.9.tgz#0a46f11b82351b3416d3157261ad9b1558c43365"
integrity sha512-CzwVvRyimIM1h2n9pLVYfTDmX9m+KHSgCpqPsY8F1NdEK8IaWqXhSBXsdjOBFZSpEcxNEeg4p0UO9cQ8EnOCLA==
dependencies:
"@octokit/endpoint" "^6.0.1"
"@octokit/request-error" "^2.0.0"
"@octokit/types" "^5.0.0"
deprecation "^2.0.0"
is-plain-object "^5.0.0"
node-fetch "^2.3.0"
node-fetch "^2.6.1"
once "^1.4.0"
universal-user-agent "^6.0.0"
@@ -2064,9 +2064,9 @@
"@types/node" ">= 8"
"@octokit/types@^5.0.0", "@octokit/types@^5.0.1":
version "5.4.1"
resolved "https://registry.yarnpkg.com/@octokit/types/-/types-5.4.1.tgz#d5d5f2b70ffc0e3f89467c3db749fa87fc3b7031"
integrity sha512-OlMlSySBJoJ6uozkr/i03nO5dlYQyE05vmQNZhAh9MyO4DPBP88QlwsDVLmVjIMFssvIZB6WO0ctIGMRG+xsJQ==
version "5.5.0"
resolved "https://registry.yarnpkg.com/@octokit/types/-/types-5.5.0.tgz#e5f06e8db21246ca102aa28444cdb13ae17a139b"
integrity sha512-UZ1pErDue6bZNjYOotCNveTXArOMZQFG6hKJfOnGnulVCMcVVi7YIIuuR4WfBhjo7zgpmzn/BkPDnUXtNx+PcQ==
dependencies:
"@types/node" ">= 8"
@@ -2210,9 +2210,9 @@
integrity sha1-aaI6OtKcrwCX8G7aWbNh7i8GOfY=
"@types/node@*", "@types/node@>= 8":
version "14.10.1"
resolved "https://registry.yarnpkg.com/@types/node/-/node-14.10.1.tgz#cc323bad8e8a533d4822f45ce4e5326f36e42177"
integrity sha512-aYNbO+FZ/3KGeQCEkNhHFRIzBOUgc7QvcVNKXbfnhDkSfwUv91JsQQa10rDgKSTSLkXZ1UIyPe4FJJNVgw1xWQ==
version "14.11.2"
resolved "https://registry.yarnpkg.com/@types/node/-/node-14.11.2.tgz#2de1ed6670439387da1c9f549a2ade2b0a799256"
integrity sha512-jiE3QIxJ8JLNcb1Ps6rDbysDhN4xa8DJJvuC9prr6w+1tIh+QAbYyNF3tyiZNLDBIuBCf4KEcV2UvQm/V60xfA==
"@types/normalize-package-data@^2.4.0":
version "2.4.0"
@@ -2396,9 +2396,9 @@
integrity sha512-1+7CwjQ0Kasml6rHoNQUmbISwqLNNfFVBUcZl6QBremUl296ZmLrVQPqJP5pyAAWjZke5bpI1hlj+LVVuT7Jcg==
"@vue/babel-plugin-jsx@^1.0.0-0":
version "1.0.0-rc.2"
resolved "https://registry.yarnpkg.com/@vue/babel-plugin-jsx/-/babel-plugin-jsx-1.0.0-rc.2.tgz#2c72a6bf6d10f57bb6bf1a2799214a541933345b"
integrity sha512-NVTDsaYShZx8ZqZo1Z0ndNrdoLfwRTwz0e6S+7SEn3j21WwlbVHMhD6t/tDBhvscwAQ5N/AFuCCrf90iyC5sHA==
version "1.0.0-rc.3"
resolved "https://registry.yarnpkg.com/@vue/babel-plugin-jsx/-/babel-plugin-jsx-1.0.0-rc.3.tgz#ab477ee95c764fbe68842a2eddd474f122e70ac6"
integrity sha512-/Ibq0hoKsidnHWPhgRpjcjYhYcHpqEm2fiKVAPO88OXZNHGwaGgS4yXkC6TDEvlZep4mBDo+2S5T81wpbVh90Q==
dependencies:
"@babel/helper-module-imports" "^7.0.0"
"@babel/plugin-syntax-jsx" "^7.0.0"
@@ -2771,9 +2771,9 @@ ajv-keywords@^3.1.0, ajv-keywords@^3.4.1, ajv-keywords@^3.5.2:
integrity sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ==
ajv@^6.1.0, ajv@^6.10.2, ajv@^6.12.3, ajv@^6.12.4:
version "6.12.4"
resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.12.4.tgz#0614facc4522127fa713445c6bfd3ebd376e2234"
integrity sha512-eienB2c9qVQs2KWexhkrdMLVDoIQCz5KSeLxwg9Lzk4DOfBtIK9PQwwufcsn1jjGuf9WZmqPMbGxOzfcuphJCQ==
version "6.12.5"
resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.12.5.tgz#19b0e8bae8f476e5ba666300387775fb1a00a4da"
integrity sha512-lRF8RORchjpKG50/WFf8xmg7sgCLFiYNNnqdKflk63whMQcWR5ngGjiSXkL9bjxy6B2npOK2HSMN49jEBMSkag==
dependencies:
fast-deep-equal "^3.1.1"
fast-json-stable-stringify "^2.0.0"
@@ -3436,13 +3436,13 @@ browserify-zlib@^0.2.0:
pako "~1.0.5"
browserslist@^4.0.0, browserslist@^4.12.0, browserslist@^4.8.5:
version "4.14.2"
resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.14.2.tgz#1b3cec458a1ba87588cc5e9be62f19b6d48813ce"
integrity sha512-HI4lPveGKUR0x2StIz+2FXfDk9SfVMrxn6PLh1JeGUwcuoDkdKZebWiyLRJ68iIPDpMI4JLVDf7S7XzslgWOhw==
version "4.14.3"
resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.14.3.tgz#381f9e7f13794b2eb17e1761b4f118e8ae665a53"
integrity sha512-GcZPC5+YqyPO4SFnz48/B0YaCwS47Q9iPChRGi6t7HhflKBcINzFrJvRfC+jp30sRMKxF+d4EHGs27Z0XP1NaQ==
dependencies:
caniuse-lite "^1.0.30001125"
electron-to-chromium "^1.3.564"
escalade "^3.0.2"
caniuse-lite "^1.0.30001131"
electron-to-chromium "^1.3.570"
escalade "^3.1.0"
node-releases "^1.1.61"
btoa-lite@^1.0.0:
@@ -3709,10 +3709,10 @@ caniuse-api@^3.0.0:
lodash.memoize "^4.1.2"
lodash.uniq "^4.5.0"
caniuse-lite@^1.0.0, caniuse-lite@^1.0.30001109, caniuse-lite@^1.0.30001125:
version "1.0.30001125"
resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001125.tgz#2a1a51ee045a0a2207474b086f628c34725e997b"
integrity sha512-9f+r7BW8Qli917mU3j0fUaTweT3f3vnX/Lcs+1C73V+RADmFme+Ih0Br8vONQi3X0lseOe6ZHfsZLCA8MSjxUA==
caniuse-lite@^1.0.0, caniuse-lite@^1.0.30001109, caniuse-lite@^1.0.30001131:
version "1.0.30001135"
resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001135.tgz#995b1eb94404a3c9a0d7600c113c9bb27f2cd8aa"
integrity sha512-ziNcheTGTHlu9g34EVoHQdIu5g4foc8EsxMGC7Xkokmvw0dqNtX8BS8RgCgFBaAiSp2IdjvBxNdh0ssib28eVQ==
case-sensitive-paths-webpack-plugin@^2.2.0:
version "2.3.0"
@@ -4688,10 +4688,10 @@ cyclist@^1.0.1:
resolved "https://registry.yarnpkg.com/cyclist/-/cyclist-1.0.1.tgz#596e9698fd0c80e12038c2b82d6eb1b35b6224d9"
integrity sha1-WW6WmP0MgOEgOMK4LW6xs1tiJNk=
cypress@^5.1.0:
version "5.1.0"
resolved "https://registry.yarnpkg.com/cypress/-/cypress-5.1.0.tgz#979e9ff3e0acd792eefd365bf104046479a9643b"
integrity sha512-craPRO+Viu4268s7eBvX5VJW8aBYcAQT+EwEccQSMY+eH1ZPwnxIgyDlmMWvxLVX9SkWxOlZbEycPyzanQScBQ==
cypress@^5.2.0:
version "5.2.0"
resolved "https://registry.yarnpkg.com/cypress/-/cypress-5.2.0.tgz#6902efd90703242a2539f0623c6e1118aff01f95"
integrity sha512-9S2spcrpIXrQ+CQIKHsjRoLQyRc2ehB06clJXPXXp1zyOL/uZMM3Qc20ipNki4CcNwY0nBTQZffPbRpODeGYQg==
dependencies:
"@cypress/listr-verbose-renderer" "^0.4.1"
"@cypress/request" "^2.88.5"
@@ -4792,11 +4792,11 @@ debug@^3.1.0, debug@^3.1.1, debug@^3.2.6:
ms "^2.1.1"
debug@^4.1.0, debug@^4.1.1:
version "4.1.1"
resolved "https://registry.yarnpkg.com/debug/-/debug-4.1.1.tgz#3b72260255109c6b589cee050f1d516139664791"
integrity sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==
version "4.2.0"
resolved "https://registry.yarnpkg.com/debug/-/debug-4.2.0.tgz#7f150f93920e94c58f5574c2fd01a3110effe7f1"
integrity sha512-IX2ncY78vDTjZMFUdmsvIRFY2Cf4FnD0wRs+nQwJU8Lu99/tPFdb0VybiiMTPe3I6rQmwsqQqRBvxU+bZ/I8sg==
dependencies:
ms "^2.1.1"
ms "2.1.2"
debuglog@^1.0.1:
version "1.0.1"
@@ -5086,9 +5086,9 @@ dom-serializer@0:
entities "^2.0.0"
dom-serializer@^1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/dom-serializer/-/dom-serializer-1.0.1.tgz#79695eb49af3cd8abc8d93a73da382deb1ca0795"
integrity sha512-1Aj1Qy3YLbdslkI75QEOfdp9TkQ3o8LRISAzxOibjBs/xWwr1WxZFOQphFkZuepHFGo+kB8e5FVJSS0faAJ4Rw==
version "1.1.0"
resolved "https://registry.yarnpkg.com/dom-serializer/-/dom-serializer-1.1.0.tgz#5f7c828f1bfc44887dc2a315ab5c45691d544b58"
integrity sha512-ox7bvGXt2n+uLWtCRLybYx60IrOlWL/aCebWJk1T0d4m3y2tzf4U3ij9wBMUb6YJZpz06HCCYuyCDveE2xXmzQ==
dependencies:
domelementtype "^2.0.1"
domhandler "^3.0.0"
@@ -5105,9 +5105,9 @@ domelementtype@1, domelementtype@^1.3.1:
integrity sha512-BSKB+TSpMpFI/HOxCNr1O8aMOTZ8hT3pM3GQ0w/mWRmkhEDSFJkkyzz4XQsBV44BChwGkrDfMyjVD0eA2aFV3w==
domelementtype@^2.0.1:
version "2.0.1"
resolved "https://registry.yarnpkg.com/domelementtype/-/domelementtype-2.0.1.tgz#1f8bdfe91f5a78063274e803b4bdcedf6e94f94d"
integrity sha512-5HOHUDsYZWV8FGWN0Njbr/Rn7f/eWSQi1v7+HsUVwXgn8nWWlL64zKDkS0n8ZmQ3mlWOMuXOnR+7Nx/5tMO5AQ==
version "2.0.2"
resolved "https://registry.yarnpkg.com/domelementtype/-/domelementtype-2.0.2.tgz#f3b6e549201e46f588b59463dd77187131fe6971"
integrity sha512-wFwTwCVebUrMgGeAwRL/NhZtHAUyT9n9yg4IMDwf10+6iCMxSkVq9MGCVEH+QZWo1nNidy8kNvwmv4zWHDTqvA==
domexception@^2.0.1:
version "2.0.1"
@@ -5147,9 +5147,9 @@ domutils@^1.5.1, domutils@^1.7.0:
domelementtype "1"
domutils@^2.0.0:
version "2.2.0"
resolved "https://registry.yarnpkg.com/domutils/-/domutils-2.2.0.tgz#f3ce1610af5c30280bde1b71f84b018b958f32cf"
integrity sha512-0haAxVr1PR0SqYwCH7mxMpHZUwjih9oPPedqpR/KufsnxPyZ9dyVw1R5093qnJF3WXSbjBkdzRWLw/knJV/fAg==
version "2.3.0"
resolved "https://registry.yarnpkg.com/domutils/-/domutils-2.3.0.tgz#6469c63a3da2de0c3016f3a59e6a969e10705bce"
integrity sha512-xWC75PM3QF6MjE5e58OzwTX0B/rPQnlqH0YyXB/c056RtVJA+eu60da2I/bdnEHzEYC00g8QaZUlAbqOZVbOsw==
dependencies:
dom-serializer "^1.0.1"
domelementtype "^2.0.1"
@@ -5255,10 +5255,10 @@ ee-first@1.1.1:
resolved "https://registry.yarnpkg.com/ee-first/-/ee-first-1.1.1.tgz#590c61156b0ae2f4f0255732a158b266bc56b21d"
integrity sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0=
electron-to-chromium@^1.3.564:
version "1.3.566"
resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.566.tgz#e373876bb63e5c9bbcbe1b48cbb2db000f79bf88"
integrity sha512-V0fANdGN7waOE0tvCDhjf1vqPRevG3eo0asYm42c4t1qmZSunlnUuWQDxglUi9wDpbKQlGIttMJ+2DYpRwvYRA==
electron-to-chromium@^1.3.570:
version "1.3.570"
resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.570.tgz#3f5141cc39b4e3892a276b4889980dabf1d29c7f"
integrity sha512-Y6OCoVQgFQBP5py6A/06+yWxUZHDlNr/gNDGatjH8AZqXl8X0tE4LfjLJsXGz/JmWJz8a6K7bR1k+QzZ+k//fg==
elegant-spinner@^1.0.1:
version "1.0.1"
@@ -5438,10 +5438,10 @@ es6-promisify@^6.1.1:
resolved "https://registry.yarnpkg.com/es6-promisify/-/es6-promisify-6.1.1.tgz#46837651b7b06bf6fff893d03f29393668d01621"
integrity sha512-HBL8I3mIki5C1Cc9QjKUenHtnG0A5/xA8Q/AllRcfiwl2CZFXGK7ddBiCoRwAix4i2KxcQfjtIVcrVbB3vbmwg==
escalade@^3.0.2:
version "3.0.2"
resolved "https://registry.yarnpkg.com/escalade/-/escalade-3.0.2.tgz#6a580d70edb87880f22b4c91d0d56078df6962c4"
integrity sha512-gPYAU37hYCUhW5euPeR+Y74F7BL+IBsV93j5cvGriSaD1aG6MGsqsV1yamRdrWrb2j3aiZvb0X+UBOWpx3JWtQ==
escalade@^3.1.0:
version "3.1.0"
resolved "https://registry.yarnpkg.com/escalade/-/escalade-3.1.0.tgz#e8e2d7c7a8b76f6ee64c2181d6b8151441602d4e"
integrity sha512-mAk+hPSO8fLDkhV7V0dXazH5pDc6MrjBTPyD3VeKzxnVFjH1MIxbCdqGZB9O8+EwWakZs3ZCbDS4IpRt79V1ig==
escape-goat@^2.0.0:
version "2.1.1"
@@ -6547,27 +6547,27 @@ graceful-fs@^4.1.10, graceful-fs@^4.1.11, graceful-fs@^4.1.15, graceful-fs@^4.1.
resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.4.tgz#2256bde14d3632958c465ebc96dc467ca07a29fb"
integrity sha512-WjKPNJF79dtJAVniUlGGWHYGz2jWxT6VhN/4m1NdkbZ2nOsEF+cI1Edgql5zCRhs/VsQYRvrXctxktVXZUkixw==
graphql-compose@^7.3.0:
version "7.21.0"
resolved "https://registry.yarnpkg.com/graphql-compose/-/graphql-compose-7.21.0.tgz#fdf154ff51a7c76624265d7e152cb53a6924d326"
integrity sha512-//zmQjJ8q4FS3Y13xFxdT/+keoD8mpi68aAWFQREvIr+ojnotvJ2qTj7vnHraGaHJAhjMj0kktTeSICDoXkeFQ==
graphql-compose@7.20.1:
version "7.20.1"
resolved "https://registry.yarnpkg.com/graphql-compose/-/graphql-compose-7.20.1.tgz#9b44c1cae615d760c265ce515b3ddbcfdeaa7bd6"
integrity sha512-4SQgGGIeNdZn5+XrYgQ3ma+nKUzQG861TGB6tRVQaUALVZ6IraY0wzZtPmypR4un2B0Cvt90HXsF6pDQFNnwTA==
dependencies:
graphql-type-json "0.3.2"
object-path "^0.11.4"
graphql-playground-html@^1.6.27:
version "1.6.27"
resolved "https://registry.yarnpkg.com/graphql-playground-html/-/graphql-playground-html-1.6.27.tgz#4ead6ef79c275184bbc90f3d69b4f764b5192090"
integrity sha512-f+M74WgZVwoY7CyT3teKpS1W/Zg6p0X4SbQT32oWz8QQ62ipQV0c+Xc/SvAwiBMxVgrbRsw3Yqvz8XdX56e4xw==
graphql-playground-html@^1.6.28:
version "1.6.28"
resolved "https://registry.yarnpkg.com/graphql-playground-html/-/graphql-playground-html-1.6.28.tgz#4a7c2e368c3f44deb7e86b70d3782b65edc64213"
integrity sha512-22uwTEGjZg0h9rYcM7WspcMPVsixAE8m56tNzwjGr2Y3pNY7OctbsMkJ3EPtPcL6ZdUpzsa4rMgYR54BGmTrpQ==
dependencies:
xss "^1.0.6"
graphql-playground-middleware-express@^1.7.12:
version "1.7.20"
resolved "https://registry.yarnpkg.com/graphql-playground-middleware-express/-/graphql-playground-middleware-express-1.7.20.tgz#6417f0c97af3a38b60b432fcc93f20d43c6e21e6"
integrity sha512-ldFtpVfG2cX9CyqRJFL7rff759hcY8R1MPIThGs9Z90BBLdL7I/MXz8DYqjBngYrKJjyRDPpu6MwOFn/t6+ISA==
version "1.7.21"
resolved "https://registry.yarnpkg.com/graphql-playground-middleware-express/-/graphql-playground-middleware-express-1.7.21.tgz#e3af11848232000a2d61ab3c216d467fb6cf8376"
integrity sha512-CjPHDZqJ8ifS6v+JCyEZOEGrR8eKHWaUIUawggfUlW1xFFHCNcBhG4/S7EnSUspaUldSnL/cFcBp4yLhYkG53A==
dependencies:
graphql-playground-html "^1.6.27"
graphql-playground-html "^1.6.28"
graphql-type-json@0.3.2:
version "0.3.2"
@@ -6598,10 +6598,10 @@ gridsome-plugin-simple-analytics@^1.1.0:
dependencies:
simple-analytics-vue "^1.1.0"
gridsome@0.7.20:
version "0.7.20"
resolved "https://registry.yarnpkg.com/gridsome/-/gridsome-0.7.20.tgz#6b45135468db1185e5aea4b3e699d2c2d1e3557d"
integrity sha512-htk50W1dHLpoZ3iWQUZtBWki+STJDqzXxnrb/WBpDaGD9nW3gQK7HgPVVTVntqjTiJKoB1PT7q/g5mflJkgWuw==
gridsome@0.7.21:
version "0.7.21"
resolved "https://registry.yarnpkg.com/gridsome/-/gridsome-0.7.21.tgz#8f1ed742a14ee2a88c0286b0d3e623d509d334f2"
integrity sha512-PtdVorQDpihsgr4IXeLH6QTySiPVNhadnSjEgQP8zfY+2Ir7goifPpIohOBT65nXJj/j7to9f429PSDTlJUe7w==
dependencies:
"@babel/code-frame" "^7.5.5"
"@babel/core" "^7.0.0"
@@ -6633,7 +6633,7 @@ gridsome@0.7.20:
fs-extra "^7.0.1"
globby "^9.0.0"
graphql "^14.4.2"
graphql-compose "^7.3.0"
graphql-compose "7.20.1"
graphql-playground-middleware-express "^1.7.12"
hash-sum "^1.0.2"
hirestime "^3.2.1"
@@ -6979,15 +6979,15 @@ html-entities@^1.2.0:
resolved "https://registry.yarnpkg.com/html-entities/-/html-entities-1.3.1.tgz#fb9a1a4b5b14c5daba82d3e34c6ae4fe701a0e44"
integrity sha512-rhE/4Z3hIhzHAUKbW8jVcCyuT5oJCXXqhN/6mXXVCpzTmvJnoH2HL/bt3EZ6p55jbFJBeAe1ZNpL5BugLujxNA==
html-loader@^1.1.0:
version "1.3.0"
resolved "https://registry.yarnpkg.com/html-loader/-/html-loader-1.3.0.tgz#2cbca7794702818b60f55b3b7c73ab642236635a"
integrity sha512-c4ROd3YokzLWj6YUfI/NcqAsZI8ULtKfkE/8W862vxd2fMst4SVIQt+RVMNUnNmnz0p4uz7Wqc7PXZOdm5KAXA==
html-loader@^1.3.1:
version "1.3.1"
resolved "https://registry.yarnpkg.com/html-loader/-/html-loader-1.3.1.tgz#16ae142e23daa4f0d67a2ac2fccaa087be5d64e2"
integrity sha512-zL+z9mIhcXEXuHqzriTwZR4ZslZHi5IFNhjyJHyhJlhEgR8VtLTPbqeR5TdbNtHtb88zbVmlNB8ia2vr/GTrbA==
dependencies:
html-minifier-terser "^5.1.1"
htmlparser2 "^4.1.0"
loader-utils "^2.0.0"
schema-utils "^2.7.0"
schema-utils "^2.7.1"
html-minifier-terser@^5.1.1:
version "5.1.1"
@@ -7516,9 +7516,9 @@ is-buffer@^2.0.0:
integrity sha512-Kq1rokWXOPXWuaMAqZiJW4XxsmD9zGx9q4aePabbn3qCRGedtH7Cm+zV8WETitMfu1wdh+Rvd6w5egwSngUX2A==
is-callable@^1.1.4, is-callable@^1.2.0:
version "1.2.1"
resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.2.1.tgz#4d1e21a4f437509d25ce55f8184350771421c96d"
integrity sha512-wliAfSzx6V+6WfMOmus1xy0XvSgf/dlStkvTfq7F0g4bOIW0PSUbnyse3NhDwdyYS1ozfUtAAySqTws3z9Eqgg==
version "1.2.2"
resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.2.2.tgz#c7c6715cd22d4ddb48d3e19970223aceabb080d9"
integrity sha512-dnMqspv5nU3LoewK2N/y7KLtxtakvTuaCsU9FU50/QDmdbHNy/4/JuRtMHqRU22o3q+W89YQndQEeCVwK+3qrA==
is-ci@^2.0.0:
version "2.0.0"
@@ -9105,9 +9105,9 @@ module-details-from-path@^1.0.3:
integrity sha1-EUyUlnPiqKNenTV4hSeqN7Z52is=
moment@^2.24.0, moment@^2.27.0:
version "2.27.0"
resolved "https://registry.yarnpkg.com/moment/-/moment-2.27.0.tgz#8bff4e3e26a236220dfe3e36de756b6ebaa0105d"
integrity sha512-al0MUK7cpIcglMv3YF13qSgdAIqxHTO7brRtaz3DlSULbqfazqkc5kEjNrLDOM7fsjshoFIihnU8snrP7zUvhQ==
version "2.28.0"
resolved "https://registry.yarnpkg.com/moment/-/moment-2.28.0.tgz#cdfe73ce01327cee6537b0fafac2e0f21a237d75"
integrity sha512-Z5KOjYmnHyd/ukynmFd/WwyXHd7L4J9vTI/nn5Ap9AVUgaAE15VvQ9MOGmJJygEUklupqIrFnor/tjTwRU+tQw==
move-concurrently@^1.0.1:
version "1.0.1"
@@ -9145,7 +9145,7 @@ ms@2.1.1:
resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.1.tgz#30a5864eb3ebb0a66f2ebe6d727af06a09d86e0a"
integrity sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==
ms@^2.0.0, ms@^2.1.1:
ms@2.1.2, ms@^2.0.0, ms@^2.1.1:
version "2.1.2"
resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009"
integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==
@@ -9249,9 +9249,9 @@ node-abi@^2.7.0:
semver "^5.4.1"
node-addon-api@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/node-addon-api/-/node-addon-api-3.0.0.tgz#812446a1001a54f71663bed188314bba07e09247"
integrity sha512-sSHCgWfJ+Lui/u+0msF3oyCgvdkhxDbkCS6Q8uiJquzOimkJBvX6hl5aSSA7DR1XbMpdM8r7phjcF63sF4rkKg==
version "3.0.2"
resolved "https://registry.yarnpkg.com/node-addon-api/-/node-addon-api-3.0.2.tgz#04bc7b83fd845ba785bb6eae25bc857e1ef75681"
integrity sha512-+D4s2HCnxPd5PjjI0STKwncjXTUKKqm74MDMz9OPXavjsGmjkvwgLtA5yoxJUdmpj52+2u+RrXgPipahKczMKg==
node-fetch-npm@^2.0.2:
version "2.0.4"
@@ -9262,7 +9262,7 @@ node-fetch-npm@^2.0.2:
json-parse-better-errors "^1.0.0"
safe-buffer "^5.1.1"
node-fetch@^2.3.0, node-fetch@^2.5.0:
node-fetch@^2.5.0, node-fetch@^2.6.1:
version "2.6.1"
resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.6.1.tgz#045bd323631f76ed2e2b55573394416b639a0052"
integrity sha512-V4aYg89jEoVRxRb2fJdAg8FHvI7cEyYdVAh94HH0UIK8oJxUfkjlDQN9RbMx+bEjP7+ggMiFRprSti032Oipxw==
@@ -10267,9 +10267,9 @@ postcss-discard-overridden@^4.0.1:
postcss "^7.0.0"
postcss-load-config@^2.0.0, postcss-load-config@^2.1.0:
version "2.1.0"
resolved "https://registry.yarnpkg.com/postcss-load-config/-/postcss-load-config-2.1.0.tgz#c84d692b7bb7b41ddced94ee62e8ab31b417b003"
integrity sha512-4pV3JJVPLd5+RueiVVB+gFOAa7GWc25XQcMp86Zexzke69mKf6Nx9LRcQywdz7yZI9n1udOxmLuAwTBypypF8Q==
version "2.1.1"
resolved "https://registry.yarnpkg.com/postcss-load-config/-/postcss-load-config-2.1.1.tgz#0a684bb8beb05e55baf922f7ab44c3edb17cf78e"
integrity sha512-D2ENobdoZsW0+BHy4x1CAkXtbXtYWYRIxL/JbtRBqrRGOPtJ2zoga/bEZWhV/ShWB5saVxJMzbMdSyA/vv4tXw==
dependencies:
cosmiconfig "^5.0.0"
import-cwd "^2.0.0"
@@ -10549,13 +10549,14 @@ postcss-selector-parser@^5.0.0:
uniq "^1.0.1"
postcss-selector-parser@^6.0.0, postcss-selector-parser@^6.0.2:
version "6.0.2"
resolved "https://registry.yarnpkg.com/postcss-selector-parser/-/postcss-selector-parser-6.0.2.tgz#934cf799d016c83411859e09dcecade01286ec5c"
integrity sha512-36P2QR59jDTOAiIkqEprfJDsoNrvwFei3eCqKd1Y0tUsBimsq39BLp7RD+JWny3WgB1zGhJX8XVePwm9k4wdBg==
version "6.0.3"
resolved "https://registry.yarnpkg.com/postcss-selector-parser/-/postcss-selector-parser-6.0.3.tgz#766d77728728817cc140fa1ac6da5e77f9fada98"
integrity sha512-0ClFaY4X1ra21LRqbW6y3rUbWcxnSVkDFG57R7Nxus9J9myPFlv+jYDMohzpkBx0RrjjiqjtycpchQ+PLGmZ9w==
dependencies:
cssesc "^3.0.0"
indexes-of "^1.0.1"
uniq "^1.0.1"
util-deprecate "^1.0.2"
postcss-svgo@^4.0.2:
version "4.0.2"
@@ -10605,9 +10606,9 @@ postcss@^6.0.1:
supports-color "^5.4.0"
postcss@^7.0.0, postcss@^7.0.1, postcss@^7.0.14, postcss@^7.0.27, postcss@^7.0.32, postcss@^7.0.5, postcss@^7.0.6:
version "7.0.32"
resolved "https://registry.yarnpkg.com/postcss/-/postcss-7.0.32.tgz#4310d6ee347053da3433db2be492883d62cec59d"
integrity sha512-03eXong5NLnNCD05xscnGKGDZ98CyzoqPSMjOe6SuoQY7Z2hIj0Ld1g/O/UQRuOle2aRtiIRDg9tDcTGAkLfKw==
version "7.0.34"
resolved "https://registry.yarnpkg.com/postcss/-/postcss-7.0.34.tgz#f2baf57c36010df7de4009940f21532c16d65c20"
integrity sha512-H/7V2VeNScX9KE83GDrDZNiGT1m2H+UTnlinIzhjlLX9hfMUn1mHNnGeX81a1c8JSBdBvqk7c2ZOG6ZPn5itGw==
dependencies:
chalk "^2.4.2"
source-map "^0.6.1"
@@ -10798,10 +10799,10 @@ prosemirror-history@^1.1.3:
prosemirror-transform "^1.0.0"
rope-sequence "^1.3.0"
prosemirror-inputrules@^1.1.2:
version "1.1.2"
resolved "https://registry.yarnpkg.com/prosemirror-inputrules/-/prosemirror-inputrules-1.1.2.tgz#487e46c763e1212a4577397aba7706139084f012"
integrity sha512-Ja5Z3BWestlHYGvtSGqyvxMeB8QEuBjlHM8YnKtLGUXMDp965qdDV4goV8lJb17kIWHk7e7JNj6Catuoa3302g==
prosemirror-inputrules@^1.1.3:
version "1.1.3"
resolved "https://registry.yarnpkg.com/prosemirror-inputrules/-/prosemirror-inputrules-1.1.3.tgz#93f9199ca02473259c30d7e352e4c14022d54638"
integrity sha512-ZaHCLyBtvbyIHv0f5p6boQTIJjlD6o2NPZiEaZWT2DA+j591zS29QQEMT4lBqwcLW3qRSf7ZvoKNbf05YrsStw==
dependencies:
prosemirror-state "^1.0.0"
prosemirror-transform "^1.0.0"
@@ -10814,10 +10815,10 @@ prosemirror-keymap@^1.0.0, prosemirror-keymap@^1.1.2, prosemirror-keymap@^1.1.3:
prosemirror-state "^1.0.0"
w3c-keyname "^2.2.0"
prosemirror-model@^1.0.0, prosemirror-model@^1.1.0, prosemirror-model@^1.11.0, prosemirror-model@^1.8.1, prosemirror-model@^1.9.1:
version "1.11.1"
resolved "https://registry.yarnpkg.com/prosemirror-model/-/prosemirror-model-1.11.1.tgz#549d81afe1e887cfb2b42ab280c8bf54021dbdc4"
integrity sha512-cscne7s40lTQbZrU8fHBGI5awS2qX91w9wChl3HicKG2lkPS6cdGQADXbDCIU8SFl6lQYEsmIzn8F66Wm19YhA==
prosemirror-model@^1.0.0, prosemirror-model@^1.1.0, prosemirror-model@^1.11.2, prosemirror-model@^1.8.1:
version "1.11.2"
resolved "https://registry.yarnpkg.com/prosemirror-model/-/prosemirror-model-1.11.2.tgz#3ce08172b465bc725c8808c18c2e9378fe69418d"
integrity sha512-+gM+x1VUfGAyKR/g0bK7FC46fVNq0xVVL859QAQ7my2p5HzKrPps/pSbYn7T50XTG2r2IhZJChsUFUBHtcoN0Q==
dependencies:
orderedmap "^1.1.0"
@@ -11302,9 +11303,9 @@ regex-not@^1.0.0, regex-not@^1.0.2:
safe-regex "^1.1.0"
regexpu-core@^4.7.0:
version "4.7.0"
resolved "https://registry.yarnpkg.com/regexpu-core/-/regexpu-core-4.7.0.tgz#fcbf458c50431b0bb7b45d6967b8192d91f3d938"
integrity sha512-TQ4KXRnIn6tz6tjnrXEkD/sshygKH/j5KzK86X8MkeHyZ8qst/LZ89j3X4/8HEIfHANTFIP/AbXakeRhWIl5YQ==
version "4.7.1"
resolved "https://registry.yarnpkg.com/regexpu-core/-/regexpu-core-4.7.1.tgz#2dea5a9a07233298fbf0db91fa9abc4c6e0f8ad6"
integrity sha512-ywH2VUraA44DZQuRKzARmw6S66mr48pQVva4LBeRhcOltJ6hExvWly5ZjFLYo67xbIxb6W1q4bAGtgfEl20zfQ==
dependencies:
regenerate "^1.4.0"
regenerate-unicode-properties "^8.2.0"
@@ -11842,7 +11843,7 @@ schema-utils@^1.0.0:
ajv-errors "^1.0.0"
ajv-keywords "^3.1.0"
schema-utils@^2.6.1, schema-utils@^2.6.5, schema-utils@^2.7.0:
schema-utils@^2.6.1, schema-utils@^2.6.5, schema-utils@^2.7.0, schema-utils@^2.7.1:
version "2.7.1"
resolved "https://registry.yarnpkg.com/schema-utils/-/schema-utils-2.7.1.tgz#1ca4f32d1b24c590c203b8e7a50bf0ea4cd394d7"
integrity sha512-SHiNtMOUGWBQJwzISiVYKu82GiV4QYGePp3odlY1tuKO7gPtphAT5R/py0fA6xtbgLL/RvtJZnU9b8s0F1q0Xg==
@@ -12225,9 +12226,9 @@ sort-object-keys@^1.1.3:
integrity sha512-855pvK+VkU7PaKYPc+Jjnmt4EzejQHyhhF33q31qG8x7maDzkeFhAAThdCYay11CISO+qAMwjOBP+fPZe0IPyg==
sort-package-json@^1.15.0:
version "1.44.0"
resolved "https://registry.yarnpkg.com/sort-package-json/-/sort-package-json-1.44.0.tgz#470330be868f8a524a4607b26f2a0233e93d8b6d"
integrity sha512-u9GUZvpavUCXV5SbEqXu9FRbsJrYU6WM10r3zA0gymGPufK5X82MblCLh9GW9l46pXKEZvK+FA3eVTqC4oMp4A==
version "1.46.0"
resolved "https://registry.yarnpkg.com/sort-package-json/-/sort-package-json-1.46.0.tgz#ea30a03d17c23762bfbf115fa54500459508c9ca"
integrity sha512-Fn5iiGKkATkEOQ0rol45dClfvNNW3r6PZ87mU4rbpz/M0Dxz+0D6oEU8nfpwUB5rd8u+WzsH2BQ/kRDwz+yVDQ==
dependencies:
detect-indent "^6.0.0"
detect-newline "3.1.0"
@@ -12319,9 +12320,9 @@ spdx-expression-parse@^3.0.0:
spdx-license-ids "^3.0.0"
spdx-license-ids@^3.0.0:
version "3.0.5"
resolved "https://registry.yarnpkg.com/spdx-license-ids/-/spdx-license-ids-3.0.5.tgz#3694b5804567a458d3c8045842a6358632f62654"
integrity sha512-J+FWzZoynJEXGphVIS+XEh3kFSjZX/1i9gFBaWQcB+/tmpe2qUsSBABpcxqxnAxFdiUFEgAX1bjYGQvIZmoz9Q==
version "3.0.6"
resolved "https://registry.yarnpkg.com/spdx-license-ids/-/spdx-license-ids-3.0.6.tgz#c80757383c28abf7296744998cbc106ae8b854ce"
integrity sha512-+orQK83kyMva3WyPf59k1+Y525csj5JejicWut55zeTWANuN17qSiSLUXWtzHeNWORSvT7GLDJ/E/XiIWoXBTw==
split-string@^3.0.1, split-string@^3.0.2:
version "3.1.0"
@@ -13121,10 +13122,10 @@ trough@^1.0.0:
dependencies:
glob "^7.1.2"
ts-loader@^8.0.3:
version "8.0.3"
resolved "https://registry.yarnpkg.com/ts-loader/-/ts-loader-8.0.3.tgz#56858f4296edf1ed55e01f8520552984d3f0911c"
integrity sha512-wsqfnVdB7xQiqhqbz2ZPLGHLPZbHVV5Qn/MNFZkCFxRU1miDyxKORucDGxKtsQJ63Rfza0udiUxWF5nHY6bpdQ==
ts-loader@^8.0.4:
version "8.0.4"
resolved "https://registry.yarnpkg.com/ts-loader/-/ts-loader-8.0.4.tgz#02b9c91fbcfdb3114d8b1e98a3829265270eee7a"
integrity sha512-5u8KF1SW8eCUb/Ff7At81e3wznPmT/27fvaGRO9CziVy+6NlPVRvrzSox4OwU0/e6OflOUB32Err4VquysCSAQ==
dependencies:
chalk "^2.3.0"
enhanced-resolve "^4.0.0"
@@ -13234,10 +13235,10 @@ typescript@^3.9.5:
resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.9.7.tgz#98d600a5ebdc38f40cb277522f12dc800e9e25fa"
integrity sha512-BLbiRkiBzAwsjut4x/dsibSTB6yWpwT5qWmC2OfuCg3GgVQCSgMs4vEctYPhsaGtd0AeuuHMkjZ2h2WG8MSzRw==
typescript@^4.0.2:
version "4.0.2"
resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.0.2.tgz#7ea7c88777c723c681e33bf7988be5d008d05ac2"
integrity sha512-e4ERvRV2wb+rRZ/IQeb3jm2VxBsirQLpQhdxplZ2MEzGvDkkMmPglecnNDfSUBivMjP93vRbngYYDQqQ/78bcQ==
typescript@^4.0.3:
version "4.0.3"
resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.0.3.tgz#153bbd468ef07725c1df9c77e8b453f8d36abba5"
integrity sha512-tEu6DGxGgRJPb/mVPIZ48e69xCn2yRmCgYmDugAVwmJ6o+0u1RI18eO7E7WBTLYLaEVVOhwQmcdhQHweux/WPg==
uglify-js@3.4.x:
version "3.4.10"
@@ -13585,7 +13586,7 @@ use@^3.1.0:
resolved "https://registry.yarnpkg.com/use/-/use-3.1.1.tgz#d50c8cac79a19fbc20f2911f56eb973f4e10070f"
integrity sha512-cwESVXlO3url9YWlFW/TA9cshCEhtu7IKJ/p5soJ/gGpj7vbvFrAY/eIioQ6Dw23KjZhYgiIo8HOs1nQ2vr/oQ==
util-deprecate@^1.0.1, util-deprecate@~1.0.1:
util-deprecate@^1.0.1, util-deprecate@^1.0.2, util-deprecate@~1.0.1:
version "1.0.2"
resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf"
integrity sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=
@@ -13916,9 +13917,9 @@ webpack-sources@^1.1.0, webpack-sources@^1.4.0, webpack-sources@^1.4.1:
source-map "~0.6.1"
webpack@^4.29.3:
version "4.44.1"
resolved "https://registry.yarnpkg.com/webpack/-/webpack-4.44.1.tgz#17e69fff9f321b8f117d1fda714edfc0b939cc21"
integrity sha512-4UOGAohv/VGUNQJstzEywwNxqX417FnjZgZJpJQegddzPmTvph37eBIRbRTfdySXzVtJXLJfbMN3mMYhM6GdmQ==
version "4.44.2"
resolved "https://registry.yarnpkg.com/webpack/-/webpack-4.44.2.tgz#6bfe2b0af055c8b2d1e90ed2cd9363f841266b72"
integrity sha512-6KJVGlCxYdISyurpQ0IPTklv+DULv05rs2hseIXer6D7KrUicRDLFb4IUM1S6LUAKypPM/nSiVSuv8jHu1m3/Q==
dependencies:
"@webassemblyjs/ast" "1.9.0"
"@webassemblyjs/helper-module-context" "1.9.0"