@payloadcms/richtext-lexical 4.0.0-internal.45cfa3d → 4.0.0-internal.4a8e202
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-IZKDIUJY.js +2 -0
- package/dist/exports/client/Field-IZKDIUJY.js.map +7 -0
- package/dist/exports/client/bundled.css +1 -1
- package/dist/exports/client/chunk-43E5QYAA.js +2 -0
- package/dist/exports/client/chunk-43E5QYAA.js.map +7 -0
- package/dist/exports/client/chunk-SSMQFWCQ.js +2 -0
- package/dist/exports/client/chunk-SSMQFWCQ.js.map +7 -0
- package/dist/exports/client/component-D5QLYS7W.js +2 -0
- package/dist/exports/client/component-D5QLYS7W.js.map +7 -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 +21 -21
- package/dist/exports/client/index.js.map +4 -4
- package/dist/features/align/client/toolbarAlignGroup.d.ts.map +1 -1
- package/dist/features/blocks/client/componentInline/components/InlineBlockContainer.d.ts.map +1 -1
- package/dist/features/blocks/client/getBlockImageComponent.d.ts +1 -1
- package/dist/features/blocks/client/markdown/markdownTransformer.d.ts.map +1 -1
- package/dist/features/blocks/client/nodes/BlocksNode.d.ts.map +1 -1
- package/dist/features/blocks/client/nodes/InlineBlocksNode.d.ts.map +1 -1
- package/dist/features/blocks/server/graphQLPopulationPromise.d.ts.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/markdown/markdownTransformer.d.ts.map +1 -1
- package/dist/features/blocks/server/nodes/BlocksNode.d.ts.map +1 -1
- package/dist/features/blocks/server/nodes/InlineBlocksNode.d.ts.map +1 -1
- package/dist/features/blocks/server/schema.d.ts.map +1 -1
- package/dist/features/blocks/server/validate.d.ts.map +1 -1
- package/dist/features/converters/htmlToLexical/index.d.ts.map +1 -1
- package/dist/features/converters/lexicalToHtml/shared/cssColors.d.ts.map +1 -1
- package/dist/features/converters/lexicalToMarkdown/index.d.ts.map +1 -1
- package/dist/features/converters/markdownToLexical/index.d.ts.map +1 -1
- package/dist/features/debug/testRecorder/client/plugin/index.css +0 -1
- package/dist/features/format/shared/toolbarFormatGroup.d.ts.map +1 -1
- package/dist/features/heading/server/schema.d.ts.map +1 -1
- package/dist/features/horizontalRule/client/nodes/HorizontalRuleNode.d.ts +1 -1
- package/dist/features/horizontalRule/client/nodes/HorizontalRuleNode.d.ts.map +1 -1
- package/dist/features/horizontalRule/client/nodes/HorizontalRuleNode.js +1 -1
- package/dist/features/horizontalRule/client/nodes/HorizontalRuleNode.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 +1 -1
- package/dist/features/horizontalRule/server/nodes/HorizontalRuleNode.js.map +1 -1
- package/dist/features/indent/client/toolbarIndentGroup.d.ts.map +1 -1
- package/dist/features/link/client/plugins/autoLink/index.d.ts.map +1 -1
- package/dist/features/link/client/plugins/floatingLinkEditor/index.css +0 -1
- package/dist/features/link/markdownTransformer.d.ts.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.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.map +1 -1
- package/dist/features/link/server/baseFields.d.ts.map +1 -1
- package/dist/features/link/server/baseFields.js +5 -4
- package/dist/features/link/server/baseFields.js.map +1 -1
- package/dist/features/link/server/graphQLPopulationPromise.d.ts.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/schema.d.ts.map +1 -1
- package/dist/features/link/server/validate.d.ts.map +1 -1
- package/dist/features/relationship/client/drawer/index.d.ts.map +1 -1
- package/dist/features/relationship/client/nodes/RelationshipNode.d.ts.map +1 -1
- package/dist/features/relationship/client/utils/useEnabledRelationships.d.ts.map +1 -1
- package/dist/features/relationship/server/graphQLPopulationPromise.d.ts.map +1 -1
- package/dist/features/relationship/server/nodes/RelationshipNode.d.ts.map +1 -1
- package/dist/features/relationship/server/schema.d.ts.map +1 -1
- package/dist/features/relationship/shared/filterEnabledRelationshipCollections.d.ts.map +1 -1
- package/dist/features/relationship/shared/filterEnabledRelationshipCollections.js +3 -2
- package/dist/features/relationship/shared/filterEnabledRelationshipCollections.js.map +1 -1
- package/dist/features/shared/toolbar/addDropdownGroup.d.ts.map +1 -1
- package/dist/features/shared/toolbar/featureButtonsGroup.d.ts.map +1 -1
- package/dist/features/shared/toolbar/textDropdownGroup.d.ts.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/index.d.ts.map +1 -0
- 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/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/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/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/toolbars/fixed/client/Toolbar/index.css +2 -4
- package/dist/features/toolbars/inline/client/Toolbar/index.css +0 -1
- package/dist/features/toolbars/shared/ToolbarButton/index.d.ts.map +1 -1
- package/dist/features/toolbars/shared/ToolbarDropdown/index.css +0 -2
- package/dist/features/toolbars/shared/ToolbarDropdown/index.d.ts.map +1 -1
- package/dist/features/typesServer.d.ts +1 -1
- package/dist/features/typesServer.d.ts.map +1 -1
- package/dist/features/typesServer.js.map +1 -1
- 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.d.ts.map +1 -1
- package/dist/features/upload/client/nodes/UploadNode.d.ts.map +1 -1
- package/dist/features/upload/server/graphQLPopulationPromise.d.ts.map +1 -1
- package/dist/features/upload/server/index.js +2 -2
- 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/schema.d.ts.map +1 -1
- package/dist/features/upload/server/validate.d.ts.map +1 -1
- package/dist/field/Field.d.ts.map +1 -1
- package/dist/field/Field.js +18 -15
- package/dist/field/Field.js.map +1 -1
- package/dist/field/bundled.css +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +5 -5
- package/dist/index.js.map +1 -1
- package/dist/lexical/LexicalEditor.css +18 -18
- package/dist/lexical/config/client/EditorConfigProvider.d.ts.map +1 -1
- package/dist/lexical/config/client/sanitize.d.ts.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/InsertParagraphAtEnd/index.css +0 -1
- package/dist/lexical/plugins/NodeViewOverridePlugin/index.d.ts.map +1 -1
- package/dist/lexical/plugins/NodeViewOverridePlugin/index.js +21 -0
- 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 +1 -20
- package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/LexicalMenu.js.map +1 -1
- package/dist/lexical/plugins/SlashMenu/index.css +0 -1
- package/dist/lexical/plugins/handles/DraggableBlockPlugin/debounce.d.ts.map +1 -1
- package/dist/lexical/plugins/handles/DraggableBlockPlugin/index.css +1 -0
- package/dist/lexical/plugins/handles/utils/calculateDistanceFromScrollerElem.d.ts.map +1 -1
- package/dist/lexical/ui/ContentEditable.css +19 -14
- package/dist/lexical/utils/markdown/createBlockNode.d.ts +1 -1
- package/dist/lexical/utils/markdown/createBlockNode.d.ts.map +1 -1
- package/dist/lexical/utils/nodeFormat.d.ts.map +1 -1
- package/dist/lexical/utils/point.d.ts.map +1 -1
- package/dist/lexical/utils/rect.d.ts.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/populateLexicalPopulationPromises.d.ts.map +1 -1
- package/dist/populateGraphQL/recursivelyPopulateFieldsForGraphQL.d.ts.map +1 -1
- package/dist/types/index.d.ts +1 -1
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/index.js.map +1 -1
- package/dist/types/jsonSchemaHelpers.d.ts.map +1 -1
- package/dist/types/nodeTypes.d.ts +1 -1
- package/dist/types/nodeTypes.d.ts.map +1 -1
- package/dist/types/nodeTypes.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/useDrawerSubmit.d.ts +1 -1
- package/dist/utilities/fieldsDrawer/useDrawerSubmit.d.ts.map +1 -1
- package/dist/utilities/fieldsDrawer/useLexicalDocumentDrawer.d.ts.map +1 -1
- package/dist/utilities/fieldsDrawer/useLexicalDrawer.d.ts.map +1 -1
- package/dist/utilities/fieldsDrawer/useLexicalListDrawer.d.ts.map +1 -1
- package/dist/utilities/generateImportMap.d.ts +1 -1
- package/dist/utilities/generateImportMap.d.ts.map +1 -1
- package/dist/utilities/generateSchemaMap.d.ts +1 -1
- package/dist/utilities/generateSchemaMap.d.ts.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/recurseNodeTree.d.ts.map +1 -1
- package/dist/utilities/upgradeLexicalData/upgradeDocumentFieldsRecursively.d.ts.map +1 -1
- package/dist/utilities/useLexicalFeature.d.ts.map +1 -1
- package/dist/validate/index.d.ts.map +1 -1
- package/package.json +96 -23
- package/dist/exports/client/Field-XH5C4HFU.js +0 -2
- package/dist/exports/client/Field-XH5C4HFU.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/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/{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.css +0 -0
- /package/dist/features/{experimental_table → table}/client/plugins/TableActionMenuPlugin/index.d.ts +0 -0
- /package/dist/features/{experimental_table → table}/client/plugins/TableActionMenuPlugin/index.js +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/TableCellResizerPlugin/index.js +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.css +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/plugins/TablePlugin/index.js +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":"recurseNodeTree.d.ts","sourceRoot":"","sources":["../../src/utilities/recurseNodeTree.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAA;AAGpD,eAAO,MAAM,eAAe,
|
|
1
|
+
{"version":3,"file":"recurseNodeTree.d.ts","sourceRoot":"","sources":["../../src/utilities/recurseNodeTree.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAA;AAGpD,eAAO,MAAM,eAAe,0CAIzB;IACD,cAAc,CAAC,EAAE,qBAAqB,EAAE,CAAA;IACxC,SAAS,CAAC,EAAE;QACV,CAAC,GAAG,EAAE,MAAM,GAAG,qBAAqB,CAAA;KACrC,CAAA;IACD,KAAK,EAAE,qBAAqB,EAAE,CAAA;CAC/B,KAAG,IA+BH,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"upgradeDocumentFieldsRecursively.d.ts","sourceRoot":"","sources":["../../../src/utilities/upgradeLexicalData/upgradeDocumentFieldsRecursively.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,KAAK,EAAkB,OAAO,EAAE,MAAM,SAAS,CAAA;AAS7D,KAAK,wBAAwB,GAAG;IAC9B,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IAE7B,MAAM,EAAE,KAAK,EAAE,CAAA;IACf,KAAK,EAAE,MAAM,CAAA;IACb,OAAO,EAAE,OAAO,CAAA;CACjB,CAAA;AAED,eAAO,MAAM,gCAAgC,
|
|
1
|
+
{"version":3,"file":"upgradeDocumentFieldsRecursively.d.ts","sourceRoot":"","sources":["../../../src/utilities/upgradeLexicalData/upgradeDocumentFieldsRecursively.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,KAAK,EAAkB,OAAO,EAAE,MAAM,SAAS,CAAA;AAS7D,KAAK,wBAAwB,GAAG;IAC9B,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IAE7B,MAAM,EAAE,KAAK,EAAE,CAAA;IACf,KAAK,EAAE,MAAM,CAAA;IACb,OAAO,EAAE,OAAO,CAAA;CACjB,CAAA;AAED,eAAO,MAAM,gCAAgC,sCAK1C,wBAAwB,KAAG,MAgG7B,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useLexicalFeature.d.ts","sourceRoot":"","sources":["../../src/utilities/useLexicalFeature.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAA;AAIvE,eAAO,MAAM,iBAAiB,GAAI,kBAAkB,
|
|
1
|
+
{"version":3,"file":"useLexicalFeature.d.ts","sourceRoot":"","sources":["../../src/utilities/useLexicalFeature.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAA;AAIvE,eAAO,MAAM,iBAAiB,GAAI,kBAAkB,cACtC,MAAM,WACT,qBAAqB,CAAC,kBAAkB,CAAC,SAenD,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/validate/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAA;AACpD,OAAO,KAAK,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAA;AAEtD,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,4BAA4B,CAAA;AAK7E,eAAO,MAAM,mBAAmB,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/validate/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAA;AACpD,OAAO,KAAK,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAA;AAEtD,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,4BAA4B,CAAA;AAK7E,eAAO,MAAM,mBAAmB,sBAE7B;IACD,YAAY,EAAE,2BAA2B,CAAA;CAC1C,8GAiCA,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@payloadcms/richtext-lexical",
|
|
3
|
-
"version": "4.0.0-internal.
|
|
3
|
+
"version": "4.0.0-internal.4a8e202",
|
|
4
4
|
"description": "The officially supported Lexical richtext adapter for Payload",
|
|
5
5
|
"homepage": "https://payloadcms.com",
|
|
6
6
|
"repository": {
|
|
@@ -18,7 +18,6 @@
|
|
|
18
18
|
}
|
|
19
19
|
],
|
|
20
20
|
"sideEffects": [
|
|
21
|
-
"*.scss",
|
|
22
21
|
"*.css"
|
|
23
22
|
],
|
|
24
23
|
"type": "module",
|
|
@@ -113,6 +112,11 @@
|
|
|
113
112
|
"types": "./dist/lexical-proxy/@lexical-utils.d.ts",
|
|
114
113
|
"default": "./dist/lexical-proxy/@lexical-utils.js"
|
|
115
114
|
},
|
|
115
|
+
"./lexical/react/ExtensionComponent": {
|
|
116
|
+
"import": "./dist/lexical-proxy/@lexical-react/ExtensionComponent.js",
|
|
117
|
+
"types": "./dist/lexical-proxy/@lexical-react/ExtensionComponent.d.ts",
|
|
118
|
+
"default": "./dist/lexical-proxy/@lexical-react/ExtensionComponent.js"
|
|
119
|
+
},
|
|
116
120
|
"./lexical/react/LexicalAutoEmbedPlugin": {
|
|
117
121
|
"import": "./dist/lexical-proxy/@lexical-react/LexicalAutoEmbedPlugin.js",
|
|
118
122
|
"types": "./dist/lexical-proxy/@lexical-react/LexicalAutoEmbedPlugin.d.ts",
|
|
@@ -178,6 +182,16 @@
|
|
|
178
182
|
"types": "./dist/lexical-proxy/@lexical-react/LexicalContentEditable.d.ts",
|
|
179
183
|
"default": "./dist/lexical-proxy/@lexical-react/LexicalContentEditable.js"
|
|
180
184
|
},
|
|
185
|
+
"./lexical/react/LexicalExtensionComposer": {
|
|
186
|
+
"import": "./dist/lexical-proxy/@lexical-react/LexicalExtensionComposer.js",
|
|
187
|
+
"types": "./dist/lexical-proxy/@lexical-react/LexicalExtensionComposer.d.ts",
|
|
188
|
+
"default": "./dist/lexical-proxy/@lexical-react/LexicalExtensionComposer.js"
|
|
189
|
+
},
|
|
190
|
+
"./lexical/react/LexicalExtensionEditorComposer": {
|
|
191
|
+
"import": "./dist/lexical-proxy/@lexical-react/LexicalExtensionEditorComposer.js",
|
|
192
|
+
"types": "./dist/lexical-proxy/@lexical-react/LexicalExtensionEditorComposer.d.ts",
|
|
193
|
+
"default": "./dist/lexical-proxy/@lexical-react/LexicalExtensionEditorComposer.js"
|
|
194
|
+
},
|
|
181
195
|
"./lexical/react/LexicalNodeContextMenuPlugin": {
|
|
182
196
|
"import": "./dist/lexical-proxy/@lexical-react/LexicalNodeContextMenuPlugin.js",
|
|
183
197
|
"types": "./dist/lexical-proxy/@lexical-react/LexicalNodeContextMenuPlugin.d.ts",
|
|
@@ -268,6 +282,11 @@
|
|
|
268
282
|
"types": "./dist/lexical-proxy/@lexical-react/LexicalRichTextPlugin.d.ts",
|
|
269
283
|
"default": "./dist/lexical-proxy/@lexical-react/LexicalRichTextPlugin.js"
|
|
270
284
|
},
|
|
285
|
+
"./lexical/react/LexicalSelectionAlwaysOnDisplay": {
|
|
286
|
+
"import": "./dist/lexical-proxy/@lexical-react/LexicalSelectionAlwaysOnDisplay.js",
|
|
287
|
+
"types": "./dist/lexical-proxy/@lexical-react/LexicalSelectionAlwaysOnDisplay.d.ts",
|
|
288
|
+
"default": "./dist/lexical-proxy/@lexical-react/LexicalSelectionAlwaysOnDisplay.js"
|
|
289
|
+
},
|
|
271
290
|
"./lexical/react/LexicalTabIndentationPlugin": {
|
|
272
291
|
"import": "./dist/lexical-proxy/@lexical-react/LexicalTabIndentationPlugin.js",
|
|
273
292
|
"types": "./dist/lexical-proxy/@lexical-react/LexicalTabIndentationPlugin.d.ts",
|
|
@@ -293,11 +312,56 @@
|
|
|
293
312
|
"types": "./dist/lexical-proxy/@lexical-react/LexicalTypeaheadMenuPlugin.d.ts",
|
|
294
313
|
"default": "./dist/lexical-proxy/@lexical-react/LexicalTypeaheadMenuPlugin.js"
|
|
295
314
|
},
|
|
315
|
+
"./lexical/react/ReactExtension": {
|
|
316
|
+
"import": "./dist/lexical-proxy/@lexical-react/ReactExtension.js",
|
|
317
|
+
"types": "./dist/lexical-proxy/@lexical-react/ReactExtension.d.ts",
|
|
318
|
+
"default": "./dist/lexical-proxy/@lexical-react/ReactExtension.js"
|
|
319
|
+
},
|
|
320
|
+
"./lexical/react/ReactPluginHostExtension": {
|
|
321
|
+
"import": "./dist/lexical-proxy/@lexical-react/ReactPluginHostExtension.js",
|
|
322
|
+
"types": "./dist/lexical-proxy/@lexical-react/ReactPluginHostExtension.d.ts",
|
|
323
|
+
"default": "./dist/lexical-proxy/@lexical-react/ReactPluginHostExtension.js"
|
|
324
|
+
},
|
|
325
|
+
"./lexical/react/ReactProviderExtension": {
|
|
326
|
+
"import": "./dist/lexical-proxy/@lexical-react/ReactProviderExtension.js",
|
|
327
|
+
"types": "./dist/lexical-proxy/@lexical-react/ReactProviderExtension.d.ts",
|
|
328
|
+
"default": "./dist/lexical-proxy/@lexical-react/ReactProviderExtension.js"
|
|
329
|
+
},
|
|
330
|
+
"./lexical/react/TreeViewExtension": {
|
|
331
|
+
"import": "./dist/lexical-proxy/@lexical-react/TreeViewExtension.js",
|
|
332
|
+
"types": "./dist/lexical-proxy/@lexical-react/TreeViewExtension.d.ts",
|
|
333
|
+
"default": "./dist/lexical-proxy/@lexical-react/TreeViewExtension.js"
|
|
334
|
+
},
|
|
335
|
+
"./lexical/react/useExtensionComponent": {
|
|
336
|
+
"import": "./dist/lexical-proxy/@lexical-react/useExtensionComponent.js",
|
|
337
|
+
"types": "./dist/lexical-proxy/@lexical-react/useExtensionComponent.d.ts",
|
|
338
|
+
"default": "./dist/lexical-proxy/@lexical-react/useExtensionComponent.js"
|
|
339
|
+
},
|
|
340
|
+
"./lexical/react/useExtensionSignalValue": {
|
|
341
|
+
"import": "./dist/lexical-proxy/@lexical-react/useExtensionSignalValue.js",
|
|
342
|
+
"types": "./dist/lexical-proxy/@lexical-react/useExtensionSignalValue.d.ts",
|
|
343
|
+
"default": "./dist/lexical-proxy/@lexical-react/useExtensionSignalValue.js"
|
|
344
|
+
},
|
|
345
|
+
"./lexical/react/useLexicalAriaLiveRegion": {
|
|
346
|
+
"import": "./dist/lexical-proxy/@lexical-react/useLexicalAriaLiveRegion.js",
|
|
347
|
+
"types": "./dist/lexical-proxy/@lexical-react/useLexicalAriaLiveRegion.d.ts",
|
|
348
|
+
"default": "./dist/lexical-proxy/@lexical-react/useLexicalAriaLiveRegion.js"
|
|
349
|
+
},
|
|
296
350
|
"./lexical/react/useLexicalEditable": {
|
|
297
351
|
"import": "./dist/lexical-proxy/@lexical-react/useLexicalEditable.js",
|
|
298
352
|
"types": "./dist/lexical-proxy/@lexical-react/useLexicalEditable.d.ts",
|
|
299
353
|
"default": "./dist/lexical-proxy/@lexical-react/useLexicalEditable.js"
|
|
300
354
|
},
|
|
355
|
+
"./lexical/react/useLexicalFocusManagerRef": {
|
|
356
|
+
"import": "./dist/lexical-proxy/@lexical-react/useLexicalFocusManagerRef.js",
|
|
357
|
+
"types": "./dist/lexical-proxy/@lexical-react/useLexicalFocusManagerRef.d.ts",
|
|
358
|
+
"default": "./dist/lexical-proxy/@lexical-react/useLexicalFocusManagerRef.js"
|
|
359
|
+
},
|
|
360
|
+
"./lexical/react/useLexicalFocusTrapRef": {
|
|
361
|
+
"import": "./dist/lexical-proxy/@lexical-react/useLexicalFocusTrapRef.js",
|
|
362
|
+
"types": "./dist/lexical-proxy/@lexical-react/useLexicalFocusTrapRef.d.ts",
|
|
363
|
+
"default": "./dist/lexical-proxy/@lexical-react/useLexicalFocusTrapRef.js"
|
|
364
|
+
},
|
|
301
365
|
"./lexical/react/useLexicalIsTextContentEmpty": {
|
|
302
366
|
"import": "./dist/lexical-proxy/@lexical-react/useLexicalIsTextContentEmpty.js",
|
|
303
367
|
"types": "./dist/lexical-proxy/@lexical-react/useLexicalIsTextContentEmpty.d.ts",
|
|
@@ -308,6 +372,16 @@
|
|
|
308
372
|
"types": "./dist/lexical-proxy/@lexical-react/useLexicalNodeSelection.d.ts",
|
|
309
373
|
"default": "./dist/lexical-proxy/@lexical-react/useLexicalNodeSelection.js"
|
|
310
374
|
},
|
|
375
|
+
"./lexical/react/useLexicalRovingTabIndexRef": {
|
|
376
|
+
"import": "./dist/lexical-proxy/@lexical-react/useLexicalRovingTabIndexRef.js",
|
|
377
|
+
"types": "./dist/lexical-proxy/@lexical-react/useLexicalRovingTabIndexRef.d.ts",
|
|
378
|
+
"default": "./dist/lexical-proxy/@lexical-react/useLexicalRovingTabIndexRef.js"
|
|
379
|
+
},
|
|
380
|
+
"./lexical/react/useLexicalSlotRef": {
|
|
381
|
+
"import": "./dist/lexical-proxy/@lexical-react/useLexicalSlotRef.js",
|
|
382
|
+
"types": "./dist/lexical-proxy/@lexical-react/useLexicalSlotRef.d.ts",
|
|
383
|
+
"default": "./dist/lexical-proxy/@lexical-react/useLexicalSlotRef.js"
|
|
384
|
+
},
|
|
311
385
|
"./lexical/react/useLexicalSubscription": {
|
|
312
386
|
"import": "./dist/lexical-proxy/@lexical-react/useLexicalSubscription.js",
|
|
313
387
|
"types": "./dist/lexical-proxy/@lexical-react/useLexicalSubscription.d.ts",
|
|
@@ -343,25 +417,25 @@
|
|
|
343
417
|
]
|
|
344
418
|
},
|
|
345
419
|
"dependencies": {
|
|
346
|
-
"@lexical/clipboard": "0.
|
|
347
|
-
"@lexical/headless": "0.
|
|
348
|
-
"@lexical/html": "0.
|
|
349
|
-
"@lexical/link": "0.
|
|
350
|
-
"@lexical/list": "0.
|
|
351
|
-
"@lexical/mark": "0.
|
|
352
|
-
"@lexical/markdown": "0.
|
|
353
|
-
"@lexical/react": "0.
|
|
354
|
-
"@lexical/rich-text": "0.
|
|
355
|
-
"@lexical/selection": "0.
|
|
356
|
-
"@lexical/table": "0.
|
|
357
|
-
"@lexical/utils": "0.
|
|
420
|
+
"@lexical/clipboard": "0.48.0",
|
|
421
|
+
"@lexical/headless": "0.48.0",
|
|
422
|
+
"@lexical/html": "0.48.0",
|
|
423
|
+
"@lexical/link": "0.48.0",
|
|
424
|
+
"@lexical/list": "0.48.0",
|
|
425
|
+
"@lexical/mark": "0.48.0",
|
|
426
|
+
"@lexical/markdown": "0.48.0",
|
|
427
|
+
"@lexical/react": "0.48.0",
|
|
428
|
+
"@lexical/rich-text": "0.48.0",
|
|
429
|
+
"@lexical/selection": "0.48.0",
|
|
430
|
+
"@lexical/table": "0.48.0",
|
|
431
|
+
"@lexical/utils": "0.48.0",
|
|
358
432
|
"acorn": "8.16.0",
|
|
359
433
|
"bson-objectid": "2.0.4",
|
|
360
434
|
"csstype": "3.2.3",
|
|
361
435
|
"dequal": "2.0.3",
|
|
362
436
|
"escape-html": "1.0.3",
|
|
363
437
|
"jsox": "1.2.125",
|
|
364
|
-
"lexical": "0.
|
|
438
|
+
"lexical": "0.48.0",
|
|
365
439
|
"mdast-util-from-markdown": "2.0.3",
|
|
366
440
|
"mdast-util-mdx-jsx": "3.2.0",
|
|
367
441
|
"micromark-extension-mdx-jsx": "3.0.2",
|
|
@@ -369,8 +443,8 @@
|
|
|
369
443
|
"react-error-boundary": "6.1.1",
|
|
370
444
|
"ts-essentials": "10.0.3",
|
|
371
445
|
"uuid": "14.0.0",
|
|
372
|
-
"@payloadcms/translations": "4.0.0-internal.
|
|
373
|
-
"@payloadcms/ui": "4.0.0-internal.
|
|
446
|
+
"@payloadcms/translations": "4.0.0-internal.4a8e202",
|
|
447
|
+
"@payloadcms/ui": "4.0.0-internal.4a8e202"
|
|
374
448
|
},
|
|
375
449
|
"devDependencies": {
|
|
376
450
|
"@babel/cli": "7.27.2",
|
|
@@ -378,7 +452,7 @@
|
|
|
378
452
|
"@babel/preset-env": "7.27.2",
|
|
379
453
|
"@babel/preset-react": "7.27.1",
|
|
380
454
|
"@babel/preset-typescript": "7.27.1",
|
|
381
|
-
"@lexical/eslint-plugin": "0.
|
|
455
|
+
"@lexical/eslint-plugin": "0.48.0",
|
|
382
456
|
"@types/escape-html": "1.0.4",
|
|
383
457
|
"@types/json-schema": "7.0.15",
|
|
384
458
|
"@types/node": "24.12.3",
|
|
@@ -389,16 +463,15 @@
|
|
|
389
463
|
"esbuild": "0.27.1",
|
|
390
464
|
"esbuild-sass-plugin": "3.3.1",
|
|
391
465
|
"swc-plugin-transform-remove-imports": "8.3.0",
|
|
392
|
-
"
|
|
393
|
-
"
|
|
466
|
+
"@payloadcms/eslint-config": "3.28.0",
|
|
467
|
+
"payload": "4.0.0-internal.4a8e202"
|
|
394
468
|
},
|
|
395
469
|
"peerDependencies": {
|
|
396
|
-
"@faceless-ui/modal": "3.0.
|
|
470
|
+
"@faceless-ui/modal": "3.0.1",
|
|
397
471
|
"@faceless-ui/scroll-info": "2.0.0",
|
|
398
472
|
"react": "^19.0.1 || ^19.1.2 || ^19.2.1",
|
|
399
473
|
"react-dom": "^19.0.1 || ^19.1.2 || ^19.2.1",
|
|
400
|
-
"
|
|
401
|
-
"payload": "4.0.0-internal.45cfa3d"
|
|
474
|
+
"payload": "4.0.0-internal.4a8e202"
|
|
402
475
|
},
|
|
403
476
|
"engines": {
|
|
404
477
|
"node": ">=24.15.0"
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use client";import{b as Be,d as $,e as K,g as Oe,h as Ie,i as Fe,j as $e,k as Se,l as Pe,m as Ke}from"./chunk-X3D4LZS7.js";import{a as Ae,b as P}from"./chunk-RJ5MAOKZ.js";import{jsx as L,jsxs as le}from"react/jsx-runtime";import{BulkUploadProvider as Zr,FieldDescription as en,FieldError as tn,FieldLabel as on,isFieldRTL as rn,RenderCustomComponent as Mt,useConfig as nn,useEditDepth as sn,useEffectEvent as ln,useField as an,useLocale as cn}from"@payloadcms/ui";import{mergeFieldStyles as un}from"@payloadcms/ui/shared";import{dequal as dn}from"dequal/lite";import At,{useCallback as Bt,useEffect as Ot,useMemo as fn,useState as It}from"react";import{ErrorBoundary as mn}from"react-error-boundary";import"./bundled.css";import{jsx as j}from"react/jsx-runtime";import{LexicalComposer as Vr}from"@lexical/react/LexicalComposer.js";import{useEditDepth as Wr}from"@payloadcms/ui";import*as vt from"react";import{useMemo as Yr}from"react";import{c as vr}from"react/compiler-runtime";import{jsx as C,jsxs as ie}from"react/jsx-runtime";import{useLexicalComposerContext as _r}from"@lexical/react/LexicalComposerContext.js";import{LexicalErrorBoundary as kr}from"@lexical/react/LexicalErrorBoundary.js";import{HistoryPlugin as Lr}from"@lexical/react/LexicalHistoryPlugin.js";import{OnChangePlugin as Dr}from"@lexical/react/LexicalOnChangePlugin.js";import{RichTextPlugin as Mr}from"@lexical/react/LexicalRichTextPlugin.js";import{useLexicalEditable as Ar}from"@lexical/react/useLexicalEditable";import{BLUR_COMMAND as Br,COMMAND_PRIORITY_LOW as Tt,FOCUS_COMMAND as Or}from"lexical";import*as Q from"react";import{useEffect as Ir,useState as Fr}from"react";import{jsx as je}from"react/jsx-runtime";import"react";var z=({anchorElem:e,clientProps:t,plugin:o})=>o.position==="floatingAnchorElem"&&e?o.Component&&je(o.Component,{anchorElem:e,clientProps:t}):o.Component&&je(o.Component,{clientProps:t});import{c as jt}from"react/compiler-runtime";import{copyToClipboard as ze}from"@lexical/clipboard";import{useLexicalComposerContext as zt}from"@lexical/react/LexicalComposerContext.js";import{objectKlassEquals as Ht}from"@lexical/utils";import He from"bson-objectid";import{$getSelection as Vt,$isNodeSelection as Wt,COMMAND_PRIORITY_LOW as Yt,COPY_COMMAND as Gt}from"lexical";import{useEffect as Ut}from"react";var Te=e=>{if("fields"in e&&typeof e.fields=="object"&&e.fields!==null&&"id"in e.fields?e.fields.id=new He.default().toHexString():"id"in e&&(e.id=new He.default().toHexString()),e.children)for(let t of e.children)Te(t)};function Ve(){let e=jt(3),[t]=zt(),o,r;return e[0]!==t?(o=()=>t.registerCommand(Gt,n=>{let c=Vt();if(Wt(c)){let s=c.getNodes()[0]?.exportJSON(),u=JSON.parse(JSON.stringify(s));Te(u);let d={namespace:t._config.namespace,nodes:[u]},m=JSON.stringify(d);return ze(t,null,{"application/x-lexical-editor":m,"text/plain":""}).catch(Jt),!0}return ze(t,Ht(n,ClipboardEvent)?n:null).then(()=>{if(!(n instanceof ClipboardEvent)||!n.clipboardData)throw new Error("No clipboard event");let l=n.clipboardData.getData("application/x-lexical-editor");if(!l)return!0;let s=JSON.parse(l);for(let d of s.nodes)Te(d);let u=JSON.stringify(s);n.clipboardData.setData("application/x-lexical-editor",u)}).catch(l=>{throw n instanceof ClipboardEvent&&n.clipboardData?.setData("application/x-lexical-editor",""),l}),!0},Yt),r=[t],e[0]=t,e[1]=o,e[2]=r):(o=e[1],r=e[2]),Ut(o,r),null}function Jt(e){throw e}import{c as qt}from"react/compiler-runtime";import{useLexicalComposerContext as Qt}from"@lexical/react/LexicalComposerContext";import{$findMatchingParent as fe,mergeRegister as Xt}from"@lexical/utils";import{$createNodeSelection as Zt,$getEditor as te,$getNearestNodeFromDOMNode as eo,$getSelection as me,$isDecoratorNode as H,$isElementNode as Re,$isLineBreakNode as to,$isNodeSelection as pe,$isRangeSelection as We,$isRootOrShadowRoot as oo,$isTextNode as ro,$setSelection as Ye,CLICK_COMMAND as no,COMMAND_PRIORITY_LOW as Y,KEY_ARROW_DOWN_COMMAND as io,KEY_ARROW_UP_COMMAND as so,KEY_BACKSPACE_COMMAND as lo,KEY_DELETE_COMMAND as ao,SELECTION_CHANGE_COMMAND as co}from"lexical";import{useEffect as uo}from"react";function Ge(){let e=qt(3),[t]=Qt(),o=xo,r,n;return e[0]!==t?(r=()=>Xt(t.registerCommand(no,yo,Y),t.registerCommand(ao,o,Y),t.registerCommand(lo,o,Y),t.registerCommand(co,ho,Y),t.registerCommand(so,po,Y),t.registerCommand(io,fo,Y)),n=[t],e[0]=t,e[1]=r,e[2]=n):(r=e[1],n=e[2]),uo(r,n),null}function fo(e){let t=me();if(pe(t)){e.preventDefault();let l=t.getNodes()[0]?.getNextSibling();if(H(l)){let d=te().getElementByKey(l.getKey());return d&&oe({element:d,node:l}),!0}if(!Re(l))return!0;let s=l.getFirstDescendant()??l;return s&&(fe(s,ge)?.selectEnd(),e.preventDefault()),!0}if(!We(t))return!1;let r=(t.isBackward()?t.anchor:t.focus).getNode(),n=fe(r,mo),c=n?.getNextSibling();if(!n||c!==Ue(n))return!1;if(H(c)){let l=te().getElementByKey(c.getKey());if(l)return oe({element:l,node:c}),e.preventDefault(),!0}return!1}function mo(e){return Ue(e)!==null}function po(e){let t=me();if(pe(t)){let l=t.getNodes()[0]?.getPreviousSibling();if(H(l)){let d=te().getElementByKey(l.getKey());return d?(oe({element:d,node:l}),e.preventDefault(),!0):!1}if(!Re(l))return!1;let s=l.getLastDescendant()??l;return s?(fe(s,ge)?.selectStart(),e.preventDefault(),!0):!1}if(!We(t))return!1;let r=(t.isBackward()?t.anchor:t.focus).getNode(),n=fe(r,go),c=n?.getPreviousSibling();if(!n||c!==Je(n))return!1;if(H(c)){let l=te().getElementByKey(c.getKey());if(l)return oe({element:l,node:c}),e.preventDefault(),!0}return!1}function go(e){return Je(e)!==null}function ho(){let e=bo();return document.querySelector(".decorator-selected")?.classList.remove("decorator-selected"),e?(e.element?.classList.add("decorator-selected"),!0):!1}function yo(e){document.querySelector(".decorator-selected")?.classList.remove("decorator-selected");let t=Co(e);if(!t)return!0;let{target:o}=e;return!(o instanceof HTMLElement)||o.isContentEditable||o.closest('button, textarea, input, .react-select, .code-editor, .no-select-decorator, [role="button"]')?Ye(null):oe(t),!0}function xo(e){let t=me();return pe(t)?(e.preventDefault(),t.getNodes().forEach(Eo),!0):!1}function Eo(e){e.remove()}function Co(e){if(!(e.target instanceof HTMLElement))return;let t=e.target.closest('[data-lexical-decorator="true"]');if(!(t instanceof HTMLElement))return;let o=eo(t);return H(o)?{element:t,node:o}:void 0}function bo(){let e=me();if(!pe(e))return;let t=e.getNodes();if(t.length!==1)return;let o=t[0];return H(o)?{decorator:o,element:te().getElementByKey(o.getKey())}:void 0}function oe({element:e,node:t}){document.querySelector(".decorator-selected")?.classList.remove("decorator-selected");let o=Zt();o.add(t.getKey()),Ye(o),e.scrollIntoView({behavior:"smooth",block:"nearest"}),e.classList.add("decorator-selected")}function ge(e){if(H(e)&&!e.isInline())return!0;if(!Re(e)||oo(e))return!1;let t=e.getFirstChild(),o=t===null||to(t)||ro(t)||t.isInline();return!e.isInline()&&e.canBeEmpty()!==!1&&o}function Ue(e){let t=e.getNextSibling();for(;t!==null;){if(ge(t))return t;t=t.getNextSibling()}return null}function Je(e){let t=e.getPreviousSibling();for(;t!==null;){if(ge(t))return t;t=t.getPreviousSibling()}return null}import{jsx as ve}from"react/jsx-runtime";import{useLexicalComposerContext as Ro}from"@lexical/react/LexicalComposerContext.js";import{$createParagraphNode as vo,isHTMLElement as _o}from"lexical";import*as Ze from"react";import{useCallback as ko,useEffect as Xe,useRef as Lo,useState as Do}from"react";import{createPortal as Mo}from"react-dom";var G=(e,t,o,r,n=50,c=25)=>{let l=0;if(e&&!e.contains(r)){let{bottom:s,left:u,right:d,top:m}=e.getBoundingClientRect(),a=m+window.scrollY,i=s+window.scrollY;if(o<a-c||o>i+c||t<u-n||t>d+n)return-1;(t<u||t>d)&&(l=t<u?t-u:t-d)}return l};import{$getNodeByKey as ye}from"lexical";function U(e){let t=e.getBoundingClientRect(),o=getComputedStyle(e).getPropertyValue("transform");if(!o||o==="none")return t;let r=o.split(",").pop();return t.y=t.y-Number(r?.replace(")","")),t}function he(e){let t=(u,d)=>u?parseFloat(window.getComputedStyle(u)[d]):0,{marginBottom:o,marginTop:r}=window.getComputedStyle(e),n=t(e.previousElementSibling,"marginBottom"),c=t(e.nextElementSibling,"marginTop"),l=Math.max(parseFloat(r),n);return{marginBottom:Math.max(parseFloat(o),c),marginTop:l}}import{$getRoot as No}from"lexical";function V(e){return e.getEditorState().read(()=>No().getChildrenKeys())}var wo=1,So=-1,qe=0,B={props:null,result:null};function Po(e,t,o=20){let r=e.x-t.x,n=e.y-t.y;return r*r+n*n<=o*o}function J(e){let{anchorElem:t,cache_threshold:o=20,editor:r,fuzzy:n=!1,horizontalOffset:c=0,point:{x:l,y:s},startIndex:u=0,useEdgeAsDefault:d=!1}=e;if(o>0&&B.props&&B.result&&B.props.fuzzy===e.fuzzy&&B.props.horizontalOffset===e.horizontalOffset&&B.props.useEdgeAsDefault===e.useEdgeAsDefault&&Po(B.props.point,e.point,o))return B.result;let m=t.getBoundingClientRect(),a=V(r),i={blockElem:null,blockNode:null,distance:1/0,foundAtIndex:-1,isFoundNodeEmptyParagraph:!1};return r.getEditorState().read(()=>{if(d){let p=r.getElementByKey(a[0]),g=r.getElementByKey(a[a.length-1]);if(p&&g){let[f,E]=[U(p),U(g)];if(s<f.top?(i.blockElem=p,i.distance=f.top-s,i.blockNode=ye(a[0]),i.foundAtIndex=0):s>E.bottom&&(i.distance=s-E.bottom,i.blockNode=ye(a[a.length-1]),i.blockElem=g,i.foundAtIndex=a.length-1),i?.blockElem)return{blockElem:null,isFoundNodeEmptyParagraph:!1}}}let x=u,y=qe;for(;x>=0&&x<a.length;){let p=a[x],g=r.getElementByKey(p);if(g===null)break;let f=new K(l+c,s),E=$e.fromDOMRect(U(g)),{marginBottom:h,marginTop:b}=he(g),_=E.generateNewRect({bottom:E.bottom+h,left:m.left,right:m.right,top:E.top-b}),{distance:w,isOnBottomSide:v,isOnTopSide:D}=_.distanceFromPoint(f);if(w===0){i.blockElem=g,i.blockNode=ye(p),i.foundAtIndex=x,i.distance=w,i.blockNode&&i.blockNode.getType()==="paragraph"&&i.blockNode.getTextContent()===""&&(!n&&!e.returnEmptyParagraphs&&(i.blockElem=null,i.blockNode=null),i.isFoundNodeEmptyParagraph=!0);break}else n&&w<i.distance&&(i.blockElem=g,i.blockNode=ye(p),i.distance=w,i.foundAtIndex=x);y===qe&&(D?y=So:v?y=wo:y=1/0),x+=y}}),B.props=e,B.result={blockElem:i.blockElem,blockNode:i.blockNode,foundAtIndex:i.foundAtIndex,isFoundNodeEmptyParagraph:i.isFoundNodeEmptyParagraph},{blockElem:i.blockElem,blockNode:i.blockNode,foundAtIndex:i.foundAtIndex,isFoundNodeEmptyParagraph:i.isFoundNodeEmptyParagraph}}function xe(e,t){return!!e.closest(`.${t}`)}var To=["IMG","INPUT","TEXTAREA","SELECT","BUTTON","VIDEO","OBJECT","EMBED","IFRAME","HR"];function Qe(e){if(!e||To.includes(e.tagName)||e.offsetHeight===0||e.offsetWidth===0)return!1;let t=window.getComputedStyle(e);return!(t.display==="table-cell"||t.position==="absolute"||t.visibility==="hidden"||t.opacity==="0")}function Ee(e,t,o,r=0){if(!e){t.style.opacity="0",t.style.transform="translate(-10000px, -10000px)";return}let n=e.getBoundingClientRect(),c=window.getComputedStyle(e),l=t.getBoundingClientRect(),s=o.getBoundingClientRect(),u;if(["LexicalEditorTheme__block","LexicalEditorTheme__upload","LexicalEditorTheme__relationship"].some(a=>e.classList.contains(a)||e.firstElementChild?.classList.contains(a)))u=n.top+8-s.top;else{let a=Qe(e)?parseInt(c.lineHeight,10):0;u=n.top+(a-l.height)/2-s.top}let m=r;t.style.opacity="1",t.style.transform=`translate(${m}px, ${u}px)`}var Ao="add-block-menu",Ce=1/0;function Bo(e){return e===0?1/0:Ce>=0&&Ce<e?Ce:Math.floor(e/2)}function Oo(e,t,o){let r=t.parentElement,{editorConfig:n}=P(),c=n?.admin?.hideGutter?-24:12,l=Lo(null),[s,u]=Do(null);Xe(()=>{function m(a){let i=a.target;if(!_o(i))return;let x=G(r,a.pageX,a.pageY,i);if(x===-1){u(null);return}if(xe(i,Ao))return;let y=V(e),{blockElem:p,blockNode:g,foundAtIndex:f}=J({anchorElem:t,cache_threshold:0,editor:e,horizontalOffset:-x,point:new K(a.x,a.y),returnEmptyParagraphs:!0,startIndex:Bo(y.length),useEdgeAsDefault:!1});Ce=f,p&&g&&(s?.node!==g||s?.elem!==p)&&u({elem:p,node:g})}return document?.addEventListener("mousemove",m),()=>{document?.removeEventListener("mousemove",m)}},[r,t,e,s]),Xe(()=>{l.current&&s?.node&&Ee(s?.elem,l.current,t,c)},[t,s,c]);let d=ko(m=>{let a=s;a?.node&&(e.update(()=>{let i=!0;if((a?.node.getType()!=="paragraph"||a.node.getTextContent()!=="")&&(i=!1),!i){let x=vo();a?.node.insertAfter(x),setTimeout(()=>{a={elem:e.getElementByKey(x.getKey()),node:x},u(a)},0)}}),setTimeout(()=>{e.update(()=>{e.focus(),a?.node&&"select"in a.node&&typeof a.node.select=="function"&&a.node.select()})},1),setTimeout(()=>{e.dispatchCommand(Ie,{node:a?.node})},2),m.stopPropagation(),m.preventDefault())},[e,s]);return Mo(ve(Ze.Fragment,{children:ve("button",{"aria-label":"Add block",className:"icon add-block-menu",onClick:m=>{d(m)},ref:l,type:"button",children:ve("div",{className:o?"icon":""})})}),t)}function et(e){let{anchorElem:t}=e,o=t===void 0?document.body:t,[r]=Ro();return Oo(r,o,r._editable)}import{jsx as be,jsxs as Fo}from"react/jsx-runtime";import{useLexicalComposerContext as $o}from"@lexical/react/LexicalComposerContext.js";import{eventFiles as rt}from"@lexical/rich-text";import{$getNearestNodeFromDOMNode as nt,$getNodeByKey as Ko,isHTMLElement as _e}from"lexical";import*as ct from"react";import{useEffect as ke,useRef as re,useState as it}from"react";import{createPortal as jo}from"react-dom";var tt=0,Io=-24;var W=0;function ot(e,t,o,r,n,c,l,s,u,d=!1){let{height:m,top:a}=r.getBoundingClientRect(),{top:i,width:x}=l.getBoundingClientRect(),{marginBottom:y,marginTop:p}=he(r),g=a,f=c>=a+m/2+window.scrollY,E=!1;if(n?.elem)if(r!==n?.elem)(f&&n?.elem&&n?.elem===r.nextElementSibling||!f&&n?.elem&&n?.elem===r.previousElementSibling)&&(W++,W<200&&(E=!0));else{W++;let w=n?.boundingBox?.y,v=r.getBoundingClientRect().y;(f===n?.isBelow&&w===v||W<200)&&(E=!1)}if(E)return{isBelow:f,willStayInSamePosition:E};d?g+=m/2:f?g+=m+y/2:g-=p/2;let h=0;d||(f?h=-tt:h=tt);let b=g-i+h,_=Io-t;return o.style.width=`calc(${x}px - ${e} - var(--spacer-5))`,o.style.opacity=".8",o.style.transform=`translate(${_}px, calc(${b}px - 2px))`,n?.elem&&(n.elem.style.opacity="",n?.elem===r?f?n.elem.style.marginTop="":n.elem.style.marginBottom="":(n.elem.style.marginBottom="",n.elem.style.marginTop="")),W=0,{isBelow:f,willStayInSamePosition:E}}var zo="draggable-block-menu",st="application/x-lexical-drag-block",ne=1/0;function lt(e){return e===0?1/0:ne>=0&&ne<e?ne:Math.floor(e/2)}function Ho(e,t){let{transform:o}=t.style;e.setDragImage(t,0,0),setTimeout(()=>{t.style.transform=o})}function at(e,t){e&&(e.style.opacity="0"),t&&(t.style.opacity="",t.style.marginBottom="",t.style.marginTop="")}function Vo(e,t,o){let r=t.parentElement,n=re(null),c=re(null),l=re(null),s=re(!1),u=re([]),[d,m]=it(null),[a,i]=it(null),{editorConfig:x}=P(),y=x?.admin?.hideGutter?-44:-8;ke(()=>{function f(E){let h=E.target;if(!_e(h))return;let b=G(r,E.pageX,E.pageY,h);if(b===-1){m(null);return}if(xe(h,zo))return;let _=V(e),{blockElem:w,foundAtIndex:v,isFoundNodeEmptyParagraph:D}=J({anchorElem:t,cache_threshold:0,editor:e,horizontalOffset:-b,point:new K(E.x,E.y),startIndex:lt(_.length),useEdgeAsDefault:!1,verbose:!1});ne=v,!(!w&&!D)&&d!==w&&m(w)}return document?.addEventListener("mousemove",f),()=>{document?.removeEventListener("mousemove",f)}},[r,t,e,d]),ke(()=>{n.current&&Ee(d,n.current,t,y)},[t,d,y]),ke(()=>{function f(h){if(!s.current)return!1;let[b]=rt(h);if(b)return!1;let{pageY:_,target:w}=h;if(!_e(w))return!1;let v=G(r,h.pageX,h.pageY,w,100,50),D=V(e),{blockElem:S,foundAtIndex:I,isFoundNodeEmptyParagraph:R}=J({anchorElem:t,editor:e,fuzzy:!0,horizontalOffset:-v,point:new K(h.x,h.y),startIndex:lt(D.length),useEdgeAsDefault:!0,verbose:!0});ne=I;let F=c.current;if(S===null||F===null)return!1;if(h.preventDefault(),h.dataTransfer.dropEffect="move",d!==S){let{isBelow:k,willStayInSamePosition:M}=ot(x?.admin?.hideGutter?"0px":"var(--spacer-5)",y+(x?.admin?.hideGutter?n?.current?.getBoundingClientRect()?.width??0:-(n?.current?.getBoundingClientRect()?.width??0)),F,S,a,_,t,h,l,R);M||i({boundingBox:S.getBoundingClientRect(),elem:S,isBelow:k})}else a?.elem&&(at(F,a.elem),i({boundingBox:S.getBoundingClientRect(),elem:S,isBelow:!1}));return!0}function E(h){if(!s.current)return!1;let[b]=rt(h);if(b)return!1;let{dataTransfer:_,pageY:w,target:v}=h,D=_?.getData(st)||"";return e.update(()=>{let S=Ko(D);if(!S||!_e(v))return!1;let I=G(r,h.pageX,h.pageY,v,100,50),{blockElem:R,isFoundNodeEmptyParagraph:F}=J({anchorElem:t,editor:e,fuzzy:!0,horizontalOffset:-I,point:new K(h.x,h.y),useEdgeAsDefault:!0});if(!R)return!1;let k=nt(R);if(!k)return!1;if(k===S)return!0;let{height:M,top:ae}=U(R),Ne=w>=ae+M/2+window.scrollY;F?(k.insertBefore(S),k.remove()):Ne?k.insertAfter(S):k.insertBefore(S),d!==null&&m(null),document.querySelectorAll(".lexical-block-highlighter").forEach(T=>{T.remove()});let we=e.getElementByKey(S.getKey()),ce=setTimeout(()=>{let T=we?.getBoundingClientRect();if(!T)return;let N=document.createElement("div");N.className="lexical-block-highlighter",N.style.backgroundColor="var(--color-bg-inverse)",N.style.transition="opacity 0.5s ease-in-out",N.style.zIndex="1",N.style.pointerEvents="none",N.style.boxSizing="border-box",N.style.borderRadius="4px",N.style.position="absolute",document.body.appendChild(N),N.style.opacity="0.1",N.style.height=`${T.height+8}px`,N.style.width=`${T.width+8}px`,N.style.top=`${T.top+window.scrollY-4}px`,N.style.left=`${T.left-4}px`;let ue=setTimeout(()=>{N.style.opacity="0";let de=setTimeout(()=>{N.remove()},500);u.current.push(de)},1e3);u.current.push(ue)},120);u.current.push(ce)}),!0}return document.addEventListener("dragover",f),document.addEventListener("drop",E),()=>{document.removeEventListener("dragover",f),document.removeEventListener("drop",E),u.current.forEach(clearTimeout),u.current=[]}},[r,y,t,e,a,d,x?.admin?.hideGutter]);function p(f){let E=f.dataTransfer;if(!E||!d)return;Ho(E,d),E.effectAllowed="move";let h="";e.update(()=>{let b=nt(d);b&&(h=b.getKey())}),s.current=!0,E.setData(st,h)}function g(){s.current=!1,a?.elem&&at(c.current,a?.elem)}return jo(Fo(ct.Fragment,{children:[be("button",{"aria-label":"Drag to move",className:"icon draggable-block-menu",draggable:!0,onDragEnd:g,onDragStart:p,ref:n,type:"button",children:be("div",{className:o?"icon":""})}),be("div",{className:"draggable-block-target-line",ref:c}),be("div",{className:"debug-highlight",ref:l})]}),t)}function ut(e){let{anchorElem:t}=e,o=t===void 0?document.body:t,[r]=$o();return Vo(r,o,r._editable)}import{c as Wo}from"react/compiler-runtime";import{jsx as Le}from"react/jsx-runtime";import{useLexicalComposerContext as Yo}from"@lexical/react/LexicalComposerContext";import{$createParagraphNode as Go,$getRoot as Uo}from"lexical";import"react";var dt="insert-paragraph-at-end",ft=()=>{let e=Wo(2),[t]=Yo(),{editorConfig:o}=P();if(o?.admin?.hideInsertParagraphAtEnd)return null;let r;return e[0]!==t?(r=Le("div",{"aria-label":"Insert Paragraph",className:dt,onClick:()=>{t.update(Jo)},role:"button",tabIndex:0,children:Le("div",{className:`${dt}-inside`,children:Le("span",{children:"+"})})}),e[0]=t,e[1]=r):r=e[1],r};function Jo(){let e=Go();Uo().append(e),e.select()}import{c as qo}from"react/compiler-runtime";import{registerMarkdownShortcuts as Qo}from"@lexical/markdown";import{useLexicalComposerContext as Xo}from"@lexical/react/LexicalComposerContext";import*as mt from"react";var pt=()=>{let e=qo(4),{editorConfig:t}=P(),[o]=Xo(),r,n;return e[0]!==o||e[1]!==t.features.markdownTransformers?(r=()=>Qo(o,t.features.markdownTransformers??[]),n=[o,t.features.markdownTransformers],e[0]=o,e[1]=t.features.markdownTransformers,e[2]=r,e[3]=n):(r=e[2],n=e[3]),mt.useEffect(r,n),null};import{c as Zo}from"react/compiler-runtime";import{useLexicalComposerContext as er}from"@lexical/react/LexicalComposerContext.js";import{useEffect as tr}from"react";function gt(){let e=Zo(5),[t]=er(),{currentView:o,views:r}=$(),n,c;return e[0]!==o||e[1]!==t||e[2]!==r?(n=()=>{r&&(o==="default"?r.default?Se(t,r.default?.nodes):Pe(t):r[o]&&(Pe(t),Se(t,r[o]?.nodes)))},c=[t,r,o],e[0]=o,e[1]=t,e[2]=r,e[3]=n,e[4]=c):(n=e[3],c=e[4]),tr(n,c),null}import{useLexicalComposerContext as or}from"@lexical/react/LexicalComposerContext";import{$getSelection as rr,$isRangeSelection as nr,RootNode as ir}from"lexical";import{useEffect as sr}from"react";function ht(){let[e]=or();return sr(()=>e.registerNodeTransform(ir,t=>{let o=rr();if(nr(o)){let r=o.anchor.getNode(),n=o.focus.getNode();(!r.isAttached()||!n.isAttached())&&(t.selectEnd(),console.warn("updateEditor: selection has been moved to the end of the editor because the previously selected nodes have been removed and selection wasn't moved to another node. Ensure selection changes after removing/replacing a selected node."))}return!1}),[e]),null}import{useLexicalComposerContext as lr}from"@lexical/react/LexicalComposerContext";import{$getSelection as ar,COMMAND_PRIORITY_LOW as cr,SELECT_ALL_COMMAND as ur}from"lexical";import{useEffect as dr}from"react";function yt(){let[e]=lr();return dr(()=>e.registerCommand(ur,()=>{if(ar())return!1;let o=document.activeElement;return o instanceof HTMLInputElement&&o.select(),!0},cr),[e]),null}import{jsx as q,jsxs as Et}from"react/jsx-runtime";import{useLexicalComposerContext as mr}from"@lexical/react/LexicalComposerContext.js";import{useTranslation as Ct}from"@payloadcms/ui";import{useCallback as pr,useMemo as gr,useState as hr}from"react";import"react";import*as bt from"react-dom";import{c as fr}from"react/compiler-runtime";import"react";function xt(e,t){let o=fr(4),{maxLength:r,minLength:n}=t,c=r===void 0?75:r,l=n===void 0?1:n,s;return o[0]!==c||o[1]!==l||o[2]!==e?(s=u=>{let{query:d}=u,m="[^"+e+Oe+"\\s]",i=new RegExp("(^|\\s|\\()(["+e+"]((?:"+m+"){0,"+c+"}))$").exec(d);if(i!==null){let x=i[1],y=i[3];if(y.length>=l)return{leadOffset:i.index+x.length,matchingString:y,replaceableString:i[2]}}return null},o[0]=c,o[1]=l,o[2]=e,o[3]=s):s=o[3],s}var O="slash-menu-popup";function yr({isSelected:e,item:t,onClick:o,onMouseEnter:r,ref:n}){let{fieldProps:{featureClientSchemaMap:c,schemaPath:l}}=P(),{i18n:s}=Ct(),u=`${O}__item ${O}__item-${t.key}`;e&&(u+=` ${O}__item--selected`);let d=t.key;return t.label&&(d=typeof t.label=="function"?t.label({featureClientSchemaMap:c,i18n:s,schemaPath:l}):t.label),d.length>25&&(d=d.substring(0,25)+"..."),Et("button",{"aria-selected":e,className:u,id:O+"__item-"+t.key,onClick:o,onMouseEnter:r,ref:n,role:"option",tabIndex:-1,type:"button",children:[t?.Icon&&q(t.Icon,{}),q("span",{className:`${O}__item-text`,children:d})]},t.key)}function Nt({anchorElem:e=document.body}){let[t]=mr(),[o,r]=hr(null),{editorConfig:n}=P(),{i18n:c}=Ct(),{fieldProps:{featureClientSchemaMap:l,schemaPath:s}}=P(),u=xt("/",{minLength:0}),d=pr(()=>{let a=[];for(let i of n.features.slashMenu.dynamicGroups)if(o){let x=i({editor:t,queryString:o});a=a.concat(x)}return a},[t,o,n?.features]),m=gr(()=>{let a=[];for(let i of n?.features.slashMenu.groups??[])a.push(i);if(o){let i=o.toLowerCase().replace(/[\s\-_]/g,"");a=a.map(y=>{let p=y.items.filter(g=>{let f=g.key;return g.label&&(f=typeof g.label=="function"?g.label({featureClientSchemaMap:l,i18n:c,schemaPath:s}):g.label),new RegExp(o,"gi").exec(f)||f.toLowerCase().replace(/[\s\-_]/g,"").includes(i)?!0:g.keywords!=null?g.keywords.some(h=>new RegExp(o,"gi").exec(h)?!0:h.toLowerCase().replace(/[\s\-_]/g,"").includes(i)):!1});return p.length?{...y,items:p}:null}),a=a.filter(y=>y!=null);let x=d();for(let y of x){let p=a.find(g=>g.key===y.key);p?a=a.filter(g=>g.key!==y.key):p={...y,items:[]},p?.items?.length&&(p.items=p.items.concat(p.items)),a.push(p)}}return a},[o,n?.features.slashMenu.groups,d,l,c,s]);return q(Fe,{anchorElem:e,groups:m,menuRenderFn:(a,{selectedItemKey:i,selectItemAndCleanUp:x,setSelectedItemKey:y})=>a.current&&m.length?bt.createPortal(q("div",{className:O,"data-theme":"dark",children:m.map(p=>{let g=p.key;return p.label&&l&&(g=typeof p.label=="function"?p.label({featureClientSchemaMap:l,i18n:c,schemaPath:s}):p.label),Et("div",{className:`${O}__group ${O}__group-${p.key}`,children:[q("div",{className:`${O}__group-title`,children:g}),p.items.map((f,E)=>q(yr,{index:E,isSelected:i===f.key,item:f,onClick:()=>{y(f.key),x(f)},onMouseEnter:()=>{y(f.key)},ref:h=>{f.ref={current:h}}},f.key))]},p.key)})}),a.current):null,onQueryChange:r,triggerFn:u})}import{c as xr}from"react/compiler-runtime";import{useLexicalComposerContext as Er}from"@lexical/react/LexicalComposerContext";import{TEXT_TYPE_TO_FORMAT as Cr,TextNode as br}from"lexical";import{useEffect as Nr}from"react";function wt(e){let t=xr(6),{features:o}=e,[r]=Er(),n;t[0]!==r||t[1]!==o.enabledFormats?(n=()=>{let l=wr(o.enabledFormats);if(l.length!==0)return r.registerNodeTransform(br,s=>{l.forEach(u=>{s.hasFormat(u)&&s.toggleFormat(u)})})},t[0]=r,t[1]=o.enabledFormats,t[2]=n):n=t[2];let c;return t[3]!==r||t[4]!==o?(c=[r,o],t[3]=r,t[4]=o,t[5]=c):c=t[5],Nr(n,c),null}function wr(e){let t=Object.keys(Cr),o=new Set(e);return t.filter(r=>!o.has(r))}import{c as Sr}from"react/compiler-runtime";import{jsx as St}from"react/jsx-runtime";import{useLexicalComposerContext as Pr}from"@lexical/react/LexicalComposerContext";import{ContentEditable as Tr}from"@lexical/react/LexicalContentEditable.js";import{useTranslation as Rr}from"@payloadcms/ui";import"react";function Pt(e){let t=Sr(5),{className:o,editorConfig:r}=e,{t:n}=Rr(),[,c]=Pr(),{getTheme:l}=c,s;if(t[0]!==o||t[1]!==r?.admin?.placeholder||t[2]!==l||t[3]!==n){let u=l();s=St(Tr,{"aria-placeholder":n("lexical:general:placeholder"),className:o??"ContentEditable__root",placeholder:St("p",{className:u?.placeholder,children:r?.admin?.placeholder??n("lexical:general:placeholder")})}),t[0]=o,t[1]=r?.admin?.placeholder,t[2]=l,t[3]=n,t[4]=s}else s=t[4];return s}var Rt=e=>{let t=vr(13),{editorConfig:o,editorContainerRef:r,isSmallWidthViewport:n,onChange:c,rtl:l}=e,s=P(),[u]=_r(),d=Ar(),[m,a]=Fr(null),i;t[0]===Symbol.for("react.memo_cache_sentinel")?(i=f=>{f!==null&&a(f)},t[0]=i):i=t[0];let x=i,y,p;t[1]!==u||t[2]!==s?(y=()=>{if(!s?.uuid){console.error("Lexical Editor must be used within an EditorConfigProvider");return}s?.parentEditor?.uuid&&s.parentEditor?.registerChild(s.uuid,s);let f=()=>{s.focusEditor(s)},E=()=>{s.blurEditor(s)},h=u.registerCommand(Or,()=>(f(),!0),Tt),b=u.registerCommand(Br,()=>(E(),!0),Tt);return()=>{h(),b(),s.parentEditor?.unregisterChild?.(s.uuid)}},p=[u,s],t[1]=u,t[2]=s,t[3]=y,t[4]=p):(y=t[3],p=t[4]),Ir(y,p);let g;return t[5]!==o||t[6]!==r||t[7]!==m||t[8]!==d||t[9]!==n||t[10]!==c||t[11]!==l?(g=ie(Q.Fragment,{children:[o.features.plugins?.map($r),ie("div",{className:"editor-container",dir:l?"rtl":void 0,ref:r,children:[o.features.plugins?.map(Kr),C(Mr,{contentEditable:C("div",{className:"editor-scroller",children:C("div",{className:"editor",ref:x,children:C(Pt,{editorConfig:o})})}),ErrorBoundary:kr}),C(ht,{}),d&&C(ft,{}),C(Ge,{}),C(Ve,{}),C(wt,{features:o.features}),C(yt,{}),C(gt,{}),d&&C(Dr,{ignoreSelectionChange:!0,onChange:(f,E,h)=>{(!h.has("focus")||h.size>1)&&c?.(f,E,h)}}),m&&ie(Q.Fragment,{children:[!n&&d&&ie(Q.Fragment,{children:[o.admin?.hideDraggableBlockElement?null:C(ut,{anchorElem:m}),o.admin?.hideAddBlockButton?null:C(et,{anchorElem:m})]}),o.features.plugins?.map(f=>{if(f.position==="floatingAnchorElem"&&!(f.desktopOnly===!0&&n))return C(z,{anchorElem:m,clientProps:f.clientProps,plugin:f},f.key)}),d&&C(Q.Fragment,{children:C(Nt,{anchorElem:m})})]}),d&&ie(Q.Fragment,{children:[C(Lr,{}),o?.features?.markdownTransformers?.length>0&&C(pt,{})]}),o.features.plugins?.map(jr),o.features.plugins?.map(zr)]}),o.features.plugins?.map(Hr)]}),t[5]=o,t[6]=r,t[7]=m,t[8]=d,t[9]=n,t[10]=c,t[11]=l,t[12]=g):g=t[12],g};function $r(e){if(e.position==="aboveContainer")return C(z,{clientProps:e.clientProps,plugin:e},e.key)}function Kr(e){if(e.position==="top")return C(z,{clientProps:e.clientProps,plugin:e},e.key)}function jr(e){if(e.position==="normal")return C(z,{clientProps:e.clientProps,plugin:e},e.key)}function zr(e){if(e.position==="bottom")return C(z,{clientProps:e.clientProps,plugin:e},e.key)}function Hr(e){if(e.position==="belowContainer")return C(z,{clientProps:e.clientProps,plugin:e},e.key)}var _t=({children:e,providers:t})=>{if(!t?.length)return e;let o=t[0];return t.length>1?j(o,{children:j(_t,{providers:t.slice(1),children:e})}):j(o,{children:e})},kt=e=>{let{composerKey:t,editorConfig:o,fieldProps:r,isSmallWidthViewport:n,onChange:c,readOnly:l,rtl:s,value:u}=e,{currentView:d,views:m}=$(),a=P(),i=Wr(),x=vt.useRef(null),y=Yr(()=>{if(u&&typeof u!="object")throw new Error("The value passed to the Lexical editor is not an object. This is not supported. Please remove the data from the field and start again. This is the value that was passed in: "+JSON.stringify(u));if(u&&Array.isArray(u)&&!("root"in u))throw new Error("You have tried to pass in data from the old Slate editor to the new Lexical editor. The data structure is different, thus you will have to migrate your data. We offer a one-line migration script which migrates all your rich text fields: https://payloadcms.com/docs/lexical/migration#migration-via-migration-script-recommended");if(u&&"jsonContent"in u)throw new Error("You have tried to pass in data from payload-plugin-lexical. The data structure is different, thus you will have to migrate your data. Migration guide: https://payloadcms.com/docs/lexical/migration#migrating-from-payload-plugin-lexical");let p=m?.[d]?.nodes;return{editable:l!==!0,editorState:u!=null?JSON.stringify(u):void 0,namespace:o.lexical.namespace,nodes:Ke({editorConfig:o,nodeViews:p}),onError:g=>{throw g},theme:o.lexical.theme}},[o,m,d]);return y?j(Vr,{initialConfig:y,children:j(Ae,{editorConfig:o,editorContainerRef:x,fieldProps:r,parentContext:a?.editDepth===i?a:void 0,children:j(_t,{providers:o.features.providers,children:j(Rt,{editorConfig:o,editorContainerRef:x,isSmallWidthViewport:n,onChange:c,rtl:s})})})},t+y.editable+d):j("p",{children:"Loading..."})};import{c as Gr}from"react/compiler-runtime";import{jsx as X,jsxs as Ur}from"react/jsx-runtime";import{ChevronIcon as Jr,Popup as qr,PopupList as Lt}from"@payloadcms/ui";import"react";function Dt(){let e=Gr(5),{currentView:t,setCurrentView:o,views:r}=$();if(!r||Object.keys(r).length===0)return null;let n,c;if(e[0]!==t||e[1]!==o||e[2]!==r){c=Symbol.for("react.early_return_sentinel");e:{let l=Object.keys(r);if(!l.some(Xr)){c=null;break e}let u=["default",...l.filter(Qr)],d=t.charAt(0).toUpperCase()+t.slice(1);n=X("div",{className:"lexical-view-selector",children:X(qr,{button:Ur("button",{className:"lexical-view-selector__button",type:"button",children:[X("span",{className:"lexical-view-selector__label",children:d}),X(Jr,{className:"lexical-view-selector__icon"})]}),buttonType:"custom",horizontalAlign:"left",render:m=>{let{close:a}=m;return X(Lt.ButtonGroup,{children:u.map(i=>{let x=i.charAt(0).toUpperCase()+i.slice(1);return X(Lt.Button,{active:i===t,disabled:i===t,onClick:()=>{o?.(i),a()},children:x},i)})})},size:"large"})})}e[0]=t,e[1]=o,e[2]=r,e[3]=n,e[4]=c}else n=e[3],c=e[4];return c!==Symbol.for("react.early_return_sentinel")?c:n}function Qr(e){return e!=="default"}function Xr(e){return e!=="default"}var se="rich-text-lexical",pn=e=>{let{editorConfig:t,field:o,field:{admin:{className:r,description:n,readOnly:c}={},label:l,localized:s,required:u},path:d,readOnly:m,schemaPath:a,validate:i}=e,x=m||c,y=cn(),{config:{localization:p}}=nn(),g=rn({fieldLocalized:s,locale:y,localizationConfig:p||void 0}),f=sn(),{isControlledByParent:E}=$(),h=Bt((A,ee)=>typeof i=="function"?i(A,{...ee,required:u}):!0,[i,u]),{customComponents:{AfterInput:b,BeforeInput:_,Description:w,Error:v,Label:D}={},disabled:S,initialValue:I,path:R,setValue:F,showError:k,value:M}=an({potentiallyStalePath:d,validate:h}),ae=x||S,[Z,Ne]=It(!1),[De,we]=It(),ce=At.useRef(I),T=At.useRef(M);Ot(()=>{let A=()=>{let ee=window.matchMedia("(max-width: 768px)").matches;ee!==Z&&Ne(ee)};return A(),window.addEventListener("resize",A),()=>{window.removeEventListener("resize",A)}},[Z]);let N=["field-type",se,r,k&&"error",ae&&`${se}--read-only`,t?.admin?.hideGutter!==!0&&!Z?`${se}--show-gutter`:null].filter(Boolean).join(" "),ue=`${R}.${f}`,de=Be(),Ft=Bt(A=>{de(()=>{let Me=A.toJSON();T.current=Me,F(Me)})},[F,de]),$t=fn(()=>un(o),[o]),Kt=ln(A=>{T.current!==M&&!dn(T.current!=null?JSON.parse(JSON.stringify(T.current)):T.current,M)&&(ce.current=A,T.current=M,we(new Date))});return Ot(()=>{Object.is(I,ce.current)||Kt(I)},[I]),le("div",{className:N,"data-field-path":R,"data-field-schemapath":a,"data-lexical-view":t?.view,style:$t,children:[le("div",{className:`${se}__label-row`,children:[D||L(on,{label:l,localized:s,path:R,required:u}),!E&&L(Dt,{})]}),le("div",{className:`${se}__wrap`,children:[L(Mt,{CustomComponent:v,Fallback:L(tn,{path:R,showError:k})}),le(mn,{fallbackRender:gn,onReset:()=>{},children:[_,L(Zr,{modalSlugPrefix:`lexical-${R}`,children:L(kt,{composerKey:ue,editorConfig:t,fieldProps:e,isSmallWidthViewport:Z,onChange:Ft,readOnly:ae,rtl:g,value:M},JSON.stringify({path:R,rerenderProviderKey:De}))}),b]}),L(Mt,{CustomComponent:w,Fallback:L(en,{description:n,path:R})})]})]},ue)};function gn({error:e}){return le("div",{className:"errorBoundary",role:"alert",children:[L("p",{children:"Something went wrong:"}),L("pre",{style:{color:"red"},children:e instanceof Error?e.message:String(e)})]})}var Pl=pn;export{Pl as RichText};
|
|
2
|
-
//# sourceMappingURL=Field-XH5C4HFU.js.map
|