@payloadcms/richtext-lexical 0.7.0 → 3.0.0-alpha.19
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 -3
- package/components.d.ts +1 -1
- package/components.js +6 -33
- package/dist/cell/index.d.ts +4 -4
- package/dist/cell/index.d.ts.map +1 -1
- package/dist/cell/index.js +98 -79
- package/dist/exports/components.d.ts +1 -1
- package/dist/exports/components.d.ts.map +1 -1
- package/dist/exports/components.js +6 -33
- package/dist/field/Field.d.ts +8 -3
- package/dist/field/Field.d.ts.map +1 -1
- package/dist/field/Field.js +26 -98
- package/dist/field/features/align/feature.client.d.ts +3 -0
- package/dist/field/features/align/feature.client.d.ts.map +1 -0
- package/dist/field/features/align/feature.client.js +71 -0
- package/dist/field/features/align/feature.server.d.ts +3 -0
- package/dist/field/features/align/feature.server.d.ts.map +1 -0
- package/dist/field/features/align/feature.server.js +16 -0
- package/dist/field/features/align/floatingSelectToolbarAlignDropdownSection.d.ts.map +1 -1
- package/dist/field/features/align/floatingSelectToolbarAlignDropdownSection.js +6 -57
- package/dist/field/features/blockquote/feature.client.d.ts +3 -0
- package/dist/field/features/blockquote/feature.client.d.ts.map +1 -0
- package/dist/field/features/blockquote/feature.client.js +67 -0
- package/dist/field/features/blockquote/feature.server.d.ts +3 -0
- package/dist/field/features/blockquote/feature.server.d.ts.map +1 -0
- package/dist/field/features/blockquote/feature.server.js +46 -0
- package/dist/field/features/blockquote/markdownTransformer.d.ts.map +1 -0
- package/dist/field/features/blockquote/markdownTransformer.js +40 -0
- package/dist/field/features/blocks/component/BlockContent.d.ts +25 -0
- package/dist/field/features/blocks/component/BlockContent.d.ts.map +1 -0
- package/dist/field/features/blocks/component/BlockContent.js +163 -0
- package/dist/field/features/blocks/component/FormSavePlugin.d.ts +12 -0
- package/dist/field/features/blocks/component/FormSavePlugin.d.ts.map +1 -0
- package/dist/field/features/blocks/component/FormSavePlugin.js +24 -0
- package/dist/field/features/blocks/component/index.d.ts +16 -0
- package/dist/field/features/blocks/component/index.d.ts.map +1 -0
- package/dist/field/features/blocks/component/index.js +121 -0
- package/dist/field/features/blocks/component/index.scss +153 -0
- package/dist/field/features/blocks/drawer/index.d.ts.map +1 -0
- package/dist/field/features/blocks/drawer/index.js +78 -0
- package/dist/field/features/blocks/feature.client.d.ts +7 -0
- package/dist/field/features/blocks/feature.client.d.ts.map +1 -0
- package/dist/field/features/blocks/feature.client.js +61 -0
- package/dist/field/features/blocks/feature.server.d.ts +8 -0
- package/dist/field/features/blocks/feature.server.d.ts.map +1 -0
- package/dist/field/features/blocks/feature.server.js +86 -0
- package/dist/field/features/blocks/nodes/BlocksNode.d.ts.map +1 -0
- package/dist/field/features/blocks/nodes/BlocksNode.js +91 -0
- package/dist/field/features/blocks/plugin/commands.d.ts.map +1 -0
- package/dist/field/features/blocks/plugin/commands.js +4 -0
- package/dist/field/features/blocks/plugin/index.d.ts +5 -0
- package/dist/field/features/blocks/plugin/index.d.ts.map +1 -0
- package/dist/field/features/blocks/plugin/index.js +40 -0
- package/dist/field/features/blocks/populationPromise.d.ts +5 -0
- package/dist/field/features/blocks/populationPromise.d.ts.map +1 -0
- package/dist/field/features/blocks/populationPromise.js +45 -0
- package/dist/field/features/blocks/validate.d.ts +5 -0
- package/dist/field/features/blocks/validate.d.ts.map +1 -0
- package/dist/field/features/blocks/validate.js +49 -0
- package/dist/field/features/common/floatingSelectToolbarFeaturesButtonsSection/index.js +4 -14
- package/dist/field/features/common/floatingSelectToolbarTextDropdownSection/index.d.ts.map +1 -1
- package/dist/field/features/common/floatingSelectToolbarTextDropdownSection/index.js +6 -57
- package/dist/field/features/converters/html/converter/converters/linebreak.js +2 -12
- package/dist/field/features/converters/html/converter/converters/paragraph.d.ts.map +1 -1
- package/dist/field/features/converters/html/converter/converters/paragraph.js +7 -16
- package/dist/field/features/converters/html/converter/converters/text.js +10 -20
- package/dist/field/features/converters/html/converter/defaultConverters.js +8 -18
- package/dist/field/features/converters/html/converter/index.d.ts +11 -2
- package/dist/field/features/converters/html/converter/index.d.ts.map +1 -1
- package/dist/field/features/converters/html/converter/index.js +9 -24
- package/dist/field/features/converters/html/converter/types.d.ts +6 -1
- package/dist/field/features/converters/html/converter/types.d.ts.map +1 -1
- package/dist/field/features/converters/html/converter/types.js +2 -5
- package/dist/field/features/converters/html/feature.server.d.ts +9 -0
- package/dist/field/features/converters/html/feature.server.d.ts.map +1 -0
- package/dist/field/features/converters/html/feature.server.js +14 -0
- package/dist/field/features/converters/html/field/index.d.ts +2 -2
- package/dist/field/features/converters/html/field/index.d.ts.map +1 -1
- package/dist/field/features/converters/html/field/index.js +18 -31
- package/dist/field/features/createClientComponent.d.ts +7 -0
- package/dist/field/features/createClientComponent.d.ts.map +1 -0
- package/dist/field/features/createClientComponent.js +12 -0
- package/dist/field/features/createFeaturePropComponent.d.ts +6 -0
- package/dist/field/features/createFeaturePropComponent.d.ts.map +1 -0
- package/dist/field/features/createFeaturePropComponent.js +14 -0
- package/dist/field/features/debug/testrecorder/feature.client.d.ts +3 -0
- package/dist/field/features/debug/testrecorder/feature.client.d.ts.map +1 -0
- package/dist/field/features/debug/testrecorder/feature.client.js +20 -0
- package/dist/field/features/debug/testrecorder/feature.server.d.ts +3 -0
- package/dist/field/features/debug/testrecorder/feature.server.d.ts.map +1 -0
- package/dist/field/features/debug/testrecorder/feature.server.js +15 -0
- package/dist/field/features/debug/testrecorder/plugin/index.d.ts.map +1 -0
- package/dist/field/features/debug/testrecorder/plugin/index.js +446 -0
- package/dist/field/features/debug/testrecorder/plugin/index.scss +49 -0
- package/dist/field/features/debug/treeview/feature.client.d.ts +3 -0
- package/dist/field/features/debug/treeview/feature.client.d.ts.map +1 -0
- package/dist/field/features/debug/treeview/feature.client.js +20 -0
- package/dist/field/features/debug/treeview/feature.server.d.ts +3 -0
- package/dist/field/features/debug/treeview/feature.server.d.ts.map +1 -0
- package/dist/field/features/debug/treeview/feature.server.js +15 -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/plugin/index.js +19 -0
- package/dist/field/features/format/bold/feature.client.d.ts +3 -0
- package/dist/field/features/format/bold/feature.client.d.ts.map +1 -0
- package/dist/field/features/format/bold/feature.client.js +47 -0
- package/dist/field/features/format/bold/feature.server.d.ts +3 -0
- package/dist/field/features/format/bold/feature.server.d.ts.map +1 -0
- package/dist/field/features/format/bold/feature.server.js +27 -0
- package/dist/field/features/format/bold/markdownTransformers.d.ts.map +1 -0
- package/dist/field/features/format/bold/markdownTransformers.js +34 -0
- package/dist/field/features/format/common/floatingSelectToolbarSection.js +4 -14
- package/dist/field/features/format/inlinecode/feature.client.d.ts +3 -0
- package/dist/field/features/format/inlinecode/feature.client.d.ts.map +1 -0
- package/dist/field/features/format/inlinecode/feature.client.js +42 -0
- package/dist/field/features/format/inlinecode/feature.server.d.ts +3 -0
- package/dist/field/features/format/inlinecode/feature.server.d.ts.map +1 -0
- package/dist/field/features/format/inlinecode/feature.server.js +19 -0
- package/dist/field/features/format/inlinecode/markdownTransformers.d.ts.map +1 -0
- package/dist/field/features/format/inlinecode/markdownTransformers.js +9 -0
- package/dist/field/features/format/italic/feature.client.d.ts +3 -0
- package/dist/field/features/format/italic/feature.client.d.ts.map +1 -0
- package/dist/field/features/format/italic/feature.client.js +43 -0
- package/dist/field/features/format/italic/feature.server.d.ts +3 -0
- package/dist/field/features/format/italic/feature.server.d.ts.map +1 -0
- package/dist/field/features/format/italic/feature.server.js +20 -0
- package/dist/field/features/format/italic/markdownTransformers.d.ts.map +1 -0
- package/dist/field/features/format/italic/markdownTransformers.js +17 -0
- package/dist/field/features/format/strikethrough/feature.client.d.ts +3 -0
- package/dist/field/features/format/strikethrough/feature.client.d.ts.map +1 -0
- package/dist/field/features/format/strikethrough/feature.client.js +42 -0
- package/dist/field/features/format/strikethrough/feature.server.d.ts +3 -0
- package/dist/field/features/format/strikethrough/feature.server.d.ts.map +1 -0
- package/dist/field/features/format/strikethrough/feature.server.js +19 -0
- package/dist/field/features/format/strikethrough/markdownTransformers.js +4 -14
- package/dist/field/features/format/subscript/feature.client.d.ts +3 -0
- package/dist/field/features/format/subscript/feature.client.d.ts.map +1 -0
- package/dist/field/features/format/subscript/feature.client.js +38 -0
- package/dist/field/features/format/subscript/feature.server.d.ts +3 -0
- package/dist/field/features/format/subscript/feature.server.d.ts.map +1 -0
- package/dist/field/features/format/subscript/feature.server.js +15 -0
- package/dist/field/features/format/superscript/feature.client.d.ts +3 -0
- package/dist/field/features/format/superscript/feature.client.d.ts.map +1 -0
- package/dist/field/features/format/superscript/feature.client.js +38 -0
- package/dist/field/features/format/superscript/feature.server.d.ts +3 -0
- package/dist/field/features/format/superscript/feature.server.d.ts.map +1 -0
- package/dist/field/features/format/superscript/feature.server.js +15 -0
- package/dist/field/features/format/underline/feature.client.d.ts +3 -0
- package/dist/field/features/format/underline/feature.client.d.ts.map +1 -0
- package/dist/field/features/format/underline/feature.client.js +38 -0
- package/dist/field/features/format/underline/feature.server.d.ts +3 -0
- package/dist/field/features/format/underline/feature.server.d.ts.map +1 -0
- package/dist/field/features/format/underline/feature.server.js +15 -0
- package/dist/field/features/heading/feature.client.d.ts +4 -0
- package/dist/field/features/heading/feature.client.d.ts.map +1 -0
- package/dist/field/features/heading/feature.client.js +95 -0
- package/dist/field/features/heading/feature.server.d.ts +7 -0
- package/dist/field/features/heading/feature.server.d.ts.map +1 -0
- package/dist/field/features/heading/feature.server.js +57 -0
- package/dist/field/features/heading/markdownTransformer.d.ts.map +1 -0
- package/dist/field/features/heading/markdownTransformer.js +29 -0
- package/dist/field/features/indent/feature.client.d.ts +3 -0
- package/dist/field/features/indent/feature.client.d.ts.map +1 -0
- package/dist/field/features/indent/feature.client.js +57 -0
- package/dist/field/features/indent/feature.server.d.ts +3 -0
- package/dist/field/features/indent/feature.server.d.ts.map +1 -0
- package/dist/field/features/indent/feature.server.js +16 -0
- package/dist/field/features/indent/floatingSelectToolbarIndentSection.js +4 -14
- package/dist/field/features/link/drawer/baseFields.d.ts.map +1 -0
- package/dist/field/features/link/drawer/baseFields.js +118 -0
- package/dist/field/features/link/drawer/index.d.ts.map +1 -0
- package/dist/field/features/link/drawer/index.js +83 -0
- package/dist/field/features/link/drawer/index.scss +50 -0
- package/dist/field/features/link/drawer/types.d.ts +8 -0
- package/dist/field/features/link/drawer/types.d.ts.map +1 -0
- package/dist/field/features/link/drawer/types.js +3 -0
- package/dist/field/features/link/feature.client.d.ts +5 -0
- package/dist/field/features/link/feature.client.d.ts.map +1 -0
- package/dist/field/features/link/feature.client.js +88 -0
- package/dist/field/features/link/feature.server.d.ts +33 -0
- package/dist/field/features/link/feature.server.d.ts.map +1 -0
- package/dist/field/features/link/feature.server.js +98 -0
- package/dist/field/features/link/nodes/AutoLinkNode.d.ts +16 -0
- package/dist/field/features/link/nodes/AutoLinkNode.d.ts.map +1 -0
- package/dist/field/features/link/nodes/AutoLinkNode.js +60 -0
- package/dist/field/features/link/nodes/LinkNode.d.ts +35 -0
- package/dist/field/features/link/nodes/LinkNode.d.ts.map +1 -0
- package/dist/field/features/link/nodes/LinkNode.js +299 -0
- package/dist/field/features/link/nodes/types.d.ts +19 -0
- package/dist/field/features/link/nodes/types.d.ts.map +1 -0
- package/dist/field/features/link/nodes/types.js +3 -0
- package/dist/field/features/link/plugins/autoLink/index.d.ts +19 -0
- package/dist/field/features/link/plugins/autoLink/index.d.ts.map +1 -0
- package/dist/field/features/link/plugins/autoLink/index.js +318 -0
- package/dist/field/features/link/plugins/clickableLink/index.d.ts.map +1 -0
- package/dist/field/features/link/plugins/clickableLink/index.js +8 -0
- package/dist/field/features/link/plugins/floatingLinkEditor/LinkEditor/commands.d.ts.map +1 -0
- package/dist/field/features/link/plugins/floatingLinkEditor/LinkEditor/commands.js +4 -0
- package/dist/field/features/link/plugins/floatingLinkEditor/LinkEditor/index.d.ts +5 -0
- package/dist/field/features/link/plugins/floatingLinkEditor/LinkEditor/index.d.ts.map +1 -0
- package/dist/field/features/link/plugins/floatingLinkEditor/LinkEditor/index.js +243 -0
- package/dist/field/features/link/plugins/floatingLinkEditor/index.d.ts +6 -0
- package/dist/field/features/link/plugins/floatingLinkEditor/index.d.ts.map +1 -0
- package/dist/field/features/link/plugins/floatingLinkEditor/index.js +13 -0
- package/dist/field/features/link/plugins/floatingLinkEditor/index.scss +78 -0
- package/dist/field/features/link/plugins/floatingLinkEditor/types.d.ts +13 -0
- package/dist/field/features/link/plugins/floatingLinkEditor/types.d.ts.map +1 -0
- package/dist/field/features/link/plugins/floatingLinkEditor/types.js +6 -0
- package/dist/field/features/link/plugins/floatingLinkEditor/utilities.d.ts +12 -0
- package/dist/field/features/link/plugins/floatingLinkEditor/utilities.d.ts.map +1 -0
- package/dist/field/features/link/plugins/floatingLinkEditor/utilities.js +37 -0
- package/dist/field/features/link/plugins/link/index.d.ts.map +1 -0
- package/dist/field/features/link/plugins/link/index.js +59 -0
- package/dist/field/features/link/populationPromise.d.ts +5 -0
- package/dist/field/features/link/populationPromise.d.ts.map +1 -0
- package/dist/field/features/link/populationPromise.js +46 -0
- package/dist/field/features/lists/checklist/feature.client.d.ts +3 -0
- package/dist/field/features/lists/checklist/feature.client.d.ts.map +1 -0
- package/dist/field/features/lists/checklist/feature.client.js +81 -0
- package/dist/field/features/lists/checklist/feature.server.d.ts +3 -0
- package/dist/field/features/lists/checklist/feature.server.d.ts.map +1 -0
- package/dist/field/features/lists/checklist/feature.server.js +35 -0
- package/dist/field/features/lists/checklist/markdownTransformers.d.ts.map +1 -0
- package/dist/field/features/lists/checklist/markdownTransformers.js +16 -0
- package/dist/field/features/lists/checklist/plugin/index.d.ts.map +1 -0
- package/dist/field/features/lists/checklist/plugin/index.js +8 -0
- package/dist/field/features/lists/common/markdown.js +10 -28
- package/dist/field/features/lists/htmlConverter.d.ts.map +1 -1
- package/dist/field/features/lists/htmlConverter.js +15 -31
- package/dist/field/features/lists/orderedlist/feature.client.d.ts +3 -0
- package/dist/field/features/lists/orderedlist/feature.client.d.ts.map +1 -0
- package/dist/field/features/lists/orderedlist/feature.client.js +71 -0
- package/dist/field/features/lists/orderedlist/feature.server.d.ts +3 -0
- package/dist/field/features/lists/orderedlist/feature.server.d.ts.map +1 -0
- package/dist/field/features/lists/orderedlist/feature.server.js +35 -0
- package/dist/field/features/lists/orderedlist/markdownTransformer.d.ts.map +1 -0
- package/dist/field/features/lists/orderedlist/markdownTransformer.js +16 -0
- package/dist/field/features/lists/plugin/index.js +5 -20
- package/dist/field/features/lists/unorderedlist/feature.client.d.ts +3 -0
- package/dist/field/features/lists/unorderedlist/feature.client.d.ts.map +1 -0
- package/dist/field/features/lists/unorderedlist/feature.client.js +71 -0
- package/dist/field/features/lists/unorderedlist/feature.server.d.ts +3 -0
- package/dist/field/features/lists/unorderedlist/feature.server.d.ts.map +1 -0
- package/dist/field/features/lists/unorderedlist/feature.server.js +35 -0
- package/dist/field/features/lists/unorderedlist/markdownTransformer.d.ts.map +1 -0
- package/dist/field/features/lists/unorderedlist/markdownTransformer.js +16 -0
- package/dist/field/features/migrations/lexicalPluginToLexical/converter/converters/heading/client.d.ts +6 -0
- package/dist/field/features/migrations/lexicalPluginToLexical/converter/converters/heading/client.d.ts.map +1 -0
- package/dist/field/features/migrations/lexicalPluginToLexical/converter/converters/heading/client.js +6 -0
- package/dist/field/features/migrations/lexicalPluginToLexical/converter/converters/heading/converter.d.ts +3 -0
- package/dist/field/features/migrations/lexicalPluginToLexical/converter/converters/heading/converter.d.ts.map +1 -0
- package/dist/field/features/migrations/lexicalPluginToLexical/converter/converters/heading/converter.js +20 -0
- package/dist/field/features/migrations/lexicalPluginToLexical/converter/converters/heading/index.d.ts +3 -0
- package/dist/field/features/migrations/lexicalPluginToLexical/converter/converters/heading/index.d.ts.map +1 -0
- package/dist/field/features/migrations/lexicalPluginToLexical/converter/converters/heading/index.js +8 -0
- package/dist/field/features/migrations/lexicalPluginToLexical/converter/converters/link/client.d.ts +6 -0
- package/dist/field/features/migrations/lexicalPluginToLexical/converter/converters/link/client.d.ts.map +1 -0
- package/dist/field/features/migrations/lexicalPluginToLexical/converter/converters/link/client.js +6 -0
- package/dist/field/features/migrations/lexicalPluginToLexical/converter/converters/link/converter.d.ts +3 -0
- package/dist/field/features/migrations/lexicalPluginToLexical/converter/converters/link/converter.d.ts.map +1 -0
- package/dist/field/features/migrations/lexicalPluginToLexical/converter/converters/link/converter.js +31 -0
- package/dist/field/features/migrations/lexicalPluginToLexical/converter/converters/link/index.d.ts +3 -0
- package/dist/field/features/migrations/lexicalPluginToLexical/converter/converters/link/index.d.ts.map +1 -0
- package/dist/field/features/migrations/lexicalPluginToLexical/converter/converters/link/index.js +8 -0
- package/dist/field/features/migrations/lexicalPluginToLexical/converter/converters/list/client.d.ts +6 -0
- package/dist/field/features/migrations/lexicalPluginToLexical/converter/converters/list/client.d.ts.map +1 -0
- package/dist/field/features/migrations/lexicalPluginToLexical/converter/converters/list/client.js +6 -0
- package/dist/field/features/migrations/lexicalPluginToLexical/converter/converters/list/converter.d.ts +3 -0
- package/dist/field/features/migrations/lexicalPluginToLexical/converter/converters/list/converter.d.ts.map +1 -0
- package/dist/field/features/migrations/lexicalPluginToLexical/converter/converters/list/converter.js +22 -0
- package/dist/field/features/migrations/lexicalPluginToLexical/converter/converters/list/index.d.ts +3 -0
- package/dist/field/features/migrations/lexicalPluginToLexical/converter/converters/list/index.d.ts.map +1 -0
- package/dist/field/features/migrations/lexicalPluginToLexical/converter/converters/list/index.js +8 -0
- package/dist/field/features/migrations/lexicalPluginToLexical/converter/converters/listItem/client.d.ts +6 -0
- package/dist/field/features/migrations/lexicalPluginToLexical/converter/converters/listItem/client.d.ts.map +1 -0
- package/dist/field/features/migrations/lexicalPluginToLexical/converter/converters/listItem/client.js +6 -0
- package/dist/field/features/migrations/lexicalPluginToLexical/converter/converters/listItem/converter.d.ts +3 -0
- package/dist/field/features/migrations/lexicalPluginToLexical/converter/converters/listItem/converter.d.ts.map +1 -0
- package/dist/field/features/migrations/lexicalPluginToLexical/converter/converters/listItem/converter.js +22 -0
- package/dist/field/features/migrations/lexicalPluginToLexical/converter/converters/listItem/index.d.ts +3 -0
- package/dist/field/features/migrations/lexicalPluginToLexical/converter/converters/listItem/index.d.ts.map +1 -0
- package/dist/field/features/migrations/lexicalPluginToLexical/converter/converters/listItem/index.js +8 -0
- package/dist/field/features/migrations/lexicalPluginToLexical/converter/converters/quote/client.d.ts +6 -0
- package/dist/field/features/migrations/lexicalPluginToLexical/converter/converters/quote/client.d.ts.map +1 -0
- package/dist/field/features/migrations/lexicalPluginToLexical/converter/converters/quote/client.js +6 -0
- package/dist/field/features/migrations/lexicalPluginToLexical/converter/converters/quote/converter.d.ts +3 -0
- package/dist/field/features/migrations/lexicalPluginToLexical/converter/converters/quote/converter.d.ts.map +1 -0
- package/dist/field/features/migrations/lexicalPluginToLexical/converter/converters/quote/converter.js +20 -0
- package/dist/field/features/migrations/lexicalPluginToLexical/converter/converters/quote/index.d.ts +3 -0
- package/dist/field/features/migrations/lexicalPluginToLexical/converter/converters/quote/index.d.ts.map +1 -0
- package/dist/field/features/migrations/lexicalPluginToLexical/converter/converters/quote/index.js +8 -0
- package/dist/field/features/migrations/lexicalPluginToLexical/converter/converters/unknown/client.d.ts +6 -0
- package/dist/field/features/migrations/lexicalPluginToLexical/converter/converters/unknown/client.d.ts.map +1 -0
- package/dist/field/features/migrations/lexicalPluginToLexical/converter/converters/unknown/client.js +6 -0
- package/dist/field/features/migrations/lexicalPluginToLexical/converter/converters/unknown/converter.d.ts +3 -0
- package/dist/field/features/migrations/lexicalPluginToLexical/converter/converters/unknown/converter.d.ts.map +1 -0
- package/dist/field/features/migrations/lexicalPluginToLexical/converter/converters/unknown/converter.js +26 -0
- package/dist/field/features/migrations/lexicalPluginToLexical/converter/converters/unknown/index.d.ts +3 -0
- package/dist/field/features/migrations/lexicalPluginToLexical/converter/converters/unknown/index.d.ts.map +1 -0
- package/dist/field/features/migrations/lexicalPluginToLexical/converter/converters/unknown/index.js +8 -0
- package/dist/field/features/migrations/lexicalPluginToLexical/converter/converters/upload/client.d.ts +6 -0
- package/dist/field/features/migrations/lexicalPluginToLexical/converter/converters/upload/client.d.ts.map +1 -0
- package/dist/field/features/migrations/lexicalPluginToLexical/converter/converters/upload/client.js +6 -0
- package/dist/field/features/migrations/lexicalPluginToLexical/converter/converters/upload/converter.d.ts +3 -0
- package/dist/field/features/migrations/lexicalPluginToLexical/converter/converters/upload/converter.d.ts.map +1 -0
- package/dist/field/features/migrations/lexicalPluginToLexical/converter/converters/upload/converter.js +25 -0
- package/dist/field/features/migrations/lexicalPluginToLexical/converter/converters/upload/index.d.ts +3 -0
- package/dist/field/features/migrations/lexicalPluginToLexical/converter/converters/upload/index.d.ts.map +1 -0
- package/dist/field/features/migrations/lexicalPluginToLexical/converter/converters/upload/index.js +8 -0
- package/dist/field/features/migrations/lexicalPluginToLexical/converter/defaultConverters.d.ts +3 -0
- package/dist/field/features/migrations/lexicalPluginToLexical/converter/defaultConverters.d.ts.map +1 -0
- package/dist/field/features/migrations/lexicalPluginToLexical/converter/defaultConverters.js +18 -0
- package/dist/field/features/migrations/lexicalPluginToLexical/converter/index.d.ts +17 -0
- package/dist/field/features/migrations/lexicalPluginToLexical/converter/index.d.ts.map +1 -0
- package/dist/field/features/migrations/lexicalPluginToLexical/converter/index.js +63 -0
- package/dist/field/features/migrations/lexicalPluginToLexical/converter/types.d.ts +31 -0
- package/dist/field/features/migrations/lexicalPluginToLexical/converter/types.d.ts.map +1 -0
- package/dist/field/features/migrations/lexicalPluginToLexical/converter/types.js +3 -0
- package/dist/field/features/migrations/lexicalPluginToLexical/feature.client.d.ts +3 -0
- package/dist/field/features/migrations/lexicalPluginToLexical/feature.client.d.ts.map +1 -0
- package/dist/field/features/migrations/lexicalPluginToLexical/feature.client.js +34 -0
- package/dist/field/features/migrations/lexicalPluginToLexical/feature.server.d.ts +9 -0
- package/dist/field/features/migrations/lexicalPluginToLexical/feature.server.d.ts.map +1 -0
- package/dist/field/features/migrations/lexicalPluginToLexical/feature.server.js +47 -0
- package/dist/field/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/Component.d.ts.map +1 -0
- package/dist/field/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/Component.js +8 -0
- package/dist/field/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/index.d.ts.map +1 -0
- package/dist/field/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/index.js +69 -0
- package/dist/field/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/index.scss +14 -0
- package/dist/field/features/migrations/slateToLexical/converter/converters/blockquote/client.d.ts +6 -0
- package/dist/field/features/migrations/slateToLexical/converter/converters/blockquote/client.d.ts.map +1 -0
- package/dist/field/features/migrations/slateToLexical/converter/converters/blockquote/client.js +6 -0
- package/dist/field/features/migrations/slateToLexical/converter/converters/blockquote/converter.d.ts +3 -0
- package/dist/field/features/migrations/slateToLexical/converter/converters/blockquote/converter.d.ts.map +1 -0
- package/dist/field/features/migrations/slateToLexical/converter/converters/blockquote/converter.js +23 -0
- package/dist/field/features/migrations/slateToLexical/converter/converters/blockquote/index.d.ts +3 -0
- package/dist/field/features/migrations/slateToLexical/converter/converters/blockquote/index.d.ts.map +1 -0
- package/dist/field/features/migrations/slateToLexical/converter/converters/blockquote/index.js +8 -0
- package/dist/field/features/migrations/slateToLexical/converter/converters/heading/client.d.ts +6 -0
- package/dist/field/features/migrations/slateToLexical/converter/converters/heading/client.d.ts.map +1 -0
- package/dist/field/features/migrations/slateToLexical/converter/converters/heading/client.js +6 -0
- package/dist/field/features/migrations/slateToLexical/converter/converters/heading/converter.d.ts +3 -0
- package/dist/field/features/migrations/slateToLexical/converter/converters/heading/converter.d.ts.map +1 -0
- package/dist/field/features/migrations/slateToLexical/converter/converters/heading/converter.js +29 -0
- package/dist/field/features/migrations/slateToLexical/converter/converters/heading/index.d.ts +3 -0
- package/dist/field/features/migrations/slateToLexical/converter/converters/heading/index.d.ts.map +1 -0
- package/dist/field/features/migrations/slateToLexical/converter/converters/heading/index.js +8 -0
- package/dist/field/features/migrations/slateToLexical/converter/converters/indent/client.d.ts +6 -0
- package/dist/field/features/migrations/slateToLexical/converter/converters/indent/client.d.ts.map +1 -0
- package/dist/field/features/migrations/slateToLexical/converter/converters/indent/client.js +6 -0
- package/dist/field/features/migrations/slateToLexical/converter/converters/indent/converter.d.ts +3 -0
- package/dist/field/features/migrations/slateToLexical/converter/converters/indent/converter.d.ts.map +1 -0
- package/dist/field/features/migrations/slateToLexical/converter/converters/indent/converter.js +35 -0
- package/dist/field/features/migrations/slateToLexical/converter/converters/indent/index.d.ts +3 -0
- package/dist/field/features/migrations/slateToLexical/converter/converters/indent/index.d.ts.map +1 -0
- package/dist/field/features/migrations/slateToLexical/converter/converters/indent/index.js +8 -0
- package/dist/field/features/migrations/slateToLexical/converter/converters/link/client.d.ts +6 -0
- package/dist/field/features/migrations/slateToLexical/converter/converters/link/client.d.ts.map +1 -0
- package/dist/field/features/migrations/slateToLexical/converter/converters/link/client.js +6 -0
- package/dist/field/features/migrations/slateToLexical/converter/converters/link/converter.d.ts +3 -0
- package/dist/field/features/migrations/slateToLexical/converter/converters/link/converter.d.ts.map +1 -0
- package/dist/field/features/migrations/slateToLexical/converter/converters/link/converter.js +30 -0
- package/dist/field/features/migrations/slateToLexical/converter/converters/link/index.d.ts +3 -0
- package/dist/field/features/migrations/slateToLexical/converter/converters/link/index.d.ts.map +1 -0
- package/dist/field/features/migrations/slateToLexical/converter/converters/link/index.js +8 -0
- package/dist/field/features/migrations/slateToLexical/converter/converters/listItem/client.d.ts +6 -0
- package/dist/field/features/migrations/slateToLexical/converter/converters/listItem/client.d.ts.map +1 -0
- package/dist/field/features/migrations/slateToLexical/converter/converters/listItem/client.js +6 -0
- package/dist/field/features/migrations/slateToLexical/converter/converters/listItem/converter.d.ts +3 -0
- package/dist/field/features/migrations/slateToLexical/converter/converters/listItem/converter.d.ts.map +1 -0
- package/dist/field/features/migrations/slateToLexical/converter/converters/listItem/converter.js +25 -0
- package/dist/field/features/migrations/slateToLexical/converter/converters/listItem/index.d.ts +3 -0
- package/dist/field/features/migrations/slateToLexical/converter/converters/listItem/index.d.ts.map +1 -0
- package/dist/field/features/migrations/slateToLexical/converter/converters/listItem/index.js +8 -0
- package/dist/field/features/migrations/slateToLexical/converter/converters/orderedList/client.d.ts +6 -0
- package/dist/field/features/migrations/slateToLexical/converter/converters/orderedList/client.d.ts.map +1 -0
- package/dist/field/features/migrations/slateToLexical/converter/converters/orderedList/client.js +6 -0
- package/dist/field/features/migrations/slateToLexical/converter/converters/orderedList/converter.d.ts +3 -0
- package/dist/field/features/migrations/slateToLexical/converter/converters/orderedList/converter.d.ts.map +1 -0
- package/dist/field/features/migrations/slateToLexical/converter/converters/orderedList/converter.js +26 -0
- package/dist/field/features/migrations/slateToLexical/converter/converters/orderedList/index.d.ts +3 -0
- package/dist/field/features/migrations/slateToLexical/converter/converters/orderedList/index.d.ts.map +1 -0
- package/dist/field/features/migrations/slateToLexical/converter/converters/orderedList/index.js +8 -0
- package/dist/field/features/migrations/slateToLexical/converter/converters/relationship/client.d.ts +6 -0
- package/dist/field/features/migrations/slateToLexical/converter/converters/relationship/client.d.ts.map +1 -0
- package/dist/field/features/migrations/slateToLexical/converter/converters/relationship/client.js +6 -0
- package/dist/field/features/migrations/slateToLexical/converter/converters/relationship/converter.d.ts +3 -0
- package/dist/field/features/migrations/slateToLexical/converter/converters/relationship/converter.d.ts.map +1 -0
- package/dist/field/features/migrations/slateToLexical/converter/converters/relationship/converter.js +18 -0
- package/dist/field/features/migrations/slateToLexical/converter/converters/relationship/index.d.ts +3 -0
- package/dist/field/features/migrations/slateToLexical/converter/converters/relationship/index.d.ts.map +1 -0
- package/dist/field/features/migrations/slateToLexical/converter/converters/relationship/index.js +8 -0
- package/dist/field/features/migrations/slateToLexical/converter/converters/unknown/client.d.ts +6 -0
- package/dist/field/features/migrations/slateToLexical/converter/converters/unknown/client.d.ts.map +1 -0
- package/dist/field/features/migrations/slateToLexical/converter/converters/unknown/client.js +6 -0
- package/dist/field/features/migrations/slateToLexical/converter/converters/unknown/converter.d.ts +3 -0
- package/dist/field/features/migrations/slateToLexical/converter/converters/unknown/converter.d.ts.map +1 -0
- package/dist/field/features/migrations/slateToLexical/converter/converters/unknown/converter.js +27 -0
- package/dist/field/features/migrations/slateToLexical/converter/converters/unknown/index.d.ts +3 -0
- package/dist/field/features/migrations/slateToLexical/converter/converters/unknown/index.d.ts.map +1 -0
- package/dist/field/features/migrations/slateToLexical/converter/converters/unknown/index.js +8 -0
- package/dist/field/features/migrations/slateToLexical/converter/converters/unorderedList/client.d.ts +6 -0
- package/dist/field/features/migrations/slateToLexical/converter/converters/unorderedList/client.d.ts.map +1 -0
- package/dist/field/features/migrations/slateToLexical/converter/converters/unorderedList/client.js +6 -0
- package/dist/field/features/migrations/slateToLexical/converter/converters/unorderedList/converter.d.ts +3 -0
- package/dist/field/features/migrations/slateToLexical/converter/converters/unorderedList/converter.d.ts.map +1 -0
- package/dist/field/features/migrations/slateToLexical/converter/converters/unorderedList/converter.js +26 -0
- package/dist/field/features/migrations/slateToLexical/converter/converters/unorderedList/index.d.ts +3 -0
- package/dist/field/features/migrations/slateToLexical/converter/converters/unorderedList/index.d.ts.map +1 -0
- package/dist/field/features/migrations/slateToLexical/converter/converters/unorderedList/index.js +8 -0
- package/dist/field/features/migrations/slateToLexical/converter/converters/upload/client.d.ts +6 -0
- package/dist/field/features/migrations/slateToLexical/converter/converters/upload/client.d.ts.map +1 -0
- package/dist/field/features/migrations/slateToLexical/converter/converters/upload/client.js +6 -0
- package/dist/field/features/migrations/slateToLexical/converter/converters/upload/converter.d.ts +3 -0
- package/dist/field/features/migrations/slateToLexical/converter/converters/upload/converter.d.ts.map +1 -0
- package/dist/field/features/migrations/slateToLexical/converter/converters/upload/converter.js +21 -0
- package/dist/field/features/migrations/slateToLexical/converter/converters/upload/index.d.ts +3 -0
- package/dist/field/features/migrations/slateToLexical/converter/converters/upload/index.d.ts.map +1 -0
- package/dist/field/features/migrations/slateToLexical/converter/converters/upload/index.js +8 -0
- package/dist/field/features/migrations/slateToLexical/converter/defaultConverters.d.ts +3 -0
- package/dist/field/features/migrations/slateToLexical/converter/defaultConverters.d.ts.map +1 -0
- package/dist/field/features/migrations/slateToLexical/converter/defaultConverters.js +24 -0
- package/dist/field/features/migrations/slateToLexical/converter/index.d.ts +19 -0
- package/dist/field/features/migrations/slateToLexical/converter/index.d.ts.map +1 -0
- package/dist/field/features/migrations/slateToLexical/converter/index.js +107 -0
- package/dist/field/features/migrations/slateToLexical/converter/types.d.ts +25 -0
- package/dist/field/features/migrations/slateToLexical/converter/types.d.ts.map +1 -0
- package/dist/field/features/migrations/slateToLexical/converter/types.js +3 -0
- package/dist/field/features/migrations/slateToLexical/feature.client.d.ts +3 -0
- package/dist/field/features/migrations/slateToLexical/feature.client.d.ts.map +1 -0
- package/dist/field/features/migrations/slateToLexical/feature.client.js +34 -0
- package/dist/field/features/migrations/slateToLexical/feature.server.d.ts +9 -0
- package/dist/field/features/migrations/slateToLexical/feature.server.d.ts.map +1 -0
- package/dist/field/features/migrations/slateToLexical/feature.server.js +47 -0
- package/dist/field/features/migrations/slateToLexical/nodes/unknownConvertedNode/Component.d.ts.map +1 -0
- package/dist/field/features/migrations/slateToLexical/nodes/unknownConvertedNode/Component.js +8 -0
- package/dist/field/features/migrations/slateToLexical/nodes/unknownConvertedNode/index.d.ts.map +1 -0
- package/dist/field/features/migrations/slateToLexical/nodes/unknownConvertedNode/index.js +69 -0
- package/dist/field/features/migrations/slateToLexical/nodes/unknownConvertedNode/index.scss +14 -0
- package/dist/field/features/paragraph/feature.client.d.ts +3 -0
- package/dist/field/features/paragraph/feature.client.d.ts.map +1 -0
- package/dist/field/features/paragraph/feature.client.js +63 -0
- package/dist/field/features/paragraph/feature.server.d.ts +3 -0
- package/dist/field/features/paragraph/feature.server.d.ts.map +1 -0
- package/dist/field/features/paragraph/feature.server.js +16 -0
- package/dist/field/features/relationship/drawer/commands.d.ts.map +1 -0
- package/dist/field/features/relationship/drawer/commands.js +4 -0
- package/dist/field/features/relationship/drawer/index.d.ts.map +1 -0
- package/dist/field/features/relationship/drawer/index.js +79 -0
- package/dist/field/features/relationship/feature.client.d.ts +4 -0
- package/dist/field/features/relationship/feature.client.d.ts.map +1 -0
- package/dist/field/features/relationship/feature.client.js +56 -0
- package/dist/field/features/relationship/feature.server.d.ts +18 -0
- package/dist/field/features/relationship/feature.server.d.ts.map +1 -0
- package/dist/field/features/relationship/feature.server.js +26 -0
- package/dist/field/features/relationship/nodes/RelationshipNode.d.ts.map +1 -0
- package/dist/field/features/relationship/nodes/RelationshipNode.js +110 -0
- package/dist/field/features/relationship/nodes/components/RelationshipComponent.d.ts.map +1 -0
- package/dist/field/features/relationship/nodes/components/RelationshipComponent.js +103 -0
- package/dist/field/features/relationship/nodes/components/index.scss +97 -0
- package/dist/field/features/relationship/plugins/index.d.ts +7 -0
- package/dist/field/features/relationship/plugins/index.d.ts.map +1 -0
- package/dist/field/features/relationship/plugins/index.js +49 -0
- package/dist/field/features/relationship/populationPromise.d.ts.map +1 -0
- package/dist/field/features/relationship/populationPromise.js +24 -0
- package/dist/field/features/relationship/utils/EnabledRelationshipsCondition.d.ts.map +1 -0
- package/dist/field/features/relationship/utils/EnabledRelationshipsCondition.js +33 -0
- package/dist/field/features/types.d.ts +139 -70
- package/dist/field/features/types.d.ts.map +1 -1
- package/dist/field/features/types.js +2 -5
- package/dist/field/features/upload/component/ExtraFieldsDrawer/index.d.ts.map +1 -0
- package/dist/field/features/upload/component/ExtraFieldsDrawer/index.js +110 -0
- package/dist/field/features/upload/component/index.d.ts.map +1 -0
- package/dist/field/features/upload/component/index.js +135 -0
- package/dist/field/features/upload/component/index.scss +152 -0
- package/dist/field/features/upload/drawer/commands.d.ts.map +1 -0
- package/dist/field/features/upload/drawer/commands.js +5 -0
- package/dist/field/features/upload/drawer/index.d.ts.map +1 -0
- package/dist/field/features/upload/drawer/index.js +76 -0
- package/dist/field/features/upload/feature.client.d.ts +10 -0
- package/dist/field/features/upload/feature.client.d.ts.map +1 -0
- package/dist/field/features/upload/feature.client.js +55 -0
- package/dist/field/features/upload/feature.server.d.ts +12 -0
- package/dist/field/features/upload/feature.server.d.ts.map +1 -0
- package/dist/field/features/upload/feature.server.js +103 -0
- package/dist/field/features/upload/nodes/UploadNode.d.ts +47 -0
- package/dist/field/features/upload/nodes/UploadNode.d.ts.map +1 -0
- package/dist/field/features/upload/nodes/UploadNode.js +98 -0
- package/dist/field/features/upload/plugin/index.d.ts.map +1 -0
- package/dist/field/features/upload/plugin/index.js +52 -0
- package/dist/field/features/upload/populationPromise.d.ts +5 -0
- package/dist/field/features/upload/populationPromise.d.ts.map +1 -0
- package/dist/field/features/upload/populationPromise.js +46 -0
- package/dist/field/features/upload/validate.d.ts.map +1 -0
- package/dist/field/features/upload/validate.js +19 -0
- package/dist/field/index.d.ts +7 -2
- package/dist/field/index.d.ts.map +1 -1
- package/dist/field/index.js +78 -57
- package/dist/field/index.scss +2 -2
- package/dist/field/lexical/EditorPlugin.d.ts.map +1 -1
- package/dist/field/lexical/EditorPlugin.js +6 -65
- package/dist/field/lexical/LexicalEditor.js +39 -94
- package/dist/field/lexical/LexicalEditor.scss +1 -3
- package/dist/field/lexical/LexicalProvider.d.ts +8 -4
- package/dist/field/lexical/LexicalProvider.d.ts.map +1 -1
- package/dist/field/lexical/LexicalProvider.js +30 -83
- package/dist/field/lexical/config/client/EditorConfigProvider.d.ts +24 -0
- package/dist/field/lexical/config/client/EditorConfigProvider.d.ts.map +1 -0
- package/dist/field/lexical/config/client/EditorConfigProvider.js +41 -0
- package/dist/field/lexical/config/client/default.d.ts +3 -0
- package/dist/field/lexical/config/client/default.d.ts.map +1 -0
- package/dist/field/lexical/config/client/default.js +8 -0
- package/dist/field/lexical/config/client/loader.d.ts +11 -0
- package/dist/field/lexical/config/client/loader.d.ts.map +1 -0
- package/dist/field/lexical/config/client/loader.js +46 -0
- package/dist/field/lexical/config/client/sanitize.d.ts +6 -0
- package/dist/field/lexical/config/client/sanitize.d.ts.map +1 -0
- package/dist/field/lexical/config/client/sanitize.js +126 -0
- package/dist/field/lexical/config/server/default.d.ts +8 -0
- package/dist/field/lexical/config/server/default.d.ts.map +1 -0
- package/dist/field/lexical/config/server/default.js +51 -0
- package/dist/field/lexical/config/server/loader.d.ts +7 -0
- package/dist/field/lexical/config/server/loader.d.ts.map +1 -0
- package/dist/field/lexical/config/server/loader.js +118 -0
- package/dist/field/lexical/config/server/sanitize.d.ts +5 -0
- package/dist/field/lexical/config/server/sanitize.d.ts.map +1 -0
- package/dist/field/lexical/config/server/sanitize.js +65 -0
- package/dist/field/lexical/config/types.d.ts +18 -9
- package/dist/field/lexical/config/types.d.ts.map +1 -1
- package/dist/field/lexical/config/types.js +2 -5
- package/dist/field/lexical/nodes/index.d.ts +2 -2
- package/dist/field/lexical/nodes/index.d.ts.map +1 -1
- package/dist/field/lexical/nodes/index.js +8 -13
- package/dist/field/lexical/plugins/FloatingSelectToolbar/ToolbarButton/index.js +19 -70
- package/dist/field/lexical/plugins/FloatingSelectToolbar/ToolbarButton/index.scss +0 -2
- package/dist/field/lexical/plugins/FloatingSelectToolbar/ToolbarDropdown/DropDown.d.ts +3 -3
- package/dist/field/lexical/plugins/FloatingSelectToolbar/ToolbarDropdown/DropDown.d.ts.map +1 -1
- package/dist/field/lexical/plugins/FloatingSelectToolbar/ToolbarDropdown/DropDown.js +40 -98
- package/dist/field/lexical/plugins/FloatingSelectToolbar/ToolbarDropdown/index.d.ts.map +1 -1
- package/dist/field/lexical/plugins/FloatingSelectToolbar/ToolbarDropdown/index.js +12 -85
- package/dist/field/lexical/plugins/FloatingSelectToolbar/ToolbarDropdown/index.scss +1 -1
- package/dist/field/lexical/plugins/FloatingSelectToolbar/index.d.ts.map +1 -1
- package/dist/field/lexical/plugins/FloatingSelectToolbar/index.js +57 -127
- package/dist/field/lexical/plugins/FloatingSelectToolbar/index.scss +1 -1
- package/dist/field/lexical/plugins/FloatingSelectToolbar/types.d.ts +4 -4
- package/dist/field/lexical/plugins/FloatingSelectToolbar/types.d.ts.map +1 -1
- package/dist/field/lexical/plugins/FloatingSelectToolbar/types.js +2 -5
- package/dist/field/lexical/plugins/MarkdownShortcut/index.js +7 -58
- package/dist/field/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/LexicalMenu.js +39 -64
- package/dist/field/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/index.d.ts +2 -2
- package/dist/field/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/index.d.ts.map +1 -1
- package/dist/field/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/index.js +32 -104
- package/dist/field/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/types.d.ts +6 -6
- package/dist/field/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/types.d.ts.map +1 -1
- package/dist/field/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/types.js +3 -21
- package/dist/field/lexical/plugins/SlashMenu/index.d.ts.map +1 -1
- package/dist/field/lexical/plugins/SlashMenu/index.js +27 -84
- package/dist/field/lexical/plugins/SlashMenu/index.scss +1 -1
- package/dist/field/lexical/plugins/SlashMenu/useMenuTriggerMatch.js +8 -16
- package/dist/field/lexical/plugins/handles/AddBlockHandlePlugin/index.js +35 -84
- package/dist/field/lexical/plugins/handles/AddBlockHandlePlugin/index.scss +0 -2
- package/dist/field/lexical/plugins/handles/DraggableBlockPlugin/debounce.js +2 -12
- package/dist/field/lexical/plugins/handles/DraggableBlockPlugin/getBoundingRectWithoutTransform.js +2 -12
- package/dist/field/lexical/plugins/handles/DraggableBlockPlugin/getNodeCloseToPoint.js +18 -28
- package/dist/field/lexical/plugins/handles/DraggableBlockPlugin/highlightElemOriginalPosition.js +4 -14
- package/dist/field/lexical/plugins/handles/DraggableBlockPlugin/index.js +52 -102
- package/dist/field/lexical/plugins/handles/DraggableBlockPlugin/index.scss +0 -2
- package/dist/field/lexical/plugins/handles/DraggableBlockPlugin/setTargetLine.js +8 -18
- package/dist/field/lexical/plugins/handles/utils/getCollapsedMargins.js +2 -12
- package/dist/field/lexical/plugins/handles/utils/getTopLevelNodeKeys.js +4 -14
- package/dist/field/lexical/plugins/handles/utils/isOnHandleElement.js +2 -12
- package/dist/field/lexical/plugins/handles/utils/setHandlePosition.js +2 -12
- package/dist/field/lexical/theme/EditorTheme.js +3 -13
- package/dist/field/lexical/theme/EditorTheme.scss +0 -2
- package/dist/field/lexical/ui/ContentEditable.js +6 -57
- package/dist/field/lexical/ui/icons/AI/index.js +7 -22
- package/dist/field/lexical/ui/icons/AlignCenter/index.js +6 -21
- package/dist/field/lexical/ui/icons/AlignJustify/index.js +6 -21
- package/dist/field/lexical/ui/icons/AlignLeft/index.js +6 -21
- package/dist/field/lexical/ui/icons/AlignRight/index.js +6 -21
- package/dist/field/lexical/ui/icons/Block/index.js +6 -21
- package/dist/field/lexical/ui/icons/Blockquote/index.js +4 -19
- package/dist/field/lexical/ui/icons/Bold/index.js +4 -19
- package/dist/field/lexical/ui/icons/Checklist/index.js +5 -20
- package/dist/field/lexical/ui/icons/Code/index.js +5 -20
- package/dist/field/lexical/ui/icons/CodeBlock/index.js +5 -20
- package/dist/field/lexical/ui/icons/H1/index.js +4 -19
- package/dist/field/lexical/ui/icons/H2/index.js +4 -19
- package/dist/field/lexical/ui/icons/H3/index.js +4 -19
- package/dist/field/lexical/ui/icons/H4/index.js +4 -19
- package/dist/field/lexical/ui/icons/H5/index.js +4 -19
- package/dist/field/lexical/ui/icons/H6/index.js +4 -19
- package/dist/field/lexical/ui/icons/IndentDecrease/index.js +7 -22
- package/dist/field/lexical/ui/icons/IndentIncrease/index.js +7 -22
- package/dist/field/lexical/ui/icons/Italic/index.js +4 -19
- package/dist/field/lexical/ui/icons/Link/index.js +7 -22
- package/dist/field/lexical/ui/icons/OrderedList/index.js +8 -23
- package/dist/field/lexical/ui/icons/Relationship/index.js +7 -22
- package/dist/field/lexical/ui/icons/Strikethrough/index.js +5 -20
- package/dist/field/lexical/ui/icons/Subscript/index.js +4 -19
- package/dist/field/lexical/ui/icons/Superscript/index.js +4 -19
- package/dist/field/lexical/ui/icons/Text/index.js +4 -19
- package/dist/field/lexical/ui/icons/Underline/index.js +5 -20
- package/dist/field/lexical/ui/icons/UnorderedList/index.js +9 -24
- package/dist/field/lexical/ui/icons/Upload/index.js +6 -21
- package/dist/field/lexical/utils/canUseDOM.js +2 -12
- package/dist/field/lexical/utils/cloneDeep.js +2 -12
- package/dist/field/lexical/utils/environment.js +13 -51
- package/dist/field/lexical/utils/getDOMRangeRect.js +2 -12
- package/dist/field/lexical/utils/getSelectedNode.js +5 -15
- package/dist/field/lexical/utils/guard.js +2 -12
- package/dist/field/lexical/utils/invariant.js +2 -12
- package/dist/field/lexical/utils/joinClasses.js +2 -12
- package/dist/field/lexical/utils/markdown/createBlockNode.js +2 -12
- package/dist/field/lexical/utils/nodeFormat.js +17 -61
- package/dist/field/lexical/utils/point.js +3 -21
- package/dist/field/lexical/utils/rect.js +4 -14
- package/dist/field/lexical/utils/setFloatingElemPosition.js +5 -12
- package/dist/field/lexical/utils/setFloatingElemPositionForLinkEditor.js +2 -12
- package/dist/field/lexical/utils/swipe.js +5 -29
- package/dist/field/lexical/utils/url.js +3 -21
- package/dist/generateComponentMap.d.ts +6 -0
- package/dist/generateComponentMap.d.ts.map +1 -0
- package/dist/generateComponentMap.js +77 -0
- package/dist/generateSchemaMap.d.ts +6 -0
- package/dist/generateSchemaMap.d.ts.map +1 -0
- package/dist/generateSchemaMap.js +27 -0
- package/dist/index.d.ts +59 -56
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +130 -488
- package/dist/populate/defaultValue.js +8 -26
- package/dist/populate/populate.js +2 -12
- package/dist/populate/recurseNestedFields.d.ts.map +1 -1
- package/dist/populate/recurseNestedFields.js +6 -14
- package/dist/populate/richTextRelationshipPromise.js +4 -22
- package/dist/scss/app.scss +209 -0
- package/dist/scss/colors.scss +269 -0
- package/dist/scss/custom.css +1 -0
- package/dist/scss/fonts.scss +75 -0
- package/dist/scss/queries.scss +27 -0
- package/dist/scss/resets.scss +17 -0
- package/dist/scss/styles.scss +11 -0
- package/dist/scss/svg.scss +10 -0
- package/dist/scss/toastify.scss +58 -0
- package/dist/scss/type.scss +117 -0
- package/dist/scss/vars.scss +220 -0
- package/dist/scss/z-index.scss +9 -0
- package/dist/types.d.ts +8 -2
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js +2 -5
- package/dist/useLexicalFeature.d.ts +3 -0
- package/dist/useLexicalFeature.d.ts.map +1 -0
- package/dist/useLexicalFeature.js +9 -0
- package/dist/validate/index.d.ts +4 -4
- package/dist/validate/index.d.ts.map +1 -1
- package/dist/validate/index.js +7 -18
- package/dist/validate/validateNodes.d.ts +2 -4
- package/dist/validate/validateNodes.d.ts.map +1 -1
- package/dist/validate/validateNodes.js +2 -14
- package/package.json +13 -7
- package/dist/field/features/BlockQuote/index.d.ts +0 -3
- package/dist/field/features/BlockQuote/index.d.ts.map +0 -1
- package/dist/field/features/BlockQuote/index.js +0 -140
- package/dist/field/features/BlockQuote/markdownTransformer.d.ts.map +0 -1
- package/dist/field/features/BlockQuote/markdownTransformer.js +0 -50
- package/dist/field/features/Blocks/component/BlockContent.d.ts +0 -20
- package/dist/field/features/Blocks/component/BlockContent.d.ts.map +0 -1
- package/dist/field/features/Blocks/component/BlockContent.js +0 -220
- package/dist/field/features/Blocks/component/FormSavePlugin.d.ts +0 -11
- package/dist/field/features/Blocks/component/FormSavePlugin.d.ts.map +0 -1
- package/dist/field/features/Blocks/component/FormSavePlugin.js +0 -34
- package/dist/field/features/Blocks/component/index.d.ts +0 -15
- package/dist/field/features/Blocks/component/index.d.ts.map +0 -1
- package/dist/field/features/Blocks/component/index.js +0 -150
- package/dist/field/features/Blocks/component/index.scss +0 -153
- package/dist/field/features/Blocks/drawer/index.d.ts.map +0 -1
- package/dist/field/features/Blocks/drawer/index.js +0 -140
- package/dist/field/features/Blocks/index.d.ts +0 -7
- package/dist/field/features/Blocks/index.d.ts.map +0 -1
- package/dist/field/features/Blocks/index.js +0 -147
- package/dist/field/features/Blocks/nodes/BlocksNode.d.ts.map +0 -1
- package/dist/field/features/Blocks/nodes/BlocksNode.js +0 -173
- package/dist/field/features/Blocks/plugin/commands.d.ts.map +0 -1
- package/dist/field/features/Blocks/plugin/commands.js +0 -14
- package/dist/field/features/Blocks/plugin/index.d.ts +0 -5
- package/dist/field/features/Blocks/plugin/index.d.ts.map +0 -1
- package/dist/field/features/Blocks/plugin/index.js +0 -91
- package/dist/field/features/Blocks/populationPromise.d.ts +0 -5
- package/dist/field/features/Blocks/populationPromise.d.ts.map +0 -1
- package/dist/field/features/Blocks/populationPromise.js +0 -55
- package/dist/field/features/Blocks/utils/transformInputFormData.d.ts +0 -11
- package/dist/field/features/Blocks/utils/transformInputFormData.d.ts.map +0 -1
- package/dist/field/features/Blocks/utils/transformInputFormData.js +0 -35
- package/dist/field/features/Blocks/utils/transformInputFormSchema.d.ts +0 -3
- package/dist/field/features/Blocks/utils/transformInputFormSchema.d.ts.map +0 -1
- package/dist/field/features/Blocks/utils/transformInputFormSchema.js +0 -43
- package/dist/field/features/Blocks/validate.d.ts +0 -5
- package/dist/field/features/Blocks/validate.d.ts.map +0 -1
- package/dist/field/features/Blocks/validate.js +0 -62
- package/dist/field/features/Heading/index.d.ts +0 -8
- package/dist/field/features/Heading/index.d.ts.map +0 -1
- package/dist/field/features/Heading/index.js +0 -164
- package/dist/field/features/Heading/markdownTransformer.d.ts.map +0 -1
- package/dist/field/features/Heading/markdownTransformer.js +0 -39
- package/dist/field/features/Link/drawer/baseFields.d.ts.map +0 -1
- package/dist/field/features/Link/drawer/baseFields.js +0 -128
- package/dist/field/features/Link/drawer/index.d.ts.map +0 -1
- package/dist/field/features/Link/drawer/index.js +0 -40
- package/dist/field/features/Link/drawer/index.scss +0 -50
- package/dist/field/features/Link/drawer/types.d.ts +0 -8
- package/dist/field/features/Link/drawer/types.d.ts.map +0 -1
- package/dist/field/features/Link/drawer/types.js +0 -6
- package/dist/field/features/Link/index.d.ts +0 -33
- package/dist/field/features/Link/index.d.ts.map +0 -1
- package/dist/field/features/Link/index.js +0 -201
- package/dist/field/features/Link/nodes/AutoLinkNode.d.ts +0 -16
- package/dist/field/features/Link/nodes/AutoLinkNode.d.ts.map +0 -1
- package/dist/field/features/Link/nodes/AutoLinkNode.js +0 -79
- package/dist/field/features/Link/nodes/LinkNode.d.ts +0 -50
- package/dist/field/features/Link/nodes/LinkNode.d.ts.map +0 -1
- package/dist/field/features/Link/nodes/LinkNode.js +0 -326
- package/dist/field/features/Link/plugins/autoLink/index.d.ts +0 -19
- package/dist/field/features/Link/plugins/autoLink/index.d.ts.map +0 -1
- package/dist/field/features/Link/plugins/autoLink/index.js +0 -336
- package/dist/field/features/Link/plugins/clickableLink/index.d.ts.map +0 -1
- package/dist/field/features/Link/plugins/clickableLink/index.js +0 -23
- package/dist/field/features/Link/plugins/floatingLinkEditor/LinkEditor/commands.d.ts.map +0 -1
- package/dist/field/features/Link/plugins/floatingLinkEditor/LinkEditor/commands.js +0 -14
- package/dist/field/features/Link/plugins/floatingLinkEditor/LinkEditor/index.d.ts +0 -6
- package/dist/field/features/Link/plugins/floatingLinkEditor/LinkEditor/index.d.ts.map +0 -1
- package/dist/field/features/Link/plugins/floatingLinkEditor/LinkEditor/index.js +0 -336
- package/dist/field/features/Link/plugins/floatingLinkEditor/index.d.ts +0 -7
- package/dist/field/features/Link/plugins/floatingLinkEditor/index.d.ts.map +0 -1
- package/dist/field/features/Link/plugins/floatingLinkEditor/index.js +0 -65
- package/dist/field/features/Link/plugins/floatingLinkEditor/index.scss +0 -78
- package/dist/field/features/Link/plugins/floatingLinkEditor/types.d.ts +0 -13
- package/dist/field/features/Link/plugins/floatingLinkEditor/types.d.ts.map +0 -1
- package/dist/field/features/Link/plugins/floatingLinkEditor/types.js +0 -6
- package/dist/field/features/Link/plugins/floatingLinkEditor/utilities.d.ts +0 -12
- package/dist/field/features/Link/plugins/floatingLinkEditor/utilities.d.ts.map +0 -1
- package/dist/field/features/Link/plugins/floatingLinkEditor/utilities.js +0 -45
- package/dist/field/features/Link/plugins/link/index.d.ts.map +0 -1
- package/dist/field/features/Link/plugins/link/index.js +0 -69
- package/dist/field/features/Link/populationPromise.d.ts +0 -5
- package/dist/field/features/Link/populationPromise.d.ts.map +0 -1
- package/dist/field/features/Link/populationPromise.js +0 -56
- package/dist/field/features/Paragraph/index.d.ts +0 -3
- package/dist/field/features/Paragraph/index.d.ts.map +0 -1
- package/dist/field/features/Paragraph/index.js +0 -114
- package/dist/field/features/Relationship/drawer/commands.d.ts.map +0 -1
- package/dist/field/features/Relationship/drawer/commands.js +0 -14
- package/dist/field/features/Relationship/drawer/index.d.ts.map +0 -1
- package/dist/field/features/Relationship/drawer/index.js +0 -130
- package/dist/field/features/Relationship/index.d.ts +0 -18
- package/dist/field/features/Relationship/index.d.ts.map +0 -1
- package/dist/field/features/Relationship/index.js +0 -115
- package/dist/field/features/Relationship/nodes/RelationshipNode.d.ts.map +0 -1
- package/dist/field/features/Relationship/nodes/RelationshipNode.js +0 -172
- package/dist/field/features/Relationship/nodes/components/RelationshipComponent.d.ts.map +0 -1
- package/dist/field/features/Relationship/nodes/components/RelationshipComponent.js +0 -161
- package/dist/field/features/Relationship/nodes/components/index.scss +0 -97
- package/dist/field/features/Relationship/plugins/index.d.ts +0 -7
- package/dist/field/features/Relationship/plugins/index.d.ts.map +0 -1
- package/dist/field/features/Relationship/plugins/index.js +0 -107
- package/dist/field/features/Relationship/populationPromise.d.ts.map +0 -1
- package/dist/field/features/Relationship/populationPromise.js +0 -34
- package/dist/field/features/Relationship/utils/EnabledRelationshipsCondition.d.ts.map +0 -1
- package/dist/field/features/Relationship/utils/EnabledRelationshipsCondition.js +0 -84
- package/dist/field/features/Upload/component/ExtraFieldsDrawer/index.d.ts.map +0 -1
- package/dist/field/features/Upload/component/ExtraFieldsDrawer/index.js +0 -148
- package/dist/field/features/Upload/component/index.d.ts.map +0 -1
- package/dist/field/features/Upload/component/index.js +0 -191
- package/dist/field/features/Upload/component/index.scss +0 -152
- package/dist/field/features/Upload/drawer/commands.d.ts.map +0 -1
- package/dist/field/features/Upload/drawer/commands.js +0 -14
- package/dist/field/features/Upload/drawer/index.d.ts.map +0 -1
- package/dist/field/features/Upload/drawer/index.js +0 -127
- package/dist/field/features/Upload/index.d.ts +0 -11
- package/dist/field/features/Upload/index.d.ts.map +0 -1
- package/dist/field/features/Upload/index.js +0 -168
- package/dist/field/features/Upload/nodes/UploadNode.d.ts +0 -47
- package/dist/field/features/Upload/nodes/UploadNode.d.ts.map +0 -1
- package/dist/field/features/Upload/nodes/UploadNode.js +0 -160
- package/dist/field/features/Upload/plugin/index.d.ts.map +0 -1
- package/dist/field/features/Upload/plugin/index.js +0 -111
- package/dist/field/features/Upload/populationPromise.d.ts +0 -5
- package/dist/field/features/Upload/populationPromise.d.ts.map +0 -1
- package/dist/field/features/Upload/populationPromise.js +0 -56
- package/dist/field/features/Upload/validate.d.ts.map +0 -1
- package/dist/field/features/Upload/validate.js +0 -29
- package/dist/field/features/align/index.d.ts +0 -3
- package/dist/field/features/align/index.d.ts.map +0 -1
- package/dist/field/features/align/index.js +0 -121
- package/dist/field/features/converters/html/index.d.ts +0 -13
- package/dist/field/features/converters/html/index.d.ts.map +0 -1
- package/dist/field/features/converters/html/index.js +0 -25
- package/dist/field/features/debug/TestRecorder/index.d.ts +0 -3
- package/dist/field/features/debug/TestRecorder/index.d.ts.map +0 -1
- package/dist/field/features/debug/TestRecorder/index.js +0 -70
- package/dist/field/features/debug/TestRecorder/plugin/index.d.ts.map +0 -1
- package/dist/field/features/debug/TestRecorder/plugin/index.js +0 -500
- package/dist/field/features/debug/TestRecorder/plugin/index.scss +0 -51
- package/dist/field/features/debug/TreeView/index.d.ts +0 -3
- package/dist/field/features/debug/TreeView/index.d.ts.map +0 -1
- package/dist/field/features/debug/TreeView/index.js +0 -70
- package/dist/field/features/debug/TreeView/plugin.d.ts +0 -4
- package/dist/field/features/debug/TreeView/plugin.d.ts.map +0 -1
- package/dist/field/features/debug/TreeView/plugin.js +0 -70
- package/dist/field/features/format/Bold/index.d.ts +0 -3
- package/dist/field/features/format/Bold/index.d.ts.map +0 -1
- package/dist/field/features/format/Bold/index.js +0 -98
- package/dist/field/features/format/Bold/markdownTransformers.d.ts.map +0 -1
- package/dist/field/features/format/Bold/markdownTransformers.js +0 -58
- package/dist/field/features/format/InlineCode/index.d.ts +0 -3
- package/dist/field/features/format/InlineCode/index.d.ts.map +0 -1
- package/dist/field/features/format/InlineCode/index.js +0 -90
- package/dist/field/features/format/InlineCode/markdownTransformers.d.ts.map +0 -1
- package/dist/field/features/format/InlineCode/markdownTransformers.js +0 -19
- package/dist/field/features/format/Italic/index.d.ts +0 -3
- package/dist/field/features/format/Italic/index.d.ts.map +0 -1
- package/dist/field/features/format/Italic/index.js +0 -91
- package/dist/field/features/format/Italic/markdownTransformers.d.ts.map +0 -1
- package/dist/field/features/format/Italic/markdownTransformers.js +0 -35
- package/dist/field/features/format/strikethrough/index.d.ts +0 -3
- package/dist/field/features/format/strikethrough/index.d.ts.map +0 -1
- package/dist/field/features/format/strikethrough/index.js +0 -90
- package/dist/field/features/format/subscript/index.d.ts +0 -3
- package/dist/field/features/format/subscript/index.d.ts.map +0 -1
- package/dist/field/features/format/subscript/index.js +0 -86
- package/dist/field/features/format/superscript/index.d.ts +0 -3
- package/dist/field/features/format/superscript/index.d.ts.map +0 -1
- package/dist/field/features/format/superscript/index.js +0 -86
- package/dist/field/features/format/underline/index.d.ts +0 -3
- package/dist/field/features/format/underline/index.d.ts.map +0 -1
- package/dist/field/features/format/underline/index.js +0 -86
- package/dist/field/features/indent/index.d.ts +0 -3
- package/dist/field/features/indent/index.d.ts.map +0 -1
- package/dist/field/features/indent/index.js +0 -114
- package/dist/field/features/indent/plugin.d.ts +0 -3
- package/dist/field/features/indent/plugin.d.ts.map +0 -1
- package/dist/field/features/indent/plugin.js +0 -17
- package/dist/field/features/lists/CheckList/index.d.ts +0 -3
- package/dist/field/features/lists/CheckList/index.d.ts.map +0 -1
- package/dist/field/features/lists/CheckList/index.js +0 -135
- package/dist/field/features/lists/CheckList/markdownTransformers.d.ts.map +0 -1
- package/dist/field/features/lists/CheckList/markdownTransformers.js +0 -26
- package/dist/field/features/lists/CheckList/plugin/index.d.ts.map +0 -1
- package/dist/field/features/lists/CheckList/plugin/index.js +0 -23
- package/dist/field/features/lists/OrderedList/index.d.ts +0 -3
- package/dist/field/features/lists/OrderedList/index.d.ts.map +0 -1
- package/dist/field/features/lists/OrderedList/index.js +0 -133
- package/dist/field/features/lists/OrderedList/markdownTransformer.d.ts.map +0 -1
- package/dist/field/features/lists/OrderedList/markdownTransformer.js +0 -26
- package/dist/field/features/lists/UnorderedList/index.d.ts +0 -3
- package/dist/field/features/lists/UnorderedList/index.d.ts.map +0 -1
- package/dist/field/features/lists/UnorderedList/index.js +0 -133
- package/dist/field/features/lists/UnorderedList/markdownTransformer.d.ts.map +0 -1
- package/dist/field/features/lists/UnorderedList/markdownTransformer.js +0 -26
- package/dist/field/features/migrations/LexicalPluginToLexical/converter/converters/heading.d.ts +0 -3
- package/dist/field/features/migrations/LexicalPluginToLexical/converter/converters/heading.d.ts.map +0 -1
- package/dist/field/features/migrations/LexicalPluginToLexical/converter/converters/heading.js +0 -30
- package/dist/field/features/migrations/LexicalPluginToLexical/converter/converters/link.d.ts +0 -3
- package/dist/field/features/migrations/LexicalPluginToLexical/converter/converters/link.d.ts.map +0 -1
- package/dist/field/features/migrations/LexicalPluginToLexical/converter/converters/link.js +0 -41
- package/dist/field/features/migrations/LexicalPluginToLexical/converter/converters/list.d.ts +0 -3
- package/dist/field/features/migrations/LexicalPluginToLexical/converter/converters/list.d.ts.map +0 -1
- package/dist/field/features/migrations/LexicalPluginToLexical/converter/converters/list.js +0 -32
- package/dist/field/features/migrations/LexicalPluginToLexical/converter/converters/listItem.d.ts +0 -3
- package/dist/field/features/migrations/LexicalPluginToLexical/converter/converters/listItem.d.ts.map +0 -1
- package/dist/field/features/migrations/LexicalPluginToLexical/converter/converters/listItem.js +0 -32
- package/dist/field/features/migrations/LexicalPluginToLexical/converter/converters/quote.d.ts +0 -3
- package/dist/field/features/migrations/LexicalPluginToLexical/converter/converters/quote.d.ts.map +0 -1
- package/dist/field/features/migrations/LexicalPluginToLexical/converter/converters/quote.js +0 -30
- package/dist/field/features/migrations/LexicalPluginToLexical/converter/converters/unknown.d.ts +0 -3
- package/dist/field/features/migrations/LexicalPluginToLexical/converter/converters/unknown.d.ts.map +0 -1
- package/dist/field/features/migrations/LexicalPluginToLexical/converter/converters/unknown.js +0 -36
- package/dist/field/features/migrations/LexicalPluginToLexical/converter/converters/upload.d.ts +0 -3
- package/dist/field/features/migrations/LexicalPluginToLexical/converter/converters/upload.d.ts.map +0 -1
- package/dist/field/features/migrations/LexicalPluginToLexical/converter/converters/upload.js +0 -35
- package/dist/field/features/migrations/LexicalPluginToLexical/converter/defaultConverters.d.ts +0 -3
- package/dist/field/features/migrations/LexicalPluginToLexical/converter/defaultConverters.d.ts.map +0 -1
- package/dist/field/features/migrations/LexicalPluginToLexical/converter/defaultConverters.js +0 -28
- package/dist/field/features/migrations/LexicalPluginToLexical/converter/index.d.ts +0 -18
- package/dist/field/features/migrations/LexicalPluginToLexical/converter/index.d.ts.map +0 -1
- package/dist/field/features/migrations/LexicalPluginToLexical/converter/index.js +0 -90
- package/dist/field/features/migrations/LexicalPluginToLexical/converter/types.d.ts +0 -20
- package/dist/field/features/migrations/LexicalPluginToLexical/converter/types.d.ts.map +0 -1
- package/dist/field/features/migrations/LexicalPluginToLexical/converter/types.js +0 -6
- package/dist/field/features/migrations/LexicalPluginToLexical/index.d.ts +0 -10
- package/dist/field/features/migrations/LexicalPluginToLexical/index.d.ts.map +0 -1
- package/dist/field/features/migrations/LexicalPluginToLexical/index.js +0 -50
- package/dist/field/features/migrations/LexicalPluginToLexical/nodes/unknownConvertedNode/Component.d.ts.map +0 -1
- package/dist/field/features/migrations/LexicalPluginToLexical/nodes/unknownConvertedNode/Component.js +0 -23
- package/dist/field/features/migrations/LexicalPluginToLexical/nodes/unknownConvertedNode/index.d.ts.map +0 -1
- package/dist/field/features/migrations/LexicalPluginToLexical/nodes/unknownConvertedNode/index.js +0 -131
- package/dist/field/features/migrations/LexicalPluginToLexical/nodes/unknownConvertedNode/index.scss +0 -16
- package/dist/field/features/migrations/SlateToLexical/converter/converters/blockquote.d.ts +0 -3
- package/dist/field/features/migrations/SlateToLexical/converter/converters/blockquote.d.ts.map +0 -1
- package/dist/field/features/migrations/SlateToLexical/converter/converters/blockquote.js +0 -33
- package/dist/field/features/migrations/SlateToLexical/converter/converters/heading.d.ts +0 -3
- package/dist/field/features/migrations/SlateToLexical/converter/converters/heading.d.ts.map +0 -1
- package/dist/field/features/migrations/SlateToLexical/converter/converters/heading.js +0 -39
- package/dist/field/features/migrations/SlateToLexical/converter/converters/indent.d.ts +0 -3
- package/dist/field/features/migrations/SlateToLexical/converter/converters/indent.d.ts.map +0 -1
- package/dist/field/features/migrations/SlateToLexical/converter/converters/indent.js +0 -57
- package/dist/field/features/migrations/SlateToLexical/converter/converters/link.d.ts +0 -3
- package/dist/field/features/migrations/SlateToLexical/converter/converters/link.d.ts.map +0 -1
- package/dist/field/features/migrations/SlateToLexical/converter/converters/link.js +0 -40
- package/dist/field/features/migrations/SlateToLexical/converter/converters/listItem.d.ts +0 -3
- package/dist/field/features/migrations/SlateToLexical/converter/converters/listItem.d.ts.map +0 -1
- package/dist/field/features/migrations/SlateToLexical/converter/converters/listItem.js +0 -35
- package/dist/field/features/migrations/SlateToLexical/converter/converters/orderedList.d.ts +0 -3
- package/dist/field/features/migrations/SlateToLexical/converter/converters/orderedList.d.ts.map +0 -1
- package/dist/field/features/migrations/SlateToLexical/converter/converters/orderedList.js +0 -36
- package/dist/field/features/migrations/SlateToLexical/converter/converters/relationship.d.ts +0 -3
- package/dist/field/features/migrations/SlateToLexical/converter/converters/relationship.d.ts.map +0 -1
- package/dist/field/features/migrations/SlateToLexical/converter/converters/relationship.js +0 -28
- package/dist/field/features/migrations/SlateToLexical/converter/converters/unknown.d.ts +0 -3
- package/dist/field/features/migrations/SlateToLexical/converter/converters/unknown.d.ts.map +0 -1
- package/dist/field/features/migrations/SlateToLexical/converter/converters/unknown.js +0 -37
- package/dist/field/features/migrations/SlateToLexical/converter/converters/unorderedList.d.ts +0 -3
- package/dist/field/features/migrations/SlateToLexical/converter/converters/unorderedList.d.ts.map +0 -1
- package/dist/field/features/migrations/SlateToLexical/converter/converters/unorderedList.js +0 -36
- package/dist/field/features/migrations/SlateToLexical/converter/converters/upload.d.ts +0 -3
- package/dist/field/features/migrations/SlateToLexical/converter/converters/upload.d.ts.map +0 -1
- package/dist/field/features/migrations/SlateToLexical/converter/converters/upload.js +0 -31
- package/dist/field/features/migrations/SlateToLexical/converter/defaultConverters.d.ts +0 -3
- package/dist/field/features/migrations/SlateToLexical/converter/defaultConverters.d.ts.map +0 -1
- package/dist/field/features/migrations/SlateToLexical/converter/defaultConverters.js +0 -34
- package/dist/field/features/migrations/SlateToLexical/converter/index.d.ts +0 -19
- package/dist/field/features/migrations/SlateToLexical/converter/index.d.ts.map +0 -1
- package/dist/field/features/migrations/SlateToLexical/converter/index.js +0 -131
- package/dist/field/features/migrations/SlateToLexical/converter/types.d.ts +0 -16
- package/dist/field/features/migrations/SlateToLexical/converter/types.d.ts.map +0 -1
- package/dist/field/features/migrations/SlateToLexical/converter/types.js +0 -6
- package/dist/field/features/migrations/SlateToLexical/index.d.ts +0 -10
- package/dist/field/features/migrations/SlateToLexical/index.d.ts.map +0 -1
- package/dist/field/features/migrations/SlateToLexical/index.js +0 -50
- package/dist/field/features/migrations/SlateToLexical/nodes/unknownConvertedNode/Component.d.ts.map +0 -1
- package/dist/field/features/migrations/SlateToLexical/nodes/unknownConvertedNode/Component.js +0 -23
- package/dist/field/features/migrations/SlateToLexical/nodes/unknownConvertedNode/index.d.ts.map +0 -1
- package/dist/field/features/migrations/SlateToLexical/nodes/unknownConvertedNode/index.js +0 -131
- package/dist/field/features/migrations/SlateToLexical/nodes/unknownConvertedNode/index.scss +0 -16
- package/dist/field/lexical/config/EditorConfigProvider.d.ts +0 -16
- package/dist/field/lexical/config/EditorConfigProvider.d.ts.map +0 -1
- package/dist/field/lexical/config/EditorConfigProvider.js +0 -99
- package/dist/field/lexical/config/default.d.ts +0 -6
- package/dist/field/lexical/config/default.d.ts.map +0 -1
- package/dist/field/lexical/config/default.js +0 -112
- package/dist/field/lexical/config/defaultClient.d.ts +0 -3
- package/dist/field/lexical/config/defaultClient.d.ts.map +0 -1
- package/dist/field/lexical/config/defaultClient.js +0 -17
- package/dist/field/lexical/config/loader.d.ts +0 -7
- package/dist/field/lexical/config/loader.d.ts.map +0 -1
- package/dist/field/lexical/config/loader.js +0 -133
- package/dist/field/lexical/config/sanitize.d.ts +0 -5
- package/dist/field/lexical/config/sanitize.d.ts.map +0 -1
- package/dist/field/lexical/config/sanitize.js +0 -170
- /package/dist/field/features/{BlockQuote → blockquote}/markdownTransformer.d.ts +0 -0
- /package/dist/field/features/{Blocks → blocks}/drawer/index.d.ts +0 -0
- /package/dist/field/features/{Blocks → blocks}/nodes/BlocksNode.d.ts +0 -0
- /package/dist/field/features/{Blocks → blocks}/plugin/commands.d.ts +0 -0
- /package/dist/field/features/debug/{TestRecorder → testrecorder}/plugin/index.d.ts +0 -0
- /package/dist/field/features/debug/{TreeView → treeview/plugin}/index.scss +0 -0
- /package/dist/field/features/format/{Bold → bold}/markdownTransformers.d.ts +0 -0
- /package/dist/field/features/format/{InlineCode → inlinecode}/markdownTransformers.d.ts +0 -0
- /package/dist/field/features/format/{Italic → italic}/markdownTransformers.d.ts +0 -0
- /package/dist/field/features/{Heading → heading}/markdownTransformer.d.ts +0 -0
- /package/dist/field/features/{Link → link}/drawer/baseFields.d.ts +0 -0
- /package/dist/field/features/{Link → link}/drawer/index.d.ts +0 -0
- /package/dist/field/features/{Link → link}/plugins/clickableLink/index.d.ts +0 -0
- /package/dist/field/features/{Link → link}/plugins/floatingLinkEditor/LinkEditor/commands.d.ts +0 -0
- /package/dist/field/features/{Link → link}/plugins/link/index.d.ts +0 -0
- /package/dist/field/features/lists/{CheckList → checklist}/markdownTransformers.d.ts +0 -0
- /package/dist/field/features/lists/{CheckList → checklist}/plugin/index.d.ts +0 -0
- /package/dist/field/features/lists/{OrderedList → orderedlist}/markdownTransformer.d.ts +0 -0
- /package/dist/field/features/lists/{UnorderedList → unorderedlist}/markdownTransformer.d.ts +0 -0
- /package/dist/field/features/migrations/{LexicalPluginToLexical → lexicalPluginToLexical}/nodes/unknownConvertedNode/Component.d.ts +0 -0
- /package/dist/field/features/migrations/{LexicalPluginToLexical → lexicalPluginToLexical}/nodes/unknownConvertedNode/index.d.ts +0 -0
- /package/dist/field/features/migrations/{SlateToLexical → slateToLexical}/nodes/unknownConvertedNode/Component.d.ts +0 -0
- /package/dist/field/features/migrations/{SlateToLexical → slateToLexical}/nodes/unknownConvertedNode/index.d.ts +0 -0
- /package/dist/field/features/{Relationship → relationship}/drawer/commands.d.ts +0 -0
- /package/dist/field/features/{Relationship → relationship}/drawer/index.d.ts +0 -0
- /package/dist/field/features/{Relationship → relationship}/nodes/RelationshipNode.d.ts +0 -0
- /package/dist/field/features/{Relationship → relationship}/nodes/components/RelationshipComponent.d.ts +0 -0
- /package/dist/field/features/{Relationship → relationship}/populationPromise.d.ts +0 -0
- /package/dist/field/features/{Relationship → relationship}/utils/EnabledRelationshipsCondition.d.ts +0 -0
- /package/dist/field/features/{Upload → upload}/component/ExtraFieldsDrawer/index.d.ts +0 -0
- /package/dist/field/features/{Upload → upload}/component/index.d.ts +0 -0
- /package/dist/field/features/{Upload → upload}/drawer/commands.d.ts +0 -0
- /package/dist/field/features/{Upload → upload}/drawer/index.d.ts +0 -0
- /package/dist/field/features/{Upload → upload}/plugin/index.d.ts +0 -0
- /package/dist/field/features/{Upload → upload}/validate.d.ts +0 -0
|
@@ -1,83 +1,30 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
get: function() {
|
|
9
|
-
return LexicalProvider;
|
|
10
|
-
}
|
|
11
|
-
});
|
|
12
|
-
const _LexicalComposer = require("@lexical/react/LexicalComposer");
|
|
13
|
-
const _react = /*#__PURE__*/ _interop_require_wildcard(require("react"));
|
|
14
|
-
const _LexicalEditor = require("./LexicalEditor");
|
|
15
|
-
const _EditorConfigProvider = require("./config/EditorConfigProvider");
|
|
16
|
-
const _nodes = require("./nodes");
|
|
17
|
-
function _getRequireWildcardCache(nodeInterop) {
|
|
18
|
-
if (typeof WeakMap !== "function") return null;
|
|
19
|
-
var cacheBabelInterop = new WeakMap();
|
|
20
|
-
var cacheNodeInterop = new WeakMap();
|
|
21
|
-
return (_getRequireWildcardCache = function(nodeInterop) {
|
|
22
|
-
return nodeInterop ? cacheNodeInterop : cacheBabelInterop;
|
|
23
|
-
})(nodeInterop);
|
|
24
|
-
}
|
|
25
|
-
function _interop_require_wildcard(obj, nodeInterop) {
|
|
26
|
-
if (!nodeInterop && obj && obj.__esModule) {
|
|
27
|
-
return obj;
|
|
28
|
-
}
|
|
29
|
-
if (obj === null || typeof obj !== "object" && typeof obj !== "function") {
|
|
30
|
-
return {
|
|
31
|
-
default: obj
|
|
32
|
-
};
|
|
33
|
-
}
|
|
34
|
-
var cache = _getRequireWildcardCache(nodeInterop);
|
|
35
|
-
if (cache && cache.has(obj)) {
|
|
36
|
-
return cache.get(obj);
|
|
37
|
-
}
|
|
38
|
-
var newObj = {
|
|
39
|
-
__proto__: null
|
|
40
|
-
};
|
|
41
|
-
var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
|
|
42
|
-
for(var key in obj){
|
|
43
|
-
if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) {
|
|
44
|
-
var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null;
|
|
45
|
-
if (desc && (desc.get || desc.set)) {
|
|
46
|
-
Object.defineProperty(newObj, key, desc);
|
|
47
|
-
} else {
|
|
48
|
-
newObj[key] = obj[key];
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
newObj.default = obj;
|
|
53
|
-
if (cache) {
|
|
54
|
-
cache.set(obj, newObj);
|
|
55
|
-
}
|
|
56
|
-
return newObj;
|
|
57
|
-
}
|
|
58
|
-
const LexicalProvider = (props)=>{
|
|
2
|
+
import { LexicalComposer } from '@lexical/react/LexicalComposer';
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
import { LexicalEditor as LexicalEditorComponent } from './LexicalEditor';
|
|
5
|
+
import { EditorConfigProvider } from './config/client/EditorConfigProvider';
|
|
6
|
+
import { getEnabledNodes } from './nodes';
|
|
7
|
+
export const LexicalProvider = (props)=>{
|
|
59
8
|
const { editorConfig, fieldProps, onChange, path, readOnly } = props;
|
|
60
9
|
let { value } = props;
|
|
61
|
-
const [initialConfig, setInitialConfig] =
|
|
62
|
-
// set lexical config in
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
setInitialConfig(newInitialConfig);
|
|
80
|
-
});
|
|
10
|
+
const [initialConfig, setInitialConfig] = React.useState(null);
|
|
11
|
+
// set lexical config in useEffect: // TODO: Is this the most performant way to do this? Prob not
|
|
12
|
+
React.useEffect(()=>{
|
|
13
|
+
const newInitialConfig = {
|
|
14
|
+
editable: readOnly !== true,
|
|
15
|
+
editorState: value != null ? JSON.stringify(value) : undefined,
|
|
16
|
+
namespace: editorConfig.lexical.namespace,
|
|
17
|
+
nodes: [
|
|
18
|
+
...getEnabledNodes({
|
|
19
|
+
editorConfig
|
|
20
|
+
})
|
|
21
|
+
],
|
|
22
|
+
onError: (error)=>{
|
|
23
|
+
throw error;
|
|
24
|
+
},
|
|
25
|
+
theme: editorConfig.lexical.theme
|
|
26
|
+
};
|
|
27
|
+
setInitialConfig(newInitialConfig);
|
|
81
28
|
}, [
|
|
82
29
|
editorConfig,
|
|
83
30
|
readOnly,
|
|
@@ -100,20 +47,20 @@ const LexicalProvider = (props)=>{
|
|
|
100
47
|
throw new Error('You have tried to pass in data from payload-plugin-lexical. This is not supported. The data structure has changed in this editor, compared to the plugin, and there is no automatic conversion available yet (coming soon). Please remove the data from the field and start again.');
|
|
101
48
|
}
|
|
102
49
|
if (!initialConfig) {
|
|
103
|
-
return /*#__PURE__*/
|
|
50
|
+
return /*#__PURE__*/ React.createElement("p", null, "Loading...");
|
|
104
51
|
}
|
|
105
|
-
return /*#__PURE__*/
|
|
52
|
+
return /*#__PURE__*/ React.createElement(LexicalComposer, {
|
|
106
53
|
initialConfig: initialConfig,
|
|
107
54
|
key: path
|
|
108
|
-
}, /*#__PURE__*/
|
|
55
|
+
}, /*#__PURE__*/ React.createElement(EditorConfigProvider, {
|
|
109
56
|
editorConfig: editorConfig,
|
|
110
57
|
fieldProps: fieldProps
|
|
111
|
-
}, /*#__PURE__*/
|
|
58
|
+
}, /*#__PURE__*/ React.createElement("div", {
|
|
112
59
|
className: "editor-shell"
|
|
113
|
-
}, /*#__PURE__*/
|
|
60
|
+
}, /*#__PURE__*/ React.createElement(LexicalEditorComponent, {
|
|
114
61
|
editorConfig: editorConfig,
|
|
115
62
|
onChange: onChange
|
|
116
63
|
}))));
|
|
117
64
|
};
|
|
118
65
|
|
|
119
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
66
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9maWVsZC9sZXhpY2FsL0xleGljYWxQc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zQixVQUFVQyxPQUFPQyxNQUFNQyxRQUFRO1FBQy9DekIsYUFBYXNCLFFBQVEsQ0FBQ0MsS0FBSyxDQUFDQyxJQUFJLENBQUNFLE9BQU8sQ0FBQyxDQUFDQztZQUN4Q3RCLFFBQVFzQixLQUFLO2dCQUFFQyxxQkFBcUJ2QjtZQUFNO1FBQzVDO0lBQ0Y7SUFFQSxJQUFJQSxTQUFTLE9BQU9BLFVBQVUsVUFBVTtRQUN0QyxNQUFNLElBQUl3QixNQUNSLGtMQUNFaEIsS0FBS0MsU0FBUyxDQUFDVDtJQUVyQjtJQUVBLElBQUlBLFNBQVN5QixNQUFNQyxPQUFPLENBQUMxQixVQUFVLENBQUUsQ0FBQSxVQUFVQSxLQUFJLEdBQUk7UUFDdkQsTUFBTSxJQUFJd0IsTUFDUjtJQUVKO0lBRUEsSUFBSXhCLFNBQVMsaUJBQWlCQSxPQUFPO1FBQ25DLE1BQU0sSUFBSXdCLE1BQ1I7SUFFSjtJQUVBLElBQUksQ0FBQ3ZCLGVBQWU7UUFDbEIscUJBQU8sb0JBQUMwQixXQUFFO0lBQ1o7SUFFQSxxQkFDRSxvQkFBQ3hDO1FBQWdCYyxlQUFlQTtRQUFlMkIsS0FBSzlCO3FCQUNsRCxvQkFBQ1A7UUFBcUJJLGNBQWNBO1FBQWNDLFlBQVlBO3FCQUM1RCxvQkFBQ2lDO1FBQUlDLFdBQVU7cUJBQ2Isb0JBQUN4QztRQUF1QkssY0FBY0E7UUFBY0UsVUFBVUE7O0FBS3hFLEVBQUMifQ==
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { FormFieldBase } from '@payloadcms/ui';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import type { SanitizedClientEditorConfig } from '../types';
|
|
4
|
+
interface ContextType {
|
|
5
|
+
editorConfig: SanitizedClientEditorConfig;
|
|
6
|
+
field: FormFieldBase & {
|
|
7
|
+
editorConfig: SanitizedClientEditorConfig;
|
|
8
|
+
name: string;
|
|
9
|
+
richTextComponentMap: Map<string, React.ReactNode>;
|
|
10
|
+
};
|
|
11
|
+
uuid: string;
|
|
12
|
+
}
|
|
13
|
+
export declare const EditorConfigProvider: ({ children, editorConfig, fieldProps, }: {
|
|
14
|
+
children: React.ReactNode;
|
|
15
|
+
editorConfig: SanitizedClientEditorConfig;
|
|
16
|
+
fieldProps: FormFieldBase & {
|
|
17
|
+
editorConfig: SanitizedClientEditorConfig;
|
|
18
|
+
name: string;
|
|
19
|
+
richTextComponentMap: Map<string, React.ReactNode>;
|
|
20
|
+
};
|
|
21
|
+
}) => React.ReactNode;
|
|
22
|
+
export declare const useEditorConfigContext: () => ContextType;
|
|
23
|
+
export {};
|
|
24
|
+
//# sourceMappingURL=EditorConfigProvider.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EditorConfigProvider.d.ts","sourceRoot":"","sources":["../../../../../src/field/lexical/config/client/EditorConfigProvider.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAA;AAEnD,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAI9B,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,UAAU,CAAA;AAM3D,UAAU,WAAW;IACnB,YAAY,EAAE,2BAA2B,CAAA;IACzC,KAAK,EAAE,aAAa,GAAG;QACrB,YAAY,EAAE,2BAA2B,CAAA;QACzC,IAAI,EAAE,MAAM,CAAA;QACZ,oBAAoB,EAAE,GAAG,CAAC,MAAM,EAAE,KAAK,CAAC,SAAS,CAAC,CAAA;KACnD,CAAA;IACD,IAAI,EAAE,MAAM,CAAA;CACb;AAQD,eAAO,MAAM,oBAAoB;cAKrB,MAAM,SAAS;kBACX,2BAA2B;;sBAEzB,2BAA2B;cACnC,MAAM;8BACU,IAAI,MAAM,EAAE,MAAM,SAAS,CAAC;;MAElD,MAAM,SAeT,CAAA;AAED,eAAO,MAAM,sBAAsB,QAAO,WAMzC,CAAA"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import { createContext, useContext, useEffect, useMemo, useState } from 'react';
|
|
4
|
+
// Should always produce a 20 character pseudo-random string
|
|
5
|
+
function generateQuickGuid() {
|
|
6
|
+
return Math.random().toString(36).substring(2, 12) + Math.random().toString(36).substring(2, 12);
|
|
7
|
+
}
|
|
8
|
+
const Context = /*#__PURE__*/ createContext({
|
|
9
|
+
editorConfig: null,
|
|
10
|
+
field: null,
|
|
11
|
+
uuid: generateQuickGuid()
|
|
12
|
+
});
|
|
13
|
+
export const EditorConfigProvider = ({ children, editorConfig, fieldProps })=>{
|
|
14
|
+
// State to store the UUID
|
|
15
|
+
const [uuid, setUuid] = useState(generateQuickGuid());
|
|
16
|
+
// When the component mounts, generate a new UUID only once
|
|
17
|
+
useEffect(()=>{
|
|
18
|
+
setUuid(generateQuickGuid());
|
|
19
|
+
}, []);
|
|
20
|
+
const editorContext = useMemo(()=>({
|
|
21
|
+
editorConfig,
|
|
22
|
+
field: fieldProps,
|
|
23
|
+
uuid
|
|
24
|
+
}), [
|
|
25
|
+
editorConfig,
|
|
26
|
+
fieldProps,
|
|
27
|
+
uuid
|
|
28
|
+
]);
|
|
29
|
+
return /*#__PURE__*/ React.createElement(Context.Provider, {
|
|
30
|
+
value: editorContext
|
|
31
|
+
}, children);
|
|
32
|
+
};
|
|
33
|
+
export const useEditorConfigContext = ()=>{
|
|
34
|
+
const context = useContext(Context);
|
|
35
|
+
if (context === undefined) {
|
|
36
|
+
throw new Error('useEditorConfigContext must be used within an EditorConfigProvider');
|
|
37
|
+
}
|
|
38
|
+
return context;
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL3NyYy9maWVsZC9sZXhpY2FsL2NvbmZpZy9jbGllbnQvRWRpdG9yQ29uZml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mappings":"AACA,OAAO,KAAK,EAAE,YAAY,IAAI,mBAAmB,EAAE,MAAM,uBAAuB,CAAA;AAIhF,eAAO,MAAM,0BAA0B,EAAE,mBAGxC,CAAA"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { LexicalEditorTheme } from '../../theme/EditorTheme';
|
|
3
|
+
export const defaultEditorLexicalConfig = {
|
|
4
|
+
namespace: 'lexical',
|
|
5
|
+
theme: LexicalEditorTheme
|
|
6
|
+
};
|
|
7
|
+
|
|
8
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL3NyYy9maWVsZC9sZXhpY2FsL2NvbmZpZy9jbGllbnQvZGVmYXVsdC50cyJdLCJzb3VyY2VzQ29udGVudCI6WyIndXNlIGNsaWVudCdcbmltcG9ydCB0eXBlIHsgRWRpdG9yQ29uZmlnIGFzIExleGljYWxFZGl0b3JDb25maWcgfSBmcm9tICdsZXhpY2FsL0xleGljYWxFZGl0b3InXG5cbmltcG9ydCB7IExleGljYWxFZGl0b3JUaGVtZSB9IGZyb20gJy4uLy4uL3RoZW1lL0VkaXRvclRoZW1lJ1xuXG5leHBvcnQgY29uc3QgZGVmYXVsdEVkaXRvckxleGljYWxDb25maWc6IExleGljYWxFZGl0b3JDb25maWcgPSB7XG4gIG5hbWVzcGFjZTogJ2xleGljYWwnLFxuICB0aGVtZTogTGV4aWNhbEVkaXRvclRoZW1lLFxufVxuIl0sIm5hbWVzIjpbIkxleGljYWxFZGl0b3JUaGVtZSIsImRlZmF1bHRFZGl0b3JMZXhpY2FsQ29uZmlnIiwibmFtZXNwYWNlIiwidGhlbWUiXSwibWFwcGluZ3MiOiJBQUFBO0FBR0EsU0FBU0Esa0JBQWtCLFFBQVEsMEJBQXlCO0FBRTVELE9BQU8sTUFBTUMsNkJBQWtEO0lBQzdEQyxXQUFXO0lBQ1hDLE9BQU9IO0FBQ1QsRUFBQyJ9
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { ClientEditorConfig, ResolvedClientFeatureMap } from '@payloadcms/richtext-lexical';
|
|
2
|
+
/**
|
|
3
|
+
* This function expects client functions to ALREADY be ordered & dependencies checked on the server
|
|
4
|
+
* @param unSanitizedEditorConfig
|
|
5
|
+
*/
|
|
6
|
+
export declare function loadClientFeatures({ clientFunctions, schemaPath, unSanitizedEditorConfig, }: {
|
|
7
|
+
clientFunctions?: Record<string, any>;
|
|
8
|
+
schemaPath: string;
|
|
9
|
+
unSanitizedEditorConfig: ClientEditorConfig;
|
|
10
|
+
}): ResolvedClientFeatureMap;
|
|
11
|
+
//# sourceMappingURL=loader.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"loader.d.ts","sourceRoot":"","sources":["../../../../../src/field/lexical/config/client/loader.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,kBAAkB,EAGlB,wBAAwB,EACzB,MAAM,8BAA8B,CAAA;AAErC;;;GAGG;AACH,wBAAgB,kBAAkB,CAAC,EACjC,eAAe,EACf,UAAU,EACV,uBAAuB,GACxB,EAAE;IACD,eAAe,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;IACrC,UAAU,EAAE,MAAM,CAAA;IAClB,uBAAuB,EAAE,kBAAkB,CAAA;CAC5C,GAAG,wBAAwB,CA8D3B"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
/**
|
|
3
|
+
* This function expects client functions to ALREADY be ordered & dependencies checked on the server
|
|
4
|
+
* @param unSanitizedEditorConfig
|
|
5
|
+
*/ export function loadClientFeatures({ clientFunctions, schemaPath, unSanitizedEditorConfig }) {
|
|
6
|
+
for (const featureProvider of unSanitizedEditorConfig.features){
|
|
7
|
+
if (!featureProvider?.clientFeatureProps?.featureKey || featureProvider?.clientFeatureProps?.order === undefined || featureProvider?.clientFeatureProps?.order === null) {
|
|
8
|
+
throw new Error('A Feature you have installed does not return the client props as clientFeatureProps. Please make sure to always return those props, even if they are null, as other important props like order and featureKey are later on injected.');
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
// sort unSanitizedEditorConfig.features by order
|
|
12
|
+
unSanitizedEditorConfig.features = unSanitizedEditorConfig.features.sort((a, b)=>a.clientFeatureProps.order - b.clientFeatureProps.order);
|
|
13
|
+
const featureProviderMap = new Map(unSanitizedEditorConfig.features.map((f)=>[
|
|
14
|
+
f.clientFeatureProps.featureKey,
|
|
15
|
+
f
|
|
16
|
+
]));
|
|
17
|
+
const resolvedFeatures = new Map();
|
|
18
|
+
// Make sure all dependencies declared in the respective features exist
|
|
19
|
+
let loaded = 0;
|
|
20
|
+
for (const featureProvider of unSanitizedEditorConfig.features){
|
|
21
|
+
/**
|
|
22
|
+
* Load relevant clientFunctions scoped to this feature and then pass them to the client feature
|
|
23
|
+
*/ const relevantClientFunctions = {};
|
|
24
|
+
Object.entries(clientFunctions).forEach(([key, plugin])=>{
|
|
25
|
+
if (key.startsWith(`lexicalFeature.${schemaPath}.${featureProvider.clientFeatureProps.featureKey}.components.`)) {
|
|
26
|
+
const featureComponentKey = key.split(`${schemaPath}.${featureProvider.clientFeatureProps.featureKey}.components.`)[1];
|
|
27
|
+
relevantClientFunctions[featureComponentKey] = plugin;
|
|
28
|
+
}
|
|
29
|
+
});
|
|
30
|
+
const feature = featureProvider.feature({
|
|
31
|
+
clientFunctions: relevantClientFunctions,
|
|
32
|
+
featureProviderMap,
|
|
33
|
+
resolvedFeatures,
|
|
34
|
+
unSanitizedEditorConfig
|
|
35
|
+
});
|
|
36
|
+
resolvedFeatures.set(featureProvider.clientFeatureProps.featureKey, {
|
|
37
|
+
...feature,
|
|
38
|
+
key: featureProvider.clientFeatureProps.featureKey,
|
|
39
|
+
order: loaded
|
|
40
|
+
});
|
|
41
|
+
loaded++;
|
|
42
|
+
}
|
|
43
|
+
return resolvedFeatures;
|
|
44
|
+
}
|
|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QU9DLE9BQU8sQ0FBQ3JCLGlCQUFpQnNCLE9BQU8sQ0FBQyxDQUFDLENBQUNDLEtBQUtDLE9BQU87WUFDcEQsSUFDRUQsSUFBSUUsVUFBVSxDQUNaLENBQUMsZUFBZSxFQUFFeEIsV0FBVyxDQUFDLEVBQUVFLGdCQUFnQkUsa0JBQWtCLENBQUNDLFVBQVUsQ0FBQyxZQUFZLENBQUMsR0FFN0Y7Z0JBQ0EsTUFBTW9CLHNCQUFzQkgsSUFBSUksS0FBSyxDQUNuQyxDQUFDLEVBQUUxQixXQUFXLENBQUMsRUFBRUUsZ0JBQWdCRSxrQkFBa0IsQ0FBQ0MsVUFBVSxDQUFDLFlBQVksQ0FBQyxDQUM3RSxDQUFDLEVBQUU7Z0JBQ0phLHVCQUF1QixDQUFDTyxvQkFBb0IsR0FBR0Y7WUFDakQ7UUFDRjtRQUVBLE1BQU1JLFVBQVV6QixnQkFBZ0J5QixPQUFPLENBQUM7WUFDdEM1QixpQkFBaUJtQjtZQUNqQk47WUFDQUk7WUFDQWY7UUFDRjtRQUNBZSxpQkFBaUJZLEdBQUcsQ0FBQzFCLGdCQUFnQkUsa0JBQWtCLENBQUNDLFVBQVUsRUFBRTtZQUNsRSxHQUFHc0IsT0FBTztZQUNWTCxLQUFLcEIsZ0JBQWdCRSxrQkFBa0IsQ0FBQ0MsVUFBVTtZQUNsREMsT0FBT1c7UUFDVDtRQUVBQTtJQUNGO0lBRUEsT0FBT0Q7QUFDVCJ9
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { EditorConfig as LexicalEditorConfig } from 'lexical/LexicalEditor';
|
|
2
|
+
import type { ResolvedClientFeatureMap, SanitizedClientFeatures } from '../../../features/types';
|
|
3
|
+
import type { SanitizedClientEditorConfig } from '../types';
|
|
4
|
+
export declare const sanitizeClientFeatures: (features: ResolvedClientFeatureMap) => SanitizedClientFeatures;
|
|
5
|
+
export declare function sanitizeClientEditorConfig(lexical: LexicalEditorConfig, resolvedClientFeatureMap: ResolvedClientFeatureMap): SanitizedClientEditorConfig;
|
|
6
|
+
//# sourceMappingURL=sanitize.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sanitize.d.ts","sourceRoot":"","sources":["../../../../../src/field/lexical/config/client/sanitize.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,IAAI,mBAAmB,EAAE,MAAM,uBAAuB,CAAA;AAEhF,OAAO,KAAK,EAAE,wBAAwB,EAAE,uBAAuB,EAAE,MAAM,yBAAyB,CAAA;AAChG,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,UAAU,CAAA;AAE3D,eAAO,MAAM,sBAAsB,0CAEhC,uBA4IF,CAAA;AAED,wBAAgB,0BAA0B,CACxC,OAAO,EAAE,mBAAmB,EAC5B,wBAAwB,EAAE,wBAAwB,GACjD,2BAA2B,CAM7B"}
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
export const sanitizeClientFeatures = (features)=>{
|
|
3
|
+
const sanitized = {
|
|
4
|
+
enabledFeatures: [],
|
|
5
|
+
floatingSelectToolbar: {
|
|
6
|
+
sections: []
|
|
7
|
+
},
|
|
8
|
+
hooks: {
|
|
9
|
+
load: [],
|
|
10
|
+
save: []
|
|
11
|
+
},
|
|
12
|
+
markdownTransformers: [],
|
|
13
|
+
nodes: [],
|
|
14
|
+
plugins: [],
|
|
15
|
+
slashMenu: {
|
|
16
|
+
dynamicOptions: [],
|
|
17
|
+
groupsWithOptions: []
|
|
18
|
+
}
|
|
19
|
+
};
|
|
20
|
+
if (!features?.size) {
|
|
21
|
+
return sanitized;
|
|
22
|
+
}
|
|
23
|
+
features.forEach((feature)=>{
|
|
24
|
+
if (feature.hooks) {
|
|
25
|
+
if (feature.hooks?.load?.length) {
|
|
26
|
+
sanitized.hooks.load = sanitized.hooks.load.concat(feature.hooks.load);
|
|
27
|
+
}
|
|
28
|
+
if (feature.hooks?.save?.length) {
|
|
29
|
+
sanitized.hooks.save = sanitized.hooks.save.concat(feature.hooks.save);
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
if (feature.nodes?.length) {
|
|
33
|
+
sanitized.nodes = sanitized.nodes.concat(feature.nodes);
|
|
34
|
+
}
|
|
35
|
+
if (feature.plugins?.length) {
|
|
36
|
+
feature.plugins.forEach((plugin, i)=>{
|
|
37
|
+
sanitized.plugins.push({
|
|
38
|
+
Component: plugin.Component,
|
|
39
|
+
key: feature.key + i,
|
|
40
|
+
position: plugin.position
|
|
41
|
+
});
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
if (feature.floatingSelectToolbar?.sections?.length) {
|
|
45
|
+
for (const section of feature.floatingSelectToolbar.sections){
|
|
46
|
+
// 1. find the section with the same key or create new one
|
|
47
|
+
let foundSection = sanitized.floatingSelectToolbar.sections.find((sanitizedSection)=>sanitizedSection.key === section.key);
|
|
48
|
+
if (!foundSection) {
|
|
49
|
+
foundSection = {
|
|
50
|
+
...section,
|
|
51
|
+
entries: []
|
|
52
|
+
};
|
|
53
|
+
} else {
|
|
54
|
+
sanitized.floatingSelectToolbar.sections = sanitized.floatingSelectToolbar.sections.filter((sanitizedSection)=>sanitizedSection.key !== section.key);
|
|
55
|
+
}
|
|
56
|
+
// 2. Add options to group options array and add to sanitized.slashMenu.groupsWithOptions
|
|
57
|
+
if (section?.entries?.length) {
|
|
58
|
+
foundSection.entries = foundSection.entries.concat(section.entries);
|
|
59
|
+
}
|
|
60
|
+
sanitized.floatingSelectToolbar?.sections.push(foundSection);
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
if (feature.slashMenu?.options) {
|
|
64
|
+
if (feature.slashMenu.dynamicOptions?.length) {
|
|
65
|
+
sanitized.slashMenu.dynamicOptions = sanitized.slashMenu.dynamicOptions.concat(feature.slashMenu.dynamicOptions);
|
|
66
|
+
}
|
|
67
|
+
for (const optionGroup of feature.slashMenu.options){
|
|
68
|
+
// 1. find the group with the same name or create new one
|
|
69
|
+
let group = sanitized.slashMenu.groupsWithOptions.find((group)=>group.key === optionGroup.key);
|
|
70
|
+
if (!group) {
|
|
71
|
+
group = {
|
|
72
|
+
...optionGroup,
|
|
73
|
+
options: []
|
|
74
|
+
};
|
|
75
|
+
} else {
|
|
76
|
+
sanitized.slashMenu.groupsWithOptions = sanitized.slashMenu.groupsWithOptions.filter((group)=>group.key !== optionGroup.key);
|
|
77
|
+
}
|
|
78
|
+
// 2. Add options to group options array and add to sanitized.slashMenu.groupsWithOptions
|
|
79
|
+
if (optionGroup?.options?.length) {
|
|
80
|
+
group.options = group.options.concat(optionGroup.options);
|
|
81
|
+
}
|
|
82
|
+
sanitized.slashMenu.groupsWithOptions.push(group);
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
if (feature.markdownTransformers?.length) {
|
|
86
|
+
sanitized.markdownTransformers = sanitized.markdownTransformers.concat(feature.markdownTransformers);
|
|
87
|
+
}
|
|
88
|
+
sanitized.enabledFeatures.push(feature.key);
|
|
89
|
+
});
|
|
90
|
+
// Sort sanitized.floatingSelectToolbar.sections by order property
|
|
91
|
+
sanitized.floatingSelectToolbar.sections.sort((a, b)=>{
|
|
92
|
+
if (a.order && b.order) {
|
|
93
|
+
return a.order - b.order;
|
|
94
|
+
} else if (a.order) {
|
|
95
|
+
return -1;
|
|
96
|
+
} else if (b.order) {
|
|
97
|
+
return 1;
|
|
98
|
+
} else {
|
|
99
|
+
return 0;
|
|
100
|
+
}
|
|
101
|
+
});
|
|
102
|
+
// Sort sanitized.floatingSelectToolbar.sections.[section].entries by order property
|
|
103
|
+
for (const section of sanitized.floatingSelectToolbar.sections){
|
|
104
|
+
section.entries.sort((a, b)=>{
|
|
105
|
+
if (a.order && b.order) {
|
|
106
|
+
return a.order - b.order;
|
|
107
|
+
} else if (a.order) {
|
|
108
|
+
return -1;
|
|
109
|
+
} else if (b.order) {
|
|
110
|
+
return 1;
|
|
111
|
+
} else {
|
|
112
|
+
return 0;
|
|
113
|
+
}
|
|
114
|
+
});
|
|
115
|
+
}
|
|
116
|
+
return sanitized;
|
|
117
|
+
};
|
|
118
|
+
export function sanitizeClientEditorConfig(lexical, resolvedClientFeatureMap) {
|
|
119
|
+
return {
|
|
120
|
+
features: sanitizeClientFeatures(resolvedClientFeatureMap),
|
|
121
|
+
lexical,
|
|
122
|
+
resolvedFeatureMap: resolvedClientFeatureMap
|
|
123
|
+
};
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL3NyYy9maWVsZC9sZXhpY2FsL2NvbmZpZy9jbGllbnQvc2FuaXRpemUudHMiXSwic291cmNlc0NvbnRlbnQiOlsiJ3VzZSBjbGllbnQnXG5cbmltcG9ydCB0eXBlIHsgRWRpdG9yQ29uZmlnIGFzIExleGljYWxFZGl0b3JDb25maWcgfSBmcm9tICdsZXhpY2FsL0xleGljYWxFZGl0b3InXG5cbmltcG9ydCB0eXBlIHsgUmVzb2x2ZWRDbGllbnRGZWF0dXJlTWFwLCBTYW5pdGl6ZWRDbGllbnRGZWF0dXJlcyB9IGZyb20gJy4uLy4uLy4uL2ZlYXR1cmVzL3R5cGVzJ1xuaW1wb3J0IHR5cGUgeyBTYW5pdGl6ZWRDbGllbnRFZGl0b3JDb25maWcgfSBmcm9tICcuLi90eXBlcydcblxuZXhwb3J0IGNvbnN0IHNhbml0aXplQ2xpZW50RmVhdHVyZXMgPSAoXG4gIGZlYXR1cmVzOiBSZXNvbHZlZENsaWVudEZlYXR1cmVNYXAsXG4pOiBTYW5pdGl6ZWRDbGllbnRGZWF0dXJlcyA9PiB7XG4gIGNvbnN0IHNhbml0aXplZDogU2FuaXRpemVkQ2xpZW50RmVhdHVyZXMgPSB7XG4gICAgZW5hYmxlZEZlYXR1cmVzOiBbXSxcbiAgICBmbG9hdGluZ1NlbGVjdFRvb2xiYXI6IHtcbiAgICAgIHNlY3Rpb25zO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3BDO0FBQ1QsRUFBQztBQUVELE9BQU8sU0FBU3FDLDJCQUNkQyxPQUE0QixFQUM1QkMsd0JBQWtEO0lBRWxELE9BQU87UUFDTHhDLFVBQVVELHVCQUF1QnlDO1FBQ2pDRDtRQUNBRSxvQkFBb0JEO0lBQ3RCO0FBQ0YifQ==
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { EditorConfig as LexicalEditorConfig } from 'lexical/LexicalEditor';
|
|
2
|
+
import type { FeatureProviderServer } from '../../../features/types';
|
|
3
|
+
import type { SanitizedServerEditorConfig, ServerEditorConfig } from '../types';
|
|
4
|
+
export declare const defaultEditorLexicalConfig: LexicalEditorConfig;
|
|
5
|
+
export declare const defaultEditorFeatures: FeatureProviderServer<unknown, unknown>[];
|
|
6
|
+
export declare const defaultEditorConfig: ServerEditorConfig;
|
|
7
|
+
export declare const defaultSanitizedServerEditorConfig: SanitizedServerEditorConfig;
|
|
8
|
+
//# sourceMappingURL=default.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"default.d.ts","sourceRoot":"","sources":["../../../../../src/field/lexical/config/server/default.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,IAAI,mBAAmB,EAAE,MAAM,uBAAuB,CAAA;AAEhF,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAA;AACpE,OAAO,KAAK,EAAE,2BAA2B,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAA;AAuB/E,eAAO,MAAM,0BAA0B,EAAE,mBAGxC,CAAA;AAED,eAAO,MAAM,qBAAqB,EAAE,qBAAqB,CAAC,OAAO,EAAE,OAAO,CAAC,EAmB1E,CAAA;AAED,eAAO,MAAM,mBAAmB,EAAE,kBAGjC,CAAA;AAED,eAAO,MAAM,kCAAkC,EAAE,2BACA,CAAA"}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { AlignFeature } from '../../../features/align/feature.server';
|
|
2
|
+
import { BlockQuoteFeature } from '../../../features/blockquote/feature.server';
|
|
3
|
+
import { BoldFeature } from '../../../features/format/bold/feature.server';
|
|
4
|
+
import { InlineCodeFeature } from '../../../features/format/inlinecode/feature.server';
|
|
5
|
+
import { ItalicFeature } from '../../../features/format/italic/feature.server';
|
|
6
|
+
import { StrikethroughFeature } from '../../../features/format/strikethrough/feature.server';
|
|
7
|
+
import { SubscriptFeature } from '../../../features/format/subscript/feature.server';
|
|
8
|
+
import { SuperscriptFeature } from '../../../features/format/superscript/feature.server';
|
|
9
|
+
import { UnderlineFeature } from '../../../features/format/underline/feature.server';
|
|
10
|
+
import { HeadingFeature } from '../../../features/heading/feature.server';
|
|
11
|
+
import { IndentFeature } from '../../../features/indent/feature.server';
|
|
12
|
+
import { LinkFeature } from '../../../features/link/feature.server';
|
|
13
|
+
import { CheckListFeature } from '../../../features/lists/checklist/feature.server';
|
|
14
|
+
import { OrderedListFeature } from '../../../features/lists/orderedlist/feature.server';
|
|
15
|
+
import { UnorderedListFeature } from '../../../features/lists/unorderedlist/feature.server';
|
|
16
|
+
import { ParagraphFeature } from '../../../features/paragraph/feature.server';
|
|
17
|
+
import { RelationshipFeature } from '../../../features/relationship/feature.server';
|
|
18
|
+
import { UploadFeature } from '../../../features/upload/feature.server';
|
|
19
|
+
import { LexicalEditorTheme } from '../../theme/EditorTheme';
|
|
20
|
+
import { sanitizeServerEditorConfig } from './sanitize';
|
|
21
|
+
export const defaultEditorLexicalConfig = {
|
|
22
|
+
namespace: 'lexical',
|
|
23
|
+
theme: LexicalEditorTheme
|
|
24
|
+
};
|
|
25
|
+
export const defaultEditorFeatures = [
|
|
26
|
+
BoldFeature(),
|
|
27
|
+
ItalicFeature(),
|
|
28
|
+
UnderlineFeature(),
|
|
29
|
+
StrikethroughFeature(),
|
|
30
|
+
SubscriptFeature(),
|
|
31
|
+
SuperscriptFeature(),
|
|
32
|
+
InlineCodeFeature(),
|
|
33
|
+
ParagraphFeature(),
|
|
34
|
+
HeadingFeature(),
|
|
35
|
+
AlignFeature(),
|
|
36
|
+
IndentFeature(),
|
|
37
|
+
UnorderedListFeature(),
|
|
38
|
+
OrderedListFeature(),
|
|
39
|
+
CheckListFeature(),
|
|
40
|
+
LinkFeature(),
|
|
41
|
+
RelationshipFeature(),
|
|
42
|
+
BlockQuoteFeature(),
|
|
43
|
+
UploadFeature()
|
|
44
|
+
];
|
|
45
|
+
export const defaultEditorConfig = {
|
|
46
|
+
features: defaultEditorFeatures,
|
|
47
|
+
lexical: defaultEditorLexicalConfig
|
|
48
|
+
};
|
|
49
|
+
export const defaultSanitizedServerEditorConfig = sanitizeServerEditorConfig(defaultEditorConfig);
|
|
50
|
+
|
|
51
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL3NyYy9maWVsZC9sZXhpY2FsL2NvbmZpZy9zZXJ2ZXIvZGVmYXVsdC50cyJdLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgdHlwZSB7IEVkaXRvckNvbmZpZyBhcyBMZXhpY2FsRWRpdG9yQ29uZmlnIH0gZnJvbSAnbGV4aWNhbC9MZXhpY2FsRWRpdG9yJ1xuXG5pbXBvcnQgdHlwZSB7IEZlYXR1cmVQcm92aWRlclNlcnZlciB9IGZyb20gJy4uLy4uLy4uL2ZlYXR1cmVzL3R5cGVzJ1xuaW1wb3J0IHR5cGUgeyBTYW5pdGl6ZWRTZXJ2ZXJFZGl0b3JDb25maWcsIFNlcnZlckVkaXRvckNvbmZpZyB9IGZyb20gJy4uL3R5cGVzJ1xuXG5pbXBvcnQgeyBBbGlnbkZlYXR1cmUgfSBmcm9tICcuLi8uLi8uLi9mZWF0dXJlcy9hbGlnbi9mZWF0dXJlLnNlcnZlcidcbmltcG9ydCB7IEJsb2NrUXVvdGVGZWF0dXJlIH0gZnJvbSAnLi4vLi4vLi4vZmVhdHVyZXMvYmxvY2txdW90ZS9mZWF0dXJlLnNlcnZlcidc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LGdCQUFnQixRQUFRLG9EQUFtRDtBQUNwRixTQUFTQyxjQUFjLFFBQVEsMkNBQTBDO0FBQ3pFLFNBQVNDLGFBQWEsUUFBUSwwQ0FBeUM7QUFDdkUsU0FBU0MsV0FBVyxRQUFRLHdDQUF1QztBQUNuRSxTQUFTQyxnQkFBZ0IsUUFBUSxtREFBa0Q7QUFDbkYsU0FBU0Msa0JBQWtCLFFBQVEscURBQW9EO0FBQ3ZGLFNBQVNDLG9CQUFvQixRQUFRLHVEQUFzRDtBQUMzRixTQUFTQyxnQkFBZ0IsUUFBUSw2Q0FBNEM7QUFDN0UsU0FBU0MsbUJBQW1CLFFBQVEsZ0RBQStDO0FBQ25GLFNBQVNDLGFBQWEsUUFBUSwwQ0FBeUM7QUFDdkUsU0FBU0Msa0JBQWtCLFFBQVEsMEJBQXlCO0FBQzVELFNBQVNDLDBCQUEwQixRQUFRLGFBQVk7QUFFdkQsT0FBTyxNQUFNQyw2QkFBa0Q7SUFDN0RDLFdBQVc7SUFDWEMsT0FBT0o7QUFDVCxFQUFDO0FBRUQsT0FBTyxNQUFNSyx3QkFBbUU7SUFDOUVyQjtJQUNBRTtJQUNBSTtJQUNBSDtJQUNBQztJQUNBQztJQUNBSjtJQUNBWTtJQUNBTjtJQUNBVDtJQUNBVTtJQUNBSTtJQUNBRDtJQUNBRDtJQUNBRDtJQUNBSztJQUNBZjtJQUNBZ0I7Q0FDRCxDQUFBO0FBRUQsT0FBTyxNQUFNTyxzQkFBMEM7SUFDckRDLFVBQVVGO0lBQ1ZHLFNBQVNOO0FBQ1gsRUFBQztBQUVELE9BQU8sTUFBTU8scUNBQ1hSLDJCQUEyQksscUJBQW9CIn0=
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { FeatureProviderServer, ResolvedServerFeatureMap } from '../../../features/types';
|
|
2
|
+
import type { ServerEditorConfig } from '../types';
|
|
3
|
+
export declare function sortFeaturesForOptimalLoading(featureProviders: FeatureProviderServer<unknown, unknown>[]): FeatureProviderServer<unknown, unknown>[];
|
|
4
|
+
export declare function loadFeatures({ unSanitizedEditorConfig, }: {
|
|
5
|
+
unSanitizedEditorConfig: ServerEditorConfig;
|
|
6
|
+
}): ResolvedServerFeatureMap;
|
|
7
|
+
//# sourceMappingURL=loader.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"loader.d.ts","sourceRoot":"","sources":["../../../../../src/field/lexical/config/server/loader.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,qBAAqB,EACrB,wBAAwB,EAEzB,MAAM,yBAAyB,CAAA;AAChC,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAA;AA8FlD,wBAAgB,6BAA6B,CAC3C,gBAAgB,EAAE,qBAAqB,CAAC,OAAO,EAAE,OAAO,CAAC,EAAE,GAC1D,qBAAqB,CAAC,OAAO,EAAE,OAAO,CAAC,EAAE,CAE3C;AAED,wBAAgB,YAAY,CAAC,EAC3B,uBAAuB,GACxB,EAAE;IACD,uBAAuB,EAAE,kBAAkB,CAAA;CAC5C,GAAG,wBAAwB,CA8E3B"}
|