@notectl/core 2.1.2 → 2.1.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/dist/chunks/AlignmentPlugin-CjmLXGsv.mjs +2 -0
- package/dist/chunks/AlignmentPlugin-CjmLXGsv.mjs.map +1 -0
- package/dist/chunks/AttrRegistry-cXq6uQK2.mjs +2 -0
- package/dist/chunks/AttrRegistry-cXq6uQK2.mjs.map +1 -0
- package/dist/chunks/AttributedMarkCommands-Ctt_1xRD.mjs +2 -0
- package/dist/chunks/AttributedMarkCommands-Ctt_1xRD.mjs.map +1 -0
- package/dist/chunks/BidiIsolationPlugin-q3zoofgZ.mjs +2 -0
- package/dist/chunks/BidiIsolationPlugin-q3zoofgZ.mjs.map +1 -0
- package/dist/chunks/BlockInsertion-4QmiYRMo.mjs +2 -0
- package/dist/chunks/BlockInsertion-4QmiYRMo.mjs.map +1 -0
- package/dist/chunks/BlockTypePickerRegistry-DgI_LlNO.mjs +2 -0
- package/dist/chunks/BlockTypePickerRegistry-DgI_LlNO.mjs.map +1 -0
- package/dist/chunks/BlockquotePlugin-BTsDYB3K.mjs +2 -0
- package/dist/chunks/BlockquotePlugin-BTsDYB3K.mjs.map +1 -0
- package/dist/chunks/CaretNavigationPlugin-BFBov4H7.mjs +2 -0
- package/dist/chunks/CaretNavigationPlugin-BFBov4H7.mjs.map +1 -0
- package/dist/chunks/CodeBlockPlugin-o0Aoq9Nu.mjs +2 -0
- package/dist/chunks/CodeBlockPlugin-o0Aoq9Nu.mjs.map +1 -0
- package/dist/chunks/ColorGrid-U5NtjqyV.mjs +2 -0
- package/dist/chunks/ColorGrid-U5NtjqyV.mjs.map +1 -0
- package/dist/chunks/ColorPickerPopup-BYSMUZZx.mjs +2 -0
- package/dist/chunks/ColorPickerPopup-BYSMUZZx.mjs.map +1 -0
- package/dist/chunks/ColorValidation-3viVw_tK.mjs +2 -0
- package/dist/chunks/ColorValidation-3viVw_tK.mjs.map +1 -0
- package/dist/chunks/CommandHelpers-BqHfwW7i.mjs +2 -0
- package/dist/chunks/CommandHelpers-BqHfwW7i.mjs.map +1 -0
- package/dist/chunks/Commands-BC_EPIEx.mjs +2 -0
- package/dist/chunks/Commands-BC_EPIEx.mjs.map +1 -0
- package/dist/chunks/Decoration-BeTkTHRO.mjs +2 -0
- package/dist/chunks/Decoration-BeTkTHRO.mjs.map +1 -0
- package/dist/chunks/DirectionDetection-kAewerPz.mjs +2 -0
- package/dist/chunks/DirectionDetection-kAewerPz.mjs.map +1 -0
- package/dist/chunks/DirectionIcons-BQHHAEYU.mjs +2 -0
- package/dist/chunks/DirectionIcons-BQHHAEYU.mjs.map +1 -0
- package/dist/chunks/Document-DJmYYuBx.mjs +2 -0
- package/dist/chunks/Document-DJmYYuBx.mjs.map +1 -0
- package/dist/chunks/DocumentParser-D2hn-48i.mjs +2 -0
- package/dist/chunks/DocumentParser-D2hn-48i.mjs.map +1 -0
- package/dist/chunks/FontPlugin-TmUrcVn1.mjs +2 -0
- package/dist/chunks/FontPlugin-TmUrcVn1.mjs.map +1 -0
- package/dist/chunks/FontSizePlugin-Bwui7gLI.mjs +2 -0
- package/dist/chunks/FontSizePlugin-Bwui7gLI.mjs.map +1 -0
- package/dist/chunks/GapCursorNavigation-BEO5L2-O.mjs +2 -0
- package/dist/chunks/GapCursorNavigation-BEO5L2-O.mjs.map +1 -0
- package/dist/chunks/GapCursorPlugin-BiZQyVrJ.mjs +2 -0
- package/dist/chunks/GapCursorPlugin-BiZQyVrJ.mjs.map +1 -0
- package/dist/chunks/HardBreakPlugin-Dj4pkSk-.mjs +2 -0
- package/dist/chunks/HardBreakPlugin-Dj4pkSk-.mjs.map +1 -0
- package/dist/chunks/HeadingPlugin-D8xIRk25.mjs +2 -0
- package/dist/chunks/HeadingPlugin-D8xIRk25.mjs.map +1 -0
- package/dist/chunks/HighlightPlugin-CNX7lup0.mjs +2 -0
- package/dist/chunks/HighlightPlugin-CNX7lup0.mjs.map +1 -0
- package/dist/chunks/HorizontalRulePlugin-D-ZjKGDv.mjs +2 -0
- package/dist/chunks/HorizontalRulePlugin-D-ZjKGDv.mjs.map +1 -0
- package/dist/chunks/ImagePlugin-DwL8i3pO.mjs +2 -0
- package/dist/chunks/ImagePlugin-DwL8i3pO.mjs.map +1 -0
- package/dist/chunks/InlineCodePlugin-BpXNuKAa.mjs +2 -0
- package/dist/chunks/InlineCodePlugin-BpXNuKAa.mjs.map +1 -0
- package/dist/chunks/KeyboardNav-BZIHDPDV.mjs +2 -0
- package/dist/chunks/KeyboardNav-BZIHDPDV.mjs.map +1 -0
- package/dist/chunks/LinkPlugin-BK15pc0u.mjs +2 -0
- package/dist/chunks/LinkPlugin-BK15pc0u.mjs.map +1 -0
- package/dist/chunks/ListPlugin-B5ihlVNx.mjs +2 -0
- package/dist/chunks/ListPlugin-B5ihlVNx.mjs.map +1 -0
- package/dist/chunks/NavigationQueries-DhptdQBe.mjs +2 -0
- package/dist/chunks/NavigationQueries-DhptdQBe.mjs.map +1 -0
- package/dist/chunks/NodeSelectionCommands-DenSYOfB.mjs +2 -0
- package/dist/chunks/NodeSelectionCommands-DenSYOfB.mjs.map +1 -0
- package/dist/chunks/PluginHelpers-BZphovwz.mjs +2 -0
- package/dist/chunks/PluginHelpers-BZphovwz.mjs.map +1 -0
- package/dist/chunks/PopupKeyboardPatterns-CgUM5kPf.mjs +2 -0
- package/dist/chunks/PopupKeyboardPatterns-CgUM5kPf.mjs.map +1 -0
- package/dist/chunks/PopupManager-B5SHhDsx.mjs +2 -0
- package/dist/chunks/PopupManager-B5SHhDsx.mjs.map +1 -0
- package/dist/chunks/PopupPositioning-BfahfPOm.mjs +2 -0
- package/dist/chunks/PopupPositioning-BfahfPOm.mjs.map +1 -0
- package/dist/chunks/PrintPlugin-CckjtZ9B.mjs +2 -0
- package/dist/chunks/PrintPlugin-CckjtZ9B.mjs.map +1 -0
- package/dist/chunks/PrintTypes-Ci3XW_s8.mjs +2 -0
- package/dist/chunks/PrintTypes-Ci3XW_s8.mjs.map +1 -0
- package/dist/chunks/RangeIterator-ZooGMxGy.mjs +2 -0
- package/dist/chunks/RangeIterator-ZooGMxGy.mjs.map +1 -0
- package/dist/chunks/ShortcutFormatting-DQPMvupx.mjs +2 -0
- package/dist/chunks/ShortcutFormatting-DQPMvupx.mjs.map +1 -0
- package/dist/chunks/SmartPastePlugin-B_zi9WT9.mjs +2 -0
- package/dist/chunks/SmartPastePlugin-B_zi9WT9.mjs.map +1 -0
- package/dist/chunks/StrikethroughPlugin-2XDKYefG.mjs +2 -0
- package/dist/chunks/StrikethroughPlugin-2XDKYefG.mjs.map +1 -0
- package/dist/chunks/SuperSubPlugin-6gdrjKZv.mjs +2 -0
- package/dist/chunks/SuperSubPlugin-6gdrjKZv.mjs.map +1 -0
- package/dist/chunks/SyntaxTokenTypes-DZwhanGO.mjs +2 -0
- package/dist/chunks/SyntaxTokenTypes-DZwhanGO.mjs.map +1 -0
- package/dist/chunks/TablePlugin-DW78Y4pB.mjs +2 -0
- package/dist/chunks/TablePlugin-DW78Y4pB.mjs.map +1 -0
- package/dist/chunks/TextColorPlugin-CgHro45N.mjs +2 -0
- package/dist/chunks/TextColorPlugin-CgHro45N.mjs.map +1 -0
- package/dist/chunks/TextDirectionAutoPlugin-C88ZeXJo.mjs +2 -0
- package/dist/chunks/TextDirectionAutoPlugin-C88ZeXJo.mjs.map +1 -0
- package/dist/chunks/TextDirectionPlugin-BTTqrWbL.mjs +2 -0
- package/dist/chunks/TextDirectionPlugin-BTTqrWbL.mjs.map +1 -0
- package/dist/chunks/TextDirectionService-DzuOMFm8.mjs +2 -0
- package/dist/chunks/TextDirectionService-DzuOMFm8.mjs.map +1 -0
- package/dist/chunks/TextFormattingPlugin-BD4Qlpls.mjs +2 -0
- package/dist/chunks/TextFormattingPlugin-BD4Qlpls.mjs.map +1 -0
- package/dist/chunks/ToolbarPlugin-D5_-gWmH.mjs +2 -0
- package/dist/chunks/ToolbarPlugin-D5_-gWmH.mjs.map +1 -0
- package/dist/chunks/WordBoundary-Cz2bSRAU.mjs +2 -0
- package/dist/chunks/WordBoundary-Cz2bSRAU.mjs.map +1 -0
- package/dist/chunks/XmlDetector-DM-Vv-XW.mjs +2 -0
- package/dist/chunks/XmlDetector-DM-Vv-XW.mjs.map +1 -0
- package/dist/chunks/XmlPatterns-B-V-mHF4.mjs +2 -0
- package/dist/chunks/XmlPatterns-B-V-mHF4.mjs.map +1 -0
- package/dist/chunks/XmlSupport-Dr1S1HN9.mjs +2 -0
- package/dist/chunks/XmlSupport-Dr1S1HN9.mjs.map +1 -0
- package/dist/chunks/ar-4r3DgNTY.mjs +2 -0
- package/dist/chunks/ar-4r3DgNTY.mjs.map +1 -0
- package/dist/chunks/ar-7EtzKNIe.mjs +2 -0
- package/dist/chunks/ar-7EtzKNIe.mjs.map +1 -0
- package/dist/chunks/ar-B2pDI_LT.mjs +2 -0
- package/dist/chunks/ar-B2pDI_LT.mjs.map +1 -0
- package/dist/chunks/ar-BV6-zQd7.mjs +2 -0
- package/dist/chunks/ar-BV6-zQd7.mjs.map +1 -0
- package/dist/chunks/ar-BaCL4Bzy.mjs +2 -0
- package/dist/chunks/ar-BaCL4Bzy.mjs.map +1 -0
- package/dist/chunks/ar-BdGHrLSw.mjs +2 -0
- package/dist/chunks/ar-BdGHrLSw.mjs.map +1 -0
- package/dist/chunks/ar-BwYDKOvO.mjs +2 -0
- package/dist/chunks/ar-BwYDKOvO.mjs.map +1 -0
- package/dist/chunks/ar-C5eLSf71.mjs +2 -0
- package/dist/chunks/ar-C5eLSf71.mjs.map +1 -0
- package/dist/chunks/ar-CEUn6f7s.mjs +2 -0
- package/dist/chunks/ar-CEUn6f7s.mjs.map +1 -0
- package/dist/chunks/ar-CGYb1t6O.mjs +2 -0
- package/dist/chunks/ar-CGYb1t6O.mjs.map +1 -0
- package/dist/chunks/ar-CjK36QZ9.mjs +2 -0
- package/dist/chunks/ar-CjK36QZ9.mjs.map +1 -0
- package/dist/chunks/ar-D9jfC3WF.mjs +2 -0
- package/dist/chunks/ar-D9jfC3WF.mjs.map +1 -0
- package/dist/chunks/ar-DFeA_UxF.mjs +2 -0
- package/dist/chunks/ar-DFeA_UxF.mjs.map +1 -0
- package/dist/chunks/ar-DMuawOHV.mjs +2 -0
- package/dist/chunks/ar-DMuawOHV.mjs.map +1 -0
- package/dist/chunks/ar-DV30sa3s.mjs +2 -0
- package/dist/chunks/ar-DV30sa3s.mjs.map +1 -0
- package/dist/chunks/ar-DWwG54pa.mjs +2 -0
- package/dist/chunks/ar-DWwG54pa.mjs.map +1 -0
- package/dist/chunks/ar-DcJbUbml.mjs +2 -0
- package/dist/chunks/ar-DcJbUbml.mjs.map +1 -0
- package/dist/chunks/ar-DelI54_I.mjs +2 -0
- package/dist/chunks/ar-DelI54_I.mjs.map +1 -0
- package/dist/chunks/ar-DmqFnvxC.mjs +2 -0
- package/dist/chunks/ar-DmqFnvxC.mjs.map +1 -0
- package/dist/chunks/ar-DpEHjBUk.mjs +2 -0
- package/dist/chunks/ar-DpEHjBUk.mjs.map +1 -0
- package/dist/chunks/ar-EnfTpUuB.mjs +2 -0
- package/dist/chunks/ar-EnfTpUuB.mjs.map +1 -0
- package/dist/chunks/ar-ZHVy9O4c.mjs +2 -0
- package/dist/chunks/ar-ZHVy9O4c.mjs.map +1 -0
- package/dist/chunks/ar-_7aFyBGi.mjs +2 -0
- package/dist/chunks/ar-_7aFyBGi.mjs.map +1 -0
- package/dist/chunks/ar-l75rG_xT.mjs +2 -0
- package/dist/chunks/ar-l75rG_xT.mjs.map +1 -0
- package/dist/chunks/ar-qU1PohHA.mjs +2 -0
- package/dist/chunks/ar-qU1PohHA.mjs.map +1 -0
- package/dist/chunks/color-picker-BTex2Cfu.mjs +2 -0
- package/dist/chunks/color-picker-BTex2Cfu.mjs.map +1 -0
- package/dist/chunks/de-BDfimoiQ.mjs +2 -0
- package/dist/chunks/de-BDfimoiQ.mjs.map +1 -0
- package/dist/chunks/de-BSkOdXQZ.mjs +2 -0
- package/dist/chunks/de-BSkOdXQZ.mjs.map +1 -0
- package/dist/chunks/de-BooQr0-C.mjs +2 -0
- package/dist/chunks/de-BooQr0-C.mjs.map +1 -0
- package/dist/chunks/de-ByvLzlOc.mjs +2 -0
- package/dist/chunks/de-ByvLzlOc.mjs.map +1 -0
- package/dist/chunks/de-C03n6uR5.mjs +2 -0
- package/dist/chunks/de-C03n6uR5.mjs.map +1 -0
- package/dist/chunks/de-C0TfkuUd.mjs +2 -0
- package/dist/chunks/de-C0TfkuUd.mjs.map +1 -0
- package/dist/chunks/de-C0khkRSC.mjs +2 -0
- package/dist/chunks/de-C0khkRSC.mjs.map +1 -0
- package/dist/chunks/de-C4IW4BVo.mjs +2 -0
- package/dist/chunks/de-C4IW4BVo.mjs.map +1 -0
- package/dist/chunks/de-CDSG9CMy.mjs +2 -0
- package/dist/chunks/de-CDSG9CMy.mjs.map +1 -0
- package/dist/chunks/de-CkIwUE6R.mjs +2 -0
- package/dist/chunks/de-CkIwUE6R.mjs.map +1 -0
- package/dist/chunks/de-CmJ9oOiP.mjs +2 -0
- package/dist/chunks/de-CmJ9oOiP.mjs.map +1 -0
- package/dist/chunks/de-CrjOjB4F.mjs +2 -0
- package/dist/chunks/de-CrjOjB4F.mjs.map +1 -0
- package/dist/chunks/de-D5_uflBY.mjs +2 -0
- package/dist/chunks/de-D5_uflBY.mjs.map +1 -0
- package/dist/chunks/de-DH5zRyrS.mjs +2 -0
- package/dist/chunks/de-DH5zRyrS.mjs.map +1 -0
- package/dist/chunks/de-DJqgaz5N.mjs +2 -0
- package/dist/chunks/de-DJqgaz5N.mjs.map +1 -0
- package/dist/chunks/de-DMiAi5QJ.mjs +2 -0
- package/dist/chunks/de-DMiAi5QJ.mjs.map +1 -0
- package/dist/chunks/de-DT6VbHNl.mjs +2 -0
- package/dist/chunks/de-DT6VbHNl.mjs.map +1 -0
- package/dist/chunks/de-DbqObFs9.mjs +2 -0
- package/dist/chunks/de-DbqObFs9.mjs.map +1 -0
- package/dist/chunks/de-Dl0svzeh.mjs +2 -0
- package/dist/chunks/de-Dl0svzeh.mjs.map +1 -0
- package/dist/chunks/de-DzMY3LLH.mjs +2 -0
- package/dist/chunks/de-DzMY3LLH.mjs.map +1 -0
- package/dist/chunks/de-JGuzWRyC.mjs +2 -0
- package/dist/chunks/de-JGuzWRyC.mjs.map +1 -0
- package/dist/chunks/de-MOHX9tl7.mjs +2 -0
- package/dist/chunks/de-MOHX9tl7.mjs.map +1 -0
- package/dist/chunks/de-mtjvG1Li.mjs +2 -0
- package/dist/chunks/de-mtjvG1Li.mjs.map +1 -0
- package/dist/chunks/de-oNyi0r7G.mjs +2 -0
- package/dist/chunks/de-oNyi0r7G.mjs.map +1 -0
- package/dist/chunks/de-y5fJdnH9.mjs +2 -0
- package/dist/chunks/de-y5fJdnH9.mjs.map +1 -0
- package/dist/chunks/es-B-V14ELw.mjs +2 -0
- package/dist/chunks/es-B-V14ELw.mjs.map +1 -0
- package/dist/chunks/es-Bf6WRo_H.mjs +2 -0
- package/dist/chunks/es-Bf6WRo_H.mjs.map +1 -0
- package/dist/chunks/es-Bw9vJu_M.mjs +2 -0
- package/dist/chunks/es-Bw9vJu_M.mjs.map +1 -0
- package/dist/chunks/es-CCdE3xXm.mjs +2 -0
- package/dist/chunks/es-CCdE3xXm.mjs.map +1 -0
- package/dist/chunks/es-CDoZMS8v.mjs +2 -0
- package/dist/chunks/es-CDoZMS8v.mjs.map +1 -0
- package/dist/chunks/es-CO1hBMDj.mjs +2 -0
- package/dist/chunks/es-CO1hBMDj.mjs.map +1 -0
- package/dist/chunks/es-CU2TUgK3.mjs +2 -0
- package/dist/chunks/es-CU2TUgK3.mjs.map +1 -0
- package/dist/chunks/es-CXeJJ2r1.mjs +2 -0
- package/dist/chunks/es-CXeJJ2r1.mjs.map +1 -0
- package/dist/chunks/es-Cc337sYN.mjs +2 -0
- package/dist/chunks/es-Cc337sYN.mjs.map +1 -0
- package/dist/chunks/es-Ck88JtiM.mjs +2 -0
- package/dist/chunks/es-Ck88JtiM.mjs.map +1 -0
- package/dist/chunks/es-CmOFsz0P.mjs +2 -0
- package/dist/chunks/es-CmOFsz0P.mjs.map +1 -0
- package/dist/chunks/es-CpcUYxtO.mjs +2 -0
- package/dist/chunks/es-CpcUYxtO.mjs.map +1 -0
- package/dist/chunks/es-Cqp8LgVd.mjs +2 -0
- package/dist/chunks/es-Cqp8LgVd.mjs.map +1 -0
- package/dist/chunks/es-CsK826Q8.mjs +2 -0
- package/dist/chunks/es-CsK826Q8.mjs.map +1 -0
- package/dist/chunks/es-D7wyE736.mjs +2 -0
- package/dist/chunks/es-D7wyE736.mjs.map +1 -0
- package/dist/chunks/es-DGCoEaRB.mjs +2 -0
- package/dist/chunks/es-DGCoEaRB.mjs.map +1 -0
- package/dist/chunks/es-DPsoXXVT.mjs +2 -0
- package/dist/chunks/es-DPsoXXVT.mjs.map +1 -0
- package/dist/chunks/es-Df2ocRb2.mjs +2 -0
- package/dist/chunks/es-Df2ocRb2.mjs.map +1 -0
- package/dist/chunks/es-DgVSWMPU.mjs +2 -0
- package/dist/chunks/es-DgVSWMPU.mjs.map +1 -0
- package/dist/chunks/es-Dltvy1GA.mjs +2 -0
- package/dist/chunks/es-Dltvy1GA.mjs.map +1 -0
- package/dist/chunks/es-DtElbzrQ.mjs +2 -0
- package/dist/chunks/es-DtElbzrQ.mjs.map +1 -0
- package/dist/chunks/es-ERjP_b2h.mjs +2 -0
- package/dist/chunks/es-ERjP_b2h.mjs.map +1 -0
- package/dist/chunks/es-SN8M8vXY.mjs +2 -0
- package/dist/chunks/es-SN8M8vXY.mjs.map +1 -0
- package/dist/chunks/es-domW6tKg.mjs +2 -0
- package/dist/chunks/es-domW6tKg.mjs.map +1 -0
- package/dist/chunks/es-luS_ivBE.mjs +2 -0
- package/dist/chunks/es-luS_ivBE.mjs.map +1 -0
- package/dist/chunks/fonts-DVgoAAns.mjs +2 -0
- package/dist/chunks/fonts-DVgoAAns.mjs.map +1 -0
- package/dist/chunks/fr-BPa6RyuB.mjs +2 -0
- package/dist/chunks/fr-BPa6RyuB.mjs.map +1 -0
- package/dist/chunks/fr-BYK62vy-.mjs +2 -0
- package/dist/chunks/fr-BYK62vy-.mjs.map +1 -0
- package/dist/chunks/fr-BZH71A1g.mjs +2 -0
- package/dist/chunks/fr-BZH71A1g.mjs.map +1 -0
- package/dist/chunks/fr-BomQM4Qz.mjs +2 -0
- package/dist/chunks/fr-BomQM4Qz.mjs.map +1 -0
- package/dist/chunks/fr-BujOdWeE.mjs +2 -0
- package/dist/chunks/fr-BujOdWeE.mjs.map +1 -0
- package/dist/chunks/fr-C6BCt-Fk.mjs +2 -0
- package/dist/chunks/fr-C6BCt-Fk.mjs.map +1 -0
- package/dist/chunks/fr-C8NXcJOp.mjs +2 -0
- package/dist/chunks/fr-C8NXcJOp.mjs.map +1 -0
- package/dist/chunks/fr-C8aNnvoW.mjs +2 -0
- package/dist/chunks/fr-C8aNnvoW.mjs.map +1 -0
- package/dist/chunks/fr-C8jqjdbQ.mjs +2 -0
- package/dist/chunks/fr-C8jqjdbQ.mjs.map +1 -0
- package/dist/chunks/fr-Cg97syqs.mjs +2 -0
- package/dist/chunks/fr-Cg97syqs.mjs.map +1 -0
- package/dist/chunks/fr-CiT36QA9.mjs +2 -0
- package/dist/chunks/fr-CiT36QA9.mjs.map +1 -0
- package/dist/chunks/fr-D3Ho_0MV.mjs +2 -0
- package/dist/chunks/fr-D3Ho_0MV.mjs.map +1 -0
- package/dist/chunks/fr-DA37dDuJ.mjs +2 -0
- package/dist/chunks/fr-DA37dDuJ.mjs.map +1 -0
- package/dist/chunks/fr-DK9dc8bZ.mjs +2 -0
- package/dist/chunks/fr-DK9dc8bZ.mjs.map +1 -0
- package/dist/chunks/fr-DNA_bC6X.mjs +2 -0
- package/dist/chunks/fr-DNA_bC6X.mjs.map +1 -0
- package/dist/chunks/fr-DPXU2MTy.mjs +2 -0
- package/dist/chunks/fr-DPXU2MTy.mjs.map +1 -0
- package/dist/chunks/fr-DZCsB6H7.mjs +2 -0
- package/dist/chunks/fr-DZCsB6H7.mjs.map +1 -0
- package/dist/chunks/fr-Dd8f28BD.mjs +2 -0
- package/dist/chunks/fr-Dd8f28BD.mjs.map +1 -0
- package/dist/chunks/fr-DmCLgc4F.mjs +2 -0
- package/dist/chunks/fr-DmCLgc4F.mjs.map +1 -0
- package/dist/chunks/fr-DtEXB4RG.mjs +2 -0
- package/dist/chunks/fr-DtEXB4RG.mjs.map +1 -0
- package/dist/chunks/fr-FvGvPlqS.mjs +2 -0
- package/dist/chunks/fr-FvGvPlqS.mjs.map +1 -0
- package/dist/chunks/fr-V3LUcmFE.mjs +2 -0
- package/dist/chunks/fr-V3LUcmFE.mjs.map +1 -0
- package/dist/chunks/fr-eiqXGNgf.mjs +2 -0
- package/dist/chunks/fr-eiqXGNgf.mjs.map +1 -0
- package/dist/chunks/fr-fEWGSNI2.mjs +2 -0
- package/dist/chunks/fr-fEWGSNI2.mjs.map +1 -0
- package/dist/chunks/fr-w23c3SBW.mjs +2 -0
- package/dist/chunks/fr-w23c3SBW.mjs.map +1 -0
- package/dist/chunks/full-yocxIDB8.mjs +2 -0
- package/dist/chunks/full-yocxIDB8.mjs.map +1 -0
- package/dist/chunks/hi-4Xqp7mZC.mjs +2 -0
- package/dist/chunks/hi-4Xqp7mZC.mjs.map +1 -0
- package/dist/chunks/hi-8Eu7f89Y.mjs +2 -0
- package/dist/chunks/hi-8Eu7f89Y.mjs.map +1 -0
- package/dist/chunks/hi-BA9PP8mL.mjs +2 -0
- package/dist/chunks/hi-BA9PP8mL.mjs.map +1 -0
- package/dist/chunks/hi-BLCjECcV.mjs +2 -0
- package/dist/chunks/hi-BLCjECcV.mjs.map +1 -0
- package/dist/chunks/hi-BX9P0764.mjs +2 -0
- package/dist/chunks/hi-BX9P0764.mjs.map +1 -0
- package/dist/chunks/hi-BakCaBYh.mjs +2 -0
- package/dist/chunks/hi-BakCaBYh.mjs.map +1 -0
- package/dist/chunks/hi-BoITZeVd.mjs +2 -0
- package/dist/chunks/hi-BoITZeVd.mjs.map +1 -0
- package/dist/chunks/hi-C3BvlTfV.mjs +2 -0
- package/dist/chunks/hi-C3BvlTfV.mjs.map +1 -0
- package/dist/chunks/hi-C5HGb5IH.mjs +2 -0
- package/dist/chunks/hi-C5HGb5IH.mjs.map +1 -0
- package/dist/chunks/hi-CIpo_sTL.mjs +2 -0
- package/dist/chunks/hi-CIpo_sTL.mjs.map +1 -0
- package/dist/chunks/hi-CWRofsw7.mjs +2 -0
- package/dist/chunks/hi-CWRofsw7.mjs.map +1 -0
- package/dist/chunks/hi-C_eipolR.mjs +2 -0
- package/dist/chunks/hi-C_eipolR.mjs.map +1 -0
- package/dist/chunks/hi-ClaAWR5y.mjs +2 -0
- package/dist/chunks/hi-ClaAWR5y.mjs.map +1 -0
- package/dist/chunks/hi-Cn2ywhVT.mjs +2 -0
- package/dist/chunks/hi-Cn2ywhVT.mjs.map +1 -0
- package/dist/chunks/hi-CrsqMuKk.mjs +2 -0
- package/dist/chunks/hi-CrsqMuKk.mjs.map +1 -0
- package/dist/chunks/hi-D-iC4Hvv.mjs +2 -0
- package/dist/chunks/hi-D-iC4Hvv.mjs.map +1 -0
- package/dist/chunks/hi-DEN9a54c.mjs +2 -0
- package/dist/chunks/hi-DEN9a54c.mjs.map +1 -0
- package/dist/chunks/hi-DK9HmINW.mjs +2 -0
- package/dist/chunks/hi-DK9HmINW.mjs.map +1 -0
- package/dist/chunks/hi-DOnHDEqt.mjs +2 -0
- package/dist/chunks/hi-DOnHDEqt.mjs.map +1 -0
- package/dist/chunks/hi-DY0SGobQ.mjs +2 -0
- package/dist/chunks/hi-DY0SGobQ.mjs.map +1 -0
- package/dist/chunks/hi-FSXMWIXU.mjs +2 -0
- package/dist/chunks/hi-FSXMWIXU.mjs.map +1 -0
- package/dist/chunks/hi-JroSY-2k.mjs +2 -0
- package/dist/chunks/hi-JroSY-2k.mjs.map +1 -0
- package/dist/chunks/hi-WDIZzgAJ.mjs +2 -0
- package/dist/chunks/hi-WDIZzgAJ.mjs.map +1 -0
- package/dist/chunks/hi-fLLnVGix.mjs +2 -0
- package/dist/chunks/hi-fLLnVGix.mjs.map +1 -0
- package/dist/chunks/hi-f_MCrd2N.mjs +2 -0
- package/dist/chunks/hi-f_MCrd2N.mjs.map +1 -0
- package/dist/chunks/minimal-BL3kgYy-.mjs +2 -0
- package/dist/chunks/minimal-BL3kgYy-.mjs.map +1 -0
- package/dist/chunks/pt-206lqjCP.mjs +2 -0
- package/dist/chunks/pt-206lqjCP.mjs.map +1 -0
- package/dist/chunks/pt-B5wz6m3c.mjs +2 -0
- package/dist/chunks/pt-B5wz6m3c.mjs.map +1 -0
- package/dist/chunks/pt-B6KMxxw4.mjs +2 -0
- package/dist/chunks/pt-B6KMxxw4.mjs.map +1 -0
- package/dist/chunks/pt-BCg3YzEh.mjs +2 -0
- package/dist/chunks/pt-BCg3YzEh.mjs.map +1 -0
- package/dist/chunks/pt-BFr-zfd2.mjs +2 -0
- package/dist/chunks/pt-BFr-zfd2.mjs.map +1 -0
- package/dist/chunks/pt-BG1fIcHV.mjs +2 -0
- package/dist/chunks/pt-BG1fIcHV.mjs.map +1 -0
- package/dist/chunks/pt-Bhytb-k2.mjs +2 -0
- package/dist/chunks/pt-Bhytb-k2.mjs.map +1 -0
- package/dist/chunks/pt-Bjb6_1gI.mjs +2 -0
- package/dist/chunks/pt-Bjb6_1gI.mjs.map +1 -0
- package/dist/chunks/pt-BzQagqFt.mjs +2 -0
- package/dist/chunks/pt-BzQagqFt.mjs.map +1 -0
- package/dist/chunks/pt-C2rlfcQ4.mjs +2 -0
- package/dist/chunks/pt-C2rlfcQ4.mjs.map +1 -0
- package/dist/chunks/pt-C4xLSFYA.mjs +2 -0
- package/dist/chunks/pt-C4xLSFYA.mjs.map +1 -0
- package/dist/chunks/pt-CBxnU7dE.mjs +2 -0
- package/dist/chunks/pt-CBxnU7dE.mjs.map +1 -0
- package/dist/chunks/pt-CMXLiIJ3.mjs +2 -0
- package/dist/chunks/pt-CMXLiIJ3.mjs.map +1 -0
- package/dist/chunks/pt-Cn2yMIyR.mjs +2 -0
- package/dist/chunks/pt-Cn2yMIyR.mjs.map +1 -0
- package/dist/chunks/pt-DAh8UqJa.mjs +2 -0
- package/dist/chunks/pt-DAh8UqJa.mjs.map +1 -0
- package/dist/chunks/pt-DLe58Npz.mjs +2 -0
- package/dist/chunks/pt-DLe58Npz.mjs.map +1 -0
- package/dist/chunks/pt-D_DXzKyU.mjs +2 -0
- package/dist/chunks/pt-D_DXzKyU.mjs.map +1 -0
- package/dist/chunks/pt-DhC7TYvg.mjs +2 -0
- package/dist/chunks/pt-DhC7TYvg.mjs.map +1 -0
- package/dist/chunks/pt-Dl18NLl1.mjs +2 -0
- package/dist/chunks/pt-Dl18NLl1.mjs.map +1 -0
- package/dist/chunks/pt-Dz2YeCP4.mjs +2 -0
- package/dist/chunks/pt-Dz2YeCP4.mjs.map +1 -0
- package/dist/chunks/pt-GfM-nxvv.mjs +2 -0
- package/dist/chunks/pt-GfM-nxvv.mjs.map +1 -0
- package/dist/chunks/pt-PjsDW8WW.mjs +2 -0
- package/dist/chunks/pt-PjsDW8WW.mjs.map +1 -0
- package/dist/chunks/pt-X-M5uPLn.mjs +2 -0
- package/dist/chunks/pt-X-M5uPLn.mjs.map +1 -0
- package/dist/chunks/pt-appBsYpC.mjs +2 -0
- package/dist/chunks/pt-appBsYpC.mjs.map +1 -0
- package/dist/chunks/pt-i9ZFEE69.mjs +2 -0
- package/dist/chunks/pt-i9ZFEE69.mjs.map +1 -0
- package/dist/chunks/ru-B8HSQCj5.mjs +2 -0
- package/dist/chunks/ru-B8HSQCj5.mjs.map +1 -0
- package/dist/chunks/ru-BAOr7UOh.mjs +2 -0
- package/dist/chunks/ru-BAOr7UOh.mjs.map +1 -0
- package/dist/chunks/ru-BIV3iuR9.mjs +2 -0
- package/dist/chunks/ru-BIV3iuR9.mjs.map +1 -0
- package/dist/chunks/ru-BMJRGir6.mjs +2 -0
- package/dist/chunks/ru-BMJRGir6.mjs.map +1 -0
- package/dist/chunks/ru-BO59Tir1.mjs +2 -0
- package/dist/chunks/ru-BO59Tir1.mjs.map +1 -0
- package/dist/chunks/ru-BRnZSWPo.mjs +2 -0
- package/dist/chunks/ru-BRnZSWPo.mjs.map +1 -0
- package/dist/chunks/ru-Bf546sX_.mjs +2 -0
- package/dist/chunks/ru-Bf546sX_.mjs.map +1 -0
- package/dist/chunks/ru-Bfjq7sha.mjs +2 -0
- package/dist/chunks/ru-Bfjq7sha.mjs.map +1 -0
- package/dist/chunks/ru-Bm8utWf9.mjs +2 -0
- package/dist/chunks/ru-Bm8utWf9.mjs.map +1 -0
- package/dist/chunks/ru-BmneOLgh.mjs +2 -0
- package/dist/chunks/ru-BmneOLgh.mjs.map +1 -0
- package/dist/chunks/ru-Byrj1o3C.mjs +2 -0
- package/dist/chunks/ru-Byrj1o3C.mjs.map +1 -0
- package/dist/chunks/ru-C8ftQh9b.mjs +2 -0
- package/dist/chunks/ru-C8ftQh9b.mjs.map +1 -0
- package/dist/chunks/ru-CNjcfDD9.mjs +2 -0
- package/dist/chunks/ru-CNjcfDD9.mjs.map +1 -0
- package/dist/chunks/ru-Ccya5aSC.mjs +2 -0
- package/dist/chunks/ru-Ccya5aSC.mjs.map +1 -0
- package/dist/chunks/ru-Cd-mH9wa.mjs +2 -0
- package/dist/chunks/ru-Cd-mH9wa.mjs.map +1 -0
- package/dist/chunks/ru-CeZe9jTZ.mjs +2 -0
- package/dist/chunks/ru-CeZe9jTZ.mjs.map +1 -0
- package/dist/chunks/ru-Cl03u8Q0.mjs +2 -0
- package/dist/chunks/ru-Cl03u8Q0.mjs.map +1 -0
- package/dist/chunks/ru-CoCIIElm.mjs +2 -0
- package/dist/chunks/ru-CoCIIElm.mjs.map +1 -0
- package/dist/chunks/ru-CzUyZZmy.mjs +2 -0
- package/dist/chunks/ru-CzUyZZmy.mjs.map +1 -0
- package/dist/chunks/ru-D3fRdonc.mjs +2 -0
- package/dist/chunks/ru-D3fRdonc.mjs.map +1 -0
- package/dist/chunks/ru-Ddy9ONaX.mjs +2 -0
- package/dist/chunks/ru-Ddy9ONaX.mjs.map +1 -0
- package/dist/chunks/ru-Dgcyz845.mjs +2 -0
- package/dist/chunks/ru-Dgcyz845.mjs.map +1 -0
- package/dist/chunks/ru-DnIXvlfL.mjs +2 -0
- package/dist/chunks/ru-DnIXvlfL.mjs.map +1 -0
- package/dist/chunks/ru-DyBnSwCM.mjs +2 -0
- package/dist/chunks/ru-DyBnSwCM.mjs.map +1 -0
- package/dist/chunks/ru-i27SgAts.mjs +2 -0
- package/dist/chunks/ru-i27SgAts.mjs.map +1 -0
- package/dist/chunks/src-DfK2_MVH.mjs +2 -0
- package/dist/chunks/src-DfK2_MVH.mjs.map +1 -0
- package/dist/chunks/zh-6QoY3dY_.mjs +2 -0
- package/dist/chunks/zh-6QoY3dY_.mjs.map +1 -0
- package/dist/chunks/zh-9WLieF9N.mjs +2 -0
- package/dist/chunks/zh-9WLieF9N.mjs.map +1 -0
- package/dist/chunks/zh-B0VaFyeQ.mjs +2 -0
- package/dist/chunks/zh-B0VaFyeQ.mjs.map +1 -0
- package/dist/chunks/zh-B4pfqHD3.mjs +2 -0
- package/dist/chunks/zh-B4pfqHD3.mjs.map +1 -0
- package/dist/chunks/zh-BpaN1Nmc.mjs +2 -0
- package/dist/chunks/zh-BpaN1Nmc.mjs.map +1 -0
- package/dist/chunks/zh-BqCL2eZf.mjs +2 -0
- package/dist/chunks/zh-BqCL2eZf.mjs.map +1 -0
- package/dist/chunks/zh-Bvgb-e4z.mjs +2 -0
- package/dist/chunks/zh-Bvgb-e4z.mjs.map +1 -0
- package/dist/chunks/zh-C2by0u64.mjs +2 -0
- package/dist/chunks/zh-C2by0u64.mjs.map +1 -0
- package/dist/chunks/zh-C4Ia0Zrx.mjs +2 -0
- package/dist/chunks/zh-C4Ia0Zrx.mjs.map +1 -0
- package/dist/chunks/zh-CBHCLph7.mjs +2 -0
- package/dist/chunks/zh-CBHCLph7.mjs.map +1 -0
- package/dist/chunks/zh-CBJQlvWb.mjs +2 -0
- package/dist/chunks/zh-CBJQlvWb.mjs.map +1 -0
- package/dist/chunks/zh-CBNSrvly.mjs +2 -0
- package/dist/chunks/zh-CBNSrvly.mjs.map +1 -0
- package/dist/chunks/zh-CKEh4EwR.mjs +2 -0
- package/dist/chunks/zh-CKEh4EwR.mjs.map +1 -0
- package/dist/chunks/zh-CN8KiZ9v.mjs +2 -0
- package/dist/chunks/zh-CN8KiZ9v.mjs.map +1 -0
- package/dist/chunks/zh-CRJMQ4dT.mjs +2 -0
- package/dist/chunks/zh-CRJMQ4dT.mjs.map +1 -0
- package/dist/chunks/zh-CSg0qxe0.mjs +2 -0
- package/dist/chunks/zh-CSg0qxe0.mjs.map +1 -0
- package/dist/chunks/zh-CX7Bx0ia.mjs +2 -0
- package/dist/chunks/zh-CX7Bx0ia.mjs.map +1 -0
- package/dist/chunks/zh-CvlL1G9n.mjs +2 -0
- package/dist/chunks/zh-CvlL1G9n.mjs.map +1 -0
- package/dist/chunks/zh-DBKn0pzM.mjs +2 -0
- package/dist/chunks/zh-DBKn0pzM.mjs.map +1 -0
- package/dist/chunks/zh-DLOng8d-.mjs +2 -0
- package/dist/chunks/zh-DLOng8d-.mjs.map +1 -0
- package/dist/chunks/zh-DLVkXfcI.mjs +2 -0
- package/dist/chunks/zh-DLVkXfcI.mjs.map +1 -0
- package/dist/chunks/zh-DuaKGwyq.mjs +2 -0
- package/dist/chunks/zh-DuaKGwyq.mjs.map +1 -0
- package/dist/chunks/zh-KUnAhArn.mjs +2 -0
- package/dist/chunks/zh-KUnAhArn.mjs.map +1 -0
- package/dist/chunks/zh-wVp_7rfC.mjs +2 -0
- package/dist/chunks/zh-wVp_7rfC.mjs.map +1 -0
- package/dist/chunks/zh-z2wm3EA5.mjs +2 -0
- package/dist/chunks/zh-z2wm3EA5.mjs.map +1 -0
- package/dist/decorations/Decoration.d.ts +6 -0
- package/dist/decorations/Decoration.d.ts.map +1 -1
- package/dist/decorations/PositionMapping.d.ts +13 -3
- package/dist/decorations/PositionMapping.d.ts.map +1 -1
- package/dist/editor/EditorConfig.d.ts +14 -2
- package/dist/editor/EditorConfig.d.ts.map +1 -1
- package/dist/editor/EditorDOM.d.ts.map +1 -1
- package/dist/editor/EditorInitializer.d.ts.map +1 -1
- package/dist/editor/NotectlEditor.d.ts +2 -2
- package/dist/editor/PluginBootstrapper.d.ts.map +1 -1
- package/dist/editor/styles/base.d.ts +1 -1
- package/dist/editor/styles/base.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/editor/styles/toolbar.d.ts +1 -1
- package/dist/editor/styles/toolbar.d.ts.map +1 -1
- package/dist/fonts.mjs +1 -1
- package/dist/full.mjs +1 -1
- package/dist/html.mjs +1 -1
- package/dist/index.d.ts +4 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/input/InputHandler.d.ts +9 -0
- package/dist/input/InputHandler.d.ts.map +1 -1
- package/dist/input/InputManager.d.ts +2 -0
- package/dist/input/InputManager.d.ts.map +1 -1
- package/dist/model/NodeResolver.d.ts +7 -0
- package/dist/model/NodeResolver.d.ts.map +1 -1
- package/dist/model/TextInputInterceptor.d.ts +21 -0
- package/dist/model/TextInputInterceptor.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/plugins/MiddlewareChain.d.ts +11 -0
- package/dist/plugins/MiddlewareChain.d.ts.map +1 -1
- package/dist/plugins/Plugin.d.ts +7 -0
- package/dist/plugins/Plugin.d.ts.map +1 -1
- package/dist/plugins/PluginContextFactory.d.ts +6 -0
- package/dist/plugins/PluginContextFactory.d.ts.map +1 -1
- package/dist/plugins/PluginManager.d.ts +5 -0
- package/dist/plugins/PluginManager.d.ts.map +1 -1
- package/dist/plugins/RegistrationTracker.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.map +1 -1
- package/dist/plugins/blockquote/BlockquoteStyles.d.ts +1 -1
- package/dist/plugins/blockquote/BlockquoteStyles.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/BracketPairing.d.ts +49 -0
- package/dist/plugins/code-block/BracketPairing.d.ts.map +1 -0
- package/dist/plugins/code-block/CodeBlockKeyboardHandlers.d.ts +11 -2
- package/dist/plugins/code-block/CodeBlockKeyboardHandlers.d.ts.map +1 -1
- package/dist/plugins/code-block/CodeBlockLocale.d.ts +4 -0
- package/dist/plugins/code-block/CodeBlockLocale.d.ts.map +1 -1
- package/dist/plugins/code-block/CodeBlockNodeView.d.ts.map +1 -1
- package/dist/plugins/code-block/CodeBlockPlugin.d.ts +25 -1
- package/dist/plugins/code-block/CodeBlockPlugin.d.ts.map +1 -1
- package/dist/plugins/code-block/CodeBlockTypes.d.ts +66 -0
- package/dist/plugins/code-block/CodeBlockTypes.d.ts.map +1 -1
- package/dist/plugins/code-block/IndentHelpers.d.ts +71 -0
- package/dist/plugins/code-block/IndentHelpers.d.ts.map +1 -0
- package/dist/plugins/code-block/PairStack.d.ts +37 -0
- package/dist/plugins/code-block/PairStack.d.ts.map +1 -0
- package/dist/plugins/code-block/highlighter/RegexTokenizer.d.ts.map +1 -1
- package/dist/plugins/code-block/highlighter/TokenIteration.d.ts +18 -0
- package/dist/plugins/code-block/highlighter/TokenIteration.d.ts.map +1 -0
- package/dist/plugins/code-block/highlighter/languages/index.d.ts +1 -0
- package/dist/plugins/code-block/highlighter/languages/index.d.ts.map +1 -1
- package/dist/plugins/code-block/highlighter/languages/java.d.ts.map +1 -1
- package/dist/plugins/code-block/highlighter/languages/typescript.d.ts +3 -0
- package/dist/plugins/code-block/highlighter/languages/typescript.d.ts.map +1 -0
- package/dist/plugins/code-block/index.d.ts +1 -0
- package/dist/plugins/code-block/index.d.ts.map +1 -1
- package/dist/plugins/code-block/locales/ar.d.ts.map +1 -1
- package/dist/plugins/code-block/locales/de.d.ts.map +1 -1
- package/dist/plugins/code-block/locales/es.d.ts.map +1 -1
- package/dist/plugins/code-block/locales/fr.d.ts.map +1 -1
- package/dist/plugins/code-block/locales/hi.d.ts.map +1 -1
- package/dist/plugins/code-block/locales/pt.d.ts.map +1 -1
- package/dist/plugins/code-block/locales/ru.d.ts.map +1 -1
- package/dist/plugins/code-block/locales/zh.d.ts.map +1 -1
- package/dist/plugins/code-block.mjs +1 -1
- package/dist/plugins/font-size.mjs +1 -1
- package/dist/plugins/font.mjs +1 -1
- package/dist/plugins/gap-cursor.mjs +1 -1
- package/dist/plugins/hard-break.mjs +1 -1
- package/dist/plugins/heading.mjs +1 -1
- package/dist/plugins/highlight.mjs +1 -1
- package/dist/plugins/horizontal-rule.mjs +1 -1
- package/dist/plugins/image/ImagePlugin.d.ts.map +1 -1
- package/dist/plugins/image/ImagePopup.d.ts.map +1 -1
- package/dist/plugins/image/ImagePopupStyles.d.ts +3 -0
- package/dist/plugins/image/ImagePopupStyles.d.ts.map +1 -0
- package/dist/plugins/image.mjs +1 -1
- package/dist/plugins/inline-code.mjs +1 -1
- package/dist/plugins/language/bundles/JavaSupport.d.ts.map +1 -1
- package/dist/plugins/language/bundles/TypeScriptSupport.d.ts +3 -0
- package/dist/plugins/language/bundles/TypeScriptSupport.d.ts.map +1 -0
- package/dist/plugins/language/bundles/index.d.ts +1 -0
- package/dist/plugins/language/bundles/index.d.ts.map +1 -1
- package/dist/plugins/language/index.d.ts +1 -1
- package/dist/plugins/language/index.d.ts.map +1 -1
- package/dist/plugins/language.mjs +1 -1
- package/dist/plugins/link.mjs +1 -1
- package/dist/plugins/list.mjs +1 -1
- package/dist/plugins/print.mjs +1 -1
- package/dist/plugins/shared.mjs +1 -1
- package/dist/plugins/smart-paste/detectors/DetectionScorer.d.ts +17 -0
- package/dist/plugins/smart-paste/detectors/DetectionScorer.d.ts.map +1 -0
- package/dist/plugins/smart-paste/detectors/LexerDetector.d.ts +36 -0
- package/dist/plugins/smart-paste/detectors/LexerDetector.d.ts.map +1 -0
- package/dist/plugins/smart-paste/detectors/TokenStats.d.ts +44 -0
- package/dist/plugins/smart-paste/detectors/TokenStats.d.ts.map +1 -0
- package/dist/plugins/smart-paste/index.d.ts +3 -1
- package/dist/plugins/smart-paste/index.d.ts.map +1 -1
- package/dist/plugins/smart-paste.mjs +1 -1
- package/dist/plugins/strikethrough.mjs +1 -1
- package/dist/plugins/super-sub.mjs +1 -1
- package/dist/plugins/table/TablePlugin.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.mjs +1 -1
- package/dist/plugins/toolbar/ToolbarOverflowController.d.ts +14 -1
- package/dist/plugins/toolbar/ToolbarOverflowController.d.ts.map +1 -1
- package/dist/plugins/toolbar/ToolbarPlugin.d.ts +13 -1
- package/dist/plugins/toolbar/ToolbarPlugin.d.ts.map +1 -1
- package/dist/plugins/toolbar/ToolbarRenderers.d.ts.map +1 -1
- package/dist/plugins/toolbar/index.d.ts +1 -1
- package/dist/plugins/toolbar/index.d.ts.map +1 -1
- package/dist/plugins/toolbar.mjs +1 -1
- package/dist/presets/full.mjs +1 -1
- package/dist/presets/minimal.mjs +1 -1
- package/dist/presets.mjs +1 -1
- package/dist/state/History.d.ts +20 -0
- package/dist/state/History.d.ts.map +1 -1
- package/dist/state/InlineContentOps.d.ts +30 -0
- package/dist/state/InlineContentOps.d.ts.map +1 -1
- package/dist/state/Mapping.d.ts +261 -0
- package/dist/state/Mapping.d.ts.map +1 -0
- package/dist/state/SelectionMapping.d.ts +25 -0
- package/dist/state/SelectionMapping.d.ts.map +1 -0
- package/dist/state/StepApplication.d.ts +20 -3
- package/dist/state/StepApplication.d.ts.map +1 -1
- package/dist/state/StepHandlers.d.ts +68 -0
- package/dist/state/StepHandlers.d.ts.map +1 -0
- package/dist/state/StepInversion.d.ts +22 -5
- package/dist/state/StepInversion.d.ts.map +1 -1
- package/dist/state/StepMapping.d.ts +18 -0
- package/dist/state/StepMapping.d.ts.map +1 -0
- package/dist/state/StepMaps.d.ts +25 -0
- package/dist/state/StepMaps.d.ts.map +1 -0
- package/dist/state/Steps.d.ts +38 -0
- package/dist/state/Steps.d.ts.map +1 -1
- package/dist/state/Transaction.d.ts +25 -1
- package/dist/state/Transaction.d.ts.map +1 -1
- package/dist/state/TransactionBuilder.d.ts +51 -7
- package/dist/state/TransactionBuilder.d.ts.map +1 -1
- package/dist/test/TestUtils.d.ts +2 -0
- package/dist/test/TestUtils.d.ts.map +1 -1
- package/dist/view/EditorView.d.ts.map +1 -1
- package/package.json +1 -1
- package/dist/chunks/AlignmentPlugin-bqK6ze-E.mjs +0 -2
- package/dist/chunks/AlignmentPlugin-bqK6ze-E.mjs.map +0 -1
- package/dist/chunks/AttrRegistry-nDKtHK87.mjs +0 -2
- package/dist/chunks/AttrRegistry-nDKtHK87.mjs.map +0 -1
- package/dist/chunks/AttributedMarkCommands-35jTbVRg.mjs +0 -2
- package/dist/chunks/AttributedMarkCommands-35jTbVRg.mjs.map +0 -1
- package/dist/chunks/BidiIsolationPlugin-SIKxfWXp.mjs +0 -2
- package/dist/chunks/BidiIsolationPlugin-SIKxfWXp.mjs.map +0 -1
- package/dist/chunks/BlockInsertion-DsnHLcvM.mjs +0 -2
- package/dist/chunks/BlockInsertion-DsnHLcvM.mjs.map +0 -1
- package/dist/chunks/BlockTypePickerRegistry-C_jLddOz.mjs +0 -2
- package/dist/chunks/BlockTypePickerRegistry-C_jLddOz.mjs.map +0 -1
- package/dist/chunks/BlockquotePlugin-BEaZSoVT.mjs +0 -2
- package/dist/chunks/BlockquotePlugin-BEaZSoVT.mjs.map +0 -1
- package/dist/chunks/CaretNavigationPlugin-DHl61oc6.mjs +0 -2
- package/dist/chunks/CaretNavigationPlugin-DHl61oc6.mjs.map +0 -1
- package/dist/chunks/CodeBlockPlugin-DglqiSNK.mjs +0 -2
- package/dist/chunks/CodeBlockPlugin-DglqiSNK.mjs.map +0 -1
- package/dist/chunks/ColorGrid-Czm0p2E9.mjs +0 -2
- package/dist/chunks/ColorGrid-Czm0p2E9.mjs.map +0 -1
- package/dist/chunks/ColorPickerPopup-CL-W380M.mjs +0 -2
- package/dist/chunks/ColorPickerPopup-CL-W380M.mjs.map +0 -1
- package/dist/chunks/ColorValidation-CiGxVsqd.mjs +0 -2
- package/dist/chunks/ColorValidation-CiGxVsqd.mjs.map +0 -1
- package/dist/chunks/CommandHelpers-DTlQcGv5.mjs +0 -2
- package/dist/chunks/CommandHelpers-DTlQcGv5.mjs.map +0 -1
- package/dist/chunks/Commands-BuYF23lf.mjs +0 -2
- package/dist/chunks/Commands-BuYF23lf.mjs.map +0 -1
- package/dist/chunks/Decoration-oeHDjWWq.mjs +0 -2
- package/dist/chunks/Decoration-oeHDjWWq.mjs.map +0 -1
- package/dist/chunks/DirectionDetection-Hun6-7ER.mjs +0 -2
- package/dist/chunks/DirectionDetection-Hun6-7ER.mjs.map +0 -1
- package/dist/chunks/DirectionIcons-CfaDcQ9a.mjs +0 -2
- package/dist/chunks/DirectionIcons-CfaDcQ9a.mjs.map +0 -1
- package/dist/chunks/Document-_qdGR4vh.mjs +0 -2
- package/dist/chunks/Document-_qdGR4vh.mjs.map +0 -1
- package/dist/chunks/DocumentParser-CyATBOz-.mjs +0 -2
- package/dist/chunks/DocumentParser-CyATBOz-.mjs.map +0 -1
- package/dist/chunks/FontPlugin-B-Sxa0UW.mjs +0 -2
- package/dist/chunks/FontPlugin-B-Sxa0UW.mjs.map +0 -1
- package/dist/chunks/FontSizePlugin-C1zlyXL2.mjs +0 -2
- package/dist/chunks/FontSizePlugin-C1zlyXL2.mjs.map +0 -1
- package/dist/chunks/GapCursorNavigation-BaXDnjFf.mjs +0 -2
- package/dist/chunks/GapCursorNavigation-BaXDnjFf.mjs.map +0 -1
- package/dist/chunks/GapCursorPlugin-nldun8cE.mjs +0 -2
- package/dist/chunks/GapCursorPlugin-nldun8cE.mjs.map +0 -1
- package/dist/chunks/HardBreakPlugin-DZRdsE15.mjs +0 -2
- package/dist/chunks/HardBreakPlugin-DZRdsE15.mjs.map +0 -1
- package/dist/chunks/HeadingPlugin-EPAmsEGt.mjs +0 -2
- package/dist/chunks/HeadingPlugin-EPAmsEGt.mjs.map +0 -1
- package/dist/chunks/HighlightPlugin-RN3l6pVJ.mjs +0 -2
- package/dist/chunks/HighlightPlugin-RN3l6pVJ.mjs.map +0 -1
- package/dist/chunks/HorizontalRulePlugin-BJPXzTtJ.mjs +0 -2
- package/dist/chunks/HorizontalRulePlugin-BJPXzTtJ.mjs.map +0 -1
- package/dist/chunks/ImagePlugin-CCEevNfJ.mjs +0 -2
- package/dist/chunks/ImagePlugin-CCEevNfJ.mjs.map +0 -1
- package/dist/chunks/InlineCodePlugin-B7IOgUSI.mjs +0 -2
- package/dist/chunks/InlineCodePlugin-B7IOgUSI.mjs.map +0 -1
- package/dist/chunks/KeyboardNav-CsdlWnNl.mjs +0 -2
- package/dist/chunks/KeyboardNav-CsdlWnNl.mjs.map +0 -1
- package/dist/chunks/LinkPlugin-Bhwg24lH.mjs +0 -2
- package/dist/chunks/LinkPlugin-Bhwg24lH.mjs.map +0 -1
- package/dist/chunks/ListPlugin-BkG6UO4x.mjs +0 -2
- package/dist/chunks/ListPlugin-BkG6UO4x.mjs.map +0 -1
- package/dist/chunks/NavigationQueries-CgYPG6oY.mjs +0 -2
- package/dist/chunks/NavigationQueries-CgYPG6oY.mjs.map +0 -1
- package/dist/chunks/NodeResolver-DVPpO5nC.mjs +0 -2
- package/dist/chunks/NodeResolver-DVPpO5nC.mjs.map +0 -1
- package/dist/chunks/NodeSelectionCommands-Ddxu5Qck.mjs +0 -2
- package/dist/chunks/NodeSelectionCommands-Ddxu5Qck.mjs.map +0 -1
- package/dist/chunks/PluginHelpers-D-MvWR98.mjs +0 -2
- package/dist/chunks/PluginHelpers-D-MvWR98.mjs.map +0 -1
- package/dist/chunks/PopupKeyboardPatterns-DQdL7RHx.mjs +0 -2
- package/dist/chunks/PopupKeyboardPatterns-DQdL7RHx.mjs.map +0 -1
- package/dist/chunks/PopupManager-CxPzNm-P.mjs +0 -2
- package/dist/chunks/PopupManager-CxPzNm-P.mjs.map +0 -1
- package/dist/chunks/PopupPositioning-DRNwWB0U.mjs +0 -2
- package/dist/chunks/PopupPositioning-DRNwWB0U.mjs.map +0 -1
- package/dist/chunks/PrintPlugin-DOk5IZRO.mjs +0 -2
- package/dist/chunks/PrintPlugin-DOk5IZRO.mjs.map +0 -1
- package/dist/chunks/PrintTypes-Drk6kLcl.mjs +0 -2
- package/dist/chunks/PrintTypes-Drk6kLcl.mjs.map +0 -1
- package/dist/chunks/RangeIterator-DytL1lUT.mjs +0 -2
- package/dist/chunks/RangeIterator-DytL1lUT.mjs.map +0 -1
- package/dist/chunks/ShortcutFormatting-DE6B8iGs.mjs +0 -2
- package/dist/chunks/ShortcutFormatting-DE6B8iGs.mjs.map +0 -1
- package/dist/chunks/SmartPastePlugin-DqKx94sH.mjs +0 -2
- package/dist/chunks/SmartPastePlugin-DqKx94sH.mjs.map +0 -1
- package/dist/chunks/StrikethroughPlugin-vYNzfxdy.mjs +0 -2
- package/dist/chunks/StrikethroughPlugin-vYNzfxdy.mjs.map +0 -1
- package/dist/chunks/SuperSubPlugin-BNsoXWHS.mjs +0 -2
- package/dist/chunks/SuperSubPlugin-BNsoXWHS.mjs.map +0 -1
- package/dist/chunks/SyntaxTokenTypes-CVUAMov0.mjs +0 -2
- package/dist/chunks/SyntaxTokenTypes-CVUAMov0.mjs.map +0 -1
- package/dist/chunks/TablePlugin-R-hmydrM.mjs +0 -2
- package/dist/chunks/TablePlugin-R-hmydrM.mjs.map +0 -1
- package/dist/chunks/TextColorPlugin-DQ-CB9cr.mjs +0 -2
- package/dist/chunks/TextColorPlugin-DQ-CB9cr.mjs.map +0 -1
- package/dist/chunks/TextDirectionAutoPlugin-kZ1tcu0d.mjs +0 -2
- package/dist/chunks/TextDirectionAutoPlugin-kZ1tcu0d.mjs.map +0 -1
- package/dist/chunks/TextDirectionPlugin-Bk3CkbYh.mjs +0 -2
- package/dist/chunks/TextDirectionPlugin-Bk3CkbYh.mjs.map +0 -1
- package/dist/chunks/TextDirectionService-DY4M8EwU.mjs +0 -2
- package/dist/chunks/TextDirectionService-DY4M8EwU.mjs.map +0 -1
- package/dist/chunks/TextFormattingPlugin-D13eP6nF.mjs +0 -2
- package/dist/chunks/TextFormattingPlugin-D13eP6nF.mjs.map +0 -1
- package/dist/chunks/ToolbarPlugin-DeH8n5d2.mjs +0 -2
- package/dist/chunks/ToolbarPlugin-DeH8n5d2.mjs.map +0 -1
- package/dist/chunks/WordBoundary-BE2u997Q.mjs +0 -2
- package/dist/chunks/WordBoundary-BE2u997Q.mjs.map +0 -1
- package/dist/chunks/XmlDetector-BtYxzBDa.mjs +0 -2
- package/dist/chunks/XmlDetector-BtYxzBDa.mjs.map +0 -1
- package/dist/chunks/XmlPatterns-DuP8GWVt.mjs +0 -2
- package/dist/chunks/XmlPatterns-DuP8GWVt.mjs.map +0 -1
- package/dist/chunks/XmlSupport-D54BdAJZ.mjs +0 -2
- package/dist/chunks/XmlSupport-D54BdAJZ.mjs.map +0 -1
- package/dist/chunks/ar-2Fkz_6nI.mjs +0 -2
- package/dist/chunks/ar-2Fkz_6nI.mjs.map +0 -1
- package/dist/chunks/ar-4ZPC8daa.mjs +0 -2
- package/dist/chunks/ar-4ZPC8daa.mjs.map +0 -1
- package/dist/chunks/ar-6I20_Djq.mjs +0 -2
- package/dist/chunks/ar-6I20_Djq.mjs.map +0 -1
- package/dist/chunks/ar-B7-Dm70S.mjs +0 -2
- package/dist/chunks/ar-B7-Dm70S.mjs.map +0 -1
- package/dist/chunks/ar-BRe0t96G.mjs +0 -2
- package/dist/chunks/ar-BRe0t96G.mjs.map +0 -1
- package/dist/chunks/ar-BnNyrtdi.mjs +0 -2
- package/dist/chunks/ar-BnNyrtdi.mjs.map +0 -1
- package/dist/chunks/ar-BsMfhWs5.mjs +0 -2
- package/dist/chunks/ar-BsMfhWs5.mjs.map +0 -1
- package/dist/chunks/ar-Bvja-bjE.mjs +0 -2
- package/dist/chunks/ar-Bvja-bjE.mjs.map +0 -1
- package/dist/chunks/ar-BxVbBvSa.mjs +0 -2
- package/dist/chunks/ar-BxVbBvSa.mjs.map +0 -1
- package/dist/chunks/ar-C5dW-co3.mjs +0 -2
- package/dist/chunks/ar-C5dW-co3.mjs.map +0 -1
- package/dist/chunks/ar-CARMr30L.mjs +0 -2
- package/dist/chunks/ar-CARMr30L.mjs.map +0 -1
- package/dist/chunks/ar-CB-pehGw.mjs +0 -2
- package/dist/chunks/ar-CB-pehGw.mjs.map +0 -1
- package/dist/chunks/ar-CEYgAxTM.mjs +0 -2
- package/dist/chunks/ar-CEYgAxTM.mjs.map +0 -1
- package/dist/chunks/ar-CO60qpZJ.mjs +0 -2
- package/dist/chunks/ar-CO60qpZJ.mjs.map +0 -1
- package/dist/chunks/ar-CtI_snUM.mjs +0 -2
- package/dist/chunks/ar-CtI_snUM.mjs.map +0 -1
- package/dist/chunks/ar-Cv1RQvhK.mjs +0 -2
- package/dist/chunks/ar-Cv1RQvhK.mjs.map +0 -1
- package/dist/chunks/ar-D5jV20Tu.mjs +0 -2
- package/dist/chunks/ar-D5jV20Tu.mjs.map +0 -1
- package/dist/chunks/ar-DJN9fQ7Z.mjs +0 -2
- package/dist/chunks/ar-DJN9fQ7Z.mjs.map +0 -1
- package/dist/chunks/ar-DPTsUnwA.mjs +0 -2
- package/dist/chunks/ar-DPTsUnwA.mjs.map +0 -1
- package/dist/chunks/ar-DZJIBD1Q.mjs +0 -2
- package/dist/chunks/ar-DZJIBD1Q.mjs.map +0 -1
- package/dist/chunks/ar-DkkbwV93.mjs +0 -2
- package/dist/chunks/ar-DkkbwV93.mjs.map +0 -1
- package/dist/chunks/ar-DmeMor8Y.mjs +0 -2
- package/dist/chunks/ar-DmeMor8Y.mjs.map +0 -1
- package/dist/chunks/ar-LnE7jPai.mjs +0 -2
- package/dist/chunks/ar-LnE7jPai.mjs.map +0 -1
- package/dist/chunks/ar-P3wW0fmA.mjs +0 -2
- package/dist/chunks/ar-P3wW0fmA.mjs.map +0 -1
- package/dist/chunks/ar-uum0DCfv.mjs +0 -2
- package/dist/chunks/ar-uum0DCfv.mjs.map +0 -1
- package/dist/chunks/color-picker-DlXhHBZ6.mjs +0 -2
- package/dist/chunks/color-picker-DlXhHBZ6.mjs.map +0 -1
- package/dist/chunks/de-8SHQu0rr.mjs +0 -2
- package/dist/chunks/de-8SHQu0rr.mjs.map +0 -1
- package/dist/chunks/de-B8a71A0X.mjs +0 -2
- package/dist/chunks/de-B8a71A0X.mjs.map +0 -1
- package/dist/chunks/de-B9weXoA1.mjs +0 -2
- package/dist/chunks/de-B9weXoA1.mjs.map +0 -1
- package/dist/chunks/de-BKm53tVU.mjs +0 -2
- package/dist/chunks/de-BKm53tVU.mjs.map +0 -1
- package/dist/chunks/de-BLWrnMfX.mjs +0 -2
- package/dist/chunks/de-BLWrnMfX.mjs.map +0 -1
- package/dist/chunks/de-BOujs1pF.mjs +0 -2
- package/dist/chunks/de-BOujs1pF.mjs.map +0 -1
- package/dist/chunks/de-B_1XleAG.mjs +0 -2
- package/dist/chunks/de-B_1XleAG.mjs.map +0 -1
- package/dist/chunks/de-BpmjrOMc.mjs +0 -2
- package/dist/chunks/de-BpmjrOMc.mjs.map +0 -1
- package/dist/chunks/de-C8OHD1fm.mjs +0 -2
- package/dist/chunks/de-C8OHD1fm.mjs.map +0 -1
- package/dist/chunks/de-CAVCXBBR.mjs +0 -2
- package/dist/chunks/de-CAVCXBBR.mjs.map +0 -1
- package/dist/chunks/de-CkMnuozT.mjs +0 -2
- package/dist/chunks/de-CkMnuozT.mjs.map +0 -1
- package/dist/chunks/de-CtDnvnnm.mjs +0 -2
- package/dist/chunks/de-CtDnvnnm.mjs.map +0 -1
- package/dist/chunks/de-Cz26vtXW.mjs +0 -2
- package/dist/chunks/de-Cz26vtXW.mjs.map +0 -1
- package/dist/chunks/de-D0BPSP3j.mjs +0 -2
- package/dist/chunks/de-D0BPSP3j.mjs.map +0 -1
- package/dist/chunks/de-D74v0paw.mjs +0 -2
- package/dist/chunks/de-D74v0paw.mjs.map +0 -1
- package/dist/chunks/de-DKj55F9g.mjs +0 -2
- package/dist/chunks/de-DKj55F9g.mjs.map +0 -1
- package/dist/chunks/de-DYuRb98l.mjs +0 -2
- package/dist/chunks/de-DYuRb98l.mjs.map +0 -1
- package/dist/chunks/de-DaK0-sdo.mjs +0 -2
- package/dist/chunks/de-DaK0-sdo.mjs.map +0 -1
- package/dist/chunks/de-Dia08Wsq.mjs +0 -2
- package/dist/chunks/de-Dia08Wsq.mjs.map +0 -1
- package/dist/chunks/de-Dp_uj2Z3.mjs +0 -2
- package/dist/chunks/de-Dp_uj2Z3.mjs.map +0 -1
- package/dist/chunks/de-DwX1CDNO.mjs +0 -2
- package/dist/chunks/de-DwX1CDNO.mjs.map +0 -1
- package/dist/chunks/de-DyF2mRfw.mjs +0 -2
- package/dist/chunks/de-DyF2mRfw.mjs.map +0 -1
- package/dist/chunks/de-X3BLBlF8.mjs +0 -2
- package/dist/chunks/de-X3BLBlF8.mjs.map +0 -1
- package/dist/chunks/de-dPC3Qk7N.mjs +0 -2
- package/dist/chunks/de-dPC3Qk7N.mjs.map +0 -1
- package/dist/chunks/de-pLGt5S7j.mjs +0 -2
- package/dist/chunks/de-pLGt5S7j.mjs.map +0 -1
- package/dist/chunks/es--xozZF4T.mjs +0 -2
- package/dist/chunks/es--xozZF4T.mjs.map +0 -1
- package/dist/chunks/es-2BjtTusm.mjs +0 -2
- package/dist/chunks/es-2BjtTusm.mjs.map +0 -1
- package/dist/chunks/es-B2rEK7_f.mjs +0 -2
- package/dist/chunks/es-B2rEK7_f.mjs.map +0 -1
- package/dist/chunks/es-B9esmUm1.mjs +0 -2
- package/dist/chunks/es-B9esmUm1.mjs.map +0 -1
- package/dist/chunks/es-BJxkHalP.mjs +0 -2
- package/dist/chunks/es-BJxkHalP.mjs.map +0 -1
- package/dist/chunks/es-BMKsnh3y.mjs +0 -2
- package/dist/chunks/es-BMKsnh3y.mjs.map +0 -1
- package/dist/chunks/es-BXFflrrU.mjs +0 -2
- package/dist/chunks/es-BXFflrrU.mjs.map +0 -1
- package/dist/chunks/es-BbX_lEEN.mjs +0 -2
- package/dist/chunks/es-BbX_lEEN.mjs.map +0 -1
- package/dist/chunks/es-BlHe_tc0.mjs +0 -2
- package/dist/chunks/es-BlHe_tc0.mjs.map +0 -1
- package/dist/chunks/es-Bu6nnEeT.mjs +0 -2
- package/dist/chunks/es-Bu6nnEeT.mjs.map +0 -1
- package/dist/chunks/es-Bx0CbUoY.mjs +0 -2
- package/dist/chunks/es-Bx0CbUoY.mjs.map +0 -1
- package/dist/chunks/es-CE9Tbsb7.mjs +0 -2
- package/dist/chunks/es-CE9Tbsb7.mjs.map +0 -1
- package/dist/chunks/es-COSomns3.mjs +0 -2
- package/dist/chunks/es-COSomns3.mjs.map +0 -1
- package/dist/chunks/es-C_7qthHu.mjs +0 -2
- package/dist/chunks/es-C_7qthHu.mjs.map +0 -1
- package/dist/chunks/es-CirfP3x1.mjs +0 -2
- package/dist/chunks/es-CirfP3x1.mjs.map +0 -1
- package/dist/chunks/es-CpF8eiPr.mjs +0 -2
- package/dist/chunks/es-CpF8eiPr.mjs.map +0 -1
- package/dist/chunks/es-D787y0ui.mjs +0 -2
- package/dist/chunks/es-D787y0ui.mjs.map +0 -1
- package/dist/chunks/es-D8iB5vwQ.mjs +0 -2
- package/dist/chunks/es-D8iB5vwQ.mjs.map +0 -1
- package/dist/chunks/es-DBb78XWu.mjs +0 -2
- package/dist/chunks/es-DBb78XWu.mjs.map +0 -1
- package/dist/chunks/es-DC6mYTD3.mjs +0 -2
- package/dist/chunks/es-DC6mYTD3.mjs.map +0 -1
- package/dist/chunks/es-Dh--mRZs.mjs +0 -2
- package/dist/chunks/es-Dh--mRZs.mjs.map +0 -1
- package/dist/chunks/es-DvPsYqFj.mjs +0 -2
- package/dist/chunks/es-DvPsYqFj.mjs.map +0 -1
- package/dist/chunks/es-DxXimuUa.mjs +0 -2
- package/dist/chunks/es-DxXimuUa.mjs.map +0 -1
- package/dist/chunks/es-mWJptxq3.mjs +0 -2
- package/dist/chunks/es-mWJptxq3.mjs.map +0 -1
- package/dist/chunks/es-qYV--o6U.mjs +0 -2
- package/dist/chunks/es-qYV--o6U.mjs.map +0 -1
- package/dist/chunks/fonts-CxtWyeNB.mjs +0 -2
- package/dist/chunks/fonts-CxtWyeNB.mjs.map +0 -1
- package/dist/chunks/fr--F426oao.mjs +0 -2
- package/dist/chunks/fr--F426oao.mjs.map +0 -1
- package/dist/chunks/fr-B0BPbbNB.mjs +0 -2
- package/dist/chunks/fr-B0BPbbNB.mjs.map +0 -1
- package/dist/chunks/fr-B4UQy0j-.mjs +0 -2
- package/dist/chunks/fr-B4UQy0j-.mjs.map +0 -1
- package/dist/chunks/fr-B4XLxkci.mjs +0 -2
- package/dist/chunks/fr-B4XLxkci.mjs.map +0 -1
- package/dist/chunks/fr-BC1Rfp9S.mjs +0 -2
- package/dist/chunks/fr-BC1Rfp9S.mjs.map +0 -1
- package/dist/chunks/fr-BRGGu0E2.mjs +0 -2
- package/dist/chunks/fr-BRGGu0E2.mjs.map +0 -1
- package/dist/chunks/fr-BoSz1pa9.mjs +0 -2
- package/dist/chunks/fr-BoSz1pa9.mjs.map +0 -1
- package/dist/chunks/fr-Bom3RFIN.mjs +0 -2
- package/dist/chunks/fr-Bom3RFIN.mjs.map +0 -1
- package/dist/chunks/fr-BtnwMUII.mjs +0 -2
- package/dist/chunks/fr-BtnwMUII.mjs.map +0 -1
- package/dist/chunks/fr-C6pglM3H.mjs +0 -2
- package/dist/chunks/fr-C6pglM3H.mjs.map +0 -1
- package/dist/chunks/fr-CDBpS6xE.mjs +0 -2
- package/dist/chunks/fr-CDBpS6xE.mjs.map +0 -1
- package/dist/chunks/fr-CN0ihkUg.mjs +0 -2
- package/dist/chunks/fr-CN0ihkUg.mjs.map +0 -1
- package/dist/chunks/fr-CNNBBeLM.mjs +0 -2
- package/dist/chunks/fr-CNNBBeLM.mjs.map +0 -1
- package/dist/chunks/fr-CVOY2y07.mjs +0 -2
- package/dist/chunks/fr-CVOY2y07.mjs.map +0 -1
- package/dist/chunks/fr-CZAbL_o0.mjs +0 -2
- package/dist/chunks/fr-CZAbL_o0.mjs.map +0 -1
- package/dist/chunks/fr-DJkPmQG_.mjs +0 -2
- package/dist/chunks/fr-DJkPmQG_.mjs.map +0 -1
- package/dist/chunks/fr-DkWdFDsR.mjs +0 -2
- package/dist/chunks/fr-DkWdFDsR.mjs.map +0 -1
- package/dist/chunks/fr-DnQHoPVo.mjs +0 -2
- package/dist/chunks/fr-DnQHoPVo.mjs.map +0 -1
- package/dist/chunks/fr-DsdueaiG.mjs +0 -2
- package/dist/chunks/fr-DsdueaiG.mjs.map +0 -1
- package/dist/chunks/fr-DxNdsa11.mjs +0 -2
- package/dist/chunks/fr-DxNdsa11.mjs.map +0 -1
- package/dist/chunks/fr-IO4_LYvE.mjs +0 -2
- package/dist/chunks/fr-IO4_LYvE.mjs.map +0 -1
- package/dist/chunks/fr-ZKDCEpww.mjs +0 -2
- package/dist/chunks/fr-ZKDCEpww.mjs.map +0 -1
- package/dist/chunks/fr-coufP_et.mjs +0 -2
- package/dist/chunks/fr-coufP_et.mjs.map +0 -1
- package/dist/chunks/fr-lYSOgOK7.mjs +0 -2
- package/dist/chunks/fr-lYSOgOK7.mjs.map +0 -1
- package/dist/chunks/fr-wobtRjcF.mjs +0 -2
- package/dist/chunks/fr-wobtRjcF.mjs.map +0 -1
- package/dist/chunks/full-5hGvv-bG.mjs +0 -2
- package/dist/chunks/full-5hGvv-bG.mjs.map +0 -1
- package/dist/chunks/hi-B0o90MFd.mjs +0 -2
- package/dist/chunks/hi-B0o90MFd.mjs.map +0 -1
- package/dist/chunks/hi-BFko34WG.mjs +0 -2
- package/dist/chunks/hi-BFko34WG.mjs.map +0 -1
- package/dist/chunks/hi-BVxSgaNT.mjs +0 -2
- package/dist/chunks/hi-BVxSgaNT.mjs.map +0 -1
- package/dist/chunks/hi-BirBQ5Ef.mjs +0 -2
- package/dist/chunks/hi-BirBQ5Ef.mjs.map +0 -1
- package/dist/chunks/hi-BnsbcSIX.mjs +0 -2
- package/dist/chunks/hi-BnsbcSIX.mjs.map +0 -1
- package/dist/chunks/hi-BoFuxLtG.mjs +0 -2
- package/dist/chunks/hi-BoFuxLtG.mjs.map +0 -1
- package/dist/chunks/hi-BptyTwAv.mjs +0 -2
- package/dist/chunks/hi-BptyTwAv.mjs.map +0 -1
- package/dist/chunks/hi-BulaYhi_.mjs +0 -2
- package/dist/chunks/hi-BulaYhi_.mjs.map +0 -1
- package/dist/chunks/hi-BzflHG6Y.mjs +0 -2
- package/dist/chunks/hi-BzflHG6Y.mjs.map +0 -1
- package/dist/chunks/hi-C7Hb-gQ_.mjs +0 -2
- package/dist/chunks/hi-C7Hb-gQ_.mjs.map +0 -1
- package/dist/chunks/hi-C_lY7kA9.mjs +0 -2
- package/dist/chunks/hi-C_lY7kA9.mjs.map +0 -1
- package/dist/chunks/hi-CkylXoIm.mjs +0 -2
- package/dist/chunks/hi-CkylXoIm.mjs.map +0 -1
- package/dist/chunks/hi-DGJTbrQi.mjs +0 -2
- package/dist/chunks/hi-DGJTbrQi.mjs.map +0 -1
- package/dist/chunks/hi-DGJgX0fG.mjs +0 -2
- package/dist/chunks/hi-DGJgX0fG.mjs.map +0 -1
- package/dist/chunks/hi-DKDYpjdr.mjs +0 -2
- package/dist/chunks/hi-DKDYpjdr.mjs.map +0 -1
- package/dist/chunks/hi-DfAX8S-T.mjs +0 -2
- package/dist/chunks/hi-DfAX8S-T.mjs.map +0 -1
- package/dist/chunks/hi-Dhq91ipt.mjs +0 -2
- package/dist/chunks/hi-Dhq91ipt.mjs.map +0 -1
- package/dist/chunks/hi-Dup389dM.mjs +0 -2
- package/dist/chunks/hi-Dup389dM.mjs.map +0 -1
- package/dist/chunks/hi-DzRFsYYN.mjs +0 -2
- package/dist/chunks/hi-DzRFsYYN.mjs.map +0 -1
- package/dist/chunks/hi-ObZRwITd.mjs +0 -2
- package/dist/chunks/hi-ObZRwITd.mjs.map +0 -1
- package/dist/chunks/hi-VvUzjfH_.mjs +0 -2
- package/dist/chunks/hi-VvUzjfH_.mjs.map +0 -1
- package/dist/chunks/hi-jWQDQkOX.mjs +0 -2
- package/dist/chunks/hi-jWQDQkOX.mjs.map +0 -1
- package/dist/chunks/hi-l3hIrp8J.mjs +0 -2
- package/dist/chunks/hi-l3hIrp8J.mjs.map +0 -1
- package/dist/chunks/hi-o8Gsu5Ly.mjs +0 -2
- package/dist/chunks/hi-o8Gsu5Ly.mjs.map +0 -1
- package/dist/chunks/hi-sxC2nk3h.mjs +0 -2
- package/dist/chunks/hi-sxC2nk3h.mjs.map +0 -1
- package/dist/chunks/minimal-pBhi4EJI.mjs +0 -2
- package/dist/chunks/minimal-pBhi4EJI.mjs.map +0 -1
- package/dist/chunks/pt--57Ug7ig.mjs +0 -2
- package/dist/chunks/pt--57Ug7ig.mjs.map +0 -1
- package/dist/chunks/pt-4j8Km9Db.mjs +0 -2
- package/dist/chunks/pt-4j8Km9Db.mjs.map +0 -1
- package/dist/chunks/pt-BTGFKCns.mjs +0 -2
- package/dist/chunks/pt-BTGFKCns.mjs.map +0 -1
- package/dist/chunks/pt-BU8Qfuoz.mjs +0 -2
- package/dist/chunks/pt-BU8Qfuoz.mjs.map +0 -1
- package/dist/chunks/pt-BYAOJxIB.mjs +0 -2
- package/dist/chunks/pt-BYAOJxIB.mjs.map +0 -1
- package/dist/chunks/pt-BjNWQm9A.mjs +0 -2
- package/dist/chunks/pt-BjNWQm9A.mjs.map +0 -1
- package/dist/chunks/pt-Bvnb_NpT.mjs +0 -2
- package/dist/chunks/pt-Bvnb_NpT.mjs.map +0 -1
- package/dist/chunks/pt-C2pkn7vo.mjs +0 -2
- package/dist/chunks/pt-C2pkn7vo.mjs.map +0 -1
- package/dist/chunks/pt-C8MhLnWx.mjs +0 -2
- package/dist/chunks/pt-C8MhLnWx.mjs.map +0 -1
- package/dist/chunks/pt-CJfYLSTe.mjs +0 -2
- package/dist/chunks/pt-CJfYLSTe.mjs.map +0 -1
- package/dist/chunks/pt-CdwVIYOK.mjs +0 -2
- package/dist/chunks/pt-CdwVIYOK.mjs.map +0 -1
- package/dist/chunks/pt-CwrVo90O.mjs +0 -2
- package/dist/chunks/pt-CwrVo90O.mjs.map +0 -1
- package/dist/chunks/pt-DD26CKCA.mjs +0 -2
- package/dist/chunks/pt-DD26CKCA.mjs.map +0 -1
- package/dist/chunks/pt-DLbf6uoo.mjs +0 -2
- package/dist/chunks/pt-DLbf6uoo.mjs.map +0 -1
- package/dist/chunks/pt-DNyNHwKh.mjs +0 -2
- package/dist/chunks/pt-DNyNHwKh.mjs.map +0 -1
- package/dist/chunks/pt-DVfMAcXb.mjs +0 -2
- package/dist/chunks/pt-DVfMAcXb.mjs.map +0 -1
- package/dist/chunks/pt-DWSFad3n.mjs +0 -2
- package/dist/chunks/pt-DWSFad3n.mjs.map +0 -1
- package/dist/chunks/pt-DZXY4i4G.mjs +0 -2
- package/dist/chunks/pt-DZXY4i4G.mjs.map +0 -1
- package/dist/chunks/pt-DfUpRhK1.mjs +0 -2
- package/dist/chunks/pt-DfUpRhK1.mjs.map +0 -1
- package/dist/chunks/pt-DlvNEDeW.mjs +0 -2
- package/dist/chunks/pt-DlvNEDeW.mjs.map +0 -1
- package/dist/chunks/pt-DzFyGwB4.mjs +0 -2
- package/dist/chunks/pt-DzFyGwB4.mjs.map +0 -1
- package/dist/chunks/pt-HhQcARW6.mjs +0 -2
- package/dist/chunks/pt-HhQcARW6.mjs.map +0 -1
- package/dist/chunks/pt-SjvTF40s.mjs +0 -2
- package/dist/chunks/pt-SjvTF40s.mjs.map +0 -1
- package/dist/chunks/pt-ihNE0VQJ.mjs +0 -2
- package/dist/chunks/pt-ihNE0VQJ.mjs.map +0 -1
- package/dist/chunks/pt-zfCjhIgy.mjs +0 -2
- package/dist/chunks/pt-zfCjhIgy.mjs.map +0 -1
- package/dist/chunks/ru-0AHodbWv.mjs +0 -2
- package/dist/chunks/ru-0AHodbWv.mjs.map +0 -1
- package/dist/chunks/ru-2MDGmLw0.mjs +0 -2
- package/dist/chunks/ru-2MDGmLw0.mjs.map +0 -1
- package/dist/chunks/ru-3VfYKfTm.mjs +0 -2
- package/dist/chunks/ru-3VfYKfTm.mjs.map +0 -1
- package/dist/chunks/ru-B-gRJ6nQ.mjs +0 -2
- package/dist/chunks/ru-B-gRJ6nQ.mjs.map +0 -1
- package/dist/chunks/ru-B6ITUB-Y.mjs +0 -2
- package/dist/chunks/ru-B6ITUB-Y.mjs.map +0 -1
- package/dist/chunks/ru-BKDWkabk.mjs +0 -2
- package/dist/chunks/ru-BKDWkabk.mjs.map +0 -1
- package/dist/chunks/ru-BMxJsSe3.mjs +0 -2
- package/dist/chunks/ru-BMxJsSe3.mjs.map +0 -1
- package/dist/chunks/ru-Bep1iHQL.mjs +0 -2
- package/dist/chunks/ru-Bep1iHQL.mjs.map +0 -1
- package/dist/chunks/ru-Blj0nqoL.mjs +0 -2
- package/dist/chunks/ru-Blj0nqoL.mjs.map +0 -1
- package/dist/chunks/ru-BqnHkmii.mjs +0 -2
- package/dist/chunks/ru-BqnHkmii.mjs.map +0 -1
- package/dist/chunks/ru-C-4AaPUK.mjs +0 -2
- package/dist/chunks/ru-C-4AaPUK.mjs.map +0 -1
- package/dist/chunks/ru-C9Nv7JJI.mjs +0 -2
- package/dist/chunks/ru-C9Nv7JJI.mjs.map +0 -1
- package/dist/chunks/ru-CJFtr1Ks.mjs +0 -2
- package/dist/chunks/ru-CJFtr1Ks.mjs.map +0 -1
- package/dist/chunks/ru-CN63yWk_.mjs +0 -2
- package/dist/chunks/ru-CN63yWk_.mjs.map +0 -1
- package/dist/chunks/ru-CcFX97-2.mjs +0 -2
- package/dist/chunks/ru-CcFX97-2.mjs.map +0 -1
- package/dist/chunks/ru-D8PhWFSp.mjs +0 -2
- package/dist/chunks/ru-D8PhWFSp.mjs.map +0 -1
- package/dist/chunks/ru-DYAncidS.mjs +0 -2
- package/dist/chunks/ru-DYAncidS.mjs.map +0 -1
- package/dist/chunks/ru-D_zXo-FA.mjs +0 -2
- package/dist/chunks/ru-D_zXo-FA.mjs.map +0 -1
- package/dist/chunks/ru-DhSPV6m0.mjs +0 -2
- package/dist/chunks/ru-DhSPV6m0.mjs.map +0 -1
- package/dist/chunks/ru-LNbpjKCw.mjs +0 -2
- package/dist/chunks/ru-LNbpjKCw.mjs.map +0 -1
- package/dist/chunks/ru-LXi1ONW4.mjs +0 -2
- package/dist/chunks/ru-LXi1ONW4.mjs.map +0 -1
- package/dist/chunks/ru-db7wsWkx.mjs +0 -2
- package/dist/chunks/ru-db7wsWkx.mjs.map +0 -1
- package/dist/chunks/ru-nZ4BjiD0.mjs +0 -2
- package/dist/chunks/ru-nZ4BjiD0.mjs.map +0 -1
- package/dist/chunks/ru-v9zumXd2.mjs +0 -2
- package/dist/chunks/ru-v9zumXd2.mjs.map +0 -1
- package/dist/chunks/ru-wK2ytv3A.mjs +0 -2
- package/dist/chunks/ru-wK2ytv3A.mjs.map +0 -1
- package/dist/chunks/src-CNK6vpUU.mjs +0 -2
- package/dist/chunks/src-CNK6vpUU.mjs.map +0 -1
- package/dist/chunks/zh-9AcCSFm0.mjs +0 -2
- package/dist/chunks/zh-9AcCSFm0.mjs.map +0 -1
- package/dist/chunks/zh-B3bJCfdB.mjs +0 -2
- package/dist/chunks/zh-B3bJCfdB.mjs.map +0 -1
- package/dist/chunks/zh-B46Dt1h7.mjs +0 -2
- package/dist/chunks/zh-B46Dt1h7.mjs.map +0 -1
- package/dist/chunks/zh-BRy2B6Og.mjs +0 -2
- package/dist/chunks/zh-BRy2B6Og.mjs.map +0 -1
- package/dist/chunks/zh-BfYi8wB2.mjs +0 -2
- package/dist/chunks/zh-BfYi8wB2.mjs.map +0 -1
- package/dist/chunks/zh-C0I3L6NA.mjs +0 -2
- package/dist/chunks/zh-C0I3L6NA.mjs.map +0 -1
- package/dist/chunks/zh-C33e4gfg.mjs +0 -2
- package/dist/chunks/zh-C33e4gfg.mjs.map +0 -1
- package/dist/chunks/zh-C9sNwnC1.mjs +0 -2
- package/dist/chunks/zh-C9sNwnC1.mjs.map +0 -1
- package/dist/chunks/zh-CACr0qSo.mjs +0 -2
- package/dist/chunks/zh-CACr0qSo.mjs.map +0 -1
- package/dist/chunks/zh-CU0hd8zq.mjs +0 -2
- package/dist/chunks/zh-CU0hd8zq.mjs.map +0 -1
- package/dist/chunks/zh-CX2zUoWR.mjs +0 -2
- package/dist/chunks/zh-CX2zUoWR.mjs.map +0 -1
- package/dist/chunks/zh-CblZ-34H.mjs +0 -2
- package/dist/chunks/zh-CblZ-34H.mjs.map +0 -1
- package/dist/chunks/zh-CicpU0g8.mjs +0 -2
- package/dist/chunks/zh-CicpU0g8.mjs.map +0 -1
- package/dist/chunks/zh-Cr3KdEZV.mjs +0 -2
- package/dist/chunks/zh-Cr3KdEZV.mjs.map +0 -1
- package/dist/chunks/zh-D24dsCiw.mjs +0 -2
- package/dist/chunks/zh-D24dsCiw.mjs.map +0 -1
- package/dist/chunks/zh-DQtLxQ3s.mjs +0 -2
- package/dist/chunks/zh-DQtLxQ3s.mjs.map +0 -1
- package/dist/chunks/zh-DR1OF5vm.mjs +0 -2
- package/dist/chunks/zh-DR1OF5vm.mjs.map +0 -1
- package/dist/chunks/zh-DS82x1KL.mjs +0 -2
- package/dist/chunks/zh-DS82x1KL.mjs.map +0 -1
- package/dist/chunks/zh-DdJA-AEY.mjs +0 -2
- package/dist/chunks/zh-DdJA-AEY.mjs.map +0 -1
- package/dist/chunks/zh-DpVlDZ9n.mjs +0 -2
- package/dist/chunks/zh-DpVlDZ9n.mjs.map +0 -1
- package/dist/chunks/zh-OWVKcbVR.mjs +0 -2
- package/dist/chunks/zh-OWVKcbVR.mjs.map +0 -1
- package/dist/chunks/zh-d19V68ib.mjs +0 -2
- package/dist/chunks/zh-d19V68ib.mjs.map +0 -1
- package/dist/chunks/zh-fSMt1FnB.mjs +0 -2
- package/dist/chunks/zh-fSMt1FnB.mjs.map +0 -1
- package/dist/chunks/zh-mLlk9Wki.mjs +0 -2
- package/dist/chunks/zh-mLlk9Wki.mjs.map +0 -1
- package/dist/chunks/zh-nnMt8E6m.mjs +0 -2
- package/dist/chunks/zh-nnMt8E6m.mjs.map +0 -1
- package/dist/plugins/smart-paste/detectors/JavaDetector.d.ts +0 -7
- package/dist/plugins/smart-paste/detectors/JavaDetector.d.ts.map +0 -1
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { Document } from '../model/Document.js';
|
|
2
|
+
import { BlockRemovalMap, ChildIndexShiftMap, MergeMap, ShiftMap, SplitMap, StepMap } from './Mapping.js';
|
|
3
|
+
import { AddMarkStep, DeleteTextStep, InsertInlineNodeStep, InsertNodeStep, InsertTextStep, MergeBlocksStep, RemoveInlineNodeStep, RemoveMarkStep, RemoveNodeStep, SetBlockTypeStep, SetInlineNodeAttrStep, SetNodeAttrStep, SetStoredMarksStep, SplitBlockStep } from './Steps.js';
|
|
4
|
+
export declare function getMapInsertText(_doc: Document, step: InsertTextStep): ShiftMap;
|
|
5
|
+
export declare function getMapDeleteText(_doc: Document, step: DeleteTextStep): ShiftMap;
|
|
6
|
+
export declare function getMapInsertInlineNode(_doc: Document, step: InsertInlineNodeStep): ShiftMap;
|
|
7
|
+
export declare function getMapRemoveInlineNode(_doc: Document, step: RemoveInlineNodeStep): ShiftMap;
|
|
8
|
+
export declare function getMapSplitBlock(_doc: Document, step: SplitBlockStep): SplitMap;
|
|
9
|
+
export declare function getMapMergeBlocks(_doc: Document, step: MergeBlocksStep): MergeMap;
|
|
10
|
+
export declare function getMapRemoveNode(_doc: Document, step: RemoveNodeStep): BlockRemovalMap;
|
|
11
|
+
/**
|
|
12
|
+
* Inserting a block at `step.index` in `step.parentPath`'s child list does
|
|
13
|
+
* not move any position in `{blockId, offset}` space, but it shifts every
|
|
14
|
+
* sibling index `≥ step.index` up by 1. {@link mapChildIndex} consumes this
|
|
15
|
+
* to rebase later `insertNode` / `removeNode` steps that target the same
|
|
16
|
+
* parent.
|
|
17
|
+
*/
|
|
18
|
+
export declare function getMapInsertNode(_doc: Document, step: InsertNodeStep): ChildIndexShiftMap;
|
|
19
|
+
export declare function getMapAddMark(_doc: Document, _step: AddMarkStep): StepMap;
|
|
20
|
+
export declare function getMapRemoveMark(_doc: Document, _step: RemoveMarkStep): StepMap;
|
|
21
|
+
export declare function getMapSetStoredMarks(_doc: Document, _step: SetStoredMarksStep): StepMap;
|
|
22
|
+
export declare function getMapSetBlockType(_doc: Document, _step: SetBlockTypeStep): StepMap;
|
|
23
|
+
export declare function getMapSetNodeAttr(_doc: Document, _step: SetNodeAttrStep): StepMap;
|
|
24
|
+
export declare function getMapSetInlineNodeAttr(_doc: Document, _step: SetInlineNodeAttrStep): StepMap;
|
|
25
|
+
//# sourceMappingURL=StepMaps.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"StepMaps.d.ts","sourceRoot":"","sources":["../../src/state/StepMaps.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,EACN,KAAK,eAAe,EACpB,KAAK,kBAAkB,EAEvB,KAAK,QAAQ,EACb,KAAK,QAAQ,EACb,KAAK,QAAQ,EACb,KAAK,OAAO,EAEZ,MAAM,cAAc,CAAC;AACtB,OAAO,KAAK,EACX,WAAW,EACX,cAAc,EACd,oBAAoB,EACpB,cAAc,EACd,cAAc,EACd,eAAe,EACf,oBAAoB,EACpB,cAAc,EACd,cAAc,EACd,gBAAgB,EAChB,qBAAqB,E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AAE,KAAK,EAAE,eAAe,GAAG,OAAO,CAEjF;AAED,wBAAgB,uBAAuB,CAAC,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,qBAAqB,GAAG,OAAO,CAE7F"}
|
package/dist/state/Steps.d.ts
CHANGED
|
@@ -24,6 +24,19 @@ export interface SplitBlockStep {
|
|
|
24
24
|
readonly blockId: BlockId;
|
|
25
25
|
readonly offset: number;
|
|
26
26
|
readonly newBlockId: BlockId;
|
|
27
|
+
/**
|
|
28
|
+
* Override for the new block's node type. When present, the new block is
|
|
29
|
+
* created with this type instead of inheriting from the target. Populated
|
|
30
|
+
* by {@link invertMergeBlocks} so undo can restore the original source
|
|
31
|
+
* block's identity across cross-type merges.
|
|
32
|
+
*/
|
|
33
|
+
readonly newBlockType?: NodeTypeName;
|
|
34
|
+
/**
|
|
35
|
+
* Override for the new block's attrs. Only consulted when
|
|
36
|
+
* {@link newBlockType} is also present; the override pair is taken
|
|
37
|
+
* as-is (an absent value here means "the source block had no attrs").
|
|
38
|
+
*/
|
|
39
|
+
readonly newBlockAttrs?: BlockAttrs;
|
|
27
40
|
readonly path?: readonly BlockId[];
|
|
28
41
|
}
|
|
29
42
|
export interface MergeBlocksStep {
|
|
@@ -31,8 +44,24 @@ export interface MergeBlocksStep {
|
|
|
31
44
|
readonly targetBlockId: BlockId;
|
|
32
45
|
readonly sourceBlockId: BlockId;
|
|
33
46
|
readonly targetLengthBefore: number;
|
|
47
|
+
/**
|
|
48
|
+
* Source block's node type at merge time. Captured by the builder so the
|
|
49
|
+
* inverse split can restore the source block with its original identity.
|
|
50
|
+
*/
|
|
51
|
+
readonly sourceType?: NodeTypeName;
|
|
52
|
+
/** Source block's attrs at merge time, if any. */
|
|
53
|
+
readonly sourceAttrs?: BlockAttrs;
|
|
34
54
|
readonly path?: readonly BlockId[];
|
|
35
55
|
}
|
|
56
|
+
/**
|
|
57
|
+
* Adds `mark` to every text node in `[from, to)`.
|
|
58
|
+
*
|
|
59
|
+
* **Builder invariant** (enforced by `TransactionBuilder.addMark`): the range
|
|
60
|
+
* carries no text node with a mark of `mark.type`. Steps emitted under this
|
|
61
|
+
* invariant invert exactly to a `RemoveMarkStep` over the same range, so undo
|
|
62
|
+
* cannot strip pre-existing marks. Direct step construction (rare; e.g.
|
|
63
|
+
* middleware) must uphold the same precondition.
|
|
64
|
+
*/
|
|
36
65
|
export interface AddMarkStep {
|
|
37
66
|
readonly type: 'addMark';
|
|
38
67
|
readonly blockId: BlockId;
|
|
@@ -41,6 +70,15 @@ export interface AddMarkStep {
|
|
|
41
70
|
readonly mark: Mark;
|
|
42
71
|
readonly path?: readonly BlockId[];
|
|
43
72
|
}
|
|
73
|
+
/**
|
|
74
|
+
* Removes the mark of `mark.type` from every text node in `[from, to)`.
|
|
75
|
+
*
|
|
76
|
+
* **Builder invariant** (enforced by `TransactionBuilder.removeMark`): every
|
|
77
|
+
* text node in the range carries exactly `mark` (deep equality, including
|
|
78
|
+
* attrs). The `mark` field therefore stores the actual document mark, which
|
|
79
|
+
* the symmetric inverse (`AddMarkStep`) re-adds verbatim, preserving attrs
|
|
80
|
+
* through undo. Direct step construction must uphold the same precondition.
|
|
81
|
+
*/
|
|
44
82
|
export interface RemoveMarkStep {
|
|
45
83
|
readonly type: 'removeMark';
|
|
46
84
|
readonly blockId: BlockId;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Steps.d.ts","sourceRoot":"","sources":["../../src/state/Steps.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,SAAS,EAAE,UAAU,EAAE,IAAI,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACjG,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,C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E,UAAU,CAAC;IACjC,QAAQ,CAAC,IAAI,CAAC,EAAE,SAAS,OAAO,EAAE,CAAC;CACnC;AAED,MAAM,WAAW,qBAAqB;IACrC,QAAQ,CAAC,IAAI,EAAE,mBAAmB,CAAC;IACnC,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;IAC1B,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,KAAK,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC,CAAC,CAAC;IACpE,QAAQ,CAAC,aAAa,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC,CAAC,CAAC;IAC5E,QAAQ,CAAC,IAAI,CAAC,EAAE,SAAS,OAAO,EAAE,CAAC;CACnC;AAED,MAAM,MAAM,IAAI,GACb,cAAc,GACd,cAAc,GACd,cAAc,GACd,eAAe,GACf,WAAW,GACX,cAAc,GACd,kBAAkB,GAClB,gBAAgB,GAChB,cAAc,GACd,cAAc,GACd,eAAe,GACf,oBAAoB,GACpB,oBAAoB,GACpB,qBAAqB,CAAC;AAEzB,MAAM,MAAM,iBAAiB,GAAG,OAAO,GAAG,OAAO,GAAG,SAAS,GAAG,SAAS,GAAG,KAAK,CAAC"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Mark } from '../model/Document.js';
|
|
2
2
|
import { EditorSelection } from '../model/Selection.js';
|
|
3
|
+
import { Mapping, StepMap } from './Mapping.js';
|
|
3
4
|
import { Step, TransactionOrigin } from './Steps.js';
|
|
4
5
|
export interface TransactionMetadata {
|
|
5
6
|
readonly origin: TransactionOrigin;
|
|
@@ -13,8 +14,31 @@ export interface Transaction {
|
|
|
13
14
|
readonly selectionAfter: EditorSelection;
|
|
14
15
|
readonly storedMarksAfter: readonly Mark[] | null;
|
|
15
16
|
readonly metadata: TransactionMetadata;
|
|
17
|
+
/**
|
|
18
|
+
* Composed position-mapping for every step in {@link steps}, in order.
|
|
19
|
+
* Consumers (decorations, selections, history, comments) fold positions
|
|
20
|
+
* through this mapping rather than re-implementing per-step math.
|
|
21
|
+
*
|
|
22
|
+
* Always present, even for selection-only transactions ({@link Mapping.empty}).
|
|
23
|
+
*/
|
|
24
|
+
readonly mapping: Mapping;
|
|
25
|
+
/**
|
|
26
|
+
* Per-step forward {@link StepMap}s in original order, parallel to
|
|
27
|
+
* {@link steps} (one entry per step, including identity maps that
|
|
28
|
+
* {@link mapping} would otherwise filter out).
|
|
29
|
+
*
|
|
30
|
+
* Required by history's step-rebase logic: when an inverse step
|
|
31
|
+
* `inverted.steps[j] = invert(steps[m-1-j])` is rebased after intervening
|
|
32
|
+
* edits, the next inverse `inverted.steps[j+1]` lives in the frame
|
|
33
|
+
* **before** `steps[m-1-j]` was applied, and the rebase mapping must be
|
|
34
|
+
* prepended with `forwardStepMaps[m-1-j]` to span back to that frame.
|
|
35
|
+
* The identity-filtered {@link mapping} loses this index-to-step
|
|
36
|
+
* correlation, so we keep the raw array alongside it.
|
|
37
|
+
*/
|
|
38
|
+
readonly forwardStepMaps: readonly StepMap[];
|
|
16
39
|
}
|
|
17
40
|
export * from './Steps.js';
|
|
18
|
-
export {
|
|
41
|
+
export type { Mapping, MapResult, PositionRange, StepMap, Assoc } from './Mapping.js';
|
|
42
|
+
export { invertStep, invertTransaction, mapStep } from './StepHandlers.js';
|
|
19
43
|
export { TransactionBuilder } from './TransactionBuilder.js';
|
|
20
44
|
//# sourceMappingURL=Transaction.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Transaction.d.ts","sourceRoot":"","sources":["../../src/state/Transaction.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAC;AACjD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAC7D,OAAO,KAAK,EAAE,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AC;IAChC,QAAQ,CAAC,eAAe,EAAE,eAAe,CAAC;IAC1C,QAAQ,CAAC,cAAc,EAAE,eAAe,CAAC;IACzC,QAAQ,CAAC,gBAAgB,EAAE,SAAS,IAAI,EAAE,GAAG,IAAI,CAAC;IAClD,QAAQ,CAAC,QAAQ,EAAE,mBAAmB,CAAC;IACvC;;;;;;OAMG;IACH,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;IAC1B;;;;;;;;;;;;OAYG;IACH,QAAQ,CAAC,eAAe,EAAE,SAAS,OAAO,EAAE,CAAC;CAC7C;AAID,cAAc,YAAY,CAAC;AAC3B,YAAY,EAAE,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,cAAc,CAAC;AACtF,OAAO,EAAE,UAAU,EAAE,iBAAiB,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC3E,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC"}
|
|
@@ -6,6 +6,7 @@ import { Transaction } from './Transaction.js';
|
|
|
6
6
|
/** Fluent API for building transactions. */
|
|
7
7
|
export declare class TransactionBuilder {
|
|
8
8
|
private readonly steps;
|
|
9
|
+
private readonly stepMaps;
|
|
9
10
|
private selection;
|
|
10
11
|
private storedMarks;
|
|
11
12
|
private readonly selectionBefore;
|
|
@@ -24,16 +25,42 @@ export declare class TransactionBuilder {
|
|
|
24
25
|
deleteTextAt(blockId: BlockId, from: number, to: number): this;
|
|
25
26
|
/** Adds a split-block step. Updates workingDoc if available. */
|
|
26
27
|
splitBlock(blockId: BlockId, offset: number, newBlockId: BlockId): this;
|
|
27
|
-
/** Adds a merge-blocks step with explicit targetLengthBefore. Updates workingDoc if available. */
|
|
28
|
-
mergeBlocks(targetBlockId: BlockId, sourceBlockId: BlockId, targetLengthBefore: number): this;
|
|
29
28
|
/**
|
|
30
|
-
*
|
|
31
|
-
*
|
|
29
|
+
* Adds a merge-blocks step with explicit data. Updates workingDoc if available.
|
|
30
|
+
*
|
|
31
|
+
* `sourceType` / `sourceAttrs` snapshot the source block's identity so the
|
|
32
|
+
* inverse split can restore it on undo. Callers that do not know the source
|
|
33
|
+
* identity should prefer {@link mergeBlocksAt}, which derives both from the
|
|
34
|
+
* working document.
|
|
35
|
+
*/
|
|
36
|
+
mergeBlocks(targetBlockId: BlockId, sourceBlockId: BlockId, targetLengthBefore: number, sourceType?: NodeTypeName, sourceAttrs?: BlockAttrs): this;
|
|
37
|
+
/**
|
|
38
|
+
* Merges two blocks, auto-deriving targetLengthBefore and the source
|
|
39
|
+
* block's identity (type + attrs) from the working document. Requires a
|
|
40
|
+
* document to be provided at construction.
|
|
32
41
|
*/
|
|
33
42
|
mergeBlocksAt(targetBlockId: BlockId, sourceBlockId: BlockId): this;
|
|
34
|
-
/**
|
|
43
|
+
/**
|
|
44
|
+
* Emits one `AddMarkStep` per maximal sub-range of `[from, to)` that does
|
|
45
|
+
* not yet carry a mark of `mark.type`. Sub-ranges that already carry the
|
|
46
|
+
* mark type are skipped, so the symmetric inverse never strips a
|
|
47
|
+
* pre-existing mark.
|
|
48
|
+
*
|
|
49
|
+
* Falls back to a single full-range step when no working document is
|
|
50
|
+
* available (e.g. direct construction without a doc, used in low-level
|
|
51
|
+
* tests).
|
|
52
|
+
*/
|
|
35
53
|
addMark(blockId: BlockId, from: number, to: number, mark: Mark): this;
|
|
36
|
-
/**
|
|
54
|
+
/**
|
|
55
|
+
* Emits one `RemoveMarkStep` per maximal sub-range of `[from, to)` that
|
|
56
|
+
* carries a mark of `mark.type`. The step's `mark` is the actual mark
|
|
57
|
+
* found in the document (including attrs), so the symmetric inverse
|
|
58
|
+
* restores it faithfully. Sub-ranges without the mark are skipped.
|
|
59
|
+
*
|
|
60
|
+
* Falls back to a single full-range step when no working document is
|
|
61
|
+
* available (e.g. direct construction without a doc, used in low-level
|
|
62
|
+
* tests).
|
|
63
|
+
*/
|
|
37
64
|
removeMark(blockId: BlockId, from: number, to: number, mark: Mark): this;
|
|
38
65
|
/** Adds a set-block-type step, changing a block's node type and optionally its attrs. */
|
|
39
66
|
setBlockType(blockId: BlockId, nodeType: NodeTypeName, attrs?: BlockAttrs): this;
|
|
@@ -63,7 +90,24 @@ export declare class TransactionBuilder {
|
|
|
63
90
|
private requireDoc;
|
|
64
91
|
/** Finds a block in the document or throws if not found. */
|
|
65
92
|
private requireBlock;
|
|
66
|
-
/**
|
|
93
|
+
/**
|
|
94
|
+
* Returns the resolved block from the working document, or `null` if
|
|
95
|
+
* either the document is unavailable or the block is missing. Used by
|
|
96
|
+
* mark builders that want a working-doc-aware planning pass with a
|
|
97
|
+
* safe fallback when neither precondition holds.
|
|
98
|
+
*/
|
|
99
|
+
private tryGetBlock;
|
|
100
|
+
/**
|
|
101
|
+
* Advances the working document by applying a step and records its
|
|
102
|
+
* position-mapping. The map is computed against the pre-apply document
|
|
103
|
+
* (the only state in which `removeNode` can enumerate descendants), so
|
|
104
|
+
* the order is: getStepMap → applyStep.
|
|
105
|
+
*
|
|
106
|
+
* When no working document is available, falls back to the empty
|
|
107
|
+
* document — all step types except `removeNode` produce a `StepMap`
|
|
108
|
+
* that does not consult the document, and `removeNode` carries its
|
|
109
|
+
* `removedNode` in the step payload, so the fallback is safe.
|
|
110
|
+
*/
|
|
67
111
|
private advanceDoc;
|
|
68
112
|
}
|
|
69
113
|
//# sourceMappingURL=TransactionBuilder.d.ts.map
|
|
@@ -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,QAAQ,EACR,UAAU,EACV,IAAI,EACJ,WAAW,EACX,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"TransactionBuilder.d.ts","sourceRoot":"","sources":["../../src/state/TransactionBuilder.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAC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B,CAAC,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,UAAU,GAAG,IAAI;IAY1E,uFAAuF;IACvF,gBAAgB,CAAC,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,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"}
|
package/dist/test/TestUtils.d.ts
CHANGED
|
@@ -125,6 +125,8 @@ export interface PluginHarnessOptions {
|
|
|
125
125
|
readonly useMiddleware?: boolean;
|
|
126
126
|
/** When true, registers built-in node specs (paragraph) before plugins. */
|
|
127
127
|
readonly builtinSpecs?: boolean;
|
|
128
|
+
/** When true, dispatch notifies plugins via `pm.notifyStateChange()`. */
|
|
129
|
+
readonly notifyStateChange?: boolean;
|
|
128
130
|
}
|
|
129
131
|
/**
|
|
130
132
|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AW,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,IAAI,CAQxF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EditorView.d.ts","sourceRoot":"","sources":["../../src/view/EditorView.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAC7D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AACrE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,iCAAiC,CAAC;AAC3E,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AACjE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAEjE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAC3D,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"EditorView.d.ts","sourceRoot":"","sources":["../../src/view/EditorView.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAC7D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AACrE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,iCAAiC,CAAC;AAC3E,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AACjE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAEjE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAC3D,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAGrD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAK3D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAI9D,MAAM,MAAM,mBAAmB,GAAG,CAC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CAAC,aAAa,CAAgB;IAC9C,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAuB;IAClD,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAmB;gBAE9B,cAAc,EAAE,WAAW,EAAE,OAAO,EAAE,iBAAiB;IAqDnE,wCAAwC;IACxC,QAAQ,IAAI,WAAW;IAIvB;;;;OAIG;IACH,OAAO,CAAC,WAAW;IAmCnB,+DAA+D;IAC/D,QAAQ,CAAC,EAAE,EAAE,WAAW,GAAG,IAAI;IAQ/B,qBAAqB;IACrB,IAAI,IAAI,IAAI;IAOZ,qBAAqB;IACrB,IAAI,IAAI,IAAI;IAOZ,yCAAyC;IACzC,aAAa,CAAC,QAAQ,EAAE,mBAAmB,GAAG,MAAM,IAAI;IAQxD;;;;;;;;;;OAUG;IACH,YAAY,CAAC,QAAQ,EAAE,WAAW,GAAG,IAAI;IAqCzC,iDAAiD;IACjD,aAAa,IAAI,IAAI;IAIrB;;;;;;;;OAQG;IACH,OAAO,CAAC,gBAAgB;IAsBxB,OAAO,CAAC,gBAAgB;IAmBxB,kDAAkD;IAClD,OAAO,IAAI,IAAI;CASf"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@notectl/core",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.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",
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{s as t}from"./StyleRuntime-D3d1XFFe.mjs";import{i as e,n as s,o as i,r as n,t as a}from"./PluginHelpers-D-MvWR98.mjs";var l={alignStart:"Align Start",alignCenter:"Align Center",alignEnd:"Align End",justify:"Justify",toolbarLabel:"Alignment",toolbarTooltip:"Alignment"},o=/* @__PURE__ */Object.assign({"./locales/ar.ts":()=>import("./ar-BsMfhWs5.mjs"),"./locales/de.ts":()=>import("./de-X3BLBlF8.mjs"),"./locales/es.ts":()=>import("./es--xozZF4T.mjs"),"./locales/fr.ts":()=>import("./fr-B4XLxkci.mjs"),"./locales/hi.ts":()=>import("./hi-o8Gsu5Ly.mjs"),"./locales/pt.ts":()=>import("./pt-Bvnb_NpT.mjs"),"./locales/ru.ts":()=>import("./ru-wK2ytv3A.mjs"),"./locales/zh.ts":()=>import("./zh-CicpU0g8.mjs")});async function r(t){return i(o,t,l)}var g={alignments:["start","center","end","justify"],alignableTypes:["paragraph","heading","title","subtitle","table_cell","image"],defaults:{image:"center"}},c={start:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M15 15H3v2h12v-2zm0-8H3v2h12V7zM3 13h18v-2H3v2zm0 8h18v-2H3v2zM3 3v2h18V3H3z"/></svg>',center:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M7 15v2h10v-2H7zm-4 6h18v-2H3v2zm0-8h18v-2H3v2zm4-6v2h10V7H7zM3 3v2h18V3H3z"/></svg>',end:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M3 21h18v-2H3v2zm6-4h12v-2H9v2zm-6-4h18v-2H3v2zm6-4h12V7H9v2zM3 3v2h18V3H3z"/></svg>',justify:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M3 21h18v-2H3v2zm0-4h18v-2H3v2zm0-4h18v-2H3v2zm0-4h18V7H3v2zM3 3v2h18V3H3z"/></svg>'},m=class{id="alignment";name="Alignment";priority=90;config;locale;alignableTypes;constructor(t){this.config={...g,...t,defaults:{...g.defaults,...t?.defaults}}}async init(t){this.locale=await e(t,this.config.locale,l,r),this.alignableTypes=new Set(this.config.alignableTypes),this.patchNodeSpecs(t),this.registerCommands(t),this.registerKeymaps(t),this.registerToolbarItem(t),this.registerMiddleware(t)}patchNodeSpecs(t){const e=t.getSchemaRegistry();for(const s of this.config.alignableTypes){const t=e.getNodeSpec(s);if(!t)continue;if(t.attrs?.align)continue;const i=t.toDOM,n=this.config.defaults[s]??"start";e.removeNodeSpec(s),e.registerNodeSpec({...t,attrs:{...t.attrs,align:{default:n}},toDOM(e){const s=i.call(t,e);return h(s,e),s}})}}registerCommands(t){for(const e of this.config.alignments)t.registerCommand(`align${a(e)}`,()=>this.setAlignment(t,e))}registerKeymaps(t){const e={};this.config.alignments.includes("start")&&(e["Mod-Shift-L"]=()=>t.executeCommand("alignStart")),this.config.alignments.includes("center")&&(e["Mod-Shift-E"]=()=>t.executeCommand("alignCenter")),this.config.alignments.includes("end")&&(e["Mod-Shift-R"]=()=>t.executeCommand("alignEnd")),this.config.alignments.includes("justify")&&(e["Mod-Shift-J"]=()=>t.executeCommand("alignJustify")),Object.keys(e).length>0&&t.registerKeymap(e)}registerToolbarItem(t){const e=this.config.alignments.map(t=>({label:this.getAlignmentLabel(t),command:`align${a(t)}`,icon:c[t]}));t.registerToolbarItem({id:"alignment",group:"block",icon:c.start,label:this.locale.toolbarLabel,tooltip:this.locale.toolbarTooltip,command:"alignStart",popupType:"dropdown",popupConfig:{items:e},isActive:t=>this.isNonDefaultAlignment(t),isEnabled:t=>this.isAlignable(t)})}getAlignmentLabel(t){return{start:this.locale.alignStart,center:this.locale.alignCenter,end:this.locale.alignEnd,justify:this.locale.justify}[t]}registerMiddleware(t){t.registerMiddleware((t,e,s)=>{let i=!1;const n=t.steps.map(t=>{if("setBlockType"!==t.type)return t;if(!this.alignableTypes.has(t.nodeType))return t;const e=t.previousAttrs?.align;return e&&"start"!==e?(i=!0,{...t,attrs:{...t.attrs,align:e}}):t});s(i?{...t,steps:n}:t)},{name:"alignment:preserve-align"})}setAlignment(t,e){const i=t.getState(),a=s(i);if(!a||!this.alignableTypes.has(a.type))return!1;const l=n(i);if(!l)return!1;const o=i.getNodePath(l);if(!o)return!1;const r={...a.attrs,align:e},g=i.transaction("command").setNodeAttr(o,r).setSelection(i.selection).build();return t.dispatch(g),!0}isNonDefaultAlignment(t){const e=s(t);if(!e||!this.alignableTypes.has(e.type))return!1;const i=e.attrs?.align,n=this.config.defaults[e.type]??"start";return null!=i&&i!==n}isAlignable(t){const e=s(t);return null!=e&&this.alignableTypes.has(e.type)}};function h(e,s){const i=s.attrs?.align;"string"==typeof i&&"start"!==i&&t(e,"textAlign",i)}export{r as i,m as n,l as r,c as t};
|
|
2
|
-
//# sourceMappingURL=AlignmentPlugin-bqK6ze-E.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"AlignmentPlugin-bqK6ze-E.mjs","names":[],"sources":["../../src/plugins/alignment/AlignmentLocale.ts","../../src/plugins/alignment/AlignmentPlugin.ts"],"sourcesContent":["/** Locale interface and default English locale for the AlignmentPlugin. */\n\nimport { type LocaleModuleMap, loadLocaleModule } from '../shared/LocaleLoader.js';\n\nexport interface AlignmentLocale {\n\treadonly alignStart: string;\n\treadonly alignCenter: string;\n\treadonly alignEnd: string;\n\treadonly justify: string;\n\treadonly toolbarLabel: string;\n\treadonly toolbarTooltip: string;\n}\n\n// --- Default English Locale ---\n\nexport const ALIGNMENT_LOCALE_EN: AlignmentLocale = {\n\talignStart: 'Align Start',\n\talignCenter: 'Align Center',\n\talignEnd: 'Align End',\n\tjustify: 'Justify',\n\ttoolbarLabel: 'Alignment',\n\ttoolbarTooltip: 'Alignment',\n};\n\n// --- Lazy Locale Loader ---\n\nconst localeModules: LocaleModuleMap<AlignmentLocale> = import.meta.glob<{\n\tdefault: AlignmentLocale;\n}>('./locales/*.ts', { eager: false });\n\nexport async function loadAlignmentLocale(lang: string): Promise<AlignmentLocale> {\n\treturn loadLocaleModule(localeModules, lang, ALIGNMENT_LOCALE_EN);\n}\n","/**\n * AlignmentPlugin: adds start/center/end/justify alignment as a block\n * attribute on paragraphs, headings, images, and other alignable types.\n * Uses logical values (`start`/`end`) instead of physical (`left`/`right`)\n * for correct behavior with RTL text direction. Patches NodeSpecs to render\n * the `align` attribute via inline `text-align` style and provides toggle\n * commands, keyboard shortcuts, and a toolbar dropdown.\n */\n\nimport type { BlockAlignment } from '../../model/BlockAlignment.js';\nimport type { BlockNode } from '../../model/Document.js';\nimport type { BlockId } from '../../model/TypeBrands.js';\nimport type { EditorState } from '../../state/EditorState.js';\nimport { setStyleProperty } from '../../style/StyleRuntime.js';\nimport type { Plugin, PluginContext } from '../Plugin.js';\nimport {\n\tcapitalize,\n\tgetSelectedBlock,\n\tgetSelectedBlockId,\n\tresolveLocale,\n} from '../shared/PluginHelpers.js';\nimport {\n\tALIGNMENT_LOCALE_EN,\n\ttype AlignmentLocale,\n\tloadAlignmentLocale,\n} from './AlignmentLocale.js';\n\n// --- Public Types ---\n\nexport interface AlignmentConfig {\n\t/** Which alignments to expose. Defaults to all four. */\n\treadonly alignments: readonly BlockAlignment[];\n\t/** Block types that support alignment. Defaults to paragraph + heading + title + subtitle + table_cell + image. */\n\treadonly alignableTypes: readonly string[];\n\t/** Per-type default alignment (e.g. `{ image: 'center' }`). Falls back to `'start'`. */\n\treadonly defaults: Readonly<Record<string, BlockAlignment>>;\n\treadonly locale?: AlignmentLocale;\n}\n\n// --- Constants ---\n\nconst DEFAULT_CONFIG: AlignmentConfig = {\n\talignments: ['start', 'center', 'end', 'justify'],\n\talignableTypes: ['paragraph', 'heading', 'title', 'subtitle', 'table_cell', 'image'],\n\tdefaults: { image: 'center' },\n};\n\nexport const ALIGNMENT_ICONS: Readonly<Record<BlockAlignment, string>> = {\n\tstart:\n\t\t'<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\"><path d=\"M15 15H3v2h12v-2zm0-8H3v2h12V7zM3 13h18v-2H3v2zm0 8h18v-2H3v2zM3 3v2h18V3H3z\"/></svg>',\n\tcenter:\n\t\t'<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\"><path d=\"M7 15v2h10v-2H7zm-4 6h18v-2H3v2zm0-8h18v-2H3v2zm4-6v2h10V7H7zM3 3v2h18V3H3z\"/></svg>',\n\tend: '<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\"><path d=\"M3 21h18v-2H3v2zm6-4h12v-2H9v2zm-6-4h18v-2H3v2zm6-4h12V7H9v2zM3 3v2h18V3H3z\"/></svg>',\n\tjustify:\n\t\t'<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\"><path d=\"M3 21h18v-2H3v2zm0-4h18v-2H3v2zm0-4h18v-2H3v2zm0-4h18V7H3v2zM3 3v2h18V3H3z\"/></svg>',\n};\n\n// --- Plugin ---\n\nexport class AlignmentPlugin implements Plugin {\n\treadonly id = 'alignment';\n\treadonly name = 'Alignment';\n\treadonly priority = 90;\n\n\tprivate readonly config: AlignmentConfig;\n\tprivate locale!: AlignmentLocale;\n\tprivate alignableTypes!: ReadonlySet<string>;\n\n\tconstructor(config?: Partial<AlignmentConfig>) {\n\t\tthis.config = {\n\t\t\t...DEFAULT_CONFIG,\n\t\t\t...config,\n\t\t\tdefaults: { ...DEFAULT_CONFIG.defaults, ...config?.defaults },\n\t\t};\n\t}\n\n\tasync init(context: PluginContext): Promise<void> {\n\t\tthis.locale = await resolveLocale(\n\t\t\tcontext,\n\t\t\tthis.config.locale,\n\t\t\tALIGNMENT_LOCALE_EN,\n\t\t\tloadAlignmentLocale,\n\t\t);\n\n\t\tthis.alignableTypes = new Set(this.config.alignableTypes);\n\t\tthis.patchNodeSpecs(context);\n\t\tthis.registerCommands(context);\n\t\tthis.registerKeymaps(context);\n\t\tthis.registerToolbarItem(context);\n\t\tthis.registerMiddleware(context);\n\t}\n\n\t// --- NodeSpec Patching ---\n\n\t/**\n\t * Patches existing NodeSpecs for alignable block types to support the\n\t * `align` attribute and render it as an inline style. Skips types\n\t * that already define an `align` attribute in their spec.\n\t */\n\tprivate patchNodeSpecs(context: PluginContext): void {\n\t\tconst registry = context.getSchemaRegistry();\n\n\t\tfor (const type of this.config.alignableTypes) {\n\t\t\tconst spec = registry.getNodeSpec(type);\n\t\t\tif (!spec) continue;\n\n\t\t\t// Skip types that already declare an `align` attr (e.g. image)\n\t\t\tif (spec.attrs?.align) continue;\n\n\t\t\tconst originalToDOM = spec.toDOM;\n\t\t\tconst defaultAlign: BlockAlignment = this.config.defaults[type] ?? 'start';\n\n\t\t\tregistry.removeNodeSpec(type);\n\t\t\tregistry.registerNodeSpec({\n\t\t\t\t...spec,\n\t\t\t\tattrs: {\n\t\t\t\t\t...spec.attrs,\n\t\t\t\t\talign: { default: defaultAlign },\n\t\t\t\t},\n\t\t\t\ttoDOM(node) {\n\t\t\t\t\tconst el = originalToDOM.call(spec, node);\n\t\t\t\t\tapplyAlignment(el, node);\n\t\t\t\t\treturn el;\n\t\t\t\t},\n\t\t\t});\n\t\t}\n\t}\n\n\t// --- Commands ---\n\n\tprivate registerCommands(context: PluginContext): void {\n\t\tfor (const alignment of this.config.alignments) {\n\t\t\tcontext.registerCommand(`align${capitalize(alignment)}`, () => {\n\t\t\t\treturn this.setAlignment(context, alignment);\n\t\t\t});\n\t\t}\n\t}\n\n\t// --- Keymaps ---\n\n\tprivate registerKeymaps(context: PluginContext): void {\n\t\tconst bindings: Record<string, () => boolean> = {};\n\n\t\tif (this.config.alignments.includes('start')) {\n\t\t\tbindings['Mod-Shift-L'] = () => context.executeCommand('alignStart');\n\t\t}\n\t\tif (this.config.alignments.includes('center')) {\n\t\t\tbindings['Mod-Shift-E'] = () => context.executeCommand('alignCenter');\n\t\t}\n\t\tif (this.config.alignments.includes('end')) {\n\t\t\tbindings['Mod-Shift-R'] = () => context.executeCommand('alignEnd');\n\t\t}\n\t\tif (this.config.alignments.includes('justify')) {\n\t\t\tbindings['Mod-Shift-J'] = () => context.executeCommand('alignJustify');\n\t\t}\n\n\t\tif (Object.keys(bindings).length > 0) {\n\t\t\tcontext.registerKeymap(bindings);\n\t\t}\n\t}\n\n\t// --- Toolbar ---\n\n\tprivate registerToolbarItem(context: PluginContext): void {\n\t\tconst dropdownItems = this.config.alignments.map((alignment) => ({\n\t\t\tlabel: this.getAlignmentLabel(alignment),\n\t\t\tcommand: `align${capitalize(alignment)}`,\n\t\t\ticon: ALIGNMENT_ICONS[alignment],\n\t\t}));\n\n\t\tcontext.registerToolbarItem({\n\t\t\tid: 'alignment',\n\t\t\tgroup: 'block',\n\t\t\ticon: ALIGNMENT_ICONS.start,\n\t\t\tlabel: this.locale.toolbarLabel,\n\t\t\ttooltip: this.locale.toolbarTooltip,\n\t\t\tcommand: 'alignStart',\n\t\t\tpopupType: 'dropdown',\n\t\t\tpopupConfig: { items: dropdownItems },\n\t\t\tisActive: (state) => this.isNonDefaultAlignment(state),\n\t\t\tisEnabled: (state) => this.isAlignable(state),\n\t\t});\n\t}\n\n\tprivate getAlignmentLabel(alignment: BlockAlignment): string {\n\t\tconst labels: Record<BlockAlignment, string> = {\n\t\t\tstart: this.locale.alignStart,\n\t\t\tcenter: this.locale.alignCenter,\n\t\t\tend: this.locale.alignEnd,\n\t\t\tjustify: this.locale.justify,\n\t\t};\n\t\treturn labels[alignment];\n\t}\n\n\t// --- Middleware ---\n\n\t/**\n\t * Preserves the `align` attribute when other plugins change the block\n\t * type (e.g. paragraph → heading) via `setBlockType`, which replaces attrs.\n\t */\n\tprivate registerMiddleware(context: PluginContext): void {\n\t\tcontext.registerMiddleware(\n\t\t\t(tr, _state, next) => {\n\t\t\t\tlet patched = false;\n\n\t\t\t\tconst patchedSteps = tr.steps.map((step) => {\n\t\t\t\t\tif (step.type !== 'setBlockType') return step;\n\t\t\t\t\tif (!this.alignableTypes.has(step.nodeType)) return step;\n\n\t\t\t\t\tconst prevAlign = step.previousAttrs?.align;\n\t\t\t\t\tif (!prevAlign || prevAlign === 'start') return step;\n\n\t\t\t\t\t// Carry forward align into new attrs\n\t\t\t\t\tpatched = true;\n\t\t\t\t\treturn {\n\t\t\t\t\t\t...step,\n\t\t\t\t\t\tattrs: { ...step.attrs, align: prevAlign },\n\t\t\t\t\t};\n\t\t\t\t});\n\n\t\t\t\tnext(patched ? { ...tr, steps: patchedSteps } : tr);\n\t\t\t},\n\t\t\t{ name: 'alignment:preserve-align' },\n\t\t);\n\t}\n\n\t// --- Alignment Logic ---\n\n\tprivate setAlignment(context: PluginContext, alignment: BlockAlignment): boolean {\n\t\tconst state = context.getState();\n\t\tconst block = getSelectedBlock(state);\n\t\tif (!block || !this.alignableTypes.has(block.type)) return false;\n\n\t\tconst id = getSelectedBlockId(state);\n\t\tif (!id) return false;\n\n\t\tconst path = state.getNodePath(id);\n\t\tif (!path) return false;\n\n\t\tconst newAttrs = { ...block.attrs, align: alignment };\n\n\t\tconst tr = state\n\t\t\t.transaction('command')\n\t\t\t.setNodeAttr(path as BlockId[], newAttrs)\n\t\t\t.setSelection(state.selection)\n\t\t\t.build();\n\n\t\tcontext.dispatch(tr);\n\t\treturn true;\n\t}\n\n\tprivate isNonDefaultAlignment(state: EditorState): boolean {\n\t\tconst block = getSelectedBlock(state);\n\t\tif (!block || !this.alignableTypes.has(block.type)) return false;\n\t\tconst align = block.attrs?.align;\n\t\tconst defaultAlign: BlockAlignment = this.config.defaults[block.type] ?? 'start';\n\t\treturn align != null && align !== defaultAlign;\n\t}\n\n\tprivate isAlignable(state: EditorState): boolean {\n\t\tconst block = getSelectedBlock(state);\n\t\treturn block != null && this.alignableTypes.has(block.type);\n\t}\n}\n\n// --- Helpers ---\n\nfunction applyAlignment(el: HTMLElement, node: BlockNode): void {\n\tconst align = node.attrs?.align;\n\tif (typeof align === 'string' && align !== 'start') {\n\t\tsetStyleProperty(el, 'textAlign', align);\n\t}\n}\n"],"mappings":"6HAeA,IAAa,EAAuC,CACnD,WAAY,cACZ,YAAa,eACb,SAAU,YACV,QAAS,UACT,aAAc,YACd,eAAgB,aAKX,iBAAkD,OAAA,OAAA,CAAA,kBAAA,IAAA,OAAA,qBAAA,kBAAA,IAAA,OAAA,qBAAA,kBAAA,IAAA,OAAA,qBAAA,kBAAA,IAAA,OAAA,qBAAA,kBAAA,IAAA,OAAA,qBAAA,kBAAA,IAAA,OAAA,qBAA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YAAA,CAAqB,EAAwB,GAC5C,MAAM,EAAQ,EAAQ,WAChB,EAAQ,EAAiB,GAC/B,IAAK,IAAU,KAAK,eAAe,IAAI,EAAM,MAAO,OAAO,EAE3D,MAAM,EAAK,EAAmB,GAC9B,IAAK,EAAI,OAAO,EAEhB,MAAM,EAAO,EAAM,YAAY,GAC/B,IAAK,EAAM,OAAO,EAElB,MAAM,EAAW,IAAK,EAAM,MAAO,MAAO,GAEpC,EAAK,EACT,YAAY,WACZ,YAAY,EAAmB,GAC/B,aAAa,EAAM,WACnB,QAGF,OADA,EAAQ,SAAS,IACV,EAGR,qBAAA,CAA8B,GAC7B,MAAM,EAAQ,EAAiB,GAC/B,IAAK,IAAU,KAAK,eAAe,IAAI,EAAM,MAAO,OAAO,EAC3D,MAAM,EAAQ,EAAM,OAAO,MACrB,EAA+B,KAAK,OAAO,SAAS,EAAM,OAAS,QACzE,OAAgB,MAAT,GAAiB,IAAU,EAGnC,WAAA,CAAoB,GACnB,MAAM,EAAQ,EAAiB,GAC/B,OAAgB,MAAT,GAAiB,KAAK,eAAe,IAAI,EAAM,QAMxD,SAAS,EAAe,EAAiB,GACxC,MAAM,EAAQ,EAAK,OAAO,MACL,iBAAV,GAAgC,UAAV,GAChC,EAAiB,EAAI,YAAa"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"AttrRegistry-nDKtHK87.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,EAIlC,SAAgB,EACf,EACA,GAEA,OAAQ,EAAK,OAAoB,EAelC,SAAgB,EACf,EACA,GAKA,OAAO,EAAa,IAAU,EAAK,aAA0B"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{S as t,f as n,g as o,v as r}from"./Document-_qdGR4vh.mjs";import{d as e,o as s,u as c}from"./Selection-aeiSsvhe.mjs";import{i}from"./TypeBrands-BZDKMjR-.mjs";import{n as a}from"./AttrRegistry-nDKtHK87.mjs";import{n as l}from"./RangeIterator-DytL1lUT.mjs";function f(t,o){const r=t.selection;if(!c(r))return null;const a=i(o.type);if(s(r)){const e=t.getBlock(r.anchor.blockId);if(!e)return null;const s=[...(t.storedMarks??n(e,r.anchor.offset)).filter(t=>t.type!==a),o];return t.transaction("command").setStoredMarks(s,t.storedMarks).setSelection(r).build()}const f=e(r,t.getBlockOrder()),u=t.transaction("command");return l(t,f,(n,r,e)=>{const s=t.getBlock(n);if(s){const t=k(s,a,r,e);t&&u.removeMark(n,r,e,t)}u.addMark(n,r,e,o)}),u.setSelection(r),u.build()}function u(t,o){const i=t.selection;if(!c(i))return null;if(s(i)){const e=t.getBlock(i.anchor.blockId);if(!e)return null;const s=t.storedMarks??n(e,i.anchor.offset);if(!r(s,o))return null;const c=s.filter(t=>t.type!==o);return t.transaction("command").setStoredMarks(c,t.storedMarks).setSelection(i).build()}const a=e(i,t.getBlockOrder()),f=t.transaction("command");return l(t,a,(n,r,e)=>{const s=t.getBlock(n),c=s?k(s,o,r,e):void 0;f.removeMark(n,r,e,c??{type:o})}),f.setSelection(i),f.build()}function d(t,o,r){const e=t.selection;if(!c(e))return null;if(s(e)&&t.storedMarks){const n=t.storedMarks.find(t=>t.type===o);return n&&a(n,o)?r(n):null}const i=t.getBlock(e.anchor.blockId);if(!i)return null;const l=n(i,e.anchor.offset).find(t=>t.type===o);return l&&a(l,o)?r(l):null}function m(t,n){return null!==d(t,n,()=>!0)}function k(n,r,e,s){const c=o(n);let i=0;for(const o of c){if(!t(o)){i+=1;continue}const n=i+o.text.length;if(n>e&&i<s){const t=o.marks.find(t=>t.type===r);if(t)return t}i=n}}export{u as i,d as n,m as r,f as t};
|
|
2
|
-
//# sourceMappingURL=AttributedMarkCommands-35jTbVRg.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"AttributedMarkCommands-35jTbVRg.mjs","names":[],"sources":["../../src/commands/AttributedMarkCommands.ts"],"sourcesContent":["/**\n * Generic helpers for attributed marks (marks with key/value attrs).\n *\n * Unlike boolean marks (`bold`, `italic`) that toggle on/off, attributed\n * marks (`font`, `fontSize`, `textColor`, `highlight`) carry data and use\n * **replace** semantics: applying a new value removes the old one first.\n *\n * These helpers extract the duplicated collapsed-vs-range branching that\n * was previously copy-pasted across ColorMarkOperations, FontSizeOperations,\n * and FontPlugin.\n */\n\nimport { isMarkOfType } from '../model/AttrRegistry.js';\nimport type { MarkAttrRegistry } from '../model/AttrRegistry.js';\nimport type { BlockNode, Mark, TextNode } from '../model/Document.js';\nimport {\n\tgetBlockMarksAtOffset,\n\tgetInlineChildren,\n\thasMark,\n\tisTextNode,\n} from '../model/Document.js';\nimport type { InlineNode } from '../model/Document.js';\nimport { isCollapsed, isTextSelection, selectionRange } from '../model/Selection.js';\nimport { markType } from '../model/TypeBrands.js';\nimport type { MarkTypeName } from '../model/TypeBrands.js';\nimport type { EditorState } from '../state/EditorState.js';\nimport type { Transaction } from '../state/Transaction.js';\nimport { forEachBlockInRange } from './RangeIterator.js';\n\n/**\n * Applies an attributed mark to the current selection.\n *\n * - **Collapsed cursor**: replaces stored marks (filters out old mark of the\n * same type, appends the new one).\n * - **Range selection**: removes then re-adds the mark in every block span.\n *\n * Returns the built `Transaction`, or `null` when the selection is\n * unsupported (node-selection / gap-cursor) or the anchor block is missing.\n */\nexport function applyAttributedMark(state: EditorState, mark: Mark): Transaction | null {\n\tconst sel = state.selection;\n\tif (!isTextSelection(sel)) return null;\n\n\tconst typeName: MarkTypeName = markType(mark.type as string);\n\n\tif (isCollapsed(sel)) {\n\t\tconst anchorBlock = state.getBlock(sel.anchor.blockId);\n\t\tif (!anchorBlock) return null;\n\t\tconst currentMarks: readonly Mark[] =\n\t\t\tstate.storedMarks ?? getBlockMarksAtOffset(anchorBlock, sel.anchor.offset);\n\t\tconst withoutMark: readonly Mark[] = currentMarks.filter((m) => m.type !== typeName);\n\t\tconst newMarks: readonly Mark[] = [...withoutMark, mark];\n\n\t\treturn state\n\t\t\t.transaction('command')\n\t\t\t.setStoredMarks(newMarks, state.storedMarks)\n\t\t\t.setSelection(sel)\n\t\t\t.build();\n\t}\n\n\tconst range = selectionRange(sel, state.getBlockOrder());\n\tconst builder = state.transaction('command');\n\n\tforEachBlockInRange(state, range, (blockId, from, to) => {\n\t\tconst block: BlockNode | undefined = state.getBlock(blockId);\n\t\tif (block) {\n\t\t\tconst existing: Mark | undefined = findMarkInRange(block, typeName, from, to);\n\t\t\tif (existing) {\n\t\t\t\tbuilder.removeMark(blockId, from, to, existing);\n\t\t\t}\n\t\t}\n\t\tbuilder.addMark(blockId, from, to, mark);\n\t});\n\n\tbuilder.setSelection(sel);\n\treturn builder.build();\n}\n\n/**\n * Removes an attributed mark from the current selection.\n *\n * - **Collapsed cursor**: filters the mark out of stored marks.\n * Returns `null` when the mark was not present.\n * - **Range selection**: removes the mark across all block spans.\n *\n * Returns the built `Transaction`, or `null` when the selection is\n * unsupported or the mark is absent at a collapsed cursor.\n */\nexport function removeAttributedMark(\n\tstate: EditorState,\n\tmarkTypeName: MarkTypeName,\n): Transaction | null {\n\tconst sel = state.selection;\n\tif (!isTextSelection(sel)) return null;\n\n\tif (isCollapsed(sel)) {\n\t\tconst anchorBlock = state.getBlock(sel.anchor.blockId);\n\t\tif (!anchorBlock) return null;\n\t\tconst currentMarks: readonly Mark[] =\n\t\t\tstate.storedMarks ?? getBlockMarksAtOffset(anchorBlock, sel.anchor.offset);\n\t\tif (!hasMark(currentMarks, markTypeName)) return null;\n\n\t\tconst newMarks: readonly Mark[] = currentMarks.filter((m) => m.type !== markTypeName);\n\t\treturn state\n\t\t\t.transaction('command')\n\t\t\t.setStoredMarks(newMarks, state.storedMarks)\n\t\t\t.setSelection(sel)\n\t\t\t.build();\n\t}\n\n\tconst range = selectionRange(sel, state.getBlockOrder());\n\tconst builder = state.transaction('command');\n\n\tforEachBlockInRange(state, range, (blockId, from, to) => {\n\t\tconst block: BlockNode | undefined = state.getBlock(blockId);\n\t\tconst existing: Mark | undefined = block\n\t\t\t? findMarkInRange(block, markTypeName, from, to)\n\t\t\t: undefined;\n\t\tbuilder.removeMark(blockId, from, to, existing ?? { type: markTypeName });\n\t});\n\n\tbuilder.setSelection(sel);\n\treturn builder.build();\n}\n\n/**\n * Extracts a typed attribute value from the mark at the current selection.\n *\n * Looks at stored marks (collapsed w/ stored), block marks at cursor offset\n * (collapsed w/o stored), or anchor-block marks (range).\n *\n * @param extractFn — Narrows the found mark and returns the desired value,\n * or `null` when the mark's attrs don't match expectations.\n */\nexport function getMarkAttrAtSelection<K extends keyof MarkAttrRegistry, V>(\n\tstate: EditorState,\n\tmarkTypeName: K,\n\textractFn: (mark: Mark & { readonly type: K; readonly attrs: MarkAttrRegistry[K] }) => V | null,\n): V | null {\n\tconst sel = state.selection;\n\tif (!isTextSelection(sel)) return null;\n\n\tif (isCollapsed(sel) && state.storedMarks) {\n\t\tconst found = state.storedMarks.find((m) => (m.type as string) === markTypeName);\n\t\treturn found && isMarkOfType(found, markTypeName) ? extractFn(found) : null;\n\t}\n\n\tconst block = state.getBlock(sel.anchor.blockId);\n\tif (!block) return null;\n\tconst marks: readonly Mark[] = getBlockMarksAtOffset(block, sel.anchor.offset);\n\tconst found = marks.find((m) => (m.type as string) === markTypeName);\n\treturn found && isMarkOfType(found, markTypeName) ? extractFn(found) : null;\n}\n\n/**\n * Returns `true` when the given attributed mark type is present at the\n * current selection (collapsed or range).\n */\nexport function isAttributedMarkActive<K extends keyof MarkAttrRegistry>(\n\tstate: EditorState,\n\tmarkTypeName: K,\n): boolean {\n\treturn getMarkAttrAtSelection(state, markTypeName, () => true as const) !== null;\n}\n\n/**\n * Finds the first mark of the given type within an offset range of a block.\n *\n * Returns the full mark (including attrs) so callers can pass it to\n * `removeMark` for correct undo inversion, or `undefined` when absent.\n */\nfunction findMarkInRange(\n\tblock: BlockNode,\n\ttypeName: MarkTypeName,\n\tfrom: number,\n\tto: number,\n): Mark | undefined {\n\tconst children: readonly (TextNode | InlineNode)[] = getInlineChildren(block);\n\tlet pos = 0;\n\n\tfor (const child of children) {\n\t\tif (!isTextNode(child)) {\n\t\t\tpos += 1;\n\t\t\tcontinue;\n\t\t}\n\t\tconst nodeEnd: number = pos + child.text.length;\n\t\tif (nodeEnd > from && pos < to) {\n\t\t\tconst found: Mark | undefined = child.marks.find((m) => m.type === typeName);\n\t\t\tif (found) return found;\n\t\t}\n\t\tpos = nodeEnd;\n\t}\n\treturn undefined;\n}\n"],"mappings":"sQAuCA,SAAgB,EAAoB,EAAoB,GACvD,MAAM,EAAM,EAAM,UAClB,IAAK,EAAgB,GAAM,OAAO,KAElC,MAAM,EAAyB,EAAS,EAAK,MAE7C,GAAI,EAAY,GAAM,CACrB,MAAM,EAAc,EAAM,SAAS,EAAI,OAAO,SAC9C,IAAK,EAAa,OAAO,KAIzB,MAAM,EAA4B,KAFjC,EAAM,aAAe,EAAsB,EAAa,EAAI,OAAO,SAClB,OAAQ,GAAM,EAAE,OAAS,GACxB,GAEnD,OAAO,EACL,YAAY,WACZ,eAAe,EAAU,EAAM,aAC/B,aAAa,GACb,QAGH,MAAM,EAAQ,EAAe,EAAK,EAAM,iBAClC,EAAU,EAAM,YAAY,WAclC,OAZA,EAAoB,EAAO,EAAA,CAAQ,EAAS,EAAM,KACjD,MAAM,EAA+B,EAAM,SAAS,GACpD,GAAI,EAAO,CACV,MAAM,EAA6B,EAAgB,EAAO,EAAU,EAAM,GACtE,GACH,EAAQ,WAAW,EAAS,EAAM,EAAI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D,SAAS,EACR,EACA,EACA,EACA,GAEA,MAAM,EAA+C,EAAkB,GACvE,IAAI,EAAM,EAEV,IAAK,MAAM,KAAS,EAAU,CAC7B,IAAK,EAAW,GAAQ,CACvB,GAAO,EACP,SAED,MAAM,EAAkB,EAAM,EAAM,KAAK,OACzC,GAAI,EAAU,GAAQ,EAAM,EAAI,CAC/B,MAAM,EAA0B,EAAM,MAAM,KAAM,GAAM,EAAE,OAAS,GACnE,GAAI,EAAO,OAAO,EAEnB,EAAM"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{o as i,u as t}from"./Selection-aeiSsvhe.mjs";import{i as e}from"./TypeBrands-BZDKMjR-.mjs";import{r as o}from"./HTMLUtils-brwcaufP.mjs";import{i as n,r,t as s}from"./AttributedMarkCommands-35jTbVRg.mjs";import{i as l,n as a,o as m}from"./PluginHelpers-D-MvWR98.mjs";import{t as c}from"./ShortcutFormatting-DE6B8iGs.mjs";import{t as d}from"./DirectionIcons-CfaDcQ9a.mjs";import{t as g}from"./TextDirectionService-DY4M8EwU.mjs";var p={inlineLTR:"Inline LTR",inlineRTL:"Inline RTL",inlineAuto:"Inline Auto",inlineLabel:"Inline Direction",inlineTooltip:"Inline Direction",announceRemoveBidi:"Inline direction isolation removed"},u=/* @__PURE__ */Object.assign({"./locales/ar.ts":()=>import("./ar-CARMr30L.mjs"),"./locales/de.ts":()=>import("./de-D0BPSP3j.mjs"),"./locales/es.ts":()=>import("./es-2BjtTusm.mjs"),"./locales/fr.ts":()=>import("./fr-DxNdsa11.mjs"),"./locales/hi.ts":()=>import("./hi-ObZRwITd.mjs"),"./locales/pt.ts":()=>import("./pt-DzFyGwB4.mjs"),"./locales/ru.ts":()=>import("./ru-CcFX97-2.mjs"),"./locales/zh.ts":()=>import("./zh-DdJA-AEY.mjs")});async function h(i){return m(u,i,p)}var B=class{id="bidi-isolation";name="Bidi Isolation";priority=92;config;locale;constructor(i){this.config={...i}}async init(i){this.locale=await l(i,this.config.locale,p,h),this.registerBdiMark(i),this.registerCommands(i),this.registerKeymaps(i),this.registerInlineToolbarItem(i)}registerBdiMark(i){i.registerMarkSpec({type:"bdi",rank:10,attrs:{dir:{default:"auto"}},toDOM(i){const t=document.createElement("bdi"),e=String(i.attrs?.dir??"auto");return t.setAttribute("dir",e),t},toHTMLString:(i,t)=>`<bdi dir="${o(String(i.attrs?.dir??"auto"))}">${t}</bdi>`,parseHTML:[{tag:"bdi",getAttrs:i=>{const t=i.getAttribute("dir");return"ltr"===t||"rtl"===t?{dir:t}:{dir:"auto"}}}],sanitize:{tags:["bdi"],attrs:["dir"]}})}registerCommands(i){i.registerCommand("toggleBidiLTR",()=>{const t=this.applyBdi(i,"ltr");return t&&i.announce(this.locale.inlineLTR),t}),i.registerCommand("toggleBidiRTL",()=>{const t=this.applyBdi(i,"rtl");return t&&i.announce(this.locale.inlineRTL),t}),i.registerCommand("toggleBidiAuto",()=>{const t=this.applyBdi(i,"auto");return t&&i.announce(this.locale.inlineAuto),t}),i.registerCommand("removeBidi",()=>{const t=this.removeBdi(i);return t&&i.announce(this.locale.announceRemoveBidi),t}),i.registerCommand("toggleBidiIsolation",()=>this.toggleBidiIsolation(i))}registerKeymaps(i){i.registerKeymap({"Mod-Shift-B":()=>i.executeCommand("toggleBidiIsolation")})}registerInlineToolbarItem(e){const o=[{label:this.locale.inlineLTR,command:"toggleBidiLTR",icon:d.ltr},{label:this.locale.inlineRTL,command:"toggleBidiRTL",icon:d.rtl},{label:this.locale.inlineAuto,command:"toggleBidiAuto",icon:d.auto},{label:this.locale.announceRemoveBidi,command:"removeBidi"}];e.registerToolbarItem({id:"inline-direction",group:"format",icon:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M10 4v7h2V4h2v7h2V4h1V2H10a3 3 0 1 0 0 6zm-3.5 9.5L3 17l3.5 3.5V18h3v-2h-3v-2.5zm14 0L17 17l3.5 3.5V18h-3v-2h3v-2.5zM11 16h2v6h-2z"/></svg>',label:this.locale.inlineLabel,tooltip:`${this.locale.inlineTooltip} (${c("Mod-Shift-B")})`,command:"toggleBidiIsolation",popupType:"dropdown",popupConfig:{items:o},isActive:i=>r(i,"bdi"),isEnabled:e=>{const o=e.selection;return t(o)&&!i(o)}})}toggleBidiIsolation(i){const t=i.getState();if(r(t,"bdi")){const t=this.removeBdi(i);return t&&i.announce(this.locale.announceRemoveBidi),t}const e=a(t),o=i.getService(g),n="rtl"===(e&&o?o.getBlockDir(e):"auto")?"ltr":"rtl",s=this.applyBdi(i,n);if(s){const t="ltr"===n?this.locale.inlineLTR:this.locale.inlineRTL;i.announce(t)}return s}applyBdi(i,t){const o=s(i.getState(),{type:e("bdi"),attrs:{dir:t}});return!!o&&(i.dispatch(o),!0)}removeBdi(i){const t=n(i.getState(),e("bdi"));return!!t&&(i.dispatch(t),!0)}};export{p as n,h as r,B as t};
|
|
2
|
-
//# sourceMappingURL=BidiIsolationPlugin-SIKxfWXp.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"BidiIsolationPlugin-SIKxfWXp.mjs","names":[],"sources":["../../src/plugins/bidi-isolation/BidiIsolationLocale.ts","../../src/plugins/bidi-isolation/BidiIsolationPlugin.ts"],"sourcesContent":["/** Locale interface and default English locale for the BidiIsolationPlugin. */\n\nimport { type LocaleModuleMap, loadLocaleModule } from '../shared/LocaleLoader.js';\n\nexport interface BidiIsolationLocale {\n\treadonly inlineLTR: string;\n\treadonly inlineRTL: string;\n\treadonly inlineAuto: string;\n\treadonly inlineLabel: string;\n\treadonly inlineTooltip: string;\n\treadonly announceRemoveBidi: string;\n}\n\nexport const BIDI_ISOLATION_LOCALE_EN: BidiIsolationLocale = {\n\tinlineLTR: 'Inline LTR',\n\tinlineRTL: 'Inline RTL',\n\tinlineAuto: 'Inline Auto',\n\tinlineLabel: 'Inline Direction',\n\tinlineTooltip: 'Inline Direction',\n\tannounceRemoveBidi: 'Inline direction isolation removed',\n};\n\nconst localeModules: LocaleModuleMap<BidiIsolationLocale> = import.meta.glob<{\n\tdefault: BidiIsolationLocale;\n}>('./locales/*.ts', { eager: false });\n\nexport async function loadBidiIsolationLocale(lang: string): Promise<BidiIsolationLocale> {\n\treturn loadLocaleModule(localeModules, lang, BIDI_ISOLATION_LOCALE_EN);\n}\n","/**\n * Inline bidi isolation plugin: registers a `<bdi>` mark and the inline\n * commands / toolbar / keymap that wrap selected text in a `<bdi>` element\n * with an explicit `dir` attribute.\n *\n * Use alongside {@link TextDirectionPlugin} for the full RTL story:\n * block-level direction lives there, the optional `TextDirectionService`\n * lets this plugin pick the inline direction opposite to the block direction\n * in `toggleBidiIsolation`. Without `TextDirectionPlugin`, this plugin\n * still works — `toggleBidiIsolation` falls back to applying `'rtl'`.\n */\n\nimport {\n\tapplyAttributedMark,\n\tisAttributedMarkActive,\n\tremoveAttributedMark,\n} from '../../commands/AttributedMarkCommands.js';\nimport { escapeHTML } from '../../model/HTMLUtils.js';\nimport { isCollapsed, isTextSelection } from '../../model/Selection.js';\nimport { markType } from '../../model/TypeBrands.js';\nimport type { Plugin, PluginContext } from '../Plugin.js';\nimport { getSelectedBlock, resolveLocale } from '../shared/PluginHelpers.js';\nimport { formatShortcut } from '../shared/ShortcutFormatting.js';\nimport { DIRECTION_ICONS } from '../text-direction/DirectionIcons.js';\nimport {\n\tTEXT_DIRECTION_SERVICE_KEY,\n\ttype TextDirection,\n\ttype TextDirectionService,\n} from '../text-direction/TextDirectionService.js';\nimport {\n\tBIDI_ISOLATION_LOCALE_EN,\n\ttype BidiIsolationLocale,\n\tloadBidiIsolationLocale,\n} from './BidiIsolationLocale.js';\n\ndeclare module '../../model/AttrRegistry.js' {\n\tinterface MarkAttrRegistry {\n\t\tbdi: { dir: 'ltr' | 'rtl' | 'auto' };\n\t}\n}\n\nexport interface BidiIsolationConfig {\n\treadonly locale?: BidiIsolationLocale;\n}\n\nconst INLINE_BDI_ICON: string =\n\t'<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\"><path d=\"M10 4v7h2V4h2v7h2V4h1V2H10a3 3 0 1 0 0 6zm-3.5 9.5L3 17l3.5 3.5V18h3v-2h-3v-2.5zm14 0L17 17l3.5 3.5V18h-3v-2h3v-2.5zM11 16h2v6h-2z\"/></svg>';\n\nexport class BidiIsolationPlugin implements Plugin {\n\treadonly id = 'bidi-isolation';\n\treadonly name = 'Bidi Isolation';\n\treadonly priority = 92;\n\n\tprivate readonly config: BidiIsolationConfig;\n\tprivate locale!: BidiIsolationLocale;\n\n\tconstructor(config?: Partial<BidiIsolationConfig>) {\n\t\tthis.config = { ...config };\n\t}\n\n\tasync init(context: PluginContext): Promise<void> {\n\t\tthis.locale = await resolveLocale(\n\t\t\tcontext,\n\t\t\tthis.config.locale,\n\t\t\tBIDI_ISOLATION_LOCALE_EN,\n\t\t\tloadBidiIsolationLocale,\n\t\t);\n\n\t\tthis.registerBdiMark(context);\n\t\tthis.registerCommands(context);\n\t\tthis.registerKeymaps(context);\n\t\tthis.registerInlineToolbarItem(context);\n\t}\n\n\tprivate registerBdiMark(context: PluginContext): void {\n\t\tcontext.registerMarkSpec({\n\t\t\ttype: 'bdi',\n\t\t\trank: 10,\n\t\t\tattrs: {\n\t\t\t\tdir: { default: 'auto' },\n\t\t\t},\n\t\t\ttoDOM(mark) {\n\t\t\t\tconst el: HTMLElement = document.createElement('bdi');\n\t\t\t\tconst dir: string = String(mark.attrs?.dir ?? 'auto');\n\t\t\t\tel.setAttribute('dir', dir);\n\t\t\t\treturn el;\n\t\t\t},\n\t\t\ttoHTMLString: (mark, content) => {\n\t\t\t\tconst dir: string = escapeHTML(String(mark.attrs?.dir ?? 'auto'));\n\t\t\t\treturn `<bdi dir=\"${dir}\">${content}</bdi>`;\n\t\t\t},\n\t\t\tparseHTML: [\n\t\t\t\t{\n\t\t\t\t\ttag: 'bdi',\n\t\t\t\t\tgetAttrs: (el) => {\n\t\t\t\t\t\tconst dir: string | null = el.getAttribute('dir');\n\t\t\t\t\t\tif (dir === 'ltr' || dir === 'rtl') return { dir };\n\t\t\t\t\t\treturn { dir: 'auto' };\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t],\n\t\t\tsanitize: { tags: ['bdi'], attrs: ['dir'] },\n\t\t});\n\t}\n\n\tprivate registerCommands(context: PluginContext): void {\n\t\tcontext.registerCommand('toggleBidiLTR', () => {\n\t\t\tconst result: boolean = this.applyBdi(context, 'ltr');\n\t\t\tif (result) context.announce(this.locale.inlineLTR);\n\t\t\treturn result;\n\t\t});\n\n\t\tcontext.registerCommand('toggleBidiRTL', () => {\n\t\t\tconst result: boolean = this.applyBdi(context, 'rtl');\n\t\t\tif (result) context.announce(this.locale.inlineRTL);\n\t\t\treturn result;\n\t\t});\n\n\t\tcontext.registerCommand('toggleBidiAuto', () => {\n\t\t\tconst result: boolean = this.applyBdi(context, 'auto');\n\t\t\tif (result) context.announce(this.locale.inlineAuto);\n\t\t\treturn result;\n\t\t});\n\n\t\tcontext.registerCommand('removeBidi', () => {\n\t\t\tconst result: boolean = this.removeBdi(context);\n\t\t\tif (result) context.announce(this.locale.announceRemoveBidi);\n\t\t\treturn result;\n\t\t});\n\n\t\tcontext.registerCommand('toggleBidiIsolation', () => {\n\t\t\treturn this.toggleBidiIsolation(context);\n\t\t});\n\t}\n\n\tprivate registerKeymaps(context: PluginContext): void {\n\t\tcontext.registerKeymap({\n\t\t\t'Mod-Shift-B': () => context.executeCommand('toggleBidiIsolation'),\n\t\t});\n\t}\n\n\tprivate registerInlineToolbarItem(context: PluginContext): void {\n\t\tconst inlineItems = [\n\t\t\t{ label: this.locale.inlineLTR, command: 'toggleBidiLTR', icon: DIRECTION_ICONS.ltr },\n\t\t\t{ label: this.locale.inlineRTL, command: 'toggleBidiRTL', icon: DIRECTION_ICONS.rtl },\n\t\t\t{ label: this.locale.inlineAuto, command: 'toggleBidiAuto', icon: DIRECTION_ICONS.auto },\n\t\t\t{ label: this.locale.announceRemoveBidi, command: 'removeBidi' },\n\t\t];\n\n\t\tcontext.registerToolbarItem({\n\t\t\tid: 'inline-direction',\n\t\t\tgroup: 'format',\n\t\t\ticon: INLINE_BDI_ICON,\n\t\t\tlabel: this.locale.inlineLabel,\n\t\t\ttooltip: `${this.locale.inlineTooltip} (${formatShortcut('Mod-Shift-B')})`,\n\t\t\tcommand: 'toggleBidiIsolation',\n\t\t\tpopupType: 'dropdown',\n\t\t\tpopupConfig: { items: inlineItems },\n\t\t\tisActive: (state) => isAttributedMarkActive(state, 'bdi'),\n\t\t\tisEnabled: (state) => {\n\t\t\t\tconst sel = state.selection;\n\t\t\t\treturn isTextSelection(sel) && !isCollapsed(sel);\n\t\t\t},\n\t\t});\n\t}\n\n\t/**\n\t * Cycles inline bidi isolation: no-bdi → bdi (opposite of block dir) →\n\t * remove. When the {@link TextDirectionService} is registered, picks the\n\t * direction opposite to the current block; otherwise defaults to `'rtl'`.\n\t */\n\tprivate toggleBidiIsolation(context: PluginContext): boolean {\n\t\tconst state = context.getState();\n\t\tif (isAttributedMarkActive(state, 'bdi')) {\n\t\t\tconst result: boolean = this.removeBdi(context);\n\t\t\tif (result) context.announce(this.locale.announceRemoveBidi);\n\t\t\treturn result;\n\t\t}\n\n\t\tconst block = getSelectedBlock(state);\n\t\tconst directionService: TextDirectionService | undefined = context.getService(\n\t\t\tTEXT_DIRECTION_SERVICE_KEY,\n\t\t);\n\t\tconst blockDir: TextDirection =\n\t\t\tblock && directionService ? directionService.getBlockDir(block) : 'auto';\n\t\tconst bdiDir: TextDirection = blockDir === 'rtl' ? 'ltr' : 'rtl';\n\n\t\tconst result: boolean = this.applyBdi(context, bdiDir);\n\t\tif (result) {\n\t\t\tconst announcement: string = bdiDir === 'ltr' ? this.locale.inlineLTR : this.locale.inlineRTL;\n\t\t\tcontext.announce(announcement);\n\t\t}\n\t\treturn result;\n\t}\n\n\tprivate applyBdi(context: PluginContext, dir: TextDirection): boolean {\n\t\tconst state = context.getState();\n\t\tconst mark = { type: markType('bdi'), attrs: { dir } };\n\t\tconst tr = applyAttributedMark(state, mark);\n\t\tif (!tr) return false;\n\t\tcontext.dispatch(tr);\n\t\treturn true;\n\t}\n\n\tprivate removeBdi(context: PluginContext): boolean {\n\t\tconst state = context.getState();\n\t\tconst tr = removeAttributedMark(state, markType('bdi'));\n\t\tif (!tr) return false;\n\t\tcontext.dispatch(tr);\n\t\treturn true;\n\t}\n}\n"],"mappings":"ibAaA,IAAa,EAAgD,CAC5D,UAAW,aACX,UAAW,aACX,WAAY,cACZ,YAAa,mBACb,cAAe,mBACf,mBAAoB,sCAGf,iBAAsD,OAAA,OAAA,CAAA,kBAAA,IAAA,OAAA,qBAAA,kBAAA,IAAA,OAAA,qBAAA,kBAAA,IAAA,OAAA,qBAAA,kBAAA,IAAA,OAAA,qBAAA,kBAAA,IAAA,OAAA,qBAAA,kBAAA,IAAA,OAAA,qBAAA,kBAAA,IAAA,OAAA,qBAAA,kBAAA,IAAA,OAAA,uBAI5D,eAAsB,EAAwB,GAC7C,OAAO,EAAiB,EAAe,EAAM,GCkB9C,IAGa,EAAb,MACC,GAAc,iBACd,KAAgB,iBAChB,SAAoB,GAEpB,OACA,OAEA,WAAA,CAAY,GACX,KAAK,OAAS,IAAK,GAGpB,UAAM,CAAK,GACV,KAAK,aAAe,EACnB,EACA,KAAK,OAAO,OACZ,EACA,GAGD,KAAK,gBAAgB,GACrB,KAAK,iBAAiB,GACtB,KAAK,gBAAgB,GACrB,KAAK,0BAA0B,GAGhC,eAAA,CAAwB,GACvB,EAAQ,iBAAiB,CACxB,KAAM,MACN,KAAM,GACN,MAAO,CACN,IAAK,CAAE,QAAS,SAEjB,KAAA,CAAM,GACL,MAAM,EAAkB,SAAS,cAAc,OACzC,EAAc,OAAO,EAAK,OAAO,KAAO,QAE9C,OADA,EAAG,aAAa,MAAO,GAChB,GAER,aAAA,CAAe,EAAM,IAEb,aADa,EAAW,OAAO,EAAK,OAAO,KAAO,aAC7B,UAE7B,UAAW,CACV,CACC,IAAK,MACL,SAAW,IACV,MAAM,EAAqB,EAAG,aAAa,O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M,EAAM,UAClB,OAAO,EAAgB,KAAS,EAAY,MAU/C,mBAAA,CAA4B,GAC3B,MAAM,EAAQ,EAAQ,WACtB,GAAI,EAAuB,EAAO,OAAQ,CACzC,MAAM,EAAkB,KAAK,UAAU,GAEvC,OADI,GAAQ,EAAQ,SAAS,KAAK,OAAO,oBAClC,EAGR,MAAM,EAAQ,EAAiB,GACzB,EAAqD,EAAQ,WAClE,GAIK,EAAqC,SAD1C,GAAS,EAAmB,EAAiB,YAAY,GAAS,QAChB,MAAQ,MAErD,EAAkB,KAAK,SAAS,EAAS,GAC/C,GAAI,EAAQ,CACX,MAAM,EAAkC,QAAX,EAAmB,KAAK,OAAO,UAAY,KAAK,OAAO,UACpF,EAAQ,SAAS,GAElB,OAAO,EAGR,QAAA,CAAiB,EAAwB,GAGxC,MAAM,EAAK,EAFG,EAAQ,WACT,CAAE,KAAM,EAAS,OAAQ,MAAO,CAAE,SAE/C,QAAK,IACL,EAAQ,SAAS,IACV,GAGR,SAAA,CAAkB,GAEjB,MAAM,EAAK,EADG,EAAQ,WACiB,EAAS,QAChD,QAAK,IACL,EAAQ,SAAS,IACV"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{c as t,m as n,o as e,r as o,s as r,y as s}from"./Document-_qdGR4vh.mjs";import{c as i,l as c}from"./Selection-aeiSsvhe.mjs";import{a,r as f}from"./TypeBrands-BZDKMjR-.mjs";import{n as u}from"./NodeResolver-DVPpO5nC.mjs";import{o as d,r as p,s as m}from"./CommandHelpers-DTlQcGv5.mjs";function l(t,n,e){const o=p(u(t.doc,n)),r=d(m(t,o),n);if(!(r<0))return{parentPath:o,anchorIndex:r,isAnchorEmpty:b(t,n,e)}}function h(t,n,e,o){const r=u(t.doc,e);if(!r)return;const i=t.getBlock(e);return i?{parentPath:r,anchorIndex:i.children.findIndex(t=>s(t)&&t.id===n),isAnchorEmpty:b(t,n,o)}:void 0}function y(t,n){if("table_cell"===t.getBlock(n)?.type)return n;const e=u(t.doc,n);if(e)for(const o of e)if("table_cell"===t.getBlock(o)?.type)return o}function g(t){return c(t)?t.nodeId:i(t)?t.blockId:t.anchor.blockId}function x(t,n,e,o,r,s){const c=y(t,e);if(c){const r=h(t,e,c,s);if(!r)return!1;const i=r.anchorIndex+1;n.insertNode(r.parentPath,i,o),r.isAnchorEmpty&&r.anchorIndex>=0&&n.removeNode(r.parentPath,r.anchorIndex)}else{const c=l(t,e,s);if(!c)return!1;const a=i(r)&&"before"===r.side?0:1;n.insertNode(c.parentPath,c.anchorIndex+a,o),c.isAnchorEmpty&&!i(r)&&n.removeNode(c.parentPath,c.anchorIndex)}return!0}function I(n,e){const r=n.children.map(n=>s(n)?I(n,t()):n);return o(n.type,r,e,n.attrs)}function k(t,n){if(t.id===n)return t;for(const e of t.children){if(!s(e))continue;const t=k(e,n);if(t)return t}}function v(t,n){if(!n)return;const e={};let o=!1;for(const r of Object.keys(n)){const s=n[r],i=t?.[r];"string"==typeof i||"number"==typeof i||"boolean"==typeof i?e[r]=i:void 0!==s.default&&(e[r]=s.default),r in e&&(o=!0)}return o?e:void 0}function b(t,e,o){const r=t.getBlock(e);return!!r&&!(o?.getNodeSpec(r.type))?.isVoid&&""===n(r)}function N(t,n){if(!t.type)return;if(!n)return t;const e=n.getNodeSpec(t.type);if(!e)return;const o=v(t.attrs,e.attrs),r=t.segments?function(t,n){const e=[];for(const o of t){if("inline"===o.kind){const t=n.getInlineNodeSpec(o.inlineType);if(!t)continue;const r=v(o.attrs,t.attrs);e.push({kind:"inline",inlineType:o.inlineType,...r?{attrs:r}:{}});continue}e.push(o)}return e}(t.segments,n):void 0;return{...t,...o?{attrs:o}:{},...r?{segments:r}:t.segments?{segments:[]}:{}}}function j(n){const s=t(),i=function(t,n){return t.segments&&t.segments.length>0?function(t){const n=[];for(const o of t){if("inline"===o.kind){n.push(e(f(o.inlineType),o.attrs));continue}if(0===o.text.length)continue;const t=o.marks.map(t=>({type:t.type,...t.attrs?{attrs:t.attrs}:{}}));n.push(r(o.text,t))}return n}(t.segments):n?[r(n)]:void 0}(n,n.text??""),c=n.attrs?n.attrs:void 0;return o(a(n.type),i,s,c)}export{x as a,l as c,y as i,v as l,j as n,g as o,k as r,h as s,I as t,N as u};
|
|
2
|
-
//# sourceMappingURL=BlockInsertion-DsnHLcvM.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"BlockInsertion-DsnHLcvM.mjs","names":[],"sources":["../../src/commands/BlockInsertion.ts"],"sourcesContent":["/**\n * Block insertion utilities for paste and clipboard operations.\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. Also contains pure helpers for block cloning,\n * recursive lookup, and attribute sanitization against a NodeSpec.\n */\n\nimport {\n\ttype BlockAttrs,\n\ttype BlockNode,\n\ttype ChildNode,\n\ttype InlineNode,\n\ttype Mark,\n\ttype TextNode,\n\tcreateBlockNode,\n\tcreateInlineNode,\n\tcreateTextNode,\n\tgenerateBlockId,\n\tgetBlockText,\n\tisBlockNode,\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 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/** 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 text: string = blockData.text ?? '';\n\tconst children: readonly (TextNode | InlineNode)[] | undefined = createChildrenFromRichBlock(\n\t\tblockData,\n\t\ttext,\n\t);\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 */\nfunction createChildrenFromRichBlock(\n\tblockData: RichBlockData,\n\ttext: string,\n): readonly (TextNode | InlineNode)[] | undefined {\n\tif (blockData.segments && blockData.segments.length > 0) {\n\t\treturn createChildrenFromSegments(blockData.segments);\n\t}\n\treturn text ? [createTextNode(text)] : undefined;\n}\n\n/** Converts rich segments into TextNode children with marks. */\nfunction createChildrenFromSegments(\n\tsegments: readonly RichSegment[],\n): readonly (TextNode | InlineNode)[] {\n\tconst children: (TextNode | InlineNode)[] = [];\n\tfor (const seg of segments) {\n\t\tif (seg.kind === 'inline') {\n\t\t\tchildren.push(\n\t\t\t\tcreateInlineNode(\n\t\t\t\t\tinlineType(seg.inlineType),\n\t\t\t\t\tseg.attrs as Readonly<Record<string, string | number | boolean>> | undefined,\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\tchildren.push(createTextNode(seg.text, marks));\n\t}\n\treturn children;\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\t\t});\n\t\t\tcontinue;\n\t\t}\n\t\tsanitized.push(segment);\n\t}\n\treturn sanitized;\n}\n"],"mappings":"mSAiDA,SAAgB,EACf,EACA,EACA,GAGA,MAAM,EAAwB,EADc,EAAa,EAAM,IAAK,IAI9D,EAAsB,EADW,EAAY,EAAO,GACH,GACvD,KAAI,EAAc,GAGlB,MAAO,CAAE,aAAY,cAAa,cADH,EAAa,EAAO,EAAe,IAQnE,SAAgB,EACf,EACA,EACA,EACA,GAEA,MAAM,EAAkC,EAAa,EAAM,IAAK,GAChE,IAAK,EAAU,OAEf,MAAM,EAA8B,EAAM,SAAS,GACnD,OAAK,EAOE,C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,OAAI,EAAU,UAAY,EAAU,SAAS,OAAS,EAOvD,SACC,GAEA,MAAM,EAAsC,GAC5C,IAAK,MAAM,KAAO,EAAU,CAC3B,GAAiB,WAAb,EAAI,KAAmB,CAC1B,EAAS,KACR,EACC,EAAW,EAAI,YACf,EAAI,QAGN,SAED,GAAwB,IAApB,EAAI,KAAK,OAAc,SAC3B,MAAM,EAAyB,EAAI,MAAM,IAAK,IAAA,CAC7C,KAAM,EAAE,QACJ,EAAE,MAAQ,CAAE,MAAO,EAAE,OAA2B,CAAA,KAErD,EAAS,KAAK,EAAe,EAAI,KAAM,IAExC,OAAO,EA3BC,CAA2B,EAAU,UAEtC,EAAO,CAAC,EAAe,SAAS,EAtB0B,CAChE,EAFoB,EAAU,MAAQ,IAKjC,EAAgC,EAAU,MAC5C,EAAU,WACX,EAEH,OAAO,EAAgB,EAAS,EAAU,MAAuB,EAAU,EAAO"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
var e=class{_entries=/* @__PURE__ */new Map;registerBlockTypePickerEntry(e){if(this._entries.has(e.id))throw new Error(`BlockTypePickerEntry with id "${e.id}" is already registered.`);this._entries.set(e.id,e)}getBlockTypePickerEntries(){return[...this._entries.values()].sort((e,r)=>e.priority-r.priority)}removeBlockTypePickerEntry(e){this._entries.delete(e)}clear(){this._entries.clear()}};export{e as t};
|
|
2
|
-
//# sourceMappingURL=BlockTypePickerRegistry-C_jLddOz.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"BlockTypePickerRegistry-C_jLddOz.mjs","names":[],"sources":["../../src/plugins/heading/BlockTypePickerRegistry.ts"],"sourcesContent":["/**\n * BlockTypePickerRegistry: manages plugin-registered block type picker entries\n * displayed in the heading/block type dropdown, sorted by priority.\n */\n\nimport type { BlockTypePickerEntry } from './BlockTypePickerEntry.js';\n\nexport class BlockTypePickerRegistry {\n\tprivate readonly _entries = new Map<string, BlockTypePickerEntry>();\n\n\tregisterBlockTypePickerEntry(entry: BlockTypePickerEntry): void {\n\t\tif (this._entries.has(entry.id)) {\n\t\t\tthrow new Error(`BlockTypePickerEntry with id \"${entry.id}\" is already registered.`);\n\t\t}\n\t\tthis._entries.set(entry.id, entry);\n\t}\n\n\tgetBlockTypePickerEntries(): readonly BlockTypePickerEntry[] {\n\t\treturn [...this._entries.values()].sort((a, b) => a.priority - b.priority);\n\t}\n\n\tremoveBlockTypePickerEntry(id: string): void {\n\t\tthis._entries.delete(id);\n\t}\n\n\tclear(): void {\n\t\tthis._entries.clear();\n\t}\n}\n"],"mappings":"AAOA,IAAa,EAAb,MACC,wBAA4B,IAAI,IAEhC,4BAAA,CAA6B,GAC5B,GAAI,KAAK,SAAS,IAAI,EAAM,IAC3B,MAAM,IAAI,MAAM,iCAAiC,EAAM,8BAExD,KAAK,SAAS,IAAI,EAAM,GAAI,GAG7B,yBAAA,GACC,MAAO,IAAI,KAAK,SAAS,UAAU,KAAA,CAAM,EAAG,IAAM,EAAE,SAAW,EAAE,UAGlE,0BAAA,CAA2B,GAC1B,KAAK,SAAS,OAAO,GAGtB,KAAA,GACC,KAAK,SAAS"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{c as t,d as e}from"./Document-_qdGR4vh.mjs";import{o,t as r,u as s}from"./Selection-aeiSsvhe.mjs";import{a as c}from"./TypeBrands-BZDKMjR-.mjs";import{n}from"./DomUtils-RKbAVBQz.mjs";import{i as l,o as i}from"./PluginHelpers-D-MvWR98.mjs";import{t as a}from"./ShortcutFormatting-DE6B8iGs.mjs";function u(t,e){const r=t.getState();if(!s(r.selection))return!1;const c=r.selection;if(!o(c))return!1;const n=r.getBlock(c.anchor.blockId);return!(!n||"blockquote"!==n.type)&&e({state:r,block:n,blockId:c.anchor.blockId,offset:c.anchor.offset})}var p={label:"Blockquote",tooltip:t=>`Blockquote (${t})`},m=/* @__PURE__ */Object.assign({"./locales/ar.ts":()=>import("./ar-4ZPC8daa.mjs"),"./locales/de.ts":()=>import("./de-CtDnvnnm.mjs"),"./locales/es.ts":()=>import("./es-DBb78XWu.mjs"),"./locales/fr.ts":()=>import("./fr-IO4_LYvE.mjs"),"./locales/hi.ts":()=>import("./hi-CkylXoIm.mjs"),"./locales/pt.ts":()=>import("./pt-DlvNEDeW.mjs"),"./locales/ru.ts":()=>import("./ru-Bep1iHQL.mjs"),"./locales/zh.ts":()=>import("./zh-CX2zUoWR.mjs")});async function g(t){return i(m,t,p)}var d={},k=class{id="blockquote";name="Blockquote";priority=35;config;locale;constructor(t){this.config={...d,...t}}async init(t){this.locale=await l(t,this.config.locale,p,g),t.registerStyleSheet("\n.notectl-content blockquote {\n\tmargin: 0;\n\tpadding: 2px 0;\n\tpadding-inline-start: 16px;\n\tborder-inline-start: 3px solid var(--notectl-border);\n\tmin-height: 1.6em;\n}\n"),this.registerNodeSpec(t),this.registerCommands(t),this.registerKeymap(t),this.registerInputRule(t),this.registerToolbarItem(t)}registerNodeSpec(t){t.registerNodeSpec({type:"blockquote",group:"block",content:{allow:["text"]},toDOM:t=>n("blockquote",t.id),toHTML:(t,e)=>`<blockquote>${e||"<br>"}</blockquote>`,parseHTML:[{tag:"blockquote"}],sanitize:{tags:["blockquote"]}})}registerCommands(t){t.registerCommand("toggleBlockquote",()=>this.toggleBlockquote(t)),t.registerCommand("setBlockquote",()=>this.setBlockType(t,c("blockquote")))}registerKeymap(o){o.registerKeymap({"Mod-Shift->":()=>o.executeCommand("toggleBlockquote")}),function(o){o.registerKeymap({ArrowDown:()=>function(o){return u(o,({state:s,block:n,blockId:l,offset:i})=>{if(i!==e(n))return!1;const a=s.getBlockOrder(),u=a.indexOf(l);if(u<a.length-1){const t=a[u+1],e=s.transaction("command").setSelection(r(t,0)).build();o.dispatch(e)}else!function(o,s){const n=o.getState(),l=n.getBlock(s);if(!l)return;const i=e(l),a=t(),u=n.transaction("command").splitBlock(s,i,a).setBlockType(a,c("paragraph")).setSelection(r(a,0)).build();o.dispatch(u)}(o,l);return!0})}(o),ArrowUp:()=>function(t){return u(t,({state:o,blockId:s,offset:c})=>{if(0!==c)return!1;const n=o.getBlockOrder(),l=n.indexOf(s);if(l>0){const s=n[l-1],c=o.getBlock(s),i=c?e(c):0,a=o.transaction("command").setSelection(r(s,i)).build();return t.dispatch(a),!0}return!1})}(o),Enter:()=>function(t){return u(t,({state:o,block:s,blockId:n})=>{if(e(s)>0)return!1;const l=o.transaction("command").setBlockType(n,c("paragraph")).setSelection(r(n,0)).build();return t.dispatch(l),!0})}(o),Backspace:()=>function(t){return u(t,({state:e,blockId:o,offset:r})=>{if(0!==r)return!1;const s=e.transaction("input").setBlockType(o,c("paragraph")).setSelection(e.selection).build();return t.dispatch(s),!0})}(o)},{priority:"context"})}(o)}registerInputRule(t){t.registerInputRule({pattern:/^> $/,handler(t,e,r,n){const l=t.selection;if(!s(l))return null;if(!o(l))return null;const i=t.getBlock(l.anchor.blockId);return i&&"paragraph"===i.type?t.transaction("input").deleteTextAt(l.anchor.blockId,r,r+2).setBlockType(l.anchor.blockId,c("blockquote")).setSelection(l).build():null}})}registerToolbarItem(t){t.registerToolbarItem({id:"blockquote",group:"block",icon:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M6 17h3l2-4V7H5v6h3zm8 0h3l2-4V7h-6v6h3z"/></svg>',label:this.locale.label,tooltip:this.locale.tooltip(a("Mod-Shift->")),command:"toggleBlockquote",isActive:t=>!!s(t.selection)&&"blockquote"===t.getBlock(t.selection.anchor.blockId)?.type})}toggleBlockquote(t){const e=t.getState();if(!s(e.selection))return!1;const o=e.getBlock(e.selection.anchor.blockId);return!!o&&("blockquote"===o.type?this.setBlockType(t,c("paragraph")):this.setBlockType(t,c("blockquote")))}setBlockType(t,e,o){const r=t.getState(),c=r.selection;if(!s(c))return!1;const n=r.transaction("command").setBlockType(c.anchor.blockId,e,o).setSelection(c).build();return t.dispatch(n),!0}};export{p as n,g as r,k as t};
|
|
2
|
-
//# sourceMappingURL=BlockquotePlugin-BEaZSoVT.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"BlockquotePlugin-BEaZSoVT.mjs","names":[],"sources":["../../src/plugins/blockquote/BlockquoteKeyboardHandlers.ts","../../src/plugins/blockquote/BlockquoteLocale.ts","../../src/plugins/blockquote/BlockquoteStyles.ts","../../src/plugins/blockquote/BlockquotePlugin.ts"],"sourcesContent":["/**\n * Keyboard handlers for blockquote boundary navigation and escape.\n *\n * Handles ArrowDown/ArrowUp at block boundaries, Enter on empty blockquote\n * (converts to paragraph), and Backspace at offset 0 (reverts to paragraph).\n */\n\nimport type { BlockNode } from '../../model/Document.js';\nimport { generateBlockId, getBlockLength } from '../../model/Document.js';\nimport { createCollapsedSelection, isCollapsed, isTextSelection } from '../../model/Selection.js';\nimport type { BlockId } from '../../model/TypeBrands.js';\nimport { nodeType } from '../../model/TypeBrands.js';\nimport type { EditorState } from '../../state/EditorState.js';\nimport type { Transaction } from '../../state/Transaction.js';\nimport type { PluginContext } from '../Plugin.js';\n\n// --- Context Guard ---\n\ninterface BlockquoteContext {\n\treadonly state: EditorState;\n\treadonly block: BlockNode;\n\treadonly blockId: BlockId;\n\treadonly offset: number;\n}\n\n/**\n * Guards against non-blockquote contexts.\n * Returns false (not handled) if the cursor is not inside a blockquote.\n */\nfunction withBlockquoteContext(\n\tcontext: PluginContext,\n\thandler: (ctx: BlockquoteContext) => boolean,\n): boolean {\n\tconst state: EditorState = context.getState();\n\tif (!isTextSelection(state.selection)) return false;\n\n\tconst sel = state.selection;\n\tif (!isCollapsed(sel)) return false;\n\n\tconst block: BlockNode | undefined = state.getBlock(sel.anchor.blockId);\n\tif (!block || block.type !== 'blockquote') return false;\n\n\treturn handler({\n\t\tstate,\n\t\tblock,\n\t\tblockId: sel.anchor.blockId,\n\t\toffset: sel.anchor.offset,\n\t});\n}\n\n/** Registers blockquote keyboard handlers at context priority. */\nexport function registerBlockquoteKeymaps(context: PluginContext): void {\n\tcontext.registerKeymap(\n\t\t{\n\t\t\tArrowDown: () => handleArrowDown(context),\n\t\t\tArrowUp: () => handleArrowUp(context),\n\t\t\tEnter: () => handleEnterOnEmpty(context),\n\t\t\tBackspace: () => handleBackspaceAtStart(context),\n\t\t},\n\t\t{ priority: 'context' },\n\t);\n}\n\n// --- Handler Functions ---\n\n/**\n * Moves cursor to the next block when at the end of the blockquote text.\n * If no next block exists, inserts a new paragraph after the blockquote.\n */\nfunction handleArrowDown(context: PluginContext): boolean {\n\treturn withBlockquoteContext(context, ({ state, block, blockId, offset }) => {\n\t\tconst textLength: number = getBlockLength(block);\n\t\tif (offset !== textLength) return false;\n\n\t\tconst blockOrder: readonly BlockId[] = state.getBlockOrder();\n\t\tconst idx: number = blockOrder.indexOf(blockId);\n\n\t\tif (idx < blockOrder.length - 1) {\n\t\t\tconst nextId: BlockId = blockOrder[idx + 1] as BlockId;\n\t\t\tconst tr: Transaction = state\n\t\t\t\t.transaction('command')\n\t\t\t\t.setSelection(createCollapsedSelection(nextId, 0))\n\t\t\t\t.build();\n\t\t\tcontext.dispatch(tr);\n\t\t} else {\n\t\t\tinsertParagraphAfter(context, blockId);\n\t\t}\n\n\t\treturn true;\n\t});\n}\n\n/**\n * Moves cursor to the previous block when at the start of the blockquote text.\n * Returns false if no previous block exists.\n */\nfunction handleArrowUp(context: PluginContext): boolean {\n\treturn withBlockquoteContext(context, ({ state, blockId, offset }) => {\n\t\tif (offset !== 0) return false;\n\n\t\tconst blockOrder: readonly BlockId[] = state.getBlockOrder();\n\t\tconst idx: number = blockOrder.indexOf(blockId);\n\n\t\tif (idx > 0) {\n\t\t\tconst prevId: BlockId = blockOrder[idx - 1] as BlockId;\n\t\t\tconst prevBlock: BlockNode | undefined = state.getBlock(prevId);\n\t\t\tconst prevLen: number = prevBlock ? getBlockLength(prevBlock) : 0;\n\t\t\tconst tr: Transaction = state\n\t\t\t\t.transaction('command')\n\t\t\t\t.setSelection(createCollapsedSelection(prevId, prevLen))\n\t\t\t\t.build();\n\t\t\tcontext.dispatch(tr);\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t});\n}\n\n/**\n * Converts an empty blockquote to a paragraph on Enter.\n * Returns false for non-empty blockquotes, letting splitBlock handle them.\n */\nfunction handleEnterOnEmpty(context: PluginContext): boolean {\n\treturn withBlockquoteContext(context, ({ state, block, blockId }) => {\n\t\tif (getBlockLength(block) > 0) return false;\n\n\t\tconst tr: Transaction = state\n\t\t\t.transaction('command')\n\t\t\t.setBlockType(blockId, nodeType('paragraph'))\n\t\t\t.setSelection(createCollapsedSelection(blockId, 0))\n\t\t\t.build();\n\t\tcontext.dispatch(tr);\n\t\treturn true;\n\t});\n}\n\n/**\n * Converts a blockquote to a paragraph when Backspace is pressed at offset 0.\n */\nfunction handleBackspaceAtStart(context: PluginContext): boolean {\n\treturn withBlockquoteContext(context, ({ state, blockId, offset }) => {\n\t\tif (offset !== 0) return false;\n\n\t\tconst tr: Transaction = state\n\t\t\t.transaction('input')\n\t\t\t.setBlockType(blockId, nodeType('paragraph'))\n\t\t\t.setSelection(state.selection)\n\t\t\t.build();\n\t\tcontext.dispatch(tr);\n\t\treturn true;\n\t});\n}\n\n// --- Shared Helpers ---\n\nfunction insertParagraphAfter(context: PluginContext, bid: BlockId): void {\n\tconst state: EditorState = context.getState();\n\tconst block: BlockNode | undefined = state.getBlock(bid);\n\tif (!block) return;\n\n\tconst blockLength: number = getBlockLength(block);\n\tconst newId: BlockId = generateBlockId();\n\n\tconst tr: Transaction = state\n\t\t.transaction('command')\n\t\t.splitBlock(bid, blockLength, newId)\n\t\t.setBlockType(newId, nodeType('paragraph'))\n\t\t.setSelection(createCollapsedSelection(newId, 0))\n\t\t.build();\n\n\tcontext.dispatch(tr);\n}\n","/**\n * Locale interface and default English locale for the BlockquotePlugin.\n */\n\nimport { type LocaleModuleMap, loadLocaleModule } from '../shared/LocaleLoader.js';\n\n// --- Locale Interface ---\n\nexport interface BlockquoteLocale {\n\treadonly label: string;\n\treadonly tooltip: (shortcut: string) => string;\n}\n\n// --- Default English Locale ---\n\nexport const BLOCKQUOTE_LOCALE_EN: BlockquoteLocale = {\n\tlabel: 'Blockquote',\n\ttooltip: (shortcut: string) => `Blockquote (${shortcut})`,\n};\n\n// --- Lazy Locale Loader ---\n\nconst localeModules: LocaleModuleMap<BlockquoteLocale> = import.meta.glob<{\n\tdefault: BlockquoteLocale;\n}>('./locales/*.ts', { eager: false });\n\nexport async function loadBlockquoteLocale(lang: string): Promise<BlockquoteLocale> {\n\treturn loadLocaleModule(localeModules, lang, BLOCKQUOTE_LOCALE_EN);\n}\n","/** Blockquote styles using CSS logical properties for RTL support. */\nexport const BLOCKQUOTE_CSS = `\n.notectl-content blockquote {\n\tmargin: 0;\n\tpadding: 2px 0;\n\tpadding-inline-start: 16px;\n\tborder-inline-start: 3px solid var(--notectl-border);\n\tmin-height: 1.6em;\n}\n`;\n","/**\n * BlockquotePlugin: registers a blockquote block type with NodeSpec,\n * toggle command, keyboard shortcut, input rule, and a toolbar button.\n */\n\nimport { isCollapsed, isTextSelection } from '../../model/Selection.js';\nimport { type NodeTypeName, nodeType } from '../../model/TypeBrands.js';\nimport { createBlockElement } from '../../view/DomUtils.js';\nimport type { Plugin, PluginContext } from '../Plugin.js';\nimport { resolveLocale } from '../shared/PluginHelpers.js';\nimport { formatShortcut } from '../shared/ShortcutFormatting.js';\nimport { registerBlockquoteKeymaps } from './BlockquoteKeyboardHandlers.js';\nimport {\n\tBLOCKQUOTE_LOCALE_EN,\n\ttype BlockquoteLocale,\n\tloadBlockquoteLocale,\n} from './BlockquoteLocale.js';\nimport { BLOCKQUOTE_CSS } from './BlockquoteStyles.js';\n\n// --- Attribute Registry Augmentation ---\n\ndeclare module '../../model/AttrRegistry.js' {\n\tinterface NodeAttrRegistry {\n\t\tblockquote: Record<string, never>;\n\t}\n}\n\n// --- Configuration ---\n\nexport interface BlockquoteConfig {\n\treadonly locale?: BlockquoteLocale;\n}\n\nconst DEFAULT_CONFIG: BlockquoteConfig = {};\n\n// --- Plugin ---\n\nexport class BlockquotePlugin implements Plugin {\n\treadonly id = 'blockquote';\n\treadonly name = 'Blockquote';\n\treadonly priority = 35;\n\n\tprivate readonly config: BlockquoteConfig;\n\tprivate locale!: BlockquoteLocale;\n\n\tconstructor(config?: Partial<BlockquoteConfig>) {\n\t\tthis.config = { ...DEFAULT_CONFIG, ...config };\n\t}\n\n\tasync init(context: PluginContext): Promise<void> {\n\t\tthis.locale = await resolveLocale(\n\t\t\tcontext,\n\t\t\tthis.config.locale,\n\t\t\tBLOCKQUOTE_LOCALE_EN,\n\t\t\tloadBlockquoteLocale,\n\t\t);\n\t\tcontext.registerStyleSheet(BLOCKQUOTE_CSS);\n\t\tthis.registerNodeSpec(context);\n\t\tthis.registerCommands(context);\n\t\tthis.registerKeymap(context);\n\t\tthis.registerInputRule(context);\n\t\tthis.registerToolbarItem(context);\n\t}\n\n\tprivate registerNodeSpec(context: PluginContext): void {\n\t\tcontext.registerNodeSpec({\n\t\t\ttype: 'blockquote',\n\t\t\tgroup: 'block',\n\t\t\tcontent: { allow: ['text'] },\n\t\t\ttoDOM(node) {\n\t\t\t\treturn createBlockElement('blockquote', node.id);\n\t\t\t},\n\t\t\ttoHTML(_node, content) {\n\t\t\t\treturn `<blockquote>${content || '<br>'}</blockquote>`;\n\t\t\t},\n\t\t\tparseHTML: [{ tag: 'blockquote' }],\n\t\t\tsanitize: { tags: ['blockquote'] },\n\t\t});\n\t}\n\n\tprivate registerCommands(context: PluginContext): void {\n\t\tcontext.registerCommand('toggleBlockquote', () => {\n\t\t\treturn this.toggleBlockquote(context);\n\t\t});\n\n\t\tcontext.registerCommand('setBlockquote', () => {\n\t\t\treturn this.setBlockType(context, nodeType('blockquote'));\n\t\t});\n\t}\n\n\tprivate registerKeymap(context: PluginContext): void {\n\t\tcontext.registerKeymap({\n\t\t\t'Mod-Shift->': () => context.executeCommand('toggleBlockquote'),\n\t\t});\n\t\tregisterBlockquoteKeymaps(context);\n\t}\n\n\tprivate registerInputRule(context: PluginContext): void {\n\t\tcontext.registerInputRule({\n\t\t\tpattern: /^> $/,\n\t\t\thandler(state, _match, start, _end) {\n\t\t\t\tconst sel = state.selection;\n\t\t\t\tif (!isTextSelection(sel)) return null;\n\t\t\t\tif (!isCollapsed(sel)) return null;\n\n\t\t\t\tconst block = state.getBlock(sel.anchor.blockId);\n\t\t\t\tif (!block || block.type !== 'paragraph') return null;\n\n\t\t\t\treturn state\n\t\t\t\t\t.transaction('input')\n\t\t\t\t\t.deleteTextAt(sel.anchor.blockId, start, start + 2)\n\t\t\t\t\t.setBlockType(sel.anchor.blockId, nodeType('blockquote'))\n\t\t\t\t\t.setSelection(sel)\n\t\t\t\t\t.build();\n\t\t\t},\n\t\t});\n\t}\n\n\tprivate registerToolbarItem(context: PluginContext): void {\n\t\tconst icon =\n\t\t\t'<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\"><path d=\"M6 17h3l2-4V7H5v6h3zm8 0h3l2-4V7h-6v6h3z\"/></svg>';\n\n\t\tcontext.registerToolbarItem({\n\t\t\tid: 'blockquote',\n\t\t\tgroup: 'block',\n\t\t\ticon,\n\t\t\tlabel: this.locale.label,\n\t\t\ttooltip: this.locale.tooltip(formatShortcut('Mod-Shift->')),\n\t\t\tcommand: 'toggleBlockquote',\n\t\t\tisActive: (state) => {\n\t\t\t\tif (!isTextSelection(state.selection)) return false;\n\t\t\t\tconst block = state.getBlock(state.selection.anchor.blockId);\n\t\t\t\treturn block?.type === 'blockquote';\n\t\t\t},\n\t\t});\n\t}\n\n\t/**\n\t * Toggles between blockquote and paragraph.\n\t * If the block is already a blockquote, resets to paragraph.\n\t */\n\tprivate toggleBlockquote(context: PluginContext): boolean {\n\t\tconst state = context.getState();\n\t\tif (!isTextSelection(state.selection)) return false;\n\t\tconst block = state.getBlock(state.selection.anchor.blockId);\n\t\tif (!block) return false;\n\n\t\tif (block.type === 'blockquote') {\n\t\t\treturn this.setBlockType(context, nodeType('paragraph'));\n\t\t}\n\n\t\treturn this.setBlockType(context, nodeType('blockquote'));\n\t}\n\n\tprivate setBlockType(\n\t\tcontext: PluginContext,\n\t\ttype: NodeTypeName,\n\t\tattrs?: Record<string, string | number | boolean>,\n\t): boolean {\n\t\tconst state = context.getState();\n\t\tconst sel = state.selection;\n\t\tif (!isTextSelection(sel)) return false;\n\n\t\tconst tr = state\n\t\t\t.transaction('command')\n\t\t\t.setBlockType(sel.anchor.blockId, type, attrs)\n\t\t\t.setSelection(sel)\n\t\t\t.build();\n\n\t\tcontext.dispatch(tr);\n\t\treturn true;\n\t}\n}\n"],"mappings":"4SA6BA,SAAS,EACR,EACA,GAEA,MAAM,EAAqB,EAAQ,WACnC,IAAK,EAAgB,EAAM,WAAY,OAAO,EAE9C,MAAM,EAAM,EAAM,UAClB,IAAK,EAAY,GAAM,OAAO,EAE9B,MAAM,EAA+B,EAAM,SAAS,EAAI,OAAO,SAC/D,SAAK,GAAwB,eAAf,EAAM,OAEb,EAAQ,CACd,QACA,QACA,QAAS,EAAI,OAAO,QACpB,OAAQ,EAAI,OAAO,SC/BrB,IAAa,EAAyC,CACrD,MAAO,aACP,QAAU,GAAqB,eAAe,MAKzC,iBAAmD,OAAA,OAAA,CAAA,kBAAA,IAAA,OAAA,qBAAA,kBAAA,IAAA,OAAA,qBAAA,kBAAA,IAAA,OAAA,qBAAA,kBAAA,IAAA,OAAA,qBAAA,kBAAA,IAAA,OAAA,qBAAA,kBAAA,IAAA,OAAA,qBAAA,kBAAA,IAAA,OAAA,qBAAA,kBAAA,IAAA,OAAA,uBAIzD,eAAsB,EAAqB,GAC1C,OAAO,EAAiB,EAAe,EAAM,GC1B9C,ICgCM,EAAmC,CAAA,EAI5B,EAAb,MACC,GAAc,aACd,KAAgB,aAChB,SAAoB,GAEpB,OACA,OAEA,WAAA,CAAY,GACX,KAAK,OAAS,IAAK,KAAmB,GAGvC,UAAM,CAAK,GACV,KAAK,aAAe,EACnB,EACA,KAAK,OAAO,OACZ,EACA,GAED,EAAQ,mBDvDoB,uLCwD5B,KAAK,iBAAiB,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