@exmg/exm-markdown-editor 1.0.1 → 1.0.3

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@exmg/exm-markdown-editor",
3
- "version": "1.0.1",
3
+ "version": "1.0.3",
4
4
  "type": "module",
5
5
  "main": "index.js",
6
6
  "module": "index.js",
@@ -34,7 +34,7 @@
34
34
  "**/*.d.ts"
35
35
  ],
36
36
  "dependencies": {
37
- "@exmg/lit-base": "^2.0.1",
37
+ "@exmg/lit-base": "^3.0.0",
38
38
  "@material/web": "^2.2.0",
39
39
  "codemirror": "5.49.2",
40
40
  "lit": "^3.0.0",
@@ -52,5 +52,5 @@
52
52
  "publishConfig": {
53
53
  "access": "public"
54
54
  },
55
- "gitHead": "274f2fb879258487017192fcfe33c8cd23244dbb"
55
+ "gitHead": "e7086831faea0bdfe8628b0de9b7ddcc45174558"
56
56
  }
@@ -1,2 +1 @@
1
1
  export declare const style: import("lit").CSSResult;
2
- export default style;
@@ -1,4 +1,491 @@
1
1
  import { css } from 'lit';
2
- export const style = css `.CodeMirror{--editor-code-color: var(--exm-markdown-editor-code-color, var(--md-sys-color-on-surface));--editor-code-cursor-color: var(--exm-markdown-editor-code-cursor-color, var(--md-sys-color-on-surface));--editor-code-header-color: var(--exm-markdown-editor-code-header-color, #4a8fc0);--editor-code-inline-code-color: var(--exm-markdown-editor-code-inline-code-color, #ea881f);--editor-code-list-color: var(--exm-markdown-editor-code-list-color, rgb(25, 165, 28));--editor-selected-code-color: var(--exm-markdown-editor-selected-code-color, rgb(140, 140, 140));color:var(--editor-code-color, var(--md-sys-color-on-surface, black));direction:ltr}.CodeMirror-lines{padding:0}.CodeMirror pre{padding:0 1rem}.CodeMirror-scrollbar-filler,.CodeMirror-gutter-filler{background-color:#fff}.CodeMirror-gutters{border-right:1px solid #ddd;background-color:#f7f7f7;white-space:nowrap}.CodeMirror-linenumber{padding:0 3px 0 5px;min-width:20px;text-align:right;color:#999;white-space:nowrap}.CodeMirror-guttermarker{color:#000}.CodeMirror-guttermarker-subtle{color:#999}.CodeMirror-cursor{border-left:1px solid var(--editor-code-cursor-color, var(--md-sys-color-on-surface, black))}.CodeMirror div.CodeMirror-secondarycursor{border-left:1px solid silver}.cm-fat-cursor .CodeMirror-cursor{width:auto;border:0 !important;background:#7e7}.cm-fat-cursor div.CodeMirror-cursors{z-index:1}.cm-fat-cursor-mark{background-color:rgba(20,255,20,.5);-webkit-animation:blink 1.06s steps(1) infinite;-moz-animation:blink 1.06s steps(1) infinite;animation:blink 1.06s steps(1) infinite}.cm-animate-fat-cursor{width:auto;border:0;-webkit-animation:blink 1.06s steps(1) infinite;-moz-animation:blink 1.06s steps(1) infinite;animation:blink 1.06s steps(1) infinite;background-color:#7e7}@-moz-keyframes blink{50%{background-color:rgba(0,0,0,0)}}@-webkit-keyframes blink{50%{background-color:rgba(0,0,0,0)}}@keyframes blink{50%{background-color:rgba(0,0,0,0)}}.cm-tab{display:inline-block;text-decoration:inherit}.CodeMirror-rulers{position:absolute;left:0;right:0;top:-50px;bottom:-20px;overflow:hidden}.CodeMirror-ruler{border-left:1px solid #ccc;top:0;bottom:0;position:absolute}.cm-s-default .cm-header{color:var(--editor-code-header-color)}.cm-s-default .cm-quote{color:var(--editor-code-quote-color)}.cm-negative{color:#d44}.cm-positive{color:#292}.cm-header,.cm-strong{font-weight:bold}.cm-em{font-style:italic}.cm-link{text-decoration:underline}.cm-strikethrough{text-decoration:line-through}.cm-s-default .cm-keyword{color:#708}.cm-s-default .cm-atom{color:#219}.cm-s-default .cm-number{color:var(--editor-code-list-color)}.cm-s-default .cm-def{color:blue}.cm-s-default .cm-variable-2{color:var(--editor-code-list-color)}.cm-s-default .cm-variable-3,.cm-s-default .cm-type{color:var(--editor-code-list-color)}.cm-s-default .cm-comment{color:#a50}.cm-s-default .cm-string{color:#a11}.cm-s-default .cm-string-2{color:var(--editor-code-inline-code-color, #f50)}.cm-s-default .cm-meta{color:#555}.cm-s-default .cm-qualifier{color:#555}.cm-s-default .cm-builtin{color:#30a}.cm-s-default .cm-bracket{color:#997}.cm-s-default .cm-tag{color:#170}.cm-s-default .cm-attribute{color:#00c}.cm-s-default .cm-hr{color:#999}.cm-s-default .cm-link{color:#00c}.cm-s-default .cm-error{color:red}.cm-invalidchar{color:red}.CodeMirror-composing{border-bottom:2px solid}div.CodeMirror span.CodeMirror-matchingbracket{color:#0b0}div.CodeMirror span.CodeMirror-nonmatchingbracket{color:#a22}.CodeMirror-matchingtag{background:rgba(255,150,0,.3)}.CodeMirror-activeline-background{background:#e8f2ff}.CodeMirror{position:relative;overflow:hidden}.CodeMirror-scroll{overflow:scroll !important;margin-bottom:-30px;margin-right:-30px;padding-bottom:30px;height:100%;outline:none;position:relative;box-sizing:border-box}.CodeMirror-sizer{position:relative;border-right:30px solid rgba(0,0,0,0)}.CodeMirror-vscrollbar,.CodeMirror-hscrollbar,.CodeMirror-scrollbar-filler,.CodeMirror-gutter-filler{position:absolute;z-index:6;display:none}.CodeMirror-vscrollbar{right:0;top:0;overflow-x:hidden;overflow-y:scroll}.CodeMirror-hscrollbar{bottom:0;left:0;overflow-y:hidden;overflow-x:scroll}.CodeMirror-scrollbar-filler{right:0;bottom:0}.CodeMirror-gutter-filler{left:0;bottom:0}.CodeMirror-gutters{position:absolute;left:0;top:0;min-height:100%;z-index:3}.CodeMirror-gutter{white-space:normal;height:100%;display:inline-block;vertical-align:top;margin-bottom:-30px}.CodeMirror-gutter-wrapper{position:absolute;z-index:4;background:none !important;border:none !important}.CodeMirror-gutter-background{position:absolute;top:0;bottom:0;z-index:4}.CodeMirror-gutter-elt{position:absolute;cursor:default;z-index:4}.CodeMirror-gutter-wrapper ::selection{background-color:rgba(0,0,0,0)}.CodeMirror-gutter-wrapper ::-moz-selection{background-color:rgba(0,0,0,0)}.CodeMirror-lines{cursor:text;min-height:1px}.CodeMirror pre{-moz-border-radius:0;-webkit-border-radius:0;border-radius:0;border-width:0;background:rgba(0,0,0,0);font-family:inherit;font-size:inherit;margin:0;white-space:pre;word-wrap:normal;line-height:inherit;color:inherit;z-index:2;position:relative;overflow:visible;-webkit-tap-highlight-color:rgba(0,0,0,0);-webkit-font-variant-ligatures:contextual;font-variant-ligatures:contextual}.CodeMirror-wrap pre{word-wrap:break-word;white-space:pre-wrap;word-break:normal}.CodeMirror-linebackground{position:absolute;left:0;right:0;top:0;bottom:0;z-index:0}.CodeMirror-linewidget{position:relative;z-index:2;padding:.1px}.CodeMirror-rtl pre{direction:rtl}.CodeMirror-code{outline:none}.CodeMirror-sizer,.CodeMirror-gutter,.CodeMirror-gutters,.CodeMirror-linenumber{-moz-box-sizing:content-box;box-sizing:content-box}.CodeMirror-measure{position:absolute;width:100%;height:0;overflow:hidden;visibility:hidden}.CodeMirror-cursor{position:absolute;pointer-events:none}.CodeMirror-measure pre{position:static}div.CodeMirror-cursors{visibility:hidden;position:relative;z-index:3}div.CodeMirror-dragcursors{visibility:visible}.CodeMirror-focused div.CodeMirror-cursors{visibility:visible}.CodeMirror-selected{background:#d9d9d9}.CodeMirror-focused .CodeMirror-selected{background:var(--editor-selected-code-color)}.CodeMirror-crosshair{cursor:crosshair}.CodeMirror-line::selection,.CodeMirror-line>span::selection,.CodeMirror-line>span>span::selection{background:#d7d4f0}.CodeMirror-line::-moz-selection,.CodeMirror-line>span::-moz-selection,.CodeMirror-line>span>span::-moz-selection{background:#d7d4f0}.cm-searching{background-color:#ffa;background-color:rgba(255,255,0,.4)}.cm-force-border{padding-right:.1px}@media print{.CodeMirror div.CodeMirror-cursors{visibility:hidden}}.cm-tab-wrap-hack:after{content:""}span.CodeMirror-selectedtext{background:none}`;
3
- export default style;
2
+ export const style = css `
3
+ .CodeMirror {
4
+ --editor-code-color: var(--exm-markdown-editor-code-color, var(--md-sys-color-on-surface));
5
+ --editor-code-cursor-color: var(--exm-markdown-editor-code-cursor-color, var(--md-sys-color-on-surface));
6
+ --editor-code-header-color: var(--exm-markdown-editor-code-header-color, #4a8fc0);
7
+ --editor-code-inline-code-color: var(--exm-markdown-editor-code-inline-code-color, #ea881f);
8
+ --editor-code-list-color: var(--exm-markdown-editor-code-list-color, rgb(25, 165, 28));
9
+ --editor-selected-code-color: var(--exm-markdown-editor-selected-code-color, rgb(140, 140, 140));
10
+ color: var(--editor-code-color, var(--md-sys-color-on-surface, black));
11
+ direction: ltr;
12
+ }
13
+
14
+ .CodeMirror-lines {
15
+ padding: 0;
16
+ }
17
+
18
+ .CodeMirror pre {
19
+ padding: 0 1rem;
20
+ }
21
+
22
+ .CodeMirror-scrollbar-filler,
23
+ .CodeMirror-gutter-filler {
24
+ background-color: #fff;
25
+ }
26
+
27
+ .CodeMirror-gutters {
28
+ border-right: 1px solid #ddd;
29
+ background-color: #f7f7f7;
30
+ white-space: nowrap;
31
+ }
32
+
33
+ .CodeMirror-linenumber {
34
+ padding: 0 3px 0 5px;
35
+ min-width: 20px;
36
+ text-align: right;
37
+ color: #999;
38
+ white-space: nowrap;
39
+ }
40
+
41
+ .CodeMirror-guttermarker {
42
+ color: #000;
43
+ }
44
+
45
+ .CodeMirror-guttermarker-subtle {
46
+ color: #999;
47
+ }
48
+
49
+ .CodeMirror-cursor {
50
+ border-left: 1px solid var(--editor-code-cursor-color, var(--md-sys-color-on-surface, black));
51
+ }
52
+
53
+ .CodeMirror div.CodeMirror-secondarycursor {
54
+ border-left: 1px solid silver;
55
+ }
56
+
57
+ .cm-fat-cursor .CodeMirror-cursor {
58
+ width: auto;
59
+ border: 0 !important;
60
+ background: #7e7;
61
+ }
62
+
63
+ .cm-fat-cursor div.CodeMirror-cursors {
64
+ z-index: 1;
65
+ }
66
+
67
+ .cm-fat-cursor-mark {
68
+ background-color: rgba(20, 255, 20, 0.5);
69
+ -webkit-animation: blink 1.06s steps(1) infinite;
70
+ -moz-animation: blink 1.06s steps(1) infinite;
71
+ animation: blink 1.06s steps(1) infinite;
72
+ }
73
+
74
+ .cm-animate-fat-cursor {
75
+ width: auto;
76
+ border: 0;
77
+ -webkit-animation: blink 1.06s steps(1) infinite;
78
+ -moz-animation: blink 1.06s steps(1) infinite;
79
+ animation: blink 1.06s steps(1) infinite;
80
+ background-color: #7e7;
81
+ }
82
+
83
+ @-moz-keyframes blink {
84
+ 50% {
85
+ background-color: rgba(0, 0, 0, 0);
86
+ }
87
+ }
88
+
89
+ @-webkit-keyframes blink {
90
+ 50% {
91
+ background-color: rgba(0, 0, 0, 0);
92
+ }
93
+ }
94
+
95
+ @keyframes blink {
96
+ 50% {
97
+ background-color: rgba(0, 0, 0, 0);
98
+ }
99
+ }
100
+
101
+ .cm-tab {
102
+ display: inline-block;
103
+ text-decoration: inherit;
104
+ }
105
+
106
+ .CodeMirror-rulers {
107
+ position: absolute;
108
+ left: 0;
109
+ right: 0;
110
+ top: -50px;
111
+ bottom: -20px;
112
+ overflow: hidden;
113
+ }
114
+
115
+ .CodeMirror-ruler {
116
+ border-left: 1px solid #ccc;
117
+ top: 0;
118
+ bottom: 0;
119
+ position: absolute;
120
+ }
121
+
122
+ .cm-s-default .cm-header {
123
+ color: var(--editor-code-header-color);
124
+ }
125
+
126
+ .cm-s-default .cm-quote {
127
+ color: var(--editor-code-quote-color);
128
+ }
129
+
130
+ .cm-negative {
131
+ color: #d44;
132
+ }
133
+
134
+ .cm-positive {
135
+ color: #292;
136
+ }
137
+
138
+ .cm-header,
139
+ .cm-strong {
140
+ font-weight: bold;
141
+ }
142
+
143
+ .cm-em {
144
+ font-style: italic;
145
+ }
146
+
147
+ .cm-link {
148
+ text-decoration: underline;
149
+ }
150
+
151
+ .cm-strikethrough {
152
+ text-decoration: line-through;
153
+ }
154
+
155
+ .cm-s-default .cm-keyword {
156
+ color: #708;
157
+ }
158
+
159
+ .cm-s-default .cm-atom {
160
+ color: #219;
161
+ }
162
+
163
+ .cm-s-default .cm-number {
164
+ color: var(--editor-code-list-color);
165
+ }
166
+
167
+ .cm-s-default .cm-def {
168
+ color: blue;
169
+ }
170
+
171
+ .cm-s-default .cm-variable-2 {
172
+ color: var(--editor-code-list-color);
173
+ }
174
+
175
+ .cm-s-default .cm-variable-3,
176
+ .cm-s-default .cm-type {
177
+ color: var(--editor-code-list-color);
178
+ }
179
+
180
+ .cm-s-default .cm-comment {
181
+ color: #a50;
182
+ }
183
+
184
+ .cm-s-default .cm-string {
185
+ color: #a11;
186
+ }
187
+
188
+ .cm-s-default .cm-string-2 {
189
+ color: var(--editor-code-inline-code-color, #f50);
190
+ }
191
+
192
+ .cm-s-default .cm-meta {
193
+ color: #555;
194
+ }
195
+
196
+ .cm-s-default .cm-qualifier {
197
+ color: #555;
198
+ }
199
+
200
+ .cm-s-default .cm-builtin {
201
+ color: #30a;
202
+ }
203
+
204
+ .cm-s-default .cm-bracket {
205
+ color: #997;
206
+ }
207
+
208
+ .cm-s-default .cm-tag {
209
+ color: #170;
210
+ }
211
+
212
+ .cm-s-default .cm-attribute {
213
+ color: #00c;
214
+ }
215
+
216
+ .cm-s-default .cm-hr {
217
+ color: #999;
218
+ }
219
+
220
+ .cm-s-default .cm-link {
221
+ color: #00c;
222
+ }
223
+
224
+ .cm-s-default .cm-error {
225
+ color: red;
226
+ }
227
+
228
+ .cm-invalidchar {
229
+ color: red;
230
+ }
231
+
232
+ .CodeMirror-composing {
233
+ border-bottom: 2px solid;
234
+ }
235
+
236
+ div.CodeMirror span.CodeMirror-matchingbracket {
237
+ color: #0b0;
238
+ }
239
+
240
+ div.CodeMirror span.CodeMirror-nonmatchingbracket {
241
+ color: #a22;
242
+ }
243
+
244
+ .CodeMirror-matchingtag {
245
+ background: rgba(255, 150, 0, 0.3);
246
+ }
247
+
248
+ .CodeMirror-activeline-background {
249
+ background: #e8f2ff;
250
+ }
251
+
252
+ .CodeMirror {
253
+ position: relative;
254
+ overflow: hidden;
255
+ }
256
+
257
+ .CodeMirror-scroll {
258
+ overflow: scroll !important;
259
+ margin-bottom: -30px;
260
+ margin-right: -30px;
261
+ padding-bottom: 30px;
262
+ height: 100%;
263
+ outline: none;
264
+ position: relative;
265
+ box-sizing: border-box;
266
+ }
267
+
268
+ .CodeMirror-sizer {
269
+ position: relative;
270
+ border-right: 30px solid rgba(0, 0, 0, 0);
271
+ }
272
+
273
+ .CodeMirror-vscrollbar,
274
+ .CodeMirror-hscrollbar,
275
+ .CodeMirror-scrollbar-filler,
276
+ .CodeMirror-gutter-filler {
277
+ position: absolute;
278
+ z-index: 6;
279
+ display: none;
280
+ }
281
+
282
+ .CodeMirror-vscrollbar {
283
+ right: 0;
284
+ top: 0;
285
+ overflow-x: hidden;
286
+ overflow-y: scroll;
287
+ }
288
+
289
+ .CodeMirror-hscrollbar {
290
+ bottom: 0;
291
+ left: 0;
292
+ overflow-y: hidden;
293
+ overflow-x: scroll;
294
+ }
295
+
296
+ .CodeMirror-scrollbar-filler {
297
+ right: 0;
298
+ bottom: 0;
299
+ }
300
+
301
+ .CodeMirror-gutter-filler {
302
+ left: 0;
303
+ bottom: 0;
304
+ }
305
+
306
+ .CodeMirror-gutters {
307
+ position: absolute;
308
+ left: 0;
309
+ top: 0;
310
+ min-height: 100%;
311
+ z-index: 3;
312
+ }
313
+
314
+ .CodeMirror-gutter {
315
+ white-space: normal;
316
+ height: 100%;
317
+ display: inline-block;
318
+ vertical-align: top;
319
+ margin-bottom: -30px;
320
+ }
321
+
322
+ .CodeMirror-gutter-wrapper {
323
+ position: absolute;
324
+ z-index: 4;
325
+ background: none !important;
326
+ border: none !important;
327
+ }
328
+
329
+ .CodeMirror-gutter-background {
330
+ position: absolute;
331
+ top: 0;
332
+ bottom: 0;
333
+ z-index: 4;
334
+ }
335
+
336
+ .CodeMirror-gutter-elt {
337
+ position: absolute;
338
+ cursor: default;
339
+ z-index: 4;
340
+ }
341
+
342
+ .CodeMirror-gutter-wrapper ::selection {
343
+ background-color: rgba(0, 0, 0, 0);
344
+ }
345
+
346
+ .CodeMirror-gutter-wrapper ::-moz-selection {
347
+ background-color: rgba(0, 0, 0, 0);
348
+ }
349
+
350
+ .CodeMirror-lines {
351
+ cursor: text;
352
+ min-height: 1px;
353
+ }
354
+
355
+ .CodeMirror pre {
356
+ -moz-border-radius: 0;
357
+ -webkit-border-radius: 0;
358
+ border-radius: 0;
359
+ border-width: 0;
360
+ background: rgba(0, 0, 0, 0);
361
+ font-family: inherit;
362
+ font-size: inherit;
363
+ margin: 0;
364
+ white-space: pre;
365
+ word-wrap: normal;
366
+ line-height: inherit;
367
+ color: inherit;
368
+ z-index: 2;
369
+ position: relative;
370
+ overflow: visible;
371
+ -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
372
+ -webkit-font-variant-ligatures: contextual;
373
+ font-variant-ligatures: contextual;
374
+ }
375
+
376
+ .CodeMirror-wrap pre {
377
+ word-wrap: break-word;
378
+ white-space: pre-wrap;
379
+ word-break: normal;
380
+ }
381
+
382
+ .CodeMirror-linebackground {
383
+ position: absolute;
384
+ left: 0;
385
+ right: 0;
386
+ top: 0;
387
+ bottom: 0;
388
+ z-index: 0;
389
+ }
390
+
391
+ .CodeMirror-linewidget {
392
+ position: relative;
393
+ z-index: 2;
394
+ padding: 0.1px;
395
+ }
396
+
397
+ .CodeMirror-rtl pre {
398
+ direction: rtl;
399
+ }
400
+
401
+ .CodeMirror-code {
402
+ outline: none;
403
+ }
404
+
405
+ .CodeMirror-sizer,
406
+ .CodeMirror-gutter,
407
+ .CodeMirror-gutters,
408
+ .CodeMirror-linenumber {
409
+ -moz-box-sizing: content-box;
410
+ box-sizing: content-box;
411
+ }
412
+
413
+ .CodeMirror-measure {
414
+ position: absolute;
415
+ width: 100%;
416
+ height: 0;
417
+ overflow: hidden;
418
+ visibility: hidden;
419
+ }
420
+
421
+ .CodeMirror-cursor {
422
+ position: absolute;
423
+ pointer-events: none;
424
+ }
425
+
426
+ .CodeMirror-measure pre {
427
+ position: static;
428
+ }
429
+
430
+ div.CodeMirror-cursors {
431
+ visibility: hidden;
432
+ position: relative;
433
+ z-index: 3;
434
+ }
435
+
436
+ div.CodeMirror-dragcursors {
437
+ visibility: visible;
438
+ }
439
+
440
+ .CodeMirror-focused div.CodeMirror-cursors {
441
+ visibility: visible;
442
+ }
443
+
444
+ .CodeMirror-selected {
445
+ background: #d9d9d9;
446
+ }
447
+
448
+ .CodeMirror-focused .CodeMirror-selected {
449
+ background: var(--editor-selected-code-color);
450
+ }
451
+
452
+ .CodeMirror-crosshair {
453
+ cursor: crosshair;
454
+ }
455
+
456
+ .CodeMirror-line::selection,
457
+ .CodeMirror-line > span::selection,
458
+ .CodeMirror-line > span > span::selection {
459
+ background: #d7d4f0;
460
+ }
461
+
462
+ .CodeMirror-line::-moz-selection,
463
+ .CodeMirror-line > span::-moz-selection,
464
+ .CodeMirror-line > span > span::-moz-selection {
465
+ background: #d7d4f0;
466
+ }
467
+
468
+ .cm-searching {
469
+ background-color: #ffa;
470
+ background-color: rgba(255, 255, 0, 0.4);
471
+ }
472
+
473
+ .cm-force-border {
474
+ padding-right: 0.1px;
475
+ }
476
+
477
+ @media print {
478
+ .CodeMirror div.CodeMirror-cursors {
479
+ visibility: hidden;
480
+ }
481
+ }
482
+
483
+ .cm-tab-wrap-hack:after {
484
+ content: '';
485
+ }
486
+
487
+ span.CodeMirror-selectedtext {
488
+ background: none;
489
+ }
490
+ `;
4
491
  //# sourceMappingURL=exm-markdown-codemirror-css.js.map
