@mdzip/editor 1.3.11 → 1.3.13
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/README.md +63 -0
- package/dist/library-info.d.ts +2 -2
- package/dist/library-info.js +2 -2
- package/dist/view-css.d.ts.map +1 -1
- package/dist/view-css.js +317 -54
- package/dist/view-css.js.map +1 -1
- package/dist/view.d.ts +116 -3
- package/dist/view.d.ts.map +1 -1
- package/dist/view.js +965 -57
- package/dist/view.js.map +1 -1
- package/dist/workspace-view.d.ts +1 -1
- package/dist/workspace-view.d.ts.map +1 -1
- package/dist/workspace-view.js +38 -3
- package/dist/workspace-view.js.map +1 -1
- package/dist/workspace.d.ts +1 -0
- package/dist/workspace.d.ts.map +1 -1
- package/dist/workspace.js +3 -1
- package/dist/workspace.js.map +1 -1
- package/package.json +75 -75
package/dist/view-css.js
CHANGED
|
@@ -26,6 +26,49 @@ export const WORKSPACE_CSS = `
|
|
|
26
26
|
box-sizing: border-box;
|
|
27
27
|
}
|
|
28
28
|
|
|
29
|
+
.mdzip-root.toolbar-density-compact {
|
|
30
|
+
--mdzip-density-toolbar-padding: 3px 10px;
|
|
31
|
+
--mdzip-density-toolbar-gap: 6px;
|
|
32
|
+
--mdzip-density-toolbar-start-gap: 8px;
|
|
33
|
+
--mdzip-density-toolbar-group-padding: 2px;
|
|
34
|
+
--mdzip-density-toolbar-button-width: 34px;
|
|
35
|
+
--mdzip-density-toolbar-button-height: 30px;
|
|
36
|
+
--mdzip-density-toolbar-compact-button-size: 28px;
|
|
37
|
+
--mdzip-density-toolbar-icon-size: 15px;
|
|
38
|
+
--mdzip-density-toolbar-icon-large-size: 19px;
|
|
39
|
+
--mdzip-density-toolbar-icon-extra-large-size: 22px;
|
|
40
|
+
--mdzip-density-theme-icon-size: 16px;
|
|
41
|
+
--mdzip-density-format-toolbar-gap: 4px;
|
|
42
|
+
--mdzip-density-format-toolbar-group-gap: 1px;
|
|
43
|
+
--mdzip-density-format-button-size: 28px;
|
|
44
|
+
--mdzip-density-format-menu-button-width: 36px;
|
|
45
|
+
--mdzip-density-format-icon-size: 15px;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.mdzip-root.toolbar-density-dense {
|
|
49
|
+
--mdzip-density-toolbar-padding: 2px 8px;
|
|
50
|
+
--mdzip-density-toolbar-gap: 4px;
|
|
51
|
+
--mdzip-density-toolbar-start-gap: 6px;
|
|
52
|
+
--mdzip-density-toolbar-group-padding: 1px;
|
|
53
|
+
--mdzip-density-toolbar-button-width: 30px;
|
|
54
|
+
--mdzip-density-toolbar-button-height: 28px;
|
|
55
|
+
--mdzip-density-toolbar-compact-button-size: 26px;
|
|
56
|
+
--mdzip-density-toolbar-icon-size: 14px;
|
|
57
|
+
--mdzip-density-toolbar-icon-large-size: 18px;
|
|
58
|
+
--mdzip-density-toolbar-icon-extra-large-size: 20px;
|
|
59
|
+
--mdzip-density-theme-icon-size: 15px;
|
|
60
|
+
--mdzip-density-format-toolbar-gap: 3px;
|
|
61
|
+
--mdzip-density-format-toolbar-group-gap: 1px;
|
|
62
|
+
--mdzip-density-format-button-size: 26px;
|
|
63
|
+
--mdzip-density-format-menu-button-width: 34px;
|
|
64
|
+
--mdzip-density-format-icon-size: 14px;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
.mdzip-root.content-density-compact {
|
|
68
|
+
--mdzip-density-editor-content-padding: 20px 28px;
|
|
69
|
+
--mdzip-density-preview-content-padding: 20px 24px 32px;
|
|
70
|
+
}
|
|
71
|
+
|
|
29
72
|
.mdzip-root.mdzip-theme-light {
|
|
30
73
|
color-scheme: light;
|
|
31
74
|
${MDZIP_LIGHT_DEFAULTS_CSS}
|
|
@@ -63,11 +106,14 @@ export const WORKSPACE_CSS = `
|
|
|
63
106
|
}
|
|
64
107
|
|
|
65
108
|
.mdzip-root .toolbar {
|
|
109
|
+
--view-mode-min-left: calc(var(--editor-pane-offset) + 520px);
|
|
110
|
+
--view-mode-max-left: calc(100% - 170px);
|
|
111
|
+
|
|
66
112
|
display: grid;
|
|
67
113
|
grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
|
|
68
114
|
align-items: center;
|
|
69
115
|
column-gap: 12px;
|
|
70
|
-
padding: 4px 12px;
|
|
116
|
+
padding: var(--mdzip-toolbar-padding, var(--mdzip-density-toolbar-padding, 4px 12px));
|
|
71
117
|
background: var(--mdzip-toolbar-background-color);
|
|
72
118
|
border-bottom: 1px solid var(--mdzip-border-color);
|
|
73
119
|
min-height: 48px;
|
|
@@ -81,7 +127,7 @@ export const WORKSPACE_CSS = `
|
|
|
81
127
|
display: flex;
|
|
82
128
|
align-items: center;
|
|
83
129
|
min-width: 0;
|
|
84
|
-
gap: 10px;
|
|
130
|
+
gap: var(--mdzip-toolbar-gap, var(--mdzip-density-toolbar-gap, 10px));
|
|
85
131
|
}
|
|
86
132
|
|
|
87
133
|
.mdzip-root .toolbar-start {
|
|
@@ -89,7 +135,7 @@ export const WORKSPACE_CSS = `
|
|
|
89
135
|
align-items: center;
|
|
90
136
|
justify-self: start;
|
|
91
137
|
min-width: 0;
|
|
92
|
-
gap: 12px;
|
|
138
|
+
gap: var(--mdzip-toolbar-start-gap, var(--mdzip-density-toolbar-start-gap, 12px));
|
|
93
139
|
}
|
|
94
140
|
|
|
95
141
|
.mdzip-root.navigation-pane-visible {
|
|
@@ -174,7 +220,7 @@ export const WORKSPACE_CSS = `
|
|
|
174
220
|
align-items: center;
|
|
175
221
|
gap: 4px;
|
|
176
222
|
justify-self: center;
|
|
177
|
-
padding: 3px;
|
|
223
|
+
padding: var(--mdzip-toolbar-group-padding, var(--mdzip-density-toolbar-group-padding, 3px));
|
|
178
224
|
border: 1px solid var(--mdzip-widget-border-color);
|
|
179
225
|
border-radius: 8px;
|
|
180
226
|
background: var(--mdzip-widget-background-color);
|
|
@@ -182,7 +228,11 @@ export const WORKSPACE_CSS = `
|
|
|
182
228
|
|
|
183
229
|
.mdzip-root .view-mode-toggle-group {
|
|
184
230
|
position: absolute;
|
|
185
|
-
left:
|
|
231
|
+
left: clamp(
|
|
232
|
+
var(--view-mode-min-left),
|
|
233
|
+
calc((100% + var(--workspace-pane-offset)) / 2),
|
|
234
|
+
var(--view-mode-max-left)
|
|
235
|
+
);
|
|
186
236
|
top: 50%;
|
|
187
237
|
transform: translate(-50%, -50%);
|
|
188
238
|
gap: 2px;
|
|
@@ -193,8 +243,8 @@ export const WORKSPACE_CSS = `
|
|
|
193
243
|
}
|
|
194
244
|
|
|
195
245
|
.mdzip-root .icon-toggle {
|
|
196
|
-
width: 42px;
|
|
197
|
-
height: 36px;
|
|
246
|
+
width: var(--mdzip-toolbar-button-width, var(--mdzip-toolbar-button-size, var(--mdzip-density-toolbar-button-width, 42px)));
|
|
247
|
+
height: var(--mdzip-toolbar-button-height, var(--mdzip-toolbar-button-size, var(--mdzip-density-toolbar-button-height, 36px)));
|
|
198
248
|
padding: 0;
|
|
199
249
|
cursor: pointer;
|
|
200
250
|
background: transparent;
|
|
@@ -221,16 +271,16 @@ export const WORKSPACE_CSS = `
|
|
|
221
271
|
}
|
|
222
272
|
|
|
223
273
|
.mdzip-root .toggle-icon {
|
|
224
|
-
width: 17px;
|
|
225
|
-
height: 17px;
|
|
274
|
+
width: var(--mdzip-toolbar-icon-size, var(--mdzip-density-toolbar-icon-size, 17px));
|
|
275
|
+
height: var(--mdzip-toolbar-icon-size, var(--mdzip-density-toolbar-icon-size, 17px));
|
|
226
276
|
fill: none;
|
|
227
277
|
stroke: currentColor;
|
|
228
278
|
}
|
|
229
279
|
|
|
230
280
|
.mdzip-root .view-mode-toggle {
|
|
231
281
|
position: relative;
|
|
232
|
-
width: 32px;
|
|
233
|
-
height: 32px;
|
|
282
|
+
width: var(--mdzip-toolbar-compact-button-size, var(--mdzip-density-toolbar-compact-button-size, 32px));
|
|
283
|
+
height: var(--mdzip-toolbar-compact-button-size, var(--mdzip-density-toolbar-compact-button-size, 32px));
|
|
234
284
|
border-radius: 6px;
|
|
235
285
|
color: var(--mdzip-control-foreground-color);
|
|
236
286
|
}
|
|
@@ -257,13 +307,13 @@ export const WORKSPACE_CSS = `
|
|
|
257
307
|
}
|
|
258
308
|
|
|
259
309
|
.mdzip-root .view-mode-toggle .toggle-icon {
|
|
260
|
-
width: 1.5em;
|
|
261
|
-
height: 1.5em;
|
|
310
|
+
width: var(--mdzip-toolbar-icon-large-size, var(--mdzip-density-toolbar-icon-large-size, 1.5em));
|
|
311
|
+
height: var(--mdzip-toolbar-icon-large-size, var(--mdzip-density-toolbar-icon-large-size, 1.5em));
|
|
262
312
|
}
|
|
263
313
|
|
|
264
314
|
.mdzip-root .nav-toggle {
|
|
265
|
-
width: 32px;
|
|
266
|
-
height: 32px;
|
|
315
|
+
width: var(--mdzip-toolbar-compact-button-size, var(--mdzip-density-toolbar-compact-button-size, 32px));
|
|
316
|
+
height: var(--mdzip-toolbar-compact-button-size, var(--mdzip-density-toolbar-compact-button-size, 32px));
|
|
267
317
|
border-radius: 6px;
|
|
268
318
|
}
|
|
269
319
|
|
|
@@ -272,14 +322,22 @@ export const WORKSPACE_CSS = `
|
|
|
272
322
|
color: var(--mdzip-link-color);
|
|
273
323
|
}
|
|
274
324
|
|
|
325
|
+
.mdzip-root .nav-toggle.convert-mdz-toggle {
|
|
326
|
+
color: var(--mdzip-link-color);
|
|
327
|
+
}
|
|
328
|
+
|
|
329
|
+
.mdzip-root .nav-toggle.convert-mdz-toggle:hover:not(:disabled) {
|
|
330
|
+
background: var(--mdzip-control-hover-background-color);
|
|
331
|
+
}
|
|
332
|
+
|
|
275
333
|
.mdzip-root .nav-toggle .toggle-icon {
|
|
276
|
-
width: 1.9em;
|
|
277
|
-
height: 1.9em;
|
|
334
|
+
width: var(--mdzip-toolbar-icon-extra-large-size, var(--mdzip-density-toolbar-icon-extra-large-size, 1.9em));
|
|
335
|
+
height: var(--mdzip-toolbar-icon-extra-large-size, var(--mdzip-density-toolbar-icon-extra-large-size, 1.9em));
|
|
278
336
|
}
|
|
279
337
|
|
|
280
338
|
.mdzip-root .zoom-toggle .toggle-icon {
|
|
281
|
-
width: 1.5em;
|
|
282
|
-
height: 1.5em;
|
|
339
|
+
width: var(--mdzip-toolbar-icon-large-size, var(--mdzip-density-toolbar-icon-large-size, 1.5em));
|
|
340
|
+
height: var(--mdzip-toolbar-icon-large-size, var(--mdzip-density-toolbar-icon-large-size, 1.5em));
|
|
283
341
|
}
|
|
284
342
|
|
|
285
343
|
.mdzip-root .zoom-toggle.active {
|
|
@@ -291,15 +349,15 @@ export const WORKSPACE_CSS = `
|
|
|
291
349
|
display: flex;
|
|
292
350
|
align-items: center;
|
|
293
351
|
gap: 2px;
|
|
294
|
-
padding: 3px;
|
|
352
|
+
padding: var(--mdzip-toolbar-group-padding, var(--mdzip-density-toolbar-group-padding, 3px));
|
|
295
353
|
border: 1px solid var(--mdzip-widget-border-color);
|
|
296
354
|
border-radius: 8px;
|
|
297
355
|
background: var(--mdzip-widget-background-color);
|
|
298
356
|
}
|
|
299
357
|
|
|
300
358
|
.mdzip-root .theme-toggle {
|
|
301
|
-
width: 32px;
|
|
302
|
-
height: 32px;
|
|
359
|
+
width: var(--mdzip-toolbar-compact-button-size, var(--mdzip-density-toolbar-compact-button-size, 32px));
|
|
360
|
+
height: var(--mdzip-toolbar-compact-button-size, var(--mdzip-density-toolbar-compact-button-size, 32px));
|
|
303
361
|
border-radius: 6px;
|
|
304
362
|
}
|
|
305
363
|
|
|
@@ -309,8 +367,8 @@ export const WORKSPACE_CSS = `
|
|
|
309
367
|
}
|
|
310
368
|
|
|
311
369
|
.mdzip-root .theme-toggle .toggle-icon {
|
|
312
|
-
width: 18px;
|
|
313
|
-
height: 18px;
|
|
370
|
+
width: var(--mdzip-theme-icon-size, var(--mdzip-density-theme-icon-size, 18px));
|
|
371
|
+
height: var(--mdzip-theme-icon-size, var(--mdzip-density-theme-icon-size, 18px));
|
|
314
372
|
}
|
|
315
373
|
|
|
316
374
|
.mdzip-root .workspace-shell {
|
|
@@ -412,7 +470,10 @@ export const WORKSPACE_CSS = `
|
|
|
412
470
|
gap: 9px;
|
|
413
471
|
width: 100%;
|
|
414
472
|
min-height: 34px;
|
|
415
|
-
padding:
|
|
473
|
+
/* No vertical padding: row height comes from min-height, and zero top/bottom
|
|
474
|
+
padding lets the stretched .nav-indent guide cells fill the full row so the
|
|
475
|
+
per-row rails meet between siblings instead of leaving padding-sized gaps. */
|
|
476
|
+
padding: 0 9px;
|
|
416
477
|
border: none;
|
|
417
478
|
border-radius: 4px;
|
|
418
479
|
background: transparent;
|
|
@@ -431,34 +492,73 @@ export const WORKSPACE_CSS = `
|
|
|
431
492
|
background: var(--mdzip-hover-background-color);
|
|
432
493
|
}
|
|
433
494
|
|
|
495
|
+
/* Indentation comes from per-row guide cells (.nav-indent), not container
|
|
496
|
+
margins, so each row owns its guide lines. */
|
|
434
497
|
.mdzip-root .nav-directory-children {
|
|
435
498
|
position: relative;
|
|
436
|
-
margin-left: 19px;
|
|
437
|
-
padding-left: 14px;
|
|
438
499
|
}
|
|
439
500
|
|
|
440
|
-
|
|
441
|
-
|
|
501
|
+
/* One guide cell per ancestor depth, prepended to each nested row. Fixed width
|
|
502
|
+
gives the indentation; the rails/elbow are painted within the cell at the
|
|
503
|
+
row's own height, so they never overshoot an expanded last subfolder.
|
|
504
|
+
|
|
505
|
+
--nav-guide-x positions the rail so it drops straight from the parent
|
|
506
|
+
folder's icon: the icon sits 19px (caret 10px + the 9px row gap) right of its
|
|
507
|
+
disclosure column, and because the per-level step (cell 16px + 9px gap = 25)
|
|
508
|
+
equals the rail-to-icon distance, the same offset keeps every depth aligned. */
|
|
509
|
+
.mdzip-root .nav-indent {
|
|
510
|
+
flex: 0 0 16px;
|
|
511
|
+
align-self: stretch;
|
|
442
512
|
position: relative;
|
|
513
|
+
--nav-guide-x: 19px;
|
|
443
514
|
}
|
|
444
515
|
|
|
445
|
-
|
|
446
|
-
.mdzip-root .nav-
|
|
516
|
+
/* Ancestor column with more siblings below: continuous full-height rail. */
|
|
517
|
+
.mdzip-root .nav-indent-rail::before {
|
|
447
518
|
content: "";
|
|
448
519
|
position: absolute;
|
|
449
|
-
left:
|
|
520
|
+
left: var(--nav-guide-x);
|
|
450
521
|
top: 0;
|
|
451
522
|
bottom: 0;
|
|
452
|
-
width:
|
|
523
|
+
width: 1px;
|
|
453
524
|
background: var(--mdzip-tree-guide-color);
|
|
454
|
-
-webkit-mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 22 34' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0.5 0 V17.5 H22' fill='none' stroke='black' stroke-width='1'/%3E%3C/svg%3E") left top / 22px 100% no-repeat;
|
|
455
|
-
mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 22 34' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0.5 0 V17.5 H22' fill='none' stroke='black' stroke-width='1'/%3E%3C/svg%3E") left top / 22px 100% no-repeat;
|
|
456
525
|
}
|
|
457
526
|
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
527
|
+
/* Connector to this row: vertical down to the row center (elbow └), extended
|
|
528
|
+
full-height for a tee (├) when the row's folder has siblings below. */
|
|
529
|
+
.mdzip-root .nav-indent-connector::before {
|
|
530
|
+
content: "";
|
|
531
|
+
position: absolute;
|
|
532
|
+
left: var(--nav-guide-x);
|
|
533
|
+
top: 0;
|
|
534
|
+
height: 50%;
|
|
535
|
+
width: 1px;
|
|
536
|
+
background: var(--mdzip-tree-guide-color);
|
|
537
|
+
}
|
|
538
|
+
|
|
539
|
+
.mdzip-root .nav-indent-connector.nav-indent-continues::before {
|
|
540
|
+
height: 100%;
|
|
541
|
+
}
|
|
542
|
+
|
|
543
|
+
/* Horizontal arm from the connector rail to the row's caret/icon. Reaches the
|
|
544
|
+
disclosure triangle that sits one row-gap past the cell (folders). */
|
|
545
|
+
.mdzip-root .nav-indent-connector::after {
|
|
546
|
+
content: "";
|
|
547
|
+
position: absolute;
|
|
548
|
+
left: var(--nav-guide-x);
|
|
549
|
+
right: -9px;
|
|
550
|
+
top: 50%;
|
|
551
|
+
height: 1px;
|
|
552
|
+
background: var(--mdzip-tree-guide-color);
|
|
553
|
+
}
|
|
554
|
+
|
|
555
|
+
/* Files have no disclosure triangle in the caret slot, so extend the arm across
|
|
556
|
+
it (the empty 10px caret plus the 9px row gaps on either side) to meet the
|
|
557
|
+
file icon; folders keep the short arm because their triangle already sits at
|
|
558
|
+
the cell edge. The right offset is measured from the cell edge, so this holds
|
|
559
|
+
regardless of where --nav-guide-x places the rail. */
|
|
560
|
+
.mdzip-root .nav-file > .nav-indent-connector::after {
|
|
561
|
+
right: calc(-1 * (10px + 2 * 9px));
|
|
462
562
|
}
|
|
463
563
|
|
|
464
564
|
.mdzip-root .nav-caret {
|
|
@@ -619,7 +719,9 @@ export const WORKSPACE_CSS = `
|
|
|
619
719
|
}
|
|
620
720
|
|
|
621
721
|
.mdzip-root .nav-context-menu button {
|
|
622
|
-
display:
|
|
722
|
+
display: flex;
|
|
723
|
+
align-items: center;
|
|
724
|
+
gap: 10px;
|
|
623
725
|
width: 100%;
|
|
624
726
|
min-height: 28px;
|
|
625
727
|
padding: 4px 10px;
|
|
@@ -632,6 +734,63 @@ export const WORKSPACE_CSS = `
|
|
|
632
734
|
cursor: pointer;
|
|
633
735
|
}
|
|
634
736
|
|
|
737
|
+
.mdzip-root .nav-context-menu .nav-menu-icon {
|
|
738
|
+
flex: 0 0 auto;
|
|
739
|
+
width: 16px;
|
|
740
|
+
height: 16px;
|
|
741
|
+
opacity: 0.8;
|
|
742
|
+
}
|
|
743
|
+
|
|
744
|
+
.mdzip-root .nav-context-menu .nav-menu-label {
|
|
745
|
+
flex: 1 1 auto;
|
|
746
|
+
}
|
|
747
|
+
|
|
748
|
+
.mdzip-root .nav-context-menu .nav-menu-shortcut {
|
|
749
|
+
flex: 0 0 auto;
|
|
750
|
+
margin-left: 16px;
|
|
751
|
+
font-size: 0.85em;
|
|
752
|
+
opacity: 0.55;
|
|
753
|
+
font-variant-numeric: tabular-nums;
|
|
754
|
+
}
|
|
755
|
+
|
|
756
|
+
.mdzip-root .nav-context-menu .nav-menu-chevron {
|
|
757
|
+
flex: 0 0 auto;
|
|
758
|
+
width: 14px;
|
|
759
|
+
height: 14px;
|
|
760
|
+
margin-right: -2px;
|
|
761
|
+
opacity: 0.55;
|
|
762
|
+
}
|
|
763
|
+
|
|
764
|
+
.mdzip-root .nav-menu-submenu-wrap {
|
|
765
|
+
position: relative;
|
|
766
|
+
}
|
|
767
|
+
|
|
768
|
+
.mdzip-root .nav-context-submenu {
|
|
769
|
+
position: absolute;
|
|
770
|
+
left: 100%;
|
|
771
|
+
top: -5px;
|
|
772
|
+
display: none;
|
|
773
|
+
min-width: 190px;
|
|
774
|
+
max-height: min(60vh, 420px);
|
|
775
|
+
overflow-y: auto;
|
|
776
|
+
padding: 4px;
|
|
777
|
+
border: 1px solid var(--mdzip-widget-border-color);
|
|
778
|
+
border-radius: 4px;
|
|
779
|
+
background: var(--mdzip-editor-background-color);
|
|
780
|
+
color: var(--mdzip-editor-foreground-color);
|
|
781
|
+
box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18);
|
|
782
|
+
}
|
|
783
|
+
|
|
784
|
+
.mdzip-root .nav-menu-submenu-wrap.open-left > .nav-context-submenu {
|
|
785
|
+
left: auto;
|
|
786
|
+
right: 100%;
|
|
787
|
+
}
|
|
788
|
+
|
|
789
|
+
.mdzip-root .nav-menu-submenu-wrap:hover > .nav-context-submenu,
|
|
790
|
+
.mdzip-root .nav-menu-submenu-wrap:focus-within > .nav-context-submenu {
|
|
791
|
+
display: block;
|
|
792
|
+
}
|
|
793
|
+
|
|
635
794
|
.mdzip-root .nav-context-menu button:hover,
|
|
636
795
|
.mdzip-root .nav-context-menu button:focus-visible {
|
|
637
796
|
outline: none;
|
|
@@ -746,7 +905,7 @@ export const WORKSPACE_CSS = `
|
|
|
746
905
|
.mdzip-root .edit-toolbar {
|
|
747
906
|
display: flex;
|
|
748
907
|
align-items: center;
|
|
749
|
-
gap: 7px;
|
|
908
|
+
gap: var(--mdzip-format-toolbar-gap, var(--mdzip-density-format-toolbar-gap, 7px));
|
|
750
909
|
min-height: 32px;
|
|
751
910
|
padding: 0;
|
|
752
911
|
overflow: visible;
|
|
@@ -768,7 +927,7 @@ export const WORKSPACE_CSS = `
|
|
|
768
927
|
.mdzip-root .edit-toolbar-group {
|
|
769
928
|
display: flex;
|
|
770
929
|
align-items: center;
|
|
771
|
-
gap: 2px;
|
|
930
|
+
gap: var(--mdzip-format-toolbar-group-gap, var(--mdzip-density-format-toolbar-group-gap, 2px));
|
|
772
931
|
flex: 0 0 auto;
|
|
773
932
|
}
|
|
774
933
|
|
|
@@ -777,8 +936,8 @@ export const WORKSPACE_CSS = `
|
|
|
777
936
|
align-items: center;
|
|
778
937
|
justify-content: center;
|
|
779
938
|
gap: 2px;
|
|
780
|
-
width: 32px;
|
|
781
|
-
height: 32px;
|
|
939
|
+
width: var(--mdzip-format-button-size, var(--mdzip-density-format-button-size, 32px));
|
|
940
|
+
height: var(--mdzip-format-button-size, var(--mdzip-density-format-button-size, 32px));
|
|
782
941
|
padding: 0;
|
|
783
942
|
border: 0;
|
|
784
943
|
border-radius: 5px;
|
|
@@ -803,7 +962,7 @@ export const WORKSPACE_CSS = `
|
|
|
803
962
|
}
|
|
804
963
|
|
|
805
964
|
.mdzip-root .edit-toolbar .format-menu-toggle {
|
|
806
|
-
width: 42px;
|
|
965
|
+
width: var(--mdzip-format-menu-button-width, var(--mdzip-density-format-menu-button-width, 42px));
|
|
807
966
|
gap: 2px;
|
|
808
967
|
}
|
|
809
968
|
|
|
@@ -854,8 +1013,8 @@ export const WORKSPACE_CSS = `
|
|
|
854
1013
|
}
|
|
855
1014
|
|
|
856
1015
|
.mdzip-root .format-icon {
|
|
857
|
-
width: 17px;
|
|
858
|
-
height: 17px;
|
|
1016
|
+
width: var(--mdzip-format-icon-size, var(--mdzip-density-format-icon-size, 17px));
|
|
1017
|
+
height: var(--mdzip-format-icon-size, var(--mdzip-density-format-icon-size, 17px));
|
|
859
1018
|
fill: none;
|
|
860
1019
|
stroke: currentColor;
|
|
861
1020
|
}
|
|
@@ -906,7 +1065,7 @@ export const WORKSPACE_CSS = `
|
|
|
906
1065
|
.mdzip-root .preview-content {
|
|
907
1066
|
max-width: 900px;
|
|
908
1067
|
margin: 0 auto;
|
|
909
|
-
padding: 36px 32px 48px;
|
|
1068
|
+
padding: var(--mdzip-preview-content-padding, var(--mdzip-density-preview-content-padding, 36px 32px 48px));
|
|
910
1069
|
line-height: 1.55;
|
|
911
1070
|
font-size: calc(16px * var(--mdz-zoom));
|
|
912
1071
|
}
|
|
@@ -1027,6 +1186,24 @@ export const WORKSPACE_CSS = `
|
|
|
1027
1186
|
border-radius: 4px;
|
|
1028
1187
|
}
|
|
1029
1188
|
|
|
1189
|
+
.mdzip-root .preview-content img.mdzip-image-left,
|
|
1190
|
+
.mdzip-root .preview-content img.mdzip-image-wrap-left {
|
|
1191
|
+
float: left;
|
|
1192
|
+
margin: 0.25em 1em 0.75em 0;
|
|
1193
|
+
}
|
|
1194
|
+
|
|
1195
|
+
.mdzip-root .preview-content img.mdzip-image-right,
|
|
1196
|
+
.mdzip-root .preview-content img.mdzip-image-wrap-right {
|
|
1197
|
+
float: right;
|
|
1198
|
+
margin: 0.25em 0 0.75em 1em;
|
|
1199
|
+
}
|
|
1200
|
+
|
|
1201
|
+
.mdzip-root .preview-content img.mdzip-image-center {
|
|
1202
|
+
display: block;
|
|
1203
|
+
margin-left: auto;
|
|
1204
|
+
margin-right: auto;
|
|
1205
|
+
}
|
|
1206
|
+
|
|
1030
1207
|
/* Progressive image hydration. Each archive image mounts inside a collapsed
|
|
1031
1208
|
slot so the text stays compact and immediately readable; when the image
|
|
1032
1209
|
resolves, the slot eases open (0fr -> 1fr) to the height reserved from its
|
|
@@ -1044,10 +1221,24 @@ export const WORKSPACE_CSS = `
|
|
|
1044
1221
|
grid-template-rows: 1fr;
|
|
1045
1222
|
}
|
|
1046
1223
|
|
|
1224
|
+
.mdzip-root .preview-content .mdzip-image-slot.mdzip-image-animation-off {
|
|
1225
|
+
transition: none;
|
|
1226
|
+
}
|
|
1227
|
+
|
|
1047
1228
|
.mdzip-root .preview-content .mdzip-image-slot > img {
|
|
1048
1229
|
min-height: 0;
|
|
1049
1230
|
}
|
|
1050
1231
|
|
|
1232
|
+
.mdzip-root .preview-content .mdzip-image-slot.mdzip-image-align-left {
|
|
1233
|
+
float: left;
|
|
1234
|
+
margin: 0.25em 1em 0.75em 0;
|
|
1235
|
+
}
|
|
1236
|
+
|
|
1237
|
+
.mdzip-root .preview-content .mdzip-image-slot.mdzip-image-align-right {
|
|
1238
|
+
float: right;
|
|
1239
|
+
margin: 0.25em 0 0.75em 1em;
|
|
1240
|
+
}
|
|
1241
|
+
|
|
1051
1242
|
.mdzip-root .preview-content img.mdzip-image-loading {
|
|
1052
1243
|
background: var(--mdzip-control-background-color, rgba(127, 127, 127, 0.12));
|
|
1053
1244
|
animation: mdzip-image-pulse 1.2s ease-in-out infinite;
|
|
@@ -1234,6 +1425,29 @@ export const WORKSPACE_CSS = `
|
|
|
1234
1425
|
font-size: 13px;
|
|
1235
1426
|
}
|
|
1236
1427
|
|
|
1428
|
+
.mdzip-root .title-dialog select {
|
|
1429
|
+
width: 100%;
|
|
1430
|
+
border: 1px solid var(--mdzip-widget-border-color);
|
|
1431
|
+
background: var(--mdzip-editor-background-color);
|
|
1432
|
+
color: var(--mdzip-editor-foreground-color);
|
|
1433
|
+
border-radius: 4px;
|
|
1434
|
+
padding: 6px 8px;
|
|
1435
|
+
font-size: 13px;
|
|
1436
|
+
}
|
|
1437
|
+
|
|
1438
|
+
.mdzip-root .title-dialog input:disabled,
|
|
1439
|
+
.mdzip-root .title-dialog select:disabled {
|
|
1440
|
+
border-color: var(--mdzip-border-color);
|
|
1441
|
+
background: var(--mdzip-secondary-background-color);
|
|
1442
|
+
color: var(--mdzip-muted-foreground-color);
|
|
1443
|
+
opacity: 0.72;
|
|
1444
|
+
cursor: not-allowed;
|
|
1445
|
+
}
|
|
1446
|
+
|
|
1447
|
+
.mdzip-root .title-dialog input:disabled::placeholder {
|
|
1448
|
+
color: var(--mdzip-muted-foreground-color);
|
|
1449
|
+
}
|
|
1450
|
+
|
|
1237
1451
|
.mdzip-root .title-dialog-validation {
|
|
1238
1452
|
color: #cf222e !important;
|
|
1239
1453
|
}
|
|
@@ -1265,6 +1479,57 @@ export const WORKSPACE_CSS = `
|
|
|
1265
1479
|
color: var(--mdzip-accent-foreground-color);
|
|
1266
1480
|
}
|
|
1267
1481
|
|
|
1482
|
+
.mdzip-root .image-insert-dialog {
|
|
1483
|
+
width: min(460px, calc(100vw - 32px));
|
|
1484
|
+
}
|
|
1485
|
+
|
|
1486
|
+
.mdzip-root .image-insert-options {
|
|
1487
|
+
display: grid;
|
|
1488
|
+
gap: 6px;
|
|
1489
|
+
margin: 10px 0;
|
|
1490
|
+
padding: 10px;
|
|
1491
|
+
border: 1px solid var(--mdzip-widget-border-color);
|
|
1492
|
+
border-radius: 4px;
|
|
1493
|
+
}
|
|
1494
|
+
|
|
1495
|
+
.mdzip-root .image-insert-options legend {
|
|
1496
|
+
padding: 0 4px;
|
|
1497
|
+
color: var(--mdzip-muted-foreground-color);
|
|
1498
|
+
font-size: 12px;
|
|
1499
|
+
font-weight: 600;
|
|
1500
|
+
}
|
|
1501
|
+
|
|
1502
|
+
.mdzip-root .image-insert-options label,
|
|
1503
|
+
.mdzip-root .image-insert-field {
|
|
1504
|
+
display: grid;
|
|
1505
|
+
gap: 4px;
|
|
1506
|
+
font-size: 12px;
|
|
1507
|
+
}
|
|
1508
|
+
|
|
1509
|
+
.mdzip-root .image-insert-options label {
|
|
1510
|
+
grid-template-columns: auto 1fr;
|
|
1511
|
+
align-items: center;
|
|
1512
|
+
}
|
|
1513
|
+
|
|
1514
|
+
.mdzip-root .image-insert-options input {
|
|
1515
|
+
width: auto;
|
|
1516
|
+
}
|
|
1517
|
+
|
|
1518
|
+
.mdzip-root .image-insert-grid {
|
|
1519
|
+
display: grid;
|
|
1520
|
+
grid-template-columns: 1fr 1fr;
|
|
1521
|
+
gap: 8px;
|
|
1522
|
+
margin-top: 8px;
|
|
1523
|
+
}
|
|
1524
|
+
|
|
1525
|
+
.mdzip-root .image-insert-field {
|
|
1526
|
+
margin-top: 8px;
|
|
1527
|
+
}
|
|
1528
|
+
|
|
1529
|
+
.mdzip-root .image-insert-field.field-disabled {
|
|
1530
|
+
color: var(--mdzip-muted-foreground-color);
|
|
1531
|
+
}
|
|
1532
|
+
|
|
1268
1533
|
.mdzip-root .metadata-dialog dl {
|
|
1269
1534
|
margin: 12px 0 0;
|
|
1270
1535
|
}
|
|
@@ -1355,11 +1620,9 @@ export const WORKSPACE_CSS = `
|
|
|
1355
1620
|
.mdzip-root { --nav-pane-width: 220px; }
|
|
1356
1621
|
}
|
|
1357
1622
|
|
|
1358
|
-
/* Stack the formatting toolbar
|
|
1359
|
-
|
|
1360
|
-
|
|
1361
|
-
280px) navigation pane open everything shifts right, so stack earlier. */
|
|
1362
|
-
@media (max-width: 1000px) {
|
|
1623
|
+
/* Stack the formatting toolbar only once the pushed-right view-mode toggle no
|
|
1624
|
+
longer has enough room between the edit tools and the right-side controls. */
|
|
1625
|
+
@media (max-width: 760px) {
|
|
1363
1626
|
.mdzip-root .toolbar {
|
|
1364
1627
|
grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
|
|
1365
1628
|
row-gap: 4px;
|
|
@@ -1388,7 +1651,7 @@ export const WORKSPACE_CSS = `
|
|
|
1388
1651
|
}
|
|
1389
1652
|
}
|
|
1390
1653
|
|
|
1391
|
-
@media (max-width:
|
|
1654
|
+
@media (max-width: 1100px) {
|
|
1392
1655
|
.mdzip-root.navigation-pane-visible .toolbar {
|
|
1393
1656
|
grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
|
|
1394
1657
|
row-gap: 4px;
|
package/dist/view-css.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"view-css.js","sourceRoot":"","sources":["../src/view-css.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,oBAAoB,EACpB,qBAAqB,EACrB,mBAAmB,EACpB,MAAM,YAAY,CAAC;AAEpB,MAAM,wBAAwB,GAAG,qBAAqB,CAAC,UAAU,CAC/D,UAAU,EACV,kBAAkB,CACnB,CAAC;AACF,MAAM,uBAAuB,GAAG,oBAAoB,CAAC,UAAU,CAC7D,UAAU,EACV,kBAAkB,CACnB,CAAC;AAEF,MAAM,CAAC,MAAM,aAAa,GAAG;;;;;;;;;;IAUzB,mBAAmB
|
|
1
|
+
{"version":3,"file":"view-css.js","sourceRoot":"","sources":["../src/view-css.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,oBAAoB,EACpB,qBAAqB,EACrB,mBAAmB,EACpB,MAAM,YAAY,CAAC;AAEpB,MAAM,wBAAwB,GAAG,qBAAqB,CAAC,UAAU,CAC/D,UAAU,EACV,kBAAkB,CACnB,CAAC;AACF,MAAM,uBAAuB,GAAG,oBAAoB,CAAC,UAAU,CAC7D,UAAU,EACV,kBAAkB,CACnB,CAAC;AAEF,MAAM,CAAC,MAAM,aAAa,GAAG;;;;;;;;;;IAUzB,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IA4DnB,wBAAwB;;;;;IAKxB,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAktD1B,CAAC"}
|