@payloadcms/richtext-lexical 3.81.0-internal-debug.1a0f4d0 → 3.81.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cell/rscEntry.js +72 -74
- 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-OIMYWB22.js +2 -0
- package/dist/exports/client/Field-OIMYWB22.js.map +7 -0
- package/dist/exports/client/RelationshipComponent-BG3DPV3T.js +2 -0
- package/dist/exports/client/RelationshipComponent-BG3DPV3T.js.map +7 -0
- package/dist/exports/client/bundled.css +1 -0
- package/dist/exports/client/chunk-2S5Q7QYO.js +2 -0
- package/dist/exports/client/chunk-2S5Q7QYO.js.map +7 -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-QJ5EETIB.js +2 -0
- package/dist/exports/client/chunk-QJ5EETIB.js.map +7 -0
- package/dist/exports/client/component-XIHC3W6W.js +2 -0
- package/dist/exports/client/component-XIHC3W6W.js.map +7 -0
- package/dist/exports/client/componentInline-NL25DNZ5.js +2 -0
- package/dist/exports/client/componentInline-NL25DNZ5.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.js +34 -36
- 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 -95
- package/dist/features/blocks/client/component/BlockContent.js.map +1 -1
- package/dist/features/blocks/client/component/components/BlockCollapsible.js +14 -13
- package/dist/features/blocks/client/component/components/BlockCollapsible.js.map +1 -1
- package/dist/features/blocks/client/component/components/BlockEditButton.js +17 -9
- package/dist/features/blocks/client/component/components/BlockEditButton.js.map +1 -1
- package/dist/features/blocks/client/component/components/BlockRemoveButton.js +17 -9
- package/dist/features/blocks/client/component/components/BlockRemoveButton.js.map +1 -1
- package/dist/features/blocks/client/component/index.js +418 -561
- 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 +23 -11
- package/dist/features/blocks/client/componentInline/components/InlineBlockContainer.js.map +1 -1
- package/dist/features/blocks/client/componentInline/components/InlineBlockEditButton.js +17 -9
- package/dist/features/blocks/client/componentInline/components/InlineBlockEditButton.js.map +1 -1
- package/dist/features/blocks/client/componentInline/components/InlineBlockLabel.js +17 -9
- package/dist/features/blocks/client/componentInline/components/InlineBlockLabel.js.map +1 -1
- package/dist/features/blocks/client/componentInline/components/InlineBlockRemoveButton.js +17 -9
- package/dist/features/blocks/client/componentInline/components/InlineBlockRemoveButton.js.map +1 -1
- package/dist/features/blocks/client/componentInline/index.js +346 -474
- package/dist/features/blocks/client/componentInline/index.js.map +1 -1
- package/dist/features/blocks/client/getBlockImageComponent.js +34 -34
- 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 +40 -44
- package/dist/features/blocks/client/nodes/BlocksNode.js.map +1 -1
- package/dist/features/blocks/client/nodes/InlineBlocksNode.js +33 -37
- 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 +101 -158
- package/dist/features/blocks/premade/CodeBlock/Component/Block.js.map +1 -1
- package/dist/features/blocks/premade/CodeBlock/Component/Code.js +93 -119
- package/dist/features/blocks/premade/CodeBlock/Component/Code.js.map +1 -1
- package/dist/features/blocks/premade/CodeBlock/Component/Collapse/index.js +11 -19
- package/dist/features/blocks/premade/CodeBlock/Component/Collapse/index.js.map +1 -1
- package/dist/features/blocks/premade/CodeBlock/Component/FloatingCollapse/index.js +20 -32
- 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 +218 -238
- 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 +12 -16
- 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 +40 -31
- package/dist/features/converters/lexicalToHtml/async/converters/link.js.map +1 -1
- package/dist/features/converters/lexicalToHtml/async/converters/list.js +30 -29
- 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 +44 -41
- 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/cssColors.js +6 -159
- package/dist/features/converters/lexicalToHtml/shared/cssColors.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 +12 -16
- 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 +38 -30
- package/dist/features/converters/lexicalToHtml/sync/converters/link.js.map +1 -1
- package/dist/features/converters/lexicalToHtml/sync/converters/list.js +30 -29
- 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 +37 -35
- 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 +36 -46
- package/dist/features/converters/lexicalToJSX/Component/index.js.map +1 -1
- package/dist/features/converters/lexicalToJSX/converter/converters/blockquote.js +12 -14
- package/dist/features/converters/lexicalToJSX/converter/converters/blockquote.js.map +1 -1
- package/dist/features/converters/lexicalToJSX/converter/converters/heading.js +13 -15
- package/dist/features/converters/lexicalToJSX/converter/converters/heading.js.map +1 -1
- package/dist/features/converters/lexicalToJSX/converter/converters/horizontalRule.js +2 -7
- package/dist/features/converters/lexicalToJSX/converter/converters/horizontalRule.js.map +1 -1
- package/dist/features/converters/lexicalToJSX/converter/converters/linebreak.js +2 -7
- package/dist/features/converters/lexicalToJSX/converter/converters/linebreak.js.map +1 -1
- package/dist/features/converters/lexicalToJSX/converter/converters/link.js +47 -49
- package/dist/features/converters/lexicalToJSX/converter/converters/link.js.map +1 -1
- package/dist/features/converters/lexicalToJSX/converter/converters/list.js +56 -78
- package/dist/features/converters/lexicalToJSX/converter/converters/list.js.map +1 -1
- package/dist/features/converters/lexicalToJSX/converter/converters/paragraph.js +16 -26
- 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 -73
- package/dist/features/converters/lexicalToJSX/converter/converters/table.js.map +1 -1
- package/dist/features/converters/lexicalToJSX/converter/converters/text.js +47 -74
- package/dist/features/converters/lexicalToJSX/converter/converters/text.js.map +1 -1
- package/dist/features/converters/lexicalToJSX/converter/converters/upload.js +61 -77
- 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 -123
- 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 -27
- 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 +365 -456
- 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 +23 -18
- 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 -752
- package/dist/features/experimental_table/client/plugins/TableActionMenuPlugin/index.js.map +1 -1
- package/dist/features/experimental_table/client/plugins/TableCellResizerPlugin/index.js +316 -350
- package/dist/features/experimental_table/client/plugins/TableCellResizerPlugin/index.js.map +1 -1
- package/dist/features/experimental_table/client/plugins/TableHoverActionsPlugin/index.js +225 -215
- package/dist/features/experimental_table/client/plugins/TableHoverActionsPlugin/index.js.map +1 -1
- package/dist/features/experimental_table/client/plugins/TablePlugin/index.js +133 -104
- 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.d.ts.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 +27 -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 -78
- 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 +4 -8
- 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 +308 -395
- package/dist/features/link/client/plugins/floatingLinkEditor/LinkEditor/index.js.map +1 -1
- package/dist/features/link/client/plugins/floatingLinkEditor/index.js +9 -12
- 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 +4 -8
- 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 +4 -8
- 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 +11 -21
- package/dist/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/Component.js.map +1 -1
- package/dist/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/index.js +66 -65
- 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 +11 -21
- package/dist/features/migrations/slateToLexical/nodes/unknownConvertedNode/Component.js.map +1 -1
- package/dist/features/migrations/slateToLexical/nodes/unknownConvertedNode/index.js +66 -65
- 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 +118 -147
- 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 +132 -81
- 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 -64
- package/dist/features/relationship/client/nodes/RelationshipNode.js.map +1 -1
- package/dist/features/relationship/client/plugins/index.js +69 -39
- 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 -77
- 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 +241 -251
- 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 +310 -326
- 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 +76 -53
- package/dist/features/toolbars/shared/ToolbarButton/index.js.map +1 -1
- package/dist/features/toolbars/shared/ToolbarDropdown/DropDown.js +208 -264
- package/dist/features/toolbars/shared/ToolbarDropdown/DropDown.js.map +1 -1
- package/dist/features/toolbars/shared/ToolbarDropdown/index.js +111 -94
- package/dist/features/toolbars/shared/ToolbarDropdown/index.js.map +1 -1
- package/dist/features/toolbars/shared/useToolbarStates.js +108 -112
- package/dist/features/toolbars/shared/useToolbarStates.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 +189 -242
- package/dist/features/upload/client/component/index.js.map +1 -1
- package/dist/features/upload/client/component/pending/index.js +10 -19
- 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 +132 -83
- 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 -67
- package/dist/features/upload/client/nodes/UploadNode.js.map +1 -1
- package/dist/features/upload/client/plugin/index.js +331 -290
- 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 +208 -200
- package/dist/features/upload/server/index.js.map +1 -1
- package/dist/features/upload/server/markdownTransformer.js +46 -48
- package/dist/features/upload/server/markdownTransformer.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 +44 -35
- package/dist/field/Diff/converters/link.js.map +1 -1
- package/dist/field/Diff/converters/listitem/index.js +55 -75
- package/dist/field/Diff/converters/listitem/index.js.map +1 -1
- package/dist/field/Diff/converters/relationship/index.js +63 -85
- package/dist/field/Diff/converters/relationship/index.js.map +1 -1
- package/dist/field/Diff/converters/unknown/index.js +41 -64
- package/dist/field/Diff/converters/unknown/index.js.map +1 -1
- package/dist/field/Diff/converters/upload/index.js +66 -122
- package/dist/field/Diff/converters/upload/index.js.map +1 -1
- package/dist/field/Diff/index.js +99 -86
- package/dist/field/Diff/index.js.map +1 -1
- package/dist/field/Field.js +179 -234
- package/dist/field/Field.js.map +1 -1
- package/dist/field/RenderLexical/index.js +119 -123
- package/dist/field/RenderLexical/index.js.map +1 -1
- package/dist/field/bundled.css +1 -0
- package/dist/field/index.js +97 -61
- package/dist/field/index.js.map +1 -1
- package/dist/field/rscEntry.js +84 -86
- 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 +17 -21
- package/dist/lexical/EditorPlugin.js.map +1 -1
- package/dist/lexical/LexicalEditor.js +174 -275
- package/dist/lexical/LexicalEditor.js.map +1 -1
- package/dist/lexical/LexicalProvider.js +88 -110
- package/dist/lexical/LexicalProvider.js.map +1 -1
- package/dist/lexical/config/client/EditorConfigProvider.js +81 -94
- 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 +41 -42
- 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 -164
- 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 -204
- 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 -145
- 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 -325
- 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 +35 -22
- package/dist/lexical/ui/ContentEditable.js.map +1 -1
- package/dist/lexical/ui/icons/AI/index.js +31 -58
- package/dist/lexical/ui/icons/AI/index.js.map +1 -1
- package/dist/lexical/ui/icons/Add/index.js +16 -31
- package/dist/lexical/ui/icons/Add/index.js.map +1 -1
- package/dist/lexical/ui/icons/AlignCenter/index.js +25 -45
- package/dist/lexical/ui/icons/AlignCenter/index.js.map +1 -1
- package/dist/lexical/ui/icons/AlignJustify/index.js +25 -45
- package/dist/lexical/ui/icons/AlignJustify/index.js.map +1 -1
- package/dist/lexical/ui/icons/AlignLeft/index.js +25 -45
- package/dist/lexical/ui/icons/AlignLeft/index.js.map +1 -1
- package/dist/lexical/ui/icons/AlignRight/index.js +25 -45
- package/dist/lexical/ui/icons/AlignRight/index.js.map +1 -1
- package/dist/lexical/ui/icons/Block/index.js +34 -54
- package/dist/lexical/ui/icons/Block/index.js.map +1 -1
- package/dist/lexical/ui/icons/Blockquote/index.js +16 -24
- package/dist/lexical/ui/icons/Blockquote/index.js.map +1 -1
- package/dist/lexical/ui/icons/Bold/index.js +16 -24
- package/dist/lexical/ui/icons/Bold/index.js.map +1 -1
- package/dist/lexical/ui/icons/Checklist/index.js +24 -39
- package/dist/lexical/ui/icons/Checklist/index.js.map +1 -1
- package/dist/lexical/ui/icons/Code/index.js +19 -34
- package/dist/lexical/ui/icons/Code/index.js.map +1 -1
- package/dist/lexical/ui/icons/CodeBlock/index.js +14 -22
- package/dist/lexical/ui/icons/CodeBlock/index.js.map +1 -1
- package/dist/lexical/ui/icons/Collapse/index.js +15 -23
- package/dist/lexical/ui/icons/Collapse/index.js.map +1 -1
- package/dist/lexical/ui/icons/H1/index.js +16 -24
- package/dist/lexical/ui/icons/H1/index.js.map +1 -1
- package/dist/lexical/ui/icons/H2/index.js +16 -24
- package/dist/lexical/ui/icons/H2/index.js.map +1 -1
- package/dist/lexical/ui/icons/H3/index.js +16 -24
- package/dist/lexical/ui/icons/H3/index.js.map +1 -1
- package/dist/lexical/ui/icons/H4/index.js +16 -24
- package/dist/lexical/ui/icons/H4/index.js.map +1 -1
- package/dist/lexical/ui/icons/H5/index.js +16 -24
- package/dist/lexical/ui/icons/H5/index.js.map +1 -1
- package/dist/lexical/ui/icons/H6/index.js +16 -24
- package/dist/lexical/ui/icons/H6/index.js.map +1 -1
- package/dist/lexical/ui/icons/HorizontalRule/index.js +19 -27
- package/dist/lexical/ui/icons/HorizontalRule/index.js.map +1 -1
- package/dist/lexical/ui/icons/IndentDecrease/index.js +28 -53
- package/dist/lexical/ui/icons/IndentDecrease/index.js.map +1 -1
- package/dist/lexical/ui/icons/IndentIncrease/index.js +28 -53
- package/dist/lexical/ui/icons/IndentIncrease/index.js.map +1 -1
- package/dist/lexical/ui/icons/InlineBlocks/index.js +18 -26
- package/dist/lexical/ui/icons/InlineBlocks/index.js.map +1 -1
- package/dist/lexical/ui/icons/Italic/index.js +16 -24
- package/dist/lexical/ui/icons/Italic/index.js.map +1 -1
- package/dist/lexical/ui/icons/Link/index.js +17 -25
- package/dist/lexical/ui/icons/Link/index.js.map +1 -1
- package/dist/lexical/ui/icons/Meatballs/index.js +19 -39
- package/dist/lexical/ui/icons/Meatballs/index.js.map +1 -1
- package/dist/lexical/ui/icons/OrderedList/index.js +31 -61
- package/dist/lexical/ui/icons/OrderedList/index.js.map +1 -1
- package/dist/lexical/ui/icons/Relationship/index.js +31 -58
- package/dist/lexical/ui/icons/Relationship/index.js.map +1 -1
- package/dist/lexical/ui/icons/Strikethrough/index.js +19 -34
- package/dist/lexical/ui/icons/Strikethrough/index.js.map +1 -1
- package/dist/lexical/ui/icons/Subscript/index.js +16 -24
- package/dist/lexical/ui/icons/Subscript/index.js.map +1 -1
- package/dist/lexical/ui/icons/Superscript/index.js +16 -24
- package/dist/lexical/ui/icons/Superscript/index.js.map +1 -1
- package/dist/lexical/ui/icons/Table/index.js +17 -25
- package/dist/lexical/ui/icons/Table/index.js.map +1 -1
- package/dist/lexical/ui/icons/Text/index.js +16 -24
- package/dist/lexical/ui/icons/Text/index.js.map +1 -1
- package/dist/lexical/ui/icons/TextState/index.js +19 -25
- package/dist/lexical/ui/icons/TextState/index.js.map +1 -1
- package/dist/lexical/ui/icons/Underline/index.js +19 -34
- package/dist/lexical/ui/icons/Underline/index.js.map +1 -1
- package/dist/lexical/ui/icons/UnorderedList/index.js +46 -81
- package/dist/lexical/ui/icons/UnorderedList/index.js.map +1 -1
- package/dist/lexical/ui/icons/Upload/index.js +28 -48
- 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 +49 -49
- 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 -173
- 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/applyBaseFilterToFields.js +84 -81
- package/dist/utilities/applyBaseFilterToFields.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 +70 -45
- package/dist/utilities/fieldsDrawer/Drawer.js.map +1 -1
- package/dist/utilities/fieldsDrawer/DrawerContent.js +124 -134
- package/dist/utilities/fieldsDrawer/DrawerContent.js.map +1 -1
- package/dist/utilities/fieldsDrawer/useLexicalDocumentDrawer.js +115 -64
- 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 -79
- 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 +127 -111
- 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 +101 -87
- 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 +8 -8
- package/dist/features/blocks/client/component/index.scss +0 -188
- package/dist/features/blocks/client/componentInline/index.scss +0 -100
- 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 -95
- 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 -58
- 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 -361
- package/dist/lexical/ui/ContentEditable.scss +0 -105
package/dist/cell/rscEntry.js
CHANGED
|
@@ -1,84 +1,82 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { getTranslation } from '@payloadcms/translations';
|
|
3
3
|
import { Link } from '@payloadcms/ui';
|
|
4
4
|
import { formatAdminURL } from 'payload/shared';
|
|
5
5
|
import React from 'react';
|
|
6
6
|
function recurseEditorState(editorState, textContent, i = 0) {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
"]"
|
|
18
|
-
]
|
|
19
|
-
}, i, true, {
|
|
20
|
-
fileName: "src/cell/rscEntry.tsx",
|
|
21
|
-
lineNumber: 21,
|
|
22
|
-
columnNumber: 26
|
|
23
|
-
}, this));
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
if ('children' in node && node.children) {
|
|
27
|
-
textContent = recurseEditorState(node.children, textContent, i);
|
|
28
|
-
}
|
|
7
|
+
for (const node of editorState) {
|
|
8
|
+
i++;
|
|
9
|
+
if ('text' in node && node.text) {
|
|
10
|
+
textContent.push(node.text);
|
|
11
|
+
} else {
|
|
12
|
+
if (!('children' in node)) {
|
|
13
|
+
textContent.push(/*#__PURE__*/_jsxs("code", {
|
|
14
|
+
children: [" [", node.type, "]"]
|
|
15
|
+
}, i));
|
|
16
|
+
}
|
|
29
17
|
}
|
|
30
|
-
|
|
18
|
+
if ('children' in node && node.children) {
|
|
19
|
+
textContent = recurseEditorState(node.children, textContent, i);
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
return textContent;
|
|
31
23
|
}
|
|
32
|
-
export const RscEntryLexicalCell =
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
24
|
+
export const RscEntryLexicalCell = props => {
|
|
25
|
+
const {
|
|
26
|
+
cellData,
|
|
27
|
+
className: classNameFromProps,
|
|
28
|
+
collectionConfig,
|
|
29
|
+
field: {
|
|
30
|
+
admin
|
|
31
|
+
},
|
|
32
|
+
field,
|
|
33
|
+
i18n,
|
|
34
|
+
link,
|
|
35
|
+
onClick: onClickFromProps,
|
|
36
|
+
payload,
|
|
37
|
+
rowData
|
|
38
|
+
} = props;
|
|
39
|
+
const classNameFromConfigContext = admin && 'className' in admin ? admin.className : undefined;
|
|
40
|
+
const className = classNameFromProps || (field.admin && 'className' in field.admin ? field.admin.className : null) || classNameFromConfigContext;
|
|
41
|
+
const adminRoute = payload.config.routes.admin;
|
|
42
|
+
const serverURL = payload.config.serverURL;
|
|
43
|
+
const onClick = onClickFromProps;
|
|
44
|
+
let WrapElement = 'span';
|
|
45
|
+
const wrapElementProps = {
|
|
46
|
+
className
|
|
47
|
+
};
|
|
48
|
+
if (link) {
|
|
49
|
+
wrapElementProps.prefetch = false;
|
|
50
|
+
WrapElement = Link;
|
|
51
|
+
wrapElementProps.href = collectionConfig?.slug ? formatAdminURL({
|
|
52
|
+
adminRoute,
|
|
53
|
+
path: `/collections/${collectionConfig?.slug}/${rowData.id}`,
|
|
54
|
+
serverURL
|
|
55
|
+
}) : '';
|
|
56
|
+
}
|
|
57
|
+
if (typeof onClick === 'function') {
|
|
58
|
+
WrapElement = 'button';
|
|
59
|
+
wrapElementProps.type = 'button';
|
|
60
|
+
wrapElementProps.onClick = () => {
|
|
61
|
+
onClick({
|
|
62
|
+
cellData,
|
|
63
|
+
collectionSlug: collectionConfig?.slug,
|
|
64
|
+
rowData
|
|
65
|
+
});
|
|
42
66
|
};
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
cellData,
|
|
58
|
-
collectionSlug: collectionConfig?.slug,
|
|
59
|
-
rowData
|
|
60
|
-
});
|
|
61
|
-
};
|
|
62
|
-
}
|
|
63
|
-
let textContent = [];
|
|
64
|
-
if (cellData?.root?.children) {
|
|
65
|
-
textContent = recurseEditorState(cellData?.root?.children, textContent);
|
|
66
|
-
}
|
|
67
|
-
if (!textContent?.length) {
|
|
68
|
-
textContent = [
|
|
69
|
-
i18n.t('general:noLabel', {
|
|
70
|
-
label: getTranslation(('label' in field ? field.label : null) || 'data', i18n)
|
|
71
|
-
})
|
|
72
|
-
];
|
|
73
|
-
}
|
|
74
|
-
return /*#__PURE__*/ _jsxDEV(WrapElement, {
|
|
75
|
-
...wrapElementProps,
|
|
76
|
-
children: textContent
|
|
77
|
-
}, void 0, false, {
|
|
78
|
-
fileName: "src/cell/rscEntry.tsx",
|
|
79
|
-
lineNumber: 106,
|
|
80
|
-
columnNumber: 10
|
|
81
|
-
}, this);
|
|
67
|
+
}
|
|
68
|
+
let textContent = [];
|
|
69
|
+
if (cellData?.root?.children) {
|
|
70
|
+
textContent = recurseEditorState(cellData?.root?.children, textContent);
|
|
71
|
+
}
|
|
72
|
+
if (!textContent?.length) {
|
|
73
|
+
textContent = [i18n.t('general:noLabel', {
|
|
74
|
+
label: getTranslation(('label' in field ? field.label : null) || 'data', i18n)
|
|
75
|
+
})];
|
|
76
|
+
}
|
|
77
|
+
return /*#__PURE__*/_jsx(WrapElement, {
|
|
78
|
+
...wrapElementProps,
|
|
79
|
+
children: textContent
|
|
80
|
+
});
|
|
82
81
|
};
|
|
83
|
-
|
|
84
82
|
//# sourceMappingURL=rscEntry.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/cell/rscEntry.tsx"],"sourcesContent":["import type { SerializedLexicalNode } from 'lexical'\n\nimport { getTranslation } from '@payloadcms/translations'\nimport { Link } from '@payloadcms/ui'\nimport { formatAdminURL } from 'payload/shared'\nimport React from 'react'\n\nimport type { LexicalRichTextCellProps } from '../types.js'\n\nfunction recurseEditorState(\n editorState: SerializedLexicalNode[],\n textContent: React.ReactNode[],\n i: number = 0,\n): React.ReactNode[] {\n for (const node of editorState) {\n i++\n if ('text' in node && node.text) {\n textContent.push(node.text as string)\n } else {\n if (!('children' in node)) {\n textContent.push(<code key={i}> [{node.type}]</code>)\n }\n }\n if ('children' in node && node.children) {\n textContent = recurseEditorState(node.children as SerializedLexicalNode[], textContent, i)\n }\n }\n return textContent\n}\n\nexport const RscEntryLexicalCell: React.FC<LexicalRichTextCellProps> = (props) => {\n const {\n cellData,\n className: classNameFromProps,\n collectionConfig,\n field: { admin },\n field,\n i18n,\n link,\n onClick: onClickFromProps,\n payload,\n rowData,\n } = props\n\n const classNameFromConfigContext = admin && 'className' in admin ? admin.className : undefined\n\n const className =\n classNameFromProps ||\n (field.admin && 'className' in field.admin ? field.admin.className : null) ||\n classNameFromConfigContext\n const adminRoute = payload.config.routes.admin\n const serverURL = payload.config.serverURL\n\n const onClick = onClickFromProps\n\n let WrapElement: React.ComponentType<any> | string = 'span'\n\n const wrapElementProps: {\n className?: string\n href?: string\n onClick?: () => void\n prefetch?: false\n type?: 'button'\n } = {\n className,\n }\n\n if (link) {\n wrapElementProps.prefetch = false\n WrapElement = Link\n wrapElementProps.href = collectionConfig?.slug\n ? formatAdminURL({\n adminRoute,\n path: `/collections/${collectionConfig?.slug}/${rowData.id}`,\n serverURL,\n })\n : ''\n }\n\n if (typeof onClick === 'function') {\n WrapElement = 'button'\n wrapElementProps.type = 'button'\n wrapElementProps.onClick = () => {\n onClick({\n cellData,\n collectionSlug: collectionConfig?.slug,\n rowData,\n })\n }\n }\n\n let textContent: React.ReactNode[] = []\n\n if (cellData?.root?.children) {\n textContent = recurseEditorState(cellData?.root?.children, textContent)\n }\n\n if (!textContent?.length) {\n textContent = [\n i18n.t('general:noLabel', {\n label: getTranslation(('label' in field ? field.label : null) || 'data', i18n),\n }),\n ]\n }\n\n return <WrapElement {...wrapElementProps}>{textContent}</WrapElement>\n}\n"],"
|
|
1
|
+
{"version":3,"file":"rscEntry.js","names":["getTranslation","Link","formatAdminURL","React","recurseEditorState","editorState","textContent","i","node","text","push","_jsxs","type","children","RscEntryLexicalCell","props","cellData","className","classNameFromProps","collectionConfig","field","admin","i18n","link","onClick","onClickFromProps","payload","rowData","classNameFromConfigContext","undefined","adminRoute","config","routes","serverURL","WrapElement","wrapElementProps","prefetch","href","slug","path","id","collectionSlug","root","length","t","label","_jsx"],"sources":["../../src/cell/rscEntry.tsx"],"sourcesContent":["import type { SerializedLexicalNode } from 'lexical'\n\nimport { getTranslation } from '@payloadcms/translations'\nimport { Link } from '@payloadcms/ui'\nimport { formatAdminURL } from 'payload/shared'\nimport React from 'react'\n\nimport type { LexicalRichTextCellProps } from '../types.js'\n\nfunction recurseEditorState(\n editorState: SerializedLexicalNode[],\n textContent: React.ReactNode[],\n i: number = 0,\n): React.ReactNode[] {\n for (const node of editorState) {\n i++\n if ('text' in node && node.text) {\n textContent.push(node.text as string)\n } else {\n if (!('children' in node)) {\n textContent.push(<code key={i}> [{node.type}]</code>)\n }\n }\n if ('children' in node && node.children) {\n textContent = recurseEditorState(node.children as SerializedLexicalNode[], textContent, i)\n }\n }\n return textContent\n}\n\nexport const RscEntryLexicalCell: React.FC<LexicalRichTextCellProps> = (props) => {\n const {\n cellData,\n className: classNameFromProps,\n collectionConfig,\n field: { admin },\n field,\n i18n,\n link,\n onClick: onClickFromProps,\n payload,\n rowData,\n } = props\n\n const classNameFromConfigContext = admin && 'className' in admin ? admin.className : undefined\n\n const className =\n classNameFromProps ||\n (field.admin && 'className' in field.admin ? field.admin.className : null) ||\n classNameFromConfigContext\n const adminRoute = payload.config.routes.admin\n const serverURL = payload.config.serverURL\n\n const onClick = onClickFromProps\n\n let WrapElement: React.ComponentType<any> | string = 'span'\n\n const wrapElementProps: {\n className?: string\n href?: string\n onClick?: () => void\n prefetch?: false\n type?: 'button'\n } = {\n className,\n }\n\n if (link) {\n wrapElementProps.prefetch = false\n WrapElement = Link\n wrapElementProps.href = collectionConfig?.slug\n ? formatAdminURL({\n adminRoute,\n path: `/collections/${collectionConfig?.slug}/${rowData.id}`,\n serverURL,\n })\n : ''\n }\n\n if (typeof onClick === 'function') {\n WrapElement = 'button'\n wrapElementProps.type = 'button'\n wrapElementProps.onClick = () => {\n onClick({\n cellData,\n collectionSlug: collectionConfig?.slug,\n rowData,\n })\n }\n }\n\n let textContent: React.ReactNode[] = []\n\n if (cellData?.root?.children) {\n textContent = recurseEditorState(cellData?.root?.children, textContent)\n }\n\n if (!textContent?.length) {\n textContent = [\n i18n.t('general:noLabel', {\n label: getTranslation(('label' in field ? field.label : null) || 'data', i18n),\n }),\n ]\n }\n\n return <WrapElement {...wrapElementProps}>{textContent}</WrapElement>\n}\n"],"mappings":";AAEA,SAASA,cAAc,QAAQ;AAC/B,SAASC,IAAI,QAAQ;AACrB,SAASC,cAAc,QAAQ;AAC/B,OAAOC,KAAA,MAAW;AAIlB,SAASC,mBACPC,WAAoC,EACpCC,WAA8B,EAC9BC,CAAA,GAAY,CAAC;EAEb,KAAK,MAAMC,IAAA,IAAQH,WAAA,EAAa;IAC9BE,CAAA;IACA,IAAI,UAAUC,IAAA,IAAQA,IAAA,CAAKC,IAAI,EAAE;MAC/BH,WAAA,CAAYI,IAAI,CAACF,IAAA,CAAKC,IAAI;IAC5B,OAAO;MACL,IAAI,EAAE,cAAcD,IAAG,GAAI;QACzBF,WAAA,CAAYI,IAAI,cAACC,KAAA,CAAC;qBAAa,MAAOH,IAAA,CAAKI,IAAI,EAAC;WAApBL,CAAA;MAC9B;IACF;IACA,IAAI,cAAcC,IAAA,IAAQA,IAAA,CAAKK,QAAQ,EAAE;MACvCP,WAAA,GAAcF,kBAAA,CAAmBI,IAAA,CAAKK,QAAQ,EAA6BP,WAAA,EAAaC,CAAA;IAC1F;EACF;EACA,OAAOD,WAAA;AACT;AAEA,OAAO,MAAMQ,mBAAA,GAA2DC,KAAA;EACtE,MAAM;IACJC,QAAQ;IACRC,SAAA,EAAWC,kBAAkB;IAC7BC,gBAAgB;IAChBC,KAAA,EAAO;MAAEC;IAAK,CAAE;IAChBD,KAAK;IACLE,IAAI;IACJC,IAAI;IACJC,OAAA,EAASC,gBAAgB;IACzBC,OAAO;IACPC;EAAO,CACR,GAAGZ,KAAA;EAEJ,MAAMa,0BAAA,GAA6BP,KAAA,IAAS,eAAeA,KAAA,GAAQA,KAAA,CAAMJ,SAAS,GAAGY,SAAA;EAErF,MAAMZ,SAAA,GACJC,kBAAA,KACCE,KAAA,CAAMC,KAAK,IAAI,eAAeD,KAAA,CAAMC,KAAK,GAAGD,KAAA,CAAMC,KAAK,CAACJ,SAAS,GAAG,IAAG,KACxEW,0BAAA;EACF,MAAME,UAAA,GAAaJ,OAAA,CAAQK,MAAM,CAACC,MAAM,CAACX,KAAK;EAC9C,MAAMY,SAAA,GAAYP,OAAA,CAAQK,MAAM,CAACE,SAAS;EAE1C,MAAMT,OAAA,GAAUC,gBAAA;EAEhB,IAAIS,WAAA,GAAiD;EAErD,MAAMC,gBAAA,GAMF;IACFlB;EACF;EAEA,IAAIM,IAAA,EAAM;IACRY,gBAAA,CAAiBC,QAAQ,GAAG;IAC5BF,WAAA,GAAcjC,IAAA;IACdkC,gBAAA,CAAiBE,IAAI,GAAGlB,gBAAA,EAAkBmB,IAAA,GACtCpC,cAAA,CAAe;MACb4B,UAAA;MACAS,IAAA,EAAM,gBAAgBpB,gBAAA,EAAkBmB,IAAA,IAAQX,OAAA,CAAQa,EAAE,EAAE;MAC5DP;IACF,KACA;EACN;EAEA,IAAI,OAAOT,OAAA,KAAY,YAAY;IACjCU,WAAA,GAAc;IACdC,gBAAA,CAAiBvB,IAAI,GAAG;IACxBuB,gBAAA,CAAiBX,OAAO,GAAG;MACzBA,OAAA,CAAQ;QACNR,QAAA;QACAyB,cAAA,EAAgBtB,gBAAA,EAAkBmB,IAAA;QAClCX;MACF;IACF;EACF;EAEA,IAAIrB,WAAA,GAAiC,EAAE;EAEvC,IAAIU,QAAA,EAAU0B,IAAA,EAAM7B,QAAA,EAAU;IAC5BP,WAAA,GAAcF,kBAAA,CAAmBY,QAAA,EAAU0B,IAAA,EAAM7B,QAAA,EAAUP,WAAA;EAC7D;EAEA,IAAI,CAACA,WAAA,EAAaqC,MAAA,EAAQ;IACxBrC,WAAA,GAAc,CACZgB,IAAA,CAAKsB,CAAC,CAAC,mBAAmB;MACxBC,KAAA,EAAO7C,cAAA,CAAe,CAAC,WAAWoB,KAAA,GAAQA,KAAA,CAAMyB,KAAK,GAAG,IAAG,KAAM,QAAQvB,IAAA;IAC3E,GACD;EACH;EAEA,oBAAOwB,IAAA,CAACZ,WAAA;IAAa,GAAGC,gBAAgB;cAAG7B;;AAC7C","ignoreList":[]}
|
|
@@ -5,13 +5,12 @@ import fs from 'fs/promises';
|
|
|
5
5
|
import { describe, it, expect } from 'vitest';
|
|
6
6
|
const filename = fileURLToPath(import.meta.url);
|
|
7
7
|
const dirname = path.dirname(filename);
|
|
8
|
-
describe('Lexical dependency checker', ()=>{
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
8
|
+
describe('Lexical dependency checker', () => {
|
|
9
|
+
it('ensure lexical version installed in package.json matches dependency checker version', async () => {
|
|
10
|
+
const packageJsonString = await fs.readFile(path.resolve(dirname, '../package.json'), 'utf-8');
|
|
11
|
+
const packageJson = JSON.parse(packageJsonString);
|
|
12
|
+
const packageJsonLexicalVersion = packageJson.dependencies['lexical'];
|
|
13
|
+
expect(packageJsonLexicalVersion).toBe(lexicalTargetVersion);
|
|
14
|
+
});
|
|
15
15
|
});
|
|
16
|
-
|
|
17
16
|
//# sourceMappingURL=dependencyChecker.spec.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/dependencyChecker.spec.ts"],"sourcesContent":["import { lexicalTargetVersion } from './index'\nimport { fileURLToPath } from 'url'\nimport path from 'path'\nimport fs from 'fs/promises'\nimport { describe, it, expect } from 'vitest'\n\nconst filename = fileURLToPath(import.meta.url)\nconst dirname = path.dirname(filename)\n\ndescribe('Lexical dependency checker', () => {\n it('ensure lexical version installed in package.json matches dependency checker version', async () => {\n const packageJsonString = await fs.readFile(path.resolve(dirname, '../package.json'), 'utf-8')\n const packageJson = JSON.parse(packageJsonString)\n const packageJsonLexicalVersion = packageJson.dependencies['lexical']\n\n expect(packageJsonLexicalVersion).toBe(lexicalTargetVersion)\n })\n})\n"],"
|
|
1
|
+
{"version":3,"file":"dependencyChecker.spec.js","names":["lexicalTargetVersion","fileURLToPath","path","fs","describe","it","expect","filename","import","meta","url","dirname","packageJsonString","readFile","resolve","packageJson","JSON","parse","packageJsonLexicalVersion","dependencies","toBe"],"sources":["../src/dependencyChecker.spec.ts"],"sourcesContent":["import { lexicalTargetVersion } from './index'\nimport { fileURLToPath } from 'url'\nimport path from 'path'\nimport fs from 'fs/promises'\nimport { describe, it, expect } from 'vitest'\n\nconst filename = fileURLToPath(import.meta.url)\nconst dirname = path.dirname(filename)\n\ndescribe('Lexical dependency checker', () => {\n it('ensure lexical version installed in package.json matches dependency checker version', async () => {\n const packageJsonString = await fs.readFile(path.resolve(dirname, '../package.json'), 'utf-8')\n const packageJson = JSON.parse(packageJsonString)\n const packageJsonLexicalVersion = packageJson.dependencies['lexical']\n\n expect(packageJsonLexicalVersion).toBe(lexicalTargetVersion)\n })\n})\n"],"mappings":"AAAA,SAASA,oBAAoB,QAAQ;AACrC,SAASC,aAAa,QAAQ;AAC9B,OAAOC,IAAA,MAAU;AACjB,OAAOC,EAAA,MAAQ;AACf,SAASC,QAAQ,EAAEC,EAAE,EAAEC,MAAM,QAAQ;AAErC,MAAMC,QAAA,GAAWN,aAAA,CAAcO,MAAA,CAAAC,IAAA,CAAYC,GAAG;AAC9C,MAAMC,OAAA,GAAUT,IAAA,CAAKS,OAAO,CAACJ,QAAA;AAE7BH,QAAA,CAAS,8BAA8B;EACrCC,EAAA,CAAG,uFAAuF;IACxF,MAAMO,iBAAA,GAAoB,MAAMT,EAAA,CAAGU,QAAQ,CAACX,IAAA,CAAKY,OAAO,CAACH,OAAA,EAAS,oBAAoB;IACtF,MAAMI,WAAA,GAAcC,IAAA,CAAKC,KAAK,CAACL,iBAAA;IAC/B,MAAMM,yBAAA,GAA4BH,WAAA,CAAYI,YAAY,CAAC,UAAU;IAErEb,MAAA,CAAOY,yBAAA,EAA2BE,IAAI,CAACpB,oBAAA;EACzC;AACF","ignoreList":[]}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use client";import{jsx as o,jsxs as t}from"react/jsx-runtime";import"react";var c=n=>{let{data:e}=n;return t("div",{children:["Unknown converted Slate node: ",o("strong",{children:e?.nodeType})]})};export{c as UnknownConvertedNodeComponent};
|
|
2
|
+
//# sourceMappingURL=Component-DOSSWC76.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/features/migrations/slateToLexical/nodes/unknownConvertedNode/Component.tsx"],
|
|
4
|
+
"sourcesContent": ["'use client'\nimport React from 'react'\n\nimport type { UnknownConvertedNodeData } from './index.js'\n\nimport './index.scss'\n\ntype Props = {\n data: UnknownConvertedNodeData\n}\n\nexport const UnknownConvertedNodeComponent: React.FC<Props> = (props) => {\n const { data } = props\n\n return (\n <div>\n Unknown converted Slate node: <strong>{data?.nodeType}</strong>\n </div>\n )\n}\n"],
|
|
5
|
+
"mappings": "+DACA,MAAkB,QAUX,IAAMA,EAAkDC,GAAA,CAC7D,GAAM,CAAEC,KAAAA,CAAI,EAAKD,EAEjB,OACEE,EAAC,MAAA,WAAI,iCAC2BC,EAAC,SAAA,UAAQF,GAAMG,aAGnD",
|
|
6
|
+
"names": ["UnknownConvertedNodeComponent", "props", "data", "_jsxs", "_jsx", "nodeType"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use client";import{jsx as e,jsxs as t}from"react/jsx-runtime";import"react";var a=n=>{let{data:o}=n;return t("div",{children:["Unknown converted payload-plugin-lexical node: ",e("strong",{children:o?.nodeType})]})};export{a as UnknownConvertedNodeComponent};
|
|
2
|
+
//# sourceMappingURL=Component-MBLHTKDK.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/Component.tsx"],
|
|
4
|
+
"sourcesContent": ["'use client'\nimport React from 'react'\n\nimport type { UnknownConvertedNodeData } from './index.js'\n\nimport './index.scss'\n\ntype Props = {\n data: UnknownConvertedNodeData\n}\n\nexport const UnknownConvertedNodeComponent: React.FC<Props> = (props) => {\n const { data } = props\n\n return (\n <div>\n Unknown converted payload-plugin-lexical node: <strong>{data?.nodeType}</strong>\n </div>\n )\n}\n"],
|
|
5
|
+
"mappings": "+DACA,MAAkB,QAUX,IAAMA,EAAkDC,GAAA,CAC7D,GAAM,CAAEC,KAAAA,CAAI,EAAKD,EAEjB,OACEE,EAAC,MAAA,WAAI,kDAC4CC,EAAC,SAAA,UAAQF,GAAMG,aAGpE",
|
|
6
|
+
"names": ["UnknownConvertedNodeComponent", "props", "data", "_jsxs", "_jsx", "nodeType"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use client";import{a as De,e as Le,f as I,h as ve,i as Me,j as _e,k as Ae,l as Be}from"./chunk-EZX4YW7S.js";import{a as Te,b as S}from"./chunk-BZZVLW4U.js";import{jsx as A,jsxs as ge}from"react/jsx-runtime";import{BulkUploadProvider as On,FieldDescription as In,FieldError as Fn,FieldLabel as $n,isFieldRTL as Kn,RenderCustomComponent as Rt,useConfig as Hn,useEditDepth as jn,useEffectEvent as zn,useField as Wn,useLocale as Yn}from"@payloadcms/ui";import{mergeFieldStyles as Vn}from"@payloadcms/ui/shared";import{dequal as Gn}from"dequal/lite";import wt,{useCallback as kt,useEffect as Tt,useMemo as Un,useState as Dt}from"react";import{ErrorBoundary as Jn}from"react-error-boundary";import"./bundled.css";import{jsx as F}from"react/jsx-runtime";import{LexicalComposer as _n}from"@lexical/react/LexicalComposer.js";import{useEditDepth as An}from"@payloadcms/ui";import*as Nt from"react";import{useMemo as Bn}from"react";import{c as yn}from"react/compiler-runtime";import{jsx as C,jsxs as te}from"react/jsx-runtime";import{useLexicalComposerContext as xn}from"@lexical/react/LexicalComposerContext.js";import{LexicalErrorBoundary as En}from"@lexical/react/LexicalErrorBoundary.js";import{HistoryPlugin as Cn}from"@lexical/react/LexicalHistoryPlugin.js";import{OnChangePlugin as bn}from"@lexical/react/LexicalOnChangePlugin.js";import{RichTextPlugin as Nn}from"@lexical/react/LexicalRichTextPlugin.js";import{useLexicalEditable as Sn}from"@lexical/react/useLexicalEditable";import{BLUR_COMMAND as Pn,COMMAND_PRIORITY_LOW as Ct,FOCUS_COMMAND as Rn}from"lexical";import*as q from"react";import{useEffect as wn,useState as kn}from"react";import{jsx as Oe}from"react/jsx-runtime";import"react";var $=({anchorElem:t,clientProps:e,plugin:o})=>o.position==="floatingAnchorElem"&&t?o.Component&&Oe(o.Component,{anchorElem:t,clientProps:e}):o.Component&&Oe(o.Component,{clientProps:e});import{c as _t}from"react/compiler-runtime";import{copyToClipboard as Ie}from"@lexical/clipboard";import{useLexicalComposerContext as At}from"@lexical/react/LexicalComposerContext.js";import{objectKlassEquals as Bt}from"@lexical/utils";import Fe from"bson-objectid";import{$getSelection as Ot,$isNodeSelection as It,COMMAND_PRIORITY_LOW as Ft,COPY_COMMAND as $t}from"lexical";import{useEffect as Kt}from"react";var ye=t=>{if("fields"in t&&typeof t.fields=="object"&&t.fields!==null&&"id"in t.fields?t.fields.id=new Fe.default().toHexString():"id"in t&&(t.id=new Fe.default().toHexString()),t.children)for(let e of t.children)ye(e)};function $e(){let t=_t(3),[e]=At(),o,r;return t[0]!==e?(o=()=>e.registerCommand($t,n=>{let d=Ot();if(It(d)){let i=d.getNodes()[0]?.exportJSON(),a=JSON.parse(JSON.stringify(i));ye(a);let f={namespace:e._config.namespace,nodes:[a]},m=JSON.stringify(f);return Ie(e,null,{"application/x-lexical-editor":m,"text/plain":""}).catch(Ht),!0}return Ie(e,Bt(n,ClipboardEvent)?n:null).then(()=>{if(!(n instanceof ClipboardEvent)||!n.clipboardData)throw new Error("No clipboard event");let l=n.clipboardData.getData("application/x-lexical-editor");if(!l)return!0;let i=JSON.parse(l);for(let f of i.nodes)ye(f);let a=JSON.stringify(i);n.clipboardData.setData("application/x-lexical-editor",a)}).catch(l=>{throw n instanceof ClipboardEvent&&n.clipboardData?.setData("application/x-lexical-editor",""),l}),!0},Ft),r=[e],t[0]=e,t[1]=o,t[2]=r):(o=t[1],r=t[2]),Kt(o,r),null}function Ht(t){throw t}import{c as jt}from"react/compiler-runtime";import{useLexicalComposerContext as zt}from"@lexical/react/LexicalComposerContext";import{$findMatchingParent as ne,mergeRegister as Wt}from"@lexical/utils";import{$createNodeSelection as Yt,$getEditor as X,$getNearestNodeFromDOMNode as Vt,$getSelection as re,$isDecoratorNode as K,$isElementNode as xe,$isLineBreakNode as Gt,$isNodeSelection as ie,$isRangeSelection as Ke,$isRootOrShadowRoot as Ut,$isTextNode as Jt,$setSelection as He,CLICK_COMMAND as qt,COMMAND_PRIORITY_LOW as Y,KEY_ARROW_DOWN_COMMAND as Qt,KEY_ARROW_UP_COMMAND as Xt,KEY_BACKSPACE_COMMAND as Zt,KEY_DELETE_COMMAND as eo,SELECTION_CHANGE_COMMAND as to}from"lexical";import{useEffect as oo}from"react";function je(){let t=jt(3),[e]=zt(),o=co,r,n;return t[0]!==e?(r=()=>Wt(e.registerCommand(qt,ao,Y),e.registerCommand(eo,o,Y),e.registerCommand(Zt,o,Y),e.registerCommand(to,lo,Y),e.registerCommand(Xt,io,Y),e.registerCommand(Qt,no,Y)),n=[e],t[0]=e,t[1]=r,t[2]=n):(r=t[1],n=t[2]),oo(r,n),null}function no(t){let e=re();if(ie(e)){t.preventDefault();let l=e.getNodes()[0]?.getNextSibling();if(K(l)){let f=X().getElementByKey(l.getKey());return f&&Z({element:f,node:l}),!0}if(!xe(l))return!0;let i=l.getFirstDescendant()??l;return i&&(ne(i,se)?.selectEnd(),t.preventDefault()),!0}if(!Ke(e))return!1;let r=(e.isBackward()?e.anchor:e.focus).getNode(),n=ne(r,ro),d=n?.getNextSibling();if(!n||d!==ze(n))return!1;if(K(d)){let l=X().getElementByKey(d.getKey());if(l)return Z({element:l,node:d}),t.preventDefault(),!0}return!1}function ro(t){return ze(t)!==null}function io(t){let e=re();if(ie(e)){let l=e.getNodes()[0]?.getPreviousSibling();if(K(l)){let f=X().getElementByKey(l.getKey());return f?(Z({element:f,node:l}),t.preventDefault(),!0):!1}if(!xe(l))return!1;let i=l.getLastDescendant()??l;return i?(ne(i,se)?.selectStart(),t.preventDefault(),!0):!1}if(!Ke(e))return!1;let r=(e.isBackward()?e.anchor:e.focus).getNode(),n=ne(r,so),d=n?.getPreviousSibling();if(!n||d!==We(n))return!1;if(K(d)){let l=X().getElementByKey(d.getKey());if(l)return Z({element:l,node:d}),t.preventDefault(),!0}return!1}function so(t){return We(t)!==null}function lo(){let t=mo();return document.querySelector(".decorator-selected")?.classList.remove("decorator-selected"),t?(t.element?.classList.add("decorator-selected"),!0):!1}function ao(t){document.querySelector(".decorator-selected")?.classList.remove("decorator-selected");let e=fo(t);if(!e)return!0;let{target:o}=t;return!(o instanceof HTMLElement)||o.isContentEditable||o.closest('button, textarea, input, .react-select, .code-editor, .no-select-decorator, [role="button"]')?He(null):Z(e),!0}function co(t){let e=re();return ie(e)?(t.preventDefault(),e.getNodes().forEach(uo),!0):!1}function uo(t){t.remove()}function fo(t){if(!(t.target instanceof HTMLElement))return;let e=t.target.closest('[data-lexical-decorator="true"]');if(!(e instanceof HTMLElement))return;let o=Vt(e);return K(o)?{element:e,node:o}:void 0}function mo(){let t=re();if(!ie(t))return;let e=t.getNodes();if(e.length!==1)return;let o=e[0];return K(o)?{decorator:o,element:X().getElementByKey(o.getKey())}:void 0}function Z({element:t,node:e}){document.querySelector(".decorator-selected")?.classList.remove("decorator-selected");let o=Yt();o.add(e.getKey()),He(o),t.scrollIntoView({behavior:"smooth",block:"nearest"}),t.classList.add("decorator-selected")}function se(t){if(K(t)&&!t.isInline())return!0;if(!xe(t)||Ut(t))return!1;let e=t.getFirstChild(),o=e===null||Gt(e)||Jt(e)||e.isInline();return!t.isInline()&&t.canBeEmpty()!==!1&&o}function ze(t){let e=t.getNextSibling();for(;e!==null;){if(se(e))return e;e=e.getNextSibling()}return null}function We(t){let e=t.getPreviousSibling();for(;e!==null;){if(se(e))return e;e=e.getPreviousSibling()}return null}import{jsx as Ee}from"react/jsx-runtime";import{useLexicalComposerContext as Eo}from"@lexical/react/LexicalComposerContext.js";import{$createParagraphNode as Co,isHTMLElement as bo}from"lexical";import*as Ue from"react";import{useCallback as No,useEffect as Ge,useRef as So,useState as Po}from"react";import{createPortal as Ro}from"react-dom";var V=(t,e,o,r,n=50,d=25)=>{let l=0;if(t&&!t.contains(r)){let{bottom:i,left:a,right:f,top:m}=t.getBoundingClientRect(),c=m+window.scrollY,s=i+window.scrollY;if(o<c-d||o>s+d||e<a-n||e>f+n)return-1;(e<a||e>f)&&(l=e<a?e-a:e-f)}return l};import{$getNodeByKey as ae}from"lexical";function G(t){let e=t.getBoundingClientRect(),o=getComputedStyle(t).getPropertyValue("transform");if(!o||o==="none")return e;let r=o.split(",").pop();return e.y=e.y-Number(r?.replace(")","")),e}function le(t){let e=(a,f)=>a?parseFloat(window.getComputedStyle(a)[f]):0,{marginBottom:o,marginTop:r}=window.getComputedStyle(t),n=e(t.previousElementSibling,"marginBottom"),d=e(t.nextElementSibling,"marginTop"),l=Math.max(parseFloat(r),n);return{marginBottom:Math.max(parseFloat(o),d),marginTop:l}}import{$getRoot as po}from"lexical";function H(t){return t.getEditorState().read(()=>po().getChildrenKeys())}var go=1,ho=-1,Ye=0,M={props:null,result:null};function yo(t,e,o=20){let r=t.x-e.x,n=t.y-e.y;return r*r+n*n<=o*o}function U(t){let{anchorElem:e,cache_threshold:o=20,editor:r,fuzzy:n=!1,horizontalOffset:d=0,point:{x:l,y:i},startIndex:a=0,useEdgeAsDefault:f=!1}=t;if(o>0&&M.props&&M.result&&M.props.fuzzy===t.fuzzy&&M.props.horizontalOffset===t.horizontalOffset&&M.props.useEdgeAsDefault===t.useEdgeAsDefault&&yo(M.props.point,t.point,o))return M.result;let m=e.getBoundingClientRect(),c=H(r),s={blockElem:null,blockNode:null,distance:1/0,foundAtIndex:-1,isFoundNodeEmptyParagraph:!1};return r.getEditorState().read(()=>{if(f){let g=r.getElementByKey(c[0]),y=r.getElementByKey(c[c.length-1]);if(g&&y){let[u,p]=[G(g),G(y)];if(i<u.top?(s.blockElem=g,s.distance=u.top-i,s.blockNode=ae(c[0]),s.foundAtIndex=0):i>p.bottom&&(s.distance=i-p.bottom,s.blockNode=ae(c[c.length-1]),s.blockElem=y,s.foundAtIndex=c.length-1),s?.blockElem)return{blockElem:null,isFoundNodeEmptyParagraph:!1}}}let h=a,x=Ye;for(;h>=0&&h<c.length;){let g=c[h],y=r.getElementByKey(g);if(y===null)break;let u=new I(l+d,i),p=Ae.fromDOMRect(G(y)),{marginBottom:E,marginTop:T}=le(y),R=p.generateNewRect({bottom:p.bottom+E,left:m.left,right:m.right,top:p.top-T}),{distance:P,isOnBottomSide:D,isOnTopSide:b}=R.distanceFromPoint(u);if(P===0){s.blockElem=y,s.blockNode=ae(g),s.foundAtIndex=h,s.distance=P,s.blockNode&&s.blockNode.getType()==="paragraph"&&s.blockNode.getTextContent()===""&&(!n&&!t.returnEmptyParagraphs&&(s.blockElem=null,s.blockNode=null),s.isFoundNodeEmptyParagraph=!0);break}else n&&P<s.distance&&(s.blockElem=y,s.blockNode=ae(g),s.distance=P,s.foundAtIndex=h);x===Ye&&(b?x=ho:D?x=go:x=1/0),h+=x}}),M.props=t,M.result={blockElem:s.blockElem,blockNode:s.blockNode,foundAtIndex:s.foundAtIndex,isFoundNodeEmptyParagraph:s.isFoundNodeEmptyParagraph},{blockElem:s.blockElem,blockNode:s.blockNode,foundAtIndex:s.foundAtIndex,isFoundNodeEmptyParagraph:s.isFoundNodeEmptyParagraph}}function ce(t,e){return!!t.closest(`.${e}`)}var xo=["IMG","INPUT","TEXTAREA","SELECT","BUTTON","VIDEO","OBJECT","EMBED","IFRAME","HR"];function Ve(t){if(!t||xo.includes(t.tagName)||t.offsetHeight===0||t.offsetWidth===0)return!1;let e=window.getComputedStyle(t);return!(e.display==="table-cell"||e.position==="absolute"||e.visibility==="hidden"||e.opacity==="0")}function de(t,e,o,r=0){if(!t){e.style.opacity="0",e.style.transform="translate(-10000px, -10000px)";return}let n=t.getBoundingClientRect(),d=window.getComputedStyle(t),l=e.getBoundingClientRect(),i=o.getBoundingClientRect(),a;if(["LexicalEditorTheme__block","LexicalEditorTheme__upload","LexicalEditorTheme__relationship"].some(c=>t.classList.contains(c)||t.firstElementChild?.classList.contains(c)))a=n.top+8-i.top;else{let c=Ve(t)?parseInt(d.lineHeight,10):0;a=n.top+(c-l.height)/2-i.top}let m=r;e.style.opacity="1",e.style.transform=`translate(${m}px, ${a}px)`}var wo="add-block-menu",ue=1/0;function ko(t){return t===0?1/0:ue>=0&&ue<t?ue:Math.floor(t/2)}function To(t,e,o){let r=e.parentElement,{editorConfig:n}=S(),d=n?.admin?.hideGutter?-24:12,l=So(null),[i,a]=Po(null);Ge(()=>{function m(c){let s=c.target;if(!bo(s))return;let h=V(r,c.pageX,c.pageY,s);if(h===-1){a(null);return}if(ce(s,wo))return;let x=H(t),{blockElem:g,blockNode:y,foundAtIndex:u}=U({anchorElem:e,cache_threshold:0,editor:t,horizontalOffset:-h,point:new I(c.x,c.y),returnEmptyParagraphs:!0,startIndex:ko(x.length),useEdgeAsDefault:!1});ue=u,g&&y&&(i?.node!==y||i?.elem!==g)&&a({elem:g,node:y})}return document?.addEventListener("mousemove",m),()=>{document?.removeEventListener("mousemove",m)}},[r,e,t,i]),Ge(()=>{l.current&&i?.node&&de(i?.elem,l.current,e,d)},[e,i,d]);let f=No(m=>{let c=i;c?.node&&(t.update(()=>{let s=!0;if((c?.node.getType()!=="paragraph"||c.node.getTextContent()!=="")&&(s=!1),!s){let h=Co();c?.node.insertAfter(h),setTimeout(()=>{c={elem:t.getElementByKey(h.getKey()),node:h},a(c)},0)}}),setTimeout(()=>{t.update(()=>{t.focus(),c?.node&&"select"in c.node&&typeof c.node.select=="function"&&c.node.select()})},1),setTimeout(()=>{t.dispatchCommand(Me,{node:c?.node})},2),m.stopPropagation(),m.preventDefault())},[t,i]);return Ro(Ee(Ue.Fragment,{children:Ee("button",{"aria-label":"Add block",className:"icon add-block-menu",onClick:m=>{f(m)},ref:l,type:"button",children:Ee("div",{className:o?"icon":""})})}),e)}function Je(t){let{anchorElem:e}=t,o=e===void 0?document.body:e,[r]=Eo();return To(r,o,r._editable)}import{jsx as fe,jsxs as Lo}from"react/jsx-runtime";import{useLexicalComposerContext as vo}from"@lexical/react/LexicalComposerContext.js";import{eventFiles as Xe}from"@lexical/rich-text";import{$getNearestNodeFromDOMNode as Ze,$getNodeByKey as Mo,isHTMLElement as Ce}from"lexical";import*as rt from"react";import{useEffect as be,useRef as me,useState as et}from"react";import{createPortal as _o}from"react-dom";var qe=0,Do=-24;var j=0;function Qe(t,e,o,r,n,d,l,i,a,f=!1){let{height:m,top:c}=r.getBoundingClientRect(),{top:s,width:h}=l.getBoundingClientRect(),{marginBottom:x,marginTop:g}=le(r),y=c,u=d>=c+m/2+window.scrollY,p=!1;if(n?.elem)if(r!==n?.elem)(u&&n?.elem&&n?.elem===r.nextElementSibling||!u&&n?.elem&&n?.elem===r.previousElementSibling)&&(j++,j<200&&(p=!0));else{j++;let P=n?.boundingBox?.y,D=r.getBoundingClientRect().y;(u===n?.isBelow&&P===D||j<200)&&(p=!1)}if(p)return{isBelow:u,willStayInSamePosition:p};f?y+=m/2:u?y+=m+x/2:y-=g/2;let E=0;f||(u?E=-qe:E=qe);let T=y-s+E,R=Do-e;return o.style.width=`calc(${h}px - ${t})`,o.style.opacity=".8",o.style.transform=`translate(${R}px, calc(${T}px - 2px))`,n?.elem&&(n.elem.style.opacity="",n?.elem===r?u?n.elem.style.marginTop="":n.elem.style.marginBottom="":(n.elem.style.marginBottom="",n.elem.style.marginTop="")),j=0,{isBelow:u,willStayInSamePosition:p}}var Ao="draggable-block-menu",tt="application/x-lexical-drag-block",ee=1/0;function ot(t){return t===0?1/0:ee>=0&&ee<t?ee:Math.floor(t/2)}function Bo(t,e){let{transform:o}=e.style;t.setDragImage(e,0,0),setTimeout(()=>{e.style.transform=o})}function nt(t,e){t&&(t.style.opacity="0"),e&&(e.style.opacity="",e.style.marginBottom="",e.style.marginTop="")}function Oo(t,e,o){let r=e.parentElement,n=me(null),d=me(null),l=me(null),i=me(!1),[a,f]=et(null),[m,c]=et(null),{editorConfig:s}=S(),h=s?.admin?.hideGutter?-44:-8;be(()=>{function y(u){let p=u.target;if(!Ce(p))return;let E=V(r,u.pageX,u.pageY,p);if(E===-1){f(null);return}if(ce(p,Ao))return;let T=H(t),{blockElem:R,foundAtIndex:P,isFoundNodeEmptyParagraph:D}=U({anchorElem:e,cache_threshold:0,editor:t,horizontalOffset:-E,point:new I(u.x,u.y),startIndex:ot(T.length),useEdgeAsDefault:!1,verbose:!1});ee=P,!(!R&&!D)&&a!==R&&f(R)}return document?.addEventListener("mousemove",y),()=>{document?.removeEventListener("mousemove",y)}},[r,e,t,a]),be(()=>{n.current&&de(a,n.current,e,h)},[e,a,h]),be(()=>{function y(p){if(!i.current)return!1;let[E]=Xe(p);if(E)return!1;let{pageY:T,target:R}=p;if(!Ce(R))return!1;let P=V(r,p.pageX,p.pageY,R,100,50),D=H(t),{blockElem:b,foundAtIndex:L,isFoundNodeEmptyParagraph:B}=U({anchorElem:e,editor:t,fuzzy:!0,horizontalOffset:-P,point:new I(p.x,p.y),startIndex:ot(D.length),useEdgeAsDefault:!0,verbose:!0});ee=L;let O=d.current;if(b===null||O===null)return!1;if(a!==b){let{isBelow:w,willStayInSamePosition:z}=Qe(s?.admin?.hideGutter?"0px":"3rem",h+(s?.admin?.hideGutter?n?.current?.getBoundingClientRect()?.width??0:-(n?.current?.getBoundingClientRect()?.width??0)),O,b,m,T,e,p,l,B);p.preventDefault(),z||c({boundingBox:b.getBoundingClientRect(),elem:b,isBelow:w})}else m?.elem&&(nt(O,m.elem),c({boundingBox:b.getBoundingClientRect(),elem:b,isBelow:!1}));return!0}function u(p){if(!i.current)return!1;let[E]=Xe(p);if(E)return!1;let{dataTransfer:T,pageY:R,target:P}=p,D=T?.getData(tt)||"";return t.update(()=>{let b=Mo(D);if(!b||!Ce(P))return!1;let L=V(r,p.pageX,p.pageY,P,100,50),{blockElem:B,isFoundNodeEmptyParagraph:O}=U({anchorElem:e,editor:t,fuzzy:!0,horizontalOffset:-L,point:new I(p.x,p.y),useEdgeAsDefault:!0});if(!B)return!1;let w=Ze(B);if(!w)return!1;if(w===b)return!0;let{height:z,top:W}=G(B),he=R>=W+z/2+window.scrollY;O?(w.insertBefore(b),w.remove()):he?w.insertAfter(b):w.insertBefore(b),a!==null&&f(null),document.querySelectorAll(".lexical-block-highlighter").forEach(k=>{k.remove()});let oe=t.getElementByKey(b.getKey());setTimeout(()=>{let k=oe?.getBoundingClientRect();if(!k)return;let N=document.createElement("div");N.className="lexical-block-highlighter",N.style.backgroundColor="var(--theme-elevation-1000",N.style.transition="opacity 0.5s ease-in-out",N.style.zIndex="1",N.style.pointerEvents="none",N.style.boxSizing="border-box",N.style.borderRadius="4px",N.style.position="absolute",document.body.appendChild(N),N.style.opacity="0.1",N.style.height=`${k.height+8}px`,N.style.width=`${k.width+8}px`,N.style.top=`${k.top+window.scrollY-4}px`,N.style.left=`${k.left-4}px`,setTimeout(()=>{N.style.opacity="0",setTimeout(()=>{N.remove()},500)},1e3)},120)}),!0}return document.addEventListener("dragover",y),document.addEventListener("drop",u),()=>{document.removeEventListener("dragover",y),document.removeEventListener("drop",u)}},[r,h,e,t,m,a,s?.admin?.hideGutter]);function x(y){let u=y.dataTransfer;if(!u||!a)return;Bo(u,a);let p="";t.update(()=>{let E=Ze(a);E&&(p=E.getKey())}),i.current=!0,u.setData(tt,p)}function g(){i.current=!1,m?.elem&&nt(d.current,m?.elem)}return _o(Lo(rt.Fragment,{children:[fe("button",{"aria-label":"Drag to move",className:"icon draggable-block-menu",draggable:!0,onDragEnd:g,onDragStart:x,ref:n,type:"button",children:fe("div",{className:o?"icon":""})}),fe("div",{className:"draggable-block-target-line",ref:d}),fe("div",{className:"debug-highlight",ref:l})]}),e)}function it(t){let{anchorElem:e}=t,o=e===void 0?document.body:e,[r]=vo();return Oo(r,o,r._editable)}import{c as Io}from"react/compiler-runtime";import{jsx as Ne}from"react/jsx-runtime";import{useLexicalComposerContext as Fo}from"@lexical/react/LexicalComposerContext";import{$createParagraphNode as $o,$getRoot as Ko}from"lexical";import"react";var st="insert-paragraph-at-end",lt=()=>{let t=Io(2),[e]=Fo(),{editorConfig:o}=S();if(o?.admin?.hideInsertParagraphAtEnd)return null;let r;return t[0]!==e?(r=Ne("div",{"aria-label":"Insert Paragraph",className:st,onClick:()=>{e.update(Ho)},role:"button",tabIndex:0,children:Ne("div",{className:`${st}-inside`,children:Ne("span",{children:"+"})})}),t[0]=e,t[1]=r):r=t[1],r};function Ho(){let t=$o();Ko().append(t),t.select()}import{c as jo}from"react/compiler-runtime";import{useLexicalComposerContext as zo}from"@lexical/react/LexicalComposerContext";import*as at from"react";var ct=()=>{let t=jo(4),{editorConfig:e}=S(),[o]=zo(),r,n;return t[0]!==o||t[1]!==e.features.markdownTransformers?(r=()=>De(o,e.features.markdownTransformers??[]),n=[o,e.features.markdownTransformers],t[0]=o,t[1]=e.features.markdownTransformers,t[2]=r,t[3]=n):(r=t[2],n=t[3]),at.useEffect(r,n),null};import{useLexicalComposerContext as Wo}from"@lexical/react/LexicalComposerContext";import{$getSelection as Yo,$isRangeSelection as Vo,RootNode as Go}from"lexical";import{useEffect as Uo}from"react";function dt(){let[t]=Wo();return Uo(()=>t.registerNodeTransform(Go,e=>{let o=Yo();if(Vo(o)){let r=o.anchor.getNode(),n=o.focus.getNode();(!r.isAttached()||!n.isAttached())&&(e.selectEnd(),console.warn("updateEditor: selection has been moved to the end of the editor because the previously selected nodes have been removed and selection wasn't moved to another node. Ensure selection changes after removing/replacing a selected node."))}return!1}),[t]),null}import{useLexicalComposerContext as Jo}from"@lexical/react/LexicalComposerContext";import{$getSelection as qo,COMMAND_PRIORITY_LOW as Qo,SELECT_ALL_COMMAND as Xo}from"lexical";import{useEffect as Zo}from"react";function ut(){let[t]=Jo();return Zo(()=>t.registerCommand(Xo,()=>{if(qo())return!1;let o=document.activeElement;return o instanceof HTMLInputElement&&o.select(),!0},Qo),[t]),null}import{jsx as J,jsxs as mt}from"react/jsx-runtime";import{useLexicalComposerContext as tn}from"@lexical/react/LexicalComposerContext.js";import{useTranslation as pt}from"@payloadcms/ui";import{useCallback as on,useMemo as nn,useState as rn}from"react";import"react";import*as gt from"react-dom";import{c as en}from"react/compiler-runtime";import"react";function ft(t,e){let o=en(4),{maxLength:r,minLength:n}=e,d=r===void 0?75:r,l=n===void 0?1:n,i;return o[0]!==d||o[1]!==l||o[2]!==t?(i=a=>{let{query:f}=a,m="[^"+t+ve+"\\s]",s=new RegExp("(^|\\s|\\()(["+t+"]((?:"+m+"){0,"+d+"}))$").exec(f);if(s!==null){let h=s[1],x=s[3];if(x.length>=l)return{leadOffset:s.index+h.length,matchingString:x,replaceableString:s[2]}}return null},o[0]=d,o[1]=l,o[2]=t,o[3]=i):i=o[3],i}var _="slash-menu-popup";function sn({isSelected:t,item:e,onClick:o,onMouseEnter:r,ref:n}){let{fieldProps:{featureClientSchemaMap:d,schemaPath:l}}=S(),{i18n:i}=pt(),a=`${_}__item ${_}__item-${e.key}`;t&&(a+=` ${_}__item--selected`);let f=e.key;return e.label&&(f=typeof e.label=="function"?e.label({featureClientSchemaMap:d,i18n:i,schemaPath:l}):e.label),f.length>25&&(f=f.substring(0,25)+"..."),mt("button",{"aria-selected":t,className:a,id:_+"__item-"+e.key,onClick:o,onMouseEnter:r,ref:n,role:"option",tabIndex:-1,type:"button",children:[e?.Icon&&J(e.Icon,{}),J("span",{className:`${_}__item-text`,children:f})]},e.key)}function ht({anchorElem:t=document.body}){let[e]=tn(),[o,r]=rn(null),{editorConfig:n}=S(),{i18n:d}=pt(),{fieldProps:{featureClientSchemaMap:l,schemaPath:i}}=S(),a=ft("/",{minLength:0}),f=on(()=>{let c=[];for(let s of n.features.slashMenu.dynamicGroups)if(o){let h=s({editor:e,queryString:o});c=c.concat(h)}return c},[e,o,n?.features]),m=nn(()=>{let c=[];for(let s of n?.features.slashMenu.groups??[])c.push(s);if(o){c=c.map(h=>{let x=h.items.filter(g=>{let y=g.key;return g.label&&(y=typeof g.label=="function"?g.label({featureClientSchemaMap:l,i18n:d,schemaPath:i}):g.label),new RegExp(o,"gi").exec(y)?!0:g.keywords!=null?g.keywords.some(u=>new RegExp(o,"gi").exec(u)):!1});return x.length?{...h,items:x}:null}),c=c.filter(h=>h!=null);let s=f();for(let h of s){let x=c.find(g=>g.key===h.key);x?c=c.filter(g=>g.key!==h.key):x={...h,items:[]},x?.items?.length&&(x.items=x.items.concat(x.items)),c.push(x)}}return c},[o,n?.features.slashMenu.groups,f,l,d,i]);return J(_e,{anchorElem:t,groups:m,menuRenderFn:(c,{selectedItemKey:s,selectItemAndCleanUp:h,setSelectedItemKey:x})=>c.current&&m.length?gt.createPortal(J("div",{className:_,children:m.map(g=>{let y=g.key;return g.label&&l&&(y=typeof g.label=="function"?g.label({featureClientSchemaMap:l,i18n:d,schemaPath:i}):g.label),mt("div",{className:`${_}__group ${_}__group-${g.key}`,children:[J("div",{className:`${_}__group-title`,children:y}),g.items.map((u,p)=>J(sn,{index:p,isSelected:s===u.key,item:u,onClick:()=>{x(u.key),h(u)},onMouseEnter:()=>{x(u.key)},ref:E=>{u.ref={current:E}}},u.key))]},g.key)})}),c.current):null,onQueryChange:r,triggerFn:a})}import{c as ln}from"react/compiler-runtime";import{useLexicalComposerContext as an}from"@lexical/react/LexicalComposerContext";import{TEXT_TYPE_TO_FORMAT as cn,TextNode as dn}from"lexical";import{useEffect as un}from"react";function yt(t){let e=ln(6),{features:o}=t,[r]=an(),n;e[0]!==r||e[1]!==o.enabledFormats?(n=()=>{let l=fn(o.enabledFormats);if(l.length!==0)return r.registerNodeTransform(dn,i=>{l.forEach(a=>{i.hasFormat(a)&&i.toggleFormat(a)})})},e[0]=r,e[1]=o.enabledFormats,e[2]=n):n=e[2];let d;return e[3]!==r||e[4]!==o?(d=[r,o],e[3]=r,e[4]=o,e[5]=d):d=e[5],un(n,d),null}function fn(t){let e=Object.keys(cn),o=new Set(t);return e.filter(r=>!o.has(r))}import{c as mn}from"react/compiler-runtime";import{jsx as xt}from"react/jsx-runtime";import{useLexicalComposerContext as pn}from"@lexical/react/LexicalComposerContext";import{ContentEditable as gn}from"@lexical/react/LexicalContentEditable.js";import{useTranslation as hn}from"@payloadcms/ui";import"react";function Et(t){let e=mn(5),{className:o,editorConfig:r}=t,{t:n}=hn(),[,d]=pn(),{getTheme:l}=d,i;if(e[0]!==o||e[1]!==r?.admin?.placeholder||e[2]!==l||e[3]!==n){let a=l();i=xt(gn,{"aria-placeholder":n("lexical:general:placeholder"),className:o??"ContentEditable__root",placeholder:xt("p",{className:a?.placeholder,children:r?.admin?.placeholder??n("lexical:general:placeholder")})}),e[0]=o,e[1]=r?.admin?.placeholder,e[2]=l,e[3]=n,e[4]=i}else i=e[4];return i}var bt=t=>{let e=yn(13),{editorConfig:o,editorContainerRef:r,isSmallWidthViewport:n,onChange:d,rtl:l}=t,i=S(),[a]=xn(),f=Sn(),[m,c]=kn(null),s;e[0]===Symbol.for("react.memo_cache_sentinel")?(s=u=>{u!==null&&c(u)},e[0]=s):s=e[0];let h=s,x,g;e[1]!==a||e[2]!==i?(x=()=>{if(!i?.uuid){console.error("Lexical Editor must be used within an EditorConfigProvider");return}i?.parentEditor?.uuid&&i.parentEditor?.registerChild(i.uuid,i);let u=()=>{i.focusEditor(i)},p=()=>{i.blurEditor(i)},E=a.registerCommand(Rn,()=>(u(),!0),Ct),T=a.registerCommand(Pn,()=>(p(),!0),Ct);return()=>{E(),T(),i.parentEditor?.unregisterChild?.(i.uuid)}},g=[a,i],e[1]=a,e[2]=i,e[3]=x,e[4]=g):(x=e[3],g=e[4]),wn(x,g);let y;return e[5]!==o||e[6]!==r||e[7]!==m||e[8]!==f||e[9]!==n||e[10]!==d||e[11]!==l?(y=te(q.Fragment,{children:[o.features.plugins?.map(Tn),te("div",{className:"editor-container",dir:l?"rtl":void 0,ref:r,children:[o.features.plugins?.map(Dn),C(Nn,{contentEditable:C("div",{className:"editor-scroller",children:C("div",{className:"editor",ref:h,children:C(Et,{editorConfig:o})})}),ErrorBoundary:En}),C(dt,{}),f&&C(lt,{}),C(je,{}),C($e,{}),C(yt,{features:o.features}),C(ut,{}),f&&C(bn,{ignoreSelectionChange:!0,onChange:(u,p,E)=>{(!E.has("focus")||E.size>1)&&d?.(u,p,E)}}),m&&te(q.Fragment,{children:[!n&&f&&te(q.Fragment,{children:[o.admin?.hideDraggableBlockElement?null:C(it,{anchorElem:m}),o.admin?.hideAddBlockButton?null:C(Je,{anchorElem:m})]}),o.features.plugins?.map(u=>{if(u.position==="floatingAnchorElem"&&!(u.desktopOnly===!0&&n))return C($,{anchorElem:m,clientProps:u.clientProps,plugin:u},u.key)}),f&&C(q.Fragment,{children:C(ht,{anchorElem:m})})]}),f&&te(q.Fragment,{children:[C(Cn,{}),o?.features?.markdownTransformers?.length>0&&C(ct,{})]}),o.features.plugins?.map(Ln),o.features.plugins?.map(vn)]}),o.features.plugins?.map(Mn)]}),e[5]=o,e[6]=r,e[7]=m,e[8]=f,e[9]=n,e[10]=d,e[11]=l,e[12]=y):y=e[12],y};function Tn(t){if(t.position==="aboveContainer")return C($,{clientProps:t.clientProps,plugin:t},t.key)}function Dn(t){if(t.position==="top")return C($,{clientProps:t.clientProps,plugin:t},t.key)}function Ln(t){if(t.position==="normal")return C($,{clientProps:t.clientProps,plugin:t},t.key)}function vn(t){if(t.position==="bottom")return C($,{clientProps:t.clientProps,plugin:t},t.key)}function Mn(t){if(t.position==="belowContainer")return C($,{clientProps:t.clientProps,plugin:t},t.key)}var St=({children:t,providers:e})=>{if(!e?.length)return t;let o=e[0];return e.length>1?F(o,{children:F(St,{providers:e.slice(1),children:t})}):F(o,{children:t})},Pt=t=>{let{composerKey:e,editorConfig:o,fieldProps:r,isSmallWidthViewport:n,onChange:d,readOnly:l,rtl:i,value:a}=t,f=S(),m=An(),c=Nt.useRef(null),s=Bn(()=>{if(a&&typeof a!="object")throw new Error("The value passed to the Lexical editor is not an object. This is not supported. Please remove the data from the field and start again. This is the value that was passed in: "+JSON.stringify(a));if(a&&Array.isArray(a)&&!("root"in a))throw new Error("You have tried to pass in data from the old Slate editor to the new Lexical editor. The data structure is different, thus you will have to migrate your data. We offer a one-line migration script which migrates all your rich text fields: https://payloadcms.com/docs/lexical/migration#migration-via-migration-script-recommended");if(a&&"jsonContent"in a)throw new Error("You have tried to pass in data from payload-plugin-lexical. The data structure is different, thus you will have to migrate your data. Migration guide: https://payloadcms.com/docs/lexical/migration#migrating-from-payload-plugin-lexical");return{editable:l!==!0,editorState:a!=null?JSON.stringify(a):void 0,namespace:o.lexical.namespace,nodes:Be({editorConfig:o}),onError:h=>{throw h},theme:o.lexical.theme}},[o]);return s?F(_n,{initialConfig:s,children:F(Te,{editorConfig:o,editorContainerRef:c,fieldProps:r,parentContext:f?.editDepth===m?f:void 0,children:F(St,{providers:o.features.providers,children:F(bt,{editorConfig:o,editorContainerRef:c,isSmallWidthViewport:n,onChange:d,rtl:i})})})},e+s.editable):F("p",{children:"Loading..."})};var pe="rich-text-lexical",qn=t=>{let{editorConfig:e,field:o,field:{admin:{className:r,description:n,readOnly:d}={},label:l,localized:i,required:a},path:f,readOnly:m,validate:c}=t,s=m||d,h=Yn(),{config:{localization:x}}=Hn(),g=Kn({fieldLocalized:i,locale:h,localizationConfig:x||void 0}),y=jn(),u=kt((v,Q)=>typeof c=="function"?c(v,{...Q,required:a}):!0,[c,a]),{customComponents:{AfterInput:p,BeforeInput:E,Description:T,Error:R,Label:P}={},disabled:D,initialValue:b,path:L,setValue:B,showError:O,value:w}=Wn({potentiallyStalePath:f,validate:u}),z=s||D,[W,Se]=Dt(!1),[he,Pe]=Dt(),oe=wt.useRef(b),k=wt.useRef(w);Tt(()=>{let v=()=>{let Q=window.matchMedia("(max-width: 768px)").matches;Q!==W&&Se(Q)};return v(),window.addEventListener("resize",v),()=>{window.removeEventListener("resize",v)}},[W]);let N=[pe,"field-type",r,O&&"error",z&&`${pe}--read-only`,e?.admin?.hideGutter!==!0&&!W?`${pe}--show-gutter`:null].filter(Boolean).join(" "),Re=`${L}.${y}`,we=Le(),Lt=kt(v=>{we(()=>{let ke=v.toJSON();k.current=ke,B(ke)})},[B,we]),vt=Un(()=>Vn(o),[o]),Mt=zn(v=>{k.current!==w&&!Gn(k.current!=null?JSON.parse(JSON.stringify(k.current)):k.current,w)&&(oe.current=v,k.current=w,Pe(new Date))});return Tt(()=>{Object.is(b,oe.current)||Mt(b)},[b]),ge("div",{className:N,style:vt,children:[A(Rt,{CustomComponent:R,Fallback:A(Fn,{path:L,showError:O})}),P||A($n,{label:l,localized:i,path:L,required:a}),ge("div",{className:`${pe}__wrap`,children:[ge(Jn,{fallbackRender:Qn,onReset:()=>{},children:[E,A(On,{drawerSlugPrefix:L,children:A(Pt,{composerKey:Re,editorConfig:e,fieldProps:t,isSmallWidthViewport:W,onChange:Lt,readOnly:z,rtl:g,value:w},JSON.stringify({path:L,rerenderProviderKey:he}))}),p]}),A(Rt,{CustomComponent:T,Fallback:A(In,{description:n,path:L})})]})]},Re)};function Qn({error:t}){return ge("div",{className:"errorBoundary",role:"alert",children:[A("p",{children:"Something went wrong:"}),A("pre",{style:{color:"red"},children:t.message})]})}var Ws=qn;export{Ws as RichText};
|
|
2
|
+
//# sourceMappingURL=Field-OIMYWB22.js.map
|