@payloadcms/richtext-lexical 4.0.0-internal.38b7f1d → 4.0.0-internal.5f0cd13
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/rscEntry.d.ts +1 -1
- package/dist/cell/rscEntry.d.ts.map +1 -1
- package/dist/cell/rscEntry.js.map +1 -1
- package/dist/exports/client/{Field-PJW7KUJG.js → Field-G5Z2HM5Y.js} +2 -2
- package/dist/exports/client/Field-G5Z2HM5Y.js.map +7 -0
- package/dist/exports/client/{RelationshipComponent-5RONAYJM.js → RelationshipComponent-YCPAKOL7.js} +2 -2
- package/dist/exports/client/RelationshipComponent-YCPAKOL7.js.map +7 -0
- package/dist/exports/client/bundled.css +1 -1
- package/dist/exports/client/{chunk-QJ5EETIB.js → chunk-6QWQ7JV4.js} +2 -2
- package/dist/exports/client/{chunk-FTT5KJ6W.js → chunk-LH634DPU.js} +1 -1
- package/dist/exports/client/chunk-LH634DPU.js.map +7 -0
- package/dist/exports/client/{chunk-BZZVLW4U.js → chunk-RJ5MAOKZ.js} +1 -1
- package/dist/exports/client/chunk-RJ5MAOKZ.js.map +7 -0
- package/dist/exports/client/{chunk-44G3K3W7.js → chunk-UAKNDD6R.js} +2 -2
- package/dist/exports/client/chunk-UAKNDD6R.js.map +7 -0
- package/dist/exports/client/component-HKTAZ77E.js +2 -0
- package/dist/exports/client/component-HKTAZ77E.js.map +7 -0
- package/dist/exports/client/componentInline-D3A6OW76.js +2 -0
- package/dist/exports/client/index.js +16 -16
- package/dist/exports/client/index.js.map +4 -4
- package/dist/exports/react/index.d.ts +1 -1
- package/dist/exports/react/index.d.ts.map +1 -1
- package/dist/exports/react/index.js.map +1 -1
- package/dist/features/align/client/toolbarAlignGroup.d.ts.map +1 -1
- package/dist/features/blockquote/server/index.d.ts +1 -4
- package/dist/features/blockquote/server/index.d.ts.map +1 -1
- package/dist/features/blockquote/server/index.js +2 -0
- package/dist/features/blockquote/server/index.js.map +1 -1
- package/dist/features/blockquote/server/schema.d.ts +8 -0
- package/dist/features/blockquote/server/schema.d.ts.map +1 -0
- package/dist/features/blockquote/server/schema.js +15 -0
- package/dist/features/blockquote/server/schema.js.map +1 -0
- package/dist/features/blocks/client/component/index.d.ts +2 -2
- package/dist/features/blocks/client/component/index.d.ts.map +1 -1
- package/dist/features/blocks/client/component/index.js +2 -2
- package/dist/features/blocks/client/component/index.js.map +1 -1
- package/dist/features/blocks/client/componentInline/components/InlineBlockContainer.d.ts.map +1 -1
- package/dist/features/blocks/client/componentInline/index.d.ts +2 -2
- package/dist/features/blocks/client/componentInline/index.d.ts.map +1 -1
- package/dist/features/blocks/client/componentInline/index.js +2 -2
- package/dist/features/blocks/client/componentInline/index.js.map +1 -1
- package/dist/features/blocks/client/markdown/markdownTransformer.d.ts.map +1 -1
- package/dist/features/blocks/client/markdown/markdownTransformer.js +4 -4
- package/dist/features/blocks/client/markdown/markdownTransformer.js.map +1 -1
- package/dist/features/blocks/client/nodes/BlocksNode.d.ts +2 -2
- package/dist/features/blocks/client/nodes/BlocksNode.d.ts.map +1 -1
- package/dist/features/blocks/client/nodes/BlocksNode.js.map +1 -1
- package/dist/features/blocks/client/nodes/InlineBlocksNode.d.ts +2 -2
- package/dist/features/blocks/client/nodes/InlineBlocksNode.d.ts.map +1 -1
- package/dist/features/blocks/client/nodes/InlineBlocksNode.js.map +1 -1
- package/dist/features/blocks/client/plugin/index.d.ts +1 -1
- package/dist/features/blocks/client/plugin/index.d.ts.map +1 -1
- package/dist/features/blocks/client/plugin/index.js.map +1 -1
- package/dist/features/blocks/server/graphQLPopulationPromise.d.ts +1 -2
- package/dist/features/blocks/server/graphQLPopulationPromise.d.ts.map +1 -1
- package/dist/features/blocks/server/graphQLPopulationPromise.js.map +1 -1
- package/dist/features/blocks/server/index.d.ts +1 -0
- package/dist/features/blocks/server/index.d.ts.map +1 -1
- package/dist/features/blocks/server/index.js +20 -66
- package/dist/features/blocks/server/index.js.map +1 -1
- package/dist/features/blocks/server/markdown/markdownTransformer.d.ts.map +1 -1
- package/dist/features/blocks/server/markdown/markdownTransformer.js +4 -4
- package/dist/features/blocks/server/markdown/markdownTransformer.js.map +1 -1
- package/dist/features/blocks/server/nodes/BlocksNode.d.ts +1 -18
- package/dist/features/blocks/server/nodes/BlocksNode.d.ts.map +1 -1
- package/dist/features/blocks/server/nodes/BlocksNode.js.map +1 -1
- package/dist/features/blocks/server/nodes/InlineBlocksNode.d.ts +2 -10
- package/dist/features/blocks/server/nodes/InlineBlocksNode.d.ts.map +1 -1
- package/dist/features/blocks/server/nodes/InlineBlocksNode.js.map +1 -1
- package/dist/features/blocks/server/schema.d.ts +45 -0
- package/dist/features/blocks/server/schema.d.ts.map +1 -0
- package/dist/features/blocks/server/schema.js +136 -0
- package/dist/features/blocks/server/schema.js.map +1 -0
- package/dist/features/blocks/server/validate.d.ts +1 -2
- package/dist/features/blocks/server/validate.d.ts.map +1 -1
- package/dist/features/blocks/server/validate.js.map +1 -1
- package/dist/features/converters/htmlToLexical/index.d.ts +1 -1
- package/dist/features/converters/htmlToLexical/index.d.ts.map +1 -1
- package/dist/features/converters/htmlToLexical/index.js.map +1 -1
- package/dist/features/converters/lexicalToHtml/async/converters/blockquote.d.ts +1 -1
- package/dist/features/converters/lexicalToHtml/async/converters/blockquote.d.ts.map +1 -1
- package/dist/features/converters/lexicalToHtml/async/converters/blockquote.js.map +1 -1
- package/dist/features/converters/lexicalToHtml/async/converters/heading.d.ts +1 -1
- package/dist/features/converters/lexicalToHtml/async/converters/heading.d.ts.map +1 -1
- package/dist/features/converters/lexicalToHtml/async/converters/heading.js.map +1 -1
- package/dist/features/converters/lexicalToHtml/async/converters/horizontalRule.d.ts +1 -1
- package/dist/features/converters/lexicalToHtml/async/converters/horizontalRule.d.ts.map +1 -1
- package/dist/features/converters/lexicalToHtml/async/converters/horizontalRule.js.map +1 -1
- package/dist/features/converters/lexicalToHtml/async/converters/linebreak.d.ts +1 -1
- package/dist/features/converters/lexicalToHtml/async/converters/linebreak.d.ts.map +1 -1
- package/dist/features/converters/lexicalToHtml/async/converters/linebreak.js.map +1 -1
- package/dist/features/converters/lexicalToHtml/async/converters/link.d.ts +1 -1
- package/dist/features/converters/lexicalToHtml/async/converters/link.d.ts.map +1 -1
- package/dist/features/converters/lexicalToHtml/async/converters/link.js.map +1 -1
- package/dist/features/converters/lexicalToHtml/async/converters/list.d.ts +1 -1
- package/dist/features/converters/lexicalToHtml/async/converters/list.d.ts.map +1 -1
- package/dist/features/converters/lexicalToHtml/async/converters/list.js.map +1 -1
- package/dist/features/converters/lexicalToHtml/async/converters/paragraph.d.ts +1 -1
- package/dist/features/converters/lexicalToHtml/async/converters/paragraph.d.ts.map +1 -1
- package/dist/features/converters/lexicalToHtml/async/converters/paragraph.js.map +1 -1
- package/dist/features/converters/lexicalToHtml/async/converters/tab.d.ts +1 -1
- package/dist/features/converters/lexicalToHtml/async/converters/tab.d.ts.map +1 -1
- package/dist/features/converters/lexicalToHtml/async/converters/tab.js.map +1 -1
- package/dist/features/converters/lexicalToHtml/async/converters/table.d.ts +1 -1
- package/dist/features/converters/lexicalToHtml/async/converters/table.d.ts.map +1 -1
- package/dist/features/converters/lexicalToHtml/async/converters/table.js +1 -1
- package/dist/features/converters/lexicalToHtml/async/converters/table.js.map +1 -1
- package/dist/features/converters/lexicalToHtml/async/converters/text.d.ts +1 -1
- package/dist/features/converters/lexicalToHtml/async/converters/text.d.ts.map +1 -1
- package/dist/features/converters/lexicalToHtml/async/converters/text.js.map +1 -1
- package/dist/features/converters/lexicalToHtml/async/converters/upload.d.ts +1 -1
- package/dist/features/converters/lexicalToHtml/async/converters/upload.d.ts.map +1 -1
- package/dist/features/converters/lexicalToHtml/async/converters/upload.js.map +1 -1
- package/dist/features/converters/lexicalToHtml/async/defaultConverters.d.ts +1 -1
- package/dist/features/converters/lexicalToHtml/async/defaultConverters.d.ts.map +1 -1
- package/dist/features/converters/lexicalToHtml/async/defaultConverters.js.map +1 -1
- package/dist/features/converters/lexicalToHtml/async/types.d.ts +2 -1
- package/dist/features/converters/lexicalToHtml/async/types.d.ts.map +1 -1
- package/dist/features/converters/lexicalToHtml/async/types.js.map +1 -1
- package/dist/features/converters/lexicalToHtml/shared/cssColors.d.ts.map +1 -1
- package/dist/features/converters/lexicalToHtml/shared/findConverterForNode.js.map +1 -1
- package/dist/features/converters/lexicalToHtml/sync/converters/blockquote.d.ts +1 -1
- package/dist/features/converters/lexicalToHtml/sync/converters/blockquote.d.ts.map +1 -1
- package/dist/features/converters/lexicalToHtml/sync/converters/blockquote.js.map +1 -1
- package/dist/features/converters/lexicalToHtml/sync/converters/heading.d.ts +1 -1
- package/dist/features/converters/lexicalToHtml/sync/converters/heading.d.ts.map +1 -1
- package/dist/features/converters/lexicalToHtml/sync/converters/heading.js.map +1 -1
- package/dist/features/converters/lexicalToHtml/sync/converters/horizontalRule.d.ts +1 -1
- package/dist/features/converters/lexicalToHtml/sync/converters/horizontalRule.d.ts.map +1 -1
- package/dist/features/converters/lexicalToHtml/sync/converters/horizontalRule.js.map +1 -1
- package/dist/features/converters/lexicalToHtml/sync/converters/linebreak.d.ts +1 -1
- package/dist/features/converters/lexicalToHtml/sync/converters/linebreak.d.ts.map +1 -1
- package/dist/features/converters/lexicalToHtml/sync/converters/linebreak.js.map +1 -1
- package/dist/features/converters/lexicalToHtml/sync/converters/link.d.ts +1 -1
- package/dist/features/converters/lexicalToHtml/sync/converters/link.d.ts.map +1 -1
- package/dist/features/converters/lexicalToHtml/sync/converters/link.js.map +1 -1
- package/dist/features/converters/lexicalToHtml/sync/converters/list.d.ts +1 -1
- package/dist/features/converters/lexicalToHtml/sync/converters/list.d.ts.map +1 -1
- package/dist/features/converters/lexicalToHtml/sync/converters/list.js.map +1 -1
- package/dist/features/converters/lexicalToHtml/sync/converters/paragraph.d.ts +1 -1
- package/dist/features/converters/lexicalToHtml/sync/converters/paragraph.d.ts.map +1 -1
- package/dist/features/converters/lexicalToHtml/sync/converters/paragraph.js.map +1 -1
- package/dist/features/converters/lexicalToHtml/sync/converters/tab.d.ts +1 -1
- package/dist/features/converters/lexicalToHtml/sync/converters/tab.d.ts.map +1 -1
- package/dist/features/converters/lexicalToHtml/sync/converters/tab.js.map +1 -1
- package/dist/features/converters/lexicalToHtml/sync/converters/table.d.ts +1 -1
- package/dist/features/converters/lexicalToHtml/sync/converters/table.d.ts.map +1 -1
- package/dist/features/converters/lexicalToHtml/sync/converters/table.js +1 -1
- package/dist/features/converters/lexicalToHtml/sync/converters/table.js.map +1 -1
- package/dist/features/converters/lexicalToHtml/sync/converters/text.d.ts +1 -1
- package/dist/features/converters/lexicalToHtml/sync/converters/text.d.ts.map +1 -1
- package/dist/features/converters/lexicalToHtml/sync/converters/text.js.map +1 -1
- package/dist/features/converters/lexicalToHtml/sync/converters/upload.d.ts +1 -1
- package/dist/features/converters/lexicalToHtml/sync/converters/upload.d.ts.map +1 -1
- package/dist/features/converters/lexicalToHtml/sync/converters/upload.js.map +1 -1
- package/dist/features/converters/lexicalToHtml/sync/defaultConverters.d.ts +1 -1
- package/dist/features/converters/lexicalToHtml/sync/defaultConverters.d.ts.map +1 -1
- package/dist/features/converters/lexicalToHtml/sync/defaultConverters.js.map +1 -1
- package/dist/features/converters/lexicalToHtml/sync/types.d.ts +2 -1
- package/dist/features/converters/lexicalToHtml/sync/types.d.ts.map +1 -1
- package/dist/features/converters/lexicalToHtml/sync/types.js.map +1 -1
- package/dist/features/converters/lexicalToJSX/Component/index.d.ts +4 -2
- package/dist/features/converters/lexicalToJSX/Component/index.d.ts.map +1 -1
- package/dist/features/converters/lexicalToJSX/Component/index.js.map +1 -1
- package/dist/features/converters/lexicalToJSX/converter/converters/blockquote.d.ts +1 -1
- package/dist/features/converters/lexicalToJSX/converter/converters/blockquote.d.ts.map +1 -1
- package/dist/features/converters/lexicalToJSX/converter/converters/blockquote.js.map +1 -1
- package/dist/features/converters/lexicalToJSX/converter/converters/heading.d.ts +1 -1
- package/dist/features/converters/lexicalToJSX/converter/converters/heading.d.ts.map +1 -1
- package/dist/features/converters/lexicalToJSX/converter/converters/heading.js.map +1 -1
- package/dist/features/converters/lexicalToJSX/converter/converters/horizontalRule.d.ts +1 -1
- package/dist/features/converters/lexicalToJSX/converter/converters/horizontalRule.d.ts.map +1 -1
- package/dist/features/converters/lexicalToJSX/converter/converters/horizontalRule.js.map +1 -1
- package/dist/features/converters/lexicalToJSX/converter/converters/linebreak.d.ts +1 -1
- package/dist/features/converters/lexicalToJSX/converter/converters/linebreak.d.ts.map +1 -1
- package/dist/features/converters/lexicalToJSX/converter/converters/linebreak.js.map +1 -1
- package/dist/features/converters/lexicalToJSX/converter/converters/link.d.ts +1 -1
- package/dist/features/converters/lexicalToJSX/converter/converters/link.d.ts.map +1 -1
- package/dist/features/converters/lexicalToJSX/converter/converters/link.js.map +1 -1
- package/dist/features/converters/lexicalToJSX/converter/converters/list.d.ts +1 -1
- package/dist/features/converters/lexicalToJSX/converter/converters/list.d.ts.map +1 -1
- package/dist/features/converters/lexicalToJSX/converter/converters/list.js.map +1 -1
- package/dist/features/converters/lexicalToJSX/converter/converters/paragraph.d.ts +1 -1
- package/dist/features/converters/lexicalToJSX/converter/converters/paragraph.d.ts.map +1 -1
- package/dist/features/converters/lexicalToJSX/converter/converters/paragraph.js.map +1 -1
- package/dist/features/converters/lexicalToJSX/converter/converters/tab.d.ts +1 -1
- package/dist/features/converters/lexicalToJSX/converter/converters/tab.d.ts.map +1 -1
- package/dist/features/converters/lexicalToJSX/converter/converters/tab.js.map +1 -1
- package/dist/features/converters/lexicalToJSX/converter/converters/table.d.ts +1 -1
- package/dist/features/converters/lexicalToJSX/converter/converters/table.d.ts.map +1 -1
- package/dist/features/converters/lexicalToJSX/converter/converters/table.js.map +1 -1
- package/dist/features/converters/lexicalToJSX/converter/converters/text.d.ts +1 -1
- package/dist/features/converters/lexicalToJSX/converter/converters/text.d.ts.map +1 -1
- package/dist/features/converters/lexicalToJSX/converter/converters/text.js.map +1 -1
- package/dist/features/converters/lexicalToJSX/converter/converters/upload.d.ts +1 -1
- package/dist/features/converters/lexicalToJSX/converter/converters/upload.d.ts.map +1 -1
- package/dist/features/converters/lexicalToJSX/converter/converters/upload.js.map +1 -1
- package/dist/features/converters/lexicalToJSX/converter/defaultConverters.d.ts +1 -1
- package/dist/features/converters/lexicalToJSX/converter/defaultConverters.d.ts.map +1 -1
- package/dist/features/converters/lexicalToJSX/converter/defaultConverters.js.map +1 -1
- package/dist/features/converters/lexicalToJSX/converter/index.d.ts +1 -1
- package/dist/features/converters/lexicalToJSX/converter/index.d.ts.map +1 -1
- package/dist/features/converters/lexicalToJSX/converter/index.js.map +1 -1
- package/dist/features/converters/lexicalToJSX/converter/types.d.ts +1 -1
- package/dist/features/converters/lexicalToJSX/converter/types.d.ts.map +1 -1
- package/dist/features/converters/lexicalToJSX/converter/types.js.map +1 -1
- package/dist/features/converters/lexicalToMarkdown/index.d.ts.map +1 -1
- package/dist/features/converters/lexicalToPlaintext/convertLexicalToPlaintext.spec.js.map +1 -1
- package/dist/features/converters/lexicalToPlaintext/shared/findConverterForNode.js.map +1 -1
- package/dist/features/converters/lexicalToPlaintext/sync/types.d.ts +1 -1
- package/dist/features/converters/lexicalToPlaintext/sync/types.d.ts.map +1 -1
- package/dist/features/converters/lexicalToPlaintext/sync/types.js.map +1 -1
- package/dist/features/converters/markdownToLexical/index.d.ts +1 -1
- package/dist/features/converters/markdownToLexical/index.d.ts.map +1 -1
- package/dist/features/converters/markdownToLexical/index.js.map +1 -1
- package/dist/features/experimental_table/client/plugins/TableActionMenuPlugin/index.css +4 -4
- package/dist/features/experimental_table/client/plugins/TablePlugin/TableGridPopup/index.css +1 -1
- package/dist/features/experimental_table/server/index.d.ts +1 -6
- package/dist/features/experimental_table/server/index.d.ts.map +1 -1
- package/dist/features/experimental_table/server/index.js +4 -0
- package/dist/features/experimental_table/server/index.js.map +1 -1
- package/dist/features/experimental_table/server/schema.d.ts +27 -0
- package/dist/features/experimental_table/server/schema.d.ts.map +1 -0
- package/dist/features/experimental_table/server/schema.js +104 -0
- package/dist/features/experimental_table/server/schema.js.map +1 -0
- package/dist/features/format/shared/toolbarFormatGroup.d.ts.map +1 -1
- package/dist/features/heading/server/index.d.ts +2 -4
- package/dist/features/heading/server/index.d.ts.map +1 -1
- package/dist/features/heading/server/index.js +2 -0
- package/dist/features/heading/server/index.js.map +1 -1
- package/dist/features/heading/server/schema.d.ts +10 -0
- package/dist/features/heading/server/schema.d.ts.map +1 -0
- package/dist/features/heading/server/schema.js +37 -0
- package/dist/features/heading/server/schema.js.map +1 -0
- package/dist/features/horizontalRule/client/nodes/HorizontalRuleNode.d.ts +1 -1
- package/dist/features/horizontalRule/client/nodes/HorizontalRuleNode.d.ts.map +1 -1
- package/dist/features/horizontalRule/client/nodes/HorizontalRuleNode.js.map +1 -1
- package/dist/features/horizontalRule/server/index.d.ts +1 -0
- package/dist/features/horizontalRule/server/index.d.ts.map +1 -1
- package/dist/features/horizontalRule/server/index.js +2 -0
- package/dist/features/horizontalRule/server/index.js.map +1 -1
- package/dist/features/horizontalRule/server/nodes/HorizontalRuleNode.d.ts +1 -5
- package/dist/features/horizontalRule/server/nodes/HorizontalRuleNode.d.ts.map +1 -1
- package/dist/features/horizontalRule/server/nodes/HorizontalRuleNode.js.map +1 -1
- package/dist/features/horizontalRule/server/schema.d.ts +7 -0
- package/dist/features/horizontalRule/server/schema.d.ts.map +1 -0
- package/dist/features/horizontalRule/server/schema.js +25 -0
- package/dist/features/horizontalRule/server/schema.js.map +1 -0
- package/dist/features/indent/client/toolbarIndentGroup.d.ts.map +1 -1
- package/dist/features/link/client/index.d.ts.map +1 -1
- package/dist/features/link/client/index.js.map +1 -1
- package/dist/features/link/client/plugins/autoLink/index.d.ts +1 -1
- package/dist/features/link/client/plugins/autoLink/index.d.ts.map +1 -1
- package/dist/features/link/client/plugins/autoLink/index.js.map +1 -1
- package/dist/features/link/client/plugins/floatingLinkEditor/LinkEditor/index.js.map +1 -1
- package/dist/features/link/client/plugins/floatingLinkEditor/index.css +2 -2
- package/dist/features/link/client/plugins/floatingLinkEditor/types.d.ts +1 -1
- package/dist/features/link/client/plugins/floatingLinkEditor/types.d.ts.map +1 -1
- package/dist/features/link/client/plugins/floatingLinkEditor/types.js.map +1 -1
- package/dist/features/link/client/plugins/link/index.js.map +1 -1
- package/dist/features/link/markdownTransformer.d.ts +1 -1
- package/dist/features/link/markdownTransformer.d.ts.map +1 -1
- package/dist/features/link/markdownTransformer.js.map +1 -1
- package/dist/features/link/markdownTransformer.spec.js.map +1 -1
- package/dist/features/link/nodes/AutoLinkNode.d.ts +3 -3
- package/dist/features/link/nodes/AutoLinkNode.d.ts.map +1 -1
- package/dist/features/link/nodes/AutoLinkNode.js +2 -1
- package/dist/features/link/nodes/AutoLinkNode.js.map +1 -1
- package/dist/features/link/nodes/LinkNode.d.ts +3 -3
- package/dist/features/link/nodes/LinkNode.d.ts.map +1 -1
- package/dist/features/link/nodes/LinkNode.js +2 -1
- package/dist/features/link/nodes/LinkNode.js.map +1 -1
- package/dist/features/link/server/baseFields.d.ts.map +1 -1
- package/dist/features/link/server/baseFields.js.map +1 -1
- package/dist/features/link/server/graphQLPopulationPromise.d.ts +1 -1
- package/dist/features/link/server/graphQLPopulationPromise.d.ts.map +1 -1
- package/dist/features/link/server/graphQLPopulationPromise.js.map +1 -1
- package/dist/features/link/server/index.d.ts +2 -1
- package/dist/features/link/server/index.d.ts.map +1 -1
- package/dist/features/link/server/index.js +3 -0
- package/dist/features/link/server/index.js.map +1 -1
- package/dist/features/link/server/schema.d.ts +32 -0
- package/dist/features/link/server/schema.d.ts.map +1 -0
- package/dist/features/link/server/schema.js +166 -0
- package/dist/features/link/server/schema.js.map +1 -0
- package/dist/features/link/server/validate.d.ts +1 -1
- package/dist/features/link/server/validate.d.ts.map +1 -1
- package/dist/features/link/server/validate.js.map +1 -1
- package/dist/features/lists/checklist/server/index.d.ts.map +1 -1
- package/dist/features/lists/checklist/server/index.js +3 -0
- package/dist/features/lists/checklist/server/index.js.map +1 -1
- package/dist/features/lists/orderedList/server/index.d.ts.map +1 -1
- package/dist/features/lists/orderedList/server/index.js +3 -0
- package/dist/features/lists/orderedList/server/index.js.map +1 -1
- package/dist/features/lists/plugin/index.d.ts +0 -9
- package/dist/features/lists/plugin/index.d.ts.map +1 -1
- package/dist/features/lists/plugin/index.js.map +1 -1
- package/dist/features/lists/shared/markdown.d.ts.map +1 -1
- package/dist/features/lists/shared/schema.d.ts +18 -0
- package/dist/features/lists/shared/schema.d.ts.map +1 -0
- package/dist/features/lists/shared/schema.js +62 -0
- package/dist/features/lists/shared/schema.js.map +1 -0
- package/dist/features/lists/unorderedList/server/index.d.ts.map +1 -1
- package/dist/features/lists/unorderedList/server/index.js +3 -0
- package/dist/features/lists/unorderedList/server/index.js.map +1 -1
- package/dist/features/relationship/client/components/RelationshipComponent.d.ts +1 -1
- package/dist/features/relationship/client/components/RelationshipComponent.d.ts.map +1 -1
- package/dist/features/relationship/client/components/RelationshipComponent.js +2 -2
- package/dist/features/relationship/client/components/RelationshipComponent.js.map +1 -1
- package/dist/features/relationship/client/components/index.css +2 -2
- package/dist/features/relationship/client/drawer/index.d.ts.map +1 -1
- package/dist/features/relationship/client/nodes/RelationshipNode.d.ts +1 -1
- package/dist/features/relationship/client/nodes/RelationshipNode.d.ts.map +1 -1
- package/dist/features/relationship/client/nodes/RelationshipNode.js.map +1 -1
- package/dist/features/relationship/client/plugins/index.d.ts +1 -1
- package/dist/features/relationship/client/plugins/index.d.ts.map +1 -1
- package/dist/features/relationship/client/plugins/index.js.map +1 -1
- package/dist/features/relationship/client/utils/useEnabledRelationships.d.ts.map +1 -1
- package/dist/features/relationship/client/utils/useEnabledRelationships.js +9 -40
- package/dist/features/relationship/client/utils/useEnabledRelationships.js.map +1 -1
- package/dist/features/relationship/server/graphQLPopulationPromise.d.ts +1 -1
- package/dist/features/relationship/server/graphQLPopulationPromise.d.ts.map +1 -1
- package/dist/features/relationship/server/graphQLPopulationPromise.js.map +1 -1
- package/dist/features/relationship/server/index.d.ts +1 -0
- package/dist/features/relationship/server/index.d.ts.map +1 -1
- package/dist/features/relationship/server/index.js +2 -0
- package/dist/features/relationship/server/index.js.map +1 -1
- package/dist/features/relationship/server/nodes/RelationshipNode.d.ts +1 -10
- package/dist/features/relationship/server/nodes/RelationshipNode.d.ts.map +1 -1
- package/dist/features/relationship/server/nodes/RelationshipNode.js.map +1 -1
- package/dist/features/relationship/server/schema.d.ts +28 -0
- package/dist/features/relationship/server/schema.d.ts.map +1 -0
- package/dist/features/relationship/server/schema.js +83 -0
- package/dist/features/relationship/server/schema.js.map +1 -0
- package/dist/features/relationship/shared/filterEnabledRelationshipCollections.d.ts +23 -0
- package/dist/features/relationship/shared/filterEnabledRelationshipCollections.d.ts.map +1 -0
- package/dist/features/relationship/shared/filterEnabledRelationshipCollections.js +34 -0
- package/dist/features/relationship/shared/filterEnabledRelationshipCollections.js.map +1 -0
- package/dist/features/shared/toolbar/addDropdownGroup.d.ts.map +1 -1
- package/dist/features/shared/toolbar/featureButtonsGroup.d.ts.map +1 -1
- package/dist/features/shared/toolbar/textDropdownGroup.d.ts.map +1 -1
- package/dist/features/toolbars/shared/ToolbarButton/index.d.ts.map +1 -1
- package/dist/features/toolbars/shared/ToolbarDropdown/DropDown.d.ts.map +1 -1
- package/dist/features/toolbars/shared/ToolbarDropdown/DropDown.js +1 -2
- package/dist/features/toolbars/shared/ToolbarDropdown/DropDown.js.map +1 -1
- package/dist/features/toolbars/shared/ToolbarDropdown/index.css +4 -4
- package/dist/features/toolbars/shared/ToolbarDropdown/index.d.ts.map +1 -1
- package/dist/features/toolbars/types.d.ts +1 -1
- package/dist/features/toolbars/types.d.ts.map +1 -1
- package/dist/features/toolbars/types.js.map +1 -1
- package/dist/features/typesClient.d.ts +1 -1
- package/dist/features/typesClient.d.ts.map +1 -1
- package/dist/features/typesClient.js.map +1 -1
- package/dist/features/typesServer.d.ts +18 -41
- package/dist/features/typesServer.d.ts.map +1 -1
- package/dist/features/typesServer.js.map +1 -1
- package/dist/features/upload/client/component/index.css +14 -18
- package/dist/features/upload/client/component/index.d.ts +1 -1
- package/dist/features/upload/client/component/index.d.ts.map +1 -1
- package/dist/features/upload/client/component/index.js +4 -4
- package/dist/features/upload/client/component/index.js.map +1 -1
- package/dist/features/upload/client/drawer/index.d.ts.map +1 -1
- package/dist/features/upload/client/nodes/UploadNode.d.ts +1 -1
- package/dist/features/upload/client/nodes/UploadNode.d.ts.map +1 -1
- package/dist/features/upload/client/nodes/UploadNode.js.map +1 -1
- package/dist/features/upload/client/plugin/index.d.ts +1 -1
- package/dist/features/upload/client/plugin/index.d.ts.map +1 -1
- package/dist/features/upload/client/plugin/index.js.map +1 -1
- package/dist/features/upload/server/graphQLPopulationPromise.d.ts +1 -1
- package/dist/features/upload/server/graphQLPopulationPromise.d.ts.map +1 -1
- package/dist/features/upload/server/graphQLPopulationPromise.js.map +1 -1
- package/dist/features/upload/server/index.d.ts +1 -0
- package/dist/features/upload/server/index.d.ts.map +1 -1
- package/dist/features/upload/server/index.js +3 -2
- package/dist/features/upload/server/index.js.map +1 -1
- package/dist/features/upload/server/nodes/UploadNode.d.ts +1 -55
- package/dist/features/upload/server/nodes/UploadNode.d.ts.map +1 -1
- package/dist/features/upload/server/nodes/UploadNode.js.map +1 -1
- package/dist/features/upload/server/nodes/conversions.d.ts.map +1 -1
- package/dist/features/upload/server/nodes/conversions.js.map +1 -1
- package/dist/features/upload/server/schema.d.ts +52 -0
- package/dist/features/upload/server/schema.d.ts.map +1 -0
- package/dist/features/upload/server/schema.js +113 -0
- package/dist/features/upload/server/schema.js.map +1 -0
- package/dist/features/upload/server/validate.d.ts +1 -1
- package/dist/features/upload/server/validate.d.ts.map +1 -1
- package/dist/features/upload/server/validate.js.map +1 -1
- package/dist/field/Diff/converters/link.d.ts +1 -1
- package/dist/field/Diff/converters/link.d.ts.map +1 -1
- package/dist/field/Diff/converters/link.js.map +1 -1
- package/dist/field/Diff/converters/listitem/index.css +44 -8
- package/dist/field/Diff/converters/listitem/index.d.ts +1 -1
- package/dist/field/Diff/converters/listitem/index.d.ts.map +1 -1
- package/dist/field/Diff/converters/listitem/index.js.map +1 -1
- package/dist/field/Diff/converters/relationship/index.css +76 -36
- package/dist/field/Diff/converters/relationship/index.d.ts +1 -1
- package/dist/field/Diff/converters/relationship/index.d.ts.map +1 -1
- package/dist/field/Diff/converters/relationship/index.js +10 -28
- package/dist/field/Diff/converters/relationship/index.js.map +1 -1
- package/dist/field/Diff/converters/unknown/index.js.map +1 -1
- package/dist/field/Diff/converters/upload/index.css +106 -43
- package/dist/field/Diff/converters/upload/index.d.ts +1 -1
- package/dist/field/Diff/converters/upload/index.d.ts.map +1 -1
- package/dist/field/Diff/converters/upload/index.js +6 -2
- package/dist/field/Diff/converters/upload/index.js.map +1 -1
- package/dist/field/Diff/index.css +116 -61
- package/dist/field/Diff/index.js.map +1 -1
- package/dist/field/Field.d.ts +1 -1
- package/dist/field/Field.d.ts.map +1 -1
- package/dist/field/Field.js +3 -4
- package/dist/field/Field.js.map +1 -1
- package/dist/field/RenderLexical/index.d.ts +2 -2
- package/dist/field/RenderLexical/index.d.ts.map +1 -1
- package/dist/field/RenderLexical/index.js.map +1 -1
- package/dist/field/RichTextViewProvider.d.ts +1 -1
- package/dist/field/RichTextViewProvider.d.ts.map +1 -1
- package/dist/field/RichTextViewProvider.js.map +1 -1
- package/dist/field/bundled.css +1 -1
- package/dist/field/index.d.ts +1 -1
- package/dist/field/index.d.ts.map +1 -1
- package/dist/field/index.js.map +1 -1
- package/dist/field/rscEntry.d.ts +1 -1
- package/dist/field/rscEntry.d.ts.map +1 -1
- package/dist/field/rscEntry.js.map +1 -1
- package/dist/hooks.d.ts +6 -0
- package/dist/hooks.d.ts.map +1 -0
- package/dist/hooks.js +548 -0
- package/dist/hooks.js.map +1 -0
- package/dist/index.d.ts +11 -8
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +9 -618
- package/dist/index.js.map +1 -1
- package/dist/lexical/LexicalProvider.d.ts +1 -1
- package/dist/lexical/LexicalProvider.d.ts.map +1 -1
- package/dist/lexical/LexicalProvider.js.map +1 -1
- package/dist/lexical/config/client/EditorConfigProvider.d.ts +1 -1
- package/dist/lexical/config/client/EditorConfigProvider.d.ts.map +1 -1
- package/dist/lexical/config/client/EditorConfigProvider.js.map +1 -1
- package/dist/lexical/config/client/loader.d.ts +1 -1
- package/dist/lexical/config/client/loader.d.ts.map +1 -1
- package/dist/lexical/config/client/loader.js.map +1 -1
- package/dist/lexical/config/client/sanitize.d.ts +1 -1
- package/dist/lexical/config/client/sanitize.d.ts.map +1 -1
- package/dist/lexical/config/client/sanitize.js.map +1 -1
- package/dist/lexical/config/server/sanitize.d.ts.map +1 -1
- package/dist/lexical/config/server/sanitize.js +9 -11
- package/dist/lexical/config/server/sanitize.js.map +1 -1
- package/dist/lexical/config/types.d.ts +1 -1
- package/dist/lexical/config/types.d.ts.map +1 -1
- package/dist/lexical/config/types.js.map +1 -1
- package/dist/lexical/nodes/index.d.ts +1 -1
- package/dist/lexical/nodes/index.d.ts.map +1 -1
- package/dist/lexical/nodes/index.js.map +1 -1
- package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/types.d.ts +1 -1
- 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/handles/DraggableBlockPlugin/debounce.d.ts.map +1 -1
- package/dist/lexical/plugins/handles/utils/calculateDistanceFromScrollerElem.d.ts.map +1 -1
- package/dist/lexical/theme/EditorTheme.css +4 -4
- package/dist/lexical/utils/markdown/createBlockNode.d.ts.map +1 -1
- package/dist/populateGraphQL/populateLexicalPopulationPromises.d.ts +1 -1
- package/dist/populateGraphQL/populateLexicalPopulationPromises.d.ts.map +1 -1
- package/dist/populateGraphQL/populateLexicalPopulationPromises.js.map +1 -1
- package/dist/populateGraphQL/recursivelyPopulateFieldsForGraphQL.d.ts.map +1 -1
- package/dist/types/builtInNodes.d.ts +14 -0
- package/dist/types/builtInNodes.d.ts.map +1 -0
- package/dist/types/builtInNodes.js +203 -0
- package/dist/types/builtInNodes.js.map +1 -0
- package/dist/{types.d.ts → types/index.d.ts} +9 -10
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/index.js +2 -0
- package/dist/types/index.js.map +1 -0
- package/dist/types/jsonSchemaHelpers.d.ts +28 -0
- package/dist/types/jsonSchemaHelpers.d.ts.map +1 -0
- package/dist/types/jsonSchemaHelpers.js +54 -0
- package/dist/types/jsonSchemaHelpers.js.map +1 -0
- package/dist/types/nodeTypes.d.ts +86 -0
- package/dist/types/nodeTypes.d.ts.map +1 -0
- package/dist/types/nodeTypes.js +6 -0
- package/dist/types/nodeTypes.js.map +1 -0
- package/dist/types/schema.d.ts +6 -0
- package/dist/types/schema.d.ts.map +1 -0
- package/dist/types/schema.js +73 -0
- package/dist/types/schema.js.map +1 -0
- package/dist/utilities/buildEditorState.d.ts +1 -1
- package/dist/utilities/buildEditorState.d.ts.map +1 -1
- package/dist/utilities/buildEditorState.js.map +1 -1
- package/dist/utilities/buildInitialState.js.map +1 -1
- package/dist/utilities/createClientFeature.d.ts +1 -1
- package/dist/utilities/createClientFeature.d.ts.map +1 -1
- package/dist/utilities/createClientFeature.js.map +1 -1
- package/dist/utilities/editorConfigFactory.d.ts +1 -1
- package/dist/utilities/editorConfigFactory.d.ts.map +1 -1
- package/dist/utilities/editorConfigFactory.js.map +1 -1
- package/dist/utilities/fieldsDrawer/useLexicalDocumentDrawer.d.ts.map +1 -1
- package/dist/utilities/fieldsDrawer/useLexicalDrawer.d.ts.map +1 -1
- package/dist/utilities/fieldsDrawer/useLexicalListDrawer.d.ts.map +1 -1
- package/dist/utilities/generateImportMap.d.ts +1 -1
- package/dist/utilities/generateImportMap.d.ts.map +1 -1
- package/dist/utilities/generateImportMap.js.map +1 -1
- package/dist/utilities/generateSchemaMap.d.ts.map +1 -1
- package/dist/utilities/getDefaultSanitizedEditorConfig.d.ts.map +1 -1
- package/dist/utilities/initLexicalFeatures.d.ts +1 -1
- package/dist/utilities/initLexicalFeatures.d.ts.map +1 -1
- package/dist/utilities/initLexicalFeatures.js.map +1 -1
- package/dist/utilities/recurseNodeTree.d.ts.map +1 -1
- package/dist/utilities/upgradeLexicalData/upgradeDocumentFieldsRecursively.d.ts.map +1 -1
- package/dist/utilities/upgradeLexicalData/upgradeDocumentFieldsRecursively.js.map +1 -1
- package/dist/utilities/useLexicalFeature.d.ts.map +1 -1
- package/dist/validate/index.d.ts.map +1 -1
- package/package.json +13 -13
- package/dist/exports/client/Field-PJW7KUJG.js.map +0 -7
- package/dist/exports/client/RelationshipComponent-5RONAYJM.js.map +0 -7
- package/dist/exports/client/chunk-44G3K3W7.js.map +0 -7
- package/dist/exports/client/chunk-BZZVLW4U.js.map +0 -7
- package/dist/exports/client/chunk-FTT5KJ6W.js.map +0 -7
- package/dist/exports/client/component-53Y3RYR5.js +0 -2
- package/dist/exports/client/component-53Y3RYR5.js.map +0 -7
- package/dist/exports/client/componentInline-PM4PLNUK.js +0 -2
- package/dist/features/link/nodes/types.d.ts +0 -27
- package/dist/features/link/nodes/types.d.ts.map +0 -1
- package/dist/features/link/nodes/types.js +0 -2
- package/dist/features/link/nodes/types.js.map +0 -1
- package/dist/nodeTypes.d.ts +0 -74
- package/dist/nodeTypes.d.ts.map +0 -1
- package/dist/nodeTypes.js +0 -5
- package/dist/nodeTypes.js.map +0 -1
- package/dist/types.d.ts.map +0 -1
- package/dist/types.js +0 -2
- package/dist/types.js.map +0 -1
- /package/dist/exports/client/{chunk-QJ5EETIB.js.map → chunk-6QWQ7JV4.js.map} +0 -0
- /package/dist/exports/client/{componentInline-PM4PLNUK.js.map → componentInline-D3A6OW76.js.map} +0 -0
package/dist/index.js
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { checkDependencies, deepMergeSimple } from 'payload';
|
|
2
|
+
import { getLexicalHooks } from './hooks.js';
|
|
2
3
|
import { i18n } from './i18n.js';
|
|
3
4
|
import { defaultEditorFeatures } from './lexical/config/server/default.js';
|
|
4
5
|
import { populateLexicalPopulationPromises } from './populateGraphQL/populateLexicalPopulationPromises.js';
|
|
6
|
+
import { getFieldToJSONSchema } from './types/schema.js';
|
|
5
7
|
import { featuresInputToEditorConfig } from './utilities/editorConfigFactory.js';
|
|
6
8
|
import { getGenerateImportMap } from './utilities/generateImportMap.js';
|
|
7
9
|
import { getGenerateSchemaMap } from './utilities/generateSchemaMap.js';
|
|
8
10
|
import { getDefaultSanitizedEditorConfig } from './utilities/getDefaultSanitizedEditorConfig.js';
|
|
9
|
-
import { recurseNodeTree } from './utilities/recurseNodeTree.js';
|
|
10
11
|
import { richTextValidateHOC } from './validate/index.js';
|
|
11
12
|
let checkedDependencies = false;
|
|
12
13
|
export const lexicalTargetVersion = '0.41.0';
|
|
@@ -121,622 +122,12 @@ export function lexicalEditor(args) {
|
|
|
121
122
|
});
|
|
122
123
|
}
|
|
123
124
|
},
|
|
124
|
-
hooks: {
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
field,
|
|
131
|
-
global,
|
|
132
|
-
indexPath,
|
|
133
|
-
operation,
|
|
134
|
-
originalDoc,
|
|
135
|
-
parentIsLocalized,
|
|
136
|
-
path,
|
|
137
|
-
previousDoc,
|
|
138
|
-
previousValue,
|
|
139
|
-
req,
|
|
140
|
-
schemaPath
|
|
141
|
-
} = args;
|
|
142
|
-
let {
|
|
143
|
-
value
|
|
144
|
-
} = args;
|
|
145
|
-
if (finalSanitizedEditorConfig?.features?.hooks?.afterChange?.length) {
|
|
146
|
-
for (const hook of finalSanitizedEditorConfig.features.hooks.afterChange) {
|
|
147
|
-
value = await hook(args);
|
|
148
|
-
}
|
|
149
|
-
}
|
|
150
|
-
if (!finalSanitizedEditorConfig.features.nodeHooks?.afterChange?.size && !finalSanitizedEditorConfig.features.getSubFields?.size) {
|
|
151
|
-
return value;
|
|
152
|
-
}
|
|
153
|
-
// TO-DO: We should not use context, as it is intended for external use only
|
|
154
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
155
|
-
const context = _context;
|
|
156
|
-
const nodeIDMap = {};
|
|
157
|
-
const previousNodeIDMap = {};
|
|
158
|
-
/**
|
|
159
|
-
* Get the originalNodeIDMap from the beforeValidate hook, which is always run before this hook.
|
|
160
|
-
*/
|
|
161
|
-
const originalNodeIDMap = context?.internal?.richText?.[path.join('.')]?.originalNodeIDMap;
|
|
162
|
-
if (!originalNodeIDMap || !Object.keys(originalNodeIDMap).length || !value) {
|
|
163
|
-
return value;
|
|
164
|
-
}
|
|
165
|
-
recurseNodeTree({
|
|
166
|
-
nodeIDMap,
|
|
167
|
-
nodes: value?.root?.children ?? []
|
|
168
|
-
});
|
|
169
|
-
recurseNodeTree({
|
|
170
|
-
nodeIDMap: previousNodeIDMap,
|
|
171
|
-
nodes: previousValue?.root?.children ?? []
|
|
172
|
-
});
|
|
173
|
-
// eslint-disable-next-line prefer-const
|
|
174
|
-
for (let [id, node] of Object.entries(nodeIDMap)) {
|
|
175
|
-
const afterChangeHooks = finalSanitizedEditorConfig.features.nodeHooks?.afterChange;
|
|
176
|
-
const afterChangeHooksForNode = afterChangeHooks?.get(node.type);
|
|
177
|
-
if (afterChangeHooksForNode) {
|
|
178
|
-
for (const hook of afterChangeHooksForNode) {
|
|
179
|
-
if (!originalNodeIDMap[id]) {
|
|
180
|
-
console.warn('(afterChange) No original node found for node with id', id, 'node:', node, 'path', path.join('.'));
|
|
181
|
-
continue;
|
|
182
|
-
}
|
|
183
|
-
node = await hook({
|
|
184
|
-
context,
|
|
185
|
-
node,
|
|
186
|
-
operation,
|
|
187
|
-
originalNode: originalNodeIDMap[id],
|
|
188
|
-
parentRichTextFieldPath: path,
|
|
189
|
-
parentRichTextFieldSchemaPath: schemaPath,
|
|
190
|
-
previousNode: previousNodeIDMap[id],
|
|
191
|
-
req
|
|
192
|
-
});
|
|
193
|
-
}
|
|
194
|
-
}
|
|
195
|
-
const subFieldFn = finalSanitizedEditorConfig.features.getSubFields?.get(node.type);
|
|
196
|
-
const subFieldDataFn = finalSanitizedEditorConfig.features.getSubFieldsData?.get(node.type);
|
|
197
|
-
if (subFieldFn && subFieldDataFn) {
|
|
198
|
-
const subFields = subFieldFn({
|
|
199
|
-
node,
|
|
200
|
-
req
|
|
201
|
-
});
|
|
202
|
-
const nodeSiblingData = subFieldDataFn({
|
|
203
|
-
node,
|
|
204
|
-
req
|
|
205
|
-
}) ?? {};
|
|
206
|
-
const nodeSiblingDoc = subFieldDataFn({
|
|
207
|
-
node: originalNodeIDMap[id],
|
|
208
|
-
req
|
|
209
|
-
}) ?? {};
|
|
210
|
-
const nodePreviousSiblingDoc = subFieldDataFn({
|
|
211
|
-
node: previousNodeIDMap[id],
|
|
212
|
-
req
|
|
213
|
-
}) ?? {};
|
|
214
|
-
if (subFields?.length) {
|
|
215
|
-
await afterChangeTraverseFields({
|
|
216
|
-
blockData: nodeSiblingData,
|
|
217
|
-
collection,
|
|
218
|
-
context,
|
|
219
|
-
data: data ?? {},
|
|
220
|
-
doc: originalDoc,
|
|
221
|
-
fields: subFields,
|
|
222
|
-
global,
|
|
223
|
-
operation,
|
|
224
|
-
parentIndexPath: indexPath.join('-'),
|
|
225
|
-
parentIsLocalized: parentIsLocalized || field.localized || false,
|
|
226
|
-
parentPath: path.join('.'),
|
|
227
|
-
parentSchemaPath: schemaPath.join('.'),
|
|
228
|
-
previousDoc,
|
|
229
|
-
previousSiblingDoc: {
|
|
230
|
-
...nodePreviousSiblingDoc
|
|
231
|
-
},
|
|
232
|
-
req,
|
|
233
|
-
siblingData: nodeSiblingData || {},
|
|
234
|
-
siblingDoc: {
|
|
235
|
-
...nodeSiblingDoc
|
|
236
|
-
}
|
|
237
|
-
});
|
|
238
|
-
}
|
|
239
|
-
}
|
|
240
|
-
}
|
|
241
|
-
return value;
|
|
242
|
-
}],
|
|
243
|
-
afterRead: [
|
|
244
|
-
/**
|
|
245
|
-
* afterRead hooks do not receive the originalNode. Thus, they can run on all nodes, not just nodes with an ID.
|
|
246
|
-
*/
|
|
247
|
-
async args => {
|
|
248
|
-
const {
|
|
249
|
-
collection,
|
|
250
|
-
context: context,
|
|
251
|
-
currentDepth,
|
|
252
|
-
depth,
|
|
253
|
-
draft,
|
|
254
|
-
fallbackLocale,
|
|
255
|
-
field,
|
|
256
|
-
fieldPromises,
|
|
257
|
-
findMany,
|
|
258
|
-
flattenLocales,
|
|
259
|
-
global,
|
|
260
|
-
indexPath,
|
|
261
|
-
locale,
|
|
262
|
-
originalDoc,
|
|
263
|
-
overrideAccess,
|
|
264
|
-
parentIsLocalized,
|
|
265
|
-
path,
|
|
266
|
-
populate,
|
|
267
|
-
populationPromises,
|
|
268
|
-
req,
|
|
269
|
-
schemaPath,
|
|
270
|
-
showHiddenFields,
|
|
271
|
-
triggerAccessControl,
|
|
272
|
-
triggerHooks
|
|
273
|
-
} = args;
|
|
274
|
-
let {
|
|
275
|
-
value
|
|
276
|
-
} = args;
|
|
277
|
-
if (finalSanitizedEditorConfig?.features?.hooks?.afterRead?.length) {
|
|
278
|
-
for (const hook of finalSanitizedEditorConfig.features.hooks.afterRead) {
|
|
279
|
-
value = await hook(args);
|
|
280
|
-
}
|
|
281
|
-
}
|
|
282
|
-
if (!finalSanitizedEditorConfig.features.nodeHooks?.afterRead?.size && !finalSanitizedEditorConfig.features.getSubFields?.size) {
|
|
283
|
-
return value;
|
|
284
|
-
}
|
|
285
|
-
const flattenedNodes = [];
|
|
286
|
-
recurseNodeTree({
|
|
287
|
-
flattenedNodes,
|
|
288
|
-
nodes: value?.root?.children ?? []
|
|
289
|
-
});
|
|
290
|
-
for (let node of flattenedNodes) {
|
|
291
|
-
const afterReadHooks = finalSanitizedEditorConfig.features.nodeHooks?.afterRead;
|
|
292
|
-
const afterReadHooksForNode = afterReadHooks?.get(node.type);
|
|
293
|
-
if (afterReadHooksForNode) {
|
|
294
|
-
for (const hook of afterReadHooksForNode) {
|
|
295
|
-
node = await hook({
|
|
296
|
-
context,
|
|
297
|
-
currentDepth: currentDepth,
|
|
298
|
-
depth: depth,
|
|
299
|
-
draft: draft,
|
|
300
|
-
fallbackLocale: fallbackLocale,
|
|
301
|
-
fieldPromises: fieldPromises,
|
|
302
|
-
findMany: findMany,
|
|
303
|
-
flattenLocales: flattenLocales,
|
|
304
|
-
locale: locale,
|
|
305
|
-
node,
|
|
306
|
-
overrideAccess: overrideAccess,
|
|
307
|
-
parentRichTextFieldPath: path,
|
|
308
|
-
parentRichTextFieldSchemaPath: schemaPath,
|
|
309
|
-
populateArg: populate,
|
|
310
|
-
populationPromises: populationPromises,
|
|
311
|
-
req,
|
|
312
|
-
showHiddenFields: showHiddenFields,
|
|
313
|
-
triggerAccessControl: triggerAccessControl,
|
|
314
|
-
triggerHooks: triggerHooks
|
|
315
|
-
});
|
|
316
|
-
}
|
|
317
|
-
}
|
|
318
|
-
const subFieldFn = finalSanitizedEditorConfig.features.getSubFields?.get(node.type);
|
|
319
|
-
const subFieldDataFn = finalSanitizedEditorConfig.features.getSubFieldsData?.get(node.type);
|
|
320
|
-
if (subFieldFn && subFieldDataFn) {
|
|
321
|
-
const subFields = subFieldFn({
|
|
322
|
-
node,
|
|
323
|
-
req
|
|
324
|
-
});
|
|
325
|
-
const nodeSiblingData = subFieldDataFn({
|
|
326
|
-
node,
|
|
327
|
-
req
|
|
328
|
-
}) ?? {};
|
|
329
|
-
if (subFields?.length) {
|
|
330
|
-
afterReadTraverseFields({
|
|
331
|
-
blockData: nodeSiblingData,
|
|
332
|
-
collection,
|
|
333
|
-
context,
|
|
334
|
-
currentDepth: currentDepth,
|
|
335
|
-
depth: depth,
|
|
336
|
-
doc: originalDoc,
|
|
337
|
-
draft: draft,
|
|
338
|
-
fallbackLocale: fallbackLocale,
|
|
339
|
-
fieldPromises: fieldPromises,
|
|
340
|
-
fields: subFields,
|
|
341
|
-
findMany: findMany,
|
|
342
|
-
flattenLocales: flattenLocales,
|
|
343
|
-
global,
|
|
344
|
-
locale: locale,
|
|
345
|
-
overrideAccess: overrideAccess,
|
|
346
|
-
parentIndexPath: indexPath.join('-'),
|
|
347
|
-
parentIsLocalized: parentIsLocalized || field.localized || false,
|
|
348
|
-
parentPath: path.join('.'),
|
|
349
|
-
parentSchemaPath: schemaPath.join('.'),
|
|
350
|
-
populate,
|
|
351
|
-
populationPromises: populationPromises,
|
|
352
|
-
req,
|
|
353
|
-
showHiddenFields: showHiddenFields,
|
|
354
|
-
siblingDoc: nodeSiblingData,
|
|
355
|
-
triggerAccessControl,
|
|
356
|
-
triggerHooks
|
|
357
|
-
});
|
|
358
|
-
}
|
|
359
|
-
}
|
|
360
|
-
}
|
|
361
|
-
return value;
|
|
362
|
-
}],
|
|
363
|
-
beforeChange: [async args => {
|
|
364
|
-
const {
|
|
365
|
-
collection,
|
|
366
|
-
context: _context,
|
|
367
|
-
data,
|
|
368
|
-
docWithLocales,
|
|
369
|
-
errors,
|
|
370
|
-
field,
|
|
371
|
-
fieldLabelPath,
|
|
372
|
-
global,
|
|
373
|
-
indexPath,
|
|
374
|
-
mergeLocaleActions,
|
|
375
|
-
operation,
|
|
376
|
-
originalDoc,
|
|
377
|
-
overrideAccess,
|
|
378
|
-
parentIsLocalized,
|
|
379
|
-
path,
|
|
380
|
-
previousValue,
|
|
381
|
-
req,
|
|
382
|
-
schemaPath,
|
|
383
|
-
siblingData,
|
|
384
|
-
siblingDocWithLocales,
|
|
385
|
-
skipValidation
|
|
386
|
-
} = args;
|
|
387
|
-
let {
|
|
388
|
-
value
|
|
389
|
-
} = args;
|
|
390
|
-
if (finalSanitizedEditorConfig?.features?.hooks?.beforeChange?.length) {
|
|
391
|
-
for (const hook of finalSanitizedEditorConfig.features.hooks.beforeChange) {
|
|
392
|
-
value = await hook(args);
|
|
393
|
-
}
|
|
394
|
-
}
|
|
395
|
-
if (!finalSanitizedEditorConfig.features.nodeHooks?.beforeChange?.size && !finalSanitizedEditorConfig.features.getSubFields?.size) {
|
|
396
|
-
return value;
|
|
397
|
-
}
|
|
398
|
-
// TO-DO: We should not use context, as it is intended for external use only
|
|
399
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
400
|
-
const context = _context;
|
|
401
|
-
const nodeIDMap = {};
|
|
402
|
-
/**
|
|
403
|
-
* Get the originalNodeIDMap from the beforeValidate hook, which is always run before this hook.
|
|
404
|
-
*/
|
|
405
|
-
const originalNodeIDMap = context?.internal?.richText?.[path.join('.')]?.originalNodeIDMap;
|
|
406
|
-
if (!originalNodeIDMap || !Object.keys(originalNodeIDMap).length || !value) {
|
|
407
|
-
return value;
|
|
408
|
-
}
|
|
409
|
-
const previousNodeIDMap = {};
|
|
410
|
-
const originalNodeWithLocalesIDMap = {};
|
|
411
|
-
recurseNodeTree({
|
|
412
|
-
nodeIDMap,
|
|
413
|
-
nodes: value?.root?.children ?? []
|
|
414
|
-
});
|
|
415
|
-
recurseNodeTree({
|
|
416
|
-
nodeIDMap: previousNodeIDMap,
|
|
417
|
-
nodes: previousValue?.root?.children ?? []
|
|
418
|
-
});
|
|
419
|
-
if (field.name && siblingDocWithLocales?.[field.name]) {
|
|
420
|
-
recurseNodeTree({
|
|
421
|
-
nodeIDMap: originalNodeWithLocalesIDMap,
|
|
422
|
-
nodes: siblingDocWithLocales[field.name]?.root?.children ?? []
|
|
423
|
-
});
|
|
424
|
-
}
|
|
425
|
-
// eslint-disable-next-line prefer-const
|
|
426
|
-
for (let [id, node] of Object.entries(nodeIDMap)) {
|
|
427
|
-
const beforeChangeHooks = finalSanitizedEditorConfig.features.nodeHooks?.beforeChange;
|
|
428
|
-
const beforeChangeHooksForNode = beforeChangeHooks?.get(node.type);
|
|
429
|
-
if (beforeChangeHooksForNode) {
|
|
430
|
-
for (const hook of beforeChangeHooksForNode) {
|
|
431
|
-
if (!originalNodeIDMap[id]) {
|
|
432
|
-
console.warn('(beforeChange) No original node found for node with id', id, 'node:', node, 'path', path.join('.'));
|
|
433
|
-
continue;
|
|
434
|
-
}
|
|
435
|
-
node = await hook({
|
|
436
|
-
context,
|
|
437
|
-
errors: errors,
|
|
438
|
-
mergeLocaleActions: mergeLocaleActions,
|
|
439
|
-
node,
|
|
440
|
-
operation: operation,
|
|
441
|
-
originalNode: originalNodeIDMap[id],
|
|
442
|
-
originalNodeWithLocales: originalNodeWithLocalesIDMap[id],
|
|
443
|
-
parentRichTextFieldPath: path,
|
|
444
|
-
parentRichTextFieldSchemaPath: schemaPath,
|
|
445
|
-
previousNode: previousNodeIDMap[id],
|
|
446
|
-
req,
|
|
447
|
-
skipValidation: skipValidation
|
|
448
|
-
});
|
|
449
|
-
}
|
|
450
|
-
}
|
|
451
|
-
const subFieldFn = finalSanitizedEditorConfig.features.getSubFields?.get(node.type);
|
|
452
|
-
const subFieldDataFn = finalSanitizedEditorConfig.features.getSubFieldsData?.get(node.type);
|
|
453
|
-
if (subFieldFn && subFieldDataFn) {
|
|
454
|
-
const subFields = subFieldFn({
|
|
455
|
-
node,
|
|
456
|
-
req
|
|
457
|
-
});
|
|
458
|
-
const nodeSiblingData = subFieldDataFn({
|
|
459
|
-
node,
|
|
460
|
-
req
|
|
461
|
-
}) ?? {};
|
|
462
|
-
const nodeSiblingDocWithLocales = subFieldDataFn({
|
|
463
|
-
node: originalNodeWithLocalesIDMap[id],
|
|
464
|
-
req
|
|
465
|
-
}) ?? {};
|
|
466
|
-
const nodePreviousSiblingDoc = subFieldDataFn({
|
|
467
|
-
node: previousNodeIDMap[id],
|
|
468
|
-
req
|
|
469
|
-
}) ?? {};
|
|
470
|
-
if (subFields?.length) {
|
|
471
|
-
await beforeChangeTraverseFields({
|
|
472
|
-
id,
|
|
473
|
-
blockData: nodeSiblingData,
|
|
474
|
-
collection,
|
|
475
|
-
context,
|
|
476
|
-
data: data ?? {},
|
|
477
|
-
doc: originalDoc ?? {},
|
|
478
|
-
docWithLocales: docWithLocales ?? {},
|
|
479
|
-
errors: errors,
|
|
480
|
-
fieldLabelPath,
|
|
481
|
-
fields: subFields,
|
|
482
|
-
global,
|
|
483
|
-
mergeLocaleActions: mergeLocaleActions,
|
|
484
|
-
operation: operation,
|
|
485
|
-
overrideAccess,
|
|
486
|
-
parentIndexPath: indexPath.join('-'),
|
|
487
|
-
parentIsLocalized: parentIsLocalized || field.localized || false,
|
|
488
|
-
parentPath: path.join('.'),
|
|
489
|
-
parentSchemaPath: schemaPath.join('.'),
|
|
490
|
-
req,
|
|
491
|
-
siblingData: nodeSiblingData,
|
|
492
|
-
siblingDoc: nodePreviousSiblingDoc,
|
|
493
|
-
siblingDocWithLocales: nodeSiblingDocWithLocales ?? {},
|
|
494
|
-
skipValidation
|
|
495
|
-
});
|
|
496
|
-
}
|
|
497
|
-
}
|
|
498
|
-
}
|
|
499
|
-
/**
|
|
500
|
-
* within the beforeChange hook, id's may be re-generated.
|
|
501
|
-
* Example:
|
|
502
|
-
* 1. Seed data contains IDs for block feature blocks.
|
|
503
|
-
* 2. Those are used in beforeValidate
|
|
504
|
-
* 3. in beforeChange, those IDs are regenerated, because you cannot provide IDs during document creation. See baseIDField beforeChange hook for reasoning
|
|
505
|
-
* 4. Thus, in order for all post-beforeChange hooks to receive the correct ID, we need to update the originalNodeIDMap with the new ID's, by regenerating the nodeIDMap.
|
|
506
|
-
* The reason this is not generated for every hook, is to save on performance. We know we only really have to generate it in beforeValidate, which is the first hook,
|
|
507
|
-
* and in beforeChange, which is where modifications to the provided IDs can occur.
|
|
508
|
-
*/
|
|
509
|
-
const newOriginalNodeIDMap = {};
|
|
510
|
-
const previousOriginalValue = siblingData[field.name];
|
|
511
|
-
recurseNodeTree({
|
|
512
|
-
nodeIDMap: newOriginalNodeIDMap,
|
|
513
|
-
nodes: previousOriginalValue?.root?.children ?? []
|
|
514
|
-
});
|
|
515
|
-
if (!context.internal) {
|
|
516
|
-
// Add to context, for other hooks to use
|
|
517
|
-
context.internal = {};
|
|
518
|
-
}
|
|
519
|
-
if (!context.internal.richText) {
|
|
520
|
-
context.internal.richText = {};
|
|
521
|
-
}
|
|
522
|
-
context.internal.richText[path.join('.')] = {
|
|
523
|
-
originalNodeIDMap: newOriginalNodeIDMap
|
|
524
|
-
};
|
|
525
|
-
return value;
|
|
526
|
-
}],
|
|
527
|
-
beforeValidate: [async args => {
|
|
528
|
-
const {
|
|
529
|
-
collection,
|
|
530
|
-
context,
|
|
531
|
-
data,
|
|
532
|
-
field,
|
|
533
|
-
global,
|
|
534
|
-
indexPath,
|
|
535
|
-
operation,
|
|
536
|
-
originalDoc,
|
|
537
|
-
overrideAccess,
|
|
538
|
-
parentIsLocalized,
|
|
539
|
-
path,
|
|
540
|
-
previousValue,
|
|
541
|
-
req,
|
|
542
|
-
schemaPath
|
|
543
|
-
} = args;
|
|
544
|
-
let {
|
|
545
|
-
value
|
|
546
|
-
} = args;
|
|
547
|
-
if (finalSanitizedEditorConfig?.features?.hooks?.beforeValidate?.length) {
|
|
548
|
-
for (const hook of finalSanitizedEditorConfig.features.hooks.beforeValidate) {
|
|
549
|
-
value = await hook(args);
|
|
550
|
-
}
|
|
551
|
-
}
|
|
552
|
-
// return value if there are NO hooks
|
|
553
|
-
if (!finalSanitizedEditorConfig.features.nodeHooks?.beforeValidate?.size && !finalSanitizedEditorConfig.features.nodeHooks?.afterChange?.size && !finalSanitizedEditorConfig.features.nodeHooks?.beforeChange?.size && !finalSanitizedEditorConfig.features.getSubFields?.size) {
|
|
554
|
-
return value;
|
|
555
|
-
}
|
|
556
|
-
/**
|
|
557
|
-
* beforeValidate is the first field hook which runs. This is where we can create the node map, which can then be used in the other hooks.
|
|
558
|
-
*
|
|
559
|
-
*/ /**
|
|
560
|
-
* flattenedNodes contains all nodes in the editor, in the order they appear in the editor. They will be used for the following hooks:
|
|
561
|
-
* - afterRead
|
|
562
|
-
*
|
|
563
|
-
* The other hooks require nodes to have IDs, which is why those are ran only from the nodeIDMap. They require IDs because they have both doc/siblingDoc and data/siblingData, and
|
|
564
|
-
* thus require a reliable way to match new node data to old node data. Given that node positions can change in between hooks, this is only reliably possible for nodes which are saved with
|
|
565
|
-
* an ID.
|
|
566
|
-
*/ //const flattenedNodes: SerializedLexicalNode[] = []
|
|
567
|
-
/**
|
|
568
|
-
* Only nodes with id's (so, nodes with hooks added to them) will be added to the nodeIDMap. They will be used for the following hooks:
|
|
569
|
-
* - afterChange
|
|
570
|
-
* - beforeChange
|
|
571
|
-
* - beforeValidate
|
|
572
|
-
*
|
|
573
|
-
* Other hooks are handled by the flattenedNodes. All nodes in the nodeIDMap are part of flattenedNodes.
|
|
574
|
-
*/
|
|
575
|
-
const originalNodeIDMap = {};
|
|
576
|
-
recurseNodeTree({
|
|
577
|
-
nodeIDMap: originalNodeIDMap,
|
|
578
|
-
nodes: previousValue?.root?.children ?? []
|
|
579
|
-
});
|
|
580
|
-
if (!context.internal) {
|
|
581
|
-
// Add to context, for other hooks to use
|
|
582
|
-
context.internal = {};
|
|
583
|
-
}
|
|
584
|
-
if (!context.internal.richText) {
|
|
585
|
-
context.internal.richText = {};
|
|
586
|
-
}
|
|
587
|
-
context.internal.richText[path.join('.')] = {
|
|
588
|
-
originalNodeIDMap
|
|
589
|
-
};
|
|
590
|
-
/**
|
|
591
|
-
* Now that the maps for all hooks are set up, we can run the validate hook
|
|
592
|
-
*/
|
|
593
|
-
if (!finalSanitizedEditorConfig.features.nodeHooks?.beforeValidate?.size) {
|
|
594
|
-
return value;
|
|
595
|
-
}
|
|
596
|
-
const nodeIDMap = {};
|
|
597
|
-
recurseNodeTree({
|
|
598
|
-
//flattenedNodes,
|
|
599
|
-
nodeIDMap,
|
|
600
|
-
nodes: value?.root?.children ?? []
|
|
601
|
-
});
|
|
602
|
-
// eslint-disable-next-line prefer-const
|
|
603
|
-
for (let [id, node] of Object.entries(nodeIDMap)) {
|
|
604
|
-
const beforeValidateHooks = finalSanitizedEditorConfig.features.nodeHooks.beforeValidate;
|
|
605
|
-
const beforeValidateHooksForNode = beforeValidateHooks?.get(node.type);
|
|
606
|
-
if (beforeValidateHooksForNode) {
|
|
607
|
-
for (const hook of beforeValidateHooksForNode) {
|
|
608
|
-
if (!originalNodeIDMap[id]) {
|
|
609
|
-
console.warn('(beforeValidate) No original node found for node with id', id, 'node:', node, 'path', path.join('.'));
|
|
610
|
-
continue;
|
|
611
|
-
}
|
|
612
|
-
node = await hook({
|
|
613
|
-
context,
|
|
614
|
-
node,
|
|
615
|
-
operation,
|
|
616
|
-
originalNode: originalNodeIDMap[id],
|
|
617
|
-
overrideAccess: overrideAccess,
|
|
618
|
-
parentRichTextFieldPath: path,
|
|
619
|
-
parentRichTextFieldSchemaPath: schemaPath,
|
|
620
|
-
req
|
|
621
|
-
});
|
|
622
|
-
}
|
|
623
|
-
}
|
|
624
|
-
const subFieldFn = finalSanitizedEditorConfig.features.getSubFields?.get(node.type);
|
|
625
|
-
const subFieldDataFn = finalSanitizedEditorConfig.features.getSubFieldsData?.get(node.type);
|
|
626
|
-
if (subFieldFn && subFieldDataFn) {
|
|
627
|
-
const subFields = subFieldFn({
|
|
628
|
-
node,
|
|
629
|
-
req
|
|
630
|
-
});
|
|
631
|
-
const nodeSiblingData = subFieldDataFn({
|
|
632
|
-
node,
|
|
633
|
-
req
|
|
634
|
-
}) ?? {};
|
|
635
|
-
const nodeSiblingDoc = subFieldDataFn({
|
|
636
|
-
node: originalNodeIDMap[id],
|
|
637
|
-
req
|
|
638
|
-
}) ?? {};
|
|
639
|
-
if (subFields?.length) {
|
|
640
|
-
await beforeValidateTraverseFields({
|
|
641
|
-
id,
|
|
642
|
-
blockData: nodeSiblingData,
|
|
643
|
-
collection,
|
|
644
|
-
context,
|
|
645
|
-
data,
|
|
646
|
-
doc: originalDoc,
|
|
647
|
-
fields: subFields,
|
|
648
|
-
global,
|
|
649
|
-
operation,
|
|
650
|
-
overrideAccess: overrideAccess,
|
|
651
|
-
parentIndexPath: indexPath.join('-'),
|
|
652
|
-
parentIsLocalized: parentIsLocalized || field.localized || false,
|
|
653
|
-
parentPath: path.join('.'),
|
|
654
|
-
parentSchemaPath: schemaPath.join('.'),
|
|
655
|
-
req,
|
|
656
|
-
siblingData: nodeSiblingData,
|
|
657
|
-
siblingDoc: nodeSiblingDoc
|
|
658
|
-
});
|
|
659
|
-
}
|
|
660
|
-
}
|
|
661
|
-
}
|
|
662
|
-
return value;
|
|
663
|
-
}]
|
|
664
|
-
},
|
|
665
|
-
outputSchema: ({
|
|
666
|
-
collectionIDFieldTypes,
|
|
667
|
-
config,
|
|
668
|
-
field,
|
|
669
|
-
i18n,
|
|
670
|
-
interfaceNameDefinitions,
|
|
671
|
-
isRequired
|
|
672
|
-
}) => {
|
|
673
|
-
let outputSchema = {
|
|
674
|
-
// This schema matches the SerializedEditorState type so far, that it's possible to cast SerializedEditorState to this schema without any errors.
|
|
675
|
-
// In the future, we should
|
|
676
|
-
// 1) allow recursive children
|
|
677
|
-
// 2) Pass in all the different types for every node added to the editorconfig. This can be done with refs in the schema.
|
|
678
|
-
type: withNullableJSONSchemaType('object', isRequired),
|
|
679
|
-
properties: {
|
|
680
|
-
root: {
|
|
681
|
-
type: 'object',
|
|
682
|
-
additionalProperties: false,
|
|
683
|
-
properties: {
|
|
684
|
-
type: {
|
|
685
|
-
type: 'string'
|
|
686
|
-
},
|
|
687
|
-
children: {
|
|
688
|
-
type: 'array',
|
|
689
|
-
items: {
|
|
690
|
-
type: 'object',
|
|
691
|
-
additionalProperties: true,
|
|
692
|
-
properties: {
|
|
693
|
-
type: {
|
|
694
|
-
type: 'string',
|
|
695
|
-
tsType: 'any'
|
|
696
|
-
},
|
|
697
|
-
version: {
|
|
698
|
-
type: 'integer'
|
|
699
|
-
}
|
|
700
|
-
},
|
|
701
|
-
required: ['type', 'version']
|
|
702
|
-
}
|
|
703
|
-
},
|
|
704
|
-
direction: {
|
|
705
|
-
oneOf: [{
|
|
706
|
-
enum: ['ltr', 'rtl']
|
|
707
|
-
}, {
|
|
708
|
-
type: 'null'
|
|
709
|
-
}]
|
|
710
|
-
},
|
|
711
|
-
format: {
|
|
712
|
-
type: 'string',
|
|
713
|
-
enum: ['left', 'start', 'center', 'right', 'end', 'justify', '']
|
|
714
|
-
},
|
|
715
|
-
indent: {
|
|
716
|
-
type: 'integer'
|
|
717
|
-
},
|
|
718
|
-
version: {
|
|
719
|
-
type: 'integer'
|
|
720
|
-
}
|
|
721
|
-
},
|
|
722
|
-
required: ['children', 'direction', 'format', 'indent', 'type', 'version']
|
|
723
|
-
}
|
|
724
|
-
},
|
|
725
|
-
required: ['root']
|
|
726
|
-
};
|
|
727
|
-
for (const modifyOutputSchema of finalSanitizedEditorConfig.features.generatedTypes.modifyOutputSchemas) {
|
|
728
|
-
outputSchema = modifyOutputSchema({
|
|
729
|
-
collectionIDFieldTypes,
|
|
730
|
-
config,
|
|
731
|
-
currentSchema: outputSchema,
|
|
732
|
-
field,
|
|
733
|
-
i18n,
|
|
734
|
-
interfaceNameDefinitions,
|
|
735
|
-
isRequired
|
|
736
|
-
});
|
|
737
|
-
}
|
|
738
|
-
return outputSchema;
|
|
739
|
-
},
|
|
125
|
+
hooks: getLexicalHooks({
|
|
126
|
+
editorConfig: finalSanitizedEditorConfig
|
|
127
|
+
}),
|
|
128
|
+
jsonSchema: getFieldToJSONSchema({
|
|
129
|
+
editorConfig: finalSanitizedEditorConfig
|
|
130
|
+
}),
|
|
740
131
|
validate: richTextValidateHOC({
|
|
741
132
|
editorConfig: finalSanitizedEditorConfig
|
|
742
133
|
})
|