@payloadcms/richtext-lexical 0.7.0 → 3.0.0-alpha.18
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 +3 -3
- package/dist/cell/index.d.ts +4 -4
- package/dist/cell/index.d.ts.map +1 -1
- package/dist/cell/index.js +93 -23
- package/dist/exports/components.d.ts +1 -1
- package/dist/exports/components.d.ts.map +1 -1
- package/dist/exports/components.js +3 -3
- package/dist/field/Field.d.ts +8 -3
- package/dist/field/Field.d.ts.map +1 -1
- package/dist/field/Field.js +16 -37
- 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 +81 -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 +26 -0
- package/dist/field/features/align/floatingSelectToolbarAlignDropdownSection.d.ts.map +1 -1
- package/dist/field/features/align/floatingSelectToolbarAlignDropdownSection.js +5 -46
- 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 +77 -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 +56 -0
- package/dist/field/features/blockquote/markdownTransformer.d.ts.map +1 -0
- package/dist/field/features/blockquote/markdownTransformer.js +50 -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 +214 -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 +34 -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 +172 -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 +137 -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 +71 -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 +96 -0
- package/dist/field/features/blocks/nodes/BlocksNode.d.ts.map +1 -0
- package/dist/field/features/blocks/nodes/BlocksNode.js +158 -0
- package/dist/field/features/blocks/plugin/commands.d.ts.map +1 -0
- package/dist/field/features/blocks/plugin/commands.js +14 -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 +91 -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 +55 -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 +59 -0
- package/dist/field/features/common/floatingSelectToolbarFeaturesButtonsSection/index.js +3 -3
- package/dist/field/features/common/floatingSelectToolbarTextDropdownSection/index.d.ts.map +1 -1
- package/dist/field/features/common/floatingSelectToolbarTextDropdownSection/index.js +5 -46
- package/dist/field/features/converters/html/converter/converters/paragraph.d.ts.map +1 -1
- package/dist/field/features/converters/html/converter/converters/paragraph.js +4 -3
- 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 -6
- 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/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 +24 -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 +8 -7
- 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 +20 -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 +24 -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 +30 -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 +25 -0
- package/dist/field/features/debug/testrecorder/plugin/index.d.ts.map +1 -0
- package/dist/field/features/debug/testrecorder/plugin/index.js +504 -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 +30 -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 +25 -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 +70 -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 +57 -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 +37 -0
- package/dist/field/features/format/bold/markdownTransformers.d.ts.map +1 -0
- package/dist/field/features/format/bold/markdownTransformers.js +58 -0
- package/dist/field/features/format/common/floatingSelectToolbarSection.js +3 -3
- 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 +52 -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 +29 -0
- package/dist/field/features/format/inlinecode/markdownTransformers.d.ts.map +1 -0
- package/dist/field/features/format/inlinecode/markdownTransformers.js +19 -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 +53 -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 +30 -0
- package/dist/field/features/format/italic/markdownTransformers.d.ts.map +1 -0
- package/dist/field/features/format/italic/markdownTransformers.js +35 -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 +52 -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 +29 -0
- package/dist/field/features/format/strikethrough/markdownTransformers.js +3 -3
- 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 +48 -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 +25 -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 +48 -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 +25 -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 +48 -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 +25 -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 +104 -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 +67 -0
- package/dist/field/features/heading/markdownTransformer.d.ts.map +1 -0
- package/dist/field/features/heading/markdownTransformer.js +39 -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 +67 -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 +26 -0
- package/dist/field/features/indent/floatingSelectToolbarIndentSection.js +3 -3
- package/dist/field/features/link/drawer/baseFields.d.ts.map +1 -0
- package/dist/field/features/link/drawer/baseFields.js +128 -0
- package/dist/field/features/link/drawer/index.d.ts.map +1 -0
- package/dist/field/features/link/drawer/index.js +133 -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/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 +98 -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 +108 -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 +79 -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 +326 -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/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 +336 -0
- package/dist/field/features/link/plugins/clickableLink/index.d.ts.map +1 -0
- package/dist/field/features/link/plugins/clickableLink/index.js +23 -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 +14 -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 +293 -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 +64 -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/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 +45 -0
- package/dist/field/features/link/plugins/link/index.d.ts.map +1 -0
- package/dist/field/features/link/plugins/link/index.js +69 -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 +56 -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 +91 -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 +45 -0
- package/dist/field/features/lists/checklist/markdownTransformers.d.ts.map +1 -0
- package/dist/field/features/lists/checklist/markdownTransformers.js +26 -0
- package/dist/field/features/lists/checklist/plugin/index.d.ts.map +1 -0
- package/dist/field/features/lists/checklist/plugin/index.js +23 -0
- package/dist/field/features/lists/common/markdown.js +1 -1
- package/dist/field/features/lists/htmlConverter.d.ts.map +1 -1
- package/dist/field/features/lists/htmlConverter.js +7 -5
- 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 +81 -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 +45 -0
- package/dist/field/features/lists/orderedlist/markdownTransformer.d.ts.map +1 -0
- package/dist/field/features/lists/orderedlist/markdownTransformer.js +26 -0
- 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 +81 -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 +45 -0
- package/dist/field/features/lists/unorderedlist/markdownTransformer.d.ts.map +1 -0
- package/dist/field/features/lists/unorderedlist/markdownTransformer.js +26 -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 +16 -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 +30 -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 +18 -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 +16 -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 +41 -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 +18 -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 +16 -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 +32 -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 +18 -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 +16 -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 +32 -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 +18 -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 +16 -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 +30 -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 +18 -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 +16 -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 +36 -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 +18 -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 +16 -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 +35 -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 +18 -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 +28 -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 +87 -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/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 +44 -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 +57 -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 +23 -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 +131 -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 +16 -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 +33 -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 +18 -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 +16 -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 +39 -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 +18 -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 +16 -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 +45 -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 +18 -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 +16 -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 +40 -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 +18 -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 +16 -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 +35 -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 +18 -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 +16 -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 +36 -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 +18 -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 +16 -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 +28 -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 +18 -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 +16 -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 +37 -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 +18 -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 +16 -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 +36 -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 +18 -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 +16 -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 +31 -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 +18 -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 +34 -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 +134 -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 +6 -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 +44 -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 +57 -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 +23 -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 +131 -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 +73 -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 +26 -0
- package/dist/field/features/relationship/drawer/commands.d.ts.map +1 -0
- package/dist/field/features/relationship/drawer/commands.js +14 -0
- package/dist/field/features/relationship/drawer/index.d.ts.map +1 -0
- package/dist/field/features/relationship/drawer/index.js +130 -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 +66 -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 +36 -0
- package/dist/field/features/relationship/nodes/RelationshipNode.d.ts.map +1 -0
- package/dist/field/features/relationship/nodes/RelationshipNode.js +172 -0
- package/dist/field/features/relationship/nodes/components/RelationshipComponent.d.ts.map +1 -0
- package/dist/field/features/relationship/nodes/components/RelationshipComponent.js +154 -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 +107 -0
- package/dist/field/features/relationship/populationPromise.d.ts.map +1 -0
- package/dist/field/features/relationship/populationPromise.js +34 -0
- package/dist/field/features/relationship/utils/EnabledRelationshipsCondition.d.ts.map +1 -0
- package/dist/field/features/relationship/utils/EnabledRelationshipsCondition.js +84 -0
- package/dist/field/features/types.d.ts +139 -70
- package/dist/field/features/types.d.ts.map +1 -1
- package/dist/field/features/upload/component/ExtraFieldsDrawer/index.d.ts.map +1 -0
- package/dist/field/features/upload/component/ExtraFieldsDrawer/index.js +158 -0
- package/dist/field/features/upload/component/index.d.ts.map +1 -0
- package/dist/field/features/upload/component/index.js +186 -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 +15 -0
- package/dist/field/features/upload/drawer/index.d.ts.map +1 -0
- package/dist/field/features/upload/drawer/index.js +127 -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 +65 -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 +113 -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 +160 -0
- package/dist/field/features/upload/plugin/index.d.ts.map +1 -0
- package/dist/field/features/upload/plugin/index.js +111 -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 +56 -0
- package/dist/field/features/upload/validate.d.ts.map +1 -0
- package/dist/field/features/upload/validate.js +29 -0
- package/dist/field/index.d.ts +7 -2
- package/dist/field/index.d.ts.map +1 -1
- package/dist/field/index.js +77 -5
- package/dist/field/index.scss +2 -2
- package/dist/field/lexical/EditorPlugin.d.ts.map +1 -1
- package/dist/field/lexical/EditorPlugin.js +4 -12
- package/dist/field/lexical/LexicalEditor.js +2 -2
- 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 +18 -20
- 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 +99 -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 +18 -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 +53 -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 +144 -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 +75 -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 +136 -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 +83 -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/nodes/index.d.ts +2 -2
- package/dist/field/lexical/nodes/index.d.ts.map +1 -1
- package/dist/field/lexical/nodes/index.js +7 -2
- 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 +9 -9
- package/dist/field/lexical/plugins/FloatingSelectToolbar/ToolbarDropdown/index.d.ts.map +1 -1
- package/dist/field/lexical/plugins/FloatingSelectToolbar/ToolbarDropdown/index.js +8 -58
- 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 +8 -28
- 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/MarkdownShortcut/index.js +2 -2
- 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 +1 -8
- 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 +1 -1
- package/dist/field/lexical/plugins/SlashMenu/index.d.ts.map +1 -1
- package/dist/field/lexical/plugins/SlashMenu/index.js +6 -13
- package/dist/field/lexical/plugins/SlashMenu/index.scss +1 -1
- package/dist/field/lexical/plugins/handles/AddBlockHandlePlugin/index.scss +0 -2
- package/dist/field/lexical/plugins/handles/DraggableBlockPlugin/index.scss +0 -2
- package/dist/field/lexical/theme/EditorTheme.scss +0 -2
- package/dist/generateComponentMap.d.ts +6 -0
- package/dist/generateComponentMap.d.ts.map +1 -0
- package/dist/generateComponentMap.js +92 -0
- package/dist/generateSchemaMap.d.ts +6 -0
- package/dist/generateSchemaMap.d.ts.map +1 -0
- package/dist/generateSchemaMap.js +37 -0
- package/dist/index.d.ts +59 -56
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +138 -109
- package/dist/populate/defaultValue.js +6 -6
- package/dist/populate/recurseNestedFields.d.ts.map +1 -1
- package/dist/populate/recurseNestedFields.js +3 -1
- package/dist/populate/richTextRelationshipPromise.js +2 -2
- 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/useLexicalFeature.d.ts +3 -0
- package/dist/useLexicalFeature.d.ts.map +1 -0
- package/dist/useLexicalFeature.js +19 -0
- package/dist/validate/index.d.ts +4 -4
- package/dist/validate/index.d.ts.map +1 -1
- package/dist/validate/index.js +2 -3
- package/dist/validate/validateNodes.d.ts +2 -4
- package/dist/validate/validateNodes.d.ts.map +1 -1
- package/dist/validate/validateNodes.js +2 -4
- 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/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/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/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/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}/drawer/types.js +0 -0
- /package/dist/field/features/{Link/plugins/floatingLinkEditor → link/nodes}/types.js +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/{migrations/LexicalPluginToLexical/converter → link/plugins/floatingLinkEditor}/types.js +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/{SlateToLexical → lexicalPluginToLexical}/converter/types.js +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
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/field/features/blocks/component/index.tsx"],"names":[],"mappings":"AAWA,OAAO,KAAoD,MAAM,OAAO,CAAA;AAExE,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,qBAAqB,CAAA;AAatD,OAAO,cAAc,CAAA;AAErB,KAAK,KAAK,GAAG;IACX,qBAAqB,EAAE,MAAM,CAAA;IAC7B,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAE1B,QAAQ,EAAE,WAAW,CAAA;IACrB,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB;;OAEG;IACH,mBAAmB,EAAE,WAAW,CAAA;CACjC,CAAA;AAED,eAAO,MAAM,cAAc,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,CAuH1C,CAAA"}
|
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
"use strict";
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
Object.defineProperty(exports, "BlockComponent", {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: function() {
|
|
9
|
+
return BlockComponent;
|
|
10
|
+
}
|
|
11
|
+
});
|
|
12
|
+
const _ui = require("@payloadcms/ui");
|
|
13
|
+
const _react = /*#__PURE__*/ _interop_require_wildcard(require("react"));
|
|
14
|
+
const _uuid = require("uuid");
|
|
15
|
+
const _EditorConfigProvider = require("../../../lexical/config/client/EditorConfigProvider");
|
|
16
|
+
const _BlockContent = require("./BlockContent");
|
|
17
|
+
require("./index.scss");
|
|
18
|
+
function _getRequireWildcardCache(nodeInterop) {
|
|
19
|
+
if (typeof WeakMap !== "function") return null;
|
|
20
|
+
var cacheBabelInterop = new WeakMap();
|
|
21
|
+
var cacheNodeInterop = new WeakMap();
|
|
22
|
+
return (_getRequireWildcardCache = function(nodeInterop) {
|
|
23
|
+
return nodeInterop ? cacheNodeInterop : cacheBabelInterop;
|
|
24
|
+
})(nodeInterop);
|
|
25
|
+
}
|
|
26
|
+
function _interop_require_wildcard(obj, nodeInterop) {
|
|
27
|
+
if (!nodeInterop && obj && obj.__esModule) {
|
|
28
|
+
return obj;
|
|
29
|
+
}
|
|
30
|
+
if (obj === null || typeof obj !== "object" && typeof obj !== "function") {
|
|
31
|
+
return {
|
|
32
|
+
default: obj
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
var cache = _getRequireWildcardCache(nodeInterop);
|
|
36
|
+
if (cache && cache.has(obj)) {
|
|
37
|
+
return cache.get(obj);
|
|
38
|
+
}
|
|
39
|
+
var newObj = {
|
|
40
|
+
__proto__: null
|
|
41
|
+
};
|
|
42
|
+
var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
|
|
43
|
+
for(var key in obj){
|
|
44
|
+
if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) {
|
|
45
|
+
var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null;
|
|
46
|
+
if (desc && (desc.get || desc.set)) {
|
|
47
|
+
Object.defineProperty(newObj, key, desc);
|
|
48
|
+
} else {
|
|
49
|
+
newObj[key] = obj[key];
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
newObj.default = obj;
|
|
54
|
+
if (cache) {
|
|
55
|
+
cache.set(obj, newObj);
|
|
56
|
+
}
|
|
57
|
+
return newObj;
|
|
58
|
+
}
|
|
59
|
+
const baseClass = 'lexical-block';
|
|
60
|
+
const BlockComponent = (props)=>{
|
|
61
|
+
const { blockFieldWrapperName, formData, nodeKey } = props;
|
|
62
|
+
const config = (0, _ui.useConfig)();
|
|
63
|
+
const submitted = (0, _ui.useFormSubmitted)();
|
|
64
|
+
const { id } = (0, _ui.useDocumentInfo)();
|
|
65
|
+
const { schemaPath } = (0, _ui.useFieldPath)();
|
|
66
|
+
const { editorConfig, field: parentLexicalRichTextField } = (0, _EditorConfigProvider.useEditorConfigContext)();
|
|
67
|
+
const [initialState, setInitialState] = (0, _react.useState)(false);
|
|
68
|
+
const { field: { richTextComponentMap } } = (0, _EditorConfigProvider.useEditorConfigContext)();
|
|
69
|
+
const componentMapRenderedFieldsPath = `feature.blocks.fields.${formData?.blockType}`;
|
|
70
|
+
const schemaFieldsPath = `${schemaPath}.feature.blocks.${formData?.blockType}`;
|
|
71
|
+
const reducedBlock = editorConfig?.resolvedFeatureMap?.get('blocks')?.clientFeatureProps?.reducedBlocks?.find((block)=>block.slug === formData?.blockType);
|
|
72
|
+
const fieldMap = richTextComponentMap.get(componentMapRenderedFieldsPath);
|
|
73
|
+
// Field Schema
|
|
74
|
+
(0, _react.useEffect)(()=>{
|
|
75
|
+
const awaitInitialState = async ()=>{
|
|
76
|
+
const state = await (0, _ui.getFormState)({
|
|
77
|
+
apiRoute: config.routes.api,
|
|
78
|
+
body: {
|
|
79
|
+
id,
|
|
80
|
+
data: JSON.parse(JSON.stringify(formData)),
|
|
81
|
+
operation: 'update',
|
|
82
|
+
schemaPath: schemaFieldsPath
|
|
83
|
+
},
|
|
84
|
+
serverURL: config.serverURL
|
|
85
|
+
}) // Form State
|
|
86
|
+
;
|
|
87
|
+
if (state) {
|
|
88
|
+
setInitialState({
|
|
89
|
+
...state,
|
|
90
|
+
blockName2: {
|
|
91
|
+
initialValue: '',
|
|
92
|
+
passesCondition: true,
|
|
93
|
+
valid: true,
|
|
94
|
+
value: formData.blockName
|
|
95
|
+
}
|
|
96
|
+
});
|
|
97
|
+
}
|
|
98
|
+
};
|
|
99
|
+
if (formData) {
|
|
100
|
+
void awaitInitialState();
|
|
101
|
+
}
|
|
102
|
+
}, [
|
|
103
|
+
config.routes.api,
|
|
104
|
+
config.serverURL,
|
|
105
|
+
schemaFieldsPath,
|
|
106
|
+
id
|
|
107
|
+
]);
|
|
108
|
+
const onChange = (0, _react.useCallback)(async ({ formState: prevFormState })=>{
|
|
109
|
+
const formState = await (0, _ui.getFormState)({
|
|
110
|
+
apiRoute: config.routes.api,
|
|
111
|
+
body: {
|
|
112
|
+
id,
|
|
113
|
+
formState: prevFormState,
|
|
114
|
+
operation: 'update',
|
|
115
|
+
schemaPath: schemaFieldsPath
|
|
116
|
+
},
|
|
117
|
+
serverURL: config.serverURL
|
|
118
|
+
});
|
|
119
|
+
return {
|
|
120
|
+
...formState,
|
|
121
|
+
blockName2: {
|
|
122
|
+
initialValue: '',
|
|
123
|
+
passesCondition: true,
|
|
124
|
+
valid: true,
|
|
125
|
+
value: formData.blockName
|
|
126
|
+
}
|
|
127
|
+
};
|
|
128
|
+
}, [
|
|
129
|
+
config.routes.api,
|
|
130
|
+
config.serverURL,
|
|
131
|
+
schemaFieldsPath,
|
|
132
|
+
id,
|
|
133
|
+
formData.blockName
|
|
134
|
+
]);
|
|
135
|
+
// Memoized Form JSX
|
|
136
|
+
const formContent = (0, _react.useMemo)(()=>{
|
|
137
|
+
return reducedBlock && initialState !== false && /*#__PURE__*/ _react.default.createElement(_ui.FieldPathProvider, {
|
|
138
|
+
path: "",
|
|
139
|
+
schemaPath: ""
|
|
140
|
+
}, /*#__PURE__*/ _react.default.createElement(_ui.Form, {
|
|
141
|
+
// @ts-expect-error // TODO: Fix this type. Is this correct?
|
|
142
|
+
fields: fieldMap,
|
|
143
|
+
initialState: initialState,
|
|
144
|
+
onChange: [
|
|
145
|
+
onChange
|
|
146
|
+
],
|
|
147
|
+
submitted: submitted,
|
|
148
|
+
uuid: (0, _uuid.v4)()
|
|
149
|
+
}, /*#__PURE__*/ _react.default.createElement(_BlockContent.BlockContent, {
|
|
150
|
+
baseClass: baseClass,
|
|
151
|
+
field: parentLexicalRichTextField,
|
|
152
|
+
formData: formData,
|
|
153
|
+
formSchema: Array.isArray(fieldMap) ? fieldMap : [],
|
|
154
|
+
nodeKey: nodeKey,
|
|
155
|
+
reducedBlock: reducedBlock
|
|
156
|
+
})));
|
|
157
|
+
}, [
|
|
158
|
+
fieldMap,
|
|
159
|
+
parentLexicalRichTextField,
|
|
160
|
+
nodeKey,
|
|
161
|
+
submitted,
|
|
162
|
+
initialState,
|
|
163
|
+
reducedBlock,
|
|
164
|
+
blockFieldWrapperName,
|
|
165
|
+
onChange
|
|
166
|
+
]);
|
|
167
|
+
return /*#__PURE__*/ _react.default.createElement("div", {
|
|
168
|
+
className: baseClass
|
|
169
|
+
}, formContent);
|
|
170
|
+
};
|
|
171
|
+
|
|
172
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL3NyYy9maWVsZC9mZWF0dXJlcy9ibG9ja3MvY29tcG9uZW50L2luZGV4LnRzeCJd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QkFBaUI7Z0JBQ2pCQyxPQUFPO2dCQUNQQyxPQUFPaEQsU0FBU2lELFNBQVM7WUFDM0I7UUFDRjtJQUNGLEdBRUE7UUFBQy9DLE9BQU9pQyxNQUFNLENBQUNDLEdBQUc7UUFBRWxDLE9BQU95QyxTQUFTO1FBQUV2QjtRQUFrQmQ7UUFBSU4sU0FBU2lELFNBQVM7S0FBQztJQUdqRixvQkFBb0I7SUFDcEIsTUFBTUssY0FBY0MsSUFBQUEsY0FBTyxFQUFDO1FBQzFCLE9BQ0VsQyxnQkFDQVAsaUJBQWlCLHVCQUNmLDZCQUFDMEMscUJBQWlCO1lBQUNDLE1BQUs7WUFBR2pELFlBQVc7eUJBQ3BDLDZCQUFDa0QsUUFBSTtZQUNILDREQUE0RDtZQUM1REMsUUFBUTlCO1lBQ1JmLGNBQWNBO1lBQ2RvQyxVQUFVO2dCQUFDQTthQUFTO1lBQ3BCOUMsV0FBV0E7WUFDWHdELE1BQU1BLElBQUFBLFFBQUk7eUJBRVYsNkJBQUNDLDBCQUFZO1lBQ1hoRSxXQUFXQTtZQUNYYyxPQUFPQztZQUNQWixVQUFVQTtZQUNWOEQsWUFBWUMsTUFBTUMsT0FBTyxDQUFDbkMsWUFBWUEsV0FBVyxFQUFFO1lBQ25ENUIsU0FBU0E7WUFDVG9CLGNBQWNBOztJQU0xQixHQUFHO1FBQ0RRO1FBQ0FqQjtRQUNBWDtRQUNBRztRQUNBVTtRQUNBTztRQUNBdEI7UUFDQW1EO0tBQ0Q7SUFFRCxxQkFBTyw2QkFBQ2U7UUFBSUMsV0FBV3JFO09BQVl5RDtBQUNyQyJ9
|
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
@import '../../../../scss/styles.scss';
|
|
2
|
+
|
|
3
|
+
.ContentEditable__root > div:has(.lexical-block) {
|
|
4
|
+
// Fixes a bug where, if the block field has a Select field, the Select field's dropdown menu would be hidden behind the lexical editor.
|
|
5
|
+
z-index: 1;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
.lexical-block {
|
|
9
|
+
display: flex;
|
|
10
|
+
flex-direction: column;
|
|
11
|
+
gap: calc(var(--base) / 2);
|
|
12
|
+
font-family: var(
|
|
13
|
+
--font-body
|
|
14
|
+
); // Reset font to non-serif, body font, as the lexical editor parent uses a serif font.
|
|
15
|
+
|
|
16
|
+
margin: 0 0 1.5em;
|
|
17
|
+
|
|
18
|
+
&__header {
|
|
19
|
+
h3 {
|
|
20
|
+
margin: 0;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
&__header-wrap {
|
|
25
|
+
display: flex;
|
|
26
|
+
align-items: flex-end;
|
|
27
|
+
width: 100%;
|
|
28
|
+
justify-content: space-between;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
&__heading-with-error {
|
|
32
|
+
display: flex;
|
|
33
|
+
align-items: center;
|
|
34
|
+
gap: calc(var(--base) * 0.5);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
&--has-no-error {
|
|
38
|
+
> .array-field__header .array-field__heading-with-error {
|
|
39
|
+
color: var(--theme-text);
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
&--has-error {
|
|
44
|
+
> .array-field__header {
|
|
45
|
+
color: var(--theme-error-500);
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
&__error-pill {
|
|
50
|
+
align-self: center;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
&__header-actions {
|
|
54
|
+
list-style: none;
|
|
55
|
+
margin: 0;
|
|
56
|
+
padding: 0;
|
|
57
|
+
display: flex;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
&__header-action {
|
|
61
|
+
@extend %btn-reset;
|
|
62
|
+
cursor: pointer;
|
|
63
|
+
margin-left: calc(var(--base) * 0.5);
|
|
64
|
+
|
|
65
|
+
&:hover,
|
|
66
|
+
&:focus-visible {
|
|
67
|
+
text-decoration: underline;
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
.collapsible {
|
|
72
|
+
&__header-wrap {
|
|
73
|
+
// Make more space for the block header (default right: is `calc(var(--base) * 3)`) so that the remove button aligns nicely to the right
|
|
74
|
+
right: calc(var(--base) * 1.5);
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
&__removeButton.btn {
|
|
79
|
+
margin: 0;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
&__block-header {
|
|
83
|
+
pointer-events: none;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
&__block-header * {
|
|
87
|
+
pointer-events: all;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
&__block-header,
|
|
91
|
+
&__block-header > div {
|
|
92
|
+
display: flex;
|
|
93
|
+
max-width: 100%;
|
|
94
|
+
overflow: hidden;
|
|
95
|
+
gap: calc(var(--base) * 0.375);
|
|
96
|
+
justify-content: space-between;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
&__block-number {
|
|
100
|
+
flex-shrink: 0;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
&__block-pill {
|
|
104
|
+
flex-shrink: 0;
|
|
105
|
+
display: block;
|
|
106
|
+
line-height: unset;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
&__error-wrap {
|
|
110
|
+
position: relative;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
&__rows {
|
|
114
|
+
display: flex;
|
|
115
|
+
flex-direction: column;
|
|
116
|
+
gap: calc(var(--base) / 2);
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
&__drawer-toggler {
|
|
120
|
+
background-color: transparent;
|
|
121
|
+
margin: 0;
|
|
122
|
+
padding: 0;
|
|
123
|
+
border: none;
|
|
124
|
+
align-self: flex-start;
|
|
125
|
+
|
|
126
|
+
.btn {
|
|
127
|
+
color: var(--theme-elevation-400);
|
|
128
|
+
margin: 0;
|
|
129
|
+
|
|
130
|
+
&:hover {
|
|
131
|
+
color: var(--theme-elevation-800);
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
html[data-theme='light'] {
|
|
138
|
+
.blocks-field--has-error {
|
|
139
|
+
.section-title__input,
|
|
140
|
+
.blocks-field__heading-with-error {
|
|
141
|
+
color: var(--theme-error-750);
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
html[data-theme='dark'] {
|
|
147
|
+
.blocks-field--has-error {
|
|
148
|
+
.section-title__input,
|
|
149
|
+
.blocks-field__heading-with-error {
|
|
150
|
+
color: var(--theme-error-500);
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/field/features/blocks/drawer/index.tsx"],"names":[],"mappings":"AAIA,OAAO,EAGL,KAAK,cAAc,EAGpB,MAAM,SAAS,CAAA;AAChB,OAAO,KAA2C,MAAM,OAAO,CAAA;AAU/D,eAAO,MAAM,gCAAgC,EAAE,cAAc,CAAC;IAC5D,OAAO,EAAE;QAAE,OAAO,EAAE,MAAM,CAAA;KAAE,GAAG,KAAK,CAAA;CACrC,CAAqD,CAAA;AAiCtD,eAAO,MAAM,qBAAqB,EAAE,KAAK,CAAC,EA0DzC,CAAA"}
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
"use strict";
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
function _export(target, all) {
|
|
7
|
+
for(var name in all)Object.defineProperty(target, name, {
|
|
8
|
+
enumerable: true,
|
|
9
|
+
get: all[name]
|
|
10
|
+
});
|
|
11
|
+
}
|
|
12
|
+
_export(exports, {
|
|
13
|
+
BlocksDrawerComponent: function() {
|
|
14
|
+
return BlocksDrawerComponent;
|
|
15
|
+
},
|
|
16
|
+
INSERT_BLOCK_WITH_DRAWER_COMMAND: function() {
|
|
17
|
+
return INSERT_BLOCK_WITH_DRAWER_COMMAND;
|
|
18
|
+
}
|
|
19
|
+
});
|
|
20
|
+
const _modal = require("@faceless-ui/modal");
|
|
21
|
+
const _LexicalComposerContext = require("@lexical/react/LexicalComposerContext");
|
|
22
|
+
const _ui = require("@payloadcms/ui");
|
|
23
|
+
const _lexical = require("lexical");
|
|
24
|
+
const _react = /*#__PURE__*/ _interop_require_wildcard(require("react"));
|
|
25
|
+
const _EditorConfigProvider = require("../../../lexical/config/client/EditorConfigProvider");
|
|
26
|
+
const _BlocksNode = require("../nodes/BlocksNode");
|
|
27
|
+
const _commands = require("../plugin/commands");
|
|
28
|
+
function _getRequireWildcardCache(nodeInterop) {
|
|
29
|
+
if (typeof WeakMap !== "function") return null;
|
|
30
|
+
var cacheBabelInterop = new WeakMap();
|
|
31
|
+
var cacheNodeInterop = new WeakMap();
|
|
32
|
+
return (_getRequireWildcardCache = function(nodeInterop) {
|
|
33
|
+
return nodeInterop ? cacheNodeInterop : cacheBabelInterop;
|
|
34
|
+
})(nodeInterop);
|
|
35
|
+
}
|
|
36
|
+
function _interop_require_wildcard(obj, nodeInterop) {
|
|
37
|
+
if (!nodeInterop && obj && obj.__esModule) {
|
|
38
|
+
return obj;
|
|
39
|
+
}
|
|
40
|
+
if (obj === null || typeof obj !== "object" && typeof obj !== "function") {
|
|
41
|
+
return {
|
|
42
|
+
default: obj
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
var cache = _getRequireWildcardCache(nodeInterop);
|
|
46
|
+
if (cache && cache.has(obj)) {
|
|
47
|
+
return cache.get(obj);
|
|
48
|
+
}
|
|
49
|
+
var newObj = {
|
|
50
|
+
__proto__: null
|
|
51
|
+
};
|
|
52
|
+
var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
|
|
53
|
+
for(var key in obj){
|
|
54
|
+
if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) {
|
|
55
|
+
var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null;
|
|
56
|
+
if (desc && (desc.get || desc.set)) {
|
|
57
|
+
Object.defineProperty(newObj, key, desc);
|
|
58
|
+
} else {
|
|
59
|
+
newObj[key] = obj[key];
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
newObj.default = obj;
|
|
64
|
+
if (cache) {
|
|
65
|
+
cache.set(obj, newObj);
|
|
66
|
+
}
|
|
67
|
+
return newObj;
|
|
68
|
+
}
|
|
69
|
+
const baseClass = 'lexical-blocks-drawer';
|
|
70
|
+
const INSERT_BLOCK_WITH_DRAWER_COMMAND = (0, _lexical.createCommand)('INSERT_BLOCK_WITH_DRAWER_COMMAND');
|
|
71
|
+
const insertBlock = ({ blockType, editor, replaceNodeKey })=>{
|
|
72
|
+
if (!replaceNodeKey) {
|
|
73
|
+
editor.dispatchCommand(_commands.INSERT_BLOCK_COMMAND, {
|
|
74
|
+
id: null,
|
|
75
|
+
blockName: '',
|
|
76
|
+
blockType
|
|
77
|
+
});
|
|
78
|
+
} else {
|
|
79
|
+
editor.update(()=>{
|
|
80
|
+
const node = (0, _lexical.$getNodeByKey)(replaceNodeKey);
|
|
81
|
+
if (node) {
|
|
82
|
+
node.replace((0, _BlocksNode.$createBlockNode)({
|
|
83
|
+
id: null,
|
|
84
|
+
blockName: '',
|
|
85
|
+
blockType
|
|
86
|
+
}));
|
|
87
|
+
}
|
|
88
|
+
});
|
|
89
|
+
}
|
|
90
|
+
};
|
|
91
|
+
const BlocksDrawerComponent = ()=>{
|
|
92
|
+
const [editor] = (0, _LexicalComposerContext.useLexicalComposerContext)();
|
|
93
|
+
const { editorConfig, uuid } = (0, _EditorConfigProvider.useEditorConfigContext)();
|
|
94
|
+
const [replaceNodeKey, setReplaceNodeKey] = (0, _react.useState)(null);
|
|
95
|
+
const editDepth = (0, _ui.useEditDepth)();
|
|
96
|
+
const { t } = (0, _ui.useTranslation)();
|
|
97
|
+
const { openModal } = (0, _modal.useModal)();
|
|
98
|
+
const labels = {
|
|
99
|
+
plural: t('fields:blocks') || 'Blocks',
|
|
100
|
+
singular: t('fields:block') || 'Block'
|
|
101
|
+
};
|
|
102
|
+
const addRow = (0, _react.useCallback)((rowIndex, blockType)=>{
|
|
103
|
+
insertBlock({
|
|
104
|
+
blockType,
|
|
105
|
+
editor,
|
|
106
|
+
replaceNodeKey
|
|
107
|
+
});
|
|
108
|
+
}, [
|
|
109
|
+
editor,
|
|
110
|
+
replaceNodeKey
|
|
111
|
+
]);
|
|
112
|
+
const drawerSlug = (0, _ui.formatDrawerSlug)({
|
|
113
|
+
slug: `lexical-rich-text-blocks-` + uuid,
|
|
114
|
+
depth: editDepth
|
|
115
|
+
});
|
|
116
|
+
const reducedBlocks = editorConfig?.resolvedFeatureMap?.get('blocks')?.clientFeatureProps?.reducedBlocks;
|
|
117
|
+
(0, _react.useEffect)(()=>{
|
|
118
|
+
return editor.registerCommand(INSERT_BLOCK_WITH_DRAWER_COMMAND, (payload)=>{
|
|
119
|
+
setReplaceNodeKey(payload?.replace ? payload?.replace.nodeKey : null);
|
|
120
|
+
openModal(drawerSlug);
|
|
121
|
+
return true;
|
|
122
|
+
}, _lexical.COMMAND_PRIORITY_EDITOR);
|
|
123
|
+
}, [
|
|
124
|
+
editor,
|
|
125
|
+
drawerSlug,
|
|
126
|
+
openModal
|
|
127
|
+
]);
|
|
128
|
+
return /*#__PURE__*/ _react.default.createElement(_ui.BlocksDrawer, {
|
|
129
|
+
addRow: addRow,
|
|
130
|
+
addRowIndex: 0,
|
|
131
|
+
blocks: reducedBlocks,
|
|
132
|
+
drawerSlug: drawerSlug,
|
|
133
|
+
labels: labels
|
|
134
|
+
});
|
|
135
|
+
};
|
|
136
|
+
|
|
137
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL3NyYy9maWV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JNLFVBQVVOLEVBQUUsbUJBQW1CO0lBQ2pDO0lBRUEsTUFBTU8sU0FBU0MsSUFBQUEsa0JBQVcsRUFDeEIsQ0FBQ0MsVUFBa0I3QjtRQUNqQkQsWUFBWTtZQUNWQztZQUNBQztZQUNBQztRQUNGO0lBQ0YsR0FDQTtRQUFDRDtRQUFRQztLQUFlO0lBRzFCLE1BQU00QixhQUFhQyxJQUFBQSxvQkFBZ0IsRUFBQztRQUNsQ0MsTUFBTSxDQUFDLHlCQUF5QixDQUFDLEdBQUdsQjtRQUNwQ21CLE9BQU9mO0lBQ1Q7SUFFQSxNQUFNZ0IsZ0JBQ0pyQixjQUFjc0Isb0JBQW9CQyxJQUFJLFdBQ2xDQyxvQkFDSEg7SUFFSEksSUFBQUEsZ0JBQVMsRUFBQztRQUNSLE9BQU9yQyxPQUFPc0MsZUFBZSxDQUczQjNDLGtDQUNBLENBQUM0QztZQUNDeEIsa0JBQWtCd0IsU0FBUzlCLFVBQVU4QixTQUFTOUIsUUFBUStCLFVBQVU7WUFDaEVuQixVQUFVUTtZQUNWLE9BQU87UUFDVCxHQUNBWSxnQ0FBdUI7SUFFM0IsR0FBRztRQUFDekM7UUFBUTZCO1FBQVlSO0tBQVU7SUFFbEMscUJBQ0UsNkJBQUNxQixnQkFBWTtRQUNYaEIsUUFBUUE7UUFDUmlCLGFBQWE7UUFDYkMsUUFBUVg7UUFDUkosWUFBWUE7UUFDWk4sUUFBUUE7O0FBR2QifQ==
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import type { ReducedBlock } from '@payloadcms/ui/types';
|
|
3
|
+
export type BlocksFeatureClientProps = {
|
|
4
|
+
reducedBlocks: ReducedBlock[];
|
|
5
|
+
};
|
|
6
|
+
export declare const BlocksFeatureClientComponent: import("react").FC<import("../types").ClientComponentProps<BlocksFeatureClientProps>>;
|
|
7
|
+
//# sourceMappingURL=feature.client.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"feature.client.d.ts","sourceRoot":"","sources":["../../../../src/field/features/blocks/feature.client.tsx"],"names":[],"mappings":";AAEA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAA;AAaxD,MAAM,MAAM,wBAAwB,GAAG;IACrC,aAAa,EAAE,YAAY,EAAE,CAAA;CAC9B,CAAA;AAgDD,eAAO,MAAM,4BAA4B,uFAA6C,CAAA"}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
"use strict";
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
Object.defineProperty(exports, "BlocksFeatureClientComponent", {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: function() {
|
|
9
|
+
return BlocksFeatureClientComponent;
|
|
10
|
+
}
|
|
11
|
+
});
|
|
12
|
+
const _translations = require("@payloadcms/translations");
|
|
13
|
+
const _types = require("../../lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/types");
|
|
14
|
+
const _Block = require("../../lexical/ui/icons/Block");
|
|
15
|
+
const _createClientComponent = require("../createClientComponent");
|
|
16
|
+
const _BlocksNode = require("./nodes/BlocksNode");
|
|
17
|
+
const _plugin = require("./plugin");
|
|
18
|
+
const _commands = require("./plugin/commands");
|
|
19
|
+
const BlocksFeatureClient = (props)=>{
|
|
20
|
+
return {
|
|
21
|
+
clientFeatureProps: props,
|
|
22
|
+
feature: ()=>({
|
|
23
|
+
clientFeatureProps: props,
|
|
24
|
+
nodes: [
|
|
25
|
+
_BlocksNode.BlockNode
|
|
26
|
+
],
|
|
27
|
+
plugins: [
|
|
28
|
+
{
|
|
29
|
+
Component: _plugin.BlocksPlugin,
|
|
30
|
+
position: 'normal'
|
|
31
|
+
}
|
|
32
|
+
],
|
|
33
|
+
slashMenu: {
|
|
34
|
+
options: [
|
|
35
|
+
{
|
|
36
|
+
displayName: 'Blocks',
|
|
37
|
+
key: 'blocks',
|
|
38
|
+
options: [
|
|
39
|
+
...props.reducedBlocks.map((block)=>{
|
|
40
|
+
return new _types.SlashMenuOption('block-' + block.slug, {
|
|
41
|
+
Icon: _Block.BlockIcon,
|
|
42
|
+
displayName: ({ i18n })=>{
|
|
43
|
+
if (!block.labels.singular) {
|
|
44
|
+
return block.slug;
|
|
45
|
+
}
|
|
46
|
+
return (0, _translations.getTranslation)(block.labels.singular, i18n);
|
|
47
|
+
},
|
|
48
|
+
keywords: [
|
|
49
|
+
'block',
|
|
50
|
+
'blocks',
|
|
51
|
+
block.slug
|
|
52
|
+
],
|
|
53
|
+
onSelect: ({ editor })=>{
|
|
54
|
+
editor.dispatchCommand(_commands.INSERT_BLOCK_COMMAND, {
|
|
55
|
+
id: null,
|
|
56
|
+
blockName: '',
|
|
57
|
+
blockType: block.slug
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
});
|
|
61
|
+
})
|
|
62
|
+
]
|
|
63
|
+
}
|
|
64
|
+
]
|
|
65
|
+
}
|
|
66
|
+
})
|
|
67
|
+
};
|
|
68
|
+
};
|
|
69
|
+
const BlocksFeatureClientComponent = (0, _createClientComponent.createClientComponent)(BlocksFeatureClient);
|
|
70
|
+
|
|
71
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3NyYy9maWVsZC9mZWF0dXJlcy9ibG9ja3MvZmVhdHVyZS5jbGllbnQudHN4Il0sInNvdXJjZXNDb250ZW50IjpbIid1c2UgY2xpZW50J1xuXG5pbXBvcnQgdHlwZSB7IFJlZHVjZWRCbG9jayB9IGZyb20gJ0BwYXlsb2FkY21zL3VpL3R5cGVzJ1xuXG5pbXBvcnQgeyBnZXRUcmFuc2xhdGlvbiB9IGZyb20gJ0BwYXlsb2FkY21zL3RyYW5zbGF0aW9ucydcblxuaW1wb3J0IHR5cGUgeyBGZWF0dXJlUHJvdmlkZXJQcm92aWRlckNsaWVudCB9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ICAgIF0sXG4gICAgICBzbGFzaE1lbnU6IHtcbiAgICAgICAgb3B0aW9uczogW1xuICAgICAgICAgIHtcbiAgICAgICAgICAgIGRpc3BsYXlOYW1lOiAnQmxvY2tzJyxcbiAgICAgICAgICAgIGtleTogJ2Jsb2NrcycsXG4gICAgICAgICAgICBvcHRpb25zOiBbXG4gICAgICAgICAgICAgIC4uLnByb3BzLnJlZHVjZWRCbG9ja3MubWFwKChibG9jaykgPT4ge1xuICAgICAgICAgICAgICAgIHJldHVybiBuZXcgU2xhc2hNZW51T3B0aW9uKCdibG9jay0nICsgYmxvY2suc2x1Zywge1xuICAgICAgICAgICAgICAgICAgSWNvbjogQmxvY2tJY29uLFxuICAgICAgICAgICAgICAgICAgZGlzcGxheU5hbWU6ICh7IGkxOG4gfSkgPT4ge1xuICAgICAgICAgICAgICAgICAgICBpZiAoIWJsb2NrLmxhYmVscy5zaW5ndWxhcikge1xuICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBibG9jay5zbHVnXG4gICAgICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gZ2V0VHJhbnNsYXRpb24oYmxvY2subGFiZWxzLnNpbmd1bGFyLCBpMThuKVxuICAgICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgICAgIGtleXdvcmRzOiBbJ2Jsb2NrJywgJ2Jsb2NrcycsIGJsb2NrLnNsdWddLFxuICAgICAgICAgICAgICAgICAgb25TZWxlY3Q6ICh7IGVkaXRvciB9KSA9PiB7XG4gICAgICAgICAgICAgICAgICAgIGVkaXRvci5kaXNwYXRjaENvbW1hbmQoSU5TRVJUX0JMT0NLX0NPTU1BTkQsIHtcbiAgICAgICAgICAgICAgICAgICAgICBpZDogbnVsbCxcbiAgICAgICAgICAgICAgICAgICAgICBibG9ja05hbWU6ICcnLFxuICAgICAgICAgICAgICAgICAgICAgIGJsb2NrVHlwZTogYmxvY2suc2x1ZyxcbiAgICAgICAgICAgICAgICAgICAgfSl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 -0,0 +1,8 @@
|
|
|
1
|
+
import type { Block } from 'payload/types';
|
|
2
|
+
import type { FeatureProviderProviderServer } from '../types';
|
|
3
|
+
import type { BlocksFeatureClientProps } from './feature.client';
|
|
4
|
+
export type BlocksFeatureProps = {
|
|
5
|
+
blocks: Block[];
|
|
6
|
+
};
|
|
7
|
+
export declare const BlocksFeature: FeatureProviderProviderServer<BlocksFeatureProps, BlocksFeatureClientProps>;
|
|
8
|
+
//# sourceMappingURL=feature.server.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"feature.server.d.ts","sourceRoot":"","sources":["../../../../src/field/features/blocks/feature.server.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAqB,MAAM,eAAe,CAAA;AAK7D,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,UAAU,CAAA;AAC7D,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,kBAAkB,CAAA;AAOhE,MAAM,MAAM,kBAAkB,GAAG;IAC/B,MAAM,EAAE,KAAK,EAAE,CAAA;CAChB,CAAA;AAED,eAAO,MAAM,aAAa,EAAE,6BAA6B,CACvD,kBAAkB,EAClB,wBAAwB,CAmFzB,CAAA"}
|