@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,554 @@
|
|
|
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 { css } from '@emotion/css';
|
|
9
|
+
import { tableClasses } from './table';
|
|
10
|
+
const ltr = css `
|
|
11
|
+
text-align: left;
|
|
12
|
+
`;
|
|
13
|
+
const rtl = css `
|
|
14
|
+
text-align: right;
|
|
15
|
+
`;
|
|
16
|
+
const paragraph = css `
|
|
17
|
+
margin: 1em 0;
|
|
18
|
+
position: relative;
|
|
19
|
+
`;
|
|
20
|
+
const quote = css `
|
|
21
|
+
margin: 0;
|
|
22
|
+
margin-left: 0;
|
|
23
|
+
margin-bottom: 10px;
|
|
24
|
+
font-size: 15px;
|
|
25
|
+
color: rgb(101, 103, 107);
|
|
26
|
+
border-left-color: rgb(206, 208, 212);
|
|
27
|
+
border-left-width: 4px;
|
|
28
|
+
border-left-style: solid;
|
|
29
|
+
padding-left: 16px;
|
|
30
|
+
`;
|
|
31
|
+
const h1 = css `
|
|
32
|
+
font-size: 2em;
|
|
33
|
+
color: rgb(5, 5, 5);
|
|
34
|
+
font-weight: 700;
|
|
35
|
+
margin: 0;
|
|
36
|
+
margin-top: 24px;
|
|
37
|
+
margin-bottom: 16px;
|
|
38
|
+
border-bottom: 1px solid hsla(210, 18%, 87%, 1);
|
|
39
|
+
|
|
40
|
+
@media (max-width: 768px) {
|
|
41
|
+
font-size: 1.5em;
|
|
42
|
+
}
|
|
43
|
+
`;
|
|
44
|
+
const h2 = css `
|
|
45
|
+
font-size: 1.5em;
|
|
46
|
+
font-weight: 700;
|
|
47
|
+
margin: 0;
|
|
48
|
+
margin-top: 24px;
|
|
49
|
+
margin-bottom: 16px;
|
|
50
|
+
border-bottom: 1px solid hsla(210, 18%, 87%, 1);
|
|
51
|
+
|
|
52
|
+
@media (max-width: 768px) {
|
|
53
|
+
font-size: 1.25em;
|
|
54
|
+
}
|
|
55
|
+
`;
|
|
56
|
+
const h3 = css `
|
|
57
|
+
font-size: 1.25em;
|
|
58
|
+
margin: 0;
|
|
59
|
+
margin-bottom: 16px;
|
|
60
|
+
|
|
61
|
+
@media (max-width: 768px) {
|
|
62
|
+
font-size: 1em;
|
|
63
|
+
}
|
|
64
|
+
`;
|
|
65
|
+
const h4 = css `
|
|
66
|
+
margin: 0;
|
|
67
|
+
margin-bottom: 16px;
|
|
68
|
+
`;
|
|
69
|
+
const h5 = css `
|
|
70
|
+
margin: 0;
|
|
71
|
+
margin-bottom: 16px;
|
|
72
|
+
`;
|
|
73
|
+
const textBold = css `
|
|
74
|
+
font-weight: bold;
|
|
75
|
+
`;
|
|
76
|
+
const textItalic = css `
|
|
77
|
+
font-style: italic;
|
|
78
|
+
`;
|
|
79
|
+
const textUnderline = css `
|
|
80
|
+
text-decoration: underline;
|
|
81
|
+
`;
|
|
82
|
+
const textStrikethrough = css `
|
|
83
|
+
text-decoration: line-through;
|
|
84
|
+
`;
|
|
85
|
+
const textUnderlineStrikethrough = css `
|
|
86
|
+
text-decoration: underline line-through;
|
|
87
|
+
`;
|
|
88
|
+
const textSubscript = css `
|
|
89
|
+
font-size: 0.8em;
|
|
90
|
+
vertical-align: sub !important;
|
|
91
|
+
`;
|
|
92
|
+
const textSuperscript = css `
|
|
93
|
+
font-size: 0.8em;
|
|
94
|
+
vertical-align: super;
|
|
95
|
+
`;
|
|
96
|
+
const textCode = css `
|
|
97
|
+
background-color: rgb(240, 242, 245);
|
|
98
|
+
padding: 1px 0.25rem;
|
|
99
|
+
font-family: Menlo, Consolas, Monaco, monospace;
|
|
100
|
+
font-size: 94%;
|
|
101
|
+
`;
|
|
102
|
+
const hashtag = css `
|
|
103
|
+
background-color: rgba(88, 144, 255, 0.15);
|
|
104
|
+
border-bottom: 1px solid rgba(88, 144, 255, 0.3);
|
|
105
|
+
`;
|
|
106
|
+
const link = css `
|
|
107
|
+
color: rgb(33, 111, 219);
|
|
108
|
+
text-decoration: none;
|
|
109
|
+
|
|
110
|
+
&:hover {
|
|
111
|
+
text-decoration: underline;
|
|
112
|
+
}
|
|
113
|
+
`;
|
|
114
|
+
const code = css `
|
|
115
|
+
background-color: rgb(240, 242, 245);
|
|
116
|
+
font-family: Menlo, Consolas, Monaco, monospace;
|
|
117
|
+
display: block;
|
|
118
|
+
padding: 8px 8px 8px 52px;
|
|
119
|
+
line-height: 1.53;
|
|
120
|
+
font-size: 13px;
|
|
121
|
+
margin: 0;
|
|
122
|
+
margin-top: 8px;
|
|
123
|
+
margin-bottom: 8px;
|
|
124
|
+
tab-size: 2;
|
|
125
|
+
/* white-space: pre; */
|
|
126
|
+
overflow-x: auto;
|
|
127
|
+
position: relative;
|
|
128
|
+
|
|
129
|
+
&:before {
|
|
130
|
+
content: attr(data-gutter);
|
|
131
|
+
position: absolute;
|
|
132
|
+
background-color: #eee;
|
|
133
|
+
left: 0;
|
|
134
|
+
top: 0;
|
|
135
|
+
border-right: 1px solid #ccc;
|
|
136
|
+
padding: 8px;
|
|
137
|
+
color: #777;
|
|
138
|
+
white-space: pre-wrap;
|
|
139
|
+
text-align: right;
|
|
140
|
+
min-width: 25px;
|
|
141
|
+
}
|
|
142
|
+
`;
|
|
143
|
+
const characterLimit = css `
|
|
144
|
+
display: inline;
|
|
145
|
+
background-color: #ffbbbb !important;
|
|
146
|
+
`;
|
|
147
|
+
const ol1 = css `
|
|
148
|
+
padding: 0;
|
|
149
|
+
margin: 0;
|
|
150
|
+
/* margin-left: 16px; */
|
|
151
|
+
`;
|
|
152
|
+
const ol2 = css `
|
|
153
|
+
padding: 0;
|
|
154
|
+
margin: 0;
|
|
155
|
+
margin-left: 2em;
|
|
156
|
+
list-style-type: upper-alpha;
|
|
157
|
+
`;
|
|
158
|
+
const ol3 = css `
|
|
159
|
+
padding: 0;
|
|
160
|
+
margin: 0;
|
|
161
|
+
margin-left: 2em;
|
|
162
|
+
list-style-type: lower-alpha;
|
|
163
|
+
`;
|
|
164
|
+
const ol4 = css `
|
|
165
|
+
padding: 0;
|
|
166
|
+
margin: 0;
|
|
167
|
+
margin-left: 2em;
|
|
168
|
+
list-style-type: upper-roman;
|
|
169
|
+
`;
|
|
170
|
+
const ol5 = css `
|
|
171
|
+
padding: 0;
|
|
172
|
+
margin: 0;
|
|
173
|
+
margin-left: 2em;
|
|
174
|
+
list-style-type: lower-roman;
|
|
175
|
+
`;
|
|
176
|
+
const ul = css `
|
|
177
|
+
padding: 0;
|
|
178
|
+
margin: 10px 0;
|
|
179
|
+
& & {
|
|
180
|
+
margin: 0;
|
|
181
|
+
}
|
|
182
|
+
`;
|
|
183
|
+
const listItem = css `
|
|
184
|
+
margin-left: 24px;
|
|
185
|
+
`;
|
|
186
|
+
const listItemUnchecked = css `
|
|
187
|
+
position: relative;
|
|
188
|
+
margin-left: 0;
|
|
189
|
+
margin-right: 8px;
|
|
190
|
+
padding-left: 24px;
|
|
191
|
+
padding-right: 24px;
|
|
192
|
+
list-style-type: none;
|
|
193
|
+
outline: none;
|
|
194
|
+
|
|
195
|
+
&:before {
|
|
196
|
+
content: '';
|
|
197
|
+
width: 16px;
|
|
198
|
+
height: 16px;
|
|
199
|
+
top: 6px;
|
|
200
|
+
left: 0;
|
|
201
|
+
cursor: pointer;
|
|
202
|
+
display: block;
|
|
203
|
+
background-size: cover;
|
|
204
|
+
position: absolute;
|
|
205
|
+
border: 1px solid #999;
|
|
206
|
+
border-radius: 2px;
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
.blocklet-editor-busy &:before {
|
|
210
|
+
border: 0;
|
|
211
|
+
background-color: #ddd;
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
&[dir='rtl']:before {
|
|
215
|
+
left: auto;
|
|
216
|
+
right: 0;
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
&:focus:before {
|
|
220
|
+
box-shadow: 0 0 0 2px #a6cdfe;
|
|
221
|
+
border-radius: 2px;
|
|
222
|
+
}
|
|
223
|
+
`;
|
|
224
|
+
const listItemChecked = css `
|
|
225
|
+
position: relative;
|
|
226
|
+
margin-left: 0;
|
|
227
|
+
margin-right: 8px;
|
|
228
|
+
padding-left: 24px;
|
|
229
|
+
padding-right: 24px;
|
|
230
|
+
list-style-type: none;
|
|
231
|
+
outline: none;
|
|
232
|
+
|
|
233
|
+
&:before {
|
|
234
|
+
content: '';
|
|
235
|
+
width: 16px;
|
|
236
|
+
height: 16px;
|
|
237
|
+
top: 6px;
|
|
238
|
+
left: 0;
|
|
239
|
+
cursor: pointer;
|
|
240
|
+
display: block;
|
|
241
|
+
background-size: cover;
|
|
242
|
+
position: absolute;
|
|
243
|
+
border: 1px solid rgb(61, 135, 245);
|
|
244
|
+
border-radius: 2px;
|
|
245
|
+
background-color: #3d87f5;
|
|
246
|
+
background-repeat: no-repeat;
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
.blocklet-editor-busy &:before {
|
|
250
|
+
border: 0;
|
|
251
|
+
background-color: #ddd;
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
&[dir='rtl']:before {
|
|
255
|
+
left: auto;
|
|
256
|
+
right: 0;
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
&:focus:before {
|
|
260
|
+
box-shadow: 0 0 0 2px #a6cdfe;
|
|
261
|
+
border-radius: 2px;
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
&:after {
|
|
265
|
+
content: '';
|
|
266
|
+
cursor: pointer;
|
|
267
|
+
border-color: #fff;
|
|
268
|
+
border-style: solid;
|
|
269
|
+
position: absolute;
|
|
270
|
+
display: block;
|
|
271
|
+
top: 9px;
|
|
272
|
+
width: 4px;
|
|
273
|
+
left: 6px;
|
|
274
|
+
height: 9px;
|
|
275
|
+
transform: rotate(45deg);
|
|
276
|
+
border-width: 0 2px 2px 0;
|
|
277
|
+
}
|
|
278
|
+
`;
|
|
279
|
+
const nestedListItem = css `
|
|
280
|
+
list-style-type: none;
|
|
281
|
+
|
|
282
|
+
&:before,
|
|
283
|
+
&:after {
|
|
284
|
+
display: none;
|
|
285
|
+
}
|
|
286
|
+
`;
|
|
287
|
+
const tokenComment = css `
|
|
288
|
+
color: #6a9955;
|
|
289
|
+
`;
|
|
290
|
+
const tokenPunctuation = css `
|
|
291
|
+
color: #d4d4d4;
|
|
292
|
+
`;
|
|
293
|
+
const tokenProperty = css `
|
|
294
|
+
color: #9cdcfe;
|
|
295
|
+
`;
|
|
296
|
+
const tokenSelector = css `
|
|
297
|
+
color: #d7ba7d;
|
|
298
|
+
`;
|
|
299
|
+
const tokenOperator = css `
|
|
300
|
+
color: #d4d4d4;
|
|
301
|
+
`;
|
|
302
|
+
const tokenAttr = css `
|
|
303
|
+
color: #9cdcfe;
|
|
304
|
+
`;
|
|
305
|
+
const tokenVariable = css `
|
|
306
|
+
color: #9cdcfe;
|
|
307
|
+
`;
|
|
308
|
+
const tokenFunction = css `
|
|
309
|
+
color: #dcdcaa;
|
|
310
|
+
`;
|
|
311
|
+
const mark = css `
|
|
312
|
+
background: rgba(255, 212, 0, 0.14);
|
|
313
|
+
border-bottom: 2px solid rgba(255, 212, 0, 0.3);
|
|
314
|
+
padding-bottom: 2px;
|
|
315
|
+
|
|
316
|
+
&.selected {
|
|
317
|
+
background: rgba(255, 212, 0, 0.5);
|
|
318
|
+
border-bottom: 2px solid rgba(255, 212, 0, 1);
|
|
319
|
+
}
|
|
320
|
+
`;
|
|
321
|
+
const markOverlap = css `
|
|
322
|
+
background: rgba(255, 212, 0, 0.3);
|
|
323
|
+
border-bottom: 2px solid rgba(255, 212, 0, 0.7);
|
|
324
|
+
|
|
325
|
+
&.selected {
|
|
326
|
+
background: rgba(255, 212, 0, 0.7);
|
|
327
|
+
border-bottom: 2px solid rgba(255, 212, 0, 0.7);
|
|
328
|
+
}
|
|
329
|
+
`;
|
|
330
|
+
const embedBlock = css `
|
|
331
|
+
user-select: none;
|
|
332
|
+
padding: 8px 0;
|
|
333
|
+
`;
|
|
334
|
+
const embedBlockFocus = css `
|
|
335
|
+
outline: 2px solid rgb(60, 132, 244);
|
|
336
|
+
`;
|
|
337
|
+
const alert = css `
|
|
338
|
+
// user-select: none;
|
|
339
|
+
padding: 8px 0;
|
|
340
|
+
`;
|
|
341
|
+
const alertFocus = css `
|
|
342
|
+
outline: 2px solid rgb(60, 132, 244);
|
|
343
|
+
`;
|
|
344
|
+
const image = css `
|
|
345
|
+
cursor: default;
|
|
346
|
+
display: inline-block;
|
|
347
|
+
position: relative;
|
|
348
|
+
user-select: none;
|
|
349
|
+
|
|
350
|
+
img {
|
|
351
|
+
max-width: 100% !important;
|
|
352
|
+
height: inherit !important;
|
|
353
|
+
cursor: default;
|
|
354
|
+
|
|
355
|
+
&.focused {
|
|
356
|
+
outline: 2px solid rgb(60, 132, 244);
|
|
357
|
+
user-select: none;
|
|
358
|
+
|
|
359
|
+
&.draggable {
|
|
360
|
+
cursor: grab;
|
|
361
|
+
|
|
362
|
+
&:active {
|
|
363
|
+
cursor: grabbing;
|
|
364
|
+
}
|
|
365
|
+
}
|
|
366
|
+
}
|
|
367
|
+
}
|
|
368
|
+
|
|
369
|
+
.image-caption-container {
|
|
370
|
+
display: block;
|
|
371
|
+
position: absolute;
|
|
372
|
+
bottom: 8px;
|
|
373
|
+
left: 0;
|
|
374
|
+
right: 0;
|
|
375
|
+
padding: 0;
|
|
376
|
+
margin: 0;
|
|
377
|
+
|
|
378
|
+
background-color: rgba(255, 255, 255, 0.9);
|
|
379
|
+
min-width: 100px;
|
|
380
|
+
color: #000;
|
|
381
|
+
overflow: hidden;
|
|
382
|
+
|
|
383
|
+
.tree-view-output {
|
|
384
|
+
margin: 0;
|
|
385
|
+
border-radius: 0;
|
|
386
|
+
}
|
|
387
|
+
|
|
388
|
+
// fix #924
|
|
389
|
+
.ImageNode__contentEditable {
|
|
390
|
+
box-sizing: content-box;
|
|
391
|
+
}
|
|
392
|
+
}
|
|
393
|
+
|
|
394
|
+
.image-caption-button {
|
|
395
|
+
display: block;
|
|
396
|
+
position: absolute;
|
|
397
|
+
height: 40px;
|
|
398
|
+
bottom: 0;
|
|
399
|
+
top: 0;
|
|
400
|
+
left: 0;
|
|
401
|
+
right: 0;
|
|
402
|
+
width: 30%;
|
|
403
|
+
padding: 10px;
|
|
404
|
+
margin: auto;
|
|
405
|
+
border: 2px solid rgba(255, 255, 255, 0.3);
|
|
406
|
+
border-radius: 5px;
|
|
407
|
+
background-color: rgba(0, 0, 0, 0.5);
|
|
408
|
+
min-width: 100px;
|
|
409
|
+
color: #fff;
|
|
410
|
+
cursor: pointer;
|
|
411
|
+
user-select: none;
|
|
412
|
+
|
|
413
|
+
&:hover {
|
|
414
|
+
background-color: rgba(60, 132, 244, 0.5);
|
|
415
|
+
}
|
|
416
|
+
}
|
|
417
|
+
|
|
418
|
+
.image-resizer {
|
|
419
|
+
display: block;
|
|
420
|
+
width: 7px;
|
|
421
|
+
height: 7px;
|
|
422
|
+
position: absolute;
|
|
423
|
+
background-color: rgb(60, 132, 244);
|
|
424
|
+
border: 1px solid #fff;
|
|
425
|
+
|
|
426
|
+
&.image-resizer-n {
|
|
427
|
+
top: -6px;
|
|
428
|
+
left: 48%;
|
|
429
|
+
cursor: n-resize;
|
|
430
|
+
}
|
|
431
|
+
|
|
432
|
+
&.image-resizer-ne {
|
|
433
|
+
top: -6px;
|
|
434
|
+
right: -6px;
|
|
435
|
+
cursor: ne-resize;
|
|
436
|
+
}
|
|
437
|
+
|
|
438
|
+
&.image-resizer-e {
|
|
439
|
+
bottom: 48%;
|
|
440
|
+
right: -6px;
|
|
441
|
+
cursor: e-resize;
|
|
442
|
+
}
|
|
443
|
+
|
|
444
|
+
&.image-resizer-se {
|
|
445
|
+
bottom: -2px;
|
|
446
|
+
right: -6px;
|
|
447
|
+
cursor: nwse-resize;
|
|
448
|
+
}
|
|
449
|
+
|
|
450
|
+
&.image-resizer-s {
|
|
451
|
+
bottom: -2px;
|
|
452
|
+
left: 48%;
|
|
453
|
+
cursor: s-resize;
|
|
454
|
+
}
|
|
455
|
+
|
|
456
|
+
&.image-resizer-sw {
|
|
457
|
+
bottom: -2px;
|
|
458
|
+
left: -6px;
|
|
459
|
+
cursor: sw-resize;
|
|
460
|
+
}
|
|
461
|
+
|
|
462
|
+
&.image-resizer-w {
|
|
463
|
+
bottom: 48%;
|
|
464
|
+
left: -6px;
|
|
465
|
+
cursor: w-resize;
|
|
466
|
+
}
|
|
467
|
+
|
|
468
|
+
&.image-resizer-nw {
|
|
469
|
+
top: -6px;
|
|
470
|
+
left: -6px;
|
|
471
|
+
cursor: nw-resize;
|
|
472
|
+
}
|
|
473
|
+
}
|
|
474
|
+
`;
|
|
475
|
+
const responsiveContainer = css `
|
|
476
|
+
display: block;
|
|
477
|
+
max-width: 100%;
|
|
478
|
+
`;
|
|
479
|
+
const defaultTheme = {
|
|
480
|
+
ltr,
|
|
481
|
+
rtl,
|
|
482
|
+
paragraph,
|
|
483
|
+
quote,
|
|
484
|
+
heading: { h1, h2, h3, h4, h5 },
|
|
485
|
+
text: {
|
|
486
|
+
bold: textBold,
|
|
487
|
+
code: textCode,
|
|
488
|
+
italic: textItalic,
|
|
489
|
+
strikethrough: textStrikethrough,
|
|
490
|
+
subscript: textSubscript,
|
|
491
|
+
superscript: textSuperscript,
|
|
492
|
+
underline: textUnderline,
|
|
493
|
+
underlineStrikethrough: textUnderlineStrikethrough,
|
|
494
|
+
},
|
|
495
|
+
hashtag,
|
|
496
|
+
link,
|
|
497
|
+
code,
|
|
498
|
+
...tableClasses,
|
|
499
|
+
characterLimit,
|
|
500
|
+
list: {
|
|
501
|
+
listitem: listItem,
|
|
502
|
+
listitemChecked: listItemChecked,
|
|
503
|
+
listitemUnchecked: listItemUnchecked,
|
|
504
|
+
nested: {
|
|
505
|
+
listitem: nestedListItem,
|
|
506
|
+
},
|
|
507
|
+
olDepth: [ol1, ol2, ol3, ol4, ol5],
|
|
508
|
+
ul,
|
|
509
|
+
},
|
|
510
|
+
codeHighlight: {
|
|
511
|
+
atrule: tokenAttr,
|
|
512
|
+
attr: tokenAttr,
|
|
513
|
+
boolean: tokenProperty,
|
|
514
|
+
builtin: tokenSelector,
|
|
515
|
+
cdata: tokenComment,
|
|
516
|
+
char: tokenSelector,
|
|
517
|
+
class: tokenFunction,
|
|
518
|
+
comment: tokenComment,
|
|
519
|
+
constant: tokenProperty,
|
|
520
|
+
deleted: tokenProperty,
|
|
521
|
+
doctype: tokenComment,
|
|
522
|
+
entity: tokenOperator,
|
|
523
|
+
function: tokenFunction,
|
|
524
|
+
important: tokenVariable,
|
|
525
|
+
inserted: tokenSelector,
|
|
526
|
+
keyword: tokenAttr,
|
|
527
|
+
namespace: tokenVariable,
|
|
528
|
+
number: tokenProperty,
|
|
529
|
+
operator: tokenOperator,
|
|
530
|
+
prolog: tokenComment,
|
|
531
|
+
property: tokenProperty,
|
|
532
|
+
punctuation: tokenPunctuation,
|
|
533
|
+
regex: tokenVariable,
|
|
534
|
+
selector: tokenSelector,
|
|
535
|
+
string: tokenSelector,
|
|
536
|
+
symbol: tokenProperty,
|
|
537
|
+
tag: tokenProperty,
|
|
538
|
+
url: tokenOperator,
|
|
539
|
+
variable: tokenVariable,
|
|
540
|
+
},
|
|
541
|
+
embedBlock: {
|
|
542
|
+
base: embedBlock,
|
|
543
|
+
focus: embedBlockFocus,
|
|
544
|
+
},
|
|
545
|
+
alert: {
|
|
546
|
+
base: alert,
|
|
547
|
+
focus: alertFocus,
|
|
548
|
+
},
|
|
549
|
+
image,
|
|
550
|
+
mark,
|
|
551
|
+
markOverlap,
|
|
552
|
+
responsiveContainer,
|
|
553
|
+
};
|
|
554
|
+
export default defaultTheme;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import './table.css';
|
|
2
|
+
export const tableClasses = {
|
|
3
|
+
table: 'PlaygroundEditorTheme__table',
|
|
4
|
+
tableAddColumns: 'PlaygroundEditorTheme__tableAddColumns',
|
|
5
|
+
tableAddRows: 'PlaygroundEditorTheme__tableAddRows',
|
|
6
|
+
center: 'PlaygroundEditorTheme__tableAlignmentCenter',
|
|
7
|
+
right: 'PlaygroundEditorTheme__tableAlignmentRight',
|
|
8
|
+
tableCell: 'PlaygroundEditorTheme__tableCell',
|
|
9
|
+
tableCellActionButton: 'PlaygroundEditorTheme__tableCellActionButton',
|
|
10
|
+
tableCellActionButtonContainer: 'PlaygroundEditorTheme__tableCellActionButtonContainer',
|
|
11
|
+
tableCellHeader: 'PlaygroundEditorTheme__tableCellHeader',
|
|
12
|
+
tableCellResizer: 'PlaygroundEditorTheme__tableCellResizer',
|
|
13
|
+
tableCellSelected: 'PlaygroundEditorTheme__tableCellSelected',
|
|
14
|
+
tableFrozenColumn: 'PlaygroundEditorTheme__tableFrozenColumn',
|
|
15
|
+
tableFrozenRow: 'PlaygroundEditorTheme__tableFrozenRow',
|
|
16
|
+
tableRowStriping: 'PlaygroundEditorTheme__tableRowStriping',
|
|
17
|
+
tableScrollableWrapper: 'PlaygroundEditorTheme__tableScrollableWrapper',
|
|
18
|
+
tableSelected: 'PlaygroundEditorTheme__tableSelected',
|
|
19
|
+
tableSelection: 'PlaygroundEditorTheme__tableSelection',
|
|
20
|
+
};
|