cherry-muse 1.0.1

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.
Files changed (226) hide show
  1. package/LICENSE +162 -0
  2. package/README.md +139 -0
  3. package/dist/addons/cherry-code-block-card-plugin.js +1 -0
  4. package/dist/addons/cherry-code-block-echarts-plugin.js +1 -0
  5. package/dist/addons/cherry-code-block-mermaid-plugin.js +1 -0
  6. package/dist/cherry-markdown.core.common.js +1 -0
  7. package/dist/cherry-markdown.core.js +1 -0
  8. package/dist/cherry-markdown.css +4089 -0
  9. package/dist/cherry-markdown.engine.core.common.js +1 -0
  10. package/dist/cherry-markdown.engine.core.esm.js +1 -0
  11. package/dist/cherry-markdown.engine.core.js +1 -0
  12. package/dist/cherry-markdown.esm.js +1 -0
  13. package/dist/cherry-markdown.js +70837 -0
  14. package/dist/cherry-markdown.js.map +1 -0
  15. package/dist/cherry-markdown.min.css +1 -0
  16. package/dist/cherry-markdown.min.js +1 -0
  17. package/dist/stats.html +4838 -0
  18. package/examples/scripts/pinyin/README.md +53 -0
  19. package/package.json +167 -0
  20. package/src/Cherry.config.js +411 -0
  21. package/src/Cherry.js +788 -0
  22. package/src/CherryStatic.js +70 -0
  23. package/src/Editor.js +746 -0
  24. package/src/Engine.js +334 -0
  25. package/src/Event.js +74 -0
  26. package/src/Factory.js +180 -0
  27. package/src/Logger.js +31 -0
  28. package/src/Previewer.js +1147 -0
  29. package/src/Sanitizer.js +4 -0
  30. package/src/Sanitizer.node.js +7 -0
  31. package/src/Stats.js +101 -0
  32. package/src/Theme.js +46 -0
  33. package/src/UrlCache.js +98 -0
  34. package/src/addons/cherry-code-block-card-plugin.js +213 -0
  35. package/src/addons/cherry-code-block-echarts-plugin.js +161 -0
  36. package/src/addons/cherry-code-block-mermaid-plugin.js +118 -0
  37. package/src/core/HookCenter.js +303 -0
  38. package/src/core/HooksConfig.js +106 -0
  39. package/src/core/ParagraphBase.js +314 -0
  40. package/src/core/SentenceBase.js +65 -0
  41. package/src/core/SyntaxBase.js +197 -0
  42. package/src/core/hooks/AutoLink.js +251 -0
  43. package/src/core/hooks/BackgroundColor.js +46 -0
  44. package/src/core/hooks/Badge.js +100 -0
  45. package/src/core/hooks/Blockquote.js +113 -0
  46. package/src/core/hooks/Br.js +85 -0
  47. package/src/core/hooks/CodeBlock.js +876 -0
  48. package/src/core/hooks/Color.js +78 -0
  49. package/src/core/hooks/CommentReference.js +96 -0
  50. package/src/core/hooks/Detail.js +138 -0
  51. package/src/core/hooks/Emoji.config.js +9388 -0
  52. package/src/core/hooks/Emoji.js +223 -0
  53. package/src/core/hooks/Emphasis.js +113 -0
  54. package/src/core/hooks/Footnote.js +125 -0
  55. package/src/core/hooks/FrontMatter.js +52 -0
  56. package/src/core/hooks/FrontMatterVars.js +82 -0
  57. package/src/core/hooks/Header.js +229 -0
  58. package/src/core/hooks/HighLight.js +37 -0
  59. package/src/core/hooks/Hr.js +52 -0
  60. package/src/core/hooks/HtmlBlock.js +159 -0
  61. package/src/core/hooks/Iframe.js +80 -0
  62. package/src/core/hooks/Image.js +276 -0
  63. package/src/core/hooks/InlineCode.js +45 -0
  64. package/src/core/hooks/InlineMath.js +142 -0
  65. package/src/core/hooks/Link.js +169 -0
  66. package/src/core/hooks/List.js +260 -0
  67. package/src/core/hooks/Mark.js +55 -0
  68. package/src/core/hooks/MathBlock.js +97 -0
  69. package/src/core/hooks/Panel.js +170 -0
  70. package/src/core/hooks/Paragraph.js +84 -0
  71. package/src/core/hooks/Ruby.js +34 -0
  72. package/src/core/hooks/Size.js +84 -0
  73. package/src/core/hooks/Strikethrough.js +54 -0
  74. package/src/core/hooks/Sub.js +47 -0
  75. package/src/core/hooks/SuggestList.js +317 -0
  76. package/src/core/hooks/Suggester.js +759 -0
  77. package/src/core/hooks/Sup.js +47 -0
  78. package/src/core/hooks/Table.js +315 -0
  79. package/src/core/hooks/Toc.js +290 -0
  80. package/src/core/hooks/Transfer.js +47 -0
  81. package/src/core/hooks/Underline.js +37 -0
  82. package/src/index.core.js +29 -0
  83. package/src/index.engine.core.js +62 -0
  84. package/src/index.engine.js +30 -0
  85. package/src/index.js +28 -0
  86. package/src/locales/index.js +21 -0
  87. package/src/locales/zh_CN.js +170 -0
  88. package/src/sass/cherry.scss +122 -0
  89. package/src/sass/components/bubble.scss +122 -0
  90. package/src/sass/components/codemirror.scss +628 -0
  91. package/src/sass/components/dropdown.scss +37 -0
  92. package/src/sass/components/editor.scss +78 -0
  93. package/src/sass/components/preview.scss +71 -0
  94. package/src/sass/components/prism.scss +142 -0
  95. package/src/sass/components/stats.scss +32 -0
  96. package/src/sass/components/toc.scss +184 -0
  97. package/src/sass/components/toolbar.scss +117 -0
  98. package/src/sass/core/AutoLink.scss +20 -0
  99. package/src/sass/core/BackgroundColor.scss +0 -0
  100. package/src/sass/core/Badge.scss +116 -0
  101. package/src/sass/core/Blockquote.scss +12 -0
  102. package/src/sass/core/Br.scss +0 -0
  103. package/src/sass/core/Card.scss +219 -0
  104. package/src/sass/core/CodeBlock.scss +205 -0
  105. package/src/sass/core/Color.scss +37 -0
  106. package/src/sass/core/CommentReference.scss +0 -0
  107. package/src/sass/core/Detail.scss +107 -0
  108. package/src/sass/core/Emoji.scss +127 -0
  109. package/src/sass/core/Emphasis.scss +9 -0
  110. package/src/sass/core/Footnote.scss +21 -0
  111. package/src/sass/core/FrontMatterVars.scss +19 -0
  112. package/src/sass/core/Header.scss +103 -0
  113. package/src/sass/core/HighLight.scss +0 -0
  114. package/src/sass/core/Hr.scss +10 -0
  115. package/src/sass/core/HtmlBlock.scss +0 -0
  116. package/src/sass/core/Iframe.scss +36 -0
  117. package/src/sass/core/Image.scss +59 -0
  118. package/src/sass/core/InlineCode.scss +10 -0
  119. package/src/sass/core/InlineMath.scss +11 -0
  120. package/src/sass/core/Link.scss +16 -0
  121. package/src/sass/core/List.scss +61 -0
  122. package/src/sass/core/Mark.scss +15 -0
  123. package/src/sass/core/MathBlock.scss +0 -0
  124. package/src/sass/core/Panel.scss +150 -0
  125. package/src/sass/core/Paragraph.scss +6 -0
  126. package/src/sass/core/Ruby.scss +0 -0
  127. package/src/sass/core/Size.scss +8 -0
  128. package/src/sass/core/Strikethrough.scss +0 -0
  129. package/src/sass/core/Sub.scss +5 -0
  130. package/src/sass/core/Suggester.scss +62 -0
  131. package/src/sass/core/Sup.scss +5 -0
  132. package/src/sass/core/Table.scss +127 -0
  133. package/src/sass/core/Toc.scss +28 -0
  134. package/src/sass/core/Transfer.scss +0 -0
  135. package/src/sass/core/Underline.scss +0 -0
  136. package/src/sass/google-fonts.scss +34 -0
  137. package/src/sass/index.scss +3 -0
  138. package/src/sass/prism/dark.scss +131 -0
  139. package/src/sass/prism/light.scss +143 -0
  140. package/src/sass/variables/colors.scss +96 -0
  141. package/src/toolbars/Bubble.js +232 -0
  142. package/src/toolbars/BubbleTable.js +147 -0
  143. package/src/toolbars/HookCenter.js +185 -0
  144. package/src/toolbars/MenuBase.js +357 -0
  145. package/src/toolbars/PreviewerBubble.js +558 -0
  146. package/src/toolbars/Toc.js +246 -0
  147. package/src/toolbars/Toolbar.js +401 -0
  148. package/src/toolbars/hooks/Audio.js +53 -0
  149. package/src/toolbars/hooks/Badge.js +80 -0
  150. package/src/toolbars/hooks/BarTable.js +41 -0
  151. package/src/toolbars/hooks/Bold.js +70 -0
  152. package/src/toolbars/hooks/Br.js +34 -0
  153. package/src/toolbars/hooks/Card.js +64 -0
  154. package/src/toolbars/hooks/CheckList.js +41 -0
  155. package/src/toolbars/hooks/Code.js +46 -0
  156. package/src/toolbars/hooks/Color.js +285 -0
  157. package/src/toolbars/hooks/Copy.js +139 -0
  158. package/src/toolbars/hooks/Detail.js +70 -0
  159. package/src/toolbars/hooks/ECharts.js +303 -0
  160. package/src/toolbars/hooks/Emoji.js +303 -0
  161. package/src/toolbars/hooks/Export.js +47 -0
  162. package/src/toolbars/hooks/File.js +54 -0
  163. package/src/toolbars/hooks/Formula.js +36 -0
  164. package/src/toolbars/hooks/FullScreen.js +55 -0
  165. package/src/toolbars/hooks/Graph.js +281 -0
  166. package/src/toolbars/hooks/H1.js +71 -0
  167. package/src/toolbars/hooks/H2.js +71 -0
  168. package/src/toolbars/hooks/H3.js +71 -0
  169. package/src/toolbars/hooks/Header.js +100 -0
  170. package/src/toolbars/hooks/Hr.js +35 -0
  171. package/src/toolbars/hooks/Iframe.js +35 -0
  172. package/src/toolbars/hooks/Image.js +60 -0
  173. package/src/toolbars/hooks/Insert.js +36 -0
  174. package/src/toolbars/hooks/Italic.js +70 -0
  175. package/src/toolbars/hooks/LineTable.js +41 -0
  176. package/src/toolbars/hooks/Link.js +46 -0
  177. package/src/toolbars/hooks/List.js +55 -0
  178. package/src/toolbars/hooks/Ol.js +41 -0
  179. package/src/toolbars/hooks/Panel.js +155 -0
  180. package/src/toolbars/hooks/Quote.js +45 -0
  181. package/src/toolbars/hooks/Redo.js +33 -0
  182. package/src/toolbars/hooks/Ruby.js +59 -0
  183. package/src/toolbars/hooks/Size.js +100 -0
  184. package/src/toolbars/hooks/Split.js +37 -0
  185. package/src/toolbars/hooks/Strikethrough.js +65 -0
  186. package/src/toolbars/hooks/Sub.js +58 -0
  187. package/src/toolbars/hooks/Sup.js +58 -0
  188. package/src/toolbars/hooks/SwitchModel.js +78 -0
  189. package/src/toolbars/hooks/Table.js +56 -0
  190. package/src/toolbars/hooks/Toc.js +35 -0
  191. package/src/toolbars/hooks/TogglePreview.js +79 -0
  192. package/src/toolbars/hooks/Ul.js +41 -0
  193. package/src/toolbars/hooks/Underline.js +65 -0
  194. package/src/toolbars/hooks/Undo.js +30 -0
  195. package/src/toolbars/hooks/Video.js +53 -0
  196. package/src/utils/LazyLoadImg.js +341 -0
  197. package/src/utils/autoindent.js +58 -0
  198. package/src/utils/codeBlockContentHandler.js +351 -0
  199. package/src/utils/config.js +98 -0
  200. package/src/utils/copy.js +55 -0
  201. package/src/utils/dialog.js +196 -0
  202. package/src/utils/dom.js +162 -0
  203. package/src/utils/downloadUtil.js +23 -0
  204. package/src/utils/env.js +22 -0
  205. package/src/utils/error.js +61 -0
  206. package/src/utils/event.js +38 -0
  207. package/src/utils/export.js +115 -0
  208. package/src/utils/file.js +121 -0
  209. package/src/utils/formulaUtilsHandler.js +230 -0
  210. package/src/utils/htmlparser.js +977 -0
  211. package/src/utils/image.js +99 -0
  212. package/src/utils/imgSizeHandler.js +279 -0
  213. package/src/utils/jsonUtils.js +17 -0
  214. package/src/utils/lineFeed.js +49 -0
  215. package/src/utils/listContentHandler.js +227 -0
  216. package/src/utils/lookbehind-replace.js +81 -0
  217. package/src/utils/mathjax.js +89 -0
  218. package/src/utils/myersDiff.js +211 -0
  219. package/src/utils/pasteHelper.js +253 -0
  220. package/src/utils/recount-pos.js +59 -0
  221. package/src/utils/regexp.js +295 -0
  222. package/src/utils/sanitize.js +477 -0
  223. package/src/utils/selection.js +50 -0
  224. package/src/utils/svgUtils.js +96 -0
  225. package/src/utils/tableContentHandler.js +592 -0
  226. package/tools/README.md +3 -0
