@payloadcms/richtext-lexical 3.0.0-beta.23 → 3.0.0-beta.25
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 +3 -2
- package/dist/exports/components.d.ts.map +1 -1
- package/dist/exports/components.js +3 -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 +127 -53
- 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/toolbarAlignGroup.js +12 -0
- package/dist/field/features/align/toolbarAlignGroup.js.map +1 -0
- package/dist/field/features/blockquote/feature.client.d.ts.map +1 -1
- package/dist/field/features/blockquote/feature.client.js +50 -34
- package/dist/field/features/blockquote/feature.client.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 +56 -27
- package/dist/field/features/blocks/feature.client.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 → testRecorder}/feature.client.d.ts.map +1 -1
- package/dist/field/features/debug/{testrecorder → testRecorder}/feature.client.js.map +1 -1
- package/dist/field/features/debug/{testrecorder → testRecorder}/feature.server.d.ts.map +1 -1
- package/dist/field/features/debug/{testrecorder → testRecorder}/feature.server.js +1 -1
- package/dist/field/features/debug/{testrecorder → testRecorder}/feature.server.js.map +1 -1
- package/dist/field/features/debug/{testrecorder → testRecorder}/plugin/index.d.ts.map +1 -1
- package/dist/field/features/debug/{testrecorder → testRecorder}/plugin/index.js.map +1 -1
- package/dist/field/features/debug/{treeview → treeView}/feature.client.d.ts.map +1 -1
- package/dist/field/features/debug/{treeview → treeView}/feature.client.js.map +1 -1
- package/dist/field/features/debug/{treeview → treeView}/feature.server.d.ts.map +1 -1
- package/dist/field/features/debug/{treeview → treeView}/feature.server.js +1 -1
- package/dist/field/features/debug/{treeview → treeView}/feature.server.js.map +1 -1
- package/dist/field/features/debug/{treeview → treeView}/plugin/index.d.ts.map +1 -1
- package/dist/field/features/debug/{treeview → 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 +25 -21
- package/dist/field/features/format/bold/feature.client.js.map +1 -1
- package/dist/field/features/format/inlineCode/feature.client.d.ts.map +1 -0
- package/dist/field/features/format/inlineCode/feature.client.js +46 -0
- package/dist/field/features/format/inlineCode/feature.client.js.map +1 -0
- package/dist/field/features/format/{inlinecode → inlineCode}/feature.server.d.ts.map +1 -1
- package/dist/field/features/format/{inlinecode → inlineCode}/feature.server.js +1 -1
- package/dist/field/features/format/{inlinecode → inlineCode}/feature.server.js.map +1 -1
- package/dist/field/features/format/{inlinecode → inlineCode}/markdownTransformers.d.ts.map +1 -1
- package/dist/field/features/format/{inlinecode → inlineCode}/markdownTransformers.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 +26 -22
- 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 +26 -22
- 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 +24 -20
- 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 +24 -20
- 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 +24 -20
- 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 +69 -49
- package/dist/field/features/heading/feature.client.js.map +1 -1
- package/dist/field/features/{horizontalrule → horizontalRule}/component/index.d.ts.map +1 -1
- package/dist/field/features/{horizontalrule → horizontalRule}/component/index.js.map +1 -1
- package/dist/field/features/horizontalRule/feature.client.d.ts.map +1 -0
- package/dist/field/features/horizontalRule/feature.client.js +76 -0
- package/dist/field/features/horizontalRule/feature.client.js.map +1 -0
- package/dist/field/features/{horizontalrule → horizontalRule}/feature.server.d.ts.map +1 -1
- package/dist/field/features/{horizontalrule → horizontalRule}/feature.server.js +1 -1
- package/dist/field/features/{horizontalrule → horizontalRule}/feature.server.js.map +1 -1
- package/dist/field/features/{horizontalrule → horizontalRule}/markdownTransformer.d.ts.map +1 -1
- package/dist/field/features/{horizontalrule → horizontalRule}/markdownTransformer.js.map +1 -1
- package/dist/field/features/{horizontalrule → horizontalRule}/nodes/HorizontalRuleNode.d.ts.map +1 -1
- package/dist/field/features/{horizontalrule → horizontalRule}/nodes/HorizontalRuleNode.js.map +1 -1
- package/dist/field/features/{horizontalrule → horizontalRule}/plugin/index.d.ts.map +1 -1
- package/dist/field/features/{horizontalrule → 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 +42 -40
- 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/feature.client.d.ts.map +1 -1
- package/dist/field/features/link/feature.client.js +47 -43
- package/dist/field/features/link/feature.client.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/lists/checklist/feature.client.d.ts +1 -1
- package/dist/field/features/lists/checklist/feature.client.d.ts.map +1 -1
- package/dist/field/features/lists/checklist/feature.client.js +56 -31
- package/dist/field/features/lists/checklist/feature.client.js.map +1 -1
- package/dist/field/features/lists/checklist/feature.server.d.ts +1 -1
- package/dist/field/features/lists/checklist/feature.server.js +4 -4
- package/dist/field/features/lists/checklist/feature.server.js.map +1 -1
- package/dist/field/features/lists/checklist/markdownTransformers.js +1 -1
- package/dist/field/features/lists/checklist/markdownTransformers.js.map +1 -1
- package/dist/field/features/lists/orderedList/feature.client.d.ts.map +1 -0
- package/dist/field/features/lists/orderedList/feature.client.js +96 -0
- package/dist/field/features/lists/orderedList/feature.client.js.map +1 -0
- package/dist/field/features/lists/{orderedlist → orderedList}/feature.server.d.ts.map +1 -1
- package/dist/field/features/lists/{orderedlist → orderedList}/feature.server.js +1 -1
- package/dist/field/features/lists/{orderedlist → orderedList}/feature.server.js.map +1 -1
- package/dist/field/features/lists/{orderedlist → orderedList}/markdownTransformer.d.ts.map +1 -1
- package/dist/field/features/lists/{orderedlist → orderedList}/markdownTransformer.js +1 -1
- package/dist/field/features/lists/{orderedlist → orderedList}/markdownTransformer.js.map +1 -1
- package/dist/field/features/lists/{common → shared}/markdown.d.ts.map +1 -1
- package/dist/field/features/lists/{common → shared}/markdown.js.map +1 -1
- package/dist/field/features/lists/unorderedList/feature.client.d.ts.map +1 -0
- package/dist/field/features/lists/unorderedList/feature.client.js +96 -0
- package/dist/field/features/lists/unorderedList/feature.client.js.map +1 -0
- package/dist/field/features/lists/{unorderedlist → unorderedList}/feature.server.d.ts.map +1 -1
- package/dist/field/features/lists/{unorderedlist → unorderedList}/feature.server.js +1 -1
- package/dist/field/features/lists/{unorderedlist → unorderedList}/feature.server.js.map +1 -1
- package/dist/field/features/lists/{unorderedlist → unorderedList}/markdownTransformer.d.ts.map +1 -1
- package/dist/field/features/lists/{unorderedlist → unorderedList}/markdownTransformer.js +1 -1
- package/dist/field/features/lists/{unorderedlist → unorderedList}/markdownTransformer.js.map +1 -1
- package/dist/field/features/paragraph/feature.client.d.ts.map +1 -1
- package/dist/field/features/paragraph/feature.client.js +44 -30
- 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 +36 -10
- package/dist/field/features/relationship/feature.client.js.map +1 -1
- package/dist/field/features/relationship/populationPromise.d.ts.map +1 -1
- package/dist/field/features/relationship/populationPromise.js +2 -1
- 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/toolbar/textDropdownGroup.js +12 -0
- package/dist/field/features/shared/toolbar/textDropdownGroup.js.map +1 -0
- package/dist/field/features/toolbars/fixed/Toolbar/index.d.ts +6 -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 +6 -0
- package/dist/field/features/toolbars/inline/Toolbar/index.d.ts.map +1 -0
- package/dist/field/{lexical/plugins/FloatingSelectToolbar → features/toolbars/inline/Toolbar}/index.js +64 -38
- package/dist/field/features/toolbars/inline/Toolbar/index.js.map +1 -0
- package/dist/field/{lexical/plugins/FloatingSelectToolbar → features/toolbars/inline/Toolbar}/index.scss +7 -11
- 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/FloatingSelectToolbar → features/toolbars/shared}/ToolbarButton/index.js +16 -12
- package/dist/field/features/toolbars/shared/ToolbarButton/index.js.map +1 -0
- package/dist/field/{lexical/plugins/FloatingSelectToolbar → 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/FloatingSelectToolbar → features/toolbars/shared}/ToolbarDropdown/DropDown.js +17 -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/FloatingSelectToolbar → features/toolbars/shared}/ToolbarDropdown/index.scss +25 -13
- package/dist/field/features/toolbars/types.d.ts +48 -0
- 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 +51 -12
- package/dist/field/features/types.d.ts.map +1 -1
- package/dist/field/features/types.js.map +1 -1
- package/dist/field/features/upload/feature.client.d.ts.map +1 -1
- package/dist/field/features/upload/feature.client.js +35 -10
- package/dist/field/features/upload/feature.client.js.map +1 -1
- package/dist/field/features/upload/populationPromise.d.ts.map +1 -1
- package/dist/field/features/upload/populationPromise.js +3 -1
- package/dist/field/features/upload/populationPromise.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/LexicalEditor.d.ts.map +1 -1
- package/dist/field/lexical/LexicalEditor.js +20 -4
- package/dist/field/lexical/LexicalEditor.js.map +1 -1
- package/dist/field/lexical/LexicalEditor.scss +3 -19
- 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 +80 -32
- 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 +9 -7
- package/dist/field/lexical/config/server/default.js.map +1 -1
- package/dist/field/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/LexicalMenu.d.ts +9 -9
- package/dist/field/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/LexicalMenu.d.ts.map +1 -1
- package/dist/field/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/LexicalMenu.js +71 -71
- package/dist/field/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/LexicalMenu.js.map +1 -1
- package/dist/field/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/index.d.ts +4 -4
- package/dist/field/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/index.d.ts.map +1 -1
- package/dist/field/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/index.js +3 -3
- package/dist/field/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/index.js.map +1 -1
- package/dist/field/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/types.d.ts +17 -25
- package/dist/field/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/types.d.ts.map +1 -1
- package/dist/field/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/types.js +1 -37
- package/dist/field/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/types.js.map +1 -1
- package/dist/field/lexical/plugins/SlashMenu/index.d.ts +2 -2
- package/dist/field/lexical/plugins/SlashMenu/index.d.ts.map +1 -1
- package/dist/field/lexical/plugins/SlashMenu/index.js +71 -65
- package/dist/field/lexical/plugins/SlashMenu/index.js.map +1 -1
- package/dist/field/lexical/theme/EditorTheme.scss +2 -6
- 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/index.d.ts +15 -11
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +16 -12
- 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/package.json +10 -10
- package/dist/field/features/align/floatingSelectToolbarAlignDropdownSection.d.ts +0 -3
- package/dist/field/features/align/floatingSelectToolbarAlignDropdownSection.d.ts.map +0 -1
- package/dist/field/features/align/floatingSelectToolbarAlignDropdownSection.js +0 -12
- package/dist/field/features/align/floatingSelectToolbarAlignDropdownSection.js.map +0 -1
- package/dist/field/features/common/floatingSelectToolbarFeaturesButtonsSection/index.d.ts +0 -3
- package/dist/field/features/common/floatingSelectToolbarFeaturesButtonsSection/index.d.ts.map +0 -1
- package/dist/field/features/common/floatingSelectToolbarFeaturesButtonsSection/index.js +0 -10
- package/dist/field/features/common/floatingSelectToolbarFeaturesButtonsSection/index.js.map +0 -1
- package/dist/field/features/common/floatingSelectToolbarTextDropdownSection/index.d.ts +0 -3
- package/dist/field/features/common/floatingSelectToolbarTextDropdownSection/index.d.ts.map +0 -1
- package/dist/field/features/common/floatingSelectToolbarTextDropdownSection/index.js +0 -12
- package/dist/field/features/common/floatingSelectToolbarTextDropdownSection/index.js.map +0 -1
- package/dist/field/features/format/common/floatingSelectToolbarSection.d.ts +0 -3
- package/dist/field/features/format/common/floatingSelectToolbarSection.d.ts.map +0 -1
- package/dist/field/features/format/common/floatingSelectToolbarSection.js +0 -10
- package/dist/field/features/format/common/floatingSelectToolbarSection.js.map +0 -1
- package/dist/field/features/format/inlinecode/feature.client.d.ts.map +0 -1
- package/dist/field/features/format/inlinecode/feature.client.js +0 -42
- package/dist/field/features/format/inlinecode/feature.client.js.map +0 -1
- package/dist/field/features/horizontalrule/feature.client.d.ts.map +0 -1
- package/dist/field/features/horizontalrule/feature.client.js +0 -53
- package/dist/field/features/horizontalrule/feature.client.js.map +0 -1
- package/dist/field/features/indent/floatingSelectToolbarIndentSection.d.ts +0 -3
- package/dist/field/features/indent/floatingSelectToolbarIndentSection.d.ts.map +0 -1
- package/dist/field/features/indent/floatingSelectToolbarIndentSection.js +0 -10
- package/dist/field/features/indent/floatingSelectToolbarIndentSection.js.map +0 -1
- package/dist/field/features/indent/index.scss +0 -4
- package/dist/field/features/lists/orderedlist/feature.client.d.ts.map +0 -1
- package/dist/field/features/lists/orderedlist/feature.client.js +0 -71
- package/dist/field/features/lists/orderedlist/feature.client.js.map +0 -1
- package/dist/field/features/lists/unorderedlist/feature.client.d.ts.map +0 -1
- package/dist/field/features/lists/unorderedlist/feature.client.js +0 -71
- package/dist/field/features/lists/unorderedlist/feature.client.js.map +0 -1
- package/dist/field/lexical/plugins/FloatingSelectToolbar/ToolbarButton/index.d.ts +0 -8
- package/dist/field/lexical/plugins/FloatingSelectToolbar/ToolbarButton/index.d.ts.map +0 -1
- package/dist/field/lexical/plugins/FloatingSelectToolbar/ToolbarButton/index.js.map +0 -1
- package/dist/field/lexical/plugins/FloatingSelectToolbar/ToolbarDropdown/DropDown.d.ts +0 -17
- package/dist/field/lexical/plugins/FloatingSelectToolbar/ToolbarDropdown/DropDown.d.ts.map +0 -1
- package/dist/field/lexical/plugins/FloatingSelectToolbar/ToolbarDropdown/DropDown.js.map +0 -1
- package/dist/field/lexical/plugins/FloatingSelectToolbar/ToolbarDropdown/index.d.ts +0 -18
- package/dist/field/lexical/plugins/FloatingSelectToolbar/ToolbarDropdown/index.d.ts.map +0 -1
- package/dist/field/lexical/plugins/FloatingSelectToolbar/ToolbarDropdown/index.js +0 -42
- package/dist/field/lexical/plugins/FloatingSelectToolbar/ToolbarDropdown/index.js.map +0 -1
- package/dist/field/lexical/plugins/FloatingSelectToolbar/index.d.ts +0 -6
- package/dist/field/lexical/plugins/FloatingSelectToolbar/index.d.ts.map +0 -1
- package/dist/field/lexical/plugins/FloatingSelectToolbar/index.js.map +0 -1
- package/dist/field/lexical/plugins/FloatingSelectToolbar/types.d.ts +0 -40
- package/dist/field/lexical/plugins/FloatingSelectToolbar/types.d.ts.map +0 -1
- package/dist/field/lexical/plugins/FloatingSelectToolbar/types.js.map +0 -1
- /package/dist/field/features/debug/{testrecorder → testRecorder}/feature.client.d.ts +0 -0
- /package/dist/field/features/debug/{testrecorder → testRecorder}/feature.client.js +0 -0
- /package/dist/field/features/debug/{testrecorder → testRecorder}/feature.server.d.ts +0 -0
- /package/dist/field/features/debug/{testrecorder → testRecorder}/plugin/index.d.ts +0 -0
- /package/dist/field/features/debug/{testrecorder → testRecorder}/plugin/index.js +0 -0
- /package/dist/field/features/debug/{testrecorder → testRecorder}/plugin/index.scss +0 -0
- /package/dist/field/features/debug/{treeview → treeView}/feature.client.d.ts +0 -0
- /package/dist/field/features/debug/{treeview → treeView}/feature.client.js +0 -0
- /package/dist/field/features/debug/{treeview → treeView}/feature.server.d.ts +0 -0
- /package/dist/field/features/debug/{treeview → treeView}/plugin/index.d.ts +0 -0
- /package/dist/field/features/debug/{treeview → treeView}/plugin/index.js +0 -0
- /package/dist/field/features/debug/{treeview → treeView}/plugin/index.scss +0 -0
- /package/dist/field/features/format/{inlinecode → inlineCode}/feature.client.d.ts +0 -0
- /package/dist/field/features/format/{inlinecode → inlineCode}/feature.server.d.ts +0 -0
- /package/dist/field/features/format/{inlinecode → inlineCode}/markdownTransformers.d.ts +0 -0
- /package/dist/field/features/format/{inlinecode → inlineCode}/markdownTransformers.js +0 -0
- /package/dist/field/features/{horizontalrule → horizontalRule}/component/index.d.ts +0 -0
- /package/dist/field/features/{horizontalrule → horizontalRule}/component/index.js +0 -0
- /package/dist/field/features/{horizontalrule → horizontalRule}/feature.client.d.ts +0 -0
- /package/dist/field/features/{horizontalrule → horizontalRule}/feature.server.d.ts +0 -0
- /package/dist/field/features/{horizontalrule → horizontalRule}/markdownTransformer.d.ts +0 -0
- /package/dist/field/features/{horizontalrule → horizontalRule}/markdownTransformer.js +0 -0
- /package/dist/field/features/{horizontalrule → horizontalRule}/nodes/HorizontalRuleNode.d.ts +0 -0
- /package/dist/field/features/{horizontalrule → horizontalRule}/nodes/HorizontalRuleNode.js +0 -0
- /package/dist/field/features/{horizontalrule → horizontalRule}/plugin/index.d.ts +0 -0
- /package/dist/field/features/{horizontalrule → horizontalRule}/plugin/index.js +0 -0
- /package/dist/field/features/{horizontalrule → horizontalRule}/plugin/index.scss +0 -0
- /package/dist/field/features/lists/{orderedlist → orderedList}/feature.client.d.ts +0 -0
- /package/dist/field/features/lists/{orderedlist → orderedList}/feature.server.d.ts +0 -0
- /package/dist/field/features/lists/{orderedlist → orderedList}/markdownTransformer.d.ts +0 -0
- /package/dist/field/features/lists/{common → shared}/markdown.d.ts +0 -0
- /package/dist/field/features/lists/{common → shared}/markdown.js +0 -0
- /package/dist/field/features/lists/{unorderedlist → unorderedList}/feature.client.d.ts +0 -0
- /package/dist/field/features/lists/{unorderedlist → unorderedList}/feature.server.d.ts +0 -0
- /package/dist/field/features/lists/{unorderedlist → unorderedList}/markdownTransformer.d.ts +0 -0
- /package/dist/field/{lexical/plugins/FloatingSelectToolbar → features/toolbars}/types.js +0 -0
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
@import '../../../../../scss/styles';
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
html[data-theme='dark'] {
|
|
5
|
+
.fixed-toolbar {
|
|
6
|
+
&__dropdown-items {
|
|
7
|
+
background: var(--theme-elevation-0);
|
|
8
|
+
|
|
9
|
+
.toolbar-popup__dropdown-item {
|
|
10
|
+
color: var(--theme-elevation-900);
|
|
11
|
+
|
|
12
|
+
&:hover:not([disabled]), &.active {
|
|
13
|
+
background-color: var(--theme-elevation-100);
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.icon {
|
|
17
|
+
color: var(--theme-elevation-600);
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.toolbar-popup {
|
|
23
|
+
&__button {
|
|
24
|
+
&.active, &:hover:not([disabled]) {
|
|
25
|
+
background-color: var(--theme-elevation-100);
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
&__dropdown {
|
|
30
|
+
&:hover:not([disabled]) {
|
|
31
|
+
background-color: var(--theme-elevation-100);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
&-caret:after {
|
|
35
|
+
filter: invert(1);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
&-label {
|
|
39
|
+
color: var(--theme-elevation-750);
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
.fixed-toolbar {
|
|
48
|
+
@include blur-bg(var(--theme-elevation-0));
|
|
49
|
+
display: flex;
|
|
50
|
+
align-items: center;
|
|
51
|
+
padding: 0 3.72px 0 6.25px;
|
|
52
|
+
vertical-align: middle;
|
|
53
|
+
height: 37.5px;
|
|
54
|
+
position: sticky;
|
|
55
|
+
z-index: 2;
|
|
56
|
+
top: var(--doc-controls-height);
|
|
57
|
+
margin-bottom: $baseline;
|
|
58
|
+
border: $style-stroke-width-s solid var(--theme-elevation-150);
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
&__group {
|
|
62
|
+
display: flex;
|
|
63
|
+
align-items: center;
|
|
64
|
+
gap: 2px;
|
|
65
|
+
z-index: 1;
|
|
66
|
+
|
|
67
|
+
.icon {
|
|
68
|
+
min-width: 20px;
|
|
69
|
+
height: 20px;
|
|
70
|
+
color: var(--theme-elevation-600);
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
.divider {
|
|
74
|
+
width: 1px;
|
|
75
|
+
height: 15px;
|
|
76
|
+
background-color: var(--color-base-100);
|
|
77
|
+
margin: 0 6.25px;
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"feature.client.d.ts","sourceRoot":"","sources":["../../../../../src/field/features/toolbars/fixed/feature.client.tsx"],"names":[],"mappings":";AAsBA,eAAO,MAAM,kCAAkC,+BAAmD,CAAA"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { createClientComponent } from '../../createClientComponent.js';
|
|
3
|
+
import { FixedToolbarPlugin } from './Toolbar/index.js';
|
|
4
|
+
const FixedToolbarFeatureClient = (props)=>{
|
|
5
|
+
return {
|
|
6
|
+
clientFeatureProps: props,
|
|
7
|
+
feature: ()=>({
|
|
8
|
+
clientFeatureProps: props,
|
|
9
|
+
plugins: [
|
|
10
|
+
{
|
|
11
|
+
Component: FixedToolbarPlugin,
|
|
12
|
+
position: 'top'
|
|
13
|
+
}
|
|
14
|
+
]
|
|
15
|
+
})
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
export const FixedToolbarFeatureClientComponent = createClientComponent(FixedToolbarFeatureClient);
|
|
19
|
+
|
|
20
|
+
//# sourceMappingURL=feature.client.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../src/field/features/toolbars/fixed/feature.client.tsx"],"sourcesContent":["'use client'\n\nimport type { FeatureProviderProviderClient } from '../../types.js'\n\nimport { createClientComponent } from '../../createClientComponent.js'\nimport { FixedToolbarPlugin } from './Toolbar/index.js'\n\nconst FixedToolbarFeatureClient: FeatureProviderProviderClient<undefined> = (props) => {\n return {\n clientFeatureProps: props,\n feature: () => ({\n clientFeatureProps: props,\n plugins: [\n {\n Component: FixedToolbarPlugin,\n position: 'top',\n },\n ],\n }),\n }\n}\n\nexport const FixedToolbarFeatureClientComponent = createClientComponent(FixedToolbarFeatureClient)\n"],"names":["createClientComponent","FixedToolbarPlugin","FixedToolbarFeatureClient","props","clientFeatureProps","feature","plugins","Component","position","FixedToolbarFeatureClientComponent"],"rangeMappings":";;;;;;;;;;;;;;;;;","mappings":"AAAA;AAIA,SAASA,qBAAqB,QAAQ,iCAAgC;AACtE,SAASC,kBAAkB,QAAQ,qBAAoB;AAEvD,MAAMC,4BAAsE,CAACC;IAC3E,OAAO;QACLC,oBAAoBD;QACpBE,SAAS,IAAO,CAAA;gBACdD,oBAAoBD;gBACpBG,SAAS;oBACP;wBACEC,WAAWN;wBACXO,UAAU;oBACZ;iBACD;YACH,CAAA;IACF;AACF;AAEA,OAAO,MAAMC,qCAAqCT,sBAAsBE,2BAA0B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"feature.server.d.ts","sourceRoot":"","sources":["../../../../../src/field/features/toolbars/fixed/feature.server.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,gBAAgB,CAAA;AAInE,eAAO,MAAM,mBAAmB,EAAE,6BAA6B,CAAC,SAAS,EAAE,SAAS,CAYnF,CAAA"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { FixedToolbarFeatureClientComponent } from './feature.client.js';
|
|
2
|
+
export const FixedToolbarFeature = (props)=>{
|
|
3
|
+
return {
|
|
4
|
+
feature: ()=>{
|
|
5
|
+
return {
|
|
6
|
+
ClientComponent: FixedToolbarFeatureClientComponent,
|
|
7
|
+
clientFeatureProps: null,
|
|
8
|
+
serverFeatureProps: props
|
|
9
|
+
};
|
|
10
|
+
},
|
|
11
|
+
key: 'toolbarFixed',
|
|
12
|
+
serverFeatureProps: props
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
//# sourceMappingURL=feature.server.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../src/field/features/toolbars/fixed/feature.server.ts"],"sourcesContent":["import type { FeatureProviderProviderServer } from '../../types.js'\n\nimport { FixedToolbarFeatureClientComponent } from './feature.client.js'\n\nexport const FixedToolbarFeature: FeatureProviderProviderServer<undefined, undefined> = (props) => {\n return {\n feature: () => {\n return {\n ClientComponent: FixedToolbarFeatureClientComponent,\n clientFeatureProps: null,\n serverFeatureProps: props,\n }\n },\n key: 'toolbarFixed',\n serverFeatureProps: props,\n }\n}\n"],"names":["FixedToolbarFeatureClientComponent","FixedToolbarFeature","props","feature","ClientComponent","clientFeatureProps","serverFeatureProps","key"],"rangeMappings":";;;;;;;;;;;;;","mappings":"AAEA,SAASA,kCAAkC,QAAQ,sBAAqB;AAExE,OAAO,MAAMC,sBAA2E,CAACC;IACvF,OAAO;QACLC,SAAS;YACP,OAAO;gBACLC,iBAAiBJ;gBACjBK,oBAAoB;gBACpBC,oBAAoBJ;YACtB;QACF;QACAK,KAAK;QACLD,oBAAoBJ;IACtB;AACF,EAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/field/features/toolbars/inline/Toolbar/index.tsx"],"names":[],"mappings":"AAaA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAU9B,OAAO,cAAc,CAAA;AA4WrB,wBAAgB,mBAAmB,CAAC,EAClC,UAA0B,GAC3B,EAAE;IACD,UAAU,CAAC,EAAE,WAAW,CAAA;CACzB,GAAG,KAAK,CAAC,YAAY,GAAG,IAAI,CAI5B"}
|
|
@@ -5,55 +5,81 @@ import { $getSelection, $isRangeSelection, $isTextNode, COMMAND_PRIORITY_LOW, SE
|
|
|
5
5
|
import { useCallback, useEffect, useRef, useState } from 'react';
|
|
6
6
|
import * as React from 'react';
|
|
7
7
|
import { createPortal } from 'react-dom';
|
|
8
|
-
import { useEditorConfigContext } from '
|
|
9
|
-
import { getDOMRangeRect } from '
|
|
10
|
-
import { setFloatingElemPosition } from '
|
|
11
|
-
import { ToolbarButton } from '
|
|
12
|
-
import { ToolbarDropdown } from '
|
|
8
|
+
import { useEditorConfigContext } from '../../../../lexical/config/client/EditorConfigProvider.js';
|
|
9
|
+
import { getDOMRangeRect } from '../../../../lexical/utils/getDOMRangeRect.js';
|
|
10
|
+
import { setFloatingElemPosition } from '../../../../lexical/utils/setFloatingElemPosition.js';
|
|
11
|
+
import { ToolbarButton } from '../../shared/ToolbarButton/index.js';
|
|
12
|
+
import { ToolbarDropdown } from '../../shared/ToolbarDropdown/index.js';
|
|
13
13
|
import './index.scss';
|
|
14
|
-
function
|
|
15
|
-
if (
|
|
16
|
-
return
|
|
14
|
+
function ButtonGroupItem({ anchorElem, editor, item }) {
|
|
15
|
+
if (item.Component) {
|
|
16
|
+
return item?.Component && /*#__PURE__*/ React.createElement(item.Component, {
|
|
17
17
|
anchorElem: anchorElem,
|
|
18
18
|
editor: editor,
|
|
19
|
-
|
|
20
|
-
key:
|
|
19
|
+
item: item,
|
|
20
|
+
key: item.key
|
|
21
21
|
});
|
|
22
22
|
}
|
|
23
23
|
return /*#__PURE__*/ React.createElement(ToolbarButton, {
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
24
|
+
editor: editor,
|
|
25
|
+
item: item,
|
|
26
|
+
key: item.key
|
|
27
|
+
}, item?.ChildComponent && /*#__PURE__*/ React.createElement(item.ChildComponent, null));
|
|
27
28
|
}
|
|
28
|
-
function
|
|
29
|
+
function ToolbarGroupComponent({ anchorElem, editor, group, index }) {
|
|
29
30
|
const { editorConfig } = useEditorConfigContext();
|
|
30
|
-
const
|
|
31
|
+
const [DropdownIcon, setDropdownIcon] = React.useState(null);
|
|
32
|
+
React.useEffect(()=>{
|
|
33
|
+
if (group?.type === 'dropdown' && group.items.length && group.ChildComponent) {
|
|
34
|
+
setDropdownIcon(()=>group.ChildComponent);
|
|
35
|
+
} else {
|
|
36
|
+
setDropdownIcon(null);
|
|
37
|
+
}
|
|
38
|
+
}, [
|
|
39
|
+
group
|
|
40
|
+
]);
|
|
41
|
+
const onActiveChange = ({ activeItems })=>{
|
|
42
|
+
if (!activeItems.length) {
|
|
43
|
+
if (group?.type === 'dropdown' && group.items.length && group.ChildComponent) {
|
|
44
|
+
setDropdownIcon(()=>group.ChildComponent);
|
|
45
|
+
} else {
|
|
46
|
+
setDropdownIcon(null);
|
|
47
|
+
}
|
|
48
|
+
return;
|
|
49
|
+
}
|
|
50
|
+
const item = activeItems[0];
|
|
51
|
+
setDropdownIcon(()=>item.ChildComponent);
|
|
52
|
+
};
|
|
31
53
|
return /*#__PURE__*/ React.createElement("div", {
|
|
32
|
-
className: `
|
|
33
|
-
key:
|
|
34
|
-
},
|
|
35
|
-
Icon:
|
|
54
|
+
className: `inline-toolbar-popup__group inline-toolbar-popup__group-${group.key}`,
|
|
55
|
+
key: group.key
|
|
56
|
+
}, group.type === 'dropdown' && group.items.length && (DropdownIcon ? /*#__PURE__*/ React.createElement(ToolbarDropdown, {
|
|
57
|
+
Icon: DropdownIcon,
|
|
36
58
|
anchorElem: anchorElem,
|
|
37
59
|
editor: editor,
|
|
38
|
-
|
|
39
|
-
|
|
60
|
+
groupKey: group.key,
|
|
61
|
+
items: group.items,
|
|
62
|
+
maxActiveItems: 1,
|
|
63
|
+
onActiveChange: onActiveChange
|
|
40
64
|
}) : /*#__PURE__*/ React.createElement(ToolbarDropdown, {
|
|
41
65
|
anchorElem: anchorElem,
|
|
42
66
|
editor: editor,
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
67
|
+
groupKey: group.key,
|
|
68
|
+
items: group.items,
|
|
69
|
+
maxActiveItems: 1,
|
|
70
|
+
onActiveChange: onActiveChange
|
|
71
|
+
})), group.type === 'buttons' && group.items.length && group.items.map((item)=>{
|
|
72
|
+
return /*#__PURE__*/ React.createElement(ButtonGroupItem, {
|
|
47
73
|
anchorElem: anchorElem,
|
|
48
74
|
editor: editor,
|
|
49
|
-
|
|
50
|
-
key:
|
|
75
|
+
item: item,
|
|
76
|
+
key: item.key
|
|
51
77
|
});
|
|
52
|
-
}), index < editorConfig.features.
|
|
78
|
+
}), index < editorConfig.features.toolbarInline?.groups.length - 1 && /*#__PURE__*/ React.createElement("div", {
|
|
53
79
|
className: "divider"
|
|
54
80
|
}));
|
|
55
81
|
}
|
|
56
|
-
function
|
|
82
|
+
function InlineToolbar({ anchorElem, editor }) {
|
|
57
83
|
const floatingToolbarRef = useRef(null);
|
|
58
84
|
const caretRef = useRef(null);
|
|
59
85
|
const { editorConfig } = useEditorConfigContext();
|
|
@@ -172,22 +198,22 @@ function FloatingSelectToolbar({ anchorElem, editor }) {
|
|
|
172
198
|
updateTextFormatFloatingToolbar
|
|
173
199
|
]);
|
|
174
200
|
return /*#__PURE__*/ React.createElement("div", {
|
|
175
|
-
className: "
|
|
201
|
+
className: "inline-toolbar-popup",
|
|
176
202
|
ref: floatingToolbarRef
|
|
177
203
|
}, /*#__PURE__*/ React.createElement("div", {
|
|
178
204
|
className: "caret",
|
|
179
205
|
ref: caretRef
|
|
180
|
-
}), editor.isEditable() && /*#__PURE__*/ React.createElement(React.Fragment, null, editorConfig?.features && editorConfig.features?.
|
|
181
|
-
return /*#__PURE__*/ React.createElement(
|
|
206
|
+
}), editor.isEditable() && /*#__PURE__*/ React.createElement(React.Fragment, null, editorConfig?.features && editorConfig.features?.toolbarInline?.groups.map((group, i)=>{
|
|
207
|
+
return /*#__PURE__*/ React.createElement(ToolbarGroupComponent, {
|
|
182
208
|
anchorElem: anchorElem,
|
|
183
209
|
editor: editor,
|
|
210
|
+
group: group,
|
|
184
211
|
index: i,
|
|
185
|
-
key:
|
|
186
|
-
section: section
|
|
212
|
+
key: group.key
|
|
187
213
|
});
|
|
188
214
|
})));
|
|
189
215
|
}
|
|
190
|
-
function
|
|
216
|
+
function useInlineToolbar(editor, anchorElem) {
|
|
191
217
|
const [isText, setIsText] = useState(false);
|
|
192
218
|
const updatePopup = useCallback(()=>{
|
|
193
219
|
editor.getEditorState().read(()=>{
|
|
@@ -255,14 +281,14 @@ function useFloatingTextFormatToolbar(editor, anchorElem) {
|
|
|
255
281
|
if (!isText) {
|
|
256
282
|
return null;
|
|
257
283
|
}
|
|
258
|
-
return /*#__PURE__*/ createPortal(/*#__PURE__*/ React.createElement(
|
|
284
|
+
return /*#__PURE__*/ createPortal(/*#__PURE__*/ React.createElement(InlineToolbar, {
|
|
259
285
|
anchorElem: anchorElem,
|
|
260
286
|
editor: editor
|
|
261
287
|
}), anchorElem);
|
|
262
288
|
}
|
|
263
|
-
export function
|
|
289
|
+
export function InlineToolbarPlugin({ anchorElem = document.body }) {
|
|
264
290
|
const [editor] = useLexicalComposerContext();
|
|
265
|
-
return
|
|
291
|
+
return useInlineToolbar(editor, anchorElem);
|
|
266
292
|
}
|
|
267
293
|
|
|
268
294
|
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../../src/field/features/toolbars/inline/Toolbar/index.tsx"],"sourcesContent":["'use client'\nimport type { LexicalEditor } from 'lexical'\n\nimport { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext.js'\nimport { mergeRegister } from '@lexical/utils'\nimport {\n $getSelection,\n $isRangeSelection,\n $isTextNode,\n COMMAND_PRIORITY_LOW,\n SELECTION_CHANGE_COMMAND,\n} from 'lexical'\nimport { useCallback, useEffect, useRef, useState } from 'react'\nimport * as React from 'react'\nimport { createPortal } from 'react-dom'\n\nimport type { ToolbarGroup, ToolbarGroupItem } from '../../types.js'\n\nimport { useEditorConfigContext } from '../../../../lexical/config/client/EditorConfigProvider.js'\nimport { getDOMRangeRect } from '../../../../lexical/utils/getDOMRangeRect.js'\nimport { setFloatingElemPosition } from '../../../../lexical/utils/setFloatingElemPosition.js'\nimport { ToolbarButton } from '../../shared/ToolbarButton/index.js'\nimport { ToolbarDropdown } from '../../shared/ToolbarDropdown/index.js'\nimport './index.scss'\n\nfunction ButtonGroupItem({\n anchorElem,\n editor,\n item,\n}: {\n anchorElem: HTMLElement\n editor: LexicalEditor\n item: ToolbarGroupItem\n}): React.ReactNode {\n if (item.Component) {\n return (\n item?.Component && (\n <item.Component anchorElem={anchorElem} editor={editor} item={item} key={item.key} />\n )\n )\n }\n\n return (\n <ToolbarButton editor={editor} item={item} key={item.key}>\n {item?.ChildComponent && <item.ChildComponent />}\n </ToolbarButton>\n )\n}\n\nfunction ToolbarGroupComponent({\n anchorElem,\n editor,\n group,\n index,\n}: {\n anchorElem: HTMLElement\n editor: LexicalEditor\n group: ToolbarGroup\n index: number\n}): React.ReactNode {\n const { editorConfig } = useEditorConfigContext()\n\n const [DropdownIcon, setDropdownIcon] = React.useState<React.FC | null>(null)\n\n React.useEffect(() => {\n if (group?.type === 'dropdown' && group.items.length && group.ChildComponent) {\n setDropdownIcon(() => group.ChildComponent)\n } else {\n setDropdownIcon(null)\n }\n }, [group])\n\n const onActiveChange = ({ activeItems }: { activeItems: ToolbarGroupItem[] }) => {\n if (!activeItems.length) {\n if (group?.type === 'dropdown' && group.items.length && group.ChildComponent) {\n setDropdownIcon(() => group.ChildComponent)\n } else {\n setDropdownIcon(null)\n }\n return\n }\n const item = activeItems[0]\n setDropdownIcon(() => item.ChildComponent)\n }\n\n return (\n <div\n className={`inline-toolbar-popup__group inline-toolbar-popup__group-${group.key}`}\n key={group.key}\n >\n {group.type === 'dropdown' &&\n group.items.length &&\n (DropdownIcon ? (\n <ToolbarDropdown\n Icon={DropdownIcon}\n anchorElem={anchorElem}\n editor={editor}\n groupKey={group.key}\n items={group.items}\n maxActiveItems={1}\n onActiveChange={onActiveChange}\n />\n ) : (\n <ToolbarDropdown\n anchorElem={anchorElem}\n editor={editor}\n groupKey={group.key}\n items={group.items}\n maxActiveItems={1}\n onActiveChange={onActiveChange}\n />\n ))}\n {group.type === 'buttons' &&\n group.items.length &&\n group.items.map((item) => {\n return (\n <ButtonGroupItem anchorElem={anchorElem} editor={editor} item={item} key={item.key} />\n )\n })}\n {index < editorConfig.features.toolbarInline?.groups.length - 1 && (\n <div className=\"divider\" />\n )}\n </div>\n )\n}\n\nfunction InlineToolbar({\n anchorElem,\n editor,\n}: {\n anchorElem: HTMLElement\n editor: LexicalEditor\n}): React.ReactNode {\n const floatingToolbarRef = useRef<HTMLDivElement | null>(null)\n const caretRef = useRef<HTMLDivElement | null>(null)\n\n const { editorConfig } = useEditorConfigContext()\n\n const closeFloatingToolbar = useCallback(() => {\n if (floatingToolbarRef?.current) {\n const isOpacityZero = floatingToolbarRef.current.style.opacity === '0'\n const isPointerEventsNone = floatingToolbarRef.current.style.pointerEvents === 'none'\n\n if (!isOpacityZero) {\n floatingToolbarRef.current.style.opacity = '0'\n }\n if (!isPointerEventsNone) {\n floatingToolbarRef.current.style.pointerEvents = 'none'\n }\n }\n }, [floatingToolbarRef])\n\n const mouseMoveListener = useCallback(\n (e: MouseEvent) => {\n if (floatingToolbarRef?.current && (e.buttons === 1 || e.buttons === 3)) {\n const isOpacityZero = floatingToolbarRef.current.style.opacity === '0'\n const isPointerEventsNone = floatingToolbarRef.current.style.pointerEvents === 'none'\n if (!isOpacityZero || !isPointerEventsNone) {\n // Check if the mouse is not over the popup\n const x = e.clientX\n const y = e.clientY\n const elementUnderMouse = document.elementFromPoint(x, y)\n if (!floatingToolbarRef.current.contains(elementUnderMouse)) {\n // Mouse is not over the target element => not a normal click, but probably a drag\n closeFloatingToolbar()\n }\n }\n }\n },\n [closeFloatingToolbar],\n )\n\n const mouseUpListener = useCallback(() => {\n if (floatingToolbarRef?.current) {\n if (floatingToolbarRef.current.style.opacity !== '1') {\n floatingToolbarRef.current.style.opacity = '1'\n }\n if (floatingToolbarRef.current.style.pointerEvents !== 'auto') {\n floatingToolbarRef.current.style.pointerEvents = 'auto'\n }\n }\n }, [floatingToolbarRef])\n\n useEffect(() => {\n document.addEventListener('mousemove', mouseMoveListener)\n document.addEventListener('mouseup', mouseUpListener)\n\n return () => {\n document.removeEventListener('mousemove', mouseMoveListener)\n document.removeEventListener('mouseup', mouseUpListener)\n }\n }, [floatingToolbarRef, mouseMoveListener, mouseUpListener])\n\n const updateTextFormatFloatingToolbar = useCallback(() => {\n const selection = $getSelection()\n\n const nativeSelection = window.getSelection()\n\n if (floatingToolbarRef.current === null) {\n return\n }\n\n const rootElement = editor.getRootElement()\n if (\n selection !== null &&\n nativeSelection !== null &&\n !nativeSelection.isCollapsed &&\n rootElement !== null &&\n rootElement.contains(nativeSelection.anchorNode)\n ) {\n const rangeRect = getDOMRangeRect(nativeSelection, rootElement)\n\n // Position floating toolbar\n const offsetIfFlipped = setFloatingElemPosition(\n rangeRect, // selection to position around\n floatingToolbarRef.current, // what to position\n anchorElem, // anchor elem\n 'center',\n )\n\n // Position caret\n if (caretRef.current) {\n setFloatingElemPosition(\n rangeRect, // selection to position around\n caretRef.current, // what to position\n floatingToolbarRef.current, // anchor elem\n 'center',\n 10,\n 5,\n true,\n offsetIfFlipped,\n )\n }\n }\n }, [editor, anchorElem])\n\n useEffect(() => {\n const scrollerElem = anchorElem.parentElement\n\n const update = () => {\n editor.getEditorState().read(() => {\n updateTextFormatFloatingToolbar()\n })\n }\n\n window.addEventListener('resize', update)\n if (scrollerElem) {\n scrollerElem.addEventListener('scroll', update)\n }\n\n return () => {\n window.removeEventListener('resize', update)\n if (scrollerElem) {\n scrollerElem.removeEventListener('scroll', update)\n }\n }\n }, [editor, updateTextFormatFloatingToolbar, anchorElem])\n\n useEffect(() => {\n editor.getEditorState().read(() => {\n updateTextFormatFloatingToolbar()\n })\n return mergeRegister(\n editor.registerUpdateListener(({ editorState }) => {\n editorState.read(() => {\n updateTextFormatFloatingToolbar()\n })\n }),\n\n editor.registerCommand(\n SELECTION_CHANGE_COMMAND,\n () => {\n updateTextFormatFloatingToolbar()\n return false\n },\n COMMAND_PRIORITY_LOW,\n ),\n )\n }, [editor, updateTextFormatFloatingToolbar])\n\n return (\n <div className=\"inline-toolbar-popup\" ref={floatingToolbarRef}>\n <div className=\"caret\" ref={caretRef} />\n {editor.isEditable() && (\n <React.Fragment>\n {editorConfig?.features &&\n editorConfig.features?.toolbarInline?.groups.map((group, i) => {\n return (\n <ToolbarGroupComponent\n anchorElem={anchorElem}\n editor={editor}\n group={group}\n index={i}\n key={group.key}\n />\n )\n })}\n </React.Fragment>\n )}\n </div>\n )\n}\n\nfunction useInlineToolbar(\n editor: LexicalEditor,\n anchorElem: HTMLElement,\n): React.ReactElement | null {\n const [isText, setIsText] = useState(false)\n\n const updatePopup = useCallback(() => {\n editor.getEditorState().read(() => {\n // Should not to pop up the floating toolbar when using IME input\n if (editor.isComposing()) {\n return\n }\n const selection = $getSelection()\n const nativeSelection = window.getSelection()\n const rootElement = editor.getRootElement()\n\n if (\n nativeSelection !== null &&\n (!$isRangeSelection(selection) ||\n rootElement === null ||\n !rootElement.contains(nativeSelection.anchorNode))\n ) {\n setIsText(false)\n return\n }\n\n if (!$isRangeSelection(selection)) {\n return\n }\n\n if (selection.getTextContent() !== '') {\n const nodes = selection.getNodes()\n let foundNodeWithText = false\n for (const node of nodes) {\n if ($isTextNode(node)) {\n setIsText(true)\n foundNodeWithText = true\n break\n }\n }\n if (!foundNodeWithText) {\n setIsText(false)\n }\n } else {\n setIsText(false)\n }\n\n const rawTextContent = selection.getTextContent().replace(/\\n/g, '')\n if (!selection.isCollapsed() && rawTextContent === '') {\n setIsText(false)\n return\n }\n })\n }, [editor])\n\n useEffect(() => {\n document.addEventListener('selectionchange', updatePopup)\n document.addEventListener('mouseup', updatePopup)\n return () => {\n document.removeEventListener('selectionchange', updatePopup)\n document.removeEventListener('mouseup', updatePopup)\n }\n }, [updatePopup])\n\n useEffect(() => {\n return mergeRegister(\n editor.registerUpdateListener(() => {\n updatePopup()\n }),\n editor.registerRootListener(() => {\n if (editor.getRootElement() === null) {\n setIsText(false)\n }\n }),\n )\n }, [editor, updatePopup])\n\n if (!isText) {\n return null\n }\n\n return createPortal(<InlineToolbar anchorElem={anchorElem} editor={editor} />, anchorElem)\n}\n\nexport function InlineToolbarPlugin({\n anchorElem = document.body,\n}: {\n anchorElem?: HTMLElement\n}): React.ReactElement | null {\n const [editor] = useLexicalComposerContext()\n\n return useInlineToolbar(editor, anchorElem)\n}\n"],"names":["useLexicalComposerContext","mergeRegister","$getSelection","$isRangeSelection","$isTextNode","COMMAND_PRIORITY_LOW","SELECTION_CHANGE_COMMAND","useCallback","useEffect","useRef","useState","React","createPortal","useEditorConfigContext","getDOMRangeRect","setFloatingElemPosition","ToolbarButton","ToolbarDropdown","ButtonGroupItem","anchorElem","editor","item","Component","key","ChildComponent","ToolbarGroupComponent","group","index","editorConfig","DropdownIcon","setDropdownIcon","type","items","length","onActiveChange","activeItems","div","className","Icon","groupKey","maxActiveItems","map","features","toolbarInline","groups","InlineToolbar","floatingToolbarRef","caretRef","closeFloatingToolbar","current","isOpacityZero","style","opacity","isPointerEventsNone","pointerEvents","mouseMoveListener","e","buttons","x","clientX","y","clientY","elementUnderMouse","document","elementFromPoint","contains","mouseUpListener","addEventListener","removeEventListener","updateTextFormatFloatingToolbar","selection","nativeSelection","window","getSelection","rootElement","getRootElement","isCollapsed","anchorNode","rangeRect","offsetIfFlipped","scrollerElem","parentElement","update","getEditorState","read","registerUpdateListener","editorState","registerCommand","ref","isEditable","Fragment","i","useInlineToolbar","isText","setIsText","updatePopup","isComposing","getTextContent","nodes","getNodes","foundNodeWithText","node","rawTextContent","replace","registerRootListener","InlineToolbarPlugin","body"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA;AAGA,SAASA,yBAAyB,QAAQ,2CAA0C;AACpF,SAASC,aAAa,QAAQ,iBAAgB;AAC9C,SACEC,aAAa,EACbC,iBAAiB,EACjBC,WAAW,EACXC,oBAAoB,EACpBC,wBAAwB,QACnB,UAAS;AAChB,SAASC,WAAW,EAAEC,SAAS,EAAEC,MAAM,EAAEC,QAAQ,QAAQ,QAAO;AAChE,YAAYC,WAAW,QAAO;AAC9B,SAASC,YAAY,QAAQ,YAAW;AAIxC,SAASC,sBAAsB,QAAQ,4DAA2D;AAClG,SAASC,eAAe,QAAQ,+CAA8C;AAC9E,SAASC,uBAAuB,QAAQ,uDAAsD;AAC9F,SAASC,aAAa,QAAQ,sCAAqC;AACnE,SAASC,eAAe,QAAQ,wCAAuC;AACvE,OAAO,eAAc;AAErB,SAASC,gBAAgB,EACvBC,UAAU,EACVC,MAAM,EACNC,IAAI,EAKL;IACC,IAAIA,KAAKC,SAAS,EAAE;QAClB,OACED,MAAMC,2BACJ,oBAACD,KAAKC,SAAS;YAACH,YAAYA;YAAYC,QAAQA;YAAQC,MAAMA;YAAME,KAAKF,KAAKE,GAAG;;IAGvF;IAEA,qBACE,oBAACP;QAAcI,QAAQA;QAAQC,MAAMA;QAAME,KAAKF,KAA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IACA3E,OAAOoF,oBAAoB,CAAC;YAC1B,IAAIpF,OAAOuD,cAAc,OAAO,MAAM;gBACpCmB,UAAU;YACZ;QACF;IAEJ,GAAG;QAAC1E;QAAQ2E;KAAY;IAExB,IAAI,CAACF,QAAQ;QACX,OAAO;IACT;IAEA,qBAAOjF,2BAAa,oBAACiC;QAAc1B,YAAYA;QAAYC,QAAQA;QAAYD;AACjF;AAEA,OAAO,SAASsF,oBAAoB,EAClCtF,aAAa4C,SAAS2C,IAAI,EAG3B;IACC,MAAM,CAACtF,OAAO,GAAGpB;IAEjB,OAAO4F,iBAAiBxE,QAAQD;AAClC"}
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
@import '
|
|
1
|
+
@import '../../../../../scss/styles';
|
|
2
2
|
|
|
3
3
|
html[data-theme='light'] {
|
|
4
|
-
.
|
|
4
|
+
.inline-toolbar-popup {
|
|
5
5
|
@include shadow-m;
|
|
6
6
|
}
|
|
7
7
|
}
|
|
8
8
|
|
|
9
|
-
.
|
|
9
|
+
.inline-toolbar-popup {
|
|
10
10
|
display: flex;
|
|
11
11
|
align-items: center;
|
|
12
12
|
background: var(--color-base-0);
|
|
13
|
-
padding:
|
|
13
|
+
padding: 0 3.72px 0 6.25px;
|
|
14
14
|
vertical-align: middle;
|
|
15
15
|
position: absolute;
|
|
16
16
|
top: 0;
|
|
17
17
|
left: 0;
|
|
18
|
-
z-index:
|
|
18
|
+
z-index: 1;
|
|
19
19
|
opacity: 0;
|
|
20
20
|
border-radius: 6.25px;
|
|
21
21
|
transition: opacity 0.2s;
|
|
@@ -31,9 +31,10 @@ html[data-theme='light'] {
|
|
|
31
31
|
border-top-color: var(--color-base-0);
|
|
32
32
|
}
|
|
33
33
|
|
|
34
|
-
&
|
|
34
|
+
&__group {
|
|
35
35
|
display: flex;
|
|
36
36
|
align-items: center;
|
|
37
|
+
gap: 2px;
|
|
37
38
|
|
|
38
39
|
.icon {
|
|
39
40
|
min-width: 20px;
|
|
@@ -49,9 +50,4 @@ html[data-theme='light'] {
|
|
|
49
50
|
}
|
|
50
51
|
}
|
|
51
52
|
|
|
52
|
-
@media (max-width: 1024px) {
|
|
53
|
-
button.insert-comment {
|
|
54
|
-
display: none;
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
53
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"feature.client.d.ts","sourceRoot":"","sources":["../../../../../src/field/features/toolbars/inline/feature.client.tsx"],"names":[],"mappings":";AAsBA,eAAO,MAAM,mCAAmC,+BAAoD,CAAA"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { createClientComponent } from '../../createClientComponent.js';
|
|
3
|
+
import { InlineToolbarPlugin } from './Toolbar/index.js';
|
|
4
|
+
const InlineToolbarFeatureClient = (props)=>{
|
|
5
|
+
return {
|
|
6
|
+
clientFeatureProps: props,
|
|
7
|
+
feature: ()=>({
|
|
8
|
+
clientFeatureProps: props,
|
|
9
|
+
plugins: [
|
|
10
|
+
{
|
|
11
|
+
Component: InlineToolbarPlugin,
|
|
12
|
+
position: 'floatingAnchorElem'
|
|
13
|
+
}
|
|
14
|
+
]
|
|
15
|
+
})
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
export const InlineToolbarFeatureClientComponent = createClientComponent(InlineToolbarFeatureClient);
|
|
19
|
+
|
|
20
|
+
//# sourceMappingURL=feature.client.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../src/field/features/toolbars/inline/feature.client.tsx"],"sourcesContent":["'use client'\n\nimport type { FeatureProviderProviderClient } from '../../types.js'\n\nimport { createClientComponent } from '../../createClientComponent.js'\nimport { InlineToolbarPlugin } from './Toolbar/index.js'\n\nconst InlineToolbarFeatureClient: FeatureProviderProviderClient<undefined> = (props) => {\n return {\n clientFeatureProps: props,\n feature: () => ({\n clientFeatureProps: props,\n plugins: [\n {\n Component: InlineToolbarPlugin,\n position: 'floatingAnchorElem',\n },\n ],\n }),\n }\n}\n\nexport const InlineToolbarFeatureClientComponent = createClientComponent(InlineToolbarFeatureClient)\n"],"names":["createClientComponent","InlineToolbarPlugin","InlineToolbarFeatureClient","props","clientFeatureProps","feature","plugins","Component","position","InlineToolbarFeatureClientComponent"],"rangeMappings":";;;;;;;;;;;;;;;;;","mappings":"AAAA;AAIA,SAASA,qBAAqB,QAAQ,iCAAgC;AACtE,SAASC,mBAAmB,QAAQ,qBAAoB;AAExD,MAAMC,6BAAuE,CAACC;IAC5E,OAAO;QACLC,oBAAoBD;QACpBE,SAAS,IAAO,CAAA;gBACdD,oBAAoBD;gBACpBG,SAAS;oBACP;wBACEC,WAAWN;wBACXO,UAAU;oBACZ;iBACD;YACH,CAAA;IACF;AACF;AAEA,OAAO,MAAMC,sCAAsCT,sBAAsBE,4BAA2B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"feature.server.d.ts","sourceRoot":"","sources":["../../../../../src/field/features/toolbars/inline/feature.server.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,gBAAgB,CAAA;AAInE,eAAO,MAAM,oBAAoB,EAAE,6BAA6B,CAAC,SAAS,EAAE,SAAS,CAcpF,CAAA"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { InlineToolbarFeatureClientComponent } from './feature.client.js';
|
|
2
|
+
export const InlineToolbarFeature = (props)=>{
|
|
3
|
+
return {
|
|
4
|
+
feature: ()=>{
|
|
5
|
+
return {
|
|
6
|
+
ClientComponent: InlineToolbarFeatureClientComponent,
|
|
7
|
+
clientFeatureProps: null,
|
|
8
|
+
serverFeatureProps: props
|
|
9
|
+
};
|
|
10
|
+
},
|
|
11
|
+
key: 'toolbarInline',
|
|
12
|
+
serverFeatureProps: props
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
//# sourceMappingURL=feature.server.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../src/field/features/toolbars/inline/feature.server.ts"],"sourcesContent":["import type { FeatureProviderProviderServer } from '../../types.js'\n\nimport { InlineToolbarFeatureClientComponent } from './feature.client.js'\n\nexport const InlineToolbarFeature: FeatureProviderProviderServer<undefined, undefined> = (\n props,\n) => {\n return {\n feature: () => {\n return {\n ClientComponent: InlineToolbarFeatureClientComponent,\n clientFeatureProps: null,\n serverFeatureProps: props,\n }\n },\n key: 'toolbarInline',\n serverFeatureProps: props,\n }\n}\n"],"names":["InlineToolbarFeatureClientComponent","InlineToolbarFeature","props","feature","ClientComponent","clientFeatureProps","serverFeatureProps","key"],"rangeMappings":";;;;;;;;;;;;;","mappings":"AAEA,SAASA,mCAAmC,QAAQ,sBAAqB;AAEzE,OAAO,MAAMC,uBAA4E,CACvFC;IAEA,OAAO;QACLC,SAAS;YACP,OAAO;gBACLC,iBAAiBJ;gBACjBK,oBAAoB;gBACpBC,oBAAoBJ;YACtB;QACF;QACAK,KAAK;QACLD,oBAAoBJ;IACtB;AACF,EAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { LexicalEditor } from 'lexical';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import type { ToolbarGroupItem } from '../../types.js';
|
|
4
|
+
import './index.scss';
|
|
5
|
+
export declare const ToolbarButton: ({ children, editor, item, }: {
|
|
6
|
+
children: React.JSX.Element;
|
|
7
|
+
editor: LexicalEditor;
|
|
8
|
+
item: ToolbarGroupItem;
|
|
9
|
+
}) => React.JSX.Element;
|
|
10
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/field/features/toolbars/shared/ToolbarButton/index.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAA;AAI5C,OAAO,KAA2C,MAAM,OAAO,CAAA;AAE/D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAA;AAGtD,OAAO,cAAc,CAAA;AAIrB,eAAO,MAAM,aAAa,gCAIvB;IACD,QAAQ,EAAE,MAAM,GAAG,QAAQ,CAAA;IAC3B,MAAM,EAAE,aAAa,CAAA;IACrB,IAAI,EAAE,gBAAgB,CAAA;CACvB,sBA8EA,CAAA"}
|
|
@@ -1,30 +1,32 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext.js';
|
|
3
2
|
import { mergeRegister } from '@lexical/utils';
|
|
4
3
|
import { $getSelection } from 'lexical';
|
|
5
4
|
import React, { useCallback, useEffect, useState } from 'react';
|
|
5
|
+
import { useEditorFocus } from '../../../../lexical/EditorFocusProvider.js';
|
|
6
6
|
import './index.scss';
|
|
7
|
-
const baseClass = '
|
|
8
|
-
export const ToolbarButton = ({ children,
|
|
9
|
-
const [editor] = useLexicalComposerContext();
|
|
7
|
+
const baseClass = 'toolbar-popup__button';
|
|
8
|
+
export const ToolbarButton = ({ children, editor, item })=>{
|
|
10
9
|
const [enabled, setEnabled] = useState(true);
|
|
11
10
|
const [active, setActive] = useState(false);
|
|
12
11
|
const [className, setClassName] = useState(baseClass);
|
|
12
|
+
const editorFocusContext = useEditorFocus();
|
|
13
13
|
const updateStates = useCallback(()=>{
|
|
14
14
|
editor.getEditorState().read(()=>{
|
|
15
15
|
const selection = $getSelection();
|
|
16
|
-
if (
|
|
17
|
-
const isActive =
|
|
16
|
+
if (item.isActive) {
|
|
17
|
+
const isActive = item.isActive({
|
|
18
18
|
editor,
|
|
19
|
+
editorFocusContext,
|
|
19
20
|
selection
|
|
20
21
|
});
|
|
21
22
|
if (active !== isActive) {
|
|
22
23
|
setActive(isActive);
|
|
23
24
|
}
|
|
24
25
|
}
|
|
25
|
-
if (
|
|
26
|
-
const isEnabled =
|
|
26
|
+
if (item.isEnabled) {
|
|
27
|
+
const isEnabled = item.isEnabled({
|
|
27
28
|
editor,
|
|
29
|
+
editorFocusContext,
|
|
28
30
|
selection
|
|
29
31
|
});
|
|
30
32
|
if (enabled !== isEnabled) {
|
|
@@ -35,8 +37,9 @@ export const ToolbarButton = ({ children, entry })=>{
|
|
|
35
37
|
}, [
|
|
36
38
|
active,
|
|
37
39
|
editor,
|
|
40
|
+
editorFocusContext,
|
|
38
41
|
enabled,
|
|
39
|
-
|
|
42
|
+
item
|
|
40
43
|
]);
|
|
41
44
|
useEffect(()=>{
|
|
42
45
|
updateStates();
|
|
@@ -64,18 +67,19 @@ export const ToolbarButton = ({ children, entry })=>{
|
|
|
64
67
|
baseClass,
|
|
65
68
|
enabled === false ? 'disabled' : '',
|
|
66
69
|
active ? 'active' : '',
|
|
67
|
-
|
|
70
|
+
item?.key ? `${baseClass}-` + item.key : ''
|
|
68
71
|
].filter(Boolean).join(' '));
|
|
69
72
|
}, [
|
|
70
73
|
enabled,
|
|
71
74
|
active,
|
|
72
|
-
className
|
|
75
|
+
className,
|
|
76
|
+
item.key
|
|
73
77
|
]);
|
|
74
78
|
return /*#__PURE__*/ React.createElement("button", {
|
|
75
79
|
className: className,
|
|
76
80
|
onClick: ()=>{
|
|
77
81
|
if (enabled !== false) {
|
|
78
|
-
|
|
82
|
+
item.onSelect({
|
|
79
83
|
editor,
|
|
80
84
|
isActive: active
|
|
81
85
|
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../../src/field/features/toolbars/shared/ToolbarButton/index.tsx"],"sourcesContent":["'use client'\nimport type { LexicalEditor } from 'lexical'\n\nimport { mergeRegister } from '@lexical/utils'\nimport { $getSelection } from 'lexical'\nimport React, { useCallback, useEffect, useState } from 'react'\n\nimport type { ToolbarGroupItem } from '../../types.js'\n\nimport { useEditorFocus } from '../../../../lexical/EditorFocusProvider.js'\nimport './index.scss'\n\nconst baseClass = 'toolbar-popup__button'\n\nexport const ToolbarButton = ({\n children,\n editor,\n item,\n}: {\n children: React.JSX.Element\n editor: LexicalEditor\n item: ToolbarGroupItem\n}) => {\n const [enabled, setEnabled] = useState<boolean>(true)\n const [active, setActive] = useState<boolean>(false)\n const [className, setClassName] = useState<string>(baseClass)\n const editorFocusContext = useEditorFocus()\n\n const updateStates = useCallback(() => {\n editor.getEditorState().read(() => {\n const selection = $getSelection()\n if (item.isActive) {\n const isActive = item.isActive({ editor, editorFocusContext, selection })\n if (active !== isActive) {\n setActive(isActive)\n }\n }\n if (item.isEnabled) {\n const isEnabled = item.isEnabled({ editor, editorFocusContext, selection })\n if (enabled !== isEnabled) {\n setEnabled(isEnabled)\n }\n }\n })\n }, [active, editor, editorFocusContext, enabled, item])\n\n useEffect(() => {\n updateStates()\n }, [updateStates])\n\n useEffect(() => {\n document.addEventListener('mouseup', updateStates)\n return () => {\n document.removeEventListener('mouseup', updateStates)\n }\n }, [updateStates])\n\n useEffect(() => {\n return mergeRegister(\n editor.registerUpdateListener(() => {\n updateStates()\n }),\n )\n }, [editor, updateStates])\n\n useEffect(() => {\n setClassName(\n [\n baseClass,\n enabled === false ? 'disabled' : '',\n active ? 'active' : '',\n item?.key ? `${baseClass}-` + item.key : '',\n ]\n .filter(Boolean)\n .join(' '),\n )\n }, [enabled, active, className, item.key])\n\n return (\n <button\n className={className}\n onClick={() => {\n if (enabled !== false) {\n item.onSelect({\n editor,\n isActive: active,\n })\n }\n }}\n onMouseDown={(e) => {\n // This fixes a bug where you are unable to click the button if you are in a NESTED editor (editor in blocks field in editor).\n // Thus only happens if you click on the SVG of the button. Clicking on the outside works. Related issue: https://github.com/payloadcms/payload/issues/4025\n // TODO: Find out why exactly it happens and why e.preventDefault() on the mouseDown fixes it. Write that down here, or potentially fix a root cause, if there is any.\n e.preventDefault()\n }}\n type=\"button\"\n >\n {children}\n </button>\n )\n}\n"],"names":["mergeRegister","$getSelection","React","useCallback","useEffect","useState","useEditorFocus","baseClass","ToolbarButton","children","editor","item","enabled","setEnabled","active","setActive","className","setClassName","editorFocusContext","updateStates","getEditorState","read","selection","isActive","isEnabled","document","addEventListener","removeEventListener","registerUpdateListener","key","filter","Boolean","join","button","onClick","onSelect","onMouseDown","e","preventDefault","type"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA;AAGA,SAASA,aAAa,QAAQ,iBAAgB;AAC9C,SAASC,aAAa,QAAQ,UAAS;AACvC,OAAOC,SAASC,WAAW,EAAEC,SAAS,EAAEC,QAAQ,QAAQ,QAAO;AAI/D,SAASC,cAAc,QAAQ,6CAA4C;AAC3E,OAAO,eAAc;AAErB,MAAMC,YAAY;AAElB,OAAO,MAAMC,gBAAgB,CAAC,EAC5BC,QAAQ,EACRC,MAAM,EACNC,IAAI,EAKL;IACC,MAAM,CAACC,SAASC,WAAW,GAAGR,SAAkB;IAChD,MAAM,CAACS,QAAQC,UAAU,GAAGV,SAAkB;IAC9C,MAAM,CAACW,WAAWC,aAAa,GAAGZ,SAAiBE;IACnD,MAAMW,qBAAqBZ;IAE3B,MAAMa,eAAehB,YAAY;QAC/BO,OAAOU,cAAc,GAAGC,IAAI,CAAC;YAC3B,MAAMC,YAAYrB;YAClB,IAAIU,KAAKY,QAAQ,EAAE;gBACjB,MAAMA,WAAWZ,KAAKY,QAAQ,CAAC;oBAAEb;oBAAQQ;oBAAoBI;gBAAU;gBACvE,IAAIR,WAAWS,UAAU;oBACvBR,UAAUQ;gBACZ;YACF;YACA,IAAIZ,KAAKa,SAAS,EAAE;gBAClB,MAAMA,YAAYb,KAAKa,SAAS,CAAC;oBAAEd;oBAAQQ;oBAAoBI;gBAAU;gBACzE,IAAIV,YAAYY,WAAW;oBACzBX,WAAWW;gBACb;YACF;QACF;IACF,GAAG;QAACV;QAAQJ;QAAQQ;QAAoBN;QAASD;KAAK;IAEtDP,UAAU;QACRe;IACF,GAAG;QAACA;KAAa;IAEjBf,UAAU;QACRqB,SAASC,gBAAgB,CAAC,WAAWP;QACrC,OAAO;YACLM,SAASE,mBAAmB,CAAC,WAAWR;QAC1C;IACF,GAAG;QAACA;KAAa;IAEjBf,UAAU;QACR,OAAOJ,cACLU,OAAOkB,sBAAsB,CAAC;YAC5BT;QACF;IAEJ,GAAG;QAACT;QAAQS;KAAa;IAEzBf,UAAU;QACRa,aACE;YACEV;YACAK,YAAY,QAAQ,aAAa;YACjCE,SAAS,WAAW;YACpBH,MAAMkB,MAAM,CAAC,EAAEtB,UAAU,CAAC,CAAC,GAAGI,KAAKkB,GAAG,GAAG;SAC1C,CACEC,MAAM,CAACC,SACPC,IAAI,CAAC;IAEZ,GAAG;QAACpB;QAASE;QAAQE;QAAWL,KAAKkB,GAAG;KAAC;IAEzC,qBACE,oBAACI;QACCjB,WAAWA;QACXkB,SAAS;YACP,IAAItB,YAAY,OAAO;gBACrBD,KAAKwB,QAAQ,CAAC;oBACZzB;oBACAa,UAAUT;gBACZ;YACF;QACF;QACAsB,aAAa,CAACC;YACZ,8HAA8H;YAC9H,2JAA2J;YAC3J,sKAAsK;YACtKA,EAAEC,cAAc;QAClB;QACAC,MAAK;OAEJ9B;AAGP,EAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { LexicalEditor } from 'lexical';
|
|
2
|
+
import { type ReactNode } from 'react';
|
|
3
|
+
import React from 'react';
|
|
4
|
+
import type { ToolbarGroupItem } from '../../types.js';
|
|
5
|
+
export declare function DropDownItem({ active, children, editor, enabled, item, title, }: {
|
|
6
|
+
active?: boolean;
|
|
7
|
+
children: React.ReactNode;
|
|
8
|
+
editor: LexicalEditor;
|
|
9
|
+
enabled?: boolean;
|
|
10
|
+
item: ToolbarGroupItem;
|
|
11
|
+
title?: string;
|
|
12
|
+
}): React.ReactNode;
|
|
13
|
+
export declare function DropDown({ Icon, buttonAriaLabel, buttonClassName, children, disabled, itemsContainerClassNames, label, stopCloseOnClickSelf, }: {
|
|
14
|
+
Icon?: React.FC;
|
|
15
|
+
buttonAriaLabel?: string;
|
|
16
|
+
buttonClassName: string;
|
|
17
|
+
children: ReactNode;
|
|
18
|
+
disabled?: boolean;
|
|
19
|
+
itemsContainerClassNames?: string[];
|
|
20
|
+
label?: string;
|
|
21
|
+
stopCloseOnClickSelf?: boolean;
|
|
22
|
+
}): React.ReactNode;
|
|
23
|
+
//# sourceMappingURL=DropDown.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DropDown.d.ts","sourceRoot":"","sources":["../../../../../../src/field/features/toolbars/shared/ToolbarDropdown/DropDown.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAA;AAE5C,OAAO,EAAE,KAAK,SAAS,EAAqD,MAAM,OAAO,CAAA;AACzF,OAAO,KAAK,MAAM,OAAO,CAAA;AAGzB,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAA;AAUtD,wBAAgB,YAAY,CAAC,EAC3B,MAAM,EACN,QAAQ,EACR,MAAM,EACN,OAAO,EACP,IAAI,EACJ,KAAK,GACN,EAAE;IACD,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;IACzB,MAAM,EAAE,aAAa,CAAA;IACrB,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,IAAI,EAAE,gBAAgB,CAAA;IACtB,KAAK,CAAC,EAAE,MAAM,CAAA;CACf,GAAG,KAAK,CAAC,SAAS,CAuDlB;AA8ED,wBAAgB,QAAQ,CAAC,EACvB,IAAI,EACJ,eAAe,EACf,eAAe,EACf,QAAQ,EACR,QAAgB,EAChB,wBAAwB,EACxB,KAAK,EACL,oBAAoB,GACrB,EAAE;IACD,IAAI,CAAC,EAAE,KAAK,CAAC,EAAE,CAAA;IACf,eAAe,CAAC,EAAE,MAAM,CAAA;IACxB,eAAe,EAAE,MAAM,CAAA;IACvB,QAAQ,EAAE,SAAS,CAAA;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,wBAAwB,CAAC,EAAE,MAAM,EAAE,CAAA;IACnC,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,oBAAoB,CAAC,EAAE,OAAO,CAAA;CAC/B,GAAG,KAAK,CAAC,SAAS,CAqFlB"}
|