@payloadcms/richtext-lexical 3.68.0-internal-debug.e9b66ee → 3.68.0-internal.10bf491
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cell/rscEntry.js +71 -54
- package/dist/cell/rscEntry.js.map +1 -1
- package/dist/dependencyChecker.spec.js +7 -8
- package/dist/dependencyChecker.spec.js.map +1 -1
- package/dist/exports/client/Component-DOSSWC76.js +2 -0
- package/dist/exports/client/Component-DOSSWC76.js.map +7 -0
- package/dist/exports/client/Component-MBLHTKDK.js +2 -0
- package/dist/exports/client/Component-MBLHTKDK.js.map +7 -0
- package/dist/exports/client/Field-HJGV32KA.js +2 -0
- package/dist/exports/client/Field-HJGV32KA.js.map +7 -0
- package/dist/exports/client/RelationshipComponent-UCIWIEVD.js +2 -0
- package/dist/exports/client/RelationshipComponent-UCIWIEVD.js.map +7 -0
- package/dist/exports/client/bundled.css +1 -0
- package/dist/exports/client/chunk-BZZVLW4U.js +2 -0
- package/dist/exports/client/chunk-BZZVLW4U.js.map +7 -0
- package/dist/exports/client/chunk-DBWINSQN.js +2 -0
- package/dist/exports/client/chunk-DBWINSQN.js.map +7 -0
- package/dist/exports/client/chunk-EZX4YW7S.js +12 -0
- package/dist/exports/client/chunk-EZX4YW7S.js.map +7 -0
- package/dist/exports/client/chunk-F26IQ5RE.js +2 -0
- package/dist/exports/client/chunk-F26IQ5RE.js.map +7 -0
- package/dist/exports/client/chunk-INBEEENE.js +2 -0
- package/dist/exports/client/chunk-INBEEENE.js.map +7 -0
- package/dist/exports/client/chunk-O6XRT2H3.js +2 -0
- package/dist/exports/client/chunk-O6XRT2H3.js.map +7 -0
- package/dist/exports/client/chunk-TRHFMZ3F.js +2 -0
- package/dist/exports/client/chunk-TRHFMZ3F.js.map +7 -0
- package/dist/exports/client/component-5IW2M4GH.js +2 -0
- package/dist/exports/client/component-5IW2M4GH.js.map +7 -0
- package/dist/exports/client/componentInline-5OVPQNQH.js +2 -0
- package/dist/exports/client/componentInline-5OVPQNQH.js.map +7 -0
- package/dist/exports/client/index.js +65 -85
- package/dist/exports/client/index.js.map +7 -1
- package/dist/exports/cssEntry.js +0 -1
- package/dist/exports/cssEntry.js.map +1 -1
- package/dist/exports/html/index.js +0 -1
- package/dist/exports/html/index.js.map +1 -1
- package/dist/exports/html-async/index.js +0 -1
- package/dist/exports/html-async/index.js.map +1 -1
- package/dist/exports/plaintext/index.js +0 -1
- package/dist/exports/plaintext/index.js.map +1 -1
- package/dist/exports/react/index.js +0 -1
- package/dist/exports/react/index.js.map +1 -1
- package/dist/exports/server/ast/mdx.d.ts.map +1 -1
- package/dist/exports/server/ast/mdx.js +34 -37
- package/dist/exports/server/ast/mdx.js.map +1 -1
- package/dist/exports/server/migrate.js +0 -1
- package/dist/exports/server/migrate.js.map +1 -1
- package/dist/exports/server/rsc.js +0 -1
- package/dist/exports/server/rsc.js.map +1 -1
- package/dist/exports/shared.js +0 -1
- package/dist/exports/shared.js.map +1 -1
- package/dist/features/align/client/index.js +195 -168
- package/dist/features/align/client/index.js.map +1 -1
- package/dist/features/align/client/toolbarAlignGroup.js +9 -9
- package/dist/features/align/client/toolbarAlignGroup.js.map +1 -1
- package/dist/features/align/server/i18n.js +222 -223
- package/dist/features/align/server/i18n.js.map +1 -1
- package/dist/features/align/server/index.js +5 -6
- package/dist/features/align/server/index.js.map +1 -1
- package/dist/features/blockquote/client/index.js +60 -65
- package/dist/features/blockquote/client/index.js.map +1 -1
- package/dist/features/blockquote/markdownTransformer.js +28 -33
- package/dist/features/blockquote/markdownTransformer.js.map +1 -1
- package/dist/features/blockquote/server/i18n.js +111 -112
- package/dist/features/blockquote/server/i18n.js.map +1 -1
- package/dist/features/blockquote/server/index.js +48 -47
- package/dist/features/blockquote/server/index.js.map +1 -1
- package/dist/features/blocks/client/component/BlockContent.js +69 -60
- package/dist/features/blocks/client/component/BlockContent.js.map +1 -1
- package/dist/features/blocks/client/component/components/BlockCollapsible.js +15 -5
- package/dist/features/blocks/client/component/components/BlockCollapsible.js.map +1 -1
- package/dist/features/blocks/client/component/components/BlockEditButton.js +18 -4
- package/dist/features/blocks/client/component/components/BlockEditButton.js.map +1 -1
- package/dist/features/blocks/client/component/components/BlockRemoveButton.js +18 -4
- package/dist/features/blocks/client/component/components/BlockRemoveButton.js.map +1 -1
- package/dist/features/blocks/client/component/index.js +410 -387
- package/dist/features/blocks/client/component/index.js.map +1 -1
- package/dist/features/blocks/client/component/removeEmptyArrayValues.js +11 -8
- package/dist/features/blocks/client/component/removeEmptyArrayValues.js.map +1 -1
- package/dist/features/blocks/client/componentInline/components/InlineBlockContainer.js +24 -4
- package/dist/features/blocks/client/componentInline/components/InlineBlockContainer.js.map +1 -1
- package/dist/features/blocks/client/componentInline/components/InlineBlockEditButton.js +18 -4
- package/dist/features/blocks/client/componentInline/components/InlineBlockEditButton.js.map +1 -1
- package/dist/features/blocks/client/componentInline/components/InlineBlockLabel.js +18 -4
- package/dist/features/blocks/client/componentInline/components/InlineBlockLabel.js.map +1 -1
- package/dist/features/blocks/client/componentInline/components/InlineBlockRemoveButton.js +18 -4
- package/dist/features/blocks/client/componentInline/components/InlineBlockRemoveButton.js.map +1 -1
- package/dist/features/blocks/client/componentInline/index.js +334 -313
- package/dist/features/blocks/client/componentInline/index.js.map +1 -1
- package/dist/features/blocks/client/getBlockImageComponent.js +13 -7
- package/dist/features/blocks/client/getBlockImageComponent.js.map +1 -1
- package/dist/features/blocks/client/index.js +146 -141
- package/dist/features/blocks/client/index.js.map +1 -1
- package/dist/features/blocks/client/markdown/getLexicalToMarkdown.js +18 -18
- package/dist/features/blocks/client/markdown/getLexicalToMarkdown.js.map +1 -1
- package/dist/features/blocks/client/markdown/getMarkdownToLexical.js +15 -14
- package/dist/features/blocks/client/markdown/getMarkdownToLexical.js.map +1 -1
- package/dist/features/blocks/client/markdown/markdownTransformer.js +330 -328
- package/dist/features/blocks/client/markdown/markdownTransformer.js.map +1 -1
- package/dist/features/blocks/client/nodes/BlocksNode.js +41 -34
- package/dist/features/blocks/client/nodes/BlocksNode.js.map +1 -1
- package/dist/features/blocks/client/nodes/InlineBlocksNode.js +33 -27
- package/dist/features/blocks/client/nodes/InlineBlocksNode.js.map +1 -1
- package/dist/features/blocks/client/plugin/commands.js +1 -1
- package/dist/features/blocks/client/plugin/commands.js.map +1 -1
- package/dist/features/blocks/client/plugin/index.js +87 -59
- package/dist/features/blocks/client/plugin/index.js.map +1 -1
- package/dist/features/blocks/premade/CodeBlock/Component/Block.js +102 -58
- package/dist/features/blocks/premade/CodeBlock/Component/Block.js.map +1 -1
- package/dist/features/blocks/premade/CodeBlock/Component/Code.js +95 -105
- package/dist/features/blocks/premade/CodeBlock/Component/Code.js.map +1 -1
- package/dist/features/blocks/premade/CodeBlock/Component/Collapse/index.js +12 -7
- package/dist/features/blocks/premade/CodeBlock/Component/Collapse/index.js.map +1 -1
- package/dist/features/blocks/premade/CodeBlock/Component/FloatingCollapse/index.js +21 -12
- package/dist/features/blocks/premade/CodeBlock/Component/FloatingCollapse/index.js.map +1 -1
- package/dist/features/blocks/premade/CodeBlock/Component/defaultLanguages.js +83 -84
- package/dist/features/blocks/premade/CodeBlock/Component/defaultLanguages.js.map +1 -1
- package/dist/features/blocks/premade/CodeBlock/converter.js +40 -36
- package/dist/features/blocks/premade/CodeBlock/converter.js.map +1 -1
- package/dist/features/blocks/premade/CodeBlock/converterClient.js +1 -1
- package/dist/features/blocks/premade/CodeBlock/converterClient.js.map +1 -1
- package/dist/features/blocks/premade/CodeBlock/index.js +49 -49
- package/dist/features/blocks/premade/CodeBlock/index.js.map +1 -1
- package/dist/features/blocks/server/graphQLPopulationPromise.js +44 -29
- package/dist/features/blocks/server/graphQLPopulationPromise.js.map +1 -1
- package/dist/features/blocks/server/i18n.js +333 -334
- package/dist/features/blocks/server/i18n.js.map +1 -1
- package/dist/features/blocks/server/index.js +211 -215
- package/dist/features/blocks/server/index.js.map +1 -1
- package/dist/features/blocks/server/markdown/linesFromMatchToContentAndPropsString.js +122 -123
- package/dist/features/blocks/server/markdown/linesFromMatchToContentAndPropsString.js.map +1 -1
- package/dist/features/blocks/server/markdown/markdownTransformer.js +349 -347
- package/dist/features/blocks/server/markdown/markdownTransformer.js.map +1 -1
- package/dist/features/blocks/server/nodes/BlocksNode.js +90 -86
- package/dist/features/blocks/server/nodes/BlocksNode.js.map +1 -1
- package/dist/features/blocks/server/nodes/InlineBlocksNode.js +87 -84
- package/dist/features/blocks/server/nodes/InlineBlocksNode.js.map +1 -1
- package/dist/features/blocks/server/validate.js +55 -42
- package/dist/features/blocks/server/validate.js.map +1 -1
- package/dist/features/converters/htmlToLexical/index.js +24 -21
- package/dist/features/converters/htmlToLexical/index.js.map +1 -1
- package/dist/features/converters/lexicalToHtml/async/converters/blockquote.js +10 -7
- package/dist/features/converters/lexicalToHtml/async/converters/blockquote.js.map +1 -1
- package/dist/features/converters/lexicalToHtml/async/converters/heading.js +10 -7
- package/dist/features/converters/lexicalToHtml/async/converters/heading.js.map +1 -1
- package/dist/features/converters/lexicalToHtml/async/converters/horizontalRule.js +1 -2
- package/dist/features/converters/lexicalToHtml/async/converters/horizontalRule.js.map +1 -1
- package/dist/features/converters/lexicalToHtml/async/converters/linebreak.js +1 -2
- package/dist/features/converters/lexicalToHtml/async/converters/linebreak.js.map +1 -1
- package/dist/features/converters/lexicalToHtml/async/converters/link.js +37 -28
- package/dist/features/converters/lexicalToHtml/async/converters/link.js.map +1 -1
- package/dist/features/converters/lexicalToHtml/async/converters/list.js +26 -18
- package/dist/features/converters/lexicalToHtml/async/converters/list.js.map +1 -1
- package/dist/features/converters/lexicalToHtml/async/converters/paragraph.js +12 -9
- package/dist/features/converters/lexicalToHtml/async/converters/paragraph.js.map +1 -1
- package/dist/features/converters/lexicalToHtml/async/converters/tab.js +1 -2
- package/dist/features/converters/lexicalToHtml/async/converters/tab.js.map +1 -1
- package/dist/features/converters/lexicalToHtml/async/converters/table.js +38 -27
- package/dist/features/converters/lexicalToHtml/async/converters/table.js.map +1 -1
- package/dist/features/converters/lexicalToHtml/async/converters/text.js +26 -25
- package/dist/features/converters/lexicalToHtml/async/converters/text.js.map +1 -1
- package/dist/features/converters/lexicalToHtml/async/converters/upload.js +43 -40
- package/dist/features/converters/lexicalToHtml/async/converters/upload.js.map +1 -1
- package/dist/features/converters/lexicalToHtml/async/defaultConverters.js +11 -12
- package/dist/features/converters/lexicalToHtml/async/defaultConverters.js.map +1 -1
- package/dist/features/converters/lexicalToHtml/async/field/index.js +56 -56
- package/dist/features/converters/lexicalToHtml/async/field/index.js.map +1 -1
- package/dist/features/converters/lexicalToHtml/async/index.js +97 -87
- package/dist/features/converters/lexicalToHtml/async/index.js.map +1 -1
- package/dist/features/converters/lexicalToHtml/async/types.js +1 -4
- package/dist/features/converters/lexicalToHtml/async/types.js.map +1 -1
- package/dist/features/converters/lexicalToHtml/shared/findConverterForNode.js +62 -57
- package/dist/features/converters/lexicalToHtml/shared/findConverterForNode.js.map +1 -1
- package/dist/features/converters/lexicalToHtml/shared/types.js +1 -2
- package/dist/features/converters/lexicalToHtml/shared/types.js.map +1 -1
- package/dist/features/converters/lexicalToHtml/sync/converters/blockquote.js +10 -7
- package/dist/features/converters/lexicalToHtml/sync/converters/blockquote.js.map +1 -1
- package/dist/features/converters/lexicalToHtml/sync/converters/heading.js +10 -7
- package/dist/features/converters/lexicalToHtml/sync/converters/heading.js.map +1 -1
- package/dist/features/converters/lexicalToHtml/sync/converters/horizontalRule.js +1 -2
- package/dist/features/converters/lexicalToHtml/sync/converters/horizontalRule.js.map +1 -1
- package/dist/features/converters/lexicalToHtml/sync/converters/linebreak.js +1 -2
- package/dist/features/converters/lexicalToHtml/sync/converters/linebreak.js.map +1 -1
- package/dist/features/converters/lexicalToHtml/sync/converters/link.js +35 -27
- package/dist/features/converters/lexicalToHtml/sync/converters/link.js.map +1 -1
- package/dist/features/converters/lexicalToHtml/sync/converters/list.js +26 -18
- package/dist/features/converters/lexicalToHtml/sync/converters/list.js.map +1 -1
- package/dist/features/converters/lexicalToHtml/sync/converters/paragraph.js +12 -9
- package/dist/features/converters/lexicalToHtml/sync/converters/paragraph.js.map +1 -1
- package/dist/features/converters/lexicalToHtml/sync/converters/tab.js +1 -2
- package/dist/features/converters/lexicalToHtml/sync/converters/tab.js.map +1 -1
- package/dist/features/converters/lexicalToHtml/sync/converters/table.js +38 -27
- package/dist/features/converters/lexicalToHtml/sync/converters/table.js.map +1 -1
- package/dist/features/converters/lexicalToHtml/sync/converters/text.js +26 -25
- package/dist/features/converters/lexicalToHtml/sync/converters/text.js.map +1 -1
- package/dist/features/converters/lexicalToHtml/sync/converters/upload.js +36 -34
- package/dist/features/converters/lexicalToHtml/sync/converters/upload.js.map +1 -1
- package/dist/features/converters/lexicalToHtml/sync/defaultConverters.js +11 -12
- package/dist/features/converters/lexicalToHtml/sync/defaultConverters.js.map +1 -1
- package/dist/features/converters/lexicalToHtml/sync/index.js +92 -84
- package/dist/features/converters/lexicalToHtml/sync/index.js.map +1 -1
- package/dist/features/converters/lexicalToHtml/sync/types.js +1 -4
- package/dist/features/converters/lexicalToHtml/sync/types.js.map +1 -1
- package/dist/features/converters/lexicalToHtml_deprecated/converter/converters/linebreak.js +4 -7
- package/dist/features/converters/lexicalToHtml_deprecated/converter/converters/linebreak.js.map +1 -1
- package/dist/features/converters/lexicalToHtml_deprecated/converter/converters/paragraph.js +34 -29
- package/dist/features/converters/lexicalToHtml_deprecated/converter/converters/paragraph.js.map +1 -1
- package/dist/features/converters/lexicalToHtml_deprecated/converter/converters/tab.js +6 -7
- package/dist/features/converters/lexicalToHtml_deprecated/converter/converters/tab.js.map +1 -1
- package/dist/features/converters/lexicalToHtml_deprecated/converter/converters/text.js +28 -29
- package/dist/features/converters/lexicalToHtml_deprecated/converter/converters/text.js.map +1 -1
- package/dist/features/converters/lexicalToHtml_deprecated/converter/defaultConverters.js +2 -7
- package/dist/features/converters/lexicalToHtml_deprecated/converter/defaultConverters.js.map +1 -1
- package/dist/features/converters/lexicalToHtml_deprecated/converter/index.js +84 -84
- package/dist/features/converters/lexicalToHtml_deprecated/converter/index.js.map +1 -1
- package/dist/features/converters/lexicalToHtml_deprecated/converter/types.js +1 -6
- package/dist/features/converters/lexicalToHtml_deprecated/converter/types.js.map +1 -1
- package/dist/features/converters/lexicalToHtml_deprecated/field/index.js +107 -107
- package/dist/features/converters/lexicalToHtml_deprecated/field/index.js.map +1 -1
- package/dist/features/converters/lexicalToHtml_deprecated/index.js +4 -4
- package/dist/features/converters/lexicalToHtml_deprecated/index.js.map +1 -1
- package/dist/features/converters/lexicalToJSX/Component/index.js +37 -36
- package/dist/features/converters/lexicalToJSX/Component/index.js.map +1 -1
- package/dist/features/converters/lexicalToJSX/converter/converters/blockquote.js +12 -7
- package/dist/features/converters/lexicalToJSX/converter/converters/blockquote.js.map +1 -1
- package/dist/features/converters/lexicalToJSX/converter/converters/heading.js +13 -8
- package/dist/features/converters/lexicalToJSX/converter/converters/heading.js.map +1 -1
- package/dist/features/converters/lexicalToJSX/converter/converters/horizontalRule.js +2 -2
- package/dist/features/converters/lexicalToJSX/converter/converters/horizontalRule.js.map +1 -1
- package/dist/features/converters/lexicalToJSX/converter/converters/linebreak.js +2 -2
- package/dist/features/converters/lexicalToJSX/converter/converters/linebreak.js.map +1 -1
- package/dist/features/converters/lexicalToJSX/converter/converters/link.js +47 -40
- package/dist/features/converters/lexicalToJSX/converter/converters/link.js.map +1 -1
- package/dist/features/converters/lexicalToJSX/converter/converters/list.js +57 -32
- package/dist/features/converters/lexicalToJSX/converter/converters/list.js.map +1 -1
- package/dist/features/converters/lexicalToJSX/converter/converters/paragraph.js +16 -11
- package/dist/features/converters/lexicalToJSX/converter/converters/paragraph.js.map +1 -1
- package/dist/features/converters/lexicalToJSX/converter/converters/tab.js +1 -2
- package/dist/features/converters/lexicalToJSX/converter/converters/tab.js.map +1 -1
- package/dist/features/converters/lexicalToJSX/converter/converters/table.js +59 -40
- package/dist/features/converters/lexicalToJSX/converter/converters/table.js.map +1 -1
- package/dist/features/converters/lexicalToJSX/converter/converters/text.js +48 -29
- package/dist/features/converters/lexicalToJSX/converter/converters/text.js.map +1 -1
- package/dist/features/converters/lexicalToJSX/converter/converters/upload.js +60 -37
- package/dist/features/converters/lexicalToJSX/converter/converters/upload.js.map +1 -1
- package/dist/features/converters/lexicalToJSX/converter/defaultConverters.js +11 -12
- package/dist/features/converters/lexicalToJSX/converter/defaultConverters.js.map +1 -1
- package/dist/features/converters/lexicalToJSX/converter/index.js +128 -116
- package/dist/features/converters/lexicalToJSX/converter/index.js.map +1 -1
- package/dist/features/converters/lexicalToJSX/converter/types.js +1 -4
- package/dist/features/converters/lexicalToJSX/converter/types.js.map +1 -1
- package/dist/features/converters/lexicalToMarkdown/index.js +19 -17
- package/dist/features/converters/lexicalToMarkdown/index.js.map +1 -1
- package/dist/features/converters/lexicalToPlaintext/convertLexicalToPlaintext.spec.js +146 -223
- package/dist/features/converters/lexicalToPlaintext/convertLexicalToPlaintext.spec.js.map +1 -1
- package/dist/features/converters/lexicalToPlaintext/shared/findConverterForNode.js +13 -11
- package/dist/features/converters/lexicalToPlaintext/shared/findConverterForNode.js.map +1 -1
- package/dist/features/converters/lexicalToPlaintext/shared/types.js +1 -2
- package/dist/features/converters/lexicalToPlaintext/shared/types.js.map +1 -1
- package/dist/features/converters/lexicalToPlaintext/sync/index.js +82 -83
- package/dist/features/converters/lexicalToPlaintext/sync/index.js.map +1 -1
- package/dist/features/converters/lexicalToPlaintext/sync/types.js +1 -3
- package/dist/features/converters/lexicalToPlaintext/sync/types.js.map +1 -1
- package/dist/features/converters/markdownToLexical/index.js +16 -14
- package/dist/features/converters/markdownToLexical/index.js.map +1 -1
- package/dist/features/converters/utilities/payloadPopulateFn.js +38 -37
- package/dist/features/converters/utilities/payloadPopulateFn.js.map +1 -1
- package/dist/features/converters/utilities/restPopulateFn.js +30 -24
- package/dist/features/converters/utilities/restPopulateFn.js.map +1 -1
- package/dist/features/debug/jsxConverter/client/index.js +5 -7
- package/dist/features/debug/jsxConverter/client/index.js.map +1 -1
- package/dist/features/debug/jsxConverter/client/plugin/index.js +47 -14
- package/dist/features/debug/jsxConverter/client/plugin/index.js.map +1 -1
- package/dist/features/debug/jsxConverter/server/index.js +4 -5
- package/dist/features/debug/jsxConverter/server/index.js.map +1 -1
- package/dist/features/debug/testRecorder/client/index.js +5 -7
- package/dist/features/debug/testRecorder/client/index.js.map +1 -1
- package/dist/features/debug/testRecorder/client/plugin/index.js +367 -383
- package/dist/features/debug/testRecorder/client/plugin/index.js.map +1 -1
- package/dist/features/debug/testRecorder/server/index.js +4 -5
- package/dist/features/debug/testRecorder/server/index.js.map +1 -1
- package/dist/features/debug/treeView/client/index.js +5 -7
- package/dist/features/debug/treeView/client/index.js.map +1 -1
- package/dist/features/debug/treeView/client/plugin/index.js +24 -5
- package/dist/features/debug/treeView/client/plugin/index.js.map +1 -1
- package/dist/features/debug/treeView/server/index.js +4 -5
- package/dist/features/debug/treeView/server/index.js.map +1 -1
- package/dist/features/experimental_table/client/index.js +42 -61
- package/dist/features/experimental_table/client/index.js.map +1 -1
- package/dist/features/experimental_table/client/plugins/TableActionMenuPlugin/index.js +517 -474
- package/dist/features/experimental_table/client/plugins/TableActionMenuPlugin/index.js.map +1 -1
- package/dist/features/experimental_table/client/plugins/TableCellResizerPlugin/index.js +316 -316
- package/dist/features/experimental_table/client/plugins/TableCellResizerPlugin/index.js.map +1 -1
- package/dist/features/experimental_table/client/plugins/TableHoverActionsPlugin/index.js +224 -184
- package/dist/features/experimental_table/client/plugins/TableHoverActionsPlugin/index.js.map +1 -1
- package/dist/features/experimental_table/client/plugins/TablePlugin/index.js +133 -73
- package/dist/features/experimental_table/client/plugins/TablePlugin/index.js.map +1 -1
- package/dist/features/experimental_table/client/utils/debounce.js +107 -89
- package/dist/features/experimental_table/client/utils/debounce.js.map +1 -1
- package/dist/features/experimental_table/client/utils/useDebounce.js +39 -21
- package/dist/features/experimental_table/client/utils/useDebounce.js.map +1 -1
- package/dist/features/experimental_table/markdownTransformer.js +118 -123
- package/dist/features/experimental_table/markdownTransformer.js.map +1 -1
- package/dist/features/experimental_table/server/index.js +143 -125
- package/dist/features/experimental_table/server/index.js.map +1 -1
- package/dist/features/format/bold/feature.client.js +35 -38
- package/dist/features/format/bold/feature.client.js.map +1 -1
- package/dist/features/format/bold/feature.server.js +14 -18
- package/dist/features/format/bold/feature.server.js.map +1 -1
- package/dist/features/format/bold/markdownTransformers.js +14 -25
- package/dist/features/format/bold/markdownTransformers.js.map +1 -1
- package/dist/features/format/inlineCode/feature.client.js +27 -31
- package/dist/features/format/inlineCode/feature.client.js.map +1 -1
- package/dist/features/format/inlineCode/feature.server.js +5 -8
- package/dist/features/format/inlineCode/feature.server.js.map +1 -1
- package/dist/features/format/inlineCode/markdownTransformers.js +3 -6
- package/dist/features/format/inlineCode/markdownTransformers.js.map +1 -1
- package/dist/features/format/italic/feature.client.js +27 -32
- package/dist/features/format/italic/feature.client.js.map +1 -1
- package/dist/features/format/italic/feature.server.js +5 -9
- package/dist/features/format/italic/feature.server.js.map +1 -1
- package/dist/features/format/italic/markdownTransformers.js +7 -12
- package/dist/features/format/italic/markdownTransformers.js.map +1 -1
- package/dist/features/format/shared/toolbarFormatGroup.js +8 -8
- package/dist/features/format/shared/toolbarFormatGroup.js.map +1 -1
- package/dist/features/format/strikethrough/feature.client.js +27 -31
- package/dist/features/format/strikethrough/feature.client.js.map +1 -1
- package/dist/features/format/strikethrough/feature.server.js +5 -8
- package/dist/features/format/strikethrough/feature.server.js.map +1 -1
- package/dist/features/format/strikethrough/markdownTransformers.js +3 -6
- package/dist/features/format/strikethrough/markdownTransformers.js.map +1 -1
- package/dist/features/format/subscript/feature.client.js +26 -28
- package/dist/features/format/subscript/feature.client.js.map +1 -1
- package/dist/features/format/subscript/feature.server.js +4 -5
- package/dist/features/format/subscript/feature.server.js.map +1 -1
- package/dist/features/format/superscript/feature.client.js +26 -28
- package/dist/features/format/superscript/feature.client.js.map +1 -1
- package/dist/features/format/superscript/feature.server.js +4 -5
- package/dist/features/format/superscript/feature.server.js.map +1 -1
- package/dist/features/format/underline/feature.client.js +26 -28
- package/dist/features/format/underline/feature.client.js.map +1 -1
- package/dist/features/format/underline/feature.server.js +4 -5
- package/dist/features/format/underline/feature.server.js.map +1 -1
- package/dist/features/heading/client/index.js +142 -121
- package/dist/features/heading/client/index.js.map +1 -1
- package/dist/features/heading/markdownTransformer.js +22 -25
- package/dist/features/heading/markdownTransformer.js.map +1 -1
- package/dist/features/heading/server/i18n.js +111 -112
- package/dist/features/heading/server/i18n.js.map +1 -1
- package/dist/features/heading/server/index.js +60 -62
- package/dist/features/heading/server/index.js.map +1 -1
- package/dist/features/horizontalRule/client/index.js +48 -57
- package/dist/features/horizontalRule/client/index.js.map +1 -1
- package/dist/features/horizontalRule/client/markdownTransformer.js +15 -18
- package/dist/features/horizontalRule/client/markdownTransformer.js.map +1 -1
- package/dist/features/horizontalRule/client/nodes/HorizontalRuleNode.js +28 -25
- package/dist/features/horizontalRule/client/nodes/HorizontalRuleNode.js.map +1 -1
- package/dist/features/horizontalRule/client/plugin/index.js +32 -21
- package/dist/features/horizontalRule/client/plugin/index.js.map +1 -1
- package/dist/features/horizontalRule/server/i18n.js +111 -112
- package/dist/features/horizontalRule/server/i18n.js.map +1 -1
- package/dist/features/horizontalRule/server/index.js +17 -24
- package/dist/features/horizontalRule/server/index.js.map +1 -1
- package/dist/features/horizontalRule/server/markdownTransformer.js +15 -18
- package/dist/features/horizontalRule/server/markdownTransformer.js.map +1 -1
- package/dist/features/horizontalRule/server/nodes/HorizontalRuleNode.js +72 -69
- package/dist/features/horizontalRule/server/nodes/HorizontalRuleNode.js.map +1 -1
- package/dist/features/indent/client/IndentPlugin.js +78 -73
- package/dist/features/indent/client/IndentPlugin.js.map +1 -1
- package/dist/features/indent/client/index.js +77 -68
- package/dist/features/indent/client/index.js.map +1 -1
- package/dist/features/indent/client/toolbarIndentGroup.js +8 -8
- package/dist/features/indent/client/toolbarIndentGroup.js.map +1 -1
- package/dist/features/indent/server/i18n.js +148 -149
- package/dist/features/indent/server/i18n.js.map +1 -1
- package/dist/features/indent/server/index.js +11 -18
- package/dist/features/indent/server/index.js.map +1 -1
- package/dist/features/link/client/index.js +80 -83
- package/dist/features/link/client/index.js.map +1 -1
- package/dist/features/link/client/plugins/autoLink/index.js +273 -280
- package/dist/features/link/client/plugins/autoLink/index.js.map +1 -1
- package/dist/features/link/client/plugins/clickableLink/index.js +5 -3
- package/dist/features/link/client/plugins/clickableLink/index.js.map +1 -1
- package/dist/features/link/client/plugins/floatingLinkEditor/LinkEditor/commands.js +1 -1
- package/dist/features/link/client/plugins/floatingLinkEditor/LinkEditor/commands.js.map +1 -1
- package/dist/features/link/client/plugins/floatingLinkEditor/LinkEditor/index.js +287 -276
- package/dist/features/link/client/plugins/floatingLinkEditor/LinkEditor/index.js.map +1 -1
- package/dist/features/link/client/plugins/floatingLinkEditor/index.js +10 -5
- package/dist/features/link/client/plugins/floatingLinkEditor/index.js.map +1 -1
- package/dist/features/link/client/plugins/floatingLinkEditor/types.js +1 -6
- package/dist/features/link/client/plugins/floatingLinkEditor/types.js.map +1 -1
- package/dist/features/link/client/plugins/link/index.js +68 -53
- package/dist/features/link/client/plugins/link/index.js.map +1 -1
- package/dist/features/link/markdownTransformer.js +33 -34
- package/dist/features/link/markdownTransformer.js.map +1 -1
- package/dist/features/link/nodes/AutoLinkNode.js +58 -56
- package/dist/features/link/nodes/AutoLinkNode.js.map +1 -1
- package/dist/features/link/nodes/LinkNode.js +288 -286
- package/dist/features/link/nodes/LinkNode.js.map +1 -1
- package/dist/features/link/nodes/types.js +1 -6
- package/dist/features/link/nodes/types.js.map +1 -1
- package/dist/features/link/server/baseFields.js +140 -115
- package/dist/features/link/server/baseFields.js.map +1 -1
- package/dist/features/link/server/graphQLPopulationPromise.js +45 -29
- package/dist/features/link/server/graphQLPopulationPromise.js.map +1 -1
- package/dist/features/link/server/i18n.js +148 -149
- package/dist/features/link/server/i18n.js.map +1 -1
- package/dist/features/link/server/index.js +143 -156
- package/dist/features/link/server/index.js.map +1 -1
- package/dist/features/link/server/transformExtraFields.js +15 -15
- package/dist/features/link/server/transformExtraFields.js.map +1 -1
- package/dist/features/link/server/validate.js +46 -35
- package/dist/features/link/server/validate.js.map +1 -1
- package/dist/features/lists/checklist/client/index.js +78 -86
- package/dist/features/lists/checklist/client/index.js.map +1 -1
- package/dist/features/lists/checklist/client/plugin/index.js +5 -3
- package/dist/features/lists/checklist/client/plugin/index.js.map +1 -1
- package/dist/features/lists/checklist/markdownTransformers.js +7 -11
- package/dist/features/lists/checklist/markdownTransformers.js.map +1 -1
- package/dist/features/lists/checklist/server/i18n.js +111 -112
- package/dist/features/lists/checklist/server/i18n.js.map +1 -1
- package/dist/features/lists/checklist/server/index.js +21 -26
- package/dist/features/lists/checklist/server/index.js.map +1 -1
- package/dist/features/lists/htmlConverter.js +62 -47
- package/dist/features/lists/htmlConverter.js.map +1 -1
- package/dist/features/lists/orderedList/client/index.js +72 -78
- package/dist/features/lists/orderedList/client/index.js.map +1 -1
- package/dist/features/lists/orderedList/markdownTransformer.js +7 -11
- package/dist/features/lists/orderedList/markdownTransformer.js.map +1 -1
- package/dist/features/lists/orderedList/server/i18n.js +111 -112
- package/dist/features/lists/orderedList/server/i18n.js.map +1 -1
- package/dist/features/lists/orderedList/server/index.js +21 -26
- package/dist/features/lists/orderedList/server/index.js.map +1 -1
- package/dist/features/lists/plugin/index.js +5 -3
- package/dist/features/lists/plugin/index.js.map +1 -1
- package/dist/features/lists/shared/markdown.js +48 -49
- package/dist/features/lists/shared/markdown.js.map +1 -1
- package/dist/features/lists/shared/shouldRegisterListBaseNodes.js +9 -10
- package/dist/features/lists/shared/shouldRegisterListBaseNodes.js.map +1 -1
- package/dist/features/lists/shared/slashMenuListGroup.js +9 -8
- package/dist/features/lists/shared/slashMenuListGroup.js.map +1 -1
- package/dist/features/lists/unorderedList/client/index.js +68 -76
- package/dist/features/lists/unorderedList/client/index.js.map +1 -1
- package/dist/features/lists/unorderedList/markdownTransformer.js +7 -11
- package/dist/features/lists/unorderedList/markdownTransformer.js.map +1 -1
- package/dist/features/lists/unorderedList/server/i18n.js +111 -112
- package/dist/features/lists/unorderedList/server/i18n.js.map +1 -1
- package/dist/features/lists/unorderedList/server/index.js +17 -24
- package/dist/features/lists/unorderedList/server/index.js.map +1 -1
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/heading/converter.js +18 -17
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/heading/converter.js.map +1 -1
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/link/converter.js +30 -29
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/link/converter.js.map +1 -1
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/list/converter.js +21 -20
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/list/converter.js.map +1 -1
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/listItem/converter.js +21 -19
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/listItem/converter.js.map +1 -1
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/quote/converter.js +18 -17
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/quote/converter.js.map +1 -1
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/unknown/converter.js +24 -23
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/unknown/converter.js.map +1 -1
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/upload/converter.js +20 -21
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/upload/converter.js.map +1 -1
- package/dist/features/migrations/lexicalPluginToLexical/converter/defaultConverters.js +1 -10
- package/dist/features/migrations/lexicalPluginToLexical/converter/defaultConverters.js.map +1 -1
- package/dist/features/migrations/lexicalPluginToLexical/converter/index.js +70 -64
- package/dist/features/migrations/lexicalPluginToLexical/converter/index.js.map +1 -1
- package/dist/features/migrations/lexicalPluginToLexical/converter/types.js +1 -2
- package/dist/features/migrations/lexicalPluginToLexical/converter/types.js.map +1 -1
- package/dist/features/migrations/lexicalPluginToLexical/feature.client.js +5 -7
- package/dist/features/migrations/lexicalPluginToLexical/feature.client.js.map +1 -1
- package/dist/features/migrations/lexicalPluginToLexical/feature.server.js +42 -43
- package/dist/features/migrations/lexicalPluginToLexical/feature.server.js.map +1 -1
- package/dist/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/Component.js +12 -7
- package/dist/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/Component.js.map +1 -1
- package/dist/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/index.js +66 -58
- package/dist/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/index.js.map +1 -1
- package/dist/features/migrations/slateToLexical/converter/converters/blockquote/converter.js +19 -19
- package/dist/features/migrations/slateToLexical/converter/converters/blockquote/converter.js.map +1 -1
- package/dist/features/migrations/slateToLexical/converter/converters/heading/converter.js +20 -26
- package/dist/features/migrations/slateToLexical/converter/converters/heading/converter.js.map +1 -1
- package/dist/features/migrations/slateToLexical/converter/converters/indent/converter.js +28 -30
- package/dist/features/migrations/slateToLexical/converter/converters/indent/converter.js.map +1 -1
- package/dist/features/migrations/slateToLexical/converter/converters/link/converter.js +26 -27
- package/dist/features/migrations/slateToLexical/converter/converters/link/converter.js.map +1 -1
- package/dist/features/migrations/slateToLexical/converter/converters/listItem/converter.js +22 -21
- package/dist/features/migrations/slateToLexical/converter/converters/listItem/converter.js.map +1 -1
- package/dist/features/migrations/slateToLexical/converter/converters/orderedList/converter.js +22 -22
- package/dist/features/migrations/slateToLexical/converter/converters/orderedList/converter.js.map +1 -1
- package/dist/features/migrations/slateToLexical/converter/converters/relationship/converter.js +12 -13
- package/dist/features/migrations/slateToLexical/converter/converters/relationship/converter.js.map +1 -1
- package/dist/features/migrations/slateToLexical/converter/converters/unknown/converter.js +23 -23
- package/dist/features/migrations/slateToLexical/converter/converters/unknown/converter.js.map +1 -1
- package/dist/features/migrations/slateToLexical/converter/converters/unorderedList/converter.js +22 -22
- package/dist/features/migrations/slateToLexical/converter/converters/unorderedList/converter.js.map +1 -1
- package/dist/features/migrations/slateToLexical/converter/converters/upload/converter.js +15 -16
- package/dist/features/migrations/slateToLexical/converter/converters/upload/converter.js.map +1 -1
- package/dist/features/migrations/slateToLexical/converter/defaultConverters.js +1 -13
- package/dist/features/migrations/slateToLexical/converter/defaultConverters.js.map +1 -1
- package/dist/features/migrations/slateToLexical/converter/index.js +117 -110
- package/dist/features/migrations/slateToLexical/converter/index.js.map +1 -1
- package/dist/features/migrations/slateToLexical/converter/types.js +1 -2
- package/dist/features/migrations/slateToLexical/converter/types.js.map +1 -1
- package/dist/features/migrations/slateToLexical/feature.client.js +5 -7
- package/dist/features/migrations/slateToLexical/feature.client.js.map +1 -1
- package/dist/features/migrations/slateToLexical/feature.server.js +45 -54
- package/dist/features/migrations/slateToLexical/feature.server.js.map +1 -1
- package/dist/features/migrations/slateToLexical/nodes/unknownConvertedNode/Component.js +12 -7
- package/dist/features/migrations/slateToLexical/nodes/unknownConvertedNode/Component.js.map +1 -1
- package/dist/features/migrations/slateToLexical/nodes/unknownConvertedNode/index.js +66 -58
- package/dist/features/migrations/slateToLexical/nodes/unknownConvertedNode/index.js.map +1 -1
- package/dist/features/paragraph/client/index.js +58 -61
- package/dist/features/paragraph/client/index.js.map +1 -1
- package/dist/features/paragraph/server/i18n.js +148 -149
- package/dist/features/paragraph/server/i18n.js.map +1 -1
- package/dist/features/paragraph/server/index.js +6 -7
- package/dist/features/paragraph/server/index.js.map +1 -1
- package/dist/features/relationship/client/components/RelationshipComponent.js +112 -72
- package/dist/features/relationship/client/components/RelationshipComponent.js.map +1 -1
- package/dist/features/relationship/client/drawer/commands.js +0 -1
- package/dist/features/relationship/client/drawer/commands.js.map +1 -1
- package/dist/features/relationship/client/drawer/index.js +133 -65
- package/dist/features/relationship/client/drawer/index.js.map +1 -1
- package/dist/features/relationship/client/index.js +53 -59
- package/dist/features/relationship/client/index.js.map +1 -1
- package/dist/features/relationship/client/nodes/RelationshipNode.js +60 -54
- package/dist/features/relationship/client/nodes/RelationshipNode.js.map +1 -1
- package/dist/features/relationship/client/plugins/index.js +69 -32
- package/dist/features/relationship/client/plugins/index.js.map +1 -1
- package/dist/features/relationship/client/utils/useEnabledRelationships.js +58 -48
- package/dist/features/relationship/client/utils/useEnabledRelationships.js.map +1 -1
- package/dist/features/relationship/server/graphQLPopulationPromise.js +34 -26
- package/dist/features/relationship/server/graphQLPopulationPromise.js.map +1 -1
- package/dist/features/relationship/server/i18n.js +111 -112
- package/dist/features/relationship/server/i18n.js.map +1 -1
- package/dist/features/relationship/server/index.js +59 -64
- package/dist/features/relationship/server/index.js.map +1 -1
- package/dist/features/relationship/server/nodes/RelationshipNode.js +95 -92
- package/dist/features/relationship/server/nodes/RelationshipNode.js.map +1 -1
- package/dist/features/shared/slashMenu/basicGroup.js +9 -8
- package/dist/features/shared/slashMenu/basicGroup.js.map +1 -1
- package/dist/features/shared/toolbar/addDropdownGroup.js +8 -9
- package/dist/features/shared/toolbar/addDropdownGroup.js.map +1 -1
- package/dist/features/shared/toolbar/featureButtonsGroup.js +7 -8
- package/dist/features/shared/toolbar/featureButtonsGroup.js.map +1 -1
- package/dist/features/shared/toolbar/textDropdownGroup.js +8 -9
- package/dist/features/shared/toolbar/textDropdownGroup.js.map +1 -1
- package/dist/features/textState/defaultColors.js +370 -370
- package/dist/features/textState/defaultColors.js.map +1 -1
- package/dist/features/textState/feature.client.js +64 -60
- package/dist/features/textState/feature.client.js.map +1 -1
- package/dist/features/textState/feature.server.js +14 -46
- package/dist/features/textState/feature.server.js.map +1 -1
- package/dist/features/textState/i18n.js +111 -112
- package/dist/features/textState/i18n.js.map +1 -1
- package/dist/features/textState/textState.js +62 -64
- package/dist/features/textState/textState.js.map +1 -1
- package/dist/features/toolbars/fixed/client/Toolbar/index.js +297 -167
- package/dist/features/toolbars/fixed/client/Toolbar/index.js.map +1 -1
- package/dist/features/toolbars/fixed/client/index.js +5 -7
- package/dist/features/toolbars/fixed/client/index.js.map +1 -1
- package/dist/features/toolbars/fixed/server/index.js +16 -32
- package/dist/features/toolbars/fixed/server/index.js.map +1 -1
- package/dist/features/toolbars/inline/client/Toolbar/index.js +366 -250
- package/dist/features/toolbars/inline/client/Toolbar/index.js.map +1 -1
- package/dist/features/toolbars/inline/client/index.js +5 -7
- package/dist/features/toolbars/inline/client/index.js.map +1 -1
- package/dist/features/toolbars/inline/server/index.js +4 -5
- package/dist/features/toolbars/inline/server/index.js.map +1 -1
- package/dist/features/toolbars/shared/ToolbarButton/index.js +146 -94
- package/dist/features/toolbars/shared/ToolbarButton/index.js.map +1 -1
- package/dist/features/toolbars/shared/ToolbarDropdown/DropDown.js +203 -180
- package/dist/features/toolbars/shared/ToolbarDropdown/DropDown.js.map +1 -1
- package/dist/features/toolbars/shared/ToolbarDropdown/index.js +176 -118
- package/dist/features/toolbars/shared/ToolbarDropdown/index.js.map +1 -1
- package/dist/features/toolbars/types.js +1 -29
- package/dist/features/toolbars/types.js.map +1 -1
- package/dist/features/typeUtilities.js +2 -3
- package/dist/features/typeUtilities.js.map +1 -1
- package/dist/features/typesClient.js +1 -61
- package/dist/features/typesClient.js.map +1 -1
- package/dist/features/typesServer.js +1 -90
- package/dist/features/typesServer.js.map +1 -1
- package/dist/features/upload/client/component/index.js +185 -114
- package/dist/features/upload/client/component/index.js.map +1 -1
- package/dist/features/upload/client/component/pending/index.js +10 -6
- package/dist/features/upload/client/component/pending/index.js.map +1 -1
- package/dist/features/upload/client/drawer/commands.js +1 -1
- package/dist/features/upload/client/drawer/commands.js.map +1 -1
- package/dist/features/upload/client/drawer/index.js +133 -67
- package/dist/features/upload/client/drawer/index.js.map +1 -1
- package/dist/features/upload/client/index.js +51 -61
- package/dist/features/upload/client/index.js.map +1 -1
- package/dist/features/upload/client/nodes/UploadNode.js +61 -53
- package/dist/features/upload/client/nodes/UploadNode.js.map +1 -1
- package/dist/features/upload/client/plugin/index.js +332 -284
- package/dist/features/upload/client/plugin/index.js.map +1 -1
- package/dist/features/upload/server/graphQLPopulationPromise.js +63 -48
- package/dist/features/upload/server/graphQLPopulationPromise.js.map +1 -1
- package/dist/features/upload/server/i18n.js +111 -112
- package/dist/features/upload/server/i18n.js.map +1 -1
- package/dist/features/upload/server/index.js +206 -196
- package/dist/features/upload/server/index.js.map +1 -1
- package/dist/features/upload/server/nodes/UploadNode.js +99 -115
- package/dist/features/upload/server/nodes/UploadNode.js.map +1 -1
- package/dist/features/upload/server/nodes/conversions.js +40 -41
- package/dist/features/upload/server/nodes/conversions.js.map +1 -1
- package/dist/features/upload/server/validate.js +62 -48
- package/dist/features/upload/server/validate.js.map +1 -1
- package/dist/field/Diff/converters/link.js +41 -32
- package/dist/field/Diff/converters/link.js.map +1 -1
- package/dist/field/Diff/converters/listitem/index.js +55 -32
- package/dist/field/Diff/converters/listitem/index.js.map +1 -1
- package/dist/field/Diff/converters/relationship/index.js +61 -41
- package/dist/field/Diff/converters/relationship/index.js.map +1 -1
- package/dist/field/Diff/converters/unknown/index.js +41 -29
- package/dist/field/Diff/converters/unknown/index.js.map +1 -1
- package/dist/field/Diff/converters/upload/index.js +69 -52
- package/dist/field/Diff/converters/upload/index.js.map +1 -1
- package/dist/field/Diff/index.js +67 -47
- package/dist/field/Diff/index.js.map +1 -1
- package/dist/field/Field.js +166 -126
- package/dist/field/Field.js.map +1 -1
- package/dist/field/RenderLexical/index.js +118 -90
- package/dist/field/RenderLexical/index.js.map +1 -1
- package/dist/field/bundled.css +1 -0
- package/dist/field/index.js +98 -43
- package/dist/field/index.js.map +1 -1
- package/dist/field/rscEntry.js +85 -79
- package/dist/field/rscEntry.js.map +1 -1
- package/dist/i18n.js +222 -223
- package/dist/i18n.js.map +1 -1
- package/dist/index.js +704 -639
- package/dist/index.js.map +1 -1
- package/dist/lexical/EditorPlugin.js +18 -7
- package/dist/lexical/EditorPlugin.js.map +1 -1
- package/dist/lexical/LexicalEditor.js +171 -111
- package/dist/lexical/LexicalEditor.js.map +1 -1
- package/dist/lexical/LexicalProvider.js +86 -58
- package/dist/lexical/LexicalProvider.js.map +1 -1
- package/dist/lexical/config/client/EditorConfigProvider.js +82 -86
- package/dist/lexical/config/client/EditorConfigProvider.js.map +1 -1
- package/dist/lexical/config/client/default.js +3 -3
- package/dist/lexical/config/client/default.js.map +1 -1
- package/dist/lexical/config/client/loader.js +38 -30
- package/dist/lexical/config/client/loader.js.map +1 -1
- package/dist/lexical/config/client/sanitize.js +187 -188
- package/dist/lexical/config/client/sanitize.js.map +1 -1
- package/dist/lexical/config/server/default.js +5 -27
- package/dist/lexical/config/server/default.js.map +1 -1
- package/dist/lexical/config/server/loader.js +106 -105
- package/dist/lexical/config/server/loader.js.map +1 -1
- package/dist/lexical/config/server/sanitize.js +113 -114
- package/dist/lexical/config/server/sanitize.js.map +1 -1
- package/dist/lexical/config/types.js +1 -4
- package/dist/lexical/config/types.js.map +1 -1
- package/dist/lexical/nodes/index.js +15 -12
- package/dist/lexical/nodes/index.js.map +1 -1
- package/dist/lexical/plugins/ClipboardPlugin/index.js +70 -66
- package/dist/lexical/plugins/ClipboardPlugin/index.js.map +1 -1
- package/dist/lexical/plugins/DecoratorPlugin/index.js +225 -208
- package/dist/lexical/plugins/DecoratorPlugin/index.js.map +1 -1
- package/dist/lexical/plugins/InsertParagraphAtEnd/index.js +42 -20
- package/dist/lexical/plugins/InsertParagraphAtEnd/index.js.map +1 -1
- package/dist/lexical/plugins/MarkdownShortcut/index.js +23 -11
- package/dist/lexical/plugins/MarkdownShortcut/index.js.map +1 -1
- package/dist/lexical/plugins/NormalizeSelection/index.js +19 -21
- package/dist/lexical/plugins/NormalizeSelection/index.js.map +1 -1
- package/dist/lexical/plugins/SelectAllPlugin/index.js +17 -19
- package/dist/lexical/plugins/SelectAllPlugin/index.js.map +1 -1
- package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/LexicalMenu.js +420 -399
- package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/LexicalMenu.js.map +1 -1
- package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/index.js +155 -151
- package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/index.js.map +1 -1
- package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/types.js +1 -10
- package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/types.js.map +1 -1
- package/dist/lexical/plugins/SlashMenu/index.js +181 -137
- package/dist/lexical/plugins/SlashMenu/index.js.map +1 -1
- package/dist/lexical/plugins/SlashMenu/useMenuTriggerMatch.js +41 -28
- package/dist/lexical/plugins/SlashMenu/useMenuTriggerMatch.js.map +1 -1
- package/dist/lexical/plugins/TextPlugin/index.js +42 -27
- package/dist/lexical/plugins/TextPlugin/index.js.map +1 -1
- package/dist/lexical/plugins/handles/AddBlockHandlePlugin/index.js +130 -125
- package/dist/lexical/plugins/handles/AddBlockHandlePlugin/index.js.map +1 -1
- package/dist/lexical/plugins/handles/DraggableBlockPlugin/debounce.js +10 -10
- package/dist/lexical/plugins/handles/DraggableBlockPlugin/debounce.js.map +1 -1
- package/dist/lexical/plugins/handles/DraggableBlockPlugin/getBoundingRectWithoutTransform.js +10 -10
- package/dist/lexical/plugins/handles/DraggableBlockPlugin/getBoundingRectWithoutTransform.js.map +1 -1
- package/dist/lexical/plugins/handles/DraggableBlockPlugin/highlightElemOriginalPosition.js +26 -23
- package/dist/lexical/plugins/handles/DraggableBlockPlugin/highlightElemOriginalPosition.js.map +1 -1
- package/dist/lexical/plugins/handles/DraggableBlockPlugin/index.js +317 -287
- package/dist/lexical/plugins/handles/DraggableBlockPlugin/index.js.map +1 -1
- package/dist/lexical/plugins/handles/DraggableBlockPlugin/setTargetLine.js +98 -86
- package/dist/lexical/plugins/handles/DraggableBlockPlugin/setTargetLine.js.map +1 -1
- package/dist/lexical/plugins/handles/utils/calculateDistanceFromScrollerElem.js +22 -16
- package/dist/lexical/plugins/handles/utils/calculateDistanceFromScrollerElem.js.map +1 -1
- package/dist/lexical/plugins/handles/utils/doesLineHeightAffectElement.js +19 -29
- package/dist/lexical/plugins/handles/utils/doesLineHeightAffectElement.js.map +1 -1
- package/dist/lexical/plugins/handles/utils/getCollapsedMargins.js +14 -11
- package/dist/lexical/plugins/handles/utils/getCollapsedMargins.js.map +1 -1
- package/dist/lexical/plugins/handles/utils/getNodeCloseToPoint.js +133 -122
- package/dist/lexical/plugins/handles/utils/getNodeCloseToPoint.js.map +1 -1
- package/dist/lexical/plugins/handles/utils/getTopLevelNodeKeys.js +2 -2
- package/dist/lexical/plugins/handles/utils/getTopLevelNodeKeys.js.map +1 -1
- package/dist/lexical/plugins/handles/utils/isOnHandleElement.js +2 -2
- package/dist/lexical/plugins/handles/utils/isOnHandleElement.js.map +1 -1
- package/dist/lexical/plugins/handles/utils/setHandlePosition.js +24 -29
- package/dist/lexical/plugins/handles/utils/setHandlePosition.js.map +1 -1
- package/dist/lexical/theme/EditorTheme.js +65 -72
- package/dist/lexical/theme/EditorTheme.js.map +1 -1
- package/dist/lexical/ui/ContentEditable.js +36 -8
- package/dist/lexical/ui/ContentEditable.js.map +1 -1
- package/dist/lexical/ui/icons/AI/index.js +31 -10
- package/dist/lexical/ui/icons/AI/index.js.map +1 -1
- package/dist/lexical/ui/icons/Add/index.js +16 -4
- package/dist/lexical/ui/icons/Add/index.js.map +1 -1
- package/dist/lexical/ui/icons/AlignCenter/index.js +25 -5
- package/dist/lexical/ui/icons/AlignCenter/index.js.map +1 -1
- package/dist/lexical/ui/icons/AlignJustify/index.js +25 -5
- package/dist/lexical/ui/icons/AlignJustify/index.js.map +1 -1
- package/dist/lexical/ui/icons/AlignLeft/index.js +25 -5
- package/dist/lexical/ui/icons/AlignLeft/index.js.map +1 -1
- package/dist/lexical/ui/icons/AlignRight/index.js +25 -5
- package/dist/lexical/ui/icons/AlignRight/index.js.map +1 -1
- package/dist/lexical/ui/icons/Block/index.js +34 -5
- package/dist/lexical/ui/icons/Block/index.js.map +1 -1
- package/dist/lexical/ui/icons/Blockquote/index.js +16 -3
- package/dist/lexical/ui/icons/Blockquote/index.js.map +1 -1
- package/dist/lexical/ui/icons/Bold/index.js +16 -3
- package/dist/lexical/ui/icons/Bold/index.js.map +1 -1
- package/dist/lexical/ui/icons/Checklist/index.js +24 -4
- package/dist/lexical/ui/icons/Checklist/index.js.map +1 -1
- package/dist/lexical/ui/icons/Code/index.js +19 -4
- package/dist/lexical/ui/icons/Code/index.js.map +1 -1
- package/dist/lexical/ui/icons/CodeBlock/index.js +14 -3
- package/dist/lexical/ui/icons/CodeBlock/index.js.map +1 -1
- package/dist/lexical/ui/icons/Collapse/index.js +15 -3
- package/dist/lexical/ui/icons/Collapse/index.js.map +1 -1
- package/dist/lexical/ui/icons/H1/index.js +16 -3
- package/dist/lexical/ui/icons/H1/index.js.map +1 -1
- package/dist/lexical/ui/icons/H2/index.js +16 -3
- package/dist/lexical/ui/icons/H2/index.js.map +1 -1
- package/dist/lexical/ui/icons/H3/index.js +16 -3
- package/dist/lexical/ui/icons/H3/index.js.map +1 -1
- package/dist/lexical/ui/icons/H4/index.js +16 -3
- package/dist/lexical/ui/icons/H4/index.js.map +1 -1
- package/dist/lexical/ui/icons/H5/index.js +16 -3
- package/dist/lexical/ui/icons/H5/index.js.map +1 -1
- package/dist/lexical/ui/icons/H6/index.js +16 -3
- package/dist/lexical/ui/icons/H6/index.js.map +1 -1
- package/dist/lexical/ui/icons/HorizontalRule/index.js +19 -3
- package/dist/lexical/ui/icons/HorizontalRule/index.js.map +1 -1
- package/dist/lexical/ui/icons/IndentDecrease/index.js +28 -6
- package/dist/lexical/ui/icons/IndentDecrease/index.js.map +1 -1
- package/dist/lexical/ui/icons/IndentIncrease/index.js +28 -6
- package/dist/lexical/ui/icons/IndentIncrease/index.js.map +1 -1
- package/dist/lexical/ui/icons/InlineBlocks/index.js +18 -3
- package/dist/lexical/ui/icons/InlineBlocks/index.js.map +1 -1
- package/dist/lexical/ui/icons/Italic/index.js +16 -3
- package/dist/lexical/ui/icons/Italic/index.js.map +1 -1
- package/dist/lexical/ui/icons/Link/index.js +17 -3
- package/dist/lexical/ui/icons/Link/index.js.map +1 -1
- package/dist/lexical/ui/icons/Meatballs/index.js +19 -5
- package/dist/lexical/ui/icons/Meatballs/index.js.map +1 -1
- package/dist/lexical/ui/icons/OrderedList/index.js +31 -7
- package/dist/lexical/ui/icons/OrderedList/index.js.map +1 -1
- package/dist/lexical/ui/icons/Relationship/index.js +31 -10
- package/dist/lexical/ui/icons/Relationship/index.js.map +1 -1
- package/dist/lexical/ui/icons/Strikethrough/index.js +19 -4
- package/dist/lexical/ui/icons/Strikethrough/index.js.map +1 -1
- package/dist/lexical/ui/icons/Subscript/index.js +16 -3
- package/dist/lexical/ui/icons/Subscript/index.js.map +1 -1
- package/dist/lexical/ui/icons/Superscript/index.js +16 -3
- package/dist/lexical/ui/icons/Superscript/index.js.map +1 -1
- package/dist/lexical/ui/icons/Table/index.js +18 -5
- package/dist/lexical/ui/icons/Table/index.js.map +1 -1
- package/dist/lexical/ui/icons/Text/index.js +16 -3
- package/dist/lexical/ui/icons/Text/index.js.map +1 -1
- package/dist/lexical/ui/icons/TextState/index.js +19 -19
- package/dist/lexical/ui/icons/TextState/index.js.map +1 -1
- package/dist/lexical/ui/icons/Underline/index.js +19 -4
- package/dist/lexical/ui/icons/Underline/index.js.map +1 -1
- package/dist/lexical/ui/icons/UnorderedList/index.js +46 -8
- package/dist/lexical/ui/icons/UnorderedList/index.js.map +1 -1
- package/dist/lexical/ui/icons/Upload/index.js +28 -5
- package/dist/lexical/ui/icons/Upload/index.js.map +1 -1
- package/dist/lexical/utils/canUseDOM.js +1 -1
- package/dist/lexical/utils/canUseDOM.js.map +1 -1
- package/dist/lexical/utils/environment.js +1 -1
- package/dist/lexical/utils/environment.js.map +1 -1
- package/dist/lexical/utils/getDOMRangeRect.js +12 -12
- package/dist/lexical/utils/getDOMRangeRect.js.map +1 -1
- package/dist/lexical/utils/getSelectedNode.js +17 -13
- package/dist/lexical/utils/getSelectedNode.js.map +1 -1
- package/dist/lexical/utils/guard.js +4 -3
- package/dist/lexical/utils/guard.js.map +1 -1
- package/dist/lexical/utils/joinClasses.js +2 -2
- package/dist/lexical/utils/joinClasses.js.map +1 -1
- package/dist/lexical/utils/markdown/createBlockNode.js +9 -10
- package/dist/lexical/utils/markdown/createBlockNode.js.map +1 -1
- package/dist/lexical/utils/nodeFormat.js +58 -59
- package/dist/lexical/utils/nodeFormat.js.map +1 -1
- package/dist/lexical/utils/point.js +39 -32
- package/dist/lexical/utils/point.js.map +1 -1
- package/dist/lexical/utils/rect.js +166 -136
- package/dist/lexical/utils/rect.js.map +1 -1
- package/dist/lexical/utils/setFloatingElemPosition.js +56 -48
- package/dist/lexical/utils/setFloatingElemPosition.js.map +1 -1
- package/dist/lexical/utils/setFloatingElemPositionForLinkEditor.js +22 -22
- package/dist/lexical/utils/setFloatingElemPositionForLinkEditor.js.map +1 -1
- package/dist/lexical/utils/swipe.js +81 -83
- package/dist/lexical/utils/swipe.js.map +1 -1
- package/dist/lexical/utils/url.js +53 -53
- package/dist/lexical/utils/url.js.map +1 -1
- package/dist/lexical/utils/url.spec.js +98 -214
- package/dist/lexical/utils/url.spec.js.map +1 -1
- package/dist/lexical-proxy/@lexical-headless.js +0 -1
- package/dist/lexical-proxy/@lexical-headless.js.map +1 -1
- package/dist/lexical-proxy/@lexical-html.js +0 -1
- package/dist/lexical-proxy/@lexical-html.js.map +1 -1
- package/dist/lexical-proxy/@lexical-link.js +0 -1
- package/dist/lexical-proxy/@lexical-link.js.map +1 -1
- package/dist/lexical-proxy/@lexical-list.js +0 -1
- package/dist/lexical-proxy/@lexical-list.js.map +1 -1
- package/dist/lexical-proxy/@lexical-mark.js +0 -1
- package/dist/lexical-proxy/@lexical-mark.js.map +1 -1
- package/dist/lexical-proxy/@lexical-markdown.js +0 -1
- package/dist/lexical-proxy/@lexical-markdown.js.map +1 -1
- package/dist/lexical-proxy/@lexical-react/LexicalAutoEmbedPlugin.js +0 -1
- package/dist/lexical-proxy/@lexical-react/LexicalAutoEmbedPlugin.js.map +1 -1
- package/dist/lexical-proxy/@lexical-react/LexicalAutoFocusPlugin.js +0 -1
- package/dist/lexical-proxy/@lexical-react/LexicalAutoFocusPlugin.js.map +1 -1
- package/dist/lexical-proxy/@lexical-react/LexicalAutoLinkPlugin.js +0 -1
- package/dist/lexical-proxy/@lexical-react/LexicalAutoLinkPlugin.js.map +1 -1
- package/dist/lexical-proxy/@lexical-react/LexicalBlockWithAlignableContents.js +0 -1
- package/dist/lexical-proxy/@lexical-react/LexicalBlockWithAlignableContents.js.map +1 -1
- package/dist/lexical-proxy/@lexical-react/LexicalCharacterLimitPlugin.js +0 -1
- package/dist/lexical-proxy/@lexical-react/LexicalCharacterLimitPlugin.js.map +1 -1
- package/dist/lexical-proxy/@lexical-react/LexicalCheckListPlugin.js +0 -1
- package/dist/lexical-proxy/@lexical-react/LexicalCheckListPlugin.js.map +1 -1
- package/dist/lexical-proxy/@lexical-react/LexicalClearEditorPlugin.js +0 -1
- package/dist/lexical-proxy/@lexical-react/LexicalClearEditorPlugin.js.map +1 -1
- package/dist/lexical-proxy/@lexical-react/LexicalClickableLinkPlugin.js +0 -1
- package/dist/lexical-proxy/@lexical-react/LexicalClickableLinkPlugin.js.map +1 -1
- package/dist/lexical-proxy/@lexical-react/LexicalCollaborationContext.js +0 -1
- package/dist/lexical-proxy/@lexical-react/LexicalCollaborationContext.js.map +1 -1
- package/dist/lexical-proxy/@lexical-react/LexicalCollaborationPlugin.js +0 -1
- package/dist/lexical-proxy/@lexical-react/LexicalCollaborationPlugin.js.map +1 -1
- package/dist/lexical-proxy/@lexical-react/LexicalComposer.js +0 -1
- package/dist/lexical-proxy/@lexical-react/LexicalComposer.js.map +1 -1
- package/dist/lexical-proxy/@lexical-react/LexicalComposerContext.js +0 -1
- package/dist/lexical-proxy/@lexical-react/LexicalComposerContext.js.map +1 -1
- package/dist/lexical-proxy/@lexical-react/LexicalContentEditable.js +0 -1
- package/dist/lexical-proxy/@lexical-react/LexicalContentEditable.js.map +1 -1
- package/dist/lexical-proxy/@lexical-react/LexicalContextMenuPlugin.js +0 -1
- package/dist/lexical-proxy/@lexical-react/LexicalContextMenuPlugin.js.map +1 -1
- package/dist/lexical-proxy/@lexical-react/LexicalDecoratorBlockNode.js +0 -1
- package/dist/lexical-proxy/@lexical-react/LexicalDecoratorBlockNode.js.map +1 -1
- package/dist/lexical-proxy/@lexical-react/LexicalDraggableBlockPlugin.js +0 -1
- package/dist/lexical-proxy/@lexical-react/LexicalDraggableBlockPlugin.js.map +1 -1
- package/dist/lexical-proxy/@lexical-react/LexicalEditorRefPlugin.js +0 -1
- package/dist/lexical-proxy/@lexical-react/LexicalEditorRefPlugin.js.map +1 -1
- package/dist/lexical-proxy/@lexical-react/LexicalErrorBoundary.js +0 -1
- package/dist/lexical-proxy/@lexical-react/LexicalErrorBoundary.js.map +1 -1
- package/dist/lexical-proxy/@lexical-react/LexicalHashtagPlugin.js +0 -1
- package/dist/lexical-proxy/@lexical-react/LexicalHashtagPlugin.js.map +1 -1
- package/dist/lexical-proxy/@lexical-react/LexicalHistoryPlugin.js +0 -1
- package/dist/lexical-proxy/@lexical-react/LexicalHistoryPlugin.js.map +1 -1
- package/dist/lexical-proxy/@lexical-react/LexicalHorizontalRuleNode.js +0 -1
- package/dist/lexical-proxy/@lexical-react/LexicalHorizontalRuleNode.js.map +1 -1
- package/dist/lexical-proxy/@lexical-react/LexicalHorizontalRulePlugin.js +0 -1
- package/dist/lexical-proxy/@lexical-react/LexicalHorizontalRulePlugin.js.map +1 -1
- package/dist/lexical-proxy/@lexical-react/LexicalLinkPlugin.js +0 -1
- package/dist/lexical-proxy/@lexical-react/LexicalLinkPlugin.js.map +1 -1
- package/dist/lexical-proxy/@lexical-react/LexicalListPlugin.js +0 -1
- package/dist/lexical-proxy/@lexical-react/LexicalListPlugin.js.map +1 -1
- package/dist/lexical-proxy/@lexical-react/LexicalMarkdownShortcutPlugin.js +0 -1
- package/dist/lexical-proxy/@lexical-react/LexicalMarkdownShortcutPlugin.js.map +1 -1
- package/dist/lexical-proxy/@lexical-react/LexicalNestedComposer.js +0 -1
- package/dist/lexical-proxy/@lexical-react/LexicalNestedComposer.js.map +1 -1
- package/dist/lexical-proxy/@lexical-react/LexicalNodeContextMenuPlugin.js +0 -1
- package/dist/lexical-proxy/@lexical-react/LexicalNodeContextMenuPlugin.js.map +1 -1
- package/dist/lexical-proxy/@lexical-react/LexicalNodeEventPlugin.js +0 -1
- package/dist/lexical-proxy/@lexical-react/LexicalNodeEventPlugin.js.map +1 -1
- package/dist/lexical-proxy/@lexical-react/LexicalNodeMenuPlugin.js +0 -1
- package/dist/lexical-proxy/@lexical-react/LexicalNodeMenuPlugin.js.map +1 -1
- package/dist/lexical-proxy/@lexical-react/LexicalOnChangePlugin.js +0 -1
- package/dist/lexical-proxy/@lexical-react/LexicalOnChangePlugin.js.map +1 -1
- package/dist/lexical-proxy/@lexical-react/LexicalPlainTextPlugin.js +0 -1
- package/dist/lexical-proxy/@lexical-react/LexicalPlainTextPlugin.js.map +1 -1
- package/dist/lexical-proxy/@lexical-react/LexicalRichTextPlugin.js +0 -1
- package/dist/lexical-proxy/@lexical-react/LexicalRichTextPlugin.js.map +1 -1
- package/dist/lexical-proxy/@lexical-react/LexicalTabIndentationPlugin.js +0 -1
- package/dist/lexical-proxy/@lexical-react/LexicalTabIndentationPlugin.js.map +1 -1
- package/dist/lexical-proxy/@lexical-react/LexicalTableOfContentsPlugin.js +0 -1
- package/dist/lexical-proxy/@lexical-react/LexicalTableOfContentsPlugin.js.map +1 -1
- package/dist/lexical-proxy/@lexical-react/LexicalTablePlugin.js +0 -1
- package/dist/lexical-proxy/@lexical-react/LexicalTablePlugin.js.map +1 -1
- package/dist/lexical-proxy/@lexical-react/LexicalTreeView.js +0 -1
- package/dist/lexical-proxy/@lexical-react/LexicalTreeView.js.map +1 -1
- package/dist/lexical-proxy/@lexical-react/LexicalTypeaheadMenuPlugin.js +0 -1
- package/dist/lexical-proxy/@lexical-react/LexicalTypeaheadMenuPlugin.js.map +1 -1
- package/dist/lexical-proxy/@lexical-react/useLexicalEditable.js +0 -1
- package/dist/lexical-proxy/@lexical-react/useLexicalEditable.js.map +1 -1
- package/dist/lexical-proxy/@lexical-react/useLexicalIsTextContentEmpty.js +0 -1
- package/dist/lexical-proxy/@lexical-react/useLexicalIsTextContentEmpty.js.map +1 -1
- package/dist/lexical-proxy/@lexical-react/useLexicalNodeSelection.js +0 -1
- package/dist/lexical-proxy/@lexical-react/useLexicalNodeSelection.js.map +1 -1
- package/dist/lexical-proxy/@lexical-react/useLexicalSubscription.js +0 -1
- package/dist/lexical-proxy/@lexical-react/useLexicalSubscription.js.map +1 -1
- package/dist/lexical-proxy/@lexical-react/useLexicalTextEntity.js +0 -1
- package/dist/lexical-proxy/@lexical-react/useLexicalTextEntity.js.map +1 -1
- package/dist/lexical-proxy/@lexical-rich-text.js +0 -1
- package/dist/lexical-proxy/@lexical-rich-text.js.map +1 -1
- package/dist/lexical-proxy/@lexical-selection.js +0 -1
- package/dist/lexical-proxy/@lexical-selection.js.map +1 -1
- package/dist/lexical-proxy/@lexical-utils.js +0 -1
- package/dist/lexical-proxy/@lexical-utils.js.map +1 -1
- package/dist/lexical-proxy/lexical.js +0 -1
- package/dist/lexical-proxy/lexical.js.map +1 -1
- package/dist/nodeTypes.js +1 -35
- package/dist/nodeTypes.js.map +1 -1
- package/dist/packages/@lexical/markdown/MarkdownExport.js +179 -184
- package/dist/packages/@lexical/markdown/MarkdownExport.js.map +1 -1
- package/dist/packages/@lexical/markdown/MarkdownImport.js +168 -174
- package/dist/packages/@lexical/markdown/MarkdownImport.js.map +1 -1
- package/dist/packages/@lexical/markdown/MarkdownShortcuts.js +268 -258
- package/dist/packages/@lexical/markdown/MarkdownShortcuts.js.map +1 -1
- package/dist/packages/@lexical/markdown/MarkdownTransformers.js +209 -305
- package/dist/packages/@lexical/markdown/MarkdownTransformers.js.map +1 -1
- package/dist/packages/@lexical/markdown/importTextFormatTransformer.js +73 -76
- package/dist/packages/@lexical/markdown/importTextFormatTransformer.js.map +1 -1
- package/dist/packages/@lexical/markdown/importTextMatchTransformer.js +48 -59
- package/dist/packages/@lexical/markdown/importTextMatchTransformer.js.map +1 -1
- package/dist/packages/@lexical/markdown/importTextTransformers.js +45 -51
- package/dist/packages/@lexical/markdown/importTextTransformers.js.map +1 -1
- package/dist/packages/@lexical/markdown/index.js +14 -33
- package/dist/packages/@lexical/markdown/index.js.map +1 -1
- package/dist/packages/@lexical/markdown/utils.js +185 -217
- package/dist/packages/@lexical/markdown/utils.js.map +1 -1
- package/dist/populateGraphQL/defaultValue.js +24 -29
- package/dist/populateGraphQL/defaultValue.js.map +1 -1
- package/dist/populateGraphQL/populate.js +37 -26
- package/dist/populateGraphQL/populate.js.map +1 -1
- package/dist/populateGraphQL/populateLexicalPopulationPromises.js +50 -34
- package/dist/populateGraphQL/populateLexicalPopulationPromises.js.map +1 -1
- package/dist/populateGraphQL/recursivelyPopulateFieldsForGraphQL.js +42 -35
- package/dist/populateGraphQL/recursivelyPopulateFieldsForGraphQL.js.map +1 -1
- package/dist/types.js +1 -40
- package/dist/types.js.map +1 -1
- package/dist/utilities/buildEditorState.js +40 -39
- package/dist/utilities/buildEditorState.js.map +1 -1
- package/dist/utilities/buildInitialState.js +52 -51
- package/dist/utilities/buildInitialState.js.map +1 -1
- package/dist/utilities/createClientFeature.js +48 -42
- package/dist/utilities/createClientFeature.js.map +1 -1
- package/dist/utilities/createServerFeature.js +48 -38
- package/dist/utilities/createServerFeature.js.map +1 -1
- package/dist/utilities/editorConfigFactory.js +79 -78
- package/dist/utilities/editorConfigFactory.js.map +1 -1
- package/dist/utilities/fieldsDrawer/Drawer.js +71 -21
- package/dist/utilities/fieldsDrawer/Drawer.js.map +1 -1
- package/dist/utilities/fieldsDrawer/DrawerContent.js +121 -99
- package/dist/utilities/fieldsDrawer/DrawerContent.js.map +1 -1
- package/dist/utilities/fieldsDrawer/useLexicalDocumentDrawer.js +115 -56
- package/dist/utilities/fieldsDrawer/useLexicalDocumentDrawer.js.map +1 -1
- package/dist/utilities/fieldsDrawer/useLexicalDrawer.js +121 -76
- package/dist/utilities/fieldsDrawer/useLexicalDrawer.js.map +1 -1
- package/dist/utilities/fieldsDrawer/useLexicalListDrawer.js +141 -71
- package/dist/utilities/fieldsDrawer/useLexicalListDrawer.js.map +1 -1
- package/dist/utilities/forEachNodeRecursively.js +24 -19
- package/dist/utilities/forEachNodeRecursively.js.map +1 -1
- package/dist/utilities/generateImportMap.js +49 -43
- package/dist/utilities/generateImportMap.js.map +1 -1
- package/dist/utilities/generateSchemaMap.js +37 -32
- package/dist/utilities/generateSchemaMap.js.map +1 -1
- package/dist/utilities/getDefaultSanitizedEditorConfig.js +14 -12
- package/dist/utilities/getDefaultSanitizedEditorConfig.js.map +1 -1
- package/dist/utilities/initLexicalFeatures.js +65 -68
- package/dist/utilities/initLexicalFeatures.js.map +1 -1
- package/dist/utilities/jsx/collectTopLevelJSXInLines.js +29 -26
- package/dist/utilities/jsx/collectTopLevelJSXInLines.js.map +1 -1
- package/dist/utilities/jsx/declare.d.js.map +1 -1
- package/dist/utilities/jsx/extractPropsFromJSXPropsString.js +102 -100
- package/dist/utilities/jsx/extractPropsFromJSXPropsString.js.map +1 -1
- package/dist/utilities/jsx/jsx.js +80 -76
- package/dist/utilities/jsx/jsx.js.map +1 -1
- package/dist/utilities/jsx/jsx.spec.js +171 -225
- package/dist/utilities/jsx/jsx.spec.js.map +1 -1
- package/dist/utilities/migrateSlateToLexical/index.js +128 -112
- package/dist/utilities/migrateSlateToLexical/index.js.map +1 -1
- package/dist/utilities/migrateSlateToLexical/migrateDocumentFieldsRecursively.js +78 -74
- package/dist/utilities/migrateSlateToLexical/migrateDocumentFieldsRecursively.js.map +1 -1
- package/dist/utilities/recurseNodeTree.js +25 -22
- package/dist/utilities/recurseNodeTree.js.map +1 -1
- package/dist/utilities/upgradeLexicalData/index.js +102 -88
- package/dist/utilities/upgradeLexicalData/index.js.map +1 -1
- package/dist/utilities/upgradeLexicalData/upgradeDocumentFieldsRecursively.js +80 -78
- package/dist/utilities/upgradeLexicalData/upgradeDocumentFieldsRecursively.js.map +1 -1
- package/dist/utilities/useLexicalFeature.js +16 -14
- package/dist/utilities/useLexicalFeature.js.map +1 -1
- package/dist/utilities/useRunDeprioritized.js +37 -41
- package/dist/utilities/useRunDeprioritized.js.map +1 -1
- package/dist/validate/hasText.js +20 -21
- package/dist/validate/hasText.js.map +1 -1
- package/dist/validate/index.js +28 -22
- package/dist/validate/index.js.map +1 -1
- package/dist/validate/validateNodes.js +31 -28
- package/dist/validate/validateNodes.js.map +1 -1
- package/package.json +9 -10
- package/dist/features/blocks/client/component/index.scss +0 -188
- package/dist/features/blocks/client/componentInline/index.scss +0 -90
- package/dist/features/blocks/premade/CodeBlock/Component/Collapse/index.scss +0 -6
- package/dist/features/blocks/premade/CodeBlock/Component/FloatingCollapse/index.scss +0 -29
- package/dist/features/blocks/premade/CodeBlock/Component/index.scss +0 -97
- package/dist/features/debug/jsxConverter/client/plugin/style.scss +0 -12
- package/dist/features/debug/testRecorder/client/plugin/index.scss +0 -53
- package/dist/features/debug/treeView/client/plugin/index.scss +0 -80
- package/dist/features/experimental_table/client/plugins/TableActionMenuPlugin/index.scss +0 -87
- package/dist/features/experimental_table/client/plugins/TableCellResizerPlugin/index.scss +0 -11
- package/dist/features/experimental_table/client/plugins/TablePlugin/index.scss +0 -233
- package/dist/features/horizontalRule/client/plugin/index.scss +0 -23
- package/dist/features/link/client/plugins/floatingLinkEditor/index.scss +0 -92
- package/dist/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/index.scss +0 -16
- package/dist/features/migrations/slateToLexical/nodes/unknownConvertedNode/index.scss +0 -16
- package/dist/features/relationship/client/components/index.scss +0 -95
- package/dist/features/toolbars/fixed/client/Toolbar/index.scss +0 -113
- package/dist/features/toolbars/inline/client/Toolbar/index.scss +0 -58
- package/dist/features/toolbars/shared/ToolbarButton/index.scss +0 -46
- package/dist/features/toolbars/shared/ToolbarDropdown/index.scss +0 -129
- package/dist/features/upload/client/component/index.scss +0 -191
- package/dist/field/Diff/converters/listitem/index.scss +0 -47
- package/dist/field/Diff/converters/relationship/index.scss +0 -73
- package/dist/field/Diff/converters/unknown/index.scss +0 -40
- package/dist/field/Diff/converters/upload/index.scss +0 -115
- package/dist/field/Diff/index.scss +0 -102
- package/dist/field/index.scss +0 -41
- package/dist/lexical/LexicalEditor.scss +0 -54
- package/dist/lexical/plugins/DecoratorPlugin/index.scss +0 -13
- package/dist/lexical/plugins/InsertParagraphAtEnd/index.scss +0 -54
- package/dist/lexical/plugins/SlashMenu/index.scss +0 -68
- package/dist/lexical/plugins/handles/AddBlockHandlePlugin/index.scss +0 -35
- package/dist/lexical/plugins/handles/DraggableBlockPlugin/index.scss +0 -80
- package/dist/lexical/theme/EditorTheme.scss +0 -357
- package/dist/lexical/ui/ContentEditable.scss +0 -105
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
'use client';
|
|
2
|
+
|
|
3
|
+
import { c as _c } from "react/compiler-runtime";
|
|
4
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
5
|
import { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext.js';
|
|
3
6
|
import { useLexicalEditable } from '@lexical/react/useLexicalEditable';
|
|
4
7
|
import { useScrollInfo, useThrottledEffect, useTranslation } from '@payloadcms/ui';
|
|
@@ -6,186 +9,313 @@ import * as React from 'react';
|
|
|
6
9
|
import { useMemo } from 'react';
|
|
7
10
|
import { useEditorConfigContext } from '../../../../../lexical/config/client/EditorConfigProvider.js';
|
|
8
11
|
import { ToolbarButton } from '../../../shared/ToolbarButton/index.js';
|
|
9
|
-
import './index.scss';
|
|
10
12
|
import { ToolbarDropdown } from '../../../shared/ToolbarDropdown/index.js';
|
|
11
|
-
function ButtonGroupItem({
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
13
|
+
function ButtonGroupItem({
|
|
14
|
+
anchorElem,
|
|
15
|
+
editor,
|
|
16
|
+
item
|
|
17
|
+
}) {
|
|
18
|
+
if (item.Component) {
|
|
19
|
+
return item?.Component && /*#__PURE__*/_jsx(item.Component, {
|
|
20
|
+
anchorElem: anchorElem,
|
|
21
|
+
editor: editor,
|
|
22
|
+
item: item
|
|
23
|
+
}, item.key);
|
|
24
|
+
}
|
|
25
|
+
if (!item.ChildComponent) {
|
|
26
|
+
return null;
|
|
27
|
+
}
|
|
28
|
+
return /*#__PURE__*/_jsx(ToolbarButton, {
|
|
29
|
+
editor: editor,
|
|
30
|
+
item: item,
|
|
31
|
+
children: /*#__PURE__*/_jsx(item.ChildComponent, {})
|
|
32
|
+
}, item.key);
|
|
21
33
|
}
|
|
22
|
-
function ToolbarGroupComponent(
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
34
|
+
function ToolbarGroupComponent(t0) {
|
|
35
|
+
const $ = _c(23);
|
|
36
|
+
const {
|
|
37
|
+
anchorElem,
|
|
38
|
+
editor,
|
|
39
|
+
editorConfig,
|
|
40
|
+
group,
|
|
41
|
+
index
|
|
42
|
+
} = t0;
|
|
43
|
+
const {
|
|
44
|
+
i18n
|
|
45
|
+
} = useTranslation();
|
|
46
|
+
const {
|
|
47
|
+
fieldProps: t1
|
|
48
|
+
} = useEditorConfigContext();
|
|
49
|
+
const {
|
|
50
|
+
featureClientSchemaMap,
|
|
51
|
+
schemaPath
|
|
52
|
+
} = t1;
|
|
53
|
+
const [dropdownLabel, setDropdownLabel] = React.useState(undefined);
|
|
54
|
+
const [DropdownIcon, setDropdownIcon] = React.useState(undefined);
|
|
55
|
+
let t2;
|
|
56
|
+
if ($[0] !== group.ChildComponent || $[1] !== group.items || $[2] !== group.type) {
|
|
57
|
+
t2 = () => {
|
|
58
|
+
if (group?.type === "dropdown" && group.items.length && group.ChildComponent) {
|
|
59
|
+
setDropdownIcon(() => group.ChildComponent);
|
|
60
|
+
} else {
|
|
61
|
+
setDropdownIcon(undefined);
|
|
62
|
+
}
|
|
63
|
+
};
|
|
64
|
+
$[0] = group.ChildComponent;
|
|
65
|
+
$[1] = group.items;
|
|
66
|
+
$[2] = group.type;
|
|
67
|
+
$[3] = t2;
|
|
68
|
+
} else {
|
|
69
|
+
t2 = $[3];
|
|
70
|
+
}
|
|
71
|
+
let t3;
|
|
72
|
+
if ($[4] !== group) {
|
|
73
|
+
t3 = [group];
|
|
74
|
+
$[4] = group;
|
|
75
|
+
$[5] = t3;
|
|
76
|
+
} else {
|
|
77
|
+
t3 = $[5];
|
|
78
|
+
}
|
|
79
|
+
React.useEffect(t2, t3);
|
|
80
|
+
let t4;
|
|
81
|
+
if ($[6] !== featureClientSchemaMap || $[7] !== group.ChildComponent || $[8] !== group.items || $[9] !== group.type || $[10] !== i18n || $[11] !== schemaPath) {
|
|
82
|
+
t4 = t5 => {
|
|
83
|
+
const {
|
|
84
|
+
activeItems
|
|
85
|
+
} = t5;
|
|
86
|
+
if (!activeItems.length) {
|
|
87
|
+
if (group?.type === "dropdown" && group.items.length && group.ChildComponent) {
|
|
88
|
+
setDropdownIcon(() => group.ChildComponent);
|
|
89
|
+
setDropdownLabel(undefined);
|
|
30
90
|
} else {
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
}, [
|
|
34
|
-
group
|
|
35
|
-
]);
|
|
36
|
-
const onActiveChange = React.useCallback(({ activeItems })=>{
|
|
37
|
-
if (!activeItems.length) {
|
|
38
|
-
if (group?.type === 'dropdown' && group.items.length && group.ChildComponent) {
|
|
39
|
-
setDropdownIcon(()=>group.ChildComponent);
|
|
40
|
-
setDropdownLabel(undefined);
|
|
41
|
-
} else {
|
|
42
|
-
setDropdownIcon(undefined);
|
|
43
|
-
setDropdownLabel(undefined);
|
|
44
|
-
}
|
|
45
|
-
return;
|
|
91
|
+
setDropdownIcon(undefined);
|
|
92
|
+
setDropdownLabel(undefined);
|
|
46
93
|
}
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
94
|
+
return;
|
|
95
|
+
}
|
|
96
|
+
const item = activeItems[0];
|
|
97
|
+
let label = item.key;
|
|
98
|
+
if (item.label) {
|
|
99
|
+
label = typeof item.label === "function" ? item.label({
|
|
100
|
+
featureClientSchemaMap,
|
|
101
|
+
i18n,
|
|
102
|
+
schemaPath
|
|
103
|
+
}) : item.label;
|
|
104
|
+
}
|
|
105
|
+
if (label.length > 25) {
|
|
106
|
+
label = label.substring(0, 25) + "...";
|
|
107
|
+
}
|
|
108
|
+
if (activeItems.length === 1) {
|
|
109
|
+
setDropdownLabel(label);
|
|
110
|
+
setDropdownIcon(() => item.ChildComponent);
|
|
111
|
+
} else {
|
|
112
|
+
setDropdownLabel(i18n.t("lexical:general:toolbarItemsActive", {
|
|
113
|
+
count: activeItems.length
|
|
114
|
+
}));
|
|
115
|
+
if (group?.type === "dropdown" && group.items.length && group.ChildComponent) {
|
|
116
|
+
setDropdownIcon(() => group.ChildComponent);
|
|
63
117
|
} else {
|
|
64
|
-
|
|
65
|
-
count: activeItems.length
|
|
66
|
-
}));
|
|
67
|
-
if (group?.type === 'dropdown' && group.items.length && group.ChildComponent) {
|
|
68
|
-
setDropdownIcon(()=>group.ChildComponent);
|
|
69
|
-
} else {
|
|
70
|
-
setDropdownIcon(undefined);
|
|
71
|
-
}
|
|
118
|
+
setDropdownIcon(undefined);
|
|
72
119
|
}
|
|
73
|
-
|
|
120
|
+
}
|
|
121
|
+
};
|
|
122
|
+
$[6] = featureClientSchemaMap;
|
|
123
|
+
$[7] = group.ChildComponent;
|
|
124
|
+
$[8] = group.items;
|
|
125
|
+
$[9] = group.type;
|
|
126
|
+
$[10] = i18n;
|
|
127
|
+
$[11] = schemaPath;
|
|
128
|
+
$[12] = t4;
|
|
129
|
+
} else {
|
|
130
|
+
t4 = $[12];
|
|
131
|
+
}
|
|
132
|
+
const onActiveChange = t4;
|
|
133
|
+
const t5 = `fixed-toolbar__group fixed-toolbar__group-${group.key}`;
|
|
134
|
+
let t6;
|
|
135
|
+
if ($[13] !== DropdownIcon || $[14] !== anchorElem || $[15] !== dropdownLabel || $[16] !== editor || $[17] !== editorConfig.features.toolbarFixed?.groups.length || $[18] !== group || $[19] !== index || $[20] !== onActiveChange || $[21] !== t5) {
|
|
136
|
+
t6 = _jsxs("div", {
|
|
137
|
+
className: t5,
|
|
138
|
+
"data-toolbar-group-key": group.key,
|
|
139
|
+
children: [group.type === "dropdown" && group.items.length ? DropdownIcon ? _jsx(ToolbarDropdown, {
|
|
140
|
+
anchorElem,
|
|
141
|
+
editor,
|
|
142
|
+
group,
|
|
143
|
+
Icon: DropdownIcon,
|
|
144
|
+
itemsContainerClassNames: ["fixed-toolbar__dropdown-items"],
|
|
145
|
+
label: dropdownLabel,
|
|
146
|
+
maxActiveItems: group.maxActiveItems ?? 1,
|
|
147
|
+
onActiveChange
|
|
148
|
+
}) : _jsx(ToolbarDropdown, {
|
|
149
|
+
anchorElem,
|
|
150
|
+
editor,
|
|
74
151
|
group,
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
152
|
+
itemsContainerClassNames: ["fixed-toolbar__dropdown-items"],
|
|
153
|
+
label: dropdownLabel,
|
|
154
|
+
maxActiveItems: group.maxActiveItems ?? 1,
|
|
155
|
+
onActiveChange
|
|
156
|
+
}) : null, group.type === "buttons" && group.items.length ? group.items.map(item_0 => _jsx(ButtonGroupItem, {
|
|
157
|
+
anchorElem,
|
|
158
|
+
editor,
|
|
159
|
+
item: item_0
|
|
160
|
+
}, item_0.key)) : null, index < editorConfig.features.toolbarFixed?.groups.length - 1 && _jsx("div", {
|
|
161
|
+
className: "divider"
|
|
162
|
+
})]
|
|
163
|
+
}, group.key);
|
|
164
|
+
$[13] = DropdownIcon;
|
|
165
|
+
$[14] = anchorElem;
|
|
166
|
+
$[15] = dropdownLabel;
|
|
167
|
+
$[16] = editor;
|
|
168
|
+
$[17] = editorConfig.features.toolbarFixed?.groups.length;
|
|
169
|
+
$[18] = group;
|
|
170
|
+
$[19] = index;
|
|
171
|
+
$[20] = onActiveChange;
|
|
172
|
+
$[21] = t5;
|
|
173
|
+
$[22] = t6;
|
|
174
|
+
} else {
|
|
175
|
+
t6 = $[22];
|
|
176
|
+
}
|
|
177
|
+
return t6;
|
|
90
178
|
}
|
|
91
|
-
function FixedToolbar({
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
179
|
+
function FixedToolbar({
|
|
180
|
+
anchorElem,
|
|
181
|
+
clientProps,
|
|
182
|
+
editor,
|
|
183
|
+
editorConfig,
|
|
184
|
+
parentWithFixedToolbar
|
|
185
|
+
}) {
|
|
186
|
+
const currentToolbarRef = React.useRef(null);
|
|
187
|
+
const isEditable = useLexicalEditable();
|
|
188
|
+
const {
|
|
189
|
+
y
|
|
190
|
+
} = useScrollInfo();
|
|
191
|
+
// Memoize the parent toolbar element
|
|
192
|
+
const parentToolbarElem = useMemo(() => {
|
|
193
|
+
if (!parentWithFixedToolbar || clientProps?.disableIfParentHasFixedToolbar) {
|
|
194
|
+
return null;
|
|
195
|
+
}
|
|
196
|
+
const parentEditorElem = parentWithFixedToolbar.editorContainerRef.current;
|
|
197
|
+
let sibling = parentEditorElem.previousElementSibling;
|
|
198
|
+
while (sibling) {
|
|
199
|
+
if (sibling.classList.contains('fixed-toolbar')) {
|
|
200
|
+
return sibling;
|
|
201
|
+
}
|
|
202
|
+
sibling = sibling.previousElementSibling;
|
|
203
|
+
}
|
|
204
|
+
return null;
|
|
205
|
+
}, [clientProps?.disableIfParentHasFixedToolbar, parentWithFixedToolbar]);
|
|
206
|
+
useThrottledEffect(() => {
|
|
207
|
+
if (!parentToolbarElem) {
|
|
208
|
+
// this also checks for clientProps?.disableIfParentHasFixedToolbar indirectly, see the parentToolbarElem useMemo
|
|
209
|
+
return;
|
|
210
|
+
}
|
|
211
|
+
const currentToolbarElem = currentToolbarRef.current;
|
|
212
|
+
if (!currentToolbarElem) {
|
|
213
|
+
return;
|
|
214
|
+
}
|
|
215
|
+
const currentRect = currentToolbarElem.getBoundingClientRect();
|
|
216
|
+
const parentRect = parentToolbarElem.getBoundingClientRect();
|
|
217
|
+
// we only need to check for vertical overlap
|
|
218
|
+
const overlapping = !(currentRect.bottom < parentRect.top || currentRect.top > parentRect.bottom);
|
|
219
|
+
if (overlapping) {
|
|
220
|
+
currentToolbarElem.classList.remove('fixed-toolbar');
|
|
221
|
+
currentToolbarElem.classList.add('fixed-toolbar', 'fixed-toolbar--overlapping');
|
|
222
|
+
parentToolbarElem.classList.remove('fixed-toolbar');
|
|
223
|
+
parentToolbarElem.classList.add('fixed-toolbar', 'fixed-toolbar--hide');
|
|
224
|
+
} else {
|
|
225
|
+
if (!currentToolbarElem.classList.contains('fixed-toolbar--overlapping')) {
|
|
226
|
+
return;
|
|
227
|
+
}
|
|
228
|
+
currentToolbarElem.classList.remove('fixed-toolbar--overlapping');
|
|
229
|
+
currentToolbarElem.classList.add('fixed-toolbar');
|
|
230
|
+
parentToolbarElem.classList.remove('fixed-toolbar--hide');
|
|
231
|
+
parentToolbarElem.classList.add('fixed-toolbar');
|
|
232
|
+
}
|
|
233
|
+
}, 50, [currentToolbarRef, parentToolbarElem, y]);
|
|
234
|
+
return /*#__PURE__*/_jsx("div", {
|
|
235
|
+
className: "fixed-toolbar",
|
|
236
|
+
onFocus: event => {
|
|
237
|
+
// Prevent other focus events being triggered. Otherwise, if this was to be clicked while in a child editor,
|
|
238
|
+
// the parent editor will be focused, and the child editor will lose focus.
|
|
239
|
+
event.stopPropagation();
|
|
240
|
+
},
|
|
241
|
+
ref: currentToolbarRef,
|
|
242
|
+
children: isEditable && /*#__PURE__*/_jsx(React.Fragment, {
|
|
243
|
+
children: editorConfig?.features && editorConfig.features?.toolbarFixed?.groups.map((group, i) => {
|
|
244
|
+
return /*#__PURE__*/_jsx(ToolbarGroupComponent, {
|
|
245
|
+
anchorElem: anchorElem,
|
|
246
|
+
editor: editor,
|
|
247
|
+
editorConfig: editorConfig,
|
|
248
|
+
group: group,
|
|
249
|
+
index: i
|
|
250
|
+
}, group.key);
|
|
251
|
+
})
|
|
252
|
+
})
|
|
253
|
+
});
|
|
156
254
|
}
|
|
157
|
-
const getParentEditorWithFixedToolbar =
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
}
|
|
255
|
+
const getParentEditorWithFixedToolbar = editorConfigContext => {
|
|
256
|
+
if (editorConfigContext.parentEditor?.editorConfig) {
|
|
257
|
+
if (editorConfigContext.parentEditor?.editorConfig.resolvedFeatureMap.has('toolbarFixed')) {
|
|
258
|
+
return editorConfigContext.parentEditor;
|
|
259
|
+
} else {
|
|
260
|
+
if (editorConfigContext.parentEditor) {
|
|
261
|
+
return getParentEditorWithFixedToolbar(editorConfigContext.parentEditor);
|
|
262
|
+
}
|
|
166
263
|
}
|
|
167
|
-
|
|
264
|
+
}
|
|
265
|
+
return false;
|
|
168
266
|
};
|
|
169
|
-
export const FixedToolbarPlugin =
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
267
|
+
export const FixedToolbarPlugin = t0 => {
|
|
268
|
+
const $ = _c(6);
|
|
269
|
+
const {
|
|
270
|
+
clientProps
|
|
271
|
+
} = t0;
|
|
272
|
+
const [currentEditor] = useLexicalComposerContext();
|
|
273
|
+
const editorConfigContext = useEditorConfigContext();
|
|
274
|
+
const isEditable = useLexicalEditable();
|
|
275
|
+
if (!isEditable) {
|
|
276
|
+
return null;
|
|
277
|
+
}
|
|
278
|
+
const {
|
|
279
|
+
editorConfig: currentEditorConfig
|
|
280
|
+
} = editorConfigContext;
|
|
281
|
+
const editor = clientProps.applyToFocusedEditor ? editorConfigContext.focusedEditor?.editor || currentEditor : currentEditor;
|
|
282
|
+
const editorConfig = clientProps.applyToFocusedEditor ? editorConfigContext.focusedEditor?.editorConfig || currentEditorConfig : currentEditorConfig;
|
|
283
|
+
let t1;
|
|
284
|
+
let t2;
|
|
285
|
+
if ($[0] !== clientProps.disableIfParentHasFixedToolbar || $[1] !== editor || $[2] !== editorConfig || $[3] !== editorConfigContext) {
|
|
286
|
+
t2 = Symbol.for("react.early_return_sentinel");
|
|
287
|
+
bb0: {
|
|
288
|
+
const parentWithFixedToolbar = getParentEditorWithFixedToolbar(editorConfigContext);
|
|
289
|
+
if (clientProps?.disableIfParentHasFixedToolbar) {
|
|
181
290
|
if (parentWithFixedToolbar) {
|
|
182
|
-
|
|
291
|
+
t2 = null;
|
|
292
|
+
break bb0;
|
|
183
293
|
}
|
|
294
|
+
}
|
|
295
|
+
if (!editorConfig?.features?.toolbarFixed?.groups?.length) {
|
|
296
|
+
t2 = null;
|
|
297
|
+
break bb0;
|
|
298
|
+
}
|
|
299
|
+
t1 = _jsx(FixedToolbar, {
|
|
300
|
+
anchorElem: document.body,
|
|
301
|
+
editor,
|
|
302
|
+
editorConfig,
|
|
303
|
+
parentWithFixedToolbar
|
|
304
|
+
});
|
|
184
305
|
}
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
306
|
+
$[0] = clientProps.disableIfParentHasFixedToolbar;
|
|
307
|
+
$[1] = editor;
|
|
308
|
+
$[2] = editorConfig;
|
|
309
|
+
$[3] = editorConfigContext;
|
|
310
|
+
$[4] = t1;
|
|
311
|
+
$[5] = t2;
|
|
312
|
+
} else {
|
|
313
|
+
t1 = $[4];
|
|
314
|
+
t2 = $[5];
|
|
315
|
+
}
|
|
316
|
+
if (t2 !== Symbol.for("react.early_return_sentinel")) {
|
|
317
|
+
return t2;
|
|
318
|
+
}
|
|
319
|
+
return t1;
|
|
189
320
|
};
|
|
190
|
-
|
|
191
321
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../../src/features/toolbars/fixed/client/Toolbar/index.tsx"],"sourcesContent":["'use client'\nimport type { LexicalEditor } from 'lexical'\n\nimport { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext.js'\nimport { useLexicalEditable } from '@lexical/react/useLexicalEditable'\nimport { useScrollInfo, useThrottledEffect, useTranslation } from '@payloadcms/ui'\nimport * as React from 'react'\nimport { useMemo } from 'react'\n\nimport type { EditorConfigContextType } from '../../../../../lexical/config/client/EditorConfigProvider.js'\nimport type { SanitizedClientEditorConfig } from '../../../../../lexical/config/types.js'\nimport type { PluginComponent } from '../../../../typesClient.js'\nimport type { ToolbarGroup, ToolbarGroupItem } from '../../../types.js'\nimport type { FixedToolbarFeatureProps } from '../../server/index.js'\n\nimport { useEditorConfigContext } from '../../../../../lexical/config/client/EditorConfigProvider.js'\nimport { ToolbarButton } from '../../../shared/ToolbarButton/index.js'\nimport './index.scss'\nimport { ToolbarDropdown } from '../../../shared/ToolbarDropdown/index.js'\n\nfunction ButtonGroupItem({\n anchorElem,\n editor,\n item,\n}: {\n anchorElem: HTMLElement\n editor: LexicalEditor\n item: ToolbarGroupItem\n}): React.ReactNode {\n if (item.Component) {\n return (\n item?.Component && (\n <item.Component anchorElem={anchorElem} editor={editor} item={item} key={item.key} />\n )\n )\n }\n\n if (!item.ChildComponent) {\n return null\n }\n\n return (\n <ToolbarButton editor={editor} item={item} key={item.key}>\n <item.ChildComponent />\n </ToolbarButton>\n )\n}\n\nfunction ToolbarGroupComponent({\n anchorElem,\n editor,\n editorConfig,\n group,\n index,\n}: {\n anchorElem: HTMLElement\n editor: LexicalEditor\n editorConfig: SanitizedClientEditorConfig\n group: ToolbarGroup\n index: number\n}): React.ReactNode {\n const { i18n } = useTranslation<{}, string>()\n const {\n fieldProps: { featureClientSchemaMap, schemaPath },\n } = useEditorConfigContext()\n\n const [dropdownLabel, setDropdownLabel] = React.useState<string | undefined>(undefined)\n const [DropdownIcon, setDropdownIcon] = React.useState<React.FC | undefined>(undefined)\n\n React.useEffect(() => {\n if (group?.type === 'dropdown' && group.items.length && group.ChildComponent) {\n setDropdownIcon(() => group.ChildComponent!)\n } else {\n setDropdownIcon(undefined)\n }\n }, [group])\n\n const onActiveChange = React.useCallback(\n ({ activeItems }: { activeItems: ToolbarGroupItem[] }) => {\n if (!activeItems.length) {\n if (group?.type === 'dropdown' && group.items.length && group.ChildComponent) {\n setDropdownIcon(() => group.ChildComponent!)\n setDropdownLabel(undefined)\n } else {\n setDropdownIcon(undefined)\n setDropdownLabel(undefined)\n }\n return\n }\n const item = activeItems[0]!\n\n let label = item.key\n if (item.label) {\n label =\n typeof item.label === 'function'\n ? item.label({ featureClientSchemaMap, i18n, schemaPath })\n : item.label\n }\n // Crop title to max. 25 characters\n if (label.length > 25) {\n label = label.substring(0, 25) + '...'\n }\n if (activeItems.length === 1) {\n setDropdownLabel(label)\n setDropdownIcon(() => item.ChildComponent)\n } else {\n setDropdownLabel(\n i18n.t('lexical:general:toolbarItemsActive', { count: activeItems.length }),\n )\n if (group?.type === 'dropdown' && group.items.length && group.ChildComponent) {\n setDropdownIcon(() => group.ChildComponent!)\n } else {\n setDropdownIcon(undefined)\n }\n }\n },\n [group, i18n, featureClientSchemaMap, schemaPath],\n )\n\n return (\n <div\n className={`fixed-toolbar__group fixed-toolbar__group-${group.key}`}\n data-toolbar-group-key={group.key}\n key={group.key}\n >\n {group.type === 'dropdown' && group.items.length ? (\n DropdownIcon ? (\n <ToolbarDropdown\n anchorElem={anchorElem}\n editor={editor}\n group={group}\n Icon={DropdownIcon}\n itemsContainerClassNames={['fixed-toolbar__dropdown-items']}\n label={dropdownLabel}\n maxActiveItems={group.maxActiveItems ?? 1}\n onActiveChange={onActiveChange}\n />\n ) : (\n <ToolbarDropdown\n anchorElem={anchorElem}\n editor={editor}\n group={group}\n itemsContainerClassNames={['fixed-toolbar__dropdown-items']}\n label={dropdownLabel}\n maxActiveItems={group.maxActiveItems ?? 1}\n onActiveChange={onActiveChange}\n />\n )\n ) : null}\n {group.type === 'buttons' && group.items.length\n ? group.items.map((item) => {\n return (\n <ButtonGroupItem anchorElem={anchorElem} editor={editor} item={item} key={item.key} />\n )\n })\n : null}\n {index < editorConfig.features.toolbarFixed?.groups.length - 1 && <div className=\"divider\" />}\n </div>\n )\n}\n\nfunction FixedToolbar({\n anchorElem,\n clientProps,\n editor,\n editorConfig,\n parentWithFixedToolbar,\n}: {\n anchorElem: HTMLElement\n clientProps?: FixedToolbarFeatureProps\n editor: LexicalEditor\n editorConfig: SanitizedClientEditorConfig\n parentWithFixedToolbar: EditorConfigContextType | false\n}): React.ReactNode {\n const currentToolbarRef = React.useRef<HTMLDivElement>(null)\n const isEditable = useLexicalEditable()\n\n const { y } = useScrollInfo()\n\n // Memoize the parent toolbar element\n const parentToolbarElem = useMemo(() => {\n if (!parentWithFixedToolbar || clientProps?.disableIfParentHasFixedToolbar) {\n return null\n }\n\n const parentEditorElem = parentWithFixedToolbar.editorContainerRef.current\n let sibling = parentEditorElem.previousElementSibling\n while (sibling) {\n if (sibling.classList.contains('fixed-toolbar')) {\n return sibling\n }\n sibling = sibling.previousElementSibling\n }\n return null\n }, [clientProps?.disableIfParentHasFixedToolbar, parentWithFixedToolbar])\n\n useThrottledEffect(\n () => {\n if (!parentToolbarElem) {\n // this also checks for clientProps?.disableIfParentHasFixedToolbar indirectly, see the parentToolbarElem useMemo\n return\n }\n const currentToolbarElem = currentToolbarRef.current\n if (!currentToolbarElem) {\n return\n }\n\n const currentRect = currentToolbarElem.getBoundingClientRect()\n const parentRect = parentToolbarElem.getBoundingClientRect()\n\n // we only need to check for vertical overlap\n const overlapping = !(\n currentRect.bottom < parentRect.top || currentRect.top > parentRect.bottom\n )\n\n if (overlapping) {\n currentToolbarElem.classList.remove('fixed-toolbar')\n currentToolbarElem.classList.add('fixed-toolbar', 'fixed-toolbar--overlapping')\n parentToolbarElem.classList.remove('fixed-toolbar')\n parentToolbarElem.classList.add('fixed-toolbar', 'fixed-toolbar--hide')\n } else {\n if (!currentToolbarElem.classList.contains('fixed-toolbar--overlapping')) {\n return\n }\n currentToolbarElem.classList.remove('fixed-toolbar--overlapping')\n currentToolbarElem.classList.add('fixed-toolbar')\n parentToolbarElem.classList.remove('fixed-toolbar--hide')\n parentToolbarElem.classList.add('fixed-toolbar')\n }\n },\n 50,\n [currentToolbarRef, parentToolbarElem, y],\n )\n\n return (\n <div\n className=\"fixed-toolbar\"\n onFocus={(event) => {\n // Prevent other focus events being triggered. Otherwise, if this was to be clicked while in a child editor,\n // the parent editor will be focused, and the child editor will lose focus.\n event.stopPropagation()\n }}\n ref={currentToolbarRef}\n >\n {isEditable && (\n <React.Fragment>\n {editorConfig?.features &&\n editorConfig.features?.toolbarFixed?.groups.map((group, i) => {\n return (\n <ToolbarGroupComponent\n anchorElem={anchorElem}\n editor={editor}\n editorConfig={editorConfig}\n group={group}\n index={i}\n key={group.key}\n />\n )\n })}\n </React.Fragment>\n )}\n </div>\n )\n}\n\nconst getParentEditorWithFixedToolbar = (\n editorConfigContext: EditorConfigContextType,\n): EditorConfigContextType | false => {\n if (editorConfigContext.parentEditor?.editorConfig) {\n if (editorConfigContext.parentEditor?.editorConfig.resolvedFeatureMap.has('toolbarFixed')) {\n return editorConfigContext.parentEditor\n } else {\n if (editorConfigContext.parentEditor) {\n return getParentEditorWithFixedToolbar(editorConfigContext.parentEditor)\n }\n }\n }\n return false\n}\n\nexport const FixedToolbarPlugin: PluginComponent<FixedToolbarFeatureProps> = ({ clientProps }) => {\n const [currentEditor] = useLexicalComposerContext()\n const editorConfigContext = useEditorConfigContext()\n const isEditable = useLexicalEditable()\n if (!isEditable) {\n return null\n }\n\n const { editorConfig: currentEditorConfig } = editorConfigContext\n\n const editor = clientProps.applyToFocusedEditor\n ? editorConfigContext.focusedEditor?.editor || currentEditor\n : currentEditor\n\n const editorConfig = clientProps.applyToFocusedEditor\n ? editorConfigContext.focusedEditor?.editorConfig || currentEditorConfig\n : currentEditorConfig\n\n const parentWithFixedToolbar = getParentEditorWithFixedToolbar(editorConfigContext)\n\n if (clientProps?.disableIfParentHasFixedToolbar) {\n if (parentWithFixedToolbar) {\n return null\n }\n }\n\n if (!editorConfig?.features?.toolbarFixed?.groups?.length) {\n return null\n }\n\n return (\n <FixedToolbar\n anchorElem={document.body}\n editor={editor}\n editorConfig={editorConfig}\n parentWithFixedToolbar={parentWithFixedToolbar}\n />\n )\n}\n"],"names":["useLexicalComposerContext","useLexicalEditable","useScrollInfo","useThrottledEffect","useTranslation","React","useMemo","useEditorConfigContext","ToolbarButton","ToolbarDropdown","ButtonGroupItem","anchorElem","editor","item","Component","key","ChildComponent","ToolbarGroupComponent","editorConfig","group","index","i18n","fieldProps","featureClientSchemaMap","schemaPath","dropdownLabel","setDropdownLabel","useState","undefined","DropdownIcon","setDropdownIcon","useEffect","type","items","length","onActiveChange","useCallback","activeItems","label","substring","t","count","div","className","data-toolbar-group-key","Icon","itemsContainerClassNames","maxActiveItems","map","features","toolbarFixed","groups","FixedToolbar","clientProps","parentWithFixedToolbar","currentToolbarRef","useRef","isEditable","y","parentToolbarElem","disableIfParentHasFixedToolbar","parentEditorElem","editorContainerRef","current","sibling","previousElementSibling","classList","contains","currentToolbarElem","currentRect","getBoundingClientRect","parentRect","overlapping","bottom","top","remove","add","onFocus","event","stopPropagation","ref","Fragment","i","getParentEditorWithFixedToolbar","editorConfigContext","parentEditor","resolvedFeatureMap","has","FixedToolbarPlugin","currentEditor","currentEditorConfig","applyToFocusedEditor","focusedEditor","document","body"],"mappings":"AAAA;AAGA,SAASA,yBAAyB,QAAQ,2CAA0C;AACpF,SAASC,kBAAkB,QAAQ,oCAAmC;AACtE,SAASC,aAAa,EAAEC,kBAAkB,EAAEC,cAAc,QAAQ,iBAAgB;AAClF,YAAYC,WAAW,QAAO;AAC9B,SAASC,OAAO,QAAQ,QAAO;AAQ/B,SAASC,sBAAsB,QAAQ,+DAA8D;AACrG,SAASC,aAAa,QAAQ,yCAAwC;AACtE,OAAO,eAAc;AACrB,SAASC,eAAe,QAAQ,2CAA0C;AAE1E,SAASC,gBAAgB,EACvBC,UAAU,EACVC,MAAM,EACNC,IAAI,EAKL;IACC,IAAIA,KAAKC,SAAS,EAAE;QAClB,OACED,MAAMC,cACHD,KAAKC,UAAUH,YAAYA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GzF;IACxB,MAAMoF,sBAAsB7E;IAC5B,MAAMkD,aAAaxD;IACnB,IAAI,CAACwD,YAAY;QACf,OAAO;IACT;IAEA,MAAM,EAAEvC,cAAcwE,mBAAmB,EAAE,GAAGN;IAE9C,MAAMxE,SAASyC,YAAYsC,oBAAoB,GAC3CP,oBAAoBQ,aAAa,EAAEhF,UAAU6E,gBAC7CA;IAEJ,MAAMvE,eAAemC,YAAYsC,oBAAoB,GACjDP,oBAAoBQ,aAAa,EAAE1E,gBAAgBwE,sBACnDA;IAEJ,MAAMpC,yBAAyB6B,gCAAgCC;IAE/D,IAAI/B,aAAaO,gCAAgC;QAC/C,IAAIN,wBAAwB;YAC1B,OAAO;QACT;IACF;IAEA,IAAI,CAACpC,cAAc+B,UAAUC,cAAcC,QAAQjB,QAAQ;QACzD,OAAO;IACT;IAEA,QACGkB,aACCzC,YAAYkF,SAASC,IAAI,EACzBlF,QAAQA,QACRM,cAAcA,cACdoC,wBAAwBA;AAG9B,EAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","names":["c","_c","useLexicalComposerContext","useLexicalEditable","useScrollInfo","useThrottledEffect","useTranslation","React","useMemo","useEditorConfigContext","ToolbarButton","ToolbarDropdown","ButtonGroupItem","anchorElem","editor","item","Component","_jsx","key","ChildComponent","ToolbarGroupComponent","t0","$","editorConfig","group","index","i18n","fieldProps","t1","featureClientSchemaMap","schemaPath","dropdownLabel","setDropdownLabel","useState","undefined","DropdownIcon","setDropdownIcon","t2","items","type","length","t3","useEffect","t4","t5","activeItems","label","substring","t","count","onActiveChange","t6","features","toolbarFixed","groups","_jsxs","className","children","Icon","itemsContainerClassNames","maxActiveItems","map","item_0","FixedToolbar","clientProps","parentWithFixedToolbar","currentToolbarRef","useRef","isEditable","y","parentToolbarElem","disableIfParentHasFixedToolbar","parentEditorElem","editorContainerRef","current","sibling","previousElementSibling","classList","contains","currentToolbarElem","currentRect","getBoundingClientRect","parentRect","overlapping","bottom","top","remove","add","onFocus","event","stopPropagation","ref","Fragment","i","getParentEditorWithFixedToolbar","editorConfigContext","parentEditor","resolvedFeatureMap","has","FixedToolbarPlugin","currentEditor","currentEditorConfig","applyToFocusedEditor","focusedEditor","Symbol","for","bb0","document","body"],"sources":["../../../../../../src/features/toolbars/fixed/client/Toolbar/index.tsx"],"sourcesContent":["'use client'\nimport type { LexicalEditor } from 'lexical'\n\nimport { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext.js'\nimport { useLexicalEditable } from '@lexical/react/useLexicalEditable'\nimport { useScrollInfo, useThrottledEffect, useTranslation } from '@payloadcms/ui'\nimport * as React from 'react'\nimport { useMemo } from 'react'\n\nimport type { EditorConfigContextType } from '../../../../../lexical/config/client/EditorConfigProvider.js'\nimport type { SanitizedClientEditorConfig } from '../../../../../lexical/config/types.js'\nimport type { PluginComponent } from '../../../../typesClient.js'\nimport type { ToolbarGroup, ToolbarGroupItem } from '../../../types.js'\nimport type { FixedToolbarFeatureProps } from '../../server/index.js'\n\nimport { useEditorConfigContext } from '../../../../../lexical/config/client/EditorConfigProvider.js'\nimport { ToolbarButton } from '../../../shared/ToolbarButton/index.js'\nimport './index.scss'\nimport { ToolbarDropdown } from '../../../shared/ToolbarDropdown/index.js'\n\nfunction ButtonGroupItem({\n anchorElem,\n editor,\n item,\n}: {\n anchorElem: HTMLElement\n editor: LexicalEditor\n item: ToolbarGroupItem\n}): React.ReactNode {\n if (item.Component) {\n return (\n item?.Component && (\n <item.Component anchorElem={anchorElem} editor={editor} item={item} key={item.key} />\n )\n )\n }\n\n if (!item.ChildComponent) {\n return null\n }\n\n return (\n <ToolbarButton editor={editor} item={item} key={item.key}>\n <item.ChildComponent />\n </ToolbarButton>\n )\n}\n\nfunction ToolbarGroupComponent({\n anchorElem,\n editor,\n editorConfig,\n group,\n index,\n}: {\n anchorElem: HTMLElement\n editor: LexicalEditor\n editorConfig: SanitizedClientEditorConfig\n group: ToolbarGroup\n index: number\n}): React.ReactNode {\n const { i18n } = useTranslation<{}, string>()\n const {\n fieldProps: { featureClientSchemaMap, schemaPath },\n } = useEditorConfigContext()\n\n const [dropdownLabel, setDropdownLabel] = React.useState<string | undefined>(undefined)\n const [DropdownIcon, setDropdownIcon] = React.useState<React.FC | undefined>(undefined)\n\n React.useEffect(() => {\n if (group?.type === 'dropdown' && group.items.length && group.ChildComponent) {\n setDropdownIcon(() => group.ChildComponent!)\n } else {\n setDropdownIcon(undefined)\n }\n }, [group])\n\n const onActiveChange = React.useCallback(\n ({ activeItems }: { activeItems: ToolbarGroupItem[] }) => {\n if (!activeItems.length) {\n if (group?.type === 'dropdown' && group.items.length && group.ChildComponent) {\n setDropdownIcon(() => group.ChildComponent!)\n setDropdownLabel(undefined)\n } else {\n setDropdownIcon(undefined)\n setDropdownLabel(undefined)\n }\n return\n }\n const item = activeItems[0]!\n\n let label = item.key\n if (item.label) {\n label =\n typeof item.label === 'function'\n ? item.label({ featureClientSchemaMap, i18n, schemaPath })\n : item.label\n }\n // Crop title to max. 25 characters\n if (label.length > 25) {\n label = label.substring(0, 25) + '...'\n }\n if (activeItems.length === 1) {\n setDropdownLabel(label)\n setDropdownIcon(() => item.ChildComponent)\n } else {\n setDropdownLabel(\n i18n.t('lexical:general:toolbarItemsActive', { count: activeItems.length }),\n )\n if (group?.type === 'dropdown' && group.items.length && group.ChildComponent) {\n setDropdownIcon(() => group.ChildComponent!)\n } else {\n setDropdownIcon(undefined)\n }\n }\n },\n [group, i18n, featureClientSchemaMap, schemaPath],\n )\n\n return (\n <div\n className={`fixed-toolbar__group fixed-toolbar__group-${group.key}`}\n data-toolbar-group-key={group.key}\n key={group.key}\n >\n {group.type === 'dropdown' && group.items.length ? (\n DropdownIcon ? (\n <ToolbarDropdown\n anchorElem={anchorElem}\n editor={editor}\n group={group}\n Icon={DropdownIcon}\n itemsContainerClassNames={['fixed-toolbar__dropdown-items']}\n label={dropdownLabel}\n maxActiveItems={group.maxActiveItems ?? 1}\n onActiveChange={onActiveChange}\n />\n ) : (\n <ToolbarDropdown\n anchorElem={anchorElem}\n editor={editor}\n group={group}\n itemsContainerClassNames={['fixed-toolbar__dropdown-items']}\n label={dropdownLabel}\n maxActiveItems={group.maxActiveItems ?? 1}\n onActiveChange={onActiveChange}\n />\n )\n ) : null}\n {group.type === 'buttons' && group.items.length\n ? group.items.map((item) => {\n return (\n <ButtonGroupItem anchorElem={anchorElem} editor={editor} item={item} key={item.key} />\n )\n })\n : null}\n {index < editorConfig.features.toolbarFixed?.groups.length - 1 && <div className=\"divider\" />}\n </div>\n )\n}\n\nfunction FixedToolbar({\n anchorElem,\n clientProps,\n editor,\n editorConfig,\n parentWithFixedToolbar,\n}: {\n anchorElem: HTMLElement\n clientProps?: FixedToolbarFeatureProps\n editor: LexicalEditor\n editorConfig: SanitizedClientEditorConfig\n parentWithFixedToolbar: EditorConfigContextType | false\n}): React.ReactNode {\n const currentToolbarRef = React.useRef<HTMLDivElement>(null)\n const isEditable = useLexicalEditable()\n\n const { y } = useScrollInfo()\n\n // Memoize the parent toolbar element\n const parentToolbarElem = useMemo(() => {\n if (!parentWithFixedToolbar || clientProps?.disableIfParentHasFixedToolbar) {\n return null\n }\n\n const parentEditorElem = parentWithFixedToolbar.editorContainerRef.current\n let sibling = parentEditorElem.previousElementSibling\n while (sibling) {\n if (sibling.classList.contains('fixed-toolbar')) {\n return sibling\n }\n sibling = sibling.previousElementSibling\n }\n return null\n }, [clientProps?.disableIfParentHasFixedToolbar, parentWithFixedToolbar])\n\n useThrottledEffect(\n () => {\n if (!parentToolbarElem) {\n // this also checks for clientProps?.disableIfParentHasFixedToolbar indirectly, see the parentToolbarElem useMemo\n return\n }\n const currentToolbarElem = currentToolbarRef.current\n if (!currentToolbarElem) {\n return\n }\n\n const currentRect = currentToolbarElem.getBoundingClientRect()\n const parentRect = parentToolbarElem.getBoundingClientRect()\n\n // we only need to check for vertical overlap\n const overlapping = !(\n currentRect.bottom < parentRect.top || currentRect.top > parentRect.bottom\n )\n\n if (overlapping) {\n currentToolbarElem.classList.remove('fixed-toolbar')\n currentToolbarElem.classList.add('fixed-toolbar', 'fixed-toolbar--overlapping')\n parentToolbarElem.classList.remove('fixed-toolbar')\n parentToolbarElem.classList.add('fixed-toolbar', 'fixed-toolbar--hide')\n } else {\n if (!currentToolbarElem.classList.contains('fixed-toolbar--overlapping')) {\n return\n }\n currentToolbarElem.classList.remove('fixed-toolbar--overlapping')\n currentToolbarElem.classList.add('fixed-toolbar')\n parentToolbarElem.classList.remove('fixed-toolbar--hide')\n parentToolbarElem.classList.add('fixed-toolbar')\n }\n },\n 50,\n [currentToolbarRef, parentToolbarElem, y],\n )\n\n return (\n <div\n className=\"fixed-toolbar\"\n onFocus={(event) => {\n // Prevent other focus events being triggered. Otherwise, if this was to be clicked while in a child editor,\n // the parent editor will be focused, and the child editor will lose focus.\n event.stopPropagation()\n }}\n ref={currentToolbarRef}\n >\n {isEditable && (\n <React.Fragment>\n {editorConfig?.features &&\n editorConfig.features?.toolbarFixed?.groups.map((group, i) => {\n return (\n <ToolbarGroupComponent\n anchorElem={anchorElem}\n editor={editor}\n editorConfig={editorConfig}\n group={group}\n index={i}\n key={group.key}\n />\n )\n })}\n </React.Fragment>\n )}\n </div>\n )\n}\n\nconst getParentEditorWithFixedToolbar = (\n editorConfigContext: EditorConfigContextType,\n): EditorConfigContextType | false => {\n if (editorConfigContext.parentEditor?.editorConfig) {\n if (editorConfigContext.parentEditor?.editorConfig.resolvedFeatureMap.has('toolbarFixed')) {\n return editorConfigContext.parentEditor\n } else {\n if (editorConfigContext.parentEditor) {\n return getParentEditorWithFixedToolbar(editorConfigContext.parentEditor)\n }\n }\n }\n return false\n}\n\nexport const FixedToolbarPlugin: PluginComponent<FixedToolbarFeatureProps> = ({ clientProps }) => {\n const [currentEditor] = useLexicalComposerContext()\n const editorConfigContext = useEditorConfigContext()\n const isEditable = useLexicalEditable()\n if (!isEditable) {\n return null\n }\n\n const { editorConfig: currentEditorConfig } = editorConfigContext\n\n const editor = clientProps.applyToFocusedEditor\n ? editorConfigContext.focusedEditor?.editor || currentEditor\n : currentEditor\n\n const editorConfig = clientProps.applyToFocusedEditor\n ? editorConfigContext.focusedEditor?.editorConfig || currentEditorConfig\n : currentEditorConfig\n\n const parentWithFixedToolbar = getParentEditorWithFixedToolbar(editorConfigContext)\n\n if (clientProps?.disableIfParentHasFixedToolbar) {\n if (parentWithFixedToolbar) {\n return null\n }\n }\n\n if (!editorConfig?.features?.toolbarFixed?.groups?.length) {\n return null\n }\n\n return (\n <FixedToolbar\n anchorElem={document.body}\n editor={editor}\n editorConfig={editorConfig}\n parentWithFixedToolbar={parentWithFixedToolbar}\n />\n )\n}\n"],"mappings":"AAAA;;AAAA,SAAAA,CAAA,IAAAC,EAAA;;AAGA,SAASC,yBAAyB,QAAQ;AAC1C,SAASC,kBAAkB,QAAQ;AACnC,SAASC,aAAa,EAAEC,kBAAkB,EAAEC,cAAc,QAAQ;AAClE,YAAYC,KAAA,MAAW;AACvB,SAASC,OAAO,QAAQ;AAQxB,SAASC,sBAAsB,QAAQ;AACvC,SAASC,aAAa,QAAQ;AAE9B,SAASC,eAAe,QAAQ;AAEhC,SAASC,gBAAgB;EACvBC,UAAU;EACVC,MAAM;EACNC;AAAI,CAKL;EACC,IAAIA,IAAA,CAAKC,SAAS,EAAE;IAClB,OACED,IAAA,EAAMC,SAAA,iBACJC,IAAA,CAACF,IAAA,CAAKC,SAAS;MAACH,UAAA,EAAYA,UAAA;MAAYC,MAAA,EAAQA,MAAA;MAAQC,IAAA,EAAMA;OAAWA,IAAA,CAAKG,GAAG;EAGvF;EAEA,IAAI,CAACH,IAAA,CAAKI,cAAc,EAAE;IACxB,OAAO;EACT;EAEA,oBACEF,IAAA,CAACP,aAAA;IAAcI,MAAA,EAAQA,MAAA;IAAQC,IAAA,EAAMA,IAAA;cACnC,aAAAE,IAAA,CAACF,IAAA,CAAKI,cAAc;KAD0BJ,IAAA,CAAKG,GAAG;AAI5D;AAEA,SAAAE,sBAAAC,EAAA;EAAA,MAAAC,CAAA,GAAArB,EAAA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
4
|
import { FixedToolbarPlugin } from './Toolbar/index.js';
|
|
4
5
|
export const FixedToolbarFeatureClient = createClientFeature({
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
}
|
|
10
|
-
]
|
|
6
|
+
plugins: [{
|
|
7
|
+
Component: FixedToolbarPlugin,
|
|
8
|
+
position: 'aboveContainer'
|
|
9
|
+
}]
|
|
11
10
|
});
|
|
12
|
-
|
|
13
11
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../src/features/toolbars/fixed/client/index.tsx"],"sourcesContent":["'use client'\n\nimport type { FixedToolbarFeatureProps } from '../server/index.js'\n\nimport { createClientFeature } from '../../../../utilities/createClientFeature.js'\nimport { FixedToolbarPlugin } from './Toolbar/index.js'\n\nexport const FixedToolbarFeatureClient = createClientFeature<FixedToolbarFeatureProps>({\n plugins: [\n {\n Component: FixedToolbarPlugin,\n position: 'aboveContainer',\n },\n ],\n})\n"],"
|
|
1
|
+
{"version":3,"file":"index.js","names":["createClientFeature","FixedToolbarPlugin","FixedToolbarFeatureClient","plugins","Component","position"],"sources":["../../../../../src/features/toolbars/fixed/client/index.tsx"],"sourcesContent":["'use client'\n\nimport type { FixedToolbarFeatureProps } from '../server/index.js'\n\nimport { createClientFeature } from '../../../../utilities/createClientFeature.js'\nimport { FixedToolbarPlugin } from './Toolbar/index.js'\n\nexport const FixedToolbarFeatureClient = createClientFeature<FixedToolbarFeatureProps>({\n plugins: [\n {\n Component: FixedToolbarPlugin,\n position: 'aboveContainer',\n },\n ],\n})\n"],"mappings":"AAAA;;AAIA,SAASA,mBAAmB,QAAQ;AACpC,SAASC,kBAAkB,QAAQ;AAEnC,OAAO,MAAMC,yBAAA,GAA4BF,mBAAA,CAA8C;EACrFG,OAAA,EAAS,CACP;IACEC,SAAA,EAAWH,kBAAA;IACXI,QAAA,EAAU;EACZ;AAEJ","ignoreList":[]}
|