@@ -0,0 +1,628 @@
1
+
2
+ /* BASICS */
3
+
4
+ .CodeMirror {
5
+ /* Set height, width, borders, and global font properties here */
6
+ height: 300px;
7
+ height: auto;
8
+ }
9
+ .CodeMirror-scroll {
10
+ /* Set scrolling behaviour here */
11
+ overflow-y: hidden;
12
+ overflow-x: auto;
13
+ }
14
+ /* PADDING */
15
+
16
+ .CodeMirror-lines {
17
+ padding: 4px 0;
18
+ /* Vertical padding around content */
19
+ }
20
+ .CodeMirror pre {
21
+ /* Horizontal padding of content */
22
+ }
23
+ .CodeMirror-scrollbar-filler,
24
+ .CodeMirror-gutter-filler {
25
+ background-color: white;
26
+ /* The little square between H and V scrollbars */
27
+ }
28
+ /* GUTTER */
29
+
30
+ .CodeMirror-gutters {
31
+ border-right: 1px solid #ddd;
32
+ background-color: #f7f7f7;
33
+ white-space: nowrap;
34
+ }
35
+ .CodeMirror-linenumbers {} .CodeMirror-linenumber {
36
+ padding: 0 3px 0 5px;
37
+ text-align: right;
38
+ color: #999;
39
+ }
40
+ /* CURSOR */
41
+
42
+ .CodeMirror div.CodeMirror-cursor {
43
+ border-left: 1px solid black;
44
+ z-index: 3;
45
+ }
46
+ /* Shown when moving in bi-directional text */
47
+
48
+ .CodeMirror div.CodeMirror-secondarycursor {
49
+ border-left: 1px solid silver;
50
+ }
51
+ .CodeMirror.cm-keymap-fat-cursor div.CodeMirror-cursor {
52
+ width: auto;
53
+ border: 0;
54
+ background: #7e7;
55
+ z-index: 1;
56
+ }
57
+ /* Can style cursor different in overwrite (non-insert) mode */
58
+
59
+ .CodeMirror div.CodeMirror-cursor.CodeMirror-overwrite {} .cm-tab {
60
+ display: inline-block;
61
+ }
62
+
63
+ /* DEFAULT THEME */
64
+
65
+ .cm-s-default .cm-keyword {
66
+ color: #708;
67
+ }
68
+ .cm-s-default .cm-atom,
69
+ .cm-s-default.cm-atom {
70
+ color: #219;
71
+ }
72
+ .cm-s-default .cm-number {
73
+ color: #164;
74
+ }
75
+ .cm-s-default .cm-def {
76
+ color: #00f;
77
+ }
78
+ .cm-s-default .cm-variable {
79
+ color: black;
80
+ }
81
+ .cm-s-default .cm-variable-2 {
82
+ color: #05a;
83
+ }
84
+ .cm-s-default .cm-variable-3 {
85
+ color: #085;
86
+ }
87
+ .cm-s-default .cm-property {
88
+ color: black;
89
+ }
90
+ .cm-s-default .cm-operator {
91
+ color: black;
92
+ }
93
+ .cm-s-default .cm-comment,
94
+ .cm-s-default.cm-comment {
95
+ color: #a50;
96
+ }
97
+ .cm-s-default .cm-string {
98
+ color: #a11;
99
+ }
100
+ .cm-s-default .cm-string-2 {
101
+ color: #f50;
102
+ }
103
+ .cm-s-default .cm-meta {
104
+ color: #555;
105
+ }
106
+ .cm-s-default .cm-qualifier {
107
+ color: #555;
108
+ }
109
+ .cm-s-default .cm-builtin {
110
+ color: #30a;
111
+ }
112
+ .cm-s-default .cm-bracket {
113
+ color: #997;
114
+ }
115
+ .cm-s-default .cm-tag {
116
+ color: #170;
117
+ }
118
+ .cm-s-default .cm-attribute {
119
+ color: #00c;
120
+ }
121
+ .cm-s-default .cm-header,
122
+ .cm-s-default.cm-header {
123
+ color: blue;
124
+ }
125
+ .cm-s-default .cm-quote,
126
+ .cm-s-default.cm-quote {
127
+ color: #090;
128
+ }
129
+ .cm-s-default .cm-hr,
130
+ .cm-s-default.cm-hr {
131
+ color: #999;
132
+ }
133
+ .cm-s-default .cm-link,
134
+ .cm-s-default.cm-link {
135
+ color: #00c;
136
+ }
137
+
138
+ /** sourcemode highlight **/
139
+
140
+ .cm-s-default .cm-header,
141
+ .cm-s-default .cm-property {
142
+ color: #D94F8A;
143
+ }
144
+ .cm-s-default .cm-header{
145
+ font-weight: bold;
146
+ }
147
+ .cm-s-default .cm-header-1{
148
+ font-size: 2rem;
149
+ line-height: 3rem;
150
+ }
151
+
152
+ .cm-s-default .cm-header-2{
153
+ font-size: 1.4rem;
154
+ line-height: 2rem;
155
+ }
156
+
157
+ .cm-s-default .cm-atom,
158
+ .cm-s-default .cm-number {
159
+ color: #958486;
160
+ }
161
+
162
+ .cm-s-default .cm-table-row,
163
+ .cm-s-default .cm-block-start{
164
+ }
165
+
166
+ .cm-s-default .cm-comment,
167
+ .cm-s-default .cm-code{
168
+ color: #4A5A9F;
169
+ }
170
+
171
+ .cm-s-default .cm-tag{
172
+ color: #a94442;
173
+ }
174
+
175
+ .cm-s-default .cm-string{
176
+ color: #7e86a9;
177
+ }
178
+
179
+ .cm-s-default .cm-link {
180
+ color: #C47A0F;
181
+ text-decoration: underline;
182
+ }
183
+
184
+ .cm-s-default .cm-variable-2,
185
+ .cm-s-default .cm-variable-1 {
186
+
187
+ }
188
+
189
+ .cm-s-default .cm-overlay {
190
+
191
+ }
192
+
193
+ .CodeMirror.cm-s-default div.CodeMirror-cursor{
194
+ border-left: 3px solid #E4629A;
195
+ }
196
+
197
+ .cm-s-default .CodeMirror-activeline-background {
198
+ left: -60px;
199
+ right: -30px;
200
+ background: rgba(204,204,204,0.2);
201
+ }
202
+
203
+ .cm-s-default .CodeMirror-gutters {
204
+ border-right: none;
205
+ }
206
+
207
+ .cm-s-default .cm-trailing-space-new-line:after,
208
+ .cm-startspace:after,
209
+ .cm-starttab .cm-tab:after {
210
+ content: "•";
211
+ position:absolute;
212
+ left:0;
213
+ opacity: 0;
214
+ font-family: "LetterGothicStd", monospace;
215
+ }
216
+
217
+ .os-windows .cm-startspace:after,
218
+ .os-windows .cm-starttab .cm-tab:after {
219
+ left: -0.1em;
220
+ }
221
+
222
+ .cm-starttab .cm-tab:after {
223
+ content: " ";
224
+ }
225
+
226
+ .cm-startspace, .cm-tab,
227
+ .cm-starttab,
228
+ .cm-trailing-space-a,
229
+ .cm-trailing-space-b,
230
+ .cm-trailing-space-new-line {
231
+ position:relative;
232
+ }
233
+
234
+ .cm-s-default .cm-trailing-space-new-line:after {
235
+ content: "↓";
236
+ opacity: 0.3;
237
+ }
238
+
239
+
240
+ .cm-negative {
241
+ color: #d44;
242
+ }
243
+ .cm-positive {
244
+ color: #292;
245
+ }
246
+ .cm-header,
247
+ .cm-strong {
248
+ font-weight: bold;
249
+ }
250
+ .cm-del {
251
+ text-decoration: line-through;
252
+ }
253
+ .cm-em {
254
+ font-style: italic;
255
+ }
256
+ .cm-link {
257
+ text-decoration: underline;
258
+ }
259
+ .cm-error {
260
+ color: #f00;
261
+ }
262
+ .cm-invalidchar {
263
+ color: #f00;
264
+ }
265
+ div.CodeMirror span.CodeMirror-matchingbracket {
266
+ color: #0f0;
267
+ }
268
+ div.CodeMirror span.CodeMirror-nonmatchingbracket {
269
+ color: #f22;
270
+ }
271
+ .cm-s-default .CodeMirror-activeline-background {
272
+ background: inherit;
273
+ }
274
+ /* STOP */
275
+
276
+ /* The rest of this file contains styles related to the mechanics of
277
+ the editor. You probably shouldn't touch them. */
278
+
279
+ .CodeMirror {
280
+ position: relative;
281
+ overflow: hidden;
282
+ /*background: white;*/
283
+ }
284
+ .CodeMirror-scroll {
285
+ /* 30px is the magic margin used to hide the element's real scrollbars */
286
+ /* See overflow: hidden in .CodeMirror */
287
+ margin-bottom: -30px;
288
+ margin-right: -30px;
289
+ padding-bottom: 30px;
290
+ padding-right: 30px;
291
+ height: 100%;
292
+ outline: none;
293
+ /* Prevent dragging from highlighting the element */
294
+ position: relative;
295
+ -moz-box-sizing: content-box;
296
+ box-sizing: content-box;
297
+ }
298
+ .CodeMirror-sizer {
299
+ position: relative;
300
+ }
301
+ /* The fake, visible scrollbars. Used to force redraw during scrolling
302
+ before actuall scrolling happens, thus preventing shaking and
303
+ flickering artifacts. */
304
+
305
+ .CodeMirror-vscrollbar,
306
+ .CodeMirror-hscrollbar,
307
+ .CodeMirror-scrollbar-filler,
308
+ .CodeMirror-gutter-filler {
309
+ position: absolute;
310
+ z-index: 6;
311
+ display: none;
312
+ }
313
+ .CodeMirror-vscrollbar {
314
+ right: 0;
315
+ top: 0;
316
+ overflow-x: hidden;
317
+ overflow-y: scroll;
318
+ }
319
+ .CodeMirror-hscrollbar {
320
+ bottom: 0;
321
+ left: 0;
322
+ overflow-y: hidden;
323
+ overflow-x: scroll;
324
+ }
325
+ .CodeMirror-scrollbar-filler {
326
+ right: 0;
327
+ bottom: 0;
328
+ }
329
+ .CodeMirror-gutter-filler {
330
+ left: 0;
331
+ bottom: 0;
332
+ }
333
+ .CodeMirror-gutters {
334
+ position: absolute;
335
+ left: 0;
336
+ top: 0;
337
+ padding-bottom: 30px;
338
+ z-index: 3;
339
+ }
340
+ .CodeMirror-gutter {
341
+ white-space: normal;
342
+ height: 100%;
343
+ -moz-box-sizing: content-box;
344
+ box-sizing: content-box;
345
+ padding-bottom: 30px;
346
+ margin-bottom: -32px;
347
+ display: inline-block;
348
+ /* Hack to make IE7 behave */
349
+ *zoom: 1;
350
+ *display: inline;
351
+ }
352
+ .CodeMirror-gutter-elt {
353
+ position: absolute;
354
+ cursor: default;
355
+ z-index: 4;
356
+ }
357
+ .CodeMirror-lines {
358
+ cursor: text;
359
+ }
360
+ .CodeMirror pre {
361
+ /* Reset some styles that the rest of the page might have set */
362
+ -moz-border-radius: 0;
363
+ -webkit-border-radius: 0;
364
+ border-radius: 0;
365
+ border-width: 0;
366
+ background: transparent;
367
+ font-family: inherit;
368
+ font-size: 1rem;
369
+ margin: 0;
370
+ white-space: pre;
371
+ word-wrap: normal;
372
+
373
+ z-index: 2;
374
+ position: relative;
375
+ overflow: visible;
376
+ }
377
+ .CodeMirror-wrap pre {
378
+ word-wrap: break-word;
379
+ white-space: pre-wrap;
380
+ word-break: normal;
381
+ }
382
+ .CodeMirror-code pre {
383
+ border-right: 30px solid transparent;
384
+ width: -webkit-fit-content;
385
+ width: -moz-fit-content;
386
+ width: fit-content;
387
+ }
388
+ .CodeMirror-wrap .CodeMirror-code pre {
389
+ border-right: none;
390
+ width: auto;
391
+ }
392
+ .CodeMirror-linebackground {
393
+ position: absolute;
394
+ left: 0;
395
+ right: 0;
396
+ top: 0;
397
+ bottom: 0;
398
+ z-index: 0;
399
+ }
400
+ .CodeMirror-linewidget {
401
+ position: relative;
402
+ z-index: 2;
403
+ overflow: auto;
404
+ }
405
+ .CodeMirror-widget {
406
+
407
+
408
+ }
409
+ .CodeMirror-wrap .CodeMirror-scroll {
410
+ overflow-x: hidden;
411
+ }
412
+ .CodeMirror-measure {
413
+ position: absolute;
414
+ width: 100%;
415
+ height: 0;
416
+ overflow: hidden;
417
+ visibility: hidden;
418
+ }
419
+ .CodeMirror-measure pre {
420
+ position: static;
421
+ }
422
+ .CodeMirror div.CodeMirror-cursor {
423
+ position: absolute;
424
+ visibility: hidden;
425
+ border-right: none;
426
+ width: 0;
427
+ }
428
+
429
+ .CodeMirror div.CodeMirror-cursor{
430
+ visibility: hidden;
431
+ }
432
+
433
+ .CodeMirror-focused div.CodeMirror-cursor {
434
+ visibility: inherit;
435
+ }
436
+ .CodeMirror-selected {
437
+ background: #d9d9d9;
438
+ }
439
+ .CodeMirror-focused .CodeMirror-selected {
440
+ background: #d7d4f0;
441
+ }
442
+ .cm-searching {
443
+ background: #ffa;
444
+ background: rgba(255, 255, 0, .4);
445
+ }
446
+ /* IE7 hack to prevent it from returning funny offsetTops on the spans */
447
+
448
+ .CodeMirror span {
449
+ *vertical-align: text-bottom;
450
+ }
451
+ @media print {
452
+ /* Hide the cursor when printing */
453
+ .CodeMirror div.CodeMirror-cursor {
454
+ visibility: hidden;
455
+ }
456
+ }
457
+
458
+
459
+
460
+ /* DARK THEME */
461
+ .theme__dark {
462
+ .CodeMirror {
463
+ color: #d4d4d4;
464
+ background: #1e1e1e;
465
+ }
466
+
467
+ .CodeMirror-gutters {
468
+ background-color: #1e1e1e;
469
+ border-right: 1px solid #333;
470
+ }
471
+
472
+ .CodeMirror-linenumber {
473
+ color: #858585;
474
+ }
475
+
476
+ /* Cursor */
477
+ .CodeMirror div.CodeMirror-cursor {
478
+ border-left: 1px solid #d4d4d4;
479
+ }
480
+
481
+ /* Selection */
482
+ .CodeMirror-selected {
483
+ background: #264f78;
484
+ }
485
+
486
+ .CodeMirror-focused .CodeMirror-selected {
487
+ background: #264f78;
488
+ }
489
+
490
+ /* Syntax Highlighting */
491
+ .cm-s-default {
492
+ .cm-header,
493
+ .cm-property {
494
+ color: #ff79c6;
495
+ }
496
+
497
+ .cm-keyword {
498
+ color: #c586c0;
499
+ }
500
+
501
+ .cm-atom,
502
+ .cm-number {
503
+ color: #b5cea8;
504
+ }
505
+
506
+ .cm-def {
507
+ color: #4ec9b0;
508
+ }
509
+
510
+ .cm-variable {
511
+ color: #9cdcfe;
512
+ }
513
+
514
+ .cm-variable-2 {
515
+ color: #9cdcfe;
516
+ }
517
+
518
+ .cm-variable-3 {
519
+ color: #9cdcfe;
520
+ }
521
+
522
+ .cm-comment {
523
+ color: #6a9955;
524
+ }
525
+
526
+ .cm-string {
527
+ color: #ce9178;
528
+ }
529
+
530
+ .cm-tag {
531
+ color: #569cd6;
532
+ }
533
+
534
+ .cm-link {
535
+ color: #569cd6;
536
+ }
537
+
538
+ .cm-error {
539
+ color: #f44747;
540
+ }
541
+
542
+ .CodeMirror-activeline-background {
543
+ background: #2c2c2c;
544
+ }
545
+ }
546
+
547
+ .CodeMirror-scrollbar-filler,
548
+ .CodeMirror-gutter-filler {
549
+ background-color: #1e1e1e;
550
+ }
551
+
552
+ .CodeMirror-gutters {
553
+ border-right: 1px solid #333;
554
+ background-color: #1e1e1e;
555
+ }
556
+
557
+ .CodeMirror-linenumber {
558
+ color: #858585;
559
+ }
560
+
561
+ .CodeMirror div.CodeMirror-cursor {
562
+ border-left: 1px solid #d4d4d4;
563
+ }
564
+
565
+ .CodeMirror div.CodeMirror-secondarycursor {
566
+ border-left: 1px solid #747474;
567
+ }
568
+
569
+ .CodeMirror.cm-keymap-fat-cursor div.CodeMirror-cursor {
570
+ background: #5a9e5a;
571
+ }
572
+
573
+ .cm-s-default {
574
+ .cm-keyword { color: #c586c0; }
575
+ .cm-atom, &.cm-atom { color: #b5cea8; }
576
+ .cm-number { color: #b5cea8; }
577
+ .cm-def { color: #4ec9b0; }
578
+ .cm-variable { color: #9cdcfe; }
579
+ .cm-variable-2 { color: #9cdcfe; }
580
+ .cm-variable-3 { color: #9cdcfe; }
581
+ .cm-property { color: #9cdcfe; }
582
+ .cm-operator { color: #d4d4d4; }
583
+ .cm-comment, &.cm-comment { color: #6a9955; }
584
+ .cm-string { color: #ce9178; }
585
+ .cm-string-2 { color: #ce9178; }
586
+ .cm-meta { color: #9cdcfe; }
587
+ .cm-qualifier { color: #9cdcfe; }
588
+ .cm-builtin { color: #4ec9b0; }
589
+ .cm-bracket { color: #d4d4d4; }
590
+ .cm-tag { color: #569cd6; }
591
+ .cm-attribute { color: #9cdcfe; }
592
+ .cm-header, &.cm-header { color: #ff79c6; }
593
+ .cm-quote, &.cm-quote { color: #608b4e; }
594
+ .cm-hr, &.cm-hr { color: #858585; }
595
+ .cm-link, &.cm-link { color: #569cd6; }
596
+
597
+ .cm-header,
598
+ .cm-property {
599
+ color: #ff79c6;
600
+ }
601
+
602
+ .cm-atom,
603
+ .cm-number {
604
+ color: #b5cea8;
605
+ }
606
+
607
+ .cm-comment,
608
+ .cm-code {
609
+ color: #6a9955;
610
+ }
611
+
612
+ .cm-tag {
613
+ color: #569cd6;
614
+ }
615
+
616
+ .cm-string {
617
+ color: #ce9178;
618
+ }
619
+
620
+ .cm-link {
621
+ color: #569cd6;
622
+ }
623
+ }
624
+
625
+ .CodeMirror.cm-s-default div.CodeMirror-cursor {
626
+ border-left: 3px solid #ff79c6;
627
+ }
628
+ }
@@ -0,0 +1,37 @@
1
+
2
+ .cherry{
3
+ .cherry-dropdown {
4
+ position: absolute;
5
+ width: 8.75rem;
6
+ min-height: 2.5rem;
7
+ background: var(--bg-color);
8
+ //border: 1px solid $borderColor;
9
+ box-shadow: 0 5px 15px -5px rgba(0, 0, 0, 0.5);
10
+ margin-left: -3.75rem;
11
+ z-index: 11;
12
+ border-radius: var(--border-radius);
13
+ max-height: 50vh;
14
+ overflow-y: auto;
15
+ &-item {
16
+ width: 100%;
17
+ padding: 0 0.9375rem;
18
+ text-align: left;
19
+ display: inline-block;
20
+ height: 2.25rem;
21
+ line-height: 2.25rem;
22
+ font-size: 0.775rem;
23
+ font-style: normal;
24
+ cursor: pointer;
25
+ box-sizing: border-box;
26
+ white-space: nowrap; /* 不换行 */
27
+ overflow: hidden; /* 超出隐藏 */
28
+ text-overflow: ellipsis;
29
+ &:hover {
30
+ background: var(--hover-bg-color);
31
+ color: var(--hover-text-color);
32
+ }
33
+
34
+ }
35
+
36
+ }
37
+ }
@@ -0,0 +1,78 @@
1
+ .cherry-editor {
2
+ position: relative;
3
+ padding-top: 0.3125rem;
4
+ padding-right: 0.3125rem;
5
+ width: 50%;
6
+ box-sizing: border-box;
7
+ overflow: hidden;
8
+
9
+ border-right: 0.125rem solid var(--border-color);
10
+
11
+ &.cherry-editor--full {
12
+ width: 100%;
13
+ padding-right: 0;
14
+ }
15
+
16
+ &.cherry-editor--hidden {
17
+ display: none;
18
+ }
19
+ /*scrollbar-color: transparent transparent;*/
20
+
21
+ .CodeMirror {
22
+ font-family: var(--font-family), serif;
23
+ background: var(--bg-color);
24
+ color: var(--text-color);
25
+ .cm-cursor-line {
26
+ background-color: var(--hover-bg-color);
27
+ }
28
+
29
+ .CodeMirror-vscrollbar {
30
+ display: none !important;
31
+ }
32
+
33
+ textarea {
34
+ font-size: var(--font-size);
35
+ }
36
+
37
+ .CodeMirror-line {
38
+ /* padding-left: 2rem;
39
+ padding-right: 2rem;*/
40
+ }
41
+ .CodeMirror-gutters,.CodeMirror-gutter{
42
+ padding-bottom: 0;
43
+ }
44
+
45
+ }
46
+ .CodeMirror-scroll {
47
+ margin-right: 0;
48
+ padding-right: 0;
49
+ .CodeMirror-sizer{
50
+ margin-right: 0;
51
+ padding-right: 0!important;
52
+ border-right-width: 0!important;
53
+ }
54
+ }
55
+ .CodeMirror-lines {
56
+ padding: 0.9375rem 2rem 0.9375rem 2rem;
57
+ box-sizing: border-box;
58
+ width: 100%;
59
+ .base64 {
60
+ display: inline-block;
61
+ overflow: hidden;
62
+ text-overflow: ellipsis;
63
+ max-width: 5rem;
64
+ white-space: nowrap;
65
+ vertical-align: bottom;
66
+ // color: darkmagenta !important;
67
+ font-size: 0.75rem !important;
68
+ }
69
+ }
70
+
71
+
72
+ .CodeMirror pre {
73
+ font-family: var(--font-family), serif;
74
+ font-size: var(--font-size);
75
+ line-height: var(--line-height);
76
+ }
77
+
78
+ }