@@ -1,2 +1 @@
1
1
  export declare const style: import("lit").CSSResult;
2
- export default style;
@@ -1,4 +1,143 @@
1
1
  import { css } from 'lit';
2
- export const style = css `:host{display:block;overflow:hidden;--editor-border-color: var(--exm-markdown-editor-border-color, var(--md-sys-color-on-surface-variant));--editor-border-color-focus: var(--exm-markdown-editor-border-color-focus, var(--md-sys-color-primary));--editor-background-color: var(--exm-markdown-editor-background-color, var(--md-sys-color-surface-container-high));--editor-code-background-color: var(--exm-markdown-editor-code-background-color, var(--md-sys-color-surface-container-high));--editor-background-focus-color: var(--exm-markdown-editor-background-focus-color, var(--md-sys-color-surface-container-high));--editor-code-background-focus-color: var(--exm-markdown-editor-code-background-focus-color, var(--md-sys-color-surface-container-highest));--editor-label-focus-color: var(--exm-markdown-editor-label-focus-color, var(--md-sys-color-primary));--editor-label-color: var(--exm-markdown-editor-label-color, var(--md-sys-color-on-surface))}.container{display:grid;position:relative;grid-template-columns:100%;grid-template-rows:0px 56px 1fr;transition:grid-template-rows .2s ease;border-top-right-radius:4px;background-color:var(--editor-code-background-color, var(--md-sys-color-surface-container-high));border-top-left-radius:4px}.container[label]{grid-template-rows:2rem 56px 1fr}.container:hover{background-color:var(--editor-code-background-focus-color, var(--md-sys-color-surface-container-highest))}.container::after{content:" ";display:block;position:absolute;bottom:0;width:100%;height:3px;background:var(--editor-border-color-focus, var(--md-sys-color-primary))}.container[preview]{background-color:var(--editor-background-color, var(--md-sys-color-surface-container-high));grid-template-rows:0px .3rem 1fr}.container[preview][label]{grid-template-rows:2rem .3rem 1fr}.container[preview]:hover{background-color:var(--editor-code-background-focus-color, var(--md-sys-color-surface-container-highest));cursor:text}.container[preview]::after{height:1px;background:var(--editor-border-color, var(--md-sys-color-on-surface-variant))}label[for=markdowdEditorContainer]{grid-row-start:1;padding:.5rem 0 0 1rem;font-size:.7rem;color:var(--editor-label-focus-color, var(--md-sys-color-primary));transition:all 200ms ease;transform:scale(1) translateY(0px)}label[for=markdowdEditorContainer][preview]{color:var(--editor-label-color, var(--md-sys-color-on-surface));padding-bottom:1rem;transform:translateY(8px);font-size:1rem}exm-markdown-editor-toolbar{grid-row-start:1;visibility:visible;transition:visibility 0s,opacity .5s linear;opacity:1}exm-markdown-editor-toolbar[preview]{visibility:hidden;opacity:0}exm-markdown-editor-toolbar[label]{grid-row-start:2}#preview{display:none;grid-row-start:3;overflow:scroll}#preview[preview]{display:block}#editor{display:block;grid-row-start:3}#editor[preview]{display:none}slot[name=preview]{display:none;grid-row-start:3}slot[name=preview][preview]{display:block}::slotted([slot=preview]){overflow:scroll}.preview-content{padding:0 1rem}`;
3
- export default style;
2
+ export const style = css `
3
+ :host {
4
+ display: block;
5
+ overflow: hidden;
6
+ --editor-border-color: var(--exm-markdown-editor-border-color, var(--md-sys-color-on-surface-variant));
7
+ --editor-border-color-focus: var(--exm-markdown-editor-border-color-focus, var(--md-sys-color-primary));
8
+ --editor-background-color: var(--exm-markdown-editor-background-color, var(--md-sys-color-surface-container-high));
9
+ --editor-code-background-color: var(
10
+ --exm-markdown-editor-code-background-color,
11
+ var(--md-sys-color-surface-container-high)
12
+ );
13
+ --editor-background-focus-color: var(
14
+ --exm-markdown-editor-background-focus-color,
15
+ var(--md-sys-color-surface-container-high)
16
+ );
17
+ --editor-code-background-focus-color: var(
18
+ --exm-markdown-editor-code-background-focus-color,
19
+ var(--md-sys-color-surface-container-highest)
20
+ );
21
+ --editor-label-focus-color: var(--exm-markdown-editor-label-focus-color, var(--md-sys-color-primary));
22
+ --editor-label-color: var(--exm-markdown-editor-label-color, var(--md-sys-color-on-surface));
23
+ }
24
+
25
+ .container {
26
+ display: grid;
27
+ position: relative;
28
+ grid-template-columns: 100%;
29
+ grid-template-rows: 0px 56px 1fr;
30
+ transition: grid-template-rows 0.2s ease;
31
+ border-top-right-radius: 4px;
32
+ background-color: var(--editor-code-background-color, var(--md-sys-color-surface-container-high));
33
+ border-top-left-radius: 4px;
34
+ }
35
+
36
+ .container[label] {
37
+ grid-template-rows: 2rem 56px 1fr;
38
+ }
39
+
40
+ .container:hover {
41
+ background-color: var(--editor-code-background-focus-color, var(--md-sys-color-surface-container-highest));
42
+ }
43
+
44
+ .container::after {
45
+ content: ' ';
46
+ display: block;
47
+ position: absolute;
48
+ bottom: 0;
49
+ width: 100%;
50
+ height: 3px;
51
+ background: var(--editor-border-color-focus, var(--md-sys-color-primary));
52
+ }
53
+
54
+ .container[preview] {
55
+ background-color: var(--editor-background-color, var(--md-sys-color-surface-container-high));
56
+ grid-template-rows: 0px 0.3rem 1fr;
57
+ }
58
+
59
+ .container[preview][label] {
60
+ grid-template-rows: 2rem 0.3rem 1fr;
61
+ }
62
+
63
+ .container[preview]:hover {
64
+ background-color: var(--editor-code-background-focus-color, var(--md-sys-color-surface-container-highest));
65
+ cursor: text;
66
+ }
67
+
68
+ .container[preview]::after {
69
+ height: 1px;
70
+ background: var(--editor-border-color, var(--md-sys-color-on-surface-variant));
71
+ }
72
+
73
+ label[for='markdowdEditorContainer'] {
74
+ grid-row-start: 1;
75
+ padding: 0.5rem 0 0 1rem;
76
+ font-size: 0.7rem;
77
+ color: var(--editor-label-focus-color, var(--md-sys-color-primary));
78
+ transition: all 200ms ease;
79
+ transform: scale(1) translateY(0px);
80
+ }
81
+
82
+ label[for='markdowdEditorContainer'][preview] {
83
+ color: var(--editor-label-color, var(--md-sys-color-on-surface));
84
+ padding-bottom: 1rem;
85
+ transform: translateY(8px);
86
+ font-size: 1rem;
87
+ }
88
+
89
+ exm-markdown-editor-toolbar {
90
+ grid-row-start: 1;
91
+ visibility: visible;
92
+ transition:
93
+ visibility 0s,
94
+ opacity 0.5s linear;
95
+ opacity: 1;
96
+ }
97
+
98
+ exm-markdown-editor-toolbar[preview] {
99
+ visibility: hidden;
100
+ opacity: 0;
101
+ }
102
+
103
+ exm-markdown-editor-toolbar[label] {
104
+ grid-row-start: 2;
105
+ }
106
+
107
+ #preview {
108
+ display: none;
109
+ grid-row-start: 3;
110
+ overflow: scroll;
111
+ }
112
+
113
+ #preview[preview] {
114
+ display: block;
115
+ }
116
+
117
+ #editor {
118
+ display: block;
119
+ grid-row-start: 3;
120
+ }
121
+
122
+ #editor[preview] {
123
+ display: none;
124
+ }
125
+
126
+ slot[name='preview'] {
127
+ display: none;
128
+ grid-row-start: 3;
129
+ }
130
+
131
+ slot[name='preview'][preview] {
132
+ display: block;
133
+ }
134
+
135
+ ::slotted([slot='preview']) {
136
+ overflow: scroll;
137
+ }
138
+
139
+ .preview-content {
140
+ padding: 0 1rem;
141
+ }
142
+ `;
4
143
  //# sourceMappingURL=exm-markdown-editor-css.js.map
