@cherry-markdown/cherry-markdown-dev 0.8.58-dev
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/package.json +149 -0
- package/src/Cherry.config.js +625 -0
- package/src/Cherry.js +1104 -0
- package/src/CherryStatic.js +70 -0
- package/src/Editor.js +748 -0
- package/src/Engine.js +381 -0
- package/src/Event.js +140 -0
- package/src/Factory.js +180 -0
- package/src/Logger.js +31 -0
- package/src/Previewer.js +1183 -0
- package/src/Sanitizer.js +4 -0
- package/src/Sanitizer.node.js +7 -0
- package/src/UrlCache.js +98 -0
- package/src/addons/advance/cherry-table-echarts-plugin.js +170 -0
- package/src/addons/cherry-code-block-mermaid-plugin.js +158 -0
- package/src/addons/cherry-code-block-plantuml-plugin.js +106 -0
- package/src/core/HookCenter.js +297 -0
- package/src/core/HooksConfig.js +100 -0
- package/src/core/ParagraphBase.js +332 -0
- package/src/core/SentenceBase.js +65 -0
- package/src/core/SyntaxBase.js +194 -0
- package/src/core/hooks/AutoLink.js +232 -0
- package/src/core/hooks/BackgroundColor.js +46 -0
- package/src/core/hooks/Blockquote.js +70 -0
- package/src/core/hooks/Br.js +85 -0
- package/src/core/hooks/CodeBlock.js +446 -0
- package/src/core/hooks/Color.js +46 -0
- package/src/core/hooks/CommentReference.js +96 -0
- package/src/core/hooks/Detail.js +108 -0
- package/src/core/hooks/Emoji.config.js +1825 -0
- package/src/core/hooks/Emoji.js +119 -0
- package/src/core/hooks/Emphasis.js +113 -0
- package/src/core/hooks/Footnote.js +125 -0
- package/src/core/hooks/FrontMatter.js +51 -0
- package/src/core/hooks/Header.js +234 -0
- package/src/core/hooks/HighLight.js +37 -0
- package/src/core/hooks/Hr.js +52 -0
- package/src/core/hooks/HtmlBlock.js +184 -0
- package/src/core/hooks/Image.js +174 -0
- package/src/core/hooks/InlineCode.js +48 -0
- package/src/core/hooks/InlineMath.js +107 -0
- package/src/core/hooks/Link.js +160 -0
- package/src/core/hooks/List.js +264 -0
- package/src/core/hooks/MathBlock.js +103 -0
- package/src/core/hooks/Panel.js +145 -0
- package/src/core/hooks/Paragraph.js +84 -0
- package/src/core/hooks/Ruby.js +34 -0
- package/src/core/hooks/Size.js +51 -0
- package/src/core/hooks/Strikethrough.js +54 -0
- package/src/core/hooks/Sub.js +47 -0
- package/src/core/hooks/SuggestList.js +333 -0
- package/src/core/hooks/Suggester.js +707 -0
- package/src/core/hooks/Sup.js +47 -0
- package/src/core/hooks/Table.js +275 -0
- package/src/core/hooks/Toc.js +292 -0
- package/src/core/hooks/Transfer.js +47 -0
- package/src/core/hooks/Underline.js +37 -0
- package/src/index.core.js +29 -0
- package/src/index.engine.core.js +68 -0
- package/src/index.engine.js +28 -0
- package/src/index.js +32 -0
- package/src/libs/mermaidAPI.8.4.8.js +1 -0
- package/src/libs/mermaidAPI.8.5.2.js +42 -0
- package/src/libs/rawdeflate.js +1663 -0
- package/src/locales/en_US.js +139 -0
- package/src/locales/index.js +25 -0
- package/src/locales/ru_RU.js +139 -0
- package/src/locales/zh_CN.js +142 -0
- package/src/sass/base.scss +26 -0
- package/src/sass/bubble_formula.scss +166 -0
- package/src/sass/ch-icon.scss +118 -0
- package/src/sass/cherry.scss +1116 -0
- package/src/sass/components/bubble.scss +173 -0
- package/src/sass/components/shortcut_key_config.scss +108 -0
- package/src/sass/formula_utils_bubble.scss +82 -0
- package/src/sass/icon_template.scss +24 -0
- package/src/sass/icons/uEA03-list.svg +19 -0
- package/src/sass/icons/uEA04-check.svg +14 -0
- package/src/sass/icons/uEA09-square.svg +10 -0
- package/src/sass/icons/uEA0A-bold.svg +20 -0
- package/src/sass/icons/uEA0B-code.svg +18 -0
- package/src/sass/icons/uEA0C-color.svg +13 -0
- package/src/sass/icons/uEA0D-header.svg +8 -0
- package/src/sass/icons/uEA0E-image.svg +15 -0
- package/src/sass/icons/uEA0F-italic.svg +8 -0
- package/src/sass/icons/uEA10-link.svg +16 -0
- package/src/sass/icons/uEA11-ol.svg +21 -0
- package/src/sass/icons/uEA12-size.svg +11 -0
- package/src/sass/icons/uEA13-strike.svg +16 -0
- package/src/sass/icons/uEA14-table.svg +12 -0
- package/src/sass/icons/uEA15-ul.svg +17 -0
- package/src/sass/icons/uEA16-underline.svg +13 -0
- package/src/sass/icons/uEA17-word.svg +16 -0
- package/src/sass/icons/uEA18-blockquote.svg +11 -0
- package/src/sass/icons/uEA19-font.svg +10 -0
- package/src/sass/icons/uEA1F-insertClass.svg +39 -0
- package/src/sass/icons/uEA20-insertFlow.svg +8 -0
- package/src/sass/icons/uEA21-insertFormula.svg +23 -0
- package/src/sass/icons/uEA22-insertGantt.svg +13 -0
- package/src/sass/icons/uEA23-insertGraph.svg +13 -0
- package/src/sass/icons/uEA24-insertPie.svg +19 -0
- package/src/sass/icons/uEA25-insertSeq.svg +20 -0
- package/src/sass/icons/uEA26-insertState.svg +35 -0
- package/src/sass/icons/uEA27-line.svg +11 -0
- package/src/sass/icons/uEA28-preview.svg +18 -0
- package/src/sass/icons/uEA29-previewClose.svg +24 -0
- package/src/sass/icons/uEA2A-toc.svg +24 -0
- package/src/sass/icons/uEA2D-sub.svg +15 -0
- package/src/sass/icons/uEA2E-sup.svg +15 -0
- package/src/sass/icons/uEA2F-h1.svg +16 -0
- package/src/sass/icons/uEA30-h2.svg +20 -0
- package/src/sass/icons/uEA31-h3.svg +23 -0
- package/src/sass/icons/uEA32-h4.svg +16 -0
- package/src/sass/icons/uEA33-h5.svg +20 -0
- package/src/sass/icons/uEA34-h6.svg +17 -0
- package/src/sass/icons/uEA35-video.svg +20 -0
- package/src/sass/icons/uEA36-insert.svg +25 -0
- package/src/sass/icons/uEA37-little_table.svg +30 -0
- package/src/sass/icons/uEA38-pdf.svg +27 -0
- package/src/sass/icons/uEA39-checklist.svg +22 -0
- package/src/sass/icons/uEA40-close.svg +12 -0
- package/src/sass/icons/uEA41-fullscreen.svg +81 -0
- package/src/sass/icons/uEA42-minscreen.svg +77 -0
- package/src/sass/icons/uEA43-insertChart.svg +23 -0
- package/src/sass/icons/uEA44-question.svg +25 -0
- package/src/sass/icons/uEA45-settings.svg +32 -0
- package/src/sass/icons/uEA46-ok.svg +7 -0
- package/src/sass/icons/uEA47-br.svg +22 -0
- package/src/sass/icons/uEA48-normal.svg +15 -0
- package/src/sass/icons/uEA49-undo.svg +19 -0
- package/src/sass/icons/uEA50-redo.svg +21 -0
- package/src/sass/icons/uEA51-copy.svg +6 -0
- package/src/sass/icons/uEA52-phone.svg +5 -0
- package/src/sass/icons/uEA53-cherry-table-delete.svg +17 -0
- package/src/sass/icons/uEA54-cherry-table-insert-bottom.svg +16 -0
- package/src/sass/icons/uEA55-cherry-table-insert-left.svg +15 -0
- package/src/sass/icons/uEA56-cherry-table-insert-right.svg +16 -0
- package/src/sass/icons/uEA57-cherry-table-insert-top.svg +16 -0
- package/src/sass/icons/uEA58-sort-s.svg +13 -0
- package/src/sass/icons/uEA59-pinyin.svg +1 -0
- package/src/sass/icons/uEA5A-create.svg +24 -0
- package/src/sass/icons/uEA5B-download.svg +34 -0
- package/src/sass/icons/uEA5C-edit.svg +3 -0
- package/src/sass/icons/uEA5D-export.svg +53 -0
- package/src/sass/icons/uEA5E-folder-open.svg +3 -0
- package/src/sass/icons/uEA5F-folder.svg +3 -0
- package/src/sass/icons/uEA60-help.svg +5 -0
- package/src/sass/icons/uEA61-pen-fill.svg +13 -0
- package/src/sass/icons/uEA62-pen.svg +3 -0
- package/src/sass/icons/uEA64-tips.svg +5 -0
- package/src/sass/icons/uEA65-warn.svg +5 -0
- package/src/sass/icons/uEA66-mistake.svg +4 -0
- package/src/sass/icons/uEA67-success.svg +4 -0
- package/src/sass/icons/uEA68-danger.svg +4 -0
- package/src/sass/icons/uEA69-info.svg +5 -0
- package/src/sass/icons/uEA6A-primary.svg +5 -0
- package/src/sass/icons/uEA6B-warning.svg +5 -0
- package/src/sass/icons/uEA6C-justify.svg +19 -0
- package/src/sass/icons/uEA6D-justifyCenter.svg +19 -0
- package/src/sass/icons/uEA6E-justifyLeft.svg +19 -0
- package/src/sass/icons/uEA6F-justifyRight.svg +19 -0
- package/src/sass/icons/uEA70-chevronsLeft.svg +1 -0
- package/src/sass/icons/uEA71-chevronsRight.svg +1 -0
- package/src/sass/icons/uEA72-trendingUp.svg +1 -0
- package/src/sass/icons/uEA74-codeBlock.svg +1 -0
- package/src/sass/icons/uEA75-expand.svg +3 -0
- package/src/sass/icons/uEA76-unExpand.svg +3 -0
- package/src/sass/icons/uEA77-swap-vert.svg +1 -0
- package/src/sass/icons/uEA78-swap.svg +1 -0
- package/src/sass/icons/uEA79-keyboard.svg +1 -0
- package/src/sass/icons/uEA7A-command.svg +1 -0
- package/src/sass/icons/uEA7B-search.svg +1 -0
- package/src/sass/index.scss +3 -0
- package/src/sass/markdown.scss +668 -0
- package/src/sass/markdown_pure.scss +9 -0
- package/src/sass/prettyprint/prettyprint.scss +118 -0
- package/src/sass/previewer.scss +179 -0
- package/src/sass/print.scss +13 -0
- package/src/sass/prism/coy.scss +220 -0
- package/src/sass/prism/dark.scss +132 -0
- package/src/sass/prism/default.scss +143 -0
- package/src/sass/prism/funky.scss +133 -0
- package/src/sass/prism/okaidia.scss +126 -0
- package/src/sass/prism/one-dark.scss +440 -0
- package/src/sass/prism/one-light.scss +428 -0
- package/src/sass/prism/solarized-light.scss +153 -0
- package/src/sass/prism/tomorrow-night.scss +125 -0
- package/src/sass/prism/twilight.scss +202 -0
- package/src/sass/prism/vs-dark.scss +275 -0
- package/src/sass/prism/vs-light.scss +168 -0
- package/src/sass/themes/blue.scss +411 -0
- package/src/sass/themes/dark.scss +517 -0
- package/src/sass/themes/default.scss +255 -0
- package/src/sass/themes/green.scss +395 -0
- package/src/sass/themes/light.scss +368 -0
- package/src/sass/themes/red.scss +397 -0
- package/src/sass/themes/violet.scss +410 -0
- package/src/sass/variable.scss +84 -0
- package/src/toolbars/Bubble.js +234 -0
- package/src/toolbars/BubbleFormula.js +298 -0
- package/src/toolbars/BubbleTable.js +147 -0
- package/src/toolbars/FloatMenu.js +131 -0
- package/src/toolbars/HiddenToolbar.js +36 -0
- package/src/toolbars/HookCenter.js +234 -0
- package/src/toolbars/MenuBase.js +569 -0
- package/src/toolbars/PreviewerBubble.js +608 -0
- package/src/toolbars/ShortcutKeyConfigPanel.js +345 -0
- package/src/toolbars/Sidebar.js +36 -0
- package/src/toolbars/Toc.js +242 -0
- package/src/toolbars/Toolbar.js +449 -0
- package/src/toolbars/ToolbarRight.js +37 -0
- package/src/toolbars/hooks/Audio.js +79 -0
- package/src/toolbars/hooks/BarTable.js +41 -0
- package/src/toolbars/hooks/Bold.js +73 -0
- package/src/toolbars/hooks/Br.js +34 -0
- package/src/toolbars/hooks/ChangeLocale.js +62 -0
- package/src/toolbars/hooks/ChatGpt.js +182 -0
- package/src/toolbars/hooks/CheckList.js +41 -0
- package/src/toolbars/hooks/Code.js +49 -0
- package/src/toolbars/hooks/CodeTheme.js +66 -0
- package/src/toolbars/hooks/Color.js +298 -0
- package/src/toolbars/hooks/Copy.js +141 -0
- package/src/toolbars/hooks/Detail.js +69 -0
- package/src/toolbars/hooks/DrawIo.js +57 -0
- package/src/toolbars/hooks/Export.js +49 -0
- package/src/toolbars/hooks/File.js +79 -0
- package/src/toolbars/hooks/Formula.js +69 -0
- package/src/toolbars/hooks/FullScreen.js +50 -0
- package/src/toolbars/hooks/Graph.js +263 -0
- package/src/toolbars/hooks/H1.js +71 -0
- package/src/toolbars/hooks/H2.js +71 -0
- package/src/toolbars/hooks/H3.js +71 -0
- package/src/toolbars/hooks/Header.js +118 -0
- package/src/toolbars/hooks/Hr.js +35 -0
- package/src/toolbars/hooks/Image.js +91 -0
- package/src/toolbars/hooks/InlineCode.js +53 -0
- package/src/toolbars/hooks/Insert.js +193 -0
- package/src/toolbars/hooks/Italic.js +72 -0
- package/src/toolbars/hooks/Justify.js +49 -0
- package/src/toolbars/hooks/LineTable.js +41 -0
- package/src/toolbars/hooks/Link.js +49 -0
- package/src/toolbars/hooks/List.js +55 -0
- package/src/toolbars/hooks/MobilePreview.js +44 -0
- package/src/toolbars/hooks/Ol.js +41 -0
- package/src/toolbars/hooks/Panel.js +140 -0
- package/src/toolbars/hooks/Pdf.js +78 -0
- package/src/toolbars/hooks/Publish.js +123 -0
- package/src/toolbars/hooks/QuickTable.js +43 -0
- package/src/toolbars/hooks/Quote.js +45 -0
- package/src/toolbars/hooks/Redo.js +33 -0
- package/src/toolbars/hooks/Ruby.js +59 -0
- package/src/toolbars/hooks/Search.js +53 -0
- package/src/toolbars/hooks/Settings.js +220 -0
- package/src/toolbars/hooks/ShortcutKey.js +62 -0
- package/src/toolbars/hooks/Size.js +118 -0
- package/src/toolbars/hooks/Split.js +37 -0
- package/src/toolbars/hooks/Strikethrough.js +71 -0
- package/src/toolbars/hooks/Sub.js +58 -0
- package/src/toolbars/hooks/Sup.js +58 -0
- package/src/toolbars/hooks/SwitchModel.js +56 -0
- package/src/toolbars/hooks/Table.js +56 -0
- package/src/toolbars/hooks/Theme.js +62 -0
- package/src/toolbars/hooks/Toc.js +35 -0
- package/src/toolbars/hooks/TogglePreview.js +91 -0
- package/src/toolbars/hooks/Ul.js +41 -0
- package/src/toolbars/hooks/Underline.js +68 -0
- package/src/toolbars/hooks/Undo.js +30 -0
- package/src/toolbars/hooks/Video.js +79 -0
- package/src/toolbars/hooks/Word.js +78 -0
- package/src/toolbars/hooks/WordCount.js +106 -0
- package/src/utils/autoindent.js +58 -0
- package/src/utils/cm-search-replace.js +794 -0
- package/src/utils/code-preview-language-setting.js +180 -0
- package/src/utils/codeBlockContentHandler.js +400 -0
- package/src/utils/config.js +174 -0
- package/src/utils/copy.js +55 -0
- package/src/utils/dialog.js +214 -0
- package/src/utils/dom.js +163 -0
- package/src/utils/downloadUtil.js +23 -0
- package/src/utils/env.js +22 -0
- package/src/utils/error.js +61 -0
- package/src/utils/event.js +38 -0
- package/src/utils/export.js +166 -0
- package/src/utils/file.js +164 -0
- package/src/utils/formulaUtilsHandler.js +232 -0
- package/src/utils/htmlparser.js +976 -0
- package/src/utils/image.js +99 -0
- package/src/utils/imgSizeHandler.js +279 -0
- package/src/utils/lazyLoadImg.js +327 -0
- package/src/utils/lineFeed.js +49 -0
- package/src/utils/listContentHandler.js +227 -0
- package/src/utils/lookbehind-replace.js +81 -0
- package/src/utils/mathjax.js +89 -0
- package/src/utils/myersDiff.js +211 -0
- package/src/utils/pasteHelper.js +253 -0
- package/src/utils/platformTransform.js +71 -0
- package/src/utils/recount-pos.js +59 -0
- package/src/utils/regexp.js +295 -0
- package/src/utils/sanitize.js +477 -0
- package/src/utils/selection.js +50 -0
- package/src/utils/shortcutKey.js +291 -0
- package/src/utils/svgUtils.js +96 -0
- package/src/utils/tableContentHandler.js +876 -0
- package/test/core/CommonMark.spec.ts +62 -0
- package/test/core/hooks/AutoLink.spec.ts +28 -0
- package/test/core/hooks/List.spec.ts +79 -0
- package/test/core/hooks/__snapshots__/List.spec.ts.snap +11 -0
- package/test/example.md +778 -0
- package/test/node.js +10 -0
- package/test/suites/commonmark.spec.json +5218 -0
- package/test/tsconfig.test.json +6 -0
- package/test/utils/regexp.spec.ts +28 -0
- package/types/cherry.d.ts +675 -0
- package/types/codemirror.d.ts +22 -0
- package/types/editor.d.ts +72 -0
- package/types/global.d.ts +16 -0
- package/types/menus.d.ts +24 -0
- package/types/previewer.d.ts +53 -0
- package/types/syntax.d.ts +52 -0
|
@@ -0,0 +1,1116 @@
|
|
|
1
|
+
@import './variable.scss';
|
|
2
|
+
@import './base.scss';
|
|
3
|
+
@import './ch-icon.scss';
|
|
4
|
+
@import './markdown.scss';
|
|
5
|
+
@import './previewer.scss';
|
|
6
|
+
@import './print.scss';
|
|
7
|
+
@import './bubble_formula.scss';
|
|
8
|
+
@import './formula_utils_bubble.scss';
|
|
9
|
+
@import './components/shortcut_key_config.scss';
|
|
10
|
+
|
|
11
|
+
@mixin cherryFont {
|
|
12
|
+
font-family: $fontFamily;
|
|
13
|
+
font-size: $fontSize;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
// 主要布局控制,可以不合并进下面的区块
|
|
17
|
+
.cherry {
|
|
18
|
+
display: flex;
|
|
19
|
+
flex-flow: row wrap;
|
|
20
|
+
align-items: stretch;
|
|
21
|
+
align-content: flex-start;
|
|
22
|
+
height: 100%;
|
|
23
|
+
min-height: 60px;
|
|
24
|
+
position: relative;
|
|
25
|
+
// overflow: hidden;
|
|
26
|
+
|
|
27
|
+
.cherry-editor,
|
|
28
|
+
.cherry-previewer {
|
|
29
|
+
max-height: calc(100% - #{$toolbarHeight});
|
|
30
|
+
min-height: calc(100% - #{$toolbarHeight});
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.CodeMirror {
|
|
34
|
+
height: 100%;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
&.cherry--no-toolbar {
|
|
38
|
+
.cherry-toolbar,
|
|
39
|
+
.cherry-sidebar {
|
|
40
|
+
height: 0;
|
|
41
|
+
display: none;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.cherry-editor,
|
|
45
|
+
.cherry-previewer {
|
|
46
|
+
max-height: 100%;
|
|
47
|
+
min-height: 100%;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.cherry {
|
|
53
|
+
@include cherryFont;
|
|
54
|
+
line-height: $lineHeight;
|
|
55
|
+
color: $fontColor;
|
|
56
|
+
background: $editorBg;
|
|
57
|
+
box-shadow: $shadow;
|
|
58
|
+
|
|
59
|
+
.ch-icon {
|
|
60
|
+
vertical-align: middle;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.clearfix {
|
|
64
|
+
zoom: 1;
|
|
65
|
+
|
|
66
|
+
&:after {
|
|
67
|
+
content: '.';
|
|
68
|
+
display: block;
|
|
69
|
+
height: 0;
|
|
70
|
+
clear: both;
|
|
71
|
+
visibility: hidden;
|
|
72
|
+
overflow: hidden;
|
|
73
|
+
font-size: 0;
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
&.fullscreen {
|
|
78
|
+
position: fixed;
|
|
79
|
+
top: 0;
|
|
80
|
+
left: 0;
|
|
81
|
+
right: 0;
|
|
82
|
+
bottom: 0;
|
|
83
|
+
z-index: 99;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
.no-select {
|
|
87
|
+
-webkit-touch-callout: none;
|
|
88
|
+
-webkit-user-select: none;
|
|
89
|
+
-khtml-user-select: none;
|
|
90
|
+
-moz-user-select: none;
|
|
91
|
+
-ms-user-select: none;
|
|
92
|
+
user-select: none;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
.cherry-insert-table-menu {
|
|
96
|
+
display: block;
|
|
97
|
+
position: fixed;
|
|
98
|
+
// z-index: 100;
|
|
99
|
+
top: 40px;
|
|
100
|
+
left: 40px;
|
|
101
|
+
border-collapse: separate;
|
|
102
|
+
box-shadow: $shadow;
|
|
103
|
+
padding: 4px;
|
|
104
|
+
border-radius: $borderRadius;
|
|
105
|
+
width: auto;
|
|
106
|
+
height: auto;
|
|
107
|
+
|
|
108
|
+
&-item {
|
|
109
|
+
padding: 7px;
|
|
110
|
+
border: 1px solid $borderColor;
|
|
111
|
+
|
|
112
|
+
&.active {
|
|
113
|
+
background-color: $toolbarBtnBgHoverLight;
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
&[data-toolbar-theme='dark'] {
|
|
119
|
+
.cherry-insert-table-menu-item {
|
|
120
|
+
border-color: rgba(255, 255, 255, 0.2);
|
|
121
|
+
|
|
122
|
+
&.active {
|
|
123
|
+
background-color: $toolbarBtnColorDark;
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
.cherry-dropdown {
|
|
130
|
+
position: absolute;
|
|
131
|
+
width: 130px;
|
|
132
|
+
min-height: 40px;
|
|
133
|
+
background: #fff;
|
|
134
|
+
//border: 1px solid $borderColor;
|
|
135
|
+
box-shadow: 0 5px 15px -5px rgba(0, 0, 0, 0.5);
|
|
136
|
+
margin-left: -60px;
|
|
137
|
+
z-index: 13;
|
|
138
|
+
|
|
139
|
+
&-item {
|
|
140
|
+
width: 100%;
|
|
141
|
+
padding: 0 15px;
|
|
142
|
+
text-align: left;
|
|
143
|
+
display: inline-block;
|
|
144
|
+
height: 36px;
|
|
145
|
+
line-height: 36px;
|
|
146
|
+
font-size: 14px;
|
|
147
|
+
font-style: normal;
|
|
148
|
+
cursor: pointer;
|
|
149
|
+
box-sizing: border-box;
|
|
150
|
+
|
|
151
|
+
&:hover {
|
|
152
|
+
background: $toolbarBtnBgHoverLight;
|
|
153
|
+
color: $toolbarBtnHoverColorLight;
|
|
154
|
+
}
|
|
155
|
+
&__selected {
|
|
156
|
+
background: $toolbarBtnBgHoverLight;
|
|
157
|
+
color: $toolbarBtnHoverColorLight;
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
.ch-icon {
|
|
161
|
+
margin-right: 10px;
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
[data-toolbar-theme='dark'] & {
|
|
166
|
+
background: $toolbarBgDark;
|
|
167
|
+
|
|
168
|
+
.cherry-dropdown-item {
|
|
169
|
+
background: $toolbarBtnBgDark;
|
|
170
|
+
color: $toolbarBtnColorDark;
|
|
171
|
+
|
|
172
|
+
&:hover {
|
|
173
|
+
background: $toolbarBtnBgHoverDark;
|
|
174
|
+
color: $toolbarBtnHoverColorDark;
|
|
175
|
+
}
|
|
176
|
+
&__selected {
|
|
177
|
+
background: $toolbarBtnBgHoverDark;
|
|
178
|
+
color: $toolbarBtnHoverColorLight;
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
.cherry-toolbar {
|
|
185
|
+
position: relative;
|
|
186
|
+
display: flex;
|
|
187
|
+
align-items: baseline;
|
|
188
|
+
justify-content: space-between;
|
|
189
|
+
padding: 0 20px;
|
|
190
|
+
min-height: $toolbarHeight;
|
|
191
|
+
font-size: $toolbarFontSize;
|
|
192
|
+
line-height: 2.8;
|
|
193
|
+
flex-basis: 100%;
|
|
194
|
+
box-sizing: border-box;
|
|
195
|
+
z-index: 2;
|
|
196
|
+
user-select: none;
|
|
197
|
+
box-shadow: $toolbarShadowLight;
|
|
198
|
+
background: $toolbarBgLight;
|
|
199
|
+
overflow: hidden;
|
|
200
|
+
.icon-loading {
|
|
201
|
+
&.loading {
|
|
202
|
+
display: inline-block;
|
|
203
|
+
width: 8px;
|
|
204
|
+
height: 8px;
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
&.loading:after {
|
|
208
|
+
content: ' ';
|
|
209
|
+
display: block;
|
|
210
|
+
width: 8px;
|
|
211
|
+
height: 8px;
|
|
212
|
+
margin-left: 2px;
|
|
213
|
+
margin-top: -2px;
|
|
214
|
+
border-radius: 50%;
|
|
215
|
+
border: 2px solid #000;
|
|
216
|
+
border-color: #000 transparent #000 transparent;
|
|
217
|
+
animation: loading 1.2s linear infinite;
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
[data-toolbar-theme='dark'] & {
|
|
222
|
+
background: $toolbarBgDark;
|
|
223
|
+
box-shadow: $toolbarShadowDark;
|
|
224
|
+
|
|
225
|
+
.cherry-toolbar-button {
|
|
226
|
+
color: $toolbarBtnColorDark;
|
|
227
|
+
background: $toolbarBtnBgDark;
|
|
228
|
+
|
|
229
|
+
&:hover {
|
|
230
|
+
color: $toolbarBtnHoverColorDark;
|
|
231
|
+
background: $toolbarBtnBgHoverDark;
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
.toolbar-left,
|
|
237
|
+
.toolbar-right {
|
|
238
|
+
display: flex;
|
|
239
|
+
align-items: center;
|
|
240
|
+
min-height: $toolbarHeight;
|
|
241
|
+
flex-wrap: wrap;
|
|
242
|
+
flex: 1;
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
.toolbar-left {
|
|
246
|
+
margin-right: 20px;
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
.toolbar-right {
|
|
250
|
+
flex: 0 1 auto;
|
|
251
|
+
flex-direction: row-reverse;
|
|
252
|
+
margin-left: 10px;
|
|
253
|
+
box-sizing: border-box;
|
|
254
|
+
min-height: 0;
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
&.preview-only {
|
|
258
|
+
.cherry-toolbar-button {
|
|
259
|
+
display: none;
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
.cherry-toolbar-switchPreview {
|
|
263
|
+
display: inline;
|
|
264
|
+
}
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
&-button {
|
|
268
|
+
float: left;
|
|
269
|
+
padding: 0 12px;
|
|
270
|
+
// margin: 4px 0;
|
|
271
|
+
height: 38px;
|
|
272
|
+
color: $toolbarBtnColorLight;
|
|
273
|
+
background: transparent;
|
|
274
|
+
border: 1px solid transparent;
|
|
275
|
+
-webkit-transition: background-color ease-in-out 0.15s, color ease-in-out 0.15s, border-color ease-in-out 0.15s;
|
|
276
|
+
transition: background-color ease-in-out 0.15s, color ease-in-out 0.15s, border-color ease-in-out 0.15s;
|
|
277
|
+
cursor: pointer;
|
|
278
|
+
font-style: normal;
|
|
279
|
+
|
|
280
|
+
&:hover {
|
|
281
|
+
color: $toolbarBtnHoverColorLight;
|
|
282
|
+
background: $toolbarBtnBgHoverLight;
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
&.cherry-toolbar-split {
|
|
286
|
+
font-size: 0;
|
|
287
|
+
height: 19px;
|
|
288
|
+
padding: 0;
|
|
289
|
+
margin: 9.5px 4px;
|
|
290
|
+
border: 1px solid transparent;
|
|
291
|
+
border-left: 1px solid $toolbarSplitColor;
|
|
292
|
+
pointer-events: none;
|
|
293
|
+
overflow: hidden;
|
|
294
|
+
opacity: 0.5;
|
|
295
|
+
}
|
|
296
|
+
|
|
297
|
+
&.disabled {
|
|
298
|
+
color: $toolbarBtnDisabledLight;
|
|
299
|
+
}
|
|
300
|
+
}
|
|
301
|
+
}
|
|
302
|
+
|
|
303
|
+
.cherry {
|
|
304
|
+
.ace_search {
|
|
305
|
+
background: #fff;
|
|
306
|
+
}
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
.cherry-sidebar {
|
|
310
|
+
width: 30px;
|
|
311
|
+
position: absolute;
|
|
312
|
+
top: 48px;
|
|
313
|
+
right: 7px;
|
|
314
|
+
z-index: 11;
|
|
315
|
+
bottom: 0;
|
|
316
|
+
overflow: hidden;
|
|
317
|
+
|
|
318
|
+
.cherry-toolbar-button {
|
|
319
|
+
height: 30px;
|
|
320
|
+
padding: 3px 12px 0 6px;
|
|
321
|
+
|
|
322
|
+
&:hover {
|
|
323
|
+
background: transparent;
|
|
324
|
+
}
|
|
325
|
+
|
|
326
|
+
.icon-loading {
|
|
327
|
+
&.loading {
|
|
328
|
+
display: inline-block;
|
|
329
|
+
width: 8px;
|
|
330
|
+
height: 8px;
|
|
331
|
+
}
|
|
332
|
+
|
|
333
|
+
&.loading:after {
|
|
334
|
+
content: ' ';
|
|
335
|
+
display: block;
|
|
336
|
+
width: 8px;
|
|
337
|
+
height: 8px;
|
|
338
|
+
margin-left: 2px;
|
|
339
|
+
margin-top: -2px;
|
|
340
|
+
border-radius: 50%;
|
|
341
|
+
border: 2px solid #000;
|
|
342
|
+
border-color: #000 transparent #000 transparent;
|
|
343
|
+
animation: loading 1.2s linear infinite;
|
|
344
|
+
}
|
|
345
|
+
}
|
|
346
|
+
|
|
347
|
+
@keyframes loading {
|
|
348
|
+
0% {
|
|
349
|
+
transform: rotate(0deg);
|
|
350
|
+
}
|
|
351
|
+
|
|
352
|
+
100% {
|
|
353
|
+
transform: rotate(360deg);
|
|
354
|
+
}
|
|
355
|
+
}
|
|
356
|
+
}
|
|
357
|
+
}
|
|
358
|
+
|
|
359
|
+
@import './components/bubble';
|
|
360
|
+
|
|
361
|
+
.cherry-floatmenu {
|
|
362
|
+
z-index: 4;
|
|
363
|
+
display: none;
|
|
364
|
+
position: absolute;
|
|
365
|
+
left: 30px;
|
|
366
|
+
margin-left: 60px;
|
|
367
|
+
height: $lineHeight;
|
|
368
|
+
line-height: $lineHeight;
|
|
369
|
+
border-radius: $borderRadius;
|
|
370
|
+
-webkit-user-select: none;
|
|
371
|
+
-moz-user-select: none;
|
|
372
|
+
-ms-user-select: none;
|
|
373
|
+
user-select: none;
|
|
374
|
+
|
|
375
|
+
.cherry-toolbar-button {
|
|
376
|
+
float: left;
|
|
377
|
+
padding: 0 9px;
|
|
378
|
+
margin: 0;
|
|
379
|
+
height: $lineHeight;
|
|
380
|
+
line-height: $lineHeight;
|
|
381
|
+
font-size: 14px;
|
|
382
|
+
color: $fontColor;
|
|
383
|
+
overflow: hidden;
|
|
384
|
+
vertical-align: middle;
|
|
385
|
+
text-align: center;
|
|
386
|
+
border: 0;
|
|
387
|
+
cursor: pointer;
|
|
388
|
+
font-style: normal;
|
|
389
|
+
|
|
390
|
+
&.cherry-toolbar-split {
|
|
391
|
+
border-left: 1px solid $borderColor;
|
|
392
|
+
width: 0;
|
|
393
|
+
padding: 0;
|
|
394
|
+
overflow: hidden;
|
|
395
|
+
height: 25px;
|
|
396
|
+
}
|
|
397
|
+
|
|
398
|
+
.ch-icon {
|
|
399
|
+
color: #aaa;
|
|
400
|
+
font-size: 12px;
|
|
401
|
+
}
|
|
402
|
+
|
|
403
|
+
&:hover {
|
|
404
|
+
background: rgba(0, 0, 0, 0.05);
|
|
405
|
+
|
|
406
|
+
.ch-icon {
|
|
407
|
+
color: $toolbarBtnColorLight;
|
|
408
|
+
}
|
|
409
|
+
}
|
|
410
|
+
}
|
|
411
|
+
}
|
|
412
|
+
|
|
413
|
+
.cherry-editor {
|
|
414
|
+
position: relative;
|
|
415
|
+
padding-top: 5px;
|
|
416
|
+
padding-right: 5px;
|
|
417
|
+
width: 50%;
|
|
418
|
+
box-sizing: border-box;
|
|
419
|
+
overflow: hidden;
|
|
420
|
+
|
|
421
|
+
&.cherry-editor--full {
|
|
422
|
+
width: 100%;
|
|
423
|
+
padding-right: 0;
|
|
424
|
+
}
|
|
425
|
+
|
|
426
|
+
&.cherry-editor--hidden {
|
|
427
|
+
display: none;
|
|
428
|
+
}
|
|
429
|
+
|
|
430
|
+
&-writing-style {
|
|
431
|
+
&--focus {
|
|
432
|
+
&::before {
|
|
433
|
+
content: '';
|
|
434
|
+
display: block;
|
|
435
|
+
width: 100%;
|
|
436
|
+
position: absolute;
|
|
437
|
+
top: 0;
|
|
438
|
+
background: linear-gradient(to bottom, #00000006, #00000033);
|
|
439
|
+
pointer-events: none;
|
|
440
|
+
z-index: 11;
|
|
441
|
+
}
|
|
442
|
+
&::after {
|
|
443
|
+
content: '';
|
|
444
|
+
display: block;
|
|
445
|
+
width: 100%;
|
|
446
|
+
position: absolute;
|
|
447
|
+
bottom: 0;
|
|
448
|
+
background: linear-gradient(to top, #00000006, #00000033);
|
|
449
|
+
pointer-events: none;
|
|
450
|
+
z-index: 11;
|
|
451
|
+
}
|
|
452
|
+
}
|
|
453
|
+
&--typewriter {
|
|
454
|
+
.CodeMirror-lines {
|
|
455
|
+
position: relative;
|
|
456
|
+
&::before {
|
|
457
|
+
content: '';
|
|
458
|
+
display: block;
|
|
459
|
+
}
|
|
460
|
+
&::after {
|
|
461
|
+
content: '';
|
|
462
|
+
display: block;
|
|
463
|
+
}
|
|
464
|
+
}
|
|
465
|
+
}
|
|
466
|
+
}
|
|
467
|
+
|
|
468
|
+
.CodeMirror {
|
|
469
|
+
font-family: $fontFamily;
|
|
470
|
+
background: $editorBg;
|
|
471
|
+
color: $fontColor;
|
|
472
|
+
|
|
473
|
+
// codemirror 依赖隐藏的 textarea 计算行高,这里将字体大小设置为行高,避免输入法遮挡内容
|
|
474
|
+
// Fixed https://github.com/Tencent/cherry-markdown/issues/82
|
|
475
|
+
textarea {
|
|
476
|
+
font-size: $lineHeight;
|
|
477
|
+
}
|
|
478
|
+
}
|
|
479
|
+
|
|
480
|
+
.CodeMirror-lines {
|
|
481
|
+
padding: 15px 34px;
|
|
482
|
+
|
|
483
|
+
// 对draw.io的xml数据,和图片里base64格式的数据限定最大宽度
|
|
484
|
+
.long-text,
|
|
485
|
+
.drawio,
|
|
486
|
+
.base64 {
|
|
487
|
+
display: inline-block;
|
|
488
|
+
overflow: hidden;
|
|
489
|
+
text-overflow: ellipsis;
|
|
490
|
+
max-width: 80px;
|
|
491
|
+
white-space: nowrap;
|
|
492
|
+
vertical-align: bottom;
|
|
493
|
+
color: darkmagenta !important;
|
|
494
|
+
font-size: 12px !important;
|
|
495
|
+
}
|
|
496
|
+
}
|
|
497
|
+
|
|
498
|
+
.cm-s-default .cm-header {
|
|
499
|
+
color: $editorHeaderColor;
|
|
500
|
+
}
|
|
501
|
+
|
|
502
|
+
.cm-s-default .cm-string {
|
|
503
|
+
color: $editorStringColor;
|
|
504
|
+
}
|
|
505
|
+
|
|
506
|
+
.cm-s-default .cm-comment {
|
|
507
|
+
color: $editorCommentColor;
|
|
508
|
+
font-family: $monospaceFont;
|
|
509
|
+
font-size: 0.9em;
|
|
510
|
+
}
|
|
511
|
+
|
|
512
|
+
.cm-s-default .cm-whitespace,
|
|
513
|
+
.cm-tab {
|
|
514
|
+
font-family: $monospaceFont;
|
|
515
|
+
font-size: 0.9em;
|
|
516
|
+
}
|
|
517
|
+
|
|
518
|
+
.cm-s-default .cm-quote {
|
|
519
|
+
color: $editorQuoteColor;
|
|
520
|
+
}
|
|
521
|
+
|
|
522
|
+
.cm-s-default .cm-link {
|
|
523
|
+
color: $editorLinkColor;
|
|
524
|
+
}
|
|
525
|
+
|
|
526
|
+
.cm-s-default .cm-url {
|
|
527
|
+
background: $editorUrlBgColor;
|
|
528
|
+
font-family: $monospaceFont;
|
|
529
|
+
font-size: 0.9em;
|
|
530
|
+
}
|
|
531
|
+
|
|
532
|
+
.cm-s-default .cm-variable-2 {
|
|
533
|
+
color: $editorV2Color;
|
|
534
|
+
}
|
|
535
|
+
|
|
536
|
+
.cm-s-default .cm-variable-3 {
|
|
537
|
+
color: $editorV3Color;
|
|
538
|
+
}
|
|
539
|
+
|
|
540
|
+
.cm-s-default .cm-keyword {
|
|
541
|
+
color: $editorKeywordColor;
|
|
542
|
+
}
|
|
543
|
+
|
|
544
|
+
.cm-s-default .cm-fullWidth {
|
|
545
|
+
color: $fullWidthColor;
|
|
546
|
+
z-index: 3;
|
|
547
|
+
cursor: pointer;
|
|
548
|
+
}
|
|
549
|
+
}
|
|
550
|
+
|
|
551
|
+
.cherry-drag {
|
|
552
|
+
width: 15px;
|
|
553
|
+
cursor: ew-resize;
|
|
554
|
+
position: absolute;
|
|
555
|
+
z-index: 12;
|
|
556
|
+
background: transparent;
|
|
557
|
+
|
|
558
|
+
&.cherry-drag--show {
|
|
559
|
+
width: 5px;
|
|
560
|
+
display: block;
|
|
561
|
+
background: #dfe6ee;
|
|
562
|
+
}
|
|
563
|
+
|
|
564
|
+
&.cherry-drag--hidden {
|
|
565
|
+
display: none;
|
|
566
|
+
}
|
|
567
|
+
}
|
|
568
|
+
|
|
569
|
+
.cherry-editor-mask {
|
|
570
|
+
z-index: 10;
|
|
571
|
+
position: absolute;
|
|
572
|
+
display: none;
|
|
573
|
+
background: rgba(0, 0, 0, 0.2);
|
|
574
|
+
|
|
575
|
+
&.cherry-editor-mask--show {
|
|
576
|
+
display: block;
|
|
577
|
+
}
|
|
578
|
+
}
|
|
579
|
+
|
|
580
|
+
.cherry-previewer-mask {
|
|
581
|
+
z-index: 10;
|
|
582
|
+
position: absolute;
|
|
583
|
+
display: none;
|
|
584
|
+
background: rgba(0, 0, 0, 0.4);
|
|
585
|
+
|
|
586
|
+
&.cherry-previewer-mask--show {
|
|
587
|
+
display: block;
|
|
588
|
+
}
|
|
589
|
+
}
|
|
590
|
+
|
|
591
|
+
.cherry-previewer-codeBlock-click-handler {
|
|
592
|
+
position: absolute;
|
|
593
|
+
z-index: 1;
|
|
594
|
+
}
|
|
595
|
+
|
|
596
|
+
.cherry-mask-code-block{
|
|
597
|
+
width: 100%;
|
|
598
|
+
padding-top: 50px;
|
|
599
|
+
display: none;
|
|
600
|
+
background-image: -webkit-gradient(linear, left top, left bottom, from(rgba(255, 255, 255, 0)), to(#fff));
|
|
601
|
+
background-image: linear-gradient(-180deg, rgba(255, 255, 255, 0) 0%, #fff 100%);
|
|
602
|
+
text-align: center;
|
|
603
|
+
position: absolute;
|
|
604
|
+
left: 0;
|
|
605
|
+
right: 0;
|
|
606
|
+
bottom: 0.5em;
|
|
607
|
+
z-index: 10;
|
|
608
|
+
.expand-btn {
|
|
609
|
+
width: 25px;
|
|
610
|
+
height: 25px;
|
|
611
|
+
border: 1px solid #ffffff00;
|
|
612
|
+
cursor: pointer;
|
|
613
|
+
border-radius: 5px;
|
|
614
|
+
transition: all 0.3s;
|
|
615
|
+
z-index: 12;
|
|
616
|
+
color: #3582fb;
|
|
617
|
+
background-color: #d7e6fe;
|
|
618
|
+
display: inline-block;
|
|
619
|
+
&:hover {
|
|
620
|
+
color: #eee;
|
|
621
|
+
background-color: #3582fb;
|
|
622
|
+
border-color: #eee;
|
|
623
|
+
}
|
|
624
|
+
}
|
|
625
|
+
}
|
|
626
|
+
|
|
627
|
+
|
|
628
|
+
.cherry-code-unExpand{
|
|
629
|
+
pre {
|
|
630
|
+
height: 240px;
|
|
631
|
+
overflow: hidden !important;
|
|
632
|
+
}
|
|
633
|
+
.cherry-mask-code-block {
|
|
634
|
+
display: inline-block;
|
|
635
|
+
}
|
|
636
|
+
}
|
|
637
|
+
|
|
638
|
+
.cherry-previewer-codeBlock-hover-handler {
|
|
639
|
+
z-index: 0;
|
|
640
|
+
position: absolute;
|
|
641
|
+
pointer-events: none;
|
|
642
|
+
* {
|
|
643
|
+
pointer-events: all;
|
|
644
|
+
}
|
|
645
|
+
.cherry-code-block-custom-btn,
|
|
646
|
+
.cherry-copy-code-block,
|
|
647
|
+
.cherry-unExpand-code-block,
|
|
648
|
+
.cherry-edit-code-block {
|
|
649
|
+
position: relative;
|
|
650
|
+
width: 25px;
|
|
651
|
+
text-align: center;
|
|
652
|
+
height: 25px;
|
|
653
|
+
border: 1px solid #3582fb;
|
|
654
|
+
cursor: pointer;
|
|
655
|
+
float: right;
|
|
656
|
+
top: 15px;
|
|
657
|
+
border-radius: 5px;
|
|
658
|
+
// margin-left: -27px;
|
|
659
|
+
transition: all 0.3s;
|
|
660
|
+
z-index: 2;
|
|
661
|
+
color: #3582fb;
|
|
662
|
+
background-color: #eee;
|
|
663
|
+
border-color: #3582fb;
|
|
664
|
+
}
|
|
665
|
+
.cherry-code-block-custom-btn {
|
|
666
|
+
width: auto;
|
|
667
|
+
}
|
|
668
|
+
.cherry-expand-code-block{
|
|
669
|
+
position: absolute;
|
|
670
|
+
width: 25px;
|
|
671
|
+
text-align: center;
|
|
672
|
+
height: 25px;
|
|
673
|
+
border: 1px solid #3582fb;
|
|
674
|
+
cursor: pointer;
|
|
675
|
+
float: right;
|
|
676
|
+
border-radius: 5px;
|
|
677
|
+
margin-left: -27px;
|
|
678
|
+
transition: all 0.3s;
|
|
679
|
+
z-index: 2;
|
|
680
|
+
color: #3582fb;
|
|
681
|
+
background-color: #eee;
|
|
682
|
+
border-color: #3582fb;
|
|
683
|
+
}
|
|
684
|
+
.cherry-expand-code-block {
|
|
685
|
+
top: 45px;
|
|
686
|
+
right:10px;
|
|
687
|
+
}
|
|
688
|
+
.cherry-unExpand-code-block{
|
|
689
|
+
z-index: 12;
|
|
690
|
+
&.hidden {
|
|
691
|
+
display: none;
|
|
692
|
+
}
|
|
693
|
+
}
|
|
694
|
+
.cherry-code-block-custom-btn:hover,
|
|
695
|
+
.cherry-copy-code-block:hover,
|
|
696
|
+
.cherry-expand-code-block:hover,
|
|
697
|
+
.cherry-unExpand-code-block:hover,
|
|
698
|
+
.cherry-edit-code-block:hover {
|
|
699
|
+
color: #eee;
|
|
700
|
+
background-color: #3582fb;
|
|
701
|
+
border-color: #eee;
|
|
702
|
+
}
|
|
703
|
+
.cherry-code-preview-lang-select {
|
|
704
|
+
position: absolute;
|
|
705
|
+
transform: translate(2px, -50%);
|
|
706
|
+
}
|
|
707
|
+
}
|
|
708
|
+
|
|
709
|
+
.float-previewer-wrap {
|
|
710
|
+
position: fixed;
|
|
711
|
+
right: 0;
|
|
712
|
+
top: 0;
|
|
713
|
+
z-index: 100;
|
|
714
|
+
border-radius: 12px;
|
|
715
|
+
overflow: hidden;
|
|
716
|
+
box-shadow: 0 0 60px rgba(0, 0, 0, 0.1);
|
|
717
|
+
resize: both;
|
|
718
|
+
min-width: 430px;
|
|
719
|
+
min-height: 300px;
|
|
720
|
+
|
|
721
|
+
&.float-previewer-dragging{
|
|
722
|
+
box-shadow: 0 0 60px rgba(0, 0, 0, 0.3);
|
|
723
|
+
|
|
724
|
+
.float-previewer-header{
|
|
725
|
+
cursor: grabbing;
|
|
726
|
+
background: #ace4ff;
|
|
727
|
+
}
|
|
728
|
+
}
|
|
729
|
+
|
|
730
|
+
.float-previewer-header{
|
|
731
|
+
z-index: 999999;
|
|
732
|
+
height: 40px;
|
|
733
|
+
border-bottom: 1px solid #ebedee;
|
|
734
|
+
background: #caecfd;
|
|
735
|
+
display: flex;
|
|
736
|
+
align-items: center;
|
|
737
|
+
justify-content: space-between;
|
|
738
|
+
padding: 0 20px;
|
|
739
|
+
cursor: grab;
|
|
740
|
+
|
|
741
|
+
.float-previewer-title{
|
|
742
|
+
user-select: none;
|
|
743
|
+
font-size: 16px;
|
|
744
|
+
color: #333;
|
|
745
|
+
font-weight: bold;
|
|
746
|
+
}
|
|
747
|
+
}
|
|
748
|
+
|
|
749
|
+
.cherry-previewer{
|
|
750
|
+
border-left: none;
|
|
751
|
+
}
|
|
752
|
+
}
|
|
753
|
+
|
|
754
|
+
.cherry-previewer {
|
|
755
|
+
padding: 20px 45px 20px 20px;
|
|
756
|
+
border-left: 2px solid #ebedee;
|
|
757
|
+
width: 50%;
|
|
758
|
+
box-sizing: border-box;
|
|
759
|
+
background-color: $previewBg;
|
|
760
|
+
min-height: auto;
|
|
761
|
+
overflow-y: auto;
|
|
762
|
+
-webkit-print-color-adjust: exact;
|
|
763
|
+
|
|
764
|
+
.cherry-mobile-previewer-content {
|
|
765
|
+
width: 375px;
|
|
766
|
+
height: 100%;
|
|
767
|
+
margin: 0 auto;
|
|
768
|
+
padding: 25px 30px;
|
|
769
|
+
overflow-y: scroll;
|
|
770
|
+
box-shadow: 0 0 60px rgba(0, 0, 0, 0.1);
|
|
771
|
+
box-sizing: border-box;
|
|
772
|
+
}
|
|
773
|
+
|
|
774
|
+
&.cherry-previewer--hidden {
|
|
775
|
+
width: 0;
|
|
776
|
+
display: none;
|
|
777
|
+
}
|
|
778
|
+
|
|
779
|
+
&.cherry-previewer--full {
|
|
780
|
+
width: 100%;
|
|
781
|
+
}
|
|
782
|
+
|
|
783
|
+
.cherry-list__upper-roman {
|
|
784
|
+
list-style: upper-roman;
|
|
785
|
+
}
|
|
786
|
+
|
|
787
|
+
.cherry-list__lower-greek {
|
|
788
|
+
list-style: lower-greek;
|
|
789
|
+
}
|
|
790
|
+
|
|
791
|
+
.cherry-list__lower-alpha {
|
|
792
|
+
list-style: lower-alpha;
|
|
793
|
+
}
|
|
794
|
+
|
|
795
|
+
.cherry-list__cjk-ideographic {
|
|
796
|
+
list-style: cjk-ideographic;
|
|
797
|
+
}
|
|
798
|
+
|
|
799
|
+
.cherry-list__circle {
|
|
800
|
+
list-style: circle;
|
|
801
|
+
}
|
|
802
|
+
|
|
803
|
+
.cherry-list__square {
|
|
804
|
+
list-style: square;
|
|
805
|
+
}
|
|
806
|
+
|
|
807
|
+
// 浅色系
|
|
808
|
+
[data-code-block-theme='default'] &,
|
|
809
|
+
[data-code-block-theme='funky'] &,
|
|
810
|
+
[data-code-block-theme='solarized-light'] &,
|
|
811
|
+
[data-code-block-theme='coy'] & {
|
|
812
|
+
.cherry-code-block-custom-btn,
|
|
813
|
+
.cherry-copy-code-block,
|
|
814
|
+
.cherry-expand-code-block,
|
|
815
|
+
.cherry-unExpand-code-block,
|
|
816
|
+
.cherry-edit-code-block {
|
|
817
|
+
background-color: #3582fb;
|
|
818
|
+
}
|
|
819
|
+
}
|
|
820
|
+
|
|
821
|
+
@keyframes blink {
|
|
822
|
+
0% {
|
|
823
|
+
opacity: 1;
|
|
824
|
+
}
|
|
825
|
+
50% {
|
|
826
|
+
opacity: 0;
|
|
827
|
+
}
|
|
828
|
+
100% {
|
|
829
|
+
opacity: 1;
|
|
830
|
+
}
|
|
831
|
+
}
|
|
832
|
+
|
|
833
|
+
.cherry-flow-session-cursor {
|
|
834
|
+
background-color: #3582fb88;
|
|
835
|
+
padding: 0 2.5px;
|
|
836
|
+
animation: blink 1s infinite;
|
|
837
|
+
}
|
|
838
|
+
}
|
|
839
|
+
|
|
840
|
+
.cherry-color-wrap {
|
|
841
|
+
display: none;
|
|
842
|
+
position: fixed;
|
|
843
|
+
width: auto;
|
|
844
|
+
padding: 5px 10px;
|
|
845
|
+
z-index: 6;
|
|
846
|
+
background: #fff;
|
|
847
|
+
box-shadow: $shadow;
|
|
848
|
+
|
|
849
|
+
h3 {
|
|
850
|
+
font-size: 12px;
|
|
851
|
+
margin: 0px;
|
|
852
|
+
font-weight: 400;
|
|
853
|
+
}
|
|
854
|
+
|
|
855
|
+
[data-toolbar-theme='dark'] & h3 {
|
|
856
|
+
color: $toolbarBtnColorDark;
|
|
857
|
+
}
|
|
858
|
+
|
|
859
|
+
.cherry-color-text {
|
|
860
|
+
float: left;
|
|
861
|
+
width: 128px;
|
|
862
|
+
margin: 0 8px 0 5px;
|
|
863
|
+
}
|
|
864
|
+
|
|
865
|
+
.cherry-color-bg {
|
|
866
|
+
float: left;
|
|
867
|
+
width: 128px;
|
|
868
|
+
margin-right: 5px;
|
|
869
|
+
}
|
|
870
|
+
|
|
871
|
+
.cherry-color-item {
|
|
872
|
+
float: left;
|
|
873
|
+
width: 14px;
|
|
874
|
+
height: 14px;
|
|
875
|
+
border: 1px solid #fff;
|
|
876
|
+
cursor: pointer;
|
|
877
|
+
|
|
878
|
+
&:hover {
|
|
879
|
+
border: 1px solid #000;
|
|
880
|
+
}
|
|
881
|
+
}
|
|
882
|
+
}
|
|
883
|
+
|
|
884
|
+
.Cherry-Math {
|
|
885
|
+
svg {
|
|
886
|
+
max-width: 100%;
|
|
887
|
+
}
|
|
888
|
+
}
|
|
889
|
+
|
|
890
|
+
.cherry-suggester-panel {
|
|
891
|
+
display: none;
|
|
892
|
+
position: absolute;
|
|
893
|
+
left: 0;
|
|
894
|
+
top: 0;
|
|
895
|
+
background: #fff;
|
|
896
|
+
// border: 1px solid #ccc;
|
|
897
|
+
border-radius: 2px;
|
|
898
|
+
max-height: 500px;
|
|
899
|
+
box-shadow: 0 2px 8px 1px #00000033;
|
|
900
|
+
overflow-x: hidden;
|
|
901
|
+
overflow-y: auto;
|
|
902
|
+
|
|
903
|
+
.cherry-suggester-panel__item {
|
|
904
|
+
border: none;
|
|
905
|
+
white-space: nowrap;
|
|
906
|
+
min-width: 50px;
|
|
907
|
+
padding: 5px 13px;
|
|
908
|
+
color: #333;
|
|
909
|
+
display: block;
|
|
910
|
+
cursor: pointer;
|
|
911
|
+
|
|
912
|
+
&.cherry-suggester-panel__item--selected {
|
|
913
|
+
background-color: #f2f2f5;
|
|
914
|
+
text-decoration: none;
|
|
915
|
+
color: #eb7350;
|
|
916
|
+
}
|
|
917
|
+
& > i {
|
|
918
|
+
display: inline-block;
|
|
919
|
+
transform: translateY(2px);
|
|
920
|
+
margin-right: 8px;
|
|
921
|
+
}
|
|
922
|
+
}
|
|
923
|
+
}
|
|
924
|
+
|
|
925
|
+
.cherry-suggestion {
|
|
926
|
+
background-color: #ebf3ff;
|
|
927
|
+
color: #3582fb;
|
|
928
|
+
padding: 1px 4px;
|
|
929
|
+
border-radius: 3px;
|
|
930
|
+
cursor: pointer;
|
|
931
|
+
}
|
|
932
|
+
|
|
933
|
+
.cherry-flex-toc {
|
|
934
|
+
z-index: 11;
|
|
935
|
+
position: absolute;
|
|
936
|
+
width: 160px;
|
|
937
|
+
height: calc(100% - 220px);
|
|
938
|
+
max-height: 600px;
|
|
939
|
+
right: 0;
|
|
940
|
+
top: 200px;
|
|
941
|
+
white-space: nowrap;
|
|
942
|
+
overflow: hidden;
|
|
943
|
+
text-overflow: ellipsis;
|
|
944
|
+
background: #ffffff33;
|
|
945
|
+
margin-right: 8px;
|
|
946
|
+
box-sizing: border-box;
|
|
947
|
+
user-select: none;
|
|
948
|
+
box-shadow: 0px 5px 11px #33333333;
|
|
949
|
+
border-radius: 10px;
|
|
950
|
+
transition: all 0.3s;
|
|
951
|
+
&.cherry-flex-toc__fixed {
|
|
952
|
+
position: fixed;
|
|
953
|
+
}
|
|
954
|
+
&:hover {
|
|
955
|
+
background-color: #fff;
|
|
956
|
+
width: 260px;
|
|
957
|
+
}
|
|
958
|
+
.cherry-toc-head {
|
|
959
|
+
border-bottom: 1px dashed #33333333;
|
|
960
|
+
padding: 5px;
|
|
961
|
+
.cherry-toc-title {
|
|
962
|
+
font-size: 16px;
|
|
963
|
+
font-weight: bold;
|
|
964
|
+
padding-left: 5px;
|
|
965
|
+
}
|
|
966
|
+
.ch-icon-chevronsLeft {
|
|
967
|
+
display: none;
|
|
968
|
+
}
|
|
969
|
+
.ch-icon-chevronsRight,
|
|
970
|
+
.ch-icon-chevronsLeft {
|
|
971
|
+
padding: 5px;
|
|
972
|
+
position: absolute;
|
|
973
|
+
right: 0;
|
|
974
|
+
top: 0;
|
|
975
|
+
}
|
|
976
|
+
i {
|
|
977
|
+
cursor: pointer;
|
|
978
|
+
padding: 5px 5px 0;
|
|
979
|
+
&:hover {
|
|
980
|
+
color: #3582fb;
|
|
981
|
+
}
|
|
982
|
+
}
|
|
983
|
+
}
|
|
984
|
+
.cherry-toc-list {
|
|
985
|
+
overflow-y: auto;
|
|
986
|
+
height: calc(100% - 40px);
|
|
987
|
+
overflow-x: hidden;
|
|
988
|
+
width: 100%;
|
|
989
|
+
padding-bottom: 10px;
|
|
990
|
+
.cherry-toc-one-a {
|
|
991
|
+
display: block;
|
|
992
|
+
text-decoration: none;
|
|
993
|
+
color: #000;
|
|
994
|
+
border-left: 5px solid #33333333;
|
|
995
|
+
height: 28px;
|
|
996
|
+
line-height: 28px;
|
|
997
|
+
transition: all 0.3s;
|
|
998
|
+
padding-left: 10px;
|
|
999
|
+
overflow: hidden;
|
|
1000
|
+
word-break: break-all;
|
|
1001
|
+
text-overflow: ellipsis;
|
|
1002
|
+
cursor: pointer;
|
|
1003
|
+
&.current {
|
|
1004
|
+
border-left-color: #3582fb;
|
|
1005
|
+
color: #3582fb;
|
|
1006
|
+
}
|
|
1007
|
+
&:hover {
|
|
1008
|
+
border-left-color: #3582fbaa;
|
|
1009
|
+
color: #3582fbaa;
|
|
1010
|
+
}
|
|
1011
|
+
}
|
|
1012
|
+
.cherry-toc-one-a__1 {
|
|
1013
|
+
font-weight: bold;
|
|
1014
|
+
}
|
|
1015
|
+
.cherry-toc-one-a__2 {
|
|
1016
|
+
padding-left: 20px;
|
|
1017
|
+
}
|
|
1018
|
+
.cherry-toc-one-a__3 {
|
|
1019
|
+
padding-left: 40px;
|
|
1020
|
+
}
|
|
1021
|
+
.cherry-toc-one-a__4 {
|
|
1022
|
+
padding-left: 60px;
|
|
1023
|
+
}
|
|
1024
|
+
.cherry-toc-one-a__5 {
|
|
1025
|
+
padding-left: 80px;
|
|
1026
|
+
}
|
|
1027
|
+
}
|
|
1028
|
+
&.cherry-flex-toc__pure {
|
|
1029
|
+
width: 30px;
|
|
1030
|
+
height: calc(100% - 200px);
|
|
1031
|
+
max-height: 600px;
|
|
1032
|
+
background: #ffffff00;
|
|
1033
|
+
box-shadow: none;
|
|
1034
|
+
border-radius: 0;
|
|
1035
|
+
.cherry-toc-head {
|
|
1036
|
+
height: 25px;
|
|
1037
|
+
border-bottom: 1px dashed #33333300;
|
|
1038
|
+
.cherry-toc-title {
|
|
1039
|
+
display: none;
|
|
1040
|
+
}
|
|
1041
|
+
.ch-icon-chevronsRight {
|
|
1042
|
+
display: none;
|
|
1043
|
+
}
|
|
1044
|
+
.ch-icon-chevronsLeft {
|
|
1045
|
+
display: inline;
|
|
1046
|
+
}
|
|
1047
|
+
}
|
|
1048
|
+
.cherry-toc-list {
|
|
1049
|
+
padding-left: 7px;
|
|
1050
|
+
.cherry-toc-one-a {
|
|
1051
|
+
overflow: hidden;
|
|
1052
|
+
width: 0;
|
|
1053
|
+
margin-bottom: 3px;
|
|
1054
|
+
height: 5px;
|
|
1055
|
+
border-left-width: 18px;
|
|
1056
|
+
}
|
|
1057
|
+
}
|
|
1058
|
+
}
|
|
1059
|
+
|
|
1060
|
+
&.auto-num {
|
|
1061
|
+
.cherry-toc-list {
|
|
1062
|
+
counter-reset: toclevel1;
|
|
1063
|
+
|
|
1064
|
+
.cherry-toc-one-a__1 {
|
|
1065
|
+
counter-reset: toclevel2;
|
|
1066
|
+
}
|
|
1067
|
+
.cherry-toc-one-a__2 {
|
|
1068
|
+
counter-reset: toclevel3;
|
|
1069
|
+
}
|
|
1070
|
+
.cherry-toc-one-a__3 {
|
|
1071
|
+
counter-reset: toclevel4;
|
|
1072
|
+
}
|
|
1073
|
+
.cherry-toc-one-a__4 {
|
|
1074
|
+
counter-reset: toclevel5;
|
|
1075
|
+
}
|
|
1076
|
+
.cherry-toc-one-a__5 {
|
|
1077
|
+
counter-reset: toclevel6;
|
|
1078
|
+
}
|
|
1079
|
+
.cherry-toc-one-a__1:before {
|
|
1080
|
+
counter-increment: toclevel1;
|
|
1081
|
+
content: counter(toclevel1) '. ';
|
|
1082
|
+
}
|
|
1083
|
+
.cherry-toc-one-a__2:before {
|
|
1084
|
+
counter-increment: toclevel2;
|
|
1085
|
+
content: counter(toclevel1) '.' counter(toclevel2) '. ';
|
|
1086
|
+
}
|
|
1087
|
+
.cherry-toc-one-a__3:before {
|
|
1088
|
+
counter-increment: toclevel3;
|
|
1089
|
+
content: counter(toclevel1) '.' counter(toclevel2) '.' counter(toclevel3) '. ';
|
|
1090
|
+
}
|
|
1091
|
+
.cherry-toc-one-a__4:before {
|
|
1092
|
+
counter-increment: toclevel4;
|
|
1093
|
+
content: counter(toclevel1) '.' counter(toclevel2) '.' counter(toclevel3) '.' counter(toclevel4) '. ';
|
|
1094
|
+
}
|
|
1095
|
+
.cherry-toc-one-a__5:before {
|
|
1096
|
+
counter-increment: toclevel5;
|
|
1097
|
+
content: counter(toclevel1) '.' counter(toclevel2) '.' counter(toclevel3) '.' counter(toclevel4) '.'
|
|
1098
|
+
counter(toclevel5) '. ';
|
|
1099
|
+
}
|
|
1100
|
+
.cherry-toc-one-a__6:before {
|
|
1101
|
+
counter-increment: toclevel5;
|
|
1102
|
+
content: counter(toclevel1) '.' counter(toclevel2) '.' counter(toclevel3) '.' counter(toclevel4) '.'
|
|
1103
|
+
counter(toclevel5) '.' counter(toclevel6) '. ';
|
|
1104
|
+
}
|
|
1105
|
+
}
|
|
1106
|
+
}
|
|
1107
|
+
}
|
|
1108
|
+
|
|
1109
|
+
/** 引入自带的主题 */
|
|
1110
|
+
@import './themes/default.scss';
|
|
1111
|
+
@import './themes/dark.scss';
|
|
1112
|
+
@import './themes/light.scss';
|
|
1113
|
+
@import './themes/green.scss';
|
|
1114
|
+
@import './themes/red.scss';
|
|
1115
|
+
@import './themes/violet.scss';
|
|
1116
|
+
@import './themes/blue.scss';
|