@payloadcms/richtext-lexical 3.0.0-beta.85 → 3.0.0-beta.87
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 +117 -127
- package/dist/cell/index.js.map +1 -1
- package/dist/exports/client/Component-DOSSWC76.js +2 -0
- package/dist/exports/client/Component-DOSSWC76.js.map +7 -0
- package/dist/exports/client/Component-MBLHTKDK.js +2 -0
- package/dist/exports/client/Component-MBLHTKDK.js.map +7 -0
- package/dist/exports/client/Field-63NGLPJB.js +2 -0
- package/dist/exports/client/Field-63NGLPJB.js.map +7 -0
- package/dist/exports/client/RelationshipComponent-3QWBV4GT.js +2 -0
- package/dist/exports/client/RelationshipComponent-3QWBV4GT.js.map +7 -0
- package/dist/exports/client/bundled.css +1 -1
- package/dist/exports/client/chunk-G5DTIOPI.js +2 -0
- package/dist/exports/client/chunk-G5DTIOPI.js.map +7 -0
- package/dist/exports/client/chunk-LGUXX2QH.js +2 -0
- package/dist/exports/client/chunk-LGUXX2QH.js.map +7 -0
- package/dist/exports/client/chunk-NI6Z4GBD.js +2 -0
- package/dist/exports/client/{chunk-SQHN3N6E.js.map → chunk-NI6Z4GBD.js.map} +2 -2
- package/dist/exports/client/chunk-OKMIHD2R.js +2 -0
- package/dist/exports/client/chunk-OKMIHD2R.js.map +7 -0
- package/dist/exports/client/chunk-TO2W7Q2G.js +2 -0
- package/dist/exports/client/chunk-TO2W7Q2G.js.map +7 -0
- package/dist/exports/client/chunk-V2LKLT2F.js +3 -0
- package/dist/exports/client/chunk-V2LKLT2F.js.map +7 -0
- package/dist/exports/client/component-3OFD6Q4Z.js +2 -0
- package/dist/exports/client/component-3OFD6Q4Z.js.map +7 -0
- package/dist/exports/client/component-LCAAX56T.js +2 -0
- package/dist/exports/client/component-LCAAX56T.js.map +7 -0
- package/dist/exports/client/component-LLWMZU6K.js +2 -0
- package/dist/exports/client/component-LLWMZU6K.js.map +7 -0
- package/dist/exports/client/componentInline-72VZAAHP.js +2 -0
- package/dist/exports/client/componentInline-72VZAAHP.js.map +7 -0
- package/dist/exports/client/index.js +9 -9
- package/dist/exports/client/index.js.map +3 -3
- package/dist/exports/server/migrate.js +0 -1
- package/dist/exports/server/migrate.js.map +1 -1
- package/dist/features/align/client/index.js +151 -134
- package/dist/features/align/client/index.js.map +1 -1
- package/dist/features/align/client/toolbarAlignGroup.d.ts.map +1 -1
- package/dist/features/align/client/toolbarAlignGroup.js +10 -9
- package/dist/features/align/client/toolbarAlignGroup.js.map +1 -1
- package/dist/features/align/server/i18n.js +192 -193
- package/dist/features/align/server/i18n.js.map +1 -1
- package/dist/features/align/server/index.js +5 -6
- package/dist/features/align/server/index.js.map +1 -1
- package/dist/features/blockquote/client/index.js +60 -65
- package/dist/features/blockquote/client/index.js.map +1 -1
- package/dist/features/blockquote/markdownTransformer.js +28 -34
- package/dist/features/blockquote/markdownTransformer.js.map +1 -1
- package/dist/features/blockquote/server/i18n.js +96 -97
- package/dist/features/blockquote/server/i18n.js.map +1 -1
- package/dist/features/blockquote/server/index.js +38 -37
- package/dist/features/blockquote/server/index.js.map +1 -1
- package/dist/features/blocks/client/component/BlockContent.d.ts.map +1 -1
- package/dist/features/blocks/client/component/BlockContent.js +166 -172
- package/dist/features/blocks/client/component/BlockContent.js.map +1 -1
- package/dist/features/blocks/client/component/FormSavePlugin.d.ts.map +1 -1
- package/dist/features/blocks/client/component/FormSavePlugin.js +46 -22
- package/dist/features/blocks/client/component/FormSavePlugin.js.map +1 -1
- package/dist/features/blocks/client/component/index.js +130 -142
- package/dist/features/blocks/client/component/index.js.map +1 -1
- package/dist/features/blocks/client/component/removeEmptyArrayValues.d.ts.map +1 -1
- package/dist/features/blocks/client/component/removeEmptyArrayValues.js +12 -8
- package/dist/features/blocks/client/component/removeEmptyArrayValues.js.map +1 -1
- package/dist/features/blocks/client/componentInline/index.js +106 -122
- package/dist/features/blocks/client/componentInline/index.js.map +1 -1
- package/dist/features/blocks/client/index.js +149 -142
- package/dist/features/blocks/client/index.js.map +1 -1
- package/dist/features/blocks/client/nodes/BlocksNode.d.ts.map +1 -1
- package/dist/features/blocks/client/nodes/BlocksNode.js +41 -40
- package/dist/features/blocks/client/nodes/BlocksNode.js.map +1 -1
- package/dist/features/blocks/client/nodes/InlineBlocksNode.d.ts.map +1 -1
- package/dist/features/blocks/client/nodes/InlineBlocksNode.js +31 -30
- package/dist/features/blocks/client/nodes/InlineBlocksNode.js.map +1 -1
- package/dist/features/blocks/client/plugin/commands.d.ts.map +1 -1
- package/dist/features/blocks/client/plugin/commands.js +2 -1
- package/dist/features/blocks/client/plugin/commands.js.map +1 -1
- package/dist/features/blocks/client/plugin/index.js +179 -106
- package/dist/features/blocks/client/plugin/index.js.map +1 -1
- package/dist/features/blocks/server/graphQLPopulationPromise.js +41 -28
- package/dist/features/blocks/server/graphQLPopulationPromise.js.map +1 -1
- package/dist/features/blocks/server/i18n.js +288 -289
- package/dist/features/blocks/server/i18n.js.map +1 -1
- package/dist/features/blocks/server/index.js +149 -151
- package/dist/features/blocks/server/index.js.map +1 -1
- package/dist/features/blocks/server/nodes/BlocksNode.js +76 -73
- package/dist/features/blocks/server/nodes/BlocksNode.js.map +1 -1
- package/dist/features/blocks/server/nodes/InlineBlocksNode.js +78 -76
- package/dist/features/blocks/server/nodes/InlineBlocksNode.js.map +1 -1
- package/dist/features/blocks/server/validate.js +45 -34
- package/dist/features/blocks/server/validate.js.map +1 -1
- package/dist/features/converters/html/converter/converters/linebreak.js +4 -7
- package/dist/features/converters/html/converter/converters/linebreak.js.map +1 -1
- package/dist/features/converters/html/converter/converters/paragraph.js +24 -19
- package/dist/features/converters/html/converter/converters/paragraph.js.map +1 -1
- package/dist/features/converters/html/converter/converters/text.js +28 -29
- package/dist/features/converters/html/converter/converters/text.js.map +1 -1
- package/dist/features/converters/html/converter/defaultConverters.js +1 -6
- package/dist/features/converters/html/converter/defaultConverters.js.map +1 -1
- package/dist/features/converters/html/converter/index.js +66 -51
- package/dist/features/converters/html/converter/index.js.map +1 -1
- package/dist/features/converters/html/converter/types.js +1 -2
- package/dist/features/converters/html/converter/types.js.map +1 -1
- package/dist/features/converters/html/field/index.js +134 -139
- package/dist/features/converters/html/field/index.js.map +1 -1
- package/dist/features/converters/html/index.js +2 -3
- package/dist/features/converters/html/index.js.map +1 -1
- package/dist/features/createClientComponent.js +7 -6
- package/dist/features/createClientComponent.js.map +1 -1
- package/dist/features/createFeaturePropComponent.js +14 -13
- package/dist/features/createFeaturePropComponent.js.map +1 -1
- package/dist/features/debug/testRecorder/client/index.js +5 -7
- package/dist/features/debug/testRecorder/client/index.js.map +1 -1
- package/dist/features/debug/testRecorder/client/plugin/index.js +518 -402
- package/dist/features/debug/testRecorder/client/plugin/index.js.map +1 -1
- package/dist/features/debug/testRecorder/server/index.js +4 -5
- package/dist/features/debug/testRecorder/server/index.js.map +1 -1
- package/dist/features/debug/treeView/client/index.js +5 -7
- package/dist/features/debug/treeView/client/index.js.map +1 -1
- package/dist/features/debug/treeView/client/plugin/index.js +21 -11
- package/dist/features/debug/treeView/client/plugin/index.js.map +1 -1
- package/dist/features/debug/treeView/server/index.js +4 -5
- package/dist/features/debug/treeView/server/index.js.map +1 -1
- package/dist/features/experimental_table/client/index.js +41 -58
- package/dist/features/experimental_table/client/index.js.map +1 -1
- package/dist/features/experimental_table/client/plugins/TableActionMenuPlugin/index.js +714 -560
- package/dist/features/experimental_table/client/plugins/TableActionMenuPlugin/index.js.map +1 -1
- package/dist/features/experimental_table/client/plugins/TableCellResizerPlugin/index.js +295 -301
- package/dist/features/experimental_table/client/plugins/TableCellResizerPlugin/index.js.map +1 -1
- package/dist/features/experimental_table/client/plugins/TableHoverActionsPlugin/index.d.ts +0 -7
- package/dist/features/experimental_table/client/plugins/TableHoverActionsPlugin/index.d.ts.map +1 -1
- package/dist/features/experimental_table/client/plugins/TableHoverActionsPlugin/index.js +228 -159
- package/dist/features/experimental_table/client/plugins/TableHoverActionsPlugin/index.js.map +1 -1
- package/dist/features/experimental_table/client/plugins/TablePlugin/index.d.ts +1 -1
- package/dist/features/experimental_table/client/plugins/TablePlugin/index.d.ts.map +1 -1
- package/dist/features/experimental_table/client/plugins/TablePlugin/index.js +129 -82
- package/dist/features/experimental_table/client/plugins/TablePlugin/index.js.map +1 -1
- package/dist/features/experimental_table/client/utils/debounce.d.ts.map +1 -1
- package/dist/features/experimental_table/client/utils/debounce.js +108 -89
- package/dist/features/experimental_table/client/utils/debounce.js.map +1 -1
- package/dist/features/experimental_table/client/utils/useDebounce.d.ts.map +1 -1
- package/dist/features/experimental_table/client/utils/useDebounce.js +11 -13
- package/dist/features/experimental_table/client/utils/useDebounce.js.map +1 -1
- package/dist/features/experimental_table/server/index.js +127 -114
- package/dist/features/experimental_table/server/index.js.map +1 -1
- package/dist/features/format/bold/feature.client.js +34 -35
- package/dist/features/format/bold/feature.client.js.map +1 -1
- package/dist/features/format/bold/feature.server.js +14 -18
- package/dist/features/format/bold/feature.server.js.map +1 -1
- package/dist/features/format/bold/markdownTransformers.js +14 -25
- package/dist/features/format/bold/markdownTransformers.js.map +1 -1
- package/dist/features/format/inlineCode/feature.client.js +26 -28
- package/dist/features/format/inlineCode/feature.client.js.map +1 -1
- package/dist/features/format/inlineCode/feature.server.js +5 -8
- package/dist/features/format/inlineCode/feature.server.js.map +1 -1
- package/dist/features/format/inlineCode/markdownTransformers.js +3 -6
- package/dist/features/format/inlineCode/markdownTransformers.js.map +1 -1
- package/dist/features/format/italic/feature.client.js +26 -29
- package/dist/features/format/italic/feature.client.js.map +1 -1
- package/dist/features/format/italic/feature.server.js +5 -9
- package/dist/features/format/italic/feature.server.js.map +1 -1
- package/dist/features/format/italic/markdownTransformers.js +7 -12
- package/dist/features/format/italic/markdownTransformers.js.map +1 -1
- package/dist/features/format/shared/toolbarFormatGroup.d.ts.map +1 -1
- package/dist/features/format/shared/toolbarFormatGroup.js +9 -8
- package/dist/features/format/shared/toolbarFormatGroup.js.map +1 -1
- package/dist/features/format/strikethrough/feature.client.js +26 -28
- package/dist/features/format/strikethrough/feature.client.js.map +1 -1
- package/dist/features/format/strikethrough/feature.server.js +5 -8
- package/dist/features/format/strikethrough/feature.server.js.map +1 -1
- package/dist/features/format/strikethrough/markdownTransformers.js +3 -6
- package/dist/features/format/strikethrough/markdownTransformers.js.map +1 -1
- package/dist/features/format/subscript/feature.client.js +25 -25
- package/dist/features/format/subscript/feature.client.js.map +1 -1
- package/dist/features/format/subscript/feature.server.js +4 -5
- package/dist/features/format/subscript/feature.server.js.map +1 -1
- package/dist/features/format/superscript/feature.client.js +25 -25
- package/dist/features/format/superscript/feature.client.js.map +1 -1
- package/dist/features/format/superscript/feature.server.js +4 -5
- package/dist/features/format/superscript/feature.server.js.map +1 -1
- package/dist/features/format/underline/feature.client.js +25 -25
- package/dist/features/format/underline/feature.client.js.map +1 -1
- package/dist/features/format/underline/feature.server.js +4 -5
- package/dist/features/format/underline/feature.server.js.map +1 -1
- package/dist/features/heading/client/index.js +86 -90
- package/dist/features/heading/client/index.js.map +1 -1
- package/dist/features/heading/markdownTransformer.js +22 -25
- package/dist/features/heading/markdownTransformer.js.map +1 -1
- package/dist/features/heading/server/i18n.js +96 -97
- package/dist/features/heading/server/i18n.js.map +1 -1
- package/dist/features/heading/server/index.js +49 -51
- package/dist/features/heading/server/index.js.map +1 -1
- package/dist/features/horizontalRule/client/component/index.js +81 -51
- package/dist/features/horizontalRule/client/component/index.js.map +1 -1
- package/dist/features/horizontalRule/client/index.js +48 -57
- package/dist/features/horizontalRule/client/index.js.map +1 -1
- package/dist/features/horizontalRule/client/markdownTransformer.js +15 -18
- package/dist/features/horizontalRule/client/markdownTransformer.js.map +1 -1
- package/dist/features/horizontalRule/client/nodes/HorizontalRuleNode.d.ts.map +1 -1
- package/dist/features/horizontalRule/client/nodes/HorizontalRuleNode.js +33 -30
- package/dist/features/horizontalRule/client/nodes/HorizontalRuleNode.js.map +1 -1
- package/dist/features/horizontalRule/client/plugin/index.js +31 -20
- package/dist/features/horizontalRule/client/plugin/index.js.map +1 -1
- package/dist/features/horizontalRule/server/i18n.js +96 -97
- package/dist/features/horizontalRule/server/i18n.js.map +1 -1
- package/dist/features/horizontalRule/server/index.js +17 -24
- package/dist/features/horizontalRule/server/index.js.map +1 -1
- package/dist/features/horizontalRule/server/markdownTransformer.js +15 -18
- package/dist/features/horizontalRule/server/markdownTransformer.js.map +1 -1
- package/dist/features/horizontalRule/server/nodes/HorizontalRuleNode.js +71 -66
- package/dist/features/horizontalRule/server/nodes/HorizontalRuleNode.js.map +1 -1
- package/dist/features/indent/client/index.js +52 -47
- package/dist/features/indent/client/index.js.map +1 -1
- package/dist/features/indent/client/toolbarIndentGroup.d.ts.map +1 -1
- package/dist/features/indent/client/toolbarIndentGroup.js +9 -8
- package/dist/features/indent/client/toolbarIndentGroup.js.map +1 -1
- package/dist/features/indent/server/i18n.js +128 -129
- package/dist/features/indent/server/i18n.js.map +1 -1
- package/dist/features/indent/server/index.js +5 -6
- package/dist/features/indent/server/index.js.map +1 -1
- package/dist/features/link/client/index.js +78 -83
- package/dist/features/link/client/index.js.map +1 -1
- package/dist/features/link/client/plugins/autoLink/index.js +267 -271
- package/dist/features/link/client/plugins/autoLink/index.js.map +1 -1
- package/dist/features/link/client/plugins/clickableLink/index.js +3 -3
- package/dist/features/link/client/plugins/clickableLink/index.js.map +1 -1
- package/dist/features/link/client/plugins/floatingLinkEditor/LinkEditor/commands.d.ts.map +1 -1
- package/dist/features/link/client/plugins/floatingLinkEditor/LinkEditor/commands.js +2 -1
- package/dist/features/link/client/plugins/floatingLinkEditor/LinkEditor/commands.js.map +1 -1
- package/dist/features/link/client/plugins/floatingLinkEditor/LinkEditor/index.js +254 -276
- package/dist/features/link/client/plugins/floatingLinkEditor/LinkEditor/index.js.map +1 -1
- package/dist/features/link/client/plugins/floatingLinkEditor/index.js +8 -6
- package/dist/features/link/client/plugins/floatingLinkEditor/index.js.map +1 -1
- package/dist/features/link/client/plugins/floatingLinkEditor/types.js +1 -2
- package/dist/features/link/client/plugins/floatingLinkEditor/types.js.map +1 -1
- package/dist/features/link/client/plugins/link/index.js +50 -41
- package/dist/features/link/client/plugins/link/index.js.map +1 -1
- package/dist/features/link/markdownTransformer.js +38 -39
- package/dist/features/link/markdownTransformer.js.map +1 -1
- package/dist/features/link/nodes/AutoLinkNode.js +57 -56
- package/dist/features/link/nodes/AutoLinkNode.js.map +1 -1
- package/dist/features/link/nodes/LinkNode.js +277 -276
- package/dist/features/link/nodes/LinkNode.js.map +1 -1
- package/dist/features/link/nodes/types.js +1 -2
- package/dist/features/link/nodes/types.js.map +1 -1
- package/dist/features/link/server/baseFields.js +118 -88
- package/dist/features/link/server/baseFields.js.map +1 -1
- package/dist/features/link/server/graphQLPopulationPromise.js +42 -28
- package/dist/features/link/server/graphQLPopulationPromise.js.map +1 -1
- package/dist/features/link/server/i18n.js +96 -97
- package/dist/features/link/server/i18n.js.map +1 -1
- package/dist/features/link/server/index.js +120 -114
- package/dist/features/link/server/index.js.map +1 -1
- package/dist/features/link/server/transformExtraFields.js +15 -15
- package/dist/features/link/server/transformExtraFields.js.map +1 -1
- package/dist/features/link/server/validate.js +37 -26
- package/dist/features/link/server/validate.js.map +1 -1
- package/dist/features/lists/checklist/client/index.js +77 -85
- package/dist/features/lists/checklist/client/index.js.map +1 -1
- package/dist/features/lists/checklist/client/plugin/index.js +3 -3
- package/dist/features/lists/checklist/client/plugin/index.js.map +1 -1
- package/dist/features/lists/checklist/markdownTransformers.js +7 -11
- package/dist/features/lists/checklist/markdownTransformers.js.map +1 -1
- package/dist/features/lists/checklist/server/i18n.js +96 -97
- package/dist/features/lists/checklist/server/i18n.js.map +1 -1
- package/dist/features/lists/checklist/server/index.js +21 -25
- package/dist/features/lists/checklist/server/index.js.map +1 -1
- package/dist/features/lists/htmlConverter.js +54 -43
- package/dist/features/lists/htmlConverter.js.map +1 -1
- package/dist/features/lists/orderedList/client/index.js +71 -77
- package/dist/features/lists/orderedList/client/index.js.map +1 -1
- package/dist/features/lists/orderedList/markdownTransformer.js +7 -11
- package/dist/features/lists/orderedList/markdownTransformer.js.map +1 -1
- package/dist/features/lists/orderedList/server/i18n.js +96 -97
- package/dist/features/lists/orderedList/server/i18n.js.map +1 -1
- package/dist/features/lists/orderedList/server/index.js +21 -25
- package/dist/features/lists/orderedList/server/index.js.map +1 -1
- package/dist/features/lists/plugin/index.js +3 -3
- package/dist/features/lists/plugin/index.js.map +1 -1
- package/dist/features/lists/shared/markdown.js +48 -49
- package/dist/features/lists/shared/markdown.js.map +1 -1
- package/dist/features/lists/shared/slashMenuListGroup.js +9 -8
- package/dist/features/lists/shared/slashMenuListGroup.js.map +1 -1
- package/dist/features/lists/unorderedList/client/index.js +68 -76
- package/dist/features/lists/unorderedList/client/index.js.map +1 -1
- package/dist/features/lists/unorderedList/markdownTransformer.js +7 -11
- package/dist/features/lists/unorderedList/markdownTransformer.js.map +1 -1
- package/dist/features/lists/unorderedList/server/i18n.js +96 -97
- package/dist/features/lists/unorderedList/server/i18n.js.map +1 -1
- package/dist/features/lists/unorderedList/server/index.js +17 -23
- package/dist/features/lists/unorderedList/server/index.js.map +1 -1
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/heading/converter.js +18 -17
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/heading/converter.js.map +1 -1
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/link/converter.js +30 -29
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/link/converter.js.map +1 -1
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/list/converter.js +21 -20
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/list/converter.js.map +1 -1
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/listItem/converter.js +21 -19
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/listItem/converter.js.map +1 -1
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/quote/converter.js +18 -17
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/quote/converter.js.map +1 -1
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/unknown/converter.js +24 -23
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/unknown/converter.js.map +1 -1
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/upload/converter.js +20 -21
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/upload/converter.js.map +1 -1
- package/dist/features/migrations/lexicalPluginToLexical/converter/defaultConverters.js +1 -10
- package/dist/features/migrations/lexicalPluginToLexical/converter/defaultConverters.js.map +1 -1
- package/dist/features/migrations/lexicalPluginToLexical/converter/index.js +69 -61
- package/dist/features/migrations/lexicalPluginToLexical/converter/index.js.map +1 -1
- package/dist/features/migrations/lexicalPluginToLexical/converter/types.js +1 -2
- package/dist/features/migrations/lexicalPluginToLexical/converter/types.js.map +1 -1
- package/dist/features/migrations/lexicalPluginToLexical/feature.client.js +5 -7
- package/dist/features/migrations/lexicalPluginToLexical/feature.client.js.map +1 -1
- package/dist/features/migrations/lexicalPluginToLexical/feature.server.js +42 -43
- package/dist/features/migrations/lexicalPluginToLexical/feature.server.js.map +1 -1
- package/dist/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/Component.d.ts.map +1 -1
- package/dist/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/Component.js +11 -11
- package/dist/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/Component.js.map +1 -1
- package/dist/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/index.js +64 -59
- package/dist/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/index.js.map +1 -1
- package/dist/features/migrations/slateToLexical/converter/converters/blockquote/converter.js +19 -19
- package/dist/features/migrations/slateToLexical/converter/converters/blockquote/converter.js.map +1 -1
- package/dist/features/migrations/slateToLexical/converter/converters/heading/converter.js +20 -25
- package/dist/features/migrations/slateToLexical/converter/converters/heading/converter.js.map +1 -1
- package/dist/features/migrations/slateToLexical/converter/converters/indent/converter.js +28 -30
- package/dist/features/migrations/slateToLexical/converter/converters/indent/converter.js.map +1 -1
- package/dist/features/migrations/slateToLexical/converter/converters/link/converter.js +26 -26
- package/dist/features/migrations/slateToLexical/converter/converters/link/converter.js.map +1 -1
- package/dist/features/migrations/slateToLexical/converter/converters/listItem/converter.js +22 -21
- package/dist/features/migrations/slateToLexical/converter/converters/listItem/converter.js.map +1 -1
- package/dist/features/migrations/slateToLexical/converter/converters/orderedList/converter.js +22 -22
- package/dist/features/migrations/slateToLexical/converter/converters/orderedList/converter.js.map +1 -1
- package/dist/features/migrations/slateToLexical/converter/converters/relationship/converter.js +12 -13
- package/dist/features/migrations/slateToLexical/converter/converters/relationship/converter.js.map +1 -1
- package/dist/features/migrations/slateToLexical/converter/converters/unknown/converter.js +23 -23
- package/dist/features/migrations/slateToLexical/converter/converters/unknown/converter.js.map +1 -1
- package/dist/features/migrations/slateToLexical/converter/converters/unorderedList/converter.js +22 -22
- package/dist/features/migrations/slateToLexical/converter/converters/unorderedList/converter.js.map +1 -1
- package/dist/features/migrations/slateToLexical/converter/converters/upload/converter.js +15 -16
- package/dist/features/migrations/slateToLexical/converter/converters/upload/converter.js.map +1 -1
- package/dist/features/migrations/slateToLexical/converter/defaultConverters.js +1 -13
- package/dist/features/migrations/slateToLexical/converter/defaultConverters.js.map +1 -1
- package/dist/features/migrations/slateToLexical/converter/index.js +105 -98
- package/dist/features/migrations/slateToLexical/converter/index.js.map +1 -1
- package/dist/features/migrations/slateToLexical/converter/types.js +1 -2
- package/dist/features/migrations/slateToLexical/converter/types.js.map +1 -1
- package/dist/features/migrations/slateToLexical/feature.client.js +7 -7
- package/dist/features/migrations/slateToLexical/feature.client.js.map +1 -1
- package/dist/features/migrations/slateToLexical/feature.server.js +43 -44
- package/dist/features/migrations/slateToLexical/feature.server.js.map +1 -1
- package/dist/features/migrations/slateToLexical/nodes/unknownConvertedNode/Component.d.ts.map +1 -1
- package/dist/features/migrations/slateToLexical/nodes/unknownConvertedNode/Component.js +11 -11
- package/dist/features/migrations/slateToLexical/nodes/unknownConvertedNode/Component.js.map +1 -1
- package/dist/features/migrations/slateToLexical/nodes/unknownConvertedNode/index.js +64 -59
- package/dist/features/migrations/slateToLexical/nodes/unknownConvertedNode/index.js.map +1 -1
- package/dist/features/paragraph/client/index.js +58 -61
- package/dist/features/paragraph/client/index.js.map +1 -1
- package/dist/features/paragraph/server/i18n.js +128 -129
- package/dist/features/paragraph/server/i18n.js.map +1 -1
- package/dist/features/paragraph/server/index.js +6 -7
- package/dist/features/paragraph/server/index.js.map +1 -1
- package/dist/features/relationship/client/components/RelationshipComponent.js +141 -149
- package/dist/features/relationship/client/components/RelationshipComponent.js.map +1 -1
- package/dist/features/relationship/client/drawer/commands.js +0 -1
- package/dist/features/relationship/client/drawer/commands.js.map +1 -1
- package/dist/features/relationship/client/drawer/index.js +138 -67
- package/dist/features/relationship/client/drawer/index.js.map +1 -1
- package/dist/features/relationship/client/index.js +53 -59
- package/dist/features/relationship/client/index.js.map +1 -1
- package/dist/features/relationship/client/nodes/RelationshipNode.d.ts.map +1 -1
- package/dist/features/relationship/client/nodes/RelationshipNode.js +60 -59
- package/dist/features/relationship/client/nodes/RelationshipNode.js.map +1 -1
- package/dist/features/relationship/client/plugins/index.js +90 -35
- package/dist/features/relationship/client/plugins/index.js.map +1 -1
- package/dist/features/relationship/client/utils/EnabledRelationshipsCondition.d.ts.map +1 -1
- package/dist/features/relationship/client/utils/EnabledRelationshipsCondition.js +97 -26
- package/dist/features/relationship/client/utils/EnabledRelationshipsCondition.js.map +1 -1
- package/dist/features/relationship/server/graphQLPopulationPromise.js +34 -26
- package/dist/features/relationship/server/graphQLPopulationPromise.js.map +1 -1
- package/dist/features/relationship/server/i18n.js +96 -97
- package/dist/features/relationship/server/i18n.js.map +1 -1
- package/dist/features/relationship/server/index.js +48 -44
- package/dist/features/relationship/server/index.js.map +1 -1
- package/dist/features/relationship/server/nodes/RelationshipNode.js +90 -87
- package/dist/features/relationship/server/nodes/RelationshipNode.js.map +1 -1
- package/dist/features/shared/slashMenu/basicGroup.js +9 -8
- package/dist/features/shared/slashMenu/basicGroup.js.map +1 -1
- package/dist/features/shared/toolbar/addDropdownGroup.js +8 -9
- package/dist/features/shared/toolbar/addDropdownGroup.js.map +1 -1
- package/dist/features/shared/toolbar/featureButtonsGroup.js +7 -8
- package/dist/features/shared/toolbar/featureButtonsGroup.js.map +1 -1
- package/dist/features/shared/toolbar/textDropdownGroup.js +8 -9
- package/dist/features/shared/toolbar/textDropdownGroup.js.map +1 -1
- package/dist/features/toolbars/fixed/client/Toolbar/index.js +264 -187
- package/dist/features/toolbars/fixed/client/Toolbar/index.js.map +1 -1
- package/dist/features/toolbars/fixed/client/index.js +5 -7
- package/dist/features/toolbars/fixed/client/index.js.map +1 -1
- package/dist/features/toolbars/fixed/server/index.js +14 -13
- package/dist/features/toolbars/fixed/server/index.js.map +1 -1
- package/dist/features/toolbars/inline/client/Toolbar/index.js +374 -286
- package/dist/features/toolbars/inline/client/Toolbar/index.js.map +1 -1
- package/dist/features/toolbars/inline/client/index.js +5 -7
- package/dist/features/toolbars/inline/client/index.js.map +1 -1
- package/dist/features/toolbars/inline/server/index.js +4 -5
- package/dist/features/toolbars/inline/server/index.js.map +1 -1
- package/dist/features/toolbars/shared/ToolbarButton/index.d.ts +1 -1
- package/dist/features/toolbars/shared/ToolbarButton/index.d.ts.map +1 -1
- package/dist/features/toolbars/shared/ToolbarButton/index.js +75 -97
- package/dist/features/toolbars/shared/ToolbarButton/index.js.map +1 -1
- package/dist/features/toolbars/shared/ToolbarDropdown/DropDown.js +190 -211
- package/dist/features/toolbars/shared/ToolbarDropdown/DropDown.js.map +1 -1
- package/dist/features/toolbars/shared/ToolbarDropdown/index.d.ts +1 -1
- package/dist/features/toolbars/shared/ToolbarDropdown/index.d.ts.map +1 -1
- package/dist/features/toolbars/shared/ToolbarDropdown/index.js +289 -124
- package/dist/features/toolbars/shared/ToolbarDropdown/index.js.map +1 -1
- package/dist/features/toolbars/types.js +1 -2
- package/dist/features/toolbars/types.js.map +1 -1
- package/dist/features/typeUtilities.js +2 -3
- package/dist/features/typeUtilities.js.map +1 -1
- package/dist/features/typesClient.js +1 -2
- package/dist/features/typesClient.js.map +1 -1
- package/dist/features/typesServer.js +1 -2
- package/dist/features/typesServer.js.map +1 -1
- package/dist/features/upload/client/component/index.js +208 -224
- package/dist/features/upload/client/component/index.js.map +1 -1
- package/dist/features/upload/client/drawer/commands.js +1 -1
- package/dist/features/upload/client/drawer/commands.js.map +1 -1
- package/dist/features/upload/client/drawer/index.js +107 -58
- package/dist/features/upload/client/drawer/index.js.map +1 -1
- package/dist/features/upload/client/feature.client.js +51 -61
- package/dist/features/upload/client/feature.client.js.map +1 -1
- package/dist/features/upload/client/nodes/UploadNode.d.ts.map +1 -1
- package/dist/features/upload/client/nodes/UploadNode.js +76 -73
- package/dist/features/upload/client/nodes/UploadNode.js.map +1 -1
- package/dist/features/upload/client/plugin/index.js +67 -39
- package/dist/features/upload/client/plugin/index.js.map +1 -1
- package/dist/features/upload/server/feature.server.js +190 -171
- package/dist/features/upload/server/feature.server.js.map +1 -1
- package/dist/features/upload/server/graphQLPopulationPromise.js +60 -47
- package/dist/features/upload/server/graphQLPopulationPromise.js.map +1 -1
- package/dist/features/upload/server/i18n.js +96 -97
- package/dist/features/upload/server/i18n.js.map +1 -1
- package/dist/features/upload/server/nodes/UploadNode.js +113 -108
- package/dist/features/upload/server/nodes/UploadNode.js.map +1 -1
- package/dist/features/upload/server/validate.js +53 -40
- package/dist/features/upload/server/validate.js.map +1 -1
- package/dist/field/Field.d.ts.map +1 -1
- package/dist/field/Field.js +127 -105
- package/dist/field/Field.js.map +1 -1
- package/dist/field/bundled.css +1 -0
- package/dist/field/index.js +92 -36
- package/dist/field/index.js.map +1 -1
- package/dist/i18n.js +160 -161
- package/dist/i18n.js.map +1 -1
- package/dist/index.js +670 -623
- package/dist/index.js.map +1 -1
- package/dist/lexical/EditorPlugin.d.ts.map +1 -1
- package/dist/lexical/EditorPlugin.js +15 -10
- package/dist/lexical/EditorPlugin.js.map +1 -1
- package/dist/lexical/LexicalEditor.js +206 -161
- package/dist/lexical/LexicalEditor.js.map +1 -1
- package/dist/lexical/LexicalProvider.js +83 -82
- package/dist/lexical/LexicalProvider.js.map +1 -1
- package/dist/lexical/config/client/EditorConfigProvider.js +76 -79
- package/dist/lexical/config/client/EditorConfigProvider.js.map +1 -1
- package/dist/lexical/config/client/default.js +3 -3
- package/dist/lexical/config/client/default.js.map +1 -1
- package/dist/lexical/config/client/loader.js +42 -39
- package/dist/lexical/config/client/loader.js.map +1 -1
- package/dist/lexical/config/client/sanitize.js +165 -165
- package/dist/lexical/config/client/sanitize.js.map +1 -1
- package/dist/lexical/config/server/default.js +5 -27
- package/dist/lexical/config/server/default.js.map +1 -1
- package/dist/lexical/config/server/loader.js +103 -103
- package/dist/lexical/config/server/loader.js.map +1 -1
- package/dist/lexical/config/server/sanitize.js +98 -99
- package/dist/lexical/config/server/sanitize.js.map +1 -1
- package/dist/lexical/config/types.js +1 -2
- package/dist/lexical/config/types.js.map +1 -1
- package/dist/lexical/nodes/index.js +9 -8
- package/dist/lexical/nodes/index.js.map +1 -1
- package/dist/lexical/plugins/MarkdownShortcut/index.js +17 -5
- package/dist/lexical/plugins/MarkdownShortcut/index.js.map +1 -1
- package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/LexicalMenu.js +384 -361
- package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/LexicalMenu.js.map +1 -1
- package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/index.js +223 -160
- package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/index.js.map +1 -1
- package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/types.js +1 -2
- package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/types.js.map +1 -1
- package/dist/lexical/plugins/SlashMenu/index.js +191 -179
- package/dist/lexical/plugins/SlashMenu/index.js.map +1 -1
- package/dist/lexical/plugins/SlashMenu/useMenuTriggerMatch.d.ts.map +1 -1
- package/dist/lexical/plugins/SlashMenu/useMenuTriggerMatch.js +41 -26
- package/dist/lexical/plugins/SlashMenu/useMenuTriggerMatch.js.map +1 -1
- package/dist/lexical/plugins/handles/AddBlockHandlePlugin/index.js +164 -129
- package/dist/lexical/plugins/handles/AddBlockHandlePlugin/index.js.map +1 -1
- package/dist/lexical/plugins/handles/DraggableBlockPlugin/debounce.d.ts.map +1 -1
- package/dist/lexical/plugins/handles/DraggableBlockPlugin/debounce.js +11 -10
- package/dist/lexical/plugins/handles/DraggableBlockPlugin/debounce.js.map +1 -1
- package/dist/lexical/plugins/handles/DraggableBlockPlugin/getBoundingRectWithoutTransform.d.ts.map +1 -1
- package/dist/lexical/plugins/handles/DraggableBlockPlugin/getBoundingRectWithoutTransform.js +11 -10
- package/dist/lexical/plugins/handles/DraggableBlockPlugin/getBoundingRectWithoutTransform.js.map +1 -1
- package/dist/lexical/plugins/handles/DraggableBlockPlugin/highlightElemOriginalPosition.d.ts.map +1 -1
- package/dist/lexical/plugins/handles/DraggableBlockPlugin/highlightElemOriginalPosition.js +27 -23
- package/dist/lexical/plugins/handles/DraggableBlockPlugin/highlightElemOriginalPosition.js.map +1 -1
- package/dist/lexical/plugins/handles/DraggableBlockPlugin/index.js +331 -300
- package/dist/lexical/plugins/handles/DraggableBlockPlugin/index.js.map +1 -1
- package/dist/lexical/plugins/handles/DraggableBlockPlugin/setTargetLine.js +110 -97
- package/dist/lexical/plugins/handles/DraggableBlockPlugin/setTargetLine.js.map +1 -1
- package/dist/lexical/plugins/handles/utils/calculateDistanceFromScrollerElem.d.ts.map +1 -1
- package/dist/lexical/plugins/handles/utils/calculateDistanceFromScrollerElem.js +23 -16
- package/dist/lexical/plugins/handles/utils/calculateDistanceFromScrollerElem.js.map +1 -1
- package/dist/lexical/plugins/handles/utils/doesLineHeightAffectElement.d.ts.map +1 -1
- package/dist/lexical/plugins/handles/utils/doesLineHeightAffectElement.js +18 -27
- package/dist/lexical/plugins/handles/utils/doesLineHeightAffectElement.js.map +1 -1
- package/dist/lexical/plugins/handles/utils/getCollapsedMargins.d.ts.map +1 -1
- package/dist/lexical/plugins/handles/utils/getCollapsedMargins.js +15 -11
- package/dist/lexical/plugins/handles/utils/getCollapsedMargins.js.map +1 -1
- package/dist/lexical/plugins/handles/utils/getNodeCloseToPoint.d.ts.map +1 -1
- package/dist/lexical/plugins/handles/utils/getNodeCloseToPoint.js +133 -118
- package/dist/lexical/plugins/handles/utils/getNodeCloseToPoint.js.map +1 -1
- package/dist/lexical/plugins/handles/utils/getTopLevelNodeKeys.d.ts.map +1 -1
- package/dist/lexical/plugins/handles/utils/getTopLevelNodeKeys.js +3 -2
- package/dist/lexical/plugins/handles/utils/getTopLevelNodeKeys.js.map +1 -1
- package/dist/lexical/plugins/handles/utils/isOnHandleElement.d.ts.map +1 -1
- package/dist/lexical/plugins/handles/utils/isOnHandleElement.js +3 -2
- package/dist/lexical/plugins/handles/utils/isOnHandleElement.js.map +1 -1
- package/dist/lexical/plugins/handles/utils/setHandlePosition.d.ts.map +1 -1
- package/dist/lexical/plugins/handles/utils/setHandlePosition.js +26 -25
- package/dist/lexical/plugins/handles/utils/setHandlePosition.js.map +1 -1
- package/dist/lexical/theme/EditorTheme.d.ts.map +1 -1
- package/dist/lexical/theme/EditorTheme.js +97 -102
- package/dist/lexical/theme/EditorTheme.js.map +1 -1
- package/dist/lexical/ui/ContentEditable.d.ts.map +1 -1
- package/dist/lexical/ui/ContentEditable.js +27 -10
- package/dist/lexical/ui/ContentEditable.js.map +1 -1
- package/dist/lexical/ui/icons/AI/index.d.ts.map +1 -1
- package/dist/lexical/ui/icons/AI/index.js +31 -33
- package/dist/lexical/ui/icons/AI/index.js.map +1 -1
- package/dist/lexical/ui/icons/Add/index.d.ts.map +1 -1
- package/dist/lexical/ui/icons/Add/index.js +16 -18
- package/dist/lexical/ui/icons/Add/index.js.map +1 -1
- package/dist/lexical/ui/icons/AlignCenter/index.d.ts.map +1 -1
- package/dist/lexical/ui/icons/AlignCenter/index.js +25 -28
- package/dist/lexical/ui/icons/AlignCenter/index.js.map +1 -1
- package/dist/lexical/ui/icons/AlignJustify/index.d.ts.map +1 -1
- package/dist/lexical/ui/icons/AlignJustify/index.js +25 -28
- package/dist/lexical/ui/icons/AlignJustify/index.js.map +1 -1
- package/dist/lexical/ui/icons/AlignLeft/index.d.ts.map +1 -1
- package/dist/lexical/ui/icons/AlignLeft/index.js +25 -28
- package/dist/lexical/ui/icons/AlignLeft/index.js.map +1 -1
- package/dist/lexical/ui/icons/AlignRight/index.d.ts.map +1 -1
- package/dist/lexical/ui/icons/AlignRight/index.js +25 -28
- package/dist/lexical/ui/icons/AlignRight/index.js.map +1 -1
- package/dist/lexical/ui/icons/Block/index.d.ts.map +1 -1
- package/dist/lexical/ui/icons/Block/index.js +34 -37
- package/dist/lexical/ui/icons/Block/index.js.map +1 -1
- package/dist/lexical/ui/icons/Blockquote/index.d.ts.map +1 -1
- package/dist/lexical/ui/icons/Blockquote/index.js +16 -15
- package/dist/lexical/ui/icons/Blockquote/index.js.map +1 -1
- package/dist/lexical/ui/icons/Bold/index.d.ts.map +1 -1
- package/dist/lexical/ui/icons/Bold/index.js +16 -15
- package/dist/lexical/ui/icons/Bold/index.js.map +1 -1
- package/dist/lexical/ui/icons/Checklist/index.d.ts.map +1 -1
- package/dist/lexical/ui/icons/Checklist/index.js +24 -26
- package/dist/lexical/ui/icons/Checklist/index.js.map +1 -1
- package/dist/lexical/ui/icons/Code/index.d.ts.map +1 -1
- package/dist/lexical/ui/icons/Code/index.js +19 -21
- package/dist/lexical/ui/icons/Code/index.js.map +1 -1
- package/dist/lexical/ui/icons/CodeBlock/index.d.ts.map +1 -1
- package/dist/lexical/ui/icons/CodeBlock/index.js +19 -21
- package/dist/lexical/ui/icons/CodeBlock/index.js.map +1 -1
- package/dist/lexical/ui/icons/H1/index.d.ts.map +1 -1
- package/dist/lexical/ui/icons/H1/index.js +16 -15
- package/dist/lexical/ui/icons/H1/index.js.map +1 -1
- package/dist/lexical/ui/icons/H2/index.d.ts.map +1 -1
- package/dist/lexical/ui/icons/H2/index.js +16 -15
- package/dist/lexical/ui/icons/H2/index.js.map +1 -1
- package/dist/lexical/ui/icons/H3/index.d.ts.map +1 -1
- package/dist/lexical/ui/icons/H3/index.js +16 -15
- package/dist/lexical/ui/icons/H3/index.js.map +1 -1
- package/dist/lexical/ui/icons/H4/index.d.ts.map +1 -1
- package/dist/lexical/ui/icons/H4/index.js +16 -15
- package/dist/lexical/ui/icons/H4/index.js.map +1 -1
- package/dist/lexical/ui/icons/H5/index.d.ts.map +1 -1
- package/dist/lexical/ui/icons/H5/index.js +16 -15
- package/dist/lexical/ui/icons/H5/index.js.map +1 -1
- package/dist/lexical/ui/icons/H6/index.d.ts.map +1 -1
- package/dist/lexical/ui/icons/H6/index.js +16 -15
- package/dist/lexical/ui/icons/H6/index.js.map +1 -1
- package/dist/lexical/ui/icons/HorizontalRule/index.d.ts.map +1 -1
- package/dist/lexical/ui/icons/HorizontalRule/index.js +19 -18
- package/dist/lexical/ui/icons/HorizontalRule/index.js.map +1 -1
- package/dist/lexical/ui/icons/IndentDecrease/index.d.ts.map +1 -1
- package/dist/lexical/ui/icons/IndentDecrease/index.js +28 -32
- package/dist/lexical/ui/icons/IndentDecrease/index.js.map +1 -1
- package/dist/lexical/ui/icons/IndentIncrease/index.d.ts.map +1 -1
- package/dist/lexical/ui/icons/IndentIncrease/index.js +28 -32
- package/dist/lexical/ui/icons/IndentIncrease/index.js.map +1 -1
- package/dist/lexical/ui/icons/InlineBlocks/index.d.ts.map +1 -1
- package/dist/lexical/ui/icons/InlineBlocks/index.js +18 -17
- package/dist/lexical/ui/icons/InlineBlocks/index.js.map +1 -1
- package/dist/lexical/ui/icons/Italic/index.d.ts.map +1 -1
- package/dist/lexical/ui/icons/Italic/index.js +16 -15
- package/dist/lexical/ui/icons/Italic/index.js.map +1 -1
- package/dist/lexical/ui/icons/Link/index.d.ts.map +1 -1
- package/dist/lexical/ui/icons/Link/index.js +17 -16
- package/dist/lexical/ui/icons/Link/index.js.map +1 -1
- package/dist/lexical/ui/icons/Meatballs/index.d.ts.map +1 -1
- package/dist/lexical/ui/icons/Meatballs/index.js +19 -22
- package/dist/lexical/ui/icons/Meatballs/index.js.map +1 -1
- package/dist/lexical/ui/icons/OrderedList/index.d.ts.map +1 -1
- package/dist/lexical/ui/icons/OrderedList/index.js +31 -36
- package/dist/lexical/ui/icons/OrderedList/index.js.map +1 -1
- package/dist/lexical/ui/icons/Relationship/index.d.ts.map +1 -1
- package/dist/lexical/ui/icons/Relationship/index.js +31 -33
- package/dist/lexical/ui/icons/Relationship/index.js.map +1 -1
- package/dist/lexical/ui/icons/Strikethrough/index.d.ts.map +1 -1
- package/dist/lexical/ui/icons/Strikethrough/index.js +19 -21
- package/dist/lexical/ui/icons/Strikethrough/index.js.map +1 -1
- package/dist/lexical/ui/icons/Subscript/index.d.ts.map +1 -1
- package/dist/lexical/ui/icons/Subscript/index.js +16 -15
- package/dist/lexical/ui/icons/Subscript/index.js.map +1 -1
- package/dist/lexical/ui/icons/Superscript/index.d.ts.map +1 -1
- package/dist/lexical/ui/icons/Superscript/index.js +16 -15
- package/dist/lexical/ui/icons/Superscript/index.js.map +1 -1
- package/dist/lexical/ui/icons/Table/index.d.ts.map +1 -1
- package/dist/lexical/ui/icons/Table/index.js +17 -16
- package/dist/lexical/ui/icons/Table/index.js.map +1 -1
- package/dist/lexical/ui/icons/Text/index.d.ts.map +1 -1
- package/dist/lexical/ui/icons/Text/index.js +16 -15
- package/dist/lexical/ui/icons/Text/index.js.map +1 -1
- package/dist/lexical/ui/icons/Underline/index.d.ts.map +1 -1
- package/dist/lexical/ui/icons/Underline/index.js +19 -21
- package/dist/lexical/ui/icons/Underline/index.js.map +1 -1
- package/dist/lexical/ui/icons/UnorderedList/index.d.ts.map +1 -1
- package/dist/lexical/ui/icons/UnorderedList/index.js +46 -52
- package/dist/lexical/ui/icons/UnorderedList/index.js.map +1 -1
- package/dist/lexical/ui/icons/Upload/index.d.ts.map +1 -1
- package/dist/lexical/ui/icons/Upload/index.js +28 -31
- package/dist/lexical/ui/icons/Upload/index.js.map +1 -1
- package/dist/lexical/utils/canUseDOM.d.ts.map +1 -1
- package/dist/lexical/utils/canUseDOM.js +2 -1
- package/dist/lexical/utils/canUseDOM.js.map +1 -1
- package/dist/lexical/utils/environment.d.ts.map +1 -1
- package/dist/lexical/utils/environment.js +2 -1
- package/dist/lexical/utils/environment.js.map +1 -1
- package/dist/lexical/utils/getDOMRangeRect.d.ts.map +1 -1
- package/dist/lexical/utils/getDOMRangeRect.js +13 -12
- package/dist/lexical/utils/getDOMRangeRect.js.map +1 -1
- package/dist/lexical/utils/getSelectedNode.d.ts.map +1 -1
- package/dist/lexical/utils/getSelectedNode.js +18 -13
- package/dist/lexical/utils/getSelectedNode.js.map +1 -1
- package/dist/lexical/utils/guard.d.ts.map +1 -1
- package/dist/lexical/utils/guard.js +3 -2
- package/dist/lexical/utils/guard.js.map +1 -1
- package/dist/lexical/utils/joinClasses.d.ts.map +1 -1
- package/dist/lexical/utils/joinClasses.js +3 -2
- package/dist/lexical/utils/joinClasses.js.map +1 -1
- package/dist/lexical/utils/markdown/createBlockNode.js +9 -10
- package/dist/lexical/utils/markdown/createBlockNode.js.map +1 -1
- package/dist/lexical/utils/nodeFormat.js +58 -59
- package/dist/lexical/utils/nodeFormat.js.map +1 -1
- package/dist/lexical/utils/point.d.ts.map +1 -1
- package/dist/lexical/utils/point.js +40 -32
- package/dist/lexical/utils/point.js.map +1 -1
- package/dist/lexical/utils/rect.d.ts.map +1 -1
- package/dist/lexical/utils/rect.js +167 -134
- package/dist/lexical/utils/rect.js.map +1 -1
- package/dist/lexical/utils/setFloatingElemPosition.d.ts.map +1 -1
- package/dist/lexical/utils/setFloatingElemPosition.js +56 -45
- package/dist/lexical/utils/setFloatingElemPosition.js.map +1 -1
- package/dist/lexical/utils/setFloatingElemPositionForLinkEditor.d.ts.map +1 -1
- package/dist/lexical/utils/setFloatingElemPositionForLinkEditor.js +23 -22
- package/dist/lexical/utils/setFloatingElemPositionForLinkEditor.js.map +1 -1
- package/dist/lexical/utils/swipe.d.ts.map +1 -1
- package/dist/lexical/utils/swipe.js +82 -83
- package/dist/lexical/utils/swipe.js.map +1 -1
- package/dist/lexical/utils/url.js +23 -22
- package/dist/lexical/utils/url.js.map +1 -1
- package/dist/nodeTypes.js +1 -2
- package/dist/nodeTypes.js.map +1 -1
- package/dist/populateGraphQL/defaultValue.js +24 -29
- package/dist/populateGraphQL/defaultValue.js.map +1 -1
- package/dist/populateGraphQL/populate.js +35 -25
- package/dist/populateGraphQL/populate.js.map +1 -1
- package/dist/populateGraphQL/populateLexicalPopulationPromises.js +47 -32
- package/dist/populateGraphQL/populateLexicalPopulationPromises.js.map +1 -1
- package/dist/populateGraphQL/recursivelyPopulateFieldsForGraphQL.js +39 -25
- package/dist/populateGraphQL/recursivelyPopulateFieldsForGraphQL.js.map +1 -1
- package/dist/types.js +1 -2
- package/dist/types.js.map +1 -1
- package/dist/utilities/createClientFeature.js +40 -36
- package/dist/utilities/createClientFeature.js.map +1 -1
- package/dist/utilities/createServerFeature.js +46 -35
- package/dist/utilities/createServerFeature.js.map +1 -1
- package/dist/utilities/fieldsDrawer/Drawer.js +28 -17
- package/dist/utilities/fieldsDrawer/Drawer.js.map +1 -1
- package/dist/utilities/fieldsDrawer/DrawerContent.js +149 -78
- package/dist/utilities/fieldsDrawer/DrawerContent.js.map +1 -1
- package/dist/utilities/forEachNodeRecursively.js +24 -19
- package/dist/utilities/forEachNodeRecursively.js.map +1 -1
- package/dist/utilities/generateComponentMap.d.ts.map +1 -1
- package/dist/utilities/generateComponentMap.js +92 -82
- package/dist/utilities/generateComponentMap.js.map +1 -1
- package/dist/utilities/generateImportMap.js +53 -47
- package/dist/utilities/generateImportMap.js.map +1 -1
- package/dist/utilities/generateSchemaMap.js +35 -30
- package/dist/utilities/generateSchemaMap.js.map +1 -1
- package/dist/utilities/migrateSlateToLexical/index.js +99 -86
- package/dist/utilities/migrateSlateToLexical/index.js.map +1 -1
- package/dist/utilities/migrateSlateToLexical/migrateDocumentFieldsRecursively.js +73 -66
- package/dist/utilities/migrateSlateToLexical/migrateDocumentFieldsRecursively.js.map +1 -1
- package/dist/utilities/recurseNodeTree.js +25 -22
- package/dist/utilities/recurseNodeTree.js.map +1 -1
- package/dist/utilities/upgradeLexicalData/index.js +99 -86
- package/dist/utilities/upgradeLexicalData/index.js.map +1 -1
- package/dist/utilities/upgradeLexicalData/upgradeDocumentFieldsRecursively.js +71 -66
- package/dist/utilities/upgradeLexicalData/upgradeDocumentFieldsRecursively.js.map +1 -1
- package/dist/utilities/useLexicalFeature.js +9 -8
- package/dist/utilities/useLexicalFeature.js.map +1 -1
- package/dist/validate/index.js +32 -26
- package/dist/validate/index.js.map +1 -1
- package/dist/validate/validateNodes.js +31 -28
- package/dist/validate/validateNodes.js.map +1 -1
- package/package.json +22 -11
- package/dist/exports/client/Component-7HS6FEJS.js +0 -2
- package/dist/exports/client/Component-7HS6FEJS.js.map +0 -7
- package/dist/exports/client/Component-LAKSCIDX.js +0 -2
- package/dist/exports/client/Component-LAKSCIDX.js.map +0 -7
- package/dist/exports/client/Field-BYB3WX7J.js +0 -2
- package/dist/exports/client/Field-BYB3WX7J.js.map +0 -7
- package/dist/exports/client/RelationshipComponent-GYUTPDNG.js +0 -2
- package/dist/exports/client/RelationshipComponent-GYUTPDNG.js.map +0 -7
- package/dist/exports/client/chunk-4EX7W4UX.js +0 -2
- package/dist/exports/client/chunk-4EX7W4UX.js.map +0 -7
- package/dist/exports/client/chunk-E4HH5PS6.js +0 -2
- package/dist/exports/client/chunk-E4HH5PS6.js.map +0 -7
- package/dist/exports/client/chunk-EBB2CEB6.js +0 -2
- package/dist/exports/client/chunk-EBB2CEB6.js.map +0 -7
- package/dist/exports/client/chunk-LTR7V74A.js +0 -2
- package/dist/exports/client/chunk-LTR7V74A.js.map +0 -7
- package/dist/exports/client/chunk-SQHN3N6E.js +0 -2
- package/dist/exports/client/chunk-VMCQSR3T.js +0 -3
- package/dist/exports/client/chunk-VMCQSR3T.js.map +0 -7
- package/dist/exports/client/component-6C5JERGA.js +0 -2
- package/dist/exports/client/component-6C5JERGA.js.map +0 -7
- package/dist/exports/client/component-GUWIGB77.js +0 -2
- package/dist/exports/client/component-GUWIGB77.js.map +0 -7
- package/dist/exports/client/component-UQ2BKD5X.js +0 -2
- package/dist/exports/client/component-UQ2BKD5X.js.map +0 -7
- package/dist/exports/client/componentInline-C2XIK5VZ.js +0 -2
- package/dist/exports/client/componentInline-C2XIK5VZ.js.map +0 -7
- package/dist/features/experimental_table/plugins/TableHoverActionsPlugin/index.d.ts +0 -12
- package/dist/features/experimental_table/plugins/TableHoverActionsPlugin/index.d.ts.map +0 -1
- package/dist/features/experimental_table/plugins/TableHoverActionsPlugin/index.js +0 -181
- package/dist/features/experimental_table/plugins/TableHoverActionsPlugin/index.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/utilities/fieldsDrawer/DrawerContent.tsx"],"sourcesContent":["'use client'\nimport type { FormProps } from '@payloadcms/ui'\nimport type { ClientField, FormState } from 'payload'\n\nimport {\n Form,\n FormSubmit,\n RenderFields,\n useConfig,\n useDocumentInfo,\n useFieldProps,\n useTranslation,\n} from '@payloadcms/ui'\nimport { getFormState } from '@payloadcms/ui/shared'\nimport React, { useCallback, useEffect, useState } from 'react'\nimport { v4 as uuid } from 'uuid'\n\nimport type { FieldsDrawerProps } from './Drawer.js'\n\nimport { useEditorConfigContext } from '../../lexical/config/client/EditorConfigProvider.js'\n\nexport const DrawerContent: React.FC<Omit<FieldsDrawerProps, 'drawerSlug' | 'drawerTitle'>> = ({\n data,\n featureKey,\n fieldMapOverride,\n handleDrawerSubmit,\n schemaFieldsPathOverride,\n schemaPathSuffix,\n}) => {\n const { t } = useTranslation()\n const { id } = useDocumentInfo()\n const { schemaPath } = useFieldProps()\n const { config } = useConfig()\n const [initialState, setInitialState] = useState<FormState | false>(false)\n const {\n field: { richTextComponentMap },\n } = useEditorConfigContext()\n\n const componentMapRenderedFieldsPath = `lexical_internal_feature.${featureKey}.fields${schemaPathSuffix ? `.${schemaPathSuffix}` : ''}`\n const schemaFieldsPath =\n schemaFieldsPathOverride ??\n `${schemaPath}.lexical_internal_feature.${featureKey}${schemaPathSuffix ? `.${schemaPathSuffix}` : ''}`\n\n const fields: any =\n fieldMapOverride ?? (richTextComponentMap.get(componentMapRenderedFieldsPath) as ClientField[]) // Field Schema\n\n useEffect(() => {\n const awaitInitialState = async () => {\n const state = await getFormState({\n apiRoute: config.routes.api,\n body: {\n id,\n data: data ?? {},\n operation: 'update',\n schemaPath: schemaFieldsPath,\n },\n serverURL: config.serverURL,\n }) // Form State\n\n setInitialState(state)\n }\n\n void awaitInitialState()\n }, [config.routes.api, config.serverURL, schemaFieldsPath, id, data])\n\n const onChange: FormProps['onChange'][0] = useCallback(\n async ({ formState: prevFormState }) => {\n return await getFormState({\n apiRoute: config.routes.api,\n body: {\n id,\n formState: prevFormState,\n operation: 'update',\n schemaPath: schemaFieldsPath,\n },\n serverURL: config.serverURL,\n })\n },\n\n [config.routes.api, config.serverURL, schemaFieldsPath, id],\n )\n\n if (initialState === false) {\n return null\n }\n\n return (\n <Form\n beforeSubmit={[onChange]}\n disableValidationOnSubmit\n fields={Array.isArray(fields) ? fields : []}\n initialState={initialState}\n onChange={[onChange]}\n onSubmit={handleDrawerSubmit}\n uuid={uuid()}\n >\n <RenderFields\n fields={Array.isArray(fields) ? fields : []}\n forceRender\n path=\"\" // See Blocks feature path for details as for why this is empty\n readOnly={false}\n schemaPath={schemaFieldsPath}\n />\n\n <FormSubmit>{t('fields:saveChanges')}</FormSubmit>\n </Form>\n )\n}\n"],"
|
|
1
|
+
{"version":3,"file":"DrawerContent.js","names":["c","_c","Form","FormSubmit","RenderFields","useConfig","useDocumentInfo","useFieldProps","useTranslation","getFormState","React","useCallback","useEffect","useState","v4","uuid","useEditorConfigContext","DrawerContent","t0","$","data","featureKey","fieldMapOverride","handleDrawerSubmit","schemaFieldsPathOverride","schemaPathSuffix","t","id","schemaPath","config","initialState","setInitialState","field","t1","richTextComponentMap","componentMapRenderedFieldsPath","schemaFieldsPath","t2","get","fields","t3","awaitInitialState","state","apiRoute","routes","api","body","operation","serverURL","t4","t5","t6","formState","prevFormState","onChange","t7","Array","isArray","t8","_jsxs","beforeSubmit","disableValidationOnSubmit","onSubmit","children","_jsx","forceRender","path","readOnly"],"sources":["../../../src/utilities/fieldsDrawer/DrawerContent.tsx"],"sourcesContent":["'use client'\nimport type { FormProps } from '@payloadcms/ui'\nimport type { ClientField, FormState } from 'payload'\n\nimport {\n Form,\n FormSubmit,\n RenderFields,\n useConfig,\n useDocumentInfo,\n useFieldProps,\n useTranslation,\n} from '@payloadcms/ui'\nimport { getFormState } from '@payloadcms/ui/shared'\nimport React, { useCallback, useEffect, useState } from 'react'\nimport { v4 as uuid } from 'uuid'\n\nimport type { FieldsDrawerProps } from './Drawer.js'\n\nimport { useEditorConfigContext } from '../../lexical/config/client/EditorConfigProvider.js'\n\nexport const DrawerContent: React.FC<Omit<FieldsDrawerProps, 'drawerSlug' | 'drawerTitle'>> = ({\n data,\n featureKey,\n fieldMapOverride,\n handleDrawerSubmit,\n schemaFieldsPathOverride,\n schemaPathSuffix,\n}) => {\n const { t } = useTranslation()\n const { id } = useDocumentInfo()\n const { schemaPath } = useFieldProps()\n const { config } = useConfig()\n const [initialState, setInitialState] = useState<FormState | false>(false)\n const {\n field: { richTextComponentMap },\n } = useEditorConfigContext()\n\n const componentMapRenderedFieldsPath = `lexical_internal_feature.${featureKey}.fields${schemaPathSuffix ? `.${schemaPathSuffix}` : ''}`\n const schemaFieldsPath =\n schemaFieldsPathOverride ??\n `${schemaPath}.lexical_internal_feature.${featureKey}${schemaPathSuffix ? `.${schemaPathSuffix}` : ''}`\n\n const fields: any =\n fieldMapOverride ?? (richTextComponentMap.get(componentMapRenderedFieldsPath) as ClientField[]) // Field Schema\n\n useEffect(() => {\n const awaitInitialState = async () => {\n const state = await getFormState({\n apiRoute: config.routes.api,\n body: {\n id,\n data: data ?? {},\n operation: 'update',\n schemaPath: schemaFieldsPath,\n },\n serverURL: config.serverURL,\n }) // Form State\n\n setInitialState(state)\n }\n\n void awaitInitialState()\n }, [config.routes.api, config.serverURL, schemaFieldsPath, id, data])\n\n const onChange: FormProps['onChange'][0] = useCallback(\n async ({ formState: prevFormState }) => {\n return await getFormState({\n apiRoute: config.routes.api,\n body: {\n id,\n formState: prevFormState,\n operation: 'update',\n schemaPath: schemaFieldsPath,\n },\n serverURL: config.serverURL,\n })\n },\n\n [config.routes.api, config.serverURL, schemaFieldsPath, id],\n )\n\n if (initialState === false) {\n return null\n }\n\n return (\n <Form\n beforeSubmit={[onChange]}\n disableValidationOnSubmit\n fields={Array.isArray(fields) ? fields : []}\n initialState={initialState}\n onChange={[onChange]}\n onSubmit={handleDrawerSubmit}\n uuid={uuid()}\n >\n <RenderFields\n fields={Array.isArray(fields) ? fields : []}\n forceRender\n path=\"\" // See Blocks feature path for details as for why this is empty\n readOnly={false}\n schemaPath={schemaFieldsPath}\n />\n\n <FormSubmit>{t('fields:saveChanges')}</FormSubmit>\n </Form>\n )\n}\n"],"mappings":"AAAA;;AAAA,SAAAA,CAAA,IAAAC,EAAA;;AAIA,SACEC,IAAI,EACJC,UAAU,EACVC,YAAY,EACZC,SAAS,EACTC,eAAe,EACfC,aAAa,EACbC,cAAc,QACT;AACP,SAASC,YAAY,QAAQ;AAC7B,OAAOC,KAAA,IAASC,WAAW,EAAEC,SAAS,EAAEC,QAAQ,QAAQ;AACxD,SAASC,EAAA,IAAMC,IAAI,QAAQ;AAI3B,SAASC,sBAAsB,QAAQ;AAEvC,OAAO,MAAMC,aAAA,GAAiFC,EAAA;EAAA,MAAAC,CAAA,GAAAlB,EAAA;EAAC;IAAAmB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[]}
|
|
@@ -1,24 +1,29 @@
|
|
|
1
|
-
export function recurseNodes({
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
1
|
+
export function recurseNodes({
|
|
2
|
+
callback,
|
|
3
|
+
nodes
|
|
4
|
+
}) {
|
|
5
|
+
for (const node of nodes) {
|
|
6
|
+
callback(node);
|
|
7
|
+
if ('children' in node && Array.isArray(node?.children) && node?.children?.length) {
|
|
8
|
+
recurseNodes({
|
|
9
|
+
callback,
|
|
10
|
+
nodes: node.children
|
|
11
|
+
});
|
|
10
12
|
}
|
|
13
|
+
}
|
|
11
14
|
}
|
|
12
|
-
export async function recurseNodesAsync({
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
15
|
+
export async function recurseNodesAsync({
|
|
16
|
+
callback,
|
|
17
|
+
nodes
|
|
18
|
+
}) {
|
|
19
|
+
for (const node of nodes) {
|
|
20
|
+
await callback(node);
|
|
21
|
+
if ('children' in node && Array.isArray(node?.children) && node?.children?.length) {
|
|
22
|
+
await recurseNodesAsync({
|
|
23
|
+
callback,
|
|
24
|
+
nodes: node.children
|
|
25
|
+
});
|
|
21
26
|
}
|
|
27
|
+
}
|
|
22
28
|
}
|
|
23
|
-
|
|
24
29
|
//# sourceMappingURL=forEachNodeRecursively.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/utilities/forEachNodeRecursively.ts"],"sourcesContent":["import type { SerializedLexicalNode } from 'lexical'\n\nexport function recurseNodes({\n callback,\n nodes,\n}: {\n callback: (node: SerializedLexicalNode) => void\n nodes: SerializedLexicalNode[]\n}) {\n for (const node of nodes) {\n callback(node)\n\n if ('children' in node && Array.isArray(node?.children) && node?.children?.length) {\n recurseNodes({ callback, nodes: node.children as SerializedLexicalNode[] })\n }\n }\n}\n\nexport async function recurseNodesAsync({\n callback,\n nodes,\n}: {\n callback: (node: SerializedLexicalNode) => Promise<void>\n nodes: SerializedLexicalNode[]\n}) {\n for (const node of nodes) {\n await callback(node)\n\n if ('children' in node && Array.isArray(node?.children) && node?.children?.length) {\n await recurseNodesAsync({ callback, nodes: node.children as SerializedLexicalNode[] })\n }\n }\n}\n"],"
|
|
1
|
+
{"version":3,"file":"forEachNodeRecursively.js","names":["recurseNodes","callback","nodes","node","Array","isArray","children","length","recurseNodesAsync"],"sources":["../../src/utilities/forEachNodeRecursively.ts"],"sourcesContent":["import type { SerializedLexicalNode } from 'lexical'\n\nexport function recurseNodes({\n callback,\n nodes,\n}: {\n callback: (node: SerializedLexicalNode) => void\n nodes: SerializedLexicalNode[]\n}) {\n for (const node of nodes) {\n callback(node)\n\n if ('children' in node && Array.isArray(node?.children) && node?.children?.length) {\n recurseNodes({ callback, nodes: node.children as SerializedLexicalNode[] })\n }\n }\n}\n\nexport async function recurseNodesAsync({\n callback,\n nodes,\n}: {\n callback: (node: SerializedLexicalNode) => Promise<void>\n nodes: SerializedLexicalNode[]\n}) {\n for (const node of nodes) {\n await callback(node)\n\n if ('children' in node && Array.isArray(node?.children) && node?.children?.length) {\n await recurseNodesAsync({ callback, nodes: node.children as SerializedLexicalNode[] })\n }\n }\n}\n"],"mappings":"AAEA,OAAO,SAASA,aAAa;EAC3BC,QAAQ;EACRC;AAAK,CAIN;EACC,KAAK,MAAMC,IAAA,IAAQD,KAAA,EAAO;IACxBD,QAAA,CAASE,IAAA;IAET,IAAI,cAAcA,IAAA,IAAQC,KAAA,CAAMC,OAAO,CAACF,IAAA,EAAMG,QAAA,KAAaH,IAAA,EAAMG,QAAA,EAAUC,MAAA,EAAQ;MACjFP,YAAA,CAAa;QAAEC,QAAA;QAAUC,KAAA,EAAOC,IAAA,CAAKG;MAAoC;IAC3E;EACF;AACF;AAEA,OAAO,eAAeE,kBAAkB;EACtCP,QAAQ;EACRC;AAAK,CAIN;EACC,KAAK,MAAMC,IAAA,IAAQD,KAAA,EAAO;IACxB,MAAMD,QAAA,CAASE,IAAA;IAEf,IAAI,cAAcA,IAAA,IAAQC,KAAA,CAAMC,OAAO,CAACF,IAAA,EAAMG,QAAA,KAAaH,IAAA,EAAMG,QAAA,EAAUC,MAAA,EAAQ;MACjF,MAAMC,iBAAA,CAAkB;QAAEP,QAAA;QAAUC,KAAA,EAAOC,IAAA,CAAKG;MAAoC;IACtF;EACF;AACF","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generateComponentMap.d.ts","sourceRoot":"","sources":["../../src/utilities/generateComponentMap.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAgC,4BAA4B,EAAE,MAAM,SAAS,CAAA;AAMzF,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAA;AAG1E,eAAO,MAAM,uBAAuB,SAC3B;IAAE,kBAAkB,EAAE,wBAAwB,CAAA;CAAE,KAAG,
|
|
1
|
+
{"version":3,"file":"generateComponentMap.d.ts","sourceRoot":"","sources":["../../src/utilities/generateComponentMap.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAgC,4BAA4B,EAAE,MAAM,SAAS,CAAA;AAMzF,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAA;AAG1E,eAAO,MAAM,uBAAuB,SAC3B;IAAE,kBAAkB,EAAE,wBAAwB,CAAA;CAAE,KAAG,4BAqIzD,CAAA"}
|
|
@@ -3,87 +3,97 @@ import { createElement as _createElement } from "react";
|
|
|
3
3
|
import { getComponent } from '@payloadcms/ui/shared';
|
|
4
4
|
import { createClientFields } from '@payloadcms/ui/utilities/createClientConfig';
|
|
5
5
|
import { deepCopyObjectSimple } from 'payload';
|
|
6
|
-
export const getGenerateComponentMap =
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
6
|
+
export const getGenerateComponentMap = args => ({
|
|
7
|
+
createMappedComponent,
|
|
8
|
+
field,
|
|
9
|
+
i18n,
|
|
10
|
+
importMap,
|
|
11
|
+
payload,
|
|
12
|
+
schemaPath
|
|
13
|
+
}) => {
|
|
14
|
+
const componentMap = new Map();
|
|
15
|
+
// turn args.resolvedFeatureMap into an array of [key, value] pairs, ordered by value.order, lowest order first:
|
|
16
|
+
const resolvedFeatureMapArray = Array.from(args.resolvedFeatureMap.entries()).sort((a, b) => a[1].order - b[1].order);
|
|
17
|
+
componentMap.set(`features`, resolvedFeatureMapArray.map(([featureKey, resolvedFeature]) => {
|
|
18
|
+
/**
|
|
19
|
+
* Handle Feature Component Maps
|
|
20
|
+
*/
|
|
21
|
+
if ('componentMap' in resolvedFeature) {
|
|
22
|
+
const components = typeof resolvedFeature.componentMap === 'function' ? resolvedFeature.componentMap({
|
|
23
|
+
i18n,
|
|
24
|
+
payload,
|
|
25
|
+
props: resolvedFeature.sanitizedServerFeatureProps,
|
|
26
|
+
schemaPath
|
|
27
|
+
}) : resolvedFeature.componentMap;
|
|
28
|
+
for (const componentKey in components) {
|
|
29
|
+
const payloadComponent = components[componentKey];
|
|
30
|
+
const mappedComponent = createMappedComponent(payloadComponent, {
|
|
31
|
+
clientProps: {
|
|
32
|
+
componentKey,
|
|
33
|
+
featureKey: resolvedFeature.key,
|
|
34
|
+
key: `${resolvedFeature.key}-${componentKey}`
|
|
35
|
+
}
|
|
36
|
+
}, undefined, 'lexical-from-resolvedFeature');
|
|
37
|
+
if (mappedComponent) {
|
|
38
|
+
componentMap.set(`lexical_internal_feature.${featureKey}.lexical_internal_components.${componentKey}`, mappedComponent);
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Handle Feature Schema Maps (rendered fields)
|
|
44
|
+
*/
|
|
45
|
+
if ('generateSchemaMap' in resolvedFeature && typeof resolvedFeature.generateSchemaMap === 'function') {
|
|
46
|
+
const schemas = resolvedFeature.generateSchemaMap({
|
|
47
|
+
config: payload.config,
|
|
48
|
+
field,
|
|
49
|
+
i18n,
|
|
50
|
+
props: resolvedFeature.sanitizedServerFeatureProps,
|
|
51
|
+
schemaMap: new Map(),
|
|
52
|
+
schemaPath
|
|
53
|
+
});
|
|
54
|
+
if (schemas) {
|
|
55
|
+
for (const [schemaKey, fields] of schemas.entries()) {
|
|
56
|
+
let clientFields = deepCopyObjectSimple(fields);
|
|
57
|
+
clientFields = createClientFields({
|
|
58
|
+
clientFields,
|
|
59
|
+
createMappedComponent,
|
|
60
|
+
disableAddingID: true,
|
|
61
|
+
fields,
|
|
62
|
+
i18n,
|
|
63
|
+
importMap,
|
|
64
|
+
parentPath: `${schemaPath}.lexical_internal_feature.${featureKey}.fields.${schemaKey}`,
|
|
65
|
+
payload
|
|
66
|
+
});
|
|
67
|
+
componentMap.set(`lexical_internal_feature.${featureKey}.fields.${schemaKey}`, clientFields);
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
const ClientComponent = resolvedFeature.ClientFeature;
|
|
72
|
+
const ResolvedClientComponent = getComponent({
|
|
73
|
+
identifier: 'lexical-clientComponent',
|
|
74
|
+
importMap,
|
|
75
|
+
payloadComponent: ClientComponent
|
|
76
|
+
});
|
|
77
|
+
const clientComponentProps = resolvedFeature.clientFeatureProps;
|
|
78
|
+
if (!ClientComponent) {
|
|
79
|
+
return null;
|
|
80
|
+
}
|
|
81
|
+
return {
|
|
82
|
+
ClientFeature: clientComponentProps && typeof clientComponentProps === 'object' ? /*#__PURE__*/_createElement(ResolvedClientComponent.Component, {
|
|
83
|
+
...clientComponentProps,
|
|
84
|
+
featureKey: resolvedFeature.key,
|
|
85
|
+
key: resolvedFeature.key,
|
|
86
|
+
order: resolvedFeature.order,
|
|
87
|
+
...(ResolvedClientComponent?.clientProps || {})
|
|
88
|
+
}) : /*#__PURE__*/_jsx(ResolvedClientComponent.Component, {
|
|
89
|
+
featureKey: resolvedFeature.key,
|
|
90
|
+
order: resolvedFeature.order,
|
|
91
|
+
...(ResolvedClientComponent?.clientProps || {})
|
|
92
|
+
}, resolvedFeature.key),
|
|
93
|
+
key: resolvedFeature.key,
|
|
94
|
+
order: resolvedFeature.order
|
|
87
95
|
};
|
|
88
|
-
|
|
96
|
+
}).filter(feature => feature !== null));
|
|
97
|
+
return componentMap;
|
|
98
|
+
};
|
|
89
99
|
//# sourceMappingURL=generateComponentMap.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/utilities/generateComponentMap.tsx"],"sourcesContent":["import type { ClientField, MappedComponent, RichTextGenerateComponentMap } from 'payload'\n\nimport { getComponent } from '@payloadcms/ui/shared'\nimport { createClientFields } from '@payloadcms/ui/utilities/createClientConfig'\nimport { deepCopyObjectSimple } from 'payload'\n\nimport type { ResolvedServerFeatureMap } from '../features/typesServer.js'\nimport type { GeneratedFeatureProviderComponent } from '../types.js'\n\nexport const getGenerateComponentMap =\n (args: { resolvedFeatureMap: ResolvedServerFeatureMap }): RichTextGenerateComponentMap =>\n ({ createMappedComponent, field, i18n, importMap, payload, schemaPath }) => {\n const componentMap: Map<\n string,\n ClientField[] | GeneratedFeatureProviderComponent[] | MappedComponent\n > = new Map()\n\n // turn args.resolvedFeatureMap into an array of [key, value] pairs, ordered by value.order, lowest order first:\n const resolvedFeatureMapArray = Array.from(args.resolvedFeatureMap.entries()).sort(\n (a, b) => a[1].order - b[1].order,\n )\n\n componentMap.set(\n `features`,\n resolvedFeatureMapArray\n .map(([featureKey, resolvedFeature]) => {\n /**\n * Handle Feature Component Maps\n */\n if ('componentMap' in resolvedFeature) {\n const components =\n typeof resolvedFeature.componentMap === 'function'\n ? resolvedFeature.componentMap({\n i18n,\n payload,\n props: resolvedFeature.sanitizedServerFeatureProps,\n schemaPath,\n })\n : resolvedFeature.componentMap\n\n for (const componentKey in components) {\n const payloadComponent = components[componentKey]\n\n const mappedComponent: MappedComponent = createMappedComponent(\n payloadComponent,\n {\n componentKey,\n
|
|
1
|
+
{"version":3,"file":"generateComponentMap.js","names":["getComponent","createClientFields","deepCopyObjectSimple","getGenerateComponentMap","args","createMappedComponent","field","i18n","importMap","payload","schemaPath","componentMap","Map","resolvedFeatureMapArray","Array","from","resolvedFeatureMap","entries","sort","a","b","order","set","map","featureKey","resolvedFeature","components","props","sanitizedServerFeatureProps","componentKey","payloadComponent","mappedComponent","clientProps","key","undefined","generateSchemaMap","schemas","config","schemaMap","schemaKey","fields","clientFields","disableAddingID","parentPath","ClientComponent","ClientFeature","ResolvedClientComponent","identifier","clientComponentProps","clientFeatureProps","_createElement","Component","_jsx","filter","feature"],"sources":["../../src/utilities/generateComponentMap.tsx"],"sourcesContent":["import type { ClientField, MappedComponent, RichTextGenerateComponentMap } from 'payload'\n\nimport { getComponent } from '@payloadcms/ui/shared'\nimport { createClientFields } from '@payloadcms/ui/utilities/createClientConfig'\nimport { deepCopyObjectSimple } from 'payload'\n\nimport type { ResolvedServerFeatureMap } from '../features/typesServer.js'\nimport type { GeneratedFeatureProviderComponent } from '../types.js'\n\nexport const getGenerateComponentMap =\n (args: { resolvedFeatureMap: ResolvedServerFeatureMap }): RichTextGenerateComponentMap =>\n ({ createMappedComponent, field, i18n, importMap, payload, schemaPath }) => {\n const componentMap: Map<\n string,\n ClientField[] | GeneratedFeatureProviderComponent[] | MappedComponent\n > = new Map()\n\n // turn args.resolvedFeatureMap into an array of [key, value] pairs, ordered by value.order, lowest order first:\n const resolvedFeatureMapArray = Array.from(args.resolvedFeatureMap.entries()).sort(\n (a, b) => a[1].order - b[1].order,\n )\n\n componentMap.set(\n `features`,\n resolvedFeatureMapArray\n .map(([featureKey, resolvedFeature]) => {\n /**\n * Handle Feature Component Maps\n */\n if ('componentMap' in resolvedFeature) {\n const components =\n typeof resolvedFeature.componentMap === 'function'\n ? resolvedFeature.componentMap({\n i18n,\n payload,\n props: resolvedFeature.sanitizedServerFeatureProps,\n schemaPath,\n })\n : resolvedFeature.componentMap\n\n for (const componentKey in components) {\n const payloadComponent = components[componentKey]\n\n const mappedComponent: MappedComponent = createMappedComponent(\n payloadComponent,\n {\n clientProps: {\n componentKey,\n featureKey: resolvedFeature.key,\n key: `${resolvedFeature.key}-${componentKey}`,\n },\n },\n undefined,\n 'lexical-from-resolvedFeature',\n )\n\n if (mappedComponent) {\n componentMap.set(\n `lexical_internal_feature.${featureKey}.lexical_internal_components.${componentKey}`,\n mappedComponent,\n )\n }\n }\n }\n\n /**\n * Handle Feature Schema Maps (rendered fields)\n */\n if (\n 'generateSchemaMap' in resolvedFeature &&\n typeof resolvedFeature.generateSchemaMap === 'function'\n ) {\n const schemas = resolvedFeature.generateSchemaMap({\n config: payload.config,\n field,\n i18n,\n props: resolvedFeature.sanitizedServerFeatureProps,\n schemaMap: new Map(),\n schemaPath,\n })\n\n if (schemas) {\n for (const [schemaKey, fields] of schemas.entries()) {\n let clientFields: ClientField[] = deepCopyObjectSimple(\n fields,\n ) as unknown as ClientField[]\n clientFields = createClientFields({\n clientFields,\n createMappedComponent,\n disableAddingID: true,\n fields,\n i18n,\n importMap,\n parentPath: `${schemaPath}.lexical_internal_feature.${featureKey}.fields.${schemaKey}`,\n payload,\n })\n\n componentMap.set(\n `lexical_internal_feature.${featureKey}.fields.${schemaKey}`,\n clientFields,\n )\n }\n }\n }\n\n const ClientComponent = resolvedFeature.ClientFeature\n const ResolvedClientComponent = getComponent({\n identifier: 'lexical-clientComponent',\n importMap,\n payloadComponent: ClientComponent,\n })\n const clientComponentProps = resolvedFeature.clientFeatureProps\n\n if (!ClientComponent) {\n return null\n }\n\n return {\n ClientFeature:\n clientComponentProps && typeof clientComponentProps === 'object' ? (\n <ResolvedClientComponent.Component\n {...clientComponentProps}\n featureKey={resolvedFeature.key}\n key={resolvedFeature.key}\n order={resolvedFeature.order}\n {...(ResolvedClientComponent?.clientProps || {})}\n />\n ) : (\n <ResolvedClientComponent.Component\n featureKey={resolvedFeature.key}\n key={resolvedFeature.key}\n order={resolvedFeature.order}\n {...(ResolvedClientComponent?.clientProps || {})}\n />\n ),\n key: resolvedFeature.key,\n order: resolvedFeature.order,\n } as GeneratedFeatureProviderComponent\n })\n .filter((feature) => feature !== null),\n )\n\n return componentMap\n }\n"],"mappings":";;AAEA,SAASA,YAAY,QAAQ;AAC7B,SAASC,kBAAkB,QAAQ;AACnC,SAASC,oBAAoB,QAAQ;AAKrC,OAAO,MAAMC,uBAAA,GACVC,IAAA,IACD,CAAC;EAAEC,qBAAqB;EAAEC,KAAK;EAAEC,IAAI;EAAEC,SAAS;EAAEC,OAAO;EAAEC;AAAU,CAAE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AgBQ,GAAG;QAE/BZ,KAAA,EAAOI,eAAA,CAAgBJ,KAAK;QAC3B,IAAIyB,uBAAA,EAAyBd,WAAA,IAAe,CAAC,CAAC;SAF1CP,eAAA,CAAgBQ,GAAG;MAK9BA,GAAA,EAAKR,eAAA,CAAgBQ,GAAG;MACxBZ,KAAA,EAAOI,eAAA,CAAgBJ;IACzB;EACF,GACCgC,MAAM,CAAEC,OAAA,IAAYA,OAAA,KAAY;EAGrC,OAAO3C,YAAA;AACT","ignoreList":[]}
|
|
@@ -1,50 +1,56 @@
|
|
|
1
1
|
import { genImportMapIterateFields } from 'payload';
|
|
2
|
-
export const getGenerateImportMap =
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
fields: subFields,
|
|
41
|
-
importMap,
|
|
42
|
-
imports
|
|
43
|
-
});
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
}
|
|
2
|
+
export const getGenerateImportMap = args => ({
|
|
3
|
+
addToImportMap,
|
|
4
|
+
baseDir,
|
|
5
|
+
config,
|
|
6
|
+
importMap,
|
|
7
|
+
imports
|
|
8
|
+
}) => {
|
|
9
|
+
addToImportMap('@payloadcms/richtext-lexical/client#RichTextCell');
|
|
10
|
+
addToImportMap('@payloadcms/richtext-lexical/client#RichTextField');
|
|
11
|
+
addToImportMap('@payloadcms/richtext-lexical/generateComponentMap#getGenerateComponentMap');
|
|
12
|
+
// iterate just through args.resolvedFeatureMap.values()
|
|
13
|
+
for (const resolvedFeature of args.resolvedFeatureMap.values()) {
|
|
14
|
+
if ('componentImports' in resolvedFeature) {
|
|
15
|
+
if (typeof resolvedFeature.componentImports === 'function') {
|
|
16
|
+
resolvedFeature.componentImports({
|
|
17
|
+
addToImportMap,
|
|
18
|
+
baseDir,
|
|
19
|
+
config,
|
|
20
|
+
importMap,
|
|
21
|
+
imports
|
|
22
|
+
});
|
|
23
|
+
} else if (resolvedFeature.componentImports?.length) {
|
|
24
|
+
resolvedFeature.componentImports.forEach(component => {
|
|
25
|
+
addToImportMap(component);
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
const ClientComponent = resolvedFeature.ClientFeature;
|
|
30
|
+
if (ClientComponent) {
|
|
31
|
+
addToImportMap(ClientComponent);
|
|
32
|
+
}
|
|
33
|
+
/*
|
|
34
|
+
Now run for all possible sub-fields
|
|
35
|
+
*/
|
|
36
|
+
if (resolvedFeature.nodes?.length) {
|
|
37
|
+
for (const node of resolvedFeature.nodes) {
|
|
38
|
+
if (typeof node?.getSubFields !== 'function') {
|
|
39
|
+
continue;
|
|
47
40
|
}
|
|
48
|
-
|
|
49
|
-
|
|
41
|
+
const subFields = node.getSubFields({});
|
|
42
|
+
if (subFields?.length) {
|
|
43
|
+
genImportMapIterateFields({
|
|
44
|
+
addToImportMap,
|
|
45
|
+
baseDir,
|
|
46
|
+
config,
|
|
47
|
+
fields: subFields,
|
|
48
|
+
importMap,
|
|
49
|
+
imports
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
};
|
|
50
56
|
//# sourceMappingURL=generateImportMap.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/utilities/generateImportMap.tsx"],"sourcesContent":["import type { RichTextAdapter } from 'payload'\n\nimport { genImportMapIterateFields } from 'payload'\n\nimport type { ResolvedServerFeatureMap } from '../features/typesServer.js'\n\nexport const getGenerateImportMap =\n (args: { resolvedFeatureMap: ResolvedServerFeatureMap }): RichTextAdapter['generateImportMap'] =>\n ({ addToImportMap, baseDir, config, importMap, imports }) => {\n addToImportMap('@payloadcms/richtext-lexical/client#RichTextCell')\n addToImportMap('@payloadcms/richtext-lexical/client#RichTextField')\n addToImportMap('@payloadcms/richtext-lexical/generateComponentMap#getGenerateComponentMap')\n\n // iterate just through args.resolvedFeatureMap.values()\n for (const resolvedFeature of args.resolvedFeatureMap.values()) {\n if ('componentImports' in resolvedFeature) {\n if (typeof resolvedFeature.componentImports === 'function') {\n resolvedFeature.componentImports({\n addToImportMap,\n baseDir,\n config,\n importMap,\n imports,\n })\n } else if (resolvedFeature.componentImports?.length) {\n resolvedFeature.componentImports.forEach((component) => {\n addToImportMap(component)\n })\n }\n }\n\n const ClientComponent = resolvedFeature.ClientFeature\n if (ClientComponent) {\n addToImportMap(ClientComponent)\n }\n\n /*\n Now run for all possible sub-fields\n */\n if (resolvedFeature.nodes?.length) {\n for (const node of resolvedFeature.nodes) {\n if (typeof node?.getSubFields !== 'function') {\n continue\n }\n const subFields = node.getSubFields({})\n if (subFields?.length) {\n genImportMapIterateFields({\n addToImportMap,\n baseDir,\n config,\n fields: subFields,\n importMap,\n imports,\n })\n }\n }\n }\n }\n }\n"],"
|
|
1
|
+
{"version":3,"file":"generateImportMap.js","names":["genImportMapIterateFields","getGenerateImportMap","args","addToImportMap","baseDir","config","importMap","imports","resolvedFeature","resolvedFeatureMap","values","componentImports","length","forEach","component","ClientComponent","ClientFeature","nodes","node","getSubFields","subFields","fields"],"sources":["../../src/utilities/generateImportMap.tsx"],"sourcesContent":["import type { RichTextAdapter } from 'payload'\n\nimport { genImportMapIterateFields } from 'payload'\n\nimport type { ResolvedServerFeatureMap } from '../features/typesServer.js'\n\nexport const getGenerateImportMap =\n (args: { resolvedFeatureMap: ResolvedServerFeatureMap }): RichTextAdapter['generateImportMap'] =>\n ({ addToImportMap, baseDir, config, importMap, imports }) => {\n addToImportMap('@payloadcms/richtext-lexical/client#RichTextCell')\n addToImportMap('@payloadcms/richtext-lexical/client#RichTextField')\n addToImportMap('@payloadcms/richtext-lexical/generateComponentMap#getGenerateComponentMap')\n\n // iterate just through args.resolvedFeatureMap.values()\n for (const resolvedFeature of args.resolvedFeatureMap.values()) {\n if ('componentImports' in resolvedFeature) {\n if (typeof resolvedFeature.componentImports === 'function') {\n resolvedFeature.componentImports({\n addToImportMap,\n baseDir,\n config,\n importMap,\n imports,\n })\n } else if (resolvedFeature.componentImports?.length) {\n resolvedFeature.componentImports.forEach((component) => {\n addToImportMap(component)\n })\n }\n }\n\n const ClientComponent = resolvedFeature.ClientFeature\n if (ClientComponent) {\n addToImportMap(ClientComponent)\n }\n\n /*\n Now run for all possible sub-fields\n */\n if (resolvedFeature.nodes?.length) {\n for (const node of resolvedFeature.nodes) {\n if (typeof node?.getSubFields !== 'function') {\n continue\n }\n const subFields = node.getSubFields({})\n if (subFields?.length) {\n genImportMapIterateFields({\n addToImportMap,\n baseDir,\n config,\n fields: subFields,\n importMap,\n imports,\n })\n }\n }\n }\n }\n }\n"],"mappings":"AAEA,SAASA,yBAAyB,QAAQ;AAI1C,OAAO,MAAMC,oBAAA,GACVC,IAAA,IACD,CAAC;EAAEC,cAAc;EAAEC,OAAO;EAAEC,MAAM;EAAEC,SAAS;EAAEC;AAAO,CAAE;EACtDJ,cAAA,CAAe;EACfA,cAAA,CAAe;EACfA,cAAA,CAAe;EAEf;EACA,KAAK,MAAMK,eAAA,IAAmBN,IAAA,CAAKO,kBAAkB,CAACC,MAAM,IAAI;IAC9D,IAAI,sBAAsBF,eAAA,EAAiB;MACzC,IAAI,OAAOA,eAAA,CAAgBG,gBAAgB,KAAK,YAAY;QAC1DH,eAAA,CAAgBG,gBAAgB,CAAC;UAC/BR,cAAA;UACAC,OAAA;UACAC,MAAA;UACAC,SAAA;UACAC;QACF;MACF,OAAO,IAAIC,eAAA,CAAgBG,gBAAgB,EAAEC,MAAA,EAAQ;QACnDJ,eAAA,CAAgBG,gBAAgB,CAACE,OAAO,CAAEC,SAAA;UACxCX,cAAA,CAAeW,SAAA;QACjB;MACF;IACF;IAEA,MAAMC,eAAA,GAAkBP,eAAA,CAAgBQ,aAAa;IACrD,IAAID,eAAA,EAAiB;MACnBZ,cAAA,CAAeY,eAAA;IACjB;IAEA;;;IAGA,IAAIP,eAAA,CAAgBS,KAAK,EAAEL,MAAA,EAAQ;MACjC,KAAK,MAAMM,IAAA,IAAQV,eAAA,CAAgBS,KAAK,EAAE;QACxC,IAAI,OAAOC,IAAA,EAAMC,YAAA,KAAiB,YAAY;UAC5C;QACF;QACA,MAAMC,SAAA,GAAYF,IAAA,CAAKC,YAAY,CAAC,CAAC;QACrC,IAAIC,SAAA,EAAWR,MAAA,EAAQ;UACrBZ,yBAAA,CAA0B;YACxBG,cAAA;YACAC,OAAA;YACAC,MAAA;YACAgB,MAAA,EAAQD,SAAA;YACRd,SAAA;YACAC;UACF;QACF;MACF;IACF;EACF;AACF","ignoreList":[]}
|
|
@@ -1,32 +1,37 @@
|
|
|
1
1
|
import { traverseFields } from '@payloadcms/ui/utilities/buildFieldSchemaMap/traverseFields';
|
|
2
|
-
export const getGenerateSchemaMap =
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
2
|
+
export const getGenerateSchemaMap = args => ({
|
|
3
|
+
config,
|
|
4
|
+
field,
|
|
5
|
+
i18n,
|
|
6
|
+
schemaMap,
|
|
7
|
+
schemaPath
|
|
8
|
+
}) => {
|
|
9
|
+
for (const [featureKey, resolvedFeature] of args.resolvedFeatureMap.entries()) {
|
|
10
|
+
if (!('generateSchemaMap' in resolvedFeature) || typeof resolvedFeature.generateSchemaMap !== 'function') {
|
|
11
|
+
continue;
|
|
12
|
+
}
|
|
13
|
+
const schemas = resolvedFeature.generateSchemaMap({
|
|
14
|
+
config,
|
|
15
|
+
field,
|
|
16
|
+
i18n,
|
|
17
|
+
props: resolvedFeature.sanitizedServerFeatureProps,
|
|
18
|
+
schemaMap,
|
|
19
|
+
schemaPath
|
|
20
|
+
});
|
|
21
|
+
if (schemas) {
|
|
22
|
+
for (const [schemaKey, fields] of schemas.entries()) {
|
|
23
|
+
// generate schema map entries for sub-fields using traverseFields
|
|
24
|
+
traverseFields({
|
|
25
|
+
config,
|
|
26
|
+
fields,
|
|
27
|
+
i18n,
|
|
28
|
+
schemaMap: schemas,
|
|
29
|
+
schemaPath: schemaKey
|
|
30
|
+
});
|
|
31
|
+
schemaMap.set(`${schemaPath}.lexical_internal_feature.${featureKey}.${schemaKey}`, fields);
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
return schemaMap;
|
|
36
|
+
};
|
|
32
37
|
//# sourceMappingURL=generateSchemaMap.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/utilities/generateSchemaMap.ts"],"sourcesContent":["import type { RichTextAdapter } from 'payload'\n\nimport { traverseFields } from '@payloadcms/ui/utilities/buildFieldSchemaMap/traverseFields'\n\nimport type { ResolvedServerFeatureMap } from '../features/typesServer.js'\n\nexport const getGenerateSchemaMap =\n (args: { resolvedFeatureMap: ResolvedServerFeatureMap }): RichTextAdapter['generateSchemaMap'] =>\n ({ config, field, i18n, schemaMap, schemaPath }) => {\n for (const [featureKey, resolvedFeature] of args.resolvedFeatureMap.entries()) {\n if (\n !('generateSchemaMap' in resolvedFeature) ||\n typeof resolvedFeature.generateSchemaMap !== 'function'\n ) {\n continue\n }\n const schemas = resolvedFeature.generateSchemaMap({\n config,\n field,\n i18n,\n props: resolvedFeature.sanitizedServerFeatureProps,\n schemaMap,\n schemaPath,\n })\n\n if (schemas) {\n for (const [schemaKey, fields] of schemas.entries()) {\n // generate schema map entries for sub-fields using traverseFields\n traverseFields({\n config,\n fields,\n i18n,\n schemaMap: schemas,\n schemaPath: schemaKey,\n })\n\n schemaMap.set(`${schemaPath}.lexical_internal_feature.${featureKey}.${schemaKey}`, fields)\n }\n }\n }\n\n return schemaMap\n }\n"],"
|
|
1
|
+
{"version":3,"file":"generateSchemaMap.js","names":["traverseFields","getGenerateSchemaMap","args","config","field","i18n","schemaMap","schemaPath","featureKey","resolvedFeature","resolvedFeatureMap","entries","generateSchemaMap","schemas","props","sanitizedServerFeatureProps","schemaKey","fields","set"],"sources":["../../src/utilities/generateSchemaMap.ts"],"sourcesContent":["import type { RichTextAdapter } from 'payload'\n\nimport { traverseFields } from '@payloadcms/ui/utilities/buildFieldSchemaMap/traverseFields'\n\nimport type { ResolvedServerFeatureMap } from '../features/typesServer.js'\n\nexport const getGenerateSchemaMap =\n (args: { resolvedFeatureMap: ResolvedServerFeatureMap }): RichTextAdapter['generateSchemaMap'] =>\n ({ config, field, i18n, schemaMap, schemaPath }) => {\n for (const [featureKey, resolvedFeature] of args.resolvedFeatureMap.entries()) {\n if (\n !('generateSchemaMap' in resolvedFeature) ||\n typeof resolvedFeature.generateSchemaMap !== 'function'\n ) {\n continue\n }\n const schemas = resolvedFeature.generateSchemaMap({\n config,\n field,\n i18n,\n props: resolvedFeature.sanitizedServerFeatureProps,\n schemaMap,\n schemaPath,\n })\n\n if (schemas) {\n for (const [schemaKey, fields] of schemas.entries()) {\n // generate schema map entries for sub-fields using traverseFields\n traverseFields({\n config,\n fields,\n i18n,\n schemaMap: schemas,\n schemaPath: schemaKey,\n })\n\n schemaMap.set(`${schemaPath}.lexical_internal_feature.${featureKey}.${schemaKey}`, fields)\n }\n }\n }\n\n return schemaMap\n }\n"],"mappings":"AAEA,SAASA,cAAc,QAAQ;AAI/B,OAAO,MAAMC,oBAAA,GACVC,IAAA,IACD,CAAC;EAAEC,MAAM;EAAEC,KAAK;EAAEC,IAAI;EAAEC,SAAS;EAAEC;AAAU,CAAE;EAC7C,KAAK,MAAM,CAACC,UAAA,EAAYC,eAAA,CAAgB,IAAIP,IAAA,CAAKQ,kBAAkB,CAACC,OAAO,IAAI;IAC7E,IACE,EAAE,uBAAuBF,eAAc,KACvC,OAAOA,eAAA,CAAgBG,iBAAiB,KAAK,YAC7C;MACA;IACF;IACA,MAAMC,OAAA,GAAUJ,eAAA,CAAgBG,iBAAiB,CAAC;MAChDT,MAAA;MACAC,KAAA;MACAC,IAAA;MACAS,KAAA,EAAOL,eAAA,CAAgBM,2BAA2B;MAClDT,SAAA;MACAC;IACF;IAEA,IAAIM,OAAA,EAAS;MACX,KAAK,MAAM,CAACG,SAAA,EAAWC,MAAA,CAAO,IAAIJ,OAAA,CAAQF,OAAO,IAAI;QACnD;QACAX,cAAA,CAAe;UACbG,MAAA;UACAc,MAAA;UACAZ,IAAA;UACAC,SAAA,EAAWO,OAAA;UACXN,UAAA,EAAYS;QACd;QAEAV,SAAA,CAAUY,GAAG,CAAC,GAAGX,UAAA,6BAAuCC,UAAA,IAAcQ,SAAA,EAAW,EAAEC,MAAA;MACrF;IACF;EACF;EAEA,OAAOX,SAAA;AACT","ignoreList":[]}
|