@notectl/core 2.2.5 → 2.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunks/{AlignmentPlugin-BCHxo16v.mjs → AlignmentPlugin--xAFlRqE.mjs} +2 -2
- package/dist/chunks/{AlignmentPlugin-BCHxo16v.mjs.map → AlignmentPlugin--xAFlRqE.mjs.map} +1 -1
- package/dist/chunks/{AttrRegistry-DcDVyzLm.mjs → AttrRegistry-B3zB02z9.mjs} +2 -2
- package/dist/chunks/AttrRegistry-B3zB02z9.mjs.map +1 -0
- package/dist/chunks/{AttributedMarkCommands-D4W2Jgpj.mjs → AttributedMarkCommands-bagbH8Qt.mjs} +2 -2
- package/dist/chunks/{AttributedMarkCommands-D4W2Jgpj.mjs.map → AttributedMarkCommands-bagbH8Qt.mjs.map} +1 -1
- package/dist/chunks/{BidiIsolationPlugin-BddRbDCN.mjs → BidiIsolationPlugin-DBXyXpgm.mjs} +2 -2
- package/dist/chunks/{BidiIsolationPlugin-BddRbDCN.mjs.map → BidiIsolationPlugin-DBXyXpgm.mjs.map} +1 -1
- package/dist/chunks/BlockInsertion-CJusvrDL.mjs +2 -0
- package/dist/chunks/BlockInsertion-CJusvrDL.mjs.map +1 -0
- package/dist/chunks/BlockquotePlugin-Bz2glHwX.mjs +2 -0
- package/dist/chunks/{BlockquotePlugin-4V7KV_Sb.mjs.map → BlockquotePlugin-Bz2glHwX.mjs.map} +1 -1
- package/dist/chunks/{CaretNavigationPlugin-C6XBwp0N.mjs → CaretNavigationPlugin-CNsT0eb4.mjs} +2 -2
- package/dist/chunks/{CaretNavigationPlugin-C6XBwp0N.mjs.map → CaretNavigationPlugin-CNsT0eb4.mjs.map} +1 -1
- package/dist/chunks/CodeBlockPlugin-C1hrdbSZ.mjs +2 -0
- package/dist/chunks/CodeBlockPlugin-C1hrdbSZ.mjs.map +1 -0
- package/dist/chunks/{ColorGrid-CXRdpP_n.mjs → ColorGrid-C9RQoEWF.mjs} +2 -2
- package/dist/chunks/{ColorGrid-CXRdpP_n.mjs.map → ColorGrid-C9RQoEWF.mjs.map} +1 -1
- package/dist/chunks/ColorPickerPopup-DiA68Pzz.mjs +2 -0
- package/dist/chunks/{ColorPickerPopup-C_74bqid.mjs.map → ColorPickerPopup-DiA68Pzz.mjs.map} +1 -1
- package/dist/chunks/Commands-1dFFldi7.mjs +2 -0
- package/dist/chunks/Commands-1dFFldi7.mjs.map +1 -0
- package/dist/chunks/ContentModel-NpAj7vGW.mjs +2 -0
- package/dist/chunks/ContentModel-NpAj7vGW.mjs.map +1 -0
- package/dist/chunks/Decoration-BpoEOANl.mjs +2 -0
- package/dist/chunks/Decoration-BpoEOANl.mjs.map +1 -0
- package/dist/chunks/{DirectionDetection-C7XE0nxW.mjs → DirectionDetection-CDVSEWQ6.mjs} +2 -2
- package/dist/chunks/{DirectionDetection-C7XE0nxW.mjs.map → DirectionDetection-CDVSEWQ6.mjs.map} +1 -1
- package/dist/chunks/Document-827l3P80.mjs +2 -0
- package/dist/chunks/Document-827l3P80.mjs.map +1 -0
- package/dist/chunks/DocumentParser-D2tr3ZKn.mjs +2 -0
- package/dist/chunks/DocumentParser-D2tr3ZKn.mjs.map +1 -0
- package/dist/chunks/EditorEventBoundary-zpYRxryo.mjs +2 -0
- package/dist/chunks/EditorEventBoundary-zpYRxryo.mjs.map +1 -0
- package/dist/chunks/FontPlugin-By-TGrQo.mjs +2 -0
- package/dist/chunks/{FontPlugin-DB1_bgam.mjs.map → FontPlugin-By-TGrQo.mjs.map} +1 -1
- package/dist/chunks/{FontSizePlugin-DFvp7Ki9.mjs → FontSizePlugin-Dln-tYXV.mjs} +2 -2
- package/dist/chunks/FontSizePlugin-Dln-tYXV.mjs.map +1 -0
- package/dist/chunks/FormulaPlugin-By1befrR.mjs +2 -0
- package/dist/chunks/FormulaPlugin-By1befrR.mjs.map +1 -0
- package/dist/chunks/GapCursorNavigation-BuXngVu-.mjs +2 -0
- package/dist/chunks/{GapCursorNavigation-ycNzuQVH.mjs.map → GapCursorNavigation-BuXngVu-.mjs.map} +1 -1
- package/dist/chunks/{GapCursorPlugin-Zvxjnr82.mjs → GapCursorPlugin-DAxVzXRs.mjs} +2 -2
- package/dist/chunks/{GapCursorPlugin-Zvxjnr82.mjs.map → GapCursorPlugin-DAxVzXRs.mjs.map} +1 -1
- package/dist/chunks/HTMLUtils-Bhg3_P8B.mjs +2 -0
- package/dist/chunks/HTMLUtils-Bhg3_P8B.mjs.map +1 -0
- package/dist/chunks/{HardBreakPlugin-9DOyCyyM.mjs → HardBreakPlugin-DlbSlrdq.mjs} +2 -2
- package/dist/chunks/{HardBreakPlugin-9DOyCyyM.mjs.map → HardBreakPlugin-DlbSlrdq.mjs.map} +1 -1
- package/dist/chunks/HeadingPlugin-uMAjPOk5.mjs +2 -0
- package/dist/chunks/{HeadingPlugin-D9yvG2Aw.mjs.map → HeadingPlugin-uMAjPOk5.mjs.map} +1 -1
- package/dist/chunks/{HighlightPlugin-D4gh4RP7.mjs → HighlightPlugin-Bj7FPkIQ.mjs} +2 -2
- package/dist/chunks/{HighlightPlugin-D4gh4RP7.mjs.map → HighlightPlugin-Bj7FPkIQ.mjs.map} +1 -1
- package/dist/chunks/HorizontalRulePlugin-DUVmTQpX.mjs +2 -0
- package/dist/chunks/HorizontalRulePlugin-DUVmTQpX.mjs.map +1 -0
- package/dist/chunks/ImagePlugin-FToCOjd5.mjs +2 -0
- package/dist/chunks/{ImagePlugin-Cp_RINtc.mjs.map → ImagePlugin-FToCOjd5.mjs.map} +1 -1
- package/dist/chunks/{InlineCodePlugin-DMr4O7c7.mjs → InlineCodePlugin-pISIoGQE.mjs} +2 -2
- package/dist/chunks/InlineCodePlugin-pISIoGQE.mjs.map +1 -0
- package/dist/chunks/InlineStyleMarkSpec-CjSRj4f_.mjs +2 -0
- package/dist/chunks/{InlineStyleMarkSpec-4R6DC7ij.mjs.map → InlineStyleMarkSpec-CjSRj4f_.mjs.map} +1 -1
- package/dist/chunks/LinkPlugin-Ct5Z180S.mjs +2 -0
- package/dist/chunks/LinkPlugin-Ct5Z180S.mjs.map +1 -0
- package/dist/chunks/ListPlugin-DAY5ezNs.mjs +2 -0
- package/dist/chunks/ListPlugin-DAY5ezNs.mjs.map +1 -0
- package/dist/chunks/MarkInputRule-Bdi8KPus.mjs +2 -0
- package/dist/chunks/MarkInputRule-Bdi8KPus.mjs.map +1 -0
- package/dist/chunks/MarkdownHTMLRegistry-CKEx7LkR.mjs +2 -0
- package/dist/chunks/MarkdownHTMLRegistry-CKEx7LkR.mjs.map +1 -0
- package/dist/chunks/MarkdownParser-CWt3M6jR.mjs +2 -0
- package/dist/chunks/MarkdownParser-CWt3M6jR.mjs.map +1 -0
- package/dist/chunks/MarkdownSerializer-J-i28out.mjs +2 -0
- package/dist/chunks/MarkdownSerializer-J-i28out.mjs.map +1 -0
- package/dist/chunks/{NodeResolver-ChgLF_IP.mjs → NodeResolver-Dleih-8R.mjs} +2 -2
- package/dist/chunks/{NodeResolver-ChgLF_IP.mjs.map → NodeResolver-Dleih-8R.mjs.map} +1 -1
- package/dist/chunks/NodeSelectionCommands-1PjwUDTJ.mjs +2 -0
- package/dist/chunks/{NodeSelectionCommands-Dj4VxLdD.mjs.map → NodeSelectionCommands-1PjwUDTJ.mjs.map} +1 -1
- package/dist/chunks/PluginHelpers-Dx_0hfDe.mjs +2 -0
- package/dist/chunks/{PluginHelpers-KDuTlmXm.mjs.map → PluginHelpers-Dx_0hfDe.mjs.map} +1 -1
- package/dist/chunks/{PopupManager-CyOfZUab.mjs → PopupManager-CT-fMZJn.mjs} +2 -2
- package/dist/chunks/{PopupManager-CyOfZUab.mjs.map → PopupManager-CT-fMZJn.mjs.map} +1 -1
- package/dist/chunks/PopupPositioning-BFh6Ed1D.mjs +2 -0
- package/dist/chunks/{PopupPositioning-DtUrY9bh.mjs.map → PopupPositioning-BFh6Ed1D.mjs.map} +1 -1
- package/dist/chunks/PrintPlugin-7zz9mhhU.mjs +2 -0
- package/dist/chunks/PrintPlugin-7zz9mhhU.mjs.map +1 -0
- package/dist/chunks/{PrintTypes-WdtgSj74.mjs → PrintTypes-CxU69qu3.mjs} +3 -2
- package/dist/chunks/PrintTypes-CxU69qu3.mjs.map +1 -0
- package/dist/chunks/{RangeIterator-o8v3msQe.mjs → RangeIterator-DP7Ud3Gp.mjs} +2 -2
- package/dist/chunks/{RangeIterator-o8v3msQe.mjs.map → RangeIterator-DP7Ud3Gp.mjs.map} +1 -1
- package/dist/chunks/SchemaRegistry-CkBN-1yW.mjs +2 -0
- package/dist/chunks/SchemaRegistry-CkBN-1yW.mjs.map +1 -0
- package/dist/chunks/{SimpleMark-CaQtFAau.mjs → SimpleMark-7CQcA4RK.mjs} +2 -2
- package/dist/chunks/{SimpleMark-CaQtFAau.mjs.map → SimpleMark-7CQcA4RK.mjs.map} +1 -1
- package/dist/chunks/{SmartPastePlugin-Bi_wpTCV.mjs → SmartPastePlugin-CYa_nD9v.mjs} +2 -2
- package/dist/chunks/{SmartPastePlugin-Bi_wpTCV.mjs.map → SmartPastePlugin-CYa_nD9v.mjs.map} +1 -1
- package/dist/chunks/StrikethroughPlugin-C2oWvGc3.mjs +2 -0
- package/dist/chunks/StrikethroughPlugin-C2oWvGc3.mjs.map +1 -0
- package/dist/chunks/StyleRuntime-DW6omotc.mjs +2 -0
- package/dist/chunks/StyleRuntime-DW6omotc.mjs.map +1 -0
- package/dist/chunks/{SuperSubPlugin-DVP7VnIz.mjs → SuperSubPlugin-D1xaKrSu.mjs} +2 -2
- package/dist/chunks/{SuperSubPlugin-DVP7VnIz.mjs.map → SuperSubPlugin-D1xaKrSu.mjs.map} +1 -1
- package/dist/chunks/TableDimensions-BBhjHNjQ.mjs +2 -0
- package/dist/chunks/TableDimensions-BBhjHNjQ.mjs.map +1 -0
- package/dist/chunks/TablePlugin-PJe3zwr-.mjs +2 -0
- package/dist/chunks/TablePlugin-PJe3zwr-.mjs.map +1 -0
- package/dist/chunks/TextColorPlugin-CTd9tfeG.mjs +2 -0
- package/dist/chunks/{TextColorPlugin-C1qpzEOa.mjs.map → TextColorPlugin-CTd9tfeG.mjs.map} +1 -1
- package/dist/chunks/TextDirectionAutoPlugin-CPnKVVuI.mjs +2 -0
- package/dist/chunks/{TextDirectionAutoPlugin-CzWJjrvG.mjs.map → TextDirectionAutoPlugin-CPnKVVuI.mjs.map} +1 -1
- package/dist/chunks/{TextDirectionPlugin-DHB88HKf.mjs → TextDirectionPlugin-Bns_03vL.mjs} +2 -2
- package/dist/chunks/{TextDirectionPlugin-DHB88HKf.mjs.map → TextDirectionPlugin-Bns_03vL.mjs.map} +1 -1
- package/dist/chunks/TextDirectionService-BcX07mw2.mjs +2 -0
- package/dist/chunks/{TextDirectionService-OFOU6r_s.mjs.map → TextDirectionService-BcX07mw2.mjs.map} +1 -1
- package/dist/chunks/TextFormattingPlugin-DBVlePqj.mjs +2 -0
- package/dist/chunks/TextFormattingPlugin-DBVlePqj.mjs.map +1 -0
- package/dist/chunks/{ToolbarPlugin-CLz2wa2c.mjs → ToolbarPlugin-DtfGTO_V.mjs} +2 -2
- package/dist/chunks/{ToolbarPlugin-CLz2wa2c.mjs.map → ToolbarPlugin-DtfGTO_V.mjs.map} +1 -1
- package/dist/chunks/VideoPlugin-BrR8g6Rz.mjs +2 -0
- package/dist/chunks/VideoPlugin-BrR8g6Rz.mjs.map +1 -0
- package/dist/chunks/WordBoundary-CFpIJDNP.mjs +2 -0
- package/dist/chunks/{WordBoundary-DxeMBRyP.mjs.map → WordBoundary-CFpIJDNP.mjs.map} +1 -1
- package/dist/chunks/ar-Dg9PdDet.mjs +2 -0
- package/dist/chunks/ar-Dg9PdDet.mjs.map +1 -0
- package/dist/chunks/ar-eOA3UmiE.mjs +2 -0
- package/dist/chunks/{ar-BTShmP2E.mjs.map → ar-eOA3UmiE.mjs.map} +1 -1
- package/dist/chunks/de-DJ5EkXQo.mjs +2 -0
- package/dist/chunks/de-DJ5EkXQo.mjs.map +1 -0
- package/dist/chunks/{de-C--bRmjW.mjs → de-DRbhnS4T.mjs} +2 -2
- package/dist/chunks/{de-C--bRmjW.mjs.map → de-DRbhnS4T.mjs.map} +1 -1
- package/dist/chunks/{es-DFUVd7eO.mjs → es-BQ9dox_E.mjs} +2 -2
- package/dist/chunks/{es-DFUVd7eO.mjs.map → es-BQ9dox_E.mjs.map} +1 -1
- package/dist/chunks/es-CEAJj7aB.mjs +2 -0
- package/dist/chunks/es-CEAJj7aB.mjs.map +1 -0
- package/dist/chunks/fr-DhWQzZy3.mjs +2 -0
- package/dist/chunks/fr-DhWQzZy3.mjs.map +1 -0
- package/dist/chunks/{fr-BaXKyPmX.mjs → fr-NVOinLyF.mjs} +2 -2
- package/dist/chunks/{fr-BaXKyPmX.mjs.map → fr-NVOinLyF.mjs.map} +1 -1
- package/dist/chunks/full-DSWM4cKQ.mjs +2 -0
- package/dist/chunks/{full-Cah3qjCT.mjs.map → full-DSWM4cKQ.mjs.map} +1 -1
- package/dist/chunks/hi-BsZzSMfL.mjs +2 -0
- package/dist/chunks/hi-BsZzSMfL.mjs.map +1 -0
- package/dist/chunks/{hi-aH9HZG23.mjs → hi-DrC2H81d.mjs} +2 -2
- package/dist/chunks/{hi-aH9HZG23.mjs.map → hi-DrC2H81d.mjs.map} +1 -1
- package/dist/chunks/minimal-CFkkPXef.mjs +2 -0
- package/dist/chunks/{minimal-DqATlnAL.mjs.map → minimal-CFkkPXef.mjs.map} +1 -1
- package/dist/chunks/pt-BuZ7acHF.mjs +2 -0
- package/dist/chunks/pt-BuZ7acHF.mjs.map +1 -0
- package/dist/chunks/{pt-Hy-0Xnnc.mjs → pt-CFrcl1v_.mjs} +2 -2
- package/dist/chunks/{pt-Hy-0Xnnc.mjs.map → pt-CFrcl1v_.mjs.map} +1 -1
- package/dist/chunks/rolldown-runtime-H_PjY6_i.mjs +1 -0
- package/dist/chunks/ru-CsP6mLxp.mjs +2 -0
- package/dist/chunks/ru-CsP6mLxp.mjs.map +1 -0
- package/dist/chunks/{ru-BFpEOrVp.mjs → ru-gxbzqLL8.mjs} +2 -2
- package/dist/chunks/{ru-BFpEOrVp.mjs.map → ru-gxbzqLL8.mjs.map} +1 -1
- package/dist/chunks/src-DiAOfuOT.mjs +2 -0
- package/dist/chunks/src-DiAOfuOT.mjs.map +1 -0
- package/dist/chunks/zh-BFZOM3lF.mjs +2 -0
- package/dist/chunks/{zh-BjoyjClN.mjs.map → zh-BFZOM3lF.mjs.map} +1 -1
- package/dist/chunks/zh-CiIyOm6U.mjs +2 -0
- package/dist/chunks/zh-CiIyOm6U.mjs.map +1 -0
- package/dist/commands/BlockInsertion.d.ts +5 -3
- package/dist/commands/BlockInsertion.d.ts.map +1 -1
- package/dist/commands/SelectionDeletion.d.ts +13 -2
- package/dist/commands/SelectionDeletion.d.ts.map +1 -1
- package/dist/editor/ContentSerializer.d.ts +21 -0
- package/dist/editor/ContentSerializer.d.ts.map +1 -1
- package/dist/editor/EditorConfig.d.ts +17 -0
- package/dist/editor/EditorConfig.d.ts.map +1 -1
- package/dist/editor/EditorConfigController.d.ts +10 -0
- package/dist/editor/EditorConfigController.d.ts.map +1 -1
- package/dist/editor/EditorInitializer.d.ts +4 -0
- package/dist/editor/EditorInitializer.d.ts.map +1 -1
- package/dist/editor/EditorLocale.d.ts +2 -0
- package/dist/editor/EditorLocale.d.ts.map +1 -1
- package/dist/editor/MarkdownMode.d.ts +46 -0
- package/dist/editor/MarkdownMode.d.ts.map +1 -0
- package/dist/editor/NotectlEditor.d.ts +46 -3
- package/dist/editor/NotectlEditor.d.ts.map +1 -1
- package/dist/editor/locales/ar.d.ts.map +1 -1
- package/dist/editor/locales/de.d.ts.map +1 -1
- package/dist/editor/locales/es.d.ts.map +1 -1
- package/dist/editor/locales/fr.d.ts.map +1 -1
- package/dist/editor/locales/hi.d.ts.map +1 -1
- package/dist/editor/locales/pt.d.ts.map +1 -1
- package/dist/editor/locales/ru.d.ts.map +1 -1
- package/dist/editor/locales/zh.d.ts.map +1 -1
- package/dist/editor/styles/list.d.ts +1 -1
- package/dist/editor/styles/list.d.ts.map +1 -1
- package/dist/editor/styles/table.d.ts +1 -1
- package/dist/editor/styles/table.d.ts.map +1 -1
- package/dist/full.mjs +1 -1
- package/dist/html.d.ts +1 -0
- package/dist/html.d.ts.map +1 -1
- package/dist/html.mjs +1 -1
- package/dist/index.d.ts +5 -5
- package/dist/index.d.ts.map +1 -1
- package/dist/input/ClipboardHandler.d.ts +2 -0
- package/dist/input/ClipboardHandler.d.ts.map +1 -1
- package/dist/input/InputHandler.d.ts +7 -0
- package/dist/input/InputHandler.d.ts.map +1 -1
- package/dist/input/InputManager.d.ts +10 -0
- package/dist/input/InputManager.d.ts.map +1 -1
- package/dist/input/KeyboardHandler.d.ts.map +1 -1
- package/dist/input/MarkdownPasteDetector.d.ts +26 -0
- package/dist/input/MarkdownPasteDetector.d.ts.map +1 -0
- package/dist/input/PasteHTMLHandler.d.ts +18 -1
- package/dist/input/PasteHTMLHandler.d.ts.map +1 -1
- package/dist/input/PasteHandler.d.ts +30 -0
- package/dist/input/PasteHandler.d.ts.map +1 -1
- package/dist/input/PasteRichBlockHandler.d.ts.map +1 -1
- package/dist/input/SelectionDocument.d.ts +2 -1
- package/dist/input/SelectionDocument.d.ts.map +1 -1
- package/dist/markdown.d.ts +17 -0
- package/dist/markdown.d.ts.map +1 -0
- package/dist/markdown.mjs +1 -0
- package/dist/model/AttrRegistry.d.ts +2 -2
- package/dist/model/AttrRegistry.d.ts.map +1 -1
- package/dist/model/ContentModel.d.ts +12 -0
- package/dist/model/ContentModel.d.ts.map +1 -1
- package/dist/model/Document.d.ts +28 -3
- package/dist/model/Document.d.ts.map +1 -1
- package/dist/model/HTMLUtils.d.ts +15 -0
- package/dist/model/HTMLUtils.d.ts.map +1 -1
- package/dist/model/InlineNodeSpec.d.ts +7 -1
- package/dist/model/InlineNodeSpec.d.ts.map +1 -1
- package/dist/model/InputRule.d.ts +11 -0
- package/dist/model/InputRule.d.ts.map +1 -1
- package/dist/model/MarkSpec.d.ts +7 -1
- package/dist/model/MarkSpec.d.ts.map +1 -1
- package/dist/model/MarkdownSyntaxRegistry.d.ts +51 -0
- package/dist/model/MarkdownSyntaxRegistry.d.ts.map +1 -0
- package/dist/model/NodeSpec.d.ts +47 -1
- package/dist/model/NodeSpec.d.ts.map +1 -1
- package/dist/model/RichBlockData.d.ts +2 -0
- package/dist/model/RichBlockData.d.ts.map +1 -1
- package/dist/model/SchemaRegistry.d.ts.map +1 -1
- package/dist/model/TableDimensions.d.ts +11 -0
- package/dist/model/TableDimensions.d.ts.map +1 -0
- package/dist/notectl-core.mjs +1 -1
- package/dist/notectl-core.umd.js +1 -1
- package/dist/notectl-core.umd.js.map +1 -1
- package/dist/platform/EditorEventBoundary.d.ts +12 -0
- package/dist/platform/EditorEventBoundary.d.ts.map +1 -0
- package/dist/plugins/Plugin.d.ts +7 -0
- package/dist/plugins/Plugin.d.ts.map +1 -1
- package/dist/plugins/PluginContextFactory.d.ts +2 -0
- package/dist/plugins/PluginContextFactory.d.ts.map +1 -1
- package/dist/plugins/PluginManager.d.ts +2 -0
- package/dist/plugins/PluginManager.d.ts.map +1 -1
- package/dist/plugins/alignment.mjs +1 -1
- package/dist/plugins/bidi-isolation.mjs +1 -1
- package/dist/plugins/blockquote/BlockquotePlugin.d.ts +2 -0
- package/dist/plugins/blockquote/BlockquotePlugin.d.ts.map +1 -1
- package/dist/plugins/blockquote.mjs +1 -1
- package/dist/plugins/caret-navigation.mjs +1 -1
- package/dist/plugins/code-block/CodeBlockTypes.d.ts +2 -0
- package/dist/plugins/code-block/CodeBlockTypes.d.ts.map +1 -1
- package/dist/plugins/code-block.mjs +1 -1
- package/dist/plugins/font-size/FontSizeOperations.d.ts.map +1 -1
- package/dist/plugins/font-size.mjs +1 -1
- package/dist/plugins/font.mjs +1 -1
- package/dist/plugins/formula/DisplayMathNodeSpec.d.ts.map +1 -1
- package/dist/plugins/formula/FormulaInputRules.d.ts.map +1 -1
- package/dist/plugins/formula/FormulaMarkdownSyntax.d.ts +4 -0
- package/dist/plugins/formula/FormulaMarkdownSyntax.d.ts.map +1 -0
- package/dist/plugins/formula/FormulaPlugin.d.ts.map +1 -1
- package/dist/plugins/formula/FormulaTypes.d.ts +2 -0
- package/dist/plugins/formula/FormulaTypes.d.ts.map +1 -1
- package/dist/plugins/formula/InlineMathNodeSpec.d.ts.map +1 -1
- package/dist/plugins/formula.mjs +1 -1
- package/dist/plugins/gap-cursor.mjs +1 -1
- package/dist/plugins/hard-break.mjs +1 -1
- package/dist/plugins/heading/HeadingPlugin.d.ts +2 -0
- package/dist/plugins/heading/HeadingPlugin.d.ts.map +1 -1
- package/dist/plugins/heading.mjs +1 -1
- package/dist/plugins/highlight.mjs +1 -1
- package/dist/plugins/horizontal-rule/HorizontalRulePlugin.d.ts +2 -0
- package/dist/plugins/horizontal-rule/HorizontalRulePlugin.d.ts.map +1 -1
- package/dist/plugins/horizontal-rule.mjs +1 -1
- package/dist/plugins/image/ImagePlugin.d.ts +14 -0
- package/dist/plugins/image/ImagePlugin.d.ts.map +1 -1
- package/dist/plugins/image.mjs +1 -1
- package/dist/plugins/inline-code/InlineCodePlugin.d.ts.map +1 -1
- package/dist/plugins/inline-code.mjs +1 -1
- package/dist/plugins/link/LinkPlugin.d.ts +14 -0
- package/dist/plugins/link/LinkPlugin.d.ts.map +1 -1
- package/dist/plugins/link.mjs +1 -1
- package/dist/plugins/list/ListCommands.d.ts +5 -1
- package/dist/plugins/list/ListCommands.d.ts.map +1 -1
- package/dist/plugins/list/ListInputRules.d.ts.map +1 -1
- package/dist/plugins/list/ListItemContext.d.ts +27 -0
- package/dist/plugins/list/ListItemContext.d.ts.map +1 -0
- package/dist/plugins/list/ListKeyboardHandlers.d.ts.map +1 -1
- package/dist/plugins/list/ListPlugin.d.ts +2 -0
- package/dist/plugins/list/ListPlugin.d.ts.map +1 -1
- package/dist/plugins/list/ListToolbarItems.d.ts.map +1 -1
- package/dist/plugins/list.mjs +1 -1
- package/dist/plugins/print/PrintContentPreparer.d.ts.map +1 -1
- package/dist/plugins/print/PrintDestinationBridge.d.ts +23 -0
- package/dist/plugins/print/PrintDestinationBridge.d.ts.map +1 -0
- package/dist/plugins/print/PrintHostStyles.d.ts +50 -0
- package/dist/plugins/print/PrintHostStyles.d.ts.map +1 -0
- package/dist/plugins/print/PrintPlugin.d.ts.map +1 -1
- package/dist/plugins/print/PrintServiceImpl.d.ts +76 -3
- package/dist/plugins/print/PrintServiceImpl.d.ts.map +1 -1
- package/dist/plugins/print/PrintStyleCollector.d.ts +150 -21
- package/dist/plugins/print/PrintStyleCollector.d.ts.map +1 -1
- package/dist/plugins/print/StaticHostMarker.d.ts +18 -0
- package/dist/plugins/print/StaticHostMarker.d.ts.map +1 -0
- package/dist/plugins/print.mjs +1 -1
- package/dist/plugins/shared/MarkInputRule.d.ts +9 -0
- package/dist/plugins/shared/MarkInputRule.d.ts.map +1 -0
- package/dist/plugins/shared/PopupPositioning.d.ts +2 -0
- package/dist/plugins/shared/PopupPositioning.d.ts.map +1 -1
- package/dist/plugins/shared/index.d.ts +1 -0
- package/dist/plugins/shared/index.d.ts.map +1 -1
- package/dist/plugins/shared.mjs +1 -1
- package/dist/plugins/smart-paste.mjs +1 -1
- package/dist/plugins/strikethrough/StrikethroughPlugin.d.ts +2 -0
- package/dist/plugins/strikethrough/StrikethroughPlugin.d.ts.map +1 -1
- package/dist/plugins/strikethrough.mjs +1 -1
- package/dist/plugins/super-sub.mjs +1 -1
- package/dist/plugins/table/TableClipboard.d.ts +8 -0
- package/dist/plugins/table/TableClipboard.d.ts.map +1 -0
- package/dist/plugins/table/TableCommands.d.ts.map +1 -1
- package/dist/plugins/table/TableContextMenu.d.ts +11 -1
- package/dist/plugins/table/TableContextMenu.d.ts.map +1 -1
- package/dist/plugins/table/TableControls.d.ts +6 -1
- package/dist/plugins/table/TableControls.d.ts.map +1 -1
- package/dist/plugins/table/TableControlsDOM.d.ts +11 -2
- package/dist/plugins/table/TableControlsDOM.d.ts.map +1 -1
- package/dist/plugins/table/TableControlsLayout.d.ts +12 -3
- package/dist/plugins/table/TableControlsLayout.d.ts.map +1 -1
- package/dist/plugins/table/TableGrid.d.ts +57 -0
- package/dist/plugins/table/TableGrid.d.ts.map +1 -0
- package/dist/plugins/table/TableHelpers.d.ts +4 -0
- package/dist/plugins/table/TableHelpers.d.ts.map +1 -1
- package/dist/plugins/table/TableLocale.d.ts +30 -0
- package/dist/plugins/table/TableLocale.d.ts.map +1 -1
- package/dist/plugins/table/TableNavigation.d.ts +5 -1
- package/dist/plugins/table/TableNavigation.d.ts.map +1 -1
- package/dist/plugins/table/TableNodeViews.d.ts +13 -1
- package/dist/plugins/table/TableNodeViews.d.ts.map +1 -1
- package/dist/plugins/table/TablePlugin.d.ts +21 -1
- package/dist/plugins/table/TablePlugin.d.ts.map +1 -1
- package/dist/plugins/table/TableSelection.d.ts.map +1 -1
- package/dist/plugins/table/TableSizeEditor.d.ts +11 -0
- package/dist/plugins/table/TableSizeEditor.d.ts.map +1 -0
- package/dist/plugins/table/TableSizing.d.ts +70 -0
- package/dist/plugins/table/TableSizing.d.ts.map +1 -0
- package/dist/plugins/table/index.d.ts +3 -1
- package/dist/plugins/table/index.d.ts.map +1 -1
- package/dist/plugins/table/locales/ar.d.ts.map +1 -1
- package/dist/plugins/table/locales/de.d.ts.map +1 -1
- package/dist/plugins/table/locales/es.d.ts.map +1 -1
- package/dist/plugins/table/locales/fr.d.ts.map +1 -1
- package/dist/plugins/table/locales/hi.d.ts.map +1 -1
- package/dist/plugins/table/locales/pt.d.ts.map +1 -1
- package/dist/plugins/table/locales/ru.d.ts.map +1 -1
- package/dist/plugins/table/locales/zh.d.ts.map +1 -1
- package/dist/plugins/table.mjs +1 -1
- package/dist/plugins/text-color.mjs +1 -1
- package/dist/plugins/text-direction-auto.mjs +1 -1
- package/dist/plugins/text-direction.mjs +1 -1
- package/dist/plugins/text-formatting/TextFormattingPlugin.d.ts +9 -0
- package/dist/plugins/text-formatting/TextFormattingPlugin.d.ts.map +1 -1
- package/dist/plugins/text-formatting.mjs +1 -1
- package/dist/plugins/toolbar.mjs +1 -1
- package/dist/plugins/video/VideoCommands.d.ts.map +1 -1
- package/dist/plugins/video.mjs +1 -1
- package/dist/presets/full.mjs +1 -1
- package/dist/presets/minimal.mjs +1 -1
- package/dist/presets.mjs +1 -1
- package/dist/serialization/DocumentParser.d.ts.map +1 -1
- package/dist/serialization/DocumentSerializer.d.ts +2 -0
- package/dist/serialization/DocumentSerializer.d.ts.map +1 -1
- package/dist/serialization/HTMLSanitization.d.ts +15 -0
- package/dist/serialization/HTMLSanitization.d.ts.map +1 -0
- package/dist/serialization/MarkSerializer.d.ts +12 -0
- package/dist/serialization/MarkSerializer.d.ts.map +1 -1
- package/dist/serialization/MarkdownParser.d.ts +6 -0
- package/dist/serialization/MarkdownParser.d.ts.map +1 -0
- package/dist/serialization/MarkdownSerializer.d.ts +12 -0
- package/dist/serialization/MarkdownSerializer.d.ts.map +1 -0
- package/dist/serialization/MarkdownTypes.d.ts +59 -0
- package/dist/serialization/MarkdownTypes.d.ts.map +1 -0
- package/dist/serialization/TableDimensions.d.ts +37 -0
- package/dist/serialization/TableDimensions.d.ts.map +1 -0
- package/dist/serialization/markdown/BlockSerializers.d.ts +7 -0
- package/dist/serialization/markdown/BlockSerializers.d.ts.map +1 -0
- package/dist/serialization/markdown/BlockTokenizer.d.ts +54 -0
- package/dist/serialization/markdown/BlockTokenizer.d.ts.map +1 -0
- package/dist/serialization/markdown/GfmAutolink.d.ts +20 -0
- package/dist/serialization/markdown/GfmAutolink.d.ts.map +1 -0
- package/dist/serialization/markdown/GfmTableParser.d.ts +26 -0
- package/dist/serialization/markdown/GfmTableParser.d.ts.map +1 -0
- package/dist/serialization/markdown/InlineAst.d.ts +34 -0
- package/dist/serialization/markdown/InlineAst.d.ts.map +1 -0
- package/dist/serialization/markdown/InlineSerializers.d.ts +5 -0
- package/dist/serialization/markdown/InlineSerializers.d.ts.map +1 -0
- package/dist/serialization/markdown/InlineTokenizer.d.ts +5 -0
- package/dist/serialization/markdown/InlineTokenizer.d.ts.map +1 -0
- package/dist/serialization/markdown/LinkReferenceExtractor.d.ts +37 -0
- package/dist/serialization/markdown/LinkReferenceExtractor.d.ts.map +1 -0
- package/dist/serialization/markdown/MarkdownContext.d.ts +32 -0
- package/dist/serialization/markdown/MarkdownContext.d.ts.map +1 -0
- package/dist/serialization/markdown/MarkdownEntities.d.ts +33 -0
- package/dist/serialization/markdown/MarkdownEntities.d.ts.map +1 -0
- package/dist/serialization/markdown/MarkdownEscape.d.ts +33 -0
- package/dist/serialization/markdown/MarkdownEscape.d.ts.map +1 -0
- package/dist/serialization/markdown/MarkdownHTMLRegistry.d.ts +4 -0
- package/dist/serialization/markdown/MarkdownHTMLRegistry.d.ts.map +1 -0
- package/dist/serialization/markdown/MarkdownParseContext.d.ts +23 -0
- package/dist/serialization/markdown/MarkdownParseContext.d.ts.map +1 -0
- package/dist/state/Mapping.d.ts +33 -10
- package/dist/state/Mapping.d.ts.map +1 -1
- package/dist/state/StepApplication.d.ts +3 -1
- package/dist/state/StepApplication.d.ts.map +1 -1
- package/dist/state/StepHandlers.d.ts.map +1 -1
- package/dist/state/StepInversion.d.ts +2 -1
- package/dist/state/StepInversion.d.ts.map +1 -1
- package/dist/state/StepMapping.d.ts +3 -2
- package/dist/state/StepMapping.d.ts.map +1 -1
- package/dist/state/StepMaps.d.ts +3 -2
- package/dist/state/StepMaps.d.ts.map +1 -1
- package/dist/state/Steps.d.ts +34 -2
- package/dist/state/Steps.d.ts.map +1 -1
- package/dist/state/TransactionBuilder.d.ts +7 -1
- package/dist/state/TransactionBuilder.d.ts.map +1 -1
- package/dist/style/StyleRuntime.d.ts +7 -0
- package/dist/style/StyleRuntime.d.ts.map +1 -1
- package/dist/test/MarkdownConformanceUtils.d.ts +12 -0
- package/dist/test/MarkdownConformanceUtils.d.ts.map +1 -0
- package/dist/view/BlockRendering.d.ts +5 -0
- package/dist/view/BlockRendering.d.ts.map +1 -1
- package/dist/view/DecorationRendering.d.ts +6 -0
- package/dist/view/DecorationRendering.d.ts.map +1 -1
- package/dist/view/EditorViewEvents.d.ts.map +1 -1
- package/dist/view/Reconciler.d.ts.map +1 -1
- package/package.json +14 -1
- package/dist/chunks/AttrRegistry-DcDVyzLm.mjs.map +0 -1
- package/dist/chunks/BlockInsertion-6rR9tIGP.mjs +0 -2
- package/dist/chunks/BlockInsertion-6rR9tIGP.mjs.map +0 -1
- package/dist/chunks/BlockquotePlugin-4V7KV_Sb.mjs +0 -2
- package/dist/chunks/CodeBlockPlugin-DC0-BnNy.mjs +0 -2
- package/dist/chunks/CodeBlockPlugin-DC0-BnNy.mjs.map +0 -1
- package/dist/chunks/ColorPickerPopup-C_74bqid.mjs +0 -2
- package/dist/chunks/Commands-BIIpx_Zd.mjs +0 -2
- package/dist/chunks/Commands-BIIpx_Zd.mjs.map +0 -1
- package/dist/chunks/Decoration-ZeyVfwJB.mjs +0 -2
- package/dist/chunks/Decoration-ZeyVfwJB.mjs.map +0 -1
- package/dist/chunks/Document-r7vLOAGA.mjs +0 -2
- package/dist/chunks/Document-r7vLOAGA.mjs.map +0 -1
- package/dist/chunks/DocumentParser-CcTSeT1B.mjs +0 -2
- package/dist/chunks/DocumentParser-CcTSeT1B.mjs.map +0 -1
- package/dist/chunks/FontPlugin-DB1_bgam.mjs +0 -2
- package/dist/chunks/FontSizePlugin-DFvp7Ki9.mjs.map +0 -1
- package/dist/chunks/FormulaPlugin-BLEcyazj.mjs +0 -2
- package/dist/chunks/FormulaPlugin-BLEcyazj.mjs.map +0 -1
- package/dist/chunks/GapCursorNavigation-ycNzuQVH.mjs +0 -2
- package/dist/chunks/HTMLUtils-C6B4UT00.mjs +0 -2
- package/dist/chunks/HTMLUtils-C6B4UT00.mjs.map +0 -1
- package/dist/chunks/HeadingPlugin-D9yvG2Aw.mjs +0 -2
- package/dist/chunks/HorizontalRulePlugin-0FjHPZuA.mjs +0 -2
- package/dist/chunks/HorizontalRulePlugin-0FjHPZuA.mjs.map +0 -1
- package/dist/chunks/ImagePlugin-Cp_RINtc.mjs +0 -2
- package/dist/chunks/InlineCodePlugin-DMr4O7c7.mjs.map +0 -1
- package/dist/chunks/InlineStyleMarkSpec-4R6DC7ij.mjs +0 -2
- package/dist/chunks/LinkPlugin-DvZ3MPgL.mjs +0 -2
- package/dist/chunks/LinkPlugin-DvZ3MPgL.mjs.map +0 -1
- package/dist/chunks/ListPlugin-CVId2dE0.mjs +0 -2
- package/dist/chunks/ListPlugin-CVId2dE0.mjs.map +0 -1
- package/dist/chunks/NodeSelectionCommands-Dj4VxLdD.mjs +0 -2
- package/dist/chunks/PluginHelpers-KDuTlmXm.mjs +0 -2
- package/dist/chunks/PopupPositioning-DtUrY9bh.mjs +0 -2
- package/dist/chunks/PrintPlugin-C6gOJT6d.mjs +0 -2
- package/dist/chunks/PrintPlugin-C6gOJT6d.mjs.map +0 -1
- package/dist/chunks/PrintTypes-WdtgSj74.mjs.map +0 -1
- package/dist/chunks/StrikethroughPlugin-BLKDRWtf.mjs +0 -2
- package/dist/chunks/StrikethroughPlugin-BLKDRWtf.mjs.map +0 -1
- package/dist/chunks/StyleRuntime-BAutwDZT.mjs +0 -2
- package/dist/chunks/StyleRuntime-BAutwDZT.mjs.map +0 -1
- package/dist/chunks/TablePlugin-D93RR5xH.mjs +0 -2
- package/dist/chunks/TablePlugin-D93RR5xH.mjs.map +0 -1
- package/dist/chunks/TextColorPlugin-C1qpzEOa.mjs +0 -2
- package/dist/chunks/TextDirectionAutoPlugin-CzWJjrvG.mjs +0 -2
- package/dist/chunks/TextDirectionService-OFOU6r_s.mjs +0 -2
- package/dist/chunks/TextFormattingPlugin-Cubp3e7f.mjs +0 -2
- package/dist/chunks/TextFormattingPlugin-Cubp3e7f.mjs.map +0 -1
- package/dist/chunks/VideoPlugin-D9rQZol6.mjs +0 -2
- package/dist/chunks/VideoPlugin-D9rQZol6.mjs.map +0 -1
- package/dist/chunks/WordBoundary-DxeMBRyP.mjs +0 -2
- package/dist/chunks/ar-BTShmP2E.mjs +0 -2
- package/dist/chunks/ar-jbplYWkC.mjs +0 -2
- package/dist/chunks/ar-jbplYWkC.mjs.map +0 -1
- package/dist/chunks/de-DN-e6G5A.mjs +0 -2
- package/dist/chunks/de-DN-e6G5A.mjs.map +0 -1
- package/dist/chunks/es-CM55WeEN.mjs +0 -2
- package/dist/chunks/es-CM55WeEN.mjs.map +0 -1
- package/dist/chunks/fr-C_2i5Ono.mjs +0 -2
- package/dist/chunks/fr-C_2i5Ono.mjs.map +0 -1
- package/dist/chunks/full-Cah3qjCT.mjs +0 -2
- package/dist/chunks/hi-C9fvG91d.mjs +0 -2
- package/dist/chunks/hi-C9fvG91d.mjs.map +0 -1
- package/dist/chunks/minimal-DqATlnAL.mjs +0 -2
- package/dist/chunks/pt-GqLw5tN0.mjs +0 -2
- package/dist/chunks/pt-GqLw5tN0.mjs.map +0 -1
- package/dist/chunks/ru-4g_qsaLr.mjs +0 -2
- package/dist/chunks/ru-4g_qsaLr.mjs.map +0 -1
- package/dist/chunks/src-YY6n2SmV.mjs +0 -2
- package/dist/chunks/src-YY6n2SmV.mjs.map +0 -1
- package/dist/chunks/zh-BjoyjClN.mjs +0 -2
- package/dist/chunks/zh-DeZP08HI.mjs +0 -2
- package/dist/chunks/zh-DeZP08HI.mjs.map +0 -1
package/dist/state/Mapping.d.ts
CHANGED
|
@@ -81,16 +81,37 @@ export interface BlockRemovalMap {
|
|
|
81
81
|
* (`{blockId, offset}`) is unaffected — the new block has no prior
|
|
82
82
|
* positions, and positions inside other siblings keep their offsets.
|
|
83
83
|
*
|
|
84
|
-
*
|
|
84
|
+
* Consumed by {@link mapChildIndex}, {@link mapInsertionIndex}, and exact
|
|
85
|
+
* structural inverse detection during history replay.
|
|
85
86
|
*/
|
|
86
87
|
export interface ChildIndexShiftMap {
|
|
87
88
|
readonly type: 'childIndexShift';
|
|
88
89
|
readonly parentPath: readonly BlockId[];
|
|
89
90
|
readonly fromIndex: number;
|
|
90
91
|
readonly delta: number;
|
|
92
|
+
/**
|
|
93
|
+
* IDs introduced by an InsertNodeStep. Optional for synthetic/test maps;
|
|
94
|
+
* when present it makes the map an exact structural inverse of the matching
|
|
95
|
+
* BlockRemovalMap during history replay.
|
|
96
|
+
*/
|
|
97
|
+
readonly insertedBlockIds?: ReadonlySet<BlockId>;
|
|
98
|
+
}
|
|
99
|
+
/**
|
|
100
|
+
* One existing subtree moves between child lists. Positions inside the moved
|
|
101
|
+
* subtree keep their block IDs and offsets; sibling child indices in both
|
|
102
|
+
* parents are shifted by the removal followed by the insertion.
|
|
103
|
+
*/
|
|
104
|
+
export interface MoveNodeMap {
|
|
105
|
+
readonly type: 'moveNode';
|
|
106
|
+
readonly movedNodeId: BlockId;
|
|
107
|
+
readonly fromParentPath: readonly BlockId[];
|
|
108
|
+
readonly fromIndex: number;
|
|
109
|
+
readonly toParentPath: readonly BlockId[];
|
|
110
|
+
/** Destination index after removing the source node. */
|
|
111
|
+
readonly destinationIndex: number;
|
|
91
112
|
}
|
|
92
113
|
/** Discriminated union of all StepMap variants. */
|
|
93
|
-
export type StepMap = IdentityMap | ShiftMap | SplitMap | MergeMap | BlockRemovalMap | ChildIndexShiftMap;
|
|
114
|
+
export type StepMap = IdentityMap | ShiftMap | SplitMap | MergeMap | BlockRemovalMap | ChildIndexShiftMap | MoveNodeMap;
|
|
94
115
|
/** Result of mapping a single position. */
|
|
95
116
|
export interface MapResult {
|
|
96
117
|
readonly pos: Position;
|
|
@@ -147,9 +168,10 @@ export declare class Mapping {
|
|
|
147
168
|
*/
|
|
148
169
|
map(pos: Position, assoc?: Assoc): Position;
|
|
149
170
|
/**
|
|
150
|
-
* Like {@link map}, but returns whether the position
|
|
151
|
-
*
|
|
152
|
-
*
|
|
171
|
+
* Like {@link map}, but returns whether the position is deleted in the final
|
|
172
|
+
* frame. Content deletion remains sticky across every later map. Structural
|
|
173
|
+
* deletion can be recovered by an `insertNode` map carrying the same block
|
|
174
|
+
* ID; a later removal can mark that identity deleted again.
|
|
153
175
|
*/
|
|
154
176
|
mapResult(pos: Position, assoc?: Assoc): MapResult;
|
|
155
177
|
/**
|
|
@@ -207,7 +229,7 @@ export declare function mapOffsetInBlock(blockId: BlockId, offset: number, mappi
|
|
|
207
229
|
*
|
|
208
230
|
* Child-indices live in a coordinate space orthogonal to positions
|
|
209
231
|
* (`{blockId, offset}`): they describe a slot in a parent's child list,
|
|
210
|
-
* not a place inside text.
|
|
232
|
+
* not a place inside text. Three {@link StepMap} categories carry
|
|
211
233
|
* child-index-affecting information:
|
|
212
234
|
*
|
|
213
235
|
* - {@link ChildIndexShiftMap} (produced by `insertNode`): shifts
|
|
@@ -215,6 +237,8 @@ export declare function mapOffsetInBlock(blockId: BlockId, offset: number, mappi
|
|
|
215
237
|
* - {@link BlockRemovalMap} (produced by `removeNode`): removes the child
|
|
216
238
|
* at `index` (the input index becomes invalid → `null`), and shifts
|
|
217
239
|
* sibling indices `> index` down by `1`.
|
|
240
|
+
* - {@link MoveNodeMap} (produced by `moveNode`): combines the source removal
|
|
241
|
+
* and destination insertion while preserving the moved subtree's identity.
|
|
218
242
|
*
|
|
219
243
|
* Maps whose `parentPath` differs from the input pass through; all
|
|
220
244
|
* non-structural categories (`shift`, `split`, `merge`, `identity`) are
|
|
@@ -247,10 +271,9 @@ export declare function mapInsertionIndex(parentPath: readonly BlockId[], index:
|
|
|
247
271
|
* and cancel them, sidestepping the round-trip clamping for cases where
|
|
248
272
|
* the rebase is a no-op in content terms.
|
|
249
273
|
*
|
|
250
|
-
*
|
|
251
|
-
*
|
|
252
|
-
*
|
|
253
|
-
* re-validate "did the block come back" must check the document instead.
|
|
274
|
+
* Structural maps include enough metadata to recover their exact inverse
|
|
275
|
+
* where possible. Synthetic ChildIndexShiftMaps without inserted subtree IDs
|
|
276
|
+
* remain position-only and therefore invert to {@link IDENTITY_MAP}.
|
|
254
277
|
*/
|
|
255
278
|
export declare function invertStepMap(map: StepMap): StepMap;
|
|
256
279
|
/**
|
|
@@ -1 +1 @@
|
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;AA4GD;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,aAAa,CAAC,GAAG,EAAE,OAAO,GAAG,OAAO,CAsDnD;AAED;;;GAGG;AACH,wBAAgB,aAAa,CAAC,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,OAAO,GAAG,OAAO,CAqD7D"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Document } from '../model/Document.js';
|
|
2
|
-
import { AddMarkStep, DeleteTextStep, InsertInlineNodeStep, InsertNodeStep, InsertTextStep, MergeBlocksStep, RemoveInlineNodeStep, RemoveMarkStep, RemoveNodeStep, SetBlockTypeStep, SetInlineNodeAttrStep, SetNodeAttrStep, SplitBlockStep } from './Transaction.js';
|
|
2
|
+
import { AddMarkStep, DeleteTextStep, InsertInlineNodeStep, InsertNodeStep, InsertTextStep, MergeBlocksStep, MoveNodeStep, RemoveInlineNodeStep, RemoveMarkStep, RemoveNodeStep, SetBlockTypeStep, SetInlineNodeAttrStep, SetNodeAttrStep, SplitBlockStep } from './Transaction.js';
|
|
3
3
|
export declare function applyInsertText(doc: Document, step: InsertTextStep): Document;
|
|
4
4
|
export declare function applyDeleteText(doc: Document, step: DeleteTextStep): Document;
|
|
5
5
|
export declare function applySplitBlock(doc: Document, step: SplitBlockStep): Document;
|
|
@@ -18,5 +18,7 @@ export declare function applySetInlineNodeAttr(doc: Document, step: SetInlineNod
|
|
|
18
18
|
export declare function applySetBlockType(doc: Document, step: SetBlockTypeStep): Document;
|
|
19
19
|
export declare function applyInsertNode(doc: Document, step: InsertNodeStep): Document;
|
|
20
20
|
export declare function applyRemoveNode(doc: Document, step: RemoveNodeStep): Document;
|
|
21
|
+
/** Moves a subtree while preserving every block identity inside it. */
|
|
22
|
+
export declare function applyMoveNode(doc: Document, step: MoveNodeStep): Document;
|
|
21
23
|
export declare function applySetNodeAttr(doc: Document, step: SetNodeAttrStep): Document;
|
|
22
24
|
//# sourceMappingURL=StepApplication.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StepApplication.d.ts","sourceRoot":"","sources":["../../src/state/StepApplication.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAIN,KAAK,QAAQ,EAQb,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"StepApplication.d.ts","sourceRoot":"","sources":["../../src/state/StepApplication.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAIN,KAAK,QAAQ,EAQb,MAAM,sBAAsB,CAAC;AAe9B,OAAO,KAAK,EACX,WAAW,EACX,cAAc,EACd,oBAAoB,EACpB,cAAc,EACd,cAAc,EACd,eAAe,EACf,YAAY,EACZ,oBAAoB,EACpB,cAAc,EACd,cAAc,EACd,gBAAgB,EAChB,qBAAqB,EACrB,eAAe,EACf,cAAc,EACd,MAAM,kBAAkB,CAAC;AAE1B,wBAAgB,eAAe,CAAC,GAAG,EAAE,QAAQ,EAAE,IAAI,EAAE,cAAc,GAAG,QAAQ,CAM7E;AAED,wBAAgB,eAAe,CAAC,GAAG,EAAE,QAAQ,EAAE,IAAI,EAAE,cAAc,GAAG,QAAQ,CAI7E;AAED,wBAAgB,eAAe,CAAC,GAAG,EAAE,QAAQ,EAAE,IAAI,EAAE,cAAc,GAAG,QAAQ,CAuD7E;AAED,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,QAAQ,EAAE,IAAI,EAAE,eAAe,GAAG,QAAQ,CAoC/E;AAED,wBAAgB,YAAY,CAAC,GAAG,EAAE,QAAQ,EAAE,IAAI,EAAE,WAAW,GAAG,QAAQ,CAIvE;AAED,wBAAgB,eAAe,CAAC,GAAG,EAAE,QAAQ,EAAE,IAAI,EAAE,cAAc,GAAG,QAAQ,CAI7E;AAED;;;;GAIG;AACH,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,QAAQ,GAAG,QAAQ,CAE3D;AAID,wBAAgB,qBAAqB,CAAC,GAAG,EAAE,QAAQ,EAAE,IAAI,EAAE,oBAAoB,GAAG,QAAQ,CAIzF;AAED,wBAAgB,qBAAqB,CAAC,GAAG,EAAE,QAAQ,EAAE,IAAI,EAAE,oBAAoB,GAAG,QAAQ,CAIzF;AAED,wBAAgB,sBAAsB,CAAC,GAAG,EAAE,QAAQ,EAAE,IAAI,EAAE,qBAAqB,GAAG,QAAQ,CAO3F;AAsBD,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,QAAQ,EAAE,IAAI,EAAE,gBAAgB,GAAG,QAAQ,CASjF;AAID,wBAAgB,eAAe,CAAC,GAAG,EAAE,QAAQ,EAAE,IAAI,EAAE,cAAc,GAAG,QAAQ,CAa7E;AAED,wBAAgB,eAAe,CAAC,GAAG,EAAE,QAAQ,EAAE,IAAI,EAAE,cAAc,GAAG,QAAQ,CAa7E;AAED,uEAAuE;AACvE,wBAAgB,aAAa,CAAC,GAAG,EAAE,QAAQ,EAAE,IAAI,EAAE,YAAY,GAAG,QAAQ,CAgBzE;AAED,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,QAAQ,EAAE,IAAI,EAAE,eAAe,GAAG,QAAQ,CAQ/E"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StepHandlers.d.ts","sourceRoot":"","sources":["../../src/state/StepHandlers.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,EAAgB,OAAO,EAAE,KAAK,OAAO,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"StepHandlers.d.ts","sourceRoot":"","sources":["../../src/state/StepHandlers.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,EAAgB,OAAO,EAAE,KAAK,OAAO,EAAE,MAAM,cAAc,CAAC;AAsEnE,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AACvC,OAA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ep, RemoveNodeStep, SetBlockTypeStep, SetInlineNodeAttrStep, SetNodeAttrStep, SetStoredMarksStep, SplitBlockStep, Step } from './Steps.js';
|
|
2
|
+
import { AddMarkStep, DeleteTextStep, InsertInlineNodeStep, InsertNodeStep, InsertTextStep, MergeBlocksStep, MoveNodeStep, RemoveInlineNodeStep, RemoveMarkStep, RemoveNodeStep, SetBlockTypeStep, SetInlineNodeAttrStep, SetNodeAttrStep, SetStoredMarksStep, SplitBlockStep, Step } from './Steps.js';
|
|
3
3
|
import { Transaction } from './Transaction.js';
|
|
4
4
|
export declare function invertInsertText(step: InsertTextStep): Step;
|
|
5
5
|
export declare function invertDeleteText(step: DeleteTextStep): Step;
|
|
@@ -11,6 +11,7 @@ export declare function invertSetStoredMarks(step: SetStoredMarksStep): Step;
|
|
|
11
11
|
export declare function invertSetBlockType(step: SetBlockTypeStep): Step;
|
|
12
12
|
export declare function invertInsertNode(step: InsertNodeStep): Step;
|
|
13
13
|
export declare function invertRemoveNode(step: RemoveNodeStep): Step;
|
|
14
|
+
export declare function invertMoveNode(step: MoveNodeStep): Step;
|
|
14
15
|
export declare function invertSetNodeAttr(step: SetNodeAttrStep): Step;
|
|
15
16
|
export declare function invertInsertInlineNode(step: InsertInlineNodeStep): Step;
|
|
16
17
|
export declare function invertRemoveInlineNode(step: RemoveInlineNodeStep): Step;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StepInversion.d.ts","sourceRoot":"","sources":["../../src/state/StepInversion.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAC;AAIjD,OAAO,KAAK,EACX,WAAW,EACX,cAAc,EACd,oBAAoB,EACpB,cAAc,EACd,cAAc,EACd,eAAe,EACf,oBAAoB,EACpB,cAAc,EACd,cAAc,EACd,gBAAgB,EAChB,qBAAqB,EACrB,eAAe,EACf,kBAAkB,EAClB,cAAc,EACd,IAAI,EACJ,MAAM,YAAY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I,CAO7D;AAED,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,oBAAoB,GAAG,IAAI,CAQvE;AAED,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,oBAAoB,GAAG,IAAI,CAQvE;AAED,wBAAgB,uBAAuB,CAAC,IAAI,EAAE,qBAAqB,GAAG,IAAI,CASzE;AAED;;;;GAIG;AACH,wBAAgB,uBAAuB,CAAC,EAAE,EAAE,WAAW,GAAG,SAAS,IAAI,EAAE,GAAG,IAAI,CAO/E"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Document } from '../model/Document.js';
|
|
2
2
|
import { Mapping } from './Mapping.js';
|
|
3
|
-
import { AddMarkStep, DeleteTextStep, InsertInlineNodeStep, InsertNodeStep, InsertTextStep, MergeBlocksStep, RemoveInlineNodeStep, RemoveMarkStep, RemoveNodeStep, SetBlockTypeStep, SetInlineNodeAttrStep, SetNodeAttrStep, SetStoredMarksStep, SplitBlockStep, Step } from './Steps.js';
|
|
3
|
+
import { AddMarkStep, DeleteTextStep, InsertInlineNodeStep, InsertNodeStep, InsertTextStep, MergeBlocksStep, MoveNodeStep, RemoveInlineNodeStep, RemoveMarkStep, RemoveNodeStep, SetBlockTypeStep, SetInlineNodeAttrStep, SetNodeAttrStep, SetStoredMarksStep, SplitBlockStep, Step } from './Steps.js';
|
|
4
4
|
export declare function mapInsertText(step: InsertTextStep, mapping: Mapping, _doc: Document): Step | null;
|
|
5
5
|
export declare function mapDeleteText(step: DeleteTextStep, mapping: Mapping, doc: Document): Step | null;
|
|
6
6
|
export declare function mapInsertInlineNode(step: InsertInlineNodeStep, mapping: Mapping, _doc: Document): Step | null;
|
|
@@ -13,6 +13,7 @@ export declare function mapSetStoredMarks(step: SetStoredMarksStep, _mapping: Ma
|
|
|
13
13
|
export declare function mapSetBlockType(step: SetBlockTypeStep, mapping: Mapping, doc: Document): Step | null;
|
|
14
14
|
export declare function mapSetNodeAttr(step: SetNodeAttrStep, mapping: Mapping, doc: Document): Step | null;
|
|
15
15
|
export declare function mapSetInlineNodeAttr(step: SetInlineNodeAttrStep, mapping: Mapping, doc: Document): Step | null;
|
|
16
|
-
export declare function mapInsertNode(step: InsertNodeStep, mapping: Mapping,
|
|
16
|
+
export declare function mapInsertNode(step: InsertNodeStep, mapping: Mapping, doc: Document): Step | null;
|
|
17
17
|
export declare function mapRemoveNode(step: RemoveNodeStep, mapping: Mapping, doc: Document): Step | null;
|
|
18
|
+
export declare function mapMoveNode(step: MoveNodeStep, mapping: Mapping, doc: Document): Step | null;
|
|
18
19
|
//# sourceMappingURL=StepMapping.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StepMapping.d.ts","sourceRoot":"","sources":["../../src/state/StepMapping.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AAEH,OAAO,KAAK,EAAa,QAAQ,EAAc,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"StepMapping.d.ts","sourceRoot":"","sources":["../../src/state/StepMapping.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AAEH,OAAO,KAAK,EAAa,QAAQ,EAAc,MAAM,sBAAsB,CAAC;AAY5E,OAAO,EAEN,KAAK,OAAO,EAKZ,MAAM,cAAc,CAAC;AACtB,OAAO,KAAK,EACX,WAAW,EACX,cAAc,EACd,oBAAoB,EACpB,cAAc,EACd,cAAc,EACd,eAAe,EACf,YAAY,EACZ,oBAAoB,EACpB,cAAc,EACd,cAAc,EACd,gBAAgB,EAChB,qBAAqB,EACrB,eAAe,EACf,kBAAkB,EAClB,cAAc,EACd,IAAI,EACJ,MAAM,YAAY,CAAC;AA4DpB,wBAAgB,aAAa,CAAC,IAAI,EAAE,cAAc,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,QAAQ,GAAG,IAAI,GAAG,IAAI,CAajG;AAED,wBAAgB,aAAa,CAAC,IAAI,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wBAAgB,oBAAoB,CACnC,IAAI,EAAE,qBAAqB,EAC3B,OAAO,EAAE,OAAO,EAChB,GAAG,EAAE,QAAQ,GACX,IAAI,GAAG,IAAI,CAoBb;AAID,wBAAgB,aAAa,CAAC,IAAI,EAAE,cAAc,EAAE,OAAO,EAAE,OAAO,EAAE,GAAG,EAAE,QAAQ,GAAG,IAAI,GAAG,IAAI,CAahG;AAED,wBAAgB,aAAa,CAAC,IAAI,EAAE,cAAc,EAAE,OAAO,EAAE,OAAO,EAAE,GAAG,EAAE,QAAQ,GAAG,IAAI,GAAG,IAAI,CAiChG;AAED,wBAAgB,WAAW,CAAC,IAAI,EAAE,YAAY,EAAE,OAAO,EAAE,OAAO,EAAE,GAAG,EAAE,QAAQ,GAAG,IAAI,GAAG,IAAI,CA0B5F"}
|
package/dist/state/StepMaps.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Document } from '../model/Document.js';
|
|
2
|
-
import { BlockRemovalMap, ChildIndexShiftMap, MergeMap, ShiftMap, SplitMap, StepMap } from './Mapping.js';
|
|
3
|
-
import { AddMarkStep, DeleteTextStep, InsertInlineNodeStep, InsertNodeStep, InsertTextStep, MergeBlocksStep, RemoveInlineNodeStep, RemoveMarkStep, RemoveNodeStep, SetBlockTypeStep, SetInlineNodeAttrStep, SetNodeAttrStep, SetStoredMarksStep, SplitBlockStep } from './Steps.js';
|
|
2
|
+
import { BlockRemovalMap, ChildIndexShiftMap, IDENTITY_MAP, MergeMap, MoveNodeMap, ShiftMap, SplitMap, StepMap } from './Mapping.js';
|
|
3
|
+
import { AddMarkStep, DeleteTextStep, InsertInlineNodeStep, InsertNodeStep, InsertTextStep, MergeBlocksStep, MoveNodeStep, RemoveInlineNodeStep, RemoveMarkStep, RemoveNodeStep, SetBlockTypeStep, SetInlineNodeAttrStep, SetNodeAttrStep, SetStoredMarksStep, SplitBlockStep } from './Steps.js';
|
|
4
4
|
export declare function getMapInsertText(_doc: Document, step: InsertTextStep): ShiftMap;
|
|
5
5
|
export declare function getMapDeleteText(_doc: Document, step: DeleteTextStep): ShiftMap;
|
|
6
6
|
export declare function getMapInsertInlineNode(_doc: Document, step: InsertInlineNodeStep): ShiftMap;
|
|
@@ -16,6 +16,7 @@ export declare function getMapRemoveNode(_doc: Document, step: RemoveNodeStep):
|
|
|
16
16
|
* parent.
|
|
17
17
|
*/
|
|
18
18
|
export declare function getMapInsertNode(_doc: Document, step: InsertNodeStep): ChildIndexShiftMap;
|
|
19
|
+
export declare function getMapMoveNode(doc: Document, step: MoveNodeStep): MoveNodeMap | typeof IDENTITY_MAP;
|
|
19
20
|
export declare function getMapAddMark(_doc: Document, _step: AddMarkStep): StepMap;
|
|
20
21
|
export declare function getMapRemoveMark(_doc: Document, _step: RemoveMarkStep): StepMap;
|
|
21
22
|
export declare function getMapSetStoredMarks(_doc: Document, _step: SetStoredMarksStep): StepMap;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StepMaps.d.ts","sourceRoot":"","sources":["../../src/state/StepMaps.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,EACN,KAAK,eAAe,EACpB,KAAK,kBAAkB,
|
|
1
|
+
{"version":3,"file":"StepMaps.d.ts","sourceRoot":"","sources":["../../src/state/StepMaps.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,EACN,KAAK,eAAe,EACpB,KAAK,kBAAkB,EACvB,YAAY,EACZ,KAAK,QAAQ,EACb,KAAK,WAAW,EAChB,KAAK,QAAQ,EACb,KAAK,QAAQ,EACb,KAAK,OAAO,EAEZ,MAAM,cAAc,CAAC;AAEtB,OAAO,KAAK,EACX,WAAW,EACX,cAAc,EACd,oBAAoB,EACpB,cAAc,EACd,cAAc,EACd,eAAe,EACf,YAAY,EAC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,kBAAkB,GAAG,OAAO,CAEvF;AAED,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,gBAAgB,GAAG,OAAO,CAEnF;AAED,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,eAAe,GAAG,OAAO,CAEjF;AAED,wBAAgB,uBAAuB,CAAC,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,qBAAqB,GAAG,OAAO,CAE7F"}
|
package/dist/state/Steps.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { BlockAttrs, BlockNode, ContentSegment, InlineNode, Mark } from '../model/Document.js';
|
|
1
|
+
import { BlockAttrs, BlockNode, ContentSegment, Document, InlineNode, Mark } from '../model/Document.js';
|
|
2
2
|
import { BlockId, NodeTypeName } from '../model/TypeBrands.js';
|
|
3
3
|
export interface InsertTextStep {
|
|
4
4
|
readonly type: 'insertText';
|
|
@@ -44,6 +44,8 @@ export interface SplitBlockStep {
|
|
|
44
44
|
* as-is (an absent value here means "the source block had no attrs").
|
|
45
45
|
*/
|
|
46
46
|
readonly newBlockAttrs?: BlockAttrs;
|
|
47
|
+
/** Semantic HTML ID restored by an inverse split, if the source block had one. */
|
|
48
|
+
readonly newBlockHTMLId?: string;
|
|
47
49
|
readonly path?: readonly BlockId[];
|
|
48
50
|
}
|
|
49
51
|
export interface MergeBlocksStep {
|
|
@@ -58,6 +60,8 @@ export interface MergeBlocksStep {
|
|
|
58
60
|
readonly sourceType?: NodeTypeName;
|
|
59
61
|
/** Source block's attrs at merge time, if any. */
|
|
60
62
|
readonly sourceAttrs?: BlockAttrs;
|
|
63
|
+
/** Source block's semantic HTML ID at merge time, if any. */
|
|
64
|
+
readonly sourceHTMLId?: string;
|
|
61
65
|
readonly path?: readonly BlockId[];
|
|
62
66
|
}
|
|
63
67
|
/**
|
|
@@ -120,6 +124,19 @@ export interface RemoveNodeStep {
|
|
|
120
124
|
readonly index: number;
|
|
121
125
|
readonly removedNode: BlockNode;
|
|
122
126
|
}
|
|
127
|
+
/**
|
|
128
|
+
* Moves one existing block node between parent child lists without changing
|
|
129
|
+
* its identity or descendants. `toIndex` is an insertion slot in the document
|
|
130
|
+
* before removal; same-parent moves adjust it after removing the source.
|
|
131
|
+
*/
|
|
132
|
+
export interface MoveNodeStep {
|
|
133
|
+
readonly type: 'moveNode';
|
|
134
|
+
readonly fromParentPath: readonly BlockId[];
|
|
135
|
+
readonly fromIndex: number;
|
|
136
|
+
readonly toParentPath: readonly BlockId[];
|
|
137
|
+
readonly toIndex: number;
|
|
138
|
+
readonly movedNode: BlockNode;
|
|
139
|
+
}
|
|
123
140
|
export interface SetNodeAttrStep {
|
|
124
141
|
readonly type: 'setNodeAttr';
|
|
125
142
|
readonly path: readonly BlockId[];
|
|
@@ -148,8 +165,23 @@ export interface SetInlineNodeAttrStep {
|
|
|
148
165
|
readonly previousAttrs: Readonly<Record<string, string | number | boolean>>;
|
|
149
166
|
readonly path?: readonly BlockId[];
|
|
150
167
|
}
|
|
151
|
-
export type Step = InsertTextStep | DeleteTextStep | SplitBlockStep | MergeBlocksStep | AddMarkStep | RemoveMarkStep | SetStoredMarksStep | SetBlockTypeStep | InsertNodeStep | RemoveNodeStep | SetNodeAttrStep | InsertInlineNodeStep | RemoveInlineNodeStep | SetInlineNodeAttrStep;
|
|
168
|
+
export type Step = InsertTextStep | DeleteTextStep | SplitBlockStep | MergeBlocksStep | AddMarkStep | RemoveMarkStep | SetStoredMarksStep | SetBlockTypeStep | InsertNodeStep | RemoveNodeStep | MoveNodeStep | SetNodeAttrStep | InsertInlineNodeStep | RemoveInlineNodeStep | SetInlineNodeAttrStep;
|
|
152
169
|
export type TransactionOrigin = 'input' | 'paste' | 'command' | 'history' | 'api';
|
|
170
|
+
/** Returns the moved node's index in its destination parent after removal. */
|
|
171
|
+
export declare function moveNodeDestinationIndex(step: MoveNodeStep): number;
|
|
172
|
+
/** True when a same-parent move leaves the child list unchanged. */
|
|
173
|
+
export declare function isMoveNodeNoOp(step: MoveNodeStep): boolean;
|
|
174
|
+
/** A move resolved and validated against the document it will be applied to. */
|
|
175
|
+
export interface ResolvedMoveNodeStep {
|
|
176
|
+
readonly movedNode: BlockNode;
|
|
177
|
+
readonly destinationIndex: number;
|
|
178
|
+
}
|
|
179
|
+
/**
|
|
180
|
+
* Resolves both sides of a move before any mutation occurs. This is shared by
|
|
181
|
+
* application and StepMap production so an invalid move is consistently an
|
|
182
|
+
* identity operation and can never remove its source without reinserting it.
|
|
183
|
+
*/
|
|
184
|
+
export declare function resolveMoveNodeStep(doc: Document, step: MoveNodeStep): ResolvedMoveNodeStep | null;
|
|
153
185
|
/**
|
|
154
186
|
* Block-space width an {@link InsertTextStep} occupies once applied. When the
|
|
155
187
|
* step carries `segments` (which may include inline nodes, each width 1), the
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Steps.d.ts","sourceRoot":"","sources":["../../src/state/Steps.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"Steps.d.ts","sourceRoot":"","sources":["../../src/state/Steps.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,KAAK,EACX,UAAU,EACV,SAAS,EACT,cAAc,EACd,QAAQ,EACR,UAAU,EACV,IAAI,EACJ,MAAM,sBAAsB,CAAC;AAE9B,OAAO,KAAK,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAEpE,MAAM,WAAW,cAAc;IAC9B,QAAQ,CAAC,IAAI,EAAE,YAAY,CAAC;IAC5B,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;IAC1B,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,KAAK,EAAE,SAAS,IAAI,EAAE,CAAC;IAChC;;;;;OAKG;IACH,QAAQ,CAAC,QAAQ,CAA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,MAAM,iBAAiB,GAAG,OAAO,GAAG,OAAO,GAAG,SAAS,GAAG,SAAS,GAAG,KAAK,CAAC;AAElF,8EAA8E;AAC9E,wBAAgB,wBAAwB,CAAC,IAAI,EAAE,YAAY,GAAG,MAAM,CAInE;AAED,oEAAoE;AACpE,wBAAgB,cAAc,CAAC,IAAI,EAAE,YAAY,GAAG,OAAO,CAK1D;AAED,gFAAgF;AAChF,MAAM,WAAW,oBAAoB;IACpC,QAAQ,CAAC,SAAS,EAAE,SAAS,CAAC;IAC9B,QAAQ,CAAC,gBAAgB,EAAE,MAAM,CAAC;CAClC;AAED;;;;GAIG;AACH,wBAAgB,mBAAmB,CAClC,GAAG,EAAE,QAAQ,EACb,IAAI,EAAE,YAAY,GAChB,oBAAoB,GAAG,IAAI,CAwB7B;AAOD;;;;;;;;GAQG;AACH,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,cAAc,GAAG,MAAM,CAEhE"}
|
|
@@ -33,7 +33,7 @@ export declare class TransactionBuilder {
|
|
|
33
33
|
* identity should prefer {@link mergeBlocksAt}, which derives both from the
|
|
34
34
|
* working document.
|
|
35
35
|
*/
|
|
36
|
-
mergeBlocks(targetBlockId: BlockId, sourceBlockId: BlockId, targetLengthBefore: number, sourceType?: NodeTypeName, sourceAttrs?: BlockAttrs): this;
|
|
36
|
+
mergeBlocks(targetBlockId: BlockId, sourceBlockId: BlockId, targetLengthBefore: number, sourceType?: NodeTypeName, sourceAttrs?: BlockAttrs, sourceHTMLId?: string): this;
|
|
37
37
|
/**
|
|
38
38
|
* Merges two blocks, auto-deriving targetLengthBefore and the source
|
|
39
39
|
* block's identity (type + attrs) from the working document. Requires a
|
|
@@ -68,6 +68,12 @@ export declare class TransactionBuilder {
|
|
|
68
68
|
insertNode(parentPath: readonly BlockId[], index: number, node: BlockNode): this;
|
|
69
69
|
/** Removes a node at the given index from the parent at the given path. */
|
|
70
70
|
removeNode(parentPath: readonly BlockId[], index: number): this;
|
|
71
|
+
/**
|
|
72
|
+
* Moves an existing block subtree without changing its identity. Source and
|
|
73
|
+
* destination coordinates are resolved against the current working document;
|
|
74
|
+
* `toIndex` is an insertion slot before the source is removed.
|
|
75
|
+
*/
|
|
76
|
+
moveNode(fromParentPath: readonly BlockId[], fromIndex: number, toParentPath: readonly BlockId[], toIndex: number): this;
|
|
71
77
|
/** Sets attributes on a node at the given path. */
|
|
72
78
|
setNodeAttr(path: readonly BlockId[], attrs: BlockAttrs): this;
|
|
73
79
|
/** Inserts an InlineNode at the given offset within a block. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TransactionBuilder.d.ts","sourceRoot":"","sources":["../../src/state/TransactionBuilder.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EACX,UAAU,EACV,SAAS,EACT,cAAc,EACd,QAAQ,EACR,UAAU,EACV,IAAI,EACJ,MAAM,sBAAsB,CAAC;AAY9B,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAE7D,OAAO,KAAK,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;
|
|
1
|
+
{"version":3,"file":"TransactionBuilder.d.ts","sourceRoot":"","sources":["../../src/state/TransactionBuilder.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EACX,UAAU,EACV,SAAS,EACT,cAAc,EACd,QAAQ,EACR,UAAU,EACV,IAAI,EACJ,MAAM,sBAAsB,CAAC;AAY9B,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAE7D,OAAO,KAAK,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAKpE,OAAO,KAAK,EAgBX,iBAAiB,EACjB,MAAM,YAAY,CAAC;AACpB,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAEpD,4CAA4C;AAC5C,qBAAa,kBAAkB;IAC9B,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAc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AE,OAAO,EAChB,MAAM,EAAE,MAAM,EACd,KAAK,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC,CAAC,GACxD,IAAI;IAuBP,0DAA0D;IAC1D,eAAe,IAAI,IAAI;IAKvB,kDAAkD;IAClD,YAAY,CAAC,SAAS,EAAE,eAAe,GAAG,IAAI;IAK9C,oDAAoD;IACpD,gBAAgB,CAAC,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,OAAO,EAAE,GAAG,IAAI;IAKjE,iDAAiD;IACjD,cAAc,CAAC,KAAK,EAAE,SAAS,IAAI,EAAE,GAAG,IAAI,EAAE,aAAa,EAAE,SAAS,IAAI,EAAE,GAAG,IAAI,GAAG,IAAI;IAM1F,oCAAoC;IACpC,KAAK,IAAI,WAAW;IAgBpB,+DAA+D;IAC/D,OAAO,CAAC,UAAU;IASlB,4DAA4D;IAC5D,OAAO,CAAC,YAAY;IAQpB;;;;;OAKG;IACH,OAAO,CAAC,WAAW;IAKnB;;;;;;;;;;OAUG;IACH,OAAO,CAAC,UAAU;CAOlB"}
|
|
@@ -10,6 +10,13 @@ export interface StyleRootOptions {
|
|
|
10
10
|
readonly sheet?: CSSStyleSheet | null;
|
|
11
11
|
}
|
|
12
12
|
type StyleRoot = ShadowRoot | Document;
|
|
13
|
+
/**
|
|
14
|
+
* True when the sheet holds runtime style-token rules, i.e. element styling
|
|
15
|
+
* that would be inline `style` attributes outside strict-CSP mode. Consumers
|
|
16
|
+
* (e.g. print) can use this to treat such rules as content styling rather
|
|
17
|
+
* than editor base styles.
|
|
18
|
+
*/
|
|
19
|
+
export declare function isRuntimeStyleSheet(sheet: CSSStyleSheet): boolean;
|
|
13
20
|
/** Creates a constructable stylesheet when the environment supports it. */
|
|
14
21
|
export declare function createRuntimeStyleSheet(): CSSStyleSheet | null;
|
|
15
22
|
/** Registers styling mode for a root (shadow root or document). */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StyleRuntime.d.ts","sourceRoot":"","sources":["../../src/style/StyleRuntime.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,MAAM,WAAW,gBAAgB;IAChC,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,KAAK,CAAC,EAAE,aAAa,GAAG,IAAI,CAAC;CACtC;AAED,KAAK,SAAS,GAAG,UAAU,GAAG,QAAQ,CAAC;
|
|
1
|
+
{"version":3,"file":"StyleRuntime.d.ts","sourceRoot":"","sources":["../../src/style/StyleRuntime.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,MAAM,WAAW,gBAAgB;IAChC,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,KAAK,CAAC,EAAE,aAAa,GAAG,IAAI,CAAC;CACtC;AAED,KAAK,SAAS,GAAG,UAAU,GAAG,QAAQ,CAAC;AAcvC;;;;;GAKG;AACH,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,aAAa,GAAG,OAAO,CAEjE;AAED,2EAA2E;AAC3E,wBAAgB,uBAAuB,IAAI,aAAa,GAAG,IAAI,CAS9D;AAED,mEAAmE;AACnE,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,SAAS,EAAE,OAAO,EAAE,gBAAgB,GAAG,IAAI,CAalF;AAED,+EAA+E;AAC/E,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,SAAS,GAAG,IAAI,CAOzD;AAED,sEAAsE;AACtE,wBAAgB,gBAAgB,CAAC,EAAE,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,IAAI,CAOvF;AAED,uCAAuC;AACvC,wBAAgB,mBAAmB,CAAC,EAAE,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,GAAG,IAAI,CAE3E;AAED,kDAAkD;AAClD,wBAAgB,kBAAkB,CACjC,EAAE,EAAE,WAAW,EACf,UAAU,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,GAAG,IAAI,CAAC,CAAC,GAC7D,IAAI,CASN;AAED,uCAAuC;AACvC,wBAAgB,YAAY,CAAC,EAAE,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,GAAG,IAAI,CAOnE;AAED,6DAA6D;AAC7D,wBAAgB,eAAe,CAAC,EAAE,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,GAAG,IAAI,CAQtE;AAED,gDAAgD;AAChD,wBAAgB,YAAY,CAAC,EAAE,EAAE,WAAW,GAAG,MAAM,CAIpD;AAED,2EAA2E;AAC3E,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,IAAI,GAAG,MAAM,GAAG,SAAS,CAInE"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Document } from '../model/Document.js';
|
|
2
|
+
/** Renders a parsed Document to the normalized structural comparison string. */
|
|
3
|
+
export declare function documentStructure(doc: Document): string;
|
|
4
|
+
/** Result of converting expected spec HTML: a structure, or why it cannot be one. */
|
|
5
|
+
export type SpecHtmlResult = {
|
|
6
|
+
readonly structure: string;
|
|
7
|
+
} | {
|
|
8
|
+
readonly unsupported: string;
|
|
9
|
+
};
|
|
10
|
+
/** Converts a spec example's expected HTML into the structural string. */
|
|
11
|
+
export declare function specHtmlToStructure(html: string): SpecHtmlResult;
|
|
12
|
+
//# sourceMappingURL=MarkdownConformanceUtils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MarkdownConformanceUtils.d.ts","sourceRoot":"","sources":["../../src/test/MarkdownConformanceUtils.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,KAAK,EAAa,QAAQ,EAAwB,MAAM,sBAAsB,CAAC;AAKtF,gFAAgF;AAChF,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,QAAQ,GAAG,MAAM,CAEvD;AAkED,qFAAqF;AACrF,MAAM,MAAM,cAAc,GAAG;IAAE,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAA;CAAE,GAAG;IAAE,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAA;CAAE,CAAC;AAe/F,0EAA0E;AAC1E,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,MAAM,GAAG,cAAc,CAahE"}
|
|
@@ -5,6 +5,11 @@ import { NodeView } from './NodeView.js';
|
|
|
5
5
|
import { ReconcileOptions } from './Reconciler.js';
|
|
6
6
|
/** Renders a block node to a DOM element, using registry specs or NodeViews. */
|
|
7
7
|
export declare function renderBlock(block: BlockNode, registry?: SchemaRegistry, nodeViews?: Map<string, NodeView>, options?: ReconcileOptions): HTMLElement;
|
|
8
|
+
/**
|
|
9
|
+
* Synchronizes the semantic HTML ID owned by a block without disturbing an
|
|
10
|
+
* unrelated ID a third-party NodeView may put on a freshly created element.
|
|
11
|
+
*/
|
|
12
|
+
export declare function syncBlockHTMLId(el: HTMLElement, block: BlockNode, previousBlock?: BlockNode): void;
|
|
8
13
|
/** Renders block content (inline children) into a container element. */
|
|
9
14
|
export declare function renderBlockContent(container: HTMLElement, block: BlockNode, registry?: SchemaRegistry, inlineDecos?: readonly InlineDecoration[]): void;
|
|
10
15
|
//# sourceMappingURL=BlockRendering.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BlockRendering.d.ts","sourceRoot":"","sources":["../../src/view/BlockRendering.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAErE,OAAO,KAAK,EAAE,SAAS,EAAY,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"BlockRendering.d.ts","sourceRoot":"","sources":["../../src/view/BlockRendering.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAErE,OAAO,KAAK,EAAE,SAAS,EAAY,MAAM,sBAAsB,CAAC;AAShE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAMjE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAC9C,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAExD,gFAAgF;AAChF,wBAAgB,WAAW,CAC1B,KAAK,EAAE,SAAS,EAChB,QAAQ,CAAC,EAAE,cAAc,EACzB,SAAS,CAAC,EAAE,GAAG,CAAC,MAAM,EAAE,QAAQ,CAAC,EACjC,OAAO,CAAC,EAAE,gBAAgB,GACxB,WAAW,CA+Fb;AAED;;;GAGG;AACH,wBAAgB,eAAe,CAC9B,EAAE,EAAE,WAAW,EACf,KAAK,EAAE,SAAS,EAChB,aAAa,CAAC,EAAE,SAAS,GACvB,IAAI,CAWN;AAED,wEAAwE;AACxE,wBAAgB,kBAAkB,CACjC,SAAS,EAAE,WAAW,EACtB,KAAK,EAAE,SAAS,EAChB,QAAQ,CAAC,EAAE,cAAc,EACzB,WAAW,CAAC,EAAE,SAAS,gBAAgB,EAAE,GACvC,IAAI,CAyCN"}
|
|
@@ -14,4 +14,10 @@ import { ReconcileOptions } from './Reconciler.js';
|
|
|
14
14
|
export declare function renderDecoratedContent(container: HTMLElement, inlineChildren: readonly (TextNode | InlineNode)[], inlineDecos: readonly InlineDecoration[], registry?: SchemaRegistry): void;
|
|
15
15
|
/** Applies node decorations (CSS classes/styles) to a block element. */
|
|
16
16
|
export declare function applyNodeDecorations(el: HTMLElement, bid: BlockId, options?: ReconcileOptions): void;
|
|
17
|
+
/**
|
|
18
|
+
* Synchronizes class-based node decorations without replacing a NodeView.
|
|
19
|
+
* Decoration-owned classes are removed when their decoration disappears,
|
|
20
|
+
* while classes that existed before decoration application are preserved.
|
|
21
|
+
*/
|
|
22
|
+
export declare function syncNodeDecorationClasses(el: HTMLElement, bid: BlockId, options?: ReconcileOptions): void;
|
|
17
23
|
//# sourceMappingURL=DecorationRendering.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DecorationRendering.d.ts","sourceRoot":"","sources":["../../src/view/DecorationRendering.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAmB,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AACtF,OAAO,KAAK,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAEjE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AACjE,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AAItD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"DecorationRendering.d.ts","sourceRoot":"","sources":["../../src/view/DecorationRendering.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAmB,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AACtF,OAAO,KAAK,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAEjE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AACjE,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AAItD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAUxD;;;;;;;GAOG;AACH,wBAAgB,sBAAsB,CACrC,SAAS,EAAE,WAAW,EACtB,cAAc,EAAE,SAAS,CAAC,QAAQ,GAAG,UAAU,CAAC,EAAE,EAClD,WAAW,EAAE,SAAS,gBAAgB,EAAE,EACxC,QAAQ,CAAC,EAAE,cAAc,GACvB,IAAI,CAqEN;AA4BD,wEAAwE;AACxE,wBAAgB,oBAAoB,CACnC,EAAE,EAAE,WAAW,EACf,GAAG,EAAE,OAAO,EACZ,OAAO,CAAC,EAAE,gBAAgB,GACxB,IAAI,CAUN;AAED;;;;GAIG;AACH,wBAAgB,yBAAyB,CACxC,EAAE,EAAE,WAAW,EACf,GAAG,EAAE,OAAO,EACZ,OAAO,CAAC,EAAE,gBAAgB,GACxB,IAAI,CAyBN"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EditorViewEvents.d.ts","sourceRoot":"","sources":["../../src/view/EditorViewEvents.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAErE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,iCAAiC,CAAC;
|
|
1
|
+
{"version":3,"file":"EditorViewEvents.d.ts","sourceRoot":"","sources":["../../src/view/EditorViewEvents.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAErE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,iCAAiC,CAAC;AAe3E,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAC3D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAC3D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAKxD,MAAM,WAAW,oBAAoB;IACpC,QAAQ,CAAC,cAAc,EAAE,WAAW,CAAC;IACrC,QAAQ,CAAC,QAAQ,EAAE,MAAM,WAAW,CAAC;IACrC,QAAQ,CAAC,QAAQ,EAAE,CAAC,EAAE,EAAE,WAAW,KAAK,IAAI,CAAC;IAC7C,QAAQ,CAAC,WAAW,EAAE,CACrB,QAAQ,EAAE,WAAW,EACrB,EAAE,EAAE,WAAW,EACf,iBAAiB,CAAC,EAAE,OAAO,KACvB,IAAI,CAAC;IACV,QAAQ,CAAC,UAAU,EAAE,MAAM,OAAO,CAAC;IACnC,QAAQ,CAAC,gBAAgB,EAAE,gBAAgB,CAAC;IAC5C,QAAQ,CAAC,aAAa,EAAE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@notectl/core",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.3.1",
|
|
4
4
|
"description": "A modern and accessible rich text editor shipped as a single Web Component. Immutable state, transaction-based architecture, and a plugin system that powers every feature.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -22,6 +22,10 @@
|
|
|
22
22
|
"types": "./dist/html.d.ts",
|
|
23
23
|
"import": "./dist/html.mjs"
|
|
24
24
|
},
|
|
25
|
+
"./markdown": {
|
|
26
|
+
"types": "./dist/markdown.d.ts",
|
|
27
|
+
"import": "./dist/markdown.mjs"
|
|
28
|
+
},
|
|
25
29
|
"./presets": {
|
|
26
30
|
"types": "./dist/presets.d.ts",
|
|
27
31
|
"import": "./dist/presets.mjs"
|
|
@@ -198,6 +202,7 @@
|
|
|
198
202
|
"name": "Core (main entry)",
|
|
199
203
|
"path": "dist/notectl-core.mjs",
|
|
200
204
|
"limit": "76 KB",
|
|
205
|
+
"ignore": ["dompurify", "./MarkdownSerializer-*", "./MarkdownParser-*"],
|
|
201
206
|
"gzip": true
|
|
202
207
|
},
|
|
203
208
|
{
|
|
@@ -216,6 +221,14 @@
|
|
|
216
221
|
"name": "HTML (serializer/parser)",
|
|
217
222
|
"path": "dist/html.mjs",
|
|
218
223
|
"limit": "15 KB",
|
|
224
|
+
"ignore": ["dompurify"],
|
|
225
|
+
"gzip": true
|
|
226
|
+
},
|
|
227
|
+
{
|
|
228
|
+
"name": "Markdown (serializer/parser)",
|
|
229
|
+
"path": "dist/markdown.mjs",
|
|
230
|
+
"limit": "18 KB",
|
|
231
|
+
"ignore": ["dompurify"],
|
|
219
232
|
"gzip": true
|
|
220
233
|
},
|
|
221
234
|
{
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"AttrRegistry-DcDVyzLm.mjs","names":[],"sources":["../../src/model/AttrRegistry.ts"],"sourcesContent":["/**\n * Module-augmentable attribute registries for type-safe node/mark attributes.\n *\n * Plugins extend these interfaces via `declare module`:\n * @example\n * declare module '../../model/AttrRegistry.js' {\n * interface NodeAttrRegistry {\n * heading: { level: HeadingLevel; align?: BlockAlignment };\n * }\n * }\n */\n\nimport type { BlockAlignment } from './BlockAlignment.js';\nimport type { BlockNode, InlineNode, Mark } from './Document.js';\nimport { isInlineNode } from './Document.js';\n\n/** Plugins augment this interface to register typed node attributes. */\nexport interface NodeAttrRegistry {\n\tparagraph: { align?: BlockAlignment };\n}\n\n/** Plugins augment this interface to register typed mark attributes. */\nexport interface MarkAttrRegistry {\n\tbold: Record<string, never>;\n\titalic: Record<string, never>;\n\tunderline: Record<string, never>;\n}\n\n/** Resolves typed attributes for known node types, falls back for unknown. */\nexport type NodeAttrsFor<T extends string> = T extends keyof NodeAttrRegistry\n\t? NodeAttrRegistry[T]\n\t: Record<string, string | number | boolean>;\n\n/** Resolves typed attributes for known mark types, falls back for unknown. */\nexport type MarkAttrsFor<T extends string> = T extends keyof MarkAttrRegistry\n\t? MarkAttrRegistry[T]\n\t: Record<string, string | number | boolean>;\n\n/** Narrows a BlockNode to a typed variant with known attributes. */\nexport function isNodeOfType<T extends keyof NodeAttrRegistry>(\n\tnode: BlockNode,\n\ttype: T,\n): node is BlockNode & { readonly type: T; readonly attrs: NodeAttrRegistry[T] } {\n\treturn (node.type as string) === type;\n}\n\n/** Narrows a Mark to a typed variant with known attributes. */\nexport function isMarkOfType<T extends keyof MarkAttrRegistry>(\n\tmark: Mark,\n\ttype: T,\n): mark is Mark & { readonly type: T; readonly attrs: MarkAttrRegistry[T] } {\n\treturn (mark.type as string) === type;\n}\n\n// --- InlineNode Attribute Registry ---\n\n/** Plugins augment this interface to register typed inline node attributes. */\n// biome-ignore lint/suspicious/noEmptyInterface: module augmentation requires interface\nexport interface InlineNodeAttrRegistry {}\n\n/** Resolves typed attributes for known inline node types, falls back for unknown. */\nexport type InlineNodeAttrsFor<T extends string> = T extends keyof InlineNodeAttrRegistry\n\t? InlineNodeAttrRegistry[T]\n\t: Record<string, string | number | boolean>;\n\n/** Narrows an InlineNode to a typed variant with known attributes. */\nexport function isInlineNodeOfType<T extends keyof InlineNodeAttrRegistry>(\n\tnode: InlineNode,\n\tinlineNodeType: T,\n): node is InlineNode & {\n\treadonly inlineType: T;\n\treadonly attrs: InlineNodeAttrRegistry[T];\n} {\n\treturn isInlineNode(node) && (node.inlineType as string) === inlineNodeType;\n}\n"],"mappings":"4CAuCA,SAAgB,EACf,EACA,GAEA,OAAQ,EAAK,OAAoB,CAClC,CAGA,SAAgB,EACf,EACA,GAEA,OAAQ,EAAK,OAAoB,CAClC,CAcA,SAAgB,EACf,EACA,GAKA,OAAO,EAAa,IAAU,EAAK,aAA0B,CAC9D"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{A as n,S as t,h as e,i as r,j as o,p as s,s as c,u as i,w as f,x as u}from"./Document-r7vLOAGA.mjs";import{c as a,d,l,o as p,r as h,t as m}from"./Selection-HYoVFpAx.mjs";import{a as g,r as y}from"./TypeBrands-Ch9856Gb.mjs";import{r as I}from"./NodeResolver-ChgLF_IP.mjs";import{i as x}from"./NavigationQueries-Bt4zZ17v.mjs";function k(n,t,e){const r=n.getNodeSpec(t);if(!r?.content)return!0;const o=n.getNodeSpec(e)?.group;for(const s of r.content.allow){if(s===e)return!0;if("text"!==s&&o&&s===o)return!0}return!1}function N(n,t,e){const r=n.getNodeSpec(t);if(!r?.content)return!0;const{min:o=0,max:s=Number.POSITIVE_INFINITY}=r.content,c=e.filter(n=>"text"!==n);if(c.length<o||c.length>s)return!1;for(const i of c)if(!k(n,t,i))return!1;return!0}function b(n,t){if(0===t.length)return n.doc.children;const e=n.getBlock(t[t.length-1]);return e?e.children:[]}function v(n,t){if(p(n))return{blockId:n.anchor.blockId,offset:n.anchor.offset};const e=d(n,t);return{blockId:e.from.blockId,offset:e.from.offset}}function P(n){return n&&n.length>1?n.slice(0,-1):[]}function S(n,e){return n.findIndex(n=>t(n)&&n.id===e)}function B(n,t){const e=P(I(n.doc,t)),r=b(n,e);return{parentPath:e,siblings:r,index:S(r,t)}}function T(n){if(f(n))return n.id;for(const e of n.children)if(t(e))return T(e);return n.id}function j(n){if(f(n))return n.id;for(let e=n.children.length-1;e>=0;e--){const r=n.children[e];if(r&&t(r))return j(r)}return n.id}function E(n,t,e){const r=n.getBlock(t);if(!r)return null;if(x(n,t)){const e=n.getNodePath(t);return e?h(t,e):null}const o="start"===e?T(r):j(r),c=n.getBlock(o);return c?m(o,"start"===e?0:s(c)):null}function A(n,e,r){const o=n.doc.children,s="start"===e?o.map((n,t)=>t):o.map((n,t)=>o.length-1-t);for(const c of s){const s=o[c];if(!s||!t(s))continue;if(void 0!==r&&s.id===r)continue;const i=E(n,s.id,e);if(i)return i}return null}function _(n,t,e){const r=P(I(n.doc,t)),o=S(b(n,r),t);if(!(o<0))return{parentPath:r,anchorIndex:o,isAnchorEmpty:J(n,t,e)}}function w(n,e,r,o){const s=I(n.doc,r);if(!s)return;const c=n.getBlock(r);return c?{parentPath:s,anchorIndex:c.children.findIndex(n=>t(n)&&n.id===e),isAnchorEmpty:J(n,e,o)}:void 0}function D(n,t){if("table_cell"===n.getBlock(t)?.type)return t;const e=I(n.doc,t);if(e)for(const r of e)if("table_cell"===n.getBlock(r)?.type)return r}function O(n){return l(n)?n.nodeId:a(n)?n.blockId:n.anchor.blockId}function V(n,t,e,r,o,s){const c=D(n,e);if(c){const o=w(n,e,c,s);if(!o)return!1;const i=o.anchorIndex+1;t.insertNode(o.parentPath,i,r),o.isAnchorEmpty&&o.anchorIndex>=0&&t.removeNode(o.parentPath,o.anchorIndex)}else{const c=_(n,e,s);if(!c)return!1;const i=a(o)&&"before"===o.side?0:1;t.insertNode(c.parentPath,c.anchorIndex+i,r),c.isAnchorEmpty&&!a(o)&&t.removeNode(c.parentPath,c.anchorIndex)}return!0}function C(n,t){const e=I(n.doc,t),r=e&&e.length>0?e[0]:t;return n.doc.children.findIndex(n=>n.id===r)}function F(n,t,e){return!t||e.every(e=>k(n,t,e.type))}function Q(n,t){const e=C(n,t);if(-1!==e)return{parentPath:[],anchorIndex:e,isAnchorEmpty:!1}}function R(n){return"paragraph"===n.type&&0===s(n)}function Y(n,t,e,r){return q(n,t,e,[r])}function q(n,t,e,o){if(0===o.length)return;const s=C(n,e);if(-1===s)return;const c=n.doc.children[s],i=n.doc.children[s+1];let f=s+1;for(const r of o)t.insertNode([],f,r),f++;const u=c&&x(n,c.id)&&i&&R(i)?i:void 0;let a;return u?a=u:(a=r(g("paragraph")),t.insertNode([],f,a)),c&&R(c)&&t.removeNode([],s),a}function z(n,e){const o=n.children.map(n=>t(n)?z(n,i()):n);return r(n.type,o,e,n.attrs)}function G(n,e){if(n.id===e)return n;for(const r of n.children){if(!t(r))continue;const n=G(r,e);if(n)return n}}function H(n,t){if(!t)return;const e={};let r=!1;for(const o of Object.keys(t)){const s=t[o],c=n?.[o];"string"==typeof c||"number"==typeof c||"boolean"==typeof c?e[o]=c:void 0!==s.default&&(e[o]=s.default),o in e&&(r=!0)}return r?e:void 0}function J(n,t,r){const o=n.getBlock(t);return!!o&&!(r?.getNodeSpec(o.type))?.isVoid&&""===e(o)}function K(n,t){if(!n.type)return;if(!t)return n;const e=t.getNodeSpec(n.type);if(!e)return;const r=H(n.attrs,e.attrs),o=n.segments?function(n,t){const e=[];for(const r of n){if("inline"===r.kind){const n=t.getInlineNodeSpec(r.inlineType);if(!n)continue;const o=H(r.attrs,n.attrs);e.push({kind:"inline",inlineType:r.inlineType,...o?{attrs:o}:{}});continue}e.push(r)}return e}(n.segments,t):void 0;return{...n,...r?{attrs:r}:{},...o?{segments:o}:n.segments?{segments:[]}:{}}}function L(t){const e=i(),o=function(t){const e=W(t);return 0===e.length?void 0:n(e)}(t),s=t.attrs?t.attrs:void 0;return r(g(t.type),o,e,s)}function M(n,t){const e=[];for(const r of n){const n=K(r,t);n&&e.push(U(n))}return{blocks:e}}function U(n){const t=n.attrs?n.attrs:void 0;return{type:g(n.type),...t?{attrs:t}:{},segments:W(n)}}function W(n){if(n.segments&&n.segments.length>0)return function(n){const t=[];for(const e of n){if("inline"===e.kind){t.push(u(c(y(e.inlineType),e.attrs)));continue}if(0===e.text.length)continue;const n=e.marks.map(n=>({type:n.type,...n.attrs?{attrs:n.attrs}:{}}));t.push(o(e.text,n))}return t}(n.segments);const t=n.text??"";return t?[o(t)]:[]}export{b as C,N as D,k as E,S,B as T,E as _,D as a,T as b,q as c,w as d,Q as f,K as g,H as h,G as i,R as l,M as m,z as n,V as o,_ as p,L as r,Y as s,F as t,O as u,A as v,v as w,j as x,P as y};
|
|
2
|
-
//# sourceMappingURL=BlockInsertion-6rR9tIGP.mjs.map
|