@payloadcms/richtext-lexical 3.0.0-beta.78 → 3.0.0-beta.80
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cell/index.d.ts +2 -2
- package/dist/cell/index.d.ts.map +1 -1
- package/dist/cell/index.js +5 -5
- package/dist/cell/index.js.map +1 -1
- package/dist/exports/client/Field-BYB3WX7J.js +2 -0
- package/dist/exports/client/Field-BYB3WX7J.js.map +7 -0
- package/dist/exports/client/RelationshipComponent-GYUTPDNG.js +2 -0
- package/dist/exports/client/RelationshipComponent-GYUTPDNG.js.map +7 -0
- package/dist/exports/client/bundled.css +1 -1
- package/dist/exports/client/chunk-4EX7W4UX.js +2 -0
- package/dist/exports/client/chunk-4EX7W4UX.js.map +7 -0
- package/dist/exports/client/chunk-E4HH5PS6.js +2 -0
- package/dist/exports/client/chunk-E4HH5PS6.js.map +7 -0
- package/dist/exports/client/chunk-LTR7V74A.js +2 -0
- package/dist/exports/client/chunk-LTR7V74A.js.map +7 -0
- package/dist/exports/client/chunk-SQHN3N6E.js +2 -0
- package/dist/exports/client/chunk-SQHN3N6E.js.map +7 -0
- package/dist/exports/client/chunk-VMCQSR3T.js +3 -0
- package/dist/exports/client/chunk-VMCQSR3T.js.map +7 -0
- package/dist/exports/client/component-6C5JERGA.js +2 -0
- package/dist/exports/client/component-6C5JERGA.js.map +7 -0
- package/dist/exports/client/component-GUWIGB77.js +2 -0
- package/dist/exports/client/component-GUWIGB77.js.map +7 -0
- package/dist/exports/client/component-UQ2BKD5X.js +2 -0
- package/dist/exports/client/component-UQ2BKD5X.js.map +7 -0
- package/dist/exports/client/componentInline-C2XIK5VZ.js +2 -0
- package/dist/exports/client/componentInline-C2XIK5VZ.js.map +7 -0
- package/dist/exports/client/index.d.ts +21 -22
- package/dist/exports/client/index.d.ts.map +1 -1
- package/dist/exports/client/index.js +12 -12
- package/dist/exports/client/index.js.map +4 -4
- package/dist/exports/server/migrate.d.ts +16 -0
- package/dist/exports/server/migrate.d.ts.map +1 -0
- package/dist/exports/server/migrate.js +17 -0
- package/dist/exports/server/migrate.js.map +1 -0
- package/dist/features/align/client/index.d.ts +5 -0
- package/dist/features/align/client/index.d.ts.map +1 -0
- package/dist/features/align/client/index.js +146 -0
- package/dist/features/align/client/index.js.map +1 -0
- package/dist/features/align/client/toolbarAlignGroup.d.ts +3 -0
- package/dist/features/align/client/toolbarAlignGroup.d.ts.map +1 -0
- package/dist/features/align/client/toolbarAlignGroup.js +12 -0
- package/dist/features/align/client/toolbarAlignGroup.js.map +1 -0
- package/dist/features/align/server/i18n.d.ts.map +1 -0
- package/dist/features/align/server/i18n.js.map +1 -0
- package/dist/features/align/server/index.d.ts +2 -0
- package/dist/features/align/server/index.d.ts.map +1 -0
- package/dist/features/align/server/index.js +11 -0
- package/dist/features/align/server/index.js.map +1 -0
- package/dist/features/blockquote/client/index.d.ts +5 -0
- package/dist/features/blockquote/client/index.d.ts.map +1 -0
- package/dist/features/blockquote/client/index.js +77 -0
- package/dist/features/blockquote/client/index.js.map +1 -0
- package/dist/features/blockquote/server/i18n.d.ts.map +1 -0
- package/dist/features/blockquote/server/i18n.js.map +1 -0
- package/dist/features/blockquote/server/index.d.ts +7 -0
- package/dist/features/blockquote/server/index.d.ts.map +1 -0
- package/dist/features/blockquote/server/index.js +46 -0
- package/dist/features/blockquote/server/index.js.map +1 -0
- package/dist/features/blocks/client/component/BlockContent.d.ts +22 -0
- package/dist/features/blocks/client/component/BlockContent.d.ts.map +1 -0
- package/dist/features/blocks/client/component/BlockContent.js +198 -0
- package/dist/features/blocks/client/component/BlockContent.js.map +1 -0
- package/dist/features/blocks/client/component/FormSavePlugin.d.ts.map +1 -0
- package/dist/features/blocks/client/component/FormSavePlugin.js.map +1 -0
- package/dist/features/blocks/client/component/index.d.ts +11 -0
- package/dist/features/blocks/client/component/index.d.ts.map +1 -0
- package/dist/features/blocks/client/component/index.js +157 -0
- package/dist/features/blocks/client/component/index.js.map +1 -0
- package/dist/features/blocks/client/component/removeEmptyArrayValues.d.ts.map +1 -0
- package/dist/features/blocks/client/component/removeEmptyArrayValues.js.map +1 -0
- package/dist/features/blocks/client/componentInline/index.d.ts.map +1 -0
- package/dist/features/blocks/client/componentInline/index.js +138 -0
- package/dist/features/blocks/client/componentInline/index.js.map +1 -0
- package/dist/features/blocks/client/index.d.ts +9 -0
- package/dist/features/blocks/client/index.d.ts.map +1 -0
- package/dist/features/blocks/client/index.js +152 -0
- package/dist/features/blocks/client/index.js.map +1 -0
- package/dist/features/blocks/client/nodes/BlocksNode.d.ts +14 -0
- package/dist/features/blocks/client/nodes/BlocksNode.d.ts.map +1 -0
- package/dist/features/blocks/client/nodes/BlocksNode.js +52 -0
- package/dist/features/blocks/client/nodes/BlocksNode.js.map +1 -0
- package/dist/features/blocks/client/nodes/InlineBlocksNode.d.ts +25 -0
- package/dist/features/blocks/client/nodes/InlineBlocksNode.d.ts.map +1 -0
- package/dist/features/blocks/client/nodes/InlineBlocksNode.js +41 -0
- package/dist/features/blocks/client/nodes/InlineBlocksNode.js.map +1 -0
- package/dist/features/blocks/client/plugin/commands.d.ts.map +1 -0
- package/dist/features/blocks/client/plugin/commands.js.map +1 -0
- package/dist/features/blocks/client/plugin/index.d.ts +6 -0
- package/dist/features/blocks/client/plugin/index.d.ts.map +1 -0
- package/dist/features/blocks/client/plugin/index.js +129 -0
- package/dist/features/blocks/client/plugin/index.js.map +1 -0
- package/dist/features/blocks/server/graphQLPopulationPromise.d.ts +6 -0
- package/dist/features/blocks/server/graphQLPopulationPromise.d.ts.map +1 -0
- package/dist/features/blocks/server/graphQLPopulationPromise.js +31 -0
- package/dist/features/blocks/server/graphQLPopulationPromise.js.map +1 -0
- package/dist/features/blocks/server/i18n.d.ts.map +1 -0
- package/dist/features/blocks/server/i18n.js.map +1 -0
- package/dist/features/blocks/server/index.d.ts +8 -0
- package/dist/features/blocks/server/index.d.ts.map +1 -0
- package/dist/features/blocks/server/index.js +162 -0
- package/dist/features/blocks/server/index.js.map +1 -0
- package/dist/features/blocks/server/nodes/BlocksNode.d.ts +38 -0
- package/dist/features/blocks/server/nodes/BlocksNode.d.ts.map +1 -0
- package/dist/features/blocks/server/nodes/BlocksNode.js +84 -0
- package/dist/features/blocks/server/nodes/BlocksNode.js.map +1 -0
- package/dist/features/blocks/server/nodes/InlineBlocksNode.d.ts +40 -0
- package/dist/features/blocks/server/nodes/InlineBlocksNode.d.ts.map +1 -0
- package/dist/features/blocks/server/nodes/InlineBlocksNode.js +86 -0
- package/dist/features/blocks/server/nodes/InlineBlocksNode.js.map +1 -0
- package/dist/features/blocks/server/validate.d.ts +6 -0
- package/dist/features/blocks/server/validate.d.ts.map +1 -0
- package/dist/features/blocks/server/validate.js.map +1 -0
- package/dist/features/converters/html/field/index.js.map +1 -1
- package/dist/features/converters/html/index.d.ts +8 -0
- package/dist/features/converters/html/index.d.ts.map +1 -0
- package/dist/features/converters/html/index.js +8 -0
- package/dist/features/converters/html/index.js.map +1 -0
- package/dist/features/createClientComponent.d.ts +3 -3
- package/dist/features/createClientComponent.d.ts.map +1 -1
- package/dist/features/createClientComponent.js.map +1 -1
- package/dist/features/createFeaturePropComponent.js +1 -1
- package/dist/features/createFeaturePropComponent.js.map +1 -1
- package/dist/features/debug/testRecorder/client/index.d.ts +5 -0
- package/dist/features/debug/testRecorder/client/index.d.ts.map +1 -0
- package/dist/features/debug/testRecorder/client/index.js +13 -0
- package/dist/features/debug/testRecorder/client/index.js.map +1 -0
- package/dist/features/debug/testRecorder/client/plugin/index.d.ts +5 -0
- package/dist/features/debug/testRecorder/client/plugin/index.d.ts.map +1 -0
- package/dist/features/debug/testRecorder/client/plugin/index.js +471 -0
- package/dist/features/debug/testRecorder/client/plugin/index.js.map +1 -0
- package/dist/features/debug/testRecorder/server/index.d.ts +2 -0
- package/dist/features/debug/testRecorder/server/index.d.ts.map +1 -0
- package/dist/features/debug/testRecorder/server/index.js +9 -0
- package/dist/features/debug/testRecorder/server/index.js.map +1 -0
- package/dist/features/debug/treeView/client/index.d.ts +5 -0
- package/dist/features/debug/treeView/client/index.d.ts.map +1 -0
- package/dist/features/debug/treeView/client/index.js +13 -0
- package/dist/features/debug/treeView/client/index.js.map +1 -0
- package/dist/features/debug/treeView/client/plugin/index.d.ts +4 -0
- package/dist/features/debug/treeView/client/plugin/index.d.ts.map +1 -0
- package/dist/features/debug/treeView/client/plugin/index.js.map +1 -0
- package/dist/features/debug/treeView/server/index.d.ts +2 -0
- package/dist/features/debug/treeView/server/index.d.ts.map +1 -0
- package/dist/features/debug/treeView/server/index.js +9 -0
- package/dist/features/debug/treeView/server/index.js.map +1 -0
- package/dist/features/experimental_table/client/index.d.ts +2 -0
- package/dist/features/experimental_table/client/index.d.ts.map +1 -0
- package/dist/features/experimental_table/client/index.js +71 -0
- package/dist/features/experimental_table/client/index.js.map +1 -0
- package/dist/features/experimental_table/client/plugins/TableActionMenuPlugin/index.d.ts +4 -0
- package/dist/features/experimental_table/client/plugins/TableActionMenuPlugin/index.d.ts.map +1 -0
- package/dist/features/experimental_table/client/plugins/TableActionMenuPlugin/index.js +605 -0
- package/dist/features/experimental_table/client/plugins/TableActionMenuPlugin/index.js.map +1 -0
- package/dist/features/experimental_table/client/plugins/TableCellResizerPlugin/index.d.ts +3 -0
- package/dist/features/experimental_table/client/plugins/TableCellResizerPlugin/index.d.ts.map +1 -0
- package/dist/features/experimental_table/client/plugins/TableCellResizerPlugin/index.js +327 -0
- package/dist/features/experimental_table/client/plugins/TableCellResizerPlugin/index.js.map +1 -0
- package/dist/features/experimental_table/client/plugins/TableHoverActionsPlugin/index.d.ts +12 -0
- package/dist/features/experimental_table/client/plugins/TableHoverActionsPlugin/index.d.ts.map +1 -0
- package/dist/features/experimental_table/client/plugins/TableHoverActionsPlugin/index.js +181 -0
- package/dist/features/experimental_table/client/plugins/TableHoverActionsPlugin/index.js.map +1 -0
- package/dist/features/experimental_table/client/plugins/TablePlugin/index.d.ts +24 -0
- package/dist/features/experimental_table/client/plugins/TablePlugin/index.d.ts.map +1 -0
- package/dist/features/experimental_table/client/plugins/TablePlugin/index.js +103 -0
- package/dist/features/experimental_table/client/plugins/TablePlugin/index.js.map +1 -0
- package/dist/features/experimental_table/client/utils/debounce.d.ts.map +1 -0
- package/dist/features/experimental_table/client/utils/debounce.js.map +1 -0
- package/dist/features/experimental_table/client/utils/useDebounce.d.ts.map +1 -0
- package/dist/features/experimental_table/client/utils/useDebounce.js.map +1 -0
- package/dist/features/experimental_table/plugins/TableHoverActionsPlugin/index.js +1 -1
- package/dist/features/experimental_table/plugins/TableHoverActionsPlugin/index.js.map +1 -1
- package/dist/features/experimental_table/server/index.d.ts +13 -0
- package/dist/features/experimental_table/server/index.d.ts.map +1 -0
- package/dist/features/experimental_table/server/index.js +123 -0
- package/dist/features/experimental_table/server/index.js.map +1 -0
- package/dist/features/format/bold/feature.server.d.ts.map +1 -1
- package/dist/features/format/bold/feature.server.js +1 -3
- package/dist/features/format/bold/feature.server.js.map +1 -1
- package/dist/features/format/inlineCode/feature.server.d.ts.map +1 -1
- package/dist/features/format/inlineCode/feature.server.js +1 -3
- package/dist/features/format/inlineCode/feature.server.js.map +1 -1
- package/dist/features/format/italic/feature.server.d.ts.map +1 -1
- package/dist/features/format/italic/feature.server.js +1 -3
- package/dist/features/format/italic/feature.server.js.map +1 -1
- package/dist/features/format/strikethrough/feature.server.d.ts.map +1 -1
- package/dist/features/format/strikethrough/feature.server.js +1 -3
- package/dist/features/format/strikethrough/feature.server.js.map +1 -1
- package/dist/features/format/subscript/feature.server.d.ts.map +1 -1
- package/dist/features/format/subscript/feature.server.js +1 -3
- package/dist/features/format/subscript/feature.server.js.map +1 -1
- package/dist/features/format/superscript/feature.server.d.ts.map +1 -1
- package/dist/features/format/superscript/feature.server.js +1 -3
- package/dist/features/format/superscript/feature.server.js.map +1 -1
- package/dist/features/format/underline/feature.server.d.ts.map +1 -1
- package/dist/features/format/underline/feature.server.js +1 -3
- package/dist/features/format/underline/feature.server.js.map +1 -1
- package/dist/features/heading/client/index.d.ts +6 -0
- package/dist/features/heading/client/index.d.ts.map +1 -0
- package/dist/features/heading/client/index.js +112 -0
- package/dist/features/heading/client/index.js.map +1 -0
- package/dist/features/heading/server/i18n.d.ts.map +1 -0
- package/dist/features/heading/server/i18n.js.map +1 -0
- package/dist/features/heading/server/index.d.ts +10 -0
- package/dist/features/heading/server/index.d.ts.map +1 -0
- package/dist/features/heading/server/index.js +60 -0
- package/dist/features/heading/server/index.js.map +1 -0
- package/dist/features/horizontalRule/client/component/index.d.ts.map +1 -0
- package/dist/features/horizontalRule/client/component/index.js.map +1 -0
- package/dist/features/horizontalRule/client/index.d.ts +5 -0
- package/dist/features/horizontalRule/client/index.d.ts.map +1 -0
- package/dist/features/horizontalRule/client/index.js +71 -0
- package/dist/features/horizontalRule/client/index.js.map +1 -0
- package/dist/features/horizontalRule/client/markdownTransformer.d.ts.map +1 -0
- package/dist/features/horizontalRule/client/markdownTransformer.js.map +1 -0
- package/dist/features/horizontalRule/client/nodes/HorizontalRuleNode.d.ts +20 -0
- package/dist/features/horizontalRule/client/nodes/HorizontalRuleNode.d.ts.map +1 -0
- package/dist/features/horizontalRule/client/nodes/HorizontalRuleNode.js +43 -0
- package/dist/features/horizontalRule/client/nodes/HorizontalRuleNode.js.map +1 -0
- package/dist/features/horizontalRule/client/plugin/index.d.ts +7 -0
- package/dist/features/horizontalRule/client/plugin/index.d.ts.map +1 -0
- package/dist/features/horizontalRule/client/plugin/index.js +31 -0
- package/dist/features/horizontalRule/client/plugin/index.js.map +1 -0
- package/dist/features/horizontalRule/server/i18n.d.ts.map +1 -0
- package/dist/features/horizontalRule/server/i18n.js.map +1 -0
- package/dist/features/horizontalRule/server/index.d.ts +2 -0
- package/dist/features/horizontalRule/server/index.d.ts.map +1 -0
- package/dist/features/horizontalRule/server/index.js +32 -0
- package/dist/features/horizontalRule/server/index.js.map +1 -0
- package/dist/features/horizontalRule/server/markdownTransformer.d.ts +3 -0
- package/dist/features/horizontalRule/server/markdownTransformer.d.ts.map +1 -0
- package/dist/features/horizontalRule/server/markdownTransformer.js +23 -0
- package/dist/features/horizontalRule/server/markdownTransformer.js.map +1 -0
- package/dist/features/horizontalRule/server/nodes/HorizontalRuleNode.d.ts +53 -0
- package/dist/features/horizontalRule/server/nodes/HorizontalRuleNode.d.ts.map +1 -0
- package/dist/features/horizontalRule/server/nodes/HorizontalRuleNode.js +83 -0
- package/dist/features/horizontalRule/server/nodes/HorizontalRuleNode.js.map +1 -0
- package/dist/features/indent/client/index.d.ts +5 -0
- package/dist/features/indent/client/index.d.ts.map +1 -0
- package/dist/features/indent/client/index.js +56 -0
- package/dist/features/indent/client/index.js.map +1 -0
- package/dist/features/indent/client/toolbarIndentGroup.d.ts +3 -0
- package/dist/features/indent/client/toolbarIndentGroup.d.ts.map +1 -0
- package/dist/features/indent/client/toolbarIndentGroup.js.map +1 -0
- package/dist/features/indent/server/i18n.d.ts.map +1 -0
- package/dist/features/indent/server/i18n.js.map +1 -0
- package/dist/features/indent/server/index.d.ts +2 -0
- package/dist/features/indent/server/index.d.ts.map +1 -0
- package/dist/features/indent/server/index.js +11 -0
- package/dist/features/indent/server/index.js.map +1 -0
- package/dist/features/link/client/index.d.ts +16 -0
- package/dist/features/link/client/index.d.ts.map +1 -0
- package/dist/features/link/client/index.js +101 -0
- package/dist/features/link/client/index.js.map +1 -0
- package/dist/features/link/client/plugins/autoLink/index.d.ts +20 -0
- package/dist/features/link/client/plugins/autoLink/index.d.ts.map +1 -0
- package/dist/features/link/client/plugins/autoLink/index.js +335 -0
- package/dist/features/link/client/plugins/autoLink/index.js.map +1 -0
- package/dist/features/link/client/plugins/clickableLink/index.d.ts +4 -0
- package/dist/features/link/client/plugins/clickableLink/index.d.ts.map +1 -0
- package/dist/features/link/client/plugins/clickableLink/index.js.map +1 -0
- package/dist/features/link/client/plugins/floatingLinkEditor/LinkEditor/commands.d.ts.map +1 -0
- package/dist/features/link/client/plugins/floatingLinkEditor/LinkEditor/commands.js.map +1 -0
- package/dist/features/link/client/plugins/floatingLinkEditor/LinkEditor/index.d.ts.map +1 -0
- package/dist/features/link/client/plugins/floatingLinkEditor/LinkEditor/index.js +299 -0
- package/dist/features/link/client/plugins/floatingLinkEditor/LinkEditor/index.js.map +1 -0
- package/dist/features/link/client/plugins/floatingLinkEditor/index.d.ts +5 -0
- package/dist/features/link/client/plugins/floatingLinkEditor/index.d.ts.map +1 -0
- package/dist/features/link/client/plugins/floatingLinkEditor/index.js.map +1 -0
- package/dist/features/link/client/plugins/floatingLinkEditor/types.d.ts +15 -0
- package/dist/features/link/client/plugins/floatingLinkEditor/types.d.ts.map +1 -0
- package/dist/features/link/client/plugins/floatingLinkEditor/types.js.map +1 -0
- package/dist/features/link/client/plugins/link/index.d.ts +4 -0
- package/dist/features/link/client/plugins/link/index.d.ts.map +1 -0
- package/dist/features/link/client/plugins/link/index.js +51 -0
- package/dist/features/link/client/plugins/link/index.js.map +1 -0
- package/dist/features/link/nodes/LinkNode.d.ts +1 -1
- package/dist/features/link/nodes/LinkNode.d.ts.map +1 -1
- package/dist/features/link/nodes/LinkNode.js.map +1 -1
- package/dist/features/link/server/baseFields.d.ts.map +1 -0
- package/dist/features/link/server/baseFields.js.map +1 -0
- package/dist/features/link/server/graphQLPopulationPromise.d.ts +5 -0
- package/dist/features/link/server/graphQLPopulationPromise.d.ts.map +1 -0
- package/dist/features/link/server/graphQLPopulationPromise.js +31 -0
- package/dist/features/link/server/graphQLPopulationPromise.js.map +1 -0
- package/dist/features/link/server/i18n.d.ts.map +1 -0
- package/dist/features/link/server/i18n.js.map +1 -0
- package/dist/features/link/server/index.d.ts +35 -0
- package/dist/features/link/server/index.d.ts.map +1 -0
- package/dist/features/link/server/index.js +132 -0
- package/dist/features/link/server/index.js.map +1 -0
- package/dist/features/link/server/transformExtraFields.d.ts +9 -0
- package/dist/features/link/server/transformExtraFields.d.ts.map +1 -0
- package/dist/features/link/server/transformExtraFields.js +20 -0
- package/dist/features/link/server/transformExtraFields.js.map +1 -0
- package/dist/features/link/server/validate.d.ts +6 -0
- package/dist/features/link/server/validate.d.ts.map +1 -0
- package/dist/features/link/server/validate.js.map +1 -0
- package/dist/features/lists/checklist/client/index.d.ts +5 -0
- package/dist/features/lists/checklist/client/index.d.ts.map +1 -0
- package/dist/features/lists/checklist/client/index.js +100 -0
- package/dist/features/lists/checklist/client/index.js.map +1 -0
- package/dist/features/lists/checklist/client/plugin/index.d.ts +3 -0
- package/dist/features/lists/checklist/client/plugin/index.d.ts.map +1 -0
- package/dist/features/lists/checklist/client/plugin/index.js.map +1 -0
- package/dist/features/lists/checklist/server/i18n.d.ts.map +1 -0
- package/dist/features/lists/checklist/server/i18n.js.map +1 -0
- package/dist/features/lists/checklist/server/index.d.ts +2 -0
- package/dist/features/lists/checklist/server/index.d.ts.map +1 -0
- package/dist/features/lists/checklist/server/index.js +34 -0
- package/dist/features/lists/checklist/server/index.js.map +1 -0
- package/dist/features/lists/orderedList/client/index.d.ts +5 -0
- package/dist/features/lists/orderedList/client/index.d.ts.map +1 -0
- package/dist/features/lists/orderedList/client/index.js +90 -0
- package/dist/features/lists/orderedList/client/index.js.map +1 -0
- package/dist/features/lists/orderedList/server/i18n.d.ts.map +1 -0
- package/dist/features/lists/orderedList/server/i18n.js.map +1 -0
- package/dist/features/lists/orderedList/server/index.d.ts +2 -0
- package/dist/features/lists/orderedList/server/index.d.ts.map +1 -0
- package/dist/features/lists/orderedList/server/index.js +34 -0
- package/dist/features/lists/orderedList/server/index.js.map +1 -0
- package/dist/features/lists/unorderedList/client/index.d.ts +5 -0
- package/dist/features/lists/unorderedList/client/index.d.ts.map +1 -0
- package/dist/features/lists/unorderedList/client/index.js +88 -0
- package/dist/features/lists/unorderedList/client/index.js.map +1 -0
- package/dist/features/lists/unorderedList/server/i18n.d.ts.map +1 -0
- package/dist/features/lists/unorderedList/server/i18n.js.map +1 -0
- package/dist/features/lists/unorderedList/server/index.d.ts +2 -0
- package/dist/features/lists/unorderedList/server/index.d.ts.map +1 -0
- package/dist/features/lists/unorderedList/server/index.js +32 -0
- package/dist/features/lists/unorderedList/server/index.js.map +1 -0
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/heading/converter.d.ts +1 -1
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/heading/converter.d.ts.map +1 -1
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/heading/converter.js +4 -3
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/heading/converter.js.map +1 -1
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/link/converter.d.ts +1 -1
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/link/converter.d.ts.map +1 -1
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/link/converter.js +4 -3
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/link/converter.js.map +1 -1
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/list/converter.d.ts +1 -1
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/list/converter.d.ts.map +1 -1
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/list/converter.js +4 -3
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/list/converter.js.map +1 -1
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/listItem/converter.d.ts +1 -1
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/listItem/converter.d.ts.map +1 -1
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/listItem/converter.js +4 -3
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/listItem/converter.js.map +1 -1
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/quote/converter.d.ts +1 -1
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/quote/converter.d.ts.map +1 -1
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/quote/converter.js +4 -3
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/quote/converter.js.map +1 -1
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/unknown/converter.d.ts +1 -1
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/unknown/converter.d.ts.map +1 -1
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/unknown/converter.js +4 -3
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/unknown/converter.js.map +1 -1
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/upload/converter.d.ts +1 -1
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/upload/converter.d.ts.map +1 -1
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/upload/converter.js +1 -1
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/upload/converter.js.map +1 -1
- package/dist/features/migrations/lexicalPluginToLexical/converter/defaultConverters.d.ts +2 -2
- package/dist/features/migrations/lexicalPluginToLexical/converter/defaultConverters.d.ts.map +1 -1
- package/dist/features/migrations/lexicalPluginToLexical/converter/defaultConverters.js +7 -7
- package/dist/features/migrations/lexicalPluginToLexical/converter/defaultConverters.js.map +1 -1
- package/dist/features/migrations/lexicalPluginToLexical/converter/index.d.ts +5 -3
- package/dist/features/migrations/lexicalPluginToLexical/converter/index.d.ts.map +1 -1
- package/dist/features/migrations/lexicalPluginToLexical/converter/index.js +15 -9
- package/dist/features/migrations/lexicalPluginToLexical/converter/index.js.map +1 -1
- package/dist/features/migrations/lexicalPluginToLexical/converter/types.d.ts +1 -9
- package/dist/features/migrations/lexicalPluginToLexical/converter/types.d.ts.map +1 -1
- package/dist/features/migrations/lexicalPluginToLexical/converter/types.js.map +1 -1
- package/dist/features/migrations/lexicalPluginToLexical/feature.client.d.ts.map +1 -1
- package/dist/features/migrations/lexicalPluginToLexical/feature.client.js +1 -16
- package/dist/features/migrations/lexicalPluginToLexical/feature.client.js.map +1 -1
- package/dist/features/migrations/lexicalPluginToLexical/feature.server.d.ts +4 -3
- package/dist/features/migrations/lexicalPluginToLexical/feature.server.d.ts.map +1 -1
- package/dist/features/migrations/lexicalPluginToLexical/feature.server.js +16 -11
- package/dist/features/migrations/lexicalPluginToLexical/feature.server.js.map +1 -1
- package/dist/features/migrations/slateToLexical/converter/converters/blockquote/converter.d.ts +1 -1
- package/dist/features/migrations/slateToLexical/converter/converters/blockquote/converter.d.ts.map +1 -1
- package/dist/features/migrations/slateToLexical/converter/converters/blockquote/converter.js +1 -1
- package/dist/features/migrations/slateToLexical/converter/converters/blockquote/converter.js.map +1 -1
- package/dist/features/migrations/slateToLexical/converter/converters/heading/converter.d.ts +1 -1
- package/dist/features/migrations/slateToLexical/converter/converters/heading/converter.d.ts.map +1 -1
- package/dist/features/migrations/slateToLexical/converter/converters/heading/converter.js +1 -1
- package/dist/features/migrations/slateToLexical/converter/converters/heading/converter.js.map +1 -1
- package/dist/features/migrations/slateToLexical/converter/converters/indent/converter.d.ts +1 -1
- package/dist/features/migrations/slateToLexical/converter/converters/indent/converter.d.ts.map +1 -1
- package/dist/features/migrations/slateToLexical/converter/converters/indent/converter.js +1 -1
- package/dist/features/migrations/slateToLexical/converter/converters/indent/converter.js.map +1 -1
- package/dist/features/migrations/slateToLexical/converter/converters/link/converter.d.ts +1 -1
- package/dist/features/migrations/slateToLexical/converter/converters/link/converter.d.ts.map +1 -1
- package/dist/features/migrations/slateToLexical/converter/converters/link/converter.js +1 -1
- package/dist/features/migrations/slateToLexical/converter/converters/link/converter.js.map +1 -1
- package/dist/features/migrations/slateToLexical/converter/converters/listItem/converter.d.ts +1 -1
- package/dist/features/migrations/slateToLexical/converter/converters/listItem/converter.d.ts.map +1 -1
- package/dist/features/migrations/slateToLexical/converter/converters/listItem/converter.js +1 -1
- package/dist/features/migrations/slateToLexical/converter/converters/listItem/converter.js.map +1 -1
- package/dist/features/migrations/slateToLexical/converter/converters/orderedList/converter.d.ts +1 -1
- package/dist/features/migrations/slateToLexical/converter/converters/orderedList/converter.d.ts.map +1 -1
- package/dist/features/migrations/slateToLexical/converter/converters/orderedList/converter.js +1 -1
- package/dist/features/migrations/slateToLexical/converter/converters/orderedList/converter.js.map +1 -1
- package/dist/features/migrations/slateToLexical/converter/converters/relationship/converter.d.ts +1 -1
- package/dist/features/migrations/slateToLexical/converter/converters/relationship/converter.d.ts.map +1 -1
- package/dist/features/migrations/slateToLexical/converter/converters/relationship/converter.js +1 -1
- package/dist/features/migrations/slateToLexical/converter/converters/relationship/converter.js.map +1 -1
- package/dist/features/migrations/slateToLexical/converter/converters/unknown/converter.d.ts +1 -1
- package/dist/features/migrations/slateToLexical/converter/converters/unknown/converter.d.ts.map +1 -1
- package/dist/features/migrations/slateToLexical/converter/converters/unknown/converter.js +1 -1
- package/dist/features/migrations/slateToLexical/converter/converters/unknown/converter.js.map +1 -1
- package/dist/features/migrations/slateToLexical/converter/converters/unorderedList/converter.d.ts +1 -1
- package/dist/features/migrations/slateToLexical/converter/converters/unorderedList/converter.d.ts.map +1 -1
- package/dist/features/migrations/slateToLexical/converter/converters/unorderedList/converter.js +1 -1
- package/dist/features/migrations/slateToLexical/converter/converters/unorderedList/converter.js.map +1 -1
- package/dist/features/migrations/slateToLexical/converter/converters/upload/converter.d.ts +1 -1
- package/dist/features/migrations/slateToLexical/converter/converters/upload/converter.d.ts.map +1 -1
- package/dist/features/migrations/slateToLexical/converter/converters/upload/converter.js +1 -1
- package/dist/features/migrations/slateToLexical/converter/converters/upload/converter.js.map +1 -1
- package/dist/features/migrations/slateToLexical/converter/defaultConverters.d.ts +2 -2
- package/dist/features/migrations/slateToLexical/converter/defaultConverters.d.ts.map +1 -1
- package/dist/features/migrations/slateToLexical/converter/defaultConverters.js +10 -10
- package/dist/features/migrations/slateToLexical/converter/defaultConverters.js.map +1 -1
- package/dist/features/migrations/slateToLexical/converter/types.d.ts +0 -9
- package/dist/features/migrations/slateToLexical/converter/types.d.ts.map +1 -1
- package/dist/features/migrations/slateToLexical/converter/types.js.map +1 -1
- package/dist/features/migrations/slateToLexical/feature.client.d.ts.map +1 -1
- package/dist/features/migrations/slateToLexical/feature.client.js +0 -15
- package/dist/features/migrations/slateToLexical/feature.client.js.map +1 -1
- package/dist/features/migrations/slateToLexical/feature.server.d.ts +5 -5
- package/dist/features/migrations/slateToLexical/feature.server.d.ts.map +1 -1
- package/dist/features/migrations/slateToLexical/feature.server.js +15 -11
- package/dist/features/migrations/slateToLexical/feature.server.js.map +1 -1
- package/dist/features/paragraph/client/index.d.ts +5 -0
- package/dist/features/paragraph/client/index.d.ts.map +1 -0
- package/dist/features/paragraph/client/index.js +71 -0
- package/dist/features/paragraph/client/index.js.map +1 -0
- package/dist/features/paragraph/server/i18n.d.ts.map +1 -0
- package/dist/features/paragraph/server/i18n.js.map +1 -0
- package/dist/features/paragraph/server/index.d.ts +2 -0
- package/dist/features/paragraph/server/index.d.ts.map +1 -0
- package/dist/features/paragraph/server/index.js +12 -0
- package/dist/features/paragraph/server/index.js.map +1 -0
- package/dist/features/relationship/client/components/RelationshipComponent.d.ts +13 -0
- package/dist/features/relationship/client/components/RelationshipComponent.d.ts.map +1 -0
- package/dist/features/relationship/client/components/RelationshipComponent.js +171 -0
- package/dist/features/relationship/client/components/RelationshipComponent.js.map +1 -0
- package/dist/features/relationship/client/drawer/commands.d.ts.map +1 -0
- package/dist/features/relationship/client/drawer/commands.js.map +1 -0
- package/dist/features/relationship/client/drawer/index.d.ts.map +1 -0
- package/dist/features/relationship/client/drawer/index.js.map +1 -0
- package/dist/features/relationship/client/index.d.ts +18 -0
- package/dist/features/relationship/client/index.d.ts.map +1 -0
- package/dist/features/relationship/client/index.js +72 -0
- package/dist/features/relationship/client/index.js.map +1 -0
- package/dist/features/relationship/client/nodes/RelationshipNode.d.ts +15 -0
- package/dist/features/relationship/client/nodes/RelationshipNode.d.ts.map +1 -0
- package/dist/features/relationship/client/nodes/RelationshipNode.js +74 -0
- package/dist/features/relationship/client/nodes/RelationshipNode.js.map +1 -0
- package/dist/features/relationship/client/plugins/index.d.ts +7 -0
- package/dist/features/relationship/client/plugins/index.d.ts.map +1 -0
- package/dist/features/relationship/client/plugins/index.js +50 -0
- package/dist/features/relationship/client/plugins/index.js.map +1 -0
- package/dist/features/relationship/client/utils/EnabledRelationshipsCondition.d.ts.map +1 -0
- package/dist/features/relationship/client/utils/EnabledRelationshipsCondition.js +33 -0
- package/dist/features/relationship/client/utils/EnabledRelationshipsCondition.js.map +1 -0
- package/dist/features/relationship/server/graphQLPopulationPromise.d.ts +5 -0
- package/dist/features/relationship/server/graphQLPopulationPromise.d.ts.map +1 -0
- package/dist/features/relationship/server/graphQLPopulationPromise.js +29 -0
- package/dist/features/relationship/server/graphQLPopulationPromise.js.map +1 -0
- package/dist/features/relationship/server/i18n.d.ts.map +1 -0
- package/dist/features/relationship/server/i18n.js.map +1 -0
- package/dist/features/relationship/server/index.d.ts +27 -0
- package/dist/features/relationship/server/index.d.ts.map +1 -0
- package/dist/features/relationship/server/index.js +53 -0
- package/dist/features/relationship/server/index.js.map +1 -0
- package/dist/features/relationship/server/nodes/RelationshipNode.d.ts +35 -0
- package/dist/features/relationship/server/nodes/RelationshipNode.d.ts.map +1 -0
- package/dist/features/relationship/server/nodes/RelationshipNode.js +101 -0
- package/dist/features/relationship/server/nodes/RelationshipNode.js.map +1 -0
- package/dist/features/toolbars/fixed/client/Toolbar/index.d.ts +5 -0
- package/dist/features/toolbars/fixed/client/Toolbar/index.d.ts.map +1 -0
- package/dist/features/toolbars/fixed/client/Toolbar/index.js +209 -0
- package/dist/features/toolbars/fixed/client/Toolbar/index.js.map +1 -0
- package/dist/features/toolbars/fixed/client/index.d.ts +6 -0
- package/dist/features/toolbars/fixed/client/index.d.ts.map +1 -0
- package/dist/features/toolbars/fixed/client/index.js +13 -0
- package/dist/features/toolbars/fixed/client/index.js.map +1 -0
- package/dist/features/toolbars/fixed/server/index.d.ts +18 -0
- package/dist/features/toolbars/fixed/server/index.d.ts.map +1 -0
- package/dist/features/toolbars/fixed/server/index.js +17 -0
- package/dist/features/toolbars/fixed/server/index.js.map +1 -0
- package/dist/features/toolbars/inline/client/Toolbar/index.d.ts +4 -0
- package/dist/features/toolbars/inline/client/Toolbar/index.d.ts.map +1 -0
- package/dist/features/toolbars/inline/client/Toolbar/index.js +319 -0
- package/dist/features/toolbars/inline/client/Toolbar/index.js.map +1 -0
- package/dist/features/toolbars/inline/client/index.d.ts +5 -0
- package/dist/features/toolbars/inline/client/index.d.ts.map +1 -0
- package/dist/features/toolbars/inline/client/index.js +13 -0
- package/dist/features/toolbars/inline/client/index.js.map +1 -0
- package/dist/features/toolbars/inline/server/index.d.ts +2 -0
- package/dist/features/toolbars/inline/server/index.d.ts.map +1 -0
- package/dist/features/toolbars/inline/server/index.js +9 -0
- package/dist/features/toolbars/inline/server/index.js.map +1 -0
- package/dist/features/toolbars/shared/ToolbarDropdown/index.d.ts.map +1 -1
- package/dist/features/toolbars/shared/ToolbarDropdown/index.js +3 -1
- package/dist/features/toolbars/shared/ToolbarDropdown/index.js.map +1 -1
- package/dist/features/toolbars/types.d.ts +2 -1
- package/dist/features/toolbars/types.d.ts.map +1 -1
- package/dist/features/toolbars/types.js.map +1 -1
- package/dist/features/typesServer.d.ts +17 -13
- package/dist/features/typesServer.d.ts.map +1 -1
- package/dist/features/typesServer.js.map +1 -1
- package/dist/features/upload/client/component/index.d.ts +9 -0
- package/dist/features/upload/client/component/index.d.ts.map +1 -0
- package/dist/features/upload/client/component/index.js +248 -0
- package/dist/features/upload/client/component/index.js.map +1 -0
- package/dist/features/upload/client/drawer/commands.d.ts.map +1 -0
- package/dist/features/upload/client/drawer/commands.js.map +1 -0
- package/dist/features/upload/client/drawer/index.d.ts.map +1 -0
- package/dist/features/upload/client/drawer/index.js +77 -0
- package/dist/features/upload/client/drawer/index.js.map +1 -0
- package/dist/features/upload/client/feature.client.d.ts.map +1 -0
- package/dist/features/upload/client/feature.client.js +74 -0
- package/dist/features/upload/client/feature.client.js.map +1 -0
- package/dist/features/upload/client/nodes/UploadNode.d.ts +22 -0
- package/dist/features/upload/client/nodes/UploadNode.d.ts.map +1 -0
- package/dist/features/upload/client/nodes/UploadNode.js +91 -0
- package/dist/features/upload/client/nodes/UploadNode.js.map +1 -0
- package/dist/features/upload/client/plugin/index.d.ts +8 -0
- package/dist/features/upload/client/plugin/index.d.ts.map +1 -0
- package/dist/features/upload/client/plugin/index.js +53 -0
- package/dist/features/upload/client/plugin/index.js.map +1 -0
- package/dist/features/upload/server/feature.server.d.ts +18 -0
- package/dist/features/upload/server/feature.server.d.ts.map +1 -0
- package/dist/features/upload/server/feature.server.js +189 -0
- package/dist/features/upload/server/feature.server.js.map +1 -0
- package/dist/features/upload/server/graphQLPopulationPromise.d.ts +5 -0
- package/dist/features/upload/server/graphQLPopulationPromise.d.ts.map +1 -0
- package/dist/features/upload/server/graphQLPopulationPromise.js +52 -0
- package/dist/features/upload/server/graphQLPopulationPromise.js.map +1 -0
- package/dist/features/upload/server/i18n.d.ts.map +1 -0
- package/dist/features/upload/server/i18n.js.map +1 -0
- package/dist/features/upload/server/nodes/UploadNode.d.ts +40 -0
- package/dist/features/upload/server/nodes/UploadNode.d.ts.map +1 -0
- package/dist/features/upload/server/nodes/UploadNode.js +128 -0
- package/dist/features/upload/server/nodes/UploadNode.js.map +1 -0
- package/dist/features/upload/server/validate.d.ts +5 -0
- package/dist/features/upload/server/validate.d.ts.map +1 -0
- package/dist/features/upload/server/validate.js.map +1 -0
- package/dist/field/Field.d.ts +7 -7
- package/dist/field/Field.d.ts.map +1 -1
- package/dist/field/Field.js +8 -6
- package/dist/field/Field.js.map +1 -1
- package/dist/field/index.d.ts +2 -9
- package/dist/field/index.d.ts.map +1 -1
- package/dist/field/index.js +8 -8
- package/dist/field/index.js.map +1 -1
- package/dist/index.d.ts +23 -38
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +83 -68
- package/dist/index.js.map +1 -1
- package/dist/lexical/LexicalProvider.d.ts +2 -6
- package/dist/lexical/LexicalProvider.d.ts.map +1 -1
- package/dist/lexical/LexicalProvider.js +2 -2
- package/dist/lexical/LexicalProvider.js.map +1 -1
- package/dist/lexical/config/client/EditorConfigProvider.d.ts +4 -12
- package/dist/lexical/config/client/EditorConfigProvider.d.ts.map +1 -1
- package/dist/lexical/config/client/EditorConfigProvider.js +3 -3
- package/dist/lexical/config/client/EditorConfigProvider.js.map +1 -1
- package/dist/lexical/config/server/default.js +13 -13
- package/dist/lexical/config/server/default.js.map +1 -1
- package/dist/lexical/config/server/sanitize.d.ts.map +1 -1
- package/dist/lexical/config/server/sanitize.js +24 -6
- package/dist/lexical/config/server/sanitize.js.map +1 -1
- package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/types.d.ts +6 -2
- package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/types.d.ts.map +1 -1
- package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/types.js.map +1 -1
- package/dist/lexical/plugins/SlashMenu/index.d.ts.map +1 -1
- package/dist/lexical/plugins/SlashMenu/index.js +14 -4
- package/dist/lexical/plugins/SlashMenu/index.js.map +1 -1
- package/dist/lexical/theme/EditorTheme.d.ts +0 -1
- package/dist/lexical/theme/EditorTheme.d.ts.map +1 -1
- package/dist/lexical/theme/EditorTheme.js.map +1 -1
- package/dist/nodeTypes.d.ts +8 -8
- package/dist/nodeTypes.d.ts.map +1 -1
- package/dist/nodeTypes.js.map +1 -1
- package/dist/types.d.ts +6 -8
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js.map +1 -1
- package/dist/utilities/fieldsDrawer/Drawer.d.ts +10 -8
- package/dist/utilities/fieldsDrawer/Drawer.d.ts.map +1 -1
- package/dist/utilities/fieldsDrawer/Drawer.js +3 -1
- package/dist/utilities/fieldsDrawer/Drawer.js.map +1 -1
- package/dist/utilities/fieldsDrawer/DrawerContent.d.ts.map +1 -1
- package/dist/utilities/fieldsDrawer/DrawerContent.js +6 -6
- package/dist/utilities/fieldsDrawer/DrawerContent.js.map +1 -1
- package/dist/utilities/generateComponentMap.d.ts +2 -2
- package/dist/utilities/generateComponentMap.d.ts.map +1 -1
- package/dist/utilities/generateComponentMap.js +38 -28
- package/dist/utilities/generateComponentMap.js.map +1 -1
- package/dist/utilities/generateImportMap.d.ts +6 -0
- package/dist/utilities/generateImportMap.d.ts.map +1 -0
- package/dist/utilities/generateImportMap.js +50 -0
- package/dist/utilities/generateImportMap.js.map +1 -0
- package/dist/utilities/generateSchemaMap.d.ts.map +1 -1
- package/dist/utilities/generateSchemaMap.js +2 -1
- package/dist/utilities/generateSchemaMap.js.map +1 -1
- package/dist/utilities/migrateSlateToLexical/migrateDocumentFieldsRecursively.d.ts.map +1 -1
- package/dist/utilities/migrateSlateToLexical/migrateDocumentFieldsRecursively.js +1 -5
- package/dist/utilities/migrateSlateToLexical/migrateDocumentFieldsRecursively.js.map +1 -1
- package/dist/utilities/useLexicalFeature.js +1 -1
- package/dist/utilities/useLexicalFeature.js.map +1 -1
- package/package.json +21 -11
- package/dist/exports/client/Field-5GGTGCKC.js +0 -2
- package/dist/exports/client/Field-5GGTGCKC.js.map +0 -7
- package/dist/exports/client/RelationshipComponent-ZR2OCBGL.js +0 -2
- package/dist/exports/client/RelationshipComponent-ZR2OCBGL.js.map +0 -7
- package/dist/exports/client/chunk-6QXGZYUK.js +0 -2
- package/dist/exports/client/chunk-6QXGZYUK.js.map +0 -7
- package/dist/exports/client/chunk-IPCJ5EVK.js +0 -2
- package/dist/exports/client/chunk-IPCJ5EVK.js.map +0 -7
- package/dist/exports/client/chunk-IWZVO3AI.js +0 -2
- package/dist/exports/client/chunk-IWZVO3AI.js.map +0 -7
- package/dist/exports/client/chunk-Q5DYR7MH.js +0 -3
- package/dist/exports/client/chunk-Q5DYR7MH.js.map +0 -7
- package/dist/exports/client/chunk-VUVXZJJR.js +0 -2
- package/dist/exports/client/chunk-VUVXZJJR.js.map +0 -7
- package/dist/exports/client/component-D4GWDXK5.js +0 -2
- package/dist/exports/client/component-D4GWDXK5.js.map +0 -7
- package/dist/exports/client/component-KA7FDRMA.js +0 -2
- package/dist/exports/client/component-KA7FDRMA.js.map +0 -7
- package/dist/exports/client/component-VM36FRT2.js +0 -2
- package/dist/exports/client/component-VM36FRT2.js.map +0 -7
- package/dist/exports/client/componentInline-6EKPZSCV.js +0 -2
- package/dist/exports/client/componentInline-6EKPZSCV.js.map +0 -7
- package/dist/features/align/feature.client.d.ts +0 -5
- package/dist/features/align/feature.client.d.ts.map +0 -1
- package/dist/features/align/feature.client.js +0 -146
- package/dist/features/align/feature.client.js.map +0 -1
- package/dist/features/align/feature.server.d.ts +0 -2
- package/dist/features/align/feature.server.d.ts.map +0 -1
- package/dist/features/align/feature.server.js +0 -13
- package/dist/features/align/feature.server.js.map +0 -1
- package/dist/features/align/i18n.d.ts.map +0 -1
- package/dist/features/align/i18n.js.map +0 -1
- package/dist/features/align/toolbarAlignGroup.d.ts +0 -3
- package/dist/features/align/toolbarAlignGroup.d.ts.map +0 -1
- package/dist/features/align/toolbarAlignGroup.js +0 -12
- package/dist/features/align/toolbarAlignGroup.js.map +0 -1
- package/dist/features/blockquote/feature.client.d.ts +0 -5
- package/dist/features/blockquote/feature.client.d.ts.map +0 -1
- package/dist/features/blockquote/feature.client.js +0 -77
- package/dist/features/blockquote/feature.client.js.map +0 -1
- package/dist/features/blockquote/feature.server.d.ts +0 -7
- package/dist/features/blockquote/feature.server.d.ts.map +0 -1
- package/dist/features/blockquote/feature.server.js +0 -48
- package/dist/features/blockquote/feature.server.js.map +0 -1
- package/dist/features/blockquote/i18n.d.ts.map +0 -1
- package/dist/features/blockquote/i18n.js.map +0 -1
- package/dist/features/blocks/component/BlockContent.d.ts +0 -27
- package/dist/features/blocks/component/BlockContent.d.ts.map +0 -1
- package/dist/features/blocks/component/BlockContent.js +0 -196
- package/dist/features/blocks/component/BlockContent.js.map +0 -1
- package/dist/features/blocks/component/FormSavePlugin.d.ts.map +0 -1
- package/dist/features/blocks/component/FormSavePlugin.js.map +0 -1
- package/dist/features/blocks/component/index.d.ts +0 -11
- package/dist/features/blocks/component/index.d.ts.map +0 -1
- package/dist/features/blocks/component/index.js +0 -162
- package/dist/features/blocks/component/index.js.map +0 -1
- package/dist/features/blocks/component/removeEmptyArrayValues.d.ts.map +0 -1
- package/dist/features/blocks/component/removeEmptyArrayValues.js.map +0 -1
- package/dist/features/blocks/componentInline/index.d.ts.map +0 -1
- package/dist/features/blocks/componentInline/index.js +0 -133
- package/dist/features/blocks/componentInline/index.js.map +0 -1
- package/dist/features/blocks/feature.client.d.ts +0 -13
- package/dist/features/blocks/feature.client.d.ts.map +0 -1
- package/dist/features/blocks/feature.client.js +0 -148
- package/dist/features/blocks/feature.client.js.map +0 -1
- package/dist/features/blocks/feature.server.d.ts +0 -8
- package/dist/features/blocks/feature.server.d.ts.map +0 -1
- package/dist/features/blocks/feature.server.js +0 -160
- package/dist/features/blocks/feature.server.js.map +0 -1
- package/dist/features/blocks/graphQLPopulationPromise.d.ts +0 -6
- package/dist/features/blocks/graphQLPopulationPromise.d.ts.map +0 -1
- package/dist/features/blocks/graphQLPopulationPromise.js +0 -31
- package/dist/features/blocks/graphQLPopulationPromise.js.map +0 -1
- package/dist/features/blocks/i18n.d.ts.map +0 -1
- package/dist/features/blocks/i18n.js.map +0 -1
- package/dist/features/blocks/nodes/BlocksNode.d.ts +0 -38
- package/dist/features/blocks/nodes/BlocksNode.d.ts.map +0 -1
- package/dist/features/blocks/nodes/BlocksNode.js +0 -92
- package/dist/features/blocks/nodes/BlocksNode.js.map +0 -1
- package/dist/features/blocks/nodes/InlineBlocksNode.d.ts +0 -39
- package/dist/features/blocks/nodes/InlineBlocksNode.d.ts.map +0 -1
- package/dist/features/blocks/nodes/InlineBlocksNode.js +0 -94
- package/dist/features/blocks/nodes/InlineBlocksNode.js.map +0 -1
- package/dist/features/blocks/plugin/commands.d.ts.map +0 -1
- package/dist/features/blocks/plugin/commands.js.map +0 -1
- package/dist/features/blocks/plugin/index.d.ts +0 -6
- package/dist/features/blocks/plugin/index.d.ts.map +0 -1
- package/dist/features/blocks/plugin/index.js +0 -111
- package/dist/features/blocks/plugin/index.js.map +0 -1
- package/dist/features/blocks/validate.d.ts +0 -6
- package/dist/features/blocks/validate.d.ts.map +0 -1
- package/dist/features/blocks/validate.js.map +0 -1
- package/dist/features/converters/html/feature.server.d.ts +0 -8
- package/dist/features/converters/html/feature.server.d.ts.map +0 -1
- package/dist/features/converters/html/feature.server.js +0 -8
- package/dist/features/converters/html/feature.server.js.map +0 -1
- package/dist/features/debug/testRecorder/feature.client.d.ts +0 -5
- package/dist/features/debug/testRecorder/feature.client.d.ts.map +0 -1
- package/dist/features/debug/testRecorder/feature.client.js +0 -13
- package/dist/features/debug/testRecorder/feature.client.js.map +0 -1
- package/dist/features/debug/testRecorder/feature.server.d.ts +0 -2
- package/dist/features/debug/testRecorder/feature.server.d.ts.map +0 -1
- package/dist/features/debug/testRecorder/feature.server.js +0 -11
- package/dist/features/debug/testRecorder/feature.server.js.map +0 -1
- package/dist/features/debug/testRecorder/plugin/index.d.ts +0 -5
- package/dist/features/debug/testRecorder/plugin/index.d.ts.map +0 -1
- package/dist/features/debug/testRecorder/plugin/index.js +0 -471
- package/dist/features/debug/testRecorder/plugin/index.js.map +0 -1
- package/dist/features/debug/treeView/feature.client.d.ts +0 -5
- package/dist/features/debug/treeView/feature.client.d.ts.map +0 -1
- package/dist/features/debug/treeView/feature.client.js +0 -13
- package/dist/features/debug/treeView/feature.client.js.map +0 -1
- package/dist/features/debug/treeView/feature.server.d.ts +0 -2
- package/dist/features/debug/treeView/feature.server.d.ts.map +0 -1
- package/dist/features/debug/treeView/feature.server.js +0 -11
- package/dist/features/debug/treeView/feature.server.js.map +0 -1
- package/dist/features/debug/treeView/plugin/index.d.ts +0 -4
- package/dist/features/debug/treeView/plugin/index.d.ts.map +0 -1
- package/dist/features/debug/treeView/plugin/index.js.map +0 -1
- package/dist/features/experimental_table/feature.client.d.ts +0 -2
- package/dist/features/experimental_table/feature.client.d.ts.map +0 -1
- package/dist/features/experimental_table/feature.client.js +0 -71
- package/dist/features/experimental_table/feature.client.js.map +0 -1
- package/dist/features/experimental_table/feature.server.d.ts +0 -13
- package/dist/features/experimental_table/feature.server.d.ts.map +0 -1
- package/dist/features/experimental_table/feature.server.js +0 -125
- package/dist/features/experimental_table/feature.server.js.map +0 -1
- package/dist/features/experimental_table/plugins/TableActionMenuPlugin/index.d.ts +0 -4
- package/dist/features/experimental_table/plugins/TableActionMenuPlugin/index.d.ts.map +0 -1
- package/dist/features/experimental_table/plugins/TableActionMenuPlugin/index.js +0 -604
- package/dist/features/experimental_table/plugins/TableActionMenuPlugin/index.js.map +0 -1
- package/dist/features/experimental_table/plugins/TableCellResizerPlugin/index.d.ts +0 -3
- package/dist/features/experimental_table/plugins/TableCellResizerPlugin/index.d.ts.map +0 -1
- package/dist/features/experimental_table/plugins/TableCellResizerPlugin/index.js +0 -327
- package/dist/features/experimental_table/plugins/TableCellResizerPlugin/index.js.map +0 -1
- package/dist/features/experimental_table/plugins/TablePlugin/index.d.ts +0 -24
- package/dist/features/experimental_table/plugins/TablePlugin/index.d.ts.map +0 -1
- package/dist/features/experimental_table/plugins/TablePlugin/index.js +0 -98
- package/dist/features/experimental_table/plugins/TablePlugin/index.js.map +0 -1
- package/dist/features/experimental_table/utils/debounce.d.ts.map +0 -1
- package/dist/features/experimental_table/utils/debounce.js.map +0 -1
- package/dist/features/experimental_table/utils/useDebounce.d.ts.map +0 -1
- package/dist/features/experimental_table/utils/useDebounce.js.map +0 -1
- package/dist/features/heading/feature.client.d.ts +0 -6
- package/dist/features/heading/feature.client.d.ts.map +0 -1
- package/dist/features/heading/feature.client.js +0 -112
- package/dist/features/heading/feature.client.js.map +0 -1
- package/dist/features/heading/feature.server.d.ts +0 -10
- package/dist/features/heading/feature.server.d.ts.map +0 -1
- package/dist/features/heading/feature.server.js +0 -62
- package/dist/features/heading/feature.server.js.map +0 -1
- package/dist/features/heading/i18n.d.ts.map +0 -1
- package/dist/features/heading/i18n.js.map +0 -1
- package/dist/features/horizontalRule/component/index.d.ts.map +0 -1
- package/dist/features/horizontalRule/component/index.js.map +0 -1
- package/dist/features/horizontalRule/feature.client.d.ts +0 -5
- package/dist/features/horizontalRule/feature.client.d.ts.map +0 -1
- package/dist/features/horizontalRule/feature.client.js +0 -70
- package/dist/features/horizontalRule/feature.client.js.map +0 -1
- package/dist/features/horizontalRule/feature.server.d.ts +0 -2
- package/dist/features/horizontalRule/feature.server.d.ts.map +0 -1
- package/dist/features/horizontalRule/feature.server.js +0 -34
- package/dist/features/horizontalRule/feature.server.js.map +0 -1
- package/dist/features/horizontalRule/i18n.d.ts.map +0 -1
- package/dist/features/horizontalRule/i18n.js.map +0 -1
- package/dist/features/horizontalRule/markdownTransformer.d.ts.map +0 -1
- package/dist/features/horizontalRule/markdownTransformer.js.map +0 -1
- package/dist/features/horizontalRule/nodes/HorizontalRuleNode.d.ts +0 -56
- package/dist/features/horizontalRule/nodes/HorizontalRuleNode.d.ts.map +0 -1
- package/dist/features/horizontalRule/nodes/HorizontalRuleNode.js +0 -92
- package/dist/features/horizontalRule/nodes/HorizontalRuleNode.js.map +0 -1
- package/dist/features/horizontalRule/plugin/index.d.ts +0 -7
- package/dist/features/horizontalRule/plugin/index.d.ts.map +0 -1
- package/dist/features/horizontalRule/plugin/index.js +0 -30
- package/dist/features/horizontalRule/plugin/index.js.map +0 -1
- package/dist/features/indent/feature.client.d.ts +0 -5
- package/dist/features/indent/feature.client.d.ts.map +0 -1
- package/dist/features/indent/feature.client.js +0 -56
- package/dist/features/indent/feature.client.js.map +0 -1
- package/dist/features/indent/feature.server.d.ts +0 -2
- package/dist/features/indent/feature.server.d.ts.map +0 -1
- package/dist/features/indent/feature.server.js +0 -13
- package/dist/features/indent/feature.server.js.map +0 -1
- package/dist/features/indent/i18n.d.ts.map +0 -1
- package/dist/features/indent/i18n.js.map +0 -1
- package/dist/features/indent/toolbarIndentGroup.d.ts +0 -3
- package/dist/features/indent/toolbarIndentGroup.d.ts.map +0 -1
- package/dist/features/indent/toolbarIndentGroup.js.map +0 -1
- package/dist/features/link/drawer/baseFields.d.ts.map +0 -1
- package/dist/features/link/drawer/baseFields.js.map +0 -1
- package/dist/features/link/feature.client.d.ts +0 -16
- package/dist/features/link/feature.client.d.ts.map +0 -1
- package/dist/features/link/feature.client.js +0 -101
- package/dist/features/link/feature.client.js.map +0 -1
- package/dist/features/link/feature.server.d.ts +0 -35
- package/dist/features/link/feature.server.d.ts.map +0 -1
- package/dist/features/link/feature.server.js +0 -134
- package/dist/features/link/feature.server.js.map +0 -1
- package/dist/features/link/graphQLPopulationPromise.d.ts +0 -5
- package/dist/features/link/graphQLPopulationPromise.d.ts.map +0 -1
- package/dist/features/link/graphQLPopulationPromise.js +0 -31
- package/dist/features/link/graphQLPopulationPromise.js.map +0 -1
- package/dist/features/link/i18n.d.ts.map +0 -1
- package/dist/features/link/i18n.js.map +0 -1
- package/dist/features/link/plugins/autoLink/index.d.ts +0 -20
- package/dist/features/link/plugins/autoLink/index.d.ts.map +0 -1
- package/dist/features/link/plugins/autoLink/index.js +0 -336
- package/dist/features/link/plugins/autoLink/index.js.map +0 -1
- package/dist/features/link/plugins/clickableLink/index.d.ts +0 -4
- package/dist/features/link/plugins/clickableLink/index.d.ts.map +0 -1
- package/dist/features/link/plugins/clickableLink/index.js.map +0 -1
- package/dist/features/link/plugins/floatingLinkEditor/LinkEditor/commands.d.ts.map +0 -1
- package/dist/features/link/plugins/floatingLinkEditor/LinkEditor/commands.js.map +0 -1
- package/dist/features/link/plugins/floatingLinkEditor/LinkEditor/index.d.ts.map +0 -1
- package/dist/features/link/plugins/floatingLinkEditor/LinkEditor/index.js +0 -299
- package/dist/features/link/plugins/floatingLinkEditor/LinkEditor/index.js.map +0 -1
- package/dist/features/link/plugins/floatingLinkEditor/index.d.ts +0 -5
- package/dist/features/link/plugins/floatingLinkEditor/index.d.ts.map +0 -1
- package/dist/features/link/plugins/floatingLinkEditor/index.js.map +0 -1
- package/dist/features/link/plugins/floatingLinkEditor/types.d.ts +0 -15
- package/dist/features/link/plugins/floatingLinkEditor/types.d.ts.map +0 -1
- package/dist/features/link/plugins/floatingLinkEditor/types.js.map +0 -1
- package/dist/features/link/plugins/floatingLinkEditor/utilities.d.ts +0 -9
- package/dist/features/link/plugins/floatingLinkEditor/utilities.d.ts.map +0 -1
- package/dist/features/link/plugins/floatingLinkEditor/utilities.js +0 -20
- package/dist/features/link/plugins/floatingLinkEditor/utilities.js.map +0 -1
- package/dist/features/link/plugins/link/index.d.ts +0 -4
- package/dist/features/link/plugins/link/index.d.ts.map +0 -1
- package/dist/features/link/plugins/link/index.js +0 -53
- package/dist/features/link/plugins/link/index.js.map +0 -1
- package/dist/features/link/validate.d.ts +0 -6
- package/dist/features/link/validate.d.ts.map +0 -1
- package/dist/features/link/validate.js.map +0 -1
- package/dist/features/lists/checklist/feature.client.d.ts +0 -5
- package/dist/features/lists/checklist/feature.client.d.ts.map +0 -1
- package/dist/features/lists/checklist/feature.client.js +0 -100
- package/dist/features/lists/checklist/feature.client.js.map +0 -1
- package/dist/features/lists/checklist/feature.server.d.ts +0 -2
- package/dist/features/lists/checklist/feature.server.d.ts.map +0 -1
- package/dist/features/lists/checklist/feature.server.js +0 -36
- package/dist/features/lists/checklist/feature.server.js.map +0 -1
- package/dist/features/lists/checklist/i18n.d.ts.map +0 -1
- package/dist/features/lists/checklist/i18n.js.map +0 -1
- package/dist/features/lists/checklist/plugin/index.d.ts +0 -3
- package/dist/features/lists/checklist/plugin/index.d.ts.map +0 -1
- package/dist/features/lists/checklist/plugin/index.js.map +0 -1
- package/dist/features/lists/orderedList/feature.client.d.ts +0 -5
- package/dist/features/lists/orderedList/feature.client.d.ts.map +0 -1
- package/dist/features/lists/orderedList/feature.client.js +0 -90
- package/dist/features/lists/orderedList/feature.client.js.map +0 -1
- package/dist/features/lists/orderedList/feature.server.d.ts +0 -2
- package/dist/features/lists/orderedList/feature.server.d.ts.map +0 -1
- package/dist/features/lists/orderedList/feature.server.js +0 -36
- package/dist/features/lists/orderedList/feature.server.js.map +0 -1
- package/dist/features/lists/orderedList/i18n.d.ts.map +0 -1
- package/dist/features/lists/orderedList/i18n.js.map +0 -1
- package/dist/features/lists/unorderedList/feature.client.d.ts +0 -5
- package/dist/features/lists/unorderedList/feature.client.d.ts.map +0 -1
- package/dist/features/lists/unorderedList/feature.client.js +0 -88
- package/dist/features/lists/unorderedList/feature.client.js.map +0 -1
- package/dist/features/lists/unorderedList/feature.server.d.ts +0 -2
- package/dist/features/lists/unorderedList/feature.server.d.ts.map +0 -1
- package/dist/features/lists/unorderedList/feature.server.js +0 -34
- package/dist/features/lists/unorderedList/feature.server.js.map +0 -1
- package/dist/features/lists/unorderedList/i18n.d.ts.map +0 -1
- package/dist/features/lists/unorderedList/i18n.js.map +0 -1
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/heading/client.d.ts +0 -5
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/heading/client.d.ts.map +0 -1
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/heading/client.js +0 -6
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/heading/client.js.map +0 -1
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/heading/index.d.ts +0 -3
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/heading/index.d.ts.map +0 -1
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/heading/index.js +0 -8
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/heading/index.js.map +0 -1
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/link/client.d.ts +0 -5
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/link/client.d.ts.map +0 -1
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/link/client.js +0 -6
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/link/client.js.map +0 -1
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/link/index.d.ts +0 -3
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/link/index.d.ts.map +0 -1
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/link/index.js +0 -8
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/link/index.js.map +0 -1
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/list/client.d.ts +0 -5
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/list/client.d.ts.map +0 -1
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/list/client.js +0 -6
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/list/client.js.map +0 -1
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/list/index.d.ts +0 -3
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/list/index.d.ts.map +0 -1
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/list/index.js +0 -8
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/list/index.js.map +0 -1
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/listItem/client.d.ts +0 -5
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/listItem/client.d.ts.map +0 -1
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/listItem/client.js +0 -6
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/listItem/client.js.map +0 -1
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/listItem/index.d.ts +0 -3
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/listItem/index.d.ts.map +0 -1
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/listItem/index.js +0 -8
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/listItem/index.js.map +0 -1
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/quote/client.d.ts +0 -5
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/quote/client.d.ts.map +0 -1
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/quote/client.js +0 -6
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/quote/client.js.map +0 -1
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/quote/index.d.ts +0 -3
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/quote/index.d.ts.map +0 -1
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/quote/index.js +0 -8
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/quote/index.js.map +0 -1
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/unknown/client.d.ts +0 -5
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/unknown/client.d.ts.map +0 -1
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/unknown/client.js +0 -6
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/unknown/client.js.map +0 -1
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/unknown/index.d.ts +0 -3
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/unknown/index.d.ts.map +0 -1
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/unknown/index.js +0 -8
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/unknown/index.js.map +0 -1
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/upload/client.d.ts +0 -5
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/upload/client.d.ts.map +0 -1
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/upload/client.js +0 -6
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/upload/client.js.map +0 -1
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/upload/index.d.ts +0 -3
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/upload/index.d.ts.map +0 -1
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/upload/index.js +0 -8
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/upload/index.js.map +0 -1
- package/dist/features/migrations/slateToLexical/converter/converters/blockquote/client.d.ts +0 -5
- package/dist/features/migrations/slateToLexical/converter/converters/blockquote/client.d.ts.map +0 -1
- package/dist/features/migrations/slateToLexical/converter/converters/blockquote/client.js +0 -6
- package/dist/features/migrations/slateToLexical/converter/converters/blockquote/client.js.map +0 -1
- package/dist/features/migrations/slateToLexical/converter/converters/blockquote/index.d.ts +0 -3
- package/dist/features/migrations/slateToLexical/converter/converters/blockquote/index.d.ts.map +0 -1
- package/dist/features/migrations/slateToLexical/converter/converters/blockquote/index.js +0 -8
- package/dist/features/migrations/slateToLexical/converter/converters/blockquote/index.js.map +0 -1
- package/dist/features/migrations/slateToLexical/converter/converters/heading/client.d.ts +0 -5
- package/dist/features/migrations/slateToLexical/converter/converters/heading/client.d.ts.map +0 -1
- package/dist/features/migrations/slateToLexical/converter/converters/heading/client.js +0 -6
- package/dist/features/migrations/slateToLexical/converter/converters/heading/client.js.map +0 -1
- package/dist/features/migrations/slateToLexical/converter/converters/heading/index.d.ts +0 -3
- package/dist/features/migrations/slateToLexical/converter/converters/heading/index.d.ts.map +0 -1
- package/dist/features/migrations/slateToLexical/converter/converters/heading/index.js +0 -8
- package/dist/features/migrations/slateToLexical/converter/converters/heading/index.js.map +0 -1
- package/dist/features/migrations/slateToLexical/converter/converters/indent/client.d.ts +0 -5
- package/dist/features/migrations/slateToLexical/converter/converters/indent/client.d.ts.map +0 -1
- package/dist/features/migrations/slateToLexical/converter/converters/indent/client.js +0 -6
- package/dist/features/migrations/slateToLexical/converter/converters/indent/client.js.map +0 -1
- package/dist/features/migrations/slateToLexical/converter/converters/indent/index.d.ts +0 -3
- package/dist/features/migrations/slateToLexical/converter/converters/indent/index.d.ts.map +0 -1
- package/dist/features/migrations/slateToLexical/converter/converters/indent/index.js +0 -8
- package/dist/features/migrations/slateToLexical/converter/converters/indent/index.js.map +0 -1
- package/dist/features/migrations/slateToLexical/converter/converters/link/client.d.ts +0 -5
- package/dist/features/migrations/slateToLexical/converter/converters/link/client.d.ts.map +0 -1
- package/dist/features/migrations/slateToLexical/converter/converters/link/client.js +0 -6
- package/dist/features/migrations/slateToLexical/converter/converters/link/client.js.map +0 -1
- package/dist/features/migrations/slateToLexical/converter/converters/link/index.d.ts +0 -3
- package/dist/features/migrations/slateToLexical/converter/converters/link/index.d.ts.map +0 -1
- package/dist/features/migrations/slateToLexical/converter/converters/link/index.js +0 -8
- package/dist/features/migrations/slateToLexical/converter/converters/link/index.js.map +0 -1
- package/dist/features/migrations/slateToLexical/converter/converters/listItem/client.d.ts +0 -5
- package/dist/features/migrations/slateToLexical/converter/converters/listItem/client.d.ts.map +0 -1
- package/dist/features/migrations/slateToLexical/converter/converters/listItem/client.js +0 -6
- package/dist/features/migrations/slateToLexical/converter/converters/listItem/client.js.map +0 -1
- package/dist/features/migrations/slateToLexical/converter/converters/listItem/index.d.ts +0 -3
- package/dist/features/migrations/slateToLexical/converter/converters/listItem/index.d.ts.map +0 -1
- package/dist/features/migrations/slateToLexical/converter/converters/listItem/index.js +0 -8
- package/dist/features/migrations/slateToLexical/converter/converters/listItem/index.js.map +0 -1
- package/dist/features/migrations/slateToLexical/converter/converters/orderedList/client.d.ts +0 -5
- package/dist/features/migrations/slateToLexical/converter/converters/orderedList/client.d.ts.map +0 -1
- package/dist/features/migrations/slateToLexical/converter/converters/orderedList/client.js +0 -6
- package/dist/features/migrations/slateToLexical/converter/converters/orderedList/client.js.map +0 -1
- package/dist/features/migrations/slateToLexical/converter/converters/orderedList/index.d.ts +0 -3
- package/dist/features/migrations/slateToLexical/converter/converters/orderedList/index.d.ts.map +0 -1
- package/dist/features/migrations/slateToLexical/converter/converters/orderedList/index.js +0 -8
- package/dist/features/migrations/slateToLexical/converter/converters/orderedList/index.js.map +0 -1
- package/dist/features/migrations/slateToLexical/converter/converters/relationship/client.d.ts +0 -5
- package/dist/features/migrations/slateToLexical/converter/converters/relationship/client.d.ts.map +0 -1
- package/dist/features/migrations/slateToLexical/converter/converters/relationship/client.js +0 -6
- package/dist/features/migrations/slateToLexical/converter/converters/relationship/client.js.map +0 -1
- package/dist/features/migrations/slateToLexical/converter/converters/relationship/index.d.ts +0 -3
- package/dist/features/migrations/slateToLexical/converter/converters/relationship/index.d.ts.map +0 -1
- package/dist/features/migrations/slateToLexical/converter/converters/relationship/index.js +0 -8
- package/dist/features/migrations/slateToLexical/converter/converters/relationship/index.js.map +0 -1
- package/dist/features/migrations/slateToLexical/converter/converters/unknown/client.d.ts +0 -5
- package/dist/features/migrations/slateToLexical/converter/converters/unknown/client.d.ts.map +0 -1
- package/dist/features/migrations/slateToLexical/converter/converters/unknown/client.js +0 -6
- package/dist/features/migrations/slateToLexical/converter/converters/unknown/client.js.map +0 -1
- package/dist/features/migrations/slateToLexical/converter/converters/unknown/index.d.ts +0 -3
- package/dist/features/migrations/slateToLexical/converter/converters/unknown/index.d.ts.map +0 -1
- package/dist/features/migrations/slateToLexical/converter/converters/unknown/index.js +0 -8
- package/dist/features/migrations/slateToLexical/converter/converters/unknown/index.js.map +0 -1
- package/dist/features/migrations/slateToLexical/converter/converters/unorderedList/client.d.ts +0 -5
- package/dist/features/migrations/slateToLexical/converter/converters/unorderedList/client.d.ts.map +0 -1
- package/dist/features/migrations/slateToLexical/converter/converters/unorderedList/client.js +0 -6
- package/dist/features/migrations/slateToLexical/converter/converters/unorderedList/client.js.map +0 -1
- package/dist/features/migrations/slateToLexical/converter/converters/unorderedList/index.d.ts +0 -3
- package/dist/features/migrations/slateToLexical/converter/converters/unorderedList/index.d.ts.map +0 -1
- package/dist/features/migrations/slateToLexical/converter/converters/unorderedList/index.js +0 -8
- package/dist/features/migrations/slateToLexical/converter/converters/unorderedList/index.js.map +0 -1
- package/dist/features/migrations/slateToLexical/converter/converters/upload/client.d.ts +0 -5
- package/dist/features/migrations/slateToLexical/converter/converters/upload/client.d.ts.map +0 -1
- package/dist/features/migrations/slateToLexical/converter/converters/upload/client.js +0 -6
- package/dist/features/migrations/slateToLexical/converter/converters/upload/client.js.map +0 -1
- package/dist/features/migrations/slateToLexical/converter/converters/upload/index.d.ts +0 -3
- package/dist/features/migrations/slateToLexical/converter/converters/upload/index.d.ts.map +0 -1
- package/dist/features/migrations/slateToLexical/converter/converters/upload/index.js +0 -8
- package/dist/features/migrations/slateToLexical/converter/converters/upload/index.js.map +0 -1
- package/dist/features/paragraph/feature.client.d.ts +0 -5
- package/dist/features/paragraph/feature.client.d.ts.map +0 -1
- package/dist/features/paragraph/feature.client.js +0 -71
- package/dist/features/paragraph/feature.client.js.map +0 -1
- package/dist/features/paragraph/feature.server.d.ts +0 -2
- package/dist/features/paragraph/feature.server.d.ts.map +0 -1
- package/dist/features/paragraph/feature.server.js +0 -14
- package/dist/features/paragraph/feature.server.js.map +0 -1
- package/dist/features/paragraph/i18n.d.ts.map +0 -1
- package/dist/features/paragraph/i18n.js.map +0 -1
- package/dist/features/relationship/drawer/commands.d.ts.map +0 -1
- package/dist/features/relationship/drawer/commands.js.map +0 -1
- package/dist/features/relationship/drawer/index.d.ts.map +0 -1
- package/dist/features/relationship/drawer/index.js.map +0 -1
- package/dist/features/relationship/feature.client.d.ts +0 -18
- package/dist/features/relationship/feature.client.d.ts.map +0 -1
- package/dist/features/relationship/feature.client.js +0 -72
- package/dist/features/relationship/feature.client.js.map +0 -1
- package/dist/features/relationship/feature.server.d.ts +0 -27
- package/dist/features/relationship/feature.server.d.ts.map +0 -1
- package/dist/features/relationship/feature.server.js +0 -55
- package/dist/features/relationship/feature.server.js.map +0 -1
- package/dist/features/relationship/graphQLPopulationPromise.d.ts +0 -5
- package/dist/features/relationship/graphQLPopulationPromise.d.ts.map +0 -1
- package/dist/features/relationship/graphQLPopulationPromise.js +0 -29
- package/dist/features/relationship/graphQLPopulationPromise.js.map +0 -1
- package/dist/features/relationship/i18n.d.ts.map +0 -1
- package/dist/features/relationship/i18n.js.map +0 -1
- package/dist/features/relationship/nodes/RelationshipNode.d.ts +0 -35
- package/dist/features/relationship/nodes/RelationshipNode.d.ts.map +0 -1
- package/dist/features/relationship/nodes/RelationshipNode.js +0 -111
- package/dist/features/relationship/nodes/RelationshipNode.js.map +0 -1
- package/dist/features/relationship/nodes/components/RelationshipComponent.d.ts +0 -13
- package/dist/features/relationship/nodes/components/RelationshipComponent.d.ts.map +0 -1
- package/dist/features/relationship/nodes/components/RelationshipComponent.js +0 -171
- package/dist/features/relationship/nodes/components/RelationshipComponent.js.map +0 -1
- package/dist/features/relationship/plugins/index.d.ts +0 -7
- package/dist/features/relationship/plugins/index.d.ts.map +0 -1
- package/dist/features/relationship/plugins/index.js +0 -50
- package/dist/features/relationship/plugins/index.js.map +0 -1
- package/dist/features/relationship/utils/EnabledRelationshipsCondition.d.ts.map +0 -1
- package/dist/features/relationship/utils/EnabledRelationshipsCondition.js +0 -33
- package/dist/features/relationship/utils/EnabledRelationshipsCondition.js.map +0 -1
- package/dist/features/toolbars/fixed/Toolbar/index.d.ts +0 -5
- package/dist/features/toolbars/fixed/Toolbar/index.d.ts.map +0 -1
- package/dist/features/toolbars/fixed/Toolbar/index.js +0 -207
- package/dist/features/toolbars/fixed/Toolbar/index.js.map +0 -1
- package/dist/features/toolbars/fixed/feature.client.d.ts +0 -6
- package/dist/features/toolbars/fixed/feature.client.d.ts.map +0 -1
- package/dist/features/toolbars/fixed/feature.client.js +0 -13
- package/dist/features/toolbars/fixed/feature.client.js.map +0 -1
- package/dist/features/toolbars/fixed/feature.server.d.ts +0 -18
- package/dist/features/toolbars/fixed/feature.server.d.ts.map +0 -1
- package/dist/features/toolbars/fixed/feature.server.js +0 -19
- package/dist/features/toolbars/fixed/feature.server.js.map +0 -1
- package/dist/features/toolbars/inline/Toolbar/index.d.ts +0 -4
- package/dist/features/toolbars/inline/Toolbar/index.d.ts.map +0 -1
- package/dist/features/toolbars/inline/Toolbar/index.js +0 -319
- package/dist/features/toolbars/inline/Toolbar/index.js.map +0 -1
- package/dist/features/toolbars/inline/feature.client.d.ts +0 -5
- package/dist/features/toolbars/inline/feature.client.d.ts.map +0 -1
- package/dist/features/toolbars/inline/feature.client.js +0 -13
- package/dist/features/toolbars/inline/feature.client.js.map +0 -1
- package/dist/features/toolbars/inline/feature.server.d.ts +0 -2
- package/dist/features/toolbars/inline/feature.server.d.ts.map +0 -1
- package/dist/features/toolbars/inline/feature.server.js +0 -11
- package/dist/features/toolbars/inline/feature.server.js.map +0 -1
- package/dist/features/upload/component/index.d.ts +0 -9
- package/dist/features/upload/component/index.d.ts.map +0 -1
- package/dist/features/upload/component/index.js +0 -242
- package/dist/features/upload/component/index.js.map +0 -1
- package/dist/features/upload/drawer/commands.d.ts.map +0 -1
- package/dist/features/upload/drawer/commands.js.map +0 -1
- package/dist/features/upload/drawer/index.d.ts.map +0 -1
- package/dist/features/upload/drawer/index.js +0 -77
- package/dist/features/upload/drawer/index.js.map +0 -1
- package/dist/features/upload/feature.client.d.ts.map +0 -1
- package/dist/features/upload/feature.client.js +0 -74
- package/dist/features/upload/feature.client.js.map +0 -1
- package/dist/features/upload/feature.server.d.ts +0 -18
- package/dist/features/upload/feature.server.d.ts.map +0 -1
- package/dist/features/upload/feature.server.js +0 -184
- package/dist/features/upload/feature.server.js.map +0 -1
- package/dist/features/upload/graphQLPopulationPromise.d.ts +0 -5
- package/dist/features/upload/graphQLPopulationPromise.d.ts.map +0 -1
- package/dist/features/upload/graphQLPopulationPromise.js +0 -52
- package/dist/features/upload/graphQLPopulationPromise.js.map +0 -1
- package/dist/features/upload/i18n.d.ts.map +0 -1
- package/dist/features/upload/i18n.js.map +0 -1
- package/dist/features/upload/nodes/UploadNode.d.ts +0 -39
- package/dist/features/upload/nodes/UploadNode.d.ts.map +0 -1
- package/dist/features/upload/nodes/UploadNode.js +0 -131
- package/dist/features/upload/nodes/UploadNode.js.map +0 -1
- package/dist/features/upload/plugin/index.d.ts +0 -8
- package/dist/features/upload/plugin/index.d.ts.map +0 -1
- package/dist/features/upload/plugin/index.js +0 -53
- package/dist/features/upload/plugin/index.js.map +0 -1
- package/dist/features/upload/validate.d.ts +0 -5
- package/dist/features/upload/validate.d.ts.map +0 -1
- package/dist/features/upload/validate.js.map +0 -1
- package/dist/lexical/utils/invariant.d.ts +0 -2
- package/dist/lexical/utils/invariant.d.ts.map +0 -1
- package/dist/lexical/utils/invariant.js +0 -12
- package/dist/lexical/utils/invariant.js.map +0 -1
- /package/dist/features/align/{i18n.d.ts → server/i18n.d.ts} +0 -0
- /package/dist/features/align/{i18n.js → server/i18n.js} +0 -0
- /package/dist/features/blockquote/{i18n.d.ts → server/i18n.d.ts} +0 -0
- /package/dist/features/blockquote/{i18n.js → server/i18n.js} +0 -0
- /package/dist/features/blocks/{component → client/component}/FormSavePlugin.d.ts +0 -0
- /package/dist/features/blocks/{component → client/component}/FormSavePlugin.js +0 -0
- /package/dist/features/blocks/{component → client/component}/removeEmptyArrayValues.d.ts +0 -0
- /package/dist/features/blocks/{component → client/component}/removeEmptyArrayValues.js +0 -0
- /package/dist/features/blocks/{componentInline → client/componentInline}/index.d.ts +0 -0
- /package/dist/features/blocks/{plugin → client/plugin}/commands.d.ts +0 -0
- /package/dist/features/blocks/{plugin → client/plugin}/commands.js +0 -0
- /package/dist/features/blocks/{i18n.d.ts → server/i18n.d.ts} +0 -0
- /package/dist/features/blocks/{i18n.js → server/i18n.js} +0 -0
- /package/dist/features/blocks/{validate.js → server/validate.js} +0 -0
- /package/dist/features/debug/treeView/{plugin → client/plugin}/index.js +0 -0
- /package/dist/features/experimental_table/{utils → client/utils}/debounce.d.ts +0 -0
- /package/dist/features/experimental_table/{utils → client/utils}/debounce.js +0 -0
- /package/dist/features/experimental_table/{utils → client/utils}/useDebounce.d.ts +0 -0
- /package/dist/features/experimental_table/{utils → client/utils}/useDebounce.js +0 -0
- /package/dist/features/heading/{i18n.d.ts → server/i18n.d.ts} +0 -0
- /package/dist/features/heading/{i18n.js → server/i18n.js} +0 -0
- /package/dist/features/horizontalRule/{component → client/component}/index.d.ts +0 -0
- /package/dist/features/horizontalRule/{component → client/component}/index.js +0 -0
- /package/dist/features/horizontalRule/{markdownTransformer.d.ts → client/markdownTransformer.d.ts} +0 -0
- /package/dist/features/horizontalRule/{markdownTransformer.js → client/markdownTransformer.js} +0 -0
- /package/dist/features/horizontalRule/{i18n.d.ts → server/i18n.d.ts} +0 -0
- /package/dist/features/horizontalRule/{i18n.js → server/i18n.js} +0 -0
- /package/dist/features/indent/{toolbarIndentGroup.js → client/toolbarIndentGroup.js} +0 -0
- /package/dist/features/indent/{i18n.d.ts → server/i18n.d.ts} +0 -0
- /package/dist/features/indent/{i18n.js → server/i18n.js} +0 -0
- /package/dist/features/link/{plugins → client/plugins}/clickableLink/index.js +0 -0
- /package/dist/features/link/{plugins → client/plugins}/floatingLinkEditor/LinkEditor/commands.d.ts +0 -0
- /package/dist/features/link/{plugins → client/plugins}/floatingLinkEditor/LinkEditor/commands.js +0 -0
- /package/dist/features/link/{plugins → client/plugins}/floatingLinkEditor/LinkEditor/index.d.ts +0 -0
- /package/dist/features/link/{plugins → client/plugins}/floatingLinkEditor/index.js +0 -0
- /package/dist/features/link/{plugins → client/plugins}/floatingLinkEditor/types.js +0 -0
- /package/dist/features/link/{drawer → server}/baseFields.d.ts +0 -0
- /package/dist/features/link/{drawer → server}/baseFields.js +0 -0
- /package/dist/features/link/{i18n.d.ts → server/i18n.d.ts} +0 -0
- /package/dist/features/link/{i18n.js → server/i18n.js} +0 -0
- /package/dist/features/link/{validate.js → server/validate.js} +0 -0
- /package/dist/features/lists/checklist/{plugin → client/plugin}/index.js +0 -0
- /package/dist/features/lists/checklist/{i18n.d.ts → server/i18n.d.ts} +0 -0
- /package/dist/features/lists/checklist/{i18n.js → server/i18n.js} +0 -0
- /package/dist/features/lists/orderedList/{i18n.d.ts → server/i18n.d.ts} +0 -0
- /package/dist/features/lists/orderedList/{i18n.js → server/i18n.js} +0 -0
- /package/dist/features/lists/unorderedList/{i18n.d.ts → server/i18n.d.ts} +0 -0
- /package/dist/features/lists/unorderedList/{i18n.js → server/i18n.js} +0 -0
- /package/dist/features/paragraph/{i18n.d.ts → server/i18n.d.ts} +0 -0
- /package/dist/features/paragraph/{i18n.js → server/i18n.js} +0 -0
- /package/dist/features/relationship/{drawer → client/drawer}/commands.d.ts +0 -0
- /package/dist/features/relationship/{drawer → client/drawer}/commands.js +0 -0
- /package/dist/features/relationship/{drawer → client/drawer}/index.d.ts +0 -0
- /package/dist/features/relationship/{drawer → client/drawer}/index.js +0 -0
- /package/dist/features/relationship/{utils → client/utils}/EnabledRelationshipsCondition.d.ts +0 -0
- /package/dist/features/relationship/{i18n.d.ts → server/i18n.d.ts} +0 -0
- /package/dist/features/relationship/{i18n.js → server/i18n.js} +0 -0
- /package/dist/features/upload/{drawer → client/drawer}/commands.d.ts +0 -0
- /package/dist/features/upload/{drawer → client/drawer}/commands.js +0 -0
- /package/dist/features/upload/{drawer → client/drawer}/index.d.ts +0 -0
- /package/dist/features/upload/{feature.client.d.ts → client/feature.client.d.ts} +0 -0
- /package/dist/features/upload/{i18n.d.ts → server/i18n.d.ts} +0 -0
- /package/dist/features/upload/{i18n.js → server/i18n.js} +0 -0
- /package/dist/features/upload/{validate.js → server/validate.js} +0 -0
|
@@ -0,0 +1,198 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext.js';
|
|
3
|
+
import { getTranslation } from '@payloadcms/translations';
|
|
4
|
+
import { Button, Collapsible, ErrorPill, Pill, RenderComponent, RenderFields, SectionTitle, useDocumentInfo, useFormSubmitted, useTranslation } from '@payloadcms/ui';
|
|
5
|
+
import { dequal } from 'dequal/lite';
|
|
6
|
+
import { $getNodeByKey } from 'lexical';
|
|
7
|
+
import React, { useCallback } from 'react';
|
|
8
|
+
import { FormSavePlugin } from './FormSavePlugin.js';
|
|
9
|
+
// Recursively remove all undefined values from even being present in formData, as they will
|
|
10
|
+
// cause isDeepEqual to return false if, for example, formData has a key that fields.data
|
|
11
|
+
// does not have, even if it's undefined.
|
|
12
|
+
// Currently, this happens if a block has another sub-blocks field. Inside formData, that sub-blocks field has an undefined blockName property.
|
|
13
|
+
// Inside of fields.data however, that sub-blocks blockName property does not exist at all.
|
|
14
|
+
function removeUndefinedAndNullAndEmptyArraysRecursively(obj) {
|
|
15
|
+
for(const key in obj){
|
|
16
|
+
const value = obj[key];
|
|
17
|
+
if (Array.isArray(value) && !value?.length) {
|
|
18
|
+
delete obj[key];
|
|
19
|
+
} else if (value && typeof value === 'object') {
|
|
20
|
+
removeUndefinedAndNullAndEmptyArraysRecursively(value);
|
|
21
|
+
} else if (value === undefined || value === null) {
|
|
22
|
+
delete obj[key];
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* The actual content of the Block. This should be INSIDE a Form component,
|
|
28
|
+
* scoped to the block. All format operations in here are thus scoped to the block's form, and
|
|
29
|
+
* not the whole document.
|
|
30
|
+
*/ export const BlockContent = (props)=>{
|
|
31
|
+
const { baseClass, clientBlock, field, formSchema, nodeKey, schemaPath } = props;
|
|
32
|
+
let { formData } = props;
|
|
33
|
+
const { i18n } = useTranslation();
|
|
34
|
+
const [editor] = useLexicalComposerContext();
|
|
35
|
+
// Used for saving collapsed to preferences (and gettin' it from there again)
|
|
36
|
+
// Remember, these preferences are scoped to the whole document, not just this form. This
|
|
37
|
+
// is important to consider for the data path used in setDocFieldPreferences
|
|
38
|
+
const { getDocPreferences, setDocFieldPreferences } = useDocumentInfo();
|
|
39
|
+
const [isCollapsed, setIsCollapsed] = React.useState(()=>{
|
|
40
|
+
let initialState = false;
|
|
41
|
+
void getDocPreferences().then((currentDocPreferences)=>{
|
|
42
|
+
const currentFieldPreferences = currentDocPreferences?.fields[field.name];
|
|
43
|
+
const collapsedArray = currentFieldPreferences?.collapsed;
|
|
44
|
+
if (collapsedArray && collapsedArray.includes(formData.id)) {
|
|
45
|
+
initialState = true;
|
|
46
|
+
setIsCollapsed(true);
|
|
47
|
+
}
|
|
48
|
+
});
|
|
49
|
+
return initialState;
|
|
50
|
+
});
|
|
51
|
+
const hasSubmitted = useFormSubmitted();
|
|
52
|
+
const [errorCount, setErrorCount] = React.useState(0);
|
|
53
|
+
const fieldHasErrors = hasSubmitted && errorCount > 0;
|
|
54
|
+
const classNames = [
|
|
55
|
+
`${baseClass}__row`,
|
|
56
|
+
fieldHasErrors ? `${baseClass}__row--has-errors` : `${baseClass}__row--no-errors`
|
|
57
|
+
].filter(Boolean).join(' ');
|
|
58
|
+
const onFormChange = useCallback(({ fullFieldsWithValues, newFormData })=>{
|
|
59
|
+
newFormData.id = formData.id;
|
|
60
|
+
newFormData.blockType = formData.blockType;
|
|
61
|
+
removeUndefinedAndNullAndEmptyArraysRecursively(newFormData);
|
|
62
|
+
removeUndefinedAndNullAndEmptyArraysRecursively(formData);
|
|
63
|
+
// Only update if the data has actually changed. Otherwise, we may be triggering an unnecessary value change,
|
|
64
|
+
// which would trigger the "Leave without saving" dialog unnecessarily
|
|
65
|
+
if (!dequal(formData, newFormData)) {
|
|
66
|
+
// Running this in the next tick in the meantime fixes this issue: https://github.com/payloadcms/payload/issues/4108
|
|
67
|
+
// I don't know why. When this is called immediately, it might focus out of a nested lexical editor field if an update is made there.
|
|
68
|
+
// My hypothesis is that the nested editor might not have fully finished its update cycle yet. By updating in the next tick, we
|
|
69
|
+
// ensure that the nested editor has finished its update cycle before we update the block node.
|
|
70
|
+
setTimeout(()=>{
|
|
71
|
+
editor.update(()=>{
|
|
72
|
+
const node = $getNodeByKey(nodeKey);
|
|
73
|
+
if (node) {
|
|
74
|
+
formData = newFormData;
|
|
75
|
+
node.setFields(newFormData);
|
|
76
|
+
}
|
|
77
|
+
});
|
|
78
|
+
}, 0);
|
|
79
|
+
}
|
|
80
|
+
// update error count
|
|
81
|
+
if (hasSubmitted) {
|
|
82
|
+
let rowErrorCount = 0;
|
|
83
|
+
for (const formField of Object.values(fullFieldsWithValues)){
|
|
84
|
+
if (formField?.valid === false) {
|
|
85
|
+
rowErrorCount++;
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
setErrorCount(rowErrorCount);
|
|
89
|
+
}
|
|
90
|
+
}, [
|
|
91
|
+
editor,
|
|
92
|
+
nodeKey,
|
|
93
|
+
hasSubmitted,
|
|
94
|
+
formData
|
|
95
|
+
]);
|
|
96
|
+
const onCollapsedChange = useCallback((changedCollapsed)=>{
|
|
97
|
+
void getDocPreferences().then((currentDocPreferences)=>{
|
|
98
|
+
const currentFieldPreferences = currentDocPreferences?.fields[field.name];
|
|
99
|
+
const collapsedArray = currentFieldPreferences?.collapsed;
|
|
100
|
+
const newCollapsed = collapsedArray && collapsedArray?.length ? collapsedArray : [];
|
|
101
|
+
if (changedCollapsed) {
|
|
102
|
+
if (!newCollapsed.includes(formData.id)) {
|
|
103
|
+
newCollapsed.push(formData.id);
|
|
104
|
+
}
|
|
105
|
+
} else {
|
|
106
|
+
if (newCollapsed.includes(formData.id)) {
|
|
107
|
+
newCollapsed.splice(newCollapsed.indexOf(formData.id), 1);
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
setDocFieldPreferences(field.name, {
|
|
111
|
+
collapsed: newCollapsed,
|
|
112
|
+
hello: 'hi'
|
|
113
|
+
});
|
|
114
|
+
});
|
|
115
|
+
}, [
|
|
116
|
+
getDocPreferences,
|
|
117
|
+
field.name,
|
|
118
|
+
setDocFieldPreferences,
|
|
119
|
+
formData.id
|
|
120
|
+
]);
|
|
121
|
+
const removeBlock = useCallback(()=>{
|
|
122
|
+
editor.update(()=>{
|
|
123
|
+
$getNodeByKey(nodeKey).remove();
|
|
124
|
+
});
|
|
125
|
+
}, [
|
|
126
|
+
editor,
|
|
127
|
+
nodeKey
|
|
128
|
+
]);
|
|
129
|
+
return /*#__PURE__*/ _jsxs(React.Fragment, {
|
|
130
|
+
children: [
|
|
131
|
+
/*#__PURE__*/ _jsx(Collapsible, {
|
|
132
|
+
className: classNames,
|
|
133
|
+
collapsibleStyle: fieldHasErrors ? 'error' : 'default',
|
|
134
|
+
header: clientBlock?.admin?.components?.Label ? /*#__PURE__*/ _jsx(RenderComponent, {
|
|
135
|
+
clientProps: {
|
|
136
|
+
blockKind: 'lexicalBlock',
|
|
137
|
+
formData
|
|
138
|
+
},
|
|
139
|
+
mappedComponent: clientBlock.admin.components.Label
|
|
140
|
+
}) : /*#__PURE__*/ _jsxs("div", {
|
|
141
|
+
className: `${baseClass}__block-header`,
|
|
142
|
+
children: [
|
|
143
|
+
/*#__PURE__*/ _jsxs("div", {
|
|
144
|
+
children: [
|
|
145
|
+
/*#__PURE__*/ _jsx(Pill, {
|
|
146
|
+
className: `${baseClass}__block-pill ${baseClass}__block-pill-${formData?.blockType}`,
|
|
147
|
+
pillStyle: "white",
|
|
148
|
+
children: typeof clientBlock?.labels.singular === 'string' ? getTranslation(clientBlock?.labels.singular, i18n) : clientBlock.slug
|
|
149
|
+
}),
|
|
150
|
+
/*#__PURE__*/ _jsx(SectionTitle, {
|
|
151
|
+
path: "blockName",
|
|
152
|
+
readOnly: field?.admin?.readOnly
|
|
153
|
+
}),
|
|
154
|
+
fieldHasErrors && /*#__PURE__*/ _jsx(ErrorPill, {
|
|
155
|
+
count: errorCount,
|
|
156
|
+
i18n: i18n,
|
|
157
|
+
withMessage: true
|
|
158
|
+
})
|
|
159
|
+
]
|
|
160
|
+
}),
|
|
161
|
+
editor.isEditable() && /*#__PURE__*/ _jsx(Button, {
|
|
162
|
+
buttonStyle: "icon-label",
|
|
163
|
+
className: `${baseClass}__removeButton`,
|
|
164
|
+
disabled: field?.admin?.readOnly,
|
|
165
|
+
icon: "x",
|
|
166
|
+
onClick: (e)=>{
|
|
167
|
+
e.preventDefault();
|
|
168
|
+
removeBlock();
|
|
169
|
+
},
|
|
170
|
+
round: true,
|
|
171
|
+
tooltip: "Remove Block"
|
|
172
|
+
})
|
|
173
|
+
]
|
|
174
|
+
}),
|
|
175
|
+
isCollapsed: isCollapsed,
|
|
176
|
+
onToggle: (incomingCollapsedState)=>{
|
|
177
|
+
onCollapsedChange(incomingCollapsedState);
|
|
178
|
+
setIsCollapsed(incomingCollapsedState);
|
|
179
|
+
},
|
|
180
|
+
children: /*#__PURE__*/ _jsx(RenderFields, {
|
|
181
|
+
className: `${baseClass}__fields`,
|
|
182
|
+
fields: formSchema,
|
|
183
|
+
forceRender: true,
|
|
184
|
+
margins: "small",
|
|
185
|
+
path: "" // Leaving path empty makes it so field values are not prefixed / scoped by the entire schemaPath. e.g. we can access "myField" instead of "someLexicalField.feature.blocks.someArrayB" // TODO: Could there be any implications leaving path different than schemaPath?
|
|
186
|
+
,
|
|
187
|
+
readOnly: false,
|
|
188
|
+
schemaPath: schemaPath
|
|
189
|
+
})
|
|
190
|
+
}, 0),
|
|
191
|
+
/*#__PURE__*/ _jsx(FormSavePlugin, {
|
|
192
|
+
onChange: onFormChange
|
|
193
|
+
})
|
|
194
|
+
]
|
|
195
|
+
});
|
|
196
|
+
};
|
|
197
|
+
|
|
198
|
+
//# sourceMappingURL=BlockContent.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../src/features/blocks/client/component/BlockContent.tsx"],"sourcesContent":["import type { ClientBlock, ClientField, CollapsedPreferences, FormState } from 'payload'\n\nimport { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext.js'\nimport { getTranslation } from '@payloadcms/translations'\nimport {\n Button,\n Collapsible,\n ErrorPill,\n Pill,\n RenderComponent,\n RenderFields,\n SectionTitle,\n useDocumentInfo,\n useFormSubmitted,\n useTranslation,\n} from '@payloadcms/ui'\nimport { dequal } from 'dequal/lite'\nimport { $getNodeByKey } from 'lexical'\nimport React, { useCallback } from 'react'\n\nimport type { LexicalRichTextFieldProps } from '../../../../types.js'\nimport type { BlockFields } from '../../server/nodes/BlocksNode.js'\nimport type { BlockNode } from '../nodes/BlocksNode.js'\n\nimport { FormSavePlugin } from './FormSavePlugin.js'\n\ntype Props = {\n baseClass: string\n clientBlock: ClientBlock\n field: LexicalRichTextFieldProps['field']\n formData: BlockFields\n formSchema: ClientField[]\n nodeKey: string\n path: string\n schemaPath: string\n}\n\n// Recursively remove all undefined values from even being present in formData, as they will\n// cause isDeepEqual to return false if, for example, formData has a key that fields.data\n// does not have, even if it's undefined.\n// Currently, this happens if a block has another sub-blocks field. Inside formData, that sub-blocks field has an undefined blockName property.\n// Inside of fields.data however, that sub-blocks blockName property does not exist at all.\nfunction removeUndefinedAndNullAndEmptyArraysRecursively(obj: object) {\n for (const key in obj) {\n const value = obj[key]\n if (Array.isArray(value) && !value?.length) {\n delete obj[key]\n } else if (value && typeof value === 'object') {\n removeUndefinedAndNullAndEmptyArraysRecursively(value)\n } else if (value === undefined || value === null) {\n delete obj[key]\n }\n }\n}\n\n/**\n * The actual content of the Block. This should be INSIDE a Form component,\n * scoped to the block. All format operations in here are thus scoped to the block's form, and\n * not the whole document.\n */\nexport const BlockContent: React.FC<Props> = (props) => {\n const { baseClass, clientBlock, field, formSchema, nodeKey, schemaPath } = props\n let { formData } = props\n\n const { i18n } = useTranslation()\n const [editor] = useLexicalComposerContext()\n // Used for saving collapsed to preferences (and gettin' it from there again)\n // Remember, these preferences are scoped to the whole document, not just this form. This\n // is important to consider for the data path used in setDocFieldPreferences\n const { getDocPreferences, setDocFieldPreferences } = useDocumentInfo()\n\n const [isCollapsed, setIsCollapsed] = React.useState<boolean>(() => {\n let initialState = false\n\n void getDocPreferences().then((currentDocPreferences) => {\n const currentFieldPreferences = currentDocPreferences?.fields[field.name]\n\n const collapsedArray = currentFieldPreferences?.collapsed\n\n if (collapsedArray && collapsedArray.includes(formData.id)) {\n initialState = true\n setIsCollapsed(true)\n }\n })\n return initialState\n })\n\n const hasSubmitted = useFormSubmitted()\n\n const [errorCount, setErrorCount] = React.useState(0)\n\n const fieldHasErrors = hasSubmitted && errorCount > 0\n\n const classNames = [\n `${baseClass}__row`,\n fieldHasErrors ? `${baseClass}__row--has-errors` : `${baseClass}__row--no-errors`,\n ]\n .filter(Boolean)\n .join(' ')\n\n const onFormChange = useCallback(\n ({\n fullFieldsWithValues,\n newFormData,\n }: {\n fullFieldsWithValues: FormState\n newFormData: BlockFields\n }) => {\n newFormData.id = formData.id\n newFormData.blockType = formData.blockType\n\n removeUndefinedAndNullAndEmptyArraysRecursively(newFormData)\n removeUndefinedAndNullAndEmptyArraysRecursively(formData)\n\n // Only update if the data has actually changed. Otherwise, we may be triggering an unnecessary value change,\n // which would trigger the \"Leave without saving\" dialog unnecessarily\n if (!dequal(formData, newFormData)) {\n // Running this in the next tick in the meantime fixes this issue: https://github.com/payloadcms/payload/issues/4108\n // I don't know why. When this is called immediately, it might focus out of a nested lexical editor field if an update is made there.\n // My hypothesis is that the nested editor might not have fully finished its update cycle yet. By updating in the next tick, we\n // ensure that the nested editor has finished its update cycle before we update the block node.\n setTimeout(() => {\n editor.update(() => {\n const node: BlockNode = $getNodeByKey(nodeKey)\n if (node) {\n formData = newFormData\n node.setFields(newFormData)\n }\n })\n }, 0)\n }\n\n // update error count\n if (hasSubmitted) {\n let rowErrorCount = 0\n for (const formField of Object.values(fullFieldsWithValues)) {\n if (formField?.valid === false) {\n rowErrorCount++\n }\n }\n setErrorCount(rowErrorCount)\n }\n },\n [editor, nodeKey, hasSubmitted, formData],\n )\n\n const onCollapsedChange = useCallback(\n (changedCollapsed: boolean) => {\n void getDocPreferences().then((currentDocPreferences) => {\n const currentFieldPreferences = currentDocPreferences?.fields[field.name]\n\n const collapsedArray = currentFieldPreferences?.collapsed\n\n const newCollapsed: CollapsedPreferences =\n collapsedArray && collapsedArray?.length ? collapsedArray : []\n\n if (changedCollapsed) {\n if (!newCollapsed.includes(formData.id)) {\n newCollapsed.push(formData.id)\n }\n } else {\n if (newCollapsed.includes(formData.id)) {\n newCollapsed.splice(newCollapsed.indexOf(formData.id), 1)\n }\n }\n\n setDocFieldPreferences(field.name, {\n collapsed: newCollapsed,\n hello: 'hi',\n })\n })\n },\n [getDocPreferences, field.name, setDocFieldPreferences, formData.id],\n )\n\n const removeBlock = useCallback(() => {\n editor.update(() => {\n $getNodeByKey(nodeKey).remove()\n })\n }, [editor, nodeKey])\n\n return (\n <React.Fragment>\n <Collapsible\n className={classNames}\n collapsibleStyle={fieldHasErrors ? 'error' : 'default'}\n header={\n clientBlock?.admin?.components?.Label ? (\n <RenderComponent\n clientProps={{ blockKind: 'lexicalBlock', formData }}\n mappedComponent={clientBlock.admin.components.Label}\n />\n ) : (\n <div className={`${baseClass}__block-header`}>\n <div>\n <Pill\n className={`${baseClass}__block-pill ${baseClass}__block-pill-${formData?.blockType}`}\n pillStyle=\"white\"\n >\n {typeof clientBlock?.labels.singular === 'string'\n ? getTranslation(clientBlock?.labels.singular, i18n)\n : clientBlock.slug}\n </Pill>\n <SectionTitle path=\"blockName\" readOnly={field?.admin?.readOnly} />\n {fieldHasErrors && <ErrorPill count={errorCount} i18n={i18n} withMessage />}\n </div>\n {editor.isEditable() && (\n <Button\n buttonStyle=\"icon-label\"\n className={`${baseClass}__removeButton`}\n disabled={field?.admin?.readOnly}\n icon=\"x\"\n onClick={(e) => {\n e.preventDefault()\n removeBlock()\n }}\n round\n tooltip=\"Remove Block\"\n />\n )}\n </div>\n )\n }\n isCollapsed={isCollapsed}\n key={0}\n onToggle={(incomingCollapsedState) => {\n onCollapsedChange(incomingCollapsedState)\n setIsCollapsed(incomingCollapsedState)\n }}\n >\n <RenderFields\n className={`${baseClass}__fields`}\n fields={formSchema}\n forceRender\n margins=\"small\"\n path=\"\" // Leaving path empty makes it so field values are not prefixed / scoped by the entire schemaPath. e.g. we can access \"myField\" instead of \"someLexicalField.feature.blocks.someArrayB\" // TODO: Could there be any implications leaving path different than schemaPath?\n readOnly={false}\n schemaPath={schemaPath} // Having the correct schemaPath here allows sub-fields (like array > addRow) to run correct form-state calls and retrieve their needed form state from the server\n />\n </Collapsible>\n\n <FormSavePlugin onChange={onFormChange} />\n </React.Fragment>\n )\n}\n"],"names":["useLexicalComposerContext","getTranslation","Button","Collapsible","ErrorPill","Pill","RenderComponent","RenderFields","SectionTitle","useDocumentInfo","useFormSubmitted","useTranslation","dequal","$getNodeByKey","React","useCallback","FormSavePlugin","removeUndefinedAndNullAndEmptyArraysRecursively","obj","key","value","Array","isArray","length","undefined","BlockContent","props","baseClass","clientBlock","field","formSchema","nodeKey","schemaPath","formData","i18n","editor","getDocPreferences","setDocFieldPreferences","isCollapsed","setIsCollapsed","useState","initialState","then","currentDocPreferences","currentFieldPreferences","fields","name","collapsedArray","collapsed","includes","id","hasSubmitted","errorCount","setErrorCount","fieldHasErrors","classNames","filter","Boolean","join","onFormChange","fullFieldsWithValues","newFormData","blockType","setTimeout","update","node","setFields","rowErrorCount","formField","Object","values","valid","onCollapsedChange","changedCollapsed","newCollapsed","push","splice","indexOf","hello","removeBlock","remove","Fragment","className","collapsibleStyle","header","admin","components","Label","clientProps","blockKind","mappedComponent","div","pillStyle","labels","singular","slug","path","readOnly","count","withMessage","isEditable","buttonStyle","disabled","icon","onClick","e","preventDefault","round","tooltip","onToggle","incomingCollapsedState","forceRender","margins","onChange"],"mappings":"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"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FormSavePlugin.d.ts","sourceRoot":"","sources":["../../../../../src/features/blocks/client/component/FormSavePlugin.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,SAAS,CAAA;AAC9C,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAQ9B,KAAK,KAAK,GAAG;IACX,QAAQ,CAAC,EAAE,CAAC,EACV,oBAAoB,EACpB,WAAW,GACZ,EAAE;QACD,oBAAoB,EAAE,SAAS,CAAA;QAC/B,WAAW,EAAE,IAAI,CAAA;KAClB,KAAK,IAAI,CAAA;CACX,CAAA;AAED,eAAO,MAAM,cAAc,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,CAkB1C,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../src/features/blocks/client/component/FormSavePlugin.tsx"],"sourcesContent":["import type { Data, FormState } from 'payload'\nimport type React from 'react'\n\nimport { useAllFormFields } from '@payloadcms/ui'\nimport { reduceFieldsToValues } from 'payload/shared'\nimport { useEffect } from 'react'\n\nimport { removeEmptyArrayValues } from './removeEmptyArrayValues.js'\n\ntype Props = {\n onChange?: ({\n fullFieldsWithValues,\n newFormData,\n }: {\n fullFieldsWithValues: FormState\n newFormData: Data\n }) => void\n}\n\nexport const FormSavePlugin: React.FC<Props> = (props) => {\n const { onChange } = props\n\n const [_fields] = useAllFormFields()\n\n const fields = removeEmptyArrayValues({ fields: _fields })\n\n // Pass in fields, and indicate if you'd like to \"unflatten\" field data.\n // The result below will reflect the data stored in the form at the given time\n const newFormData = reduceFieldsToValues(fields, true)\n\n useEffect(() => {\n if (onChange) {\n onChange({ fullFieldsWithValues: fields, newFormData })\n }\n }, [newFormData, onChange, fields])\n\n return null\n}\n"],"names":["useAllFormFields","reduceFieldsToValues","useEffect","removeEmptyArrayValues","FormSavePlugin","props","onChange","_fields","fields","newFormData","fullFieldsWithValues"],"mappings":"AAGA,SAASA,gBAAgB,QAAQ,iBAAgB;AACjD,SAASC,oBAAoB,QAAQ,iBAAgB;AACrD,SAASC,SAAS,QAAQ,QAAO;AAEjC,SAASC,sBAAsB,QAAQ,8BAA6B;AAYpE,OAAO,MAAMC,iBAAkC,CAACC;IAC9C,MAAM,EAAEC,QAAQ,EAAE,GAAGD;IAErB,MAAM,CAACE,QAAQ,GAAGP;IAElB,MAAMQ,SAASL,uBAAuB;QAAEK,QAAQD;IAAQ;IAExD,wEAAwE;IACxE,8EAA8E;IAC9E,MAAME,cAAcR,qBAAqBO,QAAQ;IAEjDN,UAAU;QACR,IAAII,UAAU;YACZA,SAAS;gBAAEI,sBAAsBF;gBAAQC;YAAY;QACvD;IACF,GAAG;QAACA;QAAaH;QAAUE;KAAO;IAElC,OAAO;AACT,EAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { BlockFields } from '../../server/nodes/BlocksNode.js';
|
|
3
|
+
import './index.scss';
|
|
4
|
+
type Props = {
|
|
5
|
+
readonly children?: React.ReactNode;
|
|
6
|
+
readonly formData: BlockFields;
|
|
7
|
+
readonly nodeKey?: string;
|
|
8
|
+
};
|
|
9
|
+
export declare const BlockComponent: React.FC<Props>;
|
|
10
|
+
export {};
|
|
11
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/features/blocks/client/component/index.tsx"],"names":[],"mappings":"AAiBA,OAAO,KAAoD,MAAM,OAAO,CAAA;AASxE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kCAAkC,CAAA;AAInE,OAAO,cAAc,CAAA;AAErB,KAAK,KAAK,GAAG;IACX,QAAQ,CAAC,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IACnC,QAAQ,CAAC,QAAQ,EAAE,WAAW,CAAA;IAC9B,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAA;CAC1B,CAAA;AAED,eAAO,MAAM,cAAc,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,CAsJ1C,CAAA"}
|
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { Collapsible, Form, Pill, RenderComponent, SectionTitle, ShimmerEffect, useConfig, useDocumentInfo, useFieldProps, useFormSubmitted, useTranslation } from '@payloadcms/ui';
|
|
4
|
+
import React, { useCallback, useEffect, useMemo, useState } from 'react';
|
|
5
|
+
const baseClass = 'lexical-block';
|
|
6
|
+
import { getTranslation } from '@payloadcms/translations';
|
|
7
|
+
import { getFormState } from '@payloadcms/ui/shared';
|
|
8
|
+
import { v4 as uuid } from 'uuid';
|
|
9
|
+
import { useEditorConfigContext } from '../../../../lexical/config/client/EditorConfigProvider.js';
|
|
10
|
+
import { BlockContent } from './BlockContent.js';
|
|
11
|
+
export const BlockComponent = (props)=>{
|
|
12
|
+
const { formData, nodeKey } = props;
|
|
13
|
+
const { config } = useConfig();
|
|
14
|
+
const submitted = useFormSubmitted();
|
|
15
|
+
const { id } = useDocumentInfo();
|
|
16
|
+
const { path, schemaPath } = useFieldProps();
|
|
17
|
+
const { field: parentLexicalRichTextField } = useEditorConfigContext();
|
|
18
|
+
const [initialState, setInitialState] = useState(false);
|
|
19
|
+
const { field: { richTextComponentMap } } = useEditorConfigContext();
|
|
20
|
+
const schemaFieldsPath = `${schemaPath}.lexical_internal_feature.blocks.lexical_blocks.lexical_blocks.${formData.blockType}`;
|
|
21
|
+
const componentMapRenderedBlockPath = `lexical_internal_feature.blocks.fields.lexical_blocks`;
|
|
22
|
+
const blocksField = richTextComponentMap.get(componentMapRenderedBlockPath)[0];
|
|
23
|
+
const clientBlock = blocksField.blocks.find((block)=>block.slug === formData.blockType);
|
|
24
|
+
// Field Schema
|
|
25
|
+
useEffect(()=>{
|
|
26
|
+
const awaitInitialState = async ()=>{
|
|
27
|
+
const state = await getFormState({
|
|
28
|
+
apiRoute: config.routes.api,
|
|
29
|
+
body: {
|
|
30
|
+
id,
|
|
31
|
+
data: formData,
|
|
32
|
+
operation: 'update',
|
|
33
|
+
schemaPath: schemaFieldsPath
|
|
34
|
+
},
|
|
35
|
+
serverURL: config.serverURL
|
|
36
|
+
});
|
|
37
|
+
if (state) {
|
|
38
|
+
state.blockName = {
|
|
39
|
+
initialValue: '',
|
|
40
|
+
passesCondition: true,
|
|
41
|
+
valid: true,
|
|
42
|
+
value: formData.blockName
|
|
43
|
+
};
|
|
44
|
+
setInitialState(state);
|
|
45
|
+
}
|
|
46
|
+
};
|
|
47
|
+
if (formData) {
|
|
48
|
+
void awaitInitialState();
|
|
49
|
+
}
|
|
50
|
+
}, [
|
|
51
|
+
config.routes.api,
|
|
52
|
+
config.serverURL,
|
|
53
|
+
schemaFieldsPath,
|
|
54
|
+
id
|
|
55
|
+
]) // DO NOT ADD FORMDATA HERE! Adding formData will kick you out of sub block editors while writing.
|
|
56
|
+
;
|
|
57
|
+
const onChange = useCallback(async ({ formState: prevFormState })=>{
|
|
58
|
+
const formState = await getFormState({
|
|
59
|
+
apiRoute: config.routes.api,
|
|
60
|
+
body: {
|
|
61
|
+
id,
|
|
62
|
+
formState: prevFormState,
|
|
63
|
+
operation: 'update',
|
|
64
|
+
schemaPath: schemaFieldsPath
|
|
65
|
+
},
|
|
66
|
+
serverURL: config.serverURL
|
|
67
|
+
});
|
|
68
|
+
formState.blockName = {
|
|
69
|
+
initialValue: '',
|
|
70
|
+
passesCondition: true,
|
|
71
|
+
valid: true,
|
|
72
|
+
value: formData.blockName
|
|
73
|
+
};
|
|
74
|
+
return formState;
|
|
75
|
+
}, [
|
|
76
|
+
config.routes.api,
|
|
77
|
+
config.serverURL,
|
|
78
|
+
id,
|
|
79
|
+
schemaFieldsPath,
|
|
80
|
+
formData.blockName
|
|
81
|
+
]);
|
|
82
|
+
const { i18n } = useTranslation();
|
|
83
|
+
const classNames = [
|
|
84
|
+
`${baseClass}__row`,
|
|
85
|
+
`${baseClass}__row--no-errors`
|
|
86
|
+
].filter(Boolean).join(' ');
|
|
87
|
+
// Memoized Form JSX
|
|
88
|
+
const formContent = useMemo(()=>{
|
|
89
|
+
return clientBlock && initialState !== false ? /*#__PURE__*/ _jsx(Form, {
|
|
90
|
+
beforeSubmit: [
|
|
91
|
+
onChange
|
|
92
|
+
],
|
|
93
|
+
fields: clientBlock.fields,
|
|
94
|
+
initialState: initialState,
|
|
95
|
+
onChange: [
|
|
96
|
+
onChange
|
|
97
|
+
],
|
|
98
|
+
submitted: submitted,
|
|
99
|
+
uuid: uuid(),
|
|
100
|
+
children: /*#__PURE__*/ _jsx(BlockContent, {
|
|
101
|
+
baseClass: baseClass,
|
|
102
|
+
clientBlock: clientBlock,
|
|
103
|
+
field: parentLexicalRichTextField,
|
|
104
|
+
formData: formData,
|
|
105
|
+
formSchema: clientBlock.fields,
|
|
106
|
+
nodeKey: nodeKey,
|
|
107
|
+
path: `${path}.lexical_internal_feature.blocks.${formData.blockType}`,
|
|
108
|
+
schemaPath: schemaFieldsPath
|
|
109
|
+
})
|
|
110
|
+
}) : /*#__PURE__*/ _jsx(Collapsible, {
|
|
111
|
+
className: classNames,
|
|
112
|
+
collapsibleStyle: "default",
|
|
113
|
+
header: clientBlock?.admin?.components?.Label ? /*#__PURE__*/ _jsx(RenderComponent, {
|
|
114
|
+
clientProps: {
|
|
115
|
+
blockKind: 'lexicalBlock',
|
|
116
|
+
formData
|
|
117
|
+
},
|
|
118
|
+
mappedComponent: clientBlock.admin.components.Label
|
|
119
|
+
}) : /*#__PURE__*/ _jsx("div", {
|
|
120
|
+
className: `${baseClass}__block-header`,
|
|
121
|
+
children: /*#__PURE__*/ _jsxs("div", {
|
|
122
|
+
children: [
|
|
123
|
+
/*#__PURE__*/ _jsx(Pill, {
|
|
124
|
+
className: `${baseClass}__block-pill ${baseClass}__block-pill-${formData?.blockType}`,
|
|
125
|
+
pillStyle: "white",
|
|
126
|
+
children: clientBlock && typeof clientBlock.labels.singular === 'string' ? getTranslation(clientBlock.labels.singular, i18n) : clientBlock.slug
|
|
127
|
+
}),
|
|
128
|
+
/*#__PURE__*/ _jsx(SectionTitle, {
|
|
129
|
+
path: "blockName",
|
|
130
|
+
readOnly: parentLexicalRichTextField?.admin?.readOnly
|
|
131
|
+
})
|
|
132
|
+
]
|
|
133
|
+
})
|
|
134
|
+
}),
|
|
135
|
+
children: /*#__PURE__*/ _jsx(ShimmerEffect, {
|
|
136
|
+
height: "35vh"
|
|
137
|
+
})
|
|
138
|
+
}, 0);
|
|
139
|
+
}, [
|
|
140
|
+
clientBlock,
|
|
141
|
+
initialState,
|
|
142
|
+
onChange,
|
|
143
|
+
submitted,
|
|
144
|
+
parentLexicalRichTextField,
|
|
145
|
+
nodeKey,
|
|
146
|
+
path,
|
|
147
|
+
schemaFieldsPath,
|
|
148
|
+
classNames,
|
|
149
|
+
i18n
|
|
150
|
+
]);
|
|
151
|
+
return /*#__PURE__*/ _jsx("div", {
|
|
152
|
+
className: baseClass + ' ' + baseClass + '-' + formData.blockType,
|
|
153
|
+
children: formContent
|
|
154
|
+
});
|
|
155
|
+
};
|
|
156
|
+
|
|
157
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../src/features/blocks/client/component/index.tsx"],"sourcesContent":["'use client'\n\nimport type { FormProps } from '@payloadcms/ui'\n\nimport {\n Collapsible,\n Form,\n Pill,\n RenderComponent,\n SectionTitle,\n ShimmerEffect,\n useConfig,\n useDocumentInfo,\n useFieldProps,\n useFormSubmitted,\n useTranslation,\n} from '@payloadcms/ui'\nimport React, { useCallback, useEffect, useMemo, useState } from 'react'\n\nconst baseClass = 'lexical-block'\nimport type { BlockFieldClient, FormState } from 'payload'\n\nimport { getTranslation } from '@payloadcms/translations'\nimport { getFormState } from '@payloadcms/ui/shared'\nimport { v4 as uuid } from 'uuid'\n\nimport type { BlockFields } from '../../server/nodes/BlocksNode.js'\n\nimport { useEditorConfigContext } from '../../../../lexical/config/client/EditorConfigProvider.js'\nimport { BlockContent } from './BlockContent.js'\nimport './index.scss'\n\ntype Props = {\n readonly children?: React.ReactNode\n readonly formData: BlockFields\n readonly nodeKey?: string\n}\n\nexport const BlockComponent: React.FC<Props> = (props) => {\n const { formData, nodeKey } = props\n const { config } = useConfig()\n const submitted = useFormSubmitted()\n const { id } = useDocumentInfo()\n const { path, schemaPath } = useFieldProps()\n const { field: parentLexicalRichTextField } = useEditorConfigContext()\n\n const [initialState, setInitialState] = useState<FormState | false>(false)\n const {\n field: { richTextComponentMap },\n } = useEditorConfigContext()\n\n const schemaFieldsPath = `${schemaPath}.lexical_internal_feature.blocks.lexical_blocks.lexical_blocks.${formData.blockType}`\n\n const componentMapRenderedBlockPath = `lexical_internal_feature.blocks.fields.lexical_blocks`\n const blocksField: BlockFieldClient = richTextComponentMap.get(componentMapRenderedBlockPath)[0]\n\n const clientBlock = blocksField.blocks.find((block) => block.slug === formData.blockType)\n\n // Field Schema\n useEffect(() => {\n const awaitInitialState = async () => {\n const state = await getFormState({\n apiRoute: config.routes.api,\n body: {\n id,\n data: formData,\n operation: 'update',\n schemaPath: schemaFieldsPath,\n },\n serverURL: config.serverURL,\n })\n\n if (state) {\n state.blockName = {\n initialValue: '',\n passesCondition: true,\n valid: true,\n value: formData.blockName,\n }\n\n setInitialState(state)\n }\n }\n\n if (formData) {\n void awaitInitialState()\n }\n }, [config.routes.api, config.serverURL, schemaFieldsPath, id]) // DO NOT ADD FORMDATA HERE! Adding formData will kick you out of sub block editors while writing.\n\n const onChange: FormProps['onChange'][0] = useCallback(\n async ({ formState: prevFormState }) => {\n const formState = await getFormState({\n apiRoute: config.routes.api,\n body: {\n id,\n formState: prevFormState,\n operation: 'update',\n schemaPath: schemaFieldsPath,\n },\n serverURL: config.serverURL,\n })\n\n formState.blockName = {\n initialValue: '',\n passesCondition: true,\n valid: true,\n value: formData.blockName,\n }\n\n return formState\n },\n\n [config.routes.api, config.serverURL, id, schemaFieldsPath, formData.blockName],\n )\n const { i18n } = useTranslation()\n\n const classNames = [`${baseClass}__row`, `${baseClass}__row--no-errors`].filter(Boolean).join(' ')\n\n // Memoized Form JSX\n const formContent = useMemo(() => {\n return clientBlock && initialState !== false ? (\n <Form\n beforeSubmit={[onChange]}\n fields={clientBlock.fields}\n initialState={initialState}\n onChange={[onChange]}\n submitted={submitted}\n uuid={uuid()}\n >\n <BlockContent\n baseClass={baseClass}\n clientBlock={clientBlock}\n field={parentLexicalRichTextField}\n formData={formData}\n formSchema={clientBlock.fields}\n nodeKey={nodeKey}\n path={`${path}.lexical_internal_feature.blocks.${formData.blockType}`}\n schemaPath={schemaFieldsPath}\n />\n </Form>\n ) : (\n <Collapsible\n className={classNames}\n collapsibleStyle=\"default\"\n header={\n clientBlock?.admin?.components?.Label ? (\n <RenderComponent\n clientProps={{ blockKind: 'lexicalBlock', formData }}\n mappedComponent={clientBlock.admin.components.Label}\n />\n ) : (\n <div className={`${baseClass}__block-header`}>\n <div>\n <Pill\n className={`${baseClass}__block-pill ${baseClass}__block-pill-${formData?.blockType}`}\n pillStyle=\"white\"\n >\n {clientBlock && typeof clientBlock.labels.singular === 'string'\n ? getTranslation(clientBlock.labels.singular, i18n)\n : clientBlock.slug}\n </Pill>\n <SectionTitle\n path=\"blockName\"\n readOnly={parentLexicalRichTextField?.admin?.readOnly}\n />\n </div>\n </div>\n )\n }\n key={0}\n >\n <ShimmerEffect height=\"35vh\" />\n </Collapsible>\n )\n }, [\n clientBlock,\n initialState,\n onChange,\n submitted,\n parentLexicalRichTextField,\n nodeKey,\n path,\n schemaFieldsPath,\n classNames,\n i18n,\n ])\n\n return <div className={baseClass + ' ' + baseClass + '-' + formData.blockType}>{formContent}</div>\n}\n"],"names":["Collapsible","Form","Pill","RenderComponent","SectionTitle","ShimmerEffect","useConfig","useDocumentInfo","useFieldProps","useFormSubmitted","useTranslation","React","useCallback","useEffect","useMemo","useState","baseClass","getTranslation","getFormState","v4","uuid","useEditorConfigContext","BlockContent","BlockComponent","props","formData","nodeKey","config","submitted","id","path","schemaPath","field","parentLexicalRichTextField","initialState","setInitialState","richTextComponentMap","schemaFieldsPath","blockType","componentMapRenderedBlockPath","blocksField","get","clientBlock","blocks","find","block","slug","awaitInitialState","state","apiRoute","routes","api","body","data","operation","serverURL","blockName","initialValue","passesCondition","valid","value","onChange","formState","prevFormState","i18n","classNames","filter","Boolean","join","formContent","beforeSubmit","fields","formSchema","className","collapsibleStyle","header","admin","components","Label","clientProps","blockKind","mappedComponent","div","pillStyle","labels","singular","readOnly","height"],"mappings":"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"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"removeEmptyArrayValues.d.ts","sourceRoot":"","sources":["../../../../../src/features/blocks/client/component/removeEmptyArrayValues.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,SAAS,CAAA;AAExC;;;;;GAKG;AACH,wBAAgB,sBAAsB,CAAC,EAAE,MAAM,EAAE,EAAE;IAAE,MAAM,EAAE,SAAS,CAAA;CAAE,GAAG,SAAS,CAQnF"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../src/features/blocks/client/component/removeEmptyArrayValues.ts"],"sourcesContent":["import type { FormState } from 'payload'\n\n/**\n * By default, if an array field is empty, it will be included in the form state with a value of 0.\n * We do not need this behavior here, By setting `disableFormData` to true, we can prevent the field from being included in the form state\n * like that.\n * @param fields form state\n */\nexport function removeEmptyArrayValues({ fields }: { fields: FormState }): FormState {\n for (const key in fields) {\n const field = fields[key]\n if (Array.isArray(field.rows) && 'value' in field) {\n field.disableFormData = true\n }\n }\n return fields\n}\n"],"names":["removeEmptyArrayValues","fields","key","field","Array","isArray","rows","disableFormData"],"mappings":"AAEA;;;;;CAKC,GACD,OAAO,SAASA,uBAAuB,EAAEC,MAAM,EAAyB;IACtE,IAAK,MAAMC,OAAOD,OAAQ;QACxB,MAAME,QAAQF,MAAM,CAACC,IAAI;QACzB,IAAIE,MAAMC,OAAO,CAACF,MAAMG,IAAI,KAAK,WAAWH,OAAO;YACjDA,MAAMI,eAAe,GAAG;QAC1B;IACF;IACA,OAAON;AACT"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/features/blocks/client/componentInline/index.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAyC,MAAM,OAAO,CAAA;AAoB7D,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAA;AAKrE,OAAO,cAAc,CAAA;AAErB,KAAK,KAAK,GAAG;IACX,QAAQ,CAAC,QAAQ,EAAE,iBAAiB,CAAA;IACpC,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAA;CAC1B,CAAA;AAED,eAAO,MAAM,oBAAoB,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,CA+HhD,CAAA"}
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import React, { useCallback, useEffect, useRef } from 'react';
|
|
4
|
+
const baseClass = 'inline-block';
|
|
5
|
+
import { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext';
|
|
6
|
+
import { useLexicalNodeSelection } from '@lexical/react/useLexicalNodeSelection';
|
|
7
|
+
import { mergeRegister } from '@lexical/utils';
|
|
8
|
+
import { getTranslation } from '@payloadcms/translations';
|
|
9
|
+
import { Button, RenderComponent, useTranslation } from '@payloadcms/ui';
|
|
10
|
+
import { $getNodeByKey, $getSelection, $isNodeSelection, CLICK_COMMAND, COMMAND_PRIORITY_LOW, KEY_BACKSPACE_COMMAND, KEY_DELETE_COMMAND } from 'lexical';
|
|
11
|
+
import { useEditorConfigContext } from '../../../../lexical/config/client/EditorConfigProvider.js';
|
|
12
|
+
import { $isInlineBlockNode } from '../nodes/InlineBlocksNode.js';
|
|
13
|
+
import { OPEN_INLINE_BLOCK_DRAWER_COMMAND } from '../plugin/commands.js';
|
|
14
|
+
export const InlineBlockComponent = (props)=>{
|
|
15
|
+
const { formData, nodeKey } = props;
|
|
16
|
+
const [editor] = useLexicalComposerContext();
|
|
17
|
+
const { i18n, t } = useTranslation();
|
|
18
|
+
const { field } = useEditorConfigContext();
|
|
19
|
+
const inlineBlockElemElemRef = useRef(null);
|
|
20
|
+
const [isSelected, setSelected, clearSelection] = useLexicalNodeSelection(nodeKey);
|
|
21
|
+
const { field: { richTextComponentMap } } = useEditorConfigContext();
|
|
22
|
+
const componentMapRenderedBlockPath = `lexical_internal_feature.blocks.fields.lexical_inline_blocks`;
|
|
23
|
+
const blocksField = richTextComponentMap.get(componentMapRenderedBlockPath)[0];
|
|
24
|
+
const clientBlock = blocksField.blocks.find((block)=>block.slug === formData.blockType);
|
|
25
|
+
const removeInlineBlock = useCallback(()=>{
|
|
26
|
+
editor.update(()=>{
|
|
27
|
+
$getNodeByKey(nodeKey).remove();
|
|
28
|
+
});
|
|
29
|
+
}, [
|
|
30
|
+
editor,
|
|
31
|
+
nodeKey
|
|
32
|
+
]);
|
|
33
|
+
const $onDelete = useCallback((event)=>{
|
|
34
|
+
if (isSelected && $isNodeSelection($getSelection())) {
|
|
35
|
+
event.preventDefault();
|
|
36
|
+
const node = $getNodeByKey(nodeKey);
|
|
37
|
+
if ($isInlineBlockNode(node)) {
|
|
38
|
+
node.remove();
|
|
39
|
+
return true;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
return false;
|
|
43
|
+
}, [
|
|
44
|
+
isSelected,
|
|
45
|
+
nodeKey
|
|
46
|
+
]);
|
|
47
|
+
const onClick = useCallback((payload)=>{
|
|
48
|
+
const event = payload;
|
|
49
|
+
// Check if inlineBlockElemElemRef.target or anything WITHIN inlineBlockElemElemRef.target was clicked
|
|
50
|
+
if (event.target === inlineBlockElemElemRef.current || inlineBlockElemElemRef.current?.contains(event.target)) {
|
|
51
|
+
if (event.shiftKey) {
|
|
52
|
+
setSelected(!isSelected);
|
|
53
|
+
} else {
|
|
54
|
+
if (!isSelected) {
|
|
55
|
+
clearSelection();
|
|
56
|
+
setSelected(true);
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
return true;
|
|
60
|
+
}
|
|
61
|
+
return false;
|
|
62
|
+
}, [
|
|
63
|
+
isSelected,
|
|
64
|
+
setSelected,
|
|
65
|
+
clearSelection
|
|
66
|
+
]);
|
|
67
|
+
useEffect(()=>{
|
|
68
|
+
return mergeRegister(editor.registerCommand(CLICK_COMMAND, onClick, COMMAND_PRIORITY_LOW), editor.registerCommand(KEY_DELETE_COMMAND, $onDelete, COMMAND_PRIORITY_LOW), editor.registerCommand(KEY_BACKSPACE_COMMAND, $onDelete, COMMAND_PRIORITY_LOW));
|
|
69
|
+
}, [
|
|
70
|
+
clearSelection,
|
|
71
|
+
editor,
|
|
72
|
+
isSelected,
|
|
73
|
+
nodeKey,
|
|
74
|
+
$onDelete,
|
|
75
|
+
setSelected,
|
|
76
|
+
onClick
|
|
77
|
+
]);
|
|
78
|
+
const blockDisplayName = clientBlock?.labels?.singular ? getTranslation(clientBlock.labels.singular, i18n) : clientBlock.slug;
|
|
79
|
+
return /*#__PURE__*/ _jsxs("div", {
|
|
80
|
+
className: [
|
|
81
|
+
baseClass,
|
|
82
|
+
baseClass + '-' + formData.blockType,
|
|
83
|
+
isSelected && `${baseClass}--selected`
|
|
84
|
+
].filter(Boolean).join(' '),
|
|
85
|
+
ref: inlineBlockElemElemRef,
|
|
86
|
+
children: [
|
|
87
|
+
clientBlock?.admin?.components?.Label ? /*#__PURE__*/ _jsx(RenderComponent, {
|
|
88
|
+
clientProps: {
|
|
89
|
+
blockKind: 'lexicalInlineBlock',
|
|
90
|
+
formData
|
|
91
|
+
},
|
|
92
|
+
mappedComponent: clientBlock.admin.components.Label
|
|
93
|
+
}) : /*#__PURE__*/ _jsx("div", {
|
|
94
|
+
children: getTranslation(clientBlock.labels?.singular, i18n)
|
|
95
|
+
}),
|
|
96
|
+
editor.isEditable() && /*#__PURE__*/ _jsxs("div", {
|
|
97
|
+
className: `${baseClass}__actions`,
|
|
98
|
+
children: [
|
|
99
|
+
/*#__PURE__*/ _jsx(Button, {
|
|
100
|
+
buttonStyle: "icon-label",
|
|
101
|
+
className: `${baseClass}__editButton`,
|
|
102
|
+
disabled: field?.admin?.readOnly,
|
|
103
|
+
el: "div",
|
|
104
|
+
icon: "edit",
|
|
105
|
+
onClick: ()=>{
|
|
106
|
+
editor.dispatchCommand(OPEN_INLINE_BLOCK_DRAWER_COMMAND, {
|
|
107
|
+
fields: formData,
|
|
108
|
+
nodeKey
|
|
109
|
+
});
|
|
110
|
+
},
|
|
111
|
+
round: true,
|
|
112
|
+
size: "small",
|
|
113
|
+
tooltip: t('lexical:blocks:inlineBlocks:edit', {
|
|
114
|
+
label: blockDisplayName
|
|
115
|
+
})
|
|
116
|
+
}),
|
|
117
|
+
/*#__PURE__*/ _jsx(Button, {
|
|
118
|
+
buttonStyle: "icon-label",
|
|
119
|
+
className: `${baseClass}__removeButton`,
|
|
120
|
+
disabled: field?.admin?.readOnly,
|
|
121
|
+
icon: "x",
|
|
122
|
+
onClick: (e)=>{
|
|
123
|
+
e.preventDefault();
|
|
124
|
+
removeInlineBlock();
|
|
125
|
+
},
|
|
126
|
+
round: true,
|
|
127
|
+
size: "small",
|
|
128
|
+
tooltip: t('lexical:blocks:inlineBlocks:remove', {
|
|
129
|
+
label: blockDisplayName
|
|
130
|
+
})
|
|
131
|
+
})
|
|
132
|
+
]
|
|
133
|
+
})
|
|
134
|
+
]
|
|
135
|
+
});
|
|
136
|
+
};
|
|
137
|
+
|
|
138
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../src/features/blocks/client/componentInline/index.tsx"],"sourcesContent":["'use client'\n\nimport React, { useCallback, useEffect, useRef } from 'react'\nconst baseClass = 'inline-block'\n\nimport type { BlockFieldClient } from 'payload'\n\nimport { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext'\nimport { useLexicalNodeSelection } from '@lexical/react/useLexicalNodeSelection'\nimport { mergeRegister } from '@lexical/utils'\nimport { getTranslation } from '@payloadcms/translations'\nimport { Button, RenderComponent, useTranslation } from '@payloadcms/ui'\nimport {\n $getNodeByKey,\n $getSelection,\n $isNodeSelection,\n CLICK_COMMAND,\n COMMAND_PRIORITY_LOW,\n KEY_BACKSPACE_COMMAND,\n KEY_DELETE_COMMAND,\n} from 'lexical'\n\nimport type { InlineBlockFields } from '../nodes/InlineBlocksNode.js'\n\nimport { useEditorConfigContext } from '../../../../lexical/config/client/EditorConfigProvider.js'\nimport { $isInlineBlockNode } from '../nodes/InlineBlocksNode.js'\nimport { OPEN_INLINE_BLOCK_DRAWER_COMMAND } from '../plugin/commands.js'\nimport './index.scss'\n\ntype Props = {\n readonly formData: InlineBlockFields\n readonly nodeKey?: string\n}\n\nexport const InlineBlockComponent: React.FC<Props> = (props) => {\n const { formData, nodeKey } = props\n const [editor] = useLexicalComposerContext()\n const { i18n, t } = useTranslation<object, string>()\n const { field } = useEditorConfigContext()\n const inlineBlockElemElemRef = useRef<HTMLDivElement | null>(null)\n const [isSelected, setSelected, clearSelection] = useLexicalNodeSelection(nodeKey)\n\n const {\n field: { richTextComponentMap },\n } = useEditorConfigContext()\n\n const componentMapRenderedBlockPath = `lexical_internal_feature.blocks.fields.lexical_inline_blocks`\n const blocksField: BlockFieldClient = richTextComponentMap.get(componentMapRenderedBlockPath)[0]\n const clientBlock = blocksField.blocks.find((block) => block.slug === formData.blockType)\n\n const removeInlineBlock = useCallback(() => {\n editor.update(() => {\n $getNodeByKey(nodeKey).remove()\n })\n }, [editor, nodeKey])\n\n const $onDelete = useCallback(\n (event: KeyboardEvent) => {\n if (isSelected && $isNodeSelection($getSelection())) {\n event.preventDefault()\n const node = $getNodeByKey(nodeKey)\n if ($isInlineBlockNode(node)) {\n node.remove()\n return true\n }\n }\n return false\n },\n [isSelected, nodeKey],\n )\n const onClick = useCallback(\n (payload: MouseEvent) => {\n const event = payload\n // Check if inlineBlockElemElemRef.target or anything WITHIN inlineBlockElemElemRef.target was clicked\n if (\n event.target === inlineBlockElemElemRef.current ||\n inlineBlockElemElemRef.current?.contains(event.target as Node)\n ) {\n if (event.shiftKey) {\n setSelected(!isSelected)\n } else {\n if (!isSelected) {\n clearSelection()\n setSelected(true)\n }\n }\n return true\n }\n\n return false\n },\n [isSelected, setSelected, clearSelection],\n )\n\n useEffect(() => {\n return mergeRegister(\n editor.registerCommand<MouseEvent>(CLICK_COMMAND, onClick, COMMAND_PRIORITY_LOW),\n\n editor.registerCommand(KEY_DELETE_COMMAND, $onDelete, COMMAND_PRIORITY_LOW),\n editor.registerCommand(KEY_BACKSPACE_COMMAND, $onDelete, COMMAND_PRIORITY_LOW),\n )\n }, [clearSelection, editor, isSelected, nodeKey, $onDelete, setSelected, onClick])\n\n const blockDisplayName = clientBlock?.labels?.singular\n ? getTranslation(clientBlock.labels.singular, i18n)\n : clientBlock.slug\n\n return (\n <div\n className={[\n baseClass,\n baseClass + '-' + formData.blockType,\n isSelected && `${baseClass}--selected`,\n ]\n .filter(Boolean)\n .join(' ')}\n ref={inlineBlockElemElemRef}\n >\n {clientBlock?.admin?.components?.Label ? (\n <RenderComponent\n clientProps={{ blockKind: 'lexicalInlineBlock', formData }}\n mappedComponent={clientBlock.admin.components.Label}\n />\n ) : (\n <div>{getTranslation(clientBlock.labels?.singular, i18n)}</div>\n )}\n {editor.isEditable() && (\n <div className={`${baseClass}__actions`}>\n <Button\n buttonStyle=\"icon-label\"\n className={`${baseClass}__editButton`}\n disabled={field?.admin?.readOnly}\n el=\"div\"\n icon=\"edit\"\n onClick={() => {\n editor.dispatchCommand(OPEN_INLINE_BLOCK_DRAWER_COMMAND, {\n fields: formData,\n nodeKey,\n })\n }}\n round\n size=\"small\"\n tooltip={t('lexical:blocks:inlineBlocks:edit', { label: blockDisplayName })}\n />\n <Button\n buttonStyle=\"icon-label\"\n className={`${baseClass}__removeButton`}\n disabled={field?.admin?.readOnly}\n icon=\"x\"\n onClick={(e) => {\n e.preventDefault()\n removeInlineBlock()\n }}\n round\n size=\"small\"\n tooltip={t('lexical:blocks:inlineBlocks:remove', { label: blockDisplayName })}\n />\n </div>\n )}\n </div>\n )\n}\n"],"names":["React","useCallback","useEffect","useRef","baseClass","useLexicalComposerContext","useLexicalNodeSelection","mergeRegister","getTranslation","Button","RenderComponent","useTranslation","$getNodeByKey","$getSelection","$isNodeSelection","CLICK_COMMAND","COMMAND_PRIORITY_LOW","KEY_BACKSPACE_COMMAND","KEY_DELETE_COMMAND","useEditorConfigContext","$isInlineBlockNode","OPEN_INLINE_BLOCK_DRAWER_COMMAND","InlineBlockComponent","props","formData","nodeKey","editor","i18n","t","field","inlineBlockElemElemRef","isSelected","setSelected","clearSelection","richTextComponentMap","componentMapRenderedBlockPath","blocksField","get","clientBlock","blocks","find","block","slug","blockType","removeInlineBlock","update","remove","$onDelete","event","preventDefault","node","onClick","payload","target","current","contains","shiftKey","registerCommand","blockDisplayName","labels","singular","div","className","filter","Boolean","join","ref","admin","components","Label","clientProps","blockKind","mappedComponent","isEditable","buttonStyle","disabled","readOnly","el","icon","dispatchCommand","fields","round","size","tooltip","label","e"],"mappings":"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"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export type BlocksFeatureClientProps = {
|
|
2
|
+
clientBlockSlugs: string[];
|
|
3
|
+
clientInlineBlockSlugs: string[];
|
|
4
|
+
};
|
|
5
|
+
export declare const BlocksFeatureClient: import("react").FC<{
|
|
6
|
+
featureKey: string;
|
|
7
|
+
order: number;
|
|
8
|
+
} & BlocksFeatureClientProps>;
|
|
9
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/features/blocks/client/index.tsx"],"names":[],"mappings":"AAiBA,MAAM,MAAM,wBAAwB,GAAG;IACrC,gBAAgB,EAAE,MAAM,EAAE,CAAA;IAC1B,sBAAsB,EAAE,MAAM,EAAE,CAAA;CACjC,CAAA;AAED,eAAO,MAAM,mBAAmB;;;6BA0K7B,CAAA"}
|