@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,152 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { getTranslation } from '@payloadcms/translations';
|
|
3
|
+
import { BlockIcon } from '../../../lexical/ui/icons/Block/index.js';
|
|
4
|
+
import { InlineBlocksIcon } from '../../../lexical/ui/icons/InlineBlocks/index.js';
|
|
5
|
+
import { createClientFeature } from '../../../utilities/createClientFeature.js';
|
|
6
|
+
import { BlockNode } from './nodes/BlocksNode.js';
|
|
7
|
+
import { InlineBlockNode } from './nodes/InlineBlocksNode.js';
|
|
8
|
+
import { INSERT_BLOCK_COMMAND, OPEN_INLINE_BLOCK_DRAWER_COMMAND } from './plugin/commands.js';
|
|
9
|
+
import { BlocksPlugin } from './plugin/index.js';
|
|
10
|
+
export const BlocksFeatureClient = createClientFeature(({ props })=>({
|
|
11
|
+
nodes: [
|
|
12
|
+
BlockNode,
|
|
13
|
+
InlineBlockNode
|
|
14
|
+
],
|
|
15
|
+
plugins: [
|
|
16
|
+
{
|
|
17
|
+
Component: BlocksPlugin,
|
|
18
|
+
position: 'normal'
|
|
19
|
+
}
|
|
20
|
+
],
|
|
21
|
+
sanitizedClientFeatureProps: props,
|
|
22
|
+
slashMenu: {
|
|
23
|
+
groups: [
|
|
24
|
+
props.clientBlockSlugs?.length ? {
|
|
25
|
+
items: props.clientBlockSlugs.map((blockSlug)=>{
|
|
26
|
+
return {
|
|
27
|
+
Icon: BlockIcon,
|
|
28
|
+
key: 'block-' + blockSlug,
|
|
29
|
+
keywords: [
|
|
30
|
+
'block',
|
|
31
|
+
'blocks',
|
|
32
|
+
blockSlug
|
|
33
|
+
],
|
|
34
|
+
label: ({ i18n, richTextComponentMap })=>{
|
|
35
|
+
const componentMapRenderedBlockPath = `lexical_internal_feature.blocks.fields.lexical_blocks`;
|
|
36
|
+
const blocksField = richTextComponentMap.get(componentMapRenderedBlockPath)[0];
|
|
37
|
+
const clientBlock = blocksField.blocks.find((_block)=>_block.slug === blockSlug);
|
|
38
|
+
const blockDisplayName = clientBlock.labels.singular ? getTranslation(clientBlock.labels.singular, i18n) : clientBlock.slug;
|
|
39
|
+
return blockDisplayName;
|
|
40
|
+
},
|
|
41
|
+
onSelect: ({ editor })=>{
|
|
42
|
+
editor.dispatchCommand(INSERT_BLOCK_COMMAND, {
|
|
43
|
+
id: null,
|
|
44
|
+
blockName: '',
|
|
45
|
+
blockType: blockSlug
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
};
|
|
49
|
+
}),
|
|
50
|
+
key: 'blocks',
|
|
51
|
+
label: ({ i18n })=>{
|
|
52
|
+
return i18n.t('lexical:blocks:label');
|
|
53
|
+
}
|
|
54
|
+
} : null,
|
|
55
|
+
props.clientInlineBlockSlugs?.length ? {
|
|
56
|
+
items: props.clientInlineBlockSlugs.map((inlineBlockSlug)=>{
|
|
57
|
+
return {
|
|
58
|
+
Icon: InlineBlocksIcon,
|
|
59
|
+
key: 'inlineBlocks-' + inlineBlockSlug,
|
|
60
|
+
keywords: [
|
|
61
|
+
'inlineBlock',
|
|
62
|
+
'inline block',
|
|
63
|
+
inlineBlockSlug
|
|
64
|
+
],
|
|
65
|
+
label: ({ i18n, richTextComponentMap })=>{
|
|
66
|
+
const componentMapRenderedBlockPath = `lexical_internal_feature.blocks.fields.lexical_inline_blocks`;
|
|
67
|
+
const blocksField = richTextComponentMap.get(componentMapRenderedBlockPath)[0];
|
|
68
|
+
const clientBlock = blocksField.blocks.find((_block)=>_block.slug === inlineBlockSlug);
|
|
69
|
+
const blockDisplayName = clientBlock.labels.singular ? getTranslation(clientBlock.labels.singular, i18n) : clientBlock.slug;
|
|
70
|
+
return blockDisplayName;
|
|
71
|
+
},
|
|
72
|
+
onSelect: ({ editor })=>{
|
|
73
|
+
editor.dispatchCommand(OPEN_INLINE_BLOCK_DRAWER_COMMAND, {
|
|
74
|
+
fields: {
|
|
75
|
+
id: null,
|
|
76
|
+
blockName: '',
|
|
77
|
+
blockType: inlineBlockSlug
|
|
78
|
+
}
|
|
79
|
+
});
|
|
80
|
+
}
|
|
81
|
+
};
|
|
82
|
+
}),
|
|
83
|
+
key: 'inlineBlocks',
|
|
84
|
+
label: ({ i18n })=>{
|
|
85
|
+
return i18n.t('lexical:blocks:inlineBlocks:label');
|
|
86
|
+
}
|
|
87
|
+
} : null
|
|
88
|
+
].filter(Boolean)
|
|
89
|
+
},
|
|
90
|
+
toolbarFixed: {
|
|
91
|
+
groups: [
|
|
92
|
+
props.clientBlockSlugs?.length ? {
|
|
93
|
+
type: 'dropdown',
|
|
94
|
+
ChildComponent: BlockIcon,
|
|
95
|
+
items: props.clientBlockSlugs.map((blockSlug, index)=>{
|
|
96
|
+
return {
|
|
97
|
+
ChildComponent: BlockIcon,
|
|
98
|
+
isActive: undefined,
|
|
99
|
+
key: 'block-' + blockSlug,
|
|
100
|
+
label: ({ i18n, richTextComponentMap })=>{
|
|
101
|
+
const componentMapRenderedBlockPath = `lexical_internal_feature.blocks.fields.lexical_blocks`;
|
|
102
|
+
const blocksField = richTextComponentMap.get(componentMapRenderedBlockPath)[0];
|
|
103
|
+
const clientBlock = blocksField.blocks.find((_block)=>_block.slug === blockSlug);
|
|
104
|
+
const blockDisplayName = clientBlock.labels.singular ? getTranslation(clientBlock.labels.singular, i18n) : clientBlock.slug;
|
|
105
|
+
return blockDisplayName;
|
|
106
|
+
},
|
|
107
|
+
onSelect: ({ editor })=>{
|
|
108
|
+
editor.dispatchCommand(INSERT_BLOCK_COMMAND, {
|
|
109
|
+
id: null,
|
|
110
|
+
blockName: '',
|
|
111
|
+
blockType: blockSlug
|
|
112
|
+
});
|
|
113
|
+
},
|
|
114
|
+
order: index
|
|
115
|
+
};
|
|
116
|
+
}),
|
|
117
|
+
key: 'blocks',
|
|
118
|
+
order: 20
|
|
119
|
+
} : null,
|
|
120
|
+
props.clientInlineBlockSlugs?.length ? {
|
|
121
|
+
type: 'dropdown',
|
|
122
|
+
ChildComponent: InlineBlocksIcon,
|
|
123
|
+
items: props.clientInlineBlockSlugs.map((inlineBlockSlug, index)=>{
|
|
124
|
+
return {
|
|
125
|
+
ChildComponent: InlineBlocksIcon,
|
|
126
|
+
isActive: undefined,
|
|
127
|
+
key: 'inlineBlock-' + inlineBlockSlug,
|
|
128
|
+
label: ({ i18n, richTextComponentMap })=>{
|
|
129
|
+
const componentMapRenderedBlockPath = `lexical_internal_feature.blocks.fields.lexical_inline_blocks`;
|
|
130
|
+
const blocksField = richTextComponentMap.get(componentMapRenderedBlockPath)[0];
|
|
131
|
+
const clientBlock = blocksField.blocks.find((_block)=>_block.slug === inlineBlockSlug);
|
|
132
|
+
const blockDisplayName = clientBlock.labels.singular ? getTranslation(clientBlock.labels.singular, i18n) : clientBlock.slug;
|
|
133
|
+
return blockDisplayName;
|
|
134
|
+
},
|
|
135
|
+
onSelect: ({ editor })=>{
|
|
136
|
+
editor.dispatchCommand(OPEN_INLINE_BLOCK_DRAWER_COMMAND, {
|
|
137
|
+
fields: {
|
|
138
|
+
blockType: inlineBlockSlug
|
|
139
|
+
}
|
|
140
|
+
});
|
|
141
|
+
},
|
|
142
|
+
order: index
|
|
143
|
+
};
|
|
144
|
+
}),
|
|
145
|
+
key: 'inlineBlocks',
|
|
146
|
+
order: 25
|
|
147
|
+
} : null
|
|
148
|
+
].filter(Boolean)
|
|
149
|
+
}
|
|
150
|
+
}));
|
|
151
|
+
|
|
152
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/features/blocks/client/index.tsx"],"sourcesContent":["'use client'\n\nimport type { BlockFieldClient } from 'payload'\n\nimport { getTranslation } from '@payloadcms/translations'\n\nimport type { SlashMenuItem } from '../../../lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/types.js'\nimport type { ToolbarGroup, ToolbarGroupItem } from '../../toolbars/types.js'\n\nimport { BlockIcon } from '../../../lexical/ui/icons/Block/index.js'\nimport { InlineBlocksIcon } from '../../../lexical/ui/icons/InlineBlocks/index.js'\nimport { createClientFeature } from '../../../utilities/createClientFeature.js'\nimport { BlockNode } from './nodes/BlocksNode.js'\nimport { InlineBlockNode } from './nodes/InlineBlocksNode.js'\nimport { INSERT_BLOCK_COMMAND, OPEN_INLINE_BLOCK_DRAWER_COMMAND } from './plugin/commands.js'\nimport { BlocksPlugin } from './plugin/index.js'\n\nexport type BlocksFeatureClientProps = {\n clientBlockSlugs: string[]\n clientInlineBlockSlugs: string[]\n}\n\nexport const BlocksFeatureClient = createClientFeature<BlocksFeatureClientProps>(({ props }) => ({\n nodes: [BlockNode, InlineBlockNode],\n plugins: [\n {\n Component: BlocksPlugin,\n position: 'normal',\n },\n ],\n sanitizedClientFeatureProps: props,\n slashMenu: {\n groups: [\n props.clientBlockSlugs?.length\n ? {\n items: props.clientBlockSlugs.map((blockSlug) => {\n return {\n Icon: BlockIcon,\n key: 'block-' + blockSlug,\n keywords: ['block', 'blocks', blockSlug],\n label: ({ i18n, richTextComponentMap }) => {\n const componentMapRenderedBlockPath = `lexical_internal_feature.blocks.fields.lexical_blocks`\n const blocksField: BlockFieldClient = richTextComponentMap.get(\n componentMapRenderedBlockPath,\n )[0]\n\n const clientBlock = blocksField.blocks.find((_block) => _block.slug === blockSlug)\n\n const blockDisplayName = clientBlock.labels.singular\n ? getTranslation(clientBlock.labels.singular, i18n)\n : clientBlock.slug\n\n return blockDisplayName\n },\n onSelect: ({ editor }) => {\n editor.dispatchCommand(INSERT_BLOCK_COMMAND, {\n id: null,\n blockName: '',\n blockType: blockSlug,\n })\n },\n } as SlashMenuItem\n }),\n key: 'blocks',\n label: ({ i18n }) => {\n return i18n.t('lexical:blocks:label')\n },\n }\n : null,\n props.clientInlineBlockSlugs?.length\n ? {\n items: props.clientInlineBlockSlugs.map((inlineBlockSlug) => {\n return {\n Icon: InlineBlocksIcon,\n key: 'inlineBlocks-' + inlineBlockSlug,\n keywords: ['inlineBlock', 'inline block', inlineBlockSlug],\n label: ({ i18n, richTextComponentMap }) => {\n const componentMapRenderedBlockPath = `lexical_internal_feature.blocks.fields.lexical_inline_blocks`\n\n const blocksField: BlockFieldClient = richTextComponentMap.get(\n componentMapRenderedBlockPath,\n )[0]\n\n const clientBlock = blocksField.blocks.find(\n (_block) => _block.slug === inlineBlockSlug,\n )\n\n const blockDisplayName = clientBlock.labels.singular\n ? getTranslation(clientBlock.labels.singular, i18n)\n : clientBlock.slug\n\n return blockDisplayName\n },\n onSelect: ({ editor }) => {\n editor.dispatchCommand(OPEN_INLINE_BLOCK_DRAWER_COMMAND, {\n fields: {\n id: null,\n blockName: '',\n blockType: inlineBlockSlug,\n },\n })\n },\n } as SlashMenuItem\n }),\n key: 'inlineBlocks',\n label: ({ i18n }) => {\n return i18n.t('lexical:blocks:inlineBlocks:label')\n },\n }\n : null,\n ].filter(Boolean),\n },\n toolbarFixed: {\n groups: [\n props.clientBlockSlugs?.length\n ? {\n type: 'dropdown',\n ChildComponent: BlockIcon,\n items: props.clientBlockSlugs.map((blockSlug, index) => {\n return {\n ChildComponent: BlockIcon,\n isActive: undefined, // At this point, we would be inside a sub-richtext-editor. And at this point this will be run against the focused sub-editor, not the parent editor which has the actual block. Thus, no point in running this\n key: 'block-' + blockSlug,\n label: ({ i18n, richTextComponentMap }) => {\n const componentMapRenderedBlockPath = `lexical_internal_feature.blocks.fields.lexical_blocks`\n const blocksField: BlockFieldClient = richTextComponentMap.get(\n componentMapRenderedBlockPath,\n )[0]\n\n const clientBlock = blocksField.blocks.find((_block) => _block.slug === blockSlug)\n\n const blockDisplayName = clientBlock.labels.singular\n ? getTranslation(clientBlock.labels.singular, i18n)\n : clientBlock.slug\n\n return blockDisplayName\n },\n onSelect: ({ editor }) => {\n editor.dispatchCommand(INSERT_BLOCK_COMMAND, {\n id: null,\n blockName: '',\n blockType: blockSlug,\n })\n },\n order: index,\n } as ToolbarGroupItem\n }),\n key: 'blocks',\n order: 20,\n }\n : null,\n props.clientInlineBlockSlugs?.length\n ? {\n type: 'dropdown',\n ChildComponent: InlineBlocksIcon,\n items: props.clientInlineBlockSlugs.map((inlineBlockSlug, index) => {\n return {\n ChildComponent: InlineBlocksIcon,\n isActive: undefined,\n key: 'inlineBlock-' + inlineBlockSlug,\n label: ({ i18n, richTextComponentMap }) => {\n const componentMapRenderedBlockPath = `lexical_internal_feature.blocks.fields.lexical_inline_blocks`\n const blocksField: BlockFieldClient = richTextComponentMap.get(\n componentMapRenderedBlockPath,\n )[0]\n\n const clientBlock = blocksField.blocks.find(\n (_block) => _block.slug === inlineBlockSlug,\n )\n\n const blockDisplayName = clientBlock.labels.singular\n ? getTranslation(clientBlock.labels.singular, i18n)\n : clientBlock.slug\n\n return blockDisplayName\n },\n onSelect: ({ editor }) => {\n editor.dispatchCommand(OPEN_INLINE_BLOCK_DRAWER_COMMAND, {\n fields: {\n blockType: inlineBlockSlug,\n },\n })\n },\n order: index,\n } as ToolbarGroupItem\n }),\n key: 'inlineBlocks',\n order: 25,\n }\n : null,\n ].filter(Boolean) as ToolbarGroup[],\n },\n}))\n"],"names":["getTranslation","BlockIcon","InlineBlocksIcon","createClientFeature","BlockNode","InlineBlockNode","INSERT_BLOCK_COMMAND","OPEN_INLINE_BLOCK_DRAWER_COMMAND","BlocksPlugin","BlocksFeatureClient","props","nodes","plugins","Component","position","sanitizedClientFeatureProps","slashMenu","groups","clientBlockSlugs","length","items","map","blockSlug","Icon","key","keywords","label","i18n","richTextComponentMap","componentMapRenderedBlockPath","blocksField","get","clientBlock","blocks","find","_block","slug","blockDisplayName","labels","singular","onSelect","editor","dispatchCommand","id","blockName","blockType","t","clientInlineBlockSlugs","inlineBlockSlug","fields","filter","Boolean","toolbarFixed","type","ChildComponent","index","isActive","undefined","order"],"mappings":"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"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { EditorConfig, LexicalEditor, LexicalNode } from 'lexical';
|
|
2
|
+
import { type JSX } from 'react';
|
|
3
|
+
import type { BlockFields, SerializedBlockNode } from '../../server/nodes/BlocksNode.js';
|
|
4
|
+
import { ServerBlockNode } from '../../server/nodes/BlocksNode.js';
|
|
5
|
+
export declare class BlockNode extends ServerBlockNode {
|
|
6
|
+
static clone(node: ServerBlockNode): ServerBlockNode;
|
|
7
|
+
static getType(): string;
|
|
8
|
+
static importJSON(serializedNode: SerializedBlockNode): BlockNode;
|
|
9
|
+
decorate(editor: LexicalEditor, config: EditorConfig): JSX.Element;
|
|
10
|
+
exportJSON(): SerializedBlockNode;
|
|
11
|
+
}
|
|
12
|
+
export declare function $createBlockNode(fields: Exclude<BlockFields, 'id'>): BlockNode;
|
|
13
|
+
export declare function $isBlockNode(node: BlockNode | LexicalNode | null | undefined): node is BlockNode;
|
|
14
|
+
//# sourceMappingURL=BlocksNode.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BlocksNode.d.ts","sourceRoot":"","sources":["../../../../../src/features/blocks/client/nodes/BlocksNode.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,SAAS,CAAA;AAGvE,OAAc,EAAE,KAAK,GAAG,EAAE,MAAM,OAAO,CAAA;AAEvC,OAAO,KAAK,EAAE,WAAW,EAAE,mBAAmB,EAAE,MAAM,kCAAkC,CAAA;AAExF,OAAO,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAA;AAQlE,qBAAa,SAAU,SAAQ,eAAe;IAC5C,MAAM,CAAC,KAAK,CAAC,IAAI,EAAE,eAAe,GAAG,eAAe;IAIpD,MAAM,CAAC,OAAO,IAAI,MAAM;IAIxB,MAAM,CAAC,UAAU,CAAC,cAAc,EAAE,mBAAmB,GAAG,SAAS;IAgBjE,QAAQ,CAAC,MAAM,EAAE,aAAa,EAAE,MAAM,EAAE,YAAY,GAAG,GAAG,CAAC,OAAO;IAIlE,UAAU,IAAI,mBAAmB;CAGlC;AAED,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,OAAO,CAAC,WAAW,EAAE,IAAI,CAAC,GAAG,SAAS,CAO9E;AAED,wBAAgB,YAAY,CAAC,IAAI,EAAE,SAAS,GAAG,WAAW,GAAG,IAAI,GAAG,SAAS,GAAG,IAAI,IAAI,SAAS,CAEhG"}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import ObjectID from 'bson-objectid';
|
|
3
|
+
import React from 'react';
|
|
4
|
+
import { ServerBlockNode } from '../../server/nodes/BlocksNode.js';
|
|
5
|
+
const BlockComponent = /*#__PURE__*/ React.lazy(()=>import('../component/index.js').then((module)=>({
|
|
6
|
+
default: module.BlockComponent
|
|
7
|
+
})));
|
|
8
|
+
export class BlockNode extends ServerBlockNode {
|
|
9
|
+
static clone(node) {
|
|
10
|
+
return super.clone(node);
|
|
11
|
+
}
|
|
12
|
+
static getType() {
|
|
13
|
+
return super.getType();
|
|
14
|
+
}
|
|
15
|
+
static importJSON(serializedNode) {
|
|
16
|
+
if (serializedNode.version === 1) {
|
|
17
|
+
// Convert (version 1 had the fields wrapped in another, unnecessary data property)
|
|
18
|
+
serializedNode = {
|
|
19
|
+
...serializedNode,
|
|
20
|
+
fields: {
|
|
21
|
+
...serializedNode.fields.data
|
|
22
|
+
},
|
|
23
|
+
version: 2
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
const node = $createBlockNode(serializedNode.fields);
|
|
27
|
+
node.setFormat(serializedNode.format);
|
|
28
|
+
return node;
|
|
29
|
+
}
|
|
30
|
+
decorate(editor, config) {
|
|
31
|
+
return /*#__PURE__*/ _jsx(BlockComponent, {
|
|
32
|
+
formData: this.getFields(),
|
|
33
|
+
nodeKey: this.getKey()
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
exportJSON() {
|
|
37
|
+
return super.exportJSON();
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
export function $createBlockNode(fields) {
|
|
41
|
+
return new BlockNode({
|
|
42
|
+
fields: {
|
|
43
|
+
...fields,
|
|
44
|
+
id: fields?.id || new ObjectID.default().toHexString()
|
|
45
|
+
}
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
export function $isBlockNode(node) {
|
|
49
|
+
return node instanceof BlockNode;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
//# sourceMappingURL=BlocksNode.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../src/features/blocks/client/nodes/BlocksNode.tsx"],"sourcesContent":["import type { EditorConfig, LexicalEditor, LexicalNode } from 'lexical'\n\nimport ObjectID from 'bson-objectid'\nimport React, { type JSX } from 'react'\n\nimport type { BlockFields, SerializedBlockNode } from '../../server/nodes/BlocksNode.js'\n\nimport { ServerBlockNode } from '../../server/nodes/BlocksNode.js'\n\nconst BlockComponent = React.lazy(() =>\n import('../component/index.js').then((module) => ({\n default: module.BlockComponent,\n })),\n)\n\nexport class BlockNode extends ServerBlockNode {\n static clone(node: ServerBlockNode): ServerBlockNode {\n return super.clone(node)\n }\n\n static getType(): string {\n return super.getType()\n }\n\n static importJSON(serializedNode: SerializedBlockNode): BlockNode {\n if (serializedNode.version === 1) {\n // Convert (version 1 had the fields wrapped in another, unnecessary data property)\n serializedNode = {\n ...serializedNode,\n fields: {\n ...(serializedNode as any).fields.data,\n },\n version: 2,\n }\n }\n const node = $createBlockNode(serializedNode.fields)\n node.setFormat(serializedNode.format)\n return node\n }\n\n decorate(editor: LexicalEditor, config: EditorConfig): JSX.Element {\n return <BlockComponent formData={this.getFields()} nodeKey={this.getKey()} />\n }\n\n exportJSON(): SerializedBlockNode {\n return super.exportJSON()\n }\n}\n\nexport function $createBlockNode(fields: Exclude<BlockFields, 'id'>): BlockNode {\n return new BlockNode({\n fields: {\n ...fields,\n id: fields?.id || new ObjectID.default().toHexString(),\n },\n })\n}\n\nexport function $isBlockNode(node: BlockNode | LexicalNode | null | undefined): node is BlockNode {\n return node instanceof BlockNode\n}\n"],"names":["ObjectID","React","ServerBlockNode","BlockComponent","lazy","then","module","default","BlockNode","clone","node","getType","importJSON","serializedNode","version","fields","data","$createBlockNode","setFormat","format","decorate","editor","config","formData","getFields","nodeKey","getKey","exportJSON","id","toHexString","$isBlockNode"],"mappings":";AAEA,OAAOA,cAAc,gBAAe;AACpC,OAAOC,WAAyB,QAAO;AAIvC,SAASC,eAAe,QAAQ,mCAAkC;AAElE,MAAMC,+BAAiBF,MAAMG,IAAI,CAAC,IAChC,MAAM,CAAC,yBAAyBC,IAAI,CAAC,CAACC,SAAY,CAAA;YAChDC,SAASD,OAAOH,cAAc;QAChC,CAAA;AAGF,OAAO,MAAMK,kBAAkBN;IAC7B,OAAOO,MAAMC,IAAqB,EAAmB;QACnD,OAAO,KAAK,CAACD,MAAMC;IACrB;IAEA,OAAOC,UAAkB;QACvB,OAAO,KAAK,CAACA;IACf;IAEA,OAAOC,WAAWC,cAAmC,EAAa;QAChE,IAAIA,eAAeC,OAAO,KAAK,GAAG;YAChC,mFAAmF;YACnFD,iBAAiB;gBACf,GAAGA,cAAc;gBACjBE,QAAQ;oBACN,GAAG,AAACF,eAAuBE,MAAM,CAACC,IAAI;gBACxC;gBACAF,SAAS;YACX;QACF;QACA,MAAMJ,OAAOO,iBAAiBJ,eAAeE,MAAM;QACnDL,KAAKQ,SAAS,CAACL,eAAeM,MAAM;QACpC,OAAOT;IACT;IAEAU,SAASC,MAAqB,EAAEC,MAAoB,EAAe;QACjE,qBAAO,KAACnB;YAAeoB,UAAU,IAAI,CAACC,SAAS;YAAIC,SAAS,IAAI,CAACC,MAAM;;IACzE;IAEAC,aAAkC;QAChC,OAAO,KAAK,CAACA;IACf;AACF;AAEA,OAAO,SAASV,iBAAiBF,MAAkC;IACjE,OAAO,IAAIP,UAAU;QACnBO,QAAQ;YACN,GAAGA,MAAM;YACTa,IAAIb,QAAQa,MAAM,IAAI5B,SAASO,OAAO,GAAGsB,WAAW;QACtD;IACF;AACF;AAEA,OAAO,SAASC,aAAapB,IAAgD;IAC3E,OAAOA,gBAAgBF;AACzB"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { EditorConfig, LexicalEditor, LexicalNode, SerializedLexicalNode, Spread } from 'lexical';
|
|
2
|
+
import { type JSX } from 'react';
|
|
3
|
+
import type { SerializedServerInlineBlockNode } from '../../server/nodes/InlineBlocksNode.js';
|
|
4
|
+
import { ServerInlineBlockNode } from '../../server/nodes/InlineBlocksNode.js';
|
|
5
|
+
export type InlineBlockFields = {
|
|
6
|
+
/** Block form data */
|
|
7
|
+
[key: string]: any;
|
|
8
|
+
blockType: string;
|
|
9
|
+
id: string;
|
|
10
|
+
};
|
|
11
|
+
export type SerializedInlineBlockNode = Spread<{
|
|
12
|
+
children?: never;
|
|
13
|
+
fields: InlineBlockFields;
|
|
14
|
+
type: 'inlineBlock';
|
|
15
|
+
}, SerializedLexicalNode>;
|
|
16
|
+
export declare class InlineBlockNode extends ServerInlineBlockNode {
|
|
17
|
+
static clone(node: ServerInlineBlockNode): ServerInlineBlockNode;
|
|
18
|
+
static getType(): string;
|
|
19
|
+
static importJSON(serializedNode: SerializedInlineBlockNode): InlineBlockNode;
|
|
20
|
+
decorate(editor: LexicalEditor, config: EditorConfig): JSX.Element;
|
|
21
|
+
exportJSON(): SerializedServerInlineBlockNode;
|
|
22
|
+
}
|
|
23
|
+
export declare function $createInlineBlockNode(fields: Exclude<InlineBlockFields, 'id'>): InlineBlockNode;
|
|
24
|
+
export declare function $isInlineBlockNode(node: InlineBlockNode | LexicalNode | null | undefined): node is InlineBlockNode;
|
|
25
|
+
//# sourceMappingURL=InlineBlocksNode.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"InlineBlocksNode.d.ts","sourceRoot":"","sources":["../../../../../src/features/blocks/client/nodes/InlineBlocksNode.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,YAAY,EACZ,aAAa,EACb,WAAW,EACX,qBAAqB,EACrB,MAAM,EACP,MAAM,SAAS,CAAA;AAGhB,OAAc,EAAE,KAAK,GAAG,EAAE,MAAM,OAAO,CAAA;AAEvC,OAAO,KAAK,EAAE,+BAA+B,EAAE,MAAM,wCAAwC,CAAA;AAE7F,OAAO,EAAE,qBAAqB,EAAE,MAAM,wCAAwC,CAAA;AAE9E,MAAM,MAAM,iBAAiB,GAAG;IAC9B,sBAAsB;IACtB,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;IAElB,SAAS,EAAE,MAAM,CAAA;IACjB,EAAE,EAAE,MAAM,CAAA;CACX,CAAA;AAQD,MAAM,MAAM,yBAAyB,GAAG,MAAM,CAC5C;IACE,QAAQ,CAAC,EAAE,KAAK,CAAA;IAChB,MAAM,EAAE,iBAAiB,CAAA;IACzB,IAAI,EAAE,aAAa,CAAA;CACpB,EACD,qBAAqB,CACtB,CAAA;AAED,qBAAa,eAAgB,SAAQ,qBAAqB;IACxD,MAAM,CAAC,KAAK,CAAC,IAAI,EAAE,qBAAqB,GAAG,qBAAqB;IAIhE,MAAM,CAAC,OAAO,IAAI,MAAM;IAIxB,MAAM,CAAC,UAAU,CAAC,cAAc,EAAE,yBAAyB,GAAG,eAAe;IAK7E,QAAQ,CAAC,MAAM,EAAE,aAAa,EAAE,MAAM,EAAE,YAAY,GAAG,GAAG,CAAC,OAAO;IAIlE,UAAU,IAAI,+BAA+B;CAG9C;AAED,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,OAAO,CAAC,iBAAiB,EAAE,IAAI,CAAC,GAAG,eAAe,CAOhG;AAED,wBAAgB,kBAAkB,CAChC,IAAI,EAAE,eAAe,GAAG,WAAW,GAAG,IAAI,GAAG,SAAS,GACrD,IAAI,IAAI,eAAe,CAEzB"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import ObjectID from 'bson-objectid';
|
|
3
|
+
import React from 'react';
|
|
4
|
+
import { ServerInlineBlockNode } from '../../server/nodes/InlineBlocksNode.js';
|
|
5
|
+
const InlineBlockComponent = /*#__PURE__*/ React.lazy(()=>import('../componentInline/index.js').then((module)=>({
|
|
6
|
+
default: module.InlineBlockComponent
|
|
7
|
+
})));
|
|
8
|
+
export class InlineBlockNode extends ServerInlineBlockNode {
|
|
9
|
+
static clone(node) {
|
|
10
|
+
return super.clone(node);
|
|
11
|
+
}
|
|
12
|
+
static getType() {
|
|
13
|
+
return super.getType();
|
|
14
|
+
}
|
|
15
|
+
static importJSON(serializedNode) {
|
|
16
|
+
const node = $createInlineBlockNode(serializedNode.fields);
|
|
17
|
+
return node;
|
|
18
|
+
}
|
|
19
|
+
decorate(editor, config) {
|
|
20
|
+
return /*#__PURE__*/ _jsx(InlineBlockComponent, {
|
|
21
|
+
formData: this.getFields(),
|
|
22
|
+
nodeKey: this.getKey()
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
exportJSON() {
|
|
26
|
+
return super.exportJSON();
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
export function $createInlineBlockNode(fields) {
|
|
30
|
+
return new InlineBlockNode({
|
|
31
|
+
fields: {
|
|
32
|
+
...fields,
|
|
33
|
+
id: fields?.id || new ObjectID.default().toHexString()
|
|
34
|
+
}
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
export function $isInlineBlockNode(node) {
|
|
38
|
+
return node instanceof InlineBlockNode;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
//# sourceMappingURL=InlineBlocksNode.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../src/features/blocks/client/nodes/InlineBlocksNode.tsx"],"sourcesContent":["import type {\n EditorConfig,\n LexicalEditor,\n LexicalNode,\n SerializedLexicalNode,\n Spread,\n} from 'lexical'\n\nimport ObjectID from 'bson-objectid'\nimport React, { type JSX } from 'react'\n\nimport type { SerializedServerInlineBlockNode } from '../../server/nodes/InlineBlocksNode.js'\n\nimport { ServerInlineBlockNode } from '../../server/nodes/InlineBlocksNode.js'\n\nexport type InlineBlockFields = {\n /** Block form data */\n [key: string]: any\n //blockName: string\n blockType: string\n id: string\n}\n\nconst InlineBlockComponent = React.lazy(() =>\n import('../componentInline/index.js').then((module) => ({\n default: module.InlineBlockComponent,\n })),\n)\n\nexport type SerializedInlineBlockNode = Spread<\n {\n children?: never // required so that our typed editor state doesn't automatically add children\n fields: InlineBlockFields\n type: 'inlineBlock'\n },\n SerializedLexicalNode\n>\n\nexport class InlineBlockNode extends ServerInlineBlockNode {\n static clone(node: ServerInlineBlockNode): ServerInlineBlockNode {\n return super.clone(node)\n }\n\n static getType(): string {\n return super.getType()\n }\n\n static importJSON(serializedNode: SerializedInlineBlockNode): InlineBlockNode {\n const node = $createInlineBlockNode(serializedNode.fields)\n return node\n }\n\n decorate(editor: LexicalEditor, config: EditorConfig): JSX.Element {\n return <InlineBlockComponent formData={this.getFields()} nodeKey={this.getKey()} />\n }\n\n exportJSON(): SerializedServerInlineBlockNode {\n return super.exportJSON()\n }\n}\n\nexport function $createInlineBlockNode(fields: Exclude<InlineBlockFields, 'id'>): InlineBlockNode {\n return new InlineBlockNode({\n fields: {\n ...fields,\n id: fields?.id || new ObjectID.default().toHexString(),\n },\n })\n}\n\nexport function $isInlineBlockNode(\n node: InlineBlockNode | LexicalNode | null | undefined,\n): node is InlineBlockNode {\n return node instanceof InlineBlockNode\n}\n"],"names":["ObjectID","React","ServerInlineBlockNode","InlineBlockComponent","lazy","then","module","default","InlineBlockNode","clone","node","getType","importJSON","serializedNode","$createInlineBlockNode","fields","decorate","editor","config","formData","getFields","nodeKey","getKey","exportJSON","id","toHexString","$isInlineBlockNode"],"mappings":";AAQA,OAAOA,cAAc,gBAAe;AACpC,OAAOC,WAAyB,QAAO;AAIvC,SAASC,qBAAqB,QAAQ,yCAAwC;AAU9E,MAAMC,qCAAuBF,MAAMG,IAAI,CAAC,IACtC,MAAM,CAAC,+BAA+BC,IAAI,CAAC,CAACC,SAAY,CAAA;YACtDC,SAASD,OAAOH,oBAAoB;QACtC,CAAA;AAYF,OAAO,MAAMK,wBAAwBN;IACnC,OAAOO,MAAMC,IAA2B,EAAyB;QAC/D,OAAO,KAAK,CAACD,MAAMC;IACrB;IAEA,OAAOC,UAAkB;QACvB,OAAO,KAAK,CAACA;IACf;IAEA,OAAOC,WAAWC,cAAyC,EAAmB;QAC5E,MAAMH,OAAOI,uBAAuBD,eAAeE,MAAM;QACzD,OAAOL;IACT;IAEAM,SAASC,MAAqB,EAAEC,MAAoB,EAAe;QACjE,qBAAO,KAACf;YAAqBgB,UAAU,IAAI,CAACC,SAAS;YAAIC,SAAS,IAAI,CAACC,MAAM;;IAC/E;IAEAC,aAA8C;QAC5C,OAAO,KAAK,CAACA;IACf;AACF;AAEA,OAAO,SAAST,uBAAuBC,MAAwC;IAC7E,OAAO,IAAIP,gBAAgB;QACzBO,QAAQ;YACN,GAAGA,MAAM;YACTS,IAAIT,QAAQS,MAAM,IAAIxB,SAASO,OAAO,GAAGkB,WAAW;QACtD;IACF;AACF;AAEA,OAAO,SAASC,mBACdhB,IAAsD;IAEtD,OAAOA,gBAAgBF;AACzB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"commands.d.ts","sourceRoot":"","sources":["../../../../../src/features/blocks/client/plugin/commands.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAA;AAI7C,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAA;AAEpD,eAAO,MAAM,oBAAoB,EAAE,cAAc,CAAC,kBAAkB,CAC7B,CAAA;AAEvC,eAAO,MAAM,2BAA2B,EAAE,cAAc,CAAC,OAAO,CAAC,kBAAkB,CAAC,CACtC,CAAA;AAE9C,eAAO,MAAM,gCAAgC,EAAE,cAAc,CAAC;IAC5D,MAAM,EAAE,OAAO,CAAC,kBAAkB,CAAC,CAAA;IACnC,OAAO,CAAC,EAAE,MAAM,CAAA;CACjB,CAAqD,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../src/features/blocks/client/plugin/commands.ts"],"sourcesContent":["import type { LexicalCommand } from 'lexical'\n\nimport { createCommand } from 'lexical'\n\nimport type { InsertBlockPayload } from './index.js'\n\nexport const INSERT_BLOCK_COMMAND: LexicalCommand<InsertBlockPayload> =\n createCommand('INSERT_BLOCK_COMMAND')\n\nexport const INSERT_INLINE_BLOCK_COMMAND: LexicalCommand<Partial<InsertBlockPayload>> =\n createCommand('INSERT_INLINE_BLOCK_COMMAND')\n\nexport const OPEN_INLINE_BLOCK_DRAWER_COMMAND: LexicalCommand<{\n fields: Partial<InsertBlockPayload>\n nodeKey?: string\n}> = createCommand('OPEN_INLINE_BLOCK_DRAWER_COMMAND')\n"],"names":["createCommand","INSERT_BLOCK_COMMAND","INSERT_INLINE_BLOCK_COMMAND","OPEN_INLINE_BLOCK_DRAWER_COMMAND"],"mappings":"AAEA,SAASA,aAAa,QAAQ,UAAS;AAIvC,OAAO,MAAMC,uBACXD,cAAc,wBAAuB;AAEvC,OAAO,MAAME,8BACXF,cAAc,+BAA8B;AAE9C,OAAO,MAAMG,mCAGRH,cAAc,oCAAmC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { PluginComponent } from '../../../typesClient.js';
|
|
2
|
+
import type { BlockFields } from '../../server/nodes/BlocksNode.js';
|
|
3
|
+
import type { BlocksFeatureClientProps } from '../index.js';
|
|
4
|
+
export type InsertBlockPayload = Exclude<BlockFields, 'id'>;
|
|
5
|
+
export declare const BlocksPlugin: PluginComponent<BlocksFeatureClientProps>;
|
|
6
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/features/blocks/client/plugin/index.tsx"],"names":[],"mappings":"AA4BA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAA;AAC9D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kCAAkC,CAAA;AACnE,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,aAAa,CAAA;AAa3D,MAAM,MAAM,kBAAkB,GAAG,OAAO,CAAC,WAAW,EAAE,IAAI,CAAC,CAAA;AAE3D,eAAO,MAAM,YAAY,EAAE,eAAe,CAAC,wBAAwB,CAmKlE,CAAA"}
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext.js';
|
|
4
|
+
import { $insertNodeToNearestRoot, $wrapNodeInElement, mergeRegister } from '@lexical/utils';
|
|
5
|
+
import { getTranslation } from '@payloadcms/translations';
|
|
6
|
+
import { formatDrawerSlug, useEditDepth, useFieldProps, useModal, useTranslation } from '@payloadcms/ui';
|
|
7
|
+
import { $createParagraphNode, $getNodeByKey, $getPreviousSelection, $getSelection, $insertNodes, $isParagraphNode, $isRangeSelection, $isRootOrShadowRoot, COMMAND_PRIORITY_EDITOR } from 'lexical';
|
|
8
|
+
import React, { useEffect, useState } from 'react';
|
|
9
|
+
import { useEditorConfigContext } from '../../../../lexical/config/client/EditorConfigProvider.js';
|
|
10
|
+
import { FieldsDrawer } from '../../../../utilities/fieldsDrawer/Drawer.js';
|
|
11
|
+
import { $createBlockNode, BlockNode } from '../nodes/BlocksNode.js';
|
|
12
|
+
import { $createInlineBlockNode } from '../nodes/InlineBlocksNode.js';
|
|
13
|
+
import { INSERT_BLOCK_COMMAND, INSERT_INLINE_BLOCK_COMMAND, OPEN_INLINE_BLOCK_DRAWER_COMMAND } from './commands.js';
|
|
14
|
+
export const BlocksPlugin = ()=>{
|
|
15
|
+
const [editor] = useLexicalComposerContext();
|
|
16
|
+
const { closeModal, toggleModal } = useModal();
|
|
17
|
+
const [blockFields, setBlockFields] = useState(null);
|
|
18
|
+
const [blockType, setBlockType] = useState('');
|
|
19
|
+
const [targetNodeKey, setTargetNodeKey] = useState(null);
|
|
20
|
+
const { i18n, t } = useTranslation();
|
|
21
|
+
const { schemaPath } = useFieldProps();
|
|
22
|
+
const { uuid } = useEditorConfigContext();
|
|
23
|
+
const editDepth = useEditDepth();
|
|
24
|
+
const drawerSlug = formatDrawerSlug({
|
|
25
|
+
slug: `lexical-inlineBlocks-create-` + uuid,
|
|
26
|
+
depth: editDepth
|
|
27
|
+
});
|
|
28
|
+
const { field: { richTextComponentMap } } = useEditorConfigContext();
|
|
29
|
+
useEffect(()=>{
|
|
30
|
+
if (!editor.hasNodes([
|
|
31
|
+
BlockNode
|
|
32
|
+
])) {
|
|
33
|
+
throw new Error('BlocksPlugin: BlocksNode not registered on editor');
|
|
34
|
+
}
|
|
35
|
+
return mergeRegister(editor.registerCommand(INSERT_BLOCK_COMMAND, (payload)=>{
|
|
36
|
+
editor.update(()=>{
|
|
37
|
+
const selection = $getSelection() || $getPreviousSelection();
|
|
38
|
+
if ($isRangeSelection(selection)) {
|
|
39
|
+
const blockNode = $createBlockNode(payload);
|
|
40
|
+
// Insert blocks node BEFORE potentially removing focusNode, as $insertNodeToNearestRoot errors if the focusNode doesn't exist
|
|
41
|
+
$insertNodeToNearestRoot(blockNode);
|
|
42
|
+
const { focus } = selection;
|
|
43
|
+
const focusNode = focus.getNode();
|
|
44
|
+
// First, delete currently selected node if it's an empty paragraph and if there are sufficient
|
|
45
|
+
// paragraph nodes (more than 1) left in the parent node, so that we don't "trap" the user
|
|
46
|
+
if ($isParagraphNode(focusNode) && focusNode.getTextContentSize() === 0 && focusNode.getParent().getChildren().filter((node)=>$isParagraphNode(node)).length > 1) {
|
|
47
|
+
focusNode.remove();
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
});
|
|
51
|
+
return true;
|
|
52
|
+
}, COMMAND_PRIORITY_EDITOR), editor.registerCommand(INSERT_INLINE_BLOCK_COMMAND, (fields)=>{
|
|
53
|
+
if (targetNodeKey) {
|
|
54
|
+
const node = $getNodeByKey(targetNodeKey);
|
|
55
|
+
if (!node) {
|
|
56
|
+
return false;
|
|
57
|
+
}
|
|
58
|
+
node.setFields(fields);
|
|
59
|
+
setTargetNodeKey(null);
|
|
60
|
+
return true;
|
|
61
|
+
}
|
|
62
|
+
const inlineBlockNode = $createInlineBlockNode(fields);
|
|
63
|
+
$insertNodes([
|
|
64
|
+
inlineBlockNode
|
|
65
|
+
]);
|
|
66
|
+
if ($isRootOrShadowRoot(inlineBlockNode.getParentOrThrow())) {
|
|
67
|
+
$wrapNodeInElement(inlineBlockNode, $createParagraphNode).selectEnd();
|
|
68
|
+
}
|
|
69
|
+
return true;
|
|
70
|
+
}, COMMAND_PRIORITY_EDITOR), editor.registerCommand(OPEN_INLINE_BLOCK_DRAWER_COMMAND, ({ fields, nodeKey })=>{
|
|
71
|
+
setBlockFields(fields ?? null);
|
|
72
|
+
setTargetNodeKey(nodeKey ?? null);
|
|
73
|
+
setBlockType(fields?.blockType ?? '');
|
|
74
|
+
if (nodeKey) {
|
|
75
|
+
toggleModal(drawerSlug);
|
|
76
|
+
return true;
|
|
77
|
+
}
|
|
78
|
+
let rangeSelection = null;
|
|
79
|
+
editor.getEditorState().read(()=>{
|
|
80
|
+
const selection = $getSelection();
|
|
81
|
+
if ($isRangeSelection(selection)) {
|
|
82
|
+
rangeSelection = selection;
|
|
83
|
+
}
|
|
84
|
+
});
|
|
85
|
+
if (rangeSelection) {
|
|
86
|
+
//setLastSelection(rangeSelection)
|
|
87
|
+
toggleModal(drawerSlug);
|
|
88
|
+
}
|
|
89
|
+
return true;
|
|
90
|
+
}, COMMAND_PRIORITY_EDITOR));
|
|
91
|
+
}, [
|
|
92
|
+
editor,
|
|
93
|
+
targetNodeKey,
|
|
94
|
+
toggleModal,
|
|
95
|
+
drawerSlug
|
|
96
|
+
]);
|
|
97
|
+
if (!blockFields) {
|
|
98
|
+
return null;
|
|
99
|
+
}
|
|
100
|
+
const schemaFieldsPath = `${schemaPath}.lexical_internal_feature.blocks.lexical_inline_blocks.lexical_inline_blocks.${blockFields?.blockType}`;
|
|
101
|
+
const componentMapRenderedBlockPath = `lexical_internal_feature.blocks.fields.lexical_inline_blocks`;
|
|
102
|
+
const blocksField = richTextComponentMap.has(componentMapRenderedBlockPath) ? richTextComponentMap.get(componentMapRenderedBlockPath)[0] : null;
|
|
103
|
+
const clientBlock = blocksField ? blocksField.blocks.find((block)=>block.slug === blockFields?.blockType) : null;
|
|
104
|
+
if (!blocksField) {
|
|
105
|
+
return null;
|
|
106
|
+
}
|
|
107
|
+
const blockDisplayName = clientBlock?.labels?.singular ? getTranslation(clientBlock?.labels?.singular, i18n) : clientBlock?.slug;
|
|
108
|
+
return /*#__PURE__*/ _jsx(FieldsDrawer, {
|
|
109
|
+
data: blockFields,
|
|
110
|
+
drawerSlug: drawerSlug,
|
|
111
|
+
drawerTitle: t(`lexical:blocks:inlineBlocks:${blockFields?.id ? 'edit' : 'create'}`, {
|
|
112
|
+
label: blockDisplayName ?? t('lexical:blocks:inlineBlocks:label')
|
|
113
|
+
}),
|
|
114
|
+
featureKey: "blocks",
|
|
115
|
+
fieldMapOverride: clientBlock?.fields,
|
|
116
|
+
handleDrawerSubmit: (_fields, data)=>{
|
|
117
|
+
closeModal(drawerSlug);
|
|
118
|
+
if (!data) {
|
|
119
|
+
return;
|
|
120
|
+
}
|
|
121
|
+
data.blockType = blockType;
|
|
122
|
+
editor.dispatchCommand(INSERT_INLINE_BLOCK_COMMAND, data);
|
|
123
|
+
},
|
|
124
|
+
schemaFieldsPathOverride: schemaFieldsPath,
|
|
125
|
+
schemaPathSuffix: blockFields?.blockType
|
|
126
|
+
});
|
|
127
|
+
};
|
|
128
|
+
|
|
129
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../src/features/blocks/client/plugin/index.tsx"],"sourcesContent":["'use client'\n\nimport type { BlockFieldClient } from 'payload'\n\nimport { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext.js'\nimport { $insertNodeToNearestRoot, $wrapNodeInElement, mergeRegister } from '@lexical/utils'\nimport { getTranslation } from '@payloadcms/translations'\nimport {\n formatDrawerSlug,\n useEditDepth,\n useFieldProps,\n useModal,\n useTranslation,\n} from '@payloadcms/ui'\nimport {\n $createParagraphNode,\n $getNodeByKey,\n $getPreviousSelection,\n $getSelection,\n $insertNodes,\n $isParagraphNode,\n $isRangeSelection,\n $isRootOrShadowRoot,\n COMMAND_PRIORITY_EDITOR,\n type RangeSelection,\n} from 'lexical'\nimport React, { useEffect, useState } from 'react'\n\nimport type { PluginComponent } from '../../../typesClient.js'\nimport type { BlockFields } from '../../server/nodes/BlocksNode.js'\nimport type { BlocksFeatureClientProps } from '../index.js'\nimport type { InlineBlockNode } from '../nodes/InlineBlocksNode.js'\n\nimport { useEditorConfigContext } from '../../../../lexical/config/client/EditorConfigProvider.js'\nimport { FieldsDrawer } from '../../../../utilities/fieldsDrawer/Drawer.js'\nimport { $createBlockNode, BlockNode } from '../nodes/BlocksNode.js'\nimport { $createInlineBlockNode } from '../nodes/InlineBlocksNode.js'\nimport {\n INSERT_BLOCK_COMMAND,\n INSERT_INLINE_BLOCK_COMMAND,\n OPEN_INLINE_BLOCK_DRAWER_COMMAND,\n} from './commands.js'\n\nexport type InsertBlockPayload = Exclude<BlockFields, 'id'>\n\nexport const BlocksPlugin: PluginComponent<BlocksFeatureClientProps> = () => {\n const [editor] = useLexicalComposerContext()\n const { closeModal, toggleModal } = useModal()\n const [blockFields, setBlockFields] = useState<BlockFields>(null)\n const [blockType, setBlockType] = useState<string>('' as any)\n const [targetNodeKey, setTargetNodeKey] = useState<null | string>(null)\n const { i18n, t } = useTranslation<string, any>()\n const { schemaPath } = useFieldProps()\n const { uuid } = useEditorConfigContext()\n const editDepth = useEditDepth()\n\n const drawerSlug = formatDrawerSlug({\n slug: `lexical-inlineBlocks-create-` + uuid,\n depth: editDepth,\n })\n\n const {\n field: { richTextComponentMap },\n } = useEditorConfigContext()\n\n useEffect(() => {\n if (!editor.hasNodes([BlockNode])) {\n throw new Error('BlocksPlugin: BlocksNode not registered on editor')\n }\n\n return mergeRegister(\n editor.registerCommand<InsertBlockPayload>(\n INSERT_BLOCK_COMMAND,\n (payload: InsertBlockPayload) => {\n editor.update(() => {\n const selection = $getSelection() || $getPreviousSelection()\n\n if ($isRangeSelection(selection)) {\n const blockNode = $createBlockNode(payload)\n // Insert blocks node BEFORE potentially removing focusNode, as $insertNodeToNearestRoot errors if the focusNode doesn't exist\n $insertNodeToNearestRoot(blockNode)\n\n const { focus } = selection\n const focusNode = focus.getNode()\n\n // First, delete currently selected node if it's an empty paragraph and if there are sufficient\n // paragraph nodes (more than 1) left in the parent node, so that we don't \"trap\" the user\n if (\n $isParagraphNode(focusNode) &&\n focusNode.getTextContentSize() === 0 &&\n focusNode\n .getParent()\n .getChildren()\n .filter((node) => $isParagraphNode(node)).length > 1\n ) {\n focusNode.remove()\n }\n }\n })\n\n return true\n },\n COMMAND_PRIORITY_EDITOR,\n ),\n editor.registerCommand(\n INSERT_INLINE_BLOCK_COMMAND,\n (fields) => {\n if (targetNodeKey) {\n const node: InlineBlockNode = $getNodeByKey(targetNodeKey)\n\n if (!node) {\n return false\n }\n\n node.setFields(fields as BlockFields)\n\n setTargetNodeKey(null)\n return true\n }\n\n const inlineBlockNode = $createInlineBlockNode(fields as BlockFields)\n $insertNodes([inlineBlockNode])\n if ($isRootOrShadowRoot(inlineBlockNode.getParentOrThrow())) {\n $wrapNodeInElement(inlineBlockNode, $createParagraphNode).selectEnd()\n }\n\n return true\n },\n COMMAND_PRIORITY_EDITOR,\n ),\n editor.registerCommand(\n OPEN_INLINE_BLOCK_DRAWER_COMMAND,\n ({ fields, nodeKey }) => {\n setBlockFields((fields as BlockFields) ?? null)\n setTargetNodeKey(nodeKey ?? null)\n setBlockType(fields?.blockType ?? ('' as any))\n\n if (nodeKey) {\n toggleModal(drawerSlug)\n return true\n }\n\n let rangeSelection: RangeSelection | null = null\n\n editor.getEditorState().read(() => {\n const selection = $getSelection()\n if ($isRangeSelection(selection)) {\n rangeSelection = selection\n }\n })\n\n if (rangeSelection) {\n //setLastSelection(rangeSelection)\n toggleModal(drawerSlug)\n }\n return true\n },\n COMMAND_PRIORITY_EDITOR,\n ),\n )\n }, [editor, targetNodeKey, toggleModal, drawerSlug])\n\n if (!blockFields) {\n return null\n }\n\n const schemaFieldsPath = `${schemaPath}.lexical_internal_feature.blocks.lexical_inline_blocks.lexical_inline_blocks.${blockFields?.blockType}`\n\n const componentMapRenderedBlockPath = `lexical_internal_feature.blocks.fields.lexical_inline_blocks`\n const blocksField: BlockFieldClient = richTextComponentMap.has(componentMapRenderedBlockPath)\n ? richTextComponentMap.get(componentMapRenderedBlockPath)[0]\n : null\n\n const clientBlock = blocksField\n ? blocksField.blocks.find((block) => block.slug === blockFields?.blockType)\n : null\n\n if (!blocksField) {\n return null\n }\n\n const blockDisplayName = clientBlock?.labels?.singular\n ? getTranslation(clientBlock?.labels?.singular, i18n)\n : clientBlock?.slug\n\n return (\n <FieldsDrawer\n data={blockFields}\n drawerSlug={drawerSlug}\n drawerTitle={t(`lexical:blocks:inlineBlocks:${blockFields?.id ? 'edit' : 'create'}`, {\n label: blockDisplayName ?? t('lexical:blocks:inlineBlocks:label'),\n })}\n featureKey=\"blocks\"\n fieldMapOverride={clientBlock?.fields}\n handleDrawerSubmit={(_fields, data) => {\n closeModal(drawerSlug)\n if (!data) {\n return\n }\n\n data.blockType = blockType\n\n editor.dispatchCommand(INSERT_INLINE_BLOCK_COMMAND, data)\n }}\n schemaFieldsPathOverride={schemaFieldsPath}\n schemaPathSuffix={blockFields?.blockType}\n />\n )\n}\n"],"names":["useLexicalComposerContext","$insertNodeToNearestRoot","$wrapNodeInElement","mergeRegister","getTranslation","formatDrawerSlug","useEditDepth","useFieldProps","useModal","useTranslation","$createParagraphNode","$getNodeByKey","$getPreviousSelection","$getSelection","$insertNodes","$isParagraphNode","$isRangeSelection","$isRootOrShadowRoot","COMMAND_PRIORITY_EDITOR","React","useEffect","useState","useEditorConfigContext","FieldsDrawer","$createBlockNode","BlockNode","$createInlineBlockNode","INSERT_BLOCK_COMMAND","INSERT_INLINE_BLOCK_COMMAND","OPEN_INLINE_BLOCK_DRAWER_COMMAND","BlocksPlugin","editor","closeModal","toggleModal","blockFields","setBlockFields","blockType","setBlockType","targetNodeKey","setTargetNodeKey","i18n","t","schemaPath","uuid","editDepth","drawerSlug","slug","depth","field","richTextComponentMap","hasNodes","Error","registerCommand","payload","update","selection","blockNode","focus","focusNode","getNode","getTextContentSize","getParent","getChildren","filter","node","length","remove","fields","setFields","inlineBlockNode","getParentOrThrow","selectEnd","nodeKey","rangeSelection","getEditorState","read","schemaFieldsPath","componentMapRenderedBlockPath","blocksField","has","get","clientBlock","blocks","find","block","blockDisplayName","labels","singular","data","drawerTitle","id","label","featureKey","fieldMapOverride","handleDrawerSubmit","_fields","dispatchCommand","schemaFieldsPathOverride","schemaPathSuffix"],"mappings":"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"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { Block } from 'payload';
|
|
2
|
+
import type { PopulationPromise } from '../../typesServer.js';
|
|
3
|
+
import type { SerializedInlineBlockNode } from '../client/nodes/InlineBlocksNode.js';
|
|
4
|
+
import type { SerializedBlockNode } from './nodes/BlocksNode.js';
|
|
5
|
+
export declare const blockPopulationPromiseHOC: (blocks: Block[]) => PopulationPromise<SerializedBlockNode | SerializedInlineBlockNode>;
|
|
6
|
+
//# sourceMappingURL=graphQLPopulationPromise.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"graphQLPopulationPromise.d.ts","sourceRoot":"","sources":["../../../../src/features/blocks/server/graphQLPopulationPromise.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,SAAS,CAAA;AAEpC,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAA;AAC7D,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,qCAAqC,CAAA;AACpF,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAA;AAIhE,eAAO,MAAM,yBAAyB,WAC5B,KAAK,EAAE,KACd,iBAAiB,CAAC,mBAAmB,GAAG,yBAAyB,CA4CnE,CAAA"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { recursivelyPopulateFieldsForGraphQL } from '../../../populateGraphQL/recursivelyPopulateFieldsForGraphQL.js';
|
|
2
|
+
export const blockPopulationPromiseHOC = (blocks)=>{
|
|
3
|
+
const blockPopulationPromise = ({ context, currentDepth, depth, draft, editorPopulationPromises, fieldPromises, findMany, flattenLocales, node, overrideAccess, populationPromises, req, showHiddenFields })=>{
|
|
4
|
+
const blockFieldData = node.fields;
|
|
5
|
+
// find block used in this node
|
|
6
|
+
const block = blocks.find((block)=>block.slug === blockFieldData.blockType);
|
|
7
|
+
if (!block || !block?.fields?.length || !blockFieldData) {
|
|
8
|
+
return;
|
|
9
|
+
}
|
|
10
|
+
recursivelyPopulateFieldsForGraphQL({
|
|
11
|
+
context,
|
|
12
|
+
currentDepth,
|
|
13
|
+
data: blockFieldData,
|
|
14
|
+
depth,
|
|
15
|
+
draft,
|
|
16
|
+
editorPopulationPromises,
|
|
17
|
+
fieldPromises,
|
|
18
|
+
fields: block.fields,
|
|
19
|
+
findMany,
|
|
20
|
+
flattenLocales,
|
|
21
|
+
overrideAccess,
|
|
22
|
+
populationPromises,
|
|
23
|
+
req,
|
|
24
|
+
showHiddenFields,
|
|
25
|
+
siblingDoc: blockFieldData
|
|
26
|
+
});
|
|
27
|
+
};
|
|
28
|
+
return blockPopulationPromise;
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
//# sourceMappingURL=graphQLPopulationPromise.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/features/blocks/server/graphQLPopulationPromise.ts"],"sourcesContent":["import type { Block } from 'payload'\n\nimport type { PopulationPromise } from '../../typesServer.js'\nimport type { SerializedInlineBlockNode } from '../client/nodes/InlineBlocksNode.js'\nimport type { SerializedBlockNode } from './nodes/BlocksNode.js'\n\nimport { recursivelyPopulateFieldsForGraphQL } from '../../../populateGraphQL/recursivelyPopulateFieldsForGraphQL.js'\n\nexport const blockPopulationPromiseHOC = (\n blocks: Block[],\n): PopulationPromise<SerializedBlockNode | SerializedInlineBlockNode> => {\n const blockPopulationPromise: PopulationPromise<SerializedBlockNode> = ({\n context,\n currentDepth,\n depth,\n draft,\n editorPopulationPromises,\n fieldPromises,\n findMany,\n flattenLocales,\n node,\n overrideAccess,\n populationPromises,\n req,\n showHiddenFields,\n }) => {\n const blockFieldData = node.fields\n\n // find block used in this node\n const block = blocks.find((block) => block.slug === blockFieldData.blockType)\n if (!block || !block?.fields?.length || !blockFieldData) {\n return\n }\n\n recursivelyPopulateFieldsForGraphQL({\n context,\n currentDepth,\n data: blockFieldData,\n depth,\n draft,\n editorPopulationPromises,\n fieldPromises,\n fields: block.fields,\n findMany,\n flattenLocales,\n overrideAccess,\n populationPromises,\n req,\n showHiddenFields,\n siblingDoc: blockFieldData,\n })\n }\n\n return blockPopulationPromise\n}\n"],"names":["recursivelyPopulateFieldsForGraphQL","blockPopulationPromiseHOC","blocks","blockPopulationPromise","context","currentDepth","depth","draft","editorPopulationPromises","fieldPromises","findMany","flattenLocales","node","overrideAccess","populationPromises","req","showHiddenFields","blockFieldData","fields","block","find","slug","blockType","length","data","siblingDoc"],"mappings":"AAMA,SAASA,mCAAmC,QAAQ,kEAAiE;AAErH,OAAO,MAAMC,4BAA4B,CACvCC;IAEA,MAAMC,yBAAiE,CAAC,EACtEC,OAAO,EACPC,YAAY,EACZC,KAAK,EACLC,KAAK,EACLC,wBAAwB,EACxBC,aAAa,EACbC,QAAQ,EACRC,cAAc,EACdC,IAAI,EACJC,cAAc,EACdC,kBAAkB,EAClBC,GAAG,EACHC,gBAAgB,EACjB;QACC,MAAMC,iBAAiBL,KAAKM,MAAM;QAElC,+BAA+B;QAC/B,MAAMC,QAAQjB,OAAOkB,IAAI,CAAC,CAACD,QAAUA,MAAME,IAAI,KAAKJ,eAAeK,SAAS;QAC5E,IAAI,CAACH,SAAS,CAACA,OAAOD,QAAQK,UAAU,CAACN,gBAAgB;YACvD;QACF;QAEAjB,oCAAoC;YAClCI;YACAC;YACAmB,MAAMP;YACNX;YACAC;YACAC;YACAC;YACAS,QAAQC,MAAMD,MAAM;YACpBR;YACAC;YACAE;YACAC;YACAC;YACAC;YACAS,YAAYR;QACd;IACF;IAEA,OAAOd;AACT,EAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"i18n.d.ts","sourceRoot":"","sources":["../../../../src/features/blocks/server/i18n.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAA;AAEhE,eAAO,MAAM,IAAI,EAAE,OAAO,CAAC,gBAAgB,CAiS1C,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/features/blocks/server/i18n.ts"],"sourcesContent":["import type { GenericLanguages } from '@payloadcms/translations'\n\nexport const i18n: Partial<GenericLanguages> = {\n ar: {\n inlineBlocks: {\n create: 'أنشئ {{label}}',\n edit: 'تحرير {{التسمية}}',\n label: 'الكتل الداخلية',\n remove: 'إزالة {{التسمية}}',\n },\n label: 'كتل',\n },\n az: {\n inlineBlocks: {\n create: 'Yarat {{label}}',\n edit: '{{label}} redaktə et',\n label: 'Sıralı Bloklar',\n remove: '{{label}} silin',\n },\n label: 'Bloklar',\n },\n bg: {\n inlineBlocks: {\n create: 'Създайте {{етикет}}',\n edit: 'Редактирай {{етикет}}',\n label: 'Вградени блокове',\n remove: 'Премахнете {{етикет}}',\n },\n label: 'Блокове',\n },\n cs: {\n inlineBlocks: {\n create: 'Vytvořte {{štítek}}',\n edit: 'Upravit {{label}}',\n label: 'Inline bloky',\n remove: 'Odstraňte {{label}}',\n },\n label: 'Bloky',\n },\n de: {\n inlineBlocks: {\n create: 'Erstelle {{label}}',\n edit: 'Bearbeite {{label}}',\n label: 'Inline-Blöcke',\n remove: 'Entferne {{label}}',\n },\n label: 'Blöcke',\n },\n en: {\n inlineBlocks: {\n create: 'Create {{label}}',\n edit: 'Edit {{label}}',\n label: 'Inline Blocks',\n remove: 'Remove {{label}}',\n },\n label: 'Blocks',\n },\n es: {\n inlineBlocks: {\n create: 'Crear {{etiqueta}}',\n edit: 'Editar {{etiqueta}}',\n label: 'Bloques en línea',\n remove: 'Eliminar {{label}}',\n },\n label: 'Bloques',\n },\n fa: {\n inlineBlocks: {\n create: 'ایجاد {{برچسب}}',\n edit: 'ویرایش {{برچسب}}',\n label: 'بلوکهای درون خطی',\n remove: 'حذف {{برچسب}}',\n },\n label: 'بلوک ها',\n },\n fr: {\n inlineBlocks: {\n create: 'Créer {{label}}',\n edit: 'Modifier {{label}}',\n label: 'Blocs en ligne',\n remove: 'Supprimer {{label}}',\n },\n label: 'Blocs',\n },\n he: {\n inlineBlocks: {\n create: 'צור {{תווית}}',\n edit: 'ערוך {{תווית}}',\n label: 'בלוקים משורשרים',\n remove: 'הסר {{תווית}}',\n },\n label: 'חסימות',\n },\n hr: {\n inlineBlocks: {\n create: 'Stvori {{oznaka}}',\n edit: 'Uredi {{label}}',\n label: 'Unutrašnji blokovi',\n remove: 'Ukloni {{oznaka}}',\n },\n label: 'Blokovi',\n },\n hu: {\n inlineBlocks: {\n create: 'Hozzon létre {{címke}}',\n edit: 'Szerkesztés {{címke}}',\n label: 'Beágyazott blokkok',\n remove: 'Távolítsa el a {{label}}',\n },\n label: 'Blokkok',\n },\n it: {\n inlineBlocks: {\n create: 'Crea {{etichetta}}',\n edit: 'Modifica {{label}}',\n label: 'Blocchi in linea',\n remove: 'Rimuovi {{label}}',\n },\n label: 'Blocchi',\n },\n ja: {\n inlineBlocks: {\n create: '{{label}}を作成する',\n edit: '{{label}}を編集する',\n label: 'インラインブロック',\n remove: '{{ラベル}}を削除します',\n },\n label: 'ブロック',\n },\n ko: {\n inlineBlocks: {\n create: '{{label}} 생성하기',\n edit: '{{label}} 수정하기',\n label: '인라인 블록',\n remove: '{{label}} 제거하세요',\n },\n label: '블록',\n },\n my: {\n inlineBlocks: {\n create: 'Cipta {{label}}',\n edit: 'Sunting {{label}}',\n label: 'Inline Blocks [SKIPPED]',\n remove: 'Buang {{label}}',\n },\n label: 'တံတားများ',\n },\n nb: {\n inlineBlocks: {\n create: 'Opprett {{label}}',\n edit: 'Rediger {{label}}',\n label: 'In-line blokker',\n remove: 'Fjern {{label}}',\n },\n label: 'Blokker',\n },\n nl: {\n inlineBlocks: {\n create: 'Maak {{label}}',\n edit: 'Bewerk {{label}}',\n label: 'Inline Blocks',\n remove: 'Verwijder {{label}}',\n },\n label: 'Blokken',\n },\n pl: {\n inlineBlocks: {\n create: 'Utwórz {{label}}',\n edit: 'Edytuj {{etykieta}}',\n label: 'Blokowanie w linii',\n remove: 'Usuń {{etykieta}}',\n },\n label: 'Bloki',\n },\n pt: {\n inlineBlocks: {\n create: 'Crie {{label}}',\n edit: 'Editar {{label}}',\n label: 'Blocos em linha',\n remove: 'Remova {{label}}',\n },\n label: 'Blocos',\n },\n ro: {\n inlineBlocks: {\n create: 'Creează {{eticheta}}',\n edit: 'Editați {{eticheta}}',\n label: 'Blocuri in linie',\n remove: 'Ștergeți {{etichetă}}',\n },\n label: 'Blocuri',\n },\n rs: {\n inlineBlocks: {\n create: 'Kreiraj {{label}}',\n edit: 'Izmeni {{label}}',\n label: 'Umetnuti blokovi',\n remove: 'Ukloni {{label}}',\n },\n label: 'Blokovi',\n },\n 'rs-latin': {\n inlineBlocks: {\n create: 'Kreiraj {{label}}',\n edit: 'Izmeni {{label}}',\n label: 'Unutar blokovi',\n remove: 'Ukloni {{oznaka}}',\n },\n label: 'Blokovi',\n },\n ru: {\n inlineBlocks: {\n create: 'Создать {{label}}',\n edit: 'Изменить {{метка}}',\n label: 'Встроенные блоки',\n remove: 'Удалить {{метка}}',\n },\n label: 'Блоки',\n },\n sk: {\n inlineBlocks: {\n create: 'Vytvorte {{označenie}}',\n edit: 'Upraviť {{label}}',\n label: 'Inline bloky',\n remove: 'Odstráňte {{label}}',\n },\n label: 'Bloky',\n },\n sv: {\n inlineBlocks: {\n create: 'Skapa {{label}}',\n edit: 'Redigera {{etikett}}',\n label: 'Inline-blockar',\n remove: 'Ta bort {{etikett}}',\n },\n label: 'Block',\n },\n th: {\n inlineBlocks: {\n create: 'สร้าง {{label}}',\n edit: 'แก้ไข {{label}}',\n label: 'บล็อกแบบอินไลน์',\n remove: 'ลบ {{label}}',\n },\n label: 'บล็อค',\n },\n tr: {\n inlineBlocks: {\n create: '{{Etiketi}} oluşturun',\n edit: \"{{Etiket}}'i düzenleyin\",\n label: 'Satır İçi Bloklar',\n remove: '{{Etiketi}} kaldırın',\n },\n label: 'Bloklar',\n },\n uk: {\n inlineBlocks: {\n create: 'Створити {{label}}',\n edit: 'Редагувати {{label}}',\n label: 'Вбудовані блоки',\n remove: 'Видалити {{мітку}}',\n },\n label: 'Блоки',\n },\n vi: {\n inlineBlocks: {\n create: 'Tạo {{label}}',\n edit: 'Chỉnh sửa {{nhãn}}',\n label: 'Khối nội tuyến',\n remove: 'Xóa {{nhãn}}',\n },\n label: 'Khối',\n },\n zh: {\n inlineBlocks: {\n create: '创建{{label}}',\n edit: '编辑 {{label}}',\n label: '内联块',\n remove: '删除{{label}}',\n },\n label: '块',\n },\n 'zh-TW': {\n inlineBlocks: {\n create: '創建 {{label}}',\n edit: '編輯 {{label}}',\n label: '內聯區塊',\n remove: '移除 {{label}}',\n },\n label: '區塊',\n },\n}\n"],"names":["i18n","ar","inlineBlocks","create","edit","label","remove","az","bg","cs","de","en","es","fa","fr","he","hr","hu","it","ja","ko","my","nb","nl","pl","pt","ro","rs","ru","sk","sv","th","tr","uk","vi","zh"],"mappings":"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"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { Block } from 'payload';
|
|
2
|
+
import type { BlocksFeatureClientProps } from '../client/index.js';
|
|
3
|
+
export type BlocksFeatureProps = {
|
|
4
|
+
blocks?: Block[];
|
|
5
|
+
inlineBlocks?: Block[];
|
|
6
|
+
};
|
|
7
|
+
export declare const BlocksFeature: import("../../typesServer.js").FeatureProviderProviderServer<BlocksFeatureProps, BlocksFeatureProps, BlocksFeatureClientProps>;
|
|
8
|
+
//# sourceMappingURL=index.d.ts.map
|