@domternal/core 0.4.0 → 0.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/CanChecker.d.ts +79 -0
- package/dist/CanChecker.d.ts.map +1 -0
- package/dist/CanChecker.test.d.ts +2 -0
- package/dist/CanChecker.test.d.ts.map +1 -0
- package/dist/ChainBuilder.d.ts +119 -0
- package/dist/ChainBuilder.d.ts.map +1 -0
- package/dist/ChainBuilder.test.d.ts +2 -0
- package/dist/ChainBuilder.test.d.ts.map +1 -0
- package/dist/CommandManager.d.ts +86 -0
- package/dist/CommandManager.d.ts.map +1 -0
- package/dist/CommandManager.test.d.ts +2 -0
- package/dist/CommandManager.test.d.ts.map +1 -0
- package/dist/Editor.d.ts +262 -0
- package/dist/Editor.d.ts.map +1 -0
- package/dist/Editor.test.d.ts +2 -0
- package/dist/Editor.test.d.ts.map +1 -0
- package/dist/EventEmitter.d.ts +57 -0
- package/dist/EventEmitter.d.ts.map +1 -0
- package/dist/EventEmitter.test.d.ts +2 -0
- package/dist/EventEmitter.test.d.ts.map +1 -0
- package/dist/Extension.d.ts +171 -0
- package/dist/Extension.d.ts.map +1 -0
- package/dist/Extension.test.d.ts +2 -0
- package/dist/Extension.test.d.ts.map +1 -0
- package/dist/ExtensionManager.d.ts +283 -0
- package/dist/ExtensionManager.d.ts.map +1 -0
- package/dist/ExtensionManager.test.d.ts +2 -0
- package/dist/ExtensionManager.test.d.ts.map +1 -0
- package/dist/Mark.d.ts +164 -0
- package/dist/Mark.d.ts.map +1 -0
- package/dist/Mark.test.d.ts +5 -0
- package/dist/Mark.test.d.ts.map +1 -0
- package/dist/Node.d.ts +153 -0
- package/dist/Node.d.ts.map +1 -0
- package/dist/Node.test.d.ts +2 -0
- package/dist/Node.test.d.ts.map +1 -0
- package/dist/ToolbarController.d.ts +169 -0
- package/dist/ToolbarController.d.ts.map +1 -0
- package/dist/ToolbarController.test.d.ts +2 -0
- package/dist/ToolbarController.test.d.ts.map +1 -0
- package/dist/commandPropsBuilder.d.ts +70 -0
- package/dist/commandPropsBuilder.d.ts.map +1 -0
- package/dist/commandPropsBuilder.test.d.ts +2 -0
- package/dist/commandPropsBuilder.test.d.ts.map +1 -0
- package/dist/commands/attributeCommands.d.ts +24 -0
- package/dist/commands/attributeCommands.d.ts.map +1 -0
- package/dist/commands/attributeCommands.test.d.ts +2 -0
- package/dist/commands/attributeCommands.test.d.ts.map +1 -0
- package/dist/commands/builtIn.test.d.ts +2 -0
- package/dist/commands/builtIn.test.d.ts.map +1 -0
- package/dist/commands/contentCommands.d.ts +52 -0
- package/dist/commands/contentCommands.d.ts.map +1 -0
- package/dist/commands/contentCommands.test.d.ts +2 -0
- package/dist/commands/contentCommands.test.d.ts.map +1 -0
- package/dist/commands/index.d.ts +43 -0
- package/dist/commands/index.d.ts.map +1 -0
- package/dist/commands/listCommands.d.ts +15 -0
- package/dist/commands/listCommands.d.ts.map +1 -0
- package/dist/commands/listCommands.test.d.ts +2 -0
- package/dist/commands/listCommands.test.d.ts.map +1 -0
- package/dist/commands/markCommands.d.ts +40 -0
- package/dist/commands/markCommands.d.ts.map +1 -0
- package/dist/commands/markCommands.test.d.ts +2 -0
- package/dist/commands/markCommands.test.d.ts.map +1 -0
- package/dist/commands/nodeCommands.d.ts +53 -0
- package/dist/commands/nodeCommands.d.ts.map +1 -0
- package/dist/commands/nodeCommands.test.d.ts +2 -0
- package/dist/commands/nodeCommands.test.d.ts.map +1 -0
- package/dist/commands/selectionCommands.d.ts +37 -0
- package/dist/commands/selectionCommands.d.ts.map +1 -0
- package/dist/commands/selectionCommands.test.d.ts +2 -0
- package/dist/commands/selectionCommands.test.d.ts.map +1 -0
- package/dist/extensions/BaseKeymap.d.ts +36 -0
- package/dist/extensions/BaseKeymap.d.ts.map +1 -0
- package/dist/extensions/BaseKeymap.test.d.ts +2 -0
- package/dist/extensions/BaseKeymap.test.d.ts.map +1 -0
- package/dist/extensions/BubbleMenu.d.ts +85 -0
- package/dist/extensions/BubbleMenu.d.ts.map +1 -0
- package/dist/extensions/BubbleMenu.test.d.ts +2 -0
- package/dist/extensions/BubbleMenu.test.d.ts.map +1 -0
- package/dist/extensions/CharacterCount.d.ts +60 -0
- package/dist/extensions/CharacterCount.d.ts.map +1 -0
- package/dist/extensions/CharacterCount.test.d.ts +2 -0
- package/dist/extensions/CharacterCount.test.d.ts.map +1 -0
- package/dist/extensions/ClearFormatting.d.ts +25 -0
- package/dist/extensions/ClearFormatting.d.ts.map +1 -0
- package/dist/extensions/ClearFormatting.test.d.ts +2 -0
- package/dist/extensions/ClearFormatting.test.d.ts.map +1 -0
- package/dist/extensions/Dropcursor.d.ts +20 -0
- package/dist/extensions/Dropcursor.d.ts.map +1 -0
- package/dist/extensions/Dropcursor.test.d.ts +2 -0
- package/dist/extensions/Dropcursor.test.d.ts.map +1 -0
- package/dist/extensions/FloatingMenu.d.ts +74 -0
- package/dist/extensions/FloatingMenu.d.ts.map +1 -0
- package/dist/extensions/FloatingMenu.test.d.ts +2 -0
- package/dist/extensions/FloatingMenu.test.d.ts.map +1 -0
- package/dist/extensions/Focus.d.ts +26 -0
- package/dist/extensions/Focus.d.ts.map +1 -0
- package/dist/extensions/Focus.test.d.ts +2 -0
- package/dist/extensions/Focus.test.d.ts.map +1 -0
- package/dist/extensions/FontFamily.d.ts +41 -0
- package/dist/extensions/FontFamily.d.ts.map +1 -0
- package/dist/extensions/FontFamily.test.d.ts +2 -0
- package/dist/extensions/FontFamily.test.d.ts.map +1 -0
- package/dist/extensions/FontSize.d.ts +46 -0
- package/dist/extensions/FontSize.d.ts.map +1 -0
- package/dist/extensions/FontSize.test.d.ts +2 -0
- package/dist/extensions/FontSize.test.d.ts.map +1 -0
- package/dist/extensions/Gapcursor.d.ts +3 -0
- package/dist/extensions/Gapcursor.d.ts.map +1 -0
- package/dist/extensions/Gapcursor.test.d.ts +2 -0
- package/dist/extensions/Gapcursor.test.d.ts.map +1 -0
- package/dist/extensions/Highlight.d.ts +61 -0
- package/dist/extensions/Highlight.d.ts.map +1 -0
- package/dist/extensions/Highlight.test.d.ts +2 -0
- package/dist/extensions/Highlight.test.d.ts.map +1 -0
- package/dist/extensions/History.d.ts +22 -0
- package/dist/extensions/History.d.ts.map +1 -0
- package/dist/extensions/History.test.d.ts +2 -0
- package/dist/extensions/History.test.d.ts.map +1 -0
- package/dist/extensions/InvisibleChars.d.ts +86 -0
- package/dist/extensions/InvisibleChars.d.ts.map +1 -0
- package/dist/extensions/InvisibleChars.test.d.ts +2 -0
- package/dist/extensions/InvisibleChars.test.d.ts.map +1 -0
- package/dist/extensions/LineHeight.d.ts +50 -0
- package/dist/extensions/LineHeight.d.ts.map +1 -0
- package/dist/extensions/LineHeight.test.d.ts +2 -0
- package/dist/extensions/LineHeight.test.d.ts.map +1 -0
- package/dist/extensions/LinkPopover.d.ts +10 -0
- package/dist/extensions/LinkPopover.d.ts.map +1 -0
- package/dist/extensions/ListKeymap.d.ts +10 -0
- package/dist/extensions/ListKeymap.d.ts.map +1 -0
- package/dist/extensions/ListKeymap.test.d.ts +2 -0
- package/dist/extensions/ListKeymap.test.d.ts.map +1 -0
- package/dist/extensions/Placeholder.d.ts +47 -0
- package/dist/extensions/Placeholder.d.ts.map +1 -0
- package/dist/extensions/Placeholder.test.d.ts +2 -0
- package/dist/extensions/Placeholder.test.d.ts.map +1 -0
- package/dist/extensions/Selection.d.ts +71 -0
- package/dist/extensions/Selection.d.ts.map +1 -0
- package/dist/extensions/Selection.test.d.ts +2 -0
- package/dist/extensions/Selection.test.d.ts.map +1 -0
- package/dist/extensions/SelectionDecoration.d.ts +18 -0
- package/dist/extensions/SelectionDecoration.d.ts.map +1 -0
- package/dist/extensions/SelectionDecoration.test.d.ts +2 -0
- package/dist/extensions/SelectionDecoration.test.d.ts.map +1 -0
- package/dist/extensions/StarterKit.d.ts +138 -0
- package/dist/extensions/StarterKit.d.ts.map +1 -0
- package/dist/extensions/StarterKit.test.d.ts +2 -0
- package/dist/extensions/StarterKit.test.d.ts.map +1 -0
- package/dist/extensions/TextAlign.d.ts +32 -0
- package/dist/extensions/TextAlign.d.ts.map +1 -0
- package/dist/extensions/TextAlign.test.d.ts +2 -0
- package/dist/extensions/TextAlign.test.d.ts.map +1 -0
- package/dist/extensions/TextColor.d.ts +55 -0
- package/dist/extensions/TextColor.d.ts.map +1 -0
- package/dist/extensions/TextColor.test.d.ts +2 -0
- package/dist/extensions/TextColor.test.d.ts.map +1 -0
- package/dist/extensions/TrailingNode.d.ts +16 -0
- package/dist/extensions/TrailingNode.d.ts.map +1 -0
- package/dist/extensions/TrailingNode.test.d.ts +2 -0
- package/dist/extensions/TrailingNode.test.d.ts.map +1 -0
- package/dist/extensions/Typography.d.ts +65 -0
- package/dist/extensions/Typography.d.ts.map +1 -0
- package/dist/extensions/Typography.test.d.ts +2 -0
- package/dist/extensions/Typography.test.d.ts.map +1 -0
- package/dist/extensions/UniqueID.d.ts +48 -0
- package/dist/extensions/UniqueID.d.ts.map +1 -0
- package/dist/extensions/UniqueID.test.d.ts +2 -0
- package/dist/extensions/UniqueID.test.d.ts.map +1 -0
- package/dist/extensions/index.d.ts +29 -0
- package/dist/extensions/index.d.ts.map +1 -0
- package/dist/extensions/isActive-markExclusion.test.d.ts +2 -0
- package/dist/extensions/isActive-markExclusion.test.d.ts.map +1 -0
- package/dist/helpers/callOrReturn.d.ts +30 -0
- package/dist/helpers/callOrReturn.d.ts.map +1 -0
- package/dist/helpers/callOrReturn.test.d.ts +2 -0
- package/dist/helpers/callOrReturn.test.d.ts.map +1 -0
- package/dist/helpers/createDocument.d.ts +48 -0
- package/dist/helpers/createDocument.d.ts.map +1 -0
- package/dist/helpers/createDocument.test.d.ts +2 -0
- package/dist/helpers/createDocument.test.d.ts.map +1 -0
- package/dist/helpers/defaultBlockAt.d.ts +15 -0
- package/dist/helpers/defaultBlockAt.d.ts.map +1 -0
- package/dist/helpers/defaultBlockAt.test.d.ts +2 -0
- package/dist/helpers/defaultBlockAt.test.d.ts.map +1 -0
- package/dist/helpers/findChildren.d.ts +13 -0
- package/dist/helpers/findChildren.d.ts.map +1 -0
- package/dist/helpers/findChildren.test.d.ts +2 -0
- package/dist/helpers/findChildren.test.d.ts.map +1 -0
- package/dist/helpers/findParentNode.d.ts +21 -0
- package/dist/helpers/findParentNode.d.ts.map +1 -0
- package/dist/helpers/findParentNode.test.d.ts +2 -0
- package/dist/helpers/findParentNode.test.d.ts.map +1 -0
- package/dist/helpers/getMarkRange.d.ts +17 -0
- package/dist/helpers/getMarkRange.d.ts.map +1 -0
- package/dist/helpers/getMarkRange.test.d.ts +2 -0
- package/dist/helpers/getMarkRange.test.d.ts.map +1 -0
- package/dist/helpers/index.d.ts +18 -0
- package/dist/helpers/index.d.ts.map +1 -0
- package/dist/helpers/inputRulesPlugin.d.ts +26 -0
- package/dist/helpers/inputRulesPlugin.d.ts.map +1 -0
- package/dist/helpers/isNodeEmpty.d.ts +52 -0
- package/dist/helpers/isNodeEmpty.d.ts.map +1 -0
- package/dist/helpers/isNodeEmpty.test.d.ts +2 -0
- package/dist/helpers/isNodeEmpty.test.d.ts.map +1 -0
- package/dist/helpers/isValidUrl.d.ts +31 -0
- package/dist/helpers/isValidUrl.d.ts.map +1 -0
- package/dist/helpers/isValidUrl.test.d.ts +2 -0
- package/dist/helpers/isValidUrl.test.d.ts.map +1 -0
- package/dist/helpers/markInputRule.d.ts +88 -0
- package/dist/helpers/markInputRule.d.ts.map +1 -0
- package/dist/helpers/markInputRule.test.d.ts +2 -0
- package/dist/helpers/markInputRule.test.d.ts.map +1 -0
- package/dist/helpers/nodeInputRule.d.ts +41 -0
- package/dist/helpers/nodeInputRule.d.ts.map +1 -0
- package/dist/helpers/normalizeColor.d.ts +7 -0
- package/dist/helpers/normalizeColor.d.ts.map +1 -0
- package/dist/helpers/normalizeColor.test.d.ts +2 -0
- package/dist/helpers/normalizeColor.test.d.ts.map +1 -0
- package/dist/helpers/specBuilder.d.ts +28 -0
- package/dist/helpers/specBuilder.d.ts.map +1 -0
- package/dist/helpers/specBuilder.test.d.ts +2 -0
- package/dist/helpers/specBuilder.test.d.ts.map +1 -0
- package/dist/helpers/ssr.d.ts +80 -0
- package/dist/helpers/ssr.d.ts.map +1 -0
- package/dist/helpers/ssr.test.d.ts +2 -0
- package/dist/helpers/ssr.test.d.ts.map +1 -0
- package/dist/helpers/textInputRule.d.ts +34 -0
- package/dist/helpers/textInputRule.d.ts.map +1 -0
- package/dist/helpers/textblockTypeInputRule.d.ts +41 -0
- package/dist/helpers/textblockTypeInputRule.d.ts.map +1 -0
- package/dist/helpers/wrappingInputRule.d.ts +66 -0
- package/dist/helpers/wrappingInputRule.d.ts.map +1 -0
- package/dist/icons/index.d.ts +2 -0
- package/dist/icons/index.d.ts.map +1 -0
- package/dist/icons/phosphor.d.ts +3 -0
- package/dist/icons/phosphor.d.ts.map +1 -0
- package/dist/index.d.ts +23 -5832
- package/dist/index.d.ts.map +1 -0
- package/dist/index.test.d.ts +2 -0
- package/dist/index.test.d.ts.map +1 -0
- package/dist/marks/Bold.d.ts +40 -0
- package/dist/marks/Bold.d.ts.map +1 -0
- package/dist/marks/Bold.test.d.ts +2 -0
- package/dist/marks/Bold.test.d.ts.map +1 -0
- package/dist/marks/Code.d.ts +40 -0
- package/dist/marks/Code.d.ts.map +1 -0
- package/dist/marks/Code.test.d.ts +2 -0
- package/dist/marks/Code.test.d.ts.map +1 -0
- package/dist/marks/Italic.d.ts +40 -0
- package/dist/marks/Italic.d.ts.map +1 -0
- package/dist/marks/Italic.test.d.ts +2 -0
- package/dist/marks/Italic.test.d.ts.map +1 -0
- package/dist/marks/Link.d.ts +75 -0
- package/dist/marks/Link.d.ts.map +1 -0
- package/dist/marks/Link.test.d.ts +2 -0
- package/dist/marks/Link.test.d.ts.map +1 -0
- package/dist/marks/Strike.d.ts +39 -0
- package/dist/marks/Strike.d.ts.map +1 -0
- package/dist/marks/Strike.test.d.ts +2 -0
- package/dist/marks/Strike.test.d.ts.map +1 -0
- package/dist/marks/Subscript.d.ts +38 -0
- package/dist/marks/Subscript.d.ts.map +1 -0
- package/dist/marks/Subscript.test.d.ts +2 -0
- package/dist/marks/Subscript.test.d.ts.map +1 -0
- package/dist/marks/Superscript.d.ts +38 -0
- package/dist/marks/Superscript.d.ts.map +1 -0
- package/dist/marks/Superscript.test.d.ts +2 -0
- package/dist/marks/Superscript.test.d.ts.map +1 -0
- package/dist/marks/TextStyle.d.ts +41 -0
- package/dist/marks/TextStyle.d.ts.map +1 -0
- package/dist/marks/TextStyle.test.d.ts +2 -0
- package/dist/marks/TextStyle.test.d.ts.map +1 -0
- package/dist/marks/Underline.d.ts +38 -0
- package/dist/marks/Underline.d.ts.map +1 -0
- package/dist/marks/Underline.test.d.ts +2 -0
- package/dist/marks/Underline.test.d.ts.map +1 -0
- package/dist/marks/helpers/autolinkPlugin.d.ts +48 -0
- package/dist/marks/helpers/autolinkPlugin.d.ts.map +1 -0
- package/dist/marks/helpers/autolinkPlugin.test.d.ts +2 -0
- package/dist/marks/helpers/autolinkPlugin.test.d.ts.map +1 -0
- package/dist/marks/helpers/index.d.ts +10 -0
- package/dist/marks/helpers/index.d.ts.map +1 -0
- package/dist/marks/helpers/linkClickPlugin.d.ts +43 -0
- package/dist/marks/helpers/linkClickPlugin.d.ts.map +1 -0
- package/dist/marks/helpers/linkClickPlugin.test.d.ts +2 -0
- package/dist/marks/helpers/linkClickPlugin.test.d.ts.map +1 -0
- package/dist/marks/helpers/linkExitPlugin.d.ts +37 -0
- package/dist/marks/helpers/linkExitPlugin.d.ts.map +1 -0
- package/dist/marks/helpers/linkExitPlugin.test.d.ts +2 -0
- package/dist/marks/helpers/linkExitPlugin.test.d.ts.map +1 -0
- package/dist/marks/helpers/linkPastePlugin.d.ts +44 -0
- package/dist/marks/helpers/linkPastePlugin.d.ts.map +1 -0
- package/dist/marks/helpers/linkPastePlugin.test.d.ts +2 -0
- package/dist/marks/helpers/linkPastePlugin.test.d.ts.map +1 -0
- package/dist/marks/index.d.ts +16 -0
- package/dist/marks/index.d.ts.map +1 -0
- package/dist/nodes/Blockquote.d.ts +19 -0
- package/dist/nodes/Blockquote.d.ts.map +1 -0
- package/dist/nodes/Blockquote.test.d.ts +2 -0
- package/dist/nodes/Blockquote.test.d.ts.map +1 -0
- package/dist/nodes/BulletList.d.ts +18 -0
- package/dist/nodes/BulletList.d.ts.map +1 -0
- package/dist/nodes/BulletList.test.d.ts +2 -0
- package/dist/nodes/BulletList.test.d.ts.map +1 -0
- package/dist/nodes/CodeBlock.d.ts +29 -0
- package/dist/nodes/CodeBlock.d.ts.map +1 -0
- package/dist/nodes/CodeBlock.test.d.ts +2 -0
- package/dist/nodes/CodeBlock.test.d.ts.map +1 -0
- package/dist/nodes/Document.d.ts +9 -0
- package/dist/nodes/Document.d.ts.map +1 -0
- package/dist/nodes/Document.test.d.ts +2 -0
- package/dist/nodes/Document.test.d.ts.map +1 -0
- package/dist/nodes/HardBreak.d.ts +18 -0
- package/dist/nodes/HardBreak.d.ts.map +1 -0
- package/dist/nodes/HardBreak.test.d.ts +2 -0
- package/dist/nodes/HardBreak.test.d.ts.map +1 -0
- package/dist/nodes/Heading.d.ts +23 -0
- package/dist/nodes/Heading.d.ts.map +1 -0
- package/dist/nodes/Heading.test.d.ts +2 -0
- package/dist/nodes/Heading.test.d.ts.map +1 -0
- package/dist/nodes/HorizontalRule.d.ts +17 -0
- package/dist/nodes/HorizontalRule.d.ts.map +1 -0
- package/dist/nodes/HorizontalRule.test.d.ts +2 -0
- package/dist/nodes/HorizontalRule.test.d.ts.map +1 -0
- package/dist/nodes/ListItem.d.ts +16 -0
- package/dist/nodes/ListItem.d.ts.map +1 -0
- package/dist/nodes/ListItem.test.d.ts +2 -0
- package/dist/nodes/ListItem.test.d.ts.map +1 -0
- package/dist/nodes/OrderedList.d.ts +18 -0
- package/dist/nodes/OrderedList.d.ts.map +1 -0
- package/dist/nodes/OrderedList.test.d.ts +2 -0
- package/dist/nodes/OrderedList.test.d.ts.map +1 -0
- package/dist/nodes/Paragraph.d.ts +17 -0
- package/dist/nodes/Paragraph.d.ts.map +1 -0
- package/dist/nodes/Paragraph.test.d.ts +2 -0
- package/dist/nodes/Paragraph.test.d.ts.map +1 -0
- package/dist/nodes/TaskItem.d.ts +24 -0
- package/dist/nodes/TaskItem.d.ts.map +1 -0
- package/dist/nodes/TaskItem.test.d.ts +2 -0
- package/dist/nodes/TaskItem.test.d.ts.map +1 -0
- package/dist/nodes/TaskList.d.ts +18 -0
- package/dist/nodes/TaskList.d.ts.map +1 -0
- package/dist/nodes/TaskList.test.d.ts +2 -0
- package/dist/nodes/TaskList.test.d.ts.map +1 -0
- package/dist/nodes/Text.d.ts +9 -0
- package/dist/nodes/Text.d.ts.map +1 -0
- package/dist/nodes/Text.test.d.ts +2 -0
- package/dist/nodes/Text.test.d.ts.map +1 -0
- package/dist/nodes/index.d.ts +19 -0
- package/dist/nodes/index.d.ts.map +1 -0
- package/dist/nodes/integration.test.d.ts +7 -0
- package/dist/nodes/integration.test.d.ts.map +1 -0
- package/dist/types/AttributeSpec.d.ts +78 -0
- package/dist/types/AttributeSpec.d.ts.map +1 -0
- package/dist/types/Commands.d.ts +125 -0
- package/dist/types/Commands.d.ts.map +1 -0
- package/dist/types/Content.d.ts +40 -0
- package/dist/types/Content.d.ts.map +1 -0
- package/dist/types/EditorEvents.d.ts +131 -0
- package/dist/types/EditorEvents.d.ts.map +1 -0
- package/dist/types/EditorOptions.d.ts +133 -0
- package/dist/types/EditorOptions.d.ts.map +1 -0
- package/dist/types/ExtensionConfig.d.ts +271 -0
- package/dist/types/ExtensionConfig.d.ts.map +1 -0
- package/dist/types/MarkConfig.d.ts +206 -0
- package/dist/types/MarkConfig.d.ts.map +1 -0
- package/dist/types/NodeConfig.d.ts +263 -0
- package/dist/types/NodeConfig.d.ts.map +1 -0
- package/dist/types/Toolbar.d.ts +172 -0
- package/dist/types/Toolbar.d.ts.map +1 -0
- package/dist/types/index.d.ts +13 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/utils/inlineStyles.d.ts +83 -0
- package/dist/utils/inlineStyles.d.ts.map +1 -0
- package/dist/utils/inlineStyles.test.d.ts +2 -0
- package/dist/utils/inlineStyles.test.d.ts.map +1 -0
- package/dist/utils/positionFloating.d.ts +74 -0
- package/dist/utils/positionFloating.d.ts.map +1 -0
- package/package.json +1 -1
package/dist/Node.d.ts
ADDED
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Node - Base class for node extensions
|
|
3
|
+
*
|
|
4
|
+
* Nodes define document structure elements that contribute to the schema.
|
|
5
|
+
* Examples: Paragraph, Heading, List, Image, etc.
|
|
6
|
+
*
|
|
7
|
+
* Three-tier model:
|
|
8
|
+
* - Extension (type: 'extension') → Pure functionality (History, Placeholder, etc.)
|
|
9
|
+
* - Node (type: 'node') → Schema nodes (Paragraph, Heading, etc.)
|
|
10
|
+
* - Mark (type: 'mark') → Schema marks (Bold, Italic, etc.)
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* const Paragraph = Node.create({
|
|
14
|
+
* name: 'paragraph',
|
|
15
|
+
* group: 'block',
|
|
16
|
+
* content: 'inline*',
|
|
17
|
+
* parseHTML() {
|
|
18
|
+
* return [{ tag: 'p' }];
|
|
19
|
+
* },
|
|
20
|
+
* renderHTML({ HTMLAttributes }) {
|
|
21
|
+
* return ['p', HTMLAttributes, 0];
|
|
22
|
+
* },
|
|
23
|
+
* });
|
|
24
|
+
*/
|
|
25
|
+
import type { NodeSpec, NodeType } from '@domternal/pm/model';
|
|
26
|
+
import { Extension, type ExtensionEditorInterface } from './Extension.js';
|
|
27
|
+
import type { NodeConfig, NodeContext } from './types/NodeConfig.js';
|
|
28
|
+
/**
|
|
29
|
+
* Extended editor interface for Node
|
|
30
|
+
* Includes schema access for NodeType getter
|
|
31
|
+
*/
|
|
32
|
+
export interface NodeEditorInterface extends ExtensionEditorInterface {
|
|
33
|
+
readonly schema: {
|
|
34
|
+
nodes: Record<string, NodeType>;
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Base class for node extensions
|
|
39
|
+
*
|
|
40
|
+
* @typeParam Options - Node options type
|
|
41
|
+
* @typeParam Storage - Node storage type
|
|
42
|
+
*/
|
|
43
|
+
export declare class Node<Options = unknown, Storage = unknown> extends Extension<Options, Storage> {
|
|
44
|
+
/**
|
|
45
|
+
* Node type identifier
|
|
46
|
+
* Distinguishes nodes from extensions and marks
|
|
47
|
+
*/
|
|
48
|
+
readonly type: "node";
|
|
49
|
+
/**
|
|
50
|
+
* The original configuration object
|
|
51
|
+
* Typed as NodeConfig for node-specific properties
|
|
52
|
+
*/
|
|
53
|
+
readonly config: NodeConfig<Options, Storage>;
|
|
54
|
+
/**
|
|
55
|
+
* Editor instance with schema access
|
|
56
|
+
* null until set by ExtensionManager
|
|
57
|
+
*/
|
|
58
|
+
editor: NodeEditorInterface | null;
|
|
59
|
+
/**
|
|
60
|
+
* Protected constructor - use Node.create() instead
|
|
61
|
+
*/
|
|
62
|
+
protected constructor(config: NodeConfig<Options, Storage>);
|
|
63
|
+
/**
|
|
64
|
+
* Get the ProseMirror NodeType from schema
|
|
65
|
+
*
|
|
66
|
+
* This is a lazy getter because schema doesn't exist at node creation time.
|
|
67
|
+
* Schema is built FROM nodes by ExtensionManager.
|
|
68
|
+
*
|
|
69
|
+
* Returns null if editor is not yet initialized.
|
|
70
|
+
* Always check editor is set before using nodeType.
|
|
71
|
+
*/
|
|
72
|
+
get nodeType(): NodeType | null;
|
|
73
|
+
/**
|
|
74
|
+
* Get NodeType or throw if not initialized.
|
|
75
|
+
* Use in contexts where editor is guaranteed to be set (like addCommands).
|
|
76
|
+
*/
|
|
77
|
+
get nodeTypeOrThrow(): NodeType;
|
|
78
|
+
/**
|
|
79
|
+
* Creates a new node instance
|
|
80
|
+
*
|
|
81
|
+
* @param config - Node configuration
|
|
82
|
+
* @returns New node instance
|
|
83
|
+
*
|
|
84
|
+
* @example
|
|
85
|
+
* const Paragraph = Node.create({
|
|
86
|
+
* name: 'paragraph',
|
|
87
|
+
* group: 'block',
|
|
88
|
+
* content: 'inline*',
|
|
89
|
+
* });
|
|
90
|
+
*/
|
|
91
|
+
static create<O = unknown, S = unknown>(config: NodeConfig<O, S>): Node<O, S>;
|
|
92
|
+
/**
|
|
93
|
+
* Creates a new node with merged options
|
|
94
|
+
* Original node is not modified
|
|
95
|
+
*
|
|
96
|
+
* **Note:** Options are merged shallowly using object spread (`...`).
|
|
97
|
+
* Nested objects are replaced entirely, not deeply merged.
|
|
98
|
+
*
|
|
99
|
+
* @param options - Options to merge with existing options
|
|
100
|
+
* @returns New node instance with merged options
|
|
101
|
+
*
|
|
102
|
+
* @example
|
|
103
|
+
* const CustomParagraph = Paragraph.configure({ HTMLAttributes: { class: 'custom' } });
|
|
104
|
+
*
|
|
105
|
+
* @example
|
|
106
|
+
* // Shallow merge behavior with nested objects:
|
|
107
|
+
* // Given: options = { HTMLAttributes: { class: 'a', id: 'b' } }
|
|
108
|
+
* // configure({ HTMLAttributes: { class: 'c' } })
|
|
109
|
+
* // Result: { HTMLAttributes: { class: 'c' } } — 'id' is lost!
|
|
110
|
+
* // To preserve nested values, spread manually:
|
|
111
|
+
* // configure({ HTMLAttributes: { ...original.options.HTMLAttributes, class: 'c' } })
|
|
112
|
+
*/
|
|
113
|
+
configure(options: Partial<Options>): Node<Options, Storage>;
|
|
114
|
+
/**
|
|
115
|
+
* Creates a new node with extended configuration
|
|
116
|
+
* Original node is not modified
|
|
117
|
+
*
|
|
118
|
+
* **Note:** Config is merged shallowly using object spread (`...`).
|
|
119
|
+
* Config properties (like `addAttributes`, `parseHTML`) are
|
|
120
|
+
* replaced entirely, not combined with the base node's config.
|
|
121
|
+
*
|
|
122
|
+
* @param extendedConfig - Configuration to extend/override
|
|
123
|
+
* @returns New node instance with extended config
|
|
124
|
+
*
|
|
125
|
+
* @example
|
|
126
|
+
* const CustomParagraph = Paragraph.extend({
|
|
127
|
+
* name: 'customParagraph',
|
|
128
|
+
* addAttributes() {
|
|
129
|
+
* return { ...this.parent?.(), align: { default: 'left' } };
|
|
130
|
+
* },
|
|
131
|
+
* });
|
|
132
|
+
*
|
|
133
|
+
* @example
|
|
134
|
+
* // To preserve base node's parse rules while adding new ones:
|
|
135
|
+
* const Extended = BaseNode.extend({
|
|
136
|
+
* parseHTML() {
|
|
137
|
+
* const baseRules = BaseNode.config.parseHTML?.call(this) ?? [];
|
|
138
|
+
* return [...baseRules, { tag: 'custom-tag' }];
|
|
139
|
+
* },
|
|
140
|
+
* });
|
|
141
|
+
*/
|
|
142
|
+
extend<ExtendedOptions = Options, ExtendedStorage = Storage>(extendedConfig: Partial<NodeConfig<ExtendedOptions, ExtendedStorage>> & ThisType<NodeContext<ExtendedOptions, ExtendedStorage>>): Node<ExtendedOptions, ExtendedStorage>;
|
|
143
|
+
/**
|
|
144
|
+
* Creates a ProseMirror NodeSpec from this node's configuration
|
|
145
|
+
*
|
|
146
|
+
* Called by ExtensionManager when building the schema.
|
|
147
|
+
* Converts our config format to ProseMirror's NodeSpec format.
|
|
148
|
+
*
|
|
149
|
+
* @returns ProseMirror NodeSpec
|
|
150
|
+
*/
|
|
151
|
+
createNodeSpec(): NodeSpec;
|
|
152
|
+
}
|
|
153
|
+
//# sourceMappingURL=Node.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Node.d.ts","sourceRoot":"","sources":["../src/Node.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH,OAAO,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAgB,MAAM,qBAAqB,CAAC;AAC5E,OAAO,EAAE,SAAS,EAAE,KAAK,wBAAwB,EAAgC,MAAM,gBAAgB,CAAC;AACxG,OAAO,KAAK,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAIrE;;;GAGG;AACH,MAAM,WAAW,mBAAoB,SAAQ,wBAAwB;IACnE,QAAQ,CAAC,MAAM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AI,QAAQ;CAqI3B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Node.test.d.ts","sourceRoot":"","sources":["../src/Node.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,169 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ToolbarController — Headless, framework-agnostic toolbar state machine
|
|
3
|
+
*
|
|
4
|
+
* Manages toolbar item collection, grouping, active state tracking,
|
|
5
|
+
* dropdown state, and keyboard navigation. Framework wrappers (Angular,
|
|
6
|
+
* React, Vue) bind their templates to this controller.
|
|
7
|
+
*
|
|
8
|
+
* @example
|
|
9
|
+
* const controller = new ToolbarController(editor, () => {
|
|
10
|
+
* // Called on every state change — trigger framework re-render
|
|
11
|
+
* });
|
|
12
|
+
* controller.subscribe();
|
|
13
|
+
* // ... use controller.groups, controller.activeMap, etc.
|
|
14
|
+
* controller.destroy();
|
|
15
|
+
*/
|
|
16
|
+
import type { ToolbarItem, ToolbarButton, ToolbarLayoutEntry } from './types/Toolbar.js';
|
|
17
|
+
/**
|
|
18
|
+
* Editor interface for ToolbarController.
|
|
19
|
+
* Minimal surface to avoid circular dependency on Editor class.
|
|
20
|
+
*/
|
|
21
|
+
export interface ToolbarControllerEditor {
|
|
22
|
+
readonly toolbarItems: ToolbarItem[];
|
|
23
|
+
readonly storage: Record<string, unknown>;
|
|
24
|
+
isActive(nameOrAttributes: string | {
|
|
25
|
+
name: string;
|
|
26
|
+
attributes?: Record<string, unknown>;
|
|
27
|
+
}, attributes?: Record<string, unknown>): boolean;
|
|
28
|
+
readonly commands: Record<string, (...args: unknown[]) => boolean>;
|
|
29
|
+
can(): Record<string, (...args: unknown[]) => boolean>;
|
|
30
|
+
on(event: string, handler: (...args: unknown[]) => void): void;
|
|
31
|
+
off(event: string, handler: (...args: unknown[]) => void): void;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* A group of toolbar items with the same group name.
|
|
35
|
+
*/
|
|
36
|
+
export interface ToolbarGroup {
|
|
37
|
+
name: string;
|
|
38
|
+
items: ToolbarItem[];
|
|
39
|
+
}
|
|
40
|
+
/** Minimal editor shape for static helpers (avoids strict ToolbarControllerEditor compatibility issues) */
|
|
41
|
+
interface ToolbarItemEditor {
|
|
42
|
+
readonly storage: Record<string, unknown>;
|
|
43
|
+
readonly commands: Record<string, (...args: unknown[]) => boolean>;
|
|
44
|
+
isActive(nameOrAttributes: string | {
|
|
45
|
+
name: string;
|
|
46
|
+
attributes?: Record<string, unknown>;
|
|
47
|
+
}, attributes?: Record<string, unknown>): boolean;
|
|
48
|
+
}
|
|
49
|
+
export declare class ToolbarController {
|
|
50
|
+
/**
|
|
51
|
+
* Resolves the active state of a toolbar button against the editor.
|
|
52
|
+
* Shared between ToolbarController and framework components (e.g. bubble-menu).
|
|
53
|
+
*/
|
|
54
|
+
static resolveActive(editor: ToolbarItemEditor, item: ToolbarButton): boolean;
|
|
55
|
+
/**
|
|
56
|
+
* Executes a toolbar button's command on the editor.
|
|
57
|
+
* Shared between ToolbarController and framework components (e.g. bubble-menu).
|
|
58
|
+
*/
|
|
59
|
+
static executeItem(editor: ToolbarItemEditor, item: ToolbarButton): void;
|
|
60
|
+
private editor;
|
|
61
|
+
private onChange;
|
|
62
|
+
private _layout;
|
|
63
|
+
private transactionHandler;
|
|
64
|
+
/** Grouped and sorted toolbar items */
|
|
65
|
+
private _groups;
|
|
66
|
+
/** Active state for each button (keyed by item.name) */
|
|
67
|
+
private _activeMap;
|
|
68
|
+
/** Disabled state for each button (keyed by item.name) */
|
|
69
|
+
private _disabledMap;
|
|
70
|
+
/** Expanded state for emitEvent buttons — true when their panel is open */
|
|
71
|
+
private _expandedMap;
|
|
72
|
+
/** Currently open dropdown name (null = none) */
|
|
73
|
+
private _openDropdown;
|
|
74
|
+
/** Focused button index for roving tabindex (-1 = none) */
|
|
75
|
+
private _focusedIndex;
|
|
76
|
+
/** Flat list of top-level buttons/dropdowns for keyboard nav */
|
|
77
|
+
private _flatButtons;
|
|
78
|
+
constructor(editor: ToolbarControllerEditor, onChange: () => void, layout?: ToolbarLayoutEntry[]);
|
|
79
|
+
get groups(): ToolbarGroup[];
|
|
80
|
+
get activeMap(): ReadonlyMap<string, boolean>;
|
|
81
|
+
get disabledMap(): ReadonlyMap<string, boolean>;
|
|
82
|
+
get expandedMap(): ReadonlyMap<string, boolean>;
|
|
83
|
+
get openDropdown(): string | null;
|
|
84
|
+
get focusedIndex(): number;
|
|
85
|
+
get flatButtonCount(): number;
|
|
86
|
+
/**
|
|
87
|
+
* Checks if a toolbar button is currently active.
|
|
88
|
+
*/
|
|
89
|
+
isActive(item: ToolbarButton): boolean;
|
|
90
|
+
/**
|
|
91
|
+
* Checks if a toolbar button is currently disabled (command cannot execute).
|
|
92
|
+
*/
|
|
93
|
+
isDisabled(item: ToolbarButton): boolean;
|
|
94
|
+
/**
|
|
95
|
+
* Executes a toolbar button's command.
|
|
96
|
+
*/
|
|
97
|
+
executeCommand(item: ToolbarButton): void;
|
|
98
|
+
/**
|
|
99
|
+
* Toggles a dropdown open/closed.
|
|
100
|
+
*/
|
|
101
|
+
toggleDropdown(name: string): void;
|
|
102
|
+
/**
|
|
103
|
+
* Closes any open dropdown.
|
|
104
|
+
*/
|
|
105
|
+
closeDropdown(): void;
|
|
106
|
+
/**
|
|
107
|
+
* Move focus to the next button (ArrowRight).
|
|
108
|
+
*/
|
|
109
|
+
navigateNext(): number;
|
|
110
|
+
/**
|
|
111
|
+
* Move focus to the previous button (ArrowLeft).
|
|
112
|
+
*/
|
|
113
|
+
navigatePrev(): number;
|
|
114
|
+
/**
|
|
115
|
+
* Move focus to the first button (Home).
|
|
116
|
+
*/
|
|
117
|
+
navigateFirst(): number;
|
|
118
|
+
/**
|
|
119
|
+
* Move focus to the last button (End).
|
|
120
|
+
*/
|
|
121
|
+
navigateLast(): number;
|
|
122
|
+
/**
|
|
123
|
+
* Set focused index directly (e.g. on mouse enter).
|
|
124
|
+
*/
|
|
125
|
+
setFocusedIndex(index: number): void;
|
|
126
|
+
/**
|
|
127
|
+
* Get the flat index of a top-level item by name.
|
|
128
|
+
*/
|
|
129
|
+
getFlatIndex(name: string): number;
|
|
130
|
+
/**
|
|
131
|
+
* Subscribes to editor transaction events for active state tracking.
|
|
132
|
+
*/
|
|
133
|
+
subscribe(): void;
|
|
134
|
+
/**
|
|
135
|
+
* Unsubscribes from editor events and cleans up.
|
|
136
|
+
*/
|
|
137
|
+
destroy(): void;
|
|
138
|
+
/**
|
|
139
|
+
* Rebuilds groups and flat button list from editor.toolbarItems.
|
|
140
|
+
* When a layout is provided, uses layout-based resolution instead of default grouping.
|
|
141
|
+
*/
|
|
142
|
+
private rebuild;
|
|
143
|
+
/**
|
|
144
|
+
* Groups items by their `group` property, preserving extension order within groups.
|
|
145
|
+
* Items without a group go into a default '' group.
|
|
146
|
+
* Within each group, items are sorted by priority (higher first).
|
|
147
|
+
*/
|
|
148
|
+
private groupItems;
|
|
149
|
+
/**
|
|
150
|
+
* Resolves a layout array into ToolbarGroups by looking up registered items by name.
|
|
151
|
+
* Separators ('|') split items into visual groups.
|
|
152
|
+
* String entries resolve to existing buttons or dropdowns.
|
|
153
|
+
* ToolbarLayoutDropdown entries build custom dropdowns from named sub-items.
|
|
154
|
+
*/
|
|
155
|
+
private resolveLayout;
|
|
156
|
+
/**
|
|
157
|
+
* Builds a flat list of top-level buttons/dropdowns for keyboard navigation.
|
|
158
|
+
*/
|
|
159
|
+
private buildFlatList;
|
|
160
|
+
/**
|
|
161
|
+
* Updates active state map by checking editor.isActive() for each button.
|
|
162
|
+
*/
|
|
163
|
+
private updateActiveStates;
|
|
164
|
+
private checkButtonDisabled;
|
|
165
|
+
private checkButtonActive;
|
|
166
|
+
private checkButtonExpanded;
|
|
167
|
+
}
|
|
168
|
+
export {};
|
|
169
|
+
//# sourceMappingURL=ToolbarController.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ToolbarController.d.ts","sourceRoot":"","sources":["../src/ToolbarController.ts"],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ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import type { EditorState, Transaction } from '@domternal/pm/state';
|
|
2
|
+
import type { EditorView } from '@domternal/pm/view';
|
|
3
|
+
import type { CommandProps, ChainedCommands, CanCommands, SingleCommands } from './types/Commands.js';
|
|
4
|
+
/**
|
|
5
|
+
* Minimal editor interface for command props building
|
|
6
|
+
*/
|
|
7
|
+
export interface CommandPropsEditor {
|
|
8
|
+
readonly view: EditorView;
|
|
9
|
+
readonly state: EditorState;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Options for building CommandProps
|
|
13
|
+
*/
|
|
14
|
+
export interface BuildCommandPropsOptions {
|
|
15
|
+
/** The editor instance */
|
|
16
|
+
editor: CommandPropsEditor;
|
|
17
|
+
/** The transaction to use */
|
|
18
|
+
tr: Transaction;
|
|
19
|
+
/**
|
|
20
|
+
* Dispatch function - undefined for dry-run mode
|
|
21
|
+
* In chain mode, this accumulates changes on shared transaction
|
|
22
|
+
*/
|
|
23
|
+
dispatch: ((tr: Transaction) => void) | undefined;
|
|
24
|
+
/** Function to create chain commands */
|
|
25
|
+
chain: () => ChainedCommands;
|
|
26
|
+
/** Function to create can commands */
|
|
27
|
+
can: () => CanCommands;
|
|
28
|
+
/** Function to create single commands */
|
|
29
|
+
commands: () => SingleCommands;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Builds a CommandProps object with the given options
|
|
33
|
+
*
|
|
34
|
+
* @example
|
|
35
|
+
* // For chain mode with dispatch
|
|
36
|
+
* const props = buildCommandProps({
|
|
37
|
+
* editor,
|
|
38
|
+
* tr,
|
|
39
|
+
* dispatch: (transaction) => { ... },
|
|
40
|
+
* chain: () => this.proxy(),
|
|
41
|
+
* can: () => this.buildCanCommands(),
|
|
42
|
+
* commands: () => this.buildSingleCommands(),
|
|
43
|
+
* });
|
|
44
|
+
*
|
|
45
|
+
* @example
|
|
46
|
+
* // For dry-run mode (can check)
|
|
47
|
+
* const props = buildCommandProps({
|
|
48
|
+
* editor,
|
|
49
|
+
* tr,
|
|
50
|
+
* dispatch: undefined,
|
|
51
|
+
* chain: () => createChainBuilder(),
|
|
52
|
+
* can: () => this.proxy(),
|
|
53
|
+
* commands: () => this.buildSingleCommands(tr),
|
|
54
|
+
* });
|
|
55
|
+
*/
|
|
56
|
+
export declare function buildCommandProps(options: BuildCommandPropsOptions): CommandProps;
|
|
57
|
+
/**
|
|
58
|
+
* Creates a dispatch function that accumulates steps on a shared transaction
|
|
59
|
+
*
|
|
60
|
+
* Used in chain mode where multiple commands share the same transaction.
|
|
61
|
+
* If a command creates a new transaction, its steps and metadata are copied
|
|
62
|
+
* to the shared one.
|
|
63
|
+
*
|
|
64
|
+
* Metadata propagation is critical for commands like undo/redo:
|
|
65
|
+
* prosemirror-history sets metadata (addToHistory, plugin state) on its
|
|
66
|
+
* transactions. Without copying this metadata, the shared transaction
|
|
67
|
+
* would be recorded as a new history entry, causing undo to oscillate.
|
|
68
|
+
*/
|
|
69
|
+
export declare function createAccumulatingDispatch(sharedTr: Transaction): (tr: Transaction) => void;
|
|
70
|
+
//# sourceMappingURL=commandPropsBuilder.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"commandPropsBuilder.d.ts","sourceRoot":"","sources":["../src/commandPropsBuilder.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AACpE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,KAAK,EACV,YAAY,EACZ,eAAe,EACf,WAAW,EACX,cAAc,EACf,MAAM,qBAAqB,CAAC;AAE7B;;GAEG;AACH,MAAM,WAAW,kBAAkB;IACjC,QAAQ,CAAC,IAAI,EAAE,UAAU,CAAC;IAC1B,QAAQ,CAAC,KAAK,EAAE,WAAW,CAAC;CAC7B;AAED;;GAEG;AACH,MAAM,WAAW,wBAAwB;IACvC,0BAA0B;IAC1B,MAAM,EAAE,kBAAkB,CAAC;IAE3B,6BAA6B;IAC7B,EAAE,EAAE,WAAW,CAAC;IAEhB;;;OAGG;IACH,QAAQ,EAAE,CAAC,CAAC,EAAE,EAAE,WAAW,KAAK,IAAI,CAAC,GAAG,SAAS,CAAC;IAElD,wCAAwC;IACxC,KAAK,EAAE,MAAM,eAAe,CAAC;IAE7B,sCAAsC;IACtC,GAAG,EAAE,MAAM,WAAW,CAAC;IAEvB,yCAAyC;IACzC,QAAQ,EAAE,MAAM,cAAc,CAAC;CAChC;AAED;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,wBAAwB,GAAG,YAAY,CAcjF;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,0BAA0B,CAAC,QAAQ,EAAE,WAAW,GAAG,CAAC,EAAE,EAAE,WAAW,KAAK,IAAI,CAgC3F"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"commandPropsBuilder.test.d.ts","sourceRoot":"","sources":["../src/commandPropsBuilder.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Attribute commands — updateAttributes, resetAttributes
|
|
3
|
+
*/
|
|
4
|
+
import type { CommandSpec } from '../types/Commands.js';
|
|
5
|
+
/**
|
|
6
|
+
* UpdateAttributes command - updates attributes on nodes matching a type
|
|
7
|
+
*
|
|
8
|
+
* Updates attributes on all nodes of the specified type within the selection.
|
|
9
|
+
*
|
|
10
|
+
* @param typeOrName - The node type name or NodeType to update
|
|
11
|
+
* @param attributes - The attributes to merge into existing attributes
|
|
12
|
+
*/
|
|
13
|
+
export declare const updateAttributes: CommandSpec<[typeOrName: string, attributes: Record<string, unknown>]>;
|
|
14
|
+
/**
|
|
15
|
+
* ResetAttributes command - resets an attribute to its default value
|
|
16
|
+
*
|
|
17
|
+
* Resets the specified attribute on all nodes of the given type within the selection
|
|
18
|
+
* to the default value defined in the schema.
|
|
19
|
+
*
|
|
20
|
+
* @param typeOrName - The node type name to update
|
|
21
|
+
* @param attributeName - The name of the attribute to reset
|
|
22
|
+
*/
|
|
23
|
+
export declare const resetAttributes: CommandSpec<[typeOrName: string, attributeName: string]>;
|
|
24
|
+
//# sourceMappingURL=attributeCommands.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"attributeCommands.d.ts","sourceRoot":"","sources":["../../src/commands/attributeCommands.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAExD;;;;;;;GAOG;AACH,eAAO,MAAM,gBAAgB,EAAE,WAAW,CAAC,CAAC,UAAU,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CA8DjG,CAAC;AAEJ;;;;;;;;GAQG;AACH,eAAO,MAAM,eAAe,EAAE,WAAW,CAAC,CAAC,UAAU,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,CAAC,CAoElF,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"attributeCommands.test.d.ts","sourceRoot":"","sources":["../../src/commands/attributeCommands.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"builtIn.test.d.ts","sourceRoot":"","sources":["../../src/commands/builtIn.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import type { CommandSpec } from '../types/Commands.js';
|
|
2
|
+
import type { Content } from '../types/index.js';
|
|
3
|
+
/**
|
|
4
|
+
* Options for setContent command
|
|
5
|
+
*/
|
|
6
|
+
export interface SetContentOptions {
|
|
7
|
+
/**
|
|
8
|
+
* Emit update event after setting content
|
|
9
|
+
* @default true
|
|
10
|
+
*/
|
|
11
|
+
emitUpdate?: boolean;
|
|
12
|
+
/**
|
|
13
|
+
* Parse options for HTML content
|
|
14
|
+
*/
|
|
15
|
+
parseOptions?: Record<string, unknown>;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Options for clearContent command
|
|
19
|
+
*/
|
|
20
|
+
export interface ClearContentOptions {
|
|
21
|
+
/**
|
|
22
|
+
* Emit update event after clearing content
|
|
23
|
+
* @default true
|
|
24
|
+
*/
|
|
25
|
+
emitUpdate?: boolean;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* SetContent command - sets the editor content
|
|
29
|
+
*
|
|
30
|
+
* @param content - JSON or HTML content
|
|
31
|
+
* @param options - Options for setting content
|
|
32
|
+
*/
|
|
33
|
+
export declare const setContent: CommandSpec<[content: Content, options?: SetContentOptions]>;
|
|
34
|
+
/**
|
|
35
|
+
* ClearContent command - clears the editor content to empty state
|
|
36
|
+
*
|
|
37
|
+
* @param options - Options for clearing content
|
|
38
|
+
*/
|
|
39
|
+
export declare const clearContent: CommandSpec<[options?: ClearContentOptions]>;
|
|
40
|
+
/**
|
|
41
|
+
* InsertText command - inserts text at the current selection
|
|
42
|
+
*
|
|
43
|
+
* @param text - Text to insert
|
|
44
|
+
*/
|
|
45
|
+
export declare const insertText: CommandSpec<[text: string]>;
|
|
46
|
+
/**
|
|
47
|
+
* InsertContent command - inserts content at the current selection
|
|
48
|
+
*
|
|
49
|
+
* @param content - The content to insert (JSON object, array, or HTML string)
|
|
50
|
+
*/
|
|
51
|
+
export declare const insertContent: CommandSpec<[content: Content]>;
|
|
52
|
+
//# sourceMappingURL=contentCommands.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"contentCommands.d.ts","sourceRoot":"","sources":["../../src/commands/contentCommands.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACxD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAGjD;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC;;;OAGG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IAErB;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACxC;AAED;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAClC;;;OAGG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAED;;;;;GAKG;AACH,eAAO,MAAM,UAAU,EAAE,WAAW,CAAC,CAAC,OAAO,EAAE,OAAO,EAAE,OAAO,CAAC,EAAE,iBAAiB,CAAC,CAgCjF,CAAC;AAEJ;;;;GAIG;AACH,eAAO,MAAM,YAAY,EAAE,WAAW,CAAC,CAAC,OAAO,CAAC,EAAE,mBAAmB,CAAC,CAyBnE,CAAC;AAEJ;;;;GAIG;AACH,eAAO,MAAM,UAAU,EAAE,WAAW,CAAC,CAAC,IAAI,EAAE,MAAM,CAAC,CAsBhD,CAAC;AAEJ;;;;GAIG;AACH,eAAO,MAAM,aAAa,EAAE,WAAW,CAAC,CAAC,OAAO,EAAE,OAAO,CAAC,CA8CvD,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"contentCommands.test.d.ts","sourceRoot":"","sources":["../../src/commands/contentCommands.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Built-in commands for @domternal/core
|
|
3
|
+
*
|
|
4
|
+
* Re-exports from domain-specific command files and assembles the
|
|
5
|
+
* builtInCommands map consumed by CommandManager.
|
|
6
|
+
*/
|
|
7
|
+
import type { CommandMap } from '../types/Commands.js';
|
|
8
|
+
export { focus, blur, selectAll, selectNodeBackward, deleteSelection, } from './selectionCommands.js';
|
|
9
|
+
export { setContent, clearContent, insertText, insertContent, type SetContentOptions, type ClearContentOptions, } from './contentCommands.js';
|
|
10
|
+
export { toggleMark, setMark, unsetMark, unsetAllMarks, } from './markCommands.js';
|
|
11
|
+
export { setBlockType, toggleBlockType, wrapIn, toggleWrap, lift, } from './nodeCommands.js';
|
|
12
|
+
export { toggleList } from './listCommands.js';
|
|
13
|
+
export { updateAttributes, resetAttributes, } from './attributeCommands.js';
|
|
14
|
+
export declare const builtInCommands: CommandMap;
|
|
15
|
+
import type { Attrs } from '@domternal/pm/model';
|
|
16
|
+
import type { FocusPosition, Content } from '../types/index.js';
|
|
17
|
+
import type { SetContentOptions, ClearContentOptions } from './contentCommands.js';
|
|
18
|
+
declare module '../types/Commands.js' {
|
|
19
|
+
interface RawCommands {
|
|
20
|
+
focus: CommandSpec<[position?: FocusPosition]>;
|
|
21
|
+
blur: CommandSpec;
|
|
22
|
+
setContent: CommandSpec<[content: Content, options?: SetContentOptions]>;
|
|
23
|
+
clearContent: CommandSpec<[options?: ClearContentOptions]>;
|
|
24
|
+
insertText: CommandSpec<[text: string]>;
|
|
25
|
+
deleteSelection: CommandSpec;
|
|
26
|
+
selectAll: CommandSpec;
|
|
27
|
+
toggleMark: CommandSpec<[markName: string, attributes?: Attrs]>;
|
|
28
|
+
setMark: CommandSpec<[markName: string, attributes?: Attrs]>;
|
|
29
|
+
unsetMark: CommandSpec<[markName: string]>;
|
|
30
|
+
unsetAllMarks: CommandSpec;
|
|
31
|
+
setBlockType: CommandSpec<[nodeName: string, attributes?: Attrs]>;
|
|
32
|
+
toggleBlockType: CommandSpec<[nodeName: string, defaultNodeName: string, attributes?: Attrs]>;
|
|
33
|
+
wrapIn: CommandSpec<[nodeName: string, attributes?: Attrs]>;
|
|
34
|
+
toggleWrap: CommandSpec<[nodeName: string, attributes?: Attrs]>;
|
|
35
|
+
lift: CommandSpec;
|
|
36
|
+
toggleList: CommandSpec<[listNodeName: string, listItemNodeName: string, attributes?: Attrs]>;
|
|
37
|
+
insertContent: CommandSpec<[content: Content]>;
|
|
38
|
+
selectNodeBackward: CommandSpec;
|
|
39
|
+
updateAttributes: CommandSpec<[typeOrName: string, attributes: Record<string, unknown>]>;
|
|
40
|
+
resetAttributes: CommandSpec<[typeOrName: string, attributeName: string]>;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/commands/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAGvD,OAAO,EACL,KAAK,EACL,IAAI,EACJ,SAAS,EACT,kBAAkB,EAClB,eAAe,GAChB,MAAM,wBAAwB,CAAC;AAGhC,OAAO,EACL,UAAU,EACV,YAAY,EACZ,UAAU,EACV,aAAa,EACb,KAAK,iBAAiB,EACtB,KAAK,mBAAmB,GACzB,MAAM,sBAAsB,CAAC;AAG9B,OAAO,EACL,UAAU,EACV,OAAO,EACP,SAAS,EACT,aAAa,GACd,MAAM,mBAAmB,CAAC;AAG3B,OAAO,EACL,YAAY,EACZ,eAAe,EACf,MAAM,EACN,UAAU,EACV,IAAI,GACL,MAAM,mBAAmB,CAAC;AAG3B,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAG/C,OAAO,EACL,gBAAgB,EAChB,eAAe,GAChB,MAAM,wBAAwB,CAAC;AAUhC,eAAO,MAAM,eAAe,EAAE,UAsBf,CAAC;AAGhB,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AAEjD,OAAO,KAAK,EAAE,aAAa,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAChE,OAAO,KAAK,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAEnF,OAAO,QAAQ,sBAAsB,CAAC;IACpC,UAAU,WAAW;QACnB,KAAK,EAAE,WAAW,CAAC,CAAC,QAAQ,CAAC,EAAE,aAAa,CAAC,CAAC,CAAC;QAC/C,IAAI,EAAE,WAAW,CAAC;QAClB,UAAU,EAAE,WAAW,CAAC,CAAC,OAAO,EAA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AAE,OAAO,CAAC,CAAC,CAAC;QAC/C,kBAAkB,EAAE,WAAW,CAAC;QAChC,gBAAgB,EAAE,WAAW,CAAC,CAAC,UAAU,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC;QACzF,eAAe,EAAE,WAAW,CAAC,CAAC,UAAU,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,CAAC,CAAC,CAAC;KAC3E;CACF"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { Attrs } from '@domternal/pm/model';
|
|
2
|
+
import type { CommandSpec } from '../types/Commands.js';
|
|
3
|
+
/**
|
|
4
|
+
* ToggleList command - toggles a list type on the current selection
|
|
5
|
+
*
|
|
6
|
+
* If the selection is not in a list, wraps it in the specified list type.
|
|
7
|
+
* If it's in the same list type, lifts the list items out.
|
|
8
|
+
* If it's in a different list type, converts to the new list type in-place.
|
|
9
|
+
*
|
|
10
|
+
* @param listNodeName - The name of the list node type (e.g., 'bulletList', 'orderedList')
|
|
11
|
+
* @param listItemNodeName - The name of the list item node type (usually 'listItem')
|
|
12
|
+
* @param attributes - Optional attributes for the list node
|
|
13
|
+
*/
|
|
14
|
+
export declare const toggleList: CommandSpec<[listNodeName: string, listItemNodeName: string, attributes?: Attrs]>;
|
|
15
|
+
//# sourceMappingURL=listCommands.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"listCommands.d.ts","sourceRoot":"","sources":["../../src/commands/listCommands.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,KAAK,EAA4B,MAAM,qBAAqB,CAAC;AAC3E,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAsCxD;;;;;;;;;;GAUG;AACH,eAAO,MAAM,UAAU,EAAE,WAAW,CAAC,CAAC,YAAY,EAAE,MAAM,EAAE,gBAAgB,EAAE,MAAM,EAAE,UAAU,CAAC,EAAE,KAAK,CAAC,CAmQtG,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"listCommands.test.d.ts","sourceRoot":"","sources":["../../src/commands/listCommands.test.ts"],"names":[],"mappings":""}
|