@payloadcms/richtext-lexical 3.91.0-internal.c1569dc → 4.0.0-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE.md +1 -1
- package/dist/cell/rscEntry.d.ts +1 -1
- package/dist/cell/rscEntry.d.ts.map +1 -1
- package/dist/cell/rscEntry.js +5 -5
- package/dist/cell/rscEntry.js.map +1 -1
- package/dist/exports/client/Field-MT4FK3IP.js +2 -0
- package/dist/exports/client/Field-MT4FK3IP.js.map +7 -0
- package/dist/exports/client/RelationshipComponent-YCPAKOL7.js +2 -0
- package/dist/exports/client/RelationshipComponent-YCPAKOL7.js.map +7 -0
- package/dist/exports/client/chunk-3LRZDIIG.js +2 -0
- package/dist/exports/client/chunk-3LRZDIIG.js.map +7 -0
- package/dist/exports/client/chunk-5VIL27GI.js +2 -0
- package/dist/exports/client/chunk-5VIL27GI.js.map +7 -0
- package/dist/exports/client/chunk-E6LSRRP2.js +2 -0
- package/dist/exports/client/chunk-E6LSRRP2.js.map +7 -0
- package/dist/exports/client/{chunk-BZZVLW4U.js → chunk-RJ5MAOKZ.js} +1 -1
- package/dist/exports/client/chunk-RJ5MAOKZ.js.map +7 -0
- package/dist/exports/client/chunk-WSAPGI3Z.js +2 -0
- package/dist/exports/client/chunk-WSAPGI3Z.js.map +7 -0
- package/dist/exports/client/chunk-ZQX5HXUL.js +2 -0
- package/dist/exports/client/chunk-ZQX5HXUL.js.map +7 -0
- package/dist/exports/client/component-6DQLENIE.js +2 -0
- package/dist/exports/client/component-6DQLENIE.js.map +7 -0
- package/dist/exports/client/componentInline-HNE5G4TE.js +2 -0
- package/dist/exports/client/index.d.ts +1 -4
- package/dist/exports/client/index.d.ts.map +1 -1
- package/dist/exports/client/index.js +34 -35
- package/dist/exports/client/index.js.map +4 -4
- package/dist/exports/react/index.d.ts +1 -1
- package/dist/exports/react/index.d.ts.map +1 -1
- package/dist/exports/react/index.js.map +1 -1
- package/dist/features/align/client/toolbarAlignGroup.d.ts.map +1 -1
- package/dist/features/align/client/toolbarAlignGroup.js +1 -0
- package/dist/features/align/client/toolbarAlignGroup.js.map +1 -1
- package/dist/features/blockquote/client/index.js +2 -2
- package/dist/features/blockquote/client/index.js.map +1 -1
- package/dist/features/blockquote/server/index.d.ts +1 -4
- package/dist/features/blockquote/server/index.d.ts.map +1 -1
- package/dist/features/blockquote/server/index.js +4 -41
- package/dist/features/blockquote/server/index.js.map +1 -1
- package/dist/features/blockquote/server/schema.d.ts +8 -0
- package/dist/features/blockquote/server/schema.d.ts.map +1 -0
- package/dist/features/blockquote/server/schema.js +15 -0
- package/dist/features/blockquote/server/schema.js.map +1 -0
- package/dist/features/blocks/client/component/BlockContent.d.ts +10 -0
- package/dist/features/blocks/client/component/BlockContent.d.ts.map +1 -1
- package/dist/features/blocks/client/component/BlockContent.js.map +1 -1
- package/dist/features/blocks/client/component/BlockReordering/index.d.ts +11 -0
- package/dist/features/blocks/client/component/BlockReordering/index.d.ts.map +1 -0
- package/dist/features/blocks/client/component/BlockReordering/index.js +18 -0
- package/dist/features/blocks/client/component/BlockReordering/index.js.map +1 -0
- package/dist/features/blocks/client/component/index.css +178 -0
- package/dist/features/blocks/client/component/index.d.ts +4 -9
- package/dist/features/blocks/client/component/index.d.ts.map +1 -1
- package/dist/features/blocks/client/component/index.js +215 -82
- package/dist/features/blocks/client/component/index.js.map +1 -1
- package/dist/features/blocks/client/component/useBlockReordering.d.ts +16 -0
- package/dist/features/blocks/client/component/useBlockReordering.d.ts.map +1 -0
- package/dist/features/blocks/client/component/useBlockReordering.js +178 -0
- package/dist/features/blocks/client/component/useBlockReordering.js.map +1 -0
- package/dist/features/blocks/client/componentInline/index.css +84 -0
- package/dist/features/blocks/client/componentInline/index.d.ts +4 -3
- package/dist/features/blocks/client/componentInline/index.d.ts.map +1 -1
- package/dist/features/blocks/client/componentInline/index.js +65 -36
- package/dist/features/blocks/client/componentInline/index.js.map +1 -1
- package/dist/features/blocks/client/getBlockImageComponent.d.ts +1 -1
- package/dist/features/blocks/client/getCachedFormStateIfDataMatches.d.ts +9 -0
- package/dist/features/blocks/client/getCachedFormStateIfDataMatches.d.ts.map +1 -0
- package/dist/features/blocks/client/getCachedFormStateIfDataMatches.js +95 -0
- package/dist/features/blocks/client/getCachedFormStateIfDataMatches.js.map +1 -0
- package/dist/features/blocks/client/index.d.ts.map +1 -1
- package/dist/features/blocks/client/index.js +4 -4
- package/dist/features/blocks/client/index.js.map +1 -1
- package/dist/features/blocks/client/markdown/getLexicalToMarkdown.d.ts +1 -1
- package/dist/features/blocks/client/markdown/getLexicalToMarkdown.d.ts.map +1 -1
- package/dist/features/blocks/client/markdown/getLexicalToMarkdown.js +1 -1
- package/dist/features/blocks/client/markdown/getLexicalToMarkdown.js.map +1 -1
- package/dist/features/blocks/client/markdown/getMarkdownToLexical.d.ts +1 -1
- package/dist/features/blocks/client/markdown/getMarkdownToLexical.d.ts.map +1 -1
- package/dist/features/blocks/client/markdown/getMarkdownToLexical.js +5 -2
- package/dist/features/blocks/client/markdown/getMarkdownToLexical.js.map +1 -1
- package/dist/features/blocks/client/markdown/markdownTransformer.d.ts +1 -2
- package/dist/features/blocks/client/markdown/markdownTransformer.d.ts.map +1 -1
- package/dist/features/blocks/client/markdown/markdownTransformer.js +4 -4
- package/dist/features/blocks/client/markdown/markdownTransformer.js.map +1 -1
- package/dist/features/blocks/client/nodes/BlocksNode.d.ts +2 -2
- package/dist/features/blocks/client/nodes/BlocksNode.d.ts.map +1 -1
- package/dist/features/blocks/client/nodes/BlocksNode.js +0 -10
- package/dist/features/blocks/client/nodes/BlocksNode.js.map +1 -1
- package/dist/features/blocks/client/nodes/InlineBlocksNode.d.ts +2 -2
- package/dist/features/blocks/client/nodes/InlineBlocksNode.d.ts.map +1 -1
- package/dist/features/blocks/client/nodes/InlineBlocksNode.js.map +1 -1
- package/dist/features/blocks/client/plugin/index.d.ts +1 -1
- package/dist/features/blocks/client/plugin/index.d.ts.map +1 -1
- package/dist/features/blocks/client/plugin/index.js.map +1 -1
- package/dist/features/blocks/premade/CodeBlock/Component/Block.d.ts +1 -1
- package/dist/features/blocks/premade/CodeBlock/Component/Block.d.ts.map +1 -1
- package/dist/features/blocks/premade/CodeBlock/Component/Block.js +4 -0
- package/dist/features/blocks/premade/CodeBlock/Component/Block.js.map +1 -1
- package/dist/features/blocks/premade/CodeBlock/Component/Collapse/index.css +26 -0
- package/dist/features/blocks/premade/CodeBlock/Component/Collapse/index.d.ts +1 -1
- package/dist/features/blocks/premade/CodeBlock/Component/Collapse/index.d.ts.map +1 -1
- package/dist/features/blocks/premade/CodeBlock/Component/Collapse/index.js +4 -1
- package/dist/features/blocks/premade/CodeBlock/Component/Collapse/index.js.map +1 -1
- package/dist/features/blocks/premade/CodeBlock/Component/FloatingCollapse/index.css +38 -0
- package/dist/features/blocks/premade/CodeBlock/Component/FloatingCollapse/index.d.ts +1 -1
- package/dist/features/blocks/premade/CodeBlock/Component/FloatingCollapse/index.d.ts.map +1 -1
- package/dist/features/blocks/premade/CodeBlock/Component/FloatingCollapse/index.js +7 -8
- package/dist/features/blocks/premade/CodeBlock/Component/FloatingCollapse/index.js.map +1 -1
- package/dist/features/blocks/premade/CodeBlock/Component/index.css +171 -0
- package/dist/features/blocks/server/graphQLPopulationPromise.d.ts +1 -2
- package/dist/features/blocks/server/graphQLPopulationPromise.d.ts.map +1 -1
- package/dist/features/blocks/server/graphQLPopulationPromise.js.map +1 -1
- package/dist/features/blocks/server/index.d.ts +1 -0
- package/dist/features/blocks/server/index.d.ts.map +1 -1
- package/dist/features/blocks/server/index.js +26 -74
- package/dist/features/blocks/server/index.js.map +1 -1
- package/dist/features/blocks/server/markdown/markdownTransformer.d.ts +1 -1
- package/dist/features/blocks/server/markdown/markdownTransformer.d.ts.map +1 -1
- package/dist/features/blocks/server/markdown/markdownTransformer.js +4 -4
- package/dist/features/blocks/server/markdown/markdownTransformer.js.map +1 -1
- package/dist/features/blocks/server/nodes/BlocksNode.d.ts +1 -18
- package/dist/features/blocks/server/nodes/BlocksNode.d.ts.map +1 -1
- package/dist/features/blocks/server/nodes/BlocksNode.js +1 -12
- package/dist/features/blocks/server/nodes/BlocksNode.js.map +1 -1
- package/dist/features/blocks/server/nodes/InlineBlocksNode.d.ts +2 -10
- package/dist/features/blocks/server/nodes/InlineBlocksNode.d.ts.map +1 -1
- package/dist/features/blocks/server/nodes/InlineBlocksNode.js +2 -2
- package/dist/features/blocks/server/nodes/InlineBlocksNode.js.map +1 -1
- package/dist/features/blocks/server/schema.d.ts +47 -0
- package/dist/features/blocks/server/schema.d.ts.map +1 -0
- package/dist/features/blocks/server/schema.js +138 -0
- package/dist/features/blocks/server/schema.js.map +1 -0
- package/dist/features/blocks/server/validate.d.ts +1 -2
- package/dist/features/blocks/server/validate.d.ts.map +1 -1
- package/dist/features/blocks/server/validate.js +1 -1
- package/dist/features/blocks/server/validate.js.map +1 -1
- package/dist/features/converters/htmlToLexical/index.d.ts +1 -1
- package/dist/features/converters/htmlToLexical/index.d.ts.map +1 -1
- package/dist/features/converters/htmlToLexical/index.js.map +1 -1
- package/dist/features/converters/lexicalToHtml/async/converters/blockquote.d.ts +1 -1
- package/dist/features/converters/lexicalToHtml/async/converters/blockquote.d.ts.map +1 -1
- package/dist/features/converters/lexicalToHtml/async/converters/blockquote.js.map +1 -1
- package/dist/features/converters/lexicalToHtml/async/converters/heading.d.ts +1 -1
- package/dist/features/converters/lexicalToHtml/async/converters/heading.d.ts.map +1 -1
- package/dist/features/converters/lexicalToHtml/async/converters/heading.js.map +1 -1
- package/dist/features/converters/lexicalToHtml/async/converters/horizontalRule.d.ts +1 -1
- package/dist/features/converters/lexicalToHtml/async/converters/horizontalRule.d.ts.map +1 -1
- package/dist/features/converters/lexicalToHtml/async/converters/horizontalRule.js.map +1 -1
- package/dist/features/converters/lexicalToHtml/async/converters/linebreak.d.ts +1 -1
- package/dist/features/converters/lexicalToHtml/async/converters/linebreak.d.ts.map +1 -1
- package/dist/features/converters/lexicalToHtml/async/converters/linebreak.js.map +1 -1
- package/dist/features/converters/lexicalToHtml/async/converters/link.d.ts +1 -1
- package/dist/features/converters/lexicalToHtml/async/converters/link.d.ts.map +1 -1
- package/dist/features/converters/lexicalToHtml/async/converters/link.js.map +1 -1
- package/dist/features/converters/lexicalToHtml/async/converters/list.d.ts +1 -1
- package/dist/features/converters/lexicalToHtml/async/converters/list.d.ts.map +1 -1
- package/dist/features/converters/lexicalToHtml/async/converters/list.js.map +1 -1
- package/dist/features/converters/lexicalToHtml/async/converters/paragraph.d.ts +1 -1
- package/dist/features/converters/lexicalToHtml/async/converters/paragraph.d.ts.map +1 -1
- package/dist/features/converters/lexicalToHtml/async/converters/paragraph.js.map +1 -1
- package/dist/features/converters/lexicalToHtml/async/converters/tab.d.ts +1 -1
- package/dist/features/converters/lexicalToHtml/async/converters/tab.d.ts.map +1 -1
- package/dist/features/converters/lexicalToHtml/async/converters/tab.js.map +1 -1
- package/dist/features/converters/lexicalToHtml/async/converters/table.d.ts +1 -1
- package/dist/features/converters/lexicalToHtml/async/converters/table.d.ts.map +1 -1
- package/dist/features/converters/lexicalToHtml/async/converters/table.js +1 -1
- package/dist/features/converters/lexicalToHtml/async/converters/table.js.map +1 -1
- package/dist/features/converters/lexicalToHtml/async/converters/text.d.ts +1 -1
- package/dist/features/converters/lexicalToHtml/async/converters/text.d.ts.map +1 -1
- package/dist/features/converters/lexicalToHtml/async/converters/text.js.map +1 -1
- package/dist/features/converters/lexicalToHtml/async/converters/upload.d.ts +1 -1
- package/dist/features/converters/lexicalToHtml/async/converters/upload.d.ts.map +1 -1
- package/dist/features/converters/lexicalToHtml/async/converters/upload.js +3 -3
- package/dist/features/converters/lexicalToHtml/async/converters/upload.js.map +1 -1
- package/dist/features/converters/lexicalToHtml/async/defaultConverters.d.ts +1 -1
- package/dist/features/converters/lexicalToHtml/async/defaultConverters.d.ts.map +1 -1
- package/dist/features/converters/lexicalToHtml/async/defaultConverters.js.map +1 -1
- package/dist/features/converters/lexicalToHtml/async/types.d.ts +15 -16
- package/dist/features/converters/lexicalToHtml/async/types.d.ts.map +1 -1
- package/dist/features/converters/lexicalToHtml/async/types.js.map +1 -1
- package/dist/features/converters/lexicalToHtml/shared/findConverterForNode.d.ts.map +1 -1
- package/dist/features/converters/lexicalToHtml/shared/findConverterForNode.js +3 -2
- package/dist/features/converters/lexicalToHtml/shared/findConverterForNode.js.map +1 -1
- package/dist/features/converters/lexicalToHtml/sync/converters/blockquote.d.ts +1 -1
- package/dist/features/converters/lexicalToHtml/sync/converters/blockquote.d.ts.map +1 -1
- package/dist/features/converters/lexicalToHtml/sync/converters/blockquote.js.map +1 -1
- package/dist/features/converters/lexicalToHtml/sync/converters/heading.d.ts +1 -1
- package/dist/features/converters/lexicalToHtml/sync/converters/heading.d.ts.map +1 -1
- package/dist/features/converters/lexicalToHtml/sync/converters/heading.js.map +1 -1
- package/dist/features/converters/lexicalToHtml/sync/converters/horizontalRule.d.ts +1 -1
- package/dist/features/converters/lexicalToHtml/sync/converters/horizontalRule.d.ts.map +1 -1
- package/dist/features/converters/lexicalToHtml/sync/converters/horizontalRule.js.map +1 -1
- package/dist/features/converters/lexicalToHtml/sync/converters/linebreak.d.ts +1 -1
- package/dist/features/converters/lexicalToHtml/sync/converters/linebreak.d.ts.map +1 -1
- package/dist/features/converters/lexicalToHtml/sync/converters/linebreak.js.map +1 -1
- package/dist/features/converters/lexicalToHtml/sync/converters/link.d.ts +1 -1
- package/dist/features/converters/lexicalToHtml/sync/converters/link.d.ts.map +1 -1
- package/dist/features/converters/lexicalToHtml/sync/converters/link.js.map +1 -1
- package/dist/features/converters/lexicalToHtml/sync/converters/list.d.ts +1 -1
- package/dist/features/converters/lexicalToHtml/sync/converters/list.d.ts.map +1 -1
- package/dist/features/converters/lexicalToHtml/sync/converters/list.js.map +1 -1
- package/dist/features/converters/lexicalToHtml/sync/converters/paragraph.d.ts +1 -1
- package/dist/features/converters/lexicalToHtml/sync/converters/paragraph.d.ts.map +1 -1
- package/dist/features/converters/lexicalToHtml/sync/converters/paragraph.js.map +1 -1
- package/dist/features/converters/lexicalToHtml/sync/converters/tab.d.ts +1 -1
- package/dist/features/converters/lexicalToHtml/sync/converters/tab.d.ts.map +1 -1
- package/dist/features/converters/lexicalToHtml/sync/converters/tab.js.map +1 -1
- package/dist/features/converters/lexicalToHtml/sync/converters/table.d.ts +1 -1
- package/dist/features/converters/lexicalToHtml/sync/converters/table.d.ts.map +1 -1
- package/dist/features/converters/lexicalToHtml/sync/converters/table.js +1 -1
- package/dist/features/converters/lexicalToHtml/sync/converters/table.js.map +1 -1
- package/dist/features/converters/lexicalToHtml/sync/converters/text.d.ts +1 -1
- package/dist/features/converters/lexicalToHtml/sync/converters/text.d.ts.map +1 -1
- package/dist/features/converters/lexicalToHtml/sync/converters/text.js.map +1 -1
- package/dist/features/converters/lexicalToHtml/sync/converters/upload.d.ts +1 -1
- package/dist/features/converters/lexicalToHtml/sync/converters/upload.d.ts.map +1 -1
- package/dist/features/converters/lexicalToHtml/sync/converters/upload.js +3 -3
- package/dist/features/converters/lexicalToHtml/sync/converters/upload.js.map +1 -1
- package/dist/features/converters/lexicalToHtml/sync/defaultConverters.d.ts +1 -1
- package/dist/features/converters/lexicalToHtml/sync/defaultConverters.d.ts.map +1 -1
- package/dist/features/converters/lexicalToHtml/sync/defaultConverters.js.map +1 -1
- package/dist/features/converters/lexicalToHtml/sync/types.d.ts +15 -16
- package/dist/features/converters/lexicalToHtml/sync/types.d.ts.map +1 -1
- package/dist/features/converters/lexicalToHtml/sync/types.js.map +1 -1
- package/dist/features/converters/lexicalToJSX/Component/index.d.ts +6 -4
- package/dist/features/converters/lexicalToJSX/Component/index.d.ts.map +1 -1
- package/dist/features/converters/lexicalToJSX/Component/index.js +5 -4
- package/dist/features/converters/lexicalToJSX/Component/index.js.map +1 -1
- package/dist/features/converters/lexicalToJSX/converter/converters/blockquote.d.ts +1 -1
- package/dist/features/converters/lexicalToJSX/converter/converters/blockquote.d.ts.map +1 -1
- package/dist/features/converters/lexicalToJSX/converter/converters/blockquote.js.map +1 -1
- package/dist/features/converters/lexicalToJSX/converter/converters/heading.d.ts +1 -1
- package/dist/features/converters/lexicalToJSX/converter/converters/heading.d.ts.map +1 -1
- package/dist/features/converters/lexicalToJSX/converter/converters/heading.js.map +1 -1
- package/dist/features/converters/lexicalToJSX/converter/converters/horizontalRule.d.ts +1 -1
- package/dist/features/converters/lexicalToJSX/converter/converters/horizontalRule.d.ts.map +1 -1
- package/dist/features/converters/lexicalToJSX/converter/converters/horizontalRule.js.map +1 -1
- package/dist/features/converters/lexicalToJSX/converter/converters/linebreak.d.ts +1 -1
- package/dist/features/converters/lexicalToJSX/converter/converters/linebreak.d.ts.map +1 -1
- package/dist/features/converters/lexicalToJSX/converter/converters/linebreak.js.map +1 -1
- package/dist/features/converters/lexicalToJSX/converter/converters/link.d.ts +1 -1
- package/dist/features/converters/lexicalToJSX/converter/converters/link.d.ts.map +1 -1
- package/dist/features/converters/lexicalToJSX/converter/converters/link.js.map +1 -1
- package/dist/features/converters/lexicalToJSX/converter/converters/list.d.ts +1 -1
- package/dist/features/converters/lexicalToJSX/converter/converters/list.d.ts.map +1 -1
- package/dist/features/converters/lexicalToJSX/converter/converters/list.js.map +1 -1
- package/dist/features/converters/lexicalToJSX/converter/converters/paragraph.d.ts +1 -1
- package/dist/features/converters/lexicalToJSX/converter/converters/paragraph.d.ts.map +1 -1
- package/dist/features/converters/lexicalToJSX/converter/converters/paragraph.js.map +1 -1
- package/dist/features/converters/lexicalToJSX/converter/converters/tab.d.ts +1 -1
- package/dist/features/converters/lexicalToJSX/converter/converters/tab.d.ts.map +1 -1
- package/dist/features/converters/lexicalToJSX/converter/converters/tab.js.map +1 -1
- package/dist/features/converters/lexicalToJSX/converter/converters/table.d.ts +1 -1
- package/dist/features/converters/lexicalToJSX/converter/converters/table.d.ts.map +1 -1
- package/dist/features/converters/lexicalToJSX/converter/converters/table.js.map +1 -1
- package/dist/features/converters/lexicalToJSX/converter/converters/text.d.ts +1 -1
- package/dist/features/converters/lexicalToJSX/converter/converters/text.d.ts.map +1 -1
- package/dist/features/converters/lexicalToJSX/converter/converters/text.js.map +1 -1
- package/dist/features/converters/lexicalToJSX/converter/converters/upload.d.ts +1 -1
- package/dist/features/converters/lexicalToJSX/converter/converters/upload.d.ts.map +1 -1
- package/dist/features/converters/lexicalToJSX/converter/converters/upload.js +4 -5
- package/dist/features/converters/lexicalToJSX/converter/converters/upload.js.map +1 -1
- package/dist/features/converters/lexicalToJSX/converter/defaultConverters.d.ts +1 -1
- package/dist/features/converters/lexicalToJSX/converter/defaultConverters.d.ts.map +1 -1
- package/dist/features/converters/lexicalToJSX/converter/defaultConverters.js.map +1 -1
- package/dist/features/converters/lexicalToJSX/converter/index.d.ts +1 -1
- package/dist/features/converters/lexicalToJSX/converter/index.d.ts.map +1 -1
- package/dist/features/converters/lexicalToJSX/converter/index.js.map +1 -1
- package/dist/features/converters/lexicalToJSX/converter/types.d.ts +13 -15
- package/dist/features/converters/lexicalToJSX/converter/types.d.ts.map +1 -1
- package/dist/features/converters/lexicalToJSX/converter/types.js.map +1 -1
- package/dist/features/converters/lexicalToMarkdown/index.d.ts.map +1 -1
- package/dist/features/converters/lexicalToMarkdown/index.js +1 -1
- package/dist/features/converters/lexicalToMarkdown/index.js.map +1 -1
- package/dist/features/converters/lexicalToPlaintext/shared/findConverterForNode.js.map +1 -1
- package/dist/features/converters/lexicalToPlaintext/sync/types.d.ts +13 -15
- package/dist/features/converters/lexicalToPlaintext/sync/types.d.ts.map +1 -1
- package/dist/features/converters/lexicalToPlaintext/sync/types.js.map +1 -1
- package/dist/features/converters/markdownToLexical/index.d.ts +1 -1
- package/dist/features/converters/markdownToLexical/index.d.ts.map +1 -1
- package/dist/features/converters/markdownToLexical/index.js +5 -2
- package/dist/features/converters/markdownToLexical/index.js.map +1 -1
- package/dist/features/converters/utilities/payloadPopulateFn.d.ts.map +1 -1
- package/dist/features/converters/utilities/payloadPopulateFn.js +4 -2
- package/dist/features/converters/utilities/payloadPopulateFn.js.map +1 -1
- package/dist/features/debug/jsxConverter/client/plugin/index.d.ts +1 -1
- package/dist/features/debug/jsxConverter/client/plugin/index.d.ts.map +1 -1
- package/dist/features/debug/jsxConverter/client/plugin/index.js +1 -0
- package/dist/features/debug/jsxConverter/client/plugin/index.js.map +1 -1
- package/dist/features/debug/jsxConverter/client/plugin/style.css +9 -0
- package/dist/features/debug/testRecorder/client/plugin/index.css +50 -0
- package/dist/features/debug/testRecorder/client/plugin/index.d.ts +1 -1
- package/dist/features/debug/testRecorder/client/plugin/index.d.ts.map +1 -1
- package/dist/features/debug/testRecorder/client/plugin/index.js +1 -0
- package/dist/features/debug/testRecorder/client/plugin/index.js.map +1 -1
- package/dist/features/debug/treeView/client/plugin/index.css +81 -0
- package/dist/features/debug/treeView/client/plugin/index.d.ts +1 -1
- package/dist/features/debug/treeView/client/plugin/index.d.ts.map +1 -1
- package/dist/features/debug/treeView/client/plugin/index.js +1 -0
- package/dist/features/debug/treeView/client/plugin/index.js.map +1 -1
- package/dist/features/format/bold/feature.client.js +1 -1
- package/dist/features/format/bold/feature.client.js.map +1 -1
- package/dist/features/format/bold/feature.server.d.ts.map +1 -1
- package/dist/features/format/bold/feature.server.js +1 -1
- package/dist/features/format/bold/feature.server.js.map +1 -1
- package/dist/features/format/inlineCode/feature.client.js +1 -1
- package/dist/features/format/inlineCode/feature.client.js.map +1 -1
- package/dist/features/format/inlineCode/feature.server.d.ts.map +1 -1
- package/dist/features/format/inlineCode/feature.server.js +1 -1
- package/dist/features/format/inlineCode/feature.server.js.map +1 -1
- package/dist/features/format/italic/feature.client.js +1 -1
- package/dist/features/format/italic/feature.client.js.map +1 -1
- package/dist/features/format/italic/feature.server.d.ts.map +1 -1
- package/dist/features/format/italic/feature.server.js +1 -1
- package/dist/features/format/italic/feature.server.js.map +1 -1
- package/dist/features/format/strikethrough/feature.client.js +1 -1
- package/dist/features/format/strikethrough/feature.client.js.map +1 -1
- package/dist/features/format/strikethrough/feature.server.d.ts.map +1 -1
- package/dist/features/format/strikethrough/feature.server.js +1 -1
- package/dist/features/format/strikethrough/feature.server.js.map +1 -1
- package/dist/features/heading/client/index.js +2 -2
- package/dist/features/heading/client/index.js.map +1 -1
- package/dist/features/heading/markdownTransformer.d.ts +2 -2
- package/dist/features/heading/markdownTransformer.d.ts.map +1 -1
- package/dist/features/heading/markdownTransformer.js +6 -19
- package/dist/features/heading/markdownTransformer.js.map +1 -1
- package/dist/features/heading/server/index.d.ts +2 -4
- package/dist/features/heading/server/index.d.ts.map +1 -1
- package/dist/features/heading/server/index.js +4 -43
- package/dist/features/heading/server/index.js.map +1 -1
- package/dist/features/heading/server/schema.d.ts +10 -0
- package/dist/features/heading/server/schema.d.ts.map +1 -0
- package/dist/features/heading/server/schema.js +37 -0
- package/dist/features/heading/server/schema.js.map +1 -0
- package/dist/features/horizontalRule/client/index.js +2 -2
- package/dist/features/horizontalRule/client/index.js.map +1 -1
- package/dist/features/horizontalRule/client/markdownTransformer.d.ts +2 -2
- package/dist/features/horizontalRule/client/markdownTransformer.d.ts.map +1 -1
- package/dist/features/horizontalRule/client/markdownTransformer.js +1 -1
- package/dist/features/horizontalRule/client/markdownTransformer.js.map +1 -1
- package/dist/features/horizontalRule/client/nodes/HorizontalRuleNode.d.ts +13 -3
- package/dist/features/horizontalRule/client/nodes/HorizontalRuleNode.d.ts.map +1 -1
- package/dist/features/horizontalRule/client/nodes/HorizontalRuleNode.js +18 -1
- package/dist/features/horizontalRule/client/nodes/HorizontalRuleNode.js.map +1 -1
- package/dist/features/horizontalRule/client/plugin/index.css +25 -0
- package/dist/features/horizontalRule/client/plugin/index.d.ts +1 -1
- package/dist/features/horizontalRule/client/plugin/index.d.ts.map +1 -1
- package/dist/features/horizontalRule/client/plugin/index.js +73 -4
- package/dist/features/horizontalRule/client/plugin/index.js.map +1 -1
- package/dist/features/horizontalRule/server/index.d.ts +1 -0
- package/dist/features/horizontalRule/server/index.d.ts.map +1 -1
- package/dist/features/horizontalRule/server/index.js +4 -10
- package/dist/features/horizontalRule/server/index.js.map +1 -1
- package/dist/features/horizontalRule/server/markdownTransformer.d.ts +2 -2
- package/dist/features/horizontalRule/server/markdownTransformer.d.ts.map +1 -1
- package/dist/features/horizontalRule/server/markdownTransformer.js +1 -1
- package/dist/features/horizontalRule/server/markdownTransformer.js.map +1 -1
- package/dist/features/horizontalRule/server/nodes/HorizontalRuleNode.d.ts +2 -6
- package/dist/features/horizontalRule/server/nodes/HorizontalRuleNode.d.ts.map +1 -1
- package/dist/features/horizontalRule/server/nodes/HorizontalRuleNode.js +3 -3
- package/dist/features/horizontalRule/server/nodes/HorizontalRuleNode.js.map +1 -1
- package/dist/features/horizontalRule/server/schema.d.ts +8 -0
- package/dist/features/horizontalRule/server/schema.d.ts.map +1 -0
- package/dist/features/horizontalRule/server/schema.js +26 -0
- package/dist/features/horizontalRule/server/schema.js.map +1 -0
- package/dist/features/indent/client/IndentPlugin.d.ts.map +1 -1
- package/dist/features/indent/client/IndentPlugin.js +122 -1
- package/dist/features/indent/client/IndentPlugin.js.map +1 -1
- package/dist/features/indent/server/i18n.d.ts.map +1 -1
- package/dist/features/indent/server/i18n.js +74 -37
- package/dist/features/indent/server/i18n.js.map +1 -1
- package/dist/features/link/client/index.d.ts.map +1 -1
- package/dist/features/link/client/index.js +2 -2
- package/dist/features/link/client/index.js.map +1 -1
- package/dist/features/link/client/plugins/autoLink/index.d.ts +1 -1
- package/dist/features/link/client/plugins/autoLink/index.d.ts.map +1 -1
- package/dist/features/link/client/plugins/autoLink/index.js.map +1 -1
- package/dist/features/link/client/plugins/floatingLinkEditor/LinkEditor/index.d.ts.map +1 -1
- package/dist/features/link/client/plugins/floatingLinkEditor/LinkEditor/index.js +43 -31
- package/dist/features/link/client/plugins/floatingLinkEditor/LinkEditor/index.js.map +1 -1
- package/dist/features/link/client/plugins/floatingLinkEditor/index.css +106 -0
- package/dist/features/link/client/plugins/floatingLinkEditor/index.d.ts +1 -1
- package/dist/features/link/client/plugins/floatingLinkEditor/index.d.ts.map +1 -1
- package/dist/features/link/client/plugins/floatingLinkEditor/index.js +1 -0
- package/dist/features/link/client/plugins/floatingLinkEditor/index.js.map +1 -1
- package/dist/features/link/client/plugins/floatingLinkEditor/types.d.ts +1 -1
- package/dist/features/link/client/plugins/floatingLinkEditor/types.d.ts.map +1 -1
- package/dist/features/link/client/plugins/floatingLinkEditor/types.js.map +1 -1
- package/dist/features/link/client/plugins/link/index.js.map +1 -1
- package/dist/features/link/markdownTransformer.d.ts +5 -5
- package/dist/features/link/markdownTransformer.d.ts.map +1 -1
- package/dist/features/link/markdownTransformer.js +2 -2
- package/dist/features/link/markdownTransformer.js.map +1 -1
- package/dist/features/link/nodes/AutoLinkNode.d.ts +4 -4
- package/dist/features/link/nodes/AutoLinkNode.d.ts.map +1 -1
- package/dist/features/link/nodes/AutoLinkNode.js +4 -11
- package/dist/features/link/nodes/AutoLinkNode.js.map +1 -1
- package/dist/features/link/nodes/LinkNode.d.ts +4 -4
- package/dist/features/link/nodes/LinkNode.d.ts.map +1 -1
- package/dist/features/link/nodes/LinkNode.js +4 -16
- package/dist/features/link/nodes/LinkNode.js.map +1 -1
- package/dist/features/link/server/baseFields.js.map +1 -1
- package/dist/features/link/server/graphQLPopulationPromise.d.ts +1 -1
- package/dist/features/link/server/graphQLPopulationPromise.d.ts.map +1 -1
- package/dist/features/link/server/graphQLPopulationPromise.js.map +1 -1
- package/dist/features/link/server/index.d.ts +2 -1
- package/dist/features/link/server/index.d.ts.map +1 -1
- package/dist/features/link/server/index.js +7 -75
- package/dist/features/link/server/index.js.map +1 -1
- package/dist/features/link/server/schema.d.ts +32 -0
- package/dist/features/link/server/schema.d.ts.map +1 -0
- package/dist/features/link/server/schema.js +171 -0
- package/dist/features/link/server/schema.js.map +1 -0
- package/dist/features/link/server/validate.d.ts +1 -1
- package/dist/features/link/server/validate.d.ts.map +1 -1
- package/dist/features/link/server/validate.js +1 -1
- package/dist/features/link/server/validate.js.map +1 -1
- package/dist/features/lists/checklist/client/index.js +1 -1
- package/dist/features/lists/checklist/client/index.js.map +1 -1
- package/dist/features/lists/checklist/server/index.d.ts.map +1 -1
- package/dist/features/lists/checklist/server/index.js +4 -8
- package/dist/features/lists/checklist/server/index.js.map +1 -1
- package/dist/features/lists/orderedList/client/index.js +1 -1
- package/dist/features/lists/orderedList/client/index.js.map +1 -1
- package/dist/features/lists/orderedList/server/index.d.ts.map +1 -1
- package/dist/features/lists/orderedList/server/index.js +4 -8
- package/dist/features/lists/orderedList/server/index.js.map +1 -1
- package/dist/features/lists/plugin/index.d.ts +0 -9
- package/dist/features/lists/plugin/index.d.ts.map +1 -1
- package/dist/features/lists/plugin/index.js.map +1 -1
- package/dist/features/lists/shared/schema.d.ts +18 -0
- package/dist/features/lists/shared/schema.d.ts.map +1 -0
- package/dist/features/lists/shared/schema.js +62 -0
- package/dist/features/lists/shared/schema.js.map +1 -0
- package/dist/features/lists/unorderedList/client/index.js +1 -1
- package/dist/features/lists/unorderedList/client/index.js.map +1 -1
- package/dist/features/lists/unorderedList/server/index.d.ts.map +1 -1
- package/dist/features/lists/unorderedList/server/index.js +4 -8
- package/dist/features/lists/unorderedList/server/index.js.map +1 -1
- package/dist/features/relationship/client/components/RelationshipComponent.d.ts +2 -2
- package/dist/features/relationship/client/components/RelationshipComponent.d.ts.map +1 -1
- package/dist/features/relationship/client/components/RelationshipComponent.js +29 -4
- package/dist/features/relationship/client/components/RelationshipComponent.js.map +1 -1
- package/dist/features/relationship/client/components/index.css +109 -0
- package/dist/features/relationship/client/nodes/RelationshipNode.d.ts +1 -1
- package/dist/features/relationship/client/nodes/RelationshipNode.d.ts.map +1 -1
- package/dist/features/relationship/client/nodes/RelationshipNode.js +0 -3
- package/dist/features/relationship/client/nodes/RelationshipNode.js.map +1 -1
- package/dist/features/relationship/client/plugins/index.d.ts +1 -1
- package/dist/features/relationship/client/plugins/index.d.ts.map +1 -1
- package/dist/features/relationship/client/plugins/index.js.map +1 -1
- package/dist/features/relationship/client/utils/useEnabledRelationships.d.ts.map +1 -1
- package/dist/features/relationship/client/utils/useEnabledRelationships.js +5 -5
- package/dist/features/relationship/client/utils/useEnabledRelationships.js.map +1 -1
- package/dist/features/relationship/server/graphQLPopulationPromise.d.ts +1 -1
- package/dist/features/relationship/server/graphQLPopulationPromise.d.ts.map +1 -1
- package/dist/features/relationship/server/graphQLPopulationPromise.js.map +1 -1
- package/dist/features/relationship/server/index.d.ts +1 -0
- package/dist/features/relationship/server/index.d.ts.map +1 -1
- package/dist/features/relationship/server/index.js +2 -0
- package/dist/features/relationship/server/index.js.map +1 -1
- package/dist/features/relationship/server/nodes/RelationshipNode.d.ts +1 -10
- package/dist/features/relationship/server/nodes/RelationshipNode.d.ts.map +1 -1
- package/dist/features/relationship/server/nodes/RelationshipNode.js +1 -5
- package/dist/features/relationship/server/nodes/RelationshipNode.js.map +1 -1
- package/dist/features/relationship/server/schema.d.ts +29 -0
- package/dist/features/relationship/server/schema.d.ts.map +1 -0
- package/dist/features/relationship/server/schema.js +94 -0
- package/dist/features/relationship/server/schema.js.map +1 -0
- package/dist/features/relationship/shared/filterEnabledRelationshipCollections.d.ts +16 -5
- package/dist/features/relationship/shared/filterEnabledRelationshipCollections.d.ts.map +1 -1
- package/dist/features/relationship/shared/filterEnabledRelationshipCollections.js +15 -8
- package/dist/features/relationship/shared/filterEnabledRelationshipCollections.js.map +1 -1
- package/dist/features/table/client/index.d.ts.map +1 -0
- package/dist/features/{experimental_table → table}/client/index.js +2 -2
- package/dist/features/table/client/index.js.map +1 -0
- package/dist/features/table/client/plugins/TableActionMenuPlugin/computeSelectionCount.d.ts.map +1 -0
- package/dist/features/table/client/plugins/TableActionMenuPlugin/computeSelectionCount.js.map +1 -0
- package/dist/features/table/client/plugins/TableActionMenuPlugin/index.css +90 -0
- package/dist/features/{experimental_table → table}/client/plugins/TableActionMenuPlugin/index.d.ts +1 -1
- package/dist/features/table/client/plugins/TableActionMenuPlugin/index.d.ts.map +1 -0
- package/dist/features/{experimental_table → table}/client/plugins/TableActionMenuPlugin/index.js +4 -3
- package/dist/features/table/client/plugins/TableActionMenuPlugin/index.js.map +1 -0
- package/dist/features/table/client/plugins/TableCellResizerPlugin/index.css +11 -0
- package/dist/features/{experimental_table → table}/client/plugins/TableCellResizerPlugin/index.d.ts +1 -1
- package/dist/features/table/client/plugins/TableCellResizerPlugin/index.d.ts.map +1 -0
- package/dist/features/{experimental_table → table}/client/plugins/TableCellResizerPlugin/index.js +42 -18
- package/dist/features/table/client/plugins/TableCellResizerPlugin/index.js.map +1 -0
- package/dist/features/table/client/plugins/TableHoverActionsPlugin/index.d.ts.map +1 -0
- package/dist/features/{experimental_table → table}/client/plugins/TableHoverActionsPlugin/index.js +1 -1
- package/dist/features/table/client/plugins/TableHoverActionsPlugin/index.js.map +1 -0
- package/dist/features/table/client/plugins/TablePlugin/TableGridPopup/index.css +163 -0
- package/dist/features/table/client/plugins/TablePlugin/TableGridPopup/index.d.ts +17 -0
- package/dist/features/table/client/plugins/TablePlugin/TableGridPopup/index.d.ts.map +1 -0
- package/dist/features/table/client/plugins/TablePlugin/TableGridPopup/index.js +219 -0
- package/dist/features/table/client/plugins/TablePlugin/TableGridPopup/index.js.map +1 -0
- package/dist/features/table/client/plugins/TablePlugin/index.css +235 -0
- package/dist/features/{experimental_table → table}/client/plugins/TablePlugin/index.d.ts +1 -1
- package/dist/features/table/client/plugins/TablePlugin/index.d.ts.map +1 -0
- package/dist/features/table/client/plugins/TablePlugin/index.js +143 -0
- package/dist/features/table/client/plugins/TablePlugin/index.js.map +1 -0
- package/dist/features/table/client/utils/debounce.d.ts.map +1 -0
- package/dist/features/table/client/utils/debounce.js.map +1 -0
- package/dist/features/table/client/utils/useDebounce.d.ts.map +1 -0
- package/dist/features/table/client/utils/useDebounce.js.map +1 -0
- package/dist/features/table/markdownTransformer.d.ts +5 -0
- package/dist/features/table/markdownTransformer.d.ts.map +1 -0
- package/dist/features/{experimental_table → table}/markdownTransformer.js +6 -3
- package/dist/features/table/markdownTransformer.js.map +1 -0
- package/dist/features/table/server/index.d.ts +3 -0
- package/dist/features/table/server/index.d.ts.map +1 -0
- package/dist/features/table/server/index.js +56 -0
- package/dist/features/table/server/index.js.map +1 -0
- package/dist/features/table/server/schema.d.ts +27 -0
- package/dist/features/table/server/schema.d.ts.map +1 -0
- package/dist/features/table/server/schema.js +107 -0
- package/dist/features/table/server/schema.js.map +1 -0
- package/dist/features/textState/feature.client.js +1 -1
- package/dist/features/textState/feature.client.js.map +1 -1
- package/dist/features/toolbars/fixed/client/Toolbar/horizontalWheelScroll.d.ts +8 -0
- package/dist/features/toolbars/fixed/client/Toolbar/horizontalWheelScroll.d.ts.map +1 -0
- package/dist/features/toolbars/fixed/client/Toolbar/horizontalWheelScroll.js +80 -0
- package/dist/features/toolbars/fixed/client/Toolbar/horizontalWheelScroll.js.map +1 -0
- package/dist/features/toolbars/fixed/client/Toolbar/index.css +159 -0
- package/dist/features/toolbars/fixed/client/Toolbar/index.d.ts +1 -1
- package/dist/features/toolbars/fixed/client/Toolbar/index.d.ts.map +1 -1
- package/dist/features/toolbars/fixed/client/Toolbar/index.js +20 -1
- package/dist/features/toolbars/fixed/client/Toolbar/index.js.map +1 -1
- package/dist/features/toolbars/inline/client/Toolbar/index.css +31 -0
- package/dist/features/toolbars/inline/client/Toolbar/index.d.ts +1 -1
- package/dist/features/toolbars/inline/client/Toolbar/index.d.ts.map +1 -1
- package/dist/features/toolbars/inline/client/Toolbar/index.js +18 -2
- package/dist/features/toolbars/inline/client/Toolbar/index.js.map +1 -1
- package/dist/features/toolbars/shared/ToolbarButton/index.css +57 -0
- package/dist/features/toolbars/shared/ToolbarButton/index.d.ts +1 -1
- package/dist/features/toolbars/shared/ToolbarButton/index.d.ts.map +1 -1
- package/dist/features/toolbars/shared/ToolbarButton/index.js +81 -74
- package/dist/features/toolbars/shared/ToolbarButton/index.js.map +1 -1
- package/dist/features/toolbars/shared/ToolbarDropdown/DropDown.d.ts.map +1 -1
- package/dist/features/toolbars/shared/ToolbarDropdown/DropDown.js +89 -33
- package/dist/features/toolbars/shared/ToolbarDropdown/DropDown.js.map +1 -1
- package/dist/features/toolbars/shared/ToolbarDropdown/index.css +212 -0
- package/dist/features/toolbars/shared/ToolbarDropdown/index.d.ts +1 -1
- package/dist/features/toolbars/shared/ToolbarDropdown/index.d.ts.map +1 -1
- package/dist/features/toolbars/shared/ToolbarDropdown/index.js +11 -7
- package/dist/features/toolbars/shared/ToolbarDropdown/index.js.map +1 -1
- package/dist/features/toolbars/shared/useToolbarKeyboardNavigation.d.ts +5 -0
- package/dist/features/toolbars/shared/useToolbarKeyboardNavigation.d.ts.map +1 -0
- package/dist/features/toolbars/shared/useToolbarKeyboardNavigation.js +79 -0
- package/dist/features/toolbars/shared/useToolbarKeyboardNavigation.js.map +1 -0
- package/dist/features/toolbars/types.d.ts +5 -1
- package/dist/features/toolbars/types.d.ts.map +1 -1
- package/dist/features/toolbars/types.js.map +1 -1
- package/dist/features/typesClient.d.ts +2 -2
- package/dist/features/typesClient.d.ts.map +1 -1
- package/dist/features/typesClient.js.map +1 -1
- package/dist/features/typesServer.d.ts +35 -70
- package/dist/features/typesServer.d.ts.map +1 -1
- package/dist/features/typesServer.js.map +1 -1
- package/dist/features/upload/client/component/index.css +212 -0
- package/dist/features/upload/client/component/index.d.ts +2 -2
- package/dist/features/upload/client/component/index.d.ts.map +1 -1
- package/dist/features/upload/client/component/index.js +86 -63
- package/dist/features/upload/client/component/index.js.map +1 -1
- package/dist/features/upload/client/component/pending/index.d.ts +0 -1
- package/dist/features/upload/client/component/pending/index.d.ts.map +1 -1
- package/dist/features/upload/client/component/pending/index.js.map +1 -1
- package/dist/features/upload/client/nodes/UploadNode.d.ts +1 -1
- package/dist/features/upload/client/nodes/UploadNode.d.ts.map +1 -1
- package/dist/features/upload/client/nodes/UploadNode.js +0 -7
- package/dist/features/upload/client/nodes/UploadNode.js.map +1 -1
- package/dist/features/upload/client/plugin/index.d.ts +1 -1
- package/dist/features/upload/client/plugin/index.d.ts.map +1 -1
- package/dist/features/upload/client/plugin/index.js +8 -6
- package/dist/features/upload/client/plugin/index.js.map +1 -1
- package/dist/features/upload/server/graphQLPopulationPromise.d.ts +1 -1
- package/dist/features/upload/server/graphQLPopulationPromise.d.ts.map +1 -1
- package/dist/features/upload/server/graphQLPopulationPromise.js.map +1 -1
- package/dist/features/upload/server/index.d.ts +1 -0
- package/dist/features/upload/server/index.d.ts.map +1 -1
- package/dist/features/upload/server/index.js +7 -87
- package/dist/features/upload/server/index.js.map +1 -1
- package/dist/features/upload/server/markdownTransformer.d.ts +2 -2
- package/dist/features/upload/server/markdownTransformer.d.ts.map +1 -1
- package/dist/features/upload/server/markdownTransformer.js +1 -1
- package/dist/features/upload/server/markdownTransformer.js.map +1 -1
- package/dist/features/upload/server/nodes/UploadNode.d.ts +1 -55
- package/dist/features/upload/server/nodes/UploadNode.d.ts.map +1 -1
- package/dist/features/upload/server/nodes/UploadNode.js +1 -9
- package/dist/features/upload/server/nodes/UploadNode.js.map +1 -1
- package/dist/features/upload/server/nodes/conversions.d.ts.map +1 -1
- package/dist/features/upload/server/nodes/conversions.js.map +1 -1
- package/dist/features/upload/server/schema.d.ts +40 -0
- package/dist/features/upload/server/schema.d.ts.map +1 -0
- package/dist/features/upload/server/schema.js +147 -0
- package/dist/features/upload/server/schema.js.map +1 -0
- package/dist/features/upload/server/validate.d.ts +1 -1
- package/dist/features/upload/server/validate.d.ts.map +1 -1
- package/dist/features/upload/server/validate.js +1 -1
- package/dist/features/upload/server/validate.js.map +1 -1
- package/dist/field/Diff/converters/link.d.ts +1 -1
- package/dist/field/Diff/converters/link.d.ts.map +1 -1
- package/dist/field/Diff/converters/link.js.map +1 -1
- package/dist/field/Diff/converters/listitem/index.css +80 -0
- package/dist/field/Diff/converters/listitem/index.d.ts +2 -2
- package/dist/field/Diff/converters/listitem/index.d.ts.map +1 -1
- package/dist/field/Diff/converters/listitem/index.js +1 -0
- package/dist/field/Diff/converters/listitem/index.js.map +1 -1
- package/dist/field/Diff/converters/relationship/index.css +107 -0
- package/dist/field/Diff/converters/relationship/index.d.ts +2 -2
- package/dist/field/Diff/converters/relationship/index.d.ts.map +1 -1
- package/dist/field/Diff/converters/relationship/index.js +11 -28
- package/dist/field/Diff/converters/relationship/index.js.map +1 -1
- package/dist/field/Diff/converters/unknown/index.css +36 -0
- package/dist/field/Diff/converters/unknown/index.d.ts +1 -1
- package/dist/field/Diff/converters/unknown/index.d.ts.map +1 -1
- package/dist/field/Diff/converters/unknown/index.js +1 -0
- package/dist/field/Diff/converters/unknown/index.js.map +1 -1
- package/dist/field/Diff/converters/upload/index.css +174 -0
- package/dist/field/Diff/converters/upload/index.d.ts +2 -2
- package/dist/field/Diff/converters/upload/index.d.ts.map +1 -1
- package/dist/field/Diff/converters/upload/index.js +7 -2
- package/dist/field/Diff/converters/upload/index.js.map +1 -1
- package/dist/field/Diff/index.css +154 -0
- package/dist/field/Diff/index.d.ts +4 -3
- package/dist/field/Diff/index.d.ts.map +1 -1
- package/dist/field/Diff/index.js +3 -2
- package/dist/field/Diff/index.js.map +1 -1
- package/dist/field/Field.d.ts +3 -3
- package/dist/field/Field.d.ts.map +1 -1
- package/dist/field/Field.js +38 -27
- package/dist/field/Field.js.map +1 -1
- package/dist/field/RenderLexical/index.d.ts +2 -2
- package/dist/field/RenderLexical/index.d.ts.map +1 -1
- package/dist/field/RenderLexical/index.js.map +1 -1
- package/dist/field/RichTextViewProvider.d.ts +1 -1
- package/dist/field/RichTextViewProvider.d.ts.map +1 -1
- package/dist/field/RichTextViewProvider.js.map +1 -1
- package/dist/field/ViewSelector.css +32 -0
- package/dist/field/ViewSelector.d.ts +1 -1
- package/dist/field/ViewSelector.d.ts.map +1 -1
- package/dist/field/ViewSelector.js +2 -0
- package/dist/field/ViewSelector.js.map +1 -1
- package/dist/field/bundled.css +1 -1
- package/dist/field/index.css +59 -0
- package/dist/field/index.d.ts +1 -1
- package/dist/field/index.d.ts.map +1 -1
- package/dist/field/index.js +1 -1
- package/dist/field/index.js.map +1 -1
- package/dist/field/rscEntry.d.ts +2 -2
- package/dist/field/rscEntry.d.ts.map +1 -1
- package/dist/field/rscEntry.js +2 -0
- package/dist/field/rscEntry.js.map +1 -1
- package/dist/hooks.d.ts +6 -0
- package/dist/hooks.d.ts.map +1 -0
- package/dist/hooks.js +548 -0
- package/dist/hooks.js.map +1 -0
- package/dist/i18n.d.ts.map +1 -1
- package/dist/i18n.js +68 -0
- package/dist/i18n.js.map +1 -1
- package/dist/index.d.ts +15 -22
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +48 -634
- package/dist/index.js.map +1 -1
- package/dist/lexical/LexicalEditor.css +61 -0
- package/dist/lexical/LexicalEditor.d.ts +1 -1
- package/dist/lexical/LexicalEditor.d.ts.map +1 -1
- package/dist/lexical/LexicalEditor.js +62 -64
- package/dist/lexical/LexicalEditor.js.map +1 -1
- package/dist/lexical/LexicalProvider.d.ts +1 -1
- package/dist/lexical/LexicalProvider.d.ts.map +1 -1
- package/dist/lexical/LexicalProvider.js.map +1 -1
- package/dist/lexical/config/client/EditorConfigProvider.d.ts +1 -1
- package/dist/lexical/config/client/EditorConfigProvider.d.ts.map +1 -1
- package/dist/lexical/config/client/EditorConfigProvider.js.map +1 -1
- package/dist/lexical/config/client/loader.d.ts +1 -1
- package/dist/lexical/config/client/loader.d.ts.map +1 -1
- package/dist/lexical/config/client/loader.js +5 -1
- package/dist/lexical/config/client/loader.js.map +1 -1
- package/dist/lexical/config/client/sanitize.d.ts +1 -1
- package/dist/lexical/config/client/sanitize.d.ts.map +1 -1
- package/dist/lexical/config/client/sanitize.js.map +1 -1
- package/dist/lexical/config/server/loader.d.ts +1 -1
- package/dist/lexical/config/server/loader.d.ts.map +1 -1
- package/dist/lexical/config/server/loader.js +14 -11
- package/dist/lexical/config/server/loader.js.map +1 -1
- package/dist/lexical/config/server/sanitize.d.ts +1 -1
- package/dist/lexical/config/server/sanitize.d.ts.map +1 -1
- package/dist/lexical/config/server/sanitize.js +11 -19
- package/dist/lexical/config/server/sanitize.js.map +1 -1
- package/dist/lexical/config/types.d.ts +1 -1
- package/dist/lexical/config/types.d.ts.map +1 -1
- package/dist/lexical/config/types.js.map +1 -1
- package/dist/lexical/nodes/index.d.ts +1 -1
- package/dist/lexical/nodes/index.d.ts.map +1 -1
- package/dist/lexical/nodes/index.js.map +1 -1
- package/dist/lexical/plugins/DecoratorPlugin/index.css +11 -0
- package/dist/lexical/plugins/DecoratorPlugin/index.d.ts +1 -1
- package/dist/lexical/plugins/DecoratorPlugin/index.d.ts.map +1 -1
- package/dist/lexical/plugins/DecoratorPlugin/index.js +25 -21
- package/dist/lexical/plugins/DecoratorPlugin/index.js.map +1 -1
- package/dist/lexical/plugins/InsertParagraphAtEnd/index.css +45 -0
- package/dist/lexical/plugins/InsertParagraphAtEnd/index.d.ts +1 -1
- package/dist/lexical/plugins/InsertParagraphAtEnd/index.d.ts.map +1 -1
- package/dist/lexical/plugins/InsertParagraphAtEnd/index.js +28 -14
- package/dist/lexical/plugins/InsertParagraphAtEnd/index.js.map +1 -1
- package/dist/lexical/plugins/MarkdownShortcut/index.d.ts.map +1 -1
- package/dist/lexical/plugins/MarkdownShortcut/index.js +1 -1
- package/dist/lexical/plugins/MarkdownShortcut/index.js.map +1 -1
- package/dist/lexical/plugins/NodeViewOverridePlugin/index.d.ts.map +1 -1
- package/dist/lexical/plugins/NodeViewOverridePlugin/index.js +21 -0
- package/dist/lexical/plugins/NodeViewOverridePlugin/index.js.map +1 -1
- package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/LexicalMenu.d.ts +0 -1
- package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/LexicalMenu.d.ts.map +1 -1
- package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/LexicalMenu.js +2 -21
- package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/LexicalMenu.js.map +1 -1
- package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/types.d.ts +1 -1
- package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/types.d.ts.map +1 -1
- package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/types.js.map +1 -1
- package/dist/lexical/plugins/SlashMenu/index.css +59 -0
- package/dist/lexical/plugins/SlashMenu/index.d.ts +1 -1
- package/dist/lexical/plugins/SlashMenu/index.d.ts.map +1 -1
- package/dist/lexical/plugins/SlashMenu/index.js +2 -0
- package/dist/lexical/plugins/SlashMenu/index.js.map +1 -1
- package/dist/lexical/plugins/handles/AddBlockHandlePlugin/index.css +41 -0
- package/dist/lexical/plugins/handles/AddBlockHandlePlugin/index.d.ts +1 -1
- package/dist/lexical/plugins/handles/AddBlockHandlePlugin/index.d.ts.map +1 -1
- package/dist/lexical/plugins/handles/AddBlockHandlePlugin/index.js +3 -2
- package/dist/lexical/plugins/handles/AddBlockHandlePlugin/index.js.map +1 -1
- package/dist/lexical/plugins/handles/DraggableBlockPlugin/index.css +86 -0
- package/dist/lexical/plugins/handles/DraggableBlockPlugin/index.d.ts +1 -1
- package/dist/lexical/plugins/handles/DraggableBlockPlugin/index.d.ts.map +1 -1
- package/dist/lexical/plugins/handles/DraggableBlockPlugin/index.js +32 -11
- package/dist/lexical/plugins/handles/DraggableBlockPlugin/index.js.map +1 -1
- package/dist/lexical/plugins/handles/DraggableBlockPlugin/setTargetLine.js +1 -1
- package/dist/lexical/plugins/handles/DraggableBlockPlugin/setTargetLine.js.map +1 -1
- package/dist/lexical/plugins/handles/DraggableBlockPlugin/useKeyboardReordering.d.ts +7 -0
- package/dist/lexical/plugins/handles/DraggableBlockPlugin/useKeyboardReordering.d.ts.map +1 -0
- package/dist/lexical/plugins/handles/DraggableBlockPlugin/useKeyboardReordering.js +65 -0
- package/dist/lexical/plugins/handles/DraggableBlockPlugin/useKeyboardReordering.js.map +1 -0
- package/dist/lexical/plugins/handles/utils/setHandlePosition.d.ts.map +1 -1
- package/dist/lexical/plugins/handles/utils/setHandlePosition.js +2 -0
- package/dist/lexical/plugins/handles/utils/setHandlePosition.js.map +1 -1
- package/dist/lexical/theme/EditorTheme.css +356 -0
- package/dist/lexical/theme/EditorTheme.d.ts.map +1 -1
- package/dist/lexical/theme/EditorTheme.js +1 -0
- package/dist/lexical/theme/EditorTheme.js.map +1 -1
- package/dist/lexical/ui/ContentEditable.css +100 -0
- package/dist/lexical/ui/ContentEditable.d.ts +3 -2
- package/dist/lexical/ui/ContentEditable.d.ts.map +1 -1
- package/dist/lexical/ui/ContentEditable.js +22 -7
- package/dist/lexical/ui/ContentEditable.js.map +1 -1
- package/dist/lexical/ui/icons/Add/index.d.ts +4 -1
- package/dist/lexical/ui/icons/Add/index.d.ts.map +1 -1
- package/dist/lexical/ui/icons/Add/index.js +19 -12
- package/dist/lexical/ui/icons/Add/index.js.map +1 -1
- package/dist/lexical/ui/icons/Add/index.svg +2 -3
- package/dist/lexical/ui/icons/Add/light.svg +2 -3
- package/dist/lexical/ui/icons/AlignCenter/index.d.ts +3 -1
- package/dist/lexical/ui/icons/AlignCenter/index.d.ts.map +1 -1
- package/dist/lexical/ui/icons/AlignCenter/index.js +15 -19
- package/dist/lexical/ui/icons/AlignCenter/index.js.map +1 -1
- package/dist/lexical/ui/icons/AlignJustify/index.d.ts +3 -1
- package/dist/lexical/ui/icons/AlignJustify/index.d.ts.map +1 -1
- package/dist/lexical/ui/icons/AlignJustify/index.js +15 -19
- package/dist/lexical/ui/icons/AlignJustify/index.js.map +1 -1
- package/dist/lexical/ui/icons/AlignLeft/index.d.ts +3 -1
- package/dist/lexical/ui/icons/AlignLeft/index.d.ts.map +1 -1
- package/dist/lexical/ui/icons/AlignLeft/index.js +15 -19
- package/dist/lexical/ui/icons/AlignLeft/index.js.map +1 -1
- package/dist/lexical/ui/icons/AlignRight/index.d.ts +3 -1
- package/dist/lexical/ui/icons/AlignRight/index.d.ts.map +1 -1
- package/dist/lexical/ui/icons/AlignRight/index.js +15 -19
- package/dist/lexical/ui/icons/AlignRight/index.js.map +1 -1
- package/dist/lexical/ui/icons/Block/index.d.ts +3 -1
- package/dist/lexical/ui/icons/Block/index.d.ts.map +1 -1
- package/dist/lexical/ui/icons/Block/index.js +13 -28
- package/dist/lexical/ui/icons/Block/index.js.map +1 -1
- package/dist/lexical/ui/icons/Blockquote/index.d.ts +3 -1
- package/dist/lexical/ui/icons/Blockquote/index.d.ts.map +1 -1
- package/dist/lexical/ui/icons/Blockquote/index.js +9 -6
- package/dist/lexical/ui/icons/Blockquote/index.js.map +1 -1
- package/dist/lexical/ui/icons/Bold/index.d.ts +3 -1
- package/dist/lexical/ui/icons/Bold/index.d.ts.map +1 -1
- package/dist/lexical/ui/icons/Bold/index.js +13 -8
- package/dist/lexical/ui/icons/Bold/index.js.map +1 -1
- package/dist/lexical/ui/icons/Checklist/index.d.ts +4 -1
- package/dist/lexical/ui/icons/Checklist/index.d.ts.map +1 -1
- package/dist/lexical/ui/icons/Checklist/index.js +17 -18
- package/dist/lexical/ui/icons/Checklist/index.js.map +1 -1
- package/dist/lexical/ui/icons/Code/index.d.ts +3 -1
- package/dist/lexical/ui/icons/Code/index.d.ts.map +1 -1
- package/dist/lexical/ui/icons/Code/index.js +15 -13
- package/dist/lexical/ui/icons/Code/index.js.map +1 -1
- package/dist/lexical/ui/icons/CodeBlock/index.d.ts +4 -1
- package/dist/lexical/ui/icons/CodeBlock/index.d.ts.map +1 -1
- package/dist/lexical/ui/icons/CodeBlock/index.js +18 -7
- package/dist/lexical/ui/icons/CodeBlock/index.js.map +1 -1
- package/dist/lexical/ui/icons/Collapse/index.d.ts +3 -1
- package/dist/lexical/ui/icons/Collapse/index.d.ts.map +1 -1
- package/dist/lexical/ui/icons/Collapse/index.js +10 -8
- package/dist/lexical/ui/icons/Collapse/index.js.map +1 -1
- package/dist/lexical/ui/icons/DraggableBlock/index.svg +7 -7
- package/dist/lexical/ui/icons/DraggableBlock/light.svg +7 -7
- package/dist/lexical/ui/icons/Expand/index.d.ts +5 -0
- package/dist/lexical/ui/icons/Expand/index.d.ts.map +1 -0
- package/dist/lexical/ui/icons/Expand/index.js +22 -0
- package/dist/lexical/ui/icons/Expand/index.js.map +1 -0
- package/dist/lexical/ui/icons/H1/index.d.ts +3 -1
- package/dist/lexical/ui/icons/H1/index.d.ts.map +1 -1
- package/dist/lexical/ui/icons/H1/index.js +9 -6
- package/dist/lexical/ui/icons/H1/index.js.map +1 -1
- package/dist/lexical/ui/icons/H2/index.d.ts +3 -1
- package/dist/lexical/ui/icons/H2/index.d.ts.map +1 -1
- package/dist/lexical/ui/icons/H2/index.js +9 -6
- package/dist/lexical/ui/icons/H2/index.js.map +1 -1
- package/dist/lexical/ui/icons/H3/index.d.ts +3 -1
- package/dist/lexical/ui/icons/H3/index.d.ts.map +1 -1
- package/dist/lexical/ui/icons/H3/index.js +19 -9
- package/dist/lexical/ui/icons/H3/index.js.map +1 -1
- package/dist/lexical/ui/icons/H4/index.d.ts +3 -1
- package/dist/lexical/ui/icons/H4/index.d.ts.map +1 -1
- package/dist/lexical/ui/icons/H4/index.js +19 -9
- package/dist/lexical/ui/icons/H4/index.js.map +1 -1
- package/dist/lexical/ui/icons/H5/index.d.ts +3 -1
- package/dist/lexical/ui/icons/H5/index.d.ts.map +1 -1
- package/dist/lexical/ui/icons/H5/index.js +19 -9
- package/dist/lexical/ui/icons/H5/index.js.map +1 -1
- package/dist/lexical/ui/icons/H6/index.d.ts +3 -1
- package/dist/lexical/ui/icons/H6/index.d.ts.map +1 -1
- package/dist/lexical/ui/icons/H6/index.js +19 -9
- package/dist/lexical/ui/icons/H6/index.js.map +1 -1
- package/dist/lexical/ui/icons/HorizontalRule/index.d.ts +3 -1
- package/dist/lexical/ui/icons/HorizontalRule/index.d.ts.map +1 -1
- package/dist/lexical/ui/icons/HorizontalRule/index.js +11 -11
- package/dist/lexical/ui/icons/HorizontalRule/index.js.map +1 -1
- package/dist/lexical/ui/icons/IndentDecrease/index.d.ts +3 -1
- package/dist/lexical/ui/icons/IndentDecrease/index.d.ts.map +1 -1
- package/dist/lexical/ui/icons/IndentDecrease/index.js +18 -22
- package/dist/lexical/ui/icons/IndentDecrease/index.js.map +1 -1
- package/dist/lexical/ui/icons/IndentIncrease/index.d.ts +3 -1
- package/dist/lexical/ui/icons/IndentIncrease/index.d.ts.map +1 -1
- package/dist/lexical/ui/icons/IndentIncrease/index.js +15 -22
- package/dist/lexical/ui/icons/IndentIncrease/index.js.map +1 -1
- package/dist/lexical/ui/icons/InlineBlocks/index.d.ts +3 -1
- package/dist/lexical/ui/icons/InlineBlocks/index.d.ts.map +1 -1
- package/dist/lexical/ui/icons/InlineBlocks/index.js +9 -6
- package/dist/lexical/ui/icons/InlineBlocks/index.js.map +1 -1
- package/dist/lexical/ui/icons/Italic/index.d.ts +3 -1
- package/dist/lexical/ui/icons/Italic/index.d.ts.map +1 -1
- package/dist/lexical/ui/icons/Italic/index.js +13 -8
- package/dist/lexical/ui/icons/Italic/index.js.map +1 -1
- package/dist/lexical/ui/icons/Link/index.d.ts +4 -1
- package/dist/lexical/ui/icons/Link/index.d.ts.map +1 -1
- package/dist/lexical/ui/icons/Link/index.js +14 -9
- package/dist/lexical/ui/icons/Link/index.js.map +1 -1
- package/dist/lexical/ui/icons/Meatballs/index.d.ts +4 -1
- package/dist/lexical/ui/icons/Meatballs/index.d.ts.map +1 -1
- package/dist/lexical/ui/icons/Meatballs/index.js +19 -15
- package/dist/lexical/ui/icons/Meatballs/index.js.map +1 -1
- package/dist/lexical/ui/icons/OrderedList/index.d.ts +4 -1
- package/dist/lexical/ui/icons/OrderedList/index.d.ts.map +1 -1
- package/dist/lexical/ui/icons/OrderedList/index.js +19 -25
- package/dist/lexical/ui/icons/OrderedList/index.js.map +1 -1
- package/dist/lexical/ui/icons/Page/index.d.ts +5 -0
- package/dist/lexical/ui/icons/Page/index.d.ts.map +1 -0
- package/dist/lexical/ui/icons/Page/index.js +21 -0
- package/dist/lexical/ui/icons/Page/index.js.map +1 -0
- package/dist/lexical/ui/icons/Relationship/index.d.ts +3 -1
- package/dist/lexical/ui/icons/Relationship/index.d.ts.map +1 -1
- package/dist/lexical/ui/icons/Relationship/index.js +13 -25
- package/dist/lexical/ui/icons/Relationship/index.js.map +1 -1
- package/dist/lexical/ui/icons/Strikethrough/index.d.ts +3 -1
- package/dist/lexical/ui/icons/Strikethrough/index.d.ts.map +1 -1
- package/dist/lexical/ui/icons/Strikethrough/index.js +13 -13
- package/dist/lexical/ui/icons/Strikethrough/index.js.map +1 -1
- package/dist/lexical/ui/icons/Subscript/index.d.ts +3 -1
- package/dist/lexical/ui/icons/Subscript/index.d.ts.map +1 -1
- package/dist/lexical/ui/icons/Subscript/index.js +10 -7
- package/dist/lexical/ui/icons/Subscript/index.js.map +1 -1
- package/dist/lexical/ui/icons/Superscript/index.d.ts +3 -1
- package/dist/lexical/ui/icons/Superscript/index.d.ts.map +1 -1
- package/dist/lexical/ui/icons/Superscript/index.js +10 -7
- package/dist/lexical/ui/icons/Superscript/index.js.map +1 -1
- package/dist/lexical/ui/icons/Table/index.d.ts +4 -1
- package/dist/lexical/ui/icons/Table/index.d.ts.map +1 -1
- package/dist/lexical/ui/icons/Table/index.js +20 -15
- package/dist/lexical/ui/icons/Table/index.js.map +1 -1
- package/dist/lexical/ui/icons/Text/index.d.ts +4 -1
- package/dist/lexical/ui/icons/Text/index.d.ts.map +1 -1
- package/dist/lexical/ui/icons/Text/index.js +17 -8
- package/dist/lexical/ui/icons/Text/index.js.map +1 -1
- package/dist/lexical/ui/icons/Trash/index.d.ts +10 -0
- package/dist/lexical/ui/icons/Trash/index.d.ts.map +1 -0
- package/dist/lexical/ui/icons/Trash/index.js +29 -0
- package/dist/lexical/ui/icons/Trash/index.js.map +1 -0
- package/dist/lexical/ui/icons/Underline/index.d.ts +3 -1
- package/dist/lexical/ui/icons/Underline/index.d.ts.map +1 -1
- package/dist/lexical/ui/icons/Underline/index.js +16 -14
- package/dist/lexical/ui/icons/Underline/index.js.map +1 -1
- package/dist/lexical/ui/icons/UnorderedList/index.d.ts +3 -1
- package/dist/lexical/ui/icons/UnorderedList/index.d.ts.map +1 -1
- package/dist/lexical/ui/icons/UnorderedList/index.js +13 -40
- package/dist/lexical/ui/icons/UnorderedList/index.js.map +1 -1
- package/dist/lexical/ui/icons/Upload/index.d.ts +3 -1
- package/dist/lexical/ui/icons/Upload/index.d.ts.map +1 -1
- package/dist/lexical/ui/icons/Upload/index.js +15 -22
- package/dist/lexical/ui/icons/Upload/index.js.map +1 -1
- package/dist/lexical/utils/markdown/convertFromMarkdownString.d.ts +17 -0
- package/dist/lexical/utils/markdown/convertFromMarkdownString.d.ts.map +1 -0
- package/dist/lexical/utils/markdown/convertFromMarkdownString.js +27 -0
- package/dist/lexical/utils/markdown/convertFromMarkdownString.js.map +1 -0
- package/dist/lexical/utils/markdown/createBlockNode.d.ts +2 -2
- package/dist/lexical/utils/markdown/createBlockNode.d.ts.map +1 -1
- package/dist/lexical/utils/markdown/createBlockNode.js.map +1 -1
- package/dist/lexical/utils/markdown/normalizeMarkdown.d.ts +25 -0
- package/dist/lexical/utils/markdown/normalizeMarkdown.d.ts.map +1 -0
- package/dist/lexical/utils/markdown/normalizeMarkdown.js +91 -0
- package/dist/lexical/utils/markdown/normalizeMarkdown.js.map +1 -0
- package/dist/lexical/utils/nodeFormat.d.ts.map +1 -1
- package/dist/lexical/utils/point.d.ts.map +1 -1
- package/dist/lexical/utils/rect.d.ts.map +1 -1
- package/dist/lexical-proxy/@lexical-markdown.d.ts +1 -1
- package/dist/lexical-proxy/@lexical-markdown.d.ts.map +1 -1
- package/dist/lexical-proxy/@lexical-markdown.js +1 -1
- package/dist/lexical-proxy/@lexical-markdown.js.map +1 -1
- package/dist/lexical-proxy/@lexical-react/ExtensionComponent.d.ts.map +1 -1
- package/dist/lexical-proxy/@lexical-react/ExtensionComponent.js.map +1 -1
- package/dist/lexical-proxy/@lexical-react/LexicalExtensionComposer.d.ts.map +1 -1
- package/dist/lexical-proxy/@lexical-react/LexicalExtensionComposer.js.map +1 -1
- package/dist/lexical-proxy/@lexical-react/LexicalExtensionEditorComposer.d.ts.map +1 -1
- package/dist/lexical-proxy/@lexical-react/LexicalExtensionEditorComposer.js.map +1 -1
- package/dist/lexical-proxy/@lexical-react/LexicalSelectionAlwaysOnDisplay.d.ts.map +1 -1
- package/dist/lexical-proxy/@lexical-react/LexicalSelectionAlwaysOnDisplay.js.map +1 -1
- package/dist/lexical-proxy/@lexical-react/ReactExtension.d.ts.map +1 -1
- package/dist/lexical-proxy/@lexical-react/ReactExtension.js.map +1 -1
- package/dist/lexical-proxy/@lexical-react/ReactPluginHostExtension.d.ts.map +1 -1
- package/dist/lexical-proxy/@lexical-react/ReactPluginHostExtension.js.map +1 -1
- package/dist/lexical-proxy/@lexical-react/ReactProviderExtension.d.ts.map +1 -1
- package/dist/lexical-proxy/@lexical-react/ReactProviderExtension.js.map +1 -1
- package/dist/lexical-proxy/@lexical-react/TreeViewExtension.d.ts.map +1 -1
- package/dist/lexical-proxy/@lexical-react/TreeViewExtension.js.map +1 -1
- package/dist/lexical-proxy/@lexical-react/useExtensionComponent.d.ts.map +1 -1
- package/dist/lexical-proxy/@lexical-react/useExtensionComponent.js.map +1 -1
- package/dist/populateGraphQL/populateLexicalPopulationPromises.d.ts +1 -1
- package/dist/populateGraphQL/populateLexicalPopulationPromises.d.ts.map +1 -1
- package/dist/populateGraphQL/populateLexicalPopulationPromises.js.map +1 -1
- package/dist/presets/llmInstructions.d.ts +2 -0
- package/dist/presets/llmInstructions.d.ts.map +1 -0
- package/dist/presets/llmInstructions.js +13 -0
- package/dist/presets/llmInstructions.js.map +1 -0
- package/dist/types/builtInNodes.d.ts +14 -0
- package/dist/types/builtInNodes.d.ts.map +1 -0
- package/dist/types/builtInNodes.js +208 -0
- package/dist/types/builtInNodes.js.map +1 -0
- package/dist/{types.d.ts → types/index.d.ts} +29 -33
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/index.js +2 -0
- package/dist/types/index.js.map +1 -0
- package/dist/types/jsonSchemaHelpers.d.ts +34 -0
- package/dist/types/jsonSchemaHelpers.d.ts.map +1 -0
- package/dist/types/jsonSchemaHelpers.js +63 -0
- package/dist/types/jsonSchemaHelpers.js.map +1 -0
- package/dist/types/nodeTypes.d.ts +133 -0
- package/dist/types/nodeTypes.d.ts.map +1 -0
- package/dist/types/nodeTypes.js +6 -0
- package/dist/types/nodeTypes.js.map +1 -0
- package/dist/types/schema.d.ts +6 -0
- package/dist/types/schema.d.ts.map +1 -0
- package/dist/types/schema.js +90 -0
- package/dist/types/schema.js.map +1 -0
- package/dist/utilities/applyBaseFilterToFields.d.ts.map +1 -1
- package/dist/utilities/applyBaseFilterToFields.js +1 -2
- package/dist/utilities/applyBaseFilterToFields.js.map +1 -1
- package/dist/utilities/buildEditorState.d.ts +18 -4
- package/dist/utilities/buildEditorState.d.ts.map +1 -1
- package/dist/utilities/buildEditorState.js +21 -0
- package/dist/utilities/buildEditorState.js.map +1 -1
- package/dist/utilities/buildInitialState.d.ts +4 -2
- package/dist/utilities/buildInitialState.d.ts.map +1 -1
- package/dist/utilities/buildInitialState.js +1 -0
- package/dist/utilities/buildInitialState.js.map +1 -1
- package/dist/utilities/createClientFeature.d.ts +1 -1
- package/dist/utilities/createClientFeature.d.ts.map +1 -1
- package/dist/utilities/createClientFeature.js.map +1 -1
- package/dist/utilities/createServerFeature.d.ts +1 -1
- package/dist/utilities/createServerFeature.d.ts.map +1 -1
- package/dist/utilities/createServerFeature.js +2 -2
- package/dist/utilities/createServerFeature.js.map +1 -1
- package/dist/utilities/editorConfigFactory.d.ts +7 -7
- package/dist/utilities/editorConfigFactory.d.ts.map +1 -1
- package/dist/utilities/editorConfigFactory.js +9 -9
- package/dist/utilities/editorConfigFactory.js.map +1 -1
- package/dist/utilities/fieldsDrawer/Drawer.d.ts.map +1 -1
- package/dist/utilities/fieldsDrawer/Drawer.js +19 -10
- package/dist/utilities/fieldsDrawer/Drawer.js.map +1 -1
- package/dist/utilities/fieldsDrawer/DrawerContent.d.ts +4 -1
- package/dist/utilities/fieldsDrawer/DrawerContent.d.ts.map +1 -1
- package/dist/utilities/fieldsDrawer/DrawerContent.js +39 -40
- package/dist/utilities/fieldsDrawer/DrawerContent.js.map +1 -1
- package/dist/utilities/fieldsDrawer/index.css +12 -0
- package/dist/utilities/fieldsDrawer/useDrawerSubmit.d.ts +29 -0
- package/dist/utilities/fieldsDrawer/useDrawerSubmit.d.ts.map +1 -0
- package/dist/utilities/fieldsDrawer/useDrawerSubmit.js +97 -0
- package/dist/utilities/fieldsDrawer/useDrawerSubmit.js.map +1 -0
- package/dist/utilities/fieldsDrawer/useLexicalDocumentDrawer.d.ts +1 -0
- package/dist/utilities/fieldsDrawer/useLexicalDocumentDrawer.d.ts.map +1 -1
- package/dist/utilities/fieldsDrawer/useLexicalDocumentDrawer.js +34 -18
- package/dist/utilities/fieldsDrawer/useLexicalDocumentDrawer.js.map +1 -1
- package/dist/utilities/generateImportMap.d.ts +3 -3
- package/dist/utilities/generateImportMap.d.ts.map +1 -1
- package/dist/utilities/generateImportMap.js.map +1 -1
- package/dist/utilities/generateSchemaMap.d.ts +1 -1
- package/dist/utilities/getDefaultSanitizedEditorConfig.d.ts +2 -2
- package/dist/utilities/getDefaultSanitizedEditorConfig.d.ts.map +1 -1
- package/dist/utilities/getDefaultSanitizedEditorConfig.js +6 -17
- package/dist/utilities/getDefaultSanitizedEditorConfig.js.map +1 -1
- package/dist/utilities/initLexicalFeatures.d.ts +1 -1
- package/dist/utilities/initLexicalFeatures.d.ts.map +1 -1
- package/dist/utilities/initLexicalFeatures.js.map +1 -1
- package/dist/utilities/upgradeLexicalData/index.js +6 -3
- package/dist/utilities/upgradeLexicalData/index.js.map +1 -1
- package/dist/utilities/upgradeLexicalData/upgradeDocumentFieldsRecursively.js +1 -1
- package/dist/utilities/upgradeLexicalData/upgradeDocumentFieldsRecursively.js.map +1 -1
- package/dist/validate/hasText.d.ts +2 -2
- package/dist/validate/hasText.d.ts.map +1 -1
- package/dist/validate/hasText.js.map +1 -1
- package/dist/validate/index.d.ts +1 -1
- package/dist/validate/index.d.ts.map +1 -1
- package/package.json +79 -85
- package/dist/dependencyChecker.spec.js +0 -16
- package/dist/dependencyChecker.spec.js.map +0 -1
- package/dist/exports/client/Component-DOSSWC76.js +0 -2
- package/dist/exports/client/Component-DOSSWC76.js.map +0 -7
- package/dist/exports/client/Component-MBLHTKDK.js +0 -2
- package/dist/exports/client/Component-MBLHTKDK.js.map +0 -7
- package/dist/exports/client/Field-YZR46UCY.js +0 -2
- package/dist/exports/client/Field-YZR46UCY.js.map +0 -7
- package/dist/exports/client/RelationshipComponent-BG3DPV3T.js +0 -2
- package/dist/exports/client/RelationshipComponent-BG3DPV3T.js.map +0 -7
- package/dist/exports/client/bundled.css +0 -1
- package/dist/exports/client/chunk-BZZVLW4U.js.map +0 -7
- package/dist/exports/client/chunk-F26IQ5RE.js +0 -2
- package/dist/exports/client/chunk-F26IQ5RE.js.map +0 -7
- package/dist/exports/client/chunk-INBEEENE.js +0 -2
- package/dist/exports/client/chunk-INBEEENE.js.map +0 -7
- package/dist/exports/client/chunk-OSMEE5HW.js +0 -2
- package/dist/exports/client/chunk-OSMEE5HW.js.map +0 -7
- package/dist/exports/client/chunk-QAW5QKEM.js +0 -12
- package/dist/exports/client/chunk-QAW5QKEM.js.map +0 -7
- package/dist/exports/client/chunk-XFA5M7FY.js +0 -2
- package/dist/exports/client/chunk-XFA5M7FY.js.map +0 -7
- package/dist/exports/client/component-UBRNPIQ6.js +0 -2
- package/dist/exports/client/component-UBRNPIQ6.js.map +0 -7
- package/dist/exports/client/componentInline-A4H3EY3L.js +0 -2
- package/dist/exports/server/migrate.d.ts +0 -16
- package/dist/exports/server/migrate.d.ts.map +0 -1
- package/dist/exports/server/migrate.js +0 -16
- package/dist/exports/server/migrate.js.map +0 -1
- package/dist/features/blockquote/markdownTransformer.d.ts +0 -3
- package/dist/features/blockquote/markdownTransformer.d.ts.map +0 -1
- package/dist/features/blockquote/markdownTransformer.js +0 -33
- package/dist/features/blockquote/markdownTransformer.js.map +0 -1
- package/dist/features/blocks/client/component/removeEmptyArrayValues.d.ts +0 -11
- package/dist/features/blocks/client/component/removeEmptyArrayValues.d.ts.map +0 -1
- package/dist/features/blocks/client/component/removeEmptyArrayValues.js +0 -20
- package/dist/features/blocks/client/component/removeEmptyArrayValues.js.map +0 -1
- package/dist/features/converters/lexicalToHtml_deprecated/converter/converters/linebreak.d.ts +0 -4
- package/dist/features/converters/lexicalToHtml_deprecated/converter/converters/linebreak.d.ts.map +0 -1
- package/dist/features/converters/lexicalToHtml_deprecated/converter/converters/linebreak.js +0 -7
- package/dist/features/converters/lexicalToHtml_deprecated/converter/converters/linebreak.js.map +0 -1
- package/dist/features/converters/lexicalToHtml_deprecated/converter/converters/paragraph.d.ts +0 -4
- package/dist/features/converters/lexicalToHtml_deprecated/converter/converters/paragraph.d.ts.map +0 -1
- package/dist/features/converters/lexicalToHtml_deprecated/converter/converters/paragraph.js +0 -38
- package/dist/features/converters/lexicalToHtml_deprecated/converter/converters/paragraph.js.map +0 -1
- package/dist/features/converters/lexicalToHtml_deprecated/converter/converters/tab.d.ts +0 -4
- package/dist/features/converters/lexicalToHtml_deprecated/converter/converters/tab.d.ts.map +0 -1
- package/dist/features/converters/lexicalToHtml_deprecated/converter/converters/tab.js +0 -9
- package/dist/features/converters/lexicalToHtml_deprecated/converter/converters/tab.js.map +0 -1
- package/dist/features/converters/lexicalToHtml_deprecated/converter/converters/text.d.ts +0 -4
- package/dist/features/converters/lexicalToHtml_deprecated/converter/converters/text.d.ts.map +0 -1
- package/dist/features/converters/lexicalToHtml_deprecated/converter/converters/text.js +0 -33
- package/dist/features/converters/lexicalToHtml_deprecated/converter/converters/text.js.map +0 -1
- package/dist/features/converters/lexicalToHtml_deprecated/converter/defaultConverters.d.ts +0 -6
- package/dist/features/converters/lexicalToHtml_deprecated/converter/defaultConverters.d.ts.map +0 -1
- package/dist/features/converters/lexicalToHtml_deprecated/converter/defaultConverters.js +0 -9
- package/dist/features/converters/lexicalToHtml_deprecated/converter/defaultConverters.js.map +0 -1
- package/dist/features/converters/lexicalToHtml_deprecated/converter/index.d.ts +0 -70
- package/dist/features/converters/lexicalToHtml_deprecated/converter/index.d.ts.map +0 -1
- package/dist/features/converters/lexicalToHtml_deprecated/converter/index.js +0 -104
- package/dist/features/converters/lexicalToHtml_deprecated/converter/index.js.map +0 -1
- package/dist/features/converters/lexicalToHtml_deprecated/converter/types.d.ts +0 -27
- package/dist/features/converters/lexicalToHtml_deprecated/converter/types.d.ts.map +0 -1
- package/dist/features/converters/lexicalToHtml_deprecated/converter/types.js +0 -2
- package/dist/features/converters/lexicalToHtml_deprecated/converter/types.js.map +0 -1
- package/dist/features/converters/lexicalToHtml_deprecated/field/index.d.ts +0 -39
- package/dist/features/converters/lexicalToHtml_deprecated/field/index.d.ts.map +0 -1
- package/dist/features/converters/lexicalToHtml_deprecated/field/index.js +0 -122
- package/dist/features/converters/lexicalToHtml_deprecated/field/index.js.map +0 -1
- package/dist/features/converters/lexicalToHtml_deprecated/index.d.ts +0 -12
- package/dist/features/converters/lexicalToHtml_deprecated/index.d.ts.map +0 -1
- package/dist/features/converters/lexicalToHtml_deprecated/index.js +0 -11
- package/dist/features/converters/lexicalToHtml_deprecated/index.js.map +0 -1
- package/dist/features/converters/lexicalToJSX/Component/nodeTags.spec.js +0 -114
- package/dist/features/converters/lexicalToJSX/Component/nodeTags.spec.js.map +0 -1
- package/dist/features/converters/lexicalToPlaintext/convertLexicalToPlaintext.spec.js +0 -180
- package/dist/features/converters/lexicalToPlaintext/convertLexicalToPlaintext.spec.js.map +0 -1
- package/dist/features/experimental_table/client/index.d.ts.map +0 -1
- package/dist/features/experimental_table/client/index.js.map +0 -1
- package/dist/features/experimental_table/client/plugins/TableActionMenuPlugin/computeSelectionCount.d.ts.map +0 -1
- package/dist/features/experimental_table/client/plugins/TableActionMenuPlugin/computeSelectionCount.js.map +0 -1
- package/dist/features/experimental_table/client/plugins/TableActionMenuPlugin/index.d.ts.map +0 -1
- package/dist/features/experimental_table/client/plugins/TableActionMenuPlugin/index.js.map +0 -1
- package/dist/features/experimental_table/client/plugins/TableCellResizerPlugin/index.d.ts.map +0 -1
- package/dist/features/experimental_table/client/plugins/TableCellResizerPlugin/index.js.map +0 -1
- package/dist/features/experimental_table/client/plugins/TableHoverActionsPlugin/index.d.ts.map +0 -1
- package/dist/features/experimental_table/client/plugins/TableHoverActionsPlugin/index.js.map +0 -1
- package/dist/features/experimental_table/client/plugins/TablePlugin/index.d.ts.map +0 -1
- package/dist/features/experimental_table/client/plugins/TablePlugin/index.js +0 -152
- package/dist/features/experimental_table/client/plugins/TablePlugin/index.js.map +0 -1
- package/dist/features/experimental_table/client/utils/debounce.d.ts.map +0 -1
- package/dist/features/experimental_table/client/utils/debounce.js.map +0 -1
- package/dist/features/experimental_table/client/utils/useDebounce.d.ts.map +0 -1
- package/dist/features/experimental_table/client/utils/useDebounce.js.map +0 -1
- package/dist/features/experimental_table/markdownTransformer.d.ts +0 -5
- package/dist/features/experimental_table/markdownTransformer.d.ts.map +0 -1
- package/dist/features/experimental_table/markdownTransformer.js.map +0 -1
- package/dist/features/experimental_table/server/index.d.ts +0 -8
- package/dist/features/experimental_table/server/index.d.ts.map +0 -1
- package/dist/features/experimental_table/server/index.js +0 -154
- package/dist/features/experimental_table/server/index.js.map +0 -1
- package/dist/features/format/bold/markdownTransformers.d.ts +0 -6
- package/dist/features/format/bold/markdownTransformers.d.ts.map +0 -1
- package/dist/features/format/bold/markdownTransformers.js +0 -23
- package/dist/features/format/bold/markdownTransformers.js.map +0 -1
- package/dist/features/format/inlineCode/markdownTransformers.d.ts +0 -3
- package/dist/features/format/inlineCode/markdownTransformers.d.ts.map +0 -1
- package/dist/features/format/inlineCode/markdownTransformers.js +0 -6
- package/dist/features/format/inlineCode/markdownTransformers.js.map +0 -1
- package/dist/features/format/italic/markdownTransformers.d.ts +0 -4
- package/dist/features/format/italic/markdownTransformers.d.ts.map +0 -1
- package/dist/features/format/italic/markdownTransformers.js +0 -12
- package/dist/features/format/italic/markdownTransformers.js.map +0 -1
- package/dist/features/format/strikethrough/markdownTransformers.d.ts +0 -3
- package/dist/features/format/strikethrough/markdownTransformers.d.ts.map +0 -1
- package/dist/features/format/strikethrough/markdownTransformers.js +0 -6
- package/dist/features/format/strikethrough/markdownTransformers.js.map +0 -1
- package/dist/features/link/markdownTransformer.spec.js +0 -195
- package/dist/features/link/markdownTransformer.spec.js.map +0 -1
- package/dist/features/link/nodes/types.d.ts +0 -27
- package/dist/features/link/nodes/types.d.ts.map +0 -1
- package/dist/features/link/nodes/types.js +0 -2
- package/dist/features/link/nodes/types.js.map +0 -1
- package/dist/features/lists/checklist/markdownTransformers.d.ts +0 -3
- package/dist/features/lists/checklist/markdownTransformers.d.ts.map +0 -1
- package/dist/features/lists/checklist/markdownTransformers.js +0 -12
- package/dist/features/lists/checklist/markdownTransformers.js.map +0 -1
- package/dist/features/lists/htmlConverter.d.ts +0 -5
- package/dist/features/lists/htmlConverter.d.ts.map +0 -1
- package/dist/features/lists/htmlConverter.js +0 -84
- package/dist/features/lists/htmlConverter.js.map +0 -1
- package/dist/features/lists/orderedList/markdownTransformer.d.ts +0 -3
- package/dist/features/lists/orderedList/markdownTransformer.d.ts.map +0 -1
- package/dist/features/lists/orderedList/markdownTransformer.js +0 -12
- package/dist/features/lists/orderedList/markdownTransformer.js.map +0 -1
- package/dist/features/lists/shared/markdown.d.ts +0 -6
- package/dist/features/lists/shared/markdown.d.ts.map +0 -1
- package/dist/features/lists/shared/markdown.js +0 -57
- package/dist/features/lists/shared/markdown.js.map +0 -1
- package/dist/features/lists/unorderedList/markdownTransformer.d.ts +0 -3
- package/dist/features/lists/unorderedList/markdownTransformer.d.ts.map +0 -1
- package/dist/features/lists/unorderedList/markdownTransformer.js +0 -12
- package/dist/features/lists/unorderedList/markdownTransformer.js.map +0 -1
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/heading/converter.d.ts +0 -3
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/heading/converter.d.ts.map +0 -1
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/heading/converter.js +0 -22
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/heading/converter.js.map +0 -1
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/link/converter.d.ts +0 -3
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/link/converter.d.ts.map +0 -1
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/link/converter.js +0 -33
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/link/converter.js.map +0 -1
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/list/converter.d.ts +0 -3
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/list/converter.d.ts.map +0 -1
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/list/converter.js +0 -24
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/list/converter.js.map +0 -1
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/listItem/converter.d.ts +0 -3
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/listItem/converter.d.ts.map +0 -1
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/listItem/converter.js +0 -25
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/listItem/converter.js.map +0 -1
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/quote/converter.d.ts +0 -3
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/quote/converter.d.ts.map +0 -1
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/quote/converter.js +0 -22
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/quote/converter.js.map +0 -1
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/unknown/converter.d.ts +0 -3
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/unknown/converter.d.ts.map +0 -1
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/unknown/converter.js +0 -28
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/unknown/converter.js.map +0 -1
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/upload/converter.d.ts +0 -3
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/upload/converter.d.ts.map +0 -1
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/upload/converter.js +0 -22
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/upload/converter.js.map +0 -1
- package/dist/features/migrations/lexicalPluginToLexical/converter/defaultConverters.d.ts +0 -3
- package/dist/features/migrations/lexicalPluginToLexical/converter/defaultConverters.d.ts.map +0 -1
- package/dist/features/migrations/lexicalPluginToLexical/converter/defaultConverters.js +0 -9
- package/dist/features/migrations/lexicalPluginToLexical/converter/defaultConverters.js.map +0 -1
- package/dist/features/migrations/lexicalPluginToLexical/converter/index.d.ts +0 -19
- package/dist/features/migrations/lexicalPluginToLexical/converter/index.d.ts.map +0 -1
- package/dist/features/migrations/lexicalPluginToLexical/converter/index.js +0 -78
- package/dist/features/migrations/lexicalPluginToLexical/converter/index.js.map +0 -1
- package/dist/features/migrations/lexicalPluginToLexical/converter/types.d.ts +0 -23
- package/dist/features/migrations/lexicalPluginToLexical/converter/types.d.ts.map +0 -1
- package/dist/features/migrations/lexicalPluginToLexical/converter/types.js +0 -2
- package/dist/features/migrations/lexicalPluginToLexical/converter/types.js.map +0 -1
- package/dist/features/migrations/lexicalPluginToLexical/feature.client.d.ts +0 -2
- package/dist/features/migrations/lexicalPluginToLexical/feature.client.d.ts.map +0 -1
- package/dist/features/migrations/lexicalPluginToLexical/feature.client.js +0 -10
- package/dist/features/migrations/lexicalPluginToLexical/feature.client.js.map +0 -1
- package/dist/features/migrations/lexicalPluginToLexical/feature.server.d.ts +0 -10
- package/dist/features/migrations/lexicalPluginToLexical/feature.server.d.ts.map +0 -1
- package/dist/features/migrations/lexicalPluginToLexical/feature.server.js +0 -49
- package/dist/features/migrations/lexicalPluginToLexical/feature.server.js.map +0 -1
- package/dist/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/Component.d.ts +0 -9
- package/dist/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/Component.d.ts.map +0 -1
- package/dist/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/Component.js +0 -15
- package/dist/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/Component.js.map +0 -1
- package/dist/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/index.d.ts +0 -33
- package/dist/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/index.d.ts.map +0 -1
- package/dist/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/index.js +0 -74
- package/dist/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/index.js.map +0 -1
- package/dist/features/migrations/slateToLexical/converter/converters/blockquote/converter.d.ts +0 -3
- package/dist/features/migrations/slateToLexical/converter/converters/blockquote/converter.d.ts.map +0 -1
- package/dist/features/migrations/slateToLexical/converter/converters/blockquote/converter.js +0 -23
- package/dist/features/migrations/slateToLexical/converter/converters/blockquote/converter.js.map +0 -1
- package/dist/features/migrations/slateToLexical/converter/converters/heading/converter.d.ts +0 -3
- package/dist/features/migrations/slateToLexical/converter/converters/heading/converter.d.ts.map +0 -1
- package/dist/features/migrations/slateToLexical/converter/converters/heading/converter.js +0 -24
- package/dist/features/migrations/slateToLexical/converter/converters/heading/converter.js.map +0 -1
- package/dist/features/migrations/slateToLexical/converter/converters/indent/converter.d.ts +0 -3
- package/dist/features/migrations/slateToLexical/converter/converters/indent/converter.d.ts.map +0 -1
- package/dist/features/migrations/slateToLexical/converter/converters/indent/converter.js +0 -33
- package/dist/features/migrations/slateToLexical/converter/converters/indent/converter.js.map +0 -1
- package/dist/features/migrations/slateToLexical/converter/converters/link/converter.d.ts +0 -3
- package/dist/features/migrations/slateToLexical/converter/converters/link/converter.d.ts.map +0 -1
- package/dist/features/migrations/slateToLexical/converter/converters/link/converter.js +0 -30
- package/dist/features/migrations/slateToLexical/converter/converters/link/converter.js.map +0 -1
- package/dist/features/migrations/slateToLexical/converter/converters/listItem/converter.d.ts +0 -3
- package/dist/features/migrations/slateToLexical/converter/converters/listItem/converter.d.ts.map +0 -1
- package/dist/features/migrations/slateToLexical/converter/converters/listItem/converter.js +0 -26
- package/dist/features/migrations/slateToLexical/converter/converters/listItem/converter.js.map +0 -1
- package/dist/features/migrations/slateToLexical/converter/converters/orderedList/converter.d.ts +0 -3
- package/dist/features/migrations/slateToLexical/converter/converters/orderedList/converter.d.ts.map +0 -1
- package/dist/features/migrations/slateToLexical/converter/converters/orderedList/converter.js +0 -26
- package/dist/features/migrations/slateToLexical/converter/converters/orderedList/converter.js.map +0 -1
- package/dist/features/migrations/slateToLexical/converter/converters/relationship/converter.d.ts +0 -3
- package/dist/features/migrations/slateToLexical/converter/converters/relationship/converter.d.ts.map +0 -1
- package/dist/features/migrations/slateToLexical/converter/converters/relationship/converter.js +0 -15
- package/dist/features/migrations/slateToLexical/converter/converters/relationship/converter.js.map +0 -1
- package/dist/features/migrations/slateToLexical/converter/converters/unknown/converter.d.ts +0 -3
- package/dist/features/migrations/slateToLexical/converter/converters/unknown/converter.d.ts.map +0 -1
- package/dist/features/migrations/slateToLexical/converter/converters/unknown/converter.js +0 -27
- package/dist/features/migrations/slateToLexical/converter/converters/unknown/converter.js.map +0 -1
- package/dist/features/migrations/slateToLexical/converter/converters/unorderedList/converter.d.ts +0 -3
- package/dist/features/migrations/slateToLexical/converter/converters/unorderedList/converter.d.ts.map +0 -1
- package/dist/features/migrations/slateToLexical/converter/converters/unorderedList/converter.js +0 -26
- package/dist/features/migrations/slateToLexical/converter/converters/unorderedList/converter.js.map +0 -1
- package/dist/features/migrations/slateToLexical/converter/converters/upload/converter.d.ts +0 -3
- package/dist/features/migrations/slateToLexical/converter/converters/upload/converter.d.ts.map +0 -1
- package/dist/features/migrations/slateToLexical/converter/converters/upload/converter.js +0 -18
- package/dist/features/migrations/slateToLexical/converter/converters/upload/converter.js.map +0 -1
- package/dist/features/migrations/slateToLexical/converter/defaultConverters.d.ts +0 -3
- package/dist/features/migrations/slateToLexical/converter/defaultConverters.d.ts.map +0 -1
- package/dist/features/migrations/slateToLexical/converter/defaultConverters.js +0 -12
- package/dist/features/migrations/slateToLexical/converter/defaultConverters.js.map +0 -1
- package/dist/features/migrations/slateToLexical/converter/index.d.ts +0 -19
- package/dist/features/migrations/slateToLexical/converter/index.d.ts.map +0 -1
- package/dist/features/migrations/slateToLexical/converter/index.js +0 -130
- package/dist/features/migrations/slateToLexical/converter/index.js.map +0 -1
- package/dist/features/migrations/slateToLexical/converter/types.d.ts +0 -16
- package/dist/features/migrations/slateToLexical/converter/types.d.ts.map +0 -1
- package/dist/features/migrations/slateToLexical/converter/types.js +0 -2
- package/dist/features/migrations/slateToLexical/converter/types.js.map +0 -1
- package/dist/features/migrations/slateToLexical/feature.client.d.ts +0 -2
- package/dist/features/migrations/slateToLexical/feature.client.d.ts.map +0 -1
- package/dist/features/migrations/slateToLexical/feature.client.js +0 -10
- package/dist/features/migrations/slateToLexical/feature.client.js.map +0 -1
- package/dist/features/migrations/slateToLexical/feature.server.d.ts +0 -40
- package/dist/features/migrations/slateToLexical/feature.server.d.ts.map +0 -1
- package/dist/features/migrations/slateToLexical/feature.server.js +0 -68
- package/dist/features/migrations/slateToLexical/feature.server.js.map +0 -1
- package/dist/features/migrations/slateToLexical/nodes/unknownConvertedNode/Component.d.ts +0 -9
- package/dist/features/migrations/slateToLexical/nodes/unknownConvertedNode/Component.d.ts.map +0 -1
- package/dist/features/migrations/slateToLexical/nodes/unknownConvertedNode/Component.js +0 -15
- package/dist/features/migrations/slateToLexical/nodes/unknownConvertedNode/Component.js.map +0 -1
- package/dist/features/migrations/slateToLexical/nodes/unknownConvertedNode/index.d.ts +0 -33
- package/dist/features/migrations/slateToLexical/nodes/unknownConvertedNode/index.d.ts.map +0 -1
- package/dist/features/migrations/slateToLexical/nodes/unknownConvertedNode/index.js +0 -74
- package/dist/features/migrations/slateToLexical/nodes/unknownConvertedNode/index.js.map +0 -1
- package/dist/lexical/ui/icons/AI/index.d.ts +0 -3
- package/dist/lexical/ui/icons/AI/index.d.ts.map +0 -1
- package/dist/lexical/ui/icons/AI/index.js +0 -34
- package/dist/lexical/ui/icons/AI/index.js.map +0 -1
- package/dist/lexical/ui/icons/Caret/index.svg +0 -3
- package/dist/lexical/ui/icons/Edit/index.svg +0 -10
- package/dist/lexical/ui/icons/Remove/index.svg +0 -4
- package/dist/lexical/utils/guard.d.ts +0 -5
- package/dist/lexical/utils/guard.d.ts.map +0 -1
- package/dist/lexical/utils/guard.js +0 -9
- package/dist/lexical/utils/guard.js.map +0 -1
- package/dist/lexical/utils/url.spec.js +0 -114
- package/dist/lexical/utils/url.spec.js.map +0 -1
- package/dist/nodeTypes.d.ts +0 -74
- package/dist/nodeTypes.d.ts.map +0 -1
- package/dist/nodeTypes.js +0 -5
- package/dist/nodeTypes.js.map +0 -1
- package/dist/packages/@lexical/markdown/LexicalMarkdownHardLineBreak.spec.js +0 -160
- package/dist/packages/@lexical/markdown/LexicalMarkdownHardLineBreak.spec.js.map +0 -1
- package/dist/packages/@lexical/markdown/MarkdownExport.d.ts +0 -14
- package/dist/packages/@lexical/markdown/MarkdownExport.d.ts.map +0 -1
- package/dist/packages/@lexical/markdown/MarkdownExport.js +0 -220
- package/dist/packages/@lexical/markdown/MarkdownExport.js.map +0 -1
- package/dist/packages/@lexical/markdown/MarkdownImport.d.ts +0 -19
- package/dist/packages/@lexical/markdown/MarkdownImport.d.ts.map +0 -1
- package/dist/packages/@lexical/markdown/MarkdownImport.js +0 -199
- package/dist/packages/@lexical/markdown/MarkdownImport.js.map +0 -1
- package/dist/packages/@lexical/markdown/MarkdownShortcuts.d.ts +0 -11
- package/dist/packages/@lexical/markdown/MarkdownShortcuts.d.ts.map +0 -1
- package/dist/packages/@lexical/markdown/MarkdownShortcuts.js +0 -304
- package/dist/packages/@lexical/markdown/MarkdownShortcuts.js.map +0 -1
- package/dist/packages/@lexical/markdown/MarkdownTransformers.d.ts +0 -173
- package/dist/packages/@lexical/markdown/MarkdownTransformers.d.ts.map +0 -1
- package/dist/packages/@lexical/markdown/MarkdownTransformers.js +0 -352
- package/dist/packages/@lexical/markdown/MarkdownTransformers.js.map +0 -1
- package/dist/packages/@lexical/markdown/importTextFormatTransformer.d.ts +0 -22
- package/dist/packages/@lexical/markdown/importTextFormatTransformer.d.ts.map +0 -1
- package/dist/packages/@lexical/markdown/importTextFormatTransformer.js +0 -91
- package/dist/packages/@lexical/markdown/importTextFormatTransformer.js.map +0 -1
- package/dist/packages/@lexical/markdown/importTextMatchTransformer.d.ts +0 -21
- package/dist/packages/@lexical/markdown/importTextMatchTransformer.d.ts.map +0 -1
- package/dist/packages/@lexical/markdown/importTextMatchTransformer.js +0 -54
- package/dist/packages/@lexical/markdown/importTextMatchTransformer.js.map +0 -1
- package/dist/packages/@lexical/markdown/importTextTransformers.d.ts +0 -18
- package/dist/packages/@lexical/markdown/importTextTransformers.d.ts.map +0 -1
- package/dist/packages/@lexical/markdown/importTextTransformers.js +0 -54
- package/dist/packages/@lexical/markdown/importTextTransformers.js.map +0 -1
- package/dist/packages/@lexical/markdown/index.d.ts +0 -29
- package/dist/packages/@lexical/markdown/index.d.ts.map +0 -1
- package/dist/packages/@lexical/markdown/index.js +0 -39
- package/dist/packages/@lexical/markdown/index.js.map +0 -1
- package/dist/packages/@lexical/markdown/utils.d.ts +0 -34
- package/dist/packages/@lexical/markdown/utils.d.ts.map +0 -1
- package/dist/packages/@lexical/markdown/utils.js +0 -267
- package/dist/packages/@lexical/markdown/utils.js.map +0 -1
- package/dist/types.d.ts.map +0 -1
- package/dist/types.js +0 -2
- package/dist/types.js.map +0 -1
- package/dist/utilities/jsx/jsx.spec.js +0 -178
- package/dist/utilities/jsx/jsx.spec.js.map +0 -1
- package/dist/utilities/migrateSlateToLexical/index.d.ts +0 -15
- package/dist/utilities/migrateSlateToLexical/index.d.ts.map +0 -1
- package/dist/utilities/migrateSlateToLexical/index.js +0 -152
- package/dist/utilities/migrateSlateToLexical/index.js.map +0 -1
- package/dist/utilities/migrateSlateToLexical/migrateDocumentFieldsRecursively.d.ts +0 -10
- package/dist/utilities/migrateSlateToLexical/migrateDocumentFieldsRecursively.d.ts.map +0 -1
- package/dist/utilities/migrateSlateToLexical/migrateDocumentFieldsRecursively.js +0 -85
- package/dist/utilities/migrateSlateToLexical/migrateDocumentFieldsRecursively.js.map +0 -1
- /package/dist/exports/client/{componentInline-A4H3EY3L.js.map → componentInline-HNE5G4TE.js.map} +0 -0
- /package/dist/features/{experimental_table → table}/client/index.d.ts +0 -0
- /package/dist/features/{experimental_table → table}/client/plugins/TableActionMenuPlugin/computeSelectionCount.d.ts +0 -0
- /package/dist/features/{experimental_table → table}/client/plugins/TableActionMenuPlugin/computeSelectionCount.js +0 -0
- /package/dist/features/{experimental_table → table}/client/plugins/TableHoverActionsPlugin/index.d.ts +0 -0
- /package/dist/features/{experimental_table → table}/client/utils/debounce.d.ts +0 -0
- /package/dist/features/{experimental_table → table}/client/utils/debounce.js +0 -0
- /package/dist/features/{experimental_table → table}/client/utils/useDebounce.d.ts +0 -0
- /package/dist/features/{experimental_table → table}/client/utils/useDebounce.js +0 -0
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/field/Field.tsx", "../../../src/lexical/LexicalProvider.tsx", "../../../src/lexical/LexicalEditor.tsx", "../../../src/lexical/EditorPlugin.tsx", "../../../src/lexical/plugins/ClipboardPlugin/index.tsx", "../../../src/lexical/plugins/DecoratorPlugin/index.tsx", "../../../src/lexical/plugins/handles/AddBlockHandlePlugin/index.tsx", "../../../src/lexical/plugins/handles/utils/calculateDistanceFromScrollerElem.ts", "../../../src/lexical/plugins/handles/utils/getNodeCloseToPoint.ts", "../../../src/lexical/plugins/handles/DraggableBlockPlugin/getBoundingRectWithoutTransform.ts", "../../../src/lexical/plugins/handles/utils/getCollapsedMargins.ts", "../../../src/lexical/plugins/handles/utils/getTopLevelNodeKeys.ts", "../../../src/lexical/plugins/handles/utils/isOnHandleElement.ts", "../../../src/lexical/plugins/handles/utils/doesLineHeightAffectElement.ts", "../../../src/lexical/plugins/handles/utils/setHandlePosition.ts", "../../../src/lexical/plugins/handles/DraggableBlockPlugin/index.tsx", "../../../src/lexical/plugins/handles/DraggableBlockPlugin/setTargetLine.ts", "../../../src/lexical/plugins/handles/DraggableBlockPlugin/useKeyboardReordering.ts", "../../../src/lexical/plugins/InsertParagraphAtEnd/index.tsx", "../../../src/lexical/plugins/MarkdownShortcut/index.tsx", "../../../src/lexical/plugins/NodeViewOverridePlugin/index.tsx", "../../../src/lexical/plugins/NormalizeSelection/index.tsx", "../../../src/lexical/plugins/SelectAllPlugin/index.tsx", "../../../src/lexical/plugins/SlashMenu/index.tsx", "../../../src/lexical/plugins/SlashMenu/useMenuTriggerMatch.ts", "../../../src/lexical/plugins/TextPlugin/index.tsx", "../../../src/lexical/ui/ContentEditable.tsx", "../../../src/field/ViewSelector.tsx"],
|
|
4
|
+
"sourcesContent": ["'use client'\nimport type { EditorState, SerializedEditorState } from 'lexical'\nimport type { FallbackProps } from 'react-error-boundary'\n\nimport { getTranslation } from '@payloadcms/translations'\nimport {\n BulkUploadProvider,\n FieldDescription,\n FieldError,\n FieldLabel,\n isFieldRTL,\n RenderCustomComponent,\n useConfig,\n useEditDepth,\n useEffectEvent,\n useField,\n useLocale,\n useTranslation,\n} from '@payloadcms/ui'\nimport { mergeFieldStyles } from '@payloadcms/ui/shared'\nimport { dequal } from 'dequal/lite'\nimport { type Validate } from 'payload'\nimport React, { useCallback, useEffect, useMemo, useState } from 'react'\nimport { ErrorBoundary } from 'react-error-boundary'\n\nimport type { SanitizedClientEditorConfig } from '../lexical/config/types.js'\n\nimport '../lexical/theme/EditorTheme.css'\nimport './bundled.css'\nimport './index.css'\n\nimport type { LexicalRichTextFieldProps } from '../types/index.js'\n\nimport { LexicalProvider } from '../lexical/LexicalProvider.js'\nimport { useRunDeprioritized } from '../utilities/useRunDeprioritized.js'\nimport { useRichTextView } from './RichTextViewProvider.js'\nimport { ViewSelector } from './ViewSelector.js'\n\nconst baseClass = 'rich-text-lexical'\n\nconst RichTextComponent: React.FC<\n {\n readonly editorConfig: SanitizedClientEditorConfig // With rendered features n stuff\n } & LexicalRichTextFieldProps\n> = (props) => {\n const {\n editorConfig,\n field,\n field: {\n admin: { className, description, readOnly: readOnlyFromAdmin } = {},\n label,\n localized,\n required,\n },\n path: pathFromProps,\n readOnly: readOnlyFromTopLevelProps,\n schemaPath,\n validate, // Users can pass in client side validation if they WANT to, but it's not required anymore\n } = props\n\n const { i18n } = useTranslation()\n\n const readOnlyFromProps = readOnlyFromTopLevelProps || readOnlyFromAdmin\n\n const locale = useLocale()\n const {\n config: { localization: localizationConfig },\n } = useConfig()\n\n const rtl = isFieldRTL({\n fieldLocalized: localized,\n locale,\n localizationConfig: localizationConfig || undefined,\n })\n\n const editDepth = useEditDepth()\n const { isControlledByParent } = useRichTextView()\n\n const memoizedValidate = useCallback<Validate>(\n (value, validationOptions) => {\n if (typeof validate === 'function') {\n // @ts-expect-error - vestiges of when tsconfig was not strict. Feel free to improve\n return validate(value, { ...validationOptions, required })\n }\n return true\n },\n // Important: do not add props to the dependencies array.\n // This would cause an infinite loop and endless re-rendering.\n // Removing props from the dependencies array fixed this issue: https://github.com/payloadcms/payload/issues/3709\n [validate, required],\n )\n\n const {\n customComponents: { AfterInput, BeforeInput, Description, Error, Label } = {},\n disabled: disabledFromField,\n initialValue,\n path,\n setValue,\n showError,\n value,\n } = useField<SerializedEditorState>({\n potentiallyStalePath: pathFromProps,\n validate: memoizedValidate,\n })\n\n const disabled = readOnlyFromProps || disabledFromField\n\n const [isSmallWidthViewport, setIsSmallWidthViewport] = useState<boolean>(false)\n const [rerenderProviderKey, setRerenderProviderKey] = useState<Date>()\n\n const prevInitialValueRef = React.useRef<SerializedEditorState | undefined>(initialValue)\n const prevValueRef = React.useRef<SerializedEditorState | undefined>(value)\n\n useEffect(() => {\n const updateViewPortWidth = () => {\n const isNextSmallWidthViewport = window.matchMedia('(max-width: 768px)').matches\n\n if (isNextSmallWidthViewport !== isSmallWidthViewport) {\n setIsSmallWidthViewport(isNextSmallWidthViewport)\n }\n }\n updateViewPortWidth()\n window.addEventListener('resize', updateViewPortWidth)\n\n return () => {\n window.removeEventListener('resize', updateViewPortWidth)\n }\n }, [isSmallWidthViewport])\n\n const classes = [\n 'field-type',\n baseClass,\n className,\n showError && 'error',\n disabled && `${baseClass}--read-only`,\n editorConfig?.admin?.hideGutter !== true && !isSmallWidthViewport\n ? `${baseClass}--show-gutter`\n : null,\n ]\n .filter(Boolean)\n .join(' ')\n\n const pathWithEditDepth = `${path}.${editDepth}`\n\n const runDeprioritized = useRunDeprioritized() // defaults to 500 ms timeout\n\n const handleChange = useCallback(\n (editorState: EditorState) => {\n // Capture `editorState` in the closure so we can safely run later.\n const updateFieldValue = () => {\n const newState = editorState.toJSON()\n prevValueRef.current = newState\n setValue(newState)\n }\n\n // Queue the update for the browser’s idle time (or Safari shim)\n // and let the hook handle debouncing/cancellation.\n void runDeprioritized(updateFieldValue)\n },\n [setValue, runDeprioritized], // `runDeprioritized` is stable (useCallback inside hook)\n )\n\n const styles = useMemo(() => mergeFieldStyles(field), [field])\n\n const handleInitialValueChange = useEffectEvent(\n (initialValue: SerializedEditorState | undefined) => {\n // Object deep equality check here, as re-mounting the editor if\n // the new value is the same as the old one is not necessary.\n // In postgres, the order of keys in JSON objects is not guaranteed to be preserved,\n // so we need to do a deep equality check here that does not care about key order => we use dequal.\n // If we used JSON.stringify, the editor would re-mount every time you save the document, as the order of keys changes => change detected => re-mount.\n if (\n prevValueRef.current !== value &&\n !dequal(\n prevValueRef.current != null\n ? JSON.parse(JSON.stringify(prevValueRef.current))\n : prevValueRef.current,\n value,\n )\n ) {\n prevInitialValueRef.current = initialValue\n prevValueRef.current = value\n setRerenderProviderKey(new Date())\n }\n },\n )\n\n useEffect(() => {\n // Needs to trigger for object reference changes - otherwise,\n // reacting to the same initial value change twice will cause\n // the second change to be ignored, even though the value has changed.\n // That's because initialValue is not kept up-to-date\n if (!Object.is(initialValue, prevInitialValueRef.current)) {\n handleInitialValueChange(initialValue)\n }\n }, [initialValue])\n\n return (\n <div\n aria-label={getTranslation(label || '', i18n)}\n className={classes}\n data-field-path={path}\n data-field-schemapath={schemaPath}\n data-lexical-view={editorConfig?.view}\n key={pathWithEditDepth}\n role=\"group\"\n style={styles}\n >\n <div className={`${baseClass}__label-row`}>\n {Label || (\n <FieldLabel\n hasRequiredAccessibleState\n label={label}\n localized={localized}\n path={path}\n required={required}\n />\n )}\n {!isControlledByParent && <ViewSelector />}\n </div>\n <div className={`${baseClass}__wrap`}>\n <RenderCustomComponent\n CustomComponent={Error}\n Fallback={<FieldError path={path} showError={showError} />}\n />\n <ErrorBoundary fallbackRender={fallbackRender} onReset={() => {}}>\n {BeforeInput}\n <div className={`${baseClass}__editor-content`}>\n {/* Lexical may be in a drawer. We need to define another BulkUploadProvider to ensure that the bulk upload drawer\n is rendered in the correct depth (not displayed *behind* the current drawer).\n The `lexical-` prefix prevents drawer-slug collisions with non-lexical `BulkUploadProvider`s up the tree. */}\n <BulkUploadProvider modalSlugPrefix={`lexical-${path}`}>\n <LexicalProvider\n composerKey={pathWithEditDepth}\n editorConfig={editorConfig}\n fieldProps={props}\n isSmallWidthViewport={isSmallWidthViewport}\n key={JSON.stringify({ path, rerenderProviderKey })} // makes sure lexical is completely re-rendered when initialValue changes, bypassing the lexical-internal value memoization. That way, external changes to the form will update the editor. More infos in PR description (https://github.com/payloadcms/payload/pull/5010)\n onChange={handleChange}\n readOnly={disabled}\n rtl={rtl}\n value={value}\n />\n </BulkUploadProvider>\n </div>\n {AfterInput}\n </ErrorBoundary>\n <RenderCustomComponent\n CustomComponent={Description}\n Fallback={<FieldDescription description={description} path={path} />}\n />\n </div>\n </div>\n )\n}\n\nfunction fallbackRender({ error }: FallbackProps) {\n return (\n <div className=\"errorBoundary\" role=\"alert\">\n <p>Something went wrong:</p>\n <pre style={{ color: 'red' }}>{error instanceof Error ? error.message : String(error)}</pre>\n </div>\n )\n}\n\nexport const RichText: typeof RichTextComponent = RichTextComponent\n", "'use client'\nimport type { InitialConfigType } from '@lexical/react/LexicalComposer.js'\nimport type { EditorState, LexicalEditor, SerializedEditorState } from 'lexical'\n\nimport { LexicalComposer } from '@lexical/react/LexicalComposer.js'\nimport { useEditDepth } from '@payloadcms/ui'\nimport * as React from 'react'\nimport { useMemo } from 'react'\n\nimport type { LexicalRichTextFieldProps } from '../types/index.js'\nimport type { SanitizedClientEditorConfig } from './config/types.js'\n\nimport { useRichTextView } from '../field/RichTextViewProvider.js'\nimport {\n EditorConfigProvider,\n useEditorConfigContext,\n} from './config/client/EditorConfigProvider.js'\nimport { LexicalEditor as LexicalEditorComponent } from './LexicalEditor.js'\nimport { getEnabledNodes } from './nodes/index.js'\n\nexport type LexicalProviderProps = {\n composerKey: string\n editorConfig: SanitizedClientEditorConfig\n fieldProps: LexicalRichTextFieldProps\n isSmallWidthViewport: boolean\n onChange: (editorState: EditorState, editor: LexicalEditor, tags: Set<string>) => void\n readOnly: boolean\n rtl?: boolean\n value: SerializedEditorState\n}\n\nconst NestProviders = ({\n children,\n providers,\n}: {\n children: React.ReactNode\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n providers: any[]\n}) => {\n if (!providers?.length) {\n return children\n }\n const Component = providers[0]\n if (providers.length > 1) {\n return (\n <Component>\n <NestProviders providers={providers.slice(1)}>{children}</NestProviders>\n </Component>\n )\n }\n return <Component>{children}</Component>\n}\n\nexport const LexicalProvider: React.FC<LexicalProviderProps> = (props) => {\n const {\n composerKey,\n editorConfig,\n fieldProps,\n isSmallWidthViewport,\n onChange,\n readOnly,\n rtl,\n value,\n } = props\n\n const { currentView, views } = useRichTextView()\n\n const parentContext = useEditorConfigContext()\n\n const editDepth = useEditDepth()\n\n const editorContainerRef = React.useRef<HTMLDivElement>(null)\n\n // useMemo for the initialConfig that depends on readOnly and value\n const initialConfig = useMemo<InitialConfigType>(() => {\n if (value && typeof value !== 'object') {\n throw new Error(\n 'The value passed to the Lexical editor is not an object. This is not supported. Please remove the data from the field and start again. This is the value that was passed in: ' +\n JSON.stringify(value),\n )\n }\n\n if (value && Array.isArray(value) && !('root' in value)) {\n throw new Error(\n 'You have tried to pass in data from the old Slate editor to the new Lexical editor. The data structure is different, thus you will have to migrate your data. We offer a one-line migration script which migrates all your rich text fields: https://payloadcms.com/docs/lexical/migration#migration-via-migration-script-recommended',\n )\n }\n\n if (value && 'jsonContent' in value) {\n throw new Error(\n 'You have tried to pass in data from payload-plugin-lexical. The data structure is different, thus you will have to migrate your data. Migration guide: https://payloadcms.com/docs/lexical/migration#migrating-from-payload-plugin-lexical',\n )\n }\n\n // Use the 'default' view if available, otherwise undefined\n const nodeViews = views?.[currentView]?.nodes\n\n return {\n editable: readOnly !== true,\n editorState: value != null ? JSON.stringify(value) : undefined,\n namespace: editorConfig.lexical.namespace,\n nodes: getEnabledNodes({\n editorConfig,\n nodeViews,\n }),\n onError: (error: Error) => {\n throw error\n },\n theme: editorConfig.lexical.theme,\n }\n // Important: do not add readOnly and value to the dependencies array. This will cause the entire lexical editor to re-render if the document is saved, which will\n // cause the editor to lose focus.\n }, [editorConfig, views, currentView])\n\n if (!initialConfig) {\n return <p>Loading...</p>\n }\n\n // We need to add initialConfig.editable to the key to force a re-render when the readOnly prop changes.\n // Without it, there were cases where lexical editors inside drawers turn readOnly initially - a few miliseconds later they turn editable, but the editor does not re-render and stays readOnly.\n // We also add currentView to force re-render when the view changes.\n return (\n <LexicalComposer\n initialConfig={initialConfig}\n key={composerKey + initialConfig.editable + currentView}\n >\n <EditorConfigProvider\n editorConfig={editorConfig}\n editorContainerRef={editorContainerRef}\n fieldProps={fieldProps}\n /**\n * Parent editor is not truly the parent editor, if the current editor is part of a drawer and the parent editor is the main editor.\n */\n parentContext={parentContext?.editDepth === editDepth ? parentContext : undefined}\n >\n <NestProviders providers={editorConfig.features.providers}>\n <LexicalEditorComponent\n editorConfig={editorConfig}\n editorContainerRef={editorContainerRef}\n isSmallWidthViewport={isSmallWidthViewport}\n onChange={onChange}\n rtl={rtl}\n />\n </NestProviders>\n </EditorConfigProvider>\n </LexicalComposer>\n )\n}\n", "'use client'\nimport { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext.js'\nimport { LexicalErrorBoundary } from '@lexical/react/LexicalErrorBoundary.js'\nimport { HistoryPlugin } from '@lexical/react/LexicalHistoryPlugin.js'\nimport { OnChangePlugin } from '@lexical/react/LexicalOnChangePlugin.js'\nimport { RichTextPlugin } from '@lexical/react/LexicalRichTextPlugin.js'\nimport { useLexicalEditable } from '@lexical/react/useLexicalEditable'\nimport { useTranslation } from '@payloadcms/ui'\nimport { BLUR_COMMAND, COMMAND_PRIORITY_LOW, FOCUS_COMMAND } from 'lexical'\nimport * as React from 'react'\nimport { useEffect, useState } from 'react'\n\nimport type { LexicalProviderProps } from './LexicalProvider.js'\n\nimport { useEditorConfigContext } from './config/client/EditorConfigProvider.js'\nimport './LexicalEditor.css'\nimport { EditorPlugin } from './EditorPlugin.js'\nimport { ClipboardPlugin } from './plugins/ClipboardPlugin/index.js'\nimport { DecoratorPlugin } from './plugins/DecoratorPlugin/index.js'\nimport { AddBlockHandlePlugin } from './plugins/handles/AddBlockHandlePlugin/index.js'\nimport { DraggableBlockPlugin } from './plugins/handles/DraggableBlockPlugin/index.js'\nimport { InsertParagraphAtEndPlugin } from './plugins/InsertParagraphAtEnd/index.js'\nimport { MarkdownShortcutPlugin } from './plugins/MarkdownShortcut/index.js'\nimport { NodeViewOverridePlugin } from './plugins/NodeViewOverridePlugin/index.js'\nimport { NormalizeSelectionPlugin } from './plugins/NormalizeSelection/index.js'\nimport { SelectAllPlugin } from './plugins/SelectAllPlugin/index.js'\nimport { SlashMenuPlugin } from './plugins/SlashMenu/index.js'\nimport { TextPlugin } from './plugins/TextPlugin/index.js'\nimport { LexicalContentEditable } from './ui/ContentEditable.js'\n\nexport const LexicalEditor: React.FC<\n {\n editorContainerRef: React.RefObject<HTMLDivElement | null>\n isSmallWidthViewport: boolean\n } & Pick<LexicalProviderProps, 'editorConfig' | 'onChange' | 'rtl'>\n> = (props) => {\n const { editorConfig, editorContainerRef, isSmallWidthViewport, onChange, rtl } = props\n const editorConfigContext = useEditorConfigContext()\n const [editor] = useLexicalComposerContext()\n const isEditable = useLexicalEditable()\n const { t } = useTranslation<Record<string, never>, string>()\n const instructionsID = React.useId()\n const hasTabIndentation = isEditable && editorConfig.features.enabledFeatures.includes('indent')\n\n const [floatingAnchorElem, setFloatingAnchorElem] = useState<HTMLDivElement | null>(null)\n const onRef = (_floatingAnchorElem: HTMLDivElement) => {\n if (_floatingAnchorElem !== null) {\n setFloatingAnchorElem(_floatingAnchorElem)\n }\n }\n\n useEffect(() => {\n if (!editorConfigContext?.uuid) {\n console.error('Lexical Editor must be used within an EditorConfigProvider')\n return\n }\n if (editorConfigContext?.parentEditor?.uuid) {\n editorConfigContext.parentEditor?.registerChild(editorConfigContext.uuid, editorConfigContext)\n }\n\n const handleFocus = () => {\n editorConfigContext.focusEditor(editorConfigContext)\n }\n\n const handleBlur = () => {\n editorConfigContext.blurEditor(editorConfigContext)\n }\n\n const unregisterFocus = editor.registerCommand(\n FOCUS_COMMAND,\n () => {\n handleFocus()\n return true\n },\n COMMAND_PRIORITY_LOW,\n )\n\n const unregisterBlur = editor.registerCommand(\n BLUR_COMMAND,\n () => {\n handleBlur()\n return true\n },\n COMMAND_PRIORITY_LOW,\n )\n\n return () => {\n unregisterFocus()\n unregisterBlur()\n editorConfigContext.parentEditor?.unregisterChild?.(editorConfigContext.uuid)\n }\n }, [editor, editorConfigContext])\n\n return (\n <React.Fragment>\n {editorConfig.features.plugins?.map((plugin) => {\n if (plugin.position === 'aboveContainer') {\n return <EditorPlugin clientProps={plugin.clientProps} key={plugin.key} plugin={plugin} />\n }\n })}\n <div className=\"editor-container\" dir={rtl ? 'rtl' : undefined} ref={editorContainerRef}>\n {editorConfig.features.plugins?.map((plugin) => {\n if (plugin.position === 'top') {\n return (\n <EditorPlugin clientProps={plugin.clientProps} key={plugin.key} plugin={plugin} />\n )\n }\n })}\n <RichTextPlugin\n contentEditable={\n <div className=\"editor-scroller\">\n <div className=\"editor\" ref={onRef}>\n <LexicalContentEditable\n editorConfig={editorConfig}\n instructionsID={hasTabIndentation ? instructionsID : undefined}\n />\n </div>\n </div>\n }\n ErrorBoundary={LexicalErrorBoundary}\n />\n <NormalizeSelectionPlugin />\n {isEditable && <InsertParagraphAtEndPlugin />}\n <DecoratorPlugin />\n <ClipboardPlugin />\n <TextPlugin features={editorConfig.features} />\n <SelectAllPlugin />\n <NodeViewOverridePlugin />\n {isEditable && (\n <OnChangePlugin\n // Selection changes can be ignored here, reducing the\n // frequency that the FieldComponent and Payload receive updates.\n // Selection changes are only needed if you are saving selection state\n ignoreSelectionChange\n onChange={(editorState, editor, tags) => {\n // Ignore any onChange event triggered by focus only\n if (!tags.has('focus') || tags.size > 1) {\n if (onChange != null) {\n onChange(editorState, editor, tags)\n }\n }\n }}\n />\n )}\n {floatingAnchorElem && (\n <React.Fragment>\n {!isSmallWidthViewport && isEditable && (\n <React.Fragment>\n {editorConfig.admin?.hideDraggableBlockElement ? null : (\n <DraggableBlockPlugin anchorElem={floatingAnchorElem} />\n )}\n {editorConfig.admin?.hideAddBlockButton ? null : (\n <AddBlockHandlePlugin anchorElem={floatingAnchorElem} />\n )}\n </React.Fragment>\n )}\n {editorConfig.features.plugins?.map((plugin) => {\n if (\n plugin.position === 'floatingAnchorElem' &&\n !(plugin.desktopOnly === true && isSmallWidthViewport)\n ) {\n return (\n <EditorPlugin\n anchorElem={floatingAnchorElem}\n clientProps={plugin.clientProps}\n key={plugin.key}\n plugin={plugin}\n />\n )\n }\n })}\n {isEditable && (\n <React.Fragment>\n <SlashMenuPlugin anchorElem={floatingAnchorElem} />\n </React.Fragment>\n )}\n </React.Fragment>\n )}\n {isEditable && (\n <React.Fragment>\n <HistoryPlugin />\n {editorConfig?.features?.markdownTransformers?.length > 0 && <MarkdownShortcutPlugin />}\n </React.Fragment>\n )}\n {editorConfig.features.plugins?.map((plugin) => {\n if (plugin.position === 'normal') {\n return (\n <EditorPlugin clientProps={plugin.clientProps} key={plugin.key} plugin={plugin} />\n )\n }\n })}\n {editorConfig.features.plugins?.map((plugin) => {\n if (plugin.position === 'bottom') {\n return (\n <EditorPlugin clientProps={plugin.clientProps} key={plugin.key} plugin={plugin} />\n )\n }\n })}\n </div>\n {hasTabIndentation && (\n <p className=\"ContentEditable__keyboard-hint\" id={instructionsID}>\n {t('lexical:indent:keyboardHint')}\n </p>\n )}\n {editorConfig.features.plugins?.map((plugin) => {\n if (plugin.position === 'belowContainer') {\n return <EditorPlugin clientProps={plugin.clientProps} key={plugin.key} plugin={plugin} />\n }\n })}\n </React.Fragment>\n )\n}\n", "'use client'\nimport React from 'react'\n\nimport type { SanitizedPlugin } from '../features/typesClient.js'\n\nexport const EditorPlugin: React.FC<{\n anchorElem?: HTMLDivElement\n clientProps: unknown\n plugin: SanitizedPlugin\n}> = ({ anchorElem, clientProps, plugin }) => {\n if (plugin.position === 'floatingAnchorElem' && anchorElem) {\n return (\n plugin.Component && <plugin.Component anchorElem={anchorElem} clientProps={clientProps} />\n )\n }\n\n // @ts-expect-error - ts is not able to infer that plugin.Component is of type PluginComponent\n return plugin.Component && <plugin.Component clientProps={clientProps} />\n}\n", "'use client'\n\nimport { copyToClipboard } from '@lexical/clipboard'\nimport { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext.js'\nimport { objectKlassEquals } from '@lexical/utils'\nimport ObjectID from 'bson-objectid'\nimport { $getSelection, $isNodeSelection, COMMAND_PRIORITY_LOW, COPY_COMMAND } from 'lexical'\nimport { useEffect } from 'react'\n\ntype SerializedUnknownLexicalNode = {\n children?: SerializedUnknownLexicalNode[]\n type: string\n}\n\ntype LexicalClipboardData = {\n namespace: string\n nodes: SerializedUnknownLexicalNode[]\n}\n\nconst changeIds = (node: SerializedUnknownLexicalNode) => {\n if (\n 'fields' in node &&\n typeof node.fields === 'object' &&\n node.fields !== null &&\n 'id' in node.fields\n ) {\n node.fields.id = new ObjectID.default().toHexString()\n } else if ('id' in node) {\n node.id = new ObjectID.default().toHexString()\n }\n\n if (node.children) {\n for (const child of node.children) {\n changeIds(child)\n }\n }\n}\n\nexport function ClipboardPlugin() {\n const [editor] = useLexicalComposerContext()\n\n useEffect(() => {\n // Remove duplicated ids from clipboard. We do it here because:\n // 1. Browsers do not allow setting the clipboardData in paste event for security reasons.\n // 2. If you cut instead of paste, the id will be kept, which is a good thing.\n return editor.registerCommand(\n COPY_COMMAND,\n (event) => {\n // Handle decorator node case\n const selection = $getSelection()\n if ($isNodeSelection(selection)) {\n const node = selection.getNodes()[0]\n\n const serializedNode = node?.exportJSON() as SerializedUnknownLexicalNode\n const deepCloneSerializedNode = JSON.parse(JSON.stringify(serializedNode))\n changeIds(deepCloneSerializedNode)\n\n const lexicalClipboardData: LexicalClipboardData = {\n namespace: editor._config.namespace,\n nodes: [deepCloneSerializedNode],\n }\n\n const stringifiedLexicalClipboardData = JSON.stringify(lexicalClipboardData)\n\n copyToClipboard(editor, null, {\n 'application/x-lexical-editor': stringifiedLexicalClipboardData,\n 'text/plain': '',\n }).catch((error) => {\n throw error\n })\n return true\n }\n\n // Handle range selection case\n copyToClipboard(editor, objectKlassEquals(event, ClipboardEvent) ? event : null)\n .then(() => {\n if (!(event instanceof ClipboardEvent) || !event.clipboardData) {\n throw new Error('No clipboard event')\n }\n const lexicalStringified = event.clipboardData.getData('application/x-lexical-editor')\n if (!lexicalStringified) {\n return true\n }\n\n const lexical = JSON.parse(lexicalStringified) as {\n nodes: SerializedUnknownLexicalNode[]\n }\n\n for (const node of lexical.nodes) {\n changeIds(node)\n }\n const stringified = JSON.stringify(lexical)\n event.clipboardData.setData('application/x-lexical-editor', stringified)\n })\n .catch((error) => {\n if (event instanceof ClipboardEvent) {\n event.clipboardData?.setData('application/x-lexical-editor', '')\n }\n throw error\n })\n return true\n },\n COMMAND_PRIORITY_LOW,\n )\n }, [editor])\n\n return null\n}\n", "'use client'\n\nimport type { DecoratorNode, ElementNode, LexicalNode } from 'lexical'\n\nimport { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext'\nimport { $findMatchingParent, mergeRegister } from '@lexical/utils'\nimport {\n $createNodeSelection,\n $getEditor,\n $getNearestNodeFromDOMNode,\n $getSelection,\n $isDecoratorNode,\n $isElementNode,\n $isLineBreakNode,\n $isNodeSelection,\n $isRangeSelection,\n $isRootOrShadowRoot,\n $isTextNode,\n $onUpdate,\n $setSelection,\n CLICK_COMMAND,\n COMMAND_PRIORITY_LOW,\n KEY_ARROW_DOWN_COMMAND,\n KEY_ARROW_UP_COMMAND,\n KEY_BACKSPACE_COMMAND,\n KEY_DELETE_COMMAND,\n SELECTION_CHANGE_COMMAND,\n} from 'lexical'\nimport { useEffect } from 'react'\n\nimport './index.css'\n\n// TODO: This should ideally be fixed in Lexical. See\n// https://github.com/facebook/lexical/pull/7072\nexport function DecoratorPlugin() {\n const [editor] = useLexicalComposerContext()\n\n const $onDelete = (event: KeyboardEvent) => {\n const selection = $getSelection()\n if (!$isNodeSelection(selection)) {\n return false\n }\n event.preventDefault()\n selection.getNodes().forEach((node) => {\n node.remove()\n })\n return true\n }\n\n useEffect(() => {\n return mergeRegister(\n editor.registerCommand(\n CLICK_COMMAND,\n (event) => {\n document.querySelector('.decorator-selected')?.classList.remove('decorator-selected')\n const decorator = $getDecoratorByMouseEvent(event)\n if (!decorator) {\n return true\n }\n const { target } = event\n const isInteractive =\n !(target instanceof HTMLElement) ||\n target.isContentEditable ||\n target.closest(\n 'button, textarea, input, .react-select, .code-editor, .no-select-decorator, [role=\"button\"]',\n )\n if (isInteractive) {\n $setSelection(null)\n } else {\n $selectDecorator(decorator)\n }\n return true\n },\n COMMAND_PRIORITY_LOW,\n ),\n editor.registerCommand(KEY_DELETE_COMMAND, $onDelete, COMMAND_PRIORITY_LOW),\n editor.registerCommand(KEY_BACKSPACE_COMMAND, $onDelete, COMMAND_PRIORITY_LOW),\n editor.registerCommand(\n SELECTION_CHANGE_COMMAND,\n (_, activeEditor) => {\n // Nested editors reconcile independently and update their own highlight.\n if (activeEditor !== editor) {\n return false\n }\n const hasSelectedDecorator = Boolean($getSelectedDecorator())\n $onUpdate(() => {\n activeEditor.read('latest', () => {\n const decorator = $getSelectedDecorator()\n document.querySelector('.decorator-selected')?.classList.remove('decorator-selected')\n if (decorator) {\n activeEditor\n .getElementByKey(decorator.getKey())\n ?.classList.add('decorator-selected')\n }\n })\n })\n return hasSelectedDecorator\n },\n COMMAND_PRIORITY_LOW,\n ),\n editor.registerCommand(\n KEY_ARROW_UP_COMMAND,\n (event) => {\n // CASE 1: Node selection\n const selection = $getSelection()\n if ($isNodeSelection(selection)) {\n const prevSibling = selection.getNodes()[0]?.getPreviousSibling()\n if ($isDecoratorNode(prevSibling)) {\n const element = $getEditor().getElementByKey(prevSibling.getKey())\n if (element) {\n $selectDecorator({ element, node: prevSibling })\n event.preventDefault()\n return true\n }\n return false\n }\n if (!$isElementNode(prevSibling)) {\n return false\n }\n const lastDescendant = prevSibling.getLastDescendant() ?? prevSibling\n if (!lastDescendant) {\n return false\n }\n const block = $findMatchingParent(lastDescendant, INTERNAL_$isBlock)\n block?.selectStart()\n event.preventDefault()\n return true\n }\n if (!$isRangeSelection(selection)) {\n return false\n }\n\n // CASE 2: Range selection\n // Get first selected block\n const firstPoint = selection.isBackward() ? selection.anchor : selection.focus\n const firstNode = firstPoint.getNode()\n const firstSelectedBlock = $findMatchingParent(firstNode, (node) => {\n return findFirstSiblingBlock(node) !== null\n })\n const prevBlock = firstSelectedBlock?.getPreviousSibling()\n if (!firstSelectedBlock || prevBlock !== findFirstSiblingBlock(firstSelectedBlock)) {\n return false\n }\n\n if ($isDecoratorNode(prevBlock)) {\n const prevBlockElement = $getEditor().getElementByKey(prevBlock.getKey())\n if (prevBlockElement) {\n $selectDecorator({ element: prevBlockElement, node: prevBlock })\n event.preventDefault()\n return true\n }\n }\n\n return false\n },\n COMMAND_PRIORITY_LOW,\n ),\n editor.registerCommand(\n KEY_ARROW_DOWN_COMMAND,\n (event) => {\n // CASE 1: Node selection\n const selection = $getSelection()\n if ($isNodeSelection(selection)) {\n event.preventDefault()\n const nextSibling = selection.getNodes()[0]?.getNextSibling()\n if ($isDecoratorNode(nextSibling)) {\n const element = $getEditor().getElementByKey(nextSibling.getKey())\n if (element) {\n $selectDecorator({ element, node: nextSibling })\n }\n return true\n }\n if (!$isElementNode(nextSibling)) {\n return true\n }\n const firstDescendant = nextSibling.getFirstDescendant() ?? nextSibling\n if (!firstDescendant) {\n return true\n }\n const block = $findMatchingParent(firstDescendant, INTERNAL_$isBlock)\n block?.selectEnd()\n event.preventDefault()\n return true\n }\n if (!$isRangeSelection(selection)) {\n return false\n }\n\n // CASE 2: Range selection\n // Get last selected block\n const lastPoint = selection.isBackward() ? selection.anchor : selection.focus\n const lastNode = lastPoint.getNode()\n const lastSelectedBlock = $findMatchingParent(lastNode, (node) => {\n return findLaterSiblingBlock(node) !== null\n })\n const nextBlock = lastSelectedBlock?.getNextSibling()\n if (!lastSelectedBlock || nextBlock !== findLaterSiblingBlock(lastSelectedBlock)) {\n return false\n }\n\n if ($isDecoratorNode(nextBlock)) {\n const nextBlockElement = $getEditor().getElementByKey(nextBlock.getKey())\n if (nextBlockElement) {\n $selectDecorator({ element: nextBlockElement, node: nextBlock })\n event.preventDefault()\n return true\n }\n }\n\n return false\n },\n COMMAND_PRIORITY_LOW,\n ),\n )\n }, [editor])\n\n return null\n}\n\nfunction $getDecoratorByMouseEvent(\n event: MouseEvent,\n): { element: HTMLElement; node: DecoratorNode<unknown> } | undefined {\n if (!(event.target instanceof HTMLElement)) {\n return undefined\n }\n const element = event.target.closest('[data-lexical-decorator=\"true\"]')\n if (!(element instanceof HTMLElement)) {\n return undefined\n }\n const node = $getNearestNodeFromDOMNode(element)\n return $isDecoratorNode(node) ? { element, node } : undefined\n}\n\nfunction $getSelectedDecorator() {\n const selection = $getSelection()\n if (!$isNodeSelection(selection)) {\n return undefined\n }\n const nodes = selection.getNodes()\n if (nodes.length !== 1) {\n return undefined\n }\n const node = nodes[0]\n return $isDecoratorNode(node) ? node : undefined\n}\n\nfunction $selectDecorator({\n element,\n node,\n}: {\n element: HTMLElement\n node: DecoratorNode<unknown>\n}) {\n document.querySelector('.decorator-selected')?.classList.remove('decorator-selected')\n const selection = $createNodeSelection()\n selection.add(node.getKey())\n $setSelection(selection)\n element.scrollIntoView({ behavior: 'smooth', block: 'nearest' })\n element.classList.add('decorator-selected')\n}\n\n/**\n * Copied from https://github.com/facebook/lexical/blob/main/packages/lexical/src/LexicalUtils.ts\n *\n * This function returns true for a DecoratorNode that is not inline OR\n * an ElementNode that is:\n * - not a root or shadow root\n * - not inline\n * - can't be empty\n * - has no children or an inline first child\n */\nexport function INTERNAL_$isBlock(node: LexicalNode): node is DecoratorNode<unknown> | ElementNode {\n if ($isDecoratorNode(node) && !node.isInline()) {\n return true\n }\n if (!$isElementNode(node) || $isRootOrShadowRoot(node)) {\n return false\n }\n\n const firstChild = node.getFirstChild()\n const isLeafElement =\n firstChild === null ||\n $isLineBreakNode(firstChild) ||\n $isTextNode(firstChild) ||\n firstChild.isInline()\n\n return !node.isInline() && node.canBeEmpty() !== false && isLeafElement\n}\n\nfunction findLaterSiblingBlock(node: LexicalNode): LexicalNode | null {\n let current = node.getNextSibling()\n while (current !== null) {\n if (INTERNAL_$isBlock(current)) {\n return current\n }\n current = current.getNextSibling()\n }\n return null\n}\n\nfunction findFirstSiblingBlock(node: LexicalNode): LexicalNode | null {\n let current = node.getPreviousSibling()\n while (current !== null) {\n if (INTERNAL_$isBlock(current)) {\n return current\n }\n current = current.getPreviousSibling()\n }\n return null\n}\n", "'use client'\nimport type { LexicalEditor, LexicalNode, ParagraphNode } from 'lexical'\n\nimport { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext.js'\nimport { $createParagraphNode, isHTMLElement } from 'lexical'\nimport * as React from 'react'\nimport { useCallback, useEffect, useRef, useState } from 'react'\nimport { createPortal } from 'react-dom'\n\nimport { useEditorConfigContext } from '../../../config/client/EditorConfigProvider.js'\nimport { Point } from '../../../utils/point.js'\nimport { ENABLE_SLASH_MENU_COMMAND } from '../../SlashMenu/LexicalTypeaheadMenuPlugin/index.js'\nimport { calculateDistanceFromScrollerElem } from '../utils/calculateDistanceFromScrollerElem.js'\nimport { getNodeCloseToPoint } from '../utils/getNodeCloseToPoint.js'\nimport { getTopLevelNodeKeys } from '../utils/getTopLevelNodeKeys.js'\nimport { isOnHandleElement } from '../utils/isOnHandleElement.js'\nimport { setHandlePosition } from '../utils/setHandlePosition.js'\nimport './index.css'\n\nconst ADD_BLOCK_MENU_CLASSNAME = 'add-block-menu'\n\nlet prevIndex = Infinity\n\nfunction getCurrentIndex(keysLength: number): number {\n if (keysLength === 0) {\n return Infinity\n }\n if (prevIndex >= 0 && prevIndex < keysLength) {\n return prevIndex\n }\n\n return Math.floor(keysLength / 2)\n}\n\nfunction useAddBlockHandle(\n editor: LexicalEditor,\n anchorElem: HTMLElement,\n isEditable: boolean,\n): React.ReactElement {\n const scrollerElem = anchorElem.parentElement\n\n const { editorConfig } = useEditorConfigContext()\n const blockHandleHorizontalOffset = editorConfig?.admin?.hideGutter ? -24 : 12\n\n const menuRef = useRef<HTMLButtonElement>(null)\n const [hoveredElement, setHoveredElement] = useState<{\n elem: HTMLElement\n node: LexicalNode\n } | null>(null)\n\n useEffect(() => {\n function onDocumentMouseMove(event: MouseEvent) {\n const target = event.target\n if (!isHTMLElement(target)) {\n return\n }\n\n const distanceFromScrollerElem = calculateDistanceFromScrollerElem(\n scrollerElem,\n event.pageX,\n event.pageY,\n target,\n )\n\n if (distanceFromScrollerElem === -1) {\n setHoveredElement(null)\n return\n }\n\n if (isOnHandleElement(target, ADD_BLOCK_MENU_CLASSNAME)) {\n return\n }\n const topLevelNodeKeys = getTopLevelNodeKeys(editor)\n\n const {\n blockElem: _emptyBlockElem,\n blockNode,\n foundAtIndex,\n } = getNodeCloseToPoint({\n anchorElem,\n cache_threshold: 0,\n editor,\n horizontalOffset: -distanceFromScrollerElem,\n point: new Point(event.x, event.y),\n returnEmptyParagraphs: true,\n startIndex: getCurrentIndex(topLevelNodeKeys.length),\n useEdgeAsDefault: false,\n })\n\n prevIndex = foundAtIndex\n\n if (!_emptyBlockElem) {\n return\n }\n if (\n blockNode &&\n (hoveredElement?.node !== blockNode || hoveredElement?.elem !== _emptyBlockElem)\n ) {\n setHoveredElement({\n elem: _emptyBlockElem,\n node: blockNode,\n })\n }\n }\n\n // Since the draggableBlockElem is outside the actual editor, we need to listen to the document\n // to be able to detect when the mouse is outside the editor and respect a buffer around\n // the scrollerElem to avoid the draggableBlockElem disappearing too early.\n document?.addEventListener('mousemove', onDocumentMouseMove)\n\n return () => {\n document?.removeEventListener('mousemove', onDocumentMouseMove)\n }\n }, [scrollerElem, anchorElem, editor, hoveredElement])\n\n useEffect(() => {\n if (menuRef.current) {\n setHandlePosition(\n hoveredElement?.elem ?? null,\n menuRef.current,\n anchorElem,\n blockHandleHorizontalOffset,\n )\n }\n }, [anchorElem, hoveredElement, blockHandleHorizontalOffset])\n\n const handleAddClick = useCallback(\n (event: React.MouseEvent<HTMLButtonElement, MouseEvent>) => {\n let hoveredElementToUse = hoveredElement\n if (!hoveredElementToUse?.node) {\n return\n }\n\n // 1. Update hoveredElement.node to a new paragraph node if the hoveredElement.node is not a paragraph node\n editor.update(() => {\n // Check if blockNode is an empty text node\n let isEmptyParagraph = true\n if (\n hoveredElementToUse?.node.getType() !== 'paragraph' ||\n hoveredElementToUse.node.getTextContent() !== ''\n ) {\n isEmptyParagraph = false\n }\n\n if (!isEmptyParagraph) {\n const newParagraph = $createParagraphNode()\n hoveredElementToUse?.node.insertAfter(newParagraph)\n\n setTimeout(() => {\n hoveredElementToUse = {\n elem: editor.getElementByKey(newParagraph.getKey())!,\n node: newParagraph,\n }\n setHoveredElement(hoveredElementToUse)\n }, 0)\n }\n })\n\n // 2. Focus on the new paragraph node\n setTimeout(() => {\n editor.update(() => {\n editor.focus()\n\n if (\n hoveredElementToUse?.node &&\n 'select' in hoveredElementToUse.node &&\n typeof hoveredElementToUse.node.select === 'function'\n ) {\n hoveredElementToUse.node.select()\n }\n })\n }, 1)\n\n // Make sure this is called AFTER the focusing has been processed by the browser\n // Otherwise, this won't work\n setTimeout(() => {\n editor.dispatchCommand(ENABLE_SLASH_MENU_COMMAND, {\n node: hoveredElementToUse?.node as ParagraphNode,\n })\n }, 2)\n\n event.stopPropagation()\n event.preventDefault()\n },\n [editor, hoveredElement],\n )\n\n return createPortal(\n <React.Fragment>\n <button\n aria-label=\"Add block\"\n className=\"icon add-block-menu\"\n onClick={(event) => {\n handleAddClick(event)\n }}\n ref={menuRef}\n type=\"button\"\n >\n <div className={isEditable ? 'icon' : ''} />\n </button>\n </React.Fragment>,\n anchorElem,\n )\n}\n\nexport function AddBlockHandlePlugin({\n anchorElem = document.body,\n}: {\n anchorElem?: HTMLElement\n}): React.ReactElement {\n const [editor] = useLexicalComposerContext()\n return useAddBlockHandle(editor, anchorElem, editor._editable)\n}\n", "'use client'\n/**\n * Calculate distance between scrollerElem and target if target is not in scrollerElem\n */\nexport const calculateDistanceFromScrollerElem = (\n scrollerElem: HTMLElement | null,\n pageX: number,\n pageY: number,\n target: HTMLElement,\n horizontalBuffer: number = 50,\n verticalBuffer: number = 25,\n): number => {\n let distanceFromScrollerElem = 0\n if (scrollerElem && !scrollerElem.contains(target)) {\n const { bottom, left, right, top } = scrollerElem.getBoundingClientRect()\n\n const adjustedTop = top + window.scrollY\n const adjustedBottom = bottom + window.scrollY\n\n if (\n pageY < adjustedTop - verticalBuffer ||\n pageY > adjustedBottom + verticalBuffer ||\n pageX < left - horizontalBuffer ||\n pageX > right + horizontalBuffer\n ) {\n return -1\n }\n\n // This is used to allow the _draggableBlockElem to be found when the mouse is in the\n // buffer zone around the scrollerElem.\n if (pageX < left || pageX > right) {\n distanceFromScrollerElem = pageX < left ? pageX - left : pageX - right\n }\n }\n return distanceFromScrollerElem\n}\n", "'use client'\nimport type { LexicalEditor, LexicalNode } from 'lexical'\n\nimport { $getNodeByKey } from 'lexical'\n\nimport { Point } from '../../../utils/point.js'\nimport { Rect } from '../../../utils/rect.js'\nimport { getBoundingClientRectWithoutTransform } from '../DraggableBlockPlugin/getBoundingRectWithoutTransform.js'\nimport { getCollapsedMargins } from '../utils/getCollapsedMargins.js'\nimport { getTopLevelNodeKeys } from '../utils/getTopLevelNodeKeys.js'\n\n// Directions\nconst Downward = 1\nconst Upward = -1\nconst Indeterminate = 0\n\ntype Props = {\n anchorElem: HTMLElement\n cache_threshold?: number\n editor: LexicalEditor\n /** fuzzy makes the search not exact. If no exact match found, find the closes node instead of returning null */\n fuzzy?: boolean\n horizontalOffset?: number\n point: Point\n /**\n * By default, empty paragraphs are not returned. Set this to true to return empty paragraphs. @default false\n */\n returnEmptyParagraphs?: boolean\n /**\n * The index to start searching from. It can be a considerable performance optimization to start searching from the index of the\n * previously found node, as the node is likely to be close to the next node.\n */\n startIndex?: number\n useEdgeAsDefault?: boolean\n verbose?: boolean\n}\n\ntype Output = {\n blockElem: HTMLElement | null\n blockNode: LexicalNode | null\n foundAtIndex: number\n isFoundNodeEmptyParagraph: boolean\n}\n\nconst cache = {\n props: null as null | Props,\n result: null as null | Output,\n}\n\nfunction isPointClose(previous: Point, current: Point, threshold: number = 20): boolean {\n const dx = previous.x - current.x\n const dy = previous.y - current.y\n return dx * dx + dy * dy <= threshold * threshold\n}\n\nexport function getNodeCloseToPoint(props: Props): Output {\n const {\n anchorElem,\n cache_threshold = 20,\n editor,\n fuzzy = false,\n horizontalOffset = 0,\n point: { x, y },\n startIndex = 0,\n useEdgeAsDefault = false,\n } = props\n\n // Use cache\n if (\n cache_threshold > 0 &&\n cache.props &&\n cache.result &&\n cache.props.fuzzy === props.fuzzy &&\n cache.props.horizontalOffset === props.horizontalOffset &&\n cache.props.useEdgeAsDefault === props.useEdgeAsDefault &&\n isPointClose(cache.props.point, props.point, cache_threshold)\n ) {\n return cache.result\n }\n\n const anchorElementRect = anchorElem.getBoundingClientRect()\n const topLevelNodeKeys = getTopLevelNodeKeys(editor)\n\n const closestBlockElem: {\n blockElem: HTMLElement | null\n blockNode: LexicalNode | null\n distance: number\n foundAtIndex: number\n isFoundNodeEmptyParagraph: boolean\n } = {\n blockElem: null,\n blockNode: null,\n distance: Infinity,\n foundAtIndex: -1,\n isFoundNodeEmptyParagraph: false,\n }\n\n // Return null if matching block element is the first or last node\n editor.getEditorState().read(() => {\n if (useEdgeAsDefault) {\n const firstNode = editor.getElementByKey(topLevelNodeKeys[0]!)\n const lastNode = editor.getElementByKey(topLevelNodeKeys[topLevelNodeKeys.length - 1]!)\n\n if (firstNode && lastNode) {\n const [firstNodeRect, lastNodeRect] = [\n getBoundingClientRectWithoutTransform(firstNode),\n getBoundingClientRectWithoutTransform(lastNode),\n ]\n\n if (y < firstNodeRect.top) {\n closestBlockElem.blockElem = firstNode\n closestBlockElem.distance = firstNodeRect.top - y\n closestBlockElem.blockNode = $getNodeByKey(topLevelNodeKeys[0]!)\n closestBlockElem.foundAtIndex = 0\n } else if (y > lastNodeRect.bottom) {\n closestBlockElem.distance = y - lastNodeRect.bottom\n closestBlockElem.blockNode = $getNodeByKey(topLevelNodeKeys[topLevelNodeKeys.length - 1]!)\n closestBlockElem.blockElem = lastNode\n closestBlockElem.foundAtIndex = topLevelNodeKeys.length - 1\n }\n\n if (closestBlockElem?.blockElem) {\n return {\n blockElem: null,\n isFoundNodeEmptyParagraph: false,\n } as Output\n }\n }\n }\n\n // Find matching block element\n let index = startIndex\n let direction = Indeterminate\n\n while (index >= 0 && index < topLevelNodeKeys.length) {\n const key = topLevelNodeKeys[index]!\n const elem = editor.getElementByKey(key)\n if (elem === null) {\n break\n }\n const point = new Point(x + horizontalOffset, y)\n //const domRect = Rect.fromDOM(elem)\n // Do not consider transform of blocks when calculating distance\n const domRect = Rect.fromDOMRect(getBoundingClientRectWithoutTransform(elem))\n\n const { marginBottom, marginTop } = getCollapsedMargins(elem)\n\n const rect = domRect.generateNewRect({\n bottom: domRect.bottom + marginBottom,\n left: anchorElementRect.left,\n right: anchorElementRect.right,\n top: domRect.top - marginTop,\n })\n\n const { distance, isOnBottomSide, isOnTopSide } = rect.distanceFromPoint(point)\n\n if (distance === 0) {\n closestBlockElem.blockElem = elem\n closestBlockElem.blockNode = $getNodeByKey(key)\n closestBlockElem.foundAtIndex = index\n closestBlockElem.distance = distance\n\n // Check if blockNode is an empty text node\n if (\n closestBlockElem.blockNode &&\n closestBlockElem.blockNode.getType() === 'paragraph' &&\n closestBlockElem.blockNode.getTextContent() === ''\n ) {\n if (!fuzzy && !props.returnEmptyParagraphs) {\n closestBlockElem.blockElem = null\n closestBlockElem.blockNode = null\n }\n\n closestBlockElem.isFoundNodeEmptyParagraph = true\n }\n break\n } else if (fuzzy) {\n if (distance < closestBlockElem.distance) {\n closestBlockElem.blockElem = elem\n closestBlockElem.blockNode = $getNodeByKey(key)\n closestBlockElem.distance = distance\n closestBlockElem.foundAtIndex = index\n }\n }\n\n if (direction === Indeterminate) {\n if (isOnTopSide) {\n direction = Upward\n } else if (isOnBottomSide) {\n direction = Downward\n } else {\n // stop search block element\n direction = Infinity\n }\n }\n\n index += direction\n }\n })\n\n // Store in cache before returning\n cache.props = props\n cache.result = {\n blockElem: closestBlockElem.blockElem,\n blockNode: closestBlockElem.blockNode,\n foundAtIndex: closestBlockElem.foundAtIndex,\n isFoundNodeEmptyParagraph: closestBlockElem.isFoundNodeEmptyParagraph,\n }\n\n return {\n blockElem: closestBlockElem.blockElem,\n blockNode: closestBlockElem.blockNode,\n foundAtIndex: closestBlockElem.foundAtIndex,\n isFoundNodeEmptyParagraph: closestBlockElem.isFoundNodeEmptyParagraph,\n }\n}\n", "'use client'\nexport function getBoundingClientRectWithoutTransform(elem: HTMLElement): DOMRect {\n const rect = elem.getBoundingClientRect()\n\n // Extract the translation value from the transform style\n const transformValue = getComputedStyle(elem).getPropertyValue('transform')\n if (!transformValue || transformValue === 'none') {\n return rect\n }\n\n const lastNumberOfTransformValue = transformValue.split(',').pop()\n rect.y = rect.y - Number(lastNumberOfTransformValue?.replace(')', ''))\n\n // Return the original bounding rect if no translation is applied\n return rect\n}\n", "'use client'\nexport function getCollapsedMargins(elem: HTMLElement): {\n marginBottom: number\n marginTop: number\n} {\n const getMargin = (element: Element | null, margin: 'marginBottom' | 'marginTop'): number =>\n element ? parseFloat(window.getComputedStyle(element)[margin]) : 0\n\n const { marginBottom, marginTop } = window.getComputedStyle(elem)\n const prevElemSiblingMarginBottom = getMargin(elem.previousElementSibling, 'marginBottom')\n const nextElemSiblingMarginTop = getMargin(elem.nextElementSibling, 'marginTop')\n const collapsedTopMargin = Math.max(parseFloat(marginTop), prevElemSiblingMarginBottom)\n const collapsedBottomMargin = Math.max(parseFloat(marginBottom), nextElemSiblingMarginTop)\n\n return { marginBottom: collapsedBottomMargin, marginTop: collapsedTopMargin }\n}\n", "'use client'\nimport type { LexicalEditor } from 'lexical'\n\nimport { $getRoot } from 'lexical'\n\nexport function getTopLevelNodeKeys(editor: LexicalEditor): string[] {\n return editor.getEditorState().read(() => $getRoot().getChildrenKeys())\n}\n", "'use client'\nexport function isOnHandleElement(element: HTMLElement, handleElementClassName: string): boolean {\n return !!element.closest(`.${handleElementClassName}`)\n}\n", "'use client'\nconst replacedElements = [\n 'IMG',\n 'INPUT',\n 'TEXTAREA',\n 'SELECT',\n 'BUTTON',\n 'VIDEO',\n 'OBJECT',\n 'EMBED',\n 'IFRAME',\n 'HR',\n]\n\n/**\n * From ChatGPT, only that verified it works for HR elements.\n *\n * HTML Elements can have CSS lineHeight applied to them, but it doesn't always affect the visual layout.\n * This function checks if the line-height property has an effect on the element's layout.\n * @param htmlElem\n */\nexport function doesLineHeightAffectElement(htmlElem: HTMLElement) {\n if (!htmlElem) {\n return false\n }\n\n // Check for replaced elements, elements that typically don't support line-height adjustments,\n // and elements without visible content\n\n if (\n replacedElements.includes(htmlElem.tagName) ||\n htmlElem.offsetHeight === 0 ||\n htmlElem.offsetWidth === 0\n ) {\n return false\n }\n\n // Check for specific CSS properties that negate line-height's visual effects\n const style = window.getComputedStyle(htmlElem)\n if (\n style.display === 'table-cell' ||\n style.position === 'absolute' ||\n style.visibility === 'hidden' ||\n style.opacity === '0'\n ) {\n return false\n }\n\n // This is a basic check, and there can be more complex scenarios where line-height doesn't have an effect.\n return true\n}\n", "'use client'\nimport { doesLineHeightAffectElement } from './doesLineHeightAffectElement.js'\n\nexport function setHandlePosition(\n targetElem: HTMLElement | null,\n handleElem: HTMLElement,\n anchorElem: HTMLElement,\n leftOffset: number = 0, // SPACE\n) {\n if (!targetElem) {\n handleElem.style.visibility = 'hidden'\n handleElem.style.opacity = '0'\n handleElem.style.transform = 'translate(-10000px, -10000px)'\n return\n }\n\n const targetRect = targetElem.getBoundingClientRect()\n const targetStyle = window.getComputedStyle(targetElem)\n const floatingElemRect = handleElem.getBoundingClientRect()\n const anchorElementRect = anchorElem.getBoundingClientRect()\n\n let top: number\n\n const isBlockStyle = [\n 'LexicalEditorTheme__block',\n 'LexicalEditorTheme__upload',\n 'LexicalEditorTheme__relationship',\n ].some(\n (classes) =>\n targetElem.classList.contains(classes) ||\n targetElem.firstElementChild?.classList.contains(classes),\n )\n\n if (!isBlockStyle) {\n // No need to let line height affect the re-positioning of the floating element if line height has no\n // visual effect on the element. Otherwise, the floating element will be positioned incorrectly.\n const actualLineHeight = doesLineHeightAffectElement(targetElem)\n ? parseInt(targetStyle.lineHeight, 10)\n : 0\n\n top = targetRect.top + (actualLineHeight - floatingElemRect.height) / 2 - anchorElementRect.top\n } else {\n top = targetRect.top + 8 - anchorElementRect.top\n }\n\n const left = leftOffset\n\n handleElem.style.opacity = '1'\n handleElem.style.visibility = 'visible'\n handleElem.style.transform = `translate(${left}px, ${top}px)`\n}\n", "'use client'\nimport type { LexicalEditor } from 'lexical'\nimport type { DragEvent as ReactDragEvent } from 'react'\n\nimport { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext.js'\nimport { eventFiles } from '@lexical/rich-text'\nimport { useTranslation } from '@payloadcms/ui'\nimport { $getNearestNodeFromDOMNode, $getNodeByKey, isHTMLElement } from 'lexical'\nimport * as React from 'react'\nimport { useEffect, useId, useRef, useState } from 'react'\nimport { createPortal } from 'react-dom'\n\nimport { useEditorConfigContext } from '../../../config/client/EditorConfigProvider.js'\nimport { Point } from '../../../utils/point.js'\nimport { calculateDistanceFromScrollerElem } from '../utils/calculateDistanceFromScrollerElem.js'\nimport { getNodeCloseToPoint } from '../utils/getNodeCloseToPoint.js'\nimport { getTopLevelNodeKeys } from '../utils/getTopLevelNodeKeys.js'\nimport { isOnHandleElement } from '../utils/isOnHandleElement.js'\nimport { setHandlePosition } from '../utils/setHandlePosition.js'\nimport { getBoundingClientRectWithoutTransform } from './getBoundingRectWithoutTransform.js'\nimport './index.css'\nimport { setTargetLine } from './setTargetLine.js'\nimport { useKeyboardReordering } from './useKeyboardReordering.js'\n\nconst DRAGGABLE_BLOCK_MENU_CLASSNAME = 'draggable-block-menu'\nconst DRAG_DATA_FORMAT = 'application/x-lexical-drag-block'\n\nlet prevIndex = Infinity\n\nfunction getCurrentIndex(keysLength: number): number {\n if (keysLength === 0) {\n return Infinity\n }\n if (prevIndex >= 0 && prevIndex < keysLength) {\n return prevIndex\n }\n\n return Math.floor(keysLength / 2)\n}\n\nfunction setDragImage(dataTransfer: DataTransfer, draggableBlockElem: HTMLElement) {\n const { transform } = draggableBlockElem.style\n\n // Remove dragImage borders\n dataTransfer.setDragImage(draggableBlockElem, 0, 0)\n\n setTimeout(() => {\n draggableBlockElem.style.transform = transform\n })\n}\n\nfunction hideTargetLine(\n targetLineElem: HTMLElement | null,\n lastTargetBlockElem: HTMLElement | null,\n) {\n if (targetLineElem) {\n targetLineElem.style.opacity = '0'\n }\n if (lastTargetBlockElem) {\n lastTargetBlockElem.style.opacity = ''\n // Delete marginBottom and marginTop values we set\n lastTargetBlockElem.style.marginBottom = ''\n lastTargetBlockElem.style.marginTop = ''\n //lastTargetBlock.style.border = 'none'\n }\n}\n\nfunction useDraggableBlockMenu(\n editor: LexicalEditor,\n anchorElem: HTMLElement,\n isEditable: boolean,\n): React.ReactElement {\n const scrollerElem = anchorElem.parentElement\n const instructionsID = useId()\n const { t } = useTranslation()\n\n useKeyboardReordering({ editor, instructionsID })\n\n const menuRef = useRef<HTMLButtonElement>(null)\n const targetLineRef = useRef<HTMLDivElement>(null)\n const debugHighlightRef = useRef<HTMLDivElement>(null)\n const isDraggingBlockRef = useRef<boolean>(false)\n const highlightTimersRef = useRef<ReturnType<typeof setTimeout>[]>([])\n const [draggableBlockElem, setDraggableBlockElem] = useState<HTMLElement | null>(null)\n const [lastTargetBlock, setLastTargetBlock] = useState<{\n boundingBox?: DOMRect\n elem: HTMLElement | null\n isBelow: boolean\n } | null>(null)\n\n const { editorConfig } = useEditorConfigContext()\n\n const blockHandleHorizontalOffset = editorConfig?.admin?.hideGutter ? -44 : -8\n\n useEffect(() => {\n /**\n * Handles positioning of the drag handle\n */\n function onDocumentMouseMove(event: MouseEvent) {\n const target = event.target\n if (!isHTMLElement(target)) {\n return\n }\n\n const distanceFromScrollerElem = calculateDistanceFromScrollerElem(\n scrollerElem,\n event.pageX,\n event.pageY,\n target,\n )\n if (distanceFromScrollerElem === -1) {\n setDraggableBlockElem(null)\n return\n }\n\n if (isOnHandleElement(target, DRAGGABLE_BLOCK_MENU_CLASSNAME)) {\n return\n }\n\n const topLevelNodeKeys = getTopLevelNodeKeys(editor)\n\n const {\n blockElem: _draggableBlockElem,\n foundAtIndex,\n isFoundNodeEmptyParagraph,\n } = getNodeCloseToPoint({\n anchorElem,\n cache_threshold: 0,\n editor,\n horizontalOffset: -distanceFromScrollerElem,\n point: new Point(event.x, event.y),\n startIndex: getCurrentIndex(topLevelNodeKeys.length),\n useEdgeAsDefault: false,\n verbose: false,\n })\n\n prevIndex = foundAtIndex\n\n //if (DEBUG && _draggableBlockElem) {\n //targetBlockElem.style.border = '3px solid red'\n // highlightElemOriginalPosition(debugHighlightRef, _draggableBlockElem, anchorElem)\n //}\n\n if (!_draggableBlockElem && !isFoundNodeEmptyParagraph) {\n return\n }\n\n if (draggableBlockElem !== _draggableBlockElem) {\n setDraggableBlockElem(_draggableBlockElem)\n }\n }\n\n // Since the draggableBlockElem is outside the actual editor, we need to listen to the document\n // to be able to detect when the mouse is outside the editor and respect a buffer around\n // the scrollerElem to avoid the draggableBlockElem disappearing too early.\n document?.addEventListener('mousemove', onDocumentMouseMove)\n\n return () => {\n document?.removeEventListener('mousemove', onDocumentMouseMove)\n }\n }, [scrollerElem, anchorElem, editor, draggableBlockElem])\n\n useEffect(() => {\n if (menuRef.current) {\n setHandlePosition(\n draggableBlockElem,\n menuRef.current,\n anchorElem,\n blockHandleHorizontalOffset,\n )\n }\n }, [anchorElem, draggableBlockElem, blockHandleHorizontalOffset])\n\n useEffect(() => {\n function onDragover(event: DragEvent): boolean {\n if (!isDraggingBlockRef.current) {\n return false\n }\n const [isFileTransfer] = eventFiles(event)\n if (isFileTransfer) {\n return false\n }\n\n const { pageY, target } = event\n if (!isHTMLElement(target)) {\n return false\n }\n\n const distanceFromScrollerElem = calculateDistanceFromScrollerElem(\n scrollerElem,\n event.pageX,\n event.pageY,\n target,\n 100,\n 50,\n )\n\n const topLevelNodeKeys = getTopLevelNodeKeys(editor)\n\n const {\n blockElem: targetBlockElem,\n foundAtIndex,\n isFoundNodeEmptyParagraph,\n } = getNodeCloseToPoint({\n anchorElem,\n editor,\n fuzzy: true,\n horizontalOffset: -distanceFromScrollerElem,\n point: new Point(event.x, event.y),\n startIndex: getCurrentIndex(topLevelNodeKeys.length),\n useEdgeAsDefault: true,\n verbose: true,\n })\n\n prevIndex = foundAtIndex\n\n const targetLineElem = targetLineRef.current\n // targetBlockElem === null shouldn't happen\n if (targetBlockElem === null || targetLineElem === null) {\n return false\n }\n\n // Always prevent default and set dropEffect during drag to maintain the move cursor\n event.preventDefault()\n event.dataTransfer!.dropEffect = 'move'\n\n if (draggableBlockElem !== targetBlockElem) {\n const { isBelow, willStayInSamePosition } = setTargetLine(\n editorConfig?.admin?.hideGutter ? '0px' : 'var(--spacer-5)',\n blockHandleHorizontalOffset +\n (editorConfig?.admin?.hideGutter\n ? (menuRef?.current?.getBoundingClientRect()?.width ?? 0)\n : -(menuRef?.current?.getBoundingClientRect()?.width ?? 0)),\n targetLineElem,\n targetBlockElem,\n lastTargetBlock!,\n pageY,\n anchorElem,\n event,\n debugHighlightRef,\n isFoundNodeEmptyParagraph,\n )\n\n if (!willStayInSamePosition) {\n setLastTargetBlock({\n boundingBox: targetBlockElem.getBoundingClientRect(),\n elem: targetBlockElem,\n isBelow,\n })\n }\n } else if (lastTargetBlock?.elem) {\n hideTargetLine(targetLineElem, lastTargetBlock.elem)\n setLastTargetBlock({\n boundingBox: targetBlockElem.getBoundingClientRect(),\n elem: targetBlockElem,\n isBelow: false,\n })\n }\n\n return true\n }\n\n function onDrop(event: DragEvent): boolean {\n if (!isDraggingBlockRef.current) {\n return false\n }\n const [isFileTransfer] = eventFiles(event)\n if (isFileTransfer) {\n return false\n }\n const { dataTransfer, pageY, target } = event\n const dragData = dataTransfer?.getData(DRAG_DATA_FORMAT) || ''\n\n editor.update(() => {\n const draggedNode = $getNodeByKey(dragData)\n if (!draggedNode) {\n return false\n }\n if (!isHTMLElement(target)) {\n return false\n }\n const distanceFromScrollerElem = calculateDistanceFromScrollerElem(\n scrollerElem,\n event.pageX,\n event.pageY,\n target,\n 100,\n 50,\n )\n\n const { blockElem: targetBlockElem, isFoundNodeEmptyParagraph } = getNodeCloseToPoint({\n anchorElem,\n editor,\n fuzzy: true,\n horizontalOffset: -distanceFromScrollerElem,\n point: new Point(event.x, event.y),\n useEdgeAsDefault: true,\n })\n\n if (!targetBlockElem) {\n return false\n }\n const targetNode = $getNearestNodeFromDOMNode(targetBlockElem)\n if (!targetNode) {\n return false\n }\n if (targetNode === draggedNode) {\n return true\n }\n\n const { height: targetBlockElemHeight, top: targetBlockElemTop } =\n getBoundingClientRectWithoutTransform(targetBlockElem)\n\n const mouseY = pageY\n const isBelow = mouseY >= targetBlockElemTop + targetBlockElemHeight / 2 + window.scrollY\n\n if (!isFoundNodeEmptyParagraph) {\n if (isBelow) {\n // below targetBlockElem\n targetNode.insertAfter(draggedNode)\n } else {\n // above targetBlockElem\n targetNode.insertBefore(draggedNode)\n }\n } else {\n //\n targetNode.insertBefore(draggedNode)\n targetNode.remove()\n }\n\n /*\n if (pageY >= targetBlockElemTop + targetBlockElemHeight / 2) {\n targetNode.insertAfter(draggedNode)\n } else {\n targetNode.insertBefore(draggedNode)\n }*/\n if (draggableBlockElem !== null) {\n setDraggableBlockElem(null)\n }\n\n // find all previous elements with lexical-block-highlighter class and remove them\n const allPrevHighlighters = document.querySelectorAll('.lexical-block-highlighter')\n allPrevHighlighters.forEach((highlighter) => {\n highlighter.remove()\n })\n\n const newInsertedElem = editor.getElementByKey(draggedNode.getKey())\n const highlightTimer = setTimeout(() => {\n // add new temp html element to newInsertedElem with the same height and width and the class block-selected\n // to highlight the new inserted element\n const newInsertedElemRect = newInsertedElem?.getBoundingClientRect()\n if (!newInsertedElemRect) {\n return\n }\n const highlightElem = document.createElement('div')\n highlightElem.className = 'lexical-block-highlighter'\n\n highlightElem.style.backgroundColor = 'var(--color-bg-inverse)'\n highlightElem.style.transition = 'opacity 0.5s ease-in-out'\n highlightElem.style.zIndex = '1'\n highlightElem.style.pointerEvents = 'none'\n highlightElem.style.boxSizing = 'border-box'\n highlightElem.style.borderRadius = '4px'\n highlightElem.style.position = 'absolute'\n document.body.appendChild(highlightElem)\n\n highlightElem.style.opacity = '0.1'\n\n highlightElem.style.height = `${newInsertedElemRect.height + 8}px`\n highlightElem.style.width = `${newInsertedElemRect.width + 8}px`\n highlightElem.style.top = `${newInsertedElemRect.top + window.scrollY - 4}px`\n highlightElem.style.left = `${newInsertedElemRect.left - 4}px`\n\n const fadeTimer = setTimeout(() => {\n highlightElem.style.opacity = '0'\n const removeTimer = setTimeout(() => {\n highlightElem.remove()\n }, 500)\n highlightTimersRef.current.push(removeTimer)\n }, 1000)\n highlightTimersRef.current.push(fadeTimer)\n }, 120)\n highlightTimersRef.current.push(highlightTimer)\n })\n\n return true\n }\n\n // register onDragover event listeners:\n document.addEventListener('dragover', onDragover)\n // register onDrop event listeners:\n document.addEventListener('drop', onDrop)\n\n return () => {\n document.removeEventListener('dragover', onDragover)\n document.removeEventListener('drop', onDrop)\n highlightTimersRef.current.forEach(clearTimeout)\n highlightTimersRef.current = []\n }\n }, [\n scrollerElem,\n blockHandleHorizontalOffset,\n anchorElem,\n editor,\n lastTargetBlock,\n draggableBlockElem,\n editorConfig?.admin?.hideGutter,\n ])\n\n function onDragStart(event: ReactDragEvent<HTMLButtonElement>): void {\n const dataTransfer = event.dataTransfer\n if (!dataTransfer || !draggableBlockElem) {\n return\n }\n setDragImage(dataTransfer, draggableBlockElem)\n dataTransfer.effectAllowed = 'move'\n let nodeKey = ''\n editor.update(() => {\n const node = $getNearestNodeFromDOMNode(draggableBlockElem)\n if (node) {\n nodeKey = node.getKey()\n }\n })\n isDraggingBlockRef.current = true\n dataTransfer.setData(DRAG_DATA_FORMAT, nodeKey)\n }\n\n function onDragEnd(): void {\n isDraggingBlockRef.current = false\n if (lastTargetBlock?.elem) {\n hideTargetLine(targetLineRef.current, lastTargetBlock?.elem)\n }\n }\n\n return createPortal(\n <React.Fragment>\n <span className=\"sr-only\" id={instructionsID}>\n {t('general:moveUp')}: Alt + Shift + ↑. {t('general:moveDown')}: Alt + Shift + ↓.\n </span>\n <button\n aria-label=\"Drag to move\"\n className=\"icon draggable-block-menu\"\n draggable\n onDragEnd={onDragEnd}\n onDragStart={onDragStart}\n ref={menuRef}\n type=\"button\"\n >\n <div className={isEditable ? 'icon' : ''} />\n </button>\n <div className=\"draggable-block-target-line\" ref={targetLineRef} />\n <div className=\"debug-highlight\" ref={debugHighlightRef} />\n </React.Fragment>,\n anchorElem,\n )\n}\n\nexport function DraggableBlockPlugin({\n anchorElem = document.body,\n}: {\n anchorElem?: HTMLElement\n}): React.ReactElement {\n const [editor] = useLexicalComposerContext()\n return useDraggableBlockMenu(editor, anchorElem, editor._editable)\n}\n", "'use client'\nimport { getCollapsedMargins } from '../utils/getCollapsedMargins.js'\nconst TARGET_LINE_HALF_HEIGHT = 0\nconst TEXT_BOX_HORIZONTAL_PADDING = -24\nconst DEBUG = false\n\nlet animationTimer = 0\n\nexport function setTargetLine(\n offsetWidth: string,\n offsetLeft: number,\n targetLineElem: HTMLElement,\n targetBlockElem: HTMLElement,\n lastTargetBlock: {\n boundingBox?: DOMRect\n elem: HTMLElement | null\n isBelow: boolean\n },\n mouseY: number,\n anchorElem: HTMLElement,\n event: DragEvent,\n debugHighlightRef: React.RefObject<HTMLDivElement | null>,\n isFoundNodeEmptyParagraph: boolean = false,\n) {\n const { height: targetBlockElemHeight, top: targetBlockElemTop } =\n targetBlockElem.getBoundingClientRect() // used to be getBoundingClientRectWithoutTransform. Not sure what's better, but the normal getBoundingClientRect seems to work fine\n const { top: anchorTop, width: anchorWidth } = anchorElem.getBoundingClientRect()\n\n const { marginBottom, marginTop } = getCollapsedMargins(targetBlockElem)\n let lineTop = targetBlockElemTop\n\n const isBelow = mouseY >= targetBlockElemTop + targetBlockElemHeight / 2 + window.scrollY\n\n let willStayInSamePosition = false\n\n /**\n * Do not run any transform or changes if the actual new line position would be the same (even if it's now inserted BEFORE rather than AFTER - position would still be the same)\n * This prevents unnecessary flickering.\n *\n * We still need to let it run even if the position (IGNORING the transform) would not change, as the transform animation is not finished yet. This is what animationTimer does. Otherwise, the positioning will be inaccurate\n */\n if (lastTargetBlock?.elem) {\n if (targetBlockElem !== lastTargetBlock?.elem) {\n if (\n isBelow &&\n lastTargetBlock?.elem &&\n lastTargetBlock?.elem === targetBlockElem.nextElementSibling\n ) {\n animationTimer++\n\n if (animationTimer < 200) {\n willStayInSamePosition = true\n }\n } else if (\n !isBelow &&\n lastTargetBlock?.elem &&\n lastTargetBlock?.elem === targetBlockElem.previousElementSibling\n ) {\n animationTimer++\n if (animationTimer < 200) {\n willStayInSamePosition = true\n }\n }\n } else {\n animationTimer++\n\n const lastBoundingBoxPosition = lastTargetBlock?.boundingBox?.y\n const currentBoundingBoxPosition = targetBlockElem.getBoundingClientRect().y\n\n if (\n (isBelow === lastTargetBlock?.isBelow &&\n lastBoundingBoxPosition === currentBoundingBoxPosition) ||\n animationTimer < 200\n ) {\n willStayInSamePosition = false\n }\n }\n }\n if (willStayInSamePosition) {\n return {\n isBelow,\n willStayInSamePosition,\n }\n }\n\n /**\n * Paragraphs need no isBelow/above handling,\n */\n if (!isFoundNodeEmptyParagraph) {\n //if (!isFoundNodeEmptyParagraph) {\n if (isBelow) {\n // below targetBlockElem\n lineTop += targetBlockElemHeight + marginBottom / 2\n } else {\n // above targetBlockElem\n lineTop -= marginTop / 2\n }\n } else {\n lineTop += targetBlockElemHeight / 2\n }\n\n let targetElemTranslate2 = 0\n\n if (!isFoundNodeEmptyParagraph) {\n if (isBelow) {\n targetElemTranslate2 = -TARGET_LINE_HALF_HEIGHT\n } else {\n targetElemTranslate2 = TARGET_LINE_HALF_HEIGHT\n }\n }\n\n const top = lineTop - anchorTop + targetElemTranslate2\n\n const left = TEXT_BOX_HORIZONTAL_PADDING - offsetLeft\n\n targetLineElem.style.width = `calc(${anchorWidth}px - ${offsetWidth} - var(--spacer-5))`\n targetLineElem.style.opacity = '.8'\n\n // if (DEBUG) {\n // //targetBlockElem.style.border = '3px solid red'\n // highlightElemOriginalPosition(debugHighlightRef, targetBlockElem, anchorElem)\n // }\n\n targetLineElem.style.transform = `translate(${left}px, calc(${top}px - ${'2px'}))`\n\n /**\n * Properly reset previous targetBlockElem styles\n */\n if (lastTargetBlock?.elem) {\n lastTargetBlock.elem.style.opacity = ''\n\n if (lastTargetBlock?.elem === targetBlockElem) {\n if (isBelow) {\n lastTargetBlock.elem.style.marginTop = ''\n } else {\n lastTargetBlock.elem.style.marginBottom = ''\n }\n } else {\n lastTargetBlock.elem.style.marginBottom = ''\n lastTargetBlock.elem.style.marginTop = ''\n }\n }\n\n animationTimer = 0\n return {\n isBelow,\n willStayInSamePosition,\n }\n}\n", "import type { LexicalEditor } from 'lexical'\n\nimport { mergeRegister } from '@lexical/utils'\nimport {\n $getSelection,\n $isNodeSelection,\n $isRangeSelection,\n COMMAND_PRIORITY_HIGH,\n KEY_ARROW_DOWN_COMMAND,\n KEY_ARROW_UP_COMMAND,\n} from 'lexical'\nimport { useEffect } from 'react'\n\n/** Move the current top-level line, including decorator nodes, without a pointer. */\nexport function useKeyboardReordering({\n editor,\n instructionsID,\n}: {\n editor: LexicalEditor\n instructionsID: string\n}) {\n useEffect(() => {\n const moveLine = ({ direction, event }: { direction: -1 | 1; event: KeyboardEvent }) => {\n if (\n !editor.isEditable() ||\n !event.altKey ||\n !event.shiftKey ||\n event.ctrlKey ||\n event.metaKey\n ) {\n return false\n }\n const selection = $getSelection()\n const selectedNode =\n $isRangeSelection(selection) && selection.isCollapsed()\n ? selection.anchor.getNode()\n : $isNodeSelection(selection) && selection.getNodes().length === 1\n ? selection.getNodes()[0]\n : null\n const node = selectedNode?.getTopLevelElement()\n\n if (!node) {\n return false\n }\n event.preventDefault()\n const sibling = direction === -1 ? node.getPreviousSibling() : node.getNextSibling()\n\n if (sibling) {\n if (direction === -1) {\n sibling.insertBefore(node)\n } else {\n sibling.insertAfter(node)\n }\n }\n return true\n }\n\n return mergeRegister(\n editor.registerCommand(\n KEY_ARROW_UP_COMMAND,\n (event) => moveLine({ direction: -1, event }),\n COMMAND_PRIORITY_HIGH,\n ),\n editor.registerCommand(\n KEY_ARROW_DOWN_COMMAND,\n (event) => moveLine({ direction: 1, event }),\n COMMAND_PRIORITY_HIGH,\n ),\n )\n }, [editor])\n\n useEffect(() => {\n let restore: (() => void) | undefined\n const unregister = editor.registerRootListener((root) => {\n restore?.()\n if (!root) {\n return\n }\n const description = root.getAttribute('aria-describedby')\n root.setAttribute('aria-describedby', [description, instructionsID].filter(Boolean).join(' '))\n restore = () => {\n if (description === null) {\n root.removeAttribute('aria-describedby')\n } else {\n root.setAttribute('aria-describedby', description)\n }\n }\n })\n\n return () => {\n unregister()\n restore?.()\n }\n }, [editor, instructionsID])\n}\n", "'use client'\n\nimport { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext'\nimport { useTranslation } from '@payloadcms/ui'\nimport { $createParagraphNode, $getRoot } from 'lexical'\nimport React from 'react'\n\nimport './index.css'\nimport { useEditorConfigContext } from '../../config/client/EditorConfigProvider.js'\nimport { AddIcon } from '../../ui/icons/Add/index.js'\nconst baseClass = 'insert-paragraph-at-end'\n\nexport const InsertParagraphAtEndPlugin: React.FC = () => {\n const [editor] = useLexicalComposerContext()\n const { editorConfig } = useEditorConfigContext()\n const { t } = useTranslation<{}, string>()\n\n if (editorConfig?.admin?.hideInsertParagraphAtEnd) {\n return null\n }\n\n const onClick = () => {\n editor.update(() => {\n const paragraphNode = $createParagraphNode()\n $getRoot().append(paragraphNode)\n paragraphNode.select()\n })\n }\n\n return (\n <button\n aria-label={t('lexical:general:insertParagraph')}\n className={baseClass}\n onClick={onClick}\n type=\"button\"\n >\n <span className={`${baseClass}-inside`}>\n <AddIcon size={16} />\n </span>\n </button>\n )\n}\n", "'use client'\n\nimport { registerMarkdownShortcuts } from '@lexical/markdown'\nimport { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext'\nimport * as React from 'react'\n\nimport { useEditorConfigContext } from '../../config/client/EditorConfigProvider.js'\n\nexport const MarkdownShortcutPlugin: React.FC = () => {\n const { editorConfig } = useEditorConfigContext()\n const [editor] = useLexicalComposerContext()\n\n React.useEffect(() => {\n return registerMarkdownShortcuts(editor, editorConfig.features.markdownTransformers ?? [])\n }, [editor, editorConfig.features.markdownTransformers])\n\n return null\n}\n", "'use client'\nimport { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext.js'\nimport { $getRoot, type LexicalNode } from 'lexical'\nimport { useEffect } from 'react'\n\nimport { useRichTextView } from '../../../field/RichTextViewProvider.js'\nimport { clearEditorNodeViews, registerEditorNodeViews } from '../../nodes/index.js'\n\n// `LexicalComposer` re-mounts with a new `editor` whenever `currentView` changes,\n// so decorator nodes run their initial `decorate()` before this effect registers the view's overrides.\n// Mark existing block decorators dirty after registering so they re-decorate with the resolved custom `Block` component.\nfunction refreshBlockDecorators(editor: ReturnType<typeof useLexicalComposerContext>[0]): void {\n editor.update(() => {\n const walk = (node: LexicalNode): void => {\n const type = node.getType()\n if (type === 'block' || type === 'inlineBlock') {\n node.markDirty()\n }\n if ('getChildren' in node && typeof node.getChildren === 'function') {\n for (const child of node.getChildren() as LexicalNode[]) {\n walk(child)\n }\n }\n }\n walk($getRoot())\n })\n}\n\nexport function NodeViewOverridePlugin(): null {\n const [editor] = useLexicalComposerContext()\n const { currentView, views } = useRichTextView()\n\n useEffect(() => {\n if (!views) {\n return\n }\n\n if (currentView === 'default') {\n if (views.default) {\n registerEditorNodeViews(editor, views.default?.nodes)\n } else {\n clearEditorNodeViews(editor)\n }\n } else if (views[currentView]) {\n clearEditorNodeViews(editor)\n registerEditorNodeViews(editor, views[currentView]?.nodes)\n }\n\n refreshBlockDecorators(editor)\n }, [editor, views, currentView])\n\n return null\n}\n", "import { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext'\nimport { $getSelection, $isRangeSelection, RootNode } from 'lexical'\nimport { useEffect } from 'react'\n\n/**\n * By default, Lexical throws an error if the selection ends in deleted nodes.\n * This is very aggressive considering there are reasons why this can happen\n * outside of Payload's control (custom features or conflicting features, for example).\n * In the case of selections on nonexistent nodes, this plugin moves the selection to\n * the end of the editor and displays a warning instead of an error.\n */\nexport function NormalizeSelectionPlugin() {\n const [editor] = useLexicalComposerContext()\n\n useEffect(() => {\n return editor.registerNodeTransform(RootNode, (root) => {\n const selection = $getSelection()\n if ($isRangeSelection(selection)) {\n const anchorNode = selection.anchor.getNode()\n const focusNode = selection.focus.getNode()\n if (!anchorNode.isAttached() || !focusNode.isAttached()) {\n root.selectEnd()\n // eslint-disable-next-line no-console\n console.warn(\n 'updateEditor: selection has been moved to the end of the editor because the previously selected nodes have been removed and ' +\n \"selection wasn't moved to another node. Ensure selection changes after removing/replacing a selected node.\",\n )\n }\n }\n return false\n })\n }, [editor])\n\n return null\n}\n", "import { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext'\nimport { $getSelection, COMMAND_PRIORITY_LOW, SELECT_ALL_COMMAND } from 'lexical'\nimport { useEffect } from 'react'\n\n/**\n * Allows to select inputs with `ctrl+a` or `cmd+a`.\n * Required because Lexical preventDefault the event.\n * see: https://github.com/payloadcms/payload/issues/6871\n */\nexport function SelectAllPlugin() {\n const [editor] = useLexicalComposerContext()\n\n useEffect(() => {\n return editor.registerCommand(\n SELECT_ALL_COMMAND,\n () => {\n const selection = $getSelection()\n if (selection) {\n return false\n }\n const activeElement = document.activeElement\n if (activeElement instanceof HTMLInputElement) {\n activeElement.select()\n }\n return true\n },\n COMMAND_PRIORITY_LOW,\n )\n }, [editor])\n\n return null\n}\n", "'use client'\nimport { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext.js'\nimport { useTranslation } from '@payloadcms/ui'\nimport { useCallback, useMemo, useState } from 'react'\nimport * as React from 'react'\nimport * as ReactDOM from 'react-dom'\n\nimport type {\n SlashMenuGroup,\n SlashMenuGroupInternal,\n SlashMenuItemInternal,\n SlashMenuItem as SlashMenuItemType,\n} from './LexicalTypeaheadMenuPlugin/types.js'\n\nimport { useEditorConfigContext } from '../../config/client/EditorConfigProvider.js'\nimport './index.css'\nimport { LexicalTypeaheadMenuPlugin } from './LexicalTypeaheadMenuPlugin/index.js'\nimport { useMenuTriggerMatch } from './useMenuTriggerMatch.js'\n\nconst baseClass = 'slash-menu-popup'\n\nfunction SlashMenuItem({\n isSelected,\n item,\n onClick,\n onMouseEnter,\n ref,\n}: {\n index: number\n isSelected: boolean\n item: SlashMenuItemInternal\n onClick: () => void\n onMouseEnter: () => void\n ref?: React.Ref<HTMLButtonElement>\n}) {\n const {\n fieldProps: { featureClientSchemaMap, schemaPath },\n } = useEditorConfigContext()\n\n const { i18n } = useTranslation<{}, string>()\n\n let className = `${baseClass}__item ${baseClass}__item-${item.key}`\n if (isSelected) {\n className += ` ${baseClass}__item--selected`\n }\n\n let title = item.key\n if (item.label) {\n title =\n typeof item.label === 'function'\n ? item.label({ featureClientSchemaMap, i18n, schemaPath })\n : item.label\n }\n // Crop title to max. 25 characters\n if (title.length > 25) {\n title = title.substring(0, 25) + '...'\n }\n\n return (\n <button\n aria-selected={isSelected}\n className={className}\n id={baseClass + '__item-' + item.key}\n key={item.key}\n onClick={onClick}\n onMouseEnter={onMouseEnter}\n ref={ref}\n role=\"option\"\n tabIndex={-1}\n type=\"button\"\n >\n {item?.Icon && <item.Icon />}\n\n <span className={`${baseClass}__item-text`}>{title}</span>\n </button>\n )\n}\n\nexport function SlashMenuPlugin({\n anchorElem = document.body,\n}: {\n anchorElem?: HTMLElement\n}): React.ReactElement {\n const [editor] = useLexicalComposerContext()\n const [queryString, setQueryString] = useState<null | string>(null)\n const { editorConfig } = useEditorConfigContext()\n const { i18n } = useTranslation<{}, string>()\n const {\n fieldProps: { featureClientSchemaMap, schemaPath },\n } = useEditorConfigContext()\n\n const checkForTriggerMatch = useMenuTriggerMatch('/', {\n minLength: 0,\n })\n\n const getDynamicItems = useCallback(() => {\n let groupWithItems: Array<SlashMenuGroup> = []\n\n for (const dynamicItem of editorConfig.features.slashMenu.dynamicGroups) {\n if (queryString) {\n const dynamicGroupWithItems = dynamicItem({\n editor,\n queryString,\n })\n groupWithItems = groupWithItems.concat(dynamicGroupWithItems)\n }\n }\n\n return groupWithItems\n }, [editor, queryString, editorConfig?.features])\n\n const groups: SlashMenuGroup[] = useMemo(() => {\n let groupsWithItems: SlashMenuGroup[] = []\n for (const groupWithItem of editorConfig?.features.slashMenu.groups ?? []) {\n groupsWithItems.push(groupWithItem)\n }\n\n if (queryString) {\n // Normalize query string for flexible matching (remove spaces, hyphens, underscores)\n const normalizedQuery = queryString.toLowerCase().replace(/[\\s\\-_]/g, '')\n\n // Filter current groups first\n // @ts-expect-error - TODO: fix this\n groupsWithItems = groupsWithItems.map((group) => {\n const filteredItems = group.items.filter((item) => {\n let itemTitle = item.key\n if (item.label) {\n itemTitle =\n typeof item.label === 'function'\n ? item.label({ featureClientSchemaMap, i18n, schemaPath })\n : item.label\n }\n\n if (new RegExp(queryString, 'gi').exec(itemTitle)) {\n return true\n }\n\n // Try normalized match (allows \"nestedcontent\" to match \"Nested Content\")\n const normalizedTitle = itemTitle.toLowerCase().replace(/[\\s\\-_]/g, '')\n if (normalizedTitle.includes(normalizedQuery)) {\n return true\n }\n\n if (item.keywords != null) {\n return item.keywords.some((keyword) => {\n if (new RegExp(queryString, 'gi').exec(keyword)) {\n return true\n }\n const normalizedKeyword = keyword.toLowerCase().replace(/[\\s\\-_]/g, '')\n return normalizedKeyword.includes(normalizedQuery)\n })\n }\n return false\n })\n if (filteredItems.length) {\n return {\n ...group,\n items: filteredItems,\n }\n }\n return null\n })\n\n groupsWithItems = groupsWithItems.filter((group) => group != null)\n\n // Now add dynamic groups\n const dynamicItemGroups = getDynamicItems()\n\n // merge dynamic items into groups\n for (const dynamicGroup of dynamicItemGroups) {\n // 1. find the group with the same name or create new one\n let group = groupsWithItems.find((group) => group.key === dynamicGroup.key)\n if (!group) {\n group = {\n ...dynamicGroup,\n items: [],\n }\n } else {\n groupsWithItems = groupsWithItems.filter((group) => group.key !== dynamicGroup.key)\n }\n\n // 2. Add items to group items array and add to sanitized.slashMenu.groupsWithItems\n if (group?.items?.length) {\n group.items = group.items.concat(group.items)\n }\n groupsWithItems.push(group)\n }\n }\n\n return groupsWithItems\n }, [\n queryString,\n editorConfig?.features.slashMenu.groups,\n getDynamicItems,\n featureClientSchemaMap,\n i18n,\n schemaPath,\n ])\n\n return (\n <LexicalTypeaheadMenuPlugin\n anchorElem={anchorElem}\n groups={groups as SlashMenuGroupInternal[]}\n menuRenderFn={(\n anchorElementRef,\n { selectedItemKey, selectItemAndCleanUp, setSelectedItemKey },\n ) =>\n anchorElementRef.current && groups.length\n ? ReactDOM.createPortal(\n <div className={baseClass} data-theme=\"dark\">\n {groups.map((group) => {\n let groupTitle = group.key\n if (group.label && featureClientSchemaMap) {\n groupTitle =\n typeof group.label === 'function'\n ? group.label({ featureClientSchemaMap, i18n, schemaPath })\n : group.label\n }\n\n return (\n <div\n className={`${baseClass}__group ${baseClass}__group-${group.key}`}\n key={group.key}\n >\n <div className={`${baseClass}__group-title`}>{groupTitle}</div>\n {group.items.map((item, oi: number) => (\n <SlashMenuItem\n index={oi}\n isSelected={selectedItemKey === item.key}\n item={item as SlashMenuItemInternal}\n key={item.key}\n onClick={() => {\n setSelectedItemKey(item.key)\n selectItemAndCleanUp(item)\n }}\n onMouseEnter={() => {\n setSelectedItemKey(item.key)\n }}\n ref={(el) => {\n ;(item as SlashMenuItemInternal).ref = { current: el }\n }}\n />\n ))}\n </div>\n )\n })}\n </div>,\n anchorElementRef.current,\n )\n : null\n }\n onQueryChange={setQueryString}\n triggerFn={checkForTriggerMatch}\n />\n )\n}\n", "'use client'\nimport type { LexicalEditor } from 'lexical'\n\nimport { useCallback } from 'react'\n\nimport { PUNCTUATION } from './LexicalTypeaheadMenuPlugin/index.js'\n\nexport type TriggerFn = ({\n editor,\n query,\n}: {\n editor: LexicalEditor\n /** The query string is the POTENTIAL trigger AND the text after the trigger text. */\n query: string\n}) => MenuTextMatch | null\n\nexport type MenuTextMatch = {\n leadOffset: number\n matchingString: string\n replaceableString: string\n}\n\n/**\n * Returns a function which checks if the trigger (e.g. '/') is present in the query and, if so, returns the matching string (text after the trigger)\n */\nexport function useMenuTriggerMatch(\n /**\n * Text which triggers the menu. Everything after this text will be used as the query.\n */\n trigger: string,\n { maxLength = 75, minLength = 1 }: { maxLength?: number; minLength?: number },\n): TriggerFn {\n return useCallback(\n ({ query }) => {\n const validChars = '[^' + trigger + PUNCTUATION + '\\\\s]'\n const TypeaheadTriggerRegex = new RegExp(\n '(^|\\\\s|\\\\()(' +\n '[' +\n trigger +\n ']' +\n '((?:' +\n validChars +\n '){0,' +\n maxLength +\n '})' +\n ')$',\n )\n const match = TypeaheadTriggerRegex.exec(query)\n if (match !== null) {\n const maybeLeadingWhitespace = match[1]!\n\n /**\n * matchingString is only the text AFTER the trigger text. (So everything after the /)\n */\n const matchingString = match[3]!\n\n if (matchingString.length >= minLength) {\n return {\n leadOffset: match.index + maybeLeadingWhitespace.length,\n matchingString,\n replaceableString: match[2]!, // replaceableString is the trigger text + the matching string\n }\n }\n }\n return null\n },\n [maxLength, minLength, trigger],\n )\n}\n", "'use client'\nimport type { TextFormatType } from 'lexical'\n\nimport { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext'\nimport { TEXT_TYPE_TO_FORMAT, TextNode } from 'lexical'\nimport { useEffect } from 'react'\n\nimport type { SanitizedClientFeatures } from '../../../features/typesClient.js'\n\nexport function TextPlugin({ features }: { features: SanitizedClientFeatures }) {\n const [editor] = useLexicalComposerContext()\n\n useEffect(() => {\n const disabledFormats = getDisabledFormats(features.enabledFormats)\n if (disabledFormats.length === 0) {\n return\n }\n // Ideally override the TextNode with our own TextNode (changing its setFormat or toggleFormat methods),\n // would be more performant. If we find a noticeable perf regression we can switch to that option.\n // Overriding the FORMAT_TEXT_COMMAND and PASTE_COMMAND commands is not an option I considered because\n // there might be other forms of mutation that we might not be considering. For example:\n // browser extensions or Payload/Lexical plugins that have their own commands.\n return editor.registerNodeTransform(TextNode, (textNode) => {\n disabledFormats.forEach((disabledFormat) => {\n if (textNode.hasFormat(disabledFormat)) {\n textNode.toggleFormat(disabledFormat)\n }\n })\n })\n }, [editor, features])\n\n return null\n}\n\nfunction getDisabledFormats(enabledFormats: TextFormatType[]): TextFormatType[] {\n const allFormats = Object.keys(TEXT_TYPE_TO_FORMAT) as TextFormatType[]\n const enabledSet = new Set(enabledFormats)\n\n return allFormats.filter((format) => !enabledSet.has(format))\n}\n", "'use client'\nimport type { JSX } from 'react'\n\nimport { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext'\nimport { ContentEditable } from '@lexical/react/LexicalContentEditable.js'\nimport { getTranslation } from '@payloadcms/translations'\nimport { useTranslation } from '@payloadcms/ui'\n\nimport './ContentEditable.css'\n\nimport * as React from 'react'\n\nimport type { SanitizedClientEditorConfig } from '../config/types.js'\n\nimport { useEditorConfigContext } from '../config/client/EditorConfigProvider.js'\n\nexport function LexicalContentEditable({\n className,\n editorConfig,\n instructionsID,\n}: {\n className?: string\n editorConfig: SanitizedClientEditorConfig\n instructionsID?: string\n}): JSX.Element {\n const { fieldProps } = useEditorConfigContext()\n const { i18n, t } = useTranslation<{}, string>()\n const [_, { getTheme }] = useLexicalComposerContext()\n const theme = getTheme()\n return (\n <ContentEditable\n aria-describedby={instructionsID}\n aria-label={getTranslation(fieldProps.field.label || '', i18n)}\n aria-placeholder={t('lexical:general:placeholder')}\n aria-required={fieldProps.field.required || undefined}\n className={className ?? 'ContentEditable__root'}\n placeholder={\n <p className={theme?.placeholder}>\n {editorConfig?.admin?.placeholder ?? t('lexical:general:placeholder')}\n </p>\n }\n />\n )\n}\n", "'use client'\nimport { ChevronIcon, Popup, PopupList } from '@payloadcms/ui'\nimport React from 'react'\n\nimport { useRichTextView } from './RichTextViewProvider.js'\nimport './ViewSelector.css'\n\nexport function ViewSelector(): null | React.ReactElement {\n const { currentView, setCurrentView, views } = useRichTextView()\n\n // Don't show if no views or only default exists\n if (!views || Object.keys(views).length === 0) {\n return null\n }\n\n const viewKeys = Object.keys(views)\n const hasNonDefaultViews = viewKeys.some((key) => key !== 'default')\n\n // If only 'default' exists, no need to show selector\n if (!hasNonDefaultViews) {\n return null\n }\n\n // Build list of available views\n const allViews = ['default', ...viewKeys.filter((key) => key !== 'default')]\n\n const currentViewLabel = currentView.charAt(0).toUpperCase() + currentView.slice(1)\n\n return (\n <div className=\"lexical-view-selector\">\n <Popup\n button={\n <button className=\"lexical-view-selector__button\" type=\"button\">\n <span className=\"lexical-view-selector__label\">{currentViewLabel}</span>\n <ChevronIcon className=\"lexical-view-selector__icon\" />\n </button>\n }\n buttonType=\"custom\"\n horizontalAlign=\"left\"\n popupType=\"menu\"\n render={({ close }) => (\n <PopupList.ButtonGroup>\n {allViews.map((viewName) => {\n const viewLabel = viewName.charAt(0).toUpperCase() + viewName.slice(1)\n\n return (\n <PopupList.Button\n active={viewName === currentView}\n disabled={viewName === currentView}\n key={viewName}\n onClick={() => {\n setCurrentView?.(viewName)\n close()\n }}\n >\n {viewLabel}\n </PopupList.Button>\n )\n })}\n </PopupList.ButtonGroup>\n )}\n size=\"large\"\n />\n </div>\n )\n}\n"],
|
|
5
|
+
"mappings": "uOAIA,OAASA,kBAAAA,OAAsB,2BAC/B,OACEC,sBAAAA,GACAC,oBAAAA,GACAC,cAAAA,GACAC,cAAAA,GACAC,cAAAA,GACAC,yBAAAA,GACAC,aAAAA,GACAC,gBAAAA,GACAC,kBAAAA,GACAC,YAAAA,GACAC,aAAAA,GACAC,kBAAAA,OACK,iBACP,OAASC,oBAAAA,OAAwB,wBACjC,OAASC,UAAAA,OAAc,cAEvB,OAAOC,IAASC,eAAAA,GAAaC,aAAAA,GAAWC,WAAAA,GAASC,YAAAA,OAAgB,QACjE,OAASC,iBAAAA,OAAqB,uBAI9B,MAAO,kECvBP,OAASC,mBAAAA,OAAuB,oCAChC,OAASC,gBAAAA,OAAoB,iBAC7B,UAAYC,OAAW,QACvB,OAASC,WAAAA,OAAe,QCPxB,OAAAC,KAAAC,OAAA,4EACA,OAASC,6BAAAA,OAAiC,2CAC1C,OAASC,wBAAAA,OAA4B,yCACrC,OAASC,iBAAAA,OAAqB,yCAC9B,OAASC,kBAAAA,OAAsB,0CAC/B,OAASC,kBAAAA,OAAsB,0CAC/B,OAASC,sBAAAA,OAA0B,oCACnC,OAASC,kBAAAA,OAAsB,iBAC/B,OAASC,gBAAAA,GAAcC,wBAAAA,GAAsBC,iBAAAA,OAAqB,UAClE,UA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vider", "FieldDescription", "FieldError", "FieldLabel", "isFieldRTL", "RenderCustomComponent", "useConfig", "useEditDepth", "useEffectEvent", "useField", "useLocale", "useTranslation", "mergeFieldStyles", "dequal", "React", "useCallback", "useEffect", "useMemo", "useState", "ErrorBoundary", "LexicalComposer", "useEditDepth", "React", "useMemo", "c", "_c", "useLexicalComposerContext", "LexicalErrorBoundary", "HistoryPlugin", "OnChangePlugin", "RichTextPlugin", "useLexicalEditable", "useTranslation", "BLUR_COMMAND", "COMMAND_PRIORITY_LOW", "FOCUS_COMMAND", "React", "useEffect", "useState", "EditorPlugin", "anchorElem", "clientProps", "plugin", "position", "Component", "_jsx", "c", "_c", "copyToClipboard", "useLexicalComposerContext", "objectKlassEquals", "ObjectID", "$getSelection", "$isNodeSelection", "COMMAND_PRIORITY_LOW", "COPY_COMMAND", "useEffect", "changeIds", "node", "fields", "id", "default", "toHexString", "children", "child", "ClipboardPlugin", "$", "editor", "t0", "t1", "registerCommand", "event", "selection", "serializedNode", "getNodes", "exportJSON", "deepCloneSerializedNode", "JSON", "parse", "stringify", "lexicalClipboardData", "namespace", "_config", "nodes", "stringifiedLexicalClipboardData", "catch", "_temp", "ClipboardEvent", "then", "clipboardData", "Error", "lexicalStringified", "getData", "lexical", "node_0", "stringified", "setData", "error_0", "error", "c", "_c", "useLexicalComposerContext", "$findMatchingParent", "mergeRegister", "$createNodeSelection", "$getEditor", "$getNearestNodeFromDOMNode", "$getSelection", "$isDecoratorNode", "$isElementNode", "$isLineBreakNode", "$isNodeSelection", "$isRangeSelection", "$isRootOrShadowRoot", "$isTextNode", "$onUpdate", "$setSelection", "CLICK_COMMAND", "COMMAND_PRIORITY_LOW", "KEY_ARROW_DOWN_COMMAND", "KEY_ARROW_UP_COMMAND", "KEY_BACKSPACE_COMMAND", "KEY_DELETE_COMMAND", "SELECTION_CHANGE_COMMAND", "useEffect", "DecoratorPlugin", "$", "editor", "$onDelete", "t0", "t1", "_temp3", "_", "activeEditor", "hasSelectedDecorator", "$getSelectedDecorator", "decorator_0", "document", "_temp5", "_temp7", "event_2", "selection_1", "selection", "event", "preventDefault", "getNodes", "nextSibling", "element_0", "$selectDecorator", "element", "firstDescendant", "INTERNAL_$isBlock", "block_0", "block", "lastPoint", "isBackward", "lastNode", "_temp6", "lastSelectedBlock", "getNextSibling", "nextBlock", "nextBlockElement", "node_1", "event_1", "selection_0", "prevSibling", "lastDescendant", "selectStart", "firstPoint", "firstNode", "_temp4", "firstSelectedBlock", "getPreviousSibling", "prevBlock", "prevBlockElement", "node_0", "event_0", "querySelector", "classList", "decorator", "target", "isInteractive", "_temp2", "_temp", "node", "$getDecoratorByMouseEvent", "nodes", "getKey", "scrollIntoView", "behavior", "firstChild", "isLeafElement", "findLaterSiblingBlock", "current", "findFirstSiblingBlock", "useLexicalComposerContext", "$createParagraphNode", "isHTMLElement", "React", "useCallback", "useEffect", "useRef", "useState", "createPortal", "calculateDistanceFromScrollerElem", "scrollerElem", "pageX", "pageY", "target", "horizontalBuffer", "verticalBuffer", "distanceFromScrollerElem", "contains", "bottom", "left", "right", "top", "getBoundingClientRect", "adjustedTop", "window", "scrollY", "adjustedBottom", "$getNodeByKey", "getBoundingClientRectWithoutTransform", "elem", "rect", "getBoundingClientRect", "transformValue", "getComputedStyle", "getPropertyValue", "lastNumberOfTransformValue", "split", "pop", "y", "Number", "replace", "getCollapsedMargins", "elem", "getMargin", "element", "margin", "parseFloat", "window", "getComputedStyle", "marginBottom", "marginTop", "prevElemSiblingMarginBottom", "previousElementSibling", "nextElemSiblingMarginTop", "nextElementSibling", "collapsedTopMargin", "Math", "max", "$getRoot", "getTopLevelNodeKeys", "editor", "getEditorState", "read", "getChildrenKeys", "Downward", "Upward", "Indeterminate", "cache", "props", "result", "isPointClose", "previous", "current", "threshold", "dx", "x", "dy", "y", "getNodeCloseToPoint", "anchorElem", "cache_threshold", "editor", "fuzzy", "horizontalOffset", "point", "startIndex", "useEdgeAsDefault", "anchorElementRect", "getBoundingClientRect", "topLevelNodeKeys", "getTopLevelNodeKeys", "closestBlockElem", "blockElem", "blockNode", "distance", "Infinity", "foundAtIndex", "isFoundNodeEmptyParagraph", "getEditorState", "read", "firstNode", "getElementByKey", "lastNode", "length", "firstNodeRect", "lastNodeRect", "getBoundingClientRectWithoutTransform", "top", "$getNodeByKey", "bottom", "index", "direction", "key", "elem", "Point", "domRect", "Rect", "fromDOMRect", "marginBottom", "marginTop", "getCollapsedMargins", "rect", "generateNewRect", "left", "right", "isOnBottomSide", "isOnTopSide", "distanceFromPoint", "getType", "getTextContent", "returnEmptyParagraphs", "isOnHandleElement", "element", "handleElementClassName", "closest", "replacedElements", "doesLineHeightAffectElement", "htmlElem", "includes", "tagName", "offsetHeight", "offsetWidth", "style", "window", "getComputedStyle", "display", "position", "visibility", "opacity", "setHandlePosition", "targetElem", "handleElem", "anchorElem", "leftOffset", "style", "visibility", "opacity", "transform", "targetRect", "getBoundingClientRect", "targetStyle", "window", "getComputedStyle", "floatingElemRect", "anchorElementRect", "top", "some", "classes", "classList", "contains", "firstElementChild", "actualLineHeight", "doesLineHeightAffectElement", "parseInt", "lineHeight", "height", "left", "ADD_BLOCK_MENU_CLASSNAME", "prevIndex", "keysLength", "getCurrentIndex", "useAddBlockHandle", "editor", "anchorElem", "isEditable", "scrollerElem", "editorConfig", "useEditorConfigContext", "blockHandleHorizontalOffset", "menuRef", "setHoveredElement", "useState", "useEffect", "hoveredElement", "onDocumentMouseMove", "event", "target", "isHTMLElement", "distanceFromScrollerElem", "calculateDistanceFromScrollerElem", "isOnHandleElement", "topLevelNodeKeys", "getTopLevelNodeKeys", "_emptyBlockElem", "blockElem", "blockNode", "foundAtIndex", "cache_threshold", "horizontalOffset", "point", "x", "returnEmptyParagraphs", "startIndex", "elem", "document", "addEventListener", "setHandlePosition", "handleAddClick", "useCallback", "hoveredElementToUse", "isEmptyParagraph", "$createParagraphNode", "setTimeout", "newParagraph", "update", "node", "ENABLE_SLASH_MENU_COMMAND", "dispatchCommand", "event_0", "stopPropagation", "preventDefault", "_jsx", "createPortal", "className", "event_1", "onClick", "ref", "type", "AddBlockHandlePlugin", "t0", "t1", "useLexicalComposerContext", "useLexicalComposerContext", "eventFiles", "useTranslation", "$getNearestNodeFromDOMNode", "$getNodeByKey", "isHTMLElement", "React", "useEffect", "useId", "useRef", "useState", "createPortal", "TARGET_LINE_HALF_HEIGHT", "TEXT_BOX_HORIZONTAL_PADDING", "animationTimer", "setTargetLine", "offsetWidth", "offsetLeft", "targetLineElem", "targetBlockElem", "lastTargetBlock", "mouseY", "anchorElem", "event", "debugHighlightRef", "isFoundNodeEmptyParagraph", "height", "targetBlockElemHeight", "top", "targetBlockElemTop", "getBoundingClientRect", "anchorTop", "width", "anchorWidth", "marginBottom", "marginTop", "getCollapsedMargins", "lineTop", "isBelow", "window", "scrollY", "willStayInSamePosition", "elem", "nextElementSibling", "previousElementSibling", "lastBoundingBoxPosition", "boundingBox", "y", "currentBoundingBoxPosition", "targetElemTranslate2", "TARGET_LINE_HALF_HEIGHT", "left", "TEXT_BOX_HORIZONTAL_PADDING", "style", "opacity", "transform", "mergeRegister", "$getSelection", "$isNodeSelection", "$isRangeSelection", "COMMAND_PRIORITY_HIGH", "KEY_ARROW_DOWN_COMMAND", "KEY_ARROW_UP_COMMAND", "useEffect", "useKeyboardReordering", "editor", "instructionsID", "moveLine", "direction", "event", "isEditable", "altKey", "shiftKey", "ctrlKey", "metaKey", "selection", "node", "isCollapsed", "anchor", "getNode", "getNodes", "length", "getTopLevelElement", "preventDefault", "sibling", "getPreviousSibling", "getNextSibling", "insertBefore", "insertAfter", "registerCommand", "restore", "unregister", "registerRootListener", "root", "description", "getAttribute", "setAttribute", "filter", "Boolean", "join", "removeAttribute", "DRAGGABLE_BLOCK_MENU_CLASSNAME", "prevIndex", "DRAG_DATA_FORMAT", "keysLength", "getCurrentIndex", "setDragImage", "dataTransfer", "draggableBlockElem", "transform", "setTimeout", "hideTargetLine", "targetLineElem", "lastTargetBlockElem", "style", "marginBottom", "useDraggableBlockMenu", "editor", "anchorElem", "isEditable", "scrollerElem", "instructionsID", "t", "useKeyboardReordering", "menuRef", "useRef", "targetLineRef", "debugHighlightRef", "isDraggingBlockRef", "highlightTimersRef", "useState", "setDraggableBlockElem", "editorConfig", "useEditorConfigContext", "useEffect", "blockHandleHorizontalOffset", "target", "onDocumentMouseMove", "isHTMLElement", "event", "distanceFromScrollerElem", "calculateDistanceFromScrollerElem", "isOnHandleElement", "topLevelNodeKeys", "getTopLevelNodeKeys", "_draggableBlockElem", "blockElem", "foundAtIndex", "isFoundNodeEmptyParagraph", "cache_threshold", "horizontalOffset", "point", "Point", "startIndex", "useEdgeAsDefault", "document", "addEventListener", "setHandlePosition", "onDragover", "event_0", "isFileTransfer", "eventFiles", "pageY", "target_0", "distanceFromScrollerElem_0", "targetBlockElem", "fuzzy", "foundAtIndex_0", "preventDefault", "dropEffect", "isBelow", "willStayInSamePosition", "setTargetLine", "setLastTargetBlock", "boundingBox", "elem", "lastTargetBlock", "onDrop", "event_1", "isFileTransfer_0", "dragData", "update", "$getNodeByKey", "draggedNode", "target_1", "distanceFromScrollerElem_1", "targetBlockElem_0", "targetNode", "$getNearestNodeFromDOMNode", "targetBlockElemHeight", "height", "top", "targetBlockElemTop", "mouseY", "getBoundingClientRectWithoutTransform", "isFoundNodeEmptyParagraph_1", "insertBefore", "allPrevHighlighters", "querySelectorAll", "forEach", "newInsertedElem", "getElementByKey", "newInsertedElemRect", "highlightElem", "className", "backgroundColor", "transition", "zIndex", "pointerEvents", "boxSizing", "borderRadius", "position", "appendChild", "opacity", "width", "window", "removeTimer", "fadeTimer", "highlightTimer", "removeEventListener", "current", "dataTransfer_0", "nodeKey", "node", "onDragEnd", "createPortal", "_jsxs", "id", "_jsx", "draggable", "onDragStart", "ref", "type", "DraggableBlockPlugin", "t0", "t1", "useLexicalComposerContext", "c", "_c", "useLexicalComposerContext", "useTranslation", "$createParagraphNode", "$getRoot", "baseClass", "$", "_c", "InsertParagraphAtEndPlugin", "editor", "useLexicalComposerContext", "editorConfig", "useEditorConfigContext", "t", "useTranslation", "t0", "_temp", "onClick", "t1", "_jsx", "className", "type", "children", "paragraphNode", "$createParagraphNode", "$getRoot", "append", "c", "_c", "registerMarkdownShortcuts", "useLexicalComposerContext", "React", "MarkdownShortcutPlugin", "$", "_c", "editorConfig", "useEditorConfigContext", "editor", "useLexicalComposerContext", "t0", "t1", "features", "markdownTransformers", "registerMarkdownShortcuts", "useEffect", "c", "_c", "useLexicalComposerContext", "$getRoot", "useEffect", "refreshBlockDecorators", "editor", "update", "walk", "node", "type", "getType", "markDirty", "getChildren", "child", "$getRoot", "NodeViewOverridePlugin", "$", "_c", "useLexicalComposerContext", "currentView", "views", "useRichTextView", "t0", "t1", "default", "registerEditorNodeViews", "nodes", "clearEditorNodeViews", "useEffect", "useLexicalComposerContext", "$getSelection", "$isRangeSelection", "RootNode", "useEffect", "NormalizeSelectionPlugin", "editor", "registerNodeTransform", "root", "selection", "anchorNode", "anchor", "getNode", "focusNode", "focus", "isAttached", "selectEnd", "console", "warn", "useLexicalComposerContext", "$getSelection", "COMMAND_PRIORITY_LOW", "SELECT_ALL_COMMAND", "useEffect", "SelectAllPlugin", "editor", "registerCommand", "activeElement", "document", "HTMLInputElement", "select", "useLexicalComposerContext", "useTranslation", "useCallback", "useMemo", "useState", "ReactDOM", "c", "_c", "useMenuTriggerMatch", "trigger", "t0", "$", "_c", "maxLength", "t1", "minLength", "t2", "undefined", "t3", "t4", "query", "validChars", "PUNCTUATION", "match", "RegExp", "exec", "maybeLeadingWhitespace", "matchingString", "length", "leadOffset", "index", "replaceableString", "baseClass", "useMenuTriggerMatch", "isSelected", "item", "onClick", "onMouseEnter", "ref", "fieldProps", "featureClientSchemaMap", "useEditorConfigContext", "i18n", "useTranslation", "className", "title", "label", "schemaPath", "length", "_jsxs", "id", "role", "tabIndex", "type", "_jsx", "SlashMenuPlugin", "anchorElem", "editor", "useLexicalComposerContext", "editorConfig", "checkForTriggerMatch", "getDynamicItems", "useCallback", "groupWithItems", "queryString", "dynamicItem", "dynamicGroupWithItems", "groups", "groupsWithItems", "groupWithItem", "normalizedQuery", "group", "map", "filteredItems", "itemTitle", "normalizedTitle", "toLowerCase", "keywords", "keyword", "RegExp", "replace", "group_0", "dynamicItemGroups", "dynamicGroup", "group_2", "group_1", "group_3", "anchorElementRef", "menuRenderFn", "selectedItemKey", "selectItemAndCleanUp", "setSelectedItemKey", "group_4", "groupTitle", "index", "item_0", "key", "el", "onQueryChange", "c", "_c", "useLexicalComposerContext", "TEXT_TYPE_TO_FORMAT", "TextNode", "useEffect", "TextPlugin", "t0", "$", "features", "editor", "t1", "enabledFormats", "disabledFormats", "getDisabledFormats", "length", "registerNodeTransform", "textNode", "forEach", "disabledFormat", "hasFormat", "toggleFormat", "t2", "allFormats", "Object", "keys", "enabledSet", "Set", "filter", "format", "has", "c", "_c", "useLexicalComposerContext", "ContentEditable", "getTranslation", "useTranslation", "useEditorConfigContext", "t0", "$", "_c", "LexicalContentEditable", "className", "editorConfig", "instructionsID", "fieldProps", "i18n", "t", "useTranslation", "getTheme", "t1", "t2", "theme", "_jsx", "ContentEditable", "getTranslation", "placeholder", "LexicalContentEditable", "$", "_c", "LexicalEditor", "editorConfig", "editorContainerRef", "isSmallWidthViewport", "onChange", "rtl", "props", "useEditorConfigContext", "editorConfigContext", "isEditable", "useLexicalComposerContext", "t", "useTranslation", "instructionsID", "React", "hasTabIndentation", "useState", "enabledFeatures", "t0", "_floatingAnchorElem", "setFloatingAnchorElem", "onRef", "t1", "t2", "editor", "console", "parentEditor", "handleFocus", "handleBlur", "unregisterFocus", "FOCUS_COMMAND", "COMMAND_PRIORITY_LOW", "BLUR_COMMAND", "unregisterBlur", "useEffect", "Fragment", "_temp", "_jsxs", "children", "className", "dir", "ref", "_temp2", "_jsx", "RichTextPlugin", "features", "contentEditable", "NormalizeSelectionPlugin", "ignoreSelectionChange", "editor_0", "tags", "editorState", "floatingAnchorElem", "DraggableBlockPlugin", "anchorElem", "plugin_1", "plugins", "plugin", "position", "EditorPlugin", "clientProps", "SlashMenuPlugin", "MarkdownShortcutPlugin", "HistoryPlugin", "markdownTransformers", "_temp4", "length", "id", "_temp5", "plugin_0", "_temp3", "plugin_2", "plugin_3", "plugin_4", "NestProviders", "children", "providers", "length", "Component", "_jsx", "slice", "LexicalProvider", "props", "composerKey", "editorConfig", "fieldProps", "isSmallWidthViewport", "onChange", "readOnly", "rtl", "value", "currentView", "views", "useRichTextView", "parentContext", "useEditorConfigContext", "editDepth", "useEditDepth", "editorContainerRef", "useRef", "initialConfig", "useMemo", "Error", "JSON", "stringify", "Array", "isArray", "nodeViews", "nodes", "editable", "editorState", "undefined", "namespace", "lexical", "getEnabledNodes", "onError", "error", "theme", "LexicalComposer", "EditorConfigProvider", "features", "LexicalEditorComponent", "c", "_c", "ChevronIcon", "Popup", "PopupList", "ViewSelector", "$", "_c", "currentView", "setCurrentView", "views", "useRichTextView", "t0", "t1", "Symbol", "bb0", "viewKeys", "keys", "_temp", "hasNonDefaultViews", "allViews", "_temp2", "filter", "_jsx", "currentViewLabel", "className", "Popup", "children", "button", "type", "ChevronIcon", "horizontalAlign", "popupType", "render", "t2", "close", "PopupList", "ButtonGroup", "viewLabel", "map", "viewName", "charAt", "Button", "active", "disabled", "onClick", "key_0", "key", "baseClass", "useRichTextView", "RichTextComponent", "props", "editorConfig", "field", "admin", "className", "readOnlyFromAdmin", "description", "localized", "label", "required", "readOnlyFromTopLevelProps", "path", "readOnly", "schemaPath", "validate", "i18n", "useTranslation", "readOnlyFromProps", "locale", "localizationConfig", "config", "localization", "rtl", "isFieldRTL", "fieldLocalized", "isControlledByParent", "validationOptions", "AfterInput", "customComponents", "BeforeInput", "Description", "Error", "Label", "initialValue", "disabled", "setValue", "showError", "value", "memoizedValidate", "isSmallWidthViewport", "setIsSmallWidthViewport", "useState", "disabledFromField", "prevInitialValueRef", "React", "prevValueRef", "rerenderProviderKey", "setRerenderProviderKey", "useEffect", "useRef", "isNextSmallWidthViewport", "updateViewPortWidth", "window", "addEventListener", "removeEventListener", "classes", "editDepth", "useRunDeprioritized", "runDeprioritized", "useCallback", "editorState", "newState", "updateFieldValue", "styles", "useEffectEvent", "initialValue_0", "value_0", "dequal", "current", "handleInitialValueChange", "_jsxs", "getTranslation", "role", "style", "_jsx", "FieldLabel", "hasRequiredAccessibleState", "ViewSelector", "RenderCustomComponent", "CustomComponent", "Fallback", "fallbackRender", "onReset", "BulkUploadProvider", "modalSlugPrefix", "pathWithEditDepth", "composerKey", "fieldProps", "handleChange", "onChange", "error"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use client";import{a as b}from"./chunk-DBWINSQN.js";import{a as R}from"./chunk-WSAPGI3Z.js";import{jsx as l,jsxs as d}from"react/jsx-runtime";import{useLexicalComposerContext as k}from"@lexical/react/LexicalComposerContext.js";import{useLexicalEditable as K}from"@lexical/react/useLexicalEditable";import{getTranslation as U}from"@payloadcms/translations";import{Button as $,useConfig as H,usePayloadAPI as M,useTranslation as O}from"@payloadcms/ui";import{$getNodeByKey as W,$getSelection as q,$isNodeSelection as z,$isRangeSelection as F}from"lexical";import{formatAdminURL as G}from"payload/shared";import J,{useCallback as Q,useEffect as N,useReducer as V,useRef as X,useState as v}from"react";var C={depth:0},re=S=>{let{className:e,data:{relationTo:w,value:a},nodeKey:o}=S;if(typeof a=="object")throw new Error("Relationship value should be a string or number. The Lexical Relationship component should not receive the populated value object.");let m=X(null),[i]=k(),r=K(),[p,c]=v(!1),{config:{routes:{api:x},serverURL:D},getEntityConfig:E}=H(),[s]=v(()=>E({collectionSlug:w})),{i18n:y,t:u}=O(),[f,L]=V(t=>t+1,0),[{data:h},{setParams:g}]=M(G({apiRoute:x,path:`/${s.slug}/${a}`,serverURL:D}),{initialParams:C}),{closeDocumentDrawer:_,DocumentDrawer:T,DocumentDrawerToggler:j}=R({id:a,collectionSlug:s.slug});N(()=>i.registerUpdateListener(({editorState:t})=>{t.read(()=>{let n=q();if(z(n))c(n.has(o));else if(F(n)){let I=n.getNodes();c(I.some(P=>P.getKey()===o))}else c(!1)})}),[i,o]),N(()=>{let t=m.current?.closest(`.${e}`);t&&t.classList.toggle(`${e}--selected`,p)},[p,e]);let A=Q(()=>{i.update(()=>{W(o)?.remove()})},[i,o]),B=J.useCallback(()=>{g({...C,cacheBust:f}),_(),L()},[f,g,_]);return d("div",{className:`${e}__contents`,contentEditable:!1,ref:m,children:[d("div",{className:`${e}__wrap`,children:[l("p",{className:`${e}__label`,children:u("fields:labelRelationship",{label:s.labels?.singular?U(s.labels?.singular,y):s.slug})}),l(j,{className:`${e}__doc-drawer-toggler`,children:l("p",{className:`${e}__title`,children:h?h[s?.admin?.useAsTitle||"id"]:a})})]}),r&&d("div",{className:`${e}__actions`,children:[l($,{buttonStyle:"ghost",className:`${e}__swapButton`,disabled:!r,el:"button",icon:"swap",onClick:()=>{o&&i.dispatchCommand(b,{replace:{nodeKey:o}})},round:!0,tooltip:u("fields:swapRelationship")}),l($,{buttonStyle:"ghost",className:`${e}__removeButton`,disabled:!r,icon:"x",onClick:t=>{t.preventDefault(),A()},round:!0,tooltip:u("fields:removeRelationship")})]}),!!a&&l(T,{onSave:B})]})};export{re as RelationshipComponent};
|
|
2
|
+
//# sourceMappingURL=RelationshipComponent-YCPAKOL7.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/features/relationship/client/components/RelationshipComponent.tsx"],
|
|
4
|
+
"sourcesContent": ["'use client'\nimport type { ElementFormatType } from 'lexical'\n\nimport { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext.js'\nimport { useLexicalEditable } from '@lexical/react/useLexicalEditable'\nimport { getTranslation } from '@payloadcms/translations'\nimport { Button, useConfig, usePayloadAPI, useTranslation } from '@payloadcms/ui'\nimport { $getNodeByKey, $getSelection, $isNodeSelection, $isRangeSelection } from 'lexical'\nimport { formatAdminURL } from 'payload/shared'\nimport React, { useCallback, useEffect, useReducer, useRef, useState } from 'react'\n\nimport type { RelationshipData } from '../../server/schema.js'\n\nimport './index.css'\nimport { useLexicalDocumentDrawer } from '../../../../utilities/fieldsDrawer/useLexicalDocumentDrawer.js'\nimport { INSERT_RELATIONSHIP_WITH_DRAWER_COMMAND } from '../drawer/commands.js'\n\nconst initialParams = {\n depth: 0,\n}\n\ntype Props = {\n className: string\n data: RelationshipData\n format?: ElementFormatType\n nodeKey?: string\n}\n\nexport const RelationshipComponent: React.FC<Props> = (props) => {\n const {\n className: baseClass,\n data: { relationTo, value },\n nodeKey,\n } = props\n\n if (typeof value === 'object') {\n throw new Error(\n 'Relationship value should be a string or number. The Lexical Relationship component should not receive the populated value object.',\n )\n }\n\n const relationshipElemRef = useRef<HTMLDivElement | null>(null)\n\n const [editor] = useLexicalComposerContext()\n const isEditable = useLexicalEditable()\n const [isSelected, setIsSelected] = useState(false)\n const {\n config: {\n routes: { api },\n serverURL,\n },\n getEntityConfig,\n } = useConfig()\n\n const [relatedCollection] = useState(() => getEntityConfig({ collectionSlug: relationTo }))\n\n const { i18n, t } = useTranslation()\n const [cacheBust, dispatchCacheBust] = useReducer((state) => state + 1, 0)\n const [{ data }, { setParams }] = usePayloadAPI(\n formatAdminURL({ apiRoute: api, path: `/${relatedCollection.slug}/${value}`, serverURL }),\n { initialParams },\n )\n\n const { closeDocumentDrawer, DocumentDrawer, DocumentDrawerToggler } = useLexicalDocumentDrawer({\n id: value,\n collectionSlug: relatedCollection.slug,\n })\n\n useEffect(() => {\n return editor.registerUpdateListener(({ editorState }) => {\n editorState.read(() => {\n const selection = $getSelection()\n\n if ($isNodeSelection(selection)) {\n setIsSelected(selection.has(nodeKey!))\n } else if ($isRangeSelection(selection)) {\n const nodes = selection.getNodes()\n setIsSelected(nodes.some((node) => node.getKey() === nodeKey))\n } else {\n setIsSelected(false)\n }\n })\n })\n }, [editor, nodeKey])\n\n useEffect(() => {\n const outerEl = relationshipElemRef.current?.closest(`.${baseClass}`)\n\n if (outerEl) {\n outerEl.classList.toggle(`${baseClass}--selected`, isSelected)\n }\n }, [isSelected, baseClass])\n\n const removeRelationship = useCallback(() => {\n editor.update(() => {\n $getNodeByKey(nodeKey!)?.remove()\n })\n }, [editor, nodeKey])\n\n const updateRelationship = React.useCallback(() => {\n setParams({\n ...initialParams,\n cacheBust, // do this to get the usePayloadAPI to re-fetch the data even though the URL string hasn't changed\n })\n\n closeDocumentDrawer()\n dispatchCacheBust()\n }, [cacheBust, setParams, closeDocumentDrawer])\n\n return (\n <div className={`${baseClass}__contents`} contentEditable={false} ref={relationshipElemRef}>\n <div className={`${baseClass}__wrap`}>\n <p className={`${baseClass}__label`}>\n {t('fields:labelRelationship', {\n label: relatedCollection.labels?.singular\n ? getTranslation(relatedCollection.labels?.singular, i18n)\n : relatedCollection.slug,\n })}\n </p>\n <DocumentDrawerToggler className={`${baseClass}__doc-drawer-toggler`}>\n <p className={`${baseClass}__title`}>\n {data ? data[relatedCollection?.admin?.useAsTitle || 'id'] : value}\n </p>\n </DocumentDrawerToggler>\n </div>\n {isEditable && (\n <div className={`${baseClass}__actions`}>\n <Button\n buttonStyle=\"ghost\"\n className={`${baseClass}__swapButton`}\n disabled={!isEditable}\n el=\"button\"\n icon=\"swap\"\n onClick={() => {\n if (nodeKey) {\n editor.dispatchCommand(INSERT_RELATIONSHIP_WITH_DRAWER_COMMAND, {\n replace: { nodeKey },\n })\n }\n }}\n round\n tooltip={t('fields:swapRelationship')}\n />\n <Button\n buttonStyle=\"ghost\"\n className={`${baseClass}__removeButton`}\n disabled={!isEditable}\n icon=\"x\"\n onClick={(e) => {\n e.preventDefault()\n removeRelationship()\n }}\n round\n tooltip={t('fields:removeRelationship')}\n />\n </div>\n )}\n\n {!!value && <DocumentDrawer onSave={updateRelationship} />}\n </div>\n )\n}\n"],
|
|
5
|
+
"mappings": "+IAGA,OAASA,6BAAAA,MAAiC,2CAC1C,OAASC,sBAAAA,MAA0B,oCACnC,OAASC,kBAAAA,MAAsB,2BAC/B,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CC,UAAA,GAAY3D,CAAA,eACZC,SAAA,CAAWO,EACXoD,GAAAA,SACAC,KAAG,OACHC,QAAK,IAAA,CACLC,GACE1B,EAAIjC,gBAASP,EAAA,CACXwC,QAAO2B,CACLC,QAAAA,MAGN,MAAA,GACAC,QAAK9C,EAAA,yBAAA,IACMoC,EAAAE,EAAA,qBAGXC,UAAA,GAAY3D,CAAA,iBACZC,SAAA,CAAWO,EACXoD,KAAAA,IACAE,QAAKK,GAAA,CACLJ,EAAAA,eAAU,EACRI,EAAgB,GAElB,MAAA,GACAD,QAAK9C,EAAA,2BAAA,GACLgD,qBAKH/D,GAAyBgE",
|
|
6
|
+
"names": ["useLexicalComposerContext", "useLexicalEditable", "getTranslation", "Button", "useConfig", "usePayloadAPI", "useTranslation", "$getNodeByKey", "$getSelection", "$isNodeSelection", "$isRangeSelection", "formatAdminURL", "React", "useCallback", "useEffect", "useReducer", "useRef", "useState", "initialParams", "INSERT_RELATIONSHIP_WITH_DRAWER_COMMAND", "RelationshipComponent", "props", "baseClass", "className", "data", "relationTo", "nodeKey", "value", "relationshipElemRef", "useRef", "isEditable", "useLexicalComposerContext", "useLexicalEditable", "config", "routes", "serverURL", "getEntityConfig", "useConfig", "useState", "relatedCollection", "collectionSlug", "i18n", "t", "useTranslation", "dispatchCacheBust", "useReducer", "state", "cacheBust", "setParams", "usePayloadAPI", "apiRoute", "api", "path", "closeDocumentDrawer", "DocumentDrawer", "DocumentDrawerToggler", "useLexicalDocumentDrawer", "id", "useEffect", "editor", "editorState", "$getSelection", "$isNodeSelection", "setIsSelected", "selection", "nodes", "$isRangeSelection", "getNodes", "node", "outerEl", "isSelected", "useCallback", "removeRelationship", "React", "updateRelationship", "contentEditable", "ref", "_jsxs", "_jsx", "getTranslation", "Button", "buttonStyle", "disabled", "el", "icon", "onClick", "dispatchCommand", "replace", "round", "e", "tooltip", "onSave"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
var P=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";import{c as ce}from"react/compiler-runtime";import{useRef as le}from"react";function Ze(o){let e=ce(2),n=o===void 0?500:o,i=le(void 0),t;return e[0]!==n?(t=c=>new Promise(a=>{let s=()=>{c(),a()};"requestIdleCallback"in window?("cancelIdleCallback"in window&&i.current!==void 0&&cancelIdleCallback(i.current),i.current=requestIdleCallback(s,{timeout:n})):ae().then(s)}),e[0]=n,e[1]=t):t=e[1],t}function ae(){return new Promise(o=>{setTimeout(o,100),requestAnimationFrame(()=>{setTimeout(o,0)})})}import{jsx as ue}from"react/jsx-runtime";import{useControllableState as fe}from"@payloadcms/ui";import{createContext as de,use as he,useMemo as me}from"react";var V=de({currentView:"default",inheritable:!1,setCurrentView:()=>{}}),rt=o=>{let e=pe(),n=o.currentView!==void 0,i=e.inheritable&&(!!e.views||!!e.hasExplicitCurrentView),t=n||e.inheritable&&!!e.hasExplicitCurrentView,{children:r,currentView:c,inheritable:a,views:s}={children:o.children,currentView:i?e.currentView:o.currentView,inheritable:e.inheritable||o.inheritable,views:i&&e.views?e.views:o.views},[f,d]=fe(c,"default"),h=s&&f!=="default"&&!s[f]?"default":f,m=me(()=>{let y=s?s[h]:void 0;return{currentView:h,currentViewMap:y,hasExplicitCurrentView:t,inheritable:a,isControlledByParent:i,setCurrentView:d,views:s}},[h,a,t,i,d,s]);return ue(V,{value:m,children:r})};function pe(){return he(V)}var T=class{_x;_y;constructor(e,n){this._x=e,this._y=n}calcDeltaXTo({x:e}){return this.x-e}calcDeltaYTo({y:e}){return this.y-e}calcDistanceTo(e){return Math.sqrt(Math.pow(this.calcDeltaXTo(e),2)+Math.pow(this.calcDeltaYTo(e),2))}calcHorizontalDistanceTo(e){return Math.abs(this.calcDeltaXTo(e))}calcVerticalDistance(e){return Math.abs(this.calcDeltaYTo(e))}equals({x:e,y:n}){return this.x===e&&this.y===n}get x(){return this._x}get y(){return this._y}};function $(o){return o instanceof T}import{jsx as Le}from"react/jsx-runtime";import{useLexicalComposerContext as Be}from"@lexical/react/LexicalComposerContext.js";import{mergeRegister as Pe}from"@lexical/utils";import{$getSelection as I,$isRangeSelection as N,$isTextNode as Ve,COMMAND_PRIORITY_LOW as $e,createCommand as Ye,getDOMSelection as We}from"lexical";import{useCallback as z,useEffect as J,useState as je}from"react";import*as E from"react";import{c as X}from"react/compiler-runtime";import{useLexicalComposerContext as q}from"@lexical/react/LexicalComposerContext.js";import{getScrollParent as ge,mergeRegister as Y}from"@lexical/utils";import{$getSelection as U,$isRangeSelection as _e,$setSelection as we,COMMAND_PRIORITY_LOW as ye,COMMAND_PRIORITY_NORMAL as b,createCommand as Oe,KEY_ARROW_DOWN_COMMAND as xe,KEY_ARROW_UP_COMMAND as be,KEY_ENTER_COMMAND as Ce,KEY_ESCAPE_COMMAND as Me,KEY_TAB_COMMAND as Se}from"lexical";import{useCallback as v,useEffect as x,useLayoutEffect as Re,useMemo as De,useRef as Te,useState as ve}from"react";var Ee="slash-menu-popup",W=o=>{let e=document.getElementById("slash-menu");if(!e)return;let n=e.getBoundingClientRect();n.top+n.height>window.innerHeight&&e.scrollIntoView({block:"center"}),n.top<0&&e.scrollIntoView({block:"center"}),o.scrollIntoView({block:"nearest"})};function Ie(o,e,n){let i=n;for(let t=i;t<=e.length;t++)o.substring(o.length-t)===e.substring(0,t)&&(i=t);return i}function Ne(o){let e=U();if(!_e(e)||!e.isCollapsed())return;let n=e.anchor;if(n.type!=="text")return;let i=n.getNode();if(!i.isSimpleText())return;let t=n.offset,r=i.getTextContent().slice(0,t),c=o.replaceableString.length,a=Ie(r,o.matchingString,c),s=t-a;if(s<0)return;let f;return s===0?[f]=i.splitText(t):[,f]=i.splitText(s,t),f}function j(o,e){let n=o.getBoundingClientRect(),i=e.getBoundingClientRect();return n.top>i.top&&n.top<i.bottom}function ke(o,e,n,i){let t=X(7),[r]=q(),c,a;t[0]!==r||t[1]!==n||t[2]!==i||t[3]!==o||t[4]!==e?(c=()=>{let s=e.current;if(s!=null&&o!=null){let f=r.getRootElement(),d=f!=null?ge(f,!1):document.body,h=!1,m=j(s,d),y=function(){h||(window.requestAnimationFrame(function(){n(),h=!1}),h=!0);let l=j(s,d);l!==m&&(m=l,i?.(l))},u=new ResizeObserver(n);return window.addEventListener("resize",n),document.addEventListener("scroll",y,{capture:!0,passive:!0}),u.observe(s),()=>{u.disconnect(),window.removeEventListener("resize",n),document.removeEventListener("scroll",y,!0)}}},a=[r,i,n,o,e],t[0]=r,t[1]=n,t[2]=i,t[3]=o,t[4]=e,t[5]=c,t[6]=a):(c=t[5],a=t[6]),x(c,a)}var H=Oe("SCROLL_TYPEAHEAD_OPTION_INTO_VIEW_COMMAND");function F({anchorElementRef:o,close:e,editor:n,groups:i,menuRenderFn:t,resolution:r,shouldSplitNodeWithQuery:c=!1}){let[a,s]=ve(null),f=r.match&&r.match.matchingString||"",d=v(u=>{let l=n.getRootElement();l!==null&&(l.setAttribute("aria-activedescendant",`${Ee}__item-${u.key}`),s(u.key))},[n]),h=v(()=>{if(i!==null&&f!=null){let u=i.flatMap(l=>l.items);if(u.length){let l=u[0];d(l)}}},[i,d,f]);x(()=>{h()},[f,h]);let m=v(u=>{e(),n.update(()=>{let l=r.match!=null&&c?Ne(r.match):null;l&&l.remove()}),setTimeout(()=>{let l;n.read(()=>{l=U()?.clone()}),n.update(()=>{l&&we(l)}),u.onSelect({editor:n,queryString:r.match?r.match.matchingString:""})},0)},[n,c,r.match,e]);x(()=>()=>{let u=n.getRootElement();u!==null&&u.removeAttribute("aria-activedescendant")},[n]),Re(()=>{i===null?s(null):a===null&&h()},[i,a,d,h]),x(()=>Y(n.registerCommand(H,({item:u})=>u.ref&&u.ref.current!=null?(W(u.ref.current),!0):!1,ye)),[n,d]),x(()=>Y(n.registerCommand(xe,u=>{let l=u;if(i!==null&&i.length&&a!==null){let g=i.flatMap(_=>_.items),p=g.findIndex(_=>_.key===a),O=p!==g.length-1?p+1:0,w=g[O];if(!w)return!1;d(w),w.ref!=null&&w.ref.current&&n.dispatchCommand(H,{index:O,item:w}),l.preventDefault(),l.stopImmediatePropagation()}return!0},b),n.registerCommand(be,u=>{let l=u;if(i!==null&&i.length&&a!==null){let g=i.flatMap(_=>_.items),p=g.findIndex(_=>_.key===a),O=p!==0?p-1:g.length-1,w=g[O];if(!w)return!1;d(w),w.ref!=null&&w.ref.current&&W(w.ref.current),l.preventDefault(),l.stopImmediatePropagation()}return!0},b),n.registerCommand(Me,u=>{let l=u;return l.preventDefault(),l.stopImmediatePropagation(),e(),!0},b),n.registerCommand(Se,u=>{let l=u;if(i===null||a===null)return!1;let p=i.flatMap(O=>O.items).find(O=>O.key===a);return p?(l.preventDefault(),l.stopImmediatePropagation(),m(p),!0):!1},b),n.registerCommand(Ce,u=>{if(i===null||a===null)return!1;let g=i.flatMap(p=>p.items).find(p=>p.key===a);return g?(u!==null&&(u.preventDefault(),u.stopImmediatePropagation()),m(g),!0):!1},b)),[m,e,n,i,a,d]);let y=De(()=>({groups:i,selectedItemKey:a,selectItemAndCleanUp:m,setSelectedItemKey:s}),[m,a,i]);return t(o,y,r.match?r.match.matchingString:"")}function Ae(o,e){e!=null&&(o.className=e),o.setAttribute("aria-label","Slash menu"),o.setAttribute("role","listbox"),o.style.display="block",o.style.position="absolute"}function K(o,e,n,i){let t=X(14),[r]=q(),c;t[0]===Symbol.for("react.memo_cache_sentinel")?(c=P?document.createElement("div"):null,t[0]=c):c=t[0];let a=Te(c),s;t[1]!==o||t[2]!==i||t[3]!==r||t[4]!==e?(s=()=>{if(a.current===null||parent===void 0)return;let u=r.getRootElement(),l=a.current,g=l.firstChild;if(u!==null&&e!==null){let{height:p,width:O}=e.getRect(),{left:w,top:_}=e.getRect(),M=_;if(_=_-(o.getBoundingClientRect().top+window.scrollY),w=w-(o.getBoundingClientRect().left+window.scrollX),l.style.left=`${w+window.scrollX}px`,l.style.height=`${p}px`,l.style.width=`${O}px`,g!==null){let S=g.getBoundingClientRect(),A=S.height,R=S.width,D=u.getBoundingClientRect(),L=document.dir==="rtl"||document.documentElement.dir==="rtl",ie=o.getBoundingClientRect(),B=Math.max(0,D.left);if(!L&&w+R>D.right)l.style.left=`${D.right-R+window.scrollX}px`;else if(L&&S.left<B){let se=B+R-ie.left;l.style.left=`${se+window.scrollX}px`}let oe=M+A+32>window.innerHeight,re=M<0;oe&&!re?l.style.top=`${_+32-A+window.scrollY-(p+24)}px`:l.style.top=`${_+window.scrollY+32}px`}l.isConnected||(Ae(l,i),o.append(l)),l.setAttribute("id","slash-menu"),a.current=l,u.setAttribute("aria-controls","slash-menu")}},t[1]=o,t[2]=i,t[3]=r,t[4]=e,t[5]=s):s=t[5];let f=s,d,h;t[6]!==r||t[7]!==f||t[8]!==e?(d=()=>{let u=r.getRootElement();if(e!==null)return f(),()=>{u!==null&&u.removeAttribute("aria-controls");let l=a.current;l!==null&&l.isConnected&&(l.remove(),l.removeAttribute("id"))}},h=[r,f,e],t[6]=r,t[7]=f,t[8]=e,t[9]=d,t[10]=h):(d=t[9],h=t[10]),x(d,h);let m;return t[11]!==e||t[12]!==n?(m=u=>{e!==null&&(u||n(null))},t[11]=e,t[12]=n,t[13]=m):m=t[13],ke(e,a,f,m),a}var xt=`\\.,\\+\\*\\?\\$\\@\\|#{}\\(\\)\\^\\-\\[\\]\\\\/!%'"~=<>_:;`;function He(o){let e=o.anchor;if(e.type!=="text")return null;let n=e.getNode();if(!n.isSimpleText())return null;let i=e.offset;return n.getTextContent().slice(0,i)}function G(o,e,n){let i=We(n);if(i===null||!i.isCollapsed)return!1;let t=i.anchorNode,r=o,c=i.anchorOffset;if(t==null||c==null)return!1;try{e.setStart(t,r),e.setEnd(t,c>1?c:1)}catch{return!1}return!0}function Xe(o){let e;return o.getEditorState().read(()=>{let n=I();N(n)&&(e=He(n))}),e}function Q(o,e){return e!==0?!1:o.getEditorState().read(()=>{let n=I();if(N(n)){let r=n.anchor.getNode().getPreviousSibling();return Ve(r)&&r.isTextEntity()}return!1})}function Z(o){E.startTransition?E.startTransition(o):o()}var qe=Ye("ENABLE_SLASH_MENU_COMMAND");function bt({anchorClassName:o,anchorElem:e,groups:n,menuRenderFn:i,onClose:t,onOpen:r,onQueryChange:c,triggerFn:a}){let[s]=Be(),[f,d]=je(null),h=K(e,f,d,o),m=z(()=>{d(null),t!=null&&f!==null&&t()},[t,f]),y=z(u=>{d(u),r!=null&&f===null&&r(u)},[r,f]);return J(()=>Pe(s.registerCommand(qe,({node:u})=>(s.getEditorState().read(()=>{let l={leadOffset:0,matchingString:"",replaceableString:""};if(!Q(s,l.leadOffset)&&u!==null){let g=s._window??window,p=g.document.createRange();G(l.leadOffset,p,g)!==null&&Z(()=>y({getRect:()=>p.getBoundingClientRect(),match:l}));return}}),!0),$e)),[s,y]),J(()=>{let u=()=>{s.getEditorState().read(()=>{let g=s._window??window,p=g.document.createRange(),O=I(),w=Xe(s);if(!N(O)||!O.isCollapsed()||w===void 0||p===null){m();return}let _=a({editor:s,query:w});if(c(_?_.matchingString:null),_!==null&&!Q(s,_.leadOffset)&&G(_.leadOffset,p,g)!==null){Z(()=>y({getRect:()=>p.getBoundingClientRect(),match:_}));return}m()})},l=s.registerUpdateListener(u);return()=>{l()}},[s,a,c,f,m,y]),h.current===null||f===null||s===null?null:Le(F,{anchorElementRef:h,close:m,editor:s,groups:n,menuRenderFn:i,resolution:f,shouldSplitNodeWithQuery:!0})}var ee=class o{_bottom;_left;_right;_top;constructor(e,n,i,t){let[r,c]=n<=t?[n,t]:[t,n],[a,s]=e<=i?[e,i]:[i,e];this._top=r,this._right=s,this._left=a,this._bottom=c}static fromDOM(e){let{height:n,left:i,top:t,width:r}=e.getBoundingClientRect();return o.fromLWTH(i,r,t,n)}static fromDOMRect(e){let{height:n,left:i,top:t,width:r}=e;return o.fromLWTH(i,r,t,n)}static fromLTRB(e,n,i,t){return new o(e,n,i,t)}static fromLWTH(e,n,i,t){return new o(e,i,e+n,i+t)}static fromPoints(e,n){let{x:i,y:t}=e,{x:r,y:c}=n;return o.fromLTRB(i,t,r,c)}contains(e){if($(e)){let{x:c,y:a}=e,s=a<this._top,f=a>this._bottom,d=c<this._left,h=c>this._right;return{reason:{isOnBottomSide:f,isOnLeftSide:d,isOnRightSide:h,isOnTopSide:s},result:!s&&!f&&!d&&!h}}let{bottom:n,left:i,right:t,top:r}=e;return r>=this._top&&r<=this._bottom&&n>=this._top&&n<=this._bottom&&i>=this._left&&i<=this._right&&t>=this._left&&t<=this._right}distanceFromPoint(e){let n=this.contains(e);if(n.result)return{distance:0,isOnBottomSide:n.reason.isOnBottomSide,isOnLeftSide:n.reason.isOnLeftSide,isOnRightSide:n.reason.isOnRightSide,isOnTopSide:n.reason.isOnTopSide};let i=0,t=0;return e.x<this._left?i=this._left-e.x:e.x>this._right&&(i=e.x-this._right),e.y<this._top?t=this._top-e.y:e.y>this._bottom&&(t=e.y-this._bottom),{distance:Math.sqrt(i*i+t*t),isOnBottomSide:e.y>this._bottom,isOnLeftSide:e.x<this._left,isOnRightSide:e.x>this._right,isOnTopSide:e.y<this._top}}equals({bottom:e,left:n,right:i,top:t}){return t===this._top&&e===this._bottom&&n===this._left&&i===this._right}generateNewRect({bottom:e=this.bottom,left:n=this.left,right:i=this.right,top:t=this.top}){return new o(n,t,i,e)}intersectsWith(e){let{height:n,left:i,top:t,width:r}=e,{height:c,left:a,top:s,width:f}=this,d=i+r>=a+f?i+r:a+f,h=t+n>=s+c?t+n:s+c,m=i<=a?i:a,y=t<=s?t:s;return d-m<=r+f&&h-y<=n+c}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)}};import k from"react";var C=new WeakMap;function Dt(o,e){C.has(o)||C.set(o,new Map);let n=C.get(o);for(let[i,t]of Object.entries(e))if(!(!t||typeof t!="object")){if(i==="blocks"){for(let[r,c]of Object.entries(t))n.set(`block:${r}`,c);continue}if(i==="inlineBlocks"){for(let[r,c]of Object.entries(t))n.set(`inlineBlock:${r}`,c);continue}n.set(i,t)}}function Tt(o){C.delete(o)}function te(o,e,n){let i=C.get(o);if(e==="block"&&n?.__fields?.blockType){let t=n.__fields.blockType;return i?.get(`block:${t}`)}if(e==="inlineBlock"&&n?.__fields?.blockType){let t=n.__fields.blockType;return i?.get(`inlineBlock:${t}`)}return i?.get(e)}function Ue({node:o,nodeType:e}){if(!("getType"in o)||o.getType()!==e)return;let n=o;if(n.prototype._originalDecorate||(n.prototype._originalDecorate=n.prototype.decorate),n.prototype._originalCreateDOM||(n.prototype._originalCreateDOM=n.prototype.createDOM),n.prototype.decorate&&!n.prototype._decorateOverridden){n.prototype._decorateOverridden=!0;let i=!!n.prototype.createDOM;n.prototype.decorate=function(t,r){let c=te(t,e,this);if(c){if(c.Component)return c.Component({config:r,editor:t,isEditor:!0,isJSXConverter:!1,node:this});if(c.createDOM&&c.html){let s=typeof c.html=="function"?c.html({config:r,editor:t,isEditor:!0,isJSXConverter:!1,node:this}):c.html;return k.createElement("span",{dangerouslySetInnerHTML:{__html:s}})}if(c.html&&i&&!c.createDOM)return k.createElement(k.Fragment);if(e==="block"){let s=c;if(s.Block||s.Label)return n.prototype._originalDecorate.call(this,t,r,s.Block,s.Label)}else if(e==="inlineBlock"){let s=c;if(s.Block||s.Label)return n.prototype._originalDecorate.call(this,t,r,s.Block,s.Label)}}return n.prototype._originalDecorate.call(this,t,r)}}n.prototype.createDOM&&!n.prototype._createDOMOverridden&&(n.prototype._createDOMOverridden=!0,n.prototype.createDOM=function(i,t){let r=te(t,e,this);if(r){if(r.createDOM)return r.createDOM({config:i,editor:t,node:this});if(r.html){let c=typeof r.html=="function"?r.html({config:i,editor:t,isEditor:!0,isJSXConverter:!1,node:this}):r.html,a=document.createElement("div");return a.innerHTML=c,a.firstElementChild||a}}return n.prototype._originalCreateDOM.call(this,i,t)})}function vt({editorConfig:o,nodeViews:e}){let n=Fe({nodes:o.features.nodes});if(e){let i=new Set;for(let[t,r]of Object.entries(e))!r||typeof r!="object"||(t==="blocks"&&Object.keys(r).length>0?i.add("block"):t==="inlineBlocks"&&Object.keys(r).length>0?i.add("inlineBlock"):i.add(t));for(let t of n)if("getType"in t){let r=t.getType();i.has(r)&&Ue({node:t,nodeType:r})}}return n}function Fe({nodes:o}){return o.map(e=>"node"in e?e.node:e)}import{jsx as ne}from"react/jsx-runtime";import"react";var Ke={16:"M8.5 3.5a.5.5 0 0 0-1 0v4h-4a.5.5 0 0 0 0 1h4v4a.5.5 0 0 0 1 0v-4h4a.5.5 0 0 0 0-1h-4z",24:"M12 6a.5.5 0 0 1 .5.5v5h5a.5.5 0 0 1 0 1h-5v5a.5.5 0 0 1-1 0v-5h-5a.5.5 0 0 1 0-1h5v-5A.5.5 0 0 1 12 6"},At=({className:o,size:e=24})=>ne("svg",{className:o,fill:"none",height:e,viewBox:`0 0 ${e} ${e}`,width:e,xmlns:"http://www.w3.org/2000/svg",children:ne("path",{clipRule:"evenodd",d:Ke[e],fill:"currentColor",fillRule:"evenodd"})});export{P as a,At as b,Ze as c,rt as d,pe as e,T as f,$ as g,xt as h,qe as i,bt as j,ee as k,Dt as l,Tt as m,vt as n};
|
|
2
|
+
//# sourceMappingURL=chunk-3LRZDIIG.js.map
|