@payloadcms/richtext-lexical 3.0.0-canary.fb81f02 → 3.0.0
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/LICENSE.md +1 -1
- package/dist/cell/rscEntry.d.ts +12 -0
- package/dist/cell/rscEntry.d.ts.map +1 -0
- package/dist/cell/rscEntry.js +82 -0
- package/dist/cell/rscEntry.js.map +1 -0
- package/dist/exports/client/Component-DOSSWC76.js +2 -0
- package/dist/exports/client/Component-DOSSWC76.js.map +7 -0
- package/dist/exports/client/Component-MBLHTKDK.js +2 -0
- package/dist/exports/client/Component-MBLHTKDK.js.map +7 -0
- package/dist/exports/client/Field-KKSJXHR7.js +2 -0
- package/dist/exports/client/Field-KKSJXHR7.js.map +7 -0
- package/dist/exports/client/RelationshipComponent-2RT3YXUT.js +2 -0
- package/dist/exports/client/RelationshipComponent-2RT3YXUT.js.map +7 -0
- package/dist/exports/client/bundled.css +1 -1
- package/dist/exports/client/chunk-2CYU43GM.js +2 -0
- package/dist/exports/client/chunk-2CYU43GM.js.map +7 -0
- package/dist/exports/client/chunk-5PBXL4HT.js +2 -0
- package/dist/exports/client/chunk-5PBXL4HT.js.map +7 -0
- package/dist/exports/client/chunk-C7S3V4EB.js +2 -0
- package/dist/exports/client/chunk-C7S3V4EB.js.map +7 -0
- package/dist/exports/client/chunk-CUIBIFW2.js +2 -0
- package/dist/exports/client/chunk-CUIBIFW2.js.map +7 -0
- package/dist/exports/client/chunk-MI5HS4QX.js +2 -0
- package/dist/exports/client/chunk-MI5HS4QX.js.map +7 -0
- package/dist/exports/client/chunk-QPPOQTHD.js +2 -0
- package/dist/exports/client/chunk-QPPOQTHD.js.map +7 -0
- package/dist/exports/client/chunk-U7O7EYCP.js +2 -0
- package/dist/exports/client/chunk-U7O7EYCP.js.map +7 -0
- package/dist/exports/client/chunk-XCEM47RI.js +3 -0
- package/dist/exports/client/chunk-XCEM47RI.js.map +7 -0
- package/dist/exports/client/component-ANB7VZLA.js +2 -0
- package/dist/exports/client/component-ANB7VZLA.js.map +7 -0
- package/dist/exports/client/component-H3EYQ5KG.js +2 -0
- package/dist/exports/client/component-H3EYQ5KG.js.map +7 -0
- package/dist/exports/client/componentInline-ZGO3K4TA.js +2 -0
- package/dist/exports/client/componentInline-ZGO3K4TA.js.map +7 -0
- package/dist/exports/client/index.d.ts +31 -26
- package/dist/exports/client/index.d.ts.map +1 -1
- package/dist/exports/client/index.js +11 -9
- package/dist/exports/client/index.js.map +4 -4
- package/dist/exports/server/ast/mdx.d.ts +7 -0
- package/dist/exports/server/ast/mdx.d.ts.map +1 -0
- package/dist/exports/server/ast/mdx.js +37 -0
- package/dist/exports/server/ast/mdx.js.map +1 -0
- package/dist/exports/server/migrate.d.ts +16 -0
- package/dist/exports/server/migrate.d.ts.map +1 -0
- package/dist/exports/server/migrate.js +16 -0
- package/dist/exports/server/migrate.js.map +1 -0
- package/dist/exports/server/rsc.d.ts +3 -0
- package/dist/exports/server/rsc.d.ts.map +1 -0
- package/dist/exports/server/rsc.js +3 -0
- package/dist/exports/server/rsc.js.map +1 -0
- package/dist/exports/shared.d.ts +4 -0
- package/dist/exports/shared.d.ts.map +1 -0
- package/dist/exports/shared.js +4 -0
- package/dist/exports/shared.js.map +1 -0
- package/dist/features/align/client/index.d.ts +2 -0
- package/dist/features/align/client/index.d.ts.map +1 -0
- package/dist/features/align/client/index.js +163 -0
- package/dist/features/align/client/index.js.map +1 -0
- package/dist/features/align/client/toolbarAlignGroup.d.ts +3 -0
- package/dist/features/align/client/toolbarAlignGroup.d.ts.map +1 -0
- package/dist/features/align/client/toolbarAlignGroup.js +13 -0
- package/dist/features/align/client/toolbarAlignGroup.js.map +1 -0
- package/dist/features/align/server/i18n.d.ts.map +1 -0
- package/dist/features/align/server/i18n.js +195 -0
- package/dist/features/align/server/i18n.js.map +1 -0
- package/dist/features/align/server/index.d.ts +2 -0
- package/dist/features/align/server/index.d.ts.map +1 -0
- package/dist/features/align/server/index.js +10 -0
- package/dist/features/align/server/index.js.map +1 -0
- package/dist/features/blockquote/client/index.d.ts +2 -0
- package/dist/features/blockquote/client/index.d.ts.map +1 -0
- package/dist/features/blockquote/client/index.js +72 -0
- package/dist/features/blockquote/client/index.js.map +1 -0
- package/dist/features/blockquote/markdownTransformer.js +28 -34
- package/dist/features/blockquote/markdownTransformer.js.map +1 -1
- package/dist/features/blockquote/server/i18n.d.ts.map +1 -0
- package/dist/features/blockquote/server/i18n.js +99 -0
- package/dist/features/blockquote/server/i18n.js.map +1 -0
- package/dist/features/blockquote/server/index.d.ts +7 -0
- package/dist/features/blockquote/server/index.d.ts.map +1 -0
- package/dist/features/blockquote/server/index.js +51 -0
- package/dist/features/blockquote/server/index.js.map +1 -0
- package/dist/features/blocks/client/component/BlockContent.d.ts +48 -0
- package/dist/features/blocks/client/component/BlockContent.d.ts.map +1 -0
- package/dist/features/blocks/client/component/BlockContent.js +88 -0
- package/dist/features/blocks/client/component/BlockContent.js.map +1 -0
- package/dist/features/blocks/client/component/components/BlockCollapsible.d.ts +11 -0
- package/dist/features/blocks/client/component/components/BlockCollapsible.d.ts.map +1 -0
- package/dist/features/blocks/client/component/components/BlockCollapsible.js +37 -0
- package/dist/features/blocks/client/component/components/BlockCollapsible.js.map +1 -0
- package/dist/features/blocks/client/component/components/BlockEditButton.d.ts +3 -0
- package/dist/features/blocks/client/component/components/BlockEditButton.d.ts.map +1 -0
- package/dist/features/blocks/client/component/components/BlockEditButton.js +22 -0
- package/dist/features/blocks/client/component/components/BlockEditButton.js.map +1 -0
- package/dist/features/blocks/client/component/components/BlockRemoveButton.d.ts +3 -0
- package/dist/features/blocks/client/component/components/BlockRemoveButton.d.ts.map +1 -0
- package/dist/features/blocks/client/component/components/BlockRemoveButton.js +22 -0
- package/dist/features/blocks/client/component/components/BlockRemoveButton.js.map +1 -0
- package/dist/features/blocks/client/component/index.d.ts +11 -0
- package/dist/features/blocks/client/component/index.d.ts.map +1 -0
- package/dist/features/blocks/client/component/index.js +346 -0
- package/dist/features/blocks/client/component/index.js.map +1 -0
- package/dist/features/blocks/client/component/removeEmptyArrayValues.d.ts.map +1 -0
- package/dist/features/blocks/client/component/removeEmptyArrayValues.js +20 -0
- package/dist/features/blocks/client/component/removeEmptyArrayValues.js.map +1 -0
- package/dist/features/blocks/client/componentInline/components/InlineBlockContainer.d.ts +5 -0
- package/dist/features/blocks/client/componentInline/components/InlineBlockContainer.d.ts.map +1 -0
- package/dist/features/blocks/client/componentInline/components/InlineBlockContainer.js +28 -0
- package/dist/features/blocks/client/componentInline/components/InlineBlockContainer.js.map +1 -0
- package/dist/features/blocks/client/componentInline/components/InlineBlockEditButton.d.ts +3 -0
- package/dist/features/blocks/client/componentInline/components/InlineBlockEditButton.d.ts.map +1 -0
- package/dist/features/blocks/client/componentInline/components/InlineBlockEditButton.js +22 -0
- package/dist/features/blocks/client/componentInline/components/InlineBlockEditButton.js.map +1 -0
- package/dist/features/blocks/client/componentInline/components/InlineBlockLabel.d.ts +3 -0
- package/dist/features/blocks/client/componentInline/components/InlineBlockLabel.d.ts.map +1 -0
- package/dist/features/blocks/client/componentInline/components/InlineBlockLabel.js +22 -0
- package/dist/features/blocks/client/componentInline/components/InlineBlockLabel.js.map +1 -0
- package/dist/features/blocks/client/componentInline/components/InlineBlockRemoveButton.d.ts +3 -0
- package/dist/features/blocks/client/componentInline/components/InlineBlockRemoveButton.d.ts.map +1 -0
- package/dist/features/blocks/client/componentInline/components/InlineBlockRemoveButton.js +22 -0
- package/dist/features/blocks/client/componentInline/components/InlineBlockRemoveButton.js.map +1 -0
- package/dist/features/blocks/client/componentInline/index.d.ts +22 -0
- package/dist/features/blocks/client/componentInline/index.d.ts.map +1 -0
- package/dist/features/blocks/client/componentInline/index.js +296 -0
- package/dist/features/blocks/client/componentInline/index.js.map +1 -0
- package/dist/features/blocks/client/index.d.ts +2 -0
- package/dist/features/blocks/client/index.d.ts.map +1 -0
- package/dist/features/blocks/client/index.js +152 -0
- package/dist/features/blocks/client/index.js.map +1 -0
- package/dist/features/blocks/client/markdownTransformer.d.ts +16 -0
- package/dist/features/blocks/client/markdownTransformer.d.ts.map +1 -0
- package/dist/features/blocks/client/markdownTransformer.js +144 -0
- package/dist/features/blocks/client/markdownTransformer.js.map +1 -0
- package/dist/features/blocks/client/nodes/BlocksNode.d.ts +14 -0
- package/dist/features/blocks/client/nodes/BlocksNode.d.ts.map +1 -0
- package/dist/features/blocks/client/nodes/BlocksNode.js +51 -0
- package/dist/features/blocks/client/nodes/BlocksNode.js.map +1 -0
- package/dist/features/blocks/client/nodes/InlineBlocksNode.d.ts +25 -0
- package/dist/features/blocks/client/nodes/InlineBlocksNode.d.ts.map +1 -0
- package/dist/features/blocks/client/nodes/InlineBlocksNode.js +42 -0
- package/dist/features/blocks/client/nodes/InlineBlocksNode.js.map +1 -0
- package/dist/features/blocks/client/plugin/commands.d.ts +5 -0
- package/dist/features/blocks/client/plugin/commands.d.ts.map +1 -0
- package/dist/features/blocks/client/plugin/commands.js +6 -0
- package/dist/features/blocks/client/plugin/commands.js.map +1 -0
- package/dist/features/blocks/client/plugin/index.d.ts +5 -0
- package/dist/features/blocks/client/plugin/index.d.ts.map +1 -0
- package/dist/features/blocks/client/plugin/index.js +98 -0
- package/dist/features/blocks/client/plugin/index.js.map +1 -0
- package/dist/features/blocks/server/graphQLPopulationPromise.d.ts +6 -0
- package/dist/features/blocks/server/graphQLPopulationPromise.d.ts.map +1 -0
- package/dist/features/blocks/server/graphQLPopulationPromise.js +44 -0
- package/dist/features/blocks/server/graphQLPopulationPromise.js.map +1 -0
- package/dist/features/blocks/server/i18n.d.ts.map +1 -0
- package/dist/features/blocks/server/i18n.js +291 -0
- package/dist/features/blocks/server/i18n.js.map +1 -0
- package/dist/features/blocks/server/index.d.ts +7 -0
- package/dist/features/blocks/server/index.d.ts.map +1 -0
- package/dist/features/blocks/server/index.js +197 -0
- package/dist/features/blocks/server/index.js.map +1 -0
- package/dist/features/blocks/server/linesFromMatchToContentAndPropsString.d.ts +22 -0
- package/dist/features/blocks/server/linesFromMatchToContentAndPropsString.d.ts.map +1 -0
- package/dist/features/blocks/server/linesFromMatchToContentAndPropsString.js +136 -0
- package/dist/features/blocks/server/linesFromMatchToContentAndPropsString.js.map +1 -0
- package/dist/features/blocks/server/markdownTransformer.d.ts +22 -0
- package/dist/features/blocks/server/markdownTransformer.d.ts.map +1 -0
- package/dist/features/blocks/server/markdownTransformer.js +400 -0
- package/dist/features/blocks/server/markdownTransformer.js.map +1 -0
- package/dist/features/blocks/server/nodes/BlocksNode.d.ts +44 -0
- package/dist/features/blocks/server/nodes/BlocksNode.d.ts.map +1 -0
- package/dist/features/blocks/server/nodes/BlocksNode.js +87 -0
- package/dist/features/blocks/server/nodes/BlocksNode.js.map +1 -0
- package/dist/features/blocks/server/nodes/InlineBlocksNode.d.ts +40 -0
- package/dist/features/blocks/server/nodes/InlineBlocksNode.d.ts.map +1 -0
- package/dist/features/blocks/server/nodes/InlineBlocksNode.js +88 -0
- package/dist/features/blocks/server/nodes/InlineBlocksNode.js.map +1 -0
- package/dist/features/blocks/server/validate.d.ts +6 -0
- package/dist/features/blocks/server/validate.d.ts.map +1 -0
- package/dist/features/blocks/server/validate.js +51 -0
- package/dist/features/blocks/server/validate.js.map +1 -0
- package/dist/features/converters/html/converter/converters/linebreak.js +4 -7
- package/dist/features/converters/html/converter/converters/linebreak.js.map +1 -1
- package/dist/features/converters/html/converter/converters/paragraph.d.ts.map +1 -1
- package/dist/features/converters/html/converter/converters/paragraph.js +28 -19
- package/dist/features/converters/html/converter/converters/paragraph.js.map +1 -1
- package/dist/features/converters/html/converter/converters/text.d.ts.map +1 -1
- package/dist/features/converters/html/converter/converters/text.js +29 -29
- package/dist/features/converters/html/converter/converters/text.js.map +1 -1
- package/dist/features/converters/html/converter/defaultConverters.js +1 -6
- package/dist/features/converters/html/converter/defaultConverters.js.map +1 -1
- package/dist/features/converters/html/converter/index.d.ts +11 -7
- package/dist/features/converters/html/converter/index.d.ts.map +1 -1
- package/dist/features/converters/html/converter/index.js +82 -51
- package/dist/features/converters/html/converter/index.js.map +1 -1
- package/dist/features/converters/html/converter/types.d.ts +3 -1
- package/dist/features/converters/html/converter/types.d.ts.map +1 -1
- package/dist/features/converters/html/converter/types.js +1 -2
- package/dist/features/converters/html/converter/types.js.map +1 -1
- package/dist/features/converters/html/field/index.d.ts.map +1 -1
- package/dist/features/converters/html/field/index.js +140 -139
- package/dist/features/converters/html/field/index.js.map +1 -1
- package/dist/features/converters/html/index.d.ts +8 -0
- package/dist/features/converters/html/index.d.ts.map +1 -0
- package/dist/features/converters/html/index.js +7 -0
- package/dist/features/converters/html/index.js.map +1 -0
- package/dist/features/debug/testRecorder/client/index.d.ts +2 -0
- package/dist/features/debug/testRecorder/client/index.d.ts.map +1 -0
- package/dist/features/debug/testRecorder/client/index.js +11 -0
- package/dist/features/debug/testRecorder/client/index.js.map +1 -0
- package/dist/features/debug/testRecorder/client/plugin/index.d.ts +5 -0
- package/dist/features/debug/testRecorder/client/plugin/index.d.ts.map +1 -0
- package/dist/features/debug/testRecorder/client/plugin/index.js +422 -0
- package/dist/features/debug/testRecorder/client/plugin/index.js.map +1 -0
- package/dist/features/debug/testRecorder/server/index.d.ts +2 -0
- package/dist/features/debug/testRecorder/server/index.d.ts.map +1 -0
- package/dist/features/debug/testRecorder/server/index.js +8 -0
- package/dist/features/debug/testRecorder/server/index.js.map +1 -0
- package/dist/features/debug/treeView/client/index.d.ts +2 -0
- package/dist/features/debug/treeView/client/index.d.ts.map +1 -0
- package/dist/features/debug/treeView/client/index.js +11 -0
- package/dist/features/debug/treeView/client/index.js.map +1 -0
- package/dist/features/debug/treeView/client/plugin/index.d.ts +4 -0
- package/dist/features/debug/treeView/client/plugin/index.d.ts.map +1 -0
- package/dist/features/debug/treeView/client/plugin/index.js +29 -0
- package/dist/features/debug/treeView/client/plugin/index.js.map +1 -0
- package/dist/features/debug/treeView/server/index.d.ts +2 -0
- package/dist/features/debug/treeView/server/index.d.ts.map +1 -0
- package/dist/features/debug/treeView/server/index.js +8 -0
- package/dist/features/debug/treeView/server/index.js.map +1 -0
- package/dist/features/experimental_table/client/index.d.ts +2 -0
- package/dist/features/experimental_table/client/index.d.ts.map +1 -0
- package/dist/features/experimental_table/client/index.js +56 -0
- package/dist/features/experimental_table/client/index.js.map +1 -0
- package/dist/features/experimental_table/client/plugins/TableActionMenuPlugin/index.d.ts +4 -0
- package/dist/features/experimental_table/client/plugins/TableActionMenuPlugin/index.d.ts.map +1 -0
- package/dist/features/experimental_table/client/plugins/TableActionMenuPlugin/index.js +521 -0
- package/dist/features/experimental_table/client/plugins/TableActionMenuPlugin/index.js.map +1 -0
- package/dist/features/experimental_table/client/plugins/TableCellResizerPlugin/index.d.ts +3 -0
- package/dist/features/experimental_table/client/plugins/TableCellResizerPlugin/index.d.ts.map +1 -0
- package/dist/features/experimental_table/client/plugins/TableCellResizerPlugin/index.js +321 -0
- package/dist/features/experimental_table/client/plugins/TableCellResizerPlugin/index.js.map +1 -0
- package/dist/features/experimental_table/client/plugins/TableHoverActionsPlugin/index.d.ts +5 -0
- package/dist/features/experimental_table/client/plugins/TableHoverActionsPlugin/index.d.ts.map +1 -0
- package/dist/features/experimental_table/client/plugins/TableHoverActionsPlugin/index.js +225 -0
- package/dist/features/experimental_table/client/plugins/TableHoverActionsPlugin/index.js.map +1 -0
- package/dist/features/experimental_table/client/plugins/TablePlugin/index.d.ts +24 -0
- package/dist/features/experimental_table/client/plugins/TablePlugin/index.d.ts.map +1 -0
- package/dist/features/experimental_table/client/plugins/TablePlugin/index.js +152 -0
- package/dist/features/experimental_table/client/plugins/TablePlugin/index.js.map +1 -0
- package/dist/features/experimental_table/client/utils/debounce.d.ts.map +1 -0
- package/dist/features/experimental_table/client/utils/debounce.js +221 -0
- package/dist/features/experimental_table/client/utils/debounce.js.map +1 -0
- package/dist/features/experimental_table/client/utils/useDebounce.d.ts.map +1 -0
- package/dist/features/experimental_table/client/utils/useDebounce.js +16 -0
- package/dist/features/experimental_table/client/utils/useDebounce.js.map +1 -0
- package/dist/features/experimental_table/markdownTransformer.d.ts +5 -0
- package/dist/features/experimental_table/markdownTransformer.d.ts.map +1 -0
- package/dist/features/experimental_table/markdownTransformer.js +127 -0
- package/dist/features/experimental_table/markdownTransformer.js.map +1 -0
- package/dist/features/experimental_table/server/index.d.ts +13 -0
- package/dist/features/experimental_table/server/index.d.ts.map +1 -0
- package/dist/features/experimental_table/server/index.js +154 -0
- package/dist/features/experimental_table/server/index.js.map +1 -0
- package/dist/features/format/bold/feature.client.d.ts +1 -4
- package/dist/features/format/bold/feature.client.d.ts.map +1 -1
- package/dist/features/format/bold/feature.client.js +35 -35
- package/dist/features/format/bold/feature.client.js.map +1 -1
- package/dist/features/format/bold/feature.server.d.ts.map +1 -1
- package/dist/features/format/bold/feature.server.js +14 -20
- package/dist/features/format/bold/feature.server.js.map +1 -1
- package/dist/features/format/bold/markdownTransformers.js +14 -25
- package/dist/features/format/bold/markdownTransformers.js.map +1 -1
- package/dist/features/format/inlineCode/feature.client.d.ts +1 -4
- package/dist/features/format/inlineCode/feature.client.d.ts.map +1 -1
- package/dist/features/format/inlineCode/feature.client.js +27 -28
- package/dist/features/format/inlineCode/feature.client.js.map +1 -1
- package/dist/features/format/inlineCode/feature.server.d.ts.map +1 -1
- package/dist/features/format/inlineCode/feature.server.js +5 -10
- package/dist/features/format/inlineCode/feature.server.js.map +1 -1
- package/dist/features/format/inlineCode/markdownTransformers.js +3 -6
- package/dist/features/format/inlineCode/markdownTransformers.js.map +1 -1
- package/dist/features/format/italic/feature.client.d.ts +1 -4
- package/dist/features/format/italic/feature.client.d.ts.map +1 -1
- package/dist/features/format/italic/feature.client.js +27 -29
- package/dist/features/format/italic/feature.client.js.map +1 -1
- package/dist/features/format/italic/feature.server.d.ts.map +1 -1
- package/dist/features/format/italic/feature.server.js +5 -11
- package/dist/features/format/italic/feature.server.js.map +1 -1
- package/dist/features/format/italic/markdownTransformers.js +7 -12
- package/dist/features/format/italic/markdownTransformers.js.map +1 -1
- package/dist/features/format/shared/toolbarFormatGroup.d.ts.map +1 -1
- package/dist/features/format/shared/toolbarFormatGroup.js +9 -8
- package/dist/features/format/shared/toolbarFormatGroup.js.map +1 -1
- package/dist/features/format/strikethrough/feature.client.d.ts +1 -4
- package/dist/features/format/strikethrough/feature.client.d.ts.map +1 -1
- package/dist/features/format/strikethrough/feature.client.js +27 -28
- package/dist/features/format/strikethrough/feature.client.js.map +1 -1
- package/dist/features/format/strikethrough/feature.server.d.ts.map +1 -1
- package/dist/features/format/strikethrough/feature.server.js +5 -10
- package/dist/features/format/strikethrough/feature.server.js.map +1 -1
- package/dist/features/format/strikethrough/markdownTransformers.js +3 -6
- package/dist/features/format/strikethrough/markdownTransformers.js.map +1 -1
- package/dist/features/format/subscript/feature.client.d.ts +1 -4
- package/dist/features/format/subscript/feature.client.d.ts.map +1 -1
- package/dist/features/format/subscript/feature.client.js +26 -25
- package/dist/features/format/subscript/feature.client.js.map +1 -1
- package/dist/features/format/subscript/feature.server.d.ts.map +1 -1
- package/dist/features/format/subscript/feature.server.js +4 -7
- package/dist/features/format/subscript/feature.server.js.map +1 -1
- package/dist/features/format/superscript/feature.client.d.ts +1 -4
- package/dist/features/format/superscript/feature.client.d.ts.map +1 -1
- package/dist/features/format/superscript/feature.client.js +26 -25
- package/dist/features/format/superscript/feature.client.js.map +1 -1
- package/dist/features/format/superscript/feature.server.d.ts.map +1 -1
- package/dist/features/format/superscript/feature.server.js +4 -7
- package/dist/features/format/superscript/feature.server.js.map +1 -1
- package/dist/features/format/underline/feature.client.d.ts +1 -4
- package/dist/features/format/underline/feature.client.d.ts.map +1 -1
- package/dist/features/format/underline/feature.client.js +26 -25
- package/dist/features/format/underline/feature.client.js.map +1 -1
- package/dist/features/format/underline/feature.server.d.ts.map +1 -1
- package/dist/features/format/underline/feature.server.js +4 -7
- package/dist/features/format/underline/feature.server.js.map +1 -1
- package/dist/features/heading/client/index.d.ts +3 -0
- package/dist/features/heading/client/index.d.ts.map +1 -0
- package/dist/features/heading/client/index.js +108 -0
- package/dist/features/heading/client/index.js.map +1 -0
- package/dist/features/heading/markdownTransformer.js +22 -25
- package/dist/features/heading/markdownTransformer.js.map +1 -1
- package/dist/features/heading/server/i18n.d.ts.map +1 -0
- package/dist/features/heading/server/i18n.js +99 -0
- package/dist/features/heading/server/i18n.js.map +1 -0
- package/dist/features/heading/server/index.d.ts +10 -0
- package/dist/features/heading/server/index.d.ts.map +1 -0
- package/dist/features/heading/server/index.js +62 -0
- package/dist/features/heading/server/index.js.map +1 -0
- package/dist/features/horizontalRule/client/component/index.d.ts +10 -0
- package/dist/features/horizontalRule/client/component/index.d.ts.map +1 -0
- package/dist/features/horizontalRule/client/component/index.js +100 -0
- package/dist/features/horizontalRule/client/component/index.js.map +1 -0
- package/dist/features/horizontalRule/client/index.d.ts +2 -0
- package/dist/features/horizontalRule/client/index.d.ts.map +1 -0
- package/dist/features/horizontalRule/client/index.js +62 -0
- package/dist/features/horizontalRule/client/index.js.map +1 -0
- package/dist/features/horizontalRule/client/markdownTransformer.d.ts.map +1 -0
- package/dist/features/horizontalRule/client/markdownTransformer.js +20 -0
- package/dist/features/horizontalRule/client/markdownTransformer.js.map +1 -0
- package/dist/features/horizontalRule/client/nodes/HorizontalRuleNode.d.ts +20 -0
- package/dist/features/horizontalRule/client/nodes/HorizontalRuleNode.d.ts.map +1 -0
- package/dist/features/horizontalRule/client/nodes/HorizontalRuleNode.js +46 -0
- package/dist/features/horizontalRule/client/nodes/HorizontalRuleNode.js.map +1 -0
- package/dist/features/horizontalRule/client/plugin/index.d.ts +7 -0
- package/dist/features/horizontalRule/client/plugin/index.d.ts.map +1 -0
- package/dist/features/horizontalRule/client/plugin/index.js +42 -0
- package/dist/features/horizontalRule/client/plugin/index.js.map +1 -0
- package/dist/features/horizontalRule/server/i18n.d.ts.map +1 -0
- package/dist/features/horizontalRule/server/i18n.js +99 -0
- package/dist/features/horizontalRule/server/i18n.js.map +1 -0
- package/dist/features/horizontalRule/server/index.d.ts +2 -0
- package/dist/features/horizontalRule/server/index.d.ts.map +1 -0
- package/dist/features/horizontalRule/server/index.js +25 -0
- package/dist/features/horizontalRule/server/index.js.map +1 -0
- package/dist/features/horizontalRule/server/markdownTransformer.d.ts +3 -0
- package/dist/features/horizontalRule/server/markdownTransformer.d.ts.map +1 -0
- package/dist/features/horizontalRule/server/markdownTransformer.js +20 -0
- package/dist/features/horizontalRule/server/markdownTransformer.js.map +1 -0
- package/dist/features/horizontalRule/server/nodes/HorizontalRuleNode.d.ts +53 -0
- package/dist/features/horizontalRule/server/nodes/HorizontalRuleNode.d.ts.map +1 -0
- package/dist/features/horizontalRule/server/nodes/HorizontalRuleNode.js +88 -0
- package/dist/features/horizontalRule/server/nodes/HorizontalRuleNode.js.map +1 -0
- package/dist/features/indent/client/index.d.ts +2 -0
- package/dist/features/indent/client/index.d.ts.map +1 -0
- package/dist/features/indent/client/index.js +62 -0
- package/dist/features/indent/client/index.js.map +1 -0
- package/dist/features/indent/client/toolbarIndentGroup.d.ts +3 -0
- package/dist/features/indent/client/toolbarIndentGroup.d.ts.map +1 -0
- package/dist/features/indent/client/toolbarIndentGroup.js +11 -0
- package/dist/features/indent/client/toolbarIndentGroup.js.map +1 -0
- package/dist/features/indent/server/i18n.d.ts.map +1 -0
- package/dist/features/indent/server/i18n.js +131 -0
- package/dist/features/indent/server/i18n.js.map +1 -0
- package/dist/features/indent/server/index.d.ts +2 -0
- package/dist/features/indent/server/index.d.ts.map +1 -0
- package/dist/features/indent/server/index.js +10 -0
- package/dist/features/indent/server/index.js.map +1 -0
- package/dist/features/link/client/index.d.ts +4 -0
- package/dist/features/link/client/index.d.ts.map +1 -0
- package/dist/features/link/client/index.js +96 -0
- package/dist/features/link/client/index.js.map +1 -0
- package/dist/features/link/client/plugins/autoLink/index.d.ts +20 -0
- package/dist/features/link/client/plugins/autoLink/index.d.ts.map +1 -0
- package/dist/features/link/client/plugins/autoLink/index.js +333 -0
- package/dist/features/link/client/plugins/autoLink/index.js.map +1 -0
- package/dist/features/link/client/plugins/clickableLink/index.d.ts +4 -0
- package/dist/features/link/client/plugins/clickableLink/index.d.ts.map +1 -0
- package/dist/features/link/client/plugins/clickableLink/index.js +9 -0
- package/dist/features/link/client/plugins/clickableLink/index.js.map +1 -0
- package/dist/features/link/client/plugins/floatingLinkEditor/LinkEditor/commands.d.ts.map +1 -0
- package/dist/features/link/client/plugins/floatingLinkEditor/LinkEditor/commands.js +5 -0
- package/dist/features/link/client/plugins/floatingLinkEditor/LinkEditor/commands.js.map +1 -0
- package/dist/features/link/client/plugins/floatingLinkEditor/LinkEditor/index.d.ts.map +1 -0
- package/dist/features/link/client/plugins/floatingLinkEditor/LinkEditor/index.js +317 -0
- package/dist/features/link/client/plugins/floatingLinkEditor/LinkEditor/index.js.map +1 -0
- package/dist/features/link/client/plugins/floatingLinkEditor/index.d.ts +5 -0
- package/dist/features/link/client/plugins/floatingLinkEditor/index.d.ts.map +1 -0
- package/dist/features/link/client/plugins/floatingLinkEditor/index.js +15 -0
- package/dist/features/link/client/plugins/floatingLinkEditor/index.js.map +1 -0
- package/dist/features/link/client/plugins/floatingLinkEditor/types.d.ts +15 -0
- package/dist/features/link/client/plugins/floatingLinkEditor/types.d.ts.map +1 -0
- package/dist/features/link/client/plugins/floatingLinkEditor/types.js +5 -0
- package/dist/features/link/client/plugins/floatingLinkEditor/types.js.map +1 -0
- package/dist/features/link/client/plugins/link/index.d.ts +4 -0
- package/dist/features/link/client/plugins/link/index.d.ts.map +1 -0
- package/dist/features/link/client/plugins/link/index.js +60 -0
- package/dist/features/link/client/plugins/link/index.js.map +1 -0
- package/dist/features/link/markdownTransformer.js +38 -39
- package/dist/features/link/markdownTransformer.js.map +1 -1
- package/dist/features/link/nodes/AutoLinkNode.js +57 -56
- 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 +283 -277
- package/dist/features/link/nodes/LinkNode.js.map +1 -1
- package/dist/features/link/nodes/types.d.ts +3 -3
- package/dist/features/link/nodes/types.d.ts.map +1 -1
- package/dist/features/link/nodes/types.js +1 -2
- package/dist/features/link/nodes/types.js.map +1 -1
- package/dist/features/link/server/baseFields.d.ts +3 -0
- package/dist/features/link/server/baseFields.d.ts.map +1 -0
- package/dist/features/link/server/baseFields.js +136 -0
- package/dist/features/link/server/baseFields.js.map +1 -0
- package/dist/features/link/server/graphQLPopulationPromise.d.ts +5 -0
- package/dist/features/link/server/graphQLPopulationPromise.d.ts.map +1 -0
- package/dist/features/link/server/graphQLPopulationPromise.js +45 -0
- package/dist/features/link/server/graphQLPopulationPromise.js.map +1 -0
- package/dist/features/link/server/i18n.d.ts.map +1 -0
- package/dist/features/link/server/i18n.js +131 -0
- package/dist/features/link/server/i18n.js.map +1 -0
- package/dist/features/link/server/index.d.ts +35 -0
- package/dist/features/link/server/index.d.ts.map +1 -0
- package/dist/features/link/server/index.js +151 -0
- package/dist/features/link/server/index.js.map +1 -0
- package/dist/features/link/server/transformExtraFields.d.ts +9 -0
- package/dist/features/link/server/transformExtraFields.d.ts.map +1 -0
- package/dist/features/link/server/transformExtraFields.js +20 -0
- package/dist/features/link/server/transformExtraFields.js.map +1 -0
- package/dist/features/link/server/validate.d.ts +6 -0
- package/dist/features/link/server/validate.d.ts.map +1 -0
- package/dist/features/link/server/validate.js +43 -0
- package/dist/features/link/server/validate.js.map +1 -0
- package/dist/features/lists/checklist/client/index.d.ts +2 -0
- package/dist/features/lists/checklist/client/index.d.ts.map +1 -0
- package/dist/features/lists/checklist/client/index.js +92 -0
- package/dist/features/lists/checklist/client/index.js.map +1 -0
- package/dist/features/lists/checklist/client/plugin/index.d.ts +3 -0
- package/dist/features/lists/checklist/client/plugin/index.d.ts.map +1 -0
- package/dist/features/lists/checklist/client/plugin/index.js +9 -0
- package/dist/features/lists/checklist/client/plugin/index.js.map +1 -0
- package/dist/features/lists/checklist/markdownTransformers.js +7 -11
- package/dist/features/lists/checklist/markdownTransformers.js.map +1 -1
- package/dist/features/lists/checklist/server/i18n.d.ts.map +1 -0
- package/dist/features/lists/checklist/server/i18n.js +99 -0
- package/dist/features/lists/checklist/server/i18n.js.map +1 -0
- package/dist/features/lists/checklist/server/index.d.ts +2 -0
- package/dist/features/lists/checklist/server/index.d.ts.map +1 -0
- package/dist/features/lists/checklist/server/index.js +30 -0
- package/dist/features/lists/checklist/server/index.js.map +1 -0
- package/dist/features/lists/htmlConverter.d.ts.map +1 -1
- package/dist/features/lists/htmlConverter.js +62 -43
- package/dist/features/lists/htmlConverter.js.map +1 -1
- package/dist/features/lists/orderedList/client/index.d.ts +2 -0
- package/dist/features/lists/orderedList/client/index.d.ts.map +1 -0
- package/dist/features/lists/orderedList/client/index.js +84 -0
- package/dist/features/lists/orderedList/client/index.js.map +1 -0
- package/dist/features/lists/orderedList/markdownTransformer.js +7 -11
- package/dist/features/lists/orderedList/markdownTransformer.js.map +1 -1
- package/dist/features/lists/orderedList/server/i18n.d.ts.map +1 -0
- package/dist/features/lists/orderedList/server/i18n.js +99 -0
- package/dist/features/lists/orderedList/server/i18n.js.map +1 -0
- package/dist/features/lists/orderedList/server/index.d.ts +2 -0
- package/dist/features/lists/orderedList/server/index.d.ts.map +1 -0
- package/dist/features/lists/orderedList/server/index.js +30 -0
- package/dist/features/lists/orderedList/server/index.js.map +1 -0
- package/dist/features/lists/plugin/index.js +3 -3
- package/dist/features/lists/plugin/index.js.map +1 -1
- package/dist/features/lists/shared/markdown.js +48 -49
- package/dist/features/lists/shared/markdown.js.map +1 -1
- package/dist/features/lists/shared/slashMenuListGroup.js +9 -8
- package/dist/features/lists/shared/slashMenuListGroup.js.map +1 -1
- package/dist/features/lists/unorderedList/client/index.d.ts +2 -0
- package/dist/features/lists/unorderedList/client/index.d.ts.map +1 -0
- package/dist/features/lists/unorderedList/client/index.js +80 -0
- package/dist/features/lists/unorderedList/client/index.js.map +1 -0
- package/dist/features/lists/unorderedList/markdownTransformer.js +7 -11
- package/dist/features/lists/unorderedList/markdownTransformer.js.map +1 -1
- package/dist/features/lists/unorderedList/server/i18n.d.ts.map +1 -0
- package/dist/features/lists/unorderedList/server/i18n.js +99 -0
- package/dist/features/lists/unorderedList/server/i18n.js.map +1 -0
- package/dist/features/lists/unorderedList/server/index.d.ts +2 -0
- package/dist/features/lists/unorderedList/server/index.d.ts.map +1 -0
- package/dist/features/lists/unorderedList/server/index.js +26 -0
- package/dist/features/lists/unorderedList/server/index.js.map +1 -0
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/heading/converter.d.ts +1 -1
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/heading/converter.d.ts.map +1 -1
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/heading/converter.js +19 -17
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/heading/converter.js.map +1 -1
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/link/converter.d.ts +1 -1
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/link/converter.d.ts.map +1 -1
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/link/converter.js +31 -29
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/link/converter.js.map +1 -1
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/list/converter.d.ts +1 -1
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/list/converter.d.ts.map +1 -1
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/list/converter.js +22 -20
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/list/converter.js.map +1 -1
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/listItem/converter.d.ts +1 -1
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/listItem/converter.d.ts.map +1 -1
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/listItem/converter.js +22 -19
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/listItem/converter.js.map +1 -1
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/quote/converter.d.ts +1 -1
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/quote/converter.d.ts.map +1 -1
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/quote/converter.js +19 -17
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/quote/converter.js.map +1 -1
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/unknown/converter.d.ts +1 -1
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/unknown/converter.d.ts.map +1 -1
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/unknown/converter.js +25 -23
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/unknown/converter.js.map +1 -1
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/upload/converter.d.ts +1 -1
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/upload/converter.d.ts.map +1 -1
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/upload/converter.js +20 -21
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/upload/converter.js.map +1 -1
- package/dist/features/migrations/lexicalPluginToLexical/converter/defaultConverters.d.ts +2 -2
- package/dist/features/migrations/lexicalPluginToLexical/converter/defaultConverters.d.ts.map +1 -1
- package/dist/features/migrations/lexicalPluginToLexical/converter/defaultConverters.js +8 -17
- package/dist/features/migrations/lexicalPluginToLexical/converter/defaultConverters.js.map +1 -1
- package/dist/features/migrations/lexicalPluginToLexical/converter/index.d.ts +5 -3
- package/dist/features/migrations/lexicalPluginToLexical/converter/index.d.ts.map +1 -1
- package/dist/features/migrations/lexicalPluginToLexical/converter/index.js +71 -56
- package/dist/features/migrations/lexicalPluginToLexical/converter/index.js.map +1 -1
- package/dist/features/migrations/lexicalPluginToLexical/converter/types.d.ts +1 -9
- package/dist/features/migrations/lexicalPluginToLexical/converter/types.d.ts.map +1 -1
- package/dist/features/migrations/lexicalPluginToLexical/converter/types.js +1 -2
- package/dist/features/migrations/lexicalPluginToLexical/converter/types.js.map +1 -1
- package/dist/features/migrations/lexicalPluginToLexical/feature.client.d.ts +1 -4
- package/dist/features/migrations/lexicalPluginToLexical/feature.client.d.ts.map +1 -1
- package/dist/features/migrations/lexicalPluginToLexical/feature.client.js +5 -22
- package/dist/features/migrations/lexicalPluginToLexical/feature.client.js.map +1 -1
- package/dist/features/migrations/lexicalPluginToLexical/feature.server.d.ts +5 -3
- package/dist/features/migrations/lexicalPluginToLexical/feature.server.d.ts.map +1 -1
- package/dist/features/migrations/lexicalPluginToLexical/feature.server.js +43 -39
- package/dist/features/migrations/lexicalPluginToLexical/feature.server.js.map +1 -1
- package/dist/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/Component.d.ts.map +1 -1
- package/dist/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/Component.js +11 -11
- package/dist/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/Component.js.map +1 -1
- package/dist/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/index.d.ts +1 -1
- package/dist/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/index.d.ts.map +1 -1
- package/dist/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/index.js +64 -59
- package/dist/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/index.js.map +1 -1
- package/dist/features/migrations/slateToLexical/converter/converters/blockquote/converter.d.ts +1 -1
- package/dist/features/migrations/slateToLexical/converter/converters/blockquote/converter.d.ts.map +1 -1
- package/dist/features/migrations/slateToLexical/converter/converters/blockquote/converter.js +20 -20
- package/dist/features/migrations/slateToLexical/converter/converters/blockquote/converter.js.map +1 -1
- package/dist/features/migrations/slateToLexical/converter/converters/heading/converter.d.ts +1 -1
- package/dist/features/migrations/slateToLexical/converter/converters/heading/converter.d.ts.map +1 -1
- package/dist/features/migrations/slateToLexical/converter/converters/heading/converter.js +21 -26
- package/dist/features/migrations/slateToLexical/converter/converters/heading/converter.js.map +1 -1
- package/dist/features/migrations/slateToLexical/converter/converters/indent/converter.d.ts +1 -1
- package/dist/features/migrations/slateToLexical/converter/converters/indent/converter.d.ts.map +1 -1
- package/dist/features/migrations/slateToLexical/converter/converters/indent/converter.js +29 -31
- package/dist/features/migrations/slateToLexical/converter/converters/indent/converter.js.map +1 -1
- package/dist/features/migrations/slateToLexical/converter/converters/link/converter.d.ts +1 -1
- package/dist/features/migrations/slateToLexical/converter/converters/link/converter.d.ts.map +1 -1
- package/dist/features/migrations/slateToLexical/converter/converters/link/converter.js +27 -27
- package/dist/features/migrations/slateToLexical/converter/converters/link/converter.js.map +1 -1
- package/dist/features/migrations/slateToLexical/converter/converters/listItem/converter.d.ts +1 -1
- package/dist/features/migrations/slateToLexical/converter/converters/listItem/converter.d.ts.map +1 -1
- package/dist/features/migrations/slateToLexical/converter/converters/listItem/converter.js +23 -22
- package/dist/features/migrations/slateToLexical/converter/converters/listItem/converter.js.map +1 -1
- package/dist/features/migrations/slateToLexical/converter/converters/orderedList/converter.d.ts +1 -1
- package/dist/features/migrations/slateToLexical/converter/converters/orderedList/converter.d.ts.map +1 -1
- package/dist/features/migrations/slateToLexical/converter/converters/orderedList/converter.js +23 -23
- package/dist/features/migrations/slateToLexical/converter/converters/orderedList/converter.js.map +1 -1
- package/dist/features/migrations/slateToLexical/converter/converters/relationship/converter.d.ts +1 -1
- package/dist/features/migrations/slateToLexical/converter/converters/relationship/converter.d.ts.map +1 -1
- package/dist/features/migrations/slateToLexical/converter/converters/relationship/converter.js +13 -14
- package/dist/features/migrations/slateToLexical/converter/converters/relationship/converter.js.map +1 -1
- package/dist/features/migrations/slateToLexical/converter/converters/unknown/converter.d.ts +1 -1
- package/dist/features/migrations/slateToLexical/converter/converters/unknown/converter.d.ts.map +1 -1
- package/dist/features/migrations/slateToLexical/converter/converters/unknown/converter.js +24 -24
- package/dist/features/migrations/slateToLexical/converter/converters/unknown/converter.js.map +1 -1
- package/dist/features/migrations/slateToLexical/converter/converters/unorderedList/converter.d.ts +1 -1
- package/dist/features/migrations/slateToLexical/converter/converters/unorderedList/converter.d.ts.map +1 -1
- package/dist/features/migrations/slateToLexical/converter/converters/unorderedList/converter.js +23 -23
- package/dist/features/migrations/slateToLexical/converter/converters/unorderedList/converter.js.map +1 -1
- package/dist/features/migrations/slateToLexical/converter/converters/upload/converter.d.ts +1 -1
- package/dist/features/migrations/slateToLexical/converter/converters/upload/converter.d.ts.map +1 -1
- package/dist/features/migrations/slateToLexical/converter/converters/upload/converter.js +16 -17
- package/dist/features/migrations/slateToLexical/converter/converters/upload/converter.js.map +1 -1
- package/dist/features/migrations/slateToLexical/converter/defaultConverters.d.ts +2 -2
- package/dist/features/migrations/slateToLexical/converter/defaultConverters.d.ts.map +1 -1
- package/dist/features/migrations/slateToLexical/converter/defaultConverters.js +11 -23
- package/dist/features/migrations/slateToLexical/converter/defaultConverters.js.map +1 -1
- package/dist/features/migrations/slateToLexical/converter/index.d.ts.map +1 -1
- package/dist/features/migrations/slateToLexical/converter/index.js +106 -98
- package/dist/features/migrations/slateToLexical/converter/index.js.map +1 -1
- package/dist/features/migrations/slateToLexical/converter/types.d.ts +0 -9
- package/dist/features/migrations/slateToLexical/converter/types.d.ts.map +1 -1
- package/dist/features/migrations/slateToLexical/converter/types.js +1 -2
- package/dist/features/migrations/slateToLexical/converter/types.js.map +1 -1
- package/dist/features/migrations/slateToLexical/feature.client.d.ts +1 -4
- package/dist/features/migrations/slateToLexical/feature.client.d.ts.map +1 -1
- package/dist/features/migrations/slateToLexical/feature.client.js +5 -22
- package/dist/features/migrations/slateToLexical/feature.client.js.map +1 -1
- package/dist/features/migrations/slateToLexical/feature.server.d.ts +6 -5
- package/dist/features/migrations/slateToLexical/feature.server.d.ts.map +1 -1
- package/dist/features/migrations/slateToLexical/feature.server.js +44 -41
- package/dist/features/migrations/slateToLexical/feature.server.js.map +1 -1
- package/dist/features/migrations/slateToLexical/nodes/unknownConvertedNode/Component.d.ts.map +1 -1
- package/dist/features/migrations/slateToLexical/nodes/unknownConvertedNode/Component.js +11 -11
- package/dist/features/migrations/slateToLexical/nodes/unknownConvertedNode/Component.js.map +1 -1
- package/dist/features/migrations/slateToLexical/nodes/unknownConvertedNode/index.d.ts +1 -1
- package/dist/features/migrations/slateToLexical/nodes/unknownConvertedNode/index.d.ts.map +1 -1
- package/dist/features/migrations/slateToLexical/nodes/unknownConvertedNode/index.js +64 -59
- package/dist/features/migrations/slateToLexical/nodes/unknownConvertedNode/index.js.map +1 -1
- package/dist/features/paragraph/client/index.d.ts +2 -0
- package/dist/features/paragraph/client/index.d.ts.map +1 -0
- package/dist/features/paragraph/client/index.js +68 -0
- package/dist/features/paragraph/client/index.js.map +1 -0
- package/dist/features/paragraph/server/i18n.d.ts.map +1 -0
- package/dist/features/paragraph/server/i18n.js +131 -0
- package/dist/features/paragraph/server/i18n.js.map +1 -0
- package/dist/features/paragraph/server/index.d.ts +2 -0
- package/dist/features/paragraph/server/index.d.ts.map +1 -0
- package/dist/features/paragraph/server/index.js +11 -0
- package/dist/features/paragraph/server/index.js.map +1 -0
- package/dist/features/relationship/client/components/RelationshipComponent.d.ts +13 -0
- package/dist/features/relationship/client/components/RelationshipComponent.d.ts.map +1 -0
- package/dist/features/relationship/client/components/RelationshipComponent.js +176 -0
- package/dist/features/relationship/client/components/RelationshipComponent.js.map +1 -0
- package/dist/features/relationship/client/drawer/commands.d.ts.map +1 -0
- package/dist/features/relationship/client/drawer/commands.js +3 -0
- package/dist/features/relationship/client/drawer/commands.js.map +1 -0
- package/dist/features/relationship/client/drawer/index.d.ts.map +1 -0
- package/dist/features/relationship/client/drawer/index.js +155 -0
- package/dist/features/relationship/client/drawer/index.js.map +1 -0
- package/dist/features/relationship/client/index.d.ts +3 -0
- package/dist/features/relationship/client/index.d.ts.map +1 -0
- package/dist/features/relationship/client/index.js +66 -0
- package/dist/features/relationship/client/index.js.map +1 -0
- package/dist/features/relationship/client/nodes/RelationshipNode.d.ts +15 -0
- package/dist/features/relationship/client/nodes/RelationshipNode.d.ts.map +1 -0
- package/dist/features/relationship/client/nodes/RelationshipNode.js +75 -0
- package/dist/features/relationship/client/nodes/RelationshipNode.js.map +1 -0
- package/dist/features/relationship/client/plugins/index.d.ts +7 -0
- package/dist/features/relationship/client/plugins/index.d.ts.map +1 -0
- package/dist/features/relationship/client/plugins/index.js +105 -0
- package/dist/features/relationship/client/plugins/index.js.map +1 -0
- package/dist/features/relationship/client/utils/EnabledRelationshipsCondition.d.ts.map +1 -0
- package/dist/features/relationship/client/utils/EnabledRelationshipsCondition.js +104 -0
- package/dist/features/relationship/client/utils/EnabledRelationshipsCondition.js.map +1 -0
- package/dist/features/relationship/server/graphQLPopulationPromise.d.ts +5 -0
- package/dist/features/relationship/server/graphQLPopulationPromise.d.ts.map +1 -0
- package/dist/features/relationship/server/graphQLPopulationPromise.js +37 -0
- package/dist/features/relationship/server/graphQLPopulationPromise.js.map +1 -0
- package/dist/features/relationship/server/i18n.d.ts.map +1 -0
- package/dist/features/relationship/server/i18n.js +99 -0
- package/dist/features/relationship/server/i18n.js.map +1 -0
- package/dist/features/relationship/server/index.d.ts +27 -0
- package/dist/features/relationship/server/index.d.ts.map +1 -0
- package/dist/features/relationship/server/index.js +67 -0
- package/dist/features/relationship/server/index.js.map +1 -0
- package/dist/features/relationship/server/nodes/RelationshipNode.d.ts +37 -0
- package/dist/features/relationship/server/nodes/RelationshipNode.d.ts.map +1 -0
- package/dist/features/relationship/server/nodes/RelationshipNode.js +104 -0
- package/dist/features/relationship/server/nodes/RelationshipNode.js.map +1 -0
- package/dist/features/shared/slashMenu/basicGroup.js +9 -8
- package/dist/features/shared/slashMenu/basicGroup.js.map +1 -1
- package/dist/features/shared/toolbar/addDropdownGroup.js +8 -9
- package/dist/features/shared/toolbar/addDropdownGroup.js.map +1 -1
- package/dist/features/shared/toolbar/featureButtonsGroup.js +7 -8
- package/dist/features/shared/toolbar/featureButtonsGroup.js.map +1 -1
- package/dist/features/shared/toolbar/textDropdownGroup.js +8 -9
- package/dist/features/shared/toolbar/textDropdownGroup.js.map +1 -1
- package/dist/features/toolbars/fixed/client/Toolbar/index.d.ts +5 -0
- package/dist/features/toolbars/fixed/client/Toolbar/index.d.ts.map +1 -0
- package/dist/features/toolbars/fixed/client/Toolbar/index.js +313 -0
- package/dist/features/toolbars/fixed/client/Toolbar/index.js.map +1 -0
- package/dist/features/toolbars/fixed/client/index.d.ts +3 -0
- package/dist/features/toolbars/fixed/client/index.d.ts.map +1 -0
- package/dist/features/toolbars/fixed/client/index.js +11 -0
- package/dist/features/toolbars/fixed/client/index.js.map +1 -0
- package/dist/features/toolbars/fixed/server/index.d.ts +18 -0
- package/dist/features/toolbars/fixed/server/index.d.ts.map +1 -0
- package/dist/features/toolbars/fixed/server/index.js +18 -0
- package/dist/features/toolbars/fixed/server/index.js.map +1 -0
- package/dist/features/toolbars/inline/client/Toolbar/index.d.ts +4 -0
- package/dist/features/toolbars/inline/client/Toolbar/index.d.ts.map +1 -0
- package/dist/features/toolbars/inline/client/Toolbar/index.js +404 -0
- package/dist/features/toolbars/inline/client/Toolbar/index.js.map +1 -0
- package/dist/features/toolbars/inline/client/index.d.ts +2 -0
- package/dist/features/toolbars/inline/client/index.d.ts.map +1 -0
- package/dist/features/toolbars/inline/client/index.js +11 -0
- package/dist/features/toolbars/inline/client/index.js.map +1 -0
- package/dist/features/toolbars/inline/server/index.d.ts +2 -0
- package/dist/features/toolbars/inline/server/index.d.ts.map +1 -0
- package/dist/features/toolbars/inline/server/index.js +8 -0
- package/dist/features/toolbars/inline/server/index.js.map +1 -0
- package/dist/features/toolbars/shared/ToolbarButton/index.d.ts +1 -1
- package/dist/features/toolbars/shared/ToolbarButton/index.d.ts.map +1 -1
- package/dist/features/toolbars/shared/ToolbarButton/index.js +78 -97
- package/dist/features/toolbars/shared/ToolbarButton/index.js.map +1 -1
- package/dist/features/toolbars/shared/ToolbarDropdown/DropDown.d.ts +5 -4
- package/dist/features/toolbars/shared/ToolbarDropdown/DropDown.d.ts.map +1 -1
- package/dist/features/toolbars/shared/ToolbarDropdown/DropDown.js +202 -209
- package/dist/features/toolbars/shared/ToolbarDropdown/DropDown.js.map +1 -1
- package/dist/features/toolbars/shared/ToolbarDropdown/index.d.ts +5 -6
- package/dist/features/toolbars/shared/ToolbarDropdown/index.d.ts.map +1 -1
- package/dist/features/toolbars/shared/ToolbarDropdown/index.js +290 -123
- package/dist/features/toolbars/shared/ToolbarDropdown/index.js.map +1 -1
- package/dist/features/toolbars/types.d.ts +24 -11
- package/dist/features/toolbars/types.d.ts.map +1 -1
- package/dist/features/toolbars/types.js +1 -2
- package/dist/features/toolbars/types.js.map +1 -1
- package/dist/features/typeUtilities.js +2 -3
- package/dist/features/typeUtilities.js.map +1 -1
- package/dist/features/typesClient.d.ts +22 -30
- package/dist/features/typesClient.d.ts.map +1 -1
- package/dist/features/typesClient.js +1 -2
- package/dist/features/typesClient.js.map +1 -1
- package/dist/features/typesServer.d.ts +33 -34
- package/dist/features/typesServer.d.ts.map +1 -1
- package/dist/features/typesServer.js +1 -2
- package/dist/features/typesServer.js.map +1 -1
- package/dist/features/upload/client/component/index.d.ts +9 -0
- package/dist/features/upload/client/component/index.d.ts.map +1 -0
- package/dist/features/upload/client/component/index.js +243 -0
- package/dist/features/upload/client/component/index.js.map +1 -0
- package/dist/features/upload/client/drawer/commands.d.ts.map +1 -0
- package/dist/features/upload/client/drawer/commands.js +5 -0
- package/dist/features/upload/client/drawer/commands.js.map +1 -0
- package/dist/features/upload/client/drawer/index.d.ts.map +1 -0
- package/dist/features/upload/client/drawer/index.js +128 -0
- package/dist/features/upload/client/drawer/index.js.map +1 -0
- package/dist/features/upload/client/feature.client.d.ts +9 -0
- package/dist/features/upload/client/feature.client.d.ts.map +1 -0
- package/dist/features/upload/client/feature.client.js +64 -0
- package/dist/features/upload/client/feature.client.js.map +1 -0
- package/dist/features/upload/client/nodes/UploadNode.d.ts +22 -0
- package/dist/features/upload/client/nodes/UploadNode.d.ts.map +1 -0
- package/dist/features/upload/client/nodes/UploadNode.js +94 -0
- package/dist/features/upload/client/nodes/UploadNode.js.map +1 -0
- package/dist/features/upload/client/plugin/index.d.ts +8 -0
- package/dist/features/upload/client/plugin/index.d.ts.map +1 -0
- package/dist/features/upload/client/plugin/index.js +81 -0
- package/dist/features/upload/client/plugin/index.js.map +1 -0
- package/dist/features/upload/server/feature.server.d.ts +18 -0
- package/dist/features/upload/server/feature.server.d.ts.map +1 -0
- package/dist/features/upload/server/feature.server.js +217 -0
- package/dist/features/upload/server/feature.server.js.map +1 -0
- package/dist/features/upload/server/graphQLPopulationPromise.d.ts +5 -0
- package/dist/features/upload/server/graphQLPopulationPromise.d.ts.map +1 -0
- package/dist/features/upload/server/graphQLPopulationPromise.js +65 -0
- package/dist/features/upload/server/graphQLPopulationPromise.js.map +1 -0
- package/dist/features/upload/server/i18n.d.ts.map +1 -0
- package/dist/features/upload/server/i18n.js +99 -0
- package/dist/features/upload/server/i18n.js.map +1 -0
- package/dist/features/upload/server/nodes/UploadNode.d.ts +42 -0
- package/dist/features/upload/server/nodes/UploadNode.d.ts.map +1 -0
- package/dist/features/upload/server/nodes/UploadNode.js +133 -0
- package/dist/features/upload/server/nodes/UploadNode.js.map +1 -0
- package/dist/features/upload/server/validate.d.ts +5 -0
- package/dist/features/upload/server/validate.d.ts.map +1 -0
- package/dist/features/upload/server/validate.js +61 -0
- package/dist/features/upload/server/validate.js.map +1 -0
- package/dist/field/Field.d.ts +7 -7
- package/dist/field/Field.d.ts.map +1 -1
- package/dist/field/Field.js +104 -106
- package/dist/field/Field.js.map +1 -1
- package/dist/field/bundled.css +1 -0
- package/dist/field/index.d.ts +2 -9
- package/dist/field/index.d.ts.map +1 -1
- package/dist/field/index.js +92 -36
- package/dist/field/index.js.map +1 -1
- package/dist/field/rscEntry.d.ts +9 -0
- package/dist/field/rscEntry.d.ts.map +1 -0
- package/dist/field/rscEntry.js +56 -0
- package/dist/field/rscEntry.js.map +1 -0
- package/dist/i18n.js +160 -161
- package/dist/i18n.js.map +1 -1
- package/dist/index.d.ts +31 -42
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +695 -637
- package/dist/index.js.map +1 -1
- package/dist/lexical/EditorPlugin.d.ts.map +1 -1
- package/dist/lexical/EditorPlugin.js +16 -10
- package/dist/lexical/EditorPlugin.js.map +1 -1
- package/dist/lexical/LexicalEditor.d.ts +1 -1
- package/dist/lexical/LexicalEditor.d.ts.map +1 -1
- package/dist/lexical/LexicalEditor.js +209 -164
- package/dist/lexical/LexicalEditor.js.map +1 -1
- package/dist/lexical/LexicalProvider.d.ts +3 -7
- package/dist/lexical/LexicalProvider.d.ts.map +1 -1
- package/dist/lexical/LexicalProvider.js +78 -84
- package/dist/lexical/LexicalProvider.js.map +1 -1
- package/dist/lexical/config/client/EditorConfigProvider.d.ts +6 -13
- package/dist/lexical/config/client/EditorConfigProvider.d.ts.map +1 -1
- package/dist/lexical/config/client/EditorConfigProvider.js +77 -79
- package/dist/lexical/config/client/EditorConfigProvider.js.map +1 -1
- package/dist/lexical/config/client/default.js +3 -3
- package/dist/lexical/config/client/default.js.map +1 -1
- package/dist/lexical/config/client/loader.d.ts +5 -2
- package/dist/lexical/config/client/loader.d.ts.map +1 -1
- package/dist/lexical/config/client/loader.js +36 -39
- package/dist/lexical/config/client/loader.js.map +1 -1
- package/dist/lexical/config/client/sanitize.d.ts +1 -1
- package/dist/lexical/config/client/sanitize.d.ts.map +1 -1
- package/dist/lexical/config/client/sanitize.js +166 -165
- package/dist/lexical/config/client/sanitize.js.map +1 -1
- package/dist/lexical/config/server/default.js +18 -40
- package/dist/lexical/config/server/default.js.map +1 -1
- package/dist/lexical/config/server/loader.d.ts +2 -1
- package/dist/lexical/config/server/loader.d.ts.map +1 -1
- package/dist/lexical/config/server/loader.js +105 -103
- 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 +117 -86
- package/dist/lexical/config/server/sanitize.js.map +1 -1
- package/dist/lexical/config/types.d.ts +2 -2
- package/dist/lexical/config/types.d.ts.map +1 -1
- package/dist/lexical/config/types.js +1 -2
- package/dist/lexical/config/types.js.map +1 -1
- package/dist/lexical/nodes/index.d.ts +4 -0
- package/dist/lexical/nodes/index.d.ts.map +1 -1
- package/dist/lexical/nodes/index.js +16 -8
- package/dist/lexical/nodes/index.js.map +1 -1
- package/dist/lexical/plugins/MarkdownShortcut/index.js +17 -5
- package/dist/lexical/plugins/MarkdownShortcut/index.js.map +1 -1
- package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/LexicalMenu.d.ts +6 -6
- package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/LexicalMenu.d.ts.map +1 -1
- package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/LexicalMenu.js +358 -362
- package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/LexicalMenu.js.map +1 -1
- package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/index.d.ts +2 -2
- package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/index.d.ts.map +1 -1
- package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/index.js +223 -160
- package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/index.js.map +1 -1
- package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/types.d.ts +7 -2
- package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/types.d.ts.map +1 -1
- package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/types.js +1 -2
- package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/types.js.map +1 -1
- package/dist/lexical/plugins/SlashMenu/index.d.ts.map +1 -1
- package/dist/lexical/plugins/SlashMenu/index.js +185 -169
- package/dist/lexical/plugins/SlashMenu/index.js.map +1 -1
- package/dist/lexical/plugins/SlashMenu/useMenuTriggerMatch.d.ts.map +1 -1
- package/dist/lexical/plugins/SlashMenu/useMenuTriggerMatch.js +41 -26
- package/dist/lexical/plugins/SlashMenu/useMenuTriggerMatch.js.map +1 -1
- package/dist/lexical/plugins/handles/AddBlockHandlePlugin/index.d.ts.map +1 -1
- package/dist/lexical/plugins/handles/AddBlockHandlePlugin/index.js +128 -130
- package/dist/lexical/plugins/handles/AddBlockHandlePlugin/index.js.map +1 -1
- package/dist/lexical/plugins/handles/DraggableBlockPlugin/debounce.d.ts +1 -1
- package/dist/lexical/plugins/handles/DraggableBlockPlugin/debounce.d.ts.map +1 -1
- package/dist/lexical/plugins/handles/DraggableBlockPlugin/debounce.js +11 -10
- package/dist/lexical/plugins/handles/DraggableBlockPlugin/debounce.js.map +1 -1
- package/dist/lexical/plugins/handles/DraggableBlockPlugin/getBoundingRectWithoutTransform.d.ts.map +1 -1
- package/dist/lexical/plugins/handles/DraggableBlockPlugin/getBoundingRectWithoutTransform.js +11 -10
- package/dist/lexical/plugins/handles/DraggableBlockPlugin/getBoundingRectWithoutTransform.js.map +1 -1
- package/dist/lexical/plugins/handles/DraggableBlockPlugin/highlightElemOriginalPosition.d.ts.map +1 -1
- package/dist/lexical/plugins/handles/DraggableBlockPlugin/highlightElemOriginalPosition.js +27 -23
- package/dist/lexical/plugins/handles/DraggableBlockPlugin/highlightElemOriginalPosition.js.map +1 -1
- package/dist/lexical/plugins/handles/DraggableBlockPlugin/index.d.ts.map +1 -1
- package/dist/lexical/plugins/handles/DraggableBlockPlugin/index.js +313 -300
- package/dist/lexical/plugins/handles/DraggableBlockPlugin/index.js.map +1 -1
- package/dist/lexical/plugins/handles/DraggableBlockPlugin/setTargetLine.d.ts.map +1 -1
- package/dist/lexical/plugins/handles/DraggableBlockPlugin/setTargetLine.js +96 -99
- package/dist/lexical/plugins/handles/DraggableBlockPlugin/setTargetLine.js.map +1 -1
- package/dist/lexical/plugins/handles/utils/calculateDistanceFromScrollerElem.d.ts.map +1 -1
- package/dist/lexical/plugins/handles/utils/calculateDistanceFromScrollerElem.js +23 -16
- package/dist/lexical/plugins/handles/utils/calculateDistanceFromScrollerElem.js.map +1 -1
- package/dist/lexical/plugins/handles/utils/doesLineHeightAffectElement.d.ts.map +1 -1
- package/dist/lexical/plugins/handles/utils/doesLineHeightAffectElement.js +20 -27
- package/dist/lexical/plugins/handles/utils/doesLineHeightAffectElement.js.map +1 -1
- package/dist/lexical/plugins/handles/utils/getCollapsedMargins.d.ts.map +1 -1
- package/dist/lexical/plugins/handles/utils/getCollapsedMargins.js +15 -11
- package/dist/lexical/plugins/handles/utils/getCollapsedMargins.js.map +1 -1
- package/dist/lexical/plugins/handles/utils/getNodeCloseToPoint.d.ts.map +1 -1
- package/dist/lexical/plugins/handles/utils/getNodeCloseToPoint.js +132 -118
- package/dist/lexical/plugins/handles/utils/getNodeCloseToPoint.js.map +1 -1
- package/dist/lexical/plugins/handles/utils/getTopLevelNodeKeys.d.ts.map +1 -1
- package/dist/lexical/plugins/handles/utils/getTopLevelNodeKeys.js +3 -2
- package/dist/lexical/plugins/handles/utils/getTopLevelNodeKeys.js.map +1 -1
- package/dist/lexical/plugins/handles/utils/isOnHandleElement.d.ts.map +1 -1
- package/dist/lexical/plugins/handles/utils/isOnHandleElement.js +3 -2
- package/dist/lexical/plugins/handles/utils/isOnHandleElement.js.map +1 -1
- package/dist/lexical/plugins/handles/utils/setHandlePosition.d.ts.map +1 -1
- package/dist/lexical/plugins/handles/utils/setHandlePosition.js +24 -25
- package/dist/lexical/plugins/handles/utils/setHandlePosition.js.map +1 -1
- package/dist/lexical/theme/EditorTheme.d.ts +0 -1
- package/dist/lexical/theme/EditorTheme.d.ts.map +1 -1
- package/dist/lexical/theme/EditorTheme.js +96 -102
- package/dist/lexical/theme/EditorTheme.js.map +1 -1
- package/dist/lexical/ui/ContentEditable.d.ts.map +1 -1
- package/dist/lexical/ui/ContentEditable.js +27 -10
- package/dist/lexical/ui/ContentEditable.js.map +1 -1
- package/dist/lexical/ui/icons/AI/index.d.ts.map +1 -1
- package/dist/lexical/ui/icons/AI/index.js +31 -33
- package/dist/lexical/ui/icons/AI/index.js.map +1 -1
- package/dist/lexical/ui/icons/Add/index.d.ts.map +1 -1
- package/dist/lexical/ui/icons/Add/index.js +16 -18
- package/dist/lexical/ui/icons/Add/index.js.map +1 -1
- package/dist/lexical/ui/icons/AlignCenter/index.d.ts.map +1 -1
- package/dist/lexical/ui/icons/AlignCenter/index.js +25 -28
- package/dist/lexical/ui/icons/AlignCenter/index.js.map +1 -1
- package/dist/lexical/ui/icons/AlignJustify/index.d.ts.map +1 -1
- package/dist/lexical/ui/icons/AlignJustify/index.js +25 -28
- package/dist/lexical/ui/icons/AlignJustify/index.js.map +1 -1
- package/dist/lexical/ui/icons/AlignLeft/index.d.ts.map +1 -1
- package/dist/lexical/ui/icons/AlignLeft/index.js +25 -28
- package/dist/lexical/ui/icons/AlignLeft/index.js.map +1 -1
- package/dist/lexical/ui/icons/AlignRight/index.d.ts.map +1 -1
- package/dist/lexical/ui/icons/AlignRight/index.js +25 -28
- package/dist/lexical/ui/icons/AlignRight/index.js.map +1 -1
- package/dist/lexical/ui/icons/Block/index.d.ts.map +1 -1
- package/dist/lexical/ui/icons/Block/index.js +34 -37
- package/dist/lexical/ui/icons/Block/index.js.map +1 -1
- package/dist/lexical/ui/icons/Blockquote/index.d.ts.map +1 -1
- package/dist/lexical/ui/icons/Blockquote/index.js +16 -15
- package/dist/lexical/ui/icons/Blockquote/index.js.map +1 -1
- package/dist/lexical/ui/icons/Bold/index.d.ts.map +1 -1
- package/dist/lexical/ui/icons/Bold/index.js +16 -15
- package/dist/lexical/ui/icons/Bold/index.js.map +1 -1
- package/dist/lexical/ui/icons/Caret/index.svg +2 -2
- package/dist/lexical/ui/icons/Checklist/index.d.ts.map +1 -1
- package/dist/lexical/ui/icons/Checklist/index.js +24 -26
- package/dist/lexical/ui/icons/Checklist/index.js.map +1 -1
- package/dist/lexical/ui/icons/Code/index.d.ts.map +1 -1
- package/dist/lexical/ui/icons/Code/index.js +19 -21
- package/dist/lexical/ui/icons/Code/index.js.map +1 -1
- package/dist/lexical/ui/icons/CodeBlock/index.d.ts.map +1 -1
- package/dist/lexical/ui/icons/CodeBlock/index.js +19 -21
- package/dist/lexical/ui/icons/CodeBlock/index.js.map +1 -1
- package/dist/lexical/ui/icons/H1/index.d.ts.map +1 -1
- package/dist/lexical/ui/icons/H1/index.js +16 -15
- package/dist/lexical/ui/icons/H1/index.js.map +1 -1
- package/dist/lexical/ui/icons/H2/index.d.ts.map +1 -1
- package/dist/lexical/ui/icons/H2/index.js +16 -15
- package/dist/lexical/ui/icons/H2/index.js.map +1 -1
- package/dist/lexical/ui/icons/H3/index.d.ts.map +1 -1
- package/dist/lexical/ui/icons/H3/index.js +16 -15
- 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 +16 -15
- 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 +16 -15
- 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 +16 -15
- package/dist/lexical/ui/icons/H6/index.js.map +1 -1
- package/dist/lexical/ui/icons/HorizontalRule/index.d.ts.map +1 -1
- package/dist/lexical/ui/icons/HorizontalRule/index.js +19 -18
- package/dist/lexical/ui/icons/HorizontalRule/index.js.map +1 -1
- package/dist/lexical/ui/icons/IndentDecrease/index.d.ts.map +1 -1
- package/dist/lexical/ui/icons/IndentDecrease/index.js +28 -32
- package/dist/lexical/ui/icons/IndentDecrease/index.js.map +1 -1
- package/dist/lexical/ui/icons/IndentIncrease/index.d.ts.map +1 -1
- package/dist/lexical/ui/icons/IndentIncrease/index.js +28 -32
- package/dist/lexical/ui/icons/IndentIncrease/index.js.map +1 -1
- package/dist/lexical/ui/icons/InlineBlocks/index.d.ts.map +1 -1
- package/dist/lexical/ui/icons/InlineBlocks/index.js +18 -17
- package/dist/lexical/ui/icons/InlineBlocks/index.js.map +1 -1
- package/dist/lexical/ui/icons/Italic/index.d.ts.map +1 -1
- package/dist/lexical/ui/icons/Italic/index.js +16 -15
- package/dist/lexical/ui/icons/Italic/index.js.map +1 -1
- package/dist/lexical/ui/icons/Link/index.d.ts.map +1 -1
- package/dist/lexical/ui/icons/Link/index.js +17 -16
- package/dist/lexical/ui/icons/Link/index.js.map +1 -1
- package/dist/lexical/ui/icons/Meatballs/index.d.ts.map +1 -1
- package/dist/lexical/ui/icons/Meatballs/index.js +19 -22
- package/dist/lexical/ui/icons/Meatballs/index.js.map +1 -1
- package/dist/lexical/ui/icons/OrderedList/index.d.ts.map +1 -1
- package/dist/lexical/ui/icons/OrderedList/index.js +31 -36
- package/dist/lexical/ui/icons/OrderedList/index.js.map +1 -1
- package/dist/lexical/ui/icons/Relationship/index.d.ts.map +1 -1
- package/dist/lexical/ui/icons/Relationship/index.js +31 -33
- package/dist/lexical/ui/icons/Relationship/index.js.map +1 -1
- package/dist/lexical/ui/icons/Strikethrough/index.d.ts.map +1 -1
- package/dist/lexical/ui/icons/Strikethrough/index.js +19 -21
- package/dist/lexical/ui/icons/Strikethrough/index.js.map +1 -1
- package/dist/lexical/ui/icons/Subscript/index.d.ts.map +1 -1
- package/dist/lexical/ui/icons/Subscript/index.js +16 -15
- package/dist/lexical/ui/icons/Subscript/index.js.map +1 -1
- package/dist/lexical/ui/icons/Superscript/index.d.ts.map +1 -1
- package/dist/lexical/ui/icons/Superscript/index.js +16 -15
- package/dist/lexical/ui/icons/Superscript/index.js.map +1 -1
- package/dist/lexical/ui/icons/Table/index.d.ts.map +1 -1
- package/dist/lexical/ui/icons/Table/index.js +17 -16
- package/dist/lexical/ui/icons/Table/index.js.map +1 -1
- package/dist/lexical/ui/icons/Text/index.d.ts.map +1 -1
- package/dist/lexical/ui/icons/Text/index.js +16 -15
- package/dist/lexical/ui/icons/Text/index.js.map +1 -1
- package/dist/lexical/ui/icons/Underline/index.d.ts.map +1 -1
- package/dist/lexical/ui/icons/Underline/index.js +19 -21
- package/dist/lexical/ui/icons/Underline/index.js.map +1 -1
- package/dist/lexical/ui/icons/UnorderedList/index.d.ts.map +1 -1
- package/dist/lexical/ui/icons/UnorderedList/index.js +46 -52
- package/dist/lexical/ui/icons/UnorderedList/index.js.map +1 -1
- package/dist/lexical/ui/icons/Upload/index.d.ts.map +1 -1
- package/dist/lexical/ui/icons/Upload/index.js +28 -31
- package/dist/lexical/ui/icons/Upload/index.js.map +1 -1
- package/dist/lexical/utils/canUseDOM.d.ts.map +1 -1
- package/dist/lexical/utils/canUseDOM.js +2 -1
- package/dist/lexical/utils/canUseDOM.js.map +1 -1
- package/dist/lexical/utils/environment.d.ts.map +1 -1
- package/dist/lexical/utils/environment.js +2 -1
- package/dist/lexical/utils/environment.js.map +1 -1
- package/dist/lexical/utils/getDOMRangeRect.d.ts.map +1 -1
- package/dist/lexical/utils/getDOMRangeRect.js +13 -12
- package/dist/lexical/utils/getDOMRangeRect.js.map +1 -1
- package/dist/lexical/utils/getSelectedNode.d.ts.map +1 -1
- package/dist/lexical/utils/getSelectedNode.js +18 -13
- package/dist/lexical/utils/getSelectedNode.js.map +1 -1
- package/dist/lexical/utils/guard.d.ts.map +1 -1
- package/dist/lexical/utils/guard.js +3 -2
- package/dist/lexical/utils/guard.js.map +1 -1
- package/dist/lexical/utils/joinClasses.d.ts.map +1 -1
- package/dist/lexical/utils/joinClasses.js +3 -2
- package/dist/lexical/utils/joinClasses.js.map +1 -1
- package/dist/lexical/utils/markdown/createBlockNode.js +9 -10
- package/dist/lexical/utils/markdown/createBlockNode.js.map +1 -1
- package/dist/lexical/utils/nodeFormat.d.ts +2 -2
- package/dist/lexical/utils/nodeFormat.d.ts.map +1 -1
- package/dist/lexical/utils/nodeFormat.js +58 -59
- package/dist/lexical/utils/nodeFormat.js.map +1 -1
- package/dist/lexical/utils/point.d.ts.map +1 -1
- package/dist/lexical/utils/point.js +40 -32
- package/dist/lexical/utils/point.js.map +1 -1
- package/dist/lexical/utils/rect.d.ts +4 -4
- package/dist/lexical/utils/rect.d.ts.map +1 -1
- package/dist/lexical/utils/rect.js +167 -134
- package/dist/lexical/utils/rect.js.map +1 -1
- package/dist/lexical/utils/setFloatingElemPosition.d.ts +1 -1
- package/dist/lexical/utils/setFloatingElemPosition.d.ts.map +1 -1
- package/dist/lexical/utils/setFloatingElemPosition.js +57 -46
- package/dist/lexical/utils/setFloatingElemPosition.js.map +1 -1
- package/dist/lexical/utils/setFloatingElemPositionForLinkEditor.d.ts.map +1 -1
- package/dist/lexical/utils/setFloatingElemPositionForLinkEditor.js +23 -22
- package/dist/lexical/utils/setFloatingElemPositionForLinkEditor.js.map +1 -1
- package/dist/lexical/utils/swipe.d.ts.map +1 -1
- package/dist/lexical/utils/swipe.js +82 -83
- package/dist/lexical/utils/swipe.js.map +1 -1
- package/dist/lexical/utils/url.d.ts +5 -0
- package/dist/lexical/utils/url.d.ts.map +1 -1
- package/dist/lexical/utils/url.js +42 -21
- package/dist/lexical/utils/url.js.map +1 -1
- package/dist/lexical-proxy/@lexical-headless.d.ts +2 -0
- package/dist/lexical-proxy/@lexical-headless.d.ts.map +1 -0
- package/dist/lexical-proxy/@lexical-headless.js +2 -0
- package/dist/lexical-proxy/@lexical-headless.js.map +1 -0
- package/dist/lexical-proxy/@lexical-link.d.ts +2 -0
- package/dist/lexical-proxy/@lexical-link.d.ts.map +1 -0
- package/dist/lexical-proxy/@lexical-link.js +2 -0
- package/dist/lexical-proxy/@lexical-link.js.map +1 -0
- package/dist/lexical-proxy/@lexical-list.d.ts +2 -0
- package/dist/lexical-proxy/@lexical-list.d.ts.map +1 -0
- package/dist/lexical-proxy/@lexical-list.js +2 -0
- package/dist/lexical-proxy/@lexical-list.js.map +1 -0
- package/dist/lexical-proxy/@lexical-mark.d.ts +2 -0
- package/dist/lexical-proxy/@lexical-mark.d.ts.map +1 -0
- package/dist/lexical-proxy/@lexical-mark.js +2 -0
- package/dist/lexical-proxy/@lexical-mark.js.map +1 -0
- package/dist/lexical-proxy/@lexical-markdown.d.ts +2 -0
- package/dist/lexical-proxy/@lexical-markdown.d.ts.map +1 -0
- package/dist/lexical-proxy/@lexical-markdown.js +2 -0
- package/dist/lexical-proxy/@lexical-markdown.js.map +1 -0
- package/dist/lexical-proxy/@lexical-react/LexicalAutoEmbedPlugin.d.ts +2 -0
- package/dist/lexical-proxy/@lexical-react/LexicalAutoEmbedPlugin.d.ts.map +1 -0
- package/dist/lexical-proxy/@lexical-react/LexicalAutoEmbedPlugin.js +2 -0
- package/dist/lexical-proxy/@lexical-react/LexicalAutoEmbedPlugin.js.map +1 -0
- package/dist/lexical-proxy/@lexical-react/LexicalAutoFocusPlugin.d.ts +2 -0
- package/dist/lexical-proxy/@lexical-react/LexicalAutoFocusPlugin.d.ts.map +1 -0
- package/dist/lexical-proxy/@lexical-react/LexicalAutoFocusPlugin.js +2 -0
- package/dist/lexical-proxy/@lexical-react/LexicalAutoFocusPlugin.js.map +1 -0
- package/dist/lexical-proxy/@lexical-react/LexicalAutoLinkPlugin.d.ts +2 -0
- package/dist/lexical-proxy/@lexical-react/LexicalAutoLinkPlugin.d.ts.map +1 -0
- package/dist/lexical-proxy/@lexical-react/LexicalAutoLinkPlugin.js +2 -0
- package/dist/lexical-proxy/@lexical-react/LexicalAutoLinkPlugin.js.map +1 -0
- package/dist/lexical-proxy/@lexical-react/LexicalBlockWithAlignableContents.d.ts +2 -0
- package/dist/lexical-proxy/@lexical-react/LexicalBlockWithAlignableContents.d.ts.map +1 -0
- package/dist/lexical-proxy/@lexical-react/LexicalBlockWithAlignableContents.js +2 -0
- package/dist/lexical-proxy/@lexical-react/LexicalBlockWithAlignableContents.js.map +1 -0
- package/dist/lexical-proxy/@lexical-react/LexicalCharacterLimitPlugin.d.ts +2 -0
- package/dist/lexical-proxy/@lexical-react/LexicalCharacterLimitPlugin.d.ts.map +1 -0
- package/dist/lexical-proxy/@lexical-react/LexicalCharacterLimitPlugin.js +2 -0
- package/dist/lexical-proxy/@lexical-react/LexicalCharacterLimitPlugin.js.map +1 -0
- package/dist/lexical-proxy/@lexical-react/LexicalCheckListPlugin.d.ts +2 -0
- package/dist/lexical-proxy/@lexical-react/LexicalCheckListPlugin.d.ts.map +1 -0
- package/dist/lexical-proxy/@lexical-react/LexicalCheckListPlugin.js +2 -0
- package/dist/lexical-proxy/@lexical-react/LexicalCheckListPlugin.js.map +1 -0
- package/dist/lexical-proxy/@lexical-react/LexicalClearEditorPlugin.d.ts +2 -0
- package/dist/lexical-proxy/@lexical-react/LexicalClearEditorPlugin.d.ts.map +1 -0
- package/dist/lexical-proxy/@lexical-react/LexicalClearEditorPlugin.js +2 -0
- package/dist/lexical-proxy/@lexical-react/LexicalClearEditorPlugin.js.map +1 -0
- package/dist/lexical-proxy/@lexical-react/LexicalClickableLinkPlugin.d.ts +2 -0
- package/dist/lexical-proxy/@lexical-react/LexicalClickableLinkPlugin.d.ts.map +1 -0
- package/dist/lexical-proxy/@lexical-react/LexicalClickableLinkPlugin.js +2 -0
- package/dist/lexical-proxy/@lexical-react/LexicalClickableLinkPlugin.js.map +1 -0
- package/dist/lexical-proxy/@lexical-react/LexicalCollaborationContext.d.ts +2 -0
- package/dist/lexical-proxy/@lexical-react/LexicalCollaborationContext.d.ts.map +1 -0
- package/dist/lexical-proxy/@lexical-react/LexicalCollaborationContext.js +2 -0
- package/dist/lexical-proxy/@lexical-react/LexicalCollaborationContext.js.map +1 -0
- package/dist/lexical-proxy/@lexical-react/LexicalCollaborationPlugin.d.ts +2 -0
- package/dist/lexical-proxy/@lexical-react/LexicalCollaborationPlugin.d.ts.map +1 -0
- package/dist/lexical-proxy/@lexical-react/LexicalCollaborationPlugin.js +2 -0
- package/dist/lexical-proxy/@lexical-react/LexicalCollaborationPlugin.js.map +1 -0
- package/dist/lexical-proxy/@lexical-react/LexicalComposer.d.ts +2 -0
- package/dist/lexical-proxy/@lexical-react/LexicalComposer.d.ts.map +1 -0
- package/dist/lexical-proxy/@lexical-react/LexicalComposer.js +2 -0
- package/dist/lexical-proxy/@lexical-react/LexicalComposer.js.map +1 -0
- package/dist/lexical-proxy/@lexical-react/LexicalComposerContext.d.ts +2 -0
- package/dist/lexical-proxy/@lexical-react/LexicalComposerContext.d.ts.map +1 -0
- package/dist/lexical-proxy/@lexical-react/LexicalComposerContext.js +2 -0
- package/dist/lexical-proxy/@lexical-react/LexicalComposerContext.js.map +1 -0
- package/dist/lexical-proxy/@lexical-react/LexicalContentEditable.d.ts +2 -0
- package/dist/lexical-proxy/@lexical-react/LexicalContentEditable.d.ts.map +1 -0
- package/dist/lexical-proxy/@lexical-react/LexicalContentEditable.js +2 -0
- package/dist/lexical-proxy/@lexical-react/LexicalContentEditable.js.map +1 -0
- package/dist/lexical-proxy/@lexical-react/LexicalContextMenuPlugin.d.ts +2 -0
- package/dist/lexical-proxy/@lexical-react/LexicalContextMenuPlugin.d.ts.map +1 -0
- package/dist/lexical-proxy/@lexical-react/LexicalContextMenuPlugin.js +2 -0
- package/dist/lexical-proxy/@lexical-react/LexicalContextMenuPlugin.js.map +1 -0
- package/dist/lexical-proxy/@lexical-react/LexicalDecoratorBlockNode.d.ts +2 -0
- package/dist/lexical-proxy/@lexical-react/LexicalDecoratorBlockNode.d.ts.map +1 -0
- package/dist/lexical-proxy/@lexical-react/LexicalDecoratorBlockNode.js +2 -0
- package/dist/lexical-proxy/@lexical-react/LexicalDecoratorBlockNode.js.map +1 -0
- package/dist/lexical-proxy/@lexical-react/LexicalDraggableBlockPlugin.d.ts +2 -0
- package/dist/lexical-proxy/@lexical-react/LexicalDraggableBlockPlugin.d.ts.map +1 -0
- package/dist/lexical-proxy/@lexical-react/LexicalDraggableBlockPlugin.js +2 -0
- package/dist/lexical-proxy/@lexical-react/LexicalDraggableBlockPlugin.js.map +1 -0
- package/dist/lexical-proxy/@lexical-react/LexicalEditorRefPlugin.d.ts +2 -0
- package/dist/lexical-proxy/@lexical-react/LexicalEditorRefPlugin.d.ts.map +1 -0
- package/dist/lexical-proxy/@lexical-react/LexicalEditorRefPlugin.js +2 -0
- package/dist/lexical-proxy/@lexical-react/LexicalEditorRefPlugin.js.map +1 -0
- package/dist/lexical-proxy/@lexical-react/LexicalErrorBoundary.d.ts +2 -0
- package/dist/lexical-proxy/@lexical-react/LexicalErrorBoundary.d.ts.map +1 -0
- package/dist/lexical-proxy/@lexical-react/LexicalErrorBoundary.js +2 -0
- package/dist/lexical-proxy/@lexical-react/LexicalErrorBoundary.js.map +1 -0
- package/dist/lexical-proxy/@lexical-react/LexicalHashtagPlugin.d.ts +2 -0
- package/dist/lexical-proxy/@lexical-react/LexicalHashtagPlugin.d.ts.map +1 -0
- package/dist/lexical-proxy/@lexical-react/LexicalHashtagPlugin.js +2 -0
- package/dist/lexical-proxy/@lexical-react/LexicalHashtagPlugin.js.map +1 -0
- package/dist/lexical-proxy/@lexical-react/LexicalHistoryPlugin.d.ts +2 -0
- package/dist/lexical-proxy/@lexical-react/LexicalHistoryPlugin.d.ts.map +1 -0
- package/dist/lexical-proxy/@lexical-react/LexicalHistoryPlugin.js +2 -0
- package/dist/lexical-proxy/@lexical-react/LexicalHistoryPlugin.js.map +1 -0
- package/dist/lexical-proxy/@lexical-react/LexicalHorizontalRuleNode.d.ts +2 -0
- package/dist/lexical-proxy/@lexical-react/LexicalHorizontalRuleNode.d.ts.map +1 -0
- package/dist/lexical-proxy/@lexical-react/LexicalHorizontalRuleNode.js +2 -0
- package/dist/lexical-proxy/@lexical-react/LexicalHorizontalRuleNode.js.map +1 -0
- package/dist/lexical-proxy/@lexical-react/LexicalHorizontalRulePlugin.d.ts +2 -0
- package/dist/lexical-proxy/@lexical-react/LexicalHorizontalRulePlugin.d.ts.map +1 -0
- package/dist/lexical-proxy/@lexical-react/LexicalHorizontalRulePlugin.js +2 -0
- package/dist/lexical-proxy/@lexical-react/LexicalHorizontalRulePlugin.js.map +1 -0
- package/dist/lexical-proxy/@lexical-react/LexicalLinkPlugin.d.ts +2 -0
- package/dist/lexical-proxy/@lexical-react/LexicalLinkPlugin.d.ts.map +1 -0
- package/dist/lexical-proxy/@lexical-react/LexicalLinkPlugin.js +2 -0
- package/dist/lexical-proxy/@lexical-react/LexicalLinkPlugin.js.map +1 -0
- package/dist/lexical-proxy/@lexical-react/LexicalListPlugin.d.ts +2 -0
- package/dist/lexical-proxy/@lexical-react/LexicalListPlugin.d.ts.map +1 -0
- package/dist/lexical-proxy/@lexical-react/LexicalListPlugin.js +2 -0
- package/dist/lexical-proxy/@lexical-react/LexicalListPlugin.js.map +1 -0
- package/dist/lexical-proxy/@lexical-react/LexicalMarkdownShortcutPlugin.d.ts +2 -0
- package/dist/lexical-proxy/@lexical-react/LexicalMarkdownShortcutPlugin.d.ts.map +1 -0
- package/dist/lexical-proxy/@lexical-react/LexicalMarkdownShortcutPlugin.js +2 -0
- package/dist/lexical-proxy/@lexical-react/LexicalMarkdownShortcutPlugin.js.map +1 -0
- package/dist/lexical-proxy/@lexical-react/LexicalNestedComposer.d.ts +2 -0
- package/dist/lexical-proxy/@lexical-react/LexicalNestedComposer.d.ts.map +1 -0
- package/dist/lexical-proxy/@lexical-react/LexicalNestedComposer.js +2 -0
- package/dist/lexical-proxy/@lexical-react/LexicalNestedComposer.js.map +1 -0
- package/dist/lexical-proxy/@lexical-react/LexicalNodeEventPlugin.d.ts +2 -0
- package/dist/lexical-proxy/@lexical-react/LexicalNodeEventPlugin.d.ts.map +1 -0
- package/dist/lexical-proxy/@lexical-react/LexicalNodeEventPlugin.js +2 -0
- package/dist/lexical-proxy/@lexical-react/LexicalNodeEventPlugin.js.map +1 -0
- package/dist/lexical-proxy/@lexical-react/LexicalNodeMenuPlugin.d.ts +2 -0
- package/dist/lexical-proxy/@lexical-react/LexicalNodeMenuPlugin.d.ts.map +1 -0
- package/dist/lexical-proxy/@lexical-react/LexicalNodeMenuPlugin.js +2 -0
- package/dist/lexical-proxy/@lexical-react/LexicalNodeMenuPlugin.js.map +1 -0
- package/dist/lexical-proxy/@lexical-react/LexicalOnChangePlugin.d.ts +2 -0
- package/dist/lexical-proxy/@lexical-react/LexicalOnChangePlugin.d.ts.map +1 -0
- package/dist/lexical-proxy/@lexical-react/LexicalOnChangePlugin.js +2 -0
- package/dist/lexical-proxy/@lexical-react/LexicalOnChangePlugin.js.map +1 -0
- package/dist/lexical-proxy/@lexical-react/LexicalPlainTextPlugin.d.ts +2 -0
- package/dist/lexical-proxy/@lexical-react/LexicalPlainTextPlugin.d.ts.map +1 -0
- package/dist/lexical-proxy/@lexical-react/LexicalPlainTextPlugin.js +2 -0
- package/dist/lexical-proxy/@lexical-react/LexicalPlainTextPlugin.js.map +1 -0
- package/dist/lexical-proxy/@lexical-react/LexicalRichTextPlugin.d.ts +2 -0
- package/dist/lexical-proxy/@lexical-react/LexicalRichTextPlugin.d.ts.map +1 -0
- package/dist/lexical-proxy/@lexical-react/LexicalRichTextPlugin.js +2 -0
- package/dist/lexical-proxy/@lexical-react/LexicalRichTextPlugin.js.map +1 -0
- package/dist/lexical-proxy/@lexical-react/LexicalTabIndentationPlugin.d.ts +2 -0
- package/dist/lexical-proxy/@lexical-react/LexicalTabIndentationPlugin.d.ts.map +1 -0
- package/dist/lexical-proxy/@lexical-react/LexicalTabIndentationPlugin.js +2 -0
- package/dist/lexical-proxy/@lexical-react/LexicalTabIndentationPlugin.js.map +1 -0
- package/dist/lexical-proxy/@lexical-react/LexicalTableOfContents.d.ts +2 -0
- package/dist/lexical-proxy/@lexical-react/LexicalTableOfContents.d.ts.map +1 -0
- package/dist/lexical-proxy/@lexical-react/LexicalTableOfContents.js +2 -0
- package/dist/lexical-proxy/@lexical-react/LexicalTableOfContents.js.map +1 -0
- package/dist/lexical-proxy/@lexical-react/LexicalTableOfContentsPlugin.d.ts +2 -0
- package/dist/lexical-proxy/@lexical-react/LexicalTableOfContentsPlugin.d.ts.map +1 -0
- package/dist/lexical-proxy/@lexical-react/LexicalTableOfContentsPlugin.js +2 -0
- package/dist/lexical-proxy/@lexical-react/LexicalTableOfContentsPlugin.js.map +1 -0
- package/dist/lexical-proxy/@lexical-react/LexicalTablePlugin.d.ts +2 -0
- package/dist/lexical-proxy/@lexical-react/LexicalTablePlugin.d.ts.map +1 -0
- package/dist/lexical-proxy/@lexical-react/LexicalTablePlugin.js +2 -0
- package/dist/lexical-proxy/@lexical-react/LexicalTablePlugin.js.map +1 -0
- package/dist/lexical-proxy/@lexical-react/LexicalTreeView.d.ts +2 -0
- package/dist/lexical-proxy/@lexical-react/LexicalTreeView.d.ts.map +1 -0
- package/dist/lexical-proxy/@lexical-react/LexicalTreeView.js +2 -0
- package/dist/lexical-proxy/@lexical-react/LexicalTreeView.js.map +1 -0
- package/dist/lexical-proxy/@lexical-react/LexicalTypeaheadMenuPlugin.d.ts +2 -0
- package/dist/lexical-proxy/@lexical-react/LexicalTypeaheadMenuPlugin.d.ts.map +1 -0
- package/dist/lexical-proxy/@lexical-react/LexicalTypeaheadMenuPlugin.js +2 -0
- package/dist/lexical-proxy/@lexical-react/LexicalTypeaheadMenuPlugin.js.map +1 -0
- package/dist/lexical-proxy/@lexical-react/useLexicalEditable.d.ts +2 -0
- package/dist/lexical-proxy/@lexical-react/useLexicalEditable.d.ts.map +1 -0
- package/dist/lexical-proxy/@lexical-react/useLexicalEditable.js +2 -0
- package/dist/lexical-proxy/@lexical-react/useLexicalEditable.js.map +1 -0
- package/dist/lexical-proxy/@lexical-react/useLexicalIsTextContentEmpty.d.ts +2 -0
- package/dist/lexical-proxy/@lexical-react/useLexicalIsTextContentEmpty.d.ts.map +1 -0
- package/dist/lexical-proxy/@lexical-react/useLexicalIsTextContentEmpty.js +2 -0
- package/dist/lexical-proxy/@lexical-react/useLexicalIsTextContentEmpty.js.map +1 -0
- package/dist/lexical-proxy/@lexical-react/useLexicalNodeSelection.d.ts +2 -0
- package/dist/lexical-proxy/@lexical-react/useLexicalNodeSelection.d.ts.map +1 -0
- package/dist/lexical-proxy/@lexical-react/useLexicalNodeSelection.js +2 -0
- package/dist/lexical-proxy/@lexical-react/useLexicalNodeSelection.js.map +1 -0
- package/dist/lexical-proxy/@lexical-react/useLexicalSubscription.d.ts +2 -0
- package/dist/lexical-proxy/@lexical-react/useLexicalSubscription.d.ts.map +1 -0
- package/dist/lexical-proxy/@lexical-react/useLexicalSubscription.js +2 -0
- package/dist/lexical-proxy/@lexical-react/useLexicalSubscription.js.map +1 -0
- package/dist/lexical-proxy/@lexical-react/useLexicalTextEntity.d.ts +2 -0
- package/dist/lexical-proxy/@lexical-react/useLexicalTextEntity.d.ts.map +1 -0
- package/dist/lexical-proxy/@lexical-react/useLexicalTextEntity.js +2 -0
- package/dist/lexical-proxy/@lexical-react/useLexicalTextEntity.js.map +1 -0
- package/dist/lexical-proxy/@lexical-rich-text.d.ts +2 -0
- package/dist/lexical-proxy/@lexical-rich-text.d.ts.map +1 -0
- package/dist/lexical-proxy/@lexical-rich-text.js +2 -0
- package/dist/lexical-proxy/@lexical-rich-text.js.map +1 -0
- package/dist/lexical-proxy/@lexical-selection.d.ts +2 -0
- package/dist/lexical-proxy/@lexical-selection.d.ts.map +1 -0
- package/dist/lexical-proxy/@lexical-selection.js +2 -0
- package/dist/lexical-proxy/@lexical-selection.js.map +1 -0
- package/dist/lexical-proxy/@lexical-utils.d.ts +2 -0
- package/dist/lexical-proxy/@lexical-utils.d.ts.map +1 -0
- package/dist/lexical-proxy/@lexical-utils.js +2 -0
- package/dist/lexical-proxy/@lexical-utils.js.map +1 -0
- package/dist/lexical-proxy/lexical.d.ts +2 -0
- package/dist/lexical-proxy/lexical.d.ts.map +1 -0
- package/dist/lexical-proxy/lexical.js +2 -0
- package/dist/lexical-proxy/lexical.js.map +1 -0
- package/dist/nodeTypes.d.ts +8 -8
- package/dist/nodeTypes.d.ts.map +1 -1
- package/dist/nodeTypes.js +1 -2
- package/dist/nodeTypes.js.map +1 -1
- package/dist/populateGraphQL/defaultValue.js +24 -29
- package/dist/populateGraphQL/defaultValue.js.map +1 -1
- package/dist/populateGraphQL/populate.d.ts +3 -2
- package/dist/populateGraphQL/populate.d.ts.map +1 -1
- package/dist/populateGraphQL/populate.js +37 -25
- package/dist/populateGraphQL/populate.js.map +1 -1
- package/dist/populateGraphQL/populateLexicalPopulationPromises.d.ts +1 -1
- package/dist/populateGraphQL/populateLexicalPopulationPromises.d.ts.map +1 -1
- package/dist/populateGraphQL/populateLexicalPopulationPromises.js +48 -32
- package/dist/populateGraphQL/populateLexicalPopulationPromises.js.map +1 -1
- package/dist/populateGraphQL/recursivelyPopulateFieldsForGraphQL.js +39 -25
- package/dist/populateGraphQL/recursivelyPopulateFieldsForGraphQL.js.map +1 -1
- package/dist/types.d.ts +26 -13
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js +1 -2
- package/dist/types.js.map +1 -1
- package/dist/utilities/buildInitialState.d.ts +27 -0
- package/dist/utilities/buildInitialState.d.ts.map +1 -0
- package/dist/utilities/buildInitialState.js +53 -0
- package/dist/utilities/buildInitialState.js.map +1 -0
- package/dist/utilities/createClientFeature.d.ts +8 -5
- package/dist/utilities/createClientFeature.d.ts.map +1 -1
- package/dist/utilities/createClientFeature.js +44 -27
- package/dist/utilities/createClientFeature.js.map +1 -1
- package/dist/utilities/createServerFeature.d.ts +1 -0
- package/dist/utilities/createServerFeature.d.ts.map +1 -1
- package/dist/utilities/createServerFeature.js +48 -31
- package/dist/utilities/createServerFeature.js.map +1 -1
- package/dist/utilities/fieldsDrawer/Drawer.d.ts +11 -8
- package/dist/utilities/fieldsDrawer/Drawer.d.ts.map +1 -1
- package/dist/utilities/fieldsDrawer/Drawer.js +67 -13
- 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 +117 -82
- package/dist/utilities/fieldsDrawer/DrawerContent.js.map +1 -1
- package/dist/utilities/fieldsDrawer/useLexicalDocumentDrawer.d.ts +13 -0
- package/dist/utilities/fieldsDrawer/useLexicalDocumentDrawer.d.ts.map +1 -0
- package/dist/utilities/fieldsDrawer/useLexicalDocumentDrawer.js +129 -0
- package/dist/utilities/fieldsDrawer/useLexicalDocumentDrawer.js.map +1 -0
- package/dist/utilities/fieldsDrawer/useLexicalDrawer.d.ts +10 -0
- package/dist/utilities/fieldsDrawer/useLexicalDrawer.d.ts.map +1 -0
- package/dist/utilities/fieldsDrawer/useLexicalDrawer.js +136 -0
- package/dist/utilities/fieldsDrawer/useLexicalDrawer.js.map +1 -0
- package/dist/utilities/fieldsDrawer/useLexicalListDrawer.d.ts +16 -0
- package/dist/utilities/fieldsDrawer/useLexicalListDrawer.d.ts.map +1 -0
- package/dist/utilities/fieldsDrawer/useLexicalListDrawer.js +144 -0
- package/dist/utilities/fieldsDrawer/useLexicalListDrawer.js.map +1 -0
- package/dist/utilities/forEachNodeRecursively.js +24 -19
- package/dist/utilities/forEachNodeRecursively.js.map +1 -1
- package/dist/utilities/generateImportMap.d.ts +6 -0
- package/dist/utilities/generateImportMap.d.ts.map +1 -0
- package/dist/utilities/generateImportMap.js +55 -0
- package/dist/utilities/generateImportMap.js.map +1 -0
- package/dist/utilities/generateSchemaMap.d.ts.map +1 -1
- package/dist/utilities/generateSchemaMap.js +37 -28
- package/dist/utilities/generateSchemaMap.js.map +1 -1
- package/dist/utilities/initLexicalFeatures.d.ts +18 -0
- package/dist/utilities/initLexicalFeatures.d.ts.map +1 -0
- package/dist/utilities/initLexicalFeatures.js +96 -0
- package/dist/utilities/initLexicalFeatures.js.map +1 -0
- package/dist/utilities/jsx/collectTopLevelJSXInLines.d.ts +52 -0
- package/dist/utilities/jsx/collectTopLevelJSXInLines.d.ts.map +1 -0
- package/dist/utilities/jsx/collectTopLevelJSXInLines.js +79 -0
- package/dist/utilities/jsx/collectTopLevelJSXInLines.js.map +1 -0
- package/dist/utilities/jsx/extractPropsFromJSXPropsString.d.ts +12 -0
- package/dist/utilities/jsx/extractPropsFromJSXPropsString.d.ts.map +1 -0
- package/dist/utilities/jsx/extractPropsFromJSXPropsString.js +125 -0
- package/dist/utilities/jsx/extractPropsFromJSXPropsString.js.map +1 -0
- package/dist/utilities/jsx/jsx.d.ts +26 -0
- package/dist/utilities/jsx/jsx.d.ts.map +1 -0
- package/dist/utilities/jsx/jsx.js +105 -0
- package/dist/utilities/jsx/jsx.js.map +1 -0
- package/dist/utilities/jsx/jsx.spec.d.ts +2 -0
- package/dist/utilities/jsx/jsx.spec.d.ts.map +1 -0
- package/dist/utilities/jsx/jsx.spec.js +142 -0
- package/dist/utilities/jsx/jsx.spec.js.map +1 -0
- package/dist/utilities/jsx/lexicalMarkdownCopy.d.ts +11 -0
- package/dist/utilities/jsx/lexicalMarkdownCopy.d.ts.map +1 -0
- package/dist/utilities/jsx/lexicalMarkdownCopy.js +61 -0
- package/dist/utilities/jsx/lexicalMarkdownCopy.js.map +1 -0
- package/dist/utilities/migrateSlateToLexical/index.d.ts.map +1 -1
- package/dist/utilities/migrateSlateToLexical/index.js +125 -81
- package/dist/utilities/migrateSlateToLexical/index.js.map +1 -1
- package/dist/utilities/migrateSlateToLexical/migrateDocumentFieldsRecursively.d.ts +1 -1
- package/dist/utilities/migrateSlateToLexical/migrateDocumentFieldsRecursively.d.ts.map +1 -1
- package/dist/utilities/migrateSlateToLexical/migrateDocumentFieldsRecursively.js +73 -70
- package/dist/utilities/migrateSlateToLexical/migrateDocumentFieldsRecursively.js.map +1 -1
- package/dist/utilities/recurseNodeTree.js +25 -22
- package/dist/utilities/recurseNodeTree.js.map +1 -1
- package/dist/utilities/upgradeLexicalData/index.js +99 -86
- package/dist/utilities/upgradeLexicalData/index.js.map +1 -1
- package/dist/utilities/upgradeLexicalData/upgradeDocumentFieldsRecursively.d.ts +1 -1
- package/dist/utilities/upgradeLexicalData/upgradeDocumentFieldsRecursively.d.ts.map +1 -1
- package/dist/utilities/upgradeLexicalData/upgradeDocumentFieldsRecursively.js +75 -66
- package/dist/utilities/upgradeLexicalData/upgradeDocumentFieldsRecursively.js.map +1 -1
- package/dist/utilities/useLexicalFeature.d.ts.map +1 -1
- package/dist/utilities/useLexicalFeature.js +18 -9
- package/dist/utilities/useLexicalFeature.js.map +1 -1
- package/dist/validate/index.d.ts.map +1 -1
- package/dist/validate/index.js +45 -24
- package/dist/validate/index.js.map +1 -1
- package/dist/validate/validateNodes.d.ts +2 -2
- package/dist/validate/validateNodes.d.ts.map +1 -1
- package/dist/validate/validateNodes.js +31 -28
- package/dist/validate/validateNodes.js.map +1 -1
- package/package.json +352 -45
- package/dist/cell/index.d.ts +0 -9
- package/dist/cell/index.d.ts.map +0 -1
- package/dist/cell/index.js +0 -145
- package/dist/cell/index.js.map +0 -1
- package/dist/exports/client/Component-7HS6FEJS.js +0 -2
- package/dist/exports/client/Component-7HS6FEJS.js.map +0 -7
- package/dist/exports/client/Component-LAKSCIDX.js +0 -2
- package/dist/exports/client/Component-LAKSCIDX.js.map +0 -7
- package/dist/exports/client/Field-5GGTGCKC.js +0 -2
- package/dist/exports/client/Field-5GGTGCKC.js.map +0 -7
- package/dist/exports/client/RelationshipComponent-ZR2OCBGL.js +0 -2
- package/dist/exports/client/RelationshipComponent-ZR2OCBGL.js.map +0 -7
- package/dist/exports/client/chunk-6QXGZYUK.js +0 -2
- package/dist/exports/client/chunk-6QXGZYUK.js.map +0 -7
- package/dist/exports/client/chunk-EBB2CEB6.js +0 -2
- package/dist/exports/client/chunk-EBB2CEB6.js.map +0 -7
- package/dist/exports/client/chunk-IPCJ5EVK.js +0 -2
- package/dist/exports/client/chunk-IPCJ5EVK.js.map +0 -7
- package/dist/exports/client/chunk-IWZVO3AI.js +0 -2
- package/dist/exports/client/chunk-IWZVO3AI.js.map +0 -7
- package/dist/exports/client/chunk-Q5DYR7MH.js +0 -3
- package/dist/exports/client/chunk-Q5DYR7MH.js.map +0 -7
- package/dist/exports/client/chunk-VUVXZJJR.js +0 -2
- package/dist/exports/client/chunk-VUVXZJJR.js.map +0 -7
- package/dist/exports/client/component-D4GWDXK5.js +0 -2
- package/dist/exports/client/component-D4GWDXK5.js.map +0 -7
- package/dist/exports/client/component-KA7FDRMA.js +0 -2
- package/dist/exports/client/component-KA7FDRMA.js.map +0 -7
- package/dist/exports/client/component-VM36FRT2.js +0 -2
- package/dist/exports/client/component-VM36FRT2.js.map +0 -7
- package/dist/exports/client/componentInline-6EKPZSCV.js +0 -2
- package/dist/exports/client/componentInline-6EKPZSCV.js.map +0 -7
- package/dist/features/align/feature.client.d.ts +0 -5
- package/dist/features/align/feature.client.d.ts.map +0 -1
- package/dist/features/align/feature.client.js +0 -146
- package/dist/features/align/feature.client.js.map +0 -1
- package/dist/features/align/feature.server.d.ts +0 -2
- package/dist/features/align/feature.server.d.ts.map +0 -1
- package/dist/features/align/feature.server.js +0 -13
- package/dist/features/align/feature.server.js.map +0 -1
- package/dist/features/align/i18n.d.ts.map +0 -1
- package/dist/features/align/i18n.js +0 -196
- package/dist/features/align/i18n.js.map +0 -1
- package/dist/features/align/toolbarAlignGroup.d.ts +0 -3
- package/dist/features/align/toolbarAlignGroup.d.ts.map +0 -1
- package/dist/features/align/toolbarAlignGroup.js +0 -12
- package/dist/features/align/toolbarAlignGroup.js.map +0 -1
- package/dist/features/blockquote/feature.client.d.ts +0 -5
- package/dist/features/blockquote/feature.client.d.ts.map +0 -1
- package/dist/features/blockquote/feature.client.js +0 -77
- package/dist/features/blockquote/feature.client.js.map +0 -1
- package/dist/features/blockquote/feature.server.d.ts +0 -7
- package/dist/features/blockquote/feature.server.d.ts.map +0 -1
- package/dist/features/blockquote/feature.server.js +0 -48
- package/dist/features/blockquote/feature.server.js.map +0 -1
- package/dist/features/blockquote/i18n.d.ts.map +0 -1
- package/dist/features/blockquote/i18n.js +0 -100
- package/dist/features/blockquote/i18n.js.map +0 -1
- package/dist/features/blocks/component/BlockContent.d.ts +0 -27
- package/dist/features/blocks/component/BlockContent.d.ts.map +0 -1
- package/dist/features/blocks/component/BlockContent.js +0 -196
- package/dist/features/blocks/component/BlockContent.js.map +0 -1
- package/dist/features/blocks/component/FormSavePlugin.d.ts +0 -11
- package/dist/features/blocks/component/FormSavePlugin.d.ts.map +0 -1
- package/dist/features/blocks/component/FormSavePlugin.js +0 -29
- package/dist/features/blocks/component/FormSavePlugin.js.map +0 -1
- package/dist/features/blocks/component/index.d.ts +0 -11
- package/dist/features/blocks/component/index.d.ts.map +0 -1
- package/dist/features/blocks/component/index.js +0 -162
- package/dist/features/blocks/component/index.js.map +0 -1
- package/dist/features/blocks/component/removeEmptyArrayValues.d.ts.map +0 -1
- package/dist/features/blocks/component/removeEmptyArrayValues.js +0 -16
- package/dist/features/blocks/component/removeEmptyArrayValues.js.map +0 -1
- package/dist/features/blocks/componentInline/index.d.ts +0 -10
- package/dist/features/blocks/componentInline/index.d.ts.map +0 -1
- package/dist/features/blocks/componentInline/index.js +0 -133
- package/dist/features/blocks/componentInline/index.js.map +0 -1
- package/dist/features/blocks/feature.client.d.ts +0 -13
- package/dist/features/blocks/feature.client.d.ts.map +0 -1
- package/dist/features/blocks/feature.client.js +0 -148
- package/dist/features/blocks/feature.client.js.map +0 -1
- package/dist/features/blocks/feature.server.d.ts +0 -8
- package/dist/features/blocks/feature.server.d.ts.map +0 -1
- package/dist/features/blocks/feature.server.js +0 -160
- package/dist/features/blocks/feature.server.js.map +0 -1
- package/dist/features/blocks/graphQLPopulationPromise.d.ts +0 -6
- package/dist/features/blocks/graphQLPopulationPromise.d.ts.map +0 -1
- package/dist/features/blocks/graphQLPopulationPromise.js +0 -31
- package/dist/features/blocks/graphQLPopulationPromise.js.map +0 -1
- package/dist/features/blocks/i18n.d.ts.map +0 -1
- package/dist/features/blocks/i18n.js +0 -292
- package/dist/features/blocks/i18n.js.map +0 -1
- package/dist/features/blocks/nodes/BlocksNode.d.ts +0 -38
- package/dist/features/blocks/nodes/BlocksNode.d.ts.map +0 -1
- package/dist/features/blocks/nodes/BlocksNode.js +0 -92
- package/dist/features/blocks/nodes/BlocksNode.js.map +0 -1
- package/dist/features/blocks/nodes/InlineBlocksNode.d.ts +0 -39
- package/dist/features/blocks/nodes/InlineBlocksNode.d.ts.map +0 -1
- package/dist/features/blocks/nodes/InlineBlocksNode.js +0 -94
- package/dist/features/blocks/nodes/InlineBlocksNode.js.map +0 -1
- package/dist/features/blocks/plugin/commands.d.ts +0 -9
- package/dist/features/blocks/plugin/commands.d.ts.map +0 -1
- package/dist/features/blocks/plugin/commands.js +0 -6
- package/dist/features/blocks/plugin/commands.js.map +0 -1
- package/dist/features/blocks/plugin/index.d.ts +0 -6
- package/dist/features/blocks/plugin/index.d.ts.map +0 -1
- package/dist/features/blocks/plugin/index.js +0 -111
- package/dist/features/blocks/plugin/index.js.map +0 -1
- package/dist/features/blocks/validate.d.ts +0 -6
- package/dist/features/blocks/validate.d.ts.map +0 -1
- package/dist/features/blocks/validate.js +0 -37
- package/dist/features/blocks/validate.js.map +0 -1
- package/dist/features/converters/html/feature.server.d.ts +0 -8
- package/dist/features/converters/html/feature.server.d.ts.map +0 -1
- package/dist/features/converters/html/feature.server.js +0 -8
- package/dist/features/converters/html/feature.server.js.map +0 -1
- package/dist/features/createClientComponent.d.ts +0 -7
- package/dist/features/createClientComponent.d.ts.map +0 -1
- package/dist/features/createClientComponent.js +0 -12
- package/dist/features/createClientComponent.js.map +0 -1
- package/dist/features/createFeaturePropComponent.d.ts +0 -6
- package/dist/features/createFeaturePropComponent.d.ts.map +0 -1
- package/dist/features/createFeaturePropComponent.js +0 -18
- package/dist/features/createFeaturePropComponent.js.map +0 -1
- package/dist/features/debug/testRecorder/feature.client.d.ts +0 -5
- package/dist/features/debug/testRecorder/feature.client.d.ts.map +0 -1
- package/dist/features/debug/testRecorder/feature.client.js +0 -13
- package/dist/features/debug/testRecorder/feature.client.js.map +0 -1
- package/dist/features/debug/testRecorder/feature.server.d.ts +0 -2
- package/dist/features/debug/testRecorder/feature.server.d.ts.map +0 -1
- package/dist/features/debug/testRecorder/feature.server.js +0 -11
- package/dist/features/debug/testRecorder/feature.server.js.map +0 -1
- package/dist/features/debug/testRecorder/plugin/index.d.ts +0 -5
- package/dist/features/debug/testRecorder/plugin/index.d.ts.map +0 -1
- package/dist/features/debug/testRecorder/plugin/index.js +0 -471
- package/dist/features/debug/testRecorder/plugin/index.js.map +0 -1
- package/dist/features/debug/treeView/feature.client.d.ts +0 -5
- package/dist/features/debug/treeView/feature.client.d.ts.map +0 -1
- package/dist/features/debug/treeView/feature.client.js +0 -13
- package/dist/features/debug/treeView/feature.client.js.map +0 -1
- package/dist/features/debug/treeView/feature.server.d.ts +0 -2
- package/dist/features/debug/treeView/feature.server.d.ts.map +0 -1
- package/dist/features/debug/treeView/feature.server.js +0 -11
- package/dist/features/debug/treeView/feature.server.js.map +0 -1
- package/dist/features/debug/treeView/plugin/index.d.ts +0 -4
- package/dist/features/debug/treeView/plugin/index.d.ts.map +0 -1
- package/dist/features/debug/treeView/plugin/index.js +0 -19
- package/dist/features/debug/treeView/plugin/index.js.map +0 -1
- package/dist/features/experimental_table/feature.client.d.ts +0 -2
- package/dist/features/experimental_table/feature.client.d.ts.map +0 -1
- package/dist/features/experimental_table/feature.client.js +0 -71
- package/dist/features/experimental_table/feature.client.js.map +0 -1
- package/dist/features/experimental_table/feature.server.d.ts +0 -13
- package/dist/features/experimental_table/feature.server.d.ts.map +0 -1
- package/dist/features/experimental_table/feature.server.js +0 -125
- package/dist/features/experimental_table/feature.server.js.map +0 -1
- package/dist/features/experimental_table/plugins/TableActionMenuPlugin/index.d.ts +0 -4
- package/dist/features/experimental_table/plugins/TableActionMenuPlugin/index.d.ts.map +0 -1
- package/dist/features/experimental_table/plugins/TableActionMenuPlugin/index.js +0 -604
- package/dist/features/experimental_table/plugins/TableActionMenuPlugin/index.js.map +0 -1
- package/dist/features/experimental_table/plugins/TableCellResizerPlugin/index.d.ts +0 -3
- package/dist/features/experimental_table/plugins/TableCellResizerPlugin/index.d.ts.map +0 -1
- package/dist/features/experimental_table/plugins/TableCellResizerPlugin/index.js +0 -327
- package/dist/features/experimental_table/plugins/TableCellResizerPlugin/index.js.map +0 -1
- package/dist/features/experimental_table/plugins/TableHoverActionsPlugin/index.d.ts +0 -12
- package/dist/features/experimental_table/plugins/TableHoverActionsPlugin/index.d.ts.map +0 -1
- package/dist/features/experimental_table/plugins/TableHoverActionsPlugin/index.js +0 -181
- package/dist/features/experimental_table/plugins/TableHoverActionsPlugin/index.js.map +0 -1
- package/dist/features/experimental_table/plugins/TablePlugin/index.d.ts +0 -24
- package/dist/features/experimental_table/plugins/TablePlugin/index.d.ts.map +0 -1
- package/dist/features/experimental_table/plugins/TablePlugin/index.js +0 -98
- package/dist/features/experimental_table/plugins/TablePlugin/index.js.map +0 -1
- package/dist/features/experimental_table/utils/debounce.d.ts.map +0 -1
- package/dist/features/experimental_table/utils/debounce.js +0 -202
- package/dist/features/experimental_table/utils/debounce.js.map +0 -1
- package/dist/features/experimental_table/utils/useDebounce.d.ts.map +0 -1
- package/dist/features/experimental_table/utils/useDebounce.js +0 -18
- package/dist/features/experimental_table/utils/useDebounce.js.map +0 -1
- package/dist/features/heading/feature.client.d.ts +0 -6
- package/dist/features/heading/feature.client.d.ts.map +0 -1
- package/dist/features/heading/feature.client.js +0 -112
- package/dist/features/heading/feature.client.js.map +0 -1
- package/dist/features/heading/feature.server.d.ts +0 -10
- package/dist/features/heading/feature.server.d.ts.map +0 -1
- package/dist/features/heading/feature.server.js +0 -62
- package/dist/features/heading/feature.server.js.map +0 -1
- package/dist/features/heading/i18n.d.ts.map +0 -1
- package/dist/features/heading/i18n.js +0 -100
- package/dist/features/heading/i18n.js.map +0 -1
- package/dist/features/horizontalRule/component/index.d.ts +0 -10
- package/dist/features/horizontalRule/component/index.d.ts.map +0 -1
- package/dist/features/horizontalRule/component/index.js +0 -67
- package/dist/features/horizontalRule/component/index.js.map +0 -1
- package/dist/features/horizontalRule/feature.client.d.ts +0 -5
- package/dist/features/horizontalRule/feature.client.d.ts.map +0 -1
- package/dist/features/horizontalRule/feature.client.js +0 -70
- package/dist/features/horizontalRule/feature.client.js.map +0 -1
- package/dist/features/horizontalRule/feature.server.d.ts +0 -2
- package/dist/features/horizontalRule/feature.server.d.ts.map +0 -1
- package/dist/features/horizontalRule/feature.server.js +0 -34
- package/dist/features/horizontalRule/feature.server.js.map +0 -1
- package/dist/features/horizontalRule/i18n.d.ts.map +0 -1
- package/dist/features/horizontalRule/i18n.js +0 -100
- package/dist/features/horizontalRule/i18n.js.map +0 -1
- package/dist/features/horizontalRule/markdownTransformer.d.ts.map +0 -1
- package/dist/features/horizontalRule/markdownTransformer.js +0 -23
- package/dist/features/horizontalRule/markdownTransformer.js.map +0 -1
- package/dist/features/horizontalRule/nodes/HorizontalRuleNode.d.ts +0 -56
- package/dist/features/horizontalRule/nodes/HorizontalRuleNode.d.ts.map +0 -1
- package/dist/features/horizontalRule/nodes/HorizontalRuleNode.js +0 -92
- package/dist/features/horizontalRule/nodes/HorizontalRuleNode.js.map +0 -1
- package/dist/features/horizontalRule/plugin/index.d.ts +0 -7
- package/dist/features/horizontalRule/plugin/index.d.ts.map +0 -1
- package/dist/features/horizontalRule/plugin/index.js +0 -30
- package/dist/features/horizontalRule/plugin/index.js.map +0 -1
- package/dist/features/indent/feature.client.d.ts +0 -5
- package/dist/features/indent/feature.client.d.ts.map +0 -1
- package/dist/features/indent/feature.client.js +0 -56
- package/dist/features/indent/feature.client.js.map +0 -1
- package/dist/features/indent/feature.server.d.ts +0 -2
- package/dist/features/indent/feature.server.d.ts.map +0 -1
- package/dist/features/indent/feature.server.js +0 -13
- package/dist/features/indent/feature.server.js.map +0 -1
- package/dist/features/indent/i18n.d.ts.map +0 -1
- package/dist/features/indent/i18n.js +0 -132
- package/dist/features/indent/i18n.js.map +0 -1
- package/dist/features/indent/toolbarIndentGroup.d.ts +0 -3
- package/dist/features/indent/toolbarIndentGroup.d.ts.map +0 -1
- package/dist/features/indent/toolbarIndentGroup.js +0 -10
- package/dist/features/indent/toolbarIndentGroup.js.map +0 -1
- package/dist/features/link/drawer/baseFields.d.ts +0 -3
- package/dist/features/link/drawer/baseFields.d.ts.map +0 -1
- package/dist/features/link/drawer/baseFields.js +0 -94
- package/dist/features/link/drawer/baseFields.js.map +0 -1
- package/dist/features/link/feature.client.d.ts +0 -16
- package/dist/features/link/feature.client.d.ts.map +0 -1
- package/dist/features/link/feature.client.js +0 -101
- package/dist/features/link/feature.client.js.map +0 -1
- package/dist/features/link/feature.server.d.ts +0 -35
- package/dist/features/link/feature.server.d.ts.map +0 -1
- package/dist/features/link/feature.server.js +0 -134
- package/dist/features/link/feature.server.js.map +0 -1
- package/dist/features/link/graphQLPopulationPromise.d.ts +0 -5
- package/dist/features/link/graphQLPopulationPromise.d.ts.map +0 -1
- package/dist/features/link/graphQLPopulationPromise.js +0 -31
- package/dist/features/link/graphQLPopulationPromise.js.map +0 -1
- package/dist/features/link/i18n.d.ts.map +0 -1
- package/dist/features/link/i18n.js +0 -100
- package/dist/features/link/i18n.js.map +0 -1
- package/dist/features/link/plugins/autoLink/index.d.ts +0 -20
- package/dist/features/link/plugins/autoLink/index.d.ts.map +0 -1
- package/dist/features/link/plugins/autoLink/index.js +0 -336
- package/dist/features/link/plugins/autoLink/index.js.map +0 -1
- package/dist/features/link/plugins/clickableLink/index.d.ts +0 -4
- package/dist/features/link/plugins/clickableLink/index.d.ts.map +0 -1
- package/dist/features/link/plugins/clickableLink/index.js +0 -9
- package/dist/features/link/plugins/clickableLink/index.js.map +0 -1
- package/dist/features/link/plugins/floatingLinkEditor/LinkEditor/commands.d.ts.map +0 -1
- package/dist/features/link/plugins/floatingLinkEditor/LinkEditor/commands.js +0 -4
- package/dist/features/link/plugins/floatingLinkEditor/LinkEditor/commands.js.map +0 -1
- package/dist/features/link/plugins/floatingLinkEditor/LinkEditor/index.d.ts.map +0 -1
- package/dist/features/link/plugins/floatingLinkEditor/LinkEditor/index.js +0 -299
- package/dist/features/link/plugins/floatingLinkEditor/LinkEditor/index.js.map +0 -1
- package/dist/features/link/plugins/floatingLinkEditor/index.d.ts +0 -5
- package/dist/features/link/plugins/floatingLinkEditor/index.d.ts.map +0 -1
- package/dist/features/link/plugins/floatingLinkEditor/index.js +0 -13
- package/dist/features/link/plugins/floatingLinkEditor/index.js.map +0 -1
- package/dist/features/link/plugins/floatingLinkEditor/types.d.ts +0 -15
- package/dist/features/link/plugins/floatingLinkEditor/types.d.ts.map +0 -1
- package/dist/features/link/plugins/floatingLinkEditor/types.js +0 -6
- package/dist/features/link/plugins/floatingLinkEditor/types.js.map +0 -1
- package/dist/features/link/plugins/floatingLinkEditor/utilities.d.ts +0 -9
- package/dist/features/link/plugins/floatingLinkEditor/utilities.d.ts.map +0 -1
- package/dist/features/link/plugins/floatingLinkEditor/utilities.js +0 -20
- package/dist/features/link/plugins/floatingLinkEditor/utilities.js.map +0 -1
- package/dist/features/link/plugins/link/index.d.ts +0 -4
- package/dist/features/link/plugins/link/index.d.ts.map +0 -1
- package/dist/features/link/plugins/link/index.js +0 -53
- package/dist/features/link/plugins/link/index.js.map +0 -1
- package/dist/features/link/validate.d.ts +0 -6
- package/dist/features/link/validate.d.ts.map +0 -1
- package/dist/features/link/validate.js +0 -29
- package/dist/features/link/validate.js.map +0 -1
- package/dist/features/lists/checklist/feature.client.d.ts +0 -5
- package/dist/features/lists/checklist/feature.client.d.ts.map +0 -1
- package/dist/features/lists/checklist/feature.client.js +0 -100
- package/dist/features/lists/checklist/feature.client.js.map +0 -1
- package/dist/features/lists/checklist/feature.server.d.ts +0 -2
- package/dist/features/lists/checklist/feature.server.d.ts.map +0 -1
- package/dist/features/lists/checklist/feature.server.js +0 -36
- package/dist/features/lists/checklist/feature.server.js.map +0 -1
- package/dist/features/lists/checklist/i18n.d.ts.map +0 -1
- package/dist/features/lists/checklist/i18n.js +0 -100
- package/dist/features/lists/checklist/i18n.js.map +0 -1
- package/dist/features/lists/checklist/plugin/index.d.ts +0 -3
- package/dist/features/lists/checklist/plugin/index.d.ts.map +0 -1
- package/dist/features/lists/checklist/plugin/index.js +0 -9
- package/dist/features/lists/checklist/plugin/index.js.map +0 -1
- package/dist/features/lists/orderedList/feature.client.d.ts +0 -5
- package/dist/features/lists/orderedList/feature.client.d.ts.map +0 -1
- package/dist/features/lists/orderedList/feature.client.js +0 -90
- package/dist/features/lists/orderedList/feature.client.js.map +0 -1
- package/dist/features/lists/orderedList/feature.server.d.ts +0 -2
- package/dist/features/lists/orderedList/feature.server.d.ts.map +0 -1
- package/dist/features/lists/orderedList/feature.server.js +0 -36
- package/dist/features/lists/orderedList/feature.server.js.map +0 -1
- package/dist/features/lists/orderedList/i18n.d.ts.map +0 -1
- package/dist/features/lists/orderedList/i18n.js +0 -100
- package/dist/features/lists/orderedList/i18n.js.map +0 -1
- package/dist/features/lists/unorderedList/feature.client.d.ts +0 -5
- package/dist/features/lists/unorderedList/feature.client.d.ts.map +0 -1
- package/dist/features/lists/unorderedList/feature.client.js +0 -88
- package/dist/features/lists/unorderedList/feature.client.js.map +0 -1
- package/dist/features/lists/unorderedList/feature.server.d.ts +0 -2
- package/dist/features/lists/unorderedList/feature.server.d.ts.map +0 -1
- package/dist/features/lists/unorderedList/feature.server.js +0 -34
- package/dist/features/lists/unorderedList/feature.server.js.map +0 -1
- package/dist/features/lists/unorderedList/i18n.d.ts.map +0 -1
- package/dist/features/lists/unorderedList/i18n.js +0 -100
- package/dist/features/lists/unorderedList/i18n.js.map +0 -1
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/heading/client.d.ts +0 -5
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/heading/client.d.ts.map +0 -1
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/heading/client.js +0 -6
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/heading/client.js.map +0 -1
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/heading/index.d.ts +0 -3
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/heading/index.d.ts.map +0 -1
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/heading/index.js +0 -8
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/heading/index.js.map +0 -1
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/link/client.d.ts +0 -5
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/link/client.d.ts.map +0 -1
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/link/client.js +0 -6
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/link/client.js.map +0 -1
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/link/index.d.ts +0 -3
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/link/index.d.ts.map +0 -1
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/link/index.js +0 -8
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/link/index.js.map +0 -1
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/list/client.d.ts +0 -5
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/list/client.d.ts.map +0 -1
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/list/client.js +0 -6
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/list/client.js.map +0 -1
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/list/index.d.ts +0 -3
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/list/index.d.ts.map +0 -1
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/list/index.js +0 -8
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/list/index.js.map +0 -1
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/listItem/client.d.ts +0 -5
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/listItem/client.d.ts.map +0 -1
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/listItem/client.js +0 -6
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/listItem/client.js.map +0 -1
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/listItem/index.d.ts +0 -3
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/listItem/index.d.ts.map +0 -1
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/listItem/index.js +0 -8
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/listItem/index.js.map +0 -1
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/quote/client.d.ts +0 -5
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/quote/client.d.ts.map +0 -1
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/quote/client.js +0 -6
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/quote/client.js.map +0 -1
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/quote/index.d.ts +0 -3
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/quote/index.d.ts.map +0 -1
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/quote/index.js +0 -8
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/quote/index.js.map +0 -1
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/unknown/client.d.ts +0 -5
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/unknown/client.d.ts.map +0 -1
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/unknown/client.js +0 -6
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/unknown/client.js.map +0 -1
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/unknown/index.d.ts +0 -3
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/unknown/index.d.ts.map +0 -1
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/unknown/index.js +0 -8
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/unknown/index.js.map +0 -1
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/upload/client.d.ts +0 -5
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/upload/client.d.ts.map +0 -1
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/upload/client.js +0 -6
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/upload/client.js.map +0 -1
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/upload/index.d.ts +0 -3
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/upload/index.d.ts.map +0 -1
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/upload/index.js +0 -8
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/upload/index.js.map +0 -1
- package/dist/features/migrations/slateToLexical/converter/converters/blockquote/client.d.ts +0 -5
- package/dist/features/migrations/slateToLexical/converter/converters/blockquote/client.d.ts.map +0 -1
- package/dist/features/migrations/slateToLexical/converter/converters/blockquote/client.js +0 -6
- package/dist/features/migrations/slateToLexical/converter/converters/blockquote/client.js.map +0 -1
- package/dist/features/migrations/slateToLexical/converter/converters/blockquote/index.d.ts +0 -3
- package/dist/features/migrations/slateToLexical/converter/converters/blockquote/index.d.ts.map +0 -1
- package/dist/features/migrations/slateToLexical/converter/converters/blockquote/index.js +0 -8
- package/dist/features/migrations/slateToLexical/converter/converters/blockquote/index.js.map +0 -1
- package/dist/features/migrations/slateToLexical/converter/converters/heading/client.d.ts +0 -5
- package/dist/features/migrations/slateToLexical/converter/converters/heading/client.d.ts.map +0 -1
- package/dist/features/migrations/slateToLexical/converter/converters/heading/client.js +0 -6
- package/dist/features/migrations/slateToLexical/converter/converters/heading/client.js.map +0 -1
- package/dist/features/migrations/slateToLexical/converter/converters/heading/index.d.ts +0 -3
- package/dist/features/migrations/slateToLexical/converter/converters/heading/index.d.ts.map +0 -1
- package/dist/features/migrations/slateToLexical/converter/converters/heading/index.js +0 -8
- package/dist/features/migrations/slateToLexical/converter/converters/heading/index.js.map +0 -1
- package/dist/features/migrations/slateToLexical/converter/converters/indent/client.d.ts +0 -5
- package/dist/features/migrations/slateToLexical/converter/converters/indent/client.d.ts.map +0 -1
- package/dist/features/migrations/slateToLexical/converter/converters/indent/client.js +0 -6
- package/dist/features/migrations/slateToLexical/converter/converters/indent/client.js.map +0 -1
- package/dist/features/migrations/slateToLexical/converter/converters/indent/index.d.ts +0 -3
- package/dist/features/migrations/slateToLexical/converter/converters/indent/index.d.ts.map +0 -1
- package/dist/features/migrations/slateToLexical/converter/converters/indent/index.js +0 -8
- package/dist/features/migrations/slateToLexical/converter/converters/indent/index.js.map +0 -1
- package/dist/features/migrations/slateToLexical/converter/converters/link/client.d.ts +0 -5
- package/dist/features/migrations/slateToLexical/converter/converters/link/client.d.ts.map +0 -1
- package/dist/features/migrations/slateToLexical/converter/converters/link/client.js +0 -6
- package/dist/features/migrations/slateToLexical/converter/converters/link/client.js.map +0 -1
- package/dist/features/migrations/slateToLexical/converter/converters/link/index.d.ts +0 -3
- package/dist/features/migrations/slateToLexical/converter/converters/link/index.d.ts.map +0 -1
- package/dist/features/migrations/slateToLexical/converter/converters/link/index.js +0 -8
- package/dist/features/migrations/slateToLexical/converter/converters/link/index.js.map +0 -1
- package/dist/features/migrations/slateToLexical/converter/converters/listItem/client.d.ts +0 -5
- package/dist/features/migrations/slateToLexical/converter/converters/listItem/client.d.ts.map +0 -1
- package/dist/features/migrations/slateToLexical/converter/converters/listItem/client.js +0 -6
- package/dist/features/migrations/slateToLexical/converter/converters/listItem/client.js.map +0 -1
- package/dist/features/migrations/slateToLexical/converter/converters/listItem/index.d.ts +0 -3
- package/dist/features/migrations/slateToLexical/converter/converters/listItem/index.d.ts.map +0 -1
- package/dist/features/migrations/slateToLexical/converter/converters/listItem/index.js +0 -8
- package/dist/features/migrations/slateToLexical/converter/converters/listItem/index.js.map +0 -1
- package/dist/features/migrations/slateToLexical/converter/converters/orderedList/client.d.ts +0 -5
- package/dist/features/migrations/slateToLexical/converter/converters/orderedList/client.d.ts.map +0 -1
- package/dist/features/migrations/slateToLexical/converter/converters/orderedList/client.js +0 -6
- package/dist/features/migrations/slateToLexical/converter/converters/orderedList/client.js.map +0 -1
- package/dist/features/migrations/slateToLexical/converter/converters/orderedList/index.d.ts +0 -3
- package/dist/features/migrations/slateToLexical/converter/converters/orderedList/index.d.ts.map +0 -1
- package/dist/features/migrations/slateToLexical/converter/converters/orderedList/index.js +0 -8
- package/dist/features/migrations/slateToLexical/converter/converters/orderedList/index.js.map +0 -1
- package/dist/features/migrations/slateToLexical/converter/converters/relationship/client.d.ts +0 -5
- package/dist/features/migrations/slateToLexical/converter/converters/relationship/client.d.ts.map +0 -1
- package/dist/features/migrations/slateToLexical/converter/converters/relationship/client.js +0 -6
- package/dist/features/migrations/slateToLexical/converter/converters/relationship/client.js.map +0 -1
- package/dist/features/migrations/slateToLexical/converter/converters/relationship/index.d.ts +0 -3
- package/dist/features/migrations/slateToLexical/converter/converters/relationship/index.d.ts.map +0 -1
- package/dist/features/migrations/slateToLexical/converter/converters/relationship/index.js +0 -8
- package/dist/features/migrations/slateToLexical/converter/converters/relationship/index.js.map +0 -1
- package/dist/features/migrations/slateToLexical/converter/converters/unknown/client.d.ts +0 -5
- package/dist/features/migrations/slateToLexical/converter/converters/unknown/client.d.ts.map +0 -1
- package/dist/features/migrations/slateToLexical/converter/converters/unknown/client.js +0 -6
- package/dist/features/migrations/slateToLexical/converter/converters/unknown/client.js.map +0 -1
- package/dist/features/migrations/slateToLexical/converter/converters/unknown/index.d.ts +0 -3
- package/dist/features/migrations/slateToLexical/converter/converters/unknown/index.d.ts.map +0 -1
- package/dist/features/migrations/slateToLexical/converter/converters/unknown/index.js +0 -8
- package/dist/features/migrations/slateToLexical/converter/converters/unknown/index.js.map +0 -1
- package/dist/features/migrations/slateToLexical/converter/converters/unorderedList/client.d.ts +0 -5
- package/dist/features/migrations/slateToLexical/converter/converters/unorderedList/client.d.ts.map +0 -1
- package/dist/features/migrations/slateToLexical/converter/converters/unorderedList/client.js +0 -6
- package/dist/features/migrations/slateToLexical/converter/converters/unorderedList/client.js.map +0 -1
- package/dist/features/migrations/slateToLexical/converter/converters/unorderedList/index.d.ts +0 -3
- package/dist/features/migrations/slateToLexical/converter/converters/unorderedList/index.d.ts.map +0 -1
- package/dist/features/migrations/slateToLexical/converter/converters/unorderedList/index.js +0 -8
- package/dist/features/migrations/slateToLexical/converter/converters/unorderedList/index.js.map +0 -1
- package/dist/features/migrations/slateToLexical/converter/converters/upload/client.d.ts +0 -5
- package/dist/features/migrations/slateToLexical/converter/converters/upload/client.d.ts.map +0 -1
- package/dist/features/migrations/slateToLexical/converter/converters/upload/client.js +0 -6
- package/dist/features/migrations/slateToLexical/converter/converters/upload/client.js.map +0 -1
- package/dist/features/migrations/slateToLexical/converter/converters/upload/index.d.ts +0 -3
- package/dist/features/migrations/slateToLexical/converter/converters/upload/index.d.ts.map +0 -1
- package/dist/features/migrations/slateToLexical/converter/converters/upload/index.js +0 -8
- package/dist/features/migrations/slateToLexical/converter/converters/upload/index.js.map +0 -1
- package/dist/features/paragraph/feature.client.d.ts +0 -5
- package/dist/features/paragraph/feature.client.d.ts.map +0 -1
- package/dist/features/paragraph/feature.client.js +0 -71
- package/dist/features/paragraph/feature.client.js.map +0 -1
- package/dist/features/paragraph/feature.server.d.ts +0 -2
- package/dist/features/paragraph/feature.server.d.ts.map +0 -1
- package/dist/features/paragraph/feature.server.js +0 -14
- package/dist/features/paragraph/feature.server.js.map +0 -1
- package/dist/features/paragraph/i18n.d.ts.map +0 -1
- package/dist/features/paragraph/i18n.js +0 -132
- package/dist/features/paragraph/i18n.js.map +0 -1
- package/dist/features/relationship/drawer/commands.d.ts.map +0 -1
- package/dist/features/relationship/drawer/commands.js +0 -4
- package/dist/features/relationship/drawer/commands.js.map +0 -1
- package/dist/features/relationship/drawer/index.d.ts.map +0 -1
- package/dist/features/relationship/drawer/index.js +0 -83
- package/dist/features/relationship/drawer/index.js.map +0 -1
- package/dist/features/relationship/feature.client.d.ts +0 -18
- package/dist/features/relationship/feature.client.d.ts.map +0 -1
- package/dist/features/relationship/feature.client.js +0 -72
- package/dist/features/relationship/feature.client.js.map +0 -1
- package/dist/features/relationship/feature.server.d.ts +0 -27
- package/dist/features/relationship/feature.server.d.ts.map +0 -1
- package/dist/features/relationship/feature.server.js +0 -55
- package/dist/features/relationship/feature.server.js.map +0 -1
- package/dist/features/relationship/graphQLPopulationPromise.d.ts +0 -5
- package/dist/features/relationship/graphQLPopulationPromise.d.ts.map +0 -1
- package/dist/features/relationship/graphQLPopulationPromise.js +0 -29
- package/dist/features/relationship/graphQLPopulationPromise.js.map +0 -1
- package/dist/features/relationship/i18n.d.ts.map +0 -1
- package/dist/features/relationship/i18n.js +0 -100
- package/dist/features/relationship/i18n.js.map +0 -1
- package/dist/features/relationship/nodes/RelationshipNode.d.ts +0 -35
- package/dist/features/relationship/nodes/RelationshipNode.d.ts.map +0 -1
- package/dist/features/relationship/nodes/RelationshipNode.js +0 -111
- package/dist/features/relationship/nodes/RelationshipNode.js.map +0 -1
- package/dist/features/relationship/nodes/components/RelationshipComponent.d.ts +0 -13
- package/dist/features/relationship/nodes/components/RelationshipComponent.d.ts.map +0 -1
- package/dist/features/relationship/nodes/components/RelationshipComponent.js +0 -171
- package/dist/features/relationship/nodes/components/RelationshipComponent.js.map +0 -1
- package/dist/features/relationship/plugins/index.d.ts +0 -7
- package/dist/features/relationship/plugins/index.d.ts.map +0 -1
- package/dist/features/relationship/plugins/index.js +0 -50
- package/dist/features/relationship/plugins/index.js.map +0 -1
- package/dist/features/relationship/utils/EnabledRelationshipsCondition.d.ts.map +0 -1
- package/dist/features/relationship/utils/EnabledRelationshipsCondition.js +0 -33
- package/dist/features/relationship/utils/EnabledRelationshipsCondition.js.map +0 -1
- package/dist/features/toolbars/fixed/Toolbar/index.d.ts +0 -5
- package/dist/features/toolbars/fixed/Toolbar/index.d.ts.map +0 -1
- package/dist/features/toolbars/fixed/Toolbar/index.js +0 -207
- package/dist/features/toolbars/fixed/Toolbar/index.js.map +0 -1
- package/dist/features/toolbars/fixed/feature.client.d.ts +0 -6
- package/dist/features/toolbars/fixed/feature.client.d.ts.map +0 -1
- package/dist/features/toolbars/fixed/feature.client.js +0 -13
- package/dist/features/toolbars/fixed/feature.client.js.map +0 -1
- package/dist/features/toolbars/fixed/feature.server.d.ts +0 -18
- package/dist/features/toolbars/fixed/feature.server.d.ts.map +0 -1
- package/dist/features/toolbars/fixed/feature.server.js +0 -19
- package/dist/features/toolbars/fixed/feature.server.js.map +0 -1
- package/dist/features/toolbars/inline/Toolbar/index.d.ts +0 -4
- package/dist/features/toolbars/inline/Toolbar/index.d.ts.map +0 -1
- package/dist/features/toolbars/inline/Toolbar/index.js +0 -319
- package/dist/features/toolbars/inline/Toolbar/index.js.map +0 -1
- package/dist/features/toolbars/inline/feature.client.d.ts +0 -5
- package/dist/features/toolbars/inline/feature.client.d.ts.map +0 -1
- package/dist/features/toolbars/inline/feature.client.js +0 -13
- package/dist/features/toolbars/inline/feature.client.js.map +0 -1
- package/dist/features/toolbars/inline/feature.server.d.ts +0 -2
- package/dist/features/toolbars/inline/feature.server.d.ts.map +0 -1
- package/dist/features/toolbars/inline/feature.server.js +0 -11
- package/dist/features/toolbars/inline/feature.server.js.map +0 -1
- package/dist/features/upload/component/index.d.ts +0 -9
- package/dist/features/upload/component/index.d.ts.map +0 -1
- package/dist/features/upload/component/index.js +0 -242
- package/dist/features/upload/component/index.js.map +0 -1
- package/dist/features/upload/drawer/commands.d.ts.map +0 -1
- package/dist/features/upload/drawer/commands.js +0 -5
- package/dist/features/upload/drawer/commands.js.map +0 -1
- package/dist/features/upload/drawer/index.d.ts.map +0 -1
- package/dist/features/upload/drawer/index.js +0 -77
- package/dist/features/upload/drawer/index.js.map +0 -1
- package/dist/features/upload/feature.client.d.ts +0 -12
- package/dist/features/upload/feature.client.d.ts.map +0 -1
- package/dist/features/upload/feature.client.js +0 -74
- package/dist/features/upload/feature.client.js.map +0 -1
- package/dist/features/upload/feature.server.d.ts +0 -18
- package/dist/features/upload/feature.server.d.ts.map +0 -1
- package/dist/features/upload/feature.server.js +0 -184
- package/dist/features/upload/feature.server.js.map +0 -1
- package/dist/features/upload/graphQLPopulationPromise.d.ts +0 -5
- package/dist/features/upload/graphQLPopulationPromise.d.ts.map +0 -1
- package/dist/features/upload/graphQLPopulationPromise.js +0 -52
- package/dist/features/upload/graphQLPopulationPromise.js.map +0 -1
- package/dist/features/upload/i18n.d.ts.map +0 -1
- package/dist/features/upload/i18n.js +0 -100
- package/dist/features/upload/i18n.js.map +0 -1
- package/dist/features/upload/nodes/UploadNode.d.ts +0 -39
- package/dist/features/upload/nodes/UploadNode.d.ts.map +0 -1
- package/dist/features/upload/nodes/UploadNode.js +0 -131
- package/dist/features/upload/nodes/UploadNode.js.map +0 -1
- package/dist/features/upload/plugin/index.d.ts +0 -8
- package/dist/features/upload/plugin/index.d.ts.map +0 -1
- package/dist/features/upload/plugin/index.js +0 -53
- package/dist/features/upload/plugin/index.js.map +0 -1
- package/dist/features/upload/validate.d.ts +0 -5
- package/dist/features/upload/validate.d.ts.map +0 -1
- package/dist/features/upload/validate.js +0 -45
- package/dist/features/upload/validate.js.map +0 -1
- package/dist/lexical/utils/invariant.d.ts +0 -2
- package/dist/lexical/utils/invariant.d.ts.map +0 -1
- package/dist/lexical/utils/invariant.js +0 -12
- package/dist/lexical/utils/invariant.js.map +0 -1
- package/dist/utilities/generateComponentMap.d.ts +0 -6
- package/dist/utilities/generateComponentMap.d.ts.map +0 -1
- package/dist/utilities/generateComponentMap.js +0 -79
- package/dist/utilities/generateComponentMap.js.map +0 -1
- /package/dist/features/align/{i18n.d.ts → server/i18n.d.ts} +0 -0
- /package/dist/features/blockquote/{i18n.d.ts → server/i18n.d.ts} +0 -0
- /package/dist/features/blocks/{component → client/component}/removeEmptyArrayValues.d.ts +0 -0
- /package/dist/features/blocks/{i18n.d.ts → server/i18n.d.ts} +0 -0
- /package/dist/features/experimental_table/{utils → client/utils}/debounce.d.ts +0 -0
- /package/dist/features/experimental_table/{utils → client/utils}/useDebounce.d.ts +0 -0
- /package/dist/features/heading/{i18n.d.ts → server/i18n.d.ts} +0 -0
- /package/dist/features/horizontalRule/{markdownTransformer.d.ts → client/markdownTransformer.d.ts} +0 -0
- /package/dist/features/horizontalRule/{i18n.d.ts → server/i18n.d.ts} +0 -0
- /package/dist/features/indent/{i18n.d.ts → server/i18n.d.ts} +0 -0
- /package/dist/features/link/{plugins → client/plugins}/floatingLinkEditor/LinkEditor/commands.d.ts +0 -0
- /package/dist/features/link/{plugins → client/plugins}/floatingLinkEditor/LinkEditor/index.d.ts +0 -0
- /package/dist/features/link/{i18n.d.ts → server/i18n.d.ts} +0 -0
- /package/dist/features/lists/checklist/{i18n.d.ts → server/i18n.d.ts} +0 -0
- /package/dist/features/lists/orderedList/{i18n.d.ts → server/i18n.d.ts} +0 -0
- /package/dist/features/lists/unorderedList/{i18n.d.ts → server/i18n.d.ts} +0 -0
- /package/dist/features/paragraph/{i18n.d.ts → server/i18n.d.ts} +0 -0
- /package/dist/features/relationship/{drawer → client/drawer}/commands.d.ts +0 -0
- /package/dist/features/relationship/{drawer → client/drawer}/index.d.ts +0 -0
- /package/dist/features/relationship/{utils → client/utils}/EnabledRelationshipsCondition.d.ts +0 -0
- /package/dist/features/relationship/{i18n.d.ts → server/i18n.d.ts} +0 -0
- /package/dist/features/upload/{drawer → client/drawer}/commands.d.ts +0 -0
- /package/dist/features/upload/{drawer → client/drawer}/index.d.ts +0 -0
- /package/dist/features/upload/{i18n.d.ts → server/i18n.d.ts} +0 -0
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
"use client";import{a as Ft,c as Cl,e as hl,f as bl,g as xl,h as Tl}from"./chunk-EBB2CEB6.js";import{a as Ne,b as Mt,c as ke,d as Bo,e as Go}from"./chunk-VUVXZJJR.js";import{a as we,b as Xe,c as Ze,d as Je}from"./chunk-Q5DYR7MH.js";import{a as Re,b as _e,c as Se,d as Pt}from"./chunk-6QXGZYUK.js";import{a as le,b as Ye,c as ve,d as Ie,e as Fe,f as At}from"./chunk-IPCJ5EVK.js";import{a as gl,b as $}from"./chunk-IWZVO3AI.js";function G(e){return{items:e,key:"basic",label:({i18n:t})=>t.t("lexical:general:slashMenuBasicGroupLabel")}}import{createHeadlessEditor as El}from"@lexical/headless";import{useClientFunctions as yl,useTableCell as Ll}from"@payloadcms/ui";import{$getRoot as Nl}from"lexical";import Dt,{useEffect as zo,useState as Ot}from"react";var Uo={block:"LexicalEditorTheme__block",blockCursor:"LexicalEditorTheme__blockCursor",characterLimit:"LexicalEditorTheme__characterLimit",code:"LexicalEditorTheme__code",codeHighlight:{atrule:"LexicalEditorTheme__tokenAttr",attr:"LexicalEditorTheme__tokenAttr",boolean:"LexicalEditorTheme__tokenProperty",builtin:"LexicalEditorTheme__tokenSelector",cdata:"LexicalEditorTheme__tokenComment",char:"LexicalEditorTheme__tokenSelector",class:"LexicalEditorTheme__tokenFunction","class-name":"LexicalEditorTheme__tokenFunction",comment:"LexicalEditorTheme__tokenComment",constant:"LexicalEditorTheme__tokenProperty",deleted:"LexicalEditorTheme__tokenProperty",doctype:"LexicalEditorTheme__tokenComment",entity:"LexicalEditorTheme__tokenOperator",function:"LexicalEditorTheme__tokenFunction",important:"LexicalEditorTheme__tokenVariable",inserted:"LexicalEditorTheme__tokenSelector",keyword:"LexicalEditorTheme__tokenAttr",namespace:"LexicalEditorTheme__tokenVariable",number:"LexicalEditorTheme__tokenProperty",operator:"LexicalEditorTheme__tokenOperator",prolog:"LexicalEditorTheme__tokenComment",property:"LexicalEditorTheme__tokenProperty",punctuation:"LexicalEditorTheme__tokenPunctuation",regex:"LexicalEditorTheme__tokenVariable",selector:"LexicalEditorTheme__tokenSelector",string:"LexicalEditorTheme__tokenSelector",symbol:"LexicalEditorTheme__tokenProperty",tag:"LexicalEditorTheme__tokenProperty",url:"LexicalEditorTheme__tokenOperator",variable:"LexicalEditorTheme__tokenVariable"},embedBlock:{base:"LexicalEditorTheme__embedBlock",focus:"LexicalEditorTheme__embedBlockFocus"},hashtag:"LexicalEditorTheme__hashtag",heading:{h1:"LexicalEditorTheme__h1",h2:"LexicalEditorTheme__h2",h3:"LexicalEditorTheme__h3",h4:"LexicalEditorTheme__h4",h5:"LexicalEditorTheme__h5",h6:"LexicalEditorTheme__h6"},hr:"LexicalEditorTheme__hr",indent:"LexicalEditorTheme__indent",inlineImage:"LexicalEditor__inline-image",link:"LexicalEditorTheme__link",list:{checklist:"LexicalEditorTheme__checklist",listitem:"LexicalEditorTheme__listItem",listitemChecked:"LexicalEditorTheme__listItemChecked",listitemUnchecked:"LexicalEditorTheme__listItemUnchecked",nested:{listitem:"LexicalEditorTheme__nestedListItem"},olDepth:["LexicalEditorTheme__ol1","LexicalEditorTheme__ol2","LexicalEditorTheme__ol3","LexicalEditorTheme__ol4","LexicalEditorTheme__ol5"],ul:"LexicalEditorTheme__ul"},ltr:"LexicalEditorTheme__ltr",mark:"LexicalEditorTheme__mark",markOverlap:"LexicalEditorTheme__markOverlap",paragraph:"LexicalEditorTheme__paragraph",quote:"LexicalEditorTheme__quote",relationship:"LexicalEditorTheme__relationship",rtl:"LexicalEditorTheme__rtl",table:"LexicalEditorTheme__table",tableAddColumns:"LexicalEditorTheme__tableAddColumns",tableAddRows:"LexicalEditorTheme__tableAddRows",tableCell:"LexicalEditorTheme__tableCell",tableCellActionButton:"LexicalEditorTheme__tableCellActionButton",tableCellActionButtonContainer:"LexicalEditorTheme__tableCellActionButtonContainer",tableCellEditing:"LexicalEditorTheme__tableCellEditing",tableCellHeader:"LexicalEditorTheme__tableCellHeader",tableCellPrimarySelected:"LexicalEditorTheme__tableCellPrimarySelected",tableCellResizer:"LexicalEditorTheme__tableCellResizer",tableCellSelected:"LexicalEditorTheme__tableCellSelected",tableCellSortedIndicator:"LexicalEditorTheme__tableCellSortedIndicator",tableResizeRuler:"LexicalEditorTheme__tableCellResizeRuler",tableSelected:"LexicalEditorTheme__tableSelected",text:{bold:"LexicalEditorTheme__textBold",code:"LexicalEditorTheme__textCode",italic:"LexicalEditorTheme__textItalic",strikethrough:"LexicalEditorTheme__textStrikethrough",subscript:"LexicalEditorTheme__textSubscript",superscript:"LexicalEditorTheme__textSuperscript",underline:"LexicalEditorTheme__textUnderline",underlineStrikethrough:"LexicalEditorTheme__textUnderlineStrikethrough"},upload:"editor-upload"};var Me={namespace:"lexical",theme:Uo};function qe({clientFunctions:e,schemaPath:t,unSanitizedEditorConfig:o}){for(let l of o.features)if(!l?.clientFeatureProps?.featureKey||l?.clientFeatureProps?.order===void 0||l?.clientFeatureProps?.order===null)throw new Error("A Feature you have installed does not return the client props as clientFeatureProps. Please make sure to always return those props, even if they are null, as other important props like order and featureKey are later on injected.");o.features=o.features.sort((l,a)=>l.clientFeatureProps.order-a.clientFeatureProps.order);let r=new Map(o.features.map(l=>[l.clientFeatureProps.featureKey,l])),n=new Map,i=0;for(let l of o.features){let a={};Object.entries(e).forEach(([c,d])=>{if(c.startsWith(`lexicalFeature.${t}.${l.clientFeatureProps.featureKey}.components.`)){let p=c.split(`${t}.${l.clientFeatureProps.featureKey}.components.`)[1];a[p]=d}});let s=typeof l.feature=="function"?l.feature({clientFunctions:a,featureProviderMap:r,resolvedFeatures:n,unSanitizedEditorConfig:o}):l.feature;n.set(l.clientFeatureProps.featureKey,{...s,key:l.clientFeatureProps.featureKey,order:i}),i++}return n}var Wo=e=>{let t={enabledFeatures:[],hooks:{load:[],save:[]},markdownTransformers:[],nodes:[],plugins:[],providers:[],slashMenu:{dynamicGroups:[],groups:[]},toolbarFixed:{groups:[]},toolbarInline:{groups:[]}};if(!e?.size)return t;e.forEach(o=>{if(o.hooks&&(o.hooks?.load?.length&&(t.hooks.load=t.hooks.load.concat(o.hooks.load)),o.hooks?.save?.length&&(t.hooks.save=t.hooks.save.concat(o.hooks.save))),o.providers?.length&&(t.providers=t.providers.concat(o.providers)),o.nodes?.length&&(t.nodes=t.nodes.concat(o.nodes)),o.plugins?.length&&o.plugins.forEach((r,n)=>{t.plugins.push({Component:r.Component,clientProps:o.sanitizedClientFeatureProps,key:o.key+n,position:r.position})}),o.toolbarInline?.groups?.length)for(let r of o.toolbarInline.groups){let n=t.toolbarInline.groups.find(i=>i.key===r.key);n?t.toolbarInline.groups=t.toolbarInline.groups.filter(i=>i.key!==r.key):n={...r,items:[]},r?.items?.length&&(n.items=n.items.concat(r.items)),t.toolbarInline?.groups.push(n)}if(o.toolbarFixed?.groups?.length)for(let r of o.toolbarFixed.groups){let n=t.toolbarFixed.groups.find(i=>i.key===r.key);n?t.toolbarFixed.groups=t.toolbarFixed.groups.filter(i=>i.key!==r.key):n={...r,items:[]},r?.items?.length&&(n.items=n.items.concat(r.items)),t.toolbarFixed?.groups.push(n)}if(o.slashMenu?.groups){o.slashMenu.dynamicGroups?.length&&(t.slashMenu.dynamicGroups=t.slashMenu.dynamicGroups.concat(o.slashMenu.dynamicGroups));for(let r of o.slashMenu.groups){let n=t.slashMenu.groups.find(i=>i.key===r.key);n?t.slashMenu.groups=t.slashMenu.groups.filter(i=>i.key!==r.key):n={...r,items:[]},r?.items?.length&&(n.items=n.items.concat(r.items)),t.slashMenu.groups.push(n)}}o.markdownTransformers?.length&&(t.markdownTransformers=t.markdownTransformers.concat(o.markdownTransformers)),t.enabledFeatures.push(o.key)}),t.toolbarInline.groups.sort((o,r)=>o.order&&r.order?o.order-r.order:o.order?-1:r.order?1:0),t.toolbarFixed.groups.sort((o,r)=>o.order&&r.order?o.order-r.order:o.order?-1:r.order?1:0);for(let o of t.toolbarInline.groups)o.items.sort((r,n)=>r.order&&n.order?r.order-n.order:r.order?-1:n.order?1:0);for(let o of t.toolbarFixed.groups)o.items.sort((r,n)=>r.order&&n.order?r.order-n.order:r.order?-1:n.order?1:0);return t};function Pe(e,t,o){return{admin:o,features:Wo(t),lexical:e,resolvedFeatureMap:t}}import{jsx as Vo,jsxs as wl}from"react/jsx-runtime";var kl=e=>{let{admin:t,lexicalEditorConfig:o,richTextComponentMap:r}=e,[n,i]=Dt.useState("Loading..."),{cellData:l,cellProps:{schemaPath:a}}=Ll(),s=yl(),[c,d]=Ot(!1),[p,u]=Ot([]),[m,g]=Ot(null),f=r.get("features").sort((h,I)=>h.order-I.order),x=0;for(let h of f){let I=Array.from(r.keys()).filter(P=>P.startsWith(`feature.${h.key}.components.`));x+=1,x+=I.length}return zo(()=>{if(!c){let h=[],I=0;if(Object.entries(s).forEach(([P,T])=>{P.startsWith(`lexicalFeature.${a}.`)&&(P.includes(".lexical_internal_components.")||h.push(T),I++)}),I===x){u(h),d(!0);let P=qe({clientFunctions:s,schemaPath:a,unSanitizedEditorConfig:{features:h,lexical:o}});g(Pe(o||Me,P,t))}}},[t,f,c,s,a,f.length,p,m,o,r,x]),zo(()=>{if(!c)return;let h=l;if(h==null||!c||!m){i("");return}if(m?.features?.hooks?.load?.length&&m.features.hooks.load.forEach(T=>{h=T({incomingEditorState:h})}),!h||typeof h!="object"){i("");return}if(Array.isArray(h)&&!("root"in h)){i("");return}if("jsonContent"in h){i("");return}let I=El({namespace:m.lexical.namespace,nodes:Ft({editorConfig:m}),theme:m.lexical.theme});I.setEditorState(I.parseEditorState(h));let P=I.getEditorState().read(()=>Nl().getTextContent())||"";i(P)},[l,o,c,m]),c?Vo("span",{children:n}):Vo(Dt.Fragment,{children:Array.isArray(f)&&f.map(h=>{let P=Array.from(r.keys()).filter(T=>T.startsWith(`lexical_internal_feature.${h.key}.lexical_internal_components.`)).map(T=>r.get(T));return wl(Dt.Fragment,{children:[P?.length?P.map(T=>T):null,h.ClientFeature]},h.key)})})};import{$isElementNode as ne,$isRangeSelection as et,FORMAT_ELEMENT_COMMAND as tt}from"lexical";import{jsx as Ht,jsxs as Rl}from"react/jsx-runtime";var Ko=()=>Rl("svg",{"aria-hidden":"true",className:"icon",fill:"none",focusable:"false",height:"20",viewBox:"0 0 20 20",width:"20",xmlns:"http://www.w3.org/2000/svg",children:[Ht("path",{d:"M2.5 5H17.5",stroke:"currentColor",strokeWidth:"1.5"}),Ht("path",{d:"M2.5 10H17.5",stroke:"currentColor",strokeWidth:"1.5"}),Ht("path",{d:"M5 15H15",stroke:"currentColor",strokeWidth:"1.5"})]});import{jsx as $t,jsxs as _l}from"react/jsx-runtime";var jo=()=>_l("svg",{"aria-hidden":"true",className:"icon",fill:"none",focusable:"false",height:"20",viewBox:"0 0 20 20",width:"20",xmlns:"http://www.w3.org/2000/svg",children:[$t("path",{d:"M2.5 5H17.5",stroke:"currentColor",strokeWidth:"1.5"}),$t("path",{d:"M2.5 10H17.5",stroke:"currentColor",strokeWidth:"1.5"}),$t("path",{d:"M2.5 15H17.5",stroke:"currentColor",strokeWidth:"1.5"})]});import{jsx as Bt,jsxs as Sl}from"react/jsx-runtime";var Qe=()=>Sl("svg",{"aria-hidden":"true",className:"icon",fill:"none",focusable:"false",height:"20",viewBox:"0 0 20 20",width:"20",xmlns:"http://www.w3.org/2000/svg",children:[Bt("path",{d:"M2.5 5H17.5",stroke:"currentColor",strokeWidth:"1.5"}),Bt("path",{d:"M2.5 10H17.5",stroke:"currentColor",strokeWidth:"1.5"}),Bt("path",{d:"M2.5 15H12.5",stroke:"currentColor",strokeWidth:"1.5"})]});import{jsx as Gt,jsxs as vl}from"react/jsx-runtime";var Xo=()=>vl("svg",{"aria-hidden":"true",className:"icon",fill:"none",focusable:"false",height:"20",viewBox:"0 0 20 20",width:"20",xmlns:"http://www.w3.org/2000/svg",children:[Gt("path",{d:"M2.5 5H17.5",stroke:"currentColor",strokeWidth:"1.5"}),Gt("path",{d:"M2.5 10H17.5",stroke:"currentColor",strokeWidth:"1.5"}),Gt("path",{d:"M7.5 15H17.5",stroke:"currentColor",strokeWidth:"1.5"})]});import{useAddClientFunction as Il,useFieldProps as Fl,useTableCell as Ml}from"@payloadcms/ui";var Zo=(e,t)=>{let{schemaPath:o}=Fl(),i=Ml()?.cellProps?.schemaPath||o;Il(`lexicalFeature.${i}.${e}`,t)};var Ut=e=>t=>(Zo(t.featureKey,e(t)),null);var L=e=>Ut(o=>{let r={clientFeatureProps:o};return typeof e=="function"?r.feature=({clientFunctions:n,featureProviderMap:i,resolvedFeatures:l,unSanitizedEditorConfig:a})=>{let s=e({clientFunctions:n,featureProviderMap:i,props:o,resolvedFeatures:l,unSanitizedEditorConfig:a});return s.sanitizedClientFeatureProps===null&&(s.sanitizedClientFeatureProps=o),s}:(e.sanitizedClientFeatureProps=o,r.feature=e),r});var Jo=e=>({type:"dropdown",ChildComponent:Qe,items:e,key:"align",order:30});var Yo=[Jo([{ChildComponent:Qe,isActive:({selection:e})=>{if(!et(e))return!1;for(let t of e.getNodes()){if(ne(t)&&t.getFormatType()==="left")continue;let o=t.getParent();if(!(ne(o)&&o.getFormatType()==="left"))return!1}return!0},key:"alignLeft",label:({i18n:e})=>e.t("lexical:align:alignLeftLabel"),onSelect:({editor:e})=>{e.dispatchCommand(tt,"left")},order:1},{ChildComponent:Ko,isActive:({selection:e})=>{if(!et(e))return!1;for(let t of e.getNodes()){if(ne(t)&&t.getFormatType()==="center")continue;let o=t.getParent();if(!(ne(o)&&o.getFormatType()==="center"))return!1}return!0},key:"alignCenter",label:({i18n:e})=>e.t("lexical:align:alignCenterLabel"),onSelect:({editor:e})=>{e.dispatchCommand(tt,"center")},order:2},{ChildComponent:Xo,isActive:({selection:e})=>{if(!et(e))return!1;for(let t of e.getNodes()){if(ne(t)&&t.getFormatType()==="right")continue;let o=t.getParent();if(!(ne(o)&&o.getFormatType()==="right"))return!1}return!0},key:"alignRight",label:({i18n:e})=>e.t("lexical:align:alignRightLabel"),onSelect:({editor:e})=>{e.dispatchCommand(tt,"right")},order:3},{ChildComponent:jo,isActive:({selection:e})=>{if(!et(e))return!1;for(let t of e.getNodes()){if(ne(t)&&t.getFormatType()==="justify")continue;let o=t.getParent();if(!(ne(o)&&o.getFormatType()==="justify"))return!1}return!0},key:"alignJustify",label:({i18n:e})=>e.t("lexical:align:alignJustifyLabel"),onSelect:({editor:e})=>{e.dispatchCommand(tt,"justify")},order:4}])],Pl=L({toolbarFixed:{groups:Yo},toolbarInline:{groups:Yo}});import{$createQuoteNode as nr,$isQuoteNode as or,QuoteNode as Hl}from"@lexical/rich-text";import{$setBlocksType as ir}from"@lexical/selection";import{$getSelection as lr,$isRangeSelection as $l}from"lexical";import{jsx as qo}from"react/jsx-runtime";var Wt=()=>qo("svg",{"aria-hidden":"true",className:"icon",fill:"none",focusable:"false",height:"20",viewBox:"0 0 20 20",width:"20",xmlns:"http://www.w3.org/2000/svg",children:qo("path",{d:"M13.5353 10.5725C13.5353 9.47709 11.0456 9.99991 11.0456 7.85883C11.0456 6.46464 12.1162 5.61816 13.361 5.61816C14.805 5.61816 16 6.86298 16 8.92937C16 11.2945 14.4564 13.7841 11.1203 14.3816L10.8216 13.1368C12.888 12.4895 13.5353 11.4937 13.5353 10.5725ZM6.71369 10.5725C6.71369 9.47709 4.22407 9.99991 4.22407 7.85883C4.22407 6.46464 5.29461 5.61816 6.53942 5.61816C7.9834 5.61816 9.17842 6.86298 9.17842 8.92937C9.17842 11.2945 7.63485 13.7841 4.29876 14.3816L4 13.1368C6.06639 12.4895 6.71369 11.4937 6.71369 10.5725Z",fill:"currentColor"})});import{jsx as Qo}from"react/jsx-runtime";var Ae=()=>Qo("svg",{"aria-hidden":"true",className:"icon",fill:"currentColor",focusable:"false",height:"20",viewBox:"0 0 20 20",width:"20",xmlns:"http://www.w3.org/2000/svg",children:Qo("path",{d:"M11.708 14.5H7.79785V13.9414H8.01367C9.00391 13.9414 9.15625 13.9033 9.15625 13.6113V6.70508H8.07715C6.82031 6.70508 6.73145 7.08594 6.28711 8.67285H5.80469L5.91895 6.12109H13.5869L13.7012 8.67285H13.2188C12.7744 7.08594 12.6855 6.70508 11.4287 6.70508H10.3496V13.6113C10.3496 13.9033 10.502 13.9414 11.4922 13.9414H11.708V14.5Z",fill:"currentColor"})});var z=e=>({type:"dropdown",ChildComponent:Ae,items:e,key:"text",order:25});import{$createQuoteNode as Al,$isQuoteNode as er,QuoteNode as Dl}from"@lexical/rich-text";import{$createLineBreakNode as Ol}from"lexical";var tr={type:"element",dependencies:[Dl],export:(e,t)=>{if(!er(e))return null;let o=t(e).split(`
|
|
1
|
+
"use client";import{a as _e,c as to,d as oo,e as ro}from"./chunk-U7O7EYCP.js";import{a as je,b as mt,c as pt,d as ft}from"./chunk-XCEM47RI.js";import{a as We,b as Ue,c as Ve,d as no}from"./chunk-MI5HS4QX.js";import{a as Ge,b as ht,c as Ke,d as ze,e as Ze,f as io}from"./chunk-C7S3V4EB.js";import{a as be}from"./chunk-2CYU43GM.js";import{a as te,b as Ql,c as es,d as ts,f as os,h as rs,i as ns}from"./chunk-QPPOQTHD.js";import{a as ql,b as B}from"./chunk-CUIBIFW2.js";function K(t){return{items:t,key:"basic",label:({i18n:e})=>e.t("lexical:general:slashMenuBasicGroupLabel")}}import{$isElementNode as Te,$isRangeSelection as Ct,FORMAT_ELEMENT_COMMAND as xt}from"lexical";import{jsx as lo,jsxs as is}from"react/jsx-runtime";import"react";var ur=()=>is("svg",{"aria-hidden":"true",className:"icon",fill:"none",focusable:"false",height:"20",viewBox:"0 0 20 20",width:"20",xmlns:"http://www.w3.org/2000/svg",children:[lo("path",{d:"M2.5 5H17.5",stroke:"currentColor",strokeWidth:"1.5"}),lo("path",{d:"M2.5 10H17.5",stroke:"currentColor",strokeWidth:"1.5"}),lo("path",{d:"M5 15H15",stroke:"currentColor",strokeWidth:"1.5"})]});import{jsx as so,jsxs as ls}from"react/jsx-runtime";import"react";var dr=()=>ls("svg",{"aria-hidden":"true",className:"icon",fill:"none",focusable:"false",height:"20",viewBox:"0 0 20 20",width:"20",xmlns:"http://www.w3.org/2000/svg",children:[so("path",{d:"M2.5 5H17.5",stroke:"currentColor",strokeWidth:"1.5"}),so("path",{d:"M2.5 10H17.5",stroke:"currentColor",strokeWidth:"1.5"}),so("path",{d:"M2.5 15H17.5",stroke:"currentColor",strokeWidth:"1.5"})]});import{jsx as ao,jsxs as ss}from"react/jsx-runtime";import"react";var gt=()=>ss("svg",{"aria-hidden":"true",className:"icon",fill:"none",focusable:"false",height:"20",viewBox:"0 0 20 20",width:"20",xmlns:"http://www.w3.org/2000/svg",children:[ao("path",{d:"M2.5 5H17.5",stroke:"currentColor",strokeWidth:"1.5"}),ao("path",{d:"M2.5 10H17.5",stroke:"currentColor",strokeWidth:"1.5"}),ao("path",{d:"M2.5 15H12.5",stroke:"currentColor",strokeWidth:"1.5"})]});import{jsx as co,jsxs as as}from"react/jsx-runtime";import"react";var mr=()=>as("svg",{"aria-hidden":"true",className:"icon",fill:"none",focusable:"false",height:"20",viewBox:"0 0 20 20",width:"20",xmlns:"http://www.w3.org/2000/svg",children:[co("path",{d:"M2.5 5H17.5",stroke:"currentColor",strokeWidth:"1.5"}),co("path",{d:"M2.5 10H17.5",stroke:"currentColor",strokeWidth:"1.5"}),co("path",{d:"M7.5 15H17.5",stroke:"currentColor",strokeWidth:"1.5"})]});var y=t=>o=>{let r={clientFeatureProps:o};if(typeof t=="function")r.feature=({featureClientSchemaMap:n,featureProviderMap:i,field:l,resolvedFeatures:s,schemaPath:a,unSanitizedEditorConfig:d})=>{let c=t({featureClientSchemaMap:n,featureProviderMap:i,field:l,props:o,resolvedFeatures:s,schemaPath:a,unSanitizedEditorConfig:d});return c.sanitizedClientFeatureProps===null&&(c.sanitizedClientFeatureProps=o),c};else{let n={...t};n.sanitizedClientFeatureProps=o,r.feature=n}return r};var pr=t=>({type:"dropdown",ChildComponent:gt,items:t,key:"align",order:30});var fr=[pr([{ChildComponent:gt,isActive:({selection:t})=>{if(!Ct(t))return!1;for(let e of t.getNodes()){if(Te(e)&&e.getFormatType()==="left")continue;let o=e.getParent();if(!(Te(o)&&o.getFormatType()==="left"))return!1}return!0},key:"alignLeft",label:({i18n:t})=>t.t("lexical:align:alignLeftLabel"),onSelect:({editor:t})=>{t.dispatchCommand(xt,"left")},order:1},{ChildComponent:ur,isActive:({selection:t})=>{if(!Ct(t))return!1;for(let e of t.getNodes()){if(Te(e)&&e.getFormatType()==="center")continue;let o=e.getParent();if(!(Te(o)&&o.getFormatType()==="center"))return!1}return!0},key:"alignCenter",label:({i18n:t})=>t.t("lexical:align:alignCenterLabel"),onSelect:({editor:t})=>{t.dispatchCommand(xt,"center")},order:2},{ChildComponent:mr,isActive:({selection:t})=>{if(!Ct(t))return!1;for(let e of t.getNodes()){if(Te(e)&&e.getFormatType()==="right")continue;let o=e.getParent();if(!(Te(o)&&o.getFormatType()==="right"))return!1}return!0},key:"alignRight",label:({i18n:t})=>t.t("lexical:align:alignRightLabel"),onSelect:({editor:t})=>{t.dispatchCommand(xt,"right")},order:3},{ChildComponent:dr,isActive:({selection:t})=>{if(!Ct(t))return!1;for(let e of t.getNodes()){if(Te(e)&&e.getFormatType()==="justify")continue;let o=e.getParent();if(!(Te(o)&&o.getFormatType()==="justify"))return!1}return!0},key:"alignJustify",label:({i18n:t})=>t.t("lexical:align:alignJustifyLabel"),onSelect:({editor:t})=>{t.dispatchCommand(xt,"justify")},order:4}])],cs=y({toolbarFixed:{groups:fr},toolbarInline:{groups:fr}});import{$createQuoteNode as Tr,$isQuoteNode as br,QuoteNode as ps}from"@lexical/rich-text";import{$setBlocksType as wr}from"@lexical/selection";import{$getSelection as Er,$isRangeSelection as fs}from"lexical";import{jsx as hr}from"react/jsx-runtime";import"react";var uo=()=>hr("svg",{"aria-hidden":"true",className:"icon",fill:"none",focusable:"false",height:"20",viewBox:"0 0 20 20",width:"20",xmlns:"http://www.w3.org/2000/svg",children:hr("path",{d:"M13.5353 10.5725C13.5353 9.47709 11.0456 9.99991 11.0456 7.85883C11.0456 6.46464 12.1162 5.61816 13.361 5.61816C14.805 5.61816 16 6.86298 16 8.92937C16 11.2945 14.4564 13.7841 11.1203 14.3816L10.8216 13.1368C12.888 12.4895 13.5353 11.4937 13.5353 10.5725ZM6.71369 10.5725C6.71369 9.47709 4.22407 9.99991 4.22407 7.85883C4.22407 6.46464 5.29461 5.61816 6.53942 5.61816C7.9834 5.61816 9.17842 6.86298 9.17842 8.92937C9.17842 11.2945 7.63485 13.7841 4.29876 14.3816L4 13.1368C6.06639 12.4895 6.71369 11.4937 6.71369 10.5725Z",fill:"currentColor"})});import{jsx as gr}from"react/jsx-runtime";import"react";var Ye=()=>gr("svg",{"aria-hidden":"true",className:"icon",fill:"currentColor",focusable:"false",height:"20",viewBox:"0 0 20 20",width:"20",xmlns:"http://www.w3.org/2000/svg",children:gr("path",{d:"M11.708 14.5H7.79785V13.9414H8.01367C9.00391 13.9414 9.15625 13.9033 9.15625 13.6113V6.70508H8.07715C6.82031 6.70508 6.73145 7.08594 6.28711 8.67285H5.80469L5.91895 6.12109H13.5869L13.7012 8.67285H13.2188C12.7744 7.08594 12.6855 6.70508 11.4287 6.70508H10.3496V13.6113C10.3496 13.9033 10.502 13.9414 11.4922 13.9414H11.708V14.5Z",fill:"currentColor"})});var J=t=>({type:"dropdown",ChildComponent:Ye,items:t,key:"text",order:25});import{$createQuoteNode as us,$isQuoteNode as Cr,QuoteNode as ds}from"@lexical/rich-text";import{$createLineBreakNode as ms}from"lexical";var xr={type:"element",dependencies:[ds],export:(t,e)=>{if(!Cr(t))return null;let o=e(t).split(`
|
|
2
2
|
`),r=[];for(let n of o)r.push("> "+n);return r.join(`
|
|
3
|
-
`)},regExp:/^>\s/,replace:(e,t,o,r)=>{if(r){let i=e.getPreviousSibling();if(er(i)){i.splice(i.getChildrenSize(),0,[Ol(),...t]),i.select(0,0),e.remove();return}}let n=Al();n.append(...t),e.replace(n),n.select(0,0)}};var rr=[z([{ChildComponent:Wt,isActive:({selection:e})=>{if(!$l(e))return!1;for(let t of e.getNodes())if(!or(t)&&!or(t.getParent()))return!1;return!0},key:"blockquote",label:({i18n:e})=>e.t("lexical:blockquote:label"),onSelect:({editor:e})=>{e.update(()=>{let t=lr();ir(t,()=>nr())})},order:20}])],Bl=L({markdownTransformers:[tr],nodes:[Hl],slashMenu:{groups:[G([{Icon:Wt,key:"blockquote",keywords:["quote","blockquote"],label:({i18n:e})=>e.t("lexical:blockquote:label"),onSelect:({editor:e})=>{e.update(()=>{let t=lr();ir(t,()=>nr())})}}])]},toolbarFixed:{groups:rr},toolbarInline:{groups:rr}});import{getTranslation as lt}from"@payloadcms/translations";import{jsx as zt,jsxs as Gl}from"react/jsx-runtime";var ot=()=>Gl("svg",{"aria-hidden":"true",className:"icon",fill:"none",focusable:"false",height:"20",viewBox:"0 0 20 20",width:"20",xmlns:"http://www.w3.org/2000/svg",children:[zt("rect",{height:"4",rx:"0.5",stroke:"currentColor",width:"4",x:"8",y:"5"}),zt("rect",{height:"4",rx:"0.5",stroke:"currentColor",width:"4",x:"5",y:"11"}),zt("rect",{height:"4",rx:"0.5",stroke:"currentColor",width:"4",x:"11",y:"11"})]});import{jsx as sr}from"react/jsx-runtime";var rt=()=>sr("svg",{"aria-hidden":"true",className:"icon",fill:"none",focusable:"false",height:"20",viewBox:"0 0 20 20",width:"20",xmlns:"http://www.w3.org/2000/svg",children:sr("path",{clipRule:"evenodd",d:"M5.33333 6.5C5.11232 6.5 4.90036 6.5878 4.74408 6.74408C4.5878 6.90036 4.5 7.11232 4.5 7.33333V12.1667C4.5 12.3877 4.5878 12.5996 4.74408 12.7559C4.90036 12.9122 5.11232 13 5.33333 13H14.6667C14.8877 13 15.0996 12.9122 15.2559 12.7559C15.4122 12.5996 15.5 12.3877 15.5 12.1667V11.6667C15.5 11.3905 15.7239 11.1667 16 11.1667C16.2761 11.1667 16.5 11.3905 16.5 11.6667V12.1667C16.5 12.6529 16.3068 13.1192 15.963 13.463C15.6192 13.8068 15.1529 14 14.6667 14H5.33333C4.8471 14 4.38079 13.8068 4.03697 13.463C3.69315 13.1192 3.5 12.6529 3.5 12.1667V7.33333C3.5 6.8471 3.69315 6.38079 4.03697 6.03697C4.38079 5.69315 4.8471 5.5 5.33333 5.5H10.3333C10.6095 5.5 10.8333 5.72386 10.8333 6C10.8333 6.27614 10.6095 6.5 10.3333 6.5H5.33333ZM13 6.5C12.7239 6.5 12.5 6.27614 12.5 6C12.5 5.72386 12.7239 5.5 13 5.5H16C16.2761 5.5 16.5 5.72386 16.5 6V9C16.5 9.27614 16.2761 9.5 16 9.5C15.7239 9.5 15.5 9.27614 15.5 9V7.20711L13.3536 9.35355C13.1583 9.54882 12.8417 9.54882 12.6464 9.35355C12.4512 9.15829 12.4512 8.84171 12.6464 8.64645L14.7929 6.5H13ZM6.16699 8.33325C6.16699 8.05711 6.39085 7.83325 6.66699 7.83325H11.0003C11.2765 7.83325 11.5003 8.05711 11.5003 8.33325C11.5003 8.60939 11.2765 8.83325 11.0003 8.83325H6.66699C6.39085 8.83325 6.16699 8.60939 6.16699 8.33325ZM6.16699 10.9999C6.16699 10.7238 6.39085 10.4999 6.66699 10.4999H13.3337C13.6098 10.4999 13.8337 10.7238 13.8337 10.9999C13.8337 11.2761 13.6098 11.4999 13.3337 11.4999H6.66699C6.39085 11.4999 6.16699 11.2761 6.16699 10.9999Z",fill:"currentColor",fillRule:"evenodd"})});import{DecoratorBlockNode as Ul}from"@lexical/react/LexicalDecoratorBlockNode.js";import Wl from"bson-objectid";import{deepCopyObjectSimple as zl}from"payload/shared";import Vl from"react";import{jsx as Xl}from"react/jsx-runtime";var Kl=Vl.lazy(()=>import("./component-KA7FDRMA.js").then(e=>({default:e.BlockComponent}))),J=class e extends Ul{__fields;constructor({fields:t,format:o,key:r}){super(o,r),this.__fields=t}static clone(t){return new e({fields:t.__fields,format:t.__format,key:t.__key})}static getType(){return"block"}static importDOM(){return{}}static importJSON(t){t.version===1&&(t={...t,fields:{...t.fields.data},version:2});let o=nt(t.fields);return o.setFormat(t.format),o}static isInline(){return!1}decorate(t,o){return Xl(Kl,{formData:this.getFields(),nodeKey:this.getKey()})}exportDOM(){let t=document.createElement("div"),o=document.createTextNode(this.getTextContent());return t.append(o),{element:t}}exportJSON(){return{...super.exportJSON(),type:"block",fields:this.getFields(),version:2}}getFields(){return this.getLatest().__fields}getTextContent(){return"Block Field"}setFields(t){let o=zl(t),r=this.getWritable();r.__fields=o}};function nt(e){return new J({fields:{...e,id:e?.id||new Wl.default().toHexString()}})}function jl(e){return e instanceof J}import{useLexicalComposerContext as Zl}from"@lexical/react/LexicalComposerContext.js";import{$insertNodeToNearestRoot as Jl,$wrapNodeInElement as Yl,mergeRegister as ql}from"@lexical/utils";import{getTranslation as Ql}from"@payloadcms/translations";import{useModal as es,useTranslation as ts}from"@payloadcms/ui";import{$createParagraphNode as os,$getNodeByKey as rs,$getPreviousSelection as ns,$getSelection as ar,$insertNodes as is,$isParagraphNode as cr,$isRangeSelection as dr,$isRootOrShadowRoot as ls,COMMAND_PRIORITY_EDITOR as Vt}from"lexical";import{useEffect as ss,useState as Kt}from"react";import{jsx as as}from"react/jsx-runtime";var it="lexical-inlineBlocks-create",ur=()=>{let[e]=Zl(),{closeModal:t,toggleModal:o}=es(),[r,n]=Kt(null),[i,l]=Kt(""),[a,s]=Kt(null),{i18n:c,t:d}=ts(),{editorConfig:p}=$(),u=p?.resolvedFeatureMap?.get("blocks")?.sanitizedClientFeatureProps?.reducedInlineBlocks?.find(g=>g.slug===r?.blockType);ss(()=>{if(!e.hasNodes([J]))throw new Error("BlocksPlugin: BlocksNode not registered on editor");return ql(e.registerCommand(Ne,g=>(e.update(()=>{let f=ar()||ns();if(dr(f)){let x=nt(g);Jl(x);let{focus:h}=f,I=h.getNode();cr(I)&&I.getTextContentSize()===0&&I.getParent().getChildren().filter(P=>cr(P)).length>1&&I.remove()}}),!0),Vt),e.registerCommand(Mt,g=>{if(a){let x=rs(a);return x?(x.setFields(g),s(null),!0):!1}let f=Go(g);return is([f]),ls(f.getParentOrThrow())&&Yl(f,os).selectEnd(),!0},Vt),e.registerCommand(ke,({fields:g,nodeKey:f})=>{if(n(g??null),s(f??null),l(g?.blockType??""),f)return o(it),!0;let x=null;return e.getEditorState().read(()=>{let h=ar();dr(h)&&(x=h)}),x&&o(it),!0},Vt))},[e,a,o]);let m=u?.labels?.singular?Ql(u?.labels?.singular,c):u?.slug;return as(le,{data:r,drawerSlug:it,drawerTitle:d(`lexical:blocks:inlineBlocks:${r?.id?"edit":"create"}`,{label:m??d("lexical:blocks:inlineBlocks:label")}),featureKey:"blocks",handleDrawerSubmit:(g,f)=>{t(it),f&&(f.blockType=i,e.dispatchCommand(Mt,f))},schemaPathSuffix:r?.blockType})};var cs=L(({props:e})=>({nodes:[J,Bo],plugins:[{Component:ur,position:"normal"}],sanitizedClientFeatureProps:e,slashMenu:{groups:[e.reducedBlocks?.length?{items:e.reducedBlocks.map(t=>({Icon:ot,key:"block-"+t.slug,keywords:["block","blocks",t.slug],label:({i18n:o})=>t.labels.singular?lt(t.labels.singular,o):t.slug,onSelect:({editor:o})=>{o.dispatchCommand(Ne,{id:null,blockName:"",blockType:t.slug})}})),key:"blocks",label:({i18n:t})=>t.t("lexical:blocks:label")}:null,e.reducedInlineBlocks?.length?{items:e.reducedInlineBlocks.map(t=>({Icon:rt,key:"inlineBlocks-"+t.slug,keywords:["inlineBlock","inline block",t.slug],label:({i18n:o})=>t.labels.singular?lt(t.labels.singular,o):t.slug,onSelect:({editor:o})=>{o.dispatchCommand(ke,{fields:{id:null,blockName:"",blockType:t.slug}})}})),key:"inlineBlocks",label:({i18n:t})=>t.t("lexical:blocks:inlineBlocks:label")}:null].filter(Boolean)},toolbarFixed:{groups:[e.reducedBlocks?.length?{type:"dropdown",ChildComponent:ot,items:e.reducedBlocks.map((t,o)=>({ChildComponent:ot,isActive:void 0,key:"block-"+t.slug,label:({i18n:r})=>t.labels.singular?lt(t.labels.singular,r):t.slug,onSelect:({editor:r})=>{r.dispatchCommand(Ne,{id:null,blockName:"",blockType:t.slug})},order:o})),key:"blocks",order:20}:null,e.reducedInlineBlocks?.length?{type:"dropdown",ChildComponent:rt,items:e.reducedInlineBlocks.map((t,o)=>({ChildComponent:rt,isActive:void 0,key:"inlineBlock-"+t.slug,label:({i18n:r})=>t.labels.singular?lt(t.labels.singular,r):t.slug,onSelect:({editor:r})=>{r.dispatchCommand(ke,{fields:{blockType:t.slug}})},order:o})),key:"inlineBlocks",order:25}:null].filter(Boolean)}}));import{useLexicalComposerContext as ps}from"@lexical/react/LexicalComposerContext.js";import{$createParagraphNode as ms,$createTextNode as fs,$getRoot as gs}from"lexical";import*as Cr from"react";import{useCallback as se,useEffect as jt,useLayoutEffect as mr,useRef as Xt,useState as st}from"react";var K=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";var ds=K&&"documentMode"in document?document.documentMode:null,pr=K&&/Mac|iPod|iPhone|iPad/.test(navigator.platform),Ng=K&&/^(?!.*Seamonkey)(?=.*Firefox).*/i.test(navigator.userAgent),kg=K&&"InputEvent"in window&&!ds?"getTargetRanges"in new window.InputEvent("input"):!1,wg=K&&/Version\/[\d.].*Safari/.test(navigator.userAgent),Rg=K&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,_g=K&&/Android/.test(navigator.userAgent),Sg=K&&/Win/.test(navigator.platform),us=K&&/^(?=.*Chrome).*/i.test(navigator.userAgent),vg=K&&/AppleWebKit\/[\d.]+/.test(navigator.userAgent)&&!us;import{jsx as ae,jsxs as Zt}from"react/jsx-runtime";var Cs=e=>{let t=document.createElement("textarea");t.value=e||"",t.style.position="absolute",t.style.opacity="0",document.body?.appendChild(t),t.focus(),t.select();try{let o=document.execCommand("copy");console.log(o)}catch(o){console.error(o)}document.body?.removeChild(t)},hs=(e,t)=>{let o=document.createElement("a");o.setAttribute("href","data:text/plain;charset=utf-8,"+encodeURIComponent(t||"")),o.setAttribute("download",e),o.style.display="none",document.body?.appendChild(o),o.click(),document.body?.removeChild(o)},bs=e=>{let o=((r,n)=>{switch(r){case"click":return` await page.mouse.click(${n.x}, ${n.y});`;case"press":return` await page.keyboard.press('${n}');`;case"keydown":return` await page.keyboard.keydown('${n}');`;case"keyup":return` await page.keyboard.keyup('${n}');`;case"type":return` await page.keyboard.type('${n}');`;case"selectAll":return" await selectAll(page);";case"snapshot":return` await assertHTMLSnapshot(page);
|
|
3
|
+
`)},regExp:/^>\s/,replace:(t,e,o,r)=>{if(r){let i=t.getPreviousSibling();if(Cr(i)){i.splice(i.getChildrenSize(),0,[ms(),...e]),i.select(0,0),t.remove();return}}let n=us();n.append(...e),t.replace(n),n.select(0,0)}};var _r=[J([{ChildComponent:uo,isActive:({selection:t})=>{if(!fs(t))return!1;for(let e of t.getNodes())if(!br(e)&&!br(e.getParent()))return!1;return!0},key:"blockquote",label:({i18n:t})=>t.t("lexical:blockquote:label"),onSelect:({editor:t})=>{t.update(()=>{let e=Er();wr(e,()=>Tr())})},order:20}])],hs=y({markdownTransformers:[xr],nodes:[ps],slashMenu:{groups:[K([{Icon:uo,key:"blockquote",keywords:["quote","blockquote"],label:({i18n:t})=>t.t("lexical:blockquote:label"),onSelect:({editor:t})=>{t.update(()=>{let e=Er();wr(e,()=>Tr())})}}])]},toolbarFixed:{groups:_r},toolbarInline:{groups:_r}});import{getTranslation as kt}from"@payloadcms/translations";import{jsx as mo,jsxs as gs}from"react/jsx-runtime";import"react";var bt=()=>gs("svg",{"aria-hidden":"true",className:"icon",fill:"none",focusable:"false",height:"20",viewBox:"0 0 20 20",width:"20",xmlns:"http://www.w3.org/2000/svg",children:[mo("rect",{height:"4",rx:"0.5",stroke:"currentColor",width:"4",x:"8",y:"5"}),mo("rect",{height:"4",rx:"0.5",stroke:"currentColor",width:"4",x:"5",y:"11"}),mo("rect",{height:"4",rx:"0.5",stroke:"currentColor",width:"4",x:"11",y:"11"})]});import{jsx as Nr}from"react/jsx-runtime";import"react";var _t=()=>Nr("svg",{"aria-hidden":"true",className:"icon",fill:"none",focusable:"false",height:"20",viewBox:"0 0 20 20",width:"20",xmlns:"http://www.w3.org/2000/svg",children:Nr("path",{clipRule:"evenodd",d:"M5.33333 6.5C5.11232 6.5 4.90036 6.5878 4.74408 6.74408C4.5878 6.90036 4.5 7.11232 4.5 7.33333V12.1667C4.5 12.3877 4.5878 12.5996 4.74408 12.7559C4.90036 12.9122 5.11232 13 5.33333 13H14.6667C14.8877 13 15.0996 12.9122 15.2559 12.7559C15.4122 12.5996 15.5 12.3877 15.5 12.1667V11.6667C15.5 11.3905 15.7239 11.1667 16 11.1667C16.2761 11.1667 16.5 11.3905 16.5 11.6667V12.1667C16.5 12.6529 16.3068 13.1192 15.963 13.463C15.6192 13.8068 15.1529 14 14.6667 14H5.33333C4.8471 14 4.38079 13.8068 4.03697 13.463C3.69315 13.1192 3.5 12.6529 3.5 12.1667V7.33333C3.5 6.8471 3.69315 6.38079 4.03697 6.03697C4.38079 5.69315 4.8471 5.5 5.33333 5.5H10.3333C10.6095 5.5 10.8333 5.72386 10.8333 6C10.8333 6.27614 10.6095 6.5 10.3333 6.5H5.33333ZM13 6.5C12.7239 6.5 12.5 6.27614 12.5 6C12.5 5.72386 12.7239 5.5 13 5.5H16C16.2761 5.5 16.5 5.72386 16.5 6V9C16.5 9.27614 16.2761 9.5 16 9.5C15.7239 9.5 15.5 9.27614 15.5 9V7.20711L13.3536 9.35355C13.1583 9.54882 12.8417 9.54882 12.6464 9.35355C12.4512 9.15829 12.4512 8.84171 12.6464 8.64645L14.7929 6.5H13ZM6.16699 8.33325C6.16699 8.05711 6.39085 7.83325 6.66699 7.83325H11.0003C11.2765 7.83325 11.5003 8.05711 11.5003 8.33325C11.5003 8.60939 11.2765 8.83325 11.0003 8.83325H6.66699C6.39085 8.83325 6.16699 8.60939 6.16699 8.33325ZM6.16699 10.9999C6.16699 10.7238 6.39085 10.4999 6.66699 10.4999H13.3337C13.6098 10.4999 13.8337 10.7238 13.8337 10.9999C13.8337 11.2761 13.6098 11.4999 13.3337 11.4999H6.66699C6.39085 11.4999 6.16699 11.2761 6.16699 10.9999Z",fill:"currentColor",fillRule:"evenodd"})});import{jsx as zs}from"react/jsx-runtime";import Zs from"bson-objectid";import"react";import{DecoratorBlockNode as Cs}from"@lexical/react/LexicalDecoratorBlockNode.js";import xs from"bson-objectid";import{deepCopyObjectSimple as bs}from"payload/shared";var Xe=class extends Cs{__fields;constructor({fields:e,format:o,key:r}){super(o,r),this.__fields=e}static clone(e){return new this({fields:e.__fields,format:e.__format,key:e.__key})}static getType(){return"block"}static importDOM(){return{}}static importJSON(e){e.version===1&&(e={...e,fields:{...e.fields.data},version:2});let o=_s(e.fields);return o.setFormat(e.format),o}static isInline(){return!1}decorate(e,o){return null}exportDOM(){let e=document.createElement("div"),o=document.createTextNode(this.getTextContent());return e.append(o),{element:e}}exportJSON(){return{...super.exportJSON(),type:"block",fields:this.getFields(),version:2}}getFields(){return this.getLatest().__fields}getTextContent(){return"Block Field"}setFields(e){let o=bs(e),r=this.getWritable();r.__fields=o}};function _s(t){return new Xe({fields:{...t,id:t?.id||new xs.default().toHexString()}})}import{jsx as z,jsxs as wt,Fragment as Is}from"react/jsx-runtime";import{Button as Sr,Collapsible as Ss,Drawer as Rs,EditDepthProvider as ys,ErrorPill as vs,Form as Ms,formatDrawerSlug as Ds,FormSubmit as As,Pill as Os,RenderFields as Fs,SectionTitle as $s,useDocumentInfo as Rr,useEditDepth as Ps,useFormSubmitted as Bs,useServerFunctions as Hs,useTranslation as js}from"@payloadcms/ui";import{abortAndIgnore as po}from"@payloadcms/ui/shared";import{deepCopyObjectSimpleWithoutReactComponents as Gs,reduceFieldsToValues as yr}from"payload/shared";import fo,{useCallback as ho,useEffect as vr,useMemo as Je,useRef as Ws}from"react";import{useLexicalComposerContext as Us}from"@lexical/react/LexicalComposerContext";import{getTranslation as Vs}from"@payloadcms/translations";import{$getNodeByKey as go}from"lexical";import{v4 as Ks}from"uuid";import{c as Ts}from"react/compiler-runtime";import{jsx as Tt,jsxs as ws}from"react/jsx-runtime";import{RenderFields as Es,useFormSubmitted as Ns}from"@payloadcms/ui";import ks,{createContext as Ls}from"react";var kr=Ls({initialState:!1}),Me=()=>ks.useContext(kr),Lr=t=>{let e=Ts(13),{BlockDrawer:o,Collapsible:r,CustomBlock:n,EditButton:i,errorCount:l,formSchema:s,initialState:a,nodeKey:d,RemoveButton:c}=t,m=Ns()&&l>0,p,f;e[0]!==r||e[1]!==l||e[2]!==m?(f=T=>Tt(r,{editButton:T.editButton,errorCount:l,fieldHasErrors:m,Label:T.Label,removeButton:T.removeButton,children:T.children}),e[0]=r,e[1]=l,e[2]=m,e[3]=f):f=e[3],p=f;let h=p,g;return e[4]!==n||e[5]!==h||e[6]!==i||e[7]!==a||e[8]!==d||e[9]!==c||e[10]!==o||e[11]!==s?(g=n?ws(kr.Provider,{value:{BlockCollapsible:h,EditButton:i,initialState:a,nodeKey:d,RemoveButton:c},children:[n,Tt(o,{})]}):Tt(h,{children:Tt(Es,{fields:s,forceRender:!0,parentIndexPath:"",parentPath:"",parentSchemaPath:"",permissions:!0})}),e[4]=n,e[5]=h,e[6]=i,e[7]=a,e[8]=d,e[9]=c,e[10]=o,e[11]=s,e[12]=g):g=e[12],g};function Ir({fields:t}){for(let e in t){let o=t[e];Array.isArray(o.rows)&&"value"in o&&(o.disableFormData=!0)}return t}var re="lexical-block",Mr=t=>{let{formData:e,nodeKey:o}=t,r=Bs(),{id:n,collectionSlug:i,globalSlug:l}=Rr(),{fieldProps:{featureClientSchemaMap:s,field:a,initialLexicalFormState:d,permissions:c,readOnly:u,schemaPath:m},uuid:p}=B(),f=Ws(new AbortController),h=Ps(),[g,T]=fo.useState(0),M=Ds({slug:`lexical-blocks-create-${p}-${e.id}`,depth:h}),{toggleDrawer:A}=be(M,!0),{getDocPreferences:C,setDocFieldPreferences:w}=Rr(),[x]=Us(),{getFormState:N}=Hs(),S=`${m}.lexical_internal_feature.blocks.lexical_blocks.${e.blockType}.fields`,[E,k]=fo.useState(d?.[e.id]?.formState?{...d?.[e.id]?.formState,blockName:{initialValue:e.blockName,passesCondition:!0,valid:!0,value:e.blockName}}:!1);vr(()=>{let U=new AbortController;return e&&!E&&(async()=>{let{state:Y}=await N({id:n,collectionSlug:i,data:e,docPermissions:{fields:!0},docPreferences:await C(),globalSlug:l,operation:"update",renderAllFields:!0,schemaPath:S,signal:U.signal});Y&&(Y.blockName={initialValue:e.blockName,passesCondition:!0,valid:!0,value:e.blockName},k(Y))})(),()=>{po(U)}},[N,S,n,e,E,i,l,C]);let[I,b]=fo.useState(d?.[e.id]?.collapsed??!1),_=`${m}.lexical_internal_feature.blocks.lexical_blocks.${e.blockType}`,D=s.blocks[_][0].blocks[0],{i18n:v,t:O}=js(),H=ho(async({formState:U,submit:ee})=>{po(f.current);let Y=new AbortController;f.current=Y;let{state:X}=await N({id:n,collectionSlug:i,docPermissions:{fields:!0},docPreferences:await C(),formState:U,globalSlug:l,operation:"update",schemaPath:S,signal:Y.signal});if(!X)return U;X.blockName=U.blockName;let oe=yr(Ir({fields:Gs(X)}),!0);if(setTimeout(()=>{x.update(()=>{let xe=go(o);if(xe&&Et(xe)){let ve={...oe,blockType:e.blockType};xe.setFields(ve)}})},0),ee){let xe=0;for(let ve of Object.values(X))ve?.valid===!1&&xe++;T(xe)}return X},[N,n,i,C,l,S,e.blockType,x,o]);vr(()=>()=>{po(f.current)},[]);let $=ho(()=>{x.update(()=>{go(o)?.remove()})},[x,o]),j=E?._components?.customComponents?.BlockLabel,Q=E?._components?.customComponents?.Block,W=D?.labels?.singular?Vs(D.labels.singular,v):D?.slug,G=ho(U=>{C().then(ee=>{let X=ee?.fields[a.name]?.collapsed,oe=X&&X?.length?X:[];U?oe.includes(e.id)||oe.push(e.id):oe.includes(e.id)&&oe.splice(oe.indexOf(e.id),1),w(a.name,{collapsed:oe,hello:"hi"})})},[C,a.name,w,e.id]),ae=Je(()=>()=>z(Sr,{buttonStyle:"icon-label",className:`${re}__editButton`,disabled:u,el:"div",icon:"edit",onClick:()=>{A()},round:!0,size:"small",tooltip:O("lexical:blocks:inlineBlocks:edit",{label:W})}),[W,u,O,A]),ye=Je(()=>()=>z(Sr,{buttonStyle:"icon-label",className:`${re}__removeButton`,disabled:a?.admin?.readOnly||!1,icon:"x",onClick:U=>{U.preventDefault(),$()},round:!0,tooltip:"Remove Block"}),[a?.admin?.readOnly,$]),Ce=Je(()=>({children:U,editButton:ee,errorCount:Y,fieldHasErrors:X,Label:oe,removeButton:xe})=>z("div",{className:re+" "+re+"-"+e.blockType,children:z(Ss,{className:[`${re}__row`,X?`${re}__row--has-errors`:`${re}__row--no-errors`].join(" "),collapsibleStyle:X?"error":"default",header:wt("div",{className:`${re}__block-header`,children:[oe??j?oe??j:wt("div",{children:[z(Os,{className:`${re}__block-pill ${re}__block-pill-${e?.blockType}`,pillStyle:"white",children:W}),z($s,{path:"blockName",readOnly:a?.admin?.readOnly||!1}),X&&z(vs,{count:Y??0,i18n:v,withMessage:!0})]}),wt("div",{children:[Q&&ee!==!1||!Q&&ee?z(ae,{}):null,xe!==!1&&x.isEditable()?z(ye,{}):null]})]}),isCollapsed:I,onToggle:ve=>{G(ve),b(ve)},children:U},0)}),[Q,j,ae,ye,W,x,e.blockType,v,I,G,a?.admin?.readOnly]),dt=Je(()=>()=>z(ys,{children:z(Rs,{className:"",slug:M,title:O(`lexical:blocks:inlineBlocks:${e?.id?"edit":"create"}`,{label:W??O("lexical:blocks:inlineBlocks:label")}),children:E?wt(Is,{children:[z(Fs,{fields:D.fields,forceRender:!0,parentIndexPath:"",parentPath:"",parentSchemaPath:S,permissions:c,readOnly:!1}),z(As,{children:O("fields:saveChanges")})]}):null})}),[E,M,W,O,D.fields,S,c]);return Je(()=>E?z(Ms,{beforeSubmit:[async({formState:U})=>await H({formState:U,submit:!0})],fields:D.fields,initialState:E,onChange:[H],onSubmit:U=>{let ee=yr(U);ee.blockType=e.blockType,x.update(()=>{let Y=go(o);Y&&Et(Y)&&Y.setFields(ee)}),A()},submitted:r,uuid:Ks(),children:z(Lr,{baseClass:re,BlockDrawer:dt,Collapsible:Ce,CustomBlock:Q,EditButton:ae,errorCount:g,formSchema:D.fields,initialState:E,nodeKey:o,RemoveButton:ye})}):null,[Ce,dt,Q,ye,ae,x,g,A,D.fields,E,o,H,r])};var ce=class extends Xe{static clone(e){return super.clone(e)}static getType(){return super.getType()}static importJSON(e){e.version===1&&(e={...e,fields:{...e.fields.data},version:2});let o=Nt(e.fields);return o.setFormat(e.format),o}decorate(e,o){return zs(Mr,{formData:this.getFields(),nodeKey:this.getKey()})}exportJSON(){return super.exportJSON()}};function Nt(t){return new ce({fields:{...t,id:t?.id||new Zs.default().toHexString()}})}function Et(t){return t instanceof ce}import{createCommand as Dr}from"lexical";var qe=Dr("INSERT_BLOCK_COMMAND"),Qe=Dr("INSERT_INLINE_BLOCK_COMMAND");import{c as Ys}from"react/compiler-runtime";import{useLexicalComposerContext as Xs}from"@lexical/react/LexicalComposerContext.js";import{$insertNodeToNearestRoot as Js,$wrapNodeInElement as qs,mergeRegister as Qs}from"@lexical/utils";import{formatDrawerSlug as ea,useEditDepth as ta}from"@payloadcms/ui";import{$createParagraphNode as oa,$getNodeByKey as ra,$getPreviousSelection as na,$getSelection as ia,$insertNodes as la,$isParagraphNode as Ar,$isRangeSelection as sa,$isRootOrShadowRoot as aa,COMMAND_PRIORITY_EDITOR as Or}from"lexical";import{useEffect as ca,useState as ua}from"react";var Fr=()=>{let t=Ys(10),[e]=Xs(),[o,r]=ua(null),{uuid:n}=B(),i=ta(),l="lexical-inlineBlocks-create-"+n,s;t[0]!==l||t[1]!==i?(s=ea({slug:l,depth:i}),t[0]=l,t[1]=i,t[2]=s):s=t[2];let a=s,{toggleDrawer:d}=be(a,!0),c;t[3]!==e||t[4]!==o?(c=()=>{if(!e.hasNodes([ce]))throw new Error("BlocksPlugin: BlocksNode not registered on editor");return Qs(e.registerCommand(qe,m=>(e.update(()=>{let p=ia()||na();if(sa(p)){let f=Nt(m);Js(f);let{focus:h}=p,g=h.getNode();Ar(g)&&g.getTextContentSize()===0&&g.getParentOrThrow().getChildren().filter(T=>Ar(T)).length>1&&g.remove()}}),!0),Or),e.registerCommand(Qe,m=>{if(o){let f=ra(o);return!f||!ro(f)?!1:(f.setFields(m),r(null),!0)}let p=oo(m);return la([p]),aa(p.getParentOrThrow())&&qs(p,oa).selectEnd(),!0},Or))},t[3]=e,t[4]=o,t[5]=c):c=t[5];let u;return t[6]!==e||t[7]!==o||t[8]!==d?(u=[e,o,d],t[6]=e,t[7]=o,t[8]=d,t[9]=u):u=t[9],ca(c,u),null};var da=y(({featureClientSchemaMap:t,props:e,schemaPath:o})=>{let r=`${o}.lexical_internal_feature.blocks.lexical_blocks`,n=`${o}.lexical_internal_feature.blocks.lexical_inline_blocks`,i=t.blocks,l=Object.entries(i).filter(([c])=>c.startsWith(r+".")&&!c.replace(r+".","").includes(".")).map(([c,u])=>u[0]),s=Object.entries(i).filter(([c])=>c.startsWith(n+".")&&!c.replace(n+".","").includes(".")).map(([c,u])=>u[0]),a=l.map(c=>c.blocks[0]),d=s.map(c=>c.blocks[0]);return{nodes:[ce,to],plugins:[{Component:Fr,position:"normal"}],sanitizedClientFeatureProps:e,slashMenu:{groups:[a?.length?{items:a.map(c=>({Icon:bt,key:"block-"+c.slug,keywords:["block","blocks",c.slug],label:({i18n:u})=>c?.labels?.singular?kt(c.labels.singular,u):c?.slug,onSelect:({editor:u})=>{u.dispatchCommand(qe,{blockName:"",blockType:c.slug})}})),key:"blocks",label:({i18n:c})=>c.t("lexical:blocks:label")}:null,d?.length?{items:d.map(c=>({Icon:_t,key:"inlineBlocks-"+c.slug,keywords:["inlineBlock","inline block",c.slug],label:({i18n:u})=>c?.labels?.singular?kt(c.labels.singular,u):c?.slug,onSelect:({editor:u})=>{u.dispatchCommand(Qe,{blockName:"",blockType:c.slug})}})),key:"inlineBlocks",label:({i18n:c})=>c.t("lexical:blocks:inlineBlocks:label")}:null].filter(Boolean)},toolbarFixed:{groups:[a.length?{type:"dropdown",ChildComponent:bt,items:a.map((c,u)=>({ChildComponent:bt,isActive:void 0,key:"block-"+c.slug,label:({i18n:m})=>c?.labels?.singular?kt(c.labels.singular,m):c?.slug,onSelect:({editor:m})=>{m.dispatchCommand(qe,{blockName:"",blockType:c.slug})},order:u})),key:"blocks",order:20}:null,d?.length?{type:"dropdown",ChildComponent:_t,items:d.map((c,u)=>({ChildComponent:_t,isActive:void 0,key:"inlineBlock-"+c.slug,label:({i18n:m})=>c?.labels?.singular?kt(c.labels.singular,m):c?.slug,onSelect:({editor:m})=>{m.dispatchCommand(Qe,{blockName:"",blockType:c.slug})},order:u})),key:"inlineBlocks",order:25}:null].filter(Boolean)}}});import{c as fa}from"react/compiler-runtime";import{jsx as ke,jsxs as bo}from"react/jsx-runtime";import{useLexicalComposerContext as ha}from"@lexical/react/LexicalComposerContext.js";import{$createParagraphNode as ga,$createTextNode as Ca,$getRoot as xa}from"lexical";import*as jr from"react";import{useCallback as Ne,useEffect as Co,useLayoutEffect as Pr,useRef as xo,useState as Lt}from"react";var ma=te&&"documentMode"in document?document.documentMode:null,$r=te&&/Mac|iPod|iPhone|iPad/.test(navigator.platform),Xg=te&&/^(?!.*Seamonkey)(?=.*Firefox).*/i.test(navigator.userAgent),Jg=te&&"InputEvent"in window&&!ma?"getTargetRanges"in new window.InputEvent("input"):!1,qg=te&&/Version\/[\d.].*Safari/.test(navigator.userAgent),Qg=te&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,eC=te&&/Android/.test(navigator.userAgent),tC=te&&/Win/.test(navigator.platform),pa=te&&/^(?=.*Chrome).*/i.test(navigator.userAgent),oC=te&&/AppleWebKit\/[\d.]+/.test(navigator.userAgent)&&!pa;var ba=t=>{let e=document.createElement("textarea");e.value=t||"",e.style.position="absolute",e.style.opacity="0",document.body?.appendChild(e),e.focus(),e.select();try{let o=document.execCommand("copy");console.log(o)}catch(o){console.error(o)}document.body?.removeChild(e)},_a=(t,e)=>{let o=document.createElement("a");o.setAttribute("href","data:text/plain;charset=utf-8,"+encodeURIComponent(e||"")),o.setAttribute("download",t),o.style.display="none",document.body?.appendChild(o),o.click(),document.body?.removeChild(o)},Ta=t=>{let o=((r,n)=>{switch(r){case"click":return` await page.mouse.click(${n.x}, ${n.y});`;case"keydown":return` await page.keyboard.keydown('${n}');`;case"keyup":return` await page.keyboard.keyup('${n}');`;case"press":return` await page.keyboard.press('${n}');`;case"selectAll":return" await selectAll(page);";case"snapshot":return` await assertHTMLSnapshot(page);
|
|
4
4
|
await assertSelection(page, {
|
|
5
5
|
anchorPath: [${n.anchorPath.toString()}],
|
|
6
6
|
anchorOffset: ${n.anchorOffset},
|
|
7
7
|
focusPath: [${n.focusPath.toString()}],
|
|
8
8
|
focusOffset: ${n.focusOffset},
|
|
9
9
|
});
|
|
10
|
-
`;default:return""}})(
|
|
11
|
-
`);default:return` await repeat(${
|
|
10
|
+
`;case"type":return` await page.keyboard.type('${n}');`;default:return""}})(t.name,t.value);switch(t.count){case 1:return o;case 2:return[o,o].join(`
|
|
11
|
+
`);default:return` await repeat(${t.count}, async () => {
|
|
12
12
|
${o}
|
|
13
|
-
);`}};function
|
|
13
|
+
);`}};function wa(t){return t.key.toLowerCase()==="a"&&($r?t.metaKey:t.ctrlKey)}function Ea(t){let{anchorNode:e,focusNode:o}=t,{anchorOffset:r,focusOffset:n}=t;return r!==0&&r--,n!==0&&n--,{anchorNode:e,anchorOffset:r,focusNode:o,focusOffset:n}}function Br(t,e){let o=t,r=[];for(;o!==e;)o!=null&&r.unshift(Array.from(o?.parentNode?.childNodes??[]).indexOf(o)),o=o?.parentNode;return r}var Hr=new Set(["ArrowDown","ArrowLeft","ArrowRight","ArrowUp","Backspace","Delete","Enter","Escape"]);function Na(t){let[e,o]=Lt([]),[r,n]=Lt(!1),[,i]=Lt(""),[l,s]=Lt(""),a=xo(null),d=xo(!1),c=xo(null),u=Ne(()=>t,[t]),m=Ne(()=>{let C=t.getRootElement(),w=window.getSelection();return C==null||w==null||w.anchorNode==null||w.focusNode==null||!C.contains(w.anchorNode)||!C.contains(w.focusNode)?null:`
|
|
14
14
|
import {
|
|
15
15
|
initializeE2E,
|
|
16
16
|
assertHTMLSnapshot,
|
|
@@ -27,12 +27,14 @@ describe('Test case', () => {
|
|
|
27
27
|
const {page} = e2e;
|
|
28
28
|
|
|
29
29
|
await page.focus('div[contenteditable="true"]');
|
|
30
|
-
${
|
|
30
|
+
${e.map(Ta).join(`
|
|
31
31
|
`)}
|
|
32
32
|
});
|
|
33
33
|
});
|
|
34
|
-
`},[e,t]),m=se((T,k)=>{o(E=>{let _=t.length-1,M=t[_];if(M&&M.name===T){if(T==="type")return[...t.slice(0,_),{...M,value:M.value+k}];if(M.value===k)return[...t.slice(0,_),{...M,count:M.count+1}]}return[...E,{name:T,count:1,value:k}]})},[t,o]);mr(()=>{let T=E=>{if(!r)return;let _=E.key;xs(E)?m("selectAll",""):gr.has(_)?m("press",E.key):[..._].length>1?m("keydown",E.key):m("type",E.key)},k=E=>{if(!r)return;let _=E.key;!gr.has(_)&&[..._].length>1&&m("keyup",E.key)};return e.registerRootListener((E,_)=>{_!==null&&(_.removeEventListener("keydown",T),_.removeEventListener("keyup",k)),E!==null&&(E.addEventListener("keydown",T),E.addEventListener("keyup",k))})},[e,r,m]),mr(()=>{d.current&&d.current.scrollTo(0,d.current.scrollHeight)},[u]),jt(()=>{if(t){let T=u();T!==null&&a(T),d.current&&d.current.scrollTo(0,d.current.scrollHeight)}},[u,t]),jt(()=>e.registerUpdateListener(({dirtyElements:k,dirtyLeaves:E,editorState:_})=>{if(!r)return;let M=_._selection,F=s.current,N=c.current;if(F!==M){if(E.size===0&&k.size===0&&!N){let C=window.getSelection();if(C&&(C.anchorNode==null||C.focusNode==null))return}s.current=M}c.current=!1;let b=u();b!==null&&a(b)}),[e,u,r,m]),jt(()=>r?e.registerUpdateListener(()=>{let k=e.getRootElement();k!==null&&i(k?.innerHTML)}):void 0,[e,r]);let g=se(T=>{r||(T.update(()=>{let k=gs();k.clear();let E=fs();k.append(ms().append(E)),E.select()}),o([])),n(k=>!k)},[r]),f=se(()=>{if(!r)return;let T=window.getSelection();if(T===null||T.anchorNode==null||T.focusNode==null)return;let{anchorNode:k,anchorOffset:E,focusNode:_,focusOffset:M}=Ts(T),F=p().getRootElement(),N;k!==null&&(N=fr(k,F));let b;_!==null&&(b=fr(_,F)),m("snapshot",{anchorNode:k,anchorOffset:E,anchorPath:N,focusNode:_,focusOffset:M,focusPath:b})},[m,r,p]),x=se(()=>{Cs(u())},[u]),h=se(()=>{hs("test.js",u())},[u]);return[ae("button",{className:`editor-dev-button ${r?"active":""}`,id:"test-recorder-button",onClick:T=>{g(p()),T.preventDefault()},title:r?"Disable test recorder":"Enable test recorder",type:"button",children:r?"Disable test recorder":"Enable test recorder"}),r?Zt("div",{className:"test-recorder-output",children:[Zt("div",{className:"test-recorder-toolbar",children:[ae("button",{className:"test-recorder-button",id:"test-recorder-button-snapshot",onClick:T=>{f(),T.preventDefault()},title:"Insert snapshot",type:"button",children:"Insert Snapshot"}),ae("button",{className:"test-recorder-button",id:"test-recorder-button-copy",onClick:T=>{x(),T.preventDefault()},title:"Copy to clipboard",type:"button",children:"Copy"}),ae("button",{className:"test-recorder-button",id:"test-recorder-button-download",onClick:T=>{h(),T.preventDefault()},title:"Download as a file",type:"button",children:"Download"})]}),ae("pre",{id:"test-recorder",ref:d,children:l})]}):null]}var hr=()=>{let[e]=ps(),[t,o]=Es(e);return Zt(Cr.Fragment,{children:[ae("p",{children:"HI"}),t,o,ae("p",{children:"DONE"})]})};var ys=L({plugins:[{Component:hr,position:"bottom"}]});import{useLexicalComposerContext as Ls}from"@lexical/react/LexicalComposerContext.js";import{TreeView as Ns}from"@lexical/react/LexicalTreeView.js";import{jsx as ks}from"react/jsx-runtime";var br=()=>{let[e]=Ls();return ks(Ns,{editor:e,timeTravelButtonClassName:"debug-timetravel-button",timeTravelPanelButtonClassName:"debug-timetravel-panel-button",timeTravelPanelClassName:"debug-timetravel-panel",timeTravelPanelSliderClassName:"debug-timetravel-panel-slider",treeTypeButtonClassName:"debug-treetype-button",viewClassName:"tree-view-output"})};var ws=L({plugins:[{Component:br,position:"bottom"}]});import{$isRangeSelection as Rs,FORMAT_TEXT_COMMAND as _s}from"lexical";import{jsx as xr}from"react/jsx-runtime";var Tr=()=>xr("svg",{"aria-hidden":"true",className:"icon",fill:"currentColor",focusable:"false",height:"20",viewBox:"0 0 20 20",width:"20",xmlns:"http://www.w3.org/2000/svg",children:xr("path",{d:"M10.6772 15H6.27017V5.718H10.4172C12.6792 5.718 13.8492 6.602 13.8492 8.292C13.8492 9.098 13.1992 9.982 12.4712 10.216C13.3812 10.476 14.1742 11.256 14.1742 12.322C14.1742 14.09 12.9002 15 10.6772 15ZM8.46717 9.501H10.3262C11.3012 9.501 11.7042 9.046 11.7042 8.409C11.7042 7.72 11.2362 7.317 10.3392 7.317H8.46717V9.501ZM8.46717 11.061V13.401H10.4822C11.4702 13.401 11.9642 12.959 11.9642 12.218C11.9642 11.49 11.4702 11.061 10.4822 11.061H8.46717Z",fill:"currentColor"})});var U=e=>({type:"buttons",items:e,key:"format",order:40});var Er={type:"text-format",format:["bold","italic"],tag:"***"},yr={type:"text-format",format:["bold","italic"],intraword:!1,tag:"___"},Lr={type:"text-format",format:["bold"],tag:"**"},Nr={type:"text-format",format:["bold"],intraword:!1,tag:"__"};var kr=[U([{ChildComponent:Tr,isActive:({selection:e})=>Rs(e)?e.hasFormat("bold"):!1,key:"bold",onSelect:({editor:e})=>{e.dispatchCommand(_s,"bold")},order:1}])],Ss=L(({featureProviderMap:e})=>{let t=[Lr,Nr];return e.get("italic")&&t.push(yr,Er),{markdownTransformers:t,toolbarFixed:{groups:kr},toolbarInline:{groups:kr}}});import{$isRangeSelection as Is,FORMAT_TEXT_COMMAND as Fs}from"lexical";import{jsx as wr,jsxs as vs}from"react/jsx-runtime";var Rr=()=>vs("svg",{"aria-hidden":"true",className:"icon",fill:"none",focusable:"false",height:"20",viewBox:"0 0 20 20",width:"20",xmlns:"http://www.w3.org/2000/svg",children:[wr("path",{d:"M7.76465 6L3.76465 10L7.76465 14",stroke:"currentColor"}),wr("path",{d:"M12.2354 6L16.2354 10L12.2354 14",stroke:"currentColor"})]});var _r={type:"text-format",format:["code"],tag:"`"};var Sr=[U([{ChildComponent:Rr,isActive:({selection:e})=>Is(e)?e.hasFormat("code"):!1,key:"inlineCode",onSelect:({editor:e})=>{e.dispatchCommand(Fs,"code")},order:7}])],Ms=L({markdownTransformers:[_r],toolbarFixed:{groups:Sr},toolbarInline:{groups:Sr}});import{$isRangeSelection as Ps,FORMAT_TEXT_COMMAND as As}from"lexical";import{jsx as vr}from"react/jsx-runtime";var Ir=()=>vr("svg",{"aria-hidden":"true",className:"icon",fill:"currentColor",focusable:"false",height:"20",viewBox:"0 0 20 20",width:"20",xmlns:"http://www.w3.org/2000/svg",children:vr("path",{d:"M11.311 14.2969L11.0327 15H6.18408L6.4624 14.2969C7.54639 14.2969 7.70752 14.209 7.83936 13.8721L10.8423 6.45996C10.8716 6.38672 10.8862 6.32812 10.8862 6.26953C10.8862 6.09375 10.6519 6.03516 9.80225 6.03516L10.0952 5.33203H14.9438L14.6509 6.03516C13.5669 6.03516 13.4204 6.12305 13.2886 6.45996L10.2856 13.8721C10.2563 13.9453 10.2271 14.0039 10.2271 14.0625C10.2271 14.2383 10.4614 14.2969 11.311 14.2969Z",fill:"currentColor"})});var Fr={type:"text-format",format:["italic"],tag:"*"},Mr={type:"text-format",format:["italic"],intraword:!1,tag:"_"};var Pr=[U([{ChildComponent:Ir,isActive:({selection:e})=>Ps(e)?e.hasFormat("italic"):!1,key:"italic",onSelect:({editor:e})=>{e.dispatchCommand(As,"italic")},order:2}])],Ds=L({markdownTransformers:[Fr,Mr],toolbarFixed:{groups:Pr},toolbarInline:{groups:Pr}});import{$isRangeSelection as Hs,FORMAT_TEXT_COMMAND as $s}from"lexical";import{jsx as Ar,jsxs as Os}from"react/jsx-runtime";var Dr=()=>Os("svg",{"aria-hidden":"true",className:"icon",fill:"currentColor",focusable:"false",height:"20",viewBox:"0 0 20 20",width:"20",xmlns:"http://www.w3.org/2000/svg",children:[Ar("path",{d:"M5.50756 12.76H7.42756C7.56256 14.215 8.82256 14.71 10.1576 14.71C11.4326 14.71 12.4226 14.14 12.4226 13.06C12.4226 12.28 11.9576 11.845 10.6676 11.605L8.70256 11.245C7.12756 10.96 5.85256 10.21 5.85256 8.335C5.85256 6.43 7.53256 5.11 9.87256 5.11C12.4226 5.11 13.9526 6.22 14.1626 8.23H12.2876C12.1526 7.18 11.2226 6.595 9.88756 6.595C8.59756 6.595 7.78756 7.27 7.78756 8.215C7.78756 9.1 8.34256 9.385 9.49756 9.61L11.5676 10.015C13.3226 10.345 14.3726 11.215 14.3726 12.94C14.3726 14.89 12.5876 16.18 10.2176 16.18C7.66756 16.18 5.70256 15.115 5.50756 12.76Z",fill:"currentColor"}),Ar("path",{d:"M4.99756 11.44H15.0026V12.19H4.99756V11.44Z",fill:"currentColor"})]});var Or={type:"text-format",format:["strikethrough"],tag:"~~"};var Hr=[U([{ChildComponent:Dr,isActive:({selection:e})=>Hs(e)?e.hasFormat("strikethrough"):!1,key:"strikethrough",onSelect:({editor:e})=>{e.dispatchCommand($s,"strikethrough")},order:4}])],Bs=L({markdownTransformers:[Or],toolbarFixed:{groups:Hr},toolbarInline:{groups:Hr}});import{$isRangeSelection as Gs,FORMAT_TEXT_COMMAND as Us}from"lexical";import{jsx as $r}from"react/jsx-runtime";var Br=()=>$r("svg",{"aria-hidden":"true",className:"icon",fill:"currentColor",focusable:"false",height:"20",viewBox:"0 0 20 20",width:"20",xmlns:"http://www.w3.org/2000/svg",children:$r("path",{d:"M10.167 15L7.45002 11.36L4.73302 15H2.91302L6.55302 10.177L3.23802 5.718H5.20102L7.54102 8.89L9.89402 5.718H11.714L8.43802 10.06L12.13 15H10.167ZM16.7768 13.258C16.7768 14.155 16.1398 14.532 15.2038 15C14.5538 15.325 14.2808 15.546 14.2418 15.78H16.7898V16.82H12.7208V16.339C12.7208 15.286 13.5918 14.675 14.3588 14.233C15.0868 13.83 15.4378 13.635 15.4378 13.232C15.4378 12.894 15.2038 12.686 14.8268 12.686C14.3848 12.686 14.1248 13.024 14.1118 13.427H12.7468C12.8248 12.426 13.5528 11.633 14.8398 11.633C15.9448 11.633 16.7768 12.257 16.7768 13.258Z",fill:"currentColor"})});var Gr=[U([{ChildComponent:Br,isActive:({selection:e})=>Gs(e)?e.hasFormat("subscript"):!1,key:"subscript",onSelect:({editor:e})=>{e.dispatchCommand(Us,"subscript")},order:5}])],Ws=L({toolbarFixed:{groups:Gr},toolbarInline:{groups:Gr}});import{$isRangeSelection as zs,FORMAT_TEXT_COMMAND as Vs}from"lexical";import{jsx as Ur}from"react/jsx-runtime";var Wr=()=>Ur("svg",{"aria-hidden":"true",className:"icon",fill:"currentColor",focusable:"false",height:"20",viewBox:"0 0 20 20",width:"20",xmlns:"http://www.w3.org/2000/svg",children:Ur("path",{d:"M10.167 15L7.45002 11.36L4.73302 15H2.91302L6.55302 10.177L3.23802 5.718H5.20102L7.54102 8.89L9.89402 5.718H11.714L8.43802 10.06L12.13 15H10.167ZM16.7768 7.252C16.7768 8.149 16.1398 8.526 15.2038 8.994C14.5538 9.319 14.2808 9.54 14.2418 9.774H16.7898V10.814H12.7208V10.333C12.7208 9.28 13.5918 8.669 14.3588 8.227C15.0868 7.824 15.4378 7.629 15.4378 7.226C15.4378 6.888 15.2038 6.68 14.8268 6.68C14.3848 6.68 14.1248 7.018 14.1118 7.421H12.7468C12.8248 6.42 13.5528 5.627 14.8398 5.627C15.9448 5.627 16.7768 6.251 16.7768 7.252Z",fill:"currentColor"})});var zr=[U([{ChildComponent:Wr,isActive:({selection:e})=>zs(e)?e.hasFormat("superscript"):!1,key:"superscript",onSelect:({editor:e})=>{e.dispatchCommand(Vs,"superscript")},order:6}])],Ks=L({toolbarFixed:{groups:zr},toolbarInline:{groups:zr}});import{$isRangeSelection as Xs,FORMAT_TEXT_COMMAND as Zs}from"lexical";import{jsx as Vr,jsxs as js}from"react/jsx-runtime";var Kr=()=>js("svg",{"aria-hidden":"true",className:"icon",fill:"currentColor",focusable:"false",height:"20",viewBox:"0 0 20 20",width:"20",xmlns:"http://www.w3.org/2000/svg",children:[Vr("path",{d:"M13.9656 11.256C13.9656 13.791 12.5096 15.156 10.0006 15.156C7.50461 15.156 6.03561 13.791 6.03561 11.23V5.718H7.76461V11.243C7.76461 12.868 8.50561 13.778 10.0006 13.778C11.4956 13.778 12.2496 12.868 12.2496 11.243V5.718H13.9656V11.256Z",fill:"currentColor"}),Vr("path",{d:"M5.09961 16.3H14.9016V16.95H5.09961V16.3Z",fill:"currentColor"})]});var jr=[U([{ChildComponent:Kr,isActive:({selection:e})=>Xs(e)?e.hasFormat("underline"):!1,key:"underline",onSelect:({editor:e})=>{e.dispatchCommand(Zs,"underline")},order:3}])],Js=L({toolbarFixed:{groups:jr},toolbarInline:{groups:jr}});import{$createHeadingNode as ea,$isHeadingNode as an,HeadingNode as ta}from"@lexical/rich-text";import{$setBlocksType as oa}from"@lexical/selection";import{$getSelection as ra,$isRangeSelection as na}from"lexical";import{jsx as Xr}from"react/jsx-runtime";var Zr=()=>Xr("svg",{"aria-hidden":"true",className:"icon",fill:"none",focusable:"false",height:"20",viewBox:"0 0 20 20",width:"20",xmlns:"http://www.w3.org/2000/svg",children:Xr("path",{d:"M4.639 13.5V7.074H6.196V9.648H9.076V7.074H10.642V13.5H9.076V10.836H6.196V13.5H4.639ZM11.5656 9.045V8.019C12.6636 8.019 13.1316 7.731 13.2846 7.065H14.4006V13.5H12.8436V9.045H11.5656Z",fill:"currentColor"})});import{jsx as Jr}from"react/jsx-runtime";var Yr=()=>Jr("svg",{"aria-hidden":"true",className:"icon",fill:"none",focusable:"false",height:"20",viewBox:"0 0 20 20",width:"20",xmlns:"http://www.w3.org/2000/svg",children:Jr("path",{d:"M4.139 13.5V7.074H5.696V9.648H8.576V7.074H10.142V13.5H8.576V10.836H5.696V13.5H4.139ZM15.9796 8.973C15.9796 10.116 15.1696 10.656 14.0356 11.232C13.2256 11.646 12.8206 11.943 12.7846 12.294H15.9886V13.5H11.0566V12.951C11.0566 11.601 12.1636 10.845 13.1176 10.287C14.0356 9.756 14.5126 9.486 14.5126 8.946C14.5126 8.46 14.2156 8.145 13.6306 8.145C13.0186 8.145 12.6586 8.613 12.6226 9.198H11.1196C11.2186 7.947 12.1006 6.966 13.6396 6.966C15.0346 6.966 15.9796 7.785 15.9796 8.973Z",fill:"currentColor"})});import{jsx as qr}from"react/jsx-runtime";var Qr=()=>qr("svg",{"aria-hidden":"true",className:"icon",fill:"none",focusable:"false",height:"20",viewBox:"0 0 20 20",width:"20",xmlns:"http://www.w3.org/2000/svg",children:qr("path",{d:"M4.139 13.5V7.074H5.696V9.648H8.576V7.074H10.142V13.5H8.576V10.836H5.696V13.5H4.139ZM16.1146 11.745C16.1146 12.744 15.2236 13.608 13.6126 13.608C12.0736 13.608 11.0926 12.762 10.9846 11.547H12.4696C12.5146 12.114 13.0006 12.456 13.6126 12.456C14.2876 12.456 14.6746 12.132 14.6746 11.619C14.6746 11.061 14.2426 10.836 13.6216 10.836H12.9826V9.738H13.6036C14.1526 9.738 14.5486 9.486 14.5486 8.937C14.5486 8.46 14.2156 8.127 13.6486 8.127C13.0366 8.127 12.6586 8.514 12.6226 9.045H11.1916C11.2726 7.929 12.1276 6.966 13.6666 6.966C15.1876 6.966 15.9706 7.848 15.9706 8.865C15.9706 9.603 15.5026 10.143 14.8186 10.269C15.6196 10.404 16.1146 10.971 16.1146 11.745Z",fill:"currentColor"})});import{jsx as en}from"react/jsx-runtime";var tn=()=>en("svg",{"aria-hidden":"true",className:"icon",fill:"none",focusable:"false",height:"20",viewBox:"0 0 20 20",width:"20",xmlns:"http://www.w3.org/2000/svg",children:en("path",{d:"M3.639 13.5V7.074H5.196V9.648H8.076V7.074H9.642V13.5H8.076V10.836H5.196V13.5H3.639ZM15.1736 7.074V10.854H16.3706V12.033H15.1736V13.5H13.6796V12.033H10.5116V10.845L13.4996 7.074H15.1736ZM13.6796 8.46L11.8256 10.854H13.6796V8.46Z",fill:"currentColor"})});import{jsx as on}from"react/jsx-runtime";var rn=()=>on("svg",{"aria-hidden":"true",className:"icon",fill:"none",focusable:"false",height:"20",viewBox:"0 0 20 20",width:"20",xmlns:"http://www.w3.org/2000/svg",children:on("path",{d:"M3.639 13.5V7.074H5.196V9.648H8.076V7.074H9.642V13.5H8.076V10.836H5.196V13.5H3.639ZM13.1576 10.269C12.6896 10.269 12.3746 10.494 12.2216 10.737H10.8176L11.1956 7.074H15.2546V8.28H12.3206L12.1856 9.549C12.4016 9.351 12.8516 9.126 13.4636 9.126C14.7866 9.126 15.6596 10.053 15.6596 11.358C15.6596 12.609 14.7326 13.608 13.1756 13.608C11.5826 13.608 10.6556 12.753 10.5566 11.511H12.1136C12.1586 12.06 12.5456 12.465 13.1576 12.465C13.8236 12.465 14.1746 11.97 14.1746 11.376C14.1746 10.764 13.8416 10.269 13.1576 10.269Z",fill:"currentColor"})});import{jsx as nn}from"react/jsx-runtime";var ln=()=>nn("svg",{"aria-hidden":"true",className:"icon",fill:"none",focusable:"false",height:"20",viewBox:"0 0 20 20",width:"20",xmlns:"http://www.w3.org/2000/svg",children:nn("path",{d:"M3.639 13.5V7.074H5.196V9.648H8.076V7.074H9.642V13.5H8.076V10.836H5.196V13.5H3.639ZM13.3646 8.127C12.5456 8.127 12.0416 8.937 12.0416 9.999C12.3296 9.54 12.8246 9.207 13.5536 9.207C14.8586 9.207 15.8036 10.134 15.8036 11.376C15.8036 12.645 14.8226 13.608 13.3196 13.608C11.7266 13.608 10.6196 12.393 10.6196 10.395C10.6196 8.316 11.7716 6.966 13.4186 6.966C14.7056 6.966 15.5786 7.749 15.7316 8.829H14.3186C14.2016 8.415 13.9226 8.127 13.3646 8.127ZM13.3106 12.51C13.9586 12.51 14.3816 12.042 14.3816 11.385C14.3816 10.737 13.9586 10.278 13.3106 10.278C12.6536 10.278 12.2126 10.737 12.2126 11.385C12.2126 12.042 12.6536 12.51 13.3106 12.51Z",fill:"currentColor"})});import{$createHeadingNode as Ys,$isHeadingNode as qs,HeadingNode as Qs}from"@lexical/rich-text";var Jt=e=>(t,o,r)=>{let n=e(r);n&&(n.append(...o),t.replace(n),n.select(0,0))};var sn=e=>{let o=`^(${e.map(n=>Number(n.slice(1))).map(n=>`#{${n}}`).join("|")})\\s`,r=new RegExp(o);return{type:"element",dependencies:[Qs],export:(n,i)=>{if(!qs(n))return null;let l=Number(n.getTag().slice(1));return"#".repeat(l)+" "+i(n)},regExp:r,replace:Jt(n=>{let i="h"+n[1].length;return Ys(i)})}};var cn=e=>{let t=ra();oa(t,()=>ea(e))},dn={h1:Zr,h2:Yr,h3:Qr,h4:tn,h5:rn,h6:ln},ia=L(({props:e})=>{let{enabledHeadingSizes:t=["h1","h2","h3","h4","h5","h6"]}=e,o=[z(t.map((r,n)=>({ChildComponent:dn[r],isActive:({selection:i})=>{if(!na(i))return!1;for(let l of i.getNodes()){if(an(l)&&l.getTag()===r)continue;let a=l.getParent();if(!(an(a)&&a.getTag()===r))return!1}return!0},key:r,label:({i18n:i})=>i.t("lexical:heading:label",{headingLevel:r.charAt(1)}),onSelect:({editor:i})=>{i.update(()=>{cn(r)})},order:n+2})))];return{markdownTransformers:[sn(t)],nodes:[ta],sanitizedClientFeatureProps:e,slashMenu:{groups:t?.length?[G(t.map(r=>({Icon:dn[r],key:`heading-${r.charAt(1)}`,keywords:["heading",r],label:({i18n:n})=>n.t("lexical:heading:label",{headingLevel:r.charAt(1)}),onSelect:({editor:n})=>{n.update(()=>{cn(r)})}})))]:[]},toolbarFixed:{groups:t?.length?o:[]},toolbarInline:{groups:t?.length?o:[]}}});import{$isNodeSelection as ma}from"lexical";import{jsx as un}from"react/jsx-runtime";var Yt=()=>un("svg",{"aria-hidden":"true",className:"icon",fill:"none",focusable:"false",height:"20",viewBox:"0 0 20 20",width:"20",xmlns:"http://www.w3.org/2000/svg",children:un("rect",{fill:"currentColor",height:"1",width:"12",x:"4",y:"9.5"})});import{jsx as pn,jsxs as la}from"react/jsx-runtime";var mn=()=>la("svg",{fill:"none",height:"20",viewBox:"0 0 20 20",width:"20",xmlns:"http://www.w3.org/2000/svg",children:[pn("path",{d:"M5 10h10",stroke:"currentColor"}),pn("path",{d:"M10 15V5",stroke:"currentColor"})]});var Y=e=>({type:"dropdown",ChildComponent:mn,items:e,key:"add",order:10});var fn={type:"element",dependencies:[Xe],export:(e,t)=>Je(e)?"---":null,regExp:/^---\s*$/,replace:e=>{let t=Ze();t&&e.replace(t)}};import{useLexicalComposerContext as sa}from"@lexical/react/LexicalComposerContext.js";import{$insertNodeToNearestRoot as aa}from"@lexical/utils";import{$getSelection as ca,$isRangeSelection as da,COMMAND_PRIORITY_EDITOR as ua}from"lexical";import{useEffect as pa}from"react";var gn=()=>{let[e]=sa();return pa(()=>e.registerCommand(we,t=>{let o=ca();if(!da(o))return!1;if(o.focus.getNode()!==null){let n=Ze();aa(n)}return!0},ua),[e]),null};var fa=L({markdownTransformers:[fn],nodes:[Xe],plugins:[{Component:gn,position:"normal"}],slashMenu:{groups:[G([{Icon:Yt,key:"horizontalRule",keywords:["hr","horizontal rule","line","separator"],label:({i18n:e})=>e.t("lexical:horizontalRule:label"),onSelect:({editor:e})=>{e.dispatchCommand(we,void 0)}}])]},toolbarFixed:{groups:[Y([{ChildComponent:Yt,isActive:({selection:e})=>{if(!ma(e)||!e.getNodes().length)return!1;let t=e.getNodes()[0];return Je(t)},key:"horizontalRule",label:({i18n:e})=>e.t("lexical:horizontalRule:label"),onSelect:({editor:e})=>{e.dispatchCommand(we,void 0)}}])]}});import{INDENT_CONTENT_COMMAND as ha,OUTDENT_CONTENT_COMMAND as ba}from"lexical";import{jsx as at,jsxs as ga}from"react/jsx-runtime";var Cn=()=>ga("svg",{"aria-hidden":"true",className:"icon",fill:"none",focusable:"false",height:"20",viewBox:"0 0 20 20",width:"20",xmlns:"http://www.w3.org/2000/svg",children:[at("path",{d:"M2.5 5H10.5",stroke:"currentColor",strokeWidth:"1.5"}),at("path",{d:"M2.5 10H10.5",stroke:"currentColor",strokeWidth:"1.5"}),at("path",{d:"M2.5 15H17.5",stroke:"currentColor",strokeWidth:"1.5"}),at("path",{d:"M12.25 7.25L17.25 3.75V10.75L12.25 7.25Z",fill:"currentColor"})]});import{jsx as ct,jsxs as Ca}from"react/jsx-runtime";var hn=()=>Ca("svg",{"aria-hidden":"true",className:"icon",fill:"none",focusable:"false",height:"20",viewBox:"0 0 20 20",width:"20",xmlns:"http://www.w3.org/2000/svg",children:[ct("path",{d:"M17.5 5H9.5",stroke:"currentColor",strokeWidth:"1.5"}),ct("path",{d:"M17.5 10H9.5",stroke:"currentColor",strokeWidth:"1.5"}),ct("path",{d:"M17.5 15H2.5",stroke:"currentColor",strokeWidth:"1.5"}),ct("path",{d:"M7.75 7.25L2.75 3.75V10.75L7.75 7.25Z",fill:"currentColor"})]});var bn=e=>({type:"buttons",items:e,key:"indent",order:35});var xn=[bn([{ChildComponent:Cn,isActive:()=>!1,isEnabled:({selection:e})=>{if(!e||!e?.getNodes()?.length)return!1;for(let t of e.getNodes())if("__indent"in t&&t.__indent>0||t.getParent()&&"__indent"in t.getParent()&&t.getParent().__indent>0)return!0;return!1},key:"indentDecrease",label:({i18n:e})=>e.t("lexical:indent:decreaseLabel"),onSelect:({editor:e})=>{e.dispatchCommand(ba,void 0)},order:1},{ChildComponent:hn,isActive:()=>!1,key:"indentIncrease",label:({i18n:e})=>e.t("lexical:indent:increaseLabel"),onSelect:({editor:e})=>{e.dispatchCommand(ha,void 0)},order:2}])],xa=L({toolbarFixed:{groups:xn},toolbarInline:{groups:xn}});import{$findMatchingParent as kc}from"@lexical/utils";import{$getSelection as lo,$isRangeSelection as Xn}from"lexical";import{jsx as Tn}from"react/jsx-runtime";var En=()=>Tn("svg",{"aria-hidden":"true",className:"icon",fill:"none",height:"20",viewBox:"0 0 20 20",width:"20",xmlns:"http://www.w3.org/2000/svg",children:Tn("path",{d:"M8.5 11.5L11.5 8.5M8.5 7L9.625 5.875C10.868 4.633 12.882 4.633 14.125 5.875C15.368 7.118 15.368 9.133 14.125 10.375L13 11.5M7 8.5L5.746 9.754C4.56 10.94 4.519 12.85 5.652 14.087C6.814 15.354 8.78 15.449 10.058 14.298L11.5 13",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"})});import{$isAtNodeEnd as yn}from"@lexical/selection";function me(e){let{anchor:t}=e,{focus:o}=e,r=e.anchor.getNode(),n=e.focus.getNode();return r===n?r:e.isBackward()?yn(o)?r:n:yn(t)?r:n}var qt=e=>({type:"buttons",items:e,key:"features",order:50});import{$createTextNode as va,$isTextNode as Ia}from"lexical";import{addClassNamesToElement as Ta,isHTMLAnchorElement as Ea}from"@lexical/utils";import to from"bson-objectid";import{$applyNodeReplacement as ya,$createTextNode as Ln,$getSelection as La,$isElementNode as Nn,$isRangeSelection as eo,ElementNode as Na,createCommand as ka}from"lexical";var wa=new Set(["http:","https:","mailto:","sms:","tel:"]),V=class e extends Na{__fields;__id;constructor({id:t,fields:o={doc:null,linkType:"custom",newTab:!1,url:void 0},key:r}){super(r),this.__fields=o,this.__id=t}static clone(t){return new e({id:t.__id,fields:t.__fields,key:t.__key})}static getType(){return"link"}static importDOM(){return{a:t=>({conversion:Ra,priority:1})}}static importJSON(t){t.version===1&&typeof t.fields?.doc?.value=="object"&&t.fields?.doc?.value?.id&&(t.fields.doc.value=t.fields.doc.value.id,t.version=2),t.version===2&&!t.id&&(t.id=new to.default().toHexString(),t.version=3);let o=q({id:t.id,fields:t.fields});return o.setFormat(t.format),o.setIndent(t.indent),o.setDirection(t.direction),o}canBeEmpty(){return!1}canInsertTextAfter(){return!1}canInsertTextBefore(){return!1}createDOM(t){let o=document.createElement("a");return this.__fields?.linkType==="custom"&&(o.href=this.sanitizeUrl(this.__fields.url??"")),(this.__fields?.newTab??!1)&&(o.target="_blank"),this.__fields?.newTab===!0&&this.__fields?.linkType==="custom"&&(o.rel=Qt(o.rel,"add","noopener")),Ta(o,t.theme.link),o}exportJSON(){let t={...super.exportJSON(),type:"link",fields:this.getFields(),version:3},o=this.getID();return o&&(t.id=o),t}extractWithChild(t,o,r){if(!eo(o))return!1;let n=o.anchor.getNode(),i=o.focus.getNode();return this.isParentOf(n)&&this.isParentOf(i)&&o.getTextContent().length>0}getFields(){return this.getLatest().__fields}getID(){return this.getLatest().__id}insertNewAfter(t,o=!0){let r=this.getParentOrThrow().insertNewAfter(t,o);if(Nn(r)){let n=q({fields:this.__fields});return r.append(n),n}return null}isInline(){return!0}sanitizeUrl(t){try{let o=new URL(t);if(!wa.has(o.protocol))return"about:blank"}catch{return"https://"}return t}setFields(t){let o=this.getWritable();o.__fields=t}updateDOM(t,o,r){let n=this.__fields?.url,i=this.__fields?.newTab;return n!=null&&n!==t.__fields?.url&&this.__fields?.linkType==="custom"&&(o.href=n),this.__fields?.linkType==="internal"&&t.__fields?.linkType==="custom"&&o.removeAttribute("href"),o.rel==null&&(o.rel=""),i!==t.__fields?.newTab&&(i??!1?(o.target="_blank",this.__fields?.linkType==="custom"&&(o.rel=Qt(o.rel,"add","noopener"))):(o.removeAttribute("target"),o.rel=Qt(o.rel,"remove","noopener"))),!1}};function Ra(e){let t=null;if(Ea(e)){let o=e.textContent;o!==null&&o!==""&&(t=q({id:new to.default().toHexString(),fields:{doc:null,linkType:"custom",newTab:e.getAttribute("target")==="_blank",url:e.getAttribute("href")??""}}))}return{node:t}}function q({id:e,fields:t}){return ya(new V({id:e??new to.default().toHexString(),fields:t}))}function B(e){return e instanceof V}var Z=ka("TOGGLE_LINK_COMMAND");function kn(e){let t=La();if(!eo(t)&&!e.selectedNodes.length)return;let o=eo(t)?t.extract():e.selectedNodes;if(e===null)o.forEach(r=>{let n=r.getParent();if(B(n)){let i=n.getChildren();for(let l=0;l<i.length;l+=1)n.insertBefore(i[l]);n.remove()}});else{if(o.length===1){let i=o[0],l=B(i)?i:_a(i);if(l!==null){l.setFields(e.fields),e.text!=null&&e.text!==l.getTextContent()&&(l.append(Ln(e.text)),l.getChildren().forEach(a=>{a!==l.getLastChild()&&a.remove()}));return}}let r=null,n=null;o.forEach(i=>{let l=i.getParent();if(!(l===n||l===null||Nn(i)&&!i.isInline())){if(B(l)){n=l,l.setFields(e.fields),e.text!=null&&e.text!==l.getTextContent()&&(l.append(Ln(e.text)),l.getChildren().forEach(a=>{a!==l.getLastChild()&&a.remove()}));return}if(l.is(r)||(r=l,n=q({fields:e.fields}),B(l)?i.getPreviousSibling()===null?l.insertBefore(n):l.insertAfter(n):i.insertBefore(n)),B(i)){if(i.is(n))return;if(n!==null){let a=i.getChildren();for(let s=0;s<a.length;s+=1)n.append(a[s])}i.remove();return}n!==null&&n.append(i)}})}}function _a(e){return Sa(e,t=>B(t))}function Sa(e,t){let o=e;for(;o!==null&&(o=o.getParent())!==null&&!t(o););return o}function Qt(e,t,o){let r,n=`${e}`;if(t==="add"){if(n.includes(o)){let i=new RegExp(o,"g");n=n.replace(i,"").trim()}n=n.trim(),r=n.length===0?`${o}`:`${n} ${o}`}else{let i=new RegExp(o,"g");r=n.replace(i,"").trim()}return r}var wn={type:"text-match",dependencies:[V],export:(e,t,o)=>{if(!B(e))return null;let r=e,{url:n}=r.getFields(),i=`[${r.getTextContent()}](${n})`,l=r.getFirstChild();return r.getChildrenSize()===1&&Ia(l)?o(l,i):i},importRegExp:/\[([^[]+)\]\(([^()\s]+)(?:\s"((?:[^"]*\\")*[^"]*)"\s*)?\)/,regExp:/\[([^[]+)\]\(([^()\s]+)(?:\s"((?:[^"]*\\")*[^"]*)"\s*)?\)$/,replace:(e,t)=>{let[,o,r]=t,n=q({fields:{doc:null,linkType:"custom",newTab:!1,url:r}}),i=va(o);i.setFormat(e.getFormat()),n.append(i),e.replace(n)},trigger:")"};import{$applyNodeReplacement as Fa,$isElementNode as Ma}from"lexical";var Q=class e extends V{static clone(t){return new e({id:void 0,fields:t.__fields,key:t.__key})}static getType(){return"autolink"}static importDOM(){return null}static importJSON(t){t.version===1&&typeof t.fields?.doc?.value=="object"&&t.fields?.doc?.value?.id&&(t.fields.doc.value=t.fields.doc.value.id,t.version=2);let o=De({fields:t.fields});return o.setFormat(t.format),o.setIndent(t.indent),o.setDirection(t.direction),o}exportJSON(){let t=super.exportJSON();return{type:"autolink",children:t.children,direction:t.direction,fields:t.fields,format:t.format,indent:t.indent,version:2}}insertNewAfter(t,o=!0){let r=this.getParentOrThrow().insertNewAfter(t,o);if(Ma(r)){let n=De({fields:this.__fields});return r.append(n),n}return null}};function De({fields:e}){return Fa(new Q({id:void 0,fields:e}))}function ee(e){return e instanceof Q}import{useLexicalComposerContext as Pa}from"@lexical/react/LexicalComposerContext.js";import{mergeRegister as Aa}from"@lexical/utils";import{$createTextNode as Rn,$getSelection as Da,$isElementNode as Sn,$isLineBreakNode as vn,$isNodeSelection as Oa,$isRangeSelection as Ha,$isTextNode as Oe,TextNode as $a}from"lexical";import{useEffect as Ba}from"react";function ce(e,t,...o){if(!e)throw new Error("Internal Lexical error: invariant() is meant to be replaced at compile time. There is no runtime version. Error: "+t)}function _n(e,t=o=>o){return o=>{let r=e.exec(o);return r===null?null:{index:r.index,length:r[0].length,text:r[0],url:t(r[0])}}}function In(e,t){for(let o=0;o<t.length;o++){let r=t[o](e);if(r!=null)return r}return null}var Ga=/[.,;\s]/;function ut(e){return Ga.test(e)}function Fn(e){return ut(e[e.length-1])}function ro(e){return ut(e[0])}function Ua(e,t){return t?/^\.[a-z]{2,}/i.test(e):/^\.[a-z0-9]+/i.test(e)}function Mn(e){let t=e.getPreviousSibling();return Sn(t)&&(t=t.getLastDescendant()),t===null||vn(t)||Oe(t)&&Fn(t.getTextContent())}function Pn(e){let t=e.getNextSibling();return Sn(t)&&(t=t.getFirstDescendant()),t===null||vn(t)||Oe(t)&&ro(t.getTextContent())}function Wa(e,t,o,r){return(e>0?ut(o[e-1]):Mn(r[0]))?t<o.length?ut(o[t]):Pn(r[r.length-1]):!1}function za(e,t,o){let r=[],n=[],i=[],l=0,a=0,s=[...e];for(;s.length>0;){let c=s[0],p=c.getTextContent().length,u=a;a+p<=t?(r.push(c),l+=p):u>=o?i.push(c):n.push(c),a+=p,s.shift()}return[l,r,n,i]}function Va(e,t,o,r){let n={linkType:"custom",url:r.url,...r.fields},i=De({fields:n});if(e.length===1){let l=e[0],a;t===0?[a,l]=l.splitText(o):[,a,l]=l.splitText(t,o);let s=Rn(r.text);return s.setFormat(a.getFormat()),s.setDetail(a.getDetail()),s.setStyle(a.getStyle()),i.append(s),a.replace(i),l}else if(e.length>1){let l=e[0],a=l.getTextContent().length,s;t===0?s=l:[,s]=l.splitText(t);let c=[],d;for(let g=1;g<e.length;g++){let f=e[g],h=f.getTextContent().length,I=a,P=a+h;if(I<o)if(P<=o)c.push(f);else{let[T,k]=f.splitText(o-I);c.push(T),d=k}a+=h}let p=Da(),u=p?p.getNodes().find(Oe):void 0,m=Rn(s.getTextContent());return m.setFormat(s.getFormat()),m.setDetail(s.getDetail()),m.setStyle(s.getStyle()),i.append(m,...c),u&&u===s&&(Ha(p)?m.select(p.anchor.offset,p.focus.offset):Oa(p)&&m.select(0,m.getTextContent().length)),s.replace(i),d}}function Ka(e,t,o){let r=[...e],n=r.map(s=>s.getTextContent()).join(""),i=n,l,a=0;for(;(l=In(i,t))!=null&&l!==null;){let s=l.index,c=l.length,d=s+c;if(Wa(a+s,a+d,n,r)){let[u,,m,g]=za(r,a+s,a+d),f=a+s-u,x=a+d-u,h=Va(m,f,x,l);r=h?[h,...g]:g,o(l.url,null),a=0}else a+=d;i=i.substring(d)}}function oo(e,t,o){let r=e.getChildren(),n=r.length;for(let s=0;s<n;s++){let c=r[s];if(!Oe(c)||!c.isSimpleText()){dt(e),o(null,e.getFields()?.url??null);return}}let i=e.getTextContent(),l=In(i,t);if(l===null||l.text!==i){dt(e),o(null,e.getFields()?.url??null);return}if(!Mn(e)||!Pn(e)){dt(e),o(null,e.getFields()?.url??null);return}let a=e.getFields()?.url;if(a!==l?.url){let s=e.getFields();s.url=l?.url,e.setFields(s),o(l.url,a??null)}}function ja(e,t,o){let r=e.getPreviousSibling(),n=e.getNextSibling(),i=e.getTextContent();if(ee(r)){let l=r.getFields()?.url?r.getFields()?.url?.startsWith("mailto:"):!1;(!ro(i)||Ua(i,l))&&(r.append(e),oo(r,t,o),o(null,r.getFields()?.url??null))}ee(n)&&!Fn(i)&&(dt(n),oo(n,t,o),o(null,n.getFields()?.url??null))}function dt(e){let t=e.getChildren(),o=t.length;for(let r=o-1;r>=0;r--)e.insertAfter(t[r]);return e.remove(),t.map(r=>r.getLatest())}function Xa(e){let t=[e],o=e.getNextSibling();for(;o!==null&&Oe(o)&&o.isSimpleText()&&(t.push(o),!/\s/.test(o.getTextContent()));)o=o.getNextSibling();return t}function Za(e,t,o){Ba(()=>{e.hasNodes([Q])||ce(!1,"LexicalAutoLinkPlugin: AutoLinkNode not registered on editor");let r=(n,i)=>{o?.(n,i)};return Aa(e.registerNodeTransform($a,n=>{let i=n.getParentOrThrow(),l=n.getPreviousSibling();if(ee(i))oo(i,t,r);else if(!B(i)){if(n.isSimpleText()&&(ro(n.getTextContent())||!ee(l))){let a=Xa(n);Ka(a,t,r)}ja(n,t,r)}}))},[e,t,o])}var Ja=/((https?:\/\/(www\.)?)|(www\.))[-\w@:%.+~#=]{1,256}\.[a-zA-Z\d()]{1,6}\b([-\w()@:%+.~#?&/=]*)(?<![-.+():%])/,Ya=/(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}\])|(([a-z\-\d]+\.)+[a-z]{2,}))/i,qa=[_n(Ja,e=>e.startsWith("http")?e:`https://${e}`),_n(Ya,e=>`mailto:${e}`)],An=()=>{let[e]=Pa();return Za(e,qa),null};import{ClickableLinkPlugin as Qa}from"@lexical/react/LexicalClickableLinkPlugin.js";import{jsx as ec}from"react/jsx-runtime";var Dn=()=>ec(Qa,{});import{createCommand as tc}from"lexical";var pt=tc("TOGGLE_LINK_WITH_MODAL_COMMAND");import{createPortal as fc}from"react-dom";import{useLexicalComposerContext as oc}from"@lexical/react/LexicalComposerContext.js";import{$findMatchingParent as On,mergeRegister as Hn}from"@lexical/utils";import{getTranslation as rc}from"@payloadcms/translations";import{formatDrawerSlug as nc,useConfig as ic,useEditDepth as lc,useModal as sc,useTranslation as ac}from"@payloadcms/ui";import{$getSelection as $n,$isLineBreakNode as cc,$isRangeSelection as Bn,COMMAND_PRIORITY_HIGH as dc,COMMAND_PRIORITY_LOW as Gn,KEY_ESCAPE_COMMAND as uc,SELECTION_CHANGE_COMMAND as pc}from"lexical";import Un,{useCallback as Wn,useEffect as ft,useRef as mc,useState as fe}from"react";function mt(e,t,o,r=10,n=5){let i=o.parentElement;if(e===null||i==null){t.style.opacity="0",t.style.transform="translate(-10000px, -10000px)";return}let l=t.getBoundingClientRect(),a=o.getBoundingClientRect(),s=i.getBoundingClientRect(),c=e.top-r,d=e.left-n;c<s.top&&(c+=l.height+e.height+r*2),d+l.width>s.right&&(d=s.right-l.width-n),c-=a.top,d-=a.left,t.style.opacity="1",t.style.transform=`translate(${d}px, ${c}px)`}import{jsx as ge,jsxs as no}from"react/jsx-runtime";function zn({anchorElem:e}){let[t]=oc(),o=mc(null),[r,n]=fe(null),[i,l]=fe(null),{uuid:a}=$(),s=ic(),{i18n:c,t:d}=ac(),[p,u]=fe(null),{closeModal:m,toggleModal:g}=sc(),f=lc(),[x,h]=fe(!1),[I,P]=fe([]),[T,k]=fe(!1),E=nc({slug:"lexical-rich-text-link-"+a,depth:f}),_=Wn(()=>{h(!1),o&&o.current&&(o.current.style.opacity="0",o.current.style.transform="translate(-10000px, -10000px)"),k(!1),n(null),l(null),P([]),u(null)},[h,n,l,P]),M=Wn(()=>{let F=$n(),N=null;if(!Bn(F)||!F){_();return}let b=me(F);N=t.getElementByKey(b.getKey())?.getBoundingClientRect();let C=On(b,B),R=F.getNodes().filter(H=>!cc(H)).find(H=>{let W=On(H,B);return C&&!C.is(W)||W&&!W.is(C)});if(C==null||R){_();return}let w={doc:void 0,linkType:void 0,newTab:void 0,url:"",...C.getFields(),id:C.getID(),text:C.getTextContent()};if(C.getFields()?.linkType==="custom")n(C.getFields()?.url??null),l(null);else{n(`/admin/collections/${C.getFields()?.doc?.relationTo}/${C.getFields()?.doc?.value}`);let H=s.collections.find(W=>W.slug===C.getFields()?.doc?.relationTo);if(!H)l(C.getFields()?.label?String(C.getFields()?.label):null),n(C.getFields()?.url?String(C.getFields()?.url):null);else{let W=d("fields:linkedTo",{label:rc(H.labels.singular,c)}).replace(/<[^>]*>?/g,"");l(W)}}u(w),h(!0),P(F?F?.getNodes():[]),ee(C)?k(!0):k(!1);let y=o.current,S=window.getSelection(),{activeElement:A}=document;if(y===null)return;let O=t.getRootElement();return S!==null&&O!==null&&O.contains(S.anchorNode)?(N||(N=S.getRangeAt(0).getBoundingClientRect()),N!=null&&(N.y+=40,mt(N,y,e))):(A==null||A.className!=="link-input")&&(O!==null&&mt(null,y,e),n(null),l(null)),!0},[t,_,s.collections,d,c,e]);return ft(()=>Hn(t.registerCommand(pt,F=>(t.dispatchCommand(Z,F),M(),g(E),!0),Gn)),[t,M,g,E]),ft(()=>{let F=e.parentElement,N=()=>{t.getEditorState().read(()=>{M()})};return window.addEventListener("resize",N),F?.addEventListener("scroll",N),()=>{window.removeEventListener("resize",N),F?.removeEventListener("scroll",N)}},[e.parentElement,t,M]),ft(()=>Hn(t.registerUpdateListener(({editorState:F})=>{F.read(()=>{M()})}),t.registerCommand(pc,()=>(M(),!0),Gn),t.registerCommand(uc,()=>x?(_(),!0):!1,dc)),[t,M,x,_]),ft(()=>{t.getEditorState().read(()=>{M()})},[t,M]),no(Un.Fragment,{children:[ge("div",{className:"link-editor",ref:o,children:no("div",{className:"link-input",children:[r&&r.length>0?ge("a",{href:r,rel:"noopener noreferrer",target:"_blank",children:i!=null&&i.length>0?i:r}):i!=null&&i.length>0?ge("span",{className:"link-input__label-pure",children:i}):null,t.isEditable()&&no(Un.Fragment,{children:[ge("button",{"aria-label":"Edit link",className:"link-edit",onClick:()=>{g(E)},onMouseDown:F=>{F.preventDefault()},tabIndex:0,type:"button"}),!T&&ge("button",{"aria-label":"Remove link",className:"link-trash",onClick:()=>{t.dispatchCommand(Z,null)},onMouseDown:F=>{F.preventDefault()},tabIndex:0,type:"button"})]})]})}),ge(le,{className:"lexical-link-edit-drawer",data:p,drawerSlug:E,drawerTitle:d("fields:editLink"),featureKey:"link",handleDrawerSubmit:(F,N)=>{m(E);let b=N,C={...b};delete C.text,t.update(()=>{let R=$n(),w=null;if(Bn(R)?w=me(R).getParent():I.length&&(w=I[0].getParent()),w&&ee(w)){let y=q({fields:C});w.replace(y,!0)}}),t.dispatchCommand(Z,{fields:C,selectedNodes:I,text:b.text})},schemaPathSuffix:"fields"})]})}import{jsx as gc}from"react/jsx-runtime";var Vn=e=>{let{anchorElem:t=document.body}=e;return fc(gc(zn,{anchorElem:t}),t)};import{useLexicalComposerContext as bc}from"@lexical/react/LexicalComposerContext.js";import{mergeRegister as xc}from"@lexical/utils";import{$getSelection as Tc,$isElementNode as Ec,$isRangeSelection as yc,COMMAND_PRIORITY_LOW as Kn,PASTE_COMMAND as Lc}from"lexical";import{useEffect as Nc}from"react";var Cc=/(?:[A-Za-z]{3,9}:(?:\/\/)?(?:[-;:&=+$,\w]+@)?[A-Za-z\d.-]+|(?:www.|[-;:&=+$,\w]+@)[A-Za-z\d.-]+)(?:\/[+~%/.\w-]*)?\??[-+=&;%@.\w]*#?\w*/,hc=/^[\w\-./]*(?:#\w[\w-]*)?$/;function io(e){if(!e)return!1;if(e==="https://"||Cc.test(e)||hc.test(e))return!0;try{return new URL(e),!0}catch{}return!1}var jn=()=>{let[e]=bc();return Nc(()=>{if(!e.hasNodes([V]))throw new Error("LinkPlugin: LinkNode not registered on editor");return xc(e.registerCommand(Z,t=>(kn(t),!0),Kn),io!==void 0?e.registerCommand(Lc,t=>{let o=Tc();if(!yc(o)||o.isCollapsed()||!(t instanceof ClipboardEvent)||t.clipboardData==null)return!1;let r=t.clipboardData.getData("text");if(!io(r))return!1;if(!o.getNodes().some(n=>Ec(n))){let n={doc:null,linkType:"custom",newTab:!1,url:r};return e.dispatchCommand(Z,{fields:n,text:null}),t.preventDefault(),!0}return!1},Kn):()=>{})},[e]),null};var Zn=[qt([{ChildComponent:En,isActive:({selection:e})=>{if(Xn(e)){let t=me(e);return kc(t,B)!=null}return!1},isEnabled:({selection:e})=>!!(Xn(e)&&lo()?.getTextContent()?.length),key:"link",label:({i18n:e})=>e.t("lexical:link:label"),onSelect:({editor:e,isActive:t})=>{if(t)e.dispatchCommand(Z,null);else{let o=null,r=[];if(e.getEditorState().read(()=>{o=lo()?.getTextContent(),r=lo()?.getNodes()??[]}),!o?.length)return;let n={doc:null,linkType:"custom",newTab:!1,url:"https://"};e.dispatchCommand(pt,{fields:n,selectedNodes:r,text:o})}},order:1}])],wc=L({markdownTransformers:[wn],nodes:[V,Q],plugins:[{Component:jn,position:"normal"},{Component:An,position:"normal"},{Component:Dn,position:"normal"},{Component:Vn,position:"floatingAnchorElem"}],toolbarFixed:{groups:Zn},toolbarInline:{groups:Zn}});import{$isListNode as co,INSERT_CHECK_LIST_COMMAND as ti,ListItemNode as Hc,ListNode as $c}from"@lexical/list";import{$isRangeSelection as Bc}from"lexical";import{jsx as Jn,jsxs as Rc}from"react/jsx-runtime";var so=()=>Rc("svg",{"aria-hidden":"true",className:"icon",fill:"none",focusable:"false",height:"20",viewBox:"0 0 20 20",width:"20",xmlns:"http://www.w3.org/2000/svg",children:[Jn("rect",{height:"13",rx:"1.5",stroke:"currentColor",width:"13",x:"3.5",y:"3.5"}),Jn("path",{d:"M7 10L9 12.5L13 7.5",stroke:"currentColor",strokeWidth:"1.5"})]});import{ListPlugin as _c}from"@lexical/react/LexicalListPlugin.js";import{jsx as Sc}from"react/jsx-runtime";var Ce=()=>Sc(_c,{});function he(e){return{items:e,key:"lists",label:({i18n:t})=>t.t("lexical:general:slashMenuListGroupLabel")}}import{$isListNode as Mc,ListItemNode as Pc,ListNode as Ac}from"@lexical/list";import{$createListItemNode as vc,$createListNode as Ic,$isListItemNode as Fc,$isListNode as ao}from"@lexical/list";var Yn=4,be=e=>(t,o,r)=>{let n=t.getPreviousSibling(),i=t.getNextSibling(),l=vc(e==="check"?r[3]==="x":void 0);if(ao(i)&&i.getListType()===e){let s=i.getFirstChild();s!==null?s.insertBefore(l):i.append(l),t.remove()}else if(ao(n)&&n.getListType()===e)n.append(l),t.remove();else{let s=Ic(e,e==="number"?Number(r[2]):void 0);s.append(l),t.replace(s)}l.append(...o),l.select(0,0);let a=Math.floor(r[1].length/Yn);a&&l.setIndent(a)},de=(e,t,o)=>{let r=[],n=e.getChildren(),i=0;for(let l of n)if(Fc(l)){if(l.getChildrenSize()===1){let d=l.getFirstChild();if(ao(d)){r.push(de(d,t,o+1));continue}}let a=" ".repeat(o*Yn),s=e.getListType(),c=s==="number"?`${e.getStart()+i}. `:s==="check"?`- [${l.getChecked()?"x":" "}] `:"- ";r.push(a+c+t(l)),i++}return r.join(`
|
|
35
|
-
`)};var qn={type:"element",dependencies:[Ac,Pc],export:(e,t)=>Mc(e)?de(e,t,0):null,regExp:/^(\s*)(?:-\s)?\s?(\[(\s|x)?\])\s/i,replace:be("check")};import{CheckListPlugin as Dc}from"@lexical/react/LexicalCheckListPlugin.js";import{jsx as Oc}from"react/jsx-runtime";var Qn=()=>Oc(Dc,{});var ei=[z([{ChildComponent:so,isActive:({selection:e})=>{if(!Bc(e))return!1;for(let t of e.getNodes()){if(co(t)&&t.getListType()==="check")continue;let o=t.getParent();if(co(o)&&o.getListType()==="check")continue;let r=o?.getParent();if(!(co(r)&&r.getListType()==="check"))return!1}return!0},key:"checklist",label:({i18n:e})=>e.t("lexical:checklist:label"),onSelect:({editor:e})=>{e.dispatchCommand(ti,void 0)},order:12}])],Gc=L(({featureProviderMap:e})=>{let t=[{Component:Qn,position:"normal"}];return!e.has("unorderedList")&&!e.has("orderedList")&&t.push({Component:Ce,position:"normal"}),{markdownTransformers:[qn],nodes:e.has("unorderedList")||e.has("orderedList")?[]:[$c,Hc],plugins:t,slashMenu:{groups:[he([{Icon:so,key:"checklist",keywords:["check list","check","checklist","cl"],label:({i18n:o})=>o.t("lexical:checklist:label"),onSelect:({editor:o})=>{o.dispatchCommand(ti,void 0)}}])]},toolbarFixed:{groups:ei},toolbarInline:{groups:ei}}});import{$isListNode as po,INSERT_ORDERED_LIST_COMMAND as ni,ListItemNode as Kc,ListNode as jc}from"@lexical/list";import{$isRangeSelection as Xc}from"lexical";import{jsx as He,jsxs as Uc}from"react/jsx-runtime";var uo=()=>Uc("svg",{"aria-hidden":"true",className:"icon",fill:"none",focusable:"false",height:"20",viewBox:"0 0 20 20",width:"20",xmlns:"http://www.w3.org/2000/svg",children:[He("path",{d:"M5.89284 12.479C5.89284 13.368 5.26284 13.788 4.38084 14.236C3.75084 14.558 3.43584 14.789 3.40784 15.062H5.89984V16H2.06384V15.573C2.06384 14.523 2.92484 13.935 3.66684 13.501C4.38084 13.088 4.75184 12.878 4.75184 12.458C4.75184 12.08 4.52084 11.835 4.06584 11.835C3.58984 11.835 3.30984 12.199 3.28184 12.654H2.11284C2.18984 11.681 2.87584 10.918 4.07284 10.918C5.15784 10.918 5.89284 11.555 5.89284 12.479Z",fill:"currentColor"}),He("path",{d:"M2.68608 4.535V3.737C3.54008 3.737 3.90408 3.513 4.02308 2.995H4.89108V8H3.68008L3.68008 4.535H2.68608Z",fill:"currentColor"}),He("path",{d:"M8 15L17 15",stroke:"currentColor",strokeWidth:"1.5"}),He("path",{d:"M8 10L17 10",stroke:"currentColor",strokeWidth:"1.5"}),He("path",{d:"M8 5L17 5",stroke:"currentColor",strokeWidth:"1.5"})]});import{$isListNode as Wc,ListItemNode as zc,ListNode as Vc}from"@lexical/list";var oi={type:"element",dependencies:[Vc,zc],export:(e,t)=>Wc(e)?de(e,t,0):null,regExp:/^(\s*)(\d+)\.\s/,replace:be("number")};var ri=[z([{ChildComponent:uo,isActive:({selection:e})=>{if(!Xc(e))return!1;for(let t of e.getNodes()){if(po(t)&&t.getListType()==="number")continue;let o=t.getParent();if(po(o)&&o.getListType()==="number")continue;let r=o?.getParent();if(!(po(r)&&r.getListType()==="number"))return!1}return!0},key:"orderedList",label:({i18n:e})=>e.t("lexical:orderedList:label"),onSelect:({editor:e})=>{e.dispatchCommand(ni,void 0)},order:10}])],Zc=L(({featureProviderMap:e})=>({markdownTransformers:[oi],nodes:e.has("orderedList")?[]:[jc,Kc],plugins:e.has("orderedList")?[]:[{Component:Ce,position:"normal"}],slashMenu:{groups:[he([{Icon:uo,key:"orderedList",keywords:["ordered list","ol"],label:({i18n:t})=>t.t("lexical:orderedList:label"),onSelect:({editor:t})=>{t.dispatchCommand(ni,void 0)}}])]},toolbarFixed:{groups:ri},toolbarInline:{groups:ri}}));import{$isListNode as fo,INSERT_UNORDERED_LIST_COMMAND as si,ListItemNode as ed,ListNode as td}from"@lexical/list";import{$isRangeSelection as od}from"lexical";import{jsx as xe,jsxs as Jc}from"react/jsx-runtime";var mo=()=>Jc("svg",{"aria-hidden":"true",className:"icon",fill:"none",focusable:"false",height:"20",viewBox:"0 0 20 20",width:"20",xmlns:"http://www.w3.org/2000/svg",children:[xe("circle",{cx:"4",cy:"5",fill:"currentColor",r:"1.15",stroke:"currentColor",strokeWidth:"0.3"}),xe("circle",{cx:"4",cy:"10",fill:"currentColor",r:"1.15",stroke:"currentColor",strokeWidth:"0.3"}),xe("circle",{cx:"4",cy:"15",fill:"currentColor",r:"1.15",stroke:"currentColor",strokeWidth:"0.3"}),xe("path",{d:"M17 5H7",stroke:"currentColor",strokeWidth:"1.5"}),xe("path",{d:"M17 10H7",stroke:"currentColor",strokeWidth:"1.5"}),xe("path",{d:"M17 15H7",stroke:"currentColor",strokeWidth:"1.5"})]});import{$isListNode as Yc,ListItemNode as qc,ListNode as Qc}from"@lexical/list";var ii={type:"element",dependencies:[Qc,qc],export:(e,t)=>Yc(e)?de(e,t,0):null,regExp:/^(\s*)[-*+]\s/,replace:be("bullet")};var li=[z([{ChildComponent:mo,isActive:({selection:e})=>{if(!od(e))return!1;for(let t of e.getNodes()){if(fo(t)&&t.getListType()==="bullet")continue;let o=t.getParent();if(fo(o)&&o.getListType()==="bullet")continue;let r=o?.getParent();if(!(fo(r)&&r.getListType()==="bullet"))return!1}return!0},key:"unorderedList",label:({i18n:e})=>e.t("lexical:unorderedList:label"),onSelect:({editor:e})=>{e.dispatchCommand(si,void 0)},order:11}])],rd=L({markdownTransformers:[ii],nodes:[td,ed],plugins:[{Component:Ce,position:"normal"}],slashMenu:{groups:[he([{Icon:mo,key:"unorderedList",keywords:["unordered list","ul"],label:({i18n:e})=>e.t("lexical:unorderedList:label"),onSelect:({editor:e})=>{e.dispatchCommand(si,void 0)}}])]},toolbarFixed:{groups:li},toolbarInline:{groups:li}});function ai({converters:e,lexicalPluginData:t}){return{root:{type:"root",children:ci({converters:e,lexicalPluginNodes:t?.jsonContent?.root?.children||[],parentNodeType:"root"}),direction:t?.jsonContent?.root?.direction||"ltr",format:t?.jsonContent?.root?.format||"",indent:t?.jsonContent?.root?.indent||0,version:1}}}function ci({converters:e,lexicalPluginNodes:t,parentNodeType:o}){if(!t?.length)return[];let r=e.find(n=>n.nodeTypes.includes("unknown"));return t.map((n,i)=>{if(n.type==="paragraph")return nd(e,n);if(n.type==="text"||!n.type)return n;let l=e.find(a=>a.nodeTypes.includes(n.type));return l?l.converter({childIndex:i,converters:e,lexicalPluginNode:n,parentNodeType:o}):(console.warn("lexicalPluginToLexical > No converter found for node type: "+n.type),r?.converter({childIndex:i,converters:e,lexicalPluginNode:n,parentNodeType:o}))})||[]}function nd(e,t){return{...t,type:"paragraph",children:ci({converters:e,lexicalPluginNodes:t.children||[],parentNodeType:"paragraph"}),version:1}}import{addClassNamesToElement as id}from"@lexical/utils";import{DecoratorNode as ld}from"lexical";import*as di from"react";import{jsx as cd}from"react/jsx-runtime";var sd=di.lazy(()=>import("./Component-7HS6FEJS.js").then(e=>({default:e.UnknownConvertedNodeComponent}))),$e=class e extends ld{__data;constructor({data:t,key:o}){super(o),this.__data=t}static clone(t){return new e({data:t.__data,key:t.__key})}static getType(){return"unknownConverted"}static importJSON(t){return ad({data:t.data})}canInsertTextAfter(){return!0}canInsertTextBefore(){return!0}createDOM(t){let o=document.createElement("span");return id(o,"unknownConverted"),o}decorate(){return cd(sd,{data:this.__data})}exportJSON(){return{type:this.getType(),data:this.__data,version:1}}isInline(){return!0}updateDOM(t,o){return!1}};function ad({data:e}){return new $e({data:e})}var dd=L(({clientFunctions:e})=>{let t=Object.values(e);return{hooks:{load({incomingEditorState:o}){return!o||!("jsonContent"in o)?o:ai({converters:t,lexicalPluginData:o})}},nodes:[$e]}});var v={DOM_ELEMENT_TYPE:1,DOM_TEXT_TYPE:3,NO_DIRTY_NODES:0,HAS_DIRTY_NODES:1,FULL_RECONCILE:2,IS_NORMAL:0,IS_TOKEN:1,IS_SEGMENTED:2,IS_INERT:3,IS_BOLD:1,IS_ITALIC:2,IS_STRIKETHROUGH:4,IS_UNDERLINE:8,IS_CODE:16,IS_SUBSCRIPT:32,IS_SUPERSCRIPT:64,IS_HIGHLIGHT:128,IS_DIRECTIONLESS:1,IS_UNMERGEABLE:2,IS_ALIGN_LEFT:1,IS_ALIGN_CENTER:2,IS_ALIGN_RIGHT:3,IS_ALIGN_JUSTIFY:4,IS_ALIGN_START:5,IS_ALIGN_END:6},ud=v.IS_BOLD|v.IS_ITALIC|v.IS_STRIKETHROUGH|v.IS_UNDERLINE|v.IS_CODE|v.IS_SUBSCRIPT|v.IS_SUPERSCRIPT|v.IS_HIGHLIGHT,pd="\xA0",md=`
|
|
34
|
+
`},[t,e]),p=Ne((C,w)=>{o(x=>{let N=e.length-1,S=e[N];if(S&&S.name===C){if(C==="type")return[...e.slice(0,N),{...S,value:S.value+w}];if(S.value===w)return[...e.slice(0,N),{...S,count:S.count+1}]}return[...x,{name:C,count:1,value:w}]})},[e,o]);Pr(()=>{let C=x=>{if(!r)return;let N=x.key;wa(x)?p("selectAll",""):Hr.has(N)?p("press",x.key):[...N].length>1?p("keydown",x.key):p("type",x.key)},w=x=>{if(!r)return;let N=x.key;!Hr.has(N)&&[...N].length>1&&p("keyup",x.key)};return t.registerRootListener((x,N)=>{N!==null&&(N.removeEventListener("keydown",C),N.removeEventListener("keyup",w)),x!==null&&(x.addEventListener("keydown",C),x.addEventListener("keyup",w))})},[t,r,p]),Pr(()=>{c.current&&c.current.scrollTo(0,c.current.scrollHeight)},[m]),Co(()=>{if(e){let C=m();C!==null&&s(C),c.current&&c.current.scrollTo(0,c.current.scrollHeight)}},[m,e]),Co(()=>t.registerUpdateListener(({dirtyElements:w,dirtyLeaves:x,editorState:N})=>{if(!r)return;let S=N._selection,E=a.current,k=d.current;if(E!==S){if(x.size===0&&w.size===0&&!k){let b=window.getSelection();if(b&&(b.anchorNode==null||b.focusNode==null))return}a.current=S}d.current=!1;let I=m();I!==null&&s(I)}),[t,m,r,p]),Co(()=>r?t.registerUpdateListener(()=>{let w=t.getRootElement();w!==null&&i(w?.innerHTML)}):void 0,[t,r]);let f=Ne(C=>{r||(C.update(()=>{let w=xa();w.clear();let x=Ca();w.append(ga().append(x)),x.select()}),o([])),n(w=>!w)},[r]),h=Ne(()=>{if(!r)return;let C=window.getSelection();if(C===null||C.anchorNode==null||C.focusNode==null)return;let{anchorNode:w,anchorOffset:x,focusNode:N,focusOffset:S}=Ea(C),E=u().getRootElement(),k;w!==null&&(k=Br(w,E));let I;N!==null&&(I=Br(N,E)),p("snapshot",{anchorNode:w,anchorOffset:x,anchorPath:k,focusNode:N,focusOffset:S,focusPath:I})},[p,r,u]),g=Ne(()=>{ba(m())},[m]),T=Ne(()=>{_a("test.js",m())},[m]);return[ke("button",{className:`editor-dev-button ${r?"active":""}`,id:"test-recorder-button",onClick:C=>{f(u()),C.preventDefault()},title:r?"Disable test recorder":"Enable test recorder",type:"button",children:r?"Disable test recorder":"Enable test recorder"}),r?bo("div",{className:"test-recorder-output",children:[bo("div",{className:"test-recorder-toolbar",children:[ke("button",{className:"test-recorder-button",id:"test-recorder-button-snapshot",onClick:C=>{h(),C.preventDefault()},title:"Insert snapshot",type:"button",children:"Insert Snapshot"}),ke("button",{className:"test-recorder-button",id:"test-recorder-button-copy",onClick:C=>{g(),C.preventDefault()},title:"Copy to clipboard",type:"button",children:"Copy"}),ke("button",{className:"test-recorder-button",id:"test-recorder-button-download",onClick:C=>{T(),C.preventDefault()},title:"Download as a file",type:"button",children:"Download"})]}),ke("pre",{id:"test-recorder",ref:c,children:l})]}):null]}var Gr=()=>{let t=fa(3),[e]=ha(),[o,r]=Na(e),n;return t[0]!==o||t[1]!==r?(n=bo(jr.Fragment,{children:[ke("p",{children:"HI"}),o,r,ke("p",{children:"DONE"})]}),t[0]=o,t[1]=r,t[2]=n):n=t[2],n};var ka=y({plugins:[{Component:Gr,position:"bottom"}]});import{c as La}from"react/compiler-runtime";import{jsx as Ia}from"react/jsx-runtime";import{useLexicalComposerContext as Sa}from"@lexical/react/LexicalComposerContext.js";import{TreeView as Ra}from"@lexical/react/LexicalTreeView.js";import"react";var Wr=()=>{let t=La(2),[e]=Sa(),o;return t[0]!==e?(o=Ia(Ra,{editor:e,timeTravelButtonClassName:"debug-timetravel-button",timeTravelPanelButtonClassName:"debug-timetravel-panel-button",timeTravelPanelClassName:"debug-timetravel-panel",timeTravelPanelSliderClassName:"debug-timetravel-panel-slider",treeTypeButtonClassName:"debug-treetype-button",viewClassName:"tree-view-output"}),t[0]=e,t[1]=o):o=t[1],o};var ya=y({plugins:[{Component:Wr,position:"bottom"}]});import{$isTableSelection as va}from"@lexical/table";import{$isRangeSelection as Ma,FORMAT_TEXT_COMMAND as Da}from"lexical";import{jsx as Ur}from"react/jsx-runtime";import"react";var Vr=()=>Ur("svg",{"aria-hidden":"true",className:"icon",fill:"currentColor",focusable:"false",height:"20",viewBox:"0 0 20 20",width:"20",xmlns:"http://www.w3.org/2000/svg",children:Ur("path",{d:"M10.6772 15H6.27017V5.718H10.4172C12.6792 5.718 13.8492 6.602 13.8492 8.292C13.8492 9.098 13.1992 9.982 12.4712 10.216C13.3812 10.476 14.1742 11.256 14.1742 12.322C14.1742 14.09 12.9002 15 10.6772 15ZM8.46717 9.501H10.3262C11.3012 9.501 11.7042 9.046 11.7042 8.409C11.7042 7.72 11.2362 7.317 10.3392 7.317H8.46717V9.501ZM8.46717 11.061V13.401H10.4822C11.4702 13.401 11.9642 12.959 11.9642 12.218C11.9642 11.49 11.4702 11.061 10.4822 11.061H8.46717Z",fill:"currentColor"})});var Z=t=>({type:"buttons",items:t,key:"format",order:40});var Kr={type:"text-format",format:["bold","italic"],tag:"***"},zr={type:"text-format",format:["bold","italic"],intraword:!1,tag:"___"},Zr={type:"text-format",format:["bold"],tag:"**"},Yr={type:"text-format",format:["bold"],intraword:!1,tag:"__"};var Xr=[Z([{ChildComponent:Vr,isActive:({selection:t})=>Ma(t)||va(t)?t.hasFormat("bold"):!1,key:"bold",onSelect:({editor:t})=>{t.dispatchCommand(Da,"bold")},order:1}])],Aa=y(({featureProviderMap:t})=>{let e=[Zr,Yr];return t.get("italic")&&e.push(zr,Kr),{markdownTransformers:e,toolbarFixed:{groups:Xr},toolbarInline:{groups:Xr}}});import{$isTableSelection as Fa}from"@lexical/table";import{$isRangeSelection as $a,FORMAT_TEXT_COMMAND as Pa}from"lexical";import{jsx as Jr,jsxs as Oa}from"react/jsx-runtime";import"react";var qr=()=>Oa("svg",{"aria-hidden":"true",className:"icon",fill:"none",focusable:"false",height:"20",viewBox:"0 0 20 20",width:"20",xmlns:"http://www.w3.org/2000/svg",children:[Jr("path",{d:"M7.76465 6L3.76465 10L7.76465 14",stroke:"currentColor"}),Jr("path",{d:"M12.2354 6L16.2354 10L12.2354 14",stroke:"currentColor"})]});var Qr={type:"text-format",format:["code"],tag:"`"};var en=[Z([{ChildComponent:qr,isActive:({selection:t})=>$a(t)||Fa(t)?t.hasFormat("code"):!1,key:"inlineCode",onSelect:({editor:t})=>{t.dispatchCommand(Pa,"code")},order:7}])],Ba=y({markdownTransformers:[Qr],toolbarFixed:{groups:en},toolbarInline:{groups:en}});import{$isTableSelection as Ha}from"@lexical/table";import{$isRangeSelection as ja,FORMAT_TEXT_COMMAND as Ga}from"lexical";import{jsx as tn}from"react/jsx-runtime";import"react";var on=()=>tn("svg",{"aria-hidden":"true",className:"icon",fill:"currentColor",focusable:"false",height:"20",viewBox:"0 0 20 20",width:"20",xmlns:"http://www.w3.org/2000/svg",children:tn("path",{d:"M11.311 14.2969L11.0327 15H6.18408L6.4624 14.2969C7.54639 14.2969 7.70752 14.209 7.83936 13.8721L10.8423 6.45996C10.8716 6.38672 10.8862 6.32812 10.8862 6.26953C10.8862 6.09375 10.6519 6.03516 9.80225 6.03516L10.0952 5.33203H14.9438L14.6509 6.03516C13.5669 6.03516 13.4204 6.12305 13.2886 6.45996L10.2856 13.8721C10.2563 13.9453 10.2271 14.0039 10.2271 14.0625C10.2271 14.2383 10.4614 14.2969 11.311 14.2969Z",fill:"currentColor"})});var rn={type:"text-format",format:["italic"],tag:"*"},nn={type:"text-format",format:["italic"],intraword:!1,tag:"_"};var ln=[Z([{ChildComponent:on,isActive:({selection:t})=>ja(t)||Ha(t)?t.hasFormat("italic"):!1,key:"italic",onSelect:({editor:t})=>{t.dispatchCommand(Ga,"italic")},order:2}])],Wa=y({markdownTransformers:[rn,nn],toolbarFixed:{groups:ln},toolbarInline:{groups:ln}});import{$isTableSelection as Va}from"@lexical/table";import{$isRangeSelection as Ka,FORMAT_TEXT_COMMAND as za}from"lexical";import{jsx as sn,jsxs as Ua}from"react/jsx-runtime";import"react";var an=()=>Ua("svg",{"aria-hidden":"true",className:"icon",fill:"currentColor",focusable:"false",height:"20",viewBox:"0 0 20 20",width:"20",xmlns:"http://www.w3.org/2000/svg",children:[sn("path",{d:"M5.50756 12.76H7.42756C7.56256 14.215 8.82256 14.71 10.1576 14.71C11.4326 14.71 12.4226 14.14 12.4226 13.06C12.4226 12.28 11.9576 11.845 10.6676 11.605L8.70256 11.245C7.12756 10.96 5.85256 10.21 5.85256 8.335C5.85256 6.43 7.53256 5.11 9.87256 5.11C12.4226 5.11 13.9526 6.22 14.1626 8.23H12.2876C12.1526 7.18 11.2226 6.595 9.88756 6.595C8.59756 6.595 7.78756 7.27 7.78756 8.215C7.78756 9.1 8.34256 9.385 9.49756 9.61L11.5676 10.015C13.3226 10.345 14.3726 11.215 14.3726 12.94C14.3726 14.89 12.5876 16.18 10.2176 16.18C7.66756 16.18 5.70256 15.115 5.50756 12.76Z",fill:"currentColor"}),sn("path",{d:"M4.99756 11.44H15.0026V12.19H4.99756V11.44Z",fill:"currentColor"})]});var cn={type:"text-format",format:["strikethrough"],tag:"~~"};var un=[Z([{ChildComponent:an,isActive:({selection:t})=>Ka(t)||Va(t)?t.hasFormat("strikethrough"):!1,key:"strikethrough",onSelect:({editor:t})=>{t.dispatchCommand(za,"strikethrough")},order:4}])],Za=y({markdownTransformers:[cn],toolbarFixed:{groups:un},toolbarInline:{groups:un}});import{$isTableSelection as Ya}from"@lexical/table";import{$isRangeSelection as Xa,FORMAT_TEXT_COMMAND as Ja}from"lexical";import{jsx as dn}from"react/jsx-runtime";import"react";var mn=()=>dn("svg",{"aria-hidden":"true",className:"icon",fill:"currentColor",focusable:"false",height:"20",viewBox:"0 0 20 20",width:"20",xmlns:"http://www.w3.org/2000/svg",children:dn("path",{d:"M10.167 15L7.45002 11.36L4.73302 15H2.91302L6.55302 10.177L3.23802 5.718H5.20102L7.54102 8.89L9.89402 5.718H11.714L8.43802 10.06L12.13 15H10.167ZM16.7768 13.258C16.7768 14.155 16.1398 14.532 15.2038 15C14.5538 15.325 14.2808 15.546 14.2418 15.78H16.7898V16.82H12.7208V16.339C12.7208 15.286 13.5918 14.675 14.3588 14.233C15.0868 13.83 15.4378 13.635 15.4378 13.232C15.4378 12.894 15.2038 12.686 14.8268 12.686C14.3848 12.686 14.1248 13.024 14.1118 13.427H12.7468C12.8248 12.426 13.5528 11.633 14.8398 11.633C15.9448 11.633 16.7768 12.257 16.7768 13.258Z",fill:"currentColor"})});var pn=[Z([{ChildComponent:mn,isActive:({selection:t})=>Xa(t)||Ya(t)?t.hasFormat("subscript"):!1,key:"subscript",onSelect:({editor:t})=>{t.dispatchCommand(Ja,"subscript")},order:5}])],qa=y({toolbarFixed:{groups:pn},toolbarInline:{groups:pn}});import{$isTableSelection as Qa}from"@lexical/table";import{$isRangeSelection as ec,FORMAT_TEXT_COMMAND as tc}from"lexical";import{jsx as fn}from"react/jsx-runtime";import"react";var hn=()=>fn("svg",{"aria-hidden":"true",className:"icon",fill:"currentColor",focusable:"false",height:"20",viewBox:"0 0 20 20",width:"20",xmlns:"http://www.w3.org/2000/svg",children:fn("path",{d:"M10.167 15L7.45002 11.36L4.73302 15H2.91302L6.55302 10.177L3.23802 5.718H5.20102L7.54102 8.89L9.89402 5.718H11.714L8.43802 10.06L12.13 15H10.167ZM16.7768 7.252C16.7768 8.149 16.1398 8.526 15.2038 8.994C14.5538 9.319 14.2808 9.54 14.2418 9.774H16.7898V10.814H12.7208V10.333C12.7208 9.28 13.5918 8.669 14.3588 8.227C15.0868 7.824 15.4378 7.629 15.4378 7.226C15.4378 6.888 15.2038 6.68 14.8268 6.68C14.3848 6.68 14.1248 7.018 14.1118 7.421H12.7468C12.8248 6.42 13.5528 5.627 14.8398 5.627C15.9448 5.627 16.7768 6.251 16.7768 7.252Z",fill:"currentColor"})});var gn=[Z([{ChildComponent:hn,isActive:({selection:t})=>ec(t)||Qa(t)?t.hasFormat("superscript"):!1,key:"superscript",onSelect:({editor:t})=>{t.dispatchCommand(tc,"superscript")},order:6}])],oc=y({toolbarFixed:{groups:gn},toolbarInline:{groups:gn}});import{$isTableSelection as nc}from"@lexical/table";import{$isRangeSelection as ic,FORMAT_TEXT_COMMAND as lc}from"lexical";import{jsx as Cn,jsxs as rc}from"react/jsx-runtime";import"react";var xn=()=>rc("svg",{"aria-hidden":"true",className:"icon",fill:"currentColor",focusable:"false",height:"20",viewBox:"0 0 20 20",width:"20",xmlns:"http://www.w3.org/2000/svg",children:[Cn("path",{d:"M13.9656 11.256C13.9656 13.791 12.5096 15.156 10.0006 15.156C7.50461 15.156 6.03561 13.791 6.03561 11.23V5.718H7.76461V11.243C7.76461 12.868 8.50561 13.778 10.0006 13.778C11.4956 13.778 12.2496 12.868 12.2496 11.243V5.718H13.9656V11.256Z",fill:"currentColor"}),Cn("path",{d:"M5.09961 16.3H14.9016V16.95H5.09961V16.3Z",fill:"currentColor"})]});var bn=[Z([{ChildComponent:xn,isActive:({selection:t})=>ic(t)||nc(t)?t.hasFormat("underline"):!1,key:"underline",onSelect:({editor:t})=>{t.dispatchCommand(lc,"underline")},order:3}])],sc=y({toolbarFixed:{groups:bn},toolbarInline:{groups:bn}});import{$createHeadingNode as dc,$isHeadingNode as Dn,HeadingNode as mc}from"@lexical/rich-text";import{$setBlocksType as pc}from"@lexical/selection";import{$getSelection as fc,$isRangeSelection as hc}from"lexical";import{jsx as _n}from"react/jsx-runtime";import"react";var Tn=()=>_n("svg",{"aria-hidden":"true",className:"icon",fill:"none",focusable:"false",height:"20",viewBox:"0 0 20 20",width:"20",xmlns:"http://www.w3.org/2000/svg",children:_n("path",{d:"M4.639 13.5V7.074H6.196V9.648H9.076V7.074H10.642V13.5H9.076V10.836H6.196V13.5H4.639ZM11.5656 9.045V8.019C12.6636 8.019 13.1316 7.731 13.2846 7.065H14.4006V13.5H12.8436V9.045H11.5656Z",fill:"currentColor"})});import{jsx as wn}from"react/jsx-runtime";import"react";var En=()=>wn("svg",{"aria-hidden":"true",className:"icon",fill:"none",focusable:"false",height:"20",viewBox:"0 0 20 20",width:"20",xmlns:"http://www.w3.org/2000/svg",children:wn("path",{d:"M4.139 13.5V7.074H5.696V9.648H8.576V7.074H10.142V13.5H8.576V10.836H5.696V13.5H4.139ZM15.9796 8.973C15.9796 10.116 15.1696 10.656 14.0356 11.232C13.2256 11.646 12.8206 11.943 12.7846 12.294H15.9886V13.5H11.0566V12.951C11.0566 11.601 12.1636 10.845 13.1176 10.287C14.0356 9.756 14.5126 9.486 14.5126 8.946C14.5126 8.46 14.2156 8.145 13.6306 8.145C13.0186 8.145 12.6586 8.613 12.6226 9.198H11.1196C11.2186 7.947 12.1006 6.966 13.6396 6.966C15.0346 6.966 15.9796 7.785 15.9796 8.973Z",fill:"currentColor"})});import{jsx as Nn}from"react/jsx-runtime";import"react";var kn=()=>Nn("svg",{"aria-hidden":"true",className:"icon",fill:"none",focusable:"false",height:"20",viewBox:"0 0 20 20",width:"20",xmlns:"http://www.w3.org/2000/svg",children:Nn("path",{d:"M4.139 13.5V7.074H5.696V9.648H8.576V7.074H10.142V13.5H8.576V10.836H5.696V13.5H4.139ZM16.1146 11.745C16.1146 12.744 15.2236 13.608 13.6126 13.608C12.0736 13.608 11.0926 12.762 10.9846 11.547H12.4696C12.5146 12.114 13.0006 12.456 13.6126 12.456C14.2876 12.456 14.6746 12.132 14.6746 11.619C14.6746 11.061 14.2426 10.836 13.6216 10.836H12.9826V9.738H13.6036C14.1526 9.738 14.5486 9.486 14.5486 8.937C14.5486 8.46 14.2156 8.127 13.6486 8.127C13.0366 8.127 12.6586 8.514 12.6226 9.045H11.1916C11.2726 7.929 12.1276 6.966 13.6666 6.966C15.1876 6.966 15.9706 7.848 15.9706 8.865C15.9706 9.603 15.5026 10.143 14.8186 10.269C15.6196 10.404 16.1146 10.971 16.1146 11.745Z",fill:"currentColor"})});import{jsx as Ln}from"react/jsx-runtime";import"react";var In=()=>Ln("svg",{"aria-hidden":"true",className:"icon",fill:"none",focusable:"false",height:"20",viewBox:"0 0 20 20",width:"20",xmlns:"http://www.w3.org/2000/svg",children:Ln("path",{d:"M3.639 13.5V7.074H5.196V9.648H8.076V7.074H9.642V13.5H8.076V10.836H5.196V13.5H3.639ZM15.1736 7.074V10.854H16.3706V12.033H15.1736V13.5H13.6796V12.033H10.5116V10.845L13.4996 7.074H15.1736ZM13.6796 8.46L11.8256 10.854H13.6796V8.46Z",fill:"currentColor"})});import{jsx as Sn}from"react/jsx-runtime";import"react";var Rn=()=>Sn("svg",{"aria-hidden":"true",className:"icon",fill:"none",focusable:"false",height:"20",viewBox:"0 0 20 20",width:"20",xmlns:"http://www.w3.org/2000/svg",children:Sn("path",{d:"M3.639 13.5V7.074H5.196V9.648H8.076V7.074H9.642V13.5H8.076V10.836H5.196V13.5H3.639ZM13.1576 10.269C12.6896 10.269 12.3746 10.494 12.2216 10.737H10.8176L11.1956 7.074H15.2546V8.28H12.3206L12.1856 9.549C12.4016 9.351 12.8516 9.126 13.4636 9.126C14.7866 9.126 15.6596 10.053 15.6596 11.358C15.6596 12.609 14.7326 13.608 13.1756 13.608C11.5826 13.608 10.6556 12.753 10.5566 11.511H12.1136C12.1586 12.06 12.5456 12.465 13.1576 12.465C13.8236 12.465 14.1746 11.97 14.1746 11.376C14.1746 10.764 13.8416 10.269 13.1576 10.269Z",fill:"currentColor"})});import{jsx as yn}from"react/jsx-runtime";import"react";var vn=()=>yn("svg",{"aria-hidden":"true",className:"icon",fill:"none",focusable:"false",height:"20",viewBox:"0 0 20 20",width:"20",xmlns:"http://www.w3.org/2000/svg",children:yn("path",{d:"M3.639 13.5V7.074H5.196V9.648H8.076V7.074H9.642V13.5H8.076V10.836H5.196V13.5H3.639ZM13.3646 8.127C12.5456 8.127 12.0416 8.937 12.0416 9.999C12.3296 9.54 12.8246 9.207 13.5536 9.207C14.8586 9.207 15.8036 10.134 15.8036 11.376C15.8036 12.645 14.8226 13.608 13.3196 13.608C11.7266 13.608 10.6196 12.393 10.6196 10.395C10.6196 8.316 11.7716 6.966 13.4186 6.966C14.7056 6.966 15.5786 7.749 15.7316 8.829H14.3186C14.2016 8.415 13.9226 8.127 13.3646 8.127ZM13.3106 12.51C13.9586 12.51 14.3816 12.042 14.3816 11.385C14.3816 10.737 13.9586 10.278 13.3106 10.278C12.6536 10.278 12.2126 10.737 12.2126 11.385C12.2126 12.042 12.6536 12.51 13.3106 12.51Z",fill:"currentColor"})});import{$createHeadingNode as ac,$isHeadingNode as cc,HeadingNode as uc}from"@lexical/rich-text";var _o=t=>(e,o,r)=>{let n=t(r);n&&(n.append(...o),e.replace(n),n.select(0,0))};var Mn=t=>{let o=`^(${t.map(n=>Number(n.slice(1))).map(n=>`#{${n}}`).join("|")})\\s`,r=new RegExp(o);return{type:"element",dependencies:[uc],export:(n,i)=>{if(!cc(n))return null;let l=Number(n.getTag().slice(1));return"#".repeat(l)+" "+i(n)},regExp:r,replace:_o(n=>{let i="h"+n[1].length;return ac(i)})}};var An=t=>{let e=fc();pc(e,()=>dc(t))},On={h1:Tn,h2:En,h3:kn,h4:In,h5:Rn,h6:vn},gc=y(({props:t})=>{let{enabledHeadingSizes:e=["h1","h2","h3","h4","h5","h6"]}=t,o=[J(e.map((r,n)=>({ChildComponent:On[r],isActive:({selection:i})=>{if(!hc(i))return!1;for(let l of i.getNodes()){if(Dn(l)&&l.getTag()===r)continue;let s=l.getParent();if(!(Dn(s)&&s.getTag()===r))return!1}return!0},key:r,label:({i18n:i})=>i.t("lexical:heading:label",{headingLevel:r.charAt(1)}),onSelect:({editor:i})=>{i.update(()=>{An(r)})},order:n+2})))];return{markdownTransformers:[Mn(e)],nodes:[mc],sanitizedClientFeatureProps:t,slashMenu:{groups:e?.length?[K(e.map(r=>({Icon:On[r],key:`heading-${r.charAt(1)}`,keywords:["heading",r],label:({i18n:n})=>n.t("lexical:heading:label",{headingLevel:r.charAt(1)}),onSelect:({editor:n})=>{n.update(()=>{An(r)})}})))]:[]},toolbarFixed:{groups:e?.length?o:[]},toolbarInline:{groups:e?.length?o:[]}}});import{$isNodeSelection as kc}from"lexical";import{jsx as Fn}from"react/jsx-runtime";import"react";var To=()=>Fn("svg",{"aria-hidden":"true",className:"icon",fill:"none",focusable:"false",height:"20",viewBox:"0 0 20 20",width:"20",xmlns:"http://www.w3.org/2000/svg",children:Fn("rect",{fill:"currentColor",height:"1",width:"12",x:"4",y:"9.5"})});import{jsx as $n,jsxs as Cc}from"react/jsx-runtime";import"react";var Pn=()=>Cc("svg",{fill:"none",height:"20",viewBox:"0 0 20 20",width:"20",xmlns:"http://www.w3.org/2000/svg",children:[$n("path",{d:"M5 10h10",stroke:"currentColor"}),$n("path",{d:"M10 15V5",stroke:"currentColor"})]});var ue=t=>({type:"dropdown",ChildComponent:Pn,items:t,key:"add",order:10});var Bn={type:"element",dependencies:[mt],export:(t,e)=>ft(t)?"---":null,regExp:/^---\s*$/,replace:t=>{let e=pt();e&&t.replace(e)}};import{c as xc}from"react/compiler-runtime";import{useLexicalComposerContext as bc}from"@lexical/react/LexicalComposerContext.js";import{$insertNodeToNearestRoot as _c}from"@lexical/utils";import{$getSelection as Tc,$isRangeSelection as wc,COMMAND_PRIORITY_EDITOR as Ec}from"lexical";import{useEffect as Nc}from"react";var Hn=()=>{let t=xc(3),[e]=bc(),o,r;return t[0]!==e?(o=()=>e.registerCommand(je,n=>{let i=Tc();if(!wc(i))return!1;if(i.focus.getNode()!==null){let s=pt();_c(s)}return!0},Ec),r=[e],t[0]=e,t[1]=o,t[2]=r):(o=t[1],r=t[2]),Nc(o,r),null};var Lc=y({markdownTransformers:[Bn],nodes:[mt],plugins:[{Component:Hn,position:"normal"}],slashMenu:{groups:[K([{Icon:To,key:"horizontalRule",keywords:["hr","horizontal rule","line","separator"],label:({i18n:t})=>t.t("lexical:horizontalRule:label"),onSelect:({editor:t})=>{t.dispatchCommand(je,void 0)}}])]},toolbarFixed:{groups:[ue([{ChildComponent:To,isActive:({selection:t})=>{if(!kc(t)||!t.getNodes().length)return!1;let e=t.getNodes()[0];return ft(e)},key:"horizontalRule",label:({i18n:t})=>t.t("lexical:horizontalRule:label"),onSelect:({editor:t})=>{t.dispatchCommand(je,void 0)}}])]}});import{INDENT_CONTENT_COMMAND as Rc,OUTDENT_CONTENT_COMMAND as yc}from"lexical";import{jsx as It,jsxs as Ic}from"react/jsx-runtime";import"react";var jn=()=>Ic("svg",{"aria-hidden":"true",className:"icon",fill:"none",focusable:"false",height:"20",viewBox:"0 0 20 20",width:"20",xmlns:"http://www.w3.org/2000/svg",children:[It("path",{d:"M2.5 5H10.5",stroke:"currentColor",strokeWidth:"1.5"}),It("path",{d:"M2.5 10H10.5",stroke:"currentColor",strokeWidth:"1.5"}),It("path",{d:"M2.5 15H17.5",stroke:"currentColor",strokeWidth:"1.5"}),It("path",{d:"M12.25 7.25L17.25 3.75V10.75L12.25 7.25Z",fill:"currentColor"})]});import{jsx as St,jsxs as Sc}from"react/jsx-runtime";import"react";var Gn=()=>Sc("svg",{"aria-hidden":"true",className:"icon",fill:"none",focusable:"false",height:"20",viewBox:"0 0 20 20",width:"20",xmlns:"http://www.w3.org/2000/svg",children:[St("path",{d:"M17.5 5H9.5",stroke:"currentColor",strokeWidth:"1.5"}),St("path",{d:"M17.5 10H9.5",stroke:"currentColor",strokeWidth:"1.5"}),St("path",{d:"M17.5 15H2.5",stroke:"currentColor",strokeWidth:"1.5"}),St("path",{d:"M7.75 7.25L2.75 3.75V10.75L7.75 7.25Z",fill:"currentColor"})]});var Wn=t=>({type:"buttons",items:t,key:"indent",order:35});var Un=[Wn([{ChildComponent:jn,isActive:()=>!1,isEnabled:({selection:t})=>{if(!t||!t?.getNodes()?.length)return!1;for(let e of t.getNodes()){let o=e.getParentOrThrow();if("__indent"in e&&e.__indent>0||"__indent"in o&&o.__indent>0)return!0}return!1},key:"indentDecrease",label:({i18n:t})=>t.t("lexical:indent:decreaseLabel"),onSelect:({editor:t})=>{t.dispatchCommand(yc,void 0)},order:1},{ChildComponent:Gn,isActive:()=>!1,key:"indentIncrease",label:({i18n:t})=>t.t("lexical:indent:increaseLabel"),onSelect:({editor:t})=>{t.dispatchCommand(Rc,void 0)},order:2}])],vc=y({toolbarFixed:{groups:Un},toolbarInline:{groups:Un}});import{$findMatchingParent as Gu}from"@lexical/utils";import{$getSelection as Ro,$isRangeSelection as Ti}from"lexical";import{jsx as Vn}from"react/jsx-runtime";import"react";var Kn=()=>Vn("svg",{"aria-hidden":"true",className:"icon",fill:"none",height:"20",viewBox:"0 0 20 20",width:"20",xmlns:"http://www.w3.org/2000/svg",children:Vn("path",{d:"M8.5 11.5L11.5 8.5M8.5 7L9.625 5.875C10.868 4.633 12.882 4.633 14.125 5.875C15.368 7.118 15.368 9.133 14.125 10.375L13 11.5M7 8.5L5.746 9.754C4.56 10.94 4.519 12.85 5.652 14.087C6.814 15.354 8.78 15.449 10.058 14.298L11.5 13",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"})});import{$isAtNodeEnd as zn}from"@lexical/selection";function De(t){let{anchor:e}=t,{focus:o}=t,r=t.anchor.getNode(),n=t.focus.getNode();return r===n?r:t.isBackward()?zn(o)?r:n:zn(e)?r:n}var wo=t=>({type:"buttons",items:t,key:"features",order:50});import{$createTextNode as Gc,$isTextNode as Wc}from"lexical";import{addClassNamesToElement as Mc,isHTMLAnchorElement as Dc}from"@lexical/utils";import ko from"bson-objectid";import{$applyNodeReplacement as Ac,$createTextNode as Zn,$getSelection as Oc,$isElementNode as Yn,$isRangeSelection as No,createCommand as Fc,ElementNode as $c}from"lexical";var Pc=new Set(["http:","https:","mailto:","sms:","tel:"]),q=class t extends $c{__fields;__id;constructor({id:e,fields:o={doc:null,linkType:"custom",newTab:!1,url:""},key:r}){super(r),this.__fields=o,this.__id=e}static clone(e){return new t({id:e.__id,fields:e.__fields,key:e.__key})}static getType(){return"link"}static importDOM(){return{a:e=>({conversion:Bc,priority:1})}}static importJSON(e){e.version===1&&typeof e.fields?.doc?.value=="object"&&e.fields?.doc?.value?.id&&(e.fields.doc.value=e.fields.doc.value.id,e.version=2),e.version===2&&!e.id&&(e.id=new ko.default().toHexString(),e.version=3);let o=de({id:e.id,fields:e.fields});return o.setFormat(e.format),o.setIndent(e.indent),o.setDirection(e.direction),o}canBeEmpty(){return!1}canInsertTextAfter(){return!1}canInsertTextBefore(){return!1}createDOM(e){let o=document.createElement("a");return this.__fields?.linkType==="custom"&&(o.href=this.sanitizeUrl(this.__fields.url??"")),(this.__fields?.newTab??!1)&&(o.target="_blank"),this.__fields?.newTab===!0&&this.__fields?.linkType==="custom"&&(o.rel=Eo(o.rel,"add","noopener")),Mc(o,e.theme.link),o}exportJSON(){let e={...super.exportJSON(),type:"link",fields:this.getFields(),version:3},o=this.getID();return o&&(e.id=o),e}extractWithChild(e,o,r){if(!No(o))return!1;let n=o.anchor.getNode(),i=o.focus.getNode();return this.isParentOf(n)&&this.isParentOf(i)&&o.getTextContent().length>0}getFields(){return this.getLatest().__fields}getID(){return this.getLatest().__id}insertNewAfter(e,o=!0){let r=this.getParentOrThrow().insertNewAfter(e,o);if(Yn(r)){let n=de({fields:this.__fields});return r.append(n),n}return null}isInline(){return!0}sanitizeUrl(e){try{let o=new URL(e);if(!Pc.has(o.protocol))return"about:blank"}catch{return"https://"}return e}setFields(e){let o=this.getWritable();o.__fields=e}updateDOM(e,o,r){let n=this.__fields?.url,i=this.__fields?.newTab;return n!=null&&n!==e.__fields?.url&&this.__fields?.linkType==="custom"&&(o.href=n),this.__fields?.linkType==="internal"&&e.__fields?.linkType==="custom"&&o.removeAttribute("href"),o.rel==null&&(o.rel=""),i!==e.__fields?.newTab&&(i??!1?(o.target="_blank",this.__fields?.linkType==="custom"&&(o.rel=Eo(o.rel,"add","noopener"))):(o.removeAttribute("target"),o.rel=Eo(o.rel,"remove","noopener"))),!1}};function Bc(t){let e=null;if(Dc(t)){let o=t.textContent;o!==null&&o!==""&&(e=de({id:new ko.default().toHexString(),fields:{doc:null,linkType:"custom",newTab:t.getAttribute("target")==="_blank",url:t.getAttribute("href")??""}}))}return{node:e}}function de({id:t,fields:e}){return Ac(new q({id:t??new ko.default().toHexString(),fields:e}))}function V(t){return t instanceof q}var ie=Fc("TOGGLE_LINK_COMMAND");function Xn(t){let e=Oc();if(!No(e)&&!t.selectedNodes?.length)return;let o=No(e)?e.extract():t.selectedNodes;if(t===null)o?.forEach(r=>{let n=r.getParent();if(V(n)){let i=n.getChildren();for(let l=0;l<i.length;l+=1)n.insertBefore(i[l]);n.remove()}});else{if(o?.length===1){let i=o[0],l=V(i)?i:Hc(i);if(l!==null){l.setFields(t.fields),t.text!=null&&t.text!==l.getTextContent()&&(l.append(Zn(t.text)),l.getChildren().forEach(s=>{s!==l.getLastChild()&&s.remove()}));return}}let r=null,n=null;o?.forEach(i=>{let l=i.getParent();if(!(l===n||l===null||Yn(i)&&!i.isInline())){if(V(l)){n=l,l.setFields(t.fields),t.text!=null&&t.text!==l.getTextContent()&&(l.append(Zn(t.text)),l.getChildren().forEach(s=>{s!==l.getLastChild()&&s.remove()}));return}if(l.is(r)||(r=l,n=de({fields:t.fields}),V(l)?i.getPreviousSibling()===null?l.insertBefore(n):l.insertAfter(n):i.insertBefore(n)),V(i)){if(i.is(n))return;if(n!==null){let s=i.getChildren();for(let a=0;a<s.length;a+=1)n.append(s[a])}i.remove();return}n!==null&&n.append(i)}})}}function Hc(t){return jc(t,e=>V(e))}function jc(t,e){let o=t;for(;o!==null&&(o=o.getParent(),!(o===null||e(o))););return o}function Eo(t,e,o){let r,n=`${t}`;if(e==="add"){if(n.includes(o)){let i=new RegExp(o,"g");n=n.replace(i,"").trim()}n=n.trim(),r=n.length===0?`${o}`:`${n} ${o}`}else{let i=new RegExp(o,"g");r=n.replace(i,"").trim()}return r}var Jn={type:"text-match",dependencies:[q],export:(t,e,o)=>{if(!V(t))return null;let r=t,{url:n}=r.getFields(),i=`[${r.getTextContent()}](${n})`,l=r.getFirstChild();return r.getChildrenSize()===1&&Wc(l)?o(l,i):i},importRegExp:/\[([^[]+)\]\(([^()\s]+)(?:\s"((?:[^"]*\\")*[^"]*)"\s*)?\)/,regExp:/\[([^[]+)\]\(([^()\s]+)(?:\s"((?:[^"]*\\")*[^"]*)"\s*)?\)$/,replace:(t,e)=>{let[,o,r]=e,n=de({fields:{doc:null,linkType:"custom",newTab:!1,url:r}}),i=Gc(o);i.setFormat(t.getFormat()),n.append(i),t.replace(n)},trigger:")"};import{$applyNodeReplacement as Uc,$isElementNode as Vc}from"lexical";var me=class t extends q{static clone(e){return new t({id:"",fields:e.__fields,key:e.__key})}static getType(){return"autolink"}static importDOM(){return null}static importJSON(e){e.version===1&&typeof e.fields?.doc?.value=="object"&&e.fields?.doc?.value?.id&&(e.fields.doc.value=e.fields.doc.value.id,e.version=2);let o=et({fields:e.fields});return o.setFormat(e.format),o.setIndent(e.indent),o.setDirection(e.direction),o}exportJSON(){let e=super.exportJSON();return{type:"autolink",children:e.children,direction:e.direction,fields:e.fields,format:e.format,indent:e.indent,version:2}}insertNewAfter(e,o=!0){let r=this.getParentOrThrow().insertNewAfter(e,o);if(Vc(r)){let n=et({fields:this.__fields});return r.append(n),n}return null}};function et({fields:t}){return Uc(new me({id:"",fields:t}))}function pe(t){return t instanceof me}import{c as Kc}from"react/compiler-runtime";import{useLexicalComposerContext as zc}from"@lexical/react/LexicalComposerContext.js";import{mergeRegister as Zc}from"@lexical/utils";import{$createTextNode as qn,$getSelection as Yc,$isElementNode as ei,$isLineBreakNode as ti,$isNodeSelection as Xc,$isRangeSelection as Jc,$isTextNode as tt,TextNode as qc}from"lexical";import{useEffect as Qc}from"react";function Qn(t,e=o=>o){return o=>{let r=t.exec(o);return r===null?null:{index:r.index,length:r[0].length,text:r[0],url:e(r[0])}}}function oi(t,e){for(let o=0;o<e.length;o++){let r=e[o](t);if(r!=null)return r}return null}var eu=/[.,;\s]/;function yt(t){return eu.test(t)}function ri(t){return yt(t[t.length-1])}function Io(t){return yt(t[0])}function tu(t,e){return e?/^\.[a-z]{2,}/i.test(t):/^\.[a-z0-9]+/i.test(t)}function ni(t){let e=t.getPreviousSibling();return ei(e)&&(e=e.getLastDescendant()),e===null||ti(e)||tt(e)&&ri(e.getTextContent())}function ii(t){let e=t.getNextSibling();return ei(e)&&(e=e.getFirstDescendant()),e===null||ti(e)||tt(e)&&Io(e.getTextContent())}function ou(t,e,o,r){return(t>0?yt(o[t-1]):ni(r[0]))?e<o.length?yt(o[e]):ii(r[r.length-1]):!1}function ru(t,e,o){let r=[],n=[],i=[],l=0,s=0,a=[...t];for(;a.length>0;){let d=a[0],u=d.getTextContent().length,m=s;s+u<=e?(r.push(d),l+=u):m>=o?i.push(d):n.push(d),s+=u,a.shift()}return[l,r,n,i]}function nu(t,e,o,r){let n={linkType:"custom",url:r.url,...r.fields},i=et({fields:n});if(t.length===1){let l=t[0],s;e===0?[s,l]=l.splitText(o):[,s,l]=l.splitText(e,o);let a=qn(r.text);return a.setFormat(s.getFormat()),a.setDetail(s.getDetail()),a.setStyle(s.getStyle()),i.append(a),s.replace(i),l}else if(t.length>1){let l=t[0],s=l.getTextContent().length,a;e===0?a=l:[,a]=l.splitText(e);let d=[],c;for(let f=1;f<t.length;f++){let h=t[f],T=h.getTextContent().length,M=s,A=s+T;if(M<o)if(A<=o)d.push(h);else{let[C,w]=h.splitText(o-M);d.push(C),c=w}s+=T}let u=Yc(),m=u?u.getNodes().find(tt):void 0,p=qn(a.getTextContent());return p.setFormat(a.getFormat()),p.setDetail(a.getDetail()),p.setStyle(a.getStyle()),i.append(p,...d),m&&m===a&&(Jc(u)?p.select(u.anchor.offset,u.focus.offset):Xc(u)&&p.select(0,p.getTextContent().length)),a.replace(i),c}}function iu(t,e,o){let r=[...t],n=r.map(a=>a.getTextContent()).join(""),i=n,l,s=0;for(;(l=oi(i,e))!=null&&l!==null;){let a=l.index,d=l.length,c=a+d;if(ou(s+a,s+c,n,r)){let[m,,p,f]=ru(r,s+a,s+c),h=s+a-m,g=s+c-m,T=nu(p,h,g,l);r=T?[T,...f]:f,o(l.url,null),s=0}else s+=c;i=i.substring(c)}}function Lo(t,e,o){let r=t.getChildren(),n=r.length;for(let a=0;a<n;a++){let d=r[a];if(!tt(d)||!d.isSimpleText()){Rt(t),o(null,t.getFields()?.url??null);return}}let i=t.getTextContent(),l=oi(i,e);if(l===null||l.text!==i){Rt(t),o(null,t.getFields()?.url??null);return}if(!ni(t)||!ii(t)){Rt(t),o(null,t.getFields()?.url??null);return}let s=t.getFields()?.url;if(s!==l?.url){let a=t.getFields();a.url=l?.url,t.setFields(a),o(l.url,s??null)}}function lu(t,e,o){let r=t.getPreviousSibling(),n=t.getNextSibling(),i=t.getTextContent();if(pe(r)){let l=r.getFields()?.url?r.getFields()?.url?.startsWith("mailto:"):!1;(!Io(i)||tu(i,l))&&(r.append(t),Lo(r,e,o),o(null,r.getFields()?.url??null))}pe(n)&&!ri(i)&&(Rt(n),Lo(n,e,o),o(null,n.getFields()?.url??null))}function Rt(t){let e=t.getChildren(),o=e.length;for(let r=o-1;r>=0;r--)t.insertAfter(e[r]);return t.remove(),e.map(r=>r.getLatest())}function su(t){let e=[t],o=t.getNextSibling();for(;o!==null&&tt(o)&&o.isSimpleText()&&(e.push(o),!/\s/.test(o.getTextContent()));)o=o.getNextSibling();return e}function au(t,e,o){let r=Kc(5),n,i;r[0]!==t||r[1]!==o||r[2]!==e?(n=()=>{if(!t.hasNodes([me]))throw new Error("LexicalAutoLinkPlugin: AutoLinkNode not registered on editor");let l=(s,a)=>{o?.(s,a)};return Zc(t.registerNodeTransform(qc,s=>{let a=s.getParentOrThrow(),d=s.getPreviousSibling();if(pe(a))Lo(a,e,l);else if(!V(a)){if(s.isSimpleText()&&(Io(s.getTextContent())||!pe(d))){let c=su(s);iu(c,e,l)}lu(s,e,l)}}))},i=[t,e,o],r[0]=t,r[1]=o,r[2]=e,r[3]=n,r[4]=i):(n=r[3],i=r[4]),Qc(n,i)}var cu=/((https?:\/\/(www\.)?)|(www\.))[-\w@:%.+~#=]{1,256}\.[a-zA-Z\d()]{1,6}\b([-\w()@:%+.~#?&/=]*)(?<![-.+():%])/,uu=/(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}\])|(([a-z\-\d]+\.)+[a-z]{2,}))/i,du=[Qn(cu,t=>t.startsWith("http")?t:`https://${t}`),Qn(uu,t=>`mailto:${t}`)],li=()=>{let[t]=zc();return au(t,du),null};import{jsx as mu}from"react/jsx-runtime";import{ClickableLinkPlugin as pu}from"@lexical/react/LexicalClickableLinkPlugin.js";import"react";var si=()=>mu(pu,{});import{jsx as yu}from"react/jsx-runtime";import"react";import{createPortal as vu}from"react-dom";import{jsx as fe,jsxs as ot,Fragment as hu}from"react/jsx-runtime";import{useLexicalComposerContext as gu}from"@lexical/react/LexicalComposerContext.js";import{$findMatchingParent as ai,mergeRegister as ci}from"@lexical/utils";import{getTranslation as So}from"@payloadcms/translations";import{CloseMenuIcon as Cu,EditIcon as xu,ExternalLinkIcon as ui,formatDrawerSlug as bu,useConfig as _u,useEditDepth as Tu,useLocale as wu,useTranslation as Eu}from"@payloadcms/ui";import{requests as Nu}from"@payloadcms/ui/shared";import{$getSelection as di,$isLineBreakNode as ku,$isRangeSelection as mi,COMMAND_PRIORITY_HIGH as Lu,COMMAND_PRIORITY_LOW as pi,KEY_ESCAPE_COMMAND as Iu,SELECTION_CHANGE_COMMAND as Su}from"lexical";import fi,{useCallback as hi,useEffect as Dt,useRef as Ru,useState as Le}from"react";function vt(t,e,o,r=10,n=5){let i=o.parentElement;if(t===null||i==null){e.style.opacity="0",e.style.transform="translate(-10000px, -10000px)";return}let l=e.getBoundingClientRect(),s=o.getBoundingClientRect(),a=i.getBoundingClientRect(),d=t.top-r,c=t.left-n;d<a.top&&(d+=l.height+t.height+r*2),c+l.width>a.right&&(c=a.right-l.width-n),d-=s.top,c-=s.left,e.style.opacity="1",e.style.transform=`translate(${c}px, ${d}px)`}import{createCommand as fu}from"lexical";var Mt=fu("TOGGLE_LINK_WITH_MODAL_COMMAND");function gi({anchorElem:t}){let[e]=gu(),[o,r]=Le(),n=Ru(null),[i,l]=Le(null),[s,a]=Le(null),{fieldProps:{schemaPath:d},uuid:c}=B(),{config:u}=_u(),{i18n:m,t:p}=Eu(),[f,h]=Le(),g=Tu(),[T,M]=Le(!1),[A,C]=Le([]),w=wu(),[x,N]=Le(!1),S=bu({slug:"lexical-rich-text-link-"+c,depth:g}),{toggleDrawer:E}=be(S),k=hi(()=>{M(!1),n&&n.current&&(n.current.style.opacity="0",n.current.style.transform="translate(-10000px, -10000px)"),N(!1),l(null),a(null),C([]),h(void 0)},[M,l,a,C]),I=hi(()=>{let b=di(),_;if(!mi(b)||!b){k();return}let R=De(b);_=e.getElementByKey(R.getKey())?.getBoundingClientRect();let L=ai(R,V),D=b.getNodes().filter(W=>!ku(W)).find(W=>{let G=ai(W,V);return L&&!L.is(G)||G&&!G.is(L)});if(L==null||D){k();return}r(L);let v=L.getFields(),O={...v,id:L.getID(),text:L.getTextContent()};if(v?.linkType==="custom")l(v?.url??null),a(null);else{l(`${u.routes.admin==="/"?"":u.routes.admin}/collections/${v?.doc?.relationTo}/${v?.doc?.value}`);let W=u.collections.find(G=>G.slug===v?.doc?.relationTo);if(!W)a(v?.label?String(v?.label):null),l(v?.url?String(v?.url):null);else{let G=typeof v.doc?.value=="object"?v.doc.value.id:v.doc?.value,ae=v.doc?.relationTo;if(!G||!ae)throw new Error("Focus link parent is missing doc.value or doc.relationTo");let ye=p("fields:linkedTo",{label:`${So(W.labels.singular,m)} - ${p("lexical:link:loadingWithEllipsis",m)}`}).replace(/<[^>]*>?/g,"");a(ye),Nu.get(`${u.serverURL}${u.routes.api}/${ae}/${G}`,{headers:{"Accept-Language":m.language},params:{depth:0,locale:w?.code}}).then(async Ce=>{if(!Ce.ok)throw new Error(`HTTP error! Status: ${Ce.status}`);let dt=await Ce.json(),cr=W?.admin?.useAsTitle||"id",U=dt[cr],ee=p("fields:linkedTo",{label:`${So(W.labels.singular,m)} - ${U}`}).replace(/<[^>]*>?/g,"");a(ee)}).catch(()=>{let Ce=p("fields:linkedTo",{label:`${So(W.labels.singular,m)} - ${p("general:untitled",m)} - ID: ${G}`}).replace(/<[^>]*>?/g,"");a(Ce)})}}h(O),M(!0),C(b?b?.getNodes():[]),pe(L)?N(!0):N(!1);let H=n.current,$=window.getSelection(),{activeElement:j}=document;if(H===null)return;let Q=e.getRootElement();return $!==null&&Q!==null&&Q.contains($.anchorNode)?(_||(_=$.getRangeAt(0).getBoundingClientRect()),_!=null&&(_.y+=40,vt(_,H,t))):(j==null||j.className!=="link-input")&&(Q!==null&&vt(null,H,t),l(null),a(null)),!0},[e,k,u.routes.admin,u.routes.api,u.collections,u.serverURL,p,m,w?.code,t]);return Dt(()=>ci(e.registerCommand(Mt,b=>(e.dispatchCommand(ie,b),I(),E(),!0),pi)),[e,I,E,S]),Dt(()=>{let b=t.parentElement,_=()=>{e.getEditorState().read(()=>{I()})};return window.addEventListener("resize",_),b?.addEventListener("scroll",_),()=>{window.removeEventListener("resize",_),b?.removeEventListener("scroll",_)}},[t.parentElement,e,I]),Dt(()=>ci(e.registerUpdateListener(({editorState:b})=>{b.read(()=>{I()})}),e.registerCommand(Su,()=>(I(),!0),pi),e.registerCommand(Iu,()=>T?(k(),!0):!1,Lu)),[e,I,T,k]),Dt(()=>{e.getEditorState().read(()=>{I()})},[e,I]),ot(fi.Fragment,{children:[fe("div",{className:"link-editor",ref:n,children:ot("div",{className:"link-input",children:[i&&i.length>0?ot("a",{href:i,rel:"noopener noreferrer",target:"_blank",children:[o?.__fields.newTab?fe(ui,{}):null,s!=null&&s.length>0?s:i]}):s!=null&&s.length>0?ot(hu,{children:[o?.__fields.newTab?fe(ui,{}):null,fe("span",{className:"link-input__label-pure",children:s})]}):null,e.isEditable()&&ot(fi.Fragment,{children:[fe("button",{"aria-label":"Edit link",className:"link-edit",onClick:()=>{E()},onMouseDown:b=>{b.preventDefault()},tabIndex:0,type:"button",children:fe(xu,{})}),!x&&fe("button",{"aria-label":"Remove link",className:"link-trash",onClick:()=>{e.dispatchCommand(ie,null)},onMouseDown:b=>{b.preventDefault()},tabIndex:0,type:"button",children:fe(Cu,{})})]})]})}),fe(Ge,{className:"lexical-link-edit-drawer",data:f,drawerSlug:S,drawerTitle:p("fields:editLink"),featureKey:"link",handleDrawerSubmit:(b,_)=>{let R=_,L={...R};delete L.text,e.update(()=>{let D=di(),v=null;if(mi(D)?v=De(D).getParent():A.length&&(v=A[0].getParent()),v&&pe(v)){let O=de({fields:L});v.replace(O,!0)}}),e.dispatchCommand(ie,{fields:L,selectedNodes:A,text:R.text})},schemaPath:d,schemaPathSuffix:"fields"})]})}var Ci=t=>{let{anchorElem:e=document.body}=t;return vu(yu(gi,{anchorElem:e}),e)};import{c as Au}from"react/compiler-runtime";import{useLexicalComposerContext as Ou}from"@lexical/react/LexicalComposerContext.js";import{mergeRegister as Fu}from"@lexical/utils";import{$getSelection as $u,$isElementNode as Pu,$isRangeSelection as Bu,COMMAND_PRIORITY_LOW as bi,PASTE_COMMAND as Hu}from"lexical";import{useEffect as ju}from"react";var Mu=/(?:[A-Za-z]{3,9}:(?:\/\/)?(?:[-;:&=+$,\w]+@)?[A-Za-z\d.-]+|(?:www.|[-;:&=+$,\w]+@)[A-Za-z\d.-]+)(?:\/[+~%/.\w-]*)?\??[-+=&;%@.\w]*#?\w*/,Du=/^[\w\-./]*(?:#\w[\w-]*)?$/;function xi(t){if(!t)return!1;if(t==="https://"||Mu.test(t)||Du.test(t))return!0;try{return new URL(t),!0}catch{}return!1}var _i=()=>{let t=Au(3),[e]=Ou(),o,r;return t[0]!==e?(o=()=>{if(!e.hasNodes([q]))throw new Error("LinkPlugin: LinkNode not registered on editor");return Fu(e.registerCommand(ie,n=>(Xn(n),!0),bi),e.registerCommand(Hu,n=>{let i=$u();if(!Bu(i)||i.isCollapsed()||!(n instanceof ClipboardEvent)||n.clipboardData==null)return!1;let l=n.clipboardData.getData("text");if(!xi(l))return!1;if(!i.getNodes().some(s=>Pu(s))){let s={doc:null,linkType:"custom",newTab:!1,url:l};return e.dispatchCommand(ie,{fields:s,text:null}),n.preventDefault(),!0}return!1},bi))},r=[e],t[0]=e,t[1]=o,t[2]=r):(o=t[1],r=t[2]),ju(o,r),null};var wi=[wo([{ChildComponent:Kn,isActive:({selection:t})=>{if(Ti(t)){let e=De(t);return Gu(e,V)!=null}return!1},isEnabled:({selection:t})=>!!(Ti(t)&&Ro()?.getTextContent()?.length),key:"link",label:({i18n:t})=>t.t("lexical:link:label"),onSelect:({editor:t,isActive:e})=>{if(e)t.dispatchCommand(ie,null);else{let o,r=[];if(t.getEditorState().read(()=>{o=Ro()?.getTextContent(),r=Ro()?.getNodes()??[]}),!o?.length)return;let n={doc:null,linkType:"custom",newTab:!1,url:"https://"};t.dispatchCommand(Mt,{fields:n,selectedNodes:r,text:o})}},order:1}])],Wu=y({markdownTransformers:[Jn],nodes:[q,me],plugins:[{Component:_i,position:"normal"},{Component:li,position:"normal"},{Component:si,position:"normal"},{Component:Ci,position:"floatingAnchorElem"}],toolbarFixed:{groups:wi},toolbarInline:{groups:wi}});import{$isListNode as Mo,INSERT_CHECK_LIST_COMMAND as Si,ListItemNode as td,ListNode as od}from"@lexical/list";import{$isRangeSelection as rd}from"lexical";import{jsx as Ei,jsxs as Uu}from"react/jsx-runtime";import"react";var yo=()=>Uu("svg",{"aria-hidden":"true",className:"icon",fill:"none",focusable:"false",height:"20",viewBox:"0 0 20 20",width:"20",xmlns:"http://www.w3.org/2000/svg",children:[Ei("rect",{height:"13",rx:"1.5",stroke:"currentColor",width:"13",x:"3.5",y:"3.5"}),Ei("path",{d:"M7 10L9 12.5L13 7.5",stroke:"currentColor",strokeWidth:"1.5"})]});import{jsx as Vu}from"react/jsx-runtime";import{ListPlugin as Ku}from"@lexical/react/LexicalListPlugin.js";import"react";var Ae=()=>Vu(Ku,{});function Oe(t){return{items:t,key:"lists",label:({i18n:e})=>e.t("lexical:general:slashMenuListGroupLabel")}}import{$isListNode as Xu,ListItemNode as Ju,ListNode as qu}from"@lexical/list";import{$createListItemNode as zu,$createListNode as Zu,$isListItemNode as Yu,$isListNode as vo}from"@lexical/list";var Ni=4,Fe=t=>(e,o,r)=>{let n=e.getPreviousSibling(),i=e.getNextSibling(),l=zu(t==="check"?r[3]==="x":void 0);if(vo(i)&&i.getListType()===t){let a=i.getFirstChild();a!==null?a.insertBefore(l):i.append(l),e.remove()}else if(vo(n)&&n.getListType()===t)n.append(l),e.remove();else{let a=Zu(t,t==="number"?Number(r[2]):void 0);a.append(l),e.replace(a)}l.append(...o),l.select(0,0);let s=Math.floor(r[1].length/Ni);s&&l.setIndent(s)},Ie=(t,e,o)=>{let r=[],n=t.getChildren(),i=0;for(let l of n)if(Yu(l)){if(l.getChildrenSize()===1){let c=l.getFirstChild();if(vo(c)){r.push(Ie(c,e,o+1));continue}}let s=" ".repeat(o*Ni),a=t.getListType(),d=a==="number"?`${t.getStart()+i}. `:a==="check"?`- [${l.getChecked()?"x":" "}] `:"- ";r.push(s+d+e(l)),i++}return r.join(`
|
|
35
|
+
`)};var ki={type:"element",dependencies:[qu,Ju],export:(t,e)=>Xu(t)?Ie(t,e,0):null,regExp:/^(\s*)(?:-\s)?\s?(\[(\s|x)?\])\s/i,replace:Fe("check")};import{jsx as Qu}from"react/jsx-runtime";import{CheckListPlugin as ed}from"@lexical/react/LexicalCheckListPlugin.js";import"react";var Li=()=>Qu(ed,{});var Ii=[J([{ChildComponent:yo,isActive:({selection:t})=>{if(!rd(t))return!1;for(let e of t.getNodes()){if(Mo(e)&&e.getListType()==="check")continue;let o=e.getParent();if(Mo(o)&&o.getListType()==="check")continue;let r=o?.getParent();if(!(Mo(r)&&r.getListType()==="check"))return!1}return!0},key:"checklist",label:({i18n:t})=>t.t("lexical:checklist:label"),onSelect:({editor:t})=>{t.dispatchCommand(Si,void 0)},order:12}])],nd=y(({featureProviderMap:t})=>{let e=[{Component:Li,position:"normal"}];return!t.has("unorderedList")&&!t.has("orderedList")&&e.push({Component:Ae,position:"normal"}),{markdownTransformers:[ki],nodes:t.has("unorderedList")||t.has("orderedList")?[]:[od,td],plugins:e,slashMenu:{groups:[Oe([{Icon:yo,key:"checklist",keywords:["check list","check","checklist","cl"],label:({i18n:o})=>o.t("lexical:checklist:label"),onSelect:({editor:o})=>{o.dispatchCommand(Si,void 0)}}])]},toolbarFixed:{groups:Ii},toolbarInline:{groups:Ii}}});import{$isListNode as Ao,INSERT_ORDERED_LIST_COMMAND as vi,ListItemNode as cd,ListNode as ud}from"@lexical/list";import{$isRangeSelection as dd}from"lexical";import{jsx as rt,jsxs as id}from"react/jsx-runtime";import"react";var Do=()=>id("svg",{"aria-hidden":"true",className:"icon",fill:"none",focusable:"false",height:"20",viewBox:"0 0 20 20",width:"20",xmlns:"http://www.w3.org/2000/svg",children:[rt("path",{d:"M5.89284 12.479C5.89284 13.368 5.26284 13.788 4.38084 14.236C3.75084 14.558 3.43584 14.789 3.40784 15.062H5.89984V16H2.06384V15.573C2.06384 14.523 2.92484 13.935 3.66684 13.501C4.38084 13.088 4.75184 12.878 4.75184 12.458C4.75184 12.08 4.52084 11.835 4.06584 11.835C3.58984 11.835 3.30984 12.199 3.28184 12.654H2.11284C2.18984 11.681 2.87584 10.918 4.07284 10.918C5.15784 10.918 5.89284 11.555 5.89284 12.479Z",fill:"currentColor"}),rt("path",{d:"M2.68608 4.535V3.737C3.54008 3.737 3.90408 3.513 4.02308 2.995H4.89108V8H3.68008L3.68008 4.535H2.68608Z",fill:"currentColor"}),rt("path",{d:"M8 15L17 15",stroke:"currentColor",strokeWidth:"1.5"}),rt("path",{d:"M8 10L17 10",stroke:"currentColor",strokeWidth:"1.5"}),rt("path",{d:"M8 5L17 5",stroke:"currentColor",strokeWidth:"1.5"})]});import{$isListNode as ld,ListItemNode as sd,ListNode as ad}from"@lexical/list";var Ri={type:"element",dependencies:[ad,sd],export:(t,e)=>ld(t)?Ie(t,e,0):null,regExp:/^(\s*)(\d+)\.\s/,replace:Fe("number")};var yi=[J([{ChildComponent:Do,isActive:({selection:t})=>{if(!dd(t))return!1;for(let e of t.getNodes()){if(Ao(e)&&e.getListType()==="number")continue;let o=e.getParent();if(Ao(o)&&o.getListType()==="number")continue;let r=o?.getParent();if(!(Ao(r)&&r.getListType()==="number"))return!1}return!0},key:"orderedList",label:({i18n:t})=>t.t("lexical:orderedList:label"),onSelect:({editor:t})=>{t.dispatchCommand(vi,void 0)},order:10}])],md=y(({featureProviderMap:t})=>({markdownTransformers:[Ri],nodes:t.has("orderedList")?[]:[ud,cd],plugins:t.has("orderedList")?[]:[{Component:Ae,position:"normal"}],slashMenu:{groups:[Oe([{Icon:Do,key:"orderedList",keywords:["ordered list","ol"],label:({i18n:e})=>e.t("lexical:orderedList:label"),onSelect:({editor:e})=>{e.dispatchCommand(vi,void 0)}}])]},toolbarFixed:{groups:yi},toolbarInline:{groups:yi}}));import{$isListNode as Fo,INSERT_UNORDERED_LIST_COMMAND as Ai,ListItemNode as Cd,ListNode as xd}from"@lexical/list";import{$isRangeSelection as bd}from"lexical";import{jsx as $e,jsxs as pd}from"react/jsx-runtime";import"react";var Oo=()=>pd("svg",{"aria-hidden":"true",className:"icon",fill:"none",focusable:"false",height:"20",viewBox:"0 0 20 20",width:"20",xmlns:"http://www.w3.org/2000/svg",children:[$e("circle",{cx:"4",cy:"5",fill:"currentColor",r:"1.15",stroke:"currentColor",strokeWidth:"0.3"}),$e("circle",{cx:"4",cy:"10",fill:"currentColor",r:"1.15",stroke:"currentColor",strokeWidth:"0.3"}),$e("circle",{cx:"4",cy:"15",fill:"currentColor",r:"1.15",stroke:"currentColor",strokeWidth:"0.3"}),$e("path",{d:"M17 5H7",stroke:"currentColor",strokeWidth:"1.5"}),$e("path",{d:"M17 10H7",stroke:"currentColor",strokeWidth:"1.5"}),$e("path",{d:"M17 15H7",stroke:"currentColor",strokeWidth:"1.5"})]});import{$isListNode as fd,ListItemNode as hd,ListNode as gd}from"@lexical/list";var Mi={type:"element",dependencies:[gd,hd],export:(t,e)=>fd(t)?Ie(t,e,0):null,regExp:/^(\s*)[-*+]\s/,replace:Fe("bullet")};var Di=[J([{ChildComponent:Oo,isActive:({selection:t})=>{if(!bd(t))return!1;for(let e of t.getNodes()){if(Fo(e)&&e.getListType()==="bullet")continue;let o=e.getParent();if(Fo(o)&&o.getListType()==="bullet")continue;let r=o?.getParent();if(!(Fo(r)&&r.getListType()==="bullet"))return!1}return!0},key:"unorderedList",label:({i18n:t})=>t.t("lexical:unorderedList:label"),onSelect:({editor:t})=>{t.dispatchCommand(Ai,void 0)},order:11}])],_d=y({markdownTransformers:[Mi],nodes:[xd,Cd],plugins:[{Component:Ae,position:"normal"}],slashMenu:{groups:[Oe([{Icon:Oo,key:"unorderedList",keywords:["unordered list","ul"],label:({i18n:t})=>t.t("lexical:unorderedList:label"),onSelect:({editor:t})=>{t.dispatchCommand(Ai,void 0)}}])]},toolbarFixed:{groups:Di},toolbarInline:{groups:Di}});import{jsx as Td}from"react/jsx-runtime";import{addClassNamesToElement as wd}from"@lexical/utils";import{DecoratorNode as Ed}from"lexical";import*as Oi from"react";var Nd=Oi.lazy(()=>import("./Component-MBLHTKDK.js").then(t=>({default:t.UnknownConvertedNodeComponent}))),nt=class t extends Ed{__data;constructor({data:e,key:o}){super(o),this.__data=e}static clone(e){return new t({data:e.__data,key:e.__key})}static getType(){return"unknownConverted"}static importJSON(e){return kd({data:e.data})}canInsertTextAfter(){return!0}canInsertTextBefore(){return!0}createDOM(e){let o=document.createElement("span");return wd(o,"unknownConverted"),o}decorate(){return Td(Nd,{data:this.__data})}exportJSON(){return{type:this.getType(),data:this.__data,version:1}}isInline(){return!0}updateDOM(e,o){return!1}};function kd({data:t}){return new nt({data:t})}var Ld=y(()=>({nodes:[nt]}));import{jsx as Id}from"react/jsx-runtime";import{addClassNamesToElement as Sd}from"@lexical/utils";import{DecoratorNode as Rd}from"lexical";import*as Fi from"react";var yd=Fi.lazy(()=>import("./Component-DOSSWC76.js").then(t=>({default:t.UnknownConvertedNodeComponent}))),it=class t extends Rd{__data;constructor({data:e,key:o}){super(o),this.__data=e}static clone(e){return new t({data:e.__data,key:e.__key})}static getType(){return"unknownConverted"}static importJSON(e){return vd({data:e.data})}canInsertTextAfter(){return!0}canInsertTextBefore(){return!0}createDOM(e){let o=document.createElement("span");return Sd(o,"unknownConverted"),o}decorate(){return Id(yd,{data:this.__data})}exportJSON(){return{type:this.getType(),data:this.__data,version:1}}isInline(){return!0}updateDOM(e,o){return!1}};function vd({data:t}){return new it({data:t})}var Md=y(()=>({nodes:[it]}));import{$setBlocksType as Bi}from"@lexical/selection";import{$createParagraphNode as Hi,$getSelection as ji,$isParagraphNode as $i,$isRangeSelection as Dd}from"lexical";var Pi=[J([{ChildComponent:Ye,isActive:({selection:t})=>{if(!Dd(t))return!1;for(let e of t.getNodes())if(!$i(e)&&!$i(e.getParent()))return!1;return!0},key:"paragraph",label:({i18n:t})=>t.t("lexical:paragraph:label2"),onSelect:({editor:t})=>{t.update(()=>{let e=ji();Bi(e,()=>Hi())})},order:1}])],Ad=y({slashMenu:{groups:[K([{Icon:Ye,key:"paragraph",keywords:["normal","paragraph","p","text"],label:({i18n:t})=>t.t("lexical:paragraph:label"),onSelect:({editor:t})=>{t.update(()=>{let e=ji();Bi(e,()=>Hi())})}}])]},toolbarFixed:{groups:Pi},toolbarInline:{groups:Pi}});import{$isNodeSelection as am}from"lexical";import{jsx as lt,jsxs as Od}from"react/jsx-runtime";import"react";var $o=()=>Od("svg",{"aria-hidden":"true",className:"icon",fill:"none",focusable:"false",height:"20",viewBox:"0 0 20 20",width:"20",xmlns:"http://www.w3.org/2000/svg",children:[lt("g",{clipPath:"url(#clip0_4397_10817)",children:lt("path",{d:"M7.75 12.25L15.25 4.75M15.25 4.75H11.5M15.25 4.75V8.5M13 11.5V13.75C13 14.5784 12.3284 15.25 11.5 15.25H6.25C5.42157 15.25 4.75 14.5784 4.75 13.75V8.5C4.75 7.67157 5.42157 7 6.25 7H8.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"})}),lt("defs",{children:lt("clipPath",{id:"clip0_4397_10817",children:lt("rect",{fill:"currentColor",height:"12",transform:"translate(4 4)",width:"12"})})})]});import{c as Xd}from"react/compiler-runtime";import{jsx as Jd}from"react/jsx-runtime";import{useLexicalComposerContext as qd}from"@lexical/react/LexicalComposerContext.js";import{$insertNodeToNearestRoot as Qd}from"@lexical/utils";import{useConfig as em}from"@payloadcms/ui";import{$getPreviousSelection as tm,$getSelection as om,$isParagraphNode as zi,$isRangeSelection as rm,COMMAND_PRIORITY_EDITOR as nm,createCommand as im}from"lexical";import{useEffect as lm}from"react";import{c as Vd}from"react/compiler-runtime";import{jsx as Ot}from"react/jsx-runtime";import{useLexicalComposerContext as Kd}from"@lexical/react/LexicalComposerContext.js";import{$getNodeByKey as zd,COMMAND_PRIORITY_EDITOR as Zd}from"lexical";import{useEffect as Wi,useState as Ui}from"react";import{c as Fd}from"react/compiler-runtime";import{jsx as $d}from"react/jsx-runtime";import{useLexicalComposerContext as Pd}from"@lexical/react/LexicalComposerContext";import{useListDrawer as Bd,useModal as Hd}from"@payloadcms/ui";import{$getPreviousSelection as jd,$getSelection as Gd,$setSelection as Wd}from"lexical";import{useEffect as Ud,useState as Gi}from"react";var At=t=>{let e=Fd(23),[o]=Pd(),[r,n]=Gi(null),[i,l]=Gi(!1),[s,a,d]=Bd(t),{closeDrawer:c,drawerSlug:u,isDrawerOpen:m,openDrawer:p}=d,{modalState:f}=Hd(),h;e[0]===Symbol.for("react.memo_cache_sentinel")?(h=()=>{let k=Gd()??jd();n(k)},e[0]=h):h=e[0];let g=h,T;e[1]!==r||e[2]!==o?(T=()=>{r&&o.update(()=>{Wd(r.clone())},{discrete:!0,skipTransforms:!0})},e[1]=r,e[2]=o,e[3]=T):T=e[3];let M=T,A;e[4]!==c?(A=()=>{c()},e[4]=c,e[5]=A):A=e[5];let C=A,w,x;e[6]!==i||e[7]!==f||e[8]!==u||e[9]!==M?(w=()=>{if(!i)return;let k=f[u];k&&!k?.isOpen&&(l(!1),setTimeout(()=>{M()},1))},x=[f,u,M,i],e[6]=i,e[7]=f,e[8]=u,e[9]=M,e[10]=w,e[11]=x):(w=e[10],x=e[11]),Ud(w,x);let N;e[12]!==a?(N=k=>$d(a,{...k,onClick:()=>{g()}}),e[12]=a,e[13]=N):N=e[13];let S;e[14]!==p?(S=()=>{g(),p(),l(!0)},e[14]=p,e[15]=S):S=e[15];let E;return e[16]!==C||e[17]!==m||e[18]!==s||e[19]!==u||e[20]!==N||e[21]!==S?(E={closeListDrawer:C,isListDrawerOpen:m,ListDrawer:s,listDrawerSlug:u,ListDrawerToggler:N,openListDrawer:S},e[16]=C,e[17]=m,e[18]=s,e[19]=u,e[20]=N,e[21]=S,e[22]=E):E=e[22],E};var Yd=({editor:t,relationTo:e,replaceNodeKey:o,value:r})=>{o?t.update(()=>{let n=zd(o);n&&n.replace(Ve({relationTo:e,value:r}))}):t.dispatchCommand(Po,{relationTo:e,value:r})},Vi=t=>{let e=Vd(21),{enabledCollectionSlugs:o}=t,[r]=Kd(),n;e[0]!==o?(n=()=>o?.[0],e[0]=o,e[1]=n):n=e[1];let[i,l]=Ui(n),[s,a]=Ui(null),d=o||void 0,c;e[2]!==d||e[3]!==i?(c={collectionSlugs:d,selectedCollection:i},e[2]=d,e[3]=i,e[4]=c):c=e[4];let{closeListDrawer:u,isListDrawerOpen:m,ListDrawer:p,openListDrawer:f}=At(c),h,g;e[5]!==r||e[6]!==f?(h=()=>r.registerCommand(We,x=>(a(x?.replace?x?.replace.nodeKey:null),f(),!0),Zd),g=[r,f],e[5]=r,e[6]=f,e[7]=h,e[8]=g):(h=e[7],g=e[8]),Wi(h,g);let T;e[9]!==r||e[10]!==s||e[11]!==u?(T=x=>{let{collectionSlug:N,docID:S}=x;Yd({editor:r,relationTo:N,replaceNodeKey:s,value:S}),u()},e[9]=r,e[10]=s,e[11]=u,e[12]=T):T=e[12];let M=T,A;e[13]!==o?(A=()=>{l(o?.[0])},e[13]=o,e[14]=A):A=e[14];let C;e[15]!==m||e[16]!==o?(C=[m,o],e[15]=m,e[16]=o,e[17]=C):C=e[17],Wi(A,C);let w;return e[18]!==M||e[19]!==p?(w=Ot(p,{onSelect:M}),e[18]=M,e[19]=p,e[20]=w):w=e[20],w},Ki=t=>(t?.enabledCollectionSlugs?.length??-1)>0?Ot(Vi,{...t}):Ot(ht,{...t,children:Ot(Vi,{...t})});var Po=im("INSERT_RELATIONSHIP_COMMAND"),Zi=t=>{let e=Xd(10),{clientProps:o}=t,[r]=qd(),{config:n}=em(),{collections:i}=n,l=null;if(o?.enabledCollections)l=o?.enabledCollections;else if(o?.disabledCollections){let c;if(e[0]!==o||e[1]!==i){let u;e[3]!==o?(u=m=>{let{slug:p}=m;return!o?.disabledCollections?.includes(p)},e[3]=o,e[4]=u):u=e[4],c=i.filter(u).map(sm),e[0]=o,e[1]=i,e[2]=c}else c=e[2];l=c}let s,a;e[5]!==r?(s=()=>{if(!r.hasNodes([Ue]))throw new Error("RelationshipPlugin: RelationshipNode not registered on editor");return r.registerCommand(Po,c=>{let u=om()||tm();if(rm(u)){let m=Ve(c);Qd(m);let{focus:p}=u,f=p.getNode();zi(f)&&f.getTextContentSize()===0&&f.getParentOrThrow().getChildren().filter(h=>zi(h)).length>1&&f.remove()}return!0},nm)},a=[r],e[5]=r,e[6]=s,e[7]=a):(s=e[6],a=e[7]),lm(s,a);let d;return e[8]!==l?(d=Jd(Ki,{enabledCollectionSlugs:l}),e[8]=l,e[9]=d):d=e[9],d};function sm(t){let{slug:e}=t;return e}var cm=y({nodes:[Ue],plugins:[{Component:Zi,position:"normal"}],slashMenu:{groups:[K([{Icon:$o,key:"relationship",keywords:["relationship","relation","rel"],label:({i18n:t})=>t.t("lexical:relationship:label"),onSelect:({editor:t})=>{t.dispatchCommand(We,{replace:!1})}}])]},toolbarFixed:{groups:[ue([{ChildComponent:$o,isActive:({selection:t})=>{if(!am(t)||!t.getNodes().length)return!1;let e=t.getNodes()[0];return no(e)},key:"relationship",label:({i18n:t})=>t.t("lexical:relationship:label"),onSelect:({editor:t})=>{t.dispatchCommand(We,{replace:!1})}}])]}});import{c as tl}from"react/compiler-runtime";import{jsx as ne,jsxs as Em}from"react/jsx-runtime";import{useLexicalComposerContext as Nm}from"@lexical/react/LexicalComposerContext.js";import{useScrollInfo as km,useThrottledEffect as Lm,useTranslation as Im}from"@payloadcms/ui";import*as he from"react";import{useMemo as Sm}from"react";import{jsx as um}from"react/jsx-runtime";import{mergeRegister as dm}from"@lexical/utils";import{$getSelection as mm}from"lexical";import{useCallback as pm,useEffect as Ft,useState as Bo}from"react";var Ho="toolbar-popup__button",st=({children:t,editor:e,item:o})=>{let[r,n]=Bo(!0),[i,l]=Bo(!1),[s,a]=Bo(Ho),d=B(),c=pm(()=>{e.getEditorState().read(()=>{let u=mm();if(u){if(o.isActive){let m=o.isActive({editor:e,editorConfigContext:d,selection:u});i!==m&&l(m)}if(o.isEnabled){let m=o.isEnabled({editor:e,editorConfigContext:d,selection:u});r!==m&&n(m)}}})},[i,e,d,r,o]);return Ft(()=>{c()},[c]),Ft(()=>(document.addEventListener("mouseup",c),()=>{document.removeEventListener("mouseup",c)}),[c]),Ft(()=>dm(e.registerUpdateListener(()=>{c()})),[e,c]),Ft(()=>{a([Ho,r===!1?"disabled":"",i?"active":"",o?.key?`${Ho}-`+o.key:""].filter(Boolean).join(" "))},[r,i,s,o.key]),um("button",{className:s,onClick:()=>{if(r!==!1)return e._updateTags=new Set(["toolbar",...e._updateTags]),e.focus(()=>{o.onSelect?.({editor:e,isActive:i})}),!0},onMouseDown:u=>{u.preventDefault()},type:"button",children:t})};import{c as el}from"react/compiler-runtime";import{jsx as Pe}from"react/jsx-runtime";import Wo,{useEffect as Qi}from"react";import{mergeRegister as bm}from"@lexical/utils";import{useTranslation as _m}from"@payloadcms/ui";import{$getSelection as Tm}from"lexical";import{jsx as we,jsxs as Yi}from"react/jsx-runtime";import{Button as fm}from"@payloadcms/ui";import $t,{useCallback as hm,useEffect as at,useMemo as gm,useRef as Go,useState as Pt}from"react";import{createPortal as Cm}from"react-dom";var jo="toolbar-popup__dropdown-item",Xi=$t.createContext(null);function Ji({active:t,children:e,editor:o,enabled:r,Icon:n,item:i,tooltip:l}){let[s,a]=Pt(jo);at(()=>{a([jo,r===!1?"disabled":"",t?"active":"",i?.key?`${jo}-${i.key}`:""].filter(Boolean).join(" "))},[r,t,s,i.key]);let d=Go(null),c=$t.useContext(Xi);if(c===null)throw new Error("DropDownItem must be used within a DropDown");let{registerItem:u}=c;return at(()=>{d?.current!=null&&u(d)},[d,u]),we(fm,{"aria-label":l,buttonStyle:"none",className:s,disabled:r===!1,icon:n,iconPosition:"left",iconStyle:"none",onClick:()=>{r!==!1&&(o._updateTags=new Set(["toolbar",...o._updateTags]),o.focus(()=>{i.onSelect?.({editor:o,isActive:t})}))},onMouseDown:m=>{m.preventDefault()},ref:d,tooltip:l,type:"button",children:e})}function xm({children:t,dropDownRef:e,itemsContainerClassNames:o,onClose:r}){let[n,i]=Pt(),[l,s]=Pt(),a=hm(u=>{i(m=>m!=null?[...m,u]:[u])},[i]),d=u=>{if(n==null)return;let{key:m}=u;["ArrowDown","ArrowUp","Escape","Tab"].includes(m)&&u.preventDefault(),m==="Escape"||m==="Tab"?r():m==="ArrowUp"?s(p=>{if(p==null)return n[0];let f=n.indexOf(p)-1;return n[f===-1?n.length-1:f]}):m==="ArrowDown"&&s(p=>p==null?n[0]:n[n.indexOf(p)+1])},c=gm(()=>({registerItem:a}),[a]);return at(()=>{n!=null&&l==null&&s(n[0]),l!=null&&l?.current!=null&&l.current.focus()},[n,l]),we(Xi.Provider,{value:c,children:we("div",{className:(o??["toolbar-popup__dropdown-items"]).join(" "),onKeyDown:d,ref:e,children:t})})}function qi({buttonAriaLabel:t,buttonClassName:e,children:o,disabled:r=!1,Icon:n,itemsContainerClassNames:i,label:l,stopCloseOnClickSelf:s}){let a=Go(null),d=Go(null),[c,u]=Pt(!1),m=()=>{u(!1),d?.current!=null&&d.current.focus()};at(()=>{let f=d.current,h=a.current;if(c&&f!==null&&h!==null){let{left:g,top:T}=f.getBoundingClientRect(),M=window.scrollY||document.documentElement.scrollTop;h.style.top=`${T+M+f.offsetHeight+5}px`,h.style.left=`${Math.min(g-5,window.innerWidth-h.offsetWidth-20)}px`}},[a,d,c]),at(()=>{let f=d.current;if(f!==null&&c){let h=g=>{let{target:T}=g;s!=null&&a.current!=null&&a.current.contains(T)||f.contains(T)||u(!1)};return document.addEventListener("click",h),()=>{document.removeEventListener("click",h)}}},[a,d,c,s]);let p=Cm(we(xm,{dropDownRef:a,itemsContainerClassNames:i,onClose:m,children:o}),document.body);return Yi($t.Fragment,{children:[Yi("button",{"aria-label":t,className:e+(c?" active":""),disabled:r,onClick:f=>{f.preventDefault(),u(!c)},onMouseDown:f=>{f.preventDefault()},ref:d,type:"button",children:[n&&we(n,{}),l&&we("span",{className:"toolbar-popup__dropdown-label",children:l}),we("i",{className:"toolbar-popup__dropdown-caret"})]}),c&&we($t.Fragment,{children:p})]})}var Uo="toolbar-popup__dropdown",wm=t=>{let e=el(18),{active:o,anchorElem:r,editor:n,enabled:i,item:l}=t,{i18n:s}=_m(),{fieldProps:a}=B(),{featureClientSchemaMap:d,schemaPath:c}=a;if(l.Component){let f;return e[0]!==l||e[1]!==o||e[2]!==r||e[3]!==n||e[4]!==i?(f=l?.Component&&Pe(l.Component,{active:o,anchorElem:r,editor:n,enabled:i,item:l},l.key),e[0]=l,e[1]=o,e[2]=r,e[3]=n,e[4]=i,e[5]=f):f=e[5],f}let u=l.key,m;if(l.label){let f;e[6]!==l||e[7]!==d||e[8]!==s||e[9]!==c?(f=typeof l.label=="function"?l.label({featureClientSchemaMap:d,i18n:s,schemaPath:c}):l.label,e[6]=l,e[7]=d,e[8]=s,e[9]=c,e[10]=f):f=e[10],u=f}u.length>25?m=u.substring(0,25)+"...":m=u;let p;return e[11]!==l||e[12]!==m||e[13]!==o||e[14]!==n||e[15]!==i||e[16]!==u?(p=Pe(Ji,{active:o,editor:n,enabled:i,Icon:l?.ChildComponent?Pe(l.ChildComponent,{}):void 0,item:l,tooltip:u,children:Pe("span",{className:"text",children:m})},l.key),e[11]=l,e[12]=m,e[13]=o,e[14]=n,e[15]=i,e[16]=u,e[17]=p):p=e[17],p},Se=t=>{let e=el(42),{anchorElem:o,classNames:r,editor:n,group:i,Icon:l,itemsContainerClassNames:s,label:a,maxActiveItems:d,onActiveChange:c}=t,u;e[0]===Symbol.for("react.memo_cache_sentinel")?(u=[],e[0]=u):u=e[0];let[m,p]=Wo.useState(u),f;e[1]===Symbol.for("react.memo_cache_sentinel")?(f=[],e[1]=f):f=e[1];let[h,g]=Wo.useState(f),[T,M]=Wo.useState(!0),A=B(),{items:C,key:w}=i,x;e[2]!==n||e[3]!==C||e[4]!==d||e[5]!==A||e[6]!==i||e[7]!==c?(x=()=>{n.getEditorState().read(()=>{let $=Tm();if(!$)return;let j=[],Q=[],W=[];for(let G of C)G.isActive&&(!d||j.length<d)&&G.isActive({editor:n,editorConfigContext:A,selection:$})&&(j.push(G.key),Q.push(G)),G.isEnabled?G.isEnabled({editor:n,editorConfigContext:A,selection:$})&&W.push(G.key):W.push(G.key);i.isEnabled&&M(i.isEnabled({editor:n,editorConfigContext:A,selection:$})),p(j),g(W),c&&c({activeItems:Q})})},e[2]=n,e[3]=C,e[4]=d,e[5]=A,e[6]=i,e[7]=c,e[8]=x):x=e[8];let N=x,S,E;e[9]!==N?(S=()=>{N()},E=[N],e[9]=N,e[10]=S,e[11]=E):(S=e[10],E=e[11]),Qi(S,E);let k,I;e[12]!==n||e[13]!==N?(k=()=>bm(n.registerUpdateListener(()=>{N()})),I=[n,N],e[12]=n,e[13]=N,e[14]=k,e[15]=I):(k=e[14],I=e[15]),Qi(k,I);let b=`${w} dropdown`,_=`${Uo}-${w}`,R;e[16]!==r?(R=r||[],e[16]=r,e[17]=R):R=e[17];let L;e[18]!==_||e[19]!==R?(L=[Uo,_,...R].filter(Boolean),e[18]=_,e[19]=R,e[20]=L):L=e[20];let D=L.join(" "),v=!T,O;e[21]!==s?(O=s||[],e[21]=s,e[22]=O):O=e[22];let H;if(e[23]!==O||e[24]!==C||e[25]!==m||e[26]!==o||e[27]!==n||e[28]!==h||e[29]!==b||e[30]!==D||e[31]!==v||e[32]!==l||e[33]!==a||e[34]!==w){let $;e[36]!==C||e[37]!==m||e[38]!==o||e[39]!==n||e[40]!==h?($=C.length&&C.map(j=>Pe(wm,{active:m.includes(j.key),anchorElem:o,editor:n,enabled:h.includes(j.key),item:j},j.key)),e[36]=C,e[37]=m,e[38]=o,e[39]=n,e[40]=h,e[41]=$):$=e[41],H=Pe(qi,{buttonAriaLabel:b,buttonClassName:D,disabled:v,Icon:l,itemsContainerClassNames:[`${Uo}-items`,...O],label:a,children:$},w),e[23]=O,e[24]=C,e[25]=m,e[26]=o,e[27]=n,e[28]=h,e[29]=b,e[30]=D,e[31]=v,e[32]=l,e[33]=a,e[34]=w,e[35]=H}else H=e[35];return H};function Rm({anchorElem:t,editor:e,item:o}){return o.Component?o?.Component&&ne(o.Component,{anchorElem:t,editor:e,item:o},o.key):o.ChildComponent?ne(st,{editor:e,item:o,children:ne(o.ChildComponent,{})},o.key):null}function ym(t){let e=tl(26),{anchorElem:o,editor:r,editorConfig:n,group:i,index:l}=t,{i18n:s}=Im(),{fieldProps:a}=B(),{featureClientSchemaMap:d,schemaPath:c}=a,[u,m]=he.useState(void 0),[p,f]=he.useState(void 0),h,g;e[0]!==i?(h=()=>{i?.type==="dropdown"&&i.items.length&&i.ChildComponent?f(()=>i.ChildComponent):f(void 0)},g=[i],e[0]=i,e[1]=h,e[2]=g):(h=e[1],g=e[2]),he.useEffect(h,g);let T;e[3]!==i||e[4]!==d||e[5]!==s||e[6]!==c?(T=N=>{let{activeItems:S}=N;if(!S.length){i?.type==="dropdown"&&i.items.length&&i.ChildComponent?(f(()=>i.ChildComponent),m(void 0)):(f(void 0),m(void 0));return}let E=S[0],k=E.key;E.label&&(k=typeof E.label=="function"?E.label({featureClientSchemaMap:d,i18n:s,schemaPath:c}):E.label),k.length>25&&(k=k.substring(0,25)+"..."),m(k),f(()=>E.ChildComponent)},e[3]=i,e[4]=d,e[5]=s,e[6]=c,e[7]=T):T=e[7];let M=T,A=`fixed-toolbar__group fixed-toolbar__group-${i.key}`,C;e[8]!==i||e[9]!==p||e[10]!==o||e[11]!==r||e[12]!==u||e[13]!==M?(C=i.type==="dropdown"&&i.items.length&&(p?ne(Se,{anchorElem:o,editor:r,group:i,Icon:p,itemsContainerClassNames:["fixed-toolbar__dropdown-items"],label:u,maxActiveItems:1,onActiveChange:M}):ne(Se,{anchorElem:o,editor:r,group:i,itemsContainerClassNames:["fixed-toolbar__dropdown-items"],label:u,maxActiveItems:1,onActiveChange:M})),e[8]=i,e[9]=p,e[10]=o,e[11]=r,e[12]=u,e[13]=M,e[14]=C):C=e[14];let w;e[15]!==i||e[16]!==o||e[17]!==r?(w=i.type==="buttons"&&i.items.length&&i.items.map(N=>ne(Rm,{anchorElem:o,editor:r,item:N},N.key)),e[15]=i,e[16]=o,e[17]=r,e[18]=w):w=e[18];let x;return e[19]!==n.features.toolbarFixed||e[20]!==l||e[21]!==C||e[22]!==w||e[23]!==A||e[24]!==i.key?(x=Em("div",{className:A,children:[C,w,l<n.features.toolbarFixed?.groups.length-1&&ne("div",{className:"divider"})]},i.key),e[19]=n.features.toolbarFixed,e[20]=l,e[21]=C,e[22]=w,e[23]=A,e[24]=i.key,e[25]=x):x=e[25],x}function vm({anchorElem:t,clientProps:e,editor:o,editorConfig:r,parentWithFixedToolbar:n}){let i=he.useRef(null),{y:l}=km(),s=Sm(()=>{if(!n||e?.disableIfParentHasFixedToolbar)return null;let d=n.editorContainerRef.current.previousElementSibling;for(;d;){if(d.classList.contains("fixed-toolbar"))return d;d=d.previousElementSibling}return null},[e?.disableIfParentHasFixedToolbar,n]);return Lm(()=>{if(!s)return;let a=i.current;if(!a)return;let d=a.getBoundingClientRect(),c=s.getBoundingClientRect();if(!(d.bottom<c.top||d.top>c.bottom))a.className="fixed-toolbar fixed-toolbar--overlapping",s.className="fixed-toolbar fixed-toolbar--hide";else{if(!a.classList.contains("fixed-toolbar--overlapping"))return;a.className="fixed-toolbar",s.className="fixed-toolbar"}},50,[i,s,l]),ne("div",{className:"fixed-toolbar",onFocus:a=>{a.stopPropagation()},ref:i,children:o.isEditable()&&ne(he.Fragment,{children:r?.features&&r.features?.toolbarFixed?.groups.map((a,d)=>ne(ym,{anchorElem:t,editor:o,editorConfig:r,group:a,index:d},a.key))})})}var ol=t=>{if(t.parentEditor?.editorConfig){if(t.parentEditor?.editorConfig.resolvedFeatureMap.has("toolbarFixed"))return t.parentEditor;if(t.parentEditor)return ol(t.parentEditor)}return!1},rl=t=>{let e=tl(7),{anchorElem:o,clientProps:r}=t,[n]=Nm(),i=B(),{editorConfig:l}=i,s=r.applyToFocusedEditor&&i.focusedEditor?.editor||n,a=r.applyToFocusedEditor&&i.focusedEditor?.editorConfig||l,d,c;if(e[0]!==i||e[1]!==r?.disableIfParentHasFixedToolbar||e[2]!==a||e[3]!==o||e[4]!==s){c=Symbol.for("react.early_return_sentinel");e:{let u=ol(i);if(r?.disableIfParentHasFixedToolbar&&u){c=null;break e}if(!a?.features?.toolbarFixed?.groups?.length){c=null;break e}d=ne(vm,{anchorElem:o,editor:s,editorConfig:a,parentWithFixedToolbar:u})}e[0]=i,e[1]=r?.disableIfParentHasFixedToolbar,e[2]=a,e[3]=o,e[4]=s,e[5]=d,e[6]=c}else d=e[5],c=e[6];return c!==Symbol.for("react.early_return_sentinel")?c:d};var Mm=y({plugins:[{Component:rl,position:"aboveContainer"}]});import{c as ll}from"react/compiler-runtime";import{jsx as le,jsxs as sl}from"react/jsx-runtime";import{useLexicalComposerContext as Dm}from"@lexical/react/LexicalComposerContext.js";import{mergeRegister as al}from"@lexical/utils";import{$getSelection as cl,$isRangeSelection as nl,$isTextNode as Am,COMMAND_PRIORITY_LOW as Om,SELECTION_CHANGE_COMMAND as Fm}from"lexical";import{useCallback as Ht,useEffect as ct,useRef as il,useState as $m}from"react";import*as jt from"react";import{createPortal as Pm}from"react-dom";function Vo(t,e){let o=t.getRangeAt(0),r;if(t.anchorNode===e){let n=e;for(;n.firstElementChild!=null;)n=n.firstElementChild;r=n.getBoundingClientRect()}else r=o.getBoundingClientRect();return r}function Bt(t){let{alwaysDisplayOnTop:e=!1,anchorElem:o,anchorFlippedOffset:r=0,floatingElem:n,horizontalOffset:i=32,horizontalPosition:l="left",specialHandlingForCaret:s=!1,targetRect:a,verticalGap:d=10}=t,c=o.parentElement;if(a===null||c==null){n.style.opacity="0",n.style.transform="translate(-10000px, -10000px)";return}let u=n.getBoundingClientRect(),m=o.getBoundingClientRect(),p=c.getBoundingClientRect(),f=a.top-u.height-d,h=a.left-i;l==="center"&&(h=a.left+a.width/2-u.width/2);let g=0;return!e&&f<p.top&&!s&&(g=u.height+a.height+d*2,f+=g),l==="center"?h+u.width>p.right?h=p.right-u.width-i:h<p.left&&(h=p.left+i):h+u.width>p.right&&(h=p.right-u.width-i),h-=m.left,n.style.opacity="1",s&&r!==0?(f-=m.bottom-r+u.height-3,n.style.transform=`translate(${h}px, ${f}px) rotate(180deg)`):(f-=m.top,n.style.transform=`translate(${h}px, ${f}px)`),g}function Bm({anchorElem:t,editor:e,item:o}){return o.Component?o?.Component&&le(o.Component,{anchorElem:t,editor:e,item:o},o.key):o.ChildComponent?le(st,{editor:e,item:o,children:le(o.ChildComponent,{})},o.key):null}function Hm(t){let e=ll(22),{anchorElem:o,editor:r,group:n,index:i}=t,{editorConfig:l}=B(),[s,a]=jt.useState(),d,c;e[0]!==n?(d=()=>{n?.type==="dropdown"&&n.items.length&&n.ChildComponent?a(()=>n.ChildComponent):a(void 0)},c=[n],e[0]=n,e[1]=d,e[2]=c):(d=e[1],c=e[2]),jt.useEffect(d,c);let u;e[3]!==n?(u=T=>{let{activeItems:M}=T;if(!M.length){n?.type==="dropdown"&&n.items.length&&n.ChildComponent?a(()=>n.ChildComponent):a(void 0);return}let A=M[0];a(()=>A.ChildComponent)},e[3]=n,e[4]=u):u=e[4];let m=u,p=`inline-toolbar-popup__group inline-toolbar-popup__group-${n.key}`,f;e[5]!==n||e[6]!==s||e[7]!==o||e[8]!==r||e[9]!==m?(f=n.type==="dropdown"&&n.items.length&&(s?le(Se,{anchorElem:o,editor:r,group:n,Icon:s,maxActiveItems:1,onActiveChange:m}):le(Se,{anchorElem:o,editor:r,group:n,maxActiveItems:1,onActiveChange:m})),e[5]=n,e[6]=s,e[7]=o,e[8]=r,e[9]=m,e[10]=f):f=e[10];let h;e[11]!==n||e[12]!==o||e[13]!==r?(h=n.type==="buttons"&&n.items.length&&n.items.map(T=>le(Bm,{anchorElem:o,editor:r,item:T},T.key)),e[11]=n,e[12]=o,e[13]=r,e[14]=h):h=e[14];let g;return e[15]!==l.features.toolbarInline||e[16]!==i||e[17]!==f||e[18]!==h||e[19]!==p||e[20]!==n.key?(g=sl("div",{className:p,children:[f,h,i<l.features.toolbarInline?.groups.length-1&&le("div",{className:"divider"})]},n.key),e[15]=l.features.toolbarInline,e[16]=i,e[17]=f,e[18]=h,e[19]=p,e[20]=n.key,e[21]=g):g=e[21],g}function jm({anchorElem:t,editor:e}){let o=il(null),r=il(null),{editorConfig:n}=B(),i=Ht(()=>{if(o?.current){let d=o.current.style.opacity==="0",c=o.current.style.pointerEvents==="none";d||(o.current.style.opacity="0"),c||(o.current.style.pointerEvents="none")}},[o]),l=Ht(d=>{if(o?.current&&(d.buttons===1||d.buttons===3)){let c=o.current.style.opacity==="0",u=o.current.style.pointerEvents==="none";if(!c||!u){let m=d.clientX,p=d.clientY,f=document.elementFromPoint(m,p);o.current.contains(f)||i()}}},[i]),s=Ht(()=>{o?.current&&(o.current.style.opacity!=="1"&&(o.current.style.opacity="1"),o.current.style.pointerEvents!=="auto"&&(o.current.style.pointerEvents="auto"))},[]);ct(()=>(document.addEventListener("mousemove",l),document.addEventListener("mouseup",s),()=>{document.removeEventListener("mousemove",l),document.removeEventListener("mouseup",s)}),[o,l,s]);let a=Ht(()=>{let d=cl(),c=window.getSelection();if(o.current===null)return;let u=t.querySelector(":scope > .link-editor"),m=u!==null&&"style"in u&&u?.style?.opacity==="1",p=e.getRootElement();if(d!==null&&c!==null&&!c.isCollapsed&&p!==null&&p.contains(c.anchorNode)){let f=Vo(c,p),h=Bt({alwaysDisplayOnTop:m,anchorElem:t,floatingElem:o.current,horizontalPosition:"center",targetRect:f});r.current&&Bt({anchorElem:o.current,anchorFlippedOffset:h,floatingElem:r.current,horizontalOffset:5,horizontalPosition:"center",specialHandlingForCaret:!0,targetRect:f,verticalGap:8})}else i()},[e,i,t]);return ct(()=>{let d=t.parentElement,c=()=>{e.getEditorState().read(()=>{a()})};return window.addEventListener("resize",c),d&&d.addEventListener("scroll",c),()=>{window.removeEventListener("resize",c),d&&d.removeEventListener("scroll",c)}},[e,a,t]),ct(()=>(e.getEditorState().read(()=>{a()}),al(e.registerUpdateListener(({editorState:d})=>{d.read(()=>{a()})}),e.registerCommand(Fm,()=>(a(),!1),Om))),[e,a]),sl("div",{className:"inline-toolbar-popup",ref:o,children:[le("div",{className:"caret",ref:r}),n?.features&&n.features?.toolbarInline?.groups.map((d,c)=>le(Hm,{anchorElem:t,editor:e,group:d,index:c},d.key))]})}function Gm(t,e){let o=ll(12),[r,n]=$m(!1),i;o[0]!==t?(i=()=>{t.getEditorState().read(()=>{if(t.isComposing())return;let m=cl(),p=window.getSelection(),f=t.getRootElement();if(p!==null&&(!nl(m)||f===null||!f.contains(p.anchorNode))){n(!1);return}if(!nl(m))return;if(m.getTextContent()!==""){let g=m.getNodes(),T=!1;for(let M of g)if(Am(M)){n(!0),T=!0;break}T||n(!1)}else n(!1);let h=m.getTextContent().replace(/\n/g,"");if(!m.isCollapsed()&&h===""){n(!1);return}})},o[0]=t,o[1]=i):i=o[1];let l=i,s,a;o[2]!==l?(s=()=>(document.addEventListener("selectionchange",l),document.addEventListener("mouseup",l),()=>{document.removeEventListener("selectionchange",l),document.removeEventListener("mouseup",l)}),a=[l],o[2]=l,o[3]=s,o[4]=a):(s=o[3],a=o[4]),ct(s,a);let d,c;if(o[5]!==t||o[6]!==l?(d=()=>al(t.registerUpdateListener(()=>{l()}),t.registerRootListener(()=>{t.getRootElement()===null&&n(!1)})),c=[t,l],o[5]=t,o[6]=l,o[7]=d,o[8]=c):(d=o[7],c=o[8]),ct(d,c),!r||!t.isEditable())return null;let u;return o[9]!==e||o[10]!==t?(u=Pm(le(jm,{anchorElem:e,editor:t}),e),o[9]=e,o[10]=t,o[11]=u):u=o[11],u}var ul=t=>{let{anchorElem:e}=t,[o]=Dm();return Gm(o,e)};var Wm=y({plugins:[{Component:ul,position:"floatingAnchorElem"}]});import{TableCellNode as Ef,TableNode as Nf,TableRowNode as kf}from"@lexical/table";import{jsx as dl}from"react/jsx-runtime";import"react";var Ko=()=>dl("svg",{className:"icon",fill:"none",height:"20",viewBox:"0 0 20 20",width:"20",xmlns:"http://www.w3.org/2000/svg",children:dl("path",{clipRule:"evenodd",d:"M5.33333 4.5C4.8731 4.5 4.5 4.8731 4.5 5.33333V7.5H9.5V4.5H5.33333ZM5.33333 3.5C4.32081 3.5 3.5 4.32081 3.5 5.33333V14.6667C3.5 15.6792 4.32081 16.5 5.33333 16.5H14.6667C15.6792 16.5 16.5 15.6792 16.5 14.6667V5.33333C16.5 4.32081 15.6792 3.5 14.6667 3.5H5.33333ZM10.5 4.5V7.5H15.5V5.33333C15.5 4.8731 15.1269 4.5 14.6667 4.5H10.5ZM15.5 8.5H10.5V11.5H15.5V8.5ZM15.5 12.5H10.5V15.5H14.6667C15.1269 15.5 15.5 15.1269 15.5 14.6667V12.5ZM9.5 15.5V12.5H4.5V14.6667C4.5 15.1269 4.8731 15.5 5.33333 15.5H9.5ZM4.5 11.5H9.5V8.5H4.5V11.5Z",fill:"currentColor",fillRule:"evenodd"})});import{$convertFromMarkdownString as Um,$convertToMarkdownString as Vm}from"@lexical/markdown";import{$createTableCellNode as Km,$createTableNode as zm,$createTableRowNode as Zm,$isTableCellNode as ml,$isTableNode as zo,$isTableRowNode as Zo,TableCellHeaderStates as Gt,TableCellNode as Ym,TableNode as Xm,TableRowNode as Jm}from"@lexical/table";import{$isParagraphNode as qm,$isTextNode as Qm}from"lexical";var fl=/^\|(.+)\|\s?$/,ep=/^(\| ?:?-*:? ?)+\|\s?$/,hl=({allTransformers:t})=>({type:"element",dependencies:[Xm,Jm,Ym],export:e=>{if(!zo(e))return null;let o=[];for(let r of e.getChildren()){let n=[];if(!Zo(r))continue;let i=!1;for(let l of r.getChildren())ml(l)&&(n.push(Vm(t,l).replace(/\n/g,"\\n")),l.__headerState===Gt.ROW&&(i=!0));o.push(`| ${n.join(" | ")} |`),i&&o.push(`| ${n.map(l=>"---").join(" | ")} |`)}return o.join(`
|
|
36
|
+
`)},regExp:fl,replace:(e,o,r)=>{if(ep.test(r[0])){let c=e.getPreviousSibling();if(!c||!zo(c))return;let u=c.getChildren(),m=u[u.length-1];if(!m||!Zo(m))return;m.getChildren().forEach(p=>{ml(p)&&p.setHeaderStyles(Gt.ROW,Gt.ROW)}),e.remove();return}let n=pl(r[0],t);if(n==null)return;let i=[n],l=e.getPreviousSibling(),s=n.length;for(;l&&!(!qm(l)||l.getChildrenSize()!==1);){let c=l.getFirstChild();if(!Qm(c))break;let u=pl(c.getTextContent(),t);if(u==null)break;s=Math.max(s,u.length),i.unshift(u);let m=l.getPreviousSibling();l.remove(),l=m}let a=zm();for(let c of i){let u=Zm();a.append(u);for(let m=0;m<s;m++)u.append(m<c.length?c[m]:gl("",t))}let d=e.getPreviousSibling();zo(d)&&tp(d)===s?(d.append(...a.getChildren()),e.remove()):e.replace(a),a.selectEnd()}});function tp(t){let e=t.getFirstChild();return Zo(e)?e.getChildrenSize():0}var gl=(t,e)=>{t=t.replace(/\\n/g,`
|
|
37
|
+
`);let o=Km(Gt.NO_STATUS);return Um(t,e,o),o},pl=(t,e)=>{let o=t.match(fl);return!o||!o[1]?null:o[1].split("|").map(r=>gl(r,e))};import{c as rp}from"react/compiler-runtime";import{jsx as P,jsxs as ge}from"react/jsx-runtime";import{useLexicalComposerContext as _l}from"@lexical/react/LexicalComposerContext";import{useLexicalEditable as np}from"@lexical/react/useLexicalEditable";import{$deleteTableColumn__EXPERIMENTAL as ip,$deleteTableRow__EXPERIMENTAL as lp,$getNodeTriplet as sp,$getTableCellNodeFromLexicalNode as ap,$getTableColumnIndexFromTableCellNode as cp,$getTableNodeFromLexicalNodeOrThrow as ut,$getTableRowIndexFromTableCellNode as up,$insertTableColumn__EXPERIMENTAL as dp,$insertTableRow__EXPERIMENTAL as mp,$isTableCellNode as Wt,$isTableRowNode as xl,$isTableSelection as Vt,$unmergeCell as pp,getTableObserverFromTableElement as fp,TableCellHeaderStates as Ee,TableCellNode as hp}from"@lexical/table";import{useScrollInfo as gp}from"@payloadcms/ui";import{$createParagraphNode as Cp,$getRoot as xp,$getSelection as Kt,$isElementNode as bp,$isParagraphNode as Tl,$isRangeSelection as Jo,$isTextNode as _p}from"lexical";import*as qo from"react";import{useCallback as se,useEffect as Re,useRef as Ut,useState as Be}from"react";import{createPortal as wl}from"react-dom";import{jsx as Yo,jsxs as op}from"react/jsx-runtime";import"react";var Cl=()=>op("svg",{fill:"none",height:"18",viewBox:"0 0 20 20",width:"18",xmlns:"http://www.w3.org/2000/svg",children:[Yo("path",{d:"M5 11C5.55228 11 6 10.5523 6 10C6 9.44772 5.55228 9 5 9C4.44772 9 4 9.44772 4 10C4 10.5523 4.44772 11 5 11Z",fill:"currentColor"}),Yo("path",{d:"M10 11C10.5523 11 11 10.5523 11 10C11 9.44772 10.5523 9 10 9C9.44772 9 9 9.44772 9 10C9 10.5523 9.44772 11 10 11Z",fill:"currentColor"}),Yo("path",{d:"M15 11C15.5523 11 16 10.5523 16 10C16 9.44772 15.5523 9 15 9C14.4477 9 14 9.44772 14 10C14 10.5523 14.4477 11 15 11Z",fill:"currentColor"})]});function Xo(t){let e=t.getShape();return{columns:e.toX-e.fromX+1,rows:e.toY-e.fromY+1}}function Tp(){let t=Kt();if(Jo(t)&&!t.isCollapsed()||Vt(t)&&!t.anchor.is(t.focus)||!Jo(t)&&!Vt(t))return!1;let[e]=sp(t.anchor);return e.__colSpan>1||e.__rowSpan>1}function bl(t){if(t.getChildrenSize()!==1)return!1;let e=t.getFirstChildOrThrow();return!(!Tl(e)||!e.isEmpty())}function wp(t){let e=t.getLastDescendant();_p(e)?e.select():bp(e)?e.selectEnd():e!==null&&e.selectNext()}function Ep({cellMerge:t,contextRef:e,onClose:o,setIsMenuOpen:r,tableCellNode:n}){let[i]=_l(),l=Ut(null),[s,a]=Be(n),[d,c]=Be({columns:1,rows:1}),[u,m]=Be(!1),[p,f]=Be(!1),{y:h}=gp();Re(()=>i.registerMutationListener(hp,b=>{b.get(s.getKey())==="updated"&&i.getEditorState().read(()=>{a(s.getLatest())})},{skipInitialization:!0}),[i,s]),Re(()=>{i.getEditorState().read(()=>{let b=Kt();if(Vt(b)){let _=Xo(b);c(Xo(b)),m(_.columns>1||_.rows>1)}f(Tp())})},[i]),Re(()=>{let b=e.current,_=l.current,R=i.getRootElement();if(b!=null&&_!=null&&R!=null){let L=R.getBoundingClientRect(),D=b.getBoundingClientRect();_.style.opacity="1";let v=_.getBoundingClientRect(),O=5,H=D.right+O;if(H+v.width>window.innerWidth||H+v.width>L.right){let j=D.left-v.width-O;H=(j<0?O:j)+window.pageXOffset}_.style.left=`${H+window.pageXOffset}px`;let $=D.top;if($+v.height>window.innerHeight){let j=D.bottom-v.height;$=(j<0?O:j)+window.pageYOffset}_.style.top=`${$}px`}},[e,l,i,h]),Re(()=>{function b(_){l.current!=null&&e.current!=null&&!l.current.contains(_.target)&&!e.current.contains(_.target)&&r(!1)}return window.addEventListener("click",b),()=>window.removeEventListener("click",b)},[r,e]);let g=se(()=>{i.update(()=>{if(s.isAttached()){let _=ut(s),R=i.getElementByKey(_.getKey());if(!R)throw new Error("Expected to find tableElement in DOM");let L=fp(R);L!==null&&L.clearHighlight(),_.markDirty(),a(s.getLatest())}xp().selectStart()})},[i,s]),T=()=>{i.update(()=>{let b=Kt();if(Vt(b)){let{columns:_,rows:R}=Xo(b),L=b.getNodes(),D=null;for(let v=0;v<L.length;v++){let O=L[v];if(Wt(O))if(D===null){O.setColSpan(_).setRowSpan(R),D=O;let H=bl(O),$;H&&Tl($=O.getFirstChild())&&$.remove()}else Wt(D)&&(bl(O)||D.append(...O.getChildren()),O.remove())}D!==null&&(D.getChildrenSize()===0&&D.append(Cp()),wp(D)),o()}})},M=()=>{i.update(()=>{pp()})},A=se(b=>{i.update(()=>{mp(b),o()})},[i,o]),C=se(b=>{i.update(()=>{for(let _=0;_<d.columns;_++)dp(b);o()})},[i,o,d.columns]),w=se(()=>{i.update(()=>{lp(),o()})},[i,o]),x=se(()=>{i.update(()=>{ut(s).remove(),g(),o()})},[i,s,g,o]),N=se(()=>{i.update(()=>{ip(),o()})},[i,o]),S=se(()=>{i.update(()=>{let b=ut(s),_=up(s),R=b.getChildren();if(_>=R.length||_<0)throw new Error("Expected table cell to be inside of table row.");let L=R[_];if(!xl(L))throw new Error("Expected table row");let D=s.getHeaderStyles()^Ee.ROW;L.getChildren().forEach(v=>{if(!Wt(v))throw new Error("Expected table cell");v.setHeaderStyles(D,Ee.ROW)}),g(),o()})},[i,s,g,o]),E=se(()=>{i.update(()=>{let b=ut(s),_=cp(s),R=b.getChildren(),L=Math.max(...R.map(v=>v.getChildren().length));if(_>=L||_<0)throw new Error("Expected table cell to be inside of table row.");let D=s.getHeaderStyles()^Ee.COLUMN;for(let v=0;v<R.length;v++){let O=R[v];if(!xl(O))throw new Error("Expected table row");let H=O.getChildren();if(_>=H.length)continue;let $=H[_];if(!Wt($))throw new Error("Expected table cell");$.setHeaderStyles(D,Ee.COLUMN)}g(),o()})},[i,s,g,o]),k=se(()=>{i.update(()=>{if(s.isAttached()){let b=ut(s);b&&b.setRowStriping(!b.getRowStriping())}g(),o()})},[i,s,g,o]),I=null;return t&&(u?I=P("button",{className:"item","data-test-id":"table-merge-cells",onClick:()=>T(),type:"button",children:"Merge cells"}):p&&(I=P("button",{className:"item","data-test-id":"table-unmerge-cells",onClick:()=>M(),type:"button",children:"Unmerge cells"}))),wl(ge("div",{className:"table-action-menu-dropdown",onClick:b=>{b.stopPropagation()},ref:l,children:[I?ge(qo.Fragment,{children:[I,P("hr",{})]}):null,P("button",{className:"item","data-test-id":"table-row-striping",onClick:()=>k(),type:"button",children:P("span",{className:"text",children:"Toggle Row Striping"})}),P("button",{className:"item","data-test-id":"table-insert-row-above",onClick:()=>A(!1),type:"button",children:ge("span",{className:"text",children:["Insert ",d.rows===1?"row":`${d.rows} rows`," above"]})}),P("button",{className:"item","data-test-id":"table-insert-row-below",onClick:()=>A(!0),type:"button",children:ge("span",{className:"text",children:["Insert ",d.rows===1?"row":`${d.rows} rows`," below"]})}),P("hr",{}),P("button",{className:"item","data-test-id":"table-insert-column-before",onClick:()=>C(!1),type:"button",children:ge("span",{className:"text",children:["Insert ",d.columns===1?"column":`${d.columns} columns`," ","left"]})}),P("button",{className:"item","data-test-id":"table-insert-column-after",onClick:()=>C(!0),type:"button",children:ge("span",{className:"text",children:["Insert ",d.columns===1?"column":`${d.columns} columns`," ","right"]})}),P("hr",{}),P("button",{className:"item","data-test-id":"table-delete-columns",onClick:()=>N(),type:"button",children:P("span",{className:"text",children:"Delete column"})}),P("button",{className:"item","data-test-id":"table-delete-rows",onClick:()=>w(),type:"button",children:P("span",{className:"text",children:"Delete row"})}),P("button",{className:"item","data-test-id":"table-delete",onClick:()=>x(),type:"button",children:P("span",{className:"text",children:"Delete table"})}),P("hr",{}),P("button",{className:"item",onClick:()=>S(),type:"button",children:ge("span",{className:"text",children:[(s.__headerState&Ee.ROW)===Ee.ROW?"Remove":"Add"," ","row header"]})}),P("button",{className:"item","data-test-id":"table-column-header",onClick:()=>E(),type:"button",children:ge("span",{className:"text",children:[(s.__headerState&Ee.COLUMN)===Ee.COLUMN?"Remove":"Add"," ","column header"]})})]}),document.body)}function Np({anchorElem:t,cellMerge:e}){let[o]=_l(),r=Ut(null),n=Ut(null),[i,l]=Be(!1),[s,a]=Be(null),d=se(()=>{let u=r.current,m=Kt(),p=window.getSelection(),f=document.activeElement;if(m==null||u==null){a(null);return}let h=o.getRootElement();if(Jo(m)&&h!==null&&p!==null&&h.contains(p.anchorNode)){let g=ap(m.anchor.getNode());if(g==null){a(null);return}if(o.getElementByKey(g.getKey())==null){a(null);return}a(g)}else f||a(null)},[o]);Re(()=>o.registerUpdateListener(()=>{o.getEditorState().read(()=>{d()})})),Re(()=>{let u=r.current;if(u!=null&&s!=null){let m=o.getElementByKey(s.getKey());if(m!=null){let p=m.getBoundingClientRect(),f=u.getBoundingClientRect(),h=t.getBoundingClientRect(),g=p.top-h.top+4,T=p.right-f.width-10-h.left;u.style.opacity="1",u.style.transform=`translate(${T}px, ${g}px)`}else u.style.opacity="0",u.style.transform="translate(-10000px, -10000px)"}},[r,s,o,t]);let c=Ut(s);return Re(()=>{c.current!==s&&l(!1),c.current=s},[c,s]),P("div",{className:"table-cell-action-button-container",ref:r,children:s!=null&&ge(qo.Fragment,{children:[P("button",{className:"table-cell-action-button",onClick:u=>{u.stopPropagation(),l(!i)},ref:n,type:"button",children:P(Cl,{})}),i&&P(Ep,{cellMerge:e,contextRef:n,onClose:()=>l(!1),setIsMenuOpen:l,tableCellNode:s})]})})}var El=t=>{let e=rp(3),{anchorElem:o}=t,r=np(),n;return e[0]!==r||e[1]!==o?(n=wl(r?P(Np,{anchorElem:o??document.body,cellMerge:!0}):null,o??document.body),e[0]=r,e[1]=o,e[2]=n):n=e[2],n};import{c as kp}from"react/compiler-runtime";import{jsx as Yt,jsxs as Lp}from"react/jsx-runtime";import{useLexicalComposerContext as Ip}from"@lexical/react/LexicalComposerContext";import{useLexicalEditable as Sp}from"@lexical/react/useLexicalEditable";import{$computeTableMapSkipCellCheck as Rp,$getTableNodeFromLexicalNodeOrThrow as Qo,$getTableRowIndexFromTableCellNode as yp,$isTableCellNode as Nl,$isTableRowNode as vp,getDOMCellFromTarget as Mp,TableNode as Dp}from"@lexical/table";import{calculateZoomLevel as kl}from"@lexical/utils";import{$getNearestNodeFromDOMNode as er}from"lexical";import*as Sl from"react";import{useCallback as He,useEffect as Ll,useRef as zt,useState as Zt}from"react";import{createPortal as Ap}from"react-dom";var Op=33,Il=92;function Fp({editor:t}){let e=zt(null),o=zt(null),r=zt(null),n=B(),i=zt(null),[l,s]=Zt(null),[a,d]=Zt(null),[c,u]=Zt(!1),[m,p]=Zt(null),f=He(()=>{d(null),e.current=null,p(null),i.current=null,r.current=null},[]),h=E=>(E.buttons&1)===1;Ll(()=>t.registerNodeTransform(Dp,E=>{if(E.getColWidths())return E;let k=E.getColumnCount(),I=Il;return E.setColWidths(Array(k).fill(I)),E}),[t]),Ll(()=>{let E=_=>{setTimeout(()=>{let R=_.target;if(m){s({x:_.clientX,y:_.clientY});return}if(u(h(_)),!(o.current&&o.current.contains(R))&&e.current!==R){e.current=R;let L=Mp(R);L&&a!==L?t.update(()=>{let D=er(L.elem);if(!D)throw new Error("TableCellResizer: Table cell node not found.");let v=Qo(D),O=t.getElementByKey(v.getKey());if(!O)throw new Error("TableCellResizer: Table element not found.");e.current=R,r.current=O.getBoundingClientRect(),d(L)}):L==null&&f()}},0)},k=_=>{setTimeout(()=>{u(!0)},0)},I=_=>{setTimeout(()=>{u(!1)},0)},b=t.registerRootListener((_,R)=>{R?.removeEventListener("mousemove",E),R?.removeEventListener("mousedown",k),R?.removeEventListener("mouseup",I),_?.addEventListener("mousemove",E),_?.addEventListener("mousedown",k),_?.addEventListener("mouseup",I)});return()=>{b()}},[a,m,t,f]);let g=E=>E==="bottom",T=He(E=>{if(!a)throw new Error("TableCellResizer: Expected active cell.");t.update(()=>{let k=er(a.elem);if(!Nl(k))throw new Error("TableCellResizer: Table cell node not found.");let I=Qo(k),b=yp(k)+k.getRowSpan()-1,_=I.getChildren();if(b>=_.length||b<0)throw new Error("Expected table cell to be inside of table row.");let R=_[b];if(!vp(R))throw new Error("Expected table row");let L=R.getHeight();if(L===void 0){let v=R.getChildren();L=Math.min(...v.map(O=>M(O,t)??1/0))}let D=Math.max(L+E,Op);R.setHeight(D)},{tag:"skip-scroll-into-view"})},[a,t]),M=(E,k)=>k.getElementByKey(E.getKey())?.clientHeight,A=(E,k)=>{for(let I=0;I<k.length;I++)for(let b=0;b<k[I].length;b++)if(k[I][b].cell===E)return b},C=He(E=>{if(!a)throw new Error("TableCellResizer: Expected active cell.");t.update(()=>{let k=er(a.elem);if(!Nl(k))throw new Error("TableCellResizer: Table cell node not found.");let I=Qo(k),[b]=Rp(I,null,null),_=A(k,b);if(_===void 0)throw new Error("TableCellResizer: Table column not found.");let R=I.getColWidths();if(!R)return;let L=R[_];if(L===void 0)return;let D=[...R],v=Math.max(L+E,Il);D[_]=v,I.setColWidths(D)},{tag:"skip-scroll-into-view"})},[a,t]),w=He(E=>{let k=I=>{if(I.preventDefault(),I.stopPropagation(),!a)throw new Error("TableCellResizer: Expected active cell.");if(i.current){let{x:b,y:_}=i.current;if(a===null)return;let R=kl(I.target);if(g(E)){let L=(I.clientY-_)/R;T(L)}else{let L=(I.clientX-b)/R;C(L)}f(),document.removeEventListener("mouseup",k)}};return k},[a,f,C,T]),x=He(E=>k=>{if(k.preventDefault(),k.stopPropagation(),!a)throw new Error("TableCellResizer: Expected active cell.");i.current={x:k.clientX,y:k.clientY},s(i.current),p(E),document.addEventListener("mouseup",w(E))},[a,w]),S=He(()=>{if(a){let{height:E,left:k,top:I,width:b}=a.elem.getBoundingClientRect(),_=kl(a.elem),R=10,L={bottom:{backgroundColor:"none",cursor:"row-resize",height:`${R}px`,left:`${window.pageXOffset+k}px`,top:`${window.pageYOffset+I+E-R/2}px`,width:`${b}px`},right:{backgroundColor:"none",cursor:"col-resize",height:`${E}px`,left:`${window.pageXOffset+k+b-R/2}px`,top:`${window.pageYOffset+I}px`,width:`${R}px`}},D=r.current;return m&&l&&D&&(g(m)?(L[m].left=`${window.pageXOffset+D.left}px`,L[m].top=`${window.pageYOffset+l.y/_}px`,L[m].height="3px",L[m].width=`${D.width}px`):(L[m].top=`${window.pageYOffset+D.top}px`,L[m].left=`${window.pageXOffset+l.x/_}px`,L[m].width="3px",L[m].height=`${D.height}px`),L[m].backgroundColor="#adf"),L}return{bottom:null,left:null,right:null,top:null}},[a,m,l])();return Yt("div",{ref:o,children:a!=null&&!c&&Lp(Sl.Fragment,{children:[Yt("div",{className:`${n.editorConfig.lexical.theme.tableCellResizer} TableCellResizer__ui`,onMouseDown:x("right"),style:S.right||void 0}),Yt("div",{className:`${n.editorConfig.lexical.theme.tableCellResizer} TableCellResizer__ui`,onMouseDown:x("bottom"),style:S.bottom||void 0})]})})}var Rl=()=>{let t=kp(3),[e]=Ip(),o=Sp(),r,n;return t[0]!==o||t[1]!==e?(n=o?Ap(Yt(Fp,{editor:e}),document.body):null,t[0]=o,t[1]=e,t[2]=n):n=t[2],r=n,r};import{c as Wp}from"react/compiler-runtime";import{jsx as tr,jsxs as Up,Fragment as Vp}from"react/jsx-runtime";import{useLexicalComposerContext as $l}from"@lexical/react/LexicalComposerContext";import{$getTableColumnIndexFromTableCellNode as Kp,$getTableRowIndexFromTableCellNode as zp,$insertTableColumn__EXPERIMENTAL as Zp,$insertTableRow__EXPERIMENTAL as Yp,$isTableCellNode as Xp,$isTableNode as Ml,TableNode as Jp}from"@lexical/table";import{$findMatchingParent as qp,mergeRegister as Qp}from"@lexical/utils";import{$getNearestNodeFromDOMNode as Dl}from"lexical";import{useEffect as Al,useMemo as ef,useRef as Ol,useState as Xt}from"react";import"react";import{createPortal as tf}from"react-dom";import{useMemo as jp,useRef as Gp}from"react";var $p="Expected a function",Pp=Math.max,Bp=Math.min;function Hp(t,e,o){let r,n,i=0,l,s=!1,a=!1,d,c,u,m=!0;if(typeof t!="function")throw new TypeError($p);e=e||0,typeof o=="object"&&(s=!!o.leading,a="maxWait"in o,d=a?Pp(o.maxWait||0,e):d,m="trailing"in o?!!o.trailing:m);function p(x){let N=r,S=l;return r=l=void 0,i=x,c=t.apply(S,N),c}function f(x){return i=x,u=setTimeout(T,e),s?p(x):c}function h(x){let N=x-n,S=x-i,E=e-N;return a?Bp(E,d-S):E}function g(x){let N=x-n,S=x-i;return n===void 0||N>=e||N<0||a&&S>=d}function T(){let x=Date.now();if(g(x))return M(x);u=setTimeout(T,h(x))}function M(x){return u=void 0,m&&r?p(x):(r=l=void 0,c)}function A(){u!==void 0&&clearTimeout(u),i=0,r=n=l=u=void 0}function C(){return u===void 0?c:M(Date.now())}function w(){let x=Date.now(),N=g(x);if(r=arguments,l=this,n=x,N){if(u===void 0)return f(n);if(a)return clearTimeout(u),u=setTimeout(T,e),p(n)}return u===void 0&&(u=setTimeout(T,e)),c}return w.cancel=A,w.flush=C,w}var yl=Hp;function vl(t,e,o){let r=Gp(null);return r.current=t,jp(()=>yl((...n)=>{r.current&&r.current(...n)},e,{maxWait:o}),[e,o])}var Fl=20;function of({anchorElem:t}){let[e]=$l(),o=B(),[r,n]=Xt(!1),[i,l]=Xt(!1),[s,a]=Xt(!1),[d,c]=Xt({}),u=Ol(new Set),m=Ol(null),p=vl(g=>{let{isOutside:T,tableDOMNode:M}=rf(g,o.editorConfig?.lexical);if(T){n(!1),l(!1);return}if(!M)return;m.current=M;let A=null,C=null,w=null;if(e.update(()=>{let x=Dl(M);if(Xp(x)){let N=qp(x,S=>Ml(S));if(!Ml(N))return;if(w=e.getElementByKey(N?.getKey()),w){let S=N.getChildrenSize(),E=N.getChildAtIndex(0)?.getChildrenSize(),k=zp(x),I=Kp(x);k===S-1?A=x:I===E-1&&(C=x)}}}),w){let{bottom:x,height:N,left:S,right:E,width:k,y:I}=w.getBoundingClientRect(),{left:b,y:_}=t.getBoundingClientRect();A?(l(!1),n(!0),c({height:Fl,left:S-b,top:x-_+5,width:k})):C&&(l(!0),n(!1),c({height:N,left:E-b+5,top:I-_,width:Fl}))}},50,250),f=ef(()=>new ResizeObserver(()=>{n(!1),l(!1)}),[]);Al(()=>{if(s)return document.addEventListener("mousemove",p),()=>{n(!1),l(!1),document.removeEventListener("mousemove",p)}},[s,p]),Al(()=>Qp(e.registerMutationListener(Jp,g=>{e.getEditorState().read(()=>{for(let[T,M]of g){let A=e.getElementByKey(T);switch(M){case"created":u.current.add(T),a(u.current.size>0),A&&f.observe(A);break;case"destroyed":u.current.delete(T),a(u.current.size>0),f.disconnect(),u.current.forEach(C=>{let w=e.getElementByKey(C);w&&f.observe(w)});break;default:break}}})},{skipInitialization:!1})),[e,f]);let h=g=>{e.update(()=>{m.current&&(Dl(m.current)?.selectEnd(),g?(Yp(),n(!1)):(Zp(),l(!1)))})};return e?.isEditable()?Up(Vp,{children:[r&&tr("button",{className:o.editorConfig.lexical.theme.tableAddRows,onClick:()=>h(!0),style:{...d}}),i&&tr("button",{className:o.editorConfig.lexical.theme.tableAddColumns,onClick:()=>h(!1),style:{...d}})]}):null}function rf(t,e){let o=t.target;if(o&&o instanceof HTMLElement){let r=o.closest(`td.${e.theme.tableCell}, th.${e.theme.tableCell}`);return{isOutside:!(r||o.closest(`button.${e.theme.tableAddRows}`)||o.closest(`button.${e.theme.tableAddColumns}`)||o.closest(`div.${e.theme.tableCellResizer}`)),tableDOMNode:r}}else return{isOutside:!0,tableDOMNode:null}}function Pl(t){let e=Wp(2),{anchorElem:o}=t,r=o===void 0?document.body:o,[n]=$l();if(!n?.isEditable())return null;let i;return e[0]!==r?(i=tf(tr(of,{anchorElem:r}),r),e[0]=r,e[1]=i):i=e[1],i}import{c as nf}from"react/compiler-runtime";import{jsx as or,jsxs as lf}from"react/jsx-runtime";import{useLexicalComposerContext as sf}from"@lexical/react/LexicalComposerContext";import{TablePlugin as af}from"@lexical/react/LexicalTablePlugin";import{INSERT_TABLE_COMMAND as cf,TableNode as uf}from"@lexical/table";import{mergeRegister as df}from"@lexical/utils";import{formatDrawerSlug as mf,useEditDepth as pf}from"@payloadcms/ui";import{$getSelection as ff,$isRangeSelection as hf,COMMAND_PRIORITY_EDITOR as gf,createCommand as Cf}from"lexical";import{createContext as xf,useContext as bf,useEffect as _f,useMemo as Tf,useState as wf}from"react";import*as Bl from"react";var Jt=Cf("OPEN_EMBED_DRAWER_COMMAND"),Hl=xf({cellEditorConfig:null,cellEditorPlugins:null,set:()=>{}});function jl({children:t}){let[e,o]=wf({cellEditorConfig:null,cellEditorPlugins:null});return or(Hl.Provider,{value:Tf(()=>({cellEditorConfig:e.cellEditorConfig,cellEditorPlugins:e.cellEditorPlugins,set:(r,n)=>{o({cellEditorConfig:r,cellEditorPlugins:n})}}),[e.cellEditorConfig,e.cellEditorPlugins]),children:t})}var Gl=()=>{let t=nf(16),[e]=sf(),o=bf(Hl),r=pf(),{fieldProps:n,uuid:i}=B(),{schemaPath:l}=n,s="lexical-table-create-"+i,a;t[0]!==s||t[1]!==r?(a=mf({slug:s,depth:r}),t[0]=s,t[1]=r,t[2]=a):a=t[2];let d=a,{toggleDrawer:c}=be(d,!0),u;t[3]!==e||t[4]!==c?(u=()=>{if(!e.hasNodes([uf]))throw new Error("TablePlugin: TableNode is not registered on editor");return df(e.registerCommand(Jt,()=>{let h;return h=null,e.getEditorState().read(()=>{let g=ff();hf(g)&&(h=g)}),h&&c(),!0},gf))},t[3]=e,t[4]=c,t[5]=u):u=t[5];let m;t[6]!==o||t[7]!==e||t[8]!==c?(m=[o,e,c],t[6]=o,t[7]=e,t[8]=c,t[9]=m):m=t[9],_f(u,m);let p;t[10]!==e?(p=(h,g)=>{!g.columns||!g.rows||e.dispatchCommand(cf,{columns:String(g.columns),rows:String(g.rows)})},t[10]=e,t[11]=p):p=t[11];let f;return t[12]!==d||t[13]!==p||t[14]!==l?(f=lf(Bl.Fragment,{children:[or(Ge,{drawerSlug:d,drawerTitle:"Create Table",featureKey:"experimental_table",handleDrawerSubmit:p,schemaPath:l,schemaPathSuffix:"fields"}),or(af,{hasCellBackgroundColor:!1,hasCellMerge:!0})]}),t[12]=d,t[13]=p,t[14]=l,t[15]=f):f=t[15],f};var Lf=y({markdownTransformers:[hl],nodes:[Nf,Ef,kf],plugins:[{Component:Gl,position:"normal"},{Component:Rl,position:"normal"},{Component:El,position:"floatingAnchorElem"},{Component:Pl,position:"floatingAnchorElem"}],providers:[jl],slashMenu:{groups:[K([{Icon:Ko,key:"table",keywords:["table"],label:"Table",onSelect:({editor:t})=>{t.dispatchCommand(Jt,{})}}])]},toolbarFixed:{groups:[ue([{ChildComponent:Ko,key:"table",label:"Table",onSelect:({editor:t})=>{t.dispatchCommand(Jt,{})}}])]}});import{$isNodeSelection as Yf}from"lexical";import{jsx as rr,jsxs as If}from"react/jsx-runtime";import"react";var nr=()=>If("svg",{"aria-hidden":"true",className:"icon",fill:"none",focusable:"false",height:"20",viewBox:"0 0 20 20",width:"20",xmlns:"http://www.w3.org/2000/svg",children:[rr("path",{d:"M14.6667 4H5.33333C4.59695 4 4 4.59695 4 5.33333V14.6667C4 15.403 4.59695 16 5.33333 16H14.6667C15.403 16 16 15.403 16 14.6667V5.33333C16 4.59695 15.403 4 14.6667 4Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),rr("path",{d:"M7.99984 9.33366C8.73622 9.33366 9.33317 8.73671 9.33317 8.00033C9.33317 7.26395 8.73622 6.66699 7.99984 6.66699C7.26346 6.66699 6.6665 7.26395 6.6665 8.00033C6.6665 8.73671 7.26346 9.33366 7.99984 9.33366Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),rr("path",{d:"M16 11.9995L13.9427 9.94214C13.6926 9.69218 13.3536 9.55176 13 9.55176C12.6464 9.55176 12.3074 9.69218 12.0573 9.94214L6 15.9995",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"})]});import{c as Ff}from"react/compiler-runtime";import{jsx as $f}from"react/jsx-runtime";import{useLexicalComposerContext as Pf}from"@lexical/react/LexicalComposerContext.js";import{$insertNodeToNearestRoot as Bf,mergeRegister as Hf}from"@lexical/utils";import{useConfig as jf}from"@payloadcms/ui";import{$getPreviousSelection as Gf,$getSelection as Wf,$isParagraphNode as Ul,$isRangeSelection as Uf,COMMAND_PRIORITY_EDITOR as Vf,createCommand as Kf}from"lexical";import{useEffect as zf}from"react";import{c as Sf}from"react/compiler-runtime";import{jsx as ir}from"react/jsx-runtime";import{useLexicalComposerContext as Rf}from"@lexical/react/LexicalComposerContext.js";import{$getNodeByKey as yf,COMMAND_PRIORITY_EDITOR as vf}from"lexical";import{useEffect as Mf,useState as Df}from"react";var Af=({editor:t,relationTo:e,replaceNodeKey:o,value:r})=>{o?t.update(()=>{let n=yf(o);n&&n.replace(Ze({data:{fields:null,relationTo:e,value:r}}))}):t.dispatchCommand(lr,{fields:null,relationTo:e,value:r})},Of=t=>{let e=Sf(13),{enabledCollectionSlugs:o}=t,[r]=Rf(),[n,i]=Df(null),l;e[0]!==o?(l={collectionSlugs:o,uploads:!0},e[0]=o,e[1]=l):l=e[1];let{closeListDrawer:s,ListDrawer:a,openListDrawer:d}=At(l),c,u;e[2]!==r||e[3]!==d?(c=()=>r.registerCommand(Ke,h=>(i(h?.replace?h?.replace.nodeKey:null),d(),!0),vf),u=[r,d],e[2]=r,e[3]=d,e[4]=c,e[5]=u):(c=e[4],u=e[5]),Mf(c,u);let m;e[6]!==s||e[7]!==r||e[8]!==n?(m=h=>{let{collectionSlug:g,docID:T}=h;s(),Af({editor:r,relationTo:g,replaceNodeKey:n,value:T})},e[6]=s,e[7]=r,e[8]=n,e[9]=m):m=e[9];let p=m,f;return e[10]!==p||e[11]!==a?(f=ir(a,{onSelect:p}),e[10]=p,e[11]=a,e[12]=f):f=e[12],f},Wl=t=>ir(ht,{...t,uploads:!0,children:ir(Of,{...t})});var lr=Kf("INSERT_UPLOAD_COMMAND"),Vl=t=>{let e=Ff(5),[o]=Pf(),{config:r}=jf(),{collections:n}=r,i,l;e[0]!==o?(i=()=>{if(!o.hasNodes([ze]))throw new Error("UploadPlugin: UploadNode not registered on editor");return Hf(o.registerCommand(lr,a=>(o.update(()=>{let d=Wf()||Gf();if(Uf(d)){let c=Ze({data:{id:a.id,fields:a.fields,relationTo:a.relationTo,value:a.value}});Bf(c);let{focus:u}=d,m=u.getNode();Ul(m)&&m.getTextContentSize()===0&&m.getParentOrThrow().getChildren().filter(p=>Ul(p)).length>1&&m.remove()}}),!0),Vf))},l=[o],e[0]=o,e[1]=i,e[2]=l):(i=e[1],l=e[2]),zf(i,l);let s;return e[3]!==n?(s=$f(Wl,{enabledCollectionSlugs:n.map(Zf)}),e[3]=n,e[4]=s):s=e[4],s};function Zf(t){let{slug:e}=t;return e}var Xf=y({nodes:[ze],plugins:[{Component:Vl,position:"normal"}],slashMenu:{groups:[K([{Icon:nr,key:"upload",keywords:["upload","image","file","img","picture","photo","media"],label:({i18n:t})=>t.t("lexical:upload:label"),onSelect:({editor:t})=>{t.dispatchCommand(Ke,{replace:!1})}}])]},toolbarFixed:{groups:[ue([{ChildComponent:nr,isActive:({selection:t})=>{if(!Yf(t)||!t.getNodes().length)return!1;let e=t.getNodes()[0];return io(e)},key:"upload",label:({i18n:t})=>t.t("lexical:upload:label"),onSelect:({editor:t})=>{t.dispatchCommand(Ke,{replace:!1})}}])]}});import{c as Jf}from"react/compiler-runtime";import{jsx as ar}from"react/jsx-runtime";import{ShimmerEffect as qf}from"@payloadcms/ui";import{lazy as Qf,Suspense as e1,useEffect as t1,useState as o1}from"react";var Kl={block:"LexicalEditorTheme__block",blockCursor:"LexicalEditorTheme__blockCursor",characterLimit:"LexicalEditorTheme__characterLimit",code:"LexicalEditorTheme__code",codeHighlight:{atrule:"LexicalEditorTheme__tokenAttr",attr:"LexicalEditorTheme__tokenAttr",boolean:"LexicalEditorTheme__tokenProperty",builtin:"LexicalEditorTheme__tokenSelector",cdata:"LexicalEditorTheme__tokenComment",char:"LexicalEditorTheme__tokenSelector",class:"LexicalEditorTheme__tokenFunction","class-name":"LexicalEditorTheme__tokenFunction",comment:"LexicalEditorTheme__tokenComment",constant:"LexicalEditorTheme__tokenProperty",deleted:"LexicalEditorTheme__tokenProperty",doctype:"LexicalEditorTheme__tokenComment",entity:"LexicalEditorTheme__tokenOperator",function:"LexicalEditorTheme__tokenFunction",important:"LexicalEditorTheme__tokenVariable",inserted:"LexicalEditorTheme__tokenSelector",keyword:"LexicalEditorTheme__tokenAttr",namespace:"LexicalEditorTheme__tokenVariable",number:"LexicalEditorTheme__tokenProperty",operator:"LexicalEditorTheme__tokenOperator",prolog:"LexicalEditorTheme__tokenComment",property:"LexicalEditorTheme__tokenProperty",punctuation:"LexicalEditorTheme__tokenPunctuation",regex:"LexicalEditorTheme__tokenVariable",selector:"LexicalEditorTheme__tokenSelector",string:"LexicalEditorTheme__tokenSelector",symbol:"LexicalEditorTheme__tokenProperty",tag:"LexicalEditorTheme__tokenProperty",url:"LexicalEditorTheme__tokenOperator",variable:"LexicalEditorTheme__tokenVariable"},embedBlock:{base:"LexicalEditorTheme__embedBlock",focus:"LexicalEditorTheme__embedBlockFocus"},hashtag:"LexicalEditorTheme__hashtag",heading:{h1:"LexicalEditorTheme__h1",h2:"LexicalEditorTheme__h2",h3:"LexicalEditorTheme__h3",h4:"LexicalEditorTheme__h4",h5:"LexicalEditorTheme__h5",h6:"LexicalEditorTheme__h6"},hr:"LexicalEditorTheme__hr",indent:"LexicalEditorTheme__indent",inlineImage:"LexicalEditor__inline-image",link:"LexicalEditorTheme__link",list:{checklist:"LexicalEditorTheme__checklist",listitem:"LexicalEditorTheme__listItem",listitemChecked:"LexicalEditorTheme__listItemChecked",listitemUnchecked:"LexicalEditorTheme__listItemUnchecked",nested:{listitem:"LexicalEditorTheme__nestedListItem"},olDepth:["LexicalEditorTheme__ol1","LexicalEditorTheme__ol2","LexicalEditorTheme__ol3","LexicalEditorTheme__ol4","LexicalEditorTheme__ol5"],ul:"LexicalEditorTheme__ul"},ltr:"LexicalEditorTheme__ltr",mark:"LexicalEditorTheme__mark",markOverlap:"LexicalEditorTheme__markOverlap",paragraph:"LexicalEditorTheme__paragraph",quote:"LexicalEditorTheme__quote",relationship:"LexicalEditorTheme__relationship",rtl:"LexicalEditorTheme__rtl",table:"LexicalEditorTheme__table",tableAddColumns:"LexicalEditorTheme__tableAddColumns",tableAddRows:"LexicalEditorTheme__tableAddRows",tableCell:"LexicalEditorTheme__tableCell",tableCellActionButton:"LexicalEditorTheme__tableCellActionButton",tableCellActionButtonContainer:"LexicalEditorTheme__tableCellActionButtonContainer",tableCellEditing:"LexicalEditorTheme__tableCellEditing",tableCellHeader:"LexicalEditorTheme__tableCellHeader",tableCellPrimarySelected:"LexicalEditorTheme__tableCellPrimarySelected",tableCellResizer:"LexicalEditorTheme__tableCellResizer",tableCellSelected:"LexicalEditorTheme__tableCellSelected",tableCellSortedIndicator:"LexicalEditorTheme__tableCellSortedIndicator",tableResizeRuler:"LexicalEditorTheme__tableCellResizeRuler",tableRowStriping:"LexicalEditorTheme__tableRowStriping",tableSelected:"LexicalEditorTheme__tableSelected",text:{bold:"LexicalEditorTheme__textBold",code:"LexicalEditorTheme__textCode",italic:"LexicalEditorTheme__textItalic",strikethrough:"LexicalEditorTheme__textStrikethrough",subscript:"LexicalEditorTheme__textSubscript",superscript:"LexicalEditorTheme__textSuperscript",underline:"LexicalEditorTheme__textUnderline",underlineStrikethrough:"LexicalEditorTheme__textUnderlineStrikethrough"},upload:"editor-upload"};var qt={namespace:"lexical",theme:Kl};function zl({featureClientSchemaMap:t,field:e,schemaPath:o,unSanitizedEditorConfig:r}){for(let s of r.features)if(!s?.clientFeatureProps?.featureKey||s?.clientFeatureProps?.order===void 0||s?.clientFeatureProps?.order===null)throw new Error("A Feature you have installed does not return the client props as clientFeatureProps. Please make sure to always return those props, even if they are null, as other important props like order and featureKey are later on injected.");r.features=r.features.sort((s,a)=>s.clientFeatureProps.order-a.clientFeatureProps.order);let n=new Map;for(let s of r.features)n.set(s.clientFeatureProps.featureKey,s);let i=new Map,l=0;for(let s of r.features){let a=typeof s.feature=="function"?s.feature({featureClientSchemaMap:t,featureProviderMap:n,field:e,resolvedFeatures:i,schemaPath:o,unSanitizedEditorConfig:r}):s.feature;a.key=s.clientFeatureProps.featureKey,a.order=l,i.set(s.clientFeatureProps.featureKey,a),l++}return i}var Zl=t=>{let e={enabledFeatures:[],markdownTransformers:[],nodes:[],plugins:[],providers:[],slashMenu:{dynamicGroups:[],groups:[]},toolbarFixed:{groups:[]},toolbarInline:{groups:[]}};if(!t?.size)return e;t.forEach(o=>{if(o.providers?.length&&(e.providers=e.providers.concat(o.providers)),o.nodes?.length)for(let r of o.nodes)e.nodes.push(r);if(o.plugins?.length&&o.plugins.forEach((r,n)=>{e.plugins?.push({clientProps:o.sanitizedClientFeatureProps,Component:r.Component,key:o.key+n,position:r.position})}),o.toolbarInline?.groups?.length)for(let r of o.toolbarInline.groups){let n=e.toolbarInline.groups.find(i=>i.key===r.key);n?e.toolbarInline.groups=e.toolbarInline.groups.filter(i=>i.key!==r.key):n={...r,items:[]},r?.items?.length&&(n.items=n.items.concat(r.items)),e.toolbarInline?.groups.push(n)}if(o.toolbarFixed?.groups?.length)for(let r of o.toolbarFixed.groups){let n=e.toolbarFixed.groups.find(i=>i.key===r.key);n?e.toolbarFixed.groups=e.toolbarFixed.groups.filter(i=>i.key!==r.key):n={...r,items:[]},r?.items?.length&&(n.items=n.items.concat(r.items)),e.toolbarFixed?.groups.push(n)}if(o.slashMenu?.groups){o.slashMenu.dynamicGroups?.length&&(e.slashMenu.dynamicGroups=e.slashMenu.dynamicGroups.concat(o.slashMenu.dynamicGroups));for(let r of o.slashMenu.groups){let n=e.slashMenu.groups.find(i=>i.key===r.key);n?e.slashMenu.groups=e.slashMenu.groups.filter(i=>i.key!==r.key):n={...r,items:[]},r?.items?.length&&(n.items=n.items.concat(r.items)),e.slashMenu.groups.push(n)}}if(o.markdownTransformers?.length)for(let r of o.markdownTransformers)typeof r=="function"?e.markdownTransformers.push(r({allNodes:e.nodes,allTransformers:e.markdownTransformers})):e.markdownTransformers.push(r);e.enabledFeatures.push(o.key)}),e.toolbarInline.groups.sort((o,r)=>o.order&&r.order?o.order-r.order:o.order?-1:r.order?1:0),e.toolbarFixed.groups.sort((o,r)=>o.order&&r.order?o.order-r.order:o.order?-1:r.order?1:0);for(let o of e.toolbarInline.groups)o.items.sort((r,n)=>r.order&&n.order?r.order-n.order:r.order?-1:n.order?1:0);for(let o of e.toolbarFixed.groups)o.items.sort((r,n)=>r.order&&n.order?r.order-n.order:r.order?-1:n.order?1:0);return e};function sr(t,e,o){return{admin:o,features:Zl(t),lexical:e,resolvedFeatureMap:t}}var r1=Qf(()=>import("./Field-KKSJXHR7.js").then(t=>({default:t.RichText}))),n1=t=>{let e=Jf(14),{admin:o,clientFeatures:r,featureClientSchemaMap:n,field:i,lexicalEditorConfig:l,schemaPath:s}=t,a;e[0]!==o?(a=o===void 0?{}:o,e[0]=o,e[1]=a):a=e[1];let d=a,c=l===void 0?qt:l,[u,m]=o1(null),p,f;e[2]!==u||e[3]!==r||e[4]!==c||e[5]!==n||e[6]!==i||e[7]!==s||e[8]!==d?(p=()=>{if(u)return;let g=[];for(let[A,C]of Object.entries(r))C.clientFeatureProvider&&g.push(C.clientFeatureProvider(C.clientFeatureProps));let T=c||qt,M=zl({featureClientSchemaMap:n,field:i,schemaPath:s??i.name,unSanitizedEditorConfig:{features:g,lexical:T}});m(sr(M,T,d))},f=[c,d,u,r,n,i,s],e[2]=u,e[3]=r,e[4]=c,e[5]=n,e[6]=i,e[7]=s,e[8]=d,e[9]=p,e[10]=f):(p=e[9],f=e[10]),t1(p,f);let h;return e[11]!==u||e[12]!==t?(h=ar(e1,{fallback:ar(qf,{height:"35vh"}),children:u&&ar(r1,{...t,editorConfig:u})}),e[11]=u,e[12]=t,e[13]=h):h=e[13],h};function i1(...t){return t.filter(Boolean).join(" ")}var Qt=new WeakMap;function Yl(t){let e=t.changedTouches[0];return e===void 0?null:[e.clientX,e.clientY]}function eo(t,e){let o=Qt.get(t);if(o===void 0){let r=new Set,n=l=>{o!==void 0&&(o.start=Yl(l))},i=l=>{if(o===void 0)return;let{start:s}=o;if(s===null)return;let a=Yl(l);for(let d of r)a!==null&&d([a[0]-s[0],a[1]-s[1]],l)};t.addEventListener("touchstart",n),t.addEventListener("touchend",i),o={handleTouchend:i,handleTouchstart:n,listeners:r,start:null},Qt.set(t,o)}return o.listeners.add(e),()=>{l1(t,e)}}function l1(t,e){let o=Qt.get(t);if(o===void 0)return;let{listeners:r}=o;r.delete(e),r.size===0&&(Qt.delete(t),t.removeEventListener("touchstart",o.handleTouchstart),t.removeEventListener("touchend",o.handleTouchend))}function s1(t,e){return eo(t,(o,r)=>{let[n,i]=o;n<0&&-n>Math.abs(i)&&e(n,r)})}function a1(t,e){return eo(t,(o,r)=>{let[n,i]=o;n>0&&n>Math.abs(i)&&e(n,r)})}function c1(t,e){return eo(t,(o,r)=>{let[n,i]=o;i<0&&-i>Math.abs(n)&&e(n,r)})}function u1(t,e){return eo(t,(o,r)=>{let[n,i]=o;i>0&&i>Math.abs(n)&&e(n,r)})}var F={DOM_ELEMENT_TYPE:1,DOM_TEXT_TYPE:3,NO_DIRTY_NODES:0,HAS_DIRTY_NODES:1,FULL_RECONCILE:2,IS_NORMAL:0,IS_TOKEN:1,IS_SEGMENTED:2,IS_INERT:3,IS_BOLD:1,IS_ITALIC:2,IS_STRIKETHROUGH:4,IS_UNDERLINE:8,IS_CODE:16,IS_SUBSCRIPT:32,IS_SUPERSCRIPT:64,IS_HIGHLIGHT:128,IS_DIRECTIONLESS:1,IS_UNMERGEABLE:2,IS_ALIGN_LEFT:1,IS_ALIGN_CENTER:2,IS_ALIGN_RIGHT:3,IS_ALIGN_JUSTIFY:4,IS_ALIGN_START:5,IS_ALIGN_END:6},d1=F.IS_BOLD|F.IS_ITALIC|F.IS_STRIKETHROUGH|F.IS_UNDERLINE|F.IS_CODE|F.IS_SUBSCRIPT|F.IS_SUPERSCRIPT|F.IS_HIGHLIGHT,m1="\xA0",p1=`
|
|
36
38
|
|
|
37
|
-
`,ui="\u0591-\u07FF\uFB1D-\uFDFD\uFE70-\uFEFC",pi="A-Za-z\xC0-\xD6\xD8-\xF6\xF8-\u02B8\u0300-\u0590\u0800-\u1FFF\u200E\u2C00-\uFB1C\uFE00-\uFE6F\uFEFD-\uFFFF",fd=new RegExp("^[^"+pi+"]*["+ui+"]"),gd=new RegExp("^[^"+ui+"]*["+pi+"]"),Cd={bold:v.IS_BOLD,code:v.IS_CODE,highlight:v.IS_HIGHLIGHT,italic:v.IS_ITALIC,strikethrough:v.IS_STRIKETHROUGH,subscript:v.IS_SUBSCRIPT,superscript:v.IS_SUPERSCRIPT,underline:v.IS_UNDERLINE},hd={directionless:v.IS_DIRECTIONLESS,unmergeable:v.IS_UNMERGEABLE},bd={center:v.IS_ALIGN_CENTER,end:v.IS_ALIGN_END,justify:v.IS_ALIGN_JUSTIFY,left:v.IS_ALIGN_LEFT,right:v.IS_ALIGN_RIGHT,start:v.IS_ALIGN_START},xd={[v.IS_ALIGN_CENTER]:"center",[v.IS_ALIGN_END]:"end",[v.IS_ALIGN_JUSTIFY]:"justify",[v.IS_ALIGN_LEFT]:"left",[v.IS_ALIGN_RIGHT]:"right",[v.IS_ALIGN_START]:"start"},Td={normal:v.IS_NORMAL,segmented:v.IS_SEGMENTED,token:v.IS_TOKEN},Ed={[v.IS_NORMAL]:"normal",[v.IS_SEGMENTED]:"segmented",[v.IS_TOKEN]:"token"};function fi({converters:e,slateData:t}){return{root:{type:"root",children:gi({canContainParagraphs:!0,converters:e,parentNodeType:"root",slateNodes:t}),direction:"ltr",format:"",indent:0,version:1}}}function gi({canContainParagraphs:e,converters:t,parentNodeType:o,slateNodes:r}){if(!t?.length)return[];let n=t.find(i=>i.nodeTypes.includes("unknown"));return r.map((i,l)=>{if(!("type"in i))return e?mi(t,i):yd(i);if(i.type==="p")return mi(t,i);let a=t.find(s=>s.nodeTypes.includes(i.type));return a?a.converter({childIndex:l,converters:t,parentNodeType:o,slateNode:i}):(console.warn("slateToLexical > No converter found for node type: "+i.type),n?.converter({childIndex:l,converters:t,parentNodeType:o,slateNode:i}))})||[]}function mi(e,t){return{type:"paragraph",children:gi({canContainParagraphs:!1,converters:e,parentNodeType:"paragraph",slateNodes:t.children||[]}),direction:"ltr",format:"",indent:0,textFormat:0,textStyle:"",version:1}}function yd(e){return{type:"text",detail:0,format:Ld(e),mode:"normal",style:"",text:e.text,version:1}}function Ld(e){let t=0;return e.bold&&(t=t|v.IS_BOLD),e.italic&&(t=t|v.IS_ITALIC),e.strikethrough&&(t=t|v.IS_STRIKETHROUGH),e.underline&&(t=t|v.IS_UNDERLINE),e.subscript&&(t=t|v.IS_SUBSCRIPT),e.superscript&&(t=t|v.IS_SUPERSCRIPT),e.code&&(t=t|v.IS_CODE),t}import{addClassNamesToElement as Nd}from"@lexical/utils";import{DecoratorNode as kd}from"lexical";import*as Ci from"react";import{jsx as _d}from"react/jsx-runtime";var wd=Ci.lazy(()=>import("./Component-LAKSCIDX.js").then(e=>({default:e.UnknownConvertedNodeComponent}))),Be=class e extends kd{__data;constructor({data:t,key:o}){super(o),this.__data=t}static clone(t){return new e({data:t.__data,key:t.__key})}static getType(){return"unknownConverted"}static importJSON(t){return Rd({data:t.data})}canInsertTextAfter(){return!0}canInsertTextBefore(){return!0}createDOM(t){let o=document.createElement("span");return Nd(o,"unknownConverted"),o}decorate(){return _d(wd,{data:this.__data})}exportJSON(){return{type:this.getType(),data:this.__data,version:1}}isInline(){return!0}updateDOM(t,o){return!1}};function Rd({data:e}){return new Be({data:e})}var Sd=L(({clientFunctions:e})=>{let t=Object.values(e);return{hooks:{load({incomingEditorState:o}){return!o||!Array.isArray(o)||"root"in o?o:fi({converters:t,slateData:o})}},nodes:[Be]}});import{$setBlocksType as xi}from"@lexical/selection";import{$createParagraphNode as Ti,$getSelection as Ei,$isParagraphNode as hi,$isRangeSelection as vd}from"lexical";var bi=[z([{ChildComponent:Ae,isActive:({selection:e})=>{if(!vd(e))return!1;for(let t of e.getNodes())if(!hi(t)&&!hi(t.getParent()))return!1;return!0},key:"paragraph",label:({i18n:e})=>e.t("lexical:paragraph:label2"),onSelect:({editor:e})=>{e.update(()=>{let t=Ei();xi(t,()=>Ti())})},order:1}])],Id=L({slashMenu:{groups:[G([{Icon:Ae,key:"paragraph",keywords:["normal","paragraph","p","text"],label:({i18n:e})=>e.t("lexical:paragraph:label"),onSelect:({editor:e})=>{e.update(()=>{let t=Ei();xi(t,()=>Ti())})}}])]},toolbarFixed:{groups:bi},toolbarInline:{groups:bi}});import{$isNodeSelection as Zd}from"lexical";import{jsx as Ge,jsxs as Fd}from"react/jsx-runtime";var go=()=>Fd("svg",{"aria-hidden":"true",className:"icon",fill:"none",focusable:"false",height:"20",viewBox:"0 0 20 20",width:"20",xmlns:"http://www.w3.org/2000/svg",children:[Ge("g",{clipPath:"url(#clip0_4397_10817)",children:Ge("path",{d:"M7.75 12.25L15.25 4.75M15.25 4.75H11.5M15.25 4.75V8.5M13 11.5V13.75C13 14.5784 12.3284 15.25 11.5 15.25H6.25C5.42157 15.25 4.75 14.5784 4.75 13.75V8.5C4.75 7.67157 5.42157 7 6.25 7H8.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"})}),Ge("defs",{children:Ge("clipPath",{id:"clip0_4397_10817",children:Ge("rect",{fill:"currentColor",height:"12",transform:"translate(4 4)",width:"12"})})})]});import{useLexicalComposerContext as $d}from"@lexical/react/LexicalComposerContext.js";import{$insertNodeToNearestRoot as Bd}from"@lexical/utils";import{useConfig as Gd}from"@payloadcms/ui";import{$getPreviousSelection as Ud,$getSelection as Wd,$isParagraphNode as wi,$isRangeSelection as zd,COMMAND_PRIORITY_EDITOR as Vd,createCommand as Kd}from"lexical";import{useEffect as jd}from"react";import{useLexicalComposerContext as Md}from"@lexical/react/LexicalComposerContext.js";import{useListDrawer as Pd}from"@payloadcms/ui";import{$getNodeByKey as Ad,COMMAND_PRIORITY_EDITOR as Dd}from"lexical";import{useCallback as Od,useEffect as yi,useState as Li}from"react";import{jsx as gt}from"react/jsx-runtime";var Hd=({editor:e,relationTo:t,replaceNodeKey:o,value:r})=>{o?e.update(()=>{let n=Ad(o);n&&n.replace(Se({relationTo:t,value:r}))}):e.dispatchCommand(Co,{relationTo:t,value:r})},Ni=({enabledCollectionSlugs:e})=>{let[t]=Md(),[o,r]=Li(()=>e[0]),[n,i]=Li(null),[l,a,{closeDrawer:s,isDrawerOpen:c,openDrawer:d}]=Pd({collectionSlugs:e,selectedCollection:o});yi(()=>t.registerCommand(Re,u=>(i(u?.replace?u?.replace.nodeKey:null),d(),!0),Dd),[t,d]);let p=Od(({collectionSlug:u,docID:m})=>{Hd({editor:t,relationTo:u,replaceNodeKey:n,value:m}),s()},[t,s,n]);return yi(()=>{r(e[0])},[c,e]),gt(l,{onSelect:p})},ki=e=>e?.enabledCollectionSlugs?.length>0?gt(Ni,{...e}):gt(Ye,{...e,children:gt(Ni,{...e})});import{jsx as Xd}from"react/jsx-runtime";var Co=Kd("INSERT_RELATIONSHIP_COMMAND"),Ri=({clientProps:e})=>{let[t]=$d(),{collections:o}=Gd(),r=null;return e?.enabledCollections?r=e?.enabledCollections:e?.disabledCollections&&(r=o.filter(({slug:n})=>!e?.disabledCollections?.includes(n)).map(({slug:n})=>n)),jd(()=>{if(!t.hasNodes([_e]))throw new Error("RelationshipPlugin: RelationshipNode not registered on editor");return t.registerCommand(Co,n=>{let i=Wd()||Ud();if(zd(i)){let l=Se(n);Bd(l);let{focus:a}=i,s=a.getNode();wi(s)&&s.getTextContentSize()===0&&s.getParent().getChildren().filter(c=>wi(c)).length>1&&s.remove()}return!0},Vd)},[t]),Xd(ki,{enabledCollectionSlugs:r})};var Jd=L({nodes:[_e],plugins:[{Component:Ri,position:"normal"}],slashMenu:{groups:[G([{Icon:go,key:"relationship",keywords:["relationship","relation","rel"],label:({i18n:e})=>e.t("lexical:relationship:label"),onSelect:({editor:e})=>{e.dispatchCommand(Re,{replace:!1})}}])]},toolbarFixed:{groups:[Y([{ChildComponent:go,isActive:({selection:e})=>{if(!Zd(e)||!e.getNodes().length)return!1;let t=e.getNodes()[0];return Pt(t)},key:"relationship",label:({i18n:e})=>e.t("lexical:relationship:label"),onSelect:({editor:e})=>{e.dispatchCommand(Re,{replace:!1})}}])]}});import{useLexicalComposerContext as uu}from"@lexical/react/LexicalComposerContext.js";import{useScrollInfo as pu,useThrottledEffect as mu,useTranslation as fu}from"@payloadcms/ui";import*as te from"react";import{useMemo as gu}from"react";import{mergeRegister as Yd}from"@lexical/utils";import{$getSelection as qd}from"lexical";import{useCallback as Qd,useEffect as Ct,useState as ho}from"react";import{jsx as eu}from"react/jsx-runtime";var bo="toolbar-popup__button",Ue=({children:e,editor:t,item:o})=>{let[r,n]=ho(!0),[i,l]=ho(!1),[a,s]=ho(bo),c=$(),d=Qd(()=>{t.getEditorState().read(()=>{let p=qd();if(o.isActive){let u=o.isActive({editor:t,editorConfigContext:c,selection:p});i!==u&&l(u)}if(o.isEnabled){let u=o.isEnabled({editor:t,editorConfigContext:c,selection:p});r!==u&&n(u)}})},[i,t,c,r,o]);return Ct(()=>{d()},[d]),Ct(()=>(document.addEventListener("mouseup",d),()=>{document.removeEventListener("mouseup",d)}),[d]),Ct(()=>Yd(t.registerUpdateListener(()=>{d()})),[t,d]),Ct(()=>{s([bo,r===!1?"disabled":"",i?"active":"",o?.key?`${bo}-`+o.key:""].filter(Boolean).join(" "))},[r,i,a,o.key]),eu("button",{className:a,onClick:()=>{if(r!==!1)return t._updateTags=new Set([...t._updateTags,"toolbar"]),t.focus(()=>{o.onSelect({editor:t,isActive:i})}),!0},onMouseDown:p=>{p.preventDefault()},type:"button",children:e})};import Fi,{useCallback as iu,useEffect as Eo}from"react";import{mergeRegister as lu}from"@lexical/utils";import{useTranslation as su}from"@payloadcms/ui";import{$getSelection as au}from"lexical";import ht,{useCallback as tu,useEffect as We,useMemo as ou,useRef as To,useState as bt}from"react";import{createPortal as ru}from"react-dom";import{jsx as ie,jsxs as _i}from"react/jsx-runtime";var xo="toolbar-popup__dropdown-item",Si=ht.createContext(null);function vi({active:e,children:t,editor:o,enabled:r,item:n,title:i}){let[l,a]=bt(xo);We(()=>{a([xo,r===!1?"disabled":"",e?"active":"",n?.key?`${xo}-${n.key}`:""].filter(Boolean).join(" "))},[r,e,l,n.key]);let s=To(null),c=ht.useContext(Si);if(c===null)throw new Error("DropDownItem must be used within a DropDown");let{registerItem:d}=c;return We(()=>{s?.current!=null&&d(s)},[s,d]),ie("button",{className:l,onClick:()=>{r!==!1&&(o._updateTags=new Set([...o._updateTags,"toolbar"]),o.focus(()=>{n.onSelect({editor:o,isActive:e})}))},onMouseDown:p=>{p.preventDefault()},ref:s,title:i,type:"button",children:t})}function nu({children:e,dropDownRef:t,itemsContainerClassNames:o,onClose:r}){let[n,i]=bt(),[l,a]=bt(),s=tu(p=>{i(u=>u!=null?[...u,p]:[p])},[i]),c=p=>{if(n==null)return;let{key:u}=p;["ArrowDown","ArrowUp","Escape","Tab"].includes(u)&&p.preventDefault(),u==="Escape"||u==="Tab"?r():u==="ArrowUp"?a(m=>{if(m==null)return n[0];let g=n.indexOf(m)-1;return n[g===-1?n.length-1:g]}):u==="ArrowDown"&&a(m=>m==null?n[0]:n[n.indexOf(m)+1])},d=ou(()=>({registerItem:s}),[s]);return We(()=>{n!=null&&l==null&&a(n[0]),l!=null&&l?.current!=null&&l.current.focus()},[n,l]),ie(Si.Provider,{value:d,children:ie("div",{className:(o??["toolbar-popup__dropdown-items"]).join(" "),onKeyDown:c,ref:t,children:e})})}function Ii({Icon:e,buttonAriaLabel:t,buttonClassName:o,children:r,disabled:n=!1,itemsContainerClassNames:i,label:l,stopCloseOnClickSelf:a}){let s=To(null),c=To(null),[d,p]=bt(!1),u=()=>{p(!1),c?.current!=null&&c.current.focus()};We(()=>{let g=c.current,f=s.current;if(d&&g!==null&&f!==null){let{left:x,top:h}=g.getBoundingClientRect(),I=window.scrollY||document.documentElement.scrollTop;f.style.top=`${h+I+g.offsetHeight+5}px`,f.style.left=`${Math.min(x-5,window.innerWidth-f.offsetWidth-20)}px`}},[s,c,d]),We(()=>{let g=c.current;if(g!==null&&d){let f=x=>{let{target:h}=x;a!=null&&s.current!=null&&s.current.contains(h)||g.contains(h)||p(!1)};return document.addEventListener("click",f),()=>{document.removeEventListener("click",f)}}},[s,c,d,a]);let m=ru(ie(nu,{dropDownRef:s,itemsContainerClassNames:i,onClose:u,children:r}),document.body);return _i(ht.Fragment,{children:[_i("button",{"aria-label":t,className:o+(d?" active":""),disabled:n,onClick:g=>{g.preventDefault(),p(!d)},onMouseDown:g=>{g.preventDefault()},ref:c,type:"button",children:[e&&ie(e,{}),l&&ie("span",{className:"toolbar-popup__dropdown-label",children:l}),ie("i",{className:"toolbar-popup__dropdown-caret"})]}),d&&ie(ht.Fragment,{children:m})]})}import{jsx as ze,jsxs as du}from"react/jsx-runtime";var yo="toolbar-popup__dropdown",cu=({active:e,anchorElem:t,editor:o,enabled:r,item:n})=>{let{i18n:i}=su();if(n.Component)return n?.Component&&ze(n.Component,{active:e,anchorElem:t,editor:o,enabled:r,item:n},n.key);let l=n.key;return n.label&&(l=typeof n.label=="function"?n.label({i18n:i}):n.label),l.length>25&&(l=l.substring(0,25)+"..."),du(vi,{active:e,editor:o,enabled:r,item:n,children:[n?.ChildComponent&&ze(n.ChildComponent,{}),ze("span",{className:"text",children:l})]},n.key)},ue=({Icon:e,anchorElem:t,classNames:o,editor:r,groupKey:n,items:i,itemsContainerClassNames:l,label:a,maxActiveItems:s,onActiveChange:c})=>{let[d,p]=Fi.useState([]),[u,m]=Fi.useState([]),g=$(),f=iu(()=>{r.getEditorState().read(()=>{let x=au(),h=[],I=[],P=[];for(let T of i)T.isActive&&(!s||h.length<s)&&T.isActive({editor:r,editorConfigContext:g,selection:x})&&(h.push(T.key),I.push(T)),T.isEnabled?T.isEnabled({editor:r,editorConfigContext:g,selection:x})&&P.push(T.key):P.push(T.key);p(h),m(P),c&&c({activeItems:I})})},[r,g,i,s,c]);return Eo(()=>{f()},[f]),Eo(()=>(document.addEventListener("mouseup",f),()=>{document.removeEventListener("mouseup",f)}),[f]),Eo(()=>lu(r.registerUpdateListener(()=>{f()})),[r,f]),ze(Ii,{Icon:e,buttonAriaLabel:`${n} dropdown`,buttonClassName:[yo,`${yo}-${n}`,...o||[]].filter(Boolean).join(" "),itemsContainerClassNames:[`${yo}-items`,...l||[]],label:a,children:i.length&&i.map(x=>ze(cu,{active:d.includes(x.key),anchorElem:t,editor:r,enabled:u.includes(x.key),item:x},x.key))},n)};import{jsx as j,jsxs as xu}from"react/jsx-runtime";function Cu({anchorElem:e,editor:t,item:o}){return o.Component?o?.Component&&j(o.Component,{anchorElem:e,editor:t,item:o},o.key):j(Ue,{editor:t,item:o,children:o?.ChildComponent&&j(o.ChildComponent,{})},o.key)}function hu({anchorElem:e,editor:t,editorConfig:o,group:r,index:n}){let{i18n:i}=fu(),[l,a]=te.useState(null),[s,c]=te.useState(null);te.useEffect(()=>{r?.type==="dropdown"&&r.items.length&&r.ChildComponent?c(()=>r.ChildComponent):c(null)},[r]);let d=({activeItems:p})=>{if(!p.length){r?.type==="dropdown"&&r.items.length&&r.ChildComponent?(c(()=>r.ChildComponent),a(null)):(c(null),a(null));return}let u=p[0],m=u.key;u.label&&(m=typeof u.label=="function"?u.label({i18n:i}):u.label),m.length>25&&(m=m.substring(0,25)+"..."),a(m),c(()=>u.ChildComponent)};return xu("div",{className:`fixed-toolbar__group fixed-toolbar__group-${r.key}`,children:[r.type==="dropdown"&&r.items.length&&(s?j(ue,{Icon:s,anchorElem:e,editor:t,groupKey:r.key,items:r.items,itemsContainerClassNames:["fixed-toolbar__dropdown-items"],label:l,maxActiveItems:1,onActiveChange:d}):j(ue,{anchorElem:e,editor:t,groupKey:r.key,items:r.items,itemsContainerClassNames:["fixed-toolbar__dropdown-items"],label:l,maxActiveItems:1,onActiveChange:d})),r.type==="buttons"&&r.items.length&&r.items.map(p=>j(Cu,{anchorElem:e,editor:t,item:p},p.key)),n<o.features.toolbarFixed?.groups.length-1&&j("div",{className:"divider"})]},r.key)}function bu({anchorElem:e,clientProps:t,editor:o,editorConfig:r,parentWithFixedToolbar:n}){let i=te.useRef(null),{y:l}=pu(),a=gu(()=>{if(!n||t?.disableIfParentHasFixedToolbar)return null;let c=n.editorContainerRef.current.previousElementSibling;for(;c;){if(c.classList.contains("fixed-toolbar"))return c;c=c.previousElementSibling}return null},[t?.disableIfParentHasFixedToolbar,n]);return mu(()=>{if(!a)return;let s=i.current;if(!s)return;let c=s.getBoundingClientRect(),d=a.getBoundingClientRect();if(!(c.bottom<d.top||c.top>d.bottom))i.current.className="fixed-toolbar fixed-toolbar--overlapping",a.className="fixed-toolbar fixed-toolbar--hide";else{if(!i.current.classList.contains("fixed-toolbar--overlapping"))return;i.current.className="fixed-toolbar",a.className="fixed-toolbar"}},50,[i,a,l]),j("div",{className:"fixed-toolbar",onFocus:s=>{s.stopPropagation()},ref:i,children:o.isEditable()&&j(te.Fragment,{children:r?.features&&r.features?.toolbarFixed?.groups.map((s,c)=>j(hu,{anchorElem:e,editor:o,editorConfig:r,group:s,index:c},s.key))})})}var Mi=e=>{if(e.parentEditor?.editorConfig){if(e.parentEditor?.editorConfig.resolvedFeatureMap.has("toolbarFixed"))return e.parentEditor;if(e.parentEditor)return Mi(e.parentEditor)}return!1},Pi=({anchorElem:e,clientProps:t})=>{let[o]=uu(),r=$(),{editorConfig:n}=r,i=t.applyToFocusedEditor&&r.focusedEditor?.editor||o,l=t.applyToFocusedEditor&&r.focusedEditor?.editorConfig||n,a=Mi(r);return t?.disableIfParentHasFixedToolbar&&a||!l?.features?.toolbarFixed?.groups?.length?null:j(bu,{anchorElem:e,editor:i,editorConfig:l,parentWithFixedToolbar:a})};var Tu=L({plugins:[{Component:Pi,position:"aboveContainer"}]});import{useLexicalComposerContext as Eu}from"@lexical/react/LexicalComposerContext.js";import{mergeRegister as Oi}from"@lexical/utils";import{$getSelection as Hi,$isRangeSelection as Ai,$isTextNode as yu,COMMAND_PRIORITY_LOW as Lu,SELECTION_CHANGE_COMMAND as Nu}from"lexical";import{useCallback as Ve,useEffect as Ke,useRef as Di,useState as ku}from"react";import*as Te from"react";import{createPortal as wu}from"react-dom";function Lo(e,t){let o=e.getRangeAt(0),r;if(e.anchorNode===t){let n=t;for(;n.firstElementChild!=null;)n=n.firstElementChild;r=n.getBoundingClientRect()}else r=o.getBoundingClientRect();return r}function xt(e){let{alwaysDisplayOnTop:t=!1,anchorElem:o,anchorFlippedOffset:r=0,floatingElem:n,horizontalOffset:i=5,horizontalPosition:l="left",specialHandlingForCaret:a=!1,targetRect:s,verticalGap:c=10}=e,d=o.parentElement;if(s===null||d==null){n.style.opacity="0",n.style.transform="translate(-10000px, -10000px)";return}let p=n.getBoundingClientRect(),u=o.getBoundingClientRect(),m=d.getBoundingClientRect(),g=s.top-p.height-c,f=s.left-i;l==="center"&&(f=s.left+s.width/2-p.width/2);let x=0;return!t&&g<m.top&&!a&&(x=p.height+s.height+c*2,g+=x),l==="center"?f+p.width>m.right?f=m.right-p.width-i:f<m.left&&(f=m.left+i):f+p.width>m.right&&(f=m.right-p.width-i),f-=u.left,n.style.opacity="1",a&&r!==0?(g-=u.bottom-r+p.height-3,n.style.transform=`translate(${f}px, ${g}px) rotate(180deg)`):(g-=u.top,n.style.transform=`translate(${f}px, ${g}px)`),x}import{jsx as X,jsxs as Bi}from"react/jsx-runtime";function Ru({anchorElem:e,editor:t,item:o}){return o.Component?o?.Component&&X(o.Component,{anchorElem:e,editor:t,item:o},o.key):X(Ue,{editor:t,item:o,children:o?.ChildComponent&&X(o.ChildComponent,{})},o.key)}function _u({anchorElem:e,editor:t,group:o,index:r}){let{editorConfig:n}=$(),[i,l]=Te.useState(null);Te.useEffect(()=>{o?.type==="dropdown"&&o.items.length&&o.ChildComponent?l(()=>o.ChildComponent):l(null)},[o]);let a=({activeItems:s})=>{if(!s.length){o?.type==="dropdown"&&o.items.length&&o.ChildComponent?l(()=>o.ChildComponent):l(null);return}let c=s[0];l(()=>c.ChildComponent)};return Bi("div",{className:`inline-toolbar-popup__group inline-toolbar-popup__group-${o.key}`,children:[o.type==="dropdown"&&o.items.length&&(i?X(ue,{Icon:i,anchorElem:e,editor:t,groupKey:o.key,items:o.items,maxActiveItems:1,onActiveChange:a}):X(ue,{anchorElem:e,editor:t,groupKey:o.key,items:o.items,maxActiveItems:1,onActiveChange:a})),o.type==="buttons"&&o.items.length&&o.items.map(s=>X(Ru,{anchorElem:e,editor:t,item:s},s.key)),r<n.features.toolbarInline?.groups.length-1&&X("div",{className:"divider"})]},o.key)}function Su({anchorElem:e,editor:t}){let o=Di(null),r=Di(null),{editorConfig:n}=$(),i=Ve(()=>{if(o?.current){let c=o.current.style.opacity==="0",d=o.current.style.pointerEvents==="none";c||(o.current.style.opacity="0"),d||(o.current.style.pointerEvents="none")}},[o]),l=Ve(c=>{if(o?.current&&(c.buttons===1||c.buttons===3)){let d=o.current.style.opacity==="0",p=o.current.style.pointerEvents==="none";if(!d||!p){let u=c.clientX,m=c.clientY,g=document.elementFromPoint(u,m);o.current.contains(g)||i()}}},[i]),a=Ve(()=>{o?.current&&(o.current.style.opacity!=="1"&&(o.current.style.opacity="1"),o.current.style.pointerEvents!=="auto"&&(o.current.style.pointerEvents="auto"))},[]);Ke(()=>(document.addEventListener("mousemove",l),document.addEventListener("mouseup",a),()=>{document.removeEventListener("mousemove",l),document.removeEventListener("mouseup",a)}),[o,l,a]);let s=Ve(()=>{let c=Hi(),d=window.getSelection();if(o.current===null)return;let p=e.querySelector(":scope > .link-editor"),u=p!==null&&"style"in p&&p?.style?.opacity==="1",m=t.getRootElement();if(c!==null&&d!==null&&!d.isCollapsed&&m!==null&&m.contains(d.anchorNode)){let g=Lo(d,m),f=xt({alwaysDisplayOnTop:u,anchorElem:e,floatingElem:o.current,horizontalPosition:"center",targetRect:g});r.current&&xt({anchorElem:o.current,anchorFlippedOffset:f,floatingElem:r.current,horizontalOffset:5,horizontalPosition:"center",specialHandlingForCaret:!0,targetRect:g,verticalGap:10})}else i()},[t,i,e]);return Ke(()=>{let c=e.parentElement,d=()=>{t.getEditorState().read(()=>{s()})};return window.addEventListener("resize",d),c&&c.addEventListener("scroll",d),()=>{window.removeEventListener("resize",d),c&&c.removeEventListener("scroll",d)}},[t,s,e]),Ke(()=>(t.getEditorState().read(()=>{s()}),Oi(t.registerUpdateListener(({editorState:c})=>{c.read(()=>{s()})}),t.registerCommand(Nu,()=>(s(),!1),Lu))),[t,s]),Bi("div",{className:"inline-toolbar-popup",ref:o,children:[X("div",{className:"caret",ref:r}),t.isEditable()&&X(Te.Fragment,{children:n?.features&&n.features?.toolbarInline?.groups.map((c,d)=>X(_u,{anchorElem:e,editor:t,group:c,index:d},c.key))})]})}function vu(e,t){let[o,r]=ku(!1),n=Ve(()=>{e.getEditorState().read(()=>{if(e.isComposing())return;let i=Hi(),l=window.getSelection(),a=e.getRootElement();if(l!==null&&(!Ai(i)||a===null||!a.contains(l.anchorNode))){r(!1);return}if(!Ai(i))return;if(i.getTextContent()!==""){let c=i.getNodes(),d=!1;for(let p of c)if(yu(p)){r(!0),d=!0;break}d||r(!1)}else r(!1);let s=i.getTextContent().replace(/\n/g,"");if(!i.isCollapsed()&&s===""){r(!1);return}})},[e]);return Ke(()=>(document.addEventListener("selectionchange",n),document.addEventListener("mouseup",n),()=>{document.removeEventListener("selectionchange",n),document.removeEventListener("mouseup",n)}),[n]),Ke(()=>Oi(e.registerUpdateListener(()=>{n()}),e.registerRootListener(()=>{e.getRootElement()===null&&r(!1)})),[e,n]),o?wu(X(Su,{anchorElem:t,editor:e}),t):null}var $i=({anchorElem:e})=>{let[t]=Eu();return vu(t,e)};var Iu=L({plugins:[{Component:$i,position:"floatingAnchorElem"}]});import{TableCellNode as Jp,TableNode as Yp,TableRowNode as qp}from"@lexical/table";import{jsx as Gi}from"react/jsx-runtime";var No=()=>Gi("svg",{className:"icon",fill:"none",height:"20",viewBox:"0 0 20 20",width:"20",xmlns:"http://www.w3.org/2000/svg",children:Gi("path",{clipRule:"evenodd",d:"M5.33333 4.5C4.8731 4.5 4.5 4.8731 4.5 5.33333V7.5H9.5V4.5H5.33333ZM5.33333 3.5C4.32081 3.5 3.5 4.32081 3.5 5.33333V14.6667C3.5 15.6792 4.32081 16.5 5.33333 16.5H14.6667C15.6792 16.5 16.5 15.6792 16.5 14.6667V5.33333C16.5 4.32081 15.6792 3.5 14.6667 3.5H5.33333ZM10.5 4.5V7.5H15.5V5.33333C15.5 4.8731 15.1269 4.5 14.6667 4.5H10.5ZM15.5 8.5H10.5V11.5H15.5V8.5ZM15.5 12.5H10.5V15.5H14.6667C15.1269 15.5 15.5 15.1269 15.5 14.6667V12.5ZM9.5 15.5V12.5H4.5V14.6667C4.5 15.1269 4.8731 15.5 5.33333 15.5H9.5ZM4.5 11.5H9.5V8.5H4.5V11.5Z",fill:"currentColor",fillRule:"evenodd"})});import{useLexicalComposerContext as zi}from"@lexical/react/LexicalComposerContext";import{useLexicalEditable as Mu}from"@lexical/react/useLexicalEditable";import{$deleteTableColumn__EXPERIMENTAL as Pu,$deleteTableRow__EXPERIMENTAL as Au,$getNodeTriplet as Du,$getTableCellNodeFromLexicalNode as Ou,$getTableColumnIndexFromTableCellNode as Hu,$getTableNodeFromLexicalNodeOrThrow as Tt,$getTableRowIndexFromTableCellNode as $u,$insertTableColumn__EXPERIMENTAL as Bu,$insertTableRow__EXPERIMENTAL as Gu,$isTableCellNode as je,$isTableRowNode as Ro,$isTableSelection as yt,$unmergeCell as Uu,TableCellHeaderStates as Ee,TableCellNode as Wu,getTableObserverFromTableElement as zu}from"@lexical/table";import{useScrollInfo as Vu}from"@payloadcms/ui";import{$createParagraphNode as Ku,$getRoot as ju,$getSelection as Lt,$isElementNode as Xu,$isParagraphNode as Vi,$isRangeSelection as _o,$isTextNode as Zu}from"lexical";import*as So from"react";import{useCallback as oe,useEffect as pe,useRef as Et,useState as ye}from"react";import{createPortal as Ki}from"react-dom";import{jsx as ko,jsxs as Fu}from"react/jsx-runtime";var Ui=()=>Fu("svg",{fill:"none",height:"18",viewBox:"0 0 20 20",width:"18",xmlns:"http://www.w3.org/2000/svg",children:[ko("path",{d:"M5 11C5.55228 11 6 10.5523 6 10C6 9.44772 5.55228 9 5 9C4.44772 9 4 9.44772 4 10C4 10.5523 4.44772 11 5 11Z",fill:"currentColor"}),ko("path",{d:"M10 11C10.5523 11 11 10.5523 11 10C11 9.44772 10.5523 9 10 9C9.44772 9 9 9.44772 9 10C9 10.5523 9.44772 11 10 11Z",fill:"currentColor"}),ko("path",{d:"M15 11C15.5523 11 16 10.5523 16 10C16 9.44772 15.5523 9 15 9C14.4477 9 14 9.44772 14 10C14 10.5523 14.4477 11 15 11Z",fill:"currentColor"})]});import{jsx as D,jsxs as re}from"react/jsx-runtime";function wo(e){let t=e.getShape();return{columns:t.toX-t.fromX+1,rows:t.toY-t.fromY+1}}function Ju(e){let t=e.getNodes(),o=[],r=null,n=null,i=0;for(let l=0;l<t.length;l++){let a=t[l];if(je(a)){let s=a.getParentOrThrow();if(ce(Ro(s),"Expected CellNode to have a RowNode parent"),r!==s){if(n!==null&&i!==n)return!1;r!==null&&(n=i),r=s,i=0}let c=a.__colSpan;for(let d=0;d<c;d++)o[i+d]===void 0&&(o[i+d]=0),o[i+d]+=a.__rowSpan;i+=c}}return(n===null||i===n)&&o.every(l=>l===o[0])}function Yu(){let e=Lt();if(_o(e)&&!e.isCollapsed()||yt(e)&&!e.anchor.is(e.focus)||!_o(e)&&!yt(e))return!1;let[t]=Du(e.anchor);return t.__colSpan>1||t.__rowSpan>1}function Wi(e){if(e.getChildrenSize()!==1)return!1;let t=e.getFirstChildOrThrow();return!(!Vi(t)||!t.isEmpty())}function qu(e){let t=e.getLastDescendant();Zu(t)?t.select():Xu(t)?t.selectEnd():t!==null&&t.selectNext()}function Qu({cellMerge:e,contextRef:t,onClose:o,setIsMenuOpen:r,tableCellNode:n}){let[i]=zi(),l=Et(null),[a,s]=ye(n),[c,d]=ye({columns:1,rows:1}),[p,u]=ye(!1),[m,g]=ye(!1),{y:f}=Vu();pe(()=>i.registerMutationListener(Wu,b=>{b.get(a.getKey())==="updated"&&i.getEditorState().read(()=>{s(a.getLatest())})},{skipInitialization:!0}),[i,a]),pe(()=>{i.getEditorState().read(()=>{let b=Lt();if(yt(b)){let C=wo(b);d(wo(b)),u(Ju(b)&&(C.columns>1||C.rows>1))}g(Yu())})},[i]),pe(()=>{let b=t.current,C=l.current,R=i.getRootElement();if(b!=null&&C!=null&&R!=null){let w=R.getBoundingClientRect(),y=b.getBoundingClientRect();C.style.opacity="1";let S=C.getBoundingClientRect(),A=5,O=y.right+A;if(O+S.width>window.innerWidth||O+S.width>w.right){let W=y.left-S.width-A;O=(W<0?A:W)+window.pageXOffset}C.style.left=`${O+window.pageXOffset}px`;let H=y.top;if(H+S.height>window.innerHeight){let W=y.bottom-S.height;H=(W<0?A:W)+window.pageYOffset}C.style.top=`${H}px`}},[t,l,i,f]),pe(()=>{function b(C){l.current!=null&&t.current!=null&&!l.current.contains(C.target)&&!t.current.contains(C.target)&&r(!1)}return window.addEventListener("click",b),()=>window.removeEventListener("click",b)},[r,t]);let x=oe(()=>{i.update(()=>{if(a.isAttached()){let C=Tt(a),R=i.getElementByKey(C.getKey());if(!R)throw new Error("Expected to find tableElement in DOM");let w=zu(R);w!==null&&w.clearHighlight(),C.markDirty(),s(a.getLatest())}ju().selectStart()})},[i,a]),h=()=>{i.update(()=>{let b=Lt();if(yt(b)){let{columns:C,rows:R}=wo(b),w=b.getNodes(),y=null;for(let S=0;S<w.length;S++){let A=w[S];if(je(A))if(y===null){A.setColSpan(C).setRowSpan(R),y=A;let O=Wi(A),H;O&&Vi(H=A.getFirstChild())&&H.remove()}else je(y)&&(Wi(A)||y.append(...A.getChildren()),A.remove())}y!==null&&(y.getChildrenSize()===0&&y.append(Ku()),qu(y)),o()}})},I=()=>{i.update(()=>{Uu()})},P=oe(b=>{i.update(()=>{Gu(b),o()})},[i,o]),T=oe(b=>{i.update(()=>{for(let C=0;C<c.columns;C++)Bu(b);o()})},[i,o,c.columns]),k=oe(()=>{i.update(()=>{Au(),o()})},[i,o]),E=oe(()=>{i.update(()=>{Tt(a).remove(),x(),o()})},[i,a,x,o]),_=oe(()=>{i.update(()=>{Pu(),o()})},[i,o]),M=oe(()=>{i.update(()=>{let b=Tt(a),C=$u(a),R=b.getChildren();if(C>=R.length||C<0)throw new Error("Expected table cell to be inside of table row.");let w=R[C];if(!Ro(w))throw new Error("Expected table row");w.getChildren().forEach(y=>{if(!je(y))throw new Error("Expected table cell");y.toggleHeaderStyle(Ee.ROW)}),x(),o()})},[i,a,x,o]),F=oe(()=>{i.update(()=>{let b=Tt(a),C=Hu(a),R=b.getChildren(),w=Math.max(...R.map(y=>y.getChildren().length));if(C>=w||C<0)throw new Error("Expected table cell to be inside of table row.");for(let y=0;y<R.length;y++){let S=R[y];if(!Ro(S))throw new Error("Expected table row");let A=S.getChildren();if(C>=A.length)continue;let O=A[C];if(!je(O))throw new Error("Expected table cell");O.toggleHeaderStyle(Ee.COLUMN)}x(),o()})},[i,a,x,o]),N=null;return e&&(p?N=D("button",{className:"item","data-test-id":"table-merge-cells",onClick:()=>h(),type:"button",children:"Merge cells"}):m&&(N=D("button",{className:"item","data-test-id":"table-unmerge-cells",onClick:()=>I(),type:"button",children:"Unmerge cells"}))),Ki(re("div",{className:"table-action-menu-dropdown",onClick:b=>{b.stopPropagation()},ref:l,children:[N?re(So.Fragment,{children:[N,D("hr",{})]}):null,D("button",{className:"item","data-test-id":"table-insert-row-above",onClick:()=>P(!1),type:"button",children:re("span",{className:"text",children:["Insert ",c.rows===1?"row":`${c.rows} rows`," above"]})}),D("button",{className:"item","data-test-id":"table-insert-row-below",onClick:()=>P(!0),type:"button",children:re("span",{className:"text",children:["Insert ",c.rows===1?"row":`${c.rows} rows`," below"]})}),D("hr",{}),D("button",{className:"item","data-test-id":"table-insert-column-before",onClick:()=>T(!1),type:"button",children:re("span",{className:"text",children:["Insert ",c.columns===1?"column":`${c.columns} columns`," ","left"]})}),D("button",{className:"item","data-test-id":"table-insert-column-after",onClick:()=>T(!0),type:"button",children:re("span",{className:"text",children:["Insert ",c.columns===1?"column":`${c.columns} columns`," ","right"]})}),D("hr",{}),D("button",{className:"item","data-test-id":"table-delete-columns",onClick:()=>_(),type:"button",children:D("span",{className:"text",children:"Delete column"})}),D("button",{className:"item","data-test-id":"table-delete-rows",onClick:()=>k(),type:"button",children:D("span",{className:"text",children:"Delete row"})}),D("button",{className:"item","data-test-id":"table-delete",onClick:()=>E(),type:"button",children:D("span",{className:"text",children:"Delete table"})}),D("hr",{}),D("button",{className:"item",onClick:()=>M(),type:"button",children:re("span",{className:"text",children:[(a.__headerState&Ee.ROW)===Ee.ROW?"Remove":"Add"," ","row header"]})}),D("button",{className:"item","data-test-id":"table-column-header",onClick:()=>F(),type:"button",children:re("span",{className:"text",children:[(a.__headerState&Ee.COLUMN)===Ee.COLUMN?"Remove":"Add"," ","column header"]})})]}),document.body)}function ep({anchorElem:e,cellMerge:t}){let[o]=zi(),r=Et(null),n=Et(null),[i,l]=ye(!1),[a,s]=ye(null),c=oe(()=>{let p=r.current,u=Lt(),m=window.getSelection(),g=document.activeElement;if(u==null||p==null){s(null);return}let f=o.getRootElement();if(_o(u)&&f!==null&&m!==null&&f.contains(m.anchorNode)){let x=Ou(u.anchor.getNode());if(x==null){s(null);return}if(o.getElementByKey(x.getKey())==null){s(null);return}s(x)}else g||s(null)},[o]);pe(()=>o.registerUpdateListener(()=>{o.getEditorState().read(()=>{c()})})),pe(()=>{let p=r.current;if(p!=null&&a!=null){let u=o.getElementByKey(a.getKey());if(u!=null){let m=u.getBoundingClientRect(),g=p.getBoundingClientRect(),f=e.getBoundingClientRect(),x=m.top-f.top+4,h=m.right-g.width-10-f.left;p.style.opacity="1",p.style.transform=`translate(${h}px, ${x}px)`}else p.style.opacity="0",p.style.transform="translate(-10000px, -10000px)"}},[r,a,o,e]);let d=Et(a);return pe(()=>{d.current!==a&&l(!1),d.current=a},[d,a]),D("div",{className:"table-cell-action-button-container",ref:r,children:a!=null&&re(So.Fragment,{children:[D("button",{className:"table-cell-action-button",onClick:p=>{p.stopPropagation(),l(!i)},ref:n,type:"button",children:D(Ui,{})}),i&&D(Qu,{cellMerge:t,contextRef:n,onClose:()=>l(!1),setIsMenuOpen:l,tableCellNode:a})]})})}var ji=({anchorElem:e})=>{let t=Mu();return Ki(t?D(ep,{anchorElem:e??document.body,cellMerge:!0}):null,e??document.body)};import{useLexicalComposerContext as tp}from"@lexical/react/LexicalComposerContext";import{useLexicalEditable as op}from"@lexical/react/useLexicalEditable";import{$computeTableMapSkipCellCheck as rp,$getTableNodeFromLexicalNodeOrThrow as vo,$getTableRowIndexFromTableCellNode as np,$isTableCellNode as Xi,$isTableRowNode as ip,getDOMCellFromTarget as lp}from"@lexical/table";import{calculateZoomLevel as Zi}from"@lexical/utils";import{$getNearestNodeFromDOMNode as Io}from"lexical";import*as Ji from"react";import{useCallback as Le,useEffect as sp,useMemo as ap,useRef as Nt,useState as kt}from"react";import{createPortal as cp}from"react-dom";import{jsx as wt,jsxs as mp}from"react/jsx-runtime";var dp=33,up=50;function pp({editor:e}){let t=Nt(null),o=Nt(null),r=Nt(null),n=$(),i=Nt(null),[l,a]=kt(null),[s,c]=kt(null),[d,p]=kt(!1),[u,m]=kt(null),g=Le(()=>{c(null),t.current=null,m(null),i.current=null,r.current=null},[]),f=N=>(N.buttons&1)===1;sp(()=>{let N=w=>{setTimeout(()=>{let y=w.target;if(u){a({x:w.clientX,y:w.clientY});return}if(p(f(w)),!(o.current&&o.current.contains(y))&&t.current!==y){t.current=y;let S=lp(y);S&&s!==S?e.update(()=>{let A=Io(S.elem);if(!A)throw new Error("TableCellResizer: Table cell node not found.");let O=vo(A),H=e.getElementByKey(O.getKey());if(!H)throw new Error("TableCellResizer: Table element not found.");t.current=y,r.current=H.getBoundingClientRect(),c(S)}):S==null&&g()}},0)},b=w=>{setTimeout(()=>{p(!0)},0)},C=w=>{setTimeout(()=>{p(!1)},0)},R=e.registerRootListener((w,y)=>{w?.addEventListener("mousemove",N),w?.addEventListener("mousedown",b),w?.addEventListener("mouseup",C),y?.removeEventListener("mousemove",N),y?.removeEventListener("mousedown",b),y?.removeEventListener("mouseup",C)});return()=>{R()}},[s,u,e,g]);let x=N=>N==="bottom",h=Le(N=>{if(!s)throw new Error("TableCellResizer: Expected active cell.");e.update(()=>{let b=Io(s.elem);if(!Xi(b))throw new Error("TableCellResizer: Table cell node not found.");let C=vo(b),R=np(b),w=C.getChildren();if(R>=w.length||R<0)throw new Error("Expected table cell to be inside of table row.");let y=w[R];if(!ip(y))throw new Error("Expected table row");let S=y.getHeight();if(S===void 0){let O=y.getChildren();S=Math.min(...O.map(H=>P(H,e)??1/0))}let A=Math.max(S+N,dp);y.setHeight(A)},{tag:"skip-scroll-into-view"})},[s,e]),I=(N,b)=>{let C=N.getWidth();if(C!==void 0)return C;let R=b.getElementByKey(N.getKey());if(R==null)return;let w=getComputedStyle(R);return R.clientWidth-parseFloat(w.paddingLeft)-parseFloat(w.paddingRight)},P=(N,b)=>b.getElementByKey(N.getKey())?.clientHeight,T=(N,b)=>{for(let C=0;C<b.length;C++)for(let R=0;R<b[C].length;R++)if(b[C][R].cell===N)return R},k=Le(N=>{if(!s)throw new Error("TableCellResizer: Expected active cell.");e.update(()=>{let b=Io(s.elem);if(!Xi(b))throw new Error("TableCellResizer: Table cell node not found.");let C=vo(b),[R]=rp(C,null,null),w=T(b,R);if(w===void 0)throw new Error("TableCellResizer: Table column not found.");for(let y=0;y<R.length;y++){let S=R[y][w];if(S.startRow===y&&(w===R[y].length-1||R[y][w].cell!==R[y][w+1].cell)){let A=I(S.cell,e);if(A===void 0)continue;let O=Math.max(A+N,up);S.cell.setWidth(O)}}},{tag:"skip-scroll-into-view"})},[s,e]),E=Le(N=>{let b=C=>{if(C.preventDefault(),C.stopPropagation(),!s)throw new Error("TableCellResizer: Expected active cell.");if(i.current){let{x:R,y:w}=i.current;if(s===null)return;let y=Zi(C.target);if(x(N)){let S=(C.clientY-w)/y;h(S)}else{let S=(C.clientX-R)/y;k(S)}g(),document.removeEventListener("mouseup",b)}};return b},[s,g,k,h]),_=Le(N=>b=>{if(b.preventDefault(),b.stopPropagation(),!s)throw new Error("TableCellResizer: Expected active cell.");i.current={x:b.clientX,y:b.clientY},a(i.current),m(N),document.addEventListener("mouseup",E(N))},[s,E]),F=Le(()=>{if(s){let{height:N,left:b,top:C,width:R}=s.elem.getBoundingClientRect(),w=Zi(s.elem),y=10,S={bottom:{backgroundColor:"none",cursor:"row-resize",height:`${y}px`,left:`${window.pageXOffset+b}px`,top:`${window.pageYOffset+C+N-y/2}px`,width:`${R}px`},right:{backgroundColor:"none",cursor:"col-resize",height:`${N}px`,left:`${window.pageXOffset+b+R-y/2}px`,top:`${window.pageYOffset+C}px`,width:`${y}px`}},A=r.current;return u&&l&&A&&(x(u)?(S[u].left=`${window.pageXOffset+A.left}px`,S[u].top=`${window.pageYOffset+l.y/w}px`,S[u].height="3px",S[u].width=`${A.width}px`):(S[u].top=`${window.pageYOffset+A.top}px`,S[u].left=`${window.pageXOffset+l.x/w}px`,S[u].width="3px",S[u].height=`${A.height}px`),S[u].backgroundColor="#adf"),S}return{bottom:null,left:null,right:null,top:null}},[s,u,l])();return wt("div",{ref:o,children:s!=null&&!d&&mp(Ji.Fragment,{children:[wt("div",{className:`${n.editorConfig.lexical.theme.tableCellResizer} TableCellResizer__ui`,onMouseDown:_("right"),style:F.right||void 0}),wt("div",{className:`${n.editorConfig.lexical.theme.tableCellResizer} TableCellResizer__ui`,onMouseDown:_("bottom"),style:F.bottom||void 0})]})})}var Yi=()=>{let[e]=tp(),t=op();return ap(()=>t?cp(wt(pp,{editor:e}),document.body):null,[e,t])};import{useLexicalComposerContext as Tp}from"@lexical/react/LexicalComposerContext";import{$getTableColumnIndexFromTableCellNode as Ep,$getTableRowIndexFromTableCellNode as yp,$insertTableColumn__EXPERIMENTAL as Lp,$insertTableRow__EXPERIMENTAL as Np,$isTableCellNode as kp,$isTableNode as el,TableNode as wp}from"@lexical/table";import{$findMatchingParent as Rp,mergeRegister as _p}from"@lexical/utils";import{$getNearestNodeFromDOMNode as tl}from"lexical";import{useEffect as ol,useRef as rl,useState as Rt}from"react";import{createPortal as Sp}from"react-dom";import{useMemo as bp,useRef as xp}from"react";var fp="Expected a function",gp=Math.max,Cp=Math.min;function hp(e,t,o){let r,n,i,l,a,s,c=0,d=!1,p=!1,u=!0;if(typeof e!="function")throw new TypeError(fp);t=t||0,typeof o=="object"&&(d=!!o.leading,p="maxWait"in o,i=p?gp(o.maxWait||0,t):i,u="trailing"in o?!!o.trailing:u);function m(E){let _=r,M=n;return r=n=void 0,c=E,l=e.apply(M,_),l}function g(E){return c=E,a=setTimeout(h,t),d?m(E):l}function f(E){let _=E-s,M=E-c,F=t-_;return p?Cp(F,i-M):F}function x(E){let _=E-s,M=E-c;return s===void 0||_>=t||_<0||p&&M>=i}function h(){let E=Date.now();if(x(E))return I(E);a=setTimeout(h,f(E))}function I(E){return a=void 0,u&&r?m(E):(r=n=void 0,l)}function P(){a!==void 0&&clearTimeout(a),c=0,r=s=n=a=void 0}function T(){return a===void 0?l:I(Date.now())}function k(){let E=Date.now(),_=x(E);if(r=arguments,n=this,s=E,_){if(a===void 0)return g(s);if(p)return clearTimeout(a),a=setTimeout(h,t),m(s)}return a===void 0&&(a=setTimeout(h,t)),l}return k.cancel=P,k.flush=T,k}var qi=hp;function Qi(e,t,o){let r=xp(null);return r.current=e,bp(()=>qi((...n)=>{r.current&&r.current(...n)},t,{maxWait:o}),[t,o])}import{Fragment as Fp,jsx as Fo,jsxs as Mp}from"react/jsx-runtime";var nl=20;function vp({anchorElem:e}){let[t]=Tp(),o=$(),[r,n]=Rt(!1),[i,l]=Rt(!1),[a,s]=Rt(!1),[c,d]=Rt({}),p=rl(new Set),u=rl(null),m=Qi(f=>{let{isOutside:x,tableDOMNode:h}=Ip(f,o.editorConfig?.lexical);if(x){n(!1),l(!1);return}if(!h)return;u.current=h;let I=null,P=null,T=null;if(t.update(()=>{let k=tl(h);if(kp(k)){let E=Rp(k,_=>el(_));if(!el(E))return;if(T=t.getElementByKey(E?.getKey()),T){let _=E.getChildrenSize(),M=E.getChildAtIndex(0)?.getChildrenSize(),F=yp(k),N=Ep(k);F===_-1?I=k:N===M-1&&(P=k)}}}),T){let{bottom:k,height:E,right:_,width:M,x:F,y:N}=T.getBoundingClientRect(),{left:b,y:C}=e.getBoundingClientRect();I?(l(!1),n(!0),d({height:nl,left:F-b,top:k-C+5,width:M})):P&&(l(!0),n(!1),d({height:E,left:_-b+5,top:N-C,width:nl}))}},50,250);ol(()=>{if(a)return document.addEventListener("mousemove",m),()=>{n(!1),l(!1),document.removeEventListener("mousemove",m)}},[a,m]),ol(()=>_p(t.registerMutationListener(wp,f=>{t.getEditorState().read(()=>{for(let[x,h]of f)switch(h){case"created":p.current.add(x),s(p.current.size>0);break;case"destroyed":p.current.delete(x),s(p.current.size>0);break;default:break}})},{skipInitialization:!1})),[t]);let g=f=>{t.update(()=>{u.current&&(tl(u.current)?.selectEnd(),f?(Np(),n(!1)):(Lp(),l(!1)))})};return Mp(Fp,{children:[r&&Fo("button",{className:o.editorConfig.lexical.theme.tableAddRows,onClick:()=>g(!0),style:{...c}}),i&&Fo("button",{className:o.editorConfig.lexical.theme.tableAddColumns,onClick:()=>g(!1),style:{...c}})]})}function Ip(e,t){let o=e.target;if(o&&o instanceof HTMLElement){let r=o.closest(`td.${t.theme.tableCell}, th.${t.theme.tableCell}`);return{isOutside:!(r||o.closest(`button.${t.theme.tableAddRows}`)||o.closest(`button.${t.theme.tableAddColumns}`)||o.closest(`div.${t.theme.tableCellResizer}`)),tableDOMNode:r}}else return{isOutside:!0,tableDOMNode:null}}function il({anchorElem:e=document.body}){return Sp(Fo(vp,{anchorElem:e}),e)}import{useLexicalComposerContext as Pp}from"@lexical/react/LexicalComposerContext";import{TablePlugin as Ap}from"@lexical/react/LexicalTablePlugin";import{INSERT_TABLE_COMMAND as Dp,TableNode as Op}from"@lexical/table";import{mergeRegister as Hp}from"@lexical/utils";import{useModal as $p}from"@payloadcms/ui";import{$getSelection as Bp,$isRangeSelection as Gp,COMMAND_PRIORITY_EDITOR as Up,createCommand as Wp}from"lexical";import{createContext as zp,useContext as Vp,useEffect as Kp,useMemo as jp,useState as Xp}from"react";import*as ll from"react";import{jsx as Po,jsxs as Zp}from"react/jsx-runtime";var _t=Wp("OPEN_EMBED_DRAWER_COMMAND"),sl=zp({cellEditorConfig:null,cellEditorPlugins:null,set:()=>{}}),Mo="lexical-table-create";function al({children:e}){let[t,o]=Xp({cellEditorConfig:null,cellEditorPlugins:null});return Po(sl.Provider,{value:jp(()=>({cellEditorConfig:t.cellEditorConfig,cellEditorPlugins:t.cellEditorPlugins,set:(r,n)=>{o({cellEditorConfig:r,cellEditorPlugins:n})}}),[t.cellEditorConfig,t.cellEditorPlugins]),children:e})}var cl=()=>{let[e]=Pp(),t=Vp(sl),{closeModal:o,toggleModal:r}=$p();return Kp(()=>(e.hasNodes([Op])||ce(!1,"TablePlugin: TableNode is not registered on editor"),Hp(e.registerCommand(_t,()=>{let n=null;return e.getEditorState().read(()=>{let i=Bp();Gp(i)&&(n=i)}),n&&r(Mo),!0},Up))),[t,e,r]),Zp(ll.Fragment,{children:[Po(le,{drawerSlug:Mo,drawerTitle:"Create Table",featureKey:"experimental_table",handleDrawerSubmit:(n,i)=>{o(Mo),!(!i.columns||!i.rows)&&e.dispatchCommand(Dp,{columns:String(i.columns),rows:String(i.rows)})},schemaPathSuffix:"fields"}),Po(Ap,{hasCellBackgroundColor:!1,hasCellMerge:!0})]})};var Qp=L({nodes:[Yp,Jp,qp],plugins:[{Component:cl,position:"normal"},{Component:Yi,position:"normal"},{Component:ji,position:"floatingAnchorElem"},{Component:il,position:"floatingAnchorElem"}],providers:[al],slashMenu:{groups:[G([{Icon:No,key:"table",keywords:["table"],label:"Table",onSelect:({editor:e})=>{e.dispatchCommand(_t,{})}}])]},toolbarFixed:{groups:[Y([{ChildComponent:No,key:"table",label:"Table",onSelect:({editor:e})=>{e.dispatchCommand(_t,{})}}])]}});import{$isNodeSelection as Em}from"lexical";import{jsx as Ao,jsxs as em}from"react/jsx-runtime";var Do=()=>em("svg",{"aria-hidden":"true",className:"icon",fill:"none",focusable:"false",height:"20",viewBox:"0 0 20 20",width:"20",xmlns:"http://www.w3.org/2000/svg",children:[Ao("path",{d:"M14.6667 4H5.33333C4.59695 4 4 4.59695 4 5.33333V14.6667C4 15.403 4.59695 16 5.33333 16H14.6667C15.403 16 16 15.403 16 14.6667V5.33333C16 4.59695 15.403 4 14.6667 4Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),Ao("path",{d:"M7.99984 9.33366C8.73622 9.33366 9.33317 8.73671 9.33317 8.00033C9.33317 7.26395 8.73622 6.66699 7.99984 6.66699C7.26346 6.66699 6.6665 7.26395 6.6665 8.00033C6.6665 8.73671 7.26346 9.33366 7.99984 9.33366Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),Ao("path",{d:"M16 11.9995L13.9427 9.94214C13.6926 9.69218 13.3536 9.55176 13 9.55176C12.6464 9.55176 12.3074 9.69218 12.0573 9.94214L6 15.9995",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"})]});import{useLexicalComposerContext as dm}from"@lexical/react/LexicalComposerContext.js";import{$insertNodeToNearestRoot as um,mergeRegister as pm}from"@lexical/utils";import{useConfig as mm}from"@payloadcms/ui";import{$getPreviousSelection as fm,$getSelection as gm,$isParagraphNode as ul,$isRangeSelection as Cm,COMMAND_PRIORITY_EDITOR as hm,createCommand as bm}from"lexical";import{useEffect as xm}from"react";import{useLexicalComposerContext as tm}from"@lexical/react/LexicalComposerContext.js";import{useListDrawer as om}from"@payloadcms/ui";import{$getNodeByKey as rm,COMMAND_PRIORITY_EDITOR as nm}from"lexical";import{useCallback as im,useEffect as lm,useState as sm}from"react";import{jsx as Oo}from"react/jsx-runtime";var am=({editor:e,relationTo:t,replaceNodeKey:o,value:r})=>{o?e.update(()=>{let n=rm(o);n&&n.replace(Fe({data:{fields:null,relationTo:t,value:r}}))}):e.dispatchCommand(Ho,{fields:null,relationTo:t,value:r})},cm=({enabledCollectionSlugs:e})=>{let[t]=tm(),[o,r]=sm(null),[n,i,{closeDrawer:l,openDrawer:a}]=om({collectionSlugs:e,uploads:!0});lm(()=>t.registerCommand(ve,c=>(r(c?.replace?c?.replace.nodeKey:null),a(),!0),nm),[t,a]);let s=im(({collectionSlug:c,docID:d})=>{am({editor:t,relationTo:c,replaceNodeKey:o,value:d}),l()},[t,l,o]);return Oo(n,{onSelect:s})},dl=e=>Oo(Ye,{...e,uploads:!0,children:Oo(cm,{...e})});import{jsx as Tm}from"react/jsx-runtime";var Ho=bm("INSERT_UPLOAD_COMMAND"),pl=({clientProps:e})=>{let[t]=dm(),{collections:o}=mm();return xm(()=>{if(!t.hasNodes([Ie]))throw new Error("UploadPlugin: UploadNode not registered on editor");return pm(t.registerCommand(Ho,r=>(t.update(()=>{let n=gm()||fm();if(Cm(n)){let i=Fe({data:{id:r.id,fields:r.fields,relationTo:r.relationTo,value:r.value}});um(i);let{focus:l}=n,a=l.getNode();ul(a)&&a.getTextContentSize()===0&&a.getParent().getChildren().filter(s=>ul(s)).length>1&&a.remove()}}),!0),hm))},[t]),Tm(dl,{enabledCollectionSlugs:o.map(({slug:r})=>r)})};var ym=L({nodes:[Ie],plugins:[{Component:pl,position:"normal"}],slashMenu:{groups:[G([{Icon:Do,key:"upload",keywords:["upload","image","file","img","picture","photo","media"],label:({i18n:e})=>e.t("lexical:upload:label"),onSelect:({editor:e})=>{e.dispatchCommand(ve,{replace:!1})}}])]},toolbarFixed:{groups:[Y([{ChildComponent:Do,isActive:({selection:e})=>{if(!Em(e)||!e.getNodes().length)return!1;let t=e.getNodes()[0];return At(t)},key:"upload",label:({i18n:e})=>e.t("lexical:upload:label"),onSelect:({editor:e})=>{e.dispatchCommand(ve,{replace:!1})}}])]}});import{ShimmerEffect as Lm,useClientFunctions as Nm,useFieldProps as km}from"@payloadcms/ui";import ml,{Suspense as wm,lazy as Rm,useEffect as _m,useState as $o}from"react";import{jsx as St,jsxs as Im}from"react/jsx-runtime";var Sm=Rm(()=>import("./Field-5GGTGCKC.js").then(e=>({default:e.RichText}))),vm=e=>{let{admin:t,lexicalEditorConfig:o,richTextComponentMap:r}=e,{schemaPath:n}=km(),i=Nm(),[l,a]=$o(!1),[s,c]=$o([]),[d,p]=$o(null),u=r.get("features");u=u.sort((g,f)=>g.order-f.order);let m=0;for(let g of u){let f=Array.from(r.keys()).filter(x=>x.startsWith(`lexical_internal_feature.${g.key}.lexical_internal_components.`));m+=1,m+=f.length}return _m(()=>{if(!l){let g=[],f=0;if(Object.entries(i).forEach(([x,h])=>{x.startsWith(`lexicalFeature.${n}.`)&&(x.includes(".lexical_internal_components.")||g.push(h),f++)}),f===m){c(g),a(!0);let x=qe({clientFunctions:i,schemaPath:n,unSanitizedEditorConfig:{features:g,lexical:o}});p(Pe(o||Me,x,t))}}},[t,l,i,n,u.length,s,d,o,m]),l?St(wm,{fallback:St(Lm,{height:"35vh"}),children:d&&St(Sm,{...e,editorConfig:d})}):St(ml.Fragment,{children:Array.isArray(u)&&u.map(g=>{let x=Array.from(r.keys()).filter(h=>h.startsWith(`lexical_internal_feature.${g.key}.lexical_internal_components.`)).map(h=>r.get(h));return Im(ml.Fragment,{children:[x?.length?x.map(h=>h):null,g.ClientFeature]},g.key)})})};function Fm(...e){return e.filter(Boolean).join(" ")}var vt=new WeakMap;function fl(e){let t=e.changedTouches[0];return t===void 0?null:[t.clientX,t.clientY]}function It(e,t){let o=vt.get(e);if(o===void 0){let r=new Set,n=l=>{o!==void 0&&(o.start=fl(l))},i=l=>{if(o===void 0)return;let{start:a}=o;if(a===null)return;let s=fl(l);for(let c of r)s!==null&&c([s[0]-a[0],s[1]-a[1]],l)};e.addEventListener("touchstart",n),e.addEventListener("touchend",i),o={handleTouchend:i,handleTouchstart:n,listeners:r,start:null},vt.set(e,o)}return o.listeners.add(t),()=>{Mm(e,t)}}function Mm(e,t){let o=vt.get(e);if(o===void 0)return;let{listeners:r}=o;r.delete(t),r.size===0&&(vt.delete(e),e.removeEventListener("touchstart",o.handleTouchstart),e.removeEventListener("touchend",o.handleTouchend))}function Pm(e,t){return It(e,(o,r)=>{let[n,i]=o;n<0&&-n>Math.abs(i)&&t(n,r)})}function Am(e,t){return It(e,(o,r)=>{let[n,i]=o;n>0&&n>Math.abs(i)&&t(n,r)})}function Dm(e,t){return It(e,(o,r)=>{let[n,i]=o;i<0&&-i>Math.abs(n)&&t(n,r)})}function Om(e,t){return It(e,(o,r)=>{let[n,i]=o;i>0&&i>Math.abs(n)&&t(n,r)})}export{De as $createAutoLinkNode,nt as $createBlockNode,q as $createLinkNode,Se as $createRelationshipNode,Fe as $createUploadNode,ee as $isAutoLinkNode,jl as $isBlockNode,B as $isLinkNode,Pt as $isRelationshipNode,At as $isUploadNode,Pl as AlignFeatureClient,Q as AutoLinkNode,J as BlockNode,Bl as BlockquoteFeatureClient,cs as BlocksFeatureClient,Ss as BoldFeatureClient,K as CAN_USE_DOM,Gc as ChecklistFeatureClient,hd as DETAIL_TYPE_TO_DETAIL,md as DOUBLE_LINE_BREAK,xd as ELEMENT_FORMAT_TO_TYPE,bd as ELEMENT_TYPE_TO_FORMAT,Cl as ENABLE_SLASH_MENU_COMMAND,gl as EditorConfigProvider,le as FieldsDrawer,Tu as FixedToolbarFeatureClient,ia as HeadingFeatureClient,fa as HorizontalRuleFeatureClient,ud as IS_ALL_FORMATTING,xa as IndentFeatureClient,Ms as InlineCodeFeatureClient,Iu as InlineToolbarFeatureClient,Ds as ItalicFeatureClient,gd as LTR_REGEX,dd as LexicalPluginToLexicalFeatureClient,wc as LinkFeatureClient,V as LinkNode,pd as NON_BREAKING_SPACE,v as NodeFormat,Zc as OrderedListFeatureClient,Id as ParagraphFeatureClient,bl as Point,fd as RTL_REGEX,Tl as Rect,Jd as RelationshipFeatureClient,_e as RelationshipNode,kl as RichTextCell,vm as RichTextField,Sd as SlateToLexicalFeatureClient,Bs as StrikethroughFeatureClient,Ws as SubscriptFeatureClient,Ks as SuperscriptFeatureClient,Td as TEXT_MODE_TO_TYPE,Cd as TEXT_TYPE_TO_FORMAT,Ed as TEXT_TYPE_TO_MODE,Z as TOGGLE_LINK_COMMAND,Qp as TableFeatureClient,ys as TestRecorderFeatureClient,Ue as ToolbarButton,ue as ToolbarDropdown,ws as TreeViewFeatureClient,Js as UnderlineFeatureClient,rd as UnorderedListFeatureClient,ym as UploadFeatureClient,Ie as UploadNode,Om as addSwipeDownListener,Pm as addSwipeLeftListener,Am as addSwipeRightListener,Dm as addSwipeUpListener,Jt as createBlockNode,Ut as createClientComponent,L as createClientFeature,Me as defaultEditorLexicalConfig,Lo as getDOMRangeRect,Ft as getEnabledNodes,me as getSelectedNode,ce as invariant,hl as isHTMLElement,xl as isPoint,Fm as joinClasses,Pe as sanitizeClientEditorConfig,Wo as sanitizeClientFeatures,xt as setFloatingElemPosition,mt as setFloatingElemPositionForLinkEditor,G as slashMenuBasicGroupWithItems,Y as toolbarAddDropdownGroupWithItems,qt as toolbarFeatureButtonsGroupWithItems,U as toolbarFormatGroupWithItems,z as toolbarTextDropdownGroupWithItems,$ as useEditorConfigContext};
|
|
39
|
+
`,Xl="\u0591-\u07FF\uFB1D-\uFDFD\uFE70-\uFEFC",Jl="A-Za-z\xC0-\xD6\xD8-\xF6\xF8-\u02B8\u0300-\u0590\u0800-\u1FFF\u200E\u2C00-\uFB1C\uFE00-\uFE6F\uFEFD-\uFFFF",f1=new RegExp("^[^"+Jl+"]*["+Xl+"]"),h1=new RegExp("^[^"+Xl+"]*["+Jl+"]"),g1={bold:F.IS_BOLD,code:F.IS_CODE,highlight:F.IS_HIGHLIGHT,italic:F.IS_ITALIC,strikethrough:F.IS_STRIKETHROUGH,subscript:F.IS_SUBSCRIPT,superscript:F.IS_SUPERSCRIPT,underline:F.IS_UNDERLINE},C1={directionless:F.IS_DIRECTIONLESS,unmergeable:F.IS_UNMERGEABLE},x1={center:F.IS_ALIGN_CENTER,end:F.IS_ALIGN_END,justify:F.IS_ALIGN_JUSTIFY,left:F.IS_ALIGN_LEFT,right:F.IS_ALIGN_RIGHT,start:F.IS_ALIGN_START},b1={[F.IS_ALIGN_CENTER]:"center",[F.IS_ALIGN_END]:"end",[F.IS_ALIGN_JUSTIFY]:"justify",[F.IS_ALIGN_LEFT]:"left",[F.IS_ALIGN_RIGHT]:"right",[F.IS_ALIGN_START]:"start"},_1={normal:F.IS_NORMAL,segmented:F.IS_SEGMENTED,token:F.IS_TOKEN},T1={[F.IS_NORMAL]:"normal",[F.IS_SEGMENTED]:"segmented",[F.IS_TOKEN]:"token"};import{c as w1}from"react/compiler-runtime";import{jsx as E1}from"react/jsx-runtime";import"react";var N1=()=>{let t=w1(2),{EditButton:e}=_e(),o;return t[0]!==e?(o=e?E1(e,{}):null,t[0]=e,t[1]=o):o=t[1],o};import{c as k1}from"react/compiler-runtime";import{jsx as L1}from"react/jsx-runtime";import"react";var I1=()=>{let t=k1(2),{RemoveButton:e}=_e(),o;return t[0]!==e?(o=e?L1(e,{}):null,t[0]=e,t[1]=o):o=t[1],o};import{c as S1}from"react/compiler-runtime";import{jsx as R1}from"react/jsx-runtime";import"react";var y1=()=>{let t=S1(2),{Label:e}=_e(),o;return t[0]!==e?(o=e?R1(e,{}):null,t[0]=e,t[1]=o):o=t[1],o};import{c as v1}from"react/compiler-runtime";import{jsx as M1}from"react/jsx-runtime";import"react";var D1=t=>{let e=v1(3),{children:o}=t,{InlineBlockContainer:r}=_e(),n;return e[0]!==r||e[1]!==o?(n=r?M1(r,{children:o}):null,e[0]=r,e[1]=o,e[2]=n):n=e[2],n};import{c as A1}from"react/compiler-runtime";import{jsx as O1}from"react/jsx-runtime";import"react";var F1=t=>{let e=A1(6),{children:o,editButton:r,Label:n,removeButton:i}=t,{BlockCollapsible:l}=Me(),s;return e[0]!==l||e[1]!==r||e[2]!==n||e[3]!==i||e[4]!==o?(s=l?O1(l,{editButton:r,Label:n,removeButton:i,children:o}):null,e[0]=l,e[1]=r,e[2]=n,e[3]=i,e[4]=o,e[5]=s):s=e[5],s};import{c as $1}from"react/compiler-runtime";import{jsx as P1}from"react/jsx-runtime";import"react";var B1=()=>{let t=$1(2),{EditButton:e}=Me(),o;return t[0]!==e?(o=e?P1(e,{}):null,t[0]=e,t[1]=o):o=t[1],o};import{c as H1}from"react/compiler-runtime";import{jsx as j1}from"react/jsx-runtime";import"react";var G1=()=>{let t=H1(2),{RemoveButton:e}=Me(),o;return t[0]!==e?(o=e?j1(e,{}):null,t[0]=e,t[1]=o):o=t[1],o};export{et as $createAutoLinkNode,Nt as $createBlockNode,oo as $createInlineBlockNode,de as $createLinkNode,Ve as $createRelationshipNode,Ze as $createUploadNode,pe as $isAutoLinkNode,Et as $isBlockNode,ro as $isInlineBlockNode,V as $isLinkNode,no as $isRelationshipNode,io as $isUploadNode,cs as AlignFeatureClient,me as AutoLinkNode,F1 as BlockCollapsible,B1 as BlockEditButton,ce as BlockNode,G1 as BlockRemoveButton,hs as BlockquoteFeatureClient,da as BlocksFeatureClient,Aa as BoldFeatureClient,te as CAN_USE_DOM,nd as ChecklistFeatureClient,C1 as DETAIL_TYPE_TO_DETAIL,p1 as DOUBLE_LINE_BREAK,b1 as ELEMENT_FORMAT_TO_TYPE,x1 as ELEMENT_TYPE_TO_FORMAT,os as ENABLE_SLASH_MENU_COMMAND,ql as EditorConfigProvider,Ge as FieldsDrawer,Mm as FixedToolbarFeatureClient,gc as HeadingFeatureClient,Lc as HorizontalRuleFeatureClient,d1 as IS_ALL_FORMATTING,vc as IndentFeatureClient,D1 as InlineBlockContainer,N1 as InlineBlockEditButton,y1 as InlineBlockLabel,to as InlineBlockNode,I1 as InlineBlockRemoveButton,Ba as InlineCodeFeatureClient,Wm as InlineToolbarFeatureClient,Wa as ItalicFeatureClient,h1 as LTR_REGEX,Ld as LexicalPluginToLexicalFeatureClient,Wu as LinkFeatureClient,q as LinkNode,m1 as NON_BREAKING_SPACE,F as NodeFormat,md as OrderedListFeatureClient,Ad as ParagraphFeatureClient,es as Point,f1 as RTL_REGEX,rs as Rect,cm as RelationshipFeatureClient,Ue as RelationshipNode,n1 as RichTextField,Md as SlateToLexicalFeatureClient,Za as StrikethroughFeatureClient,qa as SubscriptFeatureClient,oc as SuperscriptFeatureClient,_1 as TEXT_MODE_TO_TYPE,g1 as TEXT_TYPE_TO_FORMAT,T1 as TEXT_TYPE_TO_MODE,ie as TOGGLE_LINK_COMMAND,Lf as TableFeatureClient,ka as TestRecorderFeatureClient,st as ToolbarButton,Se as ToolbarDropdown,ya as TreeViewFeatureClient,sc as UnderlineFeatureClient,_d as UnorderedListFeatureClient,Xf as UploadFeatureClient,ze as UploadNode,u1 as addSwipeDownListener,s1 as addSwipeLeftListener,a1 as addSwipeRightListener,c1 as addSwipeUpListener,_o as createBlockNode,y as createClientFeature,qt as defaultEditorLexicalConfig,Vo as getDOMRangeRect,ns as getEnabledNodes,De as getSelectedNode,Ql as isHTMLElement,ts as isPoint,i1 as joinClasses,sr as sanitizeClientEditorConfig,Zl as sanitizeClientFeatures,Bt as setFloatingElemPosition,vt as setFloatingElemPositionForLinkEditor,K as slashMenuBasicGroupWithItems,ue as toolbarAddDropdownGroupWithItems,wo as toolbarFeatureButtonsGroupWithItems,Z as toolbarFormatGroupWithItems,J as toolbarTextDropdownGroupWithItems,B as useEditorConfigContext};
|
|
38
40
|
//# sourceMappingURL=index.js.map
|