@bendyline/docblocks-react 2.2.1 → 2.3.0

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.
@@ -194,10 +194,153 @@
194
194
  }
195
195
 
196
196
  .db-explorer-actions {
197
+ display: flex;
198
+ align-items: center;
199
+ gap: 2px;
200
+ }
201
+
202
+ .db-explorer-sort-actions {
197
203
  display: flex;
198
204
  gap: 2px;
199
205
  }
200
206
 
207
+ .db-explorer-action-divider {
208
+ width: 1px;
209
+ height: 16px;
210
+ margin: 0 2px;
211
+ background: var(--db-border-strong);
212
+ }
213
+
214
+ .db-pinned-documents {
215
+ display: flex;
216
+ flex-direction: column;
217
+ flex: 0 1 auto;
218
+ min-height: 0;
219
+ max-height: 38%;
220
+ overflow: hidden;
221
+ border-bottom: 1px solid var(--db-border-strong);
222
+ background: var(--db-bg-subtle);
223
+ }
224
+
225
+ .db-pinned-documents-title {
226
+ display: flex;
227
+ align-items: center;
228
+ gap: 6px;
229
+ margin: 0;
230
+ padding: 8px 10px 5px;
231
+ }
232
+
233
+ .db-pinned-documents-title i {
234
+ font-size: 10px;
235
+ }
236
+
237
+ .db-pinned-document-list {
238
+ min-height: 0;
239
+ overflow-y: auto;
240
+ padding: 0 0 4px;
241
+ scrollbar-color: var(--db-accent) var(--db-bg-subtle);
242
+ scrollbar-width: thin;
243
+ }
244
+
245
+ .db-pinned-document-row {
246
+ position: relative;
247
+ display: flex;
248
+ align-items: stretch;
249
+ }
250
+
251
+ .db-pinned-document {
252
+ display: flex;
253
+ align-items: center;
254
+ flex: 1;
255
+ gap: 7px;
256
+ min-width: 0;
257
+ padding: 6px 4px 6px 10px;
258
+ border: 0;
259
+ background: transparent;
260
+ color: var(--db-text);
261
+ font: inherit;
262
+ text-align: left;
263
+ cursor: pointer;
264
+ }
265
+
266
+ .db-pinned-document-row:hover,
267
+ .db-pinned-document-row:has(:focus-visible) {
268
+ background: var(--db-bg-hover);
269
+ }
270
+
271
+ .db-pinned-document:focus-visible {
272
+ outline: 2px solid var(--db-focus);
273
+ outline-offset: -2px;
274
+ }
275
+
276
+ .db-pinned-document-row--selected,
277
+ .db-pinned-document-row--selected:hover,
278
+ .db-pinned-document-row--selected:has(:focus-visible) {
279
+ --db-focus: #ffffff;
280
+ background: var(--db-bg-selected);
281
+ color: var(--db-text-on-selected);
282
+ }
283
+
284
+ .db-pinned-document-more {
285
+ display: flex;
286
+ align-items: center;
287
+ justify-content: center;
288
+ flex: 0 0 30px;
289
+ min-width: 30px;
290
+ border: 0;
291
+ background: transparent;
292
+ color: inherit;
293
+ cursor: pointer;
294
+ opacity: 0.72;
295
+ }
296
+
297
+ .db-pinned-document-more:hover,
298
+ .db-pinned-document-more--active {
299
+ opacity: 1;
300
+ }
301
+
302
+ .db-pinned-document-more:focus-visible {
303
+ outline: 2px solid var(--db-focus);
304
+ outline-offset: -2px;
305
+ }
306
+
307
+ .db-pinned-document-heading {
308
+ min-width: 0;
309
+ display: flex;
310
+ flex: 1;
311
+ align-items: baseline;
312
+ gap: 6px;
313
+ }
314
+
315
+ .db-pinned-document-name {
316
+ flex: 1;
317
+ min-width: 0;
318
+ overflow: hidden;
319
+ text-overflow: ellipsis;
320
+ white-space: nowrap;
321
+ }
322
+
323
+ .db-pinned-document-missing {
324
+ flex: 0 0 auto;
325
+ color: var(--db-danger);
326
+ font-size: 11px;
327
+ }
328
+
329
+ .db-pinned-document-row--selected .db-pinned-document-missing {
330
+ color: inherit;
331
+ opacity: 0.82;
332
+ }
333
+
334
+ .db-pinned-document-error {
335
+ position: absolute;
336
+ z-index: 1;
337
+ top: 100%;
338
+ right: 4px;
339
+ left: 4px;
340
+ margin: 0;
341
+ background: var(--db-bg);
342
+ }
343
+
201
344
  .db-explorer-btn {
202
345
  width: 24px;
203
346
  height: 24px;
@@ -220,6 +363,23 @@
220
363
  color: var(--db-text-secondary);
221
364
  }
