@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,18 @@
|
|
|
1
|
+
import type { FeatureProviderProviderServer } from '../types';
|
|
2
|
+
export type RelationshipFeatureProps = {
|
|
3
|
+
/**
|
|
4
|
+
* The collections that should be disabled. Overrides the `enableRichTextRelationship` property in the collection config.
|
|
5
|
+
* When this property is set, `enabledCollections` will not be available.
|
|
6
|
+
**/
|
|
7
|
+
disabledCollections?: string[];
|
|
8
|
+
enabledCollections?: never;
|
|
9
|
+
} | {
|
|
10
|
+
disabledCollections?: never;
|
|
11
|
+
/**
|
|
12
|
+
* The collections that should be enabled. Overrides the `enableRichTextRelationship` property in the collection config
|
|
13
|
+
* When this property is set, `disabledCollections` will not be available.
|
|
14
|
+
**/
|
|
15
|
+
enabledCollections?: string[];
|
|
16
|
+
};
|
|
17
|
+
export declare const RelationshipFeature: FeatureProviderProviderServer<RelationshipFeatureProps, RelationshipFeatureProps>;
|
|
18
|
+
//# sourceMappingURL=feature.server.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"feature.server.d.ts","sourceRoot":"","sources":["../../../../src/field/features/relationship/feature.server.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,UAAU,CAAA;AAM7D,MAAM,MAAM,wBAAwB,GAChC;IACE;;;QAGI;IACJ,mBAAmB,CAAC,EAAE,MAAM,EAAE,CAAA;IAG9B,kBAAkB,CAAC,EAAE,KAAK,CAAA;CAC3B,GACD;IAEE,mBAAmB,CAAC,EAAE,KAAK,CAAA;IAE3B;;;QAGI;IACJ,kBAAkB,CAAC,EAAE,MAAM,EAAE,CAAA;CAC9B,CAAA;AAEL,eAAO,MAAM,mBAAmB,EAAE,6BAA6B,CAC7D,wBAAwB,EACxB,wBAAwB,CAoBzB,CAAA"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
Object.defineProperty(exports, "RelationshipFeature", {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: function() {
|
|
8
|
+
return RelationshipFeature;
|
|
9
|
+
}
|
|
10
|
+
});
|
|
11
|
+
const _featureclient = require("./feature.client");
|
|
12
|
+
const _RelationshipNode = require("./nodes/RelationshipNode");
|
|
13
|
+
const _populationPromise = require("./populationPromise");
|
|
14
|
+
const RelationshipFeature = (props)=>{
|
|
15
|
+
return {
|
|
16
|
+
feature: ()=>{
|
|
17
|
+
return {
|
|
18
|
+
ClientComponent: _featureclient.RelationshipFeatureClientComponent,
|
|
19
|
+
clientFeatureProps: props,
|
|
20
|
+
nodes: [
|
|
21
|
+
{
|
|
22
|
+
node: _RelationshipNode.RelationshipNode,
|
|
23
|
+
populationPromises: [
|
|
24
|
+
_populationPromise.relationshipPopulationPromise
|
|
25
|
+
]
|
|
26
|
+
}
|
|
27
|
+
],
|
|
28
|
+
serverFeatureProps: props
|
|
29
|
+
};
|
|
30
|
+
},
|
|
31
|
+
key: 'relationship',
|
|
32
|
+
serverFeatureProps: props
|
|
33
|
+
};
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3NyYy9maWVsZC9mZWF0dXJlcy9yZWxhdGlvbnNoaXAvZmVhdHVyZS5zZXJ2ZXIudHMiXSwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHR5cGUgeyBGZWF0dXJlUHJvdmlkZXJQcm92aWRlclNlcnZlciB9IGZyb20gJy4uL3R5cGVzJ1xuXG5pbXBvcnQgeyBSZWxhdGlvbnNoaXBGZWF0dXJlQ2xpZW50Q29tcG9uZW50IH0gZnJvbSAnLi9mZWF0dXJlLmNsaWVudCdcbmltcG9ydCB7IFJlbGF0aW9uc2hpcE5vZGUgfSBmcm9tICcuL25vZGVzL1JlbGF0aW9uc2hpcE5vZGUnXG5pbXBvcnQgeyByZWxhdGlvbnNoaXBQb3B1bGF0aW9uUHJvbWlzZSB9IGZyb20gJy4vcG9wdWxhdGlvblByb21pc2UnXG5cbmV4cG9ydCB0eXBlIFJlbGF0aW9uc2hpcEZlYXR1cmVQcm9wcyA9XG4gIHwge1xuICAgICAgLyoqXG4gICAgICAgKiBUaGUgY29sbGVjdGlvbnMgdGhhdCBzaG91bGQgYmUgZGlzYWJsZWQuIE92ZXJyaWRlcyB0aGUgYGVuYWJsZVJpY2hUZXh0UmVsYXRpb25zaGlwYCBwcm9wZXJ0eSBpbiB0aGUgY29sbGVjdGlvbiBjb25maWcuXG4gICAgICAgKiBXaGVuIHRoaXMgcHJvcGVydHkgaXMgc2V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2dCQUNMQyxpQkFBaUJDLGlEQUFrQztnQkFDbkRDLG9CQUFvQko7Z0JBQ3BCSyxPQUFPO29CQUNMO3dCQUNFQyxNQUFNQyxrQ0FBZ0I7d0JBQ3RCQyxvQkFBb0I7NEJBQUNDLGdEQUE2Qjt5QkFBQztvQkFFckQ7aUJBQ0Q7Z0JBQ0RDLG9CQUFvQlY7WUFDdEI7UUFDRjtRQUNBVyxLQUFLO1FBQ0xELG9CQUFvQlY7SUFDdEI7QUFDRiJ9
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RelationshipNode.d.ts","sourceRoot":"","sources":["../../../../../src/field/features/relationship/nodes/RelationshipNode.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,EACV,gBAAgB,EAEhB,eAAe,EACf,YAAY,EACZ,iBAAiB,EACjB,aAAa,EACb,WAAW,EACX,OAAO,EACP,MAAM,EACP,MAAM,SAAS,CAAA;AAEhB,OAAO,EACL,kBAAkB,EAClB,KAAK,4BAA4B,EAClC,MAAM,0CAA0C,CAAA;AAUjD,MAAM,MAAM,gBAAgB,GAAG;IAC7B,UAAU,EAAE,MAAM,CAAA;IAClB,KAAK,EAAE;QAEL,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;QACtB,EAAE,EAAE,MAAM,CAAA;KACX,CAAA;CACF,CAAA;AAED,MAAM,MAAM,0BAA0B,GAAG,MAAM,CAAC,gBAAgB,EAAE,4BAA4B,CAAC,CAAA;AAkB/F,qBAAa,gBAAiB,SAAQ,kBAAkB;IACtD,MAAM,EAAE,gBAAgB,CAAA;gBAEZ,EACV,IAAI,EACJ,MAAM,EACN,GAAG,GACJ,EAAE;QACD,IAAI,EAAE,gBAAgB,CAAA;QACtB,MAAM,CAAC,EAAE,iBAAiB,CAAA;QAC1B,GAAG,CAAC,EAAE,OAAO,CAAA;KACd;IAKD,MAAM,CAAC,KAAK,CAAC,IAAI,EAAE,gBAAgB,GAAG,gBAAgB;IAQtD,MAAM,CAAC,OAAO,IAAI,MAAM;IAIxB,MAAM,CAAC,SAAS,IAAI,gBAAgB,CAAC,cAAc,CAAC,GAAG,IAAI;IAiB3D,MAAM,CAAC,UAAU,CAAC,cAAc,EAAE,0BAA0B,GAAG,gBAAgB;IAU/E,MAAM,CAAC,QAAQ,IAAI,KAAK;IAGxB,QAAQ,CAAC,MAAM,EAAE,aAAa,EAAE,MAAM,EAAE,YAAY,GAAG,GAAG,CAAC,OAAO;IAWlE,SAAS,IAAI,eAAe;IAU5B,UAAU,IAAI,0BAA0B;IASxC,OAAO,IAAI,gBAAgB;IAI3B,cAAc,IAAI,MAAM;IAIxB,OAAO,CAAC,IAAI,EAAE,gBAAgB,GAAG,IAAI;CAItC;AAED,wBAAgB,uBAAuB,CAAC,IAAI,EAAE,gBAAgB,GAAG,gBAAgB,CAIhF;AAED,wBAAgB,mBAAmB,CACjC,IAAI,EAAE,WAAW,GAAG,gBAAgB,GAAG,IAAI,GAAG,SAAS,GACtD,IAAI,IAAI,gBAAgB,CAE1B"}
|
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
function _export(target, all) {
|
|
6
|
+
for(var name in all)Object.defineProperty(target, name, {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: all[name]
|
|
9
|
+
});
|
|
10
|
+
}
|
|
11
|
+
_export(exports, {
|
|
12
|
+
$createRelationshipNode: function() {
|
|
13
|
+
return $createRelationshipNode;
|
|
14
|
+
},
|
|
15
|
+
$isRelationshipNode: function() {
|
|
16
|
+
return $isRelationshipNode;
|
|
17
|
+
},
|
|
18
|
+
RelationshipNode: function() {
|
|
19
|
+
return RelationshipNode;
|
|
20
|
+
}
|
|
21
|
+
});
|
|
22
|
+
const _LexicalDecoratorBlockNode = require("@lexical/react/LexicalDecoratorBlockNode");
|
|
23
|
+
const _react = /*#__PURE__*/ _interop_require_wildcard(require("react"));
|
|
24
|
+
function _getRequireWildcardCache(nodeInterop) {
|
|
25
|
+
if (typeof WeakMap !== "function") return null;
|
|
26
|
+
var cacheBabelInterop = new WeakMap();
|
|
27
|
+
var cacheNodeInterop = new WeakMap();
|
|
28
|
+
return (_getRequireWildcardCache = function(nodeInterop) {
|
|
29
|
+
return nodeInterop ? cacheNodeInterop : cacheBabelInterop;
|
|
30
|
+
})(nodeInterop);
|
|
31
|
+
}
|
|
32
|
+
function _interop_require_wildcard(obj, nodeInterop) {
|
|
33
|
+
if (!nodeInterop && obj && obj.__esModule) {
|
|
34
|
+
return obj;
|
|
35
|
+
}
|
|
36
|
+
if (obj === null || typeof obj !== "object" && typeof obj !== "function") {
|
|
37
|
+
return {
|
|
38
|
+
default: obj
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
var cache = _getRequireWildcardCache(nodeInterop);
|
|
42
|
+
if (cache && cache.has(obj)) {
|
|
43
|
+
return cache.get(obj);
|
|
44
|
+
}
|
|
45
|
+
var newObj = {
|
|
46
|
+
__proto__: null
|
|
47
|
+
};
|
|
48
|
+
var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
|
|
49
|
+
for(var key in obj){
|
|
50
|
+
if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) {
|
|
51
|
+
var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null;
|
|
52
|
+
if (desc && (desc.get || desc.set)) {
|
|
53
|
+
Object.defineProperty(newObj, key, desc);
|
|
54
|
+
} else {
|
|
55
|
+
newObj[key] = obj[key];
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
newObj.default = obj;
|
|
60
|
+
if (cache) {
|
|
61
|
+
cache.set(obj, newObj);
|
|
62
|
+
}
|
|
63
|
+
return newObj;
|
|
64
|
+
}
|
|
65
|
+
const RelationshipComponent = /*#__PURE__*/ _react.lazy(()=>// @ts-expect-error-next-line TypeScript being dumb
|
|
66
|
+
Promise.resolve().then(()=>/*#__PURE__*/ _interop_require_wildcard(require("./components/RelationshipComponent"))).then((module)=>({
|
|
67
|
+
default: module.RelationshipComponent
|
|
68
|
+
})));
|
|
69
|
+
function relationshipElementToNode(domNode) {
|
|
70
|
+
const id = domNode.getAttribute('data-lexical-relationship-id');
|
|
71
|
+
const relationTo = domNode.getAttribute('data-lexical-relationship-relationTo');
|
|
72
|
+
if (id != null && relationTo != null) {
|
|
73
|
+
const node = $createRelationshipNode({
|
|
74
|
+
relationTo,
|
|
75
|
+
value: {
|
|
76
|
+
id
|
|
77
|
+
}
|
|
78
|
+
});
|
|
79
|
+
return {
|
|
80
|
+
node
|
|
81
|
+
};
|
|
82
|
+
}
|
|
83
|
+
return null;
|
|
84
|
+
}
|
|
85
|
+
class RelationshipNode extends _LexicalDecoratorBlockNode.DecoratorBlockNode {
|
|
86
|
+
__data;
|
|
87
|
+
constructor({ data, format, key }){
|
|
88
|
+
super(format, key);
|
|
89
|
+
this.__data = data;
|
|
90
|
+
}
|
|
91
|
+
static clone(node) {
|
|
92
|
+
return new RelationshipNode({
|
|
93
|
+
data: node.__data,
|
|
94
|
+
format: node.__format,
|
|
95
|
+
key: node.__key
|
|
96
|
+
});
|
|
97
|
+
}
|
|
98
|
+
static getType() {
|
|
99
|
+
return 'relationship';
|
|
100
|
+
}
|
|
101
|
+
static importDOM() {
|
|
102
|
+
return {
|
|
103
|
+
div: (domNode)=>{
|
|
104
|
+
if (!domNode.hasAttribute('data-lexical-relationship-relationTo') || !domNode.hasAttribute('data-lexical-relationship-id')) {
|
|
105
|
+
return null;
|
|
106
|
+
}
|
|
107
|
+
return {
|
|
108
|
+
conversion: relationshipElementToNode,
|
|
109
|
+
priority: 2
|
|
110
|
+
};
|
|
111
|
+
}
|
|
112
|
+
};
|
|
113
|
+
}
|
|
114
|
+
static importJSON(serializedNode) {
|
|
115
|
+
const importedData = {
|
|
116
|
+
relationTo: serializedNode.relationTo,
|
|
117
|
+
value: serializedNode.value
|
|
118
|
+
};
|
|
119
|
+
const node = $createRelationshipNode(importedData);
|
|
120
|
+
node.setFormat(serializedNode.format);
|
|
121
|
+
return node;
|
|
122
|
+
}
|
|
123
|
+
static isInline() {
|
|
124
|
+
return false;
|
|
125
|
+
}
|
|
126
|
+
decorate(editor, config) {
|
|
127
|
+
return /*#__PURE__*/ _react.createElement(RelationshipComponent, {
|
|
128
|
+
className: config.theme.relationship ?? 'LexicalEditorTheme__relationship',
|
|
129
|
+
data: this.__data,
|
|
130
|
+
format: this.__format,
|
|
131
|
+
nodeKey: this.getKey()
|
|
132
|
+
});
|
|
133
|
+
}
|
|
134
|
+
exportDOM() {
|
|
135
|
+
const element = document.createElement('div');
|
|
136
|
+
element.setAttribute('data-lexical-relationship-id', this.__data?.value?.id);
|
|
137
|
+
element.setAttribute('data-lexical-relationship-relationTo', this.__data?.relationTo);
|
|
138
|
+
const text = document.createTextNode(this.getTextContent());
|
|
139
|
+
element.append(text);
|
|
140
|
+
return {
|
|
141
|
+
element
|
|
142
|
+
};
|
|
143
|
+
}
|
|
144
|
+
exportJSON() {
|
|
145
|
+
return {
|
|
146
|
+
...super.exportJSON(),
|
|
147
|
+
...this.getData(),
|
|
148
|
+
type: this.getType(),
|
|
149
|
+
version: 1
|
|
150
|
+
};
|
|
151
|
+
}
|
|
152
|
+
getData() {
|
|
153
|
+
return this.getLatest().__data;
|
|
154
|
+
}
|
|
155
|
+
getTextContent() {
|
|
156
|
+
return `${this.__data?.relationTo} relation to ${this.__data?.value?.id}`;
|
|
157
|
+
}
|
|
158
|
+
setData(data) {
|
|
159
|
+
const writable = this.getWritable();
|
|
160
|
+
writable.__data = data;
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
function $createRelationshipNode(data) {
|
|
164
|
+
return new RelationshipNode({
|
|
165
|
+
data
|
|
166
|
+
});
|
|
167
|
+
}
|
|
168
|
+
function $isRelationshipNode(node) {
|
|
169
|
+
return node instanceof RelationshipNode;
|
|
170
|
+
}
|
|
171
|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BQU8sSUFBSWpCLGlCQUFpQjtRQUMxQmlCO0lBQ0Y7QUFDRjtBQUVPLFNBQVNsQixvQkFDZGEsSUFBdUQ7SUFFdkQsT0FBT0EsZ0JBQWdCWjtBQUN6QiJ9
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RelationshipComponent.d.ts","sourceRoot":"","sources":["../../../../../../src/field/features/relationship/nodes/components/RelationshipComponent.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAiB,KAAK,iBAAiB,EAAE,MAAM,SAAS,CAAA;AAC/D,OAAO,KAA4C,MAAM,OAAO,CAAA;AAEhE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAA;AAI3D,OAAO,cAAc,CAAA;AAQrB,KAAK,KAAK,GAAG;IACX,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAC1B,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,IAAI,EAAE,gBAAgB,CAAA;IACtB,MAAM,CAAC,EAAE,iBAAiB,CAAA;IAC1B,OAAO,CAAC,EAAE,MAAM,CAAA;CACjB,CAAA;AA8GD,eAAO,MAAM,qBAAqB,UAAW,KAAK,KAAG,MAAM,SAE1D,CAAA"}
|
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
"use strict";
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
Object.defineProperty(exports, "RelationshipComponent", {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: function() {
|
|
9
|
+
return RelationshipComponent;
|
|
10
|
+
}
|
|
11
|
+
});
|
|
12
|
+
const _LexicalComposerContext = require("@lexical/react/LexicalComposerContext");
|
|
13
|
+
const _useLexicalNodeSelection = require("@lexical/react/useLexicalNodeSelection");
|
|
14
|
+
const _translations = require("@payloadcms/translations");
|
|
15
|
+
const _ui = require("@payloadcms/ui");
|
|
16
|
+
const _lexical = require("lexical");
|
|
17
|
+
const _react = /*#__PURE__*/ _interop_require_wildcard(require("react"));
|
|
18
|
+
const _EditorConfigProvider = require("../../../../lexical/config/client/EditorConfigProvider");
|
|
19
|
+
const _commands = require("../../drawer/commands");
|
|
20
|
+
require("./index.scss");
|
|
21
|
+
function _getRequireWildcardCache(nodeInterop) {
|
|
22
|
+
if (typeof WeakMap !== "function") return null;
|
|
23
|
+
var cacheBabelInterop = new WeakMap();
|
|
24
|
+
var cacheNodeInterop = new WeakMap();
|
|
25
|
+
return (_getRequireWildcardCache = function(nodeInterop) {
|
|
26
|
+
return nodeInterop ? cacheNodeInterop : cacheBabelInterop;
|
|
27
|
+
})(nodeInterop);
|
|
28
|
+
}
|
|
29
|
+
function _interop_require_wildcard(obj, nodeInterop) {
|
|
30
|
+
if (!nodeInterop && obj && obj.__esModule) {
|
|
31
|
+
return obj;
|
|
32
|
+
}
|
|
33
|
+
if (obj === null || typeof obj !== "object" && typeof obj !== "function") {
|
|
34
|
+
return {
|
|
35
|
+
default: obj
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
var cache = _getRequireWildcardCache(nodeInterop);
|
|
39
|
+
if (cache && cache.has(obj)) {
|
|
40
|
+
return cache.get(obj);
|
|
41
|
+
}
|
|
42
|
+
var newObj = {
|
|
43
|
+
__proto__: null
|
|
44
|
+
};
|
|
45
|
+
var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
|
|
46
|
+
for(var key in obj){
|
|
47
|
+
if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) {
|
|
48
|
+
var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null;
|
|
49
|
+
if (desc && (desc.get || desc.set)) {
|
|
50
|
+
Object.defineProperty(newObj, key, desc);
|
|
51
|
+
} else {
|
|
52
|
+
newObj[key] = obj[key];
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
newObj.default = obj;
|
|
57
|
+
if (cache) {
|
|
58
|
+
cache.set(obj, newObj);
|
|
59
|
+
}
|
|
60
|
+
return newObj;
|
|
61
|
+
}
|
|
62
|
+
const baseClass = 'lexical-relationship';
|
|
63
|
+
const initialParams = {
|
|
64
|
+
depth: 0
|
|
65
|
+
};
|
|
66
|
+
const Component = (props)=>{
|
|
67
|
+
const { children, data: { relationTo, value: { id } }, nodeKey } = props;
|
|
68
|
+
const [editor] = (0, _LexicalComposerContext.useLexicalComposerContext)();
|
|
69
|
+
const [isSelected, setSelected, clearSelection] = (0, _useLexicalNodeSelection.useLexicalNodeSelection)(nodeKey);
|
|
70
|
+
const { field } = (0, _EditorConfigProvider.useEditorConfigContext)();
|
|
71
|
+
const { collections, routes: { api }, serverURL } = (0, _ui.useConfig)();
|
|
72
|
+
const [relatedCollection, setRelatedCollection] = (0, _react.useState)(()=>collections.find((coll)=>coll.slug === relationTo));
|
|
73
|
+
const { i18n, t } = (0, _ui.useTranslation)();
|
|
74
|
+
const [cacheBust, dispatchCacheBust] = (0, _react.useReducer)((state)=>state + 1, 0);
|
|
75
|
+
const [{ data }, { setParams }] = (0, _ui.usePayloadAPI)(`${serverURL}${api}/${relatedCollection.slug}/${id}`, {
|
|
76
|
+
initialParams
|
|
77
|
+
});
|
|
78
|
+
const [DocumentDrawer, DocumentDrawerToggler, { closeDrawer }] = (0, _ui.useDocumentDrawer)({
|
|
79
|
+
id,
|
|
80
|
+
collectionSlug: relatedCollection.slug
|
|
81
|
+
});
|
|
82
|
+
const removeRelationship = (0, _react.useCallback)(()=>{
|
|
83
|
+
editor.update(()=>{
|
|
84
|
+
(0, _lexical.$getNodeByKey)(nodeKey).remove();
|
|
85
|
+
});
|
|
86
|
+
}, [
|
|
87
|
+
editor,
|
|
88
|
+
nodeKey
|
|
89
|
+
]);
|
|
90
|
+
const updateRelationship = _react.default.useCallback(({ doc })=>{
|
|
91
|
+
setParams({
|
|
92
|
+
...initialParams,
|
|
93
|
+
cacheBust
|
|
94
|
+
});
|
|
95
|
+
closeDrawer();
|
|
96
|
+
dispatchCacheBust();
|
|
97
|
+
}, [
|
|
98
|
+
cacheBust,
|
|
99
|
+
setParams,
|
|
100
|
+
closeDrawer
|
|
101
|
+
]);
|
|
102
|
+
return /*#__PURE__*/ _react.default.createElement("div", {
|
|
103
|
+
className: [
|
|
104
|
+
baseClass,
|
|
105
|
+
isSelected && `${baseClass}--selected`
|
|
106
|
+
].filter(Boolean).join(' '),
|
|
107
|
+
contentEditable: false
|
|
108
|
+
}, /*#__PURE__*/ _react.default.createElement("div", {
|
|
109
|
+
className: `${baseClass}__wrap`
|
|
110
|
+
}, /*#__PURE__*/ _react.default.createElement("p", {
|
|
111
|
+
className: `${baseClass}__label`
|
|
112
|
+
}, t('fields:labelRelationship', {
|
|
113
|
+
label: (0, _translations.getTranslation)(relatedCollection.labels.singular, i18n)
|
|
114
|
+
})), /*#__PURE__*/ _react.default.createElement(DocumentDrawerToggler, {
|
|
115
|
+
className: `${baseClass}__doc-drawer-toggler`
|
|
116
|
+
}, /*#__PURE__*/ _react.default.createElement("p", {
|
|
117
|
+
className: `${baseClass}__title`
|
|
118
|
+
}, data ? data[relatedCollection?.admin?.useAsTitle || 'id'] : id))), editor.isEditable() && /*#__PURE__*/ _react.default.createElement("div", {
|
|
119
|
+
className: `${baseClass}__actions`
|
|
120
|
+
}, /*#__PURE__*/ _react.default.createElement(_ui.Button, {
|
|
121
|
+
buttonStyle: "icon-label",
|
|
122
|
+
className: `${baseClass}__swapButton`,
|
|
123
|
+
disabled: field?.readOnly,
|
|
124
|
+
el: "div",
|
|
125
|
+
icon: "swap",
|
|
126
|
+
onClick: ()=>{
|
|
127
|
+
editor.dispatchCommand(_commands.INSERT_RELATIONSHIP_WITH_DRAWER_COMMAND, {
|
|
128
|
+
replace: {
|
|
129
|
+
nodeKey
|
|
130
|
+
}
|
|
131
|
+
});
|
|
132
|
+
},
|
|
133
|
+
round: true,
|
|
134
|
+
tooltip: t('fields:swapRelationship')
|
|
135
|
+
}), /*#__PURE__*/ _react.default.createElement(_ui.Button, {
|
|
136
|
+
buttonStyle: "icon-label",
|
|
137
|
+
className: `${baseClass}__removeButton`,
|
|
138
|
+
disabled: field?.readOnly,
|
|
139
|
+
icon: "x",
|
|
140
|
+
onClick: (e)=>{
|
|
141
|
+
e.preventDefault();
|
|
142
|
+
removeRelationship();
|
|
143
|
+
},
|
|
144
|
+
round: true,
|
|
145
|
+
tooltip: t('fields:removeRelationship')
|
|
146
|
+
})), id && /*#__PURE__*/ _react.default.createElement(DocumentDrawer, {
|
|
147
|
+
onSave: updateRelationship
|
|
148
|
+
}), children);
|
|
149
|
+
};
|
|
150
|
+
const RelationshipComponent = (props)=>{
|
|
151
|
+
return /*#__PURE__*/ _react.default.createElement(Component, props);
|
|
152
|
+
};
|
|
153
|
+
|
|
154
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3NyYy9maWVsZC9mZWF0dXJlcy9yZWxhdGlvbnNoaXAvbm9kZXMvY29tcG9uZW50cy9SZWxhdGlvbnNoaXBDb21wb25lbnQudHN4Il0sInNvdXJjZXNDb250ZW50IjpbIid1c2UgY2xpZW50J1xuaW1wb3J0IHsgdXNlTGV4aWNhbENvbXBvc2VyQ29udGV4dCB9IGZyb20gJ0BsZXhpY2FsL3JlYWN0L0xleGljYWxDb21wb3NlckNvbnRleHQnXG5pbXBvcnQgeyB1c2VMZXhpY2FsTm9kZVNlbGVjdGlvbiB9IGZyb20gJ0BsZXhpY2FsL3JlYWN0L3VzZUxleGljYWxOb2RlU2VsZWN0aW9uJ1xuaW1wb3J0IHsgZ2V0VHJhbnNsYXRpb24gfSBmcm9tICdAcGF5bG9hZGNtcy90cmFuc2xhdGlvbnMnXG5pbXBvcnQgeyBCdXR0b24sIHVzZUNvbmZpZywgdXNlRG9jdW1lbnREcmF3ZXIsIHVzZVBheWxvYWRBUEksIHVzZVRyYW5zbGF0aW9uIH0gZnJvbSAnQHBhe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BQUVyRCxVQUFVLGNBQWMsQ0FBQztRQUN2Q29FLFVBQVVuRCxPQUFPb0Q7UUFDakJFLE1BQUs7UUFDTEMsU0FBUyxDQUFDTTtZQUNSQSxFQUFFQyxjQUFjO1lBQ2hCbkM7UUFDRjtRQUNBZ0MsT0FBQUE7UUFDQUMsU0FBUzlDLEVBQUU7U0FLaEJ0QixvQkFBTSw2QkFBQzhCO1FBQWV5QyxRQUFRL0I7UUFDOUI1QztBQUdQO0FBRU8sTUFBTU4sd0JBQXdCLENBQUNLO0lBQ3BDLHFCQUFPLDZCQUFDRCxXQUFjQztBQUN4QiJ9
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
@import '../../../../../scss/styles.scss';
|
|
2
|
+
|
|
3
|
+
.lexical-relationship {
|
|
4
|
+
@extend %body;
|
|
5
|
+
@include shadow-sm;
|
|
6
|
+
padding: calc(var(--base) * 0.75);
|
|
7
|
+
display: flex;
|
|
8
|
+
align-items: center;
|
|
9
|
+
background: var(--theme-input-bg);
|
|
10
|
+
border: 1px solid var(--theme-elevation-100);
|
|
11
|
+
max-width: calc(var(--base) * 15);
|
|
12
|
+
font-family: var(--font-body);
|
|
13
|
+
margin: 0 0 1.5em;
|
|
14
|
+
|
|
15
|
+
&:hover {
|
|
16
|
+
border: 1px solid var(--theme-elevation-150);
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
&[data-slate-node='element'] {
|
|
20
|
+
margin: calc(var(--base) * 0.625) 0;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
&__label {
|
|
24
|
+
margin-bottom: calc(var(--base) * 0.25);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
&__title {
|
|
28
|
+
margin: 0;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
&__label,
|
|
32
|
+
&__title {
|
|
33
|
+
white-space: nowrap;
|
|
34
|
+
text-overflow: ellipsis;
|
|
35
|
+
overflow: hidden;
|
|
36
|
+
line-height: 1 !important;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
&__title {
|
|
40
|
+
font-weight: bold;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
&__wrap {
|
|
44
|
+
flex-grow: 1;
|
|
45
|
+
overflow: hidden;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
&--selected {
|
|
49
|
+
box-shadow: $focus-box-shadow;
|
|
50
|
+
outline: none;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
&__doc-drawer-toggler {
|
|
54
|
+
text-decoration: underline;
|
|
55
|
+
pointer-events: all;
|
|
56
|
+
line-height: inherit;
|
|
57
|
+
& > * {
|
|
58
|
+
margin: 0;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
&__swapButton.btn {
|
|
63
|
+
margin: 0;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
&__doc-drawer-toggler,
|
|
67
|
+
&__swapButton {
|
|
68
|
+
&:disabled {
|
|
69
|
+
color: var(--theme-elevation-300);
|
|
70
|
+
pointer-events: none;
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
&__actions {
|
|
75
|
+
display: flex;
|
|
76
|
+
align-items: center;
|
|
77
|
+
flex-shrink: 0;
|
|
78
|
+
margin-left: calc(var(--base) * 0.5);
|
|
79
|
+
|
|
80
|
+
& > *:not(:last-child) {
|
|
81
|
+
margin-right: calc(var(--base) * 0.25);
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
&__removeButton.btn {
|
|
86
|
+
margin: 0;
|
|
87
|
+
|
|
88
|
+
line {
|
|
89
|
+
stroke-width: $style-stroke-width-m;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
&:disabled {
|
|
93
|
+
color: var(--theme-elevation-300);
|
|
94
|
+
pointer-events: none;
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { type LexicalCommand } from 'lexical';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import type { RelationshipFeatureProps } from '../feature.server';
|
|
4
|
+
import type { RelationshipData } from '../nodes/RelationshipNode';
|
|
5
|
+
export declare const INSERT_RELATIONSHIP_COMMAND: LexicalCommand<RelationshipData>;
|
|
6
|
+
export declare function RelationshipPlugin(props?: RelationshipFeatureProps): React.ReactNode;
|
|
7
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/field/features/relationship/plugins/index.tsx"],"names":[],"mappings":"AAIA,OAAO,EAML,KAAK,cAAc,EAEpB,MAAM,SAAS,CAAA;AAEhB,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,mBAAmB,CAAA;AACjE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAA;AAKjE,eAAO,MAAM,2BAA2B,EAAE,cAAc,CAAC,gBAAgB,CAExE,CAAA;AAED,wBAAgB,kBAAkB,CAAC,KAAK,CAAC,EAAE,wBAAwB,GAAG,KAAK,CAAC,SAAS,CAqDpF"}
|
|
@@ -0,0 +1,107 @@
|
|
|
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
|
+
INSERT_RELATIONSHIP_COMMAND: function() {
|
|
14
|
+
return INSERT_RELATIONSHIP_COMMAND;
|
|
15
|
+
},
|
|
16
|
+
RelationshipPlugin: function() {
|
|
17
|
+
return RelationshipPlugin;
|
|
18
|
+
}
|
|
19
|
+
});
|
|
20
|
+
const _LexicalComposerContext = require("@lexical/react/LexicalComposerContext");
|
|
21
|
+
const _utils = require("@lexical/utils");
|
|
22
|
+
const _ui = require("@payloadcms/ui");
|
|
23
|
+
const _lexical = require("lexical");
|
|
24
|
+
const _react = /*#__PURE__*/ _interop_require_wildcard(require("react"));
|
|
25
|
+
const _drawer = require("../drawer");
|
|
26
|
+
const _RelationshipNode = require("../nodes/RelationshipNode");
|
|
27
|
+
function _getRequireWildcardCache(nodeInterop) {
|
|
28
|
+
if (typeof WeakMap !== "function") return null;
|
|
29
|
+
var cacheBabelInterop = new WeakMap();
|
|
30
|
+
var cacheNodeInterop = new WeakMap();
|
|
31
|
+
return (_getRequireWildcardCache = function(nodeInterop) {
|
|
32
|
+
return nodeInterop ? cacheNodeInterop : cacheBabelInterop;
|
|
33
|
+
})(nodeInterop);
|
|
34
|
+
}
|
|
35
|
+
function _interop_require_wildcard(obj, nodeInterop) {
|
|
36
|
+
if (!nodeInterop && obj && obj.__esModule) {
|
|
37
|
+
return obj;
|
|
38
|
+
}
|
|
39
|
+
if (obj === null || typeof obj !== "object" && typeof obj !== "function") {
|
|
40
|
+
return {
|
|
41
|
+
default: obj
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
var cache = _getRequireWildcardCache(nodeInterop);
|
|
45
|
+
if (cache && cache.has(obj)) {
|
|
46
|
+
return cache.get(obj);
|
|
47
|
+
}
|
|
48
|
+
var newObj = {
|
|
49
|
+
__proto__: null
|
|
50
|
+
};
|
|
51
|
+
var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
|
|
52
|
+
for(var key in obj){
|
|
53
|
+
if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) {
|
|
54
|
+
var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null;
|
|
55
|
+
if (desc && (desc.get || desc.set)) {
|
|
56
|
+
Object.defineProperty(newObj, key, desc);
|
|
57
|
+
} else {
|
|
58
|
+
newObj[key] = obj[key];
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
newObj.default = obj;
|
|
63
|
+
if (cache) {
|
|
64
|
+
cache.set(obj, newObj);
|
|
65
|
+
}
|
|
66
|
+
return newObj;
|
|
67
|
+
}
|
|
68
|
+
const INSERT_RELATIONSHIP_COMMAND = (0, _lexical.createCommand)('INSERT_RELATIONSHIP_COMMAND');
|
|
69
|
+
function RelationshipPlugin(props) {
|
|
70
|
+
const [editor] = (0, _LexicalComposerContext.useLexicalComposerContext)();
|
|
71
|
+
const { collections } = (0, _ui.useConfig)();
|
|
72
|
+
let enabledRelations = null;
|
|
73
|
+
if (props?.enabledCollections) {
|
|
74
|
+
enabledRelations = props?.enabledCollections;
|
|
75
|
+
} else if (props?.disabledCollections) {
|
|
76
|
+
enabledRelations = collections.filter(({ slug })=>!(props?.disabledCollections).includes(slug)).map(({ slug })=>slug);
|
|
77
|
+
}
|
|
78
|
+
(0, _react.useEffect)(()=>{
|
|
79
|
+
if (!editor.hasNodes([
|
|
80
|
+
_RelationshipNode.RelationshipNode
|
|
81
|
+
])) {
|
|
82
|
+
throw new Error('RelationshipPlugin: RelationshipNode not registered on editor');
|
|
83
|
+
}
|
|
84
|
+
return editor.registerCommand(INSERT_RELATIONSHIP_COMMAND, (payload)=>{
|
|
85
|
+
const relationshipNode = (0, _RelationshipNode.$createRelationshipNode)(payload);
|
|
86
|
+
const selection = (0, _lexical.$getSelection)() || (0, _lexical.$getPreviousSelection)();
|
|
87
|
+
if ((0, _lexical.$isRangeSelection)(selection)) {
|
|
88
|
+
const { focus } = selection;
|
|
89
|
+
const focusNode = focus.getNode();
|
|
90
|
+
// First, delete currently selected node if it's an empty paragraph and if there are sufficient
|
|
91
|
+
// paragraph nodes (more than 1) left in the parent node, so that we don't "trap" the user
|
|
92
|
+
if ((0, _lexical.$isParagraphNode)(focusNode) && focusNode.getTextContentSize() === 0 && focusNode.getParent().getChildren().filter((node)=>(0, _lexical.$isParagraphNode)(node)).length > 1) {
|
|
93
|
+
focusNode.remove();
|
|
94
|
+
}
|
|
95
|
+
(0, _utils.$insertNodeToNearestRoot)(relationshipNode);
|
|
96
|
+
}
|
|
97
|
+
return true;
|
|
98
|
+
}, _lexical.COMMAND_PRIORITY_EDITOR);
|
|
99
|
+
}, [
|
|
100
|
+
editor
|
|
101
|
+
]);
|
|
102
|
+
return /*#__PURE__*/ _react.default.createElement(_drawer.RelationshipDrawer, {
|
|
103
|
+
enabledCollectionSlugs: enabledRelations
|
|
104
|
+
});
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL3NyYy9maWVsZC9mZWF0dXJlcy9yZWxhdGlvbnNoaXAvcGx1Z2lucy9pbmRleC50c3giXSwic291cmNlc0NvbnRlbnQiOlsiJ3VzZSBjbGllbnQnXG5pbXBvcnQgeyB1c2VMZXhpY2FsQ29tcG9zZXJDb250ZXh0IH0gZnJvbSAnQGxleGljYWwvcmVhY3QvTGV4aWNhbENvbXBvc2VyQ29udGV4dCdcbmltcG9ydCB7ICRpbnNlcnROb2RlVG9OZWFyZXN0Um9vdCB9IGZyb20gJ0BsZXhpY2FsL3V0aWxzJ1xuaW1wb3J0IHsgdXNlQ29uZmlnIH0gZnJvbSAnQHBheWxvYWRjbXMvdWknXG5pbXBvcnQge1xuICAkZ2V0UHJldmlvdXNTZWxlY3Rpb24sXG4gICRnZXRTZWxlY3Rpb24sXG4gICRpc1BhcmFncmFwaE5vZGUsXG4gICRpc1JhbmdlU2VsZWN0aW9uLFxuICBDT01NQU5EX1BSSU9SSVRZX0VESVRPUixcbiAgdHlwZSBMZXhpY2FsQ29tbWFuZCxcbiAgY3JlYXRlQ29tbWFuZCxcbn0gZnJvbSAnbGV4aWNhbCdcbmltcG9ydCB7IHVzZUVmZmVjdCB9IGZyb20gJ3JlYWN0J1xuaW1wb3J0IFJlYWN0IGZyb20gJ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