@bendyline/docblocks-react 1.1.0 → 1.1.2

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 (64) hide show
  1. package/README.md +23 -14
  2. package/dist/AppMenu/AppMenu.d.ts +11 -1
  3. package/dist/AppMenu/AppMenu.d.ts.map +1 -1
  4. package/dist/AppMenu/AppMenu.js +2 -2
  5. package/dist/AppMenu/AppMenu.js.map +1 -1
  6. package/dist/DocBlocksShell/DocBlocksShell.d.ts +23 -3
  7. package/dist/DocBlocksShell/DocBlocksShell.d.ts.map +1 -1
  8. package/dist/DocBlocksShell/DocBlocksShell.js +621 -94
  9. package/dist/DocBlocksShell/DocBlocksShell.js.map +1 -1
  10. package/dist/Export/ExportDialog.d.ts.map +1 -1
  11. package/dist/Export/ExportDialog.js +123 -7
  12. package/dist/Export/ExportDialog.js.map +1 -1
  13. package/dist/Export/ExportToolbarControls.d.ts.map +1 -1
  14. package/dist/Export/ExportToolbarControls.js +108 -17
  15. package/dist/Export/ExportToolbarControls.js.map +1 -1
  16. package/dist/Export/export-options.d.ts +35 -0
  17. package/dist/Export/export-options.d.ts.map +1 -1
  18. package/dist/Export/export-options.js +6 -1
  19. package/dist/Export/export-options.js.map +1 -1
  20. package/dist/Export/run-export.d.ts.map +1 -1
  21. package/dist/Export/run-export.js +185 -97
  22. package/dist/Export/run-export.js.map +1 -1
  23. package/dist/Export/transform-summaries.d.ts +7 -0
  24. package/dist/Export/transform-summaries.d.ts.map +1 -0
  25. package/dist/Export/transform-summaries.js +6 -0
  26. package/dist/Export/transform-summaries.js.map +1 -0
  27. package/dist/FileExplorer/FileExplorer.d.ts.map +1 -1
  28. package/dist/FileExplorer/FileExplorer.js +17 -2
  29. package/dist/FileExplorer/FileExplorer.js.map +1 -1
  30. package/dist/WorkspacePicker/WorkspaceSettingsButton.d.ts +2 -1
  31. package/dist/WorkspacePicker/WorkspaceSettingsButton.d.ts.map +1 -1
  32. package/dist/WorkspacePicker/WorkspaceSettingsButton.js +2 -2
  33. package/dist/WorkspacePicker/WorkspaceSettingsButton.js.map +1 -1
  34. package/dist/WorkspacePicker/WorkspaceSettingsDialog.d.ts +20 -0
  35. package/dist/WorkspacePicker/WorkspaceSettingsDialog.d.ts.map +1 -0
  36. package/dist/WorkspacePicker/WorkspaceSettingsDialog.js +36 -0
  37. package/dist/WorkspacePicker/WorkspaceSettingsDialog.js.map +1 -0
  38. package/dist/hooks/useAutoSave.d.ts +8 -2
  39. package/dist/hooks/useAutoSave.d.ts.map +1 -1
  40. package/dist/hooks/useAutoSave.js +65 -30
  41. package/dist/hooks/useAutoSave.js.map +1 -1
  42. package/dist/monaco-slim.d.ts +19 -0
  43. package/dist/monaco-slim.d.ts.map +1 -0
  44. package/dist/monaco-slim.js +19 -0
  45. package/dist/monaco-slim.js.map +1 -0
  46. package/dist/preferences/versioning.d.ts +27 -0
  47. package/dist/preferences/versioning.d.ts.map +1 -0
  48. package/dist/preferences/versioning.js +62 -0
  49. package/dist/preferences/versioning.js.map +1 -0
  50. package/package.json +14 -10
  51. package/src/AppMenu/AppMenu.tsx +64 -1
  52. package/src/DocBlocksShell/DocBlocksShell.tsx +839 -116
  53. package/src/Export/ExportDialog.tsx +236 -26
  54. package/src/Export/ExportToolbarControls.tsx +151 -21
  55. package/src/Export/export-options.ts +43 -1
  56. package/src/Export/run-export.ts +208 -97
  57. package/src/Export/transform-summaries.ts +14 -0
  58. package/src/FileExplorer/FileExplorer.tsx +31 -9
  59. package/src/WorkspacePicker/WorkspaceSettingsButton.tsx +9 -0
  60. package/src/WorkspacePicker/WorkspaceSettingsDialog.tsx +121 -0
  61. package/src/hooks/useAutoSave.ts +87 -29
  62. package/src/monaco-slim.ts +20 -0
  63. package/src/preferences/versioning.ts +69 -0
  64. package/src/styles/docblocks.css +995 -53
@@ -2,65 +2,104 @@
2
2
 
3
3
  /* ── Theme Tokens ────────────────────────────────────────────── */
4
4
 
5
+ /* DocBlocks accent palette — warm brown on a canvas/parchment base.
6
+ Think paper on a wooden desk: the editor itself stays white (paper),
7
+ the chrome around it (sidebar, gutters, panes) reads as cream
8
+ canvas, and the accent picks up a saturated dark brown for CTAs.
9
+ Dark mode inverts the metaphor into espresso wood with light tan
10
+ highlights. Derived shades (`--db-accent-soft-*`, `--db-accent-tint`,
11
+ `--db-accent-deep`) are defined alongside so every place that needs
12
+ a tinted background or a readable-on-tint text color pulls from the
13
+ same source of truth. */
5
14
  .db-shell {
6
15
  --db-bg: #ffffff;
7
- --db-bg-subtle: #f9fafb;
8
- --db-bg-hover: #f3f4f6;
9
- --db-bg-selected: #dbeafe;
10
- --db-bg-selected-hover: #bfdbfe;
11
- --db-border: #cbd5e1;
12
- --db-border-strong: #94a3b8;
13
- --db-text: #1f2937;
14
- --db-text-secondary: #374151;
15
- --db-text-muted: #6b7280;
16
- --db-text-placeholder: #9ca3af;
17
- --db-accent: #3b82f6;
18
- --db-accent-hover: #2563eb;
19
- --db-input-border: #93c5fd;
20
- --db-danger: #dc2626;
21
- --db-danger-bg: #fef2f2;
22
- --db-shadow: rgba(0, 0, 0, 0.12);
16
+ --db-bg-subtle: #f3eede;
17
+ --db-bg-hover: #e9e2cb;
18
+ --db-bg-selected: #7d6948;
19
+ --db-bg-selected-hover: #5e4f37;
20
+ --db-border: #d6cdb0;
21
+ --db-border-strong: #b5a985;
22
+ --db-text: #2a2419;
23
+ --db-text-secondary: #3d3528;
24
+ --db-text-muted: #6b614a;
25
+ --db-text-placeholder: #766c54;
26
+ --db-accent: #7d6948;
27
+ --db-accent-hover: #5e4f37;
28
+ --db-accent-soft-08: rgba(125, 105, 72, 0.08);
29
+ --db-accent-soft-12: rgba(125, 105, 72, 0.12);
30
+ --db-accent-soft-15: rgba(125, 105, 72, 0.15);
31
+ --db-accent-soft-25: rgba(125, 105, 72, 0.25);
32
+ --db-accent-tint: #f3eede;
33
+ --db-accent-tint-strong: #d8d0b5;
34
+ --db-accent-deep: #3d3220;
35
+ /* Outline pane + inline-preview gutter background. Sits one step
36
+ lighter than the toolbar (`--db-accent-tint-strong`) so the chrome
37
+ panes read as distinct from the action bar above the canvas. */
38
+ --db-gutter-bg: #efe8d4;
39
+ --db-input-border: #c4b693;
40
+ --db-danger: #b22b1b;
41
+ --db-danger-bg: #fdf0ee;
42
+ --db-shadow: rgba(40, 30, 15, 0.12);
23
43
  }