222
365
 
366
+ .db-explorer-btn[aria-pressed='true'] {
367
+ background: var(--db-bg-selected);
368
+ border-color: var(--db-bg-selected);
369
+ color: var(--db-text-on-selected);
370
+ }
371
+
372
+ .db-explorer-btn[aria-pressed='true']:hover:not(:disabled) {
373
+ background: var(--db-bg-selected-hover);
374
+ border-color: var(--db-bg-selected-hover);
375
+ color: var(--db-text-on-selected);
376
+ }
377
+
378
+ .db-explorer-btn:focus-visible {
379
+ outline: 2px solid var(--db-focus);
380
+ outline-offset: 1px;
381
+ }
382
+
223
383
  .db-explorer-btn:disabled {
224
384
  cursor: default;
225
385
  opacity: 0.55;
@@ -411,6 +571,34 @@
411
571
  flex: 1;
412
572
  overflow-y: auto;
413
573
  padding: 2px 0;
574
+ scrollbar-color: var(--db-accent) var(--db-bg);
575
+ scrollbar-width: thin;
576
+ }
577
+
578
+ .db-tree::-webkit-scrollbar {
579
+ width: 12px;
580
+ }
581
+
582
+ .db-tree::-webkit-scrollbar-track,
583
+ .db-tree::-webkit-scrollbar-corner {
584
+ background: var(--db-bg);
585
+ }
586
+
587
+ .db-tree::-webkit-scrollbar-thumb {
588
+ min-height: 32px;
589
+ background: var(--db-accent);
590
+ border: 3px solid var(--db-bg);
591
+ border-radius: 999px;
592
+ }
593
+
594
+ .db-tree::-webkit-scrollbar-thumb:hover {
595
+ background: var(--db-accent-hover);
596
+ }
597
+
598
+ .db-tree::-webkit-scrollbar-button {
599
+ display: none;
600
+ width: 0;
601
+ height: 0;
414
602
  }
415
603
 
416
604
  .db-tree-loading,
@@ -429,6 +617,10 @@
429
617
  font-size: 12px;
430
618
  }
431
619
 
620
+ .db-tree-error--child {
621
+ margin-left: 24px;
622
+ }
623
+
432
624
  .db-tree-error-retry {
433
625
  border: 0;
434
626
  padding: 0;
@@ -514,6 +706,23 @@
514
706
  text-overflow: ellipsis;
515
707
  }
516
708
 
709
+ .db-tree-last-modified {
710
+ width: 72px;
711
+ flex-shrink: 0;
712
+ margin-left: 8px;
713
+ overflow: hidden;
714
+ color: var(--db-text-secondary);
715
+ font-size: 11px;
716
+ font-variant-numeric: tabular-nums;
717
+ text-align: right;
718
+ text-overflow: ellipsis;
719
+ }
720
+
721
+ .db-tree-row--selected .db-tree-last-modified,
722
+ .db-tree-row--drop-target .db-tree-last-modified {
723
+ color: inherit;
724
+ }
725
+
517
726
  .db-tree-rename-input {
518
727
  flex: 1;
519
728
  padding: 1px 4px;
@@ -555,11 +764,18 @@
555
764
 
556
765
  .db-tree-row:hover .db-tree-more,
557
766
  .db-tree-row:focus-within .db-tree-more,
767
+ .db-tree-row--selected .db-tree-more,
558
768
  .db-tree-more:focus-visible,
559
769
  .db-tree-more--active {
560
770
  visibility: visible;
561
771
  }
562
772
 
773
+ @media (hover: none), (pointer: coarse) {
774
+ .db-tree-more {
775
+ visibility: visible;
776
+ }
777
+ }
778
+
563
779
  .db-tree-more:hover {
564
780
  background: var(--db-bg-hover);
565
781
  color: var(--db-text);
@@ -1173,15 +1389,13 @@ body.db-resizing-sidebar * {
1173
1389
  }
1174
1390
 
1175
1391
  .db-shell-sidebar-footer-action {
1176
- min-width: 0;
1392
+ flex-shrink: 0;
1177
1393
  padding: 0;
1178
- overflow: hidden;
1179
1394
  border: 0;
1180
1395
  background: transparent;
1181
1396
  font: inherit;
1182
1397
  line-height: inherit;
1183
1398
  text-decoration: underline;
1184
- text-overflow: ellipsis;
1185
1399
  white-space: nowrap;
1186
1400
  cursor: pointer;
1187
1401
  }
@@ -1652,7 +1866,7 @@ body.db-resizing-sidebar * {
1652
1866
  }
1653
1867
 
1654
1868
  .db-settings-fieldset + .db-settings-fieldset {
1655
- margin-top: 20px;
1869
+ margin-top: 16px;
1656
1870
  }
1657
1871
 
1658
1872
  .db-settings-legend {
@@ -1694,6 +1908,16 @@ body.db-resizing-sidebar * {
1694
1908
  accent-color: var(--db-accent);
1695
1909
  }
1696
1910
 
1911
+ .db-settings-radio-row {
1912
+ display: flex;
1913
+ flex-wrap: wrap;
1914
+ gap: 8px 20px;
1915
+ }
1916
+
1917
+ .db-settings-radio--inline {
1918
+ padding: 2px 0;
1919
+ }
1920
+
1697
1921
  .db-settings-checkbox {
1698
1922
  display: flex;
1699
1923
  align-items: center;
@@ -1741,6 +1965,188 @@ body.db-resizing-sidebar * {
1741
1965
  cursor: pointer;
1742
1966
  }
1743
1967
 
1968
+ .db-settings-select {
1969
+ display: flex;
1970
+ flex-direction: column;
1971
+ gap: 6px;
1972
+ margin-top: 14px;
1973
+ color: var(--db-text);
1974
+ font-size: 13px;
1975
+ }
1976
+
1977
+ .db-settings-select-header {
1978
+ display: flex;
1979
+ align-items: baseline;
1980
+ justify-content: space-between;
1981
+ gap: 16px;
1982
+ }
1983
+
1984
+ .db-settings-select-input {
1985
+ width: 100%;
1986
+ padding: 6px 8px;
1987
+ font: inherit;
1988
+ font-size: 13px;
1989
+ background: var(--db-bg-subtle);
1990
+ color: var(--db-text);
1991
+ border: 1px solid var(--db-input-border);
1992
+ border-radius: 4px;
1993
+ outline: none;
1994
+ cursor: pointer;
1995
+ appearance: auto;
1996
+ }
1997
+
1998
+ .db-settings-select-input:focus-visible {
1999
+ border-color: var(--db-accent);
2000
+ }
2001
+
2002
+ .db-font-picker {
2003
+ position: relative;
2004
+ }
2005
+
2006
+ .db-font-picker-trigger {
2007
+ display: flex;
2008
+ align-items: center;
2009
+ gap: 12px;
2010
+ box-sizing: border-box;
2011
+ width: 100%;
2012
+ min-height: 54px;
2013
+ padding: 7px 10px 7px 12px;
2014
+ overflow: hidden;
2015
+ border: 1px solid var(--db-input-border);
2016
+ border-radius: 5px;
2017
+ outline: none;
2018
+ background: var(--db-bg-subtle);
2019
+ color: var(--db-text);
2020
+ text-align: left;
2021
+ cursor: pointer;
2022
+ }
2023
+
2024
+ .db-font-picker-trigger:hover,
2025
+ .db-font-picker-trigger[aria-expanded='true'] {
2026
+ background: var(--db-bg-hover);
2027
+ }
2028
+
2029
+ .db-font-picker-trigger:focus-visible {
2030
+ border-color: var(--db-accent);
2031
+ box-shadow: 0 0 0 1px var(--db-accent);
2032
+ }
2033
+
2034
+ .db-font-picker-caret {
2035
+ flex: 0 0 auto;
2036
+ width: 7px;
2037
+ height: 7px;
2038
+ margin: 0 3px 3px 0;
2039
+ border-right: 2px solid currentColor;
2040
+ border-bottom: 2px solid currentColor;
2041
+ color: var(--db-text-muted);
2042
+ transform: rotate(45deg);
2043
+ transition: transform 120ms ease;
2044
+ }
2045
+
2046
+ .db-font-picker-caret--open {
2047
+ margin-top: 5px;
2048
+ transform: rotate(225deg);
2049
+ }
2050
+
2051
+ .db-font-picker-menu {
2052
+ position: fixed;
2053
+ z-index: 3100;
2054
+ box-sizing: border-box;
2055
+ padding: 5px;
2056
+ overflow-y: auto;
2057
+ overscroll-behavior: contain;
2058
+ border: 1px solid var(--db-border-strong);
2059
+ border-radius: 6px;
2060
+ outline: none;
2061
+ background: var(--db-bg);
2062
+ color: var(--db-text);
2063
+ box-shadow: 0 10px 28px var(--db-shadow);
2064
+ }
2065
+
2066
+ .db-font-picker-group {
2067
+ padding: 10px 10px 4px;
2068
+ color: var(--db-text-muted);
2069
+ font:
2070
+ 600 10px/1.2 system-ui,
2071
+ -apple-system,
2072
+ 'Segoe UI',
2073
+ sans-serif;
2074
+ letter-spacing: 0.065em;
2075
+ text-transform: uppercase;
2076
+ }
2077
+
2078
+ .db-font-picker-option {
2079
+ display: flex;
2080
+ align-items: center;
2081
+ gap: 12px;
2082
+ min-height: 50px;
2083
+ padding: 6px 9px 6px 11px;
2084
+ border-radius: 4px;
2085
+ color: var(--db-text);
2086
+ cursor: pointer;
2087
+ user-select: none;
2088
+ }
2089
+
2090
+ .db-font-picker-option--active {
2091
+ background: var(--db-bg-hover);
2092
+ }
2093
+
2094
+ .db-font-picker-option--selected {
2095
+ background: var(--db-accent-soft-12);
2096
+ }
2097
+
2098
+ .db-font-picker-option--selected.db-font-picker-option--active {
2099
+ background: var(--db-accent-soft-25);
2100
+ }
2101
+
2102
+ .db-font-picker-preview {
2103
+ display: flex;
2104
+ flex: 1 1 auto;
2105
+ flex-direction: column;
2106
+ min-width: 0;
2107
+ line-height: 1.2;
2108
+ }
2109
+
2110
+ .db-font-picker-heading,
2111
+ .db-font-picker-body {
2112
+ overflow: hidden;
2113
+ text-overflow: ellipsis;
2114
+ white-space: nowrap;
2115
+ }
2116
+
2117
+ .db-font-picker-heading {
2118
+ color: var(--db-text);
2119
+ font-size: 16px;
2120
+ font-weight: 650;
2121
+ }
2122
+
2123
+ .db-font-picker-body {
2124
+ margin-top: 3px;
2125
+ color: var(--db-text-secondary);
2126
+ font-size: 12px;
2127
+ font-weight: 400;
2128
+ }
2129
+
2130
+ .db-font-picker-preview--compact .db-font-picker-heading {
2131
+ font-size: 15px;
2132
+ }
2133
+
2134
+ .db-font-picker-preview--compact .db-font-picker-body {
2135
+ color: var(--db-text-muted);
2136
+ font-size: 11px;
2137
+ }
2138
+
2139
+ .db-font-picker-check {
2140
+ flex: 0 0 18px;
2141
+ color: var(--db-accent-deep);
2142
+ font:
2143
+ 700 14px/1 system-ui,
2144
+ -apple-system,
2145
+ 'Segoe UI',
2146
+ sans-serif;
2147
+ text-align: center;
2148
+ }
2149
+
1744
2150
  .db-settings-accent-grid {
1745
2151
  display: grid;
1746
2152
  grid-template-columns: repeat(auto-fit, minmax(104px, 1fr));
@@ -2058,6 +2464,15 @@ body.db-resizing-sidebar * {
2058
2464
  padding: 4px 0;
2059
2465
  }
2060
2466
 
2467
+ .db-export-toolbar-menu-dropdown {
2468
+ max-width: min(720px, calc(100vw - 16px));
2469
+ }
2470
+
2471
+ .db-export-toolbar-menu-dropdown .db-toolbar-menu-item {
2472
+ overflow: hidden;
2473
+ text-overflow: ellipsis;
2474
+ }
2475
+
2061
2476
  .db-toolbar-menu-item {
2062
2477
  display: block;
2063
2478
  width: 100%;
@@ -2392,11 +2807,90 @@ body.db-resizing-sidebar * {
2392
2807
  background: var(--db-editor-canvas);
2393
2808
  }
2394
2809
 
2395
- /* Bind Squisq's host-facing accent to the active DocBlocks appearance. */
2810
+ /* Bind Squisq's host-facing accent to the active DocBlocks appearance.
2811
+ RawEditor uses the editor background/foreground variables for its
2812
+ textarea while Monaco's first lazy load is in flight. Define them here so
2813
+ Source view never paints Squisq's light fallback before the requested
2814
+ Monaco theme is ready. */
2396
2815
  .db-shell .squisq-editor-shell {
2397
2816
  --squisq-accent: var(--db-accent);
2398
2817
  --squisq-accent-hover: var(--db-accent-hover);
2399
2818
  --squisq-text-on-accent: var(--db-text-on-accent);
2819
+ --squisq-editor-background: #ffffff;
2820
+ --squisq-editor-foreground: #1f2937;
2821
+ }
2822
+
2823
+ /* Squisq's segmented mode controls otherwise retain their standalone
2824
+ slate/blue palette. Bind the control surface and every interaction state
2825
+ to the active DocBlocks appearance and accent. */
2826
+ .db-shell .squisq-editor-shell .squisq-preview-seg {
2827
+ background: var(--db-bg);
2828
+ border-color: var(--db-border);
2829
+ }
2830
+
2831
+ .db-shell .squisq-editor-shell .squisq-preview-seg-btn {
2832
+ border-left-color: var(--db-border);
2833
+ color: var(--db-text-secondary);
2834
+ }
2835
+
2836
+ .db-shell .squisq-editor-shell .squisq-preview-seg-btn:hover {
2837
+ background: var(--db-bg-hover);
2838
+ color: var(--db-text);
2839
+ }
2840
+
2841
+ .db-shell .squisq-editor-shell .squisq-preview-seg-btn--active {
2842
+ background: var(--db-accent);
2843
+ color: var(--db-text-on-accent);
2844
+ }
2845
+
2846
+ .db-shell .squisq-editor-shell .squisq-preview-seg-btn--active:hover {
2847
+ background: var(--db-accent-hover);
2848
+ color: var(--db-text-on-accent);
2849
+ }
2850
+
2851
+ .db-shell .squisq-editor-shell .squisq-preview-seg-btn:focus-visible {
2852
+ position: relative;
2853
+ z-index: 1;
2854
+ outline: 2px solid var(--db-focus, var(--db-accent));
2855
+ outline-offset: -2px;
2856
+ }
2857
+
2858
+ .db-shell .squisq-editor-shell[data-theme='dark'] {
2859
+ /* Match Monaco's built-in vs-dark canvas exactly so replacing the loading
2860
+ textarea with Monaco does not introduce a second, subtler color flash. */
2861
+ --squisq-editor-background: #1e1e1e;
2862
+ --squisq-editor-foreground: #d4d4d4;
2863
+ }
2864
+
2865
+ /* The Write-canvas font picker is an explicit host preference, so its
2866
+ variables must beat the active document theme in Write mode. Squisq's base
2867
+ stylesheet intentionally puts theme fonts first; reverse that order only
2868
+ inside the DocBlocks shell. When "Inherit from theme" is selected the Write
2869
+ variables are absent, and these declarations fall straight through to the
2870
+ same theme title/body fonts as before. */
2871
+ .db-shell .squisq-editor-shell .squisq-wysiwyg-editor {
2872
+ font-family: var(--squisq-write-body-font, var(--squisq-theme-body-font, inherit));
2873
+ }
2874
+
2875
+ .db-shell .squisq-editor-shell .squisq-wysiwyg-editor h1,
2876
+ .db-shell .squisq-editor-shell .squisq-wysiwyg-editor h2,
2877
+ .db-shell .squisq-editor-shell .squisq-wysiwyg-editor h3,
2878
+ .db-shell .squisq-editor-shell .squisq-wysiwyg-editor h4,
2879
+ .db-shell .squisq-editor-shell .squisq-wysiwyg-editor h5,
2880
+ .db-shell .squisq-editor-shell .squisq-wysiwyg-editor h6 {
2881
+ font-family: var(
2882
+ --squisq-write-header-font,
2883
+ var(
2884
+ --squisq-write-body-font,
2885
+ var(--squisq-theme-title-font, var(--squisq-theme-body-font, inherit))
2886
+ )
2887
+ );
2888
+ }
2889
+
2890
+ /* Squisq's default horizontal rule uses a fixed slate border in both
2891
+ appearances. Keep document rules aligned with the selected host accent. */
2892
+ .db-shell .squisq-editor-shell .squisq-wysiwyg-editor hr {
2893
+ border-top-color: var(--db-accent);
2400
2894
  }
2401
2895
 
2402
2896
  /* Simple diagrams, drawings, and layout canvases share Squisq's Scene
@@ -4064,6 +4558,46 @@ html:has(.db-shell[data-theme='dark'])
4064
4558
  border-color: var(--db-border);
4065
4559
  }
4066
4560
 
4561
+ /* View menu. Squisq's dark appearance otherwise replaces its generic
4562
+ variables with a fixed slate-blue palette. Keep the popover and its
4563
+ controls on the same host palette as the DocBlocks app and overflow
4564
+ menus, including the native radio/checkbox selection color. */
4565
+ .db-shell .squisq-editor-shell .squisq-view-menu-popover {
4566
+ background: var(--db-bg);
4567
+ border-color: var(--db-border);
4568
+ box-shadow: 0 4px 12px var(--db-shadow);
4569
+ color: var(--db-text-secondary);
4570
+ }
4571
+
4572
+ .db-shell .squisq-editor-shell .squisq-view-menu-row:hover,
4573
+ .db-shell .squisq-editor-shell .squisq-view-menu-radio-row:hover {
4574
+ background: var(--db-bg-hover);
4575
+ }
4576
+
4577
+ .db-shell .squisq-editor-shell .squisq-view-menu-row--select:hover,
4578
+ .db-shell .squisq-editor-shell .squisq-view-menu-row--radios:hover {
4579
+ background: transparent;
4580
+ }
4581
+
4582
+ .db-shell .squisq-editor-shell .squisq-view-menu-row--select .squisq-view-menu-label,
4583
+ .db-shell .squisq-editor-shell .squisq-view-menu-row--radios > .squisq-view-menu-label {
4584
+ color: var(--db-text-muted);
4585
+ }
4586
+
4587
+ .db-shell .squisq-editor-shell .squisq-view-menu-select {
4588
+ background: var(--db-bg-subtle);
4589
+ border-color: var(--db-border);
4590
+ color: var(--db-text-secondary);
4591
+ }
4592
+
4593
+ .db-shell .squisq-editor-shell .squisq-view-menu-separator {
4594
+ background: var(--db-border);
4595
+ }
4596
+
4597
+ .db-shell .squisq-editor-shell :is(.squisq-view-menu-checkbox, .squisq-view-menu-radio) {
4598
+ accent-color: var(--db-accent);
4599
+ }
4600
+
4067
4601
  /* Monaco's line-number gutter ("editorGutter.background") is set via
4068
4602
  squisq's JS-side theme registration — those colors can't be CSS
4069
4603
  variables. To make the gutter blend with the outline/preview chrome
@@ -4457,6 +4991,7 @@ html:has(.db-shell[data-theme='dark'])
4457
4991
  .db-dialog--wide {
4458
4992
  width: 560px;
4459
4993
  max-width: 100%;
4994
+ max-height: min(calc(100dvh - 32px), 660px);
4460
4995
  }
4461
4996
 
4462
4997
  .db-dialog--full {