@payloadcms/richtext-lexical 3.84.1 → 4.0.0-internal.d28e9fb
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/exports/client/{Field-4UEGQMIN.js → Field-NXLXFFLW.js} +2 -2
- package/dist/exports/client/Field-NXLXFFLW.js.map +7 -0
- package/dist/exports/client/bundled.css +1 -1
- package/dist/exports/client/chunk-DZDHVMML.js +2 -0
- package/dist/exports/client/chunk-DZDHVMML.js.map +7 -0
- package/dist/exports/client/componentInline-LCHKRXOV.js +2 -0
- package/dist/exports/client/index.d.ts +0 -2
- package/dist/exports/client/index.d.ts.map +1 -1
- package/dist/exports/client/index.js +32 -32
- package/dist/exports/client/index.js.map +4 -4
- package/dist/features/blocks/client/component/index.d.ts.map +1 -1
- package/dist/features/blocks/client/component/index.js +17 -2
- package/dist/features/blocks/client/component/index.js.map +1 -1
- package/dist/features/blocks/client/componentInline/index.d.ts.map +1 -1
- package/dist/features/blocks/client/componentInline/index.js +13 -3
- package/dist/features/blocks/client/componentInline/index.js.map +1 -1
- package/dist/field/Field.d.ts.map +1 -1
- package/dist/field/Field.js +1 -1
- package/dist/field/Field.js.map +1 -1
- package/dist/field/bundled.css +1 -1
- package/dist/index.d.ts +0 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +11 -2
- package/dist/index.js.map +1 -1
- package/dist/lexical/config/server/loader.d.ts.map +1 -1
- package/dist/lexical/config/server/loader.js +12 -9
- package/dist/lexical/config/server/loader.js.map +1 -1
- package/dist/lexical/ui/icons/Add/index.d.ts +4 -1
- package/dist/lexical/ui/icons/Add/index.d.ts.map +1 -1
- package/dist/lexical/ui/icons/Add/index.js +19 -12
- package/dist/lexical/ui/icons/Add/index.js.map +1 -1
- package/dist/lexical/ui/icons/Add/index.svg +2 -3
- package/dist/lexical/ui/icons/Add/light.svg +2 -3
- package/dist/lexical/ui/icons/AlignCenter/index.d.ts +3 -1
- package/dist/lexical/ui/icons/AlignCenter/index.d.ts.map +1 -1
- package/dist/lexical/ui/icons/AlignCenter/index.js +15 -19
- package/dist/lexical/ui/icons/AlignCenter/index.js.map +1 -1
- package/dist/lexical/ui/icons/AlignJustify/index.d.ts +3 -1
- package/dist/lexical/ui/icons/AlignJustify/index.d.ts.map +1 -1
- package/dist/lexical/ui/icons/AlignJustify/index.js +15 -19
- package/dist/lexical/ui/icons/AlignJustify/index.js.map +1 -1
- package/dist/lexical/ui/icons/AlignLeft/index.d.ts +3 -1
- package/dist/lexical/ui/icons/AlignLeft/index.d.ts.map +1 -1
- package/dist/lexical/ui/icons/AlignLeft/index.js +15 -19
- package/dist/lexical/ui/icons/AlignLeft/index.js.map +1 -1
- package/dist/lexical/ui/icons/AlignRight/index.d.ts +3 -1
- package/dist/lexical/ui/icons/AlignRight/index.d.ts.map +1 -1
- package/dist/lexical/ui/icons/AlignRight/index.js +15 -19
- package/dist/lexical/ui/icons/AlignRight/index.js.map +1 -1
- package/dist/lexical/ui/icons/Block/index.d.ts +3 -1
- package/dist/lexical/ui/icons/Block/index.d.ts.map +1 -1
- package/dist/lexical/ui/icons/Block/index.js +13 -28
- package/dist/lexical/ui/icons/Block/index.js.map +1 -1
- package/dist/lexical/ui/icons/Blockquote/index.d.ts +3 -1
- package/dist/lexical/ui/icons/Blockquote/index.d.ts.map +1 -1
- package/dist/lexical/ui/icons/Blockquote/index.js +9 -6
- package/dist/lexical/ui/icons/Blockquote/index.js.map +1 -1
- package/dist/lexical/ui/icons/Bold/index.d.ts +3 -1
- package/dist/lexical/ui/icons/Bold/index.d.ts.map +1 -1
- package/dist/lexical/ui/icons/Bold/index.js +13 -8
- package/dist/lexical/ui/icons/Bold/index.js.map +1 -1
- package/dist/lexical/ui/icons/Checklist/index.d.ts +4 -1
- package/dist/lexical/ui/icons/Checklist/index.d.ts.map +1 -1
- package/dist/lexical/ui/icons/Checklist/index.js +17 -18
- package/dist/lexical/ui/icons/Checklist/index.js.map +1 -1
- package/dist/lexical/ui/icons/Code/index.d.ts +3 -1
- package/dist/lexical/ui/icons/Code/index.d.ts.map +1 -1
- package/dist/lexical/ui/icons/Code/index.js +15 -13
- package/dist/lexical/ui/icons/Code/index.js.map +1 -1
- package/dist/lexical/ui/icons/CodeBlock/index.d.ts +4 -1
- package/dist/lexical/ui/icons/CodeBlock/index.d.ts.map +1 -1
- package/dist/lexical/ui/icons/CodeBlock/index.js +18 -7
- package/dist/lexical/ui/icons/CodeBlock/index.js.map +1 -1
- package/dist/lexical/ui/icons/Collapse/index.d.ts +3 -1
- package/dist/lexical/ui/icons/Collapse/index.d.ts.map +1 -1
- package/dist/lexical/ui/icons/Collapse/index.js +10 -8
- package/dist/lexical/ui/icons/Collapse/index.js.map +1 -1
- package/dist/lexical/ui/icons/DraggableBlock/index.svg +7 -7
- package/dist/lexical/ui/icons/DraggableBlock/light.svg +7 -7
- package/dist/lexical/ui/icons/Expand/index.d.ts +5 -0
- package/dist/lexical/ui/icons/Expand/index.d.ts.map +1 -0
- package/dist/lexical/ui/icons/Expand/index.js +22 -0
- package/dist/lexical/ui/icons/Expand/index.js.map +1 -0
- package/dist/lexical/ui/icons/H1/index.d.ts +3 -1
- package/dist/lexical/ui/icons/H1/index.d.ts.map +1 -1
- package/dist/lexical/ui/icons/H1/index.js +9 -6
- package/dist/lexical/ui/icons/H1/index.js.map +1 -1
- package/dist/lexical/ui/icons/H2/index.d.ts +3 -1
- package/dist/lexical/ui/icons/H2/index.d.ts.map +1 -1
- package/dist/lexical/ui/icons/H2/index.js +9 -6
- package/dist/lexical/ui/icons/H2/index.js.map +1 -1
- package/dist/lexical/ui/icons/H3/index.d.ts +3 -1
- package/dist/lexical/ui/icons/H3/index.d.ts.map +1 -1
- package/dist/lexical/ui/icons/H3/index.js +9 -6
- package/dist/lexical/ui/icons/H3/index.js.map +1 -1
- package/dist/lexical/ui/icons/H4/index.d.ts +3 -1
- package/dist/lexical/ui/icons/H4/index.d.ts.map +1 -1
- package/dist/lexical/ui/icons/H4/index.js +9 -6
- package/dist/lexical/ui/icons/H4/index.js.map +1 -1
- package/dist/lexical/ui/icons/H5/index.d.ts +3 -1
- package/dist/lexical/ui/icons/H5/index.d.ts.map +1 -1
- package/dist/lexical/ui/icons/H5/index.js +9 -6
- package/dist/lexical/ui/icons/H5/index.js.map +1 -1
- package/dist/lexical/ui/icons/H6/index.d.ts +3 -1
- package/dist/lexical/ui/icons/H6/index.d.ts.map +1 -1
- package/dist/lexical/ui/icons/H6/index.js +9 -6
- package/dist/lexical/ui/icons/H6/index.js.map +1 -1
- package/dist/lexical/ui/icons/HorizontalRule/index.d.ts +3 -1
- package/dist/lexical/ui/icons/HorizontalRule/index.d.ts.map +1 -1
- package/dist/lexical/ui/icons/HorizontalRule/index.js +11 -11
- package/dist/lexical/ui/icons/HorizontalRule/index.js.map +1 -1
- package/dist/lexical/ui/icons/IndentDecrease/index.d.ts +3 -1
- package/dist/lexical/ui/icons/IndentDecrease/index.d.ts.map +1 -1
- package/dist/lexical/ui/icons/IndentDecrease/index.js +18 -22
- package/dist/lexical/ui/icons/IndentDecrease/index.js.map +1 -1
- package/dist/lexical/ui/icons/IndentIncrease/index.d.ts +3 -1
- package/dist/lexical/ui/icons/IndentIncrease/index.d.ts.map +1 -1
- package/dist/lexical/ui/icons/IndentIncrease/index.js +15 -22
- package/dist/lexical/ui/icons/IndentIncrease/index.js.map +1 -1
- package/dist/lexical/ui/icons/InlineBlocks/index.d.ts +3 -1
- package/dist/lexical/ui/icons/InlineBlocks/index.d.ts.map +1 -1
- package/dist/lexical/ui/icons/InlineBlocks/index.js +9 -6
- package/dist/lexical/ui/icons/InlineBlocks/index.js.map +1 -1
- package/dist/lexical/ui/icons/Italic/index.d.ts +3 -1
- package/dist/lexical/ui/icons/Italic/index.d.ts.map +1 -1
- package/dist/lexical/ui/icons/Italic/index.js +13 -8
- package/dist/lexical/ui/icons/Italic/index.js.map +1 -1
- package/dist/lexical/ui/icons/Link/index.d.ts +4 -1
- package/dist/lexical/ui/icons/Link/index.d.ts.map +1 -1
- package/dist/lexical/ui/icons/Link/index.js +14 -9
- package/dist/lexical/ui/icons/Link/index.js.map +1 -1
- package/dist/lexical/ui/icons/Meatballs/index.d.ts +4 -1
- package/dist/lexical/ui/icons/Meatballs/index.d.ts.map +1 -1
- package/dist/lexical/ui/icons/Meatballs/index.js +19 -15
- package/dist/lexical/ui/icons/Meatballs/index.js.map +1 -1
- package/dist/lexical/ui/icons/OrderedList/index.d.ts +4 -1
- package/dist/lexical/ui/icons/OrderedList/index.d.ts.map +1 -1
- package/dist/lexical/ui/icons/OrderedList/index.js +19 -25
- package/dist/lexical/ui/icons/OrderedList/index.js.map +1 -1
- package/dist/lexical/ui/icons/Relationship/index.d.ts +3 -1
- package/dist/lexical/ui/icons/Relationship/index.d.ts.map +1 -1
- package/dist/lexical/ui/icons/Relationship/index.js +13 -25
- package/dist/lexical/ui/icons/Relationship/index.js.map +1 -1
- package/dist/lexical/ui/icons/Strikethrough/index.d.ts +3 -1
- package/dist/lexical/ui/icons/Strikethrough/index.d.ts.map +1 -1
- package/dist/lexical/ui/icons/Strikethrough/index.js +13 -13
- package/dist/lexical/ui/icons/Strikethrough/index.js.map +1 -1
- package/dist/lexical/ui/icons/Subscript/index.d.ts +3 -1
- package/dist/lexical/ui/icons/Subscript/index.d.ts.map +1 -1
- package/dist/lexical/ui/icons/Subscript/index.js +10 -7
- package/dist/lexical/ui/icons/Subscript/index.js.map +1 -1
- package/dist/lexical/ui/icons/Superscript/index.d.ts +3 -1
- package/dist/lexical/ui/icons/Superscript/index.d.ts.map +1 -1
- package/dist/lexical/ui/icons/Superscript/index.js +10 -7
- package/dist/lexical/ui/icons/Superscript/index.js.map +1 -1
- package/dist/lexical/ui/icons/Table/index.d.ts +4 -1
- package/dist/lexical/ui/icons/Table/index.d.ts.map +1 -1
- package/dist/lexical/ui/icons/Table/index.js +20 -15
- package/dist/lexical/ui/icons/Table/index.js.map +1 -1
- package/dist/lexical/ui/icons/Text/index.d.ts +4 -1
- package/dist/lexical/ui/icons/Text/index.d.ts.map +1 -1
- package/dist/lexical/ui/icons/Text/index.js +17 -8
- package/dist/lexical/ui/icons/Text/index.js.map +1 -1
- package/dist/lexical/ui/icons/Underline/index.d.ts +3 -1
- package/dist/lexical/ui/icons/Underline/index.d.ts.map +1 -1
- package/dist/lexical/ui/icons/Underline/index.js +16 -14
- package/dist/lexical/ui/icons/Underline/index.js.map +1 -1
- package/dist/lexical/ui/icons/UnorderedList/index.d.ts +3 -1
- package/dist/lexical/ui/icons/UnorderedList/index.d.ts.map +1 -1
- package/dist/lexical/ui/icons/UnorderedList/index.js +13 -40
- package/dist/lexical/ui/icons/UnorderedList/index.js.map +1 -1
- package/dist/lexical/ui/icons/Upload/index.d.ts +3 -1
- package/dist/lexical/ui/icons/Upload/index.d.ts.map +1 -1
- package/dist/lexical/ui/icons/Upload/index.js +15 -22
- package/dist/lexical/ui/icons/Upload/index.js.map +1 -1
- package/dist/utilities/buildEditorState.d.ts.map +1 -1
- package/dist/utilities/buildEditorState.js +13 -0
- package/dist/utilities/buildEditorState.js.map +1 -1
- package/package.json +10 -15
- package/dist/exports/client/Component-DOSSWC76.js +0 -2
- package/dist/exports/client/Component-DOSSWC76.js.map +0 -7
- package/dist/exports/client/Component-MBLHTKDK.js +0 -2
- package/dist/exports/client/Component-MBLHTKDK.js.map +0 -7
- package/dist/exports/client/Field-4UEGQMIN.js.map +0 -7
- package/dist/exports/client/chunk-YWIZCGSY.js +0 -2
- package/dist/exports/client/chunk-YWIZCGSY.js.map +0 -7
- package/dist/exports/client/componentInline-CBBUBQ7P.js +0 -2
- package/dist/exports/server/migrate.d.ts +0 -16
- package/dist/exports/server/migrate.d.ts.map +0 -1
- package/dist/exports/server/migrate.js +0 -16
- package/dist/exports/server/migrate.js.map +0 -1
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/heading/converter.d.ts +0 -3
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/heading/converter.d.ts.map +0 -1
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/heading/converter.js +0 -22
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/heading/converter.js.map +0 -1
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/link/converter.d.ts +0 -3
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/link/converter.d.ts.map +0 -1
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/link/converter.js +0 -33
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/link/converter.js.map +0 -1
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/list/converter.d.ts +0 -3
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/list/converter.d.ts.map +0 -1
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/list/converter.js +0 -24
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/list/converter.js.map +0 -1
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/listItem/converter.d.ts +0 -3
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/listItem/converter.d.ts.map +0 -1
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/listItem/converter.js +0 -25
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/listItem/converter.js.map +0 -1
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/quote/converter.d.ts +0 -3
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/quote/converter.d.ts.map +0 -1
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/quote/converter.js +0 -22
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/quote/converter.js.map +0 -1
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/unknown/converter.d.ts +0 -3
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/unknown/converter.d.ts.map +0 -1
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/unknown/converter.js +0 -28
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/unknown/converter.js.map +0 -1
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/upload/converter.d.ts +0 -3
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/upload/converter.d.ts.map +0 -1
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/upload/converter.js +0 -22
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/upload/converter.js.map +0 -1
- package/dist/features/migrations/lexicalPluginToLexical/converter/defaultConverters.d.ts +0 -3
- package/dist/features/migrations/lexicalPluginToLexical/converter/defaultConverters.d.ts.map +0 -1
- package/dist/features/migrations/lexicalPluginToLexical/converter/defaultConverters.js +0 -9
- package/dist/features/migrations/lexicalPluginToLexical/converter/defaultConverters.js.map +0 -1
- package/dist/features/migrations/lexicalPluginToLexical/converter/index.d.ts +0 -19
- package/dist/features/migrations/lexicalPluginToLexical/converter/index.d.ts.map +0 -1
- package/dist/features/migrations/lexicalPluginToLexical/converter/index.js +0 -78
- package/dist/features/migrations/lexicalPluginToLexical/converter/index.js.map +0 -1
- package/dist/features/migrations/lexicalPluginToLexical/converter/types.d.ts +0 -23
- package/dist/features/migrations/lexicalPluginToLexical/converter/types.d.ts.map +0 -1
- package/dist/features/migrations/lexicalPluginToLexical/converter/types.js +0 -2
- package/dist/features/migrations/lexicalPluginToLexical/converter/types.js.map +0 -1
- package/dist/features/migrations/lexicalPluginToLexical/feature.client.d.ts +0 -2
- package/dist/features/migrations/lexicalPluginToLexical/feature.client.d.ts.map +0 -1
- package/dist/features/migrations/lexicalPluginToLexical/feature.client.js +0 -10
- package/dist/features/migrations/lexicalPluginToLexical/feature.client.js.map +0 -1
- package/dist/features/migrations/lexicalPluginToLexical/feature.server.d.ts +0 -10
- package/dist/features/migrations/lexicalPluginToLexical/feature.server.d.ts.map +0 -1
- package/dist/features/migrations/lexicalPluginToLexical/feature.server.js +0 -49
- package/dist/features/migrations/lexicalPluginToLexical/feature.server.js.map +0 -1
- package/dist/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/Component.d.ts +0 -9
- package/dist/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/Component.d.ts.map +0 -1
- package/dist/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/Component.js +0 -15
- package/dist/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/Component.js.map +0 -1
- package/dist/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/index.d.ts +0 -33
- package/dist/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/index.d.ts.map +0 -1
- package/dist/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/index.js +0 -74
- package/dist/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/index.js.map +0 -1
- package/dist/features/migrations/slateToLexical/converter/converters/blockquote/converter.d.ts +0 -3
- package/dist/features/migrations/slateToLexical/converter/converters/blockquote/converter.d.ts.map +0 -1
- package/dist/features/migrations/slateToLexical/converter/converters/blockquote/converter.js +0 -23
- package/dist/features/migrations/slateToLexical/converter/converters/blockquote/converter.js.map +0 -1
- package/dist/features/migrations/slateToLexical/converter/converters/heading/converter.d.ts +0 -3
- package/dist/features/migrations/slateToLexical/converter/converters/heading/converter.d.ts.map +0 -1
- package/dist/features/migrations/slateToLexical/converter/converters/heading/converter.js +0 -24
- package/dist/features/migrations/slateToLexical/converter/converters/heading/converter.js.map +0 -1
- package/dist/features/migrations/slateToLexical/converter/converters/indent/converter.d.ts +0 -3
- package/dist/features/migrations/slateToLexical/converter/converters/indent/converter.d.ts.map +0 -1
- package/dist/features/migrations/slateToLexical/converter/converters/indent/converter.js +0 -33
- package/dist/features/migrations/slateToLexical/converter/converters/indent/converter.js.map +0 -1
- package/dist/features/migrations/slateToLexical/converter/converters/link/converter.d.ts +0 -3
- package/dist/features/migrations/slateToLexical/converter/converters/link/converter.d.ts.map +0 -1
- package/dist/features/migrations/slateToLexical/converter/converters/link/converter.js +0 -30
- package/dist/features/migrations/slateToLexical/converter/converters/link/converter.js.map +0 -1
- package/dist/features/migrations/slateToLexical/converter/converters/listItem/converter.d.ts +0 -3
- package/dist/features/migrations/slateToLexical/converter/converters/listItem/converter.d.ts.map +0 -1
- package/dist/features/migrations/slateToLexical/converter/converters/listItem/converter.js +0 -26
- package/dist/features/migrations/slateToLexical/converter/converters/listItem/converter.js.map +0 -1
- package/dist/features/migrations/slateToLexical/converter/converters/orderedList/converter.d.ts +0 -3
- package/dist/features/migrations/slateToLexical/converter/converters/orderedList/converter.d.ts.map +0 -1
- package/dist/features/migrations/slateToLexical/converter/converters/orderedList/converter.js +0 -26
- package/dist/features/migrations/slateToLexical/converter/converters/orderedList/converter.js.map +0 -1
- package/dist/features/migrations/slateToLexical/converter/converters/relationship/converter.d.ts +0 -3
- package/dist/features/migrations/slateToLexical/converter/converters/relationship/converter.d.ts.map +0 -1
- package/dist/features/migrations/slateToLexical/converter/converters/relationship/converter.js +0 -15
- package/dist/features/migrations/slateToLexical/converter/converters/relationship/converter.js.map +0 -1
- package/dist/features/migrations/slateToLexical/converter/converters/unknown/converter.d.ts +0 -3
- package/dist/features/migrations/slateToLexical/converter/converters/unknown/converter.d.ts.map +0 -1
- package/dist/features/migrations/slateToLexical/converter/converters/unknown/converter.js +0 -27
- package/dist/features/migrations/slateToLexical/converter/converters/unknown/converter.js.map +0 -1
- package/dist/features/migrations/slateToLexical/converter/converters/unorderedList/converter.d.ts +0 -3
- package/dist/features/migrations/slateToLexical/converter/converters/unorderedList/converter.d.ts.map +0 -1
- package/dist/features/migrations/slateToLexical/converter/converters/unorderedList/converter.js +0 -26
- package/dist/features/migrations/slateToLexical/converter/converters/unorderedList/converter.js.map +0 -1
- package/dist/features/migrations/slateToLexical/converter/converters/upload/converter.d.ts +0 -3
- package/dist/features/migrations/slateToLexical/converter/converters/upload/converter.d.ts.map +0 -1
- package/dist/features/migrations/slateToLexical/converter/converters/upload/converter.js +0 -18
- package/dist/features/migrations/slateToLexical/converter/converters/upload/converter.js.map +0 -1
- package/dist/features/migrations/slateToLexical/converter/defaultConverters.d.ts +0 -3
- package/dist/features/migrations/slateToLexical/converter/defaultConverters.d.ts.map +0 -1
- package/dist/features/migrations/slateToLexical/converter/defaultConverters.js +0 -12
- package/dist/features/migrations/slateToLexical/converter/defaultConverters.js.map +0 -1
- package/dist/features/migrations/slateToLexical/converter/index.d.ts +0 -19
- package/dist/features/migrations/slateToLexical/converter/index.d.ts.map +0 -1
- package/dist/features/migrations/slateToLexical/converter/index.js +0 -130
- package/dist/features/migrations/slateToLexical/converter/index.js.map +0 -1
- package/dist/features/migrations/slateToLexical/converter/types.d.ts +0 -16
- package/dist/features/migrations/slateToLexical/converter/types.d.ts.map +0 -1
- package/dist/features/migrations/slateToLexical/converter/types.js +0 -2
- package/dist/features/migrations/slateToLexical/converter/types.js.map +0 -1
- package/dist/features/migrations/slateToLexical/feature.client.d.ts +0 -2
- package/dist/features/migrations/slateToLexical/feature.client.d.ts.map +0 -1
- package/dist/features/migrations/slateToLexical/feature.client.js +0 -10
- package/dist/features/migrations/slateToLexical/feature.client.js.map +0 -1
- package/dist/features/migrations/slateToLexical/feature.server.d.ts +0 -40
- package/dist/features/migrations/slateToLexical/feature.server.d.ts.map +0 -1
- package/dist/features/migrations/slateToLexical/feature.server.js +0 -68
- package/dist/features/migrations/slateToLexical/feature.server.js.map +0 -1
- package/dist/features/migrations/slateToLexical/nodes/unknownConvertedNode/Component.d.ts +0 -9
- package/dist/features/migrations/slateToLexical/nodes/unknownConvertedNode/Component.d.ts.map +0 -1
- package/dist/features/migrations/slateToLexical/nodes/unknownConvertedNode/Component.js +0 -15
- package/dist/features/migrations/slateToLexical/nodes/unknownConvertedNode/Component.js.map +0 -1
- package/dist/features/migrations/slateToLexical/nodes/unknownConvertedNode/index.d.ts +0 -33
- package/dist/features/migrations/slateToLexical/nodes/unknownConvertedNode/index.d.ts.map +0 -1
- package/dist/features/migrations/slateToLexical/nodes/unknownConvertedNode/index.js +0 -74
- package/dist/features/migrations/slateToLexical/nodes/unknownConvertedNode/index.js.map +0 -1
- package/dist/lexical/ui/icons/AI/index.d.ts +0 -3
- package/dist/lexical/ui/icons/AI/index.d.ts.map +0 -1
- package/dist/lexical/ui/icons/AI/index.js +0 -34
- package/dist/lexical/ui/icons/AI/index.js.map +0 -1
- package/dist/lexical/ui/icons/Caret/index.svg +0 -3
- package/dist/lexical/ui/icons/Edit/index.svg +0 -10
- package/dist/lexical/ui/icons/Remove/index.svg +0 -4
- package/dist/utilities/migrateSlateToLexical/index.d.ts +0 -15
- package/dist/utilities/migrateSlateToLexical/index.d.ts.map +0 -1
- package/dist/utilities/migrateSlateToLexical/index.js +0 -152
- package/dist/utilities/migrateSlateToLexical/index.js.map +0 -1
- package/dist/utilities/migrateSlateToLexical/migrateDocumentFieldsRecursively.d.ts +0 -10
- package/dist/utilities/migrateSlateToLexical/migrateDocumentFieldsRecursively.d.ts.map +0 -1
- package/dist/utilities/migrateSlateToLexical/migrateDocumentFieldsRecursively.js +0 -85
- package/dist/utilities/migrateSlateToLexical/migrateDocumentFieldsRecursively.js.map +0 -1
- /package/dist/exports/client/{componentInline-CBBUBQ7P.js.map → componentInline-LCHKRXOV.js.map} +0 -0
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
export { LexicalPluginToLexicalFeature } from '../../features/migrations/lexicalPluginToLexical/feature.server.js';
|
|
2
|
-
export { SlateBlockquoteConverter } from '../../features/migrations/slateToLexical/converter/converters/blockquote/converter.js';
|
|
3
|
-
export { SlateHeadingConverter } from '../../features/migrations/slateToLexical/converter/converters/heading/converter.js';
|
|
4
|
-
export { SlateIndentConverter } from '../../features/migrations/slateToLexical/converter/converters/indent/converter.js';
|
|
5
|
-
export { SlateLinkConverter } from '../../features/migrations/slateToLexical/converter/converters/link/converter.js';
|
|
6
|
-
export { SlateListItemConverter } from '../../features/migrations/slateToLexical/converter/converters/listItem/converter.js';
|
|
7
|
-
export { SlateOrderedListConverter } from '../../features/migrations/slateToLexical/converter/converters/orderedList/converter.js';
|
|
8
|
-
export { SlateRelationshipConverter } from '../../features/migrations/slateToLexical/converter/converters/relationship/converter.js';
|
|
9
|
-
export { SlateUnknownConverter } from '../../features/migrations/slateToLexical/converter/converters/unknown/converter.js';
|
|
10
|
-
export { SlateUnorderedListConverter } from '../../features/migrations/slateToLexical/converter/converters/unorderedList/converter.js';
|
|
11
|
-
export { SlateUploadConverter } from '../../features/migrations/slateToLexical/converter/converters/upload/converter.js';
|
|
12
|
-
export { defaultSlateConverters } from '../../features/migrations/slateToLexical/converter/defaultConverters.js';
|
|
13
|
-
export { convertSlateNodesToLexical, convertSlateToLexical } from '../../features/migrations/slateToLexical/converter/index.js';
|
|
14
|
-
export { SlateToLexicalFeature } from '../../features/migrations/slateToLexical/feature.server.js';
|
|
15
|
-
export { migrateSlateToLexical } from '../../utilities/migrateSlateToLexical/index.js';
|
|
16
|
-
//# sourceMappingURL=migrate.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"migrate.js","names":["LexicalPluginToLexicalFeature","SlateBlockquoteConverter","SlateHeadingConverter","SlateIndentConverter","SlateLinkConverter","SlateListItemConverter","SlateOrderedListConverter","SlateRelationshipConverter","SlateUnknownConverter","SlateUnorderedListConverter","SlateUploadConverter","defaultSlateConverters","convertSlateNodesToLexical","convertSlateToLexical","SlateToLexicalFeature","migrateSlateToLexical"],"sources":["../../../src/exports/server/migrate.ts"],"sourcesContent":["export { LexicalPluginToLexicalFeature } from '../../features/migrations/lexicalPluginToLexical/feature.server.js'\nexport { SlateBlockquoteConverter } from '../../features/migrations/slateToLexical/converter/converters/blockquote/converter.js'\nexport { SlateHeadingConverter } from '../../features/migrations/slateToLexical/converter/converters/heading/converter.js'\nexport { SlateIndentConverter } from '../../features/migrations/slateToLexical/converter/converters/indent/converter.js'\nexport { SlateLinkConverter } from '../../features/migrations/slateToLexical/converter/converters/link/converter.js'\nexport { SlateListItemConverter } from '../../features/migrations/slateToLexical/converter/converters/listItem/converter.js'\nexport { SlateOrderedListConverter } from '../../features/migrations/slateToLexical/converter/converters/orderedList/converter.js'\nexport { SlateRelationshipConverter } from '../../features/migrations/slateToLexical/converter/converters/relationship/converter.js'\nexport { SlateUnknownConverter } from '../../features/migrations/slateToLexical/converter/converters/unknown/converter.js'\nexport { SlateUnorderedListConverter } from '../../features/migrations/slateToLexical/converter/converters/unorderedList/converter.js'\nexport { SlateUploadConverter } from '../../features/migrations/slateToLexical/converter/converters/upload/converter.js'\nexport { defaultSlateConverters } from '../../features/migrations/slateToLexical/converter/defaultConverters.js'\nexport {\n convertSlateNodesToLexical,\n convertSlateToLexical,\n} from '../../features/migrations/slateToLexical/converter/index.js'\n\nexport { SlateToLexicalFeature } from '../../features/migrations/slateToLexical/feature.server.js'\nexport { migrateSlateToLexical } from '../../utilities/migrateSlateToLexical/index.js'\n"],"mappings":"AAAA,SAASA,6BAA6B,QAAQ;AAC9C,SAASC,wBAAwB,QAAQ;AACzC,SAASC,qBAAqB,QAAQ;AACtC,SAASC,oBAAoB,QAAQ;AACrC,SAASC,kBAAkB,QAAQ;AACnC,SAASC,sBAAsB,QAAQ;AACvC,SAASC,yBAAyB,QAAQ;AAC1C,SAASC,0BAA0B,QAAQ;AAC3C,SAASC,qBAAqB,QAAQ;AACtC,SAASC,2BAA2B,QAAQ;AAC5C,SAASC,oBAAoB,QAAQ;AACrC,SAASC,sBAAsB,QAAQ;AACvC,SACEC,0BAA0B,EAC1BC,qBAAqB,QAChB;AAEP,SAASC,qBAAqB,QAAQ;AACtC,SAASC,qBAAqB,QAAQ","ignoreList":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"converter.d.ts","sourceRoot":"","sources":["../../../../../../../src/features/migrations/lexicalPluginToLexical/converter/converters/heading/converter.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,gBAAgB,CAAA;AAIhE,eAAO,MAAM,gBAAgB,EAAE,0BAe9B,CAAA"}
|
package/dist/features/migrations/lexicalPluginToLexical/converter/converters/heading/converter.js
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { convertLexicalPluginNodesToLexical } from '../../index.js';
|
|
2
|
-
export const HeadingConverter = {
|
|
3
|
-
converter({
|
|
4
|
-
converters,
|
|
5
|
-
lexicalPluginNode,
|
|
6
|
-
quiet
|
|
7
|
-
}) {
|
|
8
|
-
return {
|
|
9
|
-
...lexicalPluginNode,
|
|
10
|
-
type: 'heading',
|
|
11
|
-
children: convertLexicalPluginNodesToLexical({
|
|
12
|
-
converters,
|
|
13
|
-
lexicalPluginNodes: lexicalPluginNode.children,
|
|
14
|
-
parentNodeType: 'heading',
|
|
15
|
-
quiet
|
|
16
|
-
}),
|
|
17
|
-
version: 1
|
|
18
|
-
};
|
|
19
|
-
},
|
|
20
|
-
nodeTypes: ['heading']
|
|
21
|
-
};
|
|
22
|
-
//# sourceMappingURL=converter.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"converter.js","names":["convertLexicalPluginNodesToLexical","HeadingConverter","converter","converters","lexicalPluginNode","quiet","type","children","lexicalPluginNodes","parentNodeType","version","nodeTypes"],"sources":["../../../../../../../src/features/migrations/lexicalPluginToLexical/converter/converters/heading/converter.ts"],"sourcesContent":["import type { SerializedHeadingNode } from '../../../../../heading/server/index.js'\nimport type { LexicalPluginNodeConverter } from '../../types.js'\n\nimport { convertLexicalPluginNodesToLexical } from '../../index.js'\n\nexport const HeadingConverter: LexicalPluginNodeConverter = {\n converter({ converters, lexicalPluginNode, quiet }) {\n return {\n ...lexicalPluginNode,\n type: 'heading',\n children: convertLexicalPluginNodesToLexical({\n converters,\n lexicalPluginNodes: lexicalPluginNode.children,\n parentNodeType: 'heading',\n quiet,\n }),\n version: 1,\n } as const as SerializedHeadingNode\n },\n nodeTypes: ['heading'],\n}\n"],"mappings":"AAGA,SAASA,kCAAkC,QAAQ;AAEnD,OAAO,MAAMC,gBAAA,GAA+C;EAC1DC,UAAU;IAAEC,UAAU;IAAEC,iBAAiB;IAAEC;EAAK,CAAE;IAChD,OAAO;MACL,GAAGD,iBAAiB;MACpBE,IAAA,EAAM;MACNC,QAAA,EAAUP,kCAAA,CAAmC;QAC3CG,UAAA;QACAK,kBAAA,EAAoBJ,iBAAA,CAAkBG,QAAQ;QAC9CE,cAAA,EAAgB;QAChBJ;MACF;MACAK,OAAA,EAAS;IACX;EACF;EACAC,SAAA,EAAW,CAAC;AACd","ignoreList":[]}
|
package/dist/features/migrations/lexicalPluginToLexical/converter/converters/link/converter.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"converter.d.ts","sourceRoot":"","sources":["../../../../../../../src/features/migrations/lexicalPluginToLexical/converter/converters/link/converter.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,gBAAgB,CAAA;AAIhE,eAAO,MAAM,aAAa,EAAE,0BA4B3B,CAAA"}
|
package/dist/features/migrations/lexicalPluginToLexical/converter/converters/link/converter.js
DELETED
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
/* eslint-disable @typescript-eslint/no-explicit-any */import { convertLexicalPluginNodesToLexical } from '../../index.js';
|
|
2
|
-
export const LinkConverter = {
|
|
3
|
-
converter({
|
|
4
|
-
converters,
|
|
5
|
-
lexicalPluginNode,
|
|
6
|
-
quiet
|
|
7
|
-
}) {
|
|
8
|
-
return {
|
|
9
|
-
type: 'link',
|
|
10
|
-
children: convertLexicalPluginNodesToLexical({
|
|
11
|
-
converters,
|
|
12
|
-
lexicalPluginNodes: lexicalPluginNode.children,
|
|
13
|
-
parentNodeType: 'link',
|
|
14
|
-
quiet
|
|
15
|
-
}),
|
|
16
|
-
direction: lexicalPluginNode.direction || 'ltr',
|
|
17
|
-
fields: {
|
|
18
|
-
doc: lexicalPluginNode.attributes?.doc ? {
|
|
19
|
-
relationTo: lexicalPluginNode.attributes?.doc?.relationTo,
|
|
20
|
-
value: lexicalPluginNode.attributes?.doc?.value
|
|
21
|
-
} : undefined,
|
|
22
|
-
linkType: lexicalPluginNode.attributes?.linkType || 'custom',
|
|
23
|
-
newTab: lexicalPluginNode.attributes?.newTab || false,
|
|
24
|
-
url: lexicalPluginNode.attributes?.url || undefined
|
|
25
|
-
},
|
|
26
|
-
format: lexicalPluginNode.format || '',
|
|
27
|
-
indent: lexicalPluginNode.indent || 0,
|
|
28
|
-
version: 2
|
|
29
|
-
};
|
|
30
|
-
},
|
|
31
|
-
nodeTypes: ['link']
|
|
32
|
-
};
|
|
33
|
-
//# sourceMappingURL=converter.js.map
|
package/dist/features/migrations/lexicalPluginToLexical/converter/converters/link/converter.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"converter.js","names":["convertLexicalPluginNodesToLexical","LinkConverter","converter","converters","lexicalPluginNode","quiet","type","children","lexicalPluginNodes","parentNodeType","direction","fields","doc","attributes","relationTo","value","undefined","linkType","newTab","url","format","indent","version","nodeTypes"],"sources":["../../../../../../../src/features/migrations/lexicalPluginToLexical/converter/converters/link/converter.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-explicit-any */\n\nimport type { SerializedLinkNode } from '../../../../../link/nodes/types.js'\nimport type { LexicalPluginNodeConverter } from '../../types.js'\n\nimport { convertLexicalPluginNodesToLexical } from '../../index.js'\n\nexport const LinkConverter: LexicalPluginNodeConverter = {\n converter({ converters, lexicalPluginNode, quiet }) {\n return {\n type: 'link',\n children: convertLexicalPluginNodesToLexical({\n converters,\n lexicalPluginNodes: lexicalPluginNode.children,\n parentNodeType: 'link',\n quiet,\n }),\n direction: (lexicalPluginNode as any).direction || 'ltr',\n fields: {\n doc: (lexicalPluginNode as any).attributes?.doc\n ? {\n relationTo: (lexicalPluginNode as any).attributes?.doc?.relationTo,\n value: (lexicalPluginNode as any).attributes?.doc?.value,\n }\n : undefined,\n linkType: (lexicalPluginNode as any).attributes?.linkType || 'custom',\n newTab: (lexicalPluginNode as any).attributes?.newTab || false,\n url: (lexicalPluginNode as any).attributes?.url || undefined,\n },\n format: (lexicalPluginNode as any).format || '',\n indent: (lexicalPluginNode as any).indent || 0,\n version: 2,\n } as const as SerializedLinkNode\n },\n nodeTypes: ['link'],\n}\n"],"mappings":"AAAA,uDAKA,SAASA,kCAAkC,QAAQ;AAEnD,OAAO,MAAMC,aAAA,GAA4C;EACvDC,UAAU;IAAEC,UAAU;IAAEC,iBAAiB;IAAEC;EAAK,CAAE;IAChD,OAAO;MACLC,IAAA,EAAM;MACNC,QAAA,EAAUP,kCAAA,CAAmC;QAC3CG,UAAA;QACAK,kBAAA,EAAoBJ,iBAAA,CAAkBG,QAAQ;QAC9CE,cAAA,EAAgB;QAChBJ;MACF;MACAK,SAAA,EAAWN,iBAAC,CAA0BM,SAAS,IAAI;MACnDC,MAAA,EAAQ;QACNC,GAAA,EAAKR,iBAAC,CAA0BS,UAAU,EAAED,GAAA,GACxC;UACEE,UAAA,EAAYV,iBAAC,CAA0BS,UAAU,EAAED,GAAA,EAAKE,UAAA;UACxDC,KAAA,EAAOX,iBAAC,CAA0BS,UAAU,EAAED,GAAA,EAAKG;QACrD,IACAC,SAAA;QACJC,QAAA,EAAUb,iBAAC,CAA0BS,UAAU,EAAEI,QAAA,IAAY;QAC7DC,MAAA,EAAQd,iBAAC,CAA0BS,UAAU,EAAEK,MAAA,IAAU;QACzDC,GAAA,EAAKf,iBAAC,CAA0BS,UAAU,EAAEM,GAAA,IAAOH;MACrD;MACAI,MAAA,EAAQhB,iBAAC,CAA0BgB,MAAM,IAAI;MAC7CC,MAAA,EAAQjB,iBAAC,CAA0BiB,MAAM,IAAI;MAC7CC,OAAA,EAAS;IACX;EACF;EACAC,SAAA,EAAW,CAAC;AACd","ignoreList":[]}
|
package/dist/features/migrations/lexicalPluginToLexical/converter/converters/list/converter.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"converter.d.ts","sourceRoot":"","sources":["../../../../../../../src/features/migrations/lexicalPluginToLexical/converter/converters/list/converter.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,gBAAgB,CAAA;AAIhE,eAAO,MAAM,aAAa,EAAE,0BAiB3B,CAAA"}
|
package/dist/features/migrations/lexicalPluginToLexical/converter/converters/list/converter.js
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
/* eslint-disable @typescript-eslint/no-explicit-any */import { convertLexicalPluginNodesToLexical } from '../../index.js';
|
|
2
|
-
export const ListConverter = {
|
|
3
|
-
converter({
|
|
4
|
-
converters,
|
|
5
|
-
lexicalPluginNode,
|
|
6
|
-
quiet
|
|
7
|
-
}) {
|
|
8
|
-
return {
|
|
9
|
-
...lexicalPluginNode,
|
|
10
|
-
type: 'list',
|
|
11
|
-
children: convertLexicalPluginNodesToLexical({
|
|
12
|
-
converters,
|
|
13
|
-
lexicalPluginNodes: lexicalPluginNode.children,
|
|
14
|
-
parentNodeType: 'list',
|
|
15
|
-
quiet
|
|
16
|
-
}),
|
|
17
|
-
listType: lexicalPluginNode?.listType || 'number',
|
|
18
|
-
tag: lexicalPluginNode?.tag || 'ol',
|
|
19
|
-
version: 1
|
|
20
|
-
};
|
|
21
|
-
},
|
|
22
|
-
nodeTypes: ['list']
|
|
23
|
-
};
|
|
24
|
-
//# sourceMappingURL=converter.js.map
|
package/dist/features/migrations/lexicalPluginToLexical/converter/converters/list/converter.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"converter.js","names":["convertLexicalPluginNodesToLexical","ListConverter","converter","converters","lexicalPluginNode","quiet","type","children","lexicalPluginNodes","parentNodeType","listType","tag","version","nodeTypes"],"sources":["../../../../../../../src/features/migrations/lexicalPluginToLexical/converter/converters/list/converter.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-explicit-any */\n\nimport type { SerializedListNode } from '../../../../../lists/plugin/index.js'\nimport type { LexicalPluginNodeConverter } from '../../types.js'\n\nimport { convertLexicalPluginNodesToLexical } from '../../index.js'\n\nexport const ListConverter: LexicalPluginNodeConverter = {\n converter({ converters, lexicalPluginNode, quiet }) {\n return {\n ...lexicalPluginNode,\n type: 'list',\n children: convertLexicalPluginNodesToLexical({\n converters,\n lexicalPluginNodes: lexicalPluginNode.children,\n parentNodeType: 'list',\n quiet,\n }),\n listType: (lexicalPluginNode as any)?.listType || 'number',\n tag: (lexicalPluginNode as any)?.tag || 'ol',\n version: 1,\n } as const as SerializedListNode\n },\n nodeTypes: ['list'],\n}\n"],"mappings":"AAAA,uDAKA,SAASA,kCAAkC,QAAQ;AAEnD,OAAO,MAAMC,aAAA,GAA4C;EACvDC,UAAU;IAAEC,UAAU;IAAEC,iBAAiB;IAAEC;EAAK,CAAE;IAChD,OAAO;MACL,GAAGD,iBAAiB;MACpBE,IAAA,EAAM;MACNC,QAAA,EAAUP,kCAAA,CAAmC;QAC3CG,UAAA;QACAK,kBAAA,EAAoBJ,iBAAA,CAAkBG,QAAQ;QAC9CE,cAAA,EAAgB;QAChBJ;MACF;MACAK,QAAA,EAAUN,iBAAC,EAA2BM,QAAA,IAAY;MAClDC,GAAA,EAAKP,iBAAC,EAA2BO,GAAA,IAAO;MACxCC,OAAA,EAAS;IACX;EACF;EACAC,SAAA,EAAW,CAAC;AACd","ignoreList":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"converter.d.ts","sourceRoot":"","sources":["../../../../../../../src/features/migrations/lexicalPluginToLexical/converter/converters/listItem/converter.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,gBAAgB,CAAA;AAIhE,eAAO,MAAM,iBAAiB,EAAE,0BAiB/B,CAAA"}
|
package/dist/features/migrations/lexicalPluginToLexical/converter/converters/listItem/converter.js
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { convertLexicalPluginNodesToLexical } from '../../index.js';
|
|
2
|
-
export const ListItemConverter = {
|
|
3
|
-
converter({
|
|
4
|
-
childIndex,
|
|
5
|
-
converters,
|
|
6
|
-
lexicalPluginNode,
|
|
7
|
-
quiet
|
|
8
|
-
}) {
|
|
9
|
-
return {
|
|
10
|
-
...lexicalPluginNode,
|
|
11
|
-
type: 'listitem',
|
|
12
|
-
checked: undefined,
|
|
13
|
-
children: convertLexicalPluginNodesToLexical({
|
|
14
|
-
converters,
|
|
15
|
-
lexicalPluginNodes: lexicalPluginNode.children,
|
|
16
|
-
parentNodeType: 'listitem',
|
|
17
|
-
quiet
|
|
18
|
-
}),
|
|
19
|
-
value: childIndex + 1,
|
|
20
|
-
version: 1
|
|
21
|
-
};
|
|
22
|
-
},
|
|
23
|
-
nodeTypes: ['listitem']
|
|
24
|
-
};
|
|
25
|
-
//# sourceMappingURL=converter.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"converter.js","names":["convertLexicalPluginNodesToLexical","ListItemConverter","converter","childIndex","converters","lexicalPluginNode","quiet","type","checked","undefined","children","lexicalPluginNodes","parentNodeType","value","version","nodeTypes"],"sources":["../../../../../../../src/features/migrations/lexicalPluginToLexical/converter/converters/listItem/converter.ts"],"sourcesContent":["import type { SerializedListItemNode } from '../../../../../lists/plugin/index.js'\nimport type { LexicalPluginNodeConverter } from '../../types.js'\n\nimport { convertLexicalPluginNodesToLexical } from '../../index.js'\n\nexport const ListItemConverter: LexicalPluginNodeConverter = {\n converter({ childIndex, converters, lexicalPluginNode, quiet }) {\n return {\n ...lexicalPluginNode,\n type: 'listitem',\n checked: undefined,\n children: convertLexicalPluginNodesToLexical({\n converters,\n lexicalPluginNodes: lexicalPluginNode.children,\n parentNodeType: 'listitem',\n quiet,\n }),\n value: childIndex + 1,\n version: 1,\n } as const as SerializedListItemNode\n },\n nodeTypes: ['listitem'],\n}\n"],"mappings":"AAGA,SAASA,kCAAkC,QAAQ;AAEnD,OAAO,MAAMC,iBAAA,GAAgD;EAC3DC,UAAU;IAAEC,UAAU;IAAEC,UAAU;IAAEC,iBAAiB;IAAEC;EAAK,CAAE;IAC5D,OAAO;MACL,GAAGD,iBAAiB;MACpBE,IAAA,EAAM;MACNC,OAAA,EAASC,SAAA;MACTC,QAAA,EAAUV,kCAAA,CAAmC;QAC3CI,UAAA;QACAO,kBAAA,EAAoBN,iBAAA,CAAkBK,QAAQ;QAC9CE,cAAA,EAAgB;QAChBN;MACF;MACAO,KAAA,EAAOV,UAAA,GAAa;MACpBW,OAAA,EAAS;IACX;EACF;EACAC,SAAA,EAAW,CAAC;AACd","ignoreList":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"converter.d.ts","sourceRoot":"","sources":["../../../../../../../src/features/migrations/lexicalPluginToLexical/converter/converters/quote/converter.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,gBAAgB,CAAA;AAIhE,eAAO,MAAM,cAAc,EAAE,0BAe5B,CAAA"}
|
package/dist/features/migrations/lexicalPluginToLexical/converter/converters/quote/converter.js
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { convertLexicalPluginNodesToLexical } from '../../index.js';
|
|
2
|
-
export const QuoteConverter = {
|
|
3
|
-
converter({
|
|
4
|
-
converters,
|
|
5
|
-
lexicalPluginNode,
|
|
6
|
-
quiet
|
|
7
|
-
}) {
|
|
8
|
-
return {
|
|
9
|
-
...lexicalPluginNode,
|
|
10
|
-
type: 'quote',
|
|
11
|
-
children: convertLexicalPluginNodesToLexical({
|
|
12
|
-
converters,
|
|
13
|
-
lexicalPluginNodes: lexicalPluginNode.children,
|
|
14
|
-
parentNodeType: 'quote',
|
|
15
|
-
quiet
|
|
16
|
-
}),
|
|
17
|
-
version: 1
|
|
18
|
-
};
|
|
19
|
-
},
|
|
20
|
-
nodeTypes: ['quote']
|
|
21
|
-
};
|
|
22
|
-
//# sourceMappingURL=converter.js.map
|
package/dist/features/migrations/lexicalPluginToLexical/converter/converters/quote/converter.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"converter.js","names":["convertLexicalPluginNodesToLexical","QuoteConverter","converter","converters","lexicalPluginNode","quiet","type","children","lexicalPluginNodes","parentNodeType","version","nodeTypes"],"sources":["../../../../../../../src/features/migrations/lexicalPluginToLexical/converter/converters/quote/converter.ts"],"sourcesContent":["import type { SerializedQuoteNode } from '../../../../../blockquote/server/index.js'\nimport type { LexicalPluginNodeConverter } from '../../types.js'\n\nimport { convertLexicalPluginNodesToLexical } from '../../index.js'\n\nexport const QuoteConverter: LexicalPluginNodeConverter = {\n converter({ converters, lexicalPluginNode, quiet }) {\n return {\n ...lexicalPluginNode,\n type: 'quote',\n children: convertLexicalPluginNodesToLexical({\n converters,\n lexicalPluginNodes: lexicalPluginNode.children,\n parentNodeType: 'quote',\n quiet,\n }),\n version: 1,\n } as const as SerializedQuoteNode\n },\n nodeTypes: ['quote'],\n}\n"],"mappings":"AAGA,SAASA,kCAAkC,QAAQ;AAEnD,OAAO,MAAMC,cAAA,GAA6C;EACxDC,UAAU;IAAEC,UAAU;IAAEC,iBAAiB;IAAEC;EAAK,CAAE;IAChD,OAAO;MACL,GAAGD,iBAAiB;MACpBE,IAAA,EAAM;MACNC,QAAA,EAAUP,kCAAA,CAAmC;QAC3CG,UAAA;QACAK,kBAAA,EAAoBJ,iBAAA,CAAkBG,QAAQ;QAC9CE,cAAA,EAAgB;QAChBJ;MACF;MACAK,OAAA,EAAS;IACX;EACF;EACAC,SAAA,EAAW,CAAC;AACd","ignoreList":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"converter.d.ts","sourceRoot":"","sources":["../../../../../../../src/features/migrations/lexicalPluginToLexical/converter/converters/unknown/converter.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,gBAAgB,CAAA;AAIhE,eAAO,MAAM,gBAAgB,EAAE,0BAqB9B,CAAA"}
|
package/dist/features/migrations/lexicalPluginToLexical/converter/converters/unknown/converter.js
DELETED
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { convertLexicalPluginNodesToLexical } from '../../index.js';
|
|
2
|
-
export const UnknownConverter = {
|
|
3
|
-
converter({
|
|
4
|
-
converters,
|
|
5
|
-
lexicalPluginNode,
|
|
6
|
-
quiet
|
|
7
|
-
}) {
|
|
8
|
-
return {
|
|
9
|
-
type: 'unknownConverted',
|
|
10
|
-
children: convertLexicalPluginNodesToLexical({
|
|
11
|
-
converters,
|
|
12
|
-
lexicalPluginNodes: lexicalPluginNode.children,
|
|
13
|
-
parentNodeType: 'unknownConverted',
|
|
14
|
-
quiet
|
|
15
|
-
}),
|
|
16
|
-
data: {
|
|
17
|
-
nodeData: lexicalPluginNode,
|
|
18
|
-
nodeType: lexicalPluginNode.type
|
|
19
|
-
},
|
|
20
|
-
direction: 'ltr',
|
|
21
|
-
format: '',
|
|
22
|
-
indent: 0,
|
|
23
|
-
version: 1
|
|
24
|
-
};
|
|
25
|
-
},
|
|
26
|
-
nodeTypes: ['unknown']
|
|
27
|
-
};
|
|
28
|
-
//# sourceMappingURL=converter.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"converter.js","names":["convertLexicalPluginNodesToLexical","UnknownConverter","converter","converters","lexicalPluginNode","quiet","type","children","lexicalPluginNodes","parentNodeType","data","nodeData","nodeType","direction","format","indent","version","nodeTypes"],"sources":["../../../../../../../src/features/migrations/lexicalPluginToLexical/converter/converters/unknown/converter.ts"],"sourcesContent":["import type { SerializedUnknownConvertedNode } from '../../../nodes/unknownConvertedNode/index.js'\nimport type { LexicalPluginNodeConverter } from '../../types.js'\n\nimport { convertLexicalPluginNodesToLexical } from '../../index.js'\n\nexport const UnknownConverter: LexicalPluginNodeConverter = {\n converter({ converters, lexicalPluginNode, quiet }) {\n return {\n type: 'unknownConverted',\n children: convertLexicalPluginNodesToLexical({\n converters,\n lexicalPluginNodes: lexicalPluginNode.children,\n parentNodeType: 'unknownConverted',\n quiet,\n }),\n data: {\n nodeData: lexicalPluginNode,\n nodeType: lexicalPluginNode.type,\n },\n direction: 'ltr',\n format: '',\n indent: 0,\n version: 1,\n } as const as SerializedUnknownConvertedNode\n },\n nodeTypes: ['unknown'],\n}\n"],"mappings":"AAGA,SAASA,kCAAkC,QAAQ;AAEnD,OAAO,MAAMC,gBAAA,GAA+C;EAC1DC,UAAU;IAAEC,UAAU;IAAEC,iBAAiB;IAAEC;EAAK,CAAE;IAChD,OAAO;MACLC,IAAA,EAAM;MACNC,QAAA,EAAUP,kCAAA,CAAmC;QAC3CG,UAAA;QACAK,kBAAA,EAAoBJ,iBAAA,CAAkBG,QAAQ;QAC9CE,cAAA,EAAgB;QAChBJ;MACF;MACAK,IAAA,EAAM;QACJC,QAAA,EAAUP,iBAAA;QACVQ,QAAA,EAAUR,iBAAA,CAAkBE;MAC9B;MACAO,SAAA,EAAW;MACXC,MAAA,EAAQ;MACRC,MAAA,EAAQ;MACRC,OAAA,EAAS;IACX;EACF;EACAC,SAAA,EAAW,CAAC;AACd","ignoreList":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"converter.d.ts","sourceRoot":"","sources":["../../../../../../../src/features/migrations/lexicalPluginToLexical/converter/converters/upload/converter.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,gBAAgB,CAAA;AAEhE,eAAO,MAAM,eAAe,EAAE,0BAkB7B,CAAA"}
|
package/dist/features/migrations/lexicalPluginToLexical/converter/converters/upload/converter.js
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
/* eslint-disable @typescript-eslint/no-explicit-any */export const UploadConverter = {
|
|
2
|
-
converter({
|
|
3
|
-
lexicalPluginNode
|
|
4
|
-
}) {
|
|
5
|
-
let fields = {};
|
|
6
|
-
if (lexicalPluginNode?.caption?.editorState) {
|
|
7
|
-
fields = {
|
|
8
|
-
caption: lexicalPluginNode?.caption
|
|
9
|
-
};
|
|
10
|
-
}
|
|
11
|
-
return {
|
|
12
|
-
type: 'upload',
|
|
13
|
-
fields,
|
|
14
|
-
format: lexicalPluginNode?.format || '',
|
|
15
|
-
relationTo: lexicalPluginNode?.rawImagePayload?.relationTo,
|
|
16
|
-
value: lexicalPluginNode?.rawImagePayload?.value?.id || '',
|
|
17
|
-
version: 2
|
|
18
|
-
};
|
|
19
|
-
},
|
|
20
|
-
nodeTypes: ['upload']
|
|
21
|
-
};
|
|
22
|
-
//# sourceMappingURL=converter.js.map
|
package/dist/features/migrations/lexicalPluginToLexical/converter/converters/upload/converter.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"converter.js","names":["UploadConverter","converter","lexicalPluginNode","fields","caption","editorState","type","format","relationTo","rawImagePayload","value","id","version","nodeTypes"],"sources":["../../../../../../../src/features/migrations/lexicalPluginToLexical/converter/converters/upload/converter.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-explicit-any */\n\nimport type { SerializedUploadNode } from '../../../../../upload/server/nodes/UploadNode.js'\nimport type { LexicalPluginNodeConverter } from '../../types.js'\n\nexport const UploadConverter: LexicalPluginNodeConverter = {\n converter({ lexicalPluginNode }) {\n let fields = {}\n if ((lexicalPluginNode as any)?.caption?.editorState) {\n fields = {\n caption: (lexicalPluginNode as any)?.caption,\n }\n }\n return {\n type: 'upload',\n fields,\n format: (lexicalPluginNode as any)?.format || '',\n relationTo: (lexicalPluginNode as any)?.rawImagePayload?.relationTo,\n value: (lexicalPluginNode as any)?.rawImagePayload?.value?.id || '',\n version: 2,\n } as const as SerializedUploadNode\n },\n nodeTypes: ['upload'],\n}\n"],"mappings":"AAAA,uDAKA,OAAO,MAAMA,eAAA,GAA8C;EACzDC,UAAU;IAAEC;EAAiB,CAAE;IAC7B,IAAIC,MAAA,GAAS,CAAC;IACd,IAAKD,iBAAA,EAA2BE,OAAA,EAASC,WAAA,EAAa;MACpDF,MAAA,GAAS;QACPC,OAAA,EAAUF,iBAAA,EAA2BE;MACvC;IACF;IACA,OAAO;MACLE,IAAA,EAAM;MACNH,MAAA;MACAI,MAAA,EAAQL,iBAAC,EAA2BK,MAAA,IAAU;MAC9CC,UAAA,EAAaN,iBAAA,EAA2BO,eAAA,EAAiBD,UAAA;MACzDE,KAAA,EAAOR,iBAAC,EAA2BO,eAAA,EAAiBC,KAAA,EAAOC,EAAA,IAAM;MACjEC,OAAA,EAAS;IACX;EACF;EACAC,SAAA,EAAW,CAAC;AACd","ignoreList":[]}
|
package/dist/features/migrations/lexicalPluginToLexical/converter/defaultConverters.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"defaultConverters.d.ts","sourceRoot":"","sources":["../../../../../src/features/migrations/lexicalPluginToLexical/converter/defaultConverters.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,YAAY,CAAA;AAU5D,eAAO,MAAM,iBAAiB,EAAE,0BAA0B,EAQzD,CAAA"}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { HeadingConverter } from './converters/heading/converter.js';
|
|
2
|
-
import { LinkConverter } from './converters/link/converter.js';
|
|
3
|
-
import { ListConverter } from './converters/list/converter.js';
|
|
4
|
-
import { ListItemConverter } from './converters/listItem/converter.js';
|
|
5
|
-
import { QuoteConverter } from './converters/quote/converter.js';
|
|
6
|
-
import { UnknownConverter } from './converters/unknown/converter.js';
|
|
7
|
-
import { UploadConverter } from './converters/upload/converter.js';
|
|
8
|
-
export const defaultConverters = [HeadingConverter, LinkConverter, ListConverter, ListItemConverter, QuoteConverter, UnknownConverter, UploadConverter];
|
|
9
|
-
//# sourceMappingURL=defaultConverters.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"defaultConverters.js","names":["HeadingConverter","LinkConverter","ListConverter","ListItemConverter","QuoteConverter","UnknownConverter","UploadConverter","defaultConverters"],"sources":["../../../../../src/features/migrations/lexicalPluginToLexical/converter/defaultConverters.ts"],"sourcesContent":["import type { LexicalPluginNodeConverter } from './types.js'\n\nimport { HeadingConverter } from './converters/heading/converter.js'\nimport { LinkConverter } from './converters/link/converter.js'\nimport { ListConverter } from './converters/list/converter.js'\nimport { ListItemConverter } from './converters/listItem/converter.js'\nimport { QuoteConverter } from './converters/quote/converter.js'\nimport { UnknownConverter } from './converters/unknown/converter.js'\nimport { UploadConverter } from './converters/upload/converter.js'\n\nexport const defaultConverters: LexicalPluginNodeConverter[] = [\n HeadingConverter,\n LinkConverter,\n ListConverter,\n ListItemConverter,\n QuoteConverter,\n UnknownConverter,\n UploadConverter,\n]\n"],"mappings":"AAEA,SAASA,gBAAgB,QAAQ;AACjC,SAASC,aAAa,QAAQ;AAC9B,SAASC,aAAa,QAAQ;AAC9B,SAASC,iBAAiB,QAAQ;AAClC,SAASC,cAAc,QAAQ;AAC/B,SAASC,gBAAgB,QAAQ;AACjC,SAASC,eAAe,QAAQ;AAEhC,OAAO,MAAMC,iBAAA,GAAkD,CAC7DP,gBAAA,EACAC,aAAA,EACAC,aAAA,EACAC,iBAAA,EACAC,cAAA,EACAC,gBAAA,EACAC,eAAA,CACD","ignoreList":[]}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import type { SerializedEditorState, SerializedLexicalNode, SerializedParagraphNode, SerializedTextNode } from 'lexical';
|
|
2
|
-
import type { LexicalPluginNodeConverter, PayloadPluginLexicalData } from './types.js';
|
|
3
|
-
export declare function convertLexicalPluginToLexical({ converters, lexicalPluginData, quiet, }: {
|
|
4
|
-
converters: LexicalPluginNodeConverter[];
|
|
5
|
-
lexicalPluginData: PayloadPluginLexicalData;
|
|
6
|
-
quiet?: boolean;
|
|
7
|
-
}): SerializedEditorState;
|
|
8
|
-
export declare function convertLexicalPluginNodesToLexical({ converters, lexicalPluginNodes, parentNodeType, quiet, }: {
|
|
9
|
-
converters: LexicalPluginNodeConverter[];
|
|
10
|
-
lexicalPluginNodes: SerializedLexicalNode[] | undefined;
|
|
11
|
-
/**
|
|
12
|
-
* Type of the parent lexical node (not the type of the original, parent payload-plugin-lexical type)
|
|
13
|
-
*/
|
|
14
|
-
parentNodeType: string;
|
|
15
|
-
quiet?: boolean;
|
|
16
|
-
}): SerializedLexicalNode[];
|
|
17
|
-
export declare function convertParagraphNode(converters: LexicalPluginNodeConverter[], node: SerializedLexicalNode, quiet?: boolean): SerializedParagraphNode;
|
|
18
|
-
export declare function convertTextNode(node: SerializedLexicalNode): SerializedTextNode;
|
|
19
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/features/migrations/lexicalPluginToLexical/converter/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,qBAAqB,EACrB,qBAAqB,EACrB,uBAAuB,EACvB,kBAAkB,EACnB,MAAM,SAAS,CAAA;AAEhB,OAAO,KAAK,EAAE,0BAA0B,EAAE,wBAAwB,EAAE,MAAM,YAAY,CAAA;AAEtF,wBAAgB,6BAA6B,CAAC,EAC5C,UAAU,EACV,iBAAiB,EACjB,KAAK,GACN,EAAE;IACD,UAAU,EAAE,0BAA0B,EAAE,CAAA;IACxC,iBAAiB,EAAE,wBAAwB,CAAA;IAC3C,KAAK,CAAC,EAAE,OAAO,CAAA;CAChB,GAAG,qBAAqB,CAgBxB;AAED,wBAAgB,kCAAkC,CAAC,EACjD,UAAU,EACV,kBAAkB,EAClB,cAAc,EACd,KAAK,GACN,EAAE;IACD,UAAU,EAAE,0BAA0B,EAAE,CAAA;IACxC,kBAAkB,EAAE,qBAAqB,EAAE,GAAG,SAAS,CAAA;IACvD;;OAEG;IACH,cAAc,EAAE,MAAM,CAAA;IACtB,KAAK,CAAC,EAAE,OAAO,CAAA;CAChB,GAAG,qBAAqB,EAAE,CA4C1B;AAED,wBAAgB,oBAAoB,CAClC,UAAU,EAAE,0BAA0B,EAAE,EACxC,IAAI,EAAE,qBAAqB,EAC3B,KAAK,CAAC,EAAE,OAAO,GACd,uBAAuB,CAazB;AACD,wBAAgB,eAAe,CAAC,IAAI,EAAE,qBAAqB,GAAG,kBAAkB,CAE/E"}
|
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
export function convertLexicalPluginToLexical({
|
|
2
|
-
converters,
|
|
3
|
-
lexicalPluginData,
|
|
4
|
-
quiet
|
|
5
|
-
}) {
|
|
6
|
-
return {
|
|
7
|
-
root: {
|
|
8
|
-
type: 'root',
|
|
9
|
-
children: convertLexicalPluginNodesToLexical({
|
|
10
|
-
converters,
|
|
11
|
-
lexicalPluginNodes: lexicalPluginData?.jsonContent?.root?.children || [],
|
|
12
|
-
parentNodeType: 'root',
|
|
13
|
-
quiet
|
|
14
|
-
}),
|
|
15
|
-
direction: lexicalPluginData?.jsonContent?.root?.direction || 'ltr',
|
|
16
|
-
format: lexicalPluginData?.jsonContent?.root?.format || '',
|
|
17
|
-
indent: lexicalPluginData?.jsonContent?.root?.indent || 0,
|
|
18
|
-
version: 1
|
|
19
|
-
}
|
|
20
|
-
};
|
|
21
|
-
}
|
|
22
|
-
export function convertLexicalPluginNodesToLexical({
|
|
23
|
-
converters,
|
|
24
|
-
lexicalPluginNodes,
|
|
25
|
-
parentNodeType,
|
|
26
|
-
quiet
|
|
27
|
-
}) {
|
|
28
|
-
if (!lexicalPluginNodes?.length || !converters?.length) {
|
|
29
|
-
return [];
|
|
30
|
-
}
|
|
31
|
-
const unknownConverter = converters.find(converter => converter.nodeTypes.includes('unknown'));
|
|
32
|
-
// @ts-expect-error - vestiges of the migration to strict mode. Probably not important enough in this file to fix
|
|
33
|
-
return lexicalPluginNodes.map((lexicalPluginNode, i) => {
|
|
34
|
-
if (lexicalPluginNode.type === 'paragraph') {
|
|
35
|
-
return convertParagraphNode(converters, lexicalPluginNode, quiet);
|
|
36
|
-
}
|
|
37
|
-
if (lexicalPluginNode.type === 'text' || !lexicalPluginNode.type) {
|
|
38
|
-
return convertTextNode(lexicalPluginNode);
|
|
39
|
-
}
|
|
40
|
-
const converter = converters.find(converter => converter.nodeTypes.includes(lexicalPluginNode.type));
|
|
41
|
-
if (converter) {
|
|
42
|
-
return converter.converter({
|
|
43
|
-
childIndex: i,
|
|
44
|
-
converters,
|
|
45
|
-
lexicalPluginNode,
|
|
46
|
-
parentNodeType,
|
|
47
|
-
quiet
|
|
48
|
-
});
|
|
49
|
-
}
|
|
50
|
-
if (!quiet) {
|
|
51
|
-
console.warn('lexicalPluginToLexical > No converter found for node type: ' + lexicalPluginNode.type);
|
|
52
|
-
}
|
|
53
|
-
return unknownConverter?.converter({
|
|
54
|
-
childIndex: i,
|
|
55
|
-
converters,
|
|
56
|
-
lexicalPluginNode,
|
|
57
|
-
parentNodeType,
|
|
58
|
-
quiet
|
|
59
|
-
});
|
|
60
|
-
}) || [];
|
|
61
|
-
}
|
|
62
|
-
export function convertParagraphNode(converters, node, quiet) {
|
|
63
|
-
return {
|
|
64
|
-
...node,
|
|
65
|
-
type: 'paragraph',
|
|
66
|
-
children: convertLexicalPluginNodesToLexical({
|
|
67
|
-
converters,
|
|
68
|
-
lexicalPluginNodes: node.children || [],
|
|
69
|
-
parentNodeType: 'paragraph',
|
|
70
|
-
quiet
|
|
71
|
-
}),
|
|
72
|
-
version: 1
|
|
73
|
-
};
|
|
74
|
-
}
|
|
75
|
-
export function convertTextNode(node) {
|
|
76
|
-
return node;
|
|
77
|
-
}
|
|
78
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["convertLexicalPluginToLexical","converters","lexicalPluginData","quiet","root","type","children","convertLexicalPluginNodesToLexical","lexicalPluginNodes","jsonContent","parentNodeType","direction","format","indent","version","length","unknownConverter","find","converter","nodeTypes","includes","map","lexicalPluginNode","i","convertParagraphNode","convertTextNode","childIndex","console","warn","node"],"sources":["../../../../../src/features/migrations/lexicalPluginToLexical/converter/index.ts"],"sourcesContent":["import type {\n SerializedEditorState,\n SerializedLexicalNode,\n SerializedParagraphNode,\n SerializedTextNode,\n} from 'lexical'\n\nimport type { LexicalPluginNodeConverter, PayloadPluginLexicalData } from './types.js'\n\nexport function convertLexicalPluginToLexical({\n converters,\n lexicalPluginData,\n quiet,\n}: {\n converters: LexicalPluginNodeConverter[]\n lexicalPluginData: PayloadPluginLexicalData\n quiet?: boolean\n}): SerializedEditorState {\n return {\n root: {\n type: 'root',\n children: convertLexicalPluginNodesToLexical({\n converters,\n lexicalPluginNodes: lexicalPluginData?.jsonContent?.root?.children || [],\n parentNodeType: 'root',\n quiet,\n }),\n direction: lexicalPluginData?.jsonContent?.root?.direction || 'ltr',\n format: lexicalPluginData?.jsonContent?.root?.format || '',\n indent: lexicalPluginData?.jsonContent?.root?.indent || 0,\n version: 1,\n },\n }\n}\n\nexport function convertLexicalPluginNodesToLexical({\n converters,\n lexicalPluginNodes,\n parentNodeType,\n quiet,\n}: {\n converters: LexicalPluginNodeConverter[]\n lexicalPluginNodes: SerializedLexicalNode[] | undefined\n /**\n * Type of the parent lexical node (not the type of the original, parent payload-plugin-lexical type)\n */\n parentNodeType: string\n quiet?: boolean\n}): SerializedLexicalNode[] {\n if (!lexicalPluginNodes?.length || !converters?.length) {\n return []\n }\n const unknownConverter = converters.find((converter) => converter.nodeTypes.includes('unknown'))\n // @ts-expect-error - vestiges of the migration to strict mode. Probably not important enough in this file to fix\n return (\n lexicalPluginNodes.map((lexicalPluginNode, i) => {\n if (lexicalPluginNode.type === 'paragraph') {\n return convertParagraphNode(converters, lexicalPluginNode, quiet)\n }\n if (lexicalPluginNode.type === 'text' || !lexicalPluginNode.type) {\n return convertTextNode(lexicalPluginNode)\n }\n\n const converter = converters.find((converter) =>\n converter.nodeTypes.includes(lexicalPluginNode.type),\n )\n\n if (converter) {\n return converter.converter({\n childIndex: i,\n converters,\n lexicalPluginNode,\n parentNodeType,\n quiet,\n })\n }\n\n if (!quiet) {\n console.warn(\n 'lexicalPluginToLexical > No converter found for node type: ' + lexicalPluginNode.type,\n )\n }\n\n return unknownConverter?.converter({\n childIndex: i,\n converters,\n lexicalPluginNode,\n parentNodeType,\n quiet,\n })\n }) || []\n )\n}\n\nexport function convertParagraphNode(\n converters: LexicalPluginNodeConverter[],\n node: SerializedLexicalNode,\n quiet?: boolean,\n): SerializedParagraphNode {\n return {\n ...node,\n type: 'paragraph',\n\n children: convertLexicalPluginNodesToLexical({\n converters,\n lexicalPluginNodes: (node as any).children || [],\n parentNodeType: 'paragraph',\n quiet,\n }),\n version: 1,\n } as SerializedParagraphNode\n}\nexport function convertTextNode(node: SerializedLexicalNode): SerializedTextNode {\n return node as SerializedTextNode\n}\n"],"mappings":"AASA,OAAO,SAASA,8BAA8B;EAC5CC,UAAU;EACVC,iBAAiB;EACjBC;AAAK,CAKN;EACC,OAAO;IACLC,IAAA,EAAM;MACJC,IAAA,EAAM;MACNC,QAAA,EAAUC,kCAAA,CAAmC;QAC3CN,UAAA;QACAO,kBAAA,EAAoBN,iBAAA,EAAmBO,WAAA,EAAaL,IAAA,EAAME,QAAA,IAAY,EAAE;QACxEI,cAAA,EAAgB;QAChBP;MACF;MACAQ,SAAA,EAAWT,iBAAA,EAAmBO,WAAA,EAAaL,IAAA,EAAMO,SAAA,IAAa;MAC9DC,MAAA,EAAQV,iBAAA,EAAmBO,WAAA,EAAaL,IAAA,EAAMQ,MAAA,IAAU;MACxDC,MAAA,EAAQX,iBAAA,EAAmBO,WAAA,EAAaL,IAAA,EAAMS,MAAA,IAAU;MACxDC,OAAA,EAAS;IACX;EACF;AACF;AAEA,OAAO,SAASP,mCAAmC;EACjDN,UAAU;EACVO,kBAAkB;EAClBE,cAAc;EACdP;AAAK,CASN;EACC,IAAI,CAACK,kBAAA,EAAoBO,MAAA,IAAU,CAACd,UAAA,EAAYc,MAAA,EAAQ;IACtD,OAAO,EAAE;EACX;EACA,MAAMC,gBAAA,GAAmBf,UAAA,CAAWgB,IAAI,CAAEC,SAAA,IAAcA,SAAA,CAAUC,SAAS,CAACC,QAAQ,CAAC;EACrF;EACA,OACEZ,kBAAA,CAAmBa,GAAG,CAAC,CAACC,iBAAA,EAAmBC,CAAA;IACzC,IAAID,iBAAA,CAAkBjB,IAAI,KAAK,aAAa;MAC1C,OAAOmB,oBAAA,CAAqBvB,UAAA,EAAYqB,iBAAA,EAAmBnB,KAAA;IAC7D;IACA,IAAImB,iBAAA,CAAkBjB,IAAI,KAAK,UAAU,CAACiB,iBAAA,CAAkBjB,IAAI,EAAE;MAChE,OAAOoB,eAAA,CAAgBH,iBAAA;IACzB;IAEA,MAAMJ,SAAA,GAAYjB,UAAA,CAAWgB,IAAI,CAAEC,SAAA,IACjCA,SAAA,CAAUC,SAAS,CAACC,QAAQ,CAACE,iBAAA,CAAkBjB,IAAI;IAGrD,IAAIa,SAAA,EAAW;MACb,OAAOA,SAAA,CAAUA,SAAS,CAAC;QACzBQ,UAAA,EAAYH,CAAA;QACZtB,UAAA;QACAqB,iBAAA;QACAZ,cAAA;QACAP;MACF;IACF;IAEA,IAAI,CAACA,KAAA,EAAO;MACVwB,OAAA,CAAQC,IAAI,CACV,gEAAgEN,iBAAA,CAAkBjB,IAAI;IAE1F;IAEA,OAAOW,gBAAA,EAAkBE,SAAA,CAAU;MACjCQ,UAAA,EAAYH,CAAA;MACZtB,UAAA;MACAqB,iBAAA;MACAZ,cAAA;MACAP;IACF;EACF,MAAM,EAAE;AAEZ;AAEA,OAAO,SAASqB,qBACdvB,UAAwC,EACxC4B,IAA2B,EAC3B1B,KAAe;EAEf,OAAO;IACL,GAAG0B,IAAI;IACPxB,IAAA,EAAM;IAENC,QAAA,EAAUC,kCAAA,CAAmC;MAC3CN,UAAA;MACAO,kBAAA,EAAoBqB,IAAC,CAAavB,QAAQ,IAAI,EAAE;MAChDI,cAAA,EAAgB;MAChBP;IACF;IACAW,OAAA,EAAS;EACX;AACF;AACA,OAAO,SAASW,gBAAgBI,IAA2B;EACzD,OAAOA,IAAA;AACT","ignoreList":[]}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import type { SerializedEditorState, SerializedLexicalNode } from 'lexical';
|
|
2
|
-
export type LexicalPluginNodeConverter<T extends SerializedLexicalNode = SerializedLexicalNode> = {
|
|
3
|
-
converter: ({ childIndex, converters, lexicalPluginNode, parentNodeType, }: {
|
|
4
|
-
childIndex: number;
|
|
5
|
-
converters: LexicalPluginNodeConverter[];
|
|
6
|
-
lexicalPluginNode: {
|
|
7
|
-
children?: SerializedLexicalNode[];
|
|
8
|
-
} & SerializedLexicalNode;
|
|
9
|
-
parentNodeType: string;
|
|
10
|
-
quiet?: boolean;
|
|
11
|
-
}) => T;
|
|
12
|
-
nodeTypes: string[];
|
|
13
|
-
};
|
|
14
|
-
export type PayloadPluginLexicalData = {
|
|
15
|
-
characters: number;
|
|
16
|
-
comments: unknown[];
|
|
17
|
-
html?: string;
|
|
18
|
-
jsonContent: SerializedEditorState;
|
|
19
|
-
markdown?: string;
|
|
20
|
-
preview: string;
|
|
21
|
-
words: number;
|
|
22
|
-
};
|
|
23
|
-
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/features/migrations/lexicalPluginToLexical/converter/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAA;AAE3E,MAAM,MAAM,0BAA0B,CAAC,CAAC,SAAS,qBAAqB,GAAG,qBAAqB,IAAI;IAChG,SAAS,EAAE,CAAC,EACV,UAAU,EACV,UAAU,EACV,iBAAiB,EACjB,cAAc,GACf,EAAE;QACD,UAAU,EAAE,MAAM,CAAA;QAClB,UAAU,EAAE,0BAA0B,EAAE,CAAA;QACxC,iBAAiB,EAAE;YAAE,QAAQ,CAAC,EAAE,qBAAqB,EAAE,CAAA;SAAE,GAAG,qBAAqB,CAAA;QACjF,cAAc,EAAE,MAAM,CAAA;QACtB,KAAK,CAAC,EAAE,OAAO,CAAA;KAChB,KAAK,CAAC,CAAA;IACP,SAAS,EAAE,MAAM,EAAE,CAAA;CACpB,CAAA;AAED,MAAM,MAAM,wBAAwB,GAAG;IACrC,UAAU,EAAE,MAAM,CAAA;IAClB,QAAQ,EAAE,OAAO,EAAE,CAAA;IACnB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,WAAW,EAAE,qBAAqB,CAAA;IAClC,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,OAAO,EAAE,MAAM,CAAA;IACf,KAAK,EAAE,MAAM,CAAA;CACd,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","names":[],"sources":["../../../../../src/features/migrations/lexicalPluginToLexical/converter/types.ts"],"sourcesContent":["import type { SerializedEditorState, SerializedLexicalNode } from 'lexical'\n\nexport type LexicalPluginNodeConverter<T extends SerializedLexicalNode = SerializedLexicalNode> = {\n converter: ({\n childIndex,\n converters,\n lexicalPluginNode,\n parentNodeType,\n }: {\n childIndex: number\n converters: LexicalPluginNodeConverter[]\n lexicalPluginNode: { children?: SerializedLexicalNode[] } & SerializedLexicalNode\n parentNodeType: string\n quiet?: boolean\n }) => T\n nodeTypes: string[]\n}\n\nexport type PayloadPluginLexicalData = {\n characters: number\n comments: unknown[]\n html?: string\n jsonContent: SerializedEditorState\n markdown?: string\n preview: string\n words: number\n}\n"],"mappings":"AAkBA","ignoreList":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"feature.client.d.ts","sourceRoot":"","sources":["../../../../src/features/migrations/lexicalPluginToLexical/feature.client.tsx"],"names":[],"mappings":"AAKA,eAAO,MAAM,mCAAmC,oFAI9C,CAAA"}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
|
|
3
|
-
import { createClientFeature } from '../../../utilities/createClientFeature.js';
|
|
4
|
-
import { UnknownConvertedNode } from './nodes/unknownConvertedNode/index.js';
|
|
5
|
-
export const LexicalPluginToLexicalFeatureClient = createClientFeature(() => {
|
|
6
|
-
return {
|
|
7
|
-
nodes: [UnknownConvertedNode]
|
|
8
|
-
};
|
|
9
|
-
});
|
|
10
|
-
//# sourceMappingURL=feature.client.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"feature.client.js","names":["createClientFeature","UnknownConvertedNode","LexicalPluginToLexicalFeatureClient","nodes"],"sources":["../../../../src/features/migrations/lexicalPluginToLexical/feature.client.tsx"],"sourcesContent":["'use client'\n\nimport { createClientFeature } from '../../../utilities/createClientFeature.js'\nimport { UnknownConvertedNode } from './nodes/unknownConvertedNode/index.js'\n\nexport const LexicalPluginToLexicalFeatureClient = createClientFeature(() => {\n return {\n nodes: [UnknownConvertedNode],\n }\n})\n"],"mappings":"AAAA;;AAEA,SAASA,mBAAmB,QAAQ;AACpC,SAASC,oBAAoB,QAAQ;AAErC,OAAO,MAAMC,mCAAA,GAAsCF,mBAAA,CAAoB;EACrE,OAAO;IACLG,KAAA,EAAO,CAACF,oBAAA;EACV;AACF","ignoreList":[]}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import type { LexicalPluginNodeConverter } from './converter/types.js';
|
|
2
|
-
export type LexicalPluginToLexicalFeatureProps = {
|
|
3
|
-
converters?: (({ defaultConverters, }: {
|
|
4
|
-
defaultConverters: LexicalPluginNodeConverter[];
|
|
5
|
-
}) => LexicalPluginNodeConverter[]) | LexicalPluginNodeConverter[];
|
|
6
|
-
disableHooks?: boolean;
|
|
7
|
-
quiet?: boolean;
|
|
8
|
-
};
|
|
9
|
-
export declare const LexicalPluginToLexicalFeature: import("../../typesServer.js").FeatureProviderProviderServer<LexicalPluginToLexicalFeatureProps, LexicalPluginToLexicalFeatureProps, undefined>;
|
|
10
|
-
//# sourceMappingURL=feature.server.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"feature.server.d.ts","sourceRoot":"","sources":["../../../../src/features/migrations/lexicalPluginToLexical/feature.server.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,0BAA0B,EAA4B,MAAM,sBAAsB,CAAA;AAOhG,MAAM,MAAM,kCAAkC,GAAG;IAC/C,UAAU,CAAC,EACP,CAAC,CAAC,EACA,iBAAiB,GAClB,EAAE;QACD,iBAAiB,EAAE,0BAA0B,EAAE,CAAA;KAChD,KAAK,0BAA0B,EAAE,CAAC,GACnC,0BAA0B,EAAE,CAAA;IAChC,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB,KAAK,CAAC,EAAE,OAAO,CAAA;CAChB,CAAA;AAED,eAAO,MAAM,6BAA6B,iJAiDtC,CAAA"}
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
import { createServerFeature } from '../../../utilities/createServerFeature.js';
|
|
2
|
-
import { defaultConverters } from './converter/defaultConverters.js';
|
|
3
|
-
import { convertLexicalPluginToLexical } from './converter/index.js';
|
|
4
|
-
import { UnknownConvertedNode } from './nodes/unknownConvertedNode/index.js';
|
|
5
|
-
export const LexicalPluginToLexicalFeature = createServerFeature({
|
|
6
|
-
feature: ({
|
|
7
|
-
props
|
|
8
|
-
}) => {
|
|
9
|
-
if (!props) {
|
|
10
|
-
props = {};
|
|
11
|
-
}
|
|
12
|
-
let converters = [];
|
|
13
|
-
if (props?.converters && typeof props?.converters === 'function') {
|
|
14
|
-
converters = props.converters({
|
|
15
|
-
defaultConverters
|
|
16
|
-
});
|
|
17
|
-
} else if (props.converters && typeof props?.converters !== 'function') {
|
|
18
|
-
converters = props.converters;
|
|
19
|
-
} else {
|
|
20
|
-
converters = defaultConverters;
|
|
21
|
-
}
|
|
22
|
-
props.converters = converters;
|
|
23
|
-
return {
|
|
24
|
-
ClientFeature: '@payloadcms/richtext-lexical/client#LexicalPluginToLexicalFeatureClient',
|
|
25
|
-
hooks: props.disableHooks ? undefined : {
|
|
26
|
-
afterRead: [({
|
|
27
|
-
value
|
|
28
|
-
}) => {
|
|
29
|
-
if (!value || !('jsonContent' in value)) {
|
|
30
|
-
// incomingEditorState null or not from Lexical Plugin
|
|
31
|
-
return value;
|
|
32
|
-
}
|
|
33
|
-
// Lexical Plugin => convert to lexical
|
|
34
|
-
return convertLexicalPluginToLexical({
|
|
35
|
-
converters: props.converters,
|
|
36
|
-
lexicalPluginData: value,
|
|
37
|
-
quiet: props?.quiet
|
|
38
|
-
});
|
|
39
|
-
}]
|
|
40
|
-
},
|
|
41
|
-
nodes: [{
|
|
42
|
-
node: UnknownConvertedNode
|
|
43
|
-
}],
|
|
44
|
-
sanitizedServerFeatureProps: props
|
|
45
|
-
};
|
|
46
|
-
},
|
|
47
|
-
key: 'lexicalPluginToLexical'
|
|
48
|
-
});
|
|
49
|
-
//# sourceMappingURL=feature.server.js.map
|