@blocklet/editor-lite 2.6.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 +13 -0
- package/README.md +33 -0
- package/lib/blocklet-editor-viewer.d.ts +4 -0
- package/lib/blocklet-editor-viewer.js +12 -0
- package/lib/blocklet-editor.d.ts +2 -0
- package/lib/blocklet-editor.js +12 -0
- package/lib/components/Loading.d.ts +4 -0
- package/lib/components/Loading.js +13 -0
- package/lib/components/SelectionPopper.d.ts +14 -0
- package/lib/components/SelectionPopper.js +73 -0
- package/lib/components/animateText.d.ts +3 -0
- package/lib/components/animateText.js +29 -0
- package/lib/components/createPortal.d.ts +2 -0
- package/lib/components/createPortal.js +16 -0
- package/lib/config.d.ts +37 -0
- package/lib/config.js +12 -0
- package/lib/ext/AIPlugin/AIIcon.d.ts +5 -0
- package/lib/ext/AIPlugin/AIIcon.js +7 -0
- package/lib/ext/AIPlugin/Arrow.d.ts +1 -0
- package/lib/ext/AIPlugin/Arrow.js +5 -0
- package/lib/ext/AIPlugin/TextGeneration.d.ts +6 -0
- package/lib/ext/AIPlugin/TextGeneration.js +131 -0
- package/lib/ext/AIPlugin/Writing.d.ts +1 -0
- package/lib/ext/AIPlugin/Writing.js +7 -0
- package/lib/ext/AIPlugin/index.d.ts +9 -0
- package/lib/ext/AIPlugin/index.js +180 -0
- package/lib/ext/AIPlugin/utils.d.ts +6 -0
- package/lib/ext/AIPlugin/utils.js +44 -0
- package/lib/ext/AITranslationPlugin/index.d.ts +9 -0
- package/lib/ext/AITranslationPlugin/index.js +124 -0
- package/lib/ext/AITranslationPlugin/selection.d.ts +3 -0
- package/lib/ext/AITranslationPlugin/selection.js +45 -0
- package/lib/ext/AITranslationPlugin/translation.d.ts +3 -0
- package/lib/ext/AITranslationPlugin/translation.js +67 -0
- package/lib/ext/AITranslationPlugin/types.d.ts +49 -0
- package/lib/ext/AITranslationPlugin/types.js +1 -0
- package/lib/ext/AITranslationPlugin/utils.d.ts +46 -0
- package/lib/ext/AITranslationPlugin/utils.js +343 -0
- package/lib/ext/Aide/Aide.d.ts +4 -0
- package/lib/ext/Aide/Aide.js +30 -0
- package/lib/ext/Aide/Delayed.d.ts +7 -0
- package/lib/ext/Aide/Delayed.js +12 -0
- package/lib/ext/Aide/Input.d.ts +6 -0
- package/lib/ext/Aide/Input.js +49 -0
- package/lib/ext/Aide/Menu.d.ts +4 -0
- package/lib/ext/Aide/Menu.js +29 -0
- package/lib/ext/Aide/Output.d.ts +4 -0
- package/lib/ext/Aide/Output.js +14 -0
- package/lib/ext/Aide/Templates.d.ts +4 -0
- package/lib/ext/Aide/Templates.js +34 -0
- package/lib/ext/Aide/builtin-templates.d.ts +3 -0
- package/lib/ext/Aide/builtin-templates.js +48 -0
- package/lib/ext/Aide/context.d.ts +47 -0
- package/lib/ext/Aide/context.js +114 -0
- package/lib/ext/Aide/external-templates/Breadcrumb.d.ts +10 -0
- package/lib/ext/Aide/external-templates/Breadcrumb.js +11 -0
- package/lib/ext/Aide/external-templates/Output.d.ts +8 -0
- package/lib/ext/Aide/external-templates/Output.js +22 -0
- package/lib/ext/Aide/external-templates/Search.d.ts +6 -0
- package/lib/ext/Aide/external-templates/Search.js +14 -0
- package/lib/ext/Aide/external-templates/Tags.d.ts +4 -0
- package/lib/ext/Aide/external-templates/Tags.js +44 -0
- package/lib/ext/Aide/external-templates/Template.d.ts +7 -0
- package/lib/ext/Aide/external-templates/Template.js +110 -0
- package/lib/ext/Aide/external-templates/Templates.d.ts +6 -0
- package/lib/ext/Aide/external-templates/Templates.js +61 -0
- package/lib/ext/Aide/external-templates/index.d.ts +4 -0
- package/lib/ext/Aide/external-templates/index.js +83 -0
- package/lib/ext/Aide/external-templates/parameter-field.d.ts +6 -0
- package/lib/ext/Aide/external-templates/parameter-field.js +92 -0
- package/lib/ext/Aide/hooks.d.ts +7 -0
- package/lib/ext/Aide/hooks.js +14 -0
- package/lib/ext/Aide/index.d.ts +2 -0
- package/lib/ext/Aide/index.js +2 -0
- package/lib/ext/Aide/types.d.ts +84 -0
- package/lib/ext/Aide/types.js +25 -0
- package/lib/ext/Aide/withAiAvailable.d.ts +5 -0
- package/lib/ext/Aide/withAiAvailable.js +11 -0
- package/lib/ext/Alert/AlertComponent.d.ts +10 -0
- package/lib/ext/Alert/AlertComponent.js +38 -0
- package/lib/ext/Alert/AlertNode.d.ts +28 -0
- package/lib/ext/Alert/AlertNode.js +105 -0
- package/lib/ext/Alert/AlertPlugin.d.ts +11 -0
- package/lib/ext/Alert/AlertPlugin.js +41 -0
- package/lib/ext/BilibiliPlugin/BilibiliNode.d.ts +31 -0
- package/lib/ext/BilibiliPlugin/BilibiliNode.js +95 -0
- package/lib/ext/BilibiliPlugin/BilibiliVideo.d.ts +6 -0
- package/lib/ext/BilibiliPlugin/BilibiliVideo.js +24 -0
- package/lib/ext/BilibiliPlugin/config.d.ts +2 -0
- package/lib/ext/BilibiliPlugin/config.js +40 -0
- package/lib/ext/BilibiliPlugin/index.d.ts +5 -0
- package/lib/ext/BilibiliPlugin/index.js +20 -0
- package/lib/ext/BlockletEmbedPlugin/BlockletEmbed.d.ts +7 -0
- package/lib/ext/BlockletEmbedPlugin/BlockletEmbed.js +51 -0
- package/lib/ext/BlockletEmbedPlugin/BlockletEmbedNode.d.ts +30 -0
- package/lib/ext/BlockletEmbedPlugin/BlockletEmbedNode.js +96 -0
- package/lib/ext/BlockletEmbedPlugin/index.d.ts +12 -0
- package/lib/ext/BlockletEmbedPlugin/index.js +76 -0
- package/lib/ext/BlurTextPlugin.d.ts +1 -0
- package/lib/ext/BlurTextPlugin.js +40 -0
- package/lib/ext/BookmarkPlugin/Bookmark.d.ts +7 -0
- package/lib/ext/BookmarkPlugin/Bookmark.js +175 -0
- package/lib/ext/BookmarkPlugin/BookmarkNode.d.ts +35 -0
- package/lib/ext/BookmarkPlugin/BookmarkNode.js +110 -0
- package/lib/ext/BookmarkPlugin/index.d.ts +11 -0
- package/lib/ext/BookmarkPlugin/index.js +45 -0
- package/lib/ext/BusyPlugin.d.ts +9 -0
- package/lib/ext/BusyPlugin.js +17 -0
- package/lib/ext/CharacterCountPlugin/index.d.ts +10 -0
- package/lib/ext/CharacterCountPlugin/index.js +39 -0
- package/lib/ext/CharacterCountPlugin/useCharacterCount.d.ts +11 -0
- package/lib/ext/CharacterCountPlugin/useCharacterCount.js +49 -0
- package/lib/ext/CharacterLimitPlugin/index.d.ts +9 -0
- package/lib/ext/CharacterLimitPlugin/index.js +49 -0
- package/lib/ext/CheckboxPlugin.d.ts +3 -0
- package/lib/ext/CheckboxPlugin.js +75 -0
- package/lib/ext/CodeCopyPlugin/CodeCopyPlugin.d.ts +2 -0
- package/lib/ext/CodeCopyPlugin/CodeCopyPlugin.js +90 -0
- package/lib/ext/CodeCopyPlugin/copy.svg +1 -0
- package/lib/ext/CodeCopyPlugin/index.d.ts +1 -0
- package/lib/ext/CodeCopyPlugin/index.js +1 -0
- package/lib/ext/CodeCopyPlugin/style.css +12 -0
- package/lib/ext/ContentLocale.d.ts +7 -0
- package/lib/ext/ContentLocale.js +15 -0
- package/lib/ext/CustomOnChangePlugin/index.d.ts +5 -0
- package/lib/ext/CustomOnChangePlugin/index.js +17 -0
- package/lib/ext/CustomOnChangePlugin/styles.css +14 -0
- package/lib/ext/CustomOnChangePlugin/utils.d.ts +30 -0
- package/lib/ext/CustomOnChangePlugin/utils.js +148 -0
- package/lib/ext/EditorHolderPlugin/EditorHolderContext.d.ts +13 -0
- package/lib/ext/EditorHolderPlugin/EditorHolderContext.js +15 -0
- package/lib/ext/EditorHolderPlugin/EditorHolderPlugin.d.ts +1 -0
- package/lib/ext/EditorHolderPlugin/EditorHolderPlugin.js +11 -0
- package/lib/ext/EditorHolderPlugin/index.d.ts +2 -0
- package/lib/ext/EditorHolderPlugin/index.js +2 -0
- package/lib/ext/EditorReadyPlugin.d.ts +3 -0
- package/lib/ext/EditorReadyPlugin.js +15 -0
- package/lib/ext/FilePlugin/FileNode.d.ts +44 -0
- package/lib/ext/FilePlugin/FileNode.js +195 -0
- package/lib/ext/FilePlugin/FilePlugin.d.ts +7 -0
- package/lib/ext/FilePlugin/FilePlugin.js +27 -0
- package/lib/ext/FilePlugin/index.d.ts +2 -0
- package/lib/ext/FilePlugin/index.js +2 -0
- package/lib/ext/HeadingsIdPlugin.d.ts +1 -0
- package/lib/ext/HeadingsIdPlugin.js +67 -0
- package/lib/ext/ImagePathFixerPlugin.d.ts +1 -0
- package/lib/ext/ImagePathFixerPlugin.js +31 -0
- package/lib/ext/InlineTranslationPlugin/EditorTranslator.d.ts +42 -0
- package/lib/ext/InlineTranslationPlugin/EditorTranslator.js +199 -0
- package/lib/ext/InlineTranslationPlugin/InlineTranslationPlugin.d.ts +12 -0
- package/lib/ext/InlineTranslationPlugin/InlineTranslationPlugin.js +232 -0
- package/lib/ext/InlineTranslationPlugin/TranslationNode.d.ts +23 -0
- package/lib/ext/InlineTranslationPlugin/TranslationNode.js +49 -0
- package/lib/ext/InlineTranslationPlugin/index.d.ts +4 -0
- package/lib/ext/InlineTranslationPlugin/index.js +4 -0
- package/lib/ext/InlineTranslationPlugin/store.d.ts +50 -0
- package/lib/ext/InlineTranslationPlugin/store.js +94 -0
- package/lib/ext/InlineTranslationPlugin/types.d.ts +1 -0
- package/lib/ext/InlineTranslationPlugin/types.js +1 -0
- package/lib/ext/LexicalEditorRefPlugin.d.ts +14 -0
- package/lib/ext/LexicalEditorRefPlugin.js +26 -0
- package/lib/ext/OnContentChangePlugin.d.ts +14 -0
- package/lib/ext/OnContentChangePlugin.js +35 -0
- package/lib/ext/PasteSlackImagePlugin/index.d.ts +2 -0
- package/lib/ext/PasteSlackImagePlugin/index.js +22 -0
- package/lib/ext/PostLinkEmbedPlugin/PostLinkNode.d.ts +32 -0
- package/lib/ext/PostLinkEmbedPlugin/PostLinkNode.js +140 -0
- package/lib/ext/PostLinkEmbedPlugin/fixInvalidPostLinkNodes.d.ts +1 -0
- package/lib/ext/PostLinkEmbedPlugin/fixInvalidPostLinkNodes.js +15 -0
- package/lib/ext/PostLinkEmbedPlugin/index.d.ts +21 -0
- package/lib/ext/PostLinkEmbedPlugin/index.js +148 -0
- package/lib/ext/RemoveListPlugin.d.ts +1 -0
- package/lib/ext/RemoveListPlugin.js +63 -0
- package/lib/ext/SafeAreaPlugin.d.ts +12 -0
- package/lib/ext/SafeAreaPlugin.js +56 -0
- package/lib/ext/SelectBlockPlugin.d.ts +1 -0
- package/lib/ext/SelectBlockPlugin.js +95 -0
- package/lib/ext/ShortcutPlugin/CtrlsShortcutPlugin.d.ts +6 -0
- package/lib/ext/ShortcutPlugin/CtrlsShortcutPlugin.js +17 -0
- package/lib/ext/ShortcutPlugin/index.d.ts +1 -0
- package/lib/ext/ShortcutPlugin/index.js +1 -0
- package/lib/ext/TemplatePlugin.d.ts +8 -0
- package/lib/ext/TemplatePlugin.js +170 -0
- package/lib/ext/VideoPathFixerPlugin.d.ts +1 -0
- package/lib/ext/VideoPathFixerPlugin.js +31 -0
- package/lib/ext/VideoPlugin/VideoComponent.d.ts +5 -0
- package/lib/ext/VideoPlugin/VideoComponent.js +5 -0
- package/lib/ext/VideoPlugin/VideoNode.d.ts +37 -0
- package/lib/ext/VideoPlugin/VideoNode.js +97 -0
- package/lib/ext/VideoPlugin/VideoPlugin.d.ts +7 -0
- package/lib/ext/VideoPlugin/VideoPlugin.js +26 -0
- package/lib/ext/VideoPlugin/index.d.ts +2 -0
- package/lib/ext/VideoPlugin/index.js +2 -0
- package/lib/ext/common.d.ts +15 -0
- package/lib/ext/common.js +62 -0
- package/lib/ext/nodes/GithubComp.d.ts +3 -0
- package/lib/ext/nodes/GithubComp.js +20 -0
- package/lib/ext/nodes/GithubNode.d.ts +28 -0
- package/lib/ext/nodes/GithubNode.js +94 -0
- package/lib/ext/nodes/util.d.ts +5 -0
- package/lib/ext/nodes/util.js +1 -0
- package/lib/ext/translation/translation-utils.d.ts +16 -0
- package/lib/ext/translation/translation-utils.js +63 -0
- package/lib/ext/utils.d.ts +21 -0
- package/lib/ext/utils.js +88 -0
- package/lib/global.d.ts +1 -0
- package/lib/index.d.ts +4 -0
- package/lib/index.js +5 -0
- package/lib/lexical-utils/index.d.ts +46 -0
- package/lib/lexical-utils/index.js +243 -0
- package/lib/libs/sort-array-by-key.d.ts +4 -0
- package/lib/libs/sort-array-by-key.js +68 -0
- package/lib/libs/utm.d.ts +9 -0
- package/lib/libs/utm.js +43 -0
- package/lib/main/appSettings.d.ts +11 -0
- package/lib/main/appSettings.js +20 -0
- package/lib/main/context/SharedAutocompleteContext.d.ts +16 -0
- package/lib/main/context/SharedAutocompleteContext.js +35 -0
- package/lib/main/context/SharedHistoryContext.d.ts +17 -0
- package/lib/main/context/SharedHistoryContext.js +11 -0
- package/lib/main/editor-root.d.ts +2 -0
- package/lib/main/editor-root.js +46 -0
- package/lib/main/editor.d.ts +21 -0
- package/lib/main/editor.js +99 -0
- package/lib/main/hooks/hooks.d.ts +15 -0
- package/lib/main/hooks/hooks.js +49 -0
- package/lib/main/hooks/medium-zoom.d.ts +9 -0
- package/lib/main/hooks/medium-zoom.js +34 -0
- package/lib/main/hooks/use-mobile.d.ts +4 -0
- package/lib/main/hooks/use-mobile.js +6 -0
- package/lib/main/hooks/useBeforeUnload.d.ts +1 -0
- package/lib/main/hooks/useBeforeUnload.js +15 -0
- package/lib/main/hooks/useHasNodes.d.ts +1 -0
- package/lib/main/hooks/useHasNodes.js +8 -0
- package/lib/main/hooks/useIsFocused.d.ts +1 -0
- package/lib/main/hooks/useIsFocused.js +20 -0
- package/lib/main/hooks/useModal.d.ts +12 -0
- package/lib/main/hooks/useModal.js +33 -0
- package/lib/main/hooks/useReport.d.ts +8 -0
- package/lib/main/hooks/useReport.js +48 -0
- package/lib/main/hooks/useResponsiveTable.d.ts +5 -0
- package/lib/main/hooks/useResponsiveTable.js +31 -0
- package/lib/main/hooks/useTranslationListener.d.ts +4 -0
- package/lib/main/hooks/useTranslationListener.js +94 -0
- package/lib/main/icons.d.ts +3 -0
- package/lib/main/icons.js +25 -0
- package/lib/main/images/emoji/1F600.png +0 -0
- package/lib/main/images/emoji/1F641.png +0 -0
- package/lib/main/images/emoji/1F642.png +0 -0
- package/lib/main/images/emoji/2764.png +0 -0
- package/lib/main/images/excalidraw.svg +3 -0
- package/lib/main/images/icons/arrow-clockwise.svg +1 -0
- package/lib/main/images/icons/arrow-counterclockwise.svg +1 -0
- package/lib/main/images/icons/bg-color.svg +1 -0
- package/lib/main/images/icons/camera.svg +1 -0
- package/lib/main/images/icons/caret-right-fill.svg +1 -0
- package/lib/main/images/icons/chat-left-text.svg +1 -0
- package/lib/main/images/icons/chat-right-dots.svg +1 -0
- package/lib/main/images/icons/chat-right-text.svg +1 -0
- package/lib/main/images/icons/chat-right.svg +1 -0
- package/lib/main/images/icons/chat-square-quote.svg +1 -0
- package/lib/main/images/icons/chevron-down.svg +1 -0
- package/lib/main/images/icons/clipboard.svg +1 -0
- package/lib/main/images/icons/close.svg +1 -0
- package/lib/main/images/icons/code.svg +1 -0
- package/lib/main/images/icons/comments.svg +1 -0
- package/lib/main/images/icons/copy.svg +1 -0
- package/lib/main/images/icons/diagram-2.svg +1 -0
- package/lib/main/images/icons/download.svg +1 -0
- package/lib/main/images/icons/draggable-block-menu.svg +1 -0
- package/lib/main/images/icons/dropdown-more.svg +1 -0
- package/lib/main/images/icons/figma.svg +1 -0
- package/lib/main/images/icons/file-image.svg +1 -0
- package/lib/main/images/icons/filetype-gif.svg +1 -0
- package/lib/main/images/icons/font-color.svg +1 -0
- package/lib/main/images/icons/font-family.svg +1 -0
- package/lib/main/images/icons/gear.svg +1 -0
- package/lib/main/images/icons/horizontal-rule.svg +1 -0
- package/lib/main/images/icons/indent.svg +1 -0
- package/lib/main/images/icons/journal-code.svg +1 -0
- package/lib/main/images/icons/journal-text.svg +1 -0
- package/lib/main/images/icons/justify.svg +1 -0
- package/lib/main/images/icons/link.svg +1 -0
- package/lib/main/images/icons/list-ol.svg +1 -0
- package/lib/main/images/icons/list-ul.svg +1 -0
- package/lib/main/images/icons/lock-fill.svg +1 -0
- package/lib/main/images/icons/lock.svg +1 -0
- package/lib/main/images/icons/markdown.svg +1 -0
- package/lib/main/images/icons/mic.svg +1 -0
- package/lib/main/images/icons/outdent.svg +1 -0
- package/lib/main/images/icons/paint-bucket.svg +1 -0
- package/lib/main/images/icons/palette.svg +1 -0
- package/lib/main/images/icons/pencil-fill.svg +1 -0
- package/lib/main/images/icons/plug-fill.svg +1 -0
- package/lib/main/images/icons/plug.svg +1 -0
- package/lib/main/images/icons/plus-slash-minus.svg +1 -0
- package/lib/main/images/icons/plus.svg +1 -0
- package/lib/main/images/icons/prettier-error.svg +1 -0
- package/lib/main/images/icons/prettier.svg +1 -0
- package/lib/main/images/icons/send.svg +1 -0
- package/lib/main/images/icons/square-check.svg +1 -0
- package/lib/main/images/icons/sticky.svg +1 -0
- package/lib/main/images/icons/success.svg +1 -0
- package/lib/main/images/icons/table.svg +1 -0
- package/lib/main/images/icons/text-center.svg +1 -0
- package/lib/main/images/icons/text-left.svg +1 -0
- package/lib/main/images/icons/text-paragraph.svg +1 -0
- package/lib/main/images/icons/text-right.svg +1 -0
- package/lib/main/images/icons/trash.svg +1 -0
- package/lib/main/images/icons/trash3.svg +1 -0
- package/lib/main/images/icons/tweet.svg +1 -0
- package/lib/main/images/icons/type-bold.svg +1 -0
- package/lib/main/images/icons/type-h1.svg +1 -0
- package/lib/main/images/icons/type-h2.svg +1 -0
- package/lib/main/images/icons/type-h3.svg +1 -0
- package/lib/main/images/icons/type-h4.svg +1 -0
- package/lib/main/images/icons/type-h5.svg +1 -0
- package/lib/main/images/icons/type-h6.svg +1 -0
- package/lib/main/images/icons/type-italic.svg +1 -0
- package/lib/main/images/icons/type-strikethrough.svg +1 -0
- package/lib/main/images/icons/type-subscript.svg +1 -0
- package/lib/main/images/icons/type-superscript.svg +1 -0
- package/lib/main/images/icons/type-underline.svg +1 -0
- package/lib/main/images/icons/upload.svg +1 -0
- package/lib/main/images/icons/user.svg +1 -0
- package/lib/main/images/icons/youtube.svg +1 -0
- package/lib/main/images/landscape.jpg +0 -0
- package/lib/main/index.css +257 -0
- package/lib/main/index.d.ts +28 -0
- package/lib/main/index.js +52 -0
- package/lib/main/nodes/EmojiNode.d.ts +25 -0
- package/lib/main/nodes/EmojiNode.js +57 -0
- package/lib/main/nodes/EquationNode.d.ts +31 -0
- package/lib/main/nodes/EquationNode.js +65 -0
- package/lib/main/nodes/ExcalidrawNode/ExcalidrawComponent.d.ts +13 -0
- package/lib/main/nodes/ExcalidrawNode/ExcalidrawComponent.js +155 -0
- package/lib/main/nodes/ExcalidrawNode/ExcalidrawImage.d.ts +58 -0
- package/lib/main/nodes/ExcalidrawNode/ExcalidrawImage.js +60 -0
- package/lib/main/nodes/ExcalidrawNode/ExcalidrawModal.css +75 -0
- package/lib/main/nodes/ExcalidrawNode/ExcalidrawModal.d.ts +49 -0
- package/lib/main/nodes/ExcalidrawNode/ExcalidrawModal.js +197 -0
- package/lib/main/nodes/ExcalidrawNode/index.d.ts +30 -0
- package/lib/main/nodes/ExcalidrawNode/index.js +95 -0
- package/lib/main/nodes/ExcalidrawNode/utils.d.ts +5 -0
- package/lib/main/nodes/ExcalidrawNode/utils.js +71 -0
- package/lib/main/nodes/FigmaNode.d.ts +30 -0
- package/lib/main/nodes/FigmaNode.js +59 -0
- package/lib/main/nodes/ImageComponent.d.ts +27 -0
- package/lib/main/nodes/ImageComponent.js +432 -0
- package/lib/main/nodes/ImageNode.css +51 -0
- package/lib/main/nodes/ImageNode.d.ts +74 -0
- package/lib/main/nodes/ImageNode.js +151 -0
- package/lib/main/nodes/KeywordNode.d.ts +25 -0
- package/lib/main/nodes/KeywordNode.js +52 -0
- package/lib/main/nodes/MentionNode.d.ts +27 -0
- package/lib/main/nodes/MentionNode.js +88 -0
- package/lib/main/nodes/PlaygroundNodes.d.ts +10 -0
- package/lib/main/nodes/PlaygroundNodes.js +70 -0
- package/lib/main/nodes/TweetNode.d.ts +31 -0
- package/lib/main/nodes/TweetNode.js +126 -0
- package/lib/main/nodes/YouTubeNode.d.ts +32 -0
- package/lib/main/nodes/YouTubeNode.js +94 -0
- package/lib/main/plugins/AutoEmbedPlugin/index.d.ts +27 -0
- package/lib/main/plugins/AutoEmbedPlugin/index.js +353 -0
- package/lib/main/plugins/AutoEmbedPlugin/urlParseCache.d.ts +2 -0
- package/lib/main/plugins/AutoEmbedPlugin/urlParseCache.js +14 -0
- package/lib/main/plugins/AutoLinkPlugin/index.d.ts +9 -0
- package/lib/main/plugins/AutoLinkPlugin/index.js +39 -0
- package/lib/main/plugins/ClickableLinkPlugin/index.d.ts +8 -0
- package/lib/main/plugins/ClickableLinkPlugin/index.js +141 -0
- package/lib/main/plugins/CodeActionMenuPlugin/components/CopyButton/index.d.ts +7 -0
- package/lib/main/plugins/CodeActionMenuPlugin/components/CopyButton/index.js +44 -0
- package/lib/main/plugins/CodeActionMenuPlugin/index.css +46 -0
- package/lib/main/plugins/CodeActionMenuPlugin/index.d.ts +12 -0
- package/lib/main/plugins/CodeActionMenuPlugin/index.js +100 -0
- package/lib/main/plugins/CodeActionMenuPlugin/utils.d.ts +2 -0
- package/lib/main/plugins/CodeActionMenuPlugin/utils.js +18 -0
- package/lib/main/plugins/CodeHighlightPlugin/index.d.ts +9 -0
- package/lib/main/plugins/CodeHighlightPlugin/index.js +17 -0
- package/lib/main/plugins/CollapsiblePlugin/Collapsible.css +61 -0
- package/lib/main/plugins/CollapsiblePlugin/CollapsibleContainerNode.d.ts +30 -0
- package/lib/main/plugins/CollapsiblePlugin/CollapsibleContainerNode.js +120 -0
- package/lib/main/plugins/CollapsiblePlugin/CollapsibleContentNode.d.ts +24 -0
- package/lib/main/plugins/CollapsiblePlugin/CollapsibleContentNode.js +90 -0
- package/lib/main/plugins/CollapsiblePlugin/CollapsibleTitleNode.d.ts +24 -0
- package/lib/main/plugins/CollapsiblePlugin/CollapsibleTitleNode.js +95 -0
- package/lib/main/plugins/CollapsiblePlugin/CollapsibleUtils.d.ts +9 -0
- package/lib/main/plugins/CollapsiblePlugin/CollapsibleUtils.js +15 -0
- package/lib/main/plugins/CollapsiblePlugin/index.d.ts +11 -0
- package/lib/main/plugins/CollapsiblePlugin/index.js +147 -0
- package/lib/main/plugins/ComponentPickerPlugin/index.d.ts +12 -0
- package/lib/main/plugins/ComponentPickerPlugin/index.js +438 -0
- package/lib/main/plugins/DragDropPastePlugin/index.d.ts +8 -0
- package/lib/main/plugins/DragDropPastePlugin/index.js +32 -0
- package/lib/main/plugins/DraggableBlockPlugin/index.css +36 -0
- package/lib/main/plugins/DraggableBlockPlugin/index.d.ts +12 -0
- package/lib/main/plugins/DraggableBlockPlugin/index.js +288 -0
- package/lib/main/plugins/EmojisPlugin/index.d.ts +9 -0
- package/lib/main/plugins/EmojisPlugin/index.js +63 -0
- package/lib/main/plugins/ExcalidrawPlugin/index.d.ts +3 -0
- package/lib/main/plugins/ExcalidrawPlugin/index.js +30 -0
- package/lib/main/plugins/FigmaPlugin/index.d.ts +11 -0
- package/lib/main/plugins/FigmaPlugin/index.js +27 -0
- package/lib/main/plugins/FloatingLinkEditorPlugin/index.css +39 -0
- package/lib/main/plugins/FloatingLinkEditorPlugin/index.d.ts +12 -0
- package/lib/main/plugins/FloatingLinkEditorPlugin/index.js +181 -0
- package/lib/main/plugins/FloatingTextFormatToolbarPlugin/ColorPickerButton.d.ts +5 -0
- package/lib/main/plugins/FloatingTextFormatToolbarPlugin/ColorPickerButton.js +24 -0
- package/lib/main/plugins/FloatingTextFormatToolbarPlugin/index.css +128 -0
- package/lib/main/plugins/FloatingTextFormatToolbarPlugin/index.d.ts +12 -0
- package/lib/main/plugins/FloatingTextFormatToolbarPlugin/index.js +216 -0
- package/lib/main/plugins/HorizontalRulePlugin/index.d.ts +8 -0
- package/lib/main/plugins/HorizontalRulePlugin/index.js +30 -0
- package/lib/main/plugins/ImagesPlugin/index.d.ts +15 -0
- package/lib/main/plugins/ImagesPlugin/index.js +36 -0
- package/lib/main/plugins/LexicalTypeaheadMenuPlugin/index.d.ts +64 -0
- package/lib/main/plugins/LexicalTypeaheadMenuPlugin/index.js +493 -0
- package/lib/main/plugins/MarkdownShortcutPlugin/index.d.ts +9 -0
- package/lib/main/plugins/MarkdownShortcutPlugin/index.js +22 -0
- package/lib/main/plugins/MarkdownTransformers/index.d.ts +12 -0
- package/lib/main/plugins/MarkdownTransformers/index.js +185 -0
- package/lib/main/plugins/MaxLengthPlugin/index.d.ts +10 -0
- package/lib/main/plugins/MaxLengthPlugin/index.js +43 -0
- package/lib/main/plugins/MentionsPlugin/HighlightStyle.d.ts +2 -0
- package/lib/main/plugins/MentionsPlugin/HighlightStyle.js +13 -0
- package/lib/main/plugins/MentionsPlugin/index.d.ts +9 -0
- package/lib/main/plugins/MentionsPlugin/index.js +175 -0
- package/lib/main/plugins/TabFocusPlugin/index.d.ts +8 -0
- package/lib/main/plugins/TabFocusPlugin/index.js +41 -0
- package/lib/main/plugins/TableActionMenuPlugin/index.d.ts +12 -0
- package/lib/main/plugins/TableActionMenuPlugin/index.js +486 -0
- package/lib/main/plugins/TableCellResizer/index.css +20 -0
- package/lib/main/plugins/TableCellResizer/index.d.ts +3 -0
- package/lib/main/plugins/TableCellResizer/index.js +295 -0
- package/lib/main/plugins/TableOfContentsPlugin/index.css +87 -0
- package/lib/main/plugins/TableOfContentsPlugin/index.d.ts +2 -0
- package/lib/main/plugins/TableOfContentsPlugin/index.js +106 -0
- package/lib/main/plugins/TablePlugin.d.ts +38 -0
- package/lib/main/plugins/TablePlugin.js +63 -0
- package/lib/main/plugins/ToolbarPlugin/index.d.ts +8 -0
- package/lib/main/plugins/ToolbarPlugin/index.js +467 -0
- package/lib/main/plugins/TreeViewPlugin/index.d.ts +9 -0
- package/lib/main/plugins/TreeViewPlugin/index.js +14 -0
- package/lib/main/plugins/TwitterPlugin/index.d.ts +11 -0
- package/lib/main/plugins/TwitterPlugin/index.js +27 -0
- package/lib/main/plugins/TypingPerfPlugin/index.d.ts +9 -0
- package/lib/main/plugins/TypingPerfPlugin/index.js +100 -0
- package/lib/main/plugins/YouTubePlugin/index.d.ts +11 -0
- package/lib/main/plugins/YouTubePlugin/index.js +27 -0
- package/lib/main/server/validation.d.ts +8 -0
- package/lib/main/server/validation.js +119 -0
- package/lib/main/setupEnv.d.ts +8 -0
- package/lib/main/setupEnv.js +25 -0
- package/lib/main/style/editable.css +476 -0
- package/lib/main/styled-editor-content.d.ts +5 -0
- package/lib/main/styled-editor-content.js +206 -0
- package/lib/main/themes/code-highlight/index.d.ts +32 -0
- package/lib/main/themes/code-highlight/index.js +58 -0
- package/lib/main/themes/customTheme.d.ts +2 -0
- package/lib/main/themes/customTheme.js +324 -0
- package/lib/main/themes/defaultTheme.d.ts +10 -0
- package/lib/main/themes/defaultTheme.js +554 -0
- package/lib/main/themes/table/index.d.ts +3 -0
- package/lib/main/themes/table/index.js +20 -0
- package/lib/main/themes/table/table.css +214 -0
- package/lib/main/ui/Button.css +36 -0
- package/lib/main/ui/Button.d.ts +18 -0
- package/lib/main/ui/Button.js +13 -0
- package/lib/main/ui/ColorPicker.css +89 -0
- package/lib/main/ui/ColorPicker.d.ts +28 -0
- package/lib/main/ui/ColorPicker.js +206 -0
- package/lib/main/ui/ContentEditable.d.ts +2 -0
- package/lib/main/ui/ContentEditable.js +15 -0
- package/lib/main/ui/Dialog.css +17 -0
- package/lib/main/ui/Dialog.d.ts +16 -0
- package/lib/main/ui/Dialog.js +15 -0
- package/lib/main/ui/DropDown.d.ts +25 -0
- package/lib/main/ui/DropDown.js +146 -0
- package/lib/main/ui/FileInput.d.ts +17 -0
- package/lib/main/ui/FileInput.js +5 -0
- package/lib/main/ui/FrameMockup/browser.css +52 -0
- package/lib/main/ui/FrameMockup/browser.d.ts +13 -0
- package/lib/main/ui/FrameMockup/browser.js +22 -0
- package/lib/main/ui/FrameMockup/index.d.ts +113 -0
- package/lib/main/ui/FrameMockup/index.js +61 -0
- package/lib/main/ui/ImageEnhancer.d.ts +29 -0
- package/lib/main/ui/ImageEnhancer.js +113 -0
- package/lib/main/ui/ImageResizer.d.ts +24 -0
- package/lib/main/ui/ImageResizer.js +154 -0
- package/lib/main/ui/Input.css +30 -0
- package/lib/main/ui/Modal.css +62 -0
- package/lib/main/ui/Modal.d.ts +15 -0
- package/lib/main/ui/Modal.js +50 -0
- package/lib/main/ui/Placeholder.d.ts +6 -0
- package/lib/main/ui/Placeholder.js +20 -0
- package/lib/main/ui/TextInput.d.ts +20 -0
- package/lib/main/ui/TextInput.js +14 -0
- package/lib/main/utils/getDOMRangeRect.d.ts +8 -0
- package/lib/main/utils/getDOMRangeRect.js +22 -0
- package/lib/main/utils/getSelectedNode.d.ts +2 -0
- package/lib/main/utils/getSelectedNode.js +22 -0
- package/lib/main/utils/guard.d.ts +14 -0
- package/lib/main/utils/guard.js +36 -0
- package/lib/main/utils/images.d.ts +10 -0
- package/lib/main/utils/images.js +16 -0
- package/lib/main/utils/join-classes.d.ts +8 -0
- package/lib/main/utils/join-classes.js +10 -0
- package/lib/main/utils/point.d.ts +21 -0
- package/lib/main/utils/point.js +42 -0
- package/lib/main/utils/prevent-duplicate-upload.d.ts +2 -0
- package/lib/main/utils/prevent-duplicate-upload.js +25 -0
- package/lib/main/utils/rect.d.ts +45 -0
- package/lib/main/utils/rect.js +98 -0
- package/lib/main/utils/sanitizeUrl.d.ts +8 -0
- package/lib/main/utils/sanitizeUrl.js +17 -0
- package/lib/main/utils/setFloatingElemPosition.d.ts +1 -0
- package/lib/main/utils/setFloatingElemPosition.js +32 -0
- package/lib/main/utils/swipe.d.ts +11 -0
- package/lib/main/utils/swipe.js +98 -0
- package/lib/main/viewer/index.d.ts +5 -0
- package/lib/main/viewer/index.js +25 -0
- package/lib/main/viewer/types.d.ts +14 -0
- package/lib/main/viewer/types.js +1 -0
- package/lib/main/viewer/viewer.d.ts +3 -0
- package/lib/main/viewer/viewer.js +31 -0
- package/lib/shared/canUseDOM.d.ts +8 -0
- package/lib/shared/canUseDOM.js +10 -0
- package/lib/shared/environment.d.ts +24 -0
- package/lib/shared/environment.js +21 -0
- package/lib/shared/getDOMSelection.d.ts +9 -0
- package/lib/shared/getDOMSelection.js +10 -0
- package/lib/shared/invariant.d.ts +8 -0
- package/lib/shared/invariant.js +16 -0
- package/lib/shared/useLayoutEffect.d.ts +10 -0
- package/lib/shared/useLayoutEffect.js +11 -0
- package/lib/types.d.ts +19 -0
- package/lib/types.js +1 -0
- package/lib/vendor/LexicalCharacterLimitPlugin/LexicalCharacterLimitPlugin.d.ts +15 -0
- package/lib/vendor/LexicalCharacterLimitPlugin/LexicalCharacterLimitPlugin.js +45 -0
- package/lib/vendor/LexicalCharacterLimitPlugin/index.d.ts +1 -0
- package/lib/vendor/LexicalCharacterLimitPlugin/index.js +1 -0
- package/lib/vendor/LexicalCharacterLimitPlugin/useCharacterLimit.d.ts +16 -0
- package/lib/vendor/LexicalCharacterLimitPlugin/useCharacterLimit.js +208 -0
- package/lib/vendor/history/LexicalHistoryPlugin.d.ts +14 -0
- package/lib/vendor/history/LexicalHistoryPlugin.js +15 -0
- package/lib/vendor/history/history/index.d.ts +63 -0
- package/lib/vendor/history/history/index.js +351 -0
- package/lib/vendor/history/useHistory.d.ts +10 -0
- package/lib/vendor/history/useHistory.js +15 -0
- package/package.json +109 -0
|
@@ -0,0 +1,486 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
+
import { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext';
|
|
3
|
+
import { useLexicalEditable } from '@lexical/react/useLexicalEditable';
|
|
4
|
+
import { $computeTableMapSkipCellCheck, $deleteTableColumnAtSelection, $deleteTableRowAtSelection, $getNodeTriplet, $getTableCellNodeFromLexicalNode, $getTableColumnIndexFromTableCellNode, $getTableNodeFromLexicalNodeOrThrow, $getTableRowIndexFromTableCellNode, $insertTableColumnAtSelection, $insertTableRowAtSelection, $isTableCellNode, $isTableSelection, $mergeCells, $unmergeCell, getTableElement, getTableObserverFromTableElement, TableCellHeaderStates, TableCellNode, } from '@lexical/table';
|
|
5
|
+
import { mergeRegister } from '@lexical/utils';
|
|
6
|
+
import { $getSelection, $isElementNode, $isRangeSelection, $isTextNode, $setSelection, COMMAND_PRIORITY_CRITICAL, getDOMSelection, isDOMNode, SELECTION_CHANGE_COMMAND, } from 'lexical';
|
|
7
|
+
import { useCallback, useEffect, useRef, useState } from 'react';
|
|
8
|
+
import { createPortal } from 'react-dom';
|
|
9
|
+
import { Box } from '@mui/material';
|
|
10
|
+
import useModal from '../../hooks/useModal';
|
|
11
|
+
function computeSelectionCount(selection) {
|
|
12
|
+
const selectionShape = selection.getShape();
|
|
13
|
+
return {
|
|
14
|
+
columns: selectionShape.toX - selectionShape.fromX + 1,
|
|
15
|
+
rows: selectionShape.toY - selectionShape.fromY + 1,
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
function $canUnmerge() {
|
|
19
|
+
const selection = $getSelection();
|
|
20
|
+
if (($isRangeSelection(selection) && !selection.isCollapsed()) ||
|
|
21
|
+
($isTableSelection(selection) && !selection.anchor.is(selection.focus)) ||
|
|
22
|
+
(!$isRangeSelection(selection) && !$isTableSelection(selection))) {
|
|
23
|
+
return false;
|
|
24
|
+
}
|
|
25
|
+
const [cell] = $getNodeTriplet(selection.anchor);
|
|
26
|
+
return cell.__colSpan > 1 || cell.__rowSpan > 1;
|
|
27
|
+
}
|
|
28
|
+
function $selectLastDescendant(node) {
|
|
29
|
+
const lastDescendant = node.getLastDescendant();
|
|
30
|
+
if ($isTextNode(lastDescendant)) {
|
|
31
|
+
lastDescendant.select();
|
|
32
|
+
}
|
|
33
|
+
else if ($isElementNode(lastDescendant)) {
|
|
34
|
+
lastDescendant.selectEnd();
|
|
35
|
+
}
|
|
36
|
+
else if (lastDescendant !== null) {
|
|
37
|
+
lastDescendant.selectNext();
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
function currentCellBackgroundColor(editor) {
|
|
41
|
+
return editor.getEditorState().read(() => {
|
|
42
|
+
const selection = $getSelection();
|
|
43
|
+
if ($isRangeSelection(selection) || $isTableSelection(selection)) {
|
|
44
|
+
const [cell] = $getNodeTriplet(selection.anchor);
|
|
45
|
+
if ($isTableCellNode(cell)) {
|
|
46
|
+
return cell.getBackgroundColor();
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
return null;
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
function TableActionMenu({ onClose, tableCellNode: _tableCellNode, setIsMenuOpen, contextRef, cellMerge, showColorPickerModal, }) {
|
|
53
|
+
const [editor] = useLexicalComposerContext();
|
|
54
|
+
const dropDownRef = useRef(null);
|
|
55
|
+
const [tableCellNode, updateTableCellNode] = useState(_tableCellNode);
|
|
56
|
+
const [selectionCounts, updateSelectionCounts] = useState({
|
|
57
|
+
columns: 1,
|
|
58
|
+
rows: 1,
|
|
59
|
+
});
|
|
60
|
+
const [canMergeCells, setCanMergeCells] = useState(false);
|
|
61
|
+
const [canUnmergeCell, setCanUnmergeCell] = useState(false);
|
|
62
|
+
const [backgroundColor, setBackgroundColor] = useState(() => currentCellBackgroundColor(editor) || '');
|
|
63
|
+
useEffect(() => {
|
|
64
|
+
return editor.registerMutationListener(TableCellNode, (nodeMutations) => {
|
|
65
|
+
const nodeUpdated = nodeMutations.get(tableCellNode.getKey()) === 'updated';
|
|
66
|
+
if (nodeUpdated) {
|
|
67
|
+
editor.getEditorState().read(() => {
|
|
68
|
+
updateTableCellNode(tableCellNode.getLatest());
|
|
69
|
+
});
|
|
70
|
+
setBackgroundColor(currentCellBackgroundColor(editor) || '');
|
|
71
|
+
}
|
|
72
|
+
}, { skipInitialization: true });
|
|
73
|
+
}, [editor, tableCellNode]);
|
|
74
|
+
useEffect(() => {
|
|
75
|
+
editor.getEditorState().read(() => {
|
|
76
|
+
const selection = $getSelection();
|
|
77
|
+
// Merge cells
|
|
78
|
+
if ($isTableSelection(selection)) {
|
|
79
|
+
const currentSelectionCounts = computeSelectionCount(selection);
|
|
80
|
+
updateSelectionCounts(computeSelectionCount(selection));
|
|
81
|
+
setCanMergeCells(currentSelectionCounts.columns > 1 || currentSelectionCounts.rows > 1);
|
|
82
|
+
}
|
|
83
|
+
// Unmerge cell
|
|
84
|
+
setCanUnmergeCell($canUnmerge());
|
|
85
|
+
});
|
|
86
|
+
}, [editor]);
|
|
87
|
+
useEffect(() => {
|
|
88
|
+
const menuButtonElement = contextRef.current;
|
|
89
|
+
const dropDownElement = dropDownRef.current;
|
|
90
|
+
const rootElement = editor.getRootElement();
|
|
91
|
+
if (menuButtonElement != null && dropDownElement != null && rootElement != null) {
|
|
92
|
+
const rootEleRect = rootElement.getBoundingClientRect();
|
|
93
|
+
const menuButtonRect = menuButtonElement.getBoundingClientRect();
|
|
94
|
+
dropDownElement.style.opacity = '1';
|
|
95
|
+
const dropDownElementRect = dropDownElement.getBoundingClientRect();
|
|
96
|
+
const margin = 5;
|
|
97
|
+
let leftPosition = menuButtonRect.right + margin;
|
|
98
|
+
if (leftPosition + dropDownElementRect.width > window.innerWidth ||
|
|
99
|
+
leftPosition + dropDownElementRect.width > rootEleRect.right) {
|
|
100
|
+
const position = menuButtonRect.left - dropDownElementRect.width - margin;
|
|
101
|
+
leftPosition = (position < 0 ? margin : position) + window.pageXOffset;
|
|
102
|
+
}
|
|
103
|
+
dropDownElement.style.left = `${leftPosition + window.pageXOffset}px`;
|
|
104
|
+
let topPosition = menuButtonRect.top;
|
|
105
|
+
if (topPosition + dropDownElementRect.height > window.innerHeight) {
|
|
106
|
+
const position = menuButtonRect.bottom - dropDownElementRect.height;
|
|
107
|
+
topPosition = position < 0 ? margin : position;
|
|
108
|
+
}
|
|
109
|
+
dropDownElement.style.top = `${topPosition}px`;
|
|
110
|
+
}
|
|
111
|
+
}, [contextRef, dropDownRef, editor]);
|
|
112
|
+
useEffect(() => {
|
|
113
|
+
function handleClickOutside(event) {
|
|
114
|
+
if (dropDownRef.current != null &&
|
|
115
|
+
contextRef.current != null &&
|
|
116
|
+
isDOMNode(event.target) &&
|
|
117
|
+
!dropDownRef.current.contains(event.target) &&
|
|
118
|
+
!contextRef.current.contains(event.target)) {
|
|
119
|
+
setIsMenuOpen(false);
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
window.addEventListener('click', handleClickOutside);
|
|
123
|
+
return () => window.removeEventListener('click', handleClickOutside);
|
|
124
|
+
}, [setIsMenuOpen, contextRef]);
|
|
125
|
+
const clearTableSelection = useCallback(() => {
|
|
126
|
+
editor.update(() => {
|
|
127
|
+
if (tableCellNode.isAttached()) {
|
|
128
|
+
const tableNode = $getTableNodeFromLexicalNodeOrThrow(tableCellNode);
|
|
129
|
+
const tableElement = getTableElement(tableNode, editor.getElementByKey(tableNode.getKey()));
|
|
130
|
+
if (tableElement === null) {
|
|
131
|
+
throw new Error('TableActionMenu: Expected to find tableElement in DOM');
|
|
132
|
+
}
|
|
133
|
+
const tableObserver = getTableObserverFromTableElement(tableElement);
|
|
134
|
+
if (tableObserver !== null) {
|
|
135
|
+
tableObserver.$clearHighlight();
|
|
136
|
+
}
|
|
137
|
+
tableNode.markDirty();
|
|
138
|
+
updateTableCellNode(tableCellNode.getLatest());
|
|
139
|
+
}
|
|
140
|
+
$setSelection(null);
|
|
141
|
+
});
|
|
142
|
+
}, [editor, tableCellNode]);
|
|
143
|
+
const mergeTableCellsAtSelection = () => {
|
|
144
|
+
editor.update(() => {
|
|
145
|
+
const selection = $getSelection();
|
|
146
|
+
if (!$isTableSelection(selection)) {
|
|
147
|
+
return;
|
|
148
|
+
}
|
|
149
|
+
const nodes = selection.getNodes();
|
|
150
|
+
const tableCells = nodes.filter($isTableCellNode);
|
|
151
|
+
const targetCell = $mergeCells(tableCells);
|
|
152
|
+
if (targetCell) {
|
|
153
|
+
$selectLastDescendant(targetCell);
|
|
154
|
+
onClose();
|
|
155
|
+
}
|
|
156
|
+
});
|
|
157
|
+
};
|
|
158
|
+
const unmergeTableCellsAtSelection = () => {
|
|
159
|
+
editor.update(() => {
|
|
160
|
+
$unmergeCell();
|
|
161
|
+
});
|
|
162
|
+
};
|
|
163
|
+
const insertTableRowAtSelection = useCallback((shouldInsertAfter) => {
|
|
164
|
+
editor.update(() => {
|
|
165
|
+
for (let i = 0; i < selectionCounts.rows; i++) {
|
|
166
|
+
$insertTableRowAtSelection(shouldInsertAfter);
|
|
167
|
+
}
|
|
168
|
+
onClose();
|
|
169
|
+
});
|
|
170
|
+
}, [editor, onClose, selectionCounts.rows]);
|
|
171
|
+
const insertTableColumnAtSelection = useCallback((shouldInsertAfter) => {
|
|
172
|
+
editor.update(() => {
|
|
173
|
+
for (let i = 0; i < selectionCounts.columns; i++) {
|
|
174
|
+
$insertTableColumnAtSelection(shouldInsertAfter);
|
|
175
|
+
}
|
|
176
|
+
onClose();
|
|
177
|
+
});
|
|
178
|
+
}, [editor, onClose, selectionCounts.columns]);
|
|
179
|
+
const deleteTableRowAtSelection = useCallback(() => {
|
|
180
|
+
editor.update(() => {
|
|
181
|
+
$deleteTableRowAtSelection();
|
|
182
|
+
onClose();
|
|
183
|
+
});
|
|
184
|
+
}, [editor, onClose]);
|
|
185
|
+
const deleteTableAtSelection = useCallback(() => {
|
|
186
|
+
editor.update(() => {
|
|
187
|
+
const tableNode = $getTableNodeFromLexicalNodeOrThrow(tableCellNode);
|
|
188
|
+
tableNode.remove();
|
|
189
|
+
clearTableSelection();
|
|
190
|
+
onClose();
|
|
191
|
+
});
|
|
192
|
+
}, [editor, tableCellNode, clearTableSelection, onClose]);
|
|
193
|
+
const deleteTableColumnAtSelection = useCallback(() => {
|
|
194
|
+
editor.update(() => {
|
|
195
|
+
$deleteTableColumnAtSelection();
|
|
196
|
+
onClose();
|
|
197
|
+
});
|
|
198
|
+
}, [editor, onClose]);
|
|
199
|
+
const toggleTableRowIsHeader = useCallback(() => {
|
|
200
|
+
editor.update(() => {
|
|
201
|
+
const tableNode = $getTableNodeFromLexicalNodeOrThrow(tableCellNode);
|
|
202
|
+
const tableRowIndex = $getTableRowIndexFromTableCellNode(tableCellNode);
|
|
203
|
+
const [gridMap] = $computeTableMapSkipCellCheck(tableNode, null, null);
|
|
204
|
+
const rowCells = new Set();
|
|
205
|
+
const newStyle = tableCellNode.getHeaderStyles() ^ TableCellHeaderStates.ROW;
|
|
206
|
+
for (let col = 0; col < gridMap[tableRowIndex].length; col++) {
|
|
207
|
+
const mapCell = gridMap[tableRowIndex][col];
|
|
208
|
+
if (!mapCell?.cell) {
|
|
209
|
+
// eslint-disable-next-line no-continue
|
|
210
|
+
continue;
|
|
211
|
+
}
|
|
212
|
+
if (!rowCells.has(mapCell.cell)) {
|
|
213
|
+
rowCells.add(mapCell.cell);
|
|
214
|
+
mapCell.cell.setHeaderStyles(newStyle, TableCellHeaderStates.ROW);
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
clearTableSelection();
|
|
218
|
+
onClose();
|
|
219
|
+
});
|
|
220
|
+
}, [editor, tableCellNode, clearTableSelection, onClose]);
|
|
221
|
+
const toggleTableColumnIsHeader = useCallback(() => {
|
|
222
|
+
editor.update(() => {
|
|
223
|
+
const tableNode = $getTableNodeFromLexicalNodeOrThrow(tableCellNode);
|
|
224
|
+
const tableColumnIndex = $getTableColumnIndexFromTableCellNode(tableCellNode);
|
|
225
|
+
const [gridMap] = $computeTableMapSkipCellCheck(tableNode, null, null);
|
|
226
|
+
const columnCells = new Set();
|
|
227
|
+
const newStyle = tableCellNode.getHeaderStyles() ^ TableCellHeaderStates.COLUMN;
|
|
228
|
+
for (let row = 0; row < gridMap.length; row++) {
|
|
229
|
+
const mapCell = gridMap[row][tableColumnIndex];
|
|
230
|
+
if (!mapCell?.cell) {
|
|
231
|
+
// eslint-disable-next-line no-continue
|
|
232
|
+
continue;
|
|
233
|
+
}
|
|
234
|
+
if (!columnCells.has(mapCell.cell)) {
|
|
235
|
+
columnCells.add(mapCell.cell);
|
|
236
|
+
mapCell.cell.setHeaderStyles(newStyle, TableCellHeaderStates.COLUMN);
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
clearTableSelection();
|
|
240
|
+
onClose();
|
|
241
|
+
});
|
|
242
|
+
}, [editor, tableCellNode, clearTableSelection, onClose]);
|
|
243
|
+
const toggleRowStriping = useCallback(() => {
|
|
244
|
+
editor.update(() => {
|
|
245
|
+
if (tableCellNode.isAttached()) {
|
|
246
|
+
const tableNode = $getTableNodeFromLexicalNodeOrThrow(tableCellNode);
|
|
247
|
+
if (tableNode) {
|
|
248
|
+
tableNode.setRowStriping(!tableNode.getRowStriping());
|
|
249
|
+
}
|
|
250
|
+
}
|
|
251
|
+
clearTableSelection();
|
|
252
|
+
onClose();
|
|
253
|
+
});
|
|
254
|
+
}, [editor, tableCellNode, clearTableSelection, onClose]);
|
|
255
|
+
const toggleFirstRowFreeze = useCallback(() => {
|
|
256
|
+
editor.update(() => {
|
|
257
|
+
if (tableCellNode.isAttached()) {
|
|
258
|
+
const tableNode = $getTableNodeFromLexicalNodeOrThrow(tableCellNode);
|
|
259
|
+
if (tableNode) {
|
|
260
|
+
tableNode.setFrozenRows(tableNode.getFrozenRows() === 0 ? 1 : 0);
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
clearTableSelection();
|
|
264
|
+
onClose();
|
|
265
|
+
});
|
|
266
|
+
}, [editor, tableCellNode, clearTableSelection, onClose]);
|
|
267
|
+
const toggleFirstColumnFreeze = useCallback(() => {
|
|
268
|
+
editor.update(() => {
|
|
269
|
+
if (tableCellNode.isAttached()) {
|
|
270
|
+
const tableNode = $getTableNodeFromLexicalNodeOrThrow(tableCellNode);
|
|
271
|
+
if (tableNode) {
|
|
272
|
+
tableNode.setFrozenColumns(tableNode.getFrozenColumns() === 0 ? 1 : 0);
|
|
273
|
+
}
|
|
274
|
+
}
|
|
275
|
+
clearTableSelection();
|
|
276
|
+
onClose();
|
|
277
|
+
});
|
|
278
|
+
}, [editor, tableCellNode, clearTableSelection, onClose]);
|
|
279
|
+
const handleCellBackgroundColor = useCallback((value) => {
|
|
280
|
+
editor.update(() => {
|
|
281
|
+
const selection = $getSelection();
|
|
282
|
+
if ($isRangeSelection(selection) || $isTableSelection(selection)) {
|
|
283
|
+
const [cell] = $getNodeTriplet(selection.anchor);
|
|
284
|
+
if ($isTableCellNode(cell)) {
|
|
285
|
+
cell.setBackgroundColor(value);
|
|
286
|
+
}
|
|
287
|
+
if ($isTableSelection(selection)) {
|
|
288
|
+
const nodes = selection.getNodes();
|
|
289
|
+
for (let i = 0; i < nodes.length; i++) {
|
|
290
|
+
const node = nodes[i];
|
|
291
|
+
if ($isTableCellNode(node)) {
|
|
292
|
+
node.setBackgroundColor(value);
|
|
293
|
+
}
|
|
294
|
+
}
|
|
295
|
+
}
|
|
296
|
+
}
|
|
297
|
+
});
|
|
298
|
+
}, [editor]);
|
|
299
|
+
const formatVerticalAlign = (value) => {
|
|
300
|
+
editor.update(() => {
|
|
301
|
+
const selection = $getSelection();
|
|
302
|
+
if ($isRangeSelection(selection) || $isTableSelection(selection)) {
|
|
303
|
+
const [cell] = $getNodeTriplet(selection.anchor);
|
|
304
|
+
if ($isTableCellNode(cell)) {
|
|
305
|
+
cell.setVerticalAlign(value);
|
|
306
|
+
}
|
|
307
|
+
if ($isTableSelection(selection)) {
|
|
308
|
+
const nodes = selection.getNodes();
|
|
309
|
+
for (let i = 0; i < nodes.length; i++) {
|
|
310
|
+
const node = nodes[i];
|
|
311
|
+
if ($isTableCellNode(node)) {
|
|
312
|
+
node.setVerticalAlign(value);
|
|
313
|
+
}
|
|
314
|
+
}
|
|
315
|
+
}
|
|
316
|
+
}
|
|
317
|
+
});
|
|
318
|
+
};
|
|
319
|
+
let mergeCellButton = null;
|
|
320
|
+
if (cellMerge) {
|
|
321
|
+
if (canMergeCells) {
|
|
322
|
+
mergeCellButton = (_jsx("button", { type: "button", className: "item", onClick: () => mergeTableCellsAtSelection(), "data-test-id": "table-merge-cells", children: _jsx("span", { className: "text", children: "Merge cells" }) }));
|
|
323
|
+
}
|
|
324
|
+
else if (canUnmergeCell) {
|
|
325
|
+
mergeCellButton = (_jsx("button", { type: "button", className: "item", onClick: () => unmergeTableCellsAtSelection(), "data-test-id": "table-unmerge-cells", children: _jsx("span", { className: "text", children: "Unmerge cells" }) }));
|
|
326
|
+
}
|
|
327
|
+
}
|
|
328
|
+
return createPortal(
|
|
329
|
+
// eslint-disable-next-line jsx-a11y/no-static-element-interactions
|
|
330
|
+
_jsxs("div", { className: "dropdown", ref: dropDownRef, onClick: (e) => {
|
|
331
|
+
e.stopPropagation();
|
|
332
|
+
}, children: [mergeCellButton, _jsx("button", { type: "button", className: "item", onClick: () => toggleRowStriping(), "data-test-id": "table-row-striping", children: _jsx("span", { className: "text", children: "Toggle Row Striping" }) }), _jsx("button", { type: "button", className: "item", onClick: () => toggleFirstRowFreeze(), "data-test-id": "table-freeze-first-row", children: _jsx("span", { className: "text", children: "Toggle First Row Freeze" }) }), _jsx("button", { type: "button", className: "item", onClick: () => toggleFirstColumnFreeze(), "data-test-id": "table-freeze-first-column", children: _jsx("span", { className: "text", children: "Toggle First Column Freeze" }) }), _jsx("hr", {}), _jsx("button", { type: "button", className: "item", onClick: () => insertTableRowAtSelection(false), "data-test-id": "table-insert-row-above", children: _jsxs("span", { className: "text", children: ["Insert ", selectionCounts.rows === 1 ? 'row' : `${selectionCounts.rows} rows`, " above"] }) }), _jsx("button", { type: "button", className: "item", onClick: () => insertTableRowAtSelection(true), "data-test-id": "table-insert-row-below", children: _jsxs("span", { className: "text", children: ["Insert ", selectionCounts.rows === 1 ? 'row' : `${selectionCounts.rows} rows`, " below"] }) }), _jsx("hr", {}), _jsx("button", { type: "button", className: "item", onClick: () => insertTableColumnAtSelection(false), "data-test-id": "table-insert-column-before", children: _jsxs("span", { className: "text", children: ["Insert ", selectionCounts.columns === 1 ? 'column' : `${selectionCounts.columns} columns`, " left"] }) }), _jsx("button", { type: "button", className: "item", onClick: () => insertTableColumnAtSelection(true), "data-test-id": "table-insert-column-after", children: _jsxs("span", { className: "text", children: ["Insert ", selectionCounts.columns === 1 ? 'column' : `${selectionCounts.columns} columns`, " right"] }) }), _jsx("hr", {}), _jsx("button", { type: "button", className: "item", onClick: () => deleteTableColumnAtSelection(), "data-test-id": "table-delete-columns", children: _jsx("span", { className: "text", children: "Delete column" }) }), _jsx("button", { type: "button", className: "item", onClick: () => deleteTableRowAtSelection(), "data-test-id": "table-delete-rows", children: _jsx("span", { className: "text", children: "Delete row" }) }), _jsx("button", { type: "button", className: "item", onClick: () => deleteTableAtSelection(), "data-test-id": "table-delete", children: _jsx("span", { className: "text", children: "Delete table" }) }), _jsx("hr", {}), _jsx("button", { type: "button", className: "item", onClick: () => toggleTableRowIsHeader(), "data-test-id": "table-row-header", children: _jsxs("span", { className: "text", children: [(tableCellNode.__headerState & TableCellHeaderStates.ROW) === TableCellHeaderStates.ROW ? 'Remove' : 'Add', ' ', "row header"] }) }), _jsx("button", { type: "button", className: "item", onClick: () => toggleTableColumnIsHeader(), "data-test-id": "table-column-header", children: _jsxs("span", { className: "text", children: [(tableCellNode.__headerState & TableCellHeaderStates.COLUMN) === TableCellHeaderStates.COLUMN
|
|
333
|
+
? 'Remove'
|
|
334
|
+
: 'Add', ' ', "column header"] }) })] }), document.body);
|
|
335
|
+
}
|
|
336
|
+
function TableCellActionMenuContainer({ anchorElem, cellMerge, }) {
|
|
337
|
+
const [editor] = useLexicalComposerContext();
|
|
338
|
+
const menuButtonRef = useRef(null);
|
|
339
|
+
const menuRootRef = useRef(null);
|
|
340
|
+
const [isMenuOpen, setIsMenuOpen] = useState(false);
|
|
341
|
+
const [tableCellNode, setTableMenuCellNode] = useState(null);
|
|
342
|
+
const [colorPickerModal, showColorPickerModal] = useModal();
|
|
343
|
+
const checkTableCellOverflow = useCallback((tableCellParentNodeDOM) => {
|
|
344
|
+
const scrollableContainer = tableCellParentNodeDOM.closest('.PlaygroundEditorTheme__tableScrollableWrapper');
|
|
345
|
+
if (scrollableContainer) {
|
|
346
|
+
const containerRect = scrollableContainer.getBoundingClientRect();
|
|
347
|
+
const cellRect = tableCellParentNodeDOM.getBoundingClientRect();
|
|
348
|
+
// Calculate where the action button would be positioned (5px from right edge of cell)
|
|
349
|
+
// Also account for the button width and table cell padding (8px)
|
|
350
|
+
const actionButtonRight = cellRect.right - 5;
|
|
351
|
+
const actionButtonLeft = actionButtonRight - 28; // 20px width + 8px padding
|
|
352
|
+
// Only hide if the action button would overflow the container
|
|
353
|
+
if (actionButtonRight > containerRect.right || actionButtonLeft < containerRect.left) {
|
|
354
|
+
return true;
|
|
355
|
+
}
|
|
356
|
+
}
|
|
357
|
+
return false;
|
|
358
|
+
}, []);
|
|
359
|
+
const $moveMenu = useCallback(() => {
|
|
360
|
+
const menu = menuButtonRef.current;
|
|
361
|
+
const selection = $getSelection();
|
|
362
|
+
const nativeSelection = getDOMSelection(editor._window);
|
|
363
|
+
const { activeElement } = document;
|
|
364
|
+
function disable() {
|
|
365
|
+
if (menu) {
|
|
366
|
+
menu.classList.remove('table-cell-action-button-container--active');
|
|
367
|
+
menu.classList.add('table-cell-action-button-container--inactive');
|
|
368
|
+
}
|
|
369
|
+
setTableMenuCellNode(null);
|
|
370
|
+
}
|
|
371
|
+
if (selection == null || menu == null) {
|
|
372
|
+
return disable();
|
|
373
|
+
}
|
|
374
|
+
const rootElement = editor.getRootElement();
|
|
375
|
+
let tableObserver = null;
|
|
376
|
+
let tableCellParentNodeDOM = null;
|
|
377
|
+
if ($isRangeSelection(selection) &&
|
|
378
|
+
rootElement !== null &&
|
|
379
|
+
nativeSelection !== null &&
|
|
380
|
+
rootElement.contains(nativeSelection.anchorNode)) {
|
|
381
|
+
const tableCellNodeFromSelection = $getTableCellNodeFromLexicalNode(selection.anchor.getNode());
|
|
382
|
+
if (tableCellNodeFromSelection == null) {
|
|
383
|
+
return disable();
|
|
384
|
+
}
|
|
385
|
+
tableCellParentNodeDOM = editor.getElementByKey(tableCellNodeFromSelection.getKey());
|
|
386
|
+
if (tableCellParentNodeDOM == null || !tableCellNodeFromSelection.isAttached()) {
|
|
387
|
+
return disable();
|
|
388
|
+
}
|
|
389
|
+
if (checkTableCellOverflow(tableCellParentNodeDOM)) {
|
|
390
|
+
return disable();
|
|
391
|
+
}
|
|
392
|
+
const tableNode = $getTableNodeFromLexicalNodeOrThrow(tableCellNodeFromSelection);
|
|
393
|
+
const tableElement = getTableElement(tableNode, editor.getElementByKey(tableNode.getKey()));
|
|
394
|
+
if (tableElement === null) {
|
|
395
|
+
throw new Error('TableActionMenu: Expected to find tableElement in DOM');
|
|
396
|
+
}
|
|
397
|
+
tableObserver = getTableObserverFromTableElement(tableElement);
|
|
398
|
+
setTableMenuCellNode(tableCellNodeFromSelection);
|
|
399
|
+
}
|
|
400
|
+
else if ($isTableSelection(selection)) {
|
|
401
|
+
const anchorNode = $getTableCellNodeFromLexicalNode(selection.anchor.getNode());
|
|
402
|
+
if (!$isTableCellNode(anchorNode)) {
|
|
403
|
+
throw new Error('TableSelection anchorNode must be a TableCellNode');
|
|
404
|
+
}
|
|
405
|
+
const tableNode = $getTableNodeFromLexicalNodeOrThrow(anchorNode);
|
|
406
|
+
const tableElement = getTableElement(tableNode, editor.getElementByKey(tableNode.getKey()));
|
|
407
|
+
if (tableElement === null) {
|
|
408
|
+
throw new Error('TableActionMenu: Expected to find tableElement in DOM');
|
|
409
|
+
}
|
|
410
|
+
tableObserver = getTableObserverFromTableElement(tableElement);
|
|
411
|
+
tableCellParentNodeDOM = editor.getElementByKey(anchorNode.getKey());
|
|
412
|
+
if (tableCellParentNodeDOM === null) {
|
|
413
|
+
return disable();
|
|
414
|
+
}
|
|
415
|
+
if (checkTableCellOverflow(tableCellParentNodeDOM)) {
|
|
416
|
+
return disable();
|
|
417
|
+
}
|
|
418
|
+
}
|
|
419
|
+
else if (!activeElement) {
|
|
420
|
+
return disable();
|
|
421
|
+
}
|
|
422
|
+
if (tableObserver === null || tableCellParentNodeDOM === null) {
|
|
423
|
+
return disable();
|
|
424
|
+
}
|
|
425
|
+
const enabled = !tableObserver || !tableObserver.isSelecting;
|
|
426
|
+
menu.classList.toggle('table-cell-action-button-container--active', enabled);
|
|
427
|
+
menu.classList.toggle('table-cell-action-button-container--inactive', !enabled);
|
|
428
|
+
if (enabled) {
|
|
429
|
+
const tableCellRect = tableCellParentNodeDOM.getBoundingClientRect();
|
|
430
|
+
const anchorRect = anchorElem.getBoundingClientRect();
|
|
431
|
+
const top = tableCellRect.top - anchorRect.top;
|
|
432
|
+
const left = tableCellRect.right - anchorRect.left;
|
|
433
|
+
menu.style.transform = `translate(${left}px, ${top}px)`;
|
|
434
|
+
}
|
|
435
|
+
}, [editor, anchorElem, checkTableCellOverflow]);
|
|
436
|
+
useEffect(() => {
|
|
437
|
+
// We call the $moveMenu callback every time the selection changes,
|
|
438
|
+
// once up front, and once after each pointerUp
|
|
439
|
+
let timeoutId;
|
|
440
|
+
const callback = () => {
|
|
441
|
+
timeoutId = undefined;
|
|
442
|
+
editor.getEditorState().read($moveMenu);
|
|
443
|
+
};
|
|
444
|
+
const delayedCallback = () => {
|
|
445
|
+
if (timeoutId === undefined) {
|
|
446
|
+
timeoutId = setTimeout(callback, 0);
|
|
447
|
+
}
|
|
448
|
+
return false;
|
|
449
|
+
};
|
|
450
|
+
return mergeRegister(editor.registerUpdateListener(delayedCallback), editor.registerCommand(SELECTION_CHANGE_COMMAND, delayedCallback, COMMAND_PRIORITY_CRITICAL), editor.registerRootListener((rootElement, prevRootElement) => {
|
|
451
|
+
if (prevRootElement) {
|
|
452
|
+
prevRootElement.removeEventListener('pointerup', delayedCallback);
|
|
453
|
+
}
|
|
454
|
+
if (rootElement) {
|
|
455
|
+
rootElement.addEventListener('pointerup', delayedCallback);
|
|
456
|
+
delayedCallback();
|
|
457
|
+
}
|
|
458
|
+
}), () => clearTimeout(timeoutId));
|
|
459
|
+
});
|
|
460
|
+
const prevTableCellDOM = useRef(tableCellNode);
|
|
461
|
+
useEffect(() => {
|
|
462
|
+
if (prevTableCellDOM.current !== tableCellNode) {
|
|
463
|
+
setIsMenuOpen(false);
|
|
464
|
+
}
|
|
465
|
+
prevTableCellDOM.current = tableCellNode;
|
|
466
|
+
}, [prevTableCellDOM, tableCellNode]);
|
|
467
|
+
return (_jsx("div", { className: "table-cell-action-button-container", ref: menuButtonRef, children: tableCellNode != null && (_jsxs(_Fragment, { children: [_jsx(Box, { component: "button", type: "button", className: "table-cell-action-button chevron-down", onClick: (e) => {
|
|
468
|
+
e.stopPropagation();
|
|
469
|
+
setIsMenuOpen(!isMenuOpen);
|
|
470
|
+
}, ref: menuRootRef, sx: {
|
|
471
|
+
display: 'flex',
|
|
472
|
+
alignItems: 'center',
|
|
473
|
+
justifyContent: 'center',
|
|
474
|
+
width: 22,
|
|
475
|
+
height: 22,
|
|
476
|
+
p: 0,
|
|
477
|
+
borderRadius: '100%',
|
|
478
|
+
'& svg': {
|
|
479
|
+
fontSize: 13,
|
|
480
|
+
},
|
|
481
|
+
}, children: _jsx("i", { className: "iconify", "data-icon": "tabler:chevron-down" }) }), colorPickerModal, isMenuOpen && (_jsx(TableActionMenu, { contextRef: menuRootRef, setIsMenuOpen: setIsMenuOpen, onClose: () => setIsMenuOpen(false), tableCellNode: tableCellNode, cellMerge: cellMerge, showColorPickerModal: showColorPickerModal }))] })) }));
|
|
482
|
+
}
|
|
483
|
+
export default function TableActionMenuPlugin({ anchorElem = document.body, cellMerge = false, }) {
|
|
484
|
+
const isEditable = useLexicalEditable();
|
|
485
|
+
return createPortal(isEditable ? _jsx(TableCellActionMenuContainer, { anchorElem: anchorElem, cellMerge: cellMerge }) : null, anchorElem);
|
|
486
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the MIT license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*
|
|
7
|
+
*
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
.TableCellResizer__resizer {
|
|
11
|
+
position: absolute;
|
|
12
|
+
touch-action: none;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
@media (pointer: coarse) {
|
|
16
|
+
.TableCellResizer__resizer {
|
|
17
|
+
background-color: #adf;
|
|
18
|
+
mix-blend-mode: color;
|
|
19
|
+
}
|
|
20
|
+
}
|