@ruya.sa/richtext-lexical 3.71.7
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 +22 -0
- package/README.md +26 -0
- package/dist/cell/rscEntry.d.ts +4 -0
- package/dist/cell/rscEntry.d.ts.map +1 -0
- package/dist/cell/rscEntry.js +82 -0
- package/dist/cell/rscEntry.js.map +1 -0
- package/dist/dependencyChecker.spec.js +16 -0
- package/dist/dependencyChecker.spec.js.map +1 -0
- package/dist/exports/client/Component-DOSSWC76.js +2 -0
- package/dist/exports/client/Component-DOSSWC76.js.map +7 -0
- package/dist/exports/client/Component-MBLHTKDK.js +2 -0
- package/dist/exports/client/Component-MBLHTKDK.js.map +7 -0
- package/dist/exports/client/Field-QIMXATKW.js +2 -0
- package/dist/exports/client/Field-QIMXATKW.js.map +7 -0
- package/dist/exports/client/RelationshipComponent-DCANZBOE.js +2 -0
- package/dist/exports/client/RelationshipComponent-DCANZBOE.js.map +7 -0
- package/dist/exports/client/bundled.css +1 -0
- package/dist/exports/client/chunk-AFXLIYGL.js +12 -0
- package/dist/exports/client/chunk-AFXLIYGL.js.map +7 -0
- package/dist/exports/client/chunk-DBWINSQN.js +2 -0
- package/dist/exports/client/chunk-DBWINSQN.js.map +7 -0
- package/dist/exports/client/chunk-DZXWP6IZ.js +2 -0
- package/dist/exports/client/chunk-DZXWP6IZ.js.map +7 -0
- package/dist/exports/client/chunk-KYWV53CD.js +2 -0
- package/dist/exports/client/chunk-KYWV53CD.js.map +7 -0
- package/dist/exports/client/chunk-SODVDWHX.js +2 -0
- package/dist/exports/client/chunk-SODVDWHX.js.map +7 -0
- package/dist/exports/client/chunk-XBW56OWQ.js +2 -0
- package/dist/exports/client/chunk-XBW56OWQ.js.map +7 -0
- package/dist/exports/client/chunk-ZRFUQZFN.js +2 -0
- package/dist/exports/client/chunk-ZRFUQZFN.js.map +7 -0
- package/dist/exports/client/component-GTKEFO4X.js +2 -0
- package/dist/exports/client/component-GTKEFO4X.js.map +7 -0
- package/dist/exports/client/componentInline-AWWKOKZC.js +2 -0
- package/dist/exports/client/componentInline-AWWKOKZC.js.map +7 -0
- package/dist/exports/client/index.d.ts +84 -0
- package/dist/exports/client/index.d.ts.map +1 -0
- package/dist/exports/client/index.js +66 -0
- package/dist/exports/client/index.js.map +7 -0
- package/dist/exports/cssEntry.d.ts +3 -0
- package/dist/exports/cssEntry.d.ts.map +1 -0
- package/dist/exports/cssEntry.js +5 -0
- package/dist/exports/cssEntry.js.map +1 -0
- package/dist/exports/html/index.d.ts +16 -0
- package/dist/exports/html/index.d.ts.map +1 -0
- package/dist/exports/html/index.js +14 -0
- package/dist/exports/html/index.js.map +1 -0
- package/dist/exports/html-async/index.d.ts +16 -0
- package/dist/exports/html-async/index.d.ts.map +1 -0
- package/dist/exports/html-async/index.js +14 -0
- package/dist/exports/html-async/index.js.map +1 -0
- package/dist/exports/plaintext/index.d.ts +3 -0
- package/dist/exports/plaintext/index.d.ts.map +1 -0
- package/dist/exports/plaintext/index.js +2 -0
- package/dist/exports/plaintext/index.js.map +1 -0
- package/dist/exports/react/index.d.ts +16 -0
- package/dist/exports/react/index.d.ts.map +1 -0
- package/dist/exports/react/index.js +15 -0
- package/dist/exports/react/index.js.map +1 -0
- package/dist/exports/server/ast/mdx.d.ts +7 -0
- package/dist/exports/server/ast/mdx.d.ts.map +1 -0
- package/dist/exports/server/ast/mdx.js +42 -0
- package/dist/exports/server/ast/mdx.js.map +1 -0
- package/dist/exports/server/migrate.d.ts +16 -0
- package/dist/exports/server/migrate.d.ts.map +1 -0
- package/dist/exports/server/migrate.js +16 -0
- package/dist/exports/server/migrate.js.map +1 -0
- package/dist/exports/server/rsc.d.ts +4 -0
- package/dist/exports/server/rsc.d.ts.map +1 -0
- package/dist/exports/server/rsc.js +4 -0
- package/dist/exports/server/rsc.js.map +1 -0
- package/dist/exports/shared.d.ts +5 -0
- package/dist/exports/shared.d.ts.map +1 -0
- package/dist/exports/shared.js +5 -0
- package/dist/exports/shared.js.map +1 -0
- package/dist/features/align/client/index.d.ts +2 -0
- package/dist/features/align/client/index.d.ts.map +1 -0
- package/dist/features/align/client/index.js +215 -0
- package/dist/features/align/client/index.js.map +1 -0
- package/dist/features/align/client/toolbarAlignGroup.d.ts +3 -0
- package/dist/features/align/client/toolbarAlignGroup.d.ts.map +1 -0
- package/dist/features/align/client/toolbarAlignGroup.js +13 -0
- package/dist/features/align/client/toolbarAlignGroup.js.map +1 -0
- package/dist/features/align/server/i18n.d.ts +3 -0
- package/dist/features/align/server/i18n.d.ts.map +1 -0
- package/dist/features/align/server/i18n.js +225 -0
- package/dist/features/align/server/i18n.js.map +1 -0
- package/dist/features/align/server/index.d.ts +2 -0
- package/dist/features/align/server/index.d.ts.map +1 -0
- package/dist/features/align/server/index.js +10 -0
- package/dist/features/align/server/index.js.map +1 -0
- package/dist/features/blockquote/client/index.d.ts +2 -0
- package/dist/features/blockquote/client/index.d.ts.map +1 -0
- package/dist/features/blockquote/client/index.js +72 -0
- package/dist/features/blockquote/client/index.js.map +1 -0
- package/dist/features/blockquote/markdownTransformer.d.ts +3 -0
- package/dist/features/blockquote/markdownTransformer.d.ts.map +1 -0
- package/dist/features/blockquote/markdownTransformer.js +33 -0
- package/dist/features/blockquote/markdownTransformer.js.map +1 -0
- package/dist/features/blockquote/server/i18n.d.ts +3 -0
- package/dist/features/blockquote/server/i18n.d.ts.map +1 -0
- package/dist/features/blockquote/server/i18n.js +114 -0
- package/dist/features/blockquote/server/i18n.js.map +1 -0
- package/dist/features/blockquote/server/index.d.ts +6 -0
- package/dist/features/blockquote/server/index.d.ts.map +1 -0
- package/dist/features/blockquote/server/index.js +57 -0
- package/dist/features/blockquote/server/index.js.map +1 -0
- package/dist/features/blocks/client/component/BlockContent.d.ts +73 -0
- package/dist/features/blocks/client/component/BlockContent.d.ts.map +1 -0
- package/dist/features/blocks/client/component/BlockContent.js +81 -0
- package/dist/features/blocks/client/component/BlockContent.js.map +1 -0
- package/dist/features/blocks/client/component/components/BlockCollapsible.d.ts +4 -0
- package/dist/features/blocks/client/component/components/BlockCollapsible.d.ts.map +1 -0
- package/dist/features/blocks/client/component/components/BlockCollapsible.js +19 -0
- package/dist/features/blocks/client/component/components/BlockCollapsible.js.map +1 -0
- package/dist/features/blocks/client/component/components/BlockEditButton.d.ts +3 -0
- package/dist/features/blocks/client/component/components/BlockEditButton.d.ts.map +1 -0
- package/dist/features/blocks/client/component/components/BlockEditButton.js +22 -0
- package/dist/features/blocks/client/component/components/BlockEditButton.js.map +1 -0
- package/dist/features/blocks/client/component/components/BlockRemoveButton.d.ts +3 -0
- package/dist/features/blocks/client/component/components/BlockRemoveButton.d.ts.map +1 -0
- package/dist/features/blocks/client/component/components/BlockRemoveButton.js +22 -0
- package/dist/features/blocks/client/component/components/BlockRemoveButton.js.map +1 -0
- package/dist/features/blocks/client/component/index.d.ts +17 -0
- package/dist/features/blocks/client/component/index.d.ts.map +1 -0
- package/dist/features/blocks/client/component/index.js +444 -0
- package/dist/features/blocks/client/component/index.js.map +1 -0
- package/dist/features/blocks/client/component/removeEmptyArrayValues.d.ts +11 -0
- package/dist/features/blocks/client/component/removeEmptyArrayValues.d.ts.map +1 -0
- package/dist/features/blocks/client/component/removeEmptyArrayValues.js +20 -0
- package/dist/features/blocks/client/component/removeEmptyArrayValues.js.map +1 -0
- package/dist/features/blocks/client/componentInline/components/InlineBlockContainer.d.ts +5 -0
- package/dist/features/blocks/client/componentInline/components/InlineBlockContainer.d.ts.map +1 -0
- package/dist/features/blocks/client/componentInline/components/InlineBlockContainer.js +28 -0
- package/dist/features/blocks/client/componentInline/components/InlineBlockContainer.js.map +1 -0
- package/dist/features/blocks/client/componentInline/components/InlineBlockEditButton.d.ts +3 -0
- package/dist/features/blocks/client/componentInline/components/InlineBlockEditButton.d.ts.map +1 -0
- package/dist/features/blocks/client/componentInline/components/InlineBlockEditButton.js +22 -0
- package/dist/features/blocks/client/componentInline/components/InlineBlockEditButton.js.map +1 -0
- package/dist/features/blocks/client/componentInline/components/InlineBlockLabel.d.ts +3 -0
- package/dist/features/blocks/client/componentInline/components/InlineBlockLabel.d.ts.map +1 -0
- package/dist/features/blocks/client/componentInline/components/InlineBlockLabel.js +22 -0
- package/dist/features/blocks/client/componentInline/components/InlineBlockLabel.js.map +1 -0
- package/dist/features/blocks/client/componentInline/components/InlineBlockRemoveButton.d.ts +3 -0
- package/dist/features/blocks/client/componentInline/components/InlineBlockRemoveButton.d.ts.map +1 -0
- package/dist/features/blocks/client/componentInline/components/InlineBlockRemoveButton.js +22 -0
- package/dist/features/blocks/client/componentInline/components/InlineBlockRemoveButton.js.map +1 -0
- package/dist/features/blocks/client/componentInline/index.d.ts +29 -0
- package/dist/features/blocks/client/componentInline/index.d.ts.map +1 -0
- package/dist/features/blocks/client/componentInline/index.js +368 -0
- package/dist/features/blocks/client/componentInline/index.js.map +1 -0
- package/dist/features/blocks/client/getBlockImageComponent.d.ts +3 -0
- package/dist/features/blocks/client/getBlockImageComponent.d.ts.map +1 -0
- package/dist/features/blocks/client/getBlockImageComponent.js +18 -0
- package/dist/features/blocks/client/getBlockImageComponent.js.map +1 -0
- package/dist/features/blocks/client/index.d.ts +2 -0
- package/dist/features/blocks/client/index.d.ts.map +1 -0
- package/dist/features/blocks/client/index.js +162 -0
- package/dist/features/blocks/client/index.js.map +1 -0
- package/dist/features/blocks/client/markdown/getLexicalToMarkdown.d.ts +6 -0
- package/dist/features/blocks/client/markdown/getLexicalToMarkdown.d.ts.map +1 -0
- package/dist/features/blocks/client/markdown/getLexicalToMarkdown.js +23 -0
- package/dist/features/blocks/client/markdown/getLexicalToMarkdown.js.map +1 -0
- package/dist/features/blocks/client/markdown/getMarkdownToLexical.d.ts +6 -0
- package/dist/features/blocks/client/markdown/getMarkdownToLexical.d.ts.map +1 -0
- package/dist/features/blocks/client/markdown/getMarkdownToLexical.js +20 -0
- package/dist/features/blocks/client/markdown/getMarkdownToLexical.js.map +1 -0
- package/dist/features/blocks/client/markdown/markdownTransformer.d.ts +12 -0
- package/dist/features/blocks/client/markdown/markdownTransformer.d.ts.map +1 -0
- package/dist/features/blocks/client/markdown/markdownTransformer.js +348 -0
- package/dist/features/blocks/client/markdown/markdownTransformer.js.map +1 -0
- package/dist/features/blocks/client/nodes/BlocksNode.d.ts +14 -0
- package/dist/features/blocks/client/nodes/BlocksNode.d.ts.map +1 -0
- package/dist/features/blocks/client/nodes/BlocksNode.js +54 -0
- package/dist/features/blocks/client/nodes/BlocksNode.js.map +1 -0
- package/dist/features/blocks/client/nodes/InlineBlocksNode.d.ts +14 -0
- package/dist/features/blocks/client/nodes/InlineBlocksNode.d.ts.map +1 -0
- package/dist/features/blocks/client/nodes/InlineBlocksNode.js +45 -0
- package/dist/features/blocks/client/nodes/InlineBlocksNode.js.map +1 -0
- package/dist/features/blocks/client/plugin/commands.d.ts +5 -0
- package/dist/features/blocks/client/plugin/commands.d.ts.map +1 -0
- package/dist/features/blocks/client/plugin/commands.js +6 -0
- package/dist/features/blocks/client/plugin/commands.js.map +1 -0
- package/dist/features/blocks/client/plugin/index.d.ts +5 -0
- package/dist/features/blocks/client/plugin/index.d.ts.map +1 -0
- package/dist/features/blocks/client/plugin/index.js +102 -0
- package/dist/features/blocks/client/plugin/index.js.map +1 -0
- package/dist/features/blocks/premade/CodeBlock/Component/Block.d.ts +5 -0
- package/dist/features/blocks/premade/CodeBlock/Component/Block.d.ts.map +1 -0
- package/dist/features/blocks/premade/CodeBlock/Component/Block.js +114 -0
- package/dist/features/blocks/premade/CodeBlock/Component/Block.js.map +1 -0
- package/dist/features/blocks/premade/CodeBlock/Component/Code.d.ts +56 -0
- package/dist/features/blocks/premade/CodeBlock/Component/Code.d.ts.map +1 -0
- package/dist/features/blocks/premade/CodeBlock/Component/Code.js +100 -0
- package/dist/features/blocks/premade/CodeBlock/Component/Code.js.map +1 -0
- package/dist/features/blocks/premade/CodeBlock/Component/Collapse/index.d.ts +4 -0
- package/dist/features/blocks/premade/CodeBlock/Component/Collapse/index.d.ts.map +1 -0
- package/dist/features/blocks/premade/CodeBlock/Component/Collapse/index.js +17 -0
- package/dist/features/blocks/premade/CodeBlock/Component/Collapse/index.js.map +1 -0
- package/dist/features/blocks/premade/CodeBlock/Component/FloatingCollapse/index.d.ts +4 -0
- package/dist/features/blocks/premade/CodeBlock/Component/FloatingCollapse/index.d.ts.map +1 -0
- package/dist/features/blocks/premade/CodeBlock/Component/FloatingCollapse/index.js +26 -0
- package/dist/features/blocks/premade/CodeBlock/Component/FloatingCollapse/index.js.map +1 -0
- package/dist/features/blocks/premade/CodeBlock/Component/defaultLanguages.d.ts +5 -0
- package/dist/features/blocks/premade/CodeBlock/Component/defaultLanguages.d.ts.map +1 -0
- package/dist/features/blocks/premade/CodeBlock/Component/defaultLanguages.js +87 -0
- package/dist/features/blocks/premade/CodeBlock/Component/defaultLanguages.js.map +1 -0
- package/dist/features/blocks/premade/CodeBlock/converter.d.ts +7 -0
- package/dist/features/blocks/premade/CodeBlock/converter.d.ts.map +1 -0
- package/dist/features/blocks/premade/CodeBlock/converter.js +46 -0
- package/dist/features/blocks/premade/CodeBlock/converter.js.map +1 -0
- package/dist/features/blocks/premade/CodeBlock/converterClient.d.ts +2 -0
- package/dist/features/blocks/premade/CodeBlock/converterClient.d.ts.map +1 -0
- package/dist/features/blocks/premade/CodeBlock/converterClient.js +4 -0
- package/dist/features/blocks/premade/CodeBlock/converterClient.js.map +1 -0
- package/dist/features/blocks/premade/CodeBlock/index.d.ts +9 -0
- package/dist/features/blocks/premade/CodeBlock/index.d.ts.map +1 -0
- package/dist/features/blocks/premade/CodeBlock/index.js +55 -0
- package/dist/features/blocks/premade/CodeBlock/index.js.map +1 -0
- package/dist/features/blocks/server/graphQLPopulationPromise.d.ts +6 -0
- package/dist/features/blocks/server/graphQLPopulationPromise.d.ts.map +1 -0
- package/dist/features/blocks/server/graphQLPopulationPromise.js +47 -0
- package/dist/features/blocks/server/graphQLPopulationPromise.js.map +1 -0
- package/dist/features/blocks/server/i18n.d.ts +3 -0
- package/dist/features/blocks/server/i18n.d.ts.map +1 -0
- package/dist/features/blocks/server/i18n.js +336 -0
- package/dist/features/blocks/server/i18n.js.map +1 -0
- package/dist/features/blocks/server/index.d.ts +39 -0
- package/dist/features/blocks/server/index.d.ts.map +1 -0
- package/dist/features/blocks/server/index.js +237 -0
- package/dist/features/blocks/server/index.js.map +1 -0
- package/dist/features/blocks/server/markdown/linesFromMatchToContentAndPropsString.d.ts +22 -0
- package/dist/features/blocks/server/markdown/linesFromMatchToContentAndPropsString.d.ts.map +1 -0
- package/dist/features/blocks/server/markdown/linesFromMatchToContentAndPropsString.js +131 -0
- package/dist/features/blocks/server/markdown/linesFromMatchToContentAndPropsString.js.map +1 -0
- package/dist/features/blocks/server/markdown/markdownTransformer.d.ts +15 -0
- package/dist/features/blocks/server/markdown/markdownTransformer.d.ts.map +1 -0
- package/dist/features/blocks/server/markdown/markdownTransformer.js +368 -0
- package/dist/features/blocks/server/markdown/markdownTransformer.js.map +1 -0
- package/dist/features/blocks/server/nodes/BlocksNode.d.ts +47 -0
- package/dist/features/blocks/server/nodes/BlocksNode.d.ts.map +1 -0
- package/dist/features/blocks/server/nodes/BlocksNode.js +102 -0
- package/dist/features/blocks/server/nodes/BlocksNode.js.map +1 -0
- package/dist/features/blocks/server/nodes/InlineBlocksNode.d.ts +41 -0
- package/dist/features/blocks/server/nodes/InlineBlocksNode.d.ts.map +1 -0
- package/dist/features/blocks/server/nodes/InlineBlocksNode.js +97 -0
- package/dist/features/blocks/server/nodes/InlineBlocksNode.js.map +1 -0
- package/dist/features/blocks/server/validate.d.ts +11 -0
- package/dist/features/blocks/server/validate.d.ts.map +1 -0
- package/dist/features/blocks/server/validate.js +63 -0
- package/dist/features/blocks/server/validate.js.map +1 -0
- package/dist/features/converters/htmlToLexical/index.d.ts +13 -0
- package/dist/features/converters/htmlToLexical/index.d.ts.map +1 -0
- package/dist/features/converters/htmlToLexical/index.js +30 -0
- package/dist/features/converters/htmlToLexical/index.js.map +1 -0
- package/dist/features/converters/lexicalToHtml/async/converters/blockquote.d.ts +4 -0
- package/dist/features/converters/lexicalToHtml/async/converters/blockquote.d.ts.map +1 -0
- package/dist/features/converters/lexicalToHtml/async/converters/blockquote.js +13 -0
- package/dist/features/converters/lexicalToHtml/async/converters/blockquote.js.map +1 -0
- package/dist/features/converters/lexicalToHtml/async/converters/heading.d.ts +4 -0
- package/dist/features/converters/lexicalToHtml/async/converters/heading.d.ts.map +1 -0
- package/dist/features/converters/lexicalToHtml/async/converters/heading.js +13 -0
- package/dist/features/converters/lexicalToHtml/async/converters/heading.js.map +1 -0
- package/dist/features/converters/lexicalToHtml/async/converters/horizontalRule.d.ts +4 -0
- package/dist/features/converters/lexicalToHtml/async/converters/horizontalRule.d.ts.map +1 -0
- package/dist/features/converters/lexicalToHtml/async/converters/horizontalRule.js +4 -0
- package/dist/features/converters/lexicalToHtml/async/converters/horizontalRule.js.map +1 -0
- package/dist/features/converters/lexicalToHtml/async/converters/linebreak.d.ts +4 -0
- package/dist/features/converters/lexicalToHtml/async/converters/linebreak.d.ts.map +1 -0
- package/dist/features/converters/lexicalToHtml/async/converters/linebreak.js +4 -0
- package/dist/features/converters/lexicalToHtml/async/converters/linebreak.js.map +1 -0
- package/dist/features/converters/lexicalToHtml/async/converters/link.d.ts +9 -0
- package/dist/features/converters/lexicalToHtml/async/converters/link.d.ts.map +1 -0
- package/dist/features/converters/lexicalToHtml/async/converters/link.js +38 -0
- package/dist/features/converters/lexicalToHtml/async/converters/link.js.map +1 -0
- package/dist/features/converters/lexicalToHtml/async/converters/list.d.ts +4 -0
- package/dist/features/converters/lexicalToHtml/async/converters/list.d.ts.map +1 -0
- package/dist/features/converters/lexicalToHtml/async/converters/list.js +46 -0
- package/dist/features/converters/lexicalToHtml/async/converters/list.js.map +1 -0
- package/dist/features/converters/lexicalToHtml/async/converters/paragraph.d.ts +4 -0
- package/dist/features/converters/lexicalToHtml/async/converters/paragraph.d.ts.map +1 -0
- package/dist/features/converters/lexicalToHtml/async/converters/paragraph.js +16 -0
- package/dist/features/converters/lexicalToHtml/async/converters/paragraph.js.map +1 -0
- package/dist/features/converters/lexicalToHtml/async/converters/tab.d.ts +4 -0
- package/dist/features/converters/lexicalToHtml/async/converters/tab.d.ts.map +1 -0
- package/dist/features/converters/lexicalToHtml/async/converters/tab.js +4 -0
- package/dist/features/converters/lexicalToHtml/async/converters/tab.js.map +1 -0
- package/dist/features/converters/lexicalToHtml/async/converters/table.d.ts +4 -0
- package/dist/features/converters/lexicalToHtml/async/converters/table.d.ts.map +1 -0
- package/dist/features/converters/lexicalToHtml/async/converters/table.js +55 -0
- package/dist/features/converters/lexicalToHtml/async/converters/table.js.map +1 -0
- package/dist/features/converters/lexicalToHtml/async/converters/text.d.ts +4 -0
- package/dist/features/converters/lexicalToHtml/async/converters/text.d.ts.map +1 -0
- package/dist/features/converters/lexicalToHtml/async/converters/text.js +31 -0
- package/dist/features/converters/lexicalToHtml/async/converters/text.js.map +1 -0
- package/dist/features/converters/lexicalToHtml/async/converters/upload.d.ts +4 -0
- package/dist/features/converters/lexicalToHtml/async/converters/upload.d.ts.map +1 -0
- package/dist/features/converters/lexicalToHtml/async/converters/upload.js +67 -0
- package/dist/features/converters/lexicalToHtml/async/converters/upload.js.map +1 -0
- package/dist/features/converters/lexicalToHtml/async/defaultConverters.d.ts +4 -0
- package/dist/features/converters/lexicalToHtml/async/defaultConverters.d.ts.map +1 -0
- package/dist/features/converters/lexicalToHtml/async/defaultConverters.js +25 -0
- package/dist/features/converters/lexicalToHtml/async/defaultConverters.js.map +1 -0
- package/dist/features/converters/lexicalToHtml/async/field/index.d.ts +33 -0
- package/dist/features/converters/lexicalToHtml/async/field/index.d.ts.map +1 -0
- package/dist/features/converters/lexicalToHtml/async/field/index.js +67 -0
- package/dist/features/converters/lexicalToHtml/async/field/index.js.map +1 -0
- package/dist/features/converters/lexicalToHtml/async/index.d.ts +34 -0
- package/dist/features/converters/lexicalToHtml/async/index.d.ts.map +1 -0
- package/dist/features/converters/lexicalToHtml/async/index.js +107 -0
- package/dist/features/converters/lexicalToHtml/async/index.js.map +1 -0
- package/dist/features/converters/lexicalToHtml/async/types.d.ts +83 -0
- package/dist/features/converters/lexicalToHtml/async/types.d.ts.map +1 -0
- package/dist/features/converters/lexicalToHtml/async/types.js +2 -0
- package/dist/features/converters/lexicalToHtml/async/types.js.map +1 -0
- package/dist/features/converters/lexicalToHtml/shared/findConverterForNode.d.ts +15 -0
- package/dist/features/converters/lexicalToHtml/shared/findConverterForNode.d.ts.map +1 -0
- package/dist/features/converters/lexicalToHtml/shared/findConverterForNode.js +68 -0
- package/dist/features/converters/lexicalToHtml/shared/findConverterForNode.js.map +1 -0
- package/dist/features/converters/lexicalToHtml/shared/types.d.ts +9 -0
- package/dist/features/converters/lexicalToHtml/shared/types.d.ts.map +1 -0
- package/dist/features/converters/lexicalToHtml/shared/types.js +2 -0
- package/dist/features/converters/lexicalToHtml/shared/types.js.map +1 -0
- package/dist/features/converters/lexicalToHtml/sync/converters/blockquote.d.ts +4 -0
- package/dist/features/converters/lexicalToHtml/sync/converters/blockquote.d.ts.map +1 -0
- package/dist/features/converters/lexicalToHtml/sync/converters/blockquote.js +13 -0
- package/dist/features/converters/lexicalToHtml/sync/converters/blockquote.js.map +1 -0
- package/dist/features/converters/lexicalToHtml/sync/converters/heading.d.ts +4 -0
- package/dist/features/converters/lexicalToHtml/sync/converters/heading.d.ts.map +1 -0
- package/dist/features/converters/lexicalToHtml/sync/converters/heading.js +13 -0
- package/dist/features/converters/lexicalToHtml/sync/converters/heading.js.map +1 -0
- package/dist/features/converters/lexicalToHtml/sync/converters/horizontalRule.d.ts +4 -0
- package/dist/features/converters/lexicalToHtml/sync/converters/horizontalRule.d.ts.map +1 -0
- package/dist/features/converters/lexicalToHtml/sync/converters/horizontalRule.js +4 -0
- package/dist/features/converters/lexicalToHtml/sync/converters/horizontalRule.js.map +1 -0
- package/dist/features/converters/lexicalToHtml/sync/converters/linebreak.d.ts +4 -0
- package/dist/features/converters/lexicalToHtml/sync/converters/linebreak.d.ts.map +1 -0
- package/dist/features/converters/lexicalToHtml/sync/converters/linebreak.js +4 -0
- package/dist/features/converters/lexicalToHtml/sync/converters/linebreak.js.map +1 -0
- package/dist/features/converters/lexicalToHtml/sync/converters/link.d.ts +8 -0
- package/dist/features/converters/lexicalToHtml/sync/converters/link.d.ts.map +1 -0
- package/dist/features/converters/lexicalToHtml/sync/converters/link.js +36 -0
- package/dist/features/converters/lexicalToHtml/sync/converters/link.js.map +1 -0
- package/dist/features/converters/lexicalToHtml/sync/converters/list.d.ts +4 -0
- package/dist/features/converters/lexicalToHtml/sync/converters/list.d.ts.map +1 -0
- package/dist/features/converters/lexicalToHtml/sync/converters/list.js +46 -0
- package/dist/features/converters/lexicalToHtml/sync/converters/list.js.map +1 -0
- package/dist/features/converters/lexicalToHtml/sync/converters/paragraph.d.ts +4 -0
- package/dist/features/converters/lexicalToHtml/sync/converters/paragraph.d.ts.map +1 -0
- package/dist/features/converters/lexicalToHtml/sync/converters/paragraph.js +16 -0
- package/dist/features/converters/lexicalToHtml/sync/converters/paragraph.js.map +1 -0
- package/dist/features/converters/lexicalToHtml/sync/converters/tab.d.ts +4 -0
- package/dist/features/converters/lexicalToHtml/sync/converters/tab.d.ts.map +1 -0
- package/dist/features/converters/lexicalToHtml/sync/converters/tab.js +4 -0
- package/dist/features/converters/lexicalToHtml/sync/converters/tab.js.map +1 -0
- package/dist/features/converters/lexicalToHtml/sync/converters/table.d.ts +4 -0
- package/dist/features/converters/lexicalToHtml/sync/converters/table.d.ts.map +1 -0
- package/dist/features/converters/lexicalToHtml/sync/converters/table.js +55 -0
- package/dist/features/converters/lexicalToHtml/sync/converters/table.js.map +1 -0
- package/dist/features/converters/lexicalToHtml/sync/converters/text.d.ts +4 -0
- package/dist/features/converters/lexicalToHtml/sync/converters/text.d.ts.map +1 -0
- package/dist/features/converters/lexicalToHtml/sync/converters/text.js +31 -0
- package/dist/features/converters/lexicalToHtml/sync/converters/text.js.map +1 -0
- package/dist/features/converters/lexicalToHtml/sync/converters/upload.d.ts +4 -0
- package/dist/features/converters/lexicalToHtml/sync/converters/upload.d.ts.map +1 -0
- package/dist/features/converters/lexicalToHtml/sync/converters/upload.js +60 -0
- package/dist/features/converters/lexicalToHtml/sync/converters/upload.js.map +1 -0
- package/dist/features/converters/lexicalToHtml/sync/defaultConverters.d.ts +4 -0
- package/dist/features/converters/lexicalToHtml/sync/defaultConverters.d.ts.map +1 -0
- package/dist/features/converters/lexicalToHtml/sync/defaultConverters.js +25 -0
- package/dist/features/converters/lexicalToHtml/sync/defaultConverters.js.map +1 -0
- package/dist/features/converters/lexicalToHtml/sync/index.d.ts +32 -0
- package/dist/features/converters/lexicalToHtml/sync/index.d.ts.map +1 -0
- package/dist/features/converters/lexicalToHtml/sync/index.js +102 -0
- package/dist/features/converters/lexicalToHtml/sync/index.js.map +1 -0
- package/dist/features/converters/lexicalToHtml/sync/types.d.ts +75 -0
- package/dist/features/converters/lexicalToHtml/sync/types.d.ts.map +1 -0
- package/dist/features/converters/lexicalToHtml/sync/types.js +2 -0
- package/dist/features/converters/lexicalToHtml/sync/types.js.map +1 -0
- package/dist/features/converters/lexicalToHtml_deprecated/converter/converters/linebreak.d.ts +4 -0
- package/dist/features/converters/lexicalToHtml_deprecated/converter/converters/linebreak.d.ts.map +1 -0
- package/dist/features/converters/lexicalToHtml_deprecated/converter/converters/linebreak.js +7 -0
- package/dist/features/converters/lexicalToHtml_deprecated/converter/converters/linebreak.js.map +1 -0
- package/dist/features/converters/lexicalToHtml_deprecated/converter/converters/paragraph.d.ts +4 -0
- package/dist/features/converters/lexicalToHtml_deprecated/converter/converters/paragraph.d.ts.map +1 -0
- package/dist/features/converters/lexicalToHtml_deprecated/converter/converters/paragraph.js +38 -0
- package/dist/features/converters/lexicalToHtml_deprecated/converter/converters/paragraph.js.map +1 -0
- package/dist/features/converters/lexicalToHtml_deprecated/converter/converters/tab.d.ts +4 -0
- package/dist/features/converters/lexicalToHtml_deprecated/converter/converters/tab.d.ts.map +1 -0
- package/dist/features/converters/lexicalToHtml_deprecated/converter/converters/tab.js +9 -0
- package/dist/features/converters/lexicalToHtml_deprecated/converter/converters/tab.js.map +1 -0
- package/dist/features/converters/lexicalToHtml_deprecated/converter/converters/text.d.ts +4 -0
- package/dist/features/converters/lexicalToHtml_deprecated/converter/converters/text.d.ts.map +1 -0
- package/dist/features/converters/lexicalToHtml_deprecated/converter/converters/text.js +33 -0
- package/dist/features/converters/lexicalToHtml_deprecated/converter/converters/text.js.map +1 -0
- package/dist/features/converters/lexicalToHtml_deprecated/converter/defaultConverters.d.ts +6 -0
- package/dist/features/converters/lexicalToHtml_deprecated/converter/defaultConverters.d.ts.map +1 -0
- package/dist/features/converters/lexicalToHtml_deprecated/converter/defaultConverters.js +9 -0
- package/dist/features/converters/lexicalToHtml_deprecated/converter/defaultConverters.js.map +1 -0
- package/dist/features/converters/lexicalToHtml_deprecated/converter/index.d.ts +70 -0
- package/dist/features/converters/lexicalToHtml_deprecated/converter/index.d.ts.map +1 -0
- package/dist/features/converters/lexicalToHtml_deprecated/converter/index.js +104 -0
- package/dist/features/converters/lexicalToHtml_deprecated/converter/index.js.map +1 -0
- package/dist/features/converters/lexicalToHtml_deprecated/converter/types.d.ts +27 -0
- package/dist/features/converters/lexicalToHtml_deprecated/converter/types.d.ts.map +1 -0
- package/dist/features/converters/lexicalToHtml_deprecated/converter/types.js +2 -0
- package/dist/features/converters/lexicalToHtml_deprecated/converter/types.js.map +1 -0
- package/dist/features/converters/lexicalToHtml_deprecated/field/index.d.ts +39 -0
- package/dist/features/converters/lexicalToHtml_deprecated/field/index.d.ts.map +1 -0
- package/dist/features/converters/lexicalToHtml_deprecated/field/index.js +122 -0
- package/dist/features/converters/lexicalToHtml_deprecated/field/index.js.map +1 -0
- package/dist/features/converters/lexicalToHtml_deprecated/index.d.ts +12 -0
- package/dist/features/converters/lexicalToHtml_deprecated/index.d.ts.map +1 -0
- package/dist/features/converters/lexicalToHtml_deprecated/index.js +11 -0
- package/dist/features/converters/lexicalToHtml_deprecated/index.js.map +1 -0
- package/dist/features/converters/lexicalToJSX/Component/index.d.ts +43 -0
- package/dist/features/converters/lexicalToJSX/Component/index.d.ts.map +1 -0
- package/dist/features/converters/lexicalToJSX/Component/index.js +44 -0
- package/dist/features/converters/lexicalToJSX/Component/index.js.map +1 -0
- package/dist/features/converters/lexicalToJSX/converter/converters/blockquote.d.ts +4 -0
- package/dist/features/converters/lexicalToJSX/converter/converters/blockquote.d.ts.map +1 -0
- package/dist/features/converters/lexicalToJSX/converter/converters/blockquote.js +15 -0
- package/dist/features/converters/lexicalToJSX/converter/converters/blockquote.js.map +1 -0
- package/dist/features/converters/lexicalToJSX/converter/converters/heading.d.ts +4 -0
- package/dist/features/converters/lexicalToJSX/converter/converters/heading.d.ts.map +1 -0
- package/dist/features/converters/lexicalToJSX/converter/converters/heading.js +16 -0
- package/dist/features/converters/lexicalToJSX/converter/converters/heading.js.map +1 -0
- package/dist/features/converters/lexicalToJSX/converter/converters/horizontalRule.d.ts +4 -0
- package/dist/features/converters/lexicalToJSX/converter/converters/horizontalRule.d.ts.map +1 -0
- package/dist/features/converters/lexicalToJSX/converter/converters/horizontalRule.js +5 -0
- package/dist/features/converters/lexicalToJSX/converter/converters/horizontalRule.js.map +1 -0
- package/dist/features/converters/lexicalToJSX/converter/converters/linebreak.d.ts +4 -0
- package/dist/features/converters/lexicalToJSX/converter/converters/linebreak.d.ts.map +1 -0
- package/dist/features/converters/lexicalToJSX/converter/converters/linebreak.js +5 -0
- package/dist/features/converters/lexicalToJSX/converter/converters/linebreak.js.map +1 -0
- package/dist/features/converters/lexicalToJSX/converter/converters/link.d.ts +8 -0
- package/dist/features/converters/lexicalToJSX/converter/converters/link.d.ts.map +1 -0
- package/dist/features/converters/lexicalToJSX/converter/converters/link.js +49 -0
- package/dist/features/converters/lexicalToJSX/converter/converters/link.js.map +1 -0
- package/dist/features/converters/lexicalToJSX/converter/converters/list.d.ts +4 -0
- package/dist/features/converters/lexicalToJSX/converter/converters/list.d.ts.map +1 -0
- package/dist/features/converters/lexicalToJSX/converter/converters/list.js +62 -0
- package/dist/features/converters/lexicalToJSX/converter/converters/list.js.map +1 -0
- package/dist/features/converters/lexicalToJSX/converter/converters/paragraph.d.ts +4 -0
- package/dist/features/converters/lexicalToJSX/converter/converters/paragraph.d.ts.map +1 -0
- package/dist/features/converters/lexicalToJSX/converter/converters/paragraph.js +20 -0
- package/dist/features/converters/lexicalToJSX/converter/converters/paragraph.js.map +1 -0
- package/dist/features/converters/lexicalToJSX/converter/converters/tab.d.ts +4 -0
- package/dist/features/converters/lexicalToJSX/converter/converters/tab.d.ts.map +1 -0
- package/dist/features/converters/lexicalToJSX/converter/converters/tab.js +4 -0
- package/dist/features/converters/lexicalToJSX/converter/converters/tab.js.map +1 -0
- package/dist/features/converters/lexicalToJSX/converter/converters/table.d.ts +4 -0
- package/dist/features/converters/lexicalToJSX/converter/converters/table.d.ts.map +1 -0
- package/dist/features/converters/lexicalToJSX/converter/converters/table.js +62 -0
- package/dist/features/converters/lexicalToJSX/converter/converters/table.js.map +1 -0
- package/dist/features/converters/lexicalToJSX/converter/converters/text.d.ts +4 -0
- package/dist/features/converters/lexicalToJSX/converter/converters/text.d.ts.map +1 -0
- package/dist/features/converters/lexicalToJSX/converter/converters/text.js +53 -0
- package/dist/features/converters/lexicalToJSX/converter/converters/text.js.map +1 -0
- package/dist/features/converters/lexicalToJSX/converter/converters/upload.d.ts +4 -0
- package/dist/features/converters/lexicalToJSX/converter/converters/upload.d.ts.map +1 -0
- package/dist/features/converters/lexicalToJSX/converter/converters/upload.js +65 -0
- package/dist/features/converters/lexicalToJSX/converter/converters/upload.js.map +1 -0
- package/dist/features/converters/lexicalToJSX/converter/defaultConverters.d.ts +4 -0
- package/dist/features/converters/lexicalToJSX/converter/defaultConverters.d.ts.map +1 -0
- package/dist/features/converters/lexicalToJSX/converter/defaultConverters.js +25 -0
- package/dist/features/converters/lexicalToJSX/converter/defaultConverters.js.map +1 -0
- package/dist/features/converters/lexicalToJSX/converter/index.d.ts +18 -0
- package/dist/features/converters/lexicalToJSX/converter/index.d.ts.map +1 -0
- package/dist/features/converters/lexicalToJSX/converter/index.js +134 -0
- package/dist/features/converters/lexicalToJSX/converter/index.js.map +1 -0
- package/dist/features/converters/lexicalToJSX/converter/types.d.ts +64 -0
- package/dist/features/converters/lexicalToJSX/converter/types.d.ts.map +1 -0
- package/dist/features/converters/lexicalToJSX/converter/types.js +2 -0
- package/dist/features/converters/lexicalToJSX/converter/types.js.map +1 -0
- package/dist/features/converters/lexicalToMarkdown/index.d.ts +7 -0
- package/dist/features/converters/lexicalToMarkdown/index.d.ts.map +1 -0
- package/dist/features/converters/lexicalToMarkdown/index.js +24 -0
- package/dist/features/converters/lexicalToMarkdown/index.js.map +1 -0
- package/dist/features/converters/lexicalToPlaintext/convertLexicalToPlaintext.spec.js +180 -0
- package/dist/features/converters/lexicalToPlaintext/convertLexicalToPlaintext.spec.js.map +1 -0
- package/dist/features/converters/lexicalToPlaintext/shared/findConverterForNode.d.ts +7 -0
- package/dist/features/converters/lexicalToPlaintext/shared/findConverterForNode.d.ts.map +1 -0
- package/dist/features/converters/lexicalToPlaintext/shared/findConverterForNode.js +15 -0
- package/dist/features/converters/lexicalToPlaintext/shared/findConverterForNode.js.map +1 -0
- package/dist/features/converters/lexicalToPlaintext/shared/types.d.ts +5 -0
- package/dist/features/converters/lexicalToPlaintext/shared/types.d.ts.map +1 -0
- package/dist/features/converters/lexicalToPlaintext/shared/types.js +2 -0
- package/dist/features/converters/lexicalToPlaintext/shared/types.js.map +1 -0
- package/dist/features/converters/lexicalToPlaintext/sync/index.d.ts +22 -0
- package/dist/features/converters/lexicalToPlaintext/sync/index.d.ts.map +1 -0
- package/dist/features/converters/lexicalToPlaintext/sync/index.js +88 -0
- package/dist/features/converters/lexicalToPlaintext/sync/index.js.map +1 -0
- package/dist/features/converters/lexicalToPlaintext/sync/types.d.ts +60 -0
- package/dist/features/converters/lexicalToPlaintext/sync/types.d.ts.map +1 -0
- package/dist/features/converters/lexicalToPlaintext/sync/types.js +2 -0
- package/dist/features/converters/lexicalToPlaintext/sync/types.js.map +1 -0
- package/dist/features/converters/markdownToLexical/index.d.ts +8 -0
- package/dist/features/converters/markdownToLexical/index.d.ts.map +1 -0
- package/dist/features/converters/markdownToLexical/index.js +21 -0
- package/dist/features/converters/markdownToLexical/index.js.map +1 -0
- package/dist/features/converters/utilities/payloadPopulateFn.d.ts +31 -0
- package/dist/features/converters/utilities/payloadPopulateFn.d.ts.map +1 -0
- package/dist/features/converters/utilities/payloadPopulateFn.js +42 -0
- package/dist/features/converters/utilities/payloadPopulateFn.js.map +1 -0
- package/dist/features/converters/utilities/restPopulateFn.d.ts +11 -0
- package/dist/features/converters/utilities/restPopulateFn.d.ts.map +1 -0
- package/dist/features/converters/utilities/restPopulateFn.js +33 -0
- package/dist/features/converters/utilities/restPopulateFn.js.map +1 -0
- package/dist/features/debug/jsxConverter/client/index.d.ts +2 -0
- package/dist/features/debug/jsxConverter/client/index.d.ts.map +1 -0
- package/dist/features/debug/jsxConverter/client/index.js +11 -0
- package/dist/features/debug/jsxConverter/client/index.js.map +1 -0
- package/dist/features/debug/jsxConverter/client/plugin/index.d.ts +3 -0
- package/dist/features/debug/jsxConverter/client/plugin/index.d.ts.map +1 -0
- package/dist/features/debug/jsxConverter/client/plugin/index.js +55 -0
- package/dist/features/debug/jsxConverter/client/plugin/index.js.map +1 -0
- package/dist/features/debug/jsxConverter/server/index.d.ts +2 -0
- package/dist/features/debug/jsxConverter/server/index.d.ts.map +1 -0
- package/dist/features/debug/jsxConverter/server/index.js +8 -0
- package/dist/features/debug/jsxConverter/server/index.js.map +1 -0
- package/dist/features/debug/testRecorder/client/index.d.ts +2 -0
- package/dist/features/debug/testRecorder/client/index.d.ts.map +1 -0
- package/dist/features/debug/testRecorder/client/index.js +11 -0
- package/dist/features/debug/testRecorder/client/index.js.map +1 -0
- package/dist/features/debug/testRecorder/client/plugin/index.d.ts +5 -0
- package/dist/features/debug/testRecorder/client/plugin/index.d.ts.map +1 -0
- package/dist/features/debug/testRecorder/client/plugin/index.js +422 -0
- package/dist/features/debug/testRecorder/client/plugin/index.js.map +1 -0
- package/dist/features/debug/testRecorder/server/index.d.ts +2 -0
- package/dist/features/debug/testRecorder/server/index.d.ts.map +1 -0
- package/dist/features/debug/testRecorder/server/index.js +8 -0
- package/dist/features/debug/testRecorder/server/index.js.map +1 -0
- package/dist/features/debug/treeView/client/index.d.ts +2 -0
- package/dist/features/debug/treeView/client/index.d.ts.map +1 -0
- package/dist/features/debug/treeView/client/index.js +11 -0
- package/dist/features/debug/treeView/client/index.js.map +1 -0
- package/dist/features/debug/treeView/client/plugin/index.d.ts +4 -0
- package/dist/features/debug/treeView/client/plugin/index.d.ts.map +1 -0
- package/dist/features/debug/treeView/client/plugin/index.js +29 -0
- package/dist/features/debug/treeView/client/plugin/index.js.map +1 -0
- package/dist/features/debug/treeView/server/index.d.ts +2 -0
- package/dist/features/debug/treeView/server/index.d.ts.map +1 -0
- package/dist/features/debug/treeView/server/index.js +8 -0
- package/dist/features/debug/treeView/server/index.js.map +1 -0
- package/dist/features/experimental_table/client/index.d.ts +2 -0
- package/dist/features/experimental_table/client/index.d.ts.map +1 -0
- package/dist/features/experimental_table/client/index.js +56 -0
- package/dist/features/experimental_table/client/index.js.map +1 -0
- package/dist/features/experimental_table/client/plugins/TableActionMenuPlugin/index.d.ts +4 -0
- package/dist/features/experimental_table/client/plugins/TableActionMenuPlugin/index.d.ts.map +1 -0
- package/dist/features/experimental_table/client/plugins/TableActionMenuPlugin/index.js +546 -0
- package/dist/features/experimental_table/client/plugins/TableActionMenuPlugin/index.js.map +1 -0
- package/dist/features/experimental_table/client/plugins/TableCellResizerPlugin/index.d.ts +4 -0
- package/dist/features/experimental_table/client/plugins/TableCellResizerPlugin/index.d.ts.map +1 -0
- package/dist/features/experimental_table/client/plugins/TableCellResizerPlugin/index.js +344 -0
- package/dist/features/experimental_table/client/plugins/TableCellResizerPlugin/index.js.map +1 -0
- package/dist/features/experimental_table/client/plugins/TableHoverActionsPlugin/index.d.ts +5 -0
- package/dist/features/experimental_table/client/plugins/TableHoverActionsPlugin/index.d.ts.map +1 -0
- package/dist/features/experimental_table/client/plugins/TableHoverActionsPlugin/index.js +247 -0
- package/dist/features/experimental_table/client/plugins/TableHoverActionsPlugin/index.js.map +1 -0
- package/dist/features/experimental_table/client/plugins/TablePlugin/index.d.ts +24 -0
- package/dist/features/experimental_table/client/plugins/TablePlugin/index.d.ts.map +1 -0
- package/dist/features/experimental_table/client/plugins/TablePlugin/index.js +152 -0
- package/dist/features/experimental_table/client/plugins/TablePlugin/index.js.map +1 -0
- package/dist/features/experimental_table/client/utils/debounce.d.ts +61 -0
- package/dist/features/experimental_table/client/utils/debounce.d.ts.map +1 -0
- package/dist/features/experimental_table/client/utils/debounce.js +224 -0
- package/dist/features/experimental_table/client/utils/debounce.js.map +1 -0
- package/dist/features/experimental_table/client/utils/useDebounce.d.ts +2 -0
- package/dist/features/experimental_table/client/utils/useDebounce.d.ts.map +1 -0
- package/dist/features/experimental_table/client/utils/useDebounce.js +46 -0
- package/dist/features/experimental_table/client/utils/useDebounce.js.map +1 -0
- package/dist/features/experimental_table/markdownTransformer.d.ts +5 -0
- package/dist/features/experimental_table/markdownTransformer.d.ts.map +1 -0
- package/dist/features/experimental_table/markdownTransformer.js +131 -0
- package/dist/features/experimental_table/markdownTransformer.js.map +1 -0
- package/dist/features/experimental_table/server/index.d.ts +8 -0
- package/dist/features/experimental_table/server/index.d.ts.map +1 -0
- package/dist/features/experimental_table/server/index.js +154 -0
- package/dist/features/experimental_table/server/index.js.map +1 -0
- package/dist/features/format/bold/feature.client.d.ts +2 -0
- package/dist/features/format/bold/feature.client.d.ts.map +1 -0
- package/dist/features/format/bold/feature.client.js +45 -0
- package/dist/features/format/bold/feature.client.js.map +1 -0
- package/dist/features/format/bold/feature.server.d.ts +2 -0
- package/dist/features/format/bold/feature.server.d.ts.map +1 -0
- package/dist/features/format/bold/feature.server.js +19 -0
- package/dist/features/format/bold/feature.server.js.map +1 -0
- package/dist/features/format/bold/markdownTransformers.d.ts +6 -0
- package/dist/features/format/bold/markdownTransformers.d.ts.map +1 -0
- package/dist/features/format/bold/markdownTransformers.js +23 -0
- package/dist/features/format/bold/markdownTransformers.js.map +1 -0
- package/dist/features/format/inlineCode/feature.client.d.ts +2 -0
- package/dist/features/format/inlineCode/feature.client.d.ts.map +1 -0
- package/dist/features/format/inlineCode/feature.client.js +37 -0
- package/dist/features/format/inlineCode/feature.client.js.map +1 -0
- package/dist/features/format/inlineCode/feature.server.d.ts +2 -0
- package/dist/features/format/inlineCode/feature.server.d.ts.map +1 -0
- package/dist/features/format/inlineCode/feature.server.js +10 -0
- package/dist/features/format/inlineCode/feature.server.js.map +1 -0
- package/dist/features/format/inlineCode/markdownTransformers.d.ts +3 -0
- package/dist/features/format/inlineCode/markdownTransformers.d.ts.map +1 -0
- package/dist/features/format/inlineCode/markdownTransformers.js +6 -0
- package/dist/features/format/inlineCode/markdownTransformers.js.map +1 -0
- package/dist/features/format/italic/feature.client.d.ts +2 -0
- package/dist/features/format/italic/feature.client.d.ts.map +1 -0
- package/dist/features/format/italic/feature.client.js +37 -0
- package/dist/features/format/italic/feature.client.js.map +1 -0
- package/dist/features/format/italic/feature.server.d.ts +2 -0
- package/dist/features/format/italic/feature.server.d.ts.map +1 -0
- package/dist/features/format/italic/feature.server.js +10 -0
- package/dist/features/format/italic/feature.server.js.map +1 -0
- package/dist/features/format/italic/markdownTransformers.d.ts +4 -0
- package/dist/features/format/italic/markdownTransformers.d.ts.map +1 -0
- package/dist/features/format/italic/markdownTransformers.js +12 -0
- package/dist/features/format/italic/markdownTransformers.js.map +1 -0
- package/dist/features/format/shared/toolbarFormatGroup.d.ts +3 -0
- package/dist/features/format/shared/toolbarFormatGroup.d.ts.map +1 -0
- package/dist/features/format/shared/toolbarFormatGroup.js +11 -0
- package/dist/features/format/shared/toolbarFormatGroup.js.map +1 -0
- package/dist/features/format/strikethrough/feature.client.d.ts +2 -0
- package/dist/features/format/strikethrough/feature.client.d.ts.map +1 -0
- package/dist/features/format/strikethrough/feature.client.js +37 -0
- package/dist/features/format/strikethrough/feature.client.js.map +1 -0
- package/dist/features/format/strikethrough/feature.server.d.ts +2 -0
- package/dist/features/format/strikethrough/feature.server.d.ts.map +1 -0
- package/dist/features/format/strikethrough/feature.server.js +10 -0
- package/dist/features/format/strikethrough/feature.server.js.map +1 -0
- package/dist/features/format/strikethrough/markdownTransformers.d.ts +3 -0
- package/dist/features/format/strikethrough/markdownTransformers.d.ts.map +1 -0
- package/dist/features/format/strikethrough/markdownTransformers.js +6 -0
- package/dist/features/format/strikethrough/markdownTransformers.js.map +1 -0
- package/dist/features/format/subscript/feature.client.d.ts +2 -0
- package/dist/features/format/subscript/feature.client.d.ts.map +1 -0
- package/dist/features/format/subscript/feature.client.js +35 -0
- package/dist/features/format/subscript/feature.client.js.map +1 -0
- package/dist/features/format/subscript/feature.server.d.ts +2 -0
- package/dist/features/format/subscript/feature.server.d.ts.map +1 -0
- package/dist/features/format/subscript/feature.server.js +8 -0
- package/dist/features/format/subscript/feature.server.js.map +1 -0
- package/dist/features/format/superscript/feature.client.d.ts +2 -0
- package/dist/features/format/superscript/feature.client.d.ts.map +1 -0
- package/dist/features/format/superscript/feature.client.js +35 -0
- package/dist/features/format/superscript/feature.client.js.map +1 -0
- package/dist/features/format/superscript/feature.server.d.ts +2 -0
- package/dist/features/format/superscript/feature.server.d.ts.map +1 -0
- package/dist/features/format/superscript/feature.server.js +8 -0
- package/dist/features/format/superscript/feature.server.js.map +1 -0
- package/dist/features/format/underline/feature.client.d.ts +2 -0
- package/dist/features/format/underline/feature.client.d.ts.map +1 -0
- package/dist/features/format/underline/feature.client.js +35 -0
- package/dist/features/format/underline/feature.client.js.map +1 -0
- package/dist/features/format/underline/feature.server.d.ts +2 -0
- package/dist/features/format/underline/feature.server.d.ts.map +1 -0
- package/dist/features/format/underline/feature.server.js +8 -0
- package/dist/features/format/underline/feature.server.js.map +1 -0
- package/dist/features/heading/client/index.d.ts +3 -0
- package/dist/features/heading/client/index.d.ts.map +1 -0
- package/dist/features/heading/client/index.js +168 -0
- package/dist/features/heading/client/index.js.map +1 -0
- package/dist/features/heading/markdownTransformer.d.ts +4 -0
- package/dist/features/heading/markdownTransformer.d.ts.map +1 -0
- package/dist/features/heading/markdownTransformer.js +26 -0
- package/dist/features/heading/markdownTransformer.js.map +1 -0
- package/dist/features/heading/server/i18n.d.ts +3 -0
- package/dist/features/heading/server/i18n.d.ts.map +1 -0
- package/dist/features/heading/server/i18n.js +114 -0
- package/dist/features/heading/server/i18n.js.map +1 -0
- package/dist/features/heading/server/index.d.ts +9 -0
- package/dist/features/heading/server/index.d.ts.map +1 -0
- package/dist/features/heading/server/index.js +69 -0
- package/dist/features/heading/server/index.js.map +1 -0
- package/dist/features/horizontalRule/client/index.d.ts +2 -0
- package/dist/features/horizontalRule/client/index.d.ts.map +1 -0
- package/dist/features/horizontalRule/client/index.js +62 -0
- package/dist/features/horizontalRule/client/index.js.map +1 -0
- package/dist/features/horizontalRule/client/markdownTransformer.d.ts +3 -0
- package/dist/features/horizontalRule/client/markdownTransformer.d.ts.map +1 -0
- package/dist/features/horizontalRule/client/markdownTransformer.js +20 -0
- package/dist/features/horizontalRule/client/markdownTransformer.js.map +1 -0
- package/dist/features/horizontalRule/client/nodes/HorizontalRuleNode.d.ts +19 -0
- package/dist/features/horizontalRule/client/nodes/HorizontalRuleNode.d.ts.map +1 -0
- package/dist/features/horizontalRule/client/nodes/HorizontalRuleNode.js +40 -0
- package/dist/features/horizontalRule/client/nodes/HorizontalRuleNode.js.map +1 -0
- package/dist/features/horizontalRule/client/plugin/index.d.ts +7 -0
- package/dist/features/horizontalRule/client/plugin/index.d.ts.map +1 -0
- package/dist/features/horizontalRule/client/plugin/index.js +43 -0
- package/dist/features/horizontalRule/client/plugin/index.js.map +1 -0
- package/dist/features/horizontalRule/server/i18n.d.ts +3 -0
- package/dist/features/horizontalRule/server/i18n.d.ts.map +1 -0
- package/dist/features/horizontalRule/server/i18n.js +114 -0
- package/dist/features/horizontalRule/server/i18n.js.map +1 -0
- package/dist/features/horizontalRule/server/index.d.ts +2 -0
- package/dist/features/horizontalRule/server/index.d.ts.map +1 -0
- package/dist/features/horizontalRule/server/index.js +25 -0
- package/dist/features/horizontalRule/server/index.js.map +1 -0
- package/dist/features/horizontalRule/server/markdownTransformer.d.ts +3 -0
- package/dist/features/horizontalRule/server/markdownTransformer.d.ts.map +1 -0
- package/dist/features/horizontalRule/server/markdownTransformer.js +20 -0
- package/dist/features/horizontalRule/server/markdownTransformer.js.map +1 -0
- package/dist/features/horizontalRule/server/nodes/HorizontalRuleNode.d.ts +51 -0
- package/dist/features/horizontalRule/server/nodes/HorizontalRuleNode.d.ts.map +1 -0
- package/dist/features/horizontalRule/server/nodes/HorizontalRuleNode.js +88 -0
- package/dist/features/horizontalRule/server/nodes/HorizontalRuleNode.js.map +1 -0
- package/dist/features/indent/client/IndentPlugin.d.ts +4 -0
- package/dist/features/indent/client/IndentPlugin.d.ts.map +1 -0
- package/dist/features/indent/client/IndentPlugin.js +91 -0
- package/dist/features/indent/client/IndentPlugin.js.map +1 -0
- package/dist/features/indent/client/index.d.ts +3 -0
- package/dist/features/indent/client/index.d.ts.map +1 -0
- package/dist/features/indent/client/index.js +88 -0
- package/dist/features/indent/client/index.js.map +1 -0
- package/dist/features/indent/client/toolbarIndentGroup.d.ts +3 -0
- package/dist/features/indent/client/toolbarIndentGroup.d.ts.map +1 -0
- package/dist/features/indent/client/toolbarIndentGroup.js +11 -0
- package/dist/features/indent/client/toolbarIndentGroup.js.map +1 -0
- package/dist/features/indent/server/i18n.d.ts +3 -0
- package/dist/features/indent/server/i18n.d.ts.map +1 -0
- package/dist/features/indent/server/i18n.js +151 -0
- package/dist/features/indent/server/i18n.js.map +1 -0
- package/dist/features/indent/server/index.d.ts +16 -0
- package/dist/features/indent/server/index.d.ts.map +1 -0
- package/dist/features/indent/server/index.js +15 -0
- package/dist/features/indent/server/index.js.map +1 -0
- package/dist/features/link/client/index.d.ts +8 -0
- package/dist/features/link/client/index.d.ts.map +1 -0
- package/dist/features/link/client/index.js +96 -0
- package/dist/features/link/client/index.js.map +1 -0
- package/dist/features/link/client/plugins/autoLink/index.d.ts +20 -0
- package/dist/features/link/client/plugins/autoLink/index.d.ts.map +1 -0
- package/dist/features/link/client/plugins/autoLink/index.js +338 -0
- package/dist/features/link/client/plugins/autoLink/index.js.map +1 -0
- package/dist/features/link/client/plugins/clickableLink/index.d.ts +4 -0
- package/dist/features/link/client/plugins/clickableLink/index.d.ts.map +1 -0
- package/dist/features/link/client/plugins/clickableLink/index.js +9 -0
- package/dist/features/link/client/plugins/clickableLink/index.js.map +1 -0
- package/dist/features/link/client/plugins/floatingLinkEditor/LinkEditor/commands.d.ts +4 -0
- package/dist/features/link/client/plugins/floatingLinkEditor/LinkEditor/commands.d.ts.map +1 -0
- package/dist/features/link/client/plugins/floatingLinkEditor/LinkEditor/commands.js +5 -0
- package/dist/features/link/client/plugins/floatingLinkEditor/LinkEditor/commands.js.map +1 -0
- package/dist/features/link/client/plugins/floatingLinkEditor/LinkEditor/index.d.ts +5 -0
- package/dist/features/link/client/plugins/floatingLinkEditor/LinkEditor/index.d.ts.map +1 -0
- package/dist/features/link/client/plugins/floatingLinkEditor/LinkEditor/index.js +327 -0
- package/dist/features/link/client/plugins/floatingLinkEditor/LinkEditor/index.js.map +1 -0
- package/dist/features/link/client/plugins/floatingLinkEditor/index.d.ts +5 -0
- package/dist/features/link/client/plugins/floatingLinkEditor/index.d.ts.map +1 -0
- package/dist/features/link/client/plugins/floatingLinkEditor/index.js +15 -0
- package/dist/features/link/client/plugins/floatingLinkEditor/index.js.map +1 -0
- package/dist/features/link/client/plugins/floatingLinkEditor/types.d.ts +18 -0
- package/dist/features/link/client/plugins/floatingLinkEditor/types.d.ts.map +1 -0
- package/dist/features/link/client/plugins/floatingLinkEditor/types.js +5 -0
- package/dist/features/link/client/plugins/floatingLinkEditor/types.js.map +1 -0
- package/dist/features/link/client/plugins/link/index.d.ts +4 -0
- package/dist/features/link/client/plugins/link/index.d.ts.map +1 -0
- package/dist/features/link/client/plugins/link/index.js +78 -0
- package/dist/features/link/client/plugins/link/index.js.map +1 -0
- package/dist/features/link/markdownTransformer.d.ts +6 -0
- package/dist/features/link/markdownTransformer.d.ts.map +1 -0
- package/dist/features/link/markdownTransformer.js +44 -0
- package/dist/features/link/markdownTransformer.js.map +1 -0
- package/dist/features/link/nodes/AutoLinkNode.d.ts +17 -0
- package/dist/features/link/nodes/AutoLinkNode.d.ts.map +1 -0
- package/dist/features/link/nodes/AutoLinkNode.js +70 -0
- package/dist/features/link/nodes/AutoLinkNode.js.map +1 -0
- package/dist/features/link/nodes/LinkNode.d.ts +43 -0
- package/dist/features/link/nodes/LinkNode.d.ts.map +1 -0
- package/dist/features/link/nodes/LinkNode.js +331 -0
- package/dist/features/link/nodes/LinkNode.js.map +1 -0
- package/dist/features/link/nodes/types.d.ts +27 -0
- package/dist/features/link/nodes/types.d.ts.map +1 -0
- package/dist/features/link/nodes/types.js +2 -0
- package/dist/features/link/nodes/types.js.map +1 -0
- package/dist/features/link/server/baseFields.d.ts +3 -0
- package/dist/features/link/server/baseFields.d.ts.map +1 -0
- package/dist/features/link/server/baseFields.js +147 -0
- package/dist/features/link/server/baseFields.js.map +1 -0
- package/dist/features/link/server/graphQLPopulationPromise.d.ts +5 -0
- package/dist/features/link/server/graphQLPopulationPromise.d.ts.map +1 -0
- package/dist/features/link/server/graphQLPopulationPromise.js +48 -0
- package/dist/features/link/server/graphQLPopulationPromise.js.map +1 -0
- package/dist/features/link/server/i18n.d.ts +3 -0
- package/dist/features/link/server/i18n.d.ts.map +1 -0
- package/dist/features/link/server/i18n.js +151 -0
- package/dist/features/link/server/i18n.js.map +1 -0
- package/dist/features/link/server/index.d.ts +46 -0
- package/dist/features/link/server/index.d.ts.map +1 -0
- package/dist/features/link/server/index.js +161 -0
- package/dist/features/link/server/index.js.map +1 -0
- package/dist/features/link/server/transformExtraFields.d.ts +9 -0
- package/dist/features/link/server/transformExtraFields.d.ts.map +1 -0
- package/dist/features/link/server/transformExtraFields.js +20 -0
- package/dist/features/link/server/transformExtraFields.js.map +1 -0
- package/dist/features/link/server/validate.d.ts +6 -0
- package/dist/features/link/server/validate.d.ts.map +1 -0
- package/dist/features/link/server/validate.js +50 -0
- package/dist/features/link/server/validate.js.map +1 -0
- package/dist/features/lists/checklist/client/index.d.ts +2 -0
- package/dist/features/lists/checklist/client/index.d.ts.map +1 -0
- package/dist/features/lists/checklist/client/index.js +94 -0
- package/dist/features/lists/checklist/client/index.js.map +1 -0
- package/dist/features/lists/checklist/client/plugin/index.d.ts +3 -0
- package/dist/features/lists/checklist/client/plugin/index.d.ts.map +1 -0
- package/dist/features/lists/checklist/client/plugin/index.js +9 -0
- package/dist/features/lists/checklist/client/plugin/index.js.map +1 -0
- package/dist/features/lists/checklist/markdownTransformers.d.ts +3 -0
- package/dist/features/lists/checklist/markdownTransformers.d.ts.map +1 -0
- package/dist/features/lists/checklist/markdownTransformers.js +12 -0
- package/dist/features/lists/checklist/markdownTransformers.js.map +1 -0
- package/dist/features/lists/checklist/server/i18n.d.ts +3 -0
- package/dist/features/lists/checklist/server/i18n.d.ts.map +1 -0
- package/dist/features/lists/checklist/server/i18n.js +114 -0
- package/dist/features/lists/checklist/server/i18n.js.map +1 -0
- package/dist/features/lists/checklist/server/index.d.ts +2 -0
- package/dist/features/lists/checklist/server/index.d.ts.map +1 -0
- package/dist/features/lists/checklist/server/index.js +31 -0
- package/dist/features/lists/checklist/server/index.js.map +1 -0
- package/dist/features/lists/htmlConverter.d.ts +5 -0
- package/dist/features/lists/htmlConverter.d.ts.map +1 -0
- package/dist/features/lists/htmlConverter.js +81 -0
- package/dist/features/lists/htmlConverter.js.map +1 -0
- package/dist/features/lists/orderedList/client/index.d.ts +2 -0
- package/dist/features/lists/orderedList/client/index.d.ts.map +1 -0
- package/dist/features/lists/orderedList/client/index.js +86 -0
- package/dist/features/lists/orderedList/client/index.js.map +1 -0
- package/dist/features/lists/orderedList/markdownTransformer.d.ts +3 -0
- package/dist/features/lists/orderedList/markdownTransformer.d.ts.map +1 -0
- package/dist/features/lists/orderedList/markdownTransformer.js +12 -0
- package/dist/features/lists/orderedList/markdownTransformer.js.map +1 -0
- package/dist/features/lists/orderedList/server/i18n.d.ts +3 -0
- package/dist/features/lists/orderedList/server/i18n.d.ts.map +1 -0
- package/dist/features/lists/orderedList/server/i18n.js +114 -0
- package/dist/features/lists/orderedList/server/i18n.js.map +1 -0
- package/dist/features/lists/orderedList/server/index.d.ts +2 -0
- package/dist/features/lists/orderedList/server/index.d.ts.map +1 -0
- package/dist/features/lists/orderedList/server/index.js +31 -0
- package/dist/features/lists/orderedList/server/index.js.map +1 -0
- package/dist/features/lists/plugin/index.d.ts +12 -0
- package/dist/features/lists/plugin/index.d.ts.map +1 -0
- package/dist/features/lists/plugin/index.js +9 -0
- package/dist/features/lists/plugin/index.js.map +1 -0
- package/dist/features/lists/shared/markdown.d.ts +6 -0
- package/dist/features/lists/shared/markdown.d.ts.map +1 -0
- package/dist/features/lists/shared/markdown.js +57 -0
- package/dist/features/lists/shared/markdown.js.map +1 -0
- package/dist/features/lists/shared/shouldRegisterListBaseNodes.d.ts +2 -0
- package/dist/features/lists/shared/shouldRegisterListBaseNodes.d.ts.map +1 -0
- package/dist/features/lists/shared/shouldRegisterListBaseNodes.js +14 -0
- package/dist/features/lists/shared/shouldRegisterListBaseNodes.js.map +1 -0
- package/dist/features/lists/shared/slashMenuListGroup.d.ts +3 -0
- package/dist/features/lists/shared/slashMenuListGroup.d.ts.map +1 -0
- package/dist/features/lists/shared/slashMenuListGroup.js +12 -0
- package/dist/features/lists/shared/slashMenuListGroup.js.map +1 -0
- package/dist/features/lists/unorderedList/client/index.d.ts +2 -0
- package/dist/features/lists/unorderedList/client/index.d.ts.map +1 -0
- package/dist/features/lists/unorderedList/client/index.js +80 -0
- package/dist/features/lists/unorderedList/client/index.js.map +1 -0
- package/dist/features/lists/unorderedList/markdownTransformer.d.ts +3 -0
- package/dist/features/lists/unorderedList/markdownTransformer.d.ts.map +1 -0
- package/dist/features/lists/unorderedList/markdownTransformer.js +12 -0
- package/dist/features/lists/unorderedList/markdownTransformer.js.map +1 -0
- package/dist/features/lists/unorderedList/server/i18n.d.ts +3 -0
- package/dist/features/lists/unorderedList/server/i18n.d.ts.map +1 -0
- package/dist/features/lists/unorderedList/server/i18n.js +114 -0
- package/dist/features/lists/unorderedList/server/i18n.js.map +1 -0
- package/dist/features/lists/unorderedList/server/index.d.ts +2 -0
- package/dist/features/lists/unorderedList/server/index.d.ts.map +1 -0
- package/dist/features/lists/unorderedList/server/index.js +26 -0
- package/dist/features/lists/unorderedList/server/index.js.map +1 -0
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/heading/converter.d.ts +3 -0
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/heading/converter.d.ts.map +1 -0
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/heading/converter.js +22 -0
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/heading/converter.js.map +1 -0
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/link/converter.d.ts +3 -0
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/link/converter.d.ts.map +1 -0
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/link/converter.js +33 -0
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/link/converter.js.map +1 -0
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/list/converter.d.ts +3 -0
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/list/converter.d.ts.map +1 -0
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/list/converter.js +24 -0
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/list/converter.js.map +1 -0
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/listItem/converter.d.ts +3 -0
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/listItem/converter.d.ts.map +1 -0
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/listItem/converter.js +25 -0
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/listItem/converter.js.map +1 -0
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/quote/converter.d.ts +3 -0
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/quote/converter.d.ts.map +1 -0
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/quote/converter.js +22 -0
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/quote/converter.js.map +1 -0
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/unknown/converter.d.ts +3 -0
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/unknown/converter.d.ts.map +1 -0
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/unknown/converter.js +28 -0
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/unknown/converter.js.map +1 -0
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/upload/converter.d.ts +3 -0
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/upload/converter.d.ts.map +1 -0
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/upload/converter.js +22 -0
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/upload/converter.js.map +1 -0
- package/dist/features/migrations/lexicalPluginToLexical/converter/defaultConverters.d.ts +3 -0
- package/dist/features/migrations/lexicalPluginToLexical/converter/defaultConverters.d.ts.map +1 -0
- package/dist/features/migrations/lexicalPluginToLexical/converter/defaultConverters.js +9 -0
- package/dist/features/migrations/lexicalPluginToLexical/converter/defaultConverters.js.map +1 -0
- package/dist/features/migrations/lexicalPluginToLexical/converter/index.d.ts +19 -0
- package/dist/features/migrations/lexicalPluginToLexical/converter/index.d.ts.map +1 -0
- package/dist/features/migrations/lexicalPluginToLexical/converter/index.js +78 -0
- package/dist/features/migrations/lexicalPluginToLexical/converter/index.js.map +1 -0
- package/dist/features/migrations/lexicalPluginToLexical/converter/types.d.ts +23 -0
- package/dist/features/migrations/lexicalPluginToLexical/converter/types.d.ts.map +1 -0
- package/dist/features/migrations/lexicalPluginToLexical/converter/types.js +2 -0
- package/dist/features/migrations/lexicalPluginToLexical/converter/types.js.map +1 -0
- package/dist/features/migrations/lexicalPluginToLexical/feature.client.d.ts +2 -0
- package/dist/features/migrations/lexicalPluginToLexical/feature.client.d.ts.map +1 -0
- package/dist/features/migrations/lexicalPluginToLexical/feature.client.js +10 -0
- package/dist/features/migrations/lexicalPluginToLexical/feature.client.js.map +1 -0
- package/dist/features/migrations/lexicalPluginToLexical/feature.server.d.ts +10 -0
- package/dist/features/migrations/lexicalPluginToLexical/feature.server.d.ts.map +1 -0
- package/dist/features/migrations/lexicalPluginToLexical/feature.server.js +49 -0
- package/dist/features/migrations/lexicalPluginToLexical/feature.server.js.map +1 -0
- package/dist/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/Component.d.ts +9 -0
- package/dist/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/Component.d.ts.map +1 -0
- package/dist/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/Component.js +15 -0
- package/dist/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/Component.js.map +1 -0
- package/dist/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/index.d.ts +33 -0
- package/dist/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/index.d.ts.map +1 -0
- package/dist/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/index.js +74 -0
- package/dist/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/index.js.map +1 -0
- package/dist/features/migrations/slateToLexical/converter/converters/blockquote/converter.d.ts +3 -0
- package/dist/features/migrations/slateToLexical/converter/converters/blockquote/converter.d.ts.map +1 -0
- package/dist/features/migrations/slateToLexical/converter/converters/blockquote/converter.js +23 -0
- package/dist/features/migrations/slateToLexical/converter/converters/blockquote/converter.js.map +1 -0
- package/dist/features/migrations/slateToLexical/converter/converters/heading/converter.d.ts +3 -0
- package/dist/features/migrations/slateToLexical/converter/converters/heading/converter.d.ts.map +1 -0
- package/dist/features/migrations/slateToLexical/converter/converters/heading/converter.js +24 -0
- package/dist/features/migrations/slateToLexical/converter/converters/heading/converter.js.map +1 -0
- package/dist/features/migrations/slateToLexical/converter/converters/indent/converter.d.ts +3 -0
- package/dist/features/migrations/slateToLexical/converter/converters/indent/converter.d.ts.map +1 -0
- package/dist/features/migrations/slateToLexical/converter/converters/indent/converter.js +33 -0
- package/dist/features/migrations/slateToLexical/converter/converters/indent/converter.js.map +1 -0
- package/dist/features/migrations/slateToLexical/converter/converters/link/converter.d.ts +3 -0
- package/dist/features/migrations/slateToLexical/converter/converters/link/converter.d.ts.map +1 -0
- package/dist/features/migrations/slateToLexical/converter/converters/link/converter.js +30 -0
- package/dist/features/migrations/slateToLexical/converter/converters/link/converter.js.map +1 -0
- package/dist/features/migrations/slateToLexical/converter/converters/listItem/converter.d.ts +3 -0
- package/dist/features/migrations/slateToLexical/converter/converters/listItem/converter.d.ts.map +1 -0
- package/dist/features/migrations/slateToLexical/converter/converters/listItem/converter.js +26 -0
- package/dist/features/migrations/slateToLexical/converter/converters/listItem/converter.js.map +1 -0
- package/dist/features/migrations/slateToLexical/converter/converters/orderedList/converter.d.ts +3 -0
- package/dist/features/migrations/slateToLexical/converter/converters/orderedList/converter.d.ts.map +1 -0
- package/dist/features/migrations/slateToLexical/converter/converters/orderedList/converter.js +26 -0
- package/dist/features/migrations/slateToLexical/converter/converters/orderedList/converter.js.map +1 -0
- package/dist/features/migrations/slateToLexical/converter/converters/relationship/converter.d.ts +3 -0
- package/dist/features/migrations/slateToLexical/converter/converters/relationship/converter.d.ts.map +1 -0
- package/dist/features/migrations/slateToLexical/converter/converters/relationship/converter.js +15 -0
- package/dist/features/migrations/slateToLexical/converter/converters/relationship/converter.js.map +1 -0
- package/dist/features/migrations/slateToLexical/converter/converters/unknown/converter.d.ts +3 -0
- package/dist/features/migrations/slateToLexical/converter/converters/unknown/converter.d.ts.map +1 -0
- package/dist/features/migrations/slateToLexical/converter/converters/unknown/converter.js +27 -0
- package/dist/features/migrations/slateToLexical/converter/converters/unknown/converter.js.map +1 -0
- package/dist/features/migrations/slateToLexical/converter/converters/unorderedList/converter.d.ts +3 -0
- package/dist/features/migrations/slateToLexical/converter/converters/unorderedList/converter.d.ts.map +1 -0
- package/dist/features/migrations/slateToLexical/converter/converters/unorderedList/converter.js +26 -0
- package/dist/features/migrations/slateToLexical/converter/converters/unorderedList/converter.js.map +1 -0
- package/dist/features/migrations/slateToLexical/converter/converters/upload/converter.d.ts +3 -0
- package/dist/features/migrations/slateToLexical/converter/converters/upload/converter.d.ts.map +1 -0
- package/dist/features/migrations/slateToLexical/converter/converters/upload/converter.js +18 -0
- package/dist/features/migrations/slateToLexical/converter/converters/upload/converter.js.map +1 -0
- package/dist/features/migrations/slateToLexical/converter/defaultConverters.d.ts +3 -0
- package/dist/features/migrations/slateToLexical/converter/defaultConverters.d.ts.map +1 -0
- package/dist/features/migrations/slateToLexical/converter/defaultConverters.js +12 -0
- package/dist/features/migrations/slateToLexical/converter/defaultConverters.js.map +1 -0
- package/dist/features/migrations/slateToLexical/converter/index.d.ts +19 -0
- package/dist/features/migrations/slateToLexical/converter/index.d.ts.map +1 -0
- package/dist/features/migrations/slateToLexical/converter/index.js +130 -0
- package/dist/features/migrations/slateToLexical/converter/index.js.map +1 -0
- package/dist/features/migrations/slateToLexical/converter/types.d.ts +16 -0
- package/dist/features/migrations/slateToLexical/converter/types.d.ts.map +1 -0
- package/dist/features/migrations/slateToLexical/converter/types.js +2 -0
- package/dist/features/migrations/slateToLexical/converter/types.js.map +1 -0
- package/dist/features/migrations/slateToLexical/feature.client.d.ts +2 -0
- package/dist/features/migrations/slateToLexical/feature.client.d.ts.map +1 -0
- package/dist/features/migrations/slateToLexical/feature.client.js +10 -0
- package/dist/features/migrations/slateToLexical/feature.client.js.map +1 -0
- package/dist/features/migrations/slateToLexical/feature.server.d.ts +40 -0
- package/dist/features/migrations/slateToLexical/feature.server.d.ts.map +1 -0
- package/dist/features/migrations/slateToLexical/feature.server.js +68 -0
- package/dist/features/migrations/slateToLexical/feature.server.js.map +1 -0
- package/dist/features/migrations/slateToLexical/nodes/unknownConvertedNode/Component.d.ts +9 -0
- package/dist/features/migrations/slateToLexical/nodes/unknownConvertedNode/Component.d.ts.map +1 -0
- package/dist/features/migrations/slateToLexical/nodes/unknownConvertedNode/Component.js +15 -0
- package/dist/features/migrations/slateToLexical/nodes/unknownConvertedNode/Component.js.map +1 -0
- package/dist/features/migrations/slateToLexical/nodes/unknownConvertedNode/index.d.ts +33 -0
- package/dist/features/migrations/slateToLexical/nodes/unknownConvertedNode/index.d.ts.map +1 -0
- package/dist/features/migrations/slateToLexical/nodes/unknownConvertedNode/index.js +74 -0
- package/dist/features/migrations/slateToLexical/nodes/unknownConvertedNode/index.js.map +1 -0
- package/dist/features/paragraph/client/index.d.ts +2 -0
- package/dist/features/paragraph/client/index.d.ts.map +1 -0
- package/dist/features/paragraph/client/index.js +68 -0
- package/dist/features/paragraph/client/index.js.map +1 -0
- package/dist/features/paragraph/server/i18n.d.ts +3 -0
- package/dist/features/paragraph/server/i18n.d.ts.map +1 -0
- package/dist/features/paragraph/server/i18n.js +151 -0
- package/dist/features/paragraph/server/i18n.js.map +1 -0
- package/dist/features/paragraph/server/index.d.ts +2 -0
- package/dist/features/paragraph/server/index.d.ts.map +1 -0
- package/dist/features/paragraph/server/index.js +11 -0
- package/dist/features/paragraph/server/index.js.map +1 -0
- package/dist/features/relationship/client/components/RelationshipComponent.d.ts +13 -0
- package/dist/features/relationship/client/components/RelationshipComponent.d.ts.map +1 -0
- package/dist/features/relationship/client/components/RelationshipComponent.js +134 -0
- package/dist/features/relationship/client/components/RelationshipComponent.js.map +1 -0
- package/dist/features/relationship/client/drawer/commands.d.ts +7 -0
- package/dist/features/relationship/client/drawer/commands.d.ts.map +1 -0
- package/dist/features/relationship/client/drawer/commands.js +3 -0
- package/dist/features/relationship/client/drawer/commands.js.map +1 -0
- package/dist/features/relationship/client/drawer/index.d.ts +8 -0
- package/dist/features/relationship/client/drawer/index.d.ts.map +1 -0
- package/dist/features/relationship/client/drawer/index.js +147 -0
- package/dist/features/relationship/client/drawer/index.js.map +1 -0
- package/dist/features/relationship/client/index.d.ts +3 -0
- package/dist/features/relationship/client/index.d.ts.map +1 -0
- package/dist/features/relationship/client/index.js +66 -0
- package/dist/features/relationship/client/index.js.map +1 -0
- package/dist/features/relationship/client/nodes/RelationshipNode.d.ts +15 -0
- package/dist/features/relationship/client/nodes/RelationshipNode.d.ts.map +1 -0
- package/dist/features/relationship/client/nodes/RelationshipNode.js +76 -0
- package/dist/features/relationship/client/nodes/RelationshipNode.js.map +1 -0
- package/dist/features/relationship/client/plugins/index.d.ts +7 -0
- package/dist/features/relationship/client/plugins/index.d.ts.map +1 -0
- package/dist/features/relationship/client/plugins/index.js +81 -0
- package/dist/features/relationship/client/plugins/index.js.map +1 -0
- package/dist/features/relationship/client/utils/useEnabledRelationships.d.ts +13 -0
- package/dist/features/relationship/client/utils/useEnabledRelationships.d.ts.map +1 -0
- package/dist/features/relationship/client/utils/useEnabledRelationships.js +64 -0
- package/dist/features/relationship/client/utils/useEnabledRelationships.js.map +1 -0
- package/dist/features/relationship/server/graphQLPopulationPromise.d.ts +5 -0
- package/dist/features/relationship/server/graphQLPopulationPromise.d.ts.map +1 -0
- package/dist/features/relationship/server/graphQLPopulationPromise.js +37 -0
- package/dist/features/relationship/server/graphQLPopulationPromise.js.map +1 -0
- package/dist/features/relationship/server/i18n.d.ts +3 -0
- package/dist/features/relationship/server/i18n.d.ts.map +1 -0
- package/dist/features/relationship/server/i18n.js +114 -0
- package/dist/features/relationship/server/i18n.js.map +1 -0
- package/dist/features/relationship/server/index.d.ts +27 -0
- package/dist/features/relationship/server/index.d.ts.map +1 -0
- package/dist/features/relationship/server/index.js +67 -0
- package/dist/features/relationship/server/index.js.map +1 -0
- package/dist/features/relationship/server/nodes/RelationshipNode.d.ts +36 -0
- package/dist/features/relationship/server/nodes/RelationshipNode.d.ts.map +1 -0
- package/dist/features/relationship/server/nodes/RelationshipNode.js +111 -0
- package/dist/features/relationship/server/nodes/RelationshipNode.js.map +1 -0
- package/dist/features/shared/slashMenu/basicGroup.d.ts +3 -0
- package/dist/features/shared/slashMenu/basicGroup.d.ts.map +1 -0
- package/dist/features/shared/slashMenu/basicGroup.js +12 -0
- package/dist/features/shared/slashMenu/basicGroup.js.map +1 -0
- package/dist/features/shared/toolbar/addDropdownGroup.d.ts +3 -0
- package/dist/features/shared/toolbar/addDropdownGroup.d.ts.map +1 -0
- package/dist/features/shared/toolbar/addDropdownGroup.js +11 -0
- package/dist/features/shared/toolbar/addDropdownGroup.js.map +1 -0
- package/dist/features/shared/toolbar/featureButtonsGroup.d.ts +3 -0
- package/dist/features/shared/toolbar/featureButtonsGroup.d.ts.map +1 -0
- package/dist/features/shared/toolbar/featureButtonsGroup.js +9 -0
- package/dist/features/shared/toolbar/featureButtonsGroup.js.map +1 -0
- package/dist/features/shared/toolbar/textDropdownGroup.d.ts +3 -0
- package/dist/features/shared/toolbar/textDropdownGroup.d.ts.map +1 -0
- package/dist/features/shared/toolbar/textDropdownGroup.js +11 -0
- package/dist/features/shared/toolbar/textDropdownGroup.js.map +1 -0
- package/dist/features/textState/defaultColors.d.ts +91 -0
- package/dist/features/textState/defaultColors.d.ts.map +1 -0
- package/dist/features/textState/defaultColors.js +386 -0
- package/dist/features/textState/defaultColors.js.map +1 -0
- package/dist/features/textState/feature.client.d.ts +3 -0
- package/dist/features/textState/feature.client.d.ts.map +1 -0
- package/dist/features/textState/feature.client.js +73 -0
- package/dist/features/textState/feature.client.js.map +1 -0
- package/dist/features/textState/feature.server.d.ts +60 -0
- package/dist/features/textState/feature.server.d.ts.map +1 -0
- package/dist/features/textState/feature.server.js +27 -0
- package/dist/features/textState/feature.server.js.map +1 -0
- package/dist/features/textState/i18n.d.ts +3 -0
- package/dist/features/textState/i18n.d.ts.map +1 -0
- package/dist/features/textState/i18n.js +114 -0
- package/dist/features/textState/i18n.js.map +1 -0
- package/dist/features/textState/textState.d.ts +12 -0
- package/dist/features/textState/textState.d.ts.map +1 -0
- package/dist/features/textState/textState.js +73 -0
- package/dist/features/textState/textState.js.map +1 -0
- package/dist/features/toolbars/fixed/client/Toolbar/index.d.ts +5 -0
- package/dist/features/toolbars/fixed/client/Toolbar/index.d.ts.map +1 -0
- package/dist/features/toolbars/fixed/client/Toolbar/index.js +321 -0
- package/dist/features/toolbars/fixed/client/Toolbar/index.js.map +1 -0
- package/dist/features/toolbars/fixed/client/index.d.ts +3 -0
- package/dist/features/toolbars/fixed/client/index.d.ts.map +1 -0
- package/dist/features/toolbars/fixed/client/index.js +11 -0
- package/dist/features/toolbars/fixed/client/index.js.map +1 -0
- package/dist/features/toolbars/fixed/server/index.d.ts +28 -0
- package/dist/features/toolbars/fixed/server/index.d.ts.map +1 -0
- package/dist/features/toolbars/fixed/server/index.js +19 -0
- package/dist/features/toolbars/fixed/server/index.js.map +1 -0
- package/dist/features/toolbars/inline/client/Toolbar/index.d.ts +4 -0
- package/dist/features/toolbars/inline/client/Toolbar/index.d.ts.map +1 -0
- package/dist/features/toolbars/inline/client/Toolbar/index.js +395 -0
- package/dist/features/toolbars/inline/client/Toolbar/index.js.map +1 -0
- package/dist/features/toolbars/inline/client/index.d.ts +2 -0
- package/dist/features/toolbars/inline/client/index.d.ts.map +1 -0
- package/dist/features/toolbars/inline/client/index.js +11 -0
- package/dist/features/toolbars/inline/client/index.js.map +1 -0
- package/dist/features/toolbars/inline/server/index.d.ts +2 -0
- package/dist/features/toolbars/inline/server/index.d.ts.map +1 -0
- package/dist/features/toolbars/inline/server/index.js +8 -0
- package/dist/features/toolbars/inline/server/index.js.map +1 -0
- package/dist/features/toolbars/shared/ToolbarButton/index.d.ts +10 -0
- package/dist/features/toolbars/shared/ToolbarButton/index.d.ts.map +1 -0
- package/dist/features/toolbars/shared/ToolbarButton/index.js +156 -0
- package/dist/features/toolbars/shared/ToolbarButton/index.js.map +1 -0
- package/dist/features/toolbars/shared/ToolbarDropdown/DropDown.d.ts +25 -0
- package/dist/features/toolbars/shared/ToolbarDropdown/DropDown.d.ts.map +1 -0
- package/dist/features/toolbars/shared/ToolbarDropdown/DropDown.js +224 -0
- package/dist/features/toolbars/shared/ToolbarDropdown/DropDown.js.map +1 -0
- package/dist/features/toolbars/shared/ToolbarDropdown/index.d.ts +22 -0
- package/dist/features/toolbars/shared/ToolbarDropdown/index.d.ts.map +1 -0
- package/dist/features/toolbars/shared/ToolbarDropdown/index.js +196 -0
- package/dist/features/toolbars/shared/ToolbarDropdown/index.js.map +1 -0
- package/dist/features/toolbars/types.d.ts +103 -0
- package/dist/features/toolbars/types.d.ts.map +1 -0
- package/dist/features/toolbars/types.js +2 -0
- package/dist/features/toolbars/types.js.map +1 -0
- package/dist/features/typeUtilities.d.ts +8 -0
- package/dist/features/typeUtilities.d.ts.map +1 -0
- package/dist/features/typeUtilities.js +7 -0
- package/dist/features/typeUtilities.js.map +1 -0
- package/dist/features/typesClient.d.ts +188 -0
- package/dist/features/typesClient.d.ts.map +1 -0
- package/dist/features/typesClient.js +2 -0
- package/dist/features/typesClient.js.map +1 -0
- package/dist/features/typesServer.d.ts +332 -0
- package/dist/features/typesServer.d.ts.map +1 -0
- package/dist/features/typesServer.js +2 -0
- package/dist/features/typesServer.js.map +1 -0
- package/dist/features/upload/client/component/index.d.ts +12 -0
- package/dist/features/upload/client/component/index.d.ts.map +1 -0
- package/dist/features/upload/client/component/index.js +210 -0
- package/dist/features/upload/client/component/index.js.map +1 -0
- package/dist/features/upload/client/component/pending/index.d.ts +3 -0
- package/dist/features/upload/client/component/pending/index.d.ts.map +1 -0
- package/dist/features/upload/client/component/pending/index.js +14 -0
- package/dist/features/upload/client/component/pending/index.js.map +1 -0
- package/dist/features/upload/client/drawer/commands.d.ts +7 -0
- package/dist/features/upload/client/drawer/commands.d.ts.map +1 -0
- package/dist/features/upload/client/drawer/commands.js +5 -0
- package/dist/features/upload/client/drawer/commands.js.map +1 -0
- package/dist/features/upload/client/drawer/index.d.ts +8 -0
- package/dist/features/upload/client/drawer/index.d.ts.map +1 -0
- package/dist/features/upload/client/drawer/index.js +151 -0
- package/dist/features/upload/client/drawer/index.js.map +1 -0
- package/dist/features/upload/client/index.d.ts +10 -0
- package/dist/features/upload/client/index.d.ts.map +1 -0
- package/dist/features/upload/client/index.js +64 -0
- package/dist/features/upload/client/index.js.map +1 -0
- package/dist/features/upload/client/nodes/UploadNode.d.ts +17 -0
- package/dist/features/upload/client/nodes/UploadNode.d.ts.map +1 -0
- package/dist/features/upload/client/nodes/UploadNode.js +77 -0
- package/dist/features/upload/client/nodes/UploadNode.js.map +1 -0
- package/dist/features/upload/client/plugin/index.d.ts +14 -0
- package/dist/features/upload/client/plugin/index.d.ts.map +1 -0
- package/dist/features/upload/client/plugin/index.js +361 -0
- package/dist/features/upload/client/plugin/index.js.map +1 -0
- package/dist/features/upload/server/graphQLPopulationPromise.d.ts +5 -0
- package/dist/features/upload/server/graphQLPopulationPromise.d.ts.map +1 -0
- package/dist/features/upload/server/graphQLPopulationPromise.js +68 -0
- package/dist/features/upload/server/graphQLPopulationPromise.js.map +1 -0
- package/dist/features/upload/server/i18n.d.ts +3 -0
- package/dist/features/upload/server/i18n.d.ts.map +1 -0
- package/dist/features/upload/server/i18n.js +114 -0
- package/dist/features/upload/server/i18n.js.map +1 -0
- package/dist/features/upload/server/index.d.ts +33 -0
- package/dist/features/upload/server/index.d.ts.map +1 -0
- package/dist/features/upload/server/index.js +227 -0
- package/dist/features/upload/server/index.js.map +1 -0
- package/dist/features/upload/server/nodes/UploadNode.d.ts +83 -0
- package/dist/features/upload/server/nodes/UploadNode.d.ts.map +1 -0
- package/dist/features/upload/server/nodes/UploadNode.js +112 -0
- package/dist/features/upload/server/nodes/UploadNode.js.map +1 -0
- package/dist/features/upload/server/nodes/conversions.d.ts +6 -0
- package/dist/features/upload/server/nodes/conversions.d.ts.map +1 -0
- package/dist/features/upload/server/nodes/conversions.js +53 -0
- package/dist/features/upload/server/nodes/conversions.js.map +1 -0
- package/dist/features/upload/server/validate.d.ts +5 -0
- package/dist/features/upload/server/validate.d.ts.map +1 -0
- package/dist/features/upload/server/validate.js +68 -0
- package/dist/features/upload/server/validate.js.map +1 -0
- package/dist/field/Diff/converters/link.d.ts +9 -0
- package/dist/field/Diff/converters/link.d.ts.map +1 -0
- package/dist/field/Diff/converters/link.js +47 -0
- package/dist/field/Diff/converters/link.js.map +1 -0
- package/dist/field/Diff/converters/listitem/index.d.ts +5 -0
- package/dist/field/Diff/converters/listitem/index.d.ts.map +1 -0
- package/dist/field/Diff/converters/listitem/index.js +65 -0
- package/dist/field/Diff/converters/listitem/index.js.map +1 -0
- package/dist/field/Diff/converters/relationship/index.d.ts +10 -0
- package/dist/field/Diff/converters/relationship/index.d.ts.map +1 -0
- package/dist/field/Diff/converters/relationship/index.js +69 -0
- package/dist/field/Diff/converters/relationship/index.js.map +1 -0
- package/dist/field/Diff/converters/unknown/index.d.ts +10 -0
- package/dist/field/Diff/converters/unknown/index.d.ts.map +1 -0
- package/dist/field/Diff/converters/unknown/index.js +45 -0
- package/dist/field/Diff/converters/unknown/index.js.map +1 -0
- package/dist/field/Diff/converters/upload/index.d.ts +10 -0
- package/dist/field/Diff/converters/upload/index.d.ts.map +1 -0
- package/dist/field/Diff/converters/upload/index.js +74 -0
- package/dist/field/Diff/converters/upload/index.js.map +1 -0
- package/dist/field/Diff/index.d.ts +5 -0
- package/dist/field/Diff/index.d.ts.map +1 -0
- package/dist/field/Diff/index.js +79 -0
- package/dist/field/Diff/index.js.map +1 -0
- package/dist/field/Field.d.ts +12 -0
- package/dist/field/Field.d.ts.map +1 -0
- package/dist/field/Field.js +182 -0
- package/dist/field/Field.js.map +1 -0
- package/dist/field/RenderLexical/index.d.ts +24 -0
- package/dist/field/RenderLexical/index.d.ts.map +1 -0
- package/dist/field/RenderLexical/index.js +131 -0
- package/dist/field/RenderLexical/index.js.map +1 -0
- package/dist/field/bundled.css +1 -0
- package/dist/field/index.d.ts +4 -0
- package/dist/field/index.d.ts.map +1 -0
- package/dist/field/index.js +110 -0
- package/dist/field/index.js.map +1 -0
- package/dist/field/rscEntry.d.ts +8 -0
- package/dist/field/rscEntry.d.ts.map +1 -0
- package/dist/field/rscEntry.js +97 -0
- package/dist/field/rscEntry.js.map +1 -0
- package/dist/i18n.d.ts +3 -0
- package/dist/i18n.d.ts.map +1 -0
- package/dist/i18n.js +225 -0
- package/dist/i18n.js.map +1 -0
- package/dist/index.d.ts +84 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +800 -0
- package/dist/index.js.map +1 -0
- package/dist/lexical/EditorPlugin.d.ts +8 -0
- package/dist/lexical/EditorPlugin.d.ts.map +1 -0
- package/dist/lexical/EditorPlugin.js +21 -0
- package/dist/lexical/EditorPlugin.js.map +1 -0
- package/dist/lexical/LexicalEditor.d.ts +8 -0
- package/dist/lexical/LexicalEditor.d.ts.map +1 -0
- package/dist/lexical/LexicalEditor.js +198 -0
- package/dist/lexical/LexicalEditor.js.map +1 -0
- package/dist/lexical/LexicalProvider.d.ts +15 -0
- package/dist/lexical/LexicalProvider.d.ts.map +1 -0
- package/dist/lexical/LexicalProvider.js +99 -0
- package/dist/lexical/LexicalProvider.js.map +1 -0
- package/dist/lexical/config/client/EditorConfigProvider.d.ts +32 -0
- package/dist/lexical/config/client/EditorConfigProvider.d.ts.map +1 -0
- package/dist/lexical/config/client/EditorConfigProvider.js +94 -0
- package/dist/lexical/config/client/EditorConfigProvider.js.map +1 -0
- package/dist/lexical/config/client/default.d.ts +3 -0
- package/dist/lexical/config/client/default.d.ts.map +1 -0
- package/dist/lexical/config/client/default.js +8 -0
- package/dist/lexical/config/client/default.js.map +1 -0
- package/dist/lexical/config/client/loader.d.ts +17 -0
- package/dist/lexical/config/client/loader.d.ts.map +1 -0
- package/dist/lexical/config/client/loader.js +45 -0
- package/dist/lexical/config/client/loader.js.map +1 -0
- package/dist/lexical/config/client/sanitize.d.ts +7 -0
- package/dist/lexical/config/client/sanitize.d.ts.map +1 -0
- package/dist/lexical/config/client/sanitize.js +206 -0
- package/dist/lexical/config/client/sanitize.js.map +1 -0
- package/dist/lexical/config/server/default.d.ts +7 -0
- package/dist/lexical/config/server/default.d.ts.map +1 -0
- package/dist/lexical/config/server/default.js +31 -0
- package/dist/lexical/config/server/default.js.map +1 -0
- package/dist/lexical/config/server/loader.d.ts +11 -0
- package/dist/lexical/config/server/loader.d.ts.map +1 -0
- package/dist/lexical/config/server/loader.js +123 -0
- package/dist/lexical/config/server/loader.js.map +1 -0
- package/dist/lexical/config/server/sanitize.d.ts +6 -0
- package/dist/lexical/config/server/sanitize.d.ts.map +1 -0
- package/dist/lexical/config/server/sanitize.js +127 -0
- package/dist/lexical/config/server/sanitize.js.map +1 -0
- package/dist/lexical/config/types.d.ts +24 -0
- package/dist/lexical/config/types.d.ts.map +1 -0
- package/dist/lexical/config/types.js +2 -0
- package/dist/lexical/config/types.js.map +1 -0
- package/dist/lexical/nodes/index.d.ts +10 -0
- package/dist/lexical/nodes/index.d.ts.map +1 -0
- package/dist/lexical/nodes/index.js +18 -0
- package/dist/lexical/nodes/index.js.map +1 -0
- package/dist/lexical/plugins/ClipboardPlugin/index.d.ts +2 -0
- package/dist/lexical/plugins/ClipboardPlugin/index.d.ts.map +1 -0
- package/dist/lexical/plugins/ClipboardPlugin/index.js +82 -0
- package/dist/lexical/plugins/ClipboardPlugin/index.js.map +1 -0
- package/dist/lexical/plugins/DecoratorPlugin/index.d.ts +15 -0
- package/dist/lexical/plugins/DecoratorPlugin/index.d.ts.map +1 -0
- package/dist/lexical/plugins/DecoratorPlugin/index.js +258 -0
- package/dist/lexical/plugins/DecoratorPlugin/index.js.map +1 -0
- package/dist/lexical/plugins/InsertParagraphAtEnd/index.d.ts +4 -0
- package/dist/lexical/plugins/InsertParagraphAtEnd/index.d.ts.map +1 -0
- package/dist/lexical/plugins/InsertParagraphAtEnd/index.js +49 -0
- package/dist/lexical/plugins/InsertParagraphAtEnd/index.js.map +1 -0
- package/dist/lexical/plugins/MarkdownShortcut/index.d.ts +3 -0
- package/dist/lexical/plugins/MarkdownShortcut/index.d.ts.map +1 -0
- package/dist/lexical/plugins/MarkdownShortcut/index.js +30 -0
- package/dist/lexical/plugins/MarkdownShortcut/index.js.map +1 -0
- package/dist/lexical/plugins/NormalizeSelection/index.d.ts +9 -0
- package/dist/lexical/plugins/NormalizeSelection/index.d.ts.map +1 -0
- package/dist/lexical/plugins/NormalizeSelection/index.js +30 -0
- package/dist/lexical/plugins/NormalizeSelection/index.js.map +1 -0
- package/dist/lexical/plugins/SelectAllPlugin/index.d.ts +7 -0
- package/dist/lexical/plugins/SelectAllPlugin/index.d.ts.map +1 -0
- package/dist/lexical/plugins/SelectAllPlugin/index.js +26 -0
- package/dist/lexical/plugins/SelectAllPlugin/index.js.map +1 -0
- package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/LexicalMenu.d.ts +31 -0
- package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/LexicalMenu.d.ts.map +1 -0
- package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/LexicalMenu.js +463 -0
- package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/LexicalMenu.js.map +1 -0
- package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/index.d.ts +23 -0
- package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/index.d.ts.map +1 -0
- package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/index.js +180 -0
- package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/index.js.map +1 -0
- package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/types.d.ts +51 -0
- package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/types.d.ts.map +1 -0
- package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/types.js +2 -0
- package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/types.js.map +1 -0
- package/dist/lexical/plugins/SlashMenu/index.d.ts +6 -0
- package/dist/lexical/plugins/SlashMenu/index.d.ts.map +1 -0
- package/dist/lexical/plugins/SlashMenu/index.js +199 -0
- package/dist/lexical/plugins/SlashMenu/index.js.map +1 -0
- package/dist/lexical/plugins/SlashMenu/useMenuTriggerMatch.d.ts +23 -0
- package/dist/lexical/plugins/SlashMenu/useMenuTriggerMatch.d.ts.map +1 -0
- package/dist/lexical/plugins/SlashMenu/useMenuTriggerMatch.js +48 -0
- package/dist/lexical/plugins/SlashMenu/useMenuTriggerMatch.js.map +1 -0
- package/dist/lexical/plugins/TextPlugin/index.d.ts +5 -0
- package/dist/lexical/plugins/TextPlugin/index.d.ts.map +1 -0
- package/dist/lexical/plugins/TextPlugin/index.js +51 -0
- package/dist/lexical/plugins/TextPlugin/index.js.map +1 -0
- package/dist/lexical/plugins/handles/AddBlockHandlePlugin/index.d.ts +6 -0
- package/dist/lexical/plugins/handles/AddBlockHandlePlugin/index.d.ts.map +1 -0
- package/dist/lexical/plugins/handles/AddBlockHandlePlugin/index.js +155 -0
- package/dist/lexical/plugins/handles/AddBlockHandlePlugin/index.js.map +1 -0
- package/dist/lexical/plugins/handles/DraggableBlockPlugin/debounce.d.ts +2 -0
- package/dist/lexical/plugins/handles/DraggableBlockPlugin/debounce.d.ts.map +1 -0
- package/dist/lexical/plugins/handles/DraggableBlockPlugin/debounce.js +15 -0
- package/dist/lexical/plugins/handles/DraggableBlockPlugin/debounce.js.map +1 -0
- package/dist/lexical/plugins/handles/DraggableBlockPlugin/getBoundingRectWithoutTransform.d.ts +2 -0
- package/dist/lexical/plugins/handles/DraggableBlockPlugin/getBoundingRectWithoutTransform.d.ts.map +1 -0
- package/dist/lexical/plugins/handles/DraggableBlockPlugin/getBoundingRectWithoutTransform.js +15 -0
- package/dist/lexical/plugins/handles/DraggableBlockPlugin/getBoundingRectWithoutTransform.js.map +1 -0
- package/dist/lexical/plugins/handles/DraggableBlockPlugin/highlightElemOriginalPosition.d.ts +3 -0
- package/dist/lexical/plugins/handles/DraggableBlockPlugin/highlightElemOriginalPosition.d.ts.map +1 -0
- package/dist/lexical/plugins/handles/DraggableBlockPlugin/highlightElemOriginalPosition.js +31 -0
- package/dist/lexical/plugins/handles/DraggableBlockPlugin/highlightElemOriginalPosition.js.map +1 -0
- package/dist/lexical/plugins/handles/DraggableBlockPlugin/index.d.ts +6 -0
- package/dist/lexical/plugins/handles/DraggableBlockPlugin/index.d.ts.map +1 -0
- package/dist/lexical/plugins/handles/DraggableBlockPlugin/index.js +356 -0
- package/dist/lexical/plugins/handles/DraggableBlockPlugin/index.js.map +1 -0
- package/dist/lexical/plugins/handles/DraggableBlockPlugin/setTargetLine.d.ts +9 -0
- package/dist/lexical/plugins/handles/DraggableBlockPlugin/setTargetLine.d.ts.map +1 -0
- package/dist/lexical/plugins/handles/DraggableBlockPlugin/setTargetLine.js +113 -0
- package/dist/lexical/plugins/handles/DraggableBlockPlugin/setTargetLine.js.map +1 -0
- package/dist/lexical/plugins/handles/utils/calculateDistanceFromScrollerElem.d.ts +5 -0
- package/dist/lexical/plugins/handles/utils/calculateDistanceFromScrollerElem.d.ts.map +1 -0
- package/dist/lexical/plugins/handles/utils/calculateDistanceFromScrollerElem.js +28 -0
- package/dist/lexical/plugins/handles/utils/calculateDistanceFromScrollerElem.js.map +1 -0
- package/dist/lexical/plugins/handles/utils/doesLineHeightAffectElement.d.ts +9 -0
- package/dist/lexical/plugins/handles/utils/doesLineHeightAffectElement.d.ts.map +1 -0
- package/dist/lexical/plugins/handles/utils/doesLineHeightAffectElement.js +28 -0
- package/dist/lexical/plugins/handles/utils/doesLineHeightAffectElement.js.map +1 -0
- package/dist/lexical/plugins/handles/utils/getCollapsedMargins.d.ts +5 -0
- package/dist/lexical/plugins/handles/utils/getCollapsedMargins.d.ts.map +1 -0
- package/dist/lexical/plugins/handles/utils/getCollapsedMargins.js +18 -0
- package/dist/lexical/plugins/handles/utils/getCollapsedMargins.js.map +1 -0
- package/dist/lexical/plugins/handles/utils/getNodeCloseToPoint.d.ts +31 -0
- package/dist/lexical/plugins/handles/utils/getNodeCloseToPoint.d.ts.map +1 -0
- package/dist/lexical/plugins/handles/utils/getNodeCloseToPoint.js +153 -0
- package/dist/lexical/plugins/handles/utils/getNodeCloseToPoint.js.map +1 -0
- package/dist/lexical/plugins/handles/utils/getTopLevelNodeKeys.d.ts +3 -0
- package/dist/lexical/plugins/handles/utils/getTopLevelNodeKeys.d.ts.map +1 -0
- package/dist/lexical/plugins/handles/utils/getTopLevelNodeKeys.js +7 -0
- package/dist/lexical/plugins/handles/utils/getTopLevelNodeKeys.js.map +1 -0
- package/dist/lexical/plugins/handles/utils/isOnHandleElement.d.ts +2 -0
- package/dist/lexical/plugins/handles/utils/isOnHandleElement.d.ts.map +1 -0
- package/dist/lexical/plugins/handles/utils/isOnHandleElement.js +6 -0
- package/dist/lexical/plugins/handles/utils/isOnHandleElement.js.map +1 -0
- package/dist/lexical/plugins/handles/utils/setHandlePosition.d.ts +2 -0
- package/dist/lexical/plugins/handles/utils/setHandlePosition.d.ts.map +1 -0
- package/dist/lexical/plugins/handles/utils/setHandlePosition.js +28 -0
- package/dist/lexical/plugins/handles/utils/setHandlePosition.js.map +1 -0
- package/dist/lexical/theme/EditorTheme.d.ts +3 -0
- package/dist/lexical/theme/EditorTheme.d.ts.map +1 -0
- package/dist/lexical/theme/EditorTheme.js +69 -0
- package/dist/lexical/theme/EditorTheme.js.map +1 -0
- package/dist/lexical/ui/ContentEditable.d.ts +8 -0
- package/dist/lexical/ui/ContentEditable.d.ts.map +1 -0
- package/dist/lexical/ui/ContentEditable.js +43 -0
- package/dist/lexical/ui/ContentEditable.js.map +1 -0
- package/dist/lexical/ui/icons/AI/index.d.ts +3 -0
- package/dist/lexical/ui/icons/AI/index.d.ts.map +1 -0
- package/dist/lexical/ui/icons/AI/index.js +34 -0
- package/dist/lexical/ui/icons/AI/index.js.map +1 -0
- package/dist/lexical/ui/icons/Add/index.d.ts +3 -0
- package/dist/lexical/ui/icons/Add/index.d.ts.map +1 -0
- package/dist/lexical/ui/icons/Add/index.js +19 -0
- package/dist/lexical/ui/icons/Add/index.js.map +1 -0
- package/dist/lexical/ui/icons/Add/index.svg +4 -0
- package/dist/lexical/ui/icons/Add/light.svg +4 -0
- package/dist/lexical/ui/icons/AlignCenter/index.d.ts +3 -0
- package/dist/lexical/ui/icons/AlignCenter/index.d.ts.map +1 -0
- package/dist/lexical/ui/icons/AlignCenter/index.js +28 -0
- package/dist/lexical/ui/icons/AlignCenter/index.js.map +1 -0
- package/dist/lexical/ui/icons/AlignJustify/index.d.ts +3 -0
- package/dist/lexical/ui/icons/AlignJustify/index.d.ts.map +1 -0
- package/dist/lexical/ui/icons/AlignJustify/index.js +28 -0
- package/dist/lexical/ui/icons/AlignJustify/index.js.map +1 -0
- package/dist/lexical/ui/icons/AlignLeft/index.d.ts +3 -0
- package/dist/lexical/ui/icons/AlignLeft/index.d.ts.map +1 -0
- package/dist/lexical/ui/icons/AlignLeft/index.js +28 -0
- package/dist/lexical/ui/icons/AlignLeft/index.js.map +1 -0
- package/dist/lexical/ui/icons/AlignRight/index.d.ts +3 -0
- package/dist/lexical/ui/icons/AlignRight/index.d.ts.map +1 -0
- package/dist/lexical/ui/icons/AlignRight/index.js +28 -0
- package/dist/lexical/ui/icons/AlignRight/index.js.map +1 -0
- package/dist/lexical/ui/icons/Block/index.d.ts +3 -0
- package/dist/lexical/ui/icons/Block/index.d.ts.map +1 -0
- package/dist/lexical/ui/icons/Block/index.js +37 -0
- package/dist/lexical/ui/icons/Block/index.js.map +1 -0
- package/dist/lexical/ui/icons/Blockquote/index.d.ts +3 -0
- package/dist/lexical/ui/icons/Blockquote/index.d.ts.map +1 -0
- package/dist/lexical/ui/icons/Blockquote/index.js +19 -0
- package/dist/lexical/ui/icons/Blockquote/index.js.map +1 -0
- package/dist/lexical/ui/icons/Bold/index.d.ts +3 -0
- package/dist/lexical/ui/icons/Bold/index.d.ts.map +1 -0
- package/dist/lexical/ui/icons/Bold/index.js +19 -0
- package/dist/lexical/ui/icons/Bold/index.js.map +1 -0
- package/dist/lexical/ui/icons/Caret/index.svg +3 -0
- package/dist/lexical/ui/icons/Checklist/index.d.ts +3 -0
- package/dist/lexical/ui/icons/Checklist/index.d.ts.map +1 -0
- package/dist/lexical/ui/icons/Checklist/index.js +27 -0
- package/dist/lexical/ui/icons/Checklist/index.js.map +1 -0
- package/dist/lexical/ui/icons/Code/index.d.ts +3 -0
- package/dist/lexical/ui/icons/Code/index.d.ts.map +1 -0
- package/dist/lexical/ui/icons/Code/index.js +22 -0
- package/dist/lexical/ui/icons/Code/index.js.map +1 -0
- package/dist/lexical/ui/icons/CodeBlock/index.d.ts +3 -0
- package/dist/lexical/ui/icons/CodeBlock/index.d.ts.map +1 -0
- package/dist/lexical/ui/icons/CodeBlock/index.js +17 -0
- package/dist/lexical/ui/icons/CodeBlock/index.js.map +1 -0
- package/dist/lexical/ui/icons/Collapse/index.d.ts +3 -0
- package/dist/lexical/ui/icons/Collapse/index.d.ts.map +1 -0
- package/dist/lexical/ui/icons/Collapse/index.js +18 -0
- package/dist/lexical/ui/icons/Collapse/index.js.map +1 -0
- package/dist/lexical/ui/icons/DraggableBlock/index.svg +9 -0
- package/dist/lexical/ui/icons/DraggableBlock/light.svg +9 -0
- package/dist/lexical/ui/icons/Edit/index.svg +10 -0
- package/dist/lexical/ui/icons/H1/index.d.ts +3 -0
- package/dist/lexical/ui/icons/H1/index.d.ts.map +1 -0
- package/dist/lexical/ui/icons/H1/index.js +19 -0
- package/dist/lexical/ui/icons/H1/index.js.map +1 -0
- package/dist/lexical/ui/icons/H2/index.d.ts +3 -0
- package/dist/lexical/ui/icons/H2/index.d.ts.map +1 -0
- package/dist/lexical/ui/icons/H2/index.js +19 -0
- package/dist/lexical/ui/icons/H2/index.js.map +1 -0
- package/dist/lexical/ui/icons/H3/index.d.ts +3 -0
- package/dist/lexical/ui/icons/H3/index.d.ts.map +1 -0
- package/dist/lexical/ui/icons/H3/index.js +19 -0
- package/dist/lexical/ui/icons/H3/index.js.map +1 -0
- package/dist/lexical/ui/icons/H4/index.d.ts +3 -0
- package/dist/lexical/ui/icons/H4/index.d.ts.map +1 -0
- package/dist/lexical/ui/icons/H4/index.js +19 -0
- package/dist/lexical/ui/icons/H4/index.js.map +1 -0
- package/dist/lexical/ui/icons/H5/index.d.ts +3 -0
- package/dist/lexical/ui/icons/H5/index.d.ts.map +1 -0
- package/dist/lexical/ui/icons/H5/index.js +19 -0
- package/dist/lexical/ui/icons/H5/index.js.map +1 -0
- package/dist/lexical/ui/icons/H6/index.d.ts +3 -0
- package/dist/lexical/ui/icons/H6/index.d.ts.map +1 -0
- package/dist/lexical/ui/icons/H6/index.js +19 -0
- package/dist/lexical/ui/icons/H6/index.js.map +1 -0
- package/dist/lexical/ui/icons/HorizontalRule/index.d.ts +3 -0
- package/dist/lexical/ui/icons/HorizontalRule/index.d.ts.map +1 -0
- package/dist/lexical/ui/icons/HorizontalRule/index.js +22 -0
- package/dist/lexical/ui/icons/HorizontalRule/index.js.map +1 -0
- package/dist/lexical/ui/icons/IndentDecrease/index.d.ts +3 -0
- package/dist/lexical/ui/icons/IndentDecrease/index.d.ts.map +1 -0
- package/dist/lexical/ui/icons/IndentDecrease/index.js +31 -0
- package/dist/lexical/ui/icons/IndentDecrease/index.js.map +1 -0
- package/dist/lexical/ui/icons/IndentIncrease/index.d.ts +3 -0
- package/dist/lexical/ui/icons/IndentIncrease/index.d.ts.map +1 -0
- package/dist/lexical/ui/icons/IndentIncrease/index.js +31 -0
- package/dist/lexical/ui/icons/IndentIncrease/index.js.map +1 -0
- package/dist/lexical/ui/icons/InlineBlocks/index.d.ts +3 -0
- package/dist/lexical/ui/icons/InlineBlocks/index.d.ts.map +1 -0
- package/dist/lexical/ui/icons/InlineBlocks/index.js +21 -0
- package/dist/lexical/ui/icons/InlineBlocks/index.js.map +1 -0
- package/dist/lexical/ui/icons/Italic/index.d.ts +3 -0
- package/dist/lexical/ui/icons/Italic/index.d.ts.map +1 -0
- package/dist/lexical/ui/icons/Italic/index.js +19 -0
- package/dist/lexical/ui/icons/Italic/index.js.map +1 -0
- package/dist/lexical/ui/icons/Link/index.d.ts +3 -0
- package/dist/lexical/ui/icons/Link/index.d.ts.map +1 -0
- package/dist/lexical/ui/icons/Link/index.js +20 -0
- package/dist/lexical/ui/icons/Link/index.js.map +1 -0
- package/dist/lexical/ui/icons/Meatballs/index.d.ts +3 -0
- package/dist/lexical/ui/icons/Meatballs/index.d.ts.map +1 -0
- package/dist/lexical/ui/icons/Meatballs/index.js +22 -0
- package/dist/lexical/ui/icons/Meatballs/index.js.map +1 -0
- package/dist/lexical/ui/icons/OrderedList/index.d.ts +3 -0
- package/dist/lexical/ui/icons/OrderedList/index.d.ts.map +1 -0
- package/dist/lexical/ui/icons/OrderedList/index.js +34 -0
- package/dist/lexical/ui/icons/OrderedList/index.js.map +1 -0
- package/dist/lexical/ui/icons/Relationship/index.d.ts +3 -0
- package/dist/lexical/ui/icons/Relationship/index.d.ts.map +1 -0
- package/dist/lexical/ui/icons/Relationship/index.js +34 -0
- package/dist/lexical/ui/icons/Relationship/index.js.map +1 -0
- package/dist/lexical/ui/icons/Remove/index.svg +4 -0
- package/dist/lexical/ui/icons/Strikethrough/index.d.ts +3 -0
- package/dist/lexical/ui/icons/Strikethrough/index.d.ts.map +1 -0
- package/dist/lexical/ui/icons/Strikethrough/index.js +22 -0
- package/dist/lexical/ui/icons/Strikethrough/index.js.map +1 -0
- package/dist/lexical/ui/icons/Subscript/index.d.ts +3 -0
- package/dist/lexical/ui/icons/Subscript/index.d.ts.map +1 -0
- package/dist/lexical/ui/icons/Subscript/index.js +19 -0
- package/dist/lexical/ui/icons/Subscript/index.js.map +1 -0
- package/dist/lexical/ui/icons/Superscript/index.d.ts +3 -0
- package/dist/lexical/ui/icons/Superscript/index.d.ts.map +1 -0
- package/dist/lexical/ui/icons/Superscript/index.js +19 -0
- package/dist/lexical/ui/icons/Superscript/index.js.map +1 -0
- package/dist/lexical/ui/icons/Table/index.d.ts +3 -0
- package/dist/lexical/ui/icons/Table/index.d.ts.map +1 -0
- package/dist/lexical/ui/icons/Table/index.js +21 -0
- package/dist/lexical/ui/icons/Table/index.js.map +1 -0
- package/dist/lexical/ui/icons/Text/index.d.ts +3 -0
- package/dist/lexical/ui/icons/Text/index.d.ts.map +1 -0
- package/dist/lexical/ui/icons/Text/index.js +19 -0
- package/dist/lexical/ui/icons/Text/index.js.map +1 -0
- package/dist/lexical/ui/icons/TextState/index.d.ts +5 -0
- package/dist/lexical/ui/icons/TextState/index.d.ts.map +1 -0
- package/dist/lexical/ui/icons/TextState/index.js +23 -0
- package/dist/lexical/ui/icons/TextState/index.js.map +1 -0
- package/dist/lexical/ui/icons/Underline/index.d.ts +3 -0
- package/dist/lexical/ui/icons/Underline/index.d.ts.map +1 -0
- package/dist/lexical/ui/icons/Underline/index.js +22 -0
- package/dist/lexical/ui/icons/Underline/index.js.map +1 -0
- package/dist/lexical/ui/icons/UnorderedList/index.d.ts +3 -0
- package/dist/lexical/ui/icons/UnorderedList/index.d.ts.map +1 -0
- package/dist/lexical/ui/icons/UnorderedList/index.js +49 -0
- package/dist/lexical/ui/icons/UnorderedList/index.js.map +1 -0
- package/dist/lexical/ui/icons/Upload/index.d.ts +3 -0
- package/dist/lexical/ui/icons/Upload/index.d.ts.map +1 -0
- package/dist/lexical/ui/icons/Upload/index.js +31 -0
- package/dist/lexical/ui/icons/Upload/index.js.map +1 -0
- package/dist/lexical/utils/canUseDOM.d.ts +2 -0
- package/dist/lexical/utils/canUseDOM.d.ts.map +1 -0
- package/dist/lexical/utils/canUseDOM.js +4 -0
- package/dist/lexical/utils/canUseDOM.js.map +1 -0
- package/dist/lexical/utils/environment.d.ts +18 -0
- package/dist/lexical/utils/environment.d.ts.map +1 -0
- package/dist/lexical/utils/environment.js +15 -0
- package/dist/lexical/utils/environment.js.map +1 -0
- package/dist/lexical/utils/getDOMRangeRect.d.ts +2 -0
- package/dist/lexical/utils/getDOMRangeRect.d.ts.map +1 -0
- package/dist/lexical/utils/getDOMRangeRect.js +17 -0
- package/dist/lexical/utils/getDOMRangeRect.js.map +1 -0
- package/dist/lexical/utils/getSelectedNode.d.ts +3 -0
- package/dist/lexical/utils/getSelectedNode.d.ts.map +1 -0
- package/dist/lexical/utils/getSelectedNode.js +22 -0
- package/dist/lexical/utils/getSelectedNode.js.map +1 -0
- package/dist/lexical/utils/guard.d.ts +5 -0
- package/dist/lexical/utils/guard.d.ts.map +1 -0
- package/dist/lexical/utils/guard.js +9 -0
- package/dist/lexical/utils/guard.js.map +1 -0
- package/dist/lexical/utils/joinClasses.d.ts +2 -0
- package/dist/lexical/utils/joinClasses.d.ts.map +1 -0
- package/dist/lexical/utils/joinClasses.js +6 -0
- package/dist/lexical/utils/joinClasses.js.map +1 -0
- package/dist/lexical/utils/markdown/createBlockNode.d.ts +4 -0
- package/dist/lexical/utils/markdown/createBlockNode.d.ts.map +1 -0
- package/dist/lexical/utils/markdown/createBlockNode.js +11 -0
- package/dist/lexical/utils/markdown/createBlockNode.js.map +1 -0
- package/dist/lexical/utils/nodeFormat.d.ts +41 -0
- package/dist/lexical/utils/nodeFormat.d.ts.map +1 -0
- package/dist/lexical/utils/nodeFormat.js +87 -0
- package/dist/lexical/utils/nodeFormat.js.map +1 -0
- package/dist/lexical/utils/point.d.ts +15 -0
- package/dist/lexical/utils/point.d.ts.map +1 -0
- package/dist/lexical/utils/point.js +45 -0
- package/dist/lexical/utils/point.js.map +1 -0
- package/dist/lexical/utils/rect.d.ts +47 -0
- package/dist/lexical/utils/rect.d.ts.map +1 -0
- package/dist/lexical/utils/rect.js +171 -0
- package/dist/lexical/utils/rect.js.map +1 -0
- package/dist/lexical/utils/setFloatingElemPosition.d.ts +12 -0
- package/dist/lexical/utils/setFloatingElemPosition.d.ts.map +1 -0
- package/dist/lexical/utils/setFloatingElemPosition.js +67 -0
- package/dist/lexical/utils/setFloatingElemPosition.js.map +1 -0
- package/dist/lexical/utils/setFloatingElemPositionForLinkEditor.d.ts +2 -0
- package/dist/lexical/utils/setFloatingElemPositionForLinkEditor.d.ts.map +1 -0
- package/dist/lexical/utils/setFloatingElemPositionForLinkEditor.js +28 -0
- package/dist/lexical/utils/setFloatingElemPositionForLinkEditor.js.map +1 -0
- package/dist/lexical/utils/swipe.d.ts +5 -0
- package/dist/lexical/utils/swipe.d.ts.map +1 -0
- package/dist/lexical/utils/swipe.js +99 -0
- package/dist/lexical/utils/swipe.js.map +1 -0
- package/dist/lexical/utils/url.d.ts +30 -0
- package/dist/lexical/utils/url.d.ts.map +1 -0
- package/dist/lexical/utils/url.js +84 -0
- package/dist/lexical/utils/url.js.map +1 -0
- package/dist/lexical/utils/url.spec.js +114 -0
- package/dist/lexical/utils/url.spec.js.map +1 -0
- package/dist/lexical-proxy/@lexical-headless.d.ts +2 -0
- package/dist/lexical-proxy/@lexical-headless.d.ts.map +1 -0
- package/dist/lexical-proxy/@lexical-headless.js +2 -0
- package/dist/lexical-proxy/@lexical-headless.js.map +1 -0
- package/dist/lexical-proxy/@lexical-html.d.ts +2 -0
- package/dist/lexical-proxy/@lexical-html.d.ts.map +1 -0
- package/dist/lexical-proxy/@lexical-html.js +2 -0
- package/dist/lexical-proxy/@lexical-html.js.map +1 -0
- package/dist/lexical-proxy/@lexical-link.d.ts +2 -0
- package/dist/lexical-proxy/@lexical-link.d.ts.map +1 -0
- package/dist/lexical-proxy/@lexical-link.js +2 -0
- package/dist/lexical-proxy/@lexical-link.js.map +1 -0
- package/dist/lexical-proxy/@lexical-list.d.ts +2 -0
- package/dist/lexical-proxy/@lexical-list.d.ts.map +1 -0
- package/dist/lexical-proxy/@lexical-list.js +2 -0
- package/dist/lexical-proxy/@lexical-list.js.map +1 -0
- package/dist/lexical-proxy/@lexical-mark.d.ts +2 -0
- package/dist/lexical-proxy/@lexical-mark.d.ts.map +1 -0
- package/dist/lexical-proxy/@lexical-mark.js +2 -0
- package/dist/lexical-proxy/@lexical-mark.js.map +1 -0
- package/dist/lexical-proxy/@lexical-markdown.d.ts +2 -0
- package/dist/lexical-proxy/@lexical-markdown.d.ts.map +1 -0
- package/dist/lexical-proxy/@lexical-markdown.js +2 -0
- package/dist/lexical-proxy/@lexical-markdown.js.map +1 -0
- package/dist/lexical-proxy/@lexical-react/LexicalAutoEmbedPlugin.d.ts +2 -0
- package/dist/lexical-proxy/@lexical-react/LexicalAutoEmbedPlugin.d.ts.map +1 -0
- package/dist/lexical-proxy/@lexical-react/LexicalAutoEmbedPlugin.js +2 -0
- package/dist/lexical-proxy/@lexical-react/LexicalAutoEmbedPlugin.js.map +1 -0
- package/dist/lexical-proxy/@lexical-react/LexicalAutoFocusPlugin.d.ts +2 -0
- package/dist/lexical-proxy/@lexical-react/LexicalAutoFocusPlugin.d.ts.map +1 -0
- package/dist/lexical-proxy/@lexical-react/LexicalAutoFocusPlugin.js +2 -0
- package/dist/lexical-proxy/@lexical-react/LexicalAutoFocusPlugin.js.map +1 -0
- package/dist/lexical-proxy/@lexical-react/LexicalAutoLinkPlugin.d.ts +2 -0
- package/dist/lexical-proxy/@lexical-react/LexicalAutoLinkPlugin.d.ts.map +1 -0
- package/dist/lexical-proxy/@lexical-react/LexicalAutoLinkPlugin.js +2 -0
- package/dist/lexical-proxy/@lexical-react/LexicalAutoLinkPlugin.js.map +1 -0
- package/dist/lexical-proxy/@lexical-react/LexicalBlockWithAlignableContents.d.ts +2 -0
- package/dist/lexical-proxy/@lexical-react/LexicalBlockWithAlignableContents.d.ts.map +1 -0
- package/dist/lexical-proxy/@lexical-react/LexicalBlockWithAlignableContents.js +2 -0
- package/dist/lexical-proxy/@lexical-react/LexicalBlockWithAlignableContents.js.map +1 -0
- package/dist/lexical-proxy/@lexical-react/LexicalCharacterLimitPlugin.d.ts +2 -0
- package/dist/lexical-proxy/@lexical-react/LexicalCharacterLimitPlugin.d.ts.map +1 -0
- package/dist/lexical-proxy/@lexical-react/LexicalCharacterLimitPlugin.js +2 -0
- package/dist/lexical-proxy/@lexical-react/LexicalCharacterLimitPlugin.js.map +1 -0
- package/dist/lexical-proxy/@lexical-react/LexicalCheckListPlugin.d.ts +2 -0
- package/dist/lexical-proxy/@lexical-react/LexicalCheckListPlugin.d.ts.map +1 -0
- package/dist/lexical-proxy/@lexical-react/LexicalCheckListPlugin.js +2 -0
- package/dist/lexical-proxy/@lexical-react/LexicalCheckListPlugin.js.map +1 -0
- package/dist/lexical-proxy/@lexical-react/LexicalClearEditorPlugin.d.ts +2 -0
- package/dist/lexical-proxy/@lexical-react/LexicalClearEditorPlugin.d.ts.map +1 -0
- package/dist/lexical-proxy/@lexical-react/LexicalClearEditorPlugin.js +2 -0
- package/dist/lexical-proxy/@lexical-react/LexicalClearEditorPlugin.js.map +1 -0
- package/dist/lexical-proxy/@lexical-react/LexicalClickableLinkPlugin.d.ts +2 -0
- package/dist/lexical-proxy/@lexical-react/LexicalClickableLinkPlugin.d.ts.map +1 -0
- package/dist/lexical-proxy/@lexical-react/LexicalClickableLinkPlugin.js +2 -0
- package/dist/lexical-proxy/@lexical-react/LexicalClickableLinkPlugin.js.map +1 -0
- package/dist/lexical-proxy/@lexical-react/LexicalCollaborationContext.d.ts +2 -0
- package/dist/lexical-proxy/@lexical-react/LexicalCollaborationContext.d.ts.map +1 -0
- package/dist/lexical-proxy/@lexical-react/LexicalCollaborationContext.js +2 -0
- package/dist/lexical-proxy/@lexical-react/LexicalCollaborationContext.js.map +1 -0
- package/dist/lexical-proxy/@lexical-react/LexicalCollaborationPlugin.d.ts +2 -0
- package/dist/lexical-proxy/@lexical-react/LexicalCollaborationPlugin.d.ts.map +1 -0
- package/dist/lexical-proxy/@lexical-react/LexicalCollaborationPlugin.js +2 -0
- package/dist/lexical-proxy/@lexical-react/LexicalCollaborationPlugin.js.map +1 -0
- package/dist/lexical-proxy/@lexical-react/LexicalComposer.d.ts +2 -0
- package/dist/lexical-proxy/@lexical-react/LexicalComposer.d.ts.map +1 -0
- package/dist/lexical-proxy/@lexical-react/LexicalComposer.js +2 -0
- package/dist/lexical-proxy/@lexical-react/LexicalComposer.js.map +1 -0
- package/dist/lexical-proxy/@lexical-react/LexicalComposerContext.d.ts +2 -0
- package/dist/lexical-proxy/@lexical-react/LexicalComposerContext.d.ts.map +1 -0
- package/dist/lexical-proxy/@lexical-react/LexicalComposerContext.js +2 -0
- package/dist/lexical-proxy/@lexical-react/LexicalComposerContext.js.map +1 -0
- package/dist/lexical-proxy/@lexical-react/LexicalContentEditable.d.ts +2 -0
- package/dist/lexical-proxy/@lexical-react/LexicalContentEditable.d.ts.map +1 -0
- package/dist/lexical-proxy/@lexical-react/LexicalContentEditable.js +2 -0
- package/dist/lexical-proxy/@lexical-react/LexicalContentEditable.js.map +1 -0
- package/dist/lexical-proxy/@lexical-react/LexicalContextMenuPlugin.d.ts +2 -0
- package/dist/lexical-proxy/@lexical-react/LexicalContextMenuPlugin.d.ts.map +1 -0
- package/dist/lexical-proxy/@lexical-react/LexicalContextMenuPlugin.js +2 -0
- package/dist/lexical-proxy/@lexical-react/LexicalContextMenuPlugin.js.map +1 -0
- package/dist/lexical-proxy/@lexical-react/LexicalDecoratorBlockNode.d.ts +2 -0
- package/dist/lexical-proxy/@lexical-react/LexicalDecoratorBlockNode.d.ts.map +1 -0
- package/dist/lexical-proxy/@lexical-react/LexicalDecoratorBlockNode.js +2 -0
- package/dist/lexical-proxy/@lexical-react/LexicalDecoratorBlockNode.js.map +1 -0
- package/dist/lexical-proxy/@lexical-react/LexicalDraggableBlockPlugin.d.ts +2 -0
- package/dist/lexical-proxy/@lexical-react/LexicalDraggableBlockPlugin.d.ts.map +1 -0
- package/dist/lexical-proxy/@lexical-react/LexicalDraggableBlockPlugin.js +2 -0
- package/dist/lexical-proxy/@lexical-react/LexicalDraggableBlockPlugin.js.map +1 -0
- package/dist/lexical-proxy/@lexical-react/LexicalEditorRefPlugin.d.ts +2 -0
- package/dist/lexical-proxy/@lexical-react/LexicalEditorRefPlugin.d.ts.map +1 -0
- package/dist/lexical-proxy/@lexical-react/LexicalEditorRefPlugin.js +2 -0
- package/dist/lexical-proxy/@lexical-react/LexicalEditorRefPlugin.js.map +1 -0
- package/dist/lexical-proxy/@lexical-react/LexicalErrorBoundary.d.ts +2 -0
- package/dist/lexical-proxy/@lexical-react/LexicalErrorBoundary.d.ts.map +1 -0
- package/dist/lexical-proxy/@lexical-react/LexicalErrorBoundary.js +2 -0
- package/dist/lexical-proxy/@lexical-react/LexicalErrorBoundary.js.map +1 -0
- package/dist/lexical-proxy/@lexical-react/LexicalHashtagPlugin.d.ts +2 -0
- package/dist/lexical-proxy/@lexical-react/LexicalHashtagPlugin.d.ts.map +1 -0
- package/dist/lexical-proxy/@lexical-react/LexicalHashtagPlugin.js +2 -0
- package/dist/lexical-proxy/@lexical-react/LexicalHashtagPlugin.js.map +1 -0
- package/dist/lexical-proxy/@lexical-react/LexicalHistoryPlugin.d.ts +2 -0
- package/dist/lexical-proxy/@lexical-react/LexicalHistoryPlugin.d.ts.map +1 -0
- package/dist/lexical-proxy/@lexical-react/LexicalHistoryPlugin.js +2 -0
- package/dist/lexical-proxy/@lexical-react/LexicalHistoryPlugin.js.map +1 -0
- package/dist/lexical-proxy/@lexical-react/LexicalHorizontalRuleNode.d.ts +2 -0
- package/dist/lexical-proxy/@lexical-react/LexicalHorizontalRuleNode.d.ts.map +1 -0
- package/dist/lexical-proxy/@lexical-react/LexicalHorizontalRuleNode.js +2 -0
- package/dist/lexical-proxy/@lexical-react/LexicalHorizontalRuleNode.js.map +1 -0
- package/dist/lexical-proxy/@lexical-react/LexicalHorizontalRulePlugin.d.ts +2 -0
- package/dist/lexical-proxy/@lexical-react/LexicalHorizontalRulePlugin.d.ts.map +1 -0
- package/dist/lexical-proxy/@lexical-react/LexicalHorizontalRulePlugin.js +2 -0
- package/dist/lexical-proxy/@lexical-react/LexicalHorizontalRulePlugin.js.map +1 -0
- package/dist/lexical-proxy/@lexical-react/LexicalLinkPlugin.d.ts +2 -0
- package/dist/lexical-proxy/@lexical-react/LexicalLinkPlugin.d.ts.map +1 -0
- package/dist/lexical-proxy/@lexical-react/LexicalLinkPlugin.js +2 -0
- package/dist/lexical-proxy/@lexical-react/LexicalLinkPlugin.js.map +1 -0
- package/dist/lexical-proxy/@lexical-react/LexicalListPlugin.d.ts +2 -0
- package/dist/lexical-proxy/@lexical-react/LexicalListPlugin.d.ts.map +1 -0
- package/dist/lexical-proxy/@lexical-react/LexicalListPlugin.js +2 -0
- package/dist/lexical-proxy/@lexical-react/LexicalListPlugin.js.map +1 -0
- package/dist/lexical-proxy/@lexical-react/LexicalMarkdownShortcutPlugin.d.ts +2 -0
- package/dist/lexical-proxy/@lexical-react/LexicalMarkdownShortcutPlugin.d.ts.map +1 -0
- package/dist/lexical-proxy/@lexical-react/LexicalMarkdownShortcutPlugin.js +2 -0
- package/dist/lexical-proxy/@lexical-react/LexicalMarkdownShortcutPlugin.js.map +1 -0
- package/dist/lexical-proxy/@lexical-react/LexicalNestedComposer.d.ts +2 -0
- package/dist/lexical-proxy/@lexical-react/LexicalNestedComposer.d.ts.map +1 -0
- package/dist/lexical-proxy/@lexical-react/LexicalNestedComposer.js +2 -0
- package/dist/lexical-proxy/@lexical-react/LexicalNestedComposer.js.map +1 -0
- package/dist/lexical-proxy/@lexical-react/LexicalNodeContextMenuPlugin.d.ts +2 -0
- package/dist/lexical-proxy/@lexical-react/LexicalNodeContextMenuPlugin.d.ts.map +1 -0
- package/dist/lexical-proxy/@lexical-react/LexicalNodeContextMenuPlugin.js +2 -0
- package/dist/lexical-proxy/@lexical-react/LexicalNodeContextMenuPlugin.js.map +1 -0
- package/dist/lexical-proxy/@lexical-react/LexicalNodeEventPlugin.d.ts +2 -0
- package/dist/lexical-proxy/@lexical-react/LexicalNodeEventPlugin.d.ts.map +1 -0
- package/dist/lexical-proxy/@lexical-react/LexicalNodeEventPlugin.js +2 -0
- package/dist/lexical-proxy/@lexical-react/LexicalNodeEventPlugin.js.map +1 -0
- package/dist/lexical-proxy/@lexical-react/LexicalNodeMenuPlugin.d.ts +2 -0
- package/dist/lexical-proxy/@lexical-react/LexicalNodeMenuPlugin.d.ts.map +1 -0
- package/dist/lexical-proxy/@lexical-react/LexicalNodeMenuPlugin.js +2 -0
- package/dist/lexical-proxy/@lexical-react/LexicalNodeMenuPlugin.js.map +1 -0
- package/dist/lexical-proxy/@lexical-react/LexicalOnChangePlugin.d.ts +2 -0
- package/dist/lexical-proxy/@lexical-react/LexicalOnChangePlugin.d.ts.map +1 -0
- package/dist/lexical-proxy/@lexical-react/LexicalOnChangePlugin.js +2 -0
- package/dist/lexical-proxy/@lexical-react/LexicalOnChangePlugin.js.map +1 -0
- package/dist/lexical-proxy/@lexical-react/LexicalPlainTextPlugin.d.ts +2 -0
- package/dist/lexical-proxy/@lexical-react/LexicalPlainTextPlugin.d.ts.map +1 -0
- package/dist/lexical-proxy/@lexical-react/LexicalPlainTextPlugin.js +2 -0
- package/dist/lexical-proxy/@lexical-react/LexicalPlainTextPlugin.js.map +1 -0
- package/dist/lexical-proxy/@lexical-react/LexicalRichTextPlugin.d.ts +2 -0
- package/dist/lexical-proxy/@lexical-react/LexicalRichTextPlugin.d.ts.map +1 -0
- package/dist/lexical-proxy/@lexical-react/LexicalRichTextPlugin.js +2 -0
- package/dist/lexical-proxy/@lexical-react/LexicalRichTextPlugin.js.map +1 -0
- package/dist/lexical-proxy/@lexical-react/LexicalTabIndentationPlugin.d.ts +2 -0
- package/dist/lexical-proxy/@lexical-react/LexicalTabIndentationPlugin.d.ts.map +1 -0
- package/dist/lexical-proxy/@lexical-react/LexicalTabIndentationPlugin.js +2 -0
- package/dist/lexical-proxy/@lexical-react/LexicalTabIndentationPlugin.js.map +1 -0
- package/dist/lexical-proxy/@lexical-react/LexicalTableOfContentsPlugin.d.ts +2 -0
- package/dist/lexical-proxy/@lexical-react/LexicalTableOfContentsPlugin.d.ts.map +1 -0
- package/dist/lexical-proxy/@lexical-react/LexicalTableOfContentsPlugin.js +2 -0
- package/dist/lexical-proxy/@lexical-react/LexicalTableOfContentsPlugin.js.map +1 -0
- package/dist/lexical-proxy/@lexical-react/LexicalTablePlugin.d.ts +2 -0
- package/dist/lexical-proxy/@lexical-react/LexicalTablePlugin.d.ts.map +1 -0
- package/dist/lexical-proxy/@lexical-react/LexicalTablePlugin.js +2 -0
- package/dist/lexical-proxy/@lexical-react/LexicalTablePlugin.js.map +1 -0
- package/dist/lexical-proxy/@lexical-react/LexicalTreeView.d.ts +2 -0
- package/dist/lexical-proxy/@lexical-react/LexicalTreeView.d.ts.map +1 -0
- package/dist/lexical-proxy/@lexical-react/LexicalTreeView.js +2 -0
- package/dist/lexical-proxy/@lexical-react/LexicalTreeView.js.map +1 -0
- package/dist/lexical-proxy/@lexical-react/LexicalTypeaheadMenuPlugin.d.ts +2 -0
- package/dist/lexical-proxy/@lexical-react/LexicalTypeaheadMenuPlugin.d.ts.map +1 -0
- package/dist/lexical-proxy/@lexical-react/LexicalTypeaheadMenuPlugin.js +2 -0
- package/dist/lexical-proxy/@lexical-react/LexicalTypeaheadMenuPlugin.js.map +1 -0
- package/dist/lexical-proxy/@lexical-react/useLexicalEditable.d.ts +2 -0
- package/dist/lexical-proxy/@lexical-react/useLexicalEditable.d.ts.map +1 -0
- package/dist/lexical-proxy/@lexical-react/useLexicalEditable.js +2 -0
- package/dist/lexical-proxy/@lexical-react/useLexicalEditable.js.map +1 -0
- package/dist/lexical-proxy/@lexical-react/useLexicalIsTextContentEmpty.d.ts +2 -0
- package/dist/lexical-proxy/@lexical-react/useLexicalIsTextContentEmpty.d.ts.map +1 -0
- package/dist/lexical-proxy/@lexical-react/useLexicalIsTextContentEmpty.js +2 -0
- package/dist/lexical-proxy/@lexical-react/useLexicalIsTextContentEmpty.js.map +1 -0
- package/dist/lexical-proxy/@lexical-react/useLexicalNodeSelection.d.ts +2 -0
- package/dist/lexical-proxy/@lexical-react/useLexicalNodeSelection.d.ts.map +1 -0
- package/dist/lexical-proxy/@lexical-react/useLexicalNodeSelection.js +2 -0
- package/dist/lexical-proxy/@lexical-react/useLexicalNodeSelection.js.map +1 -0
- package/dist/lexical-proxy/@lexical-react/useLexicalSubscription.d.ts +2 -0
- package/dist/lexical-proxy/@lexical-react/useLexicalSubscription.d.ts.map +1 -0
- package/dist/lexical-proxy/@lexical-react/useLexicalSubscription.js +2 -0
- package/dist/lexical-proxy/@lexical-react/useLexicalSubscription.js.map +1 -0
- package/dist/lexical-proxy/@lexical-react/useLexicalTextEntity.d.ts +2 -0
- package/dist/lexical-proxy/@lexical-react/useLexicalTextEntity.d.ts.map +1 -0
- package/dist/lexical-proxy/@lexical-react/useLexicalTextEntity.js +2 -0
- package/dist/lexical-proxy/@lexical-react/useLexicalTextEntity.js.map +1 -0
- package/dist/lexical-proxy/@lexical-rich-text.d.ts +2 -0
- package/dist/lexical-proxy/@lexical-rich-text.d.ts.map +1 -0
- package/dist/lexical-proxy/@lexical-rich-text.js +2 -0
- package/dist/lexical-proxy/@lexical-rich-text.js.map +1 -0
- package/dist/lexical-proxy/@lexical-selection.d.ts +2 -0
- package/dist/lexical-proxy/@lexical-selection.d.ts.map +1 -0
- package/dist/lexical-proxy/@lexical-selection.js +2 -0
- package/dist/lexical-proxy/@lexical-selection.js.map +1 -0
- package/dist/lexical-proxy/@lexical-utils.d.ts +2 -0
- package/dist/lexical-proxy/@lexical-utils.d.ts.map +1 -0
- package/dist/lexical-proxy/@lexical-utils.js +2 -0
- package/dist/lexical-proxy/@lexical-utils.js.map +1 -0
- package/dist/lexical-proxy/lexical.d.ts +2 -0
- package/dist/lexical-proxy/lexical.d.ts.map +1 -0
- package/dist/lexical-proxy/lexical.js +2 -0
- package/dist/lexical-proxy/lexical.js.map +1 -0
- package/dist/nodeTypes.d.ts +74 -0
- package/dist/nodeTypes.d.ts.map +1 -0
- package/dist/nodeTypes.js +5 -0
- package/dist/nodeTypes.js.map +1 -0
- package/dist/packages/@lexical/markdown/MarkdownExport.d.ts +14 -0
- package/dist/packages/@lexical/markdown/MarkdownExport.d.ts.map +1 -0
- package/dist/packages/@lexical/markdown/MarkdownExport.js +213 -0
- package/dist/packages/@lexical/markdown/MarkdownExport.js.map +1 -0
- package/dist/packages/@lexical/markdown/MarkdownImport.d.ts +19 -0
- package/dist/packages/@lexical/markdown/MarkdownImport.d.ts.map +1 -0
- package/dist/packages/@lexical/markdown/MarkdownImport.js +199 -0
- package/dist/packages/@lexical/markdown/MarkdownImport.js.map +1 -0
- package/dist/packages/@lexical/markdown/MarkdownShortcuts.d.ts +11 -0
- package/dist/packages/@lexical/markdown/MarkdownShortcuts.d.ts.map +1 -0
- package/dist/packages/@lexical/markdown/MarkdownShortcuts.js +304 -0
- package/dist/packages/@lexical/markdown/MarkdownShortcuts.js.map +1 -0
- package/dist/packages/@lexical/markdown/MarkdownTransformers.d.ts +147 -0
- package/dist/packages/@lexical/markdown/MarkdownTransformers.d.ts.map +1 -0
- package/dist/packages/@lexical/markdown/MarkdownTransformers.js +268 -0
- package/dist/packages/@lexical/markdown/MarkdownTransformers.js.map +1 -0
- package/dist/packages/@lexical/markdown/importTextFormatTransformer.d.ts +22 -0
- package/dist/packages/@lexical/markdown/importTextFormatTransformer.d.ts.map +1 -0
- package/dist/packages/@lexical/markdown/importTextFormatTransformer.js +91 -0
- package/dist/packages/@lexical/markdown/importTextFormatTransformer.js.map +1 -0
- package/dist/packages/@lexical/markdown/importTextMatchTransformer.d.ts +21 -0
- package/dist/packages/@lexical/markdown/importTextMatchTransformer.d.ts.map +1 -0
- package/dist/packages/@lexical/markdown/importTextMatchTransformer.js +54 -0
- package/dist/packages/@lexical/markdown/importTextMatchTransformer.js.map +1 -0
- package/dist/packages/@lexical/markdown/importTextTransformers.d.ts +18 -0
- package/dist/packages/@lexical/markdown/importTextTransformers.d.ts.map +1 -0
- package/dist/packages/@lexical/markdown/importTextTransformers.js +54 -0
- package/dist/packages/@lexical/markdown/importTextTransformers.js.map +1 -0
- package/dist/packages/@lexical/markdown/index.d.ts +29 -0
- package/dist/packages/@lexical/markdown/index.d.ts.map +1 -0
- package/dist/packages/@lexical/markdown/index.js +39 -0
- package/dist/packages/@lexical/markdown/index.js.map +1 -0
- package/dist/packages/@lexical/markdown/utils.d.ts +34 -0
- package/dist/packages/@lexical/markdown/utils.d.ts.map +1 -0
- package/dist/packages/@lexical/markdown/utils.js +267 -0
- package/dist/packages/@lexical/markdown/utils.js.map +1 -0
- package/dist/populateGraphQL/defaultValue.d.ts +3 -0
- package/dist/populateGraphQL/defaultValue.d.ts.map +1 -0
- package/dist/populateGraphQL/defaultValue.js +28 -0
- package/dist/populateGraphQL/defaultValue.js.map +1 -0
- package/dist/populateGraphQL/populate.d.ts +18 -0
- package/dist/populateGraphQL/populate.d.ts.map +1 -0
- package/dist/populateGraphQL/populate.js +40 -0
- package/dist/populateGraphQL/populate.js.map +1 -0
- package/dist/populateGraphQL/populateLexicalPopulationPromises.d.ts +13 -0
- package/dist/populateGraphQL/populateLexicalPopulationPromises.d.ts.map +1 -0
- package/dist/populateGraphQL/populateLexicalPopulationPromises.js +55 -0
- package/dist/populateGraphQL/populateLexicalPopulationPromises.js.map +1 -0
- package/dist/populateGraphQL/recursivelyPopulateFieldsForGraphQL.d.ts +29 -0
- package/dist/populateGraphQL/recursivelyPopulateFieldsForGraphQL.d.ts.map +1 -0
- package/dist/populateGraphQL/recursivelyPopulateFieldsForGraphQL.js +45 -0
- package/dist/populateGraphQL/recursivelyPopulateFieldsForGraphQL.js.map +1 -0
- package/dist/types.d.ts +109 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +2 -0
- package/dist/types.js.map +1 -0
- package/dist/utilities/applyBaseFilterToFields.d.ts +10 -0
- package/dist/utilities/applyBaseFilterToFields.d.ts.map +1 -0
- package/dist/utilities/applyBaseFilterToFields.js +97 -0
- package/dist/utilities/applyBaseFilterToFields.js.map +1 -0
- package/dist/utilities/buildEditorState.d.ts +52 -0
- package/dist/utilities/buildEditorState.d.ts.map +1 -0
- package/dist/utilities/buildEditorState.js +85 -0
- package/dist/utilities/buildEditorState.js.map +1 -0
- package/dist/utilities/buildInitialState.d.ts +30 -0
- package/dist/utilities/buildInitialState.d.ts.map +1 -0
- package/dist/utilities/buildInitialState.js +57 -0
- package/dist/utilities/buildInitialState.js.map +1 -0
- package/dist/utilities/createClientFeature.d.ts +18 -0
- package/dist/utilities/createClientFeature.d.ts.map +1 -0
- package/dist/utilities/createClientFeature.js +51 -0
- package/dist/utilities/createClientFeature.js.map +1 -0
- package/dist/utilities/createServerFeature.d.ts +17 -0
- package/dist/utilities/createServerFeature.d.ts.map +1 -0
- package/dist/utilities/createServerFeature.js +51 -0
- package/dist/utilities/createServerFeature.js.map +1 -0
- package/dist/utilities/editorConfigFactory.d.ts +57 -0
- package/dist/utilities/editorConfigFactory.d.ts.map +1 -0
- package/dist/utilities/editorConfigFactory.js +89 -0
- package/dist/utilities/editorConfigFactory.js.map +1 -0
- package/dist/utilities/fieldsDrawer/Drawer.d.ts +21 -0
- package/dist/utilities/fieldsDrawer/Drawer.d.ts.map +1 -0
- package/dist/utilities/fieldsDrawer/Drawer.js +80 -0
- package/dist/utilities/fieldsDrawer/Drawer.js.map +1 -0
- package/dist/utilities/fieldsDrawer/DrawerContent.d.ts +4 -0
- package/dist/utilities/fieldsDrawer/DrawerContent.d.ts.map +1 -0
- package/dist/utilities/fieldsDrawer/DrawerContent.js +138 -0
- package/dist/utilities/fieldsDrawer/DrawerContent.js.map +1 -0
- package/dist/utilities/fieldsDrawer/useLexicalDocumentDrawer.d.ts +13 -0
- package/dist/utilities/fieldsDrawer/useLexicalDocumentDrawer.d.ts.map +1 -0
- package/dist/utilities/fieldsDrawer/useLexicalDocumentDrawer.js +129 -0
- package/dist/utilities/fieldsDrawer/useLexicalDocumentDrawer.js.map +1 -0
- package/dist/utilities/fieldsDrawer/useLexicalDrawer.d.ts +10 -0
- package/dist/utilities/fieldsDrawer/useLexicalDrawer.d.ts.map +1 -0
- package/dist/utilities/fieldsDrawer/useLexicalDrawer.js +136 -0
- package/dist/utilities/fieldsDrawer/useLexicalDrawer.js.map +1 -0
- package/dist/utilities/fieldsDrawer/useLexicalListDrawer.d.ts +16 -0
- package/dist/utilities/fieldsDrawer/useLexicalListDrawer.d.ts.map +1 -0
- package/dist/utilities/fieldsDrawer/useLexicalListDrawer.js +154 -0
- package/dist/utilities/fieldsDrawer/useLexicalListDrawer.js.map +1 -0
- package/dist/utilities/forEachNodeRecursively.d.ts +10 -0
- package/dist/utilities/forEachNodeRecursively.d.ts.map +1 -0
- package/dist/utilities/forEachNodeRecursively.js +29 -0
- package/dist/utilities/forEachNodeRecursively.js.map +1 -0
- package/dist/utilities/generateImportMap.d.ts +8 -0
- package/dist/utilities/generateImportMap.d.ts.map +1 -0
- package/dist/utilities/generateImportMap.js +52 -0
- package/dist/utilities/generateImportMap.js.map +1 -0
- package/dist/utilities/generateSchemaMap.d.ts +6 -0
- package/dist/utilities/generateSchemaMap.d.ts.map +1 -0
- package/dist/utilities/generateSchemaMap.js +40 -0
- package/dist/utilities/generateSchemaMap.js.map +1 -0
- package/dist/utilities/getDefaultSanitizedEditorConfig.d.ts +7 -0
- package/dist/utilities/getDefaultSanitizedEditorConfig.d.ts.map +1 -0
- package/dist/utilities/getDefaultSanitizedEditorConfig.js +21 -0
- package/dist/utilities/getDefaultSanitizedEditorConfig.js.map +1 -0
- package/dist/utilities/initLexicalFeatures.d.ts +20 -0
- package/dist/utilities/initLexicalFeatures.d.ts.map +1 -0
- package/dist/utilities/initLexicalFeatures.js +72 -0
- package/dist/utilities/initLexicalFeatures.js.map +1 -0
- package/dist/utilities/jsx/collectTopLevelJSXInLines.d.ts +52 -0
- package/dist/utilities/jsx/collectTopLevelJSXInLines.d.ts.map +1 -0
- package/dist/utilities/jsx/collectTopLevelJSXInLines.js +80 -0
- package/dist/utilities/jsx/collectTopLevelJSXInLines.js.map +1 -0
- package/dist/utilities/jsx/declare.d.js +2 -0
- package/dist/utilities/jsx/declare.d.js.map +1 -0
- package/dist/utilities/jsx/extractPropsFromJSXPropsString.d.ts +12 -0
- package/dist/utilities/jsx/extractPropsFromJSXPropsString.d.ts.map +1 -0
- package/dist/utilities/jsx/extractPropsFromJSXPropsString.js +129 -0
- package/dist/utilities/jsx/extractPropsFromJSXPropsString.js.map +1 -0
- package/dist/utilities/jsx/jsx.d.ts +26 -0
- package/dist/utilities/jsx/jsx.d.ts.map +1 -0
- package/dist/utilities/jsx/jsx.js +106 -0
- package/dist/utilities/jsx/jsx.js.map +1 -0
- package/dist/utilities/jsx/jsx.spec.js +178 -0
- package/dist/utilities/jsx/jsx.spec.js.map +1 -0
- package/dist/utilities/migrateSlateToLexical/index.d.ts +15 -0
- package/dist/utilities/migrateSlateToLexical/index.d.ts.map +1 -0
- package/dist/utilities/migrateSlateToLexical/index.js +153 -0
- package/dist/utilities/migrateSlateToLexical/index.js.map +1 -0
- package/dist/utilities/migrateSlateToLexical/migrateDocumentFieldsRecursively.d.ts +10 -0
- package/dist/utilities/migrateSlateToLexical/migrateDocumentFieldsRecursively.d.ts.map +1 -0
- package/dist/utilities/migrateSlateToLexical/migrateDocumentFieldsRecursively.js +85 -0
- package/dist/utilities/migrateSlateToLexical/migrateDocumentFieldsRecursively.js.map +1 -0
- package/dist/utilities/recurseNodeTree.d.ts +9 -0
- package/dist/utilities/recurseNodeTree.d.ts.map +1 -0
- package/dist/utilities/recurseNodeTree.js +30 -0
- package/dist/utilities/recurseNodeTree.js.map +1 -0
- package/dist/utilities/upgradeLexicalData/index.d.ts +11 -0
- package/dist/utilities/upgradeLexicalData/index.d.ts.map +1 -0
- package/dist/utilities/upgradeLexicalData/index.js +118 -0
- package/dist/utilities/upgradeLexicalData/index.js.map +1 -0
- package/dist/utilities/upgradeLexicalData/upgradeDocumentFieldsRecursively.d.ts +10 -0
- package/dist/utilities/upgradeLexicalData/upgradeDocumentFieldsRecursively.d.ts.map +1 -0
- package/dist/utilities/upgradeLexicalData/upgradeDocumentFieldsRecursively.js +88 -0
- package/dist/utilities/upgradeLexicalData/upgradeDocumentFieldsRecursively.js.map +1 -0
- package/dist/utilities/useLexicalFeature.d.ts +3 -0
- package/dist/utilities/useLexicalFeature.d.ts.map +1 -0
- package/dist/utilities/useLexicalFeature.js +21 -0
- package/dist/utilities/useLexicalFeature.js.map +1 -0
- package/dist/utilities/useRunDeprioritized.d.ts +26 -0
- package/dist/utilities/useRunDeprioritized.d.ts.map +1 -0
- package/dist/utilities/useRunDeprioritized.js +68 -0
- package/dist/utilities/useRunDeprioritized.js.map +1 -0
- package/dist/validate/hasText.d.ts +3 -0
- package/dist/validate/hasText.d.ts.map +1 -0
- package/dist/validate/hasText.js +25 -0
- package/dist/validate/hasText.js.map +1 -0
- package/dist/validate/index.d.ts +7 -0
- package/dist/validate/index.d.ts.map +1 -0
- package/dist/validate/index.js +33 -0
- package/dist/validate/index.js.map +1 -0
- package/dist/validate/validateNodes.d.ts +12 -0
- package/dist/validate/validateNodes.d.ts.map +1 -0
- package/dist/validate/validateNodes.js +35 -0
- package/dist/validate/validateNodes.js.map +1 -0
- package/package.json +747 -0
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
var rt=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";import{c as de}from"react/compiler-runtime";import{useRef as me}from"react";function Wn(n){let t=de(2),e=n===void 0?500:n,o=me(void 0),r;return t[0]!==e?(r=s=>new Promise(i=>{let a=()=>{s(),i()};"requestIdleCallback"in window?("cancelIdleCallback"in window&&o.current!==void 0&&cancelIdleCallback(o.current),o.current=requestIdleCallback(a,{timeout:e})):ge().then(a)}),t[0]=e,t[1]=r):r=t[1],r}function ge(){return new Promise(n=>{setTimeout(n,100),requestAnimationFrame(()=>{setTimeout(n,0)})})}var z=class{_x;_y;constructor(t,e){this._x=t,this._y=e}calcDeltaXTo({x:t}){return this.x-t}calcDeltaYTo({y:t}){return this.y-t}calcDistanceTo(t){return Math.sqrt(Math.pow(this.calcDeltaXTo(t),2)+Math.pow(this.calcDeltaYTo(t),2))}calcHorizontalDistanceTo(t){return Math.abs(this.calcDeltaXTo(t))}calcVerticalDistance(t){return Math.abs(this.calcDeltaYTo(t))}equals({x:t,y:e}){return this.x===t&&this.y===e}get x(){return this._x}get y(){return this._y}};function it(n){return n instanceof z}import{jsx as Me}from"react/jsx-runtime";import{useLexicalComposerContext as Le}from"@lexical/react/LexicalComposerContext.js";import{mergeRegister as $e}from"@lexical/utils";import{$getSelection as W,$isRangeSelection as q,$isTextNode as De,COMMAND_PRIORITY_LOW as Be,createCommand as Pe,getDOMSelection as ve}from"lexical";import{useCallback as ht,useEffect as xt,useState as He}from"react";import*as Y from"react";import{c as ut}from"react/compiler-runtime";import{useLexicalComposerContext as dt}from"@lexical/react/LexicalComposerContext.js";import{mergeRegister as st}from"@lexical/utils";import{$getSelection as mt,$isRangeSelection as pe,$setSelection as he,COMMAND_PRIORITY_LOW as ct,COMMAND_PRIORITY_NORMAL as $,createCommand as xe,KEY_ARROW_DOWN_COMMAND as Ee,KEY_ARROW_UP_COMMAND as _e,KEY_ENTER_COMMAND as Te,KEY_ESCAPE_COMMAND as Se,KEY_TAB_COMMAND as we}from"lexical";import{useCallback as X,useEffect as N,useLayoutEffect as Re,useMemo as Ce,useRef as Fe,useState as Ie}from"react";var Ne="slash-menu-popup",at=n=>{let t=document.getElementById("slash-menu");if(!t)return;let e=t.getBoundingClientRect();e.top+e.height>window.innerHeight&&t.scrollIntoView({block:"center"}),e.top<0&&t.scrollIntoView({block:"center"}),n.scrollIntoView({block:"nearest"})};function ye(n,t,e){let o=e;for(let r=o;r<=t.length;r++)n.substring(n.length-r)===t.substring(0,r)&&(o=r);return o}function be(n){let t=mt();if(!pe(t)||!t.isCollapsed())return;let e=t.anchor;if(e.type!=="text")return;let o=e.getNode();if(!o.isSimpleText())return;let r=e.offset,c=o.getTextContent().slice(0,r),s=n.replaceableString.length,i=ye(c,n.matchingString,s),a=r-i;if(a<0)return;let l;return a===0?[l]=o.splitText(r):[,l]=o.splitText(a,r),l}function Ae(n,t){let e=getComputedStyle(n),o=e.position==="absolute",r=t?/(auto|scroll|hidden)/:/(auto|scroll)/;if(e.position==="fixed")return document.body;for(let c=n;c=c.parentElement;)if(e=getComputedStyle(c),!(o&&e.position==="static")&&r.test(e.overflow+e.overflowY+e.overflowX))return c;return document.body}function lt(n,t){let e=n.getBoundingClientRect(),o=t.getBoundingClientRect();return e.top>o.top&&e.top<o.bottom}function Oe(n,t,e,o){let r=ut(7),[c]=dt(),s,i;r[0]!==c||r[1]!==e||r[2]!==o||r[3]!==n||r[4]!==t?(s=()=>{let a=t.current;if(a!=null&&n!=null){let l=c.getRootElement(),u=l!=null?Ae(l,!1):document.body,g=!1,m=lt(a,u),p=function(){g||(window.requestAnimationFrame(function(){e(),g=!1}),g=!0);let d=lt(a,u);d!==m&&(m=d,o?.(d))},f=new ResizeObserver(e);return window.addEventListener("resize",e),document.addEventListener("scroll",p,{capture:!0,passive:!0}),f.observe(a),()=>{f.disconnect(),window.removeEventListener("resize",e),document.removeEventListener("scroll",p,!0)}}},i=[c,o,e,n,t],r[0]=c,r[1]=e,r[2]=o,r[3]=n,r[4]=t,r[5]=s,r[6]=i):(s=r[5],i=r[6]),N(s,i)}var ft=xe("SCROLL_TYPEAHEAD_OPTION_INTO_VIEW_COMMAND");function gt({anchorElementRef:n,close:t,editor:e,groups:o,menuRenderFn:r,resolution:c,shouldSplitNodeWithQuery:s=!1}){let[i,a]=Ie(null),l=c.match&&c.match.matchingString||"",u=X(f=>{let d=e.getRootElement();d!==null&&(d.setAttribute("aria-activedescendant",`${Ne}__item-${f.key}`),a(f.key))},[e]),g=X(()=>{if(o!==null&&l!=null){let f=o.flatMap(d=>d.items);if(f.length){let d=f[0];u(d)}}},[o,u,l]);N(()=>{g()},[l,g]);let m=X(f=>{t(),e.update(()=>{let d=c.match!=null&&s?be(c.match):null;d&&d.remove()}),setTimeout(()=>{let d;e.read(()=>{d=mt()?.clone()}),e.update(()=>{d&&he(d)}),f.onSelect({editor:e,queryString:c.match?c.match.matchingString:""})},0)},[e,s,c.match,t]);N(()=>()=>{let f=e.getRootElement();f!==null&&f.removeAttribute("aria-activedescendant")},[e]),Re(()=>{o===null?a(null):i===null&&g()},[o,i,u,g]),N(()=>st(e.registerCommand(ft,({item:f})=>f.ref&&f.ref.current!=null?(at(f.ref.current),!0):!1,ct)),[e,u]),N(()=>st(e.registerCommand(Ee,f=>{let d=f;if(o!==null&&o.length&&i!==null){let h=o.flatMap(T=>T.items),x=h.findIndex(T=>T.key===i),E=x!==h.length-1?x+1:0,_=h[E];if(!_)return!1;u(_),_.ref!=null&&_.ref.current&&e.dispatchCommand(ft,{index:E,item:_}),d.preventDefault(),d.stopImmediatePropagation()}return!0},$),e.registerCommand(_e,f=>{let d=f;if(o!==null&&o.length&&i!==null){let h=o.flatMap(T=>T.items),x=h.findIndex(T=>T.key===i),E=x!==0?x-1:h.length-1,_=h[E];if(!_)return!1;u(_),_.ref!=null&&_.ref.current&&at(_.ref.current),d.preventDefault(),d.stopImmediatePropagation()}return!0},$),e.registerCommand(Se,f=>{let d=f;return d.preventDefault(),d.stopImmediatePropagation(),t(),!0},ct),e.registerCommand(we,f=>{let d=f;if(o===null||i===null)return!1;let x=o.flatMap(E=>E.items).find(E=>E.key===i);return x?(d.preventDefault(),d.stopImmediatePropagation(),m(x),!0):!1},$),e.registerCommand(Te,f=>{if(o===null||i===null)return!1;let h=o.flatMap(x=>x.items).find(x=>x.key===i);return h?(f!==null&&(f.preventDefault(),f.stopImmediatePropagation()),m(h),!0):!1},$)),[m,t,e,o,i,u]);let p=Ce(()=>({groups:o,selectedItemKey:i,selectItemAndCleanUp:m,setSelectedItemKey:a}),[m,i,o]);return r(n,p,c.match?c.match.matchingString:"")}function ke(n,t){t!=null&&(n.className=t),n.setAttribute("aria-label","Slash menu"),n.setAttribute("role","listbox"),n.style.display="block",n.style.position="absolute"}function pt(n,t,e,o){let r=ut(14),[c]=dt(),s;r[0]===Symbol.for("react.memo_cache_sentinel")?(s=rt?document.createElement("div"):null,r[0]=s):s=r[0];let i=Fe(s),a;r[1]!==n||r[2]!==o||r[3]!==c||r[4]!==t?(a=()=>{if(i.current===null||parent===void 0)return;let f=c.getRootElement(),d=i.current,h=d.firstChild;if(f!==null&&t!==null){let{height:x,width:E}=t.getRect(),{left:_,top:T}=t.getRect(),I=T;if(T=T-(n.getBoundingClientRect().top+window.scrollY),_=_-(n.getBoundingClientRect().left+window.scrollX),d.style.left=`${_+window.scrollX}px`,d.style.height=`${x}px`,d.style.width=`${E}px`,h!==null){let S=h.getBoundingClientRect(),L=S.height,R=S.width,G=f.getBoundingClientRect(),nt=document.dir==="rtl"||document.documentElement.dir==="rtl",ae=n.getBoundingClientRect(),ot=Math.max(0,G.left);if(!nt&&_+R>G.right)d.style.left=`${G.right-R+window.scrollX}px`;else if(nt&&S.left<ot){let ue=ot+R-ae.left;d.style.left=`${ue+window.scrollX}px`}let le=I+L+32>window.innerHeight,fe=I<0;le&&!fe?d.style.top=`${T+32-L+window.scrollY-(x+24)}px`:d.style.top=`${T+window.scrollY+32}px`}d.isConnected||(ke(d,o),n.append(d)),d.setAttribute("id","slash-menu"),i.current=d,f.setAttribute("aria-controls","slash-menu")}},r[1]=n,r[2]=o,r[3]=c,r[4]=t,r[5]=a):a=r[5];let l=a,u,g;r[6]!==c||r[7]!==l||r[8]!==t?(u=()=>{let f=c.getRootElement();if(t!==null)return l(),()=>{f!==null&&f.removeAttribute("aria-controls");let d=i.current;d!==null&&d.isConnected&&(d.remove(),d.removeAttribute("id"))}},g=[c,l,t],r[6]=c,r[7]=l,r[8]=t,r[9]=u,r[10]=g):(u=r[9],g=r[10]),N(u,g);let m;return r[11]!==t||r[12]!==e?(m=f=>{t!==null&&(f||e(null))},r[11]=t,r[12]=e,r[13]=m):m=r[13],Oe(t,i,l,m),i}var lo=`\\.,\\+\\*\\?\\$\\@\\|#{}\\(\\)\\^\\-\\[\\]\\\\/!%'"~=<>_:;`;function Ke(n){let t=n.anchor;if(t.type!=="text")return null;let e=t.getNode();if(!e.isSimpleText())return null;let o=t.offset;return e.getTextContent().slice(0,o)}function Et(n,t,e){let o=ve(e);if(o===null||!o.isCollapsed)return!1;let r=o.anchorNode,c=n,s=o.anchorOffset;if(r==null||s==null)return!1;try{t.setStart(r,c),t.setEnd(r,s>1?s:1)}catch{return!1}return!0}function Ue(n){let t;return n.getEditorState().read(()=>{let e=W();q(e)&&(t=Ke(e))}),t}function _t(n,t){return t!==0?!1:n.getEditorState().read(()=>{let e=W();if(q(e)){let c=e.anchor.getNode().getPreviousSibling();return De(c)&&c.isTextEntity()}return!1})}function Tt(n){Y.startTransition?Y.startTransition(n):n()}var Ge=Pe("ENABLE_SLASH_MENU_COMMAND");function fo({anchorClassName:n,anchorElem:t,groups:e,menuRenderFn:o,onClose:r,onOpen:c,onQueryChange:s,triggerFn:i}){let[a]=Le(),[l,u]=He(null),g=pt(t,l,u,n),m=ht(()=>{u(null),r!=null&&l!==null&&r()},[r,l]),p=ht(f=>{u(f),c!=null&&l===null&&c(f)},[c,l]);return xt(()=>$e(a.registerCommand(Ge,({node:f})=>(a.getEditorState().read(()=>{let d={leadOffset:0,matchingString:"",replaceableString:""};if(!_t(a,d.leadOffset)&&f!==null){let h=a._window??window,x=h.document.createRange();Et(d.leadOffset,x,h)!==null&&Tt(()=>p({getRect:()=>x.getBoundingClientRect(),match:d}));return}}),!0),Be)),[a,p]),xt(()=>{let f=()=>{a.getEditorState().read(()=>{let h=a._window??window,x=h.document.createRange(),E=W(),_=Ue(a);if(!q(E)||!E.isCollapsed()||_===void 0||x===null){m();return}let T=i({editor:a,query:_});if(s(T?T.matchingString:null),T!==null&&!_t(a,T.leadOffset)&&Et(T.leadOffset,x,h)!==null){Tt(()=>p({getRect:()=>x.getBoundingClientRect(),match:T}));return}m()})},d=a.registerUpdateListener(f);return()=>{d()}},[a,i,s,l,m,p]),g.current===null||l===null||a===null?null:Me(gt,{anchorElementRef:g,close:m,editor:a,groups:e,menuRenderFn:o,resolution:l,shouldSplitNodeWithQuery:!0})}var St=class n{_bottom;_left;_right;_top;constructor(t,e,o,r){let[c,s]=e<=r?[e,r]:[r,e],[i,a]=t<=o?[t,o]:[o,t];this._top=c,this._right=a,this._left=i,this._bottom=s}static fromDOM(t){let{height:e,left:o,top:r,width:c}=t.getBoundingClientRect();return n.fromLWTH(o,c,r,e)}static fromDOMRect(t){let{height:e,left:o,top:r,width:c}=t;return n.fromLWTH(o,c,r,e)}static fromLTRB(t,e,o,r){return new n(t,e,o,r)}static fromLWTH(t,e,o,r){return new n(t,o,t+e,o+r)}static fromPoints(t,e){let{x:o,y:r}=t,{x:c,y:s}=e;return n.fromLTRB(o,r,c,s)}contains(t){if(it(t)){let{x:s,y:i}=t,a=i<this._top,l=i>this._bottom,u=s<this._left,g=s>this._right;return{reason:{isOnBottomSide:l,isOnLeftSide:u,isOnRightSide:g,isOnTopSide:a},result:!a&&!l&&!u&&!g}}let{bottom:e,left:o,right:r,top:c}=t;return c>=this._top&&c<=this._bottom&&e>=this._top&&e<=this._bottom&&o>=this._left&&o<=this._right&&r>=this._left&&r<=this._right}distanceFromPoint(t){let e=this.contains(t);if(e.result)return{distance:0,isOnBottomSide:e.reason.isOnBottomSide,isOnLeftSide:e.reason.isOnLeftSide,isOnRightSide:e.reason.isOnRightSide,isOnTopSide:e.reason.isOnTopSide};let o=0,r=0;return t.x<this._left?o=this._left-t.x:t.x>this._right&&(o=t.x-this._right),t.y<this._top?r=this._top-t.y:t.y>this._bottom&&(r=t.y-this._bottom),{distance:Math.sqrt(o*o+r*r),isOnBottomSide:t.y>this._bottom,isOnLeftSide:t.x<this._left,isOnRightSide:t.x>this._right,isOnTopSide:t.y<this._top}}equals({bottom:t,left:e,right:o,top:r}){return r===this._top&&t===this._bottom&&e===this._left&&o===this._right}generateNewRect({bottom:t=this.bottom,left:e=this.left,right:o=this.right,top:r=this.top}){return new n(e,r,o,t)}intersectsWith(t){let{height:e,left:o,top:r,width:c}=t,{height:s,left:i,top:a,width:l}=this,u=o+c>=i+l?o+c:i+l,g=r+e>=a+s?r+e:a+s,m=o<=i?o:i,p=r<=a?r:a;return u-m<=c+l&&g-p<=e+s}get bottom(){return this._bottom}get height(){return Math.abs(this._bottom-this._top)}get left(){return this._left}get right(){return this._right}get top(){return this._top}get width(){return Math.abs(this._left-this._right)}};function po({editorConfig:n}){return ze({nodes:n.features.nodes})}function ze({nodes:n}){return n.map(t=>"node"in t?t.node:t)}import{$getRoot as Je,$isDecoratorNode as It,$isElementNode as P,$isLineBreakNode as tn,$isTextNode as v}from"lexical";import{$isListItemNode as Xe,$isListNode as wt}from"@lexical/list";import{$isHeadingNode as Ye,$isQuoteNode as We}from"@lexical/rich-text";import{$isParagraphNode as qe,$isTextNode as Qe}from"lexical";var w={markdownFormatKind:null,regEx:/(?:)/,regExForAutoFormatting:/(?:)/,requiresParagraphStart:!1},C={...w,requiresParagraphStart:!0},To={...C,export:y(1),markdownFormatKind:"paragraphH1",regEx:/^# /,regExForAutoFormatting:/^# /},So={...C,export:y(2),markdownFormatKind:"paragraphH2",regEx:/^## /,regExForAutoFormatting:/^## /},wo={...C,export:y(3),markdownFormatKind:"paragraphH3",regEx:/^### /,regExForAutoFormatting:/^### /},Ro={...C,export:y(4),markdownFormatKind:"paragraphH4",regEx:/^#### /,regExForAutoFormatting:/^#### /},Co={...C,export:y(5),markdownFormatKind:"paragraphH5",regEx:/^##### /,regExForAutoFormatting:/^##### /},Fo={...C,export:y(6),markdownFormatKind:"paragraphH6",regEx:/^###### /,regExForAutoFormatting:/^###### /},Io={...C,export:Ve,markdownFormatKind:"paragraphBlockQuote",regEx:/^> /,regExForAutoFormatting:/^> /},No={...C,export:Q,markdownFormatKind:"paragraphUnorderedList",regEx:/^(\s{0,10})- /,regExForAutoFormatting:/^(\s{0,10})- /},yo={...C,export:Q,markdownFormatKind:"paragraphUnorderedList",regEx:/^(\s{0,10})\* /,regExForAutoFormatting:/^(\s{0,10})\* /},bo={...C,export:Q,markdownFormatKind:"paragraphOrderedList",regEx:/^(\s{0,10})(\d+)\.\s/,regExForAutoFormatting:/^(\s{0,10})(\d+)\.\s/},Ao={...C,markdownFormatKind:"horizontalRule",regEx:/^\*\*\*$/,regExForAutoFormatting:/^\*\*\* /},Oo={...C,markdownFormatKind:"horizontalRule",regEx:/^---$/,regExForAutoFormatting:/^--- /},ko={...w,exportFormat:"code",exportTag:"`",markdownFormatKind:"code",regEx:/(`)(\s*)([^`]*)(\s*)(`)()/,regExForAutoFormatting:/(`)(\s*\b)([^`]*)(\b\s*)(`)(\s)$/},Mo={...w,exportFormat:"bold",exportTag:"**",markdownFormatKind:"bold",regEx:/(\*\*)(\s*)([^*]*)(\s*)(\*\*)()/,regExForAutoFormatting:/(\*\*)(\s*\b)([^*]*)(\b\s*)(\*\*)(\s)$/},Lo={...w,exportFormat:"italic",exportTag:"*",markdownFormatKind:"italic",regEx:/(\*)(\s*)([^*]*)(\s*)(\*)()/,regExForAutoFormatting:/(\*)(\s*\b)([^*]*)(\b\s*)(\*)(\s)$/},$o={...w,exportFormat:"bold",exportTag:"_",markdownFormatKind:"bold",regEx:/(__)(\s*)([^_]*)(\s*)(__)()/,regExForAutoFormatting:/(__)(\s*)([^_]*)(\s*)(__)(\s)$/},Do={...w,exportFormat:"italic",exportTag:"_",markdownFormatKind:"italic",regEx:/(_)()([^_]*)()(_)()/,regExForAutoFormatting:/(_)()([^_]*)()(_)(\s)$/},Bo={...w,exportFormat:"underline",exportTag:"<u>",exportTagClose:"</u>",markdownFormatKind:"underline",regEx:/(<u>)(\s*)([^<]*)(\s*)(<\/u>)()/,regExForAutoFormatting:/(<u>)(\s*\b)([^<]*)(\b\s*)(<\/u>)(\s)$/},Po={...w,exportFormat:"strikethrough",exportTag:"~~",markdownFormatKind:"strikethrough",regEx:/(~~)(\s*)([^~]*)(\s*)(~~)()/,regExForAutoFormatting:/(~~)(\s*\b)([^~]*)(\b\s*)(~~)(\s)$/},vo={...w,markdownFormatKind:"strikethrough_italic_bold",regEx:/(~~_\*\*)(\s*\b)([^*_~]+)(\b\s*)(\*\*_~~)()/,regExForAutoFormatting:/(~~_\*\*)(\s*\b)([^*_~]+)(\b\s*)(\*\*_~~)(\s)$/},Ho={...w,markdownFormatKind:"italic_bold",regEx:/(_\*\*)(\s*\b)([^*_]+)(\b\s*)(\*\*_)/,regExForAutoFormatting:/(_\*\*)(\s*\b)([^*_]+)(\b\s*)(\*\*_)(\s)$/},Ko={...w,markdownFormatKind:"strikethrough_italic",regEx:/(~~_)(\s*)([^_~]+)(\s*)(_~~)/,regExForAutoFormatting:/(~~_)(\s*)([^_~]+)(\s*)(_~~)(\s)$/},Uo={...w,markdownFormatKind:"strikethrough_bold",regEx:/(~~\*\*)(\s*\b)([^*~]+)(\b\s*)(\*\*~~)/,regExForAutoFormatting:/(~~\*\*)(\s*\b)([^*~]+)(\b\s*)(\*\*~~)(\s)$/},Go={...w,markdownFormatKind:"link",regEx:/(\[)([^\]]*)(\]\()([^)]*)(\)*)()/,regExForAutoFormatting:/(\[)([^\]]*)(\]\()([^)]*)(\)*)(\s)$/};function y(n){return(t,e)=>Ye(t)&&t.getTag()==="h"+n?"#".repeat(n)+" "+e(t):null}function Q(n,t){return wt(n)?Rt(n,t,0):null}var je=4;function Rt(n,t,e){let o=[],r=n.getChildren(),c=0;for(let s of r)if(Xe(s)){if(s.getChildrenSize()===1){let l=s.getFirstChild();if(wt(l)){o.push(Rt(l,t,e+1));continue}}let i=" ".repeat(e*je),a=n.getListType()==="bullet"?"- ":`${n.getStart()+c}. `;o.push(i+a+t(s)),c++}return o.join(`
|
|
2
|
+
`)}function Ve(n,t){return We(n)?"> "+t(n):null}function D(n,t){let e={};for(let o of n){let r=t(o);r&&(e[r]?e[r].push(o):e[r]=[o])}return e}function b(n){let t=D(n,e=>e.type);return{element:t.element||[],multilineElement:t["multiline-element"]||[],textFormat:t["text-format"]||[],textMatch:t["text-match"]||[]}}var A=/[!-/:-@[-`{-~\s]/,Ze=/^\s{0,3}$/;function M(n){if(!qe(n))return!1;let t=n.getFirstChild();return t==null||n.getChildrenSize()===1&&Qe(t)&&Ze.test(t.getTextContent())}function Nt(n,t=!1){let e=b(n),o=[...e.multilineElement,...e.element],r=!t,c=e.textFormat.filter(s=>s.format.length===1).sort((s,i)=>s.format.includes("code")&&!i.format.includes("code")?1:!s.format.includes("code")&&i.format.includes("code")?-1:0);return s=>{let i=[],a=(s||Je()).getChildren();return a.forEach((l,u)=>{let g=en(l,o,c,e.textMatch);g!=null&&i.push(r&&u>0&&!M(l)&&!M(a[u-1])?`
|
|
3
|
+
`.concat(g):g)}),i.join(`
|
|
4
|
+
`)}}function en(n,t,e,o){for(let r of t){if(!r.export)continue;let c=r.export(n,s=>H(s,e,o));if(c!=null)return c}return P(n)?H(n,e,o):It(n)?n.getTextContent():null}function H(n,t,e,o,r){let c=[],s=n.getChildren();o||(o=[]),r||(r=[]);t:for(let i of s){for(let a of e){if(!a.export)continue;let l=a.export(i,u=>H(u,t,e,o,[...r,...o]),(u,g)=>Ct(u,g,t,o,r));if(l!=null){c.push(l);continue t}}tn(i)?c.push(`
|
|
5
|
+
`):v(i)?c.push(Ct(i,i.getTextContent(),t,o,r)):P(i)?c.push(H(i,t,e,o,r)):It(i)&&c.push(i.getTextContent())}return c.join("")}function Ct(n,t,e,o,r){let c=t.trim(),s=c;n.hasFormat("code")||(s=s.replace(/([*_`~\\])/g,"\\$1"));let i="",a="",l="",u=Ft(n,!0),g=Ft(n,!1),m=new Set;for(let p of e){let f=p.format[0],d=p.tag;B(n,f)&&!m.has(f)&&(m.add(f),(!B(u,f)||!o.find(h=>h.tag===d))&&(o.push({format:f,tag:d}),i+=d))}for(let p=0;p<o.length;p++){let f=o[p],d=B(n,f.format),h=B(g,f.format);if(d&&h)continue;let x=[...o];for(;x.length>p;){let E=x.pop();r&&E&&r.find(_=>_.tag===E.tag)||(E&&typeof E.tag=="string"&&(d?h||(l+=E.tag):a+=E.tag),o.pop())}break}return s=i+s+l,a+t.replace(c,()=>s)}function Ft(n,t){let e=t?n.getPreviousSibling():n.getNextSibling();if(!e){let o=n.getParentOrThrow();o.isInline()&&(e=t?o.getPreviousSibling():o.getNextSibling())}for(;e;){if(P(e)){if(!e.isInline())break;let o=t?e.getLastDescendant():e.getFirstDescendant();if(v(o))return o;e=t?e.getPreviousSibling():e.getNextSibling()}if(v(e))return e;if(!P(e))return null}return null}function B(n,t){return v(n)&&n.hasFormat(t)}import{$isListItemNode as on,$isListNode as kt}from"@lexical/list";import{$isQuoteNode as rn}from"@lexical/rich-text";import{$findMatchingParent as sn}from"@lexical/utils";import{$createLineBreakNode as cn,$createParagraphNode as an,$createTextNode as ln,$getRoot as fn,$getSelection as un,$isParagraphNode as dn}from"lexical";import{$isTextNode as O}from"lexical";function yt(n,t){let e=n.getTextContent(),o=nn(e,t);if(!o)return null;let r=o.index||0,c=r+o[0].length,s=t.transformersByTag[o[1]];return{endIndex:c,match:o,startIndex:r,transformer:s}}function nn(n,t){let e=n.match(t.openTagsRegExp);if(e==null)return null;for(let o of e){let r=o.replace(/^\s/,""),c=t.fullMatchRegExpByTag[r];if(c==null)continue;let s=n.match(c),i=t.transformersByTag[r];if(s!=null&&i!=null){if(i.intraword!==!1)return s;let{index:a=0}=s,l=n[a-1],u=n[a+s[0].length];if((!l||A.test(l))&&(!u||A.test(u)))return s}}return null}function bt(n,t,e,o,r){let c=n.getTextContent(),s,i,a;if(r[0]===c?a=n:t===0?[a,s]=n.splitText(e):[i,a,s]=n.splitText(t,e),a.setTextContent(r[2]),o)for(let l of o.format)a.hasFormat(l)||a.toggleFormat(l);return{nodeAfter:s,nodeBefore:i,transformedNode:a}}function At(n,t){let e=n,o,r,c,s;for(let i of t){if(!i.replace||!i.importRegExp)continue;let a=e.getTextContent().match(i.importRegExp);if(!a)continue;let l=a.index||0,u=i.getEndIndex?i.getEndIndex(e,a):l+a[0].length;u!==!1&&(o===void 0||r===void 0||l<o&&u>r)&&(o=l,r=u,c=i,s=a)}return o===void 0||r===void 0||c===void 0||s===void 0?null:{endIndex:r,match:s,startIndex:o,transformer:c}}function Ot(n,t,e,o,r){let c,s,i;if(t===0?[i,c]=n.splitText(e):[s,i,c]=n.splitText(t,e),!o.replace)return null;let a=i?o.replace(i,r):void 0;return{nodeAfter:c,nodeBefore:s,transformedNode:a||void 0}}function F(n,t,e){let o=yt(n,t),r=At(n,e);if(o&&r&&(o.startIndex<=r.startIndex&&o.endIndex>=r.endIndex?r=null:o=null),o){let i=bt(n,o.startIndex,o.endIndex,o.transformer,o.match);i.nodeAfter&&O(i.nodeAfter)&&!i.nodeAfter.hasFormat("code")&&F(i.nodeAfter,t,e),i.nodeBefore&&O(i.nodeBefore)&&!i.nodeBefore.hasFormat("code")&&F(i.nodeBefore,t,e),i.transformedNode&&O(i.transformedNode)&&!i.transformedNode.hasFormat("code")&&F(i.transformedNode,t,e)}else if(r){let i=Ot(n,r.startIndex,r.endIndex,r.transformer,r.match);if(!i)return;i.nodeAfter&&O(i.nodeAfter)&&!i.nodeAfter.hasFormat("code")&&F(i.nodeAfter,t,e),i.nodeBefore&&O(i.nodeBefore)&&!i.nodeBefore.hasFormat("code")&&F(i.nodeBefore,t,e),i.transformedNode&&O(i.transformedNode)&&!i.transformedNode.hasFormat("code")&&F(i.transformedNode,t,e)}let s=n.getTextContent().replace(/\\([*_`~])/g,"$1");n.setTextContent(s)}function Mt(n,t=!1){let e=b(n),o=pn(e.textFormat);return(r,c)=>{let s=r.split(`
|
|
6
|
+
`),i=s.length,a=c||fn();a.clear();for(let u=0;u<i;u++){let g=s[u],[m,p]=mn(s,u,e.multilineElement,a);if(m){u=p;continue}gn(g,a,e.element,o,e.textMatch)}let l=a.getChildren();for(let u of l)!t&&M(u)&&a.getChildrenSize()>1&&u.remove();un()!==null&&a.selectStart()}}function mn(n,t,e,o){for(let r of e){let{handleImportAfterStartMatch:c,regExpEnd:s,regExpStart:i,replace:a}=r,l=n[t]?.match(i);if(!l)continue;if(c){let f=c({lines:n,rootNode:o,startLineIndex:t,startMatch:l,transformer:r});if(f===null)continue;if(f)return f}let u=typeof s=="object"&&"regExp"in s?s.regExp:s,g=s&&typeof s=="object"&&"optional"in s?s.optional:!s,m=t,p=n.length;for(;m<p;){let f=u?n[m]?.match(u):null;if(!f&&(!g||g&&m<p-1)){m++;continue}if(f&&t===m&&f.index===l.index){m++;continue}let d=[];if(f&&t===m)d.push(n[t].slice(l[0].length,-f[0].length));else for(let h=t;h<=m;h++){let x=n[h];if(h===t){let E=x.slice(l[0].length);d.push(E)}else if(h===m&&f){let E=x.slice(0,-f[0].length);d.push(E)}else d.push(x)}if(a(o,null,l,f,d,!0)!==!1)return[!0,m];break}}return[!1,t]}function gn(n,t,e,o,r){let c=ln(n),s=an();s.append(c),t.append(s);for(let{regExp:i,replace:a}of e){let l=n.match(i);if(l&&(c.setTextContent(n.slice(l[0].length)),a(s,[c],l,!0)!==!1))break}if(F(c,o,r),s.isAttached()&&n.length>0){let i=s.getPreviousSibling();if(dn(i)||rn(i)||kt(i)){let a=i;if(kt(i)){let l=i.getLastDescendant();l==null?a=null:a=sn(l,on)}a!=null&&a.getTextContentSize()>0&&(a.splice(a.getChildrenSize(),0,[cn(),...s.getChildren()]),s.remove())}}}function pn(n){let t={},e={},o=[],r="(?<![\\\\])";for(let c of n){let{tag:s}=c;t[s]=c;let i=s.replace(/([*^+])/g,"\\$1");o.push(i),s.length===1?e[s]=new RegExp(`(?<![\\\\${i}])(${i})((\\\\${i})?.*?[^${i}\\s](\\\\${i})?)((?<!\\\\)|(?<=\\\\\\\\))(${i})(?![\\\\${i}])`):e[s]=new RegExp(`(?<!\\\\)(${i})((\\\\${i})?.*?[^\\s](\\\\${i})?)((?<!\\\\)|(?<=\\\\\\\\))(${i})(?!\\\\)`)}return{fullMatchRegExpByTag:e,openTagsRegExp:new RegExp(`${r}(${o.join("|")})`,"g"),transformersByTag:t}}import{$createRangeSelection as hn,$getSelection as j,$isLineBreakNode as xn,$isRangeSelection as V,$isRootOrShadowRoot as $t,$isTextNode as Dt,$setSelection as En}from"lexical";function _n(n,t,e,o){let r=n.getParent();if(!$t(r)||n.getFirstChild()!==t)return!1;let c=t.getTextContent();if(c[e-1]!==" ")return!1;for(let{regExp:s,replace:i}of o){let a=c.match(s);if(a&&a[0].length===(a[0].endsWith(" ")?e:e-1)){let l=t.getNextSiblings(),[u,g]=t.splitText(e);u?.remove();let m=g?[g,...l]:l;if(i(n,m,a,!1)!==!1)return!0}}return!1}function Tn(n,t,e,o){let r=n.getParent();if(!$t(r)||n.getFirstChild()!==t)return!1;let c=t.getTextContent();if(c[e-1]!==" ")return!1;for(let{regExpEnd:s,regExpStart:i,replace:a}of o){if(s&&!("optional"in s)||s&&"optional"in s&&!s.optional)continue;let l=c.match(i);if(l&&l[0].length===(l[0].endsWith(" ")?e:e-1)){let u=t.getNextSiblings(),[g,m]=t.splitText(e);g?.remove();let p=m?[m,...u]:u;if(a(n,p,l,null,null,!1)!==!1)return!0}}return!1}function Sn(n,t,e){let o=n.getTextContent(),r=o[t-1],c=e[r];if(c==null)return!1;t<o.length&&(o=o.slice(0,t));for(let s of c){if(!s.replace||!s.regExp)continue;let i=o.match(s.regExp);if(i===null)continue;let a=i.index||0,l=a+i[0].length,u;return a===0?[u]=n.splitText(l):[,u]=n.splitText(a,l),u&&(u.selectNext(0,0),s.replace(u,i)),!0}return!1}function wn(n,t,e){let o=n.getTextContent(),r=t-1,c=o[r],s=e[c];if(!s)return!1;for(let i of s){let{tag:a}=i,l=a.length,u=r-l+1;if(l>1&&!Bt(o,u,a,0,l)||o[u-1]===" ")continue;let g=o[r+1];if(i.intraword===!1&&g&&!A.test(g))continue;let m=n,p=m,f=Lt(o,u,a),d=p;for(;f<0&&(d=d.getPreviousSibling())&&!xn(d);)if(Dt(d)){let R=d.getTextContent();p=d,f=Lt(R,R.length,a)}if(f<0||p===m&&f+l===u)continue;let h=p.getTextContent();if(f>0&&h[f-1]===c)continue;let x=h[f-1];if(i.intraword===!1&&x&&!A.test(x))continue;let E=m.getTextContent(),_=E.slice(0,u)+E.slice(r+1);m.setTextContent(_);let T=p===m?_:h;p.setTextContent(T.slice(0,f)+T.slice(f+l));let I=j(),S=hn();En(S);let L=r-l*(p===m?2:1)+1;S.anchor.set(p.__key,f,"text"),S.focus.set(m.__key,L,"text");for(let R of i.format)S.hasFormat(R)||S.formatText(R);S.anchor.set(S.focus.key,S.focus.offset,S.focus.type);for(let R of i.format)S.hasFormat(R)&&S.toggleFormat(R);return V(I)&&(S.format=I.format),!0}return!1}function Lt(n,t,e){let o=e.length;for(let r=t;r>=o;r--){let c=r-o;if(Bt(n,c,e,0,o)&&n[c+o]!==" ")return c}return-1}function Bt(n,t,e,o,r){for(let c=0;c<r;c++)if(n[t+c]!==e[o+c])return!1;return!0}function ur(n,t=K){let e=b(t),o=D(e.textFormat,({tag:s})=>s[s.length-1]),r=D(e.textMatch,({trigger:s})=>s);for(let s of t){let i=s.type;if(i==="element"||i==="text-match"||i==="multiline-element"){let a=s.dependencies;for(let l of a)if(!n.hasNode(l))throw new Error("MarkdownShortcuts: missing dependency %s for transformer. Ensure node dependency is included in editor initial config."+l.getType())}}let c=(s,i,a)=>{_n(s,i,a,e.element)||Tn(s,i,a,e.multilineElement)||Sn(i,a,r)||wn(i,a,o)};return n.registerUpdateListener(({dirtyLeaves:s,editorState:i,prevEditorState:a,tags:l})=>{if(l.has("collaboration")||l.has("historic")||n.isComposing())return;let u=i.read(j),g=a.read(j);if(!V(g)||!V(u)||!u.isCollapsed()||u.is(g))return;let m=u.anchor.key,p=u.anchor.offset,f=i._nodeMap.get(m);!Dt(f)||!s.has(m)||p!==1&&p>g.anchor.offset+1||n.update(()=>{if(f.hasFormat("code"))return;let d=f.getParent();d!==null&&c(d,f,u.anchor.offset)})})}import{$createListItemNode as Rn,$createListNode as Cn,$isListItemNode as Fn,$isListNode as k,ListItemNode as J,ListNode as tt}from"@lexical/list";import{$createHeadingNode as In,$createQuoteNode as Nn,$isHeadingNode as yn,$isQuoteNode as Pt,HeadingNode as bn,QuoteNode as An}from"@lexical/rich-text";import{$createLineBreakNode as On}from"lexical";var vt=/^[\t ]*$/,Gt=/^(\s*)(\d+)\.\s/,zt=/^(\s*)[-*+]\s/,Xt=/^(\s*)(?:-\s)?\s?(\[(\s|x)?\])\s/i,Z=/^(#{1,6})\s/,Yt=/^>\s/,kn=/^[ \t]*(\\`\\`\\`|```)(\w+)?/,Ht=/[ \t]*(\\`\\`\\`|```)$/,Mn=/^[ \t]*```[^`]+(?:(?:`{1,2}|`{4,})[^`]+)*```(?:[^`]|$)/,Ln=/^\|(.+)\|\s?$/,$n=/^(\| ?:?-*:? ?)+\|\s?$/,Kt=/^[ \t]*<[a-z_][\w-]*(?:\s[^<>]*)?\/?>/i,Ut=/^[ \t]*<\/[a-z_][\w-]*\s*>/i,Dn=n=>(t,e,o)=>{let r=n(o);r.append(...e),t.replace(r),r.select(0,0)},Wt=4;function Bn(n){let t=n.match(/\t/g),e=n.match(/ /g),o=0;return t&&(o+=t.length),e&&(o+=Math.floor(e.length/Wt)),o}var et=n=>(t,e,o)=>{let r=t.getPreviousSibling(),c=t.getNextSibling(),s=Rn(n==="check"?o[3]==="x":void 0);if(k(c)&&c.getListType()===n){let a=c.getFirstChild();a!==null?a.insertBefore(s):c.append(s),t.remove()}else if(k(r)&&r.getListType()===n)r.append(s),t.remove();else{let a=Cn(n,n==="number"?Number(o[2]):void 0);a.append(s),t.replace(a)}s.append(...e),s.select(0,0);let i=Bn(o[1]);i&&s.setIndent(i)},U=(n,t,e)=>{let o=[],r=n.getChildren(),c=0;for(let s of r)if(Fn(s)){if(s.getChildrenSize()===1){let u=s.getFirstChild();if(k(u)){o.push(U(u,t,e+1));continue}}let i=" ".repeat(e*Wt),a=n.getListType(),l=a==="number"?`${n.getStart()+c}. `:a==="check"?`- [${s.getChecked()?"x":" "}] `:"- ";o.push(i+l+t(s)),c++}return o.join(`
|
|
7
|
+
`)},qt={type:"element",dependencies:[bn],export:(n,t)=>{if(!yn(n))return null;let e=Number(n.getTag().slice(1));return"#".repeat(e)+" "+t(n)},regExp:Z,replace:Dn(n=>{let t="h"+n[1].length;return In(t)})},Qt={type:"element",dependencies:[An],export:(n,t)=>{if(!Pt(n))return null;let e=t(n).split(`
|
|
8
|
+
`),o=[];for(let r of e)o.push("> "+r);return o.join(`
|
|
9
|
+
`)},regExp:Yt,replace:(n,t,e,o)=>{if(o){let c=n.getPreviousSibling();if(Pt(c)){c.splice(c.getChildrenSize(),0,[On(),...t]),c.select(0,0),n.remove();return}}let r=Nn();r.append(...t),n.replace(r),r.select(0,0)}},jt={type:"element",dependencies:[tt,J],export:(n,t)=>k(n)?U(n,t,0):null,regExp:zt,replace:et("bullet")},Pn={type:"element",dependencies:[tt,J],export:(n,t)=>k(n)?U(n,t,0):null,regExp:Xt,replace:et("check")},Vt={type:"element",dependencies:[tt,J],export:(n,t)=>k(n)?U(n,t,0):null,regExp:Gt,replace:et("number")},Zt={type:"text-format",format:["code"],tag:"`"},Jt={type:"text-format",format:["highlight"],tag:"=="},te={type:"text-format",format:["bold","italic"],tag:"***"},ee={type:"text-format",format:["bold","italic"],intraword:!1,tag:"___"},ne={type:"text-format",format:["bold"],tag:"**"},oe={type:"text-format",format:["bold"],intraword:!1,tag:"__"},re={type:"text-format",format:["strikethrough"],tag:"~~"},ie={type:"text-format",format:["italic"],tag:"*"},se={type:"text-format",format:["italic"],intraword:!1,tag:"_"};function ce(n,t){let e=n.split(`
|
|
10
|
+
`),o=!1,r=[],c=0;for(let s=0;s<e.length;s++){let i=e[s],a=r[r.length-1];if(Mn.test(i)){r.push(i);continue}if(Ht.test(i)){c===0&&(o=!0),c===1&&(o=!1),c>0&&c--,r.push(i);continue}if(kn.test(i)){o=!0,c++,r.push(i);continue}if(o){r.push(i);continue}vt.test(i)||vt.test(a)||!a||Z.test(a)||Z.test(i)||Yt.test(i)||Gt.test(i)||zt.test(i)||Xt.test(i)||Ln.test(i)||$n.test(i)||!t||Kt.test(i)||Ut.test(i)||Kt.test(a)||Ut.test(a)||Ht.test(a)?r.push(i):r[r.length-1]=a+" "+i.trim()}return r.join(`
|
|
11
|
+
`)}var vn=[qt,Qt,jt,Vt],Hn=[],Kn=[Zt,te,ee,ne,oe,Jt,ie,se,re],Un=[],K=[...vn,...Hn,...Kn,...Un];function Tr(n,t=K,e,o=!1,r=!0){let c=o?n:ce(n,r);return Mt(t,o)(c,e)}function Sr(n=K,t,e=!1){return Nt(n,e)(t)}export{ur as a,Tr as b,Sr as c,rt as d,Wn as e,z as f,it as g,lo as h,Ge as i,fo as j,St as k,po as l};
|
|
12
|
+
//# sourceMappingURL=chunk-AFXLIYGL.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/lexical/utils/canUseDOM.ts", "../../../src/utilities/useRunDeprioritized.ts", "../../../src/lexical/utils/point.ts", "../../../src/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/index.tsx", "../../../src/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/LexicalMenu.tsx", "../../../src/lexical/utils/rect.ts", "../../../src/lexical/nodes/index.ts", "../../../src/packages/@lexical/markdown/MarkdownExport.ts", "../../../src/packages/@lexical/markdown/utils.ts", "../../../src/packages/@lexical/markdown/MarkdownImport.ts", "../../../src/packages/@lexical/markdown/importTextTransformers.ts", "../../../src/packages/@lexical/markdown/importTextFormatTransformer.ts", "../../../src/packages/@lexical/markdown/importTextMatchTransformer.ts", "../../../src/packages/@lexical/markdown/MarkdownShortcuts.ts", "../../../src/packages/@lexical/markdown/MarkdownTransformers.ts", "../../../src/packages/@lexical/markdown/index.ts"],
|
|
4
|
+
"sourcesContent": ["'use client'\nexport const CAN_USE_DOM: boolean =\n typeof window !== 'undefined' &&\n typeof window.document !== 'undefined' &&\n typeof window.document.createElement !== 'undefined'\n", "'use client'\nimport { useCallback, useRef } from 'react'\n\n/**\n * Simple hook that lets you run any callback once the main thread is idle\n * (via `requestIdleCallback`) or when that API is missing (Safari) - after the\n * next animation frame (`interactionResponse`).\n *\n * This will help you to avoid blocking the main thread with heavy work.\n *\n * The latest invocation wins: if a new run is queued before the previous one\n * executes, the previous task is cancelled.\n *\n * Usage:\n * ```ts\n * const runDeprioritized = useRunDeprioritized();\n *\n * const onEditorChange = (state: EditorState) => {\n * runDeprioritized(() => {\n * // heavy work here …\n * });\n * };\n * ```\n *\n * @param timeout Optional timeout (ms) for `requestIdleCallback`; defaults to 500 ms.\n * @returns A `runDeprioritized(fn)` helper.\n */\n\nexport function useRunDeprioritized(timeout = 500) {\n const idleHandleRef = useRef<number>(undefined)\n\n /**\n * Schedule `fn` and resolve when it has executed.\n */\n const runDeprioritized = useCallback(\n (fn: () => void): Promise<void> => {\n return new Promise<void>((resolve) => {\n const exec = () => {\n fn()\n resolve()\n }\n\n if ('requestIdleCallback' in window) {\n // Cancel any previously queued task so only the latest runs.\n if ('cancelIdleCallback' in window && idleHandleRef.current !== undefined) {\n // Cancel earlier scheduled value updates,\n // so that a CPU-limited event loop isn't flooded with n callbacks for n keystrokes into the rich text field,\n // but that there's only ever the latest one state update\n // dispatch task, to be executed with the next idle time,\n // or the deadline of 500ms.\n cancelIdleCallback(idleHandleRef.current)\n }\n // Schedule the state update to happen the next time the browser has sufficient resources,\n // or the latest after 500ms.\n idleHandleRef.current = requestIdleCallback(exec, { timeout })\n } else {\n // Safari fallback: rAF + setTimeout shim.\n void interactionResponse().then(exec)\n }\n })\n },\n [timeout],\n )\n\n return runDeprioritized\n}\n\nfunction interactionResponse(): Promise<unknown> {\n // Taken from https://github.com/vercel-labs/await-interaction-response/tree/main/packages/await-interaction-response/src\n\n return new Promise((resolve) => {\n setTimeout(resolve, 100) // Fallback for the case where the animation frame never fires.\n requestAnimationFrame(() => {\n setTimeout(resolve, 0)\n })\n })\n}\n", "'use client'\nexport class Point {\n private readonly _x: number\n\n private readonly _y: number\n\n constructor(x: number, y: number) {\n this._x = x\n this._y = y\n }\n\n public calcDeltaXTo({ x }: Point): number {\n return this.x - x\n }\n\n public calcDeltaYTo({ y }: Point): number {\n return this.y - y\n }\n\n public calcDistanceTo(point: Point): number {\n return Math.sqrt(Math.pow(this.calcDeltaXTo(point), 2) + Math.pow(this.calcDeltaYTo(point), 2))\n }\n\n public calcHorizontalDistanceTo(point: Point): number {\n return Math.abs(this.calcDeltaXTo(point))\n }\n\n public calcVerticalDistance(point: Point): number {\n return Math.abs(this.calcDeltaYTo(point))\n }\n\n public equals({ x, y }: Point): boolean {\n return this.x === x && this.y === y\n }\n\n get x(): number {\n return this._x\n }\n\n get y(): number {\n return this._y\n }\n}\n\nexport function isPoint(x: unknown): x is Point {\n return x instanceof Point\n}\n", "'use client'\nimport type { LexicalCommand, LexicalEditor, ParagraphNode, RangeSelection } from 'lexical'\n\nimport { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext.js'\nimport { mergeRegister } from '@lexical/utils'\nimport {\n $getSelection,\n $isRangeSelection,\n $isTextNode,\n COMMAND_PRIORITY_LOW,\n createCommand,\n getDOMSelection,\n} from 'lexical'\nimport { type JSX, useCallback, useEffect, useState } from 'react'\nimport * as React from 'react'\n\nimport type { MenuTextMatch, TriggerFn } from '../useMenuTriggerMatch.js'\nimport type { MenuRenderFn, MenuResolution } from './LexicalMenu.js'\nimport type { SlashMenuGroupInternal } from './types.js'\n\nimport { LexicalMenu, useMenuAnchorRef } from './LexicalMenu.js'\n\nexport const PUNCTUATION = '\\\\.,\\\\+\\\\*\\\\?\\\\$\\\\@\\\\|#{}\\\\(\\\\)\\\\^\\\\-\\\\[\\\\]\\\\\\\\/!%\\'\"~=<>_:;'\n\nfunction getTextUpToAnchor(selection: RangeSelection): null | string {\n const anchor = selection.anchor\n if (anchor.type !== 'text') {\n return null\n }\n const anchorNode = anchor.getNode()\n if (!anchorNode.isSimpleText()) {\n return null\n }\n const anchorOffset = anchor.offset\n return anchorNode.getTextContent().slice(0, anchorOffset)\n}\n\nfunction tryToPositionRange(leadOffset: number, range: Range, editorWindow: Window): boolean {\n const domSelection = getDOMSelection(editorWindow)\n if (domSelection === null || !domSelection.isCollapsed) {\n return false\n }\n\n const anchorNode = domSelection.anchorNode\n const startOffset = leadOffset\n const endOffset = domSelection.anchorOffset\n\n if (anchorNode == null || endOffset == null) {\n return false\n }\n\n try {\n range.setStart(anchorNode, startOffset)\n // if endOffset is 0, positioning the range for when you click the plus button to open the slash menu will fial\n range.setEnd(anchorNode, endOffset > 1 ? endOffset : 1)\n } catch (error) {\n return false\n }\n\n return true\n}\n\nfunction getQueryTextForSearch(editor: LexicalEditor): string | undefined {\n let text\n editor.getEditorState().read(() => {\n const selection = $getSelection()\n if (!$isRangeSelection(selection)) {\n return\n }\n text = getTextUpToAnchor(selection)\n })\n return text\n}\n\nfunction isSelectionOnEntityBoundary(editor: LexicalEditor, offset: number): boolean {\n if (offset !== 0) {\n return false\n }\n return editor.getEditorState().read(() => {\n const selection = $getSelection()\n if ($isRangeSelection(selection)) {\n const anchor = selection.anchor\n const anchorNode = anchor.getNode()\n const prevSibling = anchorNode.getPreviousSibling()\n return $isTextNode(prevSibling) && prevSibling.isTextEntity()\n }\n return false\n })\n}\n\nfunction startTransition(callback: () => void) {\n if (React.startTransition) {\n React.startTransition(callback)\n } else {\n callback()\n }\n}\n\nexport { useDynamicPositioning } from './LexicalMenu.js'\n\nexport type TypeaheadMenuPluginProps = {\n anchorClassName?: string\n anchorElem: HTMLElement\n groups: Array<SlashMenuGroupInternal>\n menuRenderFn: MenuRenderFn\n onClose?: () => void\n onOpen?: (resolution: MenuResolution) => void\n onQueryChange: (matchingString: null | string) => void\n triggerFn: TriggerFn\n}\n\nexport const ENABLE_SLASH_MENU_COMMAND: LexicalCommand<{\n node: ParagraphNode\n}> = createCommand('ENABLE_SLASH_MENU_COMMAND')\n\nexport function LexicalTypeaheadMenuPlugin({\n anchorClassName,\n anchorElem,\n groups,\n menuRenderFn,\n onClose,\n onOpen,\n onQueryChange,\n triggerFn,\n}: TypeaheadMenuPluginProps): JSX.Element | null {\n const [editor] = useLexicalComposerContext()\n const [resolution, setResolution] = useState<MenuResolution | null>(null)\n const anchorElementRef = useMenuAnchorRef(anchorElem, resolution, setResolution, anchorClassName)\n\n const closeTypeahead = useCallback(() => {\n setResolution(null)\n if (onClose != null && resolution !== null) {\n onClose()\n }\n }, [onClose, resolution])\n\n const openTypeahead = useCallback(\n (res: MenuResolution) => {\n setResolution(res)\n if (onOpen != null && resolution === null) {\n onOpen(res)\n }\n },\n [onOpen, resolution],\n )\n\n // This is mainly used for the AddBlockHandlePlugin, so that the slash menu can be opened from there\n useEffect(() => {\n return mergeRegister(\n editor.registerCommand(\n ENABLE_SLASH_MENU_COMMAND,\n ({ node }) => {\n editor.getEditorState().read(() => {\n const match: MenuTextMatch = {\n leadOffset: 0,\n matchingString: '',\n replaceableString: '',\n }\n if (!isSelectionOnEntityBoundary(editor, match.leadOffset)) {\n if (node !== null) {\n const editorWindow = editor._window ?? window\n const range = editorWindow.document.createRange()\n\n const isRangePositioned = tryToPositionRange(match.leadOffset, range, editorWindow)\n if (isRangePositioned !== null) {\n startTransition(() =>\n openTypeahead({\n getRect: () => {\n return range.getBoundingClientRect()\n },\n match,\n }),\n )\n }\n\n return\n }\n }\n })\n\n return true\n },\n COMMAND_PRIORITY_LOW,\n ),\n )\n }, [editor, openTypeahead])\n\n useEffect(() => {\n const updateListener = () => {\n editor.getEditorState().read(() => {\n const editorWindow = editor._window ?? window\n const range = editorWindow.document.createRange()\n const selection = $getSelection()\n const text = getQueryTextForSearch(editor)\n\n if (\n !$isRangeSelection(selection) ||\n !selection.isCollapsed() ||\n text === undefined ||\n range === null\n ) {\n closeTypeahead()\n return\n }\n\n const match = triggerFn({ editor, query: text })\n onQueryChange(match ? match.matchingString : null)\n\n if (match !== null && !isSelectionOnEntityBoundary(editor, match.leadOffset)) {\n const isRangePositioned = tryToPositionRange(match.leadOffset, range, editorWindow)\n if (isRangePositioned !== null) {\n startTransition(() =>\n openTypeahead({\n getRect: () => {\n return range.getBoundingClientRect()\n },\n match,\n }),\n )\n return\n }\n }\n closeTypeahead()\n })\n }\n\n const removeUpdateListener = editor.registerUpdateListener(updateListener)\n\n return () => {\n removeUpdateListener()\n }\n }, [editor, triggerFn, onQueryChange, resolution, closeTypeahead, openTypeahead])\n\n return anchorElementRef.current === null || resolution === null || editor === null ? null : (\n <LexicalMenu\n anchorElementRef={anchorElementRef}\n close={closeTypeahead}\n editor={editor}\n groups={groups}\n menuRenderFn={menuRenderFn}\n resolution={resolution}\n shouldSplitNodeWithQuery\n />\n )\n}\n\nexport type { MenuRenderFn, MenuResolution, MenuTextMatch, TriggerFn }\n", "'use client'\nimport type { BaseSelection, LexicalCommand, LexicalEditor, TextNode } from 'lexical'\nimport type { JSX, ReactPortal, RefObject } from 'react'\n\nimport { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext.js'\nimport { mergeRegister } from '@lexical/utils'\nimport {\n $getSelection,\n $isRangeSelection,\n $setSelection,\n COMMAND_PRIORITY_LOW,\n COMMAND_PRIORITY_NORMAL,\n createCommand,\n KEY_ARROW_DOWN_COMMAND,\n KEY_ARROW_UP_COMMAND,\n KEY_ENTER_COMMAND,\n KEY_ESCAPE_COMMAND,\n KEY_TAB_COMMAND,\n} from 'lexical'\nimport { useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState } from 'react'\n\nimport type { MenuTextMatch } from '../useMenuTriggerMatch.js'\nimport type { SlashMenuGroupInternal, SlashMenuItem, SlashMenuItemInternal } from './types.js'\n\nimport { CAN_USE_DOM } from '../../../utils/canUseDOM.js'\n\nexport type MenuResolution = {\n getRect: () => DOMRect\n match?: MenuTextMatch\n}\n\nconst baseClass = 'slash-menu-popup'\n\nexport type MenuRenderFn = (\n anchorElementRef: RefObject<HTMLElement | null>,\n itemProps: {\n groups: Array<SlashMenuGroupInternal>\n selectedItemKey: null | string\n selectItemAndCleanUp: (selectedItem: SlashMenuItem) => void\n setSelectedItemKey: (itemKey: string) => void\n },\n matchingString: null | string,\n) => JSX.Element | null | ReactPortal\n\nconst scrollIntoViewIfNeeded = (target: HTMLElement) => {\n const typeaheadContainerNode = document.getElementById('slash-menu')\n if (!typeaheadContainerNode) {\n return\n }\n\n const typeaheadRect = typeaheadContainerNode.getBoundingClientRect()\n\n if (typeaheadRect.top + typeaheadRect.height > window.innerHeight) {\n typeaheadContainerNode.scrollIntoView({\n block: 'center',\n })\n }\n\n if (typeaheadRect.top < 0) {\n typeaheadContainerNode.scrollIntoView({\n block: 'center',\n })\n }\n\n target.scrollIntoView({ block: 'nearest' })\n}\n\n/**\n * Walk backwards along user input and forward through entity title to try\n * and replace more of the user's text with entity.\n */\nfunction getFullMatchOffset(documentText: string, entryText: string, offset: number) {\n let triggerOffset = offset\n for (let i = triggerOffset; i <= entryText.length; i++) {\n if (documentText.substring(documentText.length - i) === entryText.substring(0, i)) {\n triggerOffset = i\n }\n }\n return triggerOffset\n}\n\n/**\n * Split Lexical TextNode and return a new TextNode only containing matched text.\n * Common use cases include: removing the node, replacing with a new node.\n */\nfunction $splitNodeContainingQuery(match: MenuTextMatch): TextNode | undefined {\n const selection = $getSelection()\n if (!$isRangeSelection(selection) || !selection.isCollapsed()) {\n return\n }\n const anchor = selection.anchor\n if (anchor.type !== 'text') {\n return\n }\n const anchorNode = anchor.getNode()\n if (!anchorNode.isSimpleText()) {\n return\n }\n const selectionOffset = anchor.offset\n const textContent = anchorNode.getTextContent().slice(0, selectionOffset)\n const characterOffset = match.replaceableString.length\n const queryOffset = getFullMatchOffset(textContent, match.matchingString, characterOffset)\n const startOffset = selectionOffset - queryOffset\n if (startOffset < 0) {\n return\n }\n let newNode\n if (startOffset === 0) {\n ;[newNode] = anchorNode.splitText(selectionOffset)\n } else {\n ;[, newNode] = anchorNode.splitText(startOffset, selectionOffset)\n }\n\n return newNode\n}\n\n// Got from https://stackoverflow.com/a/42543908/2013580\nexport function getScrollParent(\n element: HTMLElement,\n includeHidden: boolean,\n): HTMLBodyElement | HTMLElement {\n let style = getComputedStyle(element)\n const excludeStaticParent = style.position === 'absolute'\n const overflowRegex = includeHidden ? /(auto|scroll|hidden)/ : /(auto|scroll)/\n if (style.position === 'fixed') {\n return document.body\n }\n for (let parent: HTMLElement | null = element; (parent = parent.parentElement); ) {\n style = getComputedStyle(parent)\n if (excludeStaticParent && style.position === 'static') {\n continue\n }\n if (overflowRegex.test(style.overflow + style.overflowY + style.overflowX)) {\n return parent\n }\n }\n return document.body\n}\n\nfunction isTriggerVisibleInNearestScrollContainer(\n targetElement: HTMLElement,\n containerElement: HTMLElement,\n): boolean {\n const tRect = targetElement.getBoundingClientRect()\n const cRect = containerElement.getBoundingClientRect()\n return tRect.top > cRect.top && tRect.top < cRect.bottom\n}\n\n// Reposition the menu on scroll, window resize, and element resize.\nexport function useDynamicPositioning(\n resolution: MenuResolution | null,\n targetElementRef: RefObject<HTMLElement | null>,\n onReposition: () => void,\n onVisibilityChange?: (isInView: boolean) => void,\n) {\n const [editor] = useLexicalComposerContext()\n useEffect(() => {\n const targetElement = targetElementRef.current\n if (targetElement != null && resolution != null) {\n const rootElement = editor.getRootElement()\n const rootScrollParent =\n rootElement != null ? getScrollParent(rootElement, false) : document.body\n let ticking = false\n let previousIsInView = isTriggerVisibleInNearestScrollContainer(\n targetElement,\n rootScrollParent,\n )\n const handleScroll = function () {\n if (!ticking) {\n window.requestAnimationFrame(function () {\n onReposition()\n ticking = false\n })\n ticking = true\n }\n const isInView = isTriggerVisibleInNearestScrollContainer(targetElement, rootScrollParent)\n if (isInView !== previousIsInView) {\n previousIsInView = isInView\n if (onVisibilityChange != null) {\n onVisibilityChange(isInView)\n }\n }\n }\n const resizeObserver = new ResizeObserver(onReposition)\n window.addEventListener('resize', onReposition)\n document.addEventListener('scroll', handleScroll, {\n capture: true,\n passive: true,\n })\n resizeObserver.observe(targetElement)\n return () => {\n resizeObserver.disconnect()\n window.removeEventListener('resize', onReposition)\n document.removeEventListener('scroll', handleScroll, true)\n }\n }\n }, [editor, onVisibilityChange, onReposition, resolution, targetElementRef])\n}\n\nexport const SCROLL_TYPEAHEAD_OPTION_INTO_VIEW_COMMAND: LexicalCommand<{\n index: number\n item: SlashMenuItemInternal\n}> = createCommand('SCROLL_TYPEAHEAD_OPTION_INTO_VIEW_COMMAND')\n\nexport function LexicalMenu({\n anchorElementRef,\n close,\n editor,\n // groups filtering is already handled in SlashMenu/index.tsx. Thus, groups always contains the matching items.\n groups,\n menuRenderFn,\n resolution,\n shouldSplitNodeWithQuery = false,\n}: {\n anchorElementRef: RefObject<HTMLElement | null>\n close: () => void\n editor: LexicalEditor\n groups: Array<SlashMenuGroupInternal>\n menuRenderFn: MenuRenderFn\n resolution: MenuResolution\n shouldSplitNodeWithQuery?: boolean\n}): JSX.Element | null {\n const [selectedItemKey, setSelectedItemKey] = useState<null | string>(null)\n\n const matchingString = (resolution.match && resolution.match.matchingString) || ''\n\n const updateSelectedItem = useCallback(\n (item: SlashMenuItem) => {\n const rootElem = editor.getRootElement()\n if (rootElem !== null) {\n rootElem.setAttribute('aria-activedescendant', `${baseClass}__item-${item.key}`)\n setSelectedItemKey(item.key)\n }\n },\n [editor],\n )\n\n const setSelectedItemKeyToFirstMatchingItem = useCallback(() => {\n // set selected item to the first of the matching ones\n if (groups !== null && matchingString != null) {\n // groups filtering is already handled in SlashMenu/index.tsx. Thus, groups always contains the matching items.\n const allItems = groups.flatMap((group) => group.items)\n\n if (allItems.length) {\n const firstMatchingItem = allItems[0]!\n updateSelectedItem(firstMatchingItem)\n }\n }\n }, [groups, updateSelectedItem, matchingString])\n\n useEffect(() => {\n setSelectedItemKeyToFirstMatchingItem()\n }, [matchingString, setSelectedItemKeyToFirstMatchingItem])\n\n const selectItemAndCleanUp = useCallback(\n (selectedItem: SlashMenuItem) => {\n close()\n\n editor.update(() => {\n const textNodeContainingQuery =\n resolution.match != null && shouldSplitNodeWithQuery\n ? $splitNodeContainingQuery(resolution.match)\n : null\n\n if (textNodeContainingQuery) {\n textNodeContainingQuery.remove()\n }\n })\n\n setTimeout(() => {\n // Needed in Firefox. See https://github.com/payloadcms/payload/issues/10724\n let selection: BaseSelection | undefined\n editor.read(() => {\n selection = $getSelection()?.clone()\n })\n editor.update(() => {\n if (selection) {\n $setSelection(selection)\n }\n })\n\n selectedItem.onSelect({\n editor,\n queryString: resolution.match ? resolution.match.matchingString : '',\n })\n }, 0)\n },\n [editor, shouldSplitNodeWithQuery, resolution.match, close],\n )\n\n useEffect(() => {\n return () => {\n const rootElem = editor.getRootElement()\n if (rootElem !== null) {\n rootElem.removeAttribute('aria-activedescendant')\n }\n }\n }, [editor])\n\n useLayoutEffect(() => {\n if (groups === null) {\n setSelectedItemKey(null)\n } else if (selectedItemKey === null) {\n setSelectedItemKeyToFirstMatchingItem()\n }\n }, [groups, selectedItemKey, updateSelectedItem, setSelectedItemKeyToFirstMatchingItem])\n\n useEffect(() => {\n return mergeRegister(\n editor.registerCommand(\n SCROLL_TYPEAHEAD_OPTION_INTO_VIEW_COMMAND,\n ({ item }) => {\n if (item.ref && item.ref.current != null) {\n scrollIntoViewIfNeeded(item.ref.current)\n return true\n }\n\n return false\n },\n COMMAND_PRIORITY_LOW,\n ),\n )\n }, [editor, updateSelectedItem])\n\n useEffect(() => {\n return mergeRegister(\n editor.registerCommand<KeyboardEvent>(\n KEY_ARROW_DOWN_COMMAND,\n (payload) => {\n const event = payload\n if (groups !== null && groups.length && selectedItemKey !== null) {\n const allItems = groups.flatMap((group) => group.items)\n const selectedIndex = allItems.findIndex((item) => item.key === selectedItemKey)\n\n const newSelectedIndex = selectedIndex !== allItems.length - 1 ? selectedIndex + 1 : 0\n\n const newSelectedItem = allItems[newSelectedIndex]\n if (!newSelectedItem) {\n return false\n }\n\n updateSelectedItem(newSelectedItem)\n if (newSelectedItem.ref != null && newSelectedItem.ref.current) {\n editor.dispatchCommand(SCROLL_TYPEAHEAD_OPTION_INTO_VIEW_COMMAND, {\n index: newSelectedIndex,\n item: newSelectedItem,\n })\n }\n event.preventDefault()\n event.stopImmediatePropagation()\n }\n return true\n },\n COMMAND_PRIORITY_NORMAL,\n ),\n editor.registerCommand<KeyboardEvent>(\n KEY_ARROW_UP_COMMAND,\n (payload) => {\n const event = payload\n if (groups !== null && groups.length && selectedItemKey !== null) {\n const allItems = groups.flatMap((group) => group.items)\n const selectedIndex = allItems.findIndex((item) => item.key === selectedItemKey)\n\n const newSelectedIndex = selectedIndex !== 0 ? selectedIndex - 1 : allItems.length - 1\n\n const newSelectedItem = allItems[newSelectedIndex]\n if (!newSelectedItem) {\n return false\n }\n\n updateSelectedItem(newSelectedItem)\n if (newSelectedItem.ref != null && newSelectedItem.ref.current) {\n scrollIntoViewIfNeeded(newSelectedItem.ref.current)\n }\n event.preventDefault()\n event.stopImmediatePropagation()\n }\n return true\n },\n COMMAND_PRIORITY_NORMAL,\n ),\n editor.registerCommand<KeyboardEvent>(\n KEY_ESCAPE_COMMAND,\n (payload) => {\n const event = payload\n event.preventDefault()\n event.stopImmediatePropagation()\n close()\n return true\n },\n COMMAND_PRIORITY_LOW,\n ),\n editor.registerCommand<KeyboardEvent>(\n KEY_TAB_COMMAND,\n (payload) => {\n const event = payload\n\n if (groups === null || selectedItemKey === null) {\n return false\n }\n const allItems = groups.flatMap((group) => group.items)\n const selectedItem = allItems.find((item) => item.key === selectedItemKey)\n if (!selectedItem) {\n return false\n }\n\n event.preventDefault()\n event.stopImmediatePropagation()\n selectItemAndCleanUp(selectedItem)\n return true\n },\n COMMAND_PRIORITY_NORMAL,\n ),\n editor.registerCommand(\n KEY_ENTER_COMMAND,\n (event: KeyboardEvent | null) => {\n if (groups === null || selectedItemKey === null) {\n return false\n }\n const allItems = groups.flatMap((group) => group.items)\n const selectedItem = allItems.find((item) => item.key === selectedItemKey)\n if (!selectedItem) {\n return false\n }\n\n if (event !== null) {\n event.preventDefault()\n event.stopImmediatePropagation()\n }\n selectItemAndCleanUp(selectedItem)\n return true\n },\n COMMAND_PRIORITY_NORMAL,\n ),\n )\n }, [selectItemAndCleanUp, close, editor, groups, selectedItemKey, updateSelectedItem])\n\n const listItemProps = useMemo(\n () => ({\n groups,\n selectedItemKey,\n selectItemAndCleanUp,\n setSelectedItemKey,\n }),\n [selectItemAndCleanUp, selectedItemKey, groups],\n )\n\n return menuRenderFn(\n anchorElementRef,\n listItemProps,\n resolution.match ? resolution.match.matchingString : '',\n )\n}\n\nfunction setContainerDivAttributes(containerDiv: HTMLElement, className?: string) {\n if (className != null) {\n containerDiv.className = className\n }\n containerDiv.setAttribute('aria-label', 'Slash menu')\n containerDiv.setAttribute('role', 'listbox')\n containerDiv.style.display = 'block'\n containerDiv.style.position = 'absolute'\n}\n\nexport function useMenuAnchorRef(\n anchorElem: HTMLElement,\n resolution: MenuResolution | null,\n setResolution: (r: MenuResolution | null) => void,\n className?: string,\n): RefObject<HTMLElement | null> {\n const [editor] = useLexicalComposerContext()\n const anchorElementRef = useRef<HTMLElement | null>(\n CAN_USE_DOM ? document.createElement('div') : null,\n )\n const positionMenu = useCallback(() => {\n if (anchorElementRef.current === null || parent === undefined) {\n return\n }\n const rootElement = editor.getRootElement()\n const containerDiv = anchorElementRef.current\n\n const VERTICAL_OFFSET = 32\n\n const menuEle = containerDiv.firstChild as Element\n if (rootElement !== null && resolution !== null) {\n const { height, width } = resolution.getRect()\n let { left, top } = resolution.getRect()\n\n const rawTop = top\n top -= anchorElem.getBoundingClientRect().top + window.scrollY\n left -= anchorElem.getBoundingClientRect().left + window.scrollX\n containerDiv.style.left = `${left + window.scrollX}px`\n containerDiv.style.height = `${height}px`\n containerDiv.style.width = `${width}px`\n if (menuEle !== null) {\n const menuRect = menuEle.getBoundingClientRect()\n const menuHeight = menuRect.height\n const menuWidth = menuRect.width\n\n const rootElementRect = rootElement.getBoundingClientRect()\n\n const isRTL = document.dir === 'rtl' || document.documentElement.dir === 'rtl'\n const anchorRect = anchorElem.getBoundingClientRect()\n const leftBoundary = Math.max(0, rootElementRect.left)\n\n if (!isRTL && left + menuWidth > rootElementRect.right) {\n containerDiv.style.left = `${rootElementRect.right - menuWidth + window.scrollX}px`\n } else if (isRTL && menuRect.left < leftBoundary) {\n const newLeft = leftBoundary + menuWidth - anchorRect.left\n containerDiv.style.left = `${newLeft + window.scrollX}px`\n }\n\n const wouldGoOffBottomOfScreen = rawTop + menuHeight + VERTICAL_OFFSET > window.innerHeight\n //const wouldGoOffBottomOfContainer = top + menuHeight > rootElementRect.bottom\n const wouldGoOffTopOfScreen = rawTop < 0\n\n // Position slash menu above the cursor instead of below (default) if it would otherwise go off the bottom of the screen.\n if (wouldGoOffBottomOfScreen && !wouldGoOffTopOfScreen) {\n const margin = 24\n containerDiv.style.top = `${\n top + VERTICAL_OFFSET - menuHeight + window.scrollY - (height + margin)\n }px`\n } else {\n containerDiv.style.top = `${top + window.scrollY + VERTICAL_OFFSET}px`\n }\n }\n\n if (!containerDiv.isConnected) {\n setContainerDivAttributes(containerDiv, className)\n anchorElem.append(containerDiv)\n }\n containerDiv.setAttribute('id', 'slash-menu')\n anchorElementRef.current = containerDiv\n rootElement.setAttribute('aria-controls', 'slash-menu')\n }\n }, [editor, resolution, className, anchorElem])\n\n useEffect(() => {\n const rootElement = editor.getRootElement()\n if (resolution !== null) {\n positionMenu()\n return () => {\n if (rootElement !== null) {\n rootElement.removeAttribute('aria-controls')\n }\n\n const containerDiv = anchorElementRef.current\n if (containerDiv !== null && containerDiv.isConnected) {\n containerDiv.remove()\n containerDiv.removeAttribute('id')\n }\n }\n }\n }, [editor, positionMenu, resolution])\n\n const onVisibilityChange = useCallback(\n (isInView: boolean) => {\n if (resolution !== null) {\n if (!isInView) {\n setResolution(null)\n }\n }\n },\n [resolution, setResolution],\n )\n\n useDynamicPositioning(resolution, anchorElementRef, positionMenu, onVisibilityChange)\n\n return anchorElementRef\n}\n", "'use client'\nimport { isPoint, type Point } from './point.js'\n\ninterface ContainsPointReturn {\n reason: {\n isOnBottomSide: boolean\n isOnLeftSide: boolean\n isOnRightSide: boolean\n isOnTopSide: boolean\n }\n result: boolean\n}\n\nexport class Rect {\n private readonly _bottom: number\n\n private readonly _left: number\n\n private readonly _right: number\n\n private readonly _top: number\n\n constructor(left: number, top: number, right: number, bottom: number) {\n const [physicTop, physicBottom] = top <= bottom ? [top, bottom] : [bottom, top]\n\n const [physicLeft, physicRight] = left <= right ? [left, right] : [right, left]\n\n this._top = physicTop\n this._right = physicRight\n this._left = physicLeft\n this._bottom = physicBottom\n }\n\n static fromDOM(dom: HTMLElement): Rect {\n const { height, left, top, width } = dom.getBoundingClientRect()\n return Rect.fromLWTH(left, width, top, height)\n }\n\n static fromDOMRect(domRect: DOMRect): Rect {\n const { height, left, top, width } = domRect\n return Rect.fromLWTH(left, width, top, height)\n }\n\n static fromLTRB(left: number, top: number, right: number, bottom: number): Rect {\n return new Rect(left, top, right, bottom)\n }\n\n static fromLWTH(left: number, width: number, top: number, height: number): Rect {\n return new Rect(left, top, left + width, top + height)\n }\n\n static fromPoints(startPoint: Point, endPoint: Point): Rect {\n const { x: left, y: top } = startPoint\n const { x: right, y: bottom } = endPoint\n return Rect.fromLTRB(left, top, right, bottom)\n }\n\n public contains({ x, y }: Point): ContainsPointReturn\n\n public contains({ bottom, left, right, top }: Rect): boolean\n\n public contains(target: Point | Rect): boolean | ContainsPointReturn {\n if (isPoint(target)) {\n const { x, y } = target\n\n const isOnTopSide = y < this._top\n const isOnBottomSide = y > this._bottom\n const isOnLeftSide = x < this._left\n const isOnRightSide = x > this._right\n\n const result = !isOnTopSide && !isOnBottomSide && !isOnLeftSide && !isOnRightSide\n\n return {\n reason: {\n isOnBottomSide,\n isOnLeftSide,\n isOnRightSide,\n isOnTopSide,\n },\n result,\n }\n }\n const { bottom, left, right, top } = target\n\n return (\n top >= this._top &&\n top <= this._bottom &&\n bottom >= this._top &&\n bottom <= this._bottom &&\n left >= this._left &&\n left <= this._right &&\n right >= this._left &&\n right <= this._right\n )\n }\n\n public distanceFromPoint(point: Point): {\n distance: number\n isOnBottomSide: boolean\n isOnLeftSide: boolean\n isOnRightSide: boolean\n isOnTopSide: boolean\n } {\n const containsResult = this.contains(point)\n if (containsResult.result) {\n return {\n distance: 0,\n isOnBottomSide: containsResult.reason.isOnBottomSide,\n isOnLeftSide: containsResult.reason.isOnLeftSide,\n isOnRightSide: containsResult.reason.isOnRightSide,\n isOnTopSide: containsResult.reason.isOnTopSide,\n }\n }\n\n let dx = 0 // Horizontal distance to the closest edge\n let dy = 0 // Vertical distance to the closest edge\n\n // If the point is to the left of the rectangle\n if (point.x < this._left) {\n dx = this._left - point.x\n }\n // If the point is to the right of the rectangle\n else if (point.x > this._right) {\n dx = point.x - this._right\n }\n\n // If the point is above the rectangle\n if (point.y < this._top) {\n dy = this._top - point.y\n }\n // If the point is below the rectangle\n else if (point.y > this._bottom) {\n dy = point.y - this._bottom\n }\n\n // Use the Pythagorean theorem to calculate the distance\n return {\n distance: Math.sqrt(dx * dx + dy * dy),\n isOnBottomSide: point.y > this._bottom,\n isOnLeftSide: point.x < this._left,\n isOnRightSide: point.x > this._right,\n isOnTopSide: point.y < this._top,\n }\n }\n\n public equals({ bottom, left, right, top }: Rect): boolean {\n return (\n top === this._top && bottom === this._bottom && left === this._left && right === this._right\n )\n }\n\n public generateNewRect({\n bottom = this.bottom,\n left = this.left,\n right = this.right,\n top = this.top,\n }): Rect {\n return new Rect(left, top, right, bottom)\n }\n\n public intersectsWith(rect: Rect): boolean {\n const { height: h1, left: x1, top: y1, width: w1 } = rect\n const { height: h2, left: x2, top: y2, width: w2 } = this\n const maxX = x1 + w1 >= x2 + w2 ? x1 + w1 : x2 + w2\n const maxY = y1 + h1 >= y2 + h2 ? y1 + h1 : y2 + h2\n const minX = x1 <= x2 ? x1 : x2\n const minY = y1 <= y2 ? y1 : y2\n return maxX - minX <= w1 + w2 && maxY - minY <= h1 + h2\n }\n\n get bottom(): number {\n return this._bottom\n }\n\n get height(): number {\n return Math.abs(this._bottom - this._top)\n }\n\n get left(): number {\n return this._left\n }\n\n get right(): number {\n return this._right\n }\n\n get top(): number {\n return this._top\n }\n\n get width(): number {\n return Math.abs(this._left - this._right)\n }\n}\n", "import type { Klass, LexicalNode, LexicalNodeReplacement } from 'lexical'\n\nimport type { NodeWithHooks } from '../../features/typesServer.js'\nimport type { SanitizedClientEditorConfig, SanitizedServerEditorConfig } from '../config/types.js'\n\nexport function getEnabledNodes({\n editorConfig,\n}: {\n editorConfig: SanitizedClientEditorConfig | SanitizedServerEditorConfig\n}): Array<Klass<LexicalNode> | LexicalNodeReplacement> {\n return getEnabledNodesFromServerNodes({\n nodes: editorConfig.features.nodes,\n })\n}\n\nexport function getEnabledNodesFromServerNodes({\n nodes,\n}: {\n nodes: Array<Klass<LexicalNode> | LexicalNodeReplacement> | Array<NodeWithHooks>\n}): Array<Klass<LexicalNode> | LexicalNodeReplacement> {\n return nodes.map((node) => {\n if ('node' in node) {\n return node.node\n }\n return node\n })\n}\n", "/**\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, LexicalNode, TextFormatType, TextNode } from 'lexical'\n\nimport { $getRoot, $isDecoratorNode, $isElementNode, $isLineBreakNode, $isTextNode } from 'lexical'\n\nimport type {\n ElementTransformer,\n MultilineElementTransformer,\n TextFormatTransformer,\n TextMatchTransformer,\n Transformer,\n} from './MarkdownTransformers.js'\n\nimport { isEmptyParagraph, transformersByType } from './utils.js'\n\n/**\n * Renders string from markdown. The selection is moved to the start after the operation.\n */\nexport function createMarkdownExport(\n transformers: Array<Transformer>,\n shouldPreserveNewLines: boolean = false,\n): (node?: ElementNode) => string {\n const byType = transformersByType(transformers)\n const elementTransformers = [...byType.multilineElement, ...byType.element]\n const isNewlineDelimited = !shouldPreserveNewLines\n\n // Export only uses text formats that are responsible for single format\n // e.g. it will filter out *** (bold, italic) and instead use separate ** and *\n const textFormatTransformers = byType.textFormat\n .filter((transformer) => transformer.format.length === 1)\n // Make sure all text transformers that contain 'code' in their format are at the end of the array. Otherwise, formatted code like\n // <strong><code>code</code></strong> will be exported as `**Bold Code**`, as the code format will be applied first, and the bold format\n // will be applied second and thus skipped entirely, as the code format will prevent any further formatting.\n .sort((a, b) => {\n if (a.format.includes('code') && !b.format.includes('code')) {\n return 1\n } else if (!a.format.includes('code') && b.format.includes('code')) {\n return -1\n } else {\n return 0\n }\n })\n\n return (node) => {\n const output: string[] = []\n const children = (node || $getRoot()).getChildren()\n\n children.forEach((child, i) => {\n const result = exportTopLevelElements(\n child,\n elementTransformers,\n textFormatTransformers,\n byType.textMatch,\n )\n\n if (result != null) {\n output.push(\n // separate consecutive group of texts with a line break: eg. [\"hello\", \"world\"] -> [\"hello\", \"/nworld\"]\n isNewlineDelimited &&\n i > 0 &&\n !isEmptyParagraph(child) &&\n !isEmptyParagraph(children[i - 1]!)\n ? '\\n'.concat(result)\n : result,\n )\n }\n })\n // Ensure consecutive groups of texts are at least \\n\\n apart while each empty paragraph render as a newline.\n // Eg. [\"hello\", \"\", \"\", \"hi\", \"\\nworld\"] -> \"hello\\n\\n\\nhi\\n\\nworld\"\n return output.join('\\n')\n }\n}\n\nfunction exportTopLevelElements(\n node: LexicalNode,\n elementTransformers: Array<ElementTransformer | MultilineElementTransformer>,\n textTransformersIndex: Array<TextFormatTransformer>,\n textMatchTransformers: Array<TextMatchTransformer>,\n): null | string {\n for (const transformer of elementTransformers) {\n if (!transformer.export) {\n continue\n }\n const result = transformer.export(node, (_node) =>\n exportChildren(_node, textTransformersIndex, textMatchTransformers),\n )\n\n if (result != null) {\n return result\n }\n }\n\n if ($isElementNode(node)) {\n return exportChildren(node, textTransformersIndex, textMatchTransformers)\n } else if ($isDecoratorNode(node)) {\n return node.getTextContent()\n } else {\n return null\n }\n}\n\nfunction exportChildren(\n node: ElementNode,\n textTransformersIndex: Array<TextFormatTransformer>,\n textMatchTransformers: Array<TextMatchTransformer>,\n unclosedTags?: Array<{ format: TextFormatType; tag: string }>,\n unclosableTags?: Array<{ format: TextFormatType; tag: string }>,\n): string {\n const output = []\n const children = node.getChildren()\n // keep track of unclosed tags from the very beginning\n if (!unclosedTags) {\n unclosedTags = []\n }\n if (!unclosableTags) {\n unclosableTags = []\n }\n\n mainLoop: for (const child of children) {\n for (const transformer of textMatchTransformers) {\n if (!transformer.export) {\n continue\n }\n\n const result = transformer.export(\n child,\n (parentNode) =>\n exportChildren(\n parentNode,\n textTransformersIndex,\n textMatchTransformers,\n unclosedTags,\n // Add current unclosed tags to the list of unclosable tags - we don't want nested tags from\n // textmatch transformers to close the outer ones, as that may result in invalid markdown.\n // E.g. **text [text**](https://lexical.io)\n // is invalid markdown, as the closing ** is inside the link.\n //\n [...unclosableTags, ...unclosedTags],\n ),\n (textNode, textContent) =>\n exportTextFormat(\n textNode,\n textContent,\n textTransformersIndex,\n unclosedTags,\n unclosableTags,\n ),\n )\n\n if (result != null) {\n output.push(result)\n continue mainLoop\n }\n }\n\n if ($isLineBreakNode(child)) {\n output.push('\\n')\n } else if ($isTextNode(child)) {\n output.push(\n exportTextFormat(\n child,\n child.getTextContent(),\n textTransformersIndex,\n unclosedTags,\n unclosableTags,\n ),\n )\n } else if ($isElementNode(child)) {\n // empty paragraph returns \"\"\n output.push(\n exportChildren(\n child,\n textTransformersIndex,\n textMatchTransformers,\n unclosedTags,\n unclosableTags,\n ),\n )\n } else if ($isDecoratorNode(child)) {\n output.push(child.getTextContent())\n }\n }\n\n return output.join('')\n}\n\nfunction exportTextFormat(\n node: TextNode,\n textContent: string,\n textTransformers: Array<TextFormatTransformer>,\n // unclosed tags include the markdown tags that haven't been closed yet, and their associated formats\n unclosedTags: Array<{ format: TextFormatType; tag: string }>,\n unclosableTags?: Array<{ format: TextFormatType; tag: string }>,\n): string {\n // This function handles the case of a string looking like this: \" foo \"\n // Where it would be invalid markdown to generate: \"** foo **\"\n // We instead want to trim the whitespace out, apply formatting, and then\n // bring the whitespace back. So our returned string looks like this: \" **foo** \"\n const frozenString = textContent.trim()\n let output = frozenString\n\n if (!node.hasFormat('code')) {\n // Escape any markdown characters in the text content\n output = output.replace(/([*_`~\\\\])/g, '\\\\$1')\n }\n\n // the opening tags to be added to the result\n let openingTags = ''\n // the closing tags to be added to the result\n let closingTagsBefore = ''\n let closingTagsAfter = ''\n\n const prevNode = getTextSibling(node, true)\n const nextNode = getTextSibling(node, false)\n\n const applied = new Set()\n\n for (const transformer of textTransformers) {\n const format = transformer.format[0]!\n const tag = transformer.tag\n\n // dedup applied formats\n if (hasFormat(node, format) && !applied.has(format)) {\n // Multiple tags might be used for the same format (*, _)\n applied.add(format)\n\n // append the tag to openningTags, if it's not applied to the previous nodes,\n // or the nodes before that (which would result in an unclosed tag)\n if (!hasFormat(prevNode, format) || !unclosedTags.find((element) => element.tag === tag)) {\n unclosedTags.push({ format, tag })\n openingTags += tag\n }\n }\n }\n\n // close any tags in the same order they were applied, if necessary\n for (let i = 0; i < unclosedTags.length; i++) {\n const unclosedTag = unclosedTags[i]!\n const nodeHasFormat = hasFormat(node, unclosedTag.format)\n const nextNodeHasFormat = hasFormat(nextNode, unclosedTag.format)\n\n // prevent adding closing tag if next sibling will do it\n if (nodeHasFormat && nextNodeHasFormat) {\n continue\n }\n\n const unhandledUnclosedTags = [...unclosedTags] // Shallow copy to avoid modifying the original array\n\n while (unhandledUnclosedTags.length > i) {\n const unclosedTag = unhandledUnclosedTags.pop()\n\n // If tag is unclosable, don't close it and leave it in the original array,\n // So that it can be closed when it's no longer unclosable\n if (\n unclosableTags &&\n unclosedTag &&\n unclosableTags.find((element) => element.tag === unclosedTag.tag)\n ) {\n continue\n }\n\n if (unclosedTag && typeof unclosedTag.tag === 'string') {\n if (!nodeHasFormat) {\n // Handles cases where the tag has not been closed before, e.g. if the previous node\n // was a text match transformer that did not account for closing tags of the next node (e.g. a link)\n closingTagsBefore += unclosedTag.tag\n } else if (!nextNodeHasFormat) {\n closingTagsAfter += unclosedTag.tag\n }\n }\n // Mutate the original array to remove the closed tag\n unclosedTags.pop()\n }\n break\n }\n\n output = openingTags + output + closingTagsAfter\n // Replace trimmed version of textContent ensuring surrounding whitespace is not modified\n return closingTagsBefore + textContent.replace(frozenString, () => output)\n}\n\n// Get next or previous text sibling a text node, including cases\n// when it's a child of inline element (e.g. link)\nfunction getTextSibling(node: TextNode, backward: boolean): null | TextNode {\n let sibling = backward ? node.getPreviousSibling() : node.getNextSibling()\n\n if (!sibling) {\n const parent = node.getParentOrThrow()\n\n if (parent.isInline()) {\n sibling = backward ? parent.getPreviousSibling() : parent.getNextSibling()\n }\n }\n\n while (sibling) {\n if ($isElementNode(sibling)) {\n if (!sibling.isInline()) {\n break\n }\n\n const descendant = backward ? sibling.getLastDescendant() : sibling.getFirstDescendant()\n\n if ($isTextNode(descendant)) {\n return descendant\n } else {\n sibling = backward ? sibling.getPreviousSibling() : sibling.getNextSibling()\n }\n }\n\n if ($isTextNode(sibling)) {\n return sibling\n }\n\n if (!$isElementNode(sibling)) {\n return null\n }\n }\n\n return null\n}\n\nfunction hasFormat(node: LexicalNode | null | undefined, format: TextFormatType): boolean {\n return $isTextNode(node) && node.hasFormat(format)\n}\n", "/* eslint-disable regexp/no-obscure-range */\n/* eslint-disable regexp/no-empty-group */\n/* eslint-disable regexp/no-empty-capturing-group */\n/* eslint-disable regexp/optimal-quantifier-concatenation */\n/* eslint-disable regexp/no-misleading-capturing-group */\n/* eslint-disable regexp/no-contradiction-with-assertion */\n/* eslint-disable regexp/no-super-linear-backtracking */\n/**\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 { ListNode } from '@lexical/list'\n\nimport { $isListItemNode, $isListNode } from '@lexical/list'\nimport { $isHeadingNode, $isQuoteNode } from '@lexical/rich-text'\nimport {\n $isParagraphNode,\n $isTextNode,\n type ElementNode,\n type LexicalNode,\n type TextFormatType,\n} from 'lexical'\n\nimport type {\n ElementTransformer,\n MultilineElementTransformer,\n TextFormatTransformer,\n TextMatchTransformer,\n Transformer,\n} from './MarkdownTransformers.js'\n\ntype MarkdownFormatKind =\n | 'bold'\n | 'code'\n | 'horizontalRule'\n | 'italic'\n | 'italic_bold'\n | 'link'\n | 'noTransformation'\n | 'paragraphBlockQuote'\n | 'paragraphCodeBlock'\n | 'paragraphH1'\n | 'paragraphH2'\n | 'paragraphH3'\n | 'paragraphH4'\n | 'paragraphH5'\n | 'paragraphH6'\n | 'paragraphOrderedList'\n | 'paragraphUnorderedList'\n | 'strikethrough'\n | 'strikethrough_bold'\n | 'strikethrough_italic'\n | 'strikethrough_italic_bold'\n | 'underline'\n\ntype MarkdownCriteria = Readonly<{\n export?: (\n node: LexicalNode,\n traverseChildren: (elementNode: ElementNode) => string,\n ) => null | string\n exportFormat?: TextFormatType\n exportTag?: string\n exportTagClose?: string\n markdownFormatKind: MarkdownFormatKind | null | undefined\n regEx: RegExp\n regExForAutoFormatting: RegExp\n requiresParagraphStart: boolean | null | undefined\n}>\n\ntype MarkdownCriteriaArray = Array<MarkdownCriteria>\n\nconst autoFormatBase: MarkdownCriteria = {\n markdownFormatKind: null,\n regEx: /(?:)/,\n regExForAutoFormatting: /(?:)/,\n requiresParagraphStart: false,\n}\n\nconst paragraphStartBase: MarkdownCriteria = {\n ...autoFormatBase,\n requiresParagraphStart: true,\n}\n\nconst markdownHeader1: MarkdownCriteria = {\n ...paragraphStartBase,\n export: createHeadingExport(1),\n markdownFormatKind: 'paragraphH1',\n regEx: /^# /,\n regExForAutoFormatting: /^# /,\n}\n\nconst markdownHeader2: MarkdownCriteria = {\n ...paragraphStartBase,\n export: createHeadingExport(2),\n markdownFormatKind: 'paragraphH2',\n regEx: /^## /,\n regExForAutoFormatting: /^## /,\n}\n\nconst markdownHeader3: MarkdownCriteria = {\n ...paragraphStartBase,\n export: createHeadingExport(3),\n markdownFormatKind: 'paragraphH3',\n regEx: /^### /,\n regExForAutoFormatting: /^### /,\n}\n\nconst markdownHeader4: MarkdownCriteria = {\n ...paragraphStartBase,\n export: createHeadingExport(4),\n markdownFormatKind: 'paragraphH4',\n regEx: /^#### /,\n regExForAutoFormatting: /^#### /,\n}\n\nconst markdownHeader5: MarkdownCriteria = {\n ...paragraphStartBase,\n export: createHeadingExport(5),\n markdownFormatKind: 'paragraphH5',\n regEx: /^##### /,\n regExForAutoFormatting: /^##### /,\n}\n\nconst markdownHeader6: MarkdownCriteria = {\n ...paragraphStartBase,\n export: createHeadingExport(6),\n markdownFormatKind: 'paragraphH6',\n regEx: /^###### /,\n regExForAutoFormatting: /^###### /,\n}\n\nconst markdownBlockQuote: MarkdownCriteria = {\n ...paragraphStartBase,\n export: blockQuoteExport,\n markdownFormatKind: 'paragraphBlockQuote',\n regEx: /^> /,\n regExForAutoFormatting: /^> /,\n}\n\nconst markdownUnorderedListDash: MarkdownCriteria = {\n ...paragraphStartBase,\n export: listExport,\n markdownFormatKind: 'paragraphUnorderedList',\n regEx: /^(\\s{0,10})- /,\n regExForAutoFormatting: /^(\\s{0,10})- /,\n}\n\nconst markdownUnorderedListAsterisk: MarkdownCriteria = {\n ...paragraphStartBase,\n export: listExport,\n markdownFormatKind: 'paragraphUnorderedList',\n regEx: /^(\\s{0,10})\\* /,\n regExForAutoFormatting: /^(\\s{0,10})\\* /,\n}\n\nconst markdownOrderedList: MarkdownCriteria = {\n ...paragraphStartBase,\n export: listExport,\n markdownFormatKind: 'paragraphOrderedList',\n regEx: /^(\\s{0,10})(\\d+)\\.\\s/,\n regExForAutoFormatting: /^(\\s{0,10})(\\d+)\\.\\s/,\n}\n\nconst markdownHorizontalRule: MarkdownCriteria = {\n ...paragraphStartBase,\n markdownFormatKind: 'horizontalRule',\n regEx: /^\\*\\*\\*$/,\n regExForAutoFormatting: /^\\*\\*\\* /,\n}\n\nconst markdownHorizontalRuleUsingDashes: MarkdownCriteria = {\n ...paragraphStartBase,\n markdownFormatKind: 'horizontalRule',\n regEx: /^---$/,\n regExForAutoFormatting: /^--- /,\n}\n\nconst markdownInlineCode: MarkdownCriteria = {\n ...autoFormatBase,\n exportFormat: 'code',\n exportTag: '`',\n markdownFormatKind: 'code',\n regEx: /(`)(\\s*)([^`]*)(\\s*)(`)()/,\n regExForAutoFormatting: /(`)(\\s*\\b)([^`]*)(\\b\\s*)(`)(\\s)$/,\n}\n\nconst markdownBold: MarkdownCriteria = {\n ...autoFormatBase,\n exportFormat: 'bold',\n exportTag: '**',\n markdownFormatKind: 'bold',\n regEx: /(\\*\\*)(\\s*)([^*]*)(\\s*)(\\*\\*)()/,\n regExForAutoFormatting: /(\\*\\*)(\\s*\\b)([^*]*)(\\b\\s*)(\\*\\*)(\\s)$/,\n}\n\nconst markdownItalic: MarkdownCriteria = {\n ...autoFormatBase,\n exportFormat: 'italic',\n exportTag: '*',\n markdownFormatKind: 'italic',\n regEx: /(\\*)(\\s*)([^*]*)(\\s*)(\\*)()/,\n regExForAutoFormatting: /(\\*)(\\s*\\b)([^*]*)(\\b\\s*)(\\*)(\\s)$/,\n}\n\nconst markdownBold2: MarkdownCriteria = {\n ...autoFormatBase,\n exportFormat: 'bold',\n exportTag: '_',\n markdownFormatKind: 'bold',\n regEx: /(__)(\\s*)([^_]*)(\\s*)(__)()/,\n regExForAutoFormatting: /(__)(\\s*)([^_]*)(\\s*)(__)(\\s)$/,\n}\n\nconst markdownItalic2: MarkdownCriteria = {\n ...autoFormatBase,\n exportFormat: 'italic',\n exportTag: '_',\n markdownFormatKind: 'italic',\n regEx: /(_)()([^_]*)()(_)()/,\n regExForAutoFormatting: /(_)()([^_]*)()(_)(\\s)$/, // Maintain 7 groups.\n}\n\nconst fakeMarkdownUnderline: MarkdownCriteria = {\n ...autoFormatBase,\n exportFormat: 'underline',\n exportTag: '<u>',\n exportTagClose: '</u>',\n markdownFormatKind: 'underline',\n regEx: /(<u>)(\\s*)([^<]*)(\\s*)(<\\/u>)()/,\n regExForAutoFormatting: /(<u>)(\\s*\\b)([^<]*)(\\b\\s*)(<\\/u>)(\\s)$/,\n}\n\nconst markdownStrikethrough: MarkdownCriteria = {\n ...autoFormatBase,\n exportFormat: 'strikethrough',\n exportTag: '~~',\n markdownFormatKind: 'strikethrough',\n regEx: /(~~)(\\s*)([^~]*)(\\s*)(~~)()/,\n regExForAutoFormatting: /(~~)(\\s*\\b)([^~]*)(\\b\\s*)(~~)(\\s)$/,\n}\n\nconst markdownStrikethroughItalicBold: MarkdownCriteria = {\n ...autoFormatBase,\n markdownFormatKind: 'strikethrough_italic_bold',\n regEx: /(~~_\\*\\*)(\\s*\\b)([^*_~]+)(\\b\\s*)(\\*\\*_~~)()/,\n regExForAutoFormatting: /(~~_\\*\\*)(\\s*\\b)([^*_~]+)(\\b\\s*)(\\*\\*_~~)(\\s)$/,\n}\n\nconst markdownItalicbold: MarkdownCriteria = {\n ...autoFormatBase,\n markdownFormatKind: 'italic_bold',\n regEx: /(_\\*\\*)(\\s*\\b)([^*_]+)(\\b\\s*)(\\*\\*_)/,\n regExForAutoFormatting: /(_\\*\\*)(\\s*\\b)([^*_]+)(\\b\\s*)(\\*\\*_)(\\s)$/,\n}\n\nconst markdownStrikethroughItalic: MarkdownCriteria = {\n ...autoFormatBase,\n markdownFormatKind: 'strikethrough_italic',\n regEx: /(~~_)(\\s*)([^_~]+)(\\s*)(_~~)/,\n regExForAutoFormatting: /(~~_)(\\s*)([^_~]+)(\\s*)(_~~)(\\s)$/,\n}\n\nconst markdownStrikethroughBold: MarkdownCriteria = {\n ...autoFormatBase,\n markdownFormatKind: 'strikethrough_bold',\n regEx: /(~~\\*\\*)(\\s*\\b)([^*~]+)(\\b\\s*)(\\*\\*~~)/,\n regExForAutoFormatting: /(~~\\*\\*)(\\s*\\b)([^*~]+)(\\b\\s*)(\\*\\*~~)(\\s)$/,\n}\n\nconst markdownLink: MarkdownCriteria = {\n ...autoFormatBase,\n markdownFormatKind: 'link',\n regEx: /(\\[)([^\\]]*)(\\]\\()([^)]*)(\\)*)()/,\n regExForAutoFormatting: /(\\[)([^\\]]*)(\\]\\()([^)]*)(\\)*)(\\s)$/,\n}\n\nconst allMarkdownCriteriaForTextNodes: MarkdownCriteriaArray = [\n // Place the combination formats ahead of the individual formats.\n // Combos\n markdownStrikethroughItalicBold,\n markdownItalicbold,\n markdownStrikethroughItalic,\n markdownStrikethroughBold, // Individuals\n markdownInlineCode,\n markdownBold,\n markdownItalic, // Must appear after markdownBold\n markdownBold2,\n markdownItalic2, // Must appear after markdownBold2.\n fakeMarkdownUnderline,\n markdownStrikethrough,\n markdownLink,\n]\n\nconst allMarkdownCriteriaForParagraphs: MarkdownCriteriaArray = [\n markdownHeader1,\n markdownHeader2,\n markdownHeader3,\n markdownHeader4,\n markdownHeader5,\n markdownHeader6,\n markdownBlockQuote,\n markdownUnorderedListDash,\n markdownUnorderedListAsterisk,\n markdownOrderedList,\n markdownHorizontalRule,\n markdownHorizontalRuleUsingDashes,\n]\n\nexport function getAllMarkdownCriteriaForParagraphs(): MarkdownCriteriaArray {\n return allMarkdownCriteriaForParagraphs\n}\n\nexport function getAllMarkdownCriteriaForTextNodes(): MarkdownCriteriaArray {\n return allMarkdownCriteriaForTextNodes\n}\n\ntype Block = (\n node: LexicalNode,\n exportChildren: (elementNode: ElementNode) => string,\n) => null | string\n\nfunction createHeadingExport(level: number): Block {\n return (node, exportChildren) => {\n return $isHeadingNode(node) && node.getTag() === 'h' + level\n ? '#'.repeat(level) + ' ' + exportChildren(node)\n : null\n }\n}\n\nfunction listExport(node: LexicalNode, exportChildren: (_node: ElementNode) => string) {\n return $isListNode(node) ? processNestedLists(node, exportChildren, 0) : null\n}\n\n// TODO: should be param\nconst LIST_INDENT_SIZE = 4\n\nfunction processNestedLists(\n listNode: ListNode,\n exportChildren: (node: ElementNode) => string,\n depth: number,\n): string {\n const output: string[] = []\n const children = listNode.getChildren()\n let index = 0\n\n for (const listItemNode of children) {\n if ($isListItemNode(listItemNode)) {\n if (listItemNode.getChildrenSize() === 1) {\n const firstChild = listItemNode.getFirstChild()\n\n if ($isListNode(firstChild)) {\n output.push(processNestedLists(firstChild, exportChildren, depth + 1))\n continue\n }\n }\n\n const indent = ' '.repeat(depth * LIST_INDENT_SIZE)\n const prefix = listNode.getListType() === 'bullet' ? '- ' : `${listNode.getStart() + index}. `\n output.push(indent + prefix + exportChildren(listItemNode))\n index++\n }\n }\n\n return output.join('\\n')\n}\n\nfunction blockQuoteExport(node: LexicalNode, exportChildren: (_node: ElementNode) => string) {\n return $isQuoteNode(node) ? '> ' + exportChildren(node) : null\n}\n\nexport function indexBy<T>(\n list: Array<T>,\n callback: (arg0: T) => string | undefined,\n): Readonly<Record<string, Array<T>>> {\n const index: Record<string, Array<T>> = {}\n\n for (const item of list) {\n const key = callback(item)\n\n if (!key) {\n continue\n }\n\n if (index[key]) {\n index[key].push(item)\n } else {\n index[key] = [item]\n }\n }\n\n return index\n}\n\nexport function transformersByType(transformers: Array<Transformer>): Readonly<{\n element: Array<ElementTransformer>\n multilineElement: Array<MultilineElementTransformer>\n textFormat: Array<TextFormatTransformer>\n textMatch: Array<TextMatchTransformer>\n}> {\n const byType = indexBy(transformers, (t) => t.type)\n\n return {\n element: (byType.element || []) as Array<ElementTransformer>,\n multilineElement: (byType['multiline-element'] || []) as Array<MultilineElementTransformer>,\n textFormat: (byType['text-format'] || []) as Array<TextFormatTransformer>,\n textMatch: (byType['text-match'] || []) as Array<TextMatchTransformer>,\n }\n}\n\nexport const PUNCTUATION_OR_SPACE = /[!-/:-@[-`{-~\\s]/\n\nconst MARKDOWN_EMPTY_LINE_REG_EXP = /^\\s{0,3}$/\n\nexport function isEmptyParagraph(node: LexicalNode): boolean {\n if (!$isParagraphNode(node)) {\n return false\n }\n\n const firstChild = node.getFirstChild()\n return (\n firstChild == null ||\n (node.getChildrenSize() === 1 &&\n $isTextNode(firstChild) &&\n MARKDOWN_EMPTY_LINE_REG_EXP.test(firstChild.getTextContent()))\n )\n}\n", "/**\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 // eslint-disable-next-line regexp/no-useless-character-class, regexp/no-empty-capturing-group, regexp/no-empty-group\n openTagsRegExp: new RegExp(`${escapeRegExp}(${openTagsRegExp.join('|')})`, 'g'),\n transformersByTag,\n }\n}\n", "import { $isTextNode, type TextNode } from 'lexical'\n\n/**\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 */\nimport type { TextFormatTransformersIndex } from './MarkdownImport.js'\nimport type { TextMatchTransformer } from './MarkdownTransformers.js'\n\nimport {\n findOutermostTextFormatTransformer,\n importTextFormatTransformer,\n} from './importTextFormatTransformer.js'\nimport {\n findOutermostTextMatchTransformer,\n importFoundTextMatchTransformer,\n} from './importTextMatchTransformer.js'\n\n/**\n * Handles applying both text format and text match transformers.\n * It finds the outermost text format or text match and applies it,\n * then recursively calls itself to apply the next outermost transformer,\n * until there are no more transformers to apply.\n */\nexport function importTextTransformers(\n textNode: TextNode,\n textFormatTransformersIndex: TextFormatTransformersIndex,\n textMatchTransformers: Array<TextMatchTransformer>,\n) {\n let foundTextFormat = findOutermostTextFormatTransformer(textNode, textFormatTransformersIndex)\n\n let foundTextMatch = findOutermostTextMatchTransformer(textNode, textMatchTransformers)\n\n if (foundTextFormat && foundTextMatch) {\n // Find the outermost transformer\n if (\n foundTextFormat.startIndex <= foundTextMatch.startIndex &&\n foundTextFormat.endIndex >= foundTextMatch.endIndex\n ) {\n // foundTextFormat wraps foundTextMatch - apply foundTextFormat by setting foundTextMatch to null\n foundTextMatch = null\n } else {\n // foundTextMatch wraps foundTextFormat - apply foundTextMatch by setting foundTextFormat to null\n foundTextFormat = null\n }\n }\n\n if (foundTextFormat) {\n const result = importTextFormatTransformer(\n textNode,\n foundTextFormat.startIndex,\n foundTextFormat.endIndex,\n foundTextFormat.transformer,\n foundTextFormat.match,\n )\n\n if (result.nodeAfter && $isTextNode(result.nodeAfter) && !result.nodeAfter.hasFormat('code')) {\n importTextTransformers(result.nodeAfter, textFormatTransformersIndex, textMatchTransformers)\n }\n if (\n result.nodeBefore &&\n $isTextNode(result.nodeBefore) &&\n !result.nodeBefore.hasFormat('code')\n ) {\n importTextTransformers(result.nodeBefore, textFormatTransformersIndex, textMatchTransformers)\n }\n if (\n result.transformedNode &&\n $isTextNode(result.transformedNode) &&\n !result.transformedNode.hasFormat('code')\n ) {\n importTextTransformers(\n result.transformedNode,\n textFormatTransformersIndex,\n textMatchTransformers,\n )\n }\n } else if (foundTextMatch) {\n const result = importFoundTextMatchTransformer(\n textNode,\n foundTextMatch.startIndex,\n foundTextMatch.endIndex,\n foundTextMatch.transformer,\n foundTextMatch.match,\n )\n if (!result) {\n return\n }\n\n if (result.nodeAfter && $isTextNode(result.nodeAfter) && !result.nodeAfter.hasFormat('code')) {\n importTextTransformers(result.nodeAfter, textFormatTransformersIndex, textMatchTransformers)\n }\n if (\n result.nodeBefore &&\n $isTextNode(result.nodeBefore) &&\n !result.nodeBefore.hasFormat('code')\n ) {\n importTextTransformers(result.nodeBefore, textFormatTransformersIndex, textMatchTransformers)\n }\n if (\n result.transformedNode &&\n $isTextNode(result.transformedNode) &&\n !result.transformedNode.hasFormat('code')\n ) {\n importTextTransformers(\n result.transformedNode,\n textFormatTransformersIndex,\n textMatchTransformers,\n )\n }\n }\n // Handle escape characters\n const textContent = textNode.getTextContent()\n const escapedText = textContent.replace(/\\\\([*_`~])/g, '$1')\n textNode.setTextContent(escapedText)\n}\n", "/**\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 { TextNode } from 'lexical'\n\nimport type { TextFormatTransformersIndex } from './MarkdownImport.js'\nimport type { TextFormatTransformer } from './MarkdownTransformers.js'\n\nimport { PUNCTUATION_OR_SPACE } from './utils.js'\n\nexport function findOutermostTextFormatTransformer(\n textNode: TextNode,\n textFormatTransformersIndex: TextFormatTransformersIndex,\n): {\n endIndex: number\n match: RegExpMatchArray\n startIndex: number\n transformer: TextFormatTransformer\n} | null {\n const textContent = textNode.getTextContent()\n const match = findOutermostMatch(textContent, textFormatTransformersIndex)\n\n if (!match) {\n return null\n }\n\n const textFormatMatchStart: number = match.index || 0\n const textFormatMatchEnd = textFormatMatchStart + match[0].length\n\n // @ts-expect-error - vestiges of when tsconfig was not strict. Feel free to improve\n const transformer: TextFormatTransformer = textFormatTransformersIndex.transformersByTag[match[1]]\n\n return {\n endIndex: textFormatMatchEnd,\n match,\n startIndex: textFormatMatchStart,\n transformer,\n }\n}\n\n// Finds first \"<tag>content<tag>\" match that is not nested into another tag\nfunction findOutermostMatch(\n textContent: string,\n textTransformersIndex: TextFormatTransformersIndex,\n): null | RegExpMatchArray {\n const openTagsMatch = textContent.match(textTransformersIndex.openTagsRegExp)\n\n if (openTagsMatch == null) {\n return null\n }\n\n for (const match of openTagsMatch) {\n // Open tags reg exp might capture leading space so removing it\n // before using match to find transformer\n const tag = match.replace(/^\\s/, '')\n const fullMatchRegExp = textTransformersIndex.fullMatchRegExpByTag[tag]\n if (fullMatchRegExp == null) {\n continue\n }\n\n const fullMatch = textContent.match(fullMatchRegExp)\n const transformer = textTransformersIndex.transformersByTag[tag]\n if (fullMatch != null && transformer != null) {\n if (transformer.intraword !== false) {\n return fullMatch\n }\n\n // For non-intraword transformers checking if it's within a word\n // or surrounded with space/punctuation/newline\n const { index = 0 } = fullMatch\n const beforeChar = textContent[index - 1]\n const afterChar = textContent[index + fullMatch[0].length]\n\n if (\n (!beforeChar || PUNCTUATION_OR_SPACE.test(beforeChar)) &&\n (!afterChar || PUNCTUATION_OR_SPACE.test(afterChar))\n ) {\n return fullMatch\n }\n }\n }\n\n return null\n}\n\nexport function importTextFormatTransformer(\n textNode: TextNode,\n startIndex: number,\n endIndex: number,\n transformer: TextFormatTransformer,\n match: RegExpMatchArray,\n): {\n nodeAfter: TextNode | undefined // If split\n nodeBefore: TextNode | undefined // If split\n transformedNode: TextNode\n} {\n const textContent = textNode.getTextContent()\n\n // No text matches - we can safely process the text format match\n let nodeAfter: TextNode | undefined\n let nodeBefore: TextNode | undefined\n let transformedNode: TextNode\n\n // If matching full content there's no need to run splitText and can reuse existing textNode\n // to update its content and apply format. E.g. for **_Hello_** string after applying bold\n // format (**) it will reuse the same text node to apply italic (_)\n if (match[0] === textContent) {\n transformedNode = textNode\n } else {\n if (startIndex === 0) {\n ;[transformedNode, nodeAfter] = textNode.splitText(endIndex) as [\n TextNode,\n TextNode | undefined,\n ]\n } else {\n ;[nodeBefore, transformedNode, nodeAfter] = textNode.splitText(startIndex, endIndex) as [\n TextNode,\n TextNode,\n TextNode | undefined,\n ]\n }\n }\n\n transformedNode.setTextContent(match[2]!)\n if (transformer) {\n for (const format of transformer.format) {\n if (!transformedNode.hasFormat(format)) {\n transformedNode.toggleFormat(format)\n }\n }\n }\n\n return {\n nodeAfter,\n nodeBefore,\n transformedNode,\n }\n}\n", "import { type TextNode } from 'lexical'\n\n/**\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 */\nimport type { TextMatchTransformer } from './MarkdownTransformers.js'\n\nexport function findOutermostTextMatchTransformer(\n textNode_: TextNode,\n textMatchTransformers: Array<TextMatchTransformer>,\n): {\n endIndex: number\n match: RegExpMatchArray\n startIndex: number\n transformer: TextMatchTransformer\n} | null {\n const textNode = textNode_\n\n let foundMatchStartIndex: number | undefined = undefined\n let foundMatchEndIndex: number | undefined = undefined\n let foundMatchTransformer: TextMatchTransformer | undefined = undefined\n let foundMatch: RegExpMatchArray | undefined = undefined\n\n for (const transformer of textMatchTransformers) {\n if (!transformer.replace || !transformer.importRegExp) {\n continue\n }\n const match = textNode.getTextContent().match(transformer.importRegExp)\n\n if (!match) {\n continue\n }\n\n const startIndex = match.index || 0\n const endIndex = transformer.getEndIndex\n ? transformer.getEndIndex(textNode, match)\n : startIndex + match[0].length\n\n if (endIndex === false) {\n continue\n }\n\n if (\n foundMatchStartIndex === undefined ||\n foundMatchEndIndex === undefined ||\n (startIndex < foundMatchStartIndex && endIndex > foundMatchEndIndex)\n ) {\n foundMatchStartIndex = startIndex\n foundMatchEndIndex = endIndex\n foundMatchTransformer = transformer\n foundMatch = match\n }\n }\n\n if (\n foundMatchStartIndex === undefined ||\n foundMatchEndIndex === undefined ||\n foundMatchTransformer === undefined ||\n foundMatch === undefined\n ) {\n return null\n }\n\n return {\n endIndex: foundMatchEndIndex,\n match: foundMatch,\n startIndex: foundMatchStartIndex,\n transformer: foundMatchTransformer,\n }\n}\n\nexport function importFoundTextMatchTransformer(\n textNode: TextNode,\n startIndex: number,\n endIndex: number,\n transformer: TextMatchTransformer,\n match: RegExpMatchArray,\n): {\n nodeAfter: TextNode | undefined // If split\n nodeBefore: TextNode | undefined // If split\n transformedNode?: TextNode\n} | null {\n let nodeAfter, nodeBefore, transformedNode\n\n if (startIndex === 0) {\n ;[transformedNode, nodeAfter] = textNode.splitText(endIndex)\n } else {\n ;[nodeBefore, transformedNode, nodeAfter] = textNode.splitText(startIndex, endIndex)\n }\n\n if (!transformer.replace) {\n return null\n }\n const potentialTransformedNode = transformedNode\n ? transformer.replace(transformedNode, match)\n : undefined\n\n return {\n nodeAfter,\n nodeBefore,\n transformedNode: potentialTransformedNode || undefined,\n }\n}\n", "/**\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", "/* eslint-disable regexp/no-unused-capturing-group */\n/**\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 { ListType } from '@lexical/list'\nimport type { HeadingTagType } from '@lexical/rich-text'\nimport type { ElementNode, Klass, LexicalNode, TextFormatType, TextNode } from 'lexical'\n\nimport {\n $createListItemNode,\n $createListNode,\n $isListItemNode,\n $isListNode,\n ListItemNode,\n ListNode,\n} from '@lexical/list'\nimport {\n $createHeadingNode,\n $createQuoteNode,\n $isHeadingNode,\n $isQuoteNode,\n HeadingNode,\n QuoteNode,\n} from '@lexical/rich-text'\nimport { $createLineBreakNode } from 'lexical'\n\nexport type Transformer =\n | ElementTransformer\n | MultilineElementTransformer\n | TextFormatTransformer\n | TextMatchTransformer\n\nexport type ElementTransformer = {\n dependencies: Array<Klass<LexicalNode>>\n /**\n * `export` is called when the `$convertToMarkdownString` is called to convert the editor state into markdown.\n *\n * @return return null to cancel the export, even though the regex matched. Lexical will then search for the next transformer.\n */\n export: (\n node: LexicalNode,\n\n traverseChildren: (node: ElementNode) => string,\n ) => null | string\n regExp: RegExp\n /**\n * `replace` is called when markdown is imported or typed in the editor\n *\n * @return return false to cancel the transform, even though the regex matched. Lexical will then search for the next transformer.\n */\n replace: (\n parentNode: ElementNode,\n children: Array<LexicalNode>,\n match: Array<string>,\n /**\n * Whether the match is from an import operation (e.g. through `$convertFromMarkdownString`) or not (e.g. through typing in the editor).\n */\n isImport: boolean,\n ) => boolean | void\n type: 'element'\n}\n\nexport type MultilineElementTransformer = {\n dependencies: Array<Klass<LexicalNode>>\n /**\n * `export` is called when the `$convertToMarkdownString` is called to convert the editor state into markdown.\n *\n * @return return null to cancel the export, even though the regex matched. Lexical will then search for the next transformer.\n */\n export?: (\n node: LexicalNode,\n\n traverseChildren: (node: ElementNode) => string,\n ) => null | string\n /**\n * Use this function to manually handle the import process, once the `regExpStart` has matched successfully.\n * Without providing this function, the default behavior is to match until `regExpEnd` is found, or until the end of the document if `regExpEnd.optional` is true.\n *\n * @returns a tuple or null. The 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. If null is returned, the next multilineElementTransformer will be tried. If undefined is returned, the default behavior will be used.\n */\n handleImportAfterStartMatch?: (args: {\n lines: Array<string>\n rootNode: ElementNode\n startLineIndex: number\n startMatch: RegExpMatchArray\n transformer: MultilineElementTransformer\n }) => [boolean, number] | null | undefined\n /**\n * This regex determines when to stop matching. Anything in between regExpStart and regExpEnd will be matched\n */\n regExpEnd?:\n | {\n /**\n * Whether the end match is optional. If true, the end match is not required to match for the transformer to be triggered.\n * The entire text from regexpStart to the end of the document will then be matched.\n */\n optional?: true\n regExp: RegExp\n }\n | RegExp\n /**\n * This regex determines when to start matching\n */\n regExpStart: RegExp\n /**\n * `replace` is called only when markdown is imported in the editor, not when it's typed\n *\n * @return return false to cancel the transform, even though the regex matched. Lexical will then search for the next transformer.\n */\n replace: (\n rootNode: ElementNode,\n /**\n * During markdown shortcut transforms, children nodes may be provided to the transformer. If this is the case, no `linesInBetween` will be provided and\n * the children nodes should be used instead of the `linesInBetween` to create the new node.\n */\n children: Array<LexicalNode> | null,\n startMatch: Array<string>,\n endMatch: Array<string> | null,\n /**\n * linesInBetween includes the text between the start & end matches, split up by lines, not including the matches themselves.\n * This is null when the transformer is triggered through markdown shortcuts (by typing in the editor)\n */\n linesInBetween: Array<string> | null,\n /**\n * Whether the match is from an import operation (e.g. through `$convertFromMarkdownString`) or not (e.g. through typing in the editor).\n */\n isImport: boolean,\n ) => boolean | void\n type: 'multiline-element'\n}\n\nexport type TextFormatTransformer = Readonly<{\n format: ReadonlyArray<TextFormatType>\n intraword?: boolean\n tag: string\n type: 'text-format'\n}>\n\nexport type TextMatchTransformer = Readonly<{\n dependencies: Array<Klass<LexicalNode>>\n /**\n * Determines how a node should be exported to markdown\n */\n export?: (\n node: LexicalNode,\n\n exportChildren: (node: ElementNode) => string,\n\n exportFormat: (node: TextNode, textContent: string) => string,\n ) => null | string\n /**\n * For import operations, this function can be used to determine the end index of the match, after `importRegExp` has matched.\n * Without this function, the end index will be determined by the length of the match from `importRegExp`. Manually determining the end index can be useful if\n * the match from `importRegExp` is not the entire text content of the node. That way, `importRegExp` can be used to match only the start of the node, and `getEndIndex`\n * can be used to match the end of the node.\n *\n * @returns The end index of the match, or false if the match was unsuccessful and a different transformer should be tried.\n */\n getEndIndex?: (node: TextNode, match: RegExpMatchArray) => false | number\n /**\n * This regex determines what text is matched during markdown imports\n */\n importRegExp?: RegExp\n /**\n * This regex determines what text is matched for markdown shortcuts while typing in the editor\n */\n regExp: RegExp\n /**\n * Determines how the matched markdown text should be transformed into a node during the markdown import process\n *\n * @returns nothing, or a TextNode that may be a child of the new node that is created.\n * If a TextNode is returned, text format matching will be applied to it (e.g. bold, italic, etc.)\n */\n replace?: (node: TextNode, match: RegExpMatchArray) => TextNode | void\n /**\n * Single character that allows the transformer to trigger when typed in the editor. This does not affect markdown imports outside of the markdown shortcut plugin.\n * If the trigger is matched, the `regExp` will be used to match the text in the second step.\n */\n trigger?: string\n type: 'text-match'\n}>\n\nconst EMPTY_OR_WHITESPACE_ONLY = /^[\\t ]*$/\nconst ORDERED_LIST_REGEX = /^(\\s*)(\\d+)\\.\\s/\nconst UNORDERED_LIST_REGEX = /^(\\s*)[-*+]\\s/\nconst CHECK_LIST_REGEX = /^(\\s*)(?:-\\s)?\\s?(\\[(\\s|x)?\\])\\s/i\nconst HEADING_REGEX = /^(#{1,6})\\s/\nconst QUOTE_REGEX = /^>\\s/\nconst CODE_START_REGEX = /^[ \\t]*(\\\\`\\\\`\\\\`|```)(\\w+)?/\nconst CODE_END_REGEX = /[ \\t]*(\\\\`\\\\`\\\\`|```)$/\nconst CODE_SINGLE_LINE_REGEX = /^[ \\t]*```[^`]+(?:(?:`{1,2}|`{4,})[^`]+)*```(?:[^`]|$)/\nconst TABLE_ROW_REG_EXP = /^\\|(.+)\\|\\s?$/\nconst TABLE_ROW_DIVIDER_REG_EXP = /^(\\| ?:?-*:? ?)+\\|\\s?$/\nconst TAG_START_REGEX = /^[ \\t]*<[a-z_][\\w-]*(?:\\s[^<>]*)?\\/?>/i\nconst TAG_END_REGEX = /^[ \\t]*<\\/[a-z_][\\w-]*\\s*>/i\n\nconst createBlockNode = (\n createNode: (match: Array<string>) => ElementNode,\n): ElementTransformer['replace'] => {\n return (parentNode, children, match) => {\n const node = createNode(match)\n node.append(...children)\n parentNode.replace(node)\n node.select(0, 0)\n }\n}\n\n// Amount of spaces that define indentation level\n// TODO: should be an option\nconst LIST_INDENT_SIZE = 4\n\nfunction getIndent(whitespaces: string): number {\n const tabs = whitespaces.match(/\\t/g)\n const spaces = whitespaces.match(/ /g)\n\n let indent = 0\n\n if (tabs) {\n indent += tabs.length\n }\n\n if (spaces) {\n indent += Math.floor(spaces.length / LIST_INDENT_SIZE)\n }\n\n return indent\n}\n\nconst listReplace = (listType: ListType): ElementTransformer['replace'] => {\n return (parentNode, children, match) => {\n const previousNode = parentNode.getPreviousSibling()\n const nextNode = parentNode.getNextSibling()\n const listItem = $createListItemNode(listType === 'check' ? match[3] === 'x' : undefined)\n if ($isListNode(nextNode) && nextNode.getListType() === listType) {\n const firstChild = nextNode.getFirstChild()\n if (firstChild !== null) {\n firstChild.insertBefore(listItem)\n } else {\n // should never happen, but let's handle gracefully, just in case.\n nextNode.append(listItem)\n }\n parentNode.remove()\n } else if ($isListNode(previousNode) && previousNode.getListType() === listType) {\n previousNode.append(listItem)\n parentNode.remove()\n } else {\n const list = $createListNode(listType, listType === 'number' ? Number(match[2]) : undefined)\n list.append(listItem)\n parentNode.replace(list)\n }\n listItem.append(...children)\n listItem.select(0, 0)\n const indent = getIndent(match[1]!)\n if (indent) {\n listItem.setIndent(indent)\n }\n }\n}\n\nconst listExport = (\n listNode: ListNode,\n exportChildren: (node: ElementNode) => string,\n depth: number,\n): string => {\n const output: string[] = []\n const children = listNode.getChildren()\n let index = 0\n for (const listItemNode of children) {\n if ($isListItemNode(listItemNode)) {\n if (listItemNode.getChildrenSize() === 1) {\n const firstChild = listItemNode.getFirstChild()\n if ($isListNode(firstChild)) {\n output.push(listExport(firstChild, exportChildren, depth + 1))\n continue\n }\n }\n const indent = ' '.repeat(depth * LIST_INDENT_SIZE)\n const listType = listNode.getListType()\n const prefix =\n listType === 'number'\n ? `${listNode.getStart() + index}. `\n : listType === 'check'\n ? `- [${listItemNode.getChecked() ? 'x' : ' '}] `\n : '- '\n output.push(indent + prefix + exportChildren(listItemNode))\n index++\n }\n }\n\n return output.join('\\n')\n}\n\nexport const HEADING: ElementTransformer = {\n type: 'element',\n dependencies: [HeadingNode],\n export: (node, exportChildren) => {\n if (!$isHeadingNode(node)) {\n return null\n }\n const level = Number(node.getTag().slice(1))\n return '#'.repeat(level) + ' ' + exportChildren(node)\n },\n regExp: HEADING_REGEX,\n replace: createBlockNode((match) => {\n const tag = ('h' + match[1]!.length) as HeadingTagType\n return $createHeadingNode(tag)\n }),\n}\n\nexport const QUOTE: ElementTransformer = {\n type: 'element',\n dependencies: [QuoteNode],\n export: (node, exportChildren) => {\n if (!$isQuoteNode(node)) {\n return null\n }\n\n const lines = exportChildren(node).split('\\n')\n const output: string[] = []\n for (const line of lines) {\n output.push('> ' + line)\n }\n return output.join('\\n')\n },\n regExp: QUOTE_REGEX,\n replace: (parentNode, children, _match, isImport) => {\n if (isImport) {\n const previousNode = parentNode.getPreviousSibling()\n if ($isQuoteNode(previousNode)) {\n previousNode.splice(previousNode.getChildrenSize(), 0, [\n $createLineBreakNode(),\n ...children,\n ])\n previousNode.select(0, 0)\n parentNode.remove()\n return\n }\n }\n\n const node = $createQuoteNode()\n node.append(...children)\n parentNode.replace(node)\n node.select(0, 0)\n },\n}\n\nexport const UNORDERED_LIST: ElementTransformer = {\n type: 'element',\n dependencies: [ListNode, ListItemNode],\n export: (node, exportChildren) => {\n return $isListNode(node) ? listExport(node, exportChildren, 0) : null\n },\n regExp: UNORDERED_LIST_REGEX,\n replace: listReplace('bullet'),\n}\n\nexport const CHECK_LIST: ElementTransformer = {\n type: 'element',\n dependencies: [ListNode, ListItemNode],\n export: (node, exportChildren) => {\n return $isListNode(node) ? listExport(node, exportChildren, 0) : null\n },\n regExp: CHECK_LIST_REGEX,\n replace: listReplace('check'),\n}\n\nexport const ORDERED_LIST: ElementTransformer = {\n type: 'element',\n dependencies: [ListNode, ListItemNode],\n export: (node, exportChildren) => {\n return $isListNode(node) ? listExport(node, exportChildren, 0) : null\n },\n regExp: ORDERED_LIST_REGEX,\n replace: listReplace('number'),\n}\n\nexport const INLINE_CODE: TextFormatTransformer = {\n type: 'text-format',\n format: ['code'],\n tag: '`',\n}\n\nexport const HIGHLIGHT: TextFormatTransformer = {\n type: 'text-format',\n format: ['highlight'],\n tag: '==',\n}\n\nexport const BOLD_ITALIC_STAR: TextFormatTransformer = {\n type: 'text-format',\n format: ['bold', 'italic'],\n tag: '***',\n}\n\nexport const BOLD_ITALIC_UNDERSCORE: TextFormatTransformer = {\n type: 'text-format',\n format: ['bold', 'italic'],\n intraword: false,\n tag: '___',\n}\n\nexport const BOLD_STAR: TextFormatTransformer = {\n type: 'text-format',\n format: ['bold'],\n tag: '**',\n}\n\nexport const BOLD_UNDERSCORE: TextFormatTransformer = {\n type: 'text-format',\n format: ['bold'],\n intraword: false,\n tag: '__',\n}\n\nexport const STRIKETHROUGH: TextFormatTransformer = {\n type: 'text-format',\n format: ['strikethrough'],\n tag: '~~',\n}\n\nexport const ITALIC_STAR: TextFormatTransformer = {\n type: 'text-format',\n format: ['italic'],\n tag: '*',\n}\n\nexport const ITALIC_UNDERSCORE: TextFormatTransformer = {\n type: 'text-format',\n format: ['italic'],\n intraword: false,\n tag: '_',\n}\n\nexport function normalizeMarkdown(input: string, shouldMergeAdjacentLines: boolean): string {\n const lines = input.split('\\n')\n let inCodeBlock = false\n const sanitizedLines: string[] = []\n let nestedDeepCodeBlock = 0\n\n for (let i = 0; i < lines.length; i++) {\n const line = lines[i]!\n const lastLine = sanitizedLines[sanitizedLines.length - 1]\n\n // Code blocks of ```single line``` don't toggle the inCodeBlock flag\n if (CODE_SINGLE_LINE_REGEX.test(line)) {\n sanitizedLines.push(line)\n continue\n }\n\n if (CODE_END_REGEX.test(line)) {\n if (nestedDeepCodeBlock === 0) {\n inCodeBlock = true\n }\n if (nestedDeepCodeBlock === 1) {\n inCodeBlock = false\n }\n if (nestedDeepCodeBlock > 0) {\n nestedDeepCodeBlock--\n }\n sanitizedLines.push(line)\n continue\n }\n\n // Toggle inCodeBlock state when encountering start or end of a code block\n if (CODE_START_REGEX.test(line)) {\n inCodeBlock = true\n nestedDeepCodeBlock++\n sanitizedLines.push(line)\n continue\n }\n\n // If we are inside a code block, keep the line unchanged\n if (inCodeBlock) {\n sanitizedLines.push(line)\n continue\n }\n\n // In markdown the concept of \"empty paragraphs\" does not exist.\n // Blocks must be separated by an empty line. Non-empty adjacent lines must be merged.\n if (\n EMPTY_OR_WHITESPACE_ONLY.test(line) ||\n EMPTY_OR_WHITESPACE_ONLY.test(lastLine!) ||\n !lastLine ||\n HEADING_REGEX.test(lastLine) ||\n HEADING_REGEX.test(line) ||\n QUOTE_REGEX.test(line) ||\n ORDERED_LIST_REGEX.test(line) ||\n UNORDERED_LIST_REGEX.test(line) ||\n CHECK_LIST_REGEX.test(line) ||\n TABLE_ROW_REG_EXP.test(line) ||\n TABLE_ROW_DIVIDER_REG_EXP.test(line) ||\n !shouldMergeAdjacentLines ||\n TAG_START_REGEX.test(line) ||\n TAG_END_REGEX.test(line) ||\n TAG_START_REGEX.test(lastLine) ||\n TAG_END_REGEX.test(lastLine) ||\n CODE_END_REGEX.test(lastLine)\n ) {\n sanitizedLines.push(line)\n } else {\n sanitizedLines[sanitizedLines.length - 1] = lastLine + ' ' + line.trim()\n }\n }\n\n return sanitizedLines.join('\\n')\n}\n", "/**\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 } from 'lexical'\n\nimport type {\n ElementTransformer,\n MultilineElementTransformer,\n TextFormatTransformer,\n TextMatchTransformer,\n Transformer,\n} from './MarkdownTransformers.js'\n\nimport { createMarkdownExport } from './MarkdownExport.js'\nimport { createMarkdownImport } from './MarkdownImport.js'\nimport { registerMarkdownShortcuts } from './MarkdownShortcuts.js'\nimport {\n BOLD_ITALIC_STAR,\n BOLD_ITALIC_UNDERSCORE,\n BOLD_STAR,\n BOLD_UNDERSCORE,\n CHECK_LIST,\n HEADING,\n HIGHLIGHT,\n INLINE_CODE,\n ITALIC_STAR,\n ITALIC_UNDERSCORE,\n normalizeMarkdown,\n ORDERED_LIST,\n QUOTE,\n STRIKETHROUGH,\n UNORDERED_LIST,\n} from './MarkdownTransformers.js'\n\nconst ELEMENT_TRANSFORMERS: Array<ElementTransformer> = [\n HEADING,\n QUOTE,\n UNORDERED_LIST,\n ORDERED_LIST,\n]\n\nconst MULTILINE_ELEMENT_TRANSFORMERS: Array<MultilineElementTransformer> = []\n\n// Order of text format transformers matters:\n//\n// - code should go first as it prevents any transformations inside\n// - then longer tags match (e.g. ** or __ should go before * or _)\nconst TEXT_FORMAT_TRANSFORMERS: Array<TextFormatTransformer> = [\n INLINE_CODE,\n BOLD_ITALIC_STAR,\n BOLD_ITALIC_UNDERSCORE,\n BOLD_STAR,\n BOLD_UNDERSCORE,\n HIGHLIGHT,\n ITALIC_STAR,\n ITALIC_UNDERSCORE,\n STRIKETHROUGH,\n]\n\nconst TEXT_MATCH_TRANSFORMERS: Array<TextMatchTransformer> = []\n\nconst TRANSFORMERS: Array<Transformer> = [\n ...ELEMENT_TRANSFORMERS,\n ...MULTILINE_ELEMENT_TRANSFORMERS,\n ...TEXT_FORMAT_TRANSFORMERS,\n ...TEXT_MATCH_TRANSFORMERS,\n]\n\n/**\n * Renders markdown from a string. The selection is moved to the start after the operation.\n *\n * @param {boolean} [shouldPreserveNewLines] By setting this to true, new lines will be preserved between conversions\n * @param {boolean} [shouldMergeAdjacentLines] By setting this to true, adjacent non empty lines will be merged according to commonmark spec: https://spec.commonmark.org/0.24/#example-177. Not applicable if shouldPreserveNewLines = true.\n */\nfunction $convertFromMarkdownString(\n markdown: string,\n transformers: Array<Transformer> = TRANSFORMERS,\n node?: ElementNode,\n shouldPreserveNewLines = false,\n shouldMergeAdjacentLines = true,\n): void {\n const sanitizedMarkdown = shouldPreserveNewLines\n ? markdown\n : normalizeMarkdown(markdown, shouldMergeAdjacentLines)\n const importMarkdown = createMarkdownImport(transformers, shouldPreserveNewLines)\n return importMarkdown(sanitizedMarkdown, node)\n}\n\n/**\n * Renders string from markdown. The selection is moved to the start after the operation.\n */\nfunction $convertToMarkdownString(\n transformers: Array<Transformer> = TRANSFORMERS,\n node?: ElementNode,\n shouldPreserveNewLines: boolean = false,\n): string {\n const exportMarkdown = createMarkdownExport(transformers, shouldPreserveNewLines)\n return exportMarkdown(node)\n}\n\nexport {\n $convertFromMarkdownString,\n $convertToMarkdownString,\n BOLD_ITALIC_STAR,\n BOLD_ITALIC_UNDERSCORE,\n BOLD_STAR,\n BOLD_UNDERSCORE,\n CHECK_LIST,\n ELEMENT_TRANSFORMERS,\n type ElementTransformer,\n HEADING,\n HIGHLIGHT,\n INLINE_CODE,\n ITALIC_STAR,\n ITALIC_UNDERSCORE,\n MULTILINE_ELEMENT_TRANSFORMERS,\n type MultilineElementTransformer,\n ORDERED_LIST,\n QUOTE,\n registerMarkdownShortcuts,\n STRIKETHROUGH,\n TEXT_FORMAT_TRANSFORMERS,\n TEXT_MATCH_TRANSFORMERS,\n type TextFormatTransformer,\n type TextMatchTransformer,\n type Transformer,\n TRANSFORMERS,\n UNORDERED_LIST,\n}\n"],
|
|
5
|
+
"mappings": "AACO,IAAMA,GACX,OAAOC,OAAW,KAClB,OAAOA,OAAOC,SAAa,KAC3B,OAAOD,OAAOC,SAASC,cAAkB,ICJ3C,OAAAC,KAAAC,OAAA,yBACA,OAAsBC,UAAAA,OAAc,QA2B7B,SAAAC,GAAAC,EAAA,CAAA,IAAAC,EAAAJ,GAAA,CAAA,EAA6BK,E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AAkC,GAAK,CAGvC,OADuBM,GAAqBR,EAAcE,CAAA,EACpCD,CAAA,CACxB",
|
|
6
|
+
"names": ["CAN_USE_DOM", "window", "document", "createElement", "c", "_c", "useRef", "useRunDeprioritized", "t0", "$", "timeout", "undefined", "idleHandleRef", "t1", "fn", "Promise", "resolve", "exec", "window", "current", "cancelIdleCallback", "requestIdleCallback", "interactionResponse", "then", "setTimeout", "requestAnimationFrame", "Point", "_x", "_y", "constructor", "x", "y", "calcDeltaXTo", "calcDeltaYTo", "calcDistanceTo", "point", "Math", "sqrt", "pow", "calcHorizontalDistanceTo", "abs", "calcVerticalDistance", "equals", "isPoint", "useLexicalComposerContext", "mergeRegister", "$getSelection", "$isRangeSelection", "$isTextNode", "COMMAND_PRIORITY_LOW", "createCommand", "getDOMSelection", "useCallback", "useEffect", "useState", "React", "c", "_c", "useLexicalComposerContext", "mergeRegister", "$getSelection", "$isRangeSelection", "$setSelection", "COMMAND_PRIORITY_LOW", "COMMAND_PRIORITY_NORMAL", "createCommand", "KEY_ARROW_DOWN_COMMAND", "KEY_ARROW_UP_COMMAND", "KEY_ENTER_COMMAND", "KEY_ESCAPE_COMMAND", "KEY_TAB_COMMAND", "useCallback", "useEffect", "useLayoutEffect", "useMemo", "useRef", "useState", "baseClass", "scrollIntoViewIfNeeded", "target", "typeaheadContainerNode", "document", "getElementById", "typeaheadRect", "getBoundingClientRect", "top", "height", "window", "innerHeight", "scrollIntoView", "block", "getFullMatchOffset", "documentText", "entryText", "offset", "triggerOffset", "i", "length", "substring", "$splitNodeContainingQuery", "match", "selection", "$getSelection", "$isRangeSelection", "isCollapsed", "anchor", "type", "anchorNode", "getNode", "isSimpleText", "selectionOffset", "textContent", "getTextContent", "slice", "characterOffset", "replaceableString", "queryOffset", "matchingString", "startOffset", "newNode", "splitText", "getScrollParent", "element", "includeHidden", "style", "getComputedStyle", "excludeStaticParent", "position", "overflowRegex", "body", "parent1", "parentElement", "test", "overflow", "overflowY", "overflowX", "isTriggerVisibleInNearestScrollContainer", "targetElement", "containerElement", "tRect", "cRect", "bottom", "useDynamicPositioning", "resolution", "targetElementRef", "onReposition", "onVisibilityChange", "$", "_c", "editor", "useLexicalComposerContext", "t0", "t1", "current", "rootElement", "getRootElement", "rootScrollParent", "ticking", "previousIsInView", "handleScroll", "requestAnimationFrame", "isInView", "resizeObserver", "ResizeObserver", "addEventListener", "capture", "passive", "observe", "disconnect", "removeEventListener", "useEffect", "SCROLL_TYPEAHEAD_OPTION_INTO_VIEW_COMMAND", "createCommand", "LexicalMenu", "anchorElementRef", "close", "groups", "menuRenderFn", "shouldSplitNodeWithQuery", "selectedItemKey", "setSelectedItemKey", "useState", "updateSelectedItem", "useCallback", "item", "rootElem", "setAttribute", "key", "setSelectedItemKeyToFirstMatchingItem", "allItems", "flatMap", "group", "items", "firstMatchingItem", "selectItemAndCleanUp", "selectedItem", "update", "textNodeContainingQuery", "remove", "setTimeout", "read", "clone", "$setSelection", "onSelect", "queryString", "removeAttribute", "useLayoutEffect", "mergeRegister", "registerCommand", "ref", "COMMAND_PRIORITY_LOW", "KEY_ARROW_DOWN_COMMAND", "payload", "event", "selectedIndex", "findIndex", "newSelectedIndex", "newSelectedItem", "dispatchCommand", "index", "preventDefault", "stopImmediatePropagation", "COMMAND_PRIORITY_NORMAL", "KEY_ARROW_UP_COMMAND", "KEY_ESCAPE_COMMAND", "KEY_TAB_COMMAND", "find", "KEY_ENTER_COMMAND", "listItemProps", "useMemo", "setContainerDivAttributes", "containerDiv", "className", "display", "useMenuAnchorRef", "anchorElem", "setResolution", "Symbol", "for", "CAN_USE_DOM", "createElement", "useRef", "parent", "undefined", "menuEle", "firstChild", "width", "getRect", "left", "rawTop", "scrollY", "scrollX", "menuRect", "menuHeight", "menuWidth", "rootElementRect", "isRTL", "dir", "documentElement", "anchorRect", "leftBoundary", "Math", "max", "right", "newLeft", "wouldGoOffBottomOfScreen", "wouldGoOffTopOfScreen", "isConnected", "append", "positionMenu", "t2", "t3", "rootElement_0", "containerDiv_0", "t4", "PUNCTUATION", "getTextUpToAnchor", "selection", "anchor", "type", "anchorNode", "getNode", "isSimpleText", "anchorOffset", "offset", "getTextContent", "slice", "tryToPositionRange", "leadOffset", "range", "editorWindow", "domSelection", "getDOMSelection", "isCollapsed", "startOffset", "endOffset", "setStart", "setEnd", "getQueryTextForSearch", "editor", "text", "getEditorState", "read", "$getSelection", "$isRangeSelection", "isSelectionOnEntityBoundary", "prevSibling", "getPreviousSibling", "$isTextNode", "isTextEntity", "startTransition", "callback", "ENABLE_SLASH_MENU_COMMAND", "createCommand", "LexicalTypeaheadMenuPlugin", "anchorClassName", "anchorElem", "groups", "menuRenderFn", "onClose", "onOpen", "onQueryChange", "triggerFn", "useLexicalComposerContext", "resolution", "setResolution", "useState", "anchorElementRef", "useMenuAnchorRef", "closeTypeahead", "useCallback", "openTypeahead", "res", "useEffect", "mergeRegister", "registerCommand", "node", "match", "matchingString", "replaceableString", "_window", "window", "document", "createRange", "getRect", "getBoundingClientRect", "COMMAND_PRIORITY_LOW", "updateListener", "undefined", "query", "removeUpdateListener", "registerUpdateListener", "current", "_jsx", "LexicalMenu", "close", "shouldSplitNodeWithQuery", "Rect", "_bottom", "_left", "_right", "_top", "constructor", "left", "top", "right", "bottom", "physicTop", "physicBottom", "physicLeft", "physicRight", "fromDOM", "dom", "height", "width", "getBoundingClientRect", "fromLWTH", "fromDOMRect", "domRect", "fromLTRB", "fromPoints", "startPoint", "endPoint", "x", "y", "contains", "target", "isPoint", "isOnTopSide", "isOnBottomSide", "isOnLeftSide", "isOnRightSide", "reason", "result", "distanceFromPoint", "point", "containsResult", "distance", "dx", "dy", "Math", "sqrt", "equals", "generateNewRect", "intersectsWith", "rect", "h1", "x1", "y1", "w1", "h2", "x2", "y2", "w2", "maxX", "maxY", "minX", "minY", "abs", "getEnabledNodes", "editorConfig", "getEnabledNodesFromServerNodes", "nodes", "features", "map", "node", "$getRoot", "$isDecoratorNode", "$isElementNode", "$isLineBreakNode", "$isTextNode", "$isListItemNode", "$isListNode", "$isHeadingNode", "$isQuoteNode", "$isParagraphNode", "$isTextNode", "autoFormatBase", "markdownFormatKind", "regEx", "regExForAutoFormatting", "requiresParagraphStart", "paragraphStartBase", "markdownHeader1", "export", "createHeadingExport", "markdownHeader2", "markdownHeader3", "markdownHeader4", "markdownHeader5", "markdownHeader6", "markdownBlockQuote", "blockQuoteExport", "markdownUnorderedListDash", "listExport", "markdownUnorderedListAsterisk", "markdownOrderedList", "markdownHorizontalRule", "markdownHorizontalRuleUsingDashes", "markdownInlineCode", "exportFormat", "exportTag", "markdownBold", "markdownItalic", "markdownBold2", "markdownItalic2", "fakeMarkdownUnderline", "exportTagClose", "markdownStrikethrough", "markdownStrikethroughItalicBold", "markdownItalicbold", "markdownStrikethroughItalic", "markdownStrikethroughBold", "markdownLink", "createHeadingExport", "level", "node", "exportChildren", "$isHeadingNode", "getTag", "repeat", "listExport", "$isListNode", "processNestedLists", "LIST_INDENT_SIZE", "listNode", "depth", "output", "children", "getChildren", "index", "listItemNode", "$isListItemNode", "getChildrenSize", "firstChild", "getFirstChild", "push", "indent", "prefix", "getListType", "getStart", "join", "blockQuoteExport", "$isQuoteNode", "indexBy", "list", "callback", "item", "key", "transformersByType", "transformers", "byType", "t", "type", "element", "multilineElement", "textFormat", "textMatch", "PUNCTUATION_OR_SPACE", "MARKDOWN_EMPTY_LINE_REG_EXP", "isEmptyParagraph", "$isParagraphNode", "$isTextNode", "test", "getTextContent", "createMarkdownExport", "transformers", "shouldPreserveNewLines", "byType", "transformersByType", "elementTransformers", "multilineElement", "element", "isNewlineDelimited", "textFormatTransformers", "textFormat", "filter", "transformer", "format", "length", "sort", "a", "b", "includes", "node", "output", "children", "$getRoot", "getChildren", "forEach", "child", "i", "result", "exportTopLevelElements", "textMatch", "push", "isEmptyParagraph", "concat", "join", "textTransformersIndex", "textMatchTransformers", "export", "_node", "exportChildren", "$isElementNode", "$isDecoratorNode", "getTextContent", "unclosedTags", "unclosableTags", "mainLoop", "parentNode", "textNode", "textContent", "exportTextFormat", "$isLineBreakNode", "$isTextNode", "textTransformers", "frozenString", "trim", "hasFormat", "replace", "openingTags", "closingTagsBefore", "closingTagsAfter", "prevNode", "getTextSibling", "nextNode", "applied", "Set", "tag", "has", "add", "find", "unclosedTag", "nodeHasFormat", "nextNodeHasFormat", "unhandledUnclosedTags", "pop", "backward", "sibling", "getPreviousSibling", "getNextSibling", "parent", "getParentOrThrow", "isInline", "descendant", "getLastDescendant", "getFirstDescendant", "$isListItemNode", "$isListNode", "$isQuoteNode", "$findMatchingParent", "$createLineBreakNode", "$createParagraphNode", "$createTextNode", "$getRoot", "$getSelection", "$isParagraphNode", "$isTextNode", "findOutermostTextFormatTransformer", "textNode", "textFormatTransformersIndex", "textContent", "getTextContent", "match", "findOutermostMatch", "textFormatMatchStart", "index", "textFormatMatchEnd", "length", "transformer", "transformersByTag", "endIndex", "startIndex", "textTransformersIndex", "openTagsMatch", "openTagsRegExp", "tag", "replace", "fullMatchRegExp", "fullMatchRegExpByTag", "fullMatch", "intraword", "beforeChar", "afterChar", "PUNCTUATION_OR_SPACE", "test", "importTextFormatTransformer", "nodeAfter", "nodeBefore", "transformedNode", "splitText", "setTextContent", "format", "hasFormat", "toggleFormat", "findOutermostTextMatchTransformer", "textNode_", "textMatchTransformers", "textNode", "foundMatchStartIndex", "foundMatchEndIndex", "foundMatchTransformer", "foundMatch", "transformer", "replace", "importRegExp", "match", "getTextContent", "startIndex", "index", "endIndex", "getEndIndex", "length", "undefined", "importFoundTextMatchTransformer", "nodeAfter", "nodeBefore", "transformedNode", "splitText", "potentialTransformedNode", "importTextTransformers", "textNode", "textFormatTransformersIndex", "textMatchTransformers", "foundTextFormat", "findOutermostTextFormatTransformer", "foundTextMatch", "findOutermostTextMatchTransformer", "startIndex", "endIndex", "result", "importTextFormatTransformer", "transformer", "match", "nodeAfter", "$isTextNode", "hasFormat", "nodeBefore", "transformedNode", "importFoundTextMatchTransformer", "escapedText", "getTextContent", "replace", "setTextContent", "createMarkdownImport", "transformers", "shouldPreserveNewLines", "byType", "transformersByType", "textFormatTransformersIndex", "createTextFormatTransformersIndex", "textFormat", "markdownString", "node", "lines", "split", "linesLength", "length", "root", "$getRoot", "clear", "i", "lineText", "imported", "shiftedIndex", "$importMultiline", "multilineElement", "$importBlocks", "element", "textMatch", "children", "getChildren", "child", "isEmptyParagraph", "getChildrenSize", "remove", "$getSelection", "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", "$createTextNode", "elementNode", "$createParagraphNode", "append", "setTextContent", "importTextTransformers", "isAttached", "previousNode", "getPreviousSibling", "$isParagraphNode", "$isQuoteNode", "$isListNode", "targetNode", "lastDescendant", "getLastDescendant", "$findMatchingParent", "$isListItemNode", "getTextContentSize", "splice", "$createLineBreakNode", "textTransformers", "transformersByTag", "fullMatchRegExpByTag", "openTagsRegExp", "escapeRegExp", "tag", "tagRegExp", "RegExp", "join", "$createRangeSelection", "$getSelection", "$isLineBreakNode", "$isRangeSelection", "$isRootOrShadowRoot", "$isTextNode", "$setSelection", "runElementTransformers", "parentNode", "anchorNode", "anchorOffset", "elementTransformers", "grandParentNode", "getParent", "$isRootOrShadowRoot", "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", "PUNCTUATION_OR_SPACE", "test", "closeNode", "openNode", "openTagStartIndex", "getOpenTagStartIndex", "sibling", "getPreviousSibling", "$isLineBreakNode", "$isTextNode", "siblingTextContent", "prevOpenNodeText", "beforeOpenTagChar", "prevCloseNodeText", "closeNodeText", "setTextContent", "openNodeText", "selection", "$getSelection", "nextSelection", "$createRangeSelection", "$setSelection", "newOffset", "anchor", "set", "__key", "focus", "format", "hasFormat", "formatText", "key", "offset", "type", "toggleFormat", "$isRangeSelection", "string", "maxIndex", "i", "stringA", "aStart", "stringB", "bStart", "registerMarkdownShortcuts", "editor", "TRANSFORMERS", "byType", "transformersByType", "textFormatTransformersByTrigger", "indexBy", "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", "$createListItemNode", "$createListNode", "$isListItemNode", "$isListNode", "ListItemNode", "ListNode", "$createHeadingNode", "$createQuoteNode", "$isHeadingNode", "$isQuoteNode", "HeadingNode", "QuoteNode", "$createLineBreakNode", "EMPTY_OR_WHITESPACE_ONLY", "ORDERED_LIST_REGEX", "UNORDERED_LIST_REGEX", "CHECK_LIST_REGEX", "HEADING_REGEX", "QUOTE_REGEX", "CODE_START_REGEX", "CODE_END_REGEX", "CODE_SINGLE_LINE_REGEX", "TABLE_ROW_REG_EXP", "TABLE_ROW_DIVIDER_REG_EXP", "TAG_START_REGEX", "TAG_END_REGEX", "createBlockNode", "createNode", "parentNode", "children", "match", "node", "append", "replace", "select", "LIST_INDENT_SIZE", "getIndent", "whitespaces", "tabs", "spaces", "indent", "length", "Math", "floor", "listReplace", "listType", "previousNode", "getPreviousSibling", "nextNode", "getNextSibling", "listItem", "undefined", "getListType", "firstChild", "getFirstChild", "insertBefore", "remove", "list", "Number", "setIndent", "listExport", "listNode", "exportChildren", "depth", "output", "getChildren", "index", "listItemNode", "getChildrenSize", "push", "repeat", "prefix", "getStart", "getChecked", "join", "HEADING", "type", "dependencies", "export", "level", "getTag", "slice", "regExp", "tag", "QUOTE", "lines", "split", "line", "_match", "isImport", "splice", "UNORDERED_LIST", "CHECK_LIST", "ORDERED_LIST", "INLINE_CODE", "format", "HIGHLIGHT", "BOLD_ITALIC_STAR", "BOLD_ITALIC_UNDERSCORE", "intraword", "BOLD_STAR", "BOLD_UNDERSCORE", "STRIKETHROUGH", "ITALIC_STAR", "ITALIC_UNDERSCORE", "normalizeMarkdown", "input", "shouldMergeAdjacentLines", "inCodeBlock", "sanitizedLines", "nestedDeepCodeBlock", "i", "lastLine", "test", "trim", "ELEMENT_TRANSFORMERS", "HEADING", "QUOTE", "UNORDERED_LIST", "ORDERED_LIST", "MULTILINE_ELEMENT_TRANSFORMERS", "TEXT_FORMAT_TRANSFORMERS", "INLINE_CODE", "BOLD_ITALIC_STAR", "BOLD_ITALIC_UNDERSCORE", "BOLD_STAR", "BOLD_UNDERSCORE", "HIGHLIGHT", "ITALIC_STAR", "ITALIC_UNDERSCORE", "STRIKETHROUGH", "TEXT_MATCH_TRANSFORMERS", "TRANSFORMERS", "$convertFromMarkdownString", "markdown", "transformers", "node", "shouldPreserveNewLines", "shouldMergeAdjacentLines", "sanitizedMarkdown", "normalizeMarkdown", "createMarkdownImport", "$convertToMarkdownString", "createMarkdownExport"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/features/relationship/client/drawer/commands.ts"],
|
|
4
|
+
"sourcesContent": ["import type { LexicalCommand } from 'lexical'\n\nimport { createCommand } from 'lexical'\n\nexport const INSERT_RELATIONSHIP_WITH_DRAWER_COMMAND: LexicalCommand<{\n replace: { nodeKey: string } | false\n}> = createCommand('INSERT_RELATIONSHIP_WITH_DRAWER_COMMAND')\n"],
|
|
5
|
+
"mappings": "AAEA,OAASA,iBAAAA,MAAqB,UAEvB,IAAMC,EAERD,EAAc,yCAAA",
|
|
6
|
+
"names": ["createCommand", "INSERT_RELATIONSHIP_WITH_DRAWER_COMMAND"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{b as R}from"./chunk-KYWV53CD.js";import{c as q}from"react/compiler-runtime";import{jsx as x}from"react/jsx-runtime";import{Drawer as z,EditDepthProvider as G,useModal as J}from"@ruya.sa/ui";import"react";import{jsx as O,jsxs as M}from"react/jsx-runtime";import{useLexicalEditable as j}from"@lexical/react/useLexicalEditable";import{Form as T,FormSubmit as v,RenderFields as N,useDocumentForm as W,useDocumentInfo as $,useServerFunctions as k,useTranslation as L}from"@ruya.sa/ui";import{abortAndIgnore as _}from"@ruya.sa/ui/shared";import{deepCopyObjectSimpleWithoutReactComponents as y}from"@ruya.sa/payload/shared";import{useCallback as B,useEffect as I,useRef as H,useState as U}from"react";import{v4 as V}from"uuid";var E=({data:f,featureKey:e,fieldMapOverride:p,handleDrawerSubmit:h,schemaFieldsPathOverride:o,schemaPath:g,schemaPathSuffix:m})=>{let{t:S}=L(),{id:a,collectionSlug:n,getDocPreferences:i,globalSlug:s}=$(),{fields:l}=W(),r=j(),t=H(new AbortController),[c,w]=U(!1),{fieldProps:{featureClientSchemaMap:P}}=R(),{getFormState:C}=k(),u=o??`${g}.lexical_internal_feature.${e}${m?`.${m}`:""}`,b=p??P[e]?.[u];I(()=>{let d=new AbortController;return(async()=>{let{state:D}=await C({id:a,collectionSlug:n,data:f??{},docPermissions:{fields:!0},docPreferences:await i(),documentFormState:y(l,{excludeFiles:!0}),globalSlug:s,initialBlockData:f,operation:"update",readOnly:!r,renderAllFields:!0,schemaPath:u,signal:d.signal});w(D)})(),()=>{_(d)}},[u,a,f,C,n,r,s,i,l]);let F=B(async({formState:d})=>{_(t.current);let A=new AbortController;t.current=A;let{state:D}=await C({id:a,collectionSlug:n,docPermissions:{fields:!0},docPreferences:await i(),documentFormState:y(l,{excludeFiles:!0}),formState:d,globalSlug:s,initialBlockFormState:d,operation:"update",readOnly:!r,schemaPath:u,signal:A.signal});return D||d},[C,a,r,n,i,l,s,u]);return I(()=>()=>{_(t.current)},[]),c===!1?null:M(T,{beforeSubmit:[F],disableValidationOnSubmit:!0,fields:Array.isArray(b)?b:[],initialState:c,onChange:[F],onSubmit:h,uuid:V(),children:[O(N,{fields:Array.isArray(b)?b:[],forceRender:!0,parentIndexPath:"",parentPath:"",parentSchemaPath:u,permissions:!0,readOnly:!r}),O(v,{children:S("fields:saveChanges")})]})};var de=f=>{let e=q(15),{className:p,data:h,drawerSlug:o,drawerTitle:g,featureKey:m,fieldMapOverride:S,handleDrawerSubmit:a,schemaFieldsPathOverride:n,schemaPath:i,schemaPathSuffix:s}=f,{closeModal:l}=J(),r=g??"",t;e[0]!==l||e[1]!==o||e[2]!==a?(t=(w,P)=>{l(o),setTimeout(()=>{a(w,P)},1)},e[0]=l,e[1]=o,e[2]=a,e[3]=t):t=e[3];let c;return e[4]!==p||e[5]!==h||e[6]!==o||e[7]!==m||e[8]!==S||e[9]!==n||e[10]!==i||e[11]!==s||e[12]!==r||e[13]!==t?(c=x(G,{children:x(z,{className:p,slug:o,title:r,children:x(E,{data:h,featureKey:m,fieldMapOverride:S,handleDrawerSubmit:t,schemaFieldsPathOverride:n,schemaPath:i,schemaPathSuffix:s})})}),e[4]=p,e[5]=h,e[6]=o,e[7]=m,e[8]=S,e[9]=n,e[10]=i,e[11]=s,e[12]=r,e[13]=t,e[14]=c):c=e[14],c};import{createCommand as K}from"lexical";var he=K("INSERT_UPLOAD_WITH_DRAWER_COMMAND");export{de as a,he as b};
|
|
2
|
+
//# sourceMappingURL=chunk-DZXWP6IZ.js.map
|