@notectl/core 2.2.5 → 2.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunks/{AlignmentPlugin-BCHxo16v.mjs → AlignmentPlugin--xAFlRqE.mjs} +2 -2
- package/dist/chunks/{AlignmentPlugin-BCHxo16v.mjs.map → AlignmentPlugin--xAFlRqE.mjs.map} +1 -1
- package/dist/chunks/{AttrRegistry-DcDVyzLm.mjs → AttrRegistry-B3zB02z9.mjs} +2 -2
- package/dist/chunks/AttrRegistry-B3zB02z9.mjs.map +1 -0
- package/dist/chunks/{AttributedMarkCommands-D4W2Jgpj.mjs → AttributedMarkCommands-bagbH8Qt.mjs} +2 -2
- package/dist/chunks/{AttributedMarkCommands-D4W2Jgpj.mjs.map → AttributedMarkCommands-bagbH8Qt.mjs.map} +1 -1
- package/dist/chunks/{BidiIsolationPlugin-BddRbDCN.mjs → BidiIsolationPlugin-DBXyXpgm.mjs} +2 -2
- package/dist/chunks/{BidiIsolationPlugin-BddRbDCN.mjs.map → BidiIsolationPlugin-DBXyXpgm.mjs.map} +1 -1
- package/dist/chunks/BlockInsertion-CJusvrDL.mjs +2 -0
- package/dist/chunks/BlockInsertion-CJusvrDL.mjs.map +1 -0
- package/dist/chunks/BlockquotePlugin-Bz2glHwX.mjs +2 -0
- package/dist/chunks/{BlockquotePlugin-4V7KV_Sb.mjs.map → BlockquotePlugin-Bz2glHwX.mjs.map} +1 -1
- package/dist/chunks/{CaretNavigationPlugin-C6XBwp0N.mjs → CaretNavigationPlugin-CNsT0eb4.mjs} +2 -2
- package/dist/chunks/{CaretNavigationPlugin-C6XBwp0N.mjs.map → CaretNavigationPlugin-CNsT0eb4.mjs.map} +1 -1
- package/dist/chunks/CodeBlockPlugin-C1hrdbSZ.mjs +2 -0
- package/dist/chunks/CodeBlockPlugin-C1hrdbSZ.mjs.map +1 -0
- package/dist/chunks/{ColorGrid-CXRdpP_n.mjs → ColorGrid-C9RQoEWF.mjs} +2 -2
- package/dist/chunks/{ColorGrid-CXRdpP_n.mjs.map → ColorGrid-C9RQoEWF.mjs.map} +1 -1
- package/dist/chunks/ColorPickerPopup-DiA68Pzz.mjs +2 -0
- package/dist/chunks/{ColorPickerPopup-C_74bqid.mjs.map → ColorPickerPopup-DiA68Pzz.mjs.map} +1 -1
- package/dist/chunks/Commands-1dFFldi7.mjs +2 -0
- package/dist/chunks/Commands-1dFFldi7.mjs.map +1 -0
- package/dist/chunks/ContentModel-NpAj7vGW.mjs +2 -0
- package/dist/chunks/ContentModel-NpAj7vGW.mjs.map +1 -0
- package/dist/chunks/Decoration-BpoEOANl.mjs +2 -0
- package/dist/chunks/Decoration-BpoEOANl.mjs.map +1 -0
- package/dist/chunks/{DirectionDetection-C7XE0nxW.mjs → DirectionDetection-CDVSEWQ6.mjs} +2 -2
- package/dist/chunks/{DirectionDetection-C7XE0nxW.mjs.map → DirectionDetection-CDVSEWQ6.mjs.map} +1 -1
- package/dist/chunks/Document-827l3P80.mjs +2 -0
- package/dist/chunks/Document-827l3P80.mjs.map +1 -0
- package/dist/chunks/DocumentParser-D2tr3ZKn.mjs +2 -0
- package/dist/chunks/DocumentParser-D2tr3ZKn.mjs.map +1 -0
- package/dist/chunks/EditorEventBoundary-zpYRxryo.mjs +2 -0
- package/dist/chunks/EditorEventBoundary-zpYRxryo.mjs.map +1 -0
- package/dist/chunks/FontPlugin-By-TGrQo.mjs +2 -0
- package/dist/chunks/{FontPlugin-DB1_bgam.mjs.map → FontPlugin-By-TGrQo.mjs.map} +1 -1
- package/dist/chunks/{FontSizePlugin-DFvp7Ki9.mjs → FontSizePlugin-Dln-tYXV.mjs} +2 -2
- package/dist/chunks/FontSizePlugin-Dln-tYXV.mjs.map +1 -0
- package/dist/chunks/FormulaPlugin-By1befrR.mjs +2 -0
- package/dist/chunks/FormulaPlugin-By1befrR.mjs.map +1 -0
- package/dist/chunks/GapCursorNavigation-BuXngVu-.mjs +2 -0
- package/dist/chunks/{GapCursorNavigation-ycNzuQVH.mjs.map → GapCursorNavigation-BuXngVu-.mjs.map} +1 -1
- package/dist/chunks/{GapCursorPlugin-Zvxjnr82.mjs → GapCursorPlugin-DAxVzXRs.mjs} +2 -2
- package/dist/chunks/{GapCursorPlugin-Zvxjnr82.mjs.map → GapCursorPlugin-DAxVzXRs.mjs.map} +1 -1
- package/dist/chunks/HTMLUtils-Bhg3_P8B.mjs +2 -0
- package/dist/chunks/HTMLUtils-Bhg3_P8B.mjs.map +1 -0
- package/dist/chunks/{HardBreakPlugin-9DOyCyyM.mjs → HardBreakPlugin-DlbSlrdq.mjs} +2 -2
- package/dist/chunks/{HardBreakPlugin-9DOyCyyM.mjs.map → HardBreakPlugin-DlbSlrdq.mjs.map} +1 -1
- package/dist/chunks/HeadingPlugin-uMAjPOk5.mjs +2 -0
- package/dist/chunks/{HeadingPlugin-D9yvG2Aw.mjs.map → HeadingPlugin-uMAjPOk5.mjs.map} +1 -1
- package/dist/chunks/{HighlightPlugin-D4gh4RP7.mjs → HighlightPlugin-Bj7FPkIQ.mjs} +2 -2
- package/dist/chunks/{HighlightPlugin-D4gh4RP7.mjs.map → HighlightPlugin-Bj7FPkIQ.mjs.map} +1 -1
- package/dist/chunks/HorizontalRulePlugin-DUVmTQpX.mjs +2 -0
- package/dist/chunks/HorizontalRulePlugin-DUVmTQpX.mjs.map +1 -0
- package/dist/chunks/ImagePlugin-FToCOjd5.mjs +2 -0
- package/dist/chunks/{ImagePlugin-Cp_RINtc.mjs.map → ImagePlugin-FToCOjd5.mjs.map} +1 -1
- package/dist/chunks/{InlineCodePlugin-DMr4O7c7.mjs → InlineCodePlugin-pISIoGQE.mjs} +2 -2
- package/dist/chunks/InlineCodePlugin-pISIoGQE.mjs.map +1 -0
- package/dist/chunks/InlineStyleMarkSpec-CjSRj4f_.mjs +2 -0
- package/dist/chunks/{InlineStyleMarkSpec-4R6DC7ij.mjs.map → InlineStyleMarkSpec-CjSRj4f_.mjs.map} +1 -1
- package/dist/chunks/LinkPlugin-Ct5Z180S.mjs +2 -0
- package/dist/chunks/LinkPlugin-Ct5Z180S.mjs.map +1 -0
- package/dist/chunks/ListPlugin-DAY5ezNs.mjs +2 -0
- package/dist/chunks/ListPlugin-DAY5ezNs.mjs.map +1 -0
- package/dist/chunks/MarkInputRule-Bdi8KPus.mjs +2 -0
- package/dist/chunks/MarkInputRule-Bdi8KPus.mjs.map +1 -0
- package/dist/chunks/MarkdownHTMLRegistry-CKEx7LkR.mjs +2 -0
- package/dist/chunks/MarkdownHTMLRegistry-CKEx7LkR.mjs.map +1 -0
- package/dist/chunks/MarkdownParser-CWt3M6jR.mjs +2 -0
- package/dist/chunks/MarkdownParser-CWt3M6jR.mjs.map +1 -0
- package/dist/chunks/MarkdownSerializer-J-i28out.mjs +2 -0
- package/dist/chunks/MarkdownSerializer-J-i28out.mjs.map +1 -0
- package/dist/chunks/{NodeResolver-ChgLF_IP.mjs → NodeResolver-Dleih-8R.mjs} +2 -2
- package/dist/chunks/{NodeResolver-ChgLF_IP.mjs.map → NodeResolver-Dleih-8R.mjs.map} +1 -1
- package/dist/chunks/NodeSelectionCommands-1PjwUDTJ.mjs +2 -0
- package/dist/chunks/{NodeSelectionCommands-Dj4VxLdD.mjs.map → NodeSelectionCommands-1PjwUDTJ.mjs.map} +1 -1
- package/dist/chunks/PluginHelpers-Dx_0hfDe.mjs +2 -0
- package/dist/chunks/{PluginHelpers-KDuTlmXm.mjs.map → PluginHelpers-Dx_0hfDe.mjs.map} +1 -1
- package/dist/chunks/{PopupManager-CyOfZUab.mjs → PopupManager-CT-fMZJn.mjs} +2 -2
- package/dist/chunks/{PopupManager-CyOfZUab.mjs.map → PopupManager-CT-fMZJn.mjs.map} +1 -1
- package/dist/chunks/PopupPositioning-BFh6Ed1D.mjs +2 -0
- package/dist/chunks/{PopupPositioning-DtUrY9bh.mjs.map → PopupPositioning-BFh6Ed1D.mjs.map} +1 -1
- package/dist/chunks/PrintPlugin-7zz9mhhU.mjs +2 -0
- package/dist/chunks/PrintPlugin-7zz9mhhU.mjs.map +1 -0
- package/dist/chunks/{PrintTypes-WdtgSj74.mjs → PrintTypes-CxU69qu3.mjs} +3 -2
- package/dist/chunks/PrintTypes-CxU69qu3.mjs.map +1 -0
- package/dist/chunks/{RangeIterator-o8v3msQe.mjs → RangeIterator-DP7Ud3Gp.mjs} +2 -2
- package/dist/chunks/{RangeIterator-o8v3msQe.mjs.map → RangeIterator-DP7Ud3Gp.mjs.map} +1 -1
- package/dist/chunks/SchemaRegistry-CkBN-1yW.mjs +2 -0
- package/dist/chunks/SchemaRegistry-CkBN-1yW.mjs.map +1 -0
- package/dist/chunks/{SimpleMark-CaQtFAau.mjs → SimpleMark-7CQcA4RK.mjs} +2 -2
- package/dist/chunks/{SimpleMark-CaQtFAau.mjs.map → SimpleMark-7CQcA4RK.mjs.map} +1 -1
- package/dist/chunks/{SmartPastePlugin-Bi_wpTCV.mjs → SmartPastePlugin-CYa_nD9v.mjs} +2 -2
- package/dist/chunks/{SmartPastePlugin-Bi_wpTCV.mjs.map → SmartPastePlugin-CYa_nD9v.mjs.map} +1 -1
- package/dist/chunks/StrikethroughPlugin-C2oWvGc3.mjs +2 -0
- package/dist/chunks/StrikethroughPlugin-C2oWvGc3.mjs.map +1 -0
- package/dist/chunks/StyleRuntime-DW6omotc.mjs +2 -0
- package/dist/chunks/StyleRuntime-DW6omotc.mjs.map +1 -0
- package/dist/chunks/{SuperSubPlugin-DVP7VnIz.mjs → SuperSubPlugin-D1xaKrSu.mjs} +2 -2
- package/dist/chunks/{SuperSubPlugin-DVP7VnIz.mjs.map → SuperSubPlugin-D1xaKrSu.mjs.map} +1 -1
- package/dist/chunks/TableDimensions-BBhjHNjQ.mjs +2 -0
- package/dist/chunks/TableDimensions-BBhjHNjQ.mjs.map +1 -0
- package/dist/chunks/TablePlugin-PJe3zwr-.mjs +2 -0
- package/dist/chunks/TablePlugin-PJe3zwr-.mjs.map +1 -0
- package/dist/chunks/TextColorPlugin-CTd9tfeG.mjs +2 -0
- package/dist/chunks/{TextColorPlugin-C1qpzEOa.mjs.map → TextColorPlugin-CTd9tfeG.mjs.map} +1 -1
- package/dist/chunks/TextDirectionAutoPlugin-CPnKVVuI.mjs +2 -0
- package/dist/chunks/{TextDirectionAutoPlugin-CzWJjrvG.mjs.map → TextDirectionAutoPlugin-CPnKVVuI.mjs.map} +1 -1
- package/dist/chunks/{TextDirectionPlugin-DHB88HKf.mjs → TextDirectionPlugin-Bns_03vL.mjs} +2 -2
- package/dist/chunks/{TextDirectionPlugin-DHB88HKf.mjs.map → TextDirectionPlugin-Bns_03vL.mjs.map} +1 -1
- package/dist/chunks/TextDirectionService-BcX07mw2.mjs +2 -0
- package/dist/chunks/{TextDirectionService-OFOU6r_s.mjs.map → TextDirectionService-BcX07mw2.mjs.map} +1 -1
- package/dist/chunks/TextFormattingPlugin-DBVlePqj.mjs +2 -0
- package/dist/chunks/TextFormattingPlugin-DBVlePqj.mjs.map +1 -0
- package/dist/chunks/{ToolbarPlugin-CLz2wa2c.mjs → ToolbarPlugin-DtfGTO_V.mjs} +2 -2
- package/dist/chunks/{ToolbarPlugin-CLz2wa2c.mjs.map → ToolbarPlugin-DtfGTO_V.mjs.map} +1 -1
- package/dist/chunks/VideoPlugin-BrR8g6Rz.mjs +2 -0
- package/dist/chunks/VideoPlugin-BrR8g6Rz.mjs.map +1 -0
- package/dist/chunks/WordBoundary-CFpIJDNP.mjs +2 -0
- package/dist/chunks/{WordBoundary-DxeMBRyP.mjs.map → WordBoundary-CFpIJDNP.mjs.map} +1 -1
- package/dist/chunks/ar-Dg9PdDet.mjs +2 -0
- package/dist/chunks/ar-Dg9PdDet.mjs.map +1 -0
- package/dist/chunks/ar-eOA3UmiE.mjs +2 -0
- package/dist/chunks/{ar-BTShmP2E.mjs.map → ar-eOA3UmiE.mjs.map} +1 -1
- package/dist/chunks/de-DJ5EkXQo.mjs +2 -0
- package/dist/chunks/de-DJ5EkXQo.mjs.map +1 -0
- package/dist/chunks/{de-C--bRmjW.mjs → de-DRbhnS4T.mjs} +2 -2
- package/dist/chunks/{de-C--bRmjW.mjs.map → de-DRbhnS4T.mjs.map} +1 -1
- package/dist/chunks/{es-DFUVd7eO.mjs → es-BQ9dox_E.mjs} +2 -2
- package/dist/chunks/{es-DFUVd7eO.mjs.map → es-BQ9dox_E.mjs.map} +1 -1
- package/dist/chunks/es-CEAJj7aB.mjs +2 -0
- package/dist/chunks/es-CEAJj7aB.mjs.map +1 -0
- package/dist/chunks/fr-DhWQzZy3.mjs +2 -0
- package/dist/chunks/fr-DhWQzZy3.mjs.map +1 -0
- package/dist/chunks/{fr-BaXKyPmX.mjs → fr-NVOinLyF.mjs} +2 -2
- package/dist/chunks/{fr-BaXKyPmX.mjs.map → fr-NVOinLyF.mjs.map} +1 -1
- package/dist/chunks/full-DSWM4cKQ.mjs +2 -0
- package/dist/chunks/{full-Cah3qjCT.mjs.map → full-DSWM4cKQ.mjs.map} +1 -1
- package/dist/chunks/hi-BsZzSMfL.mjs +2 -0
- package/dist/chunks/hi-BsZzSMfL.mjs.map +1 -0
- package/dist/chunks/{hi-aH9HZG23.mjs → hi-DrC2H81d.mjs} +2 -2
- package/dist/chunks/{hi-aH9HZG23.mjs.map → hi-DrC2H81d.mjs.map} +1 -1
- package/dist/chunks/minimal-CFkkPXef.mjs +2 -0
- package/dist/chunks/{minimal-DqATlnAL.mjs.map → minimal-CFkkPXef.mjs.map} +1 -1
- package/dist/chunks/pt-BuZ7acHF.mjs +2 -0
- package/dist/chunks/pt-BuZ7acHF.mjs.map +1 -0
- package/dist/chunks/{pt-Hy-0Xnnc.mjs → pt-CFrcl1v_.mjs} +2 -2
- package/dist/chunks/{pt-Hy-0Xnnc.mjs.map → pt-CFrcl1v_.mjs.map} +1 -1
- package/dist/chunks/rolldown-runtime-H_PjY6_i.mjs +1 -0
- package/dist/chunks/ru-CsP6mLxp.mjs +2 -0
- package/dist/chunks/ru-CsP6mLxp.mjs.map +1 -0
- package/dist/chunks/{ru-BFpEOrVp.mjs → ru-gxbzqLL8.mjs} +2 -2
- package/dist/chunks/{ru-BFpEOrVp.mjs.map → ru-gxbzqLL8.mjs.map} +1 -1
- package/dist/chunks/src-DiAOfuOT.mjs +2 -0
- package/dist/chunks/src-DiAOfuOT.mjs.map +1 -0
- package/dist/chunks/zh-BFZOM3lF.mjs +2 -0
- package/dist/chunks/{zh-BjoyjClN.mjs.map → zh-BFZOM3lF.mjs.map} +1 -1
- package/dist/chunks/zh-CiIyOm6U.mjs +2 -0
- package/dist/chunks/zh-CiIyOm6U.mjs.map +1 -0
- package/dist/commands/BlockInsertion.d.ts +5 -3
- package/dist/commands/BlockInsertion.d.ts.map +1 -1
- package/dist/commands/SelectionDeletion.d.ts +13 -2
- package/dist/commands/SelectionDeletion.d.ts.map +1 -1
- package/dist/editor/ContentSerializer.d.ts +21 -0
- package/dist/editor/ContentSerializer.d.ts.map +1 -1
- package/dist/editor/EditorConfig.d.ts +17 -0
- package/dist/editor/EditorConfig.d.ts.map +1 -1
- package/dist/editor/EditorConfigController.d.ts +10 -0
- package/dist/editor/EditorConfigController.d.ts.map +1 -1
- package/dist/editor/EditorInitializer.d.ts +4 -0
- package/dist/editor/EditorInitializer.d.ts.map +1 -1
- package/dist/editor/EditorLocale.d.ts +2 -0
- package/dist/editor/EditorLocale.d.ts.map +1 -1
- package/dist/editor/MarkdownMode.d.ts +46 -0
- package/dist/editor/MarkdownMode.d.ts.map +1 -0
- package/dist/editor/NotectlEditor.d.ts +46 -3
- package/dist/editor/NotectlEditor.d.ts.map +1 -1
- package/dist/editor/locales/ar.d.ts.map +1 -1
- package/dist/editor/locales/de.d.ts.map +1 -1
- package/dist/editor/locales/es.d.ts.map +1 -1
- package/dist/editor/locales/fr.d.ts.map +1 -1
- package/dist/editor/locales/hi.d.ts.map +1 -1
- package/dist/editor/locales/pt.d.ts.map +1 -1
- package/dist/editor/locales/ru.d.ts.map +1 -1
- package/dist/editor/locales/zh.d.ts.map +1 -1
- package/dist/editor/styles/list.d.ts +1 -1
- package/dist/editor/styles/list.d.ts.map +1 -1
- package/dist/editor/styles/table.d.ts +1 -1
- package/dist/editor/styles/table.d.ts.map +1 -1
- package/dist/full.mjs +1 -1
- package/dist/html.d.ts +1 -0
- package/dist/html.d.ts.map +1 -1
- package/dist/html.mjs +1 -1
- package/dist/index.d.ts +5 -5
- package/dist/index.d.ts.map +1 -1
- package/dist/input/ClipboardHandler.d.ts +2 -0
- package/dist/input/ClipboardHandler.d.ts.map +1 -1
- package/dist/input/InputHandler.d.ts +7 -0
- package/dist/input/InputHandler.d.ts.map +1 -1
- package/dist/input/InputManager.d.ts +10 -0
- package/dist/input/InputManager.d.ts.map +1 -1
- package/dist/input/KeyboardHandler.d.ts.map +1 -1
- package/dist/input/MarkdownPasteDetector.d.ts +26 -0
- package/dist/input/MarkdownPasteDetector.d.ts.map +1 -0
- package/dist/input/PasteHTMLHandler.d.ts +18 -1
- package/dist/input/PasteHTMLHandler.d.ts.map +1 -1
- package/dist/input/PasteHandler.d.ts +30 -0
- package/dist/input/PasteHandler.d.ts.map +1 -1
- package/dist/input/PasteRichBlockHandler.d.ts.map +1 -1
- package/dist/input/SelectionDocument.d.ts +2 -1
- package/dist/input/SelectionDocument.d.ts.map +1 -1
- package/dist/markdown.d.ts +17 -0
- package/dist/markdown.d.ts.map +1 -0
- package/dist/markdown.mjs +1 -0
- package/dist/model/AttrRegistry.d.ts +2 -2
- package/dist/model/AttrRegistry.d.ts.map +1 -1
- package/dist/model/ContentModel.d.ts +12 -0
- package/dist/model/ContentModel.d.ts.map +1 -1
- package/dist/model/Document.d.ts +28 -3
- package/dist/model/Document.d.ts.map +1 -1
- package/dist/model/HTMLUtils.d.ts +15 -0
- package/dist/model/HTMLUtils.d.ts.map +1 -1
- package/dist/model/InlineNodeSpec.d.ts +7 -1
- package/dist/model/InlineNodeSpec.d.ts.map +1 -1
- package/dist/model/InputRule.d.ts +11 -0
- package/dist/model/InputRule.d.ts.map +1 -1
- package/dist/model/MarkSpec.d.ts +7 -1
- package/dist/model/MarkSpec.d.ts.map +1 -1
- package/dist/model/MarkdownSyntaxRegistry.d.ts +51 -0
- package/dist/model/MarkdownSyntaxRegistry.d.ts.map +1 -0
- package/dist/model/NodeSpec.d.ts +47 -1
- package/dist/model/NodeSpec.d.ts.map +1 -1
- package/dist/model/RichBlockData.d.ts +2 -0
- package/dist/model/RichBlockData.d.ts.map +1 -1
- package/dist/model/SchemaRegistry.d.ts.map +1 -1
- package/dist/model/TableDimensions.d.ts +11 -0
- package/dist/model/TableDimensions.d.ts.map +1 -0
- package/dist/notectl-core.mjs +1 -1
- package/dist/notectl-core.umd.js +1 -1
- package/dist/notectl-core.umd.js.map +1 -1
- package/dist/platform/EditorEventBoundary.d.ts +12 -0
- package/dist/platform/EditorEventBoundary.d.ts.map +1 -0
- package/dist/plugins/Plugin.d.ts +7 -0
- package/dist/plugins/Plugin.d.ts.map +1 -1
- package/dist/plugins/PluginContextFactory.d.ts +2 -0
- package/dist/plugins/PluginContextFactory.d.ts.map +1 -1
- package/dist/plugins/PluginManager.d.ts +2 -0
- package/dist/plugins/PluginManager.d.ts.map +1 -1
- package/dist/plugins/alignment.mjs +1 -1
- package/dist/plugins/bidi-isolation.mjs +1 -1
- package/dist/plugins/blockquote/BlockquotePlugin.d.ts +2 -0
- package/dist/plugins/blockquote/BlockquotePlugin.d.ts.map +1 -1
- package/dist/plugins/blockquote.mjs +1 -1
- package/dist/plugins/caret-navigation.mjs +1 -1
- package/dist/plugins/code-block/CodeBlockTypes.d.ts +2 -0
- package/dist/plugins/code-block/CodeBlockTypes.d.ts.map +1 -1
- package/dist/plugins/code-block.mjs +1 -1
- package/dist/plugins/font-size/FontSizeOperations.d.ts.map +1 -1
- package/dist/plugins/font-size.mjs +1 -1
- package/dist/plugins/font.mjs +1 -1
- package/dist/plugins/formula/DisplayMathNodeSpec.d.ts.map +1 -1
- package/dist/plugins/formula/FormulaInputRules.d.ts.map +1 -1
- package/dist/plugins/formula/FormulaMarkdownSyntax.d.ts +4 -0
- package/dist/plugins/formula/FormulaMarkdownSyntax.d.ts.map +1 -0
- package/dist/plugins/formula/FormulaPlugin.d.ts.map +1 -1
- package/dist/plugins/formula/FormulaTypes.d.ts +2 -0
- package/dist/plugins/formula/FormulaTypes.d.ts.map +1 -1
- package/dist/plugins/formula/InlineMathNodeSpec.d.ts.map +1 -1
- package/dist/plugins/formula.mjs +1 -1
- package/dist/plugins/gap-cursor.mjs +1 -1
- package/dist/plugins/hard-break.mjs +1 -1
- package/dist/plugins/heading/HeadingPlugin.d.ts +2 -0
- package/dist/plugins/heading/HeadingPlugin.d.ts.map +1 -1
- package/dist/plugins/heading.mjs +1 -1
- package/dist/plugins/highlight.mjs +1 -1
- package/dist/plugins/horizontal-rule/HorizontalRulePlugin.d.ts +2 -0
- package/dist/plugins/horizontal-rule/HorizontalRulePlugin.d.ts.map +1 -1
- package/dist/plugins/horizontal-rule.mjs +1 -1
- package/dist/plugins/image/ImagePlugin.d.ts +14 -0
- package/dist/plugins/image/ImagePlugin.d.ts.map +1 -1
- package/dist/plugins/image.mjs +1 -1
- package/dist/plugins/inline-code/InlineCodePlugin.d.ts.map +1 -1
- package/dist/plugins/inline-code.mjs +1 -1
- package/dist/plugins/link/LinkPlugin.d.ts +14 -0
- package/dist/plugins/link/LinkPlugin.d.ts.map +1 -1
- package/dist/plugins/link.mjs +1 -1
- package/dist/plugins/list/ListCommands.d.ts +5 -1
- package/dist/plugins/list/ListCommands.d.ts.map +1 -1
- package/dist/plugins/list/ListInputRules.d.ts.map +1 -1
- package/dist/plugins/list/ListItemContext.d.ts +27 -0
- package/dist/plugins/list/ListItemContext.d.ts.map +1 -0
- package/dist/plugins/list/ListKeyboardHandlers.d.ts.map +1 -1
- package/dist/plugins/list/ListPlugin.d.ts +2 -0
- package/dist/plugins/list/ListPlugin.d.ts.map +1 -1
- package/dist/plugins/list/ListToolbarItems.d.ts.map +1 -1
- package/dist/plugins/list.mjs +1 -1
- package/dist/plugins/print/PrintContentPreparer.d.ts.map +1 -1
- package/dist/plugins/print/PrintDestinationBridge.d.ts +23 -0
- package/dist/plugins/print/PrintDestinationBridge.d.ts.map +1 -0
- package/dist/plugins/print/PrintHostStyles.d.ts +50 -0
- package/dist/plugins/print/PrintHostStyles.d.ts.map +1 -0
- package/dist/plugins/print/PrintPlugin.d.ts.map +1 -1
- package/dist/plugins/print/PrintServiceImpl.d.ts +76 -3
- package/dist/plugins/print/PrintServiceImpl.d.ts.map +1 -1
- package/dist/plugins/print/PrintStyleCollector.d.ts +150 -21
- package/dist/plugins/print/PrintStyleCollector.d.ts.map +1 -1
- package/dist/plugins/print/StaticHostMarker.d.ts +18 -0
- package/dist/plugins/print/StaticHostMarker.d.ts.map +1 -0
- package/dist/plugins/print.mjs +1 -1
- package/dist/plugins/shared/MarkInputRule.d.ts +9 -0
- package/dist/plugins/shared/MarkInputRule.d.ts.map +1 -0
- package/dist/plugins/shared/PopupPositioning.d.ts +2 -0
- package/dist/plugins/shared/PopupPositioning.d.ts.map +1 -1
- package/dist/plugins/shared/index.d.ts +1 -0
- package/dist/plugins/shared/index.d.ts.map +1 -1
- package/dist/plugins/shared.mjs +1 -1
- package/dist/plugins/smart-paste.mjs +1 -1
- package/dist/plugins/strikethrough/StrikethroughPlugin.d.ts +2 -0
- package/dist/plugins/strikethrough/StrikethroughPlugin.d.ts.map +1 -1
- package/dist/plugins/strikethrough.mjs +1 -1
- package/dist/plugins/super-sub.mjs +1 -1
- package/dist/plugins/table/TableClipboard.d.ts +8 -0
- package/dist/plugins/table/TableClipboard.d.ts.map +1 -0
- package/dist/plugins/table/TableCommands.d.ts.map +1 -1
- package/dist/plugins/table/TableContextMenu.d.ts +11 -1
- package/dist/plugins/table/TableContextMenu.d.ts.map +1 -1
- package/dist/plugins/table/TableControls.d.ts +6 -1
- package/dist/plugins/table/TableControls.d.ts.map +1 -1
- package/dist/plugins/table/TableControlsDOM.d.ts +11 -2
- package/dist/plugins/table/TableControlsDOM.d.ts.map +1 -1
- package/dist/plugins/table/TableControlsLayout.d.ts +12 -3
- package/dist/plugins/table/TableControlsLayout.d.ts.map +1 -1
- package/dist/plugins/table/TableGrid.d.ts +57 -0
- package/dist/plugins/table/TableGrid.d.ts.map +1 -0
- package/dist/plugins/table/TableHelpers.d.ts +4 -0
- package/dist/plugins/table/TableHelpers.d.ts.map +1 -1
- package/dist/plugins/table/TableLocale.d.ts +30 -0
- package/dist/plugins/table/TableLocale.d.ts.map +1 -1
- package/dist/plugins/table/TableNavigation.d.ts +5 -1
- package/dist/plugins/table/TableNavigation.d.ts.map +1 -1
- package/dist/plugins/table/TableNodeViews.d.ts +13 -1
- package/dist/plugins/table/TableNodeViews.d.ts.map +1 -1
- package/dist/plugins/table/TablePlugin.d.ts +21 -1
- package/dist/plugins/table/TablePlugin.d.ts.map +1 -1
- package/dist/plugins/table/TableSelection.d.ts.map +1 -1
- package/dist/plugins/table/TableSizeEditor.d.ts +11 -0
- package/dist/plugins/table/TableSizeEditor.d.ts.map +1 -0
- package/dist/plugins/table/TableSizing.d.ts +70 -0
- package/dist/plugins/table/TableSizing.d.ts.map +1 -0
- package/dist/plugins/table/index.d.ts +3 -1
- package/dist/plugins/table/index.d.ts.map +1 -1
- package/dist/plugins/table/locales/ar.d.ts.map +1 -1
- package/dist/plugins/table/locales/de.d.ts.map +1 -1
- package/dist/plugins/table/locales/es.d.ts.map +1 -1
- package/dist/plugins/table/locales/fr.d.ts.map +1 -1
- package/dist/plugins/table/locales/hi.d.ts.map +1 -1
- package/dist/plugins/table/locales/pt.d.ts.map +1 -1
- package/dist/plugins/table/locales/ru.d.ts.map +1 -1
- package/dist/plugins/table/locales/zh.d.ts.map +1 -1
- package/dist/plugins/table.mjs +1 -1
- package/dist/plugins/text-color.mjs +1 -1
- package/dist/plugins/text-direction-auto.mjs +1 -1
- package/dist/plugins/text-direction.mjs +1 -1
- package/dist/plugins/text-formatting/TextFormattingPlugin.d.ts +9 -0
- package/dist/plugins/text-formatting/TextFormattingPlugin.d.ts.map +1 -1
- package/dist/plugins/text-formatting.mjs +1 -1
- package/dist/plugins/toolbar.mjs +1 -1
- package/dist/plugins/video/VideoCommands.d.ts.map +1 -1
- package/dist/plugins/video.mjs +1 -1
- package/dist/presets/full.mjs +1 -1
- package/dist/presets/minimal.mjs +1 -1
- package/dist/presets.mjs +1 -1
- package/dist/serialization/DocumentParser.d.ts.map +1 -1
- package/dist/serialization/DocumentSerializer.d.ts +2 -0
- package/dist/serialization/DocumentSerializer.d.ts.map +1 -1
- package/dist/serialization/HTMLSanitization.d.ts +15 -0
- package/dist/serialization/HTMLSanitization.d.ts.map +1 -0
- package/dist/serialization/MarkSerializer.d.ts +12 -0
- package/dist/serialization/MarkSerializer.d.ts.map +1 -1
- package/dist/serialization/MarkdownParser.d.ts +6 -0
- package/dist/serialization/MarkdownParser.d.ts.map +1 -0
- package/dist/serialization/MarkdownSerializer.d.ts +12 -0
- package/dist/serialization/MarkdownSerializer.d.ts.map +1 -0
- package/dist/serialization/MarkdownTypes.d.ts +59 -0
- package/dist/serialization/MarkdownTypes.d.ts.map +1 -0
- package/dist/serialization/TableDimensions.d.ts +37 -0
- package/dist/serialization/TableDimensions.d.ts.map +1 -0
- package/dist/serialization/markdown/BlockSerializers.d.ts +7 -0
- package/dist/serialization/markdown/BlockSerializers.d.ts.map +1 -0
- package/dist/serialization/markdown/BlockTokenizer.d.ts +54 -0
- package/dist/serialization/markdown/BlockTokenizer.d.ts.map +1 -0
- package/dist/serialization/markdown/GfmAutolink.d.ts +20 -0
- package/dist/serialization/markdown/GfmAutolink.d.ts.map +1 -0
- package/dist/serialization/markdown/GfmTableParser.d.ts +26 -0
- package/dist/serialization/markdown/GfmTableParser.d.ts.map +1 -0
- package/dist/serialization/markdown/InlineAst.d.ts +34 -0
- package/dist/serialization/markdown/InlineAst.d.ts.map +1 -0
- package/dist/serialization/markdown/InlineSerializers.d.ts +5 -0
- package/dist/serialization/markdown/InlineSerializers.d.ts.map +1 -0
- package/dist/serialization/markdown/InlineTokenizer.d.ts +5 -0
- package/dist/serialization/markdown/InlineTokenizer.d.ts.map +1 -0
- package/dist/serialization/markdown/LinkReferenceExtractor.d.ts +37 -0
- package/dist/serialization/markdown/LinkReferenceExtractor.d.ts.map +1 -0
- package/dist/serialization/markdown/MarkdownContext.d.ts +32 -0
- package/dist/serialization/markdown/MarkdownContext.d.ts.map +1 -0
- package/dist/serialization/markdown/MarkdownEntities.d.ts +33 -0
- package/dist/serialization/markdown/MarkdownEntities.d.ts.map +1 -0
- package/dist/serialization/markdown/MarkdownEscape.d.ts +33 -0
- package/dist/serialization/markdown/MarkdownEscape.d.ts.map +1 -0
- package/dist/serialization/markdown/MarkdownHTMLRegistry.d.ts +4 -0
- package/dist/serialization/markdown/MarkdownHTMLRegistry.d.ts.map +1 -0
- package/dist/serialization/markdown/MarkdownParseContext.d.ts +23 -0
- package/dist/serialization/markdown/MarkdownParseContext.d.ts.map +1 -0
- package/dist/state/Mapping.d.ts +33 -10
- package/dist/state/Mapping.d.ts.map +1 -1
- package/dist/state/StepApplication.d.ts +3 -1
- package/dist/state/StepApplication.d.ts.map +1 -1
- package/dist/state/StepHandlers.d.ts.map +1 -1
- package/dist/state/StepInversion.d.ts +2 -1
- package/dist/state/StepInversion.d.ts.map +1 -1
- package/dist/state/StepMapping.d.ts +3 -2
- package/dist/state/StepMapping.d.ts.map +1 -1
- package/dist/state/StepMaps.d.ts +3 -2
- package/dist/state/StepMaps.d.ts.map +1 -1
- package/dist/state/Steps.d.ts +34 -2
- package/dist/state/Steps.d.ts.map +1 -1
- package/dist/state/TransactionBuilder.d.ts +7 -1
- package/dist/state/TransactionBuilder.d.ts.map +1 -1
- package/dist/style/StyleRuntime.d.ts +7 -0
- package/dist/style/StyleRuntime.d.ts.map +1 -1
- package/dist/test/MarkdownConformanceUtils.d.ts +12 -0
- package/dist/test/MarkdownConformanceUtils.d.ts.map +1 -0
- package/dist/view/BlockRendering.d.ts +5 -0
- package/dist/view/BlockRendering.d.ts.map +1 -1
- package/dist/view/DecorationRendering.d.ts +6 -0
- package/dist/view/DecorationRendering.d.ts.map +1 -1
- package/dist/view/EditorViewEvents.d.ts.map +1 -1
- package/dist/view/Reconciler.d.ts.map +1 -1
- package/package.json +14 -1
- package/dist/chunks/AttrRegistry-DcDVyzLm.mjs.map +0 -1
- package/dist/chunks/BlockInsertion-6rR9tIGP.mjs +0 -2
- package/dist/chunks/BlockInsertion-6rR9tIGP.mjs.map +0 -1
- package/dist/chunks/BlockquotePlugin-4V7KV_Sb.mjs +0 -2
- package/dist/chunks/CodeBlockPlugin-DC0-BnNy.mjs +0 -2
- package/dist/chunks/CodeBlockPlugin-DC0-BnNy.mjs.map +0 -1
- package/dist/chunks/ColorPickerPopup-C_74bqid.mjs +0 -2
- package/dist/chunks/Commands-BIIpx_Zd.mjs +0 -2
- package/dist/chunks/Commands-BIIpx_Zd.mjs.map +0 -1
- package/dist/chunks/Decoration-ZeyVfwJB.mjs +0 -2
- package/dist/chunks/Decoration-ZeyVfwJB.mjs.map +0 -1
- package/dist/chunks/Document-r7vLOAGA.mjs +0 -2
- package/dist/chunks/Document-r7vLOAGA.mjs.map +0 -1
- package/dist/chunks/DocumentParser-CcTSeT1B.mjs +0 -2
- package/dist/chunks/DocumentParser-CcTSeT1B.mjs.map +0 -1
- package/dist/chunks/FontPlugin-DB1_bgam.mjs +0 -2
- package/dist/chunks/FontSizePlugin-DFvp7Ki9.mjs.map +0 -1
- package/dist/chunks/FormulaPlugin-BLEcyazj.mjs +0 -2
- package/dist/chunks/FormulaPlugin-BLEcyazj.mjs.map +0 -1
- package/dist/chunks/GapCursorNavigation-ycNzuQVH.mjs +0 -2
- package/dist/chunks/HTMLUtils-C6B4UT00.mjs +0 -2
- package/dist/chunks/HTMLUtils-C6B4UT00.mjs.map +0 -1
- package/dist/chunks/HeadingPlugin-D9yvG2Aw.mjs +0 -2
- package/dist/chunks/HorizontalRulePlugin-0FjHPZuA.mjs +0 -2
- package/dist/chunks/HorizontalRulePlugin-0FjHPZuA.mjs.map +0 -1
- package/dist/chunks/ImagePlugin-Cp_RINtc.mjs +0 -2
- package/dist/chunks/InlineCodePlugin-DMr4O7c7.mjs.map +0 -1
- package/dist/chunks/InlineStyleMarkSpec-4R6DC7ij.mjs +0 -2
- package/dist/chunks/LinkPlugin-DvZ3MPgL.mjs +0 -2
- package/dist/chunks/LinkPlugin-DvZ3MPgL.mjs.map +0 -1
- package/dist/chunks/ListPlugin-CVId2dE0.mjs +0 -2
- package/dist/chunks/ListPlugin-CVId2dE0.mjs.map +0 -1
- package/dist/chunks/NodeSelectionCommands-Dj4VxLdD.mjs +0 -2
- package/dist/chunks/PluginHelpers-KDuTlmXm.mjs +0 -2
- package/dist/chunks/PopupPositioning-DtUrY9bh.mjs +0 -2
- package/dist/chunks/PrintPlugin-C6gOJT6d.mjs +0 -2
- package/dist/chunks/PrintPlugin-C6gOJT6d.mjs.map +0 -1
- package/dist/chunks/PrintTypes-WdtgSj74.mjs.map +0 -1
- package/dist/chunks/StrikethroughPlugin-BLKDRWtf.mjs +0 -2
- package/dist/chunks/StrikethroughPlugin-BLKDRWtf.mjs.map +0 -1
- package/dist/chunks/StyleRuntime-BAutwDZT.mjs +0 -2
- package/dist/chunks/StyleRuntime-BAutwDZT.mjs.map +0 -1
- package/dist/chunks/TablePlugin-D93RR5xH.mjs +0 -2
- package/dist/chunks/TablePlugin-D93RR5xH.mjs.map +0 -1
- package/dist/chunks/TextColorPlugin-C1qpzEOa.mjs +0 -2
- package/dist/chunks/TextDirectionAutoPlugin-CzWJjrvG.mjs +0 -2
- package/dist/chunks/TextDirectionService-OFOU6r_s.mjs +0 -2
- package/dist/chunks/TextFormattingPlugin-Cubp3e7f.mjs +0 -2
- package/dist/chunks/TextFormattingPlugin-Cubp3e7f.mjs.map +0 -1
- package/dist/chunks/VideoPlugin-D9rQZol6.mjs +0 -2
- package/dist/chunks/VideoPlugin-D9rQZol6.mjs.map +0 -1
- package/dist/chunks/WordBoundary-DxeMBRyP.mjs +0 -2
- package/dist/chunks/ar-BTShmP2E.mjs +0 -2
- package/dist/chunks/ar-jbplYWkC.mjs +0 -2
- package/dist/chunks/ar-jbplYWkC.mjs.map +0 -1
- package/dist/chunks/de-DN-e6G5A.mjs +0 -2
- package/dist/chunks/de-DN-e6G5A.mjs.map +0 -1
- package/dist/chunks/es-CM55WeEN.mjs +0 -2
- package/dist/chunks/es-CM55WeEN.mjs.map +0 -1
- package/dist/chunks/fr-C_2i5Ono.mjs +0 -2
- package/dist/chunks/fr-C_2i5Ono.mjs.map +0 -1
- package/dist/chunks/full-Cah3qjCT.mjs +0 -2
- package/dist/chunks/hi-C9fvG91d.mjs +0 -2
- package/dist/chunks/hi-C9fvG91d.mjs.map +0 -1
- package/dist/chunks/minimal-DqATlnAL.mjs +0 -2
- package/dist/chunks/pt-GqLw5tN0.mjs +0 -2
- package/dist/chunks/pt-GqLw5tN0.mjs.map +0 -1
- package/dist/chunks/ru-4g_qsaLr.mjs +0 -2
- package/dist/chunks/ru-4g_qsaLr.mjs.map +0 -1
- package/dist/chunks/src-YY6n2SmV.mjs +0 -2
- package/dist/chunks/src-YY6n2SmV.mjs.map +0 -1
- package/dist/chunks/zh-BjoyjClN.mjs +0 -2
- package/dist/chunks/zh-DeZP08HI.mjs +0 -2
- package/dist/chunks/zh-DeZP08HI.mjs.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fr-DhWQzZy3.mjs","names":[],"sources":["../../src/plugins/table/locales/fr.ts"],"sourcesContent":["import type { TableLocale } from '../TableLocale.js';\n\nconst locale: TableLocale = {\n\tinsertRowAbove: 'Ins\\u00e9rer une ligne au-dessus',\n\tinsertRowBelow: 'Ins\\u00e9rer une ligne en dessous',\n\tinsertColumnLeft: 'Ins\\u00e9rer une colonne \\u00e0 gauche',\n\tinsertColumnRight: 'Ins\\u00e9rer une colonne \\u00e0 droite',\n\tdeleteRow: 'Supprimer la ligne',\n\tdeleteColumn: 'Supprimer la colonne',\n\tborderColorLabel: 'Couleur de bordure\\u2026',\n\tdeleteTable: 'Supprimer le tableau',\n\n\ttableActions: 'Actions du tableau',\n\tmenuKeyboardHint:\n\t\t'\\u2191\\u2193 Naviguer \\u00b7 Entr\\u00e9e S\\u00e9lectionner \\u00b7 \\u00c9chap Fermer',\n\n\tinsertRow: 'Ins\\u00e9rer une ligne',\n\tinsertColumn: 'Ins\\u00e9rer une colonne',\n\taddRow: 'Ajouter une ligne',\n\taddColumn: 'Ajouter une colonne',\n\ttableActionsHint: 'Actions du tableau (clic droit ou Maj+F10)',\n\tcontextMenuHint: 'Clic droit ou Maj+F10 pour les actions du tableau',\n\tborderColor: 'Couleur de bordure',\n\n\tsizeLabel: 'Taille\\u2026',\n\tsizeDialogLabel: 'Taille du tableau',\n\tcolumnWidthLabel: 'Largeur de colonne (px)',\n\trowMinimumHeightLabel: 'Hauteur minimale de ligne (px)',\n\tautomatic: 'Automatique',\n\tmixed: 'Mixte',\n\tapply: 'Appliquer',\n\tcancel: 'Annuler',\n\tresetColumnWidth: 'R\\u00e9initialiser la largeur de colonne',\n\tresetRowMinimumHeight: 'R\\u00e9initialiser la hauteur minimale de ligne',\n\tresetAllSizes: 'R\\u00e9initialiser toutes les tailles',\n\tinvalidDimensionRange: (minimum: number, maximum: number) =>\n\t\t`Saisissez une valeur comprise entre ${minimum} et ${maximum} px.`,\n\tselectRowLabel: (rowIndex: number) => `S\\u00e9lectionner la ligne ${rowIndex + 1}`,\n\tselectColumnLabel: (columnIndex: number) => `S\\u00e9lectionner la colonne ${columnIndex + 1}`,\n\tresizeColumnSeparatorLabel: (columnIndex: number) =>\n\t\t`Modifier la largeur de la colonne ${columnIndex + 1}`,\n\tresizeRowSeparatorLabel: (rowIndex: number) => `Modifier la hauteur de la ligne ${rowIndex + 1}`,\n\tresizeKeyboardHint: (step: number, largeStep: number) =>\n\t\t`Les fl\\u00e8ches modifient la taille de ${step} px ; maintenir Maj pour ${largeStep} px.`,\n\tannounceColumnWidthSet: (columnIndex: number, valuePx: number) =>\n\t\t`Largeur de la colonne ${columnIndex + 1} d\\u00e9finie sur ${valuePx} px.`,\n\tannounceRowMinimumHeightSet: (rowIndex: number, valuePx: number) =>\n\t\t`Hauteur minimale de la ligne ${rowIndex + 1} d\\u00e9finie sur ${valuePx} px.`,\n\tannounceColumnWidthReset: (columnIndex: number) =>\n\t\t`Largeur de la colonne ${columnIndex + 1} r\\u00e9initialis\\u00e9e en mode automatique.`,\n\tannounceRowMinimumHeightReset: (rowIndex: number) =>\n\t\t`Hauteur minimale de la ligne ${rowIndex + 1} r\\u00e9initialis\\u00e9e en mode automatique.`,\n\tannounceTableSizesReset:\n\t\t'Toutes les largeurs de colonne et hauteurs minimales de ligne ont \\u00e9t\\u00e9 r\\u00e9initialis\\u00e9es en mode automatique.',\n\n\tdefaultColor: 'Par d\\u00e9faut',\n\tnoBorders: 'Sans bordure',\n\tborderColorPicker: 'S\\u00e9lecteur de couleur de bordure',\n\tannounceBorderColorSet: (colorName: string) =>\n\t\t`Couleur de bordure du tableau d\\u00e9finie sur ${colorName}`,\n\tannounceBorderReset: 'Bordures du tableau r\\u00e9initialis\\u00e9es par d\\u00e9faut',\n\tborderSwatchLabel: (colorName: string) => `Bordure ${colorName}`,\n\n\tannounceRowInsertedAbove: 'Ligne ins\\u00e9r\\u00e9e au-dessus',\n\tannounceRowInsertedBelow: 'Ligne ins\\u00e9r\\u00e9e en dessous',\n\tannounceColumnInserted: (side: string) => `Colonne ins\\u00e9r\\u00e9e \\u00e0 ${side}`,\n\tannounceRowDeleted: 'Ligne supprim\\u00e9e',\n\tannounceColumnDeleted: 'Colonne supprim\\u00e9e',\n\tannounceTableDeleted: 'Tableau supprim\\u00e9',\n\n\tinsertTable: 'Ins\\u00e9rer un tableau',\n\n\ttableAriaLabel: (rows: number, cols: number) => `Tableau avec ${rows} lignes et ${cols} colonnes`,\n\ttableAriaDescription: 'Clic droit ou Maj+F10 pour les actions du tableau',\n};\n\nexport default locale;\n"],"mappings":"AAEA,IAAM,EAAsB,CAC3B,eAAgB,8BAChB,eAAgB,+BAChB,iBAAkB,+BAClB,kBAAmB,+BACnB,UAAW,qBACX,aAAc,uBACd,iBAAkB,sBAClB,YAAa,uBAEb,aAAc,qBACd,iBACC,mDAED,UAAW,oBACX,aAAc,sBACd,OAAQ,oBACR,UAAW,sBACX,iBAAkB,6CAClB,gBAAiB,oDACjB,YAAa,qBAEb,UAAW,UACX,gBAAiB,oBACjB,iBAAkB,0BAClB,sBAAuB,iCACvB,UAAW,cACX,MAAO,QACP,MAAO,YACP,OAAQ,UACR,iBAAkB,sCAClB,sBAAuB,6CACvB,cAAe,mCACf,sBAAA,CAAwB,EAAiB,IACxC,uCAAuC,QAAc,QACtD,eAAiB,GAAqB,yBAA8B,EAAW,IAC/E,kBAAoB,GAAwB,2BAAgC,EAAc,IAC1F,2BAA6B,GAC5B,qCAAqC,EAAc,IACpD,wBAA0B,GAAqB,mCAAmC,EAAW,IAC7F,mBAAA,CAAqB,EAAc,IAClC,sCAA2C,6BAAgC,QAC5E,uBAAA,CAAyB,EAAqB,IAC7C,yBAAyB,EAAc,iBAAsB,QAC9D,4BAAA,CAA8B,EAAkB,IAC/C,gCAAgC,EAAW,iBAAsB,QAClE,yBAA2B,GAC1B,yBAAyB,EAAc,uCACxC,8BAAgC,GAC/B,gCAAgC,EAAW,uCAC5C,wBACC,4GAED,aAAc,aACd,UAAW,eACX,kBAAmB,kCACnB,uBAAyB,GACxB,6CAAkD,IACnD,oBAAqB,gDACrB,kBAAoB,GAAsB,WAAW,IAErD,yBAA0B,0BAC1B,yBAA0B,2BAC1B,uBAAyB,GAAiB,qBAAoC,IAC9E,mBAAoB,kBACpB,sBAAuB,oBACvB,qBAAsB,mBAEtB,YAAa,qBAEb,eAAA,CAAiB,EAAc,IAAiB,gBAAgB,eAAkB,aAClF,qBAAsB"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var e={ariaLabel:"Éditeur de texte riche",ariaDescription:"Appuyez sur Échap pour quitter l’éditeur",defaultPlaceholder:"Commencez à écrire..."};export{e as default};
|
|
2
|
-
//# sourceMappingURL=fr-
|
|
1
|
+
var e={ariaLabel:"Éditeur de texte riche",ariaDescription:"Appuyez sur Échap pour quitter l’éditeur",defaultPlaceholder:"Commencez à écrire...",markdownImported:"Markdown importé"};export{e as default};
|
|
2
|
+
//# sourceMappingURL=fr-NVOinLyF.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fr-
|
|
1
|
+
{"version":3,"file":"fr-NVOinLyF.mjs","names":[],"sources":["../../src/editor/locales/fr.ts"],"sourcesContent":["import type { EditorLocale } from '../EditorLocale.js';\n\nconst locale: EditorLocale = {\n\tariaLabel: '\\u00c9diteur de texte riche',\n\tariaDescription: 'Appuyez sur \\u00c9chap pour quitter l\\u2019\\u00e9diteur',\n\tdefaultPlaceholder: 'Commencez \\u00e0 \\u00e9crire...',\n\tmarkdownImported: 'Markdown import\\u00e9',\n};\n\nexport default locale;\n"],"mappings":"AAEA,IAAM,EAAuB,CAC5B,UAAW,yBACX,gBAAiB,2CACjB,mBAAoB,wBACpB,iBAAkB"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{t}from"./TextFormattingPlugin-DBVlePqj.mjs";import{t as o}from"./FontPlugin-By-TGrQo.mjs";import{n as i}from"./AlignmentPlugin--xAFlRqE.mjs";import{t as m}from"./BidiIsolationPlugin-DBXyXpgm.mjs";import{t as n}from"./BlockquotePlugin-Bz2glHwX.mjs";import{t as r}from"./CodeBlockPlugin-C1hrdbSZ.mjs";import{t as e}from"./FontSizePlugin-Dln-tYXV.mjs";import{t as s}from"./FormulaPlugin-By1befrR.mjs";import{t as l}from"./HardBreakPlugin-DlbSlrdq.mjs";import{t as a}from"./HeadingPlugin-uMAjPOk5.mjs";import{t as u}from"./HighlightPlugin-Bj7FPkIQ.mjs";import{t as g}from"./HorizontalRulePlugin-DUVmTQpX.mjs";import{t as f}from"./ImagePlugin-FToCOjd5.mjs";import{t as p}from"./InlineCodePlugin-pISIoGQE.mjs";import{t as P}from"./LinkPlugin-Ct5Z180S.mjs";import{t as j}from"./ListPlugin-DAY5ezNs.mjs";import{t as w}from"./PrintPlugin-7zz9mhhU.mjs";import{t as d}from"./SmartPastePlugin-CYa_nD9v.mjs";import{t as c}from"./StrikethroughPlugin-C2oWvGc3.mjs";import{t as h}from"./SuperSubPlugin-D1xaKrSu.mjs";import{t as k}from"./TablePlugin-PJe3zwr-.mjs";import{t as x}from"./TextColorPlugin-CTd9tfeG.mjs";import{t as b}from"./TextDirectionAutoPlugin-CPnKVVuI.mjs";import{t as S}from"./TextDirectionPlugin-Bns_03vL.mjs";import{t as T}from"./VideoPlugin-BrR8g6Rz.mjs";function B(B){return{toolbar:[[new o({fonts:[],...B?.font}),new e(B?.fontSize)],[new t(B?.textFormatting),new c(B?.strikethrough),new p(B?.inlineCode),new h(B?.superSub),new m(B?.bidiIsolation)],[new x(B?.textColor),new u(B?.highlight)],[new a(B?.heading),new n(B?.blockquote),new r(B?.codeBlock)],[new i(B?.alignment),new S(B?.textDirection)],[new j(B?.list)],[new P(B?.link),new k(B?.table),new g(B?.horizontalRule),new f(B?.image),new s(B?.formula),new T(B?.video)],[new w(B?.print)]],plugins:[new l,new d(B?.smartPaste),new b(B?.textDirectionAuto)]}}export{B as t};
|
|
2
|
+
//# sourceMappingURL=full-DSWM4cKQ.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"full-
|
|
1
|
+
{"version":3,"file":"full-DSWM4cKQ.mjs","names":[],"sources":["../../src/presets/FullPreset.ts"],"sourcesContent":["/**\n * Full preset: a fully-featured editor with all standard plugins.\n */\n\nimport { AlignmentPlugin } from '../plugins/alignment/AlignmentPlugin.js';\nimport { BidiIsolationPlugin } from '../plugins/bidi-isolation/BidiIsolationPlugin.js';\nimport { BlockquotePlugin } from '../plugins/blockquote/BlockquotePlugin.js';\nimport { CodeBlockPlugin } from '../plugins/code-block/CodeBlockPlugin.js';\nimport { FontSizePlugin } from '../plugins/font-size/FontSizePlugin.js';\nimport { FontPlugin } from '../plugins/font/FontPlugin.js';\nimport { FormulaPlugin } from '../plugins/formula/FormulaPlugin.js';\nimport { HardBreakPlugin } from '../plugins/hard-break/HardBreakPlugin.js';\nimport { HeadingPlugin } from '../plugins/heading/HeadingPlugin.js';\nimport { HighlightPlugin } from '../plugins/highlight/HighlightPlugin.js';\nimport { HorizontalRulePlugin } from '../plugins/horizontal-rule/HorizontalRulePlugin.js';\nimport { ImagePlugin } from '../plugins/image/ImagePlugin.js';\nimport { InlineCodePlugin } from '../plugins/inline-code/InlineCodePlugin.js';\nimport { LinkPlugin } from '../plugins/link/LinkPlugin.js';\nimport { ListPlugin } from '../plugins/list/ListPlugin.js';\nimport { PrintPlugin } from '../plugins/print/PrintPlugin.js';\nimport { SmartPastePlugin } from '../plugins/smart-paste/SmartPastePlugin.js';\nimport { StrikethroughPlugin } from '../plugins/strikethrough/StrikethroughPlugin.js';\nimport { SuperSubPlugin } from '../plugins/super-sub/SuperSubPlugin.js';\nimport { TablePlugin } from '../plugins/table/TablePlugin.js';\nimport { TextColorPlugin } from '../plugins/text-color/TextColorPlugin.js';\nimport { TextDirectionAutoPlugin } from '../plugins/text-direction-auto/TextDirectionAutoPlugin.js';\nimport { TextDirectionPlugin } from '../plugins/text-direction/TextDirectionPlugin.js';\nimport { TextFormattingPlugin } from '../plugins/text-formatting/TextFormattingPlugin.js';\nimport { VideoPlugin } from '../plugins/video/VideoPlugin.js';\nimport type { FullPresetOptions, PresetConfig } from './PresetTypes.js';\n\n/**\n * Creates a fully-featured editor preset with all standard plugins.\n *\n * Pass `font.fonts` to supply font definitions (e.g. `STARTER_FONTS`).\n * Without explicit fonts, the font picker toolbar renders empty.\n *\n * Toolbar groups:\n * 1. Typography: Font, FontSize\n * 2. Inline marks: TextFormatting, Strikethrough, InlineCode, SuperSub, BidiIsolation\n * 3. Colors: TextColor, Highlight\n * 4. Block types: Heading, Blockquote, CodeBlock\n * 5. Paragraph layout: Alignment, TextDirection\n * 6. Lists: List\n * 7. Insert objects: Link, Table, HorizontalRule, Image, Formula\n * 8. Utility: Print\n *\n * Headless plugins: HardBreak, SmartPaste, TextDirectionAuto.\n */\nexport function createFullPreset(options?: FullPresetOptions): PresetConfig {\n\treturn {\n\t\ttoolbar: [\n\t\t\t[new FontPlugin({ fonts: [], ...options?.font }), new FontSizePlugin(options?.fontSize)],\n\t\t\t[\n\t\t\t\tnew TextFormattingPlugin(options?.textFormatting),\n\t\t\t\tnew StrikethroughPlugin(options?.strikethrough),\n\t\t\t\tnew InlineCodePlugin(options?.inlineCode),\n\t\t\t\tnew SuperSubPlugin(options?.superSub),\n\t\t\t\tnew BidiIsolationPlugin(options?.bidiIsolation),\n\t\t\t],\n\t\t\t[new TextColorPlugin(options?.textColor), new HighlightPlugin(options?.highlight)],\n\t\t\t[\n\t\t\t\tnew HeadingPlugin(options?.heading),\n\t\t\t\tnew BlockquotePlugin(options?.blockquote),\n\t\t\t\tnew CodeBlockPlugin(options?.codeBlock),\n\t\t\t],\n\t\t\t[new AlignmentPlugin(options?.alignment), new TextDirectionPlugin(options?.textDirection)],\n\t\t\t[new ListPlugin(options?.list)],\n\t\t\t[\n\t\t\t\tnew LinkPlugin(options?.link),\n\t\t\t\tnew TablePlugin(options?.table),\n\t\t\t\tnew HorizontalRulePlugin(options?.horizontalRule),\n\t\t\t\tnew ImagePlugin(options?.image),\n\t\t\t\tnew FormulaPlugin(options?.formula),\n\t\t\t\tnew VideoPlugin(options?.video),\n\t\t\t],\n\t\t\t[new PrintPlugin(options?.print)],\n\t\t],\n\t\tplugins: [\n\t\t\tnew HardBreakPlugin(),\n\t\t\tnew SmartPastePlugin(options?.smartPaste),\n\t\t\tnew TextDirectionAutoPlugin(options?.textDirectionAuto),\n\t\t],\n\t};\n}\n"],"mappings":"kvCAiDA,SAAgB,EAAiB,GAChC,MAAO,CACN,QAAS,CACR,CAAC,IAAI,EAAW,CAAE,MAAO,MAAO,GAAS,OAAS,IAAI,EAAe,GAAS,WAC9E,CACC,IAAI,EAAqB,GAAS,gBAClC,IAAI,EAAoB,GAAS,eACjC,IAAI,EAAiB,GAAS,YAC9B,IAAI,EAAe,GAAS,UAC5B,IAAI,EAAoB,GAAS,gBAElC,CAAC,IAAI,EAAgB,GAAS,WAAY,IAAI,EAAgB,GAAS,YACvE,CACC,IAAI,EAAc,GAAS,SAC3B,IAAI,EAAiB,GAAS,YAC9B,IAAI,EAAgB,GAAS,YAE9B,CAAC,IAAI,EAAgB,GAAS,WAAY,IAAI,EAAoB,GAAS,gBAC3E,CAAC,IAAI,EAAW,GAAS,OACzB,CACC,IAAI,EAAW,GAAS,MACxB,IAAI,EAAY,GAAS,OACzB,IAAI,EAAqB,GAAS,gBAClC,IAAI,EAAY,GAAS,OACzB,IAAI,EAAc,GAAS,SAC3B,IAAI,EAAY,GAAS,QAE1B,CAAC,IAAI,EAAY,GAAS,SAE3B,QAAS,CACR,IAAI,EACJ,IAAI,EAAiB,GAAS,YAC9B,IAAI,EAAwB,GAAS,oBAGxC"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
var e={insertRowAbove:"ऊपर पंक्ति डालें",insertRowBelow:"नीचे पंक्ति डालें",insertColumnLeft:"बाएं स्तंभ डालें",insertColumnRight:"दाएं स्तंभ डालें",deleteRow:"पंक्ति हटाएं",deleteColumn:"स्तंभ हटाएं",borderColorLabel:"बॉर्डर रंग…",deleteTable:"तालिका हटाएं",tableActions:"तालिका क्रियाएं",menuKeyboardHint:"↑↓ नेविगेशन · Enter चुनें · Esc बंद करें",insertRow:"पंक्ति डालें",insertColumn:"स्तंभ डालें",addRow:"पंक्ति जोड़ें",addColumn:"स्तंभ जोड़ें",tableActionsHint:"तालिका क्रियाएं (राइट-क्लिक या Shift+F10)",contextMenuHint:"तालिका क्रियाओं के लिए राइट-क्लिक या Shift+F10",borderColor:"बॉर्डर रंग",sizeLabel:"आकार…",sizeDialogLabel:"तालिका का आकार",columnWidthLabel:"स्तंभ की चौड़ाई (px)",rowMinimumHeightLabel:"पंक्ति की न्यूनतम ऊंचाई (px)",automatic:"स्वचालित",mixed:"मिश्रित",apply:"लागू करें",cancel:"रद्द करें",resetColumnWidth:"स्तंभ की चौड़ाई रीसेट करें",resetRowMinimumHeight:"पंक्ति की न्यूनतम ऊंचाई रीसेट करें",resetAllSizes:"सभी आकार रीसेट करें",invalidDimensionRange:(e,n)=>`${e} से ${n} px के बीच का मान दर्ज करें।`,selectRowLabel:e=>`पंक्ति ${e+1} चुनें`,selectColumnLabel:e=>`स्तंभ ${e+1} चुनें`,resizeColumnSeparatorLabel:e=>`स्तंभ ${e+1} की चौड़ाई बदलें`,resizeRowSeparatorLabel:e=>`पंक्ति ${e+1} की ऊंचाई बदलें`,resizeKeyboardHint:(e,n)=>`तीर कुंजियां आकार को ${e} px बदलती हैं; ${n} px के लिए Shift दबाए रखें।`,announceColumnWidthSet:(e,n)=>`स्तंभ ${e+1} की चौड़ाई ${n} px सेट की गई।`,announceRowMinimumHeightSet:(e,n)=>`पंक्ति ${e+1} की न्यूनतम ऊंचाई ${n} px सेट की गई।`,announceColumnWidthReset:e=>`स्तंभ ${e+1} की चौड़ाई स्वचालित पर रीसेट की गई।`,announceRowMinimumHeightReset:e=>`पंक्ति ${e+1} की न्यूनतम ऊंचाई स्वचालित पर रीसेट की गई।`,announceTableSizesReset:"सभी स्तंभ चौड़ाइयां और पंक्ति की न्यूनतम ऊंचाइयां स्वचालित पर रीसेट की गईं।",defaultColor:"डिफ़ॉल्ट",noBorders:"कोई बॉर्डर नहीं",borderColorPicker:"बॉर्डर रंग चुनें",announceBorderColorSet:e=>`तालिका बॉर्डर रंग ${e} पर सेट किया गया`,announceBorderReset:"तालिका बॉर्डर डिफ़ॉल्ट पर रीसेट किया गया",borderSwatchLabel:e=>`बॉर्डर ${e}`,announceRowInsertedAbove:"ऊपर पंक्ति डाली गई",announceRowInsertedBelow:"नीचे पंक्ति डाली गई",announceColumnInserted:e=>`स्तंभ ${e} डाला गया`,announceRowDeleted:"पंक्ति हटाई गई",announceColumnDeleted:"स्तंभ हटाया गया",announceTableDeleted:"तालिका हटाई गई",insertTable:"तालिका डालें",tableAriaLabel:(e,n)=>`तालिका: ${e} पंक्तियां और ${n} स्तंभ`,tableAriaDescription:"तालिका क्रियाओं के लिए राइट-क्लिक या Shift+F10"};export{e as default};
|
|
2
|
+
//# sourceMappingURL=hi-BsZzSMfL.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hi-BsZzSMfL.mjs","names":[],"sources":["../../src/plugins/table/locales/hi.ts"],"sourcesContent":["import type { TableLocale } from '../TableLocale.js';\n\nconst locale: TableLocale = {\n\tinsertRowAbove:\n\t\t'\\u090a\\u092a\\u0930 \\u092a\\u0902\\u0915\\u094d\\u0924\\u093f \\u0921\\u093e\\u0932\\u0947\\u0902',\n\tinsertRowBelow:\n\t\t'\\u0928\\u0940\\u091a\\u0947 \\u092a\\u0902\\u0915\\u094d\\u0924\\u093f \\u0921\\u093e\\u0932\\u0947\\u0902',\n\tinsertColumnLeft:\n\t\t'\\u092c\\u093e\\u090f\\u0902 \\u0938\\u094d\\u0924\\u0902\\u092d \\u0921\\u093e\\u0932\\u0947\\u0902',\n\tinsertColumnRight:\n\t\t'\\u0926\\u093e\\u090f\\u0902 \\u0938\\u094d\\u0924\\u0902\\u092d \\u0921\\u093e\\u0932\\u0947\\u0902',\n\tdeleteRow: '\\u092a\\u0902\\u0915\\u094d\\u0924\\u093f \\u0939\\u091f\\u093e\\u090f\\u0902',\n\tdeleteColumn: '\\u0938\\u094d\\u0924\\u0902\\u092d \\u0939\\u091f\\u093e\\u090f\\u0902',\n\tborderColorLabel: '\\u092c\\u0949\\u0930\\u094d\\u0921\\u0930 \\u0930\\u0902\\u0917\\u2026',\n\tdeleteTable: '\\u0924\\u093e\\u0932\\u093f\\u0915\\u093e \\u0939\\u091f\\u093e\\u090f\\u0902',\n\n\ttableActions:\n\t\t'\\u0924\\u093e\\u0932\\u093f\\u0915\\u093e \\u0915\\u094d\\u0930\\u093f\\u092f\\u093e\\u090f\\u0902',\n\tmenuKeyboardHint:\n\t\t'\\u2191\\u2193 \\u0928\\u0947\\u0935\\u093f\\u0917\\u0947\\u0936\\u0928 \\u00b7 Enter \\u091a\\u0941\\u0928\\u0947\\u0902 \\u00b7 Esc \\u092c\\u0902\\u0926 \\u0915\\u0930\\u0947\\u0902',\n\n\tinsertRow: '\\u092a\\u0902\\u0915\\u094d\\u0924\\u093f \\u0921\\u093e\\u0932\\u0947\\u0902',\n\tinsertColumn: '\\u0938\\u094d\\u0924\\u0902\\u092d \\u0921\\u093e\\u0932\\u0947\\u0902',\n\taddRow: '\\u092a\\u0902\\u0915\\u094d\\u0924\\u093f \\u091c\\u094b\\u0921\\u093c\\u0947\\u0902',\n\taddColumn: '\\u0938\\u094d\\u0924\\u0902\\u092d \\u091c\\u094b\\u0921\\u093c\\u0947\\u0902',\n\ttableActionsHint:\n\t\t'\\u0924\\u093e\\u0932\\u093f\\u0915\\u093e \\u0915\\u094d\\u0930\\u093f\\u092f\\u093e\\u090f\\u0902 (\\u0930\\u093e\\u0907\\u091f-\\u0915\\u094d\\u0932\\u093f\\u0915 \\u092f\\u093e Shift+F10)',\n\tcontextMenuHint:\n\t\t'\\u0924\\u093e\\u0932\\u093f\\u0915\\u093e \\u0915\\u094d\\u0930\\u093f\\u092f\\u093e\\u0913\\u0902 \\u0915\\u0947 \\u0932\\u093f\\u090f \\u0930\\u093e\\u0907\\u091f-\\u0915\\u094d\\u0932\\u093f\\u0915 \\u092f\\u093e Shift+F10',\n\tborderColor: '\\u092c\\u0949\\u0930\\u094d\\u0921\\u0930 \\u0930\\u0902\\u0917',\n\n\tsizeLabel: '\\u0906\\u0915\\u093e\\u0930\\u2026',\n\tsizeDialogLabel: '\\u0924\\u093e\\u0932\\u093f\\u0915\\u093e \\u0915\\u093e \\u0906\\u0915\\u093e\\u0930',\n\tcolumnWidthLabel:\n\t\t'\\u0938\\u094d\\u0924\\u0902\\u092d \\u0915\\u0940 \\u091a\\u094c\\u0921\\u093c\\u093e\\u0908 (px)',\n\trowMinimumHeightLabel:\n\t\t'\\u092a\\u0902\\u0915\\u094d\\u0924\\u093f \\u0915\\u0940 \\u0928\\u094d\\u092f\\u0942\\u0928\\u0924\\u092e \\u090a\\u0902\\u091a\\u093e\\u0908 (px)',\n\tautomatic: '\\u0938\\u094d\\u0935\\u091a\\u093e\\u0932\\u093f\\u0924',\n\tmixed: '\\u092e\\u093f\\u0936\\u094d\\u0930\\u093f\\u0924',\n\tapply: '\\u0932\\u093e\\u0917\\u0942 \\u0915\\u0930\\u0947\\u0902',\n\tcancel: '\\u0930\\u0926\\u094d\\u0926 \\u0915\\u0930\\u0947\\u0902',\n\tresetColumnWidth:\n\t\t'\\u0938\\u094d\\u0924\\u0902\\u092d \\u0915\\u0940 \\u091a\\u094c\\u0921\\u093c\\u093e\\u0908 \\u0930\\u0940\\u0938\\u0947\\u091f \\u0915\\u0930\\u0947\\u0902',\n\tresetRowMinimumHeight:\n\t\t'\\u092a\\u0902\\u0915\\u094d\\u0924\\u093f \\u0915\\u0940 \\u0928\\u094d\\u092f\\u0942\\u0928\\u0924\\u092e \\u090a\\u0902\\u091a\\u093e\\u0908 \\u0930\\u0940\\u0938\\u0947\\u091f \\u0915\\u0930\\u0947\\u0902',\n\tresetAllSizes:\n\t\t'\\u0938\\u092d\\u0940 \\u0906\\u0915\\u093e\\u0930 \\u0930\\u0940\\u0938\\u0947\\u091f \\u0915\\u0930\\u0947\\u0902',\n\tinvalidDimensionRange: (minimum: number, maximum: number) =>\n\t\t`${minimum} \\u0938\\u0947 ${maximum} px \\u0915\\u0947 \\u092c\\u0940\\u091a \\u0915\\u093e \\u092e\\u093e\\u0928 \\u0926\\u0930\\u094d\\u091c \\u0915\\u0930\\u0947\\u0902\\u0964`,\n\tselectRowLabel: (rowIndex: number) =>\n\t\t`\\u092a\\u0902\\u0915\\u094d\\u0924\\u093f ${rowIndex + 1} \\u091a\\u0941\\u0928\\u0947\\u0902`,\n\tselectColumnLabel: (columnIndex: number) =>\n\t\t`\\u0938\\u094d\\u0924\\u0902\\u092d ${columnIndex + 1} \\u091a\\u0941\\u0928\\u0947\\u0902`,\n\tresizeColumnSeparatorLabel: (columnIndex: number) =>\n\t\t`\\u0938\\u094d\\u0924\\u0902\\u092d ${columnIndex + 1} \\u0915\\u0940 \\u091a\\u094c\\u0921\\u093c\\u093e\\u0908 \\u092c\\u0926\\u0932\\u0947\\u0902`,\n\tresizeRowSeparatorLabel: (rowIndex: number) =>\n\t\t`\\u092a\\u0902\\u0915\\u094d\\u0924\\u093f ${rowIndex + 1} \\u0915\\u0940 \\u090a\\u0902\\u091a\\u093e\\u0908 \\u092c\\u0926\\u0932\\u0947\\u0902`,\n\tresizeKeyboardHint: (step: number, largeStep: number) =>\n\t\t`\\u0924\\u0940\\u0930 \\u0915\\u0941\\u0902\\u091c\\u093f\\u092f\\u093e\\u0902 \\u0906\\u0915\\u093e\\u0930 \\u0915\\u094b ${step} px \\u092c\\u0926\\u0932\\u0924\\u0940 \\u0939\\u0948\\u0902; ${largeStep} px \\u0915\\u0947 \\u0932\\u093f\\u090f Shift \\u0926\\u092c\\u093e\\u090f \\u0930\\u0916\\u0947\\u0902\\u0964`,\n\tannounceColumnWidthSet: (columnIndex: number, valuePx: number) =>\n\t\t`\\u0938\\u094d\\u0924\\u0902\\u092d ${columnIndex + 1} \\u0915\\u0940 \\u091a\\u094c\\u0921\\u093c\\u093e\\u0908 ${valuePx} px \\u0938\\u0947\\u091f \\u0915\\u0940 \\u0917\\u0908\\u0964`,\n\tannounceRowMinimumHeightSet: (rowIndex: number, valuePx: number) =>\n\t\t`\\u092a\\u0902\\u0915\\u094d\\u0924\\u093f ${rowIndex + 1} \\u0915\\u0940 \\u0928\\u094d\\u092f\\u0942\\u0928\\u0924\\u092e \\u090a\\u0902\\u091a\\u093e\\u0908 ${valuePx} px \\u0938\\u0947\\u091f \\u0915\\u0940 \\u0917\\u0908\\u0964`,\n\tannounceColumnWidthReset: (columnIndex: number) =>\n\t\t`\\u0938\\u094d\\u0924\\u0902\\u092d ${columnIndex + 1} \\u0915\\u0940 \\u091a\\u094c\\u0921\\u093c\\u093e\\u0908 \\u0938\\u094d\\u0935\\u091a\\u093e\\u0932\\u093f\\u0924 \\u092a\\u0930 \\u0930\\u0940\\u0938\\u0947\\u091f \\u0915\\u0940 \\u0917\\u0908\\u0964`,\n\tannounceRowMinimumHeightReset: (rowIndex: number) =>\n\t\t`\\u092a\\u0902\\u0915\\u094d\\u0924\\u093f ${rowIndex + 1} \\u0915\\u0940 \\u0928\\u094d\\u092f\\u0942\\u0928\\u0924\\u092e \\u090a\\u0902\\u091a\\u093e\\u0908 \\u0938\\u094d\\u0935\\u091a\\u093e\\u0932\\u093f\\u0924 \\u092a\\u0930 \\u0930\\u0940\\u0938\\u0947\\u091f \\u0915\\u0940 \\u0917\\u0908\\u0964`,\n\tannounceTableSizesReset:\n\t\t'\\u0938\\u092d\\u0940 \\u0938\\u094d\\u0924\\u0902\\u092d \\u091a\\u094c\\u0921\\u093c\\u093e\\u0907\\u092f\\u093e\\u0902 \\u0914\\u0930 \\u092a\\u0902\\u0915\\u094d\\u0924\\u093f \\u0915\\u0940 \\u0928\\u094d\\u092f\\u0942\\u0928\\u0924\\u092e \\u090a\\u0902\\u091a\\u093e\\u0907\\u092f\\u093e\\u0902 \\u0938\\u094d\\u0935\\u091a\\u093e\\u0932\\u093f\\u0924 \\u092a\\u0930 \\u0930\\u0940\\u0938\\u0947\\u091f \\u0915\\u0940 \\u0917\\u0908\\u0902\\u0964',\n\n\tdefaultColor: '\\u0921\\u093f\\u092b\\u093c\\u0949\\u0932\\u094d\\u091f',\n\tnoBorders: '\\u0915\\u094b\\u0908 \\u092c\\u0949\\u0930\\u094d\\u0921\\u0930 \\u0928\\u0939\\u0940\\u0902',\n\tborderColorPicker:\n\t\t'\\u092c\\u0949\\u0930\\u094d\\u0921\\u0930 \\u0930\\u0902\\u0917 \\u091a\\u0941\\u0928\\u0947\\u0902',\n\tannounceBorderColorSet: (colorName: string) =>\n\t\t`\\u0924\\u093e\\u0932\\u093f\\u0915\\u093e \\u092c\\u0949\\u0930\\u094d\\u0921\\u0930 \\u0930\\u0902\\u0917 ${colorName} \\u092a\\u0930 \\u0938\\u0947\\u091f \\u0915\\u093f\\u092f\\u093e \\u0917\\u092f\\u093e`,\n\tannounceBorderReset:\n\t\t'\\u0924\\u093e\\u0932\\u093f\\u0915\\u093e \\u092c\\u0949\\u0930\\u094d\\u0921\\u0930 \\u0921\\u093f\\u092b\\u093c\\u0949\\u0932\\u094d\\u091f \\u092a\\u0930 \\u0930\\u0940\\u0938\\u0947\\u091f \\u0915\\u093f\\u092f\\u093e \\u0917\\u092f\\u093e',\n\tborderSwatchLabel: (colorName: string) => `\\u092c\\u0949\\u0930\\u094d\\u0921\\u0930 ${colorName}`,\n\n\tannounceRowInsertedAbove:\n\t\t'\\u090a\\u092a\\u0930 \\u092a\\u0902\\u0915\\u094d\\u0924\\u093f \\u0921\\u093e\\u0932\\u0940 \\u0917\\u0908',\n\tannounceRowInsertedBelow:\n\t\t'\\u0928\\u0940\\u091a\\u0947 \\u092a\\u0902\\u0915\\u094d\\u0924\\u093f \\u0921\\u093e\\u0932\\u0940 \\u0917\\u0908',\n\tannounceColumnInserted: (side: string) =>\n\t\t`\\u0938\\u094d\\u0924\\u0902\\u092d ${side} \\u0921\\u093e\\u0932\\u093e \\u0917\\u092f\\u093e`,\n\tannounceRowDeleted: '\\u092a\\u0902\\u0915\\u094d\\u0924\\u093f \\u0939\\u091f\\u093e\\u0908 \\u0917\\u0908',\n\tannounceColumnDeleted:\n\t\t'\\u0938\\u094d\\u0924\\u0902\\u092d \\u0939\\u091f\\u093e\\u092f\\u093e \\u0917\\u092f\\u093e',\n\tannounceTableDeleted:\n\t\t'\\u0924\\u093e\\u0932\\u093f\\u0915\\u093e \\u0939\\u091f\\u093e\\u0908 \\u0917\\u0908',\n\n\tinsertTable: '\\u0924\\u093e\\u0932\\u093f\\u0915\\u093e \\u0921\\u093e\\u0932\\u0947\\u0902',\n\n\ttableAriaLabel: (rows: number, cols: number) =>\n\t\t`\\u0924\\u093e\\u0932\\u093f\\u0915\\u093e: ${rows} \\u092a\\u0902\\u0915\\u094d\\u0924\\u093f\\u092f\\u093e\\u0902 \\u0914\\u0930 ${cols} \\u0938\\u094d\\u0924\\u0902\\u092d`,\n\ttableAriaDescription:\n\t\t'\\u0924\\u093e\\u0932\\u093f\\u0915\\u093e \\u0915\\u094d\\u0930\\u093f\\u092f\\u093e\\u0913\\u0902 \\u0915\\u0947 \\u0932\\u093f\\u090f \\u0930\\u093e\\u0907\\u091f-\\u0915\\u094d\\u0932\\u093f\\u0915 \\u092f\\u093e Shift+F10',\n};\n\nexport default locale;\n"],"mappings":"AAEA,IAAM,EAAsB,CAC3B,eACC,mBACD,eACC,oBACD,iBACC,mBACD,kBACC,mBACD,UAAW,eACX,aAAc,cACd,iBAAkB,cAClB,YAAa,eAEb,aACC,kBACD,iBACC,2CAED,UAAW,eACX,aAAc,cACd,OAAQ,gBACR,UAAW,eACX,iBACC,4CACD,gBACC,iDACD,YAAa,aAEb,UAAW,QACX,gBAAiB,iBACjB,iBACC,uBACD,sBACC,+BACD,UAAW,WACX,MAAO,UACP,MAAO,YACP,OAAQ,YACR,iBACC,6BACD,sBACC,qCACD,cACC,sBACD,sBAAA,CAAwB,EAAiB,IACxC,GAAG,QAAwB,gCAC5B,eAAiB,GAChB,UAAwC,EAAW,UACpD,kBAAoB,GACnB,SAAkC,EAAc,UACjD,2BAA6B,GAC5B,SAAkC,EAAc,oBACjD,wBAA0B,GACzB,UAAwC,EAAW,mBACpD,mBAAA,CAAqB,EAAc,IAClC,wBAA6G,mBAA8D,+BAC5K,uBAAA,CAAyB,EAAqB,IAC7C,SAAkC,EAAc,eAAuD,kBACxG,4BAAA,CAA8B,EAAkB,IAC/C,UAAwC,EAAW,sBAA4F,kBAChJ,yBAA2B,GAC1B,SAAkC,EAAc,uCACjD,8BAAgC,GAC/B,UAAwC,EAAW,8CACpD,wBACC,8EAED,aAAc,WACd,UAAW,kBACX,kBACC,mBACD,uBAAyB,GACxB,qBAAgG,oBACjG,oBACC,2CACD,kBAAoB,GAAsB,UAAwC,IAElF,yBACC,qBACD,yBACC,sBACD,uBAAyB,GACxB,SAAkC,aACnC,mBAAoB,iBACpB,sBACC,kBACD,qBACC,iBAED,YAAa,eAEb,eAAA,CAAiB,EAAc,IAC9B,WAAyC,kBAA4E,UACtH,qBACC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var a={ariaLabel:"रिच टेक्स्ट एडिटर",ariaDescription:"एडिटर से बाहर निकलने के लिए Escape दबाएँ",defaultPlaceholder:"टाइप करना शुरू करें..."};export{a as default};
|
|
2
|
-
//# sourceMappingURL=hi-
|
|
1
|
+
var a={ariaLabel:"रिच टेक्स्ट एडिटर",ariaDescription:"एडिटर से बाहर निकलने के लिए Escape दबाएँ",defaultPlaceholder:"टाइप करना शुरू करें...",markdownImported:"Markdown आयात किया गया"};export{a as default};
|
|
2
|
+
//# sourceMappingURL=hi-DrC2H81d.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hi-
|
|
1
|
+
{"version":3,"file":"hi-DrC2H81d.mjs","names":[],"sources":["../../src/editor/locales/hi.ts"],"sourcesContent":["import type { EditorLocale } from '../EditorLocale.js';\n\nconst locale: EditorLocale = {\n\tariaLabel:\n\t\t'\\u0930\\u093f\\u091a \\u091f\\u0947\\u0915\\u094d\\u0938\\u094d\\u091f \\u090f\\u0921\\u093f\\u091f\\u0930',\n\tariaDescription:\n\t\t'\\u090f\\u0921\\u093f\\u091f\\u0930 \\u0938\\u0947 \\u092c\\u093e\\u0939\\u0930 \\u0928\\u093f\\u0915\\u0932\\u0928\\u0947 \\u0915\\u0947 \\u0932\\u093f\\u090f Escape \\u0926\\u092c\\u093e\\u090f\\u0901',\n\tdefaultPlaceholder:\n\t\t'\\u091f\\u093e\\u0907\\u092a \\u0915\\u0930\\u0928\\u093e \\u0936\\u0941\\u0930\\u0942 \\u0915\\u0930\\u0947\\u0902...',\n\tmarkdownImported: 'Markdown \\u0906\\u092f\\u093e\\u0924 \\u0915\\u093f\\u092f\\u093e \\u0917\\u092f\\u093e',\n};\n\nexport default locale;\n"],"mappings":"AAEA,IAAM,EAAuB,CAC5B,UACC,oBACD,gBACC,2CACD,mBACC,yBACD,iBAAkB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"minimal-
|
|
1
|
+
{"version":3,"file":"minimal-CFkkPXef.mjs","names":[],"sources":["../../src/presets/MinimalPreset.ts"],"sourcesContent":["/**\n * Minimal preset: a lightweight editor with only font selection.\n */\n\nimport { FontPlugin } from '../plugins/font/FontPlugin.js';\nimport type { MinimalPresetOptions, PresetConfig } from './PresetTypes.js';\n\n/**\n * Creates a minimal editor preset with font selection only.\n * CaretNavigation and GapCursor are auto-registered by the editor.\n *\n * Pass `font.fonts` to supply font definitions (e.g. `STARTER_FONTS`).\n * Without explicit fonts, the font picker toolbar renders empty.\n */\nexport function createMinimalPreset(options?: MinimalPresetOptions): PresetConfig {\n\tconst fontPlugin: FontPlugin = new FontPlugin({\n\t\tfonts: [],\n\t\t...options?.font,\n\t});\n\n\treturn {\n\t\ttoolbar: [[fontPlugin]],\n\t\tplugins: [],\n\t};\n}\n"],"mappings":"yCAcA,SAAgB,EAAoB,GAMnC,MAAO,CACN,QAAS,CAAC,CAAC,IANuB,EAAW,CAC7C,MAAO,MACJ,GAAS,SAKZ,QAAS,GAEX"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
var a={insertRowAbove:"Inserir Linha Acima",insertRowBelow:"Inserir Linha Abaixo",insertColumnLeft:"Inserir Coluna à Esquerda",insertColumnRight:"Inserir Coluna à Direita",deleteRow:"Excluir Linha",deleteColumn:"Excluir Coluna",borderColorLabel:"Cor da Borda...",deleteTable:"Excluir Tabela",tableActions:"Ações da tabela",menuKeyboardHint:"↑↓ Navegar · Enter Selecionar · Esc Fechar",insertRow:"Inserir linha",insertColumn:"Inserir coluna",addRow:"Adicionar linha",addColumn:"Adicionar coluna",tableActionsHint:"Ações da tabela (Clique direito ou Shift+F10)",contextMenuHint:"Clique direito ou Shift+F10 para ações da tabela",borderColor:"Cor da borda",sizeLabel:"Tamanho...",sizeDialogLabel:"Tamanho da tabela",columnWidthLabel:"Largura da coluna (px)",rowMinimumHeightLabel:"Altura mínima da linha (px)",automatic:"Automático",mixed:"Misto",apply:"Aplicar",cancel:"Cancelar",resetColumnWidth:"Redefinir largura da coluna",resetRowMinimumHeight:"Redefinir altura mínima da linha",resetAllSizes:"Redefinir todos os tamanhos",invalidDimensionRange:(a,e)=>`Insira um valor entre ${a} e ${e} px.`,selectRowLabel:a=>`Selecionar linha ${a+1}`,selectColumnLabel:a=>`Selecionar coluna ${a+1}`,resizeColumnSeparatorLabel:a=>`Alterar a largura da coluna ${a+1}`,resizeRowSeparatorLabel:a=>`Alterar a altura da linha ${a+1}`,resizeKeyboardHint:(a,e)=>`As setas alteram o tamanho em ${a} px; mantenha Shift pressionado para ${e} px.`,announceColumnWidthSet:(a,e)=>`Largura da coluna ${a+1} definida como ${e} px.`,announceRowMinimumHeightSet:(a,e)=>`Altura mínima da linha ${a+1} definida como ${e} px.`,announceColumnWidthReset:a=>`Largura da coluna ${a+1} redefinida como automática.`,announceRowMinimumHeightReset:a=>`Altura mínima da linha ${a+1} redefinida como automática.`,announceTableSizesReset:"Todas as larguras de coluna e alturas mínimas de linha foram redefinidas como automáticas.",defaultColor:"Padrão",noBorders:"Sem bordas",borderColorPicker:"Seletor de cor da borda",announceBorderColorSet:a=>`Cor da borda da tabela definida para ${a}`,announceBorderReset:"Bordas da tabela redefinidas para o padrão",borderSwatchLabel:a=>`Borda ${a}`,announceRowInsertedAbove:"Linha inserida acima",announceRowInsertedBelow:"Linha inserida abaixo",announceColumnInserted:a=>`Coluna inserida à ${a}`,announceRowDeleted:"Linha excluída",announceColumnDeleted:"Coluna excluída",announceTableDeleted:"Tabela excluída",insertTable:"Inserir Tabela",tableAriaLabel:(a,e)=>`Tabela com ${a} linhas e ${e} colunas`,tableAriaDescription:"Clique direito ou pressione Shift+F10 para ações da tabela"};export{a as default};
|
|
2
|
+
//# sourceMappingURL=pt-BuZ7acHF.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pt-BuZ7acHF.mjs","names":[],"sources":["../../src/plugins/table/locales/pt.ts"],"sourcesContent":["import type { TableLocale } from '../TableLocale.js';\n\nconst locale: TableLocale = {\n\t// Context Menu\n\tinsertRowAbove: 'Inserir Linha Acima',\n\tinsertRowBelow: 'Inserir Linha Abaixo',\n\tinsertColumnLeft: 'Inserir Coluna à Esquerda',\n\tinsertColumnRight: 'Inserir Coluna à Direita',\n\tdeleteRow: 'Excluir Linha',\n\tdeleteColumn: 'Excluir Coluna',\n\tborderColorLabel: 'Cor da Borda...',\n\tdeleteTable: 'Excluir Tabela',\n\n\t// Menu A11y\n\ttableActions: 'Ações da tabela',\n\tmenuKeyboardHint: '\\u2191\\u2193 Navegar \\u00b7 Enter Selecionar \\u00b7 Esc Fechar',\n\n\t// Controls\n\tinsertRow: 'Inserir linha',\n\tinsertColumn: 'Inserir coluna',\n\taddRow: 'Adicionar linha',\n\taddColumn: 'Adicionar coluna',\n\ttableActionsHint: 'Ações da tabela (Clique direito ou Shift+F10)',\n\tcontextMenuHint: 'Clique direito ou Shift+F10 para ações da tabela',\n\tborderColor: 'Cor da borda',\n\n\t// Sizing\n\tsizeLabel: 'Tamanho...',\n\tsizeDialogLabel: 'Tamanho da tabela',\n\tcolumnWidthLabel: 'Largura da coluna (px)',\n\trowMinimumHeightLabel: 'Altura mínima da linha (px)',\n\tautomatic: 'Automático',\n\tmixed: 'Misto',\n\tapply: 'Aplicar',\n\tcancel: 'Cancelar',\n\tresetColumnWidth: 'Redefinir largura da coluna',\n\tresetRowMinimumHeight: 'Redefinir altura mínima da linha',\n\tresetAllSizes: 'Redefinir todos os tamanhos',\n\tinvalidDimensionRange: (minimum: number, maximum: number) =>\n\t\t`Insira um valor entre ${minimum} e ${maximum} px.`,\n\tselectRowLabel: (rowIndex: number) => `Selecionar linha ${rowIndex + 1}`,\n\tselectColumnLabel: (columnIndex: number) => `Selecionar coluna ${columnIndex + 1}`,\n\tresizeColumnSeparatorLabel: (columnIndex: number) =>\n\t\t`Alterar a largura da coluna ${columnIndex + 1}`,\n\tresizeRowSeparatorLabel: (rowIndex: number) => `Alterar a altura da linha ${rowIndex + 1}`,\n\tresizeKeyboardHint: (step: number, largeStep: number) =>\n\t\t`As setas alteram o tamanho em ${step} px; mantenha Shift pressionado para ${largeStep} px.`,\n\tannounceColumnWidthSet: (columnIndex: number, valuePx: number) =>\n\t\t`Largura da coluna ${columnIndex + 1} definida como ${valuePx} px.`,\n\tannounceRowMinimumHeightSet: (rowIndex: number, valuePx: number) =>\n\t\t`Altura mínima da linha ${rowIndex + 1} definida como ${valuePx} px.`,\n\tannounceColumnWidthReset: (columnIndex: number) =>\n\t\t`Largura da coluna ${columnIndex + 1} redefinida como automática.`,\n\tannounceRowMinimumHeightReset: (rowIndex: number) =>\n\t\t`Altura mínima da linha ${rowIndex + 1} redefinida como automática.`,\n\tannounceTableSizesReset:\n\t\t'Todas as larguras de coluna e alturas mínimas de linha foram redefinidas como automáticas.',\n\n\t// Border Color Picker\n\tdefaultColor: 'Padrão',\n\tnoBorders: 'Sem bordas',\n\tborderColorPicker: 'Seletor de cor da borda',\n\tannounceBorderColorSet: (colorName: string) =>\n\t\t`Cor da borda da tabela definida para ${colorName}`,\n\tannounceBorderReset: 'Bordas da tabela redefinidas para o padrão',\n\tborderSwatchLabel: (colorName: string) => `Borda ${colorName}`,\n\n\t// Command Announcements\n\tannounceRowInsertedAbove: 'Linha inserida acima',\n\tannounceRowInsertedBelow: 'Linha inserida abaixo',\n\tannounceColumnInserted: (side: string) => `Coluna inserida à ${side}`,\n\tannounceRowDeleted: 'Linha excluída',\n\tannounceColumnDeleted: 'Coluna excluída',\n\tannounceTableDeleted: 'Tabela excluída',\n\n\t// Toolbar\n\tinsertTable: 'Inserir Tabela',\n\n\t// NodeView ARIA\n\ttableAriaLabel: (rows: number, cols: number) => `Tabela com ${rows} linhas e ${cols} colunas`,\n\ttableAriaDescription: 'Clique direito ou pressione Shift+F10 para ações da tabela',\n};\n\nexport default locale;\n"],"mappings":"AAEA,IAAM,EAAsB,CAE3B,eAAgB,sBAChB,eAAgB,uBAChB,iBAAkB,4BAClB,kBAAmB,2BACnB,UAAW,gBACX,aAAc,iBACd,iBAAkB,kBAClB,YAAa,iBAGb,aAAc,kBACd,iBAAkB,6CAGlB,UAAW,gBACX,aAAc,iBACd,OAAQ,kBACR,UAAW,mBACX,iBAAkB,gDAClB,gBAAiB,mDACjB,YAAa,eAGb,UAAW,aACX,gBAAiB,oBACjB,iBAAkB,yBAClB,sBAAuB,8BACvB,UAAW,aACX,MAAO,QACP,MAAO,UACP,OAAQ,WACR,iBAAkB,8BAClB,sBAAuB,mCACvB,cAAe,8BACf,sBAAA,CAAwB,EAAiB,IACxC,yBAAyB,OAAa,QACvC,eAAiB,GAAqB,oBAAoB,EAAW,IACrE,kBAAoB,GAAwB,qBAAqB,EAAc,IAC/E,2BAA6B,GAC5B,+BAA+B,EAAc,IAC9C,wBAA0B,GAAqB,6BAA6B,EAAW,IACvF,mBAAA,CAAqB,EAAc,IAClC,iCAAiC,yCAA4C,QAC9E,uBAAA,CAAyB,EAAqB,IAC7C,qBAAqB,EAAc,mBAAmB,QACvD,4BAAA,CAA8B,EAAkB,IAC/C,0BAA0B,EAAW,mBAAmB,QACzD,yBAA2B,GAC1B,qBAAqB,EAAc,gCACpC,8BAAgC,GAC/B,0BAA0B,EAAW,gCACtC,wBACC,6FAGD,aAAc,SACd,UAAW,aACX,kBAAmB,0BACnB,uBAAyB,GACxB,wCAAwC,IACzC,oBAAqB,6CACrB,kBAAoB,GAAsB,SAAS,IAGnD,yBAA0B,uBAC1B,yBAA0B,wBAC1B,uBAAyB,GAAiB,qBAAqB,IAC/D,mBAAoB,iBACpB,sBAAuB,kBACvB,qBAAsB,kBAGtB,YAAa,iBAGb,eAAA,CAAiB,EAAc,IAAiB,cAAc,cAAiB,YAC/E,qBAAsB"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var a={ariaLabel:"Editor de texto formatado",ariaDescription:"Pressione Escape para sair do editor",defaultPlaceholder:"Comece a digitar..."};export{a as default};
|
|
2
|
-
//# sourceMappingURL=pt-
|
|
1
|
+
var a={ariaLabel:"Editor de texto formatado",ariaDescription:"Pressione Escape para sair do editor",defaultPlaceholder:"Comece a digitar...",markdownImported:"Markdown importado"};export{a as default};
|
|
2
|
+
//# sourceMappingURL=pt-CFrcl1v_.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pt-
|
|
1
|
+
{"version":3,"file":"pt-CFrcl1v_.mjs","names":[],"sources":["../../src/editor/locales/pt.ts"],"sourcesContent":["import type { EditorLocale } from '../EditorLocale.js';\n\nconst locale: EditorLocale = {\n\tariaLabel: 'Editor de texto formatado',\n\tariaDescription: 'Pressione Escape para sair do editor',\n\tdefaultPlaceholder: 'Comece a digitar...',\n\tmarkdownImported: 'Markdown importado',\n};\n\nexport default locale;\n"],"mappings":"AAEA,IAAM,EAAuB,CAC5B,UAAW,4BACX,gBAAiB,uCACjB,mBAAoB,sBACpB,iBAAkB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var e=Object.defineProperty,r=(r,t)=>{let a={};for(var o in r)e(a,o,{get:r[o],enumerable:!0});return t||e(a,Symbol.toStringTag,{value:"Module"}),a};export{r as t};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
var e={insertRowAbove:"Вставить строку сверху",insertRowBelow:"Вставить строку снизу",insertColumnLeft:"Вставить столбец слева",insertColumnRight:"Вставить столбец справа",deleteRow:"Удалить строку",deleteColumn:"Удалить столбец",borderColorLabel:"Цвет границы…",deleteTable:"Удалить таблицу",tableActions:"Действия с таблицей",menuKeyboardHint:"↑↓ Навигация · Enter Выбрать · Esc Закрыть",insertRow:"Вставить строку",insertColumn:"Вставить столбец",addRow:"Добавить строку",addColumn:"Добавить столбец",tableActionsHint:"Действия с таблицей (ПКМ или Shift+F10)",contextMenuHint:"ПКМ или Shift+F10 для действий с таблицей",borderColor:"Цвет границы",sizeLabel:"Размер…",sizeDialogLabel:"Размер таблицы",columnWidthLabel:"Ширина столбца (px)",rowMinimumHeightLabel:"Минимальная высота строки (px)",automatic:"Автоматически",mixed:"Смешанные значения",apply:"Применить",cancel:"Отмена",resetColumnWidth:"Сбросить ширину столбца",resetRowMinimumHeight:"Сбросить минимальную высоту строки",resetAllSizes:"Сбросить все размеры",invalidDimensionRange:(e,n)=>`Введите значение от ${e} до ${n} px.`,selectRowLabel:e=>`Выбрать строку ${e+1}`,selectColumnLabel:e=>`Выбрать столбец ${e+1}`,resizeColumnSeparatorLabel:e=>`Изменить ширину столбца ${e+1}`,resizeRowSeparatorLabel:e=>`Изменить высоту строки ${e+1}`,resizeKeyboardHint:(e,n)=>`Клавиши со стрелками изменяют размер на ${e} px; удерживайте Shift для ${n} px.`,announceColumnWidthSet:(e,n)=>`Ширина столбца ${e+1} установлена на ${n} px.`,announceRowMinimumHeightSet:(e,n)=>`Минимальная высота строки ${e+1} установлена на ${n} px.`,announceColumnWidthReset:e=>`Ширина столбца ${e+1} переведена в автоматический режим.`,announceRowMinimumHeightReset:e=>`Минимальная высота строки ${e+1} переведена в автоматический режим.`,announceTableSizesReset:"Для всех ширин столбцов и минимальных высот строк включён автоматический режим.",defaultColor:"По умолчанию",noBorders:"Без границ",borderColorPicker:"Выбор цвета границы",announceBorderColorSet:e=>`Цвет границы таблицы установлен на ${e}`,announceBorderReset:"Границы таблицы сброшены по умолчанию",borderSwatchLabel:e=>`Граница ${e}`,announceRowInsertedAbove:"Строка вставлена сверху",announceRowInsertedBelow:"Строка вставлена снизу",announceColumnInserted:e=>`Столбец вставлен ${e}`,announceRowDeleted:"Строка удалена",announceColumnDeleted:"Столбец удален",announceTableDeleted:"Таблица удалена",insertTable:"Вставить таблицу",tableAriaLabel:(e,n)=>`Таблица: ${e} строк, ${n} столбцов`,tableAriaDescription:"ПКМ или Shift+F10 для действий с таблицей"};export{e as default};
|
|
2
|
+
//# sourceMappingURL=ru-CsP6mLxp.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ru-CsP6mLxp.mjs","names":[],"sources":["../../src/plugins/table/locales/ru.ts"],"sourcesContent":["import type { TableLocale } from '../TableLocale.js';\n\nconst locale: TableLocale = {\n\tinsertRowAbove:\n\t\t'\\u0412\\u0441\\u0442\\u0430\\u0432\\u0438\\u0442\\u044c \\u0441\\u0442\\u0440\\u043e\\u043a\\u0443 \\u0441\\u0432\\u0435\\u0440\\u0445\\u0443',\n\tinsertRowBelow:\n\t\t'\\u0412\\u0441\\u0442\\u0430\\u0432\\u0438\\u0442\\u044c \\u0441\\u0442\\u0440\\u043e\\u043a\\u0443 \\u0441\\u043d\\u0438\\u0437\\u0443',\n\tinsertColumnLeft:\n\t\t'\\u0412\\u0441\\u0442\\u0430\\u0432\\u0438\\u0442\\u044c \\u0441\\u0442\\u043e\\u043b\\u0431\\u0435\\u0446 \\u0441\\u043b\\u0435\\u0432\\u0430',\n\tinsertColumnRight:\n\t\t'\\u0412\\u0441\\u0442\\u0430\\u0432\\u0438\\u0442\\u044c \\u0441\\u0442\\u043e\\u043b\\u0431\\u0435\\u0446 \\u0441\\u043f\\u0440\\u0430\\u0432\\u0430',\n\tdeleteRow: '\\u0423\\u0434\\u0430\\u043b\\u0438\\u0442\\u044c \\u0441\\u0442\\u0440\\u043e\\u043a\\u0443',\n\tdeleteColumn:\n\t\t'\\u0423\\u0434\\u0430\\u043b\\u0438\\u0442\\u044c \\u0441\\u0442\\u043e\\u043b\\u0431\\u0435\\u0446',\n\tborderColorLabel: '\\u0426\\u0432\\u0435\\u0442 \\u0433\\u0440\\u0430\\u043d\\u0438\\u0446\\u044b\\u2026',\n\tdeleteTable:\n\t\t'\\u0423\\u0434\\u0430\\u043b\\u0438\\u0442\\u044c \\u0442\\u0430\\u0431\\u043b\\u0438\\u0446\\u0443',\n\n\ttableActions:\n\t\t'\\u0414\\u0435\\u0439\\u0441\\u0442\\u0432\\u0438\\u044f \\u0441 \\u0442\\u0430\\u0431\\u043b\\u0438\\u0446\\u0435\\u0439',\n\tmenuKeyboardHint:\n\t\t'\\u2191\\u2193 \\u041d\\u0430\\u0432\\u0438\\u0433\\u0430\\u0446\\u0438\\u044f \\u00b7 Enter \\u0412\\u044b\\u0431\\u0440\\u0430\\u0442\\u044c \\u00b7 Esc \\u0417\\u0430\\u043a\\u0440\\u044b\\u0442\\u044c',\n\n\tinsertRow:\n\t\t'\\u0412\\u0441\\u0442\\u0430\\u0432\\u0438\\u0442\\u044c \\u0441\\u0442\\u0440\\u043e\\u043a\\u0443',\n\tinsertColumn:\n\t\t'\\u0412\\u0441\\u0442\\u0430\\u0432\\u0438\\u0442\\u044c \\u0441\\u0442\\u043e\\u043b\\u0431\\u0435\\u0446',\n\taddRow: '\\u0414\\u043e\\u0431\\u0430\\u0432\\u0438\\u0442\\u044c \\u0441\\u0442\\u0440\\u043e\\u043a\\u0443',\n\taddColumn:\n\t\t'\\u0414\\u043e\\u0431\\u0430\\u0432\\u0438\\u0442\\u044c \\u0441\\u0442\\u043e\\u043b\\u0431\\u0435\\u0446',\n\ttableActionsHint:\n\t\t'\\u0414\\u0435\\u0439\\u0441\\u0442\\u0432\\u0438\\u044f \\u0441 \\u0442\\u0430\\u0431\\u043b\\u0438\\u0446\\u0435\\u0439 (\\u041f\\u041a\\u041c \\u0438\\u043b\\u0438 Shift+F10)',\n\tcontextMenuHint:\n\t\t'\\u041f\\u041a\\u041c \\u0438\\u043b\\u0438 Shift+F10 \\u0434\\u043b\\u044f \\u0434\\u0435\\u0439\\u0441\\u0442\\u0432\\u0438\\u0439 \\u0441 \\u0442\\u0430\\u0431\\u043b\\u0438\\u0446\\u0435\\u0439',\n\tborderColor: '\\u0426\\u0432\\u0435\\u0442 \\u0433\\u0440\\u0430\\u043d\\u0438\\u0446\\u044b',\n\n\tsizeLabel: '\\u0420\\u0430\\u0437\\u043c\\u0435\\u0440\\u2026',\n\tsizeDialogLabel:\n\t\t'\\u0420\\u0430\\u0437\\u043c\\u0435\\u0440 \\u0442\\u0430\\u0431\\u043b\\u0438\\u0446\\u044b',\n\tcolumnWidthLabel:\n\t\t'\\u0428\\u0438\\u0440\\u0438\\u043d\\u0430 \\u0441\\u0442\\u043e\\u043b\\u0431\\u0446\\u0430 (px)',\n\trowMinimumHeightLabel:\n\t\t'\\u041c\\u0438\\u043d\\u0438\\u043c\\u0430\\u043b\\u044c\\u043d\\u0430\\u044f \\u0432\\u044b\\u0441\\u043e\\u0442\\u0430 \\u0441\\u0442\\u0440\\u043e\\u043a\\u0438 (px)',\n\tautomatic: '\\u0410\\u0432\\u0442\\u043e\\u043c\\u0430\\u0442\\u0438\\u0447\\u0435\\u0441\\u043a\\u0438',\n\tmixed:\n\t\t'\\u0421\\u043c\\u0435\\u0448\\u0430\\u043d\\u043d\\u044b\\u0435 \\u0437\\u043d\\u0430\\u0447\\u0435\\u043d\\u0438\\u044f',\n\tapply: '\\u041f\\u0440\\u0438\\u043c\\u0435\\u043d\\u0438\\u0442\\u044c',\n\tcancel: '\\u041e\\u0442\\u043c\\u0435\\u043d\\u0430',\n\tresetColumnWidth:\n\t\t'\\u0421\\u0431\\u0440\\u043e\\u0441\\u0438\\u0442\\u044c \\u0448\\u0438\\u0440\\u0438\\u043d\\u0443 \\u0441\\u0442\\u043e\\u043b\\u0431\\u0446\\u0430',\n\tresetRowMinimumHeight:\n\t\t'\\u0421\\u0431\\u0440\\u043e\\u0441\\u0438\\u0442\\u044c \\u043c\\u0438\\u043d\\u0438\\u043c\\u0430\\u043b\\u044c\\u043d\\u0443\\u044e \\u0432\\u044b\\u0441\\u043e\\u0442\\u0443 \\u0441\\u0442\\u0440\\u043e\\u043a\\u0438',\n\tresetAllSizes:\n\t\t'\\u0421\\u0431\\u0440\\u043e\\u0441\\u0438\\u0442\\u044c \\u0432\\u0441\\u0435 \\u0440\\u0430\\u0437\\u043c\\u0435\\u0440\\u044b',\n\tinvalidDimensionRange: (minimum: number, maximum: number) =>\n\t\t`\\u0412\\u0432\\u0435\\u0434\\u0438\\u0442\\u0435 \\u0437\\u043d\\u0430\\u0447\\u0435\\u043d\\u0438\\u0435 \\u043e\\u0442 ${minimum} \\u0434\\u043e ${maximum} px.`,\n\tselectRowLabel: (rowIndex: number) =>\n\t\t`\\u0412\\u044b\\u0431\\u0440\\u0430\\u0442\\u044c \\u0441\\u0442\\u0440\\u043e\\u043a\\u0443 ${rowIndex + 1}`,\n\tselectColumnLabel: (columnIndex: number) =>\n\t\t`\\u0412\\u044b\\u0431\\u0440\\u0430\\u0442\\u044c \\u0441\\u0442\\u043e\\u043b\\u0431\\u0435\\u0446 ${columnIndex + 1}`,\n\tresizeColumnSeparatorLabel: (columnIndex: number) =>\n\t\t`\\u0418\\u0437\\u043c\\u0435\\u043d\\u0438\\u0442\\u044c \\u0448\\u0438\\u0440\\u0438\\u043d\\u0443 \\u0441\\u0442\\u043e\\u043b\\u0431\\u0446\\u0430 ${columnIndex + 1}`,\n\tresizeRowSeparatorLabel: (rowIndex: number) =>\n\t\t`\\u0418\\u0437\\u043c\\u0435\\u043d\\u0438\\u0442\\u044c \\u0432\\u044b\\u0441\\u043e\\u0442\\u0443 \\u0441\\u0442\\u0440\\u043e\\u043a\\u0438 ${rowIndex + 1}`,\n\tresizeKeyboardHint: (step: number, largeStep: number) =>\n\t\t`\\u041a\\u043b\\u0430\\u0432\\u0438\\u0448\\u0438 \\u0441\\u043e \\u0441\\u0442\\u0440\\u0435\\u043b\\u043a\\u0430\\u043c\\u0438 \\u0438\\u0437\\u043c\\u0435\\u043d\\u044f\\u044e\\u0442 \\u0440\\u0430\\u0437\\u043c\\u0435\\u0440 \\u043d\\u0430 ${step} px; \\u0443\\u0434\\u0435\\u0440\\u0436\\u0438\\u0432\\u0430\\u0439\\u0442\\u0435 Shift \\u0434\\u043b\\u044f ${largeStep} px.`,\n\tannounceColumnWidthSet: (columnIndex: number, valuePx: number) =>\n\t\t`\\u0428\\u0438\\u0440\\u0438\\u043d\\u0430 \\u0441\\u0442\\u043e\\u043b\\u0431\\u0446\\u0430 ${columnIndex + 1} \\u0443\\u0441\\u0442\\u0430\\u043d\\u043e\\u0432\\u043b\\u0435\\u043d\\u0430 \\u043d\\u0430 ${valuePx} px.`,\n\tannounceRowMinimumHeightSet: (rowIndex: number, valuePx: number) =>\n\t\t`\\u041c\\u0438\\u043d\\u0438\\u043c\\u0430\\u043b\\u044c\\u043d\\u0430\\u044f \\u0432\\u044b\\u0441\\u043e\\u0442\\u0430 \\u0441\\u0442\\u0440\\u043e\\u043a\\u0438 ${rowIndex + 1} \\u0443\\u0441\\u0442\\u0430\\u043d\\u043e\\u0432\\u043b\\u0435\\u043d\\u0430 \\u043d\\u0430 ${valuePx} px.`,\n\tannounceColumnWidthReset: (columnIndex: number) =>\n\t\t`\\u0428\\u0438\\u0440\\u0438\\u043d\\u0430 \\u0441\\u0442\\u043e\\u043b\\u0431\\u0446\\u0430 ${columnIndex + 1} \\u043f\\u0435\\u0440\\u0435\\u0432\\u0435\\u0434\\u0435\\u043d\\u0430 \\u0432 \\u0430\\u0432\\u0442\\u043e\\u043c\\u0430\\u0442\\u0438\\u0447\\u0435\\u0441\\u043a\\u0438\\u0439 \\u0440\\u0435\\u0436\\u0438\\u043c.`,\n\tannounceRowMinimumHeightReset: (rowIndex: number) =>\n\t\t`\\u041c\\u0438\\u043d\\u0438\\u043c\\u0430\\u043b\\u044c\\u043d\\u0430\\u044f \\u0432\\u044b\\u0441\\u043e\\u0442\\u0430 \\u0441\\u0442\\u0440\\u043e\\u043a\\u0438 ${rowIndex + 1} \\u043f\\u0435\\u0440\\u0435\\u0432\\u0435\\u0434\\u0435\\u043d\\u0430 \\u0432 \\u0430\\u0432\\u0442\\u043e\\u043c\\u0430\\u0442\\u0438\\u0447\\u0435\\u0441\\u043a\\u0438\\u0439 \\u0440\\u0435\\u0436\\u0438\\u043c.`,\n\tannounceTableSizesReset:\n\t\t'\\u0414\\u043b\\u044f \\u0432\\u0441\\u0435\\u0445 \\u0448\\u0438\\u0440\\u0438\\u043d \\u0441\\u0442\\u043e\\u043b\\u0431\\u0446\\u043e\\u0432 \\u0438 \\u043c\\u0438\\u043d\\u0438\\u043c\\u0430\\u043b\\u044c\\u043d\\u044b\\u0445 \\u0432\\u044b\\u0441\\u043e\\u0442 \\u0441\\u0442\\u0440\\u043e\\u043a \\u0432\\u043a\\u043b\\u044e\\u0447\\u0451\\u043d \\u0430\\u0432\\u0442\\u043e\\u043c\\u0430\\u0442\\u0438\\u0447\\u0435\\u0441\\u043a\\u0438\\u0439 \\u0440\\u0435\\u0436\\u0438\\u043c.',\n\n\tdefaultColor: '\\u041f\\u043e \\u0443\\u043c\\u043e\\u043b\\u0447\\u0430\\u043d\\u0438\\u044e',\n\tnoBorders: '\\u0411\\u0435\\u0437 \\u0433\\u0440\\u0430\\u043d\\u0438\\u0446',\n\tborderColorPicker:\n\t\t'\\u0412\\u044b\\u0431\\u043e\\u0440 \\u0446\\u0432\\u0435\\u0442\\u0430 \\u0433\\u0440\\u0430\\u043d\\u0438\\u0446\\u044b',\n\tannounceBorderColorSet: (colorName: string) =>\n\t\t`\\u0426\\u0432\\u0435\\u0442 \\u0433\\u0440\\u0430\\u043d\\u0438\\u0446\\u044b \\u0442\\u0430\\u0431\\u043b\\u0438\\u0446\\u044b \\u0443\\u0441\\u0442\\u0430\\u043d\\u043e\\u0432\\u043b\\u0435\\u043d \\u043d\\u0430 ${colorName}`,\n\tannounceBorderReset:\n\t\t'\\u0413\\u0440\\u0430\\u043d\\u0438\\u0446\\u044b \\u0442\\u0430\\u0431\\u043b\\u0438\\u0446\\u044b \\u0441\\u0431\\u0440\\u043e\\u0448\\u0435\\u043d\\u044b \\u043f\\u043e \\u0443\\u043c\\u043e\\u043b\\u0447\\u0430\\u043d\\u0438\\u044e',\n\tborderSwatchLabel: (colorName: string) =>\n\t\t`\\u0413\\u0440\\u0430\\u043d\\u0438\\u0446\\u0430 ${colorName}`,\n\n\tannounceRowInsertedAbove:\n\t\t'\\u0421\\u0442\\u0440\\u043e\\u043a\\u0430 \\u0432\\u0441\\u0442\\u0430\\u0432\\u043b\\u0435\\u043d\\u0430 \\u0441\\u0432\\u0435\\u0440\\u0445\\u0443',\n\tannounceRowInsertedBelow:\n\t\t'\\u0421\\u0442\\u0440\\u043e\\u043a\\u0430 \\u0432\\u0441\\u0442\\u0430\\u0432\\u043b\\u0435\\u043d\\u0430 \\u0441\\u043d\\u0438\\u0437\\u0443',\n\tannounceColumnInserted: (side: string) =>\n\t\t`\\u0421\\u0442\\u043e\\u043b\\u0431\\u0435\\u0446 \\u0432\\u0441\\u0442\\u0430\\u0432\\u043b\\u0435\\u043d ${side}`,\n\tannounceRowDeleted:\n\t\t'\\u0421\\u0442\\u0440\\u043e\\u043a\\u0430 \\u0443\\u0434\\u0430\\u043b\\u0435\\u043d\\u0430',\n\tannounceColumnDeleted:\n\t\t'\\u0421\\u0442\\u043e\\u043b\\u0431\\u0435\\u0446 \\u0443\\u0434\\u0430\\u043b\\u0435\\u043d',\n\tannounceTableDeleted:\n\t\t'\\u0422\\u0430\\u0431\\u043b\\u0438\\u0446\\u0430 \\u0443\\u0434\\u0430\\u043b\\u0435\\u043d\\u0430',\n\n\tinsertTable:\n\t\t'\\u0412\\u0441\\u0442\\u0430\\u0432\\u0438\\u0442\\u044c \\u0442\\u0430\\u0431\\u043b\\u0438\\u0446\\u0443',\n\n\ttableAriaLabel: (rows: number, cols: number) =>\n\t\t`\\u0422\\u0430\\u0431\\u043b\\u0438\\u0446\\u0430: ${rows} \\u0441\\u0442\\u0440\\u043e\\u043a, ${cols} \\u0441\\u0442\\u043e\\u043b\\u0431\\u0446\\u043e\\u0432`,\n\ttableAriaDescription:\n\t\t'\\u041f\\u041a\\u041c \\u0438\\u043b\\u0438 Shift+F10 \\u0434\\u043b\\u044f \\u0434\\u0435\\u0439\\u0441\\u0442\\u0432\\u0438\\u0439 \\u0441 \\u0442\\u0430\\u0431\\u043b\\u0438\\u0446\\u0435\\u0439',\n};\n\nexport default locale;\n"],"mappings":"AAEA,IAAM,EAAsB,CAC3B,eACC,yBACD,eACC,wBACD,iBACC,yBACD,kBACC,0BACD,UAAW,iBACX,aACC,kBACD,iBAAkB,gBAClB,YACC,kBAED,aACC,sBACD,iBACC,6CAED,UACC,kBACD,aACC,mBACD,OAAQ,kBACR,UACC,mBACD,iBACC,0CACD,gBACC,4CACD,YAAa,eAEb,UAAW,UACX,gBACC,iBACD,iBACC,sBACD,sBACC,iCACD,UAAW,gBACX,MACC,qBACD,MAAO,YACP,OAAQ,SACR,iBACC,0BACD,sBACC,qCACD,cACC,uBACD,sBAAA,CAAwB,EAAiB,IACxC,uBAA4G,QAAwB,QACrI,eAAiB,GAChB,kBAAmF,EAAW,IAC/F,kBAAoB,GACnB,mBAAyF,EAAc,IACxG,2BAA6B,GAC5B,2BAAoI,EAAc,IACnJ,wBAA0B,GACzB,0BAA8H,EAAW,IAC1I,mBAAA,CAAqB,EAAc,IAClC,2CAAqN,+BAAwG,QAC9T,uBAAA,CAAyB,EAAqB,IAC7C,kBAAmF,EAAc,oBAAqF,QACvL,4BAAA,CAA8B,EAAkB,IAC/C,6BAAgJ,EAAW,oBAAqF,QACjP,yBAA2B,GAC1B,kBAAmF,EAAc,uCAClG,8BAAgC,GAC/B,6BAAgJ,EAAW,uCAC5J,wBACC,kFAED,aAAc,eACd,UAAW,aACX,kBACC,sBACD,uBAAyB,GACxB,sCAA4L,IAC7L,oBACC,wCACD,kBAAoB,GACnB,WAA8C,IAE/C,yBACC,0BACD,yBACC,yBACD,uBAAyB,GACxB,oBAA+F,IAChG,mBACC,iBACD,sBACC,iBACD,qBACC,kBAED,YACC,mBAED,eAAA,CAAiB,EAAc,IAC9B,YAA+C,YAAwC,aACxF,qBACC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var a={ariaLabel:"Редактор форматированного текста",ariaDescription:"Нажмите Escape, чтобы выйти из редактора",defaultPlaceholder:"Начните печатать..."};export{a as default};
|
|
2
|
-
//# sourceMappingURL=ru-
|
|
1
|
+
var a={ariaLabel:"Редактор форматированного текста",ariaDescription:"Нажмите Escape, чтобы выйти из редактора",defaultPlaceholder:"Начните печатать...",markdownImported:"Markdown импортирован"};export{a as default};
|
|
2
|
+
//# sourceMappingURL=ru-gxbzqLL8.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ru-
|
|
1
|
+
{"version":3,"file":"ru-gxbzqLL8.mjs","names":[],"sources":["../../src/editor/locales/ru.ts"],"sourcesContent":["import type { EditorLocale } from '../EditorLocale.js';\n\nconst locale: EditorLocale = {\n\tariaLabel:\n\t\t'\\u0420\\u0435\\u0434\\u0430\\u043a\\u0442\\u043e\\u0440 \\u0444\\u043e\\u0440\\u043c\\u0430\\u0442\\u0438\\u0440\\u043e\\u0432\\u0430\\u043d\\u043d\\u043e\\u0433\\u043e \\u0442\\u0435\\u043a\\u0441\\u0442\\u0430',\n\tariaDescription:\n\t\t'\\u041d\\u0430\\u0436\\u043c\\u0438\\u0442\\u0435 Escape, \\u0447\\u0442\\u043e\\u0431\\u044b \\u0432\\u044b\\u0439\\u0442\\u0438 \\u0438\\u0437 \\u0440\\u0435\\u0434\\u0430\\u043a\\u0442\\u043e\\u0440\\u0430',\n\tdefaultPlaceholder:\n\t\t'\\u041d\\u0430\\u0447\\u043d\\u0438\\u0442\\u0435 \\u043f\\u0435\\u0447\\u0430\\u0442\\u0430\\u0442\\u044c...',\n\tmarkdownImported:\n\t\t'Markdown \\u0438\\u043c\\u043f\\u043e\\u0440\\u0442\\u0438\\u0440\\u043e\\u0432\\u0430\\u043d',\n};\n\nexport default locale;\n"],"mappings":"AAEA,IAAM,EAAuB,CAC5B,UACC,mCACD,gBACC,2CACD,mBACC,sBACD,iBACC"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{i as e,o as t,s as n,t as s}from"./HTMLUtils-Bhg3_P8B.mjs";import{C as i,D as r,E as o,M as a,N as l,O as c,T as h,_ as d,b as p,c as u,d as g,f as m,g as f,h as y,l as k,m as w,o as S,p as v,r as b,s as I,u as R,v as C,w as x}from"./Document-827l3P80.mjs";import{a as T,c as E,d as M,f as P,i as A,l as B,n as D,o as N,r as O,t as L,u as H}from"./Selection-HYoVFpAx.mjs";import{C as z,S as _,b as F,c as j,d as K,f as $,i as V,l as U,m as q,n as W,o as G,p as Q,r as J,s as X,t as Y,u as Z,w as ee,x as te,y as ne}from"./Commands-1dFFldi7.mjs";import{a as se,i as ie,r as re,t as oe}from"./TypeBrands-Ch9856Gb.mjs";import{n as ae,t as le}from"./DomUtils-Bf7JLFlx.mjs";import{t as ce}from"./SchemaRegistry-CkBN-1yW.mjs";import{n as he,o as de,r as pe,s as ue}from"./NodeResolver-Dleih-8R.mjs";import{b as ge,c as me,d as fe,f as ye,g as ke,h as we,m as Se,n as ve,o as be,p as Ie,s as Re,t as Ce,u as xe,v as Te,w as Ee}from"./Decoration-BpoEOANl.mjs";import{t as Me}from"./GapCursorNavigation-BuXngVu-.mjs";import{C as Pe,S as Ae,b as Be,t as De,v as Ne,x as Oe,y as Le}from"./CaretNavigationPlugin-CNsT0eb4.mjs";import{C as He,S as ze,a as _e,d as Fe,f as je,g as Ke,h as $e,i as Ve,m as Ue,n as qe,p as We,r as Ge,t as Qe,u as Je,w as Xe,x as Ye,y as Ze}from"./BlockInsertion-CJusvrDL.mjs";import{i as et,t as tt}from"./NodeSelectionCommands-1PjwUDTJ.mjs";import{t as nt}from"./Platform-ByobkiCc.mjs";import{a as st,n as it,o as rt,r as ot,t as at}from"./SelectionSync-BSHIw1EE.mjs";import{n as lt,t as ct}from"./EditorEventBoundary-zpYRxryo.mjs";import{_ as ht,g as dt,h as pt,m as ut,v as gt,y as mt}from"./TableDimensions-BBhjHNjQ.mjs";import{n as ft,t as yt}from"./DocumentParser-D2tr3ZKn.mjs";import{a as kt,c as wt,l as St,n as vt,t as bt,u as It}from"./StyleRuntime-DW6omotc.mjs";import{t as Rt}from"./BlockTypePickerRegistry-BTET9jM-.mjs";import{o as Ct,t as xt}from"./ToolbarPlugin-DtfGTO_V.mjs";import{a as Tt,b as Et,c as Mt,f as Pt,h as At,l as Bt,n as Dt,o as Nt,p as Ot,s as Lt,v as Ht}from"./PrintTypes-CxU69qu3.mjs";import{c as zt,l as _t,u as Ft}from"./PluginHelpers-Dx_0hfDe.mjs";import{t as jt}from"./GapCursorPlugin-DAxVzXRs.mjs";import{t as Kt}from"./TextFormattingPlugin-DBVlePqj.mjs";import $t from"dompurify";function Vt(e){e.registerNodeSpec({type:"paragraph",group:"block",content:{allow:["text"]},toDOM:e=>ae("p",e.id),toHTML:(e,t)=>`<p>${t||"<br>"}</p>`,parseHTML:[{tag:"p"},{tag:"div",priority:10}],sanitize:{tags:["p"]}})}var Ut=class{steps=[];stepMaps=[];selection;storedMarks;selectionBefore;origin;workingDoc;_readonlyAllowed=!1;constructor(e,t,n="api",s){this.selection=e,this.selectionBefore=e,this.storedMarks=t,this.origin=n,this.workingDoc=s??null}insertText(e,t,n,s,i){const r={type:"insertText",blockId:e,offset:t,text:n,marks:s,...i?{segments:i}:{}};return this.steps.push(r),this.advanceDoc(r),this}deleteText(e,t,n,s,i,r){let o;if(r)o=r;else if(this.workingDoc){const r=he(this.workingDoc,e);o=r?w(r,t,n):[l(s,[...i])]}else o=[l(s,[...i])];const a={type:"deleteText",blockId:e,from:t,to:n,deletedText:s,deletedMarks:i,deletedSegments:o};return this.steps.push(a),this.advanceDoc(a),this}deleteTextAt(e,t,n){const s=this.requireDoc("deleteTextAt"),i=this.requireBlock(s,e),r=d(i).slice(t,n),o=f(i,t),a=w(i,t,n);return this.deleteText(e,t,n,r,o,a)}splitBlock(e,t,n){const s={type:"splitBlock",blockId:e,offset:t,newBlockId:n};return this.steps.push(s),this.advanceDoc(s),this}mergeBlocks(e,t,n,s,i,r){const o={type:"mergeBlocks",targetBlockId:e,sourceBlockId:t,targetLengthBefore:n,...void 0!==s?{sourceType:s}:{},...i?{sourceAttrs:i}:{},...void 0!==r?{sourceHTMLId:r}:{}};return this.steps.push(o),this.advanceDoc(o),this}mergeBlocksAt(e,t){const n=this.requireDoc("mergeBlocksAt"),s=this.requireBlock(n,e),i=this.requireBlock(n,t),r=y(s);return this.mergeBlocks(e,t,r,i.type,i.attrs,i.htmlId)}addMark(e,t,n,s){const i=this.tryGetBlock(e);if(!i){const i={type:"addMark",blockId:e,from:t,to:n,mark:s};return this.steps.push(i),this.advanceDoc(i),this}const r=we(p(i),t,n,s.type);for(const o of r){const t={type:"addMark",blockId:e,from:o.from,to:o.to,mark:s};this.steps.push(t),this.advanceDoc(t)}return this}removeMark(e,t,n,s){const i=this.tryGetBlock(e);if(!i){const i={type:"removeMark",blockId:e,from:t,to:n,mark:s};return this.steps.push(i),this.advanceDoc(i),this}const r=ke(p(i),t,n,s.type);for(const o of r){const t={type:"removeMark",blockId:e,from:o.from,to:o.to,mark:o.mark};this.steps.push(t),this.advanceDoc(t)}return this}setBlockType(e,t,n){const s=this.requireDoc("setBlockType"),i=this.requireBlock(s,e),r={type:"setBlockType",blockId:e,nodeType:t,...n?{attrs:n}:{},previousNodeType:i.type,...i.attrs?{previousAttrs:i.attrs}:{}};return this.steps.push(r),this.advanceDoc(r),this}insertNode(e,t,n){const s={type:"insertNode",parentPath:e,index:t,node:n};return this.steps.push(s),this.advanceDoc(s),this}removeNode(e,t){const n=de(this.requireDoc("removeNode"),e,t);if(!n)throw new Error(`Node at index ${t} not found under parent path [${e.join(", ")}].`);const s={type:"removeNode",parentPath:e,index:t,removedNode:n};return this.steps.push(s),this.advanceDoc(s),this}moveNode(e,t,n,s){const i=this.requireDoc("moveNode"),r=de(i,e,t);if(!r)throw new Error(`Node at index ${t} not found under source path [${e.join(", ")}].`);if(n.includes(r.id))throw new Error(`Cannot move node "${r.id}" into its own subtree.`);const o=0===n.length?i.children.length:ue(i,n)?.children.length??-1;if(!Number.isInteger(s)||s<0||s>o)throw new Error(`Invalid destination index ${s} under path [${n.join(", ")}].`);const a={type:"moveNode",fromParentPath:e,fromIndex:t,toParentPath:n,toIndex:s,movedNode:r};return ye(a)||(this.steps.push(a),this.advanceDoc(a)),this}setNodeAttr(e,t){const n=ue(this.requireDoc("setNodeAttr"),e);if(!n)throw new Error(`Node not found at path [${e.join(", ")}].`);const s={type:"setNodeAttr",path:e,attrs:t,...n.attrs?{previousAttrs:n.attrs}:{}};return this.steps.push(s),this.advanceDoc(s),this}insertInlineNode(e,t,n){const s={type:"insertInlineNode",blockId:e,offset:t,node:n};return this.steps.push(s),this.advanceDoc(s),this}removeInlineNode(e,t){const n=this.requireDoc("removeInlineNode"),s=C(this.requireBlock(n,e),t);if(!s||"inline"!==s.kind)throw new Error(`No InlineNode at offset ${t} in block "${e}".`);const i={type:"removeInlineNode",blockId:e,offset:t,removedNode:s.node};return this.steps.push(i),this.advanceDoc(i),this}setInlineNodeAttr(e,t,n){const s=this.requireDoc("setInlineNodeAttr"),i=p(this.requireBlock(s,e));let r=0;for(const o of i){if(h(o)&&r===t){const s={type:"setInlineNodeAttr",blockId:e,offset:t,attrs:n,previousAttrs:o.attrs};return this.steps.push(s),this.advanceDoc(s),this}r+=h(o)?1:o.text.length}throw new Error(`No InlineNode at offset ${t} in block "${e}".`)}readonlyAllowed(){return this._readonlyAllowed=!0,this}setSelection(e){return this.selection=e,this}setNodeSelection(e,t){return this.selection=O(e,t),this}setStoredMarks(e,t){return this.steps.push({type:"setStoredMarks",marks:e,previousMarks:t}),this.storedMarks=e,this}build(){return{steps:[...this.steps],selectionBefore:this.selectionBefore,selectionAfter:this.selection,storedMarksAfter:this.storedMarks,mapping:Te.from(this.stepMaps),forwardStepMaps:[...this.stepMaps],metadata:{origin:this.origin,timestamp:Date.now(),...this._readonlyAllowed?{readonlyAllowed:!0}:{}}}}requireDoc(e){if(!this.workingDoc)throw new Error(`${e} requires a document. Use state.transaction() or provide doc to constructor.`);return this.workingDoc}requireBlock(e,t){const n=he(e,t);if(!n)throw new Error(`Block "${t}" not found in working document.`);return n}tryGetBlock(e){return this.workingDoc?he(this.workingDoc,e)??null:null}advanceDoc(e){const t=this.workingDoc??qt;this.stepMaps.push(Re(t,e)),this.workingDoc&&(this.workingDoc=be(this.workingDoc,e))}},qt={children:[]},Wt=class e{doc;selection;storedMarks;schema;_blockMap=null;_blockOrder=null;constructor(e,t,n,s){this.doc=e,this.selection=t,this.storedMarks=n,this.schema=s}static create(t){const n=t?.schema??te(),s=t?.doc??I(),i=Xt(s.children);return new e(s,t?.selection??L(i?i.id:oe(""),0),null,n)}transaction(e="api"){return new Ut(this.selection,this.storedMarks,e,this.doc)}apply(t){let n=this.doc;for(const e of t.steps)n=be(n,e);const s=Qt(n,t.selectionAfter);return new e(n,s,t.storedMarksAfter,this.schema)}getBlock(e){return this._blockMap??=function(e){const t=/* @__PURE__ */new Map;return function e(n){for(const s of n)x(s)&&(t.set(s.id,s),e(s.children))}(e.children),t}(this.doc),this._blockMap.get(e)}getBlockOrder(){return this._blockOrder??=function(e){const t=[];return function e(n){for(const s of n)x(s)&&(o(s)?t.push(s.id):e(s.children))}(e.children),t}(this.doc),this._blockOrder}getNodePath(e){return pe(this.doc,e)}getParent(e){const t=pe(this.doc,e);if(!t||t.length<=1)return;const n=t[t.length-2];return n?he(this.doc,n):void 0}withSelection(t){const n=Qt(this.doc,t);return new e(this.doc,n,this.storedMarks,this.schema)}toJSON(){return{doc:this.doc,selection:this.selection}}static fromJSON(t,n){return new e(t.doc,t.selection,null,n??te())}};function Gt(e,t){const n=he(e,t.blockId);if(n){const e=y(n);return t.offset>e?A(t.blockId,e,t.path):t}const s=e.children[0];return s?A(s.id,0):t}function Qt(e,t){if(B(t))return he(e,t.nodeId)?t:Jt(e,t);if(E(t))return he(e,t.blockId)?t:Jt(e,t);const n=Gt(e,t.anchor),s=Gt(e,t.head);return n===t.anchor&&s===t.head?t:T(n,s)}function Jt(e,t){const n=Xt(e.children);return n?L(n.id,0):t}function Xt(e){for(const t of e){if(!x(t))continue;if(o(t))return t;const e=Xt(t.children);if(e)return e}return null}function Yt(e,t){return t.isEmpty?e:B(e)?function(e,t){const n={blockId:e.nodeId,offset:0},s=t.mapResult(n,-1);return s.deleted||s.pos.blockId!==e.nodeId?null:O(e.nodeId,e.path)}(e,t):E(e)?function(e,t){const n={blockId:e.blockId,offset:0},s=t.mapResult(n,-1);return s.deleted||s.pos.blockId!==e.blockId?null:D(e.blockId,e.side,e.path)}(e,t):Zt(e,t)}function Zt(e,t){if(N(e)){const n=t.map(e.anchor,-1);return n===e.anchor?e:L(n.blockId,n.offset)}const n=t.map(e.anchor,-1),s=t.map(e.head,1);return n===e.anchor&&s===e.head?e:T(n,s)}function en(e){for(const t of e.steps)if("setStoredMarks"!==t.type)return!1;return!0}function tn(e){return!!e.metadata.readonlyAllowed||en(e)}var nn=class{undoStack=[];redoStack=[];groupTimeoutMs;maxDepth;lastOrigin=null;constructor(e){this.groupTimeoutMs=e?.groupTimeoutMs??500,this.maxDepth=e?.maxDepth??100}push(e){if("history"===e.metadata.origin)return;if(!e.steps.some(e=>"setStoredMarks"!==e.type))return void(this.lastOrigin=null);const t=e.metadata.timestamp,n=this.undoStack[this.undoStack.length-1];for(n&&"input"===e.metadata.origin&&"input"===this.lastOrigin&&t-n.timestamp<this.groupTimeoutMs&&this.isSameInputType(n.transactions,e)&&n?this.undoStack[this.undoStack.length-1]={...n,transactions:[...n.transactions,e],timestamp:t}:this.undoStack.push({transactions:[e],timestamp:t,interveningMapping:Te.empty}),this.lastOrigin=e.metadata.origin,this.redoStack=[];this.undoStack.length>this.maxDepth;)this.undoStack.shift()}recordIntervening(e){e.isEmpty||(on(this.undoStack,e),on(this.redoStack,e))}undo(e){const t=this.undoStack.pop();if(!t)return null;const n=sn(t,e,"undo");return null===n?(this.lastOrigin=null,null):(this.redoStack.push({transactions:[n.transaction],timestamp:Date.now(),interveningMapping:Te.empty}),this.lastOrigin=null,{state:n.newState,transaction:n.transaction})}redo(e){const t=this.redoStack.pop();if(!t)return null;const n=sn(t,e,"redo");return null===n?(this.lastOrigin=null,null):(this.undoStack.push({transactions:[n.transaction],timestamp:Date.now(),interveningMapping:Te.empty}),this.lastOrigin=null,{state:n.newState,transaction:n.transaction})}canUndo(){return this.undoStack.length>0}canRedo(){return this.redoStack.length>0}clear(){this.undoStack=[],this.redoStack=[],this.lastOrigin=null}isSameInputType(e,t){const n=e[e.length-1];return!!n&&n.steps[0]?.type===t.steps[0]?.type}};function sn(e,t,n){let s=e.interveningMapping,i=t.doc;const r=[],o=[];for(let d=e.transactions.length-1;d>=0;d--){const t=e.transactions[d];if(t)for(let e=t.steps.length-1;e>=0;e--){const n=t.steps[e],a=t.forwardStepMaps[e];if(!n||!a)continue;const l=xe(me(n),s,i);if(null===l)return null;const c=Re(i,l);r.push(l),o.push(c),i=be(i,l),s=rn(a,s,c)}}const a=function(e){const t=e.transactions[0];return t?fe(t):null}(e),l={steps:r,selectionBefore:t.selection,selectionAfter:t.selection,storedMarksAfter:a,mapping:Te.from(o),forwardStepMaps:o,metadata:{origin:"history",timestamp:Date.now(),historyDirection:n}};let c=t.apply(l);const h=e.transactions[0];if(h){const e=Yt(h.selectionBefore,s);null!==e&&(c=c.withSelection(e))}return{newState:c,transaction:{...l,selectionAfter:c.selection}}}function rn(e,t,n){return t.isEmpty&&Ee(ge(e),n)?t:Te.from([e]).appendMapping(t).appendMap(n)}function on(e,t){for(let n=0;n<e.length;n++){const s=e[n];s&&(e[n]={...s,interveningMapping:s.interveningMapping.appendMapping(t)})}}var an={Period:".",Comma:",",Slash:"/",Semicolon:";",Quote:"'",BracketLeft:"[",BracketRight:"]",Backslash:"\\",Minus:"-",Equal:"=",Backquote:"`"},ln={1:"!",2:"@",3:"#",4:"$",5:"%",6:"^",7:"&",8:"*",9:"(",0:")","`":"~","-":"_","=":"+","[":"{","]":"}","\\":"|",";":":","'":'"',",":"<",".":">","/":"?"},cn=function(){const e=/* @__PURE__ */new Map;for(let t=0;t<26;t++){const n=String.fromCharCode(65+t);e.set(`Key${n}`,n)}for(let t=0;t<=9;t++)e.set(`Digit${t}`,String(t)),e.set(`Numpad${t}`,String(t));for(const[t,n]of Object.entries(an))e.set(t,n);return e}();function hn(e){const t=[];return(e.metaKey||e.ctrlKey)&&t.push("Mod"),e.shiftKey&&t.push("Shift"),e.altKey&&t.push("Alt"),t}function dn(e){const t=hn(e);let n=e.key;return" "===n?n="Space":1===n.length&&(n=n.toUpperCase()),t.push(n),t.join("-")}function pn(e){return e.ctrlKey||e.metaKey?e.ctrlKey&&e.altKey&&!e.metaKey?null:cn.get(e.code)??null:null}function un(e,t,n){if(o(e))return t.selectedLeafIds.has(e.id)?function(e,t){const n=y(e),s=e.id===t.firstBlockId?t.firstOffset:0,i=e.id===t.lastBlockId?t.lastOffset:n;if(0===s&&i===n)return e;const r=a(w(e,s,i)),{htmlId:o,...l}=e;return{...l,children:r}}(e,t):null;const s=v(e),i=[];let r=s.length!==e.children.length;for(const o of s){const e=un(o,t,n);e?(i.push(e),e!==o&&(r=!0)):r=!0}if(0===i.length)return null;if(!r)return e;const{htmlId:l,...c}=e,h={...c,children:i};return n?.getNodeSpec(e.type)?.transformSelectionSlice?.(e,h)??h}var gn=class{element;getState;dispatch;schemaRegistry;syncSelection;isReadOnly;handleCopy;handleCut;constructor(e,t){this.element=e,this.getState=t.getState,this.dispatch=t.dispatch,this.schemaRegistry=t.schemaRegistry,this.syncSelection=t.syncSelection,this.isReadOnly=t.isReadOnly??(()=>!1),this.handleCopy=this.onCopy.bind(this),this.handleCut=this.onCut.bind(this),e.addEventListener("copy",this.handleCopy),e.addEventListener("cut",this.handleCut)}onCopy(e){if(!ct(e,this.element))return;this.syncSelection?.();const t=this.getState(),n=t.selection;if(E(n))return;if(H(n)&&N(n))return;e.preventDefault();const s=e.clipboardData;s&&(B(n)?this.writeNodeSelectionToClipboard(s,t):this.writeTextSelectionToClipboard(s,t))}onCut(e){if(!ct(e,this.element))return;if(this.isReadOnly())return;this.syncSelection?.();const t=this.getState(),n=t.selection;if(E(n))return;if(H(n)&&N(n))return;e.preventDefault();const s=e.clipboardData;if(s)if(B(n)){this.writeNodeSelectionToClipboard(s,t);const e=tt(t,n);e&&this.dispatch(e)}else{this.writeTextSelectionToClipboard(s,t);const e=W(t);e&&this.dispatch(e)}}writeNodeSelectionToClipboard(e,t){const n=t.selection;if(!B(n))return;const s=t.getBlock(n.nodeId);if(!s)return;if(!o(s))return this.schemaRegistry&&e.setData("text/html",pt({children:[s]},this.schemaRegistry)),void e.setData("text/plain",this.plainTextFromBlockTree(s));const i={type:s.type,...s.htmlId?{htmlId:s.htmlId}:{},...s.attrs?{attrs:{...s.attrs}}:{}};e.setData("application/x-notectl-block",JSON.stringify(i));const r=this.schemaRegistry?.getNodeSpec(s.type);r?.toHTML&&e.setData("text/html",dt(r.toHTML(s,""),s.htmlId));const a=s.attrs,l="string"==typeof a?.alt?a.alt:"";e.setData("text/plain",l)}plainTextFromBlockTree(e){return o(e)?d(e):v(e).map(e=>this.plainTextFromBlockTree(e)).join("\n")}writeTextSelectionToClipboard(e,t){const n=t.selection;if(B(n))return;if(E(n))return;if(N(n))return;if(this.selectionRequiresDocumentSerializer(t))return void this.writeCompositeSelectionToClipboard(e,t);const s=t.getBlockOrder(),i=M(n,s),r=s.indexOf(i.from.blockId),o=s.indexOf(i.to.blockId),a=[],l=[],c=[];for(let d=r;d<=o;d++){const e=s[d];if(!e)continue;const n=t.getBlock(e);if(!n)continue;const h=y(n),p=d===r?i.from.offset:0,u=d===o?i.to.offset:h,g=this.extractSegmentsForRange(n,p,u),m=this.plainTextFromSegments(g);a.push(m),c.push({block:n,start:p,end:u}),l.push({type:n.type,text:m,...0===p&&u===h&&n.htmlId?{htmlId:n.htmlId}:{},...n.attrs?{attrs:{...n.attrs}}:{},...g.length>0?{segments:g}:{}})}const h=a.join("\n");if(e.setData("text/plain",h),this.schemaRegistry){const n=ht(this.schemaRegistry),a=r!==o,h=l.some(e=>void 0!==e.htmlId||void 0!==e.type&&"paragraph"!==e.type);if(a||this.containsInlineSegments(l)||h){const t=this.serializeBlocksToClipboardHTML(c,n,l);e.setData("text/html",t)}else{const o=s[r],a=o?t.getBlock(o):void 0;if(a){const t=this.serializeBlockRangeToHTML(a,i.from.offset,i.to.offset,n);e.setData("text/html",t)}}}}selectionRequiresDocumentSerializer(e){const t=this.getTextSelection(e);if(!t||N(t))return!1;const n=M(t,e.getBlockOrder()),s=pe(e.doc,n.from.blockId),i=pe(e.doc,n.to.blockId);if(!s||!i)return!1;if(s[0]===i[0]){const t=e.doc.children.find(e=>e.id===s[0]);return!(!t||o(t))}const r=e.doc.children.findIndex(e=>e.id===s[0]),a=e.doc.children.findIndex(e=>e.id===i[0]);for(let l=r;l<=a;l++){const t=e.doc.children[l];if(t){if(!o(t))return!0;if((this.schemaRegistry?.getNodeSpec(t.type))?.isVoid)return!0}}return!1}getTextSelection(e){const t=e.selection;if(H(t))return t}extractPlainTextForRange(e,t,n){return this.plainTextFromSegments(this.extractSegmentsForRange(e,t,n))}plainTextFromSegments(e){return e.map(e=>"inline"===e.kind?"":e.text).join("")}writeCompositeSelectionToClipboard(e,t){const n=this.getTextSelection(t);if(!n)return;const s=t.getBlockOrder(),i=M(n,s),r=s.indexOf(i.from.blockId),o=s.indexOf(i.to.blockId),a=[];for(let l=r;l<=o;l++){const e=s[l];if(!e)continue;const n=t.getBlock(e);if(!n)continue;const c=l===r?i.from.offset:0,h=l===o?i.to.offset:y(n);a.push(this.extractPlainTextForRange(n,c,h))}if(e.setData("text/plain",a.join("\n")),this.schemaRegistry){const s=function(e,t,n){const s=e.getBlockOrder(),i=M(t,s),r=s.indexOf(i.from.blockId),o=s.indexOf(i.to.blockId);if(-1===r||-1===o||r>o)return{children:[]};const a=e.getNodePath(i.from.blockId),l=e.getNodePath(i.to.blockId),c=a?.[0],h=l?.[0];if(!c||!h)return{children:[]};const d=e.doc.children.findIndex(e=>e.id===c),p=e.doc.children.findIndex(e=>e.id===h);if(-1===d||-1===p||d>p)return{children:[]};const u={firstBlockId:i.from.blockId,firstOffset:i.from.offset,lastBlockId:i.to.blockId,lastOffset:i.to.offset,selectedLeafIds:new Set(s.slice(r,o+1))},g=[];for(let m=d;m<=p;m++){const t=e.doc.children[m];if(!t)continue;const s=un(t,u,n);s&&g.push(s)}return{children:g}}(t,n,this.schemaRegistry);if(s.children.length>0){const t=pt(s,this.schemaRegistry);e.setData("text/html",t)}}}serializeBlockRangeToHTML(e,t,n,s){const i=[];return g(e,t,n,{onText:(e,t)=>{this.schemaRegistry&&i.push(gt(e,t,this.schemaRegistry,s))},onInline:e=>{const t=this.schemaRegistry?.getInlineNodeSpec(e.inlineType);t?.toHTMLString&&i.push(t.toHTMLString(e))}}),i.join("")}extractSegmentsForRange(e,t,n){const s=[];return g(e,t,n,{onText:(e,t)=>{s.push({text:e,marks:t.map(e=>({type:e.type,...e.attrs?{attrs:{...e.attrs}}:{}}))})},onInline:e=>{s.push({kind:"inline",inlineType:e.inlineType,...Object.keys(e.attrs).length>0?{attrs:{...e.attrs}}:{}})}}),s}containsInlineSegments(e){return e.some(e=>e.segments?.some(e=>"inline"===e.kind))}serializeBlocksToClipboardHTML(e,t,n){const s=[];let i,r=[];const o=()=>{r.length>0&&i&&(s.push(`<${i}>${r.join("")}</${i}>`),r=[],i=void 0)};for(const l of e){const{block:e,start:n,end:a}=l,c=0===n&&a===y(e),{htmlId:h,...d}=e,p={...d,...c&&e.htmlId?{htmlId:e.htmlId}:{}},u=this.serializeBlockRangeToHTML(e,n,a,t),g=this.schemaRegistry?.getNodeSpec(p.type);if(g?.wrapper){const e=g.wrapper(p).tag;i!==e&&(o(),i=e),g.toHTML?r.push(dt(g.toHTML(p,u),p.htmlId)):r.push(dt(`<li>${u}</li>`,p.htmlId))}else o(),g?.toHTML?s.push(dt(g.toHTML(p,u),p.htmlId)):s.push(dt(`<p>${u}</p>`,p.htmlId))}o();const a=JSON.stringify(n).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/'/g,"'").replace(/"/g,""");return s.push(`<span data-notectl-rich="${a}" hidden></span>`),s.join("")}destroy(){this.element.removeEventListener("copy",this.handleCopy),this.element.removeEventListener("cut",this.handleCut)}},mn=class{_composing=!1;_activeBlockId=null;get isComposing(){return this._composing}get activeBlockId(){return this._activeBlockId}start(e){this._composing=!0,this._activeBlockId=e}end(){this._composing=!1,this._activeBlockId=null}},fn=class{element;getState;dispatch;syncSelection;inputRuleRegistry;isReadOnly;shouldApplyInputRules;compositionTracker;getTextInputInterceptors;compositionCommitHandled=!1;handleBeforeInput;handleCompositionStart;handleCompositionEnd;constructor(e,t){this.element=e,this.getState=t.getState,this.dispatch=t.dispatch,this.syncSelection=t.syncSelection,this.inputRuleRegistry=t.inputRuleRegistry,this.isReadOnly=t.isReadOnly??(()=>!1),this.shouldApplyInputRules=t.shouldApplyInputRules??(()=>!0),this.compositionTracker=t.compositionTracker??new mn,this.getTextInputInterceptors=t.getTextInputInterceptors??(()=>[]),this.handleBeforeInput=this.onBeforeInput.bind(this),this.handleCompositionStart=this.onCompositionStart.bind(this),this.handleCompositionEnd=this.onCompositionEnd.bind(this),e.addEventListener("beforeinput",this.handleBeforeInput),e.addEventListener("compositionstart",this.handleCompositionStart),e.addEventListener("compositionend",this.handleCompositionEnd)}onBeforeInput(e){if(!ct(e,this.element))return;if(this.isReadOnly())return;if(this.compositionTracker.isComposing&&"insertCompositionText"===e.inputType)return;if(!function(e){switch(e){case"insertText":case"insertReplacementText":case"insertFromComposition":case"insertParagraph":case"insertLineBreak":case"deleteContentBackward":case"deleteContentForward":case"deleteWordBackward":case"deleteWordForward":case"deleteSoftLineBackward":case"deleteSoftLineForward":case"deleteByCut":case"insertFromPaste":case"insertFromDrop":case"formatBold":case"formatItalic":case"formatUnderline":case"historyUndo":case"historyRedo":return!0;default:return!1}}(e.inputType))return;"insertText"!==e.inputType&&"insertCompositionText"!==e.inputType&&"insertFromComposition"!==e.inputType&&this.syncSelection(),e.preventDefault();const t=this.getState();let n=null;switch(e.inputType){case"insertText":case"insertReplacementText":e.data&&(n=this.runTextInputInterceptors(e.data,t)??V(t,e.data,"input"));break;case"insertFromComposition":e.data&&(this.compositionCommitHandled=!0,n=this.runTextInputInterceptors(e.data,t)??V(t,e.data,"input"));break;case"insertParagraph":n=X(t);break;case"insertLineBreak":n=J(t);break;case"deleteContentBackward":n=j(t);break;case"deleteContentForward":n=U(t);break;case"deleteWordBackward":n=$(t);break;case"deleteWordForward":n=Q(t);break;case"deleteSoftLineBackward":n=Z(t);break;case"deleteSoftLineForward":n=K(t)}n&&(this.dispatch(n),"insertText"!==e.inputType&&"insertReplacementText"!==e.inputType||this.checkInputRules())}onCompositionStart(e){if(!ct(e,this.element))return;const t=this.getState();H(t.selection)&&(this.compositionCommitHandled=!1,this.compositionTracker.start(t.selection.anchor.blockId))}onCompositionEnd(e){if(!ct(e,this.element))return;if(this.compositionTracker.end(),this.isReadOnly())return;if(this.compositionCommitHandled)return void(this.compositionCommitHandled=!1);const t=e.data;if(!t)return;const n=V(this.getState(),t,"input");this.dispatch(n)}runTextInputInterceptors(e,t){const n=this.getTextInputInterceptors();if(0===n.length)return null;for(const s of n){const n=s.interceptor(e,t);if(n)return n}return null}checkInputRules(){if(!this.shouldApplyInputRules())return;if(!this.inputRuleRegistry)return;const e=this.inputRuleRegistry.getInputRules();if(0===e.length)return;const t=this.getState();if(!H(t.selection))return;const{anchor:n}=t.selection,s=t.getBlock(n.blockId);if(!s)return;const i=function(e){let t="";for(const n of p(e))t+=r(n)?n.text:"";return t}(s).slice(0,n.offset);for(const r of e){const e=r.pattern.exec(i);if(e){const n=e.index,s=n+e[0].length,i=r.handler(t,e,n,s);if(i)return void this.dispatch(i)}}}destroy(){this.element.removeEventListener("beforeinput",this.handleBeforeInput),this.element.removeEventListener("compositionstart",this.handleCompositionStart),this.element.removeEventListener("compositionend",this.handleCompositionEnd)}},yn={ArrowLeft:"left",ArrowRight:"right",ArrowUp:"up",ArrowDown:"down"},kn=class{element;getState;dispatch;undo;redo;keymapRegistry;isReadOnly;compositionTracker;getTextDirectionFn;navigateFromGapCursorFn;handleKeydown;constructor(e,t){this.element=e,this.getState=t.getState,this.dispatch=t.dispatch,this.undo=t.undo,this.redo=t.redo,this.keymapRegistry=t.keymapRegistry,this.isReadOnly=t.isReadOnly??(()=>!1),this.compositionTracker=t.compositionTracker,this.getTextDirectionFn=t.getTextDirection??(()=>"ltr"),this.navigateFromGapCursorFn=t.navigateFromGapCursor,this.handleKeydown=this.onKeydown.bind(this),e.addEventListener("keydown",this.handleKeydown)}onKeydown(e){if(!ct(e,this.element))return;if(this.compositionTracker?.isComposing)return;if(this.handleNodeSelectionKeys(e))return;if(this.handleGapCursorKeys(e))return;if(this.isReadOnly()){if(this.keymapRegistry){const t=this.keymapRegistry.getKeymapsByPriority();if(this.dispatchKeymaps(e,[t.navigation]))return}return void this.handleEscape(e)}if(this.keymapRegistry){const t=this.keymapRegistry.getKeymapsByPriority();if(this.dispatchKeymaps(e,[t.context,t.navigation,t.default]))return}if(this.handleGapCursorArrowFallback(e))return;if(this.handleTab(e))return;if(this.handleEscape(e))return;if(!e.metaKey&&!e.ctrlKey)return;let t=this.resolveBuiltinShortcut(e.key.toLowerCase(),e.shiftKey);if(null===t){const n=pn(e);null!==n&&(t=this.resolveBuiltinShortcut(n.toLowerCase(),e.shiftKey))}if(null===t)return;if(e.preventDefault(),"undo"===t)return void this.undo();if("redo"===t)return void this.redo();const n=G(this.getState());n&&this.dispatch(n)}resolveBuiltinShortcut(e,t){return"z"!==e||t?"z"===e&&t||"y"===e&&!t?"redo":"a"!==e||t?null:"selectAll":"undo"}dispatchKeymaps(e,t){if(this.runDescriptor(e,t,dn(e)))return!0;for(const n of function(e){const t=pn(e);if(null===t)return[];const n=hn(e),s=[[...n,t].join("-")];if(e.shiftKey){const e=ln[t];void 0!==e&&s.push([...n,e].join("-"))}return s}(e))if(this.runDescriptor(e,t,n))return!0;return!1}runDescriptor(e,t,n){for(const s of t)for(let t=s.length-1;t>=0;t--){const i=s[t]?.[n];if(i?.())return e.preventDefault(),!0}return!1}handleNodeSelectionKeys(e){const t=this.getState(),n=t.selection;if(!B(n))return!1;const s=e.key;if(!("ArrowLeft"!==s&&"ArrowUp"!==s&&"ArrowRight"!==s&&"ArrowDown"!==s||e.shiftKey||e.metaKey||e.ctrlKey||e.altKey)){const i=yn[s];if(!i)return!1;const r=et(t,i,this.isSelectedBlockRtl(n.nodeId));return!!r&&(e.preventDefault(),this.dispatch(r),!0)}if("Backspace"===s||"Delete"===s){if(this.isReadOnly())return e.preventDefault(),!0;e.preventDefault();const s=tt(t,n);return s&&this.dispatch(s),!0}if("Enter"===s){if(this.isReadOnly())return e.preventDefault(),!0;e.preventDefault();const n=X(t);return n&&this.dispatch(n),!0}if("Escape"===s){e.preventDefault();const n=et(t,"right");return n&&this.dispatch(n),!0}return!1}handleGapCursorKeys(e){const t=this.getState(),n=t.selection;if(!E(n))return!1;const s=e.key;if("ArrowLeft"===s||"ArrowRight"===s||"ArrowUp"===s||"ArrowDown"===s)return!1;if("Escape"===s||"Tab"===s)return!1;if(e.ctrlKey||e.metaKey||e.altKey)return!1;if("Enter"===s){if(this.isReadOnly())return e.preventDefault(),!0;e.preventDefault();const n=X(t);return n&&this.dispatch(n),!0}if("Backspace"===s){if(this.isReadOnly())return e.preventDefault(),!0;e.preventDefault();const s=ne(t,n);return s&&this.dispatch(s),!0}if("Delete"===s){if(this.isReadOnly())return e.preventDefault(),!0;e.preventDefault();const s=F(t,n);return s&&this.dispatch(s),!0}if(1===s.length){if(this.isReadOnly())return e.preventDefault(),!0;e.preventDefault();const n=V(t,s);return this.dispatch(n),!0}return!1}handleGapCursorArrowFallback(e){const t=this.getState(),n=t.selection;if(!E(n))return!1;const s=e.key;if("ArrowLeft"!==s&&"ArrowRight"!==s&&"ArrowUp"!==s&&"ArrowDown"!==s)return!1;const i=yn[s];if(!i)return!1;if(!this.navigateFromGapCursorFn)return!1;const r=this.navigateFromGapCursorFn(t,i,this.element);return!(!r||P(r.selectionAfter,n)||(e.preventDefault(),this.dispatch(r),0))}handleTab(e){if("Tab"!==e.key)return!1;if(e.metaKey||e.ctrlKey||e.altKey)return!1;if(e.preventDefault(),e.shiftKey)return!0;const t=V(this.getState(),"\t");return this.dispatch(t),!0}handleEscape(e){return"Escape"===e.key&&(this.element.blur(),!0)}isSelectedBlockRtl(e){const t=this.element.querySelector(`[data-block-id="${e}"]`);return t instanceof HTMLElement&&"rtl"===this.getTextDirectionFn(t)}destroy(){this.element.removeEventListener("keydown",this.handleKeydown)}},wn=/(^|\n) {0,3}(```|~~~)/,Sn=/(^|\n)\s*\|?[ :|]*-{3,}[ :|-]*(\n|$)/,vn=/(^|\n) {0,3}(#{1,6} |[-*+] |\d{1,9}[.)] |> )/g;function bn(e,t){if(0===t.blocks.length)return e.transaction("paste").setSelection(e.selection).build();const n=t.blocks[0];return n?1===t.blocks.length&&n.type===se("paragraph")?function(e,t){const n=e.selection;if(B(n))return e.transaction("paste").setSelection(n).build();if(E(n))return function(e,t,n){const s=Cn(e,t);if(!s)return e.transaction("paste").setSelection(t).build();const i=m(),r=e.transaction("paste");r.insertNode(s.parentPath,s.insertIndex,S(se("paragraph"),[R("")],i));const o=Rn(r,i,0,n);return r.setSelection(L(i,o)),r.build()}(e,n,t);const{builder:s,insertBlockId:i,insertOffset:r}=In(e,n),o=Rn(s,i,r,t);return s.setSelection(L(i,o)),s.build()}(e,n.segments):1===t.blocks.length?function(e,t){const n=e.selection;if(B(n))return e.transaction("paste").setSelection(n).build();if(E(n))return xn(e,n,[t]);const{builder:s,insertBlockId:i,insertOffset:r}=In(e,n);s.setBlockType(i,t.type,t.attrs);const o=Rn(s,i,r,t.segments);return s.setSelection(L(i,o)),s.build()}(e,n):function(e,t){const n=e.selection;if(B(n))return e.transaction("paste").setSelection(n).build();if(E(n))return xn(e,n,t.blocks);const{builder:s,landingId:i,resolved:r,insertBlockId:o,insertOffset:l}=In(e,n),c=e.getBlockOrder();let h;if(i){const t=pe(e.doc,r.blockId)?.[0];h=t?e.doc.children.findIndex(e=>e.id===t):0}else h=c.indexOf(o);const d=t.blocks[0],p=t.blocks[t.blocks.length-1];if(!d||!p)return s.build();const u=t.blocks.slice(1,-1),g=Rn(s,o,l,d.segments),f=m();s.splitBlock(o,g,f),d.type!==se("paragraph")&&s.setBlockType(o,d.type,d.attrs);let y=h+1;for(const k of u){const e=S(k.type,a(k.segments),m(),k.attrs);s.insertNode([],y,e),y++}return Rn(s,f,0,p.segments),p.type!==se("paragraph")&&s.setBlockType(f,p.type,p.attrs),s.setSelection(L(f,Se(p.segments))),s.build()}(e,t):e.transaction("paste").setSelection(e.selection).build()}function In(e,t){const n=e.transaction("paste");let s;N(t)||(s=Y(e,n));const i=Xe(t,e.getBlockOrder());return{builder:n,landingId:s,resolved:i,insertBlockId:s??i.blockId,insertOffset:s?0:i.offset}}function Rn(e,t,n,s){let i=n,r=[];const o=()=>{if(0===r.length)return;const n=r.map(e=>"text"===e.kind?e.text:"").join("");n.length>0&&(e.insertText(t,i,n,[],r),i+=n.length),r=[]};for(const a of s)"inline"===a.kind?(o(),e.insertInlineNode(t,i,a.node),i+=1):r.push(a);return o(),i}function Cn(e,t){const n=pe(e.doc,t.blockId);if(!n)return null;const s=Ze(n),i=ze(He(e,s),t.blockId);return i<0?null:{parentPath:s,insertIndex:"before"===t.side?i:i+1}}function xn(e,t,n){const s=Cn(e,t);if(!s)return e.transaction("paste").setSelection(t).build();const i=e.transaction("paste");let r,o=s.insertIndex,l=0;for(const c of n){const e=m(),t=S(c.type,a(c.segments),e,c.attrs);i.insertNode(s.parentPath,o,t),o++,r=e,l=Se(c.segments)}return r&&i.setSelection(L(r,l)),i.build()}function Tn(e,t,n){const s=function(e){const t=Pn(e.children,Mn);return t===e.children?e:{children:t}}(function(e){const t=Pn(e.children,En);return t===e.children?e:{children:t}}(e)),i=t?An(s,t):s,r=t?ee(t):void 0;n(Wt.create({doc:i,schema:r}))}function En(e){const n=Pn(e.children,e=>r(e)||h(e)?e:En(e)),s=e.htmlId,i=t(s),o=Object.prototype.hasOwnProperty.call(e,"htmlId"),a=s===i&&(void 0!==i||!o);if(n===e.children&&a)return e;const{htmlId:l,...c}=e;return{...c,...i?{htmlId:i}:{},children:n}}function Mn(e){if(!e.children)return e;const t=Pn(e.children,e=>r(e)||h(e)?e.marks?e:{...e,marks:[]}:Mn(e));return t===e.children?e:{...e,children:t}}function Pn(e,t){let n=!1;const s=e.map(e=>{const s=t(e);return s!==e&&(n=!0),s});return n?s:e}function An(e,t){return{children:e.children.map(e=>Bn(e,t))}}function Bn(e,t){const n=t.getNodeSpec(e.type);let s=e;if(n?.content&&n.content.allow.some(e=>"text"!==e)){const i=n.content.allow.includes("text");if(o(e)){if(!i&&(0!==e.children.length||0!==n.content.min)){const t=e.children.length>0?e.children:void 0,n=S(se("paragraph"),t);s=S(e.type,[n],e.id,e.attrs,e.htmlId)}}else{const n=e.children.map(e=>r(e)||h(e)?e:Bn(e,t));s=S(e.type,n,e.id,e.attrs,e.htmlId)}}const i=n?.normalizeAttrs?.(s);if(n?.normalizeAttrs&&!b(s.attrs,i)){const{attrs:e,...t}=s;s={...t,...i?{attrs:i}:{}}}return n?.normalizeNode?.(s)??s}function Dn(e){return e.doc.children.map(Nn).join("\n")}function Nn(e){return o(e)?d(e):v(e).map(Nn).join("\n")}function On(e){if(!e)return!0;if(0===e.children.length)return!0;if(e.children.length>1)return!1;const t=e.children[0];return!t||"paragraph"===t.type&&0===y(t)}var Ln=new Set(["P","DIV","H1","H2","H3","H4","H5","H6","BLOCKQUOTE","UL","OL","LI","HR","PRE","TABLE","THEAD","TBODY","TR"]),Hn=new Set(["STRONG","B","EM","I","U","S","STRIKE","DEL","A","SPAN","BR","SUB","SUP","CODE"]),zn=/^H([1-6])$/;function _n(e){const t=e.style.fontWeight,n=Number.parseInt(t,10);return!("normal"===t||!Number.isNaN(n)&&n<700)&&{}}var Fn=new Map([["STRONG",{markName:"bold",getAttrs:_n}],["B",{markName:"bold",getAttrs:_n}],["EM",{markName:"italic"}],["I",{markName:"italic"}],["U",{markName:"underline"}],["S",{markName:"strikethrough"}],["STRIKE",{markName:"strikethrough"}],["DEL",{markName:"strikethrough"}],["A",{markName:"link",getAttrs:function(e){return{href:n(e.getAttribute("href")??"")}}}]]),jn=class{schema;blockParseRules;markParseRules;inlineParseRules;blockTagHandlers;constructor(e){this.schema=e.schema,this.blockParseRules=e.schemaRegistry?.getBlockParseRules()??[],this.markParseRules=e.schemaRegistry?.getMarkParseRules()??[],this.inlineParseRules=e.schemaRegistry?.getInlineParseRules()??[],this.blockTagHandlers=this.buildBlockTagHandlers()}parse(e){ft(e);const t=this.parseContainer(e);return 0===t.length?{blocks:[{type:this.resolveBlockType(se("paragraph")),segments:[l("")]}]}:{blocks:t}}buildBlockTagHandlers(){const e=e=>this.parseBlockWithLineBreaks(e,this.resolveBlockType(se("paragraph"))),t=e=>this.parseTableAsParagraphs(e);return new Map([["P",e],["DIV",e],["BLOCKQUOTE",e=>this.parseBlockquote(e)],["UL",e=>this.parseList(e,"bullet",0)],["OL",e=>this.parseList(e,"ordered",0)],["LI",e=>this.parseListItem(e,"bullet",0)],["HR",()=>[{type:this.resolveBlockType(se("horizontal_rule")),segments:[]}]],["PRE",e=>[{type:this.resolveBlockType(se("paragraph")),segments:this.ensureSegments(this.parsePreContent(e))}]],["TABLE",t],["THEAD",t],["TBODY",t],["TR",t]])}parseContainer(e){const t=[];let n=[];for(const s of Array.from(e.childNodes))if(s.nodeType===Node.ELEMENT_NODE){const e=s;this.isBlockElement(e)?(this.flushPendingSegments(t,n),n=[],t.push(...this.parseBlockElement(e))):e.children.length>0&&this.containsBlockDescendants(e)?(this.flushPendingSegments(t,n),n=[],t.push(...this.parseContainerWithMarks(e,this.marksFromElement(e)))):n.push(...this.parseInlineNode(s,[]))}else if(s.nodeType===Node.TEXT_NODE){const e=s.textContent??"";e&&n.push(l(e))}return this.flushPendingSegments(t,n),t}parseBlockElement(e){const t=zn.exec(e.tagName);if(t)return this.parseHeading(e,Number(t[1]));const n=this.blockTagHandlers.get(e.tagName);return n?n(e):this.parseUnknownBlock(e)}parseHeading(e,t){const n=this.resolveBlockType(se("heading"));return[{type:n,...n===se("heading")?{attrs:{level:t}}:{},segments:this.ensureSegments(this.parseInlineChildren(e,[]))}]}parseUnknownBlock(e){const t=this.matchBlockRule(e);return t?[{type:t.type,...t.attrs?{attrs:t.attrs}:{},segments:this.ensureSegments(this.parseInlineChildren(e,[]))}]:[{type:this.resolveBlockType(se("paragraph")),segments:this.ensureSegments(this.parseInlineChildren(e,[]))}]}parseBlockquote(e){const t=this.resolveBlockType(se("blockquote"));return Array.from(e.childNodes).some(e=>e.nodeType===Node.ELEMENT_NODE&&this.isBlockElement(e))?this.parseContainer(e).map(e=>({type:t,segments:e.segments})):[{type:t,segments:this.ensureSegments(this.parseInlineChildren(e,[]))}]}parseList(e,t,n){const s=[];for(const i of Array.from(e.children)){const e=i;"LI"===e.tagName?s.push(...this.parseListItem(e,t,n)):"UL"===e.tagName?s.push(...this.parseList(e,"bullet",n+1)):"OL"===e.tagName&&s.push(...this.parseList(e,"ordered",n+1))}return s}parseListItem(e,t,n){const s=[],i=this.resolveBlockType(se("list_item")),r=this.hasCheckbox(e),o=r?"checklist":t,a=!!r&&this.isCheckboxChecked(e),c=[],h=[];for(const d of Array.from(e.childNodes))if(d.nodeType===Node.ELEMENT_NODE){const e=d;"UL"===e.tagName||"OL"===e.tagName?h.push(e):"INPUT"===e.tagName&&"checkbox"===e.getAttribute("type")||(this.isBlockElement(e)?c.push(...this.parseInlineChildren(e,[])):c.push(...this.parseInlineNode(d,[])))}else if(d.nodeType===Node.TEXT_NODE){const e=d.textContent??"";e&&c.push(l(e))}s.push({type:i,attrs:{listType:o,indent:n,..."checklist"===o?{checked:a}:{}},segments:this.ensureSegments(this.normalizeSegments(c))});for(const l of h){const e="OL"===l.tagName?"ordered":"bullet";s.push(...this.parseList(l,e,n+1))}return s}parseInlineChildren(e,t){const n=[];for(const s of Array.from(e.childNodes))n.push(...this.parseInlineNode(s,t));return this.normalizeSegments(n)}parseInlineNode(e,t){if(e.nodeType===Node.TEXT_NODE){const n=e.textContent??"";return n?[l(n,this.resolveMarks(t))]:[]}if(e.nodeType!==Node.ELEMENT_NODE)return[];const n=e,s=n.tagName;if("BR"===s)return[l("\n",this.resolveMarks(t))];const r=this.matchInlineNodeRule(n);if(r)return[i(r)];if(this.isBlockElement(n)&&!Hn.has(s))return this.parseInlineChildren(n,t);const o=this.mergeMarks(t,this.marksFromElement(n));return this.parseInlineChildren(n,o)}matchInlineNodeRule(e){if(0===this.inlineParseRules.length)return null;const t=e.tagName.toLowerCase();for(const n of this.inlineParseRules)if(n.rule.tag===t){if(n.rule.getAttrs){const t=n.rule.getAttrs(e);if(!1===t)continue;return k(re(n.type),t)}return k(re(n.type))}return null}parsePreContent(e){const t=e.textContent??"";return t?[l(t)]:[]}parseTableAsParagraphs(e){const t=[],n=e.querySelectorAll("td, th");for(const s of Array.from(n)){const e=this.parseInlineChildren(s,[]);e.some(e=>"inline"===e.kind||e.text.length>0)&&t.push({type:this.resolveBlockType(se("paragraph")),segments:this.ensureSegments(e)})}return t}marksFromElement(e){return this.matchMarkRules(e)||this.fallbackMarksFromElement(e)}matchMarkRules(e){if(0===this.markParseRules.length)return null;const t=e.tagName.toLowerCase(),n=[],s=/* @__PURE__ */new Set;for(const i of this.markParseRules)if(i.rule.tag===t&&!s.has(i.type)){if(i.rule.getAttrs){const t=i.rule.getAttrs(e);if(!1===t)continue;n.push({type:ie(i.type),...Object.keys(t).length>0?{attrs:t}:{}})}else n.push({type:ie(i.type)});s.add(i.type)}return s.size>0?n:null}fallbackMarksFromElement(e){const t=Fn.get(e.tagName);if(!t)return[];if(t.getAttrs){const n=t.getAttrs(e);return!1===n?[]:Object.keys(n).length>0?[{type:ie(t.markName),attrs:n}]:[{type:ie(t.markName)}]}return[{type:ie(t.markName)}]}mergeMarks(e,t){const n=[...e];for(const s of t)n.some(e=>e.type===s.type)||n.push(s);return n}resolveMarks(e){return e.filter(e=>_(this.schema,e.type))}resolveBlockType(e){return z(this.schema,e)?e:se("paragraph")}normalizeSegments(e){if(0===e.length)return[];const t=[];for(const n of e){if("inline"===n.kind){t.push(n);continue}const e=t[t.length-1];e&&"text"===e.kind&&c(e.marks,n.marks)?t[t.length-1]=l(e.text+n.text,e.marks):n.text.length>0&&t.push(n)}return t}ensureSegments(e){return 0===e.length?[l("")]:e}matchBlockRule(e){const t=e.tagName.toLowerCase();for(const n of this.blockParseRules)if(n.rule.tag===t){if(n.rule.getAttrs){const t=n.rule.getAttrs(e);if(!1===t)continue;return{type:se(n.type),attrs:t}}return{type:se(n.type)}}return null}isBlockElement(e){if(Ln.has(e.tagName))return!0;const t=e.tagName.toLowerCase();return this.blockParseRules.some(e=>e.rule.tag===t)}hasCheckbox(e){return null!==e.querySelector('input[type="checkbox"]')}isCheckboxChecked(e){return e.querySelector('input[type="checkbox"]')?.hasAttribute("checked")??!1}containsBlockDescendants(e){for(const t of Array.from(e.children)){if(this.isBlockElement(t))return!0;if(this.containsBlockDescendants(t))return!0}return!1}parseContainerWithMarks(e,t){const n=this.parseContainer(e);return 0===t.length?n:n.map(e=>({...e,segments:this.prependMarks(e.segments,t)}))}prependMarks(e,t){return e.map(e=>"inline"===e.kind?e:l(e.text,this.mergeMarks(t,e.marks)))}parseBlockWithLineBreaks(e,t){const n=this.parseInlineChildren(e,[]);if(!n.some(e=>"text"===e.kind&&e.text.includes("\n")))return[{type:t,segments:this.ensureSegments(n)}];const s=[];let i=[];for(const r of n){if("inline"===r.kind){i.push(r);continue}const e=r.text.split("\n");for(let n=0;n<e.length;n++){n>0&&(s.push({type:t,segments:this.ensureSegments(this.normalizeSegments(i))}),i=[]);const o=e[n]??"";o&&i.push(l(o,r.marks))}}return s.push({type:t,segments:this.ensureSegments(this.normalizeSegments(i))}),s}flushPendingSegments(e,t){const n=this.normalizeSegments(t);0!==n.length&&(n.every(e=>"text"===e.kind&&""===e.text.trim())||e.push({type:this.resolveBlockType(se("paragraph")),segments:n}))}},Kn={1:"x-small",2:"small",3:"medium",4:"large",5:"x-large",6:"xx-large",7:"xxx-large"};function $n(e){return e.toLowerCase().includes("font-size")}function Vn(e,t){for(;e.firstChild;)t.appendChild(e.firstChild)}function Un(e){const t=e.parentNode;if(t){for(;e.firstChild;)t.insertBefore(e.firstChild,e);t.removeChild(e)}}var qn=["script","style","iframe","object","embed","form","noscript"],Wn=new Set(["p","div","h1","h2","h3","h4","h5","h6","li","blockquote","table","tr","td","th","pre","figure","hr"]),Gn=class{getState;dispatch;schemaRegistry;tryRichPasteFromJson;constructor(e,t,n,s){this.getState=e,this.dispatch=t,this.schemaRegistry=n,this.tryRichPasteFromJson=s}handleHTMLOrTextPaste(e,t){const n=this.getState(),s=e.getData("text/html");s?this.handleHTML(s,n):t&&this.pastePlainText(t)}pastePlainText(e){if(!e)return;const t=Ie(e);this.dispatch(bn(this.getState(),t))}pasteHTMLString(e){this.handleHTML(e,this.getState())}handleHTML(e,t){const n=$t.sanitize(e,{FORBID_TAGS:qn,ADD_TAGS:this.schemaRegistry?this.schemaRegistry.getAllowedTags():[],ADD_ATTR:this.schemaRegistry?this.schemaRegistry.getAllowedAttrs():[],ALLOWED_URI_REGEXP:s,...mt()}),i=this.extractRichData(n);if(i&&this.tryRichPasteFromJson(i))return;const r=document.createElement("template");r.innerHTML=n,function(e){const t=Array.from(e.querySelectorAll("font"));for(const n of t){const e=n.getAttribute("color"),t=n.getAttribute("face"),s=n.getAttribute("size"),i=n.getAttribute("style")??"";if(!(null!==e||null!==t||null!==s||i.length>0)){Un(n);continue}const r=document.createElement("span"),o=[];if(i&&o.push(i.endsWith(";")?i:`${i};`),e&&o.push(`color: ${e};`),t&&o.push(`font-family: ${t};`),s&&!$n(i)){const e=Kn[s];e&&o.push(`font-size: ${e};`)}St(r,o.join(" ")),Vn(n,r),n.parentNode?.replaceChild(r,n)}}(r.content);const o=r.innerHTML,a=this.schemaRegistry?this.schemaRegistry.getAllowedTags():["strong","em","u","b","i","p","br","div","span"],l=this.schemaRegistry?this.schemaRegistry.getAllowedAttrs():[],c=$t.sanitize(o,{ALLOWED_TAGS:a,ALLOWED_ATTR:l,ALLOWED_URI_REGEXP:s,...mt()});if(this.schemaRegistry){const e=document.createElement("template");if(e.innerHTML=c,this.requiresDocumentParser(c,e.content))return void this.handleDocumentPaste(c,t);const n=new jn({schema:ee(this.schemaRegistry),schemaRegistry:this.schemaRegistry}).parse(e.content);this.dispatch(bn(t,n))}else{const e=this.extractTextFromHTML(c);e&&this.dispatch(V(t,e,"paste"))}}extractRichData(e){const t=document.createElement("template");t.innerHTML=e;const n=t.content.querySelector("[data-notectl-rich]")?.getAttribute("data-notectl-rich");if(n)return this.decodeHTMLEntities(n)}decodeHTMLEntities(e){return e.replace(/"/g,'"').replace(/'/g,"'").replace(/>/g,">").replace(/</g,"<").replace(/&/g,"&")}requiresDocumentParser(e,t){return!!this.containsModelledBlockID(t)||!!/<table[\s>]/i.test(e)||!!/<blockquote[\s>]/i.test(e)||!(!/<li[\s>]/i.test(e)||!this.containsMultiBlockListItem(t))||this.containsVoidBlockElements(t)}containsModelledBlockID(e){const t=new Set(this.schemaRegistry?.getBlockParseRules().map(e=>e.rule.tag)??[]);for(const n of Array.from(e.querySelectorAll("[id]"))){const e=n.tagName.toLowerCase();if(Wn.has(e)||t.has(e))return!0}return!1}containsMultiBlockListItem(e){const t=new Set(["PRE","BLOCKQUOTE","TABLE","HR","H1","H2","H3","H4","H5","H6"]);for(const n of Array.from(e.querySelectorAll("li"))){let e=0,s=!1;for(const i of Array.from(n.childNodes))if(i.nodeType===Node.ELEMENT_NODE){const n=i.tagName;if("UL"===n||"OL"===n||"INPUT"===n||"LI"===n)continue;if(t.has(n))return!0;if("P"===n||"DIV"===n){e++;continue}s=!0}else i.nodeType===Node.TEXT_NODE&&""!==(i.textContent??"").trim()&&(s=!0);if(e>=2||e>=1&&s)return!0}return!1}containsVoidBlockElements(e){if(!this.schemaRegistry)return!1;const t=this.schemaRegistry.getBlockParseRules();for(const n of t){if(!this.schemaRegistry.getNodeSpec(n.type)?.isVoid)continue;const t=e.querySelectorAll(n.rule.tag);for(const e of Array.from(t)){if(!n.rule.getAttrs)return!0;if(!1!==n.rule.getAttrs(e))return!0}}return!1}handleDocumentPaste(e,t){if(!this.schemaRegistry)return;const n=An(yt(e,this.schemaRegistry),this.schemaRegistry);if(0===n.children.length)return;const s=t.selection,i=t.transaction("paste");let r;H(s)&&!N(s)&&(r=Y(t,i));const o=r??(B(s)?s.nodeId:E(s)?s.blockId:s.anchor.blockId),a=We(t,o,this.schemaRegistry);if(!a)return;const l=a.parentPath[a.parentPath.length-1],c=l?t.getBlock(l)?.type:void 0,h=Qe(this.schemaRegistry,c,n.children)?a:je(t,o);if(!h)return;const p=E(s)&&"before"===s.side?0:1;let u,g,f=h.anchorIndex+p;for(const d of n.children){const e=qe(d,m());i.insertNode(h.parentPath,f,e),f++,u=Ye(e),g=e}if(h.isAnchorEmpty&&!E(s)&&i.removeNode(h.parentPath,h.anchorIndex),u&&g){const e=Ve(g,u),t=e?d(e).length:0;i.setSelection(L(u,t))}this.dispatch(i.build())}extractTextFromHTML(e){const t=document.createElement("template");return t.innerHTML=e,t.content.textContent??""}},Qn=class{getState;dispatch;schemaRegistry;constructor(e,t,n){this.getState=e,this.dispatch=t,this.schemaRegistry=n}handleBlockPaste(e){let n;try{n=JSON.parse(e)}catch{return}const s=n.type;if(!s)return;const i=this.schemaRegistry?.getNodeSpec(s);if(this.schemaRegistry&&!i)return;const r=this.getState(),o=r.selection,a=Je(o),l=m(),c=$e(n.attrs,i?.attrs),h=S(se(s),void 0,l,c,t(n.htmlId)),d=_e(r,a);if(d){const e=r.getBlock(d);if(this.cellRejects(e,[h])){const e=je(r,a);if(!e)return;return void this.dispatchNodeInsert(r,e.parentPath,e.anchorIndex+1,h)}const t=Fe(r,a,d,this.schemaRegistry);if(!t||!e)return;return void this.dispatchNodeInsert(r,t.parentPath,e.children.length,h)}const p=We(r,a,this.schemaRegistry);if(!p)return;const u=E(o)&&"before"===o.side?0:1;this.dispatchNodeInsert(r,p.parentPath,p.anchorIndex+u,h)}dispatchNodeInsert(e,t,n,s){const i=e.transaction("paste");i.insertNode(t,n,s),i.setSelection(O(s.id,[...t,s.id])),this.dispatch(i.build())}cellRejects(e,t){return!(!e||!this.schemaRegistry||Qe(this.schemaRegistry,e.type,t))}handleRichPasteFromJson(e){let t;try{t=JSON.parse(e)}catch{return!1}return!(!Array.isArray(t)||0===t.length)&&this.handleRichPaste(t)}handleRichPaste(e){if(0===e.length)return!1;if(!e.some(e=>void 0!==e.htmlId||void 0!==e.type&&"paragraph"!==e.type||e.segments?.some(e=>"inline"===e.kind))&&e.length<=1)return!1;let n=this.getState();const s=n.selection,i=Je(s),r=n.getBlock(i),o=n.doc.children.some(e=>e.id===i);if(!e.some(e=>t(e.htmlId))&&H(s)&&N(s)&&o&&void 0!==r&&y(r)>0)return this.dispatch(bn(n,Ue(e,this.schemaRegistry))),!0;if(H(s)&&!N(s)){const t=n.transaction("paste"),s=Y(n,t),i=t.build();if(this.dispatch(i),n=n.apply(i),s)return this.resolveAndInsertRichBlocks(e,n,s)}return this.resolveAndInsertRichBlocks(e,n,i)}resolveAndInsertRichBlocks(e,t,n){const s=[];for(const l of e){const e=Ke(l,this.schemaRegistry);e&&s.push(Ge(e))}if(0===s.length)return!1;const i=t.selection,r=_e(t,n);if(r){const e=t.getBlock(r);if(this.cellRejects(e,s)){const e=je(t,n);return!!e&&this.insertNodes(s,t,e,e.anchorIndex+1,!1)}const i=Fe(t,n,r,this.schemaRegistry);if(!i)return!1;const o=i.anchorIndex>=0?i.anchorIndex+1:e?.children.length??0;return this.insertNodes(s,t,i,o,!0)}const o=We(t,n,this.schemaRegistry);if(!o)return!1;const a=E(i)&&"before"===i.side?0:1;return this.insertNodes(s,t,o,o.anchorIndex+a,!E(i))}insertNodes(e,t,n,s,i){const r=t.transaction("paste");let o,a=s;for(const l of e)r.insertNode(n.parentPath,a,l),a++,o=l;return i&&n.isAnchorEmpty&&n.anchorIndex>=0&&r.removeNode(n.parentPath,n.anchorIndex),o&&r.setSelection(L(o.id,y(o))),this.dispatch(r.build()),!0}},Jn=class{element;getState;dispatch;schemaRegistry;fileHandlerRegistry;isReadOnly;getPasteInterceptors;pasteMarkdown;getMarkdownSyntaxExtensions;announce;markdownImportedMessage;handlePaste;htmlHandler;richBlockHandler;constructor(e,t){this.element=e,this.getState=t.getState,this.dispatch=t.dispatch,this.schemaRegistry=t.schemaRegistry,this.fileHandlerRegistry=t.fileHandlerRegistry,this.isReadOnly=t.isReadOnly??(()=>!1),this.getPasteInterceptors=t.getPasteInterceptors??(()=>[]),this.pasteMarkdown=t.pasteMarkdown??"auto",this.getMarkdownSyntaxExtensions=t.getMarkdownSyntaxExtensions??(()=>[]),this.announce=t.announce,this.markdownImportedMessage=t.markdownImportedMessage??"Markdown imported",this.richBlockHandler=new Qn(t.getState,t.dispatch,t.schemaRegistry),this.htmlHandler=new Gn(t.getState,t.dispatch,t.schemaRegistry,e=>this.richBlockHandler.handleRichPasteFromJson(e)),this.handlePaste=this.onPaste.bind(this),e.addEventListener("paste",this.handlePaste)}onPaste(e){if(!ct(e,this.element))return;if(e.preventDefault(),this.isReadOnly())return;const t=e.clipboardData;if(!t)return;const n=t.getData("application/x-notectl-block");if(n)return void this.richBlockHandler.handleBlockPaste(n);if(this.handleFilePaste(t))return;const s=t.getData("text/plain"),i=t.getData("text/html");s&&this.tryPasteInterceptors(s,i)||(s&&"never"!==this.pasteMarkdown&&!function(e){return""!==e.trim()&&/<\w/.test(e)}(i)&&function(e){if(0===e.length)return!1;if(wn.test(e))return!0;if(e.includes("|")&&Sn.test(e))return!0;const t=e.match(vn);return null!==t&&t.length>=2}(s)?this.handleMarkdownPaste(s):this.htmlHandler.handleHTMLOrTextPaste(t,s))}async handleMarkdownPaste(e){let t;try{const{parseMarkdownToDocument:n}=await import("./MarkdownParser-CWt3M6jR.mjs").then(e=>e.t);t=pt(n(e,this.schemaRegistry,{syntaxExtensions:this.getMarkdownSyntaxExtensions()}),this.schemaRegistry,{includeBlockIds:!1})}catch{return void this.htmlHandler.pastePlainText(e)}this.htmlHandler.pasteHTMLString(t),this.announce?.(this.markdownImportedMessage)}tryPasteInterceptors(e,t){const n=this.getPasteInterceptors(),s=this.getState();for(const i of n){const n=i.interceptor(e,t,s);if(n)return this.dispatch(n),!0}return!1}handleFilePaste(e){if(!this.fileHandlerRegistry)return!1;const t=Array.from(e.files);if(0===t.length)for(let s=0;s<e.items.length;s++){const n=e.items[s];if(n&&"file"===n.kind){const e=n.getAsFile();e&&t.push(e)}}if(0===t.length)return!1;let n=!1;for(const s of t){const e=this.fileHandlerRegistry.matchFileHandlers(s.type);for(const t of e){const e=t(s,null);if(!0===e||e instanceof Promise){n=!0;break}}}return n}destroy(){this.element.removeEventListener("paste",this.handlePaste)}},Xn=class{compositionTracker;inputHandler;keyboardHandler;pasteHandler;clipboardHandler;constructor(e,t){this.compositionTracker=new mn,this.inputHandler=new fn(e,{getState:t.getState,dispatch:t.dispatch,syncSelection:t.syncSelection,inputRuleRegistry:t.inputRuleRegistry,isReadOnly:t.isReadOnly,shouldApplyInputRules:t.shouldApplyInputRules,compositionTracker:this.compositionTracker,getTextInputInterceptors:t.getTextInputInterceptors}),this.keyboardHandler=new kn(e,{getState:t.getState,dispatch:t.dispatch,undo:t.undo,redo:t.redo,keymapRegistry:t.keymapRegistry,isReadOnly:t.isReadOnly,compositionTracker:this.compositionTracker,getTextDirection:t.getTextDirection,navigateFromGapCursor:t.navigateFromGapCursor}),this.pasteHandler=new Jn(e,{getState:t.getState,dispatch:t.dispatch,schemaRegistry:t.schemaRegistry,fileHandlerRegistry:t.fileHandlerRegistry,isReadOnly:t.isReadOnly,getPasteInterceptors:t.getPasteInterceptors,pasteMarkdown:t.pasteMarkdown,getMarkdownSyntaxExtensions:t.getMarkdownSyntaxExtensions,announce:t.announce,markdownImportedMessage:t.markdownImportedMessage}),this.clipboardHandler=new gn(e,{getState:t.getState,dispatch:t.dispatch,schemaRegistry:t.schemaRegistry,syncSelection:t.syncSelection,isReadOnly:t.isReadOnly})}destroy(){this.inputHandler.destroy(),this.keyboardHandler.destroy(),this.pasteHandler.destroy(),this.clipboardHandler.destroy()}},Yn=class{_contextKeymaps=[];_navigationKeymaps=[];_defaultKeymaps=[];registerKeymap(e,t){const n=t?.priority??"default";this.keymapArrayForPriority(n).push(e)}getKeymaps(){return[...this._contextKeymaps,...this._navigationKeymaps,...this._defaultKeymaps]}getKeymapsByPriority(){return{context:[...this._contextKeymaps],navigation:[...this._navigationKeymaps],default:[...this._defaultKeymaps]}}removeKeymap(e){for(const t of[this._contextKeymaps,this._navigationKeymaps,this._defaultKeymaps]){const n=t.indexOf(e);if(-1!==n)return void t.splice(n,1)}}clear(){this._contextKeymaps.length=0,this._navigationKeymaps.length=0,this._defaultKeymaps.length=0}keymapArrayForPriority(e){switch(e){case"context":return this._contextKeymaps;case"navigation":return this._navigationKeymaps;case"default":return this._defaultKeymaps}}},Zn=class{_inputRules=[];registerInputRule(e){this._inputRules.push(e)}getInputRules(){return this._inputRules}removeInputRule(e){const t=this._inputRules.indexOf(e);-1!==t&&this._inputRules.splice(t,1)}clear(){this._inputRules.length=0}},es=class{_fileHandlers=[];registerFileHandler(e,t){this._fileHandlers.push({pattern:e,handler:t})}getFileHandlers(){return this._fileHandlers}matchFileHandlers(e){const t=[];for(const n of this._fileHandlers)ts(n.pattern,e)&&t.push(n.handler);return t}removeFileHandler(e){const t=this._fileHandlers.findIndex(t=>t.handler===e);-1!==t&&this._fileHandlers.splice(t,1)}clear(){this._fileHandlers.length=0}};function ts(e,t){if("*"===e||"*/*"===e)return!0;if(e===t)return!0;if(e.endsWith("/*")){const n=e.slice(0,-1);return t.startsWith(n)}return!1}var ns=class{_nodeViews=/* @__PURE__ */new Map;registerNodeView(e,t){if(this._nodeViews.has(e))throw new Error(`NodeView for type "${e}" is already registered.`);this._nodeViews.set(e,t)}getNodeViewFactory(e){return this._nodeViews.get(e)}removeNodeView(e){this._nodeViews.delete(e)}clear(){this._nodeViews.clear()}};function ss(e,t){if(t){const n=t.getMarkSpec(e.type);if(n)return n.rank??100}switch(e.type){case"bold":return 0;case"italic":return 1;case"underline":return 2;default:return 100}}function is(e,t,n){if(0===t.length)return e;const s=[...t].sort((e,t)=>ss(e,n)-ss(t,n));let i=e;for(let r=s.length-1;r>=0;r--){const e=s[r];if(!e)continue;const t=rs(e,n);t.appendChild(i),i=t}return i}function rs(e,t){if(t){const n=t.getMarkSpec(e.type);if(n)return n.toDOM(e)}switch(e.type){case"bold":return document.createElement("strong");case"italic":return document.createElement("em");case"underline":return document.createElement("u");default:return document.createElement("span")}}var os=class{wrapperElement=null;container;registry;constructor(e,t){this.container=e,this.registry=t}get isActive(){return null!==this.wrapperElement}onCompositionStart(e){this.cleanup();const t=e.storedMarks;if(!t||0===t.length)return;const n=e.selection;if(!H(n))return;if(!N(n))return;const s=document.createElement("span");s.setAttribute("data-cursor-wrapper","");const i=document.createTextNode(""),r=is(i,t,this.registry);s.appendChild(r);const o=it();if(!o||0===o.rangeCount)return;let a;const l=ot(this.container,o);if(l){const e=document.createRange();try{e.setStart(l.anchorNode,l.anchorOffset),e.setEnd(l.focusNode,l.focusOffset)}catch{return}a=e}else a=o.getRangeAt(0);a.insertNode(s);try{o.collapse(i,i.length)}catch{}this.wrapperElement=s}cleanup(){this.wrapperElement&&(this.wrapperElement.remove(),this.wrapperElement=null)}},as={error(e,t){void 0===t?console.error(e):console.error(e,t)},warn(e,t){void 0===t?console.warn(e):console.warn(e,t)},info(e,t){void 0===t?console.info(e):console.info(e,t)},debug(e,t){void 0===t?console.debug(e):console.debug(e,t)}},ls={error(){},warn(){},info(){},debug(){}};function cs(e,t){const n=`[${t}]`;return{error(t,s){e.error(`${n} ${t}`,s)},warn(t,s){e.warn(`${n} ${t}`,s)},info(t,s){e.info(`${n} ${t}`,s)},debug(t,s){e.debug(`${n} ${t}`,s)}}}var hs=class{listeners=/* @__PURE__ */new Map;log;constructor(e=as){this.log=cs(e,"EventBus")}emit(e,t){const n=this.listeners.get(e.id);if(n)for(const i of n)try{i(t)}catch(s){this.log.error(`Listener error on "${e.id}"`,s)}}on(e,t){const n=e.id;this.listeners.has(n)||this.listeners.set(n,/* @__PURE__ */new Set);const s=this.listeners.get(n)??/* @__PURE__ */new Set;return s.add(t),()=>{s.delete(t),0===s.size&&this.listeners.delete(n)}}off(e,t){const n=this.listeners.get(e.id);n&&(n.delete(t),0===n.size&&this.listeners.delete(e.id))}clear(){this.listeners.clear()}},ds=class{_extensions=[];register(e){this._extensions.push(e)}getExtensions(){return this._extensions}clear(){this._extensions.length=0}},ps=class{commands=/* @__PURE__ */new Map;readonlyBypassActive=!1;log;constructor(e=as){this.log=cs(e,"CommandRegistry")}register(e,t,n,s){if(this.commands.has(e)){const t=this.commands.get(e);throw new Error(`Command "${e}" is already registered by plugin "${t?.pluginId}".`)}const i=s?.readonlyAllowed??!1;this.commands.set(e,{name:e,handler:t,pluginId:n,readonlyAllowed:i})}canExecute(e,t){const n=this.commands.get(e);return!(!n||t&&!n.readonlyAllowed)}execute(e,t){const n=this.commands.get(e);if(!n)return!1;if(t&&!n.readonlyAllowed)return!1;const s=t&&n.readonlyAllowed;s&&(this.readonlyBypassActive=!0);try{return n.handler()}catch(i){return this.log.error(`Command "${e}" error`,i),!1}finally{s&&(this.readonlyBypassActive=!1)}}isReadonlyBypassed(){return this.readonlyBypassActive}has(e){return this.commands.has(e)}remove(e){this.commands.delete(e)}clear(){this.commands.clear(),this.readonlyBypassActive=!1}get rawMap(){return this.commands}},us=class{middlewares=[];middlewareSorted=null;pasteInterceptors=[];pasteInterceptorsSorted=null;textInputInterceptors=[];textInputInterceptorsSorted=null;log;constructor(e=as){this.log=cs(e,"MiddlewareChain")}addMiddleware(e){this.middlewares.push(e),this.middlewareSorted=null}removeMiddleware(e){const t=this.middlewares.indexOf(e);-1!==t&&this.middlewares.splice(t,1),this.middlewareSorted=null}invalidateMiddlewareSort(){this.middlewareSorted=null}dispatch(e,t,n){if(0===this.middlewares.length)return void n(e);const s=this.getSortedMiddleware();let i=0,r=!1;const o=e=>{if(i<s.length){const n=s[i++];if(!n)return;let r=!1;const l=e=>{r||(r=!0,o(e))};try{n.middleware(e,t,l)}catch(a){this.log.error(`Middleware "${n.name}" error`,a),l(e)}}else r||(r=!0,n(e))};o(e)}getChain(){return this.getSortedMiddleware().map(e=>({name:e.name,priority:e.priority,pluginId:e.pluginId}))}addPasteInterceptor(e){this.pasteInterceptors.push(e),this.pasteInterceptorsSorted=null}removePasteInterceptor(e){const t=this.pasteInterceptors.indexOf(e);-1!==t&&this.pasteInterceptors.splice(t,1),this.pasteInterceptorsSorted=null}invalidatePasteSort(){this.pasteInterceptorsSorted=null}getPasteInterceptors(){return this.getSortedPasteInterceptors()}addTextInputInterceptor(e){this.textInputInterceptors.push(e),this.textInputInterceptorsSorted=null}removeTextInputInterceptor(e){const t=this.textInputInterceptors.indexOf(e);-1!==t&&this.textInputInterceptors.splice(t,1),this.textInputInterceptorsSorted=null}invalidateTextInputSort(){this.textInputInterceptorsSorted=null}getTextInputInterceptors(){return this.getSortedTextInputInterceptors()}get rawMiddlewares(){return this.middlewares}get rawPasteInterceptors(){return this.pasteInterceptors}get rawTextInputInterceptors(){return this.textInputInterceptors}clear(){this.middlewares.length=0,this.middlewareSorted=null,this.pasteInterceptors.length=0,this.pasteInterceptorsSorted=null,this.textInputInterceptors.length=0,this.textInputInterceptorsSorted=null}getSortedMiddleware(){return this.middlewareSorted||(this.middlewareSorted=[...this.middlewares].sort((e,t)=>e.priority-t.priority)),this.middlewareSorted}getSortedPasteInterceptors(){return this.pasteInterceptorsSorted||(this.pasteInterceptorsSorted=[...this.pasteInterceptors].sort((e,t)=>e.priority-t.priority)),this.pasteInterceptorsSorted}getSortedTextInputInterceptors(){return this.textInputInterceptorsSorted||(this.textInputInterceptorsSorted=[...this.textInputInterceptors].sort((e,t)=>e.priority-t.priority)),this.textInputInterceptorsSorted}};function gs(e,t,n,s){return{registerCommand:(s,i,r)=>{if(t.has(s)){const e=t.get(s);throw new Error(`Command "${s}" is already registered by plugin "${e?.pluginId}".`)}const o=r?.readonlyAllowed??!1;t.set(s,{name:s,handler:i,pluginId:e,readonlyAllowed:o}),n.commands.push(s)},executeCommand:s}}function ms(e,t){return{registerService:(n,s)=>{if(e.has(n.id))throw new Error(`Service "${n.id}" is already registered by another plugin.`);e.set(n.id,s),t.services.push(n.id)},getService:t=>e.get(t.id)}}function fs(e,t){const{pluginId:n,middlewares:s,pasteInterceptors:i,textInputInterceptors:r,invalidateMiddlewareSort:o,invalidatePasteSort:a,invalidateTextInputSort:l}=e;return{registerMiddleware:(e,i)=>{const r={name:i?.name??(e.name||"anonymous"),pluginId:n,middleware:e,priority:i?.priority??100};s.push(r),t.middlewares.push(r),o()},registerPasteInterceptor:(e,s)=>{const r={name:s?.name??"anonymous",pluginId:n,interceptor:e,priority:s?.priority??100};i.push(r),t.pasteInterceptors.push(r),a()},registerTextInputInterceptor:(e,s)=>{const i={name:s?.name??"anonymous",pluginId:n,interceptor:e,priority:s?.priority??100};r.push(i),t.textInputInterceptors.push(i),l()}}}function ys(e,t){return{registerNodeSpec:n=>{e.registerNodeSpec(n),t.nodeSpecs.push(n.type)},registerMarkSpec:n=>{e.registerMarkSpec(n),t.markSpecs.push(n.type)},registerInlineNodeSpec:n=>{e.registerInlineNodeSpec(n),t.inlineNodeSpecs.push(n.type)}}}function ks(e,t,n){return{registerNodeView:(e,s)=>{t.nodeViewRegistry.registerNodeView(e,s),n.nodeViews.push(e)},registerKeymap:(e,s)=>{t.keymapRegistry.registerKeymap(e,s),n.keymaps.push(e)},registerInputRule:e=>{t.inputRuleRegistry.registerInputRule(e),n.inputRules.push(e)},registerMarkdownSyntax:e=>{t.markdownSyntaxRegistry.register(e)},registerToolbarItem:s=>{t.toolbarRegistry.registerToolbarItem(s,e),n.toolbarItems.push(s.id)},registerBlockTypePickerEntry:e=>{t.blockTypePickerRegistry.registerBlockTypePickerEntry(e),n.blockTypePickerEntries.push(e.id)},registerFileHandler:(e,s)=>{t.fileHandlerRegistry.registerFileHandler(e,s),n.fileHandlers.push(s)},registerStyleSheet:e=>{const s=new CSSStyleSheet;s.replaceSync(e),t.pluginStyleSheets.push(s),n.stylesheets.push(s)}}}function ws(e){return{getSchemaRegistry:()=>e.schemaRegistry,getKeymapRegistry:()=>e.keymapRegistry,getInputRuleRegistry:()=>e.inputRuleRegistry,getFileHandlerRegistry:()=>e.fileHandlerRegistry,getNodeViewRegistry:()=>e.nodeViewRegistry,getToolbarRegistry:()=>e.toolbarRegistry,getBlockTypePickerRegistry:()=>e.blockTypePickerRegistry}}var Ss=class{tracker;plugins=/* @__PURE__ */new Map;initOrder=[];startedInitOrder=[];initialized=!1;initializing=!1;readOnly=!1;log;constructor(e,t=as){this.tracker=e,this.log=cs(t,"PluginLifecycle")}register(e){if(this.initialized||this.initializing)throw new Error(`Cannot register plugin "${e.id}" after initialization.`);if(this.plugins.has(e.id))throw new Error(`Plugin "${e.id}" is already registered.`);this.plugins.set(e.id,e)}get(e){return this.plugins.get(e)}getPluginIds(){return[...this.plugins.keys()]}async init(e,t){if(!this.initialized&&!this.initializing){this.initializing=!0;try{this.initOrder=this.resolveOrder();for(const s of this.initOrder){if(e.isCancelled?.())return;const i=this.plugins.get(s);if(!i)continue;this.startedInitOrder.push(s);const r=t(s,e);try{await i.init(r)}catch(n){throw await this.rollbackStartedPlugins(),n}}if(e.isCancelled?.())return;if(e.onBeforeReady&&await e.onBeforeReady(),e.isCancelled?.())return;for(const t of this.initOrder){if(e.isCancelled?.())return;const s=this.plugins.get(t);if(s?.onReady)try{await s.onReady()}catch(n){this.log.error(`Plugin "${t}" error in onReady`,n)}}this.initialized=!0}finally{this.initializing=!1}}}async destroy(){const e=[...this.startedInitOrder].reverse();for(const t of e)await this.destroyPlugin(t);this.plugins.clear(),this.initOrder=[],this.startedInitOrder=[],this.initialized=!1,this.initializing=!1}notifyStateChange(e,t,n){for(const i of this.initOrder){const r=this.plugins.get(i);if(r?.onStateChange)try{r.onStateChange(e,t,n)}catch(s){this.log.error(`Plugin "${i}" error in onStateChange`,s)}}}collectDecorations(e,t){let n=Ce.empty;for(const i of this.initOrder){const r=this.plugins.get(i);if(r?.decorations)try{const s=r.decorations(e,t);s.isEmpty||(n=n.merge(s))}catch(s){this.log.error(`Plugin "${i}" error in decorations()`,s)}}return n}configurePlugin(e,t){const n=this.plugins.get(e);if(!n)throw new Error(`Plugin "${e}" not found.`);if(n.onConfigure)try{n.onConfigure(t)}catch(s){this.log.error(`Plugin "${e}" error in onConfigure`,s)}}isReadOnly(){return this.readOnly}setReadOnly(e){if(this.readOnly!==e){this.readOnly=e;for(const n of this.initOrder){const s=this.plugins.get(n);if(s?.onReadOnlyChange)try{s.onReadOnlyChange(e)}catch(t){this.log.error(`Plugin "${n}" error in onReadOnlyChange`,t)}}}}get rawPlugins(){return this.plugins}get isInitialized(){return this.initialized}async destroyPlugin(e){const t=this.plugins.get(e);if(t?.destroy)try{await t.destroy()}catch(n){this.log.error(`Plugin "${e}" error in destroy`,n)}this.tracker.cleanup(e)}async rollbackStartedPlugins(){const e=[...this.startedInitOrder].reverse();for(const t of e)await this.destroyPlugin(t);this.startedInitOrder=[],this.initOrder=[],this.initialized=!1}resolveOrder(){const e=[...this.plugins.keys()];for(const r of e){const e=this.plugins.get(r);if(e)for(const t of e.dependencies??[])if(!this.plugins.has(t))throw new Error(`Plugin "${r}" depends on "${t}", which is not registered.`)}const t=/* @__PURE__ */new Map,n=/* @__PURE__ */new Map;for(const r of e)t.set(r,0),n.set(r,[]);for(const r of e){const e=this.plugins.get(r)?.dependencies??[];t.set(r,e.length);for(const t of e){const e=n.get(t);e&&e.push(r)}}const s=[];for(const[r,o]of t)0===o&&s.push(r);const i=[];for(;s.length>0;){s.sort((e,t)=>(this.plugins.get(e)?.priority??100)-(this.plugins.get(t)?.priority??100));const e=s.shift();if(!e)break;i.push(e);for(const i of n.get(e)??[]){const e=(t.get(i)??0)-1;t.set(i,e),0===e&&s.push(i)}}if(i.length!==e.length){const t=e.filter(e=>!i.includes(e));throw new Error(`Circular dependency detected among plugins: ${t.join(", ")}`)}return i}},vs=class{deps;registrations=/* @__PURE__ */new Map;pluginStyleSheets=[];constructor(e){this.deps=e}track(e,t){this.registrations.set(e,t)}cleanup(e){const t=this.registrations.get(e);if(t){for(const e of t.commands)this.deps.commandRegistry.remove(e);for(const e of t.services)this.deps.serviceRegistry.remove(e);for(const e of t.middlewares)this.deps.middlewareChain.removeMiddleware(e);for(const e of t.pasteInterceptors)this.deps.middlewareChain.removePasteInterceptor(e);for(const e of t.textInputInterceptors)this.deps.middlewareChain.removeTextInputInterceptor(e);for(const e of t.unsubscribers)e();for(const e of t.nodeSpecs)this.deps.schemaRegistry.removeNodeSpec(e);for(const e of t.markSpecs)this.deps.schemaRegistry.removeMarkSpec(e);for(const e of t.inlineNodeSpecs)this.deps.schemaRegistry.removeInlineNodeSpec(e);for(const e of t.nodeViews)this.deps.nodeViewRegistry.removeNodeView(e);for(const e of t.keymaps)this.deps.keymapRegistry.removeKeymap(e);for(const e of t.inputRules)this.deps.inputRuleRegistry.removeInputRule(e);for(const e of t.toolbarItems)this.deps.toolbarRegistry.removeToolbarItem(e);for(const e of t.fileHandlers)this.deps.fileHandlerRegistry.removeFileHandler(e);for(const e of t.blockTypePickerEntries)this.deps.blockTypePickerRegistry.removeBlockTypePickerEntry(e);for(const e of t.stylesheets){const t=this.pluginStyleSheets.indexOf(e);-1!==t&&this.pluginStyleSheets.splice(t,1)}this.registrations.delete(e)}}clear(){this.registrations.clear(),this.pluginStyleSheets.length=0}get rawStyleSheets(){return this.pluginStyleSheets}},bs=class{services=/* @__PURE__ */new Map;register(e,t){if(this.services.has(e.id))throw new Error(`Service "${e.id}" is already registered.`);this.services.set(e.id,t)}get(e){return this.services.get(e.id)}has(e){return this.services.has(e)}remove(e){this.services.delete(e)}clear(){this.services.clear()}get rawMap(){return this.services}},Is=class{schemaRegistry=new ce;keymapRegistry=new Yn;inputRuleRegistry=new Zn;markdownSyntaxRegistry=new ds;fileHandlerRegistry=new es;nodeViewRegistry=new ns;toolbarRegistry=new Ct;blockTypePickerRegistry=new Rt;logger;commandRegistry;serviceRegistry=new bs;middlewareChain;eventBus;registrationTracker;lifecycle;constructor(e={}){this.logger=e.logger??as,this.commandRegistry=new ps(this.logger),this.middlewareChain=new us(this.logger),this.eventBus=new hs(this.logger),this.registrationTracker=new vs({commandRegistry:this.commandRegistry,serviceRegistry:this.serviceRegistry,middlewareChain:this.middlewareChain,schemaRegistry:this.schemaRegistry,keymapRegistry:this.keymapRegistry,inputRuleRegistry:this.inputRuleRegistry,nodeViewRegistry:this.nodeViewRegistry,toolbarRegistry:this.toolbarRegistry,fileHandlerRegistry:this.fileHandlerRegistry,blockTypePickerRegistry:this.blockTypePickerRegistry}),this.lifecycle=new Ss(this.registrationTracker,this.logger)}registerService(e,t){this.serviceRegistry.register(e,t)}register(e){this.lifecycle.register(e)}async init(e){return this.lifecycle.init(e,(e,t)=>this.createContext(e,t))}notifyStateChange(e,t,n){this.lifecycle.notifyStateChange(e,t,n)}collectDecorations(e,t){return this.lifecycle.collectDecorations(e,t)}dispatchWithMiddleware(e,t,n){this.middlewareChain.dispatch(e,t,n)}canExecuteCommand(e){return this.commandRegistry.canExecute(e,this.lifecycle.isReadOnly())}executeCommand(e){return this.commandRegistry.execute(e,this.lifecycle.isReadOnly())}isReadonlyBypassed(){return this.commandRegistry.isReadonlyBypassed()}configurePlugin(e,t){this.lifecycle.configurePlugin(e,t)}isReadOnly(){return this.lifecycle.isReadOnly()}setReadOnly(e){this.lifecycle.setReadOnly(e)}getPluginIds(){return this.lifecycle.getPluginIds()}getMiddlewareChain(){return this.middlewareChain.getChain()}getPasteInterceptors(){return this.middlewareChain.getPasteInterceptors()}getTextInputInterceptors(){return this.middlewareChain.getTextInputInterceptors()}get(e){return this.lifecycle.get(e)}getService(e){return this.serviceRegistry.get(e)}onEvent(e,t){return this.eventBus.on(e,t)}getPluginStyleSheets(){return this.registrationTracker.rawStyleSheets}async destroy(){await this.lifecycle.destroy(),this.commandRegistry.clear(),this.serviceRegistry.clear(),this.middlewareChain.clear(),this.registrationTracker.clear(),this.eventBus.clear(),this.schemaRegistry.clear(),this.keymapRegistry.clear(),this.inputRuleRegistry.clear(),this.markdownSyntaxRegistry.clear(),this.fileHandlerRegistry.clear(),this.nodeViewRegistry.clear(),this.toolbarRegistry.clear(),this.blockTypePickerRegistry.clear()}createContext(e,t){const n=t.getCompositionState??(()=>Rs),{context:s,registrations:i}=function(e){const t={commands:[],services:[],middlewares:[],pasteInterceptors:[],textInputInterceptors:[],unsubscribers:[],nodeSpecs:[],markSpecs:[],inlineNodeSpecs:[],nodeViews:[],keymaps:[],inputRules:[],toolbarItems:[],fileHandlers:[],blockTypePickerEntries:[],stylesheets:[]},n=function(e,t){return{emit:(t,n)=>e.emit(t,n),on:(n,s)=>{const i=e.on(n,s);return t.unsubscribers.push(i),i},off:(t,n)=>e.off(t,n)}}(e.eventBus,t);return{context:{getState:e.getState,dispatch:e.dispatch,getContainer:e.getContainer,getPluginContainer:e.getPluginContainer,isReadOnly:e.isReadOnly,getEventBus:()=>n,...gs(e.pluginId,e.commands,t,e.executeCommand),...ms(e.services,t),...fs(e,t),...ys(e.schemaRegistry,t),...ks(e.pluginId,e,t),...ws(e),updateConfig:t=>{const n=e.plugins.get(e.pluginId);if(n?.onConfigure)try{n.onConfigure(t)}catch(s){const t=`[PluginContext] Plugin "${e.pluginId}" error in onConfigure`;e.logger.error(t,s)}},announce:t=>{e.announce?.(t)},hasAnnouncement:()=>e.hasAnnouncement?.()??!1,getCompositionState:()=>e.getCompositionState()},registrations:t}}({pluginId:e,logger:this.logger,getState:t.getState,dispatch:t.dispatch,getContainer:t.getContainer,getPluginContainer:t.getPluginContainer,announce:t.announce,hasAnnouncement:t.hasAnnouncement,commands:this.commandRegistry.rawMap,services:this.serviceRegistry.rawMap,middlewares:this.middlewareChain.rawMiddlewares,pasteInterceptors:this.middlewareChain.rawPasteInterceptors,textInputInterceptors:this.middlewareChain.rawTextInputInterceptors,pluginStyleSheets:this.registrationTracker.rawStyleSheets,plugins:this.lifecycle.rawPlugins,eventBus:this.eventBus,schemaRegistry:this.schemaRegistry,keymapRegistry:this.keymapRegistry,inputRuleRegistry:this.inputRuleRegistry,markdownSyntaxRegistry:this.markdownSyntaxRegistry,toolbarRegistry:this.toolbarRegistry,blockTypePickerRegistry:this.blockTypePickerRegistry,fileHandlerRegistry:this.fileHandlerRegistry,nodeViewRegistry:this.nodeViewRegistry,getCompositionState:n,isReadOnly:()=>this.lifecycle.isReadOnly(),invalidateMiddlewareSort:()=>this.middlewareChain.invalidateMiddlewareSort(),invalidatePasteSort:()=>this.middlewareChain.invalidatePasteSort(),invalidateTextInputSort:()=>this.middlewareChain.invalidateTextInputSort(),executeCommand:e=>this.executeCommand(e)});return this.registrationTracker.track(e,i),s}},Rs={isComposing:!1,activeBlockId:null},Cs={EN:"en",DE:"de",ES:"es",FR:"fr",ZH:"zh",RU:"ru",AR:"ar",HI:"hi",PT:"pt",BROWSER:"browser"},xs={paragraph:"Paragraph",heading:"Heading",code_block:"Code Block",blockquote:"Block Quote",list_item:"List Item",horizontal_rule:"Horizontal Rule",image:"Image",table:"Table"};function Ts(e,t){return"heading"===e&&t?.level?`Heading ${t.level}`:xs[e]??e}function Es(e,t){const n=t?.document??globalThis.document,s=t?.container??n.head;if(t?.id){const s=n.getElementById(t.id);if(s instanceof HTMLStyleElement)return s.textContent=e,t.nonce&&s.setAttribute("nonce",t.nonce),s}const i=n.createElement("style");return i.textContent=e,t?.id&&(i.id=t.id),t?.nonce&&i.setAttribute("nonce",t.nonce),s.appendChild(i),i}function Ms(e,t){const n=(t??globalThis.document).getElementById(e);n&&n.remove()}var Ps=/* @__PURE__ */new WeakSet;function As(e,t){const n=t?.target??globalThis.document,s=new CSSStyleSheet;return s.replaceSync(e),Ps.add(s),t?.replace&&(n.adoptedStyleSheets=n.adoptedStyleSheets.filter(e=>!Ps.has(e))),n.adoptedStyleSheets=[...n.adoptedStyleSheets,s],s}function Bs(e,t){const n=t??globalThis.document;n.adoptedStyleSheets=n.adoptedStyleSheets.filter(t=>t!==e)}var Ds={shorthand:!0,paste:"auto"},Ns={shorthand:!1,paste:"never"};function Os(e){return void 0===e||!0===e?Ds:!1===e?Ns:{shorthand:e.shorthand??!0,paste:e.paste??"auto"}}var Ls=class{config={};getConfig(){return this.config}setConfig(e){this.config=e}mergeConfig(e){this.config={...this.config,...e}}applyAttribute(e,t,n){if("placeholder"===e){const e=t??void 0;this.config={...this.config,placeholder:e},this.applyPlaceholder(e,n.contentElement)}if("readonly"===e){const e=null!==t;this.applyReadonly(e,n.contentElement,n.pluginManager),this.config={...this.config,readonly:e}}if("theme"===e){const e=t??void 0;this.config={...this.config,theme:e},n.themeController?.apply(e??Ht.Light)}"paper-size"===e&&(null===t?(n.applyPaperSize(void 0),this.config={...this.config,paperSize:void 0}):Ot(t)&&(n.applyPaperSize(t),this.config={...this.config,paperSize:t})),"dir"===e&&this.applyDir("ltr"===t||"rtl"===t?t:void 0,n.contentElement,n.editorWrapper)}applyRuntimeConfig(e,t){void 0!==e.placeholder&&this.applyPlaceholder(e.placeholder,t.contentElement),void 0!==e.readonly&&this.applyReadonly(e.readonly,t.contentElement,t.pluginManager),"paperSize"in e&&t.applyPaperSize(e.paperSize),"dir"in e&&this.applyDir(e.dir,t.contentElement,t.editorWrapper),this.config={...this.config,...e}}applyTheme(e,t){this.config={...this.config,theme:e},t?.apply(e)}getTheme(){return this.config.theme??Ht.Light}get isReadOnly(){return this.config.readonly??!1}get markdownShorthand(){return Os(this.config.markdown).shorthand}get pasteMarkdown(){return Os(this.config.markdown).paste}getPaperSize(){return this.config.paperSize}applyPlaceholder(e,t){if(!t)return;const n=t.getAttribute("data-default-placeholder")??"";t.setAttribute("data-placeholder",e??n)}applyReadonly(e,t,n){t&&(t.contentEditable=e?"false":"true",e?t.setAttribute("aria-readonly","true"):t.removeAttribute("aria-readonly"),n?.setReadOnly(e))}applyDir(e,t,n){t&&(e?(n?.setAttribute("dir",e),t.setAttribute("dir",e)):(n?.removeAttribute("dir"),t.removeAttribute("dir")))}},Hs=class{listeners=/* @__PURE__ */new Map;on(e,t){this.listeners.has(e)||this.listeners.set(e,/* @__PURE__ */new Set),this.listeners.get(e)?.add(t)}off(e,t){this.listeners.get(e)?.delete(t)}emit(e,t){const n=this.listeners.get(e);if(n)for(const s of n)s(t)}clear(){this.listeners.clear()}},zs=class{deps;handleSelectionChange;handleMousedown;handleDragover;handleDrop;handleCompositionStart;handleCompositionEnd;pendingNodeSelectionClear=!1;pendingGapCursorClear=!1;constructor(e){this.deps=e,this.handleCompositionStart=t=>{ct(t,e.contentElement)&&e.cursorWrapper.onCompositionStart(e.getState())},this.handleCompositionEnd=t=>{ct(t,e.contentElement)&&e.cursorWrapper.cleanup()},e.contentElement.addEventListener("compositionstart",this.handleCompositionStart),e.contentElement.addEventListener("compositionend",this.handleCompositionEnd),this.handleSelectionChange=this.onSelectionChange.bind(this),document.addEventListener("selectionchange",this.handleSelectionChange),this.handleMousedown=this.onMousedown.bind(this),e.contentElement.addEventListener("mousedown",this.handleMousedown),this.handleDragover=this.onDragover.bind(this),e.contentElement.addEventListener("dragover",this.handleDragover),this.handleDrop=this.onDrop.bind(this),e.contentElement.addEventListener("drop",this.handleDrop)}syncSelectionFromDOM(){if(this.deps.compositionState.isComposing)return;this.deps.cursorWrapper.isActive&&this.deps.cursorWrapper.cleanup();const e=this.deps.getState();if(B(e.selection)&&!this.pendingNodeSelectionClear)return;if(E(e.selection)&&!this.pendingGapCursorClear)return;this.pendingNodeSelectionClear=!1,this.pendingGapCursorClear=!1;const t=st(this.deps.contentElement);if(!t)return;if(P(t,e.selection))return;const n=e.transaction("input").setSelection(t).setStoredMarks(null,e.storedMarks).build(),s=e.apply(n);this.deps.applyUpdate(s,n,!0)}destroy(){const e=this.deps.contentElement;e.removeEventListener("compositionstart",this.handleCompositionStart),e.removeEventListener("compositionend",this.handleCompositionEnd),document.removeEventListener("selectionchange",this.handleSelectionChange),e.removeEventListener("mousedown",this.handleMousedown),e.removeEventListener("dragover",this.handleDragover),e.removeEventListener("drop",this.handleDrop)}onSelectionChange(){if(this.deps.isUpdating())return;const e=this.deps.contentElement.getRootNode(),t="activeElement"in e?e.activeElement:document.activeElement;(this.deps.contentElement.contains(t)||t===this.deps.contentElement)&<(t,this.deps.contentElement)&&this.syncSelectionFromDOM()}onMousedown(e){if(this.deps.isUpdating())return;if(!ct(e,this.deps.contentElement))return;this.deps.onMousedown?.();const t=e.target;if(!(t instanceof HTMLElement))return;const n=t.closest("[data-block-id]");if(!(n instanceof HTMLElement&&this.deps.contentElement.contains(n)))return void((this.deps.contentElement.contains(t)||t===this.deps.contentElement)&&this.handleClickBelowContent(e));if(!n.hasAttribute("data-void")&&!n.hasAttribute("data-selectable"))return void this.markPendingSelectionClear();if(n.querySelector("[data-content-dom]")?.contains(t))return void this.markPendingSelectionClear();e.preventDefault(),this.deps.contentElement.focus();const s=O(oe(n.getAttribute("data-block-id")??""),le(this.deps.contentElement,n)),i=this.deps.getState(),r=i.transaction("input").setSelection(s).setStoredMarks(null,i.storedMarks).build(),o=i.apply(r);this.deps.applyUpdate(o,r)}handleClickBelowContent(e){if(this.deps.isReadOnly())return;const t=this.deps.getState(),n=t.doc.children[t.doc.children.length-1];if(!n)return;const s=n.id,i=this.deps.contentElement.querySelector(`[data-block-id="${s}"]`);if(!i)return;const r=i.getBoundingClientRect();if(e.clientY<=r.bottom)return;const o=t.getBlock(s);if("paragraph"===o?.type&&0===y(o)){const n=t.transaction("input").setSelection(L(s,0)).build();return this.deps.dispatch(n),void e.preventDefault()}e.preventDefault(),this.deps.contentElement.focus();const a=m(),l=t.transaction("input").insertNode([],t.doc.children.length,u(a)).setSelection(L(a,0)).build();this.deps.dispatch(l)}onDragover(e){this.deps.fileHandlerRegistry&&e.dataTransfer&&e.dataTransfer.types.includes("Files")&&e.preventDefault()}onDrop(e){if(this.deps.isReadOnly())return;if(!this.deps.fileHandlerRegistry)return;if(!e.dataTransfer)return;const t=Array.from(e.dataTransfer.files);if(0===t.length)return;const n=this.getPositionFromPoint(e.clientX,e.clientY);let s=!1;for(const i of t){const e=this.deps.fileHandlerRegistry.matchFileHandlers(i.type);for(const t of e){const e=t(i,n);if(!0===e||e instanceof Promise){s=!0;break}}}s&&e.preventDefault()}getPositionFromPoint(e,t){const n=Pe(this.deps.contentElement.getRootNode(),e,t);return n&&this.deps.contentElement.contains(n.node)?at(this.deps.contentElement,n.node,n.offset):null}markPendingSelectionClear(){const e=this.deps.getState();B(e.selection)&&(this.pendingNodeSelectionClear=!0),E(e.selection)&&(this.pendingGapCursorClear=!0)}},_s=class{deps;navigationKeymap=null;goalColumn=null;preserveGoalColumn=!1;constructor(e){this.deps=e,this.registerKeymaps()}resetAfterUpdate(){this.preserveGoalColumn||(this.goalColumn=null)}clearGoalColumn(){this.goalColumn=null}destroy(){this.navigationKeymap&&this.deps.keymapRegistry&&(this.deps.keymapRegistry.removeKeymap(this.navigationKeymap),this.navigationKeymap=null)}registerKeymaps(){if(!this.deps.keymapRegistry)return;const e={ArrowLeft:"left",ArrowRight:"right",ArrowUp:"up",ArrowDown:"down"},t={};for(const[n,s]of Object.entries(e))t[n]=()=>this.handleArrow(s);this.navigationKeymap=t,this.deps.keymapRegistry.registerKeymap(t,{priority:"navigation"})}handleArrow(e){const t=this.deps.getState();return!B(t.selection)&&!E(t.selection)&&!!N(t.selection)&&("left"===e||"right"===e?this.handleHorizontalArrow(e):this.handleVerticalArrow(e))}handleHorizontalArrow(e){this.goalColumn=null;const t=this.deps.getState(),n=this.resolveLogicalDirection(t,e),s=Ae(t,n);if(s)return this.deps.dispatch(s),this.validateSelectionAfterInlineSkip(),!0;if(!Ne(this.deps.contentElement,t,e))return!1;const i=Be(t,n);return!!i&&(this.deps.dispatch(i),!0)}resolveLogicalDirection(e,t){const n=e.selection;if(!H(n))return t;const s=this.deps.contentElement.querySelector(`[data-block-id="${n.anchor.blockId}"]`);return s instanceof HTMLElement&&"rtl"===nt(s)?"left"===t?"right":"left":t}handleVerticalArrow(e){const t=this.deps.getState(),n=this.deps.contentElement.ownerDocument.getSelection?.()??null,s=n?Le(n,this.deps.contentElement):null;if(!Ne(this.deps.contentElement,t,e,s))return!1;null===this.goalColumn&&s&&(this.goalColumn=s.left),this.preserveGoalColumn=!0;const i=Oe(this.deps.contentElement,t,e,this.goalColumn);return i?(this.deps.dispatch(i),this.preserveGoalColumn=!1,!0):(this.preserveGoalColumn=!1,!1)}validateSelectionAfterInlineSkip(){const e=this.deps.getState(),t=st(this.deps.contentElement);t&&P(t,e.selection)||rt(this.deps.contentElement,e.selection)}};function Fs(e,t){const n=[];let s=null,i=[];for(const r of e){const e=t.getNodeSpec(r.type)?.wrapper?.(r);e&&s&&e.key===s.key?i.push(r.id):e?(s&&i.length>0&&n.push({spec:s,blockIds:i}),s=e,i=[r.id]):(s&&i.length>0&&n.push({spec:s,blockIds:i}),s=null,i=[])}return s&&i.length>0&&n.push({spec:s,blockIds:i}),n}function js(e,t){if(t.className&&e.className!==t.className&&(e.className=t.className),t.attrs)for(const[n,s]of Object.entries(t.attrs))e.getAttribute(n)!==s&&e.setAttribute(n,s)}function Ks(e){const t=document.createElement(e.tag);if(t.setAttribute("data-block-wrapper",e.key),e.className&&(t.className=e.className),e.attrs)for(const[n,s]of Object.entries(e.attrs))t.setAttribute(n,s);return t}function $s(e,t,n){t!==(n?n.nextSibling:e.firstChild)&&(n||t.parentNode!==e||t!==e.firstChild)&&(n?n.after(t):e.insertBefore(t,e.firstChild))}function Vs(e,t,n){for(let i=0;i<t.length;i++){const s=t[i];if(!s)continue;const r=n.querySelector(`[data-block-id="${s}"]`);if(!r)continue;const o=e.children[i]??null;r!==o&&(o?e.insertBefore(r,o):e.appendChild(r))}const s=new Set(t);for(const i of Array.from(e.children)){const t=i.getAttribute("data-block-id");t&&!s.has(t)&&n.insertBefore(i,e)}}function Us(e,t,n){if(!n)return;const s=Fs(t,n);for(const i of s){const t=e.querySelector(`[data-block-id="${i.blockIds[0]}"]`);if(!t)continue;const n=Ks(i.spec);t.before(n);for(const s of i.blockIds){const t=e.querySelector(`[data-block-id="${s}"]`);t&&n.appendChild(t)}}}function qs(e){e.parentElement?.removeChild(e)}function Ws(e,t,n){const s=e.parentElement;s?s.replaceChild(t,e):n.replaceChild(t,e)}function Gs(e,t,n){if(t?.parentElement){const e=t.parentElement;return void(t.nextSibling?e.insertBefore(n,t.nextSibling):e.appendChild(n))}e.firstChild?e.insertBefore(n,e.firstChild):e.appendChild(n)}function Qs(e,t){if(t){const n=t.getInlineNodeSpec(e.inlineType);if(n){const t=n.toDOM(e);return t.setAttribute("contenteditable","false"),t}}const n=document.createElement("span");return n.setAttribute("data-inline-type",e.inlineType),n.setAttribute("contenteditable","false"),n}function Js(e){let t=e.replace(/ {2}/g," ");return t.endsWith(" ")&&(t=`${t.slice(0,-1)} `),t.startsWith(" ")&&(t=` ${t.slice(1)}`),t}var Xs=/* @__PURE__ */new WeakMap;function Ys(e){const t=e.nodeName??"span",n=document.createElement(t);if(n.setAttribute("data-decoration","true"),e.class)for(const s of e.class.split(" "))s&&n.classList.add(s);e.style&&St(n,e.style);for(const[s,i]of Object.entries(e))"class"!==s&&"style"!==s&&"nodeName"!==s&&void 0!==i&&n.setAttribute(s,i);return n}function Zs(e,t,n){ei(e,t,n);const s=n?.decorations?.findNode(t);if(s&&0!==s.length)for(const i of s)i.attrs.style&&bt(e,i.attrs.style)}function ei(e,t,n){const s=Xs.get(e);if(s)for(const o of s.managed)s.preexisting.has(o)||e.classList.remove(o);const i=/* @__PURE__ */new Set;for(const o of n?.decorations?.findNode(t)??[])for(const e of o.attrs.class?.split(/\s+/)??[])e&&i.add(e);if(0===i.size)return void Xs.delete(e);const r=/* @__PURE__ */new Set;for(const o of i)e.classList.contains(o)?r.add(o):e.classList.add(o);Xs.set(e,{managed:i,preexisting:r})}function ti(e,t,n,s){const i=s?.decorations?.findInline(e.id),r=s?.nodeViewRegistry;if(r&&t&&n&&s?.getState&&s?.dispatch){const a=r.getNodeViewFactory(e.type);if(a){const r=a(e,s.getState,s.dispatch);n.set(e.id,r);const l=t.getNodeSpec(e.type);if(l?.isVoid&&r.dom.setAttribute("data-void","true"),l?.selectable&&r.dom.setAttribute("data-selectable","true"),r.contentDOM&&r.contentDOM!==r.dom&&r.contentDOM.setAttribute("data-content-dom","true"),o(e)&&r.contentDOM)si(r.contentDOM,e,t,i);else{const i=v(e),o=/* @__PURE__ */new Map;for(const e of i){const i=r.getContentDOM?.(e.id)??r.contentDOM;if(i){const r=ti(e,t,n,s);i.appendChild(r);let a=o.get(i);a||(a=[],o.set(i,a)),a.push(e)}}for(const[e,n]of o)Us(e,n,t)}return ni(r.dom,e),r.dom.setAttribute("data-block-type",e.type),Zs(r.dom,e.id,s),r.dom}}if(t){const r=t.getNodeSpec(e.type);if(r){const a=r.toDOM(e);if(r.isVoid&&a.setAttribute("data-void","true"),r.selectable&&a.setAttribute("data-selectable","true"),!r.isVoid)if(o(e))si(a,e,t,i);else{const i=v(e);for(const e of i){const i=ti(e,t,n,s);a.appendChild(i)}Us(a,i,t)}return ni(a,e),a.setAttribute("data-block-type",e.type),Zs(a,e.id,s),a}}return function(e,t,n){const s=ae("p",e.id);return ni(s,e),s.setAttribute("data-block-type",e.type),si(s,e,t,n),s}(e,t,i)}function ni(e,n,s){const i=t(n.htmlId);if(i)return void e.setAttribute("id",i);const r=t(s?.htmlId);r&&e.getAttribute("id")===r&&e.removeAttribute("id")}function si(e,t,n,s){for(const r of e.querySelectorAll("[data-cursor-wrapper]"))r.remove();const i=p(t);if(1===i.length&&r(i[0])&&""===i[0].text)return void e.appendChild(document.createElement("br"));if(s&&0!==s.length)!function(e,t,n,s){let i=0;for(const r of t){if(h(r)){e.appendChild(is(Qs(r,s),r.marks,s)),i+=1;continue}const t=i,o=i+r.text.length;if(0===r.text.length){i=o;continue}const a=/* @__PURE__ */new Set;a.add(t),a.add(o);for(const e of n){const n=Math.max(t,e.from),s=Math.min(o,e.to);n>t&&n<o&&a.add(n),s>t&&s<o&&a.add(s)}const l=[...a].sort((e,t)=>e-t);for(let i=0;i<l.length-1;i++){const o=l[i],a=l[i+1];if(void 0===o||void 0===a||o>=a)continue;const c=o-t,h=a-t,d=r.text.slice(c,h),p=[];for(const e of n)e.from<=o&&e.to>=a&&p.push(e);let u=is(document.createTextNode(Js(d)),r.marks,s);for(const e of p){const t=Ys(e.attrs);t.appendChild(u),u=t}e.appendChild(u)}i=o}}(e,i,s,n);else for(const a of i)r(a)?e.appendChild(ii(a,n)):e.appendChild(is(Qs(a,n),a.marks,n));const o=i[i.length-1];o&&h(o)&&"hard_break"===o.inlineType&&e.appendChild(document.createElement("br"))}function ii(e,t){return""===e.text?document.createTextNode(""):is(document.createTextNode(Js(e.text)),e.marks,t)}function ri(e,t,n,s){const i=t?.doc.children??[],r=n.doc.children,a=s?.registry,l=s?.nodeViews,c=null!=s?.compositionBlockId,h=/* @__PURE__ */new Map;for(const o of function(e){const t=[];for(const n of Array.from(e.children))if(n instanceof HTMLElement)if(n.hasAttribute("data-block-id"))t.push(n);else if(n.hasAttribute("data-block-wrapper"))for(const e of Array.from(n.children))e instanceof HTMLElement&&e.hasAttribute("data-block-id")&&t.push(e);return t}(e)){const e=o.getAttribute("data-block-id");e&&h.set(oe(e),o)}const d=new Set(r.map(e=>e.id));for(const[o,f]of h)if(!d.has(o)){qs(f),h.delete(o);const e=l?.get(o);e&&(e.destroy?.(),l?.delete(o))}const p=/* @__PURE__ */new Map;for(const o of i)p.set(o.id,o);let u=null;const g=s?.selectedNodeId,m=s?.previousSelectedNodeId;for(const f of r){const t=h.get(f.id),n=p.get(f.id);if(s?.compositionBlockId===f.id&&t){u=t;continue}const i=s?.oldDecorations?.find(f.id),r=s?.decorations?.find(f.id);if(t&&n&&!oi(n,f,i,r))u=t;else if(t){const i=l?.get(f.id);if(i){if(i.update?.(f)){if(ni(i.dom,f,n),o(f)&&i.contentDOM){i.contentDOM.textContent="";const e=s?.decorations?.findInline(f.id);si(i.contentDOM,f,a,e)}u=i.dom;continue}i.destroy?.(),l?.delete(f.id)}const r=ti(f,a,l,s);Ws(t,r,e),u=r}else{const t=ti(f,a,l,s);Gs(e,u,t),u=t}if(g===f.id){const e=l?.get(f.id);if(e)e.selectNode?.();else{const e=h.get(f.id)??u;e instanceof HTMLElement&&e.classList.add("notectl-node-selected")}}else if(m===f.id){const e=l?.get(f.id);if(e)e.deselectNode?.();else{const e=h.get(f.id)??u;e instanceof HTMLElement&&e.classList.remove("notectl-node-selected")}}}if(m&&m!==g){const e=l?.get(m);e&&!d.has(m)&&e.deselectNode?.()}if(g&&!d.has(g)){const e=l?.get(g);e&&e.selectNode?.()}!c&&a&&function(e,t,n){const s=Fs(t,n),i=function(e,t){const n=[],s=/* @__PURE__ */new Set;for(const r of t)for(const e of r.blockIds)s.add(e);let i=0;for(const r of e){if(!s.has(r.id)){n.push({type:"bare",blockId:r.id});continue}const e=t[i];e&&e.blockIds[0]===r.id&&(n.push({type:"wrapper",key:e.spec.key,blockIds:e.blockIds}),i++)}return n}(t,s),r=function(e){const t=[];for(const n of Array.from(e.children))if(n instanceof HTMLElement)if(n.hasAttribute("data-block-wrapper")){const e=n.getAttribute("data-block-wrapper")??"",s=[];for(const t of Array.from(n.children)){if(!(t instanceof HTMLElement))continue;const e=t.getAttribute("data-block-id");e&&s.push(oe(e))}t.push({type:"wrapper",element:n,key:e,blockIds:s})}else if(n.hasAttribute("data-block-id")){const e=n.getAttribute("data-block-id")??"";t.push({type:"bare",element:n,blockId:oe(e)})}return t}(e);if(function(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++){const s=e[n],i=t[n];if(!s||!i)return!1;if(s.type!==i.type)return!1;if("bare"===s.type&&"bare"===i.type){if(s.blockId!==i.blockId)return!1}else if("wrapper"===s.type&&"wrapper"===i.type){if(s.key!==i.key)return!1;if(s.blockIds.length!==i.blockIds.length)return!1;for(let e=0;e<s.blockIds.length;e++)if(s.blockIds[e]!==i.blockIds[e])return!1}}return!0}(i,r)){let e=0;for(const t of r)if("wrapper"===t.type){const n=s[e];n&&js(t.element,n.spec),e++}return}const o=/* @__PURE__ */new Map;for(const h of r){if("wrapper"!==h.type)continue;let e=o.get(h.key);e||(e=[],o.set(h.key,e)),e.push(h.element)}const a=/* @__PURE__ */new Set;let l=null,c=0;for(const h of i){if("bare"===h.type){const t=e.querySelector(`[data-block-id="${h.blockId}"]`);if(!t)continue;t.parentNode!==e?l?l.after(t):e.insertBefore(t,e.firstChild):$s(e,t,l),l=t;continue}const t=s[c];if(!t)continue;c++;const n=o.get(h.key);let i=null;if(n&&n.length>0){const e=n.shift();e&&(i=e.tagName.toLowerCase()===t.spec.tag?e:Ks(t.spec))}i||(i=Ks(t.spec)),a.add(i),js(i,t.spec),i.parentNode!==e?l?l.after(i):e.insertBefore(i,e.firstChild):$s(e,i,l),Vs(i,h.blockIds,e),l=i}for(const h of r)if("wrapper"===h.type&&!a.has(h.element)){for(;h.element.firstChild;)e.insertBefore(h.element.firstChild,h.element);h.element.remove()}}(e,r,a);for(const o of e.querySelectorAll("[data-block-id]")){const e=o.getAttribute("data-block-id");e&&ei(o,oe(e),s)}}function oi(e,t,n,s){if(e.type!==t.type)return!0;if(e.htmlId!==t.htmlId)return!0;if(e.children.length!==t.children.length)return!0;if(!b(e.attrs,t.attrs))return!0;for(let a=0;a<e.children.length;a++){const n=e.children[a],s=t.children[a];if(!n||!s)return!0;if(r(n)&&r(s)){if(n.text!==s.text)return!0;if(!c(n.marks,s.marks))return!0}else if(h(n)&&h(s)){if(n.inlineType!==s.inlineType)return!0;if(!ai(n.attrs,s.attrs))return!0;if(!c(n.marks,s.marks))return!0}else{if(r(n)||r(s)||h(n)||h(s))return!0;if(oi(n,s))return!0}}const i=n??[],o=s??[];return i!==o&&!ve(i,o)}function ai(e,t){const n=Object.keys(e),s=Object.keys(t);if(n.length!==s.length)return!1;for(const i of n)if(e[i]!==t[i])return!1;return!0}var li=class{state;contentElement;history;stateChangeCallbacks=[];isUpdating=!1;schemaRegistry;nodeViewRegistry;nodeViews=/* @__PURE__ */new Map;decorations=Ce.empty;getDecorations;isReadOnly;isReadonlyBypassed;compositionState;cursorWrapper;navigation;events;constructor(e,t){this.state=t.state,this.contentElement=e,this.schemaRegistry=t.schemaRegistry,this.nodeViewRegistry=t.nodeViewRegistry,this.getDecorations=t.getDecorations,this.isReadOnly=t.isReadOnly??(()=>!1),this.isReadonlyBypassed=t.isReadonlyBypassed??(()=>!1),this.compositionState=t.compositionState??{isComposing:!1,activeBlockId:null},this.history=new nn({maxDepth:t.maxHistoryDepth??100}),t.onStateChange&&this.stateChangeCallbacks.push(t.onStateChange),this.cursorWrapper=new os(e,this.schemaRegistry),this.navigation=new _s({contentElement:e,getState:()=>this.state,dispatch:e=>this.dispatch(e),keymapRegistry:t.keymapRegistry}),this.events=new zs({contentElement:e,getState:()=>this.state,dispatch:e=>this.dispatch(e),applyUpdate:(e,t,n)=>this.applyUpdate(e,t,{skipSelectionSync:n}),isUpdating:()=>this.isUpdating,compositionState:this.compositionState,cursorWrapper:this.cursorWrapper,isReadOnly:this.isReadOnly,fileHandlerRegistry:t.fileHandlerRegistry,onMousedown:()=>this.navigation.clearGoalColumn()}),this.decorations=this.getDecorations?.(this.state)??Ce.empty,ri(e,null,this.state,{...this.reconcileOptions(),decorations:this.decorations}),rt(e,this.state.selection)}getState(){return this.state}applyUpdate(e,t,n){if(!this.isUpdating){this.isUpdating=!0;try{const s=this.state;this.state=e,this.cursorWrapper.isActive&&!e.storedMarks?.length&&this.cursorWrapper.cleanup(),(n?.pushHistory&&"history"!==t.metadata.origin||en(t))&&this.history.push(t);const i=this.getDecorations?.(e,t)??Ce.empty;this.reconcileAndSync(s,e,i,n?.skipSelectionSync);for(const n of this.stateChangeCallbacks)n(s,e,t);this.navigation.resetAfterUpdate()}finally{this.isUpdating=!1}}}dispatch(e){if(this.isReadOnly()&&!tn(e)&&!this.isReadonlyBypassed())return;const t=this.state.apply(e);this.applyUpdate(t,e,{pushHistory:!0})}undo(){if(this.isUpdating||this.isReadOnly())return;const e=this.history.undo(this.state);e&&this.applyUpdate(e.state,e.transaction)}redo(){if(this.isUpdating||this.isReadOnly())return;const e=this.history.redo(this.state);e&&this.applyUpdate(e.state,e.transaction)}onStateChange(e){return this.stateChangeCallbacks.push(e),()=>{const t=this.stateChangeCallbacks.indexOf(e);-1!==t&&this.stateChangeCallbacks.splice(t,1)}}replaceState(e){if(!this.isUpdating){this.isUpdating=!0;try{const t=this.state,n=e.withSelection(t.selection);this.state=n,this.history.clear(),this.cursorWrapper.isActive&&!n.storedMarks?.length&&this.cursorWrapper.cleanup();const s={steps:[],selectionBefore:t.selection,selectionAfter:n.selection,storedMarksAfter:n.storedMarks,mapping:Te.empty,forwardStepMaps:[],metadata:{origin:"api",timestamp:Date.now()}},i=this.getDecorations?.(n,s)??Ce.empty;this.reconcileAndSync(t,n,i);for(const e of this.stateChangeCallbacks)e(t,n,s);this.navigation.resetAfterUpdate()}finally{this.isUpdating=!1}}}syncSelection(){this.events.syncSelectionFromDOM()}reconcileAndSync(e,t,n,s){const i=this.decorations;this.decorations=n,ri(this.contentElement,e,t,{...this.reconcileOptions(e.selection),decorations:n,oldDecorations:i,compositionBlockId:this.compositionState.isComposing?this.compositionState.activeBlockId??void 0:void 0}),this.compositionState.isComposing||s||rt(this.contentElement,t.selection)}reconcileOptions(e){const t=B(this.state.selection)?this.state.selection.nodeId:void 0,n=e&&B(e)?e.nodeId:void 0;return{registry:this.schemaRegistry,nodeViewRegistry:this.nodeViewRegistry,nodeViews:this.nodeViews,getState:()=>this.state,dispatch:e=>this.dispatch(e),selectedNodeId:t,previousSelectedNodeId:n}}destroy(){this.cursorWrapper.cleanup(),this.events.destroy(),this.navigation.destroy();for(const e of this.nodeViews.values())e.destroy?.();this.nodeViews.clear()}},ci={ariaLabel:"Rich text editor",ariaDescription:"Press Escape to exit the editor",defaultPlaceholder:"Start typing...",markdownImported:"Markdown imported"},hi=/* #__PURE__ */Object.assign({"./locales/ar.ts":()=>import("./ar-eOA3UmiE.mjs"),"./locales/de.ts":()=>import("./de-DRbhnS4T.mjs"),"./locales/es.ts":()=>import("./es-BQ9dox_E.mjs"),"./locales/fr.ts":()=>import("./fr-NVOinLyF.mjs"),"./locales/hi.ts":()=>import("./hi-DrC2H81d.mjs"),"./locales/pt.ts":()=>import("./pt-CFrcl1v_.mjs"),"./locales/ru.ts":()=>import("./ru-gxbzqLL8.mjs"),"./locales/zh.ts":()=>import("./zh-BFZOM3lF.mjs")}),di=["\n/**\n * Public theme tokens.\n *\n * Declared via @property so that:\n * - DevTools surfaces them as first-class CSS variables,\n * - invalid values are rejected at the engine level instead of breaking\n * downstream rules silently,\n * - the values are interpolatable for animations.\n *\n * The registration is scoped to this shadow root. Consumers override these\n * by setting the same custom properties on a parent (e.g. ::host).\n *\n * Components use the three-tier cascade:\n * var(--notectl-<component>-<prop>, var(--notectl-<prop>, <fallback>))\n */\n@property --notectl-bg { syntax: '<color>'; initial-value: #ffffff; inherits: true; }\n@property --notectl-fg { syntax: '<color>'; initial-value: #1f2328; inherits: true; }\n@property --notectl-fg-muted { syntax: '<color>'; initial-value: #6e7781; inherits: true; }\n@property --notectl-border { syntax: '<color>'; initial-value: #d0d7de; inherits: true; }\n@property --notectl-border-focus { syntax: '<color>'; initial-value: #0969da; inherits: true; }\n@property --notectl-primary { syntax: '<color>'; initial-value: #0969da; inherits: true; }\n@property --notectl-primary-fg { syntax: '<color>'; initial-value: #ffffff; inherits: true; }\n@property --notectl-focus-ring { syntax: '<color>'; initial-value: rgba(9, 105, 218, 0.3); inherits: true; }\n\n:host {\n\tdisplay: block;\n\tfont-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;\n\tfont-size: 16px;\n\tline-height: 1.6;\n\tcolor: var(--notectl-fg);\n}\n\n.notectl-editor {\n\tdisplay: flex;\n\tflex-direction: column;\n\tborder: 1px solid var(--notectl-border);\n\tborder-radius: var(--notectl-border-radius, 6px);\n\toverflow: hidden;\n\tbackground: var(--notectl-bg);\n\t/* Fill any explicit host height so embedders can size <notectl-editor>\n\t (e.g. height: 500px) and have the toolbar/content/footer fit inside.\n\t border-box keeps the 1px border within the host's height; min-height: 0\n\t lets the flex content shrink below its intrinsic size so internal\n\t scrolling can engage. */\n\tbox-sizing: border-box;\n\theight: 100%;\n\tmin-height: 0;\n}\n\n.notectl-editor:focus-within {\n\tborder-color: var(--notectl-border-focus);\n\tbox-shadow: 0 0 0 2px var(--notectl-focus-ring);\n}\n\n/* Content Area */\n.notectl-content {\n\tflex: 1;\n\tpadding: 12px 16px;\n\toutline: none;\n\tmin-height: var(--notectl-content-min-height, 400px);\n\tmax-height: var(--notectl-content-max-height, none);\n\toverflow-y: auto;\n\tcursor: text;\n\tposition: relative;\n\twhite-space: pre-wrap;\n\tword-wrap: break-word;\n\t-webkit-user-select: text;\n\tuser-select: text;\n\t-moz-tab-size: 4;\n\ttab-size: 4;\n}\n\n.notectl-content p {\n\tmargin: 0;\n\tpadding: 2px 0;\n\tmin-height: 1.6em;\n}\n\n.notectl-content p + p {\n\tmargin-top: 0;\n}\n\n/* Horizontal Rule */\n.notectl-content hr {\n\tborder: none;\n\tborder-top: 1px solid var(--notectl-border);\n\tmargin: 8px 0;\n\tpadding: 0;\n\tcursor: default;\n\tuser-select: none;\n}\n\n/* Placeholder */\n.notectl-content.notectl-content--empty::before {\n\tcontent: attr(data-placeholder);\n\tcolor: var(--notectl-fg-muted);\n\tpointer-events: none;\n\tposition: absolute;\n\ttop: 12px;\n\tinset-inline-start: 16px;\n}\n\n/* Plugin container bottom */\n.notectl-plugin-container--bottom {\n\tborder-top: 1px solid var(--notectl-border);\n\tflex-shrink: 0;\n}\n\n/* Screen reader announcements */\n.notectl-sr-only {\n\tposition: absolute;\n\twidth: 1px;\n\theight: 1px;\n\tmargin: -1px;\n\tpadding: 0;\n\toverflow: hidden;\n\tclip: rect(0, 0, 0, 0);\n\twhite-space: nowrap;\n\tborder: 0;\n}\n\n/* Node selection */\n.notectl-node-selected {\n\toutline: 2px solid var(--notectl-primary);\n\toutline-offset: 2px;\n}\n\n/* High-contrast / forced-colors mode (Windows High Contrast, etc.) */\n@media (forced-colors: active) {\n\t.notectl-editor {\n\t\tborder-color: CanvasText;\n\t}\n\t.notectl-editor:focus-within {\n\t\tborder-color: Highlight;\n\t\tbox-shadow: 0 0 0 2px Highlight;\n\t}\n\t.notectl-content {\n\t\tcolor: CanvasText;\n\t}\n\t.notectl-plugin-container--top,\n\t.notectl-plugin-container--bottom {\n\t\tborder-color: CanvasText;\n\t}\n\t.notectl-node-selected {\n\t\toutline-color: Highlight;\n\t}\n}\n","\n@media (prefers-reduced-motion: reduce) {\n\t.notectl-toolbar-btn,\n\t.notectl-image__resize-handle,\n\t.notectl-image__size-indicator,\n\t.notectl-color-picker__swatch,\n\t.notectl-font-picker__item,\n\t.notectl-heading-picker__item,\n\t.notectl-font-size-picker__item,\n\t.ntbl-handle,\n\t.ntbl-handle-delete,\n\t.ntbl-insert-line,\n\t.ntbl-insert-btn,\n\t.ntbl-add-zone,\n\t.ntbl-add-icon,\n\t.ntbl-col-bar,\n\t.ntbl-row-bar,\n\t.ntbl-delete-table-btn,\n\t.notectl-code-block__copy {\n\t\ttransition: none !important;\n\t}\n}\n",'\n/* Paper viewport: scroll container with centered gray background */\n.notectl-paper-viewport {\n\tflex: 1;\n\toverflow-y: auto;\n\toverflow-x: hidden;\n\tbackground: var(--notectl-paper-viewport-bg, #e8e8e8);\n\tpadding: 24px 0;\n}\n\n/* Paper surface: white page with shadow, centered */\n.notectl-paper-surface {\n\tmargin: 0 auto;\n\tbackground: var(--notectl-bg);\n\tborder-radius: 2px;\n\tbox-shadow: 0 2px 8px var(--notectl-shadow, rgba(0, 0, 0, 0.15));\n\ttransform-origin: top center;\n\ttransition: transform 0.15s ease-out;\n}\n\n/* Content overrides in paper mode: wider document margins */\n.notectl-editor[data-paper-mode] .notectl-content {\n\tflex: none;\n\tpadding: 48px 56px;\n\tmin-height: auto;\n}\n\n/* Placeholder position override for paper mode */\n.notectl-editor[data-paper-mode] .notectl-content.notectl-content--empty::before {\n\ttop: 48px;\n\tinset-inline-start: 56px;\n}\n\n/* Dark mode: darker viewport background */\n:host([theme="dark"]) .notectl-paper-viewport {\n\t--notectl-paper-viewport-bg: #181825;\n}\n\n@media (prefers-reduced-motion: reduce) {\n\t.notectl-paper-surface {\n\t\ttransition: none !important;\n\t}\n}\n'].join("\n"),pi=null,ui=class{themeStyleSheet=new CSSStyleSheet;systemThemeQuery=null;systemThemeHandler=null;pluginSheets=[];runtimeSheets=[];shadow;constructor(e){this.shadow=e}apply(e){if(this.cleanupSystemThemeListener(),e===Ht.System){this.setupSystemThemeListener();const e=Et(this.getSystemTheme());this.setThemeStyleSheet(e)}else this.setThemeStyleSheet(Et(e))}setPluginStyleSheets(e){this.pluginSheets=e,this.refreshAdoptedStyleSheets()}setRuntimeStyleSheets(e){this.runtimeSheets=e,this.refreshAdoptedStyleSheets()}destroy(){this.cleanupSystemThemeListener()}setThemeStyleSheet(e){this.themeStyleSheet.replaceSync(At(e)),this.refreshAdoptedStyleSheets()}refreshAdoptedStyleSheets(){this.shadow.adoptedStyleSheets=[this.themeStyleSheet,(pi||(pi=new CSSStyleSheet).replaceSync(di),pi),...this.pluginSheets,...this.runtimeSheets]}setupSystemThemeListener(){this.systemThemeQuery=window.matchMedia("(prefers-color-scheme: dark)"),this.systemThemeHandler=e=>{const t=Et(this.getSystemTheme());this.setThemeStyleSheet(t)},this.systemThemeQuery.addEventListener("change",this.systemThemeHandler)}cleanupSystemThemeListener(){this.systemThemeQuery&&this.systemThemeHandler&&this.systemThemeQuery.removeEventListener("change",this.systemThemeHandler),this.systemThemeQuery=null,this.systemThemeHandler=null}getSystemTheme(){return(this.systemThemeQuery??window.matchMedia("(prefers-color-scheme: dark)")).matches?Ht.Dark:Ht.Light}},gi=class{wrapper;content;viewport=null;surface=null;viewportObserver=null;surfaceObserver=null;currentSize=null;currentPaperWidthPx=0;currentPaperHeightPx=0;currentScale=1;compensationFrameId=null;constructor(e,t){this.wrapper=e,this.content=t}apply(e){if(null===e)return void this.disable();const t=Pt(e);this.currentPaperWidthPx=t.widthPx,this.currentPaperHeightPx=t.heightPx,this.currentSize=e,this.viewport||this.enable(),this.updateSurfaceDimensions(),this.wrapper.setAttribute("data-paper-mode",e)}destroy(){this.disable()}getPaperSize(){return this.currentSize}enable(){this.viewport=document.createElement("div"),this.viewport.className="notectl-paper-viewport",this.surface=document.createElement("div"),this.surface.className="notectl-paper-surface",this.wrapper.removeChild(this.content),this.surface.appendChild(this.content),this.viewport.appendChild(this.surface);const e=this.wrapper.querySelector(".notectl-plugin-container--bottom");e?this.wrapper.insertBefore(this.viewport,e):this.wrapper.appendChild(this.viewport),this.viewportObserver=new ResizeObserver(e=>{for(const t of e)this.onViewportResize(t.contentRect.width)}),this.viewportObserver.observe(this.viewport),this.surfaceObserver=new ResizeObserver(e=>{for(const t of e)this.onSurfaceResize(t.contentRect.height)}),this.surfaceObserver.observe(this.surface)}disable(){if(null!==this.compensationFrameId&&(cancelAnimationFrame(this.compensationFrameId),this.compensationFrameId=null),this.viewportObserver?.disconnect(),this.viewportObserver=null,this.surfaceObserver?.disconnect(),this.surfaceObserver=null,this.viewport&&this.surface){this.surface.removeChild(this.content);const e=this.wrapper.querySelector(".notectl-plugin-container--bottom");e?this.wrapper.insertBefore(this.content,e):this.wrapper.appendChild(this.content),this.wrapper.removeChild(this.viewport)}this.viewport=null,this.surface=null,this.currentSize=null,this.currentPaperWidthPx=0,this.currentPaperHeightPx=0,this.currentScale=1,this.wrapper.removeAttribute("data-paper-mode")}updateSurfaceDimensions(){this.surface&&(wt(this.surface,"width",`${this.currentPaperWidthPx}px`),wt(this.surface,"minHeight",`${this.currentPaperHeightPx}px`))}onViewportResize(e){if(!this.surface||0===this.currentPaperWidthPx)return;const t=e-48,n=Math.min(1,t/this.currentPaperWidthPx);this.currentScale=n,wt(this.surface,"transform",n<1?`scale(${n})`:""),this.scheduleHeightCompensation(n)}onSurfaceResize(e){this.surface&&this.viewport&&this.scheduleHeightCompensation(this.currentScale)}scheduleHeightCompensation(e){null!==this.compensationFrameId&&cancelAnimationFrame(this.compensationFrameId),this.compensationFrameId=requestAnimationFrame(()=>{this.compensationFrameId=null,this.updateHeightCompensation(e)})}updateHeightCompensation(e){if(!this.surface)return;if(e>=1)return void wt(this.surface,"marginBottom","");const t=this.surface.scrollHeight,n=t*e-t;wt(this.surface,"marginBottom",`${n}px`)}};function mi(e){return!Array.isArray(e)}function fi(e){if(Array.isArray(e))return{plugins:e,label:void 0};const t=e;return{plugins:t.plugins,label:t.label}}var yi=class{deps;cfg;themeController=null;domElements=null;paperLayout=null;pluginManager=null;inputManager=null;view=null;locale=ci;cleanedUp=!1;constructor(e){this.deps=e,this.cfg=e.config}announce(e){const t=this.domElements?.announcer;t&&(t.textContent=e)}async run(){try{if(this.setupTheme(),this.isCancelled())return this.abort();const e=await async function(e){const t=new _t(e.locale??"browser").getLocale();return"en"===t?ci:await async function(e){return zt(hi,e,ci)}(t)}(this.cfg);if(this.isCancelled())return this.abort();if(this.locale=e,this.setupDOM(e),this.setupPlugins(),await this.initPluginsAndView(),this.isCancelled()||!this.view||!this.inputManager||!this.pluginManager||!this.domElements||!this.themeController)return this.abort();const t=this.view,n=this.inputManager,s=this.pluginManager,i=this.domElements,r=this.themeController;return this.finalizeSetup(s,i),{view:t,inputManager:n,pluginManager:s,domElements:i,themeController:r,paperLayout:this.paperLayout,announce:e=>this.announce(e),markdownImportedMessage:this.locale.markdownImported,release:()=>{this.view=null}}}catch(e){throw await this.cleanup(),e}}setupTheme(){this.themeController=new ui(this.deps.shadow),this.deps.styleCoordinator.setup(this.deps.shadow,this.cfg.styleNonce,this.themeController),this.themeController.apply(this.cfg.theme??Ht.Light)}setupDOM(e){this.domElements=function(e){const t=e.locale??ci,n=t.defaultPlaceholder,s=document.createElement("div");s.className="notectl-editor",s.setAttribute("part","editor");const i=document.createElement("div");i.className="notectl-plugin-container--top",i.setAttribute("part","plugin-container plugin-container-top"),i.setAttribute("data-notectl-no-print","");const r=document.createElement("div");r.className="notectl-content",r.setAttribute("part","content"),r.contentEditable=e.readonly?"false":"true",r.setAttribute("role","textbox"),r.setAttribute("aria-multiline","true"),r.setAttribute("aria-label",t.ariaLabel),e.readonly&&r.setAttribute("aria-readonly","true"),r.setAttribute("aria-description",t.ariaDescription),r.setAttribute("data-default-placeholder",n),r.setAttribute("data-placeholder",e.placeholder??n),e.dir&&(s.setAttribute("dir",e.dir),r.setAttribute("dir",e.dir));const o=document.createElement("div");o.className="notectl-plugin-container--bottom",o.setAttribute("part","plugin-container plugin-container-bottom"),o.setAttribute("data-notectl-no-print","");const a=document.createElement("div");return a.className="notectl-sr-only",a.setAttribute("data-notectl-no-print",""),a.setAttribute("aria-live","polite"),a.setAttribute("aria-atomic","true"),s.appendChild(i),s.appendChild(r),s.appendChild(o),s.appendChild(a),{wrapper:s,content:r,topPluginContainer:i,bottomPluginContainer:o,announcer:a}}({readonly:this.cfg.readonly,placeholder:this.cfg.placeholder,dir:this.cfg.dir??this.deps.hostDir,locale:e}),this.deps.shadow.appendChild(this.domElements.wrapper),this.cfg.paperSize&&(this.paperLayout=new gi(this.domElements.wrapper,this.domElements.content),this.paperLayout.apply(this.cfg.paperSize))}setupPlugins(){if(this.domElements){this.pluginManager=new Is({logger:this.cfg.logger}),this.pluginManager.registerService(Ft,new _t(this.cfg.locale??"browser")),Vt(this.pluginManager.schemaRegistry),function(e,t){if(!t)return;const n=mi(t)?t.groups:t,s=mi(t)?t.overflow:void 0,i=[];for(const o of n){const{plugins:t,label:n}=fi(o),s=[];for(const i of t)s.push(i.id),e.register(i);i.push(void 0!==n?{plugins:s,label:n}:s)}const r={groups:i,overflow:s};e.register(new xt(r))}(this.pluginManager,this.cfg.toolbar);for(const e of this.cfg.plugins??[])this.pluginManager.register(e);for(const e of this.deps.preInitPlugins)this.pluginManager.register(e);e=this.pluginManager,t=this.cfg.features,function(e,t){if(void 0!==e.get("text-formatting"))return;const n={bold:t?.bold??!0,italic:t?.italic??!0,underline:t?.underline??!0};e.register(new Kt(n))}(e,t),function(e){void 0===e.get("caret-navigation")&&e.register(new De)}(e),function(e){void 0===e.get("gap-cursor")&&e.register(new jt)}(e),this.domElements.content.addEventListener("focus",()=>this.deps.events.emit("focus",void 0)),this.domElements.content.addEventListener("blur",()=>this.deps.events.emit("blur",void 0))}var e,t}async initPluginsAndView(){if(!this.pluginManager||!this.domElements||!this.themeController)return;const e=this.domElements,t=this.pluginManager,n=this.themeController;await t.init({isCancelled:()=>this.isCancelled(),getState:()=>{if(!this.view)throw new Error("View not initialized");return this.view.getState()},dispatch:e=>this.dispatch(e),getContainer:()=>e.content,getPluginContainer:t=>"top"===t?e.topPluginContainer:e.bottomPluginContainer,announce:e=>this.announce(e),hasAnnouncement:()=>!!e.announcer?.textContent,getCompositionState:()=>{const e=this.inputManager?.compositionTracker;return e||ki},onBeforeReady:()=>this.createInputAndView(e,t,n)})}createInputAndView(e,t,n){if(this.isCancelled()||!this.pluginManager||!this.themeController)return;const s=ee(t.schemaRegistry),i=Wt.create({schema:s}),r=this.deps.configController.markdownShorthand;this.inputManager=new Xn(e.content,{getState:()=>{if(!this.view)throw new Error("View not initialized");return this.view.getState()},dispatch:e=>this.dispatch(e),syncSelection:()=>this.view?.syncSelection(),undo:()=>this.view?.undo(),redo:()=>this.view?.redo(),schemaRegistry:t.schemaRegistry,keymapRegistry:t.keymapRegistry,inputRuleRegistry:t.inputRuleRegistry,fileHandlerRegistry:t.fileHandlerRegistry,isReadOnly:()=>this.deps.configController.isReadOnly,shouldApplyInputRules:()=>r,getPasteInterceptors:()=>t.getPasteInterceptors(),pasteMarkdown:this.deps.configController.pasteMarkdown,getMarkdownSyntaxExtensions:()=>t.markdownSyntaxRegistry.getExtensions(),getTextInputInterceptors:()=>t.getTextInputInterceptors(),getTextDirection:nt,navigateFromGapCursor:Me,announce:e=>this.announce(e),markdownImportedMessage:this.locale.markdownImported}),this.view=new li(e.content,{state:i,schemaRegistry:t.schemaRegistry,keymapRegistry:t.keymapRegistry,fileHandlerRegistry:t.fileHandlerRegistry,nodeViewRegistry:t.nodeViewRegistry,maxHistoryDepth:this.cfg.maxHistoryDepth,getDecorations:(e,n)=>t.collectDecorations(e,n)??Ce.empty,onStateChange:(n,s,i)=>{!function(e,t,n,s,i,r){const o=s.announcer;if(o&&(o.textContent=""),i.notifyStateChange(e,t,n),wi(s.content,t.doc),r.emit("stateChange",{oldState:e,newState:t,transaction:n}),P(e.selection,t.selection)||r.emit("selectionChange",{selection:t.selection}),!o?.textContent){const s=function(e,t,n){if("undo"===n.metadata.historyDirection)return"Undo";if("redo"===n.metadata.historyDirection)return"Redo";for(const s of n.steps)if("setBlockType"===s.type)return Ts(s.nodeType,s.attrs);for(const s of t.schema.markTypes){const n=ie(s),i=q(e,n),r=q(t,n);if(i!==r)return`${s} ${r?"on":"off"}`}return null}(e,t,n);s&&o&&(o.textContent=s)}}(n,s,i,e,t,this.deps.events)},isReadOnly:()=>this.deps.configController.isReadOnly,isReadonlyBypassed:()=>t.isReadonlyBypassed(),compositionState:this.inputManager.compositionTracker}),wi(e.content,this.view.getState().doc);const o=t.getPluginStyleSheets();o.length>0&&n.setPluginStyleSheets(o)}finalizeSetup(e,t){if(this.cfg.readonly&&e.setReadOnly(!0),e.onEvent(Dt,e=>{!e.options.paperSize&&this.deps.configController.getPaperSize()&&(e.options={...e.options,paperSize:this.deps.configController.getPaperSize()})}),this.cfg.autofocus){const e=t.content;requestAnimationFrame(()=>e.focus())}}dispatch(e){this.view&&this.pluginManager&&this.pluginManager.dispatchWithMiddleware(e,this.view.getState(),e=>this.view?.dispatch(e))}isCancelled(){return this.deps.isCancelled?.()??!1}async abort(){return await this.cleanup(),null}async cleanup(){if(this.cleanedUp)return;this.cleanedUp=!0;const e=this.view;this.view=null,this.paperLayout?.destroy(),this.paperLayout=null,this.deps.styleCoordinator.teardown(this.deps.shadow,this.themeController),this.themeController?.destroy(),this.themeController=null,this.inputManager?.destroy(),this.inputManager=null,e?.destroy();const t=this.pluginManager;this.pluginManager=null,await(t?.destroy()),this.domElements?.wrapper.remove(),this.domElements=null}},ki={isComposing:!1,activeBlockId:null};function wi(e,t){e.classList.toggle("notectl-content--empty",On(t))}var Si=class{state="idle";readyPromiseResolve=null;readyPromiseReject=null;readyPromise;preInitPlugins=[];constructor(){this.readyPromise=this.createReadyPromise()}isInitialized(){return"initializing"===this.state||"ready"===this.state}markInitialized(){return"initializing"!==this.state&&"ready"!==this.state&&("failed"===this.state&&(this.readyPromise=this.createReadyPromise()),this.state="initializing",!0)}whenReady(){return this.readyPromise}resolveReady(){"initializing"===this.state&&(this.state="ready",this.readyPromiseResolve?.(),this.readyPromiseResolve=null,this.readyPromiseReject=null)}failReady(e){"initializing"===this.state&&(this.state="failed",this.readyPromiseReject?.(e),this.readyPromiseResolve=null,this.readyPromiseReject=null)}registerPreInitPlugin(e){if("initializing"===this.state||"ready"===this.state)throw new Error("Cannot register plugins after initialization. Register before calling init() or adding to DOM.");this.preInitPlugins.push(e)}consumePreInitPlugins(){const e=this.preInitPlugins;return this.preInitPlugins=[],e}restorePreInitPlugins(e){0!==e.length&&(this.preInitPlugins=[...e,...this.preInitPlugins])}reset(){this.state="idle",this.preInitPlugins=[],this.readyPromise=this.createReadyPromise()}createReadyPromise(){const e=new Promise((e,t)=>{this.readyPromiseResolve=e,this.readyPromiseReject=t});return e.catch(()=>{}),e}},vi=class{runtimeStyleSheet=null;setup(e,t,n){It(e),this.runtimeStyleSheet=vt(),n?.setRuntimeStyleSheets(this.runtimeStyleSheet?[this.runtimeStyleSheet]:[]),kt(e,{nonce:t,sheet:this.runtimeStyleSheet})}teardown(e,t){e&&It(e),this.runtimeStyleSheet=null,t?.setRuntimeStyleSheets([])}},bi=class extends HTMLElement{view=null;inputManager=null;pluginManager=null;domElements=null;configController=new Ls;events=new Hs;lifecycle=new Si;styleCoordinator=new vi;themeController=null;paperLayout=null;pendingInitPromise=null;cancelPendingInit=null;autoInitToken=0;autoInitQueued=!1;initVersion=0;releaseInit=null;announce=null;markdownImportedMessage="Markdown imported";static get observedAttributes(){return["placeholder","readonly","theme","paper-size","dir"]}connectedCallback(){Nt(this)||this.lifecycle.isInitialized()||this.scheduleAutoInit()}disconnectedCallback(){setTimeout(()=>{this.isConnected||this.destroy()},0)}attributeChangedCallback(e,t,n){this.configController.applyAttribute(e,n,this.getConfigDeps())}registerPlugin(e){this.lifecycle.registerPreInitPlugin(e)}async init(e){if(Nt(this))throw Tt();if(this.cancelAutoInit(),!this.lifecycle.markInitialized())return;let t;e&&this.configController.setConfig(e);try{t=this.ensureFreshShadowRoot()}catch(o){throw this.lifecycle.failReady(o),o}const n=++this.initVersion;let s=!1;this.cancelPendingInit=()=>{s=!0};const i=this.lifecycle.consumePreInitPlugins(),r=async function(e){return new yi(e).run()}({shadow:t,config:this.configController.getConfig(),hostDir:this.getAttribute("dir")??void 0,configController:this.configController,styleCoordinator:this.styleCoordinator,events:this.events,preInitPlugins:i,isCancelled:()=>s||n!==this.initVersion});this.pendingInitPromise=r;try{const e=await r;if(!e){if(s||n!==this.initVersion)return;throw new Error("Editor initialization completed without a result.")}if(n!==this.initVersion)return;this.view=e.view,this.inputManager=e.inputManager,this.pluginManager=e.pluginManager,this.domElements=e.domElements,this.themeController=e.themeController,this.paperLayout=e.paperLayout,this.announce=e.announce,this.markdownImportedMessage=e.markdownImportedMessage,this.releaseInit=e.release,this.lifecycle.resolveReady(),this.events.emit("ready",void 0)}catch(o){throw n===this.initVersion&&(this.lifecycle.restorePreInitPlugins(i),this.lifecycle.failReady(o)),o}finally{this.pendingInitPromise===r&&(this.pendingInitPromise=null,this.cancelPendingInit=null)}}get isReadOnly(){return this.configController.isReadOnly}getJSON(){if(!this.view)throw new Error("Editor not initialized");return this.view.getState().doc}setJSON(e){this.assertInitialized(),Tn(e,this.pluginManager?.schemaRegistry,e=>this.replaceState(e))}async getContentHTML(t){if(!this.view)throw new Error("Editor not initialized");return function(t,n,s){const i=t.doc;if("classes"===s?.cssMode){const t=ut(i,n,s);return s.pretty?{html:e(t.html),css:t.css,styleMap:t.styleMap}:t}const r=pt(i,n,s);return s?.pretty?e(r):r}(this.view.getState(),this.pluginManager?.schemaRegistry,t)}async setContentHTML(e,t){return this.assertInitialized(),function(e,t,n,s){Tn(yt(e,t,s),t,n)}(e,this.pluginManager?.schemaRegistry,e=>this.replaceState(e),t)}async getContentMarkdown(e){if(!this.view)throw new Error("Editor not initialized");return async function(e,t,n){const{serializeDocumentToMarkdown:s}=await import("./MarkdownSerializer-J-i28out.mjs").then(e=>e.t);return s(e.doc,t,n)}(this.view.getState(),this.pluginManager?.schemaRegistry,e)}async setContentMarkdown(e,t){if(this.assertInitialized(),!this.view)return;const n=this.pluginManager?.markdownSyntaxRegistry.getExtensions(),s={...t,syntaxExtensions:t?.syntaxExtensions??n};await async function(e,t,n,s,i){const{parseMarkdownToDocument:r}=await import("./MarkdownParser-CWt3M6jR.mjs").then(e=>e.t),o=r(e,n,i),a=t.doc.children.map(e=>e.id);Tn({children:o.children.map((e,t)=>{const n=a[t];return n?S(e.type,e.children,n,e.attrs,e.htmlId):e})},n,s)}(e,this.view.getState(),this.pluginManager?.schemaRegistry,e=>this.replaceState(e),s),this.announce?.(this.markdownImportedMessage)}getText(){if(!this.view)throw new Error("Editor not initialized");return Dn(this.view.getState())}setText(e){this.assertInitialized(),this.view&&function(e,t,n,s){if(e===Dn(t))return;const i=e.split("\n"),r=t.doc.children.map(e=>e.id),o=i.map((e,t)=>S(se("paragraph"),[R(e)],r[t])),a=n?ee(n):void 0;s(Wt.create({doc:{children:o},schema:a}))}(e,this.view.getState(),this.pluginManager?.schemaRegistry,e=>this.replaceState(e))}isEmpty(){return!this.view||On(this.view.getState().doc)}commands={toggleBold:()=>this.executeCommand("toggleBold"),toggleItalic:()=>this.executeCommand("toggleItalic"),toggleUnderline:()=>this.executeCommand("toggleUnderline"),undo:()=>{this.configController.isReadOnly||this.view?.undo()},redo:()=>{this.configController.isReadOnly||this.view?.redo()},selectAll:()=>{if(!this.view)return;const e=G(this.view.getState());this.dispatch(e)}};can(){const e=this.view?.getState().schema,t=this.configController.isReadOnly;return{toggleBold:()=>!t&&!!e&&_(e,"bold"),toggleItalic:()=>!t&&!!e&&_(e,"italic"),toggleUnderline:()=>!t&&!!e&&_(e,"underline"),undo:()=>!t&&(this.view?.history.canUndo()??!1),redo:()=>!t&&(this.view?.history.canRedo()??!1),selectAll:()=>this.canExecuteCommand("selectAll")}}canExecuteCommand(e){return this.pluginManager?.canExecuteCommand(e)??!1}executeCommand(e){return this.pluginManager?.executeCommand(e)??!1}configurePlugin(e,t){this.pluginManager?.configurePlugin(e,t)}getService(e){return this.pluginManager?.getService(e)}onPluginEvent(e,t){return this.pluginManager?.onEvent(e,t)??(()=>{})}getState(){if(!this.view)throw new Error("Editor not initialized");return this.view.getState()}dispatch(e){this.view&&this.pluginManager&&this.pluginManager.dispatchWithMiddleware(e,this.view.getState(),e=>this.view?.dispatch(e))}on(e,t){this.events.on(e,t)}off(e,t){this.events.off(e,t)}whenReady(){return Nt(this)?Promise.reject(Tt()):this.lifecycle.whenReady()}configure(e){this.configController.applyRuntimeConfig(e,this.getConfigDeps())}setTheme(e){this.configController.applyTheme(e,this.themeController)}getTheme(){return this.configController.getTheme()}getPaperSize(){return this.configController.getPaperSize()}destroy(){this.cancelAutoInit(),this.initVersion++,this.cancelPendingInit?.(),this.cancelPendingInit=null;const e=this.pendingInitPromise?.then(()=>{},()=>{})??Promise.resolve();this.pendingInitPromise=null,this.releaseInit?.(),this.releaseInit=null,this.announce=null,this.paperLayout?.destroy(),this.paperLayout=null,this.styleCoordinator.teardown(this.shadowRoot,this.themeController),this.themeController?.destroy(),this.themeController=null,this.inputManager?.destroy(),this.inputManager=null,this.view?.destroy();const t=this.pluginManager?.destroy()??Promise.resolve();return this.view=null,this.pluginManager=null,this.lifecycle.reset(),this.events.clear(),this.domElements?.wrapper.remove(),this.domElements=null,Promise.all([t,e]).then(()=>{})}ensureFreshShadowRoot(){const e=this.shadowRoot;return e?(e.replaceChildren(),e):this.attachShadow({mode:"open"})}getConfigDeps(){return{contentElement:this.domElements?.content??null,editorWrapper:this.domElements?.wrapper??null,pluginManager:this.pluginManager,themeController:this.themeController,applyPaperSize:e=>this.applyPaperSize(e)}}scheduleAutoInit(){const e=++this.autoInitToken;this.autoInitQueued=!0,queueMicrotask(()=>{this.isConnected&&this.autoInitQueued&&this.autoInitToken===e&&(this.autoInitQueued=!1,this.lifecycle.isInitialized()||this.init().catch(()=>{}))})}cancelAutoInit(){this.autoInitToken++,this.autoInitQueued=!1}applyPaperSize(e){this.domElements&&(e?(this.paperLayout||(this.paperLayout=new gi(this.domElements.wrapper,this.domElements.content)),this.paperLayout.apply(e)):this.paperLayout?.apply(null))}replaceState(e){this.view&&this.view.replaceState(e)}assertInitialized(){if(!this.view)throw new Error("Editor not initialized")}};async function Ii(e){const t=document.createElement("notectl-editor");return await t.init(e),t}"undefined"==typeof customElements||customElements.get("notectl-editor")||customElements.define("notectl-editor",bi);export{Vt as A,nn as C,Zt as D,Yt as E,Wt as O,dn as S,en as T,Zn as _,Bs as a,mn as b,Cs as c,as as d,cs as f,es as g,ns as h,Es as i,Ut as k,Is as l,os as m,Ii as n,Ms as o,ls as p,As as r,Ts as s,bi as t,hs as u,Yn as v,tn as w,gn as x,Xn as y};
|
|
2
|
+
//# sourceMappingURL=src-DiAOfuOT.mjs.map
|