foss-design 0.9.10 → 0.9.12
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/dist/cli.js +622 -382
- package/dist/runtime/index.js +27 -0
- package/dist/viewer/assets/index-BUDcnDgZ.css +2 -0
- package/dist/viewer/assets/index-Cm4CEv8V.js +159 -0
- package/dist/viewer/index.html +2 -2
- package/dist/viewer-lib/index.js +7947 -7209
- package/dist/viewer-lib/styles.css +200 -17
- package/dist/viewer-lib/types/src/shared/types.d.ts +17 -0
- package/dist/viewer-lib/types/viewer/src/app.d.ts +8 -1
- package/dist/viewer-lib/types/viewer/src/components/corner-plate.d.ts +21 -0
- package/dist/viewer-lib/types/viewer/src/components/error-boundary.d.ts +5 -0
- package/dist/viewer-lib/types/viewer/src/components/markdown.d.ts +4 -1
- package/dist/viewer-lib/types/viewer/src/lib/frames.d.ts +10 -2
- package/dist/viewer-lib/types/viewer/src/lib/messages.d.ts +12 -0
- package/dist/viewer-lib/types/viewer/src/lib/viewer.d.ts +17 -0
- package/dist/viewer-lib/types/viewer/src/library.d.ts +5 -1
- package/dist/viewer-lib/types/viewer/src/pages/canvas/canvas-bar.d.ts +2 -2
- package/dist/viewer-lib/types/viewer/src/pages/canvas/full-page.d.ts +1 -1
- package/dist/viewer-lib/types/viewer/src/pages/canvas/layout.d.ts +2 -0
- package/dist/viewer-lib/types/viewer/src/ui/combobox.d.ts +25 -0
- package/dist/viewer-lib/types/viewer/src/ui/copy-button.d.ts +7 -0
- package/dist/viewer-lib/types/viewer/src/ui/dialog.d.ts +7 -2
- package/dist/viewer-lib/types/viewer/src/ui/icon-paths.d.ts +1 -0
- package/package.json +1 -1
- package/dist/viewer/assets/index-DKqmJSbn.js +0 -158
- package/dist/viewer/assets/index-DnxkAHbH.css +0 -2
|
@@ -42,6 +42,15 @@
|
|
|
42
42
|
--tw-drop-shadow-color: initial;
|
|
43
43
|
--tw-drop-shadow-alpha: 100%;
|
|
44
44
|
--tw-drop-shadow-size: initial;
|
|
45
|
+
--tw-backdrop-blur: initial;
|
|
46
|
+
--tw-backdrop-brightness: initial;
|
|
47
|
+
--tw-backdrop-contrast: initial;
|
|
48
|
+
--tw-backdrop-grayscale: initial;
|
|
49
|
+
--tw-backdrop-hue-rotate: initial;
|
|
50
|
+
--tw-backdrop-invert: initial;
|
|
51
|
+
--tw-backdrop-opacity: initial;
|
|
52
|
+
--tw-backdrop-saturate: initial;
|
|
53
|
+
--tw-backdrop-sepia: initial;
|
|
45
54
|
--tw-duration: initial;
|
|
46
55
|
--tw-ease: initial;
|
|
47
56
|
}
|
|
@@ -58,11 +67,14 @@
|
|
|
58
67
|
--font-weight-semibold: 600;
|
|
59
68
|
--tracking-wide: .025em;
|
|
60
69
|
--leading-tight: 1.25;
|
|
70
|
+
--leading-snug: 1.375;
|
|
61
71
|
--ease-in: cubic-bezier(.4, 0, 1, 1);
|
|
62
72
|
--ease-out: cubic-bezier(0, 0, .2, 1);
|
|
63
73
|
--ease-in-out: cubic-bezier(.4, 0, .2, 1);
|
|
64
74
|
--animate-spin: spin 1s linear infinite;
|
|
65
75
|
--animate-pulse: pulse 2s cubic-bezier(.4, 0, .6, 1) infinite;
|
|
76
|
+
--blur-sm: 8px;
|
|
77
|
+
--blur-md: 12px;
|
|
66
78
|
--default-transition-duration: .15s;
|
|
67
79
|
--default-transition-timing-function: cubic-bezier(.4, 0, .2, 1);
|
|
68
80
|
--default-font-family: "IBM Plex Sans", system-ui, sans-serif;
|
|
@@ -406,6 +418,10 @@
|
|
|
406
418
|
pointer-events: none;
|
|
407
419
|
}
|
|
408
420
|
|
|
421
|
+
.invisible {
|
|
422
|
+
visibility: hidden;
|
|
423
|
+
}
|
|
424
|
+
|
|
409
425
|
.visible {
|
|
410
426
|
visibility: visible;
|
|
411
427
|
}
|
|
@@ -442,6 +458,10 @@
|
|
|
442
458
|
position: sticky;
|
|
443
459
|
}
|
|
444
460
|
|
|
461
|
+
.-inset-px {
|
|
462
|
+
inset: -1px;
|
|
463
|
+
}
|
|
464
|
+
|
|
445
465
|
.inset-0 {
|
|
446
466
|
inset: 0;
|
|
447
467
|
}
|
|
@@ -450,6 +470,10 @@
|
|
|
450
470
|
inset-inline: 0;
|
|
451
471
|
}
|
|
452
472
|
|
|
473
|
+
.inset-x-5 {
|
|
474
|
+
inset-inline: calc(var(--spacing) * 5);
|
|
475
|
+
}
|
|
476
|
+
|
|
453
477
|
.inset-x-6 {
|
|
454
478
|
inset-inline: calc(var(--spacing) * 6);
|
|
455
479
|
}
|
|
@@ -470,6 +494,10 @@
|
|
|
470
494
|
top: 50%;
|
|
471
495
|
}
|
|
472
496
|
|
|
497
|
+
.top-3 {
|
|
498
|
+
top: calc(var(--spacing) * 3);
|
|
499
|
+
}
|
|
500
|
+
|
|
473
501
|
.top-4 {
|
|
474
502
|
top: calc(var(--spacing) * 4);
|
|
475
503
|
}
|
|
@@ -482,6 +510,10 @@
|
|
|
482
510
|
top: 52px;
|
|
483
511
|
}
|
|
484
512
|
|
|
513
|
+
.right-3 {
|
|
514
|
+
right: calc(var(--spacing) * 3);
|
|
515
|
+
}
|
|
516
|
+
|
|
485
517
|
.right-4 {
|
|
486
518
|
right: calc(var(--spacing) * 4);
|
|
487
519
|
}
|
|
@@ -502,6 +534,10 @@
|
|
|
502
534
|
bottom: calc(var(--spacing) * 5);
|
|
503
535
|
}
|
|
504
536
|
|
|
537
|
+
.bottom-full {
|
|
538
|
+
bottom: 100%;
|
|
539
|
+
}
|
|
540
|
+
|
|
505
541
|
.left-0 {
|
|
506
542
|
left: 0;
|
|
507
543
|
}
|
|
@@ -871,6 +907,10 @@
|
|
|
871
907
|
max-height: min(56vh, 520px);
|
|
872
908
|
}
|
|
873
909
|
|
|
910
|
+
.max-h-\[min\(296px\,var\(--radix-popover-content-available-height\)\)\] {
|
|
911
|
+
max-height: min(296px, var(--radix-popover-content-available-height));
|
|
912
|
+
}
|
|
913
|
+
|
|
874
914
|
.max-h-\[min\(560px\,76vh\)\] {
|
|
875
915
|
max-height: min(560px, 76vh);
|
|
876
916
|
}
|
|
@@ -891,6 +931,10 @@
|
|
|
891
931
|
min-height: 38px;
|
|
892
932
|
}
|
|
893
933
|
|
|
934
|
+
.min-h-\[44px\] {
|
|
935
|
+
min-height: 44px;
|
|
936
|
+
}
|
|
937
|
+
|
|
894
938
|
.min-h-\[46px\] {
|
|
895
939
|
min-height: 46px;
|
|
896
940
|
}
|
|
@@ -917,6 +961,10 @@
|
|
|
917
961
|
}
|
|
918
962
|
}
|
|
919
963
|
|
|
964
|
+
.w-4 {
|
|
965
|
+
width: calc(var(--spacing) * 4);
|
|
966
|
+
}
|
|
967
|
+
|
|
920
968
|
.w-5 {
|
|
921
969
|
width: calc(var(--spacing) * 5);
|
|
922
970
|
}
|
|
@@ -1005,6 +1053,10 @@
|
|
|
1005
1053
|
max-width: 80%;
|
|
1006
1054
|
}
|
|
1007
1055
|
|
|
1056
|
+
.max-w-\[95\%\] {
|
|
1057
|
+
max-width: 95%;
|
|
1058
|
+
}
|
|
1059
|
+
|
|
1008
1060
|
.max-w-\[260px\] {
|
|
1009
1061
|
max-width: 260px;
|
|
1010
1062
|
}
|
|
@@ -1033,6 +1085,10 @@
|
|
|
1033
1085
|
max-width: 1440px;
|
|
1034
1086
|
}
|
|
1035
1087
|
|
|
1088
|
+
.max-w-\[calc\(100\%-24px\)\] {
|
|
1089
|
+
max-width: calc(100% - 24px);
|
|
1090
|
+
}
|
|
1091
|
+
|
|
1036
1092
|
.max-w-\[calc\(100vw-24px\)\] {
|
|
1037
1093
|
max-width: calc(100vw - 24px);
|
|
1038
1094
|
}
|
|
@@ -1103,6 +1159,10 @@
|
|
|
1103
1159
|
translate: var(--tw-translate-x) var(--tw-translate-y);
|
|
1104
1160
|
}
|
|
1105
1161
|
|
|
1162
|
+
.rotate-180 {
|
|
1163
|
+
rotate: 180deg;
|
|
1164
|
+
}
|
|
1165
|
+
|
|
1106
1166
|
.transform {
|
|
1107
1167
|
transform: var(--tw-rotate-x, ) var(--tw-rotate-y, ) var(--tw-rotate-z, ) var(--tw-skew-x, ) var(--tw-skew-y, );
|
|
1108
1168
|
}
|
|
@@ -1111,10 +1171,6 @@
|
|
|
1111
1171
|
animation: .16s ease-out q-fade-in;
|
|
1112
1172
|
}
|
|
1113
1173
|
|
|
1114
|
-
.animate-\[q-pop_120ms_ease-out\] {
|
|
1115
|
-
animation: .12s ease-out q-pop;
|
|
1116
|
-
}
|
|
1117
|
-
|
|
1118
1174
|
.animate-pulse {
|
|
1119
1175
|
animation: var(--animate-pulse);
|
|
1120
1176
|
}
|
|
@@ -1143,6 +1199,10 @@
|
|
|
1143
1199
|
cursor: pointer;
|
|
1144
1200
|
}
|
|
1145
1201
|
|
|
1202
|
+
.cursor-text {
|
|
1203
|
+
cursor: text;
|
|
1204
|
+
}
|
|
1205
|
+
|
|
1146
1206
|
.touch-none {
|
|
1147
1207
|
touch-action: none;
|
|
1148
1208
|
}
|
|
@@ -1349,6 +1409,11 @@
|
|
|
1349
1409
|
border-radius: 3.40282e38px;
|
|
1350
1410
|
}
|
|
1351
1411
|
|
|
1412
|
+
.rounded-t-\[7px\] {
|
|
1413
|
+
border-top-left-radius: 7px;
|
|
1414
|
+
border-top-right-radius: 7px;
|
|
1415
|
+
}
|
|
1416
|
+
|
|
1352
1417
|
.rounded-t-\[14px\] {
|
|
1353
1418
|
border-top-left-radius: 14px;
|
|
1354
1419
|
border-top-right-radius: 14px;
|
|
@@ -1364,6 +1429,11 @@
|
|
|
1364
1429
|
border-width: 0;
|
|
1365
1430
|
}
|
|
1366
1431
|
|
|
1432
|
+
.border-2 {
|
|
1433
|
+
border-style: var(--tw-border-style);
|
|
1434
|
+
border-width: 2px;
|
|
1435
|
+
}
|
|
1436
|
+
|
|
1367
1437
|
.border-t {
|
|
1368
1438
|
border-top-style: var(--tw-border-style);
|
|
1369
1439
|
border-top-width: 1px;
|
|
@@ -1379,6 +1449,11 @@
|
|
|
1379
1449
|
border-bottom-width: 1px;
|
|
1380
1450
|
}
|
|
1381
1451
|
|
|
1452
|
+
.border-b-0 {
|
|
1453
|
+
border-bottom-style: var(--tw-border-style);
|
|
1454
|
+
border-bottom-width: 0;
|
|
1455
|
+
}
|
|
1456
|
+
|
|
1382
1457
|
.border-l {
|
|
1383
1458
|
border-left-style: var(--tw-border-style);
|
|
1384
1459
|
border-left-width: 1px;
|
|
@@ -1389,6 +1464,10 @@
|
|
|
1389
1464
|
border-style: dashed;
|
|
1390
1465
|
}
|
|
1391
1466
|
|
|
1467
|
+
.border-action {
|
|
1468
|
+
border-color: var(--action);
|
|
1469
|
+
}
|
|
1470
|
+
|
|
1392
1471
|
.border-action-line {
|
|
1393
1472
|
border-color: var(--action-line);
|
|
1394
1473
|
}
|
|
@@ -1522,6 +1601,26 @@
|
|
|
1522
1601
|
}
|
|
1523
1602
|
}
|
|
1524
1603
|
|
|
1604
|
+
.bg-surface\/80 {
|
|
1605
|
+
background-color: var(--surface);
|
|
1606
|
+
}
|
|
1607
|
+
|
|
1608
|
+
@supports (color: color-mix(in lab, red, red)) {
|
|
1609
|
+
.bg-surface\/80 {
|
|
1610
|
+
background-color: color-mix(in oklab, var(--surface) 80%, transparent);
|
|
1611
|
+
}
|
|
1612
|
+
}
|
|
1613
|
+
|
|
1614
|
+
.bg-surface\/90 {
|
|
1615
|
+
background-color: var(--surface);
|
|
1616
|
+
}
|
|
1617
|
+
|
|
1618
|
+
@supports (color: color-mix(in lab, red, red)) {
|
|
1619
|
+
.bg-surface\/90 {
|
|
1620
|
+
background-color: color-mix(in oklab, var(--surface) 90%, transparent);
|
|
1621
|
+
}
|
|
1622
|
+
}
|
|
1623
|
+
|
|
1525
1624
|
.bg-track {
|
|
1526
1625
|
background-color: var(--track);
|
|
1527
1626
|
}
|
|
@@ -1924,6 +2023,11 @@
|
|
|
1924
2023
|
line-height: 1;
|
|
1925
2024
|
}
|
|
1926
2025
|
|
|
2026
|
+
.leading-snug {
|
|
2027
|
+
--tw-leading: var(--leading-snug);
|
|
2028
|
+
line-height: var(--leading-snug);
|
|
2029
|
+
}
|
|
2030
|
+
|
|
1927
2031
|
.leading-tight {
|
|
1928
2032
|
--tw-leading: var(--leading-tight);
|
|
1929
2033
|
line-height: var(--leading-tight);
|
|
@@ -1979,6 +2083,10 @@
|
|
|
1979
2083
|
white-space: pre-wrap;
|
|
1980
2084
|
}
|
|
1981
2085
|
|
|
2086
|
+
.\!text-ok-text {
|
|
2087
|
+
color: var(--ok-text) !important;
|
|
2088
|
+
}
|
|
2089
|
+
|
|
1982
2090
|
.text-action {
|
|
1983
2091
|
color: var(--action);
|
|
1984
2092
|
}
|
|
@@ -2066,6 +2174,11 @@
|
|
|
2066
2174
|
box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
|
|
2067
2175
|
}
|
|
2068
2176
|
|
|
2177
|
+
.shadow-\[0_1px_3px_rgb\(0_0_0\/0\.08\)\] {
|
|
2178
|
+
--tw-shadow: 0 1px 3px var(--tw-shadow-color, #00000014);
|
|
2179
|
+
box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
|
|
2180
|
+
}
|
|
2181
|
+
|
|
2069
2182
|
.shadow-\[inset_0_0_0_1px_rgba\(0\,0\,0\,0\.1\)\] {
|
|
2070
2183
|
--tw-shadow: inset 0 0 0 1px var(--tw-shadow-color, #0000001a);
|
|
2071
2184
|
box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
|
|
@@ -2091,6 +2204,11 @@
|
|
|
2091
2204
|
box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
|
|
2092
2205
|
}
|
|
2093
2206
|
|
|
2207
|
+
.ring {
|
|
2208
|
+
--tw-ring-shadow: var(--tw-ring-inset, ) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color, currentcolor);
|
|
2209
|
+
box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
|
|
2210
|
+
}
|
|
2211
|
+
|
|
2094
2212
|
.outline {
|
|
2095
2213
|
outline-style: var(--tw-outline-style);
|
|
2096
2214
|
outline-width: 1px;
|
|
@@ -2121,14 +2239,32 @@
|
|
|
2121
2239
|
filter: var(--tw-blur, ) var(--tw-brightness, ) var(--tw-contrast, ) var(--tw-grayscale, ) var(--tw-hue-rotate, ) var(--tw-invert, ) var(--tw-saturate, ) var(--tw-sepia, ) var(--tw-drop-shadow, );
|
|
2122
2240
|
}
|
|
2123
2241
|
|
|
2242
|
+
.backdrop-blur-md {
|
|
2243
|
+
--tw-backdrop-blur: blur(var(--blur-md));
|
|
2244
|
+
-webkit-backdrop-filter: var(--tw-backdrop-blur, ) var(--tw-backdrop-brightness, ) var(--tw-backdrop-contrast, ) var(--tw-backdrop-grayscale, ) var(--tw-backdrop-hue-rotate, ) var(--tw-backdrop-invert, ) var(--tw-backdrop-opacity, ) var(--tw-backdrop-saturate, ) var(--tw-backdrop-sepia, );
|
|
2245
|
+
backdrop-filter: var(--tw-backdrop-blur, ) var(--tw-backdrop-brightness, ) var(--tw-backdrop-contrast, ) var(--tw-backdrop-grayscale, ) var(--tw-backdrop-hue-rotate, ) var(--tw-backdrop-invert, ) var(--tw-backdrop-opacity, ) var(--tw-backdrop-saturate, ) var(--tw-backdrop-sepia, );
|
|
2246
|
+
}
|
|
2247
|
+
|
|
2248
|
+
.backdrop-blur-sm {
|
|
2249
|
+
--tw-backdrop-blur: blur(var(--blur-sm));
|
|
2250
|
+
-webkit-backdrop-filter: var(--tw-backdrop-blur, ) var(--tw-backdrop-brightness, ) var(--tw-backdrop-contrast, ) var(--tw-backdrop-grayscale, ) var(--tw-backdrop-hue-rotate, ) var(--tw-backdrop-invert, ) var(--tw-backdrop-opacity, ) var(--tw-backdrop-saturate, ) var(--tw-backdrop-sepia, );
|
|
2251
|
+
backdrop-filter: var(--tw-backdrop-blur, ) var(--tw-backdrop-brightness, ) var(--tw-backdrop-contrast, ) var(--tw-backdrop-grayscale, ) var(--tw-backdrop-hue-rotate, ) var(--tw-backdrop-invert, ) var(--tw-backdrop-opacity, ) var(--tw-backdrop-saturate, ) var(--tw-backdrop-sepia, );
|
|
2252
|
+
}
|
|
2253
|
+
|
|
2124
2254
|
.transition {
|
|
2125
2255
|
transition-property: color, background-color, border-color, outline-color, text-decoration-color, fill, stroke, --tw-gradient-from, --tw-gradient-via, --tw-gradient-to, opacity, box-shadow, transform, translate, scale, rotate, filter, -webkit-backdrop-filter, backdrop-filter, display, content-visibility, overlay, pointer-events;
|
|
2126
2256
|
transition-timing-function: var(--tw-ease, var(--default-transition-timing-function));
|
|
2127
2257
|
transition-duration: var(--tw-duration, var(--default-transition-duration));
|
|
2128
2258
|
}
|
|
2129
2259
|
|
|
2130
|
-
.transition-\[background-color\,opacity\] {
|
|
2131
|
-
transition-property: background-color, opacity;
|
|
2260
|
+
.transition-\[background-color\,opacity\,scale\] {
|
|
2261
|
+
transition-property: background-color, opacity, scale;
|
|
2262
|
+
transition-timing-function: var(--tw-ease, var(--default-transition-timing-function));
|
|
2263
|
+
transition-duration: var(--tw-duration, var(--default-transition-duration));
|
|
2264
|
+
}
|
|
2265
|
+
|
|
2266
|
+
.transition-\[color\,background-color\,scale\] {
|
|
2267
|
+
transition-property: color, background-color, scale;
|
|
2132
2268
|
transition-timing-function: var(--tw-ease, var(--default-transition-timing-function));
|
|
2133
2269
|
transition-duration: var(--tw-duration, var(--default-transition-duration));
|
|
2134
2270
|
}
|
|
@@ -2208,12 +2344,6 @@
|
|
|
2208
2344
|
user-select: none;
|
|
2209
2345
|
}
|
|
2210
2346
|
|
|
2211
|
-
@media (hover: hover) {
|
|
2212
|
-
.group-hover\:opacity-100:is(:where(.group):hover *) {
|
|
2213
|
-
opacity: 1;
|
|
2214
|
-
}
|
|
2215
|
-
}
|
|
2216
|
-
|
|
2217
2347
|
.placeholder\:text-muted::placeholder {
|
|
2218
2348
|
color: var(--muted);
|
|
2219
2349
|
}
|
|
@@ -2223,10 +2353,6 @@
|
|
|
2223
2353
|
border-top-width: 0;
|
|
2224
2354
|
}
|
|
2225
2355
|
|
|
2226
|
-
.focus-within\:opacity-100:focus-within {
|
|
2227
|
-
opacity: 1;
|
|
2228
|
-
}
|
|
2229
|
-
|
|
2230
2356
|
.focus-within\:outline-2:focus-within {
|
|
2231
2357
|
outline-style: var(--tw-outline-style);
|
|
2232
2358
|
outline-width: 2px;
|
|
@@ -2282,6 +2408,14 @@
|
|
|
2282
2408
|
background-color: var(--soft2);
|
|
2283
2409
|
}
|
|
2284
2410
|
|
|
2411
|
+
.active\:not-disabled\:scale-\[0\.94\]:active:not(:disabled) {
|
|
2412
|
+
scale: .94;
|
|
2413
|
+
}
|
|
2414
|
+
|
|
2415
|
+
.active\:not-disabled\:scale-\[0\.97\]:active:not(:disabled) {
|
|
2416
|
+
scale: .97;
|
|
2417
|
+
}
|
|
2418
|
+
|
|
2285
2419
|
.disabled\:cursor-not-allowed:disabled {
|
|
2286
2420
|
cursor: not-allowed;
|
|
2287
2421
|
}
|
|
@@ -2437,6 +2571,10 @@
|
|
|
2437
2571
|
flex-wrap: wrap;
|
|
2438
2572
|
}
|
|
2439
2573
|
}
|
|
2574
|
+
|
|
2575
|
+
.\[\&\>\:not\(\:first-child\)\]\:shrink-0 > :not(:first-child) {
|
|
2576
|
+
flex-shrink: 0;
|
|
2577
|
+
}
|
|
2440
2578
|
}
|
|
2441
2579
|
|
|
2442
2580
|
@font-face {
|
|
@@ -3007,9 +3145,9 @@
|
|
|
3007
3145
|
}
|
|
3008
3146
|
|
|
3009
3147
|
.canvas-overlay .section-title {
|
|
3148
|
+
translate: 0 max(-100%, min(0px, calc(var(--body) * var(--z) * 1px - 44px)));
|
|
3010
3149
|
padding-bottom: 8px;
|
|
3011
3150
|
display: none;
|
|
3012
|
-
translate: 0 -100%;
|
|
3013
3151
|
}
|
|
3014
3152
|
|
|
3015
3153
|
.canvas-overlay[data-titles="on"] .section-title {
|
|
@@ -3270,6 +3408,51 @@
|
|
|
3270
3408
|
inherits: false
|
|
3271
3409
|
}
|
|
3272
3410
|
|
|
3411
|
+
@property --tw-backdrop-blur {
|
|
3412
|
+
syntax: "*";
|
|
3413
|
+
inherits: false
|
|
3414
|
+
}
|
|
3415
|
+
|
|
3416
|
+
@property --tw-backdrop-brightness {
|
|
3417
|
+
syntax: "*";
|
|
3418
|
+
inherits: false
|
|
3419
|
+
}
|
|
3420
|
+
|
|
3421
|
+
@property --tw-backdrop-contrast {
|
|
3422
|
+
syntax: "*";
|
|
3423
|
+
inherits: false
|
|
3424
|
+
}
|
|
3425
|
+
|
|
3426
|
+
@property --tw-backdrop-grayscale {
|
|
3427
|
+
syntax: "*";
|
|
3428
|
+
inherits: false
|
|
3429
|
+
}
|
|
3430
|
+
|
|
3431
|
+
@property --tw-backdrop-hue-rotate {
|
|
3432
|
+
syntax: "*";
|
|
3433
|
+
inherits: false
|
|
3434
|
+
}
|
|
3435
|
+
|
|
3436
|
+
@property --tw-backdrop-invert {
|
|
3437
|
+
syntax: "*";
|
|
3438
|
+
inherits: false
|
|
3439
|
+
}
|
|
3440
|
+
|
|
3441
|
+
@property --tw-backdrop-opacity {
|
|
3442
|
+
syntax: "*";
|
|
3443
|
+
inherits: false
|
|
3444
|
+
}
|
|
3445
|
+
|
|
3446
|
+
@property --tw-backdrop-saturate {
|
|
3447
|
+
syntax: "*";
|
|
3448
|
+
inherits: false
|
|
3449
|
+
}
|
|
3450
|
+
|
|
3451
|
+
@property --tw-backdrop-sepia {
|
|
3452
|
+
syntax: "*";
|
|
3453
|
+
inherits: false
|
|
3454
|
+
}
|
|
3455
|
+
|
|
3273
3456
|
@property --tw-duration {
|
|
3274
3457
|
syntax: "*";
|
|
3275
3458
|
inherits: false
|
|
@@ -326,6 +326,18 @@ export type RuntimeMessage = {
|
|
|
326
326
|
type: 'keydown';
|
|
327
327
|
code: string;
|
|
328
328
|
}
|
|
329
|
+
/**
|
|
330
|
+
* Where the pointer is in the frame, once the viewer asked with `pointer` (0.9.11+): on moves (at
|
|
331
|
+
* most once a frame), `down` on a press (a tap on a touch screen), -1, -1 when it leaves.
|
|
332
|
+
*/
|
|
333
|
+
| {
|
|
334
|
+
source: 'design-runtime';
|
|
335
|
+
key: string;
|
|
336
|
+
type: 'pointer';
|
|
337
|
+
x: number;
|
|
338
|
+
y: number;
|
|
339
|
+
down: boolean;
|
|
340
|
+
}
|
|
329
341
|
/** ⌘/Ctrl pressed or released in the frame, or a key pressed while one is down. */
|
|
330
342
|
| {
|
|
331
343
|
source: 'design-runtime';
|
|
@@ -365,6 +377,11 @@ export type ViewerMessage = {
|
|
|
365
377
|
source: 'design-viewer';
|
|
366
378
|
type: 'canvas';
|
|
367
379
|
}
|
|
380
|
+
/** Report the pointer: the viewer shows its controls when the pointer nears them over the frame. */
|
|
381
|
+
| {
|
|
382
|
+
source: 'design-viewer';
|
|
383
|
+
type: 'pointer';
|
|
384
|
+
}
|
|
368
385
|
/** Inspect mode on or off; `tokens` let the frame name the tokens behind computed styles. */
|
|
369
386
|
| {
|
|
370
387
|
source: 'design-viewer';
|
|
@@ -11,10 +11,17 @@ export interface DesignViewerProps {
|
|
|
11
11
|
base?: string;
|
|
12
12
|
/** The `sandbox` attribute for every frame; none when unset. */
|
|
13
13
|
frameSandbox?: string;
|
|
14
|
+
/**
|
|
15
|
+
* The `allow` attribute (permissions policy) for every frame; `clipboard-read; clipboard-write;
|
|
16
|
+
* fullscreen` when unset, as the local viewer has it. A permission the user grants is the
|
|
17
|
+
* embedding page's and then holds for every frame, so a host that shows screens from others
|
|
18
|
+
* should grant less, such as `clipboard-write` alone.
|
|
19
|
+
*/
|
|
20
|
+
frameAllow?: string;
|
|
14
21
|
slots?: ViewerSlots;
|
|
15
22
|
scope?: ViewerScope;
|
|
16
23
|
/** Shared with the embedding app; the viewer makes its own when unset. */
|
|
17
24
|
queryClient?: QueryClient;
|
|
18
25
|
}
|
|
19
26
|
/** The whole viewer: home, canvases, screens and the design system of one project. */
|
|
20
|
-
export declare function DesignViewer({ source, base, frameSandbox, slots, scope, queryClient }: DesignViewerProps): import("react").JSX.Element;
|
|
27
|
+
export declare function DesignViewer({ source, base, frameSandbox, frameAllow, slots, scope, queryClient, }: DesignViewerProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { type ReactNode } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* A plate in the top-right corner over a full-window frame. It shows while the screen loads and for a
|
|
4
|
+
* few seconds after, then fades out; a pointer in the window's top-right quarter brings it back and
|
|
5
|
+
* keeps it while it stays there, a tap there shows it for a while, and so does focus inside it.
|
|
6
|
+
*
|
|
7
|
+
* The page does not see the pointer over the frame, so the frame's runtime reports it (0.9.11+).
|
|
8
|
+
* Until a frame does (an older runtime, a URL item), the plate shows whenever the pointer is over the
|
|
9
|
+
* page, as before.
|
|
10
|
+
*/
|
|
11
|
+
export declare function CornerPlate({ frame, note, badge, children, }: {
|
|
12
|
+
frame: HTMLIFrameElement | null;
|
|
13
|
+
/** A muted line under the plate's controls: whose content the screen is. */
|
|
14
|
+
note?: ReactNode;
|
|
15
|
+
/**
|
|
16
|
+
* Instead of fading out, the plate folds into this small badge, which a click opens again: for pages
|
|
17
|
+
* anyone can open, so a screen can never pass for the app around it.
|
|
18
|
+
*/
|
|
19
|
+
badge?: ReactNode;
|
|
20
|
+
children?: ReactNode;
|
|
21
|
+
}): import("react").JSX.Element;
|
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
/**
|
|
1
|
+
/**
|
|
2
|
+
* http, https, mailto or relative, read as the browser reads a URL (it drops whitespace and
|
|
3
|
+
* control characters inside a scheme, and so does URL parsing).
|
|
4
|
+
*/
|
|
2
5
|
export declare function isSafeHref(href: string): boolean;
|
|
3
6
|
export declare function renderMarkdown(text: string): string;
|
|
4
7
|
/** Markdown from the project's own files (guidelines, notes, descriptions). */
|
|
@@ -23,13 +23,19 @@ export declare function reloadFrame(frame: HTMLIFrameElement | null): void;
|
|
|
23
23
|
* process, so frames served from the viewer's twin host (localhost ↔ 127.0.0.1,
|
|
24
24
|
* both reach the same server) run their scripts and animations off the viewer's
|
|
25
25
|
* thread: a canvas full of live screens still pans smoothly. Any other host,
|
|
26
|
-
* and static builds, keep frames on the viewer's origin.
|
|
26
|
+
* and static builds, keep frames on the viewer's origin. The dev server keeps
|
|
27
|
+
* its viewer on localhost and gives 127.0.0.1 to frames (server/hosts.ts).
|
|
27
28
|
*/
|
|
28
29
|
export declare const FRAME_ORIGIN: string;
|
|
29
30
|
/** A frame URL with the theme it should open in. */
|
|
30
31
|
export declare function frameSrc(url: string, theme: Theme, extra?: Record<string, string>): string;
|
|
31
32
|
/** Absolute URL for opening a frame in a new tab. */
|
|
32
33
|
export declare function absoluteUrl(url: string): string;
|
|
34
|
+
/** A screen a link can lead to: its id and the app routes it shows. */
|
|
35
|
+
export interface LinkTarget {
|
|
36
|
+
id: string;
|
|
37
|
+
routes?: string[];
|
|
38
|
+
}
|
|
33
39
|
/**
|
|
34
40
|
* A link, form or history push the runtime kept from leaving its frame. The path goes to the
|
|
35
41
|
* screen whose `route` matches it best (a relative `href` resolves against the route of the
|
|
@@ -39,5 +45,7 @@ export declare function absoluteUrl(url: string): string;
|
|
|
39
45
|
*/
|
|
40
46
|
export declare function followLink(message: Extract<RuntimeMessage, {
|
|
41
47
|
type: 'link';
|
|
42
|
-
}>, canvas: CanvasDoc, go: (id: string) => void, from?: string
|
|
48
|
+
}>, canvas: CanvasDoc | LinkTarget[], go: (id: string) => void, from?: string,
|
|
49
|
+
/** A link to a path no screen has; a toast says so by default. */
|
|
50
|
+
missing?: (path: string) => void): void;
|
|
43
51
|
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { RuntimeMessage } from '../../../src/shared/types';
|
|
2
|
+
/**
|
|
3
|
+
* Frames run code anyone who can push wrote, and any of them may post the viewer anything: a
|
|
4
|
+
* message only reaches the viewer's handlers with the fields its type has, of their types.
|
|
5
|
+
* Strings are cut and sizes kept within reason, so a frame cannot swell the viewer's state.
|
|
6
|
+
*/
|
|
7
|
+
export declare const MAX_FRAME_SIZE = 100000;
|
|
8
|
+
export declare const MAX_FRAME_ERRORS = 20;
|
|
9
|
+
/** `data` as a runtime message, with its sizes and texts bounded; null when it is none. */
|
|
10
|
+
export declare function readRuntimeMessage(data: unknown): RuntimeMessage | null;
|
|
11
|
+
/** A frame's error list with `message` added: once, and no more than `MAX_FRAME_ERRORS` of them. */
|
|
12
|
+
export declare function withError(list: string[], message: string): string[];
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { CanvasItem } from '../../../src/shared/types';
|
|
1
2
|
import { type ReactNode } from 'react';
|
|
2
3
|
import type { ViewerSource } from './source';
|
|
3
4
|
/** Places where an app that embeds the viewer adds its own controls. */
|
|
@@ -28,6 +29,18 @@ export interface ViewerSlots {
|
|
|
28
29
|
canvasesAfter?: ReactNode;
|
|
29
30
|
/** Below the panels of the home page, full width. */
|
|
30
31
|
homeAfter?: ReactNode;
|
|
32
|
+
/** In the bar of the item selected on a canvas, before the way to zoom to it: sharing that screen, say. */
|
|
33
|
+
selectionActions?: (canvasId: string, item: CanvasItem) => ReactNode;
|
|
34
|
+
/**
|
|
35
|
+
* On a screen's full-window page, the corner plate with the way out: `note` is a muted line under it
|
|
36
|
+
* (whose content the screen is), `actions` sit next to the way out, and with `badge` the plate folds
|
|
37
|
+
* into that badge instead of fading out (pages anyone can open).
|
|
38
|
+
*/
|
|
39
|
+
fullPlate?: {
|
|
40
|
+
note?: ReactNode;
|
|
41
|
+
actions?: ReactNode;
|
|
42
|
+
badge?: ReactNode;
|
|
43
|
+
};
|
|
31
44
|
}
|
|
32
45
|
/** Single-canvas mode: only this canvas is reachable, without the design system or other canvases. */
|
|
33
46
|
export interface ViewerScope {
|
|
@@ -43,10 +56,14 @@ export declare function viewerKeys(id: string): {
|
|
|
43
56
|
source: (unit: string, path: string) => readonly ['design', string, 'source', string, string];
|
|
44
57
|
};
|
|
45
58
|
export type ViewerKeys = ReturnType<typeof viewerKeys>;
|
|
59
|
+
/** What frames of the local viewer may use: the clipboard, both ways, and fullscreen. */
|
|
60
|
+
export declare const DEFAULT_FRAME_ALLOW = "clipboard-read; clipboard-write; fullscreen";
|
|
46
61
|
export interface Viewer {
|
|
47
62
|
source: ViewerSource;
|
|
48
63
|
keys: ViewerKeys;
|
|
49
64
|
frameSandbox?: string;
|
|
65
|
+
/** The `allow` attribute (permissions policy) of every frame. */
|
|
66
|
+
frameAllow: string;
|
|
50
67
|
slots: ViewerSlots;
|
|
51
68
|
scope: ViewerScope | null;
|
|
52
69
|
}
|
|
@@ -1,11 +1,13 @@
|
|
|
1
|
-
export type { AssetDoc, CanvasDoc, CanvasItem, CanvasPage, CanvasSection, CanvasSummary, ComponentDoc, FrameSize, GuidelineDoc, ImageItem, Issue, NoteItem, ProjectInfo, ScreenItem, SystemDoc, SystemSummary, Theme, Token, TokenKind, TokenValue, UrlItem, } from '../../src/shared/types';
|
|
1
|
+
export type { AssetDoc, CanvasDoc, CanvasItem, CanvasPage, CanvasSection, CanvasSummary, ComponentDoc, FrameSize, GuidelineDoc, ImageItem, Issue, NoteItem, ProjectInfo, RuntimeMessage, ScreenItem, SystemDoc, SystemSummary, Theme, Token, TokenKind, TokenValue, UrlItem, } from '../../src/shared/types';
|
|
2
2
|
export { DesignViewer, type DesignViewerProps } from './app';
|
|
3
|
+
export { CornerPlate } from './components/corner-plate';
|
|
3
4
|
export { SlidePanel } from './components/slide-panel';
|
|
4
5
|
export { ThemeMenu } from './components/theme-menu';
|
|
5
6
|
export { Bar, useBarCompact } from './components/topbar';
|
|
6
7
|
export { Mark, Wordmark } from './components/wordmark';
|
|
7
8
|
export { cn } from './lib/cn';
|
|
8
9
|
export { copyText } from './lib/copy';
|
|
10
|
+
export { followLink, frameSrc, type LinkTarget, listenToFrame, sendTheme } from './lib/frames';
|
|
9
11
|
export { useIsPhone } from './lib/phone';
|
|
10
12
|
export { ApiError, localSource, resolveUrl, staticSource, type ViewerSource } from './lib/source';
|
|
11
13
|
export { setThemePref, type ThemePref, useTheme, useThemePref } from './lib/theme';
|
|
@@ -14,6 +16,8 @@ export { Avatar, initials } from './ui/avatar';
|
|
|
14
16
|
export { Badge, Count, type Tone } from './ui/badge';
|
|
15
17
|
export { Button, ButtonAnchor, type ButtonKind, ButtonLink, type ButtonProps, buttonClass, IconButton, type IconButtonProps, iconButtonClass, } from './ui/button';
|
|
16
18
|
export { Segmented, Switch } from './ui/choice';
|
|
19
|
+
export { Combobox, type ComboboxOption } from './ui/combobox';
|
|
20
|
+
export { CopyButton } from './ui/copy-button';
|
|
17
21
|
export { Dialog } from './ui/dialog';
|
|
18
22
|
export { Icon, type IconName } from './ui/icon';
|
|
19
23
|
export { floatingSurface, Menu, MenuItem, MenuLabel, MenuSeparator, menuItemClass, menuSurface } from './ui/menu';
|
|
@@ -13,7 +13,7 @@ export declare function CanvasBar({ canvas, page, theme, onTheme, sidebar, onSid
|
|
|
13
13
|
inspect: boolean;
|
|
14
14
|
onInspect(value: boolean): void;
|
|
15
15
|
}): import("react").JSX.Element;
|
|
16
|
-
/** The selected item's name and actions, floating over the bottom of the canvas. */
|
|
16
|
+
/** The selected item's name and actions, floating over the bottom of the canvas; it eases in and out. */
|
|
17
17
|
export declare function SelectionBar({ canvas, store, layoutItems, theme, onPlay, inspect, }: {
|
|
18
18
|
canvas: CanvasDoc;
|
|
19
19
|
store: ViewStore;
|
|
@@ -21,7 +21,7 @@ export declare function SelectionBar({ canvas, store, layoutItems, theme, onPlay
|
|
|
21
21
|
theme: Theme;
|
|
22
22
|
onPlay(id: string): void;
|
|
23
23
|
inspect: boolean;
|
|
24
|
-
}): import("react").JSX.Element
|
|
24
|
+
}): import("react").JSX.Element;
|
|
25
25
|
/** The inspect mode switch: a button that stays pressed while on. */
|
|
26
26
|
export declare function InspectToggle({ on, onChange, compact, }: {
|
|
27
27
|
on: boolean;
|
|
@@ -7,7 +7,7 @@ export declare const fullHref: (canvas: string, item: string, theme: Theme) => s
|
|
|
7
7
|
* tab gets the full-window page of the viewer; otherwise the screen's own URL.
|
|
8
8
|
*/
|
|
9
9
|
export declare function useOpenUrl(canvasId: string, item: Frame | undefined, theme: Theme): string | null;
|
|
10
|
-
/** `/c/:canvas/full/:item`: one screen filling the window, a way out
|
|
10
|
+
/** `/c/:canvas/full/:item`: one screen filling the window, a way out in the top-right corner and on Esc. */
|
|
11
11
|
export declare function FullPage({ canvasId, itemId }: {
|
|
12
12
|
canvasId: string;
|
|
13
13
|
itemId: string;
|
|
@@ -8,6 +8,8 @@ export interface PlacedSection extends Rect {
|
|
|
8
8
|
section: CanvasSection;
|
|
9
9
|
/** Height of the title/description block above the row. */
|
|
10
10
|
header: number;
|
|
11
|
+
/** How far below the section's top its first row starts. */
|
|
12
|
+
body: number;
|
|
11
13
|
}
|
|
12
14
|
export interface Layout {
|
|
13
15
|
items: Placed[];
|