@payloadcms/richtext-lexical 3.84.0 → 4.0.0-internal.38b7f1d
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-PJW7KUJG.js +2 -0
- package/dist/exports/client/Field-PJW7KUJG.js.map +7 -0
- package/dist/exports/client/RelationshipComponent-5RONAYJM.js +2 -0
- package/dist/exports/client/RelationshipComponent-5RONAYJM.js.map +7 -0
- package/dist/exports/client/bundled.css +1 -1
- package/dist/exports/client/chunk-44G3K3W7.js +2 -0
- package/dist/exports/client/chunk-44G3K3W7.js.map +7 -0
- package/dist/exports/client/chunk-WSAPGI3Z.js +2 -0
- package/dist/exports/client/chunk-WSAPGI3Z.js.map +7 -0
- package/dist/exports/client/component-53Y3RYR5.js +2 -0
- package/dist/exports/client/component-53Y3RYR5.js.map +7 -0
- package/dist/exports/client/componentInline-PM4PLNUK.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 +30 -30
- package/dist/exports/client/index.js.map +4 -4
- package/dist/features/align/client/toolbarAlignGroup.d.ts.map +1 -1
- package/dist/features/align/client/toolbarAlignGroup.js +1 -0
- package/dist/features/align/client/toolbarAlignGroup.js.map +1 -1
- package/dist/features/blockquote/server/index.d.ts.map +1 -1
- package/dist/features/blockquote/server/index.js +0 -39
- package/dist/features/blockquote/server/index.js.map +1 -1
- package/dist/features/blocks/client/component/BlockContent.d.ts +10 -0
- package/dist/features/blocks/client/component/BlockContent.d.ts.map +1 -1
- package/dist/features/blocks/client/component/BlockContent.js.map +1 -1
- package/dist/features/blocks/client/component/index.css +178 -0
- package/dist/features/blocks/client/component/index.d.ts +1 -1
- package/dist/features/blocks/client/component/index.d.ts.map +1 -1
- package/dist/features/blocks/client/component/index.js +88 -16
- package/dist/features/blocks/client/component/index.js.map +1 -1
- package/dist/features/blocks/client/componentInline/index.css +85 -0
- package/dist/features/blocks/client/componentInline/index.d.ts +1 -1
- package/dist/features/blocks/client/componentInline/index.d.ts.map +1 -1
- package/dist/features/blocks/client/componentInline/index.js +29 -6
- package/dist/features/blocks/client/componentInline/index.js.map +1 -1
- package/dist/features/blocks/client/index.d.ts.map +1 -1
- package/dist/features/blocks/client/index.js +0 -2
- package/dist/features/blocks/client/index.js.map +1 -1
- package/dist/features/blocks/premade/CodeBlock/Component/Block.d.ts +1 -1
- package/dist/features/blocks/premade/CodeBlock/Component/Block.d.ts.map +1 -1
- package/dist/features/blocks/premade/CodeBlock/Component/Block.js +3 -0
- package/dist/features/blocks/premade/CodeBlock/Component/Block.js.map +1 -1
- package/dist/features/blocks/premade/CodeBlock/Component/Collapse/index.css +26 -0
- package/dist/features/blocks/premade/CodeBlock/Component/Collapse/index.d.ts +1 -1
- package/dist/features/blocks/premade/CodeBlock/Component/Collapse/index.d.ts.map +1 -1
- package/dist/features/blocks/premade/CodeBlock/Component/Collapse/index.js +4 -1
- package/dist/features/blocks/premade/CodeBlock/Component/Collapse/index.js.map +1 -1
- package/dist/features/blocks/premade/CodeBlock/Component/FloatingCollapse/index.css +40 -0
- package/dist/features/blocks/premade/CodeBlock/Component/FloatingCollapse/index.d.ts +1 -1
- package/dist/features/blocks/premade/CodeBlock/Component/FloatingCollapse/index.d.ts.map +1 -1
- package/dist/features/blocks/premade/CodeBlock/Component/FloatingCollapse/index.js +7 -8
- package/dist/features/blocks/premade/CodeBlock/Component/FloatingCollapse/index.js.map +1 -1
- package/dist/features/blocks/premade/CodeBlock/Component/index.css +171 -0
- package/dist/features/debug/jsxConverter/client/plugin/index.d.ts +1 -1
- package/dist/features/debug/jsxConverter/client/plugin/index.d.ts.map +1 -1
- package/dist/features/debug/jsxConverter/client/plugin/index.js +1 -0
- package/dist/features/debug/jsxConverter/client/plugin/index.js.map +1 -1
- package/dist/features/debug/jsxConverter/client/plugin/style.css +9 -0
- package/dist/features/debug/testRecorder/client/plugin/index.css +51 -0
- package/dist/features/debug/testRecorder/client/plugin/index.d.ts +1 -1
- package/dist/features/debug/testRecorder/client/plugin/index.d.ts.map +1 -1
- package/dist/features/debug/testRecorder/client/plugin/index.js +1 -0
- package/dist/features/debug/testRecorder/client/plugin/index.js.map +1 -1
- package/dist/features/debug/treeView/client/plugin/index.css +81 -0
- package/dist/features/debug/treeView/client/plugin/index.d.ts +1 -1
- package/dist/features/debug/treeView/client/plugin/index.d.ts.map +1 -1
- package/dist/features/debug/treeView/client/plugin/index.js +1 -0
- package/dist/features/debug/treeView/client/plugin/index.js.map +1 -1
- package/dist/features/experimental_table/client/plugins/TableActionMenuPlugin/index.css +91 -0
- package/dist/features/experimental_table/client/plugins/TableActionMenuPlugin/index.d.ts +1 -1
- package/dist/features/experimental_table/client/plugins/TableActionMenuPlugin/index.d.ts.map +1 -1
- package/dist/features/experimental_table/client/plugins/TableActionMenuPlugin/index.js +3 -2
- package/dist/features/experimental_table/client/plugins/TableActionMenuPlugin/index.js.map +1 -1
- package/dist/features/experimental_table/client/plugins/TableCellResizerPlugin/index.css +11 -0
- package/dist/features/experimental_table/client/plugins/TableCellResizerPlugin/index.d.ts +1 -1
- package/dist/features/experimental_table/client/plugins/TableCellResizerPlugin/index.d.ts.map +1 -1
- package/dist/features/experimental_table/client/plugins/TableCellResizerPlugin/index.js +1 -0
- package/dist/features/experimental_table/client/plugins/TableCellResizerPlugin/index.js.map +1 -1
- package/dist/features/experimental_table/client/plugins/TableHoverActionsPlugin/index.js +1 -1
- package/dist/features/experimental_table/client/plugins/TableHoverActionsPlugin/index.js.map +1 -1
- package/dist/features/experimental_table/client/plugins/TablePlugin/TableGridPopup/index.css +166 -0
- package/dist/features/experimental_table/client/plugins/TablePlugin/TableGridPopup/index.d.ts +17 -0
- package/dist/features/experimental_table/client/plugins/TablePlugin/TableGridPopup/index.d.ts.map +1 -0
- package/dist/features/experimental_table/client/plugins/TablePlugin/TableGridPopup/index.js +219 -0
- package/dist/features/experimental_table/client/plugins/TablePlugin/TableGridPopup/index.js.map +1 -0
- package/dist/features/experimental_table/client/plugins/TablePlugin/index.css +235 -0
- package/dist/features/experimental_table/client/plugins/TablePlugin/index.d.ts +1 -1
- package/dist/features/experimental_table/client/plugins/TablePlugin/index.d.ts.map +1 -1
- package/dist/features/experimental_table/client/plugins/TablePlugin/index.js +95 -104
- package/dist/features/experimental_table/client/plugins/TablePlugin/index.js.map +1 -1
- package/dist/features/experimental_table/server/index.d.ts.map +1 -1
- package/dist/features/experimental_table/server/index.js +0 -102
- package/dist/features/experimental_table/server/index.js.map +1 -1
- package/dist/features/heading/server/index.d.ts.map +1 -1
- package/dist/features/heading/server/index.js +0 -39
- package/dist/features/heading/server/index.js.map +1 -1
- package/dist/features/horizontalRule/client/plugin/index.css +25 -0
- package/dist/features/horizontalRule/client/plugin/index.d.ts +1 -1
- package/dist/features/horizontalRule/client/plugin/index.d.ts.map +1 -1
- package/dist/features/horizontalRule/client/plugin/index.js +73 -4
- package/dist/features/horizontalRule/client/plugin/index.js.map +1 -1
- package/dist/features/horizontalRule/server/index.d.ts.map +1 -1
- package/dist/features/horizontalRule/server/index.js +0 -8
- package/dist/features/horizontalRule/server/index.js.map +1 -1
- package/dist/features/link/client/plugins/floatingLinkEditor/LinkEditor/index.d.ts.map +1 -1
- package/dist/features/link/client/plugins/floatingLinkEditor/LinkEditor/index.js +28 -8
- package/dist/features/link/client/plugins/floatingLinkEditor/LinkEditor/index.js.map +1 -1
- package/dist/features/link/client/plugins/floatingLinkEditor/index.css +112 -0
- package/dist/features/link/client/plugins/floatingLinkEditor/index.d.ts +1 -1
- package/dist/features/link/client/plugins/floatingLinkEditor/index.d.ts.map +1 -1
- package/dist/features/link/client/plugins/floatingLinkEditor/index.js +1 -0
- package/dist/features/link/client/plugins/floatingLinkEditor/index.js.map +1 -1
- package/dist/features/link/server/index.d.ts.map +1 -1
- package/dist/features/link/server/index.js +0 -71
- package/dist/features/link/server/index.js.map +1 -1
- package/dist/features/lists/checklist/server/index.d.ts.map +1 -1
- package/dist/features/lists/checklist/server/index.js +0 -7
- package/dist/features/lists/checklist/server/index.js.map +1 -1
- package/dist/features/lists/orderedList/server/index.d.ts.map +1 -1
- package/dist/features/lists/orderedList/server/index.js +0 -7
- package/dist/features/lists/orderedList/server/index.js.map +1 -1
- package/dist/features/lists/unorderedList/server/index.d.ts.map +1 -1
- package/dist/features/lists/unorderedList/server/index.js +0 -7
- package/dist/features/lists/unorderedList/server/index.js.map +1 -1
- package/dist/features/relationship/client/components/RelationshipComponent.d.ts +1 -1
- package/dist/features/relationship/client/components/RelationshipComponent.d.ts.map +1 -1
- package/dist/features/relationship/client/components/RelationshipComponent.js +27 -2
- package/dist/features/relationship/client/components/RelationshipComponent.js.map +1 -1
- package/dist/features/relationship/client/components/index.css +112 -0
- package/dist/features/toolbars/fixed/client/Toolbar/index.css +87 -0
- package/dist/features/toolbars/fixed/client/Toolbar/index.d.ts +1 -1
- package/dist/features/toolbars/fixed/client/Toolbar/index.d.ts.map +1 -1
- package/dist/features/toolbars/fixed/client/Toolbar/index.js +1 -0
- package/dist/features/toolbars/fixed/client/Toolbar/index.js.map +1 -1
- package/dist/features/toolbars/inline/client/Toolbar/index.css +43 -0
- package/dist/features/toolbars/inline/client/Toolbar/index.d.ts +1 -1
- package/dist/features/toolbars/inline/client/Toolbar/index.d.ts.map +1 -1
- package/dist/features/toolbars/inline/client/Toolbar/index.js +1 -0
- package/dist/features/toolbars/inline/client/Toolbar/index.js.map +1 -1
- package/dist/features/toolbars/shared/ToolbarButton/index.css +57 -0
- package/dist/features/toolbars/shared/ToolbarButton/index.d.ts +1 -1
- package/dist/features/toolbars/shared/ToolbarButton/index.d.ts.map +1 -1
- package/dist/features/toolbars/shared/ToolbarButton/index.js +80 -74
- package/dist/features/toolbars/shared/ToolbarButton/index.js.map +1 -1
- package/dist/features/toolbars/shared/ToolbarDropdown/DropDown.d.ts.map +1 -1
- package/dist/features/toolbars/shared/ToolbarDropdown/DropDown.js +4 -0
- package/dist/features/toolbars/shared/ToolbarDropdown/DropDown.js.map +1 -1
- package/dist/features/toolbars/shared/ToolbarDropdown/index.css +214 -0
- package/dist/features/toolbars/shared/ToolbarDropdown/index.d.ts +1 -1
- package/dist/features/toolbars/shared/ToolbarDropdown/index.d.ts.map +1 -1
- package/dist/features/toolbars/shared/ToolbarDropdown/index.js +11 -7
- package/dist/features/toolbars/shared/ToolbarDropdown/index.js.map +1 -1
- package/dist/features/toolbars/types.d.ts +4 -0
- package/dist/features/toolbars/types.d.ts.map +1 -1
- package/dist/features/toolbars/types.js.map +1 -1
- package/dist/features/typesServer.d.ts +0 -17
- package/dist/features/typesServer.d.ts.map +1 -1
- package/dist/features/typesServer.js.map +1 -1
- package/dist/features/upload/client/component/index.css +218 -0
- package/dist/features/upload/client/component/index.d.ts +1 -1
- package/dist/features/upload/client/component/index.d.ts.map +1 -1
- package/dist/features/upload/client/component/index.js +86 -63
- package/dist/features/upload/client/component/index.js.map +1 -1
- package/dist/features/upload/client/component/pending/index.d.ts +0 -1
- package/dist/features/upload/client/component/pending/index.d.ts.map +1 -1
- package/dist/features/upload/client/component/pending/index.js.map +1 -1
- package/dist/features/upload/server/index.d.ts.map +1 -1
- package/dist/features/upload/server/index.js +0 -78
- package/dist/features/upload/server/index.js.map +1 -1
- package/dist/field/Diff/converters/listitem/index.css +44 -0
- package/dist/field/Diff/converters/listitem/index.d.ts +1 -1
- package/dist/field/Diff/converters/listitem/index.d.ts.map +1 -1
- package/dist/field/Diff/converters/listitem/index.js +1 -0
- package/dist/field/Diff/converters/listitem/index.js.map +1 -1
- package/dist/field/Diff/converters/relationship/index.css +68 -0
- package/dist/field/Diff/converters/relationship/index.d.ts +1 -1
- package/dist/field/Diff/converters/relationship/index.d.ts.map +1 -1
- package/dist/field/Diff/converters/relationship/index.js +1 -0
- package/dist/field/Diff/converters/relationship/index.js.map +1 -1
- package/dist/field/Diff/converters/unknown/index.css +37 -0
- package/dist/field/Diff/converters/unknown/index.d.ts +1 -1
- package/dist/field/Diff/converters/unknown/index.d.ts.map +1 -1
- package/dist/field/Diff/converters/unknown/index.js +1 -0
- package/dist/field/Diff/converters/unknown/index.js.map +1 -1
- package/dist/field/Diff/converters/upload/index.css +112 -0
- package/dist/field/Diff/converters/upload/index.d.ts +1 -1
- package/dist/field/Diff/converters/upload/index.d.ts.map +1 -1
- package/dist/field/Diff/converters/upload/index.js +1 -0
- package/dist/field/Diff/converters/upload/index.js.map +1 -1
- package/dist/field/Diff/index.css +101 -0
- package/dist/field/Diff/index.d.ts +1 -1
- package/dist/field/Diff/index.d.ts.map +1 -1
- package/dist/field/Diff/index.js +1 -0
- package/dist/field/Diff/index.js.map +1 -1
- package/dist/field/Field.d.ts +2 -2
- package/dist/field/Field.d.ts.map +1 -1
- package/dist/field/Field.js +11 -9
- package/dist/field/Field.js.map +1 -1
- package/dist/field/ViewSelector.css +32 -0
- package/dist/field/ViewSelector.d.ts +1 -1
- package/dist/field/ViewSelector.d.ts.map +1 -1
- package/dist/field/ViewSelector.js +1 -0
- package/dist/field/ViewSelector.js.map +1 -1
- package/dist/field/bundled.css +1 -1
- package/dist/field/index.css +60 -0
- package/dist/index.d.ts +0 -10
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +11 -10
- package/dist/index.js.map +1 -1
- package/dist/lexical/LexicalEditor.css +50 -0
- package/dist/lexical/LexicalEditor.d.ts +1 -1
- package/dist/lexical/LexicalEditor.d.ts.map +1 -1
- package/dist/lexical/LexicalEditor.js +1 -0
- package/dist/lexical/LexicalEditor.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/config/server/sanitize.d.ts.map +1 -1
- package/dist/lexical/config/server/sanitize.js +0 -6
- package/dist/lexical/config/server/sanitize.js.map +1 -1
- package/dist/lexical/plugins/DecoratorPlugin/index.css +11 -0
- package/dist/lexical/plugins/DecoratorPlugin/index.d.ts +1 -1
- package/dist/lexical/plugins/DecoratorPlugin/index.d.ts.map +1 -1
- package/dist/lexical/plugins/DecoratorPlugin/index.js +1 -0
- package/dist/lexical/plugins/DecoratorPlugin/index.js.map +1 -1
- package/dist/lexical/plugins/InsertParagraphAtEnd/index.css +52 -0
- package/dist/lexical/plugins/InsertParagraphAtEnd/index.d.ts +1 -1
- package/dist/lexical/plugins/InsertParagraphAtEnd/index.d.ts.map +1 -1
- package/dist/lexical/plugins/InsertParagraphAtEnd/index.js +1 -0
- package/dist/lexical/plugins/InsertParagraphAtEnd/index.js.map +1 -1
- package/dist/lexical/plugins/SlashMenu/index.css +65 -0
- package/dist/lexical/plugins/SlashMenu/index.d.ts +1 -1
- package/dist/lexical/plugins/SlashMenu/index.d.ts.map +1 -1
- package/dist/lexical/plugins/SlashMenu/index.js +2 -0
- package/dist/lexical/plugins/SlashMenu/index.js.map +1 -1
- package/dist/lexical/plugins/handles/AddBlockHandlePlugin/index.css +40 -0
- package/dist/lexical/plugins/handles/AddBlockHandlePlugin/index.d.ts +1 -1
- package/dist/lexical/plugins/handles/AddBlockHandlePlugin/index.d.ts.map +1 -1
- package/dist/lexical/plugins/handles/AddBlockHandlePlugin/index.js +1 -0
- package/dist/lexical/plugins/handles/AddBlockHandlePlugin/index.js.map +1 -1
- package/dist/lexical/plugins/handles/DraggableBlockPlugin/index.css +84 -0
- package/dist/lexical/plugins/handles/DraggableBlockPlugin/index.d.ts +1 -1
- package/dist/lexical/plugins/handles/DraggableBlockPlugin/index.d.ts.map +1 -1
- package/dist/lexical/plugins/handles/DraggableBlockPlugin/index.js +15 -8
- package/dist/lexical/plugins/handles/DraggableBlockPlugin/index.js.map +1 -1
- package/dist/lexical/plugins/handles/DraggableBlockPlugin/setTargetLine.js +1 -1
- package/dist/lexical/plugins/handles/DraggableBlockPlugin/setTargetLine.js.map +1 -1
- package/dist/lexical/theme/EditorTheme.css +359 -0
- package/dist/lexical/theme/EditorTheme.d.ts.map +1 -1
- package/dist/lexical/theme/EditorTheme.js +1 -0
- package/dist/lexical/theme/EditorTheme.js.map +1 -1
- package/dist/lexical/ui/ContentEditable.css +95 -0
- package/dist/lexical/ui/ContentEditable.d.ts +1 -1
- package/dist/lexical/ui/ContentEditable.d.ts.map +1 -1
- package/dist/lexical/ui/ContentEditable.js +1 -0
- package/dist/lexical/ui/ContentEditable.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/Page/index.d.ts +5 -0
- package/dist/lexical/ui/icons/Page/index.d.ts.map +1 -0
- package/dist/lexical/ui/icons/Page/index.js +21 -0
- package/dist/lexical/ui/icons/Page/index.js.map +1 -0
- 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/Trash/index.d.ts +10 -0
- package/dist/lexical/ui/icons/Trash/index.d.ts.map +1 -0
- package/dist/lexical/ui/icons/Trash/index.js +29 -0
- package/dist/lexical/ui/icons/Trash/index.js.map +1 -0
- 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/dist/utilities/fieldsDrawer/useLexicalDocumentDrawer.d.ts +1 -0
- package/dist/utilities/fieldsDrawer/useLexicalDocumentDrawer.d.ts.map +1 -1
- package/dist/utilities/fieldsDrawer/useLexicalDocumentDrawer.js +34 -18
- package/dist/utilities/fieldsDrawer/useLexicalDocumentDrawer.js.map +1 -1
- package/package.json +11 -16
- 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 +0 -2
- package/dist/exports/client/Field-4UEGQMIN.js.map +0 -7
- package/dist/exports/client/RelationshipComponent-BG3DPV3T.js +0 -2
- package/dist/exports/client/RelationshipComponent-BG3DPV3T.js.map +0 -7
- package/dist/exports/client/chunk-F26IQ5RE.js +0 -2
- package/dist/exports/client/chunk-F26IQ5RE.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/component-XIHC3W6W.js +0 -2
- package/dist/exports/client/component-XIHC3W6W.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/converters/lexicalToHtml_deprecated/converter/converters/linebreak.d.ts +0 -4
- package/dist/features/converters/lexicalToHtml_deprecated/converter/converters/linebreak.d.ts.map +0 -1
- package/dist/features/converters/lexicalToHtml_deprecated/converter/converters/linebreak.js +0 -7
- package/dist/features/converters/lexicalToHtml_deprecated/converter/converters/linebreak.js.map +0 -1
- package/dist/features/converters/lexicalToHtml_deprecated/converter/converters/paragraph.d.ts +0 -4
- package/dist/features/converters/lexicalToHtml_deprecated/converter/converters/paragraph.d.ts.map +0 -1
- package/dist/features/converters/lexicalToHtml_deprecated/converter/converters/paragraph.js +0 -38
- package/dist/features/converters/lexicalToHtml_deprecated/converter/converters/paragraph.js.map +0 -1
- package/dist/features/converters/lexicalToHtml_deprecated/converter/converters/tab.d.ts +0 -4
- package/dist/features/converters/lexicalToHtml_deprecated/converter/converters/tab.d.ts.map +0 -1
- package/dist/features/converters/lexicalToHtml_deprecated/converter/converters/tab.js +0 -9
- package/dist/features/converters/lexicalToHtml_deprecated/converter/converters/tab.js.map +0 -1
- package/dist/features/converters/lexicalToHtml_deprecated/converter/converters/text.d.ts +0 -4
- package/dist/features/converters/lexicalToHtml_deprecated/converter/converters/text.d.ts.map +0 -1
- package/dist/features/converters/lexicalToHtml_deprecated/converter/converters/text.js +0 -33
- package/dist/features/converters/lexicalToHtml_deprecated/converter/converters/text.js.map +0 -1
- package/dist/features/converters/lexicalToHtml_deprecated/converter/defaultConverters.d.ts +0 -6
- package/dist/features/converters/lexicalToHtml_deprecated/converter/defaultConverters.d.ts.map +0 -1
- package/dist/features/converters/lexicalToHtml_deprecated/converter/defaultConverters.js +0 -9
- package/dist/features/converters/lexicalToHtml_deprecated/converter/defaultConverters.js.map +0 -1
- package/dist/features/converters/lexicalToHtml_deprecated/converter/index.d.ts +0 -70
- package/dist/features/converters/lexicalToHtml_deprecated/converter/index.d.ts.map +0 -1
- package/dist/features/converters/lexicalToHtml_deprecated/converter/index.js +0 -104
- package/dist/features/converters/lexicalToHtml_deprecated/converter/index.js.map +0 -1
- package/dist/features/converters/lexicalToHtml_deprecated/converter/types.d.ts +0 -27
- package/dist/features/converters/lexicalToHtml_deprecated/converter/types.d.ts.map +0 -1
- package/dist/features/converters/lexicalToHtml_deprecated/converter/types.js +0 -2
- package/dist/features/converters/lexicalToHtml_deprecated/converter/types.js.map +0 -1
- package/dist/features/converters/lexicalToHtml_deprecated/field/index.d.ts +0 -39
- package/dist/features/converters/lexicalToHtml_deprecated/field/index.d.ts.map +0 -1
- package/dist/features/converters/lexicalToHtml_deprecated/field/index.js +0 -122
- package/dist/features/converters/lexicalToHtml_deprecated/field/index.js.map +0 -1
- package/dist/features/converters/lexicalToHtml_deprecated/index.d.ts +0 -12
- package/dist/features/converters/lexicalToHtml_deprecated/index.d.ts.map +0 -1
- package/dist/features/converters/lexicalToHtml_deprecated/index.js +0 -11
- package/dist/features/converters/lexicalToHtml_deprecated/index.js.map +0 -1
- package/dist/features/lists/htmlConverter.d.ts +0 -5
- package/dist/features/lists/htmlConverter.d.ts.map +0 -1
- package/dist/features/lists/htmlConverter.js +0 -81
- package/dist/features/lists/htmlConverter.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-PM4PLNUK.js.map} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"toolbarAlignGroup.d.ts","sourceRoot":"","sources":["../../../../src/features/align/client/toolbarAlignGroup.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAA;AAI7E,eAAO,MAAM,0BAA0B,UAAW,gBAAgB,EAAE,KAAG,
|
|
1
|
+
{"version":3,"file":"toolbarAlignGroup.d.ts","sourceRoot":"","sources":["../../../../src/features/align/client/toolbarAlignGroup.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAA;AAI7E,eAAO,MAAM,0BAA0B,UAAW,gBAAgB,EAAE,KAAG,YAStE,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"toolbarAlignGroup.js","names":["AlignLeftIcon","toolbarAlignGroupWithItems","items","type","ChildComponent","key","order"],"sources":["../../../../src/features/align/client/toolbarAlignGroup.ts"],"sourcesContent":["'use client'\nimport type { ToolbarGroup, ToolbarGroupItem } from '../../toolbars/types.js'\n\nimport { AlignLeftIcon } from '../../../lexical/ui/icons/AlignLeft/index.js'\n\nexport const toolbarAlignGroupWithItems = (items: ToolbarGroupItem[]): ToolbarGroup => {\n return {\n type: 'dropdown',\n ChildComponent: AlignLeftIcon,\n items,\n key: 'align',\n order: 30,\n }\n}\n"],"mappings":"AAAA;;AAGA,SAASA,aAAa,QAAQ;AAE9B,OAAO,MAAMC,0BAAA,GAA8BC,KAAA;EACzC,OAAO;IACLC,IAAA,EAAM;IACNC,cAAA,EAAgBJ,aAAA;
|
|
1
|
+
{"version":3,"file":"toolbarAlignGroup.js","names":["AlignLeftIcon","toolbarAlignGroupWithItems","items","type","ChildComponent","iconOnly","key","order"],"sources":["../../../../src/features/align/client/toolbarAlignGroup.ts"],"sourcesContent":["'use client'\nimport type { ToolbarGroup, ToolbarGroupItem } from '../../toolbars/types.js'\n\nimport { AlignLeftIcon } from '../../../lexical/ui/icons/AlignLeft/index.js'\n\nexport const toolbarAlignGroupWithItems = (items: ToolbarGroupItem[]): ToolbarGroup => {\n return {\n type: 'dropdown',\n ChildComponent: AlignLeftIcon,\n iconOnly: true,\n items,\n key: 'align',\n order: 30,\n }\n}\n"],"mappings":"AAAA;;AAGA,SAASA,aAAa,QAAQ;AAE9B,OAAO,MAAMC,0BAAA,GAA8BC,KAAA;EACzC,OAAO;IACLC,IAAA,EAAM;IACNC,cAAA,EAAgBJ,aAAA;IAChBK,QAAA,EAAU;IACVH,KAAA;IACAI,GAAA,EAAK;IACLC,KAAA,EAAO;EACT;AACF","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/features/blockquote/server/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,IAAI,oBAAoB,EAAE,MAAM,oBAAoB,CAAA;AACrF,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAA;AAIpD,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,uBAAuB,CAAA;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/features/blockquote/server/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,IAAI,oBAAoB,EAAE,MAAM,oBAAoB,CAAA;AACrF,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAA;AAIpD,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,uBAAuB,CAAA;AAOrE,MAAM,MAAM,mBAAmB,CAAC,CAAC,SAAS,qBAAqB,GAAG,qBAAqB,IACrF,wBAAwB,CAAC,oBAAoB,EAAE,OAAO,EAAE,CAAC,CAAC,CAAA;AAE5D,eAAO,MAAM,iBAAiB,0FAa5B,CAAA"}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { QuoteNode } from '@lexical/rich-text';
|
|
2
2
|
import { createServerFeature } from '../../../utilities/createServerFeature.js';
|
|
3
|
-
import { convertLexicalNodesToHTML } from '../../converters/lexicalToHtml_deprecated/converter/index.js';
|
|
4
3
|
import { createNode } from '../../typeUtilities.js';
|
|
5
4
|
import { MarkdownTransformer } from '../markdownTransformer.js';
|
|
6
5
|
import { i18n } from './i18n.js';
|
|
@@ -11,44 +10,6 @@ export const BlockquoteFeature = createServerFeature({
|
|
|
11
10
|
i18n,
|
|
12
11
|
markdownTransformers: [MarkdownTransformer],
|
|
13
12
|
nodes: [createNode({
|
|
14
|
-
converters: {
|
|
15
|
-
html: {
|
|
16
|
-
converter: async ({
|
|
17
|
-
converters,
|
|
18
|
-
currentDepth,
|
|
19
|
-
depth,
|
|
20
|
-
draft,
|
|
21
|
-
node,
|
|
22
|
-
overrideAccess,
|
|
23
|
-
parent,
|
|
24
|
-
req,
|
|
25
|
-
showHiddenFields
|
|
26
|
-
}) => {
|
|
27
|
-
const childrenText = await convertLexicalNodesToHTML({
|
|
28
|
-
converters,
|
|
29
|
-
currentDepth,
|
|
30
|
-
depth,
|
|
31
|
-
draft,
|
|
32
|
-
lexicalNodes: node.children,
|
|
33
|
-
overrideAccess,
|
|
34
|
-
parent: {
|
|
35
|
-
...node,
|
|
36
|
-
parent
|
|
37
|
-
},
|
|
38
|
-
req,
|
|
39
|
-
showHiddenFields
|
|
40
|
-
});
|
|
41
|
-
const style = [node.format ? `text-align: ${node.format};` : '',
|
|
42
|
-
// the unit should be px. Do not change it to rem, em, or something else.
|
|
43
|
-
// The quantity should be 40px. Do not change it either.
|
|
44
|
-
// See rationale in
|
|
45
|
-
// https://github.com/payloadcms/payload/issues/13130#issuecomment-3058348085
|
|
46
|
-
node.indent > 0 ? `padding-inline-start: ${node.indent * 40}px;` : ''].filter(Boolean).join(' ');
|
|
47
|
-
return `<blockquote${style ? ` style='${style}'` : ''}>${childrenText}</blockquote>`;
|
|
48
|
-
},
|
|
49
|
-
nodeTypes: [QuoteNode.getType()]
|
|
50
|
-
}
|
|
51
|
-
},
|
|
52
13
|
node: QuoteNode
|
|
53
14
|
})]
|
|
54
15
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["QuoteNode","createServerFeature","
|
|
1
|
+
{"version":3,"file":"index.js","names":["QuoteNode","createServerFeature","createNode","MarkdownTransformer","i18n","BlockquoteFeature","feature","ClientFeature","clientFeatureProps","markdownTransformers","nodes","node","key"],"sources":["../../../../src/features/blockquote/server/index.ts"],"sourcesContent":["import type { SerializedQuoteNode as _SerializedQuoteNode } from '@lexical/rich-text'\nimport type { SerializedLexicalNode } from 'lexical'\n\nimport { QuoteNode } from '@lexical/rich-text'\n\nimport type { StronglyTypedElementNode } from '../../../nodeTypes.js'\n\nimport { createServerFeature } from '../../../utilities/createServerFeature.js'\nimport { createNode } from '../../typeUtilities.js'\nimport { MarkdownTransformer } from '../markdownTransformer.js'\nimport { i18n } from './i18n.js'\n\nexport type SerializedQuoteNode<T extends SerializedLexicalNode = SerializedLexicalNode> =\n StronglyTypedElementNode<_SerializedQuoteNode, 'quote', T>\n\nexport const BlockquoteFeature = createServerFeature({\n feature: {\n ClientFeature: '@payloadcms/richtext-lexical/client#BlockquoteFeatureClient',\n clientFeatureProps: null,\n i18n,\n markdownTransformers: [MarkdownTransformer],\n nodes: [\n createNode({\n node: QuoteNode,\n }),\n ],\n },\n key: 'blockquote',\n})\n"],"mappings":"AAGA,SAASA,SAAS,QAAQ;AAI1B,SAASC,mBAAmB,QAAQ;AACpC,SAASC,UAAU,QAAQ;AAC3B,SAASC,mBAAmB,QAAQ;AACpC,SAASC,IAAI,QAAQ;AAKrB,OAAO,MAAMC,iBAAA,GAAoBJ,mBAAA,CAAoB;EACnDK,OAAA,EAAS;IACPC,aAAA,EAAe;IACfC,kBAAA,EAAoB;IACpBJ,IAAA;IACAK,oBAAA,EAAsB,CAACN,mBAAA,CAAoB;IAC3CO,KAAA,EAAO,CACLR,UAAA,CAAW;MACTS,IAAA,EAAMX;IACR;EAEJ;EACAY,GAAA,EAAK;AACP","ignoreList":[]}
|
|
@@ -42,6 +42,16 @@ export type BlockCollapsibleProps = {
|
|
|
42
42
|
* @default true
|
|
43
43
|
*/
|
|
44
44
|
removeButton?: boolean;
|
|
45
|
+
/**
|
|
46
|
+
* Whether to show the drag handle icon
|
|
47
|
+
* @default true
|
|
48
|
+
*/
|
|
49
|
+
showDragHandle?: boolean;
|
|
50
|
+
/**
|
|
51
|
+
* Whether to show the row number
|
|
52
|
+
* @default true
|
|
53
|
+
*/
|
|
54
|
+
showRowNumber?: boolean;
|
|
45
55
|
};
|
|
46
56
|
export type BlockCollapsibleWithErrorProps = {
|
|
47
57
|
errorCount?: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BlockContent.d.ts","sourceRoot":"","sources":["../../../../../src/features/blocks/client/component/BlockContent.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,qCAAqC,CAAA;AAC3E,OAAO,KAAK,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,SAAS,CAAA;AAIrD,OAAO,KAAiC,MAAM,OAAO,CAAA;AAErD,MAAM,MAAM,qBAAqB,GAAG;IAClC;;;OAGG;IACH,OAAO,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IACzB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAC1B;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB;;OAEG;IACH,gBAAgB,CAAC,EAAE,OAAO,CAAC,gBAAgB,CAAC,CAAA;IAC5C;;;OAGG;IACH,gBAAgB,CAAC,EAAE,OAAO,CAAA;IAC1B;;;;OAIG;IACH,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB;;OAEG;IACH,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IACvB;;;OAGG;IACH,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IACtB;;;;OAIG;IACH,YAAY,CAAC,EAAE,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"BlockContent.d.ts","sourceRoot":"","sources":["../../../../../src/features/blocks/client/component/BlockContent.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,qCAAqC,CAAA;AAC3E,OAAO,KAAK,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,SAAS,CAAA;AAIrD,OAAO,KAAiC,MAAM,OAAO,CAAA;AAErD,MAAM,MAAM,qBAAqB,GAAG;IAClC;;;OAGG;IACH,OAAO,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IACzB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAC1B;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB;;OAEG;IACH,gBAAgB,CAAC,EAAE,OAAO,CAAC,gBAAgB,CAAC,CAAA;IAC5C;;;OAGG;IACH,gBAAgB,CAAC,EAAE,OAAO,CAAA;IAC1B;;;;OAIG;IACH,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB;;OAEG;IACH,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IACvB;;;OAGG;IACH,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IACtB;;;;OAIG;IACH,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB;;;OAGG;IACH,cAAc,CAAC,EAAE,OAAO,CAAA;IACxB;;;OAGG;IACH,aAAa,CAAC,EAAE,OAAO,CAAA;CACxB,CAAA;AAED,MAAM,MAAM,8BAA8B,GAAG;IAC3C,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,cAAc,CAAC,EAAE,OAAO,CAAA;CACzB,GAAG,qBAAqB,CAAA;AAEzB,MAAM,MAAM,iBAAiB,GAAG;IAC9B,SAAS,EAAE,MAAM,CAAA;IACjB,WAAW,EAAE,KAAK,CAAC,EAAE,CAAA;IACrB,WAAW,EAAE,KAAK,CAAC,EAAE,CAAC,8BAA8B,CAAC,CAAA;IACrD;;OAEG;IACH,WAAW,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAC7B,WAAW,EAAE,KAAK,CAAC,SAAS,CAAA;IAC5B,UAAU,EAAE,KAAK,CAAC,EAAE,CAAA;IACpB,UAAU,EAAE,MAAM,CAAA;IAClB,UAAU,EAAE,WAAW,EAAE,CAAA;IACzB,YAAY,EAAE,KAAK,GAAG,SAAS,GAAG,SAAS,CAAA;IAE3C,OAAO,EAAE,MAAM,CAAA;IACf,YAAY,EAAE,KAAK,CAAC,EAAE,CAAA;CACvB,CAAA;AAED,MAAM,MAAM,yBAAyB,GAAG;IACtC,gBAAgB,EAAE,KAAK,CAAC,EAAE,CAAC,qBAAqB,CAAC,CAAA;CAClD,GAAG,IAAI,CAAC,iBAAiB,EAAE,aAAa,GAAG,aAAa,GAAG,aAAa,CAAC,CAAA;AAc1E,eAAO,MAAM,wBAAwB,iCAAyC,CAAA;AAE9E;;;;GAIG;AACH,eAAO,MAAM,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC,iBAAiB,CA8CpD,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BlockContent.js","names":["c","_c","useLexicalEditable","RenderFields","useFormSubmitted","React","createContext","useMemo","BlockComponentContext","baseClass","BlockCollapsible","BlockDrawer","EditButton","errorCount","formSchema","initialState","nodeKey","RemoveButton","useBlockComponentContext","use","BlockContent","props","$","Collapsible","CustomBlock","CustomLabel","contextProps","hasSubmitted","fieldHasErrors","isEditable","t0","collapsibleProps","children","rest","_jsx","CollapsibleWithErrorProps","blockContextValue","_jsxs","value","fields","forceRender","parentIndexPath","parentPath","parentSchemaPath","permissions","readOnly"],"sources":["../../../../../src/features/blocks/client/component/BlockContent.tsx"],"sourcesContent":["'use client'\nimport type { CollapsibleProps } from '@payloadcms/ui/elements/Collapsible'\nimport type { ClientField, FormState } from 'payload'\n\nimport { useLexicalEditable } from '@lexical/react/useLexicalEditable'\nimport { RenderFields, useFormSubmitted } from '@payloadcms/ui'\nimport React, { createContext, useMemo } from 'react'\n\nexport type BlockCollapsibleProps = {\n /**\n * Replace the top-right portion of the header that renders the Edit and Remove buttons with custom content.\n * If this property is provided, the `removeButton` and `editButton` properties are ignored.\n */\n Actions?: React.ReactNode\n children?: React.ReactNode\n /**\n * Additional className to the collapsible wrapper\n */\n className?: string\n /**\n * Props to pass to the underlying Collapsible component. You could use this to override the `Header` entirely, for example.\n */\n collapsibleProps?: Partial<CollapsibleProps>\n /**\n * Whether to disable rendering the block name field in the header Label\n * @default false\n */\n disableBlockName?: boolean\n /**\n * Whether to show the Edit button\n * If `Actions` is provided, this property is ignored.\n * @default true\n */\n editButton?: boolean\n /**\n * Replace the default Label component with a custom Label\n */\n Label?: React.ReactNode\n /**\n * Replace the default Pill component component that's rendered within the default Label component with a custom Pill.\n * This property has no effect if you provide a custom Label component via the `Label` property.\n */\n Pill?: React.ReactNode\n /**\n * Whether to show the Remove button\n * If `Actions` is provided, this property is ignored.\n * @default true\n */\n removeButton?: boolean\n}\n\nexport type BlockCollapsibleWithErrorProps = {\n errorCount?: number\n fieldHasErrors?: boolean\n} & BlockCollapsibleProps\n\nexport type BlockContentProps = {\n baseClass: string\n BlockDrawer: React.FC\n Collapsible: React.FC<BlockCollapsibleWithErrorProps>\n /**\n * Custom block component (pre-rendered ReactNode).\n */\n CustomBlock?: React.ReactNode\n CustomLabel: React.ReactNode\n EditButton: React.FC\n errorCount: number\n formSchema: ClientField[]\n initialState: false | FormState | undefined\n\n nodeKey: string\n RemoveButton: React.FC\n}\n\nexport type BlockComponentContextType = {\n BlockCollapsible: React.FC<BlockCollapsibleProps>\n} & Omit<BlockContentProps, 'Collapsible' | 'CustomBlock' | 'CustomLabel'>\n\nconst BlockComponentContext = createContext<BlockComponentContextType>({\n baseClass: 'LexicalEditorTheme__block',\n BlockCollapsible: () => null,\n BlockDrawer: () => null,\n EditButton: () => null,\n errorCount: 0,\n formSchema: [],\n initialState: false,\n nodeKey: '',\n RemoveButton: () => null,\n})\n\nexport const useBlockComponentContext = () => React.use(BlockComponentContext)\n\n/**\n * The actual content of the Block. This should be INSIDE a Form component,\n * scoped to the block. All format operations in here are thus scoped to the block's form, and\n * not the whole document.\n */\nexport const BlockContent: React.FC<BlockContentProps> = (props) => {\n const { Collapsible, CustomBlock, CustomLabel, ...contextProps } = props\n\n const { BlockDrawer, errorCount, formSchema } = contextProps\n\n const hasSubmitted = useFormSubmitted()\n\n const fieldHasErrors = hasSubmitted && errorCount > 0\n const isEditable = useLexicalEditable()\n\n const CollapsibleWithErrorProps = useMemo(\n () => (collapsibleProps: BlockCollapsibleProps) => {\n const { children, ...rest } = collapsibleProps\n return (\n <Collapsible errorCount={errorCount} fieldHasErrors={fieldHasErrors} {...rest}>\n {children}\n </Collapsible>\n )\n },\n [Collapsible, fieldHasErrors, errorCount],\n )\n\n const blockContextValue: BlockComponentContextType = {\n ...contextProps,\n BlockCollapsible: CollapsibleWithErrorProps,\n }\n\n // Provide context for useBlockComponentContext() hook\n return CustomBlock ? (\n <BlockComponentContext value={blockContextValue}>\n {CustomBlock}\n <BlockDrawer />\n </BlockComponentContext>\n ) : (\n <CollapsibleWithErrorProps>\n <RenderFields\n fields={formSchema}\n forceRender={true}\n parentIndexPath=\"\"\n parentPath={''}\n parentSchemaPath=\"\"\n permissions={true}\n readOnly={!isEditable}\n />\n </CollapsibleWithErrorProps>\n )\n}\n"],"mappings":"AAAA;;AAAA,SAAAA,CAAA,IAAAC,EAAA;;AAIA,SAASC,kBAAkB,QAAQ;AACnC,SAASC,YAAY,EAAEC,gBAAgB,QAAQ;AAC/C,OAAOC,KAAA,IAASC,aAAa,EAAEC,OAAO,QAAQ;
|
|
1
|
+
{"version":3,"file":"BlockContent.js","names":["c","_c","useLexicalEditable","RenderFields","useFormSubmitted","React","createContext","useMemo","BlockComponentContext","baseClass","BlockCollapsible","BlockDrawer","EditButton","errorCount","formSchema","initialState","nodeKey","RemoveButton","useBlockComponentContext","use","BlockContent","props","$","Collapsible","CustomBlock","CustomLabel","contextProps","hasSubmitted","fieldHasErrors","isEditable","t0","collapsibleProps","children","rest","_jsx","CollapsibleWithErrorProps","blockContextValue","_jsxs","value","fields","forceRender","parentIndexPath","parentPath","parentSchemaPath","permissions","readOnly"],"sources":["../../../../../src/features/blocks/client/component/BlockContent.tsx"],"sourcesContent":["'use client'\nimport type { CollapsibleProps } from '@payloadcms/ui/elements/Collapsible'\nimport type { ClientField, FormState } from 'payload'\n\nimport { useLexicalEditable } from '@lexical/react/useLexicalEditable'\nimport { RenderFields, useFormSubmitted } from '@payloadcms/ui'\nimport React, { createContext, useMemo } from 'react'\n\nexport type BlockCollapsibleProps = {\n /**\n * Replace the top-right portion of the header that renders the Edit and Remove buttons with custom content.\n * If this property is provided, the `removeButton` and `editButton` properties are ignored.\n */\n Actions?: React.ReactNode\n children?: React.ReactNode\n /**\n * Additional className to the collapsible wrapper\n */\n className?: string\n /**\n * Props to pass to the underlying Collapsible component. You could use this to override the `Header` entirely, for example.\n */\n collapsibleProps?: Partial<CollapsibleProps>\n /**\n * Whether to disable rendering the block name field in the header Label\n * @default false\n */\n disableBlockName?: boolean\n /**\n * Whether to show the Edit button\n * If `Actions` is provided, this property is ignored.\n * @default true\n */\n editButton?: boolean\n /**\n * Replace the default Label component with a custom Label\n */\n Label?: React.ReactNode\n /**\n * Replace the default Pill component component that's rendered within the default Label component with a custom Pill.\n * This property has no effect if you provide a custom Label component via the `Label` property.\n */\n Pill?: React.ReactNode\n /**\n * Whether to show the Remove button\n * If `Actions` is provided, this property is ignored.\n * @default true\n */\n removeButton?: boolean\n /**\n * Whether to show the drag handle icon\n * @default true\n */\n showDragHandle?: boolean\n /**\n * Whether to show the row number\n * @default true\n */\n showRowNumber?: boolean\n}\n\nexport type BlockCollapsibleWithErrorProps = {\n errorCount?: number\n fieldHasErrors?: boolean\n} & BlockCollapsibleProps\n\nexport type BlockContentProps = {\n baseClass: string\n BlockDrawer: React.FC\n Collapsible: React.FC<BlockCollapsibleWithErrorProps>\n /**\n * Custom block component (pre-rendered ReactNode).\n */\n CustomBlock?: React.ReactNode\n CustomLabel: React.ReactNode\n EditButton: React.FC\n errorCount: number\n formSchema: ClientField[]\n initialState: false | FormState | undefined\n\n nodeKey: string\n RemoveButton: React.FC\n}\n\nexport type BlockComponentContextType = {\n BlockCollapsible: React.FC<BlockCollapsibleProps>\n} & Omit<BlockContentProps, 'Collapsible' | 'CustomBlock' | 'CustomLabel'>\n\nconst BlockComponentContext = createContext<BlockComponentContextType>({\n baseClass: 'LexicalEditorTheme__block',\n BlockCollapsible: () => null,\n BlockDrawer: () => null,\n EditButton: () => null,\n errorCount: 0,\n formSchema: [],\n initialState: false,\n nodeKey: '',\n RemoveButton: () => null,\n})\n\nexport const useBlockComponentContext = () => React.use(BlockComponentContext)\n\n/**\n * The actual content of the Block. This should be INSIDE a Form component,\n * scoped to the block. All format operations in here are thus scoped to the block's form, and\n * not the whole document.\n */\nexport const BlockContent: React.FC<BlockContentProps> = (props) => {\n const { Collapsible, CustomBlock, CustomLabel, ...contextProps } = props\n\n const { BlockDrawer, errorCount, formSchema } = contextProps\n\n const hasSubmitted = useFormSubmitted()\n\n const fieldHasErrors = hasSubmitted && errorCount > 0\n const isEditable = useLexicalEditable()\n\n const CollapsibleWithErrorProps = useMemo(\n () => (collapsibleProps: BlockCollapsibleProps) => {\n const { children, ...rest } = collapsibleProps\n return (\n <Collapsible errorCount={errorCount} fieldHasErrors={fieldHasErrors} {...rest}>\n {children}\n </Collapsible>\n )\n },\n [Collapsible, fieldHasErrors, errorCount],\n )\n\n const blockContextValue: BlockComponentContextType = {\n ...contextProps,\n BlockCollapsible: CollapsibleWithErrorProps,\n }\n\n // Provide context for useBlockComponentContext() hook\n return CustomBlock ? (\n <BlockComponentContext value={blockContextValue}>\n {CustomBlock}\n <BlockDrawer />\n </BlockComponentContext>\n ) : (\n <CollapsibleWithErrorProps>\n <RenderFields\n fields={formSchema}\n forceRender={true}\n parentIndexPath=\"\"\n parentPath={''}\n parentSchemaPath=\"\"\n permissions={true}\n readOnly={!isEditable}\n />\n </CollapsibleWithErrorProps>\n )\n}\n"],"mappings":"AAAA;;AAAA,SAAAA,CAAA,IAAAC,EAAA;;AAIA,SAASC,kBAAkB,QAAQ;AACnC,SAASC,YAAY,EAAEC,gBAAgB,QAAQ;AAC/C,OAAOC,KAAA,IAASC,aAAa,EAAEC,OAAO,QAAQ;AAkF9C,MAAMC,qBAAA,gBAAwBF,aAAA,CAAyC;EACrEG,SAAA,EAAW;EACXC,gBAAA,EAAkBA,CAAA,KAAM;EACxBC,WAAA,EAAaA,CAAA,KAAM;EACnBC,UAAA,EAAYA,CAAA,KAAM;EAClBC,UAAA,EAAY;EACZC,UAAA,EAAY,EAAE;EACdC,YAAA,EAAc;EACdC,OAAA,EAAS;EACTC,YAAA,EAAcA,CAAA,KAAM;AACtB;AAEA,OAAO,MAAMC,wBAAA,GAA2BA,CAAA,KAAMb,KAAA,CAAMc,GAAG,CAACX,qBAAA;AAExD;;;;;AAKA,OAAO,MAAMY,YAAA,GAA4CC,KAAA;EAAA,MAAAC,CAAA,GAAArB,EAAA;EACvD;IAAAsB,WAAA;IAAAC,WAAA;IAAAC,WAAA;IAAA,GAAAC;EAAA,IAAmEL,KAAA;EAEnE;IAAAV,WAAA;IAAAE,UAAA;IAAAC;EAAA,IAAgDY,YAAA;EAEhD,MAAAC,YAAA,GAAqBvB,gBAAA;EAErB,MAAAwB,cAAA,GAAuBD,YAAA,IAAgBd,UAAA,IAAa;EACpD,MAAAgB,UAAA,GAAmB3B,kBAAA;EAAA,IAAA4B,EAAA;EAAA,IAAAR,CAAA,QAAAC,WAAA,IAAAD,CAAA,QAAAT,UAAA,IAAAS,CAAA,QAAAM,cAAA;IAGXE,EAAA,GAAAC,gBAAA;MACJ;QAAAC,QAAA;QAAA,GAAAC;MAAA,IAA8BF,gBAAA;MAAA,OAE5BG,IAAA,CAACX,WAAA;QAAAV,UAAA;QAAAe,cAAA;QAAA,GAAwEK,IAAI;QAAAD;MAAA,C;;IAIjFV,CAAA,MAAAC,WAAA;IAAAD,CAAA,MAAAT,UAAA;IAAAS,CAAA,MAAAM,cAAA;IAAAN,CAAA,MAAAQ,EAAA;EAAA;IAAAA,EAAA,GAAAR,CAAA;EAAA;EARF,MAAAa,yBAAA,GACQL,EAON;EAIF,MAAAM,iBAAA;IAAA,GACKV,YAAY;IAAAhB,gBAAA,EACGyB;EAAA;EACpB,OAGOX,WAAA,GACLa,KAAA,CAAA7B,qBAAA;IAAA8B,KAAA,EAA8BF,iBAAA;IAAAJ,QAAA,GAC3BR,WAAA,EACDU,IAAA,CAACvB,WAAA;EAAA,C,IAGHuB,IAAA,CAACC,yBAAA;IAAAH,QAAA,EACCE,IAAA,CAAA/B,YAAA;MAAAoC,MAAA,EACUzB,UAAA;MAAA0B,WAAA;MAAAC,eAAA,EAEQ;MAAAC,UAAA,EACJ;MAAAC,gBAAA,EACK;MAAAC,WAAA;MAAAC,QAAA,GAENhB;IAAA,C;;CAInB","ignoreList":[]}
|
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
@layer payload-default {
|
|
2
|
+
.LexicalEditorTheme__block {
|
|
3
|
+
margin: var(--spacer-3) 0;
|
|
4
|
+
z-index: 1;
|
|
5
|
+
color: var(--color-text);
|
|
6
|
+
|
|
7
|
+
&[data-lexical-decorator='true'] {
|
|
8
|
+
width: auto;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.collapsible__header-wrap {
|
|
12
|
+
right: var(--spacer-4);
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.LexicalEditorTheme__block__container {
|
|
17
|
+
display: flex;
|
|
18
|
+
flex-direction: column;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.LexicalEditorTheme__block__row {
|
|
22
|
+
.collapsible__toggle-wrap {
|
|
23
|
+
padding-inline-start: var(--spacer-2);
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.LexicalEditorTheme__block__header {
|
|
28
|
+
h3 {
|
|
29
|
+
margin: 0;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.LexicalEditorTheme__block__header-wrap {
|
|
34
|
+
display: flex;
|
|
35
|
+
align-items: flex-end;
|
|
36
|
+
width: 100%;
|
|
37
|
+
justify-content: space-between;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.LexicalEditorTheme__block__heading-with-error {
|
|
41
|
+
display: flex;
|
|
42
|
+
align-items: center;
|
|
43
|
+
gap: var(--spacer-2);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.LexicalEditorTheme__block--has-no-error {
|
|
47
|
+
> .array-field__header .array-field__heading-with-error {
|
|
48
|
+
color: var(--color-text);
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.LexicalEditorTheme__block--has-error {
|
|
53
|
+
> .array-field__header {
|
|
54
|
+
color: var(--color-text-danger);
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
.LexicalEditorTheme__block__error-pill {
|
|
59
|
+
align-self: center;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
.LexicalEditorTheme__block__header-actions {
|
|
63
|
+
list-style: none;
|
|
64
|
+
margin: 0;
|
|
65
|
+
padding: 0;
|
|
66
|
+
display: flex;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
.LexicalEditorTheme__block__header-action {
|
|
70
|
+
cursor: pointer;
|
|
71
|
+
margin-left: var(--spacer-1);
|
|
72
|
+
|
|
73
|
+
&:hover,
|
|
74
|
+
&:focus-visible {
|
|
75
|
+
text-decoration: underline;
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
.LexicalEditorTheme__block__removeButton.btn {
|
|
80
|
+
margin: 0;
|
|
81
|
+
&:hover {
|
|
82
|
+
background-color: var(--color-bg-secondary);
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
.LexicalEditorTheme__block__editButton.btn {
|
|
87
|
+
margin: 0;
|
|
88
|
+
width: var(--spacer-4);
|
|
89
|
+
|
|
90
|
+
&:hover {
|
|
91
|
+
background-color: var(--color-bg-secondary);
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
.LexicalEditorTheme__block__block-header {
|
|
96
|
+
pointer-events: none;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
.LexicalEditorTheme__block__block-header * {
|
|
100
|
+
pointer-events: all;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
.LexicalEditorTheme__block__block-header,
|
|
104
|
+
.LexicalEditorTheme__block__block-header > div:first-child {
|
|
105
|
+
display: flex;
|
|
106
|
+
max-width: 100%;
|
|
107
|
+
width: 100%;
|
|
108
|
+
overflow: hidden;
|
|
109
|
+
gap: var(--spacer-2);
|
|
110
|
+
align-items: center;
|
|
111
|
+
justify-content: flex-start;
|
|
112
|
+
pointer-events: none;
|
|
113
|
+
|
|
114
|
+
& > * {
|
|
115
|
+
pointer-events: all;
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
.LexicalEditorTheme__block__block-number {
|
|
120
|
+
flex-shrink: 0;
|
|
121
|
+
color: var(--color-text);
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
.LexicalEditorTheme__block__block-number {
|
|
125
|
+
flex-shrink: 0;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
.LexicalEditorTheme__block__block-pill {
|
|
129
|
+
flex-shrink: 0;
|
|
130
|
+
display: block;
|
|
131
|
+
line-height: unset;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
.LexicalEditorTheme__block__rows {
|
|
135
|
+
display: flex;
|
|
136
|
+
flex-direction: column;
|
|
137
|
+
gap: var(--spacer-1);
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
.LexicalEditorTheme__block__drawer-toggler {
|
|
141
|
+
background-color: transparent;
|
|
142
|
+
margin: 0;
|
|
143
|
+
padding: 0;
|
|
144
|
+
border: none;
|
|
145
|
+
align-self: flex-start;
|
|
146
|
+
|
|
147
|
+
.btn {
|
|
148
|
+
color: var(--color-icon-tertiary);
|
|
149
|
+
margin: 0;
|
|
150
|
+
|
|
151
|
+
&:hover {
|
|
152
|
+
color: var(--color-text);
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
.LexicalEditorTheme__block-not-found {
|
|
158
|
+
color: var(--color-text-danger);
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
html[data-theme='light'] {
|
|
162
|
+
.blocks-field--has-error {
|
|
163
|
+
.section-title__input,
|
|
164
|
+
.blocks-field__heading-with-error {
|
|
165
|
+
color: var(--color-text-danger);
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
html[data-theme='dark'] {
|
|
171
|
+
.blocks-field--has-error {
|
|
172
|
+
.section-title__input,
|
|
173
|
+
.blocks-field__heading-with-error {
|
|
174
|
+
color: var(--color-text-danger);
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { ViewMapBlockComponentProps } from '../../../../types.js';
|
|
3
3
|
import type { BlockFields } from '../../server/nodes/BlocksNode.js';
|
|
4
|
-
import './index.
|
|
4
|
+
import './index.css';
|
|
5
5
|
export type BlockComponentProps<TFormData extends Record<string, unknown> = BlockFields> = {
|
|
6
6
|
/**
|
|
7
7
|
* Can be modified by the node in order to trigger the re-fetch of the initial state based on the
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/features/blocks/client/component/index.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/features/blocks/client/component/index.tsx"],"names":[],"mappings":"AAsCA,OAAO,KAAkD,MAAM,OAAO,CAAA;AAGtE,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,sBAAsB,CAAA;AACtE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kCAAkC,CAAA;AAEnE,OAAO,aAAa,CAAA;AAWpB,MAAM,MAAM,mBAAmB,CAAC,SAAS,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,WAAW,IAAI;IACzF;;;;OAIG;IACH,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAA;IAC5B,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAA;IAC1B;;;OAGG;IACH,QAAQ,CAAC,WAAW,CAAC,EAAE,KAAK,CAAC,EAAE,CAAC,0BAA0B,CAAC,CAAA;IAC3D;;;OAGG;IACH,QAAQ,CAAC,WAAW,CAAC,EAAE,KAAK,CAAC,EAAE,CAAC,0BAA0B,CAAC,CAAA;IAC3D;;OAEG;IACH,QAAQ,CAAC,QAAQ,EAAE,SAAS,CAAA;IAC5B;;OAEG;IACH,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAA;CACzB,CAAA;AAED,eAAO,MAAM,cAAc,EAAE,KAAK,CAAC,EAAE,CAAC,mBAAmB,CAuuBxD,CAAA"}
|
|
@@ -4,12 +4,13 @@ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-run
|
|
|
4
4
|
import { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext';
|
|
5
5
|
import { useLexicalEditable } from '@lexical/react/useLexicalEditable';
|
|
6
6
|
import { getTranslation } from '@payloadcms/translations';
|
|
7
|
-
import { Button, Collapsible, Drawer, EditDepthProvider, ErrorPill, Form, formatDrawerSlug, FormSubmit, Pill, RenderFields, SectionTitle, useConfig, useDocumentForm, useDocumentInfo, useEditDepth, useFormSubmitted, useServerFunctions, useTranslation } from '@payloadcms/ui';
|
|
7
|
+
import { Button, Collapsible, Drawer, EditDepthProvider, ErrorPill, Form, formatDrawerSlug, FormSubmit, MoreIcon, Pill, Popup, PopupList, RenderFields, SectionTitle, useConfig, useDocumentForm, useDocumentInfo, useEditDepth, useFormSubmitted, useServerFunctions, useTranslation, XIcon } from '@payloadcms/ui';
|
|
8
8
|
import { abortAndIgnore } from '@payloadcms/ui/shared';
|
|
9
|
-
import { $getNodeByKey } from 'lexical';
|
|
9
|
+
import { $getNodeByKey, $getRoot, SKIP_DOM_SELECTION_TAG } from 'lexical';
|
|
10
10
|
import { deepCopyObjectSimpleWithoutReactComponents, reduceFieldsToValues } from 'payload/shared';
|
|
11
11
|
import React, { useCallback, useEffect, useMemo, useRef } from 'react';
|
|
12
12
|
import { v4 as uuid } from 'uuid';
|
|
13
|
+
import './index.css';
|
|
13
14
|
import { useEditorConfigContext } from '../../../../lexical/config/client/EditorConfigProvider.js';
|
|
14
15
|
import { useLexicalDrawer } from '../../../../utilities/fieldsDrawer/useLexicalDrawer.js';
|
|
15
16
|
import { $isBlockNode } from '../nodes/BlocksNode.js';
|
|
@@ -199,6 +200,11 @@ export const BlockComponent = props => {
|
|
|
199
200
|
newData.blockType = blockType;
|
|
200
201
|
node.setFields(newData, true);
|
|
201
202
|
}
|
|
203
|
+
},
|
|
204
|
+
// Without this, the outer editor's reconciler resets DOM selection
|
|
205
|
+
// back into its own root, kicking focus out of any nested richText.
|
|
206
|
+
{
|
|
207
|
+
tag: SKIP_DOM_SELECTION_TAG
|
|
202
208
|
});
|
|
203
209
|
setInitialState(state);
|
|
204
210
|
if (!CustomLabelFromProps) {
|
|
@@ -272,6 +278,11 @@ export const BlockComponent = props => {
|
|
|
272
278
|
newData_0.blockType = blockType;
|
|
273
279
|
node_0.setFields(newData_0, true);
|
|
274
280
|
}
|
|
281
|
+
},
|
|
282
|
+
// Without this, the outer editor's reconciler resets DOM selection
|
|
283
|
+
// back into its own root, kicking focus out of any nested richText.
|
|
284
|
+
{
|
|
285
|
+
tag: SKIP_DOM_SELECTION_TAG
|
|
275
286
|
});
|
|
276
287
|
}, 0);
|
|
277
288
|
if (submit) {
|
|
@@ -301,6 +312,29 @@ export const BlockComponent = props => {
|
|
|
301
312
|
$getNodeByKey(nodeKey)?.remove();
|
|
302
313
|
});
|
|
303
314
|
}, [editor, nodeKey]);
|
|
315
|
+
const [rowIndex, setRowIndex] = React.useState(0);
|
|
316
|
+
useEffect(() => {
|
|
317
|
+
const updateIndex = () => {
|
|
318
|
+
editor.getEditorState().read(() => {
|
|
319
|
+
const root = $getRoot();
|
|
320
|
+
const children = root.getChildren();
|
|
321
|
+
let blockCount = 0;
|
|
322
|
+
for (const child of children) {
|
|
323
|
+
if ($isBlockNode(child)) {
|
|
324
|
+
if (child.getKey() === nodeKey) {
|
|
325
|
+
setRowIndex(blockCount);
|
|
326
|
+
return;
|
|
327
|
+
}
|
|
328
|
+
blockCount++;
|
|
329
|
+
}
|
|
330
|
+
}
|
|
331
|
+
});
|
|
332
|
+
};
|
|
333
|
+
updateIndex();
|
|
334
|
+
return editor.registerUpdateListener(() => {
|
|
335
|
+
updateIndex();
|
|
336
|
+
});
|
|
337
|
+
}, [editor, nodeKey]);
|
|
304
338
|
const blockDisplayName = clientBlock?.labels?.singular ? getTranslation(clientBlock.labels.singular, i18n) : clientBlock?.slug;
|
|
305
339
|
const onCollapsedChange = useCallback(changedCollapsed => {
|
|
306
340
|
void getDocPreferences().then(currentDocPreferences => {
|
|
@@ -340,7 +374,7 @@ export const BlockComponent = props => {
|
|
|
340
374
|
e_0.preventDefault();
|
|
341
375
|
},
|
|
342
376
|
round: true,
|
|
343
|
-
size: "
|
|
377
|
+
size: "medium",
|
|
344
378
|
tooltip: t('lexical:blocks:inlineBlocks:edit', {
|
|
345
379
|
label: blockDisplayName
|
|
346
380
|
})
|
|
@@ -359,7 +393,7 @@ export const BlockComponent = props => {
|
|
|
359
393
|
}), [baseClass, isEditable, removeBlock]);
|
|
360
394
|
const BlockCollapsible = useMemo(() => ({
|
|
361
395
|
Actions,
|
|
362
|
-
children,
|
|
396
|
+
children: children_0,
|
|
363
397
|
className,
|
|
364
398
|
collapsibleProps,
|
|
365
399
|
disableBlockName,
|
|
@@ -368,18 +402,56 @@ export const BlockComponent = props => {
|
|
|
368
402
|
fieldHasErrors,
|
|
369
403
|
Label,
|
|
370
404
|
Pill: CustomPill,
|
|
371
|
-
removeButton
|
|
405
|
+
removeButton,
|
|
406
|
+
showDragHandle = true,
|
|
407
|
+
showRowNumber = true
|
|
372
408
|
}) => {
|
|
373
409
|
return /*#__PURE__*/_jsx("div", {
|
|
374
410
|
className: `${baseClass}__container ${baseClass}-${blockType}`,
|
|
375
411
|
children: /*#__PURE__*/_jsx(Collapsible, {
|
|
412
|
+
actions: typeof Actions !== 'undefined' ? Actions : isEditable ? /*#__PURE__*/_jsx(Popup, {
|
|
413
|
+
button: /*#__PURE__*/_jsx(MoreIcon, {}),
|
|
414
|
+
buttonClassName: `${baseClass}__actions-button`,
|
|
415
|
+
caret: false,
|
|
416
|
+
horizontalAlign: "right",
|
|
417
|
+
render: ({
|
|
418
|
+
close
|
|
419
|
+
}) => /*#__PURE__*/_jsxs(PopupList.ButtonGroup, {
|
|
420
|
+
buttonSize: "medium",
|
|
421
|
+
children: [(resolvedCustomBlock && editButton !== false || !resolvedCustomBlock && editButton) && /*#__PURE__*/_jsx(PopupList.Button, {
|
|
422
|
+
onClick: () => {
|
|
423
|
+
toggleDrawer();
|
|
424
|
+
close();
|
|
425
|
+
},
|
|
426
|
+
children: t('general:edit')
|
|
427
|
+
}), removeButton !== false && /*#__PURE__*/_jsxs(PopupList.Button, {
|
|
428
|
+
onClick: () => {
|
|
429
|
+
removeBlock();
|
|
430
|
+
close();
|
|
431
|
+
},
|
|
432
|
+
children: [/*#__PURE__*/_jsx(XIcon, {}), t('general:remove')]
|
|
433
|
+
})]
|
|
434
|
+
}),
|
|
435
|
+
size: "large"
|
|
436
|
+
}) : null,
|
|
376
437
|
className: [`${baseClass}__row`, fieldHasErrors ? `${baseClass}__row--has-errors` : `${baseClass}__row--no-errors`, className].filter(Boolean).join(' '),
|
|
377
438
|
collapsibleStyle: fieldHasErrors ? 'error' : 'default',
|
|
378
|
-
|
|
439
|
+
dragHandleProps: showDragHandle ? {
|
|
440
|
+
id: nodeKey,
|
|
441
|
+
attributes: {
|
|
442
|
+
role: 'button',
|
|
443
|
+
tabIndex: 0
|
|
444
|
+
},
|
|
445
|
+
listeners: {}
|
|
446
|
+
} : undefined,
|
|
447
|
+
header: /*#__PURE__*/_jsx("div", {
|
|
379
448
|
className: `${baseClass}__block-header`,
|
|
380
|
-
children:
|
|
449
|
+
children: typeof Label !== 'undefined' ? Label : typeof resolvedCustomLabel !== 'undefined' ? resolvedCustomLabel : /*#__PURE__*/_jsxs("div", {
|
|
381
450
|
className: `${baseClass}__block-label`,
|
|
382
|
-
children: [
|
|
451
|
+
children: [showRowNumber && /*#__PURE__*/_jsx("span", {
|
|
452
|
+
className: `${baseClass}__block-number`,
|
|
453
|
+
children: String(rowIndex + 1).padStart(2, '0')
|
|
454
|
+
}), typeof CustomPill !== 'undefined' ? CustomPill : /*#__PURE__*/_jsx(Pill, {
|
|
383
455
|
className: `${baseClass}__block-pill ${baseClass}__block-pill-${blockType}`,
|
|
384
456
|
pillStyle: "white",
|
|
385
457
|
size: "small",
|
|
@@ -392,12 +464,7 @@ export const BlockComponent = props => {
|
|
|
392
464
|
i18n: i18n,
|
|
393
465
|
withMessage: true
|
|
394
466
|
})]
|
|
395
|
-
})
|
|
396
|
-
className: `${baseClass}__block-actions`,
|
|
397
|
-
children: typeof Actions !== 'undefined' ? Actions : /*#__PURE__*/_jsxs(_Fragment, {
|
|
398
|
-
children: [resolvedCustomBlock && editButton !== false || !resolvedCustomBlock && editButton ? /*#__PURE__*/_jsx(EditButton, {}) : null, removeButton !== false && isEditable ? /*#__PURE__*/_jsx(RemoveButton, {}) : null]
|
|
399
|
-
})
|
|
400
|
-
})]
|
|
467
|
+
})
|
|
401
468
|
}),
|
|
402
469
|
isCollapsed: isCollapsed,
|
|
403
470
|
onToggle: incomingCollapsedState => {
|
|
@@ -405,10 +472,10 @@ export const BlockComponent = props => {
|
|
|
405
472
|
setIsCollapsed(incomingCollapsedState);
|
|
406
473
|
},
|
|
407
474
|
...(collapsibleProps || {}),
|
|
408
|
-
children:
|
|
475
|
+
children: children_0
|
|
409
476
|
}, 0)
|
|
410
477
|
});
|
|
411
|
-
}, [resolvedCustomBlock, resolvedCustomLabel,
|
|
478
|
+
}, [resolvedCustomBlock, resolvedCustomLabel, blockDisplayName, baseClass, clientBlock?.admin?.disableBlockName, blockType, i18n, isCollapsed, onCollapsedChange, isEditable, nodeKey, removeBlock, rowIndex, t, toggleDrawer]);
|
|
412
479
|
const blockID = formData?.id;
|
|
413
480
|
const BlockDrawer = useMemo(() => () => /*#__PURE__*/_jsx(EditDepthProvider, {
|
|
414
481
|
children: /*#__PURE__*/_jsx(Drawer, {
|
|
@@ -465,6 +532,11 @@ export const BlockComponent = props => {
|
|
|
465
532
|
if (node_1 && $isBlockNode(node_1)) {
|
|
466
533
|
node_1.setFields(newData_1, true);
|
|
467
534
|
}
|
|
535
|
+
},
|
|
536
|
+
// Without this, the outer editor's reconciler resets DOM selection
|
|
537
|
+
// back into its own root, kicking focus out of any nested richText.
|
|
538
|
+
{
|
|
539
|
+
tag: SKIP_DOM_SELECTION_TAG
|
|
468
540
|
});
|
|
469
541
|
toggleDrawer();
|
|
470
542
|
},
|