@@ -1,2 +1 @@
1
1
  export declare const style: import("lit").CSSResult;
2
- export default style;
@@ -1,4 +1,20 @@
1
1
  import { css } from 'lit';
2
- export const style = css `:host{display:block}.toolbar-container{padding:.5rem 1rem;display:flex}md-icon-button:not(:first){margin:0 .3rem}md-icon-button:first{margin:0 0}`;
3
- export default style;
2
+ export const style = css `
3
+ :host {
4
+ display: block;
5
+ }
6
+
7
+ .toolbar-container {
8
+ padding: 0.5rem 1rem;
9
+ display: flex;
10
+ }
11
+
12
+ md-icon-button:not(:first) {
13
+ margin: 0 0.3rem;
14
+ }
15
+
16
+ md-icon-button:first {
17
+ margin: 0 0;
18
+ }
19
+ `;
4
20
  //# sourceMappingURL=exm-markdown-editor-toolbar-css.js.map
@@ -1,443 +0,0 @@
1
- /* BASICS */
2
- .CodeMirror {
3
- /* Variables to use internaly */
4
- --editor-code-color: var(--exm-markdown-editor-code-color, var(--md-sys-color-on-surface));
5
- --editor-code-cursor-color: var(--exm-markdown-editor-code-cursor-color, var(--md-sys-color-on-surface));
6
- --editor-code-header-color: var(--exm-markdown-editor-code-header-color, #4a8fc0);
7
- --editor-code-inline-code-color: var(--exm-markdown-editor-code-inline-code-color, #ea881f);
8
- // --editor-code-background-color: var(--exm-markdown-editor-code-background-color, var(--md-sys-color-surface));
9
- --editor-code-list-color: var(--exm-markdown-editor-code-list-color, rgb(25, 165, 28));
10
- --editor-selected-code-color: var(--exm-markdown-editor-selected-code-color, rgb(140, 140, 140));
11
- /* Set height, width, borders, and global font properties here */
12
- color: var(--editor-code-color, var(--md-sys-color-on-surface, black));
13
- direction: ltr;
14
- }
15
- /* PADDING */
16
- .CodeMirror-lines {
17
- padding: 0; /* Vertical padding around content */
18
- }
19
- .CodeMirror pre {
20
- padding: 0 1rem; /* Horizontal padding of content */
21
- }
22
- .CodeMirror-scrollbar-filler,
23
- .CodeMirror-gutter-filler {
24
- background-color: white; /* The little square between H and V scrollbars */
25
- }
26
- /* GUTTER */
27
- .CodeMirror-gutters {
28
- border-right: 1px solid #ddd;
29
- background-color: #f7f7f7;
30
- white-space: nowrap;
31
- }
32
- .CodeMirror-linenumber {
33
- padding: 0 3px 0 5px;
34
- min-width: 20px;
35
- text-align: right;
36
- color: #999;
37
- white-space: nowrap;
38
- }
39
- .CodeMirror-guttermarker {
40
- color: black;
41
- }
42
- .CodeMirror-guttermarker-subtle {
43
- color: #999;
44
- }
45
- /* CURSOR */
46
- .CodeMirror-cursor {
47
- border-left: 1px solid var(--editor-code-cursor-color, var(--md-sys-color-on-surface, black));
48
- }
49
- /* Shown when moving in bi-directional text */
50
- .CodeMirror div.CodeMirror-secondarycursor {
51
- border-left: 1px solid silver;
52
- }
53
- .cm-fat-cursor .CodeMirror-cursor {
54
- width: auto;
55
- border: 0 !important;
56
- background: #7e7;
57
- }
58
- .cm-fat-cursor div.CodeMirror-cursors {
59
- z-index: 1;
60
- }
61
- .cm-fat-cursor-mark {
62
- background-color: rgba(20, 255, 20, 0.5);
63
- -webkit-animation: blink 1.06s steps(1) infinite;
64
- -moz-animation: blink 1.06s steps(1) infinite;
65
- animation: blink 1.06s steps(1) infinite;
66
- }
67
- .cm-animate-fat-cursor {
68
- width: auto;
69
- border: 0;
70
- -webkit-animation: blink 1.06s steps(1) infinite;
71
- -moz-animation: blink 1.06s steps(1) infinite;
72
- animation: blink 1.06s steps(1) infinite;
73
- background-color: #7e7;
74
- }
75
- @-moz-keyframes blink {
76
- 0% {
77
- }
78
- 50% {
79
- background-color: transparent;
80
- }
81
- 100% {
82
- }
83
- }
84
- @-webkit-keyframes blink {
85
- 0% {
86
- }
87
- 50% {
88
- background-color: transparent;
89
- }
90
- 100% {
91
- }
92
- }
93
- @keyframes blink {
94
- 0% {
95
- }
96
- 50% {
97
- background-color: transparent;
98
- }
99
- 100% {
100
- }
101
- }
102
- /* Can style cursor different in overwrite (non-insert) mode */
103
- .CodeMirror-overwrite .CodeMirror-cursor {
104
- }
105
- .cm-tab {
106
- display: inline-block;
107
- text-decoration: inherit;
108
- }
109
- .CodeMirror-rulers {
110
- position: absolute;
111
- left: 0;
112
- right: 0;
113
- top: -50px;
114
- bottom: -20px;
115
- overflow: hidden;
116
- }
117
- .CodeMirror-ruler {
118
- border-left: 1px solid #ccc;
119
- top: 0;
120
- bottom: 0;
121
- position: absolute;
122
- }
123
- /* DEFAULT THEME */
124
- .cm-s-default .cm-header {
125
- color: var(--editor-code-header-color);
126
- }
127
- .cm-s-default .cm-quote {
128
- color: var(--editor-code-quote-color);
129
- }
130
- .cm-negative {
131
- color: #d44;
132
- }
133
- .cm-positive {
134
- color: #292;
135
- }
136
- .cm-header,
137
- .cm-strong {
138
- font-weight: bold;
139
- }
140
- .cm-em {
141
- font-style: italic;
142
- }
143
- .cm-link {
144
- text-decoration: underline;
145
- }
146
- .cm-strikethrough {
147
- text-decoration: line-through;
148
- }
149
- .cm-s-default .cm-keyword {
150
- color: #708;
151
- }
152
- .cm-s-default .cm-atom {
153
- color: #219;
154
- }
155
- .cm-s-default .cm-number {
156
- color: var(--editor-code-list-color);
157
- }
158
- .cm-s-default .cm-def {
159
- color: #00f;
160
- }
161
- .cm-s-default .cm-variable,
162
- .cm-s-default .cm-punctuation,
163
- .cm-s-default .cm-property,
164
- .cm-s-default .cm-operator {
165
- }
166
- .cm-s-default .cm-variable-2 {
167
- color: var(--editor-code-list-color);
168
- }
169
- .cm-s-default .cm-variable-3,
170
- .cm-s-default .cm-type {
171
- color: var(--editor-code-list-color);
172
- }
173
- .cm-s-default .cm-comment {
174
- color: #a50;
175
- }
176
- .cm-s-default .cm-string {
177
- color: #a11;
178
- }
179
- .cm-s-default .cm-string-2 {
180
- color: var(--editor-code-inline-code-color, #f50);
181
- }
182
- .cm-s-default .cm-meta {
183
- color: #555;
184
- }
185
- .cm-s-default .cm-qualifier {
186
- color: #555;
187
- }
188
- .cm-s-default .cm-builtin {
189
- color: #30a;
190
- }
191
- .cm-s-default .cm-bracket {
192
- color: #997;
193
- }
194
- .cm-s-default .cm-tag {
195
- color: #170;
196
- }
197
- .cm-s-default .cm-attribute {
198
- color: #00c;
199
- }
200
- .cm-s-default .cm-hr {
201
- color: #999;
202
- }
203
- .cm-s-default .cm-link {
204
- color: #00c;
205
- }
206
- .cm-s-default .cm-error {
207
- color: #f00;
208
- }
209
- .cm-invalidchar {
210
- color: #f00;
211
- }
212
- .CodeMirror-composing {
213
- border-bottom: 2px solid;
214
- }
215
- /* Default styles for common addons */
216
- div.CodeMirror span.CodeMirror-matchingbracket {
217
- color: #0b0;
218
- }
219
- div.CodeMirror span.CodeMirror-nonmatchingbracket {
220
- color: #a22;
221
- }
222
- .CodeMirror-matchingtag {
223
- background: rgba(255, 150, 0, 0.3);
224
- }
225
- .CodeMirror-activeline-background {
226
- background: #e8f2ff;
227
- }
228
- /* STOP */
229
- /* The rest of this file contains styles related to the mechanics of
230
- the editor. You probably shouldn't touch them. */
231
- .CodeMirror {
232
- position: relative;
233
- overflow: hidden;
234
- }
235
- .CodeMirror-scroll {
236
- overflow: scroll !important; /* Things will break if this is overridden */
237
- /* 30px is the magic margin used to hide the element's real scrollbars */
238
- /* See overflow: hidden in .CodeMirror */
239
- margin-bottom: -30px;
240
- margin-right: -30px;
241
- padding-bottom: 30px;
242
- height: 100%;
243
- outline: none; /* Prevent dragging from highlighting the element */
244
- position: relative;
245
- box-sizing: border-box;
246
- }
247
- .CodeMirror-sizer {
248
- position: relative;
249
- border-right: 30px solid transparent;
250
- }
251
- /* The fake, visible scrollbars. Used to force redraw during scrolling
252
- before actual scrolling happens, thus preventing shaking and
253
- flickering artifacts. */
254
- .CodeMirror-vscrollbar,
255
- .CodeMirror-hscrollbar,
256
- .CodeMirror-scrollbar-filler,
257
- .CodeMirror-gutter-filler {
258
- position: absolute;
259
- z-index: 6;
260
- display: none;
261
- }
262
- .CodeMirror-vscrollbar {
263
- right: 0;
264
- top: 0;
265
- overflow-x: hidden;
266
- overflow-y: scroll;
267
- }
268
- .CodeMirror-hscrollbar {
269
- bottom: 0;
270
- left: 0;
271
- overflow-y: hidden;
272
- overflow-x: scroll;
273
- }
274
- .CodeMirror-scrollbar-filler {
275
- right: 0;
276
- bottom: 0;
277
- }
278
- .CodeMirror-gutter-filler {
279
- left: 0;
280
- bottom: 0;
281
- }
282
- .CodeMirror-gutters {
283
- position: absolute;
284
- left: 0;
285
- top: 0;
286
- min-height: 100%;
287
- z-index: 3;
288
- }
289
- .CodeMirror-gutter {
290
- white-space: normal;
291
- height: 100%;
292
- display: inline-block;
293
- vertical-align: top;
294
- margin-bottom: -30px;
295
- }
296
- .CodeMirror-gutter-wrapper {
297
- position: absolute;
298
- z-index: 4;
299
- background: none !important;
300
- border: none !important;
301
- }
302
- .CodeMirror-gutter-background {
303
- position: absolute;
304
- top: 0;
305
- bottom: 0;
306
- z-index: 4;
307
- }
308
- .CodeMirror-gutter-elt {
309
- position: absolute;
310
- cursor: default;
311
- z-index: 4;
312
- }
313
- .CodeMirror-gutter-wrapper ::selection {
314
- background-color: transparent;
315
- }
316
- .CodeMirror-gutter-wrapper ::-moz-selection {
317
- background-color: transparent;
318
- }
319
- .CodeMirror-lines {
320
- cursor: text;
321
- min-height: 1px; /* prevents collapsing before first draw */
322
- }
323
- .CodeMirror pre {
324
- /* Reset some styles that the rest of the page might have set */
325
- -moz-border-radius: 0;
326
- -webkit-border-radius: 0;
327
- border-radius: 0;
328
- border-width: 0;
329
- background: transparent;
330
- font-family: inherit;
331
- font-size: inherit;
332
- margin: 0;
333
- white-space: pre;
334
- word-wrap: normal;
335
- line-height: inherit;
336
- color: inherit;
337
- z-index: 2;
338
- position: relative;
339
- overflow: visible;
340
- -webkit-tap-highlight-color: transparent;
341
- -webkit-font-variant-ligatures: contextual;
342
- font-variant-ligatures: contextual;
343
- }
344
- .CodeMirror-wrap pre {
345
- word-wrap: break-word;
346
- white-space: pre-wrap;
347
- word-break: normal;
348
- }
349
- .CodeMirror-linebackground {
350
- position: absolute;
351
- left: 0;
352
- right: 0;
353
- top: 0;
354
- bottom: 0;
355
- z-index: 0;
356
- }
357
- .CodeMirror-linewidget {
358
- position: relative;
359
- z-index: 2;
360
- padding: 0.1px; /* Force widget margins to stay inside of the container */
361
- }
362
- .CodeMirror-rtl pre {
363
- direction: rtl;
364
- }
365
- .CodeMirror-code {
366
- outline: none;
367
- }
368
- /* Force content-box sizing for the elements where we expect it */
369
- /* .CodeMirror-scroll, */
370
- .CodeMirror-sizer,
371
- .CodeMirror-gutter,
372
- .CodeMirror-gutters,
373
- .CodeMirror-linenumber {
374
- -moz-box-sizing: content-box;
375
- box-sizing: content-box;
376
- }
377
- .CodeMirror-measure {
378
- position: absolute;
379
- width: 100%;
380
- height: 0;
381
- overflow: hidden;
382
- visibility: hidden;
383
- }
384
- .CodeMirror-cursor {
385
- position: absolute;
386
- pointer-events: none;
387
- }
388
- .CodeMirror-measure pre {
389
- position: static;
390
- }
391
- div.CodeMirror-cursors {
392
- visibility: hidden;
393
- position: relative;
394
- z-index: 3;
395
- }
396
- div.CodeMirror-dragcursors {
397
- visibility: visible;
398
- }
399
- .CodeMirror-focused div.CodeMirror-cursors {
400
- visibility: visible;
401
- }
402
- .CodeMirror-selected {
403
- background: #d9d9d9;
404
- }
405
- .CodeMirror-focused .CodeMirror-selected {
406
- background: var(--editor-selected-code-color);
407
- }
408
- .CodeMirror-crosshair {
409
- cursor: crosshair;
410
- }
411
- .CodeMirror-line::selection,
412
- .CodeMirror-line > span::selection,
413
- .CodeMirror-line > span > span::selection {
414
- background: #d7d4f0;
415
- }
416
- .CodeMirror-line::-moz-selection,
417
- .CodeMirror-line > span::-moz-selection,
418
- .CodeMirror-line > span > span::-moz-selection {
419
- background: #d7d4f0;
420
- }
421
- .cm-searching {
422
- background-color: #ffa;
423
- background-color: rgba(255, 255, 0, 0.4);
424
- }
425
- /* Used to force a border model for a node */
426
- .cm-force-border {
427
- padding-right: 0.1px;
428
- }
429
- @media print {
430
- /* Hide the cursor when printing */
431
- .CodeMirror div.CodeMirror-cursors {
432
- visibility: hidden;
433
- }
434
- }
435
- /* See issue #2901 */
436
- .cm-tab-wrap-hack:after {
437
- content: '';
438
- }
439
- /* Help users use markselection to safely style text background */
440
- span.CodeMirror-selectedtext {
441
- background: none;
442
- }
443
-
@@ -1,17 +0,0 @@
1
- :host {
2
- display: block;
3
- }
4
-
5
-
6
-
7
- .toolbar-container {
8
- padding: 0.5rem 1rem;
9
- display: flex;
10
- }
11
-
12
- md-icon-button:not(:first) {
13
- margin: 0 .3rem;
14
- }
15
- md-icon-button:first {
16
- margin: 0 0;
17
- }
@@ -1,122 +0,0 @@
1
- /* NEW STYLES */
2
- /** Editor **/
3
-
4
- :host {
5
- display: block;
6
- overflow: hidden;
7
- --editor-border-color: var(--exm-markdown-editor-border-color, var(--md-sys-color-on-surface-variant));
8
- --editor-border-color-focus: var(--exm-markdown-editor-border-color-focus, var(--md-sys-color-primary));
9
- --editor-background-color: var(--exm-markdown-editor-background-color, var(--md-sys-color-surface-container-high));
10
- --editor-code-background-color: var(--exm-markdown-editor-code-background-color, var(--md-sys-color-surface-container-high));
11
- --editor-background-focus-color: var(--exm-markdown-editor-background-focus-color, var(--md-sys-color-surface-container-high));
12
- --editor-code-background-focus-color: var(--exm-markdown-editor-code-background-focus-color, var(--md-sys-color-surface-container-highest));
13
- --editor-label-focus-color: var(--exm-markdown-editor-label-focus-color, var(--md-sys-color-primary));
14
- --editor-label-color: var(--exm-markdown-editor-label-color, var(--md-sys-color-on-surface));
15
- }
16
-
17
- .container {
18
- display: grid;
19
- position: relative;
20
- grid-template-columns: 100%;
21
- grid-template-rows: 0px 56px 1fr;
22
- transition: grid-template-rows .2s ease;
23
-
24
- border-top-right-radius: 4px;
25
- background-color: var(--editor-code-background-color, var(--md-sys-color-surface-container-high));
26
- border-top-left-radius: 4px;
27
-
28
- &[label] {
29
- grid-template-rows: 2rem 56px 1fr;
30
- }
31
- &:hover {
32
- background-color: var(--editor-code-background-focus-color, var(--md-sys-color-surface-container-highest));
33
- }
34
- &::after {
35
- content: ' ';
36
- display: block;
37
- position: absolute;
38
- bottom:0;
39
- width: 100%;
40
- height: 3px;
41
- background: var(--editor-border-color-focus, var(--md-sys-color-primary));
42
- }
43
- &[preview] {
44
- background-color: var(--editor-background-color, var(--md-sys-color-surface-container-high));
45
- grid-template-rows: 0px .3rem 1fr;
46
- &[label] {
47
- grid-template-rows: 2rem .3rem 1fr;
48
- }
49
- &:hover {
50
- background-color: var(--editor-code-background-focus-color, var(--md-sys-color-surface-container-highest));
51
- cursor: text;
52
- }
53
- &::after {
54
- height: 1px;
55
- background: var(--editor-border-color, var(--md-sys-color-on-surface-variant));
56
- }
57
- }
58
- }
59
-
60
- label[for='markdowdEditorContainer'] {
61
- grid-row-start: 1;
62
- padding: 0.5rem 0 0 1rem;
63
- font-size: .7rem;
64
- color: var(--editor-label-focus-color, var(--md-sys-color-primary));
65
- transition: all 200ms ease;
66
- transform: scale(1) translateY(0px);
67
- &[preview] {
68
- color: var(--editor-label-color, var(--md-sys-color-on-surface));
69
- padding-bottom: 1rem;
70
- transform:translateY(8px);
71
- font-size: 1rem;
72
- }
73
- }
74
-
75
- exm-markdown-editor-toolbar {
76
- grid-row-start: 1;
77
- visibility: visible;
78
- transition: visibility 0s, opacity 0.5s linear;
79
- opacity: 1;
80
- &[preview] {
81
- visibility: hidden;
82
- opacity: 0;
83
- }
84
- &[label] {
85
- grid-row-start:2;
86
- }
87
- }
88
-
89
- #preview {
90
- display: none;
91
- grid-row-start: 3;
92
- overflow: scroll;
93
- &[preview] {
94
- display: block;
95
- }
96
- }
97
-
98
- #editor {
99
- display: block;
100
- grid-row-start: 3;
101
- &[preview] {
102
- display: none;
103
- }
104
- }
105
-
106
- slot[name='preview'] {
107
- display: none;
108
- grid-row-start: 3;
109
- &[preview] {
110
- display: block;
111
- }
112
- }
113
-
114
- ::slotted([slot='preview']) {
115
- overflow: scroll;
116
- }
117
-
118
- /* Html rendering CSS */
119
-
120
- .preview-content {
121
- padding: 0 1rem;
122
- }