@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,27 @@
|
|
|
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
|
+
import { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext';
|
|
9
|
+
import { $insertNodeToNearestRoot } from '@lexical/utils';
|
|
10
|
+
import { COMMAND_PRIORITY_EDITOR, createCommand } from 'lexical';
|
|
11
|
+
import { useEffect } from 'react';
|
|
12
|
+
import { $createYouTubeNode, YouTubeNode } from '../../nodes/YouTubeNode';
|
|
13
|
+
export const INSERT_YOUTUBE_COMMAND = createCommand('INSERT_YOUTUBE_COMMAND');
|
|
14
|
+
export default function YouTubePlugin() {
|
|
15
|
+
const [editor] = useLexicalComposerContext();
|
|
16
|
+
useEffect(() => {
|
|
17
|
+
if (!editor.hasNodes([YouTubeNode])) {
|
|
18
|
+
throw new Error('YouTubePlugin: YouTubeNode not registered on editor');
|
|
19
|
+
}
|
|
20
|
+
return editor.registerCommand(INSERT_YOUTUBE_COMMAND, (payload) => {
|
|
21
|
+
const youTubeNode = $createYouTubeNode(payload);
|
|
22
|
+
$insertNodeToNearestRoot(youTubeNode);
|
|
23
|
+
return true;
|
|
24
|
+
}, COMMAND_PRIORITY_EDITOR);
|
|
25
|
+
}, [editor]);
|
|
26
|
+
return null;
|
|
27
|
+
}
|
|
@@ -0,0 +1,119 @@
|
|
|
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
|
+
import * as http from 'http';
|
|
9
|
+
import * as url from 'url';
|
|
10
|
+
import { createHeadlessEditor } from '@lexical/headless';
|
|
11
|
+
import { $isMarkNode, $unwrapMarkNode } from '@lexical/mark';
|
|
12
|
+
import { $getRoot, $isElementNode } from 'lexical';
|
|
13
|
+
import PlaygroundNodes from '../nodes/PlaygroundNodes';
|
|
14
|
+
const hostname = 'localhost';
|
|
15
|
+
const port = 1235;
|
|
16
|
+
let stringifiedEditorStateJSON = '';
|
|
17
|
+
global.__DEV__ = true;
|
|
18
|
+
const editor = createHeadlessEditor({
|
|
19
|
+
namespace: 'validation',
|
|
20
|
+
nodes: [...PlaygroundNodes],
|
|
21
|
+
onError: (error) => {
|
|
22
|
+
console.error(error);
|
|
23
|
+
},
|
|
24
|
+
});
|
|
25
|
+
const getJSONData = (req) => {
|
|
26
|
+
const body = [];
|
|
27
|
+
return new Promise((resolve) => {
|
|
28
|
+
req
|
|
29
|
+
.on('data', (chunk) => {
|
|
30
|
+
body.push(chunk);
|
|
31
|
+
})
|
|
32
|
+
.on('end', () => {
|
|
33
|
+
resolve(Buffer.concat(body).toString());
|
|
34
|
+
})
|
|
35
|
+
.on('error', (error) => {
|
|
36
|
+
// eslint-disable-next-line no-console
|
|
37
|
+
console.log(error);
|
|
38
|
+
});
|
|
39
|
+
});
|
|
40
|
+
};
|
|
41
|
+
const sanitizeNode = (node) => {
|
|
42
|
+
if ($isMarkNode(node)) {
|
|
43
|
+
$unwrapMarkNode(node);
|
|
44
|
+
return;
|
|
45
|
+
}
|
|
46
|
+
if ($isElementNode(node)) {
|
|
47
|
+
const children = node.getChildren();
|
|
48
|
+
for (const child of children) {
|
|
49
|
+
sanitizeNode(child);
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
};
|
|
53
|
+
const validateEditorState = async (stringifiedJSON) => {
|
|
54
|
+
if (stringifiedEditorStateJSON === stringifiedJSON) {
|
|
55
|
+
return true;
|
|
56
|
+
}
|
|
57
|
+
const prevEditorState = editor.getEditorState();
|
|
58
|
+
const nextEditorState = editor.parseEditorState(stringifiedJSON);
|
|
59
|
+
editor.setEditorState(nextEditorState);
|
|
60
|
+
editor.update(() => {
|
|
61
|
+
const root = $getRoot();
|
|
62
|
+
sanitizeNode(root);
|
|
63
|
+
});
|
|
64
|
+
await Promise.resolve().then();
|
|
65
|
+
const assertion = JSON.stringify(editor.getEditorState().toJSON());
|
|
66
|
+
const success = assertion === stringifiedEditorStateJSON;
|
|
67
|
+
if (success) {
|
|
68
|
+
// eslint-disable-next-line no-console
|
|
69
|
+
console.log('Editor state updated successfully.');
|
|
70
|
+
editor.setEditorState(nextEditorState);
|
|
71
|
+
stringifiedEditorStateJSON = assertion;
|
|
72
|
+
}
|
|
73
|
+
else {
|
|
74
|
+
// eslint-disable-next-line no-console
|
|
75
|
+
console.log('Editor state was rejected!');
|
|
76
|
+
editor.setEditorState(prevEditorState);
|
|
77
|
+
}
|
|
78
|
+
return success;
|
|
79
|
+
};
|
|
80
|
+
const server = http.createServer(async (req, res) => {
|
|
81
|
+
// @ts-ignore
|
|
82
|
+
const { pathname } = url.parse(req.url);
|
|
83
|
+
const { method } = req;
|
|
84
|
+
res.setHeader('Content-Type', 'application/json');
|
|
85
|
+
res.setHeader('Access-Control-Allow-Origin', '*');
|
|
86
|
+
res.setHeader('Access-Control-Request-Method', '*');
|
|
87
|
+
res.setHeader('Access-Control-Allow-Methods', 'OPTIONS, POST, GET');
|
|
88
|
+
res.setHeader('Access-Control-Allow-Headers', '*');
|
|
89
|
+
if (method === 'OPTIONS') {
|
|
90
|
+
res.end();
|
|
91
|
+
return;
|
|
92
|
+
}
|
|
93
|
+
if (method === 'POST' && pathname === '/setEditorState') {
|
|
94
|
+
const stringifiedJSON = await getJSONData(req);
|
|
95
|
+
const editorState = editor.parseEditorState(stringifiedJSON);
|
|
96
|
+
editor.setEditorState(editorState);
|
|
97
|
+
stringifiedEditorStateJSON = stringifiedJSON;
|
|
98
|
+
res.statusCode = 200;
|
|
99
|
+
res.end();
|
|
100
|
+
}
|
|
101
|
+
else if (method === 'POST' && pathname === '/validateEditorState') {
|
|
102
|
+
const stringifiedJSON = await getJSONData(req);
|
|
103
|
+
if (await validateEditorState(stringifiedJSON)) {
|
|
104
|
+
res.statusCode = 200;
|
|
105
|
+
}
|
|
106
|
+
else {
|
|
107
|
+
res.statusCode = 403;
|
|
108
|
+
}
|
|
109
|
+
res.end();
|
|
110
|
+
}
|
|
111
|
+
else {
|
|
112
|
+
res.statusCode = 404;
|
|
113
|
+
res.end();
|
|
114
|
+
}
|
|
115
|
+
});
|
|
116
|
+
server.listen(port, hostname, () => {
|
|
117
|
+
// eslint-disable-next-line no-console
|
|
118
|
+
console.log(`Read-only validation server running at http://${hostname}:${port}/`);
|
|
119
|
+
});
|
|
@@ -0,0 +1,25 @@
|
|
|
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
|
+
import { DEFAULT_SETTINGS } from './appSettings';
|
|
9
|
+
// override default options with query parameters if any
|
|
10
|
+
const urlSearchParams = new URLSearchParams(window.location.search);
|
|
11
|
+
for (const param of Object.keys(DEFAULT_SETTINGS)) {
|
|
12
|
+
if (urlSearchParams.has(param)) {
|
|
13
|
+
try {
|
|
14
|
+
const value = JSON.parse(urlSearchParams.get(param) ?? 'true');
|
|
15
|
+
DEFAULT_SETTINGS[param] = Boolean(value);
|
|
16
|
+
}
|
|
17
|
+
catch (error) {
|
|
18
|
+
console.warn(`Unable to parse query parameter "${param}"`);
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
if (DEFAULT_SETTINGS.disableBeforeInput) {
|
|
23
|
+
// @ts-expect-error
|
|
24
|
+
delete window.InputEvent.prototype.getTargetRanges;
|
|
25
|
+
}
|
|
@@ -0,0 +1,476 @@
|
|
|
1
|
+
/* ============================== toolbar ============================== */
|
|
2
|
+
@container toolbar (max-width: 700px) {
|
|
3
|
+
.toolbar-item.font-size,
|
|
4
|
+
.toolbar-item.code,
|
|
5
|
+
.toolbar-item.alignment,
|
|
6
|
+
.toolbar-item.link,
|
|
7
|
+
.toolbar-item.aide,
|
|
8
|
+
.toolbar-item.color-picker,
|
|
9
|
+
.toolbar-item.text-format-additional {
|
|
10
|
+
display: none !important;
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.toolbar {
|
|
15
|
+
display: flex;
|
|
16
|
+
margin-bottom: 1px;
|
|
17
|
+
padding: 4px;
|
|
18
|
+
border-top-left-radius: 4px;
|
|
19
|
+
border-top-right-radius: 4px;
|
|
20
|
+
vertical-align: middle;
|
|
21
|
+
overflow: auto;
|
|
22
|
+
container: toolbar / inline-size;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.toolbar button.toolbar-item {
|
|
26
|
+
border: 0;
|
|
27
|
+
display: flex;
|
|
28
|
+
background: none;
|
|
29
|
+
border-radius: 8px;
|
|
30
|
+
padding: 8px;
|
|
31
|
+
cursor: pointer;
|
|
32
|
+
vertical-align: middle;
|
|
33
|
+
flex-shrink: 0;
|
|
34
|
+
align-items: center;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.toolbar button.toolbar-item:disabled {
|
|
38
|
+
cursor: not-allowed;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.toolbar button.toolbar-item.spaced {
|
|
42
|
+
margin-right: 4px;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.toolbar button.toolbar-item i.format {
|
|
46
|
+
background-size: contain;
|
|
47
|
+
display: inline-block;
|
|
48
|
+
height: 18px;
|
|
49
|
+
width: 18px;
|
|
50
|
+
vertical-align: -0.25em;
|
|
51
|
+
display: flex;
|
|
52
|
+
opacity: 0.6;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.toolbar button.toolbar-item:disabled .icon,
|
|
56
|
+
.toolbar button.toolbar-item:disabled .text,
|
|
57
|
+
.toolbar button.toolbar-item:disabled i.format,
|
|
58
|
+
.toolbar button.toolbar-item:disabled .chevron-down {
|
|
59
|
+
opacity: 0.2;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
.toolbar button.toolbar-item.active i {
|
|
63
|
+
opacity: 1;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
.toolbar .toolbar-item.font-family .text {
|
|
67
|
+
display: block;
|
|
68
|
+
max-width: 40px;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
.toolbar .code-language {
|
|
72
|
+
width: 150px;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
.toolbar .toolbar-item .text {
|
|
76
|
+
display: flex;
|
|
77
|
+
line-height: 20px;
|
|
78
|
+
vertical-align: middle;
|
|
79
|
+
font-size: 14px;
|
|
80
|
+
color: #777;
|
|
81
|
+
text-overflow: ellipsis;
|
|
82
|
+
overflow: hidden;
|
|
83
|
+
height: 20px;
|
|
84
|
+
text-align: left;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
.toolbar .toolbar-item .icon {
|
|
88
|
+
display: flex;
|
|
89
|
+
width: 20px;
|
|
90
|
+
height: 20px;
|
|
91
|
+
user-select: none;
|
|
92
|
+
line-height: 16px;
|
|
93
|
+
background-size: contain;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
.toolbar .toolbar-item .iconify {
|
|
97
|
+
display: flex;
|
|
98
|
+
width: 20px;
|
|
99
|
+
height: 20px;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
.toolbar i.chevron-down {
|
|
103
|
+
margin-top: 3px;
|
|
104
|
+
margin-left: auto;
|
|
105
|
+
width: 16px;
|
|
106
|
+
height: 16px;
|
|
107
|
+
display: flex;
|
|
108
|
+
user-select: none;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
.toolbar i.chevron-down.inside {
|
|
112
|
+
width: 16px;
|
|
113
|
+
height: 16px;
|
|
114
|
+
display: flex;
|
|
115
|
+
margin-left: -25px;
|
|
116
|
+
margin-top: 11px;
|
|
117
|
+
margin-right: 10px;
|
|
118
|
+
pointer-events: none;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
.toolbar .divider {
|
|
122
|
+
width: 1px;
|
|
123
|
+
background-color: #eee;
|
|
124
|
+
margin: 0 4px;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
/* ============================== typeahead & menu ============================== */
|
|
128
|
+
.typeahead-popover {
|
|
129
|
+
box-shadow: 0px 5px 10px rgba(0, 0, 0, 0.3);
|
|
130
|
+
border-radius: 8px;
|
|
131
|
+
z-index: 1;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
.typeahead-popover ul {
|
|
135
|
+
padding: 0;
|
|
136
|
+
list-style: none;
|
|
137
|
+
margin: 0;
|
|
138
|
+
border-radius: 8px;
|
|
139
|
+
max-height: 280px;
|
|
140
|
+
overflow-y: scroll;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
.typeahead-popover ul::-webkit-scrollbar {
|
|
144
|
+
display: none;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
.typeahead-popover ul {
|
|
148
|
+
-ms-overflow-style: none;
|
|
149
|
+
scrollbar-width: none;
|
|
150
|
+
padding: 8px 0;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
.typeahead-popover ul li {
|
|
154
|
+
margin: 0;
|
|
155
|
+
min-width: 180px;
|
|
156
|
+
font-size: 14px;
|
|
157
|
+
outline: none;
|
|
158
|
+
cursor: pointer;
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
.typeahead-popover li {
|
|
162
|
+
margin: 0 8px 0 8px;
|
|
163
|
+
padding: 8px;
|
|
164
|
+
cursor: pointer;
|
|
165
|
+
line-height: 16px;
|
|
166
|
+
font-size: 15px;
|
|
167
|
+
display: flex;
|
|
168
|
+
align-content: center;
|
|
169
|
+
flex-direction: row;
|
|
170
|
+
flex-shrink: 0;
|
|
171
|
+
border: 0;
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
.typeahead-popover li.active {
|
|
175
|
+
display: flex;
|
|
176
|
+
width: 20px;
|
|
177
|
+
height: 20px;
|
|
178
|
+
background-size: contain;
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
.typeahead-popover li .text {
|
|
182
|
+
display: flex;
|
|
183
|
+
line-height: 20px;
|
|
184
|
+
flex-grow: 1;
|
|
185
|
+
min-width: 150px;
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
.typeahead-popover li .icon {
|
|
189
|
+
display: flex;
|
|
190
|
+
width: 20px;
|
|
191
|
+
height: 20px;
|
|
192
|
+
user-select: none;
|
|
193
|
+
margin-right: 8px;
|
|
194
|
+
line-height: 16px;
|
|
195
|
+
background-size: contain;
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
/* blocklet embed option - disabled 样式 */
|
|
199
|
+
.typeahead-popover ul li.embed-option-disabled {
|
|
200
|
+
color: #999;
|
|
201
|
+
cursor: default;
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
#typeahead-menu {
|
|
205
|
+
pointer-events: none;
|
|
206
|
+
z-index: 10001;
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
#typeahead-menu > * {
|
|
210
|
+
pointer-events: auto;
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
.component-picker-menu {
|
|
214
|
+
width: 200px;
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
.mentions-menu {
|
|
218
|
+
width: 250px;
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
.auto-embed-menu {
|
|
222
|
+
width: 200px;
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
.emoji-menu {
|
|
226
|
+
width: 200px;
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
/* ============================== link-editor ============================== */
|
|
230
|
+
.link-editor .button.active,
|
|
231
|
+
.toolbar .button.active {
|
|
232
|
+
background-color: rgb(223, 232, 250);
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
.link-editor .link-input {
|
|
236
|
+
display: block;
|
|
237
|
+
width: calc(100% - 24px);
|
|
238
|
+
box-sizing: border-box;
|
|
239
|
+
margin: 8px 12px;
|
|
240
|
+
padding: 8px 12px;
|
|
241
|
+
border-radius: 15px;
|
|
242
|
+
font-size: 15px;
|
|
243
|
+
border: 0;
|
|
244
|
+
outline: 0;
|
|
245
|
+
position: relative;
|
|
246
|
+
font-family: inherit;
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
.link-editor div.link-edit {
|
|
250
|
+
width: 35px;
|
|
251
|
+
vertical-align: -0.25em;
|
|
252
|
+
position: absolute;
|
|
253
|
+
right: 0;
|
|
254
|
+
top: 0;
|
|
255
|
+
bottom: 0;
|
|
256
|
+
cursor: pointer;
|
|
257
|
+
font-size: 20px;
|
|
258
|
+
display: flex;
|
|
259
|
+
align-items: center;
|
|
260
|
+
justify-content: center;
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
.link-editor .link-input a {
|
|
264
|
+
text-decoration: none;
|
|
265
|
+
display: block;
|
|
266
|
+
white-space: nowrap;
|
|
267
|
+
overflow: hidden;
|
|
268
|
+
margin-right: 30px;
|
|
269
|
+
text-overflow: ellipsis;
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
.link-editor .link-input a:hover {
|
|
273
|
+
text-decoration: underline;
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
.link-editor .font-size-wrapper,
|
|
277
|
+
.link-editor .font-family-wrapper {
|
|
278
|
+
display: flex;
|
|
279
|
+
margin: 0 4px;
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
.link-editor select {
|
|
283
|
+
padding: 6px;
|
|
284
|
+
border: none;
|
|
285
|
+
background-color: rgba(0, 0, 0, 0.075);
|
|
286
|
+
border-radius: 4px;
|
|
287
|
+
}
|
|
288
|
+
|
|
289
|
+
/* ============================== dropdown ============================== */
|
|
290
|
+
.mention {
|
|
291
|
+
color: #666;
|
|
292
|
+
}
|
|
293
|
+
|
|
294
|
+
.mention:hover {
|
|
295
|
+
text-decoration: underline;
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
.mention:before {
|
|
299
|
+
display: inline-block;
|
|
300
|
+
content: '@';
|
|
301
|
+
}
|
|
302
|
+
|
|
303
|
+
.mention-typeahead-item-avatar {
|
|
304
|
+
width: 24px;
|
|
305
|
+
height: 24px;
|
|
306
|
+
border-radius: 15px;
|
|
307
|
+
background-size: cover;
|
|
308
|
+
}
|
|
309
|
+
|
|
310
|
+
.dropdown {
|
|
311
|
+
z-index: 10001;
|
|
312
|
+
display: block;
|
|
313
|
+
position: fixed;
|
|
314
|
+
border-radius: 8px;
|
|
315
|
+
min-height: 40px;
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
.dropdown .item {
|
|
319
|
+
padding: 8px;
|
|
320
|
+
cursor: pointer;
|
|
321
|
+
line-height: 16px;
|
|
322
|
+
font-size: 15px;
|
|
323
|
+
display: flex;
|
|
324
|
+
align-content: center;
|
|
325
|
+
flex-direction: row;
|
|
326
|
+
flex-shrink: 0;
|
|
327
|
+
justify-content: space-between;
|
|
328
|
+
border: 0;
|
|
329
|
+
max-width: 250px;
|
|
330
|
+
min-width: 100px;
|
|
331
|
+
}
|
|
332
|
+
|
|
333
|
+
.dropdown .item.fontsize-item,
|
|
334
|
+
.dropdown .item.fontsize-item .text {
|
|
335
|
+
min-width: unset;
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
.dropdown .item .active {
|
|
339
|
+
display: flex;
|
|
340
|
+
width: 20px;
|
|
341
|
+
height: 20px;
|
|
342
|
+
background-size: contain;
|
|
343
|
+
}
|
|
344
|
+
|
|
345
|
+
.dropdown .item:first-child {
|
|
346
|
+
margin-top: 8px;
|
|
347
|
+
}
|
|
348
|
+
|
|
349
|
+
.dropdown .item:last-child {
|
|
350
|
+
margin-bottom: 8px;
|
|
351
|
+
}
|
|
352
|
+
|
|
353
|
+
.dropdown .item .text {
|
|
354
|
+
display: flex;
|
|
355
|
+
line-height: 20px;
|
|
356
|
+
flex-grow: 1;
|
|
357
|
+
min-width: 150px;
|
|
358
|
+
}
|
|
359
|
+
|
|
360
|
+
.dropdown .item .icon {
|
|
361
|
+
display: flex;
|
|
362
|
+
width: 20px;
|
|
363
|
+
height: 20px;
|
|
364
|
+
user-select: none;
|
|
365
|
+
margin-right: 12px;
|
|
366
|
+
line-height: 16px;
|
|
367
|
+
background-size: contain;
|
|
368
|
+
background-position: center;
|
|
369
|
+
background-repeat: no-repeat;
|
|
370
|
+
}
|
|
371
|
+
|
|
372
|
+
.dropdown .divider {
|
|
373
|
+
width: auto;
|
|
374
|
+
margin: 4px 8px;
|
|
375
|
+
height: 1px;
|
|
376
|
+
}
|
|
377
|
+
|
|
378
|
+
.dropdown-button-text {
|
|
379
|
+
margin-left: 8px;
|
|
380
|
+
}
|
|
381
|
+
|
|
382
|
+
@media screen and (max-width: 1100px) {
|
|
383
|
+
.dropdown-button-text {
|
|
384
|
+
display: none !important;
|
|
385
|
+
}
|
|
386
|
+
.font-size .dropdown-button-text {
|
|
387
|
+
display: flex !important;
|
|
388
|
+
}
|
|
389
|
+
.code-language .dropdown-button-text {
|
|
390
|
+
display: flex !important;
|
|
391
|
+
}
|
|
392
|
+
}
|
|
393
|
+
|
|
394
|
+
/* ============================== actions & table-cell-action ============================== */
|
|
395
|
+
|
|
396
|
+
.actions {
|
|
397
|
+
position: absolute;
|
|
398
|
+
text-align: right;
|
|
399
|
+
padding: 10px;
|
|
400
|
+
bottom: 0;
|
|
401
|
+
right: 0;
|
|
402
|
+
}
|
|
403
|
+
|
|
404
|
+
.actions.tree-view {
|
|
405
|
+
border-bottom-left-radius: 0;
|
|
406
|
+
border-bottom-right-radius: 0;
|
|
407
|
+
}
|
|
408
|
+
|
|
409
|
+
.actions i {
|
|
410
|
+
background-size: contain;
|
|
411
|
+
display: inline-block;
|
|
412
|
+
height: 15px;
|
|
413
|
+
width: 15px;
|
|
414
|
+
vertical-align: -0.25em;
|
|
415
|
+
}
|
|
416
|
+
|
|
417
|
+
.action-button {
|
|
418
|
+
background-color: #eee;
|
|
419
|
+
border: 0;
|
|
420
|
+
padding: 8px 12px;
|
|
421
|
+
position: relative;
|
|
422
|
+
margin-left: 5px;
|
|
423
|
+
border-radius: 15px;
|
|
424
|
+
color: #222;
|
|
425
|
+
cursor: pointer;
|
|
426
|
+
display: flex;
|
|
427
|
+
}
|
|
428
|
+
|
|
429
|
+
.action-button .MuiLoadingButton-loadingIndicator {
|
|
430
|
+
position: relative;
|
|
431
|
+
left: 0;
|
|
432
|
+
margin-right: 8px;
|
|
433
|
+
}
|
|
434
|
+
|
|
435
|
+
.action-button:hover {
|
|
436
|
+
background-color: #ddd;
|
|
437
|
+
color: #000;
|
|
438
|
+
}
|
|
439
|
+
|
|
440
|
+
.action-button-mic.active {
|
|
441
|
+
animation: mic-pulsate-color 3s infinite;
|
|
442
|
+
}
|
|
443
|
+
button.action-button:disabled {
|
|
444
|
+
cursor: not-allowed;
|
|
445
|
+
}
|
|
446
|
+
|
|
447
|
+
.table-cell-action-button-container {
|
|
448
|
+
position: absolute;
|
|
449
|
+
z-index: 3;
|
|
450
|
+
top: 0;
|
|
451
|
+
left: 0;
|
|
452
|
+
will-change: transform;
|
|
453
|
+
}
|
|
454
|
+
.table-cell-action-button-container.table-cell-action-button-container--active {
|
|
455
|
+
pointer-events: auto;
|
|
456
|
+
opacity: 1;
|
|
457
|
+
}
|
|
458
|
+
.table-cell-action-button-container.table-cell-action-button-container--inactive {
|
|
459
|
+
pointer-events: none;
|
|
460
|
+
opacity: 0;
|
|
461
|
+
}
|
|
462
|
+
|
|
463
|
+
.table-cell-action-button {
|
|
464
|
+
display: flex;
|
|
465
|
+
justify-content: center;
|
|
466
|
+
align-items: center;
|
|
467
|
+
border: 0;
|
|
468
|
+
position: absolute;
|
|
469
|
+
top: 10px;
|
|
470
|
+
right: 10px;
|
|
471
|
+
border-radius: 15px;
|
|
472
|
+
color: #222;
|
|
473
|
+
display: inline-block;
|
|
474
|
+
cursor: pointer;
|
|
475
|
+
opacity: 0.75;
|
|
476
|
+
}
|