@domternal/core 0.3.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/README.md +7 -5
- 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/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.cjs +20 -12
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +823 -794
- package/dist/index.d.ts +23 -5803
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +20 -12
- package/dist/index.js.map +1 -1
- 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.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 +2 -2
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* FloatingMenu Extension
|
|
3
|
+
*
|
|
4
|
+
* Shows a floating menu when the cursor is in an empty paragraph.
|
|
5
|
+
* Useful for showing block-level insertion options.
|
|
6
|
+
*
|
|
7
|
+
* @example
|
|
8
|
+
* ```ts
|
|
9
|
+
* import { FloatingMenu } from '@domternal/core';
|
|
10
|
+
*
|
|
11
|
+
* // Create menu element
|
|
12
|
+
* const menuElement = document.getElementById('floating-menu');
|
|
13
|
+
*
|
|
14
|
+
* const editor = new Editor({
|
|
15
|
+
* extensions: [
|
|
16
|
+
* // ... other extensions
|
|
17
|
+
* FloatingMenu.configure({
|
|
18
|
+
* element: menuElement,
|
|
19
|
+
* shouldShow: ({ editor, state }) => {
|
|
20
|
+
* const { $from, empty } = state.selection;
|
|
21
|
+
* // Show in empty paragraphs
|
|
22
|
+
* return empty &&
|
|
23
|
+
* $from.parent.type.name === 'paragraph' &&
|
|
24
|
+
* $from.parent.content.size === 0;
|
|
25
|
+
* },
|
|
26
|
+
* }),
|
|
27
|
+
* ],
|
|
28
|
+
* });
|
|
29
|
+
* ```
|
|
30
|
+
*
|
|
31
|
+
* Styles are included automatically via `@domternal/theme` (`_floating-menu.scss`).
|
|
32
|
+
*/
|
|
33
|
+
import { Extension } from '../Extension.js';
|
|
34
|
+
import { Plugin, PluginKey } from '@domternal/pm/state';
|
|
35
|
+
import type { EditorView } from '@domternal/pm/view';
|
|
36
|
+
import type { EditorState } from '@domternal/pm/state';
|
|
37
|
+
import type { Editor } from '../Editor.js';
|
|
38
|
+
export declare const floatingMenuPluginKey: PluginKey<any>;
|
|
39
|
+
export interface FloatingMenuOptions {
|
|
40
|
+
/**
|
|
41
|
+
* The HTML element that contains the menu.
|
|
42
|
+
* Must be provided by the user.
|
|
43
|
+
*/
|
|
44
|
+
element: HTMLElement | null;
|
|
45
|
+
/**
|
|
46
|
+
* Function to determine if the menu should be shown.
|
|
47
|
+
* By default, shows when the cursor is in an empty paragraph.
|
|
48
|
+
*/
|
|
49
|
+
shouldShow: (props: {
|
|
50
|
+
editor: Editor;
|
|
51
|
+
view: EditorView;
|
|
52
|
+
state: EditorState;
|
|
53
|
+
}) => boolean;
|
|
54
|
+
/**
|
|
55
|
+
* Offset in pixels from the cursor position.
|
|
56
|
+
* @default 0
|
|
57
|
+
*/
|
|
58
|
+
offset: number;
|
|
59
|
+
}
|
|
60
|
+
export interface CreateFloatingMenuPluginOptions {
|
|
61
|
+
pluginKey: PluginKey;
|
|
62
|
+
editor: Editor;
|
|
63
|
+
element: HTMLElement;
|
|
64
|
+
shouldShow?: FloatingMenuOptions['shouldShow'];
|
|
65
|
+
offset?: number;
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* Creates a standalone FloatingMenu ProseMirror plugin.
|
|
69
|
+
* Can be used by framework wrappers (Angular, React, Vue) to create the plugin
|
|
70
|
+
* independently of the extension system.
|
|
71
|
+
*/
|
|
72
|
+
export declare function createFloatingMenuPlugin(options: CreateFloatingMenuPluginOptions): Plugin;
|
|
73
|
+
export declare const FloatingMenu: Extension<FloatingMenuOptions, unknown>;
|
|
74
|
+
//# sourceMappingURL=FloatingMenu.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FloatingMenu.d.ts","sourceRoot":"","sources":["../../src/extensions/FloatingMenu.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAG3C,eAAO,MAAM,qBAAqB,gBAAgC,CAAC;AAgCnE,MAAM,WAAW,mBAAmB;IAClC;;;OAGG;IACH,OAAO,EAAE,WAAW,GAAG,IAAI,CAAC;IAE5B;;;OAGG;IACH,UAAU,EAAE,CAAC,KAAK,EAAE;QAClB,MAAM,EAAE,MAAM,CAAC;QACf,IAAI,EAAE,UAAU,CAAC;QACjB,KAAK,EAAE,WAAW,CAAC;KACpB,KAAK,OAAO,CAAC;IAEd;;;OAGG;IACH,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,+BAA+B;IAC9C,SAAS,EAAE,SAAS,CAAC;IACrB,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,WAAW,CAAC;IACrB,UAAU,CAAC,EAAE,mBAAmB,CAAC,YAAY,CAAC,CAAC;IAC/C,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED;;;;GAIG;AACH,wBAAgB,wBAAwB,CAAC,OAAO,EAAE,+BAA+B,GAAG,MAAM,CA+FzF;AAED,eAAO,MAAM,YAAY,yCAiCvB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FloatingMenu.test.d.ts","sourceRoot":"","sources":["../../src/extensions/FloatingMenu.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Focus Extension
|
|
3
|
+
*
|
|
4
|
+
* Adds CSS classes to nodes that contain the current selection.
|
|
5
|
+
* Useful for highlighting the focused paragraph or block.
|
|
6
|
+
*/
|
|
7
|
+
import { PluginKey } from '@domternal/pm/state';
|
|
8
|
+
import { Extension } from '../Extension.js';
|
|
9
|
+
export interface FocusOptions {
|
|
10
|
+
/**
|
|
11
|
+
* CSS class to add to focused nodes.
|
|
12
|
+
* @default 'has-focus'
|
|
13
|
+
*/
|
|
14
|
+
className: string;
|
|
15
|
+
/**
|
|
16
|
+
* Which nodes to mark as focused:
|
|
17
|
+
* - 'all': All nodes containing the selection
|
|
18
|
+
* - 'deepest': Only the innermost focused node
|
|
19
|
+
* - 'shallowest': Only the outermost focused node
|
|
20
|
+
* @default 'all'
|
|
21
|
+
*/
|
|
22
|
+
mode: 'all' | 'deepest' | 'shallowest';
|
|
23
|
+
}
|
|
24
|
+
export declare const focusPluginKey: PluginKey<any>;
|
|
25
|
+
export declare const Focus: Extension<FocusOptions, unknown>;
|
|
26
|
+
//# sourceMappingURL=Focus.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Focus.d.ts","sourceRoot":"","sources":["../../src/extensions/Focus.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EAAU,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAExD,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAE5C,MAAM,WAAW,YAAY;IAC3B;;;OAGG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;;;;;OAMG;IACH,IAAI,EAAE,KAAK,GAAG,SAAS,GAAG,YAAY,CAAC;CACxC;AAED,eAAO,MAAM,cAAc,gBAAyB,CAAC;AAErD,eAAO,MAAM,KAAK,kCA+DhB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Focus.test.d.ts","sourceRoot":"","sources":["../../src/extensions/Focus.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* FontFamily Extension
|
|
3
|
+
*
|
|
4
|
+
* Adds font family styling via the TextStyle mark.
|
|
5
|
+
* Requires TextStyle mark to be enabled.
|
|
6
|
+
*
|
|
7
|
+
* @example
|
|
8
|
+
* ```ts
|
|
9
|
+
* import { TextStyle, FontFamily } from '@domternal/core';
|
|
10
|
+
*
|
|
11
|
+
* const editor = new Editor({
|
|
12
|
+
* extensions: [
|
|
13
|
+
* // ... other extensions
|
|
14
|
+
* TextStyle,
|
|
15
|
+
* FontFamily.configure({
|
|
16
|
+
* fontFamilies: ['Arial', 'Times New Roman', 'Courier New'],
|
|
17
|
+
* }),
|
|
18
|
+
* ],
|
|
19
|
+
* });
|
|
20
|
+
*
|
|
21
|
+
* editor.commands.setFontFamily('Arial');
|
|
22
|
+
* editor.commands.unsetFontFamily();
|
|
23
|
+
* ```
|
|
24
|
+
*/
|
|
25
|
+
import { Extension } from '../Extension.js';
|
|
26
|
+
declare module '../types/Commands.js' {
|
|
27
|
+
interface RawCommands {
|
|
28
|
+
setFontFamily: CommandSpec<[fontFamily: string]>;
|
|
29
|
+
unsetFontFamily: CommandSpec;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
export interface FontFamilyOptions {
|
|
33
|
+
/**
|
|
34
|
+
* List of font families shown in the toolbar dropdown.
|
|
35
|
+
* Any font family is accepted from pasted HTML regardless of this list.
|
|
36
|
+
* @default ['Arial', 'Verdana', 'Tahoma', 'Trebuchet MS', 'Times New Roman', 'Georgia', 'Palatino Linotype', 'Courier New']
|
|
37
|
+
*/
|
|
38
|
+
fontFamilies: string[];
|
|
39
|
+
}
|
|
40
|
+
export declare const FontFamily: Extension<FontFamilyOptions, unknown>;
|
|
41
|
+
//# sourceMappingURL=FontFamily.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FontFamily.d.ts","sourceRoot":"","sources":["../../src/extensions/FontFamily.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAK5C,OAAO,QAAQ,sBAAsB,CAAC;IACpC,UAAU,WAAW;QACnB,aAAa,EAAE,WAAW,CAAC,CAAC,UAAU,EAAE,MAAM,CAAC,CAAC,CAAC;QACjD,eAAe,EAAE,WAAW,CAAC;KAC9B;CACF;AAED,MAAM,WAAW,iBAAiB;IAChC;;;;OAIG;IACH,YAAY,EAAE,MAAM,EAAE,CAAC;CACxB;AAED,eAAO,MAAM,UAAU,uCAoFrB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FontFamily.test.d.ts","sourceRoot":"","sources":["../../src/extensions/FontFamily.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* FontSize Extension
|
|
3
|
+
*
|
|
4
|
+
* Adds font size styling via the TextStyle mark.
|
|
5
|
+
* Requires TextStyle mark to be enabled.
|
|
6
|
+
*
|
|
7
|
+
* @example
|
|
8
|
+
* ```ts
|
|
9
|
+
* import { TextStyle, FontSize } from '@domternal/core';
|
|
10
|
+
*
|
|
11
|
+
* const editor = new Editor({
|
|
12
|
+
* extensions: [
|
|
13
|
+
* // ... other extensions
|
|
14
|
+
* TextStyle,
|
|
15
|
+
* FontSize.configure({
|
|
16
|
+
* fontSizes: ['12px', '14px', '16px', '18px', '24px', '32px'],
|
|
17
|
+
* }),
|
|
18
|
+
* ],
|
|
19
|
+
* });
|
|
20
|
+
*
|
|
21
|
+
* editor.commands.setFontSize('16px');
|
|
22
|
+
* editor.commands.unsetFontSize();
|
|
23
|
+
* ```
|
|
24
|
+
*/
|
|
25
|
+
import { Extension } from '../Extension.js';
|
|
26
|
+
declare module '../types/Commands.js' {
|
|
27
|
+
interface RawCommands {
|
|
28
|
+
setFontSize: CommandSpec<[fontSize: string]>;
|
|
29
|
+
unsetFontSize: CommandSpec;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
export interface FontSizeOptions {
|
|
33
|
+
/**
|
|
34
|
+
* List of font sizes shown in the toolbar dropdown.
|
|
35
|
+
* Any font size is accepted from pasted HTML regardless of this list.
|
|
36
|
+
* @default ['12px', '14px', '16px', '18px', '24px', '32px']
|
|
37
|
+
*/
|
|
38
|
+
fontSizes: string[];
|
|
39
|
+
/**
|
|
40
|
+
* Show an unset/reset button at the end of the dropdown.
|
|
41
|
+
* @default false
|
|
42
|
+
*/
|
|
43
|
+
showReset: boolean;
|
|
44
|
+
}
|
|
45
|
+
export declare const FontSize: Extension<FontSizeOptions, unknown>;
|
|
46
|
+
//# sourceMappingURL=FontSize.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FontSize.d.ts","sourceRoot":"","sources":["../../src/extensions/FontSize.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAK5C,OAAO,QAAQ,sBAAsB,CAAC;IACpC,UAAU,WAAW;QACnB,WAAW,EAAE,WAAW,CAAC,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC,CAAC;QAC7C,aAAa,EAAE,WAAW,CAAC;KAC5B;CACF;AAED,MAAM,WAAW,eAAe;IAC9B;;;;OAIG;IACH,SAAS,EAAE,MAAM,EAAE,CAAC;IAEpB;;;OAGG;IACH,SAAS,EAAE,OAAO,CAAC;CACpB;AAED,eAAO,MAAM,QAAQ,qCAmGnB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FontSize.test.d.ts","sourceRoot":"","sources":["../../src/extensions/FontSize.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Gapcursor.d.ts","sourceRoot":"","sources":["../../src/extensions/Gapcursor.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAE5C,eAAO,MAAM,SAAS,6BAMpB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Gapcursor.test.d.ts","sourceRoot":"","sources":["../../src/extensions/Gapcursor.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Highlight Extension
|
|
3
|
+
*
|
|
4
|
+
* Adds background-color highlighting via the TextStyle mark.
|
|
5
|
+
* Requires TextStyle mark to be enabled.
|
|
6
|
+
*
|
|
7
|
+
* @example
|
|
8
|
+
* ```ts
|
|
9
|
+
* import { TextStyle, Highlight } from '@domternal/core';
|
|
10
|
+
*
|
|
11
|
+
* const editor = new Editor({
|
|
12
|
+
* extensions: [
|
|
13
|
+
* // ... other extensions
|
|
14
|
+
* TextStyle,
|
|
15
|
+
* Highlight, // uses the default 25-color palette
|
|
16
|
+
* ],
|
|
17
|
+
* });
|
|
18
|
+
*
|
|
19
|
+
* editor.commands.setHighlight({ color: '#fef08a' });
|
|
20
|
+
* editor.commands.unsetHighlight();
|
|
21
|
+
* editor.commands.toggleHighlight();
|
|
22
|
+
* ```
|
|
23
|
+
*/
|
|
24
|
+
import { Extension } from '../Extension.js';
|
|
25
|
+
declare module '../types/Commands.js' {
|
|
26
|
+
interface RawCommands {
|
|
27
|
+
setHighlight: CommandSpec<[attributes?: {
|
|
28
|
+
color?: string;
|
|
29
|
+
}]>;
|
|
30
|
+
unsetHighlight: CommandSpec;
|
|
31
|
+
toggleHighlight: CommandSpec<[attributes?: {
|
|
32
|
+
color?: string;
|
|
33
|
+
}]>;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Default 25-color highlight palette (5 columns x 5 rows).
|
|
38
|
+
* Row 1–2: warm pastels (yellow → pink)
|
|
39
|
+
* Row 3–4: cool pastels (green → purple)
|
|
40
|
+
* Row 5: neutrals
|
|
41
|
+
*/
|
|
42
|
+
export declare const DEFAULT_HIGHLIGHT_COLORS: string[];
|
|
43
|
+
export interface HighlightOptions {
|
|
44
|
+
/**
|
|
45
|
+
* List of color values for the highlight palette.
|
|
46
|
+
* Pass an empty array to get a simple toggle button instead of a dropdown.
|
|
47
|
+
*/
|
|
48
|
+
colors: string[];
|
|
49
|
+
/**
|
|
50
|
+
* Number of columns in the palette grid.
|
|
51
|
+
* @default 5
|
|
52
|
+
*/
|
|
53
|
+
columns: number;
|
|
54
|
+
/**
|
|
55
|
+
* Default highlight color used by keyboard shortcut and ==text== input rule.
|
|
56
|
+
* @default '#fef08a'
|
|
57
|
+
*/
|
|
58
|
+
defaultColor: string;
|
|
59
|
+
}
|
|
60
|
+
export declare const Highlight: Extension<HighlightOptions, unknown>;
|
|
61
|
+
//# sourceMappingURL=Highlight.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Highlight.d.ts","sourceRoot":"","sources":["../../src/extensions/Highlight.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAM5C,OAAO,QAAQ,sBAAsB,CAAC;IACpC,UAAU,WAAW;QACnB,YAAY,EAAE,WAAW,CAAC,CAAC,UAAU,CAAC,EAAE;YAAE,KAAK,CAAC,EAAE,MAAM,CAAA;SAAE,CAAC,CAAC,CAAC;QAC7D,cAAc,EAAE,WAAW,CAAC;QAC5B,eAAe,EAAE,WAAW,CAAC,CAAC,UAAU,CAAC,EAAE;YAAE,KAAK,CAAC,EAAE,MAAM,CAAA;SAAE,CAAC,CAAC,CAAC;KACjE;CACF;AAED;;;;;GAKG;AACH,eAAO,MAAM,wBAAwB,EAAE,MAAM,EAW5C,CAAC;AAEF,MAAM,WAAW,gBAAgB;IAC/B;;;OAGG;IACH,MAAM,EAAE,MAAM,EAAE,CAAC;IAEjB;;;OAGG;IACH,OAAO,EAAE,MAAM,CAAC;IAEhB;;;OAGG;IACH,YAAY,EAAE,MAAM,CAAC;CACtB;AAED,eAAO,MAAM,SAAS,sCAmLpB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Highlight.test.d.ts","sourceRoot":"","sources":["../../src/extensions/Highlight.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { Extension } from '../Extension.js';
|
|
2
|
+
declare module '../types/Commands.js' {
|
|
3
|
+
interface RawCommands {
|
|
4
|
+
undo: CommandSpec;
|
|
5
|
+
redo: CommandSpec;
|
|
6
|
+
}
|
|
7
|
+
}
|
|
8
|
+
export interface HistoryOptions {
|
|
9
|
+
/**
|
|
10
|
+
* Maximum number of undo steps to keep in history.
|
|
11
|
+
* @default 100
|
|
12
|
+
*/
|
|
13
|
+
depth: number;
|
|
14
|
+
/**
|
|
15
|
+
* Time in milliseconds to group changes into a single undo step.
|
|
16
|
+
* Changes within this delay will be combined.
|
|
17
|
+
* @default 500
|
|
18
|
+
*/
|
|
19
|
+
newGroupDelay: number;
|
|
20
|
+
}
|
|
21
|
+
export declare const History: Extension<HistoryOptions, unknown>;
|
|
22
|
+
//# sourceMappingURL=History.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"History.d.ts","sourceRoot":"","sources":["../../src/extensions/History.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAI5C,OAAO,QAAQ,sBAAsB,CAAC;IACpC,UAAU,WAAW;QACnB,IAAI,EAAE,WAAW,CAAC;QAClB,IAAI,EAAE,WAAW,CAAC;KACnB;CACF;AAED,MAAM,WAAW,cAAc;IAC7B;;;OAGG;IACH,KAAK,EAAE,MAAM,CAAC;IAEd;;;;OAIG;IACH,aAAa,EAAE,MAAM,CAAC;CACvB;AAED,eAAO,MAAM,OAAO,oCAiElB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"History.test.d.ts","sourceRoot":"","sources":["../../src/extensions/History.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* InvisibleChars Extension
|
|
3
|
+
*
|
|
4
|
+
* Shows invisible characters like spaces, paragraph marks, and hard breaks.
|
|
5
|
+
* Useful for document editing where whitespace matters.
|
|
6
|
+
*
|
|
7
|
+
* Styles are included automatically via `@domternal/theme` (`_invisible-chars.scss`).
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* ```ts
|
|
11
|
+
* import { InvisibleChars } from '@domternal/core';
|
|
12
|
+
*
|
|
13
|
+
* const editor = new Editor({
|
|
14
|
+
* extensions: [
|
|
15
|
+
* // ... other extensions
|
|
16
|
+
* InvisibleChars.configure({
|
|
17
|
+
* visible: false, // Start hidden
|
|
18
|
+
* paragraph: true,
|
|
19
|
+
* hardBreak: true,
|
|
20
|
+
* space: true,
|
|
21
|
+
* nbsp: true,
|
|
22
|
+
* }),
|
|
23
|
+
* ],
|
|
24
|
+
* });
|
|
25
|
+
*
|
|
26
|
+
* // Toggle visibility
|
|
27
|
+
* editor.commands.toggleInvisibleChars();
|
|
28
|
+
*
|
|
29
|
+
* // Check current state
|
|
30
|
+
* const isVisible = editor.storage.invisibleChars.isVisible();
|
|
31
|
+
* ```
|
|
32
|
+
*/
|
|
33
|
+
import { Extension } from '../Extension.js';
|
|
34
|
+
import { PluginKey } from '@domternal/pm/state';
|
|
35
|
+
declare module '../types/Commands.js' {
|
|
36
|
+
interface RawCommands {
|
|
37
|
+
toggleInvisibleChars: CommandSpec;
|
|
38
|
+
showInvisibleChars: CommandSpec;
|
|
39
|
+
hideInvisibleChars: CommandSpec;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
export declare const invisibleCharsPluginKey: PluginKey<any>;
|
|
43
|
+
export interface InvisibleCharsOptions {
|
|
44
|
+
/**
|
|
45
|
+
* Whether invisible characters are shown.
|
|
46
|
+
* @default false
|
|
47
|
+
*/
|
|
48
|
+
visible: boolean;
|
|
49
|
+
/**
|
|
50
|
+
* Show paragraph markers (¶).
|
|
51
|
+
* @default true
|
|
52
|
+
*/
|
|
53
|
+
paragraph: boolean;
|
|
54
|
+
/**
|
|
55
|
+
* Show hard break markers (↵).
|
|
56
|
+
* @default true
|
|
57
|
+
*/
|
|
58
|
+
hardBreak: boolean;
|
|
59
|
+
/**
|
|
60
|
+
* Show space markers (·).
|
|
61
|
+
* @default true
|
|
62
|
+
*/
|
|
63
|
+
space: boolean;
|
|
64
|
+
/**
|
|
65
|
+
* Show non-breaking space markers (°).
|
|
66
|
+
* @default true
|
|
67
|
+
*/
|
|
68
|
+
nbsp: boolean;
|
|
69
|
+
/**
|
|
70
|
+
* Custom CSS class for invisible char decorations.
|
|
71
|
+
* @default 'invisible-char'
|
|
72
|
+
*/
|
|
73
|
+
className: string;
|
|
74
|
+
}
|
|
75
|
+
export interface InvisibleCharsStorage {
|
|
76
|
+
/**
|
|
77
|
+
* Toggle visibility of invisible characters.
|
|
78
|
+
*/
|
|
79
|
+
toggle: () => void;
|
|
80
|
+
/**
|
|
81
|
+
* Current visibility state.
|
|
82
|
+
*/
|
|
83
|
+
isVisible: () => boolean;
|
|
84
|
+
}
|
|
85
|
+
export declare const InvisibleChars: Extension<InvisibleCharsOptions, InvisibleCharsStorage>;
|
|
86
|
+
//# sourceMappingURL=InvisibleChars.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"InvisibleChars.d.ts","sourceRoot":"","sources":["../../src/extensions/InvisibleChars.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EAAU,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAOxD,OAAO,QAAQ,sBAAsB,CAAC;IACpC,UAAU,WAAW;QACnB,oBAAoB,EAAE,WAAW,CAAC;QAClC,kBAAkB,EAAE,WAAW,CAAC;QAChC,kBAAkB,EAAE,WAAW,CAAC;KACjC;CACF;AAED,eAAO,MAAM,uBAAuB,gBAAkC,CAAC;AAmFvE,MAAM,WAAW,qBAAqB;IACpC;;;OAGG;IACH,OAAO,EAAE,OAAO,CAAC;IAEjB;;;OAGG;IACH,SAAS,EAAE,OAAO,CAAC;IAEnB;;;OAGG;IACH,SAAS,EAAE,OAAO,CAAC;IAEnB;;;OAGG;IACH,KAAK,EAAE,OAAO,CAAC;IAEf;;;OAGG;IACH,IAAI,EAAE,OAAO,CAAC;IAEd;;;OAGG;IACH,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,qBAAqB;IACpC;;OAEG;IACH,MAAM,EAAE,MAAM,IAAI,CAAC;IAEnB;;OAEG;IACH,SAAS,EAAE,MAAM,OAAO,CAAC;CAC1B;AAED,eAAO,MAAM,cAAc,yDAsKzB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"InvisibleChars.test.d.ts","sourceRoot":"","sources":["../../src/extensions/InvisibleChars.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* LineHeight Extension
|
|
3
|
+
*
|
|
4
|
+
* Adds line height styling to block nodes.
|
|
5
|
+
*
|
|
6
|
+
* @example
|
|
7
|
+
* ```ts
|
|
8
|
+
* import { LineHeight } from '@domternal/core';
|
|
9
|
+
*
|
|
10
|
+
* const editor = new Editor({
|
|
11
|
+
* extensions: [
|
|
12
|
+
* // ... other extensions
|
|
13
|
+
* LineHeight.configure({
|
|
14
|
+
* types: ['paragraph', 'heading'],
|
|
15
|
+
* lineHeights: ['1', '1.5', '2'],
|
|
16
|
+
* }),
|
|
17
|
+
* ],
|
|
18
|
+
* });
|
|
19
|
+
*
|
|
20
|
+
* editor.commands.setLineHeight('1.5');
|
|
21
|
+
* editor.commands.unsetLineHeight();
|
|
22
|
+
* ```
|
|
23
|
+
*/
|
|
24
|
+
import { Extension } from '../Extension.js';
|
|
25
|
+
declare module '../types/Commands.js' {
|
|
26
|
+
interface RawCommands {
|
|
27
|
+
setLineHeight: CommandSpec<[lineHeight: string]>;
|
|
28
|
+
unsetLineHeight: CommandSpec;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
export interface LineHeightOptions {
|
|
32
|
+
/**
|
|
33
|
+
* Node types that should support line height.
|
|
34
|
+
* @default ['paragraph', 'heading']
|
|
35
|
+
*/
|
|
36
|
+
types: string[];
|
|
37
|
+
/**
|
|
38
|
+
* List of allowed line heights (e.g., ['1', '1.5', '2']).
|
|
39
|
+
* If empty, all values are allowed.
|
|
40
|
+
* @default ['1', '1.15', '1.25', '1.5', '2']
|
|
41
|
+
*/
|
|
42
|
+
lineHeights: string[];
|
|
43
|
+
/**
|
|
44
|
+
* Default line height value.
|
|
45
|
+
* @default null
|
|
46
|
+
*/
|
|
47
|
+
defaultLineHeight: string | null;
|
|
48
|
+
}
|
|
49
|
+
export declare const LineHeight: Extension<LineHeightOptions, unknown>;
|
|
50
|
+
//# sourceMappingURL=LineHeight.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LineHeight.d.ts","sourceRoot":"","sources":["../../src/extensions/LineHeight.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAI5C,OAAO,QAAQ,sBAAsB,CAAC;IACpC,UAAU,WAAW;QACnB,aAAa,EAAE,WAAW,CAAC,CAAC,UAAU,EAAE,MAAM,CAAC,CAAC,CAAC;QACjD,eAAe,EAAE,WAAW,CAAC;KAC9B;CACF;AAED,MAAM,WAAW,iBAAiB;IAChC;;;OAGG;IACH,KAAK,EAAE,MAAM,EAAE,CAAC;IAEhB;;;;OAIG;IACH,WAAW,EAAE,MAAM,EAAE,CAAC;IAEtB;;;OAGG;IACH,iBAAiB,EAAE,MAAM,GAAG,IAAI,CAAC;CAClC;AAED,eAAO,MAAM,UAAU,uCA6GrB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LineHeight.test.d.ts","sourceRoot":"","sources":["../../src/extensions/LineHeight.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Extension } from '../Extension.js';
|
|
2
|
+
export interface LinkPopoverOptions {
|
|
3
|
+
/**
|
|
4
|
+
* List of allowed URL protocols (should match Link mark's protocols)
|
|
5
|
+
* @default ['http:', 'https:', 'mailto:', 'tel:']
|
|
6
|
+
*/
|
|
7
|
+
protocols: string[];
|
|
8
|
+
}
|
|
9
|
+
export declare const LinkPopover: Extension<LinkPopoverOptions, unknown>;
|
|
10
|
+
//# sourceMappingURL=LinkPopover.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LinkPopover.d.ts","sourceRoot":"","sources":["../../src/extensions/LinkPopover.ts"],"names":[],"mappings":"AAmBA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAO5C,MAAM,WAAW,kBAAkB;IACjC;;;OAGG;IACH,SAAS,EAAE,MAAM,EAAE,CAAC;CACrB;AAwTD,eAAO,MAAM,WAAW,wCAwBtB,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Extension } from '../Extension.js';
|
|
2
|
+
export interface ListKeymapOptions {
|
|
3
|
+
/**
|
|
4
|
+
* Name of the list item node type.
|
|
5
|
+
* @default 'listItem'
|
|
6
|
+
*/
|
|
7
|
+
listItem: string;
|
|
8
|
+
}
|
|
9
|
+
export declare const ListKeymap: Extension<ListKeymapOptions, unknown>;
|
|
10
|
+
//# sourceMappingURL=ListKeymap.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ListKeymap.d.ts","sourceRoot":"","sources":["../../src/extensions/ListKeymap.ts"],"names":[],"mappings":"AAYA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAG5C,MAAM,WAAW,iBAAiB;IAChC;;;OAGG;IACH,QAAQ,EAAE,MAAM,CAAC;CAClB;AA+BD,eAAO,MAAM,UAAU,uCAqErB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ListKeymap.test.d.ts","sourceRoot":"","sources":["../../src/extensions/ListKeymap.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Placeholder Extension
|
|
3
|
+
*
|
|
4
|
+
* Shows placeholder text when the editor is empty.
|
|
5
|
+
* Supports both static and dynamic (function-based) placeholders.
|
|
6
|
+
*/
|
|
7
|
+
import { PluginKey } from '@domternal/pm/state';
|
|
8
|
+
import type { Node as PMNode } from '@domternal/pm/model';
|
|
9
|
+
import { Extension } from '../Extension.js';
|
|
10
|
+
export interface PlaceholderOptions {
|
|
11
|
+
/**
|
|
12
|
+
* Placeholder text to show. Can be a string or function for per-node placeholders.
|
|
13
|
+
* @default 'Write something …'
|
|
14
|
+
*/
|
|
15
|
+
placeholder: string | ((props: {
|
|
16
|
+
node: PMNode;
|
|
17
|
+
pos: number;
|
|
18
|
+
}) => string);
|
|
19
|
+
/**
|
|
20
|
+
* Only show placeholder when editor is editable.
|
|
21
|
+
* @default true
|
|
22
|
+
*/
|
|
23
|
+
showOnlyWhenEditable: boolean;
|
|
24
|
+
/**
|
|
25
|
+
* CSS class applied to empty nodes.
|
|
26
|
+
* @default 'is-empty'
|
|
27
|
+
*/
|
|
28
|
+
emptyNodeClass: string;
|
|
29
|
+
/**
|
|
30
|
+
* CSS class applied when entire editor is empty.
|
|
31
|
+
* @default 'is-editor-empty'
|
|
32
|
+
*/
|
|
33
|
+
emptyEditorClass: string;
|
|
34
|
+
/**
|
|
35
|
+
* Show placeholder only in the currently focused/selected node.
|
|
36
|
+
* @default true
|
|
37
|
+
*/
|
|
38
|
+
showOnlyCurrent: boolean;
|
|
39
|
+
/**
|
|
40
|
+
* Include children when checking if a node is empty.
|
|
41
|
+
* @default false
|
|
42
|
+
*/
|
|
43
|
+
includeChildren: boolean;
|
|
44
|
+
}
|
|
45
|
+
export declare const placeholderPluginKey: PluginKey<any>;
|
|
46
|
+
export declare const Placeholder: Extension<PlaceholderOptions, unknown>;
|
|
47
|
+
//# sourceMappingURL=Placeholder.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Placeholder.d.ts","sourceRoot":"","sources":["../../src/extensions/Placeholder.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EAAU,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAExD,OAAO,KAAK,EAAE,IAAI,IAAI,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAC1D,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAE5C,MAAM,WAAW,kBAAkB;IACjC;;;OAGG;IACH,WAAW,EAAE,MAAM,GAAG,CAAC,CAAC,KAAK,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,GAAG,EAAE,MAAM,CAAA;KAAE,KAAK,MAAM,CAAC,CAAC;IAEzE;;;OAGG;IACH,oBAAoB,EAAE,OAAO,CAAC;IAE9B;;;OAGG;IACH,cAAc,EAAE,MAAM,CAAC;IAEvB;;;OAGG;IACH,gBAAgB,EAAE,MAAM,CAAC;IAEzB;;;OAGG;IACH,eAAe,EAAE,OAAO,CAAC;IAEzB;;;OAGG;IACH,eAAe,EAAE,OAAO,CAAC;CAC1B;AAED,eAAO,MAAM,oBAAoB,gBAA+B,CAAC;AAEjE,eAAO,MAAM,WAAW,wCA+EtB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Placeholder.test.d.ts","sourceRoot":"","sources":["../../src/extensions/Placeholder.test.ts"],"names":[],"mappings":""}
|