@payloadcms/richtext-lexical 3.0.0-beta.5 → 3.0.0-beta.51
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/README.md +1 -1
- package/dist/cell/index.d.ts +5 -2
- package/dist/cell/index.d.ts.map +1 -1
- package/dist/cell/index.js +45 -31
- package/dist/cell/index.js.map +1 -1
- package/dist/exports/client/Component-6AVANNNR.js +2 -0
- package/dist/exports/client/Component-6AVANNNR.js.map +7 -0
- package/dist/exports/client/Component-SZVAYRJX.js +2 -0
- package/dist/exports/client/Component-SZVAYRJX.js.map +7 -0
- package/dist/exports/client/Field-U5PHZTST.js +2 -0
- package/dist/exports/client/Field-U5PHZTST.js.map +7 -0
- package/dist/exports/client/RelationshipComponent-FGUPLCD2.js +2 -0
- package/dist/exports/client/RelationshipComponent-FGUPLCD2.js.map +7 -0
- package/dist/exports/client/bundled.css +1 -0
- package/dist/exports/client/chunk-35NZOHAF.js +2 -0
- package/dist/exports/client/chunk-35NZOHAF.js.map +7 -0
- package/dist/exports/client/chunk-3PZ2ZFQG.js +3 -0
- package/dist/exports/client/chunk-3PZ2ZFQG.js.map +7 -0
- package/dist/exports/client/chunk-FSTRW2TI.js +2 -0
- package/dist/exports/client/chunk-FSTRW2TI.js.map +7 -0
- package/dist/exports/client/chunk-M6MN4CA5.js +2 -0
- package/dist/exports/client/chunk-M6MN4CA5.js.map +7 -0
- package/dist/exports/client/chunk-Y5455JF3.js +2 -0
- package/dist/exports/client/chunk-Y5455JF3.js.map +7 -0
- package/dist/exports/client/component-FFLILIUZ.js +2 -0
- package/dist/exports/client/component-FFLILIUZ.js.map +7 -0
- package/dist/exports/client/component-RAVN56DE.js +2 -0
- package/dist/exports/client/component-RAVN56DE.js.map +7 -0
- package/dist/exports/client/component-Z34HXRX3.js +2 -0
- package/dist/exports/client/component-Z34HXRX3.js.map +7 -0
- package/dist/exports/client/index.d.ts +52 -0
- package/dist/exports/client/index.d.ts.map +1 -0
- package/dist/exports/client/index.js +36 -0
- package/dist/exports/client/index.js.map +7 -0
- package/dist/field/Field.d.ts +1 -2
- package/dist/field/Field.d.ts.map +1 -1
- package/dist/field/Field.js +69 -55
- package/dist/field/Field.js.map +1 -1
- package/dist/field/bundled.css +0 -0
- 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 +4 -1
- 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 +10 -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 +77 -67
- package/dist/field/features/blocks/component/BlockContent.js.map +1 -1
- package/dist/field/features/blocks/component/FormSavePlugin.d.ts +1 -2
- package/dist/field/features/blocks/component/FormSavePlugin.d.ts.map +1 -1
- package/dist/field/features/blocks/component/FormSavePlugin.js +2 -2
- package/dist/field/features/blocks/component/FormSavePlugin.js.map +1 -1
- package/dist/field/features/blocks/component/index.d.ts +0 -1
- package/dist/field/features/blocks/component/index.d.ts.map +1 -1
- package/dist/field/features/blocks/component/index.js +60 -30
- package/dist/field/features/blocks/component/index.js.map +1 -1
- package/dist/field/features/blocks/component/removeEmptyArrayValues.d.ts +1 -1
- package/dist/field/features/blocks/component/removeEmptyArrayValues.d.ts.map +1 -1
- package/dist/field/features/blocks/component/removeEmptyArrayValues.js.map +1 -1
- package/dist/field/features/blocks/drawer/index.d.ts.map +1 -1
- package/dist/field/features/blocks/drawer/index.js +5 -11
- 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 +62 -82
- package/dist/field/features/blocks/feature.server.js.map +1 -1
- package/dist/field/features/blocks/{populationPromise.d.ts → graphQLPopulationPromise.d.ts} +1 -1
- package/dist/field/features/blocks/graphQLPopulationPromise.d.ts.map +1 -0
- package/dist/field/features/blocks/graphQLPopulationPromise.js +31 -0
- package/dist/field/features/blocks/graphQLPopulationPromise.js.map +1 -0
- 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/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 +14 -2
- package/dist/field/features/converters/html/field/index.d.ts.map +1 -1
- package/dist/field/features/converters/html/field/index.js +97 -57
- 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 -3
- 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/feature.server.d.ts.map +1 -0
- package/dist/field/features/debug/{testrecorder → testRecorder}/feature.server.js +3 -2
- package/dist/field/features/debug/testRecorder/feature.server.js.map +1 -0
- 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 -45
- 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/feature.server.d.ts.map +1 -0
- package/dist/field/features/debug/{treeview → treeView}/feature.server.js +3 -2
- package/dist/field/features/debug/treeView/feature.server.js.map +1 -0
- 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 -8
- 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/bold/feature.server.d.ts.map +1 -1
- package/dist/field/features/format/bold/feature.server.js +2 -1
- package/dist/field/features/format/bold/feature.server.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/feature.server.d.ts.map +1 -0
- package/dist/field/features/format/{inlinecode → inlineCode}/feature.server.js +3 -2
- package/dist/field/features/format/inlineCode/feature.server.js.map +1 -0
- 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/italic/feature.server.d.ts.map +1 -1
- package/dist/field/features/format/italic/feature.server.js +2 -1
- package/dist/field/features/format/italic/feature.server.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/strikethrough/feature.server.d.ts.map +1 -1
- package/dist/field/features/format/strikethrough/feature.server.js +2 -1
- package/dist/field/features/format/strikethrough/feature.server.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/subscript/feature.server.d.ts.map +1 -1
- package/dist/field/features/format/subscript/feature.server.js +2 -1
- package/dist/field/features/format/subscript/feature.server.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/superscript/feature.server.d.ts.map +1 -1
- package/dist/field/features/format/superscript/feature.server.js +2 -1
- package/dist/field/features/format/superscript/feature.server.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/format/underline/feature.server.d.ts.map +1 -1
- package/dist/field/features/format/underline/feature.server.js +2 -1
- package/dist/field/features/format/underline/feature.server.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 +75 -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 +9 -6
- 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 +39 -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 +30 -0
- package/dist/field/features/horizontalRule/plugin/index.js.map +1 -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 +4 -1
- 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 -3
- 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.d.ts.map +1 -1
- package/dist/field/features/link/drawer/index.js +32 -31
- package/dist/field/features/link/drawer/index.js.map +1 -1
- package/dist/field/features/link/drawer/types.d.ts +5 -3
- 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 -6
- package/dist/field/features/link/feature.server.d.ts.map +1 -1
- package/dist/field/features/link/feature.server.js +66 -17
- package/dist/field/features/link/feature.server.js.map +1 -1
- package/dist/field/features/link/{populationPromise.d.ts → graphQLPopulationPromise.d.ts} +1 -1
- package/dist/field/features/link/graphQLPopulationPromise.d.ts.map +1 -0
- package/dist/field/features/link/graphQLPopulationPromise.js +31 -0
- package/dist/field/features/link/graphQLPopulationPromise.js.map +1 -0
- 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 +3 -2
- package/dist/field/features/link/nodes/AutoLinkNode.js.map +1 -1
- package/dist/field/features/link/nodes/LinkNode.d.ts +9 -8
- package/dist/field/features/link/nodes/LinkNode.d.ts.map +1 -1
- package/dist/field/features/link/nodes/LinkNode.js +28 -11
- package/dist/field/features/link/nodes/LinkNode.js.map +1 -1
- package/dist/field/features/link/nodes/types.d.ts +2 -1
- package/dist/field/features/link/nodes/types.d.ts.map +1 -1
- package/dist/field/features/link/nodes/types.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 +179 -143
- 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 -2
- package/dist/field/features/link/plugins/floatingLinkEditor/index.js.map +1 -1
- package/dist/field/features/link/plugins/floatingLinkEditor/utilities.d.ts +3 -6
- 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 +7 -16
- package/dist/field/features/link/plugins/link/index.js.map +1 -1
- package/dist/field/features/link/validate.d.ts +6 -0
- package/dist/field/features/link/validate.d.ts.map +1 -0
- package/dist/field/features/link/validate.js +28 -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 +13 -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 +12 -9
- 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 +11 -8
- 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/feature.server.d.ts.map +1 -1
- package/dist/field/features/migrations/lexicalPluginToLexical/feature.server.js +2 -1
- package/dist/field/features/migrations/lexicalPluginToLexical/feature.server.js.map +1 -1
- package/dist/field/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/Component.js +9 -2
- package/dist/field/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/Component.js.map +1 -1
- package/dist/field/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/index.d.ts +3 -6
- 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/feature.server.d.ts.map +1 -1
- package/dist/field/features/migrations/slateToLexical/feature.server.js +2 -1
- package/dist/field/features/migrations/slateToLexical/feature.server.js.map +1 -1
- package/dist/field/features/migrations/slateToLexical/nodes/unknownConvertedNode/Component.js +9 -2
- package/dist/field/features/migrations/slateToLexical/nodes/unknownConvertedNode/Component.js.map +1 -1
- package/dist/field/features/migrations/slateToLexical/nodes/unknownConvertedNode/index.d.ts +3 -6
- 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 +4 -1
- 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 +18 -16
- 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 +43 -8
- package/dist/field/features/relationship/feature.server.js.map +1 -1
- package/dist/field/features/relationship/graphQLPopulationPromise.d.ts +5 -0
- package/dist/field/features/relationship/graphQLPopulationPromise.d.ts.map +1 -0
- package/dist/field/features/relationship/graphQLPopulationPromise.js +29 -0
- package/dist/field/features/relationship/graphQLPopulationPromise.js.map +1 -0
- 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 -56
- 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 +16 -18
- package/dist/field/features/relationship/plugins/index.js.map +1 -1
- package/dist/field/features/relationship/utils/EnabledRelationshipsCondition.d.ts.map +1 -1
- package/dist/field/features/relationship/utils/EnabledRelationshipsCondition.js +1 -3
- package/dist/field/features/relationship/utils/EnabledRelationshipsCondition.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 +207 -0
- package/dist/field/features/toolbars/fixed/Toolbar/index.js.map +1 -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 +21 -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 +319 -0
- package/dist/field/features/toolbars/inline/Toolbar/index.js.map +1 -0
- 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 +16 -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 -23
- package/dist/field/features/toolbars/shared/ToolbarButton/index.js.map +1 -0
- package/dist/field/features/toolbars/shared/ToolbarDropdown/DropDown.d.ts +22 -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 +75 -102
- 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 +141 -0
- package/dist/field/features/toolbars/shared/ToolbarDropdown/index.js.map +1 -0
- 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 +259 -69
- 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 +1 -1
- package/dist/field/features/upload/component/ExtraFieldsDrawer/index.d.ts.map +1 -1
- package/dist/field/features/upload/component/ExtraFieldsDrawer/index.js +35 -37
- 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 +160 -85
- 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 +17 -18
- 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 +93 -15
- package/dist/field/features/upload/feature.server.js.map +1 -1
- package/dist/field/features/upload/{populationPromise.d.ts → graphQLPopulationPromise.d.ts} +1 -1
- package/dist/field/features/upload/graphQLPopulationPromise.d.ts.map +1 -0
- package/dist/field/features/upload/graphQLPopulationPromise.js +52 -0
- package/dist/field/features/upload/graphQLPopulationPromise.js.map +1 -0
- 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 +7 -19
- package/dist/field/features/upload/nodes/UploadNode.d.ts.map +1 -1
- package/dist/field/features/upload/nodes/UploadNode.js +45 -15
- 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 +18 -20
- package/dist/field/features/upload/plugin/index.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 +37 -10
- 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 +35 -86
- package/dist/field/index.js.map +1 -1
- 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 -77
- package/dist/field/lexical/LexicalEditor.js.map +1 -1
- package/dist/field/lexical/LexicalProvider.d.ts +1 -2
- 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 +39 -9
- 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/nodes/index.d.ts +1 -2
- package/dist/field/lexical/nodes/index.d.ts.map +1 -1
- package/dist/field/lexical/nodes/index.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 -93
- 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 -126
- package/dist/field/lexical/plugins/handles/AddBlockHandlePlugin/index.js.map +1 -1
- 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 -67
- package/dist/field/lexical/plugins/handles/DraggableBlockPlugin/index.js.map +1 -1
- 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 -1
- package/dist/field/lexical/theme/EditorTheme.js.map +1 -1
- 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 -4
- package/dist/field/lexical/ui/ContentEditable.js.map +1 -1
- 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 -2
- package/dist/field/lexical/utils/nodeFormat.d.ts.map +1 -1
- package/dist/field/lexical/utils/nodeFormat.js +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 +1 -1
- 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 +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 +21 -36
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +592 -201
- package/dist/index.js.map +1 -1
- package/dist/{populate → populateGraphQL}/defaultValue.d.ts +0 -1
- package/dist/populateGraphQL/defaultValue.d.ts.map +1 -0
- package/dist/{populate → populateGraphQL}/defaultValue.js +1 -19
- package/dist/populateGraphQL/defaultValue.js.map +1 -0
- package/dist/populateGraphQL/populate.d.ts +17 -0
- package/dist/populateGraphQL/populate.d.ts.map +1 -0
- package/dist/populateGraphQL/populate.js +28 -0
- package/dist/populateGraphQL/populate.js.map +1 -0
- package/dist/populateGraphQL/populateLexicalPopulationPromises.d.ts +12 -0
- package/dist/populateGraphQL/populateLexicalPopulationPromises.d.ts.map +1 -0
- package/dist/populateGraphQL/populateLexicalPopulationPromises.js +37 -0
- package/dist/populateGraphQL/populateLexicalPopulationPromises.js.map +1 -0
- package/dist/populateGraphQL/recursivelyPopulateFieldsForGraphQL.d.ts +28 -0
- package/dist/populateGraphQL/recursivelyPopulateFieldsForGraphQL.d.ts.map +1 -0
- package/dist/{populate/recurseNestedFields.js → populateGraphQL/recursivelyPopulateFieldsForGraphQL.js} +7 -5
- package/dist/populateGraphQL/recursivelyPopulateFieldsForGraphQL.js.map +1 -0
- package/dist/recurseNodeTree.d.ts +9 -0
- package/dist/recurseNodeTree.d.ts.map +1 -0
- package/dist/recurseNodeTree.js +27 -0
- package/dist/recurseNodeTree.js.map +1 -0
- package/dist/types.d.ts +45 -8
- 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 -3
- package/dist/useLexicalFeature.js.map +1 -1
- package/dist/validate/index.d.ts +2 -2
- 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.d.ts +1 -1
- package/dist/validate/validateNodes.d.ts.map +1 -1
- package/dist/validate/validateNodes.js +1 -1
- package/dist/validate/validateNodes.js.map +1 -1
- package/package.json +71 -53
- package/components.d.ts +0 -6
- package/components.js +0 -7
- package/dist/exports/components.d.ts +0 -6
- package/dist/exports/components.d.ts.map +0 -1
- package/dist/exports/components.js +0 -7
- package/dist/exports/components.js.map +0 -1
- 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/blocks/component/index.scss +0 -153
- package/dist/field/features/blocks/populationPromise.d.ts.map +0 -1
- package/dist/field/features/blocks/populationPromise.js +0 -46
- package/dist/field/features/blocks/populationPromise.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/feature.server.d.ts.map +0 -1
- package/dist/field/features/debug/testrecorder/feature.server.js.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/testrecorder/plugin/index.scss +0 -49
- package/dist/field/features/debug/treeview/feature.client.d.ts.map +0 -1
- package/dist/field/features/debug/treeview/feature.server.d.ts.map +0 -1
- package/dist/field/features/debug/treeview/feature.server.js.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/debug/treeview/plugin/index.scss +0 -78
- 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/format/inlinecode/feature.server.d.ts.map +0 -1
- package/dist/field/features/format/inlinecode/feature.server.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/link/drawer/index.scss +0 -50
- package/dist/field/features/link/plugins/floatingLinkEditor/index.scss +0 -78
- package/dist/field/features/link/populationPromise.d.ts.map +0 -1
- package/dist/field/features/link/populationPromise.js +0 -46
- package/dist/field/features/link/populationPromise.js.map +0 -1
- 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/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/index.scss +0 -14
- package/dist/field/features/migrations/slateToLexical/nodes/unknownConvertedNode/index.scss +0 -14
- package/dist/field/features/relationship/nodes/components/index.scss +0 -97
- package/dist/field/features/relationship/populationPromise.d.ts +0 -4
- package/dist/field/features/relationship/populationPromise.d.ts.map +0 -1
- package/dist/field/features/relationship/populationPromise.js +0 -24
- package/dist/field/features/relationship/populationPromise.js.map +0 -1
- package/dist/field/features/upload/component/index.scss +0 -152
- package/dist/field/features/upload/populationPromise.d.ts.map +0 -1
- package/dist/field/features/upload/populationPromise.js +0 -46
- package/dist/field/features/upload/populationPromise.js.map +0 -1
- package/dist/field/index.scss +0 -46
- package/dist/field/lexical/LexicalEditor.scss +0 -56
- 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/ToolbarButton/index.scss +0 -37
- 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/ToolbarDropdown/index.scss +0 -100
- 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/index.scss +0 -57
- 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/SlashMenu/index.scss +0 -61
- package/dist/field/lexical/plugins/handles/AddBlockHandlePlugin/index.scss +0 -31
- 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/field/lexical/plugins/handles/DraggableBlockPlugin/index.scss +0 -55
- package/dist/field/lexical/theme/EditorTheme.scss +0 -505
- package/dist/field/lexical/ui/ContentEditable.scss +0 -25
- package/dist/populate/defaultValue.d.ts.map +0 -1
- package/dist/populate/defaultValue.js.map +0 -1
- package/dist/populate/populate.d.ts +0 -21
- package/dist/populate/populate.d.ts.map +0 -1
- package/dist/populate/populate.js +0 -21
- package/dist/populate/populate.js.map +0 -1
- package/dist/populate/recurseNestedFields.d.ts +0 -25
- package/dist/populate/recurseNestedFields.d.ts.map +0 -1
- package/dist/populate/recurseNestedFields.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/app.scss +0 -209
- package/dist/scss/colors.scss +0 -269
- package/dist/scss/fonts.scss +0 -75
- package/dist/scss/queries.scss +0 -27
- package/dist/scss/resets.scss +0 -17
- package/dist/scss/styles.scss +0 -11
- package/dist/scss/svg.scss +0 -10
- package/dist/scss/toastify.scss +0 -58
- package/dist/scss/type.scss +0 -117
- package/dist/scss/vars.scss +0 -220
- package/dist/scss/z-index.scss +0 -9
- 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/{treeview → treeView}/feature.client.js +0 -0
- /package/dist/field/features/debug/{treeview → treeView}/feature.server.d.ts +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
|
@@ -1,39 +1,31 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { I18nClient } from '@payloadcms/translations';
|
|
2
2
|
import type { LexicalEditor } from 'lexical';
|
|
3
3
|
import type { MutableRefObject } from 'react';
|
|
4
4
|
import type React from 'react';
|
|
5
|
-
export
|
|
5
|
+
export type SlashMenuItem = {
|
|
6
6
|
Icon: React.FC;
|
|
7
|
-
displayName?: (({ i18n }: {
|
|
8
|
-
i18n: I18n;
|
|
9
|
-
}) => string) | string;
|
|
10
7
|
key: string;
|
|
11
8
|
keyboardShortcut?: string;
|
|
12
|
-
keywords
|
|
9
|
+
keywords?: Array<string>;
|
|
10
|
+
label?: (({ i18n }: {
|
|
11
|
+
i18n: I18nClient<{}, string>;
|
|
12
|
+
}) => string) | string;
|
|
13
13
|
onSelect: ({ editor, queryString }: {
|
|
14
14
|
editor: LexicalEditor;
|
|
15
15
|
queryString: string;
|
|
16
16
|
}) => void;
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
displayName?: (({ i18n }: {
|
|
21
|
-
i18n: I18n;
|
|
22
|
-
}) => string) | string;
|
|
23
|
-
keyboardShortcut?: string;
|
|
24
|
-
keywords?: Array<string>;
|
|
25
|
-
onSelect: ({ editor, queryString }: {
|
|
26
|
-
editor: LexicalEditor;
|
|
27
|
-
queryString: string;
|
|
28
|
-
}) => void;
|
|
29
|
-
});
|
|
30
|
-
setRefElement(element: HTMLElement | null): void;
|
|
31
|
-
}
|
|
32
|
-
export declare class SlashMenuGroup {
|
|
33
|
-
displayName?: (({ i18n }: {
|
|
34
|
-
i18n: I18n;
|
|
35
|
-
}) => string) | string;
|
|
17
|
+
};
|
|
18
|
+
export type SlashMenuGroup = {
|
|
19
|
+
items: Array<SlashMenuItem>;
|
|
36
20
|
key: string;
|
|
37
|
-
|
|
38
|
-
}
|
|
21
|
+
label?: (({ i18n }: {
|
|
22
|
+
i18n: I18nClient<{}, string>;
|
|
23
|
+
}) => string) | string;
|
|
24
|
+
};
|
|
25
|
+
export type SlashMenuItemInternal = SlashMenuItem & {
|
|
26
|
+
ref: MutableRefObject<HTMLButtonElement | null>;
|
|
27
|
+
};
|
|
28
|
+
export type SlashMenuGroupInternal = SlashMenuGroup & {
|
|
29
|
+
items: Array<SlashMenuItemInternal>;
|
|
30
|
+
};
|
|
39
31
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../src/field/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../src/field/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAQ,UAAU,EAAE,MAAM,0BAA0B,CAAA;AAChE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAA;AAC5C,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,OAAO,CAAA;AAC7C,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAE9B,MAAM,MAAM,aAAa,GAAG;IAE1B,IAAI,EAAE,KAAK,CAAC,EAAE,CAAA;IAGd,GAAG,EAAE,MAAM,CAAA;IAEX,gBAAgB,CAAC,EAAE,MAAM,CAAA;IAEzB,QAAQ,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,CAAA;IACxB,KAAK,CAAC,EAAE,CAAC,CAAC,EAAE,IAAI,EAAE,EAAE;QAAE,IAAI,EAAE,UAAU,CAAC,EAAE,EAAE,MAAM,CAAC,CAAA;KAAE,KAAK,MAAM,CAAC,GAAG,MAAM,CAAA;IAEzE,QAAQ,EAAE,CAAC,EAAE,MAAM,EAAE,WAAW,EAAE,EAAE;QAAE,MAAM,EAAE,aAAa,CAAC;QAAC,WAAW,EAAE,MAAM,CAAA;KAAE,KAAK,IAAI,CAAA;CAC5F,CAAA;AAED,MAAM,MAAM,cAAc,GAAG;IAC3B,KAAK,EAAE,KAAK,CAAC,aAAa,CAAC,CAAA;IAC3B,GAAG,EAAE,MAAM,CAAA;IAEX,KAAK,CAAC,EAAE,CAAC,CAAC,EAAE,IAAI,EAAE,EAAE;QAAE,IAAI,EAAE,UAAU,CAAC,EAAE,EAAE,MAAM,CAAC,CAAA;KAAE,KAAK,MAAM,CAAC,GAAG,MAAM,CAAA;CAC1E,CAAA;AAED,MAAM,MAAM,qBAAqB,GAAG,aAAa,GAAG;IAClD,GAAG,EAAE,gBAAgB,CAAC,iBAAiB,GAAG,IAAI,CAAC,CAAA;CAChD,CAAA;AAED,MAAM,MAAM,sBAAsB,GAAG,cAAc,GAAG;IACpD,KAAK,EAAE,KAAK,CAAC,qBAAqB,CAAC,CAAA;CACpC,CAAA"}
|
|
@@ -1,39 +1,3 @@
|
|
|
1
|
-
export
|
|
2
|
-
// Icon for display
|
|
3
|
-
Icon;
|
|
4
|
-
displayName;
|
|
5
|
-
// Used for class names and, if displayName is not provided, for display.
|
|
6
|
-
key;
|
|
7
|
-
// TBD
|
|
8
|
-
keyboardShortcut;
|
|
9
|
-
// For extra searching.
|
|
10
|
-
keywords;
|
|
11
|
-
// What happens when you select this option?
|
|
12
|
-
onSelect;
|
|
13
|
-
ref;
|
|
14
|
-
constructor(key, options){
|
|
15
|
-
this.key = key;
|
|
16
|
-
this.ref = {
|
|
17
|
-
current: null
|
|
18
|
-
};
|
|
19
|
-
this.setRefElement = this.setRefElement.bind(this);
|
|
20
|
-
this.displayName = options.displayName;
|
|
21
|
-
this.keywords = options.keywords || [];
|
|
22
|
-
this.Icon = options.Icon;
|
|
23
|
-
this.keyboardShortcut = options.keyboardShortcut;
|
|
24
|
-
this.onSelect = options.onSelect.bind(this);
|
|
25
|
-
}
|
|
26
|
-
setRefElement(element) {
|
|
27
|
-
this.ref = {
|
|
28
|
-
current: element
|
|
29
|
-
};
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
export class SlashMenuGroup {
|
|
33
|
-
// Used for class names and, if displayName is not provided, for display.
|
|
34
|
-
displayName;
|
|
35
|
-
key;
|
|
36
|
-
options;
|
|
37
|
-
}
|
|
1
|
+
export { };
|
|
38
2
|
|
|
39
3
|
//# sourceMappingURL=types.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../../src/field/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/types.ts"],"sourcesContent":["import type { I18n } from '@payloadcms/translations'\nimport type { LexicalEditor } from 'lexical'\nimport type { MutableRefObject } from 'react'\nimport type React from 'react'\n\nexport
|
|
1
|
+
{"version":3,"sources":["../../../../../../src/field/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/types.ts"],"sourcesContent":["import type { I18n, I18nClient } from '@payloadcms/translations'\nimport type { LexicalEditor } from 'lexical'\nimport type { MutableRefObject } from 'react'\nimport type React from 'react'\n\nexport type SlashMenuItem = {\n // Icon for display\n Icon: React.FC\n\n // Used for class names and, if label is not provided, for display.\n key: string\n // TBD\n keyboardShortcut?: string\n // For extra searching.\n keywords?: Array<string>\n label?: (({ i18n }: { i18n: I18nClient<{}, string> }) => string) | string\n // What happens when you select this item?\n onSelect: ({ editor, queryString }: { editor: LexicalEditor; queryString: string }) => void\n}\n\nexport type SlashMenuGroup = {\n items: Array<SlashMenuItem>\n key: string\n // Used for class names and, if label is not provided, for display.\n label?: (({ i18n }: { i18n: I18nClient<{}, string> }) => string) | string\n}\n\nexport type SlashMenuItemInternal = SlashMenuItem & {\n ref: MutableRefObject<HTMLButtonElement | null>\n}\n\nexport type SlashMenuGroupInternal = SlashMenuGroup & {\n items: Array<SlashMenuItemInternal>\n}\n"],"names":[],"rangeMappings":"","mappings":"AA+BA,WAEC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
import * as React from 'react';
|
|
2
2
|
import './index.scss';
|
|
3
3
|
export declare function SlashMenuPlugin({ anchorElem, }: {
|
|
4
4
|
anchorElem?: HTMLElement;
|
|
5
|
-
}):
|
|
5
|
+
}): React.ReactElement;
|
|
6
6
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/field/lexical/plugins/SlashMenu/index.tsx"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/field/lexical/plugins/SlashMenu/index.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAY9B,OAAO,cAAc,CAAA;AAqDrB,wBAAgB,eAAe,CAAC,EAC9B,UAA0B,GAC3B,EAAE;IACD,UAAU,CAAC,EAAE,WAAW,CAAA;CACzB,GAAG,KAAK,CAAC,YAAY,CA8JrB"}
|
|
@@ -1,45 +1,48 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
import { useTranslation } from '@payloadcms/ui/
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext.js';
|
|
4
|
+
import { useTranslation } from '@payloadcms/ui/client';
|
|
5
5
|
import { useCallback, useMemo, useState } from 'react';
|
|
6
6
|
import * as React from 'react';
|
|
7
7
|
import * as ReactDOM from 'react-dom';
|
|
8
8
|
import { useEditorConfigContext } from '../../config/client/EditorConfigProvider.js';
|
|
9
9
|
import { LexicalTypeaheadMenuPlugin } from './LexicalTypeaheadMenuPlugin/index.js';
|
|
10
|
-
import './index.scss';
|
|
11
10
|
import { useMenuTriggerMatch } from './useMenuTriggerMatch.js';
|
|
12
11
|
const baseClass = 'slash-menu-popup';
|
|
13
|
-
function SlashMenuItem({ isSelected, onClick, onMouseEnter
|
|
12
|
+
function SlashMenuItem({ isSelected, item, onClick, onMouseEnter }) {
|
|
14
13
|
const { i18n } = useTranslation();
|
|
15
|
-
let className = `${baseClass}__item ${baseClass}__item-${
|
|
14
|
+
let className = `${baseClass}__item ${baseClass}__item-${item.key}`;
|
|
16
15
|
if (isSelected) {
|
|
17
16
|
className += ` ${baseClass}__item--selected`;
|
|
18
17
|
}
|
|
19
|
-
let title =
|
|
20
|
-
if (
|
|
21
|
-
title = typeof
|
|
18
|
+
let title = item.key;
|
|
19
|
+
if (item.label) {
|
|
20
|
+
title = typeof item.label === 'function' ? item.label({
|
|
22
21
|
i18n
|
|
23
|
-
}) :
|
|
22
|
+
}) : item.label;
|
|
24
23
|
}
|
|
25
|
-
// Crop title to max.
|
|
24
|
+
// Crop title to max. 25 characters
|
|
26
25
|
if (title.length > 25) {
|
|
27
26
|
title = title.substring(0, 25) + '...';
|
|
28
27
|
}
|
|
29
|
-
return /*#__PURE__*/
|
|
28
|
+
return /*#__PURE__*/ _jsxs("button", {
|
|
30
29
|
"aria-selected": isSelected,
|
|
31
30
|
className: className,
|
|
32
|
-
id: baseClass + '__item-' +
|
|
33
|
-
key: option.key,
|
|
31
|
+
id: baseClass + '__item-' + item.key,
|
|
34
32
|
onClick: onClick,
|
|
35
33
|
onMouseEnter: onMouseEnter,
|
|
36
|
-
ref:
|
|
34
|
+
ref: item.ref,
|
|
37
35
|
role: "option",
|
|
38
36
|
tabIndex: -1,
|
|
39
|
-
type: "button"
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
37
|
+
type: "button",
|
|
38
|
+
children: [
|
|
39
|
+
item?.Icon && /*#__PURE__*/ _jsx(item.Icon, {}),
|
|
40
|
+
/*#__PURE__*/ _jsx("span", {
|
|
41
|
+
className: `${baseClass}__item-text`,
|
|
42
|
+
children: title
|
|
43
|
+
})
|
|
44
|
+
]
|
|
45
|
+
}, item.key);
|
|
43
46
|
}
|
|
44
47
|
export function SlashMenuPlugin({ anchorElem = document.body }) {
|
|
45
48
|
const [editor] = useLexicalComposerContext();
|
|
@@ -49,124 +52,136 @@ export function SlashMenuPlugin({ anchorElem = document.body }) {
|
|
|
49
52
|
const checkForTriggerMatch = useMenuTriggerMatch('/', {
|
|
50
53
|
minLength: 0
|
|
51
54
|
});
|
|
52
|
-
const
|
|
53
|
-
let
|
|
54
|
-
for (const
|
|
55
|
-
const
|
|
55
|
+
const getDynamicItems = useCallback(()=>{
|
|
56
|
+
let groupWithItems = [];
|
|
57
|
+
for (const dynamicItem of editorConfig.features.slashMenu.dynamicGroups){
|
|
58
|
+
const dynamicGroupWithItems = dynamicItem({
|
|
56
59
|
editor,
|
|
57
60
|
queryString
|
|
58
61
|
});
|
|
59
|
-
|
|
62
|
+
groupWithItems = groupWithItems.concat(dynamicGroupWithItems);
|
|
60
63
|
}
|
|
61
|
-
return
|
|
64
|
+
return groupWithItems;
|
|
62
65
|
}, [
|
|
63
66
|
editor,
|
|
64
67
|
queryString,
|
|
65
68
|
editorConfig?.features
|
|
66
69
|
]);
|
|
67
70
|
const groups = useMemo(()=>{
|
|
68
|
-
let
|
|
69
|
-
for (const
|
|
70
|
-
|
|
71
|
+
let groupsWithItems = [];
|
|
72
|
+
for (const groupWithItem of editorConfig?.features.slashMenu.groups ?? []){
|
|
73
|
+
groupsWithItems.push(groupWithItem);
|
|
71
74
|
}
|
|
72
75
|
if (queryString) {
|
|
73
76
|
// Filter current groups first
|
|
74
|
-
|
|
75
|
-
const
|
|
76
|
-
let
|
|
77
|
-
if (
|
|
78
|
-
|
|
77
|
+
groupsWithItems = groupsWithItems.map((group)=>{
|
|
78
|
+
const filteredItems = group.items.filter((item)=>{
|
|
79
|
+
let itemTitle = item.key;
|
|
80
|
+
if (item.label) {
|
|
81
|
+
itemTitle = typeof item.label === 'function' ? item.label({
|
|
79
82
|
i18n
|
|
80
|
-
}) :
|
|
83
|
+
}) : item.label;
|
|
81
84
|
}
|
|
82
|
-
|
|
85
|
+
if (new RegExp(queryString, 'gi').exec(itemTitle)) {
|
|
86
|
+
return true;
|
|
87
|
+
}
|
|
88
|
+
if (item.keywords != null) {
|
|
89
|
+
return item.keywords.some((keyword)=>new RegExp(queryString, 'gi').exec(keyword));
|
|
90
|
+
}
|
|
91
|
+
return false;
|
|
83
92
|
});
|
|
84
|
-
if (
|
|
93
|
+
if (filteredItems.length) {
|
|
85
94
|
return {
|
|
86
95
|
...group,
|
|
87
|
-
|
|
96
|
+
items: filteredItems
|
|
88
97
|
};
|
|
89
98
|
}
|
|
90
99
|
return null;
|
|
91
100
|
});
|
|
92
|
-
|
|
101
|
+
groupsWithItems = groupsWithItems.filter((group)=>group != null);
|
|
93
102
|
// Now add dynamic groups
|
|
94
|
-
const
|
|
95
|
-
// merge dynamic
|
|
96
|
-
for (const dynamicGroup of
|
|
103
|
+
const dynamicItemGroups = getDynamicItems();
|
|
104
|
+
// merge dynamic items into groups
|
|
105
|
+
for (const dynamicGroup of dynamicItemGroups){
|
|
97
106
|
// 1. find the group with the same name or create new one
|
|
98
|
-
let group =
|
|
107
|
+
let group = groupsWithItems.find((group)=>group.key === dynamicGroup.key);
|
|
99
108
|
if (!group) {
|
|
100
109
|
group = {
|
|
101
110
|
...dynamicGroup,
|
|
102
|
-
|
|
111
|
+
items: []
|
|
103
112
|
};
|
|
104
113
|
} else {
|
|
105
|
-
|
|
114
|
+
groupsWithItems = groupsWithItems.filter((group)=>group.key !== dynamicGroup.key);
|
|
106
115
|
}
|
|
107
|
-
// 2. Add
|
|
108
|
-
if (group?.
|
|
109
|
-
group.
|
|
116
|
+
// 2. Add items to group items array and add to sanitized.slashMenu.groupsWithItems
|
|
117
|
+
if (group?.items?.length) {
|
|
118
|
+
group.items = group.items.concat(group.items);
|
|
110
119
|
}
|
|
111
|
-
|
|
120
|
+
groupsWithItems.push(group);
|
|
112
121
|
}
|
|
113
122
|
}
|
|
114
|
-
return
|
|
123
|
+
return groupsWithItems;
|
|
115
124
|
}, [
|
|
116
|
-
|
|
125
|
+
getDynamicItems,
|
|
117
126
|
queryString,
|
|
118
127
|
editorConfig?.features,
|
|
119
128
|
i18n
|
|
120
129
|
]);
|
|
121
|
-
const
|
|
122
|
-
|
|
123
|
-
|
|
130
|
+
const onSelectItem = useCallback((selectedItem, nodeToRemove, closeMenu, matchingString)=>{
|
|
131
|
+
if (nodeToRemove) {
|
|
132
|
+
editor.update(()=>{
|
|
124
133
|
nodeToRemove.remove();
|
|
125
|
-
}
|
|
126
|
-
selectedOption.onSelect({
|
|
127
|
-
editor,
|
|
128
|
-
queryString: matchingString
|
|
129
134
|
});
|
|
130
|
-
|
|
135
|
+
}
|
|
136
|
+
selectedItem.onSelect({
|
|
137
|
+
editor,
|
|
138
|
+
queryString: matchingString
|
|
131
139
|
});
|
|
140
|
+
closeMenu();
|
|
132
141
|
}, [
|
|
133
142
|
editor
|
|
134
143
|
]);
|
|
135
|
-
return /*#__PURE__*/
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
144
|
+
return /*#__PURE__*/ _jsx(React.Fragment, {
|
|
145
|
+
children: /*#__PURE__*/ _jsx(LexicalTypeaheadMenuPlugin, {
|
|
146
|
+
anchorElem: anchorElem,
|
|
147
|
+
groups: groups,
|
|
148
|
+
menuRenderFn: (anchorElementRef, { selectItemAndCleanUp, selectedItemKey, setSelectedItemKey })=>anchorElementRef.current && groups.length ? /*#__PURE__*/ ReactDOM.createPortal(/*#__PURE__*/ _jsx("div", {
|
|
149
|
+
className: baseClass,
|
|
150
|
+
children: groups.map((group)=>{
|
|
151
|
+
let groupTitle = group.key;
|
|
152
|
+
if (group.label) {
|
|
153
|
+
groupTitle = typeof group.label === 'function' ? group.label({
|
|
154
|
+
i18n
|
|
155
|
+
}) : group.label;
|
|
156
|
+
}
|
|
157
|
+
return /*#__PURE__*/ _jsxs("div", {
|
|
158
|
+
className: `${baseClass}__group ${baseClass}__group-${group.key}`,
|
|
159
|
+
children: [
|
|
160
|
+
/*#__PURE__*/ _jsx("div", {
|
|
161
|
+
className: `${baseClass}__group-title`,
|
|
162
|
+
children: groupTitle
|
|
163
|
+
}),
|
|
164
|
+
group.items.map((item, oi)=>/*#__PURE__*/ _jsx(SlashMenuItem, {
|
|
165
|
+
index: oi,
|
|
166
|
+
isSelected: selectedItemKey === item.key,
|
|
167
|
+
item: item,
|
|
168
|
+
onClick: ()=>{
|
|
169
|
+
setSelectedItemKey(item.key);
|
|
170
|
+
selectItemAndCleanUp(item);
|
|
171
|
+
},
|
|
172
|
+
onMouseEnter: ()=>{
|
|
173
|
+
setSelectedItemKey(item.key);
|
|
174
|
+
}
|
|
175
|
+
}, item.key))
|
|
176
|
+
]
|
|
177
|
+
}, group.key);
|
|
178
|
+
})
|
|
179
|
+
}), anchorElementRef.current) : null,
|
|
180
|
+
onQueryChange: setQueryString,
|
|
181
|
+
onSelectItem: onSelectItem,
|
|
182
|
+
triggerFn: checkForTriggerMatch
|
|
183
|
+
})
|
|
184
|
+
});
|
|
170
185
|
}
|
|
171
186
|
|
|
172
187
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../src/field/lexical/plugins/SlashMenu/index.tsx"],"sourcesContent":["'use client'\nimport type { TextNode } from 'lexical'\n\nimport lexicalComposerContextImport from '@lexical/react/LexicalComposerContext.js'\nconst { useLexicalComposerContext } = lexicalComposerContextImport\n\nimport { useTranslation } from '@payloadcms/ui/providers/Translation'\nimport { useCallback, useMemo, useState } from 'react'\nimport * as React from 'react'\nimport * as ReactDOM from 'react-dom'\n\nimport type { SlashMenuGroup, SlashMenuOption } from './LexicalTypeaheadMenuPlugin/types.js'\n\nimport { useEditorConfigContext } from '../../config/client/EditorConfigProvider.js'\nimport { LexicalTypeaheadMenuPlugin } from './LexicalTypeaheadMenuPlugin/index.js'\nimport './index.scss'\nimport { useMenuTriggerMatch } from './useMenuTriggerMatch.js'\n\nconst baseClass = 'slash-menu-popup'\n\nfunction SlashMenuItem({\n isSelected,\n onClick,\n onMouseEnter,\n option,\n}: {\n index: number\n isSelected: boolean\n onClick: () => void\n onMouseEnter: () => void\n option: SlashMenuOption\n}) {\n const { i18n } = useTranslation()\n\n let className = `${baseClass}__item ${baseClass}__item-${option.key}`\n if (isSelected) {\n className += ` ${baseClass}__item--selected`\n }\n\n let title = option.key\n if (option.displayName) {\n title =\n typeof option.displayName === 'function' ? option.displayName({ i18n }) : option.displayName\n }\n // Crop title to max. 50 characters\n if (title.length > 25) {\n title = title.substring(0, 25) + '...'\n }\n\n return (\n <button\n aria-selected={isSelected}\n className={className}\n id={baseClass + '__item-' + option.key}\n key={option.key}\n onClick={onClick}\n onMouseEnter={onMouseEnter}\n ref={option.setRefElement}\n role=\"option\"\n tabIndex={-1}\n type=\"button\"\n >\n {option?.Icon && <option.Icon />}\n\n <span className={`${baseClass}__item-text`}>{title}</span>\n </button>\n )\n}\n\nexport function SlashMenuPlugin({\n anchorElem = document.body,\n}: {\n anchorElem?: HTMLElement\n}): JSX.Element {\n const [editor] = useLexicalComposerContext()\n const [queryString, setQueryString] = useState<null | string>(null)\n const { editorConfig } = useEditorConfigContext()\n const { i18n } = useTranslation()\n\n const checkForTriggerMatch = useMenuTriggerMatch('/', {\n minLength: 0,\n })\n\n const getDynamicOptions = useCallback(() => {\n let groupWithOptions: Array<SlashMenuGroup> = []\n\n for (const dynamicOption of editorConfig.features.slashMenu.dynamicOptions) {\n const dynamicGroupWithOptions = dynamicOption({\n editor,\n queryString,\n })\n groupWithOptions = groupWithOptions.concat(dynamicGroupWithOptions)\n }\n\n return groupWithOptions\n }, [editor, queryString, editorConfig?.features])\n\n const groups: SlashMenuGroup[] = useMemo(() => {\n let groupsWithOptions: SlashMenuGroup[] = []\n for (const groupWithOption of editorConfig?.features.slashMenu.groupsWithOptions ?? []) {\n groupsWithOptions.push(groupWithOption)\n }\n\n if (queryString) {\n // Filter current groups first\n groupsWithOptions = groupsWithOptions.map((group) => {\n const filteredOptions = group.options.filter((option) => {\n let optionTitle = option.key\n if (option.displayName) {\n optionTitle =\n typeof option.displayName === 'function'\n ? option.displayName({ i18n })\n : option.displayName\n }\n\n return new RegExp(queryString, 'gi').exec(optionTitle) || option.keywords != null\n ? option.keywords.some((keyword) => new RegExp(queryString, 'gi').exec(keyword))\n : false\n })\n if (filteredOptions.length) {\n return {\n ...group,\n options: filteredOptions,\n }\n }\n return null\n })\n\n groupsWithOptions = groupsWithOptions.filter((group) => group != null)\n\n // Now add dynamic groups\n const dynamicOptionGroups = getDynamicOptions()\n\n // merge dynamic options into groups\n for (const dynamicGroup of dynamicOptionGroups) {\n // 1. find the group with the same name or create new one\n let group = groupsWithOptions.find((group) => group.key === dynamicGroup.key)\n if (!group) {\n group = {\n ...dynamicGroup,\n options: [],\n }\n } else {\n groupsWithOptions = groupsWithOptions.filter((group) => group.key !== dynamicGroup.key)\n }\n\n // 2. Add options to group options array and add to sanitized.slashMenu.groupsWithOptions\n if (group?.options?.length) {\n group.options = group.options.concat(group.options)\n }\n groupsWithOptions.push(group)\n }\n }\n\n return groupsWithOptions\n }, [getDynamicOptions, queryString, editorConfig?.features, i18n])\n\n const onSelectOption = useCallback(\n (\n selectedOption: SlashMenuOption,\n nodeToRemove: TextNode | null,\n closeMenu: () => void,\n matchingString: string,\n ) => {\n editor.update(() => {\n if (nodeToRemove) {\n nodeToRemove.remove()\n }\n selectedOption.onSelect({ editor, queryString: matchingString })\n closeMenu()\n })\n },\n [editor],\n )\n\n return (\n <React.Fragment>\n <LexicalTypeaheadMenuPlugin\n anchorElem={anchorElem}\n groupsWithOptions={groups}\n menuRenderFn={(\n anchorElementRef,\n { selectOptionAndCleanUp, selectedOptionKey, setSelectedOptionKey },\n ) =>\n anchorElementRef.current && groups.length\n ? ReactDOM.createPortal(\n <div className={baseClass}>\n {groups.map((group) => {\n let groupTitle = group.key\n if (group.displayName) {\n groupTitle =\n typeof group.displayName === 'function'\n ? group.displayName({ i18n })\n : group.displayName\n }\n\n return (\n <div\n className={`${baseClass}__group ${baseClass}__group-${group.key}`}\n key={group.key}\n >\n <div className={`${baseClass}__group-title`}>{groupTitle}</div>\n {group.options.map((option, oi: number) => (\n <SlashMenuItem\n index={oi}\n isSelected={selectedOptionKey === option.key}\n key={option.key}\n onClick={() => {\n setSelectedOptionKey(option.key)\n selectOptionAndCleanUp(option)\n }}\n onMouseEnter={() => {\n setSelectedOptionKey(option.key)\n }}\n option={option}\n />\n ))}\n </div>\n )\n })}\n </div>,\n anchorElementRef.current,\n )\n : null\n }\n onQueryChange={setQueryString}\n onSelectOption={onSelectOption}\n triggerFn={checkForTriggerMatch}\n />\n </React.Fragment>\n )\n}\n"],"names":["lexicalComposerContextImport","useLexicalComposerContext","useTranslation","useCallback","useMemo","useState","React","ReactDOM","useEditorConfigContext","LexicalTypeaheadMenuPlugin","useMenuTriggerMatch","baseClass","SlashMenuItem","isSelected","onClick","onMouseEnter","option","i18n","className","key","title","displayName","length","substring","button","aria-selected","id","ref","setRefElement","role","tabIndex","type","Icon","span","SlashMenuPlugin","anchorElem","document","body","editor","queryString","setQueryString","editorConfig","checkForTriggerMatch","minLength","getDynamicOptions","groupWithOptions","dynamicOption","features","slashMenu","dynamicOptions","dynamicGroupWithOptions","concat","groups","groupsWithOptions","groupWithOption","push","map","group","filteredOptions","options","filter","optionTitle","RegExp","exec","keywords","some","keyword","dynamicOptionGroups","dynamicGroup","find","onSelectOption","selectedOption","nodeToRemove","closeMenu","matchingString","update","remove","onSelect","Fragment","menuRenderFn","anchorElementRef","selectOptionAndCleanUp","selectedOptionKey","setSelectedOptionKey","current","createPortal","div","groupTitle","oi","index","onQueryChange","triggerFn"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA;AAGA,OAAOA,kCAAkC,2CAA0C;AACnF,MAAM,EAAEC,yBAAyB,EAAE,GAAGD;AAEtC,SAASE,cAAc,QAAQ,uCAAsC;AACrE,SAASC,WAAW,EAAEC,OAAO,EAAEC,QAAQ,QAAQ,QAAO;AACtD,YAAYC,WAAW,QAAO;AAC9B,YAAYC,cAAc,YAAW;AAIrC,SAASC,sBAAsB,QAAQ,8CAA6C;AACpF,SAASC,0BAA0B,QAAQ,wCAAuC;AAClF,OAAO,eAAc;AACrB,SAASC,mBAAmB,QAAQ,2BAA0B;AAE9D,MAAMC,YAAY;AAElB,SAASC,cAAc,EACrBC,UAAU,EACVC,OAAO,EACPC,YAAY,EACZC,MAAM,EAOP;IACC,MAAM,EAAEC,IAAI,EAAE,GAAGf;IAEjB,IAAIgB,YAAY,CAAC,EAAEP,UAAU,OAAO,EAAEA,UAAU,OAAO,EAAEK,OAAOG,GAAG,CAAC,CAAC;IACrE,IAAIN,YAAY;QACdK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O,CAACH,GAAG,CAAC,CAACxC,QAAQwE,mBAC1B,oBAAC5E;wBACC6E,OAAOD;wBACP3E,YAAYqE,sBAAsBlE,OAAOG,GAAG;wBAC5CA,KAAKH,OAAOG,GAAG;wBACfL,SAAS;4BACPqE,qBAAqBnE,OAAOG,GAAG;4BAC/B8D,uBAAuBjE;wBACzB;wBACAD,cAAc;4BACZoE,qBAAqBnE,OAAOG,GAAG;wBACjC;wBACAH,QAAQA;;YAKlB,KAEFgE,iBAAiBI,OAAO,IAE1B;QAENM,eAAelD;QACf8B,gBAAgBA;QAChBqB,WAAWjD;;AAInB"}
|
|
1
|
+
{"version":3,"sources":["../../../../../src/field/lexical/plugins/SlashMenu/index.tsx"],"sourcesContent":["'use client'\nimport type { TextNode } from 'lexical'\n\nimport { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext.js'\nimport { useTranslation } from '@payloadcms/ui/client'\nimport { useCallback, useMemo, useState } from 'react'\nimport * as React from 'react'\nimport * as ReactDOM from 'react-dom'\n\nimport type {\n SlashMenuGroup,\n SlashMenuGroupInternal,\n SlashMenuItemInternal,\n SlashMenuItem as SlashMenuItemType,\n} from './LexicalTypeaheadMenuPlugin/types.js'\n\nimport { useEditorConfigContext } from '../../config/client/EditorConfigProvider.js'\nimport { LexicalTypeaheadMenuPlugin } from './LexicalTypeaheadMenuPlugin/index.js'\nimport './index.scss'\nimport { useMenuTriggerMatch } from './useMenuTriggerMatch.js'\n\nconst baseClass = 'slash-menu-popup'\n\nfunction SlashMenuItem({\n isSelected,\n item,\n onClick,\n onMouseEnter,\n}: {\n index: number\n isSelected: boolean\n item: SlashMenuItemInternal\n onClick: () => void\n onMouseEnter: () => void\n}) {\n const { i18n } = useTranslation()\n\n let className = `${baseClass}__item ${baseClass}__item-${item.key}`\n if (isSelected) {\n className += ` ${baseClass}__item--selected`\n }\n\n let title = item.key\n if (item.label) {\n title = typeof item.label === 'function' ? item.label({ i18n }) : item.label\n }\n // Crop title to max. 25 characters\n if (title.length > 25) {\n title = title.substring(0, 25) + '...'\n }\n\n return (\n <button\n aria-selected={isSelected}\n className={className}\n id={baseClass + '__item-' + item.key}\n key={item.key}\n onClick={onClick}\n onMouseEnter={onMouseEnter}\n ref={item.ref}\n role=\"option\"\n tabIndex={-1}\n type=\"button\"\n >\n {item?.Icon && <item.Icon />}\n\n <span className={`${baseClass}__item-text`}>{title}</span>\n </button>\n )\n}\n\nexport function SlashMenuPlugin({\n anchorElem = document.body,\n}: {\n anchorElem?: HTMLElement\n}): React.ReactElement {\n const [editor] = useLexicalComposerContext()\n const [queryString, setQueryString] = useState<null | string>(null)\n const { editorConfig } = useEditorConfigContext()\n const { i18n } = useTranslation()\n\n const checkForTriggerMatch = useMenuTriggerMatch('/', {\n minLength: 0,\n })\n\n const getDynamicItems = useCallback(() => {\n let groupWithItems: Array<SlashMenuGroup> = []\n\n for (const dynamicItem of editorConfig.features.slashMenu.dynamicGroups) {\n const dynamicGroupWithItems = dynamicItem({\n editor,\n queryString,\n })\n groupWithItems = groupWithItems.concat(dynamicGroupWithItems)\n }\n\n return groupWithItems\n }, [editor, queryString, editorConfig?.features])\n\n const groups: SlashMenuGroup[] = useMemo(() => {\n let groupsWithItems: SlashMenuGroup[] = []\n for (const groupWithItem of editorConfig?.features.slashMenu.groups ?? []) {\n groupsWithItems.push(groupWithItem)\n }\n\n if (queryString) {\n // Filter current groups first\n groupsWithItems = groupsWithItems.map((group) => {\n const filteredItems = group.items.filter((item) => {\n let itemTitle = item.key\n if (item.label) {\n itemTitle = typeof item.label === 'function' ? item.label({ i18n }) : item.label\n }\n\n if (new RegExp(queryString, 'gi').exec(itemTitle)) {\n return true\n }\n if (item.keywords != null) {\n return item.keywords.some((keyword) => new RegExp(queryString, 'gi').exec(keyword))\n }\n return false\n })\n if (filteredItems.length) {\n return {\n ...group,\n items: filteredItems,\n }\n }\n return null\n })\n\n groupsWithItems = groupsWithItems.filter((group) => group != null)\n\n // Now add dynamic groups\n const dynamicItemGroups = getDynamicItems()\n\n // merge dynamic items into groups\n for (const dynamicGroup of dynamicItemGroups) {\n // 1. find the group with the same name or create new one\n let group = groupsWithItems.find((group) => group.key === dynamicGroup.key)\n if (!group) {\n group = {\n ...dynamicGroup,\n items: [],\n }\n } else {\n groupsWithItems = groupsWithItems.filter((group) => group.key !== dynamicGroup.key)\n }\n\n // 2. Add items to group items array and add to sanitized.slashMenu.groupsWithItems\n if (group?.items?.length) {\n group.items = group.items.concat(group.items)\n }\n groupsWithItems.push(group)\n }\n }\n\n return groupsWithItems\n }, [getDynamicItems, queryString, editorConfig?.features, i18n])\n\n const onSelectItem = useCallback(\n (\n selectedItem: SlashMenuItemType,\n nodeToRemove: TextNode | null,\n closeMenu: () => void,\n matchingString: string,\n ) => {\n if (nodeToRemove) {\n editor.update(() => {\n nodeToRemove.remove()\n })\n }\n selectedItem.onSelect({ editor, queryString: matchingString })\n\n closeMenu()\n },\n [editor],\n )\n\n return (\n <React.Fragment>\n <LexicalTypeaheadMenuPlugin\n anchorElem={anchorElem}\n groups={groups as SlashMenuGroupInternal[]}\n menuRenderFn={(\n anchorElementRef,\n { selectItemAndCleanUp, selectedItemKey, setSelectedItemKey },\n ) =>\n anchorElementRef.current && groups.length\n ? ReactDOM.createPortal(\n <div className={baseClass}>\n {groups.map((group) => {\n let groupTitle = group.key\n if (group.label) {\n groupTitle =\n typeof group.label === 'function' ? group.label({ i18n }) : group.label\n }\n\n return (\n <div\n className={`${baseClass}__group ${baseClass}__group-${group.key}`}\n key={group.key}\n >\n <div className={`${baseClass}__group-title`}>{groupTitle}</div>\n {group.items.map((item, oi: number) => (\n <SlashMenuItem\n index={oi}\n isSelected={selectedItemKey === item.key}\n item={item as SlashMenuItemInternal}\n key={item.key}\n onClick={() => {\n setSelectedItemKey(item.key)\n selectItemAndCleanUp(item)\n }}\n onMouseEnter={() => {\n setSelectedItemKey(item.key)\n }}\n />\n ))}\n </div>\n )\n })}\n </div>,\n anchorElementRef.current,\n )\n : null\n }\n onQueryChange={setQueryString}\n onSelectItem={onSelectItem}\n triggerFn={checkForTriggerMatch}\n />\n </React.Fragment>\n )\n}\n"],"names":["useLexicalComposerContext","useTranslation","useCallback","useMemo","useState","React","ReactDOM","useEditorConfigContext","LexicalTypeaheadMenuPlugin","useMenuTriggerMatch","baseClass","SlashMenuItem","isSelected","item","onClick","onMouseEnter","i18n","className","key","title","label","length","substring","button","aria-selected","id","ref","role","tabIndex","type","Icon","span","SlashMenuPlugin","anchorElem","document","body","editor","queryString","setQueryString","editorConfig","checkForTriggerMatch","minLength","getDynamicItems","groupWithItems","dynamicItem","features","slashMenu","dynamicGroups","dynamicGroupWithItems","concat","groups","groupsWithItems","groupWithItem","push","map","group","filteredItems","items","filter","itemTitle","RegExp","exec","keywords","some","keyword","dynamicItemGroups","dynamicGroup","find","onSelectItem","selectedItem","nodeToRemove","closeMenu","matchingString","update","remove","onSelect","Fragment","menuRenderFn","anchorElementRef","selectItemAndCleanUp","selectedItemKey","setSelectedItemKey","current","createPortal","div","groupTitle","oi","index","onQueryChange","triggerFn"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA;;AAGA,SAASA,yBAAyB,QAAQ,2CAA0C;AACpF,SAASC,cAAc,QAAQ,wBAAuB;AACtD,SAASC,WAAW,EAAEC,OAAO,EAAEC,QAAQ,QAAQ,QAAO;AACtD,YAAYC,WAAW,QAAO;AAC9B,YAAYC,cAAc,YAAW;AASrC,SAASC,sBAAsB,QAAQ,8CAA6C;AACpF,SAASC,0BAA0B,QAAQ,wCAAuC;AAElF,SAASC,mBAAmB,QAAQ,2BAA0B;AAE9D,MAAMC,YAAY;AAElB,SAASC,cAAc,EACrBC,UAAU,EACVC,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4BACCnE,WAAW,CAAC,EAAEP,UAAU,QAAQ,EAAEA,UAAU,QAAQ,EAAE6C,MAAMrC,GAAG,CAAC,CAAC;;8CAGjE,KAACkE;oCAAInE,WAAW,CAAC,EAAEP,UAAU,aAAa,CAAC;8CAAG2E;;gCAC7C9B,MAAME,KAAK,CAACH,GAAG,CAAC,CAACzC,MAAMyE,mBACtB,KAAC3E;wCACC4E,OAAOD;wCACP1E,YAAYoE,oBAAoBnE,KAAKK,GAAG;wCACxCL,MAAMA;wCAENC,SAAS;4CACPmE,mBAAmBpE,KAAKK,GAAG;4CAC3B6D,qBAAqBlE;wCACvB;wCACAE,cAAc;4CACZkE,mBAAmBpE,KAAKK,GAAG;wCAC7B;uCAPKL,KAAKK,GAAG;;2BARZqC,MAAMrC,GAAG;oBAoBpB;oBAEF4D,iBAAiBI,OAAO,IAE1B;YAENM,eAAelD;YACf8B,cAAcA;YACdqB,WAAWjD;;;AAInB"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
import * as React from 'react';
|
|
2
2
|
import './index.scss';
|
|
3
3
|
export declare function AddBlockHandlePlugin({ anchorElem, }: {
|
|
4
4
|
anchorElem?: HTMLElement;
|
|
5
|
-
}):
|
|
5
|
+
}): React.ReactElement;
|
|
6
6
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/field/lexical/plugins/handles/AddBlockHandlePlugin/index.tsx"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/field/lexical/plugins/handles/AddBlockHandlePlugin/index.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAa9B,OAAO,cAAc,CAAA;AAwLrB,wBAAgB,oBAAoB,CAAC,EACnC,UAA0B,GAC3B,EAAE;IACD,UAAU,CAAC,EAAE,WAAW,CAAA;CACzB,GAAG,KAAK,CAAC,YAAY,CAGrB"}
|