@pie-element/shared-editor-runtime 0.1.2-next.20261002215153 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/browser/{dist-BsIpHitF.js → dist-BLT2aMxu.js} +204 -179
- package/dist/browser/dist-BLT2aMxu.js.map +1 -0
- package/dist/browser/dist-CJhbhuk0.js +719 -0
- package/dist/browser/dist-CJhbhuk0.js.map +1 -0
- package/dist/browser/{dist-CL31Mguj.js → dist-CbvLhouk.js} +1767 -1376
- package/dist/browser/dist-CbvLhouk.js.map +1 -0
- package/dist/browser/{dist-CF7SJxlB.js → dist-DwhlRAyY.js} +402 -351
- package/dist/browser/{dist-CF7SJxlB.js.map → dist-DwhlRAyY.js.map} +1 -1
- package/dist/browser/tiptap-core/index.js +2 -2
- package/dist/browser/tiptap-extension-character-count/index.js +2 -2
- package/dist/browser/tiptap-extension-character-count/index.js.map +1 -1
- package/dist/browser/tiptap-extension-image/index.js +8 -8
- package/dist/browser/tiptap-extension-image/index.js.map +1 -1
- package/dist/browser/tiptap-extension-list-item/index.js +2 -2
- package/dist/browser/tiptap-extension-list-item/index.js.map +1 -1
- package/dist/browser/tiptap-extension-placeholder/index.js +2 -2
- package/dist/browser/tiptap-extension-placeholder/index.js.map +1 -1
- package/dist/browser/tiptap-extension-subscript/index.js +5 -5
- package/dist/browser/tiptap-extension-subscript/index.js.map +1 -1
- package/dist/browser/tiptap-extension-superscript/index.js +5 -5
- package/dist/browser/tiptap-extension-superscript/index.js.map +1 -1
- package/dist/browser/tiptap-extension-table/index.js +1 -1
- package/dist/browser/tiptap-extension-table-cell/index.js +2 -2
- package/dist/browser/tiptap-extension-table-cell/index.js.map +1 -1
- package/dist/browser/tiptap-extension-table-header/index.js +2 -2
- package/dist/browser/tiptap-extension-table-header/index.js.map +1 -1
- package/dist/browser/tiptap-extension-table-row/index.js +2 -2
- package/dist/browser/tiptap-extension-table-row/index.js.map +1 -1
- package/dist/browser/tiptap-extension-text-align/index.js +6 -6
- package/dist/browser/tiptap-extension-text-align/index.js.map +1 -1
- package/dist/browser/tiptap-extension-text-style/index.js +29 -29
- package/dist/browser/tiptap-extension-text-style/index.js.map +1 -1
- package/dist/browser/tiptap-extensions/index.js +1 -1
- package/dist/browser/tiptap-starter-kit/index.js +350 -316
- package/dist/browser/tiptap-starter-kit/index.js.map +1 -1
- package/package.json +1 -1
- package/dist/browser/dist-BsIpHitF.js.map +0 -1
- package/dist/browser/dist-BwzOz38C.js +0 -1003
- package/dist/browser/dist-BwzOz38C.js.map +0 -1
- package/dist/browser/dist-CL31Mguj.js.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dist-CJhbhuk0.js","names":["Selection"],"sources":["../../../../../node_modules/.bun/prosemirror-dropcursor@1.8.4/node_modules/prosemirror-dropcursor/dist/index.js","../../../../../node_modules/.bun/prosemirror-gapcursor@1.4.1/node_modules/prosemirror-gapcursor/dist/index.js","../../../../../node_modules/.bun/@tiptap+extensions@3.31.4+e39601fe346c19ab/node_modules/@tiptap/extensions/dist/index.js"],"sourcesContent":["import { Plugin } from 'prosemirror-state';\nimport { dropPoint } from 'prosemirror-transform';\n\n/**\nCreate a plugin that, when added to a ProseMirror instance,\ncauses a decoration to show up at the drop position when something\nis dragged over the editor.\n\nNodes may add a `disableDropCursor` property to their spec to\ncontrol the showing of a drop cursor inside them. This may be a\nboolean or a function, which will be called with a view and a\nposition, and should return a boolean.\n*/\nfunction dropCursor(options = {}) {\n return new Plugin({\n view(editorView) { return new DropCursorView(editorView, options); }\n });\n}\nclass DropCursorView {\n constructor(editorView, options) {\n var _a;\n this.editorView = editorView;\n this.cursorPos = null;\n this.element = null;\n this.timeout = -1;\n this.lastDragEvent = null;\n this.width = (_a = options.width) !== null && _a !== void 0 ? _a : 1;\n this.color = options.color === false ? undefined : (options.color || \"black\");\n this.class = options.class;\n this.handlers = [\"dragover\", \"dragend\", \"drop\", \"dragleave\"].map(name => {\n let handler = (e) => { this[name](e); };\n editorView.dom.addEventListener(name, handler);\n return { name, handler };\n });\n }\n destroy() {\n this.setCursor(null);\n this.handlers.forEach(({ name, handler }) => this.editorView.dom.removeEventListener(name, handler));\n }\n update(editorView, prevState) {\n if (this.cursorPos != null && prevState.doc != editorView.state.doc) {\n // if we currently have an on-going drag event\n // we need to update the cursor position again and update the overlay\n if (this.lastDragEvent) {\n let target = this.computeTarget(this.lastDragEvent);\n if (target == this.cursorPos)\n this.updateOverlay();\n else\n this.setCursor(target);\n }\n else {\n this.updateOverlay();\n }\n }\n }\n setCursor(pos) {\n if (pos == this.cursorPos)\n return;\n this.cursorPos = pos;\n if (pos == null) {\n this.element.parentNode.removeChild(this.element);\n this.element = null;\n }\n else {\n this.updateOverlay();\n }\n }\n updateOverlay() {\n let $pos = this.editorView.state.doc.resolve(this.cursorPos);\n let isBlock = !$pos.parent.inlineContent, rect;\n let editorDOM = this.editorView.dom, editorRect = editorDOM.getBoundingClientRect();\n let scaleX = editorRect.width / editorDOM.offsetWidth, scaleY = editorRect.height / editorDOM.offsetHeight;\n if (isBlock) {\n let before = $pos.nodeBefore, after = $pos.nodeAfter;\n if (before || after) {\n let node = this.editorView.nodeDOM(this.cursorPos - (before ? before.nodeSize : 0));\n if (node) {\n let nodeRect = node.getBoundingClientRect();\n let top = before ? nodeRect.bottom : nodeRect.top;\n if (before && after)\n top = (top + this.editorView.nodeDOM(this.cursorPos).getBoundingClientRect().top) / 2;\n let halfWidth = (this.width / 2) * scaleY;\n rect = { left: nodeRect.left, right: nodeRect.right, top: top - halfWidth, bottom: top + halfWidth };\n }\n }\n }\n if (!rect) {\n let coords = this.editorView.coordsAtPos(this.cursorPos);\n let halfWidth = (this.width / 2) * scaleX;\n rect = { left: coords.left - halfWidth, right: coords.left + halfWidth, top: coords.top, bottom: coords.bottom };\n }\n let parent = this.editorView.dom.offsetParent;\n if (!this.element) {\n this.element = parent.appendChild(document.createElement(\"div\"));\n if (this.class)\n this.element.className = this.class;\n this.element.style.cssText = \"position: absolute; z-index: 50; pointer-events: none;\";\n if (this.color) {\n this.element.style.backgroundColor = this.color;\n }\n }\n this.element.classList.toggle(\"prosemirror-dropcursor-block\", isBlock);\n this.element.classList.toggle(\"prosemirror-dropcursor-inline\", !isBlock);\n let parentLeft, parentTop;\n if (!parent || parent == document.body && getComputedStyle(parent).position == \"static\") {\n parentLeft = -pageXOffset;\n parentTop = -pageYOffset;\n }\n else {\n let rect = parent.getBoundingClientRect();\n let parentScaleX = rect.width / parent.offsetWidth, parentScaleY = rect.height / parent.offsetHeight;\n parentLeft = rect.left - parent.scrollLeft * parentScaleX;\n parentTop = rect.top - parent.scrollTop * parentScaleY;\n }\n this.element.style.left = (rect.left - parentLeft) / scaleX + \"px\";\n this.element.style.top = (rect.top - parentTop) / scaleY + \"px\";\n this.element.style.width = (rect.right - rect.left) / scaleX + \"px\";\n this.element.style.height = (rect.bottom - rect.top) / scaleY + \"px\";\n }\n scheduleRemoval(timeout) {\n clearTimeout(this.timeout);\n this.timeout = setTimeout(() => this.setCursor(null), timeout);\n }\n computeTarget(event) {\n let pos = this.editorView.posAtCoords({ left: event.clientX, top: event.clientY });\n let node = pos && pos.inside >= 0 && this.editorView.state.doc.nodeAt(pos.inside);\n let disableDropCursor = node && node.type.spec.disableDropCursor;\n let disabled = typeof disableDropCursor == \"function\"\n ? disableDropCursor(this.editorView, pos, event)\n : disableDropCursor;\n if (!pos || disabled)\n return null;\n let target = pos.pos;\n if (this.editorView.dragging && this.editorView.dragging.slice) {\n let point = dropPoint(this.editorView.state.doc, target, this.editorView.dragging.slice);\n if (point != null)\n target = point;\n }\n return target;\n }\n dragover(event) {\n if (!this.editorView.editable)\n return;\n this.lastDragEvent = event;\n let target = this.computeTarget(event);\n if (target != null) {\n this.setCursor(target);\n this.scheduleRemoval(5000);\n }\n }\n dragend() {\n this.scheduleRemoval(20);\n }\n drop() {\n this.scheduleRemoval(20);\n }\n dragleave(event) {\n if (!this.editorView.dom.contains(event.relatedTarget))\n this.setCursor(null);\n }\n}\n\nexport { dropCursor };\n","import { keydownHandler } from 'prosemirror-keymap';\nimport { Selection, NodeSelection, TextSelection, Plugin } from 'prosemirror-state';\nimport { Slice, Fragment } from 'prosemirror-model';\nimport { DecorationSet, Decoration } from 'prosemirror-view';\n\n/**\nGap cursor selections are represented using this class. Its\n`$anchor` and `$head` properties both point at the cursor position.\n*/\nclass GapCursor extends Selection {\n /**\n Create a gap cursor.\n */\n constructor($pos) {\n super($pos, $pos);\n }\n map(doc, mapping) {\n let $pos = doc.resolve(mapping.map(this.head));\n return GapCursor.valid($pos) ? new GapCursor($pos) : Selection.near($pos);\n }\n content() { return Slice.empty; }\n eq(other) {\n return other instanceof GapCursor && other.head == this.head;\n }\n toJSON() {\n return { type: \"gapcursor\", pos: this.head };\n }\n /**\n @internal\n */\n static fromJSON(doc, json) {\n if (typeof json.pos != \"number\")\n throw new RangeError(\"Invalid input for GapCursor.fromJSON\");\n return new GapCursor(doc.resolve(json.pos));\n }\n /**\n @internal\n */\n getBookmark() { return new GapBookmark(this.anchor); }\n /**\n @internal\n */\n static valid($pos) {\n let parent = $pos.parent;\n if (parent.inlineContent || !closedBefore($pos) || !closedAfter($pos))\n return false;\n let override = parent.type.spec.allowGapCursor;\n if (override != null)\n return override;\n let deflt = parent.contentMatchAt($pos.index()).defaultType;\n return deflt && deflt.isTextblock;\n }\n /**\n @internal\n */\n static findGapCursorFrom($pos, dir, mustMove = false) {\n search: for (;;) {\n if (!mustMove && GapCursor.valid($pos))\n return $pos;\n let pos = $pos.pos, next = null;\n // Scan up from this position\n for (let d = $pos.depth;; d--) {\n let parent = $pos.node(d);\n if (dir > 0 ? $pos.indexAfter(d) < parent.childCount : $pos.index(d) > 0) {\n next = parent.child(dir > 0 ? $pos.indexAfter(d) : $pos.index(d) - 1);\n break;\n }\n else if (d == 0) {\n return null;\n }\n pos += dir;\n let $cur = $pos.doc.resolve(pos);\n if (GapCursor.valid($cur))\n return $cur;\n }\n // And then down into the next node\n for (;;) {\n let inside = dir > 0 ? next.firstChild : next.lastChild;\n if (!inside) {\n if (next.isAtom && !next.isText && !NodeSelection.isSelectable(next)) {\n $pos = $pos.doc.resolve(pos + next.nodeSize * dir);\n mustMove = false;\n continue search;\n }\n break;\n }\n next = inside;\n pos += dir;\n let $cur = $pos.doc.resolve(pos);\n if (GapCursor.valid($cur))\n return $cur;\n }\n return null;\n }\n }\n}\nGapCursor.prototype.visible = false;\nGapCursor.findFrom = GapCursor.findGapCursorFrom;\nSelection.jsonID(\"gapcursor\", GapCursor);\nclass GapBookmark {\n constructor(pos) {\n this.pos = pos;\n }\n map(mapping) {\n return new GapBookmark(mapping.map(this.pos));\n }\n resolve(doc) {\n let $pos = doc.resolve(this.pos);\n return GapCursor.valid($pos) ? new GapCursor($pos) : Selection.near($pos);\n }\n}\nfunction needsGap(type) {\n return type.isAtom || type.spec.isolating || type.spec.createGapCursor;\n}\nfunction closedBefore($pos) {\n for (let d = $pos.depth; d >= 0; d--) {\n let index = $pos.index(d), parent = $pos.node(d);\n // At the start of this parent, look at next one\n if (index == 0) {\n if (parent.type.spec.isolating)\n return true;\n continue;\n }\n // See if the node before (or its first ancestor) is closed\n for (let before = parent.child(index - 1);; before = before.lastChild) {\n if ((before.childCount == 0 && !before.inlineContent) || needsGap(before.type))\n return true;\n if (before.inlineContent)\n return false;\n }\n }\n // Hit start of document\n return true;\n}\nfunction closedAfter($pos) {\n for (let d = $pos.depth; d >= 0; d--) {\n let index = $pos.indexAfter(d), parent = $pos.node(d);\n if (index == parent.childCount) {\n if (parent.type.spec.isolating)\n return true;\n continue;\n }\n for (let after = parent.child(index);; after = after.firstChild) {\n if ((after.childCount == 0 && !after.inlineContent) || needsGap(after.type))\n return true;\n if (after.inlineContent)\n return false;\n }\n }\n return true;\n}\n\n/**\nCreate a gap cursor plugin. When enabled, this will capture clicks\nnear and arrow-key-motion past places that don't have a normally\nselectable position nearby, and create a gap cursor selection for\nthem. The cursor is drawn as an element with class\n`ProseMirror-gapcursor`. You can either include\n`style/gapcursor.css` from the package's directory or add your own\nstyles to make it visible.\n*/\nfunction gapCursor() {\n return new Plugin({\n props: {\n decorations: drawGapCursor,\n createSelectionBetween(_view, $anchor, $head) {\n return $anchor.pos == $head.pos && GapCursor.valid($head) ? new GapCursor($head) : null;\n },\n handleClick,\n handleKeyDown,\n handleDOMEvents: { beforeinput: beforeinput }\n }\n });\n}\nconst handleKeyDown = keydownHandler({\n \"ArrowLeft\": arrow(\"horiz\", -1),\n \"ArrowRight\": arrow(\"horiz\", 1),\n \"ArrowUp\": arrow(\"vert\", -1),\n \"ArrowDown\": arrow(\"vert\", 1)\n});\nfunction arrow(axis, dir) {\n const dirStr = axis == \"vert\" ? (dir > 0 ? \"down\" : \"up\") : (dir > 0 ? \"right\" : \"left\");\n return function (state, dispatch, view) {\n let sel = state.selection;\n let $start = dir > 0 ? sel.$to : sel.$from, mustMove = sel.empty;\n if (sel instanceof TextSelection) {\n if (!view.endOfTextblock(dirStr) || $start.depth == 0)\n return false;\n mustMove = false;\n $start = state.doc.resolve(dir > 0 ? $start.after() : $start.before());\n }\n let $found = GapCursor.findGapCursorFrom($start, dir, mustMove);\n if (!$found)\n return false;\n if (dispatch)\n dispatch(state.tr.setSelection(new GapCursor($found)));\n return true;\n };\n}\nfunction handleClick(view, pos, event) {\n if (!view || !view.editable)\n return false;\n let $pos = view.state.doc.resolve(pos);\n if (!GapCursor.valid($pos))\n return false;\n let clickPos = view.posAtCoords({ left: event.clientX, top: event.clientY });\n if (clickPos && clickPos.inside > -1 && NodeSelection.isSelectable(view.state.doc.nodeAt(clickPos.inside)))\n return false;\n view.dispatch(view.state.tr.setSelection(new GapCursor($pos)));\n return true;\n}\n// This is a hack that, when a composition starts while a gap cursor\n// is active, quickly creates an inline context for the composition to\n// happen in, to avoid it being aborted by the DOM selection being\n// moved into a valid position.\nfunction beforeinput(view, event) {\n if (event.inputType != \"insertCompositionText\" || !(view.state.selection instanceof GapCursor))\n return false;\n let { $from } = view.state.selection;\n let insert = $from.parent.contentMatchAt($from.index()).findWrapping(view.state.schema.nodes.text);\n if (!insert)\n return false;\n let frag = Fragment.empty;\n for (let i = insert.length - 1; i >= 0; i--)\n frag = Fragment.from(insert[i].createAndFill(null, frag));\n let tr = view.state.tr.replace($from.pos, $from.pos, new Slice(frag, 0, 0));\n tr.setSelection(TextSelection.near(tr.doc.resolve($from.pos + 1)));\n view.dispatch(tr);\n return false;\n}\nfunction drawGapCursor(state) {\n if (!(state.selection instanceof GapCursor))\n return null;\n let node = document.createElement(\"div\");\n node.className = \"ProseMirror-gapcursor\";\n return DecorationSet.create(state.doc, [Decoration.widget(state.selection.head, node, { key: \"gapcursor\" })]);\n}\n\nexport { GapCursor, gapCursor };\n","import { Extension, callOrReturn, getChangedRanges, getExtensionField, isNodeEmpty, isNodeSelection } from \"@tiptap/core\";\nimport { Plugin, PluginKey } from \"@tiptap/pm/state\";\nimport { dropCursor } from \"@tiptap/pm/dropcursor\";\nimport { Decoration, DecorationSet } from \"@tiptap/pm/view\";\nimport { gapCursor } from \"@tiptap/pm/gapcursor\";\nimport { history, redo, undo } from \"@tiptap/pm/history\";\n//#region src/character-count/character-count.ts\n/**\n* This extension allows you to count the characters and words of your document.\n* @see https://tiptap.dev/api/extensions/character-count\n*/\nconst CharacterCount = Extension.create({\n\tname: \"characterCount\",\n\taddOptions() {\n\t\treturn {\n\t\t\tlimit: null,\n\t\t\tautoTrim: true,\n\t\t\tmode: \"textSize\",\n\t\t\ttextCounter: (text) => text.length,\n\t\t\twordCounter: (text) => text.split(\" \").filter((word) => word !== \"\").length\n\t\t};\n\t},\n\taddStorage() {\n\t\treturn {\n\t\t\tcharacters: () => 0,\n\t\t\twords: () => 0\n\t\t};\n\t},\n\tonBeforeCreate() {\n\t\tthis.storage.characters = (options) => {\n\t\t\tconst node = (options === null || options === void 0 ? void 0 : options.node) || this.editor.state.doc;\n\t\t\tif (((options === null || options === void 0 ? void 0 : options.mode) || this.options.mode) === \"textSize\") {\n\t\t\t\tconst text = node.textBetween(0, node.content.size, void 0, \" \");\n\t\t\t\treturn this.options.textCounter(text);\n\t\t\t}\n\t\t\treturn node.nodeSize;\n\t\t};\n\t\tthis.storage.words = (options) => {\n\t\t\tconst node = (options === null || options === void 0 ? void 0 : options.node) || this.editor.state.doc;\n\t\t\tconst text = node.textBetween(0, node.content.size, \" \", \" \");\n\t\t\treturn this.options.wordCounter(text);\n\t\t};\n\t},\n\taddProseMirrorPlugins() {\n\t\tlet initialEvaluationDone = false;\n\t\treturn [new Plugin({\n\t\t\tkey: new PluginKey(\"characterCount\"),\n\t\t\tappendTransaction: (transactions, oldState, newState) => {\n\t\t\t\tif (initialEvaluationDone) return;\n\t\t\t\tconst limit = this.options.limit;\n\t\t\t\tconst autoTrim = this.options.autoTrim;\n\t\t\t\tif (limit === null || limit === void 0 || limit === 0 || autoTrim === false) {\n\t\t\t\t\tinitialEvaluationDone = true;\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tconst initialContentSize = this.storage.characters({ node: newState.doc });\n\t\t\t\tif (initialContentSize > limit) {\n\t\t\t\t\tconst over = initialContentSize - limit;\n\t\t\t\t\tconst from = 0;\n\t\t\t\t\tconst to = over;\n\t\t\t\t\tconsole.warn(`[CharacterCount] Initial content exceeded limit of ${limit} characters. Content was automatically trimmed.`);\n\t\t\t\t\tconst tr = newState.tr.deleteRange(from, to);\n\t\t\t\t\tinitialEvaluationDone = true;\n\t\t\t\t\treturn tr;\n\t\t\t\t}\n\t\t\t\tinitialEvaluationDone = true;\n\t\t\t},\n\t\t\tfilterTransaction: (transaction, state) => {\n\t\t\t\tconst limit = this.options.limit;\n\t\t\t\tif (!transaction.docChanged || limit === 0 || limit === null || limit === void 0) return true;\n\t\t\t\tconst oldSize = this.storage.characters({ node: state.doc });\n\t\t\t\tconst newSize = this.storage.characters({ node: transaction.doc });\n\t\t\t\tif (newSize <= limit) return true;\n\t\t\t\tif (oldSize > limit && newSize > limit && newSize <= oldSize) return true;\n\t\t\t\tif (oldSize > limit && newSize > limit && newSize > oldSize) return false;\n\t\t\t\tif (!transaction.getMeta(\"paste\")) return false;\n\t\t\t\tconst pos = transaction.selection.$head.pos;\n\t\t\t\tconst from = pos - (newSize - limit);\n\t\t\t\tconst to = pos;\n\t\t\t\ttransaction.deleteRange(from, to);\n\t\t\t\tif (this.storage.characters({ node: transaction.doc }) > limit) return false;\n\t\t\t\treturn true;\n\t\t\t}\n\t\t})];\n\t}\n});\n//#endregion\n//#region src/drop-cursor/drop-cursor.ts\n/**\n* This extension allows you to add a drop cursor to your editor.\n* A drop cursor is a line that appears when you drag and drop content\n* in-between nodes.\n* @see https://tiptap.dev/api/extensions/dropcursor\n*/\nconst Dropcursor = Extension.create({\n\tname: \"dropCursor\",\n\taddOptions() {\n\t\treturn {\n\t\t\tcolor: \"currentColor\",\n\t\t\twidth: 1,\n\t\t\tclass: void 0\n\t\t};\n\t},\n\taddProseMirrorPlugins() {\n\t\treturn [dropCursor(this.options)];\n\t}\n});\n//#endregion\n//#region src/focus/focus.ts\n/**\n* This extension allows you to add a class to the focused node.\n* @see https://www.tiptap.dev/api/extensions/focus\n*/\nconst Focus = Extension.create({\n\tname: \"focus\",\n\taddOptions() {\n\t\treturn {\n\t\t\tclassName: \"has-focus\",\n\t\t\tmode: \"all\"\n\t\t};\n\t},\n\taddProseMirrorPlugins() {\n\t\treturn [new Plugin({\n\t\t\tkey: new PluginKey(\"focus\"),\n\t\t\tprops: { decorations: ({ doc, selection }) => {\n\t\t\t\tconst { isEditable, isFocused } = this.editor;\n\t\t\t\tconst { anchor } = selection;\n\t\t\t\tconst decorations = [];\n\t\t\t\tif (!isEditable || !isFocused) return DecorationSet.create(doc, []);\n\t\t\t\tlet maxLevels = 0;\n\t\t\t\tif (this.options.mode === \"deepest\") doc.descendants((node, pos) => {\n\t\t\t\t\tif (node.isText) return;\n\t\t\t\t\tif (!(anchor >= pos && anchor <= pos + node.nodeSize - 1)) return false;\n\t\t\t\t\tmaxLevels += 1;\n\t\t\t\t});\n\t\t\t\tlet currentLevel = 0;\n\t\t\t\tdoc.descendants((node, pos) => {\n\t\t\t\t\tif (node.isText) return false;\n\t\t\t\t\tif (!(anchor >= pos && anchor <= pos + node.nodeSize - 1)) return false;\n\t\t\t\t\tcurrentLevel += 1;\n\t\t\t\t\tif (this.options.mode === \"deepest\" && maxLevels - currentLevel > 0 || this.options.mode === \"shallowest\" && currentLevel > 1) return this.options.mode === \"deepest\";\n\t\t\t\t\tdecorations.push(Decoration.node(pos, pos + node.nodeSize, { class: this.options.className }));\n\t\t\t\t});\n\t\t\t\treturn DecorationSet.create(doc, decorations);\n\t\t\t} }\n\t\t})];\n\t}\n});\n//#endregion\n//#region src/gap-cursor/gap-cursor.ts\n/**\n* This extension allows you to add a gap cursor to your editor.\n* A gap cursor is a cursor that appears when you click on a place\n* where no content is present, for example inbetween nodes.\n* @see https://tiptap.dev/api/extensions/gapcursor\n*/\nconst Gapcursor = Extension.create({\n\tname: \"gapCursor\",\n\taddProseMirrorPlugins() {\n\t\treturn [gapCursor()];\n\t},\n\textendNodeSchema(extension) {\n\t\tvar _callOrReturn;\n\t\tconst context = {\n\t\t\tname: extension.name,\n\t\t\toptions: extension.options,\n\t\t\tstorage: extension.storage\n\t\t};\n\t\treturn { allowGapCursor: (_callOrReturn = callOrReturn(getExtensionField(extension, \"allowGapCursor\", context))) !== null && _callOrReturn !== void 0 ? _callOrReturn : null };\n\t}\n});\n//#endregion\n//#region src/placeholder/constants.ts\n/** The default data attribute label */\nconst DEFAULT_DATA_ATTRIBUTE = \"placeholder\";\n/** The plugin key used to store and read the placeholder decoration set */\nconst PLUGIN_KEY = new PluginKey(\"tiptap__placeholder\");\n//#endregion\n//#region src/placeholder/utils/createPlaceholderDecoration.ts\n/**\n* Creates a ProseMirror node decoration that applies a placeholder\n* CSS class and data attribute to an empty node.\n* @param options.editor - The editor instance\n* @param options.pos - The position of the node in the document\n* @param options.node - The ProseMirror node\n* @param options.isEmptyDoc - Whether the entire document is empty\n* @param options.hasAnchor - Whether the selection anchor is within the node\n* @param options.dataAttribute - The data attribute name (e.g. `data-placeholder`)\n* @param options.classes - CSS classes for empty nodes and the empty editor\n* @param options.placeholder - The placeholder text or a function that returns it\n* @returns A ProseMirror node decoration with placeholder classes and data attribute\n*/\nfunction createPlaceholderDecoration(options) {\n\tconst { editor, placeholder, dataAttribute, pos, node, isEmptyDoc, hasAnchor, classes: { emptyNode, emptyEditor } } = options;\n\tconst classes = [emptyNode];\n\tif (isEmptyDoc) classes.push(emptyEditor);\n\treturn Decoration.node(pos, pos + node.nodeSize, {\n\t\tclass: classes.join(\" \"),\n\t\t[dataAttribute]: typeof placeholder === \"function\" ? placeholder({\n\t\t\teditor,\n\t\t\tnode,\n\t\t\tpos,\n\t\t\thasAnchor\n\t\t}) : placeholder\n\t});\n}\n//#endregion\n//#region src/placeholder/utils/buildPlaceholderDecorations.ts\nfunction resolveEmptyNodeClass(emptyNodeClass, props) {\n\treturn typeof emptyNodeClass === \"function\" ? emptyNodeClass(props) : emptyNodeClass;\n}\n/**\n* Scans a document range for empty textblocks that should receive placeholder\n* decorations. Used by the slow path and incremental state updates.\n*/\nfunction scanRangeForDecorations({ editor, options, dataAttribute, doc, selection, from, to }) {\n\tconst { anchor } = selection;\n\tconst decorations = [];\n\tconst isEmptyDoc = editor.isEmpty;\n\tdoc.nodesBetween(from, to, (node, pos) => {\n\t\tconst hasAnchor = anchor >= pos && anchor <= pos + node.nodeSize;\n\t\tconst isEmpty = !node.isLeaf && isNodeEmpty(node);\n\t\tif (!node.type.isTextblock) return options.includeChildren;\n\t\tif ((hasAnchor || !options.showOnlyCurrent) && isEmpty) decorations.push(createPlaceholderDecoration({\n\t\t\teditor,\n\t\t\tisEmptyDoc,\n\t\t\tdataAttribute,\n\t\t\thasAnchor,\n\t\t\tplaceholder: options.placeholder,\n\t\t\tclasses: {\n\t\t\t\temptyEditor: options.emptyEditorClass,\n\t\t\t\temptyNode: resolveEmptyNodeClass(options.emptyNodeClass, {\n\t\t\t\t\teditor,\n\t\t\t\t\tnode,\n\t\t\t\t\tpos,\n\t\t\t\t\thasAnchor\n\t\t\t\t})\n\t\t\t},\n\t\t\tnode,\n\t\t\tpos\n\t\t}));\n\t\treturn options.includeChildren;\n\t});\n\treturn decorations;\n}\n/**\n* Builds the placeholder decorations for the current document state.\n* @param options.editor - The editor instance.\n* @param options.options - The resolved placeholder options.\n* @param options.dataAttribute - The prepared `data-*` attribute name.\n* @param options.doc - The current document node.\n* @param options.selection - The current selection.\n* @returns A decoration set, or `null` when no placeholders should be shown.\n*/\nfunction buildPlaceholderDecorations({ editor, options, dataAttribute, doc, selection }) {\n\tif (!(editor.isEditable || !options.showOnlyWhenEditable)) return null;\n\tconst { anchor } = selection;\n\tconst decorations = [];\n\tconst isEmptyDoc = editor.isEmpty;\n\tif (options.showOnlyCurrent && !options.includeChildren) {\n\t\tconst resolved = doc.resolve(anchor);\n\t\tconst node = resolved.depth > 0 ? resolved.node(1) : resolved.nodeAfter;\n\t\tconst nodeStart = resolved.depth > 0 ? resolved.before(1) : anchor;\n\t\tif (node && node.type.isTextblock && isNodeEmpty(node)) {\n\t\t\tconst hasAnchor = anchor >= nodeStart && anchor <= nodeStart + node.nodeSize;\n\t\t\tdecorations.push(createPlaceholderDecoration({\n\t\t\t\teditor,\n\t\t\t\tisEmptyDoc,\n\t\t\t\tdataAttribute,\n\t\t\t\thasAnchor,\n\t\t\t\tplaceholder: options.placeholder,\n\t\t\t\tclasses: {\n\t\t\t\t\temptyEditor: options.emptyEditorClass,\n\t\t\t\t\temptyNode: resolveEmptyNodeClass(options.emptyNodeClass, {\n\t\t\t\t\t\teditor,\n\t\t\t\t\t\tnode,\n\t\t\t\t\t\tpos: nodeStart,\n\t\t\t\t\t\thasAnchor\n\t\t\t\t\t})\n\t\t\t\t},\n\t\t\t\tnode,\n\t\t\t\tpos: nodeStart\n\t\t\t}));\n\t\t}\n\t} else decorations.push(...scanRangeForDecorations({\n\t\teditor,\n\t\toptions,\n\t\tdataAttribute,\n\t\tdoc,\n\t\tselection,\n\t\tfrom: 0,\n\t\tto: doc.content.size\n\t}));\n\treturn DecorationSet.create(doc, decorations);\n}\n//#endregion\n//#region src/placeholder/utils/resolveTopLevelRange.ts\n/**\n* Resolves a document position to the `[from, to)` range of its containing\n* top-level block node in absolute document positions.\n*/\nfunction resolveTopLevelRange(doc, pos) {\n\tconst resolved = doc.resolve(pos);\n\tif (resolved.depth === 0) {\n\t\tvar _resolved$nodeAfter;\n\t\tconst node = (_resolved$nodeAfter = resolved.nodeAfter) !== null && _resolved$nodeAfter !== void 0 ? _resolved$nodeAfter : resolved.nodeBefore;\n\t\tif (!node) return {\n\t\t\tfrom: pos,\n\t\t\tto: pos\n\t\t};\n\t\tconst nodePos = resolved.nodeAfter ? pos : pos - node.nodeSize;\n\t\treturn {\n\t\t\tfrom: nodePos,\n\t\t\tto: nodePos + node.nodeSize\n\t\t};\n\t}\n\tconst topLevelPos = resolved.before(1);\n\treturn {\n\t\tfrom: topLevelPos,\n\t\tto: topLevelPos + resolved.node(1).nodeSize\n\t};\n}\n/**\n* Converts an absolute document range to content-relative positions used by\n* `Node#nodesBetween` and `Node#forEach` offsets.\n*/\nfunction toContentRelativeRange(doc, range) {\n\treturn {\n\t\tfrom: Math.max(0, range.from - 1),\n\t\tto: Math.min(doc.content.size, range.to - 1)\n\t};\n}\n/**\n* Returns the top-level block ranges that intersect a document change range.\n* Input `from`/`to` are absolute positions (e.g. from `getChangedRanges`).\n* Returned ranges are content-relative, matching `Node#forEach` offsets.\n*/\nfunction getTopLevelBlocksInRange(doc, from, to) {\n\tconst ranges = [];\n\tdoc.forEach((node, offset) => {\n\t\tconst nodeStart = offset;\n\t\tconst nodeEnd = nodeStart + node.nodeSize;\n\t\tconst absNodeStart = nodeStart + 1;\n\t\tconst absNodeEnd = nodeEnd + 1;\n\t\tif (absNodeStart < to && absNodeEnd > from) ranges.push({\n\t\t\tfrom: nodeStart,\n\t\t\tto: nodeEnd\n\t\t});\n\t});\n\treturn ranges;\n}\n/**\n* Sorts ranges by start position and merges overlapping or adjacent ranges.\n*/\nfunction mergeRanges(ranges) {\n\tif (ranges.length === 0) return [];\n\tconst sorted = [...ranges].sort((a, b) => a.from - b.from);\n\tconst merged = [{ ...sorted[0] }];\n\tfor (let i = 1; i < sorted.length; i += 1) {\n\t\tconst last = merged[merged.length - 1];\n\t\tconst current = sorted[i];\n\t\tif (current.from <= last.to) last.to = Math.max(last.to, current.to);\n\t\telse merged.push({ ...current });\n\t}\n\treturn merged;\n}\n//#endregion\n//#region src/placeholder/utils/placeholderStateField.ts\n/**\n* Expands a single changed range to the top-level blocks it touches.\n* Also resolves blocks at range boundaries so split/merge edits update\n* adjacent empty nodes (e.g. a new paragraph after Enter).\n*/\nfunction collectBlocksForChange(doc, change) {\n\tconst ranges = getTopLevelBlocksInRange(doc, change.from, change.to);\n\tranges.push(toContentRelativeRange(doc, resolveTopLevelRange(doc, change.from)));\n\tif (change.to > change.from) ranges.push(toContentRelativeRange(doc, resolveTopLevelRange(doc, Math.min(change.to, doc.content.size + 1) - 1)));\n\telse if (change.from < doc.content.size + 1) ranges.push(toContentRelativeRange(doc, resolveTopLevelRange(doc, Math.min(change.from + 1, doc.content.size))));\n\treturn ranges;\n}\n/**\n* Collects content-relative top-level block ranges that need placeholder\n* decorations recomputed after a transaction.\n*/\nfunction collectRescanRanges(tr, oldState, newState) {\n\tconst ranges = [];\n\tif (tr.docChanged) {\n\t\tconst changes = getChangedRanges(tr);\n\t\tfor (const change of changes) ranges.push(...collectBlocksForChange(newState.doc, change.newRange));\n\t}\n\tif (tr.selectionSet) {\n\t\tranges.push(toContentRelativeRange(newState.doc, resolveTopLevelRange(newState.doc, tr.mapping.map(oldState.selection.anchor))));\n\t\tranges.push(toContentRelativeRange(newState.doc, resolveTopLevelRange(newState.doc, newState.selection.anchor)));\n\t}\n\treturn mergeRanges(ranges);\n}\n/** Clamps a content-relative range to `[0, doc.content.size]`. */\nfunction clampRange(from, to, doc) {\n\tconst clampedFrom = Math.max(0, Math.min(from, doc.content.size));\n\treturn {\n\t\tfrom: clampedFrom,\n\t\tto: Math.max(clampedFrom, Math.min(to, doc.content.size))\n\t};\n}\n/**\n* Removes and rebuilds placeholder decorations within the given ranges.\n* Only drops decorations fully contained in a range so mapped decorations\n* on neighbouring blocks (e.g. at a block boundary) are kept intact.\n*/\nfunction updateDecorationsInRanges({ decorations, ranges, editor, options, dataAttribute, doc, selection }) {\n\tlet next = decorations;\n\tfor (const range of ranges) {\n\t\tconst { from, to } = clampRange(range.from, range.to, doc);\n\t\tconst existing = next.find(from, to).filter((decoration) => decoration.from >= from && decoration.to <= to);\n\t\tif (existing.length) next = next.remove(existing);\n\t\tconst newDecos = scanRangeForDecorations({\n\t\t\teditor,\n\t\t\toptions,\n\t\t\tdataAttribute,\n\t\t\tdoc,\n\t\t\tselection,\n\t\t\tfrom,\n\t\t\tto\n\t\t});\n\t\tif (newDecos.length) next = next.add(doc, newDecos);\n\t}\n\treturn next;\n}\n/**\n* Creates the incremental `StateField<DecorationSet>` used by the slow path\n* (`showOnlyCurrent: false` or `includeChildren: true`).\n*\n* Decorations are mapped through each transaction and only recomputed for\n* top-level blocks touched by document or selection changes.\n* @param options.editor - The editor instance.\n* @param options.options - The resolved placeholder options.\n* @param options.dataAttribute - The prepared `data-*` attribute name.\n* @returns A ProseMirror state field storing the placeholder decoration set.\n*/\nfunction createPlaceholderStateField({ editor, options, dataAttribute }) {\n\treturn {\n\t\tinit(_config, state) {\n\t\t\tconst decorations = buildPlaceholderDecorations({\n\t\t\t\teditor,\n\t\t\t\toptions,\n\t\t\t\tdataAttribute,\n\t\t\t\tdoc: state.doc,\n\t\t\t\tselection: state.selection\n\t\t\t});\n\t\t\treturn decorations !== null && decorations !== void 0 ? decorations : DecorationSet.empty;\n\t\t},\n\t\tapply(tr, prev, oldState, newState) {\n\t\t\tif (!tr.docChanged && !tr.selectionSet) return prev;\n\t\t\treturn updateDecorationsInRanges({\n\t\t\t\tdecorations: prev.map(tr.mapping, tr.doc),\n\t\t\t\tranges: collectRescanRanges(tr, oldState, newState),\n\t\t\t\teditor,\n\t\t\t\toptions,\n\t\t\t\tdataAttribute,\n\t\t\t\tdoc: newState.doc,\n\t\t\t\tselection: newState.selection\n\t\t\t});\n\t\t}\n\t};\n}\n//#endregion\n//#region src/placeholder/utils/preparePlaceholderAttribute.ts\n/**\n* Prepares the placeholder attribute by ensuring it is properly formatted.\n* @param attr - The placeholder attribute string.\n* @returns The prepared placeholder attribute string.\n*/\nfunction preparePlaceholderAttribute(attr) {\n\treturn attr.replace(/\\s+/g, \"-\").replace(/[^a-zA-Z0-9-]/g, \"\").replace(/^[0-9-]+/, \"\").replace(/^-+/, \"\").toLowerCase();\n}\n//#endregion\n//#region src/placeholder/plugins/PlaceholderPlugin.ts\n/**\n* Creates the ProseMirror plugin that renders placeholder decorations.\n* @param options.editor - The editor instance.\n* @param options.options - The resolved placeholder options.\n* @returns The configured placeholder plugin.\n*/\nfunction createPlaceholderPlugin({ editor, options }) {\n\tconst dataAttribute = options.dataAttribute ? `data-${preparePlaceholderAttribute(options.dataAttribute)}` : `data-${DEFAULT_DATA_ATTRIBUTE}`;\n\tconst useResolvedPath = options.showOnlyCurrent && !options.includeChildren;\n\treturn new Plugin({\n\t\tkey: PLUGIN_KEY,\n\t\t...useResolvedPath ? {} : { state: createPlaceholderStateField({\n\t\t\teditor,\n\t\t\toptions,\n\t\t\tdataAttribute\n\t\t}) },\n\t\tprops: { decorations: useResolvedPath ? ({ doc, selection }) => buildPlaceholderDecorations({\n\t\t\teditor,\n\t\t\toptions,\n\t\t\tdataAttribute,\n\t\t\tdoc,\n\t\t\tselection\n\t\t}) : (state) => {\n\t\t\tvar _PLUGIN_KEY$getState;\n\t\t\tif (options.showOnlyWhenEditable && !editor.isEditable) return DecorationSet.empty;\n\t\t\treturn (_PLUGIN_KEY$getState = PLUGIN_KEY.getState(state)) !== null && _PLUGIN_KEY$getState !== void 0 ? _PLUGIN_KEY$getState : DecorationSet.empty;\n\t\t} }\n\t});\n}\n//#endregion\n//#region src/placeholder/placeholder.ts\n/**\n* This extension allows you to add a placeholder to your editor.\n* A placeholder is a text that appears when the editor or a node is empty.\n* @see https://www.tiptap.dev/api/extensions/placeholder\n*/\nconst Placeholder = Extension.create({\n\tname: \"placeholder\",\n\taddOptions() {\n\t\treturn {\n\t\t\temptyEditorClass: \"is-editor-empty\",\n\t\t\temptyNodeClass: \"is-empty\",\n\t\t\tdataAttribute: DEFAULT_DATA_ATTRIBUTE,\n\t\t\tplaceholder: \"Write something …\",\n\t\t\tshowOnlyWhenEditable: true,\n\t\t\tshowOnlyCurrent: true,\n\t\t\tincludeChildren: false\n\t\t};\n\t},\n\taddProseMirrorPlugins() {\n\t\treturn [createPlaceholderPlugin({\n\t\t\teditor: this.editor,\n\t\t\toptions: this.options\n\t\t})];\n\t}\n});\n//#endregion\n//#region src/selection/selection.ts\n/**\n* Whether the native browser selection should be cleared on blur and restored on focus.\n* Only applies to non-empty text selections in an editable editor.\n*/\nfunction shouldSyncDomSelection(state, editor) {\n\treturn !state.selection.empty && !isNodeSelection(state.selection) && editor.isEditable;\n}\n/**\n* Whether the selection decoration should be rendered to keep the selection\n* visible while the editor is blurred (and not dragging).\n*/\nfunction shouldPreserveSelection(state, editor) {\n\treturn shouldSyncDomSelection(state, editor) && !editor.isFocused && !editor.view.dragging;\n}\nfunction clearDomSelection() {\n\tvar _window$getSelection;\n\t(_window$getSelection = window.getSelection()) === null || _window$getSelection === void 0 || _window$getSelection.removeAllRanges();\n}\n/**\n* Sync the native selection from the editor state.\n* @see https://prosemirror.net/docs/ref/#view.EditorView.focus\n*/\nfunction restoreDomSelection(view) {\n\tview.focus();\n}\n/**\n* This extension allows you to add a class to the selected text when the editor is blurred.\n* It clears the native browser selection on blur (so `::selection` styles do not overlap the\n* decoration) and restores it when the editor is focused again.\n* @see https://www.tiptap.dev/api/extensions/selection\n*/\nconst Selection = Extension.create({\n\tname: \"selection\",\n\taddOptions() {\n\t\treturn { className: \"selection\" };\n\t},\n\taddProseMirrorPlugins() {\n\t\tconst { editor, options } = this;\n\t\treturn [new Plugin({\n\t\t\tkey: new PluginKey(\"selection\"),\n\t\t\tprops: {\n\t\t\t\tdecorations(state) {\n\t\t\t\t\tif (!shouldPreserveSelection(state, editor)) return null;\n\t\t\t\t\treturn DecorationSet.create(state.doc, [Decoration.inline(state.selection.from, state.selection.to, { class: options.className })]);\n\t\t\t\t},\n\t\t\t\thandleDOMEvents: {\n\t\t\t\t\tblur(view) {\n\t\t\t\t\t\tif (!shouldSyncDomSelection(view.state, editor)) return false;\n\t\t\t\t\t\tclearDomSelection();\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t},\n\t\t\t\t\tfocus(view) {\n\t\t\t\t\t\tif (!shouldSyncDomSelection(view.state, editor)) return false;\n\t\t\t\t\t\trequestAnimationFrame(() => {\n\t\t\t\t\t\t\tif (!editor.isDestroyed && view.hasFocus()) restoreDomSelection(view);\n\t\t\t\t\t\t});\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t})];\n\t}\n});\n//#endregion\n//#region src/trailing-node/trailing-node.ts\nconst skipTrailingNodeMeta = \"skipTrailingNode\";\nfunction nodeEqualsType({ types, node }) {\n\treturn node && Array.isArray(types) && types.includes(node.type) || (node === null || node === void 0 ? void 0 : node.type) === types;\n}\n/**\n* This extension allows you to add an extra node at the end of the document.\n* @see https://www.tiptap.dev/api/extensions/trailing-node\n*/\nconst TrailingNode = Extension.create({\n\tname: \"trailingNode\",\n\taddOptions() {\n\t\treturn {\n\t\t\tnode: void 0,\n\t\t\tnotAfter: []\n\t\t};\n\t},\n\taddProseMirrorPlugins() {\n\t\tvar _this$editor$schema$t;\n\t\tconst plugin = new PluginKey(this.name);\n\t\tconst defaultNode = this.options.node || ((_this$editor$schema$t = this.editor.schema.topNodeType.contentMatch.defaultType) === null || _this$editor$schema$t === void 0 ? void 0 : _this$editor$schema$t.name) || \"paragraph\";\n\t\tconst disabledNodes = Object.entries(this.editor.schema.nodes).map(([, value]) => value).filter((node) => (this.options.notAfter || []).concat(defaultNode).includes(node.name));\n\t\treturn [new Plugin({\n\t\t\tkey: plugin,\n\t\t\tappendTransaction: (transactions, __, state) => {\n\t\t\t\tconst { doc, tr, schema } = state;\n\t\t\t\tconst shouldInsertNodeAtEnd = plugin.getState(state);\n\t\t\t\tconst endPosition = doc.content.size;\n\t\t\t\tconst type = schema.nodes[defaultNode];\n\t\t\t\tif (transactions.some((transaction) => transaction.getMeta(\"skipTrailingNode\"))) return;\n\t\t\t\tif (!shouldInsertNodeAtEnd) return;\n\t\t\t\treturn tr.insert(endPosition, type.create());\n\t\t\t},\n\t\t\tstate: {\n\t\t\t\tinit: (_, state) => {\n\t\t\t\t\tconst lastNode = state.tr.doc.lastChild;\n\t\t\t\t\treturn !nodeEqualsType({\n\t\t\t\t\t\tnode: lastNode,\n\t\t\t\t\t\ttypes: disabledNodes\n\t\t\t\t\t});\n\t\t\t\t},\n\t\t\t\tapply: (tr, value) => {\n\t\t\t\t\tif (!tr.docChanged) return value;\n\t\t\t\t\tif (tr.getMeta(\"__uniqueIDTransaction\")) return value;\n\t\t\t\t\tconst lastNode = tr.doc.lastChild;\n\t\t\t\t\treturn !nodeEqualsType({\n\t\t\t\t\t\tnode: lastNode,\n\t\t\t\t\t\ttypes: disabledNodes\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t}\n\t\t})];\n\t}\n});\n//#endregion\n//#region src/undo-redo/undo-redo.ts\n/**\n* This extension allows you to undo and redo recent changes.\n* @see https://www.tiptap.dev/api/extensions/undo-redo\n*\n* **Important**: If the `@tiptap/extension-collaboration` package is used, make sure to remove\n* the `undo-redo` extension, as it is not compatible with the `collaboration` extension.\n*\n* `@tiptap/extension-collaboration` uses its own history implementation.\n*/\nconst UndoRedo = Extension.create({\n\tname: \"undoRedo\",\n\taddOptions() {\n\t\treturn {\n\t\t\tdepth: 100,\n\t\t\tnewGroupDelay: 500\n\t\t};\n\t},\n\taddCommands() {\n\t\treturn {\n\t\t\tundo: () => ({ state, dispatch }) => {\n\t\t\t\treturn undo(state, dispatch);\n\t\t\t},\n\t\t\tredo: () => ({ state, dispatch }) => {\n\t\t\t\treturn redo(state, dispatch);\n\t\t\t}\n\t\t};\n\t},\n\taddProseMirrorPlugins() {\n\t\treturn [history(this.options)];\n\t},\n\taddKeyboardShortcuts() {\n\t\treturn {\n\t\t\t\"Mod-z\": () => this.editor.commands.undo(),\n\t\t\t\"Shift-Mod-z\": () => this.editor.commands.redo(),\n\t\t\t\"Mod-y\": () => this.editor.commands.redo(),\n\t\t\t\"Mod-я\": () => this.editor.commands.undo(),\n\t\t\t\"Shift-Mod-я\": () => this.editor.commands.redo()\n\t\t};\n\t}\n});\n//#endregion\nexport { CharacterCount, DEFAULT_DATA_ATTRIBUTE, Dropcursor, Focus, Gapcursor, PLUGIN_KEY, Placeholder, Selection, TrailingNode, UndoRedo, preparePlaceholderAttribute, skipTrailingNodeMeta };\n\n//# sourceMappingURL=index.js.map"],"x_google_ignoreList":[0,1,2],"mappings":";;;AAaA,SAAS,EAAW,IAAU,CAAC,GAAG;CAC9B,OAAO,IAAI,EAAO,EACd,KAAK,GAAY;EAAE,OAAO,IAAI,EAAe,GAAY,CAAO;CAAG,EACvE,CAAC;AACL;AACA,IAAM,IAAN,MAAqB;CACjB,YAAY,GAAY,GAAS;EAU7B,AARA,KAAK,aAAa,GAClB,KAAK,YAAY,MACjB,KAAK,UAAU,MACf,KAAK,UAAU,IACf,KAAK,gBAAgB,MACrB,KAAK,QAAc,EAAQ,SAAwC,GACnE,KAAK,QAAQ,EAAQ,UAAU,KAAQ,KAAA,IAAa,EAAQ,SAAS,SACrE,KAAK,QAAQ,EAAQ,OACrB,KAAK,WAAW;GAAC;GAAY;GAAW;GAAQ;EAAW,CAAC,CAAC,KAAI,MAAQ;GACrE,IAAI,KAAW,MAAM;IAAE,KAAK,EAAK,CAAC,CAAC;GAAG;GAEtC,OAD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