@notectl/core 2.2.6 → 2.3.3
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 +1 -1
- package/THIRD-PARTY-NOTICES.md +129 -0
- package/dist/chunks/{AlignmentPlugin-DeD4C4EP.mjs → AlignmentPlugin-C9Rr_R-g.mjs} +2 -2
- package/dist/chunks/{AlignmentPlugin-DeD4C4EP.mjs.map → AlignmentPlugin-C9Rr_R-g.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-BCvmqeFZ.mjs +2 -0
- package/dist/chunks/{AttributedMarkCommands-D4W2Jgpj.mjs.map → AttributedMarkCommands-BCvmqeFZ.mjs.map} +1 -1
- package/dist/chunks/{BidiIsolationPlugin-BddRbDCN.mjs → BidiIsolationPlugin-Cw2KMk-H.mjs} +2 -2
- package/dist/chunks/{BidiIsolationPlugin-BddRbDCN.mjs.map → BidiIsolationPlugin-Cw2KMk-H.mjs.map} +1 -1
- package/dist/chunks/BlockInsertion-CYH2gRkY.mjs +2 -0
- package/dist/chunks/BlockInsertion-CYH2gRkY.mjs.map +1 -0
- package/dist/chunks/BlockquotePlugin-0bZSbkyo.mjs +2 -0
- package/dist/chunks/{BlockquotePlugin-4V7KV_Sb.mjs.map → BlockquotePlugin-0bZSbkyo.mjs.map} +1 -1
- package/dist/chunks/CaretNavigationPlugin-BPZ9b6XR.mjs +2 -0
- package/dist/chunks/CaretNavigationPlugin-BPZ9b6XR.mjs.map +1 -0
- package/dist/chunks/CodeBlockPlugin-BCJ3faXx.mjs +2 -0
- package/dist/chunks/CodeBlockPlugin-BCJ3faXx.mjs.map +1 -0
- package/dist/chunks/{ColorGrid-DPNiXxpD.mjs → ColorGrid-DQEkJ-0y.mjs} +2 -2
- package/dist/chunks/{ColorGrid-DPNiXxpD.mjs.map → ColorGrid-DQEkJ-0y.mjs.map} +1 -1
- package/dist/chunks/{ColorPickerPopup-lcf3jS6G.mjs → ColorPickerPopup-CyF26zIU.mjs} +2 -2
- package/dist/chunks/{ColorPickerPopup-lcf3jS6G.mjs.map → ColorPickerPopup-CyF26zIU.mjs.map} +1 -1
- package/dist/chunks/Commands-D5ND50PQ.mjs +2 -0
- package/dist/chunks/Commands-D5ND50PQ.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-BOP1TAUd.mjs +2 -0
- package/dist/chunks/Decoration-BOP1TAUd.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-DQMj65Bc.mjs → FontPlugin-D041tiLe.mjs} +2 -2
- package/dist/chunks/{FontPlugin-DQMj65Bc.mjs.map → FontPlugin-D041tiLe.mjs.map} +1 -1
- package/dist/chunks/{FontSizePlugin-9StCjEfN.mjs → FontSizePlugin-8CAvj1RD.mjs} +2 -2
- package/dist/chunks/FontSizePlugin-8CAvj1RD.mjs.map +1 -0
- package/dist/chunks/FormulaPlugin-DJ39BtqV.mjs +2 -0
- package/dist/chunks/FormulaPlugin-DJ39BtqV.mjs.map +1 -0
- package/dist/chunks/GapCursorNavigation-DCWOmopl.mjs +2 -0
- package/dist/chunks/{GapCursorNavigation-ycNzuQVH.mjs.map → GapCursorNavigation-DCWOmopl.mjs.map} +1 -1
- package/dist/chunks/GapCursorPlugin-2iR6506y.mjs +2 -0
- package/dist/chunks/{GapCursorPlugin-Zvxjnr82.mjs.map → GapCursorPlugin-2iR6506y.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-vniSvTgq.mjs} +2 -2
- package/dist/chunks/{HardBreakPlugin-9DOyCyyM.mjs.map → HardBreakPlugin-vniSvTgq.mjs.map} +1 -1
- package/dist/chunks/HeadingPlugin-DUKsLuMd.mjs +2 -0
- package/dist/chunks/{HeadingPlugin-BuGoM9Rz.mjs.map → HeadingPlugin-DUKsLuMd.mjs.map} +1 -1
- package/dist/chunks/{HighlightPlugin-C6pHifVz.mjs → HighlightPlugin-DRTAE1N5.mjs} +2 -2
- package/dist/chunks/{HighlightPlugin-C6pHifVz.mjs.map → HighlightPlugin-DRTAE1N5.mjs.map} +1 -1
- package/dist/chunks/HorizontalRulePlugin-B9OvwrKB.mjs +2 -0
- package/dist/chunks/HorizontalRulePlugin-B9OvwrKB.mjs.map +1 -0
- package/dist/chunks/ImagePlugin-CwxTRr6d.mjs +2 -0
- package/dist/chunks/{ImagePlugin-KpkuE2LH.mjs.map → ImagePlugin-CwxTRr6d.mjs.map} +1 -1
- package/dist/chunks/{InlineCodePlugin-DMr4O7c7.mjs → InlineCodePlugin-uxgMUX_E.mjs} +2 -2
- package/dist/chunks/InlineCodePlugin-uxgMUX_E.mjs.map +1 -0
- package/dist/chunks/InlineStyleMarkSpec-CjSRj4f_.mjs +2 -0
- package/dist/chunks/{InlineStyleMarkSpec-C6LJT7kp.mjs.map → InlineStyleMarkSpec-CjSRj4f_.mjs.map} +1 -1
- package/dist/chunks/LinkPlugin-CvWHbSkb.mjs +2 -0
- package/dist/chunks/LinkPlugin-CvWHbSkb.mjs.map +1 -0
- package/dist/chunks/ListPlugin-BchSFWVn.mjs +2 -0
- package/dist/chunks/ListPlugin-BchSFWVn.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-Q7l0d6Ma.mjs +2 -0
- package/dist/chunks/MarkdownHTMLRegistry-Q7l0d6Ma.mjs.map +1 -0
- package/dist/chunks/MarkdownParser-Dp62mfUq.mjs +2 -0
- package/dist/chunks/MarkdownParser-Dp62mfUq.mjs.map +1 -0
- package/dist/chunks/MarkdownSerializer-DBELFAeo.mjs +2 -0
- package/dist/chunks/MarkdownSerializer-DBELFAeo.mjs.map +1 -0
- package/dist/chunks/MathFont-BS8IwYh2.mjs +2 -0
- package/dist/chunks/MathFont-BS8IwYh2.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-WH5snxr_.mjs +2 -0
- package/dist/chunks/{NodeSelectionCommands-Dj4VxLdD.mjs.map → NodeSelectionCommands-WH5snxr_.mjs.map} +1 -1
- package/dist/chunks/{PopupManager-DUtaK3WX.mjs → PopupManager-Cj86uDEB.mjs} +2 -2
- package/dist/chunks/{PopupManager-DUtaK3WX.mjs.map → PopupManager-Cj86uDEB.mjs.map} +1 -1
- package/dist/chunks/PopupPositioning-BFh6Ed1D.mjs +2 -0
- package/dist/chunks/{PopupPositioning-BB97-__N.mjs.map → PopupPositioning-BFh6Ed1D.mjs.map} +1 -1
- package/dist/chunks/PrintPlugin-D2javl_d.mjs +2 -0
- package/dist/chunks/PrintPlugin-D2javl_d.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-gTQaSJcO.mjs +2 -0
- package/dist/chunks/{SimpleMark-CaQtFAau.mjs.map → SimpleMark-gTQaSJcO.mjs.map} +1 -1
- package/dist/chunks/SmartPastePlugin-BvJQ-fOz.mjs +2 -0
- package/dist/chunks/SmartPastePlugin-BvJQ-fOz.mjs.map +1 -0
- package/dist/chunks/StarterFonts-BDQPg-cu.mjs +2 -0
- package/dist/chunks/StarterFonts-BDQPg-cu.mjs.map +1 -0
- package/dist/chunks/StrikethroughPlugin-BdrG1TTY.mjs +2 -0
- package/dist/chunks/StrikethroughPlugin-BdrG1TTY.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-DTZB0Y3D.mjs} +2 -2
- package/dist/chunks/{SuperSubPlugin-DVP7VnIz.mjs.map → SuperSubPlugin-DTZB0Y3D.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-CPvg9YZS.mjs +2 -0
- package/dist/chunks/TablePlugin-CPvg9YZS.mjs.map +1 -0
- package/dist/chunks/TextColorPlugin-Ckg3KWvb.mjs +2 -0
- package/dist/chunks/{TextColorPlugin-CEfZQ6Md.mjs.map → TextColorPlugin-Ckg3KWvb.mjs.map} +1 -1
- package/dist/chunks/TextDirectionAutoPlugin-DRGbgTlx.mjs +2 -0
- package/dist/chunks/{TextDirectionAutoPlugin-CzWJjrvG.mjs.map → TextDirectionAutoPlugin-DRGbgTlx.mjs.map} +1 -1
- package/dist/chunks/TextDirectionPlugin-BCeYyJHo.mjs +2 -0
- package/dist/chunks/{TextDirectionPlugin-DHB88HKf.mjs.map → TextDirectionPlugin-BCeYyJHo.mjs.map} +1 -1
- package/dist/chunks/TextFormattingPlugin-BhRxSC8q.mjs +2 -0
- package/dist/chunks/TextFormattingPlugin-BhRxSC8q.mjs.map +1 -0
- package/dist/chunks/ThemeEngine-BUVo_zaT.mjs +3 -0
- package/dist/chunks/ThemeEngine-BUVo_zaT.mjs.map +1 -0
- package/dist/chunks/ToolbarPlugin-dmTj1jIz.mjs +2 -0
- package/dist/chunks/{ToolbarPlugin-DVGrFf8v.mjs.map → ToolbarPlugin-dmTj1jIz.mjs.map} +1 -1
- package/dist/chunks/VideoPlugin-BugkI7-m.mjs +2 -0
- package/dist/chunks/VideoPlugin-BugkI7-m.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/XmlSupport-DIXH5on9.mjs +2 -0
- package/dist/chunks/XmlSupport-DIXH5on9.mjs.map +1 -0
- 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-JM0-SwWy.mjs +2 -0
- package/dist/chunks/{full-BBl7mvwH.mjs.map → full-JM0-SwWy.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-DSlR2A27.mjs +2 -0
- package/dist/chunks/{minimal-CtnR4dqp.mjs.map → minimal-DSlR2A27.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/register-BjsdJ3Aq.mjs +2 -0
- package/dist/chunks/register-BjsdJ3Aq.mjs.map +1 -0
- 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-5GKFQ2mQ.mjs +2 -0
- package/dist/chunks/src-5GKFQ2mQ.mjs.map +1 -0
- package/dist/chunks/xml-BsV44TrJ.mjs +2 -0
- package/dist/chunks/xml-BsV44TrJ.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 +24 -0
- 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/fonts/math.d.ts +3 -0
- package/dist/fonts/math.d.ts.map +1 -0
- package/dist/fonts/math.mjs +1 -0
- package/dist/fonts/starter.d.ts +3 -0
- package/dist/fonts/starter.d.ts.map +1 -0
- package/dist/fonts/starter.mjs +1 -0
- package/dist/fonts.d.ts +4 -4
- package/dist/fonts.mjs +1 -1
- package/dist/full.d.ts +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 +7 -6
- 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/CodeBlockHighlighting.d.ts.map +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 +3 -1
- 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/language.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.map +1 -1
- package/dist/plugins/print/PrintServiceImpl.d.ts +5 -1
- package/dist/plugins/print/PrintServiceImpl.d.ts.map +1 -1
- package/dist/plugins/print/PrintStyleCollector.d.ts.map +1 -1
- 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/SmartPastePlugin.d.ts.map +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.d.ts +1 -1
- package/dist/presets/full.mjs +1 -1
- package/dist/presets/minimal.d.ts +1 -1
- package/dist/presets/minimal.mjs +1 -1
- package/dist/presets.d.ts +1 -1
- package/dist/presets.mjs +1 -1
- package/dist/register.d.ts +3 -0
- package/dist/register.d.ts.map +1 -0
- package/dist/register.mjs +1 -0
- 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/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 +28 -214
- package/dist/chunks/AttrRegistry-DcDVyzLm.mjs.map +0 -1
- package/dist/chunks/AttributedMarkCommands-D4W2Jgpj.mjs +0 -2
- 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/CaretNavigationPlugin-C6XBwp0N.mjs +0 -2
- package/dist/chunks/CaretNavigationPlugin-C6XBwp0N.mjs.map +0 -1
- package/dist/chunks/CodeBlockPlugin-3V2K3RBe.mjs +0 -2
- package/dist/chunks/CodeBlockPlugin-3V2K3RBe.mjs.map +0 -1
- 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/FontSizePlugin-9StCjEfN.mjs.map +0 -1
- package/dist/chunks/FormulaPlugin-CV5VUxkb.mjs +0 -2
- package/dist/chunks/FormulaPlugin-CV5VUxkb.mjs.map +0 -1
- package/dist/chunks/GapCursorNavigation-ycNzuQVH.mjs +0 -2
- package/dist/chunks/GapCursorPlugin-Zvxjnr82.mjs +0 -2
- package/dist/chunks/HTMLUtils-C6B4UT00.mjs +0 -2
- package/dist/chunks/HTMLUtils-C6B4UT00.mjs.map +0 -1
- package/dist/chunks/HeadingPlugin-BuGoM9Rz.mjs +0 -2
- package/dist/chunks/HorizontalRulePlugin-0FjHPZuA.mjs +0 -2
- package/dist/chunks/HorizontalRulePlugin-0FjHPZuA.mjs.map +0 -1
- package/dist/chunks/ImagePlugin-KpkuE2LH.mjs +0 -2
- package/dist/chunks/InlineCodePlugin-DMr4O7c7.mjs.map +0 -1
- package/dist/chunks/InlineStyleMarkSpec-C6LJT7kp.mjs +0 -2
- package/dist/chunks/LinkPlugin-DvZ3MPgL.mjs +0 -2
- package/dist/chunks/LinkPlugin-DvZ3MPgL.mjs.map +0 -1
- package/dist/chunks/ListPlugin-2yl6KiTK.mjs +0 -2
- package/dist/chunks/ListPlugin-2yl6KiTK.mjs.map +0 -1
- package/dist/chunks/NodeSelectionCommands-Dj4VxLdD.mjs +0 -2
- package/dist/chunks/PopupPositioning-BB97-__N.mjs +0 -2
- package/dist/chunks/PrintPlugin-DyIZDY3Q.mjs +0 -2
- package/dist/chunks/PrintPlugin-DyIZDY3Q.mjs.map +0 -1
- package/dist/chunks/PrintTypes-CxU69qu3.mjs +0 -3
- package/dist/chunks/PrintTypes-CxU69qu3.mjs.map +0 -1
- package/dist/chunks/SimpleMark-CaQtFAau.mjs +0 -2
- package/dist/chunks/SmartPastePlugin-Bi_wpTCV.mjs +0 -2
- package/dist/chunks/SmartPastePlugin-Bi_wpTCV.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-BFKu52mS.mjs +0 -2
- package/dist/chunks/StyleRuntime-BFKu52mS.mjs.map +0 -1
- package/dist/chunks/TablePlugin-BTH9VRZq.mjs +0 -2
- package/dist/chunks/TablePlugin-BTH9VRZq.mjs.map +0 -1
- package/dist/chunks/TextColorPlugin-CEfZQ6Md.mjs +0 -2
- package/dist/chunks/TextDirectionAutoPlugin-CzWJjrvG.mjs +0 -2
- package/dist/chunks/TextDirectionPlugin-DHB88HKf.mjs +0 -2
- package/dist/chunks/TextFormattingPlugin-Cubp3e7f.mjs +0 -2
- package/dist/chunks/TextFormattingPlugin-Cubp3e7f.mjs.map +0 -1
- package/dist/chunks/ToolbarPlugin-DVGrFf8v.mjs +0 -2
- package/dist/chunks/VideoPlugin-B3uf1Dwp.mjs +0 -2
- package/dist/chunks/VideoPlugin-B3uf1Dwp.mjs.map +0 -1
- package/dist/chunks/WordBoundary-DxeMBRyP.mjs +0 -2
- package/dist/chunks/XmlDetector-D7TQpw-e.mjs +0 -2
- package/dist/chunks/XmlDetector-D7TQpw-e.mjs.map +0 -1
- package/dist/chunks/XmlSupport-BYiRwlkK.mjs +0 -2
- package/dist/chunks/XmlSupport-BYiRwlkK.mjs.map +0 -1
- 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/fonts-DQC6Uj4r.mjs +0 -2
- package/dist/chunks/fonts-DQC6Uj4r.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-BBl7mvwH.mjs +0 -2
- package/dist/chunks/hi-C9fvG91d.mjs +0 -2
- package/dist/chunks/hi-C9fvG91d.mjs.map +0 -1
- package/dist/chunks/minimal-CtnR4dqp.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-C89Cw7ni.mjs +0 -2
- package/dist/chunks/src-C89Cw7ni.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/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,IA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,GACf,oBAAoB,GACpB,oBAAoB,GACpB,qBAAqB,CAAC;AAEzB,MAAM,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;AAC5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M,GAAG,IAAI;IAkBxD,4DAA4D;IAC5D,iBAAiB,CAChB,OAAO,EAAE,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"}
|
|
@@ -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,EA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B;IAU5B;;;OAGG;IACH,OAAO,CAAC,yBAAyB;CASjC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Reconciler.d.ts","sourceRoot":"","sources":["../../src/view/Reconciler.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAGH,OAAO,EAAE,KAAK,aAAa,EAAyB,MAAM,8BAA8B,CAAC;
|
|
1
|
+
{"version":3,"file":"Reconciler.d.ts","sourceRoot":"","sources":["../../src/view/Reconciler.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAGH,OAAO,EAAE,KAAK,aAAa,EAAyB,MAAM,8BAA8B,CAAC;AASzF,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AACjE,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AAEtD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAU3D,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAC9C,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAG9D,OAAO,EAAE,WAAW,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAEtE,MAAM,WAAW,gBAAgB;IAChC,QAAQ,CAAC,EAAE,cAAc,CAAC;IAC1B,gBAAgB,CAAC,EAAE,gBAAgB,CAAC;IACpC,SAAS,CAAC,EAAE,GAAG,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;IAClC,QAAQ,CAAC,EAAE,MAAM,WAAW,CAAC;IAC7B,QAAQ,CAAC,EAAE,CAAC,EAAE,EAAE,OAAO,yBAAyB,EAAE,WAAW,KAAK,IAAI,CAAC;IACvE,WAAW,CAAC,EAAE,aAAa,CAAC;IAC5B,cAAc,CAAC,EAAE,aAAa,CAAC;IAC/B,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,sBAAsB,CAAC,EAAE,OAAO,CAAC;IACjC,qGAAqG;IACrG,kBAAkB,CAAC,EAAE,OAAO,CAAC;CAC7B;AAED,2DAA2D;AAC3D,wBAAgB,SAAS,CACxB,SAAS,EAAE,WAAW,EACtB,QAAQ,EAAE,WAAW,GAAG,IAAI,EAC5B,QAAQ,EAAE,WAAW,EACrB,OAAO,CAAC,EAAE,gBAAgB,GACxB,IAAI,CAkJN"}
|
package/package.json
CHANGED
|
@@ -1,10 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@notectl/core",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.3.3",
|
|
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",
|
|
7
|
-
"sideEffects": [
|
|
7
|
+
"sideEffects": [
|
|
8
|
+
"./dist/notectl-core.mjs",
|
|
9
|
+
"./dist/register.mjs",
|
|
10
|
+
"./dist/chunks/*register*.mjs",
|
|
11
|
+
"./dist/full.mjs",
|
|
12
|
+
"./dist/notectl-core.umd.js"
|
|
13
|
+
],
|
|
8
14
|
"main": "./dist/notectl-core.umd.js",
|
|
9
15
|
"module": "./dist/notectl-core.mjs",
|
|
10
16
|
"types": "./dist/index.d.ts",
|
|
@@ -13,6 +19,10 @@
|
|
|
13
19
|
"types": "./dist/index.d.ts",
|
|
14
20
|
"import": "./dist/notectl-core.mjs"
|
|
15
21
|
},
|
|
22
|
+
"./register": {
|
|
23
|
+
"types": "./dist/register.d.ts",
|
|
24
|
+
"import": "./dist/register.mjs"
|
|
25
|
+
},
|
|
16
26
|
"./full": {
|
|
17
27
|
"types": "./dist/full.d.ts",
|
|
18
28
|
"import": "./dist/full.mjs",
|
|
@@ -22,6 +32,10 @@
|
|
|
22
32
|
"types": "./dist/html.d.ts",
|
|
23
33
|
"import": "./dist/html.mjs"
|
|
24
34
|
},
|
|
35
|
+
"./markdown": {
|
|
36
|
+
"types": "./dist/markdown.d.ts",
|
|
37
|
+
"import": "./dist/markdown.mjs"
|
|
38
|
+
},
|
|
25
39
|
"./presets": {
|
|
26
40
|
"types": "./dist/presets.d.ts",
|
|
27
41
|
"import": "./dist/presets.mjs"
|
|
@@ -38,6 +52,14 @@
|
|
|
38
52
|
"types": "./dist/fonts.d.ts",
|
|
39
53
|
"import": "./dist/fonts.mjs"
|
|
40
54
|
},
|
|
55
|
+
"./fonts/starter": {
|
|
56
|
+
"types": "./dist/fonts/starter.d.ts",
|
|
57
|
+
"import": "./dist/fonts/starter.mjs"
|
|
58
|
+
},
|
|
59
|
+
"./fonts/math": {
|
|
60
|
+
"types": "./dist/fonts/math.d.ts",
|
|
61
|
+
"import": "./dist/fonts/math.mjs"
|
|
62
|
+
},
|
|
41
63
|
"./plugins/text-formatting": {
|
|
42
64
|
"types": "./dist/plugins/text-formatting/index.d.ts",
|
|
43
65
|
"import": "./dist/plugins/text-formatting.mjs"
|
|
@@ -160,7 +182,7 @@
|
|
|
160
182
|
}
|
|
161
183
|
},
|
|
162
184
|
"customElements": "custom-elements.json",
|
|
163
|
-
"files": ["dist", "README.md", "LICENSE", "custom-elements.json"],
|
|
185
|
+
"files": ["dist", "README.md", "LICENSE", "THIRD-PARTY-NOTICES.md", "custom-elements.json"],
|
|
164
186
|
"keywords": [
|
|
165
187
|
"rich-text-editor",
|
|
166
188
|
"web-component",
|
|
@@ -189,225 +211,17 @@
|
|
|
189
211
|
"test:watch": "vitest",
|
|
190
212
|
"typecheck": "tsc --noEmit",
|
|
191
213
|
"dev": "vite build --watch",
|
|
192
|
-
"size": "size
|
|
193
|
-
"size:check": "size
|
|
214
|
+
"size": "node scripts/check-bundle-size.mjs",
|
|
215
|
+
"size:check": "node scripts/check-bundle-size.mjs",
|
|
194
216
|
"build:analyze": "ANALYZE=true vite build"
|
|
195
217
|
},
|
|
196
|
-
"size-limit": [
|
|
197
|
-
{
|
|
198
|
-
"name": "Core (main entry)",
|
|
199
|
-
"path": "dist/notectl-core.mjs",
|
|
200
|
-
"limit": "76 KB",
|
|
201
|
-
"gzip": true
|
|
202
|
-
},
|
|
203
|
-
{
|
|
204
|
-
"name": "Presets (minimal)",
|
|
205
|
-
"path": "dist/presets/minimal.mjs",
|
|
206
|
-
"limit": "8 KB",
|
|
207
|
-
"gzip": true
|
|
208
|
-
},
|
|
209
|
-
{
|
|
210
|
-
"name": "Presets (full)",
|
|
211
|
-
"path": "dist/presets/full.mjs",
|
|
212
|
-
"limit": "92 KB",
|
|
213
|
-
"gzip": true
|
|
214
|
-
},
|
|
215
|
-
{
|
|
216
|
-
"name": "HTML (serializer/parser)",
|
|
217
|
-
"path": "dist/html.mjs",
|
|
218
|
-
"limit": "15 KB",
|
|
219
|
-
"gzip": true
|
|
220
|
-
},
|
|
221
|
-
{
|
|
222
|
-
"name": "Fonts (standalone)",
|
|
223
|
-
"path": "dist/fonts.mjs",
|
|
224
|
-
"limit": "300 KB",
|
|
225
|
-
"gzip": true
|
|
226
|
-
},
|
|
227
|
-
{
|
|
228
|
-
"name": "Plugin: Table",
|
|
229
|
-
"path": "dist/plugins/table.mjs",
|
|
230
|
-
"limit": "22 KB",
|
|
231
|
-
"gzip": true
|
|
232
|
-
},
|
|
233
|
-
{
|
|
234
|
-
"name": "Plugin: Text Formatting",
|
|
235
|
-
"path": "dist/plugins/text-formatting.mjs",
|
|
236
|
-
"limit": "10 KB",
|
|
237
|
-
"gzip": true
|
|
238
|
-
},
|
|
239
|
-
{
|
|
240
|
-
"name": "Plugin: Heading",
|
|
241
|
-
"path": "dist/plugins/heading.mjs",
|
|
242
|
-
"limit": "10 KB",
|
|
243
|
-
"gzip": true
|
|
244
|
-
},
|
|
245
|
-
{
|
|
246
|
-
"name": "Plugin: Toolbar",
|
|
247
|
-
"path": "dist/plugins/toolbar.mjs",
|
|
248
|
-
"limit": "15 KB",
|
|
249
|
-
"gzip": true
|
|
250
|
-
},
|
|
251
|
-
{
|
|
252
|
-
"name": "Plugin: Shared",
|
|
253
|
-
"path": "dist/plugins/shared.mjs",
|
|
254
|
-
"limit": "15 KB",
|
|
255
|
-
"gzip": true
|
|
256
|
-
},
|
|
257
|
-
{
|
|
258
|
-
"name": "Plugin: Image",
|
|
259
|
-
"path": "dist/plugins/image.mjs",
|
|
260
|
-
"limit": "15 KB",
|
|
261
|
-
"gzip": true
|
|
262
|
-
},
|
|
263
|
-
{
|
|
264
|
-
"name": "Plugin: Video",
|
|
265
|
-
"path": "dist/plugins/video.mjs",
|
|
266
|
-
"limit": "25 KB",
|
|
267
|
-
"ignore": ["dompurify"],
|
|
268
|
-
"gzip": true
|
|
269
|
-
},
|
|
270
|
-
{
|
|
271
|
-
"name": "Plugin: Code Block",
|
|
272
|
-
"path": "dist/plugins/code-block.mjs",
|
|
273
|
-
"limit": "18 KB",
|
|
274
|
-
"gzip": true
|
|
275
|
-
},
|
|
276
|
-
{
|
|
277
|
-
"name": "Plugin: Smart Paste",
|
|
278
|
-
"path": "dist/plugins/smart-paste.mjs",
|
|
279
|
-
"limit": "6 KB",
|
|
280
|
-
"gzip": true
|
|
281
|
-
},
|
|
282
|
-
{
|
|
283
|
-
"name": "Plugin: Link",
|
|
284
|
-
"path": "dist/plugins/link.mjs",
|
|
285
|
-
"limit": "10 KB",
|
|
286
|
-
"gzip": true
|
|
287
|
-
},
|
|
288
|
-
{
|
|
289
|
-
"name": "Plugin: List",
|
|
290
|
-
"path": "dist/plugins/list.mjs",
|
|
291
|
-
"limit": "10 KB",
|
|
292
|
-
"gzip": true
|
|
293
|
-
},
|
|
294
|
-
{
|
|
295
|
-
"name": "Plugin: Blockquote",
|
|
296
|
-
"path": "dist/plugins/blockquote.mjs",
|
|
297
|
-
"limit": "5 KB",
|
|
298
|
-
"gzip": true
|
|
299
|
-
},
|
|
300
|
-
{
|
|
301
|
-
"name": "Plugin: Strikethrough",
|
|
302
|
-
"path": "dist/plugins/strikethrough.mjs",
|
|
303
|
-
"limit": "5 KB",
|
|
304
|
-
"gzip": true
|
|
305
|
-
},
|
|
306
|
-
{
|
|
307
|
-
"name": "Plugin: Inline Code",
|
|
308
|
-
"path": "dist/plugins/inline-code.mjs",
|
|
309
|
-
"limit": "5 KB",
|
|
310
|
-
"gzip": true
|
|
311
|
-
},
|
|
312
|
-
{
|
|
313
|
-
"name": "Plugin: Text Color",
|
|
314
|
-
"path": "dist/plugins/text-color.mjs",
|
|
315
|
-
"limit": "10 KB",
|
|
316
|
-
"gzip": true
|
|
317
|
-
},
|
|
318
|
-
{
|
|
319
|
-
"name": "Plugin: Horizontal Rule",
|
|
320
|
-
"path": "dist/plugins/horizontal-rule.mjs",
|
|
321
|
-
"limit": "5 KB",
|
|
322
|
-
"gzip": true
|
|
323
|
-
},
|
|
324
|
-
{
|
|
325
|
-
"name": "Plugin: Alignment",
|
|
326
|
-
"path": "dist/plugins/alignment.mjs",
|
|
327
|
-
"limit": "10 KB",
|
|
328
|
-
"gzip": true
|
|
329
|
-
},
|
|
330
|
-
{
|
|
331
|
-
"name": "Plugin: Font",
|
|
332
|
-
"path": "dist/plugins/font.mjs",
|
|
333
|
-
"limit": "10 KB",
|
|
334
|
-
"gzip": true
|
|
335
|
-
},
|
|
336
|
-
{
|
|
337
|
-
"name": "Plugin: Font Size",
|
|
338
|
-
"path": "dist/plugins/font-size.mjs",
|
|
339
|
-
"limit": "10 KB",
|
|
340
|
-
"gzip": true
|
|
341
|
-
},
|
|
342
|
-
{
|
|
343
|
-
"name": "Plugin: Highlight",
|
|
344
|
-
"path": "dist/plugins/highlight.mjs",
|
|
345
|
-
"limit": "10 KB",
|
|
346
|
-
"gzip": true
|
|
347
|
-
},
|
|
348
|
-
{
|
|
349
|
-
"name": "Plugin: Super/Sub",
|
|
350
|
-
"path": "dist/plugins/super-sub.mjs",
|
|
351
|
-
"limit": "5 KB",
|
|
352
|
-
"gzip": true
|
|
353
|
-
},
|
|
354
|
-
{
|
|
355
|
-
"name": "Plugin: Print",
|
|
356
|
-
"path": "dist/plugins/print.mjs",
|
|
357
|
-
"limit": "16 KB",
|
|
358
|
-
"gzip": true
|
|
359
|
-
},
|
|
360
|
-
{
|
|
361
|
-
"name": "Plugin: Hard Break",
|
|
362
|
-
"path": "dist/plugins/hard-break.mjs",
|
|
363
|
-
"limit": "2 KB",
|
|
364
|
-
"gzip": true
|
|
365
|
-
},
|
|
366
|
-
{
|
|
367
|
-
"name": "Plugin: Gap Cursor",
|
|
368
|
-
"path": "dist/plugins/gap-cursor.mjs",
|
|
369
|
-
"limit": "3 KB",
|
|
370
|
-
"gzip": true
|
|
371
|
-
},
|
|
372
|
-
{
|
|
373
|
-
"name": "Plugin: Caret Navigation",
|
|
374
|
-
"path": "dist/plugins/caret-navigation.mjs",
|
|
375
|
-
"limit": "7 KB",
|
|
376
|
-
"gzip": true
|
|
377
|
-
},
|
|
378
|
-
{
|
|
379
|
-
"name": "Plugin: Text Direction",
|
|
380
|
-
"path": "dist/plugins/text-direction.mjs",
|
|
381
|
-
"limit": "5 KB",
|
|
382
|
-
"gzip": true
|
|
383
|
-
},
|
|
384
|
-
{
|
|
385
|
-
"name": "Plugin: Bidi Isolation",
|
|
386
|
-
"path": "dist/plugins/bidi-isolation.mjs",
|
|
387
|
-
"limit": "5 KB",
|
|
388
|
-
"gzip": true
|
|
389
|
-
},
|
|
390
|
-
{
|
|
391
|
-
"name": "Plugin: Text Direction Auto",
|
|
392
|
-
"path": "dist/plugins/text-direction-auto.mjs",
|
|
393
|
-
"limit": "4 KB",
|
|
394
|
-
"gzip": true
|
|
395
|
-
},
|
|
396
|
-
{
|
|
397
|
-
"name": "Full (kitchen sink)",
|
|
398
|
-
"path": "dist/full.mjs",
|
|
399
|
-
"limit": "390 KB",
|
|
400
|
-
"gzip": true
|
|
401
|
-
}
|
|
402
|
-
],
|
|
403
218
|
"dependencies": {
|
|
404
219
|
"dompurify": "^3.4.11"
|
|
405
220
|
},
|
|
406
221
|
"devDependencies": {
|
|
407
|
-
"
|
|
222
|
+
"esbuild": "^0.28.1",
|
|
408
223
|
"happy-dom": "^20.8.9",
|
|
409
224
|
"rollup-plugin-visualizer": "^7.0.1",
|
|
410
|
-
"size-limit": "^12.0.1",
|
|
411
225
|
"terser": "^5.46.1",
|
|
412
226
|
"vite": "^8.0.16",
|
|
413
227
|
"vite-plugin-dts": "^4.5.4",
|
|
@@ -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{T as t,_ as n,b as o,m as e,v as r}from"./Document-r7vLOAGA.mjs";import{d as s,o as c,u as i}from"./Selection-HYoVFpAx.mjs";import{i as a}from"./TypeBrands-Ch9856Gb.mjs";import{n as l}from"./AttrRegistry-DcDVyzLm.mjs";import{n as u}from"./RangeIterator-o8v3msQe.mjs";function f(t,n){return!1!==t.getMarkSpec?.(n)?.inclusive}function m(t){if(t.storedMarks)return t.storedMarks;const o=t.selection;if(!i(o)||!c(o))return[];const e=t.getBlock(o.anchor.blockId);return e?n(e,o.anchor.offset,n=>f(t.schema,n)):[]}function d(t,n){const o=t.selection;if(!i(o))return null;const e=a(n.type);if(c(o)){if(!t.getBlock(o.anchor.blockId))return null;const r=[...m(t).filter(t=>t.type!==e),n];return t.transaction("command").setStoredMarks(r,t.storedMarks).setSelection(o).build()}const r=s(o,t.getBlockOrder()),l=t.transaction("command");return u(t,r,(o,r,s)=>{const c=t.getBlock(o);if(c){const t=M(c,e,r,s);t&&l.removeMark(o,r,s,t)}l.addMark(o,r,s,n)}),l.setSelection(o),l.build()}function k(t,n){const e=t.selection;if(!i(e))return null;if(c(e)){if(!t.getBlock(e.anchor.blockId))return null;const r=m(t);if(!o(r,n))return null;const s=r.filter(t=>t.type!==n);return t.transaction("command").setStoredMarks(s,t.storedMarks).setSelection(e).build()}const r=s(e,t.getBlockOrder()),a=t.transaction("command");return u(t,r,(o,e,r)=>{const s=t.getBlock(o),c=s?M(s,n,e,r):void 0;a.removeMark(o,e,r,c??{type:n})}),a.setSelection(e),a.build()}function p(t,n,o){const r=t.selection;if(!i(r))return null;let s;if(c(r))s=m(t);else{const n=t.getBlock(r.anchor.blockId);if(!n)return null;s=e(n,r.anchor.offset)}const a=s.find(t=>t.type===n);return a&&l(a,n)?o(a):null}function g(t,n){return null!==p(t,n,()=>!0)}function M(n,o,e,s){const c=r(n);let i=0;for(const r of c){if(!t(r)){i+=1;continue}const n=i+r.text.length;if(n>e&&i<s){const t=r.marks.find(t=>t.type===o);if(t)return t}i=n}}export{f as a,k as i,p as n,m as o,g as r,d as t};
|
|
2
|
-
//# sourceMappingURL=AttributedMarkCommands-D4W2Jgpj.mjs.map
|
|
@@ -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
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"BlockInsertion-6rR9tIGP.mjs","names":[],"sources":["../../src/model/ContentModel.ts","../../src/commands/CommandHelpers.ts","../../src/commands/BlockInsertion.ts"],"sourcesContent":["/**\n * Content model validation for nested document structures.\n * Validates whether a parent node type can contain given child types.\n */\n\nimport type { SchemaRegistry } from './SchemaRegistry.js';\n\n/**\n * Checks if a parent node type can contain a child node type,\n * using the content rules and group system from NodeSpec.\n */\nexport function canContain(\n\tregistry: SchemaRegistry,\n\tparentType: string,\n\tchildType: string,\n): boolean {\n\tconst parentSpec = registry.getNodeSpec(parentType);\n\tif (!parentSpec?.content) return true; // No content rule = anything allowed\n\n\tconst childSpec = registry.getNodeSpec(childType);\n\tconst childGroup = childSpec?.group;\n\n\tfor (const allowed of parentSpec.content.allow) {\n\t\tif (allowed === childType) return true;\n\t\tif (allowed === 'text') continue; // 'text' refers to TextNodes, not BlockNodes\n\t\tif (childGroup && allowed === childGroup) return true;\n\t}\n\n\treturn false;\n}\n\n/**\n * Validates whether the given children types are valid for a parent node type.\n * Checks allow list, min/max constraints.\n */\nexport function validateContent(\n\tregistry: SchemaRegistry,\n\tparentType: string,\n\tchildTypes: readonly string[],\n): boolean {\n\tconst parentSpec = registry.getNodeSpec(parentType);\n\tif (!parentSpec?.content) return true;\n\n\tconst { min = 0, max = Number.POSITIVE_INFINITY } = parentSpec.content;\n\n\t// Check count constraints (only for block children, not text)\n\tconst blockChildTypes = childTypes.filter((t) => t !== 'text');\n\tif (blockChildTypes.length < min || blockChildTypes.length > max) return false;\n\n\t// Check each child is allowed\n\tfor (const childType of blockChildTypes) {\n\t\tif (!canContain(registry, parentType, childType)) return false;\n\t}\n\n\treturn true;\n}\n","/**\n * Shared helpers used across multiple command modules.\n *\n * - {@link getSiblings} — resolves a parent path to its child list\n * - {@link resolveInsertPoint} — normalizes a text selection to a single insert position\n */\n\nimport type { BlockNode, ChildNode, Document } from '../model/Document.js';\nimport { getBlockLength, isBlockNode, isLeafBlock } from '../model/Document.js';\nimport { findNodePath } from '../model/NodeResolver.js';\nimport {\n\tcreateCollapsedSelection,\n\tcreateNodeSelection,\n\tisCollapsed,\n\tselectionRange,\n} from '../model/Selection.js';\nimport type { EditorSelection, Selection } from '../model/Selection.js';\nimport type { BlockId } from '../model/TypeBrands.js';\nimport type { EditorState } from '../state/EditorState.js';\nimport { isVoidBlock } from '../state/NavigationQueries.js';\n\n/** The resolved insert position within a single block. */\nexport interface InsertPoint {\n\treadonly blockId: BlockId;\n\treadonly offset: number;\n}\n\n/** Resolves the children of a parent path: doc root or a nested block. */\nexport function getSiblings(\n\tstate: EditorState,\n\tparentPath: readonly BlockId[],\n): readonly ChildNode[] {\n\tif (parentPath.length === 0) return state.doc.children;\n\tconst parent: BlockNode | undefined = state.getBlock(\n\t\tparentPath[parentPath.length - 1] as BlockId,\n\t);\n\treturn parent ? parent.children : [];\n}\n\n/**\n * Normalizes a text selection to a single insert point.\n *\n * - Collapsed selection → anchor position.\n * - Range selection → normalized `from` position (document-order start).\n */\nexport function resolveInsertPoint(sel: Selection, blockOrder: readonly BlockId[]): InsertPoint {\n\tif (isCollapsed(sel)) {\n\t\treturn { blockId: sel.anchor.blockId, offset: sel.anchor.offset };\n\t}\n\tconst range = selectionRange(sel, blockOrder);\n\treturn { blockId: range.from.blockId, offset: range.from.offset };\n}\n\n/** Extracts the parent path from a full node path (all elements except the last). */\nexport function extractParentPath(path: readonly string[] | undefined): BlockId[] {\n\treturn path && path.length > 1 ? (path.slice(0, -1) as BlockId[]) : [];\n}\n\n/** Finds the index of a block by ID within a sibling list. */\nexport function findSiblingIndex(siblings: readonly ChildNode[], targetId: BlockId): number {\n\treturn siblings.findIndex((c) => isBlockNode(c) && c.id === targetId);\n}\n\n/** A block's parent path, its sibling list, and its index within that list. */\nexport interface SiblingContext {\n\treadonly parentPath: BlockId[];\n\treadonly siblings: readonly ChildNode[];\n\treadonly index: number;\n}\n\n/**\n * Resolves a node's parent path, sibling list, and index among its siblings.\n * `index` is `-1` when the node is not found; callers that require the node to\n * exist should guard on `index < 0`.\n */\nexport function resolveSiblingContext(state: EditorState, nodeId: BlockId): SiblingContext {\n\tconst parentPath: BlockId[] = extractParentPath(findNodePath(state.doc, nodeId));\n\tconst siblings: readonly ChildNode[] = getSiblings(state, parentPath);\n\tconst index: number = findSiblingIndex(siblings, nodeId);\n\treturn { parentPath, siblings, index };\n}\n\n/** Finds the first leaf block ID in a subtree. */\nexport function findFirstLeafBlockId(node: BlockNode): BlockId {\n\tif (isLeafBlock(node)) return node.id;\n\n\tfor (const child of node.children) {\n\t\tif (!isBlockNode(child)) continue;\n\t\treturn findFirstLeafBlockId(child);\n\t}\n\n\treturn node.id;\n}\n\n/** Finds the last leaf block ID in a subtree. */\nexport function findLastLeafBlockId(node: BlockNode): BlockId {\n\tif (isLeafBlock(node)) return node.id;\n\n\tfor (let i = node.children.length - 1; i >= 0; i--) {\n\t\tconst child = node.children[i];\n\t\tif (child && isBlockNode(child)) {\n\t\t\treturn findLastLeafBlockId(child);\n\t\t}\n\t}\n\n\treturn node.id;\n}\n\n/**\n * Resolves a valid editor selection at the start or end of a block subtree.\n * Void blocks become NodeSelections; text-capable blocks resolve to leaf cursors.\n */\nexport function createSelectionForBlockBoundary(\n\tstate: EditorState,\n\tblockId: BlockId,\n\tboundary: 'start' | 'end',\n): EditorSelection | null {\n\tconst block = state.getBlock(blockId);\n\tif (!block) return null;\n\n\tif (isVoidBlock(state, blockId)) {\n\t\tconst path = state.getNodePath(blockId);\n\t\treturn path ? createNodeSelection(blockId, path) : null;\n\t}\n\n\tconst leafId: BlockId =\n\t\tboundary === 'start' ? findFirstLeafBlockId(block) : findLastLeafBlockId(block);\n\tconst leaf = state.getBlock(leafId);\n\tif (!leaf) return null;\n\n\tconst offset = boundary === 'start' ? 0 : getBlockLength(leaf);\n\treturn createCollapsedSelection(leafId, offset);\n}\n\n/**\n * Resolves a valid editor selection anywhere in the document, starting from\n * the first (or last) top-level block and deferring per-block resolution to\n * {@link createSelectionForBlockBoundary}. Useful as a last-resort fallback\n * after deletions when neighbouring siblings cannot provide a selection.\n *\n * @param state The editor state to query.\n * @param boundary `'start'` walks document order; `'end'` walks reverse.\n * @param excludeBlockId Optional block id to skip (e.g. the block about to\n * be removed by the caller's transaction).\n * @returns A valid selection, or `null` if no selectable block exists.\n */\nexport function createSelectionForDocumentBoundary(\n\tstate: EditorState,\n\tboundary: 'start' | 'end',\n\texcludeBlockId?: BlockId,\n): EditorSelection | null {\n\tconst children: readonly ChildNode[] = state.doc.children;\n\tconst indices: readonly number[] =\n\t\tboundary === 'start'\n\t\t\t? children.map((_, i) => i)\n\t\t\t: children.map((_, i) => children.length - 1 - i);\n\n\tfor (const i of indices) {\n\t\tconst child = children[i];\n\t\tif (!child || !isBlockNode(child)) continue;\n\t\tif (excludeBlockId !== undefined && child.id === excludeBlockId) continue;\n\n\t\tconst sel = createSelectionForBlockBoundary(state, child.id, boundary);\n\t\tif (sel) return sel;\n\t}\n\n\treturn null;\n}\n\n/** Returns the root-level block IDs in document order. */\nexport function getRootBlockIds(doc: Document): readonly BlockId[] {\n\treturn doc.children.map((child) => child.id);\n}\n","/**\n * Block insertion utilities for paste/clipboard operations and block-object\n * commands (table, image, horizontal rule, display formula).\n *\n * Provides context resolution (parent path, anchor index, empty detection)\n * for inserting blocks into the document tree — both at root level and\n * inside table cells — plus the shared primitive that drops a block-level\n * object onto its own line. Also contains pure helpers for block cloning,\n * recursive lookup, and attribute sanitization against a NodeSpec.\n */\n\nimport { canContain } from '../model/ContentModel.js';\nimport type { ContentSlice, SliceBlock } from '../model/ContentSlice.js';\nimport {\n\ttype BlockAttrs,\n\ttype BlockNode,\n\ttype ChildNode,\n\ttype ContentSegment,\n\ttype InlineNode,\n\ttype Mark,\n\ttype TextNode,\n\tcreateBlockNode,\n\tcreateInlineNode,\n\tgenerateBlockId,\n\tgetBlockLength,\n\tgetBlockText,\n\tinlineSegment,\n\tisBlockNode,\n\tsegmentsToInlineChildren,\n\ttextSegment,\n} from '../model/Document.js';\nimport { findNodePath } from '../model/NodeResolver.js';\nimport type { AttrSpec } from '../model/NodeSpec.js';\nimport type { RichBlockData, RichSegment } from '../model/RichBlockData.js';\nimport type { SchemaRegistry } from '../model/SchemaRegistry.js';\nimport type { EditorSelection } from '../model/Selection.js';\nimport { isGapCursor, isNodeSelection } from '../model/Selection.js';\nimport type { BlockId, NodeTypeName } from '../model/TypeBrands.js';\nimport { inlineType, nodeType } from '../model/TypeBrands.js';\nimport type { EditorState } from '../state/EditorState.js';\nimport { isVoidBlock } from '../state/NavigationQueries.js';\nimport type { TransactionBuilder } from '../state/Transaction.js';\nimport { extractParentPath, findSiblingIndex, getSiblings } from './CommandHelpers.js';\n\n/**\n * Resolved insertion target within the document tree.\n * Contains everything needed to insert blocks at a specific anchor position.\n */\nexport interface InsertionContext {\n\treadonly parentPath: readonly BlockId[];\n\treadonly anchorIndex: number;\n\treadonly isAnchorEmpty: boolean;\n}\n\n/**\n * Resolves an insertion context for root-level (or nested-parent-level) insertion.\n * Computes the parent path, anchor index among siblings, and whether the anchor is empty.\n */\nexport function resolveRootInsertionContext(\n\tstate: EditorState,\n\tanchorBlockId: BlockId,\n\tschemaRegistry?: SchemaRegistry,\n): InsertionContext | undefined {\n\tconst path: readonly string[] | undefined = findNodePath(state.doc, anchorBlockId);\n\tconst parentPath: BlockId[] = extractParentPath(path);\n\n\tconst siblings: readonly ChildNode[] = getSiblings(state, parentPath);\n\tconst anchorIndex: number = findSiblingIndex(siblings, anchorBlockId);\n\tif (anchorIndex < 0) return undefined;\n\n\tconst isAnchorEmpty: boolean = isBlockEmpty(state, anchorBlockId, schemaRegistry);\n\treturn { parentPath, anchorIndex, isAnchorEmpty };\n}\n\n/**\n * Resolves an insertion context within a table cell.\n * The parent path points to the cell itself; siblings are the cell's children.\n */\nexport function resolveCellInsertionContext(\n\tstate: EditorState,\n\tanchorBlockId: BlockId,\n\tcellId: BlockId,\n\tschemaRegistry?: SchemaRegistry,\n): InsertionContext | undefined {\n\tconst cellPath: BlockId[] | undefined = findNodePath(state.doc, cellId) as BlockId[] | undefined;\n\tif (!cellPath) return undefined;\n\n\tconst cell: BlockNode | undefined = state.getBlock(cellId);\n\tif (!cell) return undefined;\n\n\tconst anchorIndex: number = cell.children.findIndex(\n\t\t(c) => isBlockNode(c) && c.id === anchorBlockId,\n\t);\n\n\tconst isAnchorEmpty: boolean = isBlockEmpty(state, anchorBlockId, schemaRegistry);\n\treturn { parentPath: cellPath, anchorIndex, isAnchorEmpty };\n}\n\n/**\n * Finds a table_cell ancestor for the given block.\n * Walks the node path upward, returning the first table_cell BlockId found.\n */\nexport function findTableCellAncestor(state: EditorState, blockId: BlockId): BlockId | undefined {\n\tconst block: BlockNode | undefined = state.getBlock(blockId);\n\tif (block?.type === 'table_cell') return blockId;\n\n\tconst path: BlockId[] | undefined = findNodePath(state.doc, blockId) as BlockId[] | undefined;\n\tif (!path) return undefined;\n\n\tfor (const id of path) {\n\t\tconst node: BlockNode | undefined = state.getBlock(id as BlockId);\n\t\tif (node?.type === 'table_cell') return id as BlockId;\n\t}\n\treturn undefined;\n}\n\n/**\n * Resolves the anchor block ID from the current editor selection.\n * Handles text selection, node selection, and gap cursor uniformly.\n */\nexport function resolveAnchorBlockId(selection: EditorSelection): BlockId {\n\tif (isNodeSelection(selection)) return selection.nodeId;\n\tif (isGapCursor(selection)) return selection.blockId;\n\treturn selection.anchor.blockId;\n}\n\n/**\n * Inserts a block node after the anchor position, resolving cell vs root context.\n * Removes the anchor block if it is empty (matching standard paste behavior).\n * Returns true on success, false if context resolution fails.\n */\nexport function insertBlockAfterAnchor(\n\tstate: EditorState,\n\tbuilder: TransactionBuilder,\n\tanchorBlockId: BlockId,\n\tblock: BlockNode,\n\tselection: EditorSelection,\n\tschemaRegistry?: SchemaRegistry,\n): boolean {\n\tconst cellId: BlockId | undefined = findTableCellAncestor(state, anchorBlockId);\n\n\tif (cellId) {\n\t\tconst ctx: InsertionContext | undefined = resolveCellInsertionContext(\n\t\t\tstate,\n\t\t\tanchorBlockId,\n\t\t\tcellId,\n\t\t\tschemaRegistry,\n\t\t);\n\t\tif (!ctx) return false;\n\n\t\tconst insertIndex: number = ctx.anchorIndex + 1;\n\t\tbuilder.insertNode(ctx.parentPath, insertIndex, block);\n\n\t\tif (ctx.isAnchorEmpty && ctx.anchorIndex >= 0) {\n\t\t\tbuilder.removeNode(ctx.parentPath, ctx.anchorIndex);\n\t\t}\n\t} else {\n\t\tconst ctx: InsertionContext | undefined = resolveRootInsertionContext(\n\t\t\tstate,\n\t\t\tanchorBlockId,\n\t\t\tschemaRegistry,\n\t\t);\n\t\tif (!ctx) return false;\n\n\t\tconst insertOffset: number = isGapCursor(selection) && selection.side === 'before' ? 0 : 1;\n\t\tbuilder.insertNode(ctx.parentPath, ctx.anchorIndex + insertOffset, block);\n\n\t\tif (ctx.isAnchorEmpty && !isGapCursor(selection)) {\n\t\t\tbuilder.removeNode(ctx.parentPath, ctx.anchorIndex);\n\t\t}\n\t}\n\n\treturn true;\n}\n\n/**\n * Document-root index of the top-level block that contains `blockId` — the block\n * itself when it already lives at the document root. Returns -1 when the block is\n * not part of the document. Block-level objects always live at the root, so an\n * insertion triggered from inside a container (e.g. a table cell) escapes to the\n * top level via this lookup.\n */\nexport function topLevelBlockIndex(state: EditorState, blockId: BlockId): number {\n\tconst path: readonly string[] | undefined = findNodePath(state.doc, blockId);\n\tconst topId: BlockId = path && path.length > 0 ? (path[0] as BlockId) : blockId;\n\treturn state.doc.children.findIndex((b) => b.id === topId);\n}\n\n/**\n * True when a container of `containerType` may hold every block in `blocks`,\n * per its {@link import('../model/NodeSpec.js').NodeSpec} content rule. An\n * undefined `containerType` denotes the document root, which imposes no\n * restriction. Used to keep paste from creating schema-invalid nesting, such as\n * a `table` dropped into a `table_cell` (#166).\n */\nexport function canContainerHoldBlocks(\n\tregistry: SchemaRegistry,\n\tcontainerType: string | undefined,\n\tblocks: readonly BlockNode[],\n): boolean {\n\tif (!containerType) return true;\n\treturn blocks.every((block) => canContain(registry, containerType, block.type));\n}\n\n/**\n * Insertion context that escapes to the document root: blocks are placed after\n * the top-level ancestor of `anchorBlockId` (e.g. the outer table when the caret\n * sits inside a cell). The anchor is never treated as empty, so the originating\n * container keeps its own content. Returns undefined when the anchor is not part\n * of the document.\n */\nexport function resolveRootEscapeContext(\n\tstate: EditorState,\n\tanchorBlockId: BlockId,\n): InsertionContext | undefined {\n\tconst topIndex: number = topLevelBlockIndex(state, anchorBlockId);\n\tif (topIndex === -1) return undefined;\n\treturn { parentPath: [], anchorIndex: topIndex, isAnchorEmpty: false };\n}\n\n/**\n * True when the block is a blank-line paragraph. Inline-aware: a paragraph that\n * holds only an atomic inline node (e.g. an inline formula) has width > 0 and is\n * therefore never treated as blank, so it is never silently removed.\n */\nexport function isEmptyParagraph(block: BlockNode): boolean {\n\treturn block.type === 'paragraph' && getBlockLength(block) === 0;\n}\n\n/**\n * Places a block-level object on its own line at the document root: the object\n * followed by a trailing empty paragraph, so a void/atomic object always has an\n * editable line after it. The object is inserted after the top-level ancestor of\n * the current selection; when that ancestor is a blank-line paragraph it is\n * consumed, so the object is never preceded by a stray empty paragraph (#152).\n *\n * Only an empty *paragraph* is consumed — an empty heading or list item is\n * deliberate structure — and the emptiness test is inline-aware (see\n * {@link isEmptyParagraph}). This is intentionally stricter than\n * {@link insertBlockAfterAnchor}, which the paste pipeline uses with a text-only\n * emptiness notion.\n *\n * A void anchor (image, display formula) already owns a trailing empty paragraph\n * as its escape line. In that case the object is placed before that paragraph and\n * the paragraph is reused as the object's trailing line, so a second blank line\n * never stacks up (#158).\n *\n * Selection is the caller's concern, since objects differ (a cursor inside a new\n * table vs. a node selection on an image or display formula). Returns the\n * trailing paragraph after the object, or undefined when the selection has no\n * resolvable anchor.\n */\nexport function insertBlockObjectOnOwnLine(\n\tstate: EditorState,\n\tbuilder: TransactionBuilder,\n\tanchorBlockId: BlockId,\n\tobject: BlockNode,\n): BlockNode | undefined {\n\treturn insertBlockObjectsOnOwnLines(state, builder, anchorBlockId, [object]);\n}\n\n/**\n * Places a sequence of block-level objects on their own lines at the document\n * root, sharing a single trailing empty paragraph. Generalizes\n * {@link insertBlockObjectOnOwnLine} for inserting several objects at once (e.g.\n * pasting two or more standalone formulas, #159); for a single object the two\n * behave identically. The anchor-consumption (#152) and void-anchor trailing\n * reuse (#158) rules apply once, around the whole run.\n *\n * Returns the trailing paragraph after the last object, or undefined when the\n * anchor or object list is empty.\n */\nexport function insertBlockObjectsOnOwnLines(\n\tstate: EditorState,\n\tbuilder: TransactionBuilder,\n\tanchorBlockId: BlockId,\n\tobjects: readonly BlockNode[],\n): BlockNode | undefined {\n\tif (objects.length === 0) return undefined;\n\n\tconst topIndex: number = topLevelBlockIndex(state, anchorBlockId);\n\tif (topIndex === -1) return undefined;\n\n\tconst anchor: BlockNode | undefined = state.doc.children[topIndex];\n\tconst following: BlockNode | undefined = state.doc.children[topIndex + 1];\n\n\tlet insertAt: number = topIndex + 1;\n\tfor (const object of objects) {\n\t\tbuilder.insertNode([], insertAt, object);\n\t\tinsertAt++;\n\t}\n\n\t// A void anchor already owns a trailing empty paragraph as its escape line;\n\t// reuse it so a second blank line never stacks up (#158). Otherwise add one.\n\tconst reusableTrailing: BlockNode | undefined =\n\t\tanchor && isVoidBlock(state, anchor.id) && following && isEmptyParagraph(following)\n\t\t\t? following\n\t\t\t: undefined;\n\tlet trailing: BlockNode;\n\tif (reusableTrailing) {\n\t\ttrailing = reusableTrailing;\n\t} else {\n\t\ttrailing = createBlockNode(nodeType('paragraph'));\n\t\tbuilder.insertNode([], insertAt, trailing);\n\t}\n\n\t// Drop a blank-line paragraph anchor so the objects are not preceded by a\n\t// stray empty paragraph (#152).\n\tif (anchor && isEmptyParagraph(anchor)) {\n\t\tbuilder.removeNode([], topIndex);\n\t}\n\n\treturn trailing;\n}\n\n/** Recursively clones a block tree, assigning new IDs to all block nodes. */\nexport function cloneBlockWithNewIds(block: BlockNode, newId: BlockId): BlockNode {\n\tconst children = block.children.map((child) => {\n\t\tif (isBlockNode(child)) {\n\t\t\treturn cloneBlockWithNewIds(child, generateBlockId());\n\t\t}\n\t\treturn child;\n\t});\n\treturn createBlockNode(block.type, children, newId, block.attrs);\n}\n\n/** Recursively searches a block tree for a block with the given ID (DFS). */\nexport function findBlockRecursive(block: BlockNode, blockId: BlockId): BlockNode | undefined {\n\tif (block.id === blockId) return block;\n\tfor (const child of block.children) {\n\t\tif (!isBlockNode(child)) continue;\n\t\tconst found: BlockNode | undefined = findBlockRecursive(child, blockId);\n\t\tif (found) return found;\n\t}\n\treturn undefined;\n}\n\n/**\n * Validates incoming attributes against the declared AttrSpec.\n * Only keys declared in the spec are kept; non-primitive values fall back to defaults.\n */\nexport function sanitizeAttrs(\n\tincoming: Record<string, unknown> | undefined,\n\tspecAttrs: Readonly<Record<string, AttrSpec>> | undefined,\n): Record<string, string | number | boolean> | undefined {\n\tif (!specAttrs) return undefined;\n\n\tconst result: Record<string, string | number | boolean> = {};\n\tlet hasKeys = false;\n\n\tfor (const key of Object.keys(specAttrs)) {\n\t\tconst spec: AttrSpec = specAttrs[key] as AttrSpec;\n\t\tconst raw: unknown = incoming?.[key];\n\n\t\tif (typeof raw === 'string' || typeof raw === 'number' || typeof raw === 'boolean') {\n\t\t\tresult[key] = raw;\n\t\t} else if (spec.default !== undefined) {\n\t\t\tresult[key] = spec.default;\n\t\t}\n\t\tif (key in result) hasKeys = true;\n\t}\n\n\treturn hasKeys ? result : undefined;\n}\n\n/** Checks whether a block is empty (has no text and is not a void block). */\nfunction isBlockEmpty(\n\tstate: EditorState,\n\tblockId: BlockId,\n\tschemaRegistry?: SchemaRegistry,\n): boolean {\n\tconst block: BlockNode | undefined = state.getBlock(blockId);\n\tif (!block) return false;\n\n\tconst spec = schemaRegistry?.getNodeSpec(block.type);\n\treturn !spec?.isVoid && getBlockText(block) === '';\n}\n\n// --- Rich block creation ---\n\n/**\n * Validates a rich block against the schema registry.\n * Returns undefined for blocks with unknown types; sanitizes attributes\n * against the declared spec.\n */\nexport function validateRichBlockData(\n\traw: RichBlockData,\n\tschemaRegistry?: SchemaRegistry,\n): RichBlockData | undefined {\n\tif (!raw.type) return undefined;\n\tif (!schemaRegistry) return raw;\n\n\tconst spec = schemaRegistry.getNodeSpec(raw.type);\n\tif (!spec) return undefined;\n\n\tconst attrs: Record<string, string | number | boolean> | undefined = sanitizeAttrs(\n\t\traw.attrs,\n\t\tspec.attrs,\n\t);\n\tconst segments: RichSegment[] | undefined = raw.segments\n\t\t? sanitizeRichSegments(raw.segments, schemaRegistry)\n\t\t: undefined;\n\treturn {\n\t\t...raw,\n\t\t...(attrs ? { attrs } : {}),\n\t\t...(segments ? { segments } : raw.segments ? { segments: [] } : {}),\n\t};\n}\n\n/**\n * Creates a BlockNode from validated rich block data.\n * Converts segments or plain text into inline children.\n */\nexport function createBlockFromRichData(blockData: RichBlockData): BlockNode {\n\tconst newId: BlockId = generateBlockId();\n\tconst children: readonly (TextNode | InlineNode)[] | undefined =\n\t\tcreateChildrenFromRichBlock(blockData);\n\tconst attrs: BlockAttrs | undefined = blockData.attrs\n\t\t? (blockData.attrs as BlockAttrs)\n\t\t: undefined;\n\n\treturn createBlockNode(nodeType(blockData.type) as NodeTypeName, children, newId, attrs);\n}\n\n/**\n * Creates inline children from rich block data.\n * Uses mark-preserving segments when available, falls back to plain text.\n * Returns undefined for content-free blocks (e.g. void blocks).\n */\nfunction createChildrenFromRichBlock(\n\tblockData: RichBlockData,\n): readonly (TextNode | InlineNode)[] | undefined {\n\tconst segments: readonly ContentSegment[] = richBlockToContentSegments(blockData);\n\tif (segments.length === 0) return undefined;\n\treturn segmentsToInlineChildren(segments);\n}\n\n/**\n * Converts rich block data into a paste {@link ContentSlice}. Blocks that fail\n * schema validation (unknown type or filtered attributes) are dropped, so the\n * resulting slice can be fed straight into the canonical paste strategy\n * ({@link import('./PasteCommand.js').pasteSlice}).\n */\nexport function richBlocksToSlice(\n\tblocks: readonly RichBlockData[],\n\tschemaRegistry?: SchemaRegistry,\n): ContentSlice {\n\tconst sliceBlocks: SliceBlock[] = [];\n\tfor (const raw of blocks) {\n\t\tconst blockData: RichBlockData | undefined = validateRichBlockData(raw, schemaRegistry);\n\t\tif (!blockData) continue;\n\t\tsliceBlocks.push(richBlockToSliceBlock(blockData));\n\t}\n\treturn { blocks: sliceBlocks };\n}\n\n/** Converts a single validated rich block into a {@link SliceBlock}. */\nfunction richBlockToSliceBlock(blockData: RichBlockData): SliceBlock {\n\tconst attrs: BlockAttrs | undefined = blockData.attrs\n\t\t? (blockData.attrs as BlockAttrs)\n\t\t: undefined;\n\treturn {\n\t\ttype: nodeType(blockData.type) as NodeTypeName,\n\t\t...(attrs ? { attrs } : {}),\n\t\tsegments: richBlockToContentSegments(blockData),\n\t};\n}\n\n/** Builds content segments from a rich block, falling back to plain text. */\nfunction richBlockToContentSegments(blockData: RichBlockData): readonly ContentSegment[] {\n\tif (blockData.segments && blockData.segments.length > 0) {\n\t\treturn richSegmentsToContentSegments(blockData.segments);\n\t}\n\tconst text: string = blockData.text ?? '';\n\treturn text ? [textSegment(text)] : [];\n}\n\n/** Converts rich segments into content segments (marked text and inline nodes). */\nfunction richSegmentsToContentSegments(\n\tsegments: readonly RichSegment[],\n): readonly ContentSegment[] {\n\tconst result: ContentSegment[] = [];\n\tfor (const seg of segments) {\n\t\tif (seg.kind === 'inline') {\n\t\t\tresult.push(\n\t\t\t\tinlineSegment(\n\t\t\t\t\tcreateInlineNode(\n\t\t\t\t\t\tinlineType(seg.inlineType),\n\t\t\t\t\t\tseg.attrs as Readonly<Record<string, string | number | boolean>> | undefined,\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t);\n\t\t\tcontinue;\n\t\t}\n\t\tif (seg.text.length === 0) continue;\n\t\tconst marks: readonly Mark[] = seg.marks.map((m) => ({\n\t\t\ttype: m.type as Mark['type'],\n\t\t\t...(m.attrs ? { attrs: m.attrs as Mark['attrs'] } : {}),\n\t\t}));\n\t\tresult.push(textSegment(seg.text, marks));\n\t}\n\treturn result;\n}\n\nfunction sanitizeRichSegments(\n\tsegments: readonly RichSegment[],\n\tschemaRegistry: SchemaRegistry,\n): RichSegment[] {\n\tconst sanitized: RichSegment[] = [];\n\tfor (const segment of segments) {\n\t\tif (segment.kind === 'inline') {\n\t\t\tconst spec = schemaRegistry.getInlineNodeSpec(segment.inlineType);\n\t\t\tif (!spec) continue;\n\t\t\tconst attrs = sanitizeAttrs(segment.attrs, spec.attrs);\n\t\t\tsanitized.push({\n\t\t\t\tkind: 'inline',\n\t\t\t\tinlineType: segment.inlineType,\n\t\t\t\t...(attrs ? { attrs } : {}),\n\t\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