24
44
 
25
45
  .db-shell[data-theme='dark'] {
26
- --db-bg: #0f172a;
27
- --db-bg-subtle: #1e293b;
28
- --db-bg-hover: #334155;
29
- --db-bg-selected: #1e3a5f;
30
- --db-bg-selected-hover: #1e4a7f;
31
- --db-border: #475569;
32
- --db-border-strong: #64748b;
33
- --db-text: #e5e7eb;
34
- --db-text-secondary: #cbd5e1;
35
- --db-text-muted: #94a3b8;
36
- --db-text-placeholder: #64748b;
37
- --db-accent: #3b82f6;
38
- --db-accent-hover: #60a5fa;
39
- --db-input-border: #3b82f6;
46
+ --db-bg: #1a1812;
47
+ --db-bg-subtle: #262219;
48
+ --db-bg-hover: #3a3528;
49
+ --db-bg-selected: #3a3528;
50
+ --db-bg-selected-hover: #4d4636;
51
+ --db-border: #4d4636;
52
+ --db-border-strong: #6b6448;
53
+ --db-text: #e8e2d0;
54
+ --db-text-secondary: #d4ccb0;
55
+ --db-text-muted: #a89a7c;
56
+ --db-text-placeholder: #6b614a;
57
+ --db-accent: #c8b48f;
58
+ --db-accent-hover: #dec79d;
59
+ --db-accent-soft-08: rgba(200, 180, 143, 0.08);
60
+ --db-accent-soft-12: rgba(200, 180, 143, 0.12);
61
+ --db-accent-soft-15: rgba(200, 180, 143, 0.18);
62
+ --db-accent-soft-25: rgba(200, 180, 143, 0.28);
63
+ --db-accent-tint: #262219;
64
+ --db-accent-tint-strong: #3a382e;
65
+ --db-accent-deep: #e6dcc0;
66
+ --db-input-border: #c8b48f;
40
67
  --db-danger: #f87171;
41
68
  --db-danger-bg: #1c1917;
42
69
  --db-shadow: rgba(0, 0, 0, 0.4);
70
+ /* In dark mode, "lighter than the toolbar" means brighter — so this
71
+ sits a step above `--db-accent-tint-strong` instead of between it
72
+ and tint. */
73
+ --db-gutter-bg: #4a4538;
43
74
  }
44
75
 
45
76
  @media (prefers-color-scheme: dark) {
46
77
  .db-shell:not([data-theme='light']) {
47
- --db-bg: #0f172a;
48
- --db-bg-subtle: #1e293b;
49
- --db-bg-hover: #334155;
50
- --db-bg-selected: #1e3a5f;
51
- --db-bg-selected-hover: #1e4a7f;
52
- --db-border: #475569;
53
- --db-border-strong: #64748b;
54
- --db-text: #e5e7eb;
55
- --db-text-secondary: #cbd5e1;
56
- --db-text-muted: #94a3b8;
57
- --db-text-placeholder: #64748b;
58
- --db-accent: #3b82f6;
59
- --db-accent-hover: #60a5fa;
60
- --db-input-border: #3b82f6;
78
+ --db-bg: #1a1812;
79
+ --db-bg-subtle: #262219;
80
+ --db-bg-hover: #3a3528;
81
+ --db-bg-selected: #3a3528;
82
+ --db-bg-selected-hover: #4d4636;
83
+ --db-border: #4d4636;
84
+ --db-border-strong: #6b6448;
85
+ --db-text: #e8e2d0;
86
+ --db-text-secondary: #d4ccb0;
87
+ --db-text-muted: #a89a7c;
88
+ --db-text-placeholder: #6b614a;
89
+ --db-accent: #c8b48f;
90
+ --db-accent-hover: #dec79d;
91
+ --db-accent-soft-08: rgba(200, 180, 143, 0.08);
92
+ --db-accent-soft-12: rgba(200, 180, 143, 0.12);
93
+ --db-accent-soft-15: rgba(200, 180, 143, 0.18);
94
+ --db-accent-soft-25: rgba(200, 180, 143, 0.28);
95
+ --db-accent-tint: #262219;
96
+ --db-accent-tint-strong: #3a382e;
97
+ --db-accent-deep: #e6dcc0;
98
+ --db-input-border: #c8b48f;
61
99
  --db-danger: #f87171;
62
100
  --db-danger-bg: #1c1917;
63
101
  --db-shadow: rgba(0, 0, 0, 0.4);
102
+ --db-gutter-bg: #4a4538;
64
103
  }
65
104
  }
66
105
 
@@ -82,10 +121,10 @@
82
121
  display: flex;
83
122
  align-items: center;
84
123
  justify-content: center;
85
- background: rgba(37, 99, 235, 0.08);
86
- border: 2px dashed #2563eb;
124
+ background: var(--db-accent-soft-08);
125
+ border: 2px dashed var(--db-accent);
87
126
  border-radius: 6px;
88
- color: #2563eb;
127
+ color: var(--db-accent);
89
128
  font-size: 13px;
90
129
  font-weight: 600;
91
130
  z-index: 10;
@@ -211,10 +250,12 @@
211
250
 
212
251
  .db-tree-row--selected {
213
252
  background: var(--db-bg-selected);
253
+ color: #ffffff;
214
254
  }
215
255
 
216
256
  .db-tree-row--selected:hover {
217
257
  background: var(--db-bg-selected-hover);
258
+ color: #ffffff;
218
259
  }
219
260
 
220
261
  .db-tree-icon {
@@ -276,7 +317,7 @@
276
317
 
277
318
  .db-tree-more--active {
278
319
  background: var(--db-bg-selected);
279
- color: var(--db-text);
320
+ color: #ffffff;
280
321
  }
281
322
 
282
323
  /* ── Context Menu ────────────────────────────────────────────── */
@@ -355,9 +396,10 @@
355
396
  .db-workspace-dropdown {
356
397
  position: absolute;
357
398
  left: 8px;
358
- right: 8px;
359
399
  top: 100%;
360
400
  z-index: 60;
401
+ min-width: calc(100% - 16px);
402
+ max-width: min(320px, 90vw);
361
403
  background: var(--db-bg);
362
404
  border: 1px solid var(--db-border);
363
405
  border-radius: 4px;
@@ -369,6 +411,7 @@
369
411
  display: flex;
370
412
  align-items: center;
371
413
  justify-content: space-between;
414
+ gap: 8px;
372
415
  width: 100%;
373
416
  padding: 6px 12px;
374
417
  font-size: 13px;
@@ -377,6 +420,7 @@
377
420
  border: none;
378
421
  cursor: pointer;
379
422
  color: var(--db-text-secondary);
423
+ white-space: nowrap;
380
424
  }
381
425
 
382
426
  .db-workspace-dropdown-item:hover {
@@ -385,6 +429,7 @@
385
429
 
386
430
  .db-workspace-dropdown-item--active {
387
431
  background: var(--db-bg-selected);
432
+ color: #ffffff;
388
433
  font-weight: 500;
389
434
  }
390
435
 
@@ -592,13 +637,67 @@
592
637
 
593
638
  .db-shell-sidebar {
594
639
  width: 260px;
595
- border-right: 1px solid var(--db-border-strong);
596
640
  display: flex;
597
641
  flex-direction: column;
598
642
  overflow: hidden;
599
643
  flex-shrink: 0;
600
644
  }
601
645
 
646
+ /* Drag handle between sidebar and editor. The visible line is the
647
+ hairline divider itself — 1px wide, in --db-border-strong so it
648
+ matches the toolbar's bottom border. The hit area extends 3px to
649
+ either side via an absolutely-positioned ::before so the cursor
650
+ can grab it without being pixel-perfect. The sidebar no longer
651
+ carries its own `border-right`; this 1px IS that border. */
652
+ .db-shell-sidebar-resizer {
653
+ flex: 0 0 1px;
654
+ width: 1px;
655
+ /* Custom col-resize cursor — a dark double-arrow with a white halo
656
+ so it stays visible against any background. Windows' custom-color
657
+ cursor setting can render the system col-resize in white, which
658
+ disappears against the light chrome on either side of our 1px
659
+ line; a CSS `url()` cursor always wins over the OS preference.
660
+ Hotspot is the center (11, 8). */
661
+ cursor:
662
+ url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='22' height='16' viewBox='0 0 22 16'><g fill='none' stroke-linecap='round' stroke-linejoin='round'><path d='M3 8 L19 8 M3 8 L7 4 M3 8 L7 12 M19 8 L15 4 M19 8 L15 12' stroke='white' stroke-width='3.5'/><path d='M3 8 L19 8 M3 8 L7 4 M3 8 L7 12 M19 8 L15 4 M19 8 L15 12' stroke='%231f2937' stroke-width='1.4'/></g></svg>")
663
+ 11 8,
664
+ col-resize;
665
+ background: var(--db-border-strong);
666
+ position: relative;
667
+ z-index: 5;
668
+ user-select: none;
669
+ touch-action: none;
670
+ transition: background-color 0.12s ease;
671
+ }
672
+
673
+ .db-shell-sidebar-resizer::before {
674
+ /* Invisible hit-extension so the 1px line isn't fiddly to grab. */
675
+ content: '';
676
+ position: absolute;
677
+ top: 0;
678
+ bottom: 0;
679
+ left: -3px;
680
+ right: -3px;
681
+ }
682
+
683
+ .db-shell-sidebar-resizer:hover,
684
+ .db-shell-sidebar-resizer:active {
685
+ background: var(--db-accent);
686
+ }
687
+
688
+ /* Drag-state body cursor — set via JS while a sidebar resize is in
689
+ progress so the col-resize cursor stays painted even when the
690
+ pointer briefly slips off the 7px hit area. Uses the same custom
691
+ SVG as the resizer itself so Windows' white-cursor setting doesn't
692
+ make it invisible against light chrome. */
693
+ body.db-resizing-sidebar,
694
+ body.db-resizing-sidebar * {
695
+ cursor:
696
+ url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='22' height='16' viewBox='0 0 22 16'><g fill='none' stroke-linecap='round' stroke-linejoin='round'><path d='M3 8 L19 8 M3 8 L7 4 M3 8 L7 12 M19 8 L15 4 M19 8 L15 12' stroke='white' stroke-width='3.5'/><path d='M3 8 L19 8 M3 8 L7 4 M3 8 L7 12 M19 8 L15 4 M19 8 L15 12' stroke='%231f2937' stroke-width='1.4'/></g></svg>")
697
+ 11 8,
698
+ col-resize !important;
699
+ }
700
+
602
701
  .db-shell-sidebar-header {
603
702
  display: flex;
604
703
  align-items: center;
@@ -673,6 +772,28 @@
673
772
  background: var(--db-bg-subtle);
674
773
  }
675
774
 
775
+ /* "Restore split view" button — appears on the editor toolbar when
776
+ compact layout was triggered manually on a wide viewport. Lets the
777
+ user pop the sidebar back open alongside the editor. Iconic only,
778
+ no label, so it stays compact in the toolbar's right-slot. */
779
+ .db-restore-split {
780
+ display: inline-flex;
781
+ align-items: center;
782
+ justify-content: center;
783
+ padding: 6px;
784
+ margin-right: 4px;
785
+ border: none;
786
+ border-radius: 4px;
787
+ background: none;
788
+ color: var(--db-text-secondary);
789
+ cursor: pointer;
790
+ }
791
+
792
+ .db-restore-split:hover {
793
+ background: var(--db-bg-hover);
794
+ color: var(--db-text);
795
+ }
796
+
676
797
  /* ── Dialog ───────────────────────────────────────────────────── */
677
798
 
678
799
  .db-dialog-overlay {
@@ -767,6 +888,10 @@
767
888
  padding: 0;
768
889
  }
769
890
 
891
+ .db-settings-fieldset + .db-settings-fieldset {
892
+ margin-top: 20px;
893
+ }
894
+
770
895
  .db-settings-legend {
771
896
  font-size: 12px;
772
897
  font-weight: 600;
@@ -776,6 +901,20 @@
776
901
  margin-bottom: 8px;
777
902
  }
778
903
 
904
+ .db-settings-hint {
905
+ font-size: 12px;
906
+ color: var(--db-text-muted);
907
+ margin: 0 0 6px;
908
+ line-height: 1.5;
909
+ }
910
+
911
+ .db-settings-hint code {
912
+ font-size: 11px;
913
+ background: var(--db-bg-subtle);
914
+ padding: 1px 4px;
915
+ border-radius: 3px;
916
+ }
917
+
779
918
  .db-settings-radio {
780
919
  display: flex;
781
920
  align-items: center;
@@ -870,10 +1009,31 @@
870
1009
  max-width: none;
871
1010
  }
872
1011
 
1012
+ /* …unless the inline preview gutter is present. The gutter is absolutely
1013
+ positioned to the right of the centered editor "page", so a full-bleed
1014
+ editor pushes it offscreen. Restore squisq's 800px page width when the
1015
+ gutter wrapper is active. The container query at 720px in editor.css
1016
+ auto-hides the gutter on narrow viewports. */
1017
+ .squisq-wysiwyg-with-gutter .squisq-wysiwyg-editor {
1018
+ max-width: 800px;
1019
+ }
1020
+
873
1021
  .squisq-toolbar {
874
1022
  min-height: 48px;
875
1023
  }
876
1024
 
1025
+ /* Squisq's view-tab section is bottom-aligned in the toolbar (so the
1026
+ active-tab underline sits flush with the toolbar's lower edge),
1027
+ with `padding: 8px 14px 4px` calibrated for squisq's natural ~36px
1028
+ toolbar height. We force the toolbar to 48px for breathing room,
1029
+ which drops the label too far down relative to the centered B/I/S
1030
+ buttons. Lift the label ~6px by growing bottom padding — the
1031
+ underline stays anchored to the section's bottom edge, only the
1032
+ text moves up. */
1033
+ .db-shell .squisq-toolbar-view-tab {
1034
+ padding-bottom: 10px;
1035
+ }
1036
+
877
1037
  .squisq-toolbar-button[aria-label='Insert image'] {
878
1038
  font-size: 0;
879
1039
  background: no-repeat center / 18px
@@ -1003,6 +1163,66 @@
1003
1163
  color: var(--db-text-placeholder);
1004
1164
  }
1005
1165
 
1166
+ .db-export-checkbox {
1167
+ display: inline-flex;
1168
+ align-items: center;
1169
+ gap: 8px;
1170
+ font-size: 13px;
1171
+ color: var(--db-text);
1172
+ cursor: pointer;
1173
+ user-select: none;
1174
+ }
1175
+
1176
+ .db-export-checkbox input[type='checkbox'] {
1177
+ margin: 0;
1178
+ cursor: pointer;
1179
+ }
1180
+
1181
+ /* Chip radio group — used by the Export dialog for the top three
1182
+ options (Format / Style / Bundle). Wraps to multiple lines on narrow
1183
+ widths so the format row doesn't truncate. */
1184
+ .db-export-chips {
1185
+ display: flex;
1186
+ flex-wrap: wrap;
1187
+ gap: 6px;
1188
+ }
1189
+
1190
+ .db-export-chip {
1191
+ flex: 0 0 auto;
1192
+ padding: 6px 12px;
1193
+ font: inherit;
1194
+ font-size: 13px;
1195
+ color: var(--db-text);
1196
+ background: var(--db-bg-subtle);
1197
+ border: 1px solid var(--db-border);
1198
+ border-radius: 3px;
1199
+ cursor: pointer;
1200
+ transition:
1201
+ background-color 0.12s ease,
1202
+ border-color 0.12s ease,
1203
+ color 0.12s ease;
1204
+ }
1205
+
1206
+ .db-export-chip:hover {
1207
+ background: var(--db-bg-hover);
1208
+ }
1209
+
1210
+ .db-export-chip--active {
1211
+ background: var(--db-accent);
1212
+ border-color: var(--db-accent);
1213
+ color: #ffffff;
1214
+ }
1215
+
1216
+ .db-export-chip--active:hover {
1217
+ background: var(--db-accent-hover);
1218
+ border-color: var(--db-accent-hover);
1219
+ }
1220
+
1221
+ .db-export-chip:focus-visible {
1222
+ outline: 2px solid var(--db-accent);
1223
+ outline-offset: 2px;
1224
+ }
1225
+
1006
1226
  .db-export-footer {
1007
1227
  display: flex;
1008
1228
  justify-content: flex-end;
@@ -1059,11 +1279,11 @@
1059
1279
  }
1060
1280
 
1061
1281
  .db-shell[data-theme='light'] .squisq-toolbar {
1062
- background: #d8dee6;
1282
+ background: var(--db-accent-tint);
1063
1283
  }
1064
1284
 
1065
1285
  .db-shell[data-theme='light'] .squisq-toolbar-view-tabs {
1066
- background: #ffffff;
1286
+ background: var(--db-gutter-bg);
1067
1287
  box-shadow: 1px 0 0 rgba(0, 0, 0, 0.04);
1068
1288
  }
1069
1289
 
@@ -1072,5 +1292,727 @@
1072
1292
  }
1073
1293
 
1074
1294
  .db-shell[data-theme='dark'] .squisq-toolbar-view-tabs {
1075
- background: #0b1220;
1295
+ background: #16110b;
1296
+ }
1297
+
1298
+ /* ── Inline preview gutter: thematic green ──────────────────── */
1299
+ /* Rebind squisq's `--squisq-preview-*` custom properties so the
1300
+ gutter chrome (vertical bracket, diagonal connector + dots,
1301
+ "FACTCARD" template label) reads as sage green instead of indigo,
1302
+ and the card surface tones harmonize with the rest of docblocks.
1303
+ The preview-block renderer's own theme is unaffected — that's a
1304
+ document-level concern, not chrome. */
1305
+ .db-shell[data-theme='light'] .squisq-editor-shell[data-theme='light'] {
1306
+ --squisq-preview-accent: var(--db-accent);
1307
+ --squisq-preview-accent-muted: var(--db-text-muted);
1308
+ --squisq-preview-gutter-bg: var(--db-gutter-bg);
1309
+ --squisq-preview-card-bg: #ffffff;
1310
+ --squisq-preview-card-border: var(--db-border);
1311
+ --squisq-preview-card-shadow: 0 1px 2px rgba(40, 30, 15, 0.08);
1312
+ --squisq-preview-card-title: var(--db-accent-deep);
1313
+ --squisq-preview-card-svg-bg: var(--db-accent-tint);
1314
+ --squisq-preview-dot-halo: var(--db-gutter-bg);
1315
+ --squisq-preview-empty-bg: #ffffff;
1316
+ --squisq-preview-empty-border: var(--db-border);
1317
+ --squisq-preview-empty-text: var(--db-accent-deep);
1318
+ }
1319
+
1320
+ .db-shell[data-theme='dark'] .squisq-editor-shell[data-theme='dark'] {
1321
+ --squisq-preview-accent: var(--db-accent-hover);
1322
+ --squisq-preview-accent-muted: var(--db-text-muted);
1323
+ --squisq-preview-gutter-bg: var(--db-gutter-bg);
1324
+ --squisq-preview-card-bg: var(--db-bg);
1325
+ --squisq-preview-card-border: var(--db-border);
1326
+ --squisq-preview-card-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
1327
+ --squisq-preview-card-title: var(--db-text);
1328
+ --squisq-preview-card-svg-bg: var(--db-bg-subtle);
1329
+ --squisq-preview-dot-halo: var(--db-gutter-bg);
1330
+ --squisq-preview-empty-bg: var(--db-bg);
1331
+ --squisq-preview-empty-border: var(--db-border);
1332
+ --squisq-preview-empty-text: var(--db-text-muted);
1333
+ }
1334
+
1335
+ /* ── Squisq dark-theme override ──────────────────────────────── */
1336
+ /* Squisq has hardcoded slate-blue surfaces in its dark mode. We re-tone
1337
+ them via the DocBlocks dark palette so the editor reads as warm dark
1338
+ wood instead of cold slate. If squisq ever accepts a theme-color
1339
+ prop, replace this block with that mechanism. */
1340
+
1341
+ .db-shell[data-theme='dark'] .squisq-editor-shell[data-theme='dark'] {
1342
+ --squisq-bg: var(--db-bg-subtle);
1343
+ --squisq-border: var(--db-border);
1344
+ --squisq-input-bg: var(--db-bg-hover);
1345
+ background: var(--db-bg);
1346
+ }
1347
+
1348
+ .db-shell[data-theme='dark'] .squisq-editor-shell[data-theme='dark'] .squisq-editor-header {
1349
+ background: var(--db-bg-subtle);
1350
+ border-bottom-color: var(--db-border-strong);
1351
+ }
1352
+
1353
+ .db-shell[data-theme='dark'] .squisq-editor-shell[data-theme='dark'] .squisq-toolbar-view-tabs {
1354
+ background: var(--db-bg);
1355
+ }
1356
+
1357
+ .db-shell[data-theme='dark'] .squisq-editor-shell[data-theme='dark'] .squisq-wysiwyg-container {
1358
+ background: #16110b;
1359
+ }
1360
+
1361
+ .db-shell[data-theme='dark'] .squisq-editor-shell[data-theme='dark'] .squisq-wysiwyg-editor {
1362
+ background: var(--db-bg);
1363
+ }
1364
+
1365
+ .db-shell[data-theme='dark'] .squisq-editor-shell[data-theme='dark'] .squisq-wysiwyg-editor pre {
1366
+ background: #16110b;
1367
+ }
1368
+
1369
+ .db-shell[data-theme='dark'] .squisq-editor-shell[data-theme='dark'] .squisq-wysiwyg-editor code {
1370
+ background: var(--db-bg-hover);
1371
+ }
1372
+
1373
+ .db-shell[data-theme='dark']
1374
+ .squisq-editor-shell[data-theme='dark']
1375
+ .squisq-wysiwyg-editor
1376
+ blockquote {
1377
+ border-left-color: var(--db-border);
1378
+ }
1379
+
1380
+ .db-shell[data-theme='dark'] .squisq-editor-shell[data-theme='dark'] .squisq-preview-player {
1381
+ background: var(--db-bg);
1382
+ }
1383
+
1384
+ .db-shell[data-theme='dark'] .squisq-editor-shell[data-theme='dark'] .squisq-preview-codeblock {
1385
+ background: #16110b;
1386
+ }
1387
+
1388
+ .db-shell[data-theme='dark'] .squisq-editor-shell[data-theme='dark'] .squisq-status-bar {
1389
+ background: var(--db-bg-subtle);
1390
+ border-top-color: var(--db-border);
1391
+ }
1392
+
1393
+ .db-shell[data-theme='dark'] .squisq-image-viewer--dark,
1394
+ .db-shell[data-theme='dark'] .squisq-image-viewer--dark .squisq-image-viewer-stage {
1395
+ background: var(--db-bg);
1396
+ }
1397
+
1398
+ /* ── Squisq accent override (blue → thematic green) ──────────── */
1399
+
1400
+ .db-shell[data-theme='dark'] .squisq-editor-shell[data-theme='dark'] .squisq-view-tab--active {
1401
+ color: var(--db-accent-hover);
1402
+ border-bottom-color: var(--db-accent-hover);
1403
+ }
1404
+
1405
+ .db-shell[data-theme='dark']
1406
+ .squisq-editor-shell[data-theme='dark']
1407
+ .squisq-toolbar-view-tab--active {
1408
+ color: var(--db-accent-deep);
1409
+ border-bottom-color: var(--db-accent-hover);
1410
+ }
1411
+
1412
+ .db-shell[data-theme='dark']
1413
+ .squisq-editor-shell[data-theme='dark']
1414
+ .squisq-toolbar-button--active {
1415
+ background: var(--db-accent-tint-strong);
1416
+ color: var(--db-accent-hover);
1417
+ }
1418
+
1419
+ .db-shell[data-theme='dark']
1420
+ .squisq-editor-shell[data-theme='dark']
1421
+ .squisq-toolbar-button--active:hover {
1422
+ background: var(--db-accent-tint-strong);
1423
+ color: var(--db-accent-deep);
1424
+ }
1425
+
1426
+ .db-shell[data-theme='dark']
1427
+ .squisq-editor-shell[data-theme='dark']
1428
+ .squisq-toolbar-overflow-item--active {
1429
+ color: var(--db-accent-hover);
1430
+ background: var(--db-accent-tint-strong);
1431
+ }
1432
+
1433
+ .db-shell[data-theme='dark'] .squisq-editor-shell[data-theme='dark'] .squisq-wysiwyg-editor a {
1434
+ color: var(--db-accent-hover);
1435
+ }
1436
+
1437
+ .db-shell[data-theme='dark']
1438
+ .squisq-editor-shell[data-theme='dark']
1439
+ .squisq-wysiwyg-editor
1440
+ .column-resize-handle {
1441
+ background: var(--db-accent-hover);
1442
+ }
1443
+
1444
+ .db-shell[data-theme='dark']
1445
+ .squisq-editor-shell[data-theme='dark']
1446
+ .squisq-wysiwyg-editor
1447
+ .selectedCell::after {
1448
+ background: var(--db-accent-soft-15);
1449
+ }
1450
+
1451
+ .db-shell[data-theme='dark']
1452
+ .squisq-editor-shell[data-theme='dark']
1453
+ .squisq-template-picker-select {
1454
+ background: var(--db-bg-hover);
1455
+ border-color: var(--db-border);
1456
+ color: var(--db-text-secondary);
1457
+ }
1458
+
1459
+ .db-shell[data-theme='dark']
1460
+ .squisq-editor-shell[data-theme='dark']
1461
+ .squisq-template-picker-select:focus {
1462
+ outline-color: var(--db-accent);
1463
+ }
1464
+
1465
+ .db-shell[data-theme='dark']
1466
+ .squisq-editor-shell[data-theme='dark']
1467
+ .squisq-toolbar-button:disabled,
1468
+ .db-shell[data-theme='dark']
1469
+ .squisq-editor-shell[data-theme='dark']
1470
+ .squisq-toolbar-button:disabled:hover {
1471
+ color: var(--db-text-muted);
1472
+ background: transparent;
1473
+ cursor: not-allowed;
1474
+ opacity: 0.6;
1475
+ /* Desaturate colored emoji glyphs (e.g. 🖼) so they don't read as blue
1476
+ against the warm-brown dark surface when disabled. */
1477
+ filter: grayscale(1);
1478
+ }
1479
+
1480
+ /* Closed-state template trigger: neutralize squisq's slate-navy bg ── */
1481
+ .db-shell[data-theme='dark']
1482
+ .squisq-editor-shell[data-theme='dark']
1483
+ .squisq-template-picker-trigger {
1484
+ background: var(--db-bg-subtle);
1485
+ border-color: var(--db-border);
1486
+ color: var(--db-text);
1487
+ }
1488
+
1489
+ .db-shell[data-theme='dark']
1490
+ .squisq-editor-shell[data-theme='dark']
1491
+ .squisq-template-picker-trigger:hover {
1492
+ background: var(--db-bg-hover);
1493
+ border-color: var(--db-border-strong);
1494
+ }
1495
+
1496
+ /* ── Tooltips (portal): sans-serif + thematic chip ───────────── */
1497
+ /* Tooltips render via portal into document.body, OUTSIDE `.db-shell`
1498
+ — so the `--db-accent-*` variables (scoped to `.db-shell`) don't
1499
+ cascade into them. We reach the portaled element with
1500
+ `html:has(.db-shell)` and emit explicit colors per theme; using
1501
+ `var(--db-accent-…)` here drops to the squisq fallback (dark slate
1502
+ bg + near-white text) because the vars never resolve. */
1503
+ html:has(.db-shell) .squisq-tooltip {
1504
+ font-family:
1505
+ ui-sans-serif,
1506
+ system-ui,
1507
+ -apple-system,
1508
+ 'Segoe UI',
1509
+ Roboto,
1510
+ 'Helvetica Neue',
1511
+ Arial,
1512
+ sans-serif;
1513
+ box-shadow: 0 2px 8px rgba(15, 30, 20, 0.35);
1514
+ /* Default (light mode + system-light): dark espresso chip, cream
1515
+ text — an inverted floating chip against the cream UI. */
1516
+ background: #3d3220;
1517
+ color: #f3eede;
1518
+ }
1519
+
1520
+ html:has(.db-shell[data-theme='dark']) .squisq-tooltip {
1521
+ /* Dark mode: cream chip, dark text — an inverted floating chip
1522
+ against the espresso UI. Contrast ratio ~12:1 between
1523
+ `#e6dcc0` and `#1f1a10`. */
1524
+ background: #e6dcc0;
1525
+ color: #1f1a10;
1526
+ }
1527
+
1528
+ @media (prefers-color-scheme: dark) {
1529
+ /* Shell defaults to system theme when `data-theme` is unset —
1530
+ mirror the dark-mode override so the tooltip stays readable
1531
+ without an explicit user choice. */
1532
+ html:has(.db-shell:not([data-theme='light'])) .squisq-tooltip {
1533
+ background: #e6dcc0;
1534
+ color: #1f1a10;
1535
+ }
1536
+ }
1537
+
1538
+ /* ── Template picker accents (dark): indigo → thematic green ─── */
1539
+ /* The gallery popover renders into document.body via createPortal, so
1540
+ neither .db-shell nor .squisq-editor-shell are ancestors. We use
1541
+ `html:has(.db-shell[data-theme='dark'])` to detect docblocks' dark
1542
+ theme from outside the shell, then style the portaled gallery (its
1543
+ root has id="squisq-template-gallery-portal"). */
1544
+
1545
+ .db-shell[data-theme='dark']
1546
+ .squisq-editor-shell[data-theme='dark']
1547
+ .squisq-template-picker-trigger--open {
1548
+ border-color: var(--db-accent-hover);
1549
+ outline-color: var(--db-accent-soft-25);
1550
+ }
1551
+
1552
+ /* The template gallery is rendered into document.body via createPortal,
1553
+ so it lives outside `.db-shell`. Hoist the same brown/canvas tokens
1554
+ onto the html element (gated by `:has(.db-shell[data-theme=…])`) so
1555
+ the portal rules below can pull from the same source of truth. */
1556
+ html:has(.db-shell[data-theme='dark']) {
1557
+ --db-bg: #1a1812;
1558
+ --db-bg-subtle: #262219;
1559
+ --db-bg-hover: #3a3528;
1560
+ --db-border: #4d4636;
1561
+ --db-border-strong: #6b6448;
1562
+ --db-text: #e8e2d0;
1563
+ --db-text-muted: #a89a7c;
1564
+ --db-accent: #c8b48f;
1565
+ --db-accent-hover: #dec79d;
1566
+ --db-accent-soft-15: rgba(200, 180, 143, 0.18);
1567
+ --db-accent-soft-25: rgba(200, 180, 143, 0.28);
1568
+ --db-accent-tint-strong: #3a382e;
1569
+ --db-gutter-bg: #4a4538;
1570
+ }
1571
+
1572
+ html:has(.db-shell[data-theme='light']) {
1573
+ --db-bg: #ffffff;
1574
+ --db-bg-subtle: #f3eede;
1575
+ --db-bg-hover: #e9e2cb;
1576
+ --db-border: #d6cdb0;
1577
+ --db-border-strong: #b5a985;
1578
+ --db-text: #2a2419;
1579
+ --db-text-muted: #6b614a;
1580
+ --db-accent: #7d6948;
1581
+ --db-accent-hover: #5e4f37;
1582
+ --db-accent-soft-15: rgba(125, 105, 72, 0.15);
1583
+ --db-accent-soft-25: rgba(125, 105, 72, 0.25);
1584
+ --db-accent-tint-strong: #d8d0b5;
1585
+ --db-gutter-bg: #efe8d4;
1586
+ }
1587
+
1588
+ html:has(.db-shell[data-theme='dark']) #squisq-template-gallery-portal {
1589
+ background: var(--db-bg-subtle);
1590
+ border-color: var(--db-border);
1591
+ box-shadow:
1592
+ 0 8px 24px rgba(0, 0, 0, 0.5),
1593
+ 0 2px 6px rgba(0, 0, 0, 0.3);
1594
+ }
1595
+
1596
+ html:has(.db-shell[data-theme='dark'])
1597
+ #squisq-template-gallery-portal
1598
+ .squisq-template-gallery-none {
1599
+ background: transparent;
1600
+ border-color: var(--db-border);
1601
+ }
1602
+
1603
+ html:has(.db-shell[data-theme='dark'])
1604
+ #squisq-template-gallery-portal
1605
+ .squisq-template-gallery-none:hover {
1606
+ background: var(--db-bg-hover);
1607
+ }
1608
+
1609
+ html:has(.db-shell[data-theme='dark'])
1610
+ #squisq-template-gallery-portal
1611
+ .squisq-template-gallery-none.squisq-template-gallery-card--selected {
1612
+ background: var(--db-accent-tint-strong);
1613
+ border-color: var(--db-accent);
1614
+ }
1615
+
1616
+ html:has(.db-shell[data-theme='dark'])
1617
+ #squisq-template-gallery-portal
1618
+ .squisq-template-gallery-none-label {
1619
+ color: var(--db-text);
1620
+ }
1621
+
1622
+ html:has(.db-shell[data-theme='dark'])
1623
+ #squisq-template-gallery-portal
1624
+ .squisq-template-gallery-none-desc {
1625
+ color: var(--db-text-muted);
1626
+ }
1627
+
1628
+ html:has(.db-shell[data-theme='dark'])
1629
+ #squisq-template-gallery-portal
1630
+ .squisq-template-gallery-card {
1631
+ background: transparent;
1632
+ border-color: var(--db-border);
1633
+ }
1634
+
1635
+ html:has(.db-shell[data-theme='dark'])
1636
+ #squisq-template-gallery-portal
1637
+ .squisq-template-gallery-card:hover {
1638
+ background: var(--db-bg-hover);
1639
+ border-color: var(--db-accent);
1640
+ box-shadow: 0 1px 4px var(--db-accent-soft-15);
1641
+ }
1642
+
1643
+ html:has(.db-shell[data-theme='dark'])
1644
+ #squisq-template-gallery-portal
1645
+ .squisq-template-gallery-card--selected {
1646
+ background: var(--db-accent-tint-strong);
1647
+ border-color: var(--db-accent-hover);
1648
+ box-shadow: 0 0 0 2px var(--db-accent-soft-25);
1649
+ }
1650
+
1651
+ html:has(.db-shell[data-theme='dark'])
1652
+ #squisq-template-gallery-portal
1653
+ .squisq-template-gallery-card-icon {
1654
+ background: var(--db-bg);
1655
+ border-color: var(--db-border);
1656
+ }
1657
+
1658
+ html:has(.db-shell[data-theme='dark'])
1659
+ #squisq-template-gallery-portal
1660
+ .squisq-template-gallery-card-name {
1661
+ color: var(--db-text);
1662
+ }
1663
+
1664
+ html:has(.db-shell[data-theme='dark'])
1665
+ #squisq-template-gallery-portal
1666
+ .squisq-template-gallery-card-desc {
1667
+ color: var(--db-text-muted);
1668
+ }
1669
+
1670
+ /* Recolor the indigo accent fills inside template thumbnail SVGs */
1671
+ html:has(.db-shell[data-theme='dark'])
1672
+ #squisq-template-gallery-portal
1673
+ .squisq-template-picker-icon
1674
+ [fill='#818cf8'] {
1675
+ fill: var(--db-accent-hover);
1676
+ }
1677
+
1678
+ /* ── Template picker accents (light): indigo → thematic green ── */
1679
+
1680
+ .db-shell[data-theme='light']
1681
+ .squisq-editor-shell[data-theme='light']
1682
+ .squisq-template-picker-trigger--open {
1683
+ border-color: var(--db-accent);
1684
+ outline-color: var(--db-accent-soft-25);
1685
+ }
1686
+
1687
+ .db-shell[data-theme='light']
1688
+ .squisq-editor-shell[data-theme='light']
1689
+ .squisq-template-gallery-card:hover {
1690
+ border-color: var(--db-input-border);
1691
+ box-shadow: 0 1px 4px var(--db-accent-soft-08);
1692
+ }
1693
+
1694
+ .db-shell[data-theme='light']
1695
+ .squisq-editor-shell[data-theme='light']
1696
+ .squisq-template-gallery-card--selected {
1697
+ background: var(--db-accent-tint);
1698
+ border-color: var(--db-accent);
1699
+ box-shadow: 0 0 0 2px var(--db-accent-soft-15);
1700
+ }
1701
+
1702
+ .db-shell[data-theme='light']
1703
+ .squisq-editor-shell[data-theme='light']
1704
+ .squisq-template-gallery-none.squisq-template-gallery-card--selected {
1705
+ background: var(--db-accent-tint);
1706
+ border-color: var(--db-accent-tint-strong);
1707
+ }
1708
+
1709
+ .db-shell[data-theme='light']
1710
+ .squisq-editor-shell[data-theme='light']
1711
+ .squisq-template-picker-icon
1712
+ [fill='#818cf8'] {
1713
+ fill: var(--db-accent);
1714
+ }
1715
+
1716
+ /* ── Template badge: inherit OS font, amber palette ──────────── */
1717
+
1718
+ .db-shell .squisq-template-badge {
1719
+ font-family: inherit;
1720
+ }
1721
+
1722
+ .db-shell[data-theme='light'] .squisq-template-badge {
1723
+ color: #92400e;
1724
+ background: #fef3c7;
1725
+ border-color: #fcd34d;
1726
+ }
1727
+
1728
+ .db-shell[data-theme='dark'] .squisq-editor-shell[data-theme='dark'] .squisq-template-badge {
1729
+ color: #fbbf24;
1730
+ background: #2a1e08;
1731
+ border-color: #92400e;
1732
+ }
1733
+
1734
+ /* Light mode squisq surfaces (toolbar, header, status bar) */
1735
+ .db-shell[data-theme='light'] .squisq-editor-shell[data-theme='light'] .squisq-editor-header {
1736
+ background: var(--db-accent-tint);
1737
+ border-bottom-color: var(--db-border-strong);
1738
+ }
1739
+
1740
+ /* Toolbar / view-tabs: the formatting area sits LIGHTER than the
1741
+ mode-switcher tabs on its left, so the cluster of buttons fades
1742
+ into the canvas while the mode switcher reads as the anchor. */
1743
+ .db-shell[data-theme='light'] .squisq-editor-shell[data-theme='light'] .squisq-toolbar {
1744
+ background: var(--db-accent-tint);
1745
+ }
1746
+
1747
+ .db-shell[data-theme='light'] .squisq-editor-shell[data-theme='light'] .squisq-toolbar-view-tabs {
1748
+ background: var(--db-gutter-bg);
1749
+ border-right-color: var(--db-border);
1750
+ }
1751
+
1752
+ .db-shell[data-theme='light'] .squisq-editor-shell[data-theme='light'] .squisq-status-bar {
1753
+ background: var(--db-accent-tint-strong);
1754
+ border-top-color: var(--db-border);
1755
+ }
1756
+
1757
+ /* Status bar "✓ OK" indicator — squisq paints this in saturated emerald
1758
+ (#059669 light, #34d399 dark). Re-tone to the sage accent so the
1759
+ parse-status indicator harmonizes with the rest of the chrome. */
1760
+ .db-shell .squisq-status-ok {
1761
+ color: var(--db-accent);
1762
+ }
1763
+
1764
+ .db-shell[data-theme='dark'] .squisq-status-ok {
1765
+ color: var(--db-accent-hover);
1766
+ }
1767
+
1768
+ /* Outline pane (left of the editor) — squisq paints a warm beige
1769
+ (#dcd8d0 light / dark slate in dark mode). Re-tone to `--db-gutter-bg`
1770
+ so it matches the inline-preview gutter on the right and reads as
1771
+ one step lighter than the toolbar above. */
1772
+ .db-shell[data-theme='light'] .squisq-outline {
1773
+ background: var(--db-gutter-bg);
1774
+ color: var(--db-text);
1775
+ }
1776
+
1777
+ .db-shell[data-theme='light'] .squisq-outline-row:hover {
1778
+ background: var(--db-accent-soft-15);
1779
+ }
1780
+
1781
+ .db-shell[data-theme='dark'] .squisq-outline {
1782
+ background: var(--db-gutter-bg);
1783
+ color: var(--db-text);
1784
+ }
1785
+
1786
+ .db-shell[data-theme='dark'] .squisq-outline-row:hover {
1787
+ background: var(--db-accent-soft-15);
1788
+ }
1789
+
1790
+ /* Explicit borders on the canvas side of each chrome pane so the
1791
+ white editor area reads as a clearly-edged "page" rather than
1792
+ blending into the cream gutters. Uses --db-border-strong to match
1793
+ the hairline under the toolbar. */
1794
+ .db-shell .squisq-outline {
1795
+ border-right: 1px solid var(--db-border-strong);
1796
+ }
1797
+
1798
+ .db-shell .squisq-inline-preview-gutter {
1799
+ border-left: 1px solid var(--db-border-strong);
1800
+ }
1801
+
1802
+ /* Monaco's line-number gutter ("editorGutter.background") is set via
1803
+ squisq's JS-side theme registration — those colors can't be CSS
1804
+ variables. To make the gutter blend with the outline/preview chrome
1805
+ on either side, we override the painted bg on `.margin` and its
1806
+ `.margin-view-overlays` child with our --db-gutter-bg. `!important`
1807
+ is required because Monaco inlines the color via the style attribute.
1808
+ The right-edge seam pseudo-element (`.margin::after`) also retones
1809
+ to --db-border so it's a single hairline matching the toolbar's
1810
+ bottom border, not a contrast stripe of its own. */
1811
+ .db-shell .squisq-raw-editor-container .monaco-editor .margin,
1812
+ .db-shell .squisq-raw-editor-container .monaco-editor .margin-view-overlays {
1813
+ background-color: var(--db-gutter-bg) !important;
1814
+ }
1815
+
1816
+ .db-shell .squisq-raw-editor-container .monaco-editor .margin::after {
1817
+ background: var(--db-border);
1818
+ }
1819
+
1820
+ /* Light mode squisq accents */
1821
+ .db-shell[data-theme='light'] .squisq-editor-shell[data-theme='light'] .squisq-view-tab--active,
1822
+ .db-shell[data-theme='light']
1823
+ .squisq-editor-shell[data-theme='light']
1824
+ .squisq-toolbar-view-tab--active {
1825
+ color: var(--db-accent-hover);
1826
+ border-bottom-color: var(--db-accent);
1827
+ }
1828
+
1829
+ .db-shell[data-theme='light']
1830
+ .squisq-editor-shell[data-theme='light']
1831
+ .squisq-toolbar-button--active {
1832
+ background: var(--db-accent-tint);
1833
+ color: var(--db-accent-hover);
1834
+ }
1835
+
1836
+ .db-shell[data-theme='light']
1837
+ .squisq-editor-shell[data-theme='light']
1838
+ .squisq-toolbar-button--active:hover {
1839
+ background: var(--db-accent-tint-strong);
1840
+ color: var(--db-accent-deep);
1841
+ }
1842
+
1843
+ .db-shell[data-theme='light']
1844
+ .squisq-editor-shell[data-theme='light']
1845
+ .squisq-toolbar-overflow-item--active {
1846
+ background: var(--db-accent-tint);
1847
+ color: var(--db-accent-hover);
1848
+ }
1849
+
1850
+ .db-shell[data-theme='light'] .squisq-editor-shell[data-theme='light'] .squisq-wysiwyg-editor a {
1851
+ color: var(--db-accent-hover);
1852
+ }
1853
+
1854
+ .db-shell[data-theme='light']
1855
+ .squisq-editor-shell[data-theme='light']
1856
+ .squisq-wysiwyg-editor
1857
+ .column-resize-handle {
1858
+ background: var(--db-accent);
1859
+ }
1860
+
1861
+ .db-shell[data-theme='light']
1862
+ .squisq-editor-shell[data-theme='light']
1863
+ .squisq-wysiwyg-editor
1864
+ .selectedCell::after {
1865
+ background: var(--db-accent-soft-12);
1866
+ }
1867
+
1868
+ /* Version history popover — DocBlocks-specific overrides.
1869
+ The upstream squisq popover uses Tailwind's slate-blue palette
1870
+ (#1f2937 bg, #374151 border, #2563eb selection). Inside DocBlocks we
1871
+ want the same dark surface used by the rest of the shell (--db-bg /
1872
+ --db-border). Selected rows pick up the sage accent at low alpha. */
1873
+ .db-shell .squisq-version-history-row--selected {
1874
+ background: var(--db-accent-soft-15);
1875
+ }
1876
+
1877
+ .db-shell[data-theme='dark'] .squisq-version-history-row--selected {
1878
+ background: var(--db-accent-soft-25);
1879
+ }
1880
+
1881
+ .db-shell[data-theme='dark'] .squisq-version-history-popover {
1882
+ background: var(--db-bg);
1883
+ border-color: var(--db-border);
1884
+ color: var(--db-text);
1885
+ }
1886
+
1887
+ .db-shell[data-theme='dark'] .squisq-version-history-header,
1888
+ .db-shell[data-theme='dark'] .squisq-version-history-diff-header,
1889
+ .db-shell[data-theme='dark']
1890
+ .squisq-version-history-popover--with-diff
1891
+ .squisq-version-history-list-pane,
1892
+ .db-shell[data-theme='dark'] .squisq-version-history-row--current {
1893
+ border-color: var(--db-border);
1894
+ }
1895
+
1896
+ .db-shell[data-theme='dark'] .squisq-version-history-row:hover {
1897
+ background: var(--db-bg-hover);
1898
+ }
1899
+
1900
+ /* ── Save toast ──────────────────────────────────────────────
1901
+ Comfort-blanket flyover triggered by Ctrl/Cmd+S. Files are
1902
+ already autosaved on every keystroke; this just confirms it
1903
+ so muscle-memory savers feel at ease. */
1904
+
1905
+ /* ── Welcome gateway ─────────────────────────────────────────── */
1906
+ /* One-time first-run callout floated over the welcome doc's Play
1907
+ view. Names the mode the user landed in and offers a one-click
1908
+ path into the editor. Dismissed forever via localStorage. */
1909
+
1910
+ .db-welcome-gateway {
1911
+ position: absolute;
1912
+ bottom: 56px;
1913
+ left: 50%;
1914
+ transform: translateX(-50%);
1915
+ z-index: 60;
1916
+ display: flex;
1917
+ align-items: center;
1918
+ gap: 12px;
1919
+ max-width: min(640px, calc(100% - 32px));
1920
+ padding: 10px 10px 10px 16px;
1921
+ background: var(--db-bg);
1922
+ border: 1px solid var(--db-border-strong);
1923
+ border-radius: 10px;
1924
+ box-shadow: 0 10px 32px var(--db-shadow);
1925
+ color: var(--db-text);
1926
+ font-size: 13px;
1927
+ line-height: 1.45;
1928
+ animation: db-welcome-gateway-in 0.4s ease-out;
1929
+ }
1930
+
1931
+ .db-welcome-gateway-cta {
1932
+ flex-shrink: 0;
1933
+ padding: 6px 14px;
1934
+ font-size: 13px;
1935
+ font-weight: 600;
1936
+ background: var(--db-accent);
1937
+ color: var(--db-bg);
1938
+ border: none;
1939
+ border-radius: 6px;
1940
+ cursor: pointer;
1941
+ white-space: nowrap;
1942
+ }
1943
+
1944
+ .db-welcome-gateway-cta:hover {
1945
+ background: var(--db-accent-hover);
1946
+ }
1947
+
1948
+ .db-welcome-gateway-dismiss {
1949
+ flex-shrink: 0;
1950
+ display: inline-flex;
1951
+ align-items: center;
1952
+ justify-content: center;
1953
+ width: 26px;
1954
+ height: 26px;
1955
+ font-size: 16px;
1956
+ line-height: 1;
1957
+ background: transparent;
1958
+ color: var(--db-text-muted);
1959
+ border: none;
1960
+ border-radius: 6px;
1961
+ cursor: pointer;
1962
+ }
1963
+
1964
+ .db-welcome-gateway-dismiss:hover {
1965
+ background: var(--db-bg-hover);
1966
+ color: var(--db-text);
1967
+ }
1968
+
1969
+ @keyframes db-welcome-gateway-in {
1970
+ from {
1971
+ opacity: 0;
1972
+ transform: translate(-50%, 8px);
1973
+ }
1974
+ to {
1975
+ opacity: 1;
1976
+ transform: translate(-50%, 0);
1977
+ }
1978
+ }
1979
+
1980
+ .db-save-toast {
1981
+ position: fixed;
1982
+ bottom: 32px;
1983
+ left: 50%;
1984
+ transform: translateX(-50%);
1985
+ z-index: 200;
1986
+ padding: 8px 16px;
1987
+ font-size: 13px;
1988
+ line-height: 1.4;
1989
+ color: #fff;
1990
+ background: rgba(31, 41, 55, 0.92);
1991
+ border-radius: 6px;
1992
+ box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
1993
+ pointer-events: none;
1994
+ animation: db-save-toast-fade 1.8s ease-out forwards;
1995
+ }
1996
+
1997
+ .db-shell[data-theme='light'] .db-save-toast {
1998
+ background: rgba(17, 24, 39, 0.88);
1999
+ }
2000
+
2001
+ @keyframes db-save-toast-fade {
2002
+ 0% {
2003
+ opacity: 0;
2004
+ transform: translate(-50%, 6px);
2005
+ }
2006
+ 10% {
2007
+ opacity: 1;
2008
+ transform: translate(-50%, 0);
2009
+ }
2010
+ 80% {
2011
+ opacity: 1;
2012
+ transform: translate(-50%, 0);
2013
+ }
2014
+ 100% {
2015
+ opacity: 0;
2016
+ transform: translate(-50%, -4px);
2017
+ }
1076
2018
  }