@payloadcms/richtext-lexical 4.0.0-internal.e7d4ebc → 4.0.0-internal.ee5d8bd
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/exports/client/Field-334JNLRF.js +2 -0
- package/dist/exports/client/Field-334JNLRF.js.map +7 -0
- package/dist/exports/client/{RelationshipComponent-YCPAKOL7.js → RelationshipComponent-TVK6I4W4.js} +2 -2
- package/dist/exports/client/chunk-BEKGION5.js +2 -0
- package/dist/exports/client/chunk-BEKGION5.js.map +7 -0
- package/dist/exports/client/{chunk-WSAPGI3Z.js → chunk-EA5BHQ2T.js} +1 -1
- package/dist/exports/client/{chunk-WSAPGI3Z.js.map → chunk-EA5BHQ2T.js.map} +1 -1
- package/dist/exports/client/chunk-FAJJXXCW.js +2 -0
- package/dist/exports/client/chunk-FAJJXXCW.js.map +7 -0
- package/dist/exports/client/{chunk-5VIL27GI.js → chunk-IYBYNEKX.js} +1 -1
- package/dist/exports/client/{chunk-5VIL27GI.js.map → chunk-IYBYNEKX.js.map} +1 -1
- package/dist/exports/client/chunk-SE5IITBK.js +2 -0
- package/dist/exports/client/chunk-SE5IITBK.js.map +7 -0
- package/dist/exports/client/component-QENB4QTS.js +2 -0
- package/dist/exports/client/component-QENB4QTS.js.map +7 -0
- package/dist/exports/client/componentInline-AU7IBNY7.js +2 -0
- package/dist/exports/client/index.d.ts +1 -1
- package/dist/exports/client/index.d.ts.map +1 -1
- package/dist/exports/client/index.js +26 -26
- package/dist/exports/client/index.js.map +4 -4
- package/dist/features/align/client/index.js.map +1 -1
- package/dist/features/blocks/client/component/BlockContent.js.map +1 -1
- package/dist/features/blocks/client/component/BlockReordering/index.d.ts +11 -0
- package/dist/features/blocks/client/component/BlockReordering/index.d.ts.map +1 -0
- package/dist/features/blocks/client/component/BlockReordering/index.js +18 -0
- package/dist/features/blocks/client/component/BlockReordering/index.js.map +1 -0
- package/dist/features/blocks/client/component/components/BlockCollapsible.js.map +1 -1
- package/dist/features/blocks/client/component/components/BlockEditButton.js.map +1 -1
- package/dist/features/blocks/client/component/components/BlockRemoveButton.js.map +1 -1
- package/dist/features/blocks/client/component/index.d.ts +0 -6
- package/dist/features/blocks/client/component/index.d.ts.map +1 -1
- package/dist/features/blocks/client/component/index.js +199 -109
- package/dist/features/blocks/client/component/index.js.map +1 -1
- package/dist/features/blocks/client/component/useBlockReordering.d.ts +16 -0
- package/dist/features/blocks/client/component/useBlockReordering.d.ts.map +1 -0
- package/dist/features/blocks/client/component/useBlockReordering.js +178 -0
- package/dist/features/blocks/client/component/useBlockReordering.js.map +1 -0
- package/dist/features/blocks/client/componentInline/components/InlineBlockContainer.js.map +1 -1
- package/dist/features/blocks/client/componentInline/components/InlineBlockEditButton.js.map +1 -1
- package/dist/features/blocks/client/componentInline/components/InlineBlockLabel.js.map +1 -1
- package/dist/features/blocks/client/componentInline/components/InlineBlockRemoveButton.js.map +1 -1
- package/dist/features/blocks/client/componentInline/index.css +0 -1
- package/dist/features/blocks/client/componentInline/index.d.ts.map +1 -1
- package/dist/features/blocks/client/componentInline/index.js +32 -30
- package/dist/features/blocks/client/componentInline/index.js.map +1 -1
- package/dist/features/blocks/client/getCachedFormStateIfDataMatches.d.ts +9 -0
- package/dist/features/blocks/client/getCachedFormStateIfDataMatches.d.ts.map +1 -0
- package/dist/features/blocks/client/getCachedFormStateIfDataMatches.js +95 -0
- package/dist/features/blocks/client/getCachedFormStateIfDataMatches.js.map +1 -0
- package/dist/features/blocks/client/nodes/BlocksNode.d.ts.map +1 -1
- package/dist/features/blocks/client/nodes/BlocksNode.js +0 -10
- package/dist/features/blocks/client/nodes/BlocksNode.js.map +1 -1
- package/dist/features/blocks/client/plugin/index.js.map +1 -1
- package/dist/features/blocks/premade/CodeBlock/Component/Block.js +121 -78
- package/dist/features/blocks/premade/CodeBlock/Component/Block.js.map +1 -1
- package/dist/features/blocks/premade/CodeBlock/Component/Code.js +142 -87
- package/dist/features/blocks/premade/CodeBlock/Component/Code.js.map +1 -1
- package/dist/features/blocks/server/index.js +2 -2
- package/dist/features/blocks/server/index.js.map +1 -1
- package/dist/features/blocks/server/nodes/BlocksNode.d.ts.map +1 -1
- package/dist/features/blocks/server/nodes/BlocksNode.js +1 -12
- package/dist/features/blocks/server/nodes/BlocksNode.js.map +1 -1
- package/dist/features/blocks/server/nodes/InlineBlocksNode.js +2 -2
- package/dist/features/blocks/server/nodes/InlineBlocksNode.js.map +1 -1
- package/dist/features/blocks/server/schema.d.ts +2 -0
- package/dist/features/blocks/server/schema.d.ts.map +1 -1
- package/dist/features/blocks/server/schema.js +7 -9
- package/dist/features/blocks/server/schema.js.map +1 -1
- package/dist/features/blocks/server/validate.js +1 -1
- package/dist/features/blocks/server/validate.js.map +1 -1
- package/dist/features/converters/lexicalToHtml/async/converters/heading.js +1 -1
- package/dist/features/converters/lexicalToHtml/async/converters/heading.js.map +1 -1
- package/dist/features/converters/lexicalToHtml/async/converters/list.d.ts.map +1 -1
- package/dist/features/converters/lexicalToHtml/async/converters/list.js +4 -3
- package/dist/features/converters/lexicalToHtml/async/converters/list.js.map +1 -1
- package/dist/features/converters/lexicalToHtml/async/converters/upload.js +3 -3
- package/dist/features/converters/lexicalToHtml/async/converters/upload.js.map +1 -1
- package/dist/features/converters/lexicalToHtml/shared/findConverterForNode.d.ts.map +1 -1
- package/dist/features/converters/lexicalToHtml/shared/findConverterForNode.js +3 -2
- package/dist/features/converters/lexicalToHtml/shared/findConverterForNode.js.map +1 -1
- package/dist/features/converters/lexicalToHtml/sync/converters/heading.js +1 -1
- package/dist/features/converters/lexicalToHtml/sync/converters/heading.js.map +1 -1
- package/dist/features/converters/lexicalToHtml/sync/converters/list.d.ts.map +1 -1
- package/dist/features/converters/lexicalToHtml/sync/converters/list.js +4 -3
- package/dist/features/converters/lexicalToHtml/sync/converters/list.js.map +1 -1
- package/dist/features/converters/lexicalToHtml/sync/converters/upload.js +3 -3
- package/dist/features/converters/lexicalToHtml/sync/converters/upload.js.map +1 -1
- package/dist/features/converters/lexicalToHtml/sync/types.d.ts.map +1 -1
- package/dist/features/converters/lexicalToHtml/sync/types.js.map +1 -1
- package/dist/features/converters/lexicalToJSX/converter/converters/heading.d.ts.map +1 -1
- package/dist/features/converters/lexicalToJSX/converter/converters/heading.js +2 -1
- package/dist/features/converters/lexicalToJSX/converter/converters/heading.js.map +1 -1
- package/dist/features/converters/lexicalToJSX/converter/converters/list.d.ts.map +1 -1
- package/dist/features/converters/lexicalToJSX/converter/converters/list.js +2 -1
- package/dist/features/converters/lexicalToJSX/converter/converters/list.js.map +1 -1
- package/dist/features/converters/lexicalToJSX/converter/converters/upload.d.ts.map +1 -1
- package/dist/features/converters/lexicalToJSX/converter/converters/upload.js +4 -5
- package/dist/features/converters/lexicalToJSX/converter/converters/upload.js.map +1 -1
- package/dist/features/converters/utilities/payloadPopulateFn.d.ts.map +1 -1
- package/dist/features/converters/utilities/payloadPopulateFn.js +4 -2
- package/dist/features/converters/utilities/payloadPopulateFn.js.map +1 -1
- package/dist/features/debug/jsxConverter/client/plugin/index.js.map +1 -1
- package/dist/features/debug/testRecorder/client/plugin/index.css +0 -1
- package/dist/features/debug/testRecorder/client/plugin/index.js.map +1 -1
- package/dist/features/debug/treeView/client/plugin/index.js.map +1 -1
- package/dist/features/heading/client/index.js.map +1 -1
- package/dist/features/heading/constants.d.ts +2 -0
- package/dist/features/heading/constants.d.ts.map +1 -0
- package/dist/features/heading/constants.js +2 -0
- package/dist/features/heading/constants.js.map +1 -0
- package/dist/features/heading/server/index.d.ts.map +1 -1
- package/dist/features/heading/server/index.js +5 -1
- package/dist/features/heading/server/index.js.map +1 -1
- package/dist/features/heading/server/validate.d.ts +6 -0
- package/dist/features/heading/server/validate.d.ts.map +1 -0
- package/dist/features/heading/server/validate.js +15 -0
- package/dist/features/heading/server/validate.js.map +1 -0
- package/dist/features/horizontalRule/client/nodes/HorizontalRuleNode.d.ts +12 -2
- package/dist/features/horizontalRule/client/nodes/HorizontalRuleNode.d.ts.map +1 -1
- package/dist/features/horizontalRule/client/nodes/HorizontalRuleNode.js +18 -1
- package/dist/features/horizontalRule/client/nodes/HorizontalRuleNode.js.map +1 -1
- package/dist/features/horizontalRule/client/plugin/index.js.map +1 -1
- package/dist/features/horizontalRule/server/nodes/HorizontalRuleNode.d.ts +1 -1
- package/dist/features/horizontalRule/server/nodes/HorizontalRuleNode.d.ts.map +1 -1
- package/dist/features/horizontalRule/server/nodes/HorizontalRuleNode.js +3 -3
- package/dist/features/horizontalRule/server/nodes/HorizontalRuleNode.js.map +1 -1
- package/dist/features/horizontalRule/server/schema.d.ts +1 -0
- package/dist/features/horizontalRule/server/schema.d.ts.map +1 -1
- package/dist/features/horizontalRule/server/schema.js +6 -5
- package/dist/features/horizontalRule/server/schema.js.map +1 -1
- package/dist/features/indent/client/IndentPlugin.d.ts.map +1 -1
- package/dist/features/indent/client/IndentPlugin.js +122 -1
- package/dist/features/indent/client/IndentPlugin.js.map +1 -1
- package/dist/features/indent/client/index.d.ts.map +1 -1
- package/dist/features/indent/client/index.js +0 -2
- package/dist/features/indent/client/index.js.map +1 -1
- package/dist/features/indent/server/i18n.d.ts.map +1 -1
- package/dist/features/indent/server/i18n.js +74 -37
- package/dist/features/indent/server/i18n.js.map +1 -1
- package/dist/features/link/client/plugins/autoLink/index.js.map +1 -1
- package/dist/features/link/client/plugins/floatingLinkEditor/LinkEditor/index.d.ts.map +1 -1
- package/dist/features/link/client/plugins/floatingLinkEditor/LinkEditor/index.js +18 -7
- package/dist/features/link/client/plugins/floatingLinkEditor/LinkEditor/index.js.map +1 -1
- package/dist/features/link/client/plugins/floatingLinkEditor/index.css +0 -2
- package/dist/features/link/client/plugins/link/index.js.map +1 -1
- package/dist/features/link/markdownTransformer.js +2 -2
- package/dist/features/link/markdownTransformer.js.map +1 -1
- package/dist/features/link/nodes/AutoLinkNode.d.ts +1 -1
- package/dist/features/link/nodes/AutoLinkNode.d.ts.map +1 -1
- package/dist/features/link/nodes/AutoLinkNode.js +2 -10
- package/dist/features/link/nodes/AutoLinkNode.js.map +1 -1
- package/dist/features/link/nodes/LinkNode.d.ts +1 -1
- package/dist/features/link/nodes/LinkNode.d.ts.map +1 -1
- package/dist/features/link/nodes/LinkNode.js +2 -15
- package/dist/features/link/nodes/LinkNode.js.map +1 -1
- package/dist/features/link/server/baseFields.js.map +1 -1
- package/dist/features/link/server/index.js +2 -2
- package/dist/features/link/server/index.js.map +1 -1
- package/dist/features/link/server/validate.js +1 -1
- package/dist/features/link/server/validate.js.map +1 -1
- package/dist/features/lists/checklist/server/index.d.ts.map +1 -1
- package/dist/features/lists/checklist/server/index.js +5 -2
- package/dist/features/lists/checklist/server/index.js.map +1 -1
- package/dist/features/lists/orderedList/server/index.d.ts.map +1 -1
- package/dist/features/lists/orderedList/server/index.js +5 -2
- package/dist/features/lists/orderedList/server/index.js.map +1 -1
- package/dist/features/lists/shared/constants.d.ts +2 -0
- package/dist/features/lists/shared/constants.d.ts.map +1 -0
- package/dist/features/lists/shared/constants.js +2 -0
- package/dist/features/lists/shared/constants.js.map +1 -0
- package/dist/features/lists/shared/schema.d.ts.map +1 -1
- package/dist/features/lists/shared/schema.js.map +1 -1
- package/dist/features/lists/shared/validate.d.ts +5 -0
- package/dist/features/lists/shared/validate.d.ts.map +1 -0
- package/dist/features/lists/shared/validate.js +15 -0
- package/dist/features/lists/shared/validate.js.map +1 -0
- package/dist/features/lists/unorderedList/server/index.d.ts.map +1 -1
- package/dist/features/lists/unorderedList/server/index.js +5 -2
- package/dist/features/lists/unorderedList/server/index.js.map +1 -1
- package/dist/features/relationship/client/components/index.css +3 -6
- package/dist/features/relationship/client/drawer/index.js.map +1 -1
- package/dist/features/relationship/client/index.d.ts +2 -2
- package/dist/features/relationship/client/index.d.ts.map +1 -1
- package/dist/features/relationship/client/index.js.map +1 -1
- package/dist/features/relationship/client/nodes/RelationshipNode.d.ts.map +1 -1
- package/dist/features/relationship/client/nodes/RelationshipNode.js +0 -3
- package/dist/features/relationship/client/nodes/RelationshipNode.js.map +1 -1
- package/dist/features/relationship/client/plugins/index.d.ts +2 -2
- package/dist/features/relationship/client/plugins/index.d.ts.map +1 -1
- package/dist/features/relationship/client/plugins/index.js +27 -31
- package/dist/features/relationship/client/plugins/index.js.map +1 -1
- package/dist/features/relationship/client/utils/useEnabledRelationships.d.ts +2 -4
- package/dist/features/relationship/client/utils/useEnabledRelationships.d.ts.map +1 -1
- package/dist/features/relationship/client/utils/useEnabledRelationships.js +53 -20
- package/dist/features/relationship/client/utils/useEnabledRelationships.js.map +1 -1
- package/dist/features/relationship/server/graphQLPopulationPromise.d.ts +2 -2
- package/dist/features/relationship/server/graphQLPopulationPromise.d.ts.map +1 -1
- package/dist/features/relationship/server/graphQLPopulationPromise.js +2 -2
- package/dist/features/relationship/server/graphQLPopulationPromise.js.map +1 -1
- package/dist/features/relationship/server/index.d.ts +8 -1
- package/dist/features/relationship/server/index.d.ts.map +1 -1
- package/dist/features/relationship/server/index.js +28 -11
- package/dist/features/relationship/server/index.js.map +1 -1
- package/dist/features/relationship/server/nodes/RelationshipNode.d.ts.map +1 -1
- package/dist/features/relationship/server/nodes/RelationshipNode.js +1 -5
- package/dist/features/relationship/server/nodes/RelationshipNode.js.map +1 -1
- package/dist/features/relationship/server/schema.d.ts +3 -2
- package/dist/features/relationship/server/schema.d.ts.map +1 -1
- package/dist/features/relationship/server/schema.js +9 -12
- package/dist/features/relationship/server/schema.js.map +1 -1
- package/dist/features/relationship/shared/filterEnabledRelationshipCollections.d.ts +1 -6
- package/dist/features/relationship/shared/filterEnabledRelationshipCollections.d.ts.map +1 -1
- package/dist/features/relationship/shared/filterEnabledRelationshipCollections.js +1 -5
- package/dist/features/relationship/shared/filterEnabledRelationshipCollections.js.map +1 -1
- package/dist/features/table/client/index.d.ts.map +1 -0
- package/dist/features/table/client/index.js.map +1 -0
- package/dist/features/table/client/plugins/TableActionMenuPlugin/computeSelectionCount.d.ts +8 -0
- package/dist/features/table/client/plugins/TableActionMenuPlugin/computeSelectionCount.d.ts.map +1 -0
- package/dist/features/table/client/plugins/TableActionMenuPlugin/computeSelectionCount.js +19 -0
- package/dist/features/table/client/plugins/TableActionMenuPlugin/computeSelectionCount.js.map +1 -0
- package/dist/features/{experimental_table → table}/client/plugins/TableActionMenuPlugin/index.css +1 -2
- package/dist/features/table/client/plugins/TableActionMenuPlugin/index.d.ts.map +1 -0
- package/dist/features/{experimental_table → table}/client/plugins/TableActionMenuPlugin/index.js +17 -44
- package/dist/features/table/client/plugins/TableActionMenuPlugin/index.js.map +1 -0
- package/dist/features/table/client/plugins/TableCellResizerPlugin/index.d.ts.map +1 -0
- package/dist/features/{experimental_table → table}/client/plugins/TableCellResizerPlugin/index.js +47 -24
- package/dist/features/table/client/plugins/TableCellResizerPlugin/index.js.map +1 -0
- package/dist/features/table/client/plugins/TableHoverActionsPlugin/index.d.ts.map +1 -0
- package/dist/features/table/client/plugins/TableHoverActionsPlugin/index.js.map +1 -0
- package/dist/features/{experimental_table → table}/client/plugins/TablePlugin/TableGridPopup/index.css +0 -3
- package/dist/features/table/client/plugins/TablePlugin/TableGridPopup/index.d.ts.map +1 -0
- package/dist/features/table/client/plugins/TablePlugin/TableGridPopup/index.js.map +1 -0
- package/dist/features/table/client/plugins/TablePlugin/index.d.ts.map +1 -0
- package/dist/features/{experimental_table → table}/client/plugins/TablePlugin/index.js +54 -18
- package/dist/features/table/client/plugins/TablePlugin/index.js.map +1 -0
- package/dist/features/table/client/utils/debounce.d.ts.map +1 -0
- package/dist/features/table/client/utils/debounce.js.map +1 -0
- package/dist/features/table/client/utils/useDebounce.d.ts.map +1 -0
- package/dist/features/table/client/utils/useDebounce.js.map +1 -0
- package/dist/features/table/markdownTransformer.d.ts.map +1 -0
- package/dist/features/table/markdownTransformer.js.map +1 -0
- package/dist/features/table/server/index.d.ts +3 -0
- package/dist/features/table/server/index.d.ts.map +1 -0
- package/dist/features/{experimental_table → table}/server/index.js +4 -4
- package/dist/features/table/server/index.js.map +1 -0
- package/dist/features/table/server/schema.d.ts.map +1 -0
- package/dist/features/table/server/schema.js.map +1 -0
- package/dist/features/textState/defaultColors.js +1 -1
- package/dist/features/textState/defaultColors.js.map +1 -1
- package/dist/features/toolbars/fixed/client/Toolbar/horizontalWheelScroll.d.ts +8 -0
- package/dist/features/toolbars/fixed/client/Toolbar/horizontalWheelScroll.d.ts.map +1 -0
- package/dist/features/toolbars/fixed/client/Toolbar/horizontalWheelScroll.js +80 -0
- package/dist/features/toolbars/fixed/client/Toolbar/horizontalWheelScroll.js.map +1 -0
- package/dist/features/toolbars/fixed/client/Toolbar/index.css +77 -3
- package/dist/features/toolbars/fixed/client/Toolbar/index.d.ts.map +1 -1
- package/dist/features/toolbars/fixed/client/Toolbar/index.js +145 -71
- package/dist/features/toolbars/fixed/client/Toolbar/index.js.map +1 -1
- package/dist/features/toolbars/inline/client/Toolbar/index.css +0 -1
- package/dist/features/toolbars/inline/client/Toolbar/index.d.ts.map +1 -1
- package/dist/features/toolbars/inline/client/Toolbar/index.js +84 -37
- package/dist/features/toolbars/inline/client/Toolbar/index.js.map +1 -1
- package/dist/features/toolbars/shared/ToolbarButton/index.d.ts.map +1 -1
- package/dist/features/toolbars/shared/ToolbarButton/index.js +27 -2
- package/dist/features/toolbars/shared/ToolbarButton/index.js.map +1 -1
- package/dist/features/toolbars/shared/ToolbarDropdown/DropDown.d.ts.map +1 -1
- package/dist/features/toolbars/shared/ToolbarDropdown/DropDown.js +199 -81
- package/dist/features/toolbars/shared/ToolbarDropdown/DropDown.js.map +1 -1
- package/dist/features/toolbars/shared/ToolbarDropdown/index.css +16 -14
- package/dist/features/toolbars/shared/ToolbarDropdown/index.d.ts.map +1 -1
- package/dist/features/toolbars/shared/ToolbarDropdown/index.js +22 -6
- package/dist/features/toolbars/shared/ToolbarDropdown/index.js.map +1 -1
- package/dist/features/toolbars/shared/useToolbarKeyboardNavigation.d.ts +5 -0
- package/dist/features/toolbars/shared/useToolbarKeyboardNavigation.d.ts.map +1 -0
- package/dist/features/toolbars/shared/useToolbarKeyboardNavigation.js +109 -0
- package/dist/features/toolbars/shared/useToolbarKeyboardNavigation.js.map +1 -0
- package/dist/features/typesServer.d.ts +17 -12
- package/dist/features/typesServer.d.ts.map +1 -1
- package/dist/features/typesServer.js.map +1 -1
- package/dist/features/upload/client/component/index.css +0 -2
- package/dist/features/upload/client/component/index.js +2 -1
- package/dist/features/upload/client/component/index.js.map +1 -1
- package/dist/features/upload/client/drawer/index.js.map +1 -1
- package/dist/features/upload/client/index.d.ts +3 -2
- package/dist/features/upload/client/index.d.ts.map +1 -1
- package/dist/features/upload/client/index.js.map +1 -1
- package/dist/features/upload/client/nodes/UploadNode.d.ts.map +1 -1
- package/dist/features/upload/client/nodes/UploadNode.js +0 -7
- package/dist/features/upload/client/nodes/UploadNode.js.map +1 -1
- package/dist/features/upload/client/plugin/index.d.ts.map +1 -1
- package/dist/features/upload/client/plugin/index.js +50 -53
- package/dist/features/upload/client/plugin/index.js.map +1 -1
- package/dist/features/upload/server/graphQLPopulationPromise.d.ts +2 -2
- package/dist/features/upload/server/graphQLPopulationPromise.d.ts.map +1 -1
- package/dist/features/upload/server/graphQLPopulationPromise.js +1 -1
- package/dist/features/upload/server/graphQLPopulationPromise.js.map +1 -1
- package/dist/features/upload/server/index.d.ts +7 -3
- package/dist/features/upload/server/index.d.ts.map +1 -1
- package/dist/features/upload/server/index.js +20 -16
- package/dist/features/upload/server/index.js.map +1 -1
- package/dist/features/upload/server/nodes/UploadNode.d.ts.map +1 -1
- package/dist/features/upload/server/nodes/UploadNode.js +1 -9
- package/dist/features/upload/server/nodes/UploadNode.js.map +1 -1
- package/dist/features/upload/server/schema.d.ts +4 -16
- package/dist/features/upload/server/schema.d.ts.map +1 -1
- package/dist/features/upload/server/schema.js +8 -10
- package/dist/features/upload/server/schema.js.map +1 -1
- package/dist/features/upload/server/validate.d.ts +2 -2
- package/dist/features/upload/server/validate.d.ts.map +1 -1
- package/dist/features/upload/server/validate.js +4 -1
- package/dist/features/upload/server/validate.js.map +1 -1
- package/dist/field/Diff/converters/listitem/index.d.ts.map +1 -1
- package/dist/field/Diff/converters/listitem/index.js +2 -1
- package/dist/field/Diff/converters/listitem/index.js.map +1 -1
- package/dist/field/Diff/converters/relationship/index.css +0 -1
- package/dist/field/Diff/converters/unknown/index.css +0 -1
- package/dist/field/Diff/converters/upload/index.css +0 -1
- package/dist/field/Diff/converters/upload/index.js.map +1 -1
- package/dist/field/Diff/index.css +0 -2
- package/dist/field/Diff/index.d.ts +3 -2
- package/dist/field/Diff/index.d.ts.map +1 -1
- package/dist/field/Diff/index.js +3 -2
- package/dist/field/Diff/index.js.map +1 -1
- package/dist/field/Field.d.ts.map +1 -1
- package/dist/field/Field.js +8 -1
- package/dist/field/Field.js.map +1 -1
- package/dist/field/RenderLexical/index.d.ts +3 -1
- package/dist/field/RenderLexical/index.d.ts.map +1 -1
- package/dist/field/RenderLexical/index.js +23 -23
- package/dist/field/RenderLexical/index.js.map +1 -1
- package/dist/field/ViewSelector.d.ts.map +1 -1
- package/dist/field/ViewSelector.js +13 -4
- package/dist/field/ViewSelector.js.map +1 -1
- package/dist/field/bundled.css +1 -1
- package/dist/field/index.css +10 -11
- package/dist/field/index.js.map +1 -1
- package/dist/field/rscEntry.d.ts +2 -2
- package/dist/field/rscEntry.d.ts.map +1 -1
- package/dist/field/rscEntry.js.map +1 -1
- package/dist/i18n.d.ts.map +1 -1
- package/dist/i18n.js +112 -0
- package/dist/i18n.js.map +1 -1
- package/dist/index.d.ts +5 -5
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +27 -5
- package/dist/index.js.map +1 -1
- package/dist/lexical/LexicalEditor.css +21 -10
- package/dist/lexical/LexicalEditor.d.ts.map +1 -1
- package/dist/lexical/LexicalEditor.js +61 -64
- package/dist/lexical/LexicalEditor.js.map +1 -1
- package/dist/lexical/config/server/loader.d.ts +1 -1
- package/dist/lexical/config/server/loader.d.ts.map +1 -1
- package/dist/lexical/config/server/loader.js +2 -2
- package/dist/lexical/config/server/loader.js.map +1 -1
- package/dist/lexical/config/server/sanitize.d.ts +1 -1
- package/dist/lexical/config/server/sanitize.d.ts.map +1 -1
- package/dist/lexical/config/server/sanitize.js +2 -2
- package/dist/lexical/config/server/sanitize.js.map +1 -1
- package/dist/lexical/plugins/ClipboardPlugin/index.js.map +1 -1
- package/dist/lexical/plugins/DecoratorPlugin/index.d.ts.map +1 -1
- package/dist/lexical/plugins/DecoratorPlugin/index.js +24 -21
- package/dist/lexical/plugins/DecoratorPlugin/index.js.map +1 -1
- package/dist/lexical/plugins/InsertParagraphAtEnd/index.css +18 -25
- package/dist/lexical/plugins/InsertParagraphAtEnd/index.d.ts.map +1 -1
- package/dist/lexical/plugins/InsertParagraphAtEnd/index.js +27 -14
- package/dist/lexical/plugins/InsertParagraphAtEnd/index.js.map +1 -1
- package/dist/lexical/plugins/MarkdownShortcut/index.js.map +1 -1
- package/dist/lexical/plugins/NodeViewOverridePlugin/index.js.map +1 -1
- package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/LexicalMenu.d.ts +0 -1
- package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/LexicalMenu.d.ts.map +1 -1
- package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/LexicalMenu.js +236 -108
- package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/LexicalMenu.js.map +1 -1
- package/dist/lexical/plugins/SlashMenu/index.css +0 -2
- package/dist/lexical/plugins/SlashMenu/useMenuTriggerMatch.js.map +1 -1
- package/dist/lexical/plugins/TextPlugin/index.js.map +1 -1
- package/dist/lexical/plugins/handles/AddBlockHandlePlugin/index.css +1 -0
- package/dist/lexical/plugins/handles/AddBlockHandlePlugin/index.js +2 -2
- package/dist/lexical/plugins/handles/AddBlockHandlePlugin/index.js.map +1 -1
- package/dist/lexical/plugins/handles/DraggableBlockPlugin/index.css +17 -0
- package/dist/lexical/plugins/handles/DraggableBlockPlugin/index.d.ts.map +1 -1
- package/dist/lexical/plugins/handles/DraggableBlockPlugin/index.js +139 -37
- package/dist/lexical/plugins/handles/DraggableBlockPlugin/index.js.map +1 -1
- package/dist/lexical/plugins/handles/DraggableBlockPlugin/moveBlock.d.ts +7 -0
- package/dist/lexical/plugins/handles/DraggableBlockPlugin/moveBlock.d.ts.map +1 -0
- package/dist/lexical/plugins/handles/DraggableBlockPlugin/moveBlock.js +15 -0
- package/dist/lexical/plugins/handles/DraggableBlockPlugin/moveBlock.js.map +1 -0
- package/dist/lexical/plugins/handles/DraggableBlockPlugin/useKeyboardReordering.d.ts +7 -0
- package/dist/lexical/plugins/handles/DraggableBlockPlugin/useKeyboardReordering.d.ts.map +1 -0
- package/dist/lexical/plugins/handles/DraggableBlockPlugin/useKeyboardReordering.js +62 -0
- package/dist/lexical/plugins/handles/DraggableBlockPlugin/useKeyboardReordering.js.map +1 -0
- package/dist/lexical/plugins/handles/utils/setHandlePosition.d.ts.map +1 -1
- package/dist/lexical/plugins/handles/utils/setHandlePosition.js +2 -0
- package/dist/lexical/plugins/handles/utils/setHandlePosition.js.map +1 -1
- package/dist/lexical/theme/EditorTheme.css +0 -2
- package/dist/lexical/ui/ContentEditable.css +0 -4
- package/dist/lexical/ui/ContentEditable.d.ts +2 -1
- package/dist/lexical/ui/ContentEditable.d.ts.map +1 -1
- package/dist/lexical/ui/ContentEditable.js +32 -11
- package/dist/lexical/ui/ContentEditable.js.map +1 -1
- package/dist/lexical/ui/icons/H3/index.d.ts.map +1 -1
- package/dist/lexical/ui/icons/H3/index.js +13 -6
- package/dist/lexical/ui/icons/H3/index.js.map +1 -1
- package/dist/lexical/ui/icons/H4/index.d.ts.map +1 -1
- package/dist/lexical/ui/icons/H4/index.js +13 -6
- package/dist/lexical/ui/icons/H4/index.js.map +1 -1
- package/dist/lexical/ui/icons/H5/index.d.ts.map +1 -1
- package/dist/lexical/ui/icons/H5/index.js +13 -6
- package/dist/lexical/ui/icons/H5/index.js.map +1 -1
- package/dist/lexical/ui/icons/H6/index.d.ts.map +1 -1
- package/dist/lexical/ui/icons/H6/index.js +13 -6
- package/dist/lexical/ui/icons/H6/index.js.map +1 -1
- package/dist/lexical/utils/nodeFormat.d.ts.map +1 -1
- package/dist/lexical/utils/nodeFormat.js +0 -2
- package/dist/lexical/utils/nodeFormat.js.map +1 -1
- package/dist/lexical/utils/url.d.ts.map +1 -1
- package/dist/lexical/utils/url.js +1 -1
- package/dist/lexical/utils/url.js.map +1 -1
- package/dist/lexical-proxy/@lexical-react/ExtensionComponent.d.ts +2 -0
- package/dist/lexical-proxy/@lexical-react/ExtensionComponent.d.ts.map +1 -0
- package/dist/lexical-proxy/@lexical-react/ExtensionComponent.js +2 -0
- package/dist/lexical-proxy/@lexical-react/ExtensionComponent.js.map +1 -0
- package/dist/lexical-proxy/@lexical-react/LexicalExtensionComposer.d.ts +2 -0
- package/dist/lexical-proxy/@lexical-react/LexicalExtensionComposer.d.ts.map +1 -0
- package/dist/lexical-proxy/@lexical-react/LexicalExtensionComposer.js +2 -0
- package/dist/lexical-proxy/@lexical-react/LexicalExtensionComposer.js.map +1 -0
- package/dist/lexical-proxy/@lexical-react/LexicalExtensionEditorComposer.d.ts +2 -0
- package/dist/lexical-proxy/@lexical-react/LexicalExtensionEditorComposer.d.ts.map +1 -0
- package/dist/lexical-proxy/@lexical-react/LexicalExtensionEditorComposer.js +2 -0
- package/dist/lexical-proxy/@lexical-react/LexicalExtensionEditorComposer.js.map +1 -0
- package/dist/lexical-proxy/@lexical-react/LexicalSelectionAlwaysOnDisplay.d.ts +2 -0
- package/dist/lexical-proxy/@lexical-react/LexicalSelectionAlwaysOnDisplay.d.ts.map +1 -0
- package/dist/lexical-proxy/@lexical-react/LexicalSelectionAlwaysOnDisplay.js +2 -0
- package/dist/lexical-proxy/@lexical-react/LexicalSelectionAlwaysOnDisplay.js.map +1 -0
- package/dist/lexical-proxy/@lexical-react/ReactExtension.d.ts +2 -0
- package/dist/lexical-proxy/@lexical-react/ReactExtension.d.ts.map +1 -0
- package/dist/lexical-proxy/@lexical-react/ReactExtension.js +2 -0
- package/dist/lexical-proxy/@lexical-react/ReactExtension.js.map +1 -0
- package/dist/lexical-proxy/@lexical-react/ReactPluginHostExtension.d.ts +2 -0
- package/dist/lexical-proxy/@lexical-react/ReactPluginHostExtension.d.ts.map +1 -0
- package/dist/lexical-proxy/@lexical-react/ReactPluginHostExtension.js +2 -0
- package/dist/lexical-proxy/@lexical-react/ReactPluginHostExtension.js.map +1 -0
- package/dist/lexical-proxy/@lexical-react/ReactProviderExtension.d.ts +2 -0
- package/dist/lexical-proxy/@lexical-react/ReactProviderExtension.d.ts.map +1 -0
- package/dist/lexical-proxy/@lexical-react/ReactProviderExtension.js +2 -0
- package/dist/lexical-proxy/@lexical-react/ReactProviderExtension.js.map +1 -0
- package/dist/lexical-proxy/@lexical-react/TreeViewExtension.d.ts +2 -0
- package/dist/lexical-proxy/@lexical-react/TreeViewExtension.d.ts.map +1 -0
- package/dist/lexical-proxy/@lexical-react/TreeViewExtension.js +2 -0
- package/dist/lexical-proxy/@lexical-react/TreeViewExtension.js.map +1 -0
- package/dist/lexical-proxy/@lexical-react/useExtensionComponent.d.ts +2 -0
- package/dist/lexical-proxy/@lexical-react/useExtensionComponent.d.ts.map +1 -0
- package/dist/lexical-proxy/@lexical-react/useExtensionComponent.js +2 -0
- package/dist/lexical-proxy/@lexical-react/useExtensionComponent.js.map +1 -0
- package/dist/lexical-proxy/@lexical-react/useExtensionSignalValue.d.ts +2 -0
- package/dist/lexical-proxy/@lexical-react/useExtensionSignalValue.d.ts.map +1 -0
- package/dist/lexical-proxy/@lexical-react/useExtensionSignalValue.js +2 -0
- package/dist/lexical-proxy/@lexical-react/useExtensionSignalValue.js.map +1 -0
- package/dist/lexical-proxy/@lexical-react/useLexicalAriaLiveRegion.d.ts +2 -0
- package/dist/lexical-proxy/@lexical-react/useLexicalAriaLiveRegion.d.ts.map +1 -0
- package/dist/lexical-proxy/@lexical-react/useLexicalAriaLiveRegion.js +2 -0
- package/dist/lexical-proxy/@lexical-react/useLexicalAriaLiveRegion.js.map +1 -0
- package/dist/lexical-proxy/@lexical-react/useLexicalFocusManagerRef.d.ts +2 -0
- package/dist/lexical-proxy/@lexical-react/useLexicalFocusManagerRef.d.ts.map +1 -0
- package/dist/lexical-proxy/@lexical-react/useLexicalFocusManagerRef.js +2 -0
- package/dist/lexical-proxy/@lexical-react/useLexicalFocusManagerRef.js.map +1 -0
- package/dist/lexical-proxy/@lexical-react/useLexicalFocusTrapRef.d.ts +2 -0
- package/dist/lexical-proxy/@lexical-react/useLexicalFocusTrapRef.d.ts.map +1 -0
- package/dist/lexical-proxy/@lexical-react/useLexicalFocusTrapRef.js +2 -0
- package/dist/lexical-proxy/@lexical-react/useLexicalFocusTrapRef.js.map +1 -0
- package/dist/lexical-proxy/@lexical-react/useLexicalRovingTabIndexRef.d.ts +2 -0
- package/dist/lexical-proxy/@lexical-react/useLexicalRovingTabIndexRef.d.ts.map +1 -0
- package/dist/lexical-proxy/@lexical-react/useLexicalRovingTabIndexRef.js +2 -0
- package/dist/lexical-proxy/@lexical-react/useLexicalRovingTabIndexRef.js.map +1 -0
- package/dist/lexical-proxy/@lexical-react/useLexicalSlotRef.d.ts +2 -0
- package/dist/lexical-proxy/@lexical-react/useLexicalSlotRef.d.ts.map +1 -0
- package/dist/lexical-proxy/@lexical-react/useLexicalSlotRef.js +2 -0
- package/dist/lexical-proxy/@lexical-react/useLexicalSlotRef.js.map +1 -0
- package/dist/populateGraphQL/populate.js.map +1 -1
- package/dist/presets/llmInstructions.d.ts +2 -0
- package/dist/presets/llmInstructions.d.ts.map +1 -0
- package/dist/presets/llmInstructions.js +13 -0
- package/dist/presets/llmInstructions.js.map +1 -0
- package/dist/types/builtInNodes.d.ts +1 -1
- package/dist/types/builtInNodes.d.ts.map +1 -1
- package/dist/types/builtInNodes.js +8 -3
- package/dist/types/builtInNodes.js.map +1 -1
- package/dist/types/index.d.ts +4 -7
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/index.js.map +1 -1
- package/dist/types/jsonSchemaHelpers.d.ts +5 -1
- package/dist/types/jsonSchemaHelpers.d.ts.map +1 -1
- package/dist/types/jsonSchemaHelpers.js +7 -2
- package/dist/types/jsonSchemaHelpers.js.map +1 -1
- package/dist/types/nodeTypes.d.ts +6 -1
- package/dist/types/nodeTypes.d.ts.map +1 -1
- package/dist/types/nodeTypes.js.map +1 -1
- package/dist/utilities/buildEditorState.d.ts.map +1 -1
- package/dist/utilities/buildEditorState.js.map +1 -1
- package/dist/utilities/buildInitialState.d.ts +3 -2
- package/dist/utilities/buildInitialState.d.ts.map +1 -1
- package/dist/utilities/buildInitialState.js +1 -0
- package/dist/utilities/buildInitialState.js.map +1 -1
- package/dist/utilities/createServerFeature.d.ts +1 -1
- package/dist/utilities/createServerFeature.d.ts.map +1 -1
- package/dist/utilities/createServerFeature.js +2 -2
- package/dist/utilities/createServerFeature.js.map +1 -1
- package/dist/utilities/editorConfigFactory.d.ts +6 -6
- package/dist/utilities/editorConfigFactory.d.ts.map +1 -1
- package/dist/utilities/editorConfigFactory.js +9 -9
- package/dist/utilities/editorConfigFactory.js.map +1 -1
- package/dist/utilities/fieldsDrawer/Drawer.js +36 -36
- package/dist/utilities/fieldsDrawer/Drawer.js.map +1 -1
- package/dist/utilities/fieldsDrawer/DrawerContent.d.ts.map +1 -1
- package/dist/utilities/fieldsDrawer/DrawerContent.js +6 -9
- package/dist/utilities/fieldsDrawer/DrawerContent.js.map +1 -1
- package/dist/utilities/fieldsDrawer/useDrawerSubmit.js.map +1 -1
- package/dist/utilities/fieldsDrawer/useLexicalDocumentDrawer.js.map +1 -1
- package/dist/utilities/fieldsDrawer/useLexicalDrawer.js.map +1 -1
- package/dist/utilities/fieldsDrawer/useLexicalListDrawer.js.map +1 -1
- package/dist/utilities/generateImportMap.d.ts +2 -2
- package/dist/utilities/generateImportMap.d.ts.map +1 -1
- package/dist/utilities/generateImportMap.js.map +1 -1
- package/dist/utilities/getDefaultSanitizedEditorConfig.d.ts +2 -2
- package/dist/utilities/getDefaultSanitizedEditorConfig.d.ts.map +1 -1
- package/dist/utilities/getDefaultSanitizedEditorConfig.js +6 -17
- package/dist/utilities/getDefaultSanitizedEditorConfig.js.map +1 -1
- package/dist/utilities/initLexicalFeatures.d.ts.map +1 -1
- package/dist/utilities/initLexicalFeatures.js +38 -4
- package/dist/utilities/initLexicalFeatures.js.map +1 -1
- package/dist/utilities/upgradeLexicalData/index.js +6 -3
- package/dist/utilities/upgradeLexicalData/index.js.map +1 -1
- package/dist/utilities/useLexicalFeature.js +15 -6
- package/dist/utilities/useLexicalFeature.js.map +1 -1
- package/dist/utilities/useRunDeprioritized.js.map +1 -1
- package/dist/validate/hasText.d.ts +2 -2
- package/dist/validate/hasText.d.ts.map +1 -1
- package/dist/validate/hasText.js.map +1 -1
- package/dist/validate/index.d.ts +1 -1
- package/dist/validate/index.d.ts.map +1 -1
- package/package.json +125 -54
- package/dist/dependencyChecker.spec.js +0 -16
- package/dist/dependencyChecker.spec.js.map +0 -1
- package/dist/exports/client/Field-QGSHF22S.js +0 -2
- package/dist/exports/client/Field-QGSHF22S.js.map +0 -7
- package/dist/exports/client/bundled.css +0 -1
- package/dist/exports/client/chunk-ESITTE3C.js +0 -2
- package/dist/exports/client/chunk-ESITTE3C.js.map +0 -7
- package/dist/exports/client/chunk-UD4DQ4AK.js +0 -2
- package/dist/exports/client/chunk-UD4DQ4AK.js.map +0 -7
- package/dist/exports/client/chunk-X3D4LZS7.js +0 -2
- package/dist/exports/client/chunk-X3D4LZS7.js.map +0 -7
- package/dist/exports/client/component-PHZQBOJE.js +0 -2
- package/dist/exports/client/component-PHZQBOJE.js.map +0 -7
- package/dist/exports/client/componentInline-H24N7GUG.js +0 -2
- package/dist/features/blocks/client/component/removeEmptyArrayValues.d.ts +0 -11
- package/dist/features/blocks/client/component/removeEmptyArrayValues.d.ts.map +0 -1
- package/dist/features/blocks/client/component/removeEmptyArrayValues.js +0 -20
- package/dist/features/blocks/client/component/removeEmptyArrayValues.js.map +0 -1
- package/dist/features/converters/lexicalToPlaintext/convertLexicalToPlaintext.spec.js +0 -180
- package/dist/features/converters/lexicalToPlaintext/convertLexicalToPlaintext.spec.js.map +0 -1
- package/dist/features/experimental_table/client/index.d.ts.map +0 -1
- package/dist/features/experimental_table/client/index.js.map +0 -1
- package/dist/features/experimental_table/client/plugins/TableActionMenuPlugin/index.d.ts.map +0 -1
- package/dist/features/experimental_table/client/plugins/TableActionMenuPlugin/index.js.map +0 -1
- package/dist/features/experimental_table/client/plugins/TableCellResizerPlugin/index.d.ts.map +0 -1
- package/dist/features/experimental_table/client/plugins/TableCellResizerPlugin/index.js.map +0 -1
- package/dist/features/experimental_table/client/plugins/TableHoverActionsPlugin/index.d.ts.map +0 -1
- package/dist/features/experimental_table/client/plugins/TableHoverActionsPlugin/index.js.map +0 -1
- package/dist/features/experimental_table/client/plugins/TablePlugin/TableGridPopup/index.d.ts.map +0 -1
- package/dist/features/experimental_table/client/plugins/TablePlugin/TableGridPopup/index.js.map +0 -1
- package/dist/features/experimental_table/client/plugins/TablePlugin/index.d.ts.map +0 -1
- package/dist/features/experimental_table/client/plugins/TablePlugin/index.js.map +0 -1
- package/dist/features/experimental_table/client/utils/debounce.d.ts.map +0 -1
- package/dist/features/experimental_table/client/utils/debounce.js.map +0 -1
- package/dist/features/experimental_table/client/utils/useDebounce.d.ts.map +0 -1
- package/dist/features/experimental_table/client/utils/useDebounce.js.map +0 -1
- package/dist/features/experimental_table/markdownTransformer.d.ts.map +0 -1
- package/dist/features/experimental_table/markdownTransformer.js.map +0 -1
- package/dist/features/experimental_table/server/index.d.ts +0 -3
- package/dist/features/experimental_table/server/index.d.ts.map +0 -1
- package/dist/features/experimental_table/server/index.js.map +0 -1
- package/dist/features/experimental_table/server/schema.d.ts.map +0 -1
- package/dist/features/experimental_table/server/schema.js.map +0 -1
- package/dist/features/link/markdownTransformer.spec.js +0 -195
- package/dist/features/link/markdownTransformer.spec.js.map +0 -1
- package/dist/lexical/utils/markdown/convertFromMarkdownString.spec.js +0 -88
- package/dist/lexical/utils/markdown/convertFromMarkdownString.spec.js.map +0 -1
- package/dist/lexical/utils/url.spec.js +0 -114
- package/dist/lexical/utils/url.spec.js.map +0 -1
- package/dist/utilities/jsx/jsx.spec.js +0 -178
- package/dist/utilities/jsx/jsx.spec.js.map +0 -1
- /package/dist/exports/client/{RelationshipComponent-YCPAKOL7.js.map → RelationshipComponent-TVK6I4W4.js.map} +0 -0
- /package/dist/exports/client/{componentInline-H24N7GUG.js.map → componentInline-AU7IBNY7.js.map} +0 -0
- /package/dist/features/{experimental_table → table}/client/index.d.ts +0 -0
- /package/dist/features/{experimental_table → table}/client/index.js +0 -0
- /package/dist/features/{experimental_table → table}/client/plugins/TableActionMenuPlugin/index.d.ts +0 -0
- /package/dist/features/{experimental_table → table}/client/plugins/TableCellResizerPlugin/index.css +0 -0
- /package/dist/features/{experimental_table → table}/client/plugins/TableCellResizerPlugin/index.d.ts +0 -0
- /package/dist/features/{experimental_table → table}/client/plugins/TableHoverActionsPlugin/index.d.ts +0 -0
- /package/dist/features/{experimental_table → table}/client/plugins/TableHoverActionsPlugin/index.js +0 -0
- /package/dist/features/{experimental_table → table}/client/plugins/TablePlugin/TableGridPopup/index.d.ts +0 -0
- /package/dist/features/{experimental_table → table}/client/plugins/TablePlugin/TableGridPopup/index.js +0 -0
- /package/dist/features/{experimental_table → table}/client/plugins/TablePlugin/index.css +0 -0
- /package/dist/features/{experimental_table → table}/client/plugins/TablePlugin/index.d.ts +0 -0
- /package/dist/features/{experimental_table → table}/client/utils/debounce.d.ts +0 -0
- /package/dist/features/{experimental_table → table}/client/utils/debounce.js +0 -0
- /package/dist/features/{experimental_table → table}/client/utils/useDebounce.d.ts +0 -0
- /package/dist/features/{experimental_table → table}/client/utils/useDebounce.js +0 -0
- /package/dist/features/{experimental_table → table}/markdownTransformer.d.ts +0 -0
- /package/dist/features/{experimental_table → table}/markdownTransformer.js +0 -0
- /package/dist/features/{experimental_table → table}/server/schema.d.ts +0 -0
- /package/dist/features/{experimental_table → table}/server/schema.js +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LexicalMenu.d.ts","sourceRoot":"","sources":["../../../../../src/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/LexicalMenu.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAiB,cAAc,EAAE,aAAa,EAAY,MAAM,SAAS,CAAA;AACrF,OAAO,KAAK,EAAE,GAAG,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAmBxD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAA;AAC9D,OAAO,KAAK,EAAE,sBAAsB,EAAE,aAAa,EAAE,qBAAqB,EAAE,MAAM,YAAY,CAAA;AAI9F,MAAM,MAAM,cAAc,GAAG;IAC3B,OAAO,EAAE,MAAM,OAAO,CAAA;IACtB,KAAK,CAAC,EAAE,aAAa,CAAA;CACtB,CAAA;AAID,MAAM,MAAM,YAAY,GAAG,CACzB,gBAAgB,EAAE,SAAS,CAAC,WAAW,GAAG,IAAI,CAAC,EAC/C,SAAS,EAAE;IACT,MAAM,EAAE,KAAK,CAAC,sBAAsB,CAAC,CAAA;IACrC,eAAe,EAAE,IAAI,GAAG,MAAM,CAAA;IAC9B,oBAAoB,EAAE,CAAC,YAAY,EAAE,aAAa,KAAK,IAAI,CAAA;IAC3D,kBAAkB,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAA;CAC9C,EACD,cAAc,EAAE,IAAI,GAAG,MAAM,KAC1B,GAAG,CAAC,OAAO,GAAG,IAAI,GAAG,WAAW,CAAA;
|
|
1
|
+
{"version":3,"file":"LexicalMenu.d.ts","sourceRoot":"","sources":["../../../../../src/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/LexicalMenu.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAiB,cAAc,EAAE,aAAa,EAAY,MAAM,SAAS,CAAA;A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ACD,gBAAgB,EAAE,SAAS,CAAC,WAAW,GAAG,IAAI,CAAC,CAAA;IAC/C,KAAK,EAAE,MAAM,IAAI,CAAA;IACjB,MAAM,EAAE,aAAa,CAAA;IACrB,MAAM,EAAE,KAAK,CAAC,sBAAsB,CAAC,CAAA;IACrC,YAAY,EAAE,YAAY,CAAA;IAC1B,UAAU,EAAE,cAAc,CAAA;IAC1B,wBAAwB,CAAC,EAAE,OAAO,CAAA;CACnC,GAAG,GAAG,CAAC,OAAO,GAAG,IAAI,CAuOrB;AAYD,wBAAgB,gBAAgB,CAC9B,UAAU,EAAE,WAAW,EACvB,UAAU,EAAE,cAAc,GAAG,IAAI,EACjC,aAAa,EAAE,CAAC,CAAC,EAAE,cAAc,GAAG,IAAI,KAAK,IAAI,EACjD,SAAS,CAAC,EAAE,MAAM,GACjB,SAAS,CAAC,WAAW,GAAG,IAAI,CAAC,CAoG/B"}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
import { c as _c } from "react/compiler-runtime";
|
|
4
4
|
import { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext.js';
|
|
5
|
-
import { mergeRegister } from '@lexical/utils';
|
|
5
|
+
import { getScrollParent, mergeRegister } from '@lexical/utils';
|
|
6
6
|
import { $getSelection, $isRangeSelection, $setSelection, COMMAND_PRIORITY_LOW, COMMAND_PRIORITY_NORMAL, createCommand, KEY_ARROW_DOWN_COMMAND, KEY_ARROW_UP_COMMAND, KEY_ENTER_COMMAND, KEY_ESCAPE_COMMAND, KEY_TAB_COMMAND } from 'lexical';
|
|
7
7
|
import { useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState } from 'react';
|
|
8
8
|
import { CAN_USE_DOM } from '../../../utils/canUseDOM.js';
|
|
@@ -73,25 +73,6 @@ function $splitNodeContainingQuery(match) {
|
|
|
73
73
|
}
|
|
74
74
|
return newNode;
|
|
75
75
|
}
|
|
76
|
-
// Got from https://stackoverflow.com/a/42543908/2013580
|
|
77
|
-
export function getScrollParent(element, includeHidden) {
|
|
78
|
-
let style = getComputedStyle(element);
|
|
79
|
-
const excludeStaticParent = style.position === 'absolute';
|
|
80
|
-
const overflowRegex = includeHidden ? /(auto|scroll|hidden)/ : /(auto|scroll)/;
|
|
81
|
-
if (style.position === 'fixed') {
|
|
82
|
-
return document.body;
|
|
83
|
-
}
|
|
84
|
-
for (let parent1 = element; parent1 = parent1.parentElement;) {
|
|
85
|
-
style = getComputedStyle(parent1);
|
|
86
|
-
if (excludeStaticParent && style.position === 'static') {
|
|
87
|
-
continue;
|
|
88
|
-
}
|
|
89
|
-
if (overflowRegex.test(style.overflow + style.overflowY + style.overflowX)) {
|
|
90
|
-
return parent1;
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
return document.body;
|
|
94
|
-
}
|
|
95
76
|
function isTriggerVisibleInNearestScrollContainer(targetElement, containerElement) {
|
|
96
77
|
const tRect = targetElement.getBoundingClientRect();
|
|
97
78
|
const cRect = containerElement.getBoundingClientRect();
|
|
@@ -156,95 +137,182 @@ export function useDynamicPositioning(resolution, targetElementRef, onReposition
|
|
|
156
137
|
useEffect(t0, t1);
|
|
157
138
|
}
|
|
158
139
|
export const SCROLL_TYPEAHEAD_OPTION_INTO_VIEW_COMMAND = createCommand('SCROLL_TYPEAHEAD_OPTION_INTO_VIEW_COMMAND');
|
|
159
|
-
export function LexicalMenu({
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
140
|
+
export function LexicalMenu(t0) {
|
|
141
|
+
const $ = _c(50);
|
|
142
|
+
const {
|
|
143
|
+
anchorElementRef,
|
|
144
|
+
close,
|
|
145
|
+
editor,
|
|
146
|
+
groups,
|
|
147
|
+
menuRenderFn,
|
|
148
|
+
resolution,
|
|
149
|
+
shouldSplitNodeWithQuery: t1
|
|
150
|
+
} = t0;
|
|
151
|
+
const shouldSplitNodeWithQuery = t1 === undefined ? false : t1;
|
|
169
152
|
const [selectedItemKey, setSelectedItemKey] = useState(null);
|
|
170
|
-
const matchingString = resolution.match && resolution.match.matchingString ||
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
rootElem.
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
const setSelectedItemKeyToFirstMatchingItem = useCallback(() => {
|
|
179
|
-
// set selected item to the first of the matching ones
|
|
180
|
-
if (groups !== null && matchingString != null) {
|
|
181
|
-
// groups filtering is already handled in SlashMenu/index.tsx. Thus, groups always contains the matching items.
|
|
182
|
-
const allItems = groups.flatMap(group => group.items);
|
|
183
|
-
if (allItems.length) {
|
|
184
|
-
const firstMatchingItem = allItems[0];
|
|
185
|
-
updateSelectedItem(firstMatchingItem);
|
|
153
|
+
const matchingString = resolution.match && resolution.match.matchingString || "";
|
|
154
|
+
let t2;
|
|
155
|
+
if ($[0] !== editor) {
|
|
156
|
+
t2 = item => {
|
|
157
|
+
const rootElem = editor.getRootElement();
|
|
158
|
+
if (rootElem !== null) {
|
|
159
|
+
rootElem.setAttribute("aria-activedescendant", `${baseClass}__item-${item.key}`);
|
|
160
|
+
setSelectedItemKey(item.key);
|
|
186
161
|
}
|
|
187
|
-
}
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
162
|
+
};
|
|
163
|
+
$[0] = editor;
|
|
164
|
+
$[1] = t2;
|
|
165
|
+
} else {
|
|
166
|
+
t2 = $[1];
|
|
167
|
+
}
|
|
168
|
+
const updateSelectedItem = t2;
|
|
169
|
+
let t3;
|
|
170
|
+
if ($[2] !== groups || $[3] !== matchingString || $[4] !== updateSelectedItem) {
|
|
171
|
+
t3 = () => {
|
|
172
|
+
if (groups !== null && matchingString != null) {
|
|
173
|
+
const allItems = groups.flatMap(_temp);
|
|
174
|
+
if (allItems.length) {
|
|
175
|
+
const firstMatchingItem = allItems[0];
|
|
176
|
+
updateSelectedItem(firstMatchingItem);
|
|
177
|
+
}
|
|
198
178
|
}
|
|
199
|
-
}
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
179
|
+
};
|
|
180
|
+
$[2] = groups;
|
|
181
|
+
$[3] = matchingString;
|
|
182
|
+
$[4] = updateSelectedItem;
|
|
183
|
+
$[5] = t3;
|
|
184
|
+
} else {
|
|
185
|
+
t3 = $[5];
|
|
186
|
+
}
|
|
187
|
+
const setSelectedItemKeyToFirstMatchingItem = t3;
|
|
188
|
+
let t4;
|
|
189
|
+
if ($[6] !== setSelectedItemKeyToFirstMatchingItem) {
|
|
190
|
+
t4 = () => {
|
|
191
|
+
setSelectedItemKeyToFirstMatchingItem();
|
|
192
|
+
};
|
|
193
|
+
$[6] = setSelectedItemKeyToFirstMatchingItem;
|
|
194
|
+
$[7] = t4;
|
|
195
|
+
} else {
|
|
196
|
+
t4 = $[7];
|
|
197
|
+
}
|
|
198
|
+
let t5;
|
|
199
|
+
if ($[8] !== matchingString || $[9] !== setSelectedItemKeyToFirstMatchingItem) {
|
|
200
|
+
t5 = [matchingString, setSelectedItemKeyToFirstMatchingItem];
|
|
201
|
+
$[8] = matchingString;
|
|
202
|
+
$[9] = setSelectedItemKeyToFirstMatchingItem;
|
|
203
|
+
$[10] = t5;
|
|
204
|
+
} else {
|
|
205
|
+
t5 = $[10];
|
|
206
|
+
}
|
|
207
|
+
useEffect(t4, t5);
|
|
208
|
+
let t6;
|
|
209
|
+
if ($[11] !== close || $[12] !== editor || $[13] !== resolution.match || $[14] !== shouldSplitNodeWithQuery) {
|
|
210
|
+
t6 = selectedItem => {
|
|
211
|
+
close();
|
|
206
212
|
editor.update(() => {
|
|
207
|
-
|
|
208
|
-
|
|
213
|
+
const textNodeContainingQuery = resolution.match != null && shouldSplitNodeWithQuery ? $splitNodeContainingQuery(resolution.match) : null;
|
|
214
|
+
if (textNodeContainingQuery) {
|
|
215
|
+
textNodeContainingQuery.remove();
|
|
209
216
|
}
|
|
210
217
|
});
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
218
|
+
setTimeout(() => {
|
|
219
|
+
let selection;
|
|
220
|
+
editor.read(() => {
|
|
221
|
+
selection = $getSelection()?.clone();
|
|
222
|
+
});
|
|
223
|
+
editor.update(() => {
|
|
224
|
+
if (selection) {
|
|
225
|
+
$setSelection(selection);
|
|
226
|
+
}
|
|
227
|
+
});
|
|
228
|
+
selectedItem.onSelect({
|
|
229
|
+
editor,
|
|
230
|
+
queryString: resolution.match ? resolution.match.matchingString : ""
|
|
231
|
+
});
|
|
232
|
+
}, 0);
|
|
233
|
+
};
|
|
234
|
+
$[11] = close;
|
|
235
|
+
$[12] = editor;
|
|
236
|
+
$[13] = resolution.match;
|
|
237
|
+
$[14] = shouldSplitNodeWithQuery;
|
|
238
|
+
$[15] = t6;
|
|
239
|
+
} else {
|
|
240
|
+
t6 = $[15];
|
|
241
|
+
}
|
|
242
|
+
const selectItemAndCleanUp = t6;
|
|
243
|
+
let t7;
|
|
244
|
+
let t8;
|
|
245
|
+
if ($[16] !== editor) {
|
|
246
|
+
t7 = () => () => {
|
|
219
247
|
const rootElem_0 = editor.getRootElement();
|
|
220
248
|
if (rootElem_0 !== null) {
|
|
221
|
-
rootElem_0.removeAttribute(
|
|
249
|
+
rootElem_0.removeAttribute("aria-activedescendant");
|
|
222
250
|
}
|
|
223
251
|
};
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
}
|
|
232
|
-
useEffect(
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
if (
|
|
237
|
-
|
|
238
|
-
|
|
252
|
+
t8 = [editor];
|
|
253
|
+
$[16] = editor;
|
|
254
|
+
$[17] = t7;
|
|
255
|
+
$[18] = t8;
|
|
256
|
+
} else {
|
|
257
|
+
t7 = $[17];
|
|
258
|
+
t8 = $[18];
|
|
259
|
+
}
|
|
260
|
+
useEffect(t7, t8);
|
|
261
|
+
let t9;
|
|
262
|
+
if ($[19] !== groups || $[20] !== selectedItemKey || $[21] !== setSelectedItemKeyToFirstMatchingItem) {
|
|
263
|
+
t9 = () => {
|
|
264
|
+
if (groups === null) {
|
|
265
|
+
setSelectedItemKey(null);
|
|
266
|
+
} else {
|
|
267
|
+
if (selectedItemKey === null) {
|
|
268
|
+
setSelectedItemKeyToFirstMatchingItem();
|
|
269
|
+
}
|
|
239
270
|
}
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
271
|
+
};
|
|
272
|
+
$[19] = groups;
|
|
273
|
+
$[20] = selectedItemKey;
|
|
274
|
+
$[21] = setSelectedItemKeyToFirstMatchingItem;
|
|
275
|
+
$[22] = t9;
|
|
276
|
+
} else {
|
|
277
|
+
t9 = $[22];
|
|
278
|
+
}
|
|
279
|
+
let t10;
|
|
280
|
+
if ($[23] !== groups || $[24] !== selectedItemKey || $[25] !== setSelectedItemKeyToFirstMatchingItem || $[26] !== updateSelectedItem) {
|
|
281
|
+
t10 = [groups, selectedItemKey, updateSelectedItem, setSelectedItemKeyToFirstMatchingItem];
|
|
282
|
+
$[23] = groups;
|
|
283
|
+
$[24] = selectedItemKey;
|
|
284
|
+
$[25] = setSelectedItemKeyToFirstMatchingItem;
|
|
285
|
+
$[26] = updateSelectedItem;
|
|
286
|
+
$[27] = t10;
|
|
287
|
+
} else {
|
|
288
|
+
t10 = $[27];
|
|
289
|
+
}
|
|
290
|
+
useLayoutEffect(t9, t10);
|
|
291
|
+
let t11;
|
|
292
|
+
if ($[28] !== editor) {
|
|
293
|
+
t11 = () => mergeRegister(editor.registerCommand(SCROLL_TYPEAHEAD_OPTION_INTO_VIEW_COMMAND, _temp2, COMMAND_PRIORITY_LOW));
|
|
294
|
+
$[28] = editor;
|
|
295
|
+
$[29] = t11;
|
|
296
|
+
} else {
|
|
297
|
+
t11 = $[29];
|
|
298
|
+
}
|
|
299
|
+
let t12;
|
|
300
|
+
if ($[30] !== editor || $[31] !== updateSelectedItem) {
|
|
301
|
+
t12 = [editor, updateSelectedItem];
|
|
302
|
+
$[30] = editor;
|
|
303
|
+
$[31] = updateSelectedItem;
|
|
304
|
+
$[32] = t12;
|
|
305
|
+
} else {
|
|
306
|
+
t12 = $[32];
|
|
307
|
+
}
|
|
308
|
+
useEffect(t11, t12);
|
|
309
|
+
let t13;
|
|
310
|
+
let t14;
|
|
311
|
+
if ($[33] !== close || $[34] !== editor || $[35] !== groups || $[36] !== selectItemAndCleanUp || $[37] !== selectedItemKey || $[38] !== updateSelectedItem) {
|
|
312
|
+
t13 = () => mergeRegister(editor.registerCommand(KEY_ARROW_DOWN_COMMAND, payload => {
|
|
245
313
|
const event = payload;
|
|
246
314
|
if (groups !== null && groups.length && selectedItemKey !== null) {
|
|
247
|
-
const allItems_0 = groups.flatMap(
|
|
315
|
+
const allItems_0 = groups.flatMap(_temp3);
|
|
248
316
|
const selectedIndex = allItems_0.findIndex(item_1 => item_1.key === selectedItemKey);
|
|
249
317
|
const newSelectedIndex = selectedIndex !== allItems_0.length - 1 ? selectedIndex + 1 : 0;
|
|
250
318
|
const newSelectedItem = allItems_0[newSelectedIndex];
|
|
@@ -265,7 +333,7 @@ export function LexicalMenu({
|
|
|
265
333
|
}, COMMAND_PRIORITY_NORMAL), editor.registerCommand(KEY_ARROW_UP_COMMAND, payload_0 => {
|
|
266
334
|
const event_0 = payload_0;
|
|
267
335
|
if (groups !== null && groups.length && selectedItemKey !== null) {
|
|
268
|
-
const allItems_1 = groups.flatMap(
|
|
336
|
+
const allItems_1 = groups.flatMap(_temp4);
|
|
269
337
|
const selectedIndex_0 = allItems_1.findIndex(item_2 => item_2.key === selectedItemKey);
|
|
270
338
|
const newSelectedIndex_0 = selectedIndex_0 !== 0 ? selectedIndex_0 - 1 : allItems_1.length - 1;
|
|
271
339
|
const newSelectedItem_0 = allItems_1[newSelectedIndex_0];
|
|
@@ -286,12 +354,12 @@ export function LexicalMenu({
|
|
|
286
354
|
event_1.stopImmediatePropagation();
|
|
287
355
|
close();
|
|
288
356
|
return true;
|
|
289
|
-
},
|
|
357
|
+
}, COMMAND_PRIORITY_NORMAL), editor.registerCommand(KEY_TAB_COMMAND, payload_2 => {
|
|
290
358
|
const event_2 = payload_2;
|
|
291
359
|
if (groups === null || selectedItemKey === null) {
|
|
292
360
|
return false;
|
|
293
361
|
}
|
|
294
|
-
const allItems_2 = groups.flatMap(
|
|
362
|
+
const allItems_2 = groups.flatMap(_temp5);
|
|
295
363
|
const selectedItem_0 = allItems_2.find(item_3 => item_3.key === selectedItemKey);
|
|
296
364
|
if (!selectedItem_0) {
|
|
297
365
|
return false;
|
|
@@ -304,7 +372,7 @@ export function LexicalMenu({
|
|
|
304
372
|
if (groups === null || selectedItemKey === null) {
|
|
305
373
|
return false;
|
|
306
374
|
}
|
|
307
|
-
const allItems_3 = groups.flatMap(
|
|
375
|
+
const allItems_3 = groups.flatMap(_temp6);
|
|
308
376
|
const selectedItem_1 = allItems_3.find(item_4 => item_4.key === selectedItemKey);
|
|
309
377
|
if (!selectedItem_1) {
|
|
310
378
|
return false;
|
|
@@ -316,14 +384,74 @@ export function LexicalMenu({
|
|
|
316
384
|
selectItemAndCleanUp(selectedItem_1);
|
|
317
385
|
return true;
|
|
318
386
|
}, COMMAND_PRIORITY_NORMAL));
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
selectItemAndCleanUp
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
387
|
+
t14 = [selectItemAndCleanUp, close, editor, groups, selectedItemKey, updateSelectedItem];
|
|
388
|
+
$[33] = close;
|
|
389
|
+
$[34] = editor;
|
|
390
|
+
$[35] = groups;
|
|
391
|
+
$[36] = selectItemAndCleanUp;
|
|
392
|
+
$[37] = selectedItemKey;
|
|
393
|
+
$[38] = updateSelectedItem;
|
|
394
|
+
$[39] = t13;
|
|
395
|
+
$[40] = t14;
|
|
396
|
+
} else {
|
|
397
|
+
t13 = $[39];
|
|
398
|
+
t14 = $[40];
|
|
399
|
+
}
|
|
400
|
+
useEffect(t13, t14);
|
|
401
|
+
let t15;
|
|
402
|
+
if ($[41] !== groups || $[42] !== selectItemAndCleanUp || $[43] !== selectedItemKey) {
|
|
403
|
+
t15 = {
|
|
404
|
+
groups,
|
|
405
|
+
selectedItemKey,
|
|
406
|
+
selectItemAndCleanUp,
|
|
407
|
+
setSelectedItemKey
|
|
408
|
+
};
|
|
409
|
+
$[41] = groups;
|
|
410
|
+
$[42] = selectItemAndCleanUp;
|
|
411
|
+
$[43] = selectedItemKey;
|
|
412
|
+
$[44] = t15;
|
|
413
|
+
} else {
|
|
414
|
+
t15 = $[44];
|
|
415
|
+
}
|
|
416
|
+
const listItemProps = t15;
|
|
417
|
+
const t16 = resolution.match ? resolution.match.matchingString : "";
|
|
418
|
+
let t17;
|
|
419
|
+
if ($[45] !== anchorElementRef || $[46] !== listItemProps || $[47] !== menuRenderFn || $[48] !== t16) {
|
|
420
|
+
t17 = menuRenderFn(anchorElementRef, listItemProps, t16);
|
|
421
|
+
$[45] = anchorElementRef;
|
|
422
|
+
$[46] = listItemProps;
|
|
423
|
+
$[47] = menuRenderFn;
|
|
424
|
+
$[48] = t16;
|
|
425
|
+
$[49] = t17;
|
|
426
|
+
} else {
|
|
427
|
+
t17 = $[49];
|
|
428
|
+
}
|
|
429
|
+
return t17;
|
|
430
|
+
}
|
|
431
|
+
function _temp6(group_3) {
|
|
432
|
+
return group_3.items;
|
|
433
|
+
}
|
|
434
|
+
function _temp5(group_2) {
|
|
435
|
+
return group_2.items;
|
|
436
|
+
}
|
|
437
|
+
function _temp4(group_1) {
|
|
438
|
+
return group_1.items;
|
|
439
|
+
}
|
|
440
|
+
function _temp3(group_0) {
|
|
441
|
+
return group_0.items;
|
|
442
|
+
}
|
|
443
|
+
function _temp2(t0) {
|
|
444
|
+
const {
|
|
445
|
+
item: item_0
|
|
446
|
+
} = t0;
|
|
447
|
+
if (item_0.ref && item_0.ref.current != null) {
|
|
448
|
+
scrollIntoViewIfNeeded(item_0.ref.current);
|
|
449
|
+
return true;
|
|
450
|
+
}
|
|
451
|
+
return false;
|
|
452
|
+
}
|
|
453
|
+
function _temp(group) {
|
|
454
|
+
return group.items;
|
|
327
455
|
}
|
|
328
456
|
function setContainerDivAttributes(containerDiv, className) {
|
|
329
457
|
if (className != null) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LexicalMenu.js","names":["c","_c","useLexicalComposerContext","mergeRegister","$getSelection","$isRangeSelection","$setSelection","COMMAND_PRIORITY_LOW","COMMAND_PRIORITY_NORMAL","createCommand","KEY_ARROW_DOWN_COMMAND","KEY_ARROW_UP_COMMAND","KEY_ENTER_COMMAND","KEY_ESCAPE_COMMAND","KEY_TAB_COMMAND","useCallback","useEffect","useLayoutEffect","useMemo","useRef","useState","CAN_USE_DOM","baseClass","scrollIntoViewIfNeeded","target","typeaheadContainerNode","document","getElementById","typeaheadRect","getBoundingClientRect","top","height","window","innerHeight","scrollIntoView","block","getFullMatchOffset","documentText","entryText","offset","triggerOffset","i","length","substring","$splitNodeContainingQuery","match","selection","isCollapsed","anchor","type","anchorNode","getNode","isSimpleText","selectionOffset","textContent","getTextContent","slice","characterOffset","replaceableString","queryOffset","matchingString","startOffset","newNode","splitText","getScrollParent","element","includeHidden","style","getComputedStyle","excludeStaticParent","position","overflowRegex","body","parent1","parentElement","test","overflow","overflowY","overflowX","isTriggerVisibleInNearestScrollContainer","targetElement","containerElement","tRect","cRect","bottom","useDynamicPositioning","resolution","targetElementRef","onReposition","onVisibilityChange","$","editor","t0","t1","current","rootElement","getRootElement","rootScrollParent","ticking","previousIsInView","handleScroll","requestAnimationFrame","isInView","resizeObserver","ResizeObserver","addEventListener","capture","passive","observe","disconnect","removeEventListener","SCROLL_TYPEAHEAD_OPTION_INTO_VIEW_COMMAND","LexicalMenu","anchorElementRef","close","groups","menuRenderFn","shouldSplitNodeWithQuery","selectedItemKey","setSelectedItemKey","updateSelectedItem","item","rootElem","setAttribute","key","setSelectedItemKeyToFirstMatchingItem","allItems","flatMap","group","items","firstMatchingItem","selectItemAndCleanUp","selectedItem","update","textNodeContainingQuery","remove","setTimeout","read","clone","onSelect","queryString","removeAttribute","registerCommand","ref","payload","event","selectedIndex","findIndex","newSelectedIndex","newSelectedItem","dispatchCommand","index","preventDefault","stopImmediatePropagation","find","listItemProps","setContainerDivAttributes","containerDiv","className","display","useMenuAnchorRef","anchorElem","setResolution","Symbol","for","createElement","parent","undefined","menuEle","firstChild","width","getRect","left","rawTop","scrollY","scrollX","menuRect","menuHeight","menuWidth","rootElementRect","isRTL","dir","documentElement","anchorRect","leftBoundary","Math","max","right","newLeft","wouldGoOffBottomOfScreen","wouldGoOffTopOfScreen","isConnected","append","positionMenu","t2","t3","rootElement_0","containerDiv_0","t4"],"sources":["../../../../../src/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/LexicalMenu.tsx"],"sourcesContent":["'use client'\nimport type { BaseSelection, LexicalCommand, LexicalEditor, TextNode } from 'lexical'\nimport type { JSX, ReactPortal, RefObject } from 'react'\n\nimport { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext.js'\nimport { mergeRegister } from '@lexical/utils'\nimport {\n $getSelection,\n $isRangeSelection,\n $setSelection,\n COMMAND_PRIORITY_LOW,\n COMMAND_PRIORITY_NORMAL,\n createCommand,\n KEY_ARROW_DOWN_COMMAND,\n KEY_ARROW_UP_COMMAND,\n KEY_ENTER_COMMAND,\n KEY_ESCAPE_COMMAND,\n KEY_TAB_COMMAND,\n} from 'lexical'\nimport { useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState } from 'react'\n\nimport type { MenuTextMatch } from '../useMenuTriggerMatch.js'\nimport type { SlashMenuGroupInternal, SlashMenuItem, SlashMenuItemInternal } from './types.js'\n\nimport { CAN_USE_DOM } from '../../../utils/canUseDOM.js'\n\nexport type MenuResolution = {\n getRect: () => DOMRect\n match?: MenuTextMatch\n}\n\nconst baseClass = 'slash-menu-popup'\n\nexport type MenuRenderFn = (\n anchorElementRef: RefObject<HTMLElement | null>,\n itemProps: {\n groups: Array<SlashMenuGroupInternal>\n selectedItemKey: null | string\n selectItemAndCleanUp: (selectedItem: SlashMenuItem) => void\n setSelectedItemKey: (itemKey: string) => void\n },\n matchingString: null | string,\n) => JSX.Element | null | ReactPortal\n\nconst scrollIntoViewIfNeeded = (target: HTMLElement) => {\n const typeaheadContainerNode = document.getElementById('slash-menu')\n if (!typeaheadContainerNode) {\n return\n }\n\n const typeaheadRect = typeaheadContainerNode.getBoundingClientRect()\n\n if (typeaheadRect.top + typeaheadRect.height > window.innerHeight) {\n typeaheadContainerNode.scrollIntoView({\n block: 'center',\n })\n }\n\n if (typeaheadRect.top < 0) {\n typeaheadContainerNode.scrollIntoView({\n block: 'center',\n })\n }\n\n target.scrollIntoView({ block: 'nearest' })\n}\n\n/**\n * Walk backwards along user input and forward through entity title to try\n * and replace more of the user's text with entity.\n */\nfunction getFullMatchOffset(documentText: string, entryText: string, offset: number) {\n let triggerOffset = offset\n for (let i = triggerOffset; i <= entryText.length; i++) {\n if (documentText.substring(documentText.length - i) === entryText.substring(0, i)) {\n triggerOffset = i\n }\n }\n return triggerOffset\n}\n\n/**\n * Split Lexical TextNode and return a new TextNode only containing matched text.\n * Common use cases include: removing the node, replacing with a new node.\n */\nfunction $splitNodeContainingQuery(match: MenuTextMatch): TextNode | undefined {\n const selection = $getSelection()\n if (!$isRangeSelection(selection) || !selection.isCollapsed()) {\n return\n }\n const anchor = selection.anchor\n if (anchor.type !== 'text') {\n return\n }\n const anchorNode = anchor.getNode()\n if (!anchorNode.isSimpleText()) {\n return\n }\n const selectionOffset = anchor.offset\n const textContent = anchorNode.getTextContent().slice(0, selectionOffset)\n const characterOffset = match.replaceableString.length\n const queryOffset = getFullMatchOffset(textContent, match.matchingString, characterOffset)\n const startOffset = selectionOffset - queryOffset\n if (startOffset < 0) {\n return\n }\n let newNode\n if (startOffset === 0) {\n ;[newNode] = anchorNode.splitText(selectionOffset)\n } else {\n ;[, newNode] = anchorNode.splitText(startOffset, selectionOffset)\n }\n\n return newNode\n}\n\n// Got from https://stackoverflow.com/a/42543908/2013580\nexport function getScrollParent(\n element: HTMLElement,\n includeHidden: boolean,\n): HTMLBodyElement | HTMLElement {\n let style = getComputedStyle(element)\n const excludeStaticParent = style.position === 'absolute'\n const overflowRegex = includeHidden ? /(auto|scroll|hidden)/ : /(auto|scroll)/\n if (style.position === 'fixed') {\n return document.body\n }\n for (let parent: HTMLElement | null = element; (parent = parent.parentElement); ) {\n style = getComputedStyle(parent)\n if (excludeStaticParent && style.position === 'static') {\n continue\n }\n if (overflowRegex.test(style.overflow + style.overflowY + style.overflowX)) {\n return parent\n }\n }\n return document.body\n}\n\nfunction isTriggerVisibleInNearestScrollContainer(\n targetElement: HTMLElement,\n containerElement: HTMLElement,\n): boolean {\n const tRect = targetElement.getBoundingClientRect()\n const cRect = containerElement.getBoundingClientRect()\n return tRect.top > cRect.top && tRect.top < cRect.bottom\n}\n\n// Reposition the menu on scroll, window resize, and element resize.\nexport function useDynamicPositioning(\n resolution: MenuResolution | null,\n targetElementRef: RefObject<HTMLElement | null>,\n onReposition: () => void,\n onVisibilityChange?: (isInView: boolean) => void,\n) {\n const [editor] = useLexicalComposerContext()\n useEffect(() => {\n const targetElement = targetElementRef.current\n if (targetElement != null && resolution != null) {\n const rootElement = editor.getRootElement()\n const rootScrollParent =\n rootElement != null ? getScrollParent(rootElement, false) : document.body\n let ticking = false\n let previousIsInView = isTriggerVisibleInNearestScrollContainer(\n targetElement,\n rootScrollParent,\n )\n const handleScroll = function () {\n if (!ticking) {\n window.requestAnimationFrame(function () {\n onReposition()\n ticking = false\n })\n ticking = true\n }\n const isInView = isTriggerVisibleInNearestScrollContainer(targetElement, rootScrollParent)\n if (isInView !== previousIsInView) {\n previousIsInView = isInView\n if (onVisibilityChange != null) {\n onVisibilityChange(isInView)\n }\n }\n }\n const resizeObserver = new ResizeObserver(onReposition)\n window.addEventListener('resize', onReposition)\n document.addEventListener('scroll', handleScroll, {\n capture: true,\n passive: true,\n })\n resizeObserver.observe(targetElement)\n return () => {\n resizeObserver.disconnect()\n window.removeEventListener('resize', onReposition)\n document.removeEventListener('scroll', handleScroll, true)\n }\n }\n }, [editor, onVisibilityChange, onReposition, resolution, targetElementRef])\n}\n\nexport const SCROLL_TYPEAHEAD_OPTION_INTO_VIEW_COMMAND: LexicalCommand<{\n index: number\n item: SlashMenuItemInternal\n}> = createCommand('SCROLL_TYPEAHEAD_OPTION_INTO_VIEW_COMMAND')\n\nexport function LexicalMenu({\n anchorElementRef,\n close,\n editor,\n // groups filtering is already handled in SlashMenu/index.tsx. Thus, groups always contains the matching items.\n groups,\n menuRenderFn,\n resolution,\n shouldSplitNodeWithQuery = false,\n}: {\n anchorElementRef: RefObject<HTMLElement | null>\n close: () => void\n editor: LexicalEditor\n groups: Array<SlashMenuGroupInternal>\n menuRenderFn: MenuRenderFn\n resolution: MenuResolution\n shouldSplitNodeWithQuery?: boolean\n}): JSX.Element | null {\n const [selectedItemKey, setSelectedItemKey] = useState<null | string>(null)\n\n const matchingString = (resolution.match && resolution.match.matchingString) || ''\n\n const updateSelectedItem = useCallback(\n (item: SlashMenuItem) => {\n const rootElem = editor.getRootElement()\n if (rootElem !== null) {\n rootElem.setAttribute('aria-activedescendant', `${baseClass}__item-${item.key}`)\n setSelectedItemKey(item.key)\n }\n },\n [editor],\n )\n\n const setSelectedItemKeyToFirstMatchingItem = useCallback(() => {\n // set selected item to the first of the matching ones\n if (groups !== null && matchingString != null) {\n // groups filtering is already handled in SlashMenu/index.tsx. Thus, groups always contains the matching items.\n const allItems = groups.flatMap((group) => group.items)\n\n if (allItems.length) {\n const firstMatchingItem = allItems[0]!\n updateSelectedItem(firstMatchingItem)\n }\n }\n }, [groups, updateSelectedItem, matchingString])\n\n useEffect(() => {\n setSelectedItemKeyToFirstMatchingItem()\n }, [matchingString, setSelectedItemKeyToFirstMatchingItem])\n\n const selectItemAndCleanUp = useCallback(\n (selectedItem: SlashMenuItem) => {\n close()\n\n editor.update(() => {\n const textNodeContainingQuery =\n resolution.match != null && shouldSplitNodeWithQuery\n ? $splitNodeContainingQuery(resolution.match)\n : null\n\n if (textNodeContainingQuery) {\n textNodeContainingQuery.remove()\n }\n })\n\n setTimeout(() => {\n // Needed in Firefox. See https://github.com/payloadcms/payload/issues/10724\n let selection: BaseSelection | undefined\n editor.read(() => {\n selection = $getSelection()?.clone()\n })\n editor.update(() => {\n if (selection) {\n $setSelection(selection)\n }\n })\n\n selectedItem.onSelect({\n editor,\n queryString: resolution.match ? resolution.match.matchingString : '',\n })\n }, 0)\n },\n [editor, shouldSplitNodeWithQuery, resolution.match, close],\n )\n\n useEffect(() => {\n return () => {\n const rootElem = editor.getRootElement()\n if (rootElem !== null) {\n rootElem.removeAttribute('aria-activedescendant')\n }\n }\n }, [editor])\n\n useLayoutEffect(() => {\n if (groups === null) {\n setSelectedItemKey(null)\n } else if (selectedItemKey === null) {\n setSelectedItemKeyToFirstMatchingItem()\n }\n }, [groups, selectedItemKey, updateSelectedItem, setSelectedItemKeyToFirstMatchingItem])\n\n useEffect(() => {\n return mergeRegister(\n editor.registerCommand(\n SCROLL_TYPEAHEAD_OPTION_INTO_VIEW_COMMAND,\n ({ item }) => {\n if (item.ref && item.ref.current != null) {\n scrollIntoViewIfNeeded(item.ref.current)\n return true\n }\n\n return false\n },\n COMMAND_PRIORITY_LOW,\n ),\n )\n }, [editor, updateSelectedItem])\n\n useEffect(() => {\n return mergeRegister(\n editor.registerCommand<KeyboardEvent>(\n KEY_ARROW_DOWN_COMMAND,\n (payload) => {\n const event = payload\n if (groups !== null && groups.length && selectedItemKey !== null) {\n const allItems = groups.flatMap((group) => group.items)\n const selectedIndex = allItems.findIndex((item) => item.key === selectedItemKey)\n\n const newSelectedIndex = selectedIndex !== allItems.length - 1 ? selectedIndex + 1 : 0\n\n const newSelectedItem = allItems[newSelectedIndex]\n if (!newSelectedItem) {\n return false\n }\n\n updateSelectedItem(newSelectedItem)\n if (newSelectedItem.ref != null && newSelectedItem.ref.current) {\n editor.dispatchCommand(SCROLL_TYPEAHEAD_OPTION_INTO_VIEW_COMMAND, {\n index: newSelectedIndex,\n item: newSelectedItem,\n })\n }\n event.preventDefault()\n event.stopImmediatePropagation()\n }\n return true\n },\n COMMAND_PRIORITY_NORMAL,\n ),\n editor.registerCommand<KeyboardEvent>(\n KEY_ARROW_UP_COMMAND,\n (payload) => {\n const event = payload\n if (groups !== null && groups.length && selectedItemKey !== null) {\n const allItems = groups.flatMap((group) => group.items)\n const selectedIndex = allItems.findIndex((item) => item.key === selectedItemKey)\n\n const newSelectedIndex = selectedIndex !== 0 ? selectedIndex - 1 : allItems.length - 1\n\n const newSelectedItem = allItems[newSelectedIndex]\n if (!newSelectedItem) {\n return false\n }\n\n updateSelectedItem(newSelectedItem)\n if (newSelectedItem.ref != null && newSelectedItem.ref.current) {\n scrollIntoViewIfNeeded(newSelectedItem.ref.current)\n }\n event.preventDefault()\n event.stopImmediatePropagation()\n }\n return true\n },\n COMMAND_PRIORITY_NORMAL,\n ),\n editor.registerCommand<KeyboardEvent>(\n KEY_ESCAPE_COMMAND,\n (payload) => {\n const event = payload\n event.preventDefault()\n event.stopImmediatePropagation()\n close()\n return true\n },\n COMMAND_PRIORITY_LOW,\n ),\n editor.registerCommand<KeyboardEvent>(\n KEY_TAB_COMMAND,\n (payload) => {\n const event = payload\n\n if (groups === null || selectedItemKey === null) {\n return false\n }\n const allItems = groups.flatMap((group) => group.items)\n const selectedItem = allItems.find((item) => item.key === selectedItemKey)\n if (!selectedItem) {\n return false\n }\n\n event.preventDefault()\n event.stopImmediatePropagation()\n selectItemAndCleanUp(selectedItem)\n return true\n },\n COMMAND_PRIORITY_NORMAL,\n ),\n editor.registerCommand(\n KEY_ENTER_COMMAND,\n (event: KeyboardEvent | null) => {\n if (groups === null || selectedItemKey === null) {\n return false\n }\n const allItems = groups.flatMap((group) => group.items)\n const selectedItem = allItems.find((item) => item.key === selectedItemKey)\n if (!selectedItem) {\n return false\n }\n\n if (event !== null) {\n event.preventDefault()\n event.stopImmediatePropagation()\n }\n selectItemAndCleanUp(selectedItem)\n return true\n },\n COMMAND_PRIORITY_NORMAL,\n ),\n )\n }, [selectItemAndCleanUp, close, editor, groups, selectedItemKey, updateSelectedItem])\n\n const listItemProps = useMemo(\n () => ({\n groups,\n selectedItemKey,\n selectItemAndCleanUp,\n setSelectedItemKey,\n }),\n [selectItemAndCleanUp, selectedItemKey, groups],\n )\n\n return menuRenderFn(\n anchorElementRef,\n listItemProps,\n resolution.match ? resolution.match.matchingString : '',\n )\n}\n\nfunction setContainerDivAttributes(containerDiv: HTMLElement, className?: string) {\n if (className != null) {\n containerDiv.className = className\n }\n containerDiv.setAttribute('aria-label', 'Slash menu')\n containerDiv.setAttribute('role', 'listbox')\n containerDiv.style.display = 'block'\n containerDiv.style.position = 'absolute'\n}\n\nexport function useMenuAnchorRef(\n anchorElem: HTMLElement,\n resolution: MenuResolution | null,\n setResolution: (r: MenuResolution | null) => void,\n className?: string,\n): RefObject<HTMLElement | null> {\n const [editor] = useLexicalComposerContext()\n const anchorElementRef = useRef<HTMLElement | null>(\n CAN_USE_DOM ? document.createElement('div') : null,\n )\n const positionMenu = useCallback(() => {\n if (anchorElementRef.current === null || parent === undefined) {\n return\n }\n const rootElement = editor.getRootElement()\n const containerDiv = anchorElementRef.current\n\n const VERTICAL_OFFSET = 32\n\n const menuEle = containerDiv.firstChild as Element\n if (rootElement !== null && resolution !== null) {\n const { height, width } = resolution.getRect()\n let { left, top } = resolution.getRect()\n\n const rawTop = top\n top -= anchorElem.getBoundingClientRect().top + window.scrollY\n left -= anchorElem.getBoundingClientRect().left + window.scrollX\n containerDiv.style.left = `${left + window.scrollX}px`\n containerDiv.style.height = `${height}px`\n containerDiv.style.width = `${width}px`\n if (menuEle !== null) {\n const menuRect = menuEle.getBoundingClientRect()\n const menuHeight = menuRect.height\n const menuWidth = menuRect.width\n\n const rootElementRect = rootElement.getBoundingClientRect()\n\n const isRTL = document.dir === 'rtl' || document.documentElement.dir === 'rtl'\n const anchorRect = anchorElem.getBoundingClientRect()\n const leftBoundary = Math.max(0, rootElementRect.left)\n\n if (!isRTL && left + menuWidth > rootElementRect.right) {\n containerDiv.style.left = `${rootElementRect.right - menuWidth + window.scrollX}px`\n } else if (isRTL && menuRect.left < leftBoundary) {\n const newLeft = leftBoundary + menuWidth - anchorRect.left\n containerDiv.style.left = `${newLeft + window.scrollX}px`\n }\n\n const wouldGoOffBottomOfScreen = rawTop + menuHeight + VERTICAL_OFFSET > window.innerHeight\n //const wouldGoOffBottomOfContainer = top + menuHeight > rootElementRect.bottom\n const wouldGoOffTopOfScreen = rawTop < 0\n\n // Position slash menu above the cursor instead of below (default) if it would otherwise go off the bottom of the screen.\n if (wouldGoOffBottomOfScreen && !wouldGoOffTopOfScreen) {\n const margin = 24\n containerDiv.style.top = `${\n top + VERTICAL_OFFSET - menuHeight + window.scrollY - (height + margin)\n }px`\n } else {\n containerDiv.style.top = `${top + window.scrollY + VERTICAL_OFFSET}px`\n }\n }\n\n if (!containerDiv.isConnected) {\n setContainerDivAttributes(containerDiv, className)\n anchorElem.append(containerDiv)\n }\n containerDiv.setAttribute('id', 'slash-menu')\n anchorElementRef.current = containerDiv\n rootElement.setAttribute('aria-controls', 'slash-menu')\n }\n }, [editor, resolution, className, anchorElem])\n\n useEffect(() => {\n const rootElement = editor.getRootElement()\n if (resolution !== null) {\n positionMenu()\n return () => {\n if (rootElement !== null) {\n rootElement.removeAttribute('aria-controls')\n }\n\n const containerDiv = anchorElementRef.current\n if (containerDiv !== null && containerDiv.isConnected) {\n containerDiv.remove()\n containerDiv.removeAttribute('id')\n }\n }\n }\n }, [editor, positionMenu, resolution])\n\n const onVisibilityChange = useCallback(\n (isInView: boolean) => {\n if (resolution !== null) {\n if (!isInView) {\n setResolution(null)\n }\n }\n },\n [resolution, setResolution],\n )\n\n useDynamicPositioning(resolution, anchorElementRef, positionMenu, onVisibilityChange)\n\n return anchorElementRef\n}\n"],"mappings":"AAAA;;AAAA,SAAAA,CAAA,IAAAC,EAAA;AAIA,SAASC,yBAAyB,QAAQ;AAC1C,SAASC,aAAa,QAAQ;AAC9B,SACEC,aAAa,EACbC,iBAAiB,EACjBC,aAAa,EACbC,oBAAoB,EACpBC,uBAAuB,EACvBC,aAAa,EACbC,sBAAsB,EACtBC,oBAAoB,EACpBC,iBAAiB,EACjBC,kBAAkB,EAClBC,eAAe,QACV;AACP,SAASC,WAAW,EAAEC,SAAS,EAAEC,eAAe,EAAEC,OAAO,EAAEC,MAAM,EAAEC,QAAQ,QAAQ;AAKnF,SAASC,WAAW,QAAQ;AAO5B,MAAMC,SAAA,GAAY;AAalB,MAAMC,sBAAA,GAA0BC,MAAA;EAC9B,MAAMC,sBAAA,GAAyBC,QAAA,CAASC,cAAc,CAAC;EACvD,IAAI,CAACF,sBAAA,EAAwB;IAC3B;EACF;EAEA,MAAMG,aAAA,GAAgBH,sBAAA,CAAuBI,qBAAqB;EAElE,IAAID,aAAA,CAAcE,GAAG,GAAGF,aAAA,CAAcG,MAAM,GAAGC,MAAA,CAAOC,WAAW,EAAE;IACjER,sBAAA,CAAuBS,cAAc,CAAC;MACpCC,KAAA,EAAO;IACT;EACF;EAEA,IAAIP,aAAA,CAAcE,GAAG,GAAG,GAAG;IACzBL,sBAAA,CAAuBS,cAAc,CAAC;MACpCC,KAAA,EAAO;IACT;EACF;EAEAX,MAAA,CAAOU,cAAc,CAAC;IAAEC,KAAA,EAAO;EAAU;AAC3C;AAEA;;;;AAIA,SAASC,mBAAmBC,YAAoB,EAAEC,SAAiB,EAAEC,MAAc;EACjF,IAAIC,aAAA,GAAgBD,MAAA;EACpB,KAAK,IAAIE,CAAA,GA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AAA,KAAc;QAAA;MAAA;IAAA;IAGpBxE,CAAA,OAAAJ,UAAA;IAAAI,CAAA,OAAAwE,aAAA;IAAAxE,CAAA,OAAA4G,EAAA;EAAA;IAAAA,EAAA,GAAA5G,CAAA;EAAA;EAPF,MAAAD,kBAAA,GAA2B6G,EAQE;EAG7BjH,qBAAA,CAAsBC,UAAA,EAAY2B,gBAAA,EAAkBgF,YAAA,EAAcxG,kBAAA;EAAA,OAE3DwB,gBAAA;AAAA","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"LexicalMenu.js","names":["c","_c","useLexicalComposerContext","getScrollParent","mergeRegister","$getSelection","$isRangeSelection","$setSelection","COMMAND_PRIORITY_LOW","COMMAND_PRIORITY_NORMAL","createCommand","KEY_ARROW_DOWN_COMMAND","KEY_ARROW_UP_COMMAND","KEY_ENTER_COMMAND","KEY_ESCAPE_COMMAND","KEY_TAB_COMMAND","useCallback","useEffect","useLayoutEffect","useMemo","useRef","useState","CAN_USE_DOM","baseClass","scrollIntoViewIfNeeded","target","typeaheadContainerNode","document","getElementById","typeaheadRect","getBoundingClientRect","top","height","window","innerHeight","scrollIntoView","block","getFullMatchOffset","documentText","entryText","offset","triggerOffset","i","length","substring","$splitNodeContainingQuery","match","selection","isCollapsed","anchor","type","anchorNode","getNode","isSimpleText","selectionOffset","textContent","getTextContent","slice","characterOffset","replaceableString","queryOffset","matchingString","startOffset","newNode","splitText","isTriggerVisibleInNearestScrollContainer","targetElement","containerElement","tRect","cRect","bottom","useDynamicPositioning","resolution","targetElementRef","onReposition","onVisibilityChange","$","editor","t0","t1","current","rootElement","getRootElement","rootScrollParent","body","ticking","previousIsInView","handleScroll","requestAnimationFrame","isInView","resizeObserver","ResizeObserver","addEventListener","capture","passive","observe","disconnect","removeEventListener","SCROLL_TYPEAHEAD_OPTION_INTO_VIEW_COMMAND","LexicalMenu","anchorElementRef","close","groups","menuRenderFn","shouldSplitNodeWithQuery","undefined","selectedItemKey","setSelectedItemKey","t2","item","rootElem","setAttribute","key","updateSelectedItem","t3","allItems","flatMap","_temp","firstMatchingItem","setSelectedItemKeyToFirstMatchingItem","t4","t5","t6","selectedItem","update","textNodeContainingQuery","remove","setTimeout","read","clone","onSelect","queryString","selectItemAndCleanUp","t7","t8","rootElem_0","removeAttribute","t9","t10","t11","registerCommand","_temp2","t12","t13","t14","payload","event","allItems_0","_temp3","selectedIndex","findIndex","item_1","newSelectedIndex","newSelectedItem","ref","dispatchCommand","index","preventDefault","stopImmediatePropagation","payload_0","event_0","allItems_1","_temp4","selectedIndex_0","item_2","newSelectedIndex_0","newSelectedItem_0","payload_1","event_1","payload_2","event_2","allItems_2","_temp5","selectedItem_0","find","item_3","event_3","allItems_3","_temp6","selectedItem_1","item_4","t15","listItemProps","t16","t17","group_3","group","items","group_2","group_1","group_0","item_0","setContainerDivAttributes","containerDiv","className","style","display","position","useMenuAnchorRef","anchorElem","setResolution","Symbol","for","createElement","parent","menuEle","firstChild","width","getRect","left","rawTop","scrollY","scrollX","menuRect","menuHeight","menuWidth","rootElementRect","isRTL","dir","documentElement","anchorRect","leftBoundary","Math","max","right","newLeft","wouldGoOffBottomOfScreen","wouldGoOffTopOfScreen","isConnected","append","positionMenu","rootElement_0","containerDiv_0"],"sources":["../../../../../src/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/LexicalMenu.tsx"],"sourcesContent":["'use client'\nimport type { BaseSelection, LexicalCommand, LexicalEditor, TextNode } from 'lexical'\nimport type { JSX, ReactPortal, RefObject } from 'react'\n\nimport { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext.js'\nimport { getScrollParent, mergeRegister } from '@lexical/utils'\nimport {\n $getSelection,\n $isRangeSelection,\n $setSelection,\n COMMAND_PRIORITY_LOW,\n COMMAND_PRIORITY_NORMAL,\n createCommand,\n KEY_ARROW_DOWN_COMMAND,\n KEY_ARROW_UP_COMMAND,\n KEY_ENTER_COMMAND,\n KEY_ESCAPE_COMMAND,\n KEY_TAB_COMMAND,\n} from 'lexical'\nimport { useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState } from 'react'\n\nimport type { MenuTextMatch } from '../useMenuTriggerMatch.js'\nimport type { SlashMenuGroupInternal, SlashMenuItem, SlashMenuItemInternal } from './types.js'\n\nimport { CAN_USE_DOM } from '../../../utils/canUseDOM.js'\n\nexport type MenuResolution = {\n getRect: () => DOMRect\n match?: MenuTextMatch\n}\n\nconst baseClass = 'slash-menu-popup'\n\nexport type MenuRenderFn = (\n anchorElementRef: RefObject<HTMLElement | null>,\n itemProps: {\n groups: Array<SlashMenuGroupInternal>\n selectedItemKey: null | string\n selectItemAndCleanUp: (selectedItem: SlashMenuItem) => void\n setSelectedItemKey: (itemKey: string) => void\n },\n matchingString: null | string,\n) => JSX.Element | null | ReactPortal\n\nconst scrollIntoViewIfNeeded = (target: HTMLElement) => {\n const typeaheadContainerNode = document.getElementById('slash-menu')\n if (!typeaheadContainerNode) {\n return\n }\n\n const typeaheadRect = typeaheadContainerNode.getBoundingClientRect()\n\n if (typeaheadRect.top + typeaheadRect.height > window.innerHeight) {\n typeaheadContainerNode.scrollIntoView({\n block: 'center',\n })\n }\n\n if (typeaheadRect.top < 0) {\n typeaheadContainerNode.scrollIntoView({\n block: 'center',\n })\n }\n\n target.scrollIntoView({ block: 'nearest' })\n}\n\n/**\n * Walk backwards along user input and forward through entity title to try\n * and replace more of the user's text with entity.\n */\nfunction getFullMatchOffset(documentText: string, entryText: string, offset: number) {\n let triggerOffset = offset\n for (let i = triggerOffset; i <= entryText.length; i++) {\n if (documentText.substring(documentText.length - i) === entryText.substring(0, i)) {\n triggerOffset = i\n }\n }\n return triggerOffset\n}\n\n/**\n * Split Lexical TextNode and return a new TextNode only containing matched text.\n * Common use cases include: removing the node, replacing with a new node.\n */\nfunction $splitNodeContainingQuery(match: MenuTextMatch): TextNode | undefined {\n const selection = $getSelection()\n if (!$isRangeSelection(selection) || !selection.isCollapsed()) {\n return\n }\n const anchor = selection.anchor\n if (anchor.type !== 'text') {\n return\n }\n const anchorNode = anchor.getNode()\n if (!anchorNode.isSimpleText()) {\n return\n }\n const selectionOffset = anchor.offset\n const textContent = anchorNode.getTextContent().slice(0, selectionOffset)\n const characterOffset = match.replaceableString.length\n const queryOffset = getFullMatchOffset(textContent, match.matchingString, characterOffset)\n const startOffset = selectionOffset - queryOffset\n if (startOffset < 0) {\n return\n }\n let newNode\n if (startOffset === 0) {\n ;[newNode] = anchorNode.splitText(selectionOffset)\n } else {\n ;[, newNode] = anchorNode.splitText(startOffset, selectionOffset)\n }\n\n return newNode\n}\n\nfunction isTriggerVisibleInNearestScrollContainer(\n targetElement: HTMLElement,\n containerElement: HTMLElement,\n): boolean {\n const tRect = targetElement.getBoundingClientRect()\n const cRect = containerElement.getBoundingClientRect()\n return tRect.top > cRect.top && tRect.top < cRect.bottom\n}\n\n// Reposition the menu on scroll, window resize, and element resize.\nexport function useDynamicPositioning(\n resolution: MenuResolution | null,\n targetElementRef: RefObject<HTMLElement | null>,\n onReposition: () => void,\n onVisibilityChange?: (isInView: boolean) => void,\n) {\n const [editor] = useLexicalComposerContext()\n useEffect(() => {\n const targetElement = targetElementRef.current\n if (targetElement != null && resolution != null) {\n const rootElement = editor.getRootElement()\n const rootScrollParent =\n rootElement != null ? getScrollParent(rootElement, false) : document.body\n let ticking = false\n let previousIsInView = isTriggerVisibleInNearestScrollContainer(\n targetElement,\n rootScrollParent,\n )\n const handleScroll = function () {\n if (!ticking) {\n window.requestAnimationFrame(function () {\n onReposition()\n ticking = false\n })\n ticking = true\n }\n const isInView = isTriggerVisibleInNearestScrollContainer(targetElement, rootScrollParent)\n if (isInView !== previousIsInView) {\n previousIsInView = isInView\n if (onVisibilityChange != null) {\n onVisibilityChange(isInView)\n }\n }\n }\n const resizeObserver = new ResizeObserver(onReposition)\n window.addEventListener('resize', onReposition)\n document.addEventListener('scroll', handleScroll, {\n capture: true,\n passive: true,\n })\n resizeObserver.observe(targetElement)\n return () => {\n resizeObserver.disconnect()\n window.removeEventListener('resize', onReposition)\n document.removeEventListener('scroll', handleScroll, true)\n }\n }\n }, [editor, onVisibilityChange, onReposition, resolution, targetElementRef])\n}\n\nexport const SCROLL_TYPEAHEAD_OPTION_INTO_VIEW_COMMAND: LexicalCommand<{\n index: number\n item: SlashMenuItemInternal\n}> = createCommand('SCROLL_TYPEAHEAD_OPTION_INTO_VIEW_COMMAND')\n\nexport function LexicalMenu({\n anchorElementRef,\n close,\n editor,\n // groups filtering is already handled in SlashMenu/index.tsx. Thus, groups always contains the matching items.\n groups,\n menuRenderFn,\n resolution,\n shouldSplitNodeWithQuery = false,\n}: {\n anchorElementRef: RefObject<HTMLElement | null>\n close: () => void\n editor: LexicalEditor\n groups: Array<SlashMenuGroupInternal>\n menuRenderFn: MenuRenderFn\n resolution: MenuResolution\n shouldSplitNodeWithQuery?: boolean\n}): JSX.Element | null {\n const [selectedItemKey, setSelectedItemKey] = useState<null | string>(null)\n\n const matchingString = (resolution.match && resolution.match.matchingString) || ''\n\n const updateSelectedItem = useCallback(\n (item: SlashMenuItem) => {\n const rootElem = editor.getRootElement()\n if (rootElem !== null) {\n rootElem.setAttribute('aria-activedescendant', `${baseClass}__item-${item.key}`)\n setSelectedItemKey(item.key)\n }\n },\n [editor],\n )\n\n const setSelectedItemKeyToFirstMatchingItem = useCallback(() => {\n // set selected item to the first of the matching ones\n if (groups !== null && matchingString != null) {\n // groups filtering is already handled in SlashMenu/index.tsx. Thus, groups always contains the matching items.\n const allItems = groups.flatMap((group) => group.items)\n\n if (allItems.length) {\n const firstMatchingItem = allItems[0]!\n updateSelectedItem(firstMatchingItem)\n }\n }\n }, [groups, updateSelectedItem, matchingString])\n\n useEffect(() => {\n setSelectedItemKeyToFirstMatchingItem()\n }, [matchingString, setSelectedItemKeyToFirstMatchingItem])\n\n const selectItemAndCleanUp = useCallback(\n (selectedItem: SlashMenuItem) => {\n close()\n\n editor.update(() => {\n const textNodeContainingQuery =\n resolution.match != null && shouldSplitNodeWithQuery\n ? $splitNodeContainingQuery(resolution.match)\n : null\n\n if (textNodeContainingQuery) {\n textNodeContainingQuery.remove()\n }\n })\n\n setTimeout(() => {\n // Needed in Firefox. See https://github.com/payloadcms/payload/issues/10724\n let selection: BaseSelection | undefined\n editor.read(() => {\n selection = $getSelection()?.clone()\n })\n editor.update(() => {\n if (selection) {\n $setSelection(selection)\n }\n })\n\n selectedItem.onSelect({\n editor,\n queryString: resolution.match ? resolution.match.matchingString : '',\n })\n }, 0)\n },\n [editor, shouldSplitNodeWithQuery, resolution.match, close],\n )\n\n useEffect(() => {\n return () => {\n const rootElem = editor.getRootElement()\n if (rootElem !== null) {\n rootElem.removeAttribute('aria-activedescendant')\n }\n }\n }, [editor])\n\n useLayoutEffect(() => {\n if (groups === null) {\n setSelectedItemKey(null)\n } else if (selectedItemKey === null) {\n setSelectedItemKeyToFirstMatchingItem()\n }\n }, [groups, selectedItemKey, updateSelectedItem, setSelectedItemKeyToFirstMatchingItem])\n\n useEffect(() => {\n return mergeRegister(\n editor.registerCommand(\n SCROLL_TYPEAHEAD_OPTION_INTO_VIEW_COMMAND,\n ({ item }) => {\n if (item.ref && item.ref.current != null) {\n scrollIntoViewIfNeeded(item.ref.current)\n return true\n }\n\n return false\n },\n COMMAND_PRIORITY_LOW,\n ),\n )\n }, [editor, updateSelectedItem])\n\n useEffect(() => {\n return mergeRegister(\n editor.registerCommand<KeyboardEvent>(\n KEY_ARROW_DOWN_COMMAND,\n (payload) => {\n const event = payload\n if (groups !== null && groups.length && selectedItemKey !== null) {\n const allItems = groups.flatMap((group) => group.items)\n const selectedIndex = allItems.findIndex((item) => item.key === selectedItemKey)\n\n const newSelectedIndex = selectedIndex !== allItems.length - 1 ? selectedIndex + 1 : 0\n\n const newSelectedItem = allItems[newSelectedIndex]\n if (!newSelectedItem) {\n return false\n }\n\n updateSelectedItem(newSelectedItem)\n if (newSelectedItem.ref != null && newSelectedItem.ref.current) {\n editor.dispatchCommand(SCROLL_TYPEAHEAD_OPTION_INTO_VIEW_COMMAND, {\n index: newSelectedIndex,\n item: newSelectedItem,\n })\n }\n event.preventDefault()\n event.stopImmediatePropagation()\n }\n return true\n },\n COMMAND_PRIORITY_NORMAL,\n ),\n editor.registerCommand<KeyboardEvent>(\n KEY_ARROW_UP_COMMAND,\n (payload) => {\n const event = payload\n if (groups !== null && groups.length && selectedItemKey !== null) {\n const allItems = groups.flatMap((group) => group.items)\n const selectedIndex = allItems.findIndex((item) => item.key === selectedItemKey)\n\n const newSelectedIndex = selectedIndex !== 0 ? selectedIndex - 1 : allItems.length - 1\n\n const newSelectedItem = allItems[newSelectedIndex]\n if (!newSelectedItem) {\n return false\n }\n\n updateSelectedItem(newSelectedItem)\n if (newSelectedItem.ref != null && newSelectedItem.ref.current) {\n scrollIntoViewIfNeeded(newSelectedItem.ref.current)\n }\n event.preventDefault()\n event.stopImmediatePropagation()\n }\n return true\n },\n COMMAND_PRIORITY_NORMAL,\n ),\n editor.registerCommand<KeyboardEvent>(\n KEY_ESCAPE_COMMAND,\n (payload) => {\n const event = payload\n event.preventDefault()\n event.stopImmediatePropagation()\n close()\n return true\n },\n COMMAND_PRIORITY_NORMAL,\n ),\n editor.registerCommand<KeyboardEvent>(\n KEY_TAB_COMMAND,\n (payload) => {\n const event = payload\n\n if (groups === null || selectedItemKey === null) {\n return false\n }\n const allItems = groups.flatMap((group) => group.items)\n const selectedItem = allItems.find((item) => item.key === selectedItemKey)\n if (!selectedItem) {\n return false\n }\n\n event.preventDefault()\n event.stopImmediatePropagation()\n selectItemAndCleanUp(selectedItem)\n return true\n },\n COMMAND_PRIORITY_NORMAL,\n ),\n editor.registerCommand(\n KEY_ENTER_COMMAND,\n (event: KeyboardEvent | null) => {\n if (groups === null || selectedItemKey === null) {\n return false\n }\n const allItems = groups.flatMap((group) => group.items)\n const selectedItem = allItems.find((item) => item.key === selectedItemKey)\n if (!selectedItem) {\n return false\n }\n\n if (event !== null) {\n event.preventDefault()\n event.stopImmediatePropagation()\n }\n selectItemAndCleanUp(selectedItem)\n return true\n },\n COMMAND_PRIORITY_NORMAL,\n ),\n )\n }, [selectItemAndCleanUp, close, editor, groups, selectedItemKey, updateSelectedItem])\n\n const listItemProps = useMemo(\n () => ({\n groups,\n selectedItemKey,\n selectItemAndCleanUp,\n setSelectedItemKey,\n }),\n [selectItemAndCleanUp, selectedItemKey, groups],\n )\n\n return menuRenderFn(\n anchorElementRef,\n listItemProps,\n resolution.match ? resolution.match.matchingString : '',\n )\n}\n\nfunction setContainerDivAttributes(containerDiv: HTMLElement, className?: string) {\n if (className != null) {\n containerDiv.className = className\n }\n containerDiv.setAttribute('aria-label', 'Slash menu')\n containerDiv.setAttribute('role', 'listbox')\n containerDiv.style.display = 'block'\n containerDiv.style.position = 'absolute'\n}\n\nexport function useMenuAnchorRef(\n anchorElem: HTMLElement,\n resolution: MenuResolution | null,\n setResolution: (r: MenuResolution | null) => void,\n className?: string,\n): RefObject<HTMLElement | null> {\n const [editor] = useLexicalComposerContext()\n const anchorElementRef = useRef<HTMLElement | null>(\n CAN_USE_DOM ? document.createElement('div') : null,\n )\n const positionMenu = useCallback(() => {\n if (anchorElementRef.current === null || parent === undefined) {\n return\n }\n const rootElement = editor.getRootElement()\n const containerDiv = anchorElementRef.current\n\n const VERTICAL_OFFSET = 32\n\n const menuEle = containerDiv.firstChild as Element\n if (rootElement !== null && resolution !== null) {\n const { height, width } = resolution.getRect()\n let { left, top } = resolution.getRect()\n\n const rawTop = top\n top -= anchorElem.getBoundingClientRect().top + window.scrollY\n left -= anchorElem.getBoundingClientRect().left + window.scrollX\n containerDiv.style.left = `${left + window.scrollX}px`\n containerDiv.style.height = `${height}px`\n containerDiv.style.width = `${width}px`\n if (menuEle !== null) {\n const menuRect = menuEle.getBoundingClientRect()\n const menuHeight = menuRect.height\n const menuWidth = menuRect.width\n\n const rootElementRect = rootElement.getBoundingClientRect()\n\n const isRTL = document.dir === 'rtl' || document.documentElement.dir === 'rtl'\n const anchorRect = anchorElem.getBoundingClientRect()\n const leftBoundary = Math.max(0, rootElementRect.left)\n\n if (!isRTL && left + menuWidth > rootElementRect.right) {\n containerDiv.style.left = `${rootElementRect.right - menuWidth + window.scrollX}px`\n } else if (isRTL && menuRect.left < leftBoundary) {\n const newLeft = leftBoundary + menuWidth - anchorRect.left\n containerDiv.style.left = `${newLeft + window.scrollX}px`\n }\n\n const wouldGoOffBottomOfScreen = rawTop + menuHeight + VERTICAL_OFFSET > window.innerHeight\n //const wouldGoOffBottomOfContainer = top + menuHeight > rootElementRect.bottom\n const wouldGoOffTopOfScreen = rawTop < 0\n\n // Position slash menu above the cursor instead of below (default) if it would otherwise go off the bottom of the screen.\n if (wouldGoOffBottomOfScreen && !wouldGoOffTopOfScreen) {\n const margin = 24\n containerDiv.style.top = `${\n top + VERTICAL_OFFSET - menuHeight + window.scrollY - (height + margin)\n }px`\n } else {\n containerDiv.style.top = `${top + window.scrollY + VERTICAL_OFFSET}px`\n }\n }\n\n if (!containerDiv.isConnected) {\n setContainerDivAttributes(containerDiv, className)\n anchorElem.append(containerDiv)\n }\n containerDiv.setAttribute('id', 'slash-menu')\n anchorElementRef.current = containerDiv\n rootElement.setAttribute('aria-controls', 'slash-menu')\n }\n }, [editor, resolution, className, anchorElem])\n\n useEffect(() => {\n const rootElement = editor.getRootElement()\n if (resolution !== null) {\n positionMenu()\n return () => {\n if (rootElement !== null) {\n rootElement.removeAttribute('aria-controls')\n }\n\n const containerDiv = anchorElementRef.current\n if (containerDiv !== null && containerDiv.isConnected) {\n containerDiv.remove()\n containerDiv.removeAttribute('id')\n }\n }\n }\n }, [editor, positionMenu, resolution])\n\n const onVisibilityChange = useCallback(\n (isInView: boolean) => {\n if (resolution !== null) {\n if (!isInView) {\n setResolution(null)\n }\n }\n },\n [resolution, setResolution],\n )\n\n useDynamicPositioning(resolution, anchorElementRef, positionMenu, onVisibilityChange)\n\n return anchorElementRef\n}\n"],"mappings":"AAAA;;AAAA,SAAAA,CAAA,IAAAC,EAAA;AAIA,SAASC,yBAAyB,QAAQ;AAC1C,SAASC,eAAe,EA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}
|
|
@@ -8,7 +8,6 @@
|
|
|
8
8
|
border-radius: var(--radius-large);
|
|
9
9
|
padding: var(--spacer-2);
|
|
10
10
|
list-style: none;
|
|
11
|
-
font-family: var(--text-body-medium-font-family);
|
|
12
11
|
font-size: var(--text-body-medium-font-size);
|
|
13
12
|
font-weight: var(--text-body-medium-font-weight);
|
|
14
13
|
line-height: var(--text-body-medium-line-height);
|
|
@@ -42,7 +41,6 @@
|
|
|
42
41
|
border-radius: var(--radius-medium);
|
|
43
42
|
cursor: pointer;
|
|
44
43
|
gap: var(--spacer-1);
|
|
45
|
-
transition: background-color 0.15s cubic-bezier(0, 0.2, 0.2, 1);
|
|
46
44
|
|
|
47
45
|
.icon {
|
|
48
46
|
color: var(--color-icon-secondary);
|