@payloadcms/richtext-lexical 3.0.0-beta.4 → 3.0.0-beta.41
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 +67 -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 +92 -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 +5 -6
- 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 +35 -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 -76
- 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.d.ts.map +1 -1
- package/dist/field/lexical/theme/EditorTheme.js +1 -0
- package/dist/field/lexical/theme/EditorTheme.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 +71 -51
- 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
|
@@ -9,8 +9,13 @@ export const sanitizeServerFeatures = (features)=>{
|
|
|
9
9
|
modifyOutputSchemas: []
|
|
10
10
|
},
|
|
11
11
|
hooks: {
|
|
12
|
-
|
|
12
|
+
afterChange: new Map(),
|
|
13
|
+
afterRead: new Map(),
|
|
14
|
+
beforeChange: new Map(),
|
|
15
|
+
beforeDuplicate: new Map(),
|
|
16
|
+
beforeValidate: new Map()
|
|
13
17
|
},
|
|
18
|
+
i18n: {},
|
|
14
19
|
markdownTransformers: [],
|
|
15
20
|
nodes: [],
|
|
16
21
|
populationPromises: new Map(),
|
|
@@ -23,9 +28,14 @@ export const sanitizeServerFeatures = (features)=>{
|
|
|
23
28
|
if (feature?.generatedTypes?.modifyOutputSchema) {
|
|
24
29
|
sanitized.generatedTypes.modifyOutputSchemas.push(feature.generatedTypes.modifyOutputSchema);
|
|
25
30
|
}
|
|
26
|
-
if (feature
|
|
27
|
-
|
|
28
|
-
|
|
31
|
+
if (feature?.i18n) {
|
|
32
|
+
for(const lang in feature.i18n){
|
|
33
|
+
if (!sanitized.i18n[lang]) {
|
|
34
|
+
sanitized.i18n[lang] = {
|
|
35
|
+
lexical: {}
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
sanitized.i18n[lang].lexical[feature.key] = feature.i18n[lang];
|
|
29
39
|
}
|
|
30
40
|
}
|
|
31
41
|
if (feature.nodes?.length) {
|
|
@@ -42,6 +52,21 @@ export const sanitizeServerFeatures = (features)=>{
|
|
|
42
52
|
if (node?.converters?.html) {
|
|
43
53
|
sanitized.converters.html.push(node.converters.html);
|
|
44
54
|
}
|
|
55
|
+
if (node?.hooks?.afterChange) {
|
|
56
|
+
sanitized.hooks.afterChange.set(nodeType, node.hooks.afterChange);
|
|
57
|
+
}
|
|
58
|
+
if (node?.hooks?.afterRead) {
|
|
59
|
+
sanitized.hooks.afterRead.set(nodeType, node.hooks.afterRead);
|
|
60
|
+
}
|
|
61
|
+
if (node?.hooks?.beforeChange) {
|
|
62
|
+
sanitized.hooks.beforeChange.set(nodeType, node.hooks.beforeChange);
|
|
63
|
+
}
|
|
64
|
+
if (node?.hooks?.beforeDuplicate) {
|
|
65
|
+
sanitized.hooks.beforeDuplicate.set(nodeType, node.hooks.beforeDuplicate);
|
|
66
|
+
}
|
|
67
|
+
if (node?.hooks?.beforeValidate) {
|
|
68
|
+
sanitized.hooks.beforeValidate.set(nodeType, node.hooks.beforeValidate);
|
|
69
|
+
}
|
|
45
70
|
});
|
|
46
71
|
}
|
|
47
72
|
if (feature.markdownTransformers?.length) {
|
|
@@ -51,8 +76,9 @@ export const sanitizeServerFeatures = (features)=>{
|
|
|
51
76
|
});
|
|
52
77
|
return sanitized;
|
|
53
78
|
};
|
|
54
|
-
export function sanitizeServerEditorConfig(editorConfig) {
|
|
55
|
-
const resolvedFeatureMap = loadFeatures({
|
|
79
|
+
export async function sanitizeServerEditorConfig(editorConfig, config) {
|
|
80
|
+
const resolvedFeatureMap = await loadFeatures({
|
|
81
|
+
config,
|
|
56
82
|
unSanitizedEditorConfig: editorConfig
|
|
57
83
|
});
|
|
58
84
|
return {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../src/field/lexical/config/server/sanitize.ts"],"sourcesContent":["import type { ResolvedServerFeatureMap, SanitizedServerFeatures } from '../../../features/types.js'\nimport type { SanitizedServerEditorConfig, ServerEditorConfig } from '../types.js'\n\nimport { loadFeatures } from './loader.js'\n\nexport const sanitizeServerFeatures = (\n features: ResolvedServerFeatureMap,\n): SanitizedServerFeatures => {\n const sanitized: SanitizedServerFeatures = {\n converters: {\n html: [],\n },\n enabledFeatures: [],\n
|
|
1
|
+
{"version":3,"sources":["../../../../../src/field/lexical/config/server/sanitize.ts"],"sourcesContent":["import type { Config, SanitizedConfig } from 'payload/config'\n\nimport type { ResolvedServerFeatureMap, SanitizedServerFeatures } from '../../../features/types.js'\nimport type { SanitizedServerEditorConfig, ServerEditorConfig } from '../types.js'\n\nimport { loadFeatures } from './loader.js'\n\nexport const sanitizeServerFeatures = (\n features: ResolvedServerFeatureMap,\n): SanitizedServerFeatures => {\n const sanitized: SanitizedServerFeatures = {\n converters: {\n html: [],\n },\n enabledFeatures: [],\n generatedTypes: {\n modifyOutputSchemas: [],\n },\n\n hooks: {\n afterChange: new Map(),\n afterRead: new Map(),\n beforeChange: new Map(),\n beforeDuplicate: new Map(),\n beforeValidate: new Map(),\n },\n i18n: {},\n markdownTransformers: [],\n nodes: [],\n populationPromises: new Map(),\n\n validations: new Map(),\n }\n\n if (!features?.size) {\n return sanitized\n }\n\n features.forEach((feature) => {\n if (feature?.generatedTypes?.modifyOutputSchema) {\n sanitized.generatedTypes.modifyOutputSchemas.push(feature.generatedTypes.modifyOutputSchema)\n }\n\n if (feature?.i18n) {\n for (const lang in feature.i18n) {\n if (!sanitized.i18n[lang]) {\n sanitized.i18n[lang] = {\n lexical: {},\n }\n }\n sanitized.i18n[lang].lexical[feature.key] = feature.i18n[lang]\n }\n }\n\n if (feature.nodes?.length) {\n sanitized.nodes = sanitized.nodes.concat(feature.nodes)\n feature.nodes.forEach((node) => {\n const nodeType = 'with' in node.node ? node.node.replace.getType() : node.node.getType() // TODO: Idk if this works for node replacements\n if (node?.populationPromises?.length) {\n sanitized.populationPromises.set(nodeType, node.populationPromises)\n }\n if (node?.validations?.length) {\n sanitized.validations.set(nodeType, node.validations)\n }\n if (node?.converters?.html) {\n sanitized.converters.html.push(node.converters.html)\n }\n if (node?.hooks?.afterChange) {\n sanitized.hooks.afterChange.set(nodeType, node.hooks.afterChange)\n }\n if (node?.hooks?.afterRead) {\n sanitized.hooks.afterRead.set(nodeType, node.hooks.afterRead)\n }\n if (node?.hooks?.beforeChange) {\n sanitized.hooks.beforeChange.set(nodeType, node.hooks.beforeChange)\n }\n if (node?.hooks?.beforeDuplicate) {\n sanitized.hooks.beforeDuplicate.set(nodeType, node.hooks.beforeDuplicate)\n }\n if (node?.hooks?.beforeValidate) {\n sanitized.hooks.beforeValidate.set(nodeType, node.hooks.beforeValidate)\n }\n })\n }\n\n if (feature.markdownTransformers?.length) {\n sanitized.markdownTransformers = sanitized.markdownTransformers.concat(\n feature.markdownTransformers,\n )\n }\n\n sanitized.enabledFeatures.push(feature.key)\n })\n\n return sanitized\n}\n\nexport async function sanitizeServerEditorConfig(\n editorConfig: ServerEditorConfig,\n config: SanitizedConfig,\n): Promise<SanitizedServerEditorConfig> {\n const resolvedFeatureMap = await loadFeatures({\n config,\n unSanitizedEditorConfig: editorConfig,\n })\n\n return {\n features: sanitizeServerFeatures(resolvedFeatureMap),\n lexical: editorConfig.lexical,\n resolvedFeatureMap,\n }\n}\n"],"names":["loadFeatures","sanitizeServerFeatures","features","sanitized","converters","html","enabledFeatures","generatedTypes","modifyOutputSchemas","hooks","afterChange","Map","afterRead","beforeChange","beforeDuplicate","beforeValidate","i18n","markdownTransformers","nodes","populationPromises","validations","size","forEach","feature","modifyOutputSchema","push","lang","lexical","key","length","concat","node","nodeType","replace","getType","set","sanitizeServerEditorConfig","editorConfig","config","resolvedFeatureMap","unSanitizedEditorConfig"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAKA,SAASA,YAAY,QAAQ,cAAa;AAE1C,OAAO,MAAMC,yBAAyB,CACpCC;IAEA,MAAMC,YAAqC;QACzCC,YAAY;YACVC,MAAM,EAAE;QACV;QACAC,iBAAiB,EAAE;QACnBC,gBAAgB;YACdC,qBAAqB,EAAE;QACzB;QAEAC,OAAO;YACLC,aAAa,IAAIC;YACjBC,WAAW,IAAID;YACfE,cAAc,IAAIF;YAClBG,iBAAiB,IAAIH;YACrBI,gBAAgB,IAAIJ;QACtB;QACAK,MAAM,CAAC;QACPC,sBAAsB,EAAE;QACxBC,OAAO,EAAE;QACTC,oBAAoB,IAAIR;QAExBS,aAAa,IAAIT;IACnB;IAEA,IAAI,CAACT,UAAUmB,MAAM;QACnB,OAAOlB;IACT;IAEAD,SAASoB,OAAO,CAAC,CAACC;QAChB,IAAIA,SAAShB,gBAAgBiB,oBAAoB;YAC/CrB,UAAUI,cAAc,CAACC,mBAAmB,CAACiB,IAAI,CAACF,QAAQhB,cAAc,CAACiB,kBAAkB;QAC7F;QAEA,IAAID,SAASP,MAAM;YACjB,IAAK,MAAMU,QAAQH,QAAQP,IAAI,CAAE;gBAC/B,IAAI,CAACb,UAAUa,IAAI,CAACU,KAAK,EAAE;oBACzBvB,UAAUa,IAAI,CAACU,KAAK,GAAG;wBACrBC,SAAS,CAAC;oBACZ;gBACF;gBACAxB,UAAUa,IAAI,CAACU,KAAK,CAACC,OAAO,CAACJ,QAAQK,GAAG,CAAC,GAAGL,QAAQP,IAAI,CAACU,KAAK;YAChE;QACF;QAEA,IAAIH,QAAQL,KAAK,EAAEW,QAAQ;YACzB1B,UAAUe,KAAK,GAAGf,UAAUe,KAAK,CAACY,MAAM,CAACP,QAAQL,KAAK;YACtDK,QAAQL,KAAK,CAACI,OAAO,CAAC,CAACS;gBACrB,MAAMC,WAAW,UAAUD,KAAKA,IAAI,GAAGA,KAAKA,IAAI,CAACE,OAAO,CAACC,OAAO,KAAKH,KAAKA,IAAI,CAACG,OAAO,GAAG,gDAAgD;;gBACzI,IAAIH,MAAMZ,oBAAoBU,QAAQ;oBACpC1B,UAAUgB,kBAAkB,CAACgB,GAAG,CAACH,UAAUD,KAAKZ,kBAAkB;gBACpE;gBACA,IAAIY,MAAMX,aAAaS,QAAQ;oBAC7B1B,UAAUiB,WAAW,CAACe,GAAG,CAACH,UAAUD,KAAKX,WAAW;gBACtD;gBACA,IAAIW,MAAM3B,YAAYC,MAAM;oBAC1BF,UAAUC,UAAU,CAACC,IAAI,CAACoB,IAAI,CAACM,KAAK3B,UAAU,CAACC,IAAI;gBACrD;gBACA,IAAI0B,MAAMtB,OAAOC,aAAa;oBAC5BP,UAAUM,KAAK,CAACC,WAAW,CAACyB,GAAG,CAACH,UAAUD,KAAKtB,KAAK,CAACC,WAAW;gBAClE;gBACA,IAAIqB,MAAMtB,OAAOG,WAAW;oBAC1BT,UAAUM,KAAK,CAACG,SAAS,CAACuB,GAAG,CAACH,UAAUD,KAAKtB,KAAK,CAACG,SAAS;gBAC9D;gBACA,IAAImB,MAAMtB,OAAOI,cAAc;oBAC7BV,UAAUM,KAAK,CAACI,YAAY,CAACsB,GAAG,CAACH,UAAUD,KAAKtB,KAAK,CAACI,YAAY;gBACpE;gBACA,IAAIkB,MAAMtB,OAAOK,iBAAiB;oBAChCX,UAAUM,KAAK,CAACK,eAAe,CAACqB,GAAG,CAACH,UAAUD,KAAKtB,KAAK,CAACK,eAAe;gBAC1E;gBACA,IAAIiB,MAAMtB,OAAOM,gBAAgB;oBAC/BZ,UAAUM,KAAK,CAACM,cAAc,CAACoB,GAAG,CAACH,UAAUD,KAAKtB,KAAK,CAACM,cAAc;gBACxE;YACF;QACF;QAEA,IAAIQ,QAAQN,oBAAoB,EAAEY,QAAQ;YACxC1B,UAAUc,oBAAoB,GAAGd,UAAUc,oBAAoB,CAACa,MAAM,CACpEP,QAAQN,oBAAoB;QAEhC;QAEAd,UAAUG,eAAe,CAACmB,IAAI,CAACF,QAAQK,GAAG;IAC5C;IAEA,OAAOzB;AACT,EAAC;AAED,OAAO,eAAeiC,2BACpBC,YAAgC,EAChCC,MAAuB;IAEvB,MAAMC,qBAAqB,MAAMvC,aAAa;QAC5CsC;QACAE,yBAAyBH;IAC3B;IAEA,OAAO;QACLnC,UAAUD,uBAAuBsC;QACjCZ,SAASU,aAAaV,OAAO;QAC7BY;IACF;AACF"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import type { EditorConfig as LexicalEditorConfig } from 'lexical
|
|
1
|
+
import type { EditorConfig as LexicalEditorConfig } from 'lexical';
|
|
2
|
+
import type { LexicalFieldAdminProps } from '../../../types.js';
|
|
2
3
|
import type { FeatureProviderClient, FeatureProviderServer, ResolvedClientFeatureMap, ResolvedServerFeatureMap, SanitizedClientFeatures, SanitizedServerFeatures } from '../../features/types.js';
|
|
3
4
|
export type ServerEditorConfig = {
|
|
4
5
|
features: FeatureProviderServer<unknown, unknown>[];
|
|
@@ -14,6 +15,7 @@ export type ClientEditorConfig = {
|
|
|
14
15
|
lexical?: LexicalEditorConfig;
|
|
15
16
|
};
|
|
16
17
|
export type SanitizedClientEditorConfig = {
|
|
18
|
+
admin?: LexicalFieldAdminProps;
|
|
17
19
|
features: SanitizedClientFeatures;
|
|
18
20
|
lexical: LexicalEditorConfig;
|
|
19
21
|
resolvedFeatureMap: ResolvedClientFeatureMap;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/field/lexical/config/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,IAAI,mBAAmB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/field/lexical/config/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,IAAI,mBAAmB,EAAE,MAAM,SAAS,CAAA;AAElE,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,mBAAmB,CAAA;AAC/D,OAAO,KAAK,EACV,qBAAqB,EACrB,qBAAqB,EACrB,wBAAwB,EACxB,wBAAwB,EACxB,uBAAuB,EACvB,uBAAuB,EACxB,MAAM,yBAAyB,CAAA;AAEhC,MAAM,MAAM,kBAAkB,GAAG;IAC/B,QAAQ,EAAE,qBAAqB,CAAC,OAAO,EAAE,OAAO,CAAC,EAAE,CAAA;IACnD,OAAO,CAAC,EAAE,mBAAmB,CAAA;CAC9B,CAAA;AAED,MAAM,MAAM,2BAA2B,GAAG;IACxC,QAAQ,EAAE,uBAAuB,CAAA;IACjC,OAAO,EAAE,mBAAmB,CAAA;IAC5B,kBAAkB,EAAE,wBAAwB,CAAA;CAC7C,CAAA;AAED,MAAM,MAAM,kBAAkB,GAAG;IAC/B,QAAQ,EAAE,qBAAqB,CAAC,OAAO,CAAC,EAAE,CAAA;IAC1C,OAAO,CAAC,EAAE,mBAAmB,CAAA;CAC9B,CAAA;AAED,MAAM,MAAM,2BAA2B,GAAG;IACxC,KAAK,CAAC,EAAE,sBAAsB,CAAA;IAC9B,QAAQ,EAAE,uBAAuB,CAAA;IACjC,OAAO,EAAE,mBAAmB,CAAA;IAC5B,kBAAkB,EAAE,wBAAwB,CAAA;CAC7C,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/field/lexical/config/types.ts"],"sourcesContent":["import type { EditorConfig as LexicalEditorConfig } from 'lexical
|
|
1
|
+
{"version":3,"sources":["../../../../src/field/lexical/config/types.ts"],"sourcesContent":["import type { EditorConfig as LexicalEditorConfig } from 'lexical'\n\nimport type { LexicalFieldAdminProps } from '../../../types.js'\nimport type {\n FeatureProviderClient,\n FeatureProviderServer,\n ResolvedClientFeatureMap,\n ResolvedServerFeatureMap,\n SanitizedClientFeatures,\n SanitizedServerFeatures,\n} from '../../features/types.js'\n\nexport type ServerEditorConfig = {\n features: FeatureProviderServer<unknown, unknown>[]\n lexical?: LexicalEditorConfig\n}\n\nexport type SanitizedServerEditorConfig = {\n features: SanitizedServerFeatures\n lexical: LexicalEditorConfig\n resolvedFeatureMap: ResolvedServerFeatureMap\n}\n\nexport type ClientEditorConfig = {\n features: FeatureProviderClient<unknown>[]\n lexical?: LexicalEditorConfig\n}\n\nexport type SanitizedClientEditorConfig = {\n admin?: LexicalFieldAdminProps\n features: SanitizedClientFeatures\n lexical: LexicalEditorConfig\n resolvedFeatureMap: ResolvedClientFeatureMap\n}\n"],"names":[],"rangeMappings":"","mappings":"AA4BA,WAKC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/field/lexical/plugins/MarkdownShortcut/index.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/field/lexical/plugins/MarkdownShortcut/index.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAI9B,eAAO,MAAM,sBAAsB,EAAE,KAAK,CAAC,EAI1C,CAAA"}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import
|
|
3
|
-
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import { MarkdownShortcutPlugin as LexicalMarkdownShortcutPlugin } from '@lexical/react/LexicalMarkdownShortcutPlugin.js';
|
|
4
4
|
import * as React from 'react';
|
|
5
5
|
import { useEditorConfigContext } from '../../config/client/EditorConfigProvider.js';
|
|
6
6
|
export const MarkdownShortcutPlugin = ()=>{
|
|
7
7
|
const { editorConfig } = useEditorConfigContext();
|
|
8
|
-
return /*#__PURE__*/
|
|
8
|
+
return /*#__PURE__*/ _jsx(LexicalMarkdownShortcutPlugin, {
|
|
9
9
|
transformers: editorConfig.features.markdownTransformers
|
|
10
10
|
});
|
|
11
11
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../src/field/lexical/plugins/MarkdownShortcut/index.tsx"],"sourcesContent":["'use client'\n\nimport
|
|
1
|
+
{"version":3,"sources":["../../../../../src/field/lexical/plugins/MarkdownShortcut/index.tsx"],"sourcesContent":["'use client'\n\nimport { MarkdownShortcutPlugin as LexicalMarkdownShortcutPlugin } from '@lexical/react/LexicalMarkdownShortcutPlugin.js'\nimport * as React from 'react'\n\nimport { useEditorConfigContext } from '../../config/client/EditorConfigProvider.js'\n\nexport const MarkdownShortcutPlugin: React.FC = () => {\n const { editorConfig } = useEditorConfigContext()\n\n return <LexicalMarkdownShortcutPlugin transformers={editorConfig.features.markdownTransformers} />\n}\n"],"names":["MarkdownShortcutPlugin","LexicalMarkdownShortcutPlugin","React","useEditorConfigContext","editorConfig","transformers","features","markdownTransformers"],"rangeMappings":";;;;;;;;;;","mappings":"AAAA;;AAEA,SAASA,0BAA0BC,6BAA6B,QAAQ,kDAAiD;AACzH,YAAYC,WAAW,QAAO;AAE9B,SAASC,sBAAsB,QAAQ,8CAA6C;AAEpF,OAAO,MAAMH,yBAAmC;IAC9C,MAAM,EAAEI,YAAY,EAAE,GAAGD;IAEzB,qBAAO,KAACF;QAA8BI,cAAcD,aAAaE,QAAQ,CAACC,oBAAoB;;AAChG,EAAC"}
|
|
@@ -1,30 +1,30 @@
|
|
|
1
1
|
import type { LexicalCommand, LexicalEditor, TextNode } from 'lexical';
|
|
2
|
-
import type { MutableRefObject, ReactPortal } from 'react';
|
|
2
|
+
import type { JSX, MutableRefObject, ReactPortal } from 'react';
|
|
3
3
|
import type { MenuTextMatch } from '../useMenuTriggerMatch.js';
|
|
4
|
-
import type {
|
|
4
|
+
import type { SlashMenuGroupInternal, SlashMenuItem, SlashMenuItemInternal } from './types.js';
|
|
5
5
|
export type MenuResolution = {
|
|
6
6
|
getRect: () => DOMRect;
|
|
7
7
|
match?: MenuTextMatch;
|
|
8
8
|
};
|
|
9
9
|
export type MenuRenderFn = (anchorElementRef: MutableRefObject<HTMLElement | null>, itemProps: {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
10
|
+
groups: Array<SlashMenuGroupInternal>;
|
|
11
|
+
selectItemAndCleanUp: (selectedItem: SlashMenuItem) => void;
|
|
12
|
+
selectedItemKey: null | string;
|
|
13
|
+
setSelectedItemKey: (itemKey: string) => void;
|
|
14
14
|
}, matchingString: null | string) => JSX.Element | ReactPortal | null;
|
|
15
15
|
export declare function getScrollParent(element: HTMLElement, includeHidden: boolean): HTMLBodyElement | HTMLElement;
|
|
16
16
|
export declare function useDynamicPositioning(resolution: MenuResolution | null, targetElement: HTMLElement | null, onReposition: () => void, onVisibilityChange?: (isInView: boolean) => void): void;
|
|
17
17
|
export declare const SCROLL_TYPEAHEAD_OPTION_INTO_VIEW_COMMAND: LexicalCommand<{
|
|
18
18
|
index: number;
|
|
19
|
-
|
|
19
|
+
item: SlashMenuItemInternal;
|
|
20
20
|
}>;
|
|
21
|
-
export declare function LexicalMenu({ anchorElementRef, close, editor,
|
|
21
|
+
export declare function LexicalMenu({ anchorElementRef, close, editor, groups, menuRenderFn, onSelectItem, resolution, shouldSplitNodeWithQuery, }: {
|
|
22
22
|
anchorElementRef: MutableRefObject<HTMLElement>;
|
|
23
23
|
close: () => void;
|
|
24
24
|
editor: LexicalEditor;
|
|
25
|
-
|
|
25
|
+
groups: Array<SlashMenuGroupInternal>;
|
|
26
26
|
menuRenderFn: MenuRenderFn;
|
|
27
|
-
|
|
27
|
+
onSelectItem: (item: SlashMenuItem, textNodeContainingQuery: TextNode | null, closeMenu: () => void, matchingString: string) => void;
|
|
28
28
|
resolution: MenuResolution;
|
|
29
29
|
shouldSplitNodeWithQuery?: boolean;
|
|
30
30
|
}): JSX.Element | null;
|
package/dist/field/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/LexicalMenu.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LexicalMenu.d.ts","sourceRoot":"","sources":["../../../../../../src/field/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/LexicalMenu.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAA;AACtE,OAAO,KAAK,EAAE,gBAAgB,EAAE,WAAW,EAAE,MAAM,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"LexicalMenu.d.ts","sourceRoot":"","sources":["../../../../../../src/field/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/LexicalMenu.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAA;AACtE,OAAO,KAAK,EAAE,GAAG,EAAE,gBAAgB,EAAE,WAAW,EAAE,MAAM,OAAO,CAAA;AAiB/D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAA;AAC9D,OAAO,KAAK,EAAE,sBAAsB,EAAE,aAAa,EAAE,qBAAqB,EAAE,MAAM,YAAY,CAAA;AAE9F,MAAM,MAAM,cAAc,GAAG;IAC3B,OAAO,EAAE,MAAM,OAAO,CAAA;IACtB,KAAK,CAAC,EAAE,aAAa,CAAA;CACtB,CAAA;AAID,MAAM,MAAM,YAAY,GAAG,CACzB,gBAAgB,EAAE,gBAAgB,CAAC,WAAW,GAAG,IAAI,CAAC,EACtD,SAAS,EAAE;IACT,MAAM,EAAE,KAAK,CAAC,sBAAsB,CAAC,CAAA;IACrC,oBAAoB,EAAE,CAAC,YAAY,EAAE,aAAa,KAAK,IAAI,CAAA;IAC3D,eAAe,EAAE,IAAI,GAAG,MAAM,CAAA;IAC9B,kBAAkB,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAA;CAC9C,EACD,cAAc,EAAE,IAAI,GAAG,MAAM,KAC1B,GAAG,CAAC,OAAO,GAAG,WAAW,GAAG,IAAI,CAAA;AA2ErC,wBAAgB,eAAe,CAC7B,OAAO,EAAE,WAAW,EACpB,aAAa,EAAE,OAAO,GACrB,eAAe,GAAG,WAAW,CAiB/B;AAYD,wBAAgB,qBAAqB,CACnC,UAAU,EAAE,cAAc,GAAG,IAAI,EACjC,aAAa,EAAE,WAAW,GAAG,IAAI,EACjC,YAAY,EAAE,MAAM,IAAI,EACxB,kBAAkB,CAAC,EAAE,CAAC,QAAQ,EAAE,OAAO,KAAK,IAAI,QA2CjD;AAED,eAAO,MAAM,yCAAyC,EAAE,cAAc,CAAC;IACrE,KAAK,EAAE,MAAM,CAAA;IACb,IAAI,EAAE,qBAAqB,CAAA;CAC5B,CAA8D,CAAA;AAE/D,wBAAgB,WAAW,CAAC,EAC1B,gBAAgB,EAChB,KAAK,EACL,MAAM,EAEN,MAAM,EACN,YAAY,EACZ,YAAY,EACZ,UAAU,EACV,wBAAgC,GACjC,EAAE;IACD,gBAAgB,EAAE,gBAAgB,CAAC,WAAW,CAAC,CAAA;IAC/C,KAAK,EAAE,MAAM,IAAI,CAAA;IACjB,MAAM,EAAE,aAAa,CAAA;IACrB,MAAM,EAAE,KAAK,CAAC,sBAAsB,CAAC,CAAA;IACrC,YAAY,EAAE,YAAY,CAAA;IAC1B,YAAY,EAAE,CACZ,IAAI,EAAE,aAAa,EACnB,uBAAuB,EAAE,QAAQ,GAAG,IAAI,EACxC,SAAS,EAAE,MAAM,IAAI,EACrB,cAAc,EAAE,MAAM,KACnB,IAAI,CAAA;IACT,UAAU,EAAE,cAAc,CAAA;IAC1B,wBAAwB,CAAC,EAAE,OAAO,CAAA;CACnC,GAAG,GAAG,CAAC,OAAO,GAAG,IAAI,CAgNrB;AAED,wBAAgB,gBAAgB,CAC9B,UAAU,EAAE,WAAW,EACvB,UAAU,EAAE,cAAc,GAAG,IAAI,EACjC,aAAa,EAAE,CAAC,CAAC,EAAE,cAAc,GAAG,IAAI,KAAK,IAAI,EACjD,SAAS,CAAC,EAAE,MAAM,GACjB,gBAAgB,CAAC,WAAW,CAAC,CA6F/B"}
|
|
@@ -1,10 +1,7 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
import
|
|
5
|
-
const { mergeRegister } = lexicalUtilsImport;
|
|
6
|
-
import lexicalImport from 'lexical';
|
|
7
|
-
const { $getSelection, $isRangeSelection, COMMAND_PRIORITY_LOW, KEY_ARROW_DOWN_COMMAND, KEY_ARROW_UP_COMMAND, KEY_ENTER_COMMAND, KEY_ESCAPE_COMMAND, KEY_TAB_COMMAND, createCommand } = lexicalImport;
|
|
2
|
+
import { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext.js';
|
|
3
|
+
import { mergeRegister } from '@lexical/utils';
|
|
4
|
+
import { $getSelection, $isRangeSelection, COMMAND_PRIORITY_LOW, KEY_ARROW_DOWN_COMMAND, KEY_ARROW_UP_COMMAND, KEY_ENTER_COMMAND, KEY_ESCAPE_COMMAND, KEY_TAB_COMMAND, createCommand } from 'lexical';
|
|
8
5
|
import { useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState } from 'react';
|
|
9
6
|
const baseClass = 'slash-menu-popup';
|
|
10
7
|
const scrollIntoViewIfNeeded = (target)=>{
|
|
@@ -31,7 +28,7 @@ const scrollIntoViewIfNeeded = (target)=>{
|
|
|
31
28
|
*/ function getFullMatchOffset(documentText, entryText, offset) {
|
|
32
29
|
let triggerOffset = offset;
|
|
33
30
|
for(let i = triggerOffset; i <= entryText.length; i++){
|
|
34
|
-
if (documentText.
|
|
31
|
+
if (documentText.substring(documentText.length - i) === entryText.substring(0, i)) {
|
|
35
32
|
triggerOffset = i;
|
|
36
33
|
}
|
|
37
34
|
}
|
|
@@ -142,50 +139,50 @@ export function useDynamicPositioning(resolution, targetElement, onReposition, o
|
|
|
142
139
|
]);
|
|
143
140
|
}
|
|
144
141
|
export const SCROLL_TYPEAHEAD_OPTION_INTO_VIEW_COMMAND = createCommand('SCROLL_TYPEAHEAD_OPTION_INTO_VIEW_COMMAND');
|
|
145
|
-
export function LexicalMenu({ anchorElementRef, close, editor, //
|
|
146
|
-
|
|
147
|
-
const [
|
|
142
|
+
export function LexicalMenu({ anchorElementRef, close, editor, // groups filtering is already handled in SlashMenu/index.tsx. Thus, groups always contains the matching items.
|
|
143
|
+
groups, menuRenderFn, onSelectItem, resolution, shouldSplitNodeWithQuery = false }) {
|
|
144
|
+
const [selectedItemKey, setSelectedItemKey] = useState(null);
|
|
148
145
|
const matchingString = resolution.match && resolution.match.matchingString || '';
|
|
149
|
-
const
|
|
146
|
+
const updateSelectedItem = useCallback((item)=>{
|
|
150
147
|
const rootElem = editor.getRootElement();
|
|
151
148
|
if (rootElem !== null) {
|
|
152
|
-
rootElem.setAttribute('aria-activedescendant', `${baseClass}__item-${
|
|
153
|
-
|
|
149
|
+
rootElem.setAttribute('aria-activedescendant', `${baseClass}__item-${item.key}`);
|
|
150
|
+
setSelectedItemKey(item.key);
|
|
154
151
|
}
|
|
155
152
|
}, [
|
|
156
153
|
editor
|
|
157
154
|
]);
|
|
158
|
-
const
|
|
159
|
-
// set selected
|
|
160
|
-
if (
|
|
161
|
-
//
|
|
162
|
-
const
|
|
163
|
-
if (
|
|
164
|
-
const
|
|
165
|
-
|
|
155
|
+
const setSelectedItemKeyToFirstMatchingItem = useCallback(()=>{
|
|
156
|
+
// set selected item to the first of the matching ones
|
|
157
|
+
if (groups !== null && matchingString != null) {
|
|
158
|
+
// groups filtering is already handled in SlashMenu/index.tsx. Thus, groups always contains the matching items.
|
|
159
|
+
const allItems = groups.flatMap((group)=>group.items);
|
|
160
|
+
if (allItems.length) {
|
|
161
|
+
const firstMatchingItem = allItems[0];
|
|
162
|
+
updateSelectedItem(firstMatchingItem);
|
|
166
163
|
}
|
|
167
164
|
}
|
|
168
165
|
}, [
|
|
169
|
-
|
|
170
|
-
|
|
166
|
+
groups,
|
|
167
|
+
updateSelectedItem,
|
|
171
168
|
matchingString
|
|
172
169
|
]);
|
|
173
170
|
useEffect(()=>{
|
|
174
|
-
|
|
171
|
+
setSelectedItemKeyToFirstMatchingItem();
|
|
175
172
|
}, [
|
|
176
173
|
matchingString,
|
|
177
|
-
|
|
174
|
+
setSelectedItemKeyToFirstMatchingItem
|
|
178
175
|
]);
|
|
179
|
-
const
|
|
176
|
+
const selectItemAndCleanUp = useCallback((selectedItem)=>{
|
|
180
177
|
editor.update(()=>{
|
|
181
178
|
const textNodeContainingQuery = resolution.match != null && shouldSplitNodeWithQuery ? $splitNodeContainingQuery(resolution.match) : null;
|
|
182
|
-
|
|
179
|
+
onSelectItem(selectedItem, textNodeContainingQuery, close, resolution.match ? resolution.match.matchingString : '');
|
|
183
180
|
});
|
|
184
181
|
}, [
|
|
185
182
|
editor,
|
|
186
183
|
shouldSplitNodeWithQuery,
|
|
187
184
|
resolution.match,
|
|
188
|
-
|
|
185
|
+
onSelectItem,
|
|
189
186
|
close
|
|
190
187
|
]);
|
|
191
188
|
useEffect(()=>{
|
|
@@ -199,42 +196,42 @@ groupsWithOptions, menuRenderFn, onSelectOption, resolution, shouldSplitNodeWith
|
|
|
199
196
|
editor
|
|
200
197
|
]);
|
|
201
198
|
useLayoutEffect(()=>{
|
|
202
|
-
if (
|
|
203
|
-
|
|
204
|
-
} else if (
|
|
205
|
-
|
|
199
|
+
if (groups === null) {
|
|
200
|
+
setSelectedItemKey(null);
|
|
201
|
+
} else if (selectedItemKey === null) {
|
|
202
|
+
setSelectedItemKeyToFirstMatchingItem();
|
|
206
203
|
}
|
|
207
204
|
}, [
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
205
|
+
groups,
|
|
206
|
+
selectedItemKey,
|
|
207
|
+
updateSelectedItem,
|
|
208
|
+
setSelectedItemKeyToFirstMatchingItem
|
|
212
209
|
]);
|
|
213
210
|
useEffect(()=>{
|
|
214
|
-
return mergeRegister(editor.registerCommand(SCROLL_TYPEAHEAD_OPTION_INTO_VIEW_COMMAND, ({
|
|
215
|
-
if (
|
|
216
|
-
scrollIntoViewIfNeeded(
|
|
211
|
+
return mergeRegister(editor.registerCommand(SCROLL_TYPEAHEAD_OPTION_INTO_VIEW_COMMAND, ({ item })=>{
|
|
212
|
+
if (item.ref && item.ref.current != null) {
|
|
213
|
+
scrollIntoViewIfNeeded(item.ref.current);
|
|
217
214
|
return true;
|
|
218
215
|
}
|
|
219
216
|
return false;
|
|
220
217
|
}, COMMAND_PRIORITY_LOW));
|
|
221
218
|
}, [
|
|
222
219
|
editor,
|
|
223
|
-
|
|
220
|
+
updateSelectedItem
|
|
224
221
|
]);
|
|
225
222
|
useEffect(()=>{
|
|
226
223
|
return mergeRegister(editor.registerCommand(KEY_ARROW_DOWN_COMMAND, (payload)=>{
|
|
227
224
|
const event = payload;
|
|
228
|
-
if (
|
|
229
|
-
const
|
|
230
|
-
const selectedIndex =
|
|
231
|
-
const newSelectedIndex = selectedIndex !==
|
|
232
|
-
const
|
|
233
|
-
|
|
234
|
-
if (
|
|
225
|
+
if (groups !== null && groups.length && selectedItemKey !== null) {
|
|
226
|
+
const allItems = groups.flatMap((group)=>group.items);
|
|
227
|
+
const selectedIndex = allItems.findIndex((item)=>item.key === selectedItemKey);
|
|
228
|
+
const newSelectedIndex = selectedIndex !== allItems.length - 1 ? selectedIndex + 1 : 0;
|
|
229
|
+
const newSelectedItem = allItems[newSelectedIndex];
|
|
230
|
+
updateSelectedItem(newSelectedItem);
|
|
231
|
+
if (newSelectedItem.ref != null && newSelectedItem.ref.current) {
|
|
235
232
|
editor.dispatchCommand(SCROLL_TYPEAHEAD_OPTION_INTO_VIEW_COMMAND, {
|
|
236
233
|
index: newSelectedIndex,
|
|
237
|
-
|
|
234
|
+
item: newSelectedItem
|
|
238
235
|
});
|
|
239
236
|
}
|
|
240
237
|
event.preventDefault();
|
|
@@ -243,14 +240,14 @@ groupsWithOptions, menuRenderFn, onSelectOption, resolution, shouldSplitNodeWith
|
|
|
243
240
|
return true;
|
|
244
241
|
}, COMMAND_PRIORITY_LOW), editor.registerCommand(KEY_ARROW_UP_COMMAND, (payload)=>{
|
|
245
242
|
const event = payload;
|
|
246
|
-
if (
|
|
247
|
-
const
|
|
248
|
-
const selectedIndex =
|
|
249
|
-
const newSelectedIndex = selectedIndex !== 0 ? selectedIndex - 1 :
|
|
250
|
-
const
|
|
251
|
-
|
|
252
|
-
if (
|
|
253
|
-
scrollIntoViewIfNeeded(
|
|
243
|
+
if (groups !== null && groups.length && selectedItemKey !== null) {
|
|
244
|
+
const allItems = groups.flatMap((group)=>group.items);
|
|
245
|
+
const selectedIndex = allItems.findIndex((item)=>item.key === selectedItemKey);
|
|
246
|
+
const newSelectedIndex = selectedIndex !== 0 ? selectedIndex - 1 : allItems.length - 1;
|
|
247
|
+
const newSelectedItem = allItems[newSelectedIndex];
|
|
248
|
+
updateSelectedItem(newSelectedItem);
|
|
249
|
+
if (newSelectedItem.ref != null && newSelectedItem.ref.current) {
|
|
250
|
+
scrollIntoViewIfNeeded(newSelectedItem.ref.current);
|
|
254
251
|
}
|
|
255
252
|
event.preventDefault();
|
|
256
253
|
event.stopImmediatePropagation();
|
|
@@ -264,51 +261,51 @@ groupsWithOptions, menuRenderFn, onSelectOption, resolution, shouldSplitNodeWith
|
|
|
264
261
|
return true;
|
|
265
262
|
}, COMMAND_PRIORITY_LOW), editor.registerCommand(KEY_TAB_COMMAND, (payload)=>{
|
|
266
263
|
const event = payload;
|
|
267
|
-
if (
|
|
264
|
+
if (groups === null || selectedItemKey === null) {
|
|
268
265
|
return false;
|
|
269
266
|
}
|
|
270
|
-
const
|
|
271
|
-
const
|
|
272
|
-
if (!
|
|
267
|
+
const allItems = groups.flatMap((group)=>group.items);
|
|
268
|
+
const selectedItem = allItems.find((item)=>item.key === selectedItemKey);
|
|
269
|
+
if (!selectedItem) {
|
|
273
270
|
return false;
|
|
274
271
|
}
|
|
275
272
|
event.preventDefault();
|
|
276
273
|
event.stopImmediatePropagation();
|
|
277
|
-
|
|
274
|
+
selectItemAndCleanUp(selectedItem);
|
|
278
275
|
return true;
|
|
279
276
|
}, COMMAND_PRIORITY_LOW), editor.registerCommand(KEY_ENTER_COMMAND, (event)=>{
|
|
280
|
-
if (
|
|
277
|
+
if (groups === null || selectedItemKey === null) {
|
|
281
278
|
return false;
|
|
282
279
|
}
|
|
283
|
-
const
|
|
284
|
-
const
|
|
285
|
-
if (!
|
|
280
|
+
const allItems = groups.flatMap((group)=>group.items);
|
|
281
|
+
const selectedItem = allItems.find((item)=>item.key === selectedItemKey);
|
|
282
|
+
if (!selectedItem) {
|
|
286
283
|
return false;
|
|
287
284
|
}
|
|
288
285
|
if (event !== null) {
|
|
289
286
|
event.preventDefault();
|
|
290
287
|
event.stopImmediatePropagation();
|
|
291
288
|
}
|
|
292
|
-
|
|
289
|
+
selectItemAndCleanUp(selectedItem);
|
|
293
290
|
return true;
|
|
294
291
|
}, COMMAND_PRIORITY_LOW));
|
|
295
292
|
}, [
|
|
296
|
-
|
|
293
|
+
selectItemAndCleanUp,
|
|
297
294
|
close,
|
|
298
295
|
editor,
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
296
|
+
groups,
|
|
297
|
+
selectedItemKey,
|
|
298
|
+
updateSelectedItem
|
|
302
299
|
]);
|
|
303
300
|
const listItemProps = useMemo(()=>({
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
301
|
+
groups,
|
|
302
|
+
selectItemAndCleanUp,
|
|
303
|
+
selectedItemKey,
|
|
304
|
+
setSelectedItemKey
|
|
308
305
|
}), [
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
306
|
+
selectItemAndCleanUp,
|
|
307
|
+
selectedItemKey,
|
|
308
|
+
groups
|
|
312
309
|
]);
|
|
313
310
|
return menuRenderFn(anchorElementRef, listItemProps, resolution.match ? resolution.match.matchingString : '');
|
|
314
311
|
}
|