@ecomcx/ecomweb-editor 1.24.0 → 1.25.0
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/README.md +4 -6
- package/package.json +5 -36
- package/src/index.ts +1 -32
- package/src/shared/block-defs.ts +3 -4
- package/src/shared/panel-store.ts +3 -3
- package/src/shared/types.ts +0 -21
- package/src/v2/blocks/layout.tsx +35 -30
- package/src/v2/blocks/media.tsx +9 -7
- package/src/v2/blocks/text.tsx +21 -7
- package/src/v2/canvas/block-list.tsx +1 -0
- package/src/v2/canvas/canvas-css.ts +14 -3
- package/src/v2/core/registry.ts +1 -1
- package/src/v2/index.ts +8 -0
- package/src/v2/text/rich-schema.ts +2 -1
- package/node_modules/@floating-ui/core/LICENSE +0 -20
- package/node_modules/@floating-ui/core/README.md +0 -4
- package/node_modules/@floating-ui/core/dist/floating-ui.core.browser.min.mjs +0 -1
- package/node_modules/@floating-ui/core/dist/floating-ui.core.browser.mjs +0 -1164
- package/node_modules/@floating-ui/core/dist/floating-ui.core.d.mts +0 -535
- package/node_modules/@floating-ui/core/dist/floating-ui.core.d.ts +0 -535
- package/node_modules/@floating-ui/core/dist/floating-ui.core.esm.js +0 -1038
- package/node_modules/@floating-ui/core/dist/floating-ui.core.mjs +0 -1038
- package/node_modules/@floating-ui/core/dist/floating-ui.core.umd.js +0 -1183
- package/node_modules/@floating-ui/core/dist/floating-ui.core.umd.min.js +0 -1
- package/node_modules/@floating-ui/core/package.json +0 -63
- package/node_modules/@floating-ui/dom/LICENSE +0 -20
- package/node_modules/@floating-ui/dom/README.md +0 -4
- package/node_modules/@floating-ui/dom/dist/floating-ui.dom.browser.min.mjs +0 -1
- package/node_modules/@floating-ui/dom/dist/floating-ui.dom.browser.mjs +0 -964
- package/node_modules/@floating-ui/dom/dist/floating-ui.dom.d.mts +0 -362
- package/node_modules/@floating-ui/dom/dist/floating-ui.dom.d.ts +0 -362
- package/node_modules/@floating-ui/dom/dist/floating-ui.dom.esm.js +0 -789
- package/node_modules/@floating-ui/dom/dist/floating-ui.dom.mjs +0 -789
- package/node_modules/@floating-ui/dom/dist/floating-ui.dom.umd.js +0 -983
- package/node_modules/@floating-ui/dom/dist/floating-ui.dom.umd.min.js +0 -1
- package/node_modules/@floating-ui/dom/package.json +0 -72
- package/node_modules/@floating-ui/utils/LICENSE +0 -20
- package/node_modules/@floating-ui/utils/README.md +0 -4
- package/node_modules/@floating-ui/utils/dist/floating-ui.utils.d.mts +0 -105
- package/node_modules/@floating-ui/utils/dist/floating-ui.utils.d.ts +0 -105
- package/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.d.mts +0 -47
- package/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.d.ts +0 -47
- package/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.esm.js +0 -165
- package/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.mjs +0 -165
- package/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.umd.js +0 -192
- package/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.umd.min.js +0 -1
- package/node_modules/@floating-ui/utils/dist/floating-ui.utils.esm.js +0 -136
- package/node_modules/@floating-ui/utils/dist/floating-ui.utils.mjs +0 -136
- package/node_modules/@floating-ui/utils/dist/floating-ui.utils.umd.js +0 -167
- package/node_modules/@floating-ui/utils/dist/floating-ui.utils.umd.min.js +0 -1
- package/node_modules/@floating-ui/utils/dom/floating-ui.utils.dom.d.ts +0 -47
- package/node_modules/@floating-ui/utils/dom/floating-ui.utils.dom.esm.js +0 -165
- package/node_modules/@floating-ui/utils/dom/floating-ui.utils.dom.umd.js +0 -192
- package/node_modules/@floating-ui/utils/dom/package.json +0 -6
- package/node_modules/@floating-ui/utils/package.json +0 -70
- package/node_modules/@tiptap/core/LICENSE.md +0 -21
- package/node_modules/@tiptap/core/README.md +0 -18
- package/node_modules/@tiptap/core/dist/index.cjs +0 -8463
- package/node_modules/@tiptap/core/dist/index.cjs.map +0 -1
- package/node_modules/@tiptap/core/dist/index.d.cts +0 -5798
- package/node_modules/@tiptap/core/dist/index.d.cts.map +0 -1
- package/node_modules/@tiptap/core/dist/index.d.ts +0 -5797
- package/node_modules/@tiptap/core/dist/index.d.ts.map +0 -1
- package/node_modules/@tiptap/core/dist/index.js +0 -8288
- package/node_modules/@tiptap/core/dist/index.js.map +0 -1
- package/node_modules/@tiptap/core/dist/jsx-runtime/jsx-runtime.cjs +0 -70
- package/node_modules/@tiptap/core/dist/jsx-runtime/jsx-runtime.cjs.map +0 -1
- package/node_modules/@tiptap/core/dist/jsx-runtime/jsx-runtime.d.cts +0 -28
- package/node_modules/@tiptap/core/dist/jsx-runtime/jsx-runtime.d.cts.map +0 -1
- package/node_modules/@tiptap/core/dist/jsx-runtime/jsx-runtime.d.ts +0 -28
- package/node_modules/@tiptap/core/dist/jsx-runtime/jsx-runtime.d.ts.map +0 -1
- package/node_modules/@tiptap/core/dist/jsx-runtime/jsx-runtime.js +0 -64
- package/node_modules/@tiptap/core/dist/jsx-runtime/jsx-runtime.js.map +0 -1
- package/node_modules/@tiptap/core/dist/rolldown-runtime-D7D4PA-g.js +0 -13
- package/node_modules/@tiptap/core/jsx-dev-runtime/index.cjs +0 -1
- package/node_modules/@tiptap/core/jsx-dev-runtime/index.d.cts +0 -1
- package/node_modules/@tiptap/core/jsx-dev-runtime/index.d.ts +0 -1
- package/node_modules/@tiptap/core/jsx-dev-runtime/index.js +0 -1
- package/node_modules/@tiptap/core/jsx-runtime/index.cjs +0 -1
- package/node_modules/@tiptap/core/jsx-runtime/index.d.cts +0 -1
- package/node_modules/@tiptap/core/jsx-runtime/index.d.ts +0 -1
- package/node_modules/@tiptap/core/jsx-runtime/index.js +0 -1
- package/node_modules/@tiptap/core/package.json +0 -74
- package/node_modules/@tiptap/core/src/CommandManager.test.ts +0 -220
- package/node_modules/@tiptap/core/src/CommandManager.ts +0 -208
- package/node_modules/@tiptap/core/src/Editor.test.ts +0 -756
- package/node_modules/@tiptap/core/src/Editor.ts +0 -908
- package/node_modules/@tiptap/core/src/EventEmitter.ts +0 -71
- package/node_modules/@tiptap/core/src/Extendable.test.ts +0 -764
- package/node_modules/@tiptap/core/src/Extendable.ts +0 -668
- package/node_modules/@tiptap/core/src/Extension.ts +0 -59
- package/node_modules/@tiptap/core/src/ExtensionManager.test.ts +0 -852
- package/node_modules/@tiptap/core/src/ExtensionManager.ts +0 -589
- package/node_modules/@tiptap/core/src/InputRule.test.ts +0 -113
- package/node_modules/@tiptap/core/src/InputRule.ts +0 -373
- package/node_modules/@tiptap/core/src/Mark.ts +0 -231
- package/node_modules/@tiptap/core/src/MarkView.test.ts +0 -53
- package/node_modules/@tiptap/core/src/MarkView.ts +0 -132
- package/node_modules/@tiptap/core/src/Node.ts +0 -390
- package/node_modules/@tiptap/core/src/NodePos.test.ts +0 -722
- package/node_modules/@tiptap/core/src/NodePos.ts +0 -270
- package/node_modules/@tiptap/core/src/NodeView.test.ts +0 -157
- package/node_modules/@tiptap/core/src/NodeView.ts +0 -367
- package/node_modules/@tiptap/core/src/PasteRule.ts +0 -396
- package/node_modules/@tiptap/core/src/Tracker.ts +0 -38
- package/node_modules/@tiptap/core/src/commands/blur.ts +0 -29
- package/node_modules/@tiptap/core/src/commands/canJoinItemsAt.ts +0 -13
- package/node_modules/@tiptap/core/src/commands/clearContent.ts +0 -25
- package/node_modules/@tiptap/core/src/commands/clearNodes.ts +0 -57
- package/node_modules/@tiptap/core/src/commands/command.ts +0 -22
- package/node_modules/@tiptap/core/src/commands/createParagraphNear.ts +0 -21
- package/node_modules/@tiptap/core/src/commands/cut.test.ts +0 -38
- package/node_modules/@tiptap/core/src/commands/cut.ts +0 -36
- package/node_modules/@tiptap/core/src/commands/deleteCurrentNode.ts +0 -44
- package/node_modules/@tiptap/core/src/commands/deleteNode.ts +0 -41
- package/node_modules/@tiptap/core/src/commands/deleteRange.ts +0 -26
- package/node_modules/@tiptap/core/src/commands/deleteSelection.test.ts +0 -125
- package/node_modules/@tiptap/core/src/commands/deleteSelection.ts +0 -109
- package/node_modules/@tiptap/core/src/commands/enter.ts +0 -19
- package/node_modules/@tiptap/core/src/commands/exitCode.ts +0 -21
- package/node_modules/@tiptap/core/src/commands/extendMarkRange.test.ts +0 -455
- package/node_modules/@tiptap/core/src/commands/extendMarkRange.ts +0 -52
- package/node_modules/@tiptap/core/src/commands/first.ts +0 -26
- package/node_modules/@tiptap/core/src/commands/focus.ts +0 -108
- package/node_modules/@tiptap/core/src/commands/forEach.ts +0 -24
- package/node_modules/@tiptap/core/src/commands/index.ts +0 -59
- package/node_modules/@tiptap/core/src/commands/insertContent.test.ts +0 -197
- package/node_modules/@tiptap/core/src/commands/insertContent.ts +0 -50
- package/node_modules/@tiptap/core/src/commands/insertContentAt.test.ts +0 -133
- package/node_modules/@tiptap/core/src/commands/insertContentAt.ts +0 -208
- package/node_modules/@tiptap/core/src/commands/insertDefaultBlock.test.ts +0 -178
- package/node_modules/@tiptap/core/src/commands/insertDefaultBlock.ts +0 -97
- package/node_modules/@tiptap/core/src/commands/join.ts +0 -69
- package/node_modules/@tiptap/core/src/commands/joinItemBackward.ts +0 -42
- package/node_modules/@tiptap/core/src/commands/joinItemForward.test.ts +0 -138
- package/node_modules/@tiptap/core/src/commands/joinItemForward.ts +0 -42
- package/node_modules/@tiptap/core/src/commands/joinTextblockBackward.ts +0 -20
- package/node_modules/@tiptap/core/src/commands/joinTextblockForward.ts +0 -20
- package/node_modules/@tiptap/core/src/commands/keyboardShortcut.ts +0 -100
- package/node_modules/@tiptap/core/src/commands/lift.ts +0 -34
- package/node_modules/@tiptap/core/src/commands/liftEmptyBlock.ts +0 -21
- package/node_modules/@tiptap/core/src/commands/liftListItem.ts +0 -26
- package/node_modules/@tiptap/core/src/commands/newlineInCode.ts +0 -21
- package/node_modules/@tiptap/core/src/commands/resetAttributes.ts +0 -80
- package/node_modules/@tiptap/core/src/commands/scrollIntoView.ts +0 -23
- package/node_modules/@tiptap/core/src/commands/selectAll.ts +0 -27
- package/node_modules/@tiptap/core/src/commands/selectNodeBackward.ts +0 -21
- package/node_modules/@tiptap/core/src/commands/selectNodeForward.ts +0 -21
- package/node_modules/@tiptap/core/src/commands/selectParentNode.ts +0 -21
- package/node_modules/@tiptap/core/src/commands/selectTextblockEnd.ts +0 -23
- package/node_modules/@tiptap/core/src/commands/selectTextblockStart.ts +0 -23
- package/node_modules/@tiptap/core/src/commands/setContent.test.ts +0 -177
- package/node_modules/@tiptap/core/src/commands/setContent.ts +0 -79
- package/node_modules/@tiptap/core/src/commands/setMark.ts +0 -122
- package/node_modules/@tiptap/core/src/commands/setMeta.ts +0 -25
- package/node_modules/@tiptap/core/src/commands/setNode.ts +0 -57
- package/node_modules/@tiptap/core/src/commands/setNodeSelection.ts +0 -31
- package/node_modules/@tiptap/core/src/commands/setTextDirection.ts +0 -51
- package/node_modules/@tiptap/core/src/commands/setTextSelection.ts +0 -36
- package/node_modules/@tiptap/core/src/commands/sinkListItem.ts +0 -26
- package/node_modules/@tiptap/core/src/commands/splitBlock.test.ts +0 -107
- package/node_modules/@tiptap/core/src/commands/splitBlock.ts +0 -136
- package/node_modules/@tiptap/core/src/commands/splitListItem.ts +0 -166
- package/node_modules/@tiptap/core/src/commands/toggleList.ts +0 -308
- package/node_modules/@tiptap/core/src/commands/toggleMark.ts +0 -51
- package/node_modules/@tiptap/core/src/commands/toggleNode.ts +0 -47
- package/node_modules/@tiptap/core/src/commands/toggleWrap.ts +0 -32
- package/node_modules/@tiptap/core/src/commands/undoInputRule.ts +0 -49
- package/node_modules/@tiptap/core/src/commands/unsetAllMarks.test.ts +0 -109
- package/node_modules/@tiptap/core/src/commands/unsetAllMarks.ts +0 -44
- package/node_modules/@tiptap/core/src/commands/unsetMark.ts +0 -65
- package/node_modules/@tiptap/core/src/commands/unsetTextDirection.ts +0 -51
- package/node_modules/@tiptap/core/src/commands/updateAttributes.ts +0 -150
- package/node_modules/@tiptap/core/src/commands/updateDecorations.ts +0 -28
- package/node_modules/@tiptap/core/src/commands/utils/appendContentNode.ts +0 -25
- package/node_modules/@tiptap/core/src/commands/utils/appendNestedList.test.ts +0 -35
- package/node_modules/@tiptap/core/src/commands/utils/appendNestedList.ts +0 -43
- package/node_modules/@tiptap/core/src/commands/utils/convertListItem.ts +0 -32
- package/node_modules/@tiptap/core/src/commands/utils/convertListItems.ts +0 -24
- package/node_modules/@tiptap/core/src/commands/utils/createNode.ts +0 -18
- package/node_modules/@tiptap/core/src/commands/utils/findNodePosition.ts +0 -18
- package/node_modules/@tiptap/core/src/commands/utils/flushPendingContent.ts +0 -23
- package/node_modules/@tiptap/core/src/commands/utils/listConversionTypes.ts +0 -17
- package/node_modules/@tiptap/core/src/commands/wrapIn.ts +0 -27
- package/node_modules/@tiptap/core/src/commands/wrapInList.ts +0 -27
- package/node_modules/@tiptap/core/src/decorations/Decoration.test.ts +0 -40
- package/node_modules/@tiptap/core/src/decorations/Decoration.ts +0 -177
- package/node_modules/@tiptap/core/src/decorations/DecorationManager.test.ts +0 -821
- package/node_modules/@tiptap/core/src/decorations/DecorationManager.ts +0 -440
- package/node_modules/@tiptap/core/src/decorations/constants.ts +0 -7
- package/node_modules/@tiptap/core/src/decorations/createWidgetDecoration.test.ts +0 -224
- package/node_modules/@tiptap/core/src/decorations/createWidgetDecoration.ts +0 -221
- package/node_modules/@tiptap/core/src/decorations/decorationApplyScope.test.ts +0 -50
- package/node_modules/@tiptap/core/src/decorations/decorationApplyScope.ts +0 -45
- package/node_modules/@tiptap/core/src/decorations/helpers/buildDecorationSet.ts +0 -25
- package/node_modules/@tiptap/core/src/decorations/helpers/decorationsToPMDecorations.ts +0 -36
- package/node_modules/@tiptap/core/src/decorations/helpers/filterOutOfRangeDecorations.ts +0 -52
- package/node_modules/@tiptap/core/src/decorations/helpers/findDuplicateWidgetKeys.ts +0 -37
- package/node_modules/@tiptap/core/src/decorations/helpers/getRebuildRanges.test.ts +0 -147
- package/node_modules/@tiptap/core/src/decorations/helpers/getRebuildRanges.ts +0 -96
- package/node_modules/@tiptap/core/src/decorations/helpers/hasResolvableChangedRange.ts +0 -24
- package/node_modules/@tiptap/core/src/decorations/helpers/isAttrStep.ts +0 -21
- package/node_modules/@tiptap/core/src/decorations/helpers/mapDecorationSet.ts +0 -31
- package/node_modules/@tiptap/core/src/decorations/helpers/mapDecorations.ts +0 -26
- package/node_modules/@tiptap/core/src/decorations/helpers/mergeDecorationSets.ts +0 -16
- package/node_modules/@tiptap/core/src/decorations/helpers/rangeOwnsPosition.ts +0 -38
- package/node_modules/@tiptap/core/src/decorations/helpers/shouldRecomputeDecoration.ts +0 -24
- package/node_modules/@tiptap/core/src/decorations/helpers/unionWidgetKeys.ts +0 -15
- package/node_modules/@tiptap/core/src/decorations/helpers/validateDecorationSpec.ts +0 -49
- package/node_modules/@tiptap/core/src/decorations/helpers/widgetKeyOf.ts +0 -11
- package/node_modules/@tiptap/core/src/decorations/index.ts +0 -28
- package/node_modules/@tiptap/core/src/decorations/types.ts +0 -87
- package/node_modules/@tiptap/core/src/extensions/clipboardTextSerializer.test.ts +0 -68
- package/node_modules/@tiptap/core/src/extensions/clipboardTextSerializer.ts +0 -53
- package/node_modules/@tiptap/core/src/extensions/commands.ts +0 -14
- package/node_modules/@tiptap/core/src/extensions/delete.test.ts +0 -49
- package/node_modules/@tiptap/core/src/extensions/delete.ts +0 -101
- package/node_modules/@tiptap/core/src/extensions/drop.ts +0 -26
- package/node_modules/@tiptap/core/src/extensions/editable.ts +0 -18
- package/node_modules/@tiptap/core/src/extensions/focusEvents.ts +0 -45
- package/node_modules/@tiptap/core/src/extensions/index.ts +0 -10
- package/node_modules/@tiptap/core/src/extensions/keymap.ts +0 -165
- package/node_modules/@tiptap/core/src/extensions/paste.ts +0 -25
- package/node_modules/@tiptap/core/src/extensions/tabindex.test.ts +0 -75
- package/node_modules/@tiptap/core/src/extensions/tabindex.ts +0 -58
- package/node_modules/@tiptap/core/src/extensions/textDirection.ts +0 -88
- package/node_modules/@tiptap/core/src/helpers/MappablePosition.ts +0 -69
- package/node_modules/@tiptap/core/src/helpers/combineTransactionSteps.ts +0 -24
- package/node_modules/@tiptap/core/src/helpers/createChainableState.ts +0 -42
- package/node_modules/@tiptap/core/src/helpers/createDocument.ts +0 -24
- package/node_modules/@tiptap/core/src/helpers/createNodeFromContent.test.ts +0 -332
- package/node_modules/@tiptap/core/src/helpers/createNodeFromContent.ts +0 -128
- package/node_modules/@tiptap/core/src/helpers/defaultBlockAt.ts +0 -18
- package/node_modules/@tiptap/core/src/helpers/findChildren.ts +0 -24
- package/node_modules/@tiptap/core/src/helpers/findChildrenInRange.ts +0 -40
- package/node_modules/@tiptap/core/src/helpers/findParentNode.ts +0 -18
- package/node_modules/@tiptap/core/src/helpers/findParentNodeClosestToPos.ts +0 -37
- package/node_modules/@tiptap/core/src/helpers/flattenExtensions.ts +0 -34
- package/node_modules/@tiptap/core/src/helpers/generateHTML.test.ts +0 -29
- package/node_modules/@tiptap/core/src/helpers/generateHTML.ts +0 -18
- package/node_modules/@tiptap/core/src/helpers/generateJSON.test.ts +0 -31
- package/node_modules/@tiptap/core/src/helpers/generateJSON.ts +0 -18
- package/node_modules/@tiptap/core/src/helpers/generateText.test.ts +0 -71
- package/node_modules/@tiptap/core/src/helpers/generateText.ts +0 -34
- package/node_modules/@tiptap/core/src/helpers/getAttributes.ts +0 -32
- package/node_modules/@tiptap/core/src/helpers/getAttributesFromExtensions.test.ts +0 -473
- package/node_modules/@tiptap/core/src/helpers/getAttributesFromExtensions.ts +0 -120
- package/node_modules/@tiptap/core/src/helpers/getChangedRanges.test.ts +0 -48
- package/node_modules/@tiptap/core/src/helpers/getChangedRanges.ts +0 -85
- package/node_modules/@tiptap/core/src/helpers/getDebugJSON.ts +0 -54
- package/node_modules/@tiptap/core/src/helpers/getExtensionField.ts +0 -32
- package/node_modules/@tiptap/core/src/helpers/getHTMLFromFragment.ts +0 -13
- package/node_modules/@tiptap/core/src/helpers/getMarkAttributes.ts +0 -33
- package/node_modules/@tiptap/core/src/helpers/getMarkRange.test.ts +0 -237
- package/node_modules/@tiptap/core/src/helpers/getMarkRange.ts +0 -105
- package/node_modules/@tiptap/core/src/helpers/getMarkType.ts +0 -15
- package/node_modules/@tiptap/core/src/helpers/getMarksBetween.ts +0 -44
- package/node_modules/@tiptap/core/src/helpers/getNodeAtPosition.ts +0 -34
- package/node_modules/@tiptap/core/src/helpers/getNodeAttributes.ts +0 -25
- package/node_modules/@tiptap/core/src/helpers/getNodeType.ts +0 -15
- package/node_modules/@tiptap/core/src/helpers/getPreviousBlockSibling.test.ts +0 -111
- package/node_modules/@tiptap/core/src/helpers/getPreviousBlockSibling.ts +0 -36
- package/node_modules/@tiptap/core/src/helpers/getRenderedAttributes.ts +0 -23
- package/node_modules/@tiptap/core/src/helpers/getSchema.ts +0 -12
- package/node_modules/@tiptap/core/src/helpers/getSchemaByResolvedExtensions.test.ts +0 -171
- package/node_modules/@tiptap/core/src/helpers/getSchemaByResolvedExtensions.ts +0 -41
- package/node_modules/@tiptap/core/src/helpers/getSchemaSpecByResolvedExtensions.test.ts +0 -101
- package/node_modules/@tiptap/core/src/helpers/getSchemaSpecByResolvedExtensions.ts +0 -240
- package/node_modules/@tiptap/core/src/helpers/getSchemaTypeByName.ts +0 -11
- package/node_modules/@tiptap/core/src/helpers/getSchemaTypeNameByName.ts +0 -19
- package/node_modules/@tiptap/core/src/helpers/getSplittedAttributes.ts +0 -28
- package/node_modules/@tiptap/core/src/helpers/getText.ts +0 -28
- package/node_modules/@tiptap/core/src/helpers/getTextBetween.ts +0 -52
- package/node_modules/@tiptap/core/src/helpers/getTextContentFromNodes.test.ts +0 -40
- package/node_modules/@tiptap/core/src/helpers/getTextContentFromNodes.ts +0 -34
- package/node_modules/@tiptap/core/src/helpers/getTextSerializersFromSchema.ts +0 -16
- package/node_modules/@tiptap/core/src/helpers/index.ts +0 -71
- package/node_modules/@tiptap/core/src/helpers/injectExtensionAttributesToParseRule.ts +0 -47
- package/node_modules/@tiptap/core/src/helpers/isActive.test.ts +0 -106
- package/node_modules/@tiptap/core/src/helpers/isActive.ts +0 -27
- package/node_modules/@tiptap/core/src/helpers/isAtEndOfNode.ts +0 -29
- package/node_modules/@tiptap/core/src/helpers/isAtStartOfNode.ts +0 -11
- package/node_modules/@tiptap/core/src/helpers/isExtensionRulesEnabled.ts +0 -13
- package/node_modules/@tiptap/core/src/helpers/isFragment.ts +0 -14
- package/node_modules/@tiptap/core/src/helpers/isList.ts +0 -27
- package/node_modules/@tiptap/core/src/helpers/isMarkActive.ts +0 -94
- package/node_modules/@tiptap/core/src/helpers/isNodeActive.ts +0 -51
- package/node_modules/@tiptap/core/src/helpers/isNodeEmpty.test.ts +0 -250
- package/node_modules/@tiptap/core/src/helpers/isNodeEmpty.ts +0 -62
- package/node_modules/@tiptap/core/src/helpers/isNodeSelection.ts +0 -5
- package/node_modules/@tiptap/core/src/helpers/isNodeViewSelected.test.ts +0 -218
- package/node_modules/@tiptap/core/src/helpers/isNodeViewSelected.ts +0 -42
- package/node_modules/@tiptap/core/src/helpers/isProseMirrorAddMarkStep.test.ts +0 -19
- package/node_modules/@tiptap/core/src/helpers/isProseMirrorAddMarkStep.ts +0 -31
- package/node_modules/@tiptap/core/src/helpers/isProseMirrorAddNodeMarkStep.test.ts +0 -19
- package/node_modules/@tiptap/core/src/helpers/isProseMirrorAddNodeMarkStep.ts +0 -31
- package/node_modules/@tiptap/core/src/helpers/isProseMirrorAttrStep.test.ts +0 -17
- package/node_modules/@tiptap/core/src/helpers/isProseMirrorAttrStep.ts +0 -31
- package/node_modules/@tiptap/core/src/helpers/isProseMirrorCellSelection.test.ts +0 -17
- package/node_modules/@tiptap/core/src/helpers/isProseMirrorCellSelection.ts +0 -18
- package/node_modules/@tiptap/core/src/helpers/isProseMirrorContent.ts +0 -14
- package/node_modules/@tiptap/core/src/helpers/isProseMirrorDocAttrStep.test.ts +0 -17
- package/node_modules/@tiptap/core/src/helpers/isProseMirrorDocAttrStep.ts +0 -31
- package/node_modules/@tiptap/core/src/helpers/isProseMirrorFragment.test.ts +0 -27
- package/node_modules/@tiptap/core/src/helpers/isProseMirrorFragment.ts +0 -34
- package/node_modules/@tiptap/core/src/helpers/isProseMirrorNodeSelection.test.ts +0 -35
- package/node_modules/@tiptap/core/src/helpers/isProseMirrorNodeSelection.ts +0 -18
- package/node_modules/@tiptap/core/src/helpers/isProseMirrorRemoveMarkStep.test.ts +0 -19
- package/node_modules/@tiptap/core/src/helpers/isProseMirrorRemoveMarkStep.ts +0 -31
- package/node_modules/@tiptap/core/src/helpers/isProseMirrorRemoveNodeMarkStep.test.ts +0 -19
- package/node_modules/@tiptap/core/src/helpers/isProseMirrorRemoveNodeMarkStep.ts +0 -31
- package/node_modules/@tiptap/core/src/helpers/isProseMirrorReplaceAroundStep.test.ts +0 -19
- package/node_modules/@tiptap/core/src/helpers/isProseMirrorReplaceAroundStep.ts +0 -31
- package/node_modules/@tiptap/core/src/helpers/isProseMirrorReplaceStep.test.ts +0 -17
- package/node_modules/@tiptap/core/src/helpers/isProseMirrorReplaceStep.ts +0 -31
- package/node_modules/@tiptap/core/src/helpers/isProseMirrorSlice.test.ts +0 -16
- package/node_modules/@tiptap/core/src/helpers/isProseMirrorSlice.ts +0 -43
- package/node_modules/@tiptap/core/src/helpers/isProseMirrorStep.test.ts +0 -30
- package/node_modules/@tiptap/core/src/helpers/isProseMirrorStep.ts +0 -30
- package/node_modules/@tiptap/core/src/helpers/isProseMirrorStepResult.test.ts +0 -17
- package/node_modules/@tiptap/core/src/helpers/isProseMirrorStepResult.ts +0 -26
- package/node_modules/@tiptap/core/src/helpers/isTextSelection.ts +0 -5
- package/node_modules/@tiptap/core/src/helpers/posToDOMRect.ts +0 -35
- package/node_modules/@tiptap/core/src/helpers/resolveExtensions.ts +0 -25
- package/node_modules/@tiptap/core/src/helpers/resolveFocusPosition.ts +0 -42
- package/node_modules/@tiptap/core/src/helpers/rewriteUnknownContent.test.ts +0 -51
- package/node_modules/@tiptap/core/src/helpers/rewriteUnknownContent.ts +0 -158
- package/node_modules/@tiptap/core/src/helpers/selectionToInsertionEnd.ts +0 -29
- package/node_modules/@tiptap/core/src/helpers/sortExtensions.ts +0 -26
- package/node_modules/@tiptap/core/src/helpers/splitExtensions.ts +0 -18
- package/node_modules/@tiptap/core/src/helpers/warnOnDuplicatedProseMirrorModel.test.ts +0 -23
- package/node_modules/@tiptap/core/src/helpers/warnOnDuplicatedProseMirrorModel.ts +0 -47
- package/node_modules/@tiptap/core/src/index.ts +0 -23
- package/node_modules/@tiptap/core/src/inputRules/index.ts +0 -5
- package/node_modules/@tiptap/core/src/inputRules/markInputRule.ts +0 -72
- package/node_modules/@tiptap/core/src/inputRules/nodeInputRule.ts +0 -80
- package/node_modules/@tiptap/core/src/inputRules/textInputRule.ts +0 -39
- package/node_modules/@tiptap/core/src/inputRules/textblockTypeInputRule.ts +0 -41
- package/node_modules/@tiptap/core/src/inputRules/wrappingInputRule.ts +0 -88
- package/node_modules/@tiptap/core/src/jsx-runtime.test.ts +0 -349
- package/node_modules/@tiptap/core/src/jsx-runtime.ts +0 -145
- package/node_modules/@tiptap/core/src/lib/ResizableNodeView.test.ts +0 -121
- package/node_modules/@tiptap/core/src/lib/ResizableNodeView.ts +0 -1079
- package/node_modules/@tiptap/core/src/lib/index.ts +0 -1
- package/node_modules/@tiptap/core/src/pasteRules/index.ts +0 -3
- package/node_modules/@tiptap/core/src/pasteRules/markPasteRule.test.ts +0 -91
- package/node_modules/@tiptap/core/src/pasteRules/markPasteRule.ts +0 -82
- package/node_modules/@tiptap/core/src/pasteRules/nodePasteRule.ts +0 -44
- package/node_modules/@tiptap/core/src/pasteRules/textPasteRule.ts +0 -34
- package/node_modules/@tiptap/core/src/schema/getSchemaAttributes.ts +0 -45
- package/node_modules/@tiptap/core/src/schema/mergeSchemaSpec.ts +0 -83
- package/node_modules/@tiptap/core/src/schema/schemaSpecFields.ts +0 -24
- package/node_modules/@tiptap/core/src/style.ts +0 -71
- package/node_modules/@tiptap/core/src/types.ts +0 -1114
- package/node_modules/@tiptap/core/src/utilities/attrsEqual.test.ts +0 -54
- package/node_modules/@tiptap/core/src/utilities/attrsEqual.ts +0 -27
- package/node_modules/@tiptap/core/src/utilities/callOrReturn.ts +0 -25
- package/node_modules/@tiptap/core/src/utilities/canInsertNode.ts +0 -30
- package/node_modules/@tiptap/core/src/utilities/createStyleTag.ts +0 -21
- package/node_modules/@tiptap/core/src/utilities/deleteProps.ts +0 -19
- package/node_modules/@tiptap/core/src/utilities/elementFromString.ts +0 -29
- package/node_modules/@tiptap/core/src/utilities/escapeForRegEx.ts +0 -4
- package/node_modules/@tiptap/core/src/utilities/findDuplicates.ts +0 -8
- package/node_modules/@tiptap/core/src/utilities/fromString.test.ts +0 -53
- package/node_modules/@tiptap/core/src/utilities/fromString.ts +0 -19
- package/node_modules/@tiptap/core/src/utilities/getStyleProperty.test.ts +0 -53
- package/node_modules/@tiptap/core/src/utilities/getStyleProperty.ts +0 -52
- package/node_modules/@tiptap/core/src/utilities/htmlEntities.test.ts +0 -159
- package/node_modules/@tiptap/core/src/utilities/htmlEntities.ts +0 -74
- package/node_modules/@tiptap/core/src/utilities/index.ts +0 -31
- package/node_modules/@tiptap/core/src/utilities/isAndroid.test.ts +0 -28
- package/node_modules/@tiptap/core/src/utilities/isAndroid.ts +0 -3
- package/node_modules/@tiptap/core/src/utilities/isDev.ts +0 -12
- package/node_modules/@tiptap/core/src/utilities/isEmptyObject.ts +0 -3
- package/node_modules/@tiptap/core/src/utilities/isFirefox.ts +0 -11
- package/node_modules/@tiptap/core/src/utilities/isFunction.ts +0 -4
- package/node_modules/@tiptap/core/src/utilities/isMacOS.ts +0 -3
- package/node_modules/@tiptap/core/src/utilities/isNumber.ts +0 -3
- package/node_modules/@tiptap/core/src/utilities/isPlainObject.ts +0 -13
- package/node_modules/@tiptap/core/src/utilities/isRegExp.ts +0 -3
- package/node_modules/@tiptap/core/src/utilities/isSafari.ts +0 -13
- package/node_modules/@tiptap/core/src/utilities/isString.ts +0 -3
- package/node_modules/@tiptap/core/src/utilities/isValidCSSStyleValue.test.ts +0 -22
- package/node_modules/@tiptap/core/src/utilities/isValidCSSStyleValue.ts +0 -8
- package/node_modules/@tiptap/core/src/utilities/isiOS.ts +0 -9
- package/node_modules/@tiptap/core/src/utilities/markdown/createAtomBlockMarkdownSpec.ts +0 -138
- package/node_modules/@tiptap/core/src/utilities/markdown/createBlockMarkdownSpec.ts +0 -229
- package/node_modules/@tiptap/core/src/utilities/markdown/createInlineMarkdownSpec.ts +0 -262
- package/node_modules/@tiptap/core/src/utilities/markdown/index.ts +0 -14
- package/node_modules/@tiptap/core/src/utilities/markdown/parseAttributes.test.ts +0 -70
- package/node_modules/@tiptap/core/src/utilities/markdown/parseAttributes.ts +0 -48
- package/node_modules/@tiptap/core/src/utilities/markdown/parseIndentedBlocks.ts +0 -194
- package/node_modules/@tiptap/core/src/utilities/markdown/parseShortcodeAttributes.ts +0 -13
- package/node_modules/@tiptap/core/src/utilities/markdown/renderNestedMarkdownContent.test.ts +0 -51
- package/node_modules/@tiptap/core/src/utilities/markdown/renderNestedMarkdownContent.ts +0 -136
- package/node_modules/@tiptap/core/src/utilities/markdown/serializeAttributes.ts +0 -42
- package/node_modules/@tiptap/core/src/utilities/markdown/tokenizeAttributes.ts +0 -163
- package/node_modules/@tiptap/core/src/utilities/marksEqual.test.ts +0 -101
- package/node_modules/@tiptap/core/src/utilities/marksEqual.ts +0 -44
- package/node_modules/@tiptap/core/src/utilities/mergeAttributes.test.ts +0 -194
- package/node_modules/@tiptap/core/src/utilities/mergeAttributes.ts +0 -128
- package/node_modules/@tiptap/core/src/utilities/mergeDeep.test.ts +0 -98
- package/node_modules/@tiptap/core/src/utilities/mergeDeep.ts +0 -20
- package/node_modules/@tiptap/core/src/utilities/minMax.ts +0 -3
- package/node_modules/@tiptap/core/src/utilities/objectIncludes.ts +0 -30
- package/node_modules/@tiptap/core/src/utilities/removeDuplicates.ts +0 -13
- package/node_modules/@tiptap/extension-blockquote/LICENSE.md +0 -21
- package/node_modules/@tiptap/extension-blockquote/README.md +0 -18
- package/node_modules/@tiptap/extension-blockquote/dist/index.cjs +0 -132
- package/node_modules/@tiptap/extension-blockquote/dist/index.cjs.map +0 -1
- package/node_modules/@tiptap/extension-blockquote/dist/index.d.cts +0 -40
- package/node_modules/@tiptap/extension-blockquote/dist/index.d.cts.map +0 -1
- package/node_modules/@tiptap/extension-blockquote/dist/index.d.ts +0 -40
- package/node_modules/@tiptap/extension-blockquote/dist/index.d.ts.map +0 -1
- package/node_modules/@tiptap/extension-blockquote/dist/index.js +0 -126
- package/node_modules/@tiptap/extension-blockquote/dist/index.js.map +0 -1
- package/node_modules/@tiptap/extension-blockquote/package.json +0 -52
- package/node_modules/@tiptap/extension-blockquote/src/blockquote.tsx +0 -143
- package/node_modules/@tiptap/extension-blockquote/src/handleBackspace.test.ts +0 -45
- package/node_modules/@tiptap/extension-blockquote/src/handleBackspace.ts +0 -75
- package/node_modules/@tiptap/extension-blockquote/src/index.ts +0 -5
- package/node_modules/@tiptap/extension-bold/LICENSE.md +0 -21
- package/node_modules/@tiptap/extension-bold/README.md +0 -18
- package/node_modules/@tiptap/extension-bold/dist/index.cjs +0 -117
- package/node_modules/@tiptap/extension-bold/dist/index.cjs.map +0 -1
- package/node_modules/@tiptap/extension-bold/dist/index.d.cts +0 -52
- package/node_modules/@tiptap/extension-bold/dist/index.d.cts.map +0 -1
- package/node_modules/@tiptap/extension-bold/dist/index.d.ts +0 -52
- package/node_modules/@tiptap/extension-bold/dist/index.d.ts.map +0 -1
- package/node_modules/@tiptap/extension-bold/dist/index.js +0 -108
- package/node_modules/@tiptap/extension-bold/dist/index.js.map +0 -1
- package/node_modules/@tiptap/extension-bold/package.json +0 -50
- package/node_modules/@tiptap/extension-bold/src/bold.test.ts +0 -25
- package/node_modules/@tiptap/extension-bold/src/bold.tsx +0 -163
- package/node_modules/@tiptap/extension-bold/src/index.ts +0 -5
- package/node_modules/@tiptap/extension-bubble-menu/LICENSE.md +0 -21
- package/node_modules/@tiptap/extension-bubble-menu/README.md +0 -18
- package/node_modules/@tiptap/extension-bubble-menu/dist/index.cjs +0 -333
- package/node_modules/@tiptap/extension-bubble-menu/dist/index.cjs.map +0 -1
- package/node_modules/@tiptap/extension-bubble-menu/dist/index.d.cts +0 -170
- package/node_modules/@tiptap/extension-bubble-menu/dist/index.d.cts.map +0 -1
- package/node_modules/@tiptap/extension-bubble-menu/dist/index.d.ts +0 -170
- package/node_modules/@tiptap/extension-bubble-menu/dist/index.d.ts.map +0 -1
- package/node_modules/@tiptap/extension-bubble-menu/dist/index.js +0 -326
- package/node_modules/@tiptap/extension-bubble-menu/dist/index.js.map +0 -1
- package/node_modules/@tiptap/extension-bubble-menu/package.json +0 -56
- package/node_modules/@tiptap/extension-bubble-menu/src/bubble-menu-plugin.test.ts +0 -289
- package/node_modules/@tiptap/extension-bubble-menu/src/bubble-menu-plugin.ts +0 -710
- package/node_modules/@tiptap/extension-bubble-menu/src/bubble-menu.ts +0 -50
- package/node_modules/@tiptap/extension-bubble-menu/src/index.ts +0 -6
- package/node_modules/@tiptap/extension-bullet-list/LICENSE.md +0 -21
- package/node_modules/@tiptap/extension-bullet-list/README.md +0 -18
- package/node_modules/@tiptap/extension-bullet-list/dist/index.cjs +0 -17
- package/node_modules/@tiptap/extension-bullet-list/dist/index.cjs.map +0 -1
- package/node_modules/@tiptap/extension-bullet-list/dist/index.d.cts +0 -2
- package/node_modules/@tiptap/extension-bullet-list/dist/index.d.ts +0 -2
- package/node_modules/@tiptap/extension-bullet-list/dist/index.js +0 -7
- package/node_modules/@tiptap/extension-bullet-list/dist/index.js.map +0 -1
- package/node_modules/@tiptap/extension-bullet-list/package.json +0 -50
- package/node_modules/@tiptap/extension-bullet-list/src/index.ts +0 -6
- package/node_modules/@tiptap/extension-code/LICENSE.md +0 -21
- package/node_modules/@tiptap/extension-code/README.md +0 -18
- package/node_modules/@tiptap/extension-code/dist/index.cjs +0 -136
- package/node_modules/@tiptap/extension-code/dist/index.cjs.map +0 -1
- package/node_modules/@tiptap/extension-code/dist/index.d.cts +0 -60
- package/node_modules/@tiptap/extension-code/dist/index.d.cts.map +0 -1
- package/node_modules/@tiptap/extension-code/dist/index.d.ts +0 -60
- package/node_modules/@tiptap/extension-code/dist/index.d.ts.map +0 -1
- package/node_modules/@tiptap/extension-code/dist/index.js +0 -127
- package/node_modules/@tiptap/extension-code/dist/index.js.map +0 -1
- package/node_modules/@tiptap/extension-code/package.json +0 -50
- package/node_modules/@tiptap/extension-code/src/code.test.ts +0 -122
- package/node_modules/@tiptap/extension-code/src/code.ts +0 -200
- package/node_modules/@tiptap/extension-code/src/index.ts +0 -5
- package/node_modules/@tiptap/extension-code-block/LICENSE.md +0 -21
- package/node_modules/@tiptap/extension-code-block/README.md +0 -18
- package/node_modules/@tiptap/extension-code-block/dist/index.cjs +0 -255
- package/node_modules/@tiptap/extension-code-block/dist/index.cjs.map +0 -1
- package/node_modules/@tiptap/extension-code-block/dist/index.d.cts +0 -84
- package/node_modules/@tiptap/extension-code-block/dist/index.d.cts.map +0 -1
- package/node_modules/@tiptap/extension-code-block/dist/index.d.ts +0 -84
- package/node_modules/@tiptap/extension-code-block/dist/index.d.ts.map +0 -1
- package/node_modules/@tiptap/extension-code-block/dist/index.js +0 -248
- package/node_modules/@tiptap/extension-code-block/dist/index.js.map +0 -1
- package/node_modules/@tiptap/extension-code-block/package.json +0 -52
- package/node_modules/@tiptap/extension-code-block/src/code-block.test.ts +0 -97
- package/node_modules/@tiptap/extension-code-block/src/code-block.ts +0 -514
- package/node_modules/@tiptap/extension-code-block/src/index.ts +0 -5
- package/node_modules/@tiptap/extension-document/LICENSE.md +0 -21
- package/node_modules/@tiptap/extension-document/README.md +0 -18
- package/node_modules/@tiptap/extension-document/dist/index.cjs +0 -26
- package/node_modules/@tiptap/extension-document/dist/index.cjs.map +0 -1
- package/node_modules/@tiptap/extension-document/dist/index.d.cts +0 -10
- package/node_modules/@tiptap/extension-document/dist/index.d.cts.map +0 -1
- package/node_modules/@tiptap/extension-document/dist/index.d.ts +0 -10
- package/node_modules/@tiptap/extension-document/dist/index.d.ts.map +0 -1
- package/node_modules/@tiptap/extension-document/dist/index.js +0 -22
- package/node_modules/@tiptap/extension-document/dist/index.js.map +0 -1
- package/node_modules/@tiptap/extension-document/package.json +0 -50
- package/node_modules/@tiptap/extension-document/src/document.ts +0 -19
- package/node_modules/@tiptap/extension-document/src/index.ts +0 -5
- package/node_modules/@tiptap/extension-dropcursor/LICENSE.md +0 -21
- package/node_modules/@tiptap/extension-dropcursor/README.md +0 -18
- package/node_modules/@tiptap/extension-dropcursor/dist/index.cjs +0 -17
- package/node_modules/@tiptap/extension-dropcursor/dist/index.cjs.map +0 -1
- package/node_modules/@tiptap/extension-dropcursor/dist/index.d.cts +0 -2
- package/node_modules/@tiptap/extension-dropcursor/dist/index.d.ts +0 -2
- package/node_modules/@tiptap/extension-dropcursor/dist/index.js +0 -7
- package/node_modules/@tiptap/extension-dropcursor/dist/index.js.map +0 -1
- package/node_modules/@tiptap/extension-dropcursor/package.json +0 -50
- package/node_modules/@tiptap/extension-dropcursor/src/index.ts +0 -6
- package/node_modules/@tiptap/extension-floating-menu/LICENSE.md +0 -21
- package/node_modules/@tiptap/extension-floating-menu/README.md +0 -18
- package/node_modules/@tiptap/extension-floating-menu/dist/index.cjs +0 -272
- package/node_modules/@tiptap/extension-floating-menu/dist/index.cjs.map +0 -1
- package/node_modules/@tiptap/extension-floating-menu/dist/index.d.cts +0 -180
- package/node_modules/@tiptap/extension-floating-menu/dist/index.d.cts.map +0 -1
- package/node_modules/@tiptap/extension-floating-menu/dist/index.d.ts +0 -180
- package/node_modules/@tiptap/extension-floating-menu/dist/index.d.ts.map +0 -1
- package/node_modules/@tiptap/extension-floating-menu/dist/index.js +0 -265
- package/node_modules/@tiptap/extension-floating-menu/dist/index.js.map +0 -1
- package/node_modules/@tiptap/extension-floating-menu/package.json +0 -55
- package/node_modules/@tiptap/extension-floating-menu/src/floating-menu-plugin.test.ts +0 -250
- package/node_modules/@tiptap/extension-floating-menu/src/floating-menu-plugin.ts +0 -580
- package/node_modules/@tiptap/extension-floating-menu/src/floating-menu.ts +0 -77
- package/node_modules/@tiptap/extension-floating-menu/src/index.ts +0 -6
- package/node_modules/@tiptap/extension-gapcursor/LICENSE.md +0 -21
- package/node_modules/@tiptap/extension-gapcursor/README.md +0 -18
- package/node_modules/@tiptap/extension-gapcursor/dist/index.cjs +0 -17
- package/node_modules/@tiptap/extension-gapcursor/dist/index.cjs.map +0 -1
- package/node_modules/@tiptap/extension-gapcursor/dist/index.d.cts +0 -2
- package/node_modules/@tiptap/extension-gapcursor/dist/index.d.ts +0 -2
- package/node_modules/@tiptap/extension-gapcursor/dist/index.js +0 -7
- package/node_modules/@tiptap/extension-gapcursor/dist/index.js.map +0 -1
- package/node_modules/@tiptap/extension-gapcursor/package.json +0 -50
- package/node_modules/@tiptap/extension-gapcursor/src/index.ts +0 -5
- package/node_modules/@tiptap/extension-hard-break/LICENSE.md +0 -21
- package/node_modules/@tiptap/extension-hard-break/README.md +0 -18
- package/node_modules/@tiptap/extension-hard-break/dist/index.cjs +0 -69
- package/node_modules/@tiptap/extension-hard-break/dist/index.cjs.map +0 -1
- package/node_modules/@tiptap/extension-hard-break/dist/index.d.cts +0 -35
- package/node_modules/@tiptap/extension-hard-break/dist/index.d.cts.map +0 -1
- package/node_modules/@tiptap/extension-hard-break/dist/index.d.ts +0 -35
- package/node_modules/@tiptap/extension-hard-break/dist/index.d.ts.map +0 -1
- package/node_modules/@tiptap/extension-hard-break/dist/index.js +0 -64
- package/node_modules/@tiptap/extension-hard-break/dist/index.js.map +0 -1
- package/node_modules/@tiptap/extension-hard-break/package.json +0 -50
- package/node_modules/@tiptap/extension-hard-break/src/hard-break.test.ts +0 -78
- package/node_modules/@tiptap/extension-hard-break/src/hard-break.ts +0 -121
- package/node_modules/@tiptap/extension-hard-break/src/index.ts +0 -5
- package/node_modules/@tiptap/extension-heading/LICENSE.md +0 -21
- package/node_modules/@tiptap/extension-heading/README.md +0 -18
- package/node_modules/@tiptap/extension-heading/dist/index.cjs +0 -93
- package/node_modules/@tiptap/extension-heading/dist/index.cjs.map +0 -1
- package/node_modules/@tiptap/extension-heading/dist/index.d.cts +0 -50
- package/node_modules/@tiptap/extension-heading/dist/index.d.cts.map +0 -1
- package/node_modules/@tiptap/extension-heading/dist/index.d.ts +0 -50
- package/node_modules/@tiptap/extension-heading/dist/index.d.ts.map +0 -1
- package/node_modules/@tiptap/extension-heading/dist/index.js +0 -88
- package/node_modules/@tiptap/extension-heading/dist/index.js.map +0 -1
- package/node_modules/@tiptap/extension-heading/package.json +0 -50
- package/node_modules/@tiptap/extension-heading/src/heading.ts +0 -152
- package/node_modules/@tiptap/extension-heading/src/index.ts +0 -5
- package/node_modules/@tiptap/extension-highlight/LICENSE.md +0 -21
- package/node_modules/@tiptap/extension-highlight/README.md +0 -18
- package/node_modules/@tiptap/extension-highlight/dist/index.cjs +0 -113
- package/node_modules/@tiptap/extension-highlight/dist/index.cjs.map +0 -1
- package/node_modules/@tiptap/extension-highlight/dist/index.d.cts +0 -59
- package/node_modules/@tiptap/extension-highlight/dist/index.d.cts.map +0 -1
- package/node_modules/@tiptap/extension-highlight/dist/index.d.ts +0 -59
- package/node_modules/@tiptap/extension-highlight/dist/index.d.ts.map +0 -1
- package/node_modules/@tiptap/extension-highlight/dist/index.js +0 -106
- package/node_modules/@tiptap/extension-highlight/dist/index.js.map +0 -1
- package/node_modules/@tiptap/extension-highlight/package.json +0 -50
- package/node_modules/@tiptap/extension-highlight/src/highlight.test.ts +0 -44
- package/node_modules/@tiptap/extension-highlight/src/highlight.ts +0 -190
- package/node_modules/@tiptap/extension-highlight/src/index.ts +0 -5
- package/node_modules/@tiptap/extension-horizontal-rule/LICENSE.md +0 -21
- package/node_modules/@tiptap/extension-horizontal-rule/README.md +0 -18
- package/node_modules/@tiptap/extension-horizontal-rule/dist/index.cjs +0 -78
- package/node_modules/@tiptap/extension-horizontal-rule/dist/index.cjs.map +0 -1
- package/node_modules/@tiptap/extension-horizontal-rule/dist/index.d.cts +0 -35
- package/node_modules/@tiptap/extension-horizontal-rule/dist/index.d.cts.map +0 -1
- package/node_modules/@tiptap/extension-horizontal-rule/dist/index.d.ts +0 -35
- package/node_modules/@tiptap/extension-horizontal-rule/dist/index.d.ts.map +0 -1
- package/node_modules/@tiptap/extension-horizontal-rule/dist/index.js +0 -73
- package/node_modules/@tiptap/extension-horizontal-rule/dist/index.js.map +0 -1
- package/node_modules/@tiptap/extension-horizontal-rule/package.json +0 -52
- package/node_modules/@tiptap/extension-horizontal-rule/src/horizontal-rule.test.ts +0 -58
- package/node_modules/@tiptap/extension-horizontal-rule/src/horizontal-rule.ts +0 -136
- package/node_modules/@tiptap/extension-horizontal-rule/src/index.ts +0 -5
- package/node_modules/@tiptap/extension-image/LICENSE.md +0 -21
- package/node_modules/@tiptap/extension-image/README.md +0 -18
- package/node_modules/@tiptap/extension-image/dist/index.cjs +0 -181
- package/node_modules/@tiptap/extension-image/dist/index.cjs.map +0 -1
- package/node_modules/@tiptap/extension-image/dist/index.d.cts +0 -69
- package/node_modules/@tiptap/extension-image/dist/index.d.cts.map +0 -1
- package/node_modules/@tiptap/extension-image/dist/index.d.ts +0 -69
- package/node_modules/@tiptap/extension-image/dist/index.d.ts.map +0 -1
- package/node_modules/@tiptap/extension-image/dist/index.js +0 -175
- package/node_modules/@tiptap/extension-image/dist/index.js.map +0 -1
- package/node_modules/@tiptap/extension-image/package.json +0 -50
- package/node_modules/@tiptap/extension-image/src/image.test.ts +0 -556
- package/node_modules/@tiptap/extension-image/src/image.ts +0 -330
- package/node_modules/@tiptap/extension-image/src/index.ts +0 -5
- package/node_modules/@tiptap/extension-italic/LICENSE.md +0 -21
- package/node_modules/@tiptap/extension-italic/README.md +0 -18
- package/node_modules/@tiptap/extension-italic/dist/index.cjs +0 -113
- package/node_modules/@tiptap/extension-italic/dist/index.cjs.map +0 -1
- package/node_modules/@tiptap/extension-italic/dist/index.d.cts +0 -55
- package/node_modules/@tiptap/extension-italic/dist/index.d.cts.map +0 -1
- package/node_modules/@tiptap/extension-italic/dist/index.d.ts +0 -55
- package/node_modules/@tiptap/extension-italic/dist/index.d.ts.map +0 -1
- package/node_modules/@tiptap/extension-italic/dist/index.js +0 -104
- package/node_modules/@tiptap/extension-italic/dist/index.js.map +0 -1
- package/node_modules/@tiptap/extension-italic/package.json +0 -50
- package/node_modules/@tiptap/extension-italic/src/index.ts +0 -5
- package/node_modules/@tiptap/extension-italic/src/italic.ts +0 -160
- package/node_modules/@tiptap/extension-link/LICENSE.md +0 -21
- package/node_modules/@tiptap/extension-link/README.md +0 -18
- package/node_modules/@tiptap/extension-link/dist/index.cjs +0 -560
- package/node_modules/@tiptap/extension-link/dist/index.cjs.map +0 -1
- package/node_modules/@tiptap/extension-link/dist/index.d.cts +0 -159
- package/node_modules/@tiptap/extension-link/dist/index.d.cts.map +0 -1
- package/node_modules/@tiptap/extension-link/dist/index.d.ts +0 -159
- package/node_modules/@tiptap/extension-link/dist/index.d.ts.map +0 -1
- package/node_modules/@tiptap/extension-link/dist/index.js +0 -553
- package/node_modules/@tiptap/extension-link/dist/index.js.map +0 -1
- package/node_modules/@tiptap/extension-link/package.json +0 -56
- package/node_modules/@tiptap/extension-link/src/helpers/autolink.ts +0 -211
- package/node_modules/@tiptap/extension-link/src/helpers/clickHandler.ts +0 -73
- package/node_modules/@tiptap/extension-link/src/helpers/markdownLink.ts +0 -205
- package/node_modules/@tiptap/extension-link/src/helpers/pasteHandler.ts +0 -53
- package/node_modules/@tiptap/extension-link/src/helpers/unlinkTrailingWhitespace.ts +0 -46
- package/node_modules/@tiptap/extension-link/src/helpers/whitespace.ts +0 -8
- package/node_modules/@tiptap/extension-link/src/index.ts +0 -5
- package/node_modules/@tiptap/extension-link/src/link.ts +0 -555
- package/node_modules/@tiptap/extension-list/LICENSE.md +0 -21
- package/node_modules/@tiptap/extension-list/README.md +0 -18
- package/node_modules/@tiptap/extension-list/dist/bullet-list/index.cjs +0 -84
- package/node_modules/@tiptap/extension-list/dist/bullet-list/index.cjs.map +0 -1
- package/node_modules/@tiptap/extension-list/dist/bullet-list/index.d.cts +0 -52
- package/node_modules/@tiptap/extension-list/dist/bullet-list/index.d.cts.map +0 -1
- package/node_modules/@tiptap/extension-list/dist/bullet-list/index.d.ts +0 -52
- package/node_modules/@tiptap/extension-list/dist/bullet-list/index.d.ts.map +0 -1
- package/node_modules/@tiptap/extension-list/dist/bullet-list/index.js +0 -82
- package/node_modules/@tiptap/extension-list/dist/bullet-list/index.js.map +0 -1
- package/node_modules/@tiptap/extension-list/dist/index.cjs +0 -1570
- package/node_modules/@tiptap/extension-list/dist/index.cjs.map +0 -1
- package/node_modules/@tiptap/extension-list/dist/index.d.cts +0 -391
- package/node_modules/@tiptap/extension-list/dist/index.d.cts.map +0 -1
- package/node_modules/@tiptap/extension-list/dist/index.d.ts +0 -390
- package/node_modules/@tiptap/extension-list/dist/index.d.ts.map +0 -1
- package/node_modules/@tiptap/extension-list/dist/index.js +0 -1533
- package/node_modules/@tiptap/extension-list/dist/index.js.map +0 -1
- package/node_modules/@tiptap/extension-list/dist/item/index.cjs +0 -308
- package/node_modules/@tiptap/extension-list/dist/item/index.cjs.map +0 -1
- package/node_modules/@tiptap/extension-list/dist/item/index.d.cts +0 -30
- package/node_modules/@tiptap/extension-list/dist/item/index.d.cts.map +0 -1
- package/node_modules/@tiptap/extension-list/dist/item/index.d.ts +0 -30
- package/node_modules/@tiptap/extension-list/dist/item/index.d.ts.map +0 -1
- package/node_modules/@tiptap/extension-list/dist/item/index.js +0 -307
- package/node_modules/@tiptap/extension-list/dist/item/index.js.map +0 -1
- package/node_modules/@tiptap/extension-list/dist/keymap/index.cjs +0 -263
- package/node_modules/@tiptap/extension-list/dist/keymap/index.cjs.map +0 -1
- package/node_modules/@tiptap/extension-list/dist/keymap/index.d.cts +0 -66
- package/node_modules/@tiptap/extension-list/dist/keymap/index.d.cts.map +0 -1
- package/node_modules/@tiptap/extension-list/dist/keymap/index.d.ts +0 -65
- package/node_modules/@tiptap/extension-list/dist/keymap/index.d.ts.map +0 -1
- package/node_modules/@tiptap/extension-list/dist/keymap/index.js +0 -245
- package/node_modules/@tiptap/extension-list/dist/keymap/index.js.map +0 -1
- package/node_modules/@tiptap/extension-list/dist/keymap/rolldown-runtime-D7D4PA-g.js +0 -13
- package/node_modules/@tiptap/extension-list/dist/kit/index.cjs +0 -1487
- package/node_modules/@tiptap/extension-list/dist/kit/index.cjs.map +0 -1
- package/node_modules/@tiptap/extension-list/dist/kit/index.d.cts +0 -235
- package/node_modules/@tiptap/extension-list/dist/kit/index.d.cts.map +0 -1
- package/node_modules/@tiptap/extension-list/dist/kit/index.d.ts +0 -235
- package/node_modules/@tiptap/extension-list/dist/kit/index.d.ts.map +0 -1
- package/node_modules/@tiptap/extension-list/dist/kit/index.js +0 -1486
- package/node_modules/@tiptap/extension-list/dist/kit/index.js.map +0 -1
- package/node_modules/@tiptap/extension-list/dist/ordered-list/index.cjs +0 -671
- package/node_modules/@tiptap/extension-list/dist/ordered-list/index.cjs.map +0 -1
- package/node_modules/@tiptap/extension-list/dist/ordered-list/index.d.cts +0 -120
- package/node_modules/@tiptap/extension-list/dist/ordered-list/index.d.cts.map +0 -1
- package/node_modules/@tiptap/extension-list/dist/ordered-list/index.d.ts +0 -120
- package/node_modules/@tiptap/extension-list/dist/ordered-list/index.d.ts.map +0 -1
- package/node_modules/@tiptap/extension-list/dist/ordered-list/index.js +0 -659
- package/node_modules/@tiptap/extension-list/dist/ordered-list/index.js.map +0 -1
- package/node_modules/@tiptap/extension-list/dist/rolldown-runtime-D7D4PA-g.js +0 -13
- package/node_modules/@tiptap/extension-list/dist/task-item/index.cjs +0 -327
- package/node_modules/@tiptap/extension-list/dist/task-item/index.cjs.map +0 -1
- package/node_modules/@tiptap/extension-list/dist/task-item/index.d.cts +0 -69
- package/node_modules/@tiptap/extension-list/dist/task-item/index.d.cts.map +0 -1
- package/node_modules/@tiptap/extension-list/dist/task-item/index.d.ts +0 -69
- package/node_modules/@tiptap/extension-list/dist/task-item/index.d.ts.map +0 -1
- package/node_modules/@tiptap/extension-list/dist/task-item/index.js +0 -325
- package/node_modules/@tiptap/extension-list/dist/task-item/index.js.map +0 -1
- package/node_modules/@tiptap/extension-list/dist/task-list/index.cjs +0 -121
- package/node_modules/@tiptap/extension-list/dist/task-list/index.cjs.map +0 -1
- package/node_modules/@tiptap/extension-list/dist/task-list/index.d.cts +0 -35
- package/node_modules/@tiptap/extension-list/dist/task-list/index.d.cts.map +0 -1
- package/node_modules/@tiptap/extension-list/dist/task-list/index.d.ts +0 -35
- package/node_modules/@tiptap/extension-list/dist/task-list/index.d.ts.map +0 -1
- package/node_modules/@tiptap/extension-list/dist/task-list/index.js +0 -120
- package/node_modules/@tiptap/extension-list/dist/task-list/index.js.map +0 -1
- package/node_modules/@tiptap/extension-list/package.json +0 -108
- package/node_modules/@tiptap/extension-list/src/bullet-list/bullet-list.ts +0 -151
- package/node_modules/@tiptap/extension-list/src/bullet-list/index.ts +0 -1
- package/node_modules/@tiptap/extension-list/src/helpers/createBranchingListDeleteKeymap.ts +0 -24
- package/node_modules/@tiptap/extension-list/src/helpers/getBranchingNestedListAtCursor.ts +0 -116
- package/node_modules/@tiptap/extension-list/src/helpers/handleDeleteBranchingNestedList.ts +0 -25
- package/node_modules/@tiptap/extension-list/src/helpers/hasBranchingNestedListAfterCursor.ts +0 -30
- package/node_modules/@tiptap/extension-list/src/helpers/hoistBranchingNestedList.ts +0 -56
- package/node_modules/@tiptap/extension-list/src/index.ts +0 -7
- package/node_modules/@tiptap/extension-list/src/item/index.ts +0 -1
- package/node_modules/@tiptap/extension-list/src/item/list-item.test.ts +0 -46
- package/node_modules/@tiptap/extension-list/src/item/list-item.ts +0 -206
- package/node_modules/@tiptap/extension-list/src/keymap/index.ts +0 -2
- package/node_modules/@tiptap/extension-list/src/keymap/list-keymap.ts +0 -120
- package/node_modules/@tiptap/extension-list/src/keymap/listHelpers/findListItemPos.ts +0 -30
- package/node_modules/@tiptap/extension-list/src/keymap/listHelpers/getNextListDepth.ts +0 -16
- package/node_modules/@tiptap/extension-list/src/keymap/listHelpers/handleBackspace.ts +0 -70
- package/node_modules/@tiptap/extension-list/src/keymap/listHelpers/handleDelete.ts +0 -44
- package/node_modules/@tiptap/extension-list/src/keymap/listHelpers/handleTab.ts +0 -48
- package/node_modules/@tiptap/extension-list/src/keymap/listHelpers/hasListBefore.ts +0 -19
- package/node_modules/@tiptap/extension-list/src/keymap/listHelpers/hasListItemAfter.ts +0 -17
- package/node_modules/@tiptap/extension-list/src/keymap/listHelpers/hasListItemBefore.ts +0 -17
- package/node_modules/@tiptap/extension-list/src/keymap/listHelpers/index.ts +0 -11
- package/node_modules/@tiptap/extension-list/src/keymap/listHelpers/listItemHasSubList.ts +0 -21
- package/node_modules/@tiptap/extension-list/src/keymap/listHelpers/nextListIsDeeper.ts +0 -19
- package/node_modules/@tiptap/extension-list/src/keymap/listHelpers/nextListIsHigher.ts +0 -19
- package/node_modules/@tiptap/extension-list/src/kit/index.ts +0 -81
- package/node_modules/@tiptap/extension-list/src/ordered-list/collectOrderedListItemsFromSource.ts +0 -58
- package/node_modules/@tiptap/extension-list/src/ordered-list/index.ts +0 -13
- package/node_modules/@tiptap/extension-list/src/ordered-list/ordered-list.ts +0 -360
- package/node_modules/@tiptap/extension-list/src/ordered-list/roman.test.ts +0 -122
- package/node_modules/@tiptap/extension-list/src/ordered-list/roman.ts +0 -295
- package/node_modules/@tiptap/extension-list/src/ordered-list/utils.test.ts +0 -105
- package/node_modules/@tiptap/extension-list/src/ordered-list/utils.ts +0 -399
- package/node_modules/@tiptap/extension-list/src/task-item/index.ts +0 -1
- package/node_modules/@tiptap/extension-list/src/task-item/task-item.test.ts +0 -1394
- package/node_modules/@tiptap/extension-list/src/task-item/task-item.ts +0 -359
- package/node_modules/@tiptap/extension-list/src/task-list/index.ts +0 -1
- package/node_modules/@tiptap/extension-list/src/task-list/task-list.ts +0 -194
- package/node_modules/@tiptap/extension-list-item/LICENSE.md +0 -21
- package/node_modules/@tiptap/extension-list-item/README.md +0 -18
- package/node_modules/@tiptap/extension-list-item/dist/index.cjs +0 -17
- package/node_modules/@tiptap/extension-list-item/dist/index.cjs.map +0 -1
- package/node_modules/@tiptap/extension-list-item/dist/index.d.cts +0 -2
- package/node_modules/@tiptap/extension-list-item/dist/index.d.ts +0 -2
- package/node_modules/@tiptap/extension-list-item/dist/index.js +0 -7
- package/node_modules/@tiptap/extension-list-item/dist/index.js.map +0 -1
- package/node_modules/@tiptap/extension-list-item/package.json +0 -50
- package/node_modules/@tiptap/extension-list-item/src/index.ts +0 -6
- package/node_modules/@tiptap/extension-list-keymap/LICENSE.md +0 -21
- package/node_modules/@tiptap/extension-list-keymap/README.md +0 -18
- package/node_modules/@tiptap/extension-list-keymap/dist/index.cjs +0 -23
- package/node_modules/@tiptap/extension-list-keymap/dist/index.cjs.map +0 -1
- package/node_modules/@tiptap/extension-list-keymap/dist/index.d.cts +0 -2
- package/node_modules/@tiptap/extension-list-keymap/dist/index.d.ts +0 -2
- package/node_modules/@tiptap/extension-list-keymap/dist/index.js +0 -7
- package/node_modules/@tiptap/extension-list-keymap/dist/index.js.map +0 -1
- package/node_modules/@tiptap/extension-list-keymap/package.json +0 -50
- package/node_modules/@tiptap/extension-list-keymap/src/index.ts +0 -6
- package/node_modules/@tiptap/extension-ordered-list/LICENSE.md +0 -21
- package/node_modules/@tiptap/extension-ordered-list/README.md +0 -18
- package/node_modules/@tiptap/extension-ordered-list/dist/index.cjs +0 -17
- package/node_modules/@tiptap/extension-ordered-list/dist/index.cjs.map +0 -1
- package/node_modules/@tiptap/extension-ordered-list/dist/index.d.cts +0 -2
- package/node_modules/@tiptap/extension-ordered-list/dist/index.d.ts +0 -2
- package/node_modules/@tiptap/extension-ordered-list/dist/index.js +0 -7
- package/node_modules/@tiptap/extension-ordered-list/dist/index.js.map +0 -1
- package/node_modules/@tiptap/extension-ordered-list/package.json +0 -50
- package/node_modules/@tiptap/extension-ordered-list/src/index.ts +0 -6
- package/node_modules/@tiptap/extension-paragraph/LICENSE.md +0 -21
- package/node_modules/@tiptap/extension-paragraph/README.md +0 -18
- package/node_modules/@tiptap/extension-paragraph/dist/index.cjs +0 -73
- package/node_modules/@tiptap/extension-paragraph/dist/index.cjs.map +0 -1
- package/node_modules/@tiptap/extension-paragraph/dist/index.d.cts +0 -29
- package/node_modules/@tiptap/extension-paragraph/dist/index.d.cts.map +0 -1
- package/node_modules/@tiptap/extension-paragraph/dist/index.d.ts +0 -29
- package/node_modules/@tiptap/extension-paragraph/dist/index.d.ts.map +0 -1
- package/node_modules/@tiptap/extension-paragraph/dist/index.js +0 -68
- package/node_modules/@tiptap/extension-paragraph/dist/index.js.map +0 -1
- package/node_modules/@tiptap/extension-paragraph/package.json +0 -50
- package/node_modules/@tiptap/extension-paragraph/src/index.ts +0 -5
- package/node_modules/@tiptap/extension-paragraph/src/paragraph.ts +0 -139
- package/node_modules/@tiptap/extension-strike/LICENSE.md +0 -21
- package/node_modules/@tiptap/extension-strike/README.md +0 -18
- package/node_modules/@tiptap/extension-strike/dist/index.cjs +0 -88
- package/node_modules/@tiptap/extension-strike/dist/index.cjs.map +0 -1
- package/node_modules/@tiptap/extension-strike/dist/index.d.cts +0 -47
- package/node_modules/@tiptap/extension-strike/dist/index.d.cts.map +0 -1
- package/node_modules/@tiptap/extension-strike/dist/index.d.ts +0 -47
- package/node_modules/@tiptap/extension-strike/dist/index.d.ts.map +0 -1
- package/node_modules/@tiptap/extension-strike/dist/index.js +0 -81
- package/node_modules/@tiptap/extension-strike/dist/index.js.map +0 -1
- package/node_modules/@tiptap/extension-strike/package.json +0 -50
- package/node_modules/@tiptap/extension-strike/src/index.ts +0 -5
- package/node_modules/@tiptap/extension-strike/src/strike.ts +0 -134
- package/node_modules/@tiptap/extension-subscript/LICENSE.md +0 -21
- package/node_modules/@tiptap/extension-subscript/README.md +0 -18
- package/node_modules/@tiptap/extension-subscript/dist/index.cjs +0 -56
- package/node_modules/@tiptap/extension-subscript/dist/index.cjs.map +0 -1
- package/node_modules/@tiptap/extension-subscript/dist/index.d.cts +0 -39
- package/node_modules/@tiptap/extension-subscript/dist/index.d.cts.map +0 -1
- package/node_modules/@tiptap/extension-subscript/dist/index.d.ts +0 -39
- package/node_modules/@tiptap/extension-subscript/dist/index.d.ts.map +0 -1
- package/node_modules/@tiptap/extension-subscript/dist/index.js +0 -51
- package/node_modules/@tiptap/extension-subscript/dist/index.js.map +0 -1
- package/node_modules/@tiptap/extension-subscript/package.json +0 -52
- package/node_modules/@tiptap/extension-subscript/src/index.ts +0 -5
- package/node_modules/@tiptap/extension-subscript/src/subscript.test.ts +0 -48
- package/node_modules/@tiptap/extension-subscript/src/subscript.ts +0 -97
- package/node_modules/@tiptap/extension-superscript/LICENSE.md +0 -21
- package/node_modules/@tiptap/extension-superscript/README.md +0 -18
- package/node_modules/@tiptap/extension-superscript/dist/index.cjs +0 -56
- package/node_modules/@tiptap/extension-superscript/dist/index.cjs.map +0 -1
- package/node_modules/@tiptap/extension-superscript/dist/index.d.cts +0 -39
- package/node_modules/@tiptap/extension-superscript/dist/index.d.cts.map +0 -1
- package/node_modules/@tiptap/extension-superscript/dist/index.d.ts +0 -39
- package/node_modules/@tiptap/extension-superscript/dist/index.d.ts.map +0 -1
- package/node_modules/@tiptap/extension-superscript/dist/index.js +0 -51
- package/node_modules/@tiptap/extension-superscript/dist/index.js.map +0 -1
- package/node_modules/@tiptap/extension-superscript/package.json +0 -52
- package/node_modules/@tiptap/extension-superscript/src/index.ts +0 -5
- package/node_modules/@tiptap/extension-superscript/src/superscript.test.ts +0 -48
- package/node_modules/@tiptap/extension-superscript/src/superscript.ts +0 -97
- package/node_modules/@tiptap/extension-table/LICENSE.md +0 -21
- package/node_modules/@tiptap/extension-table/README.md +0 -18
- package/node_modules/@tiptap/extension-table/dist/cell/index.cjs +0 -142
- package/node_modules/@tiptap/extension-table/dist/cell/index.cjs.map +0 -1
- package/node_modules/@tiptap/extension-table/dist/cell/index.d.cts +0 -35
- package/node_modules/@tiptap/extension-table/dist/cell/index.d.cts.map +0 -1
- package/node_modules/@tiptap/extension-table/dist/cell/index.d.ts +0 -35
- package/node_modules/@tiptap/extension-table/dist/cell/index.d.ts.map +0 -1
- package/node_modules/@tiptap/extension-table/dist/cell/index.js +0 -141
- package/node_modules/@tiptap/extension-table/dist/cell/index.js.map +0 -1
- package/node_modules/@tiptap/extension-table/dist/header/index.cjs +0 -142
- package/node_modules/@tiptap/extension-table/dist/header/index.cjs.map +0 -1
- package/node_modules/@tiptap/extension-table/dist/header/index.d.cts +0 -35
- package/node_modules/@tiptap/extension-table/dist/header/index.d.cts.map +0 -1
- package/node_modules/@tiptap/extension-table/dist/header/index.d.ts +0 -35
- package/node_modules/@tiptap/extension-table/dist/header/index.d.ts.map +0 -1
- package/node_modules/@tiptap/extension-table/dist/header/index.js +0 -141
- package/node_modules/@tiptap/extension-table/dist/header/index.js.map +0 -1
- package/node_modules/@tiptap/extension-table/dist/index.cjs +0 -832
- package/node_modules/@tiptap/extension-table/dist/index.cjs.map +0 -1
- package/node_modules/@tiptap/extension-table/dist/index.d.cts +0 -344
- package/node_modules/@tiptap/extension-table/dist/index.d.cts.map +0 -1
- package/node_modules/@tiptap/extension-table/dist/index.d.ts +0 -344
- package/node_modules/@tiptap/extension-table/dist/index.d.ts.map +0 -1
- package/node_modules/@tiptap/extension-table/dist/index.js +0 -819
- package/node_modules/@tiptap/extension-table/dist/index.js.map +0 -1
- package/node_modules/@tiptap/extension-table/dist/kit/index.cjs +0 -817
- package/node_modules/@tiptap/extension-table/dist/kit/index.cjs.map +0 -1
- package/node_modules/@tiptap/extension-table/dist/kit/index.d.cts +0 -265
- package/node_modules/@tiptap/extension-table/dist/kit/index.d.cts.map +0 -1
- package/node_modules/@tiptap/extension-table/dist/kit/index.d.ts +0 -265
- package/node_modules/@tiptap/extension-table/dist/kit/index.d.ts.map +0 -1
- package/node_modules/@tiptap/extension-table/dist/kit/index.js +0 -816
- package/node_modules/@tiptap/extension-table/dist/kit/index.js.map +0 -1
- package/node_modules/@tiptap/extension-table/dist/row/index.cjs +0 -29
- package/node_modules/@tiptap/extension-table/dist/row/index.cjs.map +0 -1
- package/node_modules/@tiptap/extension-table/dist/row/index.d.cts +0 -35
- package/node_modules/@tiptap/extension-table/dist/row/index.d.cts.map +0 -1
- package/node_modules/@tiptap/extension-table/dist/row/index.d.ts +0 -35
- package/node_modules/@tiptap/extension-table/dist/row/index.d.ts.map +0 -1
- package/node_modules/@tiptap/extension-table/dist/row/index.js +0 -28
- package/node_modules/@tiptap/extension-table/dist/row/index.js.map +0 -1
- package/node_modules/@tiptap/extension-table/dist/table/index.cjs +0 -616
- package/node_modules/@tiptap/extension-table/dist/table/index.cjs.map +0 -1
- package/node_modules/@tiptap/extension-table/dist/table/index.d.cts +0 -254
- package/node_modules/@tiptap/extension-table/dist/table/index.d.cts.map +0 -1
- package/node_modules/@tiptap/extension-table/dist/table/index.d.ts +0 -254
- package/node_modules/@tiptap/extension-table/dist/table/index.d.ts.map +0 -1
- package/node_modules/@tiptap/extension-table/dist/table/index.js +0 -609
- package/node_modules/@tiptap/extension-table/dist/table/index.js.map +0 -1
- package/node_modules/@tiptap/extension-table/package.json +0 -92
- package/node_modules/@tiptap/extension-table/src/cell/index.ts +0 -1
- package/node_modules/@tiptap/extension-table/src/cell/table-cell.test.ts +0 -220
- package/node_modules/@tiptap/extension-table/src/cell/table-cell.ts +0 -74
- package/node_modules/@tiptap/extension-table/src/header/index.ts +0 -1
- package/node_modules/@tiptap/extension-table/src/header/table-header.test.ts +0 -193
- package/node_modules/@tiptap/extension-table/src/header/table-header.ts +0 -74
- package/node_modules/@tiptap/extension-table/src/index.ts +0 -6
- package/node_modules/@tiptap/extension-table/src/kit/index.ts +0 -64
- package/node_modules/@tiptap/extension-table/src/row/index.ts +0 -1
- package/node_modules/@tiptap/extension-table/src/row/table-row.ts +0 -38
- package/node_modules/@tiptap/extension-table/src/table/TableView.ts +0 -154
- package/node_modules/@tiptap/extension-table/src/table/index.ts +0 -4
- package/node_modules/@tiptap/extension-table/src/table/table.test.ts +0 -76
- package/node_modules/@tiptap/extension-table/src/table/table.ts +0 -648
- package/node_modules/@tiptap/extension-table/src/table/utilities/colStyle.ts +0 -12
- package/node_modules/@tiptap/extension-table/src/table/utilities/createCell.ts +0 -12
- package/node_modules/@tiptap/extension-table/src/table/utilities/createColGroup.ts +0 -69
- package/node_modules/@tiptap/extension-table/src/table/utilities/createTable.ts +0 -40
- package/node_modules/@tiptap/extension-table/src/table/utilities/deleteTableWhenAllCellsSelected.ts +0 -37
- package/node_modules/@tiptap/extension-table/src/table/utilities/getTableNodeTypes.ts +0 -21
- package/node_modules/@tiptap/extension-table/src/table/utilities/isCellSelection.ts +0 -5
- package/node_modules/@tiptap/extension-table/src/table/utilities/keepCursorInTable.ts +0 -29
- package/node_modules/@tiptap/extension-table/src/table/utilities/markdown.test.ts +0 -123
- package/node_modules/@tiptap/extension-table/src/table/utilities/markdown.ts +0 -233
- package/node_modules/@tiptap/extension-table/src/table/utilities/preserveCellSelectionOnContextMenu.test.ts +0 -166
- package/node_modules/@tiptap/extension-table/src/table/utilities/preserveCellSelectionOnContextMenu.ts +0 -69
- package/node_modules/@tiptap/extension-table/src/types.ts +0 -19
- package/node_modules/@tiptap/extension-table/src/utils/fillEmptyCellContent.ts +0 -25
- package/node_modules/@tiptap/extension-table/src/utils/omitDefaultSpanAttribute.ts +0 -15
- package/node_modules/@tiptap/extension-table/src/utils/parseAlign.ts +0 -80
- package/node_modules/@tiptap/extension-table/src/utils/parseColwidth.ts +0 -37
- package/node_modules/@tiptap/extension-text/LICENSE.md +0 -21
- package/node_modules/@tiptap/extension-text/README.md +0 -18
- package/node_modules/@tiptap/extension-text/dist/index.cjs +0 -28
- package/node_modules/@tiptap/extension-text/dist/index.cjs.map +0 -1
- package/node_modules/@tiptap/extension-text/dist/index.d.cts +0 -10
- package/node_modules/@tiptap/extension-text/dist/index.d.cts.map +0 -1
- package/node_modules/@tiptap/extension-text/dist/index.d.ts +0 -10
- package/node_modules/@tiptap/extension-text/dist/index.d.ts.map +0 -1
- package/node_modules/@tiptap/extension-text/dist/index.js +0 -24
- package/node_modules/@tiptap/extension-text/dist/index.js.map +0 -1
- package/node_modules/@tiptap/extension-text/package.json +0 -50
- package/node_modules/@tiptap/extension-text/src/index.ts +0 -5
- package/node_modules/@tiptap/extension-text/src/text.ts +0 -20
- package/node_modules/@tiptap/extension-text-align/LICENSE.md +0 -21
- package/node_modules/@tiptap/extension-text-align/README.md +0 -18
- package/node_modules/@tiptap/extension-text-align/dist/index.cjs +0 -73
- package/node_modules/@tiptap/extension-text-align/dist/index.cjs.map +0 -1
- package/node_modules/@tiptap/extension-text-align/dist/index.d.cts +0 -53
- package/node_modules/@tiptap/extension-text-align/dist/index.d.cts.map +0 -1
- package/node_modules/@tiptap/extension-text-align/dist/index.d.ts +0 -53
- package/node_modules/@tiptap/extension-text-align/dist/index.d.ts.map +0 -1
- package/node_modules/@tiptap/extension-text-align/dist/index.js +0 -68
- package/node_modules/@tiptap/extension-text-align/dist/index.js.map +0 -1
- package/node_modules/@tiptap/extension-text-align/package.json +0 -50
- package/node_modules/@tiptap/extension-text-align/src/index.ts +0 -5
- package/node_modules/@tiptap/extension-text-align/src/text-align.test.ts +0 -41
- package/node_modules/@tiptap/extension-text-align/src/text-align.ts +0 -140
- package/node_modules/@tiptap/extension-text-style/LICENSE.md +0 -21
- package/node_modules/@tiptap/extension-text-style/README.md +0 -18
- package/node_modules/@tiptap/extension-text-style/dist/background-color/index.cjs +0 -121
- package/node_modules/@tiptap/extension-text-style/dist/background-color/index.cjs.map +0 -1
- package/node_modules/@tiptap/extension-text-style/dist/background-color/index.d.cts +0 -161
- package/node_modules/@tiptap/extension-text-style/dist/background-color/index.d.cts.map +0 -1
- package/node_modules/@tiptap/extension-text-style/dist/background-color/index.d.ts +0 -161
- package/node_modules/@tiptap/extension-text-style/dist/background-color/index.d.ts.map +0 -1
- package/node_modules/@tiptap/extension-text-style/dist/background-color/index.js +0 -116
- package/node_modules/@tiptap/extension-text-style/dist/background-color/index.js.map +0 -1
- package/node_modules/@tiptap/extension-text-style/dist/color/index.cjs +0 -121
- package/node_modules/@tiptap/extension-text-style/dist/color/index.cjs.map +0 -1
- package/node_modules/@tiptap/extension-text-style/dist/color/index.d.cts +0 -161
- package/node_modules/@tiptap/extension-text-style/dist/color/index.d.cts.map +0 -1
- package/node_modules/@tiptap/extension-text-style/dist/color/index.d.ts +0 -161
- package/node_modules/@tiptap/extension-text-style/dist/color/index.d.ts.map +0 -1
- package/node_modules/@tiptap/extension-text-style/dist/color/index.js +0 -116
- package/node_modules/@tiptap/extension-text-style/dist/color/index.js.map +0 -1
- package/node_modules/@tiptap/extension-text-style/dist/font-family/index.cjs +0 -120
- package/node_modules/@tiptap/extension-text-style/dist/font-family/index.cjs.map +0 -1
- package/node_modules/@tiptap/extension-text-style/dist/font-family/index.d.cts +0 -161
- package/node_modules/@tiptap/extension-text-style/dist/font-family/index.d.cts.map +0 -1
- package/node_modules/@tiptap/extension-text-style/dist/font-family/index.d.ts +0 -161
- package/node_modules/@tiptap/extension-text-style/dist/font-family/index.d.ts.map +0 -1
- package/node_modules/@tiptap/extension-text-style/dist/font-family/index.js +0 -115
- package/node_modules/@tiptap/extension-text-style/dist/font-family/index.js.map +0 -1
- package/node_modules/@tiptap/extension-text-style/dist/font-size/index.cjs +0 -120
- package/node_modules/@tiptap/extension-text-style/dist/font-size/index.cjs.map +0 -1
- package/node_modules/@tiptap/extension-text-style/dist/font-size/index.d.cts +0 -161
- package/node_modules/@tiptap/extension-text-style/dist/font-size/index.d.cts.map +0 -1
- package/node_modules/@tiptap/extension-text-style/dist/font-size/index.d.ts +0 -161
- package/node_modules/@tiptap/extension-text-style/dist/font-size/index.d.ts.map +0 -1
- package/node_modules/@tiptap/extension-text-style/dist/font-size/index.js +0 -115
- package/node_modules/@tiptap/extension-text-style/dist/font-size/index.js.map +0 -1
- package/node_modules/@tiptap/extension-text-style/dist/index.cjs +0 -298
- package/node_modules/@tiptap/extension-text-style/dist/index.cjs.map +0 -1
- package/node_modules/@tiptap/extension-text-style/dist/index.d.cts +0 -275
- package/node_modules/@tiptap/extension-text-style/dist/index.d.cts.map +0 -1
- package/node_modules/@tiptap/extension-text-style/dist/index.d.ts +0 -275
- package/node_modules/@tiptap/extension-text-style/dist/index.d.ts.map +0 -1
- package/node_modules/@tiptap/extension-text-style/dist/index.js +0 -291
- package/node_modules/@tiptap/extension-text-style/dist/index.js.map +0 -1
- package/node_modules/@tiptap/extension-text-style/dist/line-height/index.cjs +0 -120
- package/node_modules/@tiptap/extension-text-style/dist/line-height/index.cjs.map +0 -1
- package/node_modules/@tiptap/extension-text-style/dist/line-height/index.d.cts +0 -161
- package/node_modules/@tiptap/extension-text-style/dist/line-height/index.d.cts.map +0 -1
- package/node_modules/@tiptap/extension-text-style/dist/line-height/index.d.ts +0 -161
- package/node_modules/@tiptap/extension-text-style/dist/line-height/index.d.ts.map +0 -1
- package/node_modules/@tiptap/extension-text-style/dist/line-height/index.js +0 -115
- package/node_modules/@tiptap/extension-text-style/dist/line-height/index.js.map +0 -1
- package/node_modules/@tiptap/extension-text-style/dist/text-style/index.cjs +0 -80
- package/node_modules/@tiptap/extension-text-style/dist/text-style/index.cjs.map +0 -1
- package/node_modules/@tiptap/extension-text-style/dist/text-style/index.d.cts +0 -170
- package/node_modules/@tiptap/extension-text-style/dist/text-style/index.d.cts.map +0 -1
- package/node_modules/@tiptap/extension-text-style/dist/text-style/index.d.ts +0 -170
- package/node_modules/@tiptap/extension-text-style/dist/text-style/index.d.ts.map +0 -1
- package/node_modules/@tiptap/extension-text-style/dist/text-style/index.js +0 -79
- package/node_modules/@tiptap/extension-text-style/dist/text-style/index.js.map +0 -1
- package/node_modules/@tiptap/extension-text-style/dist/text-style-kit/index.cjs +0 -292
- package/node_modules/@tiptap/extension-text-style/dist/text-style-kit/index.cjs.map +0 -1
- package/node_modules/@tiptap/extension-text-style/dist/text-style-kit/index.d.cts +0 -244
- package/node_modules/@tiptap/extension-text-style/dist/text-style-kit/index.d.cts.map +0 -1
- package/node_modules/@tiptap/extension-text-style/dist/text-style-kit/index.d.ts +0 -244
- package/node_modules/@tiptap/extension-text-style/dist/text-style-kit/index.d.ts.map +0 -1
- package/node_modules/@tiptap/extension-text-style/dist/text-style-kit/index.js +0 -291
- package/node_modules/@tiptap/extension-text-style/dist/text-style-kit/index.js.map +0 -1
- package/node_modules/@tiptap/extension-text-style/package.json +0 -106
- package/node_modules/@tiptap/extension-text-style/src/background-color/background-color.test.ts +0 -35
- package/node_modules/@tiptap/extension-text-style/src/background-color/background-color.ts +0 -100
- package/node_modules/@tiptap/extension-text-style/src/background-color/index.ts +0 -5
- package/node_modules/@tiptap/extension-text-style/src/color/color.test.ts +0 -35
- package/node_modules/@tiptap/extension-text-style/src/color/color.ts +0 -96
- package/node_modules/@tiptap/extension-text-style/src/color/index.ts +0 -5
- package/node_modules/@tiptap/extension-text-style/src/font-family/font-family.test.ts +0 -89
- package/node_modules/@tiptap/extension-text-style/src/font-family/font-family.ts +0 -94
- package/node_modules/@tiptap/extension-text-style/src/font-family/index.ts +0 -5
- package/node_modules/@tiptap/extension-text-style/src/font-size/font-size.test.ts +0 -35
- package/node_modules/@tiptap/extension-text-style/src/font-size/font-size.ts +0 -92
- package/node_modules/@tiptap/extension-text-style/src/font-size/index.ts +0 -5
- package/node_modules/@tiptap/extension-text-style/src/index.ts +0 -14
- package/node_modules/@tiptap/extension-text-style/src/line-height/index.ts +0 -5
- package/node_modules/@tiptap/extension-text-style/src/line-height/line-height.test.ts +0 -35
- package/node_modules/@tiptap/extension-text-style/src/line-height/line-height.ts +0 -93
- package/node_modules/@tiptap/extension-text-style/src/text-style/index.ts +0 -168
- package/node_modules/@tiptap/extension-text-style/src/text-style-kit/index.ts +0 -86
- package/node_modules/@tiptap/extension-underline/LICENSE.md +0 -21
- package/node_modules/@tiptap/extension-underline/README.md +0 -18
- package/node_modules/@tiptap/extension-underline/dist/index.cjs +0 -81
- package/node_modules/@tiptap/extension-underline/dist/index.cjs.map +0 -1
- package/node_modules/@tiptap/extension-underline/dist/index.d.cts +0 -39
- package/node_modules/@tiptap/extension-underline/dist/index.d.cts.map +0 -1
- package/node_modules/@tiptap/extension-underline/dist/index.d.ts +0 -39
- package/node_modules/@tiptap/extension-underline/dist/index.d.ts.map +0 -1
- package/node_modules/@tiptap/extension-underline/dist/index.js +0 -76
- package/node_modules/@tiptap/extension-underline/dist/index.js.map +0 -1
- package/node_modules/@tiptap/extension-underline/package.json +0 -50
- package/node_modules/@tiptap/extension-underline/src/index.ts +0 -5
- package/node_modules/@tiptap/extension-underline/src/underline.ts +0 -123
- package/node_modules/@tiptap/extension-youtube/LICENSE.md +0 -21
- package/node_modules/@tiptap/extension-youtube/README.md +0 -18
- package/node_modules/@tiptap/extension-youtube/dist/index.cjs +0 -254
- package/node_modules/@tiptap/extension-youtube/dist/index.cjs.map +0 -1
- package/node_modules/@tiptap/extension-youtube/dist/index.d.cts +0 -204
- package/node_modules/@tiptap/extension-youtube/dist/index.d.cts.map +0 -1
- package/node_modules/@tiptap/extension-youtube/dist/index.d.ts +0 -204
- package/node_modules/@tiptap/extension-youtube/dist/index.d.ts.map +0 -1
- package/node_modules/@tiptap/extension-youtube/dist/index.js +0 -246
- package/node_modules/@tiptap/extension-youtube/dist/index.js.map +0 -1
- package/node_modules/@tiptap/extension-youtube/package.json +0 -50
- package/node_modules/@tiptap/extension-youtube/src/index.ts +0 -5
- package/node_modules/@tiptap/extension-youtube/src/utils.test.ts +0 -163
- package/node_modules/@tiptap/extension-youtube/src/utils.ts +0 -234
- package/node_modules/@tiptap/extension-youtube/src/youtube.ts +0 -399
- package/node_modules/@tiptap/extensions/LICENSE.md +0 -21
- package/node_modules/@tiptap/extensions/README.md +0 -18
- package/node_modules/@tiptap/extensions/dist/character-count/index.cjs +0 -87
- package/node_modules/@tiptap/extensions/dist/character-count/index.cjs.map +0 -1
- package/node_modules/@tiptap/extensions/dist/character-count/index.d.cts +0 -70
- package/node_modules/@tiptap/extensions/dist/character-count/index.d.cts.map +0 -1
- package/node_modules/@tiptap/extensions/dist/character-count/index.d.ts +0 -70
- package/node_modules/@tiptap/extensions/dist/character-count/index.d.ts.map +0 -1
- package/node_modules/@tiptap/extensions/dist/character-count/index.js +0 -86
- package/node_modules/@tiptap/extensions/dist/character-count/index.js.map +0 -1
- package/node_modules/@tiptap/extensions/dist/drop-cursor/index.cjs +0 -27
- package/node_modules/@tiptap/extensions/dist/drop-cursor/index.cjs.map +0 -1
- package/node_modules/@tiptap/extensions/dist/drop-cursor/index.d.cts +0 -32
- package/node_modules/@tiptap/extensions/dist/drop-cursor/index.d.cts.map +0 -1
- package/node_modules/@tiptap/extensions/dist/drop-cursor/index.d.ts +0 -32
- package/node_modules/@tiptap/extensions/dist/drop-cursor/index.d.ts.map +0 -1
- package/node_modules/@tiptap/extensions/dist/drop-cursor/index.js +0 -26
- package/node_modules/@tiptap/extensions/dist/drop-cursor/index.js.map +0 -1
- package/node_modules/@tiptap/extensions/dist/focus/index.cjs +0 -48
- package/node_modules/@tiptap/extensions/dist/focus/index.cjs.map +0 -1
- package/node_modules/@tiptap/extensions/dist/focus/index.d.cts +0 -29
- package/node_modules/@tiptap/extensions/dist/focus/index.d.cts.map +0 -1
- package/node_modules/@tiptap/extensions/dist/focus/index.d.ts +0 -29
- package/node_modules/@tiptap/extensions/dist/focus/index.d.ts.map +0 -1
- package/node_modules/@tiptap/extensions/dist/focus/index.js +0 -47
- package/node_modules/@tiptap/extensions/dist/focus/index.js.map +0 -1
- package/node_modules/@tiptap/extensions/dist/gap-cursor/index.cjs +0 -29
- package/node_modules/@tiptap/extensions/dist/gap-cursor/index.cjs.map +0 -1
- package/node_modules/@tiptap/extensions/dist/gap-cursor/index.d.cts +0 -26
- package/node_modules/@tiptap/extensions/dist/gap-cursor/index.d.cts.map +0 -1
- package/node_modules/@tiptap/extensions/dist/gap-cursor/index.d.ts +0 -26
- package/node_modules/@tiptap/extensions/dist/gap-cursor/index.d.ts.map +0 -1
- package/node_modules/@tiptap/extensions/dist/gap-cursor/index.js +0 -28
- package/node_modules/@tiptap/extensions/dist/gap-cursor/index.js.map +0 -1
- package/node_modules/@tiptap/extensions/dist/index.cjs +0 -711
- package/node_modules/@tiptap/extensions/dist/index.cjs.map +0 -1
- package/node_modules/@tiptap/extensions/dist/index.d.cts +0 -321
- package/node_modules/@tiptap/extensions/dist/index.d.cts.map +0 -1
- package/node_modules/@tiptap/extensions/dist/index.d.ts +0 -321
- package/node_modules/@tiptap/extensions/dist/index.d.ts.map +0 -1
- package/node_modules/@tiptap/extensions/dist/index.js +0 -699
- package/node_modules/@tiptap/extensions/dist/index.js.map +0 -1
- package/node_modules/@tiptap/extensions/dist/placeholder/index.cjs +0 -372
- package/node_modules/@tiptap/extensions/dist/placeholder/index.cjs.map +0 -1
- package/node_modules/@tiptap/extensions/dist/placeholder/index.d.cts +0 -91
- package/node_modules/@tiptap/extensions/dist/placeholder/index.d.cts.map +0 -1
- package/node_modules/@tiptap/extensions/dist/placeholder/index.d.ts +0 -91
- package/node_modules/@tiptap/extensions/dist/placeholder/index.d.ts.map +0 -1
- package/node_modules/@tiptap/extensions/dist/placeholder/index.js +0 -368
- package/node_modules/@tiptap/extensions/dist/placeholder/index.js.map +0 -1
- package/node_modules/@tiptap/extensions/dist/selection/index.cjs +0 -72
- package/node_modules/@tiptap/extensions/dist/selection/index.cjs.map +0 -1
- package/node_modules/@tiptap/extensions/dist/selection/index.d.cts +0 -20
- package/node_modules/@tiptap/extensions/dist/selection/index.d.cts.map +0 -1
- package/node_modules/@tiptap/extensions/dist/selection/index.d.ts +0 -20
- package/node_modules/@tiptap/extensions/dist/selection/index.d.ts.map +0 -1
- package/node_modules/@tiptap/extensions/dist/selection/index.js +0 -71
- package/node_modules/@tiptap/extensions/dist/selection/index.js.map +0 -1
- package/node_modules/@tiptap/extensions/dist/trailing-node/index.cjs +0 -62
- package/node_modules/@tiptap/extensions/dist/trailing-node/index.cjs.map +0 -1
- package/node_modules/@tiptap/extensions/dist/trailing-node/index.d.cts +0 -30
- package/node_modules/@tiptap/extensions/dist/trailing-node/index.d.cts.map +0 -1
- package/node_modules/@tiptap/extensions/dist/trailing-node/index.d.ts +0 -30
- package/node_modules/@tiptap/extensions/dist/trailing-node/index.d.ts.map +0 -1
- package/node_modules/@tiptap/extensions/dist/trailing-node/index.js +0 -60
- package/node_modules/@tiptap/extensions/dist/trailing-node/index.js.map +0 -1
- package/node_modules/@tiptap/extensions/dist/undo-redo/index.cjs +0 -48
- package/node_modules/@tiptap/extensions/dist/undo-redo/index.cjs.map +0 -1
- package/node_modules/@tiptap/extensions/dist/undo-redo/index.d.cts +0 -45
- package/node_modules/@tiptap/extensions/dist/undo-redo/index.d.cts.map +0 -1
- package/node_modules/@tiptap/extensions/dist/undo-redo/index.d.ts +0 -45
- package/node_modules/@tiptap/extensions/dist/undo-redo/index.d.ts.map +0 -1
- package/node_modules/@tiptap/extensions/dist/undo-redo/index.js +0 -47
- package/node_modules/@tiptap/extensions/dist/undo-redo/index.js.map +0 -1
- package/node_modules/@tiptap/extensions/package.json +0 -116
- package/node_modules/@tiptap/extensions/src/character-count/character-count.ts +0 -203
- package/node_modules/@tiptap/extensions/src/character-count/index.ts +0 -1
- package/node_modules/@tiptap/extensions/src/drop-cursor/drop-cursor.ts +0 -47
- package/node_modules/@tiptap/extensions/src/drop-cursor/index.ts +0 -1
- package/node_modules/@tiptap/extensions/src/focus/focus.ts +0 -110
- package/node_modules/@tiptap/extensions/src/focus/index.ts +0 -1
- package/node_modules/@tiptap/extensions/src/gap-cursor/gap-cursor.ts +0 -47
- package/node_modules/@tiptap/extensions/src/gap-cursor/index.ts +0 -1
- package/node_modules/@tiptap/extensions/src/index.ts +0 -8
- package/node_modules/@tiptap/extensions/src/placeholder/constants.ts +0 -8
- package/node_modules/@tiptap/extensions/src/placeholder/index.ts +0 -4
- package/node_modules/@tiptap/extensions/src/placeholder/placeholder.ts +0 -30
- package/node_modules/@tiptap/extensions/src/placeholder/plugins/PlaceholderPlugin.ts +0 -49
- package/node_modules/@tiptap/extensions/src/placeholder/types.ts +0 -74
- package/node_modules/@tiptap/extensions/src/placeholder/utils/buildPlaceholderDecorations.ts +0 -164
- package/node_modules/@tiptap/extensions/src/placeholder/utils/createPlaceholderDecoration.ts +0 -61
- package/node_modules/@tiptap/extensions/src/placeholder/utils/index.ts +0 -3
- package/node_modules/@tiptap/extensions/src/placeholder/utils/placeholderStateField.ts +0 -204
- package/node_modules/@tiptap/extensions/src/placeholder/utils/preparePlaceholderAttribute.ts +0 -21
- package/node_modules/@tiptap/extensions/src/placeholder/utils/resolveTopLevelRange.test.ts +0 -78
- package/node_modules/@tiptap/extensions/src/placeholder/utils/resolveTopLevelRange.ts +0 -93
- package/node_modules/@tiptap/extensions/src/selection/index.ts +0 -1
- package/node_modules/@tiptap/extensions/src/selection/selection.test.ts +0 -97
- package/node_modules/@tiptap/extensions/src/selection/selection.ts +0 -106
- package/node_modules/@tiptap/extensions/src/trailing-node/index.ts +0 -1
- package/node_modules/@tiptap/extensions/src/trailing-node/trailing-node.test.ts +0 -90
- package/node_modules/@tiptap/extensions/src/trailing-node/trailing-node.ts +0 -107
- package/node_modules/@tiptap/extensions/src/undo-redo/index.ts +0 -1
- package/node_modules/@tiptap/extensions/src/undo-redo/undo-redo.ts +0 -86
- package/node_modules/@tiptap/pm/LICENSE +0 -21
- package/node_modules/@tiptap/pm/README.md +0 -22
- package/node_modules/@tiptap/pm/THIRD_PARTY_LICENSES.md +0 -47
- package/node_modules/@tiptap/pm/changeset/index.ts +0 -1
- package/node_modules/@tiptap/pm/commands/index.ts +0 -1
- package/node_modules/@tiptap/pm/dist/changeset/index.cjs +0 -9
- package/node_modules/@tiptap/pm/dist/changeset/index.d.cts +0 -1
- package/node_modules/@tiptap/pm/dist/changeset/index.d.ts +0 -1
- package/node_modules/@tiptap/pm/dist/changeset/index.js +0 -2
- package/node_modules/@tiptap/pm/dist/commands/index.cjs +0 -9
- package/node_modules/@tiptap/pm/dist/commands/index.d.cts +0 -1
- package/node_modules/@tiptap/pm/dist/commands/index.d.ts +0 -1
- package/node_modules/@tiptap/pm/dist/commands/index.js +0 -2
- package/node_modules/@tiptap/pm/dist/dropcursor/index.cjs +0 -9
- package/node_modules/@tiptap/pm/dist/dropcursor/index.d.cts +0 -1
- package/node_modules/@tiptap/pm/dist/dropcursor/index.d.ts +0 -1
- package/node_modules/@tiptap/pm/dist/dropcursor/index.js +0 -2
- package/node_modules/@tiptap/pm/dist/gapcursor/index.cjs +0 -9
- package/node_modules/@tiptap/pm/dist/gapcursor/index.d.cts +0 -1
- package/node_modules/@tiptap/pm/dist/gapcursor/index.d.ts +0 -1
- package/node_modules/@tiptap/pm/dist/gapcursor/index.js +0 -2
- package/node_modules/@tiptap/pm/dist/history/index.cjs +0 -9
- package/node_modules/@tiptap/pm/dist/history/index.d.cts +0 -1
- package/node_modules/@tiptap/pm/dist/history/index.d.ts +0 -1
- package/node_modules/@tiptap/pm/dist/history/index.js +0 -2
- package/node_modules/@tiptap/pm/dist/inputrules/index.cjs +0 -9
- package/node_modules/@tiptap/pm/dist/inputrules/index.d.cts +0 -1
- package/node_modules/@tiptap/pm/dist/inputrules/index.d.ts +0 -1
- package/node_modules/@tiptap/pm/dist/inputrules/index.js +0 -2
- package/node_modules/@tiptap/pm/dist/keymap/index.cjs +0 -9
- package/node_modules/@tiptap/pm/dist/keymap/index.d.cts +0 -1
- package/node_modules/@tiptap/pm/dist/keymap/index.d.ts +0 -1
- package/node_modules/@tiptap/pm/dist/keymap/index.js +0 -2
- package/node_modules/@tiptap/pm/dist/model/index.cjs +0 -9
- package/node_modules/@tiptap/pm/dist/model/index.d.cts +0 -1
- package/node_modules/@tiptap/pm/dist/model/index.d.ts +0 -1
- package/node_modules/@tiptap/pm/dist/model/index.js +0 -2
- package/node_modules/@tiptap/pm/dist/schema-list/index.cjs +0 -9
- package/node_modules/@tiptap/pm/dist/schema-list/index.d.cts +0 -1
- package/node_modules/@tiptap/pm/dist/schema-list/index.d.ts +0 -1
- package/node_modules/@tiptap/pm/dist/schema-list/index.js +0 -2
- package/node_modules/@tiptap/pm/dist/state/index.cjs +0 -9
- package/node_modules/@tiptap/pm/dist/state/index.d.cts +0 -1
- package/node_modules/@tiptap/pm/dist/state/index.d.ts +0 -1
- package/node_modules/@tiptap/pm/dist/state/index.js +0 -2
- package/node_modules/@tiptap/pm/dist/tables/index.cjs +0 -9
- package/node_modules/@tiptap/pm/dist/tables/index.d.cts +0 -1
- package/node_modules/@tiptap/pm/dist/tables/index.d.ts +0 -1
- package/node_modules/@tiptap/pm/dist/tables/index.js +0 -2
- package/node_modules/@tiptap/pm/dist/transform/index.cjs +0 -9
- package/node_modules/@tiptap/pm/dist/transform/index.d.cts +0 -1
- package/node_modules/@tiptap/pm/dist/transform/index.d.ts +0 -1
- package/node_modules/@tiptap/pm/dist/transform/index.js +0 -2
- package/node_modules/@tiptap/pm/dist/view/index.cjs +0 -9
- package/node_modules/@tiptap/pm/dist/view/index.d.cts +0 -1
- package/node_modules/@tiptap/pm/dist/view/index.d.ts +0 -1
- package/node_modules/@tiptap/pm/dist/view/index.js +0 -2
- package/node_modules/@tiptap/pm/dropcursor/index.ts +0 -1
- package/node_modules/@tiptap/pm/gapcursor/index.ts +0 -1
- package/node_modules/@tiptap/pm/history/index.ts +0 -1
- package/node_modules/@tiptap/pm/inputrules/index.ts +0 -1
- package/node_modules/@tiptap/pm/keymap/index.ts +0 -1
- package/node_modules/@tiptap/pm/model/index.ts +0 -1
- package/node_modules/@tiptap/pm/package.json +0 -166
- package/node_modules/@tiptap/pm/schema-list/index.ts +0 -1
- package/node_modules/@tiptap/pm/state/index.ts +0 -1
- package/node_modules/@tiptap/pm/tables/index.ts +0 -1
- package/node_modules/@tiptap/pm/transform/index.ts +0 -1
- package/node_modules/@tiptap/pm/view/index.ts +0 -1
- package/node_modules/@tiptap/react/LICENSE.md +0 -21
- package/node_modules/@tiptap/react/README.md +0 -18
- package/node_modules/@tiptap/react/dist/index.cjs +0 -1396
- package/node_modules/@tiptap/react/dist/index.cjs.map +0 -1
- package/node_modules/@tiptap/react/dist/index.d.cts +0 -632
- package/node_modules/@tiptap/react/dist/index.d.cts.map +0 -1
- package/node_modules/@tiptap/react/dist/index.d.ts +0 -632
- package/node_modules/@tiptap/react/dist/index.d.ts.map +0 -1
- package/node_modules/@tiptap/react/dist/index.js +0 -1337
- package/node_modules/@tiptap/react/dist/index.js.map +0 -1
- package/node_modules/@tiptap/react/dist/menus/index.cjs +0 -469
- package/node_modules/@tiptap/react/dist/menus/index.cjs.map +0 -1
- package/node_modules/@tiptap/react/dist/menus/index.d.cts +0 -21
- package/node_modules/@tiptap/react/dist/menus/index.d.cts.map +0 -1
- package/node_modules/@tiptap/react/dist/menus/index.d.ts +0 -21
- package/node_modules/@tiptap/react/dist/menus/index.d.ts.map +0 -1
- package/node_modules/@tiptap/react/dist/menus/index.js +0 -444
- package/node_modules/@tiptap/react/dist/menus/index.js.map +0 -1
- package/node_modules/@tiptap/react/package.json +0 -80
- package/node_modules/@tiptap/react/src/Context.tsx +0 -62
- package/node_modules/@tiptap/react/src/Editor.ts +0 -16
- package/node_modules/@tiptap/react/src/EditorContent.test.ts +0 -39
- package/node_modules/@tiptap/react/src/EditorContent.tsx +0 -230
- package/node_modules/@tiptap/react/src/NodeViewContent.tsx +0 -30
- package/node_modules/@tiptap/react/src/NodeViewWrapper.tsx +0 -27
- package/node_modules/@tiptap/react/src/ReactMarkViewRenderer.tsx +0 -114
- package/node_modules/@tiptap/react/src/ReactNodeViewRenderer.test.ts +0 -566
- package/node_modules/@tiptap/react/src/ReactNodeViewRenderer.tsx +0 -465
- package/node_modules/@tiptap/react/src/ReactNodeViewSelectionTracker.ts +0 -113
- package/node_modules/@tiptap/react/src/ReactRenderer.tsx +0 -304
- package/node_modules/@tiptap/react/src/ReactWidgetRenderer.test.ts +0 -448
- package/node_modules/@tiptap/react/src/ReactWidgetRenderer.tsx +0 -97
- package/node_modules/@tiptap/react/src/Tiptap.tsx +0 -232
- package/node_modules/@tiptap/react/src/captureDOMSelection.test.ts +0 -76
- package/node_modules/@tiptap/react/src/captureDOMSelection.ts +0 -35
- package/node_modules/@tiptap/react/src/handleMobileEnter.test.ts +0 -218
- package/node_modules/@tiptap/react/src/handleMobileEnter.ts +0 -60
- package/node_modules/@tiptap/react/src/index.ts +0 -16
- package/node_modules/@tiptap/react/src/lib/utils/getTextSelectionAncestorPositions.ts +0 -27
- package/node_modules/@tiptap/react/src/menus/BubbleMenu.test.ts +0 -178
- package/node_modules/@tiptap/react/src/menus/BubbleMenu.tsx +0 -160
- package/node_modules/@tiptap/react/src/menus/FloatingMenu.test.ts +0 -168
- package/node_modules/@tiptap/react/src/menus/FloatingMenu.tsx +0 -161
- package/node_modules/@tiptap/react/src/menus/getAutoPluginKey.ts +0 -5
- package/node_modules/@tiptap/react/src/menus/index.ts +0 -4
- package/node_modules/@tiptap/react/src/menus/useMenuElementProps.ts +0 -369
- package/node_modules/@tiptap/react/src/types.ts +0 -8
- package/node_modules/@tiptap/react/src/useEditor.ts +0 -379
- package/node_modules/@tiptap/react/src/useEditorState.test.ts +0 -160
- package/node_modules/@tiptap/react/src/useEditorState.ts +0 -187
- package/node_modules/@tiptap/react/src/useReactNodeView.ts +0 -38
- package/node_modules/@tiptap/starter-kit/LICENSE.md +0 -21
- package/node_modules/@tiptap/starter-kit/README.md +0 -18
- package/node_modules/@tiptap/starter-kit/dist/index.cjs +0 -76
- package/node_modules/@tiptap/starter-kit/dist/index.cjs.map +0 -1
- package/node_modules/@tiptap/starter-kit/dist/index.d.cts +0 -137
- package/node_modules/@tiptap/starter-kit/dist/index.d.cts.map +0 -1
- package/node_modules/@tiptap/starter-kit/dist/index.d.ts +0 -137
- package/node_modules/@tiptap/starter-kit/dist/index.d.ts.map +0 -1
- package/node_modules/@tiptap/starter-kit/dist/index.js +0 -71
- package/node_modules/@tiptap/starter-kit/dist/index.js.map +0 -1
- package/node_modules/@tiptap/starter-kit/package.json +0 -70
- package/node_modules/@tiptap/starter-kit/src/index.ts +0 -6
- package/node_modules/@tiptap/starter-kit/src/starter-kit.ts +0 -273
- package/node_modules/@tiptap/suggestion/LICENSE.md +0 -21
- package/node_modules/@tiptap/suggestion/README.md +0 -18
- package/node_modules/@tiptap/suggestion/dist/index.cjs +0 -665
- package/node_modules/@tiptap/suggestion/dist/index.cjs.map +0 -1
- package/node_modules/@tiptap/suggestion/dist/index.d.cts +0 -419
- package/node_modules/@tiptap/suggestion/dist/index.d.cts.map +0 -1
- package/node_modules/@tiptap/suggestion/dist/index.d.ts +0 -419
- package/node_modules/@tiptap/suggestion/dist/index.d.ts.map +0 -1
- package/node_modules/@tiptap/suggestion/dist/index.js +0 -657
- package/node_modules/@tiptap/suggestion/dist/index.js.map +0 -1
- package/node_modules/@tiptap/suggestion/package.json +0 -54
- package/node_modules/@tiptap/suggestion/src/findSuggestionMatch.ts +0 -86
- package/node_modules/@tiptap/suggestion/src/helpers.ts +0 -129
- package/node_modules/@tiptap/suggestion/src/index.ts +0 -8
- package/node_modules/@tiptap/suggestion/src/plugin/async.ts +0 -89
- package/node_modules/@tiptap/suggestion/src/plugin/floating-ui.ts +0 -204
- package/node_modules/@tiptap/suggestion/src/plugin/props.ts +0 -94
- package/node_modules/@tiptap/suggestion/src/plugin/state.ts +0 -182
- package/node_modules/@tiptap/suggestion/src/plugin/view.ts +0 -236
- package/node_modules/@tiptap/suggestion/src/suggestion.ts +0 -151
- package/node_modules/@tiptap/suggestion/src/types.ts +0 -439
- package/node_modules/@types/use-sync-external-store/LICENSE +0 -21
- package/node_modules/@types/use-sync-external-store/README.md +0 -15
- package/node_modules/@types/use-sync-external-store/index.d.ts +0 -5
- package/node_modules/@types/use-sync-external-store/package.json +0 -30
- package/node_modules/@types/use-sync-external-store/shim/index.d.ts +0 -1
- package/node_modules/@types/use-sync-external-store/shim/with-selector.d.ts +0 -1
- package/node_modules/@types/use-sync-external-store/with-selector.d.ts +0 -7
- package/node_modules/fast-equals/LICENSE +0 -21
- package/node_modules/fast-equals/README.md +0 -479
- package/node_modules/fast-equals/dist/cjs/index.cjs +0 -796
- package/node_modules/fast-equals/dist/cjs/index.cjs.map +0 -1
- package/node_modules/fast-equals/dist/cjs/index.d.cts +0 -211
- package/node_modules/fast-equals/dist/es/index.d.mts +0 -211
- package/node_modules/fast-equals/dist/es/index.mjs +0 -785
- package/node_modules/fast-equals/dist/es/index.mjs.map +0 -1
- package/node_modules/fast-equals/dist/umd/index.d.ts +0 -211
- package/node_modules/fast-equals/dist/umd/index.js +0 -802
- package/node_modules/fast-equals/dist/umd/index.js.map +0 -1
- package/node_modules/fast-equals/index.d.ts +0 -211
- package/node_modules/fast-equals/package.json +0 -120
- package/node_modules/linkifyjs/LICENSE +0 -19
- package/node_modules/linkifyjs/README.md +0 -47
- package/node_modules/linkifyjs/dist/linkify.cjs +0 -1854
- package/node_modules/linkifyjs/dist/linkify.d.cts +0 -637
- package/node_modules/linkifyjs/dist/linkify.d.mts +0 -637
- package/node_modules/linkifyjs/dist/linkify.js +0 -1859
- package/node_modules/linkifyjs/dist/linkify.min.js +0 -1
- package/node_modules/linkifyjs/dist/linkify.mjs +0 -1836
- package/node_modules/linkifyjs/package.json +0 -38
- package/node_modules/orderedmap/LICENSE +0 -19
- package/node_modules/orderedmap/README.md +0 -69
- package/node_modules/orderedmap/dist/index.cjs +0 -139
- package/node_modules/orderedmap/dist/index.d.cts +0 -33
- package/node_modules/orderedmap/dist/index.d.ts +0 -33
- package/node_modules/orderedmap/dist/index.js +0 -137
- package/node_modules/orderedmap/package.json +0 -39
- package/node_modules/prosemirror-changeset/CHANGELOG.md +0 -171
- package/node_modules/prosemirror-changeset/LICENSE +0 -19
- package/node_modules/prosemirror-changeset/README.md +0 -175
- package/node_modules/prosemirror-changeset/dist/index.cjs +0 -588
- package/node_modules/prosemirror-changeset/dist/index.d.cts +0 -187
- package/node_modules/prosemirror-changeset/dist/index.d.ts +0 -187
- package/node_modules/prosemirror-changeset/dist/index.js +0 -722
- package/node_modules/prosemirror-changeset/package.json +0 -40
- package/node_modules/prosemirror-changeset/src/README.md +0 -32
- package/node_modules/prosemirror-changeset/src/change.ts +0 -189
- package/node_modules/prosemirror-changeset/src/changeset.ts +0 -212
- package/node_modules/prosemirror-changeset/src/diff.ts +0 -158
- package/node_modules/prosemirror-changeset/src/simplify.ts +0 -132
- package/node_modules/prosemirror-changeset/test/test-changed-range.ts +0 -48
- package/node_modules/prosemirror-changeset/test/test-changes.ts +0 -211
- package/node_modules/prosemirror-changeset/test/test-diff.ts +0 -77
- package/node_modules/prosemirror-changeset/test/test-merge.ts +0 -56
- package/node_modules/prosemirror-changeset/test/test-simplify.ts +0 -74
- package/node_modules/prosemirror-commands/.tern-project +0 -8
- package/node_modules/prosemirror-commands/CHANGELOG.md +0 -328
- package/node_modules/prosemirror-commands/CONTRIBUTING.md +0 -104
- package/node_modules/prosemirror-commands/LICENSE +0 -19
- package/node_modules/prosemirror-commands/README.md +0 -28
- package/node_modules/prosemirror-commands/dist/index.cjs +0 -688
- package/node_modules/prosemirror-commands/dist/index.d.cts +0 -215
- package/node_modules/prosemirror-commands/dist/index.d.ts +0 -215
- package/node_modules/prosemirror-commands/dist/index.js +0 -852
- package/node_modules/prosemirror-commands/package.json +0 -39
- package/node_modules/prosemirror-commands/src/README.md +0 -40
- package/node_modules/prosemirror-commands/src/commands.ts +0 -786
- package/node_modules/prosemirror-dropcursor/CHANGELOG.md +0 -149
- package/node_modules/prosemirror-dropcursor/CONTRIBUTING.md +0 -104
- package/node_modules/prosemirror-dropcursor/LICENSE +0 -19
- package/node_modules/prosemirror-dropcursor/README.md +0 -50
- package/node_modules/prosemirror-dropcursor/dist/index.cjs +0 -200
- package/node_modules/prosemirror-dropcursor/dist/index.d.cts +0 -38
- package/node_modules/prosemirror-dropcursor/dist/index.d.ts +0 -38
- package/node_modules/prosemirror-dropcursor/dist/index.js +0 -163
- package/node_modules/prosemirror-dropcursor/package.json +0 -38
- package/node_modules/prosemirror-dropcursor/src/dropcursor.ts +0 -186
- package/node_modules/prosemirror-gapcursor/CHANGELOG.md +0 -122
- package/node_modules/prosemirror-gapcursor/CONTRIBUTING.md +0 -104
- package/node_modules/prosemirror-gapcursor/LICENSE +0 -19
- package/node_modules/prosemirror-gapcursor/README.md +0 -31
- package/node_modules/prosemirror-gapcursor/dist/index.cjs +0 -239
- package/node_modules/prosemirror-gapcursor/dist/index.d.cts +0 -31
- package/node_modules/prosemirror-gapcursor/dist/index.d.ts +0 -31
- package/node_modules/prosemirror-gapcursor/dist/index.js +0 -239
- package/node_modules/prosemirror-gapcursor/package.json +0 -43
- package/node_modules/prosemirror-gapcursor/src/README.md +0 -21
- package/node_modules/prosemirror-gapcursor/src/gapcursor.ts +0 -141
- package/node_modules/prosemirror-gapcursor/src/index.ts +0 -91
- package/node_modules/prosemirror-gapcursor/style/gapcursor.css +0 -25
- package/node_modules/prosemirror-history/.tern-project +0 -8
- package/node_modules/prosemirror-history/CHANGELOG.md +0 -176
- package/node_modules/prosemirror-history/CONTRIBUTING.md +0 -104
- package/node_modules/prosemirror-history/LICENSE +0 -19
- package/node_modules/prosemirror-history/README.md +0 -27
- package/node_modules/prosemirror-history/dist/index.cjs +0 -383
- package/node_modules/prosemirror-history/dist/index.d.cts +0 -64
- package/node_modules/prosemirror-history/dist/index.d.ts +0 -64
- package/node_modules/prosemirror-history/dist/index.js +0 -454
- package/node_modules/prosemirror-history/package.json +0 -40
- package/node_modules/prosemirror-history/src/README.md +0 -23
- package/node_modules/prosemirror-history/src/history.ts +0 -466
- package/node_modules/prosemirror-inputrules/.tern-project +0 -8
- package/node_modules/prosemirror-inputrules/CHANGELOG.md +0 -127
- package/node_modules/prosemirror-inputrules/CONTRIBUTING.md +0 -104
- package/node_modules/prosemirror-inputrules/LICENSE +0 -19
- package/node_modules/prosemirror-inputrules/README.md +0 -29
- package/node_modules/prosemirror-inputrules/dist/index.cjs +0 -194
- package/node_modules/prosemirror-inputrules/dist/index.d.cts +0 -131
- package/node_modules/prosemirror-inputrules/dist/index.d.ts +0 -131
- package/node_modules/prosemirror-inputrules/dist/index.js +0 -239
- package/node_modules/prosemirror-inputrules/package.json +0 -36
- package/node_modules/prosemirror-inputrules/src/README.md +0 -23
- package/node_modules/prosemirror-inputrules/src/index.ts +0 -4
- package/node_modules/prosemirror-inputrules/src/inputrules.ts +0 -167
- package/node_modules/prosemirror-inputrules/src/rulebuilders.ts +0 -59
- package/node_modules/prosemirror-inputrules/src/rules.ts +0 -17
- package/node_modules/prosemirror-keymap/.tern-project +0 -8
- package/node_modules/prosemirror-keymap/CHANGELOG.md +0 -104
- package/node_modules/prosemirror-keymap/CONTRIBUTING.md +0 -104
- package/node_modules/prosemirror-keymap/LICENSE +0 -19
- package/node_modules/prosemirror-keymap/README.md +0 -27
- package/node_modules/prosemirror-keymap/dist/index.cjs +0 -65
- package/node_modules/prosemirror-keymap/dist/index.d.cts +0 -47
- package/node_modules/prosemirror-keymap/dist/index.d.ts +0 -47
- package/node_modules/prosemirror-keymap/dist/index.js +0 -128
- package/node_modules/prosemirror-keymap/package.json +0 -38
- package/node_modules/prosemirror-keymap/src/README.md +0 -5
- package/node_modules/prosemirror-keymap/src/keymap.ts +0 -105
- package/node_modules/prosemirror-model/.tern-project +0 -8
- package/node_modules/prosemirror-model/CHANGELOG.md +0 -782
- package/node_modules/prosemirror-model/CONTRIBUTING.md +0 -104
- package/node_modules/prosemirror-model/LICENSE +0 -19
- package/node_modules/prosemirror-model/README.md +0 -29
- package/node_modules/prosemirror-model/dist/index.cjs +0 -2911
- package/node_modules/prosemirror-model/dist/index.d.cts +0 -1683
- package/node_modules/prosemirror-model/dist/index.d.ts +0 -1683
- package/node_modules/prosemirror-model/dist/index.js +0 -3463
- package/node_modules/prosemirror-model/package.json +0 -38
- package/node_modules/prosemirror-model/src/README.md +0 -62
- package/node_modules/prosemirror-model/src/comparedeep.ts +0 -15
- package/node_modules/prosemirror-model/src/content.ts +0 -413
- package/node_modules/prosemirror-model/src/diff.ts +0 -57
- package/node_modules/prosemirror-model/src/dom.ts +0 -1
- package/node_modules/prosemirror-model/src/fragment.ts +0 -268
- package/node_modules/prosemirror-model/src/from_dom.ts +0 -851
- package/node_modules/prosemirror-model/src/index.ts +0 -11
- package/node_modules/prosemirror-model/src/mark.ts +0 -110
- package/node_modules/prosemirror-model/src/node.ts +0 -410
- package/node_modules/prosemirror-model/src/replace.ts +0 -217
- package/node_modules/prosemirror-model/src/resolvedpos.ts +0 -289
- package/node_modules/prosemirror-model/src/schema.ts +0 -691
- package/node_modules/prosemirror-model/src/to_dom.ts +0 -242
- package/node_modules/prosemirror-schema-list/.tern-project +0 -8
- package/node_modules/prosemirror-schema-list/CHANGELOG.md +0 -140
- package/node_modules/prosemirror-schema-list/CONTRIBUTING.md +0 -100
- package/node_modules/prosemirror-schema-list/LICENSE +0 -19
- package/node_modules/prosemirror-schema-list/README.md +0 -28
- package/node_modules/prosemirror-schema-list/dist/index.cjs +0 -253
- package/node_modules/prosemirror-schema-list/dist/index.d.cts +0 -71
- package/node_modules/prosemirror-schema-list/dist/index.d.ts +0 -71
- package/node_modules/prosemirror-schema-list/dist/index.js +0 -289
- package/node_modules/prosemirror-schema-list/package.json +0 -40
- package/node_modules/prosemirror-schema-list/src/README.md +0 -29
- package/node_modules/prosemirror-schema-list/src/schema-list.ts +0 -267
- package/node_modules/prosemirror-state/.tern-project +0 -8
- package/node_modules/prosemirror-state/CHANGELOG.md +0 -296
- package/node_modules/prosemirror-state/CONTRIBUTING.md +0 -104
- package/node_modules/prosemirror-state/LICENSE +0 -19
- package/node_modules/prosemirror-state/README.md +0 -28
- package/node_modules/prosemirror-state/dist/index.cjs +0 -884
- package/node_modules/prosemirror-state/dist/index.d.cts +0 -709
- package/node_modules/prosemirror-state/dist/index.d.ts +0 -709
- package/node_modules/prosemirror-state/dist/index.js +0 -1002
- package/node_modules/prosemirror-state/package.json +0 -39
- package/node_modules/prosemirror-state/src/README.md +0 -42
- package/node_modules/prosemirror-state/src/index.ts +0 -7
- package/node_modules/prosemirror-state/src/plugin.ts +0 -142
- package/node_modules/prosemirror-state/src/selection.ts +0 -462
- package/node_modules/prosemirror-state/src/state.ts +0 -266
- package/node_modules/prosemirror-state/src/transaction.ts +0 -215
- package/node_modules/prosemirror-tables/LICENSE +0 -19
- package/node_modules/prosemirror-tables/README.md +0 -254
- package/node_modules/prosemirror-tables/dist/index.cjs +0 -2683
- package/node_modules/prosemirror-tables/dist/index.d.cts +0 -751
- package/node_modules/prosemirror-tables/dist/index.d.cts.map +0 -1
- package/node_modules/prosemirror-tables/dist/index.d.ts +0 -751
- package/node_modules/prosemirror-tables/dist/index.d.ts.map +0 -1
- package/node_modules/prosemirror-tables/dist/index.js +0 -2626
- package/node_modules/prosemirror-tables/dist/index.js.map +0 -1
- package/node_modules/prosemirror-tables/package.json +0 -80
- package/node_modules/prosemirror-tables/style/tables.css +0 -48
- package/node_modules/prosemirror-transform/.tern-project +0 -8
- package/node_modules/prosemirror-transform/CHANGELOG.md +0 -530
- package/node_modules/prosemirror-transform/CONTRIBUTING.md +0 -104
- package/node_modules/prosemirror-transform/LICENSE +0 -19
- package/node_modules/prosemirror-transform/README.md +0 -29
- package/node_modules/prosemirror-transform/dist/index.cjs +0 -2014
- package/node_modules/prosemirror-transform/dist/index.d.cts +0 -857
- package/node_modules/prosemirror-transform/dist/index.d.ts +0 -857
- package/node_modules/prosemirror-transform/dist/index.js +0 -2272
- package/node_modules/prosemirror-transform/package.json +0 -37
- package/node_modules/prosemirror-transform/src/README.md +0 -59
- package/node_modules/prosemirror-transform/src/attr_step.ts +0 -98
- package/node_modules/prosemirror-transform/src/index.ts +0 -11
- package/node_modules/prosemirror-transform/src/map.ts +0 -287
- package/node_modules/prosemirror-transform/src/mark.ts +0 -90
- package/node_modules/prosemirror-transform/src/mark_step.ts +0 -287
- package/node_modules/prosemirror-transform/src/replace.ts +0 -483
- package/node_modules/prosemirror-transform/src/replace_step.ts +0 -187
- package/node_modules/prosemirror-transform/src/step.ts +0 -97
- package/node_modules/prosemirror-transform/src/structure.ts +0 -349
- package/node_modules/prosemirror-transform/src/transform.ts +0 -271
- package/node_modules/prosemirror-view/.tern-project +0 -8
- package/node_modules/prosemirror-view/CHANGELOG.md +0 -2543
- package/node_modules/prosemirror-view/CONTRIBUTING.md +0 -104
- package/node_modules/prosemirror-view/LICENSE +0 -19
- package/node_modules/prosemirror-view/README.md +0 -28
- package/node_modules/prosemirror-view/dist/index.cjs +0 -5549
- package/node_modules/prosemirror-view/dist/index.d.cts +0 -913
- package/node_modules/prosemirror-view/dist/index.d.ts +0 -913
- package/node_modules/prosemirror-view/dist/index.js +0 -6053
- package/node_modules/prosemirror-view/package.json +0 -43
- package/node_modules/prosemirror-view/src/README.md +0 -38
- package/node_modules/prosemirror-view/src/browser.ts +0 -24
- package/node_modules/prosemirror-view/src/capturekeys.ts +0 -344
- package/node_modules/prosemirror-view/src/clipboard.ts +0 -282
- package/node_modules/prosemirror-view/src/decoration.ts +0 -817
- package/node_modules/prosemirror-view/src/dom.ts +0 -166
- package/node_modules/prosemirror-view/src/domchange.ts +0 -383
- package/node_modules/prosemirror-view/src/domcoords.ts +0 -517
- package/node_modules/prosemirror-view/src/domobserver.ts +0 -397
- package/node_modules/prosemirror-view/src/index.ts +0 -826
- package/node_modules/prosemirror-view/src/input.ts +0 -885
- package/node_modules/prosemirror-view/src/selection.ts +0 -229
- package/node_modules/prosemirror-view/src/viewdesc.ts +0 -1624
- package/node_modules/prosemirror-view/style/prosemirror.css +0 -54
- package/node_modules/rope-sequence/LICENSE +0 -19
- package/node_modules/rope-sequence/README.md +0 -63
- package/node_modules/rope-sequence/dist/index.cjs +0 -209
- package/node_modules/rope-sequence/dist/index.d.cts +0 -11
- package/node_modules/rope-sequence/dist/index.d.ts +0 -11
- package/node_modules/rope-sequence/dist/index.js +0 -207
- package/node_modules/rope-sequence/index.js +0 -190
- package/node_modules/rope-sequence/package.json +0 -34
- package/node_modules/rope-sequence/test.js +0 -78
- package/node_modules/use-sync-external-store/LICENSE +0 -21
- package/node_modules/use-sync-external-store/README.md +0 -5
- package/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.development.js +0 -97
- package/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.production.js +0 -85
- package/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.development.js +0 -95
- package/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.native.development.js +0 -88
- package/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.native.production.js +0 -59
- package/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.production.js +0 -66
- package/node_modules/use-sync-external-store/cjs/use-sync-external-store-with-selector.development.js +0 -96
- package/node_modules/use-sync-external-store/cjs/use-sync-external-store-with-selector.production.js +0 -84
- package/node_modules/use-sync-external-store/cjs/use-sync-external-store.development.js +0 -27
- package/node_modules/use-sync-external-store/cjs/use-sync-external-store.production.js +0 -13
- package/node_modules/use-sync-external-store/index.js +0 -7
- package/node_modules/use-sync-external-store/package.json +0 -43
- package/node_modules/use-sync-external-store/shim/index.js +0 -7
- package/node_modules/use-sync-external-store/shim/index.native.js +0 -7
- package/node_modules/use-sync-external-store/shim/with-selector.js +0 -7
- package/node_modules/use-sync-external-store/with-selector.js +0 -7
- package/node_modules/w3c-keyname/.tern-port +0 -1
- package/node_modules/w3c-keyname/LICENSE +0 -19
- package/node_modules/w3c-keyname/README.md +0 -18
- package/node_modules/w3c-keyname/index.cjs +0 -127
- package/node_modules/w3c-keyname/index.d.cts +0 -5
- package/node_modules/w3c-keyname/index.d.ts +0 -5
- package/node_modules/w3c-keyname/index.js +0 -119
- package/node_modules/w3c-keyname/package.json +0 -37
- package/src/legacy/ask.tsx +0 -154
- package/src/legacy/basic.tsx +0 -127
- package/src/legacy/block-meta.ts +0 -42
- package/src/legacy/block-ops.ts +0 -179
- package/src/legacy/blocks.tsx +0 -165
- package/src/legacy/boundary.tsx +0 -17
- package/src/legacy/content.ts +0 -22
- package/src/legacy/drag-handle.tsx +0 -188
- package/src/legacy/dynamic.tsx +0 -145
- package/src/legacy/editor.css +0 -356
- package/src/legacy/editor.tsx +0 -425
- package/src/legacy/extensions.ts +0 -78
- package/src/legacy/insert-pattern.ts +0 -13
- package/src/legacy/insert.ts +0 -9
- package/src/legacy/inserter.tsx +0 -164
- package/src/legacy/inspector.tsx +0 -237
- package/src/legacy/layout-ui.tsx +0 -227
- package/src/legacy/layout.tsx +0 -174
- package/src/legacy/media.ts +0 -31
- package/src/legacy/nodes.tsx +0 -107
- package/src/legacy/outline.tsx +0 -124
- package/src/legacy/panels.ts +0 -22
- package/src/legacy/rank.ts +0 -22
- package/src/legacy/registry.ts +0 -20
- package/src/legacy/resize-handles.tsx +0 -149
- package/src/legacy/style-attr.ts +0 -69
- package/src/legacy/synced.tsx +0 -128
- package/src/legacy/toolbar.tsx +0 -238
- package/src/legacy/unknown.tsx +0 -74
|
@@ -1,2014 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
function _wrapNativeSuper(Class) { var _cache = typeof Map === "function" ? new Map() : undefined; _wrapNativeSuper = function _wrapNativeSuper(Class) { if (Class === null || !_isNativeFunction(Class)) return Class; if (typeof Class !== "function") { throw new TypeError("Super expression must either be null or a function"); } if (typeof _cache !== "undefined") { if (_cache.has(Class)) return _cache.get(Class); _cache.set(Class, Wrapper); } function Wrapper() { return _construct(Class, arguments, _getPrototypeOf(this).constructor); } Wrapper.prototype = Object.create(Class.prototype, { constructor: { value: Wrapper, enumerable: false, writable: true, configurable: true } }); return _setPrototypeOf(Wrapper, Class); }; return _wrapNativeSuper(Class); }
|
|
4
|
-
function _construct(Parent, args, Class) { if (_isNativeReflectConstruct()) { _construct = Reflect.construct.bind(); } else { _construct = function _construct(Parent, args, Class) { var a = [null]; a.push.apply(a, args); var Constructor = Function.bind.apply(Parent, a); var instance = new Constructor(); if (Class) _setPrototypeOf(instance, Class.prototype); return instance; }; } return _construct.apply(null, arguments); }
|
|
5
|
-
function _isNativeFunction(fn) { try { return Function.toString.call(fn).indexOf("[native code]") !== -1; } catch (e) { return typeof fn === "function"; } }
|
|
6
|
-
function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it["return"] != null) it["return"](); } finally { if (didErr) throw err; } } }; }
|
|
7
|
-
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
8
|
-
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
9
|
-
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
10
|
-
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
11
|
-
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
12
|
-
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
|
|
13
|
-
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
14
|
-
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
15
|
-
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
16
|
-
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
17
|
-
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
18
|
-
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
|
|
19
|
-
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
20
|
-
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
21
|
-
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
22
|
-
var prosemirrorModel = require('prosemirror-model');
|
|
23
|
-
var lower16 = 0xffff;
|
|
24
|
-
var factor16 = Math.pow(2, 16);
|
|
25
|
-
function makeRecover(index, offset) {
|
|
26
|
-
return index + offset * factor16;
|
|
27
|
-
}
|
|
28
|
-
function recoverIndex(value) {
|
|
29
|
-
return value & lower16;
|
|
30
|
-
}
|
|
31
|
-
function recoverOffset(value) {
|
|
32
|
-
return (value - (value & lower16)) / factor16;
|
|
33
|
-
}
|
|
34
|
-
var DEL_BEFORE = 1,
|
|
35
|
-
DEL_AFTER = 2,
|
|
36
|
-
DEL_ACROSS = 4,
|
|
37
|
-
DEL_SIDE = 8;
|
|
38
|
-
var MapResult = function () {
|
|
39
|
-
function MapResult(pos, delInfo, recover) {
|
|
40
|
-
_classCallCheck(this, MapResult);
|
|
41
|
-
this.pos = pos;
|
|
42
|
-
this.delInfo = delInfo;
|
|
43
|
-
this.recover = recover;
|
|
44
|
-
}
|
|
45
|
-
_createClass(MapResult, [{
|
|
46
|
-
key: "deleted",
|
|
47
|
-
get: function get() {
|
|
48
|
-
return (this.delInfo & DEL_SIDE) > 0;
|
|
49
|
-
}
|
|
50
|
-
}, {
|
|
51
|
-
key: "deletedBefore",
|
|
52
|
-
get: function get() {
|
|
53
|
-
return (this.delInfo & (DEL_BEFORE | DEL_ACROSS)) > 0;
|
|
54
|
-
}
|
|
55
|
-
}, {
|
|
56
|
-
key: "deletedAfter",
|
|
57
|
-
get: function get() {
|
|
58
|
-
return (this.delInfo & (DEL_AFTER | DEL_ACROSS)) > 0;
|
|
59
|
-
}
|
|
60
|
-
}, {
|
|
61
|
-
key: "deletedAcross",
|
|
62
|
-
get: function get() {
|
|
63
|
-
return (this.delInfo & DEL_ACROSS) > 0;
|
|
64
|
-
}
|
|
65
|
-
}]);
|
|
66
|
-
return MapResult;
|
|
67
|
-
}();
|
|
68
|
-
var StepMap = function () {
|
|
69
|
-
function StepMap(ranges) {
|
|
70
|
-
var inverted = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
|
71
|
-
_classCallCheck(this, StepMap);
|
|
72
|
-
this.ranges = ranges;
|
|
73
|
-
this.inverted = inverted;
|
|
74
|
-
if (!ranges.length && StepMap.empty) return StepMap.empty;
|
|
75
|
-
}
|
|
76
|
-
_createClass(StepMap, [{
|
|
77
|
-
key: "recover",
|
|
78
|
-
value: function recover(value) {
|
|
79
|
-
var diff = 0,
|
|
80
|
-
index = recoverIndex(value);
|
|
81
|
-
if (!this.inverted) for (var i = 0; i < index; i++) diff += this.ranges[i * 3 + 2] - this.ranges[i * 3 + 1];
|
|
82
|
-
return this.ranges[index * 3] + diff + recoverOffset(value);
|
|
83
|
-
}
|
|
84
|
-
}, {
|
|
85
|
-
key: "mapResult",
|
|
86
|
-
value: function mapResult(pos) {
|
|
87
|
-
var assoc = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1;
|
|
88
|
-
return this._map(pos, assoc, false);
|
|
89
|
-
}
|
|
90
|
-
}, {
|
|
91
|
-
key: "map",
|
|
92
|
-
value: function map(pos) {
|
|
93
|
-
var assoc = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1;
|
|
94
|
-
return this._map(pos, assoc, true);
|
|
95
|
-
}
|
|
96
|
-
}, {
|
|
97
|
-
key: "_map",
|
|
98
|
-
value: function _map(pos, assoc, simple) {
|
|
99
|
-
var diff = 0,
|
|
100
|
-
oldIndex = this.inverted ? 2 : 1,
|
|
101
|
-
newIndex = this.inverted ? 1 : 2;
|
|
102
|
-
for (var i = 0; i < this.ranges.length; i += 3) {
|
|
103
|
-
var start = this.ranges[i] - (this.inverted ? diff : 0);
|
|
104
|
-
if (start > pos) break;
|
|
105
|
-
var oldSize = this.ranges[i + oldIndex],
|
|
106
|
-
newSize = this.ranges[i + newIndex],
|
|
107
|
-
end = start + oldSize;
|
|
108
|
-
if (pos <= end) {
|
|
109
|
-
var side = !oldSize ? assoc : pos == start ? -1 : pos == end ? 1 : assoc;
|
|
110
|
-
var result = start + diff + (side < 0 ? 0 : newSize);
|
|
111
|
-
if (simple) return result;
|
|
112
|
-
var recover = pos == (assoc < 0 ? start : end) ? null : makeRecover(i / 3, pos - start);
|
|
113
|
-
var del = 0;
|
|
114
|
-
if (oldSize) {
|
|
115
|
-
del |= pos == start ? DEL_AFTER : pos == end ? DEL_BEFORE : DEL_ACROSS;
|
|
116
|
-
if (assoc < 0 ? pos != start : pos != end) del |= DEL_SIDE;
|
|
117
|
-
}
|
|
118
|
-
return new MapResult(result, del, recover);
|
|
119
|
-
}
|
|
120
|
-
diff += newSize - oldSize;
|
|
121
|
-
}
|
|
122
|
-
return simple ? pos + diff : new MapResult(pos + diff, 0, null);
|
|
123
|
-
}
|
|
124
|
-
}, {
|
|
125
|
-
key: "touches",
|
|
126
|
-
value: function touches(pos, recover) {
|
|
127
|
-
var diff = 0,
|
|
128
|
-
index = recoverIndex(recover);
|
|
129
|
-
var oldIndex = this.inverted ? 2 : 1,
|
|
130
|
-
newIndex = this.inverted ? 1 : 2;
|
|
131
|
-
for (var i = 0; i < this.ranges.length; i += 3) {
|
|
132
|
-
var start = this.ranges[i] - (this.inverted ? diff : 0);
|
|
133
|
-
if (start > pos) break;
|
|
134
|
-
var oldSize = this.ranges[i + oldIndex],
|
|
135
|
-
end = start + oldSize;
|
|
136
|
-
if (pos <= end && i == index * 3) return true;
|
|
137
|
-
diff += this.ranges[i + newIndex] - oldSize;
|
|
138
|
-
}
|
|
139
|
-
return false;
|
|
140
|
-
}
|
|
141
|
-
}, {
|
|
142
|
-
key: "forEach",
|
|
143
|
-
value: function forEach(f) {
|
|
144
|
-
var oldIndex = this.inverted ? 2 : 1,
|
|
145
|
-
newIndex = this.inverted ? 1 : 2;
|
|
146
|
-
for (var i = 0, diff = 0; i < this.ranges.length; i += 3) {
|
|
147
|
-
var start = this.ranges[i],
|
|
148
|
-
oldStart = start - (this.inverted ? diff : 0),
|
|
149
|
-
newStart = start + (this.inverted ? 0 : diff);
|
|
150
|
-
var oldSize = this.ranges[i + oldIndex],
|
|
151
|
-
newSize = this.ranges[i + newIndex];
|
|
152
|
-
f(oldStart, oldStart + oldSize, newStart, newStart + newSize);
|
|
153
|
-
diff += newSize - oldSize;
|
|
154
|
-
}
|
|
155
|
-
}
|
|
156
|
-
}, {
|
|
157
|
-
key: "invert",
|
|
158
|
-
value: function invert() {
|
|
159
|
-
return new StepMap(this.ranges, !this.inverted);
|
|
160
|
-
}
|
|
161
|
-
}, {
|
|
162
|
-
key: "toString",
|
|
163
|
-
value: function toString() {
|
|
164
|
-
return (this.inverted ? "-" : "") + JSON.stringify(this.ranges);
|
|
165
|
-
}
|
|
166
|
-
}], [{
|
|
167
|
-
key: "offset",
|
|
168
|
-
value: function offset(n) {
|
|
169
|
-
return n == 0 ? StepMap.empty : new StepMap(n < 0 ? [0, -n, 0] : [0, 0, n]);
|
|
170
|
-
}
|
|
171
|
-
}]);
|
|
172
|
-
return StepMap;
|
|
173
|
-
}();
|
|
174
|
-
StepMap.empty = new StepMap([]);
|
|
175
|
-
var Mapping = function () {
|
|
176
|
-
function Mapping(maps, mirror) {
|
|
177
|
-
var from = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;
|
|
178
|
-
var to = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : maps ? maps.length : 0;
|
|
179
|
-
_classCallCheck(this, Mapping);
|
|
180
|
-
this.mirror = mirror;
|
|
181
|
-
this.from = from;
|
|
182
|
-
this.to = to;
|
|
183
|
-
this._maps = maps || [];
|
|
184
|
-
this.ownData = !(maps || mirror);
|
|
185
|
-
}
|
|
186
|
-
_createClass(Mapping, [{
|
|
187
|
-
key: "maps",
|
|
188
|
-
get: function get() {
|
|
189
|
-
return this._maps;
|
|
190
|
-
}
|
|
191
|
-
}, {
|
|
192
|
-
key: "slice",
|
|
193
|
-
value: function slice() {
|
|
194
|
-
var from = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
|
|
195
|
-
var to = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.maps.length;
|
|
196
|
-
return new Mapping(this._maps, this.mirror, from, to);
|
|
197
|
-
}
|
|
198
|
-
}, {
|
|
199
|
-
key: "appendMap",
|
|
200
|
-
value: function appendMap(map, mirrors) {
|
|
201
|
-
if (!this.ownData) {
|
|
202
|
-
this._maps = this._maps.slice();
|
|
203
|
-
this.mirror = this.mirror && this.mirror.slice();
|
|
204
|
-
this.ownData = true;
|
|
205
|
-
}
|
|
206
|
-
this.to = this._maps.push(map);
|
|
207
|
-
if (mirrors != null) this.setMirror(this._maps.length - 1, mirrors);
|
|
208
|
-
}
|
|
209
|
-
}, {
|
|
210
|
-
key: "appendMapping",
|
|
211
|
-
value: function appendMapping(mapping) {
|
|
212
|
-
for (var i = 0, startSize = this._maps.length; i < mapping._maps.length; i++) {
|
|
213
|
-
var mirr = mapping.getMirror(i);
|
|
214
|
-
this.appendMap(mapping._maps[i], mirr != null && mirr < i ? startSize + mirr : undefined);
|
|
215
|
-
}
|
|
216
|
-
}
|
|
217
|
-
}, {
|
|
218
|
-
key: "getMirror",
|
|
219
|
-
value: function getMirror(n) {
|
|
220
|
-
if (this.mirror) for (var i = 0; i < this.mirror.length; i++) if (this.mirror[i] == n) return this.mirror[i + (i % 2 ? -1 : 1)];
|
|
221
|
-
}
|
|
222
|
-
}, {
|
|
223
|
-
key: "setMirror",
|
|
224
|
-
value: function setMirror(n, m) {
|
|
225
|
-
if (!this.mirror) this.mirror = [];
|
|
226
|
-
this.mirror.push(n, m);
|
|
227
|
-
}
|
|
228
|
-
}, {
|
|
229
|
-
key: "appendMappingInverted",
|
|
230
|
-
value: function appendMappingInverted(mapping) {
|
|
231
|
-
for (var i = mapping.maps.length - 1, totalSize = this._maps.length + mapping._maps.length; i >= 0; i--) {
|
|
232
|
-
var mirr = mapping.getMirror(i);
|
|
233
|
-
this.appendMap(mapping._maps[i].invert(), mirr != null && mirr > i ? totalSize - mirr - 1 : undefined);
|
|
234
|
-
}
|
|
235
|
-
}
|
|
236
|
-
}, {
|
|
237
|
-
key: "invert",
|
|
238
|
-
value: function invert() {
|
|
239
|
-
var inverse = new Mapping();
|
|
240
|
-
inverse.appendMappingInverted(this);
|
|
241
|
-
return inverse;
|
|
242
|
-
}
|
|
243
|
-
}, {
|
|
244
|
-
key: "map",
|
|
245
|
-
value: function map(pos) {
|
|
246
|
-
var assoc = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1;
|
|
247
|
-
if (this.mirror) return this._map(pos, assoc, true);
|
|
248
|
-
for (var i = this.from; i < this.to; i++) pos = this._maps[i].map(pos, assoc);
|
|
249
|
-
return pos;
|
|
250
|
-
}
|
|
251
|
-
}, {
|
|
252
|
-
key: "mapResult",
|
|
253
|
-
value: function mapResult(pos) {
|
|
254
|
-
var assoc = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1;
|
|
255
|
-
return this._map(pos, assoc, false);
|
|
256
|
-
}
|
|
257
|
-
}, {
|
|
258
|
-
key: "_map",
|
|
259
|
-
value: function _map(pos, assoc, simple) {
|
|
260
|
-
var delInfo = 0;
|
|
261
|
-
for (var i = this.from; i < this.to; i++) {
|
|
262
|
-
var map = this._maps[i],
|
|
263
|
-
result = map.mapResult(pos, assoc);
|
|
264
|
-
if (result.recover != null) {
|
|
265
|
-
var corr = this.getMirror(i);
|
|
266
|
-
if (corr != null && corr > i && corr < this.to) {
|
|
267
|
-
i = corr;
|
|
268
|
-
pos = this._maps[corr].recover(result.recover);
|
|
269
|
-
continue;
|
|
270
|
-
}
|
|
271
|
-
}
|
|
272
|
-
delInfo |= result.delInfo;
|
|
273
|
-
pos = result.pos;
|
|
274
|
-
}
|
|
275
|
-
return simple ? pos : new MapResult(pos, delInfo, null);
|
|
276
|
-
}
|
|
277
|
-
}]);
|
|
278
|
-
return Mapping;
|
|
279
|
-
}();
|
|
280
|
-
var stepsByID = Object.create(null);
|
|
281
|
-
var Step = function () {
|
|
282
|
-
function Step() {
|
|
283
|
-
_classCallCheck(this, Step);
|
|
284
|
-
}
|
|
285
|
-
_createClass(Step, [{
|
|
286
|
-
key: "getMap",
|
|
287
|
-
value: function getMap() {
|
|
288
|
-
return StepMap.empty;
|
|
289
|
-
}
|
|
290
|
-
}, {
|
|
291
|
-
key: "merge",
|
|
292
|
-
value: function merge(other) {
|
|
293
|
-
return null;
|
|
294
|
-
}
|
|
295
|
-
}], [{
|
|
296
|
-
key: "fromJSON",
|
|
297
|
-
value: function fromJSON(schema, json) {
|
|
298
|
-
if (!json || !json.stepType) throw new RangeError("Invalid input for Step.fromJSON");
|
|
299
|
-
var type = stepsByID[json.stepType];
|
|
300
|
-
if (!type) throw new RangeError("No step type ".concat(json.stepType, " defined"));
|
|
301
|
-
return type.fromJSON(schema, json);
|
|
302
|
-
}
|
|
303
|
-
}, {
|
|
304
|
-
key: "jsonID",
|
|
305
|
-
value: function jsonID(id, stepClass) {
|
|
306
|
-
if (id in stepsByID) throw new RangeError("Duplicate use of step JSON ID " + id);
|
|
307
|
-
stepsByID[id] = stepClass;
|
|
308
|
-
stepClass.prototype.jsonID = id;
|
|
309
|
-
return stepClass;
|
|
310
|
-
}
|
|
311
|
-
}]);
|
|
312
|
-
return Step;
|
|
313
|
-
}();
|
|
314
|
-
var StepResult = function () {
|
|
315
|
-
function StepResult(doc, failed) {
|
|
316
|
-
_classCallCheck(this, StepResult);
|
|
317
|
-
this.doc = doc;
|
|
318
|
-
this.failed = failed;
|
|
319
|
-
}
|
|
320
|
-
_createClass(StepResult, null, [{
|
|
321
|
-
key: "ok",
|
|
322
|
-
value: function ok(doc) {
|
|
323
|
-
return new StepResult(doc, null);
|
|
324
|
-
}
|
|
325
|
-
}, {
|
|
326
|
-
key: "fail",
|
|
327
|
-
value: function fail(message) {
|
|
328
|
-
return new StepResult(null, message);
|
|
329
|
-
}
|
|
330
|
-
}, {
|
|
331
|
-
key: "fromReplace",
|
|
332
|
-
value: function fromReplace(doc, from, to, slice) {
|
|
333
|
-
try {
|
|
334
|
-
return StepResult.ok(doc.replace(from, to, slice));
|
|
335
|
-
} catch (e) {
|
|
336
|
-
if (e instanceof prosemirrorModel.ReplaceError) return StepResult.fail(e.message);
|
|
337
|
-
throw e;
|
|
338
|
-
}
|
|
339
|
-
}
|
|
340
|
-
}]);
|
|
341
|
-
return StepResult;
|
|
342
|
-
}();
|
|
343
|
-
function mapFragment(fragment, f, parent) {
|
|
344
|
-
var mapped = [];
|
|
345
|
-
for (var i = 0; i < fragment.childCount; i++) {
|
|
346
|
-
var child = fragment.child(i);
|
|
347
|
-
if (child.content.size) child = child.copy(mapFragment(child.content, f, child));
|
|
348
|
-
if (child.isInline) child = f(child, parent, i);
|
|
349
|
-
mapped.push(child);
|
|
350
|
-
}
|
|
351
|
-
return prosemirrorModel.Fragment.fromArray(mapped);
|
|
352
|
-
}
|
|
353
|
-
var AddMarkStep = function (_Step) {
|
|
354
|
-
_inherits(AddMarkStep, _Step);
|
|
355
|
-
var _super = _createSuper(AddMarkStep);
|
|
356
|
-
function AddMarkStep(from, to, mark) {
|
|
357
|
-
var _this;
|
|
358
|
-
_classCallCheck(this, AddMarkStep);
|
|
359
|
-
_this = _super.call(this);
|
|
360
|
-
_this.from = from;
|
|
361
|
-
_this.to = to;
|
|
362
|
-
_this.mark = mark;
|
|
363
|
-
return _this;
|
|
364
|
-
}
|
|
365
|
-
_createClass(AddMarkStep, [{
|
|
366
|
-
key: "apply",
|
|
367
|
-
value: function apply(doc) {
|
|
368
|
-
var _this2 = this;
|
|
369
|
-
if (this.from == this.to) return new StepResult(doc, null);
|
|
370
|
-
var oldSlice = doc.slice(this.from, this.to),
|
|
371
|
-
$from = doc.resolve(this.from);
|
|
372
|
-
var parent = $from.node($from.sharedDepth(this.to));
|
|
373
|
-
var slice = new prosemirrorModel.Slice(mapFragment(oldSlice.content, function (node, parent) {
|
|
374
|
-
if (!node.isAtom || !parent.type.allowsMarkType(_this2.mark.type)) return node;
|
|
375
|
-
return node.mark(_this2.mark.addToSet(node.marks));
|
|
376
|
-
}, parent), oldSlice.openStart, oldSlice.openEnd);
|
|
377
|
-
return StepResult.fromReplace(doc, this.from, this.to, slice);
|
|
378
|
-
}
|
|
379
|
-
}, {
|
|
380
|
-
key: "invert",
|
|
381
|
-
value: function invert(doc) {
|
|
382
|
-
var _this3 = this;
|
|
383
|
-
var steps = [];
|
|
384
|
-
doc.nodesBetween(this.from, this.to, function (node, pos) {
|
|
385
|
-
if (node.isInline && node.isAtom) {
|
|
386
|
-
var added = _this3.mark.addToSet(node.marks);
|
|
387
|
-
if (!prosemirrorModel.Mark.sameSet(added, node.marks)) {
|
|
388
|
-
var from = Math.max(_this3.from, pos),
|
|
389
|
-
to = Math.min(_this3.to, pos + node.nodeSize);
|
|
390
|
-
steps.push(new RemoveMarkStep(from, to, _this3.mark));
|
|
391
|
-
var _iterator = _createForOfIteratorHelper(node.marks),
|
|
392
|
-
_step;
|
|
393
|
-
try {
|
|
394
|
-
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
395
|
-
var mark = _step.value;
|
|
396
|
-
if (!mark.isInSet(added)) steps.push(new AddMarkStep(from, to, mark));
|
|
397
|
-
}
|
|
398
|
-
} catch (err) {
|
|
399
|
-
_iterator.e(err);
|
|
400
|
-
} finally {
|
|
401
|
-
_iterator.f();
|
|
402
|
-
}
|
|
403
|
-
}
|
|
404
|
-
}
|
|
405
|
-
});
|
|
406
|
-
return steps.length == 0 ? new RemoveMarkStep(this.from, this.from, this.mark) : steps.length == 1 ? steps[0] : new MarkSetStep(steps);
|
|
407
|
-
}
|
|
408
|
-
}, {
|
|
409
|
-
key: "map",
|
|
410
|
-
value: function map(mapping) {
|
|
411
|
-
var from = mapping.map(this.from, 1),
|
|
412
|
-
to = mapping.map(this.to, -1);
|
|
413
|
-
if (from >= to) return null;
|
|
414
|
-
return new AddMarkStep(from, to, this.mark);
|
|
415
|
-
}
|
|
416
|
-
}, {
|
|
417
|
-
key: "merge",
|
|
418
|
-
value: function merge(other) {
|
|
419
|
-
if (other instanceof AddMarkStep && other.mark.eq(this.mark) && this.from <= other.to && this.to >= other.from) return new AddMarkStep(Math.min(this.from, other.from), Math.max(this.to, other.to), this.mark);
|
|
420
|
-
return null;
|
|
421
|
-
}
|
|
422
|
-
}, {
|
|
423
|
-
key: "toJSON",
|
|
424
|
-
value: function toJSON() {
|
|
425
|
-
return {
|
|
426
|
-
stepType: "addMark",
|
|
427
|
-
mark: this.mark.toJSON(),
|
|
428
|
-
from: this.from,
|
|
429
|
-
to: this.to
|
|
430
|
-
};
|
|
431
|
-
}
|
|
432
|
-
}], [{
|
|
433
|
-
key: "fromJSON",
|
|
434
|
-
value: function fromJSON(schema, json) {
|
|
435
|
-
if (typeof json.from != "number" || typeof json.to != "number") throw new RangeError("Invalid input for AddMarkStep.fromJSON");
|
|
436
|
-
return new AddMarkStep(json.from, json.to, schema.markFromJSON(json.mark));
|
|
437
|
-
}
|
|
438
|
-
}]);
|
|
439
|
-
return AddMarkStep;
|
|
440
|
-
}(Step);
|
|
441
|
-
Step.jsonID("addMark", AddMarkStep);
|
|
442
|
-
var RemoveMarkStep = function (_Step2) {
|
|
443
|
-
_inherits(RemoveMarkStep, _Step2);
|
|
444
|
-
var _super2 = _createSuper(RemoveMarkStep);
|
|
445
|
-
function RemoveMarkStep(from, to, mark) {
|
|
446
|
-
var _this4;
|
|
447
|
-
_classCallCheck(this, RemoveMarkStep);
|
|
448
|
-
_this4 = _super2.call(this);
|
|
449
|
-
_this4.from = from;
|
|
450
|
-
_this4.to = to;
|
|
451
|
-
_this4.mark = mark;
|
|
452
|
-
return _this4;
|
|
453
|
-
}
|
|
454
|
-
_createClass(RemoveMarkStep, [{
|
|
455
|
-
key: "apply",
|
|
456
|
-
value: function apply(doc) {
|
|
457
|
-
var _this5 = this;
|
|
458
|
-
if (this.from == this.to) return new StepResult(doc, null);
|
|
459
|
-
var oldSlice = doc.slice(this.from, this.to);
|
|
460
|
-
var slice = new prosemirrorModel.Slice(mapFragment(oldSlice.content, function (node) {
|
|
461
|
-
return node.mark(_this5.mark.removeFromSet(node.marks));
|
|
462
|
-
}, doc), oldSlice.openStart, oldSlice.openEnd);
|
|
463
|
-
return StepResult.fromReplace(doc, this.from, this.to, slice);
|
|
464
|
-
}
|
|
465
|
-
}, {
|
|
466
|
-
key: "invert",
|
|
467
|
-
value: function invert(doc) {
|
|
468
|
-
var _this6 = this;
|
|
469
|
-
var steps = [];
|
|
470
|
-
doc.nodesBetween(this.from, this.to, function (node, pos) {
|
|
471
|
-
if (node.isInline && node.isAtom && _this6.mark.isInSet(node.marks)) steps.push(new AddMarkStep(Math.max(_this6.from, pos), Math.min(_this6.to, pos + node.nodeSize), _this6.mark));
|
|
472
|
-
});
|
|
473
|
-
return steps.length == 0 ? new AddMarkStep(this.from, this.from, this.mark) : steps.length == 1 ? steps[0] : new MarkSetStep(steps);
|
|
474
|
-
}
|
|
475
|
-
}, {
|
|
476
|
-
key: "map",
|
|
477
|
-
value: function map(mapping) {
|
|
478
|
-
var from = mapping.map(this.from, 1),
|
|
479
|
-
to = mapping.map(this.to, -1);
|
|
480
|
-
if (from >= to) return null;
|
|
481
|
-
return new RemoveMarkStep(from, to, this.mark);
|
|
482
|
-
}
|
|
483
|
-
}, {
|
|
484
|
-
key: "merge",
|
|
485
|
-
value: function merge(other) {
|
|
486
|
-
if (other instanceof RemoveMarkStep && other.mark.eq(this.mark) && this.from <= other.to && this.to >= other.from) return new RemoveMarkStep(Math.min(this.from, other.from), Math.max(this.to, other.to), this.mark);
|
|
487
|
-
return null;
|
|
488
|
-
}
|
|
489
|
-
}, {
|
|
490
|
-
key: "toJSON",
|
|
491
|
-
value: function toJSON() {
|
|
492
|
-
return {
|
|
493
|
-
stepType: "removeMark",
|
|
494
|
-
mark: this.mark.toJSON(),
|
|
495
|
-
from: this.from,
|
|
496
|
-
to: this.to
|
|
497
|
-
};
|
|
498
|
-
}
|
|
499
|
-
}], [{
|
|
500
|
-
key: "fromJSON",
|
|
501
|
-
value: function fromJSON(schema, json) {
|
|
502
|
-
if (typeof json.from != "number" || typeof json.to != "number") throw new RangeError("Invalid input for RemoveMarkStep.fromJSON");
|
|
503
|
-
return new RemoveMarkStep(json.from, json.to, schema.markFromJSON(json.mark));
|
|
504
|
-
}
|
|
505
|
-
}]);
|
|
506
|
-
return RemoveMarkStep;
|
|
507
|
-
}(Step);
|
|
508
|
-
Step.jsonID("removeMark", RemoveMarkStep);
|
|
509
|
-
var MarkSetStep = function (_Step3) {
|
|
510
|
-
_inherits(MarkSetStep, _Step3);
|
|
511
|
-
var _super3 = _createSuper(MarkSetStep);
|
|
512
|
-
function MarkSetStep(steps) {
|
|
513
|
-
var _this7;
|
|
514
|
-
_classCallCheck(this, MarkSetStep);
|
|
515
|
-
_this7 = _super3.call(this);
|
|
516
|
-
_this7.steps = steps;
|
|
517
|
-
return _this7;
|
|
518
|
-
}
|
|
519
|
-
_createClass(MarkSetStep, [{
|
|
520
|
-
key: "apply",
|
|
521
|
-
value: function apply(doc) {
|
|
522
|
-
var _iterator2 = _createForOfIteratorHelper(this.steps),
|
|
523
|
-
_step2;
|
|
524
|
-
try {
|
|
525
|
-
for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
|
|
526
|
-
var step = _step2.value;
|
|
527
|
-
var result = step.apply(doc);
|
|
528
|
-
if (!result.doc) return result;
|
|
529
|
-
doc = result.doc;
|
|
530
|
-
}
|
|
531
|
-
} catch (err) {
|
|
532
|
-
_iterator2.e(err);
|
|
533
|
-
} finally {
|
|
534
|
-
_iterator2.f();
|
|
535
|
-
}
|
|
536
|
-
return new StepResult(doc, null);
|
|
537
|
-
}
|
|
538
|
-
}, {
|
|
539
|
-
key: "invert",
|
|
540
|
-
value: function invert(doc) {
|
|
541
|
-
return new MarkSetStep(this.steps.map(function (s) {
|
|
542
|
-
return s.invert(doc);
|
|
543
|
-
}));
|
|
544
|
-
}
|
|
545
|
-
}, {
|
|
546
|
-
key: "map",
|
|
547
|
-
value: function map(mapping) {
|
|
548
|
-
var result = [];
|
|
549
|
-
var _iterator3 = _createForOfIteratorHelper(this.steps),
|
|
550
|
-
_step3;
|
|
551
|
-
try {
|
|
552
|
-
for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {
|
|
553
|
-
var step = _step3.value;
|
|
554
|
-
var mapped = step.map(mapping);
|
|
555
|
-
if (mapped) result.push(mapped);
|
|
556
|
-
}
|
|
557
|
-
} catch (err) {
|
|
558
|
-
_iterator3.e(err);
|
|
559
|
-
} finally {
|
|
560
|
-
_iterator3.f();
|
|
561
|
-
}
|
|
562
|
-
return result.length ? new MarkSetStep(result) : null;
|
|
563
|
-
}
|
|
564
|
-
}, {
|
|
565
|
-
key: "toJSON",
|
|
566
|
-
value: function toJSON() {
|
|
567
|
-
return {
|
|
568
|
-
stepType: "markSet",
|
|
569
|
-
steps: this.steps.map(function (s) {
|
|
570
|
-
return s.toJSON();
|
|
571
|
-
})
|
|
572
|
-
};
|
|
573
|
-
}
|
|
574
|
-
}, {
|
|
575
|
-
key: "fromJSON",
|
|
576
|
-
value: function fromJSON(schema, json) {
|
|
577
|
-
if (!Array.isArray(json.steps) || !json.steps.every(function (s) {
|
|
578
|
-
return s.stepType == "addMark" || s.stepType == "removeMark";
|
|
579
|
-
})) throw new RangeError("Invalid JSON for MarkSetStep");
|
|
580
|
-
return new MarkSetStep(json.steps.map(function (s) {
|
|
581
|
-
return Step.fromJSON(schema, s);
|
|
582
|
-
}));
|
|
583
|
-
}
|
|
584
|
-
}]);
|
|
585
|
-
return MarkSetStep;
|
|
586
|
-
}(Step);
|
|
587
|
-
Step.jsonID("markSet", MarkSetStep);
|
|
588
|
-
var AddNodeMarkStep = function (_Step4) {
|
|
589
|
-
_inherits(AddNodeMarkStep, _Step4);
|
|
590
|
-
var _super4 = _createSuper(AddNodeMarkStep);
|
|
591
|
-
function AddNodeMarkStep(pos, mark) {
|
|
592
|
-
var _this8;
|
|
593
|
-
_classCallCheck(this, AddNodeMarkStep);
|
|
594
|
-
_this8 = _super4.call(this);
|
|
595
|
-
_this8.pos = pos;
|
|
596
|
-
_this8.mark = mark;
|
|
597
|
-
return _this8;
|
|
598
|
-
}
|
|
599
|
-
_createClass(AddNodeMarkStep, [{
|
|
600
|
-
key: "apply",
|
|
601
|
-
value: function apply(doc) {
|
|
602
|
-
var node = doc.nodeAt(this.pos);
|
|
603
|
-
if (!node) return StepResult.fail("No node at mark step's position");
|
|
604
|
-
var updated = node.type.create(node.attrs, null, this.mark.addToSet(node.marks));
|
|
605
|
-
return StepResult.fromReplace(doc, this.pos, this.pos + 1, new prosemirrorModel.Slice(prosemirrorModel.Fragment.from(updated), 0, node.isLeaf ? 0 : 1));
|
|
606
|
-
}
|
|
607
|
-
}, {
|
|
608
|
-
key: "invert",
|
|
609
|
-
value: function invert(doc) {
|
|
610
|
-
var node = doc.nodeAt(this.pos);
|
|
611
|
-
if (node) {
|
|
612
|
-
var newSet = this.mark.addToSet(node.marks);
|
|
613
|
-
if (newSet.length == node.marks.length) {
|
|
614
|
-
for (var i = 0; i < node.marks.length; i++) if (!node.marks[i].isInSet(newSet)) return new AddNodeMarkStep(this.pos, node.marks[i]);
|
|
615
|
-
return new AddNodeMarkStep(this.pos, this.mark);
|
|
616
|
-
}
|
|
617
|
-
}
|
|
618
|
-
return new RemoveNodeMarkStep(this.pos, this.mark);
|
|
619
|
-
}
|
|
620
|
-
}, {
|
|
621
|
-
key: "map",
|
|
622
|
-
value: function map(mapping) {
|
|
623
|
-
var pos = mapping.mapResult(this.pos, 1);
|
|
624
|
-
return pos.deletedAfter ? null : new AddNodeMarkStep(pos.pos, this.mark);
|
|
625
|
-
}
|
|
626
|
-
}, {
|
|
627
|
-
key: "toJSON",
|
|
628
|
-
value: function toJSON() {
|
|
629
|
-
return {
|
|
630
|
-
stepType: "addNodeMark",
|
|
631
|
-
pos: this.pos,
|
|
632
|
-
mark: this.mark.toJSON()
|
|
633
|
-
};
|
|
634
|
-
}
|
|
635
|
-
}], [{
|
|
636
|
-
key: "fromJSON",
|
|
637
|
-
value: function fromJSON(schema, json) {
|
|
638
|
-
if (typeof json.pos != "number") throw new RangeError("Invalid input for AddNodeMarkStep.fromJSON");
|
|
639
|
-
return new AddNodeMarkStep(json.pos, schema.markFromJSON(json.mark));
|
|
640
|
-
}
|
|
641
|
-
}]);
|
|
642
|
-
return AddNodeMarkStep;
|
|
643
|
-
}(Step);
|
|
644
|
-
Step.jsonID("addNodeMark", AddNodeMarkStep);
|
|
645
|
-
var RemoveNodeMarkStep = function (_Step5) {
|
|
646
|
-
_inherits(RemoveNodeMarkStep, _Step5);
|
|
647
|
-
var _super5 = _createSuper(RemoveNodeMarkStep);
|
|
648
|
-
function RemoveNodeMarkStep(pos, mark) {
|
|
649
|
-
var _this9;
|
|
650
|
-
_classCallCheck(this, RemoveNodeMarkStep);
|
|
651
|
-
_this9 = _super5.call(this);
|
|
652
|
-
_this9.pos = pos;
|
|
653
|
-
_this9.mark = mark;
|
|
654
|
-
return _this9;
|
|
655
|
-
}
|
|
656
|
-
_createClass(RemoveNodeMarkStep, [{
|
|
657
|
-
key: "apply",
|
|
658
|
-
value: function apply(doc) {
|
|
659
|
-
var node = doc.nodeAt(this.pos);
|
|
660
|
-
if (!node) return StepResult.fail("No node at mark step's position");
|
|
661
|
-
var updated = node.type.create(node.attrs, null, this.mark.removeFromSet(node.marks));
|
|
662
|
-
return StepResult.fromReplace(doc, this.pos, this.pos + 1, new prosemirrorModel.Slice(prosemirrorModel.Fragment.from(updated), 0, node.isLeaf ? 0 : 1));
|
|
663
|
-
}
|
|
664
|
-
}, {
|
|
665
|
-
key: "invert",
|
|
666
|
-
value: function invert(doc) {
|
|
667
|
-
var node = doc.nodeAt(this.pos);
|
|
668
|
-
if (!node || !this.mark.isInSet(node.marks)) return this;
|
|
669
|
-
return new AddNodeMarkStep(this.pos, this.mark);
|
|
670
|
-
}
|
|
671
|
-
}, {
|
|
672
|
-
key: "map",
|
|
673
|
-
value: function map(mapping) {
|
|
674
|
-
var pos = mapping.mapResult(this.pos, 1);
|
|
675
|
-
return pos.deletedAfter ? null : new RemoveNodeMarkStep(pos.pos, this.mark);
|
|
676
|
-
}
|
|
677
|
-
}, {
|
|
678
|
-
key: "toJSON",
|
|
679
|
-
value: function toJSON() {
|
|
680
|
-
return {
|
|
681
|
-
stepType: "removeNodeMark",
|
|
682
|
-
pos: this.pos,
|
|
683
|
-
mark: this.mark.toJSON()
|
|
684
|
-
};
|
|
685
|
-
}
|
|
686
|
-
}], [{
|
|
687
|
-
key: "fromJSON",
|
|
688
|
-
value: function fromJSON(schema, json) {
|
|
689
|
-
if (typeof json.pos != "number") throw new RangeError("Invalid input for RemoveNodeMarkStep.fromJSON");
|
|
690
|
-
return new RemoveNodeMarkStep(json.pos, schema.markFromJSON(json.mark));
|
|
691
|
-
}
|
|
692
|
-
}]);
|
|
693
|
-
return RemoveNodeMarkStep;
|
|
694
|
-
}(Step);
|
|
695
|
-
Step.jsonID("removeNodeMark", RemoveNodeMarkStep);
|
|
696
|
-
var ReplaceStep = function (_Step6) {
|
|
697
|
-
_inherits(ReplaceStep, _Step6);
|
|
698
|
-
var _super6 = _createSuper(ReplaceStep);
|
|
699
|
-
function ReplaceStep(from, to, slice) {
|
|
700
|
-
var _this10;
|
|
701
|
-
var structure = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;
|
|
702
|
-
_classCallCheck(this, ReplaceStep);
|
|
703
|
-
_this10 = _super6.call(this);
|
|
704
|
-
_this10.from = from;
|
|
705
|
-
_this10.to = to;
|
|
706
|
-
_this10.slice = slice;
|
|
707
|
-
_this10.structure = structure;
|
|
708
|
-
return _this10;
|
|
709
|
-
}
|
|
710
|
-
_createClass(ReplaceStep, [{
|
|
711
|
-
key: "apply",
|
|
712
|
-
value: function apply(doc) {
|
|
713
|
-
if (this.structure && contentBetween(doc, this.from, this.to)) return StepResult.fail("Structure replace would overwrite content");
|
|
714
|
-
return StepResult.fromReplace(doc, this.from, this.to, this.slice);
|
|
715
|
-
}
|
|
716
|
-
}, {
|
|
717
|
-
key: "getMap",
|
|
718
|
-
value: function getMap() {
|
|
719
|
-
return new StepMap([this.from, this.to - this.from, this.slice.size]);
|
|
720
|
-
}
|
|
721
|
-
}, {
|
|
722
|
-
key: "invert",
|
|
723
|
-
value: function invert(doc) {
|
|
724
|
-
return new ReplaceStep(this.from, this.from + this.slice.size, doc.slice(this.from, this.to));
|
|
725
|
-
}
|
|
726
|
-
}, {
|
|
727
|
-
key: "map",
|
|
728
|
-
value: function map(mapping) {
|
|
729
|
-
var to = mapping.mapResult(this.to, -1);
|
|
730
|
-
var from = this.from == this.to && ReplaceStep.MAP_BIAS < 0 ? to : mapping.mapResult(this.from, 1);
|
|
731
|
-
if (from.deletedAcross && to.deletedAcross) return null;
|
|
732
|
-
return new ReplaceStep(from.pos, Math.max(from.pos, to.pos), this.slice, this.structure);
|
|
733
|
-
}
|
|
734
|
-
}, {
|
|
735
|
-
key: "merge",
|
|
736
|
-
value: function merge(other) {
|
|
737
|
-
if (!(other instanceof ReplaceStep) || other.structure || this.structure) return null;
|
|
738
|
-
if (this.from + this.slice.size == other.from && !this.slice.openEnd && !other.slice.openStart) {
|
|
739
|
-
var slice = this.slice.size + other.slice.size == 0 ? prosemirrorModel.Slice.empty : new prosemirrorModel.Slice(this.slice.content.append(other.slice.content), this.slice.openStart, other.slice.openEnd);
|
|
740
|
-
return new ReplaceStep(this.from, this.to + (other.to - other.from), slice, this.structure);
|
|
741
|
-
} else if (other.to == this.from && !this.slice.openStart && !other.slice.openEnd) {
|
|
742
|
-
var _slice = this.slice.size + other.slice.size == 0 ? prosemirrorModel.Slice.empty : new prosemirrorModel.Slice(other.slice.content.append(this.slice.content), other.slice.openStart, this.slice.openEnd);
|
|
743
|
-
return new ReplaceStep(other.from, this.to, _slice, this.structure);
|
|
744
|
-
} else {
|
|
745
|
-
return null;
|
|
746
|
-
}
|
|
747
|
-
}
|
|
748
|
-
}, {
|
|
749
|
-
key: "toJSON",
|
|
750
|
-
value: function toJSON() {
|
|
751
|
-
var json = {
|
|
752
|
-
stepType: "replace",
|
|
753
|
-
from: this.from,
|
|
754
|
-
to: this.to
|
|
755
|
-
};
|
|
756
|
-
if (this.slice.size) json.slice = this.slice.toJSON();
|
|
757
|
-
if (this.structure) json.structure = true;
|
|
758
|
-
return json;
|
|
759
|
-
}
|
|
760
|
-
}], [{
|
|
761
|
-
key: "fromJSON",
|
|
762
|
-
value: function fromJSON(schema, json) {
|
|
763
|
-
if (typeof json.from != "number" || typeof json.to != "number") throw new RangeError("Invalid input for ReplaceStep.fromJSON");
|
|
764
|
-
return new ReplaceStep(json.from, json.to, prosemirrorModel.Slice.fromJSON(schema, json.slice), !!json.structure);
|
|
765
|
-
}
|
|
766
|
-
}]);
|
|
767
|
-
return ReplaceStep;
|
|
768
|
-
}(Step);
|
|
769
|
-
ReplaceStep.MAP_BIAS = 1;
|
|
770
|
-
Step.jsonID("replace", ReplaceStep);
|
|
771
|
-
var ReplaceAroundStep = function (_Step7) {
|
|
772
|
-
_inherits(ReplaceAroundStep, _Step7);
|
|
773
|
-
var _super7 = _createSuper(ReplaceAroundStep);
|
|
774
|
-
function ReplaceAroundStep(from, to, gapFrom, gapTo, slice, insert) {
|
|
775
|
-
var _this11;
|
|
776
|
-
var structure = arguments.length > 6 && arguments[6] !== undefined ? arguments[6] : false;
|
|
777
|
-
_classCallCheck(this, ReplaceAroundStep);
|
|
778
|
-
_this11 = _super7.call(this);
|
|
779
|
-
_this11.from = from;
|
|
780
|
-
_this11.to = to;
|
|
781
|
-
_this11.gapFrom = gapFrom;
|
|
782
|
-
_this11.gapTo = gapTo;
|
|
783
|
-
_this11.slice = slice;
|
|
784
|
-
_this11.insert = insert;
|
|
785
|
-
_this11.structure = structure;
|
|
786
|
-
return _this11;
|
|
787
|
-
}
|
|
788
|
-
_createClass(ReplaceAroundStep, [{
|
|
789
|
-
key: "apply",
|
|
790
|
-
value: function apply(doc) {
|
|
791
|
-
if (this.structure && (contentBetween(doc, this.from, this.gapFrom) || contentBetween(doc, this.gapTo, this.to))) return StepResult.fail("Structure gap-replace would overwrite content");
|
|
792
|
-
var gap = doc.slice(this.gapFrom, this.gapTo);
|
|
793
|
-
if (gap.openStart || gap.openEnd) return StepResult.fail("Gap is not a flat range");
|
|
794
|
-
var inserted = this.slice.insertAt(this.insert, gap.content);
|
|
795
|
-
if (!inserted) return StepResult.fail("Content does not fit in gap");
|
|
796
|
-
return StepResult.fromReplace(doc, this.from, this.to, inserted);
|
|
797
|
-
}
|
|
798
|
-
}, {
|
|
799
|
-
key: "getMap",
|
|
800
|
-
value: function getMap() {
|
|
801
|
-
return new StepMap([this.from, this.gapFrom - this.from, this.insert, this.gapTo, this.to - this.gapTo, this.slice.size - this.insert]);
|
|
802
|
-
}
|
|
803
|
-
}, {
|
|
804
|
-
key: "invert",
|
|
805
|
-
value: function invert(doc) {
|
|
806
|
-
var gap = this.gapTo - this.gapFrom;
|
|
807
|
-
return new ReplaceAroundStep(this.from, this.from + this.slice.size + gap, this.from + this.insert, this.from + this.insert + gap, doc.slice(this.from, this.to).removeBetween(this.gapFrom - this.from, this.gapTo - this.from), this.gapFrom - this.from, this.structure);
|
|
808
|
-
}
|
|
809
|
-
}, {
|
|
810
|
-
key: "map",
|
|
811
|
-
value: function map(mapping) {
|
|
812
|
-
var from = mapping.mapResult(this.from, 1),
|
|
813
|
-
to = mapping.mapResult(this.to, -1);
|
|
814
|
-
var gapFrom = this.from == this.gapFrom ? from.pos : mapping.map(this.gapFrom, -1);
|
|
815
|
-
var gapTo = this.to == this.gapTo ? to.pos : mapping.map(this.gapTo, 1);
|
|
816
|
-
if (from.deletedAcross && to.deletedAcross || gapFrom < from.pos || gapTo > to.pos) return null;
|
|
817
|
-
return new ReplaceAroundStep(from.pos, to.pos, gapFrom, gapTo, this.slice, this.insert, this.structure);
|
|
818
|
-
}
|
|
819
|
-
}, {
|
|
820
|
-
key: "toJSON",
|
|
821
|
-
value: function toJSON() {
|
|
822
|
-
var json = {
|
|
823
|
-
stepType: "replaceAround",
|
|
824
|
-
from: this.from,
|
|
825
|
-
to: this.to,
|
|
826
|
-
gapFrom: this.gapFrom,
|
|
827
|
-
gapTo: this.gapTo,
|
|
828
|
-
insert: this.insert
|
|
829
|
-
};
|
|
830
|
-
if (this.slice.size) json.slice = this.slice.toJSON();
|
|
831
|
-
if (this.structure) json.structure = true;
|
|
832
|
-
return json;
|
|
833
|
-
}
|
|
834
|
-
}], [{
|
|
835
|
-
key: "fromJSON",
|
|
836
|
-
value: function fromJSON(schema, json) {
|
|
837
|
-
if (typeof json.from != "number" || typeof json.to != "number" || typeof json.gapFrom != "number" || typeof json.gapTo != "number" || typeof json.insert != "number") throw new RangeError("Invalid input for ReplaceAroundStep.fromJSON");
|
|
838
|
-
return new ReplaceAroundStep(json.from, json.to, json.gapFrom, json.gapTo, prosemirrorModel.Slice.fromJSON(schema, json.slice), json.insert, !!json.structure);
|
|
839
|
-
}
|
|
840
|
-
}]);
|
|
841
|
-
return ReplaceAroundStep;
|
|
842
|
-
}(Step);
|
|
843
|
-
Step.jsonID("replaceAround", ReplaceAroundStep);
|
|
844
|
-
function contentBetween(doc, from, to) {
|
|
845
|
-
var $from = doc.resolve(from),
|
|
846
|
-
dist = to - from,
|
|
847
|
-
depth = $from.depth;
|
|
848
|
-
while (dist > 0 && depth > 0 && $from.indexAfter(depth) == $from.node(depth).childCount) {
|
|
849
|
-
depth--;
|
|
850
|
-
dist--;
|
|
851
|
-
}
|
|
852
|
-
if (dist > 0) {
|
|
853
|
-
var next = $from.node(depth).maybeChild($from.indexAfter(depth));
|
|
854
|
-
while (dist > 0) {
|
|
855
|
-
if (!next || next.isLeaf) return true;
|
|
856
|
-
next = next.firstChild;
|
|
857
|
-
dist--;
|
|
858
|
-
}
|
|
859
|
-
}
|
|
860
|
-
return false;
|
|
861
|
-
}
|
|
862
|
-
function _addMark(tr, from, to, mark) {
|
|
863
|
-
var added = [],
|
|
864
|
-
adding;
|
|
865
|
-
tr.doc.nodesBetween(from, to, function (node, pos, parent) {
|
|
866
|
-
if (!node.isInline) return;
|
|
867
|
-
var marks = node.marks;
|
|
868
|
-
if (!mark.isInSet(marks) && parent.type.allowsMarkType(mark.type)) {
|
|
869
|
-
var start = Math.max(pos, from),
|
|
870
|
-
end = Math.min(pos + node.nodeSize, to);
|
|
871
|
-
if (adding && adding.to == start) adding.to = end;else added.push(adding = new AddMarkStep(start, end, mark));
|
|
872
|
-
}
|
|
873
|
-
});
|
|
874
|
-
added.forEach(function (s) {
|
|
875
|
-
return tr.step(s);
|
|
876
|
-
});
|
|
877
|
-
}
|
|
878
|
-
function _removeMark(tr, from, to, mark) {
|
|
879
|
-
var matched = [],
|
|
880
|
-
step = 0;
|
|
881
|
-
tr.doc.nodesBetween(from, to, function (node, pos) {
|
|
882
|
-
if (!node.isInline || !node.isAtom) return;
|
|
883
|
-
step++;
|
|
884
|
-
var toRemove = null;
|
|
885
|
-
if (mark instanceof prosemirrorModel.MarkType) {
|
|
886
|
-
var set = node.marks,
|
|
887
|
-
found;
|
|
888
|
-
while (found = mark.isInSet(set)) {
|
|
889
|
-
(toRemove || (toRemove = [])).push(found);
|
|
890
|
-
set = found.removeFromSet(set);
|
|
891
|
-
}
|
|
892
|
-
} else if (mark) {
|
|
893
|
-
if (mark.isInSet(node.marks)) toRemove = [mark];
|
|
894
|
-
} else {
|
|
895
|
-
toRemove = node.marks;
|
|
896
|
-
}
|
|
897
|
-
if (toRemove && toRemove.length) {
|
|
898
|
-
var end = Math.min(pos + node.nodeSize, to);
|
|
899
|
-
for (var i = 0; i < toRemove.length; i++) {
|
|
900
|
-
var style = toRemove[i],
|
|
901
|
-
_found = void 0;
|
|
902
|
-
for (var j = 0; j < matched.length; j++) {
|
|
903
|
-
var m = matched[j];
|
|
904
|
-
if (m.step == step - 1 && style.eq(matched[j].style)) _found = m;
|
|
905
|
-
}
|
|
906
|
-
if (_found) {
|
|
907
|
-
_found.to = end;
|
|
908
|
-
_found.step = step;
|
|
909
|
-
} else {
|
|
910
|
-
matched.push({
|
|
911
|
-
style: style,
|
|
912
|
-
from: Math.max(pos, from),
|
|
913
|
-
to: end,
|
|
914
|
-
step: step
|
|
915
|
-
});
|
|
916
|
-
}
|
|
917
|
-
}
|
|
918
|
-
}
|
|
919
|
-
});
|
|
920
|
-
matched.forEach(function (m) {
|
|
921
|
-
return tr.step(new RemoveMarkStep(m.from, m.to, m.style));
|
|
922
|
-
});
|
|
923
|
-
}
|
|
924
|
-
function _clearIncompatible(tr, pos, parentType) {
|
|
925
|
-
var match = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : parentType.contentMatch;
|
|
926
|
-
var clearNewlines = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : true;
|
|
927
|
-
var node = tr.doc.nodeAt(pos);
|
|
928
|
-
var replSteps = [],
|
|
929
|
-
cur = pos + 1;
|
|
930
|
-
for (var i = 0; i < node.childCount; i++) {
|
|
931
|
-
var child = node.child(i),
|
|
932
|
-
end = cur + child.nodeSize;
|
|
933
|
-
var allowed = match.matchType(child.type);
|
|
934
|
-
if (!allowed) {
|
|
935
|
-
replSteps.push(new ReplaceStep(cur, end, prosemirrorModel.Slice.empty));
|
|
936
|
-
} else {
|
|
937
|
-
match = allowed;
|
|
938
|
-
for (var j = 0; j < child.marks.length; j++) if (!parentType.allowsMarkType(child.marks[j].type)) tr.step(new RemoveMarkStep(cur, end, child.marks[j]));
|
|
939
|
-
if (clearNewlines && child.isText && parentType.whitespace != "pre") {
|
|
940
|
-
var m = void 0,
|
|
941
|
-
newline = /\r?\n|\r/g,
|
|
942
|
-
slice = void 0;
|
|
943
|
-
while (m = newline.exec(child.text)) {
|
|
944
|
-
if (!slice) slice = new prosemirrorModel.Slice(prosemirrorModel.Fragment.from(parentType.schema.text(" ", parentType.allowedMarks(child.marks))), 0, 0);
|
|
945
|
-
replSteps.push(new ReplaceStep(cur + m.index, cur + m.index + m[0].length, slice));
|
|
946
|
-
}
|
|
947
|
-
}
|
|
948
|
-
}
|
|
949
|
-
cur = end;
|
|
950
|
-
}
|
|
951
|
-
if (!match.validEnd) {
|
|
952
|
-
var fill = match.fillBefore(prosemirrorModel.Fragment.empty, true);
|
|
953
|
-
tr.replace(cur, cur, new prosemirrorModel.Slice(fill, 0, 0));
|
|
954
|
-
}
|
|
955
|
-
for (var _i = replSteps.length - 1; _i >= 0; _i--) tr.step(replSteps[_i]);
|
|
956
|
-
}
|
|
957
|
-
function canCut(node, start, end) {
|
|
958
|
-
return (start == 0 || node.canReplace(start, node.childCount)) && (end == node.childCount || node.canReplace(0, end));
|
|
959
|
-
}
|
|
960
|
-
function liftTarget(range) {
|
|
961
|
-
var parent = range.parent;
|
|
962
|
-
var content = parent.content.cutByIndex(range.startIndex, range.endIndex);
|
|
963
|
-
for (var depth = range.depth, contentBefore = 0, contentAfter = 0;; --depth) {
|
|
964
|
-
var node = range.$from.node(depth);
|
|
965
|
-
var index = range.$from.index(depth) + contentBefore,
|
|
966
|
-
endIndex = range.$to.indexAfter(depth) - contentAfter;
|
|
967
|
-
if (depth < range.depth && node.canReplace(index, endIndex, content)) return depth;
|
|
968
|
-
if (depth == 0 || node.type.spec.isolating || !canCut(node, index, endIndex)) break;
|
|
969
|
-
if (index) contentBefore = 1;
|
|
970
|
-
if (endIndex < node.childCount) contentAfter = 1;
|
|
971
|
-
}
|
|
972
|
-
return null;
|
|
973
|
-
}
|
|
974
|
-
function _lift(tr, range, target) {
|
|
975
|
-
var $from = range.$from,
|
|
976
|
-
$to = range.$to,
|
|
977
|
-
depth = range.depth;
|
|
978
|
-
var gapStart = $from.before(depth + 1),
|
|
979
|
-
gapEnd = $to.after(depth + 1);
|
|
980
|
-
var start = gapStart,
|
|
981
|
-
end = gapEnd;
|
|
982
|
-
var before = prosemirrorModel.Fragment.empty,
|
|
983
|
-
openStart = 0;
|
|
984
|
-
for (var d = depth, splitting = false; d > target; d--) if (splitting || $from.index(d) > 0) {
|
|
985
|
-
splitting = true;
|
|
986
|
-
before = prosemirrorModel.Fragment.from($from.node(d).copy(before));
|
|
987
|
-
openStart++;
|
|
988
|
-
} else {
|
|
989
|
-
start--;
|
|
990
|
-
}
|
|
991
|
-
var after = prosemirrorModel.Fragment.empty,
|
|
992
|
-
openEnd = 0;
|
|
993
|
-
for (var _d = depth, _splitting = false; _d > target; _d--) if (_splitting || $to.after(_d + 1) < $to.end(_d)) {
|
|
994
|
-
_splitting = true;
|
|
995
|
-
after = prosemirrorModel.Fragment.from($to.node(_d).copy(after));
|
|
996
|
-
openEnd++;
|
|
997
|
-
} else {
|
|
998
|
-
end++;
|
|
999
|
-
}
|
|
1000
|
-
tr.step(new ReplaceAroundStep(start, end, gapStart, gapEnd, new prosemirrorModel.Slice(before.append(after), openStart, openEnd), before.size - openStart, true));
|
|
1001
|
-
}
|
|
1002
|
-
function findWrapping(range, nodeType) {
|
|
1003
|
-
var attrs = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;
|
|
1004
|
-
var innerRange = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : range;
|
|
1005
|
-
var around = findWrappingOutside(range, nodeType);
|
|
1006
|
-
var inner = around && findWrappingInside(innerRange, nodeType);
|
|
1007
|
-
if (!inner) return null;
|
|
1008
|
-
return around.map(withAttrs).concat({
|
|
1009
|
-
type: nodeType,
|
|
1010
|
-
attrs: attrs
|
|
1011
|
-
}).concat(inner.map(withAttrs));
|
|
1012
|
-
}
|
|
1013
|
-
function withAttrs(type) {
|
|
1014
|
-
return {
|
|
1015
|
-
type: type,
|
|
1016
|
-
attrs: null
|
|
1017
|
-
};
|
|
1018
|
-
}
|
|
1019
|
-
function findWrappingOutside(range, type) {
|
|
1020
|
-
var parent = range.parent,
|
|
1021
|
-
startIndex = range.startIndex,
|
|
1022
|
-
endIndex = range.endIndex;
|
|
1023
|
-
var around = parent.contentMatchAt(startIndex).findWrapping(type);
|
|
1024
|
-
if (!around) return null;
|
|
1025
|
-
var outer = around.length ? around[0] : type;
|
|
1026
|
-
return parent.canReplaceWith(startIndex, endIndex, outer) ? around : null;
|
|
1027
|
-
}
|
|
1028
|
-
function findWrappingInside(range, type) {
|
|
1029
|
-
var parent = range.parent,
|
|
1030
|
-
startIndex = range.startIndex,
|
|
1031
|
-
endIndex = range.endIndex;
|
|
1032
|
-
var inner = parent.child(startIndex);
|
|
1033
|
-
var inside = type.contentMatch.findWrapping(inner.type);
|
|
1034
|
-
if (!inside) return null;
|
|
1035
|
-
var lastType = inside.length ? inside[inside.length - 1] : type;
|
|
1036
|
-
var innerMatch = lastType.contentMatch;
|
|
1037
|
-
for (var i = startIndex; innerMatch && i < endIndex; i++) innerMatch = innerMatch.matchType(parent.child(i).type);
|
|
1038
|
-
if (!innerMatch || !innerMatch.validEnd) return null;
|
|
1039
|
-
return inside;
|
|
1040
|
-
}
|
|
1041
|
-
function _wrap2(tr, range, wrappers) {
|
|
1042
|
-
var content = prosemirrorModel.Fragment.empty;
|
|
1043
|
-
for (var i = wrappers.length - 1; i >= 0; i--) {
|
|
1044
|
-
if (content.size) {
|
|
1045
|
-
var match = wrappers[i].type.contentMatch.matchFragment(content);
|
|
1046
|
-
if (!match || !match.validEnd) throw new RangeError("Wrapper type given to Transform.wrap does not form valid content of its parent wrapper");
|
|
1047
|
-
}
|
|
1048
|
-
content = prosemirrorModel.Fragment.from(wrappers[i].type.create(wrappers[i].attrs, content));
|
|
1049
|
-
}
|
|
1050
|
-
var start = range.start,
|
|
1051
|
-
end = range.end;
|
|
1052
|
-
tr.step(new ReplaceAroundStep(start, end, start, end, new prosemirrorModel.Slice(content, 0, 0), wrappers.length, true));
|
|
1053
|
-
}
|
|
1054
|
-
function _setBlockType(tr, from, to, type, attrs) {
|
|
1055
|
-
if (!type.isTextblock) throw new RangeError("Type given to setBlockType should be a textblock");
|
|
1056
|
-
var mapFrom = tr.steps.length;
|
|
1057
|
-
tr.doc.nodesBetween(from, to, function (node, pos) {
|
|
1058
|
-
var attrsHere = typeof attrs == "function" ? attrs(node) : attrs;
|
|
1059
|
-
if (node.isTextblock && !node.hasMarkup(type, attrsHere) && canChangeType(tr.doc, tr.mapping.slice(mapFrom).map(pos), type)) {
|
|
1060
|
-
var convertNewlines = null;
|
|
1061
|
-
if (type.schema.linebreakReplacement) {
|
|
1062
|
-
var pre = type.whitespace == "pre",
|
|
1063
|
-
supportLinebreak = !!type.contentMatch.matchType(type.schema.linebreakReplacement);
|
|
1064
|
-
if (pre && !supportLinebreak) convertNewlines = false;else if (!pre && supportLinebreak) convertNewlines = true;
|
|
1065
|
-
}
|
|
1066
|
-
if (convertNewlines === false) replaceLinebreaks(tr, node, pos, mapFrom);
|
|
1067
|
-
_clearIncompatible(tr, tr.mapping.slice(mapFrom).map(pos, 1), type, undefined, convertNewlines === null);
|
|
1068
|
-
var mapping = tr.mapping.slice(mapFrom);
|
|
1069
|
-
var startM = mapping.map(pos, 1),
|
|
1070
|
-
endM = mapping.map(pos + node.nodeSize, 1);
|
|
1071
|
-
tr.step(new ReplaceAroundStep(startM, endM, startM + 1, endM - 1, new prosemirrorModel.Slice(prosemirrorModel.Fragment.from(type.create(attrsHere, null, node.marks)), 0, 0), 1, true));
|
|
1072
|
-
if (convertNewlines === true) replaceNewlines(tr, node, pos, mapFrom);
|
|
1073
|
-
return false;
|
|
1074
|
-
}
|
|
1075
|
-
});
|
|
1076
|
-
}
|
|
1077
|
-
function replaceNewlines(tr, node, pos, mapFrom) {
|
|
1078
|
-
node.forEach(function (child, offset) {
|
|
1079
|
-
if (child.isText) {
|
|
1080
|
-
var m,
|
|
1081
|
-
newline = /\r?\n|\r/g;
|
|
1082
|
-
while (m = newline.exec(child.text)) {
|
|
1083
|
-
var start = tr.mapping.slice(mapFrom).map(pos + 1 + offset + m.index);
|
|
1084
|
-
tr.replaceWith(start, start + 1, node.type.schema.linebreakReplacement.create());
|
|
1085
|
-
}
|
|
1086
|
-
}
|
|
1087
|
-
});
|
|
1088
|
-
}
|
|
1089
|
-
function replaceLinebreaks(tr, node, pos, mapFrom) {
|
|
1090
|
-
node.forEach(function (child, offset) {
|
|
1091
|
-
if (child.type == child.type.schema.linebreakReplacement) {
|
|
1092
|
-
var start = tr.mapping.slice(mapFrom).map(pos + 1 + offset);
|
|
1093
|
-
tr.replaceWith(start, start + 1, node.type.schema.text("\n"));
|
|
1094
|
-
}
|
|
1095
|
-
});
|
|
1096
|
-
}
|
|
1097
|
-
function canChangeType(doc, pos, type) {
|
|
1098
|
-
var $pos = doc.resolve(pos),
|
|
1099
|
-
index = $pos.index();
|
|
1100
|
-
return $pos.parent.canReplaceWith(index, index + 1, type);
|
|
1101
|
-
}
|
|
1102
|
-
function _setNodeMarkup(tr, pos, type, attrs, marks) {
|
|
1103
|
-
var node = tr.doc.nodeAt(pos);
|
|
1104
|
-
if (!node) throw new RangeError("No node at given position");
|
|
1105
|
-
if (!type) type = node.type;
|
|
1106
|
-
var newNode = type.create(attrs, null, marks || node.marks);
|
|
1107
|
-
if (node.isLeaf) return tr.replaceWith(pos, pos + node.nodeSize, newNode);
|
|
1108
|
-
if (!type.validContent(node.content)) throw new RangeError("Invalid content for node type " + type.name);
|
|
1109
|
-
tr.step(new ReplaceAroundStep(pos, pos + node.nodeSize, pos + 1, pos + node.nodeSize - 1, new prosemirrorModel.Slice(prosemirrorModel.Fragment.from(newNode), 0, 0), 1, true));
|
|
1110
|
-
}
|
|
1111
|
-
function canSplit(doc, pos) {
|
|
1112
|
-
var depth = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 1;
|
|
1113
|
-
var typesAfter = arguments.length > 3 ? arguments[3] : undefined;
|
|
1114
|
-
var $pos = doc.resolve(pos),
|
|
1115
|
-
base = $pos.depth - depth;
|
|
1116
|
-
var innerType = typesAfter && typesAfter[typesAfter.length - 1] || $pos.parent;
|
|
1117
|
-
if (base < 0 || $pos.parent.type.spec.isolating || !$pos.parent.canReplace($pos.index(), $pos.parent.childCount) || !innerType.type.validContent($pos.parent.content.cutByIndex($pos.index(), $pos.parent.childCount))) return false;
|
|
1118
|
-
for (var d = $pos.depth - 1, i = depth - 2; d > base; d--, i--) {
|
|
1119
|
-
var node = $pos.node(d),
|
|
1120
|
-
_index = $pos.index(d);
|
|
1121
|
-
if (node.type.spec.isolating) return false;
|
|
1122
|
-
var rest = node.content.cutByIndex(_index, node.childCount);
|
|
1123
|
-
var overrideChild = typesAfter && typesAfter[i + 1];
|
|
1124
|
-
if (overrideChild) rest = rest.replaceChild(0, overrideChild.type.create(overrideChild.attrs));
|
|
1125
|
-
var after = typesAfter && typesAfter[i] || node;
|
|
1126
|
-
if (!node.canReplace(_index + 1, node.childCount) || !after.type.validContent(rest)) return false;
|
|
1127
|
-
}
|
|
1128
|
-
var index = $pos.indexAfter(base);
|
|
1129
|
-
var baseType = typesAfter && typesAfter[0];
|
|
1130
|
-
return $pos.node(base).canReplaceWith(index, index, baseType ? baseType.type : $pos.node(base + 1).type);
|
|
1131
|
-
}
|
|
1132
|
-
function _split(tr, pos) {
|
|
1133
|
-
var depth = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 1;
|
|
1134
|
-
var typesAfter = arguments.length > 3 ? arguments[3] : undefined;
|
|
1135
|
-
var $pos = tr.doc.resolve(pos),
|
|
1136
|
-
before = prosemirrorModel.Fragment.empty,
|
|
1137
|
-
after = prosemirrorModel.Fragment.empty;
|
|
1138
|
-
for (var d = $pos.depth, e = $pos.depth - depth, i = depth - 1; d > e; d--, i--) {
|
|
1139
|
-
before = prosemirrorModel.Fragment.from($pos.node(d).copy(before));
|
|
1140
|
-
var typeAfter = typesAfter && typesAfter[i];
|
|
1141
|
-
after = prosemirrorModel.Fragment.from(typeAfter ? typeAfter.type.create(typeAfter.attrs, after) : $pos.node(d).copy(after));
|
|
1142
|
-
}
|
|
1143
|
-
tr.step(new ReplaceStep(pos, pos, new prosemirrorModel.Slice(before.append(after), depth, depth), true));
|
|
1144
|
-
}
|
|
1145
|
-
function canJoin(doc, pos) {
|
|
1146
|
-
var $pos = doc.resolve(pos),
|
|
1147
|
-
index = $pos.index();
|
|
1148
|
-
return joinable($pos.nodeBefore, $pos.nodeAfter) && $pos.parent.canReplace(index, index + 1);
|
|
1149
|
-
}
|
|
1150
|
-
function canAppendWithSubstitutedLinebreaks(a, b) {
|
|
1151
|
-
if (!b.content.size) a.type.compatibleContent(b.type);
|
|
1152
|
-
var match = a.contentMatchAt(a.childCount);
|
|
1153
|
-
var linebreakReplacement = a.type.schema.linebreakReplacement;
|
|
1154
|
-
for (var i = 0; i < b.childCount; i++) {
|
|
1155
|
-
var child = b.child(i);
|
|
1156
|
-
var type = child.type == linebreakReplacement ? a.type.schema.nodes.text : child.type;
|
|
1157
|
-
match = match.matchType(type);
|
|
1158
|
-
if (!match) return false;
|
|
1159
|
-
if (!a.type.allowsMarks(child.marks)) return false;
|
|
1160
|
-
}
|
|
1161
|
-
return match.validEnd;
|
|
1162
|
-
}
|
|
1163
|
-
function joinable(a, b) {
|
|
1164
|
-
return !!(a && b && !a.isLeaf && canAppendWithSubstitutedLinebreaks(a, b));
|
|
1165
|
-
}
|
|
1166
|
-
function joinPoint(doc, pos) {
|
|
1167
|
-
var dir = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : -1;
|
|
1168
|
-
var $pos = doc.resolve(pos);
|
|
1169
|
-
for (var d = $pos.depth;; d--) {
|
|
1170
|
-
var before = void 0,
|
|
1171
|
-
after = void 0,
|
|
1172
|
-
index = $pos.index(d);
|
|
1173
|
-
if (d == $pos.depth) {
|
|
1174
|
-
before = $pos.nodeBefore;
|
|
1175
|
-
after = $pos.nodeAfter;
|
|
1176
|
-
} else if (dir > 0) {
|
|
1177
|
-
before = $pos.node(d + 1);
|
|
1178
|
-
index++;
|
|
1179
|
-
after = $pos.node(d).maybeChild(index);
|
|
1180
|
-
} else {
|
|
1181
|
-
before = $pos.node(d).maybeChild(index - 1);
|
|
1182
|
-
after = $pos.node(d + 1);
|
|
1183
|
-
}
|
|
1184
|
-
if (before && !before.isTextblock && joinable(before, after) && $pos.node(d).canReplace(index, index + 1)) return pos;
|
|
1185
|
-
if (d == 0) break;
|
|
1186
|
-
pos = dir < 0 ? $pos.before(d) : $pos.after(d);
|
|
1187
|
-
}
|
|
1188
|
-
}
|
|
1189
|
-
function _join(tr, pos, depth) {
|
|
1190
|
-
var convertNewlines = null;
|
|
1191
|
-
var linebreakReplacement = tr.doc.type.schema.linebreakReplacement;
|
|
1192
|
-
var $before = tr.doc.resolve(pos - depth),
|
|
1193
|
-
beforeType = $before.node().type;
|
|
1194
|
-
if (linebreakReplacement && beforeType.inlineContent) {
|
|
1195
|
-
var pre = beforeType.whitespace == "pre";
|
|
1196
|
-
var supportLinebreak = !!beforeType.contentMatch.matchType(linebreakReplacement);
|
|
1197
|
-
if (pre && !supportLinebreak) convertNewlines = false;else if (!pre && supportLinebreak) convertNewlines = true;
|
|
1198
|
-
}
|
|
1199
|
-
var mapFrom = tr.steps.length;
|
|
1200
|
-
if (convertNewlines === false) {
|
|
1201
|
-
var $after = tr.doc.resolve(pos + depth);
|
|
1202
|
-
replaceLinebreaks(tr, $after.node(), $after.before(), mapFrom);
|
|
1203
|
-
}
|
|
1204
|
-
if (beforeType.inlineContent) _clearIncompatible(tr, pos + depth - 1, beforeType, $before.node().contentMatchAt($before.index()), convertNewlines == null);
|
|
1205
|
-
var mapping = tr.mapping.slice(mapFrom),
|
|
1206
|
-
start = mapping.map(pos - depth);
|
|
1207
|
-
tr.step(new ReplaceStep(start, mapping.map(pos + depth, -1), prosemirrorModel.Slice.empty, true));
|
|
1208
|
-
if (convertNewlines === true) {
|
|
1209
|
-
var $full = tr.doc.resolve(start);
|
|
1210
|
-
replaceNewlines(tr, $full.node(), $full.before(), tr.steps.length);
|
|
1211
|
-
}
|
|
1212
|
-
return tr;
|
|
1213
|
-
}
|
|
1214
|
-
function insertPoint(doc, pos, nodeType) {
|
|
1215
|
-
var $pos = doc.resolve(pos);
|
|
1216
|
-
if ($pos.parent.canReplaceWith($pos.index(), $pos.index(), nodeType)) return pos;
|
|
1217
|
-
if ($pos.parentOffset == 0) for (var d = $pos.depth - 1; d >= 0; d--) {
|
|
1218
|
-
var index = $pos.index(d);
|
|
1219
|
-
if ($pos.node(d).canReplaceWith(index, index, nodeType)) return $pos.before(d + 1);
|
|
1220
|
-
if (index > 0) return null;
|
|
1221
|
-
}
|
|
1222
|
-
if ($pos.parentOffset == $pos.parent.content.size) for (var _d2 = $pos.depth - 1; _d2 >= 0; _d2--) {
|
|
1223
|
-
var _index2 = $pos.indexAfter(_d2);
|
|
1224
|
-
if ($pos.node(_d2).canReplaceWith(_index2, _index2, nodeType)) return $pos.after(_d2 + 1);
|
|
1225
|
-
if (_index2 < $pos.node(_d2).childCount) return null;
|
|
1226
|
-
}
|
|
1227
|
-
return null;
|
|
1228
|
-
}
|
|
1229
|
-
function dropPoint(doc, pos, slice) {
|
|
1230
|
-
var $pos = doc.resolve(pos);
|
|
1231
|
-
if (!slice.content.size) return pos;
|
|
1232
|
-
var content = slice.content;
|
|
1233
|
-
for (var i = 0; i < slice.openStart; i++) content = content.firstChild.content;
|
|
1234
|
-
for (var pass = 1; pass <= (slice.openStart == 0 && slice.size ? 2 : 1); pass++) {
|
|
1235
|
-
for (var d = $pos.depth; d >= 0; d--) {
|
|
1236
|
-
var bias = d == $pos.depth ? 0 : $pos.pos <= ($pos.start(d + 1) + $pos.end(d + 1)) / 2 ? -1 : 1;
|
|
1237
|
-
var insertPos = $pos.index(d) + (bias > 0 ? 1 : 0);
|
|
1238
|
-
var parent = $pos.node(d),
|
|
1239
|
-
fits = false;
|
|
1240
|
-
if (pass == 1) {
|
|
1241
|
-
fits = parent.canReplace(insertPos, insertPos, content);
|
|
1242
|
-
} else {
|
|
1243
|
-
var wrapping = parent.contentMatchAt(insertPos).findWrapping(content.firstChild.type);
|
|
1244
|
-
fits = wrapping && parent.canReplaceWith(insertPos, insertPos, wrapping[0]);
|
|
1245
|
-
}
|
|
1246
|
-
if (fits) return bias == 0 ? $pos.pos : bias < 0 ? $pos.before(d + 1) : $pos.after(d + 1);
|
|
1247
|
-
}
|
|
1248
|
-
}
|
|
1249
|
-
return null;
|
|
1250
|
-
}
|
|
1251
|
-
function replaceStep(doc, from) {
|
|
1252
|
-
var to = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : from;
|
|
1253
|
-
var slice = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : prosemirrorModel.Slice.empty;
|
|
1254
|
-
if (from == to && !slice.size) return null;
|
|
1255
|
-
var $from = doc.resolve(from),
|
|
1256
|
-
$to = doc.resolve(to);
|
|
1257
|
-
if (fitsTrivially($from, $to, slice)) return new ReplaceStep(from, to, slice);
|
|
1258
|
-
return new Fitter($from, $to, slice).fit();
|
|
1259
|
-
}
|
|
1260
|
-
function fitsTrivially($from, $to, slice) {
|
|
1261
|
-
return !slice.openStart && !slice.openEnd && $from.start() == $to.start() && $from.parent.canReplace($from.index(), $to.index(), slice.content);
|
|
1262
|
-
}
|
|
1263
|
-
var Fitter = function () {
|
|
1264
|
-
function Fitter($from, $to, unplaced) {
|
|
1265
|
-
_classCallCheck(this, Fitter);
|
|
1266
|
-
this.$from = $from;
|
|
1267
|
-
this.$to = $to;
|
|
1268
|
-
this.unplaced = unplaced;
|
|
1269
|
-
this.frontier = [];
|
|
1270
|
-
this.placed = prosemirrorModel.Fragment.empty;
|
|
1271
|
-
for (var i = 0; i <= $from.depth; i++) {
|
|
1272
|
-
var node = $from.node(i);
|
|
1273
|
-
this.frontier.push({
|
|
1274
|
-
type: node.type,
|
|
1275
|
-
match: node.contentMatchAt($from.indexAfter(i))
|
|
1276
|
-
});
|
|
1277
|
-
}
|
|
1278
|
-
for (var _i2 = $from.depth; _i2 > 0; _i2--) this.placed = prosemirrorModel.Fragment.from($from.node(_i2).copy(this.placed));
|
|
1279
|
-
}
|
|
1280
|
-
_createClass(Fitter, [{
|
|
1281
|
-
key: "depth",
|
|
1282
|
-
get: function get() {
|
|
1283
|
-
return this.frontier.length - 1;
|
|
1284
|
-
}
|
|
1285
|
-
}, {
|
|
1286
|
-
key: "fit",
|
|
1287
|
-
value: function fit() {
|
|
1288
|
-
while (this.unplaced.size) {
|
|
1289
|
-
var fit = this.findFittable();
|
|
1290
|
-
if (fit) this.placeNodes(fit);else this.openMore() || this.dropNode();
|
|
1291
|
-
}
|
|
1292
|
-
var moveInline = this.mustMoveInline(),
|
|
1293
|
-
placedSize = this.placed.size - this.depth - this.$from.depth;
|
|
1294
|
-
var $from = this.$from,
|
|
1295
|
-
$to = this.close(moveInline < 0 ? this.$to : $from.doc.resolve(moveInline));
|
|
1296
|
-
if (!$to) return null;
|
|
1297
|
-
var content = this.placed,
|
|
1298
|
-
openStart = $from.depth,
|
|
1299
|
-
openEnd = $to.depth;
|
|
1300
|
-
while (openStart && openEnd && content.childCount == 1) {
|
|
1301
|
-
content = content.firstChild.content;
|
|
1302
|
-
openStart--;
|
|
1303
|
-
openEnd--;
|
|
1304
|
-
}
|
|
1305
|
-
var slice = new prosemirrorModel.Slice(content, openStart, openEnd);
|
|
1306
|
-
if (moveInline > -1) return new ReplaceAroundStep($from.pos, moveInline, this.$to.pos, this.$to.end(), slice, placedSize);
|
|
1307
|
-
if (slice.size || $from.pos != this.$to.pos) return new ReplaceStep($from.pos, $to.pos, slice);
|
|
1308
|
-
return null;
|
|
1309
|
-
}
|
|
1310
|
-
}, {
|
|
1311
|
-
key: "findFittable",
|
|
1312
|
-
value: function findFittable() {
|
|
1313
|
-
var startDepth = this.unplaced.openStart;
|
|
1314
|
-
for (var cur = this.unplaced.content, d = 0, openEnd = this.unplaced.openEnd; d < startDepth; d++) {
|
|
1315
|
-
var node = cur.firstChild;
|
|
1316
|
-
if (cur.childCount > 1) openEnd = 0;
|
|
1317
|
-
if (node.type.spec.isolating && openEnd <= d) {
|
|
1318
|
-
startDepth = d;
|
|
1319
|
-
break;
|
|
1320
|
-
}
|
|
1321
|
-
cur = node.content;
|
|
1322
|
-
}
|
|
1323
|
-
for (var pass = 1; pass <= 2; pass++) {
|
|
1324
|
-
for (var sliceDepth = pass == 1 ? startDepth : this.unplaced.openStart; sliceDepth >= 0; sliceDepth--) {
|
|
1325
|
-
var fragment = void 0,
|
|
1326
|
-
parent = null;
|
|
1327
|
-
if (sliceDepth) {
|
|
1328
|
-
parent = contentAt(this.unplaced.content, sliceDepth - 1).firstChild;
|
|
1329
|
-
fragment = parent.content;
|
|
1330
|
-
} else {
|
|
1331
|
-
fragment = this.unplaced.content;
|
|
1332
|
-
}
|
|
1333
|
-
var first = fragment.firstChild;
|
|
1334
|
-
for (var frontierDepth = this.depth; frontierDepth >= 0; frontierDepth--) {
|
|
1335
|
-
var _this$frontier$fronti = this.frontier[frontierDepth],
|
|
1336
|
-
type = _this$frontier$fronti.type,
|
|
1337
|
-
match = _this$frontier$fronti.match,
|
|
1338
|
-
_wrap = void 0,
|
|
1339
|
-
inject = null;
|
|
1340
|
-
if (pass == 1 && (first ? match.matchType(first.type) || (inject = match.fillBefore(prosemirrorModel.Fragment.from(first), false)) : parent && type.compatibleContent(parent.type))) return {
|
|
1341
|
-
sliceDepth: sliceDepth,
|
|
1342
|
-
frontierDepth: frontierDepth,
|
|
1343
|
-
parent: parent,
|
|
1344
|
-
inject: inject
|
|
1345
|
-
};else if (pass == 2 && first && (_wrap = match.findWrapping(first.type))) return {
|
|
1346
|
-
sliceDepth: sliceDepth,
|
|
1347
|
-
frontierDepth: frontierDepth,
|
|
1348
|
-
parent: parent,
|
|
1349
|
-
wrap: _wrap
|
|
1350
|
-
};
|
|
1351
|
-
if (parent && match.matchType(parent.type)) break;
|
|
1352
|
-
}
|
|
1353
|
-
}
|
|
1354
|
-
}
|
|
1355
|
-
}
|
|
1356
|
-
}, {
|
|
1357
|
-
key: "openMore",
|
|
1358
|
-
value: function openMore() {
|
|
1359
|
-
var _this$unplaced = this.unplaced,
|
|
1360
|
-
content = _this$unplaced.content,
|
|
1361
|
-
openStart = _this$unplaced.openStart,
|
|
1362
|
-
openEnd = _this$unplaced.openEnd;
|
|
1363
|
-
if (maxOpen(content, -1) <= openStart) return false;
|
|
1364
|
-
if (this.unplaced.size > 1 && maxOpen(content, 1) > openEnd) openEnd++;
|
|
1365
|
-
this.unplaced = new prosemirrorModel.Slice(content, openStart + 1, openEnd);
|
|
1366
|
-
return true;
|
|
1367
|
-
}
|
|
1368
|
-
}, {
|
|
1369
|
-
key: "dropNode",
|
|
1370
|
-
value: function dropNode() {
|
|
1371
|
-
var _this$unplaced2 = this.unplaced,
|
|
1372
|
-
content = _this$unplaced2.content,
|
|
1373
|
-
openStart = _this$unplaced2.openStart,
|
|
1374
|
-
openEnd = _this$unplaced2.openEnd;
|
|
1375
|
-
var inner = contentAt(content, openStart);
|
|
1376
|
-
if (inner.childCount <= 1 && openStart > 0) {
|
|
1377
|
-
var openAtEnd = content.size - openStart <= openStart + inner.size;
|
|
1378
|
-
this.unplaced = new prosemirrorModel.Slice(dropFromFragment(content, openStart - 1, 1), openStart - 1, openAtEnd ? openStart - 1 : openEnd);
|
|
1379
|
-
} else {
|
|
1380
|
-
this.unplaced = new prosemirrorModel.Slice(dropFromFragment(content, openStart, 1), openStart, openEnd);
|
|
1381
|
-
}
|
|
1382
|
-
}
|
|
1383
|
-
}, {
|
|
1384
|
-
key: "placeNodes",
|
|
1385
|
-
value: function placeNodes(_ref) {
|
|
1386
|
-
var sliceDepth = _ref.sliceDepth,
|
|
1387
|
-
frontierDepth = _ref.frontierDepth,
|
|
1388
|
-
parent = _ref.parent,
|
|
1389
|
-
inject = _ref.inject,
|
|
1390
|
-
wrap = _ref.wrap;
|
|
1391
|
-
while (this.depth > frontierDepth) this.closeFrontierNode();
|
|
1392
|
-
if (wrap) for (var i = 0; i < wrap.length; i++) this.openFrontierNode(wrap[i]);
|
|
1393
|
-
var slice = this.unplaced,
|
|
1394
|
-
fragment = parent ? parent.content : slice.content;
|
|
1395
|
-
var openStart = slice.openStart - sliceDepth;
|
|
1396
|
-
var taken = 0,
|
|
1397
|
-
add = [];
|
|
1398
|
-
var _this$frontier$fronti2 = this.frontier[frontierDepth],
|
|
1399
|
-
match = _this$frontier$fronti2.match,
|
|
1400
|
-
type = _this$frontier$fronti2.type;
|
|
1401
|
-
if (inject) {
|
|
1402
|
-
for (var _i3 = 0; _i3 < inject.childCount; _i3++) add.push(inject.child(_i3));
|
|
1403
|
-
match = match.matchFragment(inject);
|
|
1404
|
-
}
|
|
1405
|
-
var openEndCount = fragment.size + sliceDepth - (slice.content.size - slice.openEnd);
|
|
1406
|
-
while (taken < fragment.childCount) {
|
|
1407
|
-
var next = fragment.child(taken),
|
|
1408
|
-
matches = match.matchType(next.type);
|
|
1409
|
-
if (!matches) break;
|
|
1410
|
-
taken++;
|
|
1411
|
-
if (taken > 1 || openStart == 0 || next.content.size) {
|
|
1412
|
-
match = matches;
|
|
1413
|
-
add.push(closeNodeStart(next.mark(type.allowedMarks(next.marks)), taken == 1 ? openStart : 0, taken == fragment.childCount ? openEndCount : -1));
|
|
1414
|
-
}
|
|
1415
|
-
}
|
|
1416
|
-
var toEnd = taken == fragment.childCount;
|
|
1417
|
-
if (!toEnd) openEndCount = -1;
|
|
1418
|
-
this.placed = addToFragment(this.placed, frontierDepth, prosemirrorModel.Fragment.from(add));
|
|
1419
|
-
this.frontier[frontierDepth].match = match;
|
|
1420
|
-
if (toEnd && openEndCount < 0 && parent && parent.type == this.frontier[this.depth].type && this.frontier.length > 1) this.closeFrontierNode();
|
|
1421
|
-
for (var _i4 = 0, cur = fragment; _i4 < openEndCount; _i4++) {
|
|
1422
|
-
var node = cur.lastChild;
|
|
1423
|
-
this.frontier.push({
|
|
1424
|
-
type: node.type,
|
|
1425
|
-
match: node.contentMatchAt(node.childCount)
|
|
1426
|
-
});
|
|
1427
|
-
cur = node.content;
|
|
1428
|
-
}
|
|
1429
|
-
this.unplaced = !toEnd ? new prosemirrorModel.Slice(dropFromFragment(slice.content, sliceDepth, taken), slice.openStart, slice.openEnd) : sliceDepth == 0 ? prosemirrorModel.Slice.empty : new prosemirrorModel.Slice(dropFromFragment(slice.content, sliceDepth - 1, 1), sliceDepth - 1, openEndCount < 0 ? slice.openEnd : sliceDepth - 1);
|
|
1430
|
-
}
|
|
1431
|
-
}, {
|
|
1432
|
-
key: "mustMoveInline",
|
|
1433
|
-
value: function mustMoveInline() {
|
|
1434
|
-
if (!this.$to.parent.isTextblock) return -1;
|
|
1435
|
-
var top = this.frontier[this.depth],
|
|
1436
|
-
level;
|
|
1437
|
-
if (!top.type.isTextblock || !contentAfterFits(this.$to, this.$to.depth, top.type, top.match, false) || this.$to.depth == this.depth && (level = this.findCloseLevel(this.$to)) && level.depth == this.depth) return -1;
|
|
1438
|
-
var depth = this.$to.depth,
|
|
1439
|
-
after = this.$to.after(depth);
|
|
1440
|
-
while (depth > 1 && after == this.$to.end(--depth)) ++after;
|
|
1441
|
-
return after;
|
|
1442
|
-
}
|
|
1443
|
-
}, {
|
|
1444
|
-
key: "findCloseLevel",
|
|
1445
|
-
value: function findCloseLevel($to) {
|
|
1446
|
-
scan: for (var i = Math.min(this.depth, $to.depth); i >= 0; i--) {
|
|
1447
|
-
var _this$frontier$i = this.frontier[i],
|
|
1448
|
-
match = _this$frontier$i.match,
|
|
1449
|
-
type = _this$frontier$i.type;
|
|
1450
|
-
var dropInner = i < $to.depth && $to.end(i + 1) == $to.pos + ($to.depth - (i + 1));
|
|
1451
|
-
var fit = contentAfterFits($to, i, type, match, dropInner);
|
|
1452
|
-
if (!fit) continue;
|
|
1453
|
-
for (var d = i - 1; d >= 0; d--) {
|
|
1454
|
-
var _this$frontier$d = this.frontier[d],
|
|
1455
|
-
_match = _this$frontier$d.match,
|
|
1456
|
-
_type = _this$frontier$d.type;
|
|
1457
|
-
var matches = contentAfterFits($to, d, _type, _match, true);
|
|
1458
|
-
if (!matches || matches.childCount) continue scan;
|
|
1459
|
-
}
|
|
1460
|
-
return {
|
|
1461
|
-
depth: i,
|
|
1462
|
-
fit: fit,
|
|
1463
|
-
move: dropInner ? $to.doc.resolve($to.after(i + 1)) : $to
|
|
1464
|
-
};
|
|
1465
|
-
}
|
|
1466
|
-
}
|
|
1467
|
-
}, {
|
|
1468
|
-
key: "close",
|
|
1469
|
-
value: function close($to) {
|
|
1470
|
-
var close = this.findCloseLevel($to);
|
|
1471
|
-
if (!close) return null;
|
|
1472
|
-
while (this.depth > close.depth) this.closeFrontierNode();
|
|
1473
|
-
if (close.fit.childCount) this.placed = addToFragment(this.placed, close.depth, close.fit);
|
|
1474
|
-
$to = close.move;
|
|
1475
|
-
for (var d = close.depth + 1; d <= $to.depth; d++) {
|
|
1476
|
-
var node = $to.node(d),
|
|
1477
|
-
add = node.type.contentMatch.fillBefore(node.content, true, $to.index(d));
|
|
1478
|
-
this.openFrontierNode(node.type, node.attrs, add);
|
|
1479
|
-
}
|
|
1480
|
-
return $to;
|
|
1481
|
-
}
|
|
1482
|
-
}, {
|
|
1483
|
-
key: "openFrontierNode",
|
|
1484
|
-
value: function openFrontierNode(type) {
|
|
1485
|
-
var attrs = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
|
|
1486
|
-
var content = arguments.length > 2 ? arguments[2] : undefined;
|
|
1487
|
-
var top = this.frontier[this.depth];
|
|
1488
|
-
top.match = top.match.matchType(type);
|
|
1489
|
-
this.placed = addToFragment(this.placed, this.depth, prosemirrorModel.Fragment.from(type.create(attrs, content)));
|
|
1490
|
-
this.frontier.push({
|
|
1491
|
-
type: type,
|
|
1492
|
-
match: type.contentMatch
|
|
1493
|
-
});
|
|
1494
|
-
}
|
|
1495
|
-
}, {
|
|
1496
|
-
key: "closeFrontierNode",
|
|
1497
|
-
value: function closeFrontierNode() {
|
|
1498
|
-
var open = this.frontier.pop();
|
|
1499
|
-
var add = open.match.fillBefore(prosemirrorModel.Fragment.empty, true);
|
|
1500
|
-
if (add.childCount) this.placed = addToFragment(this.placed, this.frontier.length, add);
|
|
1501
|
-
}
|
|
1502
|
-
}]);
|
|
1503
|
-
return Fitter;
|
|
1504
|
-
}();
|
|
1505
|
-
function dropFromFragment(fragment, depth, count) {
|
|
1506
|
-
if (depth == 0) return fragment.cutByIndex(count, fragment.childCount);
|
|
1507
|
-
return fragment.replaceChild(0, fragment.firstChild.copy(dropFromFragment(fragment.firstChild.content, depth - 1, count)));
|
|
1508
|
-
}
|
|
1509
|
-
function addToFragment(fragment, depth, content) {
|
|
1510
|
-
if (depth == 0) return fragment.append(content);
|
|
1511
|
-
return fragment.replaceChild(fragment.childCount - 1, fragment.lastChild.copy(addToFragment(fragment.lastChild.content, depth - 1, content)));
|
|
1512
|
-
}
|
|
1513
|
-
function contentAt(fragment, depth) {
|
|
1514
|
-
for (var i = 0; i < depth; i++) fragment = fragment.firstChild.content;
|
|
1515
|
-
return fragment;
|
|
1516
|
-
}
|
|
1517
|
-
function closeNodeStart(node, openStart, openEnd) {
|
|
1518
|
-
if (openStart <= 0) return node;
|
|
1519
|
-
var frag = node.content;
|
|
1520
|
-
if (openStart > 1) frag = frag.replaceChild(0, closeNodeStart(frag.firstChild, openStart - 1, frag.childCount == 1 ? openEnd - 1 : 0));
|
|
1521
|
-
if (openStart > 0) {
|
|
1522
|
-
frag = node.type.contentMatch.fillBefore(frag).append(frag);
|
|
1523
|
-
if (openEnd <= 0) frag = frag.append(node.type.contentMatch.matchFragment(frag).fillBefore(prosemirrorModel.Fragment.empty, true));
|
|
1524
|
-
}
|
|
1525
|
-
return node.copy(frag);
|
|
1526
|
-
}
|
|
1527
|
-
function contentAfterFits($to, depth, type, match, open) {
|
|
1528
|
-
var node = $to.node(depth),
|
|
1529
|
-
index = open ? $to.indexAfter(depth) : $to.index(depth);
|
|
1530
|
-
if (index == node.childCount && !type.compatibleContent(node.type)) return null;
|
|
1531
|
-
var fit = match.fillBefore(node.content, true, index);
|
|
1532
|
-
return fit && !invalidMarks(type, node.content, index) ? fit : null;
|
|
1533
|
-
}
|
|
1534
|
-
function invalidMarks(type, fragment, start) {
|
|
1535
|
-
for (var i = start; i < fragment.childCount; i++) if (!type.allowsMarks(fragment.child(i).marks)) return true;
|
|
1536
|
-
return false;
|
|
1537
|
-
}
|
|
1538
|
-
function definesContent(type) {
|
|
1539
|
-
return type.spec.defining || type.spec.definingForContent;
|
|
1540
|
-
}
|
|
1541
|
-
function maxOpen(frag, side) {
|
|
1542
|
-
for (var count = 0;; count++) {
|
|
1543
|
-
var ch = side < 0 ? frag.firstChild : frag.lastChild;
|
|
1544
|
-
if (!ch || ch.isAtom) return count;
|
|
1545
|
-
frag = ch.content;
|
|
1546
|
-
}
|
|
1547
|
-
}
|
|
1548
|
-
function _replaceRange(tr, from, to, slice) {
|
|
1549
|
-
if (!slice.size) return tr.deleteRange(from, to);
|
|
1550
|
-
var $from = tr.doc.resolve(from),
|
|
1551
|
-
$to = tr.doc.resolve(to);
|
|
1552
|
-
if (fitsTrivially($from, $to, slice)) return tr.step(new ReplaceStep(from, to, slice));
|
|
1553
|
-
var targetDepths = coveredDepths($from, $to);
|
|
1554
|
-
if (targetDepths[targetDepths.length - 1] == 0) targetDepths.pop();
|
|
1555
|
-
var preferredTarget = -($from.depth + 1);
|
|
1556
|
-
targetDepths.unshift(preferredTarget);
|
|
1557
|
-
for (var d = $from.depth, pos = $from.pos - 1; d > 0; d--, pos--) {
|
|
1558
|
-
var spec = $from.node(d).type.spec;
|
|
1559
|
-
if (spec.defining || spec.definingAsContext || spec.isolating) break;
|
|
1560
|
-
if (targetDepths.indexOf(d) > -1) preferredTarget = d;else if ($from.before(d) == pos) targetDepths.splice(1, 0, -d);
|
|
1561
|
-
}
|
|
1562
|
-
var preferredTargetIndex = targetDepths.indexOf(preferredTarget);
|
|
1563
|
-
var leftNodes = [],
|
|
1564
|
-
preferredDepth = slice.openStart;
|
|
1565
|
-
for (var content = slice.content, i = 0;; i++) {
|
|
1566
|
-
var node = content.firstChild;
|
|
1567
|
-
leftNodes.push(node);
|
|
1568
|
-
if (i == slice.openStart) break;
|
|
1569
|
-
content = node.content;
|
|
1570
|
-
}
|
|
1571
|
-
for (var _d3 = preferredDepth - 1; _d3 >= 0; _d3--) {
|
|
1572
|
-
var leftNode = leftNodes[_d3],
|
|
1573
|
-
def = definesContent(leftNode.type);
|
|
1574
|
-
if (def && !leftNode.sameMarkup($from.node(Math.abs(preferredTarget) - 1))) preferredDepth = _d3;else if (def || !leftNode.type.isTextblock) break;
|
|
1575
|
-
}
|
|
1576
|
-
for (var j = slice.openStart; j >= 0; j--) {
|
|
1577
|
-
var openDepth = (j + preferredDepth + 1) % (slice.openStart + 1);
|
|
1578
|
-
var insert = leftNodes[openDepth];
|
|
1579
|
-
if (!insert) continue;
|
|
1580
|
-
for (var _i5 = 0; _i5 < targetDepths.length; _i5++) {
|
|
1581
|
-
var targetDepth = targetDepths[(_i5 + preferredTargetIndex) % targetDepths.length],
|
|
1582
|
-
expand = true;
|
|
1583
|
-
if (targetDepth < 0) {
|
|
1584
|
-
expand = false;
|
|
1585
|
-
targetDepth = -targetDepth;
|
|
1586
|
-
}
|
|
1587
|
-
var parent = $from.node(targetDepth - 1),
|
|
1588
|
-
index = $from.index(targetDepth - 1);
|
|
1589
|
-
if (parent.canReplaceWith(index, index, insert.type, insert.marks)) return tr.replace($from.before(targetDepth), expand ? $to.after(targetDepth) : to, new prosemirrorModel.Slice(closeFragment(slice.content, 0, slice.openStart, openDepth), openDepth, slice.openEnd));
|
|
1590
|
-
}
|
|
1591
|
-
}
|
|
1592
|
-
var startSteps = tr.steps.length;
|
|
1593
|
-
for (var _i6 = targetDepths.length - 1; _i6 >= 0; _i6--) {
|
|
1594
|
-
tr.replace(from, to, slice);
|
|
1595
|
-
if (tr.steps.length > startSteps) break;
|
|
1596
|
-
var depth = targetDepths[_i6];
|
|
1597
|
-
if (depth < 0) continue;
|
|
1598
|
-
from = $from.before(depth);
|
|
1599
|
-
to = $to.after(depth);
|
|
1600
|
-
}
|
|
1601
|
-
}
|
|
1602
|
-
function closeFragment(fragment, depth, oldOpen, newOpen, parent) {
|
|
1603
|
-
if (depth < oldOpen) {
|
|
1604
|
-
var first = fragment.firstChild;
|
|
1605
|
-
fragment = fragment.replaceChild(0, first.copy(closeFragment(first.content, depth + 1, oldOpen, newOpen, first)));
|
|
1606
|
-
}
|
|
1607
|
-
if (depth > newOpen) {
|
|
1608
|
-
var match = parent.contentMatchAt(0);
|
|
1609
|
-
var start = match.fillBefore(fragment).append(fragment);
|
|
1610
|
-
fragment = start.append(match.matchFragment(start).fillBefore(prosemirrorModel.Fragment.empty, true));
|
|
1611
|
-
}
|
|
1612
|
-
return fragment;
|
|
1613
|
-
}
|
|
1614
|
-
function _replaceRangeWith(tr, from, to, node) {
|
|
1615
|
-
if (!node.isInline && from == to && tr.doc.resolve(from).parent.content.size) {
|
|
1616
|
-
var point = insertPoint(tr.doc, from, node.type);
|
|
1617
|
-
if (point != null) from = to = point;
|
|
1618
|
-
}
|
|
1619
|
-
tr.replaceRange(from, to, new prosemirrorModel.Slice(prosemirrorModel.Fragment.from(node), 0, 0));
|
|
1620
|
-
}
|
|
1621
|
-
function _deleteRange(tr, from, to) {
|
|
1622
|
-
var $from = tr.doc.resolve(from),
|
|
1623
|
-
$to = tr.doc.resolve(to);
|
|
1624
|
-
if ($from.parent.isTextblock && $to.parent.isTextblock && $from.start() != $to.start() && $from.parentOffset == 0 && $to.parentOffset == 0) {
|
|
1625
|
-
var shared = $from.sharedDepth(to),
|
|
1626
|
-
isolated = false;
|
|
1627
|
-
for (var d = $from.depth; d > shared; d--) if ($from.node(d).type.spec.isolating) isolated = true;
|
|
1628
|
-
for (var _d4 = $to.depth; _d4 > shared; _d4--) if ($to.node(_d4).type.spec.isolating) isolated = true;
|
|
1629
|
-
if (!isolated) {
|
|
1630
|
-
for (var _d5 = $from.depth; _d5 > 0 && from == $from.start(_d5); _d5--) from = $from.before(_d5);
|
|
1631
|
-
for (var _d6 = $to.depth; _d6 > 0 && to == $to.start(_d6); _d6--) to = $to.before(_d6);
|
|
1632
|
-
$from = tr.doc.resolve(from);
|
|
1633
|
-
$to = tr.doc.resolve(to);
|
|
1634
|
-
}
|
|
1635
|
-
}
|
|
1636
|
-
var covered = coveredDepths($from, $to);
|
|
1637
|
-
for (var i = 0; i < covered.length; i++) {
|
|
1638
|
-
var depth = covered[i],
|
|
1639
|
-
last = i == covered.length - 1;
|
|
1640
|
-
if (last && depth == 0 || $from.node(depth).type.contentMatch.validEnd) return tr["delete"]($from.start(depth), $to.end(depth));
|
|
1641
|
-
if (depth > 0 && (last || $from.node(depth - 1).canReplace($from.index(depth - 1), $to.indexAfter(depth - 1)))) return tr["delete"]($from.before(depth), $to.after(depth));
|
|
1642
|
-
}
|
|
1643
|
-
for (var _d7 = 1; _d7 <= $from.depth && _d7 <= $to.depth; _d7++) {
|
|
1644
|
-
if (from - $from.start(_d7) == $from.depth - _d7 && to > $from.end(_d7) && $to.end(_d7) - to != $to.depth - _d7 && $from.start(_d7 - 1) == $to.start(_d7 - 1) && $from.node(_d7 - 1).canReplace($from.index(_d7 - 1), $to.index(_d7 - 1))) return tr["delete"]($from.before(_d7), to);
|
|
1645
|
-
}
|
|
1646
|
-
tr["delete"](from, to);
|
|
1647
|
-
}
|
|
1648
|
-
function coveredDepths($from, $to) {
|
|
1649
|
-
var result = [],
|
|
1650
|
-
minDepth = Math.min($from.depth, $to.depth);
|
|
1651
|
-
for (var d = minDepth; d >= 0; d--) {
|
|
1652
|
-
var start = $from.start(d);
|
|
1653
|
-
if (start < $from.pos - ($from.depth - d) || $to.end(d) > $to.pos + ($to.depth - d) || $from.node(d).type.spec.isolating || $to.node(d).type.spec.isolating) break;
|
|
1654
|
-
if (start == $to.start(d) || d == $from.depth && d == $to.depth && $from.parent.inlineContent && $to.parent.inlineContent && d && $to.start(d - 1) == start - 1) result.push(d);
|
|
1655
|
-
}
|
|
1656
|
-
return result;
|
|
1657
|
-
}
|
|
1658
|
-
var AttrStep = function (_Step8) {
|
|
1659
|
-
_inherits(AttrStep, _Step8);
|
|
1660
|
-
var _super8 = _createSuper(AttrStep);
|
|
1661
|
-
function AttrStep(pos, attr, value) {
|
|
1662
|
-
var _this12;
|
|
1663
|
-
_classCallCheck(this, AttrStep);
|
|
1664
|
-
_this12 = _super8.call(this);
|
|
1665
|
-
_this12.pos = pos;
|
|
1666
|
-
_this12.attr = attr;
|
|
1667
|
-
_this12.value = value;
|
|
1668
|
-
return _this12;
|
|
1669
|
-
}
|
|
1670
|
-
_createClass(AttrStep, [{
|
|
1671
|
-
key: "apply",
|
|
1672
|
-
value: function apply(doc) {
|
|
1673
|
-
var node = doc.nodeAt(this.pos);
|
|
1674
|
-
if (!node) return StepResult.fail("No node at attribute step's position");
|
|
1675
|
-
var attrs = Object.create(null);
|
|
1676
|
-
for (var name in node.attrs) attrs[name] = node.attrs[name];
|
|
1677
|
-
attrs[this.attr] = this.value;
|
|
1678
|
-
var updated = node.type.create(attrs, null, node.marks);
|
|
1679
|
-
return StepResult.fromReplace(doc, this.pos, this.pos + 1, new prosemirrorModel.Slice(prosemirrorModel.Fragment.from(updated), 0, node.isLeaf ? 0 : 1));
|
|
1680
|
-
}
|
|
1681
|
-
}, {
|
|
1682
|
-
key: "getMap",
|
|
1683
|
-
value: function getMap() {
|
|
1684
|
-
return StepMap.empty;
|
|
1685
|
-
}
|
|
1686
|
-
}, {
|
|
1687
|
-
key: "invert",
|
|
1688
|
-
value: function invert(doc) {
|
|
1689
|
-
return new AttrStep(this.pos, this.attr, doc.nodeAt(this.pos).attrs[this.attr]);
|
|
1690
|
-
}
|
|
1691
|
-
}, {
|
|
1692
|
-
key: "map",
|
|
1693
|
-
value: function map(mapping) {
|
|
1694
|
-
var pos = mapping.mapResult(this.pos, 1);
|
|
1695
|
-
return pos.deletedAfter ? null : new AttrStep(pos.pos, this.attr, this.value);
|
|
1696
|
-
}
|
|
1697
|
-
}, {
|
|
1698
|
-
key: "toJSON",
|
|
1699
|
-
value: function toJSON() {
|
|
1700
|
-
return {
|
|
1701
|
-
stepType: "attr",
|
|
1702
|
-
pos: this.pos,
|
|
1703
|
-
attr: this.attr,
|
|
1704
|
-
value: this.value
|
|
1705
|
-
};
|
|
1706
|
-
}
|
|
1707
|
-
}], [{
|
|
1708
|
-
key: "fromJSON",
|
|
1709
|
-
value: function fromJSON(schema, json) {
|
|
1710
|
-
if (typeof json.pos != "number" || typeof json.attr != "string") throw new RangeError("Invalid input for AttrStep.fromJSON");
|
|
1711
|
-
return new AttrStep(json.pos, json.attr, json.value);
|
|
1712
|
-
}
|
|
1713
|
-
}]);
|
|
1714
|
-
return AttrStep;
|
|
1715
|
-
}(Step);
|
|
1716
|
-
Step.jsonID("attr", AttrStep);
|
|
1717
|
-
var DocAttrStep = function (_Step9) {
|
|
1718
|
-
_inherits(DocAttrStep, _Step9);
|
|
1719
|
-
var _super9 = _createSuper(DocAttrStep);
|
|
1720
|
-
function DocAttrStep(attr, value) {
|
|
1721
|
-
var _this13;
|
|
1722
|
-
_classCallCheck(this, DocAttrStep);
|
|
1723
|
-
_this13 = _super9.call(this);
|
|
1724
|
-
_this13.attr = attr;
|
|
1725
|
-
_this13.value = value;
|
|
1726
|
-
return _this13;
|
|
1727
|
-
}
|
|
1728
|
-
_createClass(DocAttrStep, [{
|
|
1729
|
-
key: "apply",
|
|
1730
|
-
value: function apply(doc) {
|
|
1731
|
-
var attrs = Object.create(null);
|
|
1732
|
-
for (var name in doc.attrs) attrs[name] = doc.attrs[name];
|
|
1733
|
-
attrs[this.attr] = this.value;
|
|
1734
|
-
var updated = doc.type.create(attrs, doc.content, doc.marks);
|
|
1735
|
-
return StepResult.ok(updated);
|
|
1736
|
-
}
|
|
1737
|
-
}, {
|
|
1738
|
-
key: "getMap",
|
|
1739
|
-
value: function getMap() {
|
|
1740
|
-
return StepMap.empty;
|
|
1741
|
-
}
|
|
1742
|
-
}, {
|
|
1743
|
-
key: "invert",
|
|
1744
|
-
value: function invert(doc) {
|
|
1745
|
-
return new DocAttrStep(this.attr, doc.attrs[this.attr]);
|
|
1746
|
-
}
|
|
1747
|
-
}, {
|
|
1748
|
-
key: "map",
|
|
1749
|
-
value: function map(mapping) {
|
|
1750
|
-
return this;
|
|
1751
|
-
}
|
|
1752
|
-
}, {
|
|
1753
|
-
key: "toJSON",
|
|
1754
|
-
value: function toJSON() {
|
|
1755
|
-
return {
|
|
1756
|
-
stepType: "docAttr",
|
|
1757
|
-
attr: this.attr,
|
|
1758
|
-
value: this.value
|
|
1759
|
-
};
|
|
1760
|
-
}
|
|
1761
|
-
}], [{
|
|
1762
|
-
key: "fromJSON",
|
|
1763
|
-
value: function fromJSON(schema, json) {
|
|
1764
|
-
if (typeof json.attr != "string") throw new RangeError("Invalid input for DocAttrStep.fromJSON");
|
|
1765
|
-
return new DocAttrStep(json.attr, json.value);
|
|
1766
|
-
}
|
|
1767
|
-
}]);
|
|
1768
|
-
return DocAttrStep;
|
|
1769
|
-
}(Step);
|
|
1770
|
-
Step.jsonID("docAttr", DocAttrStep);
|
|
1771
|
-
exports.TransformError = function (_Error) {
|
|
1772
|
-
_inherits(TransformError, _Error);
|
|
1773
|
-
var _super10 = _createSuper(TransformError);
|
|
1774
|
-
function TransformError() {
|
|
1775
|
-
_classCallCheck(this, TransformError);
|
|
1776
|
-
return _super10.apply(this, arguments);
|
|
1777
|
-
}
|
|
1778
|
-
return _createClass(TransformError);
|
|
1779
|
-
}(_wrapNativeSuper(Error));
|
|
1780
|
-
exports.TransformError = function TransformError(message) {
|
|
1781
|
-
var err = Error.call(this, message);
|
|
1782
|
-
err.__proto__ = TransformError.prototype;
|
|
1783
|
-
return err;
|
|
1784
|
-
};
|
|
1785
|
-
exports.TransformError.prototype = Object.create(Error.prototype);
|
|
1786
|
-
exports.TransformError.prototype.constructor = exports.TransformError;
|
|
1787
|
-
exports.TransformError.prototype.name = "TransformError";
|
|
1788
|
-
var Transform = function () {
|
|
1789
|
-
function Transform(doc) {
|
|
1790
|
-
_classCallCheck(this, Transform);
|
|
1791
|
-
this.doc = doc;
|
|
1792
|
-
this.steps = [];
|
|
1793
|
-
this.docs = [];
|
|
1794
|
-
this.mapping = new Mapping();
|
|
1795
|
-
}
|
|
1796
|
-
_createClass(Transform, [{
|
|
1797
|
-
key: "before",
|
|
1798
|
-
get: function get() {
|
|
1799
|
-
return this.docs.length ? this.docs[0] : this.doc;
|
|
1800
|
-
}
|
|
1801
|
-
}, {
|
|
1802
|
-
key: "step",
|
|
1803
|
-
value: function step(_step4) {
|
|
1804
|
-
var result = this.maybeStep(_step4);
|
|
1805
|
-
if (result.failed) throw new exports.TransformError(result.failed);
|
|
1806
|
-
return this;
|
|
1807
|
-
}
|
|
1808
|
-
}, {
|
|
1809
|
-
key: "maybeStep",
|
|
1810
|
-
value: function maybeStep(step) {
|
|
1811
|
-
var result = step.apply(this.doc);
|
|
1812
|
-
if (!result.failed) this.addStep(step, result.doc);
|
|
1813
|
-
return result;
|
|
1814
|
-
}
|
|
1815
|
-
}, {
|
|
1816
|
-
key: "docChanged",
|
|
1817
|
-
get: function get() {
|
|
1818
|
-
return this.steps.length > 0;
|
|
1819
|
-
}
|
|
1820
|
-
}, {
|
|
1821
|
-
key: "changedRange",
|
|
1822
|
-
value: function changedRange() {
|
|
1823
|
-
var from = 1e9,
|
|
1824
|
-
to = -1e9;
|
|
1825
|
-
for (var i = 0; i < this.mapping.maps.length; i++) {
|
|
1826
|
-
var map = this.mapping.maps[i];
|
|
1827
|
-
if (i) {
|
|
1828
|
-
from = map.map(from, 1);
|
|
1829
|
-
to = map.map(to, -1);
|
|
1830
|
-
}
|
|
1831
|
-
map.forEach(function (_f, _t, fromB, toB) {
|
|
1832
|
-
from = Math.min(from, fromB);
|
|
1833
|
-
to = Math.max(to, toB);
|
|
1834
|
-
});
|
|
1835
|
-
}
|
|
1836
|
-
return from == 1e9 ? null : {
|
|
1837
|
-
from: from,
|
|
1838
|
-
to: to
|
|
1839
|
-
};
|
|
1840
|
-
}
|
|
1841
|
-
}, {
|
|
1842
|
-
key: "addStep",
|
|
1843
|
-
value: function addStep(step, doc) {
|
|
1844
|
-
this.docs.push(this.doc);
|
|
1845
|
-
this.steps.push(step);
|
|
1846
|
-
this.mapping.appendMap(step.getMap());
|
|
1847
|
-
this.doc = doc;
|
|
1848
|
-
}
|
|
1849
|
-
}, {
|
|
1850
|
-
key: "replace",
|
|
1851
|
-
value: function replace(from) {
|
|
1852
|
-
var to = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : from;
|
|
1853
|
-
var slice = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : prosemirrorModel.Slice.empty;
|
|
1854
|
-
var step = replaceStep(this.doc, from, to, slice);
|
|
1855
|
-
if (step) this.step(step);
|
|
1856
|
-
return this;
|
|
1857
|
-
}
|
|
1858
|
-
}, {
|
|
1859
|
-
key: "replaceWith",
|
|
1860
|
-
value: function replaceWith(from, to, content) {
|
|
1861
|
-
return this.replace(from, to, new prosemirrorModel.Slice(prosemirrorModel.Fragment.from(content), 0, 0));
|
|
1862
|
-
}
|
|
1863
|
-
}, {
|
|
1864
|
-
key: "delete",
|
|
1865
|
-
value: function _delete(from, to) {
|
|
1866
|
-
return this.replace(from, to, prosemirrorModel.Slice.empty);
|
|
1867
|
-
}
|
|
1868
|
-
}, {
|
|
1869
|
-
key: "insert",
|
|
1870
|
-
value: function insert(pos, content) {
|
|
1871
|
-
return this.replaceWith(pos, pos, content);
|
|
1872
|
-
}
|
|
1873
|
-
}, {
|
|
1874
|
-
key: "replaceRange",
|
|
1875
|
-
value: function replaceRange(from, to, slice) {
|
|
1876
|
-
_replaceRange(this, from, to, slice);
|
|
1877
|
-
return this;
|
|
1878
|
-
}
|
|
1879
|
-
}, {
|
|
1880
|
-
key: "replaceRangeWith",
|
|
1881
|
-
value: function replaceRangeWith(from, to, node) {
|
|
1882
|
-
_replaceRangeWith(this, from, to, node);
|
|
1883
|
-
return this;
|
|
1884
|
-
}
|
|
1885
|
-
}, {
|
|
1886
|
-
key: "deleteRange",
|
|
1887
|
-
value: function deleteRange(from, to) {
|
|
1888
|
-
_deleteRange(this, from, to);
|
|
1889
|
-
return this;
|
|
1890
|
-
}
|
|
1891
|
-
}, {
|
|
1892
|
-
key: "lift",
|
|
1893
|
-
value: function lift(range, target) {
|
|
1894
|
-
_lift(this, range, target);
|
|
1895
|
-
return this;
|
|
1896
|
-
}
|
|
1897
|
-
}, {
|
|
1898
|
-
key: "join",
|
|
1899
|
-
value: function join(pos) {
|
|
1900
|
-
var depth = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1;
|
|
1901
|
-
_join(this, pos, depth);
|
|
1902
|
-
return this;
|
|
1903
|
-
}
|
|
1904
|
-
}, {
|
|
1905
|
-
key: "wrap",
|
|
1906
|
-
value: function wrap(range, wrappers) {
|
|
1907
|
-
_wrap2(this, range, wrappers);
|
|
1908
|
-
return this;
|
|
1909
|
-
}
|
|
1910
|
-
}, {
|
|
1911
|
-
key: "setBlockType",
|
|
1912
|
-
value: function setBlockType(from) {
|
|
1913
|
-
var to = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : from;
|
|
1914
|
-
var type = arguments.length > 2 ? arguments[2] : undefined;
|
|
1915
|
-
var attrs = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : null;
|
|
1916
|
-
_setBlockType(this, from, to, type, attrs);
|
|
1917
|
-
return this;
|
|
1918
|
-
}
|
|
1919
|
-
}, {
|
|
1920
|
-
key: "setNodeMarkup",
|
|
1921
|
-
value: function setNodeMarkup(pos, type) {
|
|
1922
|
-
var attrs = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;
|
|
1923
|
-
var marks = arguments.length > 3 ? arguments[3] : undefined;
|
|
1924
|
-
_setNodeMarkup(this, pos, type, attrs, marks);
|
|
1925
|
-
return this;
|
|
1926
|
-
}
|
|
1927
|
-
}, {
|
|
1928
|
-
key: "setNodeAttribute",
|
|
1929
|
-
value: function setNodeAttribute(pos, attr, value) {
|
|
1930
|
-
this.step(new AttrStep(pos, attr, value));
|
|
1931
|
-
return this;
|
|
1932
|
-
}
|
|
1933
|
-
}, {
|
|
1934
|
-
key: "setDocAttribute",
|
|
1935
|
-
value: function setDocAttribute(attr, value) {
|
|
1936
|
-
this.step(new DocAttrStep(attr, value));
|
|
1937
|
-
return this;
|
|
1938
|
-
}
|
|
1939
|
-
}, {
|
|
1940
|
-
key: "addNodeMark",
|
|
1941
|
-
value: function addNodeMark(pos, mark) {
|
|
1942
|
-
this.step(new AddNodeMarkStep(pos, mark));
|
|
1943
|
-
return this;
|
|
1944
|
-
}
|
|
1945
|
-
}, {
|
|
1946
|
-
key: "removeNodeMark",
|
|
1947
|
-
value: function removeNodeMark(pos, mark) {
|
|
1948
|
-
var node = this.doc.nodeAt(pos);
|
|
1949
|
-
if (!node) throw new RangeError("No node at position " + pos);
|
|
1950
|
-
if (mark instanceof prosemirrorModel.Mark) {
|
|
1951
|
-
if (mark.isInSet(node.marks)) this.step(new RemoveNodeMarkStep(pos, mark));
|
|
1952
|
-
} else {
|
|
1953
|
-
var set = node.marks,
|
|
1954
|
-
found,
|
|
1955
|
-
steps = [];
|
|
1956
|
-
while (found = mark.isInSet(set)) {
|
|
1957
|
-
steps.push(new RemoveNodeMarkStep(pos, found));
|
|
1958
|
-
set = found.removeFromSet(set);
|
|
1959
|
-
}
|
|
1960
|
-
for (var i = steps.length - 1; i >= 0; i--) this.step(steps[i]);
|
|
1961
|
-
}
|
|
1962
|
-
return this;
|
|
1963
|
-
}
|
|
1964
|
-
}, {
|
|
1965
|
-
key: "split",
|
|
1966
|
-
value: function split(pos) {
|
|
1967
|
-
var depth = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1;
|
|
1968
|
-
var typesAfter = arguments.length > 2 ? arguments[2] : undefined;
|
|
1969
|
-
_split(this, pos, depth, typesAfter);
|
|
1970
|
-
return this;
|
|
1971
|
-
}
|
|
1972
|
-
}, {
|
|
1973
|
-
key: "addMark",
|
|
1974
|
-
value: function addMark(from, to, mark) {
|
|
1975
|
-
_addMark(this, from, to, mark);
|
|
1976
|
-
return this;
|
|
1977
|
-
}
|
|
1978
|
-
}, {
|
|
1979
|
-
key: "removeMark",
|
|
1980
|
-
value: function removeMark(from, to, mark) {
|
|
1981
|
-
_removeMark(this, from, to, mark);
|
|
1982
|
-
return this;
|
|
1983
|
-
}
|
|
1984
|
-
}, {
|
|
1985
|
-
key: "clearIncompatible",
|
|
1986
|
-
value: function clearIncompatible(pos, parentType, match) {
|
|
1987
|
-
_clearIncompatible(this, pos, parentType, match);
|
|
1988
|
-
return this;
|
|
1989
|
-
}
|
|
1990
|
-
}]);
|
|
1991
|
-
return Transform;
|
|
1992
|
-
}();
|
|
1993
|
-
exports.AddMarkStep = AddMarkStep;
|
|
1994
|
-
exports.AddNodeMarkStep = AddNodeMarkStep;
|
|
1995
|
-
exports.AttrStep = AttrStep;
|
|
1996
|
-
exports.DocAttrStep = DocAttrStep;
|
|
1997
|
-
exports.MapResult = MapResult;
|
|
1998
|
-
exports.Mapping = Mapping;
|
|
1999
|
-
exports.RemoveMarkStep = RemoveMarkStep;
|
|
2000
|
-
exports.RemoveNodeMarkStep = RemoveNodeMarkStep;
|
|
2001
|
-
exports.ReplaceAroundStep = ReplaceAroundStep;
|
|
2002
|
-
exports.ReplaceStep = ReplaceStep;
|
|
2003
|
-
exports.Step = Step;
|
|
2004
|
-
exports.StepMap = StepMap;
|
|
2005
|
-
exports.StepResult = StepResult;
|
|
2006
|
-
exports.Transform = Transform;
|
|
2007
|
-
exports.canJoin = canJoin;
|
|
2008
|
-
exports.canSplit = canSplit;
|
|
2009
|
-
exports.dropPoint = dropPoint;
|
|
2010
|
-
exports.findWrapping = findWrapping;
|
|
2011
|
-
exports.insertPoint = insertPoint;
|
|
2012
|
-
exports.joinPoint = joinPoint;
|
|
2013
|
-
exports.liftTarget = liftTarget;
|
|
2014
|
-
exports.replaceStep = replaceStep;
|