@payloadcms/richtext-lexical 3.0.0-beta.24 → 3.0.0-beta.26
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/components.d.ts +8 -2
- package/dist/exports/components.d.ts.map +1 -1
- package/dist/exports/components.js +8 -2
- package/dist/exports/components.js.map +1 -1
- package/dist/field/features/align/feature.client.d.ts.map +1 -1
- package/dist/field/features/align/feature.client.js +126 -46
- package/dist/field/features/align/feature.client.js.map +1 -1
- package/dist/field/features/align/toolbarAlignGroup.d.ts +3 -0
- package/dist/field/features/align/toolbarAlignGroup.d.ts.map +1 -0
- package/dist/field/features/align/{inlineToolbarAlignGroup.js → toolbarAlignGroup.js} +3 -3
- package/dist/field/features/align/toolbarAlignGroup.js.map +1 -0
- package/dist/field/features/blockquote/feature.client.d.ts +1 -1
- package/dist/field/features/blockquote/feature.client.d.ts.map +1 -1
- package/dist/field/features/blockquote/feature.client.js +39 -25
- package/dist/field/features/blockquote/feature.client.js.map +1 -1
- package/dist/field/features/blockquote/feature.server.d.ts +1 -1
- package/dist/field/features/blockquote/feature.server.js +3 -3
- package/dist/field/features/blockquote/feature.server.js.map +1 -1
- package/dist/field/features/blocks/component/index.d.ts.map +1 -1
- package/dist/field/features/blocks/component/index.js +1 -1
- package/dist/field/features/blocks/component/index.js.map +1 -1
- package/dist/field/features/blocks/feature.client.d.ts.map +1 -1
- package/dist/field/features/blocks/feature.client.js +39 -8
- package/dist/field/features/blocks/feature.client.js.map +1 -1
- package/dist/field/features/blocks/feature.server.d.ts +2 -5
- package/dist/field/features/blocks/feature.server.d.ts.map +1 -1
- package/dist/field/features/blocks/feature.server.js +2 -2
- package/dist/field/features/blocks/feature.server.js.map +1 -1
- package/dist/field/features/blocks/plugin/index.d.ts +3 -2
- package/dist/field/features/blocks/plugin/index.d.ts.map +1 -1
- package/dist/field/features/blocks/plugin/index.js +2 -2
- package/dist/field/features/blocks/plugin/index.js.map +1 -1
- package/dist/field/features/blocks/populationPromise.d.ts.map +1 -1
- package/dist/field/features/blocks/populationPromise.js +2 -1
- package/dist/field/features/blocks/populationPromise.js.map +1 -1
- package/dist/field/features/debug/testRecorder/plugin/index.d.ts +2 -2
- package/dist/field/features/debug/testRecorder/plugin/index.d.ts.map +1 -1
- package/dist/field/features/debug/testRecorder/plugin/index.js.map +1 -1
- package/dist/field/features/debug/treeView/plugin/index.d.ts +2 -2
- package/dist/field/features/debug/treeView/plugin/index.d.ts.map +1 -1
- package/dist/field/features/debug/treeView/plugin/index.js +2 -2
- package/dist/field/features/debug/treeView/plugin/index.js.map +1 -1
- package/dist/field/features/format/bold/feature.client.d.ts.map +1 -1
- package/dist/field/features/format/bold/feature.client.js +23 -19
- package/dist/field/features/format/bold/feature.client.js.map +1 -1
- package/dist/field/features/format/inlineCode/feature.client.d.ts.map +1 -1
- package/dist/field/features/format/inlineCode/feature.client.js +23 -19
- package/dist/field/features/format/inlineCode/feature.client.js.map +1 -1
- package/dist/field/features/format/italic/feature.client.d.ts.map +1 -1
- package/dist/field/features/format/italic/feature.client.js +23 -19
- package/dist/field/features/format/italic/feature.client.js.map +1 -1
- package/dist/field/features/format/shared/toolbarFormatGroup.d.ts +3 -0
- package/dist/field/features/format/shared/toolbarFormatGroup.d.ts.map +1 -0
- package/dist/field/features/format/shared/toolbarFormatGroup.js +10 -0
- package/dist/field/features/format/shared/toolbarFormatGroup.js.map +1 -0
- package/dist/field/features/format/strikethrough/feature.client.d.ts.map +1 -1
- package/dist/field/features/format/strikethrough/feature.client.js +23 -19
- package/dist/field/features/format/strikethrough/feature.client.js.map +1 -1
- package/dist/field/features/format/subscript/feature.client.d.ts.map +1 -1
- package/dist/field/features/format/subscript/feature.client.js +23 -19
- package/dist/field/features/format/subscript/feature.client.js.map +1 -1
- package/dist/field/features/format/superscript/feature.client.d.ts.map +1 -1
- package/dist/field/features/format/superscript/feature.client.js +23 -19
- package/dist/field/features/format/superscript/feature.client.js.map +1 -1
- package/dist/field/features/format/underline/feature.client.d.ts.map +1 -1
- package/dist/field/features/format/underline/feature.client.js +23 -19
- package/dist/field/features/format/underline/feature.client.js.map +1 -1
- package/dist/field/features/heading/feature.client.d.ts.map +1 -1
- package/dist/field/features/heading/feature.client.js +49 -29
- package/dist/field/features/heading/feature.client.js.map +1 -1
- package/dist/field/features/horizontalRule/feature.client.d.ts.map +1 -1
- package/dist/field/features/horizontalRule/feature.client.js +27 -4
- package/dist/field/features/horizontalRule/feature.client.js.map +1 -1
- package/dist/field/features/horizontalRule/plugin/index.d.ts +2 -1
- package/dist/field/features/horizontalRule/plugin/index.d.ts.map +1 -1
- package/dist/field/features/horizontalRule/plugin/index.js +2 -2
- package/dist/field/features/horizontalRule/plugin/index.js.map +1 -1
- package/dist/field/features/indent/feature.client.d.ts.map +1 -1
- package/dist/field/features/indent/feature.client.js +41 -37
- package/dist/field/features/indent/feature.client.js.map +1 -1
- package/dist/field/features/indent/toolbarIndentGroup.d.ts +3 -0
- package/dist/field/features/indent/toolbarIndentGroup.d.ts.map +1 -0
- package/dist/field/features/indent/toolbarIndentGroup.js +10 -0
- package/dist/field/features/indent/toolbarIndentGroup.js.map +1 -0
- package/dist/field/features/link/drawer/baseFields.d.ts +2 -2
- package/dist/field/features/link/drawer/baseFields.d.ts.map +1 -1
- package/dist/field/features/link/drawer/baseFields.js +2 -1
- package/dist/field/features/link/drawer/baseFields.js.map +1 -1
- package/dist/field/features/link/drawer/types.d.ts +2 -2
- package/dist/field/features/link/drawer/types.d.ts.map +1 -1
- package/dist/field/features/link/drawer/types.js.map +1 -1
- package/dist/field/features/link/feature.client.d.ts.map +1 -1
- package/dist/field/features/link/feature.client.js +54 -40
- package/dist/field/features/link/feature.client.js.map +1 -1
- package/dist/field/features/link/feature.server.d.ts +10 -3
- package/dist/field/features/link/feature.server.d.ts.map +1 -1
- package/dist/field/features/link/feature.server.js +3 -3
- package/dist/field/features/link/feature.server.js.map +1 -1
- package/dist/field/features/link/plugins/autoLink/index.d.ts +3 -2
- package/dist/field/features/link/plugins/autoLink/index.d.ts.map +1 -1
- package/dist/field/features/link/plugins/autoLink/index.js +2 -2
- package/dist/field/features/link/plugins/autoLink/index.js.map +1 -1
- package/dist/field/features/link/plugins/clickableLink/index.d.ts +3 -2
- package/dist/field/features/link/plugins/clickableLink/index.d.ts.map +1 -1
- package/dist/field/features/link/plugins/clickableLink/index.js +2 -2
- package/dist/field/features/link/plugins/clickableLink/index.js.map +1 -1
- package/dist/field/features/link/plugins/floatingLinkEditor/LinkEditor/index.d.ts.map +1 -1
- package/dist/field/features/link/plugins/floatingLinkEditor/LinkEditor/index.js +75 -68
- package/dist/field/features/link/plugins/floatingLinkEditor/LinkEditor/index.js.map +1 -1
- package/dist/field/features/link/plugins/floatingLinkEditor/index.d.ts +3 -4
- package/dist/field/features/link/plugins/floatingLinkEditor/index.d.ts.map +1 -1
- package/dist/field/features/link/plugins/floatingLinkEditor/index.js.map +1 -1
- package/dist/field/features/link/plugins/floatingLinkEditor/index.scss +2 -2
- package/dist/field/features/link/plugins/floatingLinkEditor/utilities.d.ts +3 -3
- package/dist/field/features/link/plugins/floatingLinkEditor/utilities.d.ts.map +1 -1
- package/dist/field/features/link/plugins/floatingLinkEditor/utilities.js +2 -2
- package/dist/field/features/link/plugins/floatingLinkEditor/utilities.js.map +1 -1
- package/dist/field/features/link/plugins/link/index.d.ts +3 -1
- package/dist/field/features/link/plugins/link/index.d.ts.map +1 -1
- package/dist/field/features/link/plugins/link/index.js +2 -2
- package/dist/field/features/link/plugins/link/index.js.map +1 -1
- package/dist/field/features/link/populationPromise.d.ts.map +1 -1
- package/dist/field/features/link/populationPromise.js +2 -1
- package/dist/field/features/link/populationPromise.js.map +1 -1
- package/dist/field/features/link/validate.js.map +1 -1
- package/dist/field/features/lists/checklist/feature.client.d.ts.map +1 -1
- package/dist/field/features/lists/checklist/feature.client.js +44 -19
- package/dist/field/features/lists/checklist/feature.client.js.map +1 -1
- package/dist/field/features/lists/checklist/plugin/index.d.ts +2 -2
- package/dist/field/features/lists/checklist/plugin/index.d.ts.map +1 -1
- package/dist/field/features/lists/checklist/plugin/index.js +2 -2
- package/dist/field/features/lists/checklist/plugin/index.js.map +1 -1
- package/dist/field/features/lists/orderedList/feature.client.d.ts.map +1 -1
- package/dist/field/features/lists/orderedList/feature.client.js +44 -19
- package/dist/field/features/lists/orderedList/feature.client.js.map +1 -1
- package/dist/field/features/lists/plugin/index.d.ts +2 -2
- package/dist/field/features/lists/plugin/index.d.ts.map +1 -1
- package/dist/field/features/lists/plugin/index.js +2 -2
- package/dist/field/features/lists/plugin/index.js.map +1 -1
- package/dist/field/features/lists/unorderedList/feature.client.d.ts.map +1 -1
- package/dist/field/features/lists/unorderedList/feature.client.js +44 -19
- package/dist/field/features/lists/unorderedList/feature.client.js.map +1 -1
- package/dist/field/features/migrations/slateToLexical/converter/converters/blockquote/client.d.ts +1 -1
- package/dist/field/features/migrations/slateToLexical/converter/converters/blockquote/client.js +1 -1
- package/dist/field/features/migrations/slateToLexical/converter/converters/blockquote/client.js.map +1 -1
- package/dist/field/features/migrations/slateToLexical/converter/converters/blockquote/index.js +2 -2
- package/dist/field/features/migrations/slateToLexical/converter/converters/blockquote/index.js.map +1 -1
- package/dist/field/features/paragraph/feature.client.d.ts.map +1 -1
- package/dist/field/features/paragraph/feature.client.js +36 -22
- package/dist/field/features/paragraph/feature.client.js.map +1 -1
- package/dist/field/features/relationship/feature.client.d.ts.map +1 -1
- package/dist/field/features/relationship/feature.client.js +31 -9
- package/dist/field/features/relationship/feature.client.js.map +1 -1
- package/dist/field/features/relationship/feature.server.d.ts +10 -1
- package/dist/field/features/relationship/feature.server.d.ts.map +1 -1
- package/dist/field/features/relationship/feature.server.js +2 -2
- package/dist/field/features/relationship/feature.server.js.map +1 -1
- package/dist/field/features/relationship/nodes/components/RelationshipComponent.d.ts.map +1 -1
- package/dist/field/features/relationship/nodes/components/RelationshipComponent.js +4 -2
- package/dist/field/features/relationship/nodes/components/RelationshipComponent.js.map +1 -1
- package/dist/field/features/relationship/plugins/index.d.ts +2 -2
- package/dist/field/features/relationship/plugins/index.d.ts.map +1 -1
- package/dist/field/features/relationship/plugins/index.js +6 -6
- package/dist/field/features/relationship/plugins/index.js.map +1 -1
- package/dist/field/features/relationship/populationPromise.d.ts +2 -1
- package/dist/field/features/relationship/populationPromise.d.ts.map +1 -1
- package/dist/field/features/relationship/populationPromise.js +25 -20
- package/dist/field/features/relationship/populationPromise.js.map +1 -1
- package/dist/field/features/shared/toolbar/addDropdownGroup.d.ts +3 -0
- package/dist/field/features/shared/toolbar/addDropdownGroup.d.ts.map +1 -0
- package/dist/field/features/shared/toolbar/addDropdownGroup.js +12 -0
- package/dist/field/features/shared/toolbar/addDropdownGroup.js.map +1 -0
- package/dist/field/features/shared/toolbar/featureButtonsGroup.d.ts +3 -0
- package/dist/field/features/shared/toolbar/featureButtonsGroup.d.ts.map +1 -0
- package/dist/field/features/shared/toolbar/featureButtonsGroup.js +10 -0
- package/dist/field/features/shared/toolbar/featureButtonsGroup.js.map +1 -0
- package/dist/field/features/shared/toolbar/textDropdownGroup.d.ts +3 -0
- package/dist/field/features/shared/toolbar/textDropdownGroup.d.ts.map +1 -0
- package/dist/field/features/shared/{inlineToolbar → toolbar}/textDropdownGroup.js +2 -2
- package/dist/field/features/shared/toolbar/textDropdownGroup.js.map +1 -0
- package/dist/field/features/toolbars/fixed/Toolbar/index.d.ts +4 -0
- package/dist/field/features/toolbars/fixed/Toolbar/index.d.ts.map +1 -0
- package/dist/field/features/toolbars/fixed/Toolbar/index.js +152 -0
- package/dist/field/features/toolbars/fixed/Toolbar/index.js.map +1 -0
- package/dist/field/features/toolbars/fixed/Toolbar/index.scss +81 -0
- package/dist/field/features/toolbars/fixed/feature.client.d.ts +3 -0
- package/dist/field/features/toolbars/fixed/feature.client.d.ts.map +1 -0
- package/dist/field/features/toolbars/fixed/feature.client.js +20 -0
- package/dist/field/features/toolbars/fixed/feature.client.js.map +1 -0
- package/dist/field/features/toolbars/fixed/feature.server.d.ts +3 -0
- package/dist/field/features/toolbars/fixed/feature.server.d.ts.map +1 -0
- package/dist/field/features/toolbars/fixed/feature.server.js +16 -0
- package/dist/field/features/toolbars/fixed/feature.server.js.map +1 -0
- package/dist/field/features/toolbars/inline/Toolbar/index.d.ts +4 -0
- package/dist/field/features/toolbars/inline/Toolbar/index.d.ts.map +1 -0
- package/dist/field/{lexical/plugins → features}/toolbars/inline/Toolbar/index.js +67 -23
- package/dist/field/features/toolbars/inline/Toolbar/index.js.map +1 -0
- package/dist/field/{lexical/plugins → features}/toolbars/inline/Toolbar/index.scss +3 -8
- package/dist/field/features/toolbars/inline/feature.client.d.ts +3 -0
- package/dist/field/features/toolbars/inline/feature.client.d.ts.map +1 -0
- package/dist/field/features/toolbars/inline/feature.client.js +20 -0
- package/dist/field/features/toolbars/inline/feature.client.js.map +1 -0
- package/dist/field/features/toolbars/inline/feature.server.d.ts +3 -0
- package/dist/field/features/toolbars/inline/feature.server.d.ts.map +1 -0
- package/dist/field/features/toolbars/inline/feature.server.js +16 -0
- package/dist/field/features/toolbars/inline/feature.server.js.map +1 -0
- package/dist/field/features/toolbars/shared/ToolbarButton/index.d.ts +10 -0
- package/dist/field/features/toolbars/shared/ToolbarButton/index.d.ts.map +1 -0
- package/dist/field/{lexical/plugins/toolbars/inline → features/toolbars/shared}/ToolbarButton/index.js +21 -8
- package/dist/field/features/toolbars/shared/ToolbarButton/index.js.map +1 -0
- package/dist/field/{lexical/plugins/toolbars/inline → features/toolbars/shared}/ToolbarButton/index.scss +3 -1
- package/dist/field/features/toolbars/shared/ToolbarDropdown/DropDown.d.ts +23 -0
- package/dist/field/features/toolbars/shared/ToolbarDropdown/DropDown.d.ts.map +1 -0
- package/dist/field/{lexical/plugins/toolbars/inline → features/toolbars/shared}/ToolbarDropdown/DropDown.js +25 -67
- package/dist/field/features/toolbars/shared/ToolbarDropdown/DropDown.js.map +1 -0
- package/dist/field/features/toolbars/shared/ToolbarDropdown/index.d.ts +23 -0
- package/dist/field/features/toolbars/shared/ToolbarDropdown/index.d.ts.map +1 -0
- package/dist/field/features/toolbars/shared/ToolbarDropdown/index.js +139 -0
- package/dist/field/features/toolbars/shared/ToolbarDropdown/index.js.map +1 -0
- package/dist/field/{lexical/plugins/toolbars/inline → features/toolbars/shared}/ToolbarDropdown/index.scss +25 -13
- package/dist/field/{lexical/plugins/toolbars/inline → features/toolbars}/types.d.ts +16 -8
- package/dist/field/features/toolbars/types.d.ts.map +1 -0
- package/dist/field/features/toolbars/types.js.map +1 -0
- package/dist/field/features/types.d.ts +27 -19
- package/dist/field/features/types.d.ts.map +1 -1
- package/dist/field/features/types.js.map +1 -1
- package/dist/field/features/upload/component/index.d.ts.map +1 -1
- package/dist/field/features/upload/component/index.js +6 -2
- package/dist/field/features/upload/component/index.js.map +1 -1
- package/dist/field/features/upload/feature.client.d.ts.map +1 -1
- package/dist/field/features/upload/feature.client.js +29 -4
- package/dist/field/features/upload/feature.client.js.map +1 -1
- package/dist/field/features/upload/feature.server.d.ts +10 -3
- package/dist/field/features/upload/feature.server.d.ts.map +1 -1
- package/dist/field/features/upload/feature.server.js +2 -2
- package/dist/field/features/upload/feature.server.js.map +1 -1
- package/dist/field/features/upload/nodes/UploadNode.d.ts.map +1 -1
- package/dist/field/features/upload/nodes/UploadNode.js +18 -2
- package/dist/field/features/upload/nodes/UploadNode.js.map +1 -1
- package/dist/field/features/upload/plugin/index.d.ts +3 -2
- package/dist/field/features/upload/plugin/index.d.ts.map +1 -1
- package/dist/field/features/upload/plugin/index.js +2 -2
- package/dist/field/features/upload/plugin/index.js.map +1 -1
- package/dist/field/features/upload/populationPromise.d.ts.map +1 -1
- package/dist/field/features/upload/populationPromise.js +5 -2
- package/dist/field/features/upload/populationPromise.js.map +1 -1
- package/dist/field/features/upload/validate.d.ts.map +1 -1
- package/dist/field/features/upload/validate.js +3 -0
- package/dist/field/features/upload/validate.js.map +1 -1
- package/dist/field/lexical/EditorFocusProvider.d.ts +20 -0
- package/dist/field/lexical/EditorFocusProvider.d.ts.map +1 -0
- package/dist/field/lexical/EditorFocusProvider.js +78 -0
- package/dist/field/lexical/EditorFocusProvider.js.map +1 -0
- package/dist/field/lexical/EditorPlugin.d.ts +1 -0
- package/dist/field/lexical/EditorPlugin.d.ts.map +1 -1
- package/dist/field/lexical/EditorPlugin.js +6 -3
- package/dist/field/lexical/EditorPlugin.js.map +1 -1
- package/dist/field/lexical/LexicalEditor.d.ts.map +1 -1
- package/dist/field/lexical/LexicalEditor.js +25 -4
- package/dist/field/lexical/LexicalEditor.js.map +1 -1
- package/dist/field/lexical/LexicalProvider.d.ts.map +1 -1
- package/dist/field/lexical/LexicalProvider.js +3 -2
- package/dist/field/lexical/LexicalProvider.js.map +1 -1
- package/dist/field/lexical/config/client/EditorConfigProvider.d.ts +2 -3
- package/dist/field/lexical/config/client/EditorConfigProvider.d.ts.map +1 -1
- package/dist/field/lexical/config/client/EditorConfigProvider.js.map +1 -1
- package/dist/field/lexical/config/client/sanitize.d.ts.map +1 -1
- package/dist/field/lexical/config/client/sanitize.js +1 -0
- package/dist/field/lexical/config/client/sanitize.js.map +1 -1
- package/dist/field/lexical/config/server/default.d.ts.map +1 -1
- package/dist/field/lexical/config/server/default.js +5 -3
- package/dist/field/lexical/config/server/default.js.map +1 -1
- package/dist/field/lexical/config/server/loader.d.ts +2 -1
- package/dist/field/lexical/config/server/loader.d.ts.map +1 -1
- package/dist/field/lexical/config/server/loader.js +2 -1
- package/dist/field/lexical/config/server/loader.js.map +1 -1
- package/dist/field/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/types.d.ts +6 -6
- package/dist/field/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/types.d.ts.map +1 -1
- package/dist/field/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/types.js.map +1 -1
- package/dist/field/lexical/plugins/SlashMenu/index.d.ts.map +1 -1
- package/dist/field/lexical/plugins/SlashMenu/index.js +10 -10
- package/dist/field/lexical/plugins/SlashMenu/index.js.map +1 -1
- package/dist/field/lexical/plugins/handles/DraggableBlockPlugin/getNodeCloseToPoint.d.ts +1 -1
- package/dist/field/lexical/plugins/handles/DraggableBlockPlugin/getNodeCloseToPoint.d.ts.map +1 -1
- package/dist/field/lexical/plugins/handles/DraggableBlockPlugin/getNodeCloseToPoint.js +2 -2
- package/dist/field/lexical/plugins/handles/DraggableBlockPlugin/getNodeCloseToPoint.js.map +1 -1
- package/dist/field/lexical/plugins/handles/DraggableBlockPlugin/index.d.ts.map +1 -1
- package/dist/field/lexical/plugins/handles/DraggableBlockPlugin/index.js +6 -3
- package/dist/field/lexical/plugins/handles/DraggableBlockPlugin/index.js.map +1 -1
- package/dist/field/lexical/plugins/handles/DraggableBlockPlugin/index.scss +8 -0
- package/dist/field/lexical/plugins/handles/DraggableBlockPlugin/setTargetLine.d.ts.map +1 -1
- package/dist/field/lexical/plugins/handles/DraggableBlockPlugin/setTargetLine.js +25 -6
- package/dist/field/lexical/plugins/handles/DraggableBlockPlugin/setTargetLine.js.map +1 -1
- package/dist/field/lexical/ui/icons/Add/index.d.ts +3 -0
- package/dist/field/lexical/ui/icons/Add/index.d.ts.map +1 -0
- package/dist/field/lexical/ui/icons/Add/index.js +16 -0
- package/dist/field/lexical/ui/icons/Add/index.js.map +1 -0
- package/dist/field/lexical/utils/setFloatingElemPosition.d.ts +11 -1
- package/dist/field/lexical/utils/setFloatingElemPosition.d.ts.map +1 -1
- package/dist/field/lexical/utils/setFloatingElemPosition.js +3 -2
- package/dist/field/lexical/utils/setFloatingElemPosition.js.map +1 -1
- package/dist/index.d.ts +11 -9
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +11 -7
- package/dist/index.js.map +1 -1
- package/dist/populate/populate.d.ts +2 -1
- package/dist/populate/populate.d.ts.map +1 -1
- package/dist/populate/populate.js +13 -11
- package/dist/populate/populate.js.map +1 -1
- package/dist/populate/populateLexicalPopulationPromises.d.ts +1 -1
- package/dist/populate/populateLexicalPopulationPromises.d.ts.map +1 -1
- package/dist/populate/populateLexicalPopulationPromises.js +2 -1
- package/dist/populate/populateLexicalPopulationPromises.js.map +1 -1
- package/dist/populate/recurseNestedFields.d.ts +2 -1
- package/dist/populate/recurseNestedFields.d.ts.map +1 -1
- package/dist/populate/recurseNestedFields.js +2 -1
- package/dist/populate/recurseNestedFields.js.map +1 -1
- package/dist/types.d.ts +2 -1
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js.map +1 -1
- package/package.json +11 -11
- package/dist/field/features/align/inlineToolbarAlignGroup.d.ts +0 -3
- package/dist/field/features/align/inlineToolbarAlignGroup.d.ts.map +0 -1
- package/dist/field/features/align/inlineToolbarAlignGroup.js.map +0 -1
- package/dist/field/features/format/shared/inlineToolbarFormatGroup.d.ts +0 -3
- package/dist/field/features/format/shared/inlineToolbarFormatGroup.d.ts.map +0 -1
- package/dist/field/features/format/shared/inlineToolbarFormatGroup.js +0 -10
- package/dist/field/features/format/shared/inlineToolbarFormatGroup.js.map +0 -1
- package/dist/field/features/indent/inlineToolbarIndentGroup.d.ts +0 -3
- package/dist/field/features/indent/inlineToolbarIndentGroup.d.ts.map +0 -1
- package/dist/field/features/indent/inlineToolbarIndentGroup.js +0 -10
- package/dist/field/features/indent/inlineToolbarIndentGroup.js.map +0 -1
- package/dist/field/features/shared/inlineToolbar/featureButtonsGroup.d.ts +0 -3
- package/dist/field/features/shared/inlineToolbar/featureButtonsGroup.d.ts.map +0 -1
- package/dist/field/features/shared/inlineToolbar/featureButtonsGroup.js +0 -10
- package/dist/field/features/shared/inlineToolbar/featureButtonsGroup.js.map +0 -1
- package/dist/field/features/shared/inlineToolbar/textDropdownGroup.d.ts +0 -3
- package/dist/field/features/shared/inlineToolbar/textDropdownGroup.d.ts.map +0 -1
- package/dist/field/features/shared/inlineToolbar/textDropdownGroup.js.map +0 -1
- package/dist/field/lexical/plugins/toolbars/fixed/types.d.ts +0 -40
- package/dist/field/lexical/plugins/toolbars/fixed/types.d.ts.map +0 -1
- package/dist/field/lexical/plugins/toolbars/fixed/types.js.map +0 -1
- package/dist/field/lexical/plugins/toolbars/inline/Toolbar/index.d.ts +0 -6
- package/dist/field/lexical/plugins/toolbars/inline/Toolbar/index.d.ts.map +0 -1
- package/dist/field/lexical/plugins/toolbars/inline/Toolbar/index.js.map +0 -1
- package/dist/field/lexical/plugins/toolbars/inline/ToolbarButton/index.d.ts +0 -8
- package/dist/field/lexical/plugins/toolbars/inline/ToolbarButton/index.d.ts.map +0 -1
- package/dist/field/lexical/plugins/toolbars/inline/ToolbarButton/index.js.map +0 -1
- package/dist/field/lexical/plugins/toolbars/inline/ToolbarDropdown/DropDown.d.ts +0 -17
- package/dist/field/lexical/plugins/toolbars/inline/ToolbarDropdown/DropDown.d.ts.map +0 -1
- package/dist/field/lexical/plugins/toolbars/inline/ToolbarDropdown/DropDown.js.map +0 -1
- package/dist/field/lexical/plugins/toolbars/inline/ToolbarDropdown/index.d.ts +0 -18
- package/dist/field/lexical/plugins/toolbars/inline/ToolbarDropdown/index.d.ts.map +0 -1
- package/dist/field/lexical/plugins/toolbars/inline/ToolbarDropdown/index.js +0 -42
- package/dist/field/lexical/plugins/toolbars/inline/ToolbarDropdown/index.js.map +0 -1
- package/dist/field/lexical/plugins/toolbars/inline/types.d.ts.map +0 -1
- package/dist/field/lexical/plugins/toolbars/inline/types.js +0 -3
- package/dist/field/lexical/plugins/toolbars/inline/types.js.map +0 -1
- /package/dist/field/{lexical/plugins/toolbars/fixed → features/toolbars}/types.js +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../src/field/features/lists/checklist/feature.client.tsx"],"sourcesContent":["'use client'\nimport { INSERT_CHECK_LIST_COMMAND, ListItemNode, ListNode } from '@lexical/list'\n\nimport type { ClientFeature, FeatureProviderProviderClient } from '../../types.js'\n\nimport { ChecklistIcon } from '../../../lexical/ui/icons/Checklist/index.js'\nimport { createClientComponent } from '../../createClientComponent.js'\nimport {
|
|
1
|
+
{"version":3,"sources":["../../../../../src/field/features/lists/checklist/feature.client.tsx"],"sourcesContent":["'use client'\nimport { $isListNode, INSERT_CHECK_LIST_COMMAND, ListItemNode, ListNode } from '@lexical/list'\nimport { $isRangeSelection } from 'lexical'\n\nimport type { ToolbarGroup } from '../../toolbars/types.js'\nimport type { ClientFeature, FeatureProviderProviderClient } from '../../types.js'\n\nimport { ChecklistIcon } from '../../../lexical/ui/icons/Checklist/index.js'\nimport { createClientComponent } from '../../createClientComponent.js'\nimport { toolbarTextDropdownGroupWithItems } from '../../shared/toolbar/textDropdownGroup.js'\nimport { LexicalListPlugin } from '../plugin/index.js'\nimport { CHECK_LIST } from './markdownTransformers.js'\nimport { LexicalCheckListPlugin } from './plugin/index.js'\n\nconst toolbarGroups: ToolbarGroup[] = [\n toolbarTextDropdownGroupWithItems([\n {\n ChildComponent: ChecklistIcon,\n isActive: ({ selection }) => {\n if (!$isRangeSelection(selection)) {\n return false\n }\n for (const node of selection.getNodes()) {\n if ($isListNode(node) && node.getListType() === 'check') {\n continue\n }\n\n const parent = node.getParent()\n\n if ($isListNode(parent) && parent.getListType() === 'check') {\n continue\n }\n\n const parentParent = parent?.getParent()\n // Example scenario: Node = textNode, parent = listItemNode, parentParent = listNode\n if ($isListNode(parentParent) && parentParent.getListType() === 'check') {\n continue\n }\n\n return false\n }\n return true\n },\n key: 'checklist',\n label: `Check List`,\n onSelect: ({ editor }) => {\n editor.dispatchCommand(INSERT_CHECK_LIST_COMMAND, undefined)\n },\n order: 12,\n },\n ]),\n]\n\nconst ChecklistFeatureClient: FeatureProviderProviderClient<undefined> = (props) => {\n return {\n clientFeatureProps: props,\n feature: ({ featureProviderMap }) => {\n const plugins: ClientFeature<undefined>['plugins'] = [\n {\n Component: LexicalCheckListPlugin,\n position: 'normal',\n },\n ]\n\n if (!featureProviderMap.has('unorderedList') && !featureProviderMap.has('orderedList')) {\n plugins.push({\n Component: LexicalListPlugin,\n position: 'normal',\n })\n }\n\n return {\n clientFeatureProps: props,\n markdownTransformers: [CHECK_LIST],\n nodes:\n featureProviderMap.has('unorderedList') || featureProviderMap.has('orderedList')\n ? []\n : [ListNode, ListItemNode],\n plugins,\n slashMenu: {\n groups: [\n {\n items: [\n {\n Icon: ChecklistIcon,\n key: 'checklist',\n keywords: ['check list', 'check', 'checklist', 'cl'],\n label: 'Check List',\n onSelect: ({ editor }) => {\n editor.dispatchCommand(INSERT_CHECK_LIST_COMMAND, undefined)\n },\n },\n ],\n key: 'lists',\n label: 'Lists',\n },\n ],\n },\n toolbarFixed: {\n groups: toolbarGroups,\n },\n toolbarInline: {\n groups: toolbarGroups,\n },\n }\n },\n }\n}\n\nexport const ChecklistFeatureClientComponent = createClientComponent(ChecklistFeatureClient)\n"],"names":["$isListNode","INSERT_CHECK_LIST_COMMAND","ListItemNode","ListNode","$isRangeSelection","ChecklistIcon","createClientComponent","toolbarTextDropdownGroupWithItems","LexicalListPlugin","CHECK_LIST","LexicalCheckListPlugin","toolbarGroups","ChildComponent","isActive","selection","node","getNodes","getListType","parent","getParent","parentParent","key","label","onSelect","editor","dispatchCommand","undefined","order","ChecklistFeatureClient","props","clientFeatureProps","feature","featureProviderMap","plugins","Component","position","has","push","markdownTransformers","nodes","slashMenu","groups","items","Icon","keywords","toolbarFixed","toolbarInline","ChecklistFeatureClientComponent"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA;AACA,SAASA,WAAW,EAAEC,yBAAyB,EAAEC,YAAY,EAAEC,QAAQ,QAAQ,gBAAe;AAC9F,SAASC,iBAAiB,QAAQ,UAAS;AAK3C,SAASC,aAAa,QAAQ,+CAA8C;AAC5E,SAASC,qBAAqB,QAAQ,iCAAgC;AACtE,SAASC,iCAAiC,QAAQ,4CAA2C;AAC7F,SAASC,iBAAiB,QAAQ,qBAAoB;AACtD,SAASC,UAAU,QAAQ,4BAA2B;AACtD,SAASC,sBAAsB,QAAQ,oBAAmB;AAE1D,MAAMC,gBAAgC;IACpCJ,kCAAkC;QAChC;YACEK,gBAAgBP;YAChBQ,UAAU,CAAC,EAAEC,SAAS,EAAE;gBACtB,IAAI,CAACV,kBAAkBU,YAAY;oBACjC,OAAO;gBACT;gBACA,KAAK,MAAMC,QAAQD,UAAUE,QAAQ,GAAI;oBACvC,IAAIhB,YAAYe,SAASA,KAAKE,WAAW,OAAO,SAAS;wBACvD;oBACF;oBAEA,MAAMC,SAASH,KAAKI,SAAS;oBAE7B,IAAInB,YAAYkB,WAAWA,OAAOD,WAAW,OAAO,SAAS;wBAC3D;oBACF;oBAEA,MAAMG,eAAeF,QAAQC;oBAC7B,oFAAoF;oBACpF,IAAInB,YAAYoB,iBAAiBA,aAAaH,WAAW,OAAO,SAAS;wBACvE;oBACF;oBAEA,OAAO;gBACT;gBACA,OAAO;YACT;YACAI,KAAK;YACLC,OAAO,CAAC,UAAU,CAAC;YACnBC,UAAU,CAAC,EAAEC,MAAM,EAAE;gBACnBA,OAAOC,eAAe,CAACxB,2BAA2ByB;YACpD;YACAC,OAAO;QACT;KACD;CACF;AAED,MAAMC,yBAAmE,CAACC;IACxE,OAAO;QACLC,oBAAoBD;QACpBE,SAAS,CAAC,EAAEC,kBAAkB,EAAE;YAC9B,MAAMC,UAA+C;gBACnD;oBACEC,WAAWxB;oBACXyB,UAAU;gBACZ;aACD;YAED,IAAI,CAACH,mBAAmBI,GAAG,CAAC,oBAAoB,CAACJ,mBAAmBI,GAAG,CAAC,gBAAgB;gBACtFH,QAAQI,IAAI,CAAC;oBACXH,WAAW1B;oBACX2B,UAAU;gBACZ;YACF;YAEA,OAAO;gBACLL,oBAAoBD;gBACpBS,sBAAsB;oBAAC7B;iBAAW;gBAClC8B,OACEP,mBAAmBI,GAAG,CAAC,oBAAoBJ,mBAAmBI,GAAG,CAAC,iBAC9D,EAAE,GACF;oBAACjC;oBAAUD;iBAAa;gBAC9B+B;gBACAO,WAAW;oBACTC,QAAQ;wBACN;4BACEC,OAAO;gCACL;oCACEC,MAAMtC;oCACNgB,KAAK;oCACLuB,UAAU;wCAAC;wCAAc;wCAAS;wCAAa;qCAAK;oCACpDtB,OAAO;oCACPC,UAAU,CAAC,EAAEC,MAAM,EAAE;wCACnBA,OAAOC,eAAe,CAACxB,2BAA2ByB;oCACpD;gCACF;6BACD;4BACDL,KAAK;4BACLC,OAAO;wBACT;qBACD;gBACH;gBACAuB,cAAc;oBACZJ,QAAQ9B;gBACV;gBACAmC,eAAe;oBACbL,QAAQ9B;gBACV;YACF;QACF;IACF;AACF;AAEA,OAAO,MAAMoC,kCAAkCzC,sBAAsBsB,wBAAuB"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import
|
|
2
|
-
export declare
|
|
1
|
+
import type { PluginComponent } from '../../../types.js';
|
|
2
|
+
export declare const LexicalCheckListPlugin: PluginComponent<undefined>;
|
|
3
3
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/field/features/lists/checklist/plugin/index.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/field/features/lists/checklist/plugin/index.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAA;AAExD,eAAO,MAAM,sBAAsB,EAAE,eAAe,CAAC,SAAS,CAE7D,CAAA"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { CheckListPlugin } from '@lexical/react/LexicalCheckListPlugin.js';
|
|
3
3
|
import React from 'react';
|
|
4
|
-
export
|
|
4
|
+
export const LexicalCheckListPlugin = ()=>{
|
|
5
5
|
return /*#__PURE__*/ React.createElement(CheckListPlugin, null);
|
|
6
|
-
}
|
|
6
|
+
};
|
|
7
7
|
|
|
8
8
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../../src/field/features/lists/checklist/plugin/index.tsx"],"sourcesContent":["'use client'\nimport { CheckListPlugin } from '@lexical/react/LexicalCheckListPlugin.js'\nimport React from 'react'\n\nexport
|
|
1
|
+
{"version":3,"sources":["../../../../../../src/field/features/lists/checklist/plugin/index.tsx"],"sourcesContent":["'use client'\nimport { CheckListPlugin } from '@lexical/react/LexicalCheckListPlugin.js'\nimport React from 'react'\n\nimport type { PluginComponent } from '../../../types.js'\n\nexport const LexicalCheckListPlugin: PluginComponent<undefined> = () => {\n return <CheckListPlugin />\n}\n"],"names":["CheckListPlugin","React","LexicalCheckListPlugin"],"rangeMappings":";;;;;","mappings":"AAAA;AACA,SAASA,eAAe,QAAQ,2CAA0C;AAC1E,OAAOC,WAAW,QAAO;AAIzB,OAAO,MAAMC,yBAAqD;IAChE,qBAAO,oBAACF;AACV,EAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"feature.client.d.ts","sourceRoot":"","sources":["../../../../../src/field/features/lists/orderedList/feature.client.tsx"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"feature.client.d.ts","sourceRoot":"","sources":["../../../../../src/field/features/lists/orderedList/feature.client.tsx"],"names":[],"mappings":";AAkGA,eAAO,MAAM,iCAAiC,+BAAkD,CAAA"}
|
|
@@ -1,10 +1,45 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import { INSERT_ORDERED_LIST_COMMAND, ListItemNode, ListNode } from '@lexical/list';
|
|
2
|
+
import { $isListNode, INSERT_ORDERED_LIST_COMMAND, ListItemNode, ListNode } from '@lexical/list';
|
|
3
|
+
import { $isRangeSelection } from 'lexical';
|
|
3
4
|
import { OrderedListIcon } from '../../../lexical/ui/icons/OrderedList/index.js';
|
|
4
5
|
import { createClientComponent } from '../../createClientComponent.js';
|
|
5
|
-
import {
|
|
6
|
+
import { toolbarTextDropdownGroupWithItems } from '../../shared/toolbar/textDropdownGroup.js';
|
|
6
7
|
import { LexicalListPlugin } from '../plugin/index.js';
|
|
7
8
|
import { ORDERED_LIST } from './markdownTransformer.js';
|
|
9
|
+
const toolbarGroups = [
|
|
10
|
+
toolbarTextDropdownGroupWithItems([
|
|
11
|
+
{
|
|
12
|
+
ChildComponent: OrderedListIcon,
|
|
13
|
+
isActive: ({ selection })=>{
|
|
14
|
+
if (!$isRangeSelection(selection)) {
|
|
15
|
+
return false;
|
|
16
|
+
}
|
|
17
|
+
for (const node of selection.getNodes()){
|
|
18
|
+
if ($isListNode(node) && node.getListType() === 'number') {
|
|
19
|
+
continue;
|
|
20
|
+
}
|
|
21
|
+
const parent = node.getParent();
|
|
22
|
+
if ($isListNode(parent) && parent.getListType() === 'number') {
|
|
23
|
+
continue;
|
|
24
|
+
}
|
|
25
|
+
const parentParent = parent?.getParent();
|
|
26
|
+
// Example scenario: Node = textNode, parent = listItemNode, parentParent = listNode
|
|
27
|
+
if ($isListNode(parentParent) && parentParent.getListType() === 'number') {
|
|
28
|
+
continue;
|
|
29
|
+
}
|
|
30
|
+
return false;
|
|
31
|
+
}
|
|
32
|
+
return true;
|
|
33
|
+
},
|
|
34
|
+
key: 'orderedList',
|
|
35
|
+
label: `Ordered List`,
|
|
36
|
+
onSelect: ({ editor })=>{
|
|
37
|
+
editor.dispatchCommand(INSERT_ORDERED_LIST_COMMAND, undefined);
|
|
38
|
+
},
|
|
39
|
+
order: 10
|
|
40
|
+
}
|
|
41
|
+
])
|
|
42
|
+
];
|
|
8
43
|
const OrderedListFeatureClient = (props)=>{
|
|
9
44
|
return {
|
|
10
45
|
clientFeatureProps: props,
|
|
@@ -27,40 +62,30 @@ const OrderedListFeatureClient = (props)=>{
|
|
|
27
62
|
slashMenu: {
|
|
28
63
|
groups: [
|
|
29
64
|
{
|
|
30
|
-
displayName: 'Lists',
|
|
31
65
|
items: [
|
|
32
66
|
{
|
|
33
67
|
Icon: OrderedListIcon,
|
|
34
|
-
displayName: 'Ordered List',
|
|
35
68
|
key: 'orderedList',
|
|
36
69
|
keywords: [
|
|
37
70
|
'ordered list',
|
|
38
71
|
'ol'
|
|
39
72
|
],
|
|
73
|
+
label: 'Ordered List',
|
|
40
74
|
onSelect: ({ editor })=>{
|
|
41
75
|
editor.dispatchCommand(INSERT_ORDERED_LIST_COMMAND, undefined);
|
|
42
76
|
}
|
|
43
77
|
}
|
|
44
78
|
],
|
|
45
|
-
key: 'lists'
|
|
79
|
+
key: 'lists',
|
|
80
|
+
label: 'Lists'
|
|
46
81
|
}
|
|
47
82
|
]
|
|
48
83
|
},
|
|
84
|
+
toolbarFixed: {
|
|
85
|
+
groups: toolbarGroups
|
|
86
|
+
},
|
|
49
87
|
toolbarInline: {
|
|
50
|
-
groups:
|
|
51
|
-
inlineToolbarTextDropdownGroupWithItems([
|
|
52
|
-
{
|
|
53
|
-
ChildComponent: OrderedListIcon,
|
|
54
|
-
isActive: ()=>false,
|
|
55
|
-
key: 'orderedList',
|
|
56
|
-
label: `Ordered List`,
|
|
57
|
-
onSelect: ({ editor })=>{
|
|
58
|
-
editor.dispatchCommand(INSERT_ORDERED_LIST_COMMAND, undefined);
|
|
59
|
-
},
|
|
60
|
-
order: 10
|
|
61
|
-
}
|
|
62
|
-
])
|
|
63
|
-
]
|
|
88
|
+
groups: toolbarGroups
|
|
64
89
|
}
|
|
65
90
|
};
|
|
66
91
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../src/field/features/lists/orderedList/feature.client.tsx"],"sourcesContent":["'use client'\nimport { INSERT_ORDERED_LIST_COMMAND, ListItemNode, ListNode } from '@lexical/list'\n\nimport type { FeatureProviderProviderClient } from '../../types.js'\n\nimport { OrderedListIcon } from '../../../lexical/ui/icons/OrderedList/index.js'\nimport { createClientComponent } from '../../createClientComponent.js'\nimport {
|
|
1
|
+
{"version":3,"sources":["../../../../../src/field/features/lists/orderedList/feature.client.tsx"],"sourcesContent":["'use client'\nimport { $isListNode, INSERT_ORDERED_LIST_COMMAND, ListItemNode, ListNode } from '@lexical/list'\nimport { $isRangeSelection } from 'lexical'\n\nimport type { ToolbarGroup } from '../../toolbars/types.js'\nimport type { FeatureProviderProviderClient } from '../../types.js'\n\nimport { OrderedListIcon } from '../../../lexical/ui/icons/OrderedList/index.js'\nimport { createClientComponent } from '../../createClientComponent.js'\nimport { toolbarTextDropdownGroupWithItems } from '../../shared/toolbar/textDropdownGroup.js'\nimport { LexicalListPlugin } from '../plugin/index.js'\nimport { ORDERED_LIST } from './markdownTransformer.js'\n\nconst toolbarGroups: ToolbarGroup[] = [\n toolbarTextDropdownGroupWithItems([\n {\n ChildComponent: OrderedListIcon,\n isActive: ({ selection }) => {\n if (!$isRangeSelection(selection)) {\n return false\n }\n for (const node of selection.getNodes()) {\n if ($isListNode(node) && node.getListType() === 'number') {\n continue\n }\n\n const parent = node.getParent()\n\n if ($isListNode(parent) && parent.getListType() === 'number') {\n continue\n }\n\n const parentParent = parent?.getParent()\n // Example scenario: Node = textNode, parent = listItemNode, parentParent = listNode\n if ($isListNode(parentParent) && parentParent.getListType() === 'number') {\n continue\n }\n\n return false\n }\n return true\n },\n key: 'orderedList',\n label: `Ordered List`,\n onSelect: ({ editor }) => {\n editor.dispatchCommand(INSERT_ORDERED_LIST_COMMAND, undefined)\n },\n order: 10,\n },\n ]),\n]\n\nconst OrderedListFeatureClient: FeatureProviderProviderClient<undefined> = (props) => {\n return {\n clientFeatureProps: props,\n feature: ({ featureProviderMap }) => {\n return {\n clientFeatureProps: props,\n markdownTransformers: [ORDERED_LIST],\n nodes: featureProviderMap.has('orderedList') ? [] : [ListNode, ListItemNode],\n plugins: featureProviderMap.has('orderedList')\n ? []\n : [\n {\n Component: LexicalListPlugin,\n position: 'normal',\n },\n ],\n slashMenu: {\n groups: [\n {\n items: [\n {\n Icon: OrderedListIcon,\n key: 'orderedList',\n keywords: ['ordered list', 'ol'],\n label: 'Ordered List',\n onSelect: ({ editor }) => {\n editor.dispatchCommand(INSERT_ORDERED_LIST_COMMAND, undefined)\n },\n },\n ],\n key: 'lists',\n label: 'Lists',\n },\n ],\n },\n toolbarFixed: {\n groups: toolbarGroups,\n },\n toolbarInline: {\n groups: toolbarGroups,\n },\n }\n },\n }\n}\n\nexport const OrderedListFeatureClientComponent = createClientComponent(OrderedListFeatureClient)\n"],"names":["$isListNode","INSERT_ORDERED_LIST_COMMAND","ListItemNode","ListNode","$isRangeSelection","OrderedListIcon","createClientComponent","toolbarTextDropdownGroupWithItems","LexicalListPlugin","ORDERED_LIST","toolbarGroups","ChildComponent","isActive","selection","node","getNodes","getListType","parent","getParent","parentParent","key","label","onSelect","editor","dispatchCommand","undefined","order","OrderedListFeatureClient","props","clientFeatureProps","feature","featureProviderMap","markdownTransformers","nodes","has","plugins","Component","position","slashMenu","groups","items","Icon","keywords","toolbarFixed","toolbarInline","OrderedListFeatureClientComponent"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA;AACA,SAASA,WAAW,EAAEC,2BAA2B,EAAEC,YAAY,EAAEC,QAAQ,QAAQ,gBAAe;AAChG,SAASC,iBAAiB,QAAQ,UAAS;AAK3C,SAASC,eAAe,QAAQ,iDAAgD;AAChF,SAASC,qBAAqB,QAAQ,iCAAgC;AACtE,SAASC,iCAAiC,QAAQ,4CAA2C;AAC7F,SAASC,iBAAiB,QAAQ,qBAAoB;AACtD,SAASC,YAAY,QAAQ,2BAA0B;AAEvD,MAAMC,gBAAgC;IACpCH,kCAAkC;QAChC;YACEI,gBAAgBN;YAChBO,UAAU,CAAC,EAAEC,SAAS,EAAE;gBACtB,IAAI,CAACT,kBAAkBS,YAAY;oBACjC,OAAO;gBACT;gBACA,KAAK,MAAMC,QAAQD,UAAUE,QAAQ,GAAI;oBACvC,IAAIf,YAAYc,SAASA,KAAKE,WAAW,OAAO,UAAU;wBACxD;oBACF;oBAEA,MAAMC,SAASH,KAAKI,SAAS;oBAE7B,IAAIlB,YAAYiB,WAAWA,OAAOD,WAAW,OAAO,UAAU;wBAC5D;oBACF;oBAEA,MAAMG,eAAeF,QAAQC;oBAC7B,oFAAoF;oBACpF,IAAIlB,YAAYmB,iBAAiBA,aAAaH,WAAW,OAAO,UAAU;wBACxE;oBACF;oBAEA,OAAO;gBACT;gBACA,OAAO;YACT;YACAI,KAAK;YACLC,OAAO,CAAC,YAAY,CAAC;YACrBC,UAAU,CAAC,EAAEC,MAAM,EAAE;gBACnBA,OAAOC,eAAe,CAACvB,6BAA6BwB;YACtD;YACAC,OAAO;QACT;KACD;CACF;AAED,MAAMC,2BAAqE,CAACC;IAC1E,OAAO;QACLC,oBAAoBD;QACpBE,SAAS,CAAC,EAAEC,kBAAkB,EAAE;YAC9B,OAAO;gBACLF,oBAAoBD;gBACpBI,sBAAsB;oBAACvB;iBAAa;gBACpCwB,OAAOF,mBAAmBG,GAAG,CAAC,iBAAiB,EAAE,GAAG;oBAAC/B;oBAAUD;iBAAa;gBAC5EiC,SAASJ,mBAAmBG,GAAG,CAAC,iBAC5B,EAAE,GACF;oBACE;wBACEE,WAAW5B;wBACX6B,UAAU;oBACZ;iBACD;gBACLC,WAAW;oBACTC,QAAQ;wBACN;4BACEC,OAAO;gCACL;oCACEC,MAAMpC;oCACNe,KAAK;oCACLsB,UAAU;wCAAC;wCAAgB;qCAAK;oCAChCrB,OAAO;oCACPC,UAAU,CAAC,EAAEC,MAAM,EAAE;wCACnBA,OAAOC,eAAe,CAACvB,6BAA6BwB;oCACtD;gCACF;6BACD;4BACDL,KAAK;4BACLC,OAAO;wBACT;qBACD;gBACH;gBACAsB,cAAc;oBACZJ,QAAQ7B;gBACV;gBACAkC,eAAe;oBACbL,QAAQ7B;gBACV;YACF;QACF;IACF;AACF;AAEA,OAAO,MAAMmC,oCAAoCvC,sBAAsBqB,0BAAyB"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import
|
|
2
|
-
export declare
|
|
1
|
+
import type { PluginComponent } from '../../types.js';
|
|
2
|
+
export declare const LexicalListPlugin: PluginComponent<undefined>;
|
|
3
3
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/field/features/lists/plugin/index.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/field/features/lists/plugin/index.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAA;AAErD,eAAO,MAAM,iBAAiB,EAAE,eAAe,CAAC,SAAS,CAExD,CAAA"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { ListPlugin } from '@lexical/react/LexicalListPlugin.js';
|
|
3
3
|
import React from 'react';
|
|
4
|
-
export
|
|
4
|
+
export const LexicalListPlugin = ()=>{
|
|
5
5
|
return /*#__PURE__*/ React.createElement(ListPlugin, null);
|
|
6
|
-
}
|
|
6
|
+
};
|
|
7
7
|
|
|
8
8
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../src/field/features/lists/plugin/index.tsx"],"sourcesContent":["'use client'\nimport { ListPlugin } from '@lexical/react/LexicalListPlugin.js'\nimport React from 'react'\n\nexport
|
|
1
|
+
{"version":3,"sources":["../../../../../src/field/features/lists/plugin/index.tsx"],"sourcesContent":["'use client'\nimport { ListPlugin } from '@lexical/react/LexicalListPlugin.js'\nimport React from 'react'\n\nimport type { PluginComponent } from '../../types.js'\n\nexport const LexicalListPlugin: PluginComponent<undefined> = () => {\n return <ListPlugin />\n}\n"],"names":["ListPlugin","React","LexicalListPlugin"],"rangeMappings":";;;;;","mappings":"AAAA;AACA,SAASA,UAAU,QAAQ,sCAAqC;AAChE,OAAOC,WAAW,QAAO;AAIzB,OAAO,MAAMC,oBAAgD;IAC3D,qBAAO,oBAACF;AACV,EAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"feature.client.d.ts","sourceRoot":"","sources":["../../../../../src/field/features/lists/unorderedList/feature.client.tsx"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"feature.client.d.ts","sourceRoot":"","sources":["../../../../../src/field/features/lists/unorderedList/feature.client.tsx"],"names":[],"mappings":";AAiGA,eAAO,MAAM,mCAAmC,+BAAoD,CAAA"}
|
|
@@ -1,10 +1,45 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import { INSERT_UNORDERED_LIST_COMMAND, ListItemNode, ListNode } from '@lexical/list';
|
|
2
|
+
import { $isListNode, INSERT_UNORDERED_LIST_COMMAND, ListItemNode, ListNode } from '@lexical/list';
|
|
3
|
+
import { $isRangeSelection } from 'lexical';
|
|
3
4
|
import { UnorderedListIcon } from '../../../lexical/ui/icons/UnorderedList/index.js';
|
|
4
5
|
import { createClientComponent } from '../../createClientComponent.js';
|
|
5
|
-
import {
|
|
6
|
+
import { toolbarTextDropdownGroupWithItems } from '../../shared/toolbar/textDropdownGroup.js';
|
|
6
7
|
import { LexicalListPlugin } from '../plugin/index.js';
|
|
7
8
|
import { UNORDERED_LIST } from './markdownTransformer.js';
|
|
9
|
+
const toolbarGroups = [
|
|
10
|
+
toolbarTextDropdownGroupWithItems([
|
|
11
|
+
{
|
|
12
|
+
ChildComponent: UnorderedListIcon,
|
|
13
|
+
isActive: ({ selection })=>{
|
|
14
|
+
if (!$isRangeSelection(selection)) {
|
|
15
|
+
return false;
|
|
16
|
+
}
|
|
17
|
+
for (const node of selection.getNodes()){
|
|
18
|
+
if ($isListNode(node) && node.getListType() === 'bullet') {
|
|
19
|
+
continue;
|
|
20
|
+
}
|
|
21
|
+
const parent = node.getParent();
|
|
22
|
+
if ($isListNode(parent) && parent.getListType() === 'bullet') {
|
|
23
|
+
continue;
|
|
24
|
+
}
|
|
25
|
+
const parentParent = parent?.getParent();
|
|
26
|
+
// Example scenario: Node = textNode, parent = listItemNode, parentParent = listNode
|
|
27
|
+
if ($isListNode(parentParent) && parentParent.getListType() === 'bullet') {
|
|
28
|
+
continue;
|
|
29
|
+
}
|
|
30
|
+
return false;
|
|
31
|
+
}
|
|
32
|
+
return true;
|
|
33
|
+
},
|
|
34
|
+
key: 'unorderedList',
|
|
35
|
+
label: `Unordered List`,
|
|
36
|
+
onSelect: ({ editor })=>{
|
|
37
|
+
editor.dispatchCommand(INSERT_UNORDERED_LIST_COMMAND, undefined);
|
|
38
|
+
},
|
|
39
|
+
order: 11
|
|
40
|
+
}
|
|
41
|
+
])
|
|
42
|
+
];
|
|
8
43
|
const UnorderedListFeatureClient = (props)=>{
|
|
9
44
|
return {
|
|
10
45
|
clientFeatureProps: props,
|
|
@@ -27,40 +62,30 @@ const UnorderedListFeatureClient = (props)=>{
|
|
|
27
62
|
slashMenu: {
|
|
28
63
|
groups: [
|
|
29
64
|
{
|
|
30
|
-
displayName: 'Lists',
|
|
31
65
|
items: [
|
|
32
66
|
{
|
|
33
67
|
Icon: UnorderedListIcon,
|
|
34
|
-
displayName: 'Unordered List',
|
|
35
68
|
key: 'unorderedList',
|
|
36
69
|
keywords: [
|
|
37
70
|
'unordered list',
|
|
38
71
|
'ul'
|
|
39
72
|
],
|
|
73
|
+
label: 'Unordered List',
|
|
40
74
|
onSelect: ({ editor })=>{
|
|
41
75
|
editor.dispatchCommand(INSERT_UNORDERED_LIST_COMMAND, undefined);
|
|
42
76
|
}
|
|
43
77
|
}
|
|
44
78
|
],
|
|
45
|
-
key: 'lists'
|
|
79
|
+
key: 'lists',
|
|
80
|
+
label: 'Lists'
|
|
46
81
|
}
|
|
47
82
|
]
|
|
48
83
|
},
|
|
84
|
+
toolbarFixed: {
|
|
85
|
+
groups: toolbarGroups
|
|
86
|
+
},
|
|
49
87
|
toolbarInline: {
|
|
50
|
-
groups:
|
|
51
|
-
inlineToolbarTextDropdownGroupWithItems([
|
|
52
|
-
{
|
|
53
|
-
ChildComponent: UnorderedListIcon,
|
|
54
|
-
isActive: ()=>false,
|
|
55
|
-
key: 'unorderedList',
|
|
56
|
-
label: `Unordered List`,
|
|
57
|
-
onSelect: ({ editor })=>{
|
|
58
|
-
editor.dispatchCommand(INSERT_UNORDERED_LIST_COMMAND, undefined);
|
|
59
|
-
},
|
|
60
|
-
order: 11
|
|
61
|
-
}
|
|
62
|
-
])
|
|
63
|
-
]
|
|
88
|
+
groups: toolbarGroups
|
|
64
89
|
}
|
|
65
90
|
};
|
|
66
91
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../src/field/features/lists/unorderedList/feature.client.tsx"],"sourcesContent":["'use client'\n\nimport { INSERT_UNORDERED_LIST_COMMAND, ListItemNode, ListNode } from '@lexical/list'\n\nimport type {
|
|
1
|
+
{"version":3,"sources":["../../../../../src/field/features/lists/unorderedList/feature.client.tsx"],"sourcesContent":["'use client'\n\nimport { $isListNode, INSERT_UNORDERED_LIST_COMMAND, ListItemNode, ListNode } from '@lexical/list'\nimport { $isRangeSelection } from 'lexical'\n\nimport type { ToolbarGroup } from '../../toolbars/types.js'\nimport type { FeatureProviderProviderClient } from '../../types.js'\n\nimport { UnorderedListIcon } from '../../../lexical/ui/icons/UnorderedList/index.js'\nimport { createClientComponent } from '../../createClientComponent.js'\nimport { toolbarTextDropdownGroupWithItems } from '../../shared/toolbar/textDropdownGroup.js'\nimport { LexicalListPlugin } from '../plugin/index.js'\nimport { UNORDERED_LIST } from './markdownTransformer.js'\n\nconst toolbarGroups: ToolbarGroup[] = [\n toolbarTextDropdownGroupWithItems([\n {\n ChildComponent: UnorderedListIcon,\n isActive: ({ selection }) => {\n if (!$isRangeSelection(selection)) {\n return false\n }\n for (const node of selection.getNodes()) {\n if ($isListNode(node) && node.getListType() === 'bullet') {\n continue\n }\n\n const parent = node.getParent()\n\n if ($isListNode(parent) && parent.getListType() === 'bullet') {\n continue\n }\n\n const parentParent = parent?.getParent()\n // Example scenario: Node = textNode, parent = listItemNode, parentParent = listNode\n if ($isListNode(parentParent) && parentParent.getListType() === 'bullet') {\n continue\n }\n\n return false\n }\n return true\n },\n key: 'unorderedList',\n label: `Unordered List`,\n onSelect: ({ editor }) => {\n editor.dispatchCommand(INSERT_UNORDERED_LIST_COMMAND, undefined)\n },\n order: 11,\n },\n ]),\n]\n\nconst UnorderedListFeatureClient: FeatureProviderProviderClient<undefined> = (props) => {\n return {\n clientFeatureProps: props,\n feature: () => {\n return {\n clientFeatureProps: props,\n markdownTransformers: [UNORDERED_LIST],\n nodes: [ListNode, ListItemNode],\n plugins: [\n {\n Component: LexicalListPlugin,\n position: 'normal',\n },\n ],\n slashMenu: {\n groups: [\n {\n items: [\n {\n Icon: UnorderedListIcon,\n key: 'unorderedList',\n keywords: ['unordered list', 'ul'],\n label: 'Unordered List',\n onSelect: ({ editor }) => {\n editor.dispatchCommand(INSERT_UNORDERED_LIST_COMMAND, undefined)\n },\n },\n ],\n key: 'lists',\n label: 'Lists',\n },\n ],\n },\n toolbarFixed: {\n groups: toolbarGroups,\n },\n toolbarInline: {\n groups: toolbarGroups,\n },\n }\n },\n }\n}\n\nexport const UnorderedListFeatureClientComponent = createClientComponent(UnorderedListFeatureClient)\n"],"names":["$isListNode","INSERT_UNORDERED_LIST_COMMAND","ListItemNode","ListNode","$isRangeSelection","UnorderedListIcon","createClientComponent","toolbarTextDropdownGroupWithItems","LexicalListPlugin","UNORDERED_LIST","toolbarGroups","ChildComponent","isActive","selection","node","getNodes","getListType","parent","getParent","parentParent","key","label","onSelect","editor","dispatchCommand","undefined","order","UnorderedListFeatureClient","props","clientFeatureProps","feature","markdownTransformers","nodes","plugins","Component","position","slashMenu","groups","items","Icon","keywords","toolbarFixed","toolbarInline","UnorderedListFeatureClientComponent"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA;AAEA,SAASA,WAAW,EAAEC,6BAA6B,EAAEC,YAAY,EAAEC,QAAQ,QAAQ,gBAAe;AAClG,SAASC,iBAAiB,QAAQ,UAAS;AAK3C,SAASC,iBAAiB,QAAQ,mDAAkD;AACpF,SAASC,qBAAqB,QAAQ,iCAAgC;AACtE,SAASC,iCAAiC,QAAQ,4CAA2C;AAC7F,SAASC,iBAAiB,QAAQ,qBAAoB;AACtD,SAASC,cAAc,QAAQ,2BAA0B;AAEzD,MAAMC,gBAAgC;IACpCH,kCAAkC;QAChC;YACEI,gBAAgBN;YAChBO,UAAU,CAAC,EAAEC,SAAS,EAAE;gBACtB,IAAI,CAACT,kBAAkBS,YAAY;oBACjC,OAAO;gBACT;gBACA,KAAK,MAAMC,QAAQD,UAAUE,QAAQ,GAAI;oBACvC,IAAIf,YAAYc,SAASA,KAAKE,WAAW,OAAO,UAAU;wBACxD;oBACF;oBAEA,MAAMC,SAASH,KAAKI,SAAS;oBAE7B,IAAIlB,YAAYiB,WAAWA,OAAOD,WAAW,OAAO,UAAU;wBAC5D;oBACF;oBAEA,MAAMG,eAAeF,QAAQC;oBAC7B,oFAAoF;oBACpF,IAAIlB,YAAYmB,iBAAiBA,aAAaH,WAAW,OAAO,UAAU;wBACxE;oBACF;oBAEA,OAAO;gBACT;gBACA,OAAO;YACT;YACAI,KAAK;YACLC,OAAO,CAAC,cAAc,CAAC;YACvBC,UAAU,CAAC,EAAEC,MAAM,EAAE;gBACnBA,OAAOC,eAAe,CAACvB,+BAA+BwB;YACxD;YACAC,OAAO;QACT;KACD;CACF;AAED,MAAMC,6BAAuE,CAACC;IAC5E,OAAO;QACLC,oBAAoBD;QACpBE,SAAS;YACP,OAAO;gBACLD,oBAAoBD;gBACpBG,sBAAsB;oBAACtB;iBAAe;gBACtCuB,OAAO;oBAAC7B;oBAAUD;iBAAa;gBAC/B+B,SAAS;oBACP;wBACEC,WAAW1B;wBACX2B,UAAU;oBACZ;iBACD;gBACDC,WAAW;oBACTC,QAAQ;wBACN;4BACEC,OAAO;gCACL;oCACEC,MAAMlC;oCACNe,KAAK;oCACLoB,UAAU;wCAAC;wCAAkB;qCAAK;oCAClCnB,OAAO;oCACPC,UAAU,CAAC,EAAEC,MAAM,EAAE;wCACnBA,OAAOC,eAAe,CAACvB,+BAA+BwB;oCACxD;gCACF;6BACD;4BACDL,KAAK;4BACLC,OAAO;wBACT;qBACD;gBACH;gBACAoB,cAAc;oBACZJ,QAAQ3B;gBACV;gBACAgC,eAAe;oBACbL,QAAQ3B;gBACV;YACF;QACF;IACF;AACF;AAEA,OAAO,MAAMiC,sCAAsCrC,sBAAsBqB,4BAA2B"}
|
package/dist/field/features/migrations/slateToLexical/converter/converters/blockquote/client.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { createFeaturePropComponent } from '../../../../../createFeaturePropComponent.js';
|
|
3
3
|
import { _SlateBlockquoteConverter } from './converter.js';
|
|
4
|
-
export const
|
|
4
|
+
export const BlockquoteConverterClient = createFeaturePropComponent(_SlateBlockquoteConverter);
|
|
5
5
|
|
|
6
6
|
//# sourceMappingURL=client.js.map
|
package/dist/field/features/migrations/slateToLexical/converter/converters/blockquote/client.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../../../../src/field/features/migrations/slateToLexical/converter/converters/blockquote/client.ts"],"sourcesContent":["'use client'\n\nimport { createFeaturePropComponent } from '../../../../../createFeaturePropComponent.js'\nimport { _SlateBlockquoteConverter } from './converter.js'\n\nexport const
|
|
1
|
+
{"version":3,"sources":["../../../../../../../../src/field/features/migrations/slateToLexical/converter/converters/blockquote/client.ts"],"sourcesContent":["'use client'\n\nimport { createFeaturePropComponent } from '../../../../../createFeaturePropComponent.js'\nimport { _SlateBlockquoteConverter } from './converter.js'\n\nexport const BlockquoteConverterClient = createFeaturePropComponent(_SlateBlockquoteConverter)\n"],"names":["createFeaturePropComponent","_SlateBlockquoteConverter","BlockquoteConverterClient"],"rangeMappings":";;;","mappings":"AAAA;AAEA,SAASA,0BAA0B,QAAQ,+CAA8C;AACzF,SAASC,yBAAyB,QAAQ,iBAAgB;AAE1D,OAAO,MAAMC,4BAA4BF,2BAA2BC,2BAA0B"}
|
package/dist/field/features/migrations/slateToLexical/converter/converters/blockquote/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { BlockquoteConverterClient } from './client.js';
|
|
2
2
|
import { _SlateBlockquoteConverter } from './converter.js';
|
|
3
3
|
export const SlateBlockquoteConverter = {
|
|
4
|
-
ClientComponent:
|
|
4
|
+
ClientComponent: BlockquoteConverterClient,
|
|
5
5
|
converter: _SlateBlockquoteConverter
|
|
6
6
|
};
|
|
7
7
|
|
package/dist/field/features/migrations/slateToLexical/converter/converters/blockquote/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../../../../src/field/features/migrations/slateToLexical/converter/converters/blockquote/index.ts"],"sourcesContent":["import type { SlateNodeConverterProvider } from '../../types.js'\n\nimport {
|
|
1
|
+
{"version":3,"sources":["../../../../../../../../src/field/features/migrations/slateToLexical/converter/converters/blockquote/index.ts"],"sourcesContent":["import type { SlateNodeConverterProvider } from '../../types.js'\n\nimport { BlockquoteConverterClient } from './client.js'\nimport { _SlateBlockquoteConverter } from './converter.js'\n\nexport const SlateBlockquoteConverter: SlateNodeConverterProvider = {\n ClientComponent: BlockquoteConverterClient,\n converter: _SlateBlockquoteConverter,\n}\n"],"names":["BlockquoteConverterClient","_SlateBlockquoteConverter","SlateBlockquoteConverter","ClientComponent","converter"],"rangeMappings":";;;;;","mappings":"AAEA,SAASA,yBAAyB,QAAQ,cAAa;AACvD,SAASC,yBAAyB,QAAQ,iBAAgB;AAE1D,OAAO,MAAMC,2BAAuD;IAClEC,iBAAiBH;IACjBI,WAAWH;AACb,EAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"feature.client.d.ts","sourceRoot":"","sources":["../../../../src/field/features/paragraph/feature.client.tsx"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"feature.client.d.ts","sourceRoot":"","sources":["../../../../src/field/features/paragraph/feature.client.tsx"],"names":[],"mappings":";AA6EA,eAAO,MAAM,+BAA+B,+BAAgD,CAAA"}
|
|
@@ -1,9 +1,36 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { $setBlocksType } from '@lexical/selection';
|
|
3
|
-
import { $createParagraphNode, $getSelection } from 'lexical';
|
|
3
|
+
import { $createParagraphNode, $getSelection, $isParagraphNode, $isRangeSelection } from 'lexical';
|
|
4
4
|
import { TextIcon } from '../../lexical/ui/icons/Text/index.js';
|
|
5
5
|
import { createClientComponent } from '../createClientComponent.js';
|
|
6
|
-
import {
|
|
6
|
+
import { toolbarTextDropdownGroupWithItems } from '../shared/toolbar/textDropdownGroup.js';
|
|
7
|
+
const toolbarGroups = [
|
|
8
|
+
toolbarTextDropdownGroupWithItems([
|
|
9
|
+
{
|
|
10
|
+
ChildComponent: TextIcon,
|
|
11
|
+
isActive: ({ selection })=>{
|
|
12
|
+
if (!$isRangeSelection(selection)) {
|
|
13
|
+
return false;
|
|
14
|
+
}
|
|
15
|
+
for (const node of selection.getNodes()){
|
|
16
|
+
if (!$isParagraphNode(node) && !$isParagraphNode(node.getParent())) {
|
|
17
|
+
return false;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
return true;
|
|
21
|
+
},
|
|
22
|
+
key: 'paragraph',
|
|
23
|
+
label: 'Normal Text',
|
|
24
|
+
onSelect: ({ editor })=>{
|
|
25
|
+
editor.update(()=>{
|
|
26
|
+
const selection = $getSelection();
|
|
27
|
+
$setBlocksType(selection, ()=>$createParagraphNode());
|
|
28
|
+
});
|
|
29
|
+
},
|
|
30
|
+
order: 1
|
|
31
|
+
}
|
|
32
|
+
])
|
|
33
|
+
];
|
|
7
34
|
const ParagraphFeatureClient = (props)=>{
|
|
8
35
|
return {
|
|
9
36
|
clientFeatureProps: props,
|
|
@@ -12,11 +39,9 @@ const ParagraphFeatureClient = (props)=>{
|
|
|
12
39
|
slashMenu: {
|
|
13
40
|
groups: [
|
|
14
41
|
{
|
|
15
|
-
displayName: 'Basic',
|
|
16
42
|
items: [
|
|
17
43
|
{
|
|
18
44
|
Icon: TextIcon,
|
|
19
|
-
displayName: 'Paragraph',
|
|
20
45
|
key: 'paragraph',
|
|
21
46
|
keywords: [
|
|
22
47
|
'normal',
|
|
@@ -24,6 +49,7 @@ const ParagraphFeatureClient = (props)=>{
|
|
|
24
49
|
'p',
|
|
25
50
|
'text'
|
|
26
51
|
],
|
|
52
|
+
label: 'Paragraph',
|
|
27
53
|
onSelect: ({ editor })=>{
|
|
28
54
|
editor.update(()=>{
|
|
29
55
|
const selection = $getSelection();
|
|
@@ -32,28 +58,16 @@ const ParagraphFeatureClient = (props)=>{
|
|
|
32
58
|
}
|
|
33
59
|
}
|
|
34
60
|
],
|
|
35
|
-
key: 'basic'
|
|
61
|
+
key: 'basic',
|
|
62
|
+
label: 'Basic'
|
|
36
63
|
}
|
|
37
64
|
]
|
|
38
65
|
},
|
|
66
|
+
toolbarFixed: {
|
|
67
|
+
groups: toolbarGroups
|
|
68
|
+
},
|
|
39
69
|
toolbarInline: {
|
|
40
|
-
groups:
|
|
41
|
-
inlineToolbarTextDropdownGroupWithItems([
|
|
42
|
-
{
|
|
43
|
-
ChildComponent: TextIcon,
|
|
44
|
-
isActive: ()=>false,
|
|
45
|
-
key: 'paragraph',
|
|
46
|
-
label: 'Normal Text',
|
|
47
|
-
onSelect: ({ editor })=>{
|
|
48
|
-
editor.update(()=>{
|
|
49
|
-
const selection = $getSelection();
|
|
50
|
-
$setBlocksType(selection, ()=>$createParagraphNode());
|
|
51
|
-
});
|
|
52
|
-
},
|
|
53
|
-
order: 1
|
|
54
|
-
}
|
|
55
|
-
])
|
|
56
|
-
]
|
|
70
|
+
groups: toolbarGroups
|
|
57
71
|
}
|
|
58
72
|
})
|
|
59
73
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/field/features/paragraph/feature.client.tsx"],"sourcesContent":["'use client'\n\nimport { $setBlocksType } from '@lexical/selection'\nimport { $createParagraphNode, $getSelection } from 'lexical'\n\nimport type { FeatureProviderProviderClient } from '../types.js'\n\nimport { TextIcon } from '../../lexical/ui/icons/Text/index.js'\nimport { createClientComponent } from '../createClientComponent.js'\nimport {
|
|
1
|
+
{"version":3,"sources":["../../../../src/field/features/paragraph/feature.client.tsx"],"sourcesContent":["'use client'\n\nimport { $setBlocksType } from '@lexical/selection'\nimport { $createParagraphNode, $getSelection, $isParagraphNode, $isRangeSelection } from 'lexical'\n\nimport type { ToolbarGroup } from '../toolbars/types.js'\nimport type { FeatureProviderProviderClient } from '../types.js'\n\nimport { TextIcon } from '../../lexical/ui/icons/Text/index.js'\nimport { createClientComponent } from '../createClientComponent.js'\nimport { toolbarTextDropdownGroupWithItems } from '../shared/toolbar/textDropdownGroup.js'\n\nconst toolbarGroups: ToolbarGroup[] = [\n toolbarTextDropdownGroupWithItems([\n {\n ChildComponent: TextIcon,\n isActive: ({ selection }) => {\n if (!$isRangeSelection(selection)) {\n return false\n }\n for (const node of selection.getNodes()) {\n if (!$isParagraphNode(node) && !$isParagraphNode(node.getParent())) {\n return false\n }\n }\n return true\n },\n key: 'paragraph',\n label: 'Normal Text',\n onSelect: ({ editor }) => {\n editor.update(() => {\n const selection = $getSelection()\n $setBlocksType(selection, () => $createParagraphNode())\n })\n },\n order: 1,\n },\n ]),\n]\n\nconst ParagraphFeatureClient: FeatureProviderProviderClient<undefined> = (props) => {\n return {\n clientFeatureProps: props,\n feature: () => ({\n clientFeatureProps: props,\n slashMenu: {\n groups: [\n {\n items: [\n {\n Icon: TextIcon,\n key: 'paragraph',\n keywords: ['normal', 'paragraph', 'p', 'text'],\n label: 'Paragraph',\n onSelect: ({ editor }) => {\n editor.update(() => {\n const selection = $getSelection()\n $setBlocksType(selection, () => $createParagraphNode())\n })\n },\n },\n ],\n key: 'basic',\n label: 'Basic',\n },\n ],\n },\n toolbarFixed: {\n groups: toolbarGroups,\n },\n toolbarInline: {\n groups: toolbarGroups,\n },\n }),\n }\n}\n\nexport const ParagraphFeatureClientComponent = createClientComponent(ParagraphFeatureClient)\n"],"names":["$setBlocksType","$createParagraphNode","$getSelection","$isParagraphNode","$isRangeSelection","TextIcon","createClientComponent","toolbarTextDropdownGroupWithItems","toolbarGroups","ChildComponent","isActive","selection","node","getNodes","getParent","key","label","onSelect","editor","update","order","ParagraphFeatureClient","props","clientFeatureProps","feature","slashMenu","groups","items","Icon","keywords","toolbarFixed","toolbarInline","ParagraphFeatureClientComponent"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA;AAEA,SAASA,cAAc,QAAQ,qBAAoB;AACnD,SAASC,oBAAoB,EAAEC,aAAa,EAAEC,gBAAgB,EAAEC,iBAAiB,QAAQ,UAAS;AAKlG,SAASC,QAAQ,QAAQ,uCAAsC;AAC/D,SAASC,qBAAqB,QAAQ,8BAA6B;AACnE,SAASC,iCAAiC,QAAQ,yCAAwC;AAE1F,MAAMC,gBAAgC;IACpCD,kCAAkC;QAChC;YACEE,gBAAgBJ;YAChBK,UAAU,CAAC,EAAEC,SAAS,EAAE;gBACtB,IAAI,CAACP,kBAAkBO,YAAY;oBACjC,OAAO;gBACT;gBACA,KAAK,MAAMC,QAAQD,UAAUE,QAAQ,GAAI;oBACvC,IAAI,CAACV,iBAAiBS,SAAS,CAACT,iBAAiBS,KAAKE,SAAS,KAAK;wBAClE,OAAO;oBACT;gBACF;gBACA,OAAO;YACT;YACAC,KAAK;YACLC,OAAO;YACPC,UAAU,CAAC,EAAEC,MAAM,EAAE;gBACnBA,OAAOC,MAAM,CAAC;oBACZ,MAAMR,YAAYT;oBAClBF,eAAeW,WAAW,IAAMV;gBAClC;YACF;YACAmB,OAAO;QACT;KACD;CACF;AAED,MAAMC,yBAAmE,CAACC;IACxE,OAAO;QACLC,oBAAoBD;QACpBE,SAAS,IAAO,CAAA;gBACdD,oBAAoBD;gBACpBG,WAAW;oBACTC,QAAQ;wBACN;4BACEC,OAAO;gCACL;oCACEC,MAAMvB;oCACNU,KAAK;oCACLc,UAAU;wCAAC;wCAAU;wCAAa;wCAAK;qCAAO;oCAC9Cb,OAAO;oCACPC,UAAU,CAAC,EAAEC,MAAM,EAAE;wCACnBA,OAAOC,MAAM,CAAC;4CACZ,MAAMR,YAAYT;4CAClBF,eAAeW,WAAW,IAAMV;wCAClC;oCACF;gCACF;6BACD;4BACDc,KAAK;4BACLC,OAAO;wBACT;qBACD;gBACH;gBACAc,cAAc;oBACZJ,QAAQlB;gBACV;gBACAuB,eAAe;oBACbL,QAAQlB;gBACV;YACF,CAAA;IACF;AACF;AAEA,OAAO,MAAMwB,kCAAkC1B,sBAAsBe,wBAAuB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"feature.client.d.ts","sourceRoot":"","sources":["../../../../src/field/features/relationship/feature.client.tsx"],"names":[],"mappings":";AAKA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,qBAAqB,CAAA;
|
|
1
|
+
{"version":3,"file":"feature.client.d.ts","sourceRoot":"","sources":["../../../../src/field/features/relationship/feature.client.tsx"],"names":[],"mappings":";AAKA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,qBAAqB,CAAA;AA0EnE,eAAO,MAAM,kCAAkC,0FAAmD,CAAA"}
|