@lobehub/editor 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +635 -0
- package/es/common/canUseDOM.d.ts +8 -0
- package/es/common/canUseDOM.js +9 -0
- package/es/common/sys.d.ts +17 -0
- package/es/common/sys.js +30 -0
- package/es/editor-kernel/data-source.d.ts +8 -0
- package/es/editor-kernel/data-source.js +30 -0
- package/es/editor-kernel/event.d.ts +3 -0
- package/es/editor-kernel/event.js +11 -0
- package/es/editor-kernel/index.d.ts +11 -0
- package/es/editor-kernel/index.js +14 -0
- package/es/editor-kernel/inode/helper.d.ts +11 -0
- package/es/editor-kernel/inode/helper.js +48 -0
- package/es/editor-kernel/inode/i-element-node.d.ts +5 -0
- package/es/editor-kernel/inode/i-element-node.js +1 -0
- package/es/editor-kernel/inode/i-node.d.ts +6 -0
- package/es/editor-kernel/inode/i-node.js +1 -0
- package/es/editor-kernel/inode/index.d.ts +5 -0
- package/es/editor-kernel/inode/index.js +5 -0
- package/es/editor-kernel/inode/paragraph-node.d.ts +6 -0
- package/es/editor-kernel/inode/paragraph-node.js +1 -0
- package/es/editor-kernel/inode/root-node.d.ts +7 -0
- package/es/editor-kernel/inode/root-node.js +1 -0
- package/es/editor-kernel/inode/text-node.d.ts +12 -0
- package/es/editor-kernel/inode/text-node.js +1 -0
- package/es/editor-kernel/kernel.d.ts +46 -0
- package/es/editor-kernel/kernel.js +273 -0
- package/es/editor-kernel/plugin.d.ts +7 -0
- package/es/editor-kernel/plugin.js +54 -0
- package/es/editor-kernel/react/LexicalErrorBoundary.d.ts +13 -0
- package/es/editor-kernel/react/LexicalErrorBoundary.js +26 -0
- package/es/editor-kernel/react/index.d.ts +5 -0
- package/es/editor-kernel/react/index.js +5 -0
- package/es/editor-kernel/react/react-context.d.ts +10 -0
- package/es/editor-kernel/react/react-context.js +25 -0
- package/es/editor-kernel/react/react-editor.d.ts +12 -0
- package/es/editor-kernel/react/react-editor.js +57 -0
- package/es/editor-kernel/react/useDecorators.d.ts +9 -0
- package/es/editor-kernel/react/useDecorators.js +69 -0
- package/es/editor-kernel/react/useLexicalEditor.d.ts +2 -0
- package/es/editor-kernel/react/useLexicalEditor.js +31 -0
- package/es/editor-kernel/react/useLexicalNodeSelection.d.ts +17 -0
- package/es/editor-kernel/react/useLexicalNodeSelection.js +99 -0
- package/es/editor-kernel/react/useToolbarState.d.ts +31 -0
- package/es/editor-kernel/react/useToolbarState.js +302 -0
- package/es/editor-kernel/react/useTranslation.d.ts +3 -0
- package/es/editor-kernel/react/useTranslation.js +19 -0
- package/es/editor-kernel/types.d.ts +189 -0
- package/es/editor-kernel/types.js +1 -0
- package/es/editor-kernel/utils.d.ts +25 -0
- package/es/editor-kernel/utils.js +69 -0
- package/es/index.d.ts +14 -0
- package/es/index.js +14 -0
- package/es/locale/index.d.ts +25 -0
- package/es/locale/index.js +24 -0
- package/es/plugins/codeblock/command/index.d.ts +20 -0
- package/es/plugins/codeblock/command/index.js +84 -0
- package/es/plugins/codeblock/index.d.ts +4 -0
- package/es/plugins/codeblock/index.js +4 -0
- package/es/plugins/codeblock/plugin/CodeHighlighterShiki.d.ts +24 -0
- package/es/plugins/codeblock/plugin/CodeHighlighterShiki.js +680 -0
- package/es/plugins/codeblock/plugin/FacadeShiki.d.ts +51 -0
- package/es/plugins/codeblock/plugin/FacadeShiki.js +348 -0
- package/es/plugins/codeblock/plugin/index.d.ts +18 -0
- package/es/plugins/codeblock/plugin/index.js +90 -0
- package/es/plugins/codeblock/plugin/invariant.d.ts +8 -0
- package/es/plugins/codeblock/plugin/invariant.js +17 -0
- package/es/plugins/codeblock/react/ReactCodeblockPlugin.d.ts +4 -0
- package/es/plugins/codeblock/react/ReactCodeblockPlugin.js +51 -0
- package/es/plugins/codeblock/react/index.d.ts +2 -0
- package/es/plugins/codeblock/react/index.js +1 -0
- package/es/plugins/codeblock/react/style.d.ts +6 -0
- package/es/plugins/codeblock/react/style.js +38 -0
- package/es/plugins/codeblock/react/type.d.ts +5 -0
- package/es/plugins/codeblock/react/type.js +1 -0
- package/es/plugins/codeblock/utils/language.d.ts +1 -0
- package/es/plugins/codeblock/utils/language.js +12 -0
- package/es/plugins/common/command/index.d.ts +7 -0
- package/es/plugins/common/command/index.js +31 -0
- package/es/plugins/common/data-source/json-data-source.d.ts +7 -0
- package/es/plugins/common/data-source/json-data-source.js +39 -0
- package/es/plugins/common/data-source/text-data-source.d.ts +6 -0
- package/es/plugins/common/data-source/text-data-source.js +54 -0
- package/es/plugins/common/index.d.ts +3 -0
- package/es/plugins/common/index.js +3 -0
- package/es/plugins/common/node/ElementDOMSlot.d.ts +5 -0
- package/es/plugins/common/node/ElementDOMSlot.js +59 -0
- package/es/plugins/common/node/LexicalLineBreakNode.d.ts +31 -0
- package/es/plugins/common/node/LexicalLineBreakNode.js +140 -0
- package/es/plugins/common/node/ParagraphNode.d.ts +7 -0
- package/es/plugins/common/node/ParagraphNode.js +47 -0
- package/es/plugins/common/plugin/index.d.ts +16 -0
- package/es/plugins/common/plugin/index.js +245 -0
- package/es/plugins/common/plugin/register.d.ts +4 -0
- package/es/plugins/common/plugin/register.js +230 -0
- package/es/plugins/common/react/Placeholder/index.d.ts +7 -0
- package/es/plugins/common/react/Placeholder/index.js +53 -0
- package/es/plugins/common/react/Placeholder/style.d.ts +4 -0
- package/es/plugins/common/react/Placeholder/style.js +12 -0
- package/es/plugins/common/react/ReactEditorContent.d.ts +4 -0
- package/es/plugins/common/react/ReactEditorContent.js +7 -0
- package/es/plugins/common/react/ReactPlainText.d.ts +4 -0
- package/es/plugins/common/react/ReactPlainText.js +100 -0
- package/es/plugins/common/react/index.d.ts +3 -0
- package/es/plugins/common/react/index.js +3 -0
- package/es/plugins/common/react/style.d.ts +18 -0
- package/es/plugins/common/react/style.js +38 -0
- package/es/plugins/common/react/type.d.ts +21 -0
- package/es/plugins/common/react/type.js +1 -0
- package/es/plugins/common/utils/index.d.ts +28 -0
- package/es/plugins/common/utils/index.js +96 -0
- package/es/plugins/file/command/index.d.ts +7 -0
- package/es/plugins/file/command/index.js +28 -0
- package/es/plugins/file/index.d.ts +3 -0
- package/es/plugins/file/index.js +3 -0
- package/es/plugins/file/node/FileNode.d.ts +36 -0
- package/es/plugins/file/node/FileNode.js +177 -0
- package/es/plugins/file/plugin/index.d.ts +14 -0
- package/es/plugins/file/plugin/index.js +116 -0
- package/es/plugins/file/react/ReactFilePlugin.d.ts +4 -0
- package/es/plugins/file/react/ReactFilePlugin.js +74 -0
- package/es/plugins/file/react/components/ReactFile.d.ts +10 -0
- package/es/plugins/file/react/components/ReactFile.js +65 -0
- package/es/plugins/file/react/index.d.ts +2 -0
- package/es/plugins/file/react/index.js +1 -0
- package/es/plugins/file/react/style.d.ts +3 -0
- package/es/plugins/file/react/style.js +11 -0
- package/es/plugins/file/react/type.d.ts +13 -0
- package/es/plugins/file/react/type.js +1 -0
- package/es/plugins/file/utils/index.d.ts +2 -0
- package/es/plugins/file/utils/index.js +45 -0
- package/es/plugins/hr/command/index.d.ts +3 -0
- package/es/plugins/hr/command/index.js +13 -0
- package/es/plugins/hr/index.d.ts +3 -0
- package/es/plugins/hr/index.js +3 -0
- package/es/plugins/hr/node/HorizontalRuleNode.d.ts +16 -0
- package/es/plugins/hr/node/HorizontalRuleNode.js +100 -0
- package/es/plugins/hr/plugin/index.d.ts +8 -0
- package/es/plugins/hr/plugin/index.js +70 -0
- package/es/plugins/hr/react/ReactHRPlugin.d.ts +4 -0
- package/es/plugins/hr/react/ReactHRPlugin.js +36 -0
- package/es/plugins/hr/react/components/HRNode.d.ts +10 -0
- package/es/plugins/hr/react/components/HRNode.js +45 -0
- package/es/plugins/hr/react/index.d.ts +2 -0
- package/es/plugins/hr/react/index.js +1 -0
- package/es/plugins/hr/react/style.d.ts +1 -0
- package/es/plugins/hr/react/style.js +8 -0
- package/es/plugins/hr/react/type.d.ts +3 -0
- package/es/plugins/hr/react/type.js +1 -0
- package/es/plugins/image/command/index.d.ts +8 -0
- package/es/plugins/image/command/index.js +46 -0
- package/es/plugins/image/index.d.ts +3 -0
- package/es/plugins/image/index.js +3 -0
- package/es/plugins/image/node/basie-image-node.d.ts +44 -0
- package/es/plugins/image/node/basie-image-node.js +151 -0
- package/es/plugins/image/node/image-node.d.ts +26 -0
- package/es/plugins/image/node/image-node.js +176 -0
- package/es/plugins/image/plugin/index.d.ts +13 -0
- package/es/plugins/image/plugin/index.js +74 -0
- package/es/plugins/image/react/ReactImagePlugin.d.ts +4 -0
- package/es/plugins/image/react/ReactImagePlugin.js +48 -0
- package/es/plugins/image/react/components/BrokenImage.d.ts +3 -0
- package/es/plugins/image/react/components/BrokenImage.js +18 -0
- package/es/plugins/image/react/components/Image.d.ts +7 -0
- package/es/plugins/image/react/components/Image.js +71 -0
- package/es/plugins/image/react/components/LazyImage.d.ts +8 -0
- package/es/plugins/image/react/components/LazyImage.js +99 -0
- package/es/plugins/image/react/components/useSupenseImage.d.ts +2 -0
- package/es/plugins/image/react/components/useSupenseImage.js +24 -0
- package/es/plugins/image/react/index.d.ts +2 -0
- package/es/plugins/image/react/index.js +1 -0
- package/es/plugins/image/react/style.d.ts +12 -0
- package/es/plugins/image/react/style.js +17 -0
- package/es/plugins/image/react/type.d.ts +6 -0
- package/es/plugins/image/react/type.js +1 -0
- package/es/plugins/link/command/index.d.ts +6 -0
- package/es/plugins/link/command/index.js +20 -0
- package/es/plugins/link/index.d.ts +3 -0
- package/es/plugins/link/index.js +3 -0
- package/es/plugins/link/node/LinkNode.d.ts +126 -0
- package/es/plugins/link/node/LinkNode.js +721 -0
- package/es/plugins/link/plugin/index.d.ts +8 -0
- package/es/plugins/link/plugin/index.js +94 -0
- package/es/plugins/link/react/ReactLinkPlugin.d.ts +4 -0
- package/es/plugins/link/react/ReactLinkPlugin.js +168 -0
- package/es/plugins/link/react/components/LinkEdit.d.ts +7 -0
- package/es/plugins/link/react/components/LinkEdit.js +138 -0
- package/es/plugins/link/react/components/Toolbar.d.ts +7 -0
- package/es/plugins/link/react/components/Toolbar.js +63 -0
- package/es/plugins/link/react/index.d.ts +2 -0
- package/es/plugins/link/react/index.js +1 -0
- package/es/plugins/link/react/style.d.ts +5 -0
- package/es/plugins/link/react/style.js +12 -0
- package/es/plugins/link/react/type.d.ts +9 -0
- package/es/plugins/link/react/type.js +1 -0
- package/es/plugins/link/utils/index.d.ts +4 -0
- package/es/plugins/link/utils/index.js +37 -0
- package/es/plugins/list/command/index.d.ts +1 -0
- package/es/plugins/list/command/index.js +1 -0
- package/es/plugins/list/index.d.ts +3 -0
- package/es/plugins/list/index.js +3 -0
- package/es/plugins/list/plugin/index.d.ts +5 -0
- package/es/plugins/list/plugin/index.js +193 -0
- package/es/plugins/list/react/ReactListPlugin.d.ts +4 -0
- package/es/plugins/list/react/ReactListPlugin.js +29 -0
- package/es/plugins/list/react/index.d.ts +2 -0
- package/es/plugins/list/react/index.js +1 -0
- package/es/plugins/list/react/style.d.ts +1 -0
- package/es/plugins/list/react/style.js +7 -0
- package/es/plugins/list/react/type.d.ts +3 -0
- package/es/plugins/list/react/type.js +1 -0
- package/es/plugins/list/utils/index.d.ts +5 -0
- package/es/plugins/list/utils/index.js +88 -0
- package/es/plugins/markdown/data-source/markdown-data-source.d.ts +10 -0
- package/es/plugins/markdown/data-source/markdown-data-source.js +64 -0
- package/es/plugins/markdown/data-source/markdown-writer-context.d.ts +12 -0
- package/es/plugins/markdown/data-source/markdown-writer-context.js +51 -0
- package/es/plugins/markdown/index.d.ts +2 -0
- package/es/plugins/markdown/index.js +2 -0
- package/es/plugins/markdown/plugin/index.d.ts +4 -0
- package/es/plugins/markdown/plugin/index.js +122 -0
- package/es/plugins/markdown/service/shortcut.d.ts +139 -0
- package/es/plugins/markdown/service/shortcut.js +401 -0
- package/es/plugins/markdown/utils/index.d.ts +12 -0
- package/es/plugins/markdown/utils/index.js +61 -0
- package/es/plugins/mention/command/index.d.ts +6 -0
- package/es/plugins/mention/command/index.js +19 -0
- package/es/plugins/mention/index.d.ts +3 -0
- package/es/plugins/mention/index.js +3 -0
- package/es/plugins/mention/node/MentionNode.d.ts +26 -0
- package/es/plugins/mention/node/MentionNode.js +143 -0
- package/es/plugins/mention/plugin/index.d.ts +11 -0
- package/es/plugins/mention/plugin/index.js +61 -0
- package/es/plugins/mention/plugin/register.d.ts +2 -0
- package/es/plugins/mention/plugin/register.js +46 -0
- package/es/plugins/mention/react/ReactMentionPlugin.d.ts +4 -0
- package/es/plugins/mention/react/ReactMentionPlugin.js +42 -0
- package/es/plugins/mention/react/components/Mention.d.ts +9 -0
- package/es/plugins/mention/react/components/Mention.js +39 -0
- package/es/plugins/mention/react/index.d.ts +2 -0
- package/es/plugins/mention/react/index.js +1 -0
- package/es/plugins/mention/react/style.d.ts +3 -0
- package/es/plugins/mention/react/style.js +11 -0
- package/es/plugins/mention/react/type.d.ts +8 -0
- package/es/plugins/mention/react/type.js +1 -0
- package/es/plugins/slash/index.d.ts +3 -0
- package/es/plugins/slash/index.js +3 -0
- package/es/plugins/slash/plugin/index.d.ts +23 -0
- package/es/plugins/slash/plugin/index.js +132 -0
- package/es/plugins/slash/react/ReactSlashOption.d.ts +4 -0
- package/es/plugins/slash/react/ReactSlashOption.js +7 -0
- package/es/plugins/slash/react/ReactSlashPlugin.d.ts +4 -0
- package/es/plugins/slash/react/ReactSlashPlugin.js +228 -0
- package/es/plugins/slash/react/components/SlashMenu.d.ts +8 -0
- package/es/plugins/slash/react/components/SlashMenu.js +72 -0
- package/es/plugins/slash/react/index.d.ts +4 -0
- package/es/plugins/slash/react/index.js +3 -0
- package/es/plugins/slash/react/style.d.ts +1 -0
- package/es/plugins/slash/react/style.js +9 -0
- package/es/plugins/slash/react/type.d.ts +82 -0
- package/es/plugins/slash/react/type.js +1 -0
- package/es/plugins/slash/react/utils.d.ts +5 -0
- package/es/plugins/slash/react/utils.js +20 -0
- package/es/plugins/slash/service/i-slash-service.d.ts +38 -0
- package/es/plugins/slash/service/i-slash-service.js +64 -0
- package/es/plugins/slash/utils/utils.d.ts +38 -0
- package/es/plugins/slash/utils/utils.js +192 -0
- package/es/plugins/table/command/index.d.ts +13 -0
- package/es/plugins/table/command/index.js +73 -0
- package/es/plugins/table/index.d.ts +3 -0
- package/es/plugins/table/index.js +3 -0
- package/es/plugins/table/node/index.d.ts +2 -0
- package/es/plugins/table/node/index.js +16 -0
- package/es/plugins/table/plugin/index.d.ts +5 -0
- package/es/plugins/table/plugin/index.js +85 -0
- package/es/plugins/table/react/TableActionMenu/index.d.ts +8 -0
- package/es/plugins/table/react/TableActionMenu/index.js +481 -0
- package/es/plugins/table/react/TableActionMenu/style.d.ts +1 -0
- package/es/plugins/table/react/TableActionMenu/style.js +7 -0
- package/es/plugins/table/react/TableActionMenu/utils.d.ts +9 -0
- package/es/plugins/table/react/TableActionMenu/utils.js +49 -0
- package/es/plugins/table/react/TableHoverActions/index.d.ts +7 -0
- package/es/plugins/table/react/TableHoverActions/index.js +268 -0
- package/es/plugins/table/react/TableHoverActions/style.d.ts +5 -0
- package/es/plugins/table/react/TableHoverActions/style.js +11 -0
- package/es/plugins/table/react/TableHoverActions/utils.d.ts +8 -0
- package/es/plugins/table/react/TableHoverActions/utils.js +43 -0
- package/es/plugins/table/react/TableResize/index.d.ts +10 -0
- package/es/plugins/table/react/TableResize/index.js +378 -0
- package/es/plugins/table/react/TableResize/style.d.ts +3 -0
- package/es/plugins/table/react/TableResize/style.js +10 -0
- package/es/plugins/table/react/TableResize/utils.d.ts +4 -0
- package/es/plugins/table/react/TableResize/utils.js +40 -0
- package/es/plugins/table/react/hooks.d.ts +1 -0
- package/es/plugins/table/react/hooks.js +22 -0
- package/es/plugins/table/react/index.d.ts +3 -0
- package/es/plugins/table/react/index.js +77 -0
- package/es/plugins/table/react/style.d.ts +1 -0
- package/es/plugins/table/react/style.js +8 -0
- package/es/plugins/table/react/type.d.ts +5 -0
- package/es/plugins/table/react/type.js +1 -0
- package/es/plugins/table/utils/index.d.ts +8 -0
- package/es/plugins/table/utils/index.js +83 -0
- package/es/plugins/upload/index.d.ts +3 -0
- package/es/plugins/upload/index.js +3 -0
- package/es/plugins/upload/plugin/index.d.ts +4 -0
- package/es/plugins/upload/plugin/index.js +82 -0
- package/es/plugins/upload/service/i-upload-service.d.ts +15 -0
- package/es/plugins/upload/service/i-upload-service.js +115 -0
- package/es/plugins/upload/utils/index.d.ts +1 -0
- package/es/plugins/upload/utils/index.js +20 -0
- package/es/react/ChatInput/ChatInput.d.ts +4 -0
- package/es/react/ChatInput/ChatInput.js +41 -0
- package/es/react/ChatInput/index.d.ts +2 -0
- package/es/react/ChatInput/index.js +2 -0
- package/es/react/ChatInput/style.d.ts +4 -0
- package/es/react/ChatInput/style.js +11 -0
- package/es/react/ChatInput/type.d.ts +10 -0
- package/es/react/ChatInput/type.js +1 -0
- package/es/react/ChatInputActionBar/ChatInputActionBar.d.ts +4 -0
- package/es/react/ChatInputActionBar/ChatInputActionBar.js +27 -0
- package/es/react/ChatInputActionBar/index.d.ts +2 -0
- package/es/react/ChatInputActionBar/index.js +2 -0
- package/es/react/ChatInputActionBar/style.d.ts +3 -0
- package/es/react/ChatInputActionBar/style.js +9 -0
- package/es/react/ChatInputActionBar/type.d.ts +7 -0
- package/es/react/ChatInputActionBar/type.js +1 -0
- package/es/react/ChatInputActions/ChatInputActions.d.ts +4 -0
- package/es/react/ChatInputActions/ChatInputActions.js +187 -0
- package/es/react/ChatInputActions/components/ChatInputActionsCollapse.d.ts +4 -0
- package/es/react/ChatInputActions/components/ChatInputActionsCollapse.js +97 -0
- package/es/react/ChatInputActions/index.d.ts +2 -0
- package/es/react/ChatInputActions/index.js +1 -0
- package/es/react/ChatInputActions/style.d.ts +4 -0
- package/es/react/ChatInputActions/style.js +10 -0
- package/es/react/ChatInputActions/type.d.ts +38 -0
- package/es/react/ChatInputActions/type.js +1 -0
- package/es/react/CodeLanguageSelect/CodeLanguageSelect.d.ts +4 -0
- package/es/react/CodeLanguageSelect/CodeLanguageSelect.js +96 -0
- package/es/react/CodeLanguageSelect/index.d.ts +2 -0
- package/es/react/CodeLanguageSelect/index.js +2 -0
- package/es/react/CodeLanguageSelect/style.d.ts +3 -0
- package/es/react/CodeLanguageSelect/style.js +9 -0
- package/es/react/CodeLanguageSelect/type.d.ts +2 -0
- package/es/react/CodeLanguageSelect/type.js +1 -0
- package/es/react/Editor/Editor.d.ts +4 -0
- package/es/react/Editor/Editor.js +78 -0
- package/es/react/Editor/index.d.ts +14 -0
- package/es/react/Editor/index.js +10 -0
- package/es/react/Editor/type.d.ts +24 -0
- package/es/react/Editor/type.js +1 -0
- package/es/react/Editor/useEditor.d.ts +3 -0
- package/es/react/Editor/useEditor.js +4 -0
- package/es/react/Editor/utils.d.ts +2 -0
- package/es/react/Editor/utils.js +3 -0
- package/es/react/EditorProvider/index.d.ts +20 -0
- package/es/react/EditorProvider/index.js +25 -0
- package/es/react/SendButton/SendButton.d.ts +4 -0
- package/es/react/SendButton/SendButton.js +77 -0
- package/es/react/SendButton/components/SendIcon.d.ts +6 -0
- package/es/react/SendButton/components/SendIcon.js +32 -0
- package/es/react/SendButton/components/StopIcon.d.ts +6 -0
- package/es/react/SendButton/components/StopIcon.js +61 -0
- package/es/react/SendButton/index.d.ts +2 -0
- package/es/react/SendButton/index.js +2 -0
- package/es/react/SendButton/style.d.ts +6 -0
- package/es/react/SendButton/style.js +15 -0
- package/es/react/SendButton/type.d.ts +6 -0
- package/es/react/SendButton/type.js +1 -0
- package/es/react/SlashMenu/SlashMenu.d.ts +4 -0
- package/es/react/SlashMenu/SlashMenu.js +68 -0
- package/es/react/SlashMenu/index.d.ts +2 -0
- package/es/react/SlashMenu/index.js +2 -0
- package/es/react/SlashMenu/style.d.ts +4 -0
- package/es/react/SlashMenu/style.js +11 -0
- package/es/react/SlashMenu/type.d.ts +8 -0
- package/es/react/SlashMenu/type.js +1 -0
- package/es/react/index.d.ts +8 -0
- package/es/react/index.js +8 -0
- package/es/types/global.d.ts +20 -0
- package/es/types/index.d.ts +2 -0
- package/es/types/index.js +2 -0
- package/es/types/kernel.d.ts +180 -0
- package/es/types/kernel.js +1 -0
- package/es/types/locale.d.ts +10 -0
- package/es/types/locale.js +1 -0
- package/package.json +66 -0
- package/patches/lexical+0.33.1.patch +88 -0
- package/react.d.ts +1 -0
- package/react.js +1 -0
- package/scripts/patch-lexical-package-json.js +20 -0
|
@@ -0,0 +1,268 @@
|
|
|
1
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
3
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
4
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
5
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
6
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
7
|
+
function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
|
|
8
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
9
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
10
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
11
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
12
|
+
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
13
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
14
|
+
import { $getTableAndElementByKey, $getTableColumnIndexFromTableCellNode, $getTableRowIndexFromTableCellNode, $insertTableColumnAtSelection, $insertTableRowAtSelection, $isTableCellNode, $isTableNode, TableNode, getTableElement } from '@lexical/table';
|
|
15
|
+
import { $findMatchingParent, mergeRegister } from '@lexical/utils';
|
|
16
|
+
import { ActionIcon } from '@lobehub/ui';
|
|
17
|
+
import { $getNearestNodeFromDOMNode } from 'lexical';
|
|
18
|
+
import { PlusIcon } from 'lucide-react';
|
|
19
|
+
import { memo, useEffect, useMemo, useRef, useState } from 'react';
|
|
20
|
+
import { createPortal } from 'react-dom';
|
|
21
|
+
import { useLexicalComposerContext } from "../../../../editor-kernel/react";
|
|
22
|
+
import { BUTTON_WIDTH_PX, useStyles } from "./style";
|
|
23
|
+
import { getMouseInfo, useDebounce } from "./utils";
|
|
24
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
25
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
26
|
+
var TableHoverActionsContainer = /*#__PURE__*/memo(function (_ref) {
|
|
27
|
+
var anchorElem = _ref.anchorElem,
|
|
28
|
+
editor = _ref.editor;
|
|
29
|
+
var _useLexicalComposerCo = useLexicalComposerContext(),
|
|
30
|
+
_useLexicalComposerCo2 = _slicedToArray(_useLexicalComposerCo, 1),
|
|
31
|
+
iEditor = _useLexicalComposerCo2[0];
|
|
32
|
+
var _useState = useState(false),
|
|
33
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
34
|
+
isShownRow = _useState2[0],
|
|
35
|
+
setShownRow = _useState2[1];
|
|
36
|
+
var _useState3 = useState(false),
|
|
37
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
38
|
+
isShownColumn = _useState4[0],
|
|
39
|
+
setShownColumn = _useState4[1];
|
|
40
|
+
var _useState5 = useState(false),
|
|
41
|
+
_useState6 = _slicedToArray(_useState5, 2),
|
|
42
|
+
shouldListenMouseMove = _useState6[0],
|
|
43
|
+
setShouldListenMouseMove = _useState6[1];
|
|
44
|
+
var _useState7 = useState({}),
|
|
45
|
+
_useState8 = _slicedToArray(_useState7, 2),
|
|
46
|
+
position = _useState8[0],
|
|
47
|
+
setPosition = _useState8[1];
|
|
48
|
+
var tableSetRef = useRef(new Set());
|
|
49
|
+
var tableCellDOMNodeRef = useRef(null);
|
|
50
|
+
var _useStyles = useStyles(),
|
|
51
|
+
cx = _useStyles.cx,
|
|
52
|
+
styles = _useStyles.styles;
|
|
53
|
+
var debouncedOnMouseMove = useDebounce(function (event) {
|
|
54
|
+
var _getMouseInfo = getMouseInfo(event, iEditor),
|
|
55
|
+
isOutside = _getMouseInfo.isOutside,
|
|
56
|
+
tableDOMNode = _getMouseInfo.tableDOMNode;
|
|
57
|
+
if (isOutside) {
|
|
58
|
+
setShownRow(false);
|
|
59
|
+
setShownColumn(false);
|
|
60
|
+
return;
|
|
61
|
+
}
|
|
62
|
+
if (!tableDOMNode) {
|
|
63
|
+
return;
|
|
64
|
+
}
|
|
65
|
+
tableCellDOMNodeRef.current = tableDOMNode;
|
|
66
|
+
var hoveredRowNode = null;
|
|
67
|
+
var hoveredColumnNode = null;
|
|
68
|
+
var tableDOMElement = null;
|
|
69
|
+
editor.getEditorState().read(function () {
|
|
70
|
+
var maybeTableCell = $getNearestNodeFromDOMNode(tableDOMNode);
|
|
71
|
+
if ($isTableCellNode(maybeTableCell)) {
|
|
72
|
+
var table = $findMatchingParent(maybeTableCell, function (node) {
|
|
73
|
+
return $isTableNode(node);
|
|
74
|
+
});
|
|
75
|
+
if (!$isTableNode(table)) {
|
|
76
|
+
return;
|
|
77
|
+
}
|
|
78
|
+
tableDOMElement = getTableElement(table, editor.getElementByKey(table.getKey()));
|
|
79
|
+
if (tableDOMElement) {
|
|
80
|
+
var _getChildAtIndex;
|
|
81
|
+
var rowCount = table.getChildrenSize();
|
|
82
|
+
var colCount = (_getChildAtIndex = table.getChildAtIndex(0)) === null || _getChildAtIndex === void 0 ? void 0 : _getChildAtIndex.getChildrenSize();
|
|
83
|
+
var rowIndex = $getTableRowIndexFromTableCellNode(maybeTableCell);
|
|
84
|
+
var colIndex = $getTableColumnIndexFromTableCellNode(maybeTableCell);
|
|
85
|
+
if (rowIndex === rowCount - 1) {
|
|
86
|
+
hoveredRowNode = maybeTableCell;
|
|
87
|
+
} else if (colIndex === colCount - 1) {
|
|
88
|
+
hoveredColumnNode = maybeTableCell;
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
}, {
|
|
93
|
+
editor: editor
|
|
94
|
+
});
|
|
95
|
+
if (tableDOMElement) {
|
|
96
|
+
var _getBoundingClientRec = tableDOMElement.getBoundingClientRect(),
|
|
97
|
+
tableElemWidth = _getBoundingClientRec.width,
|
|
98
|
+
tableElemY = _getBoundingClientRec.y,
|
|
99
|
+
tableElemRight = _getBoundingClientRec.right,
|
|
100
|
+
tableElemLeft = _getBoundingClientRec.left,
|
|
101
|
+
tableElemBottom = _getBoundingClientRec.bottom,
|
|
102
|
+
tableElemHeight = _getBoundingClientRec.height;
|
|
103
|
+
|
|
104
|
+
// Adjust for using the scrollable table container
|
|
105
|
+
var parentElement = tableDOMElement.parentElement;
|
|
106
|
+
var tableHasScroll = false;
|
|
107
|
+
if (parentElement && parentElement.classList.contains('PlaygroundEditorTheme__tableScrollableWrapper')) {
|
|
108
|
+
tableHasScroll = parentElement.scrollWidth > parentElement.clientWidth;
|
|
109
|
+
}
|
|
110
|
+
var _anchorElem$getBoundi = anchorElem.getBoundingClientRect(),
|
|
111
|
+
editorElemY = _anchorElem$getBoundi.y,
|
|
112
|
+
editorElemLeft = _anchorElem$getBoundi.left;
|
|
113
|
+
if (hoveredRowNode) {
|
|
114
|
+
setShownColumn(false);
|
|
115
|
+
setShownRow(true);
|
|
116
|
+
setPosition({
|
|
117
|
+
height: BUTTON_WIDTH_PX,
|
|
118
|
+
left: tableHasScroll && parentElement ? parentElement.offsetLeft : tableElemLeft - editorElemLeft,
|
|
119
|
+
top: tableElemBottom - editorElemY + 5,
|
|
120
|
+
width: tableHasScroll && parentElement ? parentElement.offsetWidth : tableElemWidth
|
|
121
|
+
});
|
|
122
|
+
} else if (hoveredColumnNode) {
|
|
123
|
+
setShownColumn(true);
|
|
124
|
+
setShownRow(false);
|
|
125
|
+
setPosition({
|
|
126
|
+
height: tableElemHeight,
|
|
127
|
+
left: tableElemRight - editorElemLeft + 5,
|
|
128
|
+
top: tableElemY - editorElemY,
|
|
129
|
+
width: BUTTON_WIDTH_PX
|
|
130
|
+
});
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
}, 50, 250);
|
|
134
|
+
|
|
135
|
+
// Hide the buttons on any table dimensions change to prevent last row cells
|
|
136
|
+
// overlap behind the 'Add Row' button when text entry changes cell height
|
|
137
|
+
var tableResizeObserver = useMemo(function () {
|
|
138
|
+
return new ResizeObserver(function () {
|
|
139
|
+
setShownRow(false);
|
|
140
|
+
setShownColumn(false);
|
|
141
|
+
});
|
|
142
|
+
}, []);
|
|
143
|
+
useEffect(function () {
|
|
144
|
+
if (!shouldListenMouseMove) {
|
|
145
|
+
return;
|
|
146
|
+
}
|
|
147
|
+
if (typeof document !== 'undefined') {
|
|
148
|
+
document.addEventListener('mousemove', debouncedOnMouseMove);
|
|
149
|
+
}
|
|
150
|
+
return function () {
|
|
151
|
+
setShownRow(false);
|
|
152
|
+
setShownColumn(false);
|
|
153
|
+
if (typeof document !== 'undefined') {
|
|
154
|
+
document.removeEventListener('mousemove', debouncedOnMouseMove);
|
|
155
|
+
}
|
|
156
|
+
};
|
|
157
|
+
}, [shouldListenMouseMove, debouncedOnMouseMove]);
|
|
158
|
+
useEffect(function () {
|
|
159
|
+
return mergeRegister(editor.registerMutationListener(TableNode, function (mutations) {
|
|
160
|
+
editor.getEditorState().read(function () {
|
|
161
|
+
var resetObserver = false;
|
|
162
|
+
var _iterator = _createForOfIteratorHelper(mutations),
|
|
163
|
+
_step;
|
|
164
|
+
try {
|
|
165
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
166
|
+
var _step$value = _slicedToArray(_step.value, 2),
|
|
167
|
+
key = _step$value[0],
|
|
168
|
+
type = _step$value[1];
|
|
169
|
+
switch (type) {
|
|
170
|
+
case 'created':
|
|
171
|
+
{
|
|
172
|
+
tableSetRef.current.add(key);
|
|
173
|
+
resetObserver = true;
|
|
174
|
+
break;
|
|
175
|
+
}
|
|
176
|
+
case 'destroyed':
|
|
177
|
+
{
|
|
178
|
+
tableSetRef.current.delete(key);
|
|
179
|
+
resetObserver = true;
|
|
180
|
+
break;
|
|
181
|
+
}
|
|
182
|
+
default:
|
|
183
|
+
{
|
|
184
|
+
break;
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
} catch (err) {
|
|
189
|
+
_iterator.e(err);
|
|
190
|
+
} finally {
|
|
191
|
+
_iterator.f();
|
|
192
|
+
}
|
|
193
|
+
if (resetObserver) {
|
|
194
|
+
// Reset resize observers
|
|
195
|
+
tableResizeObserver.disconnect();
|
|
196
|
+
var _iterator2 = _createForOfIteratorHelper(tableSetRef.current),
|
|
197
|
+
_step2;
|
|
198
|
+
try {
|
|
199
|
+
for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
|
|
200
|
+
var tableKey = _step2.value;
|
|
201
|
+
var _$getTableAndElementB = $getTableAndElementByKey(tableKey),
|
|
202
|
+
tableElement = _$getTableAndElementB.tableElement;
|
|
203
|
+
tableResizeObserver.observe(tableElement);
|
|
204
|
+
}
|
|
205
|
+
} catch (err) {
|
|
206
|
+
_iterator2.e(err);
|
|
207
|
+
} finally {
|
|
208
|
+
_iterator2.f();
|
|
209
|
+
}
|
|
210
|
+
setShouldListenMouseMove(tableSetRef.current.size > 0);
|
|
211
|
+
}
|
|
212
|
+
}, {
|
|
213
|
+
editor: editor
|
|
214
|
+
});
|
|
215
|
+
}, {
|
|
216
|
+
skipInitialization: false
|
|
217
|
+
}));
|
|
218
|
+
}, [editor, tableResizeObserver]);
|
|
219
|
+
var insertAction = function insertAction(insertRow) {
|
|
220
|
+
editor.update(function () {
|
|
221
|
+
if (tableCellDOMNodeRef.current) {
|
|
222
|
+
var maybeTableNode = $getNearestNodeFromDOMNode(tableCellDOMNodeRef.current);
|
|
223
|
+
maybeTableNode === null || maybeTableNode === void 0 || maybeTableNode.selectEnd();
|
|
224
|
+
if (insertRow) {
|
|
225
|
+
$insertTableRowAtSelection();
|
|
226
|
+
setShownRow(false);
|
|
227
|
+
} else {
|
|
228
|
+
$insertTableColumnAtSelection();
|
|
229
|
+
setShownColumn(false);
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
});
|
|
233
|
+
};
|
|
234
|
+
return /*#__PURE__*/_jsxs("div", {
|
|
235
|
+
children: [isShownRow && /*#__PURE__*/_jsx(ActionIcon, {
|
|
236
|
+
className: cx('tableAddRows', styles.tableAddRows),
|
|
237
|
+
icon: PlusIcon,
|
|
238
|
+
onClick: function onClick() {
|
|
239
|
+
return insertAction(isShownRow);
|
|
240
|
+
},
|
|
241
|
+
size: 'small',
|
|
242
|
+
style: _objectSpread({}, position),
|
|
243
|
+
variant: 'filled'
|
|
244
|
+
}), isShownColumn && /*#__PURE__*/_jsx(ActionIcon, {
|
|
245
|
+
className: cx('tableAddColumns', styles.tableAddColumns),
|
|
246
|
+
icon: PlusIcon,
|
|
247
|
+
onClick: function onClick() {
|
|
248
|
+
return insertAction(false);
|
|
249
|
+
},
|
|
250
|
+
size: 'small',
|
|
251
|
+
style: _objectSpread({}, position),
|
|
252
|
+
variant: 'filled'
|
|
253
|
+
})]
|
|
254
|
+
});
|
|
255
|
+
});
|
|
256
|
+
export default /*#__PURE__*/memo(function (_ref2) {
|
|
257
|
+
var anchorElem = _ref2.anchorElem,
|
|
258
|
+
editor = _ref2.editor;
|
|
259
|
+
// Don't render portal on server side
|
|
260
|
+
if (typeof document === 'undefined') {
|
|
261
|
+
return null;
|
|
262
|
+
}
|
|
263
|
+
var targetElement = anchorElem || document.body;
|
|
264
|
+
return /*#__PURE__*/createPortal( /*#__PURE__*/_jsx(TableHoverActionsContainer, {
|
|
265
|
+
anchorElem: targetElement,
|
|
266
|
+
editor: editor
|
|
267
|
+
}), targetElement);
|
|
268
|
+
});
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
var _templateObject, _templateObject2;
|
|
2
|
+
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
3
|
+
import { createStyles } from 'antd-style';
|
|
4
|
+
export var BUTTON_WIDTH_PX = 20;
|
|
5
|
+
export var useStyles = createStyles(function (_ref) {
|
|
6
|
+
var css = _ref.css;
|
|
7
|
+
return {
|
|
8
|
+
tableAddColumns: css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n position: absolute;\n height: 100%;\n "]))),
|
|
9
|
+
tableAddRows: css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n position: absolute;\n width: calc(100% - 25px);\n "])))
|
|
10
|
+
};
|
|
11
|
+
});
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { EditorThemeClasses } from 'lexical';
|
|
2
|
+
import type { IEditor } from "../../../../types";
|
|
3
|
+
export declare function getThemeSelector(iEditor: IEditor, name: keyof EditorThemeClasses): string;
|
|
4
|
+
export declare function getMouseInfo(event: MouseEvent, iEditor: IEditor): {
|
|
5
|
+
isOutside: boolean;
|
|
6
|
+
tableDOMNode: HTMLElement | null;
|
|
7
|
+
};
|
|
8
|
+
export declare function useDebounce<T extends (...args: never[]) => void>(fn: T, ms: number, maxWait?: number): import("lodash").DebouncedFunc<(...args: Parameters<T>) => void>;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { isHTMLElement } from 'lexical';
|
|
2
|
+
import { debounce } from 'lodash-es';
|
|
3
|
+
import { useMemo, useRef } from 'react';
|
|
4
|
+
export function getThemeSelector(iEditor, name) {
|
|
5
|
+
var _iEditor$getTheme;
|
|
6
|
+
var className = (_iEditor$getTheme = iEditor.getTheme()) === null || _iEditor$getTheme === void 0 ? void 0 : _iEditor$getTheme[name];
|
|
7
|
+
if (typeof className !== 'string') {
|
|
8
|
+
throw new Error("getThemeClass: required theme property ".concat(name, " not defined"));
|
|
9
|
+
}
|
|
10
|
+
return className.split(/\s+/g).map(function (cls) {
|
|
11
|
+
return ".".concat(cls);
|
|
12
|
+
}).join(',');
|
|
13
|
+
}
|
|
14
|
+
export function getMouseInfo(event, iEditor) {
|
|
15
|
+
var target = event.target;
|
|
16
|
+
var tableCellClass = getThemeSelector(iEditor, 'tableCell');
|
|
17
|
+
if (isHTMLElement(target)) {
|
|
18
|
+
var tableDOMNode = target.closest("td".concat(tableCellClass, ", th").concat(tableCellClass));
|
|
19
|
+
var isOutside = !(tableDOMNode || target.closest("div.tableAddRows") || target.closest("div.tableAddColumns") || target.closest('div.TableCellResizer__resizer'));
|
|
20
|
+
return {
|
|
21
|
+
isOutside: isOutside,
|
|
22
|
+
tableDOMNode: tableDOMNode
|
|
23
|
+
};
|
|
24
|
+
} else {
|
|
25
|
+
return {
|
|
26
|
+
isOutside: true,
|
|
27
|
+
tableDOMNode: null
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
export function useDebounce(fn, ms, maxWait) {
|
|
32
|
+
var funcRef = useRef(null);
|
|
33
|
+
funcRef.current = fn;
|
|
34
|
+
return useMemo(function () {
|
|
35
|
+
return debounce(function () {
|
|
36
|
+
if (funcRef.current) {
|
|
37
|
+
funcRef.current.apply(funcRef, arguments);
|
|
38
|
+
}
|
|
39
|
+
}, ms, {
|
|
40
|
+
maxWait: maxWait
|
|
41
|
+
});
|
|
42
|
+
}, [ms, maxWait]);
|
|
43
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import EventEmitter from 'eventemitter3';
|
|
3
|
+
import { LexicalEditor } from 'lexical';
|
|
4
|
+
export interface ReactTableResizeHandleProps {
|
|
5
|
+
editor: LexicalEditor;
|
|
6
|
+
eventEmitter: EventEmitter;
|
|
7
|
+
}
|
|
8
|
+
export declare const TableCellResize: import("react").NamedExoticComponent<ReactTableResizeHandleProps>;
|
|
9
|
+
declare const _default: import("react").NamedExoticComponent<ReactTableResizeHandleProps>;
|
|
10
|
+
export default _default;
|