@payloadcms/richtext-lexical 3.0.0-beta.53 → 3.0.0-beta.55
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cell/index.d.ts.map +1 -1
- package/dist/cell/index.js +1 -1
- package/dist/cell/index.js.map +1 -1
- package/dist/exports/client/Field-XBUN6QOM.js +2 -0
- package/dist/exports/client/Field-XBUN6QOM.js.map +7 -0
- package/dist/exports/client/{RelationshipComponent-5OU5HATX.js → RelationshipComponent-AFXEJMZQ.js} +2 -2
- package/dist/exports/client/bundled.css +1 -1
- package/dist/exports/client/{chunk-QU5MKT75.js → chunk-5RJS5YZT.js} +2 -2
- package/dist/exports/client/chunk-5RJS5YZT.js.map +7 -0
- package/dist/exports/client/chunk-JIP5PWU3.js +2 -0
- package/dist/exports/client/chunk-JIP5PWU3.js.map +7 -0
- package/dist/exports/client/{chunk-MLIITFAS.js → chunk-Q5DYR7MH.js} +2 -2
- package/dist/exports/client/chunk-Q5DYR7MH.js.map +7 -0
- package/dist/exports/client/{chunk-OSR74ZNW.js → chunk-YL52LJO3.js} +2 -2
- package/dist/exports/client/chunk-YL52LJO3.js.map +7 -0
- package/dist/exports/client/{component-E2NHAHBC.js → component-F6V63OLD.js} +2 -2
- package/dist/exports/client/component-F6V63OLD.js.map +7 -0
- package/dist/exports/client/component-PEFMKIXI.js +2 -0
- package/dist/exports/client/component-PEFMKIXI.js.map +7 -0
- package/dist/exports/client/{component-QWIGEOVD.js → component-VM36FRT2.js} +2 -2
- package/dist/exports/client/index.d.ts +37 -27
- package/dist/exports/client/index.d.ts.map +1 -1
- package/dist/exports/client/index.js +7 -5
- package/dist/exports/client/index.js.map +4 -4
- package/dist/features/align/feature.client.d.ts +1 -2
- package/dist/features/align/feature.client.d.ts.map +1 -1
- package/dist/features/align/feature.client.js +9 -16
- package/dist/features/align/feature.client.js.map +1 -1
- package/dist/features/align/feature.server.d.ts +1 -2
- package/dist/features/align/feature.server.d.ts.map +1 -1
- package/dist/features/align/feature.server.js +9 -15
- package/dist/features/align/feature.server.js.map +1 -1
- package/dist/features/align/i18n.js.map +1 -1
- package/dist/features/align/toolbarAlignGroup.js.map +1 -1
- package/dist/features/blockquote/feature.client.d.ts +1 -2
- package/dist/features/blockquote/feature.client.d.ts.map +1 -1
- package/dist/features/blockquote/feature.client.js +37 -44
- package/dist/features/blockquote/feature.client.js.map +1 -1
- package/dist/features/blockquote/feature.server.d.ts +6 -2
- package/dist/features/blockquote/feature.server.d.ts.map +1 -1
- package/dist/features/blockquote/feature.server.js +35 -40
- package/dist/features/blockquote/feature.server.js.map +1 -1
- package/dist/features/blockquote/i18n.js.map +1 -1
- package/dist/features/blockquote/markdownTransformer.js.map +1 -1
- package/dist/features/blocks/component/BlockContent.js +2 -2
- package/dist/features/blocks/component/BlockContent.js.map +1 -1
- package/dist/features/blocks/component/FormSavePlugin.js.map +1 -1
- package/dist/features/blocks/component/index.js +1 -1
- package/dist/features/blocks/component/index.js.map +1 -1
- package/dist/features/blocks/component/removeEmptyArrayValues.js.map +1 -1
- package/dist/features/blocks/drawer/index.js +1 -1
- package/dist/features/blocks/drawer/index.js.map +1 -1
- package/dist/features/blocks/feature.client.d.ts +1 -2
- package/dist/features/blocks/feature.client.d.ts.map +1 -1
- package/dist/features/blocks/feature.client.js +74 -80
- package/dist/features/blocks/feature.client.js.map +1 -1
- package/dist/features/blocks/feature.server.d.ts +1 -2
- package/dist/features/blocks/feature.server.d.ts.map +1 -1
- package/dist/features/blocks/feature.server.js +88 -90
- package/dist/features/blocks/feature.server.js.map +1 -1
- package/dist/features/blocks/graphQLPopulationPromise.d.ts +1 -1
- package/dist/features/blocks/graphQLPopulationPromise.d.ts.map +1 -1
- package/dist/features/blocks/graphQLPopulationPromise.js.map +1 -1
- package/dist/features/blocks/i18n.js.map +1 -1
- package/dist/features/blocks/nodes/BlocksNode.d.ts +2 -0
- package/dist/features/blocks/nodes/BlocksNode.d.ts.map +1 -1
- package/dist/features/blocks/nodes/BlocksNode.js +1 -1
- package/dist/features/blocks/nodes/BlocksNode.js.map +1 -1
- package/dist/features/blocks/plugin/commands.js.map +1 -1
- package/dist/features/blocks/plugin/index.d.ts +1 -1
- package/dist/features/blocks/plugin/index.d.ts.map +1 -1
- package/dist/features/blocks/plugin/index.js.map +1 -1
- package/dist/features/blocks/validate.d.ts +1 -1
- package/dist/features/blocks/validate.d.ts.map +1 -1
- package/dist/features/blocks/validate.js.map +1 -1
- package/dist/features/converters/html/converter/converters/linebreak.js.map +1 -1
- package/dist/features/converters/html/converter/converters/paragraph.js.map +1 -1
- package/dist/features/converters/html/converter/converters/text.js.map +1 -1
- package/dist/features/converters/html/converter/defaultConverters.js.map +1 -1
- package/dist/features/converters/html/converter/index.js.map +1 -1
- package/dist/features/converters/html/converter/types.js.map +1 -1
- package/dist/features/converters/html/feature.server.d.ts +1 -2
- package/dist/features/converters/html/feature.server.d.ts.map +1 -1
- package/dist/features/converters/html/feature.server.js +6 -12
- package/dist/features/converters/html/feature.server.js.map +1 -1
- package/dist/features/converters/html/field/index.js +1 -1
- package/dist/features/converters/html/field/index.js.map +1 -1
- package/dist/features/createClientComponent.d.ts +3 -2
- package/dist/features/createClientComponent.d.ts.map +1 -1
- package/dist/features/createClientComponent.js.map +1 -1
- package/dist/features/createFeaturePropComponent.d.ts.map +1 -1
- package/dist/features/createFeaturePropComponent.js.map +1 -1
- package/dist/features/debug/testRecorder/feature.client.d.ts +1 -2
- package/dist/features/debug/testRecorder/feature.client.d.ts.map +1 -1
- package/dist/features/debug/testRecorder/feature.client.js +9 -16
- package/dist/features/debug/testRecorder/feature.client.js.map +1 -1
- package/dist/features/debug/testRecorder/feature.server.d.ts +1 -2
- package/dist/features/debug/testRecorder/feature.server.d.ts.map +1 -1
- package/dist/features/debug/testRecorder/feature.server.js +8 -13
- package/dist/features/debug/testRecorder/feature.server.js.map +1 -1
- package/dist/features/debug/testRecorder/plugin/index.d.ts +1 -1
- package/dist/features/debug/testRecorder/plugin/index.d.ts.map +1 -1
- package/dist/features/debug/testRecorder/plugin/index.js.map +1 -1
- package/dist/features/debug/treeView/feature.client.d.ts +1 -2
- package/dist/features/debug/treeView/feature.client.d.ts.map +1 -1
- package/dist/features/debug/treeView/feature.client.js +9 -16
- package/dist/features/debug/treeView/feature.client.js.map +1 -1
- package/dist/features/debug/treeView/feature.server.d.ts +1 -2
- package/dist/features/debug/treeView/feature.server.d.ts.map +1 -1
- package/dist/features/debug/treeView/feature.server.js +8 -13
- package/dist/features/debug/treeView/feature.server.js.map +1 -1
- package/dist/features/debug/treeView/plugin/index.d.ts +1 -1
- package/dist/features/debug/treeView/plugin/index.d.ts.map +1 -1
- package/dist/features/debug/treeView/plugin/index.js.map +1 -1
- package/dist/features/format/bold/feature.client.d.ts +1 -2
- package/dist/features/format/bold/feature.client.d.ts.map +1 -1
- package/dist/features/format/bold/feature.client.js +16 -23
- package/dist/features/format/bold/feature.client.js.map +1 -1
- package/dist/features/format/bold/feature.server.d.ts +1 -2
- package/dist/features/format/bold/feature.server.d.ts.map +1 -1
- package/dist/features/format/bold/feature.server.js +21 -24
- package/dist/features/format/bold/feature.server.js.map +1 -1
- package/dist/features/format/bold/markdownTransformers.js.map +1 -1
- package/dist/features/format/inlineCode/feature.client.d.ts +1 -2
- package/dist/features/format/inlineCode/feature.client.d.ts.map +1 -1
- package/dist/features/format/inlineCode/feature.client.js +12 -21
- package/dist/features/format/inlineCode/feature.client.js.map +1 -1
- package/dist/features/format/inlineCode/feature.server.d.ts +1 -2
- package/dist/features/format/inlineCode/feature.server.d.ts.map +1 -1
- package/dist/features/format/inlineCode/feature.server.js +11 -16
- package/dist/features/format/inlineCode/feature.server.js.map +1 -1
- package/dist/features/format/inlineCode/markdownTransformers.js.map +1 -1
- package/dist/features/format/italic/feature.client.d.ts +1 -2
- package/dist/features/format/italic/feature.client.d.ts.map +1 -1
- package/dist/features/format/italic/feature.client.js +13 -22
- package/dist/features/format/italic/feature.client.js.map +1 -1
- package/dist/features/format/italic/feature.server.d.ts +1 -2
- package/dist/features/format/italic/feature.server.d.ts.map +1 -1
- package/dist/features/format/italic/feature.server.js +12 -17
- package/dist/features/format/italic/feature.server.js.map +1 -1
- package/dist/features/format/italic/markdownTransformers.js.map +1 -1
- package/dist/features/format/shared/toolbarFormatGroup.js.map +1 -1
- package/dist/features/format/strikethrough/feature.client.d.ts +1 -2
- package/dist/features/format/strikethrough/feature.client.d.ts.map +1 -1
- package/dist/features/format/strikethrough/feature.client.js +12 -21
- package/dist/features/format/strikethrough/feature.client.js.map +1 -1
- package/dist/features/format/strikethrough/feature.server.d.ts +1 -2
- package/dist/features/format/strikethrough/feature.server.d.ts.map +1 -1
- package/dist/features/format/strikethrough/feature.server.js +11 -16
- package/dist/features/format/strikethrough/feature.server.js.map +1 -1
- package/dist/features/format/strikethrough/markdownTransformers.js.map +1 -1
- package/dist/features/format/subscript/feature.client.d.ts +1 -2
- package/dist/features/format/subscript/feature.client.d.ts.map +1 -1
- package/dist/features/format/subscript/feature.client.js +9 -18
- package/dist/features/format/subscript/feature.client.js.map +1 -1
- package/dist/features/format/subscript/feature.server.d.ts +1 -2
- package/dist/features/format/subscript/feature.server.d.ts.map +1 -1
- package/dist/features/format/subscript/feature.server.js +8 -13
- package/dist/features/format/subscript/feature.server.js.map +1 -1
- package/dist/features/format/superscript/feature.client.d.ts +1 -2
- package/dist/features/format/superscript/feature.client.d.ts.map +1 -1
- package/dist/features/format/superscript/feature.client.js +9 -18
- package/dist/features/format/superscript/feature.client.js.map +1 -1
- package/dist/features/format/superscript/feature.server.d.ts +1 -2
- package/dist/features/format/superscript/feature.server.d.ts.map +1 -1
- package/dist/features/format/superscript/feature.server.js +8 -13
- package/dist/features/format/superscript/feature.server.js.map +1 -1
- package/dist/features/format/underline/feature.client.d.ts +1 -2
- package/dist/features/format/underline/feature.client.d.ts.map +1 -1
- package/dist/features/format/underline/feature.client.js +9 -18
- package/dist/features/format/underline/feature.client.js.map +1 -1
- package/dist/features/format/underline/feature.server.d.ts +1 -2
- package/dist/features/format/underline/feature.server.d.ts.map +1 -1
- package/dist/features/format/underline/feature.server.js +8 -13
- package/dist/features/format/underline/feature.server.js.map +1 -1
- package/dist/features/heading/feature.client.d.ts +1 -2
- package/dist/features/heading/feature.client.d.ts.map +1 -1
- package/dist/features/heading/feature.client.js +70 -76
- package/dist/features/heading/feature.client.js.map +1 -1
- package/dist/features/heading/feature.server.d.ts +1 -2
- package/dist/features/heading/feature.server.d.ts.map +1 -1
- package/dist/features/heading/feature.server.js +51 -53
- package/dist/features/heading/feature.server.js.map +1 -1
- package/dist/features/heading/i18n.js +2 -2
- package/dist/features/heading/i18n.js.map +1 -1
- package/dist/features/heading/markdownTransformer.js.map +1 -1
- package/dist/features/horizontalRule/component/index.js.map +1 -1
- package/dist/features/horizontalRule/feature.client.d.ts +1 -2
- package/dist/features/horizontalRule/feature.client.d.ts.map +1 -1
- package/dist/features/horizontalRule/feature.client.js +58 -65
- package/dist/features/horizontalRule/feature.client.js.map +1 -1
- package/dist/features/horizontalRule/feature.server.d.ts +1 -2
- package/dist/features/horizontalRule/feature.server.d.ts.map +1 -1
- package/dist/features/horizontalRule/feature.server.js +26 -31
- package/dist/features/horizontalRule/feature.server.js.map +1 -1
- package/dist/features/horizontalRule/i18n.js.map +1 -1
- package/dist/features/horizontalRule/markdownTransformer.js.map +1 -1
- package/dist/features/horizontalRule/nodes/HorizontalRuleNode.d.ts +5 -2
- package/dist/features/horizontalRule/nodes/HorizontalRuleNode.d.ts.map +1 -1
- package/dist/features/horizontalRule/nodes/HorizontalRuleNode.js.map +1 -1
- package/dist/features/horizontalRule/plugin/index.d.ts +1 -1
- package/dist/features/horizontalRule/plugin/index.d.ts.map +1 -1
- package/dist/features/horizontalRule/plugin/index.js.map +1 -1
- package/dist/features/indent/feature.client.d.ts +1 -2
- package/dist/features/indent/feature.client.d.ts.map +1 -1
- package/dist/features/indent/feature.client.js +9 -16
- package/dist/features/indent/feature.client.js.map +1 -1
- package/dist/features/indent/feature.server.d.ts +1 -2
- package/dist/features/indent/feature.server.d.ts.map +1 -1
- package/dist/features/indent/feature.server.js +9 -15
- package/dist/features/indent/feature.server.js.map +1 -1
- package/dist/features/indent/i18n.js.map +1 -1
- package/dist/features/indent/toolbarIndentGroup.js.map +1 -1
- package/dist/features/link/drawer/baseFields.d.ts +2 -2
- package/dist/features/link/drawer/baseFields.d.ts.map +1 -1
- package/dist/features/link/drawer/baseFields.js.map +1 -1
- package/dist/features/link/drawer/index.js.map +1 -1
- package/dist/features/link/drawer/types.js.map +1 -1
- package/dist/features/link/feature.client.d.ts +3 -4
- package/dist/features/link/feature.client.d.ts.map +1 -1
- package/dist/features/link/feature.client.js +34 -41
- package/dist/features/link/feature.client.js.map +1 -1
- package/dist/features/link/feature.server.d.ts +4 -6
- package/dist/features/link/feature.server.d.ts.map +1 -1
- package/dist/features/link/feature.server.js +123 -125
- package/dist/features/link/feature.server.js.map +1 -1
- package/dist/features/link/graphQLPopulationPromise.d.ts +1 -1
- package/dist/features/link/graphQLPopulationPromise.d.ts.map +1 -1
- package/dist/features/link/graphQLPopulationPromise.js.map +1 -1
- package/dist/features/link/i18n.js.map +1 -1
- package/dist/features/link/markdownTransformer.js.map +1 -1
- package/dist/features/link/nodes/AutoLinkNode.d.ts.map +1 -1
- package/dist/features/link/nodes/AutoLinkNode.js +7 -1
- package/dist/features/link/nodes/AutoLinkNode.js.map +1 -1
- package/dist/features/link/nodes/LinkNode.js +1 -1
- package/dist/features/link/nodes/LinkNode.js.map +1 -1
- package/dist/features/link/nodes/types.d.ts +7 -4
- package/dist/features/link/nodes/types.d.ts.map +1 -1
- package/dist/features/link/nodes/types.js.map +1 -1
- package/dist/features/link/plugins/autoLink/index.d.ts +1 -1
- package/dist/features/link/plugins/autoLink/index.d.ts.map +1 -1
- package/dist/features/link/plugins/autoLink/index.js.map +1 -1
- package/dist/features/link/plugins/clickableLink/index.d.ts +1 -1
- package/dist/features/link/plugins/clickableLink/index.d.ts.map +1 -1
- package/dist/features/link/plugins/clickableLink/index.js.map +1 -1
- package/dist/features/link/plugins/floatingLinkEditor/LinkEditor/commands.js.map +1 -1
- package/dist/features/link/plugins/floatingLinkEditor/LinkEditor/index.js.map +1 -1
- package/dist/features/link/plugins/floatingLinkEditor/index.d.ts +1 -1
- package/dist/features/link/plugins/floatingLinkEditor/index.d.ts.map +1 -1
- package/dist/features/link/plugins/floatingLinkEditor/index.js.map +1 -1
- package/dist/features/link/plugins/floatingLinkEditor/types.js.map +1 -1
- package/dist/features/link/plugins/floatingLinkEditor/utilities.d.ts +2 -2
- package/dist/features/link/plugins/floatingLinkEditor/utilities.d.ts.map +1 -1
- package/dist/features/link/plugins/floatingLinkEditor/utilities.js.map +1 -1
- package/dist/features/link/plugins/link/index.d.ts +1 -1
- package/dist/features/link/plugins/link/index.d.ts.map +1 -1
- package/dist/features/link/plugins/link/index.js.map +1 -1
- package/dist/features/link/validate.d.ts +1 -1
- package/dist/features/link/validate.d.ts.map +1 -1
- package/dist/features/link/validate.js.map +1 -1
- package/dist/features/lists/checklist/feature.client.d.ts +1 -2
- package/dist/features/lists/checklist/feature.client.d.ts.map +1 -1
- package/dist/features/lists/checklist/feature.client.js +50 -57
- package/dist/features/lists/checklist/feature.client.js.map +1 -1
- package/dist/features/lists/checklist/feature.server.d.ts +1 -2
- package/dist/features/lists/checklist/feature.server.d.ts.map +1 -1
- package/dist/features/lists/checklist/feature.server.js +28 -31
- package/dist/features/lists/checklist/feature.server.js.map +1 -1
- package/dist/features/lists/checklist/i18n.js.map +1 -1
- package/dist/features/lists/checklist/markdownTransformers.js.map +1 -1
- package/dist/features/lists/checklist/plugin/index.d.ts +1 -1
- package/dist/features/lists/checklist/plugin/index.d.ts.map +1 -1
- package/dist/features/lists/checklist/plugin/index.js.map +1 -1
- package/dist/features/lists/htmlConverter.d.ts +1 -1
- package/dist/features/lists/htmlConverter.d.ts.map +1 -1
- package/dist/features/lists/htmlConverter.js.map +1 -1
- package/dist/features/lists/orderedList/feature.client.d.ts +1 -2
- package/dist/features/lists/orderedList/feature.client.d.ts.map +1 -1
- package/dist/features/lists/orderedList/feature.client.js +39 -46
- package/dist/features/lists/orderedList/feature.client.js.map +1 -1
- package/dist/features/lists/orderedList/feature.server.d.ts +1 -2
- package/dist/features/lists/orderedList/feature.server.d.ts.map +1 -1
- package/dist/features/lists/orderedList/feature.server.js +28 -31
- package/dist/features/lists/orderedList/feature.server.js.map +1 -1
- package/dist/features/lists/orderedList/i18n.js.map +1 -1
- package/dist/features/lists/orderedList/markdownTransformer.js.map +1 -1
- package/dist/features/lists/plugin/index.d.ts +11 -1
- package/dist/features/lists/plugin/index.d.ts.map +1 -1
- package/dist/features/lists/plugin/index.js.map +1 -1
- package/dist/features/lists/shared/markdown.d.ts +1 -1
- package/dist/features/lists/shared/markdown.js.map +1 -1
- package/dist/features/lists/shared/slashMenuListGroup.js.map +1 -1
- package/dist/features/lists/unorderedList/feature.client.d.ts +1 -2
- package/dist/features/lists/unorderedList/feature.client.d.ts.map +1 -1
- package/dist/features/lists/unorderedList/feature.client.js +40 -49
- package/dist/features/lists/unorderedList/feature.client.js.map +1 -1
- package/dist/features/lists/unorderedList/feature.server.d.ts +1 -2
- package/dist/features/lists/unorderedList/feature.server.d.ts.map +1 -1
- package/dist/features/lists/unorderedList/feature.server.js +26 -31
- package/dist/features/lists/unorderedList/feature.server.js.map +1 -1
- package/dist/features/lists/unorderedList/i18n.js.map +1 -1
- package/dist/features/lists/unorderedList/markdownTransformer.js.map +1 -1
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/heading/client.d.ts +0 -1
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/heading/client.d.ts.map +1 -1
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/heading/client.js.map +1 -1
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/heading/converter.js.map +1 -1
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/heading/index.js +1 -1
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/heading/index.js.map +1 -1
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/link/client.d.ts +0 -1
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/link/client.d.ts.map +1 -1
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/link/client.js.map +1 -1
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/link/converter.js.map +1 -1
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/link/index.js +1 -1
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/link/index.js.map +1 -1
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/list/client.d.ts +0 -1
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/list/client.d.ts.map +1 -1
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/list/client.js.map +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.map +1 -1
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/list/index.js +1 -1
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/list/index.js.map +1 -1
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/listItem/client.d.ts +0 -1
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/listItem/client.d.ts.map +1 -1
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/listItem/client.js.map +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.map +1 -1
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/listItem/index.js +1 -1
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/listItem/index.js.map +1 -1
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/quote/client.d.ts +0 -1
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/quote/client.d.ts.map +1 -1
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/quote/client.js.map +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.map +1 -1
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/quote/index.js +1 -1
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/quote/index.js.map +1 -1
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/unknown/client.d.ts +0 -1
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/unknown/client.d.ts.map +1 -1
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/unknown/client.js.map +1 -1
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/unknown/converter.js.map +1 -1
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/unknown/index.js +1 -1
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/unknown/index.js.map +1 -1
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/upload/client.d.ts +0 -1
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/upload/client.d.ts.map +1 -1
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/upload/client.js.map +1 -1
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/upload/converter.js.map +1 -1
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/upload/index.js +1 -1
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/upload/index.js.map +1 -1
- package/dist/features/migrations/lexicalPluginToLexical/converter/defaultConverters.js.map +1 -1
- package/dist/features/migrations/lexicalPluginToLexical/converter/index.js.map +1 -1
- package/dist/features/migrations/lexicalPluginToLexical/converter/types.d.ts +1 -1
- package/dist/features/migrations/lexicalPluginToLexical/converter/types.js.map +1 -1
- package/dist/features/migrations/lexicalPluginToLexical/feature.client.d.ts +1 -2
- package/dist/features/migrations/lexicalPluginToLexical/feature.client.d.ts.map +1 -1
- package/dist/features/migrations/lexicalPluginToLexical/feature.client.js +20 -27
- package/dist/features/migrations/lexicalPluginToLexical/feature.client.js.map +1 -1
- package/dist/features/migrations/lexicalPluginToLexical/feature.server.d.ts +1 -2
- package/dist/features/migrations/lexicalPluginToLexical/feature.server.d.ts.map +1 -1
- package/dist/features/migrations/lexicalPluginToLexical/feature.server.js +39 -42
- package/dist/features/migrations/lexicalPluginToLexical/feature.server.js.map +1 -1
- package/dist/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/Component.js.map +1 -1
- package/dist/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/index.js.map +1 -1
- package/dist/features/migrations/slateToLexical/converter/converters/blockquote/client.d.ts +0 -1
- package/dist/features/migrations/slateToLexical/converter/converters/blockquote/client.d.ts.map +1 -1
- package/dist/features/migrations/slateToLexical/converter/converters/blockquote/client.js.map +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.map +1 -1
- package/dist/features/migrations/slateToLexical/converter/converters/blockquote/index.js +1 -1
- package/dist/features/migrations/slateToLexical/converter/converters/blockquote/index.js.map +1 -1
- package/dist/features/migrations/slateToLexical/converter/converters/heading/client.d.ts +0 -1
- package/dist/features/migrations/slateToLexical/converter/converters/heading/client.d.ts.map +1 -1
- package/dist/features/migrations/slateToLexical/converter/converters/heading/client.js.map +1 -1
- package/dist/features/migrations/slateToLexical/converter/converters/heading/converter.js.map +1 -1
- package/dist/features/migrations/slateToLexical/converter/converters/heading/index.js +1 -1
- package/dist/features/migrations/slateToLexical/converter/converters/heading/index.js.map +1 -1
- package/dist/features/migrations/slateToLexical/converter/converters/indent/client.d.ts +0 -1
- package/dist/features/migrations/slateToLexical/converter/converters/indent/client.d.ts.map +1 -1
- package/dist/features/migrations/slateToLexical/converter/converters/indent/client.js.map +1 -1
- package/dist/features/migrations/slateToLexical/converter/converters/indent/converter.js.map +1 -1
- package/dist/features/migrations/slateToLexical/converter/converters/indent/index.js +1 -1
- package/dist/features/migrations/slateToLexical/converter/converters/indent/index.js.map +1 -1
- package/dist/features/migrations/slateToLexical/converter/converters/link/client.d.ts +0 -1
- package/dist/features/migrations/slateToLexical/converter/converters/link/client.d.ts.map +1 -1
- package/dist/features/migrations/slateToLexical/converter/converters/link/client.js.map +1 -1
- package/dist/features/migrations/slateToLexical/converter/converters/link/converter.js.map +1 -1
- package/dist/features/migrations/slateToLexical/converter/converters/link/index.js +1 -1
- package/dist/features/migrations/slateToLexical/converter/converters/link/index.js.map +1 -1
- package/dist/features/migrations/slateToLexical/converter/converters/listItem/client.d.ts +0 -1
- package/dist/features/migrations/slateToLexical/converter/converters/listItem/client.d.ts.map +1 -1
- package/dist/features/migrations/slateToLexical/converter/converters/listItem/client.js.map +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.map +1 -1
- package/dist/features/migrations/slateToLexical/converter/converters/listItem/index.js +1 -1
- package/dist/features/migrations/slateToLexical/converter/converters/listItem/index.js.map +1 -1
- package/dist/features/migrations/slateToLexical/converter/converters/orderedList/client.d.ts +0 -1
- package/dist/features/migrations/slateToLexical/converter/converters/orderedList/client.d.ts.map +1 -1
- package/dist/features/migrations/slateToLexical/converter/converters/orderedList/client.js.map +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.map +1 -1
- package/dist/features/migrations/slateToLexical/converter/converters/orderedList/index.js +1 -1
- package/dist/features/migrations/slateToLexical/converter/converters/orderedList/index.js.map +1 -1
- package/dist/features/migrations/slateToLexical/converter/converters/relationship/client.d.ts +0 -1
- package/dist/features/migrations/slateToLexical/converter/converters/relationship/client.d.ts.map +1 -1
- package/dist/features/migrations/slateToLexical/converter/converters/relationship/client.js.map +1 -1
- package/dist/features/migrations/slateToLexical/converter/converters/relationship/converter.js.map +1 -1
- package/dist/features/migrations/slateToLexical/converter/converters/relationship/index.js +1 -1
- package/dist/features/migrations/slateToLexical/converter/converters/relationship/index.js.map +1 -1
- package/dist/features/migrations/slateToLexical/converter/converters/unknown/client.d.ts +0 -1
- package/dist/features/migrations/slateToLexical/converter/converters/unknown/client.d.ts.map +1 -1
- package/dist/features/migrations/slateToLexical/converter/converters/unknown/client.js.map +1 -1
- package/dist/features/migrations/slateToLexical/converter/converters/unknown/converter.js.map +1 -1
- package/dist/features/migrations/slateToLexical/converter/converters/unknown/index.js +1 -1
- package/dist/features/migrations/slateToLexical/converter/converters/unknown/index.js.map +1 -1
- package/dist/features/migrations/slateToLexical/converter/converters/unorderedList/client.d.ts +0 -1
- package/dist/features/migrations/slateToLexical/converter/converters/unorderedList/client.d.ts.map +1 -1
- package/dist/features/migrations/slateToLexical/converter/converters/unorderedList/client.js.map +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.map +1 -1
- package/dist/features/migrations/slateToLexical/converter/converters/unorderedList/index.js +1 -1
- package/dist/features/migrations/slateToLexical/converter/converters/unorderedList/index.js.map +1 -1
- package/dist/features/migrations/slateToLexical/converter/converters/upload/client.d.ts +0 -1
- package/dist/features/migrations/slateToLexical/converter/converters/upload/client.d.ts.map +1 -1
- package/dist/features/migrations/slateToLexical/converter/converters/upload/client.js.map +1 -1
- package/dist/features/migrations/slateToLexical/converter/converters/upload/converter.js.map +1 -1
- package/dist/features/migrations/slateToLexical/converter/converters/upload/index.js +1 -1
- package/dist/features/migrations/slateToLexical/converter/converters/upload/index.js.map +1 -1
- package/dist/features/migrations/slateToLexical/converter/defaultConverters.js.map +1 -1
- package/dist/features/migrations/slateToLexical/converter/index.js.map +1 -1
- package/dist/features/migrations/slateToLexical/converter/types.d.ts +1 -1
- package/dist/features/migrations/slateToLexical/converter/types.js.map +1 -1
- package/dist/features/migrations/slateToLexical/feature.client.d.ts +1 -2
- package/dist/features/migrations/slateToLexical/feature.client.d.ts.map +1 -1
- package/dist/features/migrations/slateToLexical/feature.client.js +20 -27
- package/dist/features/migrations/slateToLexical/feature.client.js.map +1 -1
- package/dist/features/migrations/slateToLexical/feature.server.d.ts +3 -2
- package/dist/features/migrations/slateToLexical/feature.server.d.ts.map +1 -1
- package/dist/features/migrations/slateToLexical/feature.server.js +41 -42
- package/dist/features/migrations/slateToLexical/feature.server.js.map +1 -1
- package/dist/features/migrations/slateToLexical/nodes/unknownConvertedNode/Component.js.map +1 -1
- package/dist/features/migrations/slateToLexical/nodes/unknownConvertedNode/index.js.map +1 -1
- package/dist/features/paragraph/feature.client.d.ts +1 -2
- package/dist/features/paragraph/feature.client.d.ts.map +1 -1
- package/dist/features/paragraph/feature.client.js +33 -40
- package/dist/features/paragraph/feature.client.js.map +1 -1
- package/dist/features/paragraph/feature.server.d.ts +1 -2
- package/dist/features/paragraph/feature.server.d.ts.map +1 -1
- package/dist/features/paragraph/feature.server.js +10 -15
- package/dist/features/paragraph/feature.server.js.map +1 -1
- package/dist/features/paragraph/i18n.js.map +1 -1
- package/dist/features/relationship/drawer/commands.js.map +1 -1
- package/dist/features/relationship/drawer/index.d.ts.map +1 -1
- package/dist/features/relationship/drawer/index.js.map +1 -1
- package/dist/features/relationship/feature.client.d.ts +3 -4
- package/dist/features/relationship/feature.client.d.ts.map +1 -1
- package/dist/features/relationship/feature.client.js +60 -67
- package/dist/features/relationship/feature.client.js.map +1 -1
- package/dist/features/relationship/feature.server.d.ts +4 -4
- package/dist/features/relationship/feature.server.d.ts.map +1 -1
- package/dist/features/relationship/feature.server.js +45 -51
- package/dist/features/relationship/feature.server.js.map +1 -1
- package/dist/features/relationship/graphQLPopulationPromise.d.ts +1 -1
- package/dist/features/relationship/graphQLPopulationPromise.d.ts.map +1 -1
- package/dist/features/relationship/graphQLPopulationPromise.js.map +1 -1
- package/dist/features/relationship/i18n.js.map +1 -1
- package/dist/features/relationship/nodes/RelationshipNode.d.ts +6 -2
- package/dist/features/relationship/nodes/RelationshipNode.d.ts.map +1 -1
- package/dist/features/relationship/nodes/RelationshipNode.js +1 -1
- package/dist/features/relationship/nodes/RelationshipNode.js.map +1 -1
- package/dist/features/relationship/nodes/components/RelationshipComponent.d.ts.map +1 -1
- package/dist/features/relationship/nodes/components/RelationshipComponent.js.map +1 -1
- package/dist/features/relationship/plugins/index.d.ts +1 -1
- package/dist/features/relationship/plugins/index.d.ts.map +1 -1
- package/dist/features/relationship/plugins/index.js.map +1 -1
- package/dist/features/relationship/utils/EnabledRelationshipsCondition.js.map +1 -1
- package/dist/features/shared/slashMenu/basicGroup.js.map +1 -1
- package/dist/features/shared/toolbar/addDropdownGroup.js.map +1 -1
- package/dist/features/shared/toolbar/featureButtonsGroup.js.map +1 -1
- package/dist/features/shared/toolbar/textDropdownGroup.js.map +1 -1
- package/dist/features/toolbars/fixed/Toolbar/index.d.ts +1 -1
- package/dist/features/toolbars/fixed/Toolbar/index.d.ts.map +1 -1
- package/dist/features/toolbars/fixed/Toolbar/index.js.map +1 -1
- package/dist/features/toolbars/fixed/feature.client.d.ts +1 -2
- package/dist/features/toolbars/fixed/feature.client.d.ts.map +1 -1
- package/dist/features/toolbars/fixed/feature.client.js +9 -16
- package/dist/features/toolbars/fixed/feature.client.js.map +1 -1
- package/dist/features/toolbars/fixed/feature.server.d.ts +1 -2
- package/dist/features/toolbars/fixed/feature.server.d.ts.map +1 -1
- package/dist/features/toolbars/fixed/feature.server.js +16 -18
- package/dist/features/toolbars/fixed/feature.server.js.map +1 -1
- package/dist/features/toolbars/inline/Toolbar/index.d.ts +1 -1
- package/dist/features/toolbars/inline/Toolbar/index.d.ts.map +1 -1
- package/dist/features/toolbars/inline/Toolbar/index.js.map +1 -1
- package/dist/features/toolbars/inline/feature.client.d.ts +1 -2
- package/dist/features/toolbars/inline/feature.client.d.ts.map +1 -1
- package/dist/features/toolbars/inline/feature.client.js +9 -16
- package/dist/features/toolbars/inline/feature.client.js.map +1 -1
- package/dist/features/toolbars/inline/feature.server.d.ts +1 -2
- package/dist/features/toolbars/inline/feature.server.d.ts.map +1 -1
- package/dist/features/toolbars/inline/feature.server.js +8 -13
- package/dist/features/toolbars/inline/feature.server.js.map +1 -1
- package/dist/features/toolbars/shared/ToolbarButton/index.d.ts.map +1 -1
- package/dist/features/toolbars/shared/ToolbarButton/index.js.map +1 -1
- package/dist/features/toolbars/shared/ToolbarDropdown/DropDown.js.map +1 -1
- package/dist/features/toolbars/shared/ToolbarDropdown/index.d.ts.map +1 -1
- package/dist/features/toolbars/shared/ToolbarDropdown/index.js.map +1 -1
- package/dist/features/toolbars/types.d.ts +37 -5
- package/dist/features/toolbars/types.d.ts.map +1 -1
- package/dist/features/toolbars/types.js.map +1 -1
- package/dist/features/typeUtilities.d.ts +1 -1
- package/dist/features/typeUtilities.d.ts.map +1 -1
- package/dist/features/typeUtilities.js.map +1 -1
- package/dist/features/typesClient.d.ts +182 -0
- package/dist/features/typesClient.d.ts.map +1 -0
- package/dist/features/typesClient.js +3 -0
- package/dist/features/typesClient.js.map +1 -0
- package/dist/features/{types.d.ts → typesServer.d.ts} +40 -193
- package/dist/features/typesServer.d.ts.map +1 -0
- package/dist/features/typesServer.js +3 -0
- package/dist/features/typesServer.js.map +1 -0
- package/dist/features/upload/component/ExtraFieldsDrawer/index.js.map +1 -1
- package/dist/features/upload/component/index.d.ts.map +1 -1
- package/dist/features/upload/component/index.js +1 -1
- package/dist/features/upload/component/index.js.map +1 -1
- package/dist/features/upload/drawer/commands.js.map +1 -1
- package/dist/features/upload/drawer/index.d.ts.map +1 -1
- package/dist/features/upload/drawer/index.js.map +1 -1
- package/dist/features/upload/feature.client.d.ts +1 -2
- package/dist/features/upload/feature.client.d.ts.map +1 -1
- package/dist/features/upload/feature.client.js +62 -69
- package/dist/features/upload/feature.client.js.map +1 -1
- package/dist/features/upload/feature.server.d.ts +3 -4
- package/dist/features/upload/feature.server.d.ts.map +1 -1
- package/dist/features/upload/feature.server.js +166 -168
- package/dist/features/upload/feature.server.js.map +1 -1
- package/dist/features/upload/graphQLPopulationPromise.d.ts +1 -1
- package/dist/features/upload/graphQLPopulationPromise.d.ts.map +1 -1
- package/dist/features/upload/graphQLPopulationPromise.js.map +1 -1
- package/dist/features/upload/i18n.js.map +1 -1
- package/dist/features/upload/nodes/UploadNode.d.ts +6 -2
- package/dist/features/upload/nodes/UploadNode.d.ts.map +1 -1
- package/dist/features/upload/nodes/UploadNode.js +1 -1
- package/dist/features/upload/nodes/UploadNode.js.map +1 -1
- package/dist/features/upload/plugin/index.d.ts +1 -1
- package/dist/features/upload/plugin/index.d.ts.map +1 -1
- package/dist/features/upload/plugin/index.js.map +1 -1
- package/dist/features/upload/validate.d.ts +1 -1
- package/dist/features/upload/validate.d.ts.map +1 -1
- package/dist/features/upload/validate.js.map +1 -1
- package/dist/field/Field.d.ts.map +1 -1
- package/dist/field/Field.js.map +1 -1
- package/dist/field/index.d.ts.map +1 -1
- package/dist/field/index.js +9 -7
- package/dist/field/index.js.map +1 -1
- package/dist/i18n.js.map +1 -1
- package/dist/index.d.ts +12 -8
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +19 -17
- package/dist/index.js.map +1 -1
- package/dist/lexical/EditorPlugin.d.ts +1 -1
- package/dist/lexical/EditorPlugin.d.ts.map +1 -1
- package/dist/lexical/EditorPlugin.js.map +1 -1
- package/dist/lexical/LexicalEditor.js.map +1 -1
- package/dist/lexical/LexicalProvider.js.map +1 -1
- package/dist/lexical/config/client/EditorConfigProvider.d.ts.map +1 -1
- package/dist/lexical/config/client/EditorConfigProvider.js.map +1 -1
- package/dist/lexical/config/client/default.js.map +1 -1
- package/dist/lexical/config/client/loader.d.ts +1 -1
- package/dist/lexical/config/client/loader.d.ts.map +1 -1
- package/dist/lexical/config/client/loader.js +2 -2
- 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 +1 -1
- package/dist/lexical/config/client/sanitize.js.map +1 -1
- package/dist/lexical/config/server/default.d.ts +2 -2
- package/dist/lexical/config/server/default.d.ts.map +1 -1
- package/dist/lexical/config/server/default.js.map +1 -1
- package/dist/lexical/config/server/loader.d.ts +2 -2
- package/dist/lexical/config/server/loader.d.ts.map +1 -1
- package/dist/lexical/config/server/loader.js +2 -2
- package/dist/lexical/config/server/loader.js.map +1 -1
- package/dist/lexical/config/server/sanitize.d.ts +1 -1
- package/dist/lexical/config/server/sanitize.d.ts.map +1 -1
- package/dist/lexical/config/server/sanitize.js.map +1 -1
- package/dist/lexical/config/types.d.ts +4 -3
- package/dist/lexical/config/types.d.ts.map +1 -1
- package/dist/lexical/config/types.js.map +1 -1
- package/dist/lexical/nodes/index.js.map +1 -1
- package/dist/lexical/plugins/MarkdownShortcut/index.js.map +1 -1
- package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/LexicalMenu.js.map +1 -1
- package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/index.js.map +1 -1
- package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/types.d.ts +16 -1
- package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/types.d.ts.map +1 -1
- package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/types.js.map +1 -1
- package/dist/lexical/plugins/SlashMenu/index.js.map +1 -1
- package/dist/lexical/plugins/SlashMenu/useMenuTriggerMatch.js.map +1 -1
- package/dist/lexical/plugins/handles/AddBlockHandlePlugin/index.js.map +1 -1
- package/dist/lexical/plugins/handles/DraggableBlockPlugin/debounce.js.map +1 -1
- package/dist/lexical/plugins/handles/DraggableBlockPlugin/getBoundingRectWithoutTransform.js.map +1 -1
- package/dist/lexical/plugins/handles/DraggableBlockPlugin/highlightElemOriginalPosition.js.map +1 -1
- package/dist/lexical/plugins/handles/DraggableBlockPlugin/index.js.map +1 -1
- package/dist/lexical/plugins/handles/DraggableBlockPlugin/setTargetLine.d.ts +0 -1
- package/dist/lexical/plugins/handles/DraggableBlockPlugin/setTargetLine.d.ts.map +1 -1
- package/dist/lexical/plugins/handles/DraggableBlockPlugin/setTargetLine.js.map +1 -1
- package/dist/lexical/plugins/handles/utils/calculateDistanceFromScrollerElem.js.map +1 -1
- package/dist/lexical/plugins/handles/utils/doesLineHeightAffectElement.js.map +1 -1
- package/dist/lexical/plugins/handles/utils/getCollapsedMargins.js.map +1 -1
- package/dist/lexical/plugins/handles/utils/getNodeCloseToPoint.js.map +1 -1
- package/dist/lexical/plugins/handles/utils/getTopLevelNodeKeys.js.map +1 -1
- package/dist/lexical/plugins/handles/utils/isOnHandleElement.js.map +1 -1
- package/dist/lexical/plugins/handles/utils/setHandlePosition.js.map +1 -1
- package/dist/lexical/theme/EditorTheme.js.map +1 -1
- package/dist/lexical/ui/ContentEditable.js.map +1 -1
- package/dist/lexical/ui/icons/AI/index.js.map +1 -1
- package/dist/lexical/ui/icons/Add/index.js.map +1 -1
- package/dist/lexical/ui/icons/AlignCenter/index.js.map +1 -1
- package/dist/lexical/ui/icons/AlignJustify/index.js.map +1 -1
- package/dist/lexical/ui/icons/AlignLeft/index.js.map +1 -1
- package/dist/lexical/ui/icons/AlignRight/index.js.map +1 -1
- package/dist/lexical/ui/icons/Block/index.js.map +1 -1
- package/dist/lexical/ui/icons/Blockquote/index.js.map +1 -1
- package/dist/lexical/ui/icons/Bold/index.js.map +1 -1
- package/dist/lexical/ui/icons/Checklist/index.js.map +1 -1
- package/dist/lexical/ui/icons/Code/index.js.map +1 -1
- package/dist/lexical/ui/icons/CodeBlock/index.js.map +1 -1
- package/dist/lexical/ui/icons/H1/index.js.map +1 -1
- package/dist/lexical/ui/icons/H2/index.js.map +1 -1
- package/dist/lexical/ui/icons/H3/index.js.map +1 -1
- package/dist/lexical/ui/icons/H4/index.js.map +1 -1
- package/dist/lexical/ui/icons/H5/index.js.map +1 -1
- package/dist/lexical/ui/icons/H6/index.js.map +1 -1
- package/dist/lexical/ui/icons/HorizontalRule/index.js.map +1 -1
- package/dist/lexical/ui/icons/IndentDecrease/index.js.map +1 -1
- package/dist/lexical/ui/icons/IndentIncrease/index.js.map +1 -1
- package/dist/lexical/ui/icons/Italic/index.js.map +1 -1
- package/dist/lexical/ui/icons/Link/index.js.map +1 -1
- package/dist/lexical/ui/icons/OrderedList/index.js.map +1 -1
- package/dist/lexical/ui/icons/Relationship/index.js.map +1 -1
- package/dist/lexical/ui/icons/Strikethrough/index.js.map +1 -1
- package/dist/lexical/ui/icons/Subscript/index.js.map +1 -1
- package/dist/lexical/ui/icons/Superscript/index.js.map +1 -1
- package/dist/lexical/ui/icons/Text/index.js.map +1 -1
- package/dist/lexical/ui/icons/Underline/index.js.map +1 -1
- package/dist/lexical/ui/icons/UnorderedList/index.js.map +1 -1
- package/dist/lexical/ui/icons/Upload/index.js.map +1 -1
- package/dist/lexical/utils/canUseDOM.js.map +1 -1
- package/dist/lexical/utils/cloneDeep.js.map +1 -1
- package/dist/lexical/utils/environment.js.map +1 -1
- package/dist/lexical/utils/getDOMRangeRect.js.map +1 -1
- package/dist/lexical/utils/getSelectedNode.js.map +1 -1
- package/dist/lexical/utils/guard.js.map +1 -1
- package/dist/lexical/utils/invariant.js.map +1 -1
- package/dist/lexical/utils/joinClasses.js.map +1 -1
- package/dist/lexical/utils/markdown/createBlockNode.d.ts +1 -1
- package/dist/lexical/utils/markdown/createBlockNode.d.ts.map +1 -1
- package/dist/lexical/utils/markdown/createBlockNode.js.map +1 -1
- package/dist/lexical/utils/nodeFormat.js.map +1 -1
- package/dist/lexical/utils/point.js.map +1 -1
- package/dist/lexical/utils/rect.js.map +1 -1
- package/dist/lexical/utils/setFloatingElemPosition.js.map +1 -1
- package/dist/lexical/utils/setFloatingElemPositionForLinkEditor.js.map +1 -1
- package/dist/lexical/utils/swipe.js.map +1 -1
- package/dist/lexical/utils/url.js.map +1 -1
- package/dist/nodeTypes.d.ts +27 -0
- package/dist/nodeTypes.d.ts.map +1 -0
- package/dist/nodeTypes.js +3 -0
- package/dist/nodeTypes.js.map +1 -0
- package/dist/populateGraphQL/defaultValue.js.map +1 -1
- package/dist/populateGraphQL/populate.d.ts.map +1 -1
- 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.map +1 -1
- package/dist/populateGraphQL/recursivelyPopulateFieldsForGraphQL.d.ts +1 -1
- package/dist/populateGraphQL/recursivelyPopulateFieldsForGraphQL.d.ts.map +1 -1
- package/dist/populateGraphQL/recursivelyPopulateFieldsForGraphQL.js.map +1 -1
- package/dist/types.d.ts +7 -7
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js.map +1 -1
- package/dist/utilities/createClientFeature.d.ts +13 -0
- package/dist/utilities/createClientFeature.d.ts.map +1 -0
- package/dist/utilities/createClientFeature.js +30 -0
- package/dist/utilities/createClientFeature.js.map +1 -0
- package/dist/utilities/createServerFeature.d.ts +16 -0
- package/dist/utilities/createServerFeature.d.ts.map +1 -0
- package/dist/utilities/createServerFeature.js +34 -0
- package/dist/utilities/createServerFeature.js.map +1 -0
- package/dist/utilities/forEachNodeRecursively.js.map +1 -1
- package/dist/utilities/generateComponentMap.d.ts +2 -2
- package/dist/utilities/generateComponentMap.d.ts.map +1 -1
- package/dist/utilities/generateComponentMap.js +4 -4
- package/dist/utilities/generateComponentMap.js.map +1 -1
- package/dist/utilities/generateSchemaMap.d.ts +2 -2
- package/dist/utilities/generateSchemaMap.d.ts.map +1 -1
- package/dist/utilities/generateSchemaMap.js +1 -1
- package/dist/utilities/generateSchemaMap.js.map +1 -1
- package/dist/utilities/migrateSlateToLexical/index.d.ts +15 -0
- package/dist/utilities/migrateSlateToLexical/index.d.ts.map +1 -0
- package/dist/utilities/migrateSlateToLexical/index.js +105 -0
- package/dist/utilities/migrateSlateToLexical/index.js.map +1 -0
- package/dist/utilities/migrateSlateToLexical/recurse.d.ts +9 -0
- package/dist/utilities/migrateSlateToLexical/recurse.d.ts.map +1 -0
- package/dist/utilities/migrateSlateToLexical/recurse.js +77 -0
- package/dist/utilities/migrateSlateToLexical/recurse.js.map +1 -0
- package/dist/utilities/recurseNodeTree.js.map +1 -1
- package/dist/utilities/useLexicalFeature.d.ts +1 -1
- package/dist/utilities/useLexicalFeature.d.ts.map +1 -1
- package/dist/utilities/useLexicalFeature.js.map +1 -1
- package/dist/validate/index.js.map +1 -1
- package/dist/validate/validateNodes.d.ts +1 -1
- package/dist/validate/validateNodes.d.ts.map +1 -1
- package/dist/validate/validateNodes.js.map +1 -1
- package/package.json +10 -10
- package/dist/exports/client/Field-YMWNSE3A.js +0 -2
- package/dist/exports/client/Field-YMWNSE3A.js.map +0 -7
- package/dist/exports/client/chunk-MLIITFAS.js.map +0 -7
- package/dist/exports/client/chunk-OSR74ZNW.js.map +0 -7
- package/dist/exports/client/chunk-QU5MKT75.js.map +0 -7
- package/dist/exports/client/chunk-ZITHDR53.js +0 -2
- package/dist/exports/client/chunk-ZITHDR53.js.map +0 -7
- package/dist/exports/client/component-E2NHAHBC.js.map +0 -7
- package/dist/exports/client/component-X4LSLSWF.js +0 -2
- package/dist/exports/client/component-X4LSLSWF.js.map +0 -7
- package/dist/features/types.d.ts.map +0 -1
- package/dist/features/types.js +0 -3
- package/dist/features/types.js.map +0 -1
- /package/dist/exports/client/{RelationshipComponent-5OU5HATX.js.map → RelationshipComponent-AFXEJMZQ.js.map} +0 -0
- /package/dist/exports/client/{component-QWIGEOVD.js.map → component-VM36FRT2.js.map} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../src/lexical/plugins/handles/DraggableBlockPlugin/index.tsx"],"sourcesContent":["'use client'\nimport type { LexicalEditor } from 'lexical'\nimport type { DragEvent as ReactDragEvent } from 'react'\n\nimport { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext.js'\nimport { eventFiles } from '@lexical/rich-text'\nimport { $getNearestNodeFromDOMNode, $getNodeByKey } from 'lexical'\nimport * as React from 'react'\nimport { useEffect, useRef, useState } from 'react'\nimport { createPortal } from 'react-dom'\n\nimport { useEditorConfigContext } from '../../../config/client/EditorConfigProvider.js'\nimport { isHTMLElement } from '../../../utils/guard.js'\nimport { Point } from '../../../utils/point.js'\nimport { calculateDistanceFromScrollerElem } from '../utils/calculateDistanceFromScrollerElem.js'\nimport { getNodeCloseToPoint } from '../utils/getNodeCloseToPoint.js'\nimport { getTopLevelNodeKeys } from '../utils/getTopLevelNodeKeys.js'\nimport { isOnHandleElement } from '../utils/isOnHandleElement.js'\nimport { setHandlePosition } from '../utils/setHandlePosition.js'\nimport { getBoundingClientRectWithoutTransform } from './getBoundingRectWithoutTransform.js'\nimport './index.scss'\nimport { setTargetLine } from './setTargetLine.js'\n\nconst DRAGGABLE_BLOCK_MENU_CLASSNAME = 'draggable-block-menu'\nconst DRAG_DATA_FORMAT = 'application/x-lexical-drag-block'\n\nlet prevIndex = Infinity\n\nfunction getCurrentIndex(keysLength: number): number {\n if (keysLength === 0) {\n return Infinity\n }\n if (prevIndex >= 0 && prevIndex < keysLength) {\n return prevIndex\n }\n\n return Math.floor(keysLength / 2)\n}\n\nfunction setDragImage(dataTransfer: DataTransfer, draggableBlockElem: HTMLElement) {\n const { transform } = draggableBlockElem.style\n\n // Remove dragImage borders\n dataTransfer.setDragImage(draggableBlockElem, 0, 0)\n\n setTimeout(() => {\n draggableBlockElem.style.transform = transform\n })\n}\n\nfunction hideTargetLine(\n targetLineElem: HTMLElement | null,\n lastTargetBlockElem: HTMLElement | null,\n) {\n if (targetLineElem) {\n targetLineElem.style.opacity = '0'\n }\n if (lastTargetBlockElem) {\n lastTargetBlockElem.style.opacity = ''\n // Delete marginBottom and marginTop values we set\n lastTargetBlockElem.style.marginBottom = ''\n lastTargetBlockElem.style.marginTop = ''\n //lastTargetBlock.style.border = 'none'\n }\n}\n\nfunction useDraggableBlockMenu(\n editor: LexicalEditor,\n anchorElem: HTMLElement,\n isEditable: boolean,\n): React.ReactElement {\n const scrollerElem = anchorElem.parentElement\n\n const menuRef = useRef<HTMLDivElement>(null)\n const targetLineRef = useRef<HTMLDivElement>(null)\n const debugHighlightRef = useRef<HTMLDivElement>(null)\n const isDraggingBlockRef = useRef<boolean>(false)\n const [draggableBlockElem, setDraggableBlockElem] = useState<HTMLElement | null>(null)\n const [lastTargetBlock, setLastTargetBlock] = useState<{\n boundingBox?: DOMRect\n elem: HTMLElement | null\n isBelow: boolean\n }>(null)\n\n const { editorConfig } = useEditorConfigContext()\n\n const blockHandleHorizontalOffset = editorConfig?.admin?.hideGutter ? -44 : -8\n\n useEffect(() => {\n /**\n * Handles positioning of the drag handle\n */\n function onDocumentMouseMove(event: MouseEvent) {\n const target = event.target\n if (!isHTMLElement(target)) {\n return\n }\n\n const distanceFromScrollerElem = calculateDistanceFromScrollerElem(\n scrollerElem,\n event.pageX,\n event.pageY,\n target,\n )\n if (distanceFromScrollerElem === -1) {\n setDraggableBlockElem(null)\n return\n }\n\n if (isOnHandleElement(target, DRAGGABLE_BLOCK_MENU_CLASSNAME)) {\n return\n }\n\n const topLevelNodeKeys = getTopLevelNodeKeys(editor)\n\n const {\n blockElem: _draggableBlockElem,\n foundAtIndex,\n isFoundNodeEmptyParagraph,\n } = getNodeCloseToPoint({\n anchorElem,\n cache_threshold: 0,\n editor,\n horizontalOffset: -distanceFromScrollerElem,\n point: new Point(event.x, event.y),\n startIndex: getCurrentIndex(topLevelNodeKeys.length),\n useEdgeAsDefault: false,\n verbose: false,\n })\n\n prevIndex = foundAtIndex\n\n //if (DEBUG && _draggableBlockElem) {\n //targetBlockElem.style.border = '3px solid red'\n // highlightElemOriginalPosition(debugHighlightRef, _draggableBlockElem, anchorElem)\n //}\n\n if (!_draggableBlockElem && !isFoundNodeEmptyParagraph) {\n return\n }\n\n if (draggableBlockElem !== _draggableBlockElem) {\n setDraggableBlockElem(_draggableBlockElem)\n }\n }\n\n // Since the draggableBlockElem is outside the actual editor, we need to listen to the document\n // to be able to detect when the mouse is outside the editor and respect a buffer around\n // the scrollerElem to avoid the draggableBlockElem disappearing too early.\n document?.addEventListener('mousemove', onDocumentMouseMove)\n\n return () => {\n document?.removeEventListener('mousemove', onDocumentMouseMove)\n }\n }, [scrollerElem, anchorElem, editor, draggableBlockElem])\n\n useEffect(() => {\n if (menuRef.current) {\n setHandlePosition(\n draggableBlockElem,\n menuRef.current,\n anchorElem,\n blockHandleHorizontalOffset,\n )\n }\n }, [anchorElem, draggableBlockElem, blockHandleHorizontalOffset])\n\n useEffect(() => {\n function onDragover(event: DragEvent): boolean {\n if (!isDraggingBlockRef.current) {\n return false\n }\n const [isFileTransfer] = eventFiles(event)\n if (isFileTransfer) {\n return false\n }\n\n const { pageY, target } = event\n if (!isHTMLElement(target)) {\n return false\n }\n\n const distanceFromScrollerElem = calculateDistanceFromScrollerElem(\n scrollerElem,\n event.pageX,\n event.pageY,\n target,\n 100,\n 50,\n )\n\n const topLevelNodeKeys = getTopLevelNodeKeys(editor)\n\n const {\n blockElem: targetBlockElem,\n foundAtIndex,\n isFoundNodeEmptyParagraph,\n } = getNodeCloseToPoint({\n anchorElem,\n editor,\n fuzzy: true,\n horizontalOffset: -distanceFromScrollerElem,\n point: new Point(event.x, event.y),\n startIndex: getCurrentIndex(topLevelNodeKeys.length),\n useEdgeAsDefault: true,\n verbose: true,\n })\n\n prevIndex = foundAtIndex\n\n const targetLineElem = targetLineRef.current\n // targetBlockElem === null shouldn't happen\n if (targetBlockElem === null || targetLineElem === null) {\n return false\n }\n\n if (draggableBlockElem !== targetBlockElem) {\n const { isBelow, willStayInSamePosition } = setTargetLine(\n editorConfig?.admin?.hideGutter ? '0px' : '3rem',\n blockHandleHorizontalOffset +\n (editorConfig?.admin?.hideGutter\n ? menuRef?.current?.getBoundingClientRect()?.width ?? 0\n : -menuRef?.current?.getBoundingClientRect()?.width ?? 0),\n targetLineElem,\n targetBlockElem,\n lastTargetBlock,\n pageY,\n anchorElem,\n event,\n debugHighlightRef,\n isFoundNodeEmptyParagraph,\n )\n\n // Prevent default event to be able to trigger onDrop events\n // Calling preventDefault() adds the green plus icon to the cursor,\n // indicating that the drop is allowed.\n event.preventDefault()\n\n if (!willStayInSamePosition) {\n setLastTargetBlock({\n boundingBox: targetBlockElem.getBoundingClientRect(),\n elem: targetBlockElem,\n isBelow,\n })\n }\n } else {\n hideTargetLine(targetLineElem, lastTargetBlock?.elem)\n setLastTargetBlock({\n boundingBox: targetBlockElem.getBoundingClientRect(),\n elem: targetBlockElem,\n isBelow: false,\n })\n }\n\n return true\n }\n\n function onDrop(event: DragEvent): boolean {\n if (!isDraggingBlockRef.current) {\n return false\n }\n const [isFileTransfer] = eventFiles(event)\n if (isFileTransfer) {\n return false\n }\n const { dataTransfer, pageY, target } = event\n const dragData = dataTransfer?.getData(DRAG_DATA_FORMAT) || ''\n\n editor.update(() => {\n const draggedNode = $getNodeByKey(dragData)\n if (!draggedNode) {\n return false\n }\n if (!isHTMLElement(target)) {\n return false\n }\n const distanceFromScrollerElem = calculateDistanceFromScrollerElem(\n scrollerElem,\n event.pageX,\n event.pageY,\n target,\n 100,\n 50,\n )\n\n const { blockElem: targetBlockElem, isFoundNodeEmptyParagraph } = getNodeCloseToPoint({\n anchorElem,\n editor,\n fuzzy: true,\n horizontalOffset: -distanceFromScrollerElem,\n point: new Point(event.x, event.y),\n useEdgeAsDefault: true,\n })\n\n if (!targetBlockElem) {\n return false\n }\n const targetNode = $getNearestNodeFromDOMNode(targetBlockElem)\n if (!targetNode) {\n return false\n }\n if (targetNode === draggedNode) {\n return true\n }\n\n const { height: targetBlockElemHeight, top: targetBlockElemTop } =\n getBoundingClientRectWithoutTransform(targetBlockElem)\n\n const mouseY = pageY\n const isBelow = mouseY >= targetBlockElemTop + targetBlockElemHeight / 2 + window.scrollY\n\n if (!isFoundNodeEmptyParagraph) {\n if (isBelow) {\n // below targetBlockElem\n targetNode.insertAfter(draggedNode)\n } else {\n // above targetBlockElem\n targetNode.insertBefore(draggedNode)\n }\n } else {\n //\n targetNode.insertBefore(draggedNode)\n targetNode.remove()\n }\n\n /*\n if (pageY >= targetBlockElemTop + targetBlockElemHeight / 2) {\n targetNode.insertAfter(draggedNode)\n } else {\n targetNode.insertBefore(draggedNode)\n }*/\n if (draggableBlockElem !== null) {\n setDraggableBlockElem(null)\n }\n\n // find all previous elements with lexical-block-highlighter class and remove them\n const allPrevHighlighters = document.querySelectorAll('.lexical-block-highlighter')\n allPrevHighlighters.forEach((highlighter) => {\n highlighter.remove()\n })\n\n const newInsertedElem = editor.getElementByKey(draggedNode.getKey())\n setTimeout(() => {\n // add new temp html element to newInsertedElem with the same height and width and the class block-selected\n // to highlight the new inserted element\n const newInsertedElemRect = newInsertedElem.getBoundingClientRect()\n\n const highlightElem = document.createElement('div')\n highlightElem.className = 'lexical-block-highlighter'\n\n // if html data-theme is dark, set the highlighter color to white\n if (document.documentElement.getAttribute('data-theme') === 'dark') {\n highlightElem.style.backgroundColor = 'white'\n } else {\n highlightElem.style.backgroundColor = 'black'\n }\n\n highlightElem.style.transition = 'opacity 0.1s ease-in-out'\n highlightElem.style.zIndex = '1'\n highlightElem.style.pointerEvents = 'none'\n highlightElem.style.boxSizing = 'border-box'\n highlightElem.style.borderRadius = '4px'\n highlightElem.style.position = 'absolute'\n document.body.appendChild(highlightElem)\n\n highlightElem.style.opacity = '0.1'\n\n highlightElem.style.height = `${newInsertedElemRect.height + 8}px`\n highlightElem.style.width = `${newInsertedElemRect.width + 8}px`\n highlightElem.style.top = `${newInsertedElemRect.top + window.scrollY - 4}px`\n highlightElem.style.left = `${newInsertedElemRect.left - 4}px`\n\n setTimeout(() => {\n highlightElem.style.opacity = '0'\n setTimeout(() => {\n highlightElem.remove()\n }, 1000)\n }, 3000)\n }, 120)\n })\n\n return true\n }\n\n // register onDragover event listeners:\n document.addEventListener('dragover', onDragover)\n // register onDrop event listeners:\n document.addEventListener('drop', onDrop)\n\n return () => {\n document.removeEventListener('dragover', onDragover)\n document.removeEventListener('drop', onDrop)\n }\n }, [\n scrollerElem,\n blockHandleHorizontalOffset,\n anchorElem,\n editor,\n lastTargetBlock,\n draggableBlockElem,\n editorConfig?.admin?.hideGutter,\n ])\n\n function onDragStart(event: ReactDragEvent<HTMLDivElement>): void {\n const dataTransfer = event.dataTransfer\n if (!dataTransfer || !draggableBlockElem) {\n return\n }\n setDragImage(dataTransfer, draggableBlockElem)\n let nodeKey = ''\n editor.update(() => {\n const node = $getNearestNodeFromDOMNode(draggableBlockElem)\n if (node) {\n nodeKey = node.getKey()\n }\n })\n isDraggingBlockRef.current = true\n dataTransfer.setData(DRAG_DATA_FORMAT, nodeKey)\n }\n\n function onDragEnd(): void {\n isDraggingBlockRef.current = false\n hideTargetLine(targetLineRef.current, lastTargetBlock?.elem)\n }\n\n return createPortal(\n <React.Fragment>\n <div\n className=\"icon draggable-block-menu\"\n draggable\n onDragEnd={onDragEnd}\n onDragStart={onDragStart}\n ref={menuRef}\n >\n <div className={isEditable ? 'icon' : ''} />\n </div>\n <div className=\"draggable-block-target-line\" ref={targetLineRef} />\n <div className=\"debug-highlight\" ref={debugHighlightRef} />\n </React.Fragment>,\n anchorElem,\n )\n}\n\nexport function DraggableBlockPlugin({\n anchorElem = document.body,\n}: {\n anchorElem?: HTMLElement\n}): React.ReactElement {\n const [editor] = useLexicalComposerContext()\n return useDraggableBlockMenu(editor, anchorElem, editor._editable)\n}\n"],"names":["useLexicalComposerContext","eventFiles","$getNearestNodeFromDOMNode","$getNodeByKey","React","useEffect","useRef","useState","createPortal","useEditorConfigContext","isHTMLElement","Point","calculateDistanceFromScrollerElem","getNodeCloseToPoint","getTopLevelNodeKeys","isOnHandleElement","setHandlePosition","getBoundingClientRectWithoutTransform","setTargetLine","DRAGGABLE_BLOCK_MENU_CLASSNAME","DRAG_DATA_FORMAT","prevIndex","Infinity","getCurrentIndex","keysLength","Math","floor","setDragImage","dataTransfer","draggableBlockElem","transform","style","setTimeout","hideTargetLine","targetLineElem","lastTargetBlockElem","opacity","marginBottom","marginTop","useDraggableBlockMenu","editor","anchorElem","isEditable","scrollerElem","parentElement","menuRef","targetLineRef","debugHighlightRef","isDraggingBlockRef","setDraggableBlockElem","lastTargetBlock","setLastTargetBlock","editorConfig","blockHandleHorizontalOffset","admin","hideGutter","onDocumentMouseMove","event","target","distanceFromScrollerElem","pageX","pageY","topLevelNodeKeys","blockElem","_draggableBlockElem","foundAtIndex","isFoundNodeEmptyParagraph","cache_threshold","horizontalOffset","point","x","y","startIndex","length","useEdgeAsDefault","verbose","document","addEventListener","removeEventListener","current","onDragover","isFileTransfer","targetBlockElem","fuzzy","isBelow","willStayInSamePosition","getBoundingClientRect","width","preventDefault","boundingBox","elem","onDrop","dragData","getData","update","draggedNode","targetNode","height","targetBlockElemHeight","top","targetBlockElemTop","mouseY","window","scrollY","insertAfter","insertBefore","remove","allPrevHighlighters","querySelectorAll","forEach","highlighter","newInsertedElem","getElementByKey","getKey","newInsertedElemRect","highlightElem","createElement","className","documentElement","getAttribute","backgroundColor","transition","zIndex","pointerEvents","boxSizing","borderRadius","position","body","appendChild","left","onDragStart","nodeKey","node","setData","onDragEnd","Fragment","div","draggable","ref","DraggableBlockPlugin","_editable"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA;;AAIA,SAASA,yBAAyB,QAAQ,2CAA0C;AACpF,SA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ASE,mBAAmB,CAAC,YAAYE;YACzCJ,SAASE,mBAAmB,CAAC,QAAQa;QACvC;IACF,GAAG;QACDhD;QACAU;QACAZ;QACAD;QACAU;QACArB;QACAuB,cAAcE,OAAOC;KACtB;IAED,SAAS2E,YAAYzE,KAAqC;QACxD,MAAM7B,eAAe6B,MAAM7B,YAAY;QACvC,IAAI,CAACA,gBAAgB,CAACC,oBAAoB;YACxC;QACF;QACAF,aAAaC,cAAcC;QAC3B,IAAIsG,UAAU;QACd3F,OAAOsD,MAAM,CAAC;YACZ,MAAMsC,OAAOlI,2BAA2B2B;YACxC,IAAIuG,MAAM;gBACRD,UAAUC,KAAKnB,MAAM;YACvB;QACF;QACAjE,mBAAmB+B,OAAO,GAAG;QAC7BnD,aAAayG,OAAO,CAACjH,kBAAkB+G;IACzC;IAEA,SAASG;QACPtF,mBAAmB+B,OAAO,GAAG;QAC7B9C,eAAea,cAAciC,OAAO,EAAE7B,iBAAiBwC;IACzD;IAEA,qBAAOlF,2BACL,MAACJ,MAAMmI,QAAQ;;0BACb,KAACC;gBACCnB,WAAU;gBACVoB,SAAS;gBACTH,WAAWA;gBACXJ,aAAaA;gBACbQ,KAAK7F;0BAEL,cAAA,KAAC2F;oBAAInB,WAAW3E,aAAa,SAAS;;;0BAExC,KAAC8F;gBAAInB,WAAU;gBAA8BqB,KAAK5F;;0BAClD,KAAC0F;gBAAInB,WAAU;gBAAkBqB,KAAK3F;;;QAExCN;AAEJ;AAEA,OAAO,SAASkG,qBAAqB,EACnClG,aAAamC,SAASmD,IAAI,EAG3B;IACC,MAAM,CAACvF,OAAO,GAAGxC;IACjB,OAAOuC,sBAAsBC,QAAQC,YAAYD,OAAOoG,SAAS;AACnE"}
|
|
1
|
+
{"version":3,"sources":["../../../../../src/lexical/plugins/handles/DraggableBlockPlugin/index.tsx"],"sourcesContent":["'use client'\nimport type { LexicalEditor } from 'lexical'\nimport type { DragEvent as ReactDragEvent } from 'react'\n\nimport { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext.js'\nimport { eventFiles } from '@lexical/rich-text'\nimport { $getNearestNodeFromDOMNode, $getNodeByKey } from 'lexical'\nimport * as React from 'react'\nimport { useEffect, useRef, useState } from 'react'\nimport { createPortal } from 'react-dom'\n\nimport { useEditorConfigContext } from '../../../config/client/EditorConfigProvider.js'\nimport { isHTMLElement } from '../../../utils/guard.js'\nimport { Point } from '../../../utils/point.js'\nimport { calculateDistanceFromScrollerElem } from '../utils/calculateDistanceFromScrollerElem.js'\nimport { getNodeCloseToPoint } from '../utils/getNodeCloseToPoint.js'\nimport { getTopLevelNodeKeys } from '../utils/getTopLevelNodeKeys.js'\nimport { isOnHandleElement } from '../utils/isOnHandleElement.js'\nimport { setHandlePosition } from '../utils/setHandlePosition.js'\nimport { getBoundingClientRectWithoutTransform } from './getBoundingRectWithoutTransform.js'\nimport './index.scss'\nimport { setTargetLine } from './setTargetLine.js'\n\nconst DRAGGABLE_BLOCK_MENU_CLASSNAME = 'draggable-block-menu'\nconst DRAG_DATA_FORMAT = 'application/x-lexical-drag-block'\n\nlet prevIndex = Infinity\n\nfunction getCurrentIndex(keysLength: number): number {\n if (keysLength === 0) {\n return Infinity\n }\n if (prevIndex >= 0 && prevIndex < keysLength) {\n return prevIndex\n }\n\n return Math.floor(keysLength / 2)\n}\n\nfunction setDragImage(dataTransfer: DataTransfer, draggableBlockElem: HTMLElement) {\n const { transform } = draggableBlockElem.style\n\n // Remove dragImage borders\n dataTransfer.setDragImage(draggableBlockElem, 0, 0)\n\n setTimeout(() => {\n draggableBlockElem.style.transform = transform\n })\n}\n\nfunction hideTargetLine(\n targetLineElem: HTMLElement | null,\n lastTargetBlockElem: HTMLElement | null,\n) {\n if (targetLineElem) {\n targetLineElem.style.opacity = '0'\n }\n if (lastTargetBlockElem) {\n lastTargetBlockElem.style.opacity = ''\n // Delete marginBottom and marginTop values we set\n lastTargetBlockElem.style.marginBottom = ''\n lastTargetBlockElem.style.marginTop = ''\n //lastTargetBlock.style.border = 'none'\n }\n}\n\nfunction useDraggableBlockMenu(\n editor: LexicalEditor,\n anchorElem: HTMLElement,\n isEditable: boolean,\n): React.ReactElement {\n const scrollerElem = anchorElem.parentElement\n\n const menuRef = useRef<HTMLDivElement>(null)\n const targetLineRef = useRef<HTMLDivElement>(null)\n const debugHighlightRef = useRef<HTMLDivElement>(null)\n const isDraggingBlockRef = useRef<boolean>(false)\n const [draggableBlockElem, setDraggableBlockElem] = useState<HTMLElement | null>(null)\n const [lastTargetBlock, setLastTargetBlock] = useState<{\n boundingBox?: DOMRect\n elem: HTMLElement | null\n isBelow: boolean\n }>(null)\n\n const { editorConfig } = useEditorConfigContext()\n\n const blockHandleHorizontalOffset = editorConfig?.admin?.hideGutter ? -44 : -8\n\n useEffect(() => {\n /**\n * Handles positioning of the drag handle\n */\n function onDocumentMouseMove(event: MouseEvent) {\n const target = event.target\n if (!isHTMLElement(target)) {\n return\n }\n\n const distanceFromScrollerElem = calculateDistanceFromScrollerElem(\n scrollerElem,\n event.pageX,\n event.pageY,\n target,\n )\n if (distanceFromScrollerElem === -1) {\n setDraggableBlockElem(null)\n return\n }\n\n if (isOnHandleElement(target, DRAGGABLE_BLOCK_MENU_CLASSNAME)) {\n return\n }\n\n const topLevelNodeKeys = getTopLevelNodeKeys(editor)\n\n const {\n blockElem: _draggableBlockElem,\n foundAtIndex,\n isFoundNodeEmptyParagraph,\n } = getNodeCloseToPoint({\n anchorElem,\n cache_threshold: 0,\n editor,\n horizontalOffset: -distanceFromScrollerElem,\n point: new Point(event.x, event.y),\n startIndex: getCurrentIndex(topLevelNodeKeys.length),\n useEdgeAsDefault: false,\n verbose: false,\n })\n\n prevIndex = foundAtIndex\n\n //if (DEBUG && _draggableBlockElem) {\n //targetBlockElem.style.border = '3px solid red'\n // highlightElemOriginalPosition(debugHighlightRef, _draggableBlockElem, anchorElem)\n //}\n\n if (!_draggableBlockElem && !isFoundNodeEmptyParagraph) {\n return\n }\n\n if (draggableBlockElem !== _draggableBlockElem) {\n setDraggableBlockElem(_draggableBlockElem)\n }\n }\n\n // Since the draggableBlockElem is outside the actual editor, we need to listen to the document\n // to be able to detect when the mouse is outside the editor and respect a buffer around\n // the scrollerElem to avoid the draggableBlockElem disappearing too early.\n document?.addEventListener('mousemove', onDocumentMouseMove)\n\n return () => {\n document?.removeEventListener('mousemove', onDocumentMouseMove)\n }\n }, [scrollerElem, anchorElem, editor, draggableBlockElem])\n\n useEffect(() => {\n if (menuRef.current) {\n setHandlePosition(\n draggableBlockElem,\n menuRef.current,\n anchorElem,\n blockHandleHorizontalOffset,\n )\n }\n }, [anchorElem, draggableBlockElem, blockHandleHorizontalOffset])\n\n useEffect(() => {\n function onDragover(event: DragEvent): boolean {\n if (!isDraggingBlockRef.current) {\n return false\n }\n const [isFileTransfer] = eventFiles(event)\n if (isFileTransfer) {\n return false\n }\n\n const { pageY, target } = event\n if (!isHTMLElement(target)) {\n return false\n }\n\n const distanceFromScrollerElem = calculateDistanceFromScrollerElem(\n scrollerElem,\n event.pageX,\n event.pageY,\n target,\n 100,\n 50,\n )\n\n const topLevelNodeKeys = getTopLevelNodeKeys(editor)\n\n const {\n blockElem: targetBlockElem,\n foundAtIndex,\n isFoundNodeEmptyParagraph,\n } = getNodeCloseToPoint({\n anchorElem,\n editor,\n fuzzy: true,\n horizontalOffset: -distanceFromScrollerElem,\n point: new Point(event.x, event.y),\n startIndex: getCurrentIndex(topLevelNodeKeys.length),\n useEdgeAsDefault: true,\n verbose: true,\n })\n\n prevIndex = foundAtIndex\n\n const targetLineElem = targetLineRef.current\n // targetBlockElem === null shouldn't happen\n if (targetBlockElem === null || targetLineElem === null) {\n return false\n }\n\n if (draggableBlockElem !== targetBlockElem) {\n const { isBelow, willStayInSamePosition } = setTargetLine(\n editorConfig?.admin?.hideGutter ? '0px' : '3rem',\n blockHandleHorizontalOffset +\n (editorConfig?.admin?.hideGutter\n ? menuRef?.current?.getBoundingClientRect()?.width ?? 0\n : -menuRef?.current?.getBoundingClientRect()?.width ?? 0),\n targetLineElem,\n targetBlockElem,\n lastTargetBlock,\n pageY,\n anchorElem,\n event,\n debugHighlightRef,\n isFoundNodeEmptyParagraph,\n )\n\n // Prevent default event to be able to trigger onDrop events\n // Calling preventDefault() adds the green plus icon to the cursor,\n // indicating that the drop is allowed.\n event.preventDefault()\n\n if (!willStayInSamePosition) {\n setLastTargetBlock({\n boundingBox: targetBlockElem.getBoundingClientRect(),\n elem: targetBlockElem,\n isBelow,\n })\n }\n } else {\n hideTargetLine(targetLineElem, lastTargetBlock?.elem)\n setLastTargetBlock({\n boundingBox: targetBlockElem.getBoundingClientRect(),\n elem: targetBlockElem,\n isBelow: false,\n })\n }\n\n return true\n }\n\n function onDrop(event: DragEvent): boolean {\n if (!isDraggingBlockRef.current) {\n return false\n }\n const [isFileTransfer] = eventFiles(event)\n if (isFileTransfer) {\n return false\n }\n const { dataTransfer, pageY, target } = event\n const dragData = dataTransfer?.getData(DRAG_DATA_FORMAT) || ''\n\n editor.update(() => {\n const draggedNode = $getNodeByKey(dragData)\n if (!draggedNode) {\n return false\n }\n if (!isHTMLElement(target)) {\n return false\n }\n const distanceFromScrollerElem = calculateDistanceFromScrollerElem(\n scrollerElem,\n event.pageX,\n event.pageY,\n target,\n 100,\n 50,\n )\n\n const { blockElem: targetBlockElem, isFoundNodeEmptyParagraph } = getNodeCloseToPoint({\n anchorElem,\n editor,\n fuzzy: true,\n horizontalOffset: -distanceFromScrollerElem,\n point: new Point(event.x, event.y),\n useEdgeAsDefault: true,\n })\n\n if (!targetBlockElem) {\n return false\n }\n const targetNode = $getNearestNodeFromDOMNode(targetBlockElem)\n if (!targetNode) {\n return false\n }\n if (targetNode === draggedNode) {\n return true\n }\n\n const { height: targetBlockElemHeight, top: targetBlockElemTop } =\n getBoundingClientRectWithoutTransform(targetBlockElem)\n\n const mouseY = pageY\n const isBelow = mouseY >= targetBlockElemTop + targetBlockElemHeight / 2 + window.scrollY\n\n if (!isFoundNodeEmptyParagraph) {\n if (isBelow) {\n // below targetBlockElem\n targetNode.insertAfter(draggedNode)\n } else {\n // above targetBlockElem\n targetNode.insertBefore(draggedNode)\n }\n } else {\n //\n targetNode.insertBefore(draggedNode)\n targetNode.remove()\n }\n\n /*\n if (pageY >= targetBlockElemTop + targetBlockElemHeight / 2) {\n targetNode.insertAfter(draggedNode)\n } else {\n targetNode.insertBefore(draggedNode)\n }*/\n if (draggableBlockElem !== null) {\n setDraggableBlockElem(null)\n }\n\n // find all previous elements with lexical-block-highlighter class and remove them\n const allPrevHighlighters = document.querySelectorAll('.lexical-block-highlighter')\n allPrevHighlighters.forEach((highlighter) => {\n highlighter.remove()\n })\n\n const newInsertedElem = editor.getElementByKey(draggedNode.getKey())\n setTimeout(() => {\n // add new temp html element to newInsertedElem with the same height and width and the class block-selected\n // to highlight the new inserted element\n const newInsertedElemRect = newInsertedElem.getBoundingClientRect()\n\n const highlightElem = document.createElement('div')\n highlightElem.className = 'lexical-block-highlighter'\n\n // if html data-theme is dark, set the highlighter color to white\n if (document.documentElement.getAttribute('data-theme') === 'dark') {\n highlightElem.style.backgroundColor = 'white'\n } else {\n highlightElem.style.backgroundColor = 'black'\n }\n\n highlightElem.style.transition = 'opacity 0.1s ease-in-out'\n highlightElem.style.zIndex = '1'\n highlightElem.style.pointerEvents = 'none'\n highlightElem.style.boxSizing = 'border-box'\n highlightElem.style.borderRadius = '4px'\n highlightElem.style.position = 'absolute'\n document.body.appendChild(highlightElem)\n\n highlightElem.style.opacity = '0.1'\n\n highlightElem.style.height = `${newInsertedElemRect.height + 8}px`\n highlightElem.style.width = `${newInsertedElemRect.width + 8}px`\n highlightElem.style.top = `${newInsertedElemRect.top + window.scrollY - 4}px`\n highlightElem.style.left = `${newInsertedElemRect.left - 4}px`\n\n setTimeout(() => {\n highlightElem.style.opacity = '0'\n setTimeout(() => {\n highlightElem.remove()\n }, 1000)\n }, 3000)\n }, 120)\n })\n\n return true\n }\n\n // register onDragover event listeners:\n document.addEventListener('dragover', onDragover)\n // register onDrop event listeners:\n document.addEventListener('drop', onDrop)\n\n return () => {\n document.removeEventListener('dragover', onDragover)\n document.removeEventListener('drop', onDrop)\n }\n }, [\n scrollerElem,\n blockHandleHorizontalOffset,\n anchorElem,\n editor,\n lastTargetBlock,\n draggableBlockElem,\n editorConfig?.admin?.hideGutter,\n ])\n\n function onDragStart(event: ReactDragEvent<HTMLDivElement>): void {\n const dataTransfer = event.dataTransfer\n if (!dataTransfer || !draggableBlockElem) {\n return\n }\n setDragImage(dataTransfer, draggableBlockElem)\n let nodeKey = ''\n editor.update(() => {\n const node = $getNearestNodeFromDOMNode(draggableBlockElem)\n if (node) {\n nodeKey = node.getKey()\n }\n })\n isDraggingBlockRef.current = true\n dataTransfer.setData(DRAG_DATA_FORMAT, nodeKey)\n }\n\n function onDragEnd(): void {\n isDraggingBlockRef.current = false\n hideTargetLine(targetLineRef.current, lastTargetBlock?.elem)\n }\n\n return createPortal(\n <React.Fragment>\n <div\n className=\"icon draggable-block-menu\"\n draggable\n onDragEnd={onDragEnd}\n onDragStart={onDragStart}\n ref={menuRef}\n >\n <div className={isEditable ? 'icon' : ''} />\n </div>\n <div className=\"draggable-block-target-line\" ref={targetLineRef} />\n <div className=\"debug-highlight\" ref={debugHighlightRef} />\n </React.Fragment>,\n anchorElem,\n )\n}\n\nexport function DraggableBlockPlugin({\n anchorElem = document.body,\n}: {\n anchorElem?: HTMLElement\n}): React.ReactElement {\n const [editor] = useLexicalComposerContext()\n return useDraggableBlockMenu(editor, anchorElem, editor._editable)\n}\n"],"names":["useLexicalComposerContext","eventFiles","$getNearestNodeFromDOMNode","$getNodeByKey","React","useEffect","useRef","useState","createPortal","useEditorConfigContext","isHTMLElement","Point","calculateDistanceFromScrollerElem","getNodeCloseToPoint","getTopLevelNodeKeys","isOnHandleElement","setHandlePosition","getBoundingClientRectWithoutTransform","setTargetLine","DRAGGABLE_BLOCK_MENU_CLASSNAME","DRAG_DATA_FORMAT","prevIndex","Infinity","getCurrentIndex","keysLength","Math","floor","setDragImage","dataTransfer","draggableBlockElem","transform","style","setTimeout","hideTargetLine","targetLineElem","lastTargetBlockElem","opacity","marginBottom","marginTop","useDraggableBlockMenu","editor","anchorElem","isEditable","scrollerElem","parentElement","menuRef","targetLineRef","debugHighlightRef","isDraggingBlockRef","setDraggableBlockElem","lastTargetBlock","setLastTargetBlock","editorConfig","blockHandleHorizontalOffset","admin","hideGutter","onDocumentMouseMove","event","target","distanceFromScrollerElem","pageX","pageY","topLevelNodeKeys","blockElem","_draggableBlockElem","foundAtIndex","isFoundNodeEmptyParagraph","cache_threshold","horizontalOffset","point","x","y","startIndex","length","useEdgeAsDefault","verbose","document","addEventListener","removeEventListener","current","onDragover","isFileTransfer","targetBlockElem","fuzzy","isBelow","willStayInSamePosition","getBoundingClientRect","width","preventDefault","boundingBox","elem","onDrop","dragData","getData","update","draggedNode","targetNode","height","targetBlockElemHeight","top","targetBlockElemTop","mouseY","window","scrollY","insertAfter","insertBefore","remove","allPrevHighlighters","querySelectorAll","forEach","highlighter","newInsertedElem","getElementByKey","getKey","newInsertedElemRect","highlightElem","createElement","className","documentElement","getAttribute","backgroundColor","transition","zIndex","pointerEvents","boxSizing","borderRadius","position","body","appendChild","left","onDragStart","nodeKey","node","setData","onDragEnd","Fragment","div","draggable","ref","DraggableBlockPlugin","_editable"],"mappings":"AAAA;;AAIA,SAASA,yBAAyB,QAAQ,2CAA0C;AACpF,SAASC,UAAU,QAAQ,qBAAoB;AAC/C,SAASC,0BAA0B,EAAEC,aAAa,QAAQ,UAAS;AACnE,YAAYC,WAAW,QAAO;AAC9B,SAASC,SAAS,EAAEC,MAAM,EAAEC,QAAQ,QAAQ,QAAO;AACnD,SAASC,YAAY,QAAQ,YAAW;AAExC,SAASC,sBAAsB,QAAQ,iDAAgD;AACvF,SAASC,aAAa,QAAQ,0BAAyB;AACvD,SAASC,KAAK,QAAQ,0BAAyB;AAC/C,SAASC,iCAAiC,QAAQ,gDAA+C;AACjG,SAASC,mBAAmB,QAAQ,kCAAiC;AACrE,SAASC,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,MAAM;gBACRD,UAAUC,KAAKnB,MAAM;YACvB;QACF;QACAjE,mBAAmB+B,OAAO,GAAG;QAC7BnD,aAAayG,OAAO,CAACjH,kBAAkB+G;IACzC;IAEA,SAASG;QACPtF,mBAAmB+B,OAAO,GAAG;QAC7B9C,eAAea,cAAciC,OAAO,EAAE7B,iBAAiBwC;IACzD;IAEA,qBAAOlF,2BACL,MAACJ,MAAMmI,QAAQ;;0BACb,KAACC;gBACCnB,WAAU;gBACVoB,SAAS;gBACTH,WAAWA;gBACXJ,aAAaA;gBACbQ,KAAK7F;0BAEL,cAAA,KAAC2F;oBAAInB,WAAW3E,aAAa,SAAS;;;0BAExC,KAAC8F;gBAAInB,WAAU;gBAA8BqB,KAAK5F;;0BAClD,KAAC0F;gBAAInB,WAAU;gBAAkBqB,KAAK3F;;;QAExCN;AAEJ;AAEA,OAAO,SAASkG,qBAAqB,EACnClG,aAAamC,SAASmD,IAAI,EAG3B;IACC,MAAM,CAACvF,OAAO,GAAGxC;IACjB,OAAOuC,sBAAsBC,QAAQC,YAAYD,OAAOoG,SAAS;AACnE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"setTargetLine.d.ts","sourceRoot":"","sources":["../../../../../src/lexical/plugins/handles/DraggableBlockPlugin/setTargetLine.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"setTargetLine.d.ts","sourceRoot":"","sources":["../../../../../src/lexical/plugins/handles/DraggableBlockPlugin/setTargetLine.ts"],"names":[],"mappings":"AASA,wBAAgB,aAAa,CAC3B,WAAW,EAAE,MAAM,EACnB,UAAU,EAAE,MAAM,EAClB,cAAc,EAAE,WAAW,EAC3B,eAAe,EAAE,WAAW,EAC5B,eAAe,EAAE;IACf,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,IAAI,EAAE,WAAW,GAAG,IAAI,CAAA;IACxB,OAAO,EAAE,OAAO,CAAA;CACjB,EACD,MAAM,EAAE,MAAM,EACd,UAAU,EAAE,WAAW,EACvB,KAAK,EAAE,SAAS,EAChB,iBAAiB,EAAE,KAAK,CAAC,SAAS,CAAC,cAAc,GAAG,IAAI,CAAC,EACzD,yBAAyB,GAAE,OAAe;;;EA4I3C"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../src/lexical/plugins/handles/DraggableBlockPlugin/setTargetLine.ts"],"sourcesContent":["import { getCollapsedMargins } from '../utils/getCollapsedMargins.js'\nimport { getBoundingClientRectWithoutTransform } from './getBoundingRectWithoutTransform.js'\nimport { highlightElemOriginalPosition } from './highlightElemOriginalPosition.js'\nconst TARGET_LINE_HALF_HEIGHT = 25\nconst TEXT_BOX_HORIZONTAL_PADDING = -24\nconst DEBUG = false\n\nlet animationTimer = 0\n\nexport function setTargetLine(\n offsetWidth: string,\n offsetLeft: number,\n targetLineElem: HTMLElement,\n targetBlockElem: HTMLElement,\n lastTargetBlock: {\n boundingBox?: DOMRect\n elem: HTMLElement | null\n isBelow: boolean\n },\n mouseY: number,\n anchorElem: HTMLElement,\n event: DragEvent,\n debugHighlightRef: React.RefObject<HTMLDivElement | null>,\n isFoundNodeEmptyParagraph: boolean = false,\n) {\n const { height: targetBlockElemHeight, top: targetBlockElemTop } =\n targetBlockElem.getBoundingClientRect() // used to be getBoundingClientRectWithoutTransform. Not sure what's better, but the normal getBoundingClientRect seems to work fine\n const { top: anchorTop, width: anchorWidth } = anchorElem.getBoundingClientRect()\n\n const { marginBottom, marginTop } = getCollapsedMargins(targetBlockElem)\n let lineTop = targetBlockElemTop\n\n const isBelow = mouseY >= targetBlockElemTop + targetBlockElemHeight / 2 + window.scrollY\n\n let willStayInSamePosition = false\n\n /**\n * Do not run any transform or changes if the actual new line position would be the same (even if it's now inserted BEFORE rather than AFTER - position would still be the same)\n * This prevents unnecessary flickering.\n *\n * We still need to let it run even if the position (IGNORING the transform) would not change, as the transform animation is not finished yet. This is what animationTimer does. Otherwise, the positioning will be inaccurate\n */\n if (lastTargetBlock?.elem) {\n if (targetBlockElem !== lastTargetBlock?.elem) {\n if (\n isBelow &&\n lastTargetBlock?.elem &&\n lastTargetBlock?.elem === targetBlockElem.nextElementSibling\n ) {\n animationTimer++\n\n if (animationTimer < 200) {\n willStayInSamePosition = true\n }\n } else if (\n !isBelow &&\n lastTargetBlock?.elem &&\n lastTargetBlock?.elem === targetBlockElem.previousElementSibling\n ) {\n animationTimer++\n if (animationTimer < 200) {\n willStayInSamePosition = true\n }\n }\n } else {\n animationTimer++\n\n const lastBoundingBoxPosition = lastTargetBlock?.boundingBox?.y\n const currentBoundingBoxPosition = targetBlockElem.getBoundingClientRect().y\n\n if (\n (isBelow === lastTargetBlock?.isBelow &&\n lastBoundingBoxPosition === currentBoundingBoxPosition) ||\n animationTimer < 200\n ) {\n willStayInSamePosition = false\n }\n }\n }\n if (willStayInSamePosition) {\n return {\n isBelow,\n willStayInSamePosition,\n }\n }\n\n /**\n * Paragraphs need no isBelow/above handling,\n */\n if (!isFoundNodeEmptyParagraph) {\n //if (!isFoundNodeEmptyParagraph) {\n if (isBelow) {\n // below targetBlockElem\n lineTop += targetBlockElemHeight + marginBottom / 2\n } else {\n // above targetBlockElem\n lineTop -= marginTop / 2\n }\n } else {\n lineTop += targetBlockElemHeight / 2\n }\n\n let targetElemTranslate2 = 0\n\n if (!isFoundNodeEmptyParagraph) {\n if (isBelow) {\n targetElemTranslate2 = -TARGET_LINE_HALF_HEIGHT\n } else {\n targetElemTranslate2 = TARGET_LINE_HALF_HEIGHT\n }\n }\n\n const top = lineTop - anchorTop + targetElemTranslate2\n\n const left = TEXT_BOX_HORIZONTAL_PADDING - offsetLeft\n\n targetLineElem.style.width = `calc(${anchorWidth}px - ${offsetWidth})`\n targetLineElem.style.opacity = '.4'\n\n /**\n * Move around element below or above the line (= the target / targetBlockElem). Creates \"space\" for the targetLineElem\n *\n * Not needed for empty paragraphs, as an empty paragraph is enough space for the targetLineElem anyways.\n */\n //targetBlockElem.style.opacity = '0.4'\n const buffer = 12 // creates more spacing/padding so target line is not directly next to the targetBlockElem\n if (!isFoundNodeEmptyParagraph) {\n if (isBelow) {\n targetBlockElem.style.marginBottom = TARGET_LINE_HALF_HEIGHT * 2 + buffer + 'px'\n targetLineElem.style.transform = `translate(${left}px, calc(${top}px - ${'0px'}))`\n } else {\n targetBlockElem.style.marginTop = TARGET_LINE_HALF_HEIGHT * 2 + buffer + 'px'\n targetLineElem.style.transform = `translate(${left}px, calc(${top - TARGET_LINE_HALF_HEIGHT * 2}px - ${'0px'}))`\n }\n } else {\n targetLineElem.style.transform = `translate(${left}px, ${top - TARGET_LINE_HALF_HEIGHT}px)`\n }\n\n if (DEBUG) {\n //targetBlockElem.style.border = '3px solid red'\n highlightElemOriginalPosition(debugHighlightRef, targetBlockElem, anchorElem)\n }\n\n /**\n * Properly reset previous targetBlockElem styles\n */\n lastTargetBlock.elem.style.opacity = ''\n\n if (lastTargetBlock?.elem === targetBlockElem) {\n if (isBelow) {\n lastTargetBlock.elem.style.marginTop = ''\n } else {\n lastTargetBlock.elem.style.marginBottom = ''\n }\n } else {\n lastTargetBlock.elem.style.marginBottom = ''\n lastTargetBlock.elem.style.marginTop = ''\n }\n animationTimer = 0\n return {\n isBelow,\n willStayInSamePosition,\n }\n}\n"],"names":["getCollapsedMargins","highlightElemOriginalPosition","TARGET_LINE_HALF_HEIGHT","TEXT_BOX_HORIZONTAL_PADDING","DEBUG","animationTimer","setTargetLine","offsetWidth","offsetLeft","targetLineElem","targetBlockElem","lastTargetBlock","mouseY","anchorElem","event","debugHighlightRef","isFoundNodeEmptyParagraph","height","targetBlockElemHeight","top","targetBlockElemTop","getBoundingClientRect","anchorTop","width","anchorWidth","marginBottom","marginTop","lineTop","isBelow","window","scrollY","willStayInSamePosition","elem","nextElementSibling","previousElementSibling","lastBoundingBoxPosition","boundingBox","y","currentBoundingBoxPosition","targetElemTranslate2","left","style","opacity","buffer","transform"],"
|
|
1
|
+
{"version":3,"sources":["../../../../../src/lexical/plugins/handles/DraggableBlockPlugin/setTargetLine.ts"],"sourcesContent":["import { getCollapsedMargins } from '../utils/getCollapsedMargins.js'\nimport { getBoundingClientRectWithoutTransform } from './getBoundingRectWithoutTransform.js'\nimport { highlightElemOriginalPosition } from './highlightElemOriginalPosition.js'\nconst TARGET_LINE_HALF_HEIGHT = 25\nconst TEXT_BOX_HORIZONTAL_PADDING = -24\nconst DEBUG = false\n\nlet animationTimer = 0\n\nexport function setTargetLine(\n offsetWidth: string,\n offsetLeft: number,\n targetLineElem: HTMLElement,\n targetBlockElem: HTMLElement,\n lastTargetBlock: {\n boundingBox?: DOMRect\n elem: HTMLElement | null\n isBelow: boolean\n },\n mouseY: number,\n anchorElem: HTMLElement,\n event: DragEvent,\n debugHighlightRef: React.RefObject<HTMLDivElement | null>,\n isFoundNodeEmptyParagraph: boolean = false,\n) {\n const { height: targetBlockElemHeight, top: targetBlockElemTop } =\n targetBlockElem.getBoundingClientRect() // used to be getBoundingClientRectWithoutTransform. Not sure what's better, but the normal getBoundingClientRect seems to work fine\n const { top: anchorTop, width: anchorWidth } = anchorElem.getBoundingClientRect()\n\n const { marginBottom, marginTop } = getCollapsedMargins(targetBlockElem)\n let lineTop = targetBlockElemTop\n\n const isBelow = mouseY >= targetBlockElemTop + targetBlockElemHeight / 2 + window.scrollY\n\n let willStayInSamePosition = false\n\n /**\n * Do not run any transform or changes if the actual new line position would be the same (even if it's now inserted BEFORE rather than AFTER - position would still be the same)\n * This prevents unnecessary flickering.\n *\n * We still need to let it run even if the position (IGNORING the transform) would not change, as the transform animation is not finished yet. This is what animationTimer does. Otherwise, the positioning will be inaccurate\n */\n if (lastTargetBlock?.elem) {\n if (targetBlockElem !== lastTargetBlock?.elem) {\n if (\n isBelow &&\n lastTargetBlock?.elem &&\n lastTargetBlock?.elem === targetBlockElem.nextElementSibling\n ) {\n animationTimer++\n\n if (animationTimer < 200) {\n willStayInSamePosition = true\n }\n } else if (\n !isBelow &&\n lastTargetBlock?.elem &&\n lastTargetBlock?.elem === targetBlockElem.previousElementSibling\n ) {\n animationTimer++\n if (animationTimer < 200) {\n willStayInSamePosition = true\n }\n }\n } else {\n animationTimer++\n\n const lastBoundingBoxPosition = lastTargetBlock?.boundingBox?.y\n const currentBoundingBoxPosition = targetBlockElem.getBoundingClientRect().y\n\n if (\n (isBelow === lastTargetBlock?.isBelow &&\n lastBoundingBoxPosition === currentBoundingBoxPosition) ||\n animationTimer < 200\n ) {\n willStayInSamePosition = false\n }\n }\n }\n if (willStayInSamePosition) {\n return {\n isBelow,\n willStayInSamePosition,\n }\n }\n\n /**\n * Paragraphs need no isBelow/above handling,\n */\n if (!isFoundNodeEmptyParagraph) {\n //if (!isFoundNodeEmptyParagraph) {\n if (isBelow) {\n // below targetBlockElem\n lineTop += targetBlockElemHeight + marginBottom / 2\n } else {\n // above targetBlockElem\n lineTop -= marginTop / 2\n }\n } else {\n lineTop += targetBlockElemHeight / 2\n }\n\n let targetElemTranslate2 = 0\n\n if (!isFoundNodeEmptyParagraph) {\n if (isBelow) {\n targetElemTranslate2 = -TARGET_LINE_HALF_HEIGHT\n } else {\n targetElemTranslate2 = TARGET_LINE_HALF_HEIGHT\n }\n }\n\n const top = lineTop - anchorTop + targetElemTranslate2\n\n const left = TEXT_BOX_HORIZONTAL_PADDING - offsetLeft\n\n targetLineElem.style.width = `calc(${anchorWidth}px - ${offsetWidth})`\n targetLineElem.style.opacity = '.4'\n\n /**\n * Move around element below or above the line (= the target / targetBlockElem). Creates \"space\" for the targetLineElem\n *\n * Not needed for empty paragraphs, as an empty paragraph is enough space for the targetLineElem anyways.\n */\n //targetBlockElem.style.opacity = '0.4'\n const buffer = 12 // creates more spacing/padding so target line is not directly next to the targetBlockElem\n if (!isFoundNodeEmptyParagraph) {\n if (isBelow) {\n targetBlockElem.style.marginBottom = TARGET_LINE_HALF_HEIGHT * 2 + buffer + 'px'\n targetLineElem.style.transform = `translate(${left}px, calc(${top}px - ${'0px'}))`\n } else {\n targetBlockElem.style.marginTop = TARGET_LINE_HALF_HEIGHT * 2 + buffer + 'px'\n targetLineElem.style.transform = `translate(${left}px, calc(${top - TARGET_LINE_HALF_HEIGHT * 2}px - ${'0px'}))`\n }\n } else {\n targetLineElem.style.transform = `translate(${left}px, ${top - TARGET_LINE_HALF_HEIGHT}px)`\n }\n\n if (DEBUG) {\n //targetBlockElem.style.border = '3px solid red'\n highlightElemOriginalPosition(debugHighlightRef, targetBlockElem, anchorElem)\n }\n\n /**\n * Properly reset previous targetBlockElem styles\n */\n lastTargetBlock.elem.style.opacity = ''\n\n if (lastTargetBlock?.elem === targetBlockElem) {\n if (isBelow) {\n lastTargetBlock.elem.style.marginTop = ''\n } else {\n lastTargetBlock.elem.style.marginBottom = ''\n }\n } else {\n lastTargetBlock.elem.style.marginBottom = ''\n lastTargetBlock.elem.style.marginTop = ''\n }\n animationTimer = 0\n return {\n isBelow,\n willStayInSamePosition,\n }\n}\n"],"names":["getCollapsedMargins","highlightElemOriginalPosition","TARGET_LINE_HALF_HEIGHT","TEXT_BOX_HORIZONTAL_PADDING","DEBUG","animationTimer","setTargetLine","offsetWidth","offsetLeft","targetLineElem","targetBlockElem","lastTargetBlock","mouseY","anchorElem","event","debugHighlightRef","isFoundNodeEmptyParagraph","height","targetBlockElemHeight","top","targetBlockElemTop","getBoundingClientRect","anchorTop","width","anchorWidth","marginBottom","marginTop","lineTop","isBelow","window","scrollY","willStayInSamePosition","elem","nextElementSibling","previousElementSibling","lastBoundingBoxPosition","boundingBox","y","currentBoundingBoxPosition","targetElemTranslate2","left","style","opacity","buffer","transform"],"mappings":"AAAA,SAASA,mBAAmB,QAAQ,kCAAiC;AAErE,SAASC,6BAA6B,QAAQ,qCAAoC;AAClF,MAAMC,0BAA0B;AAChC,MAAMC,8BAA8B,CAAC;AACrC,MAAMC,QAAQ;AAEd,IAAIC,iBAAiB;AAErB,OAAO,SAASC,cACdC,WAAmB,EACnBC,UAAkB,EAClBC,cAA2B,EAC3BC,eAA4B,EAC5BC,eAIC,EACDC,MAAc,EACdC,UAAuB,EACvBC,KA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iB;QAC7C,IAAIkB,SAAS;YACXjB,gBAAgBqB,IAAI,CAACS,KAAK,CAACf,SAAS,GAAG;QACzC,OAAO;YACLf,gBAAgBqB,IAAI,CAACS,KAAK,CAAChB,YAAY,GAAG;QAC5C;IACF,OAAO;QACLd,gBAAgBqB,IAAI,CAACS,KAAK,CAAChB,YAAY,GAAG;QAC1Cd,gBAAgBqB,IAAI,CAACS,KAAK,CAACf,SAAS,GAAG;IACzC;IACArB,iBAAiB;IACjB,OAAO;QACLuB;QACAG;IACF;AACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../src/lexical/plugins/handles/utils/calculateDistanceFromScrollerElem.ts"],"sourcesContent":["/**\n * Calculate distance between scrollerElem and target if target is not in scrollerElem\n */\nexport const calculateDistanceFromScrollerElem = (\n scrollerElem: HTMLElement | null,\n pageX: number,\n pageY: number,\n target: HTMLElement,\n horizontalBuffer: number = 50,\n verticalBuffer: number = 25,\n): number => {\n let distanceFromScrollerElem = 0\n if (scrollerElem && !scrollerElem.contains(target)) {\n const { bottom, left, right, top } = scrollerElem.getBoundingClientRect()\n\n const adjustedTop = top + window.scrollY\n const adjustedBottom = bottom + window.scrollY\n\n if (\n pageY < adjustedTop - verticalBuffer ||\n pageY > adjustedBottom + verticalBuffer ||\n pageX < left - horizontalBuffer ||\n pageX > right + horizontalBuffer\n ) {\n return -1\n }\n\n // This is used to allow the _draggableBlockElem to be found when the mouse is in the\n // buffer zone around the scrollerElem.\n if (pageX < left || pageX > right) {\n distanceFromScrollerElem = pageX < left ? pageX - left : pageX - right\n }\n }\n return distanceFromScrollerElem\n}\n"],"names":["calculateDistanceFromScrollerElem","scrollerElem","pageX","pageY","target","horizontalBuffer","verticalBuffer","distanceFromScrollerElem","contains","bottom","left","right","top","getBoundingClientRect","adjustedTop","window","scrollY","adjustedBottom"],"
|
|
1
|
+
{"version":3,"sources":["../../../../../src/lexical/plugins/handles/utils/calculateDistanceFromScrollerElem.ts"],"sourcesContent":["/**\n * Calculate distance between scrollerElem and target if target is not in scrollerElem\n */\nexport const calculateDistanceFromScrollerElem = (\n scrollerElem: HTMLElement | null,\n pageX: number,\n pageY: number,\n target: HTMLElement,\n horizontalBuffer: number = 50,\n verticalBuffer: number = 25,\n): number => {\n let distanceFromScrollerElem = 0\n if (scrollerElem && !scrollerElem.contains(target)) {\n const { bottom, left, right, top } = scrollerElem.getBoundingClientRect()\n\n const adjustedTop = top + window.scrollY\n const adjustedBottom = bottom + window.scrollY\n\n if (\n pageY < adjustedTop - verticalBuffer ||\n pageY > adjustedBottom + verticalBuffer ||\n pageX < left - horizontalBuffer ||\n pageX > right + horizontalBuffer\n ) {\n return -1\n }\n\n // This is used to allow the _draggableBlockElem to be found when the mouse is in the\n // buffer zone around the scrollerElem.\n if (pageX < left || pageX > right) {\n distanceFromScrollerElem = pageX < left ? pageX - left : pageX - right\n }\n }\n return distanceFromScrollerElem\n}\n"],"names":["calculateDistanceFromScrollerElem","scrollerElem","pageX","pageY","target","horizontalBuffer","verticalBuffer","distanceFromScrollerElem","contains","bottom","left","right","top","getBoundingClientRect","adjustedTop","window","scrollY","adjustedBottom"],"mappings":"AAAA;;CAEC,GACD,OAAO,MAAMA,oCAAoC,CAC/CC,cACAC,OACAC,OACAC,QACAC,mBAA2B,EAAE,EAC7BC,iBAAyB,EAAE;IAE3B,IAAIC,2BAA2B;IAC/B,IAAIN,gBAAgB,CAACA,aAAaO,QAAQ,CAACJ,SAAS;QAClD,MAAM,EAAEK,MAAM,EAAEC,IAAI,EAAEC,KAAK,EAAEC,GAAG,EAAE,GAAGX,aAAaY,qBAAqB;QAEvE,MAAMC,cAAcF,MAAMG,OAAOC,OAAO;QACxC,MAAMC,iBAAiBR,SAASM,OAAOC,OAAO;QAE9C,IACEb,QAAQW,cAAcR,kBACtBH,QAAQc,iBAAiBX,kBACzBJ,QAAQQ,OAAOL,oBACfH,QAAQS,QAAQN,kBAChB;YACA,OAAO,CAAC;QACV;QAEA,qFAAqF;QACrF,uCAAuC;QACvC,IAAIH,QAAQQ,QAAQR,QAAQS,OAAO;YACjCJ,2BAA2BL,QAAQQ,OAAOR,QAAQQ,OAAOR,QAAQS;QACnE;IACF;IACA,OAAOJ;AACT,EAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../src/lexical/plugins/handles/utils/doesLineHeightAffectElement.ts"],"sourcesContent":["const replacedElements = [\n 'IMG',\n 'INPUT',\n 'TEXTAREA',\n 'SELECT',\n 'BUTTON',\n 'VIDEO',\n 'OBJECT',\n 'EMBED',\n 'IFRAME',\n 'HR',\n]\n\n/**\n * From ChatGPT, only that verified it works for HR elements.\n *\n * HTML Elements can have CSS lineHeight applied to them, but it doesn't always affect the visual layout.\n * This function checks if the line-height property has an effect on the element's layout.\n * @param htmlElem\n */\nexport function doesLineHeightAffectElement(htmlElem: HTMLElement) {\n if (!htmlElem) return false\n\n // Check for replaced elements, elements that typically don't support line-height adjustments,\n // and elements without visible content\n\n if (\n replacedElements.includes(htmlElem.tagName) ||\n htmlElem.offsetHeight === 0 ||\n htmlElem.offsetWidth === 0\n ) {\n return false\n }\n\n // Check for specific CSS properties that negate line-height's visual effects\n const style = window.getComputedStyle(htmlElem)\n if (\n style.display === 'table-cell' ||\n style.position === 'absolute' ||\n style.visibility === 'hidden' ||\n style.opacity === '0'\n ) {\n return false\n }\n\n // This is a basic check, and there can be more complex scenarios where line-height doesn't have an effect.\n return true\n}\n"],"names":["replacedElements","doesLineHeightAffectElement","htmlElem","includes","tagName","offsetHeight","offsetWidth","style","window","getComputedStyle","display","position","visibility","opacity"],"
|
|
1
|
+
{"version":3,"sources":["../../../../../src/lexical/plugins/handles/utils/doesLineHeightAffectElement.ts"],"sourcesContent":["const replacedElements = [\n 'IMG',\n 'INPUT',\n 'TEXTAREA',\n 'SELECT',\n 'BUTTON',\n 'VIDEO',\n 'OBJECT',\n 'EMBED',\n 'IFRAME',\n 'HR',\n]\n\n/**\n * From ChatGPT, only that verified it works for HR elements.\n *\n * HTML Elements can have CSS lineHeight applied to them, but it doesn't always affect the visual layout.\n * This function checks if the line-height property has an effect on the element's layout.\n * @param htmlElem\n */\nexport function doesLineHeightAffectElement(htmlElem: HTMLElement) {\n if (!htmlElem) return false\n\n // Check for replaced elements, elements that typically don't support line-height adjustments,\n // and elements without visible content\n\n if (\n replacedElements.includes(htmlElem.tagName) ||\n htmlElem.offsetHeight === 0 ||\n htmlElem.offsetWidth === 0\n ) {\n return false\n }\n\n // Check for specific CSS properties that negate line-height's visual effects\n const style = window.getComputedStyle(htmlElem)\n if (\n style.display === 'table-cell' ||\n style.position === 'absolute' ||\n style.visibility === 'hidden' ||\n style.opacity === '0'\n ) {\n return false\n }\n\n // This is a basic check, and there can be more complex scenarios where line-height doesn't have an effect.\n return true\n}\n"],"names":["replacedElements","doesLineHeightAffectElement","htmlElem","includes","tagName","offsetHeight","offsetWidth","style","window","getComputedStyle","display","position","visibility","opacity"],"mappings":"AAAA,MAAMA,mBAAmB;IACvB;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;CACD;AAED;;;;;;CAMC,GACD,OAAO,SAASC,4BAA4BC,QAAqB;IAC/D,IAAI,CAACA,UAAU,OAAO;IAEtB,8FAA8F;IAC9F,uCAAuC;IAEvC,IACEF,iBAAiBG,QAAQ,CAACD,SAASE,OAAO,KAC1CF,SAASG,YAAY,KAAK,KAC1BH,SAASI,WAAW,KAAK,GACzB;QACA,OAAO;IACT;IAEA,6EAA6E;IAC7E,MAAMC,QAAQC,OAAOC,gBAAgB,CAACP;IACtC,IACEK,MAAMG,OAAO,KAAK,gBAClBH,MAAMI,QAAQ,KAAK,cACnBJ,MAAMK,UAAU,KAAK,YACrBL,MAAMM,OAAO,KAAK,KAClB;QACA,OAAO;IACT;IAEA,2GAA2G;IAC3G,OAAO;AACT"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../src/lexical/plugins/handles/utils/getCollapsedMargins.ts"],"sourcesContent":["export function getCollapsedMargins(elem: HTMLElement): {\n marginBottom: number\n marginTop: number\n} {\n const getMargin = (element: Element | null, margin: 'marginBottom' | 'marginTop'): number =>\n element ? parseFloat(window.getComputedStyle(element)[margin]) : 0\n\n const { marginBottom, marginTop } = window.getComputedStyle(elem)\n const prevElemSiblingMarginBottom = getMargin(elem.previousElementSibling, 'marginBottom')\n const nextElemSiblingMarginTop = getMargin(elem.nextElementSibling, 'marginTop')\n const collapsedTopMargin = Math.max(parseFloat(marginTop), prevElemSiblingMarginBottom)\n const collapsedBottomMargin = Math.max(parseFloat(marginBottom), nextElemSiblingMarginTop)\n\n return { marginBottom: collapsedBottomMargin, marginTop: collapsedTopMargin }\n}\n"],"names":["getCollapsedMargins","elem","getMargin","element","margin","parseFloat","window","getComputedStyle","marginBottom","marginTop","prevElemSiblingMarginBottom","previousElementSibling","nextElemSiblingMarginTop","nextElementSibling","collapsedTopMargin","Math","max","collapsedBottomMargin"],"
|
|
1
|
+
{"version":3,"sources":["../../../../../src/lexical/plugins/handles/utils/getCollapsedMargins.ts"],"sourcesContent":["export function getCollapsedMargins(elem: HTMLElement): {\n marginBottom: number\n marginTop: number\n} {\n const getMargin = (element: Element | null, margin: 'marginBottom' | 'marginTop'): number =>\n element ? parseFloat(window.getComputedStyle(element)[margin]) : 0\n\n const { marginBottom, marginTop } = window.getComputedStyle(elem)\n const prevElemSiblingMarginBottom = getMargin(elem.previousElementSibling, 'marginBottom')\n const nextElemSiblingMarginTop = getMargin(elem.nextElementSibling, 'marginTop')\n const collapsedTopMargin = Math.max(parseFloat(marginTop), prevElemSiblingMarginBottom)\n const collapsedBottomMargin = Math.max(parseFloat(marginBottom), nextElemSiblingMarginTop)\n\n return { marginBottom: collapsedBottomMargin, marginTop: collapsedTopMargin }\n}\n"],"names":["getCollapsedMargins","elem","getMargin","element","margin","parseFloat","window","getComputedStyle","marginBottom","marginTop","prevElemSiblingMarginBottom","previousElementSibling","nextElemSiblingMarginTop","nextElementSibling","collapsedTopMargin","Math","max","collapsedBottomMargin"],"mappings":"AAAA,OAAO,SAASA,oBAAoBC,IAAiB;IAInD,MAAMC,YAAY,CAACC,SAAyBC,SAC1CD,UAAUE,WAAWC,OAAOC,gBAAgB,CAACJ,QAAQ,CAACC,OAAO,IAAI;IAEnE,MAAM,EAAEI,YAAY,EAAEC,SAAS,EAAE,GAAGH,OAAOC,gBAAgB,CAACN;IAC5D,MAAMS,8BAA8BR,UAAUD,KAAKU,sBAAsB,EAAE;IAC3E,MAAMC,2BAA2BV,UAAUD,KAAKY,kBAAkB,EAAE;IACpE,MAAMC,qBAAqBC,KAAKC,GAAG,CAACX,WAAWI,YAAYC;IAC3D,MAAMO,wBAAwBF,KAAKC,GAAG,CAACX,WAAWG,eAAeI;IAEjE,OAAO;QAAEJ,cAAcS;QAAuBR,WAAWK;IAAmB;AAC9E"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../src/lexical/plugins/handles/utils/getNodeCloseToPoint.ts"],"sourcesContent":["import type { LexicalEditor, LexicalNode } from 'lexical'\n\nimport { $getNodeByKey } from 'lexical'\n\nimport { Point } from '../../../utils/point.js'\nimport { Rect } from '../../../utils/rect.js'\nimport { getBoundingClientRectWithoutTransform } from '../DraggableBlockPlugin/getBoundingRectWithoutTransform.js'\nimport { getCollapsedMargins } from '../utils/getCollapsedMargins.js'\nimport { getTopLevelNodeKeys } from '../utils/getTopLevelNodeKeys.js'\n\n// Directions\nconst Downward = 1\nconst Upward = -1\nconst Indeterminate = 0\n\ntype Props = {\n anchorElem: HTMLElement\n cache_threshold?: number\n editor: LexicalEditor\n /** fuzzy makes the search not exact. If no exact match found, find the closes node instead of returning null */\n fuzzy?: boolean\n horizontalOffset?: number\n point: Point\n /**\n * By default, empty paragraphs are not returned. Set this to true to return empty paragraphs. @default false\n */\n returnEmptyParagraphs?: boolean\n /**\n * The index to start searching from. It can be a considerable performance optimization to start searching from the index of the\n * previously found node, as the node is likely to be close to the next node.\n */\n startIndex?: number\n useEdgeAsDefault?: boolean\n verbose?: boolean\n}\n\ntype Output = {\n blockElem: HTMLElement | null\n blockNode: LexicalNode | null\n foundAtIndex: number\n isFoundNodeEmptyParagraph: boolean\n}\n\nconst cache = {\n props: null as Props | null,\n result: null as Output | null,\n}\n\nfunction isPointClose(previous: Point, current: Point, threshold: number = 20): boolean {\n const dx = previous.x - current.x\n const dy = previous.y - current.y\n return dx * dx + dy * dy <= threshold * threshold\n}\n\nexport function getNodeCloseToPoint(props: Props): Output {\n const {\n anchorElem,\n cache_threshold = 20,\n editor,\n fuzzy = false,\n horizontalOffset = 0,\n point: { x, y },\n startIndex = 0,\n useEdgeAsDefault = false,\n verbose = false,\n } = props\n\n // Use cache\n if (\n cache_threshold > 0 &&\n cache.props &&\n cache.result &&\n cache.props.fuzzy === props.fuzzy &&\n cache.props.horizontalOffset === props.horizontalOffset &&\n cache.props.useEdgeAsDefault === props.useEdgeAsDefault &&\n isPointClose(cache.props.point, props.point, cache_threshold)\n ) {\n return cache.result\n }\n\n const anchorElementRect = anchorElem.getBoundingClientRect()\n const topLevelNodeKeys = getTopLevelNodeKeys(editor)\n\n const closestBlockElem: {\n blockElem: HTMLElement | null\n blockNode: LexicalNode | null\n distance: number\n foundAtIndex: number\n isFoundNodeEmptyParagraph: boolean\n } = {\n blockElem: null,\n blockNode: null,\n distance: Infinity,\n foundAtIndex: -1,\n isFoundNodeEmptyParagraph: false,\n }\n\n // Return null if matching block element is the first or last node\n editor.getEditorState().read(() => {\n if (useEdgeAsDefault) {\n const [firstNode, lastNode] = [\n editor.getElementByKey(topLevelNodeKeys[0]),\n editor.getElementByKey(topLevelNodeKeys[topLevelNodeKeys.length - 1]),\n ]\n\n const [firstNodeRect, lastNodeRect] = [\n getBoundingClientRectWithoutTransform(firstNode),\n getBoundingClientRectWithoutTransform(lastNode),\n ]\n\n if (firstNodeRect && lastNodeRect) {\n if (y < firstNodeRect.top) {\n closestBlockElem.blockElem = firstNode\n closestBlockElem.distance = firstNodeRect.top - y\n closestBlockElem.blockNode = $getNodeByKey(topLevelNodeKeys[0])\n closestBlockElem.foundAtIndex = 0\n } else if (y > lastNodeRect.bottom) {\n closestBlockElem.distance = y - lastNodeRect.bottom\n closestBlockElem.blockNode = $getNodeByKey(topLevelNodeKeys[topLevelNodeKeys.length - 1])\n closestBlockElem.blockElem = lastNode\n closestBlockElem.foundAtIndex = topLevelNodeKeys.length - 1\n }\n\n if (closestBlockElem?.blockElem) {\n return {\n blockElem: null,\n isFoundNodeEmptyParagraph: false,\n } as Output\n }\n }\n }\n\n // Find matching block element\n let index = startIndex\n let direction = Indeterminate\n\n while (index >= 0 && index < topLevelNodeKeys.length) {\n const key = topLevelNodeKeys[index]\n const elem = editor.getElementByKey(key)\n if (elem === null) {\n break\n }\n const point = new Point(x + horizontalOffset, y)\n //const domRect = Rect.fromDOM(elem)\n // Do not consider transform of blocks when calculating distance\n const domRect = Rect.fromDOMRect(getBoundingClientRectWithoutTransform(elem))\n\n const { marginBottom, marginTop } = getCollapsedMargins(elem)\n\n const rect = domRect.generateNewRect({\n bottom: domRect.bottom + marginBottom,\n left: anchorElementRect.left,\n right: anchorElementRect.right,\n top: domRect.top - marginTop,\n })\n\n const { distance, isOnBottomSide, isOnTopSide } = rect.distanceFromPoint(point)\n\n if (distance === 0) {\n closestBlockElem.blockElem = elem\n closestBlockElem.blockNode = $getNodeByKey(key)\n closestBlockElem.foundAtIndex = index\n closestBlockElem.distance = distance\n\n // Check if blockNode is an empty text node\n if (\n closestBlockElem.blockNode &&\n closestBlockElem.blockNode.getType() === 'paragraph' &&\n closestBlockElem.blockNode.getTextContent() === ''\n ) {\n if (!fuzzy && !props.returnEmptyParagraphs) {\n closestBlockElem.blockElem = null\n closestBlockElem.blockNode = null\n }\n\n closestBlockElem.isFoundNodeEmptyParagraph = true\n }\n break\n } else if (fuzzy) {\n if (distance < closestBlockElem.distance) {\n closestBlockElem.blockElem = elem\n closestBlockElem.blockNode = $getNodeByKey(key)\n closestBlockElem.distance = distance\n closestBlockElem.foundAtIndex = index\n }\n }\n\n if (direction === Indeterminate) {\n if (isOnTopSide) {\n direction = Upward\n } else if (isOnBottomSide) {\n direction = Downward\n } else {\n // stop search block element\n direction = Infinity\n }\n }\n\n index += direction\n }\n })\n\n // Store in cache before returning\n cache.props = props\n cache.result = {\n blockElem: closestBlockElem.blockElem,\n blockNode: closestBlockElem.blockNode,\n foundAtIndex: closestBlockElem.foundAtIndex,\n isFoundNodeEmptyParagraph: closestBlockElem.isFoundNodeEmptyParagraph,\n }\n\n return {\n blockElem: closestBlockElem.blockElem,\n blockNode: closestBlockElem.blockNode,\n foundAtIndex: closestBlockElem.foundAtIndex,\n isFoundNodeEmptyParagraph: closestBlockElem.isFoundNodeEmptyParagraph,\n }\n}\n"],"names":["$getNodeByKey","Point","Rect","getBoundingClientRectWithoutTransform","getCollapsedMargins","getTopLevelNodeKeys","Downward","Upward","Indeterminate","cache","props","result","isPointClose","previous","current","threshold","dx","x","dy","y","getNodeCloseToPoint","anchorElem","cache_threshold","editor","fuzzy","horizontalOffset","point","startIndex","useEdgeAsDefault","verbose","anchorElementRect","getBoundingClientRect","topLevelNodeKeys","closestBlockElem","blockElem","blockNode","distance","Infinity","foundAtIndex","isFoundNodeEmptyParagraph","getEditorState","read","firstNode","lastNode","getElementByKey","length","firstNodeRect","lastNodeRect","top","bottom","index","direction","key","elem","domRect","fromDOMRect","marginBottom","marginTop","rect","generateNewRect","left","right","isOnBottomSide","isOnTopSide","distanceFromPoint","getType","getTextContent","returnEmptyParagraphs"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAEA,SAASA,aAAa,QAAQ,UAAS;AAEvC,SAASC,KAAK,QAAQ,0BAAyB;AAC/C,SAASC,IAAI,QAAQ,yBAAwB;A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BACfZ,YAAY5C;gBACd,OAAO,IAAIuD,gBAAgB;oBACzBX,YAAY7C;gBACd,OAAO;oBACL,4BAA4B;oBAC5B6C,YAAYd;gBACd;YACF;YAEAa,SAASC;QACX;IACF;IAEA,kCAAkC;IAClC1C,MAAMC,KAAK,GAAGA;IACdD,MAAME,MAAM,GAAG;QACbuB,WAAWD,iBAAiBC,SAAS;QACrCC,WAAWF,iBAAiBE,SAAS;QACrCG,cAAcL,iBAAiBK,YAAY;QAC3CC,2BAA2BN,iBAAiBM,yBAAyB;IACvE;IAEA,OAAO;QACLL,WAAWD,iBAAiBC,SAAS;QACrCC,WAAWF,iBAAiBE,SAAS;QACrCG,cAAcL,iBAAiBK,YAAY;QAC3CC,2BAA2BN,iBAAiBM,yBAAyB;IACvE;AACF"}
|
|
1
|
+
{"version":3,"sources":["../../../../../src/lexical/plugins/handles/utils/getNodeCloseToPoint.ts"],"sourcesContent":["import type { LexicalEditor, LexicalNode } from 'lexical'\n\nimport { $getNodeByKey } from 'lexical'\n\nimport { Point } from '../../../utils/point.js'\nimport { Rect } from '../../../utils/rect.js'\nimport { getBoundingClientRectWithoutTransform } from '../DraggableBlockPlugin/getBoundingRectWithoutTransform.js'\nimport { getCollapsedMargins } from '../utils/getCollapsedMargins.js'\nimport { getTopLevelNodeKeys } from '../utils/getTopLevelNodeKeys.js'\n\n// Directions\nconst Downward = 1\nconst Upward = -1\nconst Indeterminate = 0\n\ntype Props = {\n anchorElem: HTMLElement\n cache_threshold?: number\n editor: LexicalEditor\n /** fuzzy makes the search not exact. If no exact match found, find the closes node instead of returning null */\n fuzzy?: boolean\n horizontalOffset?: number\n point: Point\n /**\n * By default, empty paragraphs are not returned. Set this to true to return empty paragraphs. @default false\n */\n returnEmptyParagraphs?: boolean\n /**\n * The index to start searching from. It can be a considerable performance optimization to start searching from the index of the\n * previously found node, as the node is likely to be close to the next node.\n */\n startIndex?: number\n useEdgeAsDefault?: boolean\n verbose?: boolean\n}\n\ntype Output = {\n blockElem: HTMLElement | null\n blockNode: LexicalNode | null\n foundAtIndex: number\n isFoundNodeEmptyParagraph: boolean\n}\n\nconst cache = {\n props: null as Props | null,\n result: null as Output | null,\n}\n\nfunction isPointClose(previous: Point, current: Point, threshold: number = 20): boolean {\n const dx = previous.x - current.x\n const dy = previous.y - current.y\n return dx * dx + dy * dy <= threshold * threshold\n}\n\nexport function getNodeCloseToPoint(props: Props): Output {\n const {\n anchorElem,\n cache_threshold = 20,\n editor,\n fuzzy = false,\n horizontalOffset = 0,\n point: { x, y },\n startIndex = 0,\n useEdgeAsDefault = false,\n verbose = false,\n } = props\n\n // Use cache\n if (\n cache_threshold > 0 &&\n cache.props &&\n cache.result &&\n cache.props.fuzzy === props.fuzzy &&\n cache.props.horizontalOffset === props.horizontalOffset &&\n cache.props.useEdgeAsDefault === props.useEdgeAsDefault &&\n isPointClose(cache.props.point, props.point, cache_threshold)\n ) {\n return cache.result\n }\n\n const anchorElementRect = anchorElem.getBoundingClientRect()\n const topLevelNodeKeys = getTopLevelNodeKeys(editor)\n\n const closestBlockElem: {\n blockElem: HTMLElement | null\n blockNode: LexicalNode | null\n distance: number\n foundAtIndex: number\n isFoundNodeEmptyParagraph: boolean\n } = {\n blockElem: null,\n blockNode: null,\n distance: Infinity,\n foundAtIndex: -1,\n isFoundNodeEmptyParagraph: false,\n }\n\n // Return null if matching block element is the first or last node\n editor.getEditorState().read(() => {\n if (useEdgeAsDefault) {\n const [firstNode, lastNode] = [\n editor.getElementByKey(topLevelNodeKeys[0]),\n editor.getElementByKey(topLevelNodeKeys[topLevelNodeKeys.length - 1]),\n ]\n\n const [firstNodeRect, lastNodeRect] = [\n getBoundingClientRectWithoutTransform(firstNode),\n getBoundingClientRectWithoutTransform(lastNode),\n ]\n\n if (firstNodeRect && lastNodeRect) {\n if (y < firstNodeRect.top) {\n closestBlockElem.blockElem = firstNode\n closestBlockElem.distance = firstNodeRect.top - y\n closestBlockElem.blockNode = $getNodeByKey(topLevelNodeKeys[0])\n closestBlockElem.foundAtIndex = 0\n } else if (y > lastNodeRect.bottom) {\n closestBlockElem.distance = y - lastNodeRect.bottom\n closestBlockElem.blockNode = $getNodeByKey(topLevelNodeKeys[topLevelNodeKeys.length - 1])\n closestBlockElem.blockElem = lastNode\n closestBlockElem.foundAtIndex = topLevelNodeKeys.length - 1\n }\n\n if (closestBlockElem?.blockElem) {\n return {\n blockElem: null,\n isFoundNodeEmptyParagraph: false,\n } as Output\n }\n }\n }\n\n // Find matching block element\n let index = startIndex\n let direction = Indeterminate\n\n while (index >= 0 && index < topLevelNodeKeys.length) {\n const key = topLevelNodeKeys[index]\n const elem = editor.getElementByKey(key)\n if (elem === null) {\n break\n }\n const point = new Point(x + horizontalOffset, y)\n //const domRect = Rect.fromDOM(elem)\n // Do not consider transform of blocks when calculating distance\n const domRect = Rect.fromDOMRect(getBoundingClientRectWithoutTransform(elem))\n\n const { marginBottom, marginTop } = getCollapsedMargins(elem)\n\n const rect = domRect.generateNewRect({\n bottom: domRect.bottom + marginBottom,\n left: anchorElementRect.left,\n right: anchorElementRect.right,\n top: domRect.top - marginTop,\n })\n\n const { distance, isOnBottomSide, isOnTopSide } = rect.distanceFromPoint(point)\n\n if (distance === 0) {\n closestBlockElem.blockElem = elem\n closestBlockElem.blockNode = $getNodeByKey(key)\n closestBlockElem.foundAtIndex = index\n closestBlockElem.distance = distance\n\n // Check if blockNode is an empty text node\n if (\n closestBlockElem.blockNode &&\n closestBlockElem.blockNode.getType() === 'paragraph' &&\n closestBlockElem.blockNode.getTextContent() === ''\n ) {\n if (!fuzzy && !props.returnEmptyParagraphs) {\n closestBlockElem.blockElem = null\n closestBlockElem.blockNode = null\n }\n\n closestBlockElem.isFoundNodeEmptyParagraph = true\n }\n break\n } else if (fuzzy) {\n if (distance < closestBlockElem.distance) {\n closestBlockElem.blockElem = elem\n closestBlockElem.blockNode = $getNodeByKey(key)\n closestBlockElem.distance = distance\n closestBlockElem.foundAtIndex = index\n }\n }\n\n if (direction === Indeterminate) {\n if (isOnTopSide) {\n direction = Upward\n } else if (isOnBottomSide) {\n direction = Downward\n } else {\n // stop search block element\n direction = Infinity\n }\n }\n\n index += direction\n }\n })\n\n // Store in cache before returning\n cache.props = props\n cache.result = {\n blockElem: closestBlockElem.blockElem,\n blockNode: closestBlockElem.blockNode,\n foundAtIndex: closestBlockElem.foundAtIndex,\n isFoundNodeEmptyParagraph: closestBlockElem.isFoundNodeEmptyParagraph,\n }\n\n return {\n blockElem: closestBlockElem.blockElem,\n blockNode: closestBlockElem.blockNode,\n foundAtIndex: closestBlockElem.foundAtIndex,\n isFoundNodeEmptyParagraph: closestBlockElem.isFoundNodeEmptyParagraph,\n }\n}\n"],"names":["$getNodeByKey","Point","Rect","getBoundingClientRectWithoutTransform","getCollapsedMargins","getTopLevelNodeKeys","Downward","Upward","Indeterminate","cache","props","result","isPointClose","previous","current","threshold","dx","x","dy","y","getNodeCloseToPoint","anchorElem","cache_threshold","editor","fuzzy","horizontalOffset","point","startIndex","useEdgeAsDefault","verbose","anchorElementRect","getBoundingClientRect","topLevelNodeKeys","closestBlockElem","blockElem","blockNode","distance","Infinity","foundAtIndex","isFoundNodeEmptyParagraph","getEditorState","read","firstNode","lastNode","getElementByKey","length","firstNodeRect","lastNodeRect","top","bottom","index","direction","key","elem","domRect","fromDOMRect","marginBottom","marginTop","rect","generateNewRect","left","right","isOnBottomSide","isOnTopSide","distanceFromPoint","getType","getTextContent","returnEmptyParagraphs"],"mappings":"AAEA,SAASA,aAAa,QAAQ,UAAS;AAEvC,SAASC,KAAK,QAAQ,0BAAyB;AAC/C,SAASC,IAAI,QAAQ,yBAAwB;AAC7C,SAASC,qCAAqC,QAAQ,6DAA4D;AAClH,SAASC,mBAAmB,QAAQ,kCAAiC;AACrE,SAASC,mBAAmB,QAAQ,kCAAiC;AAErE,aAAa;AACb,MAAMC,WAAW;AACjB,MAAMC,SAAS,CAAC;AAChB,MAAMC,gBAAgB;AA8BtB,MAAMC,QAAQ;IACZC,OAAO;IACPC,QAAQ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SAAS;QACrCC,WAAWF,iBAAiBE,SAAS;QACrCG,cAAcL,iBAAiBK,YAAY;QAC3CC,2BAA2BN,iBAAiBM,yBAAyB;IACvE;IAEA,OAAO;QACLL,WAAWD,iBAAiBC,SAAS;QACrCC,WAAWF,iBAAiBE,SAAS;QACrCG,cAAcL,iBAAiBK,YAAY;QAC3CC,2BAA2BN,iBAAiBM,yBAAyB;IACvE;AACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../src/lexical/plugins/handles/utils/getTopLevelNodeKeys.ts"],"sourcesContent":["import type { LexicalEditor } from 'lexical'\n\nimport { $getRoot } from 'lexical'\n\nexport function getTopLevelNodeKeys(editor: LexicalEditor): string[] {\n return editor.getEditorState().read(() => $getRoot().getChildrenKeys())\n}\n"],"names":["$getRoot","getTopLevelNodeKeys","editor","getEditorState","read","getChildrenKeys"],"
|
|
1
|
+
{"version":3,"sources":["../../../../../src/lexical/plugins/handles/utils/getTopLevelNodeKeys.ts"],"sourcesContent":["import type { LexicalEditor } from 'lexical'\n\nimport { $getRoot } from 'lexical'\n\nexport function getTopLevelNodeKeys(editor: LexicalEditor): string[] {\n return editor.getEditorState().read(() => $getRoot().getChildrenKeys())\n}\n"],"names":["$getRoot","getTopLevelNodeKeys","editor","getEditorState","read","getChildrenKeys"],"mappings":"AAEA,SAASA,QAAQ,QAAQ,UAAS;AAElC,OAAO,SAASC,oBAAoBC,MAAqB;IACvD,OAAOA,OAAOC,cAAc,GAAGC,IAAI,CAAC,IAAMJ,WAAWK,eAAe;AACtE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../src/lexical/plugins/handles/utils/isOnHandleElement.ts"],"sourcesContent":["export function isOnHandleElement(element: HTMLElement, handleElementClassName: string): boolean {\n return !!element.closest(`.${handleElementClassName}`)\n}\n"],"names":["isOnHandleElement","element","handleElementClassName","closest"],"
|
|
1
|
+
{"version":3,"sources":["../../../../../src/lexical/plugins/handles/utils/isOnHandleElement.ts"],"sourcesContent":["export function isOnHandleElement(element: HTMLElement, handleElementClassName: string): boolean {\n return !!element.closest(`.${handleElementClassName}`)\n}\n"],"names":["isOnHandleElement","element","handleElementClassName","closest"],"mappings":"AAAA,OAAO,SAASA,kBAAkBC,OAAoB,EAAEC,sBAA8B;IACpF,OAAO,CAAC,CAACD,QAAQE,OAAO,CAAC,CAAC,CAAC,EAAED,uBAAuB,CAAC;AACvD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../src/lexical/plugins/handles/utils/setHandlePosition.ts"],"sourcesContent":["import { doesLineHeightAffectElement } from './doesLineHeightAffectElement.js'\n\nexport function setHandlePosition(\n targetElem: HTMLElement | null,\n handleElem: HTMLElement,\n anchorElem: HTMLElement,\n leftOffset: number = 0, // SPACE\n) {\n if (!targetElem) {\n handleElem.style.opacity = '0'\n handleElem.style.transform = 'translate(-10000px, -10000px)'\n return\n }\n\n const targetRect = targetElem.getBoundingClientRect()\n const targetStyle = window.getComputedStyle(targetElem)\n const floatingElemRect = handleElem.getBoundingClientRect()\n const anchorElementRect = anchorElem.getBoundingClientRect()\n\n let top: number\n\n const shouldDisplayHandleInCenter = targetRect.height < 60\n\n if (!shouldDisplayHandleInCenter) {\n // No need to let line height affect the re-positioning of the floating element if line height has no\n // visual effect on the element. Otherwise, the floating element will be positioned incorrectly.\n const actualLineHeight = doesLineHeightAffectElement(targetElem)\n ? parseInt(targetStyle.lineHeight, 10)\n : 0\n\n top =\n targetRect.top + (actualLineHeight - floatingElemRect.height) / 2 - anchorElementRect.top - 1 // 1px inaccuracy\n } else {\n top =\n targetRect.top -\n floatingElemRect.height / 2 -\n anchorElementRect.top +\n targetRect.height / 2 -\n 1 // 1px inaccuracy\n }\n\n const left = leftOffset\n\n handleElem.style.opacity = '1'\n handleElem.style.transform = `translate(${left}px, ${top}px)`\n}\n"],"names":["doesLineHeightAffectElement","setHandlePosition","targetElem","handleElem","anchorElem","leftOffset","style","opacity","transform","targetRect","getBoundingClientRect","targetStyle","window","getComputedStyle","floatingElemRect","anchorElementRect","top","shouldDisplayHandleInCenter","height","actualLineHeight","parseInt","lineHeight","left"],"
|
|
1
|
+
{"version":3,"sources":["../../../../../src/lexical/plugins/handles/utils/setHandlePosition.ts"],"sourcesContent":["import { doesLineHeightAffectElement } from './doesLineHeightAffectElement.js'\n\nexport function setHandlePosition(\n targetElem: HTMLElement | null,\n handleElem: HTMLElement,\n anchorElem: HTMLElement,\n leftOffset: number = 0, // SPACE\n) {\n if (!targetElem) {\n handleElem.style.opacity = '0'\n handleElem.style.transform = 'translate(-10000px, -10000px)'\n return\n }\n\n const targetRect = targetElem.getBoundingClientRect()\n const targetStyle = window.getComputedStyle(targetElem)\n const floatingElemRect = handleElem.getBoundingClientRect()\n const anchorElementRect = anchorElem.getBoundingClientRect()\n\n let top: number\n\n const shouldDisplayHandleInCenter = targetRect.height < 60\n\n if (!shouldDisplayHandleInCenter) {\n // No need to let line height affect the re-positioning of the floating element if line height has no\n // visual effect on the element. Otherwise, the floating element will be positioned incorrectly.\n const actualLineHeight = doesLineHeightAffectElement(targetElem)\n ? parseInt(targetStyle.lineHeight, 10)\n : 0\n\n top =\n targetRect.top + (actualLineHeight - floatingElemRect.height) / 2 - anchorElementRect.top - 1 // 1px inaccuracy\n } else {\n top =\n targetRect.top -\n floatingElemRect.height / 2 -\n anchorElementRect.top +\n targetRect.height / 2 -\n 1 // 1px inaccuracy\n }\n\n const left = leftOffset\n\n handleElem.style.opacity = '1'\n handleElem.style.transform = `translate(${left}px, ${top}px)`\n}\n"],"names":["doesLineHeightAffectElement","setHandlePosition","targetElem","handleElem","anchorElem","leftOffset","style","opacity","transform","targetRect","getBoundingClientRect","targetStyle","window","getComputedStyle","floatingElemRect","anchorElementRect","top","shouldDisplayHandleInCenter","height","actualLineHeight","parseInt","lineHeight","left"],"mappings":"AAAA,SAASA,2BAA2B,QAAQ,mCAAkC;AAE9E,OAAO,SAASC,kBACdC,UAA8B,EAC9BC,UAAuB,EACvBC,UAAuB,EACvBC,aAAqB,CAAC;IAEtB,IAAI,CAACH,YAAY;QACfC,WAAWG,KAAK,CAACC,OAAO,GAAG;QAC3BJ,WAAWG,KAAK,CAACE,SAAS,GAAG;QAC7B;IACF;IAEA,MAAMC,aAAaP,WAAWQ,qBAAqB;IACnD,MAAMC,cAAcC,OAAOC,gBAAgB,CAACX;IAC5C,MAAMY,mBAAmBX,WAAWO,qBAAqB;IACzD,MAAMK,oBAAoBX,WAAWM,qBAAqB;IAE1D,IAAIM;IAEJ,MAAMC,8BAA8BR,WAAWS,MAAM,GAAG;IAExD,IAAI,CAACD,6BAA6B;QAChC,qGAAqG;QACrG,gGAAgG;QAChG,MAAME,mBAAmBnB,4BAA4BE,cACjDkB,SAAST,YAAYU,UAAU,EAAE,MACjC;QAEJL,MACEP,WAAWO,GAAG,GAAG,AAACG,CAAAA,mBAAmBL,iBAAiBI,MAAM,AAAD,IAAK,IAAIH,kBAAkBC,GAAG,GAAG,EAAE,iBAAiB;;IACnH,OAAO;QACLA,MACEP,WAAWO,GAAG,GACdF,iBAAiBI,MAAM,GAAG,IAC1BH,kBAAkBC,GAAG,GACrBP,WAAWS,MAAM,GAAG,IACpB,EAAE,iBAAiB;;IACvB;IAEA,MAAMI,OAAOjB;IAEbF,WAAWG,KAAK,CAACC,OAAO,GAAG;IAC3BJ,WAAWG,KAAK,CAACE,SAAS,GAAG,CAAC,UAAU,EAAEc,KAAK,IAAI,EAAEN,IAAI,GAAG,CAAC;AAC/D"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/lexical/theme/EditorTheme.tsx"],"sourcesContent":["import type { EditorThemeClasses } from 'lexical'\n\nimport './EditorTheme.scss'\n\nexport const LexicalEditorTheme: EditorThemeClasses = {\n block: 'LexicalEditorTheme__block',\n blockCursor: 'LexicalEditorTheme__blockCursor',\n characterLimit: 'LexicalEditorTheme__characterLimit',\n code: 'LexicalEditorTheme__code',\n codeHighlight: {\n atrule: 'LexicalEditorTheme__tokenAttr',\n attr: 'LexicalEditorTheme__tokenAttr',\n boolean: 'LexicalEditorTheme__tokenProperty',\n builtin: 'LexicalEditorTheme__tokenSelector',\n cdata: 'LexicalEditorTheme__tokenComment',\n char: 'LexicalEditorTheme__tokenSelector',\n class: 'LexicalEditorTheme__tokenFunction',\n 'class-name': 'LexicalEditorTheme__tokenFunction',\n comment: 'LexicalEditorTheme__tokenComment',\n constant: 'LexicalEditorTheme__tokenProperty',\n deleted: 'LexicalEditorTheme__tokenProperty',\n doctype: 'LexicalEditorTheme__tokenComment',\n entity: 'LexicalEditorTheme__tokenOperator',\n function: 'LexicalEditorTheme__tokenFunction',\n important: 'LexicalEditorTheme__tokenVariable',\n inserted: 'LexicalEditorTheme__tokenSelector',\n keyword: 'LexicalEditorTheme__tokenAttr',\n namespace: 'LexicalEditorTheme__tokenVariable',\n number: 'LexicalEditorTheme__tokenProperty',\n operator: 'LexicalEditorTheme__tokenOperator',\n prolog: 'LexicalEditorTheme__tokenComment',\n property: 'LexicalEditorTheme__tokenProperty',\n punctuation: 'LexicalEditorTheme__tokenPunctuation',\n regex: 'LexicalEditorTheme__tokenVariable',\n selector: 'LexicalEditorTheme__tokenSelector',\n string: 'LexicalEditorTheme__tokenSelector',\n symbol: 'LexicalEditorTheme__tokenProperty',\n tag: 'LexicalEditorTheme__tokenProperty',\n url: 'LexicalEditorTheme__tokenOperator',\n variable: 'LexicalEditorTheme__tokenVariable',\n },\n embedBlock: {\n base: 'LexicalEditorTheme__embedBlock',\n focus: 'LexicalEditorTheme__embedBlockFocus',\n },\n hashtag: 'LexicalEditorTheme__hashtag',\n heading: {\n h1: 'LexicalEditorTheme__h1',\n h2: 'LexicalEditorTheme__h2',\n h3: 'LexicalEditorTheme__h3',\n h4: 'LexicalEditorTheme__h4',\n h5: 'LexicalEditorTheme__h5',\n h6: 'LexicalEditorTheme__h6',\n },\n hr: 'LexicalEditorTheme__hr',\n indent: 'LexicalEditorTheme__indent',\n inlineImage: 'LexicalEditor__inline-image',\n link: 'LexicalEditorTheme__link',\n list: {\n checklist: 'LexicalEditorTheme__checklist',\n listitem: 'LexicalEditorTheme__listItem',\n listitemChecked: 'LexicalEditorTheme__listItemChecked',\n listitemUnchecked: 'LexicalEditorTheme__listItemUnchecked',\n nested: {\n listitem: 'LexicalEditorTheme__nestedListItem',\n },\n olDepth: [\n 'LexicalEditorTheme__ol1',\n 'LexicalEditorTheme__ol2',\n 'LexicalEditorTheme__ol3',\n 'LexicalEditorTheme__ol4',\n 'LexicalEditorTheme__ol5',\n ],\n ul: 'LexicalEditorTheme__ul',\n },\n ltr: 'LexicalEditorTheme__ltr',\n mark: 'LexicalEditorTheme__mark',\n markOverlap: 'LexicalEditorTheme__markOverlap',\n paragraph: 'LexicalEditorTheme__paragraph',\n quote: 'LexicalEditorTheme__quote',\n relationship: 'LexicalEditorTheme__relationship',\n rtl: 'LexicalEditorTheme__rtl',\n table: 'LexicalEditorTheme__table',\n tableAddColumns: 'LexicalEditorTheme__tableAddColumns',\n tableAddRows: 'LexicalEditorTheme__tableAddRows',\n tableCell: 'LexicalEditorTheme__tableCell',\n tableCellActionButton: 'LexicalEditorTheme__tableCellActionButton',\n tableCellActionButtonContainer: 'LexicalEditorTheme__tableCellActionButtonContainer',\n tableCellEditing: 'LexicalEditorTheme__tableCellEditing',\n tableCellHeader: 'LexicalEditorTheme__tableCellHeader',\n tableCellPrimarySelected: 'LexicalEditorTheme__tableCellPrimarySelected',\n tableCellResizer: 'LexicalEditorTheme__tableCellResizer',\n tableCellSelected: 'LexicalEditorTheme__tableCellSelected',\n tableCellSortedIndicator: 'LexicalEditorTheme__tableCellSortedIndicator',\n tableResizeRuler: 'LexicalEditorTheme__tableCellResizeRuler',\n tableSelected: 'LexicalEditorTheme__tableSelected',\n text: {\n bold: 'LexicalEditorTheme__textBold',\n code: 'LexicalEditorTheme__textCode',\n italic: 'LexicalEditorTheme__textItalic',\n strikethrough: 'LexicalEditorTheme__textStrikethrough',\n subscript: 'LexicalEditorTheme__textSubscript',\n superscript: 'LexicalEditorTheme__textSuperscript',\n underline: 'LexicalEditorTheme__textUnderline',\n underlineStrikethrough: 'LexicalEditorTheme__textUnderlineStrikethrough',\n },\n upload: 'editor-upload',\n}\n"],"names":["LexicalEditorTheme","block","blockCursor","characterLimit","code","codeHighlight","atrule","attr","boolean","builtin","cdata","char","class","comment","constant","deleted","doctype","entity","function","important","inserted","keyword","namespace","number","operator","prolog","property","punctuation","regex","selector","string","symbol","tag","url","variable","embedBlock","base","focus","hashtag","heading","h1","h2","h3","h4","h5","h6","hr","indent","inlineImage","link","list","checklist","listitem","listitemChecked","listitemUnchecked","nested","olDepth","ul","ltr","mark","markOverlap","paragraph","quote","relationship","rtl","table","tableAddColumns","tableAddRows","tableCell","tableCellActionButton","tableCellActionButtonContainer","tableCellEditing","tableCellHeader","tableCellPrimarySelected","tableCellResizer","tableCellSelected","tableCellSortedIndicator","tableResizeRuler","tableSelected","text","bold","italic","strikethrough","subscript","superscript","underline","underlineStrikethrough","upload"],"
|
|
1
|
+
{"version":3,"sources":["../../../src/lexical/theme/EditorTheme.tsx"],"sourcesContent":["import type { EditorThemeClasses } from 'lexical'\n\nimport './EditorTheme.scss'\n\nexport const LexicalEditorTheme: EditorThemeClasses = {\n block: 'LexicalEditorTheme__block',\n blockCursor: 'LexicalEditorTheme__blockCursor',\n characterLimit: 'LexicalEditorTheme__characterLimit',\n code: 'LexicalEditorTheme__code',\n codeHighlight: {\n atrule: 'LexicalEditorTheme__tokenAttr',\n attr: 'LexicalEditorTheme__tokenAttr',\n boolean: 'LexicalEditorTheme__tokenProperty',\n builtin: 'LexicalEditorTheme__tokenSelector',\n cdata: 'LexicalEditorTheme__tokenComment',\n char: 'LexicalEditorTheme__tokenSelector',\n class: 'LexicalEditorTheme__tokenFunction',\n 'class-name': 'LexicalEditorTheme__tokenFunction',\n comment: 'LexicalEditorTheme__tokenComment',\n constant: 'LexicalEditorTheme__tokenProperty',\n deleted: 'LexicalEditorTheme__tokenProperty',\n doctype: 'LexicalEditorTheme__tokenComment',\n entity: 'LexicalEditorTheme__tokenOperator',\n function: 'LexicalEditorTheme__tokenFunction',\n important: 'LexicalEditorTheme__tokenVariable',\n inserted: 'LexicalEditorTheme__tokenSelector',\n keyword: 'LexicalEditorTheme__tokenAttr',\n namespace: 'LexicalEditorTheme__tokenVariable',\n number: 'LexicalEditorTheme__tokenProperty',\n operator: 'LexicalEditorTheme__tokenOperator',\n prolog: 'LexicalEditorTheme__tokenComment',\n property: 'LexicalEditorTheme__tokenProperty',\n punctuation: 'LexicalEditorTheme__tokenPunctuation',\n regex: 'LexicalEditorTheme__tokenVariable',\n selector: 'LexicalEditorTheme__tokenSelector',\n string: 'LexicalEditorTheme__tokenSelector',\n symbol: 'LexicalEditorTheme__tokenProperty',\n tag: 'LexicalEditorTheme__tokenProperty',\n url: 'LexicalEditorTheme__tokenOperator',\n variable: 'LexicalEditorTheme__tokenVariable',\n },\n embedBlock: {\n base: 'LexicalEditorTheme__embedBlock',\n focus: 'LexicalEditorTheme__embedBlockFocus',\n },\n hashtag: 'LexicalEditorTheme__hashtag',\n heading: {\n h1: 'LexicalEditorTheme__h1',\n h2: 'LexicalEditorTheme__h2',\n h3: 'LexicalEditorTheme__h3',\n h4: 'LexicalEditorTheme__h4',\n h5: 'LexicalEditorTheme__h5',\n h6: 'LexicalEditorTheme__h6',\n },\n hr: 'LexicalEditorTheme__hr',\n indent: 'LexicalEditorTheme__indent',\n inlineImage: 'LexicalEditor__inline-image',\n link: 'LexicalEditorTheme__link',\n list: {\n checklist: 'LexicalEditorTheme__checklist',\n listitem: 'LexicalEditorTheme__listItem',\n listitemChecked: 'LexicalEditorTheme__listItemChecked',\n listitemUnchecked: 'LexicalEditorTheme__listItemUnchecked',\n nested: {\n listitem: 'LexicalEditorTheme__nestedListItem',\n },\n olDepth: [\n 'LexicalEditorTheme__ol1',\n 'LexicalEditorTheme__ol2',\n 'LexicalEditorTheme__ol3',\n 'LexicalEditorTheme__ol4',\n 'LexicalEditorTheme__ol5',\n ],\n ul: 'LexicalEditorTheme__ul',\n },\n ltr: 'LexicalEditorTheme__ltr',\n mark: 'LexicalEditorTheme__mark',\n markOverlap: 'LexicalEditorTheme__markOverlap',\n paragraph: 'LexicalEditorTheme__paragraph',\n quote: 'LexicalEditorTheme__quote',\n relationship: 'LexicalEditorTheme__relationship',\n rtl: 'LexicalEditorTheme__rtl',\n table: 'LexicalEditorTheme__table',\n tableAddColumns: 'LexicalEditorTheme__tableAddColumns',\n tableAddRows: 'LexicalEditorTheme__tableAddRows',\n tableCell: 'LexicalEditorTheme__tableCell',\n tableCellActionButton: 'LexicalEditorTheme__tableCellActionButton',\n tableCellActionButtonContainer: 'LexicalEditorTheme__tableCellActionButtonContainer',\n tableCellEditing: 'LexicalEditorTheme__tableCellEditing',\n tableCellHeader: 'LexicalEditorTheme__tableCellHeader',\n tableCellPrimarySelected: 'LexicalEditorTheme__tableCellPrimarySelected',\n tableCellResizer: 'LexicalEditorTheme__tableCellResizer',\n tableCellSelected: 'LexicalEditorTheme__tableCellSelected',\n tableCellSortedIndicator: 'LexicalEditorTheme__tableCellSortedIndicator',\n tableResizeRuler: 'LexicalEditorTheme__tableCellResizeRuler',\n tableSelected: 'LexicalEditorTheme__tableSelected',\n text: {\n bold: 'LexicalEditorTheme__textBold',\n code: 'LexicalEditorTheme__textCode',\n italic: 'LexicalEditorTheme__textItalic',\n strikethrough: 'LexicalEditorTheme__textStrikethrough',\n subscript: 'LexicalEditorTheme__textSubscript',\n superscript: 'LexicalEditorTheme__textSuperscript',\n underline: 'LexicalEditorTheme__textUnderline',\n underlineStrikethrough: 'LexicalEditorTheme__textUnderlineStrikethrough',\n },\n upload: 'editor-upload',\n}\n"],"names":["LexicalEditorTheme","block","blockCursor","characterLimit","code","codeHighlight","atrule","attr","boolean","builtin","cdata","char","class","comment","constant","deleted","doctype","entity","function","important","inserted","keyword","namespace","number","operator","prolog","property","punctuation","regex","selector","string","symbol","tag","url","variable","embedBlock","base","focus","hashtag","heading","h1","h2","h3","h4","h5","h6","hr","indent","inlineImage","link","list","checklist","listitem","listitemChecked","listitemUnchecked","nested","olDepth","ul","ltr","mark","markOverlap","paragraph","quote","relationship","rtl","table","tableAddColumns","tableAddRows","tableCell","tableCellActionButton","tableCellActionButtonContainer","tableCellEditing","tableCellHeader","tableCellPrimarySelected","tableCellResizer","tableCellSelected","tableCellSortedIndicator","tableResizeRuler","tableSelected","text","bold","italic","strikethrough","subscript","superscript","underline","underlineStrikethrough","upload"],"mappings":"AAIA,OAAO,MAAMA,qBAAyC;IACpDC,OAAO;IACPC,aAAa;IACbC,gBAAgB;IAChBC,MAAM;IACNC,eAAe;QACbC,QAAQ;QACRC,MAAM;QACNC,SAAS;QACTC,SAAS;QACTC,OAAO;QACPC,MAAM;QACNC,OAAO;QACP,cAAc;QACdC,SAAS;QACTC,UAAU;QACVC,SAAS;QACTC,SAAS;QACTC,QAAQ;QACRC,UAAU;QACVC,WAAW;QACXC,UAAU;QACVC,SAAS;QACTC,WAAW;QACXC,QAAQ;QACRC,UAAU;QACVC,QAAQ;QACRC,UAAU;QACVC,aAAa;QACbC,OAAO;QACPC,UAAU;QACVC,QAAQ;QACRC,QAAQ;QACRC,KAAK;QACLC,KAAK;QACLC,UAAU;IACZ;IACAC,YAAY;QACVC,MAAM;QACNC,OAAO;IACT;IACAC,SAAS;IACTC,SAAS;QACPC,IAAI;QACJC,IAAI;QACJC,IAAI;QACJC,IAAI;QACJC,IAAI;QACJC,IAAI;IACN;IACAC,IAAI;IACJC,QAAQ;IACRC,aAAa;IACbC,MAAM;IACNC,MAAM;QACJC,WAAW;QACXC,UAAU;QACVC,iBAAiB;QACjBC,mBAAmB;QACnBC,QAAQ;YACNH,UAAU;QACZ;QACAI,SAAS;YACP;YACA;YACA;YACA;YACA;SACD;QACDC,IAAI;IACN;IACAC,KAAK;IACLC,MAAM;IACNC,aAAa;IACbC,WAAW;IACXC,OAAO;IACPC,cAAc;IACdC,KAAK;IACLC,OAAO;IACPC,iBAAiB;IACjBC,cAAc;IACdC,WAAW;IACXC,uBAAuB;IACvBC,gCAAgC;IAChCC,kBAAkB;IAClBC,iBAAiB;IACjBC,0BAA0B;IAC1BC,kBAAkB;IAClBC,mBAAmB;IACnBC,0BAA0B;IAC1BC,kBAAkB;IAClBC,eAAe;IACfC,MAAM;QACJC,MAAM;QACN5E,MAAM;QACN6E,QAAQ;QACRC,eAAe;QACfC,WAAW;QACXC,aAAa;QACbC,WAAW;QACXC,wBAAwB;IAC1B;IACAC,QAAQ;AACV,EAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/lexical/ui/ContentEditable.tsx"],"sourcesContent":["import type { JSX } from 'react'\n\nimport { ContentEditable } from '@lexical/react/LexicalContentEditable.js'\nimport * as React from 'react'\n\nimport './ContentEditable.scss'\n\nexport function LexicalContentEditable({ className }: { className?: string }): JSX.Element {\n return <ContentEditable className={className ?? 'ContentEditable__root'} />\n}\n"],"names":["ContentEditable","React","LexicalContentEditable","className"],"
|
|
1
|
+
{"version":3,"sources":["../../../src/lexical/ui/ContentEditable.tsx"],"sourcesContent":["import type { JSX } from 'react'\n\nimport { ContentEditable } from '@lexical/react/LexicalContentEditable.js'\nimport * as React from 'react'\n\nimport './ContentEditable.scss'\n\nexport function LexicalContentEditable({ className }: { className?: string }): JSX.Element {\n return <ContentEditable className={className ?? 'ContentEditable__root'} />\n}\n"],"names":["ContentEditable","React","LexicalContentEditable","className"],"mappings":";AAEA,SAASA,eAAe,QAAQ,2CAA0C;AAC1E,YAAYC,WAAW,QAAO;AAI9B,OAAO,SAASC,uBAAuB,EAAEC,SAAS,EAA0B;IAC1E,qBAAO,KAACH;QAAgBG,WAAWA,aAAa;;AAClD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../src/lexical/ui/icons/AI/index.tsx"],"sourcesContent":["import React from 'react'\n\nexport const AIIcon: React.FC = () => (\n <svg\n aria-hidden=\"true\"\n className=\"icon\"\n fill=\"none\"\n focusable=\"false\"\n height=\"20\"\n viewBox=\"0 0 20 20\"\n width=\"20\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <g clipPath=\"url(#clip0_4393_10389)\">\n <path\n d=\"M6.25 4.75V7M5.125 5.875L7.375 5.875M6.25 13V14.125M6.25 14.125V15.25M6.25 14.125H5.125M6.25 14.125H7.375M10.75 5.5L11.2171 6.66785C11.7399 7.97466 12.7753 9.01014 14.0822 9.53286L15.25 10L13.686 10.782C12.6191 11.3154 11.7708 12.2032 11.2864 13.2932L10.75 14.5L10.2136 13.2932C9.72919 12.2032 8.8809 11.3154 7.814 10.782L6.25 10L7.41785 9.53286C8.72466 9.01014 9.76014 7.97466 10.2829 6.66785L10.75 5.5Z\"\n stroke=\"currentColor\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n />\n </g>\n <defs>\n <clipPath id=\"clip0_4393_10389\">\n <rect fill=\"white\" height=\"12\" transform=\"translate(4 4)\" width=\"12\" />\n </clipPath>\n </defs>\n </svg>\n)\n"],"names":["React","AIIcon","svg","aria-hidden","className","fill","focusable","height","viewBox","width","xmlns","g","clipPath","path","d","stroke","strokeLinecap","strokeLinejoin","defs","id","rect","transform"],"
|
|
1
|
+
{"version":3,"sources":["../../../../../src/lexical/ui/icons/AI/index.tsx"],"sourcesContent":["import React from 'react'\n\nexport const AIIcon: React.FC = () => (\n <svg\n aria-hidden=\"true\"\n className=\"icon\"\n fill=\"none\"\n focusable=\"false\"\n height=\"20\"\n viewBox=\"0 0 20 20\"\n width=\"20\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <g clipPath=\"url(#clip0_4393_10389)\">\n <path\n d=\"M6.25 4.75V7M5.125 5.875L7.375 5.875M6.25 13V14.125M6.25 14.125V15.25M6.25 14.125H5.125M6.25 14.125H7.375M10.75 5.5L11.2171 6.66785C11.7399 7.97466 12.7753 9.01014 14.0822 9.53286L15.25 10L13.686 10.782C12.6191 11.3154 11.7708 12.2032 11.2864 13.2932L10.75 14.5L10.2136 13.2932C9.72919 12.2032 8.8809 11.3154 7.814 10.782L6.25 10L7.41785 9.53286C8.72466 9.01014 9.76014 7.97466 10.2829 6.66785L10.75 5.5Z\"\n stroke=\"currentColor\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n />\n </g>\n <defs>\n <clipPath id=\"clip0_4393_10389\">\n <rect fill=\"white\" height=\"12\" transform=\"translate(4 4)\" width=\"12\" />\n </clipPath>\n </defs>\n </svg>\n)\n"],"names":["React","AIIcon","svg","aria-hidden","className","fill","focusable","height","viewBox","width","xmlns","g","clipPath","path","d","stroke","strokeLinecap","strokeLinejoin","defs","id","rect","transform"],"mappings":";AAAA,OAAOA,WAAW,QAAO;AAEzB,OAAO,MAAMC,SAAmB,kBAC9B,MAACC;QACCC,eAAY;QACZC,WAAU;QACVC,MAAK;QACLC,WAAU;QACVC,QAAO;QACPC,SAAQ;QACRC,OAAM;QACNC,OAAM;;0BAEN,KAACC;gBAAEC,UAAS;0BACV,cAAA,KAACC;oBACCC,GAAE;oBACFC,QAAO;oBACPC,eAAc;oBACdC,gBAAe;;;0BAGnB,KAACC;0BACC,cAAA,KAACN;oBAASO,IAAG;8BACX,cAAA,KAACC;wBAAKf,MAAK;wBAAQE,QAAO;wBAAKc,WAAU;wBAAiBZ,OAAM;;;;;OAIvE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../src/lexical/ui/icons/Add/index.tsx"],"sourcesContent":["import React from 'react'\n\nexport const AddIcon: React.FC = () => (\n <svg fill=\"none\" height=\"20\" viewBox=\"0 0 20 20\" width=\"20\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M5 10h10\" stroke=\"currentColor\" />\n <path d=\"M10 15V5\" stroke=\"currentColor\" />\n </svg>\n)\n"],"names":["React","AddIcon","svg","fill","height","viewBox","width","xmlns","path","d","stroke"],"
|
|
1
|
+
{"version":3,"sources":["../../../../../src/lexical/ui/icons/Add/index.tsx"],"sourcesContent":["import React from 'react'\n\nexport const AddIcon: React.FC = () => (\n <svg fill=\"none\" height=\"20\" viewBox=\"0 0 20 20\" width=\"20\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M5 10h10\" stroke=\"currentColor\" />\n <path d=\"M10 15V5\" stroke=\"currentColor\" />\n </svg>\n)\n"],"names":["React","AddIcon","svg","fill","height","viewBox","width","xmlns","path","d","stroke"],"mappings":";AAAA,OAAOA,WAAW,QAAO;AAEzB,OAAO,MAAMC,UAAoB,kBAC/B,MAACC;QAAIC,MAAK;QAAOC,QAAO;QAAKC,SAAQ;QAAYC,OAAM;QAAKC,OAAM;;0BAChE,KAACC;gBAAKC,GAAE;gBAAWC,QAAO;;0BAC1B,KAACF;gBAAKC,GAAE;gBAAWC,QAAO;;;OAE7B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../src/lexical/ui/icons/AlignCenter/index.tsx"],"sourcesContent":["import React from 'react'\n\nexport const AlignCenterIcon: React.FC = () => (\n <svg\n aria-hidden=\"true\"\n className=\"icon\"\n fill=\"none\"\n focusable=\"false\"\n height=\"20\"\n viewBox=\"0 0 20 20\"\n width=\"20\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path d=\"M2.5 5H17.5\" stroke=\"currentColor\" strokeWidth=\"1.5\" />\n <path d=\"M2.5 10H17.5\" stroke=\"currentColor\" strokeWidth=\"1.5\" />\n <path d=\"M5 15H15\" stroke=\"currentColor\" strokeWidth=\"1.5\" />\n </svg>\n)\n"],"names":["React","AlignCenterIcon","svg","aria-hidden","className","fill","focusable","height","viewBox","width","xmlns","path","d","stroke","strokeWidth"],"
|
|
1
|
+
{"version":3,"sources":["../../../../../src/lexical/ui/icons/AlignCenter/index.tsx"],"sourcesContent":["import React from 'react'\n\nexport const AlignCenterIcon: React.FC = () => (\n <svg\n aria-hidden=\"true\"\n className=\"icon\"\n fill=\"none\"\n focusable=\"false\"\n height=\"20\"\n viewBox=\"0 0 20 20\"\n width=\"20\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path d=\"M2.5 5H17.5\" stroke=\"currentColor\" strokeWidth=\"1.5\" />\n <path d=\"M2.5 10H17.5\" stroke=\"currentColor\" strokeWidth=\"1.5\" />\n <path d=\"M5 15H15\" stroke=\"currentColor\" strokeWidth=\"1.5\" />\n </svg>\n)\n"],"names":["React","AlignCenterIcon","svg","aria-hidden","className","fill","focusable","height","viewBox","width","xmlns","path","d","stroke","strokeWidth"],"mappings":";AAAA,OAAOA,WAAW,QAAO;AAEzB,OAAO,MAAMC,kBAA4B,kBACvC,MAACC;QACCC,eAAY;QACZC,WAAU;QACVC,MAAK;QACLC,WAAU;QACVC,QAAO;QACPC,SAAQ;QACRC,OAAM;QACNC,OAAM;;0BAEN,KAACC;gBAAKC,GAAE;gBAAcC,QAAO;gBAAeC,aAAY;;0BACxD,KAACH;gBAAKC,GAAE;gBAAeC,QAAO;gBAAeC,aAAY;;0BACzD,KAACH;gBAAKC,GAAE;gBAAWC,QAAO;gBAAeC,aAAY;;;OAExD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../src/lexical/ui/icons/AlignJustify/index.tsx"],"sourcesContent":["import React from 'react'\n\nexport const AlignJustifyIcon: React.FC = () => (\n <svg\n aria-hidden=\"true\"\n className=\"icon\"\n fill=\"none\"\n focusable=\"false\"\n height=\"20\"\n viewBox=\"0 0 20 20\"\n width=\"20\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path d=\"M2.5 5H17.5\" stroke=\"currentColor\" strokeWidth=\"1.5\" />\n <path d=\"M2.5 10H17.5\" stroke=\"currentColor\" strokeWidth=\"1.5\" />\n <path d=\"M2.5 15H17.5\" stroke=\"currentColor\" strokeWidth=\"1.5\" />\n </svg>\n)\n"],"names":["React","AlignJustifyIcon","svg","aria-hidden","className","fill","focusable","height","viewBox","width","xmlns","path","d","stroke","strokeWidth"],"
|
|
1
|
+
{"version":3,"sources":["../../../../../src/lexical/ui/icons/AlignJustify/index.tsx"],"sourcesContent":["import React from 'react'\n\nexport const AlignJustifyIcon: React.FC = () => (\n <svg\n aria-hidden=\"true\"\n className=\"icon\"\n fill=\"none\"\n focusable=\"false\"\n height=\"20\"\n viewBox=\"0 0 20 20\"\n width=\"20\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path d=\"M2.5 5H17.5\" stroke=\"currentColor\" strokeWidth=\"1.5\" />\n <path d=\"M2.5 10H17.5\" stroke=\"currentColor\" strokeWidth=\"1.5\" />\n <path d=\"M2.5 15H17.5\" stroke=\"currentColor\" strokeWidth=\"1.5\" />\n </svg>\n)\n"],"names":["React","AlignJustifyIcon","svg","aria-hidden","className","fill","focusable","height","viewBox","width","xmlns","path","d","stroke","strokeWidth"],"mappings":";AAAA,OAAOA,WAAW,QAAO;AAEzB,OAAO,MAAMC,mBAA6B,kBACxC,MAACC;QACCC,eAAY;QACZC,WAAU;QACVC,MAAK;QACLC,WAAU;QACVC,QAAO;QACPC,SAAQ;QACRC,OAAM;QACNC,OAAM;;0BAEN,KAACC;gBAAKC,GAAE;gBAAcC,QAAO;gBAAeC,aAAY;;0BACxD,KAACH;gBAAKC,GAAE;gBAAeC,QAAO;gBAAeC,aAAY;;0BACzD,KAACH;gBAAKC,GAAE;gBAAeC,QAAO;gBAAeC,aAAY;;;OAE5D"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../src/lexical/ui/icons/AlignLeft/index.tsx"],"sourcesContent":["import React from 'react'\n\nexport const AlignLeftIcon: React.FC = () => (\n <svg\n aria-hidden=\"true\"\n className=\"icon\"\n fill=\"none\"\n focusable=\"false\"\n height=\"20\"\n viewBox=\"0 0 20 20\"\n width=\"20\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path d=\"M2.5 5H17.5\" stroke=\"currentColor\" strokeWidth=\"1.5\" />\n <path d=\"M2.5 10H17.5\" stroke=\"currentColor\" strokeWidth=\"1.5\" />\n <path d=\"M2.5 15H12.5\" stroke=\"currentColor\" strokeWidth=\"1.5\" />\n </svg>\n)\n"],"names":["React","AlignLeftIcon","svg","aria-hidden","className","fill","focusable","height","viewBox","width","xmlns","path","d","stroke","strokeWidth"],"
|
|
1
|
+
{"version":3,"sources":["../../../../../src/lexical/ui/icons/AlignLeft/index.tsx"],"sourcesContent":["import React from 'react'\n\nexport const AlignLeftIcon: React.FC = () => (\n <svg\n aria-hidden=\"true\"\n className=\"icon\"\n fill=\"none\"\n focusable=\"false\"\n height=\"20\"\n viewBox=\"0 0 20 20\"\n width=\"20\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path d=\"M2.5 5H17.5\" stroke=\"currentColor\" strokeWidth=\"1.5\" />\n <path d=\"M2.5 10H17.5\" stroke=\"currentColor\" strokeWidth=\"1.5\" />\n <path d=\"M2.5 15H12.5\" stroke=\"currentColor\" strokeWidth=\"1.5\" />\n </svg>\n)\n"],"names":["React","AlignLeftIcon","svg","aria-hidden","className","fill","focusable","height","viewBox","width","xmlns","path","d","stroke","strokeWidth"],"mappings":";AAAA,OAAOA,WAAW,QAAO;AAEzB,OAAO,MAAMC,gBAA0B,kBACrC,MAACC;QACCC,eAAY;QACZC,WAAU;QACVC,MAAK;QACLC,WAAU;QACVC,QAAO;QACPC,SAAQ;QACRC,OAAM;QACNC,OAAM;;0BAEN,KAACC;gBAAKC,GAAE;gBAAcC,QAAO;gBAAeC,aAAY;;0BACxD,KAACH;gBAAKC,GAAE;gBAAeC,QAAO;gBAAeC,aAAY;;0BACzD,KAACH;gBAAKC,GAAE;gBAAeC,QAAO;gBAAeC,aAAY;;;OAE5D"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../src/lexical/ui/icons/AlignRight/index.tsx"],"sourcesContent":["import React from 'react'\n\nexport const AlignRightIcon: React.FC = () => (\n <svg\n aria-hidden=\"true\"\n className=\"icon\"\n fill=\"none\"\n focusable=\"false\"\n height=\"20\"\n viewBox=\"0 0 20 20\"\n width=\"20\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path d=\"M2.5 5H17.5\" stroke=\"currentColor\" strokeWidth=\"1.5\" />\n <path d=\"M2.5 10H17.5\" stroke=\"currentColor\" strokeWidth=\"1.5\" />\n <path d=\"M7.5 15H17.5\" stroke=\"currentColor\" strokeWidth=\"1.5\" />\n </svg>\n)\n"],"names":["React","AlignRightIcon","svg","aria-hidden","className","fill","focusable","height","viewBox","width","xmlns","path","d","stroke","strokeWidth"],"
|
|
1
|
+
{"version":3,"sources":["../../../../../src/lexical/ui/icons/AlignRight/index.tsx"],"sourcesContent":["import React from 'react'\n\nexport const AlignRightIcon: React.FC = () => (\n <svg\n aria-hidden=\"true\"\n className=\"icon\"\n fill=\"none\"\n focusable=\"false\"\n height=\"20\"\n viewBox=\"0 0 20 20\"\n width=\"20\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path d=\"M2.5 5H17.5\" stroke=\"currentColor\" strokeWidth=\"1.5\" />\n <path d=\"M2.5 10H17.5\" stroke=\"currentColor\" strokeWidth=\"1.5\" />\n <path d=\"M7.5 15H17.5\" stroke=\"currentColor\" strokeWidth=\"1.5\" />\n </svg>\n)\n"],"names":["React","AlignRightIcon","svg","aria-hidden","className","fill","focusable","height","viewBox","width","xmlns","path","d","stroke","strokeWidth"],"mappings":";AAAA,OAAOA,WAAW,QAAO;AAEzB,OAAO,MAAMC,iBAA2B,kBACtC,MAACC;QACCC,eAAY;QACZC,WAAU;QACVC,MAAK;QACLC,WAAU;QACVC,QAAO;QACPC,SAAQ;QACRC,OAAM;QACNC,OAAM;;0BAEN,KAACC;gBAAKC,GAAE;gBAAcC,QAAO;gBAAeC,aAAY;;0BACxD,KAACH;gBAAKC,GAAE;gBAAeC,QAAO;gBAAeC,aAAY;;0BACzD,KAACH;gBAAKC,GAAE;gBAAeC,QAAO;gBAAeC,aAAY;;;OAE5D"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../src/lexical/ui/icons/Block/index.tsx"],"sourcesContent":["import React from 'react'\n\nexport const BlockIcon: React.FC = () => (\n <svg\n aria-hidden=\"true\"\n className=\"icon\"\n fill=\"none\"\n focusable=\"false\"\n height=\"20\"\n viewBox=\"0 0 20 20\"\n width=\"20\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <rect height=\"4\" rx=\"0.5\" stroke=\"currentColor\" width=\"4\" x=\"8\" y=\"5\" />\n <rect height=\"4\" rx=\"0.5\" stroke=\"currentColor\" width=\"4\" x=\"5\" y=\"11\" />\n <rect height=\"4\" rx=\"0.5\" stroke=\"currentColor\" width=\"4\" x=\"11\" y=\"11\" />\n </svg>\n)\n"],"names":["React","BlockIcon","svg","aria-hidden","className","fill","focusable","height","viewBox","width","xmlns","rect","rx","stroke","x","y"],"
|
|
1
|
+
{"version":3,"sources":["../../../../../src/lexical/ui/icons/Block/index.tsx"],"sourcesContent":["import React from 'react'\n\nexport const BlockIcon: React.FC = () => (\n <svg\n aria-hidden=\"true\"\n className=\"icon\"\n fill=\"none\"\n focusable=\"false\"\n height=\"20\"\n viewBox=\"0 0 20 20\"\n width=\"20\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <rect height=\"4\" rx=\"0.5\" stroke=\"currentColor\" width=\"4\" x=\"8\" y=\"5\" />\n <rect height=\"4\" rx=\"0.5\" stroke=\"currentColor\" width=\"4\" x=\"5\" y=\"11\" />\n <rect height=\"4\" rx=\"0.5\" stroke=\"currentColor\" width=\"4\" x=\"11\" y=\"11\" />\n </svg>\n)\n"],"names":["React","BlockIcon","svg","aria-hidden","className","fill","focusable","height","viewBox","width","xmlns","rect","rx","stroke","x","y"],"mappings":";AAAA,OAAOA,WAAW,QAAO;AAEzB,OAAO,MAAMC,YAAsB,kBACjC,MAACC;QACCC,eAAY;QACZC,WAAU;QACVC,MAAK;QACLC,WAAU;QACVC,QAAO;QACPC,SAAQ;QACRC,OAAM;QACNC,OAAM;;0BAEN,KAACC;gBAAKJ,QAAO;gBAAIK,IAAG;gBAAMC,QAAO;gBAAeJ,OAAM;gBAAIK,GAAE;gBAAIC,GAAE;;0BAClE,KAACJ;gBAAKJ,QAAO;gBAAIK,IAAG;gBAAMC,QAAO;gBAAeJ,OAAM;gBAAIK,GAAE;gBAAIC,GAAE;;0BAClE,KAACJ;gBAAKJ,QAAO;gBAAIK,IAAG;gBAAMC,QAAO;gBAAeJ,OAAM;gBAAIK,GAAE;gBAAKC,GAAE;;;OAEtE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../src/lexical/ui/icons/Blockquote/index.tsx"],"sourcesContent":["import React from 'react'\n\nexport const BlockquoteIcon: React.FC = () => (\n <svg\n aria-hidden=\"true\"\n className=\"icon\"\n fill=\"none\"\n focusable=\"false\"\n height=\"20\"\n viewBox=\"0 0 20 20\"\n width=\"20\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n 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\"\n fill=\"currentColor\"\n />\n </svg>\n)\n"],"names":["React","BlockquoteIcon","svg","aria-hidden","className","fill","focusable","height","viewBox","width","xmlns","path","d"],"
|
|
1
|
+
{"version":3,"sources":["../../../../../src/lexical/ui/icons/Blockquote/index.tsx"],"sourcesContent":["import React from 'react'\n\nexport const BlockquoteIcon: React.FC = () => (\n <svg\n aria-hidden=\"true\"\n className=\"icon\"\n fill=\"none\"\n focusable=\"false\"\n height=\"20\"\n viewBox=\"0 0 20 20\"\n width=\"20\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n 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\"\n fill=\"currentColor\"\n />\n </svg>\n)\n"],"names":["React","BlockquoteIcon","svg","aria-hidden","className","fill","focusable","height","viewBox","width","xmlns","path","d"],"mappings":";AAAA,OAAOA,WAAW,QAAO;AAEzB,OAAO,MAAMC,iBAA2B,kBACtC,KAACC;QACCC,eAAY;QACZC,WAAU;QACVC,MAAK;QACLC,WAAU;QACVC,QAAO;QACPC,SAAQ;QACRC,OAAM;QACNC,OAAM;kBAEN,cAAA,KAACC;YACCC,GAAE;YACFP,MAAK;;OAGV"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../src/lexical/ui/icons/Bold/index.tsx"],"sourcesContent":["import React from 'react'\n\nexport const BoldIcon: React.FC = () => (\n <svg\n aria-hidden=\"true\"\n className=\"icon\"\n fill=\"currentColor\"\n focusable=\"false\"\n height=\"20\"\n viewBox=\"0 0 20 20\"\n width=\"20\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n 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\"\n fill=\"currentColor\"\n />\n </svg>\n)\n"],"names":["React","BoldIcon","svg","aria-hidden","className","fill","focusable","height","viewBox","width","xmlns","path","d"],"
|
|
1
|
+
{"version":3,"sources":["../../../../../src/lexical/ui/icons/Bold/index.tsx"],"sourcesContent":["import React from 'react'\n\nexport const BoldIcon: React.FC = () => (\n <svg\n aria-hidden=\"true\"\n className=\"icon\"\n fill=\"currentColor\"\n focusable=\"false\"\n height=\"20\"\n viewBox=\"0 0 20 20\"\n width=\"20\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n 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\"\n fill=\"currentColor\"\n />\n </svg>\n)\n"],"names":["React","BoldIcon","svg","aria-hidden","className","fill","focusable","height","viewBox","width","xmlns","path","d"],"mappings":";AAAA,OAAOA,WAAW,QAAO;AAEzB,OAAO,MAAMC,WAAqB,kBAChC,KAACC;QACCC,eAAY;QACZC,WAAU;QACVC,MAAK;QACLC,WAAU;QACVC,QAAO;QACPC,SAAQ;QACRC,OAAM;QACNC,OAAM;kBAEN,cAAA,KAACC;YACCC,GAAE;YACFP,MAAK;;OAGV"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../src/lexical/ui/icons/Checklist/index.tsx"],"sourcesContent":["import React from 'react'\n\nexport const ChecklistIcon: React.FC = () => (\n <svg\n aria-hidden=\"true\"\n className=\"icon\"\n fill=\"none\"\n focusable=\"false\"\n height=\"20\"\n viewBox=\"0 0 20 20\"\n width=\"20\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <rect height=\"13\" rx=\"1.5\" stroke=\"currentColor\" width=\"13\" x=\"3.5\" y=\"3.5\" />\n <path d=\"M7 10L9 12.5L13 7.5\" stroke=\"currentColor\" strokeWidth=\"1.5\" />\n </svg>\n)\n"],"names":["React","ChecklistIcon","svg","aria-hidden","className","fill","focusable","height","viewBox","width","xmlns","rect","rx","stroke","x","y","path","d","strokeWidth"],"
|
|
1
|
+
{"version":3,"sources":["../../../../../src/lexical/ui/icons/Checklist/index.tsx"],"sourcesContent":["import React from 'react'\n\nexport const ChecklistIcon: React.FC = () => (\n <svg\n aria-hidden=\"true\"\n className=\"icon\"\n fill=\"none\"\n focusable=\"false\"\n height=\"20\"\n viewBox=\"0 0 20 20\"\n width=\"20\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <rect height=\"13\" rx=\"1.5\" stroke=\"currentColor\" width=\"13\" x=\"3.5\" y=\"3.5\" />\n <path d=\"M7 10L9 12.5L13 7.5\" stroke=\"currentColor\" strokeWidth=\"1.5\" />\n </svg>\n)\n"],"names":["React","ChecklistIcon","svg","aria-hidden","className","fill","focusable","height","viewBox","width","xmlns","rect","rx","stroke","x","y","path","d","strokeWidth"],"mappings":";AAAA,OAAOA,WAAW,QAAO;AAEzB,OAAO,MAAMC,gBAA0B,kBACrC,MAACC;QACCC,eAAY;QACZC,WAAU;QACVC,MAAK;QACLC,WAAU;QACVC,QAAO;QACPC,SAAQ;QACRC,OAAM;QACNC,OAAM;;0BAEN,KAACC;gBAAKJ,QAAO;gBAAKK,IAAG;gBAAMC,QAAO;gBAAeJ,OAAM;gBAAKK,GAAE;gBAAMC,GAAE;;0BACtE,KAACC;gBAAKC,GAAE;gBAAsBJ,QAAO;gBAAeK,aAAY;;;OAEnE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../src/lexical/ui/icons/Code/index.tsx"],"sourcesContent":["import React from 'react'\n\nexport const CodeIcon: React.FC = () => (\n <svg\n aria-hidden=\"true\"\n className=\"icon\"\n fill=\"none\"\n focusable=\"false\"\n height=\"20\"\n viewBox=\"0 0 20 20\"\n width=\"20\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path d=\"M7.76465 6L3.76465 10L7.76465 14\" stroke=\"currentColor\" />\n <path d=\"M12.2354 6L16.2354 10L12.2354 14\" stroke=\"currentColor\" />\n </svg>\n)\n"],"names":["React","CodeIcon","svg","aria-hidden","className","fill","focusable","height","viewBox","width","xmlns","path","d","stroke"],"
|
|
1
|
+
{"version":3,"sources":["../../../../../src/lexical/ui/icons/Code/index.tsx"],"sourcesContent":["import React from 'react'\n\nexport const CodeIcon: React.FC = () => (\n <svg\n aria-hidden=\"true\"\n className=\"icon\"\n fill=\"none\"\n focusable=\"false\"\n height=\"20\"\n viewBox=\"0 0 20 20\"\n width=\"20\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path d=\"M7.76465 6L3.76465 10L7.76465 14\" stroke=\"currentColor\" />\n <path d=\"M12.2354 6L16.2354 10L12.2354 14\" stroke=\"currentColor\" />\n </svg>\n)\n"],"names":["React","CodeIcon","svg","aria-hidden","className","fill","focusable","height","viewBox","width","xmlns","path","d","stroke"],"mappings":";AAAA,OAAOA,WAAW,QAAO;AAEzB,OAAO,MAAMC,WAAqB,kBAChC,MAACC;QACCC,eAAY;QACZC,WAAU;QACVC,MAAK;QACLC,WAAU;QACVC,QAAO;QACPC,SAAQ;QACRC,OAAM;QACNC,OAAM;;0BAEN,KAACC;gBAAKC,GAAE;gBAAmCC,QAAO;;0BAClD,KAACF;gBAAKC,GAAE;gBAAmCC,QAAO;;;OAErD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../src/lexical/ui/icons/CodeBlock/index.tsx"],"sourcesContent":["import React from 'react'\n\nexport const CodeBlockIcon: React.FC = () => (\n <svg\n aria-hidden=\"true\"\n className=\"icon\"\n fill=\"none\"\n focusable=\"false\"\n height=\"20\"\n viewBox=\"0 0 20 20\"\n width=\"20\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path d=\"M7.76465 6L3.76465 10L7.76465 14\" stroke=\"currentColor\" />\n <path d=\"M12.2354 6L16.2354 10L12.2354 14\" stroke=\"currentColor\" />\n </svg>\n)\n"],"names":["React","CodeBlockIcon","svg","aria-hidden","className","fill","focusable","height","viewBox","width","xmlns","path","d","stroke"],"
|
|
1
|
+
{"version":3,"sources":["../../../../../src/lexical/ui/icons/CodeBlock/index.tsx"],"sourcesContent":["import React from 'react'\n\nexport const CodeBlockIcon: React.FC = () => (\n <svg\n aria-hidden=\"true\"\n className=\"icon\"\n fill=\"none\"\n focusable=\"false\"\n height=\"20\"\n viewBox=\"0 0 20 20\"\n width=\"20\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path d=\"M7.76465 6L3.76465 10L7.76465 14\" stroke=\"currentColor\" />\n <path d=\"M12.2354 6L16.2354 10L12.2354 14\" stroke=\"currentColor\" />\n </svg>\n)\n"],"names":["React","CodeBlockIcon","svg","aria-hidden","className","fill","focusable","height","viewBox","width","xmlns","path","d","stroke"],"mappings":";AAAA,OAAOA,WAAW,QAAO;AAEzB,OAAO,MAAMC,gBAA0B,kBACrC,MAACC;QACCC,eAAY;QACZC,WAAU;QACVC,MAAK;QACLC,WAAU;QACVC,QAAO;QACPC,SAAQ;QACRC,OAAM;QACNC,OAAM;;0BAEN,KAACC;gBAAKC,GAAE;gBAAmCC,QAAO;;0BAClD,KAACF;gBAAKC,GAAE;gBAAmCC,QAAO;;;OAErD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../src/lexical/ui/icons/H1/index.tsx"],"sourcesContent":["import React from 'react'\n\nexport const H1Icon: React.FC = () => (\n <svg\n aria-hidden=\"true\"\n className=\"icon\"\n fill=\"none\"\n focusable=\"false\"\n height=\"20\"\n viewBox=\"0 0 20 20\"\n width=\"20\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n 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\"\n fill=\"currentColor\"\n />\n </svg>\n)\n"],"names":["React","H1Icon","svg","aria-hidden","className","fill","focusable","height","viewBox","width","xmlns","path","d"],"
|
|
1
|
+
{"version":3,"sources":["../../../../../src/lexical/ui/icons/H1/index.tsx"],"sourcesContent":["import React from 'react'\n\nexport const H1Icon: React.FC = () => (\n <svg\n aria-hidden=\"true\"\n className=\"icon\"\n fill=\"none\"\n focusable=\"false\"\n height=\"20\"\n viewBox=\"0 0 20 20\"\n width=\"20\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n 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\"\n fill=\"currentColor\"\n />\n </svg>\n)\n"],"names":["React","H1Icon","svg","aria-hidden","className","fill","focusable","height","viewBox","width","xmlns","path","d"],"mappings":";AAAA,OAAOA,WAAW,QAAO;AAEzB,OAAO,MAAMC,SAAmB,kBAC9B,KAACC;QACCC,eAAY;QACZC,WAAU;QACVC,MAAK;QACLC,WAAU;QACVC,QAAO;QACPC,SAAQ;QACRC,OAAM;QACNC,OAAM;kBAEN,cAAA,KAACC;YACCC,GAAE;YACFP,MAAK;;OAGV"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../src/lexical/ui/icons/H2/index.tsx"],"sourcesContent":["import React from 'react'\n\nexport const H2Icon: React.FC = () => (\n <svg\n aria-hidden=\"true\"\n className=\"icon\"\n fill=\"none\"\n focusable=\"false\"\n height=\"20\"\n viewBox=\"0 0 20 20\"\n width=\"20\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n 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\"\n fill=\"currentColor\"\n />\n </svg>\n)\n"],"names":["React","H2Icon","svg","aria-hidden","className","fill","focusable","height","viewBox","width","xmlns","path","d"],"
|
|
1
|
+
{"version":3,"sources":["../../../../../src/lexical/ui/icons/H2/index.tsx"],"sourcesContent":["import React from 'react'\n\nexport const H2Icon: React.FC = () => (\n <svg\n aria-hidden=\"true\"\n className=\"icon\"\n fill=\"none\"\n focusable=\"false\"\n height=\"20\"\n viewBox=\"0 0 20 20\"\n width=\"20\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n 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\"\n fill=\"currentColor\"\n />\n </svg>\n)\n"],"names":["React","H2Icon","svg","aria-hidden","className","fill","focusable","height","viewBox","width","xmlns","path","d"],"mappings":";AAAA,OAAOA,WAAW,QAAO;AAEzB,OAAO,MAAMC,SAAmB,kBAC9B,KAACC;QACCC,eAAY;QACZC,WAAU;QACVC,MAAK;QACLC,WAAU;QACVC,QAAO;QACPC,SAAQ;QACRC,OAAM;QACNC,OAAM;kBAEN,cAAA,KAACC;YACCC,GAAE;YACFP,MAAK;;OAGV"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../src/lexical/ui/icons/H3/index.tsx"],"sourcesContent":["import React from 'react'\n\nexport const H3Icon: React.FC = () => (\n <svg\n aria-hidden=\"true\"\n className=\"icon\"\n fill=\"none\"\n focusable=\"false\"\n height=\"20\"\n viewBox=\"0 0 20 20\"\n width=\"20\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n 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\"\n fill=\"currentColor\"\n />\n </svg>\n)\n"],"names":["React","H3Icon","svg","aria-hidden","className","fill","focusable","height","viewBox","width","xmlns","path","d"],"
|
|
1
|
+
{"version":3,"sources":["../../../../../src/lexical/ui/icons/H3/index.tsx"],"sourcesContent":["import React from 'react'\n\nexport const H3Icon: React.FC = () => (\n <svg\n aria-hidden=\"true\"\n className=\"icon\"\n fill=\"none\"\n focusable=\"false\"\n height=\"20\"\n viewBox=\"0 0 20 20\"\n width=\"20\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n 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\"\n fill=\"currentColor\"\n />\n </svg>\n)\n"],"names":["React","H3Icon","svg","aria-hidden","className","fill","focusable","height","viewBox","width","xmlns","path","d"],"mappings":";AAAA,OAAOA,WAAW,QAAO;AAEzB,OAAO,MAAMC,SAAmB,kBAC9B,KAACC;QACCC,eAAY;QACZC,WAAU;QACVC,MAAK;QACLC,WAAU;QACVC,QAAO;QACPC,SAAQ;QACRC,OAAM;QACNC,OAAM;kBAEN,cAAA,KAACC;YACCC,GAAE;YACFP,MAAK;;OAGV"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../src/lexical/ui/icons/H4/index.tsx"],"sourcesContent":["import React from 'react'\n\nexport const H4Icon: React.FC = () => (\n <svg\n aria-hidden=\"true\"\n className=\"icon\"\n fill=\"none\"\n focusable=\"false\"\n height=\"20\"\n viewBox=\"0 0 20 20\"\n width=\"20\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n 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\"\n fill=\"currentColor\"\n />\n </svg>\n)\n"],"names":["React","H4Icon","svg","aria-hidden","className","fill","focusable","height","viewBox","width","xmlns","path","d"],"
|
|
1
|
+
{"version":3,"sources":["../../../../../src/lexical/ui/icons/H4/index.tsx"],"sourcesContent":["import React from 'react'\n\nexport const H4Icon: React.FC = () => (\n <svg\n aria-hidden=\"true\"\n className=\"icon\"\n fill=\"none\"\n focusable=\"false\"\n height=\"20\"\n viewBox=\"0 0 20 20\"\n width=\"20\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n 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\"\n fill=\"currentColor\"\n />\n </svg>\n)\n"],"names":["React","H4Icon","svg","aria-hidden","className","fill","focusable","height","viewBox","width","xmlns","path","d"],"mappings":";AAAA,OAAOA,WAAW,QAAO;AAEzB,OAAO,MAAMC,SAAmB,kBAC9B,KAACC;QACCC,eAAY;QACZC,WAAU;QACVC,MAAK;QACLC,WAAU;QACVC,QAAO;QACPC,SAAQ;QACRC,OAAM;QACNC,OAAM;kBAEN,cAAA,KAACC;YACCC,GAAE;YACFP,MAAK;;OAGV"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../src/lexical/ui/icons/H5/index.tsx"],"sourcesContent":["import React from 'react'\n\nexport const H5Icon: React.FC = () => (\n <svg\n aria-hidden=\"true\"\n className=\"icon\"\n fill=\"none\"\n focusable=\"false\"\n height=\"20\"\n viewBox=\"0 0 20 20\"\n width=\"20\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n 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\"\n fill=\"currentColor\"\n />\n </svg>\n)\n"],"names":["React","H5Icon","svg","aria-hidden","className","fill","focusable","height","viewBox","width","xmlns","path","d"],"
|
|
1
|
+
{"version":3,"sources":["../../../../../src/lexical/ui/icons/H5/index.tsx"],"sourcesContent":["import React from 'react'\n\nexport const H5Icon: React.FC = () => (\n <svg\n aria-hidden=\"true\"\n className=\"icon\"\n fill=\"none\"\n focusable=\"false\"\n height=\"20\"\n viewBox=\"0 0 20 20\"\n width=\"20\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n 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\"\n fill=\"currentColor\"\n />\n </svg>\n)\n"],"names":["React","H5Icon","svg","aria-hidden","className","fill","focusable","height","viewBox","width","xmlns","path","d"],"mappings":";AAAA,OAAOA,WAAW,QAAO;AAEzB,OAAO,MAAMC,SAAmB,kBAC9B,KAACC;QACCC,eAAY;QACZC,WAAU;QACVC,MAAK;QACLC,WAAU;QACVC,QAAO;QACPC,SAAQ;QACRC,OAAM;QACNC,OAAM;kBAEN,cAAA,KAACC;YACCC,GAAE;YACFP,MAAK;;OAGV"}
|