@notectl/core 2.3.1 → 2.3.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/THIRD-PARTY-NOTICES.md +129 -0
- package/dist/chunks/AlignmentPlugin-DIwrRsHd.mjs +2 -0
- package/dist/chunks/AlignmentPlugin-DIwrRsHd.mjs.map +1 -0
- package/dist/chunks/{AttrRegistry-B3zB02z9.mjs → AttrRegistry-CtNhf2EF.mjs} +2 -2
- package/dist/chunks/{AttrRegistry-B3zB02z9.mjs.map → AttrRegistry-CtNhf2EF.mjs.map} +1 -1
- package/dist/chunks/AttributedMarkCommands-B3MQdob_.mjs +2 -0
- package/dist/chunks/AttributedMarkCommands-B3MQdob_.mjs.map +1 -0
- package/dist/chunks/{BidiIsolationPlugin-DBXyXpgm.mjs → BidiIsolationPlugin-cOLlL3Y9.mjs} +2 -2
- package/dist/chunks/{BidiIsolationPlugin-DBXyXpgm.mjs.map → BidiIsolationPlugin-cOLlL3Y9.mjs.map} +1 -1
- package/dist/chunks/BlockInsertion-O5pAFKid.mjs +2 -0
- package/dist/chunks/{BlockInsertion-CJusvrDL.mjs.map → BlockInsertion-O5pAFKid.mjs.map} +1 -1
- package/dist/chunks/BlockquotePlugin-D-jRWLQB.mjs +2 -0
- package/dist/chunks/{BlockquotePlugin-Bz2glHwX.mjs.map → BlockquotePlugin-D-jRWLQB.mjs.map} +1 -1
- package/dist/chunks/CaretNavigationPlugin-Clv8dzR5.mjs +2 -0
- package/dist/chunks/CaretNavigationPlugin-Clv8dzR5.mjs.map +1 -0
- package/dist/chunks/CodeBlockPlugin-BandNM3t.mjs +2 -0
- package/dist/chunks/{CodeBlockPlugin-C1hrdbSZ.mjs.map → CodeBlockPlugin-BandNM3t.mjs.map} +1 -1
- package/dist/chunks/ColorGrid-D0vLHsG6.mjs +2 -0
- package/dist/chunks/{ColorGrid-C9RQoEWF.mjs.map → ColorGrid-D0vLHsG6.mjs.map} +1 -1
- package/dist/chunks/ColorPickerPopup-_C5JZhki.mjs +2 -0
- package/dist/chunks/{ColorPickerPopup-DiA68Pzz.mjs.map → ColorPickerPopup-_C5JZhki.mjs.map} +1 -1
- package/dist/chunks/ColorValidation-B9d_umnf.mjs +2 -0
- package/dist/chunks/{ColorValidation-DAijTjG9.mjs.map → ColorValidation-B9d_umnf.mjs.map} +1 -1
- package/dist/chunks/Commands-D-0UXYvo.mjs +2 -0
- package/dist/chunks/Commands-D-0UXYvo.mjs.map +1 -0
- package/dist/chunks/ContentModel-Bzmzeqwg.mjs +2 -0
- package/dist/chunks/{ContentModel-NpAj7vGW.mjs.map → ContentModel-Bzmzeqwg.mjs.map} +1 -1
- package/dist/chunks/CursorMarks-dx51OGBf.mjs +2 -0
- package/dist/chunks/CursorMarks-dx51OGBf.mjs.map +1 -0
- package/dist/chunks/Decoration-BwhoA4MU.mjs +3 -0
- package/dist/chunks/Decoration-BwhoA4MU.mjs.map +1 -0
- package/dist/chunks/{DirectionDetection-CDVSEWQ6.mjs → DirectionDetection-ZrkMhyaL.mjs} +2 -2
- package/dist/chunks/{DirectionDetection-CDVSEWQ6.mjs.map → DirectionDetection-ZrkMhyaL.mjs.map} +1 -1
- package/dist/chunks/Document-D_2cIBJG.mjs +2 -0
- package/dist/chunks/Document-D_2cIBJG.mjs.map +1 -0
- package/dist/chunks/DocumentParser-i-CreJ48.mjs +2 -0
- package/dist/chunks/DocumentParser-i-CreJ48.mjs.map +1 -0
- package/dist/chunks/{FontPlugin-By-TGrQo.mjs → FontPlugin-B4Ouhmpe.mjs} +2 -2
- package/dist/chunks/{FontPlugin-By-TGrQo.mjs.map → FontPlugin-B4Ouhmpe.mjs.map} +1 -1
- package/dist/chunks/FontSizePlugin-CZB-AwZQ.mjs +2 -0
- package/dist/chunks/{FontSizePlugin-Dln-tYXV.mjs.map → FontSizePlugin-CZB-AwZQ.mjs.map} +1 -1
- package/dist/chunks/FormulaPlugin-C7N3QXDx.mjs +2 -0
- package/dist/chunks/FormulaPlugin-C7N3QXDx.mjs.map +1 -0
- package/dist/chunks/GapCursorPlugin-NozsEK9J.mjs +2 -0
- package/dist/chunks/GapCursorPlugin-NozsEK9J.mjs.map +1 -0
- package/dist/chunks/HTMLSanitization-Ce9dVT1q.mjs +2 -0
- package/dist/chunks/HTMLSanitization-Ce9dVT1q.mjs.map +1 -0
- package/dist/chunks/HTMLUtils-B0nGyFLb.mjs +2 -0
- package/dist/chunks/{HTMLUtils-Bhg3_P8B.mjs.map → HTMLUtils-B0nGyFLb.mjs.map} +1 -1
- package/dist/chunks/HardBreakPlugin-CC4rntSX.mjs +2 -0
- package/dist/chunks/{HardBreakPlugin-DlbSlrdq.mjs.map → HardBreakPlugin-CC4rntSX.mjs.map} +1 -1
- package/dist/chunks/HeadingPlugin-hubN_Ebt.mjs +2 -0
- package/dist/chunks/{HeadingPlugin-uMAjPOk5.mjs.map → HeadingPlugin-hubN_Ebt.mjs.map} +1 -1
- package/dist/chunks/{HighlightPlugin-Bj7FPkIQ.mjs → HighlightPlugin-CE_MgFNz.mjs} +2 -2
- package/dist/chunks/{HighlightPlugin-Bj7FPkIQ.mjs.map → HighlightPlugin-CE_MgFNz.mjs.map} +1 -1
- package/dist/chunks/{HorizontalRulePlugin-DUVmTQpX.mjs → HorizontalRulePlugin-CxmUMM34.mjs} +2 -2
- package/dist/chunks/{HorizontalRulePlugin-DUVmTQpX.mjs.map → HorizontalRulePlugin-CxmUMM34.mjs.map} +1 -1
- package/dist/chunks/{ImagePlugin-FToCOjd5.mjs → ImagePlugin-B_y4STEr.mjs} +2 -2
- package/dist/chunks/{ImagePlugin-FToCOjd5.mjs.map → ImagePlugin-B_y4STEr.mjs.map} +1 -1
- package/dist/chunks/InlineCodePlugin-C1SqGfv5.mjs +2 -0
- package/dist/chunks/{InlineCodePlugin-pISIoGQE.mjs.map → InlineCodePlugin-C1SqGfv5.mjs.map} +1 -1
- package/dist/chunks/{InlineStyleMarkSpec-CjSRj4f_.mjs → InlineStyleMarkSpec-Cx3goc3W.mjs} +2 -2
- package/dist/chunks/{InlineStyleMarkSpec-CjSRj4f_.mjs.map → InlineStyleMarkSpec-Cx3goc3W.mjs.map} +1 -1
- package/dist/chunks/{LinkPlugin-Ct5Z180S.mjs → LinkPlugin-BwXDGHPe.mjs} +2 -2
- package/dist/chunks/{LinkPlugin-Ct5Z180S.mjs.map → LinkPlugin-BwXDGHPe.mjs.map} +1 -1
- package/dist/chunks/ListPlugin-DSFPSWQC.mjs +2 -0
- package/dist/chunks/ListPlugin-DSFPSWQC.mjs.map +1 -0
- package/dist/chunks/MarkCommands-CJvLGL5G.mjs +2 -0
- package/dist/chunks/MarkCommands-CJvLGL5G.mjs.map +1 -0
- package/dist/chunks/{MarkInputRule-Bdi8KPus.mjs → MarkInputRule-DNneF2gp.mjs} +2 -2
- package/dist/chunks/{MarkInputRule-Bdi8KPus.mjs.map → MarkInputRule-DNneF2gp.mjs.map} +1 -1
- package/dist/chunks/MarkdownHTMLRegistry-CISsC0lH.mjs +2 -0
- package/dist/chunks/{MarkdownHTMLRegistry-CKEx7LkR.mjs.map → MarkdownHTMLRegistry-CISsC0lH.mjs.map} +1 -1
- package/dist/chunks/MarkdownParser-D1d9zB0R.mjs +2 -0
- package/dist/chunks/{MarkdownParser-CWt3M6jR.mjs.map → MarkdownParser-D1d9zB0R.mjs.map} +1 -1
- package/dist/chunks/MarkdownSerializer-Oex2RzNw.mjs +2 -0
- package/dist/chunks/{MarkdownSerializer-J-i28out.mjs.map → MarkdownSerializer-Oex2RzNw.mjs.map} +1 -1
- package/dist/chunks/MathFont-BS8IwYh2.mjs +2 -0
- package/dist/chunks/MathFont-BS8IwYh2.mjs.map +1 -0
- package/dist/chunks/{NodeResolver-Dleih-8R.mjs → NodeResolver-BtIknXqD.mjs} +2 -2
- package/dist/chunks/{NodeResolver-Dleih-8R.mjs.map → NodeResolver-BtIknXqD.mjs.map} +1 -1
- package/dist/chunks/NodeSelectionCommands-DK3iEh18.mjs +2 -0
- package/dist/chunks/{NodeSelectionCommands-1PjwUDTJ.mjs.map → NodeSelectionCommands-DK3iEh18.mjs.map} +1 -1
- package/dist/chunks/NodeSpecPatching-BrjPAbqe.mjs +2 -0
- package/dist/chunks/NodeSpecPatching-BrjPAbqe.mjs.map +1 -0
- package/dist/chunks/PluginHelpers-WG1Lzzh3.mjs +2 -0
- package/dist/chunks/{PluginHelpers-Dx_0hfDe.mjs.map → PluginHelpers-WG1Lzzh3.mjs.map} +1 -1
- package/dist/chunks/PopupKeyboardPatterns-BcwdDxRq.mjs +2 -0
- package/dist/chunks/{PopupKeyboardPatterns-tUrT9TyV.mjs.map → PopupKeyboardPatterns-BcwdDxRq.mjs.map} +1 -1
- package/dist/chunks/PopupManager-Jz5JrUdC.mjs +2 -0
- package/dist/chunks/{PopupManager-CT-fMZJn.mjs.map → PopupManager-Jz5JrUdC.mjs.map} +1 -1
- package/dist/chunks/{PopupPositioning-BFh6Ed1D.mjs → PopupPositioning-CIqgpqlW.mjs} +2 -2
- package/dist/chunks/{PopupPositioning-BFh6Ed1D.mjs.map → PopupPositioning-CIqgpqlW.mjs.map} +1 -1
- package/dist/chunks/PrintPlugin-1m54b2-Y.mjs +2 -0
- package/dist/chunks/PrintPlugin-1m54b2-Y.mjs.map +1 -0
- package/dist/chunks/{RangeIterator-DP7Ud3Gp.mjs → RangeIterator-DDOxTQIf.mjs} +2 -2
- package/dist/chunks/{RangeIterator-DP7Ud3Gp.mjs.map → RangeIterator-DDOxTQIf.mjs.map} +1 -1
- package/dist/chunks/SchemaRegistry-acc6q_5x.mjs +2 -0
- package/dist/chunks/SchemaRegistry-acc6q_5x.mjs.map +1 -0
- package/dist/chunks/Selection-DC6AOGgF.mjs +2 -0
- package/dist/chunks/Selection-DC6AOGgF.mjs.map +1 -0
- package/dist/chunks/{SelectionSync-BSHIw1EE.mjs → SelectionSync-CcvoRrNd.mjs} +2 -2
- package/dist/chunks/{SelectionSync-BSHIw1EE.mjs.map → SelectionSync-CcvoRrNd.mjs.map} +1 -1
- package/dist/chunks/SelectionTransactions-DNCzsl_b.mjs +2 -0
- package/dist/chunks/SelectionTransactions-DNCzsl_b.mjs.map +1 -0
- package/dist/chunks/SimpleMark-CTDtEIMV.mjs +2 -0
- package/dist/chunks/{SimpleMark-7CQcA4RK.mjs.map → SimpleMark-CTDtEIMV.mjs.map} +1 -1
- package/dist/chunks/SmartPastePlugin-CjExbE9Q.mjs +2 -0
- package/dist/chunks/SmartPastePlugin-CjExbE9Q.mjs.map +1 -0
- package/dist/chunks/StarterFonts-BDQPg-cu.mjs +2 -0
- package/dist/chunks/StarterFonts-BDQPg-cu.mjs.map +1 -0
- package/dist/chunks/{StrikethroughPlugin-C2oWvGc3.mjs → StrikethroughPlugin-d-EW2YYx.mjs} +2 -2
- package/dist/chunks/{StrikethroughPlugin-C2oWvGc3.mjs.map → StrikethroughPlugin-d-EW2YYx.mjs.map} +1 -1
- package/dist/chunks/StyleRuntime-C0RSqKzG.mjs +2 -0
- package/dist/chunks/{StyleRuntime-DW6omotc.mjs.map → StyleRuntime-C0RSqKzG.mjs.map} +1 -1
- package/dist/chunks/SuperSubPlugin-C-kvFQyx.mjs +2 -0
- package/dist/chunks/{SuperSubPlugin-D1xaKrSu.mjs.map → SuperSubPlugin-C-kvFQyx.mjs.map} +1 -1
- package/dist/chunks/TableDimensions-BcARMxQB.mjs +2 -0
- package/dist/chunks/TableDimensions-BcARMxQB.mjs.map +1 -0
- package/dist/chunks/TablePlugin-B894cIXW.mjs +2 -0
- package/dist/chunks/{TablePlugin-PJe3zwr-.mjs.map → TablePlugin-B894cIXW.mjs.map} +1 -1
- package/dist/chunks/{TextColorPlugin-CTd9tfeG.mjs → TextColorPlugin-B6YoN9mR.mjs} +2 -2
- package/dist/chunks/{TextColorPlugin-CTd9tfeG.mjs.map → TextColorPlugin-B6YoN9mR.mjs.map} +1 -1
- package/dist/chunks/TextDirectionAutoPlugin-LVDkKdDX.mjs +2 -0
- package/dist/chunks/{TextDirectionAutoPlugin-CPnKVVuI.mjs.map → TextDirectionAutoPlugin-LVDkKdDX.mjs.map} +1 -1
- package/dist/chunks/TextDirectionPlugin-CtGwof7i.mjs +2 -0
- package/dist/chunks/TextDirectionPlugin-CtGwof7i.mjs.map +1 -0
- package/dist/chunks/TextDirectionService-OFOU6r_s.mjs +2 -0
- package/dist/chunks/{TextDirectionService-BcX07mw2.mjs.map → TextDirectionService-OFOU6r_s.mjs.map} +1 -1
- package/dist/chunks/TextFormattingPlugin-DlS0SeW7.mjs +2 -0
- package/dist/chunks/{TextFormattingPlugin-DBVlePqj.mjs.map → TextFormattingPlugin-DlS0SeW7.mjs.map} +1 -1
- package/dist/chunks/ThemeEngine-D4W6Y80e.mjs +3 -0
- package/dist/chunks/ThemeEngine-D4W6Y80e.mjs.map +1 -0
- package/dist/chunks/ToolbarPlugin-ClKY-LiT.mjs +2 -0
- package/dist/chunks/{ToolbarPlugin-DtfGTO_V.mjs.map → ToolbarPlugin-ClKY-LiT.mjs.map} +1 -1
- package/dist/chunks/VideoPlugin-C9z4JfP_.mjs +2 -0
- package/dist/chunks/VideoPlugin-C9z4JfP_.mjs.map +1 -0
- package/dist/chunks/XmlSupport-3Za6SIqF.mjs +2 -0
- package/dist/chunks/XmlSupport-3Za6SIqF.mjs.map +1 -0
- package/dist/chunks/full-CNi2CaF3.mjs +2 -0
- package/dist/chunks/{full-DSWM4cKQ.mjs.map → full-CNi2CaF3.mjs.map} +1 -1
- package/dist/chunks/minimal-Bykbo9So.mjs +2 -0
- package/dist/chunks/{minimal-CFkkPXef.mjs.map → minimal-Bykbo9So.mjs.map} +1 -1
- package/dist/chunks/register-CF80zDgl.mjs +3 -0
- package/dist/chunks/register-CF80zDgl.mjs.map +1 -0
- package/dist/chunks/src-5GKFQ2mQ.mjs +2 -0
- package/dist/chunks/src-5GKFQ2mQ.mjs.map +1 -0
- package/dist/chunks/xml-BsV44TrJ.mjs +2 -0
- package/dist/chunks/xml-BsV44TrJ.mjs.map +1 -0
- package/dist/decorations/Decoration.d.ts +9 -0
- package/dist/decorations/Decoration.d.ts.map +1 -1
- package/dist/editor/ContentSerializer.d.ts +2 -7
- package/dist/editor/ContentSerializer.d.ts.map +1 -1
- package/dist/editor/EditorEventEmitter.d.ts +10 -2
- package/dist/editor/EditorEventEmitter.d.ts.map +1 -1
- package/dist/editor/EditorInitializer.d.ts +2 -4
- package/dist/editor/EditorInitializer.d.ts.map +1 -1
- package/dist/editor/EditorLifecycleCoordinator.d.ts +16 -1
- package/dist/editor/EditorLifecycleCoordinator.d.ts.map +1 -1
- package/dist/editor/EditorStyleCoordinator.d.ts +11 -3
- package/dist/editor/EditorStyleCoordinator.d.ts.map +1 -1
- package/dist/editor/NotectlEditor.d.ts +15 -3
- package/dist/editor/NotectlEditor.d.ts.map +1 -1
- package/dist/fonts/math.d.ts +3 -0
- package/dist/fonts/math.d.ts.map +1 -0
- package/dist/fonts/math.mjs +1 -0
- package/dist/fonts/starter.d.ts +3 -0
- package/dist/fonts/starter.d.ts.map +1 -0
- package/dist/fonts/starter.mjs +1 -0
- package/dist/fonts.d.ts +4 -4
- package/dist/fonts.mjs +1 -1
- package/dist/full.d.ts +1 -1
- package/dist/full.mjs +1 -1
- package/dist/html.mjs +1 -1
- package/dist/index.d.ts +5 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/input/InputHandler.d.ts +4 -0
- package/dist/input/InputHandler.d.ts.map +1 -1
- package/dist/input/InputManager.d.ts +5 -0
- package/dist/input/InputManager.d.ts.map +1 -1
- package/dist/input/KeyboardHandler.d.ts +4 -0
- package/dist/input/KeyboardHandler.d.ts.map +1 -1
- package/dist/input/PasteHTMLHandler.d.ts +7 -4
- package/dist/input/PasteHTMLHandler.d.ts.map +1 -1
- package/dist/input/PasteHandler.d.ts +33 -6
- package/dist/input/PasteHandler.d.ts.map +1 -1
- package/dist/input/PasteRichBlockHandler.d.ts +3 -2
- package/dist/input/PasteRichBlockHandler.d.ts.map +1 -1
- package/dist/markdown.mjs +1 -1
- package/dist/model/Document.d.ts +42 -0
- package/dist/model/Document.d.ts.map +1 -1
- package/dist/model/DocumentNormalization.d.ts +10 -0
- package/dist/model/DocumentNormalization.d.ts.map +1 -0
- package/dist/model/FileHandlerDispatcher.d.ts +27 -0
- package/dist/model/FileHandlerDispatcher.d.ts.map +1 -0
- package/dist/model/FileHandlerRegistry.d.ts +6 -1
- package/dist/model/FileHandlerRegistry.d.ts.map +1 -1
- package/dist/model/InputRuleRegistry.d.ts +9 -1
- package/dist/model/InputRuleRegistry.d.ts.map +1 -1
- package/dist/model/KeymapRegistry.d.ts +14 -1
- package/dist/model/KeymapRegistry.d.ts.map +1 -1
- package/dist/model/MarkdownSyntaxRegistry.d.ts +2 -0
- package/dist/model/MarkdownSyntaxRegistry.d.ts.map +1 -1
- package/dist/model/PluginCallbackExecutor.d.ts +44 -0
- package/dist/model/PluginCallbackExecutor.d.ts.map +1 -0
- package/dist/model/SanitizeConfig.d.ts +8 -0
- package/dist/model/SanitizeConfig.d.ts.map +1 -1
- package/dist/model/SchemaRegistry.d.ts +24 -0
- package/dist/model/SchemaRegistry.d.ts.map +1 -1
- package/dist/model/Selection.d.ts +4 -0
- package/dist/model/Selection.d.ts.map +1 -1
- package/dist/notectl-core.mjs +1 -1
- package/dist/notectl-core.umd.js +1 -1
- package/dist/notectl-core.umd.js.map +1 -1
- package/dist/plugins/Plugin.d.ts +3 -1
- package/dist/plugins/Plugin.d.ts.map +1 -1
- package/dist/plugins/PluginContextFactory.d.ts +9 -2
- package/dist/plugins/PluginContextFactory.d.ts.map +1 -1
- package/dist/plugins/PluginLifecycle.d.ts +6 -0
- package/dist/plugins/PluginLifecycle.d.ts.map +1 -1
- package/dist/plugins/PluginManager.d.ts +9 -2
- package/dist/plugins/PluginManager.d.ts.map +1 -1
- package/dist/plugins/RegistrationTracker.d.ts +2 -0
- package/dist/plugins/RegistrationTracker.d.ts.map +1 -1
- package/dist/plugins/alignment.mjs +1 -1
- package/dist/plugins/bidi-isolation.mjs +1 -1
- package/dist/plugins/blockquote.mjs +1 -1
- package/dist/plugins/caret-navigation.mjs +1 -1
- package/dist/plugins/code-block/CodeBlockHighlighting.d.ts.map +1 -1
- package/dist/plugins/code-block/CodeBlockSchema.d.ts +6 -2
- package/dist/plugins/code-block/CodeBlockSchema.d.ts.map +1 -1
- package/dist/plugins/code-block.mjs +1 -1
- package/dist/plugins/font-size.mjs +1 -1
- package/dist/plugins/font.mjs +1 -1
- package/dist/plugins/formula/FormulaPasteInterceptor.d.ts.map +1 -1
- package/dist/plugins/formula/FormulaTypes.d.ts +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.mjs +1 -1
- package/dist/plugins/highlight.mjs +1 -1
- package/dist/plugins/horizontal-rule.mjs +1 -1
- package/dist/plugins/image.mjs +1 -1
- package/dist/plugins/inline-code.mjs +1 -1
- package/dist/plugins/language.mjs +1 -1
- package/dist/plugins/link.mjs +1 -1
- package/dist/plugins/list/ListCommands.d.ts.map +1 -1
- package/dist/plugins/list/ListPlugin.d.ts +9 -0
- package/dist/plugins/list/ListPlugin.d.ts.map +1 -1
- package/dist/plugins/list.mjs +1 -1
- package/dist/plugins/print.mjs +1 -1
- package/dist/plugins/shared/NodeSpecPatching.d.ts +2 -2
- package/dist/plugins/shared/NodeSpecPatching.d.ts.map +1 -1
- package/dist/plugins/shared.mjs +1 -1
- package/dist/plugins/smart-paste/SmartPastePlugin.d.ts.map +1 -1
- package/dist/plugins/smart-paste.mjs +1 -1
- package/dist/plugins/strikethrough.mjs +1 -1
- package/dist/plugins/super-sub.mjs +1 -1
- package/dist/plugins/table.mjs +1 -1
- package/dist/plugins/text-color.mjs +1 -1
- package/dist/plugins/text-direction-auto.mjs +1 -1
- package/dist/plugins/text-direction.mjs +1 -1
- package/dist/plugins/text-formatting.mjs +1 -1
- package/dist/plugins/toolbar.mjs +1 -1
- package/dist/plugins/video/VideoNodeSpec.d.ts.map +1 -1
- package/dist/plugins/video/VideoPlugin.d.ts.map +1 -1
- package/dist/plugins/video/VideoProviders.d.ts +3 -3
- package/dist/plugins/video/VideoSanitizeHook.d.ts +4 -20
- package/dist/plugins/video/VideoSanitizeHook.d.ts.map +1 -1
- package/dist/plugins/video.mjs +1 -1
- package/dist/presets/full.d.ts +1 -1
- package/dist/presets/full.mjs +1 -1
- package/dist/presets/minimal.d.ts +1 -1
- package/dist/presets/minimal.mjs +1 -1
- package/dist/presets.d.ts +1 -1
- package/dist/presets.mjs +1 -1
- package/dist/register.d.ts +3 -0
- package/dist/register.d.ts.map +1 -0
- package/dist/register.mjs +1 -0
- package/dist/serialization/DocumentParser.d.ts.map +1 -1
- package/dist/serialization/DocumentSerializer.d.ts.map +1 -1
- package/dist/serialization/HTMLSanitization.d.ts +12 -0
- package/dist/serialization/HTMLSanitization.d.ts.map +1 -1
- package/dist/state/EditorState.d.ts.map +1 -1
- package/dist/state/History.d.ts.map +1 -1
- package/dist/state/Mapping.d.ts +2 -0
- package/dist/state/Mapping.d.ts.map +1 -1
- package/dist/state/StepHandlers.d.ts.map +1 -1
- package/dist/state/TransactionBuilder.d.ts +2 -0
- package/dist/state/TransactionBuilder.d.ts.map +1 -1
- package/dist/state/TransactionFinalizer.d.ts +10 -0
- package/dist/state/TransactionFinalizer.d.ts.map +1 -0
- package/dist/state/TransactionSnapshot.d.ts +32 -0
- package/dist/state/TransactionSnapshot.d.ts.map +1 -0
- package/dist/test/TestUtils.d.ts.map +1 -1
- package/dist/view/BlockRendering.d.ts +13 -2
- package/dist/view/BlockRendering.d.ts.map +1 -1
- package/dist/view/DecorationRendering.d.ts +19 -8
- package/dist/view/DecorationRendering.d.ts.map +1 -1
- package/dist/view/EditorView.d.ts +4 -0
- package/dist/view/EditorView.d.ts.map +1 -1
- package/dist/view/EditorViewEvents.d.ts +8 -0
- package/dist/view/EditorViewEvents.d.ts.map +1 -1
- package/dist/view/NodeViewCallbackBoundary.d.ts +12 -0
- package/dist/view/NodeViewCallbackBoundary.d.ts.map +1 -0
- package/dist/view/NodeViewOwnership.d.ts +12 -0
- package/dist/view/NodeViewOwnership.d.ts.map +1 -0
- package/dist/view/NodeViewRegistry.d.ts +7 -1
- package/dist/view/NodeViewRegistry.d.ts.map +1 -1
- package/dist/view/Reconciler.d.ts +6 -0
- package/dist/view/Reconciler.d.ts.map +1 -1
- package/package.json +29 -228
- package/dist/chunks/AlignmentPlugin--xAFlRqE.mjs +0 -2
- package/dist/chunks/AlignmentPlugin--xAFlRqE.mjs.map +0 -1
- package/dist/chunks/AttributedMarkCommands-bagbH8Qt.mjs +0 -2
- package/dist/chunks/AttributedMarkCommands-bagbH8Qt.mjs.map +0 -1
- package/dist/chunks/BlockInsertion-CJusvrDL.mjs +0 -2
- package/dist/chunks/BlockquotePlugin-Bz2glHwX.mjs +0 -2
- package/dist/chunks/CaretNavigationPlugin-CNsT0eb4.mjs +0 -2
- package/dist/chunks/CaretNavigationPlugin-CNsT0eb4.mjs.map +0 -1
- package/dist/chunks/CodeBlockPlugin-C1hrdbSZ.mjs +0 -2
- package/dist/chunks/ColorGrid-C9RQoEWF.mjs +0 -2
- package/dist/chunks/ColorPickerPopup-DiA68Pzz.mjs +0 -2
- package/dist/chunks/ColorValidation-DAijTjG9.mjs +0 -2
- package/dist/chunks/Commands-1dFFldi7.mjs +0 -2
- package/dist/chunks/Commands-1dFFldi7.mjs.map +0 -1
- package/dist/chunks/ContentModel-NpAj7vGW.mjs +0 -2
- package/dist/chunks/Decoration-BpoEOANl.mjs +0 -2
- package/dist/chunks/Decoration-BpoEOANl.mjs.map +0 -1
- package/dist/chunks/Document-827l3P80.mjs +0 -2
- package/dist/chunks/Document-827l3P80.mjs.map +0 -1
- package/dist/chunks/DocumentParser-D2tr3ZKn.mjs +0 -2
- package/dist/chunks/DocumentParser-D2tr3ZKn.mjs.map +0 -1
- package/dist/chunks/FontSizePlugin-Dln-tYXV.mjs +0 -2
- package/dist/chunks/FormulaPlugin-By1befrR.mjs +0 -2
- package/dist/chunks/FormulaPlugin-By1befrR.mjs.map +0 -1
- package/dist/chunks/GapCursorNavigation-BuXngVu-.mjs +0 -2
- package/dist/chunks/GapCursorNavigation-BuXngVu-.mjs.map +0 -1
- package/dist/chunks/GapCursorPlugin-DAxVzXRs.mjs +0 -2
- package/dist/chunks/GapCursorPlugin-DAxVzXRs.mjs.map +0 -1
- package/dist/chunks/HTMLUtils-Bhg3_P8B.mjs +0 -2
- package/dist/chunks/HardBreakPlugin-DlbSlrdq.mjs +0 -2
- package/dist/chunks/HeadingPlugin-uMAjPOk5.mjs +0 -2
- package/dist/chunks/InlineCodePlugin-pISIoGQE.mjs +0 -2
- package/dist/chunks/ListPlugin-DAY5ezNs.mjs +0 -2
- package/dist/chunks/ListPlugin-DAY5ezNs.mjs.map +0 -1
- package/dist/chunks/MarkdownHTMLRegistry-CKEx7LkR.mjs +0 -2
- package/dist/chunks/MarkdownParser-CWt3M6jR.mjs +0 -2
- package/dist/chunks/MarkdownSerializer-J-i28out.mjs +0 -2
- package/dist/chunks/NodeSelectionCommands-1PjwUDTJ.mjs +0 -2
- package/dist/chunks/NodeSpecPatching-B_yLknTl.mjs +0 -2
- package/dist/chunks/NodeSpecPatching-B_yLknTl.mjs.map +0 -1
- package/dist/chunks/PluginHelpers-Dx_0hfDe.mjs +0 -2
- package/dist/chunks/PopupKeyboardPatterns-tUrT9TyV.mjs +0 -2
- package/dist/chunks/PopupManager-CT-fMZJn.mjs +0 -2
- package/dist/chunks/PrintPlugin-7zz9mhhU.mjs +0 -2
- package/dist/chunks/PrintPlugin-7zz9mhhU.mjs.map +0 -1
- package/dist/chunks/PrintTypes-CxU69qu3.mjs +0 -3
- package/dist/chunks/PrintTypes-CxU69qu3.mjs.map +0 -1
- package/dist/chunks/SchemaRegistry-CkBN-1yW.mjs +0 -2
- package/dist/chunks/SchemaRegistry-CkBN-1yW.mjs.map +0 -1
- package/dist/chunks/Selection-HYoVFpAx.mjs +0 -2
- package/dist/chunks/Selection-HYoVFpAx.mjs.map +0 -1
- package/dist/chunks/SimpleMark-7CQcA4RK.mjs +0 -2
- package/dist/chunks/SmartPastePlugin-CYa_nD9v.mjs +0 -2
- package/dist/chunks/SmartPastePlugin-CYa_nD9v.mjs.map +0 -1
- package/dist/chunks/StyleRuntime-DW6omotc.mjs +0 -2
- package/dist/chunks/SuperSubPlugin-D1xaKrSu.mjs +0 -2
- package/dist/chunks/TableDimensions-BBhjHNjQ.mjs +0 -2
- package/dist/chunks/TableDimensions-BBhjHNjQ.mjs.map +0 -1
- package/dist/chunks/TablePlugin-PJe3zwr-.mjs +0 -2
- package/dist/chunks/TextDirectionAutoPlugin-CPnKVVuI.mjs +0 -2
- package/dist/chunks/TextDirectionPlugin-Bns_03vL.mjs +0 -2
- package/dist/chunks/TextDirectionPlugin-Bns_03vL.mjs.map +0 -1
- package/dist/chunks/TextDirectionService-BcX07mw2.mjs +0 -2
- package/dist/chunks/TextFormattingPlugin-DBVlePqj.mjs +0 -2
- package/dist/chunks/ToolbarPlugin-DtfGTO_V.mjs +0 -2
- package/dist/chunks/VideoPlugin-BrR8g6Rz.mjs +0 -2
- package/dist/chunks/VideoPlugin-BrR8g6Rz.mjs.map +0 -1
- package/dist/chunks/WordBoundary-CFpIJDNP.mjs +0 -2
- package/dist/chunks/WordBoundary-CFpIJDNP.mjs.map +0 -1
- package/dist/chunks/XmlDetector-D7TQpw-e.mjs +0 -2
- package/dist/chunks/XmlDetector-D7TQpw-e.mjs.map +0 -1
- package/dist/chunks/XmlSupport-BYiRwlkK.mjs +0 -2
- package/dist/chunks/XmlSupport-BYiRwlkK.mjs.map +0 -1
- package/dist/chunks/fonts-DQC6Uj4r.mjs +0 -2
- package/dist/chunks/fonts-DQC6Uj4r.mjs.map +0 -1
- package/dist/chunks/full-DSWM4cKQ.mjs +0 -2
- package/dist/chunks/minimal-CFkkPXef.mjs +0 -2
- package/dist/chunks/src-DiAOfuOT.mjs +0 -2
- package/dist/chunks/src-DiAOfuOT.mjs.map +0 -1
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
var e={EN:"en",DE:"de",ES:"es",FR:"fr",ZH:"zh",RU:"ru",AR:"ar",HI:"hi",PT:"pt",BROWSER:"browser"};function t(e,t){const n=t?.document??globalThis.document,o=t?.container??n.head;if(t?.id){const o=n.getElementById(t.id);if(o instanceof HTMLStyleElement)return o.textContent=e,t.nonce&&o.setAttribute("nonce",t.nonce),o}const a=n.createElement("style");return a.textContent=e,t?.id&&(a.id=t.id),t?.nonce&&a.setAttribute("nonce",t.nonce),o.appendChild(a),a}function n(e,t){const n=(t??globalThis.document).getElementById(e);n&&n.remove()}var o=/* @__PURE__ */new WeakSet;function a(e,t){const n=t?.target??globalThis.document,a=new CSSStyleSheet;return a.replaceSync(e),o.add(a),t?.replace&&(n.adoptedStyleSheets=n.adoptedStyleSheets.filter(e=>!o.has(e))),n.adoptedStyleSheets=[...n.adoptedStyleSheets,a],a}function d(e,t){const n=t??globalThis.document;n.adoptedStyleSheets=n.adoptedStyleSheets.filter(t=>t!==e)}export{e as a,n as i,t as n,d as r,a as t};
|
|
2
|
+
//# sourceMappingURL=src-5GKFQ2mQ.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"src-5GKFQ2mQ.mjs","names":[],"sources":["../../src/i18n/Locale.ts","../../src/editor/ContentStyleInjector.ts"],"sourcesContent":["/**\n * Supported locale identifiers for the notectl editor.\n * Use `Locale.BROWSER` to auto-detect from navigator.language.\n */\nexport const Locale = {\n\tEN: 'en',\n\tDE: 'de',\n\tES: 'es',\n\tFR: 'fr',\n\tZH: 'zh',\n\tRU: 'ru',\n\tAR: 'ar',\n\tHI: 'hi',\n\tPT: 'pt',\n\tBROWSER: 'browser',\n} as const;\n\nexport type Locale = (typeof Locale)[keyof typeof Locale];\n","/**\n * ContentStyleInjector: CSP-compliant utilities for injecting collected CSS\n * into the document. Supports nonce-based `<style>` elements and adoptedStyleSheets.\n */\n\n/** Options for {@link injectContentStyles}. */\nexport interface InjectStylesOptions {\n\t/** Nonce value for CSP compliance. Added as `nonce` attribute on the `<style>` element. */\n\treadonly nonce?: string;\n\t/** Target document. Defaults to `globalThis.document`. */\n\treadonly document?: Document;\n\t/** Container element to append the `<style>` to. Defaults to `document.head`. */\n\treadonly container?: HTMLElement;\n\t/**\n\t * Unique ID for the `<style>` element. When provided and an element with this ID\n\t * already exists, its content is replaced (avoiding duplicates on re-renders).\n\t */\n\treadonly id?: string;\n}\n\n/**\n * Injects CSS into the document via a `<style>` element.\n * Returns the created/updated element for manual cleanup.\n *\n * @example\n * ```ts\n * const result = editor.getContentHTML({ cssMode: 'classes' });\n * const style = injectContentStyles(result.css, { nonce: 'abc123' });\n * // Later: removeContentStyles('notectl-content', document);\n * ```\n */\nexport function injectContentStyles(css: string, options?: InjectStylesOptions): HTMLStyleElement {\n\tconst doc: Document = options?.document ?? globalThis.document;\n\tconst container: HTMLElement = options?.container ?? doc.head;\n\n\t// Reuse existing element if ID matches\n\tif (options?.id) {\n\t\tconst existing: HTMLElement | null = doc.getElementById(options.id);\n\t\tif (existing instanceof HTMLStyleElement) {\n\t\t\texisting.textContent = css;\n\t\t\tif (options.nonce) {\n\t\t\t\texisting.setAttribute('nonce', options.nonce);\n\t\t\t}\n\t\t\treturn existing;\n\t\t}\n\t}\n\n\tconst style: HTMLStyleElement = doc.createElement('style');\n\tstyle.textContent = css;\n\n\tif (options?.id) {\n\t\tstyle.id = options.id;\n\t}\n\tif (options?.nonce) {\n\t\tstyle.setAttribute('nonce', options.nonce);\n\t}\n\n\tcontainer.appendChild(style);\n\treturn style;\n}\n\n/**\n * Removes a previously injected `<style>` element by its ID.\n *\n * @param id - The ID of the `<style>` element to remove.\n * @param doc - Target document. Defaults to `globalThis.document`.\n */\nexport function removeContentStyles(id: string, doc?: Document): void {\n\tconst target: Document = doc ?? globalThis.document;\n\tconst element: HTMLElement | null = target.getElementById(id);\n\tif (element) {\n\t\telement.remove();\n\t}\n}\n\n/** Options for {@link adoptContentStyles}. */\nexport interface AdoptStylesOptions {\n\t/** Target document or ShadowRoot. Defaults to `globalThis.document`. */\n\treadonly target?: Document | ShadowRoot;\n\t/**\n\t * When true, replaces any previously adopted notectl sheet on the same target.\n\t * When false (default), appends a new sheet.\n\t */\n\treadonly replace?: boolean;\n}\n\n/** WeakSet tracking sheets created by {@link adoptContentStyles}. */\nconst notectlSheets: WeakSet<CSSStyleSheet> = new WeakSet();\n\n/**\n * Injects CSS via `adoptedStyleSheets` — no DOM element, no nonce needed.\n * Works with both `Document` and `ShadowRoot`, making it ideal for Web Components.\n *\n * Returns the created `CSSStyleSheet` for manual cleanup via {@link removeAdoptedStyles}.\n *\n * @example\n * ```ts\n * const result = editor.getContentHTML({ cssMode: 'classes' });\n * const sheet = adoptContentStyles(result.css);\n * // Later: removeAdoptedStyles(sheet);\n * ```\n */\nexport function adoptContentStyles(css: string, options?: AdoptStylesOptions): CSSStyleSheet {\n\tconst target: Document | ShadowRoot = options?.target ?? globalThis.document;\n\tconst sheet = new CSSStyleSheet();\n\tsheet.replaceSync(css);\n\tnotectlSheets.add(sheet);\n\n\tif (options?.replace) {\n\t\ttarget.adoptedStyleSheets = target.adoptedStyleSheets.filter((s) => !notectlSheets.has(s));\n\t}\n\n\ttarget.adoptedStyleSheets = [...target.adoptedStyleSheets, sheet];\n\treturn sheet;\n}\n\n/**\n * Removes a specific adopted stylesheet from its target.\n *\n * @param sheet - The `CSSStyleSheet` returned by {@link adoptContentStyles}.\n * @param target - Target document or ShadowRoot. Defaults to `globalThis.document`.\n */\nexport function removeAdoptedStyles(sheet: CSSStyleSheet, target?: Document | ShadowRoot): void {\n\tconst root: Document | ShadowRoot = target ?? globalThis.document;\n\troot.adoptedStyleSheets = root.adoptedStyleSheets.filter((s) => s !== sheet);\n}\n"],"mappings":"AAIA,IAAa,EAAS,CACrB,GAAI,KACJ,GAAI,KACJ,GAAI,KACJ,GAAI,KACJ,GAAI,KACJ,GAAI,KACJ,GAAI,KACJ,GAAI,KACJ,GAAI,KACJ,QAAS,WCiBV,SAAgB,EAAoB,EAAa,GAChD,MAAM,EAAgB,GAAS,UAAY,WAAW,SAChD,EAAyB,GAAS,WAAa,EAAI,KAGzD,GAAI,GAAS,GAAI,CAChB,MAAM,EAA+B,EAAI,eAAe,EAAQ,IAChE,GAAI,aAAoB,iBAKvB,OAJA,EAAS,YAAc,EACnB,EAAQ,OACX,EAAS,aAAa,QAAS,EAAQ,OAEjC,CAET,CAEA,MAAM,EAA0B,EAAI,cAAc,SAWlD,OAVA,EAAM,YAAc,EAEhB,GAAS,KACZ,EAAM,GAAK,EAAQ,IAEhB,GAAS,OACZ,EAAM,aAAa,QAAS,EAAQ,OAGrC,EAAU,YAAY,GACf,CACR,CAQA,SAAgB,EAAoB,EAAY,GAE/C,MAAM,GADmB,GAAO,WAAW,UACA,eAAe,GACtD,GACH,EAAQ,QAEV,CAcA,IAAM,iBAAwC,IAAI,QAelD,SAAgB,EAAmB,EAAa,GAC/C,MAAM,EAAgC,GAAS,QAAU,WAAW,SAC9D,EAAQ,IAAI,cASlB,OARA,EAAM,YAAY,GAClB,EAAc,IAAI,GAEd,GAAS,UACZ,EAAO,mBAAqB,EAAO,mBAAmB,OAAQ,IAAO,EAAc,IAAI,KAGxF,EAAO,mBAAqB,IAAI,EAAO,mBAAoB,GACpD,CACR,CAQA,SAAgB,EAAoB,EAAsB,GACzD,MAAM,EAA8B,GAAU,WAAW,SACzD,EAAK,mBAAqB,EAAK,mBAAmB,OAAQ,GAAM,IAAM,EACvE"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{n as t}from"./TypedKeys-CA4bfw9O.mjs";import{n as e}from"./XmlPatterns-RN32-0ob.mjs";var n=new t("languageRegistry");function*a(t,e){let n=0;for(;n<t.length;){let a=!1;for(const r of e.patterns){r.pattern.lastIndex=n;const e=r.pattern.exec(t);if(e&&e.index===n&&e[0].length>0){const t=e[0].length;yield{type:r.type,from:n,to:n+t},n+=t,a=!0;break}}a||n++}}var r={name:"java",aliases:[],patterns:[{type:"comment",pattern:/\/\*[\s\S]*?\*\//y},{type:"comment",pattern:/\/\/[^\n]*/y},{type:"string",pattern:/"""[\s\S]*?"""/y},{type:"string",pattern:/"(?:[^"\\]|\\.)*"/y},{type:"string",pattern:/'(?:[^'\\]|\\.)*'/y},{type:"annotation",pattern:/@[a-zA-Z_]\w*(?:\.[a-zA-Z_]\w*)*/y},{type:"keyword",pattern:new RegExp(`(?:${["abstract","assert","boolean","break","byte","case","catch","char","class","const","continue","default","do","double","else","enum","exports","extends","final","finally","float","for","goto","if","implements","import","instanceof","int","interface","long","module","native","new","non-sealed","open","opens","package","permits","private","protected","provides","public","record","requires","return","sealed","short","static","strictfp","super","switch","synchronized","this","throw","throws","to","transient","transitive","try","uses","var","void","volatile","when","while","with","yield"].join("|")})\\b`,"y")},{type:"boolean",pattern:/(?:true|false)\b/y},{type:"null",pattern:/null\b/y},{type:"number",pattern:/0[xX][\da-fA-F](?:_*[\da-fA-F])*[lL]?/y},{type:"number",pattern:/0[bB][01](?:_*[01])*[lL]?/y},{type:"number",pattern:/\d(?:_*\d)*(?:\.(?:\d(?:_*\d)*)?)?(?:[eE][+-]?\d(?:_*\d)*)?[fFdDlL]?/y},{type:"function",pattern:/[a-zA-Z_]\w*(?=\s*\()/y},{type:"operator",pattern:/(?:>>>=?|>>=?|<<=?|->|::|\+\+|--|&&|\|\||[+\-*/%&|^~!=<>]=?|\?|:)/y},{type:"punctuation",pattern:/[{}[\]();.,]/y}]},p={name:"json",aliases:["jsonc"],patterns:[{type:"property",pattern:/"(?:[^"\\]|\\.)*"(?=\s*:)/y},{type:"string",pattern:/"(?:[^"\\]|\\.)*"/y},{type:"number",pattern:/-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?/y},{type:"boolean",pattern:/(?:true|false)\b/y},{type:"null",pattern:/null\b/y},{type:"punctuation",pattern:/[{}[\]:,]/y}]},y={name:"typescript",aliases:["ts","tsx"],patterns:[{type:"comment",pattern:/\/\*[\s\S]*?\*\//y},{type:"comment",pattern:/\/\/[^\n]*/y},{type:"string",pattern:/`(?:[^`\\$]|\\.|\$(?!\{)|\$\{[^}]*\})*`/y},{type:"string",pattern:/"(?:[^"\\]|\\.)*"/y},{type:"string",pattern:/'(?:[^'\\]|\\.)*'/y},{type:"annotation",pattern:/@[a-zA-Z_$][\w$]*(?:\.[a-zA-Z_$][\w$]*)*/y},{type:"keyword",pattern:new RegExp(`(?:${["abstract","any","as","asserts","async","await","bigint","boolean","break","case","catch","class","const","constructor","continue","debugger","declare","default","delete","do","else","enum","export","extends","finally","for","from","function","get","global","if","implements","import","in","infer","instanceof","interface","is","keyof","let","module","namespace","never","new","number","object","of","out","override","package","private","protected","public","readonly","require","return","satisfies","set","static","string","super","switch","symbol","this","throw","try","type","typeof","unique","unknown","using","var","void","while","with","yield"].join("|")})\\b`,"y")},{type:"boolean",pattern:/(?:true|false)\b/y},{type:"null",pattern:/(?:null|undefined)\b/y},{type:"number",pattern:/0[xX][\da-fA-F](?:_*[\da-fA-F])*n?/y},{type:"number",pattern:/0[bB][01](?:_*[01])*n?/y},{type:"number",pattern:/0[oO][0-7](?:_*[0-7])*n?/y},{type:"number",pattern:/\d(?:_*\d)*(?:\.(?:\d(?:_*\d)*)?)?(?:[eE][+-]?\d(?:_*\d)*)?n?/y},{type:"function",pattern:/[a-zA-Z_$][\w$]*(?=\s*\()/y},{type:"operator",pattern:/(?:>>>=?|>>=?|<<=?|\*\*=?|\?\?=?|\|\|=?|&&=?|===?|!==?|=>|\?\.|\.\.\.|\+\+|--|[+\-*/%&|^~!=<>]=?|\?|:)/y},{type:"punctuation",pattern:/[{}[\]();.,]/y}]},s={name:"xml",aliases:["html","xhtml","svg","xsl"],patterns:[{type:"comment",pattern:/<!--[\s\S]*?-->/y},{type:"keyword",pattern:/<!\[CDATA\[[\s\S]*?\]\]>/y},{type:"keyword",pattern:/<\?[\s\S]*?\?>/y},{type:"tag",pattern:new RegExp(`<\\/${e}`,"y")},{type:"tag",pattern:new RegExp(`<${e}`,"y")},{type:"punctuation",pattern:/\/>|>|=/y},{type:"attribute",pattern:new RegExp(`${e}(?=\\s*=)`,"y")},{type:"string",pattern:/"[^"]*"/y},{type:"string",pattern:/'[^']*'/y}]};export{a,r as i,y as n,n as o,p as r,s as t};
|
|
2
|
+
//# sourceMappingURL=xml-BsV44TrJ.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"xml-BsV44TrJ.mjs","names":[],"sources":["../../src/plugins/language/LanguageTypes.ts","../../src/plugins/code-block/highlighter/TokenIteration.ts","../../src/plugins/code-block/highlighter/languages/java.ts","../../src/plugins/code-block/highlighter/languages/json.ts","../../src/plugins/code-block/highlighter/languages/typescript.ts","../../src/plugins/code-block/highlighter/languages/xml.ts"],"sourcesContent":["/**\n * Unified language support types for programming language registration.\n *\n * Bundles syntax highlighting and paste detection into a single\n * registration unit so that all artifacts for one language live together.\n */\n\nimport { ServiceKey } from '../Plugin.js';\nimport type { LanguageDefinition } from '../code-block/highlighter/TokenizerTypes.js';\nimport type { ContentDetector } from '../smart-paste/SmartPasteTypes.js';\n\n/**\n * Unified language support bundle grouping all artifacts for one\n * programming language: syntax highlighting, paste detection, and\n * (optionally) code formatting.\n *\n * Pass to `LanguageRegistryService.register()` to make a language\n * available across all participating plugins in a single call.\n */\nexport interface LanguageSupport {\n\t/** Canonical lowercase identifier (e.g. `'java'`, `'python'`). */\n\treadonly id: string;\n\n\t/** Human-readable name shown in the language picker (e.g. `'Java'`). */\n\treadonly displayName: string;\n\n\t/** Alternative names accepted as aliases (e.g. `['py', 'py3']`). */\n\treadonly aliases?: readonly string[];\n\n\t/** Syntax highlighting token patterns for the RegexTokenizer. */\n\treadonly highlighting?: LanguageDefinition;\n\n\t/** Smart-paste detector for auto-detecting this language in pasted text. */\n\treadonly detection?: ContentDetector;\n\n\t/**\n\t * Code formatter for reformatting code block content on demand.\n\t * @experimental Not yet consumed by any built-in plugin.\n\t */\n\treadonly formatter?: CodeFormatter;\n}\n\n/**\n * Formatter that can reformat source code.\n * @experimental Reserved for future use.\n */\nexport interface CodeFormatter {\n\tformat(code: string): string | Promise<string>;\n}\n\n/** Service for registering and querying language support bundles. */\nexport interface LanguageRegistryService {\n\t/** Registers a language bundle. Re-registering the same `id` overwrites. */\n\tregister(support: LanguageSupport): void;\n\n\t/**\n\t * Subscribes to language registrations with replay semantics.\n\t * The listener is immediately called for all already-registered\n\t * bundles, then called for each future registration.\n\t */\n\tonRegister(listener: LanguageRegistryListener): void;\n\n\t/** Returns the bundle for the given language id, or `undefined`. */\n\tget(id: string): LanguageSupport | undefined;\n\n\t/** Returns all registered language support bundles. */\n\tgetAll(): readonly LanguageSupport[];\n}\n\n/** Internal listener type for registry change notifications. */\nexport type LanguageRegistryListener = (support: LanguageSupport) => void;\n\nexport const LANGUAGE_REGISTRY_SERVICE_KEY = new ServiceKey<LanguageRegistryService>(\n\t'languageRegistry',\n);\n","/**\n * Shared low-level iteration over tokenized regions of source code.\n *\n * Used by both the `RegexTokenizer` (for syntax highlighting) and the\n * smart-paste `LexerDetector` (for language detection) so both consumers\n * see exactly the same tokenization for a given language definition.\n */\n\nimport type { LanguageDefinition } from './TokenizerTypes.js';\n\n/** A successfully matched token region produced by `iterateTokens`. */\nexport interface IteratedToken {\n\treadonly type: string;\n\treadonly from: number;\n\treadonly to: number;\n}\n\n/**\n * Iterates tokens of `code` according to the language's sticky-regex patterns.\n *\n * Walks left-to-right; at each position emits the first matching pattern's\n * token and advances past it. Positions where no pattern matches are silently\n * skipped one byte at a time and never appear in the output — a consumer\n * that needs unknown-byte counts can derive them from `code.length` minus the\n * sum of yielded token widths.\n */\nexport function* iterateTokens(\n\tcode: string,\n\tlanguage: LanguageDefinition,\n): Generator<IteratedToken> {\n\tlet pos = 0;\n\twhile (pos < code.length) {\n\t\tlet matched = false;\n\t\tfor (const pattern of language.patterns) {\n\t\t\tpattern.pattern.lastIndex = pos;\n\t\t\tconst match: RegExpExecArray | null = pattern.pattern.exec(code);\n\t\t\tif (match && match.index === pos && match[0].length > 0) {\n\t\t\t\tconst len: number = match[0].length;\n\t\t\t\tyield { type: pattern.type, from: pos, to: pos + len };\n\t\t\t\tpos += len;\n\t\t\t\tmatched = true;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tif (!matched) {\n\t\t\tpos++;\n\t\t}\n\t}\n}\n","/**\n * Java language definition for regex-based syntax highlighting.\n *\n * Covers Java 21 syntax including sealed classes, records, pattern matching,\n * modules, text blocks, and switch expressions.\n *\n * Token type mapping:\n * - `comment` - line `//`, block, and Javadoc comments\n * - `string` - double-quoted strings, text blocks, char literals\n * - `annotation` - annotations `@Name`, `@java.lang.Override`\n * - `keyword` - Java 21 keywords (including contextual: sealed, record, var, yield, when)\n * - `boolean` - `true`, `false`\n * - `null` - `null`\n * - `number` - decimal, hex, binary, float, scientific, with underscores\n * - `function` - method/function names (identifier followed by `(`)\n * - `operator` - all Java operators including `->`, `::`, `>>>=`\n * - `punctuation` - delimiters `{}[]();.,`\n */\n\nimport type { LanguageDefinition } from '../TokenizerTypes.js';\n\nconst JAVA_KEYWORDS: readonly string[] = [\n\t'abstract',\n\t'assert',\n\t'boolean',\n\t'break',\n\t'byte',\n\t'case',\n\t'catch',\n\t'char',\n\t'class',\n\t'const',\n\t'continue',\n\t'default',\n\t'do',\n\t'double',\n\t'else',\n\t'enum',\n\t'exports',\n\t'extends',\n\t'final',\n\t'finally',\n\t'float',\n\t'for',\n\t'goto',\n\t'if',\n\t'implements',\n\t'import',\n\t'instanceof',\n\t'int',\n\t'interface',\n\t'long',\n\t'module',\n\t'native',\n\t'new',\n\t'non-sealed',\n\t'open',\n\t'opens',\n\t'package',\n\t'permits',\n\t'private',\n\t'protected',\n\t'provides',\n\t'public',\n\t'record',\n\t'requires',\n\t'return',\n\t'sealed',\n\t'short',\n\t'static',\n\t'strictfp',\n\t'super',\n\t'switch',\n\t'synchronized',\n\t'this',\n\t'throw',\n\t'throws',\n\t'to',\n\t'transient',\n\t'transitive',\n\t'try',\n\t'uses',\n\t'var',\n\t'void',\n\t'volatile',\n\t'when',\n\t'while',\n\t'with',\n\t'yield',\n];\n\nconst KEYWORD_PATTERN: RegExp = new RegExp(`(?:${JAVA_KEYWORDS.join('|')})\\\\b`, 'y');\n\nexport const JAVA_LANGUAGE: LanguageDefinition = {\n\tname: 'java',\n\taliases: [],\n\tpatterns: [\n\t\t// 1. Block/Javadoc comments — before `/` operator\n\t\t{ type: 'comment', pattern: /\\/\\*[\\s\\S]*?\\*\\//y },\n\t\t// 2. Line comments — before `/` operator\n\t\t{ type: 'comment', pattern: /\\/\\/[^\\n]*/y },\n\t\t// 3. Text blocks `\"\"\"...\"\"\"` — before empty string `\"\"`\n\t\t{ type: 'string', pattern: /\"\"\"[\\s\\S]*?\"\"\"/y },\n\t\t// 4. Double-quoted strings — escape-aware\n\t\t{ type: 'string', pattern: /\"(?:[^\"\\\\]|\\\\.)*\"/y },\n\t\t// 5. Char literals — escape-aware\n\t\t{ type: 'string', pattern: /'(?:[^'\\\\]|\\\\.)*'/y },\n\t\t// 6. Annotations — before operators (captures `@`)\n\t\t{ type: 'annotation', pattern: /@[a-zA-Z_]\\w*(?:\\.[a-zA-Z_]\\w*)*/y },\n\t\t// 7. Keywords — before functions (`if(` = keyword, not function)\n\t\t{ type: 'keyword', pattern: KEYWORD_PATTERN },\n\t\t// 8. Booleans\n\t\t{ type: 'boolean', pattern: /(?:true|false)\\b/y },\n\t\t// 9. Null\n\t\t{ type: 'null', pattern: /null\\b/y },\n\t\t// 10. Hex numbers — before decimal (both can start with `0`)\n\t\t{ type: 'number', pattern: /0[xX][\\da-fA-F](?:_*[\\da-fA-F])*[lL]?/y },\n\t\t// 11. Binary numbers — before decimal\n\t\t{ type: 'number', pattern: /0[bB][01](?:_*[01])*[lL]?/y },\n\t\t// 12. Decimal/float/scientific numbers — with underscore and suffix support\n\t\t{\n\t\t\ttype: 'number',\n\t\t\tpattern: /\\d(?:_*\\d)*(?:\\.(?:\\d(?:_*\\d)*)?)?(?:[eE][+-]?\\d(?:_*\\d)*)?[fFdDlL]?/y,\n\t\t},\n\t\t// 13. Function/method names — identifier followed by `(`\n\t\t{ type: 'function', pattern: /[a-zA-Z_]\\w*(?=\\s*\\()/y },\n\t\t// 14. Operators\n\t\t{\n\t\t\ttype: 'operator',\n\t\t\tpattern: /(?:>>>=?|>>=?|<<=?|->|::|\\+\\+|--|&&|\\|\\||[+\\-*/%&|^~!=<>]=?|\\?|:)/y,\n\t\t},\n\t\t// 15. Punctuation — catch-all delimiters\n\t\t{ type: 'punctuation', pattern: /[{}[\\]();.,]/y },\n\t],\n};\n","/**\n * JSON language definition for regex-based syntax highlighting.\n */\n\nimport type { LanguageDefinition } from '../TokenizerTypes.js';\n\nexport const JSON_LANGUAGE: LanguageDefinition = {\n\tname: 'json',\n\taliases: ['jsonc'],\n\tpatterns: [\n\t\t{ type: 'property', pattern: /\"(?:[^\"\\\\]|\\\\.)*\"(?=\\s*:)/y },\n\t\t{ type: 'string', pattern: /\"(?:[^\"\\\\]|\\\\.)*\"/y },\n\t\t{ type: 'number', pattern: /-?(?:0|[1-9]\\d*)(?:\\.\\d+)?(?:[eE][+-]?\\d+)?/y },\n\t\t{ type: 'boolean', pattern: /(?:true|false)\\b/y },\n\t\t{ type: 'null', pattern: /null\\b/y },\n\t\t{ type: 'punctuation', pattern: /[{}[\\]:,]/y },\n\t],\n};\n","/**\n * TypeScript language definition for regex-based syntax highlighting.\n *\n * Covers modern TypeScript syntax including interfaces, type aliases, enums,\n * generics, decorators, async/await, optional chaining, nullish coalescing,\n * template literals, and JSX-friendly punctuation.\n *\n * Token type mapping:\n * - `comment` - line `//`, block, and JSDoc comments\n * - `string` - double/single-quoted strings, template literals\n * - `annotation` - decorators `@Name`, `@module.Name`\n * - `keyword` - JS/TS keywords (control flow, declarations, modifiers)\n * - `boolean` - `true`, `false`\n * - `null` - `null`, `undefined`\n * - `number` - decimal, hex, octal, binary, BigInt, scientific, with separators\n * - `function` - function/method names (identifier followed by `(` or `<...>(`)\n * - `operator` - all TS operators including `=>`, `??`, `?.`, `**`, `>>>=`\n * - `punctuation` - delimiters `{}[]();.,`\n *\n * Aliases: `ts`, `tsx`.\n */\n\nimport type { LanguageDefinition } from '../TokenizerTypes.js';\n\nconst TYPESCRIPT_KEYWORDS: readonly string[] = [\n\t'abstract',\n\t'any',\n\t'as',\n\t'asserts',\n\t'async',\n\t'await',\n\t'bigint',\n\t'boolean',\n\t'break',\n\t'case',\n\t'catch',\n\t'class',\n\t'const',\n\t'constructor',\n\t'continue',\n\t'debugger',\n\t'declare',\n\t'default',\n\t'delete',\n\t'do',\n\t'else',\n\t'enum',\n\t'export',\n\t'extends',\n\t'finally',\n\t'for',\n\t'from',\n\t'function',\n\t'get',\n\t'global',\n\t'if',\n\t'implements',\n\t'import',\n\t'in',\n\t'infer',\n\t'instanceof',\n\t'interface',\n\t'is',\n\t'keyof',\n\t'let',\n\t'module',\n\t'namespace',\n\t'never',\n\t'new',\n\t'number',\n\t'object',\n\t'of',\n\t'out',\n\t'override',\n\t'package',\n\t'private',\n\t'protected',\n\t'public',\n\t'readonly',\n\t'require',\n\t'return',\n\t'satisfies',\n\t'set',\n\t'static',\n\t'string',\n\t'super',\n\t'switch',\n\t'symbol',\n\t'this',\n\t'throw',\n\t'try',\n\t'type',\n\t'typeof',\n\t'unique',\n\t'unknown',\n\t'using',\n\t'var',\n\t'void',\n\t'while',\n\t'with',\n\t'yield',\n];\n\nconst KEYWORD_PATTERN: RegExp = new RegExp(`(?:${TYPESCRIPT_KEYWORDS.join('|')})\\\\b`, 'y');\n\nexport const TYPESCRIPT_LANGUAGE: LanguageDefinition = {\n\tname: 'typescript',\n\taliases: ['ts', 'tsx'],\n\tpatterns: [\n\t\t// 1. Block/JSDoc comments — before `/` operator\n\t\t{ type: 'comment', pattern: /\\/\\*[\\s\\S]*?\\*\\//y },\n\t\t// 2. Line comments — before `/` operator\n\t\t{ type: 'comment', pattern: /\\/\\/[^\\n]*/y },\n\t\t// 3. Template literals (no nested ${} parsing) — escape-aware\n\t\t{ type: 'string', pattern: /`(?:[^`\\\\$]|\\\\.|\\$(?!\\{)|\\$\\{[^}]*\\})*`/y },\n\t\t// 4. Double-quoted strings — escape-aware\n\t\t{ type: 'string', pattern: /\"(?:[^\"\\\\]|\\\\.)*\"/y },\n\t\t// 5. Single-quoted strings — escape-aware\n\t\t{ type: 'string', pattern: /'(?:[^'\\\\]|\\\\.)*'/y },\n\t\t// 6. Decorators — before operators\n\t\t{ type: 'annotation', pattern: /@[a-zA-Z_$][\\w$]*(?:\\.[a-zA-Z_$][\\w$]*)*/y },\n\t\t// 7. Keywords — before functions (`if(` = keyword, not function)\n\t\t{ type: 'keyword', pattern: KEYWORD_PATTERN },\n\t\t// 8. Booleans\n\t\t{ type: 'boolean', pattern: /(?:true|false)\\b/y },\n\t\t// 9. Null/undefined\n\t\t{ type: 'null', pattern: /(?:null|undefined)\\b/y },\n\t\t// 10. Hex numbers (with optional BigInt suffix) — before decimal\n\t\t{ type: 'number', pattern: /0[xX][\\da-fA-F](?:_*[\\da-fA-F])*n?/y },\n\t\t// 11. Binary numbers — before decimal\n\t\t{ type: 'number', pattern: /0[bB][01](?:_*[01])*n?/y },\n\t\t// 12. Octal numbers — before decimal\n\t\t{ type: 'number', pattern: /0[oO][0-7](?:_*[0-7])*n?/y },\n\t\t// 13. Decimal/float/scientific/BigInt — with numeric separator support\n\t\t{\n\t\t\ttype: 'number',\n\t\t\tpattern: /\\d(?:_*\\d)*(?:\\.(?:\\d(?:_*\\d)*)?)?(?:[eE][+-]?\\d(?:_*\\d)*)?n?/y,\n\t\t},\n\t\t// 14. Function/method names — identifier followed by `(`\n\t\t{ type: 'function', pattern: /[a-zA-Z_$][\\w$]*(?=\\s*\\()/y },\n\t\t// 15. Operators — longer alternatives first (alternation picks first match, not longest)\n\t\t{\n\t\t\ttype: 'operator',\n\t\t\tpattern:\n\t\t\t\t/(?:>>>=?|>>=?|<<=?|\\*\\*=?|\\?\\?=?|\\|\\|=?|&&=?|===?|!==?|=>|\\?\\.|\\.\\.\\.|\\+\\+|--|[+\\-*/%&|^~!=<>]=?|\\?|:)/y,\n\t\t},\n\t\t// 16. Punctuation — catch-all delimiters\n\t\t{ type: 'punctuation', pattern: /[{}[\\]();.,]/y },\n\t],\n};\n","/**\n * XML language definition for regex-based syntax highlighting.\n *\n * Token type mapping:\n * - `comment` — XML comments `<!-- ... -->`\n * - `keyword` — processing instructions, CDATA sections\n * - `tag` — tag names (consumed with `<`/`</` prefix)\n * - `attribute` — attribute names (identifier followed by `=`)\n * - `string` — attribute values (double or single quoted)\n * - `punctuation` — delimiters `/>`, `>`, `=`\n *\n * Tag names are combined with their `<` or `</` prefix into a single `tag` token\n * to prevent text content between tags from being incorrectly highlighted.\n */\n\nimport { XML_TAG_NAME } from '../../../shared/XmlPatterns.js';\nimport type { LanguageDefinition } from '../TokenizerTypes.js';\n\nexport const XML_LANGUAGE: LanguageDefinition = {\n\tname: 'xml',\n\taliases: ['html', 'xhtml', 'svg', 'xsl'],\n\tpatterns: [\n\t\t{ type: 'comment', pattern: /<!--[\\s\\S]*?-->/y },\n\t\t{ type: 'keyword', pattern: /<!\\[CDATA\\[[\\s\\S]*?\\]\\]>/y },\n\t\t{ type: 'keyword', pattern: /<\\?[\\s\\S]*?\\?>/y },\n\t\t{ type: 'tag', pattern: new RegExp(`<\\\\/${XML_TAG_NAME}`, 'y') },\n\t\t{ type: 'tag', pattern: new RegExp(`<${XML_TAG_NAME}`, 'y') },\n\t\t{ type: 'punctuation', pattern: /\\/>|>|=/y },\n\t\t{ type: 'attribute', pattern: new RegExp(`${XML_TAG_NAME}(?=\\\\s*=)`, 'y') },\n\t\t{ type: 'string', pattern: /\"[^\"]*\"/y },\n\t\t{ type: 'string', pattern: /'[^']*'/y },\n\t],\n};\n"],"mappings":"4FAwEA,IAAa,EAAgC,IAAI,EAChD,oBC/CD,SAAiB,EAChB,EACA,GAEA,IAAI,EAAM,EACV,KA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AS,mBCjIrB,EAAmC,CAC/C,KAAM,MACN,QAAS,CAAC,OAAQ,QAAS,MAAO,OAClC,SAAU,CACT,CAAE,KAAM,UAAW,QAAS,oBAC5B,CAAE,KAAM,UAAW,QAAS,6BAC5B,CAAE,KAAM,UAAW,QAAS,mBAC5B,CAAE,KAAM,MAAO,QAAS,IAAI,OAAO,OAAO,IAAgB,MAC1D,CAAE,KAAM,MAAO,QAAS,IAAI,OAAO,IAAI,IAAgB,MACvD,CAAE,KAAM,cAAe,QAAS,YAChC,CAAE,KAAM,YAAa,QAAS,IAAI,OAAO,GAAG,aAAyB,MACrE,CAAE,KAAM,SAAU,QAAS,YAC3B,CAAE,KAAM,SAAU,QAAS"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { PluginCallbackRegistration } from '../model/PluginCallbackExecutor.js';
|
|
1
2
|
import { BlockId } from '../model/TypeBrands.js';
|
|
2
3
|
import { Transaction } from '../state/Transaction.js';
|
|
3
4
|
export interface DecorationAttrs {
|
|
@@ -6,6 +7,7 @@ export interface DecorationAttrs {
|
|
|
6
7
|
readonly nodeName?: string;
|
|
7
8
|
readonly [key: string]: string | undefined;
|
|
8
9
|
}
|
|
10
|
+
declare const WIDGET_CALLBACK_OWNER: unique symbol;
|
|
9
11
|
export interface InlineDecoration {
|
|
10
12
|
readonly type: 'inline';
|
|
11
13
|
readonly blockId: BlockId;
|
|
@@ -25,8 +27,12 @@ export interface WidgetDecoration {
|
|
|
25
27
|
readonly toDOM: () => HTMLElement;
|
|
26
28
|
readonly side: -1 | 1;
|
|
27
29
|
readonly key?: string;
|
|
30
|
+
/** Plugin ownership attached by PluginLifecycle before the decoration reaches the view. */
|
|
31
|
+
readonly [WIDGET_CALLBACK_OWNER]?: PluginCallbackRegistration;
|
|
28
32
|
}
|
|
29
33
|
export type Decoration = InlineDecoration | NodeDecoration | WidgetDecoration;
|
|
34
|
+
/** Returns lifecycle-owned attribution for a widget renderer, when available. */
|
|
35
|
+
export declare function getWidgetCallbackOwner(decoration: WidgetDecoration): PluginCallbackRegistration | undefined;
|
|
30
36
|
/** Creates an inline decoration for a text range within a block. */
|
|
31
37
|
export declare function inline(blockId: BlockId, from: number, to: number, attrs: DecorationAttrs): InlineDecoration;
|
|
32
38
|
/** Creates a node decoration that applies to a whole block element. */
|
|
@@ -60,6 +66,8 @@ export declare class DecorationSet {
|
|
|
60
66
|
remove(predicate: (d: Decoration) => boolean): DecorationSet;
|
|
61
67
|
/** Returns a new DecorationSet merging this set with another. */
|
|
62
68
|
merge(other: DecorationSet): DecorationSet;
|
|
69
|
+
/** Attaches plugin attribution to widget callbacks without mutating plugin-owned objects. */
|
|
70
|
+
withWidgetOwner(pluginId: string): DecorationSet;
|
|
63
71
|
/** Checks equality — reference first, then structural comparison. */
|
|
64
72
|
equals(other: DecorationSet): boolean;
|
|
65
73
|
/** True if the set contains no decorations. */
|
|
@@ -79,4 +87,5 @@ export declare class DecorationSet {
|
|
|
79
87
|
}
|
|
80
88
|
/** Compares two decoration arrays for structural equality. */
|
|
81
89
|
export declare function decorationArraysEqual(a: readonly Decoration[], b: readonly Decoration[]): boolean;
|
|
90
|
+
export {};
|
|
82
91
|
//# sourceMappingURL=Decoration.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Decoration.d.ts","sourceRoot":"","sources":["../../src/decorations/Decoration.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AACtD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAK3D,MAAM,WAAW,eAAe;IAC/B,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAC3B,QAAQ,EAAE,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAAC;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AAC,KAAK,EAAE,aAAa,GAAG,OAAO;IAYrC,+CAA+C;IAC/C,IAAI,OAAO,IAAI,OAAO,CAErB;IAED;;;;;;;;;;OAUG;IACH,GAAG,CAAC,EAAE,EAAE,WAAW,GAAG,aAAa;CA6BnC;AAID,8DAA8D;AAC9D,wBAAgB,qBAAqB,CAAC,CAAC,EAAE,SAAS,UAAU,EAAE,EAAE,CAAC,EAAE,SAAS,UAAU,EAAE,GAAG,OAAO,CAUjG"}
|
|
@@ -1,19 +1,14 @@
|
|
|
1
1
|
import { Document } from '../model/Document.js';
|
|
2
|
+
import { normalizeCompositeBlocks } from '../model/DocumentNormalization.js';
|
|
2
3
|
import { SchemaRegistry } from '../model/SchemaRegistry.js';
|
|
3
4
|
import { MarkdownParseOptions, MarkdownSerializeOptions } from '../serialization/MarkdownTypes.js';
|
|
4
5
|
import { ContentCSSResult, ContentHTMLOptions, SetContentHTMLOptions } from '../serialization/index.js';
|
|
5
6
|
import { EditorState } from '../state/EditorState.js';
|
|
7
|
+
export { normalizeCompositeBlocks };
|
|
6
8
|
/** Returns the document as JSON from the given state. */
|
|
7
9
|
export declare function getEditorJSON(state: EditorState): Document;
|
|
8
10
|
/** Replaces editor state from a JSON document. */
|
|
9
11
|
export declare function setEditorJSON(doc: Document, registry: SchemaRegistry | undefined, replaceState: (state: EditorState) => void): void;
|
|
10
|
-
/**
|
|
11
|
-
* Normalizes composite blocks so bare inline children are wrapped in paragraphs.
|
|
12
|
-
* Composite blocks (those with a `content` rule, e.g. table_cell) must contain
|
|
13
|
-
* block-level children. When JSON input provides inline children directly,
|
|
14
|
-
* this wraps them in a paragraph to enforce schema consistency.
|
|
15
|
-
*/
|
|
16
|
-
export declare function normalizeCompositeBlocks(doc: Document, registry: SchemaRegistry): Document;
|
|
17
12
|
/** Returns sanitized HTML representation of the document. */
|
|
18
13
|
export declare function getEditorContentHTML(state: EditorState, registry: SchemaRegistry | undefined, options?: ContentHTMLOptions): string | ContentCSSResult;
|
|
19
14
|
/** Sets content from HTML (sanitized). Accepts optional `styleMap` for class-based round-trip. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ContentSerializer.d.ts","sourceRoot":"","sources":["../../src/editor/ContentSerializer.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,EACN,KAAK,QAAQ,EAUb,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"ContentSerializer.d.ts","sourceRoot":"","sources":["../../src/editor/ContentSerializer.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,EACN,KAAK,QAAQ,EAUb,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,wBAAwB,EAAE,MAAM,mCAAmC,CAAC;AAG7E,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAOjE,OAAO,KAAK,EACX,oBAAoB,EACpB,wBAAwB,EACxB,MAAM,mCAAmC,CAAC;AAC3C,OAAO,KAAK,EACX,gBAAgB,EAChB,kBAAkB,EAClB,qBAAqB,EACrB,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAEtD,OAAO,EAAE,wBAAwB,EAAE,CAAC;AAEpC,yDAAyD;AACzD,wBAAgB,aAAa,CAAC,KAAK,EAAE,WAAW,GAAG,QAAQ,CAE1D;AAED,kDAAkD;AAClD,wBAAgB,aAAa,CAC5B,GAAG,EAAE,QAAQ,EACb,QAAQ,EAAE,cAAc,GAAG,SAAS,EACpC,YAAY,EAAE,CAAC,KAAK,EAAE,WAAW,KAAK,IAAI,GACxC,IAAI,CAeN;AAqED,6DAA6D;AAC7D,wBAAgB,oBAAoB,CACnC,KAAK,EAAE,WAAW,EAClB,QAAQ,EAAE,cAAc,GAAG,SAAS,EACpC,OAAO,CAAC,EAAE,kBAAkB,GAC1B,MAAM,GAAG,gBAAgB,CAY3B;AAED,kGAAkG;AAClG,wBAAgB,oBAAoB,CACnC,IAAI,EAAE,MAAM,EACZ,QAAQ,EAAE,cAAc,GAAG,SAAS,EACpC,YAAY,EAAE,CAAC,KAAK,EAAE,WAAW,KAAK,IAAI,EAC1C,OAAO,CAAC,EAAE,qBAAqB,GAC7B,IAAI,CAGN;AAED;;;;;;;GAOG;AACH,wBAAsB,wBAAwB,CAC7C,KAAK,EAAE,WAAW,EAClB,QAAQ,EAAE,cAAc,GAAG,SAAS,EACpC,OAAO,CAAC,EAAE,wBAAwB,GAChC,OAAO,CAAC,MAAM,CAAC,CAGjB;AAED;;;;;;;;;GASG;AACH,wBAAsB,wBAAwB,CAC7C,QAAQ,EAAE,MAAM,EAChB,YAAY,EAAE,WAAW,EACzB,QAAQ,EAAE,cAAc,GAAG,SAAS,EACpC,YAAY,EAAE,CAAC,KAAK,EAAE,WAAW,KAAK,IAAI,EAC1C,OAAO,CAAC,EAAE,oBAAoB,GAC5B,OAAO,CAAC,IAAI,CAAC,CAaf;AAED,sFAAsF;AACtF,wBAAgB,aAAa,CAAC,KAAK,EAAE,WAAW,GAAG,MAAM,CAExD;AAYD;;;;;;;;GAQG;AACH,wBAAgB,aAAa,CAC5B,KAAK,EAAE,MAAM,EACb,YAAY,EAAE,WAAW,EACzB,QAAQ,EAAE,cAAc,GAAG,SAAS,EACpC,YAAY,EAAE,CAAC,KAAK,EAAE,WAAW,KAAK,IAAI,GACxC,IAAI,CAcN;AAED,wFAAwF;AACxF,wBAAgB,aAAa,CAAC,GAAG,EAAE,QAAQ,GAAG,SAAS,GAAG,OAAO,CAShE"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { Logger } from '../plugins/Logger.js';
|
|
1
2
|
import { EditorState } from '../state/EditorState.js';
|
|
2
3
|
import { Transaction } from '../state/Transaction.js';
|
|
3
4
|
export interface StateChangeEvent {
|
|
@@ -14,15 +15,22 @@ export type EditorEventMap = {
|
|
|
14
15
|
blur: undefined;
|
|
15
16
|
ready: undefined;
|
|
16
17
|
};
|
|
17
|
-
type EventCallback<T> = (payload: T) =>
|
|
18
|
+
type EventCallback<T> = (payload: T) => unknown;
|
|
18
19
|
export declare class EditorEventEmitter {
|
|
19
20
|
private readonly listeners;
|
|
21
|
+
private log;
|
|
22
|
+
constructor(logger?: Logger);
|
|
23
|
+
/** Replaces the error sink used for consumer-listener failures. */
|
|
24
|
+
setLogger(logger?: Logger): void;
|
|
20
25
|
/** Registers an event listener. */
|
|
21
26
|
on<K extends keyof EditorEventMap>(event: K, callback: EventCallback<EditorEventMap[K]>): void;
|
|
22
27
|
/** Removes an event listener. */
|
|
23
28
|
off<K extends keyof EditorEventMap>(event: K, callback: EventCallback<EditorEventMap[K]>): void;
|
|
24
|
-
/** Emits an event to all
|
|
29
|
+
/** Emits an event to all listeners, isolating failures per consumer callback. */
|
|
25
30
|
emit<K extends keyof EditorEventMap>(event: K, payload: EditorEventMap[K]): void;
|
|
31
|
+
/** Observes promise-like callback results without trusting their `then` implementation. */
|
|
32
|
+
private observeListenerResult;
|
|
33
|
+
private reportListenerError;
|
|
26
34
|
/** Removes all listeners. */
|
|
27
35
|
clear(): void;
|
|
28
36
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EditorEventEmitter.d.ts","sourceRoot":"","sources":["../../src/editor/EditorEventEmitter.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAC3D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAE3D,MAAM,WAAW,gBAAgB;IAChC,QAAQ,EAAE,WAAW,CAAC;IACtB,QAAQ,EAAE,WAAW,CAAC;IACtB,WAAW,EAAE,WAAW,CAAC;CACzB;AAED,MAAM,MAAM,cAAc,GAAG;IAC5B,WAAW,EAAE,gBAAgB,CAAC;IAC9B,eAAe,EAAE;QAAE,SAAS,EAAE,OAAO,uBAAuB,EAAE,eAAe,CAAA;KAAE,CAAC;IAChF,KAAK,EAAE,SAAS,CAAC;IACjB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ACjC,GAAG,CAAC,CAAC,SAAS,MAAM,cAAc,EAAE,KAAK,EAAE,CAAC,EAAE,QAAQ,EAAE,aAAa,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,GAAG,IAAI;IAI/F,iFAAiF;IACjF,IAAI,CAAC,CAAC,SAAS,MAAM,cAAc,EAAE,KAAK,EAAE,CAAC,EAAE,OAAO,EAAE,cAAc,CAAC,CAAC,CAAC,GAAG,IAAI;IAehF,2FAA2F;IAC3F,OAAO,CAAC,qBAAqB;IAiB7B,OAAO,CAAC,mBAAmB;IAgB3B,6BAA6B;IAC7B,KAAK,IAAI,IAAI;CAGb"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { InputManager } from '../input/InputManager.js';
|
|
2
1
|
import { Plugin } from '../plugins/Plugin.js';
|
|
3
2
|
import { PluginManager } from '../plugins/PluginManager.js';
|
|
4
3
|
import { EditorView } from '../view/EditorView.js';
|
|
@@ -24,7 +23,6 @@ export interface InitializerDeps {
|
|
|
24
23
|
/** Components created during initialization, returned to the editor for storage. */
|
|
25
24
|
export interface InitResult {
|
|
26
25
|
readonly view: EditorView;
|
|
27
|
-
readonly inputManager: InputManager;
|
|
28
26
|
readonly pluginManager: PluginManager;
|
|
29
27
|
readonly domElements: EditorDOMElements;
|
|
30
28
|
readonly themeController: EditorThemeController;
|
|
@@ -33,8 +31,8 @@ export interface InitResult {
|
|
|
33
31
|
readonly announce: (text: string) => void;
|
|
34
32
|
/** Localized "Markdown imported" announcement, resolved from the editor locale. */
|
|
35
33
|
readonly markdownImportedMessage: string;
|
|
36
|
-
/**
|
|
37
|
-
|
|
34
|
+
/** Disposes every resource owned by this completed initialization session. */
|
|
35
|
+
dispose(): Promise<void>;
|
|
38
36
|
}
|
|
39
37
|
/** Performs the full editor initialization sequence. Returns null if setup fails. */
|
|
40
38
|
export declare function initializeEditor(deps: InitializerDeps): Promise<InitResult | null>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EditorInitializer.d.ts","sourceRoot":"","sources":["../../src/editor/EditorInitializer.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;
|
|
1
|
+
{"version":3,"file":"EditorInitializer.d.ts","sourceRoot":"","sources":["../../src/editor/EditorInitializer.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAUH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AACnD,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAK5D,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAInD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAC7D,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AAC1E,OAAO,EAAE,KAAK,iBAAiB,EAAmB,MAAM,gBAAgB,CAAC;AACzE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAElE,OAAO,KAAK,EAAE,sBAAsB,EAAoB,MAAM,6BAA6B,CAAC;AAC5F,OAAO,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AACnE,OAAO,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AAInE,+DAA+D;AAC/D,MAAM,WAAW,eAAe;IAC/B,QAAQ,CAAC,MAAM,EAAE,UAAU,CAAC;IAC5B,QAAQ,CAAC,MAAM,EAAE,mBAAmB,CAAC;IACrC,0FAA0F;IAC1F,QAAQ,CAAC,OAAO,EAAE,KAAK,GAAG,KAAK,GAAG,SAAS,CAAC;IAC5C,QAAQ,CAAC,gBAAgB,EAAE,sBAAsB,CAAC;IAClD,QAAQ,CAAC,gBAAgB,EAAE,sBAAsB,CAAC;IAClD,QAAQ,CAAC,MAAM,EAAE,kBAAkB,CAAC;IACpC,QAAQ,CAAC,cAAc,EAAE,SAAS,MAAM,EAAE,CAAC;IAC3C,WAAW,CAAC,IAAI,OAAO,CAAC;CACxB;AAED,oFAAoF;AACpF,MAAM,WAAW,UAAU;IAC1B,QAAQ,CAAC,IAAI,EAAE,UAAU,CAAC;IAC1B,QAAQ,CAAC,aAAa,EAAE,aAAa,CAAC;IACtC,QAAQ,CAAC,WAAW,EAAE,iBAAiB,CAAC;IACxC,QAAQ,CAAC,eAAe,EAAE,qBAAqB,CAAC;IAChD,QAAQ,CAAC,WAAW,EAAE,qBAAqB,GAAG,IAAI,CAAC;IACnD,gFAAgF;IAChF,QAAQ,CAAC,QAAQ,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IAC1C,mFAAmF;IACnF,QAAQ,CAAC,uBAAuB,EAAE,MAAM,CAAC;IACzC,8EAA8E;IAC9E,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;CACzB;AAED,qFAAqF;AACrF,wBAAsB,gBAAgB,CAAC,IAAI,EAAE,eAAe,GAAG,OAAO,CAAC,UAAU,GAAG,IAAI,CAAC,CAGxF"}
|
|
@@ -1,4 +1,14 @@
|
|
|
1
1
|
import { Plugin } from '../plugins/Plugin.js';
|
|
2
|
+
/**
|
|
3
|
+
* Rejection delivered to readiness waiters when their initialization generation
|
|
4
|
+
* is explicitly abandoned by {@link NotectlEditor.destroy}.
|
|
5
|
+
*
|
|
6
|
+
* The `AbortError` name follows the platform cancellation convention while the
|
|
7
|
+
* concrete class gives consumers a stable `instanceof` contract.
|
|
8
|
+
*/
|
|
9
|
+
export declare class EditorInitializationAbortedError extends Error {
|
|
10
|
+
constructor();
|
|
11
|
+
}
|
|
2
12
|
export declare class EditorLifecycleCoordinator {
|
|
3
13
|
private state;
|
|
4
14
|
private readyPromiseResolve;
|
|
@@ -22,7 +32,12 @@ export declare class EditorLifecycleCoordinator {
|
|
|
22
32
|
consumePreInitPlugins(): Plugin[];
|
|
23
33
|
/** Restores previously consumed pre-init plugins for a retry attempt. */
|
|
24
34
|
restorePreInitPlugins(plugins: readonly Plugin[]): void;
|
|
25
|
-
/**
|
|
35
|
+
/**
|
|
36
|
+
* Abandons the current lifecycle generation and creates a fresh ready promise.
|
|
37
|
+
* Any unresolved waiter belongs to the abandoned generation and is rejected;
|
|
38
|
+
* replacing its promise without settling it would leave consumers pending
|
|
39
|
+
* forever.
|
|
40
|
+
*/
|
|
26
41
|
reset(): void;
|
|
27
42
|
private createReadyPromise;
|
|
28
43
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EditorLifecycleCoordinator.d.ts","sourceRoot":"","sources":["../../src/editor/EditorLifecycleCoordinator.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAInD,qBAAa,0BAA0B;IACtC,OAAO,CAAC,KAAK,CAA0B;IACvC,OAAO,CAAC,mBAAmB,CAA6B;IACxD,OAAO,CAAC,kBAAkB,CAA6C;IACvE,OAAO,CAAC,YAAY,CAAgB;IACpC,OAAO,CAAC,cAAc,CAAgB;;IAMtC,uDAAuD;IACvD,aAAa,IAAI,OAAO;IAIxB,6EAA6E;IAC7E,eAAe,IAAI,OAAO;IAS1B,gEAAgE;IAChE,SAAS,IAAI,OAAO,CAAC,IAAI,CAAC;IAI1B,kCAAkC;IAClC,YAAY,IAAI,IAAI;IAQpB,kEAAkE;IAClE,SAAS,CAAC,MAAM,EAAE,OAAO,GAAG,IAAI;IAQhC,+EAA+E;IAC/E,qBAAqB,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI;IAS3C,oDAAoD;IACpD,qBAAqB,IAAI,MAAM,EAAE;IAMjC,yEAAyE;IACzE,qBAAqB,CAAC,OAAO,EAAE,SAAS,MAAM,EAAE,GAAG,IAAI;IAKvD
|
|
1
|
+
{"version":3,"file":"EditorLifecycleCoordinator.d.ts","sourceRoot":"","sources":["../../src/editor/EditorLifecycleCoordinator.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAInD;;;;;;GAMG;AACH,qBAAa,gCAAiC,SAAQ,KAAK;;CAK1D;AAED,qBAAa,0BAA0B;IACtC,OAAO,CAAC,KAAK,CAA0B;IACvC,OAAO,CAAC,mBAAmB,CAA6B;IACxD,OAAO,CAAC,kBAAkB,CAA6C;IACvE,OAAO,CAAC,YAAY,CAAgB;IACpC,OAAO,CAAC,cAAc,CAAgB;;IAMtC,uDAAuD;IACvD,aAAa,IAAI,OAAO;IAIxB,6EAA6E;IAC7E,eAAe,IAAI,OAAO;IAS1B,gEAAgE;IAChE,SAAS,IAAI,OAAO,CAAC,IAAI,CAAC;IAI1B,kCAAkC;IAClC,YAAY,IAAI,IAAI;IAQpB,kEAAkE;IAClE,SAAS,CAAC,MAAM,EAAE,OAAO,GAAG,IAAI;IAQhC,+EAA+E;IAC/E,qBAAqB,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI;IAS3C,oDAAoD;IACpD,qBAAqB,IAAI,MAAM,EAAE;IAMjC,yEAAyE;IACzE,qBAAqB,CAAC,OAAO,EAAE,SAAS,MAAM,EAAE,GAAG,IAAI;IAKvD;;;;;OAKG;IACH,KAAK,IAAI,IAAI;IAOb,OAAO,CAAC,kBAAkB;CAS1B"}
|
|
@@ -1,9 +1,17 @@
|
|
|
1
1
|
import { EditorThemeController } from './EditorThemeController.js';
|
|
2
|
+
/** Opaque ownership handle for one editor initialization's style registration. */
|
|
3
|
+
export interface EditorStyleLease {
|
|
4
|
+
readonly id: symbol;
|
|
5
|
+
readonly shadow: ShadowRoot;
|
|
6
|
+
readonly themeController: EditorThemeController | null;
|
|
7
|
+
}
|
|
2
8
|
export declare class EditorStyleCoordinator {
|
|
3
9
|
private runtimeStyleSheet;
|
|
10
|
+
private activeLease;
|
|
4
11
|
/** Sets up the runtime stylesheet and registers the shadow root as a style root. */
|
|
5
|
-
setup(shadow: ShadowRoot, nonce: string | undefined, themeController: EditorThemeController | null):
|
|
6
|
-
/** Tears down the
|
|
7
|
-
teardown(
|
|
12
|
+
setup(shadow: ShadowRoot, nonce: string | undefined, themeController: EditorThemeController | null): EditorStyleLease;
|
|
13
|
+
/** Tears down styles only when the caller still owns the active registration. */
|
|
14
|
+
teardown(lease: EditorStyleLease | null): void;
|
|
15
|
+
private release;
|
|
8
16
|
}
|
|
9
17
|
//# sourceMappingURL=EditorStyleCoordinator.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EditorStyleCoordinator.d.ts","sourceRoot":"","sources":["../../src/editor/EditorStyleCoordinator.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAOH,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AAExE,qBAAa,sBAAsB;IAClC,OAAO,CAAC,iBAAiB,CAA8B;
|
|
1
|
+
{"version":3,"file":"EditorStyleCoordinator.d.ts","sourceRoot":"","sources":["../../src/editor/EditorStyleCoordinator.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAOH,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AAExE,kFAAkF;AAClF,MAAM,WAAW,gBAAgB;IAChC,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,MAAM,EAAE,UAAU,CAAC;IAC5B,QAAQ,CAAC,eAAe,EAAE,qBAAqB,GAAG,IAAI,CAAC;CACvD;AAED,qBAAa,sBAAsB;IAClC,OAAO,CAAC,iBAAiB,CAA8B;IACvD,OAAO,CAAC,WAAW,CAAiC;IAEpD,oFAAoF;IACpF,KAAK,CACJ,MAAM,EAAE,UAAU,EAClB,KAAK,EAAE,MAAM,GAAG,SAAS,EACzB,eAAe,EAAE,qBAAqB,GAAG,IAAI,GAC3C,gBAAgB;IAyBnB,iFAAiF;IACjF,QAAQ,CAAC,KAAK,EAAE,gBAAgB,GAAG,IAAI,GAAG,IAAI;IAK9C,OAAO,CAAC,OAAO;CAMf"}
|
|
@@ -12,7 +12,6 @@ export type { StateChangeEvent } from './EditorEventEmitter.js';
|
|
|
12
12
|
export type { EditorEventMap } from './EditorEventEmitter.js';
|
|
13
13
|
export declare class NotectlEditor extends HTMLElement {
|
|
14
14
|
private view;
|
|
15
|
-
private inputManager;
|
|
16
15
|
private pluginManager;
|
|
17
16
|
private domElements;
|
|
18
17
|
private readonly configController;
|
|
@@ -21,12 +20,14 @@ export declare class NotectlEditor extends HTMLElement {
|
|
|
21
20
|
private readonly styleCoordinator;
|
|
22
21
|
private themeController;
|
|
23
22
|
private paperLayout;
|
|
23
|
+
private activeInitResult;
|
|
24
24
|
private pendingInitPromise;
|
|
25
|
+
private pendingDestroyPromise;
|
|
25
26
|
private cancelPendingInit;
|
|
26
27
|
private autoInitToken;
|
|
27
28
|
private autoInitQueued;
|
|
28
29
|
private initVersion;
|
|
29
|
-
private
|
|
30
|
+
private destroyVersion;
|
|
30
31
|
private announce;
|
|
31
32
|
private markdownImportedMessage;
|
|
32
33
|
static get observedAttributes(): string[];
|
|
@@ -39,8 +40,16 @@ export declare class NotectlEditor extends HTMLElement {
|
|
|
39
40
|
* Initializes the editor with the given config. Throws on static print
|
|
40
41
|
* replicas (`data-notectl-static`): they carry replicated print markup and
|
|
41
42
|
* must never boot a live editor over it.
|
|
43
|
+
*
|
|
44
|
+
* A config-less concurrent call joins the active initialization. Configuration
|
|
45
|
+
* belongs exclusively to the call that starts a generation; supplying config
|
|
46
|
+
* to a later call is rejected after the active initialization settles. Every
|
|
47
|
+
* caller joined to a generation rejects with EditorInitializationAbortedError
|
|
48
|
+
* when destroy() abandons that generation.
|
|
42
49
|
*/
|
|
43
50
|
init(config?: import('./EditorConfig.js').NotectlEditorConfig): Promise<void>;
|
|
51
|
+
/** Completes one initialization generation, including host publication and readiness. */
|
|
52
|
+
private completeInitialization;
|
|
44
53
|
/** Returns whether the editor is in read-only mode. */
|
|
45
54
|
get isReadOnly(): boolean;
|
|
46
55
|
/** Returns the document as JSON. */
|
|
@@ -148,7 +157,8 @@ export declare class NotectlEditor extends HTMLElement {
|
|
|
148
157
|
/**
|
|
149
158
|
* Waits for the editor to be ready. Rejects immediately on static print
|
|
150
159
|
* replicas (`data-notectl-static`): they never boot, so the promise would
|
|
151
|
-
* otherwise hang forever.
|
|
160
|
+
* otherwise hang forever. Rejects with EditorInitializationAbortedError when
|
|
161
|
+
* destroy() abandons the initialization generation being awaited.
|
|
152
162
|
*/
|
|
153
163
|
whenReady(): Promise<void>;
|
|
154
164
|
/** Updates configuration at runtime. */
|
|
@@ -161,6 +171,8 @@ export declare class NotectlEditor extends HTMLElement {
|
|
|
161
171
|
getPaperSize(): PaperSize | undefined;
|
|
162
172
|
/** Cleans up the editor. Awaiting ensures async plugin teardown completes. */
|
|
163
173
|
destroy(): Promise<void>;
|
|
174
|
+
/** Clears host aliases; resource destruction remains owned by InitResult.dispose(). */
|
|
175
|
+
private clearPublishedRuntime;
|
|
164
176
|
/**
|
|
165
177
|
* Returns the shadow root the editor boots into, creating it on first use.
|
|
166
178
|
* Attaching is deferred out of the constructor: for parser-created elements
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NotectlEditor.d.ts","sourceRoot":"","sources":["../../src/editor/NotectlEditor.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;
|
|
1
|
+
{"version":3,"file":"NotectlEditor.d.ts","sourceRoot":"","sources":["../../src/editor/NotectlEditor.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAEvD,OAAO,KAAK,EACX,QAAQ,EACR,MAAM,EACN,YAAY,EACZ,mBAAmB,EACnB,UAAU,EACV,MAAM,sBAAsB,CAAC;AAM9B,OAAO,KAAK,EACX,oBAAoB,EACpB,wBAAwB,EACxB,MAAM,mCAAmC,CAAC;AAC3C,OAAO,KAAK,EACX,gBAAgB,EAChB,kBAAkB,EAClB,qBAAqB,EACrB,MAAM,2BAA2B,CAAC;AACnC,OAAO,KAA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AMP;;;;;OAKG;IACH,SAAS,IAAI,OAAO,CAAC,IAAI,CAAC;IAO1B,wCAAwC;IACxC,SAAS,CAAC,MAAM,EAAE,OAAO,CAAC,OAAO,mBAAmB,EAAE,mBAAmB,CAAC,GAAG,IAAI;IAOjF,oCAAoC;IACpC,QAAQ,CAAC,KAAK,EAAE,WAAW,GAAG,KAAK,GAAG,IAAI;IAI1C,yCAAyC;IACzC,QAAQ,IAAI,WAAW,GAAG,KAAK;IAM/B,iFAAiF;IACjF,YAAY,IAAI,SAAS,GAAG,SAAS;IAIrC,8EAA8E;IAC9E,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC;IA4CxB,uFAAuF;IACvF,OAAO,CAAC,qBAAqB;IAS7B;;;;;;;;;;OAUG;IACH,OAAO,CAAC,qBAAqB;IAO7B,OAAO,CAAC,aAAa;IAUrB,OAAO,CAAC,gBAAgB;IAaxB,OAAO,CAAC,cAAc;IAKtB,OAAO,CAAC,cAAc;IAiBtB,OAAO,CAAC,YAAY;IAKpB,OAAO,CAAC,iBAAiB;CAKzB;AAED,yEAAyE;AACzE,wBAAsB,YAAY,CACjC,MAAM,CAAC,EAAE,OAAO,mBAAmB,EAAE,mBAAmB,GACtD,OAAO,CAAC,aAAa,CAAC,CAIxB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"math.d.ts","sourceRoot":"","sources":["../../src/fonts/math.ts"],"names":[],"mappings":"AAAA,yEAAyE;AACzE,OAAO,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{t}from"../chunks/MathFont-BS8IwYh2.mjs";export{t as NOTECTL_MATH_FONT};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"starter.d.ts","sourceRoot":"","sources":["../../src/fonts/starter.ts"],"names":[],"mappings":"AAAA,iEAAiE;AACjE,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,iCAAiC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as r,r as s,t}from"../chunks/StarterFonts-BDQPg-cu.mjs";export{t as FIRA_CODE,r as FIRA_SANS,s as STARTER_FONTS};
|
package/dist/fonts.d.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Starter font definitions (Fira Code + Fira Sans as Base64 WOFF2).
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
4
|
+
* Prefer '@notectl/core/fonts/starter' so native ESM consumers do not also
|
|
5
|
+
* download the independent OpenType MATH font.
|
|
6
6
|
*
|
|
7
7
|
* @example
|
|
8
8
|
* ```ts
|
|
9
|
-
* import { STARTER_FONTS } from '@notectl/core/fonts';
|
|
9
|
+
* import { STARTER_FONTS } from '@notectl/core/fonts/starter';
|
|
10
10
|
*
|
|
11
11
|
* const editor = createEditor({
|
|
12
12
|
* plugins: [new FontPlugin({ fonts: STARTER_FONTS })],
|
|
@@ -20,7 +20,7 @@ export { FIRA_CODE, FIRA_SANS, STARTER_FONTS } from './plugins/font/StarterFonts
|
|
|
20
20
|
* (matrix brackets, large integrals/roots) correctly:
|
|
21
21
|
*
|
|
22
22
|
* ```ts
|
|
23
|
-
* import { NOTECTL_MATH_FONT } from '@notectl/core/fonts';
|
|
23
|
+
* import { NOTECTL_MATH_FONT } from '@notectl/core/fonts/math';
|
|
24
24
|
* new FormulaPlugin({ mathFont: NOTECTL_MATH_FONT });
|
|
25
25
|
* ```
|
|
26
26
|
*/
|
package/dist/fonts.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{n as t,r as s,t as r}from"./chunks/StarterFonts-BDQPg-cu.mjs";import{t as o}from"./chunks/MathFont-BS8IwYh2.mjs";export{r as FIRA_CODE,t as FIRA_SANS,o as NOTECTL_MATH_FONT,s as STARTER_FONTS};
|
package/dist/full.d.ts
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* - `@notectl/core` — core framework (model, state, view, plugin system)
|
|
6
6
|
* - `@notectl/core/html` — HTML serialization/parsing
|
|
7
7
|
* - `@notectl/core/presets` — preset factory functions
|
|
8
|
-
* - `@notectl/core/fonts` —
|
|
8
|
+
* - `@notectl/core/fonts/starter` and `/fonts/math` — embedded font definitions
|
|
9
9
|
* - `@notectl/core/plugins/<name>` — individual plugins
|
|
10
10
|
*
|
|
11
11
|
* @example
|
package/dist/full.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{i as s,n as a,o as m,r}from"./chunks/HTMLUtils-Bhg3_P8B.mjs";import{D as o,E as i,O as t,S as n,T as u,_ as p,b as l,g as c,h as e,i as j,l as g,n as h,o as k,p as f,r as P,s as d,u as b,v as y,w as D,x as T}from"./chunks/Document-827l3P80.mjs";import{i as S,n as x,r as C,t as v}from"./chunks/WordBoundary-CFpIJDNP.mjs";import{a as B,c as N,d as R,f as A,i as F,l as H,n as M,o as _,r as w,s as I,t as z,u as E}from"./chunks/Selection-HYoVFpAx.mjs";import{S as K,_ as L,a as O,b as G,c as U,g as V,h as X,i as q,l as Q,m as W,n as J,o as Y,r as Z,s as $,v as ss,w as as,x as ms,y as rs}from"./chunks/Commands-1dFFldi7.mjs";import{a as os,i as is,n as ts,o as ns,r as us,t as ps}from"./chunks/TypeBrands-Ch9856Gb.mjs";import{n as ls,r as cs,t as es}from"./chunks/AttrRegistry-B3zB02z9.mjs";import{n as js}from"./chunks/DomUtils-Bf7JLFlx.mjs";import{t as gs}from"./chunks/SchemaRegistry-CkBN-1yW.mjs";import{c as hs,i as ks,l as fs,n as Ps,r as ds,s as bs}from"./chunks/NodeResolver-Dleih-8R.mjs";import{r as ys,t as Ds}from"./chunks/ContentModel-NpAj7vGW.mjs";import{A as Ts,C as Ss,D as xs,E as Cs,O as vs,S as Bs,T as Ns,_ as Rs,a as As,b as Fs,c as Hs,d as Ms,f as _s,g as ws,h as Is,i as zs,k as Es,l as Ks,m as Ls,n as Os,o as Gs,p as Us,r as Vs,s as Xs,t as qs,u as Qs,v as Ws,w as Js,x as Ys,y as Zs}from"./chunks/src-DiAOfuOT.mjs";import{C as $s,S as sa,_ as aa,a as ma,c as ra,i as oa,l as ia,o as ta,r as na,s as ua,t as pa,v as la,x as ca,y as ea}from"./chunks/Decoration-BpoEOANl.mjs";import{i as ja,n as ga,r as ha,t as ka}from"./chunks/GapCursorNavigation-BuXngVu-.mjs";import{A as fa,D as Pa,E as da,F as ba,M as ya,N as Da,O as Ta,P as Sa,S as xa,T as Ca,_ as va,a as Ba,b as Na,c as Ra,d as Aa,f as Fa,g as Ha,h as Ma,i as _a,j as wa,k as Ia,l as za,m as Ea,n as Ka,o as La,p as Oa,r as Ga,s as Ua,t as Va,u as Xa,v as qa,w as Qa,x as Wa,y as Ja}from"./chunks/CaretNavigationPlugin-CNsT0eb4.mjs";import{i as Ya,n as Za,o as $a,r as sm,t as am}from"./chunks/NavigationQueries-Bt4zZ17v.mjs";import{i as mm,n as rm,r as om,t as im}from"./chunks/AttributedMarkCommands-bagbH8Qt.mjs";import{i as tm,t as nm}from"./chunks/NodeSelectionCommands-1PjwUDTJ.mjs";import{n as um,t as pm}from"./chunks/RangeIterator-DP7Ud3Gp.mjs";import{a as lm,i as cm,n as em,r as jm,t as gm}from"./chunks/Platform-ByobkiCc.mjs";import{f as hm,h as km,m as fm,p as Pm}from"./chunks/TableDimensions-BBhjHNjQ.mjs";import{t as dm}from"./chunks/DocumentParser-D2tr3ZKn.mjs";import{n as bm,t as ym}from"./chunks/TypedKeys-CA4bfw9O.mjs";import{t as Dm}from"./chunks/BlockTypePickerRegistry-BTET9jM-.mjs";import{a as Tm,i as Sm,n as xm,o as Cm,r as vm,t as Bm}from"./chunks/ToolbarPlugin-DtfGTO_V.mjs";import{t as Nm}from"./chunks/SyntaxTokenTypes-BUCOMtL8.mjs";import{_ as Rm,b as Am,c as Fm,d as Hm,f as Mm,g as _m,h as wm,l as Im,m as zm,n as Em,p as Km,r as Lm,s as Om,t as Gm,u as Um,v as Vm,y as Xm}from"./chunks/PrintTypes-CxU69qu3.mjs";import{c as qm,i as Qm,l as Wm,r as Jm,t as Ym,u as Zm}from"./chunks/PluginHelpers-Dx_0hfDe.mjs";import{t as $m}from"./chunks/GapCursorPlugin-DAxVzXRs.mjs";import{t as sr}from"./chunks/MarkInputRule-Bdi8KPus.mjs";import{t as ar}from"./chunks/ShortcutFormatting-TwiufqeV.mjs";import{n as mr,r as rr,t as or}from"./chunks/TextFormattingPlugin-DBVlePqj.mjs";import{n as ir,r as tr,t as nr}from"./chunks/KeyboardNav-D0my3wuy.mjs";import{i as ur,t as pr}from"./chunks/PopupPositioning-BFh6Ed1D.mjs";import{n as lr,t as cr}from"./chunks/PopupManager-CT-fMZJn.mjs";import"./html.mjs";import{n as er,r as jr,t as gr}from"./chunks/FontPlugin-By-TGrQo.mjs";import{a as hr,i as kr,n as fr,r as Pr,t as dr}from"./chunks/ColorValidation-DAijTjG9.mjs";import{t as br}from"./chunks/minimal-CFkkPXef.mjs";import{i as yr,n as Dr,r as Tr,t as Sr}from"./chunks/AlignmentPlugin--xAFlRqE.mjs";import{t as xr}from"./chunks/DirectionIcons-Bbawl9ei.mjs";import{t as Cr}from"./chunks/TextDirectionService-BcX07mw2.mjs";import{n as vr,r as Br,t as Nr}from"./chunks/BidiIsolationPlugin-DBXyXpgm.mjs";import{n as Rr,r as Ar,t as Fr}from"./chunks/BlockquotePlugin-Bz2glHwX.mjs";import{a as Hr,i as Mr,n as _r,o as wr,r as Ir,t as zr}from"./chunks/CodeBlockPlugin-C1hrdbSZ.mjs";import{a as Er,i as Kr,l as Lr,n as Or,o as Gr,r as Ur,s as Vr,t as Xr}from"./chunks/XmlDetector-D7TQpw-e.mjs";import{a as qr,c as Qr,i as Wr,n as Jr,o as Yr,r as Zr,s as $r,t as so}from"./chunks/XmlSupport-BYiRwlkK.mjs";import{n as ao,t as mo}from"./chunks/XmlPatterns-RN32-0ob.mjs";import{n as ro,r as oo,t as io}from"./chunks/PopupKeyboardPatterns-tUrT9TyV.mjs";import{n as to,r as no,t as uo}from"./chunks/FontSizePlugin-Dln-tYXV.mjs";import{a as po,c as lo,i as co,n as eo,o as jo,r as go,s as ho,t as ko}from"./chunks/FormulaPlugin-By1befrR.mjs";import{t as fo}from"./chunks/HardBreakPlugin-DlbSlrdq.mjs";import{n as Po,r as bo,t as yo}from"./chunks/HeadingPlugin-uMAjPOk5.mjs";import{a as Do,i as To,n as So,r as xo,t as Co}from"./chunks/ColorPickerPopup-DiA68Pzz.mjs";import{n as vo,r as Bo,t as No}from"./chunks/ColorGrid-C9RQoEWF.mjs";import{n as Ro,r as Ao,t as Fo}from"./chunks/HighlightPlugin-Bj7FPkIQ.mjs";import{n as Ho,r as Mo,t as _o}from"./chunks/HorizontalRulePlugin-DUVmTQpX.mjs";import{a as wo,i as Io,n as zo,r as Eo,t as Ko}from"./chunks/ImagePlugin-FToCOjd5.mjs";import{n as Lo,r as Oo,t as Go}from"./chunks/InlineCodePlugin-pISIoGQE.mjs";import{n as Uo,r as Vo,t as Xo}from"./chunks/LinkPlugin-Ct5Z180S.mjs";import{n as qo,r as Qo,t as Wo}from"./chunks/ListPlugin-DAY5ezNs.mjs";import{n as Jo,r as Yo,t as Zo}from"./chunks/PrintPlugin-7zz9mhhU.mjs";import{i as $o,n as si,r as ai,t as mi}from"./chunks/SmartPastePlugin-CYa_nD9v.mjs";import{n as ri,r as oi,t as ii}from"./chunks/StrikethroughPlugin-C2oWvGc3.mjs";import{n as ti,r as ni,t as ui}from"./chunks/SuperSubPlugin-D1xaKrSu.mjs";import{a as pi,i as li,n as ci,o as ei,r as ji,t as gi}from"./chunks/TablePlugin-PJe3zwr-.mjs";import{n as hi,r as ki,t as fi}from"./chunks/TextColorPlugin-CTd9tfeG.mjs";import{n as Pi,r as di,t as bi}from"./chunks/DirectionDetection-CDVSEWQ6.mjs";import{t as yi}from"./chunks/TextDirectionAutoPlugin-CPnKVVuI.mjs";import{n as Di,r as Ti,t as Si}from"./chunks/TextDirectionPlugin-Bns_03vL.mjs";import{a as xi,i as Ci,n as vi,o as Bi,r as Ni,s as Ri,t as Ai}from"./chunks/VideoPlugin-BrR8g6Rz.mjs";import{t as Fi}from"./chunks/full-DSWM4cKQ.mjs";import"./presets.mjs";import{i as Hi,n as Mi,r as _i,t as wi}from"./chunks/fonts-DQC6Uj4r.mjs";import"./plugins/text-formatting.mjs";import"./plugins/heading.mjs";import"./plugins/toolbar.mjs";import"./plugins/shared.mjs";import"./plugins/table.mjs";import"./plugins/image.mjs";import"./plugins/formula.mjs";import"./plugins/video.mjs";import"./plugins/code-block.mjs";import"./plugins/link.mjs";import"./plugins/list.mjs";import"./plugins/blockquote.mjs";import"./plugins/strikethrough.mjs";import"./plugins/inline-code.mjs";import"./plugins/text-color.mjs";import"./plugins/horizontal-rule.mjs";import"./plugins/alignment.mjs";import"./plugins/font.mjs";import"./plugins/font-size.mjs";import"./plugins/highlight.mjs";import"./plugins/super-sub.mjs";import"./plugins/hard-break.mjs";import"./plugins/gap-cursor.mjs";import"./plugins/caret-navigation.mjs";import"./plugins/print.mjs";import"./plugins/smart-paste.mjs";import"./plugins/language.mjs";import"./plugins/text-direction.mjs";import"./plugins/bidi-isolation.mjs";import"./plugins/text-direction-auto.mjs";export{Gm as AFTER_PRINT,Sr as ALIGNMENT_ICONS,Tr as ALIGNMENT_LOCALE_EN,Dr as AlignmentPlugin,Em as BEFORE_PRINT,vr as BIDI_ISOLATION_LOCALE_EN,Rr as BLOCKQUOTE_LOCALE_EN,Nr as BidiIsolationPlugin,Dm as BlockTypePickerRegistry,Fr as BlockquotePlugin,Ka as CARET_NAVIGATION_LOCALE_EN,_r as CODE_BLOCK_LOCALE_EN,Hr as CODE_BLOCK_SERVICE_KEY,Va as CaretNavigationPlugin,Ys as ClipboardHandler,zr as CodeBlockPlugin,Fs as CompositionTracker,Ls as CursorWrapper,_m as DARK_THEME,ho as DEFAULT_FORMULA_KEYMAP,zo as DEFAULT_IMAGE_KEYMAP,Er as DEFAULT_RELEVANCE_WEIGHTS,ci as DEFAULT_TABLE_SIZING_CONFIG,Ci as DEFAULT_VIDEO_CONFIG,xi as DEFAULT_VIDEO_KEYMAP,Bi as DEFAULT_VIDEO_PROVIDERS,xr as DIRECTION_ICONS,pa as DecorationSet,vs as EditorState,Qs as EventBus,ym as EventKey,Mi as FIRA_CODE,_i as FIRA_SANS,er as FONT_LOCALE_EN,to as FONT_SIZE_LOCALE_EN,eo as FORMULA_LOCALE_EN,ws as FileHandlerRegistry,gr as FontPlugin,uo as FontSizePlugin,ko as FormulaPlugin,$m as GapCursorPlugin,Po as HEADING_LOCALE_EN,Ro as HIGHLIGHT_LOCALE_EN,Ho as HORIZONTAL_RULE_LOCALE_EN,fo as HardBreakPlugin,yo as HeadingPlugin,Fo as HighlightPlugin,Ss as HistoryManager,_o as HorizontalRulePlugin,aa as IDENTITY_MAP,Io as IMAGE_LOCALE_EN,Eo as IMAGE_UPLOAD_SERVICE,Lo as INLINE_CODE_LOCALE_EN,Ko as ImagePlugin,Go as InlineCodePlugin,Zs as InputManager,Rs as InputRuleRegistry,Qr as JAVA_LANGUAGE,$r as JAVA_SUPPORT,Yr as JSON_LANGUAGE,qr as JSON_SUPPORT,Or as JsonDetector,Ws as KeymapRegistry,Lr as LANGUAGE_REGISTRY_SERVICE_KEY,Rm as LIGHT_THEME,Uo as LINK_LOCALE_EN,qo as LIST_LOCALE_EN,Ur as LexerDetector,Xo as LinkPlugin,Wo as ListPlugin,Hs as Locale,Wm as LocaleService,Zm as LocaleServiceKey,po as MATHML_ATTRS,jo as MATHML_TAGS,Gr as MAX_RELEVANCE_WEIGHT,la as Mapping,wi as NOTECTL_MATH_FONT,Is as NodeViewRegistry,qs as NotectlEditor,Om as PAPER_MARGIN_HORIZONTAL_PX,Fm as PAPER_MARGIN_TOP_PX,Im as PAPER_VIEWPORT_PADDING_PX,Jo as PRINT_LOCALE_EN,Lm as PRINT_SERVICE_KEY,Um as PaperSize,Ks as PluginManager,cr as PopupManager,lr as PopupServiceKey,Zo as PrintPlugin,Mr as RegexTokenizer,ai as SMART_PASTE_LOCALE_EN,si as SMART_PASTE_SERVICE_KEY,Hi as STARTER_FONTS,ri as STRIKETHROUGH_LOCALE_EN,ti as SUPER_SUB_LOCALE_EN,wr as SYNTAX_HIGHLIGHTER_SERVICE_KEY,Nm as SYNTAX_TOKEN_TYPES,gs as SchemaRegistry,bm as ServiceKey,mi as SmartPastePlugin,ii as StrikethroughPlugin,ui as SuperSubPlugin,pi as TABLE_LOCALE_EN,hi as TEXT_COLOR_LOCALE_EN,Di as TEXT_DIRECTION_LOCALE_EN,Cr as TEXT_DIRECTION_SERVICE_KEY,mr as TEXT_FORMATTING_LOCALE_EN,Sm as TOOLBAR_LOCALE_EN,Wr as TYPESCRIPT_LANGUAGE,Zr as TYPESCRIPT_SUPPORT,gi as TablePlugin,li as TableSelectionServiceKey,ji as TableSizingServiceKey,fi as TextColorPlugin,yi as TextDirectionAutoPlugin,Si as TextDirectionPlugin,or as TextFormattingPlugin,Vm as ThemePreset,vm as ToolbarOverflowBehavior,Bm as ToolbarPlugin,Cm as ToolbarRegistry,xm as ToolbarServiceKey,Es as TransactionBuilder,hm as VALID_ALIGNMENTS,Pm as VALID_DIRECTIONS,vi as VIDEO_LOCALE_EN,Ai as VideoPlugin,mo as XML_ATTRS,Jr as XML_LANGUAGE,so as XML_SUPPORT,ao as XML_TAG_NAME,Xr as XmlDetector,Vs as adoptContentStyles,pr as appendToRoot,im as applyAttributedMark,So as applyColorMark,nr as applyRovingTabindex,ta as applyStep,io as attachGridKeyboard,ro as attachListboxKeyboard,oo as attachMenuKeyboard,h as blockAttrValuesEqual,P as blockAttrsEqual,ps as blockId,j as blockOffsetToTextOffset,lo as buildMathML,Ds as canContain,am as canCrossBlockBoundary,Ym as capitalize,ea as collectRemovedBlockIds,ts as commandName,Vr as computeTokenStats,Ms as consoleLogger,js as createBlockElement,k as createBlockNode,z as createCollapsedSelection,d as createDocument,Os as createEditor,Fi as createFullPreset,M as createGapCursor,g as createInlineNode,sr as createMarkInputRule,br as createMinimalPreset,w as createNodeSelection,F as createPosition,B as createSelection,b as createTextNode,Xm as createTheme,zm as createThemeStyleSheet,ms as defaultSchema,U as deleteBackward,rs as deleteBackwardAtGap,Q as deleteForward,G as deleteForwardAtGap,nm as deleteNodeSelection,J as deleteSelectionCommand,bi as detectTextDirection,qa as endOfTextblock,a as escapeAttr,r as escapeHTML,Qa as extendCharacterBackward,Ca as extendCharacterForward,_a as extendLineDown,Ba as extendLineUp,da as extendToBlockEnd,Pa as extendToBlockStart,Ta as extendToDocumentEnd,Ia as extendToDocumentStart,La as extendToLineEnd,Ua as extendToLineStart,ga as extendTx,Ra as extendWordBackward,za as extendWordForward,ir as findNextDropdownItem,Ps as findNode,ds as findNodePath,ks as findNodeWithPath,Pi as findSiblingDirection,v as findWordBoundaryBackward,x as findWordBoundaryForward,pm as forEachBlockIdInRange,um as forEachBlockInRange,s as formatHTML,ar as formatShortcut,wm as generateThemeCSS,xo as getActiveColor,f as getBlockChildren,di as getBlockDir,e as getBlockLength,c as getBlockMarksAtOffset,p as getBlockText,Xs as getBlockTypeLabel,Ja as getCaretRectFromSelection,vo as getColorName,y as getContentAtOffset,l as getInlineChildren,rm as getMarkAttrAtSelection,Hm as getPaperCSSSize,Mm as getPaperDimensions,Jm as getSelectedBlock,Qm as getSelectedBlockId,ua as getStepMap,T as getTextChildren,gm as getTextDirection,n as hasMark,zs as injectContentStyles,na as inlineDecoration,us as inlineType,Z as insertHardBreakCommand,q as insertTextCommand,ra as invertStep,ia as invertTransaction,Js as isAllowedInReadonly,om as isAttributedMarkActive,D as isBlockNode,_ as isCollapsed,To as isColorMarkActive,em as isFirefox,I as isForward,N as isGapCursor,u as isInlineNode,es as isInlineNodeOfType,Za as isInsideIsolating,sm as isIsolatingBlock,i as isLeafBlock,Bo as isLightColor,jm as isMac,W as isMarkActive,K as isMarkAllowed,ls as isMarkOfType,cs as isNodeOfType,H as isNodeSelection,cm as isRtlContext,Ns as isSelectionOnlyTransaction,o as isTextNode,E as isTextSelection,dr as isValidCSSColor,fr as isValidCSSFontFamily,Pr as isValidCSSFontSize,kr as isValidHexColor,Km as isValidPaperSize,Ya as isVoidBlock,lm as isWebKit,co as latexToMathML,yr as loadAlignmentLocale,Br as loadBidiIsolationLocale,Ar as loadBlockquoteLocale,Ga as loadCaretNavigationLocale,Ir as loadCodeBlockLocale,jr as loadFontLocale,no as loadFontSizeLocale,go as loadFormulaLocale,bo as loadHeadingLocale,Ao as loadHighlightLocale,Mo as loadHorizontalRuleLocale,wo as loadImageLocale,Oo as loadInlineCodeLocale,Vo as loadLinkLocale,Qo as loadListLocale,qm as loadLocaleModule,Yo as loadPrintLocale,$o as loadSmartPasteLocale,oi as loadStrikethroughLocale,ni as loadSuperSubLocale,ei as loadTableLocale,ki as loadTextColorLocale,Ti as loadTextDirectionLocale,rr as loadTextFormattingLocale,Tm as loadToolbarLocale,Ni as loadVideoLocale,ca as mapChildIndex,sa as mapInsertionIndex,$s as mapPositionThroughStep,Cs as mapSelection,xs as mapTextSelection,t as markSetsEqual,is as markType,O as mergeBlockBackward,fa as moveCharacterBackward,wa as moveCharacterForward,Xa as moveLineDown,Aa as moveLineUp,Sa as moveToBlockEnd,ba as moveToBlockStart,ya as moveToDocumentEnd,Da as moveToDocumentStart,Fa as moveToLineEnd,Oa as moveToLineStart,ha as moveTx,Ea as moveWordBackward,Ma as moveWordForward,Na as navigateAcrossBlocks,tm as navigateArrowIntoVoid,ka as navigateFromGapCursor,tr as navigateGrid,Wa as navigateVerticalWithGoalColumn,C as nextGraphemeSize,oa as nodeDecoration,ja as nodeSelTx,os as nodeType,m as normalizeHTMLId,Bs as normalizeKeyDescriptor,dm as parseHTMLToDocument,Ri as parseVideoUrl,ns as pluginId,ur as positionPopup,S as prevGraphemeSize,Ts as registerBuiltinSpecs,As as removeAdoptedStyles,mm as removeAttributedMark,Do as removeColorMark,Gs as removeContentStyles,No as renderColorGrid,Co as renderColorPickerPopup,hr as resolveColors,bs as resolveNodeByPath,hs as resolveParentByPath,Am as resolveTheme,as as schemaFromRegistry,_s as scopedLogger,Kr as scoreFromStats,Y as selectAll,R as selectionRange,A as selectionsEqual,fm as serializeDocumentToCSS,km as serializeDocumentToHTML,$a as sharesParent,Us as silentLogger,xa as skipInlineNode,$ as splitBlockCommand,X as toggleBold,V as toggleItalic,L as toggleMark,ss as toggleUnderline,ys as validateContent,Ha as viewExtend,va as viewMove,fs as walkNodes,ma as widgetDecoration};
|
|
1
|
+
import{i as s,n as a,o as m,r}from"./chunks/HTMLUtils-B0nGyFLb.mjs";import{A as o,B as i,D as t,F as n,H as u,I as p,M as c,P as l,R as e,V as j,_ as h,g,i as k,j as f,k as P,m as d,n as T,p as b,r as D,z as S}from"./chunks/Document-D_2cIBJG.mjs";import{c as C,i as x,l as y,n as M,r as v,s as R}from"./chunks/NodeResolver-BtIknXqD.mjs";import{a as F,c as I,d as A,f as B,i as H,l as N,m as z,n as _,o as w,p as E,r as K,u as L}from"./chunks/Selection-DC6AOGgF.mjs";import{a as V,i as G,n as O,o as U,r as X,t as q}from"./chunks/TypeBrands-Ch9856Gb.mjs";import{i as Q,n as W,o as Y,r as $,t as J}from"./chunks/NavigationQueries-Bt4zZ17v.mjs";import{r as Z,t as ss}from"./chunks/ContentModel-Bzmzeqwg.mjs";import{i as as,t as ms}from"./chunks/NodeSelectionCommands-DK3iEh18.mjs";import{a as rs,c as os,i as is,l as ts,n as ns,r as us,s as ps,u as cs}from"./chunks/Commands-D-0UXYvo.mjs";import{a as ls,i as es,l as js,n as hs,o as gs,r as ks,s as fs,t as Ps}from"./chunks/MarkCommands-CJvLGL5G.mjs";import{n as ds,t as Ts}from"./chunks/RangeIterator-DDOxTQIf.mjs";import{A as bs,C as Ds,D as Ss,E as Cs,I as xs,L as ys,M as Ms,N as vs,O as Rs,P as Fs,R as Is,S as As,T as Bs,_ as Hs,a as Ns,b as zs,c as _s,d as ws,f as Es,g as Ks,h as Ls,i as Vs,j as Gs,k as Os,l as Us,m as Xs,n as qs,o as Qs,p as Ws,r as Ys,s as $s,t as Js,u as Zs,v as sa,w as aa,x as ma,y as ra,z as oa}from"./chunks/CaretNavigationPlugin-Clv8dzR5.mjs";import{A as ia,C as ta,D as na,E as ua,M as pa,N as ca,O as la,S as ea,T as ja,_ as ha,a as ga,b as ka,c as fa,d as Pa,f as da,g as Ta,h as ba,i as Da,j as Sa,k as Ca,l as xa,m as ya,n as Ma,o as va,p as Ra,r as Fa,s as Ia,t as Aa,u as Ba,v as Ha,w as Na,x as za,y as _a}from"./chunks/register-CF80zDgl.mjs";import{n as wa,r as Ea,t as Ka}from"./chunks/AttrRegistry-CtNhf2EF.mjs";import{i as La,n as Va,r as Ga,t as Oa}from"./chunks/AttributedMarkCommands-B3MQdob_.mjs";import{_ as Ua,a as Xa,c as qa,d as Qa,f as Wa,g as Ya,h as $a,i as Ja,l as Za,m as sm,n as am,o as mm,p as rm,r as om,s as im,t as tm,u as nm}from"./chunks/ThemeEngine-D4W6Y80e.mjs";import{f as um,h as pm,m as cm,p as lm}from"./chunks/TableDimensions-BcARMxQB.mjs";import{t as em}from"./chunks/DocumentParser-i-CreJ48.mjs";import{a as jm,c as hm,d as gm,h as km,i as fm,l as Pm,o as dm,p as Tm,s as bm,t as Dm}from"./chunks/Decoration-BwhoA4MU.mjs";import{t as Sm}from"./chunks/SyntaxTokenTypes-BUCOMtL8.mjs";import{n as Cm,t as xm}from"./chunks/TypedKeys-CA4bfw9O.mjs";import{c as ym,i as Mm,l as vm,r as Rm,t as Fm,u as Im}from"./chunks/PluginHelpers-WG1Lzzh3.mjs";import{a as Am,i as Bm,n as Hm,r as Nm,t as zm}from"./chunks/Platform-ByobkiCc.mjs";import{t as _m}from"./chunks/SchemaRegistry-acc6q_5x.mjs";import{t as wm}from"./chunks/BlockTypePickerRegistry-BTET9jM-.mjs";import{a as Em,i as Km,n as Lm,o as Vm,r as Gm,t as Om}from"./chunks/ToolbarPlugin-ClKY-LiT.mjs";import{n as Um,r as Xm,t as qm}from"./chunks/SelectionTransactions-DNCzsl_b.mjs";import{n as Qm}from"./chunks/DomUtils-Bf7JLFlx.mjs";import{n as Wm,t as Ym}from"./chunks/GapCursorPlugin-NozsEK9J.mjs";import{t as $m}from"./chunks/MarkInputRule-DNneF2gp.mjs";import{t as Jm}from"./chunks/ShortcutFormatting-TwiufqeV.mjs";import{n as Zm,r as sr,t as ar}from"./chunks/TextFormattingPlugin-DlS0SeW7.mjs";import{n as mr,r as rr,t as or}from"./chunks/KeyboardNav-D0my3wuy.mjs";import{i as ir,t as tr}from"./chunks/PopupPositioning-CIqgpqlW.mjs";import{n as nr,t as ur}from"./chunks/PopupManager-Jz5JrUdC.mjs";import{a as pr,i as cr,n as lr,r as er,t as jr}from"./chunks/src-5GKFQ2mQ.mjs";import"./html.mjs";import{n as hr,r as gr,t as kr}from"./chunks/FontPlugin-B4Ouhmpe.mjs";import{a as fr,i as Pr,n as dr,r as Tr,t as br}from"./chunks/ColorValidation-B9d_umnf.mjs";import{t as Dr}from"./chunks/minimal-Bykbo9So.mjs";import{i as Sr,n as Cr,r as xr,t as yr}from"./chunks/AlignmentPlugin-DIwrRsHd.mjs";import{t as Mr}from"./chunks/DirectionIcons-Bbawl9ei.mjs";import{t as vr}from"./chunks/TextDirectionService-OFOU6r_s.mjs";import{n as Rr,r as Fr,t as Ir}from"./chunks/BidiIsolationPlugin-cOLlL3Y9.mjs";import{n as Ar,r as Br,t as Hr}from"./chunks/BlockquotePlugin-D-jRWLQB.mjs";import{a as Nr,i as zr,n as _r,o as wr,r as Er,t as Kr}from"./chunks/CodeBlockPlugin-BandNM3t.mjs";import{i as Lr,n as Vr,o as Gr,r as Or,t as Ur}from"./chunks/xml-BsV44TrJ.mjs";import{n as Xr,t as qr}from"./chunks/XmlPatterns-RN32-0ob.mjs";import{n as Qr,r as Wr,t as Yr}from"./chunks/PopupKeyboardPatterns-BcwdDxRq.mjs";import{n as $r,r as Jr,t as Zr}from"./chunks/FontSizePlugin-CZB-AwZQ.mjs";import{a as so,c as ao,i as mo,n as ro,o as oo,r as io,s as to,t as no}from"./chunks/FormulaPlugin-C7N3QXDx.mjs";import{t as uo}from"./chunks/HardBreakPlugin-CC4rntSX.mjs";import{n as po,r as co,t as lo}from"./chunks/HeadingPlugin-hubN_Ebt.mjs";import{a as eo,i as jo,n as ho,r as go,t as ko}from"./chunks/ColorPickerPopup-_C5JZhki.mjs";import{n as fo,r as Po,t as To}from"./chunks/ColorGrid-D0vLHsG6.mjs";import{n as bo,r as Do,t as So}from"./chunks/HighlightPlugin-CE_MgFNz.mjs";import{n as Co,r as xo,t as yo}from"./chunks/HorizontalRulePlugin-CxmUMM34.mjs";import{a as Mo,i as vo,n as Ro,r as Fo,t as Io}from"./chunks/ImagePlugin-B_y4STEr.mjs";import{n as Ao,r as Bo,t as Ho}from"./chunks/InlineCodePlugin-C1SqGfv5.mjs";import{n as No,r as zo,t as _o}from"./chunks/LinkPlugin-BwXDGHPe.mjs";import{n as wo,r as Eo,t as Ko}from"./chunks/ListPlugin-DSFPSWQC.mjs";import{n as Lo,r as Vo,t as Go}from"./chunks/PrintPlugin-1m54b2-Y.mjs";import{a as Oo,c as Uo,d as Xo,i as qo,l as Qo,n as Wo,o as Yo,r as $o,s as Jo,t as Zo,u as si}from"./chunks/XmlSupport-3Za6SIqF.mjs";import{i as ai,n as mi,r as ri,t as oi}from"./chunks/SmartPastePlugin-CjExbE9Q.mjs";import{n as ii,r as ti,t as ni}from"./chunks/StrikethroughPlugin-d-EW2YYx.mjs";import{n as ui,r as pi,t as ci}from"./chunks/SuperSubPlugin-C-kvFQyx.mjs";import{a as li,i as ei,n as ji,o as hi,r as gi,t as ki}from"./chunks/TablePlugin-B894cIXW.mjs";import{n as fi,r as Pi,t as di}from"./chunks/TextColorPlugin-B6YoN9mR.mjs";import{n as Ti,r as bi,t as Di}from"./chunks/DirectionDetection-ZrkMhyaL.mjs";import{t as Si}from"./chunks/TextDirectionAutoPlugin-LVDkKdDX.mjs";import{n as Ci,r as xi,t as yi}from"./chunks/TextDirectionPlugin-CtGwof7i.mjs";import{a as Mi,i as vi,n as Ri,o as Fi,r as Ii,s as Ai,t as Bi}from"./chunks/VideoPlugin-C9z4JfP_.mjs";import{t as Hi}from"./chunks/full-CNi2CaF3.mjs";import"./presets.mjs";import{n as Ni,r as zi,t as _i}from"./chunks/StarterFonts-BDQPg-cu.mjs";import{t as wi}from"./chunks/MathFont-BS8IwYh2.mjs";import"./fonts.mjs";import"./plugins/text-formatting.mjs";import"./plugins/heading.mjs";import"./plugins/toolbar.mjs";import"./plugins/shared.mjs";import"./plugins/table.mjs";import"./plugins/image.mjs";import"./plugins/formula.mjs";import"./plugins/video.mjs";import"./plugins/code-block.mjs";import"./plugins/link.mjs";import"./plugins/list.mjs";import"./plugins/blockquote.mjs";import"./plugins/strikethrough.mjs";import"./plugins/inline-code.mjs";import"./plugins/text-color.mjs";import"./plugins/horizontal-rule.mjs";import"./plugins/alignment.mjs";import"./plugins/font.mjs";import"./plugins/font-size.mjs";import"./plugins/highlight.mjs";import"./plugins/super-sub.mjs";import"./plugins/hard-break.mjs";import"./plugins/gap-cursor.mjs";import"./plugins/caret-navigation.mjs";import"./plugins/print.mjs";import"./plugins/smart-paste.mjs";import"./plugins/language.mjs";import"./plugins/text-direction.mjs";import"./plugins/bidi-isolation.mjs";import"./plugins/text-direction-auto.mjs";export{om as AFTER_PRINT,yr as ALIGNMENT_ICONS,xr as ALIGNMENT_LOCALE_EN,Cr as AlignmentPlugin,Ja as BEFORE_PRINT,Rr as BIDI_ISOLATION_LOCALE_EN,Ar as BLOCKQUOTE_LOCALE_EN,Ir as BidiIsolationPlugin,wm as BlockTypePickerRegistry,Hr as BlockquotePlugin,qs as CARET_NAVIGATION_LOCALE_EN,_r as CODE_BLOCK_LOCALE_EN,Nr as CODE_BLOCK_SERVICE_KEY,Js as CaretNavigationPlugin,ea as ClipboardHandler,Kr as CodeBlockPlugin,za as CompositionTracker,Ia as CursorWrapper,mm as DARK_THEME,to as DEFAULT_FORMULA_KEYMAP,Ro as DEFAULT_IMAGE_KEYMAP,Qo as DEFAULT_RELEVANCE_WEIGHTS,ji as DEFAULT_TABLE_SIZING_CONFIG,vi as DEFAULT_VIDEO_CONFIG,Mi as DEFAULT_VIDEO_KEYMAP,Fi as DEFAULT_VIDEO_PROVIDERS,Mr as DIRECTION_ICONS,Dm as DecorationSet,Da as EditorInitializationAbortedError,ua as EditorState,da as EventBus,xm as EventKey,_i as FIRA_CODE,Ni as FIRA_SANS,hr as FONT_LOCALE_EN,$r as FONT_SIZE_LOCALE_EN,ro as FORMULA_LOCALE_EN,Ta as FileHandlerRegistry,kr as FontPlugin,Zr as FontSizePlugin,no as FormulaPlugin,Ym as GapCursorPlugin,po as HEADING_LOCALE_EN,bo as HIGHLIGHT_LOCALE_EN,Co as HORIZONTAL_RULE_LOCALE_EN,uo as HardBreakPlugin,lo as HeadingPlugin,So as HighlightPlugin,Ba as HistoryManager,yo as HorizontalRulePlugin,bm as IDENTITY_MAP,vo as IMAGE_LOCALE_EN,Fo as IMAGE_UPLOAD_SERVICE,Ao as INLINE_CODE_LOCALE_EN,Io as ImagePlugin,Ho as InlineCodePlugin,ha as InputManager,ba as InputRuleRegistry,Lr as JAVA_LANGUAGE,Yo as JAVA_SUPPORT,Or as JSON_LANGUAGE,qo as JSON_SUPPORT,Oo as JsonDetector,ya as KeymapRegistry,Gr as LANGUAGE_REGISTRY_SERVICE_KEY,im as LIGHT_THEME,No as LINK_LOCALE_EN,wo as LIST_LOCALE_EN,Jo as LexerDetector,_o as LinkPlugin,Ko as ListPlugin,pr as Locale,vm as LocaleService,Im as LocaleServiceKey,so as MATHML_ATTRS,oo as MATHML_TAGS,si as MAX_RELEVANCE_WEIGHT,hm as Mapping,wi as NOTECTL_MATH_FONT,Ra as NodeViewRegistry,Ma as NotectlEditor,Qa as PAPER_MARGIN_HORIZONTAL_PX,Wa as PAPER_MARGIN_TOP_PX,rm as PAPER_VIEWPORT_PADDING_PX,Lo as PRINT_LOCALE_EN,Xa as PRINT_SERVICE_KEY,sm as PaperSize,Pa as PluginManager,ur as PopupManager,nr as PopupServiceKey,Go as PrintPlugin,zr as RegexTokenizer,ri as SMART_PASTE_LOCALE_EN,mi as SMART_PASTE_SERVICE_KEY,zi as STARTER_FONTS,ii as STRIKETHROUGH_LOCALE_EN,ui as SUPER_SUB_LOCALE_EN,wr as SYNTAX_HIGHLIGHTER_SERVICE_KEY,Sm as SYNTAX_TOKEN_TYPES,_m as SchemaRegistry,Cm as ServiceKey,oi as SmartPastePlugin,ni as StrikethroughPlugin,ci as SuperSubPlugin,li as TABLE_LOCALE_EN,fi as TEXT_COLOR_LOCALE_EN,Ci as TEXT_DIRECTION_LOCALE_EN,vr as TEXT_DIRECTION_SERVICE_KEY,Zm as TEXT_FORMATTING_LOCALE_EN,Km as TOOLBAR_LOCALE_EN,Vr as TYPESCRIPT_LANGUAGE,$o as TYPESCRIPT_SUPPORT,ki as TablePlugin,ei as TableSelectionServiceKey,gi as TableSizingServiceKey,di as TextColorPlugin,Si as TextDirectionAutoPlugin,yi as TextDirectionPlugin,ar as TextFormattingPlugin,qa as ThemePreset,Gm as ToolbarOverflowBehavior,Om as ToolbarPlugin,Vm as ToolbarRegistry,Lm as ToolbarServiceKey,na as TransactionBuilder,um as VALID_ALIGNMENTS,lm as VALID_DIRECTIONS,Ri as VIDEO_LOCALE_EN,Bi as VideoPlugin,qr as XML_ATTRS,Ur as XML_LANGUAGE,Zo as XML_SUPPORT,Xr as XML_TAG_NAME,Wo as XmlDetector,jr as adoptContentStyles,tr as appendToRoot,Oa as applyAttributedMark,ho as applyColorMark,or as applyRovingTabindex,la as applyStep,Yr as attachGridKeyboard,Qr as attachListboxKeyboard,Wr as attachMenuKeyboard,T as blockAttrValuesEqual,D as blockAttrsEqual,q as blockId,k as blockOffsetToTextOffset,ao as buildMathML,ss as canContain,J as canCrossBlockBoundary,Fm as capitalize,Pm as collectRemovedBlockIds,O as commandName,Xo as computeTokenStats,ta as consoleLogger,Qm as createBlockElement,b as createBlockNode,_ as createCollapsedSelection,d as createDocument,Fa as createEditor,Hi as createFullPreset,K as createGapCursor,g as createInlineNode,$m as createMarkInputRule,Dr as createMinimalPreset,H as createNodeSelection,F as createPosition,w as createSelection,h as createTextNode,Za as createTheme,tm as createThemeStyleSheet,gs as defaultSchema,pa as deleteBackward,ts as deleteBackwardAtGap,ca as deleteForward,cs as deleteForwardAtGap,ms as deleteNodeSelection,ns as deleteSelectionCommand,Di as detectTextDirection,bs as endOfTextblock,a as escapeAttr,r as escapeHTML,sa as extendCharacterBackward,ra as extendCharacterForward,Vs as extendLineDown,Ns as extendLineUp,zs as extendToBlockEnd,ma as extendToBlockStart,As as extendToDocumentEnd,Ds as extendToDocumentStart,Qs as extendToLineEnd,$s as extendToLineStart,qm as extendTx,_s as extendWordBackward,Us as extendWordForward,mr as findNextDropdownItem,M as findNode,v as findNodePath,x as findNodeWithPath,Ti as findSiblingDirection,xs as findWordBoundaryBackward,ys as findWordBoundaryForward,Ts as forEachBlockIdInRange,ds as forEachBlockInRange,s as formatHTML,Jm as formatShortcut,am as generateThemeCSS,go as getActiveColor,t as getBlockChildren,bi as getBlockDir,P as getBlockLength,o as getBlockMarksAtOffset,f as getBlockText,va as getBlockTypeLabel,Gs as getCaretRectFromSelection,fo as getColorName,c as getContentAtOffset,l as getInlineChildren,Va as getMarkAttrAtSelection,$a as getPaperCSSSize,Ya as getPaperDimensions,Rm as getSelectedBlock,Mm as getSelectedBlockId,Ca as getStepMap,n as getTextChildren,zm as getTextDirection,p as hasMark,lr as injectContentStyles,fm as inlineDecoration,X as inlineType,us as insertHardBreakCommand,is as insertTextCommand,ia as invertStep,Sa as invertTransaction,fa as isAllowedInReadonly,Ga as isAttributedMarkActive,e as isBlockNode,I as isCollapsed,jo as isColorMarkActive,Hm as isFirefox,N as isForward,L as isGapCursor,S as isInlineNode,Ka as isInlineNodeOfType,W as isInsideIsolating,$ as isIsolatingBlock,i as isLeafBlock,Po as isLightColor,Nm as isMac,Ps as isMarkActive,fs as isMarkAllowed,wa as isMarkOfType,Ea as isNodeOfType,A as isNodeSelection,Bm as isRtlContext,xa as isSelectionOnlyTransaction,j as isTextNode,B as isTextSelection,br as isValidCSSColor,dr as isValidCSSFontFamily,Tr as isValidCSSFontSize,Pr as isValidHexColor,Ua as isValidPaperSize,Q as isVoidBlock,Am as isWebKit,mo as latexToMathML,Sr as loadAlignmentLocale,Fr as loadBidiIsolationLocale,Br as loadBlockquoteLocale,Ys as loadCaretNavigationLocale,Er as loadCodeBlockLocale,gr as loadFontLocale,Jr as loadFontSizeLocale,io as loadFormulaLocale,co as loadHeadingLocale,Do as loadHighlightLocale,xo as loadHorizontalRuleLocale,Mo as loadImageLocale,Bo as loadInlineCodeLocale,zo as loadLinkLocale,Eo as loadListLocale,ym as loadLocaleModule,Vo as loadPrintLocale,ai as loadSmartPasteLocale,ti as loadStrikethroughLocale,pi as loadSuperSubLocale,hi as loadTableLocale,Pi as loadTextColorLocale,xi as loadTextDirectionLocale,sr as loadTextFormattingLocale,Em as loadToolbarLocale,Ii as loadVideoLocale,gm as mapChildIndex,Tm as mapInsertionIndex,km as mapPositionThroughStep,Ha as mapSelection,_a as mapTextSelection,u as markSetsEqual,G as markType,rs as mergeBlockBackward,aa as moveCharacterBackward,Bs as moveCharacterForward,Zs as moveLineDown,ws as moveLineUp,Rs as moveToBlockEnd,Os as moveToBlockStart,Cs as moveToDocumentEnd,Ss as moveToDocumentStart,Es as moveToLineEnd,Ws as moveToLineStart,Um as moveTx,Xs as moveWordBackward,Ls as moveWordForward,Ms as navigateAcrossBlocks,as as navigateArrowIntoVoid,Wm as navigateFromGapCursor,rr as navigateGrid,vs as navigateVerticalWithGoalColumn,Is as nextGraphemeSize,jm as nodeDecoration,Xm as nodeSelTx,V as nodeType,m as normalizeHTMLId,ka as normalizeKeyDescriptor,em as parseHTMLToDocument,Ai as parseVideoUrl,U as pluginId,ir as positionPopup,oa as prevGraphemeSize,ga as registerBuiltinSpecs,Aa as registerNotectlEditor,er as removeAdoptedStyles,La as removeAttributedMark,eo as removeColorMark,cr as removeContentStyles,To as renderColorGrid,ko as renderColorPickerPopup,fr as resolveColors,R as resolveNodeByPath,C as resolveParentByPath,nm as resolveTheme,js as schemaFromRegistry,Na as scopedLogger,Uo as scoreFromStats,ps as selectAll,E as selectionRange,z as selectionsEqual,cm as serializeDocumentToCSS,pm as serializeDocumentToHTML,Y as sharesParent,ja as silentLogger,Fs as skipInlineNode,os as splitBlockCommand,hs as toggleBold,ks as toggleItalic,es as toggleMark,ls as toggleUnderline,Z as validateContent,Ks as viewExtend,Hs as viewMove,y as walkNodes,dm as widgetDecoration};
|
package/dist/html.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{o as s}from"./chunks/HTMLUtils-
|
|
1
|
+
import{o as s}from"./chunks/HTMLUtils-B0nGyFLb.mjs";import{f as m,h as o,m as r,p as a}from"./chunks/TableDimensions-BcARMxQB.mjs";import{t}from"./chunks/DocumentParser-i-CreJ48.mjs";export{m as VALID_ALIGNMENTS,a as VALID_DIRECTIONS,s as normalizeHTMLId,t as parseHTMLToDocument,r as serializeDocumentToCSS,o as serializeDocumentToHTML};
|
package/dist/index.d.ts
CHANGED
|
@@ -8,11 +8,12 @@
|
|
|
8
8
|
* - `@notectl/core/plugins/<name>` — individual plugins
|
|
9
9
|
* - `@notectl/core/presets` — preset factory functions
|
|
10
10
|
* - `@notectl/core/html` — HTML serialization/parsing
|
|
11
|
-
* - `@notectl/core/fonts` — starter font definitions
|
|
11
|
+
* - `@notectl/core/fonts/starter` — embedded starter font definitions
|
|
12
12
|
* - `@notectl/core/full` — kitchen-sink (all of the above)
|
|
13
13
|
*
|
|
14
14
|
* @packageDocumentation
|
|
15
15
|
*/
|
|
16
|
+
export { registerNotectlEditor } from './register.js';
|
|
16
17
|
export type { Document, BlockNode, TextNode, InlineNode, TextSegment, ContentSegment, ChildNode, Mark, BoldMark, ItalicMark, UnderlineMark, BlockAttrs, BlockAttrPrimitive, BlockAttrArrayValue, BlockAttrValue, } from './model/Document.js';
|
|
17
18
|
export { createDocument, createBlockNode, createTextNode, createInlineNode, isTextNode, isInlineNode, isBlockNode, isLeafBlock, getTextChildren, getInlineChildren, getBlockChildren, getBlockText, getBlockLength, blockOffsetToTextOffset, getBlockMarksAtOffset, getContentAtOffset, hasMark, markSetsEqual, blockAttrValuesEqual, blockAttrsEqual, } from './model/Document.js';
|
|
18
19
|
export { nextGraphemeSize, prevGraphemeSize } from './model/GraphemeUtils.js';
|
|
@@ -30,9 +31,9 @@ export { createBlockElement } from './view/DomUtils.js';
|
|
|
30
31
|
export type { MarkSpec } from './model/MarkSpec.js';
|
|
31
32
|
export type { InlineNodeSpec } from './model/InlineNodeSpec.js';
|
|
32
33
|
export type { ParseRule } from './model/ParseRule.js';
|
|
33
|
-
export type { SanitizeConfig } from './model/SanitizeConfig.js';
|
|
34
|
+
export type { ElementSanitizeValidator, SanitizeConfig } from './model/SanitizeConfig.js';
|
|
34
35
|
export { escapeAttr, escapeHTML, formatHTML, normalizeHTMLId, } from './model/HTMLUtils.js';
|
|
35
|
-
export { SchemaRegistry } from './model/SchemaRegistry.js';
|
|
36
|
+
export { type NodeSpecExtension, SchemaRegistry } from './model/SchemaRegistry.js';
|
|
36
37
|
export { resolveNodeByPath, resolveParentByPath, findNodePath, findNode, findNodeWithPath, walkNodes, } from './model/NodeResolver.js';
|
|
37
38
|
export { canContain, validateContent } from './model/ContentModel.js';
|
|
38
39
|
export { registerBuiltinSpecs } from './editor/BuiltinSpecs.js';
|
|
@@ -92,4 +93,5 @@ export { adoptContentStyles, injectContentStyles, removeAdoptedStyles, removeCon
|
|
|
92
93
|
export type { AdoptStylesOptions, InjectStylesOptions } from './editor/ContentStyleInjector.js';
|
|
93
94
|
export type { NotectlEditorConfig, ToolbarConfig, StateChangeEvent, } from './editor/NotectlEditor.js';
|
|
94
95
|
export { NotectlEditor, createEditor } from './editor/NotectlEditor.js';
|
|
96
|
+
export { EditorInitializationAbortedError } from './editor/EditorLifecycleCoordinator.js';
|
|
95
97
|
//# sourceMappingURL=index.d.ts.map
|