@payloadcms/richtext-lexical 3.0.0-beta.4 → 3.0.0-beta.40
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 +5 -2
- package/dist/cell/index.d.ts.map +1 -1
- package/dist/cell/index.js +44 -29
- package/dist/cell/index.js.map +1 -1
- package/dist/exports/components.d.ts +7 -2
- package/dist/exports/components.d.ts.map +1 -1
- package/dist/exports/components.js +7 -2
- package/dist/exports/components.js.map +1 -1
- package/dist/field/Field.d.ts +0 -2
- package/dist/field/Field.d.ts.map +1 -1
- package/dist/field/Field.js +66 -47
- package/dist/field/Field.js.map +1 -1
- package/dist/field/features/align/feature.client.d.ts +4 -1
- package/dist/field/features/align/feature.client.d.ts.map +1 -1
- package/dist/field/features/align/feature.client.js +135 -54
- package/dist/field/features/align/feature.client.js.map +1 -1
- package/dist/field/features/align/feature.server.d.ts.map +1 -1
- package/dist/field/features/align/feature.server.js +2 -0
- package/dist/field/features/align/feature.server.js.map +1 -1
- package/dist/field/features/align/i18n.d.ts +3 -0
- package/dist/field/features/align/i18n.d.ts.map +1 -0
- package/dist/field/features/align/i18n.js +196 -0
- package/dist/field/features/align/i18n.js.map +1 -0
- package/dist/field/features/align/toolbarAlignGroup.d.ts +3 -0
- package/dist/field/features/align/toolbarAlignGroup.d.ts.map +1 -0
- package/dist/field/features/align/toolbarAlignGroup.js +12 -0
- package/dist/field/features/align/toolbarAlignGroup.js.map +1 -0
- package/dist/field/features/blockquote/feature.client.d.ts +4 -1
- package/dist/field/features/blockquote/feature.client.d.ts.map +1 -1
- package/dist/field/features/blockquote/feature.client.js +60 -46
- package/dist/field/features/blockquote/feature.client.js.map +1 -1
- package/dist/field/features/blockquote/feature.server.d.ts +1 -1
- package/dist/field/features/blockquote/feature.server.d.ts.map +1 -1
- package/dist/field/features/blockquote/feature.server.js +9 -7
- package/dist/field/features/blockquote/feature.server.js.map +1 -1
- package/dist/field/features/blockquote/i18n.d.ts +3 -0
- package/dist/field/features/blockquote/i18n.d.ts.map +1 -0
- package/dist/field/features/blockquote/i18n.js +100 -0
- package/dist/field/features/blockquote/i18n.js.map +1 -0
- package/dist/field/features/blockquote/markdownTransformer.d.ts.map +1 -1
- package/dist/field/features/blockquote/markdownTransformer.js +2 -4
- package/dist/field/features/blockquote/markdownTransformer.js.map +1 -1
- package/dist/field/features/blocks/component/BlockContent.d.ts.map +1 -1
- package/dist/field/features/blocks/component/BlockContent.js +65 -50
- package/dist/field/features/blocks/component/BlockContent.js.map +1 -1
- package/dist/field/features/blocks/component/index.d.ts.map +1 -1
- package/dist/field/features/blocks/component/index.js +60 -17
- package/dist/field/features/blocks/component/index.js.map +1 -1
- package/dist/field/features/blocks/component/index.scss +0 -4
- package/dist/field/features/blocks/drawer/index.d.ts.map +1 -1
- package/dist/field/features/blocks/drawer/index.js +4 -5
- package/dist/field/features/blocks/drawer/index.js.map +1 -1
- package/dist/field/features/blocks/feature.client.d.ts +4 -1
- package/dist/field/features/blocks/feature.client.d.ts.map +1 -1
- package/dist/field/features/blocks/feature.client.js +58 -27
- package/dist/field/features/blocks/feature.client.js.map +1 -1
- package/dist/field/features/blocks/feature.server.d.ts +2 -5
- package/dist/field/features/blocks/feature.server.d.ts.map +1 -1
- package/dist/field/features/blocks/feature.server.js +111 -77
- package/dist/field/features/blocks/feature.server.js.map +1 -1
- package/dist/field/features/blocks/i18n.d.ts +3 -0
- package/dist/field/features/blocks/i18n.d.ts.map +1 -0
- package/dist/field/features/blocks/i18n.js +100 -0
- package/dist/field/features/blocks/i18n.js.map +1 -0
- package/dist/field/features/blocks/nodes/BlocksNode.d.ts +2 -4
- package/dist/field/features/blocks/nodes/BlocksNode.d.ts.map +1 -1
- package/dist/field/features/blocks/nodes/BlocksNode.js +3 -3
- package/dist/field/features/blocks/nodes/BlocksNode.js.map +1 -1
- package/dist/field/features/blocks/plugin/commands.d.ts.map +1 -1
- package/dist/field/features/blocks/plugin/commands.js +1 -2
- package/dist/field/features/blocks/plugin/commands.js.map +1 -1
- package/dist/field/features/blocks/plugin/index.d.ts +3 -2
- package/dist/field/features/blocks/plugin/index.d.ts.map +1 -1
- package/dist/field/features/blocks/plugin/index.js +10 -11
- package/dist/field/features/blocks/plugin/index.js.map +1 -1
- package/dist/field/features/blocks/populationPromise.d.ts.map +1 -1
- package/dist/field/features/blocks/populationPromise.js +5 -19
- package/dist/field/features/blocks/populationPromise.js.map +1 -1
- package/dist/field/features/blocks/validate.d.ts.map +1 -1
- package/dist/field/features/blocks/validate.js +22 -36
- package/dist/field/features/blocks/validate.js.map +1 -1
- package/dist/field/features/converters/html/field/index.d.ts +8 -2
- package/dist/field/features/converters/html/field/index.d.ts.map +1 -1
- package/dist/field/features/converters/html/field/index.js +36 -5
- package/dist/field/features/converters/html/field/index.js.map +1 -1
- package/dist/field/features/createFeaturePropComponent.d.ts.map +1 -1
- package/dist/field/features/createFeaturePropComponent.js +6 -1
- package/dist/field/features/createFeaturePropComponent.js.map +1 -1
- package/dist/field/features/debug/{testrecorder → testRecorder}/feature.client.d.ts +4 -1
- package/dist/field/features/debug/testRecorder/feature.client.d.ts.map +1 -0
- package/dist/field/features/debug/{testrecorder → testRecorder}/feature.client.js.map +1 -1
- package/dist/field/features/debug/{testrecorder → testRecorder}/feature.server.d.ts.map +1 -1
- package/dist/field/features/debug/{testrecorder → testRecorder}/feature.server.js +1 -1
- package/dist/field/features/debug/{testrecorder → testRecorder}/feature.server.js.map +1 -1
- package/dist/field/features/debug/testRecorder/plugin/index.d.ts +5 -0
- package/dist/field/features/debug/testRecorder/plugin/index.d.ts.map +1 -0
- package/dist/field/features/debug/{testrecorder → testRecorder}/plugin/index.js +68 -44
- package/dist/field/features/debug/testRecorder/plugin/index.js.map +1 -0
- package/dist/field/features/debug/{treeview → treeView}/feature.client.d.ts +4 -1
- package/dist/field/features/debug/treeView/feature.client.d.ts.map +1 -0
- package/dist/field/features/debug/{treeview → treeView}/feature.client.js.map +1 -1
- package/dist/field/features/debug/{treeview → treeView}/feature.server.d.ts.map +1 -1
- package/dist/field/features/debug/{treeview → treeView}/feature.server.js +1 -1
- package/dist/field/features/debug/{treeview → treeView}/feature.server.js.map +1 -1
- package/dist/field/features/debug/treeView/plugin/index.d.ts +4 -0
- package/dist/field/features/debug/treeView/plugin/index.d.ts.map +1 -0
- package/dist/field/features/debug/{treeview → treeView}/plugin/index.js +6 -7
- package/dist/field/features/debug/treeView/plugin/index.js.map +1 -0
- package/dist/field/features/format/bold/feature.client.d.ts +4 -1
- package/dist/field/features/format/bold/feature.client.d.ts.map +1 -1
- package/dist/field/features/format/bold/feature.client.js +26 -23
- package/dist/field/features/format/bold/feature.client.js.map +1 -1
- package/dist/field/features/format/{inlinecode → inlineCode}/feature.client.d.ts +4 -1
- package/dist/field/features/format/inlineCode/feature.client.d.ts.map +1 -0
- package/dist/field/features/format/inlineCode/feature.client.js +46 -0
- package/dist/field/features/format/inlineCode/feature.client.js.map +1 -0
- package/dist/field/features/format/{inlinecode → inlineCode}/feature.server.d.ts.map +1 -1
- package/dist/field/features/format/{inlinecode → inlineCode}/feature.server.js +1 -1
- package/dist/field/features/format/{inlinecode → inlineCode}/feature.server.js.map +1 -1
- package/dist/field/features/format/{inlinecode → inlineCode}/markdownTransformers.d.ts.map +1 -1
- package/dist/field/features/format/{inlinecode → inlineCode}/markdownTransformers.js.map +1 -1
- package/dist/field/features/format/italic/feature.client.d.ts +4 -1
- package/dist/field/features/format/italic/feature.client.d.ts.map +1 -1
- package/dist/field/features/format/italic/feature.client.js +27 -24
- package/dist/field/features/format/italic/feature.client.js.map +1 -1
- package/dist/field/features/format/shared/toolbarFormatGroup.d.ts +3 -0
- package/dist/field/features/format/shared/toolbarFormatGroup.d.ts.map +1 -0
- package/dist/field/features/format/shared/toolbarFormatGroup.js +10 -0
- package/dist/field/features/format/shared/toolbarFormatGroup.js.map +1 -0
- package/dist/field/features/format/strikethrough/feature.client.d.ts +4 -1
- package/dist/field/features/format/strikethrough/feature.client.d.ts.map +1 -1
- package/dist/field/features/format/strikethrough/feature.client.js +27 -24
- package/dist/field/features/format/strikethrough/feature.client.js.map +1 -1
- package/dist/field/features/format/subscript/feature.client.d.ts +4 -1
- package/dist/field/features/format/subscript/feature.client.d.ts.map +1 -1
- package/dist/field/features/format/subscript/feature.client.js +25 -22
- package/dist/field/features/format/subscript/feature.client.js.map +1 -1
- package/dist/field/features/format/superscript/feature.client.d.ts +4 -1
- package/dist/field/features/format/superscript/feature.client.d.ts.map +1 -1
- package/dist/field/features/format/superscript/feature.client.js +25 -22
- package/dist/field/features/format/superscript/feature.client.js.map +1 -1
- package/dist/field/features/format/underline/feature.client.d.ts +4 -1
- package/dist/field/features/format/underline/feature.client.d.ts.map +1 -1
- package/dist/field/features/format/underline/feature.client.js +25 -22
- package/dist/field/features/format/underline/feature.client.js.map +1 -1
- package/dist/field/features/heading/feature.client.d.ts +4 -1
- package/dist/field/features/heading/feature.client.d.ts.map +1 -1
- package/dist/field/features/heading/feature.client.js +76 -54
- package/dist/field/features/heading/feature.client.js.map +1 -1
- package/dist/field/features/heading/feature.server.d.ts.map +1 -1
- package/dist/field/features/heading/feature.server.js +7 -5
- package/dist/field/features/heading/feature.server.js.map +1 -1
- package/dist/field/features/heading/i18n.d.ts +3 -0
- package/dist/field/features/heading/i18n.d.ts.map +1 -0
- package/dist/field/features/heading/i18n.js +100 -0
- package/dist/field/features/heading/i18n.js.map +1 -0
- package/dist/field/features/heading/markdownTransformer.d.ts.map +1 -1
- package/dist/field/features/heading/markdownTransformer.js +1 -2
- package/dist/field/features/heading/markdownTransformer.js.map +1 -1
- package/dist/field/features/horizontalRule/component/index.d.ts +10 -0
- package/dist/field/features/horizontalRule/component/index.d.ts.map +1 -0
- package/dist/field/features/horizontalRule/component/index.js +62 -0
- package/dist/field/features/horizontalRule/component/index.js.map +1 -0
- package/dist/field/features/horizontalRule/feature.client.d.ts +6 -0
- package/dist/field/features/horizontalRule/feature.client.d.ts.map +1 -0
- package/dist/field/features/horizontalRule/feature.client.js +77 -0
- package/dist/field/features/horizontalRule/feature.client.js.map +1 -0
- package/dist/field/features/horizontalRule/feature.server.d.ts +3 -0
- package/dist/field/features/horizontalRule/feature.server.d.ts.map +1 -0
- package/dist/field/features/horizontalRule/feature.server.js +38 -0
- package/dist/field/features/horizontalRule/feature.server.js.map +1 -0
- package/dist/field/features/horizontalRule/i18n.d.ts +3 -0
- package/dist/field/features/horizontalRule/i18n.d.ts.map +1 -0
- package/dist/field/features/horizontalRule/i18n.js +100 -0
- package/dist/field/features/horizontalRule/i18n.js.map +1 -0
- package/dist/field/features/horizontalRule/markdownTransformer.d.ts +3 -0
- package/dist/field/features/horizontalRule/markdownTransformer.d.ts.map +1 -0
- package/dist/field/features/horizontalRule/markdownTransformer.js +23 -0
- package/dist/field/features/horizontalRule/markdownTransformer.js.map +1 -0
- package/dist/field/features/horizontalRule/nodes/HorizontalRuleNode.d.ts +53 -0
- package/dist/field/features/horizontalRule/nodes/HorizontalRuleNode.d.ts.map +1 -0
- package/dist/field/features/horizontalRule/nodes/HorizontalRuleNode.js +89 -0
- package/dist/field/features/horizontalRule/nodes/HorizontalRuleNode.js.map +1 -0
- package/dist/field/features/horizontalRule/plugin/index.d.ts +7 -0
- package/dist/field/features/horizontalRule/plugin/index.d.ts.map +1 -0
- package/dist/field/features/horizontalRule/plugin/index.js +31 -0
- package/dist/field/features/horizontalRule/plugin/index.js.map +1 -0
- package/dist/field/features/horizontalRule/plugin/index.scss +20 -0
- package/dist/field/features/indent/feature.client.d.ts +4 -1
- package/dist/field/features/indent/feature.client.d.ts.map +1 -1
- package/dist/field/features/indent/feature.client.js +47 -42
- package/dist/field/features/indent/feature.client.js.map +1 -1
- package/dist/field/features/indent/feature.server.d.ts.map +1 -1
- package/dist/field/features/indent/feature.server.js +2 -0
- package/dist/field/features/indent/feature.server.js.map +1 -1
- package/dist/field/features/indent/i18n.d.ts +3 -0
- package/dist/field/features/indent/i18n.d.ts.map +1 -0
- package/dist/field/features/indent/i18n.js +132 -0
- package/dist/field/features/indent/i18n.js.map +1 -0
- package/dist/field/features/indent/toolbarIndentGroup.d.ts +3 -0
- package/dist/field/features/indent/toolbarIndentGroup.d.ts.map +1 -0
- package/dist/field/features/indent/toolbarIndentGroup.js +10 -0
- package/dist/field/features/indent/toolbarIndentGroup.js.map +1 -0
- package/dist/field/features/link/drawer/baseFields.d.ts +2 -2
- package/dist/field/features/link/drawer/baseFields.d.ts.map +1 -1
- package/dist/field/features/link/drawer/baseFields.js +30 -43
- package/dist/field/features/link/drawer/baseFields.js.map +1 -1
- package/dist/field/features/link/drawer/index.js +30 -21
- package/dist/field/features/link/drawer/index.js.map +1 -1
- package/dist/field/features/link/drawer/types.d.ts +4 -2
- package/dist/field/features/link/drawer/types.d.ts.map +1 -1
- package/dist/field/features/link/drawer/types.js.map +1 -1
- package/dist/field/features/link/feature.client.d.ts +13 -1
- package/dist/field/features/link/feature.client.d.ts.map +1 -1
- package/dist/field/features/link/feature.client.js +65 -47
- package/dist/field/features/link/feature.client.js.map +1 -1
- package/dist/field/features/link/feature.server.d.ts +10 -5
- package/dist/field/features/link/feature.server.d.ts.map +1 -1
- package/dist/field/features/link/feature.server.js +58 -11
- package/dist/field/features/link/feature.server.js.map +1 -1
- package/dist/field/features/link/i18n.d.ts +3 -0
- package/dist/field/features/link/i18n.d.ts.map +1 -0
- package/dist/field/features/link/i18n.js +100 -0
- package/dist/field/features/link/i18n.js.map +1 -0
- package/dist/field/features/link/markdownTransformer.d.ts +6 -0
- package/dist/field/features/link/markdownTransformer.d.ts.map +1 -0
- package/dist/field/features/link/markdownTransformer.js +50 -0
- package/dist/field/features/link/markdownTransformer.js.map +1 -0
- package/dist/field/features/link/nodes/AutoLinkNode.d.ts.map +1 -1
- package/dist/field/features/link/nodes/AutoLinkNode.js +1 -2
- package/dist/field/features/link/nodes/AutoLinkNode.js.map +1 -1
- package/dist/field/features/link/nodes/LinkNode.d.ts +4 -4
- package/dist/field/features/link/nodes/LinkNode.d.ts.map +1 -1
- package/dist/field/features/link/nodes/LinkNode.js +6 -7
- package/dist/field/features/link/nodes/LinkNode.js.map +1 -1
- package/dist/field/features/link/plugins/autoLink/index.d.ts +3 -2
- package/dist/field/features/link/plugins/autoLink/index.d.ts.map +1 -1
- package/dist/field/features/link/plugins/autoLink/index.js +11 -12
- package/dist/field/features/link/plugins/autoLink/index.js.map +1 -1
- package/dist/field/features/link/plugins/clickableLink/index.d.ts +3 -2
- package/dist/field/features/link/plugins/clickableLink/index.d.ts.map +1 -1
- package/dist/field/features/link/plugins/clickableLink/index.js +4 -3
- package/dist/field/features/link/plugins/clickableLink/index.js.map +1 -1
- package/dist/field/features/link/plugins/floatingLinkEditor/LinkEditor/commands.d.ts.map +1 -1
- package/dist/field/features/link/plugins/floatingLinkEditor/LinkEditor/commands.js +1 -2
- package/dist/field/features/link/plugins/floatingLinkEditor/LinkEditor/commands.js.map +1 -1
- package/dist/field/features/link/plugins/floatingLinkEditor/LinkEditor/index.d.ts.map +1 -1
- package/dist/field/features/link/plugins/floatingLinkEditor/LinkEditor/index.js +177 -135
- package/dist/field/features/link/plugins/floatingLinkEditor/LinkEditor/index.js.map +1 -1
- package/dist/field/features/link/plugins/floatingLinkEditor/index.d.ts +3 -4
- package/dist/field/features/link/plugins/floatingLinkEditor/index.d.ts.map +1 -1
- package/dist/field/features/link/plugins/floatingLinkEditor/index.js +2 -1
- package/dist/field/features/link/plugins/floatingLinkEditor/index.js.map +1 -1
- package/dist/field/features/link/plugins/floatingLinkEditor/index.scss +11 -3
- package/dist/field/features/link/plugins/floatingLinkEditor/utilities.d.ts +1 -3
- package/dist/field/features/link/plugins/floatingLinkEditor/utilities.d.ts.map +1 -1
- package/dist/field/features/link/plugins/floatingLinkEditor/utilities.js +12 -30
- package/dist/field/features/link/plugins/floatingLinkEditor/utilities.js.map +1 -1
- package/dist/field/features/link/plugins/link/index.d.ts +3 -1
- package/dist/field/features/link/plugins/link/index.d.ts.map +1 -1
- package/dist/field/features/link/plugins/link/index.js +5 -14
- package/dist/field/features/link/plugins/link/index.js.map +1 -1
- package/dist/field/features/link/populationPromise.d.ts.map +1 -1
- package/dist/field/features/link/populationPromise.js +11 -26
- package/dist/field/features/link/populationPromise.js.map +1 -1
- package/dist/field/features/link/validate.d.ts +5 -0
- package/dist/field/features/link/validate.d.ts.map +1 -0
- package/dist/field/features/link/validate.js +32 -0
- package/dist/field/features/link/validate.js.map +1 -0
- package/dist/field/features/lists/checklist/feature.client.d.ts +4 -1
- package/dist/field/features/lists/checklist/feature.client.d.ts.map +1 -1
- package/dist/field/features/lists/checklist/feature.client.js +69 -44
- package/dist/field/features/lists/checklist/feature.client.js.map +1 -1
- package/dist/field/features/lists/checklist/feature.server.d.ts +1 -1
- package/dist/field/features/lists/checklist/feature.server.d.ts.map +1 -1
- package/dist/field/features/lists/checklist/feature.server.js +12 -10
- package/dist/field/features/lists/checklist/feature.server.js.map +1 -1
- package/dist/field/features/lists/checklist/i18n.d.ts +3 -0
- package/dist/field/features/lists/checklist/i18n.d.ts.map +1 -0
- package/dist/field/features/lists/checklist/i18n.js +100 -0
- package/dist/field/features/lists/checklist/i18n.js.map +1 -0
- package/dist/field/features/lists/checklist/markdownTransformers.d.ts.map +1 -1
- package/dist/field/features/lists/checklist/markdownTransformers.js +2 -3
- package/dist/field/features/lists/checklist/markdownTransformers.js.map +1 -1
- package/dist/field/features/lists/checklist/plugin/index.d.ts +2 -2
- package/dist/field/features/lists/checklist/plugin/index.d.ts.map +1 -1
- package/dist/field/features/lists/checklist/plugin/index.js +5 -5
- package/dist/field/features/lists/checklist/plugin/index.js.map +1 -1
- package/dist/field/features/lists/htmlConverter.d.ts.map +1 -1
- package/dist/field/features/lists/htmlConverter.js +13 -6
- package/dist/field/features/lists/htmlConverter.js.map +1 -1
- package/dist/field/features/lists/{orderedlist → orderedList}/feature.client.d.ts +4 -1
- package/dist/field/features/lists/orderedList/feature.client.d.ts.map +1 -0
- package/dist/field/features/lists/orderedList/feature.client.js +97 -0
- package/dist/field/features/lists/orderedList/feature.client.js.map +1 -0
- package/dist/field/features/lists/orderedList/feature.server.d.ts.map +1 -0
- package/dist/field/features/lists/{orderedlist → orderedList}/feature.server.js +10 -8
- package/dist/field/features/lists/orderedList/feature.server.js.map +1 -0
- package/dist/field/features/lists/orderedList/i18n.d.ts +3 -0
- package/dist/field/features/lists/orderedList/i18n.d.ts.map +1 -0
- package/dist/field/features/lists/orderedList/i18n.js +100 -0
- package/dist/field/features/lists/orderedList/i18n.js.map +1 -0
- package/dist/field/features/lists/orderedList/markdownTransformer.d.ts.map +1 -0
- package/dist/field/features/lists/{orderedlist → orderedList}/markdownTransformer.js +2 -3
- package/dist/field/features/lists/orderedList/markdownTransformer.js.map +1 -0
- package/dist/field/features/lists/plugin/index.d.ts +2 -2
- package/dist/field/features/lists/plugin/index.d.ts.map +1 -1
- package/dist/field/features/lists/plugin/index.js +5 -5
- package/dist/field/features/lists/plugin/index.js.map +1 -1
- package/dist/field/features/lists/{common → shared}/markdown.d.ts.map +1 -1
- package/dist/field/features/lists/{common → shared}/markdown.js +1 -2
- package/dist/field/features/lists/shared/markdown.js.map +1 -0
- package/dist/field/features/lists/shared/slashMenuListGroup.d.ts +3 -0
- package/dist/field/features/lists/shared/slashMenuListGroup.d.ts.map +1 -0
- package/dist/field/features/lists/shared/slashMenuListGroup.js +11 -0
- package/dist/field/features/lists/shared/slashMenuListGroup.js.map +1 -0
- package/dist/field/features/lists/{unorderedlist → unorderedList}/feature.client.d.ts +4 -1
- package/dist/field/features/lists/unorderedList/feature.client.d.ts.map +1 -0
- package/dist/field/features/lists/unorderedList/feature.client.js +97 -0
- package/dist/field/features/lists/unorderedList/feature.client.js.map +1 -0
- package/dist/field/features/lists/unorderedList/feature.server.d.ts.map +1 -0
- package/dist/field/features/lists/{unorderedlist → unorderedList}/feature.server.js +9 -7
- package/dist/field/features/lists/unorderedList/feature.server.js.map +1 -0
- package/dist/field/features/lists/unorderedList/i18n.d.ts +3 -0
- package/dist/field/features/lists/unorderedList/i18n.d.ts.map +1 -0
- package/dist/field/features/lists/unorderedList/i18n.js +100 -0
- package/dist/field/features/lists/unorderedList/i18n.js.map +1 -0
- package/dist/field/features/lists/unorderedList/markdownTransformer.d.ts.map +1 -0
- package/dist/field/features/lists/{unorderedlist → unorderedList}/markdownTransformer.js +2 -3
- package/dist/field/features/lists/unorderedList/markdownTransformer.js.map +1 -0
- package/dist/field/features/migrations/lexicalPluginToLexical/converter/converters/upload/converter.d.ts.map +1 -1
- package/dist/field/features/migrations/lexicalPluginToLexical/converter/converters/upload/converter.js +2 -4
- package/dist/field/features/migrations/lexicalPluginToLexical/converter/converters/upload/converter.js.map +1 -1
- package/dist/field/features/migrations/lexicalPluginToLexical/feature.client.d.ts +4 -1
- package/dist/field/features/migrations/lexicalPluginToLexical/feature.client.d.ts.map +1 -1
- package/dist/field/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/Component.js +9 -1
- package/dist/field/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/Component.js.map +1 -1
- package/dist/field/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/index.d.ts +2 -4
- package/dist/field/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/index.d.ts.map +1 -1
- package/dist/field/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/index.js +4 -5
- package/dist/field/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/index.js.map +1 -1
- package/dist/field/features/migrations/slateToLexical/converter/converters/blockquote/client.d.ts +1 -1
- package/dist/field/features/migrations/slateToLexical/converter/converters/blockquote/client.js +1 -1
- package/dist/field/features/migrations/slateToLexical/converter/converters/blockquote/client.js.map +1 -1
- package/dist/field/features/migrations/slateToLexical/converter/converters/blockquote/index.js +2 -2
- package/dist/field/features/migrations/slateToLexical/converter/converters/blockquote/index.js.map +1 -1
- package/dist/field/features/migrations/slateToLexical/converter/converters/relationship/converter.d.ts.map +1 -1
- package/dist/field/features/migrations/slateToLexical/converter/converters/relationship/converter.js +2 -4
- package/dist/field/features/migrations/slateToLexical/converter/converters/relationship/converter.js.map +1 -1
- package/dist/field/features/migrations/slateToLexical/converter/converters/upload/converter.d.ts.map +1 -1
- package/dist/field/features/migrations/slateToLexical/converter/converters/upload/converter.js +2 -4
- package/dist/field/features/migrations/slateToLexical/converter/converters/upload/converter.js.map +1 -1
- package/dist/field/features/migrations/slateToLexical/converter/index.d.ts.map +1 -1
- package/dist/field/features/migrations/slateToLexical/converter/index.js +2 -1
- package/dist/field/features/migrations/slateToLexical/converter/index.js.map +1 -1
- package/dist/field/features/migrations/slateToLexical/feature.client.d.ts +4 -1
- package/dist/field/features/migrations/slateToLexical/feature.client.d.ts.map +1 -1
- package/dist/field/features/migrations/slateToLexical/nodes/unknownConvertedNode/Component.js +9 -1
- package/dist/field/features/migrations/slateToLexical/nodes/unknownConvertedNode/Component.js.map +1 -1
- package/dist/field/features/migrations/slateToLexical/nodes/unknownConvertedNode/index.d.ts +2 -4
- package/dist/field/features/migrations/slateToLexical/nodes/unknownConvertedNode/index.d.ts.map +1 -1
- package/dist/field/features/migrations/slateToLexical/nodes/unknownConvertedNode/index.js +4 -5
- package/dist/field/features/migrations/slateToLexical/nodes/unknownConvertedNode/index.js.map +1 -1
- package/dist/field/features/paragraph/feature.client.d.ts +4 -1
- package/dist/field/features/paragraph/feature.client.d.ts.map +1 -1
- package/dist/field/features/paragraph/feature.client.js +54 -41
- package/dist/field/features/paragraph/feature.client.js.map +1 -1
- package/dist/field/features/paragraph/feature.server.d.ts.map +1 -1
- package/dist/field/features/paragraph/feature.server.js +2 -0
- package/dist/field/features/paragraph/feature.server.js.map +1 -1
- package/dist/field/features/paragraph/i18n.d.ts +3 -0
- package/dist/field/features/paragraph/i18n.d.ts.map +1 -0
- package/dist/field/features/paragraph/i18n.js +132 -0
- package/dist/field/features/paragraph/i18n.js.map +1 -0
- package/dist/field/features/relationship/drawer/commands.d.ts.map +1 -1
- package/dist/field/features/relationship/drawer/commands.js +1 -2
- package/dist/field/features/relationship/drawer/commands.js.map +1 -1
- package/dist/field/features/relationship/drawer/index.d.ts.map +1 -1
- package/dist/field/features/relationship/drawer/index.js +17 -15
- package/dist/field/features/relationship/drawer/index.js.map +1 -1
- package/dist/field/features/relationship/feature.client.d.ts +17 -2
- package/dist/field/features/relationship/feature.client.d.ts.map +1 -1
- package/dist/field/features/relationship/feature.client.js +51 -28
- package/dist/field/features/relationship/feature.client.js.map +1 -1
- package/dist/field/features/relationship/feature.server.d.ts +10 -1
- package/dist/field/features/relationship/feature.server.d.ts.map +1 -1
- package/dist/field/features/relationship/feature.server.js +7 -4
- package/dist/field/features/relationship/feature.server.js.map +1 -1
- package/dist/field/features/relationship/i18n.d.ts +3 -0
- package/dist/field/features/relationship/i18n.d.ts.map +1 -0
- package/dist/field/features/relationship/i18n.js +100 -0
- package/dist/field/features/relationship/i18n.js.map +1 -0
- package/dist/field/features/relationship/nodes/RelationshipNode.d.ts +4 -9
- package/dist/field/features/relationship/nodes/RelationshipNode.d.ts.map +1 -1
- package/dist/field/features/relationship/nodes/RelationshipNode.js +12 -11
- package/dist/field/features/relationship/nodes/RelationshipNode.js.map +1 -1
- package/dist/field/features/relationship/nodes/components/RelationshipComponent.d.ts.map +1 -1
- package/dist/field/features/relationship/nodes/components/RelationshipComponent.js +119 -50
- package/dist/field/features/relationship/nodes/components/RelationshipComponent.js.map +1 -1
- package/dist/field/features/relationship/plugins/index.d.ts +2 -2
- package/dist/field/features/relationship/plugins/index.d.ts.map +1 -1
- package/dist/field/features/relationship/plugins/index.js +14 -15
- package/dist/field/features/relationship/plugins/index.js.map +1 -1
- package/dist/field/features/relationship/populationPromise.d.ts +2 -1
- package/dist/field/features/relationship/populationPromise.d.ts.map +1 -1
- package/dist/field/features/relationship/populationPromise.js +25 -19
- package/dist/field/features/relationship/populationPromise.js.map +1 -1
- package/dist/field/features/shared/slashMenu/basicGroup.d.ts +3 -0
- package/dist/field/features/shared/slashMenu/basicGroup.d.ts.map +1 -0
- package/dist/field/features/shared/slashMenu/basicGroup.js +11 -0
- package/dist/field/features/shared/slashMenu/basicGroup.js.map +1 -0
- package/dist/field/features/shared/toolbar/addDropdownGroup.d.ts +3 -0
- package/dist/field/features/shared/toolbar/addDropdownGroup.d.ts.map +1 -0
- package/dist/field/features/shared/toolbar/addDropdownGroup.js +12 -0
- package/dist/field/features/shared/toolbar/addDropdownGroup.js.map +1 -0
- package/dist/field/features/shared/toolbar/featureButtonsGroup.d.ts +3 -0
- package/dist/field/features/shared/toolbar/featureButtonsGroup.d.ts.map +1 -0
- package/dist/field/features/shared/toolbar/featureButtonsGroup.js +10 -0
- package/dist/field/features/shared/toolbar/featureButtonsGroup.js.map +1 -0
- package/dist/field/features/shared/toolbar/textDropdownGroup.d.ts +3 -0
- package/dist/field/features/shared/toolbar/textDropdownGroup.d.ts.map +1 -0
- package/dist/field/features/shared/toolbar/textDropdownGroup.js +12 -0
- package/dist/field/features/shared/toolbar/textDropdownGroup.js.map +1 -0
- package/dist/field/features/toolbars/fixed/Toolbar/index.d.ts +5 -0
- package/dist/field/features/toolbars/fixed/Toolbar/index.d.ts.map +1 -0
- package/dist/field/features/toolbars/fixed/Toolbar/index.js +211 -0
- package/dist/field/features/toolbars/fixed/Toolbar/index.js.map +1 -0
- package/dist/field/features/toolbars/fixed/Toolbar/index.scss +119 -0
- package/dist/field/features/toolbars/fixed/feature.client.d.ts +7 -0
- package/dist/field/features/toolbars/fixed/feature.client.d.ts.map +1 -0
- package/dist/field/features/toolbars/fixed/feature.client.js +20 -0
- package/dist/field/features/toolbars/fixed/feature.client.js.map +1 -0
- package/dist/field/features/toolbars/fixed/feature.server.d.ts +19 -0
- package/dist/field/features/toolbars/fixed/feature.server.d.ts.map +1 -0
- package/dist/field/features/toolbars/fixed/feature.server.js +20 -0
- package/dist/field/features/toolbars/fixed/feature.server.js.map +1 -0
- package/dist/field/features/toolbars/inline/Toolbar/index.d.ts +4 -0
- package/dist/field/features/toolbars/inline/Toolbar/index.d.ts.map +1 -0
- package/dist/field/features/toolbars/inline/Toolbar/index.js +320 -0
- package/dist/field/features/toolbars/inline/Toolbar/index.js.map +1 -0
- package/dist/field/{lexical/plugins/FloatingSelectToolbar → features/toolbars/inline/Toolbar}/index.scss +7 -11
- package/dist/field/features/toolbars/inline/feature.client.d.ts +6 -0
- package/dist/field/features/toolbars/inline/feature.client.d.ts.map +1 -0
- package/dist/field/features/toolbars/inline/feature.client.js +20 -0
- package/dist/field/features/toolbars/inline/feature.client.js.map +1 -0
- package/dist/field/features/toolbars/inline/feature.server.d.ts +3 -0
- package/dist/field/features/toolbars/inline/feature.server.d.ts.map +1 -0
- package/dist/field/features/toolbars/inline/feature.server.js +15 -0
- package/dist/field/features/toolbars/inline/feature.server.js.map +1 -0
- package/dist/field/features/toolbars/shared/ToolbarButton/index.d.ts +10 -0
- package/dist/field/features/toolbars/shared/ToolbarButton/index.d.ts.map +1 -0
- package/dist/field/{lexical/plugins/FloatingSelectToolbar → features/toolbars/shared}/ToolbarButton/index.js +34 -22
- package/dist/field/features/toolbars/shared/ToolbarButton/index.js.map +1 -0
- package/dist/field/{lexical/plugins/FloatingSelectToolbar → features/toolbars/shared}/ToolbarButton/index.scss +3 -1
- package/dist/field/features/toolbars/shared/ToolbarDropdown/DropDown.d.ts +23 -0
- package/dist/field/features/toolbars/shared/ToolbarDropdown/DropDown.d.ts.map +1 -0
- package/dist/field/{lexical/plugins/FloatingSelectToolbar → features/toolbars/shared}/ToolbarDropdown/DropDown.js +74 -100
- package/dist/field/features/toolbars/shared/ToolbarDropdown/DropDown.js.map +1 -0
- package/dist/field/features/toolbars/shared/ToolbarDropdown/index.d.ts +23 -0
- package/dist/field/features/toolbars/shared/ToolbarDropdown/index.d.ts.map +1 -0
- package/dist/field/features/toolbars/shared/ToolbarDropdown/index.js +142 -0
- package/dist/field/features/toolbars/shared/ToolbarDropdown/index.js.map +1 -0
- package/dist/field/{lexical/plugins/FloatingSelectToolbar → features/toolbars/shared}/ToolbarDropdown/index.scss +25 -13
- package/dist/field/features/toolbars/types.d.ts +48 -0
- package/dist/field/features/toolbars/types.d.ts.map +1 -0
- package/dist/field/features/toolbars/types.js.map +1 -0
- package/dist/field/features/typeUtilities.d.ts +8 -0
- package/dist/field/features/typeUtilities.d.ts.map +1 -0
- package/dist/field/features/typeUtilities.js +8 -0
- package/dist/field/features/typeUtilities.js.map +1 -0
- package/dist/field/features/types.d.ts +172 -63
- package/dist/field/features/types.d.ts.map +1 -1
- package/dist/field/features/types.js.map +1 -1
- package/dist/field/features/upload/component/ExtraFieldsDrawer/index.d.ts.map +1 -1
- package/dist/field/features/upload/component/ExtraFieldsDrawer/index.js +32 -25
- package/dist/field/features/upload/component/ExtraFieldsDrawer/index.js.map +1 -1
- package/dist/field/features/upload/component/index.d.ts.map +1 -1
- package/dist/field/features/upload/component/index.js +159 -76
- package/dist/field/features/upload/component/index.js.map +1 -1
- package/dist/field/features/upload/drawer/commands.d.ts.map +1 -1
- package/dist/field/features/upload/drawer/commands.js +1 -2
- package/dist/field/features/upload/drawer/commands.js.map +1 -1
- package/dist/field/features/upload/drawer/index.d.ts.map +1 -1
- package/dist/field/features/upload/drawer/index.js +16 -16
- package/dist/field/features/upload/drawer/index.js.map +1 -1
- package/dist/field/features/upload/feature.client.d.ts +4 -1
- package/dist/field/features/upload/feature.client.d.ts.map +1 -1
- package/dist/field/features/upload/feature.client.js +52 -26
- package/dist/field/features/upload/feature.client.js.map +1 -1
- package/dist/field/features/upload/feature.server.d.ts +10 -3
- package/dist/field/features/upload/feature.server.d.ts.map +1 -1
- package/dist/field/features/upload/feature.server.js +41 -11
- package/dist/field/features/upload/feature.server.js.map +1 -1
- package/dist/field/features/upload/i18n.d.ts +3 -0
- package/dist/field/features/upload/i18n.d.ts.map +1 -0
- package/dist/field/features/upload/i18n.js +100 -0
- package/dist/field/features/upload/i18n.js.map +1 -0
- package/dist/field/features/upload/nodes/UploadNode.d.ts +3 -15
- package/dist/field/features/upload/nodes/UploadNode.d.ts.map +1 -1
- package/dist/field/features/upload/nodes/UploadNode.js +28 -14
- package/dist/field/features/upload/nodes/UploadNode.js.map +1 -1
- package/dist/field/features/upload/plugin/index.d.ts +5 -4
- package/dist/field/features/upload/plugin/index.d.ts.map +1 -1
- package/dist/field/features/upload/plugin/index.js +16 -19
- package/dist/field/features/upload/plugin/index.js.map +1 -1
- package/dist/field/features/upload/populationPromise.d.ts.map +1 -1
- package/dist/field/features/upload/populationPromise.js +16 -10
- package/dist/field/features/upload/populationPromise.js.map +1 -1
- package/dist/field/features/upload/validate.d.ts +2 -1
- package/dist/field/features/upload/validate.d.ts.map +1 -1
- package/dist/field/features/upload/validate.js +36 -9
- package/dist/field/features/upload/validate.js.map +1 -1
- package/dist/field/index.d.ts +3 -1
- package/dist/field/index.d.ts.map +1 -1
- package/dist/field/index.js +39 -26
- package/dist/field/index.js.map +1 -1
- package/dist/field/index.scss +1 -22
- package/dist/field/lexical/EditorPlugin.d.ts +1 -0
- package/dist/field/lexical/EditorPlugin.d.ts.map +1 -1
- package/dist/field/lexical/EditorPlugin.js +8 -4
- package/dist/field/lexical/EditorPlugin.js.map +1 -1
- package/dist/field/lexical/LexicalEditor.d.ts +3 -1
- package/dist/field/lexical/LexicalEditor.d.ts.map +1 -1
- package/dist/field/lexical/LexicalEditor.js +157 -74
- package/dist/field/lexical/LexicalEditor.js.map +1 -1
- package/dist/field/lexical/LexicalEditor.scss +13 -20
- package/dist/field/lexical/LexicalProvider.d.ts +1 -1
- package/dist/field/lexical/LexicalProvider.d.ts.map +1 -1
- package/dist/field/lexical/LexicalProvider.js +52 -41
- package/dist/field/lexical/LexicalProvider.js.map +1 -1
- package/dist/field/lexical/config/client/EditorConfigProvider.d.ts +15 -4
- package/dist/field/lexical/config/client/EditorConfigProvider.d.ts.map +1 -1
- package/dist/field/lexical/config/client/EditorConfigProvider.js +61 -11
- package/dist/field/lexical/config/client/EditorConfigProvider.js.map +1 -1
- package/dist/field/lexical/config/client/default.d.ts +1 -1
- package/dist/field/lexical/config/client/default.d.ts.map +1 -1
- package/dist/field/lexical/config/client/default.js.map +1 -1
- package/dist/field/lexical/config/client/sanitize.d.ts +3 -2
- package/dist/field/lexical/config/client/sanitize.d.ts.map +1 -1
- package/dist/field/lexical/config/client/sanitize.js +83 -33
- package/dist/field/lexical/config/client/sanitize.js.map +1 -1
- package/dist/field/lexical/config/server/default.d.ts +2 -3
- package/dist/field/lexical/config/server/default.d.ts.map +1 -1
- package/dist/field/lexical/config/server/default.js +12 -10
- package/dist/field/lexical/config/server/default.js.map +1 -1
- package/dist/field/lexical/config/server/loader.d.ts +5 -2
- package/dist/field/lexical/config/server/loader.d.ts.map +1 -1
- package/dist/field/lexical/config/server/loader.js +4 -2
- package/dist/field/lexical/config/server/loader.js.map +1 -1
- package/dist/field/lexical/config/server/sanitize.d.ts +2 -1
- package/dist/field/lexical/config/server/sanitize.d.ts.map +1 -1
- package/dist/field/lexical/config/server/sanitize.js +32 -6
- package/dist/field/lexical/config/server/sanitize.js.map +1 -1
- package/dist/field/lexical/config/types.d.ts +3 -1
- package/dist/field/lexical/config/types.d.ts.map +1 -1
- package/dist/field/lexical/config/types.js.map +1 -1
- package/dist/field/lexical/plugins/MarkdownShortcut/index.d.ts.map +1 -1
- package/dist/field/lexical/plugins/MarkdownShortcut/index.js +3 -3
- package/dist/field/lexical/plugins/MarkdownShortcut/index.js.map +1 -1
- package/dist/field/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/LexicalMenu.d.ts +10 -10
- package/dist/field/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/LexicalMenu.d.ts.map +1 -1
- package/dist/field/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/LexicalMenu.js +74 -77
- package/dist/field/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/LexicalMenu.js.map +1 -1
- package/dist/field/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/index.d.ts +5 -5
- package/dist/field/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/index.d.ts.map +1 -1
- package/dist/field/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/index.js +8 -10
- package/dist/field/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/index.js.map +1 -1
- package/dist/field/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/types.d.ts +19 -27
- package/dist/field/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/types.d.ts.map +1 -1
- package/dist/field/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/types.js +1 -37
- package/dist/field/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/types.js.map +1 -1
- package/dist/field/lexical/plugins/SlashMenu/index.d.ts +2 -2
- package/dist/field/lexical/plugins/SlashMenu/index.d.ts.map +1 -1
- package/dist/field/lexical/plugins/SlashMenu/index.js +108 -92
- package/dist/field/lexical/plugins/SlashMenu/index.js.map +1 -1
- package/dist/field/lexical/plugins/handles/AddBlockHandlePlugin/index.d.ts +2 -2
- package/dist/field/lexical/plugins/handles/AddBlockHandlePlugin/index.d.ts.map +1 -1
- package/dist/field/lexical/plugins/handles/AddBlockHandlePlugin/index.js +47 -125
- package/dist/field/lexical/plugins/handles/AddBlockHandlePlugin/index.js.map +1 -1
- package/dist/field/lexical/plugins/handles/AddBlockHandlePlugin/index.scss +2 -2
- package/dist/field/lexical/plugins/handles/DraggableBlockPlugin/highlightElemOriginalPosition.d.ts +1 -1
- package/dist/field/lexical/plugins/handles/DraggableBlockPlugin/highlightElemOriginalPosition.d.ts.map +1 -1
- package/dist/field/lexical/plugins/handles/DraggableBlockPlugin/highlightElemOriginalPosition.js.map +1 -1
- package/dist/field/lexical/plugins/handles/DraggableBlockPlugin/index.d.ts +2 -2
- package/dist/field/lexical/plugins/handles/DraggableBlockPlugin/index.d.ts.map +1 -1
- package/dist/field/lexical/plugins/handles/DraggableBlockPlugin/index.js +116 -66
- package/dist/field/lexical/plugins/handles/DraggableBlockPlugin/index.js.map +1 -1
- package/dist/field/lexical/plugins/handles/DraggableBlockPlugin/index.scss +20 -3
- package/dist/field/lexical/plugins/handles/DraggableBlockPlugin/setTargetLine.d.ts +8 -1
- package/dist/field/lexical/plugins/handles/DraggableBlockPlugin/setTargetLine.d.ts.map +1 -1
- package/dist/field/lexical/plugins/handles/DraggableBlockPlugin/setTargetLine.js +83 -16
- package/dist/field/lexical/plugins/handles/DraggableBlockPlugin/setTargetLine.js.map +1 -1
- package/dist/field/lexical/plugins/handles/utils/calculateDistanceFromScrollerElem.d.ts +5 -0
- package/dist/field/lexical/plugins/handles/utils/calculateDistanceFromScrollerElem.d.ts.map +1 -0
- package/dist/field/lexical/plugins/handles/utils/calculateDistanceFromScrollerElem.js +21 -0
- package/dist/field/lexical/plugins/handles/utils/calculateDistanceFromScrollerElem.js.map +1 -0
- package/dist/field/lexical/plugins/handles/utils/doesLineHeightAffectElement.d.ts +9 -0
- package/dist/field/lexical/plugins/handles/utils/doesLineHeightAffectElement.d.ts.map +1 -0
- package/dist/field/lexical/plugins/handles/utils/doesLineHeightAffectElement.js +35 -0
- package/dist/field/lexical/plugins/handles/utils/doesLineHeightAffectElement.js.map +1 -0
- package/dist/field/lexical/plugins/handles/{DraggableBlockPlugin → utils}/getNodeCloseToPoint.d.ts +5 -1
- package/dist/field/lexical/plugins/handles/utils/getNodeCloseToPoint.d.ts.map +1 -0
- package/dist/field/lexical/plugins/handles/{DraggableBlockPlugin → utils}/getNodeCloseToPoint.js +5 -18
- package/dist/field/lexical/plugins/handles/utils/getNodeCloseToPoint.js.map +1 -0
- package/dist/field/lexical/plugins/handles/utils/getTopLevelNodeKeys.d.ts.map +1 -1
- package/dist/field/lexical/plugins/handles/utils/getTopLevelNodeKeys.js +1 -2
- package/dist/field/lexical/plugins/handles/utils/getTopLevelNodeKeys.js.map +1 -1
- package/dist/field/lexical/plugins/handles/utils/setHandlePosition.d.ts +1 -1
- package/dist/field/lexical/plugins/handles/utils/setHandlePosition.d.ts.map +1 -1
- package/dist/field/lexical/plugins/handles/utils/setHandlePosition.js +19 -7
- package/dist/field/lexical/plugins/handles/utils/setHandlePosition.js.map +1 -1
- package/dist/field/lexical/theme/EditorTheme.scss +18 -14
- package/dist/field/lexical/ui/ContentEditable.d.ts +1 -1
- package/dist/field/lexical/ui/ContentEditable.d.ts.map +1 -1
- package/dist/field/lexical/ui/ContentEditable.js +3 -3
- package/dist/field/lexical/ui/ContentEditable.js.map +1 -1
- package/dist/field/lexical/ui/ContentEditable.scss +55 -4
- package/dist/field/lexical/ui/icons/AI/index.js +26 -17
- package/dist/field/lexical/ui/icons/AI/index.js.map +1 -1
- package/dist/field/lexical/ui/icons/Add/index.d.ts +3 -0
- package/dist/field/lexical/ui/icons/Add/index.d.ts.map +1 -0
- package/dist/field/lexical/ui/icons/Add/index.js +21 -0
- package/dist/field/lexical/ui/icons/Add/index.js.map +1 -0
- package/dist/field/lexical/ui/icons/Add/light.svg +4 -0
- package/dist/field/lexical/ui/icons/AlignCenter/index.js +21 -15
- package/dist/field/lexical/ui/icons/AlignCenter/index.js.map +1 -1
- package/dist/field/lexical/ui/icons/AlignJustify/index.js +21 -15
- package/dist/field/lexical/ui/icons/AlignJustify/index.js.map +1 -1
- package/dist/field/lexical/ui/icons/AlignLeft/index.js +21 -15
- package/dist/field/lexical/ui/icons/AlignLeft/index.js.map +1 -1
- package/dist/field/lexical/ui/icons/AlignRight/index.js +21 -15
- package/dist/field/lexical/ui/icons/AlignRight/index.js.map +1 -1
- package/dist/field/lexical/ui/icons/Block/index.js +30 -24
- package/dist/field/lexical/ui/icons/Block/index.js.map +1 -1
- package/dist/field/lexical/ui/icons/Blockquote/index.js +8 -6
- package/dist/field/lexical/ui/icons/Blockquote/index.js.map +1 -1
- package/dist/field/lexical/ui/icons/Bold/index.js +8 -6
- package/dist/field/lexical/ui/icons/Bold/index.js.map +1 -1
- package/dist/field/lexical/ui/icons/Checklist/index.js +19 -14
- package/dist/field/lexical/ui/icons/Checklist/index.js.map +1 -1
- package/dist/field/lexical/ui/icons/Code/index.js +14 -9
- package/dist/field/lexical/ui/icons/Code/index.js.map +1 -1
- package/dist/field/lexical/ui/icons/CodeBlock/index.js +14 -9
- package/dist/field/lexical/ui/icons/CodeBlock/index.js.map +1 -1
- package/dist/field/lexical/ui/icons/DraggableBlock/light.svg +9 -0
- package/dist/field/lexical/ui/icons/H1/index.js +8 -6
- package/dist/field/lexical/ui/icons/H1/index.js.map +1 -1
- package/dist/field/lexical/ui/icons/H2/index.js +8 -6
- package/dist/field/lexical/ui/icons/H2/index.js.map +1 -1
- package/dist/field/lexical/ui/icons/H3/index.js +8 -6
- package/dist/field/lexical/ui/icons/H3/index.js.map +1 -1
- package/dist/field/lexical/ui/icons/H4/index.js +8 -6
- package/dist/field/lexical/ui/icons/H4/index.js.map +1 -1
- package/dist/field/lexical/ui/icons/H5/index.js +8 -6
- package/dist/field/lexical/ui/icons/H5/index.js.map +1 -1
- package/dist/field/lexical/ui/icons/H6/index.js +8 -6
- package/dist/field/lexical/ui/icons/H6/index.js.map +1 -1
- package/dist/field/lexical/ui/icons/HorizontalRule/index.d.ts +3 -0
- package/dist/field/lexical/ui/icons/HorizontalRule/index.d.ts.map +1 -0
- package/dist/field/lexical/ui/icons/HorizontalRule/index.js +21 -0
- package/dist/field/lexical/ui/icons/HorizontalRule/index.js.map +1 -0
- package/dist/field/lexical/ui/icons/IndentDecrease/index.js +25 -18
- package/dist/field/lexical/ui/icons/IndentDecrease/index.js.map +1 -1
- package/dist/field/lexical/ui/icons/IndentIncrease/index.js +25 -18
- package/dist/field/lexical/ui/icons/IndentIncrease/index.js.map +1 -1
- package/dist/field/lexical/ui/icons/Italic/index.js +8 -6
- package/dist/field/lexical/ui/icons/Italic/index.js.map +1 -1
- package/dist/field/lexical/ui/icons/Link/index.d.ts.map +1 -1
- package/dist/field/lexical/ui/icons/Link/index.js +10 -18
- package/dist/field/lexical/ui/icons/Link/index.js.map +1 -1
- package/dist/field/lexical/ui/icons/OrderedList/index.js +29 -21
- package/dist/field/lexical/ui/icons/OrderedList/index.js.map +1 -1
- package/dist/field/lexical/ui/icons/Relationship/index.js +26 -17
- package/dist/field/lexical/ui/icons/Relationship/index.js.map +1 -1
- package/dist/field/lexical/ui/icons/Strikethrough/index.js +14 -9
- package/dist/field/lexical/ui/icons/Strikethrough/index.js.map +1 -1
- package/dist/field/lexical/ui/icons/Subscript/index.js +8 -6
- package/dist/field/lexical/ui/icons/Subscript/index.js.map +1 -1
- package/dist/field/lexical/ui/icons/Superscript/index.js +8 -6
- package/dist/field/lexical/ui/icons/Superscript/index.js.map +1 -1
- package/dist/field/lexical/ui/icons/Text/index.js +8 -6
- package/dist/field/lexical/ui/icons/Text/index.js.map +1 -1
- package/dist/field/lexical/ui/icons/Underline/index.js +14 -9
- package/dist/field/lexical/ui/icons/Underline/index.js.map +1 -1
- package/dist/field/lexical/ui/icons/UnorderedList/index.js +45 -36
- package/dist/field/lexical/ui/icons/UnorderedList/index.js.map +1 -1
- package/dist/field/lexical/ui/icons/Upload/index.js +24 -18
- package/dist/field/lexical/ui/icons/Upload/index.js.map +1 -1
- package/dist/field/lexical/utils/getSelectedNode.d.ts.map +1 -1
- package/dist/field/lexical/utils/getSelectedNode.js +1 -2
- package/dist/field/lexical/utils/getSelectedNode.js.map +1 -1
- package/dist/field/lexical/utils/nodeFormat.d.ts +2 -1
- package/dist/field/lexical/utils/nodeFormat.d.ts.map +1 -1
- package/dist/field/lexical/utils/nodeFormat.js.map +1 -1
- package/dist/field/lexical/utils/setFloatingElemPosition.d.ts +11 -1
- package/dist/field/lexical/utils/setFloatingElemPosition.d.ts.map +1 -1
- package/dist/field/lexical/utils/setFloatingElemPosition.js +16 -13
- package/dist/field/lexical/utils/setFloatingElemPosition.js.map +1 -1
- package/dist/field/lexical/utils/url.d.ts.map +1 -1
- package/dist/field/lexical/utils/url.js +13 -2
- package/dist/field/lexical/utils/url.js.map +1 -1
- package/dist/forEachNodeRecursively.d.ts +10 -0
- package/dist/forEachNodeRecursively.d.ts.map +1 -0
- package/dist/forEachNodeRecursively.js +24 -0
- package/dist/forEachNodeRecursively.js.map +1 -0
- package/dist/generateComponentMap.d.ts.map +1 -1
- package/dist/generateComponentMap.js +21 -29
- package/dist/generateComponentMap.js.map +1 -1
- package/dist/generateSchemaMap.d.ts.map +1 -1
- package/dist/generateSchemaMap.js +4 -12
- package/dist/generateSchemaMap.js.map +1 -1
- package/dist/i18n.d.ts +3 -0
- package/dist/i18n.d.ts.map +1 -0
- package/dist/i18n.js +164 -0
- package/dist/i18n.js.map +1 -0
- package/dist/index.d.ts +25 -21
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +296 -183
- package/dist/index.js.map +1 -1
- package/dist/populate/defaultValue.d.ts +0 -1
- package/dist/populate/defaultValue.d.ts.map +1 -1
- package/dist/populate/defaultValue.js +1 -19
- package/dist/populate/defaultValue.js.map +1 -1
- package/dist/populate/populate.d.ts +5 -4
- package/dist/populate/populate.d.ts.map +1 -1
- package/dist/populate/populate.js +13 -11
- package/dist/populate/populate.js.map +1 -1
- package/dist/populate/populateLexicalPopulationPromises.d.ts +12 -0
- package/dist/populate/populateLexicalPopulationPromises.d.ts.map +1 -0
- package/dist/populate/populateLexicalPopulationPromises.js +36 -0
- package/dist/populate/populateLexicalPopulationPromises.js.map +1 -0
- package/dist/populate/recurseNestedFields.d.ts +8 -4
- package/dist/populate/recurseNestedFields.d.ts.map +1 -1
- package/dist/populate/recurseNestedFields.js +4 -5
- package/dist/populate/recurseNestedFields.js.map +1 -1
- package/dist/scss/app.scss +2 -3
- package/dist/scss/vars.scss +0 -7
- package/dist/types.d.ts +45 -6
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js.map +1 -1
- package/dist/useLexicalFeature.d.ts.map +1 -1
- package/dist/useLexicalFeature.js +6 -1
- package/dist/useLexicalFeature.js.map +1 -1
- package/dist/validate/index.d.ts +1 -1
- package/dist/validate/index.d.ts.map +1 -1
- package/dist/validate/index.js +3 -2
- package/dist/validate/index.js.map +1 -1
- package/dist/validate/validateNodes.js +1 -1
- package/dist/validate/validateNodes.js.map +1 -1
- package/package.json +70 -50
- package/dist/field/features/align/floatingSelectToolbarAlignDropdownSection.d.ts +0 -3
- package/dist/field/features/align/floatingSelectToolbarAlignDropdownSection.d.ts.map +0 -1
- package/dist/field/features/align/floatingSelectToolbarAlignDropdownSection.js +0 -12
- package/dist/field/features/align/floatingSelectToolbarAlignDropdownSection.js.map +0 -1
- package/dist/field/features/common/floatingSelectToolbarFeaturesButtonsSection/index.d.ts +0 -3
- package/dist/field/features/common/floatingSelectToolbarFeaturesButtonsSection/index.d.ts.map +0 -1
- package/dist/field/features/common/floatingSelectToolbarFeaturesButtonsSection/index.js +0 -10
- package/dist/field/features/common/floatingSelectToolbarFeaturesButtonsSection/index.js.map +0 -1
- package/dist/field/features/common/floatingSelectToolbarTextDropdownSection/index.d.ts +0 -3
- package/dist/field/features/common/floatingSelectToolbarTextDropdownSection/index.d.ts.map +0 -1
- package/dist/field/features/common/floatingSelectToolbarTextDropdownSection/index.js +0 -12
- package/dist/field/features/common/floatingSelectToolbarTextDropdownSection/index.js.map +0 -1
- package/dist/field/features/debug/testrecorder/feature.client.d.ts.map +0 -1
- package/dist/field/features/debug/testrecorder/plugin/index.d.ts +0 -5
- package/dist/field/features/debug/testrecorder/plugin/index.d.ts.map +0 -1
- package/dist/field/features/debug/testrecorder/plugin/index.js.map +0 -1
- package/dist/field/features/debug/treeview/feature.client.d.ts.map +0 -1
- package/dist/field/features/debug/treeview/plugin/index.d.ts +0 -4
- package/dist/field/features/debug/treeview/plugin/index.d.ts.map +0 -1
- package/dist/field/features/debug/treeview/plugin/index.js.map +0 -1
- package/dist/field/features/format/common/floatingSelectToolbarSection.d.ts +0 -3
- package/dist/field/features/format/common/floatingSelectToolbarSection.d.ts.map +0 -1
- package/dist/field/features/format/common/floatingSelectToolbarSection.js +0 -10
- package/dist/field/features/format/common/floatingSelectToolbarSection.js.map +0 -1
- package/dist/field/features/format/inlinecode/feature.client.d.ts.map +0 -1
- package/dist/field/features/format/inlinecode/feature.client.js +0 -43
- package/dist/field/features/format/inlinecode/feature.client.js.map +0 -1
- package/dist/field/features/indent/floatingSelectToolbarIndentSection.d.ts +0 -3
- package/dist/field/features/indent/floatingSelectToolbarIndentSection.d.ts.map +0 -1
- package/dist/field/features/indent/floatingSelectToolbarIndentSection.js +0 -10
- package/dist/field/features/indent/floatingSelectToolbarIndentSection.js.map +0 -1
- package/dist/field/features/indent/index.scss +0 -4
- package/dist/field/features/lists/common/markdown.js.map +0 -1
- package/dist/field/features/lists/orderedlist/feature.client.d.ts.map +0 -1
- package/dist/field/features/lists/orderedlist/feature.client.js +0 -72
- package/dist/field/features/lists/orderedlist/feature.client.js.map +0 -1
- package/dist/field/features/lists/orderedlist/feature.server.d.ts.map +0 -1
- package/dist/field/features/lists/orderedlist/feature.server.js.map +0 -1
- package/dist/field/features/lists/orderedlist/markdownTransformer.d.ts.map +0 -1
- package/dist/field/features/lists/orderedlist/markdownTransformer.js.map +0 -1
- package/dist/field/features/lists/unorderedlist/feature.client.d.ts.map +0 -1
- package/dist/field/features/lists/unorderedlist/feature.client.js +0 -72
- package/dist/field/features/lists/unorderedlist/feature.client.js.map +0 -1
- package/dist/field/features/lists/unorderedlist/feature.server.d.ts.map +0 -1
- package/dist/field/features/lists/unorderedlist/feature.server.js.map +0 -1
- package/dist/field/features/lists/unorderedlist/markdownTransformer.d.ts.map +0 -1
- package/dist/field/features/lists/unorderedlist/markdownTransformer.js.map +0 -1
- package/dist/field/lexical/plugins/FloatingSelectToolbar/ToolbarButton/index.d.ts +0 -8
- package/dist/field/lexical/plugins/FloatingSelectToolbar/ToolbarButton/index.d.ts.map +0 -1
- package/dist/field/lexical/plugins/FloatingSelectToolbar/ToolbarButton/index.js.map +0 -1
- package/dist/field/lexical/plugins/FloatingSelectToolbar/ToolbarDropdown/DropDown.d.ts +0 -17
- package/dist/field/lexical/plugins/FloatingSelectToolbar/ToolbarDropdown/DropDown.d.ts.map +0 -1
- package/dist/field/lexical/plugins/FloatingSelectToolbar/ToolbarDropdown/DropDown.js.map +0 -1
- package/dist/field/lexical/plugins/FloatingSelectToolbar/ToolbarDropdown/index.d.ts +0 -18
- package/dist/field/lexical/plugins/FloatingSelectToolbar/ToolbarDropdown/index.d.ts.map +0 -1
- package/dist/field/lexical/plugins/FloatingSelectToolbar/ToolbarDropdown/index.js +0 -42
- package/dist/field/lexical/plugins/FloatingSelectToolbar/ToolbarDropdown/index.js.map +0 -1
- package/dist/field/lexical/plugins/FloatingSelectToolbar/index.d.ts +0 -6
- package/dist/field/lexical/plugins/FloatingSelectToolbar/index.d.ts.map +0 -1
- package/dist/field/lexical/plugins/FloatingSelectToolbar/index.js +0 -270
- package/dist/field/lexical/plugins/FloatingSelectToolbar/index.js.map +0 -1
- package/dist/field/lexical/plugins/FloatingSelectToolbar/types.d.ts +0 -40
- package/dist/field/lexical/plugins/FloatingSelectToolbar/types.d.ts.map +0 -1
- package/dist/field/lexical/plugins/FloatingSelectToolbar/types.js.map +0 -1
- package/dist/field/lexical/plugins/handles/DraggableBlockPlugin/getNodeCloseToPoint.d.ts.map +0 -1
- package/dist/field/lexical/plugins/handles/DraggableBlockPlugin/getNodeCloseToPoint.js.map +0 -1
- package/dist/populate/richTextRelationshipPromise.d.ts +0 -23
- package/dist/populate/richTextRelationshipPromise.d.ts.map +0 -1
- package/dist/populate/richTextRelationshipPromise.js +0 -68
- package/dist/populate/richTextRelationshipPromise.js.map +0 -1
- package/dist/scss/fonts.scss +0 -75
- package/src/index.ts +0 -423
- /package/dist/field/features/debug/{testrecorder → testRecorder}/feature.client.js +0 -0
- /package/dist/field/features/debug/{testrecorder → testRecorder}/feature.server.d.ts +0 -0
- /package/dist/field/features/debug/{testrecorder → testRecorder}/plugin/index.scss +0 -0
- /package/dist/field/features/debug/{treeview → treeView}/feature.client.js +0 -0
- /package/dist/field/features/debug/{treeview → treeView}/feature.server.d.ts +0 -0
- /package/dist/field/features/debug/{treeview → treeView}/plugin/index.scss +0 -0
- /package/dist/field/features/format/{inlinecode → inlineCode}/feature.server.d.ts +0 -0
- /package/dist/field/features/format/{inlinecode → inlineCode}/markdownTransformers.d.ts +0 -0
- /package/dist/field/features/format/{inlinecode → inlineCode}/markdownTransformers.js +0 -0
- /package/dist/field/features/lists/{orderedlist → orderedList}/feature.server.d.ts +0 -0
- /package/dist/field/features/lists/{orderedlist → orderedList}/markdownTransformer.d.ts +0 -0
- /package/dist/field/features/lists/{common → shared}/markdown.d.ts +0 -0
- /package/dist/field/features/lists/{unorderedlist → unorderedList}/feature.server.d.ts +0 -0
- /package/dist/field/features/lists/{unorderedlist → unorderedList}/markdownTransformer.d.ts +0 -0
- /package/dist/field/{lexical/plugins/FloatingSelectToolbar → features/toolbars}/types.js +0 -0
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index.ts"],"sourcesContent":["import type { JSONSchema4 } from 'json-schema'\nimport type { EditorConfig as LexicalEditorConfig } from 'lexical/LexicalEditor.js'\n\nimport { withMergedProps } from '@payloadcms/ui/elements/withMergedProps'\nimport { withNullableJSONSchemaType } from 'payload/utilities'\n\nimport type { FeatureProviderServer, ResolvedServerFeatureMap } from './field/features/types.js'\nimport type { SanitizedServerEditorConfig } from './field/lexical/config/types.js'\nimport type { AdapterProps, LexicalEditorProps, LexicalRichTextAdapter } from './types.js'\n\nimport { RichTextCell } from './cell/index.js'\nimport { RichTextField } from './field/index.js'\nimport {\n defaultEditorConfig,\n defaultEditorFeatures,\n defaultSanitizedServerEditorConfig,\n} from './field/lexical/config/server/default.js'\nimport { loadFeatures } from './field/lexical/config/server/loader.js'\nimport { sanitizeServerFeatures } from './field/lexical/config/server/sanitize.js'\nimport { cloneDeep } from './field/lexical/utils/cloneDeep.js'\nimport { getGenerateComponentMap } from './generateComponentMap.js'\nimport { getGenerateSchemaMap } from './generateSchemaMap.js'\nimport { richTextRelationshipPromise } from './populate/richTextRelationshipPromise.js'\nimport { richTextValidateHOC } from './validate/index.js'\n\nexport function lexicalEditor(props?: LexicalEditorProps): LexicalRichTextAdapter {\n let resolvedFeatureMap: ResolvedServerFeatureMap = null\n\n let finalSanitizedEditorConfig: SanitizedServerEditorConfig // For server only\n if (!props || (!props.features && !props.lexical)) {\n finalSanitizedEditorConfig = cloneDeep(defaultSanitizedServerEditorConfig)\n resolvedFeatureMap = finalSanitizedEditorConfig.resolvedFeatureMap\n } else {\n let features: FeatureProviderServer<unknown, unknown>[] =\n props.features && typeof props.features === 'function'\n ? props.features({ defaultFeatures: cloneDeep(defaultEditorFeatures) })\n : (props.features as FeatureProviderServer<unknown, unknown>[])\n if (!features) {\n features = cloneDeep(defaultEditorFeatures)\n }\n\n const lexical: LexicalEditorConfig = props.lexical\n\n resolvedFeatureMap = loadFeatures({\n unSanitizedEditorConfig: {\n features,\n lexical: lexical ? lexical : defaultEditorConfig.lexical,\n },\n })\n\n finalSanitizedEditorConfig = {\n features: sanitizeServerFeatures(resolvedFeatureMap),\n lexical: lexical ? lexical : defaultEditorConfig.lexical,\n resolvedFeatureMap,\n }\n }\n\n return {\n CellComponent: withMergedProps({\n Component: RichTextCell,\n toMergeIntoProps: { lexicalEditorConfig: finalSanitizedEditorConfig.lexical },\n }),\n FieldComponent: withMergedProps({\n Component: RichTextField,\n toMergeIntoProps: { lexicalEditorConfig: finalSanitizedEditorConfig.lexical },\n }),\n afterReadPromise: ({ field, incomingEditorState, siblingDoc }) => {\n return new Promise<void>((resolve, reject) => {\n const promises: Promise<void>[] = []\n\n if (finalSanitizedEditorConfig?.features?.hooks?.afterReadPromises?.length) {\n for (const afterReadPromise of finalSanitizedEditorConfig.features.hooks\n .afterReadPromises) {\n const promise = afterReadPromise({\n field,\n incomingEditorState,\n siblingDoc,\n })\n if (promise) {\n promises.push(promise)\n }\n }\n }\n\n Promise.all(promises)\n .then(() => resolve())\n .catch((error) => reject(error))\n })\n },\n editorConfig: finalSanitizedEditorConfig,\n generateComponentMap: getGenerateComponentMap({\n resolvedFeatureMap,\n }),\n generateSchemaMap: getGenerateSchemaMap({\n resolvedFeatureMap,\n }),\n outputSchema: ({\n collectionIDFieldTypes,\n config,\n field,\n interfaceNameDefinitions,\n isRequired,\n }) => {\n let outputSchema: JSONSchema4 = {\n // This schema matches the SerializedEditorState type so far, that it's possible to cast SerializedEditorState to this schema without any errors.\n // In the future, we should\n // 1) allow recursive children\n // 2) Pass in all the different types for every node added to the editorconfig. This can be done with refs in the schema.\n type: withNullableJSONSchemaType('object', isRequired),\n properties: {\n root: {\n type: 'object',\n additionalProperties: false,\n properties: {\n type: {\n type: 'string',\n },\n children: {\n type: 'array',\n items: {\n type: 'object',\n additionalProperties: true,\n properties: {\n type: {\n type: 'string',\n },\n version: {\n type: 'integer',\n },\n },\n required: ['type', 'version'],\n },\n },\n direction: {\n oneOf: [\n {\n enum: ['ltr', 'rtl'],\n },\n {\n type: 'null',\n },\n ],\n },\n format: {\n type: 'string',\n enum: ['left', 'start', 'center', 'right', 'end', 'justify', ''], // ElementFormatType, since the root node is an element\n },\n indent: {\n type: 'integer',\n },\n version: {\n type: 'integer',\n },\n },\n required: ['children', 'direction', 'format', 'indent', 'type', 'version'],\n },\n },\n required: ['root'],\n }\n for (const modifyOutputSchema of finalSanitizedEditorConfig.features.generatedTypes\n .modifyOutputSchemas) {\n outputSchema = modifyOutputSchema({\n collectionIDFieldTypes,\n config,\n currentSchema: outputSchema,\n field,\n interfaceNameDefinitions,\n isRequired,\n })\n }\n\n return outputSchema\n },\n populationPromise({\n context,\n currentDepth,\n depth,\n field,\n findMany,\n flattenLocales,\n overrideAccess,\n populationPromises,\n req,\n showHiddenFields,\n siblingDoc,\n }) {\n // check if there are any features with nodes which have populationPromises for this field\n if (finalSanitizedEditorConfig?.features?.populationPromises?.size) {\n return richTextRelationshipPromise({\n context,\n currentDepth,\n depth,\n editorPopulationPromises: finalSanitizedEditorConfig.features.populationPromises,\n field,\n findMany,\n flattenLocales,\n overrideAccess,\n populationPromises,\n req,\n showHiddenFields,\n siblingDoc,\n })\n }\n\n return null\n },\n validate: richTextValidateHOC({\n editorConfig: finalSanitizedEditorConfig,\n }),\n }\n}\n\nexport { AlignFeature } from './field/features/align/feature.server.js'\nexport { BlockQuoteFeature } from './field/features/blockquote/feature.server.js'\nexport {\n BlocksFeature,\n type BlocksFeatureProps,\n type LexicalBlock,\n} from './field/features/blocks/feature.server.js'\nexport {\n $createBlockNode,\n $isBlockNode,\n type BlockFields,\n BlockNode,\n type SerializedBlockNode,\n} from './field/features/blocks/nodes/BlocksNode.js'\n\nexport { TextDropdownSectionWithEntries } from './field/features/common/floatingSelectToolbarTextDropdownSection/index.js'\nexport { LinebreakHTMLConverter } from './field/features/converters/html/converter/converters/linebreak.js'\nexport { ParagraphHTMLConverter } from './field/features/converters/html/converter/converters/paragraph.js'\n\nexport { TextHTMLConverter } from './field/features/converters/html/converter/converters/text.js'\nexport { defaultHTMLConverters } from './field/features/converters/html/converter/defaultConverters.js'\nexport {\n convertLexicalNodesToHTML,\n convertLexicalToHTML,\n} from './field/features/converters/html/converter/index.js'\nexport type { HTMLConverter } from './field/features/converters/html/converter/types.js'\nexport {\n HTMLConverterFeature,\n type HTMLConverterFeatureProps,\n} from './field/features/converters/html/feature.server.js'\nexport {\n consolidateHTMLConverters,\n lexicalHTML,\n} from './field/features/converters/html/field/index.js'\nexport { createClientComponent } from './field/features/createClientComponent.js'\nexport { TestRecorderFeature } from './field/features/debug/testrecorder/feature.server.js'\nexport { TreeViewFeature } from './field/features/debug/treeview/feature.server.js'\nexport { BoldFeature } from './field/features/format/bold/feature.server.js'\nexport { SectionWithEntries as FormatSectionWithEntries } from './field/features/format/common/floatingSelectToolbarSection.js'\nexport { InlineCodeFeature } from './field/features/format/inlinecode/feature.server.js'\nexport { ItalicFeature } from './field/features/format/italic/feature.server.js'\nexport { StrikethroughFeature } from './field/features/format/strikethrough/feature.server.js'\nexport { SubscriptFeature } from './field/features/format/subscript/feature.server.js'\nexport { SuperscriptFeature } from './field/features/format/superscript/feature.server.js'\nexport { UnderlineFeature } from './field/features/format/underline/feature.server.js'\n\nexport { HeadingFeature } from './field/features/heading/feature.server.js'\nexport { IndentFeature } from './field/features/indent/feature.server.js'\n\nexport { LinkFeature, type LinkFeatureServerProps } from './field/features/link/feature.server.js'\nexport {\n $createAutoLinkNode,\n $isAutoLinkNode,\n AutoLinkNode,\n} from './field/features/link/nodes/AutoLinkNode.js'\nexport {\n $createLinkNode,\n $isLinkNode,\n LinkNode,\n TOGGLE_LINK_COMMAND,\n} from './field/features/link/nodes/LinkNode.js'\nexport type {\n LinkFields,\n SerializedAutoLinkNode,\n SerializedLinkNode,\n} from './field/features/link/nodes/types.js'\nexport { CheckListFeature } from './field/features/lists/checklist/feature.server.js'\nexport { OrderedListFeature } from './field/features/lists/orderedlist/feature.server.js'\nexport { UnorderedListFeature } from './field/features/lists/unorderedlist/feature.server.js'\nexport { LexicalPluginToLexicalFeature } from './field/features/migrations/lexicalPluginToLexical/feature.server.js'\nexport { SlateBlockquoteConverter } from './field/features/migrations/slateToLexical/converter/converters/blockquote/index.js'\nexport { SlateHeadingConverter } from './field/features/migrations/slateToLexical/converter/converters/heading/index.js'\nexport { SlateIndentConverter } from './field/features/migrations/slateToLexical/converter/converters/indent/index.js'\nexport { SlateLinkConverter } from './field/features/migrations/slateToLexical/converter/converters/link/index.js'\nexport { SlateListItemConverter } from './field/features/migrations/slateToLexical/converter/converters/listItem/index.js'\nexport { SlateOrderedListConverter } from './field/features/migrations/slateToLexical/converter/converters/orderedList/index.js'\nexport { SlateRelationshipConverter } from './field/features/migrations/slateToLexical/converter/converters/relationship/index.js'\nexport { SlateUnknownConverter } from './field/features/migrations/slateToLexical/converter/converters/unknown/index.js'\nexport { SlateUnorderedListConverter } from './field/features/migrations/slateToLexical/converter/converters/unorderedList/index.js'\n\nexport { SlateUploadConverter } from './field/features/migrations/slateToLexical/converter/converters/upload/index.js'\nexport { defaultSlateConverters } from './field/features/migrations/slateToLexical/converter/defaultConverters.js'\nexport {\n convertSlateNodesToLexical,\n convertSlateToLexical,\n} from './field/features/migrations/slateToLexical/converter/index.js'\n\nexport type {\n SlateNode,\n SlateNodeConverter,\n} from './field/features/migrations/slateToLexical/converter/types.js'\nexport { SlateToLexicalFeature } from './field/features/migrations/slateToLexical/feature.server.js'\nexport { ParagraphFeature } from './field/features/paragraph/feature.server.js'\nexport { RelationshipFeature } from './field/features/relationship/feature.server.js'\nexport {\n $createRelationshipNode,\n $isRelationshipNode,\n type RelationshipData,\n RelationshipNode,\n type SerializedRelationshipNode,\n} from './field/features/relationship/nodes/RelationshipNode.js'\nexport type {\n ClientFeature,\n ClientFeatureProviderMap,\n FeatureProviderClient,\n FeatureProviderProviderClient,\n FeatureProviderProviderServer,\n FeatureProviderServer,\n NodeValidation,\n PopulationPromise,\n ResolvedClientFeature,\n ResolvedClientFeatureMap,\n ResolvedServerFeature,\n ResolvedServerFeatureMap,\n SanitizedClientFeatures,\n SanitizedPlugin,\n SanitizedServerFeatures,\n ServerFeature,\n ServerFeatureProviderMap,\n} from './field/features/types.js'\nexport { UploadFeature } from './field/features/upload/feature.server.js'\n\nexport type { UploadFeatureProps } from './field/features/upload/feature.server.js'\n\nexport type { RawUploadPayload } from './field/features/upload/nodes/UploadNode.js'\n\nexport {\n $createUploadNode,\n $isUploadNode,\n type SerializedUploadNode,\n type UploadData,\n UploadNode,\n} from './field/features/upload/nodes/UploadNode.js'\nexport {\n EditorConfigProvider,\n useEditorConfigContext,\n} from './field/lexical/config/client/EditorConfigProvider.js'\nexport {\n sanitizeClientEditorConfig,\n sanitizeClientFeatures,\n} from './field/lexical/config/client/sanitize.js'\nexport {\n defaultEditorConfig,\n defaultEditorFeatures,\n defaultEditorLexicalConfig,\n defaultSanitizedServerEditorConfig,\n} from './field/lexical/config/server/default.js'\nexport {\n loadFeatures,\n sortFeaturesForOptimalLoading,\n} from './field/lexical/config/server/loader.js'\nexport {\n sanitizeServerEditorConfig,\n sanitizeServerFeatures,\n} from './field/lexical/config/server/sanitize.js'\n\nexport type {\n ClientEditorConfig,\n SanitizedClientEditorConfig,\n SanitizedServerEditorConfig,\n ServerEditorConfig,\n} from './field/lexical/config/types.js'\nexport { getEnabledNodes } from './field/lexical/nodes/index.js'\n\nexport {\n type FloatingToolbarSection,\n type FloatingToolbarSectionEntry,\n} from './field/lexical/plugins/FloatingSelectToolbar/types.js'\nexport { ENABLE_SLASH_MENU_COMMAND } from './field/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/index.js'\nexport type { AdapterProps }\n\nexport {\n SlashMenuGroup,\n SlashMenuOption,\n} from './field/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/types.js'\nexport { CAN_USE_DOM } from './field/lexical/utils/canUseDOM.js'\nexport { cloneDeep } from './field/lexical/utils/cloneDeep.js'\nexport { getDOMRangeRect } from './field/lexical/utils/getDOMRangeRect.js'\nexport { getSelectedNode } from './field/lexical/utils/getSelectedNode.js'\nexport { isHTMLElement } from './field/lexical/utils/guard.js'\nexport { invariant } from './field/lexical/utils/invariant.js'\nexport { joinClasses } from './field/lexical/utils/joinClasses.js'\nexport { createBlockNode } from './field/lexical/utils/markdown/createBlockNode.js'\nexport {\n DETAIL_TYPE_TO_DETAIL,\n DOUBLE_LINE_BREAK,\n ELEMENT_FORMAT_TO_TYPE,\n ELEMENT_TYPE_TO_FORMAT,\n IS_ALL_FORMATTING,\n LTR_REGEX,\n NON_BREAKING_SPACE,\n NodeFormat,\n RTL_REGEX,\n TEXT_MODE_TO_TYPE,\n TEXT_TYPE_TO_FORMAT,\n TEXT_TYPE_TO_MODE,\n} from './field/lexical/utils/nodeFormat.js'\nexport { Point, isPoint } from './field/lexical/utils/point.js'\nexport { Rect } from './field/lexical/utils/rect.js'\nexport { setFloatingElemPosition } from './field/lexical/utils/setFloatingElemPosition.js'\nexport { setFloatingElemPositionForLinkEditor } from './field/lexical/utils/setFloatingElemPositionForLinkEditor.js'\nexport {\n addSwipeDownListener,\n addSwipeLeftListener,\n addSwipeRightListener,\n addSwipeUpListener,\n} from './field/lexical/utils/swipe.js'\nexport { sanitizeUrl, validateUrl } from './field/lexical/utils/url.js'\nexport { defaultRichTextValue } from './populate/defaultValue.js'\n\nexport type { LexicalEditorProps, LexicalRichTextAdapter } from './types.js'\n"],"names":["withMergedProps","withNullableJSONSchemaType","RichTextCell","RichTextField","defaultEditorConfig","defaultEditorFeatures","defaultSanitizedServerEditorConfig","loadFeatures","sanitizeServerFeatures","cloneDeep","getGenerateComponentMap","getGenerateSchemaMap","richTextRelationshipPromise","richTextValidateHOC","lexicalEditor","props","resolvedFeatureMap","finalSanitizedEditorConfig","features","lexical","defaultFeatures","unSanitizedEditorConfig","CellComponent","Component","toMergeIntoProps","lexicalEditorConfig","FieldComponent","afterReadPromise","field","incomingEditorState","siblingDoc","Promise","resolve","reject","promises","hooks","afterReadPromises","length","promise","push","all","then","catch","error","editorConfig","generateComponentMap","generateSchemaMap","outputSchema","collectionIDFieldTypes","config","interfaceNameDefinitions","isRequired","type","properties","root","additionalProperties","children","items","version","required","direction","oneOf","enum","format","indent","modifyOutputSchema","generatedTypes","modifyOutputSchemas","currentSchema","populationPromise","context","currentDepth","depth","findMany","flattenLocales","overrideAccess","populationPromises","req","showHiddenFields","size","editorPopulationPromises","validate","AlignFeature","BlockQuoteFeature","BlocksFeature","$createBlockNode","$isBlockNode","BlockNode","TextDropdownSectionWithEntries","LinebreakHTMLConverter","ParagraphHTMLConverter","TextHTMLConverter","defaultHTMLConverters","convertLexicalNodesToHTML","convertLexicalToHTML","HTMLConverterFeature","consolidateHTMLConverters","lexicalHTML","createClientComponent","TestRecorderFeature","TreeViewFeature","BoldFeature","SectionWithEntries","FormatSectionWithEntries","InlineCodeFeature","ItalicFeature","StrikethroughFeature","SubscriptFeature","SuperscriptFeature","UnderlineFeature","HeadingFeature","IndentFeature","LinkFeature","$createAutoLinkNode","$isAutoLinkNode","AutoLinkNode","$createLinkNode","$isLinkNode","LinkNode","TOGGLE_LINK_COMMAND","CheckListFeature","OrderedListFeature","UnorderedListFeature","LexicalPluginToLexicalFeature","SlateBlockquoteConverter","SlateHeadingConverter","SlateIndentConverter","SlateLinkConverter","SlateListItemConverter","SlateOrderedListConverter","SlateRelationshipConverter","SlateUnknownConverter","SlateUnorderedListConverter","SlateUploadConverter","defaultSlateConverters","convertSlateNodesToLexical","convertSlateToLexical","SlateToLexicalFeature","ParagraphFeature","RelationshipFeature","$createRelationshipNode","$isRelationshipNode","RelationshipNode","UploadFeature","$createUploadNode","$isUploadNode","UploadNode","EditorConfigProvider","useEditorConfigContext","sanitizeClientEditorConfig","sanitizeClientFeatures","defaultEditorLexicalConfig","sortFeaturesForOptimalLoading","sanitizeServerEditorConfig","getEnabledNodes","ENABLE_SLASH_MENU_COMMAND","SlashMenuGroup","SlashMenuOption","CAN_USE_DOM","getDOMRangeRect","getSelectedNode","isHTMLElement","invariant","joinClasses","createBlockNode","DETAIL_TYPE_TO_DETAIL","DOUBLE_LINE_BREAK","ELEMENT_FORMAT_TO_TYPE","ELEMENT_TYPE_TO_FORMAT","IS_ALL_FORMATTING","LTR_REGEX","NON_BREAKING_SPACE","NodeFormat","RTL_REGEX","TEXT_MODE_TO_TYPE","TEXT_TYPE_TO_FORMAT","TEXT_TYPE_TO_MODE","Point","isPoint","Rect","setFloatingElemPosition","setFloatingElemPositionForLinkEditor","addSwipeDownListener","addSwipeLeftListener","addSwipeRightListener","addSwipeUpListener","sanitizeUrl","validateUrl","defaultRichTextValue"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAGA,SAASA,eAA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CAAoC;AAC9D,SAASC,WAAW,QAAQ,uCAAsC;AAClE,SAASC,eAAe,QAAQ,oDAAmD;AACnF,SACEC,qBAAqB,EACrBC,iBAAiB,EACjBC,sBAAsB,EACtBC,sBAAsB,EACtBC,iBAAiB,EACjBC,SAAS,EACTC,kBAAkB,EAClBC,UAAU,EACVC,SAAS,EACTC,iBAAiB,EACjBC,mBAAmB,EACnBC,iBAAiB,QACZ,sCAAqC;AAC5C,SAASC,KAAK,EAAEC,OAAO,QAAQ,iCAAgC;AAC/D,SAASC,IAAI,QAAQ,gCAA+B;AACpD,SAASC,uBAAuB,QAAQ,mDAAkD;AAC1F,SAASC,oCAAoC,QAAQ,gEAA+D;AACpH,SACEC,oBAAoB,EACpBC,oBAAoB,EACpBC,qBAAqB,EACrBC,kBAAkB,QACb,iCAAgC;AACvC,SAASC,WAAW,EAAEC,WAAW,QAAQ,+BAA8B;AACvE,SAASC,oBAAoB,QAAQ,6BAA4B"}
|
|
1
|
+
{"version":3,"sources":["../src/index.ts"],"sourcesContent":["import type { JSONSchema4 } from 'json-schema'\nimport type { EditorConfig as LexicalEditorConfig } from 'lexical'\n\nimport { withMergedProps } from '@payloadcms/ui/elements/withMergedProps'\nimport { withNullableJSONSchemaType } from 'payload/utilities'\n\nimport type { FeatureProviderServer, ResolvedServerFeatureMap } from './field/features/types.js'\nimport type { SanitizedServerEditorConfig } from './field/lexical/config/types.js'\nimport type {\n AdapterProps,\n LexicalEditorProps,\n LexicalRichTextAdapter,\n LexicalRichTextAdapterProvider,\n} from './types.js'\n\nimport { RichTextCell } from './cell/index.js'\nimport { RichTextField } from './field/index.js'\nimport {\n defaultEditorConfig,\n defaultEditorFeatures,\n} from './field/lexical/config/server/default.js'\nimport { loadFeatures } from './field/lexical/config/server/loader.js'\nimport {\n sanitizeServerEditorConfig,\n sanitizeServerFeatures,\n} from './field/lexical/config/server/sanitize.js'\nimport { cloneDeep } from './field/lexical/utils/cloneDeep.js'\nimport { getGenerateComponentMap } from './generateComponentMap.js'\nimport { getGenerateSchemaMap } from './generateSchemaMap.js'\nimport { i18n } from './i18n.js'\nimport { populateLexicalPopulationPromises } from './populate/populateLexicalPopulationPromises.js'\nimport { richTextValidateHOC } from './validate/index.js'\n\nlet defaultSanitizedServerEditorConfig: SanitizedServerEditorConfig = null\n\nexport function lexicalEditor(props?: LexicalEditorProps): LexicalRichTextAdapterProvider {\n return async ({ config, isRoot }) => {\n let features: FeatureProviderServer<unknown, unknown>[] = []\n let resolvedFeatureMap: ResolvedServerFeatureMap\n\n let finalSanitizedEditorConfig: SanitizedServerEditorConfig // For server only\n if (!props || (!props.features && !props.lexical)) {\n if (!defaultSanitizedServerEditorConfig) {\n defaultSanitizedServerEditorConfig = await sanitizeServerEditorConfig(\n defaultEditorConfig,\n config,\n )\n features = cloneDeep(defaultEditorFeatures)\n }\n\n finalSanitizedEditorConfig = cloneDeep(defaultSanitizedServerEditorConfig)\n\n resolvedFeatureMap = finalSanitizedEditorConfig.resolvedFeatureMap\n } else {\n const rootEditor = config.editor\n let rootEditorFeatures: FeatureProviderServer<unknown, unknown>[] = []\n if (typeof rootEditor === 'object' && 'features' in rootEditor) {\n rootEditorFeatures = (rootEditor as LexicalRichTextAdapter).features\n }\n\n features =\n props.features && typeof props.features === 'function'\n ? props.features({\n defaultFeatures: cloneDeep(defaultEditorFeatures),\n rootFeatures: rootEditorFeatures,\n })\n : (props.features as FeatureProviderServer<unknown, unknown>[])\n if (!features) {\n features = cloneDeep(defaultEditorFeatures)\n }\n\n const lexical: LexicalEditorConfig = props.lexical\n\n resolvedFeatureMap = await loadFeatures({\n config,\n isRoot,\n unSanitizedEditorConfig: {\n features,\n lexical: lexical ? lexical : defaultEditorConfig.lexical,\n },\n })\n\n finalSanitizedEditorConfig = {\n features: sanitizeServerFeatures(resolvedFeatureMap),\n lexical: lexical ? lexical : defaultEditorConfig.lexical,\n resolvedFeatureMap,\n }\n }\n\n const featureI18n = finalSanitizedEditorConfig.features.i18n\n for (const lang in i18n) {\n if (!featureI18n[lang]) {\n featureI18n[lang] = {\n lexical: {},\n }\n }\n\n featureI18n[lang].lexical.general = i18n[lang]\n }\n\n return {\n CellComponent: withMergedProps({\n Component: RichTextCell,\n toMergeIntoProps: {\n admin: props?.admin,\n lexicalEditorConfig: finalSanitizedEditorConfig.lexical,\n },\n }),\n FieldComponent: withMergedProps({\n Component: RichTextField,\n toMergeIntoProps: {\n admin: props?.admin,\n lexicalEditorConfig: finalSanitizedEditorConfig.lexical,\n },\n }),\n editorConfig: finalSanitizedEditorConfig,\n features,\n generateComponentMap: getGenerateComponentMap({\n resolvedFeatureMap,\n }),\n generateSchemaMap: getGenerateSchemaMap({\n resolvedFeatureMap,\n }),\n i18n: featureI18n,\n /* hooks: {\n afterChange: finalSanitizedEditorConfig.features.hooks.afterChange,\n afterRead: finalSanitizedEditorConfig.features.hooks.afterRead,\n beforeChange: finalSanitizedEditorConfig.features.hooks.beforeChange,\n beforeDuplicate: finalSanitizedEditorConfig.features.hooks.beforeDuplicate,\n beforeValidate: finalSanitizedEditorConfig.features.hooks.beforeValidate,\n },*/\n /* // TODO: Figure out docWithLocales / originalSiblingDoc => node matching. Can't use indexes, as the order of nodes could technically change between hooks.\n hooks: {\n afterChange: [\n async ({ context, findMany, operation, overrideAccess, req, value }) => {\n await recurseNodesAsync({\n callback: async (node) => {\n const afterChangeHooks = finalSanitizedEditorConfig.features.hooks.afterChange\n if (afterChangeHooks?.has(node.type)) {\n for (const hook of afterChangeHooks.get(node.type)) {\n node = await hook({ context, findMany, node, operation, overrideAccess, req })\n }\n }\n },\n nodes: (value as SerializedEditorState)?.root?.children ?? [],\n })\n\n return value\n },\n ],\n afterRead: [\n async ({ context, findMany, operation, overrideAccess, req, value }) => {\n await recurseNodesAsync({\n callback: async (node) => {\n const afterReadHooks = finalSanitizedEditorConfig.features.hooks.afterRead\n if (afterReadHooks?.has(node.type)) {\n for (const hook of afterReadHooks.get(node.type)) {\n node = await hook({ context, findMany, node, operation, overrideAccess, req })\n }\n }\n },\n nodes: (value as SerializedEditorState)?.root?.children ?? [],\n })\n\n return value\n },\n ],\n beforeChange: [\n async ({ context, findMany, operation, overrideAccess, req, value }) => {\n await recurseNodesAsync({\n callback: async (node) => {\n const beforeChangeHooks = finalSanitizedEditorConfig.features.hooks.beforeChange\n if (beforeChangeHooks?.has(node.type)) {\n for (const hook of beforeChangeHooks.get(node.type)) {\n node = await hook({ context, findMany, node, operation, overrideAccess, req })\n }\n }\n },\n nodes: (value as SerializedEditorState)?.root?.children ?? [],\n })\n\n return value\n },\n ],\n beforeDuplicate: [\n async ({ context, findMany, operation, overrideAccess, req, value }) => {\n await recurseNodesAsync({\n callback: async (node) => {\n const beforeDuplicateHooks = finalSanitizedEditorConfig.features.hooks.beforeDuplicate\n if (beforeDuplicateHooks?.has(node.type)) {\n for (const hook of beforeDuplicateHooks.get(node.type)) {\n node = await hook({ context, findMany, node, operation, overrideAccess, req })\n }\n }\n },\n nodes: (value as SerializedEditorState)?.root?.children ?? [],\n })\n\n return value\n },\n ],\n beforeValidate: [\n async ({ context, findMany, operation, overrideAccess, req, value }) => {\n await recurseNodesAsync({\n callback: async (node) => {\n const beforeValidateHooks = finalSanitizedEditorConfig.features.hooks.beforeValidate\n if (beforeValidateHooks?.has(node.type)) {\n for (const hook of beforeValidateHooks.get(node.type)) {\n /**\n * We cannot pass the originalNode here, as there is no way to map one node to a previous one, as a previous originalNode might be in a different position\n */ /*\n node = await hook({ context, findMany, node, operation, overrideAccess, req })\n }\n }\n },\n nodes: (value as SerializedEditorState)?.root?.children ?? [],\n })\n\n return value\n },\n ],\n },*/\n outputSchema: ({\n collectionIDFieldTypes,\n config,\n field,\n interfaceNameDefinitions,\n isRequired,\n }) => {\n let outputSchema: JSONSchema4 = {\n // This schema matches the SerializedEditorState type so far, that it's possible to cast SerializedEditorState to this schema without any errors.\n // In the future, we should\n // 1) allow recursive children\n // 2) Pass in all the different types for every node added to the editorconfig. This can be done with refs in the schema.\n type: withNullableJSONSchemaType('object', isRequired),\n properties: {\n root: {\n type: 'object',\n additionalProperties: false,\n properties: {\n type: {\n type: 'string',\n },\n children: {\n type: 'array',\n items: {\n type: 'object',\n additionalProperties: true,\n properties: {\n type: {\n type: 'string',\n },\n version: {\n type: 'integer',\n },\n },\n required: ['type', 'version'],\n },\n },\n direction: {\n oneOf: [\n {\n enum: ['ltr', 'rtl'],\n },\n {\n type: 'null',\n },\n ],\n },\n format: {\n type: 'string',\n enum: ['left', 'start', 'center', 'right', 'end', 'justify', ''], // ElementFormatType, since the root node is an element\n },\n indent: {\n type: 'integer',\n },\n version: {\n type: 'integer',\n },\n },\n required: ['children', 'direction', 'format', 'indent', 'type', 'version'],\n },\n },\n required: ['root'],\n }\n for (const modifyOutputSchema of finalSanitizedEditorConfig.features.generatedTypes\n .modifyOutputSchemas) {\n outputSchema = modifyOutputSchema({\n collectionIDFieldTypes,\n config,\n currentSchema: outputSchema,\n field,\n interfaceNameDefinitions,\n isRequired,\n })\n }\n\n return outputSchema\n },\n populationPromises({\n context,\n currentDepth,\n depth,\n draft,\n field,\n fieldPromises,\n findMany,\n flattenLocales,\n overrideAccess,\n populationPromises,\n req,\n showHiddenFields,\n siblingDoc,\n }) {\n // check if there are any features with nodes which have populationPromises for this field\n if (finalSanitizedEditorConfig?.features?.populationPromises?.size) {\n populateLexicalPopulationPromises({\n context,\n currentDepth,\n depth,\n draft,\n editorPopulationPromises: finalSanitizedEditorConfig.features.populationPromises,\n field,\n fieldPromises,\n findMany,\n flattenLocales,\n overrideAccess,\n populationPromises,\n req,\n showHiddenFields,\n siblingDoc,\n })\n }\n },\n validate: richTextValidateHOC({\n editorConfig: finalSanitizedEditorConfig,\n }),\n }\n }\n}\n\nexport { AlignFeature } from './field/features/align/feature.server.js'\nexport { BlockquoteFeature } from './field/features/blockquote/feature.server.js'\nexport { BlocksFeature, type BlocksFeatureProps } from './field/features/blocks/feature.server.js'\nexport {\n $createBlockNode,\n $isBlockNode,\n type BlockFields,\n BlockNode,\n type SerializedBlockNode,\n} from './field/features/blocks/nodes/BlocksNode.js'\n\nexport { LinebreakHTMLConverter } from './field/features/converters/html/converter/converters/linebreak.js'\nexport { ParagraphHTMLConverter } from './field/features/converters/html/converter/converters/paragraph.js'\nexport { TextHTMLConverter } from './field/features/converters/html/converter/converters/text.js'\n\nexport { defaultHTMLConverters } from './field/features/converters/html/converter/defaultConverters.js'\nexport {\n convertLexicalNodesToHTML,\n convertLexicalToHTML,\n} from './field/features/converters/html/converter/index.js'\nexport type { HTMLConverter } from './field/features/converters/html/converter/types.js'\nexport {\n HTMLConverterFeature,\n type HTMLConverterFeatureProps,\n} from './field/features/converters/html/feature.server.js'\nexport {\n consolidateHTMLConverters,\n lexicalHTML,\n} from './field/features/converters/html/field/index.js'\nexport { TestRecorderFeature } from './field/features/debug/testRecorder/feature.server.js'\nexport { TreeViewFeature } from './field/features/debug/treeView/feature.server.js'\nexport { BoldFeature } from './field/features/format/bold/feature.server.js'\nexport { InlineCodeFeature } from './field/features/format/inlineCode/feature.server.js'\n\nexport { ItalicFeature } from './field/features/format/italic/feature.server.js'\nexport { toolbarFormatGroupWithItems } from './field/features/format/shared/toolbarFormatGroup.js'\nexport { StrikethroughFeature } from './field/features/format/strikethrough/feature.server.js'\nexport { SubscriptFeature } from './field/features/format/subscript/feature.server.js'\nexport { SuperscriptFeature } from './field/features/format/superscript/feature.server.js'\nexport { UnderlineFeature } from './field/features/format/underline/feature.server.js'\nexport {\n HeadingFeature,\n type HeadingFeatureProps,\n} from './field/features/heading/feature.server.js'\nexport { HorizontalRuleFeature } from './field/features/horizontalRule/feature.server.js'\n\nexport { IndentFeature } from './field/features/indent/feature.server.js'\nexport { LinkFeature, type LinkFeatureServerProps } from './field/features/link/feature.server.js'\n\nexport {\n $createAutoLinkNode,\n $isAutoLinkNode,\n AutoLinkNode,\n} from './field/features/link/nodes/AutoLinkNode.js'\nexport {\n $createLinkNode,\n $isLinkNode,\n LinkNode,\n TOGGLE_LINK_COMMAND,\n} from './field/features/link/nodes/LinkNode.js'\nexport type {\n LinkFields,\n SerializedAutoLinkNode,\n SerializedLinkNode,\n} from './field/features/link/nodes/types.js'\nexport { ChecklistFeature } from './field/features/lists/checklist/feature.server.js'\nexport { OrderedListFeature } from './field/features/lists/orderedList/feature.server.js'\nexport { UnorderedListFeature } from './field/features/lists/unorderedList/feature.server.js'\nexport { LexicalPluginToLexicalFeature } from './field/features/migrations/lexicalPluginToLexical/feature.server.js'\nexport { SlateBlockquoteConverter } from './field/features/migrations/slateToLexical/converter/converters/blockquote/index.js'\nexport { SlateHeadingConverter } from './field/features/migrations/slateToLexical/converter/converters/heading/index.js'\nexport { SlateIndentConverter } from './field/features/migrations/slateToLexical/converter/converters/indent/index.js'\nexport { SlateLinkConverter } from './field/features/migrations/slateToLexical/converter/converters/link/index.js'\nexport { SlateListItemConverter } from './field/features/migrations/slateToLexical/converter/converters/listItem/index.js'\nexport { SlateOrderedListConverter } from './field/features/migrations/slateToLexical/converter/converters/orderedList/index.js'\nexport { SlateRelationshipConverter } from './field/features/migrations/slateToLexical/converter/converters/relationship/index.js'\nexport { SlateUnknownConverter } from './field/features/migrations/slateToLexical/converter/converters/unknown/index.js'\nexport { SlateUnorderedListConverter } from './field/features/migrations/slateToLexical/converter/converters/unorderedList/index.js'\nexport { SlateUploadConverter } from './field/features/migrations/slateToLexical/converter/converters/upload/index.js'\nexport { defaultSlateConverters } from './field/features/migrations/slateToLexical/converter/defaultConverters.js'\n\nexport {\n convertSlateNodesToLexical,\n convertSlateToLexical,\n} from './field/features/migrations/slateToLexical/converter/index.js'\nexport type {\n SlateNode,\n SlateNodeConverter,\n} from './field/features/migrations/slateToLexical/converter/types.js'\nexport { SlateToLexicalFeature } from './field/features/migrations/slateToLexical/feature.server.js'\n\nexport { ParagraphFeature } from './field/features/paragraph/feature.server.js'\nexport {\n RelationshipFeature,\n type RelationshipFeatureProps,\n} from './field/features/relationship/feature.server.js'\nexport {\n $createRelationshipNode,\n $isRelationshipNode,\n type RelationshipData,\n RelationshipNode,\n type SerializedRelationshipNode,\n} from './field/features/relationship/nodes/RelationshipNode.js'\nexport { toolbarAddDropdownGroupWithItems } from './field/features/shared/toolbar/addDropdownGroup.js'\nexport { toolbarFeatureButtonsGroupWithItems } from './field/features/shared/toolbar/featureButtonsGroup.js'\n\nexport { toolbarTextDropdownGroupWithItems } from './field/features/shared/toolbar/textDropdownGroup.js'\nexport { FixedToolbarFeature } from './field/features/toolbars/fixed/feature.server.js'\nexport { InlineToolbarFeature } from './field/features/toolbars/inline/feature.server.js'\n\nexport type { ToolbarGroup, ToolbarGroupItem } from './field/features/toolbars/types.js'\nexport { createNode } from './field/features/typeUtilities.js'\nexport type {\n ClientComponentProps,\n ClientFeature,\n ClientFeatureProviderMap,\n FeatureProviderClient,\n FeatureProviderProviderClient,\n FeatureProviderProviderServer,\n FeatureProviderServer,\n FieldNodeHook,\n FieldNodeHookArgs,\n NodeValidation,\n NodeWithHooks,\n PluginComponent,\n PluginComponentWithAnchor,\n PopulationPromise,\n ResolvedClientFeature,\n ResolvedClientFeatureMap,\n ResolvedServerFeature,\n ResolvedServerFeatureMap,\n SanitizedClientFeatures,\n SanitizedPlugin,\n SanitizedServerFeatures,\n ServerFeature,\n ServerFeatureProviderMap,\n} from './field/features/types.js'\n\nexport { UploadFeature } from './field/features/upload/feature.server.js'\n\nexport type { UploadFeatureProps } from './field/features/upload/feature.server.js'\nexport {\n $createUploadNode,\n $isUploadNode,\n type SerializedUploadNode,\n type UploadData,\n UploadNode,\n} from './field/features/upload/nodes/UploadNode.js'\n\nexport {\n type EditorConfigContextType,\n EditorConfigProvider,\n useEditorConfigContext,\n} from './field/lexical/config/client/EditorConfigProvider.js'\nexport {\n sanitizeClientEditorConfig,\n sanitizeClientFeatures,\n} from './field/lexical/config/client/sanitize.js'\nexport {\n defaultEditorConfig,\n defaultEditorFeatures,\n defaultEditorLexicalConfig,\n} from './field/lexical/config/server/default.js'\nexport {\n loadFeatures,\n sortFeaturesForOptimalLoading,\n} from './field/lexical/config/server/loader.js'\n\nexport {\n sanitizeServerEditorConfig,\n sanitizeServerFeatures,\n} from './field/lexical/config/server/sanitize.js'\nexport type {\n ClientEditorConfig,\n SanitizedClientEditorConfig,\n SanitizedServerEditorConfig,\n ServerEditorConfig,\n} from './field/lexical/config/types.js'\n\nexport { getEnabledNodes } from './field/lexical/nodes/index.js'\nexport { ENABLE_SLASH_MENU_COMMAND } from './field/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/index.js'\nexport type { AdapterProps }\n\nexport type {\n SlashMenuGroup,\n SlashMenuItem,\n} from './field/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/types.js'\nexport { CAN_USE_DOM } from './field/lexical/utils/canUseDOM.js'\nexport { cloneDeep } from './field/lexical/utils/cloneDeep.js'\nexport { getDOMRangeRect } from './field/lexical/utils/getDOMRangeRect.js'\nexport { getSelectedNode } from './field/lexical/utils/getSelectedNode.js'\nexport { isHTMLElement } from './field/lexical/utils/guard.js'\nexport { invariant } from './field/lexical/utils/invariant.js'\nexport { joinClasses } from './field/lexical/utils/joinClasses.js'\nexport { createBlockNode } from './field/lexical/utils/markdown/createBlockNode.js'\nexport {\n DETAIL_TYPE_TO_DETAIL,\n DOUBLE_LINE_BREAK,\n ELEMENT_FORMAT_TO_TYPE,\n ELEMENT_TYPE_TO_FORMAT,\n IS_ALL_FORMATTING,\n LTR_REGEX,\n NON_BREAKING_SPACE,\n NodeFormat,\n RTL_REGEX,\n TEXT_MODE_TO_TYPE,\n TEXT_TYPE_TO_FORMAT,\n TEXT_TYPE_TO_MODE,\n} from './field/lexical/utils/nodeFormat.js'\nexport { Point, isPoint } from './field/lexical/utils/point.js'\nexport { Rect } from './field/lexical/utils/rect.js'\nexport { setFloatingElemPosition } from './field/lexical/utils/setFloatingElemPosition.js'\nexport { setFloatingElemPositionForLinkEditor } from './field/lexical/utils/setFloatingElemPositionForLinkEditor.js'\nexport {\n addSwipeDownListener,\n addSwipeLeftListener,\n addSwipeRightListener,\n addSwipeUpListener,\n} from './field/lexical/utils/swipe.js'\nexport { sanitizeUrl, validateUrl } from './field/lexical/utils/url.js'\nexport { defaultRichTextValue } from './populate/defaultValue.js'\n\nexport type { LexicalEditorProps, LexicalRichTextAdapter } from './types.js'\n"],"names":["withMergedProps","withNullableJSONSchemaType","RichTextCell","RichTextField","defaultEditorConfig","defaultEditorFeatures","loadFeatures","sanitizeServerEditorConfig","sanitizeServerFeatures","cloneDeep","getGenerateComponentMap","getGenerateSchemaMap","i18n","populateLexicalPopulationPromises","richTextValidateHOC","defaultSanitizedServerEditorConfig","lexicalEditor","props","config","isRoot","features","resolvedFeatureMap","finalSanitizedEditorConfig","lexical","rootEditor","editor","rootEditorFeatures","defaultFeatures","rootFeatures","unSanitizedEditorConfig","featureI18n","lang","general","CellComponent","Component","toMergeIntoProps","admin","lexicalEditorConfig","FieldComponent","editorConfig","generateComponentMap","generateSchemaMap","outputSchema","collectionIDFieldTypes","field","interfaceNameDefinitions","isRequired","type","properties","root","additionalProperties","children","items","version","required","direction","oneOf","enum","format","indent","modifyOutputSchema","generatedTypes","modifyOutputSchemas","currentSchema","populationPromises","context","currentDepth","depth","draft","fieldPromises","findMany","flattenLocales","overrideAccess","req","showHiddenFields","siblingDoc","size","editorPopulationPromises","validate","AlignFeature","BlockquoteFeature","BlocksFeature","$createBlockNode","$isBlockNode","BlockNode","LinebreakHTMLConverter","ParagraphHTMLConverter","TextHTMLConverter","defaultHTMLConverters","convertLexicalNodesToHTML","convertLexicalToHTML","HTMLConverterFeature","consolidateHTMLConverters","lexicalHTML","TestRecorderFeature","TreeViewFeature","BoldFeature","InlineCodeFeature","ItalicFeature","toolbarFormatGroupWithItems","StrikethroughFeature","SubscriptFeature","SuperscriptFeature","UnderlineFeature","HeadingFeature","HorizontalRuleFeature","IndentFeature","LinkFeature","$createAutoLinkNode","$isAutoLinkNode","AutoLinkNode","$createLinkNode","$isLinkNode","LinkNode","TOGGLE_LINK_COMMAND","ChecklistFeature","OrderedListFeature","UnorderedListFeature","LexicalPluginToLexicalFeature","SlateBlockquoteConverter","SlateHeadingConverter","SlateIndentConverter","SlateLinkConverter","SlateListItemConverter","SlateOrderedListConverter","SlateRelationshipConverter","SlateUnknownConverter","SlateUnorderedListConverter","SlateUploadConverter","defaultSlateConverters","convertSlateNodesToLexical","convertSlateToLexical","SlateToLexicalFeature","ParagraphFeature","RelationshipFeature","$createRelationshipNode","$isRelationshipNode","RelationshipNode","toolbarAddDropdownGroupWithItems","toolbarFeatureButtonsGroupWithItems","toolbarTextDropdownGroupWithItems","FixedToolbarFeature","InlineToolbarFeature","createNode","UploadFeature","$createUploadNode","$isUploadNode","UploadNode","EditorConfigProvider","useEditorConfigContext","sanitizeClientEditorConfig","sanitizeClientFeatures","defaultEditorLexicalConfig","sortFeaturesForOptimalLoading","getEnabledNodes","ENABLE_SLASH_MENU_COMMAND","CAN_USE_DOM","getDOMRangeRect","getSelectedNode","isHTMLElement","invariant","joinClasses","createBlockNode","DETAIL_TYPE_TO_DETAIL","DOUBLE_LINE_BREAK","ELEMENT_FORMAT_TO_TYPE","ELEMENT_TYPE_TO_FORMAT","IS_ALL_FORMATTING","LTR_REGEX","NON_BREAKING_SPACE","NodeFormat","RTL_REGEX","TEXT_MODE_TO_TYPE","TEXT_TYPE_TO_FORMAT","TEXT_TYPE_TO_MODE","Point","isPoint","Rect","setFloatingElemPosition","setFloatingElemPositionForLinkEditor","addSwipeDownListener","addSwipeLeftListener","addSwipeRightListener","addSwipeUpListener","sanitizeUrl","validateUrl","defaultRichTextValue"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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qB,EACrBC,kBAAkB,QACb,iCAAgC;AACvC,SAASC,WAAW,EAAEC,WAAW,QAAQ,+BAA8B;AACvE,SAASC,oBAAoB,QAAQ,6BAA4B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"defaultValue.d.ts","sourceRoot":"","sources":["../../src/populate/defaultValue.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAA+C,MAAM,SAAS,CAAA;AAEjG,eAAO,MAAM,oBAAoB,EAAE,
|
|
1
|
+
{"version":3,"file":"defaultValue.d.ts","sourceRoot":"","sources":["../../src/populate/defaultValue.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAA+C,MAAM,SAAS,CAAA;AAEjG,eAAO,MAAM,oBAAoB,EAAE,qBA6BlC,CAAA"}
|
|
@@ -18,25 +18,7 @@ export const defaultRichTextValue = {
|
|
|
18
18
|
direction: null,
|
|
19
19
|
format: '',
|
|
20
20
|
indent: 0,
|
|
21
|
-
|
|
22
|
-
}
|
|
23
|
-
],
|
|
24
|
-
direction: null,
|
|
25
|
-
format: '',
|
|
26
|
-
indent: 0,
|
|
27
|
-
version: 1
|
|
28
|
-
}
|
|
29
|
-
};
|
|
30
|
-
export const defaultRichTextValueV2 = {
|
|
31
|
-
root: {
|
|
32
|
-
type: 'root',
|
|
33
|
-
children: [
|
|
34
|
-
{
|
|
35
|
-
type: 'paragraph',
|
|
36
|
-
children: [],
|
|
37
|
-
direction: null,
|
|
38
|
-
format: '',
|
|
39
|
-
indent: 0,
|
|
21
|
+
textFormat: 0,
|
|
40
22
|
version: 1
|
|
41
23
|
}
|
|
42
24
|
],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/populate/defaultValue.ts"],"sourcesContent":["import type { SerializedEditorState, SerializedParagraphNode, SerializedTextNode } from 'lexical'\n\nexport const defaultRichTextValue: SerializedEditorState = {\n root: {\n type: 'root',\n children: [\n {\n type: 'paragraph',\n children: [\n {\n type: 'text',\n detail: 0,\n format: 0,\n mode: 'normal',\n style: '',\n text: '',\n version: 1,\n } as SerializedTextNode,\n ],\n direction: null,\n format: '',\n indent: 0,\n
|
|
1
|
+
{"version":3,"sources":["../../src/populate/defaultValue.ts"],"sourcesContent":["import type { SerializedEditorState, SerializedParagraphNode, SerializedTextNode } from 'lexical'\n\nexport const defaultRichTextValue: SerializedEditorState = {\n root: {\n type: 'root',\n children: [\n {\n type: 'paragraph',\n children: [\n {\n type: 'text',\n detail: 0,\n format: 0,\n mode: 'normal',\n style: '',\n text: '',\n version: 1,\n } as SerializedTextNode,\n ],\n direction: null,\n format: '',\n indent: 0,\n textFormat: 0,\n version: 1,\n } as SerializedParagraphNode,\n ],\n direction: null,\n format: '',\n indent: 0,\n version: 1,\n },\n}\n"],"names":["defaultRichTextValue","root","type","children","detail","format","mode","style","text","version","direction","indent","textFormat"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAEA,OAAO,MAAMA,uBAA8C;IACzDC,MAAM;QACJC,MAAM;QACNC,UAAU;YACR;gBACED,MAAM;gBACNC,UAAU;oBACR;wBACED,MAAM;wBACNE,QAAQ;wBACRC,QAAQ;wBACRC,MAAM;wBACNC,OAAO;wBACPC,MAAM;wBACNC,SAAS;oBACX;iBACD;gBACDC,WAAW;gBACXL,QAAQ;gBACRM,QAAQ;gBACRC,YAAY;gBACZH,SAAS;YACX;SACD;QACDC,WAAW;QACXL,QAAQ;QACRM,QAAQ;QACRF,SAAS;IACX;AACF,EAAC"}
|
|
@@ -1,21 +1,22 @@
|
|
|
1
1
|
import type { SerializedEditorState } from 'lexical';
|
|
2
|
-
import type {
|
|
2
|
+
import type { PayloadRequestWithData } from 'payload/types';
|
|
3
3
|
import type { Collection, Field, RichTextField } from 'payload/types';
|
|
4
4
|
import type { AdapterProps } from '../types.js';
|
|
5
5
|
type Arguments = {
|
|
6
6
|
currentDepth?: number;
|
|
7
7
|
data: unknown;
|
|
8
8
|
depth: number;
|
|
9
|
+
draft: boolean;
|
|
9
10
|
field: RichTextField<SerializedEditorState, AdapterProps>;
|
|
10
11
|
key: number | string;
|
|
11
12
|
overrideAccess?: boolean;
|
|
12
|
-
req:
|
|
13
|
+
req: PayloadRequestWithData;
|
|
13
14
|
showHiddenFields: boolean;
|
|
14
15
|
};
|
|
15
|
-
export declare const populate: ({ id, collection, currentDepth, data, depth, key, overrideAccess, req, showHiddenFields, }: Omit<Arguments, 'field'> & {
|
|
16
|
+
export declare const populate: ({ id, collection, currentDepth, data, depth, draft, key, overrideAccess, req, showHiddenFields, }: Omit<Arguments, 'field'> & {
|
|
16
17
|
collection: Collection;
|
|
17
18
|
field: Field;
|
|
18
|
-
id: string;
|
|
19
|
+
id: number | string;
|
|
19
20
|
}) => Promise<void>;
|
|
20
21
|
export {};
|
|
21
22
|
//# sourceMappingURL=populate.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"populate.d.ts","sourceRoot":"","sources":["../../src/populate/populate.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAA;AACpD,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"populate.d.ts","sourceRoot":"","sources":["../../src/populate/populate.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAA;AACpD,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,eAAe,CAAA;AAC3D,OAAO,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE,aAAa,EAAE,MAAM,eAAe,CAAA;AAIrE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AAE/C,KAAK,SAAS,GAAG;IACf,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,IAAI,EAAE,OAAO,CAAA;IACb,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,EAAE,OAAO,CAAA;IACd,KAAK,EAAE,aAAa,CAAC,qBAAqB,EAAE,YAAY,CAAC,CAAA;IACzD,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;IACpB,cAAc,CAAC,EAAE,OAAO,CAAA;IACxB,GAAG,EAAE,sBAAsB,CAAA;IAC3B,gBAAgB,EAAE,OAAO,CAAA;CAC1B,CAAA;AAED,eAAO,MAAM,QAAQ,sGAWlB,KAAK,SAAS,EAAE,OAAO,CAAC,GAAG;IAC5B,UAAU,EAAE,UAAU,CAAA;IACtB,KAAK,EAAE,KAAK,CAAA;IACZ,EAAE,EAAE,MAAM,GAAG,MAAM,CAAA;CACpB,KAAG,QAAQ,IAAI,CAuBf,CAAA"}
|
|
@@ -1,16 +1,18 @@
|
|
|
1
|
-
|
|
1
|
+
import { createDataloaderCacheKey } from 'payload/utilities';
|
|
2
|
+
export const populate = async ({ id, collection, currentDepth, data, depth, draft, key, overrideAccess, req, showHiddenFields })=>{
|
|
2
3
|
const dataRef = data;
|
|
3
|
-
const doc = await req.payloadDataLoader.load(
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
id,
|
|
4
|
+
const doc = await req.payloadDataLoader.load(createDataloaderCacheKey({
|
|
5
|
+
collectionSlug: collection.config.slug,
|
|
6
|
+
currentDepth: currentDepth + 1,
|
|
7
7
|
depth,
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
req.fallbackLocale,
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
8
|
+
docID: id,
|
|
9
|
+
draft,
|
|
10
|
+
fallbackLocale: req.fallbackLocale,
|
|
11
|
+
locale: req.locale,
|
|
12
|
+
overrideAccess: typeof overrideAccess === 'undefined' ? false : overrideAccess,
|
|
13
|
+
showHiddenFields,
|
|
14
|
+
transactionID: req.transactionID
|
|
15
|
+
}));
|
|
14
16
|
if (doc) {
|
|
15
17
|
dataRef[key] = doc;
|
|
16
18
|
} else {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/populate/populate.ts"],"sourcesContent":["import type { SerializedEditorState } from 'lexical'\nimport type {
|
|
1
|
+
{"version":3,"sources":["../../src/populate/populate.ts"],"sourcesContent":["import type { SerializedEditorState } from 'lexical'\nimport type { PayloadRequestWithData } from 'payload/types'\nimport type { Collection, Field, RichTextField } from 'payload/types'\n\nimport { createDataloaderCacheKey } from 'payload/utilities'\n\nimport type { AdapterProps } from '../types.js'\n\ntype Arguments = {\n currentDepth?: number\n data: unknown\n depth: number\n draft: boolean\n field: RichTextField<SerializedEditorState, AdapterProps>\n key: number | string\n overrideAccess?: boolean\n req: PayloadRequestWithData\n showHiddenFields: boolean\n}\n\nexport const populate = async ({\n id,\n collection,\n currentDepth,\n data,\n depth,\n draft,\n key,\n overrideAccess,\n req,\n showHiddenFields,\n}: Omit<Arguments, 'field'> & {\n collection: Collection\n field: Field\n id: number | string\n}): Promise<void> => {\n const dataRef = data as Record<string, unknown>\n\n const doc = await req.payloadDataLoader.load(\n createDataloaderCacheKey({\n collectionSlug: collection.config.slug,\n currentDepth: currentDepth + 1,\n depth,\n docID: id as string,\n draft,\n fallbackLocale: req.fallbackLocale,\n locale: req.locale,\n overrideAccess: typeof overrideAccess === 'undefined' ? false : overrideAccess,\n showHiddenFields,\n transactionID: req.transactionID,\n }),\n )\n\n if (doc) {\n dataRef[key] = doc\n } else {\n dataRef[key] = null\n }\n}\n"],"names":["createDataloaderCacheKey","populate","id","collection","currentDepth","data","depth","draft","key","overrideAccess","req","showHiddenFields","dataRef","doc","payloadDataLoader","load","collectionSlug","config","slug","docID","fallbackLocale","locale","transactionID"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;","mappings":"AAIA,SAASA,wBAAwB,QAAQ,oBAAmB;AAgB5D,OAAO,MAAMC,WAAW,OAAO,EAC7BC,EAAE,EACFC,UAAU,EACVC,YAAY,EACZC,IAAI,EACJC,KAAK,EACLC,KAAK,EACLC,GAAG,EACHC,cAAc,EACdC,GAAG,EACHC,gBAAgB,EAKjB;IACC,MAAMC,UAAUP;IAEhB,MAAMQ,MAAM,MAAMH,IAAII,iBAAiB,CAACC,IAAI,CAC1Cf,yBAAyB;QACvBgB,gBAAgBb,WAAWc,MAAM,CAACC,IAAI;QACtCd,cAAcA,eAAe;QAC7BE;QACAa,OAAOjB;QACPK;QACAa,gBAAgBV,IAAIU,cAAc;QAClCC,QAAQX,IAAIW,MAAM;QAClBZ,gBAAgB,OAAOA,mBAAmB,cAAc,QAAQA;QAChEE;QACAW,eAAeZ,IAAIY,aAAa;IAClC;IAGF,IAAIT,KAAK;QACPD,OAAO,CAACJ,IAAI,GAAGK;IACjB,OAAO;QACLD,OAAO,CAACJ,IAAI,GAAG;IACjB;AACF,EAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { SerializedEditorState } from 'lexical';
|
|
2
|
+
import type { RichTextAdapter } from 'payload/types';
|
|
3
|
+
import type { PopulationPromise } from '../field/features/types.js';
|
|
4
|
+
import type { AdapterProps } from '../types.js';
|
|
5
|
+
export type Args = Parameters<RichTextAdapter<SerializedEditorState, AdapterProps>['populationPromises']>[0] & {
|
|
6
|
+
editorPopulationPromises: Map<string, Array<PopulationPromise>>;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Appends all new populationPromises to the populationPromises prop
|
|
10
|
+
*/
|
|
11
|
+
export declare const populateLexicalPopulationPromises: ({ context, currentDepth, depth, draft, editorPopulationPromises, field, fieldPromises, findMany, flattenLocales, overrideAccess, populationPromises, req, showHiddenFields, siblingDoc, }: Args) => void;
|
|
12
|
+
//# sourceMappingURL=populateLexicalPopulationPromises.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"populateLexicalPopulationPromises.d.ts","sourceRoot":"","sources":["../../src/populate/populateLexicalPopulationPromises.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAA;AACpD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,eAAe,CAAA;AAEpD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAA;AACnE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AAI/C,MAAM,MAAM,IAAI,GAAG,UAAU,CAC3B,eAAe,CAAC,qBAAqB,EAAE,YAAY,CAAC,CAAC,oBAAoB,CAAC,CAC3E,CAAC,CAAC,CAAC,GAAG;IACL,wBAAwB,EAAE,GAAG,CAAC,MAAM,EAAE,KAAK,CAAC,iBAAiB,CAAC,CAAC,CAAA;CAChE,CAAA;AAED;;GAEG;AACH,eAAO,MAAM,iCAAiC,8LAe3C,IAAI,SA+BN,CAAA"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { recurseNodes } from '../forEachNodeRecursively.js';
|
|
2
|
+
/**
|
|
3
|
+
* Appends all new populationPromises to the populationPromises prop
|
|
4
|
+
*/ export const populateLexicalPopulationPromises = ({ context, currentDepth, depth, draft, editorPopulationPromises, field, fieldPromises, findMany, flattenLocales, overrideAccess, populationPromises, req, showHiddenFields, siblingDoc })=>{
|
|
5
|
+
if (depth <= 0 || currentDepth > depth) {
|
|
6
|
+
return;
|
|
7
|
+
}
|
|
8
|
+
recurseNodes({
|
|
9
|
+
callback: (node)=>{
|
|
10
|
+
if (editorPopulationPromises?.has(node.type)) {
|
|
11
|
+
for (const promise of editorPopulationPromises.get(node.type)){
|
|
12
|
+
promise({
|
|
13
|
+
context,
|
|
14
|
+
currentDepth,
|
|
15
|
+
depth,
|
|
16
|
+
draft,
|
|
17
|
+
editorPopulationPromises,
|
|
18
|
+
field,
|
|
19
|
+
fieldPromises,
|
|
20
|
+
findMany,
|
|
21
|
+
flattenLocales,
|
|
22
|
+
node,
|
|
23
|
+
overrideAccess,
|
|
24
|
+
populationPromises,
|
|
25
|
+
req,
|
|
26
|
+
showHiddenFields,
|
|
27
|
+
siblingDoc
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
},
|
|
32
|
+
nodes: siblingDoc[field?.name]?.root?.children ?? []
|
|
33
|
+
});
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
//# sourceMappingURL=populateLexicalPopulationPromises.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/populate/populateLexicalPopulationPromises.ts"],"sourcesContent":["import type { SerializedEditorState } from 'lexical'\nimport type { RichTextAdapter } from 'payload/types'\n\nimport type { PopulationPromise } from '../field/features/types.js'\nimport type { AdapterProps } from '../types.js'\n\nimport { recurseNodes } from '../forEachNodeRecursively.js'\n\nexport type Args = Parameters<\n RichTextAdapter<SerializedEditorState, AdapterProps>['populationPromises']\n>[0] & {\n editorPopulationPromises: Map<string, Array<PopulationPromise>>\n}\n\n/**\n * Appends all new populationPromises to the populationPromises prop\n */\nexport const populateLexicalPopulationPromises = ({\n context,\n currentDepth,\n depth,\n draft,\n editorPopulationPromises,\n field,\n fieldPromises,\n findMany,\n flattenLocales,\n overrideAccess,\n populationPromises,\n req,\n showHiddenFields,\n siblingDoc,\n}: Args) => {\n if (depth <= 0 || currentDepth > depth) {\n return\n }\n\n recurseNodes({\n callback: (node) => {\n if (editorPopulationPromises?.has(node.type)) {\n for (const promise of editorPopulationPromises.get(node.type)) {\n promise({\n context,\n currentDepth,\n depth,\n draft,\n editorPopulationPromises,\n field,\n fieldPromises,\n findMany,\n flattenLocales,\n node,\n overrideAccess,\n populationPromises,\n req,\n showHiddenFields,\n siblingDoc,\n })\n }\n }\n },\n nodes: (siblingDoc[field?.name] as SerializedEditorState)?.root?.children ?? [],\n })\n}\n"],"names":["recurseNodes","populateLexicalPopulationPromises","context","currentDepth","depth","draft","editorPopulationPromises","field","fieldPromises","findMany","flattenLocales","overrideAccess","populationPromises","req","showHiddenFields","siblingDoc","callback","node","has","type","promise","get","nodes","name","root","children"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAMA,SAASA,YAAY,QAAQ,+BAA8B;AAQ3D;;CAEC,GACD,OAAO,MAAMC,oCAAoC,CAAC,EAChDC,OAAO,EACPC,YAAY,EACZC,KAAK,EACLC,KAAK,EACLC,wBAAwB,EACxBC,KAAK,EACLC,aAAa,EACbC,QAAQ,EACRC,cAAc,EACdC,cAAc,EACdC,kBAAkB,EAClBC,GAAG,EACHC,gBAAgB,EAChBC,UAAU,EACL;IACL,IAAIX,SAAS,KAAKD,eAAeC,OAAO;QACtC;IACF;IAEAJ,aAAa;QACXgB,UAAU,CAACC;YACT,IAAIX,0BAA0BY,IAAID,KAAKE,IAAI,GAAG;gBAC5C,KAAK,MAAMC,WAAWd,yBAAyBe,GAAG,CAACJ,KAAKE,IAAI,EAAG;oBAC7DC,QAAQ;wBACNlB;wBACAC;wBACAC;wBACAC;wBACAC;wBACAC;wBACAC;wBACAC;wBACAC;wBACAO;wBACAN;wBACAC;wBACAC;wBACAC;wBACAC;oBACF;gBACF;YACF;QACF;QACAO,OAAO,AAACP,UAAU,CAACR,OAAOgB,KAAK,EAA4BC,MAAMC,YAAY,EAAE;IACjF;AACF,EAAC"}
|
|
@@ -1,25 +1,29 @@
|
|
|
1
1
|
import type { RequestContext } from 'payload';
|
|
2
|
-
import type { Field,
|
|
2
|
+
import type { Field, PayloadRequestWithData } from 'payload/types';
|
|
3
3
|
import type { PopulationPromise } from '../field/features/types.js';
|
|
4
4
|
type NestedRichTextFieldsArgs = {
|
|
5
5
|
context: RequestContext;
|
|
6
6
|
currentDepth?: number;
|
|
7
7
|
data: unknown;
|
|
8
8
|
depth: number;
|
|
9
|
+
draft: boolean;
|
|
9
10
|
/**
|
|
10
11
|
* This maps all the population promises to the node types
|
|
11
12
|
*/
|
|
12
13
|
editorPopulationPromises: Map<string, Array<PopulationPromise>>;
|
|
14
|
+
/**
|
|
15
|
+
* fieldPromises are used for things like field hooks. They should be awaited before awaiting populationPromises
|
|
16
|
+
*/
|
|
17
|
+
fieldPromises: Promise<void>[];
|
|
13
18
|
fields: Field[];
|
|
14
19
|
findMany: boolean;
|
|
15
20
|
flattenLocales: boolean;
|
|
16
21
|
overrideAccess: boolean;
|
|
17
22
|
populationPromises: Promise<void>[];
|
|
18
|
-
|
|
19
|
-
req: PayloadRequest;
|
|
23
|
+
req: PayloadRequestWithData;
|
|
20
24
|
showHiddenFields: boolean;
|
|
21
25
|
siblingDoc: Record<string, unknown>;
|
|
22
26
|
};
|
|
23
|
-
export declare const recurseNestedFields: ({ context, currentDepth, data, depth, fields, findMany, flattenLocales, overrideAccess, populationPromises,
|
|
27
|
+
export declare const recurseNestedFields: ({ context, currentDepth, data, depth, draft, fieldPromises, fields, findMany, flattenLocales, overrideAccess, populationPromises, req, showHiddenFields, siblingDoc, }: NestedRichTextFieldsArgs) => void;
|
|
24
28
|
export {};
|
|
25
29
|
//# sourceMappingURL=recurseNestedFields.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"recurseNestedFields.d.ts","sourceRoot":"","sources":["../../src/populate/recurseNestedFields.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAA;AAC7C,OAAO,KAAK,EAAE,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"recurseNestedFields.d.ts","sourceRoot":"","sources":["../../src/populate/recurseNestedFields.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAA;AAC7C,OAAO,KAAK,EAAE,KAAK,EAAE,sBAAsB,EAAE,MAAM,eAAe,CAAA;AAIlE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAA;AAEnE,KAAK,wBAAwB,GAAG;IAC9B,OAAO,EAAE,cAAc,CAAA;IACvB,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,IAAI,EAAE,OAAO,CAAA;IACb,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,EAAE,OAAO,CAAA;IACd;;OAEG;IACH,wBAAwB,EAAE,GAAG,CAAC,MAAM,EAAE,KAAK,CAAC,iBAAiB,CAAC,CAAC,CAAA;IAC/D;;OAEG;IACH,aAAa,EAAE,OAAO,CAAC,IAAI,CAAC,EAAE,CAAA;IAC9B,MAAM,EAAE,KAAK,EAAE,CAAA;IACf,QAAQ,EAAE,OAAO,CAAA;IACjB,cAAc,EAAE,OAAO,CAAA;IACvB,cAAc,EAAE,OAAO,CAAA;IACvB,kBAAkB,EAAE,OAAO,CAAC,IAAI,CAAC,EAAE,CAAA;IACnC,GAAG,EAAE,sBAAsB,CAAA;IAC3B,gBAAgB,EAAE,OAAO,CAAA;IACzB,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;CACpC,CAAA;AAED,eAAO,MAAM,mBAAmB,2KAe7B,wBAAwB,KAAG,IAuB7B,CAAA"}
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import { afterReadTraverseFields } from 'payload/utilities';
|
|
2
|
-
export const recurseNestedFields = ({ context, currentDepth = 0, data, depth, fields, findMany, flattenLocales, overrideAccess = false, populationPromises,
|
|
2
|
+
export const recurseNestedFields = ({ context, currentDepth = 0, data, depth, draft, fieldPromises, fields, findMany, flattenLocales, overrideAccess = false, populationPromises, req, showHiddenFields, siblingDoc })=>{
|
|
3
3
|
afterReadTraverseFields({
|
|
4
4
|
collection: null,
|
|
5
5
|
context,
|
|
6
6
|
currentDepth,
|
|
7
7
|
depth,
|
|
8
8
|
doc: data,
|
|
9
|
+
draft,
|
|
9
10
|
fallbackLocale: req.fallbackLocale,
|
|
10
|
-
fieldPromises
|
|
11
|
+
fieldPromises,
|
|
11
12
|
fields,
|
|
12
13
|
findMany,
|
|
13
14
|
flattenLocales,
|
|
@@ -17,9 +18,7 @@ export const recurseNestedFields = ({ context, currentDepth = 0, data, depth, fi
|
|
|
17
18
|
populationPromises,
|
|
18
19
|
req,
|
|
19
20
|
showHiddenFields,
|
|
20
|
-
siblingDoc
|
|
21
|
-
triggerAccessControl: false,
|
|
22
|
-
triggerHooks: false
|
|
21
|
+
siblingDoc
|
|
23
22
|
});
|
|
24
23
|
};
|
|
25
24
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/populate/recurseNestedFields.ts"],"sourcesContent":["import type { RequestContext } from 'payload'\nimport type { Field,
|
|
1
|
+
{"version":3,"sources":["../../src/populate/recurseNestedFields.ts"],"sourcesContent":["import type { RequestContext } from 'payload'\nimport type { Field, PayloadRequestWithData } from 'payload/types'\n\nimport { afterReadTraverseFields } from 'payload/utilities'\n\nimport type { PopulationPromise } from '../field/features/types.js'\n\ntype NestedRichTextFieldsArgs = {\n context: RequestContext\n currentDepth?: number\n data: unknown\n depth: number\n draft: boolean\n /**\n * This maps all the population promises to the node types\n */\n editorPopulationPromises: Map<string, Array<PopulationPromise>>\n /**\n * fieldPromises are used for things like field hooks. They should be awaited before awaiting populationPromises\n */\n fieldPromises: Promise<void>[]\n fields: Field[]\n findMany: boolean\n flattenLocales: boolean\n overrideAccess: boolean\n populationPromises: Promise<void>[]\n req: PayloadRequestWithData\n showHiddenFields: boolean\n siblingDoc: Record<string, unknown>\n}\n\nexport const recurseNestedFields = ({\n context,\n currentDepth = 0,\n data,\n depth,\n draft,\n fieldPromises,\n fields,\n findMany,\n flattenLocales,\n overrideAccess = false,\n populationPromises,\n req,\n showHiddenFields,\n siblingDoc,\n}: NestedRichTextFieldsArgs): void => {\n afterReadTraverseFields({\n collection: null, // Pass from core? This is only needed for hooks, so we can leave this null for now\n context,\n currentDepth,\n depth,\n doc: data as any, // Looks like it's only needed for hooks and access control, so doesn't matter what we pass here right now\n draft,\n fallbackLocale: req.fallbackLocale,\n fieldPromises,\n fields,\n findMany,\n flattenLocales,\n global: null, // Pass from core? This is only needed for hooks, so we can leave this null for now\n locale: req.locale,\n overrideAccess,\n populationPromises, // This is not the same as populationPromises passed into this recurseNestedFields. These are just promises resolved at the very end.\n req,\n showHiddenFields,\n siblingDoc,\n //triggerAccessControl: false, // TODO: Enable this to support access control\n //triggerHooks: false, // TODO: Enable this to support hooks\n })\n}\n"],"names":["afterReadTraverseFields","recurseNestedFields","context","currentDepth","data","depth","draft","fieldPromises","fields","findMany","flattenLocales","overrideAccess","populationPromises","req","showHiddenFields","siblingDoc","collection","doc","fallbackLocale","global","locale"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;","mappings":"AAGA,SAASA,uBAAuB,QAAQ,oBAAmB;AA4B3D,OAAO,MAAMC,sBAAsB,CAAC,EAClCC,OAAO,EACPC,eAAe,CAAC,EAChBC,IAAI,EACJC,KAAK,EACLC,KAAK,EACLC,aAAa,EACbC,MAAM,EACNC,QAAQ,EACRC,cAAc,EACdC,iBAAiB,KAAK,EACtBC,kBAAkB,EAClBC,GAAG,EACHC,gBAAgB,EAChBC,UAAU,EACe;IACzBf,wBAAwB;QACtBgB,YAAY;QACZd;QACAC;QACAE;QACAY,KAAKb;QACLE;QACAY,gBAAgBL,IAAIK,cAAc;QAClCX;QACAC;QACAC;QACAC;QACAS,QAAQ;QACRC,QAAQP,IAAIO,MAAM;QAClBT;QACAC;QACAC;QACAC;QACAC;IAGF;AACF,EAAC"}
|
package/dist/scss/app.scss
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
@import 'fonts';
|
|
2
1
|
@import 'styles';
|
|
3
2
|
@import './toastify.scss';
|
|
4
3
|
@import './colors.scss';
|
|
@@ -20,9 +19,9 @@
|
|
|
20
19
|
--theme-overlay: rgba(5, 5, 5, 0.5);
|
|
21
20
|
--theme-baseline: #{$baseline-px};
|
|
22
21
|
--theme-baseline-body-size: #{$baseline-body-size};
|
|
23
|
-
--font-body: '
|
|
22
|
+
--font-body: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial,
|
|
23
|
+
sans-serif;
|
|
24
24
|
--font-mono: monospace;
|
|
25
|
-
--font-serif: 'Merriweather', serif;
|
|
26
25
|
|
|
27
26
|
--style-radius-s: #{$style-radius-s};
|
|
28
27
|
--style-radius-m: #{$style-radius-m};
|
package/dist/scss/vars.scss
CHANGED
|
@@ -21,13 +21,6 @@ $baseline: math.div($baseline-px, $baseline-body-size) + rem;
|
|
|
21
21
|
@return (math.div($baseline-px, $baseline-body-size) * $multiplier) + rem;
|
|
22
22
|
}
|
|
23
23
|
|
|
24
|
-
//////////////////////////////
|
|
25
|
-
// FONTS (DEPRECATED. DO NOT USE. PREFER CSS VARIABLES)
|
|
26
|
-
//////////////////////////////
|
|
27
|
-
|
|
28
|
-
$font-body: 'Suisse Intl' !default;
|
|
29
|
-
$font-mono: monospace !default;
|
|
30
|
-
|
|
31
24
|
//////////////////////////////
|
|
32
25
|
// COLORS (DEPRECATED. DO NOT USE. PREFER CSS VARIABLES)
|
|
33
26
|
//////////////////////////////
|
package/dist/types.d.ts
CHANGED
|
@@ -1,20 +1,59 @@
|
|
|
1
|
-
import type { SerializedEditorState } from 'lexical';
|
|
2
|
-
import type { EditorConfig as LexicalEditorConfig } from 'lexical/LexicalEditor.js';
|
|
1
|
+
import type { EditorConfig as LexicalEditorConfig, SerializedEditorState } from 'lexical';
|
|
3
2
|
import type { FieldPermissions } from 'payload/auth';
|
|
4
|
-
import type { FieldTypes } from 'payload/config';
|
|
3
|
+
import type { FieldTypes, SanitizedConfig } from 'payload/config';
|
|
5
4
|
import type { RichTextAdapter, RichTextFieldProps } from 'payload/types';
|
|
6
5
|
import type React from 'react';
|
|
7
6
|
import type { FeatureProviderServer } from './field/features/types.js';
|
|
8
7
|
import type { SanitizedServerEditorConfig } from './field/lexical/config/types.js';
|
|
8
|
+
export type LexicalFieldAdminProps = {
|
|
9
|
+
/**
|
|
10
|
+
* Controls if the gutter (padding to the left & gray vertical line) should be hidden. @default false
|
|
11
|
+
*/
|
|
12
|
+
hideGutter?: boolean;
|
|
13
|
+
};
|
|
9
14
|
export type LexicalEditorProps = {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
15
|
+
admin?: LexicalFieldAdminProps;
|
|
16
|
+
features?: (({ defaultFeatures, rootFeatures, }: {
|
|
17
|
+
/**
|
|
18
|
+
* This opinionated array contains all "recommended" default features.
|
|
19
|
+
*
|
|
20
|
+
* @Example
|
|
21
|
+
*
|
|
22
|
+
* ```ts
|
|
23
|
+
* editor: lexicalEditor({
|
|
24
|
+
* features: ({ defaultFeatures }) => [...defaultFeatures, FixedToolbarFeature()],
|
|
25
|
+
* })
|
|
26
|
+
* ```
|
|
27
|
+
*/
|
|
28
|
+
defaultFeatures: FeatureProviderServer<any, any>[];
|
|
29
|
+
/**
|
|
30
|
+
* This array contains all features that are enabled in the root richText editor (the one defined in the payload.config.ts).
|
|
31
|
+
* If this field is the root richText editor, or if the root richText editor is not a lexical editor, this array will be empty
|
|
32
|
+
*
|
|
33
|
+
* @Example
|
|
34
|
+
*
|
|
35
|
+
* ```ts
|
|
36
|
+
* editor: lexicalEditor({
|
|
37
|
+
* features: ({ rootFeatures }) => [...rootFeatures, FixedToolbarFeature()],
|
|
38
|
+
* })
|
|
39
|
+
* ```
|
|
40
|
+
*/
|
|
41
|
+
rootFeatures: FeatureProviderServer<any, any>[];
|
|
42
|
+
}) => FeatureProviderServer<any, any>[]) | FeatureProviderServer<any, any>[];
|
|
13
43
|
lexical?: LexicalEditorConfig;
|
|
14
44
|
};
|
|
15
45
|
export type LexicalRichTextAdapter = RichTextAdapter<SerializedEditorState, AdapterProps, any> & {
|
|
16
46
|
editorConfig: SanitizedServerEditorConfig;
|
|
47
|
+
features: FeatureProviderServer<any, any>[];
|
|
17
48
|
};
|
|
49
|
+
export type LexicalRichTextAdapterProvider =
|
|
50
|
+
/**
|
|
51
|
+
* This is being called during the payload sanitization process
|
|
52
|
+
*/
|
|
53
|
+
({ config, isRoot, }: {
|
|
54
|
+
config: SanitizedConfig;
|
|
55
|
+
isRoot?: boolean;
|
|
56
|
+
}) => Promise<LexicalRichTextAdapter>;
|
|
18
57
|
export type FieldProps = RichTextFieldProps<SerializedEditorState, AdapterProps, AdapterProps> & {
|
|
19
58
|
fieldTypes: FieldTypes;
|
|
20
59
|
indexPath: string;
|
package/dist/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,IAAI,mBAAmB,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAA;AACzF,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAA;AACpD,OAAO,KAAK,EAAE,UAAU,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAA;AACjE,OAAO,KAAK,EAAE,eAAe,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAA;AACxE,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAE9B,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAA;AACtE,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,iCAAiC,CAAA;AAElF,MAAM,MAAM,sBAAsB,GAAG;IACnC;;OAEG;IACH,UAAU,CAAC,EAAE,OAAO,CAAA;CACrB,CAAA;AAED,MAAM,MAAM,kBAAkB,GAAG;IAC/B,KAAK,CAAC,EAAE,sBAAsB,CAAA;IAC9B,QAAQ,CAAC,EACL,CAAC,CAAC,EACA,eAAe,EACf,YAAY,GACb,EAAE;QACD;;;;;;;;;;WAUG;QACH,eAAe,EAAE,qBAAqB,CAAC,GAAG,EAAE,GAAG,CAAC,EAAE,CAAA;QAClD;;;;;;;;;;;WAWG;QACH,YAAY,EAAE,qBAAqB,CAAC,GAAG,EAAE,GAAG,CAAC,EAAE,CAAA;KAChD,KAAK,qBAAqB,CAAC,GAAG,EAAE,GAAG,CAAC,EAAE,CAAC,GACxC,qBAAqB,CAAC,GAAG,EAAE,GAAG,CAAC,EAAE,CAAA;IACrC,OAAO,CAAC,EAAE,mBAAmB,CAAA;CAC9B,CAAA;AAED,MAAM,MAAM,sBAAsB,GAAG,eAAe,CAAC,qBAAqB,EAAE,YAAY,EAAE,GAAG,CAAC,GAAG;IAC/F,YAAY,EAAE,2BAA2B,CAAA;IACzC,QAAQ,EAAE,qBAAqB,CAAC,GAAG,EAAE,GAAG,CAAC,EAAE,CAAA;CAC5C,CAAA;AAED,MAAM,MAAM,8BAA8B;AACxC;;GAEG;AACH,CAAC,EACC,MAAM,EACN,MAAM,GACP,EAAE;IACD,MAAM,EAAE,eAAe,CAAA;IACvB,MAAM,CAAC,EAAE,OAAO,CAAA;CACjB,KAAK,OAAO,CAAC,sBAAsB,CAAC,CAAA;AAEvC,MAAM,MAAM,UAAU,GAAG,kBAAkB,CAAC,qBAAqB,EAAE,YAAY,EAAE,YAAY,CAAC,GAAG;IAC/F,UAAU,EAAE,UAAU,CAAA;IACtB,SAAS,EAAE,MAAM,CAAA;IACjB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,WAAW,EAAE,gBAAgB,CAAA;CAC9B,CAAA;AAED,MAAM,MAAM,YAAY,GAAG;IACzB,YAAY,EAAE,2BAA2B,CAAA;CAC1C,CAAA;AAED,MAAM,MAAM,iCAAiC,GAAG;IAC9C,eAAe,EAAE,KAAK,CAAC,SAAS,CAAA;IAChC,GAAG,EAAE,MAAM,CAAA;IACX,KAAK,EAAE,MAAM,CAAA;CACd,CAAA"}
|
package/dist/types.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/types.ts"],"sourcesContent":["import type {
|
|
1
|
+
{"version":3,"sources":["../src/types.ts"],"sourcesContent":["import type { EditorConfig as LexicalEditorConfig, SerializedEditorState } from 'lexical'\nimport type { FieldPermissions } from 'payload/auth'\nimport type { FieldTypes, SanitizedConfig } from 'payload/config'\nimport type { RichTextAdapter, RichTextFieldProps } from 'payload/types'\nimport type React from 'react'\n\nimport type { FeatureProviderServer } from './field/features/types.js'\nimport type { SanitizedServerEditorConfig } from './field/lexical/config/types.js'\n\nexport type LexicalFieldAdminProps = {\n /**\n * Controls if the gutter (padding to the left & gray vertical line) should be hidden. @default false\n */\n hideGutter?: boolean\n}\n\nexport type LexicalEditorProps = {\n admin?: LexicalFieldAdminProps\n features?:\n | (({\n defaultFeatures,\n rootFeatures,\n }: {\n /**\n * This opinionated array contains all \"recommended\" default features.\n *\n * @Example\n *\n * ```ts\n * editor: lexicalEditor({\n * features: ({ defaultFeatures }) => [...defaultFeatures, FixedToolbarFeature()],\n * })\n * ```\n */\n defaultFeatures: FeatureProviderServer<any, any>[]\n /**\n * This array contains all features that are enabled in the root richText editor (the one defined in the payload.config.ts).\n * If this field is the root richText editor, or if the root richText editor is not a lexical editor, this array will be empty\n *\n * @Example\n *\n * ```ts\n * editor: lexicalEditor({\n * features: ({ rootFeatures }) => [...rootFeatures, FixedToolbarFeature()],\n * })\n * ```\n */\n rootFeatures: FeatureProviderServer<any, any>[]\n }) => FeatureProviderServer<any, any>[])\n | FeatureProviderServer<any, any>[]\n lexical?: LexicalEditorConfig\n}\n\nexport type LexicalRichTextAdapter = RichTextAdapter<SerializedEditorState, AdapterProps, any> & {\n editorConfig: SanitizedServerEditorConfig\n features: FeatureProviderServer<any, any>[]\n}\n\nexport type LexicalRichTextAdapterProvider =\n /**\n * This is being called during the payload sanitization process\n */\n ({\n config,\n isRoot,\n }: {\n config: SanitizedConfig\n isRoot?: boolean\n }) => Promise<LexicalRichTextAdapter>\n\nexport type FieldProps = RichTextFieldProps<SerializedEditorState, AdapterProps, AdapterProps> & {\n fieldTypes: FieldTypes\n indexPath: string\n path?: string\n permissions: FieldPermissions\n}\n\nexport type AdapterProps = {\n editorConfig: SanitizedServerEditorConfig\n}\n\nexport type GeneratedFeatureProviderComponent = {\n ClientComponent: React.ReactNode\n key: string\n order: number\n}\n"],"names":[],"rangeMappings":"","mappings":"AAiFA,WAIC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useLexicalFeature.d.ts","sourceRoot":"","sources":["../src/useLexicalFeature.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"useLexicalFeature.d.ts","sourceRoot":"","sources":["../src/useLexicalFeature.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAA;AAEtE,eAAO,MAAM,iBAAiB,mCAChB,MAAM,WACT,sBAAsB,kBAAkB,CAAC,SAUnD,CAAA"}
|
|
@@ -1,8 +1,13 @@
|
|
|
1
1
|
'use client';
|
|
2
|
+
import { useTableCell } from '@payloadcms/ui/elements/Table';
|
|
2
3
|
import { useFieldProps } from '@payloadcms/ui/forms/FieldPropsProvider';
|
|
3
4
|
import { useAddClientFunction } from '@payloadcms/ui/providers/ClientFunction';
|
|
4
5
|
export const useLexicalFeature = (featureKey, feature)=>{
|
|
5
|
-
const { schemaPath } = useFieldProps();
|
|
6
|
+
const { schemaPath: schemaPathFromFieldProps } = useFieldProps();
|
|
7
|
+
const tableCell = useTableCell();
|
|
8
|
+
const schemaPathFromCellProps = tableCell?.cellProps?.schemaPath;
|
|
9
|
+
const schemaPath = schemaPathFromCellProps || schemaPathFromFieldProps // schemaPathFromCellProps needs to have priority, as there can be cells within fields (e.g. list drawers) and the cell schemaPath needs to be used there - not the parent field schemaPath. There cannot be fields within cells.
|
|
10
|
+
;
|
|
6
11
|
useAddClientFunction(`lexicalFeature.${schemaPath}.${featureKey}`, feature);
|
|
7
12
|
};
|
|
8
13
|
|