@payloadcms/richtext-lexical 3.0.0-beta.2 → 3.0.0-beta.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cell/index.d.ts +1 -1
- package/dist/cell/index.d.ts.map +1 -1
- package/dist/cell/index.js +2 -4
- package/dist/cell/index.js.map +1 -1
- package/dist/field/features/align/feature.client.d.ts.map +1 -1
- package/dist/field/features/align/feature.client.js +1 -2
- package/dist/field/features/align/feature.client.js.map +1 -1
- package/dist/field/features/blockquote/feature.client.d.ts.map +1 -1
- package/dist/field/features/blockquote/feature.client.js +3 -6
- package/dist/field/features/blockquote/feature.client.js.map +1 -1
- package/dist/field/features/blockquote/feature.server.d.ts.map +1 -1
- package/dist/field/features/blockquote/feature.server.js +4 -4
- package/dist/field/features/blockquote/feature.server.js.map +1 -1
- package/dist/field/features/blockquote/markdownTransformer.d.ts.map +1 -1
- package/dist/field/features/blockquote/markdownTransformer.js +2 -4
- package/dist/field/features/blockquote/markdownTransformer.js.map +1 -1
- package/dist/field/features/blocks/component/BlockContent.d.ts.map +1 -1
- package/dist/field/features/blocks/component/BlockContent.js +3 -5
- package/dist/field/features/blocks/component/BlockContent.js.map +1 -1
- package/dist/field/features/blocks/component/index.d.ts.map +1 -1
- package/dist/field/features/blocks/component/index.js +36 -3
- package/dist/field/features/blocks/component/index.js.map +1 -1
- package/dist/field/features/blocks/drawer/index.d.ts.map +1 -1
- package/dist/field/features/blocks/drawer/index.js +2 -4
- package/dist/field/features/blocks/drawer/index.js.map +1 -1
- package/dist/field/features/blocks/feature.server.d.ts.map +1 -1
- package/dist/field/features/blocks/feature.server.js +109 -77
- package/dist/field/features/blocks/feature.server.js.map +1 -1
- package/dist/field/features/blocks/nodes/BlocksNode.d.ts +1 -3
- package/dist/field/features/blocks/nodes/BlocksNode.d.ts.map +1 -1
- package/dist/field/features/blocks/nodes/BlocksNode.js +1 -2
- package/dist/field/features/blocks/nodes/BlocksNode.js.map +1 -1
- package/dist/field/features/blocks/plugin/commands.d.ts.map +1 -1
- package/dist/field/features/blocks/plugin/commands.js +1 -2
- package/dist/field/features/blocks/plugin/commands.js.map +1 -1
- package/dist/field/features/blocks/plugin/index.d.ts.map +1 -1
- package/dist/field/features/blocks/plugin/index.js +3 -6
- package/dist/field/features/blocks/plugin/index.js.map +1 -1
- package/dist/field/features/blocks/populationPromise.d.ts.map +1 -1
- package/dist/field/features/blocks/populationPromise.js +3 -18
- package/dist/field/features/blocks/populationPromise.js.map +1 -1
- package/dist/field/features/blocks/validate.d.ts.map +1 -1
- package/dist/field/features/blocks/validate.js +22 -36
- package/dist/field/features/blocks/validate.js.map +1 -1
- package/dist/field/features/converters/html/field/index.d.ts +8 -2
- package/dist/field/features/converters/html/field/index.d.ts.map +1 -1
- package/dist/field/features/converters/html/field/index.js +6 -3
- package/dist/field/features/converters/html/field/index.js.map +1 -1
- package/dist/field/features/debug/testrecorder/plugin/index.d.ts.map +1 -1
- package/dist/field/features/debug/testrecorder/plugin/index.js +2 -4
- package/dist/field/features/debug/testrecorder/plugin/index.js.map +1 -1
- package/dist/field/features/debug/treeview/plugin/index.d.ts.map +1 -1
- package/dist/field/features/debug/treeview/plugin/index.js +2 -4
- package/dist/field/features/debug/treeview/plugin/index.js.map +1 -1
- package/dist/field/features/format/bold/feature.client.d.ts.map +1 -1
- package/dist/field/features/format/bold/feature.client.js +1 -2
- package/dist/field/features/format/bold/feature.client.js.map +1 -1
- package/dist/field/features/format/inlinecode/feature.client.d.ts.map +1 -1
- package/dist/field/features/format/inlinecode/feature.client.js +1 -2
- package/dist/field/features/format/inlinecode/feature.client.js.map +1 -1
- package/dist/field/features/format/italic/feature.client.d.ts.map +1 -1
- package/dist/field/features/format/italic/feature.client.js +1 -2
- package/dist/field/features/format/italic/feature.client.js.map +1 -1
- package/dist/field/features/format/strikethrough/feature.client.d.ts.map +1 -1
- package/dist/field/features/format/strikethrough/feature.client.js +1 -2
- package/dist/field/features/format/strikethrough/feature.client.js.map +1 -1
- package/dist/field/features/format/subscript/feature.client.d.ts.map +1 -1
- package/dist/field/features/format/subscript/feature.client.js +1 -2
- package/dist/field/features/format/subscript/feature.client.js.map +1 -1
- package/dist/field/features/format/superscript/feature.client.d.ts.map +1 -1
- package/dist/field/features/format/superscript/feature.client.js +1 -2
- package/dist/field/features/format/superscript/feature.client.js.map +1 -1
- package/dist/field/features/format/underline/feature.client.d.ts.map +1 -1
- package/dist/field/features/format/underline/feature.client.js +1 -2
- package/dist/field/features/format/underline/feature.client.js.map +1 -1
- package/dist/field/features/heading/feature.client.d.ts.map +1 -1
- package/dist/field/features/heading/feature.client.js +3 -6
- package/dist/field/features/heading/feature.client.js.map +1 -1
- package/dist/field/features/heading/feature.server.d.ts.map +1 -1
- package/dist/field/features/heading/feature.server.js +5 -5
- package/dist/field/features/heading/feature.server.js.map +1 -1
- package/dist/field/features/heading/markdownTransformer.d.ts.map +1 -1
- package/dist/field/features/heading/markdownTransformer.js +1 -2
- package/dist/field/features/heading/markdownTransformer.js.map +1 -1
- package/dist/field/features/horizontalrule/component/index.d.ts +10 -0
- package/dist/field/features/horizontalrule/component/index.d.ts.map +1 -0
- package/dist/field/features/horizontalrule/component/index.js +62 -0
- package/dist/field/features/horizontalrule/component/index.js.map +1 -0
- package/dist/field/features/horizontalrule/feature.client.d.ts +3 -0
- package/dist/field/features/horizontalrule/feature.client.d.ts.map +1 -0
- package/dist/field/features/horizontalrule/feature.client.js +53 -0
- package/dist/field/features/horizontalrule/feature.client.js.map +1 -0
- package/dist/field/features/horizontalrule/feature.server.d.ts +3 -0
- package/dist/field/features/horizontalrule/feature.server.d.ts.map +1 -0
- package/dist/field/features/horizontalrule/feature.server.js +37 -0
- package/dist/field/features/horizontalrule/feature.server.js.map +1 -0
- package/dist/field/features/horizontalrule/markdownTransformer.d.ts +3 -0
- package/dist/field/features/horizontalrule/markdownTransformer.d.ts.map +1 -0
- package/dist/field/features/horizontalrule/markdownTransformer.js +23 -0
- package/dist/field/features/horizontalrule/markdownTransformer.js.map +1 -0
- package/dist/field/features/horizontalrule/nodes/HorizontalRuleNode.d.ts +53 -0
- package/dist/field/features/horizontalrule/nodes/HorizontalRuleNode.d.ts.map +1 -0
- package/dist/field/features/horizontalrule/nodes/HorizontalRuleNode.js +88 -0
- package/dist/field/features/horizontalrule/nodes/HorizontalRuleNode.js.map +1 -0
- package/dist/field/features/horizontalrule/plugin/index.d.ts +6 -0
- package/dist/field/features/horizontalrule/plugin/index.d.ts.map +1 -0
- package/dist/field/features/horizontalrule/plugin/index.js +31 -0
- package/dist/field/features/horizontalrule/plugin/index.js.map +1 -0
- package/dist/field/features/horizontalrule/plugin/index.scss +20 -0
- package/dist/field/features/indent/feature.client.d.ts.map +1 -1
- package/dist/field/features/indent/feature.client.js +1 -2
- package/dist/field/features/indent/feature.client.js.map +1 -1
- package/dist/field/features/link/drawer/baseFields.d.ts +3 -3
- package/dist/field/features/link/drawer/baseFields.d.ts.map +1 -1
- package/dist/field/features/link/drawer/baseFields.js +28 -42
- package/dist/field/features/link/drawer/baseFields.js.map +1 -1
- package/dist/field/features/link/drawer/index.js +3 -2
- package/dist/field/features/link/drawer/index.js.map +1 -1
- package/dist/field/features/link/drawer/types.d.ts +4 -2
- package/dist/field/features/link/drawer/types.d.ts.map +1 -1
- package/dist/field/features/link/drawer/types.js.map +1 -1
- package/dist/field/features/link/feature.client.d.ts.map +1 -1
- package/dist/field/features/link/feature.client.js +2 -4
- package/dist/field/features/link/feature.client.js.map +1 -1
- package/dist/field/features/link/feature.server.d.ts +0 -2
- package/dist/field/features/link/feature.server.d.ts.map +1 -1
- package/dist/field/features/link/feature.server.js +48 -9
- package/dist/field/features/link/feature.server.js.map +1 -1
- package/dist/field/features/link/nodes/AutoLinkNode.d.ts.map +1 -1
- package/dist/field/features/link/nodes/AutoLinkNode.js +1 -2
- package/dist/field/features/link/nodes/AutoLinkNode.js.map +1 -1
- package/dist/field/features/link/nodes/LinkNode.d.ts +1 -3
- package/dist/field/features/link/nodes/LinkNode.d.ts.map +1 -1
- package/dist/field/features/link/nodes/LinkNode.js +2 -4
- package/dist/field/features/link/nodes/LinkNode.js.map +1 -1
- package/dist/field/features/link/plugins/autoLink/index.d.ts.map +1 -1
- package/dist/field/features/link/plugins/autoLink/index.js +3 -6
- package/dist/field/features/link/plugins/autoLink/index.js.map +1 -1
- package/dist/field/features/link/plugins/floatingLinkEditor/LinkEditor/commands.d.ts.map +1 -1
- package/dist/field/features/link/plugins/floatingLinkEditor/LinkEditor/commands.js +1 -2
- package/dist/field/features/link/plugins/floatingLinkEditor/LinkEditor/commands.js.map +1 -1
- package/dist/field/features/link/plugins/floatingLinkEditor/LinkEditor/index.d.ts.map +1 -1
- package/dist/field/features/link/plugins/floatingLinkEditor/LinkEditor/index.js +56 -39
- package/dist/field/features/link/plugins/floatingLinkEditor/LinkEditor/index.js.map +1 -1
- package/dist/field/features/link/plugins/floatingLinkEditor/index.scss +9 -1
- package/dist/field/features/link/plugins/floatingLinkEditor/utilities.d.ts +3 -5
- package/dist/field/features/link/plugins/floatingLinkEditor/utilities.d.ts.map +1 -1
- package/dist/field/features/link/plugins/floatingLinkEditor/utilities.js +11 -29
- package/dist/field/features/link/plugins/floatingLinkEditor/utilities.js.map +1 -1
- package/dist/field/features/link/plugins/link/index.d.ts.map +1 -1
- package/dist/field/features/link/plugins/link/index.js +3 -12
- package/dist/field/features/link/plugins/link/index.js.map +1 -1
- package/dist/field/features/link/populationPromise.d.ts.map +1 -1
- package/dist/field/features/link/populationPromise.js +9 -25
- package/dist/field/features/link/populationPromise.js.map +1 -1
- package/dist/field/features/link/validate.d.ts +5 -0
- package/dist/field/features/link/validate.d.ts.map +1 -0
- package/dist/field/features/link/validate.js +32 -0
- package/dist/field/features/link/validate.js.map +1 -0
- package/dist/field/features/lists/checklist/feature.client.d.ts.map +1 -1
- package/dist/field/features/lists/checklist/feature.client.js +1 -2
- package/dist/field/features/lists/checklist/feature.client.js.map +1 -1
- package/dist/field/features/lists/checklist/feature.server.d.ts.map +1 -1
- package/dist/field/features/lists/checklist/feature.server.js +6 -6
- package/dist/field/features/lists/checklist/feature.server.js.map +1 -1
- package/dist/field/features/lists/checklist/markdownTransformers.d.ts.map +1 -1
- package/dist/field/features/lists/checklist/markdownTransformers.js +1 -2
- package/dist/field/features/lists/checklist/markdownTransformers.js.map +1 -1
- package/dist/field/features/lists/checklist/plugin/index.d.ts.map +1 -1
- package/dist/field/features/lists/checklist/plugin/index.js +1 -2
- package/dist/field/features/lists/checklist/plugin/index.js.map +1 -1
- package/dist/field/features/lists/common/markdown.d.ts.map +1 -1
- package/dist/field/features/lists/common/markdown.js +1 -2
- package/dist/field/features/lists/common/markdown.js.map +1 -1
- package/dist/field/features/lists/htmlConverter.d.ts.map +1 -1
- package/dist/field/features/lists/htmlConverter.js +13 -6
- package/dist/field/features/lists/htmlConverter.js.map +1 -1
- package/dist/field/features/lists/orderedlist/feature.client.d.ts.map +1 -1
- package/dist/field/features/lists/orderedlist/feature.client.js +1 -2
- package/dist/field/features/lists/orderedlist/feature.client.js.map +1 -1
- package/dist/field/features/lists/orderedlist/feature.server.d.ts.map +1 -1
- package/dist/field/features/lists/orderedlist/feature.server.js +6 -6
- package/dist/field/features/lists/orderedlist/feature.server.js.map +1 -1
- package/dist/field/features/lists/orderedlist/markdownTransformer.d.ts.map +1 -1
- package/dist/field/features/lists/orderedlist/markdownTransformer.js +1 -2
- package/dist/field/features/lists/orderedlist/markdownTransformer.js.map +1 -1
- package/dist/field/features/lists/plugin/index.d.ts.map +1 -1
- package/dist/field/features/lists/plugin/index.js +1 -2
- package/dist/field/features/lists/plugin/index.js.map +1 -1
- package/dist/field/features/lists/unorderedlist/feature.client.d.ts.map +1 -1
- package/dist/field/features/lists/unorderedlist/feature.client.js +1 -2
- package/dist/field/features/lists/unorderedlist/feature.client.js.map +1 -1
- package/dist/field/features/lists/unorderedlist/feature.server.d.ts.map +1 -1
- package/dist/field/features/lists/unorderedlist/feature.server.js +6 -6
- package/dist/field/features/lists/unorderedlist/feature.server.js.map +1 -1
- package/dist/field/features/lists/unorderedlist/markdownTransformer.d.ts.map +1 -1
- package/dist/field/features/lists/unorderedlist/markdownTransformer.js +1 -2
- package/dist/field/features/lists/unorderedlist/markdownTransformer.js.map +1 -1
- package/dist/field/features/migrations/lexicalPluginToLexical/converter/converters/upload/converter.d.ts.map +1 -1
- package/dist/field/features/migrations/lexicalPluginToLexical/converter/converters/upload/converter.js +2 -4
- package/dist/field/features/migrations/lexicalPluginToLexical/converter/converters/upload/converter.js.map +1 -1
- package/dist/field/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/index.d.ts +1 -3
- package/dist/field/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/index.d.ts.map +1 -1
- package/dist/field/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/index.js +2 -4
- package/dist/field/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/index.js.map +1 -1
- package/dist/field/features/migrations/slateToLexical/converter/converters/relationship/converter.d.ts.map +1 -1
- package/dist/field/features/migrations/slateToLexical/converter/converters/relationship/converter.js +2 -4
- package/dist/field/features/migrations/slateToLexical/converter/converters/relationship/converter.js.map +1 -1
- package/dist/field/features/migrations/slateToLexical/converter/converters/upload/converter.d.ts.map +1 -1
- package/dist/field/features/migrations/slateToLexical/converter/converters/upload/converter.js +2 -4
- package/dist/field/features/migrations/slateToLexical/converter/converters/upload/converter.js.map +1 -1
- package/dist/field/features/migrations/slateToLexical/converter/index.d.ts.map +1 -1
- package/dist/field/features/migrations/slateToLexical/converter/index.js +2 -1
- package/dist/field/features/migrations/slateToLexical/converter/index.js.map +1 -1
- package/dist/field/features/migrations/slateToLexical/nodes/unknownConvertedNode/index.d.ts +1 -3
- package/dist/field/features/migrations/slateToLexical/nodes/unknownConvertedNode/index.d.ts.map +1 -1
- package/dist/field/features/migrations/slateToLexical/nodes/unknownConvertedNode/index.js +2 -4
- package/dist/field/features/migrations/slateToLexical/nodes/unknownConvertedNode/index.js.map +1 -1
- package/dist/field/features/paragraph/feature.client.d.ts.map +1 -1
- package/dist/field/features/paragraph/feature.client.js +2 -4
- package/dist/field/features/paragraph/feature.client.js.map +1 -1
- package/dist/field/features/relationship/drawer/commands.d.ts.map +1 -1
- package/dist/field/features/relationship/drawer/commands.js +1 -2
- package/dist/field/features/relationship/drawer/commands.js.map +1 -1
- package/dist/field/features/relationship/drawer/index.d.ts.map +1 -1
- package/dist/field/features/relationship/drawer/index.js +7 -13
- package/dist/field/features/relationship/drawer/index.js.map +1 -1
- package/dist/field/features/relationship/feature.server.d.ts.map +1 -1
- package/dist/field/features/relationship/feature.server.js +3 -2
- package/dist/field/features/relationship/feature.server.js.map +1 -1
- package/dist/field/features/relationship/nodes/RelationshipNode.d.ts +3 -8
- package/dist/field/features/relationship/nodes/RelationshipNode.d.ts.map +1 -1
- package/dist/field/features/relationship/nodes/RelationshipNode.js +8 -8
- package/dist/field/features/relationship/nodes/RelationshipNode.js.map +1 -1
- package/dist/field/features/relationship/nodes/components/RelationshipComponent.d.ts.map +1 -1
- package/dist/field/features/relationship/nodes/components/RelationshipComponent.js +54 -7
- package/dist/field/features/relationship/nodes/components/RelationshipComponent.js.map +1 -1
- package/dist/field/features/relationship/plugins/index.d.ts.map +1 -1
- package/dist/field/features/relationship/plugins/index.js +3 -6
- package/dist/field/features/relationship/plugins/index.js.map +1 -1
- package/dist/field/features/relationship/populationPromise.js +7 -6
- package/dist/field/features/relationship/populationPromise.js.map +1 -1
- package/dist/field/features/typeUtilities.d.ts +8 -0
- package/dist/field/features/typeUtilities.d.ts.map +1 -0
- package/dist/field/features/typeUtilities.js +8 -0
- package/dist/field/features/typeUtilities.js.map +1 -0
- package/dist/field/features/types.d.ts +57 -33
- package/dist/field/features/types.d.ts.map +1 -1
- package/dist/field/features/types.js.map +1 -1
- package/dist/field/features/upload/component/ExtraFieldsDrawer/index.d.ts.map +1 -1
- package/dist/field/features/upload/component/ExtraFieldsDrawer/index.js +5 -6
- package/dist/field/features/upload/component/ExtraFieldsDrawer/index.js.map +1 -1
- package/dist/field/features/upload/component/index.d.ts.map +1 -1
- package/dist/field/features/upload/component/index.js +55 -9
- package/dist/field/features/upload/component/index.js.map +1 -1
- package/dist/field/features/upload/drawer/commands.d.ts.map +1 -1
- package/dist/field/features/upload/drawer/commands.js +1 -2
- package/dist/field/features/upload/drawer/commands.js.map +1 -1
- package/dist/field/features/upload/drawer/index.d.ts.map +1 -1
- package/dist/field/features/upload/drawer/index.js +8 -12
- package/dist/field/features/upload/drawer/index.js.map +1 -1
- package/dist/field/features/upload/feature.server.d.ts.map +1 -1
- package/dist/field/features/upload/feature.server.js +39 -11
- package/dist/field/features/upload/feature.server.js.map +1 -1
- package/dist/field/features/upload/nodes/UploadNode.d.ts +2 -14
- package/dist/field/features/upload/nodes/UploadNode.d.ts.map +1 -1
- package/dist/field/features/upload/nodes/UploadNode.js +6 -9
- package/dist/field/features/upload/nodes/UploadNode.js.map +1 -1
- package/dist/field/features/upload/plugin/index.d.ts +2 -2
- package/dist/field/features/upload/plugin/index.d.ts.map +1 -1
- package/dist/field/features/upload/plugin/index.js +4 -9
- package/dist/field/features/upload/plugin/index.js.map +1 -1
- package/dist/field/features/upload/populationPromise.js +11 -8
- package/dist/field/features/upload/populationPromise.js.map +1 -1
- package/dist/field/features/upload/validate.d.ts +2 -1
- package/dist/field/features/upload/validate.d.ts.map +1 -1
- package/dist/field/features/upload/validate.js +34 -12
- package/dist/field/features/upload/validate.js.map +1 -1
- package/dist/field/index.d.ts +1 -1
- package/dist/field/index.d.ts.map +1 -1
- package/dist/field/index.js.map +1 -1
- package/dist/field/lexical/LexicalEditor.d.ts.map +1 -1
- package/dist/field/lexical/LexicalEditor.js +6 -11
- package/dist/field/lexical/LexicalEditor.js.map +1 -1
- package/dist/field/lexical/LexicalProvider.d.ts +1 -1
- package/dist/field/lexical/LexicalProvider.d.ts.map +1 -1
- package/dist/field/lexical/LexicalProvider.js +1 -2
- package/dist/field/lexical/LexicalProvider.js.map +1 -1
- package/dist/field/lexical/config/client/default.d.ts +1 -1
- package/dist/field/lexical/config/client/default.d.ts.map +1 -1
- package/dist/field/lexical/config/client/default.js.map +1 -1
- package/dist/field/lexical/config/client/sanitize.d.ts +1 -1
- package/dist/field/lexical/config/client/sanitize.d.ts.map +1 -1
- package/dist/field/lexical/config/client/sanitize.js.map +1 -1
- package/dist/field/lexical/config/server/default.d.ts +2 -3
- package/dist/field/lexical/config/server/default.d.ts.map +1 -1
- package/dist/field/lexical/config/server/default.js +3 -3
- package/dist/field/lexical/config/server/default.js.map +1 -1
- package/dist/field/lexical/config/server/loader.d.ts +4 -2
- package/dist/field/lexical/config/server/loader.d.ts.map +1 -1
- package/dist/field/lexical/config/server/loader.js +3 -2
- package/dist/field/lexical/config/server/loader.js.map +1 -1
- package/dist/field/lexical/config/server/sanitize.d.ts +2 -1
- package/dist/field/lexical/config/server/sanitize.d.ts.map +1 -1
- package/dist/field/lexical/config/server/sanitize.js +23 -8
- package/dist/field/lexical/config/server/sanitize.js.map +1 -1
- package/dist/field/lexical/config/types.d.ts +1 -1
- package/dist/field/lexical/config/types.d.ts.map +1 -1
- package/dist/field/lexical/config/types.js.map +1 -1
- package/dist/field/lexical/plugins/FloatingSelectToolbar/ToolbarButton/index.d.ts.map +1 -1
- package/dist/field/lexical/plugins/FloatingSelectToolbar/ToolbarButton/index.js +3 -6
- package/dist/field/lexical/plugins/FloatingSelectToolbar/ToolbarButton/index.js.map +1 -1
- package/dist/field/lexical/plugins/FloatingSelectToolbar/ToolbarDropdown/DropDown.d.ts.map +1 -1
- package/dist/field/lexical/plugins/FloatingSelectToolbar/ToolbarDropdown/DropDown.js +3 -6
- package/dist/field/lexical/plugins/FloatingSelectToolbar/ToolbarDropdown/DropDown.js.map +1 -1
- package/dist/field/lexical/plugins/FloatingSelectToolbar/index.d.ts.map +1 -1
- package/dist/field/lexical/plugins/FloatingSelectToolbar/index.js +27 -29
- package/dist/field/lexical/plugins/FloatingSelectToolbar/index.js.map +1 -1
- package/dist/field/lexical/plugins/MarkdownShortcut/index.d.ts.map +1 -1
- package/dist/field/lexical/plugins/MarkdownShortcut/index.js +1 -2
- package/dist/field/lexical/plugins/MarkdownShortcut/index.js.map +1 -1
- package/dist/field/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/LexicalMenu.d.ts.map +1 -1
- package/dist/field/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/LexicalMenu.js +3 -6
- package/dist/field/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/LexicalMenu.js.map +1 -1
- package/dist/field/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/index.d.ts.map +1 -1
- package/dist/field/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/index.js +3 -6
- package/dist/field/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/index.js.map +1 -1
- package/dist/field/lexical/plugins/SlashMenu/index.d.ts.map +1 -1
- package/dist/field/lexical/plugins/SlashMenu/index.js +1 -2
- package/dist/field/lexical/plugins/SlashMenu/index.js.map +1 -1
- package/dist/field/lexical/plugins/handles/AddBlockHandlePlugin/index.d.ts.map +1 -1
- package/dist/field/lexical/plugins/handles/AddBlockHandlePlugin/index.js +13 -10
- package/dist/field/lexical/plugins/handles/AddBlockHandlePlugin/index.js.map +1 -1
- package/dist/field/lexical/plugins/handles/DraggableBlockPlugin/getNodeCloseToPoint.d.ts.map +1 -1
- package/dist/field/lexical/plugins/handles/DraggableBlockPlugin/getNodeCloseToPoint.js +1 -2
- package/dist/field/lexical/plugins/handles/DraggableBlockPlugin/getNodeCloseToPoint.js.map +1 -1
- package/dist/field/lexical/plugins/handles/DraggableBlockPlugin/index.d.ts.map +1 -1
- package/dist/field/lexical/plugins/handles/DraggableBlockPlugin/index.js +10 -7
- package/dist/field/lexical/plugins/handles/DraggableBlockPlugin/index.js.map +1 -1
- package/dist/field/lexical/plugins/handles/utils/doesLineHeightAffectElement.d.ts +9 -0
- package/dist/field/lexical/plugins/handles/utils/doesLineHeightAffectElement.d.ts.map +1 -0
- package/dist/field/lexical/plugins/handles/utils/doesLineHeightAffectElement.js +35 -0
- package/dist/field/lexical/plugins/handles/utils/doesLineHeightAffectElement.js.map +1 -0
- package/dist/field/lexical/plugins/handles/utils/getTopLevelNodeKeys.d.ts.map +1 -1
- package/dist/field/lexical/plugins/handles/utils/getTopLevelNodeKeys.js +1 -2
- package/dist/field/lexical/plugins/handles/utils/getTopLevelNodeKeys.js.map +1 -1
- package/dist/field/lexical/plugins/handles/utils/setHandlePosition.d.ts +1 -1
- package/dist/field/lexical/plugins/handles/utils/setHandlePosition.d.ts.map +1 -1
- package/dist/field/lexical/plugins/handles/utils/setHandlePosition.js +17 -7
- package/dist/field/lexical/plugins/handles/utils/setHandlePosition.js.map +1 -1
- package/dist/field/lexical/theme/EditorTheme.scss +11 -8
- package/dist/field/lexical/ui/ContentEditable.d.ts.map +1 -1
- package/dist/field/lexical/ui/ContentEditable.js +1 -2
- package/dist/field/lexical/ui/ContentEditable.js.map +1 -1
- package/dist/field/lexical/ui/icons/HorizontalRule/index.d.ts +3 -0
- package/dist/field/lexical/ui/icons/HorizontalRule/index.d.ts.map +1 -0
- package/dist/field/lexical/ui/icons/HorizontalRule/index.js +19 -0
- package/dist/field/lexical/ui/icons/HorizontalRule/index.js.map +1 -0
- package/dist/field/lexical/utils/getSelectedNode.d.ts.map +1 -1
- package/dist/field/lexical/utils/getSelectedNode.js +1 -2
- package/dist/field/lexical/utils/getSelectedNode.js.map +1 -1
- package/dist/field/lexical/utils/nodeFormat.d.ts +2 -1
- package/dist/field/lexical/utils/nodeFormat.d.ts.map +1 -1
- package/dist/field/lexical/utils/nodeFormat.js.map +1 -1
- package/dist/field/lexical/utils/setFloatingElemPosition.d.ts +1 -1
- package/dist/field/lexical/utils/setFloatingElemPosition.d.ts.map +1 -1
- package/dist/field/lexical/utils/setFloatingElemPosition.js +15 -13
- package/dist/field/lexical/utils/setFloatingElemPosition.js.map +1 -1
- package/dist/field/lexical/utils/url.d.ts.map +1 -1
- package/dist/field/lexical/utils/url.js +3 -0
- package/dist/field/lexical/utils/url.js.map +1 -1
- package/dist/forEachNodeRecursively.d.ts +10 -0
- package/dist/forEachNodeRecursively.d.ts.map +1 -0
- package/dist/forEachNodeRecursively.js +24 -0
- package/dist/forEachNodeRecursively.js.map +1 -0
- package/dist/generateComponentMap.d.ts.map +1 -1
- package/dist/generateComponentMap.js +16 -22
- package/dist/generateComponentMap.js.map +1 -1
- package/dist/generateSchemaMap.d.ts.map +1 -1
- package/dist/generateSchemaMap.js +4 -12
- package/dist/generateSchemaMap.js.map +1 -1
- package/dist/index.d.ts +6 -5
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +260 -173
- package/dist/index.js.map +1 -1
- package/dist/populate/defaultValue.d.ts.map +1 -1
- package/dist/populate/defaultValue.js +1 -0
- package/dist/populate/defaultValue.js.map +1 -1
- package/dist/populate/populate.d.ts +3 -3
- package/dist/populate/populate.d.ts.map +1 -1
- package/dist/populate/populate.js.map +1 -1
- package/dist/populate/populateLexicalPopulationPromises.d.ts +12 -0
- package/dist/populate/populateLexicalPopulationPromises.d.ts.map +1 -0
- package/dist/populate/populateLexicalPopulationPromises.js +35 -0
- package/dist/populate/populateLexicalPopulationPromises.js.map +1 -0
- package/dist/populate/recurseNestedFields.d.ts +7 -4
- package/dist/populate/recurseNestedFields.d.ts.map +1 -1
- package/dist/populate/recurseNestedFields.js +3 -5
- package/dist/populate/recurseNestedFields.js.map +1 -1
- package/dist/scss/app.scss +2 -3
- package/dist/scss/vars.scss +0 -7
- package/dist/types.d.ts +11 -5
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js.map +1 -1
- package/dist/validate/index.d.ts +1 -1
- package/dist/validate/index.d.ts.map +1 -1
- package/package.json +47 -46
- package/components.d.ts +0 -6
- package/components.js +0 -7
- package/dist/populate/richTextRelationshipPromise.d.ts +0 -23
- package/dist/populate/richTextRelationshipPromise.d.ts.map +0 -1
- package/dist/populate/richTextRelationshipPromise.js +0 -68
- package/dist/populate/richTextRelationshipPromise.js.map +0 -1
- package/dist/scss/fonts.scss +0 -75
- package/src/index.ts +0 -423
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/populate/defaultValue.ts"],"sourcesContent":["import type { SerializedEditorState, SerializedParagraphNode, SerializedTextNode } from 'lexical'\n\nexport const defaultRichTextValue: SerializedEditorState = {\n root: {\n type: 'root',\n children: [\n {\n type: 'paragraph',\n children: [\n {\n type: 'text',\n detail: 0,\n format: 0,\n mode: 'normal',\n style: '',\n text: '',\n version: 1,\n } as SerializedTextNode,\n ],\n direction: null,\n format: '',\n indent: 0,\n version: 1,\n } as SerializedParagraphNode,\n ],\n direction: null,\n format: '',\n indent: 0,\n version: 1,\n },\n}\n\nexport const defaultRichTextValueV2: SerializedEditorState = {\n root: {\n type: 'root',\n children: [\n {\n type: 'paragraph',\n children: [],\n direction: null,\n format: '',\n indent: 0,\n version: 1,\n } as SerializedParagraphNode,\n ],\n direction: null,\n format: '',\n indent: 0,\n version: 1,\n },\n}\n"],"names":["defaultRichTextValue","root","type","children","detail","format","mode","style","text","version","direction","indent","defaultRichTextValueV2"],"rangeMappings":"
|
|
1
|
+
{"version":3,"sources":["../../src/populate/defaultValue.ts"],"sourcesContent":["import type { SerializedEditorState, SerializedParagraphNode, SerializedTextNode } from 'lexical'\n\nexport const defaultRichTextValue: SerializedEditorState = {\n root: {\n type: 'root',\n children: [\n {\n type: 'paragraph',\n children: [\n {\n type: 'text',\n detail: 0,\n format: 0,\n mode: 'normal',\n style: '',\n text: '',\n version: 1,\n } as SerializedTextNode,\n ],\n direction: null,\n format: '',\n indent: 0,\n textFormat: 0,\n version: 1,\n } as SerializedParagraphNode,\n ],\n direction: null,\n format: '',\n indent: 0,\n version: 1,\n },\n}\n\nexport const defaultRichTextValueV2: SerializedEditorState = {\n root: {\n type: 'root',\n children: [\n {\n type: 'paragraph',\n children: [],\n direction: null,\n format: '',\n indent: 0,\n version: 1,\n } as SerializedParagraphNode,\n ],\n direction: null,\n format: '',\n indent: 0,\n version: 1,\n },\n}\n"],"names":["defaultRichTextValue","root","type","children","detail","format","mode","style","text","version","direction","indent","textFormat","defaultRichTextValueV2"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAEA,OAAO,MAAMA,uBAA8C;IACzDC,MAAM;QACJC,MAAM;QACNC,UAAU;YACR;gBACED,MAAM;gBACNC,UAAU;oBACR;wBACED,MAAM;wBACNE,QAAQ;wBACRC,QAAQ;wBACRC,MAAM;wBACNC,OAAO;wBACPC,MAAM;wBACNC,SAAS;oBACX;iBACD;gBACDC,WAAW;gBACXL,QAAQ;gBACRM,QAAQ;gBACRC,YAAY;gBACZH,SAAS;YACX;SACD;QACDC,WAAW;QACXL,QAAQ;QACRM,QAAQ;QACRF,SAAS;IACX;AACF,EAAC;AAED,OAAO,MAAMI,yBAAgD;IAC3DZ,MAAM;QACJC,MAAM;QACNC,UAAU;YACR;gBACED,MAAM;gBACNC,UAAU,EAAE;gBACZO,WAAW;gBACXL,QAAQ;gBACRM,QAAQ;gBACRF,SAAS;YACX;SACD;QACDC,WAAW;QACXL,QAAQ;QACRM,QAAQ;QACRF,SAAS;IACX;AACF,EAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { SerializedEditorState } from 'lexical';
|
|
2
|
-
import type {
|
|
2
|
+
import type { PayloadRequestWithData } from 'payload/types';
|
|
3
3
|
import type { Collection, Field, RichTextField } from 'payload/types';
|
|
4
4
|
import type { AdapterProps } from '../types.js';
|
|
5
5
|
type Arguments = {
|
|
@@ -9,13 +9,13 @@ type Arguments = {
|
|
|
9
9
|
field: RichTextField<SerializedEditorState, AdapterProps>;
|
|
10
10
|
key: number | string;
|
|
11
11
|
overrideAccess?: boolean;
|
|
12
|
-
req:
|
|
12
|
+
req: PayloadRequestWithData;
|
|
13
13
|
showHiddenFields: boolean;
|
|
14
14
|
};
|
|
15
15
|
export declare const populate: ({ id, collection, currentDepth, data, depth, key, overrideAccess, req, showHiddenFields, }: Omit<Arguments, 'field'> & {
|
|
16
16
|
collection: Collection;
|
|
17
17
|
field: Field;
|
|
18
|
-
id: string;
|
|
18
|
+
id: number | string;
|
|
19
19
|
}) => Promise<void>;
|
|
20
20
|
export {};
|
|
21
21
|
//# sourceMappingURL=populate.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"populate.d.ts","sourceRoot":"","sources":["../../src/populate/populate.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAA;AACpD,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"populate.d.ts","sourceRoot":"","sources":["../../src/populate/populate.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAA;AACpD,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,eAAe,CAAA;AAC3D,OAAO,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE,aAAa,EAAE,MAAM,eAAe,CAAA;AAErE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AAE/C,KAAK,SAAS,GAAG;IACf,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,IAAI,EAAE,OAAO,CAAA;IACb,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,EAAE,aAAa,CAAC,qBAAqB,EAAE,YAAY,CAAC,CAAA;IACzD,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;IACpB,cAAc,CAAC,EAAE,OAAO,CAAA;IACxB,GAAG,EAAE,sBAAsB,CAAA;IAC3B,gBAAgB,EAAE,OAAO,CAAA;CAC1B,CAAA;AAED,eAAO,MAAM,QAAQ,+FAUlB,KAAK,SAAS,EAAE,OAAO,CAAC,GAAG;IAC5B,UAAU,EAAE,UAAU,CAAA;IACtB,KAAK,EAAE,KAAK,CAAA;IACZ,EAAE,EAAE,MAAM,GAAG,MAAM,CAAA;CACpB,KAAG,QAAQ,IAAI,CAsBf,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/populate/populate.ts"],"sourcesContent":["import type { SerializedEditorState } from 'lexical'\nimport type {
|
|
1
|
+
{"version":3,"sources":["../../src/populate/populate.ts"],"sourcesContent":["import type { SerializedEditorState } from 'lexical'\nimport type { PayloadRequestWithData } from 'payload/types'\nimport type { Collection, Field, RichTextField } from 'payload/types'\n\nimport type { AdapterProps } from '../types.js'\n\ntype Arguments = {\n currentDepth?: number\n data: unknown\n depth: number\n field: RichTextField<SerializedEditorState, AdapterProps>\n key: number | string\n overrideAccess?: boolean\n req: PayloadRequestWithData\n showHiddenFields: boolean\n}\n\nexport const populate = async ({\n id,\n collection,\n currentDepth,\n data,\n depth,\n key,\n overrideAccess,\n req,\n showHiddenFields,\n}: Omit<Arguments, 'field'> & {\n collection: Collection\n field: Field\n id: number | string\n}): Promise<void> => {\n const dataRef = data as Record<string, unknown>\n\n const doc = await req.payloadDataLoader.load(\n JSON.stringify([\n req.transactionID,\n collection.config.slug,\n id,\n depth,\n currentDepth + 1,\n req.locale,\n req.fallbackLocale,\n typeof overrideAccess === 'undefined' ? false : overrideAccess,\n showHiddenFields,\n ]),\n )\n\n if (doc) {\n dataRef[key] = doc\n } else {\n dataRef[key] = null\n }\n}\n"],"names":["populate","id","collection","currentDepth","data","depth","key","overrideAccess","req","showHiddenFields","dataRef","doc","payloadDataLoader","load","JSON","stringify","transactionID","config","slug","locale","fallbackLocale"],"rangeMappings":";;;;;;;;;;;;;;;;;;","mappings":"AAiBA,OAAO,MAAMA,WAAW,OAAO,EAC7BC,EAAE,EACFC,UAAU,EACVC,YAAY,EACZC,IAAI,EACJC,KAAK,EACLC,GAAG,EACHC,cAAc,EACdC,GAAG,EACHC,gBAAgB,EAKjB;IACC,MAAMC,UAAUN;IAEhB,MAAMO,MAAM,MAAMH,IAAII,iBAAiB,CAACC,IAAI,CAC1CC,KAAKC,SAAS,CAAC;QACbP,IAAIQ,aAAa;QACjBd,WAAWe,MAAM,CAACC,IAAI;QACtBjB;QACAI;QACAF,eAAe;QACfK,IAAIW,MAAM;QACVX,IAAIY,cAAc;QAClB,OAAOb,mBAAmB,cAAc,QAAQA;QAChDE;KACD;IAGH,IAAIE,KAAK;QACPD,OAAO,CAACJ,IAAI,GAAGK;IACjB,OAAO;QACLD,OAAO,CAACJ,IAAI,GAAG;IACjB;AACF,EAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { SerializedEditorState } from 'lexical';
|
|
2
|
+
import type { RichTextAdapter } from 'payload/types';
|
|
3
|
+
import type { PopulationPromise } from '../field/features/types.js';
|
|
4
|
+
import type { AdapterProps } from '../types.js';
|
|
5
|
+
export type Args = Parameters<RichTextAdapter<SerializedEditorState, AdapterProps>['populationPromises']>[0] & {
|
|
6
|
+
editorPopulationPromises: Map<string, Array<PopulationPromise>>;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Appends all new populationPromises to the populationPromises prop
|
|
10
|
+
*/
|
|
11
|
+
export declare const populateLexicalPopulationPromises: ({ context, currentDepth, depth, editorPopulationPromises, field, fieldPromises, findMany, flattenLocales, overrideAccess, populationPromises, req, showHiddenFields, siblingDoc, }: Args) => void;
|
|
12
|
+
//# sourceMappingURL=populateLexicalPopulationPromises.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"populateLexicalPopulationPromises.d.ts","sourceRoot":"","sources":["../../src/populate/populateLexicalPopulationPromises.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAA;AACpD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,eAAe,CAAA;AAEpD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAA;AACnE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AAI/C,MAAM,MAAM,IAAI,GAAG,UAAU,CAC3B,eAAe,CAAC,qBAAqB,EAAE,YAAY,CAAC,CAAC,oBAAoB,CAAC,CAC3E,CAAC,CAAC,CAAC,GAAG;IACL,wBAAwB,EAAE,GAAG,CAAC,MAAM,EAAE,KAAK,CAAC,iBAAiB,CAAC,CAAC,CAAA;CAChE,CAAA;AAED;;GAEG;AACH,eAAO,MAAM,iCAAiC,uLAc3C,IAAI,SA8BN,CAAA"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { recurseNodes } from '../forEachNodeRecursively.js';
|
|
2
|
+
/**
|
|
3
|
+
* Appends all new populationPromises to the populationPromises prop
|
|
4
|
+
*/ export const populateLexicalPopulationPromises = ({ context, currentDepth, depth, editorPopulationPromises, field, fieldPromises, findMany, flattenLocales, overrideAccess, populationPromises, req, showHiddenFields, siblingDoc })=>{
|
|
5
|
+
if (depth <= 0 || currentDepth > depth) {
|
|
6
|
+
return;
|
|
7
|
+
}
|
|
8
|
+
recurseNodes({
|
|
9
|
+
callback: (node)=>{
|
|
10
|
+
if (editorPopulationPromises?.has(node.type)) {
|
|
11
|
+
for (const promise of editorPopulationPromises.get(node.type)){
|
|
12
|
+
promise({
|
|
13
|
+
context,
|
|
14
|
+
currentDepth,
|
|
15
|
+
depth,
|
|
16
|
+
editorPopulationPromises,
|
|
17
|
+
field,
|
|
18
|
+
fieldPromises,
|
|
19
|
+
findMany,
|
|
20
|
+
flattenLocales,
|
|
21
|
+
node,
|
|
22
|
+
overrideAccess,
|
|
23
|
+
populationPromises,
|
|
24
|
+
req,
|
|
25
|
+
showHiddenFields,
|
|
26
|
+
siblingDoc
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
nodes: siblingDoc[field?.name]?.root?.children ?? []
|
|
32
|
+
});
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
//# sourceMappingURL=populateLexicalPopulationPromises.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/populate/populateLexicalPopulationPromises.ts"],"sourcesContent":["import type { SerializedEditorState } from 'lexical'\nimport type { RichTextAdapter } from 'payload/types'\n\nimport type { PopulationPromise } from '../field/features/types.js'\nimport type { AdapterProps } from '../types.js'\n\nimport { recurseNodes } from '../forEachNodeRecursively.js'\n\nexport type Args = Parameters<\n RichTextAdapter<SerializedEditorState, AdapterProps>['populationPromises']\n>[0] & {\n editorPopulationPromises: Map<string, Array<PopulationPromise>>\n}\n\n/**\n * Appends all new populationPromises to the populationPromises prop\n */\nexport const populateLexicalPopulationPromises = ({\n context,\n currentDepth,\n depth,\n editorPopulationPromises,\n field,\n fieldPromises,\n findMany,\n flattenLocales,\n overrideAccess,\n populationPromises,\n req,\n showHiddenFields,\n siblingDoc,\n}: Args) => {\n if (depth <= 0 || currentDepth > depth) {\n return\n }\n\n recurseNodes({\n callback: (node) => {\n if (editorPopulationPromises?.has(node.type)) {\n for (const promise of editorPopulationPromises.get(node.type)) {\n promise({\n context,\n currentDepth,\n depth,\n editorPopulationPromises,\n field,\n fieldPromises,\n findMany,\n flattenLocales,\n node,\n overrideAccess,\n populationPromises,\n req,\n showHiddenFields,\n siblingDoc,\n })\n }\n }\n },\n nodes: (siblingDoc[field?.name] as SerializedEditorState)?.root?.children ?? [],\n })\n}\n"],"names":["recurseNodes","populateLexicalPopulationPromises","context","currentDepth","depth","editorPopulationPromises","field","fieldPromises","findMany","flattenLocales","overrideAccess","populationPromises","req","showHiddenFields","siblingDoc","callback","node","has","type","promise","get","nodes","name","root","children"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAMA,SAASA,YAAY,QAAQ,+BAA8B;AAQ3D;;CAEC,GACD,OAAO,MAAMC,oCAAoC,CAAC,EAChDC,OAAO,EACPC,YAAY,EACZC,KAAK,EACLC,wBAAwB,EACxBC,KAAK,EACLC,aAAa,EACbC,QAAQ,EACRC,cAAc,EACdC,cAAc,EACdC,kBAAkB,EAClBC,GAAG,EACHC,gBAAgB,EAChBC,UAAU,EACL;IACL,IAAIV,SAAS,KAAKD,eAAeC,OAAO;QACtC;IACF;IAEAJ,aAAa;QACXe,UAAU,CAACC;YACT,IAAIX,0BAA0BY,IAAID,KAAKE,IAAI,GAAG;gBAC5C,KAAK,MAAMC,WAAWd,yBAAyBe,GAAG,CAACJ,KAAKE,IAAI,EAAG;oBAC7DC,QAAQ;wBACNjB;wBACAC;wBACAC;wBACAC;wBACAC;wBACAC;wBACAC;wBACAC;wBACAO;wBACAN;wBACAC;wBACAC;wBACAC;wBACAC;oBACF;gBACF;YACF;QACF;QACAO,OAAO,AAACP,UAAU,CAACR,OAAOgB,KAAK,EAA4BC,MAAMC,YAAY,EAAE;IACjF;AACF,EAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { RequestContext } from 'payload';
|
|
2
|
-
import type { Field,
|
|
2
|
+
import type { Field, PayloadRequestWithData } from 'payload/types';
|
|
3
3
|
import type { PopulationPromise } from '../field/features/types.js';
|
|
4
4
|
type NestedRichTextFieldsArgs = {
|
|
5
5
|
context: RequestContext;
|
|
@@ -10,16 +10,19 @@ type NestedRichTextFieldsArgs = {
|
|
|
10
10
|
* This maps all the population promises to the node types
|
|
11
11
|
*/
|
|
12
12
|
editorPopulationPromises: Map<string, Array<PopulationPromise>>;
|
|
13
|
+
/**
|
|
14
|
+
* fieldPromises are used for things like field hooks. They should be awaited before awaiting populationPromises
|
|
15
|
+
*/
|
|
16
|
+
fieldPromises: Promise<void>[];
|
|
13
17
|
fields: Field[];
|
|
14
18
|
findMany: boolean;
|
|
15
19
|
flattenLocales: boolean;
|
|
16
20
|
overrideAccess: boolean;
|
|
17
21
|
populationPromises: Promise<void>[];
|
|
18
|
-
|
|
19
|
-
req: PayloadRequest;
|
|
22
|
+
req: PayloadRequestWithData;
|
|
20
23
|
showHiddenFields: boolean;
|
|
21
24
|
siblingDoc: Record<string, unknown>;
|
|
22
25
|
};
|
|
23
|
-
export declare const recurseNestedFields: ({ context, currentDepth, data, depth, fields, findMany, flattenLocales, overrideAccess, populationPromises,
|
|
26
|
+
export declare const recurseNestedFields: ({ context, currentDepth, data, depth, fieldPromises, fields, findMany, flattenLocales, overrideAccess, populationPromises, req, showHiddenFields, siblingDoc, }: NestedRichTextFieldsArgs) => void;
|
|
24
27
|
export {};
|
|
25
28
|
//# sourceMappingURL=recurseNestedFields.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"recurseNestedFields.d.ts","sourceRoot":"","sources":["../../src/populate/recurseNestedFields.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAA;AAC7C,OAAO,KAAK,EAAE,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"recurseNestedFields.d.ts","sourceRoot":"","sources":["../../src/populate/recurseNestedFields.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAA;AAC7C,OAAO,KAAK,EAAE,KAAK,EAAE,sBAAsB,EAAE,MAAM,eAAe,CAAA;AAIlE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAA;AAEnE,KAAK,wBAAwB,GAAG;IAC9B,OAAO,EAAE,cAAc,CAAA;IACvB,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,IAAI,EAAE,OAAO,CAAA;IACb,KAAK,EAAE,MAAM,CAAA;IACb;;OAEG;IACH,wBAAwB,EAAE,GAAG,CAAC,MAAM,EAAE,KAAK,CAAC,iBAAiB,CAAC,CAAC,CAAA;IAC/D;;OAEG;IACH,aAAa,EAAE,OAAO,CAAC,IAAI,CAAC,EAAE,CAAA;IAC9B,MAAM,EAAE,KAAK,EAAE,CAAA;IACf,QAAQ,EAAE,OAAO,CAAA;IACjB,cAAc,EAAE,OAAO,CAAA;IACvB,cAAc,EAAE,OAAO,CAAA;IACvB,kBAAkB,EAAE,OAAO,CAAC,IAAI,CAAC,EAAE,CAAA;IACnC,GAAG,EAAE,sBAAsB,CAAA;IAC3B,gBAAgB,EAAE,OAAO,CAAA;IACzB,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;CACpC,CAAA;AAED,eAAO,MAAM,mBAAmB,oKAc7B,wBAAwB,KAAG,IAsB7B,CAAA"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { afterReadTraverseFields } from 'payload/utilities';
|
|
2
|
-
export const recurseNestedFields = ({ context, currentDepth = 0, data, depth, fields, findMany, flattenLocales, overrideAccess = false, populationPromises,
|
|
2
|
+
export const recurseNestedFields = ({ context, currentDepth = 0, data, depth, fieldPromises, fields, findMany, flattenLocales, overrideAccess = false, populationPromises, req, showHiddenFields, siblingDoc })=>{
|
|
3
3
|
afterReadTraverseFields({
|
|
4
4
|
collection: null,
|
|
5
5
|
context,
|
|
@@ -7,7 +7,7 @@ export const recurseNestedFields = ({ context, currentDepth = 0, data, depth, fi
|
|
|
7
7
|
depth,
|
|
8
8
|
doc: data,
|
|
9
9
|
fallbackLocale: req.fallbackLocale,
|
|
10
|
-
fieldPromises
|
|
10
|
+
fieldPromises,
|
|
11
11
|
fields,
|
|
12
12
|
findMany,
|
|
13
13
|
flattenLocales,
|
|
@@ -17,9 +17,7 @@ export const recurseNestedFields = ({ context, currentDepth = 0, data, depth, fi
|
|
|
17
17
|
populationPromises,
|
|
18
18
|
req,
|
|
19
19
|
showHiddenFields,
|
|
20
|
-
siblingDoc
|
|
21
|
-
triggerAccessControl: false,
|
|
22
|
-
triggerHooks: false
|
|
20
|
+
siblingDoc
|
|
23
21
|
});
|
|
24
22
|
};
|
|
25
23
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/populate/recurseNestedFields.ts"],"sourcesContent":["import type { RequestContext } from 'payload'\nimport type { Field,
|
|
1
|
+
{"version":3,"sources":["../../src/populate/recurseNestedFields.ts"],"sourcesContent":["import type { RequestContext } from 'payload'\nimport type { Field, PayloadRequestWithData } from 'payload/types'\n\nimport { afterReadTraverseFields } from 'payload/utilities'\n\nimport type { PopulationPromise } from '../field/features/types.js'\n\ntype NestedRichTextFieldsArgs = {\n context: RequestContext\n currentDepth?: number\n data: unknown\n depth: number\n /**\n * This maps all the population promises to the node types\n */\n editorPopulationPromises: Map<string, Array<PopulationPromise>>\n /**\n * fieldPromises are used for things like field hooks. They should be awaited before awaiting populationPromises\n */\n fieldPromises: Promise<void>[]\n fields: Field[]\n findMany: boolean\n flattenLocales: boolean\n overrideAccess: boolean\n populationPromises: Promise<void>[]\n req: PayloadRequestWithData\n showHiddenFields: boolean\n siblingDoc: Record<string, unknown>\n}\n\nexport const recurseNestedFields = ({\n context,\n currentDepth = 0,\n data,\n depth,\n fieldPromises,\n fields,\n findMany,\n flattenLocales,\n overrideAccess = false,\n populationPromises,\n req,\n showHiddenFields,\n siblingDoc,\n}: NestedRichTextFieldsArgs): void => {\n afterReadTraverseFields({\n collection: null, // Pass from core? This is only needed for hooks, so we can leave this null for now\n context,\n currentDepth,\n depth,\n doc: data as any, // Looks like it's only needed for hooks and access control, so doesn't matter what we pass here right now\n fallbackLocale: req.fallbackLocale,\n fieldPromises,\n fields,\n findMany,\n flattenLocales,\n global: null, // Pass from core? This is only needed for hooks, so we can leave this null for now\n locale: req.locale,\n overrideAccess,\n populationPromises, // This is not the same as populationPromises passed into this recurseNestedFields. These are just promises resolved at the very end.\n req,\n showHiddenFields,\n siblingDoc,\n //triggerAccessControl: false, // TODO: Enable this to support access control\n //triggerHooks: false, // TODO: Enable this to support hooks\n })\n}\n"],"names":["afterReadTraverseFields","recurseNestedFields","context","currentDepth","data","depth","fieldPromises","fields","findMany","flattenLocales","overrideAccess","populationPromises","req","showHiddenFields","siblingDoc","collection","doc","fallbackLocale","global","locale"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;","mappings":"AAGA,SAASA,uBAAuB,QAAQ,oBAAmB;AA2B3D,OAAO,MAAMC,sBAAsB,CAAC,EAClCC,OAAO,EACPC,eAAe,CAAC,EAChBC,IAAI,EACJC,KAAK,EACLC,aAAa,EACbC,MAAM,EACNC,QAAQ,EACRC,cAAc,EACdC,iBAAiB,KAAK,EACtBC,kBAAkB,EAClBC,GAAG,EACHC,gBAAgB,EAChBC,UAAU,EACe;IACzBd,wBAAwB;QACtBe,YAAY;QACZb;QACAC;QACAE;QACAW,KAAKZ;QACLa,gBAAgBL,IAAIK,cAAc;QAClCX;QACAC;QACAC;QACAC;QACAS,QAAQ;QACRC,QAAQP,IAAIO,MAAM;QAClBT;QACAC;QACAC;QACAC;QACAC;IAGF;AACF,EAAC"}
|
package/dist/scss/app.scss
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
@import 'fonts';
|
|
2
1
|
@import 'styles';
|
|
3
2
|
@import './toastify.scss';
|
|
4
3
|
@import './colors.scss';
|
|
@@ -20,9 +19,9 @@
|
|
|
20
19
|
--theme-overlay: rgba(5, 5, 5, 0.5);
|
|
21
20
|
--theme-baseline: #{$baseline-px};
|
|
22
21
|
--theme-baseline-body-size: #{$baseline-body-size};
|
|
23
|
-
--font-body: '
|
|
22
|
+
--font-body: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial,
|
|
23
|
+
sans-serif;
|
|
24
24
|
--font-mono: monospace;
|
|
25
|
-
--font-serif: 'Merriweather', serif;
|
|
26
25
|
|
|
27
26
|
--style-radius-s: #{$style-radius-s};
|
|
28
27
|
--style-radius-m: #{$style-radius-m};
|
package/dist/scss/vars.scss
CHANGED
|
@@ -21,13 +21,6 @@ $baseline: math.div($baseline-px, $baseline-body-size) + rem;
|
|
|
21
21
|
@return (math.div($baseline-px, $baseline-body-size) * $multiplier) + rem;
|
|
22
22
|
}
|
|
23
23
|
|
|
24
|
-
//////////////////////////////
|
|
25
|
-
// FONTS (DEPRECATED. DO NOT USE. PREFER CSS VARIABLES)
|
|
26
|
-
//////////////////////////////
|
|
27
|
-
|
|
28
|
-
$font-body: 'Suisse Intl' !default;
|
|
29
|
-
$font-mono: monospace !default;
|
|
30
|
-
|
|
31
24
|
//////////////////////////////
|
|
32
25
|
// COLORS (DEPRECATED. DO NOT USE. PREFER CSS VARIABLES)
|
|
33
26
|
//////////////////////////////
|
package/dist/types.d.ts
CHANGED
|
@@ -1,20 +1,26 @@
|
|
|
1
|
-
import type { SerializedEditorState } from 'lexical';
|
|
2
|
-
import type { EditorConfig as LexicalEditorConfig } from 'lexical/LexicalEditor.js';
|
|
1
|
+
import type { EditorConfig as LexicalEditorConfig, SerializedEditorState } from 'lexical';
|
|
3
2
|
import type { FieldPermissions } from 'payload/auth';
|
|
4
|
-
import type { FieldTypes } from 'payload/config';
|
|
3
|
+
import type { FieldTypes, SanitizedConfig } from 'payload/config';
|
|
5
4
|
import type { RichTextAdapter, RichTextFieldProps } from 'payload/types';
|
|
6
5
|
import type React from 'react';
|
|
7
6
|
import type { FeatureProviderServer } from './field/features/types.js';
|
|
8
7
|
import type { SanitizedServerEditorConfig } from './field/lexical/config/types.js';
|
|
9
8
|
export type LexicalEditorProps = {
|
|
10
9
|
features?: (({ defaultFeatures, }: {
|
|
11
|
-
defaultFeatures: FeatureProviderServer<
|
|
12
|
-
}) => FeatureProviderServer<
|
|
10
|
+
defaultFeatures: FeatureProviderServer<any, any>[];
|
|
11
|
+
}) => FeatureProviderServer<any, any>[]) | FeatureProviderServer<any, any>[];
|
|
13
12
|
lexical?: LexicalEditorConfig;
|
|
14
13
|
};
|
|
15
14
|
export type LexicalRichTextAdapter = RichTextAdapter<SerializedEditorState, AdapterProps, any> & {
|
|
16
15
|
editorConfig: SanitizedServerEditorConfig;
|
|
17
16
|
};
|
|
17
|
+
export type LexicalRichTextAdapterProvider =
|
|
18
|
+
/**
|
|
19
|
+
* This is being called during the payload sanitization process
|
|
20
|
+
*/
|
|
21
|
+
({ config }: {
|
|
22
|
+
config: SanitizedConfig;
|
|
23
|
+
}) => Promise<LexicalRichTextAdapter>;
|
|
18
24
|
export type FieldProps = RichTextFieldProps<SerializedEditorState, AdapterProps, AdapterProps> & {
|
|
19
25
|
fieldTypes: FieldTypes;
|
|
20
26
|
indexPath: string;
|
package/dist/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,IAAI,mBAAmB,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAA;AACzF,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAA;AACpD,OAAO,KAAK,EAAE,UAAU,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAA;AACjE,OAAO,KAAK,EAAE,eAAe,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAA;AACxE,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAE9B,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAA;AACtE,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,iCAAiC,CAAA;AAElF,MAAM,MAAM,kBAAkB,GAAG;IAC/B,QAAQ,CAAC,EACL,CAAC,CAAC,EACA,eAAe,GAChB,EAAE;QACD,eAAe,EAAE,qBAAqB,CAAC,GAAG,EAAE,GAAG,CAAC,EAAE,CAAA;KACnD,KAAK,qBAAqB,CAAC,GAAG,EAAE,GAAG,CAAC,EAAE,CAAC,GACxC,qBAAqB,CAAC,GAAG,EAAE,GAAG,CAAC,EAAE,CAAA;IACrC,OAAO,CAAC,EAAE,mBAAmB,CAAA;CAC9B,CAAA;AAED,MAAM,MAAM,sBAAsB,GAAG,eAAe,CAAC,qBAAqB,EAAE,YAAY,EAAE,GAAG,CAAC,GAAG;IAC/F,YAAY,EAAE,2BAA2B,CAAA;CAC1C,CAAA;AAED,MAAM,MAAM,8BAA8B;AACxC;;GAEG;AACH,CAAC,EAAE,MAAM,EAAE,EAAE;IAAE,MAAM,EAAE,eAAe,CAAA;CAAE,KAAK,OAAO,CAAC,sBAAsB,CAAC,CAAA;AAE9E,MAAM,MAAM,UAAU,GAAG,kBAAkB,CAAC,qBAAqB,EAAE,YAAY,EAAE,YAAY,CAAC,GAAG;IAC/F,UAAU,EAAE,UAAU,CAAA;IACtB,SAAS,EAAE,MAAM,CAAA;IACjB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,WAAW,EAAE,gBAAgB,CAAA;CAC9B,CAAA;AAED,MAAM,MAAM,YAAY,GAAG;IACzB,YAAY,EAAE,2BAA2B,CAAA;CAC1C,CAAA;AAED,MAAM,MAAM,iCAAiC,GAAG;IAC9C,eAAe,EAAE,KAAK,CAAC,SAAS,CAAA;IAChC,GAAG,EAAE,MAAM,CAAA;IACX,KAAK,EAAE,MAAM,CAAA;CACd,CAAA"}
|
package/dist/types.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/types.ts"],"sourcesContent":["import type {
|
|
1
|
+
{"version":3,"sources":["../src/types.ts"],"sourcesContent":["import type { EditorConfig as LexicalEditorConfig, SerializedEditorState } from 'lexical'\nimport type { FieldPermissions } from 'payload/auth'\nimport type { FieldTypes, SanitizedConfig } from 'payload/config'\nimport type { RichTextAdapter, RichTextFieldProps } from 'payload/types'\nimport type React from 'react'\n\nimport type { FeatureProviderServer } from './field/features/types.js'\nimport type { SanitizedServerEditorConfig } from './field/lexical/config/types.js'\n\nexport type LexicalEditorProps = {\n features?:\n | (({\n defaultFeatures,\n }: {\n defaultFeatures: FeatureProviderServer<any, any>[]\n }) => FeatureProviderServer<any, any>[])\n | FeatureProviderServer<any, any>[]\n lexical?: LexicalEditorConfig\n}\n\nexport type LexicalRichTextAdapter = RichTextAdapter<SerializedEditorState, AdapterProps, any> & {\n editorConfig: SanitizedServerEditorConfig\n}\n\nexport type LexicalRichTextAdapterProvider =\n /**\n * This is being called during the payload sanitization process\n */\n ({ config }: { config: SanitizedConfig }) => Promise<LexicalRichTextAdapter>\n\nexport type FieldProps = RichTextFieldProps<SerializedEditorState, AdapterProps, AdapterProps> & {\n fieldTypes: FieldTypes\n indexPath: string\n path?: string\n permissions: FieldPermissions\n}\n\nexport type AdapterProps = {\n editorConfig: SanitizedServerEditorConfig\n}\n\nexport type GeneratedFeatureProviderComponent = {\n ClientComponent: React.ReactNode\n key: string\n order: number\n}\n"],"names":[],"rangeMappings":"","mappings":"AAyCA,WAIC"}
|
package/dist/validate/index.d.ts
CHANGED
|
@@ -3,5 +3,5 @@ import type { RichTextField, Validate } from 'payload/types';
|
|
|
3
3
|
import type { SanitizedServerEditorConfig } from '../field/lexical/config/types.js';
|
|
4
4
|
export declare const richTextValidateHOC: ({ editorConfig, }: {
|
|
5
5
|
editorConfig: SanitizedServerEditorConfig;
|
|
6
|
-
}) => Validate<SerializedEditorState<import("lexical
|
|
6
|
+
}) => Validate<SerializedEditorState<import("lexical").SerializedLexicalNode>, unknown, unknown, RichTextField>;
|
|
7
7
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/validate/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAA;AACpD,OAAO,KAAK,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AAE5D,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,kCAAkC,CAAA;AAKnF,eAAO,MAAM,mBAAmB,sBAE7B;IACD,YAAY,EAAE,2BAA2B,CAAA;CAC1C,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/validate/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAA;AACpD,OAAO,KAAK,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AAE5D,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,kCAAkC,CAAA;AAKnF,eAAO,MAAM,mBAAmB,sBAE7B;IACD,YAAY,EAAE,2BAA2B,CAAA;CAC1C,8GAyCA,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,39 +1,55 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@payloadcms/richtext-lexical",
|
|
3
|
-
"version": "3.0.0-beta.
|
|
3
|
+
"version": "3.0.0-beta.21",
|
|
4
4
|
"description": "The officially supported Lexical richtext adapter for Payload",
|
|
5
|
+
"homepage": "https://payloadcms.com",
|
|
5
6
|
"repository": {
|
|
6
7
|
"type": "git",
|
|
7
8
|
"url": "https://github.com/payloadcms/payload.git",
|
|
8
9
|
"directory": "packages/richtext-lexical"
|
|
9
10
|
},
|
|
10
11
|
"license": "MIT",
|
|
11
|
-
"homepage": "https://payloadcms.com",
|
|
12
12
|
"author": "Payload CMS, Inc.",
|
|
13
|
+
"type": "module",
|
|
14
|
+
"exports": {
|
|
15
|
+
".": {
|
|
16
|
+
"import": "./dist/index.js",
|
|
17
|
+
"require": "./dist/index.js",
|
|
18
|
+
"types": "./dist/index.d.ts"
|
|
19
|
+
},
|
|
20
|
+
"./*": {
|
|
21
|
+
"import": "./dist/exports/*.js",
|
|
22
|
+
"require": "./dist/exports/*.js",
|
|
23
|
+
"types": "./dist/exports/*.d.ts"
|
|
24
|
+
}
|
|
25
|
+
},
|
|
13
26
|
"main": "./dist/index.js",
|
|
14
27
|
"types": "./dist/index.d.ts",
|
|
15
|
-
"
|
|
28
|
+
"files": [
|
|
29
|
+
"dist",
|
|
30
|
+
"components.js",
|
|
31
|
+
"components.d.ts"
|
|
32
|
+
],
|
|
16
33
|
"dependencies": {
|
|
17
34
|
"@faceless-ui/modal": "2.0.2",
|
|
18
|
-
"@lexical/headless": "0.
|
|
19
|
-
"@lexical/link": "0.
|
|
20
|
-
"@lexical/list": "0.
|
|
21
|
-
"@lexical/mark": "0.
|
|
22
|
-
"@lexical/markdown": "0.
|
|
23
|
-
"@lexical/react": "0.
|
|
24
|
-
"@lexical/rich-text": "0.
|
|
25
|
-
"@lexical/selection": "0.
|
|
26
|
-
"@lexical/utils": "0.
|
|
35
|
+
"@lexical/headless": "0.14.5",
|
|
36
|
+
"@lexical/link": "0.14.5",
|
|
37
|
+
"@lexical/list": "0.14.5",
|
|
38
|
+
"@lexical/mark": "0.14.5",
|
|
39
|
+
"@lexical/markdown": "0.14.5",
|
|
40
|
+
"@lexical/react": "0.14.5",
|
|
41
|
+
"@lexical/rich-text": "0.14.5",
|
|
42
|
+
"@lexical/selection": "0.14.5",
|
|
43
|
+
"@lexical/utils": "0.14.5",
|
|
44
|
+
"@types/uuid": "^9.0.8",
|
|
27
45
|
"bson-objectid": "2.0.4",
|
|
28
46
|
"classnames": "^2.3.2",
|
|
29
47
|
"deep-equal": "2.2.3",
|
|
30
48
|
"json-schema": "^0.4.0",
|
|
31
|
-
"lexical": "0.
|
|
49
|
+
"lexical": "0.14.5",
|
|
32
50
|
"lodash": "4.17.21",
|
|
33
|
-
"react": "
|
|
34
|
-
"
|
|
35
|
-
"react-error-boundary": "4.0.12",
|
|
36
|
-
"ts-essentials": "7.0.3"
|
|
51
|
+
"react-error-boundary": "4.0.13",
|
|
52
|
+
"uuid": "^9.0.1"
|
|
37
53
|
},
|
|
38
54
|
"devDependencies": {
|
|
39
55
|
"@types/json-schema": "7.0.15",
|
|
@@ -41,45 +57,30 @@
|
|
|
41
57
|
"@types/react": "18.2.74",
|
|
42
58
|
"@types/react-dom": "18.2.24",
|
|
43
59
|
"@payloadcms/eslint-config": "1.1.1",
|
|
44
|
-
"@payloadcms/
|
|
45
|
-
"@payloadcms/ui": "3.0.0-beta.
|
|
46
|
-
"@payloadcms/
|
|
47
|
-
"payload": "3.0.0-beta.
|
|
60
|
+
"@payloadcms/next": "3.0.0-beta.21",
|
|
61
|
+
"@payloadcms/ui": "3.0.0-beta.21",
|
|
62
|
+
"@payloadcms/translations": "3.0.0-beta.21",
|
|
63
|
+
"payload": "3.0.0-beta.21"
|
|
48
64
|
},
|
|
49
65
|
"peerDependencies": {
|
|
50
|
-
"
|
|
51
|
-
"
|
|
52
|
-
"@payloadcms/next": "3.0.0-beta.
|
|
53
|
-
"
|
|
66
|
+
"react": "^16.8.0 || ^17.0.0 || ^18.0.0",
|
|
67
|
+
"react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0",
|
|
68
|
+
"@payloadcms/next": "3.0.0-beta.21",
|
|
69
|
+
"@payloadcms/translations": "3.0.0-beta.21",
|
|
70
|
+
"@payloadcms/ui": "3.0.0-beta.21",
|
|
71
|
+
"payload": "3.0.0-beta.21"
|
|
54
72
|
},
|
|
55
|
-
"
|
|
56
|
-
"
|
|
57
|
-
"import": "./dist/index.js",
|
|
58
|
-
"require": "./dist/index.js",
|
|
59
|
-
"types": "./dist/index.d.ts"
|
|
60
|
-
},
|
|
61
|
-
"./*": {
|
|
62
|
-
"import": "./src/exports/*.ts",
|
|
63
|
-
"require": "./src/exports/*.ts",
|
|
64
|
-
"types": "./src/exports/*.ts"
|
|
65
|
-
}
|
|
73
|
+
"engines": {
|
|
74
|
+
"node": ">=18.20.2"
|
|
66
75
|
},
|
|
67
76
|
"publishConfig": {
|
|
68
77
|
"registry": "https://registry.npmjs.org/"
|
|
69
78
|
},
|
|
70
|
-
"engines": {
|
|
71
|
-
"node": ">=18.17.0"
|
|
72
|
-
},
|
|
73
|
-
"files": [
|
|
74
|
-
"dist",
|
|
75
|
-
"components.js",
|
|
76
|
-
"components.d.ts"
|
|
77
|
-
],
|
|
78
79
|
"scripts": {
|
|
79
|
-
"build": "pnpm copyfiles && pnpm build:swc && pnpm build:types
|
|
80
|
+
"build": "pnpm copyfiles && pnpm build:swc && pnpm build:types",
|
|
81
|
+
"build:clean": "find . \\( -type d \\( -name build -o -name dist -o -name .cache \\) -o -type f -name tsconfig.tsbuildinfo \\) -exec rm -rf {} + && pnpm build",
|
|
80
82
|
"build:swc": "swc ./src -d ./dist --config-file .swcrc",
|
|
81
83
|
"build:types": "tsc --emitDeclarationOnly --outDir dist",
|
|
82
|
-
"build:clean": "find . \\( -type d \\( -name build -o -name dist -o -name .cache \\) -o -type f -name tsconfig.tsbuildinfo \\) -exec rm -rf {} + && pnpm build",
|
|
83
84
|
"clean": "rimraf {dist,*.tsbuildinfo}",
|
|
84
85
|
"copyfiles": "copyfiles -u 1 \"src/**/*.{html,css,scss,ttf,woff,woff2,eot,svg,jpg,png,json}\" dist/"
|
|
85
86
|
}
|
package/components.d.ts
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
export { RichTextCell } from './dist/cell/index.js';
|
|
2
|
-
export { RichTextField } from './dist/field/index.js';
|
|
3
|
-
export { defaultEditorLexicalConfig } from './dist/field/lexical/config/client/default.js';
|
|
4
|
-
export { ToolbarButton } from './dist/field/lexical/plugins/FloatingSelectToolbar/ToolbarButton/index.js';
|
|
5
|
-
export { ToolbarDropdown } from './dist/field/lexical/plugins/FloatingSelectToolbar/ToolbarDropdown/index.js';
|
|
6
|
-
//# sourceMappingURL=components.d.ts.map
|
package/components.js
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
export { RichTextCell } from './dist/cell/index.js';
|
|
2
|
-
export { RichTextField } from './dist/field/index.js';
|
|
3
|
-
export { defaultEditorLexicalConfig } from './dist/field/lexical/config/client/default.js';
|
|
4
|
-
export { ToolbarButton } from './dist/field/lexical/plugins/FloatingSelectToolbar/ToolbarButton/index.js';
|
|
5
|
-
export { ToolbarDropdown } from './dist/field/lexical/plugins/FloatingSelectToolbar/ToolbarDropdown/index.js';
|
|
6
|
-
|
|
7
|
-
//# sourceMappingURL=components.js.map
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import type { SerializedEditorState, SerializedLexicalNode } from 'lexical';
|
|
2
|
-
import type { PayloadRequest, RichTextAdapter, RichTextField } from 'payload/types';
|
|
3
|
-
import type { PopulationPromise } from '../field/features/types.js';
|
|
4
|
-
import type { AdapterProps } from '../types.js';
|
|
5
|
-
export type Args = Parameters<RichTextAdapter<SerializedEditorState, AdapterProps>['populationPromise']>[0] & {
|
|
6
|
-
editorPopulationPromises: Map<string, Array<PopulationPromise>>;
|
|
7
|
-
};
|
|
8
|
-
type RecurseRichTextArgs = {
|
|
9
|
-
children: SerializedLexicalNode[];
|
|
10
|
-
currentDepth: number;
|
|
11
|
-
depth: number;
|
|
12
|
-
editorPopulationPromises: Map<string, Array<PopulationPromise>>;
|
|
13
|
-
field: RichTextField<SerializedEditorState, AdapterProps>;
|
|
14
|
-
overrideAccess: boolean;
|
|
15
|
-
promises: Promise<void>[];
|
|
16
|
-
req: PayloadRequest;
|
|
17
|
-
showHiddenFields: boolean;
|
|
18
|
-
siblingDoc?: Record<string, unknown>;
|
|
19
|
-
};
|
|
20
|
-
export declare const recurseRichText: ({ children, context, currentDepth, depth, editorPopulationPromises, field, findMany, flattenLocales, overrideAccess, populationPromises, promises, req, showHiddenFields, siblingDoc, }: RecurseRichTextArgs & Args) => void;
|
|
21
|
-
export declare const richTextRelationshipPromise: ({ context, currentDepth, depth, editorPopulationPromises, field, findMany, flattenLocales, overrideAccess, populationPromises, req, showHiddenFields, siblingDoc, }: Args) => Promise<void>;
|
|
22
|
-
export {};
|
|
23
|
-
//# sourceMappingURL=richTextRelationshipPromise.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"richTextRelationshipPromise.d.ts","sourceRoot":"","sources":["../../src/populate/richTextRelationshipPromise.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAA;AAC3E,OAAO,KAAK,EAAE,cAAc,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,eAAe,CAAA;AAEnF,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAA;AACnE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AAE/C,MAAM,MAAM,IAAI,GAAG,UAAU,CAC3B,eAAe,CAAC,qBAAqB,EAAE,YAAY,CAAC,CAAC,mBAAmB,CAAC,CAC1E,CAAC,CAAC,CAAC,GAAG;IACL,wBAAwB,EAAE,GAAG,CAAC,MAAM,EAAE,KAAK,CAAC,iBAAiB,CAAC,CAAC,CAAA;CAChE,CAAA;AAED,KAAK,mBAAmB,GAAG;IACzB,QAAQ,EAAE,qBAAqB,EAAE,CAAA;IACjC,YAAY,EAAE,MAAM,CAAA;IACpB,KAAK,EAAE,MAAM,CAAA;IACb,wBAAwB,EAAE,GAAG,CAAC,MAAM,EAAE,KAAK,CAAC,iBAAiB,CAAC,CAAC,CAAA;IAC/D,KAAK,EAAE,aAAa,CAAC,qBAAqB,EAAE,YAAY,CAAC,CAAA;IACzD,cAAc,EAAE,OAAO,CAAA;IACvB,QAAQ,EAAE,OAAO,CAAC,IAAI,CAAC,EAAE,CAAA;IACzB,GAAG,EAAE,cAAc,CAAA;IACnB,gBAAgB,EAAE,OAAO,CAAA;IACzB,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;CACrC,CAAA;AAED,eAAO,MAAM,eAAe,4LAezB,mBAAmB,GAAG,IAAI,KAAG,IAiD/B,CAAA;AAED,eAAO,MAAM,2BAA2B,wKAarC,IAAI,KAAG,QAAQ,IAAI,CAqBrB,CAAA"}
|
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
export const recurseRichText = ({ children, context, currentDepth = 0, depth, editorPopulationPromises, field, findMany, flattenLocales, overrideAccess = false, populationPromises, promises, req, showHiddenFields, siblingDoc })=>{
|
|
2
|
-
if (depth <= 0 || currentDepth > depth) {
|
|
3
|
-
return;
|
|
4
|
-
}
|
|
5
|
-
if (Array.isArray(children)) {
|
|
6
|
-
children.forEach((node)=>{
|
|
7
|
-
if (editorPopulationPromises?.has(node.type)) {
|
|
8
|
-
for (const promise of editorPopulationPromises.get(node.type)){
|
|
9
|
-
promises.push(...promise({
|
|
10
|
-
context,
|
|
11
|
-
currentDepth,
|
|
12
|
-
depth,
|
|
13
|
-
editorPopulationPromises,
|
|
14
|
-
field,
|
|
15
|
-
findMany,
|
|
16
|
-
flattenLocales,
|
|
17
|
-
node,
|
|
18
|
-
overrideAccess,
|
|
19
|
-
populationPromises,
|
|
20
|
-
req,
|
|
21
|
-
showHiddenFields,
|
|
22
|
-
siblingDoc
|
|
23
|
-
}));
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
if ('children' in node && Array.isArray(node?.children) && node?.children?.length) {
|
|
27
|
-
recurseRichText({
|
|
28
|
-
children: node.children,
|
|
29
|
-
context,
|
|
30
|
-
currentDepth,
|
|
31
|
-
depth,
|
|
32
|
-
editorPopulationPromises,
|
|
33
|
-
field,
|
|
34
|
-
findMany,
|
|
35
|
-
flattenLocales,
|
|
36
|
-
overrideAccess,
|
|
37
|
-
populationPromises,
|
|
38
|
-
promises,
|
|
39
|
-
req,
|
|
40
|
-
showHiddenFields,
|
|
41
|
-
siblingDoc
|
|
42
|
-
});
|
|
43
|
-
}
|
|
44
|
-
});
|
|
45
|
-
}
|
|
46
|
-
};
|
|
47
|
-
export const richTextRelationshipPromise = async ({ context, currentDepth, depth, editorPopulationPromises, field, findMany, flattenLocales, overrideAccess, populationPromises, req, showHiddenFields, siblingDoc })=>{
|
|
48
|
-
const promises = [];
|
|
49
|
-
recurseRichText({
|
|
50
|
-
children: siblingDoc[field?.name]?.root?.children ?? [],
|
|
51
|
-
context,
|
|
52
|
-
currentDepth,
|
|
53
|
-
depth,
|
|
54
|
-
editorPopulationPromises,
|
|
55
|
-
field,
|
|
56
|
-
findMany,
|
|
57
|
-
flattenLocales,
|
|
58
|
-
overrideAccess,
|
|
59
|
-
populationPromises,
|
|
60
|
-
promises,
|
|
61
|
-
req,
|
|
62
|
-
showHiddenFields,
|
|
63
|
-
siblingDoc
|
|
64
|
-
});
|
|
65
|
-
await Promise.all(promises);
|
|
66
|
-
};
|
|
67
|
-
|
|
68
|
-
//# sourceMappingURL=richTextRelationshipPromise.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/populate/richTextRelationshipPromise.ts"],"sourcesContent":["import type { SerializedEditorState, SerializedLexicalNode } from 'lexical'\nimport type { PayloadRequest, RichTextAdapter, RichTextField } from 'payload/types'\n\nimport type { PopulationPromise } from '../field/features/types.js'\nimport type { AdapterProps } from '../types.js'\n\nexport type Args = Parameters<\n RichTextAdapter<SerializedEditorState, AdapterProps>['populationPromise']\n>[0] & {\n editorPopulationPromises: Map<string, Array<PopulationPromise>>\n}\n\ntype RecurseRichTextArgs = {\n children: SerializedLexicalNode[]\n currentDepth: number\n depth: number\n editorPopulationPromises: Map<string, Array<PopulationPromise>>\n field: RichTextField<SerializedEditorState, AdapterProps>\n overrideAccess: boolean\n promises: Promise<void>[]\n req: PayloadRequest\n showHiddenFields: boolean\n siblingDoc?: Record<string, unknown>\n}\n\nexport const recurseRichText = ({\n children,\n context,\n currentDepth = 0,\n depth,\n editorPopulationPromises,\n field,\n findMany,\n flattenLocales,\n overrideAccess = false,\n populationPromises,\n promises,\n req,\n showHiddenFields,\n siblingDoc,\n}: RecurseRichTextArgs & Args): void => {\n if (depth <= 0 || currentDepth > depth) {\n return\n }\n\n if (Array.isArray(children)) {\n children.forEach((node) => {\n if (editorPopulationPromises?.has(node.type)) {\n for (const promise of editorPopulationPromises.get(node.type)) {\n promises.push(\n ...promise({\n context,\n currentDepth,\n depth,\n editorPopulationPromises,\n field,\n findMany,\n flattenLocales,\n node,\n overrideAccess,\n populationPromises,\n req,\n showHiddenFields,\n siblingDoc,\n }),\n )\n }\n }\n\n if ('children' in node && Array.isArray(node?.children) && node?.children?.length) {\n recurseRichText({\n children: node.children as SerializedLexicalNode[],\n context,\n currentDepth,\n depth,\n editorPopulationPromises,\n field,\n findMany,\n flattenLocales,\n overrideAccess,\n populationPromises,\n promises,\n req,\n showHiddenFields,\n siblingDoc,\n })\n }\n })\n }\n}\n\nexport const richTextRelationshipPromise = async ({\n context,\n currentDepth,\n depth,\n editorPopulationPromises,\n field,\n findMany,\n flattenLocales,\n overrideAccess,\n populationPromises,\n req,\n showHiddenFields,\n siblingDoc,\n}: Args): Promise<void> => {\n const promises = []\n\n recurseRichText({\n children: (siblingDoc[field?.name] as SerializedEditorState)?.root?.children ?? [],\n context,\n currentDepth,\n depth,\n editorPopulationPromises,\n field,\n findMany,\n flattenLocales,\n overrideAccess,\n populationPromises,\n promises,\n req,\n showHiddenFields,\n siblingDoc,\n })\n\n await Promise.all(promises)\n}\n"],"names":["recurseRichText","children","context","currentDepth","depth","editorPopulationPromises","field","findMany","flattenLocales","overrideAccess","populationPromises","promises","req","showHiddenFields","siblingDoc","Array","isArray","forEach","node","has","type","promise","get","push","length","richTextRelationshipPromise","name","root","Promise","all"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAyBA,OAAO,MAAMA,kBAAkB,CAAC,EAC9BC,QAAQ,EACRC,OAAO,EACPC,eAAe,CAAC,EAChBC,KAAK,EACLC,wBAAwB,EACxBC,KAAK,EACLC,QAAQ,EACRC,cAAc,EACdC,iBAAiB,KAAK,EACtBC,kBAAkB,EAClBC,QAAQ,EACRC,GAAG,EACHC,gBAAgB,EAChBC,UAAU,EACiB;IAC3B,IAAIV,SAAS,KAAKD,eAAeC,OAAO;QACtC;IACF;IAEA,IAAIW,MAAMC,OAAO,CAACf,WAAW;QAC3BA,SAASgB,OAAO,CAAC,CAACC;YAChB,IAAIb,0BAA0Bc,IAAID,KAAKE,IAAI,GAAG;gBAC5C,KAAK,MAAMC,WAAWhB,yBAAyBiB,GAAG,CAACJ,KAAKE,IAAI,EAAG;oBAC7DT,SAASY,IAAI,IACRF,QAAQ;wBACTnB;wBACAC;wBACAC;wBACAC;wBACAC;wBACAC;wBACAC;wBACAU;wBACAT;wBACAC;wBACAE;wBACAC;wBACAC;oBACF;gBAEJ;YACF;YAEA,IAAI,cAAcI,QAAQH,MAAMC,OAAO,CAACE,MAAMjB,aAAaiB,MAAMjB,UAAUuB,QAAQ;gBACjFxB,gBAAgB;oBACdC,UAAUiB,KAAKjB,QAAQ;oBACvBC;oBACAC;oBACAC;oBACAC;oBACAC;oBACAC;oBACAC;oBACAC;oBACAC;oBACAC;oBACAC;oBACAC;oBACAC;gBACF;YACF;QACF;IACF;AACF,EAAC;AAED,OAAO,MAAMW,8BAA8B,OAAO,EAChDvB,OAAO,EACPC,YAAY,EACZC,KAAK,EACLC,wBAAwB,EACxBC,KAAK,EACLC,QAAQ,EACRC,cAAc,EACdC,cAAc,EACdC,kBAAkB,EAClBE,GAAG,EACHC,gBAAgB,EAChBC,UAAU,EACL;IACL,MAAMH,WAAW,EAAE;IAEnBX,gBAAgB;QACdC,UAAU,AAACa,UAAU,CAACR,OAAOoB,KAAK,EAA4BC,MAAM1B,YAAY,EAAE;QAClFC;QACAC;QACAC;QACAC;QACAC;QACAC;QACAC;QACAC;QACAC;QACAC;QACAC;QACAC;QACAC;IACF;IAEA,MAAMc,QAAQC,GAAG,CAAClB;AACpB,EAAC"}
|