@payloadcms/richtext-lexical 4.0.0-internal.d28e9fb → 4.0.0-internal.fa345ef
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/LICENSE.md +1 -1
- package/dist/cell/rscEntry.d.ts +1 -1
- package/dist/cell/rscEntry.d.ts.map +1 -1
- package/dist/cell/rscEntry.js +5 -5
- package/dist/cell/rscEntry.js.map +1 -1
- package/dist/exports/client/Field-XH5C4HFU.js +2 -0
- package/dist/exports/client/Field-XH5C4HFU.js.map +7 -0
- package/dist/exports/client/RelationshipComponent-YCPAKOL7.js +2 -0
- package/dist/exports/client/RelationshipComponent-YCPAKOL7.js.map +7 -0
- package/dist/exports/client/bundled.css +1 -1
- package/dist/exports/client/chunk-5VIL27GI.js +2 -0
- package/dist/exports/client/chunk-5VIL27GI.js.map +7 -0
- package/dist/exports/client/chunk-ESITTE3C.js +2 -0
- package/dist/exports/client/chunk-ESITTE3C.js.map +7 -0
- package/dist/exports/client/{chunk-BZZVLW4U.js → chunk-RJ5MAOKZ.js} +1 -1
- package/dist/exports/client/chunk-RJ5MAOKZ.js.map +7 -0
- package/dist/exports/client/chunk-UD4DQ4AK.js +2 -0
- package/dist/exports/client/chunk-UD4DQ4AK.js.map +7 -0
- package/dist/exports/client/chunk-WSAPGI3Z.js +2 -0
- package/dist/exports/client/chunk-WSAPGI3Z.js.map +7 -0
- package/dist/exports/client/chunk-X3D4LZS7.js +2 -0
- package/dist/exports/client/chunk-X3D4LZS7.js.map +7 -0
- package/dist/exports/client/component-PHZQBOJE.js +2 -0
- package/dist/exports/client/component-PHZQBOJE.js.map +7 -0
- package/dist/exports/client/componentInline-H24N7GUG.js +2 -0
- package/dist/exports/client/index.d.ts +0 -1
- package/dist/exports/client/index.d.ts.map +1 -1
- package/dist/exports/client/index.js +27 -28
- package/dist/exports/client/index.js.map +4 -4
- package/dist/exports/react/index.d.ts +1 -1
- package/dist/exports/react/index.d.ts.map +1 -1
- package/dist/exports/react/index.js.map +1 -1
- package/dist/features/align/client/toolbarAlignGroup.d.ts.map +1 -1
- package/dist/features/align/client/toolbarAlignGroup.js +1 -0
- package/dist/features/align/client/toolbarAlignGroup.js.map +1 -1
- package/dist/features/blockquote/client/index.js +2 -2
- package/dist/features/blockquote/client/index.js.map +1 -1
- package/dist/features/blockquote/server/index.d.ts +1 -4
- package/dist/features/blockquote/server/index.d.ts.map +1 -1
- package/dist/features/blockquote/server/index.js +4 -41
- package/dist/features/blockquote/server/index.js.map +1 -1
- package/dist/features/blockquote/server/schema.d.ts +8 -0
- package/dist/features/blockquote/server/schema.d.ts.map +1 -0
- package/dist/features/blockquote/server/schema.js +15 -0
- package/dist/features/blockquote/server/schema.js.map +1 -0
- package/dist/features/blocks/client/component/BlockContent.d.ts +10 -0
- package/dist/features/blocks/client/component/BlockContent.d.ts.map +1 -1
- package/dist/features/blocks/client/component/BlockContent.js.map +1 -1
- package/dist/features/blocks/client/component/index.css +178 -0
- package/dist/features/blocks/client/component/index.d.ts +4 -3
- package/dist/features/blocks/client/component/index.d.ts.map +1 -1
- package/dist/features/blocks/client/component/index.js +89 -24
- package/dist/features/blocks/client/component/index.js.map +1 -1
- package/dist/features/blocks/client/componentInline/components/InlineBlockContainer.d.ts.map +1 -1
- package/dist/features/blocks/client/componentInline/index.css +85 -0
- package/dist/features/blocks/client/componentInline/index.d.ts +4 -3
- package/dist/features/blocks/client/componentInline/index.d.ts.map +1 -1
- package/dist/features/blocks/client/componentInline/index.js +33 -12
- package/dist/features/blocks/client/componentInline/index.js.map +1 -1
- package/dist/features/blocks/client/index.d.ts.map +1 -1
- package/dist/features/blocks/client/index.js +4 -4
- package/dist/features/blocks/client/index.js.map +1 -1
- package/dist/features/blocks/client/markdown/getLexicalToMarkdown.d.ts +1 -1
- package/dist/features/blocks/client/markdown/getLexicalToMarkdown.d.ts.map +1 -1
- package/dist/features/blocks/client/markdown/getLexicalToMarkdown.js +1 -1
- package/dist/features/blocks/client/markdown/getLexicalToMarkdown.js.map +1 -1
- package/dist/features/blocks/client/markdown/getMarkdownToLexical.d.ts +1 -1
- package/dist/features/blocks/client/markdown/getMarkdownToLexical.d.ts.map +1 -1
- package/dist/features/blocks/client/markdown/getMarkdownToLexical.js +5 -2
- package/dist/features/blocks/client/markdown/getMarkdownToLexical.js.map +1 -1
- package/dist/features/blocks/client/markdown/markdownTransformer.d.ts +1 -2
- package/dist/features/blocks/client/markdown/markdownTransformer.d.ts.map +1 -1
- package/dist/features/blocks/client/markdown/markdownTransformer.js +4 -4
- package/dist/features/blocks/client/markdown/markdownTransformer.js.map +1 -1
- package/dist/features/blocks/client/nodes/BlocksNode.d.ts +2 -2
- package/dist/features/blocks/client/nodes/BlocksNode.d.ts.map +1 -1
- package/dist/features/blocks/client/nodes/BlocksNode.js.map +1 -1
- package/dist/features/blocks/client/nodes/InlineBlocksNode.d.ts +2 -2
- package/dist/features/blocks/client/nodes/InlineBlocksNode.d.ts.map +1 -1
- package/dist/features/blocks/client/nodes/InlineBlocksNode.js.map +1 -1
- package/dist/features/blocks/client/plugin/index.d.ts +1 -1
- package/dist/features/blocks/client/plugin/index.d.ts.map +1 -1
- package/dist/features/blocks/client/plugin/index.js.map +1 -1
- package/dist/features/blocks/premade/CodeBlock/Component/Block.d.ts +1 -1
- package/dist/features/blocks/premade/CodeBlock/Component/Block.d.ts.map +1 -1
- package/dist/features/blocks/premade/CodeBlock/Component/Block.js +4 -0
- package/dist/features/blocks/premade/CodeBlock/Component/Block.js.map +1 -1
- package/dist/features/blocks/premade/CodeBlock/Component/Collapse/index.css +26 -0
- package/dist/features/blocks/premade/CodeBlock/Component/Collapse/index.d.ts +1 -1
- package/dist/features/blocks/premade/CodeBlock/Component/Collapse/index.d.ts.map +1 -1
- package/dist/features/blocks/premade/CodeBlock/Component/Collapse/index.js +4 -1
- package/dist/features/blocks/premade/CodeBlock/Component/Collapse/index.js.map +1 -1
- package/dist/features/blocks/premade/CodeBlock/Component/FloatingCollapse/index.css +38 -0
- package/dist/features/blocks/premade/CodeBlock/Component/FloatingCollapse/index.d.ts +1 -1
- package/dist/features/blocks/premade/CodeBlock/Component/FloatingCollapse/index.d.ts.map +1 -1
- package/dist/features/blocks/premade/CodeBlock/Component/FloatingCollapse/index.js +7 -8
- package/dist/features/blocks/premade/CodeBlock/Component/FloatingCollapse/index.js.map +1 -1
- package/dist/features/blocks/premade/CodeBlock/Component/index.css +171 -0
- package/dist/features/blocks/server/graphQLPopulationPromise.d.ts +1 -2
- package/dist/features/blocks/server/graphQLPopulationPromise.d.ts.map +1 -1
- package/dist/features/blocks/server/graphQLPopulationPromise.js.map +1 -1
- package/dist/features/blocks/server/index.d.ts +1 -0
- package/dist/features/blocks/server/index.d.ts.map +1 -1
- package/dist/features/blocks/server/index.js +24 -72
- package/dist/features/blocks/server/index.js.map +1 -1
- package/dist/features/blocks/server/markdown/markdownTransformer.d.ts +1 -1
- package/dist/features/blocks/server/markdown/markdownTransformer.d.ts.map +1 -1
- package/dist/features/blocks/server/markdown/markdownTransformer.js +4 -4
- package/dist/features/blocks/server/markdown/markdownTransformer.js.map +1 -1
- package/dist/features/blocks/server/nodes/BlocksNode.d.ts +1 -18
- package/dist/features/blocks/server/nodes/BlocksNode.d.ts.map +1 -1
- package/dist/features/blocks/server/nodes/BlocksNode.js.map +1 -1
- package/dist/features/blocks/server/nodes/InlineBlocksNode.d.ts +2 -10
- package/dist/features/blocks/server/nodes/InlineBlocksNode.d.ts.map +1 -1
- package/dist/features/blocks/server/nodes/InlineBlocksNode.js.map +1 -1
- package/dist/features/blocks/server/schema.d.ts +45 -0
- package/dist/features/blocks/server/schema.d.ts.map +1 -0
- package/dist/features/blocks/server/schema.js +140 -0
- package/dist/features/blocks/server/schema.js.map +1 -0
- package/dist/features/blocks/server/validate.d.ts +1 -2
- package/dist/features/blocks/server/validate.d.ts.map +1 -1
- package/dist/features/blocks/server/validate.js.map +1 -1
- package/dist/features/converters/htmlToLexical/index.d.ts +1 -1
- package/dist/features/converters/htmlToLexical/index.d.ts.map +1 -1
- package/dist/features/converters/htmlToLexical/index.js.map +1 -1
- package/dist/features/converters/lexicalToHtml/async/converters/blockquote.d.ts +1 -1
- package/dist/features/converters/lexicalToHtml/async/converters/blockquote.d.ts.map +1 -1
- package/dist/features/converters/lexicalToHtml/async/converters/blockquote.js.map +1 -1
- package/dist/features/converters/lexicalToHtml/async/converters/heading.d.ts +1 -1
- package/dist/features/converters/lexicalToHtml/async/converters/heading.d.ts.map +1 -1
- package/dist/features/converters/lexicalToHtml/async/converters/heading.js.map +1 -1
- package/dist/features/converters/lexicalToHtml/async/converters/horizontalRule.d.ts +1 -1
- package/dist/features/converters/lexicalToHtml/async/converters/horizontalRule.d.ts.map +1 -1
- package/dist/features/converters/lexicalToHtml/async/converters/horizontalRule.js.map +1 -1
- package/dist/features/converters/lexicalToHtml/async/converters/linebreak.d.ts +1 -1
- package/dist/features/converters/lexicalToHtml/async/converters/linebreak.d.ts.map +1 -1
- package/dist/features/converters/lexicalToHtml/async/converters/linebreak.js.map +1 -1
- package/dist/features/converters/lexicalToHtml/async/converters/link.d.ts +1 -1
- package/dist/features/converters/lexicalToHtml/async/converters/link.d.ts.map +1 -1
- package/dist/features/converters/lexicalToHtml/async/converters/link.js.map +1 -1
- package/dist/features/converters/lexicalToHtml/async/converters/list.d.ts +1 -1
- package/dist/features/converters/lexicalToHtml/async/converters/list.d.ts.map +1 -1
- package/dist/features/converters/lexicalToHtml/async/converters/list.js.map +1 -1
- package/dist/features/converters/lexicalToHtml/async/converters/paragraph.d.ts +1 -1
- package/dist/features/converters/lexicalToHtml/async/converters/paragraph.d.ts.map +1 -1
- package/dist/features/converters/lexicalToHtml/async/converters/paragraph.js.map +1 -1
- package/dist/features/converters/lexicalToHtml/async/converters/tab.d.ts +1 -1
- package/dist/features/converters/lexicalToHtml/async/converters/tab.d.ts.map +1 -1
- package/dist/features/converters/lexicalToHtml/async/converters/tab.js.map +1 -1
- package/dist/features/converters/lexicalToHtml/async/converters/table.d.ts +1 -1
- package/dist/features/converters/lexicalToHtml/async/converters/table.d.ts.map +1 -1
- package/dist/features/converters/lexicalToHtml/async/converters/table.js +1 -1
- package/dist/features/converters/lexicalToHtml/async/converters/table.js.map +1 -1
- package/dist/features/converters/lexicalToHtml/async/converters/text.d.ts +1 -1
- package/dist/features/converters/lexicalToHtml/async/converters/text.d.ts.map +1 -1
- package/dist/features/converters/lexicalToHtml/async/converters/text.js.map +1 -1
- package/dist/features/converters/lexicalToHtml/async/converters/upload.d.ts +1 -1
- package/dist/features/converters/lexicalToHtml/async/converters/upload.d.ts.map +1 -1
- package/dist/features/converters/lexicalToHtml/async/converters/upload.js.map +1 -1
- package/dist/features/converters/lexicalToHtml/async/defaultConverters.d.ts +1 -1
- package/dist/features/converters/lexicalToHtml/async/defaultConverters.d.ts.map +1 -1
- package/dist/features/converters/lexicalToHtml/async/defaultConverters.js.map +1 -1
- package/dist/features/converters/lexicalToHtml/async/types.d.ts +15 -16
- package/dist/features/converters/lexicalToHtml/async/types.d.ts.map +1 -1
- package/dist/features/converters/lexicalToHtml/async/types.js.map +1 -1
- package/dist/features/converters/lexicalToHtml/shared/cssColors.d.ts.map +1 -1
- package/dist/features/converters/lexicalToHtml/shared/findConverterForNode.js.map +1 -1
- package/dist/features/converters/lexicalToHtml/sync/converters/blockquote.d.ts +1 -1
- package/dist/features/converters/lexicalToHtml/sync/converters/blockquote.d.ts.map +1 -1
- package/dist/features/converters/lexicalToHtml/sync/converters/blockquote.js.map +1 -1
- package/dist/features/converters/lexicalToHtml/sync/converters/heading.d.ts +1 -1
- package/dist/features/converters/lexicalToHtml/sync/converters/heading.d.ts.map +1 -1
- package/dist/features/converters/lexicalToHtml/sync/converters/heading.js.map +1 -1
- package/dist/features/converters/lexicalToHtml/sync/converters/horizontalRule.d.ts +1 -1
- package/dist/features/converters/lexicalToHtml/sync/converters/horizontalRule.d.ts.map +1 -1
- package/dist/features/converters/lexicalToHtml/sync/converters/horizontalRule.js.map +1 -1
- package/dist/features/converters/lexicalToHtml/sync/converters/linebreak.d.ts +1 -1
- package/dist/features/converters/lexicalToHtml/sync/converters/linebreak.d.ts.map +1 -1
- package/dist/features/converters/lexicalToHtml/sync/converters/linebreak.js.map +1 -1
- package/dist/features/converters/lexicalToHtml/sync/converters/link.d.ts +1 -1
- package/dist/features/converters/lexicalToHtml/sync/converters/link.d.ts.map +1 -1
- package/dist/features/converters/lexicalToHtml/sync/converters/link.js.map +1 -1
- package/dist/features/converters/lexicalToHtml/sync/converters/list.d.ts +1 -1
- package/dist/features/converters/lexicalToHtml/sync/converters/list.d.ts.map +1 -1
- package/dist/features/converters/lexicalToHtml/sync/converters/list.js.map +1 -1
- package/dist/features/converters/lexicalToHtml/sync/converters/paragraph.d.ts +1 -1
- package/dist/features/converters/lexicalToHtml/sync/converters/paragraph.d.ts.map +1 -1
- package/dist/features/converters/lexicalToHtml/sync/converters/paragraph.js.map +1 -1
- package/dist/features/converters/lexicalToHtml/sync/converters/tab.d.ts +1 -1
- package/dist/features/converters/lexicalToHtml/sync/converters/tab.d.ts.map +1 -1
- package/dist/features/converters/lexicalToHtml/sync/converters/tab.js.map +1 -1
- package/dist/features/converters/lexicalToHtml/sync/converters/table.d.ts +1 -1
- package/dist/features/converters/lexicalToHtml/sync/converters/table.d.ts.map +1 -1
- package/dist/features/converters/lexicalToHtml/sync/converters/table.js +1 -1
- package/dist/features/converters/lexicalToHtml/sync/converters/table.js.map +1 -1
- package/dist/features/converters/lexicalToHtml/sync/converters/text.d.ts +1 -1
- package/dist/features/converters/lexicalToHtml/sync/converters/text.d.ts.map +1 -1
- package/dist/features/converters/lexicalToHtml/sync/converters/text.js.map +1 -1
- package/dist/features/converters/lexicalToHtml/sync/converters/upload.d.ts +1 -1
- package/dist/features/converters/lexicalToHtml/sync/converters/upload.d.ts.map +1 -1
- package/dist/features/converters/lexicalToHtml/sync/converters/upload.js.map +1 -1
- package/dist/features/converters/lexicalToHtml/sync/defaultConverters.d.ts +1 -1
- package/dist/features/converters/lexicalToHtml/sync/defaultConverters.d.ts.map +1 -1
- package/dist/features/converters/lexicalToHtml/sync/defaultConverters.js.map +1 -1
- package/dist/features/converters/lexicalToHtml/sync/types.d.ts +15 -16
- package/dist/features/converters/lexicalToHtml/sync/types.d.ts.map +1 -1
- package/dist/features/converters/lexicalToHtml/sync/types.js.map +1 -1
- package/dist/features/converters/lexicalToJSX/Component/index.d.ts +6 -4
- package/dist/features/converters/lexicalToJSX/Component/index.d.ts.map +1 -1
- package/dist/features/converters/lexicalToJSX/Component/index.js +5 -4
- package/dist/features/converters/lexicalToJSX/Component/index.js.map +1 -1
- package/dist/features/converters/lexicalToJSX/converter/converters/blockquote.d.ts +1 -1
- package/dist/features/converters/lexicalToJSX/converter/converters/blockquote.d.ts.map +1 -1
- package/dist/features/converters/lexicalToJSX/converter/converters/blockquote.js.map +1 -1
- package/dist/features/converters/lexicalToJSX/converter/converters/heading.d.ts +1 -1
- package/dist/features/converters/lexicalToJSX/converter/converters/heading.d.ts.map +1 -1
- package/dist/features/converters/lexicalToJSX/converter/converters/heading.js.map +1 -1
- package/dist/features/converters/lexicalToJSX/converter/converters/horizontalRule.d.ts +1 -1
- package/dist/features/converters/lexicalToJSX/converter/converters/horizontalRule.d.ts.map +1 -1
- package/dist/features/converters/lexicalToJSX/converter/converters/horizontalRule.js.map +1 -1
- package/dist/features/converters/lexicalToJSX/converter/converters/linebreak.d.ts +1 -1
- package/dist/features/converters/lexicalToJSX/converter/converters/linebreak.d.ts.map +1 -1
- package/dist/features/converters/lexicalToJSX/converter/converters/linebreak.js.map +1 -1
- package/dist/features/converters/lexicalToJSX/converter/converters/link.d.ts +1 -1
- package/dist/features/converters/lexicalToJSX/converter/converters/link.d.ts.map +1 -1
- package/dist/features/converters/lexicalToJSX/converter/converters/link.js.map +1 -1
- package/dist/features/converters/lexicalToJSX/converter/converters/list.d.ts +1 -1
- package/dist/features/converters/lexicalToJSX/converter/converters/list.d.ts.map +1 -1
- package/dist/features/converters/lexicalToJSX/converter/converters/list.js.map +1 -1
- package/dist/features/converters/lexicalToJSX/converter/converters/paragraph.d.ts +1 -1
- package/dist/features/converters/lexicalToJSX/converter/converters/paragraph.d.ts.map +1 -1
- package/dist/features/converters/lexicalToJSX/converter/converters/paragraph.js.map +1 -1
- package/dist/features/converters/lexicalToJSX/converter/converters/tab.d.ts +1 -1
- package/dist/features/converters/lexicalToJSX/converter/converters/tab.d.ts.map +1 -1
- package/dist/features/converters/lexicalToJSX/converter/converters/tab.js.map +1 -1
- package/dist/features/converters/lexicalToJSX/converter/converters/table.d.ts +1 -1
- package/dist/features/converters/lexicalToJSX/converter/converters/table.d.ts.map +1 -1
- package/dist/features/converters/lexicalToJSX/converter/converters/table.js.map +1 -1
- package/dist/features/converters/lexicalToJSX/converter/converters/text.d.ts +1 -1
- package/dist/features/converters/lexicalToJSX/converter/converters/text.d.ts.map +1 -1
- package/dist/features/converters/lexicalToJSX/converter/converters/text.js.map +1 -1
- package/dist/features/converters/lexicalToJSX/converter/converters/upload.d.ts +1 -1
- package/dist/features/converters/lexicalToJSX/converter/converters/upload.d.ts.map +1 -1
- package/dist/features/converters/lexicalToJSX/converter/converters/upload.js.map +1 -1
- package/dist/features/converters/lexicalToJSX/converter/defaultConverters.d.ts +1 -1
- package/dist/features/converters/lexicalToJSX/converter/defaultConverters.d.ts.map +1 -1
- package/dist/features/converters/lexicalToJSX/converter/defaultConverters.js.map +1 -1
- package/dist/features/converters/lexicalToJSX/converter/index.d.ts +1 -1
- package/dist/features/converters/lexicalToJSX/converter/index.d.ts.map +1 -1
- package/dist/features/converters/lexicalToJSX/converter/index.js.map +1 -1
- package/dist/features/converters/lexicalToJSX/converter/types.d.ts +13 -15
- package/dist/features/converters/lexicalToJSX/converter/types.d.ts.map +1 -1
- package/dist/features/converters/lexicalToJSX/converter/types.js.map +1 -1
- package/dist/features/converters/lexicalToMarkdown/index.d.ts.map +1 -1
- package/dist/features/converters/lexicalToMarkdown/index.js +1 -1
- package/dist/features/converters/lexicalToMarkdown/index.js.map +1 -1
- package/dist/features/converters/lexicalToPlaintext/convertLexicalToPlaintext.spec.js.map +1 -1
- package/dist/features/converters/lexicalToPlaintext/shared/findConverterForNode.js.map +1 -1
- package/dist/features/converters/lexicalToPlaintext/sync/types.d.ts +13 -15
- package/dist/features/converters/lexicalToPlaintext/sync/types.d.ts.map +1 -1
- package/dist/features/converters/lexicalToPlaintext/sync/types.js.map +1 -1
- package/dist/features/converters/markdownToLexical/index.d.ts +1 -1
- package/dist/features/converters/markdownToLexical/index.d.ts.map +1 -1
- package/dist/features/converters/markdownToLexical/index.js +5 -2
- package/dist/features/converters/markdownToLexical/index.js.map +1 -1
- package/dist/features/debug/jsxConverter/client/plugin/index.d.ts +1 -1
- package/dist/features/debug/jsxConverter/client/plugin/index.d.ts.map +1 -1
- package/dist/features/debug/jsxConverter/client/plugin/index.js +1 -0
- package/dist/features/debug/jsxConverter/client/plugin/index.js.map +1 -1
- package/dist/features/debug/jsxConverter/client/plugin/style.css +9 -0
- package/dist/features/debug/testRecorder/client/plugin/index.css +51 -0
- package/dist/features/debug/testRecorder/client/plugin/index.d.ts +1 -1
- package/dist/features/debug/testRecorder/client/plugin/index.d.ts.map +1 -1
- package/dist/features/debug/testRecorder/client/plugin/index.js +1 -0
- package/dist/features/debug/testRecorder/client/plugin/index.js.map +1 -1
- package/dist/features/debug/treeView/client/plugin/index.css +81 -0
- package/dist/features/debug/treeView/client/plugin/index.d.ts +1 -1
- package/dist/features/debug/treeView/client/plugin/index.d.ts.map +1 -1
- package/dist/features/debug/treeView/client/plugin/index.js +1 -0
- package/dist/features/debug/treeView/client/plugin/index.js.map +1 -1
- package/dist/features/experimental_table/client/index.js +2 -2
- package/dist/features/experimental_table/client/index.js.map +1 -1
- package/dist/features/experimental_table/client/plugins/TableActionMenuPlugin/index.css +91 -0
- package/dist/features/experimental_table/client/plugins/TableActionMenuPlugin/index.d.ts +1 -1
- package/dist/features/experimental_table/client/plugins/TableActionMenuPlugin/index.d.ts.map +1 -1
- package/dist/features/experimental_table/client/plugins/TableActionMenuPlugin/index.js +3 -2
- package/dist/features/experimental_table/client/plugins/TableActionMenuPlugin/index.js.map +1 -1
- package/dist/features/experimental_table/client/plugins/TableCellResizerPlugin/index.css +11 -0
- package/dist/features/experimental_table/client/plugins/TableCellResizerPlugin/index.d.ts +1 -1
- package/dist/features/experimental_table/client/plugins/TableCellResizerPlugin/index.d.ts.map +1 -1
- package/dist/features/experimental_table/client/plugins/TableCellResizerPlugin/index.js +1 -0
- package/dist/features/experimental_table/client/plugins/TableCellResizerPlugin/index.js.map +1 -1
- package/dist/features/experimental_table/client/plugins/TableHoverActionsPlugin/index.js +1 -1
- package/dist/features/experimental_table/client/plugins/TableHoverActionsPlugin/index.js.map +1 -1
- package/dist/features/experimental_table/client/plugins/TablePlugin/TableGridPopup/index.css +166 -0
- package/dist/features/experimental_table/client/plugins/TablePlugin/TableGridPopup/index.d.ts +17 -0
- package/dist/features/experimental_table/client/plugins/TablePlugin/TableGridPopup/index.d.ts.map +1 -0
- package/dist/features/experimental_table/client/plugins/TablePlugin/TableGridPopup/index.js +219 -0
- package/dist/features/experimental_table/client/plugins/TablePlugin/TableGridPopup/index.js.map +1 -0
- package/dist/features/experimental_table/client/plugins/TablePlugin/index.css +235 -0
- package/dist/features/experimental_table/client/plugins/TablePlugin/index.d.ts +1 -1
- package/dist/features/experimental_table/client/plugins/TablePlugin/index.d.ts.map +1 -1
- package/dist/features/experimental_table/client/plugins/TablePlugin/index.js +95 -104
- package/dist/features/experimental_table/client/plugins/TablePlugin/index.js.map +1 -1
- package/dist/features/experimental_table/markdownTransformer.d.ts +2 -2
- package/dist/features/experimental_table/markdownTransformer.d.ts.map +1 -1
- package/dist/features/experimental_table/markdownTransformer.js +6 -3
- package/dist/features/experimental_table/markdownTransformer.js.map +1 -1
- package/dist/features/experimental_table/server/index.d.ts +1 -6
- package/dist/features/experimental_table/server/index.d.ts.map +1 -1
- package/dist/features/experimental_table/server/index.js +6 -104
- package/dist/features/experimental_table/server/index.js.map +1 -1
- package/dist/features/experimental_table/server/schema.d.ts +27 -0
- package/dist/features/experimental_table/server/schema.d.ts.map +1 -0
- package/dist/features/experimental_table/server/schema.js +107 -0
- package/dist/features/experimental_table/server/schema.js.map +1 -0
- package/dist/features/format/bold/feature.client.js +1 -1
- package/dist/features/format/bold/feature.client.js.map +1 -1
- package/dist/features/format/bold/feature.server.d.ts.map +1 -1
- package/dist/features/format/bold/feature.server.js +1 -1
- package/dist/features/format/bold/feature.server.js.map +1 -1
- package/dist/features/format/inlineCode/feature.client.js +1 -1
- package/dist/features/format/inlineCode/feature.client.js.map +1 -1
- package/dist/features/format/inlineCode/feature.server.d.ts.map +1 -1
- package/dist/features/format/inlineCode/feature.server.js +1 -1
- package/dist/features/format/inlineCode/feature.server.js.map +1 -1
- package/dist/features/format/italic/feature.client.js +1 -1
- package/dist/features/format/italic/feature.client.js.map +1 -1
- package/dist/features/format/italic/feature.server.d.ts.map +1 -1
- package/dist/features/format/italic/feature.server.js +1 -1
- package/dist/features/format/italic/feature.server.js.map +1 -1
- package/dist/features/format/shared/toolbarFormatGroup.d.ts.map +1 -1
- package/dist/features/format/strikethrough/feature.client.js +1 -1
- package/dist/features/format/strikethrough/feature.client.js.map +1 -1
- package/dist/features/format/strikethrough/feature.server.d.ts.map +1 -1
- package/dist/features/format/strikethrough/feature.server.js +1 -1
- package/dist/features/format/strikethrough/feature.server.js.map +1 -1
- package/dist/features/heading/client/index.js +2 -2
- package/dist/features/heading/client/index.js.map +1 -1
- package/dist/features/heading/markdownTransformer.d.ts +2 -2
- package/dist/features/heading/markdownTransformer.d.ts.map +1 -1
- package/dist/features/heading/markdownTransformer.js +6 -19
- package/dist/features/heading/markdownTransformer.js.map +1 -1
- package/dist/features/heading/server/index.d.ts +2 -4
- package/dist/features/heading/server/index.d.ts.map +1 -1
- package/dist/features/heading/server/index.js +4 -41
- package/dist/features/heading/server/index.js.map +1 -1
- package/dist/features/heading/server/schema.d.ts +10 -0
- package/dist/features/heading/server/schema.d.ts.map +1 -0
- package/dist/features/heading/server/schema.js +37 -0
- package/dist/features/heading/server/schema.js.map +1 -0
- package/dist/features/horizontalRule/client/index.js +2 -2
- package/dist/features/horizontalRule/client/index.js.map +1 -1
- package/dist/features/horizontalRule/client/markdownTransformer.d.ts +2 -2
- package/dist/features/horizontalRule/client/markdownTransformer.d.ts.map +1 -1
- package/dist/features/horizontalRule/client/markdownTransformer.js +1 -1
- package/dist/features/horizontalRule/client/markdownTransformer.js.map +1 -1
- package/dist/features/horizontalRule/client/nodes/HorizontalRuleNode.d.ts +1 -1
- package/dist/features/horizontalRule/client/nodes/HorizontalRuleNode.d.ts.map +1 -1
- package/dist/features/horizontalRule/client/nodes/HorizontalRuleNode.js.map +1 -1
- package/dist/features/horizontalRule/client/plugin/index.css +25 -0
- package/dist/features/horizontalRule/client/plugin/index.d.ts +1 -1
- package/dist/features/horizontalRule/client/plugin/index.d.ts.map +1 -1
- package/dist/features/horizontalRule/client/plugin/index.js +73 -4
- package/dist/features/horizontalRule/client/plugin/index.js.map +1 -1
- package/dist/features/horizontalRule/server/index.d.ts +1 -0
- package/dist/features/horizontalRule/server/index.d.ts.map +1 -1
- package/dist/features/horizontalRule/server/index.js +4 -10
- package/dist/features/horizontalRule/server/index.js.map +1 -1
- package/dist/features/horizontalRule/server/markdownTransformer.d.ts +2 -2
- package/dist/features/horizontalRule/server/markdownTransformer.d.ts.map +1 -1
- package/dist/features/horizontalRule/server/markdownTransformer.js +1 -1
- package/dist/features/horizontalRule/server/markdownTransformer.js.map +1 -1
- package/dist/features/horizontalRule/server/nodes/HorizontalRuleNode.d.ts +1 -5
- package/dist/features/horizontalRule/server/nodes/HorizontalRuleNode.d.ts.map +1 -1
- package/dist/features/horizontalRule/server/nodes/HorizontalRuleNode.js.map +1 -1
- package/dist/features/horizontalRule/server/schema.d.ts +7 -0
- package/dist/features/horizontalRule/server/schema.d.ts.map +1 -0
- package/dist/features/horizontalRule/server/schema.js +25 -0
- package/dist/features/horizontalRule/server/schema.js.map +1 -0
- package/dist/features/indent/client/toolbarIndentGroup.d.ts.map +1 -1
- package/dist/features/link/client/index.d.ts.map +1 -1
- package/dist/features/link/client/index.js +2 -2
- package/dist/features/link/client/index.js.map +1 -1
- package/dist/features/link/client/plugins/autoLink/index.d.ts +1 -1
- package/dist/features/link/client/plugins/autoLink/index.d.ts.map +1 -1
- package/dist/features/link/client/plugins/autoLink/index.js.map +1 -1
- package/dist/features/link/client/plugins/floatingLinkEditor/LinkEditor/index.d.ts.map +1 -1
- package/dist/features/link/client/plugins/floatingLinkEditor/LinkEditor/index.js +28 -8
- package/dist/features/link/client/plugins/floatingLinkEditor/LinkEditor/index.js.map +1 -1
- package/dist/features/link/client/plugins/floatingLinkEditor/index.css +108 -0
- package/dist/features/link/client/plugins/floatingLinkEditor/index.d.ts +1 -1
- package/dist/features/link/client/plugins/floatingLinkEditor/index.d.ts.map +1 -1
- package/dist/features/link/client/plugins/floatingLinkEditor/index.js +1 -0
- package/dist/features/link/client/plugins/floatingLinkEditor/index.js.map +1 -1
- package/dist/features/link/client/plugins/floatingLinkEditor/types.d.ts +1 -1
- package/dist/features/link/client/plugins/floatingLinkEditor/types.d.ts.map +1 -1
- package/dist/features/link/client/plugins/floatingLinkEditor/types.js.map +1 -1
- package/dist/features/link/client/plugins/link/index.js.map +1 -1
- package/dist/features/link/markdownTransformer.d.ts +5 -5
- package/dist/features/link/markdownTransformer.d.ts.map +1 -1
- package/dist/features/link/markdownTransformer.js +2 -2
- package/dist/features/link/markdownTransformer.js.map +1 -1
- package/dist/features/link/markdownTransformer.spec.js +10 -10
- package/dist/features/link/markdownTransformer.spec.js.map +1 -1
- package/dist/features/link/nodes/AutoLinkNode.d.ts +3 -3
- package/dist/features/link/nodes/AutoLinkNode.d.ts.map +1 -1
- package/dist/features/link/nodes/AutoLinkNode.js +2 -1
- package/dist/features/link/nodes/AutoLinkNode.js.map +1 -1
- package/dist/features/link/nodes/LinkNode.d.ts +3 -3
- package/dist/features/link/nodes/LinkNode.d.ts.map +1 -1
- package/dist/features/link/nodes/LinkNode.js +2 -1
- package/dist/features/link/nodes/LinkNode.js.map +1 -1
- package/dist/features/link/server/baseFields.d.ts.map +1 -1
- package/dist/features/link/server/baseFields.js.map +1 -1
- package/dist/features/link/server/graphQLPopulationPromise.d.ts +1 -1
- package/dist/features/link/server/graphQLPopulationPromise.d.ts.map +1 -1
- package/dist/features/link/server/graphQLPopulationPromise.js.map +1 -1
- package/dist/features/link/server/index.d.ts +2 -1
- package/dist/features/link/server/index.d.ts.map +1 -1
- package/dist/features/link/server/index.js +5 -73
- package/dist/features/link/server/index.js.map +1 -1
- package/dist/features/link/server/schema.d.ts +32 -0
- package/dist/features/link/server/schema.d.ts.map +1 -0
- package/dist/features/link/server/schema.js +171 -0
- package/dist/features/link/server/schema.js.map +1 -0
- package/dist/features/link/server/validate.d.ts +1 -1
- package/dist/features/link/server/validate.d.ts.map +1 -1
- package/dist/features/link/server/validate.js.map +1 -1
- package/dist/features/lists/checklist/client/index.js +1 -1
- package/dist/features/lists/checklist/client/index.js.map +1 -1
- package/dist/features/lists/checklist/server/index.d.ts.map +1 -1
- package/dist/features/lists/checklist/server/index.js +4 -8
- package/dist/features/lists/checklist/server/index.js.map +1 -1
- package/dist/features/lists/orderedList/client/index.js +1 -1
- package/dist/features/lists/orderedList/client/index.js.map +1 -1
- package/dist/features/lists/orderedList/server/index.d.ts.map +1 -1
- package/dist/features/lists/orderedList/server/index.js +4 -8
- package/dist/features/lists/orderedList/server/index.js.map +1 -1
- package/dist/features/lists/plugin/index.d.ts +0 -9
- package/dist/features/lists/plugin/index.d.ts.map +1 -1
- package/dist/features/lists/plugin/index.js.map +1 -1
- package/dist/features/lists/shared/schema.d.ts +18 -0
- package/dist/features/lists/shared/schema.d.ts.map +1 -0
- package/dist/features/lists/shared/schema.js +62 -0
- package/dist/features/lists/shared/schema.js.map +1 -0
- package/dist/features/lists/unorderedList/client/index.js +1 -1
- package/dist/features/lists/unorderedList/client/index.js.map +1 -1
- package/dist/features/lists/unorderedList/server/index.d.ts.map +1 -1
- package/dist/features/lists/unorderedList/server/index.js +4 -8
- package/dist/features/lists/unorderedList/server/index.js.map +1 -1
- package/dist/features/relationship/client/components/RelationshipComponent.d.ts +2 -2
- package/dist/features/relationship/client/components/RelationshipComponent.d.ts.map +1 -1
- package/dist/features/relationship/client/components/RelationshipComponent.js +29 -4
- package/dist/features/relationship/client/components/RelationshipComponent.js.map +1 -1
- package/dist/features/relationship/client/components/index.css +112 -0
- package/dist/features/relationship/client/drawer/index.d.ts.map +1 -1
- package/dist/features/relationship/client/nodes/RelationshipNode.d.ts +1 -1
- package/dist/features/relationship/client/nodes/RelationshipNode.d.ts.map +1 -1
- package/dist/features/relationship/client/nodes/RelationshipNode.js.map +1 -1
- package/dist/features/relationship/client/plugins/index.d.ts +1 -1
- package/dist/features/relationship/client/plugins/index.d.ts.map +1 -1
- package/dist/features/relationship/client/plugins/index.js.map +1 -1
- package/dist/features/relationship/client/utils/useEnabledRelationships.d.ts.map +1 -1
- package/dist/features/relationship/client/utils/useEnabledRelationships.js +9 -40
- package/dist/features/relationship/client/utils/useEnabledRelationships.js.map +1 -1
- package/dist/features/relationship/server/graphQLPopulationPromise.d.ts +1 -1
- package/dist/features/relationship/server/graphQLPopulationPromise.d.ts.map +1 -1
- package/dist/features/relationship/server/graphQLPopulationPromise.js.map +1 -1
- package/dist/features/relationship/server/index.d.ts +1 -0
- package/dist/features/relationship/server/index.d.ts.map +1 -1
- package/dist/features/relationship/server/index.js +2 -0
- package/dist/features/relationship/server/index.js.map +1 -1
- package/dist/features/relationship/server/nodes/RelationshipNode.d.ts +1 -10
- package/dist/features/relationship/server/nodes/RelationshipNode.d.ts.map +1 -1
- package/dist/features/relationship/server/nodes/RelationshipNode.js.map +1 -1
- package/dist/features/relationship/server/schema.d.ts +28 -0
- package/dist/features/relationship/server/schema.d.ts.map +1 -0
- package/dist/features/relationship/server/schema.js +97 -0
- package/dist/features/relationship/server/schema.js.map +1 -0
- package/dist/features/relationship/shared/filterEnabledRelationshipCollections.d.ts +23 -0
- package/dist/features/relationship/shared/filterEnabledRelationshipCollections.d.ts.map +1 -0
- package/dist/features/relationship/shared/filterEnabledRelationshipCollections.js +34 -0
- package/dist/features/relationship/shared/filterEnabledRelationshipCollections.js.map +1 -0
- package/dist/features/shared/toolbar/addDropdownGroup.d.ts.map +1 -1
- package/dist/features/shared/toolbar/featureButtonsGroup.d.ts.map +1 -1
- package/dist/features/shared/toolbar/textDropdownGroup.d.ts.map +1 -1
- package/dist/features/textState/feature.client.js +1 -1
- package/dist/features/textState/feature.client.js.map +1 -1
- package/dist/features/toolbars/fixed/client/Toolbar/index.css +87 -0
- package/dist/features/toolbars/fixed/client/Toolbar/index.d.ts +1 -1
- package/dist/features/toolbars/fixed/client/Toolbar/index.d.ts.map +1 -1
- package/dist/features/toolbars/fixed/client/Toolbar/index.js +1 -0
- package/dist/features/toolbars/fixed/client/Toolbar/index.js.map +1 -1
- package/dist/features/toolbars/inline/client/Toolbar/index.css +32 -0
- package/dist/features/toolbars/inline/client/Toolbar/index.d.ts +1 -1
- package/dist/features/toolbars/inline/client/Toolbar/index.d.ts.map +1 -1
- package/dist/features/toolbars/inline/client/Toolbar/index.js +1 -0
- package/dist/features/toolbars/inline/client/Toolbar/index.js.map +1 -1
- package/dist/features/toolbars/shared/ToolbarButton/index.css +57 -0
- package/dist/features/toolbars/shared/ToolbarButton/index.d.ts +1 -1
- package/dist/features/toolbars/shared/ToolbarButton/index.d.ts.map +1 -1
- package/dist/features/toolbars/shared/ToolbarButton/index.js +80 -74
- package/dist/features/toolbars/shared/ToolbarButton/index.js.map +1 -1
- package/dist/features/toolbars/shared/ToolbarDropdown/DropDown.d.ts.map +1 -1
- package/dist/features/toolbars/shared/ToolbarDropdown/DropDown.js +5 -2
- package/dist/features/toolbars/shared/ToolbarDropdown/DropDown.js.map +1 -1
- package/dist/features/toolbars/shared/ToolbarDropdown/index.css +210 -0
- package/dist/features/toolbars/shared/ToolbarDropdown/index.d.ts +1 -1
- package/dist/features/toolbars/shared/ToolbarDropdown/index.d.ts.map +1 -1
- package/dist/features/toolbars/shared/ToolbarDropdown/index.js +11 -7
- package/dist/features/toolbars/shared/ToolbarDropdown/index.js.map +1 -1
- package/dist/features/toolbars/shared/useToolbarStates.d.ts.map +1 -1
- package/dist/features/toolbars/shared/useToolbarStates.js +3 -1
- package/dist/features/toolbars/shared/useToolbarStates.js.map +1 -1
- package/dist/features/toolbars/types.d.ts +5 -1
- package/dist/features/toolbars/types.d.ts.map +1 -1
- package/dist/features/toolbars/types.js.map +1 -1
- package/dist/features/typesClient.d.ts +2 -2
- package/dist/features/typesClient.d.ts.map +1 -1
- package/dist/features/typesClient.js.map +1 -1
- package/dist/features/typesServer.d.ts +19 -59
- package/dist/features/typesServer.d.ts.map +1 -1
- package/dist/features/typesServer.js.map +1 -1
- package/dist/features/upload/client/component/index.css +214 -0
- package/dist/features/upload/client/component/index.d.ts +2 -2
- package/dist/features/upload/client/component/index.d.ts.map +1 -1
- package/dist/features/upload/client/component/index.js +86 -63
- package/dist/features/upload/client/component/index.js.map +1 -1
- package/dist/features/upload/client/component/pending/index.d.ts +0 -1
- package/dist/features/upload/client/component/pending/index.d.ts.map +1 -1
- package/dist/features/upload/client/component/pending/index.js.map +1 -1
- package/dist/features/upload/client/drawer/index.d.ts.map +1 -1
- package/dist/features/upload/client/nodes/UploadNode.d.ts +1 -1
- package/dist/features/upload/client/nodes/UploadNode.d.ts.map +1 -1
- package/dist/features/upload/client/nodes/UploadNode.js.map +1 -1
- package/dist/features/upload/client/plugin/index.d.ts +1 -1
- package/dist/features/upload/client/plugin/index.d.ts.map +1 -1
- package/dist/features/upload/client/plugin/index.js +5 -5
- package/dist/features/upload/client/plugin/index.js.map +1 -1
- package/dist/features/upload/server/graphQLPopulationPromise.d.ts +1 -1
- package/dist/features/upload/server/graphQLPopulationPromise.d.ts.map +1 -1
- package/dist/features/upload/server/graphQLPopulationPromise.js.map +1 -1
- package/dist/features/upload/server/index.d.ts +1 -0
- package/dist/features/upload/server/index.d.ts.map +1 -1
- package/dist/features/upload/server/index.js +5 -82
- package/dist/features/upload/server/index.js.map +1 -1
- package/dist/features/upload/server/markdownTransformer.d.ts +2 -2
- package/dist/features/upload/server/markdownTransformer.d.ts.map +1 -1
- package/dist/features/upload/server/markdownTransformer.js +1 -1
- package/dist/features/upload/server/markdownTransformer.js.map +1 -1
- package/dist/features/upload/server/nodes/UploadNode.d.ts +1 -55
- package/dist/features/upload/server/nodes/UploadNode.d.ts.map +1 -1
- package/dist/features/upload/server/nodes/UploadNode.js.map +1 -1
- package/dist/features/upload/server/nodes/conversions.d.ts.map +1 -1
- package/dist/features/upload/server/nodes/conversions.js.map +1 -1
- package/dist/features/upload/server/schema.d.ts +52 -0
- package/dist/features/upload/server/schema.d.ts.map +1 -0
- package/dist/features/upload/server/schema.js +149 -0
- package/dist/features/upload/server/schema.js.map +1 -0
- package/dist/features/upload/server/validate.d.ts +1 -1
- package/dist/features/upload/server/validate.d.ts.map +1 -1
- package/dist/features/upload/server/validate.js.map +1 -1
- package/dist/field/Diff/converters/link.d.ts +1 -1
- package/dist/field/Diff/converters/link.d.ts.map +1 -1
- package/dist/field/Diff/converters/link.js.map +1 -1
- package/dist/field/Diff/converters/listitem/index.css +80 -0
- package/dist/field/Diff/converters/listitem/index.d.ts +2 -2
- package/dist/field/Diff/converters/listitem/index.d.ts.map +1 -1
- package/dist/field/Diff/converters/listitem/index.js +1 -0
- package/dist/field/Diff/converters/listitem/index.js.map +1 -1
- package/dist/field/Diff/converters/relationship/index.css +108 -0
- package/dist/field/Diff/converters/relationship/index.d.ts +2 -2
- package/dist/field/Diff/converters/relationship/index.d.ts.map +1 -1
- package/dist/field/Diff/converters/relationship/index.js +11 -28
- package/dist/field/Diff/converters/relationship/index.js.map +1 -1
- package/dist/field/Diff/converters/unknown/index.css +37 -0
- package/dist/field/Diff/converters/unknown/index.d.ts +1 -1
- package/dist/field/Diff/converters/unknown/index.d.ts.map +1 -1
- package/dist/field/Diff/converters/unknown/index.js +1 -0
- package/dist/field/Diff/converters/unknown/index.js.map +1 -1
- package/dist/field/Diff/converters/upload/index.css +175 -0
- package/dist/field/Diff/converters/upload/index.d.ts +2 -2
- package/dist/field/Diff/converters/upload/index.d.ts.map +1 -1
- package/dist/field/Diff/converters/upload/index.js +7 -2
- package/dist/field/Diff/converters/upload/index.js.map +1 -1
- package/dist/field/Diff/index.css +156 -0
- package/dist/field/Diff/index.d.ts +1 -1
- package/dist/field/Diff/index.d.ts.map +1 -1
- package/dist/field/Diff/index.js +1 -0
- package/dist/field/Diff/index.js.map +1 -1
- package/dist/field/Field.d.ts +3 -3
- package/dist/field/Field.d.ts.map +1 -1
- package/dist/field/Field.js +13 -12
- package/dist/field/Field.js.map +1 -1
- package/dist/field/RenderLexical/index.d.ts +2 -2
- package/dist/field/RenderLexical/index.d.ts.map +1 -1
- package/dist/field/RenderLexical/index.js.map +1 -1
- package/dist/field/RichTextViewProvider.d.ts +1 -1
- package/dist/field/RichTextViewProvider.d.ts.map +1 -1
- package/dist/field/RichTextViewProvider.js.map +1 -1
- package/dist/field/ViewSelector.css +32 -0
- package/dist/field/ViewSelector.d.ts +1 -1
- package/dist/field/ViewSelector.d.ts.map +1 -1
- package/dist/field/ViewSelector.js +1 -0
- package/dist/field/ViewSelector.js.map +1 -1
- package/dist/field/bundled.css +1 -1
- package/dist/field/index.css +60 -0
- package/dist/field/index.d.ts +1 -1
- package/dist/field/index.d.ts.map +1 -1
- package/dist/field/index.js +1 -1
- package/dist/field/index.js.map +1 -1
- package/dist/field/rscEntry.d.ts +1 -1
- package/dist/field/rscEntry.d.ts.map +1 -1
- package/dist/field/rscEntry.js +2 -0
- package/dist/field/rscEntry.js.map +1 -1
- package/dist/hooks.d.ts +6 -0
- package/dist/hooks.d.ts.map +1 -0
- package/dist/hooks.js +548 -0
- package/dist/hooks.js.map +1 -0
- package/dist/index.d.ts +13 -19
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +12 -629
- package/dist/index.js.map +1 -1
- package/dist/lexical/LexicalEditor.css +50 -0
- package/dist/lexical/LexicalEditor.d.ts +1 -1
- package/dist/lexical/LexicalEditor.d.ts.map +1 -1
- package/dist/lexical/LexicalEditor.js +1 -0
- package/dist/lexical/LexicalEditor.js.map +1 -1
- package/dist/lexical/LexicalProvider.d.ts +1 -1
- package/dist/lexical/LexicalProvider.d.ts.map +1 -1
- package/dist/lexical/LexicalProvider.js.map +1 -1
- package/dist/lexical/config/client/EditorConfigProvider.d.ts +1 -1
- package/dist/lexical/config/client/EditorConfigProvider.d.ts.map +1 -1
- package/dist/lexical/config/client/EditorConfigProvider.js.map +1 -1
- package/dist/lexical/config/client/loader.d.ts +1 -1
- package/dist/lexical/config/client/loader.d.ts.map +1 -1
- package/dist/lexical/config/client/loader.js +5 -1
- package/dist/lexical/config/client/loader.js.map +1 -1
- package/dist/lexical/config/client/sanitize.d.ts +1 -1
- package/dist/lexical/config/client/sanitize.d.ts.map +1 -1
- package/dist/lexical/config/client/sanitize.js.map +1 -1
- package/dist/lexical/config/server/sanitize.d.ts.map +1 -1
- package/dist/lexical/config/server/sanitize.js +9 -17
- package/dist/lexical/config/server/sanitize.js.map +1 -1
- package/dist/lexical/config/types.d.ts +1 -1
- package/dist/lexical/config/types.d.ts.map +1 -1
- package/dist/lexical/config/types.js.map +1 -1
- package/dist/lexical/nodes/index.d.ts +1 -1
- package/dist/lexical/nodes/index.d.ts.map +1 -1
- package/dist/lexical/nodes/index.js.map +1 -1
- package/dist/lexical/plugins/DecoratorPlugin/index.css +11 -0
- package/dist/lexical/plugins/DecoratorPlugin/index.d.ts +1 -1
- package/dist/lexical/plugins/DecoratorPlugin/index.d.ts.map +1 -1
- package/dist/lexical/plugins/DecoratorPlugin/index.js +1 -0
- package/dist/lexical/plugins/DecoratorPlugin/index.js.map +1 -1
- package/dist/lexical/plugins/InsertParagraphAtEnd/index.css +52 -0
- package/dist/lexical/plugins/InsertParagraphAtEnd/index.d.ts +1 -1
- package/dist/lexical/plugins/InsertParagraphAtEnd/index.d.ts.map +1 -1
- package/dist/lexical/plugins/InsertParagraphAtEnd/index.js +1 -0
- package/dist/lexical/plugins/InsertParagraphAtEnd/index.js.map +1 -1
- package/dist/lexical/plugins/MarkdownShortcut/index.d.ts.map +1 -1
- package/dist/lexical/plugins/MarkdownShortcut/index.js +1 -1
- package/dist/lexical/plugins/MarkdownShortcut/index.js.map +1 -1
- package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/types.d.ts +1 -1
- package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/types.d.ts.map +1 -1
- package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/types.js.map +1 -1
- package/dist/lexical/plugins/SlashMenu/index.css +61 -0
- package/dist/lexical/plugins/SlashMenu/index.d.ts +1 -1
- package/dist/lexical/plugins/SlashMenu/index.d.ts.map +1 -1
- package/dist/lexical/plugins/SlashMenu/index.js +2 -0
- package/dist/lexical/plugins/SlashMenu/index.js.map +1 -1
- package/dist/lexical/plugins/handles/AddBlockHandlePlugin/index.css +40 -0
- package/dist/lexical/plugins/handles/AddBlockHandlePlugin/index.d.ts +1 -1
- package/dist/lexical/plugins/handles/AddBlockHandlePlugin/index.d.ts.map +1 -1
- package/dist/lexical/plugins/handles/AddBlockHandlePlugin/index.js +1 -0
- package/dist/lexical/plugins/handles/AddBlockHandlePlugin/index.js.map +1 -1
- package/dist/lexical/plugins/handles/DraggableBlockPlugin/debounce.d.ts.map +1 -1
- package/dist/lexical/plugins/handles/DraggableBlockPlugin/index.css +84 -0
- package/dist/lexical/plugins/handles/DraggableBlockPlugin/index.d.ts +1 -1
- package/dist/lexical/plugins/handles/DraggableBlockPlugin/index.d.ts.map +1 -1
- package/dist/lexical/plugins/handles/DraggableBlockPlugin/index.js +16 -9
- package/dist/lexical/plugins/handles/DraggableBlockPlugin/index.js.map +1 -1
- package/dist/lexical/plugins/handles/DraggableBlockPlugin/setTargetLine.js +1 -1
- package/dist/lexical/plugins/handles/DraggableBlockPlugin/setTargetLine.js.map +1 -1
- package/dist/lexical/plugins/handles/utils/calculateDistanceFromScrollerElem.d.ts.map +1 -1
- package/dist/lexical/theme/EditorTheme.css +358 -0
- package/dist/lexical/theme/EditorTheme.d.ts.map +1 -1
- package/dist/lexical/theme/EditorTheme.js +1 -0
- package/dist/lexical/theme/EditorTheme.js.map +1 -1
- package/dist/lexical/ui/ContentEditable.css +95 -0
- package/dist/lexical/ui/ContentEditable.d.ts +1 -1
- package/dist/lexical/ui/ContentEditable.d.ts.map +1 -1
- package/dist/lexical/ui/ContentEditable.js +1 -0
- package/dist/lexical/ui/ContentEditable.js.map +1 -1
- package/dist/lexical/ui/icons/Code/index.js +1 -1
- package/dist/lexical/ui/icons/Code/index.js.map +1 -1
- package/dist/lexical/ui/icons/CodeBlock/index.js +1 -1
- package/dist/lexical/ui/icons/CodeBlock/index.js.map +1 -1
- package/dist/lexical/ui/icons/Link/index.js +1 -1
- package/dist/lexical/ui/icons/Link/index.js.map +1 -1
- package/dist/lexical/ui/icons/Page/index.d.ts +5 -0
- package/dist/lexical/ui/icons/Page/index.d.ts.map +1 -0
- package/dist/lexical/ui/icons/Page/index.js +21 -0
- package/dist/lexical/ui/icons/Page/index.js.map +1 -0
- package/dist/lexical/ui/icons/Trash/index.d.ts +10 -0
- package/dist/lexical/ui/icons/Trash/index.d.ts.map +1 -0
- package/dist/lexical/ui/icons/Trash/index.js +29 -0
- package/dist/lexical/ui/icons/Trash/index.js.map +1 -0
- package/dist/lexical/utils/markdown/convertFromMarkdownString.d.ts +17 -0
- package/dist/lexical/utils/markdown/convertFromMarkdownString.d.ts.map +1 -0
- package/dist/lexical/utils/markdown/convertFromMarkdownString.js +27 -0
- package/dist/lexical/utils/markdown/convertFromMarkdownString.js.map +1 -0
- package/dist/lexical/utils/markdown/convertFromMarkdownString.spec.js +88 -0
- package/dist/lexical/utils/markdown/convertFromMarkdownString.spec.js.map +1 -0
- package/dist/lexical/utils/markdown/createBlockNode.d.ts +1 -1
- package/dist/lexical/utils/markdown/createBlockNode.d.ts.map +1 -1
- package/dist/lexical/utils/markdown/createBlockNode.js.map +1 -1
- package/dist/lexical/utils/markdown/normalizeMarkdown.d.ts +25 -0
- package/dist/lexical/utils/markdown/normalizeMarkdown.d.ts.map +1 -0
- package/dist/lexical/utils/markdown/normalizeMarkdown.js +91 -0
- package/dist/lexical/utils/markdown/normalizeMarkdown.js.map +1 -0
- package/dist/lexical-proxy/@lexical-markdown.d.ts +1 -1
- package/dist/lexical-proxy/@lexical-markdown.d.ts.map +1 -1
- package/dist/lexical-proxy/@lexical-markdown.js +1 -1
- package/dist/lexical-proxy/@lexical-markdown.js.map +1 -1
- package/dist/populateGraphQL/populateLexicalPopulationPromises.d.ts +1 -1
- package/dist/populateGraphQL/populateLexicalPopulationPromises.d.ts.map +1 -1
- package/dist/populateGraphQL/populateLexicalPopulationPromises.js.map +1 -1
- package/dist/populateGraphQL/recursivelyPopulateFieldsForGraphQL.d.ts.map +1 -1
- package/dist/types/builtInNodes.d.ts +14 -0
- package/dist/types/builtInNodes.d.ts.map +1 -0
- package/dist/types/builtInNodes.js +203 -0
- package/dist/types/builtInNodes.js.map +1 -0
- package/dist/{types.d.ts → types/index.d.ts} +25 -26
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/index.js +2 -0
- package/dist/types/index.js.map +1 -0
- package/dist/types/jsonSchemaHelpers.d.ts +30 -0
- package/dist/types/jsonSchemaHelpers.d.ts.map +1 -0
- package/dist/types/jsonSchemaHelpers.js +58 -0
- package/dist/types/jsonSchemaHelpers.js.map +1 -0
- package/dist/types/nodeTypes.d.ts +128 -0
- package/dist/types/nodeTypes.d.ts.map +1 -0
- package/dist/types/nodeTypes.js +6 -0
- package/dist/types/nodeTypes.js.map +1 -0
- package/dist/types/schema.d.ts +6 -0
- package/dist/types/schema.d.ts.map +1 -0
- package/dist/types/schema.js +90 -0
- package/dist/types/schema.js.map +1 -0
- package/dist/utilities/applyBaseFilterToFields.d.ts.map +1 -1
- package/dist/utilities/applyBaseFilterToFields.js +1 -2
- package/dist/utilities/applyBaseFilterToFields.js.map +1 -1
- package/dist/utilities/buildEditorState.d.ts +18 -4
- package/dist/utilities/buildEditorState.d.ts.map +1 -1
- package/dist/utilities/buildEditorState.js +8 -0
- package/dist/utilities/buildEditorState.js.map +1 -1
- package/dist/utilities/buildInitialState.d.ts +2 -1
- package/dist/utilities/buildInitialState.d.ts.map +1 -1
- package/dist/utilities/buildInitialState.js.map +1 -1
- package/dist/utilities/createClientFeature.d.ts +1 -1
- package/dist/utilities/createClientFeature.d.ts.map +1 -1
- package/dist/utilities/createClientFeature.js.map +1 -1
- package/dist/utilities/editorConfigFactory.d.ts +1 -1
- package/dist/utilities/editorConfigFactory.d.ts.map +1 -1
- package/dist/utilities/editorConfigFactory.js.map +1 -1
- package/dist/utilities/fieldsDrawer/Drawer.d.ts.map +1 -1
- package/dist/utilities/fieldsDrawer/Drawer.js +19 -10
- package/dist/utilities/fieldsDrawer/Drawer.js.map +1 -1
- package/dist/utilities/fieldsDrawer/DrawerContent.d.ts +4 -1
- package/dist/utilities/fieldsDrawer/DrawerContent.d.ts.map +1 -1
- package/dist/utilities/fieldsDrawer/DrawerContent.js +8 -7
- package/dist/utilities/fieldsDrawer/DrawerContent.js.map +1 -1
- package/dist/utilities/fieldsDrawer/index.css +12 -0
- package/dist/utilities/fieldsDrawer/useDrawerSubmit.d.ts +29 -0
- package/dist/utilities/fieldsDrawer/useDrawerSubmit.d.ts.map +1 -0
- package/dist/utilities/fieldsDrawer/useDrawerSubmit.js +97 -0
- package/dist/utilities/fieldsDrawer/useDrawerSubmit.js.map +1 -0
- package/dist/utilities/fieldsDrawer/useLexicalDocumentDrawer.d.ts +1 -0
- package/dist/utilities/fieldsDrawer/useLexicalDocumentDrawer.d.ts.map +1 -1
- package/dist/utilities/fieldsDrawer/useLexicalDocumentDrawer.js +34 -18
- package/dist/utilities/fieldsDrawer/useLexicalDocumentDrawer.js.map +1 -1
- package/dist/utilities/fieldsDrawer/useLexicalDrawer.d.ts.map +1 -1
- package/dist/utilities/fieldsDrawer/useLexicalListDrawer.d.ts.map +1 -1
- package/dist/utilities/generateImportMap.d.ts +1 -1
- package/dist/utilities/generateImportMap.d.ts.map +1 -1
- package/dist/utilities/generateImportMap.js.map +1 -1
- package/dist/utilities/generateSchemaMap.d.ts.map +1 -1
- package/dist/utilities/getDefaultSanitizedEditorConfig.d.ts.map +1 -1
- package/dist/utilities/initLexicalFeatures.d.ts +1 -1
- package/dist/utilities/initLexicalFeatures.d.ts.map +1 -1
- package/dist/utilities/initLexicalFeatures.js.map +1 -1
- package/dist/utilities/recurseNodeTree.d.ts.map +1 -1
- package/dist/utilities/upgradeLexicalData/upgradeDocumentFieldsRecursively.d.ts.map +1 -1
- package/dist/utilities/upgradeLexicalData/upgradeDocumentFieldsRecursively.js +1 -1
- package/dist/utilities/upgradeLexicalData/upgradeDocumentFieldsRecursively.js.map +1 -1
- package/dist/utilities/useLexicalFeature.d.ts.map +1 -1
- package/dist/validate/index.d.ts.map +1 -1
- package/package.json +27 -31
- package/dist/exports/client/Field-NXLXFFLW.js +0 -2
- package/dist/exports/client/Field-NXLXFFLW.js.map +0 -7
- package/dist/exports/client/RelationshipComponent-BG3DPV3T.js +0 -2
- package/dist/exports/client/RelationshipComponent-BG3DPV3T.js.map +0 -7
- package/dist/exports/client/chunk-BZZVLW4U.js.map +0 -7
- package/dist/exports/client/chunk-DZDHVMML.js +0 -2
- package/dist/exports/client/chunk-DZDHVMML.js.map +0 -7
- package/dist/exports/client/chunk-F26IQ5RE.js +0 -2
- package/dist/exports/client/chunk-F26IQ5RE.js.map +0 -7
- package/dist/exports/client/chunk-FTT5KJ6W.js +0 -12
- package/dist/exports/client/chunk-FTT5KJ6W.js.map +0 -7
- package/dist/exports/client/chunk-INBEEENE.js +0 -2
- package/dist/exports/client/chunk-INBEEENE.js.map +0 -7
- package/dist/exports/client/chunk-QJ5EETIB.js +0 -2
- package/dist/exports/client/chunk-QJ5EETIB.js.map +0 -7
- package/dist/exports/client/component-XIHC3W6W.js +0 -2
- package/dist/exports/client/component-XIHC3W6W.js.map +0 -7
- package/dist/exports/client/componentInline-LCHKRXOV.js +0 -2
- package/dist/features/blockquote/markdownTransformer.d.ts +0 -3
- package/dist/features/blockquote/markdownTransformer.d.ts.map +0 -1
- package/dist/features/blockquote/markdownTransformer.js +0 -33
- package/dist/features/blockquote/markdownTransformer.js.map +0 -1
- package/dist/features/converters/lexicalToHtml_deprecated/converter/converters/linebreak.d.ts +0 -4
- package/dist/features/converters/lexicalToHtml_deprecated/converter/converters/linebreak.d.ts.map +0 -1
- package/dist/features/converters/lexicalToHtml_deprecated/converter/converters/linebreak.js +0 -7
- package/dist/features/converters/lexicalToHtml_deprecated/converter/converters/linebreak.js.map +0 -1
- package/dist/features/converters/lexicalToHtml_deprecated/converter/converters/paragraph.d.ts +0 -4
- package/dist/features/converters/lexicalToHtml_deprecated/converter/converters/paragraph.d.ts.map +0 -1
- package/dist/features/converters/lexicalToHtml_deprecated/converter/converters/paragraph.js +0 -38
- package/dist/features/converters/lexicalToHtml_deprecated/converter/converters/paragraph.js.map +0 -1
- package/dist/features/converters/lexicalToHtml_deprecated/converter/converters/tab.d.ts +0 -4
- package/dist/features/converters/lexicalToHtml_deprecated/converter/converters/tab.d.ts.map +0 -1
- package/dist/features/converters/lexicalToHtml_deprecated/converter/converters/tab.js +0 -9
- package/dist/features/converters/lexicalToHtml_deprecated/converter/converters/tab.js.map +0 -1
- package/dist/features/converters/lexicalToHtml_deprecated/converter/converters/text.d.ts +0 -4
- package/dist/features/converters/lexicalToHtml_deprecated/converter/converters/text.d.ts.map +0 -1
- package/dist/features/converters/lexicalToHtml_deprecated/converter/converters/text.js +0 -33
- package/dist/features/converters/lexicalToHtml_deprecated/converter/converters/text.js.map +0 -1
- package/dist/features/converters/lexicalToHtml_deprecated/converter/defaultConverters.d.ts +0 -6
- package/dist/features/converters/lexicalToHtml_deprecated/converter/defaultConverters.d.ts.map +0 -1
- package/dist/features/converters/lexicalToHtml_deprecated/converter/defaultConverters.js +0 -9
- package/dist/features/converters/lexicalToHtml_deprecated/converter/defaultConverters.js.map +0 -1
- package/dist/features/converters/lexicalToHtml_deprecated/converter/index.d.ts +0 -70
- package/dist/features/converters/lexicalToHtml_deprecated/converter/index.d.ts.map +0 -1
- package/dist/features/converters/lexicalToHtml_deprecated/converter/index.js +0 -104
- package/dist/features/converters/lexicalToHtml_deprecated/converter/index.js.map +0 -1
- package/dist/features/converters/lexicalToHtml_deprecated/converter/types.d.ts +0 -27
- package/dist/features/converters/lexicalToHtml_deprecated/converter/types.d.ts.map +0 -1
- package/dist/features/converters/lexicalToHtml_deprecated/converter/types.js +0 -2
- package/dist/features/converters/lexicalToHtml_deprecated/converter/types.js.map +0 -1
- package/dist/features/converters/lexicalToHtml_deprecated/field/index.d.ts +0 -39
- package/dist/features/converters/lexicalToHtml_deprecated/field/index.d.ts.map +0 -1
- package/dist/features/converters/lexicalToHtml_deprecated/field/index.js +0 -122
- package/dist/features/converters/lexicalToHtml_deprecated/field/index.js.map +0 -1
- package/dist/features/converters/lexicalToHtml_deprecated/index.d.ts +0 -12
- package/dist/features/converters/lexicalToHtml_deprecated/index.d.ts.map +0 -1
- package/dist/features/converters/lexicalToHtml_deprecated/index.js +0 -11
- package/dist/features/converters/lexicalToHtml_deprecated/index.js.map +0 -1
- package/dist/features/format/bold/markdownTransformers.d.ts +0 -6
- package/dist/features/format/bold/markdownTransformers.d.ts.map +0 -1
- package/dist/features/format/bold/markdownTransformers.js +0 -23
- package/dist/features/format/bold/markdownTransformers.js.map +0 -1
- package/dist/features/format/inlineCode/markdownTransformers.d.ts +0 -3
- package/dist/features/format/inlineCode/markdownTransformers.d.ts.map +0 -1
- package/dist/features/format/inlineCode/markdownTransformers.js +0 -6
- package/dist/features/format/inlineCode/markdownTransformers.js.map +0 -1
- package/dist/features/format/italic/markdownTransformers.d.ts +0 -4
- package/dist/features/format/italic/markdownTransformers.d.ts.map +0 -1
- package/dist/features/format/italic/markdownTransformers.js +0 -12
- package/dist/features/format/italic/markdownTransformers.js.map +0 -1
- package/dist/features/format/strikethrough/markdownTransformers.d.ts +0 -3
- package/dist/features/format/strikethrough/markdownTransformers.d.ts.map +0 -1
- package/dist/features/format/strikethrough/markdownTransformers.js +0 -6
- package/dist/features/format/strikethrough/markdownTransformers.js.map +0 -1
- package/dist/features/link/nodes/types.d.ts +0 -27
- package/dist/features/link/nodes/types.d.ts.map +0 -1
- package/dist/features/link/nodes/types.js +0 -2
- package/dist/features/link/nodes/types.js.map +0 -1
- package/dist/features/lists/checklist/markdownTransformers.d.ts +0 -3
- package/dist/features/lists/checklist/markdownTransformers.d.ts.map +0 -1
- package/dist/features/lists/checklist/markdownTransformers.js +0 -12
- package/dist/features/lists/checklist/markdownTransformers.js.map +0 -1
- package/dist/features/lists/htmlConverter.d.ts +0 -5
- package/dist/features/lists/htmlConverter.d.ts.map +0 -1
- package/dist/features/lists/htmlConverter.js +0 -81
- package/dist/features/lists/htmlConverter.js.map +0 -1
- package/dist/features/lists/orderedList/markdownTransformer.d.ts +0 -3
- package/dist/features/lists/orderedList/markdownTransformer.d.ts.map +0 -1
- package/dist/features/lists/orderedList/markdownTransformer.js +0 -12
- package/dist/features/lists/orderedList/markdownTransformer.js.map +0 -1
- package/dist/features/lists/shared/markdown.d.ts +0 -6
- package/dist/features/lists/shared/markdown.d.ts.map +0 -1
- package/dist/features/lists/shared/markdown.js +0 -57
- package/dist/features/lists/shared/markdown.js.map +0 -1
- package/dist/features/lists/unorderedList/markdownTransformer.d.ts +0 -3
- package/dist/features/lists/unorderedList/markdownTransformer.d.ts.map +0 -1
- package/dist/features/lists/unorderedList/markdownTransformer.js +0 -12
- package/dist/features/lists/unorderedList/markdownTransformer.js.map +0 -1
- package/dist/lexical/utils/guard.d.ts +0 -5
- package/dist/lexical/utils/guard.d.ts.map +0 -1
- package/dist/lexical/utils/guard.js +0 -9
- package/dist/lexical/utils/guard.js.map +0 -1
- package/dist/lexical-proxy/@lexical-react/LexicalContextMenuPlugin.d.ts +0 -2
- package/dist/lexical-proxy/@lexical-react/LexicalContextMenuPlugin.d.ts.map +0 -1
- package/dist/lexical-proxy/@lexical-react/LexicalContextMenuPlugin.js +0 -2
- package/dist/lexical-proxy/@lexical-react/LexicalContextMenuPlugin.js.map +0 -1
- package/dist/nodeTypes.d.ts +0 -74
- package/dist/nodeTypes.d.ts.map +0 -1
- package/dist/nodeTypes.js +0 -5
- package/dist/nodeTypes.js.map +0 -1
- package/dist/packages/@lexical/markdown/MarkdownExport.d.ts +0 -14
- package/dist/packages/@lexical/markdown/MarkdownExport.d.ts.map +0 -1
- package/dist/packages/@lexical/markdown/MarkdownExport.js +0 -213
- package/dist/packages/@lexical/markdown/MarkdownExport.js.map +0 -1
- package/dist/packages/@lexical/markdown/MarkdownImport.d.ts +0 -19
- package/dist/packages/@lexical/markdown/MarkdownImport.d.ts.map +0 -1
- package/dist/packages/@lexical/markdown/MarkdownImport.js +0 -198
- package/dist/packages/@lexical/markdown/MarkdownImport.js.map +0 -1
- package/dist/packages/@lexical/markdown/MarkdownShortcuts.d.ts +0 -11
- package/dist/packages/@lexical/markdown/MarkdownShortcuts.d.ts.map +0 -1
- package/dist/packages/@lexical/markdown/MarkdownShortcuts.js +0 -304
- package/dist/packages/@lexical/markdown/MarkdownShortcuts.js.map +0 -1
- package/dist/packages/@lexical/markdown/MarkdownTransformers.d.ts +0 -147
- package/dist/packages/@lexical/markdown/MarkdownTransformers.d.ts.map +0 -1
- package/dist/packages/@lexical/markdown/MarkdownTransformers.js +0 -268
- package/dist/packages/@lexical/markdown/MarkdownTransformers.js.map +0 -1
- package/dist/packages/@lexical/markdown/importTextFormatTransformer.d.ts +0 -22
- package/dist/packages/@lexical/markdown/importTextFormatTransformer.d.ts.map +0 -1
- package/dist/packages/@lexical/markdown/importTextFormatTransformer.js +0 -91
- package/dist/packages/@lexical/markdown/importTextFormatTransformer.js.map +0 -1
- package/dist/packages/@lexical/markdown/importTextMatchTransformer.d.ts +0 -21
- package/dist/packages/@lexical/markdown/importTextMatchTransformer.d.ts.map +0 -1
- package/dist/packages/@lexical/markdown/importTextMatchTransformer.js +0 -54
- package/dist/packages/@lexical/markdown/importTextMatchTransformer.js.map +0 -1
- package/dist/packages/@lexical/markdown/importTextTransformers.d.ts +0 -18
- package/dist/packages/@lexical/markdown/importTextTransformers.d.ts.map +0 -1
- package/dist/packages/@lexical/markdown/importTextTransformers.js +0 -54
- package/dist/packages/@lexical/markdown/importTextTransformers.js.map +0 -1
- package/dist/packages/@lexical/markdown/index.d.ts +0 -29
- package/dist/packages/@lexical/markdown/index.d.ts.map +0 -1
- package/dist/packages/@lexical/markdown/index.js +0 -39
- package/dist/packages/@lexical/markdown/index.js.map +0 -1
- package/dist/packages/@lexical/markdown/utils.d.ts +0 -34
- package/dist/packages/@lexical/markdown/utils.d.ts.map +0 -1
- package/dist/packages/@lexical/markdown/utils.js +0 -267
- package/dist/packages/@lexical/markdown/utils.js.map +0 -1
- package/dist/types.d.ts.map +0 -1
- package/dist/types.js +0 -2
- package/dist/types.js.map +0 -1
- /package/dist/exports/client/{componentInline-LCHKRXOV.js.map → componentInline-H24N7GUG.js.map} +0 -0
|
@@ -1,198 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
3
|
-
*
|
|
4
|
-
* This source code is licensed under the MIT license found in the
|
|
5
|
-
* LICENSE file in the root directory of this source tree.
|
|
6
|
-
*
|
|
7
|
-
*/import { $isListItemNode, $isListNode } from '@lexical/list';
|
|
8
|
-
import { $isQuoteNode } from '@lexical/rich-text';
|
|
9
|
-
import { $findMatchingParent } from '@lexical/utils';
|
|
10
|
-
import { $createLineBreakNode, $createParagraphNode, $createTextNode, $getRoot, $getSelection, $isParagraphNode } from 'lexical';
|
|
11
|
-
import { importTextTransformers } from './importTextTransformers.js';
|
|
12
|
-
import { isEmptyParagraph, transformersByType } from './utils.js';
|
|
13
|
-
/**
|
|
14
|
-
* Renders markdown from a string. The selection is moved to the start after the operation.
|
|
15
|
-
*/
|
|
16
|
-
export function createMarkdownImport(transformers, shouldPreserveNewLines = false) {
|
|
17
|
-
const byType = transformersByType(transformers);
|
|
18
|
-
const textFormatTransformersIndex = createTextFormatTransformersIndex(byType.textFormat);
|
|
19
|
-
return (markdownString, node) => {
|
|
20
|
-
const lines = markdownString.split('\n');
|
|
21
|
-
const linesLength = lines.length;
|
|
22
|
-
const root = node || $getRoot();
|
|
23
|
-
root.clear();
|
|
24
|
-
for (let i = 0; i < linesLength; i++) {
|
|
25
|
-
const lineText = lines[i];
|
|
26
|
-
const [imported, shiftedIndex] = $importMultiline(lines, i, byType.multilineElement, root);
|
|
27
|
-
if (imported) {
|
|
28
|
-
// If a multiline markdown element was imported, we don't want to process the lines that were part of it anymore.
|
|
29
|
-
// There could be other sub-markdown elements (both multiline and normal ones) matching within this matched multiline element's children.
|
|
30
|
-
// However, it would be the responsibility of the matched multiline transformer to decide how it wants to handle them.
|
|
31
|
-
// We cannot handle those, as there is no way for us to know how to maintain the correct order of generated lexical nodes for possible children.
|
|
32
|
-
i = shiftedIndex; // Next loop will start from the line after the last line of the multiline element
|
|
33
|
-
continue;
|
|
34
|
-
}
|
|
35
|
-
$importBlocks(lineText, root, byType.element, textFormatTransformersIndex, byType.textMatch);
|
|
36
|
-
}
|
|
37
|
-
// By default, removing empty paragraphs as md does not really
|
|
38
|
-
// allow empty lines and uses them as delimiter.
|
|
39
|
-
// If you need empty lines set shouldPreserveNewLines = true.
|
|
40
|
-
const children = root.getChildren();
|
|
41
|
-
for (const child of children) {
|
|
42
|
-
if (!shouldPreserveNewLines && isEmptyParagraph(child) && root.getChildrenSize() > 1) {
|
|
43
|
-
child.remove();
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
if ($getSelection() !== null) {
|
|
47
|
-
root.selectStart();
|
|
48
|
-
}
|
|
49
|
-
};
|
|
50
|
-
}
|
|
51
|
-
/**
|
|
52
|
-
*
|
|
53
|
-
* @returns first element of the returned tuple is a boolean indicating if a multiline element was imported. The second element is the index of the last line that was processed.
|
|
54
|
-
*/
|
|
55
|
-
function $importMultiline(lines, startLineIndex, multilineElementTransformers, rootNode) {
|
|
56
|
-
for (const transformer of multilineElementTransformers) {
|
|
57
|
-
const {
|
|
58
|
-
handleImportAfterStartMatch,
|
|
59
|
-
regExpEnd,
|
|
60
|
-
regExpStart,
|
|
61
|
-
replace
|
|
62
|
-
} = transformer;
|
|
63
|
-
const startMatch = lines[startLineIndex]?.match(regExpStart);
|
|
64
|
-
if (!startMatch) {
|
|
65
|
-
continue; // Try next transformer
|
|
66
|
-
}
|
|
67
|
-
if (handleImportAfterStartMatch) {
|
|
68
|
-
const result = handleImportAfterStartMatch({
|
|
69
|
-
lines,
|
|
70
|
-
rootNode,
|
|
71
|
-
startLineIndex,
|
|
72
|
-
startMatch,
|
|
73
|
-
transformer
|
|
74
|
-
});
|
|
75
|
-
if (result === null) {
|
|
76
|
-
continue;
|
|
77
|
-
} else if (result) {
|
|
78
|
-
return result;
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
const regexpEndRegex = typeof regExpEnd === 'object' && 'regExp' in regExpEnd ? regExpEnd.regExp : regExpEnd;
|
|
82
|
-
const isEndOptional = regExpEnd && typeof regExpEnd === 'object' && 'optional' in regExpEnd ? regExpEnd.optional : !regExpEnd;
|
|
83
|
-
let endLineIndex = startLineIndex;
|
|
84
|
-
const linesLength = lines.length;
|
|
85
|
-
// check every single line for the closing match. It could also be on the same line as the opening match.
|
|
86
|
-
while (endLineIndex < linesLength) {
|
|
87
|
-
const endMatch = regexpEndRegex ? lines[endLineIndex]?.match(regexpEndRegex) : null;
|
|
88
|
-
if (!endMatch) {
|
|
89
|
-
if (!isEndOptional || isEndOptional && endLineIndex < linesLength - 1 // Optional end, but didn't reach the end of the document yet => continue searching for potential closing match
|
|
90
|
-
) {
|
|
91
|
-
endLineIndex++;
|
|
92
|
-
continue; // Search next line for closing match
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
|
-
// Now, check if the closing match matched is the same as the opening match.
|
|
96
|
-
// If it is, we need to continue searching for the actual closing match.
|
|
97
|
-
if (endMatch && startLineIndex === endLineIndex && endMatch.index === startMatch.index) {
|
|
98
|
-
endLineIndex++;
|
|
99
|
-
continue; // Search next line for closing match
|
|
100
|
-
}
|
|
101
|
-
// At this point, we have found the closing match. Next: calculate the lines in between open and closing match
|
|
102
|
-
// This should not include the matches themselves, and be split up by lines
|
|
103
|
-
const linesInBetween = [];
|
|
104
|
-
if (endMatch && startLineIndex === endLineIndex) {
|
|
105
|
-
linesInBetween.push(lines[startLineIndex].slice(startMatch[0].length, -endMatch[0].length));
|
|
106
|
-
} else {
|
|
107
|
-
for (let i = startLineIndex; i <= endLineIndex; i++) {
|
|
108
|
-
const line = lines[i];
|
|
109
|
-
if (i === startLineIndex) {
|
|
110
|
-
const text = line.slice(startMatch[0].length);
|
|
111
|
-
linesInBetween.push(text); // Also include empty text
|
|
112
|
-
} else if (i === endLineIndex && endMatch) {
|
|
113
|
-
const text = line.slice(0, -endMatch[0].length);
|
|
114
|
-
linesInBetween.push(text); // Also include empty text
|
|
115
|
-
} else {
|
|
116
|
-
linesInBetween.push(line);
|
|
117
|
-
}
|
|
118
|
-
}
|
|
119
|
-
}
|
|
120
|
-
if (replace(rootNode, null, startMatch, endMatch, linesInBetween, true) !== false) {
|
|
121
|
-
// Return here. This $importMultiline function is run line by line and should only process a single multiline element at a time.
|
|
122
|
-
return [true, endLineIndex];
|
|
123
|
-
}
|
|
124
|
-
break;
|
|
125
|
-
}
|
|
126
|
-
}
|
|
127
|
-
// No multiline transformer handled this line successfully
|
|
128
|
-
return [false, startLineIndex];
|
|
129
|
-
}
|
|
130
|
-
function $importBlocks(lineText, rootNode, elementTransformers, textFormatTransformersIndex, textMatchTransformers) {
|
|
131
|
-
const textNode = $createTextNode(lineText);
|
|
132
|
-
const elementNode = $createParagraphNode();
|
|
133
|
-
elementNode.append(textNode);
|
|
134
|
-
rootNode.append(elementNode);
|
|
135
|
-
for (const {
|
|
136
|
-
regExp,
|
|
137
|
-
replace
|
|
138
|
-
} of elementTransformers) {
|
|
139
|
-
const match = lineText.match(regExp);
|
|
140
|
-
if (match) {
|
|
141
|
-
textNode.setTextContent(lineText.slice(match[0].length));
|
|
142
|
-
if (replace(elementNode, [textNode], match, true) !== false) {
|
|
143
|
-
break;
|
|
144
|
-
}
|
|
145
|
-
}
|
|
146
|
-
}
|
|
147
|
-
importTextTransformers(textNode, textFormatTransformersIndex, textMatchTransformers);
|
|
148
|
-
// If no transformer found and we left with original paragraph node
|
|
149
|
-
// can check if its content can be appended to the previous node
|
|
150
|
-
// if it's a paragraph, quote or list
|
|
151
|
-
if (elementNode.isAttached() && lineText.length > 0) {
|
|
152
|
-
const previousNode = elementNode.getPreviousSibling();
|
|
153
|
-
if ($isParagraphNode(previousNode) || $isQuoteNode(previousNode) || $isListNode(previousNode)) {
|
|
154
|
-
let targetNode = previousNode;
|
|
155
|
-
if ($isListNode(previousNode)) {
|
|
156
|
-
const lastDescendant = previousNode.getLastDescendant();
|
|
157
|
-
if (lastDescendant == null) {
|
|
158
|
-
targetNode = null;
|
|
159
|
-
} else {
|
|
160
|
-
targetNode = $findMatchingParent(lastDescendant, $isListItemNode);
|
|
161
|
-
}
|
|
162
|
-
}
|
|
163
|
-
if (targetNode != null && targetNode.getTextContentSize() > 0) {
|
|
164
|
-
targetNode.splice(targetNode.getChildrenSize(), 0, [$createLineBreakNode(), ...elementNode.getChildren()]);
|
|
165
|
-
elementNode.remove();
|
|
166
|
-
}
|
|
167
|
-
}
|
|
168
|
-
}
|
|
169
|
-
}
|
|
170
|
-
function createTextFormatTransformersIndex(textTransformers) {
|
|
171
|
-
const transformersByTag = {};
|
|
172
|
-
const fullMatchRegExpByTag = {};
|
|
173
|
-
const openTagsRegExp = [];
|
|
174
|
-
const escapeRegExp = `(?<![\\\\])`;
|
|
175
|
-
for (const transformer of textTransformers) {
|
|
176
|
-
const {
|
|
177
|
-
tag
|
|
178
|
-
} = transformer;
|
|
179
|
-
transformersByTag[tag] = transformer;
|
|
180
|
-
const tagRegExp = tag.replace(/([*^+])/g, '\\$1');
|
|
181
|
-
openTagsRegExp.push(tagRegExp);
|
|
182
|
-
// Single-char tag (e.g. "*"),
|
|
183
|
-
if (tag.length === 1) {
|
|
184
|
-
fullMatchRegExpByTag[tag] = new RegExp(`(?<![\\\\${tagRegExp}])(${tagRegExp})((\\\\${tagRegExp})?.*?[^${tagRegExp}\\s](\\\\${tagRegExp})?)((?<!\\\\)|(?<=\\\\\\\\))(${tagRegExp})(?![\\\\${tagRegExp}])`);
|
|
185
|
-
} else {
|
|
186
|
-
// Multi‐char tags (e.g. "**")
|
|
187
|
-
fullMatchRegExpByTag[tag] = new RegExp(`(?<!\\\\)(${tagRegExp})((\\\\${tagRegExp})?.*?[^\\s](\\\\${tagRegExp})?)((?<!\\\\)|(?<=\\\\\\\\))(${tagRegExp})(?!\\\\)`);
|
|
188
|
-
}
|
|
189
|
-
}
|
|
190
|
-
return {
|
|
191
|
-
// Reg exp to find open tag + content + close tag
|
|
192
|
-
fullMatchRegExpByTag,
|
|
193
|
-
// Regexp to locate *any* potential opening tag (longest first).
|
|
194
|
-
openTagsRegExp: new RegExp(`${escapeRegExp}(${openTagsRegExp.join('|')})`, 'g'),
|
|
195
|
-
transformersByTag
|
|
196
|
-
};
|
|
197
|
-
}
|
|
198
|
-
//# sourceMappingURL=MarkdownImport.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"MarkdownImport.js","names":["$isListItemNode","$isListNode","$isQuoteNode","$findMatchingParent","$createLineBreakNode","$createParagraphNode","$createTextNode","$getRoot","$getSelection","$isParagraphNode","importTextTransformers","isEmptyParagraph","transformersByType","createMarkdownImport","transformers","shouldPreserveNewLines","byType","textFormatTransformersIndex","createTextFormatTransformersIndex","textFormat","markdownString","node","lines","split","linesLength","length","root","clear","i","lineText","imported","shiftedIndex","$importMultiline","multilineElement","$importBlocks","element","textMatch","children","getChildren","child","getChildrenSize","remove","selectStart","startLineIndex","multilineElementTransformers","rootNode","transformer","handleImportAfterStartMatch","regExpEnd","regExpStart","replace","startMatch","match","result","regexpEndRegex","regExp","isEndOptional","optional","endLineIndex","endMatch","index","linesInBetween","push","slice","line","text","elementTransformers","textMatchTransformers","textNode","elementNode","append","setTextContent","isAttached","previousNode","getPreviousSibling","targetNode","lastDescendant","getLastDescendant","getTextContentSize","splice","textTransformers","transformersByTag","fullMatchRegExpByTag","openTagsRegExp","escapeRegExp","tag","tagRegExp","RegExp","join"],"sources":["../../../../src/packages/@lexical/markdown/MarkdownImport.ts"],"sourcesContent":["/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n\nimport type { ListItemNode } from '@lexical/list'\nimport type { ElementNode } from 'lexical'\n\nimport { $isListItemNode, $isListNode } from '@lexical/list'\nimport { $isQuoteNode } from '@lexical/rich-text'\nimport { $findMatchingParent } from '@lexical/utils'\nimport {\n $createLineBreakNode,\n $createParagraphNode,\n $createTextNode,\n $getRoot,\n $getSelection,\n $isParagraphNode,\n} from 'lexical'\n\nimport type {\n ElementTransformer,\n MultilineElementTransformer,\n TextFormatTransformer,\n TextMatchTransformer,\n Transformer,\n} from './MarkdownTransformers.js'\n\nimport { importTextTransformers } from './importTextTransformers.js'\nimport { isEmptyParagraph, transformersByType } from './utils.js'\n\nexport type TextFormatTransformersIndex = Readonly<{\n fullMatchRegExpByTag: Readonly<Record<string, RegExp>>\n openTagsRegExp: RegExp\n transformersByTag: Readonly<Record<string, TextFormatTransformer>>\n}>\n\n/**\n * Renders markdown from a string. The selection is moved to the start after the operation.\n */\nexport function createMarkdownImport(\n transformers: Array<Transformer>,\n shouldPreserveNewLines = false,\n): (markdownString: string, node?: ElementNode) => void {\n const byType = transformersByType(transformers)\n const textFormatTransformersIndex = createTextFormatTransformersIndex(byType.textFormat)\n\n return (markdownString, node) => {\n const lines = markdownString.split('\\n')\n const linesLength = lines.length\n const root = node || $getRoot()\n root.clear()\n\n for (let i = 0; i < linesLength; i++) {\n const lineText = lines[i]!\n\n const [imported, shiftedIndex] = $importMultiline(lines, i, byType.multilineElement, root)\n\n if (imported) {\n // If a multiline markdown element was imported, we don't want to process the lines that were part of it anymore.\n // There could be other sub-markdown elements (both multiline and normal ones) matching within this matched multiline element's children.\n // However, it would be the responsibility of the matched multiline transformer to decide how it wants to handle them.\n // We cannot handle those, as there is no way for us to know how to maintain the correct order of generated lexical nodes for possible children.\n i = shiftedIndex // Next loop will start from the line after the last line of the multiline element\n continue\n }\n\n $importBlocks(lineText, root, byType.element, textFormatTransformersIndex, byType.textMatch)\n }\n\n // By default, removing empty paragraphs as md does not really\n // allow empty lines and uses them as delimiter.\n // If you need empty lines set shouldPreserveNewLines = true.\n const children = root.getChildren()\n for (const child of children) {\n if (!shouldPreserveNewLines && isEmptyParagraph(child) && root.getChildrenSize() > 1) {\n child.remove()\n }\n }\n\n if ($getSelection() !== null) {\n root.selectStart()\n }\n }\n}\n\n/**\n *\n * @returns first element of the returned tuple is a boolean indicating if a multiline element was imported. The second element is the index of the last line that was processed.\n */\nfunction $importMultiline(\n lines: Array<string>,\n startLineIndex: number,\n multilineElementTransformers: Array<MultilineElementTransformer>,\n rootNode: ElementNode,\n): [boolean, number] {\n for (const transformer of multilineElementTransformers) {\n const { handleImportAfterStartMatch, regExpEnd, regExpStart, replace } = transformer\n\n const startMatch = lines[startLineIndex]?.match(regExpStart)\n if (!startMatch) {\n continue // Try next transformer\n }\n\n if (handleImportAfterStartMatch) {\n const result = handleImportAfterStartMatch({\n lines,\n rootNode,\n startLineIndex,\n startMatch,\n transformer,\n })\n if (result === null) {\n continue\n } else if (result) {\n return result\n }\n }\n\n const regexpEndRegex: RegExp | undefined =\n typeof regExpEnd === 'object' && 'regExp' in regExpEnd ? regExpEnd.regExp : regExpEnd\n\n const isEndOptional =\n regExpEnd && typeof regExpEnd === 'object' && 'optional' in regExpEnd\n ? regExpEnd.optional\n : !regExpEnd\n\n let endLineIndex = startLineIndex\n const linesLength = lines.length\n\n // check every single line for the closing match. It could also be on the same line as the opening match.\n while (endLineIndex < linesLength) {\n const endMatch = regexpEndRegex ? lines[endLineIndex]?.match(regexpEndRegex) : null\n if (!endMatch) {\n if (\n !isEndOptional ||\n (isEndOptional && endLineIndex < linesLength - 1) // Optional end, but didn't reach the end of the document yet => continue searching for potential closing match\n ) {\n endLineIndex++\n continue // Search next line for closing match\n }\n }\n\n // Now, check if the closing match matched is the same as the opening match.\n // If it is, we need to continue searching for the actual closing match.\n if (endMatch && startLineIndex === endLineIndex && endMatch.index === startMatch.index) {\n endLineIndex++\n continue // Search next line for closing match\n }\n\n // At this point, we have found the closing match. Next: calculate the lines in between open and closing match\n // This should not include the matches themselves, and be split up by lines\n const linesInBetween: string[] = []\n\n if (endMatch && startLineIndex === endLineIndex) {\n linesInBetween.push(lines[startLineIndex]!.slice(startMatch[0].length, -endMatch[0].length))\n } else {\n for (let i = startLineIndex; i <= endLineIndex; i++) {\n const line = lines[i]!\n if (i === startLineIndex) {\n const text = line.slice(startMatch[0].length)\n linesInBetween.push(text) // Also include empty text\n } else if (i === endLineIndex && endMatch) {\n const text = line.slice(0, -endMatch[0].length)\n linesInBetween.push(text) // Also include empty text\n } else {\n linesInBetween.push(line)\n }\n }\n }\n\n if (replace(rootNode, null, startMatch, endMatch!, linesInBetween, true) !== false) {\n // Return here. This $importMultiline function is run line by line and should only process a single multiline element at a time.\n return [true, endLineIndex]\n }\n\n // The replace function returned false, despite finding the matching open and close tags => this transformer does not want to handle it.\n // Thus, we continue letting the remaining transformers handle the passed lines of text from the beginning\n break\n }\n }\n\n // No multiline transformer handled this line successfully\n return [false, startLineIndex]\n}\n\nfunction $importBlocks(\n lineText: string,\n rootNode: ElementNode,\n elementTransformers: Array<ElementTransformer>,\n textFormatTransformersIndex: TextFormatTransformersIndex,\n textMatchTransformers: Array<TextMatchTransformer>,\n) {\n const textNode = $createTextNode(lineText)\n const elementNode = $createParagraphNode()\n elementNode.append(textNode)\n rootNode.append(elementNode)\n\n for (const { regExp, replace } of elementTransformers) {\n const match = lineText.match(regExp)\n\n if (match) {\n textNode.setTextContent(lineText.slice(match[0].length))\n if (replace(elementNode, [textNode], match, true) !== false) {\n break\n }\n }\n }\n\n importTextTransformers(textNode, textFormatTransformersIndex, textMatchTransformers)\n\n // If no transformer found and we left with original paragraph node\n // can check if its content can be appended to the previous node\n // if it's a paragraph, quote or list\n if (elementNode.isAttached() && lineText.length > 0) {\n const previousNode = elementNode.getPreviousSibling()\n if ($isParagraphNode(previousNode) || $isQuoteNode(previousNode) || $isListNode(previousNode)) {\n let targetNode: ListItemNode | null | typeof previousNode = previousNode\n\n if ($isListNode(previousNode)) {\n const lastDescendant = previousNode.getLastDescendant()\n if (lastDescendant == null) {\n targetNode = null\n } else {\n targetNode = $findMatchingParent(lastDescendant, $isListItemNode)\n }\n }\n\n if (targetNode != null && targetNode.getTextContentSize() > 0) {\n targetNode.splice(targetNode.getChildrenSize(), 0, [\n $createLineBreakNode(),\n ...elementNode.getChildren(),\n ])\n elementNode.remove()\n }\n }\n }\n}\n\nfunction createTextFormatTransformersIndex(\n textTransformers: Array<TextFormatTransformer>,\n): TextFormatTransformersIndex {\n const transformersByTag: Record<string, TextFormatTransformer> = {}\n const fullMatchRegExpByTag: Record<string, RegExp> = {}\n const openTagsRegExp: string[] = []\n const escapeRegExp = `(?<![\\\\\\\\])`\n\n for (const transformer of textTransformers) {\n const { tag } = transformer\n transformersByTag[tag] = transformer\n const tagRegExp = tag.replace(/([*^+])/g, '\\\\$1')\n openTagsRegExp.push(tagRegExp)\n\n // Single-char tag (e.g. \"*\"),\n if (tag.length === 1) {\n fullMatchRegExpByTag[tag] = new RegExp(\n `(?<![\\\\\\\\${tagRegExp}])(${tagRegExp})((\\\\\\\\${tagRegExp})?.*?[^${tagRegExp}\\\\s](\\\\\\\\${tagRegExp})?)((?<!\\\\\\\\)|(?<=\\\\\\\\\\\\\\\\))(${tagRegExp})(?![\\\\\\\\${tagRegExp}])`,\n )\n } else {\n // Multi‐char tags (e.g. \"**\")\n fullMatchRegExpByTag[tag] = new RegExp(\n `(?<!\\\\\\\\)(${tagRegExp})((\\\\\\\\${tagRegExp})?.*?[^\\\\s](\\\\\\\\${tagRegExp})?)((?<!\\\\\\\\)|(?<=\\\\\\\\\\\\\\\\))(${tagRegExp})(?!\\\\\\\\)`,\n )\n }\n }\n\n return {\n // Reg exp to find open tag + content + close tag\n fullMatchRegExpByTag,\n\n // Regexp to locate *any* potential opening tag (longest first).\n openTagsRegExp: new RegExp(`${escapeRegExp}(${openTagsRegExp.join('|')})`, 'g'),\n transformersByTag,\n }\n}\n"],"mappings":"AAAA;;;;;;GAWA,SAASA,eAAe,EAAEC,WAAW,QAAQ;AAC7C,SAASC,YAAY,QAAQ;AAC7B,SAASC,mBAAmB,QAAQ;AACpC,SACEC,oBAAoB,EACpBC,oBAAoB,EACpBC,eAAe,EACfC,QAAQ,EACRC,aAAa,EACbC,gBAAgB,QACX;AAUP,SAASC,sBAAsB,QAAQ;AACvC,SAASC,gBAAgB,EAAEC,kBAAkB,QAAQ;AAQrD;;;AAGA,OAAO,SAASC,qBACdC,YAAgC,EAChCC,sBAAA,GAAyB,KAAK;EAE9B,MAAMC,MAAA,GAASJ,kBAAA,CAAmBE,YAAA;EAClC,MAAMG,2BAAA,GAA8BC,iCAAA,CAAkCF,MAAA,CAAOG,UAAU;EAEvF,OAAO,CAACC,cAAA,EAAgBC,IAAA;IACtB,MAAMC,KAAA,GAAQF,cAAA,CAAeG,KAAK,CAAC;IACnC,MAAMC,WAAA,GAAcF,KAAA,CAAMG,MAAM;IAChC,MAAMC,IAAA,GAAOL,IAAA,IAAQd,QAAA;IACrBmB,IAAA,CAAKC,KAAK;IAEV,KAAK,IAAIC,CAAA,GAAI,G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C,cAAA,CAAerB,IAAI,CAACwB,SAAA;IAEpB;IACA,IAAID,GAAA,CAAI5D,MAAM,KAAK,GAAG;MACpByD,oBAAoB,CAACG,GAAA,CAAI,GAAG,IAAIE,MAAA,CAC9B,YAAYD,SAAA,MAAeA,SAAA,UAAmBA,SAAA,UAAmBA,SAAA,YAAqBA,SAAA,gCAAyCA,SAAA,YAAqBA,SAAA,IAAa;IAErK,OAAO;MACL;MACAJ,oBAAoB,CAACG,GAAA,CAAI,GAAG,IAAIE,MAAA,CAC9B,aAAaD,SAAA,UAAmBA,SAAA,mBAA4BA,SAAA,gCAAyCA,SAAA,WAAoB;IAE7H;EACF;EAEA,OAAO;IACL;IACAJ,oBAAA;IAEA;IACAC,cAAA,EAAgB,IAAII,MAAA,CAAO,GAAGH,YAAA,IAAgBD,cAAA,CAAeK,IAAI,CAAC,OAAO,EAAE;IAC3EP;EACF;AACF","ignoreList":[]}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
3
|
-
*
|
|
4
|
-
* This source code is licensed under the MIT license found in the
|
|
5
|
-
* LICENSE file in the root directory of this source tree.
|
|
6
|
-
*
|
|
7
|
-
*/
|
|
8
|
-
import type { LexicalEditor } from 'lexical';
|
|
9
|
-
import type { Transformer } from './MarkdownTransformers.js';
|
|
10
|
-
export declare function registerMarkdownShortcuts(editor: LexicalEditor, transformers?: Array<Transformer>): () => void;
|
|
11
|
-
//# sourceMappingURL=MarkdownShortcuts.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"MarkdownShortcuts.d.ts","sourceRoot":"","sources":["../../../../src/packages/@lexical/markdown/MarkdownShortcuts.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAe,aAAa,EAAY,MAAM,SAAS,CAAA;AAYnE,OAAO,KAAK,EAKV,WAAW,EACZ,MAAM,2BAA2B,CAAA;AA4TlC,wBAAgB,yBAAyB,CACvC,MAAM,EAAE,aAAa,EACrB,YAAY,GAAE,KAAK,CAAC,WAAW,CAAgB,GAC9C,MAAM,IAAI,CA8FZ"}
|
|
@@ -1,304 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
3
|
-
*
|
|
4
|
-
* This source code is licensed under the MIT license found in the
|
|
5
|
-
* LICENSE file in the root directory of this source tree.
|
|
6
|
-
*
|
|
7
|
-
*/import { $createRangeSelection, $getSelection, $isLineBreakNode, $isRangeSelection, $isRootOrShadowRoot, $isTextNode, $setSelection } from 'lexical';
|
|
8
|
-
import { TRANSFORMERS } from './index.js';
|
|
9
|
-
import { indexBy, PUNCTUATION_OR_SPACE, transformersByType } from './utils.js';
|
|
10
|
-
function runElementTransformers(parentNode, anchorNode, anchorOffset, elementTransformers) {
|
|
11
|
-
const grandParentNode = parentNode.getParent();
|
|
12
|
-
if (!$isRootOrShadowRoot(grandParentNode) || parentNode.getFirstChild() !== anchorNode) {
|
|
13
|
-
return false;
|
|
14
|
-
}
|
|
15
|
-
const textContent = anchorNode.getTextContent();
|
|
16
|
-
// Checking for anchorOffset position to prevent any checks for cases when caret is too far
|
|
17
|
-
// from a line start to be a part of block-level markdown trigger.
|
|
18
|
-
//
|
|
19
|
-
// TODO:
|
|
20
|
-
// Can have a quick check if caret is close enough to the beginning of the string (e.g. offset less than 10-20)
|
|
21
|
-
// since otherwise it won't be a markdown shortcut, but tables are exception
|
|
22
|
-
if (textContent[anchorOffset - 1] !== ' ') {
|
|
23
|
-
return false;
|
|
24
|
-
}
|
|
25
|
-
for (const {
|
|
26
|
-
regExp,
|
|
27
|
-
replace
|
|
28
|
-
} of elementTransformers) {
|
|
29
|
-
const match = textContent.match(regExp);
|
|
30
|
-
if (match && match[0].length === (match[0].endsWith(' ') ? anchorOffset : anchorOffset - 1)) {
|
|
31
|
-
const nextSiblings = anchorNode.getNextSiblings();
|
|
32
|
-
const [leadingNode, remainderNode] = anchorNode.splitText(anchorOffset);
|
|
33
|
-
leadingNode?.remove();
|
|
34
|
-
const siblings = remainderNode ? [remainderNode, ...nextSiblings] : nextSiblings;
|
|
35
|
-
if (replace(parentNode, siblings, match, false) !== false) {
|
|
36
|
-
return true;
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
return false;
|
|
41
|
-
}
|
|
42
|
-
function runMultilineElementTransformers(parentNode, anchorNode, anchorOffset, elementTransformers) {
|
|
43
|
-
const grandParentNode = parentNode.getParent();
|
|
44
|
-
if (!$isRootOrShadowRoot(grandParentNode) || parentNode.getFirstChild() !== anchorNode) {
|
|
45
|
-
return false;
|
|
46
|
-
}
|
|
47
|
-
const textContent = anchorNode.getTextContent();
|
|
48
|
-
// Checking for anchorOffset position to prevent any checks for cases when caret is too far
|
|
49
|
-
// from a line start to be a part of block-level markdown trigger.
|
|
50
|
-
//
|
|
51
|
-
// TODO:
|
|
52
|
-
// Can have a quick check if caret is close enough to the beginning of the string (e.g. offset less than 10-20)
|
|
53
|
-
// since otherwise it won't be a markdown shortcut, but tables are exception
|
|
54
|
-
if (textContent[anchorOffset - 1] !== ' ') {
|
|
55
|
-
return false;
|
|
56
|
-
}
|
|
57
|
-
for (const {
|
|
58
|
-
regExpEnd,
|
|
59
|
-
regExpStart,
|
|
60
|
-
replace
|
|
61
|
-
} of elementTransformers) {
|
|
62
|
-
if (regExpEnd && !('optional' in regExpEnd) || regExpEnd && 'optional' in regExpEnd && !regExpEnd.optional) {
|
|
63
|
-
continue;
|
|
64
|
-
}
|
|
65
|
-
const match = textContent.match(regExpStart);
|
|
66
|
-
if (match && match[0].length === (match[0].endsWith(' ') ? anchorOffset : anchorOffset - 1)) {
|
|
67
|
-
const nextSiblings = anchorNode.getNextSiblings();
|
|
68
|
-
const [leadingNode, remainderNode] = anchorNode.splitText(anchorOffset);
|
|
69
|
-
leadingNode?.remove();
|
|
70
|
-
const siblings = remainderNode ? [remainderNode, ...nextSiblings] : nextSiblings;
|
|
71
|
-
if (replace(parentNode, siblings, match, null, null, false) !== false) {
|
|
72
|
-
return true;
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
return false;
|
|
77
|
-
}
|
|
78
|
-
function runTextMatchTransformers(anchorNode, anchorOffset, transformersByTrigger) {
|
|
79
|
-
let textContent = anchorNode.getTextContent();
|
|
80
|
-
const lastChar = textContent[anchorOffset - 1];
|
|
81
|
-
const transformers = transformersByTrigger[lastChar];
|
|
82
|
-
if (transformers == null) {
|
|
83
|
-
return false;
|
|
84
|
-
}
|
|
85
|
-
// If typing in the middle of content, remove the tail to do
|
|
86
|
-
// reg exp match up to a string end (caret position)
|
|
87
|
-
if (anchorOffset < textContent.length) {
|
|
88
|
-
textContent = textContent.slice(0, anchorOffset);
|
|
89
|
-
}
|
|
90
|
-
for (const transformer of transformers) {
|
|
91
|
-
if (!transformer.replace || !transformer.regExp) {
|
|
92
|
-
continue;
|
|
93
|
-
}
|
|
94
|
-
const match = textContent.match(transformer.regExp);
|
|
95
|
-
if (match === null) {
|
|
96
|
-
continue;
|
|
97
|
-
}
|
|
98
|
-
const startIndex = match.index || 0;
|
|
99
|
-
const endIndex = startIndex + match[0].length;
|
|
100
|
-
let replaceNode;
|
|
101
|
-
if (startIndex === 0) {
|
|
102
|
-
[replaceNode] = anchorNode.splitText(endIndex);
|
|
103
|
-
} else {
|
|
104
|
-
[, replaceNode] = anchorNode.splitText(startIndex, endIndex);
|
|
105
|
-
}
|
|
106
|
-
if (replaceNode) {
|
|
107
|
-
replaceNode.selectNext(0, 0);
|
|
108
|
-
transformer.replace(replaceNode, match);
|
|
109
|
-
}
|
|
110
|
-
return true;
|
|
111
|
-
}
|
|
112
|
-
return false;
|
|
113
|
-
}
|
|
114
|
-
function $runTextFormatTransformers(anchorNode, anchorOffset, textFormatTransformers) {
|
|
115
|
-
const textContent = anchorNode.getTextContent();
|
|
116
|
-
const closeTagEndIndex = anchorOffset - 1;
|
|
117
|
-
const closeChar = textContent[closeTagEndIndex];
|
|
118
|
-
// Quick check if we're possibly at the end of inline markdown style
|
|
119
|
-
const matchers = textFormatTransformers[closeChar];
|
|
120
|
-
if (!matchers) {
|
|
121
|
-
return false;
|
|
122
|
-
}
|
|
123
|
-
for (const matcher of matchers) {
|
|
124
|
-
const {
|
|
125
|
-
tag
|
|
126
|
-
} = matcher;
|
|
127
|
-
const tagLength = tag.length;
|
|
128
|
-
const closeTagStartIndex = closeTagEndIndex - tagLength + 1;
|
|
129
|
-
// If tag is not single char check if rest of it matches with text content
|
|
130
|
-
if (tagLength > 1) {
|
|
131
|
-
if (!isEqualSubString(textContent, closeTagStartIndex, tag, 0, tagLength)) {
|
|
132
|
-
continue;
|
|
133
|
-
}
|
|
134
|
-
}
|
|
135
|
-
// Space before closing tag cancels inline markdown
|
|
136
|
-
if (textContent[closeTagStartIndex - 1] === ' ') {
|
|
137
|
-
continue;
|
|
138
|
-
}
|
|
139
|
-
// Some tags can not be used within words, hence should have newline/space/punctuation after it
|
|
140
|
-
const afterCloseTagChar = textContent[closeTagEndIndex + 1];
|
|
141
|
-
if (matcher.intraword === false && afterCloseTagChar && !PUNCTUATION_OR_SPACE.test(afterCloseTagChar)) {
|
|
142
|
-
continue;
|
|
143
|
-
}
|
|
144
|
-
const closeNode = anchorNode;
|
|
145
|
-
let openNode = closeNode;
|
|
146
|
-
let openTagStartIndex = getOpenTagStartIndex(textContent, closeTagStartIndex, tag);
|
|
147
|
-
// Go through text node siblings and search for opening tag
|
|
148
|
-
// if haven't found it within the same text node as closing tag
|
|
149
|
-
let sibling = openNode;
|
|
150
|
-
while (openTagStartIndex < 0 && (sibling = sibling.getPreviousSibling())) {
|
|
151
|
-
if ($isLineBreakNode(sibling)) {
|
|
152
|
-
break;
|
|
153
|
-
}
|
|
154
|
-
if ($isTextNode(sibling)) {
|
|
155
|
-
const siblingTextContent = sibling.getTextContent();
|
|
156
|
-
openNode = sibling;
|
|
157
|
-
openTagStartIndex = getOpenTagStartIndex(siblingTextContent, siblingTextContent.length, tag);
|
|
158
|
-
}
|
|
159
|
-
}
|
|
160
|
-
// Opening tag is not found
|
|
161
|
-
if (openTagStartIndex < 0) {
|
|
162
|
-
continue;
|
|
163
|
-
}
|
|
164
|
-
// No content between opening and closing tag
|
|
165
|
-
if (openNode === closeNode && openTagStartIndex + tagLength === closeTagStartIndex) {
|
|
166
|
-
continue;
|
|
167
|
-
}
|
|
168
|
-
// Checking longer tags for repeating chars (e.g. *** vs **)
|
|
169
|
-
const prevOpenNodeText = openNode.getTextContent();
|
|
170
|
-
if (openTagStartIndex > 0 && prevOpenNodeText[openTagStartIndex - 1] === closeChar) {
|
|
171
|
-
continue;
|
|
172
|
-
}
|
|
173
|
-
// Some tags can not be used within words, hence should have newline/space/punctuation before it
|
|
174
|
-
const beforeOpenTagChar = prevOpenNodeText[openTagStartIndex - 1];
|
|
175
|
-
if (matcher.intraword === false && beforeOpenTagChar && !PUNCTUATION_OR_SPACE.test(beforeOpenTagChar)) {
|
|
176
|
-
continue;
|
|
177
|
-
}
|
|
178
|
-
// Clean text from opening and closing tags (starting from closing tag
|
|
179
|
-
// to prevent any offset shifts if we start from opening one)
|
|
180
|
-
const prevCloseNodeText = closeNode.getTextContent();
|
|
181
|
-
const closeNodeText = prevCloseNodeText.slice(0, closeTagStartIndex) + prevCloseNodeText.slice(closeTagEndIndex + 1);
|
|
182
|
-
closeNode.setTextContent(closeNodeText);
|
|
183
|
-
const openNodeText = openNode === closeNode ? closeNodeText : prevOpenNodeText;
|
|
184
|
-
openNode.setTextContent(openNodeText.slice(0, openTagStartIndex) + openNodeText.slice(openTagStartIndex + tagLength));
|
|
185
|
-
const selection = $getSelection();
|
|
186
|
-
const nextSelection = $createRangeSelection();
|
|
187
|
-
$setSelection(nextSelection);
|
|
188
|
-
// Adjust offset based on deleted chars
|
|
189
|
-
const newOffset = closeTagEndIndex - tagLength * (openNode === closeNode ? 2 : 1) + 1;
|
|
190
|
-
nextSelection.anchor.set(openNode.__key, openTagStartIndex, 'text');
|
|
191
|
-
nextSelection.focus.set(closeNode.__key, newOffset, 'text');
|
|
192
|
-
// Apply formatting to selected text
|
|
193
|
-
for (const format of matcher.format) {
|
|
194
|
-
if (!nextSelection.hasFormat(format)) {
|
|
195
|
-
nextSelection.formatText(format);
|
|
196
|
-
}
|
|
197
|
-
}
|
|
198
|
-
// Collapse selection up to the focus point
|
|
199
|
-
nextSelection.anchor.set(nextSelection.focus.key, nextSelection.focus.offset, nextSelection.focus.type);
|
|
200
|
-
// Remove formatting from collapsed selection
|
|
201
|
-
for (const format of matcher.format) {
|
|
202
|
-
if (nextSelection.hasFormat(format)) {
|
|
203
|
-
nextSelection.toggleFormat(format);
|
|
204
|
-
}
|
|
205
|
-
}
|
|
206
|
-
if ($isRangeSelection(selection)) {
|
|
207
|
-
nextSelection.format = selection.format;
|
|
208
|
-
}
|
|
209
|
-
return true;
|
|
210
|
-
}
|
|
211
|
-
return false;
|
|
212
|
-
}
|
|
213
|
-
function getOpenTagStartIndex(string, maxIndex, tag) {
|
|
214
|
-
const tagLength = tag.length;
|
|
215
|
-
for (let i = maxIndex; i >= tagLength; i--) {
|
|
216
|
-
const startIndex = i - tagLength;
|
|
217
|
-
if (isEqualSubString(string, startIndex, tag, 0, tagLength) &&
|
|
218
|
-
// Space after opening tag cancels transformation
|
|
219
|
-
string[startIndex + tagLength] !== ' ') {
|
|
220
|
-
return startIndex;
|
|
221
|
-
}
|
|
222
|
-
}
|
|
223
|
-
return -1;
|
|
224
|
-
}
|
|
225
|
-
function isEqualSubString(stringA, aStart, stringB, bStart, length) {
|
|
226
|
-
for (let i = 0; i < length; i++) {
|
|
227
|
-
if (stringA[aStart + i] !== stringB[bStart + i]) {
|
|
228
|
-
return false;
|
|
229
|
-
}
|
|
230
|
-
}
|
|
231
|
-
return true;
|
|
232
|
-
}
|
|
233
|
-
export function registerMarkdownShortcuts(editor, transformers = TRANSFORMERS) {
|
|
234
|
-
const byType = transformersByType(transformers);
|
|
235
|
-
const textFormatTransformersByTrigger = indexBy(byType.textFormat, ({
|
|
236
|
-
tag
|
|
237
|
-
}) => tag[tag.length - 1]);
|
|
238
|
-
const textMatchTransformersByTrigger = indexBy(byType.textMatch, ({
|
|
239
|
-
trigger
|
|
240
|
-
}) => trigger);
|
|
241
|
-
for (const transformer of transformers) {
|
|
242
|
-
const type = transformer.type;
|
|
243
|
-
if (type === 'element' || type === 'text-match' || type === 'multiline-element') {
|
|
244
|
-
const dependencies = transformer.dependencies;
|
|
245
|
-
for (const node of dependencies) {
|
|
246
|
-
if (!editor.hasNode(node)) {
|
|
247
|
-
throw new Error('MarkdownShortcuts: missing dependency %s for transformer. Ensure node dependency is included in editor initial config.' + node.getType());
|
|
248
|
-
}
|
|
249
|
-
}
|
|
250
|
-
}
|
|
251
|
-
}
|
|
252
|
-
const $transform = (parentNode, anchorNode, anchorOffset) => {
|
|
253
|
-
if (runElementTransformers(parentNode, anchorNode, anchorOffset, byType.element)) {
|
|
254
|
-
return;
|
|
255
|
-
}
|
|
256
|
-
if (runMultilineElementTransformers(parentNode, anchorNode, anchorOffset, byType.multilineElement)) {
|
|
257
|
-
return;
|
|
258
|
-
}
|
|
259
|
-
if (runTextMatchTransformers(anchorNode, anchorOffset, textMatchTransformersByTrigger)) {
|
|
260
|
-
return;
|
|
261
|
-
}
|
|
262
|
-
$runTextFormatTransformers(anchorNode, anchorOffset, textFormatTransformersByTrigger);
|
|
263
|
-
};
|
|
264
|
-
return editor.registerUpdateListener(({
|
|
265
|
-
dirtyLeaves,
|
|
266
|
-
editorState,
|
|
267
|
-
prevEditorState,
|
|
268
|
-
tags
|
|
269
|
-
}) => {
|
|
270
|
-
// Ignore updates from collaboration and undo/redo (as changes already calculated)
|
|
271
|
-
if (tags.has('collaboration') || tags.has('historic')) {
|
|
272
|
-
return;
|
|
273
|
-
}
|
|
274
|
-
// If editor is still composing (i.e. backticks) we must wait before the user confirms the key
|
|
275
|
-
if (editor.isComposing()) {
|
|
276
|
-
return;
|
|
277
|
-
}
|
|
278
|
-
const selection = editorState.read($getSelection);
|
|
279
|
-
const prevSelection = prevEditorState.read($getSelection);
|
|
280
|
-
// We expect selection to be a collapsed range and not match previous one (as we want
|
|
281
|
-
// to trigger transforms only as user types)
|
|
282
|
-
if (!$isRangeSelection(prevSelection) || !$isRangeSelection(selection) || !selection.isCollapsed() || selection.is(prevSelection)) {
|
|
283
|
-
return;
|
|
284
|
-
}
|
|
285
|
-
const anchorKey = selection.anchor.key;
|
|
286
|
-
const anchorOffset = selection.anchor.offset;
|
|
287
|
-
const anchorNode = editorState._nodeMap.get(anchorKey);
|
|
288
|
-
if (!$isTextNode(anchorNode) || !dirtyLeaves.has(anchorKey) || anchorOffset !== 1 && anchorOffset > prevSelection.anchor.offset + 1) {
|
|
289
|
-
return;
|
|
290
|
-
}
|
|
291
|
-
editor.update(() => {
|
|
292
|
-
// Markdown is not available inside code
|
|
293
|
-
if (anchorNode.hasFormat('code')) {
|
|
294
|
-
return;
|
|
295
|
-
}
|
|
296
|
-
const parentNode = anchorNode.getParent();
|
|
297
|
-
if (parentNode === null) {
|
|
298
|
-
return;
|
|
299
|
-
}
|
|
300
|
-
$transform(parentNode, anchorNode, selection.anchor.offset);
|
|
301
|
-
});
|
|
302
|
-
});
|
|
303
|
-
}
|
|
304
|
-
//# sourceMappingURL=MarkdownShortcuts.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"MarkdownShortcuts.js","names":["$createRangeSelection","$getSelection","$isLineBreakNode","$isRangeSelection","$isRootOrShadowRoot","$isTextNode","$setSelection","TRANSFORMERS","indexBy","PUNCTUATION_OR_SPACE","transformersByType","runElementTransformers","parentNode","anchorNode","anchorOffset","elementTransformers","grandParentNode","getParent","getFirstChild","textContent","getTextContent","regExp","replace","match","length","endsWith","nextSiblings","getNextSiblings","leadingNode","remainderNode","splitText","remove","siblings","runMultilineElementTransformers","regExpEnd","regExpStart","optional","runTextMatchTransformers","transformersByTrigger","lastChar","transformers","slice","transformer","startIndex","index","endIndex","replaceNode","selectNext","$runTextFormatTransformers","textFormatTransformers","closeTagEndIndex","closeChar","matchers","matcher","tag","tagLength","closeTagStartIndex","isEqualSubString","afterCloseTagChar","intraword","test","closeNode","openNode","openTagStartIndex","getOpenTagStartIndex","sibling","getPreviousSibling","siblingTextContent","prevOpenNodeText","beforeOpenTagChar","prevCloseNodeText","closeNodeText","setTextContent","openNodeText","selection","nextSelection","newOffset","anchor","set","__key","focus","format","hasFormat","formatText","key","offset","type","toggleFormat","string","maxIndex","i","stringA","aStart","stringB","bStart","registerMarkdownShortcuts","editor","byType","textFormatTransformersByTrigger","textFormat","textMatchTransformersByTrigger","textMatch","trigger","dependencies","node","hasNode","Error","getType","$transform","element","multilineElement","registerUpdateListener","dirtyLeaves","editorState","prevEditorState","tags","has","isComposing","read","prevSelection","isCollapsed","is","anchorKey","_nodeMap","get","update"],"sources":["../../../../src/packages/@lexical/markdown/MarkdownShortcuts.ts"],"sourcesContent":["/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n\nimport type { ElementNode, LexicalEditor, TextNode } from 'lexical'\n\nimport {\n $createRangeSelection,\n $getSelection,\n $isLineBreakNode,\n $isRangeSelection,\n $isRootOrShadowRoot,\n $isTextNode,\n $setSelection,\n} from 'lexical'\n\nimport type {\n ElementTransformer,\n MultilineElementTransformer,\n TextFormatTransformer,\n TextMatchTransformer,\n Transformer,\n} from './MarkdownTransformers.js'\n\nimport { TRANSFORMERS } from './index.js'\nimport { indexBy, PUNCTUATION_OR_SPACE, transformersByType } from './utils.js'\n\nfunction runElementTransformers(\n parentNode: ElementNode,\n anchorNode: TextNode,\n anchorOffset: number,\n elementTransformers: ReadonlyArray<ElementTransformer>,\n): boolean {\n const grandParentNode = parentNode.getParent()\n\n if (!$isRootOrShadowRoot(grandParentNode) || parentNode.getFirstChild() !== anchorNode) {\n return false\n }\n\n const textContent = anchorNode.getTextContent()\n\n // Checking for anchorOffset position to prevent any checks for cases when caret is too far\n // from a line start to be a part of block-level markdown trigger.\n //\n // TODO:\n // Can have a quick check if caret is close enough to the beginning of the string (e.g. offset less than 10-20)\n // since otherwise it won't be a markdown shortcut, but tables are exception\n if (textContent[anchorOffset - 1] !== ' ') {\n return false\n }\n\n for (const { regExp, replace } of elementTransformers) {\n const match = textContent.match(regExp)\n\n if (match && match[0].length === (match[0].endsWith(' ') ? anchorOffset : anchorOffset - 1)) {\n const nextSiblings = anchorNode.getNextSiblings()\n const [leadingNode, remainderNode] = anchorNode.splitText(anchorOffset)\n leadingNode?.remove()\n const siblings = remainderNode ? [remainderNode, ...nextSiblings] : nextSiblings\n if (replace(parentNode, siblings, match, false) !== false) {\n return true\n }\n }\n }\n\n return false\n}\n\nfunction runMultilineElementTransformers(\n parentNode: ElementNode,\n anchorNode: TextNode,\n anchorOffset: number,\n elementTransformers: ReadonlyArray<MultilineElementTransformer>,\n): boolean {\n const grandParentNode = parentNode.getParent()\n\n if (!$isRootOrShadowRoot(grandParentNode) || parentNode.getFirstChild() !== anchorNode) {\n return false\n }\n\n const textContent = anchorNode.getTextContent()\n\n // Checking for anchorOffset position to prevent any checks for cases when caret is too far\n // from a line start to be a part of block-level markdown trigger.\n //\n // TODO:\n // Can have a quick check if caret is close enough to the beginning of the string (e.g. offset less than 10-20)\n // since otherwise it won't be a markdown shortcut, but tables are exception\n if (textContent[anchorOffset - 1] !== ' ') {\n return false\n }\n\n for (const { regExpEnd, regExpStart, replace } of elementTransformers) {\n if (\n (regExpEnd && !('optional' in regExpEnd)) ||\n (regExpEnd && 'optional' in regExpEnd && !regExpEnd.optional)\n ) {\n continue\n }\n\n const match = textContent.match(regExpStart)\n\n if (match && match[0].length === (match[0].endsWith(' ') ? anchorOffset : anchorOffset - 1)) {\n const nextSiblings = anchorNode.getNextSiblings()\n const [leadingNode, remainderNode] = anchorNode.splitText(anchorOffset)\n leadingNode?.remove()\n const siblings = remainderNode ? [remainderNode, ...nextSiblings] : nextSiblings\n\n if (replace(parentNode, siblings, match, null, null, false) !== false) {\n return true\n }\n }\n }\n\n return false\n}\n\nfunction runTextMatchTransformers(\n anchorNode: TextNode,\n anchorOffset: number,\n transformersByTrigger: Readonly<Record<string, Array<TextMatchTransformer>>>,\n): boolean {\n let textContent = anchorNode.getTextContent()\n const lastChar = textContent[anchorOffset - 1]!\n const transformers = transformersByTrigger[lastChar]\n\n if (transformers == null) {\n return false\n }\n\n // If typing in the middle of content, remove the tail to do\n // reg exp match up to a string end (caret position)\n if (anchorOffset < textContent.length) {\n textContent = textContent.slice(0, anchorOffset)\n }\n\n for (const transformer of transformers) {\n if (!transformer.replace || !transformer.regExp) {\n continue\n }\n const match = textContent.match(transformer.regExp)\n\n if (match === null) {\n continue\n }\n\n const startIndex = match.index || 0\n const endIndex = startIndex + match[0].length\n let replaceNode\n\n if (startIndex === 0) {\n ;[replaceNode] = anchorNode.splitText(endIndex)\n } else {\n ;[, replaceNode] = anchorNode.splitText(startIndex, endIndex)\n }\n if (replaceNode) {\n replaceNode.selectNext(0, 0)\n transformer.replace(replaceNode, match)\n }\n return true\n }\n\n return false\n}\n\nfunction $runTextFormatTransformers(\n anchorNode: TextNode,\n anchorOffset: number,\n textFormatTransformers: Readonly<Record<string, ReadonlyArray<TextFormatTransformer>>>,\n): boolean {\n const textContent = anchorNode.getTextContent()\n const closeTagEndIndex = anchorOffset - 1\n const closeChar = textContent[closeTagEndIndex]!\n // Quick check if we're possibly at the end of inline markdown style\n const matchers = textFormatTransformers[closeChar]\n\n if (!matchers) {\n return false\n }\n\n for (const matcher of matchers) {\n const { tag } = matcher\n const tagLength = tag.length\n const closeTagStartIndex = closeTagEndIndex - tagLength + 1\n\n // If tag is not single char check if rest of it matches with text content\n if (tagLength > 1) {\n if (!isEqualSubString(textContent, closeTagStartIndex, tag, 0, tagLength)) {\n continue\n }\n }\n\n // Space before closing tag cancels inline markdown\n if (textContent[closeTagStartIndex - 1] === ' ') {\n continue\n }\n\n // Some tags can not be used within words, hence should have newline/space/punctuation after it\n const afterCloseTagChar = textContent[closeTagEndIndex + 1]\n\n if (\n matcher.intraword === false &&\n afterCloseTagChar &&\n !PUNCTUATION_OR_SPACE.test(afterCloseTagChar)\n ) {\n continue\n }\n\n const closeNode = anchorNode\n let openNode = closeNode\n let openTagStartIndex = getOpenTagStartIndex(textContent, closeTagStartIndex, tag)\n\n // Go through text node siblings and search for opening tag\n // if haven't found it within the same text node as closing tag\n let sibling: null | TextNode = openNode\n\n while (openTagStartIndex < 0 && (sibling = sibling.getPreviousSibling<TextNode>())) {\n if ($isLineBreakNode(sibling)) {\n break\n }\n\n if ($isTextNode(sibling)) {\n const siblingTextContent = sibling.getTextContent()\n openNode = sibling\n openTagStartIndex = getOpenTagStartIndex(siblingTextContent, siblingTextContent.length, tag)\n }\n }\n\n // Opening tag is not found\n if (openTagStartIndex < 0) {\n continue\n }\n\n // No content between opening and closing tag\n if (openNode === closeNode && openTagStartIndex + tagLength === closeTagStartIndex) {\n continue\n }\n\n // Checking longer tags for repeating chars (e.g. *** vs **)\n const prevOpenNodeText = openNode.getTextContent()\n\n if (openTagStartIndex > 0 && prevOpenNodeText[openTagStartIndex - 1] === closeChar) {\n continue\n }\n\n // Some tags can not be used within words, hence should have newline/space/punctuation before it\n const beforeOpenTagChar = prevOpenNodeText[openTagStartIndex - 1]\n\n if (\n matcher.intraword === false &&\n beforeOpenTagChar &&\n !PUNCTUATION_OR_SPACE.test(beforeOpenTagChar)\n ) {\n continue\n }\n\n // Clean text from opening and closing tags (starting from closing tag\n // to prevent any offset shifts if we start from opening one)\n const prevCloseNodeText = closeNode.getTextContent()\n const closeNodeText =\n prevCloseNodeText.slice(0, closeTagStartIndex) + prevCloseNodeText.slice(closeTagEndIndex + 1)\n closeNode.setTextContent(closeNodeText)\n const openNodeText = openNode === closeNode ? closeNodeText : prevOpenNodeText\n openNode.setTextContent(\n openNodeText.slice(0, openTagStartIndex) + openNodeText.slice(openTagStartIndex + tagLength),\n )\n const selection = $getSelection()\n const nextSelection = $createRangeSelection()\n $setSelection(nextSelection)\n // Adjust offset based on deleted chars\n const newOffset = closeTagEndIndex - tagLength * (openNode === closeNode ? 2 : 1) + 1\n nextSelection.anchor.set(openNode.__key, openTagStartIndex, 'text')\n nextSelection.focus.set(closeNode.__key, newOffset, 'text')\n\n // Apply formatting to selected text\n for (const format of matcher.format) {\n if (!nextSelection.hasFormat(format)) {\n nextSelection.formatText(format)\n }\n }\n\n // Collapse selection up to the focus point\n nextSelection.anchor.set(\n nextSelection.focus.key,\n nextSelection.focus.offset,\n nextSelection.focus.type,\n )\n\n // Remove formatting from collapsed selection\n for (const format of matcher.format) {\n if (nextSelection.hasFormat(format)) {\n nextSelection.toggleFormat(format)\n }\n }\n\n if ($isRangeSelection(selection)) {\n nextSelection.format = selection.format\n }\n\n return true\n }\n\n return false\n}\n\nfunction getOpenTagStartIndex(string: string, maxIndex: number, tag: string): number {\n const tagLength = tag.length\n\n for (let i = maxIndex; i >= tagLength; i--) {\n const startIndex = i - tagLength\n\n if (\n isEqualSubString(string, startIndex, tag, 0, tagLength) && // Space after opening tag cancels transformation\n string[startIndex + tagLength] !== ' '\n ) {\n return startIndex\n }\n }\n\n return -1\n}\n\nfunction isEqualSubString(\n stringA: string,\n aStart: number,\n stringB: string,\n bStart: number,\n length: number,\n): boolean {\n for (let i = 0; i < length; i++) {\n if (stringA[aStart + i] !== stringB[bStart + i]) {\n return false\n }\n }\n\n return true\n}\n\nexport function registerMarkdownShortcuts(\n editor: LexicalEditor,\n transformers: Array<Transformer> = TRANSFORMERS,\n): () => void {\n const byType = transformersByType(transformers)\n const textFormatTransformersByTrigger = indexBy(\n byType.textFormat,\n ({ tag }) => tag[tag.length - 1],\n )\n const textMatchTransformersByTrigger = indexBy(byType.textMatch, ({ trigger }) => trigger)\n\n for (const transformer of transformers) {\n const type = transformer.type\n if (type === 'element' || type === 'text-match' || type === 'multiline-element') {\n const dependencies = transformer.dependencies\n for (const node of dependencies) {\n if (!editor.hasNode(node)) {\n throw new Error(\n 'MarkdownShortcuts: missing dependency %s for transformer. Ensure node dependency is included in editor initial config.' +\n node.getType(),\n )\n }\n }\n }\n }\n\n const $transform = (parentNode: ElementNode, anchorNode: TextNode, anchorOffset: number) => {\n if (runElementTransformers(parentNode, anchorNode, anchorOffset, byType.element)) {\n return\n }\n\n if (\n runMultilineElementTransformers(parentNode, anchorNode, anchorOffset, byType.multilineElement)\n ) {\n return\n }\n\n if (runTextMatchTransformers(anchorNode, anchorOffset, textMatchTransformersByTrigger)) {\n return\n }\n\n $runTextFormatTransformers(anchorNode, anchorOffset, textFormatTransformersByTrigger)\n }\n\n return editor.registerUpdateListener(({ dirtyLeaves, editorState, prevEditorState, tags }) => {\n // Ignore updates from collaboration and undo/redo (as changes already calculated)\n if (tags.has('collaboration') || tags.has('historic')) {\n return\n }\n\n // If editor is still composing (i.e. backticks) we must wait before the user confirms the key\n if (editor.isComposing()) {\n return\n }\n\n const selection = editorState.read($getSelection)\n const prevSelection = prevEditorState.read($getSelection)\n\n // We expect selection to be a collapsed range and not match previous one (as we want\n // to trigger transforms only as user types)\n if (\n !$isRangeSelection(prevSelection) ||\n !$isRangeSelection(selection) ||\n !selection.isCollapsed() ||\n selection.is(prevSelection)\n ) {\n return\n }\n\n const anchorKey = selection.anchor.key\n const anchorOffset = selection.anchor.offset\n\n const anchorNode = editorState._nodeMap.get(anchorKey)\n\n if (\n !$isTextNode(anchorNode) ||\n !dirtyLeaves.has(anchorKey) ||\n (anchorOffset !== 1 && anchorOffset > prevSelection.anchor.offset + 1)\n ) {\n return\n }\n\n editor.update(() => {\n // Markdown is not available inside code\n if (anchorNode.hasFormat('code')) {\n return\n }\n\n const parentNode = anchorNode.getParent()\n\n if (parentNode === null) {\n return\n }\n\n $transform(parentNode, anchorNode, selection.anchor.offset)\n })\n })\n}\n"],"mappings":"AAAA;;;;;;GAUA,SACEA,qBAAqB,EACrBC,aAAa,EACbC,gBAAgB,EA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