@payloadcms/richtext-lexical 3.0.0-beta.5 → 3.0.0-beta.50
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/README.md +1 -1
- package/dist/cell/index.d.ts +5 -2
- package/dist/cell/index.d.ts.map +1 -1
- package/dist/cell/index.js +45 -31
- package/dist/cell/index.js.map +1 -1
- package/dist/exports/client/Component-6AVANNNR.js +2 -0
- package/dist/exports/client/Component-6AVANNNR.js.map +7 -0
- package/dist/exports/client/Component-SZVAYRJX.js +2 -0
- package/dist/exports/client/Component-SZVAYRJX.js.map +7 -0
- package/dist/exports/client/Field-U5PHZTST.js +2 -0
- package/dist/exports/client/Field-U5PHZTST.js.map +7 -0
- package/dist/exports/client/RelationshipComponent-FGUPLCD2.js +2 -0
- package/dist/exports/client/RelationshipComponent-FGUPLCD2.js.map +7 -0
- package/dist/exports/client/bundled.css +1 -0
- package/dist/exports/client/chunk-35NZOHAF.js +2 -0
- package/dist/exports/client/chunk-35NZOHAF.js.map +7 -0
- package/dist/exports/client/chunk-3PZ2ZFQG.js +3 -0
- package/dist/exports/client/chunk-3PZ2ZFQG.js.map +7 -0
- package/dist/exports/client/chunk-FSTRW2TI.js +2 -0
- package/dist/exports/client/chunk-FSTRW2TI.js.map +7 -0
- package/dist/exports/client/chunk-M6MN4CA5.js +2 -0
- package/dist/exports/client/chunk-M6MN4CA5.js.map +7 -0
- package/dist/exports/client/chunk-Y5455JF3.js +2 -0
- package/dist/exports/client/chunk-Y5455JF3.js.map +7 -0
- package/dist/exports/client/component-FFLILIUZ.js +2 -0
- package/dist/exports/client/component-FFLILIUZ.js.map +7 -0
- package/dist/exports/client/component-RAVN56DE.js +2 -0
- package/dist/exports/client/component-RAVN56DE.js.map +7 -0
- package/dist/exports/client/component-Z34HXRX3.js +2 -0
- package/dist/exports/client/component-Z34HXRX3.js.map +7 -0
- package/dist/exports/client/index.d.ts +52 -0
- package/dist/exports/client/index.d.ts.map +1 -0
- package/dist/exports/client/index.js +36 -0
- package/dist/exports/client/index.js.map +7 -0
- package/dist/field/Field.d.ts +1 -2
- package/dist/field/Field.d.ts.map +1 -1
- package/dist/field/Field.js +69 -55
- package/dist/field/Field.js.map +1 -1
- package/dist/field/bundled.css +0 -0
- package/dist/field/features/align/feature.client.d.ts +4 -1
- package/dist/field/features/align/feature.client.d.ts.map +1 -1
- package/dist/field/features/align/feature.client.js +135 -54
- package/dist/field/features/align/feature.client.js.map +1 -1
- package/dist/field/features/align/feature.server.d.ts.map +1 -1
- package/dist/field/features/align/feature.server.js +4 -1
- package/dist/field/features/align/feature.server.js.map +1 -1
- package/dist/field/features/align/i18n.d.ts +3 -0
- package/dist/field/features/align/i18n.d.ts.map +1 -0
- package/dist/field/features/align/i18n.js +196 -0
- package/dist/field/features/align/i18n.js.map +1 -0
- package/dist/field/features/align/toolbarAlignGroup.d.ts +3 -0
- package/dist/field/features/align/toolbarAlignGroup.d.ts.map +1 -0
- package/dist/field/features/align/toolbarAlignGroup.js +12 -0
- package/dist/field/features/align/toolbarAlignGroup.js.map +1 -0
- package/dist/field/features/blockquote/feature.client.d.ts +4 -1
- package/dist/field/features/blockquote/feature.client.d.ts.map +1 -1
- package/dist/field/features/blockquote/feature.client.js +60 -46
- package/dist/field/features/blockquote/feature.client.js.map +1 -1
- package/dist/field/features/blockquote/feature.server.d.ts +1 -1
- package/dist/field/features/blockquote/feature.server.d.ts.map +1 -1
- package/dist/field/features/blockquote/feature.server.js +10 -7
- package/dist/field/features/blockquote/feature.server.js.map +1 -1
- package/dist/field/features/blockquote/i18n.d.ts +3 -0
- package/dist/field/features/blockquote/i18n.d.ts.map +1 -0
- package/dist/field/features/blockquote/i18n.js +100 -0
- package/dist/field/features/blockquote/i18n.js.map +1 -0
- package/dist/field/features/blockquote/markdownTransformer.d.ts.map +1 -1
- package/dist/field/features/blockquote/markdownTransformer.js +2 -4
- package/dist/field/features/blockquote/markdownTransformer.js.map +1 -1
- package/dist/field/features/blocks/component/BlockContent.d.ts.map +1 -1
- package/dist/field/features/blocks/component/BlockContent.js +77 -67
- package/dist/field/features/blocks/component/BlockContent.js.map +1 -1
- package/dist/field/features/blocks/component/FormSavePlugin.d.ts +1 -2
- package/dist/field/features/blocks/component/FormSavePlugin.d.ts.map +1 -1
- package/dist/field/features/blocks/component/FormSavePlugin.js +2 -2
- package/dist/field/features/blocks/component/FormSavePlugin.js.map +1 -1
- package/dist/field/features/blocks/component/index.d.ts +0 -1
- package/dist/field/features/blocks/component/index.d.ts.map +1 -1
- package/dist/field/features/blocks/component/index.js +60 -30
- package/dist/field/features/blocks/component/index.js.map +1 -1
- package/dist/field/features/blocks/component/removeEmptyArrayValues.d.ts +1 -1
- package/dist/field/features/blocks/component/removeEmptyArrayValues.d.ts.map +1 -1
- package/dist/field/features/blocks/component/removeEmptyArrayValues.js.map +1 -1
- package/dist/field/features/blocks/drawer/index.d.ts.map +1 -1
- package/dist/field/features/blocks/drawer/index.js +5 -11
- package/dist/field/features/blocks/drawer/index.js.map +1 -1
- package/dist/field/features/blocks/feature.client.d.ts +4 -1
- package/dist/field/features/blocks/feature.client.d.ts.map +1 -1
- package/dist/field/features/blocks/feature.client.js +58 -27
- package/dist/field/features/blocks/feature.client.js.map +1 -1
- package/dist/field/features/blocks/feature.server.d.ts +2 -5
- package/dist/field/features/blocks/feature.server.d.ts.map +1 -1
- package/dist/field/features/blocks/feature.server.js +62 -82
- package/dist/field/features/blocks/feature.server.js.map +1 -1
- package/dist/field/features/blocks/{populationPromise.d.ts → graphQLPopulationPromise.d.ts} +1 -1
- package/dist/field/features/blocks/graphQLPopulationPromise.d.ts.map +1 -0
- package/dist/field/features/blocks/graphQLPopulationPromise.js +31 -0
- package/dist/field/features/blocks/graphQLPopulationPromise.js.map +1 -0
- package/dist/field/features/blocks/i18n.d.ts +3 -0
- package/dist/field/features/blocks/i18n.d.ts.map +1 -0
- package/dist/field/features/blocks/i18n.js +100 -0
- package/dist/field/features/blocks/i18n.js.map +1 -0
- package/dist/field/features/blocks/nodes/BlocksNode.d.ts +2 -4
- package/dist/field/features/blocks/nodes/BlocksNode.d.ts.map +1 -1
- package/dist/field/features/blocks/nodes/BlocksNode.js +3 -3
- package/dist/field/features/blocks/nodes/BlocksNode.js.map +1 -1
- package/dist/field/features/blocks/plugin/commands.d.ts.map +1 -1
- package/dist/field/features/blocks/plugin/commands.js +1 -2
- package/dist/field/features/blocks/plugin/commands.js.map +1 -1
- package/dist/field/features/blocks/plugin/index.d.ts +3 -2
- package/dist/field/features/blocks/plugin/index.d.ts.map +1 -1
- package/dist/field/features/blocks/plugin/index.js +10 -11
- package/dist/field/features/blocks/plugin/index.js.map +1 -1
- package/dist/field/features/blocks/validate.d.ts.map +1 -1
- package/dist/field/features/blocks/validate.js +22 -36
- package/dist/field/features/blocks/validate.js.map +1 -1
- package/dist/field/features/converters/html/field/index.d.ts +14 -2
- package/dist/field/features/converters/html/field/index.d.ts.map +1 -1
- package/dist/field/features/converters/html/field/index.js +97 -57
- package/dist/field/features/converters/html/field/index.js.map +1 -1
- package/dist/field/features/createFeaturePropComponent.d.ts.map +1 -1
- package/dist/field/features/createFeaturePropComponent.js +6 -3
- package/dist/field/features/createFeaturePropComponent.js.map +1 -1
- package/dist/field/features/debug/{testrecorder → testRecorder}/feature.client.d.ts +4 -1
- package/dist/field/features/debug/testRecorder/feature.client.d.ts.map +1 -0
- package/dist/field/features/debug/{testrecorder → testRecorder}/feature.client.js.map +1 -1
- package/dist/field/features/debug/testRecorder/feature.server.d.ts.map +1 -0
- package/dist/field/features/debug/{testrecorder → testRecorder}/feature.server.js +3 -2
- package/dist/field/features/debug/testRecorder/feature.server.js.map +1 -0
- package/dist/field/features/debug/testRecorder/plugin/index.d.ts +5 -0
- package/dist/field/features/debug/testRecorder/plugin/index.d.ts.map +1 -0
- package/dist/field/features/debug/{testrecorder → testRecorder}/plugin/index.js +68 -45
- package/dist/field/features/debug/testRecorder/plugin/index.js.map +1 -0
- package/dist/field/features/debug/{treeview → treeView}/feature.client.d.ts +4 -1
- package/dist/field/features/debug/treeView/feature.client.d.ts.map +1 -0
- package/dist/field/features/debug/{treeview → treeView}/feature.client.js.map +1 -1
- package/dist/field/features/debug/treeView/feature.server.d.ts.map +1 -0
- package/dist/field/features/debug/{treeview → treeView}/feature.server.js +3 -2
- package/dist/field/features/debug/treeView/feature.server.js.map +1 -0
- package/dist/field/features/debug/treeView/plugin/index.d.ts +4 -0
- package/dist/field/features/debug/treeView/plugin/index.d.ts.map +1 -0
- package/dist/field/features/debug/{treeview → treeView}/plugin/index.js +6 -8
- package/dist/field/features/debug/treeView/plugin/index.js.map +1 -0
- package/dist/field/features/format/bold/feature.client.d.ts +4 -1
- package/dist/field/features/format/bold/feature.client.d.ts.map +1 -1
- package/dist/field/features/format/bold/feature.client.js +26 -23
- package/dist/field/features/format/bold/feature.client.js.map +1 -1
- package/dist/field/features/format/bold/feature.server.d.ts.map +1 -1
- package/dist/field/features/format/bold/feature.server.js +2 -1
- package/dist/field/features/format/bold/feature.server.js.map +1 -1
- package/dist/field/features/format/{inlinecode → inlineCode}/feature.client.d.ts +4 -1
- package/dist/field/features/format/inlineCode/feature.client.d.ts.map +1 -0
- package/dist/field/features/format/inlineCode/feature.client.js +46 -0
- package/dist/field/features/format/inlineCode/feature.client.js.map +1 -0
- package/dist/field/features/format/inlineCode/feature.server.d.ts.map +1 -0
- package/dist/field/features/format/{inlinecode → inlineCode}/feature.server.js +3 -2
- package/dist/field/features/format/inlineCode/feature.server.js.map +1 -0
- package/dist/field/features/format/{inlinecode → inlineCode}/markdownTransformers.d.ts.map +1 -1
- package/dist/field/features/format/{inlinecode → inlineCode}/markdownTransformers.js.map +1 -1
- package/dist/field/features/format/italic/feature.client.d.ts +4 -1
- package/dist/field/features/format/italic/feature.client.d.ts.map +1 -1
- package/dist/field/features/format/italic/feature.client.js +27 -24
- package/dist/field/features/format/italic/feature.client.js.map +1 -1
- package/dist/field/features/format/italic/feature.server.d.ts.map +1 -1
- package/dist/field/features/format/italic/feature.server.js +2 -1
- package/dist/field/features/format/italic/feature.server.js.map +1 -1
- package/dist/field/features/format/shared/toolbarFormatGroup.d.ts +3 -0
- package/dist/field/features/format/shared/toolbarFormatGroup.d.ts.map +1 -0
- package/dist/field/features/format/shared/toolbarFormatGroup.js +10 -0
- package/dist/field/features/format/shared/toolbarFormatGroup.js.map +1 -0
- package/dist/field/features/format/strikethrough/feature.client.d.ts +4 -1
- package/dist/field/features/format/strikethrough/feature.client.d.ts.map +1 -1
- package/dist/field/features/format/strikethrough/feature.client.js +27 -24
- package/dist/field/features/format/strikethrough/feature.client.js.map +1 -1
- package/dist/field/features/format/strikethrough/feature.server.d.ts.map +1 -1
- package/dist/field/features/format/strikethrough/feature.server.js +2 -1
- package/dist/field/features/format/strikethrough/feature.server.js.map +1 -1
- package/dist/field/features/format/subscript/feature.client.d.ts +4 -1
- package/dist/field/features/format/subscript/feature.client.d.ts.map +1 -1
- package/dist/field/features/format/subscript/feature.client.js +25 -22
- package/dist/field/features/format/subscript/feature.client.js.map +1 -1
- package/dist/field/features/format/subscript/feature.server.d.ts.map +1 -1
- package/dist/field/features/format/subscript/feature.server.js +2 -1
- package/dist/field/features/format/subscript/feature.server.js.map +1 -1
- package/dist/field/features/format/superscript/feature.client.d.ts +4 -1
- package/dist/field/features/format/superscript/feature.client.d.ts.map +1 -1
- package/dist/field/features/format/superscript/feature.client.js +25 -22
- package/dist/field/features/format/superscript/feature.client.js.map +1 -1
- package/dist/field/features/format/superscript/feature.server.d.ts.map +1 -1
- package/dist/field/features/format/superscript/feature.server.js +2 -1
- package/dist/field/features/format/superscript/feature.server.js.map +1 -1
- package/dist/field/features/format/underline/feature.client.d.ts +4 -1
- package/dist/field/features/format/underline/feature.client.d.ts.map +1 -1
- package/dist/field/features/format/underline/feature.client.js +25 -22
- package/dist/field/features/format/underline/feature.client.js.map +1 -1
- package/dist/field/features/format/underline/feature.server.d.ts.map +1 -1
- package/dist/field/features/format/underline/feature.server.js +2 -1
- package/dist/field/features/format/underline/feature.server.js.map +1 -1
- package/dist/field/features/heading/feature.client.d.ts +4 -1
- package/dist/field/features/heading/feature.client.d.ts.map +1 -1
- package/dist/field/features/heading/feature.client.js +75 -54
- package/dist/field/features/heading/feature.client.js.map +1 -1
- package/dist/field/features/heading/feature.server.d.ts.map +1 -1
- package/dist/field/features/heading/feature.server.js +9 -6
- package/dist/field/features/heading/feature.server.js.map +1 -1
- package/dist/field/features/heading/i18n.d.ts +3 -0
- package/dist/field/features/heading/i18n.d.ts.map +1 -0
- package/dist/field/features/heading/i18n.js +100 -0
- package/dist/field/features/heading/i18n.js.map +1 -0
- package/dist/field/features/heading/markdownTransformer.d.ts.map +1 -1
- package/dist/field/features/heading/markdownTransformer.js +1 -2
- package/dist/field/features/heading/markdownTransformer.js.map +1 -1
- package/dist/field/features/horizontalRule/component/index.d.ts +10 -0
- package/dist/field/features/horizontalRule/component/index.d.ts.map +1 -0
- package/dist/field/features/horizontalRule/component/index.js +67 -0
- package/dist/field/features/horizontalRule/component/index.js.map +1 -0
- package/dist/field/features/horizontalRule/feature.client.d.ts +6 -0
- package/dist/field/features/horizontalRule/feature.client.d.ts.map +1 -0
- package/dist/field/features/horizontalRule/feature.client.js +77 -0
- package/dist/field/features/horizontalRule/feature.client.js.map +1 -0
- package/dist/field/features/horizontalRule/feature.server.d.ts +3 -0
- package/dist/field/features/horizontalRule/feature.server.d.ts.map +1 -0
- package/dist/field/features/horizontalRule/feature.server.js +39 -0
- package/dist/field/features/horizontalRule/feature.server.js.map +1 -0
- package/dist/field/features/horizontalRule/i18n.d.ts +3 -0
- package/dist/field/features/horizontalRule/i18n.d.ts.map +1 -0
- package/dist/field/features/horizontalRule/i18n.js +100 -0
- package/dist/field/features/horizontalRule/i18n.js.map +1 -0
- package/dist/field/features/horizontalRule/markdownTransformer.d.ts +3 -0
- package/dist/field/features/horizontalRule/markdownTransformer.d.ts.map +1 -0
- package/dist/field/features/horizontalRule/markdownTransformer.js +23 -0
- package/dist/field/features/horizontalRule/markdownTransformer.js.map +1 -0
- package/dist/field/features/horizontalRule/nodes/HorizontalRuleNode.d.ts +53 -0
- package/dist/field/features/horizontalRule/nodes/HorizontalRuleNode.d.ts.map +1 -0
- package/dist/field/features/horizontalRule/nodes/HorizontalRuleNode.js +92 -0
- package/dist/field/features/horizontalRule/nodes/HorizontalRuleNode.js.map +1 -0
- package/dist/field/features/horizontalRule/plugin/index.d.ts +7 -0
- package/dist/field/features/horizontalRule/plugin/index.d.ts.map +1 -0
- package/dist/field/features/horizontalRule/plugin/index.js +30 -0
- package/dist/field/features/horizontalRule/plugin/index.js.map +1 -0
- package/dist/field/features/indent/feature.client.d.ts +4 -1
- package/dist/field/features/indent/feature.client.d.ts.map +1 -1
- package/dist/field/features/indent/feature.client.js +47 -42
- package/dist/field/features/indent/feature.client.js.map +1 -1
- package/dist/field/features/indent/feature.server.d.ts.map +1 -1
- package/dist/field/features/indent/feature.server.js +4 -1
- package/dist/field/features/indent/feature.server.js.map +1 -1
- package/dist/field/features/indent/i18n.d.ts +3 -0
- package/dist/field/features/indent/i18n.d.ts.map +1 -0
- package/dist/field/features/indent/i18n.js +132 -0
- package/dist/field/features/indent/i18n.js.map +1 -0
- package/dist/field/features/indent/toolbarIndentGroup.d.ts +3 -0
- package/dist/field/features/indent/toolbarIndentGroup.d.ts.map +1 -0
- package/dist/field/features/indent/toolbarIndentGroup.js +10 -0
- package/dist/field/features/indent/toolbarIndentGroup.js.map +1 -0
- package/dist/field/features/link/drawer/baseFields.d.ts +2 -3
- package/dist/field/features/link/drawer/baseFields.d.ts.map +1 -1
- package/dist/field/features/link/drawer/baseFields.js +30 -43
- package/dist/field/features/link/drawer/baseFields.js.map +1 -1
- package/dist/field/features/link/drawer/index.d.ts.map +1 -1
- package/dist/field/features/link/drawer/index.js +32 -31
- package/dist/field/features/link/drawer/index.js.map +1 -1
- package/dist/field/features/link/drawer/types.d.ts +5 -3
- package/dist/field/features/link/drawer/types.d.ts.map +1 -1
- package/dist/field/features/link/drawer/types.js.map +1 -1
- package/dist/field/features/link/feature.client.d.ts +13 -1
- package/dist/field/features/link/feature.client.d.ts.map +1 -1
- package/dist/field/features/link/feature.client.js +65 -47
- package/dist/field/features/link/feature.client.js.map +1 -1
- package/dist/field/features/link/feature.server.d.ts +10 -6
- package/dist/field/features/link/feature.server.d.ts.map +1 -1
- package/dist/field/features/link/feature.server.js +66 -17
- package/dist/field/features/link/feature.server.js.map +1 -1
- package/dist/field/features/link/{populationPromise.d.ts → graphQLPopulationPromise.d.ts} +1 -1
- package/dist/field/features/link/graphQLPopulationPromise.d.ts.map +1 -0
- package/dist/field/features/link/graphQLPopulationPromise.js +31 -0
- package/dist/field/features/link/graphQLPopulationPromise.js.map +1 -0
- package/dist/field/features/link/i18n.d.ts +3 -0
- package/dist/field/features/link/i18n.d.ts.map +1 -0
- package/dist/field/features/link/i18n.js +100 -0
- package/dist/field/features/link/i18n.js.map +1 -0
- package/dist/field/features/link/markdownTransformer.d.ts +6 -0
- package/dist/field/features/link/markdownTransformer.d.ts.map +1 -0
- package/dist/field/features/link/markdownTransformer.js +50 -0
- package/dist/field/features/link/markdownTransformer.js.map +1 -0
- package/dist/field/features/link/nodes/AutoLinkNode.d.ts.map +1 -1
- package/dist/field/features/link/nodes/AutoLinkNode.js +3 -2
- package/dist/field/features/link/nodes/AutoLinkNode.js.map +1 -1
- package/dist/field/features/link/nodes/LinkNode.d.ts +9 -8
- package/dist/field/features/link/nodes/LinkNode.d.ts.map +1 -1
- package/dist/field/features/link/nodes/LinkNode.js +28 -11
- package/dist/field/features/link/nodes/LinkNode.js.map +1 -1
- package/dist/field/features/link/nodes/types.d.ts +2 -1
- package/dist/field/features/link/nodes/types.d.ts.map +1 -1
- package/dist/field/features/link/nodes/types.js.map +1 -1
- package/dist/field/features/link/plugins/autoLink/index.d.ts +3 -2
- package/dist/field/features/link/plugins/autoLink/index.d.ts.map +1 -1
- package/dist/field/features/link/plugins/autoLink/index.js +11 -12
- package/dist/field/features/link/plugins/autoLink/index.js.map +1 -1
- package/dist/field/features/link/plugins/clickableLink/index.d.ts +3 -2
- package/dist/field/features/link/plugins/clickableLink/index.d.ts.map +1 -1
- package/dist/field/features/link/plugins/clickableLink/index.js +5 -6
- package/dist/field/features/link/plugins/clickableLink/index.js.map +1 -1
- package/dist/field/features/link/plugins/floatingLinkEditor/LinkEditor/commands.d.ts.map +1 -1
- package/dist/field/features/link/plugins/floatingLinkEditor/LinkEditor/commands.js +1 -2
- package/dist/field/features/link/plugins/floatingLinkEditor/LinkEditor/commands.js.map +1 -1
- package/dist/field/features/link/plugins/floatingLinkEditor/LinkEditor/index.d.ts.map +1 -1
- package/dist/field/features/link/plugins/floatingLinkEditor/LinkEditor/index.js +179 -143
- package/dist/field/features/link/plugins/floatingLinkEditor/LinkEditor/index.js.map +1 -1
- package/dist/field/features/link/plugins/floatingLinkEditor/index.d.ts +3 -4
- package/dist/field/features/link/plugins/floatingLinkEditor/index.d.ts.map +1 -1
- package/dist/field/features/link/plugins/floatingLinkEditor/index.js +2 -2
- package/dist/field/features/link/plugins/floatingLinkEditor/index.js.map +1 -1
- package/dist/field/features/link/plugins/floatingLinkEditor/utilities.d.ts +3 -6
- package/dist/field/features/link/plugins/floatingLinkEditor/utilities.d.ts.map +1 -1
- package/dist/field/features/link/plugins/floatingLinkEditor/utilities.js +12 -30
- package/dist/field/features/link/plugins/floatingLinkEditor/utilities.js.map +1 -1
- package/dist/field/features/link/plugins/link/index.d.ts +3 -1
- package/dist/field/features/link/plugins/link/index.d.ts.map +1 -1
- package/dist/field/features/link/plugins/link/index.js +7 -16
- package/dist/field/features/link/plugins/link/index.js.map +1 -1
- package/dist/field/features/link/validate.d.ts +6 -0
- package/dist/field/features/link/validate.d.ts.map +1 -0
- package/dist/field/features/link/validate.js +28 -0
- package/dist/field/features/link/validate.js.map +1 -0
- package/dist/field/features/lists/checklist/feature.client.d.ts +4 -1
- package/dist/field/features/lists/checklist/feature.client.d.ts.map +1 -1
- package/dist/field/features/lists/checklist/feature.client.js +69 -44
- package/dist/field/features/lists/checklist/feature.client.js.map +1 -1
- package/dist/field/features/lists/checklist/feature.server.d.ts +1 -1
- package/dist/field/features/lists/checklist/feature.server.d.ts.map +1 -1
- package/dist/field/features/lists/checklist/feature.server.js +13 -10
- package/dist/field/features/lists/checklist/feature.server.js.map +1 -1
- package/dist/field/features/lists/checklist/i18n.d.ts +3 -0
- package/dist/field/features/lists/checklist/i18n.d.ts.map +1 -0
- package/dist/field/features/lists/checklist/i18n.js +100 -0
- package/dist/field/features/lists/checklist/i18n.js.map +1 -0
- package/dist/field/features/lists/checklist/markdownTransformers.d.ts.map +1 -1
- package/dist/field/features/lists/checklist/markdownTransformers.js +2 -3
- package/dist/field/features/lists/checklist/markdownTransformers.js.map +1 -1
- package/dist/field/features/lists/checklist/plugin/index.d.ts +2 -2
- package/dist/field/features/lists/checklist/plugin/index.d.ts.map +1 -1
- package/dist/field/features/lists/checklist/plugin/index.js +5 -5
- package/dist/field/features/lists/checklist/plugin/index.js.map +1 -1
- package/dist/field/features/lists/htmlConverter.d.ts.map +1 -1
- package/dist/field/features/lists/htmlConverter.js +13 -6
- package/dist/field/features/lists/htmlConverter.js.map +1 -1
- package/dist/field/features/lists/{orderedlist → orderedList}/feature.client.d.ts +4 -1
- package/dist/field/features/lists/orderedList/feature.client.d.ts.map +1 -0
- package/dist/field/features/lists/orderedList/feature.client.js +97 -0
- package/dist/field/features/lists/orderedList/feature.client.js.map +1 -0
- package/dist/field/features/lists/orderedList/feature.server.d.ts.map +1 -0
- package/dist/field/features/lists/{orderedlist → orderedList}/feature.server.js +12 -9
- package/dist/field/features/lists/orderedList/feature.server.js.map +1 -0
- package/dist/field/features/lists/orderedList/i18n.d.ts +3 -0
- package/dist/field/features/lists/orderedList/i18n.d.ts.map +1 -0
- package/dist/field/features/lists/orderedList/i18n.js +100 -0
- package/dist/field/features/lists/orderedList/i18n.js.map +1 -0
- package/dist/field/features/lists/orderedList/markdownTransformer.d.ts.map +1 -0
- package/dist/field/features/lists/{orderedlist → orderedList}/markdownTransformer.js +2 -3
- package/dist/field/features/lists/orderedList/markdownTransformer.js.map +1 -0
- package/dist/field/features/lists/plugin/index.d.ts +2 -2
- package/dist/field/features/lists/plugin/index.d.ts.map +1 -1
- package/dist/field/features/lists/plugin/index.js +5 -5
- package/dist/field/features/lists/plugin/index.js.map +1 -1
- package/dist/field/features/lists/{common → shared}/markdown.d.ts.map +1 -1
- package/dist/field/features/lists/{common → shared}/markdown.js +1 -2
- package/dist/field/features/lists/shared/markdown.js.map +1 -0
- package/dist/field/features/lists/shared/slashMenuListGroup.d.ts +3 -0
- package/dist/field/features/lists/shared/slashMenuListGroup.d.ts.map +1 -0
- package/dist/field/features/lists/shared/slashMenuListGroup.js +11 -0
- package/dist/field/features/lists/shared/slashMenuListGroup.js.map +1 -0
- package/dist/field/features/lists/{unorderedlist → unorderedList}/feature.client.d.ts +4 -1
- package/dist/field/features/lists/unorderedList/feature.client.d.ts.map +1 -0
- package/dist/field/features/lists/unorderedList/feature.client.js +97 -0
- package/dist/field/features/lists/unorderedList/feature.client.js.map +1 -0
- package/dist/field/features/lists/unorderedList/feature.server.d.ts.map +1 -0
- package/dist/field/features/lists/{unorderedlist → unorderedList}/feature.server.js +11 -8
- package/dist/field/features/lists/unorderedList/feature.server.js.map +1 -0
- package/dist/field/features/lists/unorderedList/i18n.d.ts +3 -0
- package/dist/field/features/lists/unorderedList/i18n.d.ts.map +1 -0
- package/dist/field/features/lists/unorderedList/i18n.js +100 -0
- package/dist/field/features/lists/unorderedList/i18n.js.map +1 -0
- package/dist/field/features/lists/unorderedList/markdownTransformer.d.ts.map +1 -0
- package/dist/field/features/lists/{unorderedlist → unorderedList}/markdownTransformer.js +2 -3
- package/dist/field/features/lists/unorderedList/markdownTransformer.js.map +1 -0
- package/dist/field/features/migrations/lexicalPluginToLexical/converter/converters/upload/converter.d.ts.map +1 -1
- package/dist/field/features/migrations/lexicalPluginToLexical/converter/converters/upload/converter.js +2 -4
- package/dist/field/features/migrations/lexicalPluginToLexical/converter/converters/upload/converter.js.map +1 -1
- package/dist/field/features/migrations/lexicalPluginToLexical/feature.client.d.ts +4 -1
- package/dist/field/features/migrations/lexicalPluginToLexical/feature.client.d.ts.map +1 -1
- package/dist/field/features/migrations/lexicalPluginToLexical/feature.server.d.ts.map +1 -1
- package/dist/field/features/migrations/lexicalPluginToLexical/feature.server.js +2 -1
- package/dist/field/features/migrations/lexicalPluginToLexical/feature.server.js.map +1 -1
- package/dist/field/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/Component.js +9 -2
- package/dist/field/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/Component.js.map +1 -1
- package/dist/field/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/index.d.ts +3 -6
- package/dist/field/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/index.d.ts.map +1 -1
- package/dist/field/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/index.js +4 -5
- package/dist/field/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/index.js.map +1 -1
- package/dist/field/features/migrations/slateToLexical/converter/converters/blockquote/client.d.ts +1 -1
- package/dist/field/features/migrations/slateToLexical/converter/converters/blockquote/client.js +1 -1
- package/dist/field/features/migrations/slateToLexical/converter/converters/blockquote/client.js.map +1 -1
- package/dist/field/features/migrations/slateToLexical/converter/converters/blockquote/index.js +2 -2
- package/dist/field/features/migrations/slateToLexical/converter/converters/blockquote/index.js.map +1 -1
- package/dist/field/features/migrations/slateToLexical/converter/converters/relationship/converter.d.ts.map +1 -1
- package/dist/field/features/migrations/slateToLexical/converter/converters/relationship/converter.js +2 -4
- package/dist/field/features/migrations/slateToLexical/converter/converters/relationship/converter.js.map +1 -1
- package/dist/field/features/migrations/slateToLexical/converter/converters/upload/converter.d.ts.map +1 -1
- package/dist/field/features/migrations/slateToLexical/converter/converters/upload/converter.js +2 -4
- package/dist/field/features/migrations/slateToLexical/converter/converters/upload/converter.js.map +1 -1
- package/dist/field/features/migrations/slateToLexical/converter/index.d.ts.map +1 -1
- package/dist/field/features/migrations/slateToLexical/converter/index.js +2 -1
- package/dist/field/features/migrations/slateToLexical/converter/index.js.map +1 -1
- package/dist/field/features/migrations/slateToLexical/feature.client.d.ts +4 -1
- package/dist/field/features/migrations/slateToLexical/feature.client.d.ts.map +1 -1
- package/dist/field/features/migrations/slateToLexical/feature.server.d.ts.map +1 -1
- package/dist/field/features/migrations/slateToLexical/feature.server.js +2 -1
- package/dist/field/features/migrations/slateToLexical/feature.server.js.map +1 -1
- package/dist/field/features/migrations/slateToLexical/nodes/unknownConvertedNode/Component.js +9 -2
- package/dist/field/features/migrations/slateToLexical/nodes/unknownConvertedNode/Component.js.map +1 -1
- package/dist/field/features/migrations/slateToLexical/nodes/unknownConvertedNode/index.d.ts +3 -6
- package/dist/field/features/migrations/slateToLexical/nodes/unknownConvertedNode/index.d.ts.map +1 -1
- package/dist/field/features/migrations/slateToLexical/nodes/unknownConvertedNode/index.js +4 -5
- package/dist/field/features/migrations/slateToLexical/nodes/unknownConvertedNode/index.js.map +1 -1
- package/dist/field/features/paragraph/feature.client.d.ts +4 -1
- package/dist/field/features/paragraph/feature.client.d.ts.map +1 -1
- package/dist/field/features/paragraph/feature.client.js +54 -41
- package/dist/field/features/paragraph/feature.client.js.map +1 -1
- package/dist/field/features/paragraph/feature.server.d.ts.map +1 -1
- package/dist/field/features/paragraph/feature.server.js +4 -1
- package/dist/field/features/paragraph/feature.server.js.map +1 -1
- package/dist/field/features/paragraph/i18n.d.ts +3 -0
- package/dist/field/features/paragraph/i18n.d.ts.map +1 -0
- package/dist/field/features/paragraph/i18n.js +132 -0
- package/dist/field/features/paragraph/i18n.js.map +1 -0
- package/dist/field/features/relationship/drawer/commands.d.ts.map +1 -1
- package/dist/field/features/relationship/drawer/commands.js +1 -2
- package/dist/field/features/relationship/drawer/commands.js.map +1 -1
- package/dist/field/features/relationship/drawer/index.d.ts.map +1 -1
- package/dist/field/features/relationship/drawer/index.js +18 -16
- package/dist/field/features/relationship/drawer/index.js.map +1 -1
- package/dist/field/features/relationship/feature.client.d.ts +17 -2
- package/dist/field/features/relationship/feature.client.d.ts.map +1 -1
- package/dist/field/features/relationship/feature.client.js +51 -28
- package/dist/field/features/relationship/feature.client.js.map +1 -1
- package/dist/field/features/relationship/feature.server.d.ts +10 -1
- package/dist/field/features/relationship/feature.server.d.ts.map +1 -1
- package/dist/field/features/relationship/feature.server.js +43 -8
- package/dist/field/features/relationship/feature.server.js.map +1 -1
- package/dist/field/features/relationship/graphQLPopulationPromise.d.ts +5 -0
- package/dist/field/features/relationship/graphQLPopulationPromise.d.ts.map +1 -0
- package/dist/field/features/relationship/graphQLPopulationPromise.js +29 -0
- package/dist/field/features/relationship/graphQLPopulationPromise.js.map +1 -0
- package/dist/field/features/relationship/i18n.d.ts +3 -0
- package/dist/field/features/relationship/i18n.d.ts.map +1 -0
- package/dist/field/features/relationship/i18n.js +100 -0
- package/dist/field/features/relationship/i18n.js.map +1 -0
- package/dist/field/features/relationship/nodes/RelationshipNode.d.ts +4 -9
- package/dist/field/features/relationship/nodes/RelationshipNode.d.ts.map +1 -1
- package/dist/field/features/relationship/nodes/RelationshipNode.js +12 -11
- package/dist/field/features/relationship/nodes/RelationshipNode.js.map +1 -1
- package/dist/field/features/relationship/nodes/components/RelationshipComponent.d.ts.map +1 -1
- package/dist/field/features/relationship/nodes/components/RelationshipComponent.js +119 -56
- package/dist/field/features/relationship/nodes/components/RelationshipComponent.js.map +1 -1
- package/dist/field/features/relationship/plugins/index.d.ts +2 -2
- package/dist/field/features/relationship/plugins/index.d.ts.map +1 -1
- package/dist/field/features/relationship/plugins/index.js +16 -18
- package/dist/field/features/relationship/plugins/index.js.map +1 -1
- package/dist/field/features/relationship/utils/EnabledRelationshipsCondition.d.ts.map +1 -1
- package/dist/field/features/relationship/utils/EnabledRelationshipsCondition.js +1 -3
- package/dist/field/features/relationship/utils/EnabledRelationshipsCondition.js.map +1 -1
- package/dist/field/features/shared/slashMenu/basicGroup.d.ts +3 -0
- package/dist/field/features/shared/slashMenu/basicGroup.d.ts.map +1 -0
- package/dist/field/features/shared/slashMenu/basicGroup.js +11 -0
- package/dist/field/features/shared/slashMenu/basicGroup.js.map +1 -0
- package/dist/field/features/shared/toolbar/addDropdownGroup.d.ts +3 -0
- package/dist/field/features/shared/toolbar/addDropdownGroup.d.ts.map +1 -0
- package/dist/field/features/shared/toolbar/addDropdownGroup.js +12 -0
- package/dist/field/features/shared/toolbar/addDropdownGroup.js.map +1 -0
- package/dist/field/features/shared/toolbar/featureButtonsGroup.d.ts +3 -0
- package/dist/field/features/shared/toolbar/featureButtonsGroup.d.ts.map +1 -0
- package/dist/field/features/shared/toolbar/featureButtonsGroup.js +10 -0
- package/dist/field/features/shared/toolbar/featureButtonsGroup.js.map +1 -0
- package/dist/field/features/shared/toolbar/textDropdownGroup.d.ts +3 -0
- package/dist/field/features/shared/toolbar/textDropdownGroup.d.ts.map +1 -0
- package/dist/field/features/shared/toolbar/textDropdownGroup.js +12 -0
- package/dist/field/features/shared/toolbar/textDropdownGroup.js.map +1 -0
- package/dist/field/features/toolbars/fixed/Toolbar/index.d.ts +5 -0
- package/dist/field/features/toolbars/fixed/Toolbar/index.d.ts.map +1 -0
- package/dist/field/features/toolbars/fixed/Toolbar/index.js +207 -0
- package/dist/field/features/toolbars/fixed/Toolbar/index.js.map +1 -0
- package/dist/field/features/toolbars/fixed/feature.client.d.ts +7 -0
- package/dist/field/features/toolbars/fixed/feature.client.d.ts.map +1 -0
- package/dist/field/features/toolbars/fixed/feature.client.js +20 -0
- package/dist/field/features/toolbars/fixed/feature.client.js.map +1 -0
- package/dist/field/features/toolbars/fixed/feature.server.d.ts +19 -0
- package/dist/field/features/toolbars/fixed/feature.server.d.ts.map +1 -0
- package/dist/field/features/toolbars/fixed/feature.server.js +21 -0
- package/dist/field/features/toolbars/fixed/feature.server.js.map +1 -0
- package/dist/field/features/toolbars/inline/Toolbar/index.d.ts +4 -0
- package/dist/field/features/toolbars/inline/Toolbar/index.d.ts.map +1 -0
- package/dist/field/features/toolbars/inline/Toolbar/index.js +319 -0
- package/dist/field/features/toolbars/inline/Toolbar/index.js.map +1 -0
- package/dist/field/features/toolbars/inline/feature.client.d.ts +6 -0
- package/dist/field/features/toolbars/inline/feature.client.d.ts.map +1 -0
- package/dist/field/features/toolbars/inline/feature.client.js +20 -0
- package/dist/field/features/toolbars/inline/feature.client.js.map +1 -0
- package/dist/field/features/toolbars/inline/feature.server.d.ts +3 -0
- package/dist/field/features/toolbars/inline/feature.server.d.ts.map +1 -0
- package/dist/field/features/toolbars/inline/feature.server.js +16 -0
- package/dist/field/features/toolbars/inline/feature.server.js.map +1 -0
- package/dist/field/features/toolbars/shared/ToolbarButton/index.d.ts +10 -0
- package/dist/field/features/toolbars/shared/ToolbarButton/index.d.ts.map +1 -0
- package/dist/field/{lexical/plugins/FloatingSelectToolbar → features/toolbars/shared}/ToolbarButton/index.js +34 -23
- package/dist/field/features/toolbars/shared/ToolbarButton/index.js.map +1 -0
- package/dist/field/features/toolbars/shared/ToolbarDropdown/DropDown.d.ts +22 -0
- package/dist/field/features/toolbars/shared/ToolbarDropdown/DropDown.d.ts.map +1 -0
- package/dist/field/{lexical/plugins/FloatingSelectToolbar → features/toolbars/shared}/ToolbarDropdown/DropDown.js +75 -102
- package/dist/field/features/toolbars/shared/ToolbarDropdown/DropDown.js.map +1 -0
- package/dist/field/features/toolbars/shared/ToolbarDropdown/index.d.ts +23 -0
- package/dist/field/features/toolbars/shared/ToolbarDropdown/index.d.ts.map +1 -0
- package/dist/field/features/toolbars/shared/ToolbarDropdown/index.js +141 -0
- package/dist/field/features/toolbars/shared/ToolbarDropdown/index.js.map +1 -0
- package/dist/field/features/toolbars/types.d.ts +48 -0
- package/dist/field/features/toolbars/types.d.ts.map +1 -0
- package/dist/field/features/toolbars/types.js.map +1 -0
- package/dist/field/features/typeUtilities.d.ts +8 -0
- package/dist/field/features/typeUtilities.d.ts.map +1 -0
- package/dist/field/features/typeUtilities.js +8 -0
- package/dist/field/features/typeUtilities.js.map +1 -0
- package/dist/field/features/types.d.ts +259 -69
- package/dist/field/features/types.d.ts.map +1 -1
- package/dist/field/features/types.js.map +1 -1
- package/dist/field/features/upload/component/ExtraFieldsDrawer/index.d.ts +1 -1
- package/dist/field/features/upload/component/ExtraFieldsDrawer/index.d.ts.map +1 -1
- package/dist/field/features/upload/component/ExtraFieldsDrawer/index.js +35 -37
- package/dist/field/features/upload/component/ExtraFieldsDrawer/index.js.map +1 -1
- package/dist/field/features/upload/component/index.d.ts.map +1 -1
- package/dist/field/features/upload/component/index.js +160 -85
- package/dist/field/features/upload/component/index.js.map +1 -1
- package/dist/field/features/upload/drawer/commands.d.ts.map +1 -1
- package/dist/field/features/upload/drawer/commands.js +1 -2
- package/dist/field/features/upload/drawer/commands.js.map +1 -1
- package/dist/field/features/upload/drawer/index.d.ts.map +1 -1
- package/dist/field/features/upload/drawer/index.js +17 -18
- package/dist/field/features/upload/drawer/index.js.map +1 -1
- package/dist/field/features/upload/feature.client.d.ts +4 -1
- package/dist/field/features/upload/feature.client.d.ts.map +1 -1
- package/dist/field/features/upload/feature.client.js +52 -26
- package/dist/field/features/upload/feature.client.js.map +1 -1
- package/dist/field/features/upload/feature.server.d.ts +10 -3
- package/dist/field/features/upload/feature.server.d.ts.map +1 -1
- package/dist/field/features/upload/feature.server.js +93 -15
- package/dist/field/features/upload/feature.server.js.map +1 -1
- package/dist/field/features/upload/{populationPromise.d.ts → graphQLPopulationPromise.d.ts} +1 -1
- package/dist/field/features/upload/graphQLPopulationPromise.d.ts.map +1 -0
- package/dist/field/features/upload/graphQLPopulationPromise.js +52 -0
- package/dist/field/features/upload/graphQLPopulationPromise.js.map +1 -0
- package/dist/field/features/upload/i18n.d.ts +3 -0
- package/dist/field/features/upload/i18n.d.ts.map +1 -0
- package/dist/field/features/upload/i18n.js +100 -0
- package/dist/field/features/upload/i18n.js.map +1 -0
- package/dist/field/features/upload/nodes/UploadNode.d.ts +7 -19
- package/dist/field/features/upload/nodes/UploadNode.d.ts.map +1 -1
- package/dist/field/features/upload/nodes/UploadNode.js +45 -15
- package/dist/field/features/upload/nodes/UploadNode.js.map +1 -1
- package/dist/field/features/upload/plugin/index.d.ts +5 -4
- package/dist/field/features/upload/plugin/index.d.ts.map +1 -1
- package/dist/field/features/upload/plugin/index.js +18 -20
- package/dist/field/features/upload/plugin/index.js.map +1 -1
- package/dist/field/features/upload/validate.d.ts +2 -1
- package/dist/field/features/upload/validate.d.ts.map +1 -1
- package/dist/field/features/upload/validate.js +37 -10
- package/dist/field/features/upload/validate.js.map +1 -1
- package/dist/field/index.d.ts +3 -1
- package/dist/field/index.d.ts.map +1 -1
- package/dist/field/index.js +35 -86
- package/dist/field/index.js.map +1 -1
- package/dist/field/lexical/EditorPlugin.d.ts +1 -0
- package/dist/field/lexical/EditorPlugin.d.ts.map +1 -1
- package/dist/field/lexical/EditorPlugin.js +8 -4
- package/dist/field/lexical/EditorPlugin.js.map +1 -1
- package/dist/field/lexical/LexicalEditor.d.ts +3 -1
- package/dist/field/lexical/LexicalEditor.d.ts.map +1 -1
- package/dist/field/lexical/LexicalEditor.js +157 -77
- package/dist/field/lexical/LexicalEditor.js.map +1 -1
- package/dist/field/lexical/LexicalProvider.d.ts +1 -2
- package/dist/field/lexical/LexicalProvider.d.ts.map +1 -1
- package/dist/field/lexical/LexicalProvider.js +52 -41
- package/dist/field/lexical/LexicalProvider.js.map +1 -1
- package/dist/field/lexical/config/client/EditorConfigProvider.d.ts +15 -4
- package/dist/field/lexical/config/client/EditorConfigProvider.d.ts.map +1 -1
- package/dist/field/lexical/config/client/EditorConfigProvider.js +61 -11
- package/dist/field/lexical/config/client/EditorConfigProvider.js.map +1 -1
- package/dist/field/lexical/config/client/default.d.ts +1 -1
- package/dist/field/lexical/config/client/default.d.ts.map +1 -1
- package/dist/field/lexical/config/client/default.js.map +1 -1
- package/dist/field/lexical/config/client/sanitize.d.ts +3 -2
- package/dist/field/lexical/config/client/sanitize.d.ts.map +1 -1
- package/dist/field/lexical/config/client/sanitize.js +83 -33
- package/dist/field/lexical/config/client/sanitize.js.map +1 -1
- package/dist/field/lexical/config/server/default.d.ts +2 -3
- package/dist/field/lexical/config/server/default.d.ts.map +1 -1
- package/dist/field/lexical/config/server/default.js +12 -10
- package/dist/field/lexical/config/server/default.js.map +1 -1
- package/dist/field/lexical/config/server/loader.d.ts +5 -2
- package/dist/field/lexical/config/server/loader.d.ts.map +1 -1
- package/dist/field/lexical/config/server/loader.js +4 -2
- package/dist/field/lexical/config/server/loader.js.map +1 -1
- package/dist/field/lexical/config/server/sanitize.d.ts +2 -1
- package/dist/field/lexical/config/server/sanitize.d.ts.map +1 -1
- package/dist/field/lexical/config/server/sanitize.js +39 -9
- package/dist/field/lexical/config/server/sanitize.js.map +1 -1
- package/dist/field/lexical/config/types.d.ts +3 -1
- package/dist/field/lexical/config/types.d.ts.map +1 -1
- package/dist/field/lexical/config/types.js.map +1 -1
- package/dist/field/lexical/nodes/index.d.ts +1 -2
- package/dist/field/lexical/nodes/index.d.ts.map +1 -1
- package/dist/field/lexical/nodes/index.js.map +1 -1
- package/dist/field/lexical/plugins/MarkdownShortcut/index.d.ts.map +1 -1
- package/dist/field/lexical/plugins/MarkdownShortcut/index.js +3 -3
- package/dist/field/lexical/plugins/MarkdownShortcut/index.js.map +1 -1
- package/dist/field/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/LexicalMenu.d.ts +10 -10
- package/dist/field/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/LexicalMenu.d.ts.map +1 -1
- package/dist/field/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/LexicalMenu.js +74 -77
- package/dist/field/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/LexicalMenu.js.map +1 -1
- package/dist/field/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/index.d.ts +5 -5
- package/dist/field/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/index.d.ts.map +1 -1
- package/dist/field/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/index.js +8 -10
- package/dist/field/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/index.js.map +1 -1
- package/dist/field/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/types.d.ts +19 -27
- package/dist/field/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/types.d.ts.map +1 -1
- package/dist/field/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/types.js +1 -37
- package/dist/field/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/types.js.map +1 -1
- package/dist/field/lexical/plugins/SlashMenu/index.d.ts +2 -2
- package/dist/field/lexical/plugins/SlashMenu/index.d.ts.map +1 -1
- package/dist/field/lexical/plugins/SlashMenu/index.js +108 -93
- package/dist/field/lexical/plugins/SlashMenu/index.js.map +1 -1
- package/dist/field/lexical/plugins/handles/AddBlockHandlePlugin/index.d.ts +2 -2
- package/dist/field/lexical/plugins/handles/AddBlockHandlePlugin/index.d.ts.map +1 -1
- package/dist/field/lexical/plugins/handles/AddBlockHandlePlugin/index.js +47 -126
- package/dist/field/lexical/plugins/handles/AddBlockHandlePlugin/index.js.map +1 -1
- package/dist/field/lexical/plugins/handles/DraggableBlockPlugin/highlightElemOriginalPosition.d.ts +1 -1
- package/dist/field/lexical/plugins/handles/DraggableBlockPlugin/highlightElemOriginalPosition.d.ts.map +1 -1
- package/dist/field/lexical/plugins/handles/DraggableBlockPlugin/highlightElemOriginalPosition.js.map +1 -1
- package/dist/field/lexical/plugins/handles/DraggableBlockPlugin/index.d.ts +2 -2
- package/dist/field/lexical/plugins/handles/DraggableBlockPlugin/index.d.ts.map +1 -1
- package/dist/field/lexical/plugins/handles/DraggableBlockPlugin/index.js +116 -67
- package/dist/field/lexical/plugins/handles/DraggableBlockPlugin/index.js.map +1 -1
- package/dist/field/lexical/plugins/handles/DraggableBlockPlugin/setTargetLine.d.ts +8 -1
- package/dist/field/lexical/plugins/handles/DraggableBlockPlugin/setTargetLine.d.ts.map +1 -1
- package/dist/field/lexical/plugins/handles/DraggableBlockPlugin/setTargetLine.js +83 -16
- package/dist/field/lexical/plugins/handles/DraggableBlockPlugin/setTargetLine.js.map +1 -1
- package/dist/field/lexical/plugins/handles/utils/calculateDistanceFromScrollerElem.d.ts +5 -0
- package/dist/field/lexical/plugins/handles/utils/calculateDistanceFromScrollerElem.d.ts.map +1 -0
- package/dist/field/lexical/plugins/handles/utils/calculateDistanceFromScrollerElem.js +21 -0
- package/dist/field/lexical/plugins/handles/utils/calculateDistanceFromScrollerElem.js.map +1 -0
- package/dist/field/lexical/plugins/handles/utils/doesLineHeightAffectElement.d.ts +9 -0
- package/dist/field/lexical/plugins/handles/utils/doesLineHeightAffectElement.d.ts.map +1 -0
- package/dist/field/lexical/plugins/handles/utils/doesLineHeightAffectElement.js +35 -0
- package/dist/field/lexical/plugins/handles/utils/doesLineHeightAffectElement.js.map +1 -0
- package/dist/field/lexical/plugins/handles/{DraggableBlockPlugin → utils}/getNodeCloseToPoint.d.ts +5 -1
- package/dist/field/lexical/plugins/handles/utils/getNodeCloseToPoint.d.ts.map +1 -0
- package/dist/field/lexical/plugins/handles/{DraggableBlockPlugin → utils}/getNodeCloseToPoint.js +5 -18
- package/dist/field/lexical/plugins/handles/utils/getNodeCloseToPoint.js.map +1 -0
- package/dist/field/lexical/plugins/handles/utils/getTopLevelNodeKeys.d.ts.map +1 -1
- package/dist/field/lexical/plugins/handles/utils/getTopLevelNodeKeys.js +1 -2
- package/dist/field/lexical/plugins/handles/utils/getTopLevelNodeKeys.js.map +1 -1
- package/dist/field/lexical/plugins/handles/utils/setHandlePosition.d.ts +1 -1
- package/dist/field/lexical/plugins/handles/utils/setHandlePosition.d.ts.map +1 -1
- package/dist/field/lexical/plugins/handles/utils/setHandlePosition.js +19 -7
- package/dist/field/lexical/plugins/handles/utils/setHandlePosition.js.map +1 -1
- package/dist/field/lexical/theme/EditorTheme.d.ts.map +1 -1
- package/dist/field/lexical/theme/EditorTheme.js +1 -1
- package/dist/field/lexical/theme/EditorTheme.js.map +1 -1
- package/dist/field/lexical/ui/ContentEditable.d.ts +1 -1
- package/dist/field/lexical/ui/ContentEditable.d.ts.map +1 -1
- package/dist/field/lexical/ui/ContentEditable.js +3 -4
- package/dist/field/lexical/ui/ContentEditable.js.map +1 -1
- package/dist/field/lexical/ui/icons/AI/index.js +26 -17
- package/dist/field/lexical/ui/icons/AI/index.js.map +1 -1
- package/dist/field/lexical/ui/icons/Add/index.d.ts +3 -0
- package/dist/field/lexical/ui/icons/Add/index.d.ts.map +1 -0
- package/dist/field/lexical/ui/icons/Add/index.js +21 -0
- package/dist/field/lexical/ui/icons/Add/index.js.map +1 -0
- package/dist/field/lexical/ui/icons/Add/light.svg +4 -0
- package/dist/field/lexical/ui/icons/AlignCenter/index.js +21 -15
- package/dist/field/lexical/ui/icons/AlignCenter/index.js.map +1 -1
- package/dist/field/lexical/ui/icons/AlignJustify/index.js +21 -15
- package/dist/field/lexical/ui/icons/AlignJustify/index.js.map +1 -1
- package/dist/field/lexical/ui/icons/AlignLeft/index.js +21 -15
- package/dist/field/lexical/ui/icons/AlignLeft/index.js.map +1 -1
- package/dist/field/lexical/ui/icons/AlignRight/index.js +21 -15
- package/dist/field/lexical/ui/icons/AlignRight/index.js.map +1 -1
- package/dist/field/lexical/ui/icons/Block/index.js +30 -24
- package/dist/field/lexical/ui/icons/Block/index.js.map +1 -1
- package/dist/field/lexical/ui/icons/Blockquote/index.js +8 -6
- package/dist/field/lexical/ui/icons/Blockquote/index.js.map +1 -1
- package/dist/field/lexical/ui/icons/Bold/index.js +8 -6
- package/dist/field/lexical/ui/icons/Bold/index.js.map +1 -1
- package/dist/field/lexical/ui/icons/Checklist/index.js +19 -14
- package/dist/field/lexical/ui/icons/Checklist/index.js.map +1 -1
- package/dist/field/lexical/ui/icons/Code/index.js +14 -9
- package/dist/field/lexical/ui/icons/Code/index.js.map +1 -1
- package/dist/field/lexical/ui/icons/CodeBlock/index.js +14 -9
- package/dist/field/lexical/ui/icons/CodeBlock/index.js.map +1 -1
- package/dist/field/lexical/ui/icons/DraggableBlock/light.svg +9 -0
- package/dist/field/lexical/ui/icons/H1/index.js +8 -6
- package/dist/field/lexical/ui/icons/H1/index.js.map +1 -1
- package/dist/field/lexical/ui/icons/H2/index.js +8 -6
- package/dist/field/lexical/ui/icons/H2/index.js.map +1 -1
- package/dist/field/lexical/ui/icons/H3/index.js +8 -6
- package/dist/field/lexical/ui/icons/H3/index.js.map +1 -1
- package/dist/field/lexical/ui/icons/H4/index.js +8 -6
- package/dist/field/lexical/ui/icons/H4/index.js.map +1 -1
- package/dist/field/lexical/ui/icons/H5/index.js +8 -6
- package/dist/field/lexical/ui/icons/H5/index.js.map +1 -1
- package/dist/field/lexical/ui/icons/H6/index.js +8 -6
- package/dist/field/lexical/ui/icons/H6/index.js.map +1 -1
- package/dist/field/lexical/ui/icons/HorizontalRule/index.d.ts +3 -0
- package/dist/field/lexical/ui/icons/HorizontalRule/index.d.ts.map +1 -0
- package/dist/field/lexical/ui/icons/HorizontalRule/index.js +21 -0
- package/dist/field/lexical/ui/icons/HorizontalRule/index.js.map +1 -0
- package/dist/field/lexical/ui/icons/IndentDecrease/index.js +25 -18
- package/dist/field/lexical/ui/icons/IndentDecrease/index.js.map +1 -1
- package/dist/field/lexical/ui/icons/IndentIncrease/index.js +25 -18
- package/dist/field/lexical/ui/icons/IndentIncrease/index.js.map +1 -1
- package/dist/field/lexical/ui/icons/Italic/index.js +8 -6
- package/dist/field/lexical/ui/icons/Italic/index.js.map +1 -1
- package/dist/field/lexical/ui/icons/Link/index.d.ts.map +1 -1
- package/dist/field/lexical/ui/icons/Link/index.js +10 -18
- package/dist/field/lexical/ui/icons/Link/index.js.map +1 -1
- package/dist/field/lexical/ui/icons/OrderedList/index.js +29 -21
- package/dist/field/lexical/ui/icons/OrderedList/index.js.map +1 -1
- package/dist/field/lexical/ui/icons/Relationship/index.js +26 -17
- package/dist/field/lexical/ui/icons/Relationship/index.js.map +1 -1
- package/dist/field/lexical/ui/icons/Strikethrough/index.js +14 -9
- package/dist/field/lexical/ui/icons/Strikethrough/index.js.map +1 -1
- package/dist/field/lexical/ui/icons/Subscript/index.js +8 -6
- package/dist/field/lexical/ui/icons/Subscript/index.js.map +1 -1
- package/dist/field/lexical/ui/icons/Superscript/index.js +8 -6
- package/dist/field/lexical/ui/icons/Superscript/index.js.map +1 -1
- package/dist/field/lexical/ui/icons/Text/index.js +8 -6
- package/dist/field/lexical/ui/icons/Text/index.js.map +1 -1
- package/dist/field/lexical/ui/icons/Underline/index.js +14 -9
- package/dist/field/lexical/ui/icons/Underline/index.js.map +1 -1
- package/dist/field/lexical/ui/icons/UnorderedList/index.js +45 -36
- package/dist/field/lexical/ui/icons/UnorderedList/index.js.map +1 -1
- package/dist/field/lexical/ui/icons/Upload/index.js +24 -18
- package/dist/field/lexical/ui/icons/Upload/index.js.map +1 -1
- package/dist/field/lexical/utils/getSelectedNode.d.ts.map +1 -1
- package/dist/field/lexical/utils/getSelectedNode.js +1 -2
- package/dist/field/lexical/utils/getSelectedNode.js.map +1 -1
- package/dist/field/lexical/utils/nodeFormat.d.ts +2 -2
- package/dist/field/lexical/utils/nodeFormat.d.ts.map +1 -1
- package/dist/field/lexical/utils/nodeFormat.js +1 -1
- package/dist/field/lexical/utils/nodeFormat.js.map +1 -1
- package/dist/field/lexical/utils/setFloatingElemPosition.d.ts +11 -1
- package/dist/field/lexical/utils/setFloatingElemPosition.d.ts.map +1 -1
- package/dist/field/lexical/utils/setFloatingElemPosition.js +16 -13
- package/dist/field/lexical/utils/setFloatingElemPosition.js.map +1 -1
- package/dist/field/lexical/utils/url.d.ts.map +1 -1
- package/dist/field/lexical/utils/url.js +13 -2
- package/dist/field/lexical/utils/url.js.map +1 -1
- package/dist/forEachNodeRecursively.d.ts +10 -0
- package/dist/forEachNodeRecursively.d.ts.map +1 -0
- package/dist/forEachNodeRecursively.js +24 -0
- package/dist/forEachNodeRecursively.js.map +1 -0
- package/dist/generateComponentMap.d.ts +1 -1
- package/dist/generateComponentMap.d.ts.map +1 -1
- package/dist/generateComponentMap.js +21 -29
- package/dist/generateComponentMap.js.map +1 -1
- package/dist/generateSchemaMap.d.ts +1 -1
- package/dist/generateSchemaMap.d.ts.map +1 -1
- package/dist/generateSchemaMap.js +4 -12
- package/dist/generateSchemaMap.js.map +1 -1
- package/dist/i18n.d.ts +3 -0
- package/dist/i18n.d.ts.map +1 -0
- package/dist/i18n.js +164 -0
- package/dist/i18n.js.map +1 -0
- package/dist/index.d.ts +21 -36
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +592 -201
- package/dist/index.js.map +1 -1
- package/dist/{populate → populateGraphQL}/defaultValue.d.ts +0 -1
- package/dist/populateGraphQL/defaultValue.d.ts.map +1 -0
- package/dist/{populate → populateGraphQL}/defaultValue.js +1 -19
- package/dist/populateGraphQL/defaultValue.js.map +1 -0
- package/dist/populateGraphQL/populate.d.ts +17 -0
- package/dist/populateGraphQL/populate.d.ts.map +1 -0
- package/dist/populateGraphQL/populate.js +28 -0
- package/dist/populateGraphQL/populate.js.map +1 -0
- package/dist/populateGraphQL/populateLexicalPopulationPromises.d.ts +12 -0
- package/dist/populateGraphQL/populateLexicalPopulationPromises.d.ts.map +1 -0
- package/dist/populateGraphQL/populateLexicalPopulationPromises.js +37 -0
- package/dist/populateGraphQL/populateLexicalPopulationPromises.js.map +1 -0
- package/dist/populateGraphQL/recursivelyPopulateFieldsForGraphQL.d.ts +28 -0
- package/dist/populateGraphQL/recursivelyPopulateFieldsForGraphQL.d.ts.map +1 -0
- package/dist/{populate/recurseNestedFields.js → populateGraphQL/recursivelyPopulateFieldsForGraphQL.js} +7 -5
- package/dist/populateGraphQL/recursivelyPopulateFieldsForGraphQL.js.map +1 -0
- package/dist/recurseNodeTree.d.ts +9 -0
- package/dist/recurseNodeTree.d.ts.map +1 -0
- package/dist/recurseNodeTree.js +27 -0
- package/dist/recurseNodeTree.js.map +1 -0
- package/dist/types.d.ts +45 -8
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js.map +1 -1
- package/dist/useLexicalFeature.d.ts.map +1 -1
- package/dist/useLexicalFeature.js +6 -3
- package/dist/useLexicalFeature.js.map +1 -1
- package/dist/validate/index.d.ts +2 -2
- package/dist/validate/index.d.ts.map +1 -1
- package/dist/validate/index.js +3 -2
- package/dist/validate/index.js.map +1 -1
- package/dist/validate/validateNodes.d.ts +1 -1
- package/dist/validate/validateNodes.d.ts.map +1 -1
- package/dist/validate/validateNodes.js +1 -1
- package/dist/validate/validateNodes.js.map +1 -1
- package/package.json +71 -53
- package/components.d.ts +0 -6
- package/components.js +0 -7
- package/dist/exports/components.d.ts +0 -6
- package/dist/exports/components.d.ts.map +0 -1
- package/dist/exports/components.js +0 -7
- package/dist/exports/components.js.map +0 -1
- package/dist/field/features/align/floatingSelectToolbarAlignDropdownSection.d.ts +0 -3
- package/dist/field/features/align/floatingSelectToolbarAlignDropdownSection.d.ts.map +0 -1
- package/dist/field/features/align/floatingSelectToolbarAlignDropdownSection.js +0 -12
- package/dist/field/features/align/floatingSelectToolbarAlignDropdownSection.js.map +0 -1
- package/dist/field/features/blocks/component/index.scss +0 -153
- package/dist/field/features/blocks/populationPromise.d.ts.map +0 -1
- package/dist/field/features/blocks/populationPromise.js +0 -46
- package/dist/field/features/blocks/populationPromise.js.map +0 -1
- package/dist/field/features/common/floatingSelectToolbarFeaturesButtonsSection/index.d.ts +0 -3
- package/dist/field/features/common/floatingSelectToolbarFeaturesButtonsSection/index.d.ts.map +0 -1
- package/dist/field/features/common/floatingSelectToolbarFeaturesButtonsSection/index.js +0 -10
- package/dist/field/features/common/floatingSelectToolbarFeaturesButtonsSection/index.js.map +0 -1
- package/dist/field/features/common/floatingSelectToolbarTextDropdownSection/index.d.ts +0 -3
- package/dist/field/features/common/floatingSelectToolbarTextDropdownSection/index.d.ts.map +0 -1
- package/dist/field/features/common/floatingSelectToolbarTextDropdownSection/index.js +0 -12
- package/dist/field/features/common/floatingSelectToolbarTextDropdownSection/index.js.map +0 -1
- package/dist/field/features/debug/testrecorder/feature.client.d.ts.map +0 -1
- package/dist/field/features/debug/testrecorder/feature.server.d.ts.map +0 -1
- package/dist/field/features/debug/testrecorder/feature.server.js.map +0 -1
- package/dist/field/features/debug/testrecorder/plugin/index.d.ts +0 -5
- package/dist/field/features/debug/testrecorder/plugin/index.d.ts.map +0 -1
- package/dist/field/features/debug/testrecorder/plugin/index.js.map +0 -1
- package/dist/field/features/debug/testrecorder/plugin/index.scss +0 -49
- package/dist/field/features/debug/treeview/feature.client.d.ts.map +0 -1
- package/dist/field/features/debug/treeview/feature.server.d.ts.map +0 -1
- package/dist/field/features/debug/treeview/feature.server.js.map +0 -1
- package/dist/field/features/debug/treeview/plugin/index.d.ts +0 -4
- package/dist/field/features/debug/treeview/plugin/index.d.ts.map +0 -1
- package/dist/field/features/debug/treeview/plugin/index.js.map +0 -1
- package/dist/field/features/debug/treeview/plugin/index.scss +0 -78
- package/dist/field/features/format/common/floatingSelectToolbarSection.d.ts +0 -3
- package/dist/field/features/format/common/floatingSelectToolbarSection.d.ts.map +0 -1
- package/dist/field/features/format/common/floatingSelectToolbarSection.js +0 -10
- package/dist/field/features/format/common/floatingSelectToolbarSection.js.map +0 -1
- package/dist/field/features/format/inlinecode/feature.client.d.ts.map +0 -1
- package/dist/field/features/format/inlinecode/feature.client.js +0 -43
- package/dist/field/features/format/inlinecode/feature.client.js.map +0 -1
- package/dist/field/features/format/inlinecode/feature.server.d.ts.map +0 -1
- package/dist/field/features/format/inlinecode/feature.server.js.map +0 -1
- package/dist/field/features/indent/floatingSelectToolbarIndentSection.d.ts +0 -3
- package/dist/field/features/indent/floatingSelectToolbarIndentSection.d.ts.map +0 -1
- package/dist/field/features/indent/floatingSelectToolbarIndentSection.js +0 -10
- package/dist/field/features/indent/floatingSelectToolbarIndentSection.js.map +0 -1
- package/dist/field/features/indent/index.scss +0 -4
- package/dist/field/features/link/drawer/index.scss +0 -50
- package/dist/field/features/link/plugins/floatingLinkEditor/index.scss +0 -78
- package/dist/field/features/link/populationPromise.d.ts.map +0 -1
- package/dist/field/features/link/populationPromise.js +0 -46
- package/dist/field/features/link/populationPromise.js.map +0 -1
- package/dist/field/features/lists/common/markdown.js.map +0 -1
- package/dist/field/features/lists/orderedlist/feature.client.d.ts.map +0 -1
- package/dist/field/features/lists/orderedlist/feature.client.js +0 -72
- package/dist/field/features/lists/orderedlist/feature.client.js.map +0 -1
- package/dist/field/features/lists/orderedlist/feature.server.d.ts.map +0 -1
- package/dist/field/features/lists/orderedlist/feature.server.js.map +0 -1
- package/dist/field/features/lists/orderedlist/markdownTransformer.d.ts.map +0 -1
- package/dist/field/features/lists/orderedlist/markdownTransformer.js.map +0 -1
- package/dist/field/features/lists/unorderedlist/feature.client.d.ts.map +0 -1
- package/dist/field/features/lists/unorderedlist/feature.client.js +0 -72
- package/dist/field/features/lists/unorderedlist/feature.client.js.map +0 -1
- package/dist/field/features/lists/unorderedlist/feature.server.d.ts.map +0 -1
- package/dist/field/features/lists/unorderedlist/feature.server.js.map +0 -1
- package/dist/field/features/lists/unorderedlist/markdownTransformer.d.ts.map +0 -1
- package/dist/field/features/lists/unorderedlist/markdownTransformer.js.map +0 -1
- package/dist/field/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/index.scss +0 -14
- package/dist/field/features/migrations/slateToLexical/nodes/unknownConvertedNode/index.scss +0 -14
- package/dist/field/features/relationship/nodes/components/index.scss +0 -97
- package/dist/field/features/relationship/populationPromise.d.ts +0 -4
- package/dist/field/features/relationship/populationPromise.d.ts.map +0 -1
- package/dist/field/features/relationship/populationPromise.js +0 -24
- package/dist/field/features/relationship/populationPromise.js.map +0 -1
- package/dist/field/features/upload/component/index.scss +0 -152
- package/dist/field/features/upload/populationPromise.d.ts.map +0 -1
- package/dist/field/features/upload/populationPromise.js +0 -46
- package/dist/field/features/upload/populationPromise.js.map +0 -1
- package/dist/field/index.scss +0 -46
- package/dist/field/lexical/LexicalEditor.scss +0 -56
- package/dist/field/lexical/plugins/FloatingSelectToolbar/ToolbarButton/index.d.ts +0 -8
- package/dist/field/lexical/plugins/FloatingSelectToolbar/ToolbarButton/index.d.ts.map +0 -1
- package/dist/field/lexical/plugins/FloatingSelectToolbar/ToolbarButton/index.js.map +0 -1
- package/dist/field/lexical/plugins/FloatingSelectToolbar/ToolbarButton/index.scss +0 -37
- package/dist/field/lexical/plugins/FloatingSelectToolbar/ToolbarDropdown/DropDown.d.ts +0 -17
- package/dist/field/lexical/plugins/FloatingSelectToolbar/ToolbarDropdown/DropDown.d.ts.map +0 -1
- package/dist/field/lexical/plugins/FloatingSelectToolbar/ToolbarDropdown/DropDown.js.map +0 -1
- package/dist/field/lexical/plugins/FloatingSelectToolbar/ToolbarDropdown/index.d.ts +0 -18
- package/dist/field/lexical/plugins/FloatingSelectToolbar/ToolbarDropdown/index.d.ts.map +0 -1
- package/dist/field/lexical/plugins/FloatingSelectToolbar/ToolbarDropdown/index.js +0 -42
- package/dist/field/lexical/plugins/FloatingSelectToolbar/ToolbarDropdown/index.js.map +0 -1
- package/dist/field/lexical/plugins/FloatingSelectToolbar/ToolbarDropdown/index.scss +0 -100
- package/dist/field/lexical/plugins/FloatingSelectToolbar/index.d.ts +0 -6
- package/dist/field/lexical/plugins/FloatingSelectToolbar/index.d.ts.map +0 -1
- package/dist/field/lexical/plugins/FloatingSelectToolbar/index.js +0 -270
- package/dist/field/lexical/plugins/FloatingSelectToolbar/index.js.map +0 -1
- package/dist/field/lexical/plugins/FloatingSelectToolbar/index.scss +0 -57
- package/dist/field/lexical/plugins/FloatingSelectToolbar/types.d.ts +0 -40
- package/dist/field/lexical/plugins/FloatingSelectToolbar/types.d.ts.map +0 -1
- package/dist/field/lexical/plugins/FloatingSelectToolbar/types.js.map +0 -1
- package/dist/field/lexical/plugins/SlashMenu/index.scss +0 -61
- package/dist/field/lexical/plugins/handles/AddBlockHandlePlugin/index.scss +0 -31
- package/dist/field/lexical/plugins/handles/DraggableBlockPlugin/getNodeCloseToPoint.d.ts.map +0 -1
- package/dist/field/lexical/plugins/handles/DraggableBlockPlugin/getNodeCloseToPoint.js.map +0 -1
- package/dist/field/lexical/plugins/handles/DraggableBlockPlugin/index.scss +0 -55
- package/dist/field/lexical/theme/EditorTheme.scss +0 -505
- package/dist/field/lexical/ui/ContentEditable.scss +0 -25
- package/dist/populate/defaultValue.d.ts.map +0 -1
- package/dist/populate/defaultValue.js.map +0 -1
- package/dist/populate/populate.d.ts +0 -21
- package/dist/populate/populate.d.ts.map +0 -1
- package/dist/populate/populate.js +0 -21
- package/dist/populate/populate.js.map +0 -1
- package/dist/populate/recurseNestedFields.d.ts +0 -25
- package/dist/populate/recurseNestedFields.d.ts.map +0 -1
- package/dist/populate/recurseNestedFields.js.map +0 -1
- package/dist/populate/richTextRelationshipPromise.d.ts +0 -23
- package/dist/populate/richTextRelationshipPromise.d.ts.map +0 -1
- package/dist/populate/richTextRelationshipPromise.js +0 -68
- package/dist/populate/richTextRelationshipPromise.js.map +0 -1
- package/dist/scss/app.scss +0 -209
- package/dist/scss/colors.scss +0 -269
- package/dist/scss/fonts.scss +0 -75
- package/dist/scss/queries.scss +0 -27
- package/dist/scss/resets.scss +0 -17
- package/dist/scss/styles.scss +0 -11
- package/dist/scss/svg.scss +0 -10
- package/dist/scss/toastify.scss +0 -58
- package/dist/scss/type.scss +0 -117
- package/dist/scss/vars.scss +0 -220
- package/dist/scss/z-index.scss +0 -9
- package/src/index.ts +0 -423
- /package/dist/field/features/debug/{testrecorder → testRecorder}/feature.client.js +0 -0
- /package/dist/field/features/debug/{testrecorder → testRecorder}/feature.server.d.ts +0 -0
- /package/dist/field/features/debug/{treeview → treeView}/feature.client.js +0 -0
- /package/dist/field/features/debug/{treeview → treeView}/feature.server.d.ts +0 -0
- /package/dist/field/features/format/{inlinecode → inlineCode}/feature.server.d.ts +0 -0
- /package/dist/field/features/format/{inlinecode → inlineCode}/markdownTransformers.d.ts +0 -0
- /package/dist/field/features/format/{inlinecode → inlineCode}/markdownTransformers.js +0 -0
- /package/dist/field/features/lists/{orderedlist → orderedList}/feature.server.d.ts +0 -0
- /package/dist/field/features/lists/{orderedlist → orderedList}/markdownTransformer.d.ts +0 -0
- /package/dist/field/features/lists/{common → shared}/markdown.d.ts +0 -0
- /package/dist/field/features/lists/{unorderedlist → unorderedList}/feature.server.d.ts +0 -0
- /package/dist/field/features/lists/{unorderedlist → unorderedList}/markdownTransformer.d.ts +0 -0
- /package/dist/field/{lexical/plugins/FloatingSelectToolbar → features/toolbars}/types.js +0 -0
package/README.md
CHANGED
package/dist/cell/index.d.ts
CHANGED
|
@@ -1,6 +1,9 @@
|
|
|
1
|
-
import type { EditorConfig as LexicalEditorConfig } from 'lexical
|
|
1
|
+
import type { EditorConfig as LexicalEditorConfig } from 'lexical';
|
|
2
|
+
import type { CellComponentProps } from 'payload';
|
|
2
3
|
import React from 'react';
|
|
3
|
-
|
|
4
|
+
import type { LexicalFieldAdminProps } from '../types.js';
|
|
5
|
+
export declare const RichTextCell: React.FC<CellComponentProps & {
|
|
6
|
+
admin?: LexicalFieldAdminProps;
|
|
4
7
|
lexicalEditorConfig: LexicalEditorConfig;
|
|
5
8
|
}>;
|
|
6
9
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/cell/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/cell/index.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,IAAI,mBAAmB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/cell/index.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,IAAI,mBAAmB,EAAE,MAAM,SAAS,CAAA;AAClE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAA;AAKjD,OAAO,KAA8B,MAAM,OAAO,CAAA;AAIlD,OAAO,KAAK,EAAqC,sBAAsB,EAAE,MAAM,aAAa,CAAA;AAO5F,eAAO,MAAM,YAAY,EAAE,KAAK,CAAC,EAAE,CACjC,kBAAkB,GAAG;IACnB,KAAK,CAAC,EAAE,sBAAsB,CAAA;IAC9B,mBAAmB,EAAE,mBAAmB,CAAA;CACzC,CAwKF,CAAA"}
|
package/dist/cell/index.js
CHANGED
|
@@ -1,34 +1,35 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
import
|
|
5
|
-
|
|
6
|
-
import { useTableCell } from '@payloadcms/ui/elements/Table';
|
|
7
|
-
import { useFieldProps } from '@payloadcms/ui/forms/FieldPropsProvider';
|
|
8
|
-
import { useClientFunctions } from '@payloadcms/ui/providers/ClientFunction';
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { createHeadlessEditor } from '@lexical/headless';
|
|
4
|
+
import { useClientFunctions, useTableCell } from '@payloadcms/ui/client';
|
|
5
|
+
import { $getRoot } from 'lexical';
|
|
9
6
|
import React, { useEffect, useState } from 'react';
|
|
10
7
|
import { defaultEditorLexicalConfig } from '../field/lexical/config/client/default.js';
|
|
11
8
|
import { loadClientFeatures } from '../field/lexical/config/client/loader.js';
|
|
12
9
|
import { sanitizeClientEditorConfig } from '../field/lexical/config/client/sanitize.js';
|
|
13
10
|
import { getEnabledNodes } from '../field/lexical/nodes/index.js';
|
|
14
11
|
export const RichTextCell = (props)=>{
|
|
15
|
-
const { lexicalEditorConfig } = props;
|
|
12
|
+
const { admin, lexicalEditorConfig, richTextComponentMap } = props;
|
|
16
13
|
const [preview, setPreview] = React.useState('Loading...');
|
|
17
|
-
const { schemaPath } =
|
|
18
|
-
const { cellData, richTextComponentMap } = useTableCell();
|
|
14
|
+
const { cellData, cellProps: { schemaPath } } = useTableCell();
|
|
19
15
|
const clientFunctions = useClientFunctions();
|
|
20
16
|
const [hasLoadedFeatures, setHasLoadedFeatures] = useState(false);
|
|
21
17
|
const [featureProviders, setFeatureProviders] = useState([]);
|
|
22
18
|
const [finalSanitizedEditorConfig, setFinalSanitizedEditorConfig] = useState(null);
|
|
23
|
-
|
|
19
|
+
const featureProviderComponents = richTextComponentMap.get('features').sort((a, b)=>a.order - b.order) // order by order
|
|
24
20
|
;
|
|
25
|
-
//
|
|
26
|
-
|
|
27
|
-
|
|
21
|
+
let featureProvidersAndComponentsToLoad = 0 // feature providers and components
|
|
22
|
+
;
|
|
23
|
+
for (const featureProvider of featureProviderComponents){
|
|
24
|
+
const featureComponentKeys = Array.from(richTextComponentMap.keys()).filter((key)=>key.startsWith(`feature.${featureProvider.key}.components.`));
|
|
25
|
+
featureProvidersAndComponentsToLoad += 1;
|
|
26
|
+
featureProvidersAndComponentsToLoad += featureComponentKeys.length;
|
|
27
|
+
}
|
|
28
28
|
useEffect(()=>{
|
|
29
29
|
if (!hasLoadedFeatures) {
|
|
30
30
|
const featureProvidersLocal = [];
|
|
31
|
-
let featureProvidersAndComponentsLoaded = 0
|
|
31
|
+
let featureProvidersAndComponentsLoaded = 0 // feature providers and components only
|
|
32
|
+
;
|
|
32
33
|
Object.entries(clientFunctions).forEach(([key, plugin])=>{
|
|
33
34
|
if (key.startsWith(`lexicalFeature.${schemaPath}.`)) {
|
|
34
35
|
if (!key.includes('.components.')) {
|
|
@@ -37,7 +38,7 @@ export const RichTextCell = (props)=>{
|
|
|
37
38
|
featureProvidersAndComponentsLoaded++;
|
|
38
39
|
}
|
|
39
40
|
});
|
|
40
|
-
if (featureProvidersAndComponentsLoaded ===
|
|
41
|
+
if (featureProvidersAndComponentsLoaded === featureProvidersAndComponentsToLoad) {
|
|
41
42
|
setFeatureProviders(featureProvidersLocal);
|
|
42
43
|
setHasLoadedFeatures(true);
|
|
43
44
|
/**
|
|
@@ -50,10 +51,12 @@ export const RichTextCell = (props)=>{
|
|
|
50
51
|
lexical: lexicalEditorConfig
|
|
51
52
|
}
|
|
52
53
|
});
|
|
53
|
-
setFinalSanitizedEditorConfig(sanitizeClientEditorConfig(lexicalEditorConfig ? lexicalEditorConfig : defaultEditorLexicalConfig, resolvedClientFeatures));
|
|
54
|
+
setFinalSanitizedEditorConfig(sanitizeClientEditorConfig(lexicalEditorConfig ? lexicalEditorConfig : defaultEditorLexicalConfig, resolvedClientFeatures, admin));
|
|
54
55
|
}
|
|
55
56
|
}
|
|
56
57
|
}, [
|
|
58
|
+
admin,
|
|
59
|
+
featureProviderComponents,
|
|
57
60
|
hasLoadedFeatures,
|
|
58
61
|
clientFunctions,
|
|
59
62
|
schemaPath,
|
|
@@ -61,9 +64,13 @@ export const RichTextCell = (props)=>{
|
|
|
61
64
|
featureProviders,
|
|
62
65
|
finalSanitizedEditorConfig,
|
|
63
66
|
lexicalEditorConfig,
|
|
64
|
-
|
|
67
|
+
richTextComponentMap,
|
|
68
|
+
featureProvidersAndComponentsToLoad
|
|
65
69
|
]);
|
|
66
70
|
useEffect(()=>{
|
|
71
|
+
if (!hasLoadedFeatures) {
|
|
72
|
+
return;
|
|
73
|
+
}
|
|
67
74
|
let dataToUse = cellData;
|
|
68
75
|
if (dataToUse == null || !hasLoadedFeatures || !finalSanitizedEditorConfig) {
|
|
69
76
|
setPreview('');
|
|
@@ -112,20 +119,27 @@ export const RichTextCell = (props)=>{
|
|
|
112
119
|
finalSanitizedEditorConfig
|
|
113
120
|
]);
|
|
114
121
|
if (!hasLoadedFeatures) {
|
|
115
|
-
return /*#__PURE__*/
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
122
|
+
return /*#__PURE__*/ _jsx(React.Fragment, {
|
|
123
|
+
children: Array.isArray(featureProviderComponents) && featureProviderComponents.map((featureProvider)=>{
|
|
124
|
+
// get all components starting with key feature.${FeatureProvider.key}.components.{featureComponentKey}
|
|
125
|
+
const featureComponentKeys = Array.from(richTextComponentMap.keys()).filter((key)=>key.startsWith(`feature.${featureProvider.key}.components.`));
|
|
126
|
+
const featureComponents = featureComponentKeys.map((key)=>{
|
|
127
|
+
return richTextComponentMap.get(key);
|
|
128
|
+
});
|
|
129
|
+
return /*#__PURE__*/ _jsxs(React.Fragment, {
|
|
130
|
+
children: [
|
|
131
|
+
featureComponents?.length ? featureComponents.map((FeatureComponent)=>{
|
|
132
|
+
return FeatureComponent;
|
|
133
|
+
}) : null,
|
|
134
|
+
featureProvider.ClientComponent
|
|
135
|
+
]
|
|
136
|
+
}, featureProvider.key);
|
|
137
|
+
})
|
|
138
|
+
});
|
|
127
139
|
}
|
|
128
|
-
return /*#__PURE__*/
|
|
140
|
+
return /*#__PURE__*/ _jsx("span", {
|
|
141
|
+
children: preview
|
|
142
|
+
});
|
|
129
143
|
};
|
|
130
144
|
|
|
131
145
|
//# sourceMappingURL=index.js.map
|
package/dist/cell/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/cell/index.tsx"],"sourcesContent":["'use client'\nimport type { EditorConfig as LexicalEditorConfig } from 'lexical/LexicalEditor.js'\n\nimport lexicalHeadlessImport from '@lexical/headless'\nconst { createHeadlessEditor } = lexicalHeadlessImport\nimport lexicalImport from 'lexical'\nconst { $getRoot } = lexicalImport\nimport { useTableCell } from '@payloadcms/ui/elements/Table'\nimport { useFieldProps } from '@payloadcms/ui/forms/FieldPropsProvider'\nimport { useClientFunctions } from '@payloadcms/ui/providers/ClientFunction'\nimport React, { useEffect, useState } from 'react'\n\nimport type { FeatureProviderClient } from '../field/features/types.js'\nimport type { SanitizedClientEditorConfig } from '../field/lexical/config/types.js'\nimport type { GeneratedFeatureProviderComponent } from '../types.js'\n\nimport { defaultEditorLexicalConfig } from '../field/lexical/config/client/default.js'\nimport { loadClientFeatures } from '../field/lexical/config/client/loader.js'\nimport { sanitizeClientEditorConfig } from '../field/lexical/config/client/sanitize.js'\nimport { getEnabledNodes } from '../field/lexical/nodes/index.js'\n\nexport const RichTextCell: React.FC<{\n lexicalEditorConfig: LexicalEditorConfig\n}> = (props) => {\n const { lexicalEditorConfig } = props\n\n const [preview, setPreview] = React.useState('Loading...')\n const { schemaPath } = useFieldProps()\n\n const { cellData, richTextComponentMap } = useTableCell()\n\n const clientFunctions = useClientFunctions()\n const [hasLoadedFeatures, setHasLoadedFeatures] = useState(false)\n\n const [featureProviders, setFeatureProviders] = useState<FeatureProviderClient<unknown>[]>([])\n\n const [finalSanitizedEditorConfig, setFinalSanitizedEditorConfig] =\n useState<SanitizedClientEditorConfig>(null)\n\n let featureProviderComponents: GeneratedFeatureProviderComponent[] = richTextComponentMap.get(\n 'features',\n ) as GeneratedFeatureProviderComponent[] // TODO: Type better\n // order by order\n featureProviderComponents = featureProviderComponents.sort((a, b) => a.order - b.order)\n\n const featureComponentsWithFeaturesLength =\n Array.from(richTextComponentMap.keys()).filter(\n (key) => key.startsWith(`feature.`) && !key.includes('.fields.'),\n ).length + featureProviderComponents.length\n\n useEffect(() => {\n if (!hasLoadedFeatures) {\n const featureProvidersLocal: FeatureProviderClient<unknown>[] = []\n let featureProvidersAndComponentsLoaded = 0\n\n Object.entries(clientFunctions).forEach(([key, plugin]) => {\n if (key.startsWith(`lexicalFeature.${schemaPath}.`)) {\n if (!key.includes('.components.')) {\n featureProvidersLocal.push(plugin)\n }\n featureProvidersAndComponentsLoaded++\n }\n })\n\n if (featureProvidersAndComponentsLoaded === featureComponentsWithFeaturesLength) {\n setFeatureProviders(featureProvidersLocal)\n setHasLoadedFeatures(true)\n\n /**\n * Loaded feature provided => create the final sanitized editor config\n */\n\n const resolvedClientFeatures = loadClientFeatures({\n clientFunctions,\n schemaPath,\n unSanitizedEditorConfig: {\n features: featureProvidersLocal,\n lexical: lexicalEditorConfig,\n },\n })\n\n setFinalSanitizedEditorConfig(\n sanitizeClientEditorConfig(\n lexicalEditorConfig ? lexicalEditorConfig : defaultEditorLexicalConfig,\n resolvedClientFeatures,\n ),\n )\n }\n }\n }, [\n hasLoadedFeatures,\n clientFunctions,\n schemaPath,\n featureProviderComponents.length,\n featureProviders,\n finalSanitizedEditorConfig,\n lexicalEditorConfig,\n featureComponentsWithFeaturesLength,\n ])\n\n useEffect(() => {\n let dataToUse = cellData\n if (dataToUse == null || !hasLoadedFeatures || !finalSanitizedEditorConfig) {\n setPreview('')\n return\n }\n\n // Transform data through load hooks\n if (finalSanitizedEditorConfig?.features?.hooks?.load?.length) {\n finalSanitizedEditorConfig.features.hooks.load.forEach((hook) => {\n dataToUse = hook({ incomingEditorState: dataToUse })\n })\n }\n\n if (!dataToUse || typeof dataToUse !== 'object') {\n setPreview('')\n return\n }\n\n // If data is from Slate and not Lexical\n if (Array.isArray(dataToUse) && !('root' in dataToUse)) {\n setPreview('')\n return\n }\n\n // If data is from payload-plugin-lexical\n if ('jsonContent' in dataToUse) {\n setPreview('')\n return\n }\n\n // initialize headless editor\n const headlessEditor = createHeadlessEditor({\n namespace: finalSanitizedEditorConfig.lexical.namespace,\n nodes: getEnabledNodes({ editorConfig: finalSanitizedEditorConfig }),\n theme: finalSanitizedEditorConfig.lexical.theme,\n })\n headlessEditor.setEditorState(headlessEditor.parseEditorState(dataToUse))\n\n const textContent =\n headlessEditor.getEditorState().read(() => {\n return $getRoot().getTextContent()\n }) || ''\n\n // Limiting the number of characters shown is done in a CSS rule\n setPreview(textContent)\n }, [cellData, lexicalEditorConfig, hasLoadedFeatures, finalSanitizedEditorConfig])\n\n if (!hasLoadedFeatures) {\n return (\n <React.Fragment>\n {Array.isArray(featureProviderComponents) &&\n featureProviderComponents.map((featureProvider) => {\n // get all components starting with key feature.${FeatureProvider.key}.components.{featureComponentKey}\n const featureComponentKeys = Array.from(richTextComponentMap.keys()).filter((key) =>\n key.startsWith(`feature.${featureProvider.key}.components.`),\n )\n const featureComponents: React.ReactNode[] = featureComponentKeys.map((key) => {\n return richTextComponentMap.get(key)\n })\n\n return (\n <React.Fragment key={featureProvider.key}>\n {featureComponents?.length\n ? featureComponents.map((FeatureComponent) => {\n return FeatureComponent\n })\n : null}\n {featureProvider.ClientComponent}\n </React.Fragment>\n )\n })}\n </React.Fragment>\n )\n }\n\n return <span>{preview}</span>\n}\n"],"names":["lexicalHeadlessImport","createHeadlessEditor","lexicalImport","$getRoot","useTableCell","useFieldProps","useClientFunctions","React","useEffect","useState","defaultEditorLexicalConfig","loadClientFeatures","sanitizeClientEditorConfig","getEnabledNodes","RichTextCell","props","lexicalEditorConfig","preview","setPreview","schemaPath","cellData","richTextComponentMap","clientFunctions","hasLoadedFeatures","setHasLoadedFeatures","featureProviders","setFeatureProviders","finalSanitizedEditorConfig","setFinalSanitizedEditorConfig","featureProviderComponents","get","sort","a","b","order","featureComponentsWithFeaturesLength","Array","from","keys","filter","key","startsWith","includes","length","featureProvidersLocal","featureProvidersAndComponentsLoaded","Object","entries","forEach","plugin","push","resolvedClientFeatures","unSanitizedEditorConfig","features","lexical","dataToUse","hooks","load","hook","incomingEditorState","isArray","headlessEditor","namespace","nodes","editorConfig","theme","setEditorState","parseEditorState","textContent","getEditorState","read","getTextContent","Fragment","map","featureProvider","featureComponentKeys","featureComponents","FeatureComponent","ClientComponent","span"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"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"}
|
|
1
|
+
{"version":3,"sources":["../../src/cell/index.tsx"],"sourcesContent":["'use client'\nimport type { EditorConfig as LexicalEditorConfig } from 'lexical'\nimport type { CellComponentProps } from 'payload'\n\nimport { createHeadlessEditor } from '@lexical/headless'\nimport { useClientFunctions, useTableCell } from '@payloadcms/ui/client'\nimport { $getRoot } from 'lexical'\nimport React, { useEffect, useState } from 'react'\n\nimport type { FeatureProviderClient } from '../field/features/types.js'\nimport type { SanitizedClientEditorConfig } from '../field/lexical/config/types.js'\nimport type { GeneratedFeatureProviderComponent, LexicalFieldAdminProps } from '../types.js'\n\nimport { defaultEditorLexicalConfig } from '../field/lexical/config/client/default.js'\nimport { loadClientFeatures } from '../field/lexical/config/client/loader.js'\nimport { sanitizeClientEditorConfig } from '../field/lexical/config/client/sanitize.js'\nimport { getEnabledNodes } from '../field/lexical/nodes/index.js'\n\nexport const RichTextCell: React.FC<\n CellComponentProps & {\n admin?: LexicalFieldAdminProps\n lexicalEditorConfig: LexicalEditorConfig\n }\n> = (props) => {\n const { admin, lexicalEditorConfig, richTextComponentMap } = props\n\n const [preview, setPreview] = React.useState('Loading...')\n\n const {\n cellData,\n cellProps: { schemaPath },\n } = useTableCell()\n\n const clientFunctions = useClientFunctions()\n const [hasLoadedFeatures, setHasLoadedFeatures] = useState(false)\n\n const [featureProviders, setFeatureProviders] = useState<FeatureProviderClient<unknown>[]>([])\n\n const [finalSanitizedEditorConfig, setFinalSanitizedEditorConfig] =\n useState<SanitizedClientEditorConfig>(null)\n\n const featureProviderComponents: GeneratedFeatureProviderComponent[] = (\n richTextComponentMap.get('features') as GeneratedFeatureProviderComponent[]\n ).sort((a, b) => a.order - b.order) // order by order\n\n let featureProvidersAndComponentsToLoad = 0 // feature providers and components\n for (const featureProvider of featureProviderComponents) {\n const featureComponentKeys = Array.from(richTextComponentMap.keys()).filter((key) =>\n key.startsWith(`feature.${featureProvider.key}.components.`),\n )\n\n featureProvidersAndComponentsToLoad += 1\n featureProvidersAndComponentsToLoad += featureComponentKeys.length\n }\n\n useEffect(() => {\n if (!hasLoadedFeatures) {\n const featureProvidersLocal: FeatureProviderClient<unknown>[] = []\n let featureProvidersAndComponentsLoaded = 0 // feature providers and components only\n\n Object.entries(clientFunctions).forEach(([key, plugin]) => {\n if (key.startsWith(`lexicalFeature.${schemaPath}.`)) {\n if (!key.includes('.components.')) {\n featureProvidersLocal.push(plugin)\n }\n featureProvidersAndComponentsLoaded++\n }\n })\n\n if (featureProvidersAndComponentsLoaded === featureProvidersAndComponentsToLoad) {\n setFeatureProviders(featureProvidersLocal)\n setHasLoadedFeatures(true)\n\n /**\n * Loaded feature provided => create the final sanitized editor config\n */\n\n const resolvedClientFeatures = loadClientFeatures({\n clientFunctions,\n schemaPath,\n unSanitizedEditorConfig: {\n features: featureProvidersLocal,\n lexical: lexicalEditorConfig,\n },\n })\n\n setFinalSanitizedEditorConfig(\n sanitizeClientEditorConfig(\n lexicalEditorConfig ? lexicalEditorConfig : defaultEditorLexicalConfig,\n resolvedClientFeatures,\n admin,\n ),\n )\n }\n }\n }, [\n admin,\n featureProviderComponents,\n hasLoadedFeatures,\n clientFunctions,\n schemaPath,\n featureProviderComponents.length,\n featureProviders,\n finalSanitizedEditorConfig,\n lexicalEditorConfig,\n richTextComponentMap,\n featureProvidersAndComponentsToLoad,\n ])\n\n useEffect(() => {\n if (!hasLoadedFeatures) {\n return\n }\n let dataToUse = cellData\n if (dataToUse == null || !hasLoadedFeatures || !finalSanitizedEditorConfig) {\n setPreview('')\n return\n }\n\n // Transform data through load hooks\n if (finalSanitizedEditorConfig?.features?.hooks?.load?.length) {\n finalSanitizedEditorConfig.features.hooks.load.forEach((hook) => {\n dataToUse = hook({ incomingEditorState: dataToUse })\n })\n }\n\n if (!dataToUse || typeof dataToUse !== 'object') {\n setPreview('')\n return\n }\n\n // If data is from Slate and not Lexical\n if (Array.isArray(dataToUse) && !('root' in dataToUse)) {\n setPreview('')\n return\n }\n\n // If data is from payload-plugin-lexical\n if ('jsonContent' in dataToUse) {\n setPreview('')\n return\n }\n\n // initialize headless editor\n const headlessEditor = createHeadlessEditor({\n namespace: finalSanitizedEditorConfig.lexical.namespace,\n nodes: getEnabledNodes({ editorConfig: finalSanitizedEditorConfig }),\n theme: finalSanitizedEditorConfig.lexical.theme,\n })\n headlessEditor.setEditorState(headlessEditor.parseEditorState(dataToUse))\n\n const textContent =\n headlessEditor.getEditorState().read(() => {\n return $getRoot().getTextContent()\n }) || ''\n\n // Limiting the number of characters shown is done in a CSS rule\n setPreview(textContent)\n }, [cellData, lexicalEditorConfig, hasLoadedFeatures, finalSanitizedEditorConfig])\n\n if (!hasLoadedFeatures) {\n return (\n <React.Fragment>\n {Array.isArray(featureProviderComponents) &&\n featureProviderComponents.map((featureProvider) => {\n // get all components starting with key feature.${FeatureProvider.key}.components.{featureComponentKey}\n const featureComponentKeys = Array.from(richTextComponentMap.keys()).filter((key) =>\n key.startsWith(`feature.${featureProvider.key}.components.`),\n )\n\n const featureComponents: React.ReactNode[] = featureComponentKeys.map((key) => {\n return richTextComponentMap.get(key)\n })\n\n return (\n <React.Fragment key={featureProvider.key}>\n {featureComponents?.length\n ? featureComponents.map((FeatureComponent) => {\n return FeatureComponent\n })\n : null}\n {featureProvider.ClientComponent}\n </React.Fragment>\n )\n })}\n </React.Fragment>\n )\n }\n\n return <span>{preview}</span>\n}\n"],"names":["createHeadlessEditor","useClientFunctions","useTableCell","$getRoot","React","useEffect","useState","defaultEditorLexicalConfig","loadClientFeatures","sanitizeClientEditorConfig","getEnabledNodes","RichTextCell","props","admin","lexicalEditorConfig","richTextComponentMap","preview","setPreview","cellData","cellProps","schemaPath","clientFunctions","hasLoadedFeatures","setHasLoadedFeatures","featureProviders","setFeatureProviders","finalSanitizedEditorConfig","setFinalSanitizedEditorConfig","featureProviderComponents","get","sort","a","b","order","featureProvidersAndComponentsToLoad","featureProvider","featureComponentKeys","Array","from","keys","filter","key","startsWith","length","featureProvidersLocal","featureProvidersAndComponentsLoaded","Object","entries","forEach","plugin","includes","push","resolvedClientFeatures","unSanitizedEditorConfig","features","lexical","dataToUse","hooks","load","hook","incomingEditorState","isArray","headlessEditor","namespace","nodes","editorConfig","theme","setEditorState","parseEditorState","textContent","getEditorState","read","getTextContent","Fragment","map","featureComponents","FeatureComponent","ClientComponent","span"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA;;AAIA,SAASA,oBAAoB,QAAQ,oBAAmB;AACxD,SAASC,kBAAkB,EAAEC,YAAY,QAAQ,wBAAuB;AACxE,SAASC,QAAQ,QAAQ,UAAS;AAClC,OAAOC,SAASC,SAAS,EAAEC,QAAQ,QAAQ,QAAO;AAMlD,SAASC,0BAA0B,QAAQ,4CAA2C;AACtF,SAASC,kBAAkB,QAAQ,2CAA0C;AAC7E,SAASC,0BAA0B,QAAQ,6CAA4C;AACvF,SAASC,eAAe,QAAQ,kCAAiC;AAEjE,OAAO,MAAMC,eAKT,CAACC;IACH,MAAM,EAAEC,KAAK,EAAEC,mBAAmB,EAAEC,oBAAoB,EAAE,GAAGH;IAE7D,MAAM,CAACI,SAASC,WAAW,GAAGb,MAAME,QAAQ,CAAC;IAE7C,MAAM,EACJY,QAAQ,EACRC,WAAW,EAAEC,UAAU,EAAE,EAC1B,GAAGlB;IAEJ,MAAMmB,kBAAkBpB;IACxB,MAAM,CAACqB,mBAAmBC,qBAAqB,GAAGjB,SAAS;IAE3D,MAAM,CAACkB,kBAAkBC,oBAAoB,GAAGnB,SAA2C,EAAE;IAE7F,MAAM,CAACoB,4BAA4BC,8BAA8B,GAC/DrB,SAAsC;IAExC,MAAMsB,4BAAiE,AACrEb,qBAAqBc,GAAG,CAAC,YACzBC,IAAI,CAAC,CAACC,GAAGC,IAAMD,EAAEE,KAAK,GAAGD,EAAEC,KAAK,EAAE,iBAAiB;;IAErD,IAAIC,sCAAsC,EAAE,mCAAmC;;IAC/E,KAAK,MAAMC,mBAAmBP,0BAA2B;QACvD,MAAMQ,uBAAuBC,MAAMC,IAAI,CAACvB,qBAAqBwB,IAAI,IAAIC,MAAM,CAAC,CAACC,MAC3EA,IAAIC,UAAU,CAAC,CAAC,QAAQ,EAAEP,gBAAgBM,GAAG,CAAC,YAAY,CAAC;QAG7DP,uCAAuC;QACvCA,uCAAuCE,qBAAqBO,MAAM;IACpE;IAEAtC,UAAU;QACR,IAAI,CAACiB,mBAAmB;YACtB,MAAMsB,wBAA0D,EAAE;YAClE,IAAIC,sCAAsC,EAAE,wCAAwC;;YAEpFC,OAAOC,OAAO,CAAC1B,iBAAiB2B,OAAO,CAAC,CAAC,CAACP,KAAKQ,OAAO;gBACpD,IAAIR,IAAIC,UAAU,CAAC,CAAC,eAAe,EAAEtB,WAAW,CAAC,CAAC,GAAG;oBACnD,IAAI,CAACqB,IAAIS,QAAQ,CAAC,iBAAiB;wBACjCN,sBAAsBO,IAAI,CAACF;oBAC7B;oBACAJ;gBACF;YACF;YAEA,IAAIA,wCAAwCX,qCAAqC;gBAC/ET,oBAAoBmB;gBACpBrB,qBAAqB;gBAErB;;SAEC,GAED,MAAM6B,yBAAyB5C,mBAAmB;oBAChDa;oBACAD;oBACAiC,yBAAyB;wBACvBC,UAAUV;wBACVW,SAASzC;oBACX;gBACF;gBAEAa,8BACElB,2BACEK,sBAAsBA,sBAAsBP,4BAC5C6C,wBACAvC;YAGN;QACF;IACF,GAAG;QACDA;QACAe;QACAN;QACAD;QACAD;QACAQ,0BAA0Be,MAAM;QAChCnB;QACAE;QACAZ;QACAC;QACAmB;KACD;IAED7B,UAAU;QACR,IAAI,CAACiB,mBAAmB;YACtB;QACF;QACA,IAAIkC,YAAYtC;QAChB,IAAIsC,aAAa,QAAQ,CAAClC,qBAAqB,CAACI,4BAA4B;YAC1ET,WAAW;YACX;QACF;QAEA,oCAAoC;QACpC,IAAIS,4BAA4B4B,UAAUG,OAAOC,MAAMf,QAAQ;YAC7DjB,2BAA2B4B,QAAQ,CAACG,KAAK,CAACC,IAAI,CAACV,OAAO,CAAC,CAACW;gBACtDH,YAAYG,KAAK;oBAAEC,qBAAqBJ;gBAAU;YACpD;QACF;QAEA,IAAI,CAACA,aAAa,OAAOA,cAAc,UAAU;YAC/CvC,WAAW;YACX;QACF;QAEA,wCAAwC;QACxC,IAAIoB,MAAMwB,OAAO,CAACL,cAAc,CAAE,CAAA,UAAUA,SAAQ,GAAI;YACtDvC,WAAW;YACX;QACF;QAEA,yCAAyC;QACzC,IAAI,iBAAiBuC,WAAW;YAC9BvC,WAAW;YACX;QACF;QAEA,6BAA6B;QAC7B,MAAM6C,iBAAiB9D,qBAAqB;YAC1C+D,WAAWrC,2BAA2B6B,OAAO,CAACQ,SAAS;YACvDC,OAAOtD,gBAAgB;gBAAEuD,cAAcvC;YAA2B;YAClEwC,OAAOxC,2BAA2B6B,OAAO,CAACW,KAAK;QACjD;QACAJ,eAAeK,cAAc,CAACL,eAAeM,gBAAgB,CAACZ;QAE9D,MAAMa,cACJP,eAAeQ,cAAc,GAAGC,IAAI,CAAC;YACnC,OAAOpE,WAAWqE,cAAc;QAClC,MAAM;QAER,gEAAgE;QAChEvD,WAAWoD;IACb,GAAG;QAACnD;QAAUJ;QAAqBQ;QAAmBI;KAA2B;IAEjF,IAAI,CAACJ,mBAAmB;QACtB,qBACE,KAAClB,MAAMqE,QAAQ;sBACZpC,MAAMwB,OAAO,CAACjC,8BACbA,0BAA0B8C,GAAG,CAAC,CAACvC;gBAC7B,uGAAuG;gBACvG,MAAMC,uBAAuBC,MAAMC,IAAI,CAACvB,qBAAqBwB,IAAI,IAAIC,MAAM,CAAC,CAACC,MAC3EA,IAAIC,UAAU,CAAC,CAAC,QAAQ,EAAEP,gBAAgBM,GAAG,CAAC,YAAY,CAAC;gBAG7D,MAAMkC,oBAAuCvC,qBAAqBsC,GAAG,CAAC,CAACjC;oBACrE,OAAO1B,qBAAqBc,GAAG,CAACY;gBAClC;gBAEA,qBACE,MAACrC,MAAMqE,QAAQ;;wBACZE,mBAAmBhC,SAChBgC,kBAAkBD,GAAG,CAAC,CAACE;4BACrB,OAAOA;wBACT,KACA;wBACHzC,gBAAgB0C,eAAe;;mBANb1C,gBAAgBM,GAAG;YAS5C;;IAGR;IAEA,qBAAO,KAACqC;kBAAM9D;;AAChB,EAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/field/features/migrations/slateToLexical/nodes/unknownConvertedNode/Component.tsx"],
|
|
4
|
+
"sourcesContent": ["import React from 'react'\n\nimport type { UnknownConvertedNodeData } from './index.js'\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": "AAYI,OACgC,OAAAA,EADhC,QAAAC,MAAA,oBAJG,IAAMC,EAAkDC,GAAU,CACvE,GAAM,CAAE,KAAAC,CAAK,EAAID,EAEjB,OACEF,EAAC,OAAI,2CAC2BD,EAAC,UAAQ,SAAAI,GAAM,SAAS,GACxD,CAEJ",
|
|
6
|
+
"names": ["jsx", "jsxs", "UnknownConvertedNodeComponent", "props", "data"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{jsx as e,jsxs as t}from"react/jsx-runtime";var d=o=>{let{data:n}=o;return t("div",{children:["Unknown converted payload-plugin-lexical node: ",e("strong",{children:n?.nodeType})]})};export{d as UnknownConvertedNodeComponent};
|
|
2
|
+
//# sourceMappingURL=Component-SZVAYRJX.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/field/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/Component.tsx"],
|
|
4
|
+
"sourcesContent": ["import React from 'react'\n\nimport type { UnknownConvertedNodeData } from './index.js'\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": "AAYI,OACiD,OAAAA,EADjD,QAAAC,MAAA,oBAJG,IAAMC,EAAkDC,GAAU,CACvE,GAAM,CAAE,KAAAC,CAAK,EAAID,EAEjB,OACEF,EAAC,OAAI,4DAC4CD,EAAC,UAAQ,SAAAI,GAAM,SAAS,GACzE,CAEJ",
|
|
6
|
+
"names": ["jsx", "jsxs", "UnknownConvertedNodeComponent", "props", "data"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use client";import{a as he,b as G,c as O,e as Ee}from"./chunk-35NZOHAF.js";import{a as ye,b as N}from"./chunk-Y5455JF3.js";import{FieldDescription as Nn,FieldError as In,FieldLabel as Pn,useField as wn,useFieldProps as On,withCondition as kn}from"@payloadcms/ui/client";import{useCallback as An}from"react";import{ErrorBoundary as Dn}from"react-error-boundary";import"./bundled.css";import{LexicalComposer as vn}from"@lexical/react/LexicalComposer.js";import*as ct from"react";import{useMemo as st}from"react";import{useLexicalComposerContext as En}from"@lexical/react/LexicalComposerContext.js";import{LexicalErrorBoundary as xn}from"@lexical/react/LexicalErrorBoundary.js";import{HistoryPlugin as bn}from"@lexical/react/LexicalHistoryPlugin.js";import{OnChangePlugin as Mn}from"@lexical/react/LexicalOnChangePlugin.js";import{RichTextPlugin as Cn}from"@lexical/react/LexicalRichTextPlugin.js";import{TabIndentationPlugin as Tn}from"@lexical/react/LexicalTabIndentationPlugin.js";import{useTranslation as Rn}from"@payloadcms/ui/client";import{BLUR_COMMAND as Sn,COMMAND_PRIORITY_LOW as rt,FOCUS_COMMAND as Ln}from"lexical";import*as j from"react";import{useEffect as it,useState as lt}from"react";import{jsx as xe}from"react/jsx-runtime";var F=({anchorElem:t,clientProps:e,plugin:n})=>n.position==="floatingAnchorElem"?n.Component&&xe(n.Component,{anchorElem:t,clientProps:e}):n.Component&&xe(n.Component,{clientProps:e});import{MarkdownShortcutPlugin as ft}from"@lexical/react/LexicalMarkdownShortcutPlugin.js";import{jsx as pt}from"react/jsx-runtime";var be=()=>{let{editorConfig:t}=N();return pt(ft,{transformers:t.features.markdownTransformers})};import{useLexicalComposerContext as Kt}from"@lexical/react/LexicalComposerContext.js";import{useTranslation as Fe}from"@payloadcms/ui/client";import{useCallback as Be,useMemo as Gt,useState as Wt}from"react";import*as He from"react";import*as _e from"react-dom";import{useLexicalComposerContext as Ot}from"@lexical/react/LexicalComposerContext.js";import{mergeRegister as kt}from"@lexical/utils";import{$getSelection as ue,$isRangeSelection as me,$isTextNode as At,COMMAND_PRIORITY_LOW as Dt,createCommand as Bt}from"lexical";import{useCallback as Ne,useEffect as Ie,useState as Ft}from"react";import*as ce from"react";import{useLexicalComposerContext as Se}from"@lexical/react/LexicalComposerContext.js";import{mergeRegister as Me}from"@lexical/utils";import{$getSelection as gt,$isRangeSelection as ht,COMMAND_PRIORITY_LOW as W,KEY_ARROW_DOWN_COMMAND as yt,KEY_ARROW_UP_COMMAND as Et,KEY_ENTER_COMMAND as xt,KEY_ESCAPE_COMMAND as bt,KEY_TAB_COMMAND as Mt,createCommand as Ct}from"lexical";import{useCallback as J,useEffect as Y,useLayoutEffect as Tt,useMemo as Rt,useRef as St,useState as Lt}from"react";var vt="slash-menu-popup",Ce=t=>{let e=document.getElementById("slash-menu");if(!e)return;let n=e.getBoundingClientRect();n.top+n.height>window.innerHeight&&e.scrollIntoView({block:"center"}),n.top<0&&e.scrollIntoView({block:"center"}),t.scrollIntoView({block:"nearest"})};function Nt(t,e,n){let o=n;for(let r=o;r<=e.length;r++)t.substring(t.length-r)===e.substring(0,r)&&(o=r);return o}function It(t){let e=gt();if(!ht(e)||!e.isCollapsed())return null;let n=e.anchor;if(n.type!=="text")return null;let o=n.getNode();if(!o.isSimpleText())return null;let r=n.offset,u=o.getTextContent().slice(0,r),d=t.replaceableString.length,g=Nt(u,t.matchingString,d),s=r-g;if(s<0)return null;let a;return s===0?[a]=o.splitText(r):[,a]=o.splitText(s,r),a}function Pt(t,e){let n=getComputedStyle(t),o=n.position==="absolute",r=e?/(auto|scroll|hidden)/:/(auto|scroll)/;if(n.position==="fixed")return document.body;for(let u=t;u=u.parentElement;)if(n=getComputedStyle(u),!(o&&n.position==="static")&&r.test(n.overflow+n.overflowY+n.overflowX))return u;return document.body}function Te(t,e){let n=t.getBoundingClientRect(),o=e.getBoundingClientRect();return n.top>o.top&&n.top<o.bottom}function wt(t,e,n,o){let[r]=Se();Y(()=>{if(e!=null&&t!=null){let u=r.getRootElement(),d=u!=null?Pt(u,!1):document.body,g=!1,s=Te(e,d),a=function(){g||(window.requestAnimationFrame(function(){n(),g=!1}),g=!0);let m=Te(e,d);m!==s&&(s=m,o?.(m))},c=new ResizeObserver(n);return window.addEventListener("resize",n),document.addEventListener("scroll",a,{capture:!0,passive:!0}),c.observe(e),()=>{c.unobserve(e),window.removeEventListener("resize",n),document.removeEventListener("scroll",a,!0)}}},[e,r,o,n,t])}var Re=Ct("SCROLL_TYPEAHEAD_OPTION_INTO_VIEW_COMMAND");function Le({anchorElementRef:t,close:e,editor:n,groups:o,menuRenderFn:r,onSelectItem:u,resolution:d,shouldSplitNodeWithQuery:g=!1}){let[s,a]=Lt(null),c=d.match&&d.match.matchingString||"",m=J(p=>{let f=n.getRootElement();f!==null&&(f.setAttribute("aria-activedescendant",`${vt}__item-${p.key}`),a(p.key))},[n]),i=J(()=>{if(o!==null&&c!=null){let p=o.flatMap(f=>f.items);if(p.length){let f=p[0];m(f)}}},[o,m,c]);Y(()=>{i()},[c,i]);let l=J(p=>{n.update(()=>{let f=d.match!=null&&g?It(d.match):null;u(p,f,e,d.match?d.match.matchingString:"")})},[n,g,d.match,u,e]);Y(()=>()=>{let p=n.getRootElement();p!==null&&p.removeAttribute("aria-activedescendant")},[n]),Tt(()=>{o===null?a(null):s===null&&i()},[o,s,m,i]),Y(()=>Me(n.registerCommand(Re,({item:p})=>p.ref&&p.ref.current!=null?(Ce(p.ref.current),!0):!1,W)),[n,m]),Y(()=>Me(n.registerCommand(yt,p=>{let f=p;if(o!==null&&o.length&&s!==null){let y=o.flatMap(b=>b.items),h=y.findIndex(b=>b.key===s),x=h!==y.length-1?h+1:0,M=y[x];m(M),M.ref!=null&&M.ref.current&&n.dispatchCommand(Re,{index:x,item:M}),f.preventDefault(),f.stopImmediatePropagation()}return!0},W),n.registerCommand(Et,p=>{let f=p;if(o!==null&&o.length&&s!==null){let y=o.flatMap(b=>b.items),h=y.findIndex(b=>b.key===s),x=h!==0?h-1:y.length-1,M=y[x];m(M),M.ref!=null&&M.ref.current&&Ce(M.ref.current),f.preventDefault(),f.stopImmediatePropagation()}return!0},W),n.registerCommand(bt,p=>{let f=p;return f.preventDefault(),f.stopImmediatePropagation(),e(),!0},W),n.registerCommand(Mt,p=>{let f=p;if(o===null||s===null)return!1;let h=o.flatMap(x=>x.items).find(x=>x.key===s);return h?(f.preventDefault(),f.stopImmediatePropagation(),l(h),!0):!1},W),n.registerCommand(xt,p=>{if(o===null||s===null)return!1;let y=o.flatMap(h=>h.items).find(h=>h.key===s);return y?(p!==null&&(p.preventDefault(),p.stopImmediatePropagation()),l(y),!0):!1},W)),[l,e,n,o,s,m]);let E=Rt(()=>({groups:o,selectItemAndCleanUp:l,selectedItemKey:s,setSelectedItemKey:a}),[l,s,o]);return r(t,E,d.match?d.match.matchingString:"")}function ve(t,e,n,o){let[r]=Se(),u=St(document.createElement("div")),d=J(()=>{let s=r.getRootElement(),a=u.current,c=32,m=a.firstChild;if(s!==null&&e!==null){let{height:i,width:l}=e.getRect(),{left:E,top:p}=e.getRect(),f=p;if(p-=t.getBoundingClientRect().top+window.scrollY,E-=t.getBoundingClientRect().left+window.scrollX,a.style.left=`${E+window.scrollX}px`,a.style.height=`${i}px`,a.style.width=`${l}px`,m!==null){let y=m.getBoundingClientRect(),h=y.height,x=y.width,M=s.getBoundingClientRect();E+x>M.right&&(a.style.left=`${M.right-x+window.scrollX}px`);let b=f+h+c>window.innerHeight,T=f<0;b&&!T?a.style.top=`${p+c-h+window.scrollY-(i+24)}px`:a.style.top=`${p+window.scrollY+c}px`}a.isConnected||(o!=null&&(a.className=o),a.setAttribute("aria-label","Slash menu"),a.setAttribute("id","slash-menu"),a.setAttribute("role","listbox"),a.style.display="block",a.style.position="absolute",t.append(a)),u.current=a,s.setAttribute("aria-controls","slash-menu")}},[r,e,o,t]);Y(()=>{let s=r.getRootElement();if(e!==null)return d(),()=>{s!==null&&s.removeAttribute("aria-controls");let a=u.current;a!==null&&a.isConnected&&a.remove()}},[r,d,e]);let g=J(s=>{e!==null&&(s||n(null))},[e,n]);return wt(e,u.current,d,g),u}import{jsx as $t}from"react/jsx-runtime";var ke=`\\.,\\+\\*\\?\\$\\@\\|#{}\\(\\)\\^\\-\\[\\]\\\\/!%'"~=<>_:;`;function Ht(t){let e=t.anchor;if(e.type!=="text")return null;let n=e.getNode();if(!n.isSimpleText())return null;let o=e.offset;return n.getTextContent().slice(0,o)}function Pe(t,e,n){let o=n.getSelection();if(o===null||!o.isCollapsed)return!1;let r=o.anchorNode,u=t,d=o.anchorOffset;if(r==null||d==null)return!1;try{e.setStart(r,u),e.setEnd(r,d>1?d:1)}catch{return!1}return!0}function _t(t){let e=null;return t.getEditorState().read(()=>{let n=ue();me(n)&&(e=Ht(n))}),e}function we(t,e){return e!==0?!1:t.getEditorState().read(()=>{let n=ue();if(me(n)){let u=n.anchor.getNode().getPreviousSibling();return At(u)&&u.isTextEntity()}return!1})}function Oe(t){ce.startTransition?ce.startTransition(t):t()}var de=Bt("ENABLE_SLASH_MENU_COMMAND");function Ae({anchorClassName:t,anchorElem:e,groups:n,menuRenderFn:o,onClose:r,onOpen:u,onQueryChange:d,onSelectItem:g,triggerFn:s}){let[a]=Ot(),[c,m]=Ft(null),i=ve(e,c,m,t),l=Ne(()=>{m(null),r!=null&&c!==null&&r()},[r,c]),E=Ne(p=>{m(p),u!=null&&c===null&&u(p)},[u,c]);return Ie(()=>kt(a.registerCommand(de,({node:p})=>(a.getEditorState().read(()=>{let f={leadOffset:0,matchingString:"",replaceableString:""};if(f!==null&&!we(a,f.leadOffset)&&p!==null){let y=a._window??window,h=y.document.createRange();Pe(f.leadOffset,h,y)!==null&&Oe(()=>E({getRect:()=>h.getBoundingClientRect(),match:f}));return}}),!0),Dt)),[a,E]),Ie(()=>{let p=()=>{a.getEditorState().read(()=>{let y=a._window??window,h=y.document.createRange(),x=ue(),M=_t(a);if(!me(x)||!x.isCollapsed()||M===null||h===null){l();return}let b=s({editor:a,query:M});if(d(b?b.matchingString:null),b!==null&&!we(a,b.leadOffset)&&Pe(b.leadOffset,h,y)!==null){Oe(()=>E({getRect:()=>h.getBoundingClientRect(),match:b}));return}l()})},f=a.registerUpdateListener(p);return()=>{f()}},[a,s,d,c,l,E]),c===null||a===null?null:$t(Le,{anchorElementRef:i,close:l,editor:a,groups:n,menuRenderFn:o,onSelectItem:g,resolution:c,shouldSplitNodeWithQuery:!0})}import{useCallback as zt}from"react";function De(t,{maxLength:e=75,minLength:n=1}){return zt(({query:o})=>{let r="[^"+t+ke+"\\s]",d=new RegExp("(^|\\s|\\()(["+t+"]((?:"+r+"){0,"+e+"}))$").exec(o);if(d!==null){let g=d[1],s=d[3];if(s.length>=n)return{leadOffset:d.index+g.length,matchingString:s,replaceableString:d[2]}}return null},[e,n,t])}import{jsx as H,jsxs as ze}from"react/jsx-runtime";var P="slash-menu-popup";function Yt({isSelected:t,item:e,onClick:n,onMouseEnter:o}){let{i18n:r}=Fe(),u=`${P}__item ${P}__item-${e.key}`;t&&(u+=` ${P}__item--selected`);let d=e.key;return e.label&&(d=typeof e.label=="function"?e.label({i18n:r}):e.label),d.length>25&&(d=d.substring(0,25)+"..."),ze("button",{"aria-selected":t,className:u,id:P+"__item-"+e.key,onClick:n,onMouseEnter:o,ref:e.ref,role:"option",tabIndex:-1,type:"button",children:[e?.Icon&&H(e.Icon,{}),H("span",{className:`${P}__item-text`,children:d})]},e.key)}function $e({anchorElem:t=document.body}){let[e]=Kt(),[n,o]=Wt(null),{editorConfig:r}=N(),{i18n:u}=Fe(),d=De("/",{minLength:0}),g=Be(()=>{let c=[];for(let m of r.features.slashMenu.dynamicGroups){let i=m({editor:e,queryString:n});c=c.concat(i)}return c},[e,n,r?.features]),s=Gt(()=>{let c=[];for(let m of r?.features.slashMenu.groups??[])c.push(m);if(n){c=c.map(i=>{let l=i.items.filter(E=>{let p=E.key;return E.label&&(p=typeof E.label=="function"?E.label({i18n:u}):E.label),new RegExp(n,"gi").exec(p)?!0:E.keywords!=null?E.keywords.some(f=>new RegExp(n,"gi").exec(f)):!1});return l.length?{...i,items:l}:null}),c=c.filter(i=>i!=null);let m=g();for(let i of m){let l=c.find(E=>E.key===i.key);l?c=c.filter(E=>E.key!==i.key):l={...i,items:[]},l?.items?.length&&(l.items=l.items.concat(l.items)),c.push(l)}}return c},[g,n,r?.features,u]),a=Be((c,m,i,l)=>{m&&e.update(()=>{m.remove()}),c.onSelect({editor:e,queryString:l}),i()},[e]);return H(He.Fragment,{children:H(Ae,{anchorElem:t,groups:s,menuRenderFn:(c,{selectItemAndCleanUp:m,selectedItemKey:i,setSelectedItemKey:l})=>c.current&&s.length?_e.createPortal(H("div",{className:P,children:s.map(E=>{let p=E.key;return E.label&&(p=typeof E.label=="function"?E.label({i18n:u}):E.label),ze("div",{className:`${P}__group ${P}__group-${E.key}`,children:[H("div",{className:`${P}__group-title`,children:p}),E.items.map((f,y)=>H(Yt,{index:y,isSelected:i===f.key,item:f,onClick:()=>{l(f.key),m(f)},onMouseEnter:()=>{l(f.key)}},f.key))]},E.key)})}),c.current):null,onQueryChange:o,onSelectItem:a,triggerFn:d})})}import{useLexicalComposerContext as qt}from"@lexical/react/LexicalComposerContext.js";import{$createParagraphNode as Qt}from"lexical";import*as Ye from"react";import{useCallback as Zt,useEffect as We,useRef as en,useState as tn}from"react";import{createPortal as nn}from"react-dom";var V=(t,e,n,o,r=50,u=25)=>{let d=0;if(t&&!t.contains(o)){let{bottom:g,left:s,right:a,top:c}=t.getBoundingClientRect(),m=c+window.scrollY,i=g+window.scrollY;if(n<m-u||n>i+u||e<s-r||e>a+r)return-1;(e<s||e>a)&&(d=e<s?e-s:e-a)}return d};import{$getNodeByKey as ee}from"lexical";function k(t){let e=t.getBoundingClientRect(),n=getComputedStyle(t).getPropertyValue("transform");if(!n||n==="none")return e;let o=n.split(",").pop();return e.y=e.y-Number(o.replace(")","")),e}function Z(t){let e=(s,a)=>s?parseFloat(window.getComputedStyle(s)[a]):0,{marginBottom:n,marginTop:o}=window.getComputedStyle(t),r=e(t.previousElementSibling,"marginBottom"),u=e(t.nextElementSibling,"marginTop"),d=Math.max(parseFloat(o),r);return{marginBottom:Math.max(parseFloat(n),u),marginTop:d}}import{$getRoot as Vt}from"lexical";function _(t){return t.getEditorState().read(()=>Vt().getChildrenKeys())}var Ut=1,Xt=-1,Ke=0,w={props:null,result:null};function jt(t,e,n=20){let o=t.x-e.x,r=t.y-e.y;return o*o+r*r<=n*n}function U(t){let{anchorElem:e,cache_threshold:n=20,editor:o,fuzzy:r=!1,horizontalOffset:u=0,point:{x:d,y:g},startIndex:s=0,useEdgeAsDefault:a=!1,verbose:c=!1}=t;if(n>0&&w.props&&w.result&&w.props.fuzzy===t.fuzzy&&w.props.horizontalOffset===t.horizontalOffset&&w.props.useEdgeAsDefault===t.useEdgeAsDefault&&jt(w.props.point,t.point,n))return w.result;let m=e.getBoundingClientRect(),i=_(o),l={blockElem:null,blockNode:null,distance:1/0,foundAtIndex:-1,isFoundNodeEmptyParagraph:!1};return o.getEditorState().read(()=>{if(a){let[f,y]=[o.getElementByKey(i[0]),o.getElementByKey(i[i.length-1])],[h,x]=[k(f),k(y)];if(h&&x&&(g<h.top?(l.blockElem=f,l.distance=h.top-g,l.blockNode=ee(i[0]),l.foundAtIndex=0):g>x.bottom&&(l.distance=g-x.bottom,l.blockNode=ee(i[i.length-1]),l.blockElem=y,l.foundAtIndex=i.length-1),l?.blockElem))return{blockElem:null,isFoundNodeEmptyParagraph:!1}}let E=s,p=Ke;for(;E>=0&&E<i.length;){let f=i[E],y=o.getElementByKey(f);if(y===null)break;let h=new O(d+u,g),x=Ee.fromDOMRect(k(y)),{marginBottom:M,marginTop:b}=Z(y),T=x.generateNewRect({bottom:x.bottom+M,left:m.left,right:m.right,top:x.top-b}),{distance:L,isOnBottomSide:C,isOnTopSide:A}=T.distanceFromPoint(h);if(L===0){l.blockElem=y,l.blockNode=ee(f),l.foundAtIndex=E,l.distance=L,l.blockNode&&l.blockNode.getType()==="paragraph"&&l.blockNode.getTextContent()===""&&(!r&&!t.returnEmptyParagraphs&&(l.blockElem=null,l.blockNode=null),l.isFoundNodeEmptyParagraph=!0);break}else r&&L<l.distance&&(l.blockElem=y,l.blockNode=ee(f),l.distance=L,l.foundAtIndex=E);p===Ke&&(A?p=Xt:C?p=Ut:p=1/0),E+=p}}),w.props=t,w.result={blockElem:l.blockElem,blockNode:l.blockNode,foundAtIndex:l.foundAtIndex,isFoundNodeEmptyParagraph:l.isFoundNodeEmptyParagraph},{blockElem:l.blockElem,blockNode:l.blockNode,foundAtIndex:l.foundAtIndex,isFoundNodeEmptyParagraph:l.isFoundNodeEmptyParagraph}}function te(t,e){return!!t.closest(`.${e}`)}var Jt=["IMG","INPUT","TEXTAREA","SELECT","BUTTON","VIDEO","OBJECT","EMBED","IFRAME","HR"];function Ge(t){if(!t||Jt.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 ne(t,e,n,o=0){if(!t){e.style.opacity="0",e.style.transform="translate(-10000px, -10000px)";return}let r=t.getBoundingClientRect(),u=window.getComputedStyle(t),d=e.getBoundingClientRect(),g=n.getBoundingClientRect(),s;if(r.height<60)s=r.top-d.height/2-g.top+r.height/2-1;else{let m=Ge(t)?parseInt(u.lineHeight,10):0;s=r.top+(m-d.height)/2-g.top-1}let c=o;e.style.opacity="1",e.style.transform=`translate(${c}px, ${s}px)`}import{jsx as fe}from"react/jsx-runtime";var on="add-block-menu",oe=1/0;function rn(t){return t===0?1/0:oe>=0&&oe<t?oe:Math.floor(t/2)}function ln(t,e,n){let o=e.parentElement,{editorConfig:r}=N(),u=r?.admin?.hideGutter?-24:12,d=en(null),[g,s]=tn(null);We(()=>{function c(m){let i=m.target;if(!G(i))return;let l=V(o,m.pageX,m.pageY,i);if(l===-1){s(null);return}if(te(i,on))return;let E=_(t),{blockElem:p,blockNode:f,foundAtIndex:y}=U({anchorElem:e,cache_threshold:0,editor:t,horizontalOffset:-l,point:new O(m.x,m.y),returnEmptyParagraphs:!0,startIndex:rn(E.length),useEdgeAsDefault:!1});oe=y,p&&(g?.node!==f||g?.elem!==p)&&s({elem:p,node:f})}return document?.addEventListener("mousemove",c),()=>{document?.removeEventListener("mousemove",c)}},[o,e,t,g]),We(()=>{d.current&&g?.node&&ne(g?.elem,d.current,e,u)},[e,g,u]);let a=Zt(c=>{let m=g;m?.node&&(t.update(()=>{let i=!0;if((m.node.getType()!=="paragraph"||m.node.getTextContent()!=="")&&(i=!1),!i){let l=Qt();m.node.insertAfter(l),setTimeout(()=>{m={elem:t.getElementByKey(l.getKey()),node:l},s(m)},0)}}),setTimeout(()=>{t.update(()=>{t.focus(),m.node&&"select"in m.node&&typeof m.node.select=="function"&&m.node.select()})},1),setTimeout(()=>{t.dispatchCommand(de,{node:m.node})},2),c.stopPropagation(),c.preventDefault())},[t,g]);return nn(fe(Ye.Fragment,{children:fe("button",{className:"icon add-block-menu",onClick:c=>{a(c)},ref:d,type:"button",children:fe("div",{className:n?"icon":""})})}),e)}function Ve({anchorElem:t=document.body}){let[e]=qt();return ln(e,t,e._editable)}import{useLexicalComposerContext as cn}from"@lexical/react/LexicalComposerContext.js";import{eventFiles as je}from"@lexical/rich-text";import{$getNearestNodeFromDOMNode as Je,$getNodeByKey as un}from"lexical";import*as tt from"react";import{useEffect as pe,useRef as re,useState as qe}from"react";import{createPortal as mn}from"react-dom";function Ue(t,e,n){if(!t.current)return;let{left:o,top:r}=n.getBoundingClientRect(),u=k(e),d=u.width,g=u.height,s=u.top-r,a=u.left-o;t.current.style.border="2px solid green",t.current.style.boxSizing="border-box",t.current.style.height=g+"px",t.current.style.pointerEvents="none",t.current.style.position="absolute",t.current.style.top=s+"px",t.current.style.left=a+"px",t.current.style.width=d+"px",t.current.style.zIndex="1000",t.current.style.opacity="0.5"}var X=25,an=-24,sn=!1,$=0;function Xe(t,e,n,o,r,u,d,g,s,a=!1){let{height:c,top:m}=o.getBoundingClientRect(),{top:i,width:l}=d.getBoundingClientRect(),{marginBottom:E,marginTop:p}=Z(o),f=m,y=u>=m+c/2+window.scrollY,h=!1;if(r?.elem)if(o!==r?.elem)(y&&r?.elem&&r?.elem===o.nextElementSibling||!y&&r?.elem&&r?.elem===o.previousElementSibling)&&($++,$<200&&(h=!0));else{$++;let L=r?.boundingBox?.y,C=o.getBoundingClientRect().y;(y===r?.isBelow&&L===C||$<200)&&(h=!1)}if(h)return{isBelow:y,willStayInSamePosition:h};a?f+=c/2:y?f+=c+E/2:f-=p/2;let x=0;a||(y?x=-X:x=X);let M=f-i+x,b=an-e;n.style.width=`calc(${l}px - ${t})`,n.style.opacity=".4";let T=12;return a?n.style.transform=`translate(${b}px, ${M-X}px)`:y?(o.style.marginBottom=X*2+T+"px",n.style.transform=`translate(${b}px, calc(${M}px - 0px))`):(o.style.marginTop=X*2+T+"px",n.style.transform=`translate(${b}px, calc(${M-X*2}px - 0px))`),sn&&Ue(s,o,d),r.elem.style.opacity="",r?.elem===o?y?r.elem.style.marginTop="":r.elem.style.marginBottom="":(r.elem.style.marginBottom="",r.elem.style.marginTop=""),$=0,{isBelow:y,willStayInSamePosition:h}}import{jsx as ie,jsxs as gn}from"react/jsx-runtime";var dn="draggable-block-menu",Qe="application/x-lexical-drag-block",q=1/0;function Ze(t){return t===0?1/0:q>=0&&q<t?q:Math.floor(t/2)}function fn(t,e){let{transform:n}=e.style;t.setDragImage(e,0,0),setTimeout(()=>{e.style.transform=n})}function et(t,e){t&&(t.style.opacity="0"),e&&(e.style.opacity="",e.style.marginBottom="",e.style.marginTop="")}function pn(t,e,n){let o=e.parentElement,r=re(null),u=re(null),d=re(null),g=re(!1),[s,a]=qe(null),[c,m]=qe(null),{editorConfig:i}=N(),l=i?.admin?.hideGutter?-44:-8;pe(()=>{function f(y){let h=y.target;if(!G(h))return;let x=V(o,y.pageX,y.pageY,h);if(x===-1){a(null);return}if(te(h,dn))return;let M=_(t),{blockElem:b,foundAtIndex:T,isFoundNodeEmptyParagraph:L}=U({anchorElem:e,cache_threshold:0,editor:t,horizontalOffset:-x,point:new O(y.x,y.y),startIndex:Ze(M.length),useEdgeAsDefault:!1,verbose:!1});q=T,!(!b&&!L)&&s!==b&&a(b)}return document?.addEventListener("mousemove",f),()=>{document?.removeEventListener("mousemove",f)}},[o,e,t,s]),pe(()=>{r.current&&ne(s,r.current,e,l)},[e,s,l]),pe(()=>{function f(h){if(!g.current)return!1;let[x]=je(h);if(x)return!1;let{pageY:M,target:b}=h;if(!G(b))return!1;let T=V(o,h.pageX,h.pageY,b,100,50),L=_(t),{blockElem:C,foundAtIndex:A,isFoundNodeEmptyParagraph:D}=U({anchorElem:e,editor:t,fuzzy:!0,horizontalOffset:-T,point:new O(h.x,h.y),startIndex:Ze(L.length),useEdgeAsDefault:!0,verbose:!0});q=A;let B=u.current;if(C===null||B===null)return!1;if(s!==C){let{isBelow:v,willStayInSamePosition:I}=Xe(i?.admin?.hideGutter?"0px":"3rem",l+(i?.admin?.hideGutter?r?.current?.getBoundingClientRect()?.width??0:-r?.current?.getBoundingClientRect()?.width),B,C,c,M,e,h,d,D);h.preventDefault(),I||m({boundingBox:C.getBoundingClientRect(),elem:C,isBelow:v})}else et(B,c?.elem),m({boundingBox:C.getBoundingClientRect(),elem:C,isBelow:!1});return!0}function y(h){if(!g.current)return!1;let[x]=je(h);if(x)return!1;let{dataTransfer:M,pageY:b,target:T}=h,L=M?.getData(Qe)||"";return t.update(()=>{let C=un(L);if(!C||!G(T))return!1;let A=V(o,h.pageX,h.pageY,T,100,50),{blockElem:D,isFoundNodeEmptyParagraph:B}=U({anchorElem:e,editor:t,fuzzy:!0,horizontalOffset:-A,point:new O(h.x,h.y),useEdgeAsDefault:!0});if(!D)return!1;let v=Je(D);if(!v)return!1;if(v===C)return!0;let{height:I,top:se}=k(D),mt=b>=se+I/2+window.scrollY;B?(v.insertBefore(C),v.remove()):mt?v.insertAfter(C):v.insertBefore(C),s!==null&&a(null),document.querySelectorAll(".lexical-block-highlighter").forEach(K=>{K.remove()});let dt=t.getElementByKey(C.getKey());setTimeout(()=>{let K=dt.getBoundingClientRect(),S=document.createElement("div");S.className="lexical-block-highlighter",document.documentElement.getAttribute("data-theme")==="dark"?S.style.backgroundColor="white":S.style.backgroundColor="black",S.style.transition="opacity 0.1s ease-in-out",S.style.zIndex="1",S.style.pointerEvents="none",S.style.boxSizing="border-box",S.style.borderRadius="4px",S.style.position="absolute",document.body.appendChild(S),S.style.opacity="0.1",S.style.height=`${K.height+8}px`,S.style.width=`${K.width+8}px`,S.style.top=`${K.top+window.scrollY-4}px`,S.style.left=`${K.left-4}px`,setTimeout(()=>{S.style.opacity="0",setTimeout(()=>{S.remove()},1e3)},3e3)},120)}),!0}return document.addEventListener("dragover",f),document.addEventListener("drop",y),()=>{document.removeEventListener("dragover",f),document.removeEventListener("drop",y)}},[o,l,e,t,c,s,i?.admin?.hideGutter]);function E(f){let y=f.dataTransfer;if(!y||!s)return;fn(y,s);let h="";t.update(()=>{let x=Je(s);x&&(h=x.getKey())}),g.current=!0,y.setData(Qe,h)}function p(){g.current=!1,et(u.current,c?.elem)}return mn(gn(tt.Fragment,{children:[ie("div",{className:"icon draggable-block-menu",draggable:!0,onDragEnd:p,onDragStart:E,ref:r,children:ie("div",{className:n?"icon":""})}),ie("div",{className:"draggable-block-target-line",ref:u}),ie("div",{className:"debug-highlight",ref:d})]}),e)}function nt({anchorElem:t=document.body}){let[e]=cn();return pn(e,t,e._editable)}import{ContentEditable as hn}from"@lexical/react/LexicalContentEditable.js";import{jsx as yn}from"react/jsx-runtime";function ot({className:t}){return yn(hn,{className:t??"ContentEditable__root"})}import{jsx as R,jsxs as Q}from"react/jsx-runtime";var at=t=>{let{editorConfig:e,editorContainerRef:n,onChange:o}=t,r=N(),[u]=En(),{t:d}=Rn(),[g,s]=lt(null),a=i=>{i!==null&&s(i)};it(()=>{if(!r?.uuid){console.error("Lexical Editor must be used within an EditorConfigProvider");return}r?.parentEditor?.uuid&&r.parentEditor?.registerChild(r.uuid,r);let i=()=>{r.focusEditor(r)},l=()=>{r.blurEditor(r)},E=u.registerCommand(Ln,()=>(i(),!0),rt),p=u.registerCommand(Sn,()=>(l(),!0),rt);return()=>{E(),p(),r.parentEditor?.unregisterChild?.(r.uuid)}},[u,r]);let[c,m]=lt(!1);return it(()=>{let i=()=>{let l=window.matchMedia("(max-width: 768px)").matches;l!==c&&m(l)};return i(),window.addEventListener("resize",i),()=>{window.removeEventListener("resize",i)}},[c]),Q(j.Fragment,{children:[e.features.plugins.map(i=>{if(i.position==="aboveContainer")return R(F,{clientProps:i.clientProps,plugin:i},i.key)}),Q("div",{className:"editor-container",ref:n,children:[e.features.plugins.map(i=>{if(i.position==="top")return R(F,{clientProps:i.clientProps,plugin:i},i.key)}),R(Cn,{ErrorBoundary:xn,contentEditable:R("div",{className:"editor-scroller",children:R("div",{className:"editor",ref:a,children:R(ot,{})})}),placeholder:R("p",{className:"editor-placeholder",children:d("lexical:general:placeholder")})}),R(Mn,{ignoreSelectionChange:!0,onChange:(i,l,E)=>{(!E.has("focus")||E.size>1)&&o?.(i,l,E)}}),g&&Q(j.Fragment,{children:[!c&&u.isEditable()&&Q(j.Fragment,{children:[R(nt,{anchorElem:g}),R(Ve,{anchorElem:g})]}),e.features.plugins.map(i=>{if(i.position==="floatingAnchorElem"&&!(i.desktopOnly===!0&&c))return R(F,{anchorElem:g,clientProps:i.clientProps,plugin:i},i.key)}),u.isEditable()&&R(j.Fragment,{children:R($e,{anchorElem:g})})]}),u.isEditable()&&Q(j.Fragment,{children:[R(bn,{}),e?.features?.markdownTransformers?.length>0&&R(be,{})]}),R(Tn,{}),e.features.plugins.map(i=>{if(i.position==="normal")return R(F,{clientProps:i.clientProps,plugin:i},i.key)}),e.features.plugins.map(i=>{if(i.position==="bottom")return R(F,{clientProps:i.clientProps,plugin:i},i.key)})]}),e.features.plugins.map(i=>{if(i.position==="belowContainer")return R(F,{clientProps:i.clientProps,plugin:i},i.key)})]})};import{jsx as le}from"react/jsx-runtime";var ut=t=>{let{editorConfig:e,fieldProps:n,onChange:o,path:r,readOnly:u,value:d}=t,g=N(),s=ct.useRef(null),a=st(()=>{let m=d;return e?.features?.hooks?.load?.length&&e.features.hooks.load.forEach(i=>{m=i({incomingEditorState:m})}),m},[e,d]),c=st(()=>{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. This is not supported. There is no automatic conversion from Slate to Lexical data available yet (coming soon). Please remove the data from the field and start again.");if(a&&"jsonContent"in a)throw new Error("You have tried to pass in data from payload-plugin-lexical. This is not supported. The data structure has changed in this editor, compared to the plugin, and there is no automatic conversion available yet (coming soon). Please remove the data from the field and start again.");return{editable:u!==!0,editorState:a!=null?JSON.stringify(a):void 0,namespace:e.lexical.namespace,nodes:[...he({editorConfig:e})],onError:m=>{throw m},theme:e.lexical.theme}},[e,a,u]);return c?le(vn,{initialConfig:c,children:le(ye,{editorConfig:e,editorContainerRef:s,fieldProps:n,parentContext:g,children:le(at,{editorConfig:e,editorContainerRef:s,onChange:o})})},r):le("p",{children:"Loading..."})};import{jsx as z,jsxs as ge}from"react/jsx-runtime";var ae="rich-text-lexical",Bn=t=>{let{name:e,CustomDescription:n,CustomError:o,CustomLabel:r,className:u,descriptionProps:d,editorConfig:g,errorProps:s,label:a,labelProps:c,path:m,readOnly:i,required:l,style:E,validate:p,width:f}=t,y=An((v,I)=>{if(typeof p=="function")return p(v,{...I,props:t,required:l})},[p,l]),{path:h}=On(),x=wn({path:h??m??e,validate:y}),{errorMessage:M,initialValue:b,path:T,schemaPath:L,setValue:C,showError:A,value:D}=x,B=[ae,"field-type",u,A&&"error",i&&`${ae}--read-only`,g?.admin?.hideGutter!==!0?`${ae}--show-gutter`:null].filter(Boolean).join(" ");return ge("div",{className:B,style:{...E,width:f},children:[z(Pn,{CustomLabel:r,label:a,required:l,...c||{}}),ge("div",{className:`${ae}__wrap`,children:[z(In,{CustomError:o,path:T,...s||{}}),z(Dn,{fallbackRender:Fn,onReset:()=>{},children:z(ut,{editorConfig:g,fieldProps:t,onChange:v=>{let I=v.toJSON();g?.features?.hooks?.save?.length&&g.features.hooks.save.forEach(se=>{I=se({incomingEditorState:I})}),C(I)},path:T,readOnly:i,value:D},JSON.stringify({initialValue:b,path:T}))}),n!==void 0?n:z(Nn,{...d||{}})]})]},T)};function Fn({error:t}){return ge("div",{className:"errorBoundary",role:"alert",children:[z("p",{children:"Something went wrong:"}),z("pre",{style:{color:"red"},children:t.message})]})}var jr=kn(Bn);export{jr as RichText};
|
|
2
|
+
//# sourceMappingURL=Field-U5PHZTST.js.map
|