@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
|
@@ -1,184 +0,0 @@
|
|
|
1
|
-
import { sanitizeFields } from 'payload';
|
|
2
|
-
// eslint-disable-next-line payload/no-imports-from-exports-dir
|
|
3
|
-
import { UploadFeatureClient } from '../../exports/client/index.js';
|
|
4
|
-
import { populate } from '../../populateGraphQL/populate.js';
|
|
5
|
-
import { createServerFeature } from '../../utilities/createServerFeature.js';
|
|
6
|
-
import { createNode } from '../typeUtilities.js';
|
|
7
|
-
import { uploadPopulationPromiseHOC } from './graphQLPopulationPromise.js';
|
|
8
|
-
import { i18n } from './i18n.js';
|
|
9
|
-
import { UploadNode } from './nodes/UploadNode.js';
|
|
10
|
-
import { uploadValidation } from './validate.js';
|
|
11
|
-
/**
|
|
12
|
-
* Get the absolute URL for an upload URL by potentially prepending the serverURL
|
|
13
|
-
*/ function getAbsoluteURL(url, payload) {
|
|
14
|
-
return url?.startsWith('http') ? url : (payload?.config?.serverURL || '') + url;
|
|
15
|
-
}
|
|
16
|
-
export const UploadFeature = createServerFeature({
|
|
17
|
-
feature: async ({ config: _config, isRoot, props })=>{
|
|
18
|
-
if (!props) {
|
|
19
|
-
props = {
|
|
20
|
-
collections: {}
|
|
21
|
-
};
|
|
22
|
-
}
|
|
23
|
-
const clientProps = {
|
|
24
|
-
collections: {}
|
|
25
|
-
};
|
|
26
|
-
if (props.collections) {
|
|
27
|
-
for(const collection in props.collections){
|
|
28
|
-
clientProps.collections[collection] = {
|
|
29
|
-
hasExtraFields: props.collections[collection].fields.length >= 1
|
|
30
|
-
};
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
const validRelationships = _config.collections.map((c)=>c.slug) || [];
|
|
34
|
-
for(const collection in props.collections){
|
|
35
|
-
if (props.collections[collection].fields?.length) {
|
|
36
|
-
props.collections[collection].fields = await sanitizeFields({
|
|
37
|
-
config: _config,
|
|
38
|
-
fields: props.collections[collection].fields,
|
|
39
|
-
requireFieldLevelRichTextEditor: isRoot,
|
|
40
|
-
validRelationships
|
|
41
|
-
});
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
return {
|
|
45
|
-
ClientFeature: UploadFeatureClient,
|
|
46
|
-
clientFeatureProps: clientProps,
|
|
47
|
-
generateSchemaMap: ({ props })=>{
|
|
48
|
-
if (!props?.collections) return null;
|
|
49
|
-
const schemaMap = new Map();
|
|
50
|
-
for(const collection in props.collections){
|
|
51
|
-
if (props.collections[collection].fields?.length) {
|
|
52
|
-
schemaMap.set(collection, props.collections[collection].fields);
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
return schemaMap;
|
|
56
|
-
},
|
|
57
|
-
i18n,
|
|
58
|
-
nodes: [
|
|
59
|
-
createNode({
|
|
60
|
-
converters: {
|
|
61
|
-
html: {
|
|
62
|
-
converter: async ({ draft, node, overrideAccess, req, showHiddenFields })=>{
|
|
63
|
-
// @ts-expect-error
|
|
64
|
-
const id = node?.value?.id || node?.value // for backwards-compatibility
|
|
65
|
-
;
|
|
66
|
-
if (req?.payload) {
|
|
67
|
-
const uploadDocument = {};
|
|
68
|
-
try {
|
|
69
|
-
await populate({
|
|
70
|
-
id,
|
|
71
|
-
collectionSlug: node.relationTo,
|
|
72
|
-
currentDepth: 0,
|
|
73
|
-
data: uploadDocument,
|
|
74
|
-
depth: 1,
|
|
75
|
-
draft,
|
|
76
|
-
key: 'value',
|
|
77
|
-
overrideAccess,
|
|
78
|
-
req,
|
|
79
|
-
showHiddenFields
|
|
80
|
-
});
|
|
81
|
-
} catch (ignored) {
|
|
82
|
-
// eslint-disable-next-line no-console
|
|
83
|
-
console.error('Lexical upload node HTML converter: error fetching upload file', ignored, 'Node:', node);
|
|
84
|
-
return `<img />`;
|
|
85
|
-
}
|
|
86
|
-
const url = getAbsoluteURL(uploadDocument?.value?.url, req?.payload);
|
|
87
|
-
/**
|
|
88
|
-
* If the upload is not an image, return a link to the upload
|
|
89
|
-
*/ if (!uploadDocument?.value?.mimeType?.startsWith('image')) {
|
|
90
|
-
return `<a href="${url}" rel="noopener noreferrer">${uploadDocument.value?.filename}</a>`;
|
|
91
|
-
}
|
|
92
|
-
/**
|
|
93
|
-
* If the upload is a simple image with no different sizes, return a simple img tag
|
|
94
|
-
*/ if (!uploadDocument?.value?.sizes || !Object.keys(uploadDocument?.value?.sizes).length) {
|
|
95
|
-
return `<img src="${url}" alt="${uploadDocument?.value?.filename}" width="${uploadDocument?.value?.width}" height="${uploadDocument?.value?.height}"/>`;
|
|
96
|
-
}
|
|
97
|
-
/**
|
|
98
|
-
* If the upload is an image with different sizes, return a picture element
|
|
99
|
-
*/ let pictureHTML = '<picture>';
|
|
100
|
-
// Iterate through each size in the data.sizes object
|
|
101
|
-
for(const size in uploadDocument.value?.sizes){
|
|
102
|
-
const imageSize = uploadDocument.value?.sizes[size];
|
|
103
|
-
// Skip if any property of the size object is null
|
|
104
|
-
if (!imageSize.width || !imageSize.height || !imageSize.mimeType || !imageSize.filesize || !imageSize.filename || !imageSize.url) {
|
|
105
|
-
continue;
|
|
106
|
-
}
|
|
107
|
-
const imageSizeURL = getAbsoluteURL(imageSize?.url, req?.payload);
|
|
108
|
-
pictureHTML += `<source srcset="${imageSizeURL}" media="(max-width: ${imageSize.width}px)" type="${imageSize.mimeType}">`;
|
|
109
|
-
}
|
|
110
|
-
// Add the default img tag
|
|
111
|
-
pictureHTML += `<img src="${url}" alt="Image" width="${uploadDocument.value?.width}" height="${uploadDocument.value?.height}">`;
|
|
112
|
-
pictureHTML += '</picture>';
|
|
113
|
-
return pictureHTML;
|
|
114
|
-
} else {
|
|
115
|
-
return `<img src="${id}" />`;
|
|
116
|
-
}
|
|
117
|
-
},
|
|
118
|
-
nodeTypes: [
|
|
119
|
-
UploadNode.getType()
|
|
120
|
-
]
|
|
121
|
-
}
|
|
122
|
-
},
|
|
123
|
-
getSubFields: ({ node, req })=>{
|
|
124
|
-
const collection = req.payload.collections[node?.relationTo];
|
|
125
|
-
if (collection) {
|
|
126
|
-
const collectionFieldSchema = props?.collections?.[node?.relationTo]?.fields;
|
|
127
|
-
if (Array.isArray(collectionFieldSchema)) {
|
|
128
|
-
if (!collectionFieldSchema?.length) {
|
|
129
|
-
return null;
|
|
130
|
-
}
|
|
131
|
-
return collectionFieldSchema;
|
|
132
|
-
}
|
|
133
|
-
}
|
|
134
|
-
return null;
|
|
135
|
-
},
|
|
136
|
-
getSubFieldsData: ({ node })=>{
|
|
137
|
-
return node?.fields;
|
|
138
|
-
},
|
|
139
|
-
graphQLPopulationPromises: [
|
|
140
|
-
uploadPopulationPromiseHOC(props)
|
|
141
|
-
],
|
|
142
|
-
hooks: {
|
|
143
|
-
afterRead: [
|
|
144
|
-
({ currentDepth, depth, draft, node, overrideAccess, populationPromises, req, showHiddenFields })=>{
|
|
145
|
-
if (!node?.value) {
|
|
146
|
-
return node;
|
|
147
|
-
}
|
|
148
|
-
const collection = req.payload.collections[node?.relationTo];
|
|
149
|
-
if (!collection) {
|
|
150
|
-
return node;
|
|
151
|
-
}
|
|
152
|
-
// @ts-expect-error
|
|
153
|
-
const id = node?.value?.id || node?.value // for backwards-compatibility
|
|
154
|
-
;
|
|
155
|
-
const populateDepth = props?.maxDepth !== undefined && props?.maxDepth < depth ? props?.maxDepth : depth;
|
|
156
|
-
populationPromises.push(populate({
|
|
157
|
-
id,
|
|
158
|
-
collectionSlug: collection.config.slug,
|
|
159
|
-
currentDepth,
|
|
160
|
-
data: node,
|
|
161
|
-
depth: populateDepth,
|
|
162
|
-
draft,
|
|
163
|
-
key: 'value',
|
|
164
|
-
overrideAccess,
|
|
165
|
-
req,
|
|
166
|
-
showHiddenFields
|
|
167
|
-
}));
|
|
168
|
-
return node;
|
|
169
|
-
}
|
|
170
|
-
]
|
|
171
|
-
},
|
|
172
|
-
node: UploadNode,
|
|
173
|
-
validations: [
|
|
174
|
-
uploadValidation(props)
|
|
175
|
-
]
|
|
176
|
-
})
|
|
177
|
-
],
|
|
178
|
-
sanitizedServerFeatureProps: props
|
|
179
|
-
};
|
|
180
|
-
},
|
|
181
|
-
key: 'upload'
|
|
182
|
-
});
|
|
183
|
-
|
|
184
|
-
//# sourceMappingURL=feature.server.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/features/upload/feature.server.ts"],"sourcesContent":["import type {\n CollectionSlug,\n Config,\n Field,\n FileData,\n FileSize,\n Payload,\n TypeWithID,\n} from 'payload'\n\nimport { sanitizeFields } from 'payload'\n\nimport type { UploadFeaturePropsClient } from './feature.client.js'\n\n// eslint-disable-next-line payload/no-imports-from-exports-dir\nimport { UploadFeatureClient } from '../../exports/client/index.js'\nimport { populate } from '../../populateGraphQL/populate.js'\nimport { createServerFeature } from '../../utilities/createServerFeature.js'\nimport { createNode } from '../typeUtilities.js'\nimport { uploadPopulationPromiseHOC } from './graphQLPopulationPromise.js'\nimport { i18n } from './i18n.js'\nimport { UploadNode } from './nodes/UploadNode.js'\nimport { uploadValidation } from './validate.js'\n\nexport type UploadFeatureProps = {\n collections?: {\n [collection: CollectionSlug]: {\n fields: Field[]\n }\n }\n /**\n * Sets a maximum population depth for this upload (not the fields for this upload), regardless of the remaining depth when the respective field is reached.\n * This behaves exactly like the maxDepth properties of relationship and upload fields.\n *\n * {@link https://payloadcms.com/docs/getting-started/concepts#field-level-max-depth}\n */\n maxDepth?: number\n}\n\n/**\n * Get the absolute URL for an upload URL by potentially prepending the serverURL\n */\nfunction getAbsoluteURL(url: string, payload: Payload): string {\n return url?.startsWith('http') ? url : (payload?.config?.serverURL || '') + url\n}\n\nexport const UploadFeature = createServerFeature<\n UploadFeatureProps,\n UploadFeatureProps,\n UploadFeaturePropsClient\n>({\n feature: async ({ config: _config, isRoot, props }) => {\n if (!props) {\n props = { collections: {} }\n }\n\n const clientProps: UploadFeaturePropsClient = {\n collections: {},\n }\n if (props.collections) {\n for (const collection in props.collections) {\n clientProps.collections[collection] = {\n hasExtraFields: props.collections[collection].fields.length >= 1,\n }\n }\n }\n\n const validRelationships = _config.collections.map((c) => c.slug) || []\n\n for (const collection in props.collections) {\n if (props.collections[collection].fields?.length) {\n props.collections[collection].fields = await sanitizeFields({\n config: _config as unknown as Config,\n fields: props.collections[collection].fields,\n requireFieldLevelRichTextEditor: isRoot,\n validRelationships,\n })\n }\n }\n\n return {\n ClientFeature: UploadFeatureClient,\n clientFeatureProps: clientProps,\n generateSchemaMap: ({ props }) => {\n if (!props?.collections) return null\n\n const schemaMap = new Map<string, Field[]>()\n\n for (const collection in props.collections) {\n if (props.collections[collection].fields?.length) {\n schemaMap.set(collection, props.collections[collection].fields)\n }\n }\n\n return schemaMap\n },\n i18n,\n nodes: [\n createNode({\n converters: {\n html: {\n converter: async ({ draft, node, overrideAccess, req, showHiddenFields }) => {\n // @ts-expect-error\n const id = node?.value?.id || node?.value // for backwards-compatibility\n\n if (req?.payload) {\n const uploadDocument: {\n value?: FileData & TypeWithID\n } = {}\n\n try {\n await populate({\n id,\n collectionSlug: node.relationTo,\n currentDepth: 0,\n data: uploadDocument,\n depth: 1,\n draft,\n key: 'value',\n overrideAccess,\n req,\n showHiddenFields,\n })\n } catch (ignored) {\n // eslint-disable-next-line no-console\n console.error(\n 'Lexical upload node HTML converter: error fetching upload file',\n ignored,\n 'Node:',\n node,\n )\n return `<img />`\n }\n\n const url = getAbsoluteURL(uploadDocument?.value?.url, req?.payload)\n\n /**\n * If the upload is not an image, return a link to the upload\n */\n if (!uploadDocument?.value?.mimeType?.startsWith('image')) {\n return `<a href=\"${url}\" rel=\"noopener noreferrer\">${uploadDocument.value?.filename}</a>`\n }\n\n /**\n * If the upload is a simple image with no different sizes, return a simple img tag\n */\n if (\n !uploadDocument?.value?.sizes ||\n !Object.keys(uploadDocument?.value?.sizes).length\n ) {\n return `<img src=\"${url}\" alt=\"${uploadDocument?.value?.filename}\" width=\"${uploadDocument?.value?.width}\" height=\"${uploadDocument?.value?.height}\"/>`\n }\n\n /**\n * If the upload is an image with different sizes, return a picture element\n */\n let pictureHTML = '<picture>'\n\n // Iterate through each size in the data.sizes object\n for (const size in uploadDocument.value?.sizes) {\n const imageSize: {\n url?: string\n } & FileSize = uploadDocument.value?.sizes[size]\n\n // Skip if any property of the size object is null\n if (\n !imageSize.width ||\n !imageSize.height ||\n !imageSize.mimeType ||\n !imageSize.filesize ||\n !imageSize.filename ||\n !imageSize.url\n ) {\n continue\n }\n const imageSizeURL = getAbsoluteURL(imageSize?.url, req?.payload)\n\n pictureHTML += `<source srcset=\"${imageSizeURL}\" media=\"(max-width: ${imageSize.width}px)\" type=\"${imageSize.mimeType}\">`\n }\n\n // Add the default img tag\n pictureHTML += `<img src=\"${url}\" alt=\"Image\" width=\"${uploadDocument.value?.width}\" height=\"${uploadDocument.value?.height}\">`\n pictureHTML += '</picture>'\n return pictureHTML\n } else {\n return `<img src=\"${id}\" />`\n }\n },\n nodeTypes: [UploadNode.getType()],\n },\n },\n getSubFields: ({ node, req }) => {\n const collection = req.payload.collections[node?.relationTo]\n\n if (collection) {\n const collectionFieldSchema = props?.collections?.[node?.relationTo]?.fields\n\n if (Array.isArray(collectionFieldSchema)) {\n if (!collectionFieldSchema?.length) {\n return null\n }\n return collectionFieldSchema\n }\n }\n return null\n },\n getSubFieldsData: ({ node }) => {\n return node?.fields\n },\n graphQLPopulationPromises: [uploadPopulationPromiseHOC(props)],\n hooks: {\n afterRead: [\n ({\n currentDepth,\n depth,\n draft,\n node,\n overrideAccess,\n populationPromises,\n req,\n showHiddenFields,\n }) => {\n if (!node?.value) {\n return node\n }\n const collection = req.payload.collections[node?.relationTo]\n\n if (!collection) {\n return node\n }\n // @ts-expect-error\n const id = node?.value?.id || node?.value // for backwards-compatibility\n\n const populateDepth =\n props?.maxDepth !== undefined && props?.maxDepth < depth ? props?.maxDepth : depth\n\n populationPromises.push(\n populate({\n id,\n collectionSlug: collection.config.slug,\n currentDepth,\n data: node,\n depth: populateDepth,\n draft,\n key: 'value',\n overrideAccess,\n req,\n showHiddenFields,\n }),\n )\n\n return node\n },\n ],\n },\n node: UploadNode,\n validations: [uploadValidation(props)],\n }),\n ],\n sanitizedServerFeatureProps: props,\n }\n },\n key: 'upload',\n})\n"],"names":["sanitizeFields","UploadFeatureClient","populate","createServerFeature","createNode","uploadPopulationPromiseHOC","i18n","UploadNode","uploadValidation","getAbsoluteURL","url","payload","startsWith","config","serverURL","UploadFeature","feature","_config","isRoot","props","collections","clientProps","collection","hasExtraFields","fields","length","validRelationships","map","c","slug","requireFieldLevelRichTextEditor","ClientFeature","clientFeatureProps","generateSchemaMap","schemaMap","Map","set","nodes","converters","html","converter","draft","node","overrideAccess","req","showHiddenFields","id","value","uploadDocument","collectionSlug","relationTo","currentDepth","data","depth","key","ignored","console","error","mimeType","filename","sizes","Object","keys","width","height","pictureHTML","size","imageSize","filesize","imageSizeURL","nodeTypes","getType","getSubFields","collectionFieldSchema","Array","isArray","getSubFieldsData","graphQLPopulationPromises","hooks","afterRead","populationPromises","populateDepth","maxDepth","undefined","push","validations","sanitizedServerFeatureProps"],"mappings":"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"}
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import type { PopulationPromise } from '../typesServer.js';
|
|
2
|
-
import type { UploadFeatureProps } from './feature.server.js';
|
|
3
|
-
import type { SerializedUploadNode } from './nodes/UploadNode.js';
|
|
4
|
-
export declare const uploadPopulationPromiseHOC: (props?: UploadFeatureProps) => PopulationPromise<SerializedUploadNode>;
|
|
5
|
-
//# sourceMappingURL=graphQLPopulationPromise.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"graphQLPopulationPromise.d.ts","sourceRoot":"","sources":["../../../src/features/upload/graphQLPopulationPromise.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAA;AAC1D,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAA;AAC7D,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAA;AAKjE,eAAO,MAAM,0BAA0B,WAC7B,kBAAkB,KACzB,iBAAiB,CAAC,oBAAoB,CAoExC,CAAA"}
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
import { populate } from '../../populateGraphQL/populate.js';
|
|
2
|
-
import { recursivelyPopulateFieldsForGraphQL } from '../../populateGraphQL/recursivelyPopulateFieldsForGraphQL.js';
|
|
3
|
-
export const uploadPopulationPromiseHOC = (props)=>{
|
|
4
|
-
return ({ context, currentDepth, depth, draft, editorPopulationPromises, fieldPromises, findMany, flattenLocales, node, overrideAccess, populationPromises, req, showHiddenFields })=>{
|
|
5
|
-
if (node?.value) {
|
|
6
|
-
const collection = req.payload.collections[node?.relationTo];
|
|
7
|
-
if (collection) {
|
|
8
|
-
// @ts-expect-error
|
|
9
|
-
const id = node?.value?.id || node?.value // for backwards-compatibility
|
|
10
|
-
;
|
|
11
|
-
const populateDepth = props?.maxDepth !== undefined && props?.maxDepth < depth ? props?.maxDepth : depth;
|
|
12
|
-
populationPromises.push(populate({
|
|
13
|
-
id,
|
|
14
|
-
collectionSlug: collection.config.slug,
|
|
15
|
-
currentDepth,
|
|
16
|
-
data: node,
|
|
17
|
-
depth: populateDepth,
|
|
18
|
-
draft,
|
|
19
|
-
key: 'value',
|
|
20
|
-
overrideAccess,
|
|
21
|
-
req,
|
|
22
|
-
showHiddenFields
|
|
23
|
-
}));
|
|
24
|
-
const collectionFieldSchema = props?.collections?.[node?.relationTo]?.fields;
|
|
25
|
-
if (Array.isArray(collectionFieldSchema)) {
|
|
26
|
-
if (!collectionFieldSchema?.length) {
|
|
27
|
-
return;
|
|
28
|
-
}
|
|
29
|
-
recursivelyPopulateFieldsForGraphQL({
|
|
30
|
-
context,
|
|
31
|
-
currentDepth,
|
|
32
|
-
data: node.fields || {},
|
|
33
|
-
depth,
|
|
34
|
-
draft,
|
|
35
|
-
editorPopulationPromises,
|
|
36
|
-
fieldPromises,
|
|
37
|
-
fields: collectionFieldSchema,
|
|
38
|
-
findMany,
|
|
39
|
-
flattenLocales,
|
|
40
|
-
overrideAccess,
|
|
41
|
-
populationPromises,
|
|
42
|
-
req,
|
|
43
|
-
showHiddenFields,
|
|
44
|
-
siblingDoc: node.fields || {}
|
|
45
|
-
});
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
};
|
|
50
|
-
};
|
|
51
|
-
|
|
52
|
-
//# sourceMappingURL=graphQLPopulationPromise.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/features/upload/graphQLPopulationPromise.ts"],"sourcesContent":["import type { PopulationPromise } from '../typesServer.js'\nimport type { UploadFeatureProps } from './feature.server.js'\nimport type { SerializedUploadNode } from './nodes/UploadNode.js'\n\nimport { populate } from '../../populateGraphQL/populate.js'\nimport { recursivelyPopulateFieldsForGraphQL } from '../../populateGraphQL/recursivelyPopulateFieldsForGraphQL.js'\n\nexport const uploadPopulationPromiseHOC = (\n props?: UploadFeatureProps,\n): PopulationPromise<SerializedUploadNode> => {\n return ({\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 if (node?.value) {\n const collection = req.payload.collections[node?.relationTo]\n\n if (collection) {\n // @ts-expect-error\n const id = node?.value?.id || node?.value // for backwards-compatibility\n\n const populateDepth =\n props?.maxDepth !== undefined && props?.maxDepth < depth ? props?.maxDepth : depth\n\n populationPromises.push(\n populate({\n id,\n collectionSlug: collection.config.slug,\n currentDepth,\n data: node,\n depth: populateDepth,\n draft,\n key: 'value',\n overrideAccess,\n req,\n showHiddenFields,\n }),\n )\n\n const collectionFieldSchema = props?.collections?.[node?.relationTo]?.fields\n\n if (Array.isArray(collectionFieldSchema)) {\n if (!collectionFieldSchema?.length) {\n return\n }\n recursivelyPopulateFieldsForGraphQL({\n context,\n currentDepth,\n data: node.fields || {},\n depth,\n draft,\n editorPopulationPromises,\n fieldPromises,\n fields: collectionFieldSchema,\n findMany,\n flattenLocales,\n overrideAccess,\n populationPromises,\n req,\n showHiddenFields,\n siblingDoc: node.fields || {},\n })\n }\n }\n }\n }\n}\n"],"names":["populate","recursivelyPopulateFieldsForGraphQL","uploadPopulationPromiseHOC","props","context","currentDepth","depth","draft","editorPopulationPromises","fieldPromises","findMany","flattenLocales","node","overrideAccess","populationPromises","req","showHiddenFields","value","collection","payload","collections","relationTo","id","populateDepth","maxDepth","undefined","push","collectionSlug","config","slug","data","key","collectionFieldSchema","fields","Array","isArray","length","siblingDoc"],"mappings":"AAIA,SAASA,QAAQ,QAAQ,oCAAmC;AAC5D,SAASC,mCAAmC,QAAQ,+DAA8D;AAElH,OAAO,MAAMC,6BAA6B,CACxCC;IAEA,OAAO,CAAC,EACNC,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,IAAIJ,MAAMK,OAAO;YACf,MAAMC,aAAaH,IAAII,OAAO,CAACC,WAAW,CAACR,MAAMS,WAAW;YAE5D,IAAIH,YAAY;gBACd,mBAAmB;gBACnB,MAAMI,KAAKV,MAAMK,OAAOK,MAAMV,MAAMK,MAAM,8BAA8B;;gBAExE,MAAMM,gBACJpB,OAAOqB,aAAaC,aAAatB,OAAOqB,WAAWlB,QAAQH,OAAOqB,WAAWlB;gBAE/EQ,mBAAmBY,IAAI,CACrB1B,SAAS;oBACPsB;oBACAK,gBAAgBT,WAAWU,MAAM,CAACC,IAAI;oBACtCxB;oBACAyB,MAAMlB;oBACNN,OAAOiB;oBACPhB;oBACAwB,KAAK;oBACLlB;oBACAE;oBACAC;gBACF;gBAGF,MAAMgB,wBAAwB7B,OAAOiB,aAAa,CAACR,MAAMS,WAAW,EAAEY;gBAEtE,IAAIC,MAAMC,OAAO,CAACH,wBAAwB;oBACxC,IAAI,CAACA,uBAAuBI,QAAQ;wBAClC;oBACF;oBACAnC,oCAAoC;wBAClCG;wBACAC;wBACAyB,MAAMlB,KAAKqB,MAAM,IAAI,CAAC;wBACtB3B;wBACAC;wBACAC;wBACAC;wBACAwB,QAAQD;wBACRtB;wBACAC;wBACAE;wBACAC;wBACAC;wBACAC;wBACAqB,YAAYzB,KAAKqB,MAAM,IAAI,CAAC;oBAC9B;gBACF;YACF;QACF;IACF;AACF,EAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"i18n.d.ts","sourceRoot":"","sources":["../../../src/features/upload/i18n.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAA;AAEhE,eAAO,MAAM,IAAI,EAAE,OAAO,CAAC,gBAAgB,CAiG1C,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/features/upload/i18n.ts"],"sourcesContent":["import type { GenericLanguages } from '@payloadcms/translations'\n\nexport const i18n: Partial<GenericLanguages> = {\n ar: {\n label: 'تحميل',\n },\n az: {\n label: 'Yükləyin',\n },\n bg: {\n label: 'Качване',\n },\n cs: {\n label: 'Nahrát',\n },\n de: {\n label: 'Datei',\n },\n en: {\n label: 'Upload',\n },\n es: {\n label: 'Subir',\n },\n fa: {\n label: 'بارگذاری',\n },\n fr: {\n label: 'Télécharger',\n },\n he: {\n label: 'העלה',\n },\n hr: {\n label: 'Prenesi',\n },\n hu: {\n label: 'Feltöltés',\n },\n it: {\n label: 'Carica',\n },\n ja: {\n label: 'アップロード',\n },\n ko: {\n label: '업로드',\n },\n my: {\n label: 'တင်ပြီး',\n },\n nb: {\n label: 'Last opp',\n },\n nl: {\n label: 'Uploaden',\n },\n pl: {\n label: 'Prześlij',\n },\n pt: {\n label: 'Carregar',\n },\n ro: {\n label: 'Încarcă',\n },\n rs: {\n label: 'Otpremi',\n },\n 'rs-latin': {\n label: 'Otpremi',\n },\n ru: {\n label: 'Загрузить',\n },\n sk: {\n label: 'Nahrať',\n },\n sv: {\n label: 'Ladda upp',\n },\n th: {\n label: 'อัปโหลด',\n },\n tr: {\n label: 'Yükle',\n },\n uk: {\n label: 'Завантажити',\n },\n vi: {\n label: 'Tải lên',\n },\n zh: {\n label: '上传',\n },\n 'zh-TW': {\n label: '上傳',\n },\n}\n"],"names":["i18n","ar","label","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":"AAEA,OAAO,MAAMA,OAAkC;IAC7CC,IAAI;QACFC,OAAO;IACT;IACAC,IAAI;QACFD,OAAO;IACT;IACAE,IAAI;QACFF,OAAO;IACT;IACAG,IAAI;QACFH,OAAO;IACT;IACAI,IAAI;QACFJ,OAAO;IACT;IACAK,IAAI;QACFL,OAAO;IACT;IACAM,IAAI;QACFN,OAAO;IACT;IACAO,IAAI;QACFP,OAAO;IACT;IACAQ,IAAI;QACFR,OAAO;IACT;IACAS,IAAI;QACFT,OAAO;IACT;IACAU,IAAI;QACFV,OAAO;IACT;IACAW,IAAI;QACFX,OAAO;IACT;IACAY,IAAI;QACFZ,OAAO;IACT;IACAa,IAAI;QACFb,OAAO;IACT;IACAc,IAAI;QACFd,OAAO;IACT;IACAe,IAAI;QACFf,OAAO;IACT;IACAgB,IAAI;QACFhB,OAAO;IACT;IACAiB,IAAI;QACFjB,OAAO;IACT;IACAkB,IAAI;QACFlB,OAAO;IACT;IACAmB,IAAI;QACFnB,OAAO;IACT;IACAoB,IAAI;QACFpB,OAAO;IACT;IACAqB,IAAI;QACFrB,OAAO;IACT;IACA,YAAY;QACVA,OAAO;IACT;IACAsB,IAAI;QACFtB,OAAO;IACT;IACAuB,IAAI;QACFvB,OAAO;IACT;IACAwB,IAAI;QACFxB,OAAO;IACT;IACAyB,IAAI;QACFzB,OAAO;IACT;IACA0B,IAAI;QACF1B,OAAO;IACT;IACA2B,IAAI;QACF3B,OAAO;IACT;IACA4B,IAAI;QACF5B,OAAO;IACT;IACA6B,IAAI;QACF7B,OAAO;IACT;IACA,SAAS;QACPA,OAAO;IACT;AACF,EAAC"}
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import type { SerializedDecoratorBlockNode } from '@lexical/react/LexicalDecoratorBlockNode.js';
|
|
2
|
-
import type { DOMConversionMap, DOMExportOutput, ElementFormatType, LexicalNode, NodeKey, Spread } from 'lexical';
|
|
3
|
-
import type { CollectionSlug, JsonObject } from 'payload';
|
|
4
|
-
import type { JSX } from 'react';
|
|
5
|
-
import { DecoratorBlockNode } from '@lexical/react/LexicalDecoratorBlockNode.js';
|
|
6
|
-
export type UploadData = {
|
|
7
|
-
fields: JsonObject;
|
|
8
|
-
id: string;
|
|
9
|
-
relationTo: CollectionSlug;
|
|
10
|
-
value: number | string;
|
|
11
|
-
};
|
|
12
|
-
export type SerializedUploadNode = {
|
|
13
|
-
children?: never;
|
|
14
|
-
type: 'upload';
|
|
15
|
-
} & Spread<UploadData, SerializedDecoratorBlockNode>;
|
|
16
|
-
export declare class UploadNode extends DecoratorBlockNode {
|
|
17
|
-
__data: UploadData;
|
|
18
|
-
constructor({ data, format, key, }: {
|
|
19
|
-
data: UploadData;
|
|
20
|
-
format?: ElementFormatType;
|
|
21
|
-
key?: NodeKey;
|
|
22
|
-
});
|
|
23
|
-
static clone(node: UploadNode): UploadNode;
|
|
24
|
-
static getType(): string;
|
|
25
|
-
static importDOM(): DOMConversionMap | null;
|
|
26
|
-
static importJSON(serializedNode: SerializedUploadNode): UploadNode;
|
|
27
|
-
static isInline(): false;
|
|
28
|
-
decorate(): JSX.Element;
|
|
29
|
-
exportDOM(): DOMExportOutput;
|
|
30
|
-
exportJSON(): SerializedUploadNode;
|
|
31
|
-
getData(): UploadData;
|
|
32
|
-
setData(data: UploadData): void;
|
|
33
|
-
updateDOM(): false;
|
|
34
|
-
}
|
|
35
|
-
export declare function $createUploadNode({ data, }: {
|
|
36
|
-
data: Omit<UploadData, 'id'> & Partial<Pick<UploadData, 'id'>>;
|
|
37
|
-
}): UploadNode;
|
|
38
|
-
export declare function $isUploadNode(node: LexicalNode | null | undefined): node is UploadNode;
|
|
39
|
-
//# sourceMappingURL=UploadNode.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"UploadNode.d.ts","sourceRoot":"","sources":["../../../../src/features/upload/nodes/UploadNode.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,6CAA6C,CAAA;AAC/F,OAAO,KAAK,EACV,gBAAgB,EAEhB,eAAe,EACf,iBAAiB,EACjB,WAAW,EACX,OAAO,EACP,MAAM,EACP,MAAM,SAAS,CAAA;AAChB,OAAO,KAAK,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,SAAS,CAAA;AACzD,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,OAAO,CAAA;AAEhC,OAAO,EAAE,kBAAkB,EAAE,MAAM,6CAA6C,CAAA;AAShF,MAAM,MAAM,UAAU,GAAG;IACvB,MAAM,EAAE,UAAU,CAAA;IAClB,EAAE,EAAE,MAAM,CAAA;IACV,UAAU,EAAE,cAAc,CAAA;IAC1B,KAAK,EAAE,MAAM,GAAG,MAAM,CAAA;CACvB,CAAA;AAuCD,MAAM,MAAM,oBAAoB,GAAG;IACjC,QAAQ,CAAC,EAAE,KAAK,CAAA;IAChB,IAAI,EAAE,QAAQ,CAAA;CACf,GAAG,MAAM,CAAC,UAAU,EAAE,4BAA4B,CAAC,CAAA;AAEpD,qBAAa,UAAW,SAAQ,kBAAkB;IAChD,MAAM,EAAE,UAAU,CAAA;gBAEN,EACV,IAAI,EACJ,MAAM,EACN,GAAG,GACJ,EAAE;QACD,IAAI,EAAE,UAAU,CAAA;QAChB,MAAM,CAAC,EAAE,iBAAiB,CAAA;QAC1B,GAAG,CAAC,EAAE,OAAO,CAAA;KACd;IAKD,MAAM,CAAC,KAAK,CAAC,IAAI,EAAE,UAAU,GAAG,UAAU;IAQ1C,MAAM,CAAC,OAAO,IAAI,MAAM;IAIxB,MAAM,CAAC,SAAS,IAAI,gBAAgB,GAAG,IAAI;IAS3C,MAAM,CAAC,UAAU,CAAC,cAAc,EAAE,oBAAoB,GAAG,UAAU;IAsBnE,MAAM,CAAC,QAAQ,IAAI,KAAK;IAIxB,QAAQ,IAAI,GAAG,CAAC,OAAO;IAKvB,SAAS,IAAI,eAAe;IAQ5B,UAAU,IAAI,oBAAoB;IASlC,OAAO,IAAI,UAAU;IAIrB,OAAO,CAAC,IAAI,EAAE,UAAU,GAAG,IAAI;IAK/B,SAAS,IAAI,KAAK;CAGnB;AAED,wBAAgB,iBAAiB,CAAC,EAChC,IAAI,GACL,EAAE;IACD,IAAI,EAAE,IAAI,CAAC,UAAU,EAAE,IAAI,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,UAAU,EAAE,IAAI,CAAC,CAAC,CAAA;CAC/D,GAAG,UAAU,CAKb;AAED,wBAAgB,aAAa,CAAC,IAAI,EAAE,WAAW,GAAG,IAAI,GAAG,SAAS,GAAG,IAAI,IAAI,UAAU,CAEtF"}
|
|
@@ -1,131 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { DecoratorBlockNode } from '@lexical/react/LexicalDecoratorBlockNode.js';
|
|
3
|
-
import ObjectID from 'bson-objectid';
|
|
4
|
-
import { $applyNodeReplacement } from 'lexical';
|
|
5
|
-
import * as React from 'react';
|
|
6
|
-
const RawUploadComponent = /*#__PURE__*/ React.lazy(()=>import('../component/index.js').then((module)=>({
|
|
7
|
-
default: module.UploadComponent
|
|
8
|
-
})));
|
|
9
|
-
function isGoogleDocCheckboxImg(img) {
|
|
10
|
-
return img.parentElement != null && img.parentElement.tagName === 'LI' && img.previousSibling === null && img.getAttribute('aria-roledescription') === 'checkbox';
|
|
11
|
-
}
|
|
12
|
-
function $convertUploadElement(domNode) {
|
|
13
|
-
if (domNode.hasAttribute('data-lexical-upload-relation-to') && domNode.hasAttribute('data-lexical-upload-id')) {
|
|
14
|
-
const id = domNode.getAttribute('data-lexical-upload-id');
|
|
15
|
-
const relationTo = domNode.getAttribute('data-lexical-upload-relation-to');
|
|
16
|
-
if (id != null && relationTo != null) {
|
|
17
|
-
const node = $createUploadNode({
|
|
18
|
-
data: {
|
|
19
|
-
fields: {},
|
|
20
|
-
relationTo,
|
|
21
|
-
value: id
|
|
22
|
-
}
|
|
23
|
-
});
|
|
24
|
-
return {
|
|
25
|
-
node
|
|
26
|
-
};
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
const img = domNode;
|
|
30
|
-
if (img.src.startsWith('file:///') || isGoogleDocCheckboxImg(img)) {
|
|
31
|
-
return null;
|
|
32
|
-
}
|
|
33
|
-
// TODO: Auto-upload functionality here!
|
|
34
|
-
//}
|
|
35
|
-
return null;
|
|
36
|
-
}
|
|
37
|
-
export class UploadNode extends DecoratorBlockNode {
|
|
38
|
-
__data;
|
|
39
|
-
constructor({ data, format, key }){
|
|
40
|
-
super(format, key);
|
|
41
|
-
this.__data = data;
|
|
42
|
-
}
|
|
43
|
-
static clone(node) {
|
|
44
|
-
return new UploadNode({
|
|
45
|
-
data: node.__data,
|
|
46
|
-
format: node.__format,
|
|
47
|
-
key: node.__key
|
|
48
|
-
});
|
|
49
|
-
}
|
|
50
|
-
static getType() {
|
|
51
|
-
return 'upload';
|
|
52
|
-
}
|
|
53
|
-
static importDOM() {
|
|
54
|
-
return {
|
|
55
|
-
img: (node)=>({
|
|
56
|
-
conversion: $convertUploadElement,
|
|
57
|
-
priority: 0
|
|
58
|
-
})
|
|
59
|
-
};
|
|
60
|
-
}
|
|
61
|
-
static importJSON(serializedNode) {
|
|
62
|
-
if (serializedNode.version === 1 && serializedNode?.value?.id) {
|
|
63
|
-
serializedNode.value = serializedNode.value.id;
|
|
64
|
-
}
|
|
65
|
-
if (serializedNode.version === 2 && !serializedNode?.id) {
|
|
66
|
-
serializedNode.id = new ObjectID.default().toHexString();
|
|
67
|
-
serializedNode.version = 3;
|
|
68
|
-
}
|
|
69
|
-
const importedData = {
|
|
70
|
-
id: serializedNode.id,
|
|
71
|
-
fields: serializedNode.fields,
|
|
72
|
-
relationTo: serializedNode.relationTo,
|
|
73
|
-
value: serializedNode.value
|
|
74
|
-
};
|
|
75
|
-
const node = $createUploadNode({
|
|
76
|
-
data: importedData
|
|
77
|
-
});
|
|
78
|
-
node.setFormat(serializedNode.format);
|
|
79
|
-
return node;
|
|
80
|
-
}
|
|
81
|
-
static isInline() {
|
|
82
|
-
return false;
|
|
83
|
-
}
|
|
84
|
-
decorate() {
|
|
85
|
-
// @ts-expect-error
|
|
86
|
-
return /*#__PURE__*/ _jsx(RawUploadComponent, {
|
|
87
|
-
data: this.__data,
|
|
88
|
-
format: this.__format,
|
|
89
|
-
nodeKey: this.getKey()
|
|
90
|
-
});
|
|
91
|
-
}
|
|
92
|
-
exportDOM() {
|
|
93
|
-
const element = document.createElement('img');
|
|
94
|
-
element.setAttribute('data-lexical-upload-id', String(this.__data?.value));
|
|
95
|
-
element.setAttribute('data-lexical-upload-relation-to', this.__data?.relationTo);
|
|
96
|
-
return {
|
|
97
|
-
element
|
|
98
|
-
};
|
|
99
|
-
}
|
|
100
|
-
exportJSON() {
|
|
101
|
-
return {
|
|
102
|
-
...super.exportJSON(),
|
|
103
|
-
...this.getData(),
|
|
104
|
-
type: 'upload',
|
|
105
|
-
version: 3
|
|
106
|
-
};
|
|
107
|
-
}
|
|
108
|
-
getData() {
|
|
109
|
-
return this.getLatest().__data;
|
|
110
|
-
}
|
|
111
|
-
setData(data) {
|
|
112
|
-
const writable = this.getWritable();
|
|
113
|
-
writable.__data = data;
|
|
114
|
-
}
|
|
115
|
-
updateDOM() {
|
|
116
|
-
return false;
|
|
117
|
-
}
|
|
118
|
-
}
|
|
119
|
-
export function $createUploadNode({ data }) {
|
|
120
|
-
if (!data?.id) {
|
|
121
|
-
data.id = new ObjectID.default().toHexString();
|
|
122
|
-
}
|
|
123
|
-
return $applyNodeReplacement(new UploadNode({
|
|
124
|
-
data: data
|
|
125
|
-
}));
|
|
126
|
-
}
|
|
127
|
-
export function $isUploadNode(node) {
|
|
128
|
-
return node instanceof UploadNode;
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
//# sourceMappingURL=UploadNode.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/features/upload/nodes/UploadNode.tsx"],"sourcesContent":["import type { SerializedDecoratorBlockNode } from '@lexical/react/LexicalDecoratorBlockNode.js'\nimport type {\n DOMConversionMap,\n DOMConversionOutput,\n DOMExportOutput,\n ElementFormatType,\n LexicalNode,\n NodeKey,\n Spread,\n} from 'lexical'\nimport type { CollectionSlug, JsonObject } from 'payload'\nimport type { JSX } from 'react'\n\nimport { DecoratorBlockNode } from '@lexical/react/LexicalDecoratorBlockNode.js'\nimport ObjectID from 'bson-objectid'\nimport { $applyNodeReplacement } from 'lexical'\nimport * as React from 'react'\n\nconst RawUploadComponent = React.lazy(() =>\n import('../component/index.js').then((module) => ({ default: module.UploadComponent })),\n)\n\nexport type UploadData = {\n fields: JsonObject\n id: string\n relationTo: CollectionSlug\n value: number | string\n}\n\nfunction isGoogleDocCheckboxImg(img: HTMLImageElement): boolean {\n return (\n img.parentElement != null &&\n img.parentElement.tagName === 'LI' &&\n img.previousSibling === null &&\n img.getAttribute('aria-roledescription') === 'checkbox'\n )\n}\n\nfunction $convertUploadElement(domNode: HTMLImageElement): DOMConversionOutput | null {\n if (\n domNode.hasAttribute('data-lexical-upload-relation-to') &&\n domNode.hasAttribute('data-lexical-upload-id')\n ) {\n const id = domNode.getAttribute('data-lexical-upload-id')\n const relationTo = domNode.getAttribute('data-lexical-upload-relation-to')\n\n if (id != null && relationTo != null) {\n const node = $createUploadNode({\n data: {\n fields: {},\n relationTo,\n value: id,\n },\n })\n return { node }\n }\n }\n const img = domNode\n if (img.src.startsWith('file:///') || isGoogleDocCheckboxImg(img)) {\n return null\n }\n // TODO: Auto-upload functionality here!\n //}\n return null\n}\n\nexport type SerializedUploadNode = {\n children?: never // required so that our typed editor state doesn't automatically add children\n type: 'upload'\n} & Spread<UploadData, SerializedDecoratorBlockNode>\n\nexport class UploadNode extends DecoratorBlockNode {\n __data: UploadData\n\n constructor({\n data,\n format,\n key,\n }: {\n data: UploadData\n format?: ElementFormatType\n key?: NodeKey\n }) {\n super(format, key)\n this.__data = data\n }\n\n static clone(node: UploadNode): UploadNode {\n return new UploadNode({\n data: node.__data,\n format: node.__format,\n key: node.__key,\n })\n }\n\n static getType(): string {\n return 'upload'\n }\n\n static importDOM(): DOMConversionMap | null {\n return {\n img: (node: HTMLImageElement) => ({\n conversion: $convertUploadElement,\n priority: 0,\n }),\n }\n }\n\n static importJSON(serializedNode: SerializedUploadNode): UploadNode {\n if (serializedNode.version === 1 && (serializedNode?.value as unknown as { id: string })?.id) {\n serializedNode.value = (serializedNode.value as unknown as { id: string }).id\n }\n if (serializedNode.version === 2 && !serializedNode?.id) {\n serializedNode.id = new ObjectID.default().toHexString()\n serializedNode.version = 3\n }\n\n const importedData: UploadData = {\n id: serializedNode.id,\n fields: serializedNode.fields,\n relationTo: serializedNode.relationTo,\n value: serializedNode.value,\n }\n\n const node = $createUploadNode({ data: importedData })\n node.setFormat(serializedNode.format)\n\n return node\n }\n\n static isInline(): false {\n return false\n }\n\n decorate(): JSX.Element {\n // @ts-expect-error\n return <RawUploadComponent data={this.__data} format={this.__format} nodeKey={this.getKey()} />\n }\n\n exportDOM(): DOMExportOutput {\n const element = document.createElement('img')\n element.setAttribute('data-lexical-upload-id', String(this.__data?.value))\n element.setAttribute('data-lexical-upload-relation-to', this.__data?.relationTo)\n\n return { element }\n }\n\n exportJSON(): SerializedUploadNode {\n return {\n ...super.exportJSON(),\n ...this.getData(),\n type: 'upload',\n version: 3,\n }\n }\n\n getData(): UploadData {\n return this.getLatest().__data\n }\n\n setData(data: UploadData): void {\n const writable = this.getWritable()\n writable.__data = data\n }\n\n updateDOM(): false {\n return false\n }\n}\n\nexport function $createUploadNode({\n data,\n}: {\n data: Omit<UploadData, 'id'> & Partial<Pick<UploadData, 'id'>>\n}): UploadNode {\n if (!data?.id) {\n data.id = new ObjectID.default().toHexString()\n }\n return $applyNodeReplacement(new UploadNode({ data: data as UploadData }))\n}\n\nexport function $isUploadNode(node: LexicalNode | null | undefined): node is UploadNode {\n return node instanceof UploadNode\n}\n"],"names":["DecoratorBlockNode","ObjectID","$applyNodeReplacement","React","RawUploadComponent","lazy","then","module","default","UploadComponent","isGoogleDocCheckboxImg","img","parentElement","tagName","previousSibling","getAttribute","$convertUploadElement","domNode","hasAttribute","id","relationTo","node","$createUploadNode","data","fields","value","src","startsWith","UploadNode","__data","constructor","format","key","clone","__format","__key","getType","importDOM","conversion","priority","importJSON","serializedNode","version","toHexString","importedData","setFormat","isInline","decorate","nodeKey","getKey","exportDOM","element","document","createElement","setAttribute","String","exportJSON","getData","type","getLatest","setData","writable","getWritable","updateDOM","$isUploadNode"],"mappings":"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"}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import type { LexicalCommand } from 'lexical';
|
|
2
|
-
import type { PluginComponentWithAnchor } from '../../typesClient.js';
|
|
3
|
-
import type { UploadFeaturePropsClient } from '../feature.client.js';
|
|
4
|
-
import type { UploadData } from '../nodes/UploadNode.js';
|
|
5
|
-
export type InsertUploadPayload = Readonly<Omit<UploadData, 'id'> & Partial<Pick<UploadData, 'id'>>>;
|
|
6
|
-
export declare const INSERT_UPLOAD_COMMAND: LexicalCommand<InsertUploadPayload>;
|
|
7
|
-
export declare const UploadPlugin: PluginComponentWithAnchor<UploadFeaturePropsClient>;
|
|
8
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/features/upload/plugin/index.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAA;AAe7C,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,sBAAsB,CAAA;AACrE,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAA;AACpE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAA;AAKxD,MAAM,MAAM,mBAAmB,GAAG,QAAQ,CAAC,IAAI,CAAC,UAAU,EAAE,IAAI,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,UAAU,EAAE,IAAI,CAAC,CAAC,CAAC,CAAA;AAEpG,eAAO,MAAM,qBAAqB,EAAE,cAAc,CAAC,mBAAmB,CAC9B,CAAA;AAExC,eAAO,MAAM,YAAY,EAAE,yBAAyB,CAAC,wBAAwB,CAwD5E,CAAA"}
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
-
import { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext.js';
|
|
4
|
-
import { $insertNodeToNearestRoot, mergeRegister } from '@lexical/utils';
|
|
5
|
-
import { useConfig } from '@payloadcms/ui';
|
|
6
|
-
import { $getPreviousSelection, $getSelection, $isParagraphNode, $isRangeSelection, COMMAND_PRIORITY_EDITOR, createCommand } from 'lexical';
|
|
7
|
-
import React, { useEffect } from 'react';
|
|
8
|
-
import { UploadDrawer } from '../drawer/index.js';
|
|
9
|
-
import { $createUploadNode, UploadNode } from '../nodes/UploadNode.js';
|
|
10
|
-
export const INSERT_UPLOAD_COMMAND = createCommand('INSERT_UPLOAD_COMMAND');
|
|
11
|
-
export const UploadPlugin = ({ clientProps })=>{
|
|
12
|
-
const [editor] = useLexicalComposerContext();
|
|
13
|
-
const { collections } = useConfig();
|
|
14
|
-
useEffect(()=>{
|
|
15
|
-
if (!editor.hasNodes([
|
|
16
|
-
UploadNode
|
|
17
|
-
])) {
|
|
18
|
-
throw new Error('UploadPlugin: UploadNode not registered on editor');
|
|
19
|
-
}
|
|
20
|
-
return mergeRegister(editor.registerCommand(INSERT_UPLOAD_COMMAND, (payload)=>{
|
|
21
|
-
editor.update(()=>{
|
|
22
|
-
const selection = $getSelection() || $getPreviousSelection();
|
|
23
|
-
if ($isRangeSelection(selection)) {
|
|
24
|
-
const uploadNode = $createUploadNode({
|
|
25
|
-
data: {
|
|
26
|
-
id: payload.id,
|
|
27
|
-
fields: payload.fields,
|
|
28
|
-
relationTo: payload.relationTo,
|
|
29
|
-
value: payload.value
|
|
30
|
-
}
|
|
31
|
-
});
|
|
32
|
-
// Insert upload node BEFORE potentially removing focusNode, as $insertNodeToNearestRoot errors if the focusNode doesn't exist
|
|
33
|
-
$insertNodeToNearestRoot(uploadNode);
|
|
34
|
-
const { focus } = selection;
|
|
35
|
-
const focusNode = focus.getNode();
|
|
36
|
-
// First, delete currently selected node if it's an empty paragraph and if there are sufficient
|
|
37
|
-
// paragraph nodes (more than 1) left in the parent node, so that we don't "trap" the user
|
|
38
|
-
if ($isParagraphNode(focusNode) && focusNode.getTextContentSize() === 0 && focusNode.getParent().getChildren().filter((node)=>$isParagraphNode(node)).length > 1) {
|
|
39
|
-
focusNode.remove();
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
});
|
|
43
|
-
return true;
|
|
44
|
-
}, COMMAND_PRIORITY_EDITOR));
|
|
45
|
-
}, [
|
|
46
|
-
editor
|
|
47
|
-
]);
|
|
48
|
-
return /*#__PURE__*/ _jsx(UploadDrawer, {
|
|
49
|
-
enabledCollectionSlugs: collections.map(({ slug })=>slug)
|
|
50
|
-
});
|
|
51
|
-
};
|
|
52
|
-
|
|
53
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/features/upload/plugin/index.tsx"],"sourcesContent":["'use client'\nimport type { LexicalCommand } from 'lexical'\n\nimport { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext.js'\nimport { $insertNodeToNearestRoot, mergeRegister } from '@lexical/utils'\nimport { useConfig } from '@payloadcms/ui'\nimport {\n $getPreviousSelection,\n $getSelection,\n $isParagraphNode,\n $isRangeSelection,\n COMMAND_PRIORITY_EDITOR,\n createCommand,\n} from 'lexical'\nimport React, { useEffect } from 'react'\n\nimport type { PluginComponentWithAnchor } from '../../typesClient.js'\nimport type { UploadFeaturePropsClient } from '../feature.client.js'\nimport type { UploadData } from '../nodes/UploadNode.js'\n\nimport { UploadDrawer } from '../drawer/index.js'\nimport { $createUploadNode, UploadNode } from '../nodes/UploadNode.js'\n\nexport type InsertUploadPayload = Readonly<Omit<UploadData, 'id'> & Partial<Pick<UploadData, 'id'>>>\n\nexport const INSERT_UPLOAD_COMMAND: LexicalCommand<InsertUploadPayload> =\n createCommand('INSERT_UPLOAD_COMMAND')\n\nexport const UploadPlugin: PluginComponentWithAnchor<UploadFeaturePropsClient> = ({\n clientProps,\n}) => {\n const [editor] = useLexicalComposerContext()\n const { collections } = useConfig()\n\n useEffect(() => {\n if (!editor.hasNodes([UploadNode])) {\n throw new Error('UploadPlugin: UploadNode not registered on editor')\n }\n\n return mergeRegister(\n editor.registerCommand<InsertUploadPayload>(\n INSERT_UPLOAD_COMMAND,\n (payload: InsertUploadPayload) => {\n editor.update(() => {\n const selection = $getSelection() || $getPreviousSelection()\n\n if ($isRangeSelection(selection)) {\n const uploadNode = $createUploadNode({\n data: {\n id: payload.id,\n fields: payload.fields,\n relationTo: payload.relationTo,\n value: payload.value,\n },\n })\n // Insert upload node BEFORE potentially removing focusNode, as $insertNodeToNearestRoot errors if the focusNode doesn't exist\n $insertNodeToNearestRoot(uploadNode)\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 )\n }, [editor])\n\n return <UploadDrawer enabledCollectionSlugs={collections.map(({ slug }) => slug)} />\n}\n"],"names":["useLexicalComposerContext","$insertNodeToNearestRoot","mergeRegister","useConfig","$getPreviousSelection","$getSelection","$isParagraphNode","$isRangeSelection","COMMAND_PRIORITY_EDITOR","createCommand","React","useEffect","UploadDrawer","$createUploadNode","UploadNode","INSERT_UPLOAD_COMMAND","UploadPlugin","clientProps","editor","collections","hasNodes","Error","registerCommand","payload","update","selection","uploadNode","data","id","fields","relationTo","value","focus","focusNode","getNode","getTextContentSize","getParent","getChildren","filter","node","length","remove","enabledCollectionSlugs","map","slug"],"mappings":"AAAA;;AAGA,SAASA,yBAAyB,QAAQ,2CAA0C;AACpF,SAASC,wBAAwB,EAAEC,aAAa,QAAQ,iBAAgB;AACxE,SAASC,SAAS,QAAQ,iBAAgB;AAC1C,SACEC,qBAAqB,EACrBC,aAAa,EACbC,gBAAgB,EAChBC,iBAAiB,EACjBC,uBAAuB,EACvBC,aAAa,QACR,UAAS;AAChB,OAAOC,SAASC,SAAS,QAAQ,QAAO;AAMxC,SAASC,YAAY,QAAQ,qBAAoB;AACjD,SAASC,iBAAiB,EAAEC,UAAU,QAAQ,yBAAwB;AAItE,OAAO,MAAMC,wBACXN,cAAc,yBAAwB;AAExC,OAAO,MAAMO,eAAoE,CAAC,EAChFC,WAAW,EACZ;IACC,MAAM,CAACC,OAAO,GAAGlB;IACjB,MAAM,EAAEmB,WAAW,EAAE,GAAGhB;IAExBQ,UAAU;QACR,IAAI,CAACO,OAAOE,QAAQ,CAAC;YAACN;SAAW,GAAG;YAClC,MAAM,IAAIO,MAAM;QAClB;QAEA,OAAOnB,cACLgB,OAAOI,eAAe,CACpBP,uBACA,CAACQ;YACCL,OAAOM,MAAM,CAAC;gBACZ,MAAMC,YAAYpB,mBAAmBD;gBAErC,IAAIG,kBAAkBkB,YAAY;oBAChC,MAAMC,aAAab,kBAAkB;wBACnCc,MAAM;4BACJC,IAAIL,QAAQK,EAAE;4BACdC,QAAQN,QAAQM,MAAM;4BACtBC,YAAYP,QAAQO,UAAU;4BAC9BC,OAAOR,QAAQQ,KAAK;wBACtB;oBACF;oBACA,8HAA8H;oBAC9H9B,yBAAyByB;oBAEzB,MAAM,EAAEM,KAAK,EAAE,GAAGP;oBAClB,MAAMQ,YAAYD,MAAME,OAAO;oBAE/B,+FAA+F;oBAC/F,0FAA0F;oBAC1F,IACE5B,iBAAiB2B,cACjBA,UAAUE,kBAAkB,OAAO,KACnCF,UACGG,SAAS,GACTC,WAAW,GACXC,MAAM,CAAC,CAACC,OAASjC,iBAAiBiC,OAAOC,MAAM,GAAG,GACrD;wBACAP,UAAUQ,MAAM;oBAClB;gBACF;YACF;YAEA,OAAO;QACT,GACAjC;IAGN,GAAG;QAACU;KAAO;IAEX,qBAAO,KAACN;QAAa8B,wBAAwBvB,YAAYwB,GAAG,CAAC,CAAC,EAAEC,IAAI,EAAE,GAAKA;;AAC7E,EAAC"}
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import type { NodeValidation } from '../typesServer.js';
|
|
2
|
-
import type { UploadFeatureProps } from './feature.server.js';
|
|
3
|
-
import type { SerializedUploadNode } from './nodes/UploadNode.js';
|
|
4
|
-
export declare const uploadValidation: (props: UploadFeatureProps) => NodeValidation<SerializedUploadNode>;
|
|
5
|
-
//# sourceMappingURL=validate.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"validate.d.ts","sourceRoot":"","sources":["../../../src/features/upload/validate.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAA;AACvD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAA;AAC7D,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAA;AAEjE,eAAO,MAAM,gBAAgB,UACpB,kBAAkB,KACxB,cAAc,CAAC,oBAAoB,CA2DrC,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/features/upload/validate.ts"],"sourcesContent":["import { buildStateFromSchema } from '@payloadcms/ui/forms/buildStateFromSchema'\nimport { isValidID } from 'payload'\n\nimport type { NodeValidation } from '../typesServer.js'\nimport type { UploadFeatureProps } from './feature.server.js'\nimport type { SerializedUploadNode } from './nodes/UploadNode.js'\n\nexport const uploadValidation = (\n props: UploadFeatureProps,\n): NodeValidation<SerializedUploadNode> => {\n return async ({\n node,\n validation: {\n options: {\n id,\n operation,\n preferences,\n req,\n req: { payload, t },\n },\n },\n }) => {\n const idType = payload.collections[node.relationTo].customIDType || payload.db.defaultIDType\n // @ts-expect-error\n const nodeID = node?.value?.id || node?.value // for backwards-compatibility\n\n if (!isValidID(nodeID, idType)) {\n return t('validation:validUploadID')\n }\n\n if (!props?.collections) {\n return true\n }\n\n if (Object.keys(props?.collections).length === 0) {\n return true\n }\n\n const collection = props?.collections[node.relationTo]\n\n if (!collection?.fields?.length) {\n return true\n }\n\n const result = await buildStateFromSchema({\n id,\n collectionSlug: node.relationTo,\n data: node?.fields ?? {},\n fieldSchema: collection.fields,\n operation: operation === 'create' || operation === 'update' ? operation : 'update',\n preferences,\n req,\n siblingData: node?.fields ?? {},\n })\n\n let errorPaths = []\n for (const fieldKey in result) {\n if (result[fieldKey].errorPaths) {\n errorPaths = errorPaths.concat(result[fieldKey].errorPaths)\n }\n }\n\n if (errorPaths.length) {\n return 'The following fields are invalid: ' + errorPaths.join(', ')\n }\n\n return true\n }\n}\n"],"names":["buildStateFromSchema","isValidID","uploadValidation","props","node","validation","options","id","operation","preferences","req","payload","t","idType","collections","relationTo","customIDType","db","defaultIDType","nodeID","value","Object","keys","length","collection","fields","result","collectionSlug","data","fieldSchema","siblingData","errorPaths","fieldKey","concat","join"],"mappings":"AAAA,SAASA,oBAAoB,QAAQ,4CAA2C;AAChF,SAASC,SAAS,QAAQ,UAAS;AAMnC,OAAO,MAAMC,mBAAmB,CAC9BC;IAEA,OAAO,OAAO,EACZC,IAAI,EACJC,YAAY,EACVC,SAAS,EACPC,EAAE,EACFC,SAAS,EACTC,WAAW,EACXC,GAAG,EACHA,KAAK,EAAEC,OAAO,EAAEC,CAAC,EAAE,EACpB,EACF,EACF;QACC,MAAMC,SAASF,QAAQG,WAAW,CAACV,KAAKW,UAAU,CAAC,CAACC,YAAY,IAAIL,QAAQM,EAAE,CAACC,aAAa;QAC5F,mBAAmB;QACnB,MAAMC,SAASf,MAAMgB,OAAOb,MAAMH,MAAMgB,MAAM,8BAA8B;;QAE5E,IAAI,CAACnB,UAAUkB,QAAQN,SAAS;YAC9B,OAAOD,EAAE;QACX;QAEA,IAAI,CAACT,OAAOW,aAAa;YACvB,OAAO;QACT;QAEA,IAAIO,OAAOC,IAAI,CAACnB,OAAOW,aAAaS,MAAM,KAAK,GAAG;YAChD,OAAO;QACT;QAEA,MAAMC,aAAarB,OAAOW,WAAW,CAACV,KAAKW,UAAU,CAAC;QAEtD,IAAI,CAACS,YAAYC,QAAQF,QAAQ;YAC/B,OAAO;QACT;QAEA,MAAMG,SAAS,MAAM1B,qBAAqB;YACxCO;YACAoB,gBAAgBvB,KAAKW,UAAU;YAC/Ba,MAAMxB,MAAMqB,UAAU,CAAC;YACvBI,aAAaL,WAAWC,MAAM;YAC9BjB,WAAWA,cAAc,YAAYA,cAAc,WAAWA,YAAY;YAC1EC;YACAC;YACAoB,aAAa1B,MAAMqB,UAAU,CAAC;QAChC;QAEA,IAAIM,aAAa,EAAE;QACnB,IAAK,MAAMC,YAAYN,OAAQ;YAC7B,IAAIA,MAAM,CAACM,SAAS,CAACD,UAAU,EAAE;gBAC/BA,aAAaA,WAAWE,MAAM,CAACP,MAAM,CAACM,SAAS,CAACD,UAAU;YAC5D;QACF;QAEA,IAAIA,WAAWR,MAAM,EAAE;YACrB,OAAO,uCAAuCQ,WAAWG,IAAI,CAAC;QAChE;QAEA,OAAO;IACT;AACF,EAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"invariant.d.ts","sourceRoot":"","sources":["../../../src/lexical/utils/invariant.ts"],"names":[],"mappings":"AAKA,wBAAgB,SAAS,CAAC,IAAI,CAAC,EAAE,OAAO,EAAE,OAAO,CAAC,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAU3F"}
|