@3sln/nook 0.1.0 → 0.2.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.
package/src/ui/styles.js CHANGED
@@ -1,3 +1,4 @@
1
+ import { tutorialGraphicsStyles } from "./tutorialGraphics.js";
1
2
  export default `
2
3
  :host {
3
4
  display: block;
@@ -12,10 +13,10 @@ export default `
12
13
  --nook-border: light-dark(#e9e7ef, #484151);
13
14
  --nook-material-background: color-mix(
14
15
  in srgb,
15
- var(--nook-surface) 84%,
16
+ var(--nook-surface) 41%,
16
17
  transparent
17
18
  );
18
- --nook-material-blur: 24px;
19
+ --nook-material-blur: 7.5px;
19
20
  --nook-radius: 16px;
20
21
  --nook-shadow:
21
22
  0 8px 32px light-dark(#241a4918, #00000048),
@@ -36,7 +37,7 @@ export default `
36
37
  --nook-padding: 16px;
37
38
  --nook-gap: 8px;
38
39
  --nook-item-size: 48px;
39
- --nook-root-max-items: 5;
40
+ --nook-root-max-items: 6;
40
41
  --nook-surface-offset: 56px;
41
42
  --nook-edge-gap: 12px;
42
43
  }
@@ -161,7 +162,9 @@ button {
161
162
  width: min(var(--nook-width, 304px), calc(var(--nook-bound-width, 100vw) - 24px));
162
163
  max-height: min(640px, calc(var(--nook-bound-height, 100dvh) - 96px));
163
164
  overflow: auto;
164
- background: var(--nook-surface);
165
+ background: var(--nook-material-background);
166
+ -webkit-backdrop-filter: blur(var(--nook-material-blur));
167
+ backdrop-filter: blur(var(--nook-material-blur));
165
168
  border: 1px solid var(--nook-border);
166
169
  border-radius: var(--nook-radius);
167
170
  box-shadow: var(--nook-shadow);
@@ -229,6 +232,9 @@ h2 {
229
232
  background var(--nook-duration),
230
233
  transform var(--nook-duration);
231
234
  }
235
+ .item:focus-within { z-index: 2; }
236
+ .item:hover { z-index: 3; }
237
+ .item[data-selected] { z-index: 3; }
232
238
  .item:hover {
233
239
  background: color-mix(in srgb, var(--nook-accent) 8%, var(--nook-surface));
234
240
  }
@@ -297,10 +303,10 @@ h2 {
297
303
  .item:focus-visible .tooltip {
298
304
  opacity: 1;
299
305
  }
300
- [part="back"] {
306
+ [part~="back"] {
301
307
  margin-inline-start: -8px;
302
308
  }
303
- [part="close"] {
309
+ [part~="close"] {
304
310
  display: none;
305
311
  margin-inline-end: -8px;
306
312
  }
@@ -322,11 +328,11 @@ kbd {
322
328
  padding-top: 0;
323
329
  }
324
330
  .setting:last-child,
325
- .setting:has(+ [part="settings-footer"]) {
331
+ .setting:has(+ [part~="settings-footer"]) {
326
332
  padding-bottom: 0;
327
333
  border-bottom: 0;
328
334
  }
329
- .setting > [part="setting-label"] {
335
+ .setting > [part~="setting-label"] {
330
336
  font-size: var(--nook-text-sm);
331
337
  font-weight: var(--nook-label-weight);
332
338
  line-height: 1.4;
@@ -527,6 +533,8 @@ kbd {
527
533
 
528
534
  /* Compact controls share one material, rather than individual button bubbles. */
529
535
  .surface[data-presentation="compact"] {
536
+ -webkit-backdrop-filter: none;
537
+ backdrop-filter: none;
530
538
  background: transparent;
531
539
  border: 0;
532
540
  border-radius: 0;
@@ -577,7 +585,7 @@ kbd {
577
585
  }
578
586
 
579
587
  @media (pointer: coarse), (hover: none) {
580
- .surface[data-presentation="expanded"] [part="close"] {
588
+ .surface[data-presentation="expanded"] [part~="close"] {
581
589
  display: inline-block;
582
590
  }
583
591
  .anchor .surface[data-presentation="expanded"] {
@@ -590,6 +598,8 @@ kbd {
590
598
  border-radius: 0;
591
599
  box-shadow: none;
592
600
  background: transparent;
601
+ -webkit-backdrop-filter: none;
602
+ backdrop-filter: none;
593
603
  isolation: isolate;
594
604
  padding: calc(24px + env(safe-area-inset-top, 0px))
595
605
  calc(24px + env(safe-area-inset-right, 0px))
@@ -606,9 +616,9 @@ kbd {
606
616
  -webkit-backdrop-filter: blur(
607
617
  var(--nook-backdrop-blur, var(--nook-material-blur))
608
618
  )
609
- saturate(var(--nook-material-saturation, 125%));
619
+ saturate(var(--nook-material-saturation, 100%));
610
620
  backdrop-filter: blur(var(--nook-backdrop-blur, var(--nook-material-blur)))
611
- saturate(var(--nook-material-saturation, 125%));
621
+ saturate(var(--nook-material-saturation, 100%));
612
622
  box-shadow: inset 0 1px 0
613
623
  var(
614
624
  --nook-material-highlight,
@@ -617,12 +627,12 @@ kbd {
617
627
  pointer-events: none;
618
628
  }
619
629
  .surface[data-presentation="expanded"] > header,
620
- .surface[data-presentation="expanded"] > [part="body"] {
630
+ .surface[data-presentation="expanded"] > [part~="body"] {
621
631
  width: 100%;
622
632
  max-width: 560px;
623
633
  margin-inline: auto;
624
634
  }
625
- .surface[data-presentation="expanded"] > [part="body"] {
635
+ .surface[data-presentation="expanded"] > [part~="body"] {
626
636
  animation: content-arrive var(--nook-pop-duration)
627
637
  cubic-bezier(0.2, 0.8, 0.2, 1);
628
638
  transform-origin: 50% 0;
@@ -644,7 +654,7 @@ kbd {
644
654
  display: none;
645
655
  }
646
656
  @media (pointer: coarse), (hover: none) {
647
- .surface[data-presentation="expanded"] > [part="body"] > .items {
657
+ .surface[data-presentation="expanded"] > [part~="body"] > .items {
648
658
  display: none;
649
659
  }
650
660
  .surface[data-presentation="expanded"] .groups,
@@ -654,19 +664,19 @@ kbd {
654
664
  gap: var(--nook-group-gap, 16px);
655
665
  }
656
666
  .surface[data-view="root"][data-presentation="expanded"]
657
- > [part="body"]
667
+ > [part~="body"]
658
668
  > .items:has(> .setting) {
659
669
  display: grid;
660
670
  margin-bottom: 16px;
661
671
  }
662
672
  .surface[data-view="root"][data-presentation="expanded"]
663
- > [part="body"]
673
+ > [part~="body"]
664
674
  > .items
665
675
  > .item {
666
676
  display: none;
667
677
  }
668
678
  .surface[data-view="root"][data-presentation="expanded"]
669
- > [part="body"]
679
+ > [part~="body"]
670
680
  > .items
671
681
  > .setting {
672
682
  grid-column: 1 / -1;
@@ -678,7 +688,7 @@ kbd {
678
688
  .group + .group {
679
689
  margin-top: 8px;
680
690
  }
681
- [part="group-heading"] {
691
+ [part~="group-heading"] {
682
692
  margin: 0 0 12px;
683
693
  font-size: var(--nook-text-sm);
684
694
  font-weight: var(--nook-heading-weight);
@@ -707,7 +717,7 @@ kbd {
707
717
  .surface[data-view="commands"] > header {
708
718
  flex: none;
709
719
  }
710
- .surface[data-view="commands"] > [part="body"] {
720
+ .surface[data-view="commands"] > [part~="body"] {
711
721
  display: flex;
712
722
  flex-direction: column;
713
723
  gap: 12px;
@@ -725,7 +735,7 @@ kbd {
725
735
  order: 1;
726
736
  }
727
737
  @media (pointer: coarse), (hover: none) {
728
- .surface[data-view="commands"][data-presentation="expanded"] > [part="body"] {
738
+ .surface[data-view="commands"][data-presentation="expanded"] > [part~="body"] {
729
739
  flex: 1;
730
740
  }
731
741
  .surface[data-view="commands"][data-presentation="expanded"] .command-results {
@@ -762,17 +772,17 @@ kbd {
762
772
  .command-result[data-active="true"] {
763
773
  background: color-mix(in srgb, var(--nook-accent) 8%, transparent);
764
774
  }
765
- [part="command-name"] {
775
+ [part~="command-name"] {
766
776
  font-size: var(--nook-text-md);
767
777
  line-height: 1.4;
768
778
  font-weight: var(--nook-label-weight);
769
779
  }
770
- [part="command-description"] {
780
+ [part~="command-description"] {
771
781
  color: var(--nook-muted);
772
782
  font-size: var(--nook-text-xs);
773
783
  line-height: 1.5;
774
784
  }
775
- .command-result [part="command-description"] {
785
+ .command-result [part~="command-description"] {
776
786
  grid-column: 1;
777
787
  }
778
788
  .command-result kbd {
@@ -919,7 +929,7 @@ kbd {
919
929
  pointer-events: none;
920
930
  z-index: 2;
921
931
  }
922
- .handle-tooltip [part="drag-hint"] {
932
+ .handle-tooltip [part~="drag-hint"] {
923
933
  opacity: 0.8;
924
934
  }
925
935
  [data-corner^="bottom"] .handle-tooltip {
@@ -947,10 +957,10 @@ kbd {
947
957
  }
948
958
  .surface::before,
949
959
  .surface > header,
950
- .surface > [part="body"] {
960
+ .surface > [part~="body"] {
951
961
  animation: reveal var(--nook-duration) ease-out;
952
962
  }
953
- /* Acrylic-style surface for transient controls: neutral tint, strong blur,
963
+ /* Shared dial material for transient controls: light tint, subtle blur,
954
964
  a defined edge, and one elevation shadow. Feathering made the material muddy. */
955
965
  .surface[data-presentation="compact"] {
956
966
  isolation: isolate;
@@ -978,20 +988,22 @@ kbd {
978
988
  -webkit-backdrop-filter: blur(
979
989
  var(--nook-halo-blur, var(--nook-material-blur))
980
990
  )
981
- saturate(var(--nook-material-saturation, 125%));
991
+ saturate(var(--nook-material-saturation, 100%));
982
992
  backdrop-filter: blur(var(--nook-halo-blur, var(--nook-material-blur)))
983
- saturate(var(--nook-material-saturation, 125%));
993
+ saturate(var(--nook-material-saturation, 100%));
984
994
  }
985
995
  @supports not (
986
996
  (backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))
987
997
  ) {
988
998
  .surface[data-presentation="compact"]::before,
999
+ .surface[data-presentation="expanded"],
989
1000
  .surface[data-presentation="expanded"]::before {
990
1001
  background: var(--nook-surface);
991
1002
  }
992
1003
  }
993
1004
  @media (prefers-reduced-transparency: reduce) {
994
1005
  .surface[data-presentation="compact"]::before,
1006
+ .surface[data-presentation="expanded"],
995
1007
  .surface[data-presentation="expanded"]::before {
996
1008
  background: var(--nook-surface);
997
1009
  -webkit-backdrop-filter: none;
@@ -1107,7 +1119,7 @@ kbd {
1107
1119
  min-width: 0;
1108
1120
  gap: 8px;
1109
1121
  }
1110
- [part="enum-selected-label"] {
1122
+ [part~="enum-selected-label"] {
1111
1123
  overflow: hidden;
1112
1124
  text-overflow: ellipsis;
1113
1125
  white-space: nowrap;
@@ -1189,12 +1201,12 @@ kbd {
1189
1201
  width: 22px;
1190
1202
  height: 22px;
1191
1203
  }
1192
- [part="enum-option-label"] {
1204
+ [part~="enum-option-label"] {
1193
1205
  display: block;
1194
1206
  font-size: var(--nook-text-sm);
1195
1207
  font-weight: var(--nook-label-weight);
1196
1208
  }
1197
- [part="enum-option-description"] {
1209
+ [part~="enum-option-description"] {
1198
1210
  display: block;
1199
1211
  font-size: var(--nook-text-xs);
1200
1212
  color: var(--nook-muted);
@@ -1301,20 +1313,20 @@ textarea:focus-visible {
1301
1313
  border: 1px solid var(--nook-border);
1302
1314
  border-radius: 10px;
1303
1315
  }
1304
- [part="feedback-preview"] {
1316
+ [part~="feedback-preview"] {
1305
1317
  width: 44px;
1306
1318
  height: 36px;
1307
1319
  object-fit: cover;
1308
1320
  border-radius: 5px;
1309
1321
  }
1310
- [part="feedback-attachment-name"] {
1322
+ [part~="feedback-attachment-name"] {
1311
1323
  flex: 1;
1312
1324
  min-width: 0;
1313
1325
  overflow-wrap: anywhere;
1314
1326
  font-size: var(--nook-text-xs);
1315
1327
  color: var(--nook-muted);
1316
1328
  }
1317
- [part="feedback-remove"] {
1329
+ [part~="feedback-remove"] {
1318
1330
  display: grid;
1319
1331
  place-items: center;
1320
1332
  flex: none;
@@ -1323,7 +1335,7 @@ textarea:focus-visible {
1323
1335
  background: transparent;
1324
1336
  border-radius: 7px;
1325
1337
  }
1326
- [part="feedback-remove"] svg {
1338
+ [part~="feedback-remove"] svg {
1327
1339
  width: 16px;
1328
1340
  height: 16px;
1329
1341
  }
@@ -1374,14 +1386,14 @@ textarea:focus-visible {
1374
1386
  .surface:is([data-view="full"], [data-view="all"]) {
1375
1387
  width: min(var(--nook-overflow-width, 360px), calc(var(--nook-bound-width, 100vw) - 32px));
1376
1388
  }
1377
- .surface:is([data-view="full"], [data-view="all"]) > [part="body"] > .items {
1389
+ .surface:is([data-view="full"], [data-view="all"]) > [part~="body"] > .items {
1378
1390
  display: none;
1379
1391
  }
1380
1392
  .overflow-groups {
1381
1393
  display: grid;
1382
1394
  gap: 20px;
1383
1395
  }
1384
- [part="overflow-group-heading"] {
1396
+ [part~="overflow-group-heading"] {
1385
1397
  margin: 0 0 6px;
1386
1398
  padding-inline: 12px;
1387
1399
  font-size: var(--nook-text-xs);
@@ -1389,7 +1401,7 @@ textarea:focus-visible {
1389
1401
  line-height: 1.4;
1390
1402
  color: var(--nook-muted);
1391
1403
  }
1392
- [part="overflow-group-body"] {
1404
+ [part~="overflow-group-body"] {
1393
1405
  display: grid;
1394
1406
  gap: 4px;
1395
1407
  }
@@ -1417,10 +1429,10 @@ textarea:focus-visible {
1417
1429
  }
1418
1430
 
1419
1431
  @media (hover: hover) and (pointer: fine) {
1420
- .anchor[data-numbering] .surface:not([data-view="commands"]):not([data-view="full"]):not([data-view="all"]):has(.item:not([hidden])) {
1432
+ .anchor[data-numbering] .surface:not([data-view="root"]):not([data-view="commands"]):not([data-view="full"]):not([data-view="all"]):has(.item:not([hidden])) {
1421
1433
  width: min(var(--nook-keyboard-width, 320px), calc(var(--nook-bound-width, 100vw) - 32px));
1422
1434
  }
1423
- .anchor[data-numbering] .surface:not([data-view="full"]):not([data-view="all"]) > [part="body"] > .items {
1435
+ .anchor[data-numbering] .surface:not([data-view="full"]):not([data-view="all"]) > [part~="body"] > .items {
1424
1436
  display: grid;
1425
1437
  grid-template-columns: minmax(0, 1fr);
1426
1438
  gap: 4px;
@@ -1465,8 +1477,8 @@ textarea:focus-visible {
1465
1477
  grid-row: 1 / span 2;
1466
1478
  align-self: center;
1467
1479
  }
1468
- .anchor[data-numbering] [part="command-name"],
1469
- .anchor[data-numbering] .command-result [part="command-description"] { grid-column: 2; }
1480
+ .anchor[data-numbering] [part~="command-name"],
1481
+ .anchor[data-numbering] .command-result [part~="command-description"] { grid-column: 2; }
1470
1482
  .anchor[data-numbering] .command-result kbd { grid-column: 3; }
1471
1483
  }
1472
1484
 
@@ -1516,8 +1528,8 @@ textarea:focus-visible {
1516
1528
  [data-corner="right-center"] .surface[data-view="commands"] {
1517
1529
  height: min(var(--nook-command-height, 480px), calc(var(--nook-bound-height, 100dvh) - 32px));
1518
1530
  }
1519
- [data-corner="left-center"] .surface[data-view="commands"] > [part="body"],
1520
- [data-corner="right-center"] .surface[data-view="commands"] > [part="body"] { flex: 1; }
1531
+ [data-corner="left-center"] .surface[data-view="commands"] > [part~="body"],
1532
+ [data-corner="right-center"] .surface[data-view="commands"] > [part~="body"] { flex: 1; }
1521
1533
  @media (pointer: coarse), (hover: none) {
1522
1534
  .anchor[data-corner$="center"] .surface[data-presentation="expanded"] {
1523
1535
  inset: 0; translate: none; max-width: none; max-height: none; width: var(--nook-bound-width, 100vw); height: var(--nook-bound-height, 100dvh);
@@ -1532,17 +1544,17 @@ header h2 {
1532
1544
  overflow: auto;
1533
1545
  }
1534
1546
  header > button { flex: none; }
1535
- .setting > [part="setting-label"], .setting small, .content,
1536
- [part="command-name"], [part="command-description"],
1537
- [part="command-arg-label"], [part="group-heading"],
1538
- [part="overflow-group-heading"], [part="enum-option-text"],
1539
- [part="enum-option-label"], [part="enum-option-description"] {
1547
+ .setting > [part~="setting-label"], .setting small, .content,
1548
+ [part~="command-name"], [part~="command-description"],
1549
+ [part~="command-arg-label"], [part~="group-heading"],
1550
+ [part~="overflow-group-heading"], [part~="enum-option-text"],
1551
+ [part~="enum-option-label"], [part~="enum-option-description"] {
1540
1552
  min-width: 0;
1541
1553
  overflow-wrap: anywhere;
1542
1554
  }
1543
1555
  .setting input { min-width: 0; }
1544
- [part="enum-option-text"] { flex: 1; }
1545
- [part="enum-selected-label"] { min-width: 0; }
1556
+ [part~="enum-option-text"] { flex: 1; }
1557
+ [part~="enum-selected-label"] { min-width: 0; }
1546
1558
  .surface[data-presentation="expanded"] .item-label {
1547
1559
  white-space: normal;
1548
1560
  overflow-wrap: anywhere;
@@ -1557,8 +1569,8 @@ header > button { flex: none; }
1557
1569
  .surface[data-presentation="expanded"]:not([data-view="commands"]) { overflow: hidden; }
1558
1570
  .surface[data-presentation="expanded"]:not([data-view="commands"]) > header,
1559
1571
  .surface:is([data-view="full"], [data-view="all"])[data-presentation="compact"] > header { flex: none; }
1560
- .surface[data-presentation="expanded"]:not([data-view="commands"]) > [part="body"],
1561
- .surface:is([data-view="full"], [data-view="all"])[data-presentation="compact"] > [part="body"] {
1572
+ .surface[data-presentation="expanded"]:not([data-view="commands"]) > [part~="body"],
1573
+ .surface:is([data-view="full"], [data-view="all"])[data-presentation="compact"] > [part~="body"] {
1562
1574
  min-height: 0;
1563
1575
  overflow: auto;
1564
1576
  overscroll-behavior: contain;
@@ -1569,7 +1581,7 @@ header > button { flex: none; }
1569
1581
  .command-result { grid-template-columns: minmax(0, 1fr) fit-content(40%); }
1570
1582
  .command-result kbd { min-width: 0; max-width: 100%; white-space: normal; overflow-wrap: anywhere; }
1571
1583
  .feedback-types button, .feedback-tools button { max-width: 100%; overflow-wrap: anywhere; }
1572
- [part="feedback-preview"] { flex: none; }
1584
+ [part~="feedback-preview"] { flex: none; }
1573
1585
  @media (max-width: 420px) {
1574
1586
  .setting:has(.enum-control), .setting:has(input:not([type="checkbox"])) {
1575
1587
  flex-direction: column;
@@ -1581,12 +1593,12 @@ header > button { flex: none; }
1581
1593
  .setting input[type="checkbox"] { margin-block-start: 2px; }
1582
1594
  }
1583
1595
  @media (pointer: coarse), (hover: none) {
1584
- .surface[data-presentation="expanded"]:not([data-view="commands"]) > [part="body"] { flex: 1; }
1596
+ .surface[data-presentation="expanded"]:not([data-view="commands"]) > [part~="body"] { flex: 1; }
1585
1597
  }
1586
1598
  @media (hover: hover) and (pointer: fine) {
1587
- .anchor[data-numbering] .surface:not([data-view="commands"]) { display: flex; flex-direction: column; }
1599
+ .anchor[data-numbering] .surface:not([data-view="commands"]):not([data-view="root"]) { display: flex; flex-direction: column; }
1588
1600
  .anchor[data-numbering] .surface:not([data-view="commands"]) > header { flex: none; }
1589
- .anchor[data-numbering] .surface:not([data-view="commands"]) > [part="body"] { min-height: 0; overflow: auto; }
1601
+ .anchor[data-numbering] .surface:not([data-view="commands"]) > [part~="body"] { min-height: 0; overflow: auto; }
1590
1602
  .anchor[data-numbering] .command-result { grid-template-columns: auto minmax(0,1fr) fit-content(34%); }
1591
1603
  }
1592
1604
 
@@ -1596,8 +1608,8 @@ header > button { flex: none; }
1596
1608
  flex-direction: column;
1597
1609
  }
1598
1610
  .surface[data-layout="list"] > header { flex: none; }
1599
- .surface[data-layout="list"] > [part="body"],
1600
- .surface[data-view="root"][data-presentation="compact"]:has(.setting) > [part="body"] {
1611
+ .surface[data-layout="list"] > [part~="body"],
1612
+ .surface[data-view="root"][data-presentation="compact"]:has(.setting) > [part~="body"] {
1601
1613
  min-height: 0;
1602
1614
  overflow: auto;
1603
1615
  overscroll-behavior: contain;
@@ -1606,7 +1618,7 @@ header > button { flex: none; }
1606
1618
  .surface[data-layout="list"] .items,
1607
1619
  .surface[data-layout="list"] .groups,
1608
1620
  .surface[data-layout="list"] .group-body { grid-template-columns: minmax(0, 1fr); }
1609
- .surface[data-layout="list"][data-presentation="compact"] > [part="body"] > .items { display: grid; }
1621
+ .surface[data-layout="list"][data-presentation="compact"] > [part~="body"] > .items { display: grid; }
1610
1622
  .surface[data-layout="list"] .item { flex-direction: row; justify-content: flex-start; gap: 12px; padding: 10px 12px; text-align: start; }
1611
1623
  .surface[data-layout="list"] .item-label { display: block; flex: 1; min-width: 0; max-width: none; white-space: normal; overflow-wrap: anywhere; font-size: var(--nook-text-sm); }
1612
1624
  @media (pointer: coarse), (hover: none) {
@@ -1621,36 +1633,36 @@ header h2 {
1621
1633
  max-height: min(calc(var(--nook-heading-lines, 4) * 1.25em), calc(var(--nook-bound-height, 100dvh) * .3));
1622
1634
  overflow: hidden;
1623
1635
  }
1624
- [part="setting-name"], .setting small,
1625
- [part="command-name"], [part="command-description"],
1626
- [part="enum-option-label"], [part="enum-option-description"],
1627
- [part="group-heading"], [part="overflow-group-heading"],
1628
- [part="feedback-attachment-name"] {
1636
+ [part~="setting-name"], .setting small,
1637
+ [part~="command-name"], [part~="command-description"],
1638
+ [part~="enum-option-label"], [part~="enum-option-description"],
1639
+ [part~="group-heading"], [part~="overflow-group-heading"],
1640
+ [part~="feedback-attachment-name"] {
1629
1641
  display: -webkit-box;
1630
1642
  -webkit-box-orient: vertical;
1631
1643
  overflow: hidden;
1632
1644
  overflow-wrap: anywhere;
1633
1645
  }
1634
- [part="setting-name"], [part="enum-option-label"] {
1646
+ [part~="setting-name"], [part~="enum-option-label"] {
1635
1647
  -webkit-line-clamp: var(--nook-label-lines, 3);
1636
1648
  line-height: 1.4;
1637
1649
  max-height: calc(var(--nook-label-lines, 3) * 1.4em);
1638
1650
  }
1639
- .setting small, [part="enum-option-description"], [part="command-description"] {
1651
+ .setting small, [part~="enum-option-description"], [part~="command-description"] {
1640
1652
  -webkit-line-clamp: var(--nook-description-lines, 3);
1641
1653
  line-height: 1.5;
1642
1654
  max-height: calc(var(--nook-description-lines, 3) * 1.5em);
1643
1655
  }
1644
- [part="command-name"] {
1656
+ [part~="command-name"] {
1645
1657
  -webkit-line-clamp: var(--nook-command-name-lines, 2);
1646
1658
  max-height: calc(var(--nook-command-name-lines, 2) * 1.4em);
1647
1659
  }
1648
- [part="group-heading"], [part="overflow-group-heading"] {
1660
+ [part~="group-heading"], [part~="overflow-group-heading"] {
1649
1661
  -webkit-line-clamp: var(--nook-group-lines, 2);
1650
1662
  line-height: 1.4;
1651
1663
  max-height: calc(var(--nook-group-lines, 2) * 1.4em);
1652
1664
  }
1653
- [part="feedback-attachment-name"] {
1665
+ [part~="feedback-attachment-name"] {
1654
1666
  -webkit-line-clamp: var(--nook-filename-lines, 2);
1655
1667
  line-height: 1.5;
1656
1668
  max-height: calc(var(--nook-filename-lines, 2) * 1.5em);
@@ -1728,7 +1740,7 @@ header h2 {
1728
1740
  @media (pointer: coarse), (hover: none) { .tooltip { display: none; } }
1729
1741
 
1730
1742
  header h2 { margin-block-start: max(0px, calc((44px - 1.25em) / 2)); }
1731
- [part="command-arg-label"] {
1743
+ [part~="command-arg-label"] {
1732
1744
  display: -webkit-box;
1733
1745
  -webkit-box-orient: vertical;
1734
1746
  -webkit-line-clamp: var(--nook-label-lines, 3);
@@ -1736,7 +1748,7 @@ header h2 { margin-block-start: max(0px, calc((44px - 1.25em) / 2)); }
1736
1748
  max-height: calc(var(--nook-label-lines, 3) * 1.4em);
1737
1749
  overflow: hidden;
1738
1750
  }
1739
- [part="feedback-type"] {
1751
+ [part~="feedback-type"] {
1740
1752
  display: -webkit-box;
1741
1753
  -webkit-box-orient: vertical;
1742
1754
  -webkit-line-clamp: var(--nook-label-lines, 3);
@@ -1744,7 +1756,7 @@ header h2 { margin-block-start: max(0px, calc((44px - 1.25em) / 2)); }
1744
1756
  max-height: calc(var(--nook-label-lines, 3) * 1.4em + 16px);
1745
1757
  overflow: hidden;
1746
1758
  }
1747
- [part="feedback-success-message"] {
1759
+ [part~="feedback-success-message"] {
1748
1760
  display: -webkit-box;
1749
1761
  -webkit-box-orient: vertical;
1750
1762
  -webkit-line-clamp: 6;
@@ -1753,7 +1765,7 @@ header h2 { margin-block-start: max(0px, calc((44px - 1.25em) / 2)); }
1753
1765
  overflow: hidden;
1754
1766
  }
1755
1767
 
1756
- slot[part="app"] { display: contents; }
1768
+ slot[part~="app"] { display: contents; }
1757
1769
  .boundary-measure {
1758
1770
  margin-top: var(--nook-inset-top, 0px); margin-right: var(--nook-inset-right, 0px);
1759
1771
  margin-bottom: var(--nook-inset-bottom, 0px); margin-left: var(--nook-inset-left, 0px);
@@ -1765,7 +1777,7 @@ slot[part="app"] { display: contents; }
1765
1777
  .overlay-anchor:is([data-corner="top-center"],[data-corner="bottom-center"]) { width: 64px; height: 48px; }
1766
1778
  .overlay-anchor:is([data-corner="left-center"],[data-corner="right-center"]) { width: 48px; height: 64px; }
1767
1779
  .preview, .landing-zone { z-index: var(--nook-drag-z, var(--nook-overlay-z, var(--nook-z))); }
1768
- :host([data-capture-mode]) [part="handle"] { visibility: hidden; pointer-events: none; }
1780
+ :host([data-capture-mode]) [part~="handle"] { visibility: hidden; pointer-events: none; }
1769
1781
  @media (pointer: coarse), (hover: none) {
1770
1782
  .anchor .surface[data-presentation="expanded"],
1771
1783
  .anchor[data-corner$="center"] .surface[data-presentation="expanded"] {
@@ -1803,23 +1815,24 @@ slot[part="app"] { display: contents; }
1803
1815
  }
1804
1816
  .capture-controls { display: flex; gap: 4px; align-items: center; }
1805
1817
  .capture-controls > button { min-width: 0; min-height: 44px; padding: 8px 12px; font-size: var(--nook-text-sm); overflow-wrap: anywhere; }
1806
- .capture-controls > [part="capture-done"] { margin-inline-start: auto; }
1807
- [part="capture-snapshot"] { flex: 1; }
1808
- [part="capture-review"] { display: inline-flex; align-items: center; justify-content: center; gap: 6px; font-variant-numeric: tabular-nums; }
1809
- [part="capture-review-icon"] svg { display: block; width: 18px; height: 18px; }
1818
+ .capture-controls > [part~="capture-done"] { margin-inline-start: auto; }
1819
+ [part~="capture-snapshot"] { flex: 1; }
1820
+ [part~="capture-review"] { display: inline-flex; align-items: center; justify-content: center; gap: 6px; font-variant-numeric: tabular-nums; }
1821
+ [part~="capture-review-icon"] svg { display: block; width: 18px; height: 18px; }
1810
1822
  .capture-status:not([data-error="true"]) { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
1811
1823
  .capture-status { margin: 4px 0 0; color: var(--nook-muted); font-size: var(--nook-text-xs); line-height: 1.5; overflow-wrap: anywhere; }
1812
1824
  .capture-status:empty { display: none; }
1813
1825
  .capture-status[data-error="true"] { color: var(--nook-error-color, light-dark(#a82843,#ff9cb1)); }
1826
+ [part~="capture-hide-previews"] { justify-self: end; min-height: 44px; padding: 8px 12px; font-size: var(--nook-text-sm); }
1814
1827
  .capture-gallery { margin-top: 12px; display: grid; gap: 12px; }
1815
1828
  .capture-preview-image { width: 100%; max-height: min(320px, 40dvh); object-fit: contain; background: var(--nook-surface); border-radius: 8px; }
1816
1829
  .capture-thumbnails { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 8px; }
1817
1830
  .capture-thumbnail { min-width: 0; display: grid; gap: 4px; }
1818
- [part="capture-preview"] { min-width: 0; border: 1px solid var(--nook-border); border-radius: 8px; padding: 4px; background: var(--nook-surface); color: var(--nook-text); }
1819
- [part="capture-preview"][aria-pressed="true"] { border-color: var(--nook-accent); }
1820
- [part="capture-thumbnail-image"] { display: block; width: 100%; height: 48px; object-fit: cover; border-radius: 4px; }
1821
- [part="capture-thumbnail-label"] { display: block; margin-top: 4px; font-size: var(--nook-text-xs); overflow-wrap: anywhere; }
1822
- [part="capture-remove"] { min-height: 36px; padding: 4px; border-radius: 6px; background: transparent; color: var(--nook-muted); font-size: var(--nook-text-xs); }
1831
+ [part~="capture-preview"] { min-width: 0; border: 1px solid var(--nook-border); border-radius: 8px; padding: 4px; background: var(--nook-surface); color: var(--nook-text); }
1832
+ [part~="capture-preview"][aria-pressed="true"] { border-color: var(--nook-accent); }
1833
+ [part~="capture-thumbnail-image"] { display: block; width: 100%; height: 48px; object-fit: cover; border-radius: 4px; }
1834
+ [part~="capture-thumbnail-label"] { display: block; margin-top: 4px; font-size: var(--nook-text-xs); overflow-wrap: anywhere; }
1835
+ [part~="capture-remove"] { min-height: 36px; padding: 4px; border-radius: 6px; background: transparent; color: var(--nook-muted); font-size: var(--nook-text-xs); }
1823
1836
  .swipe-dial {
1824
1837
  position: fixed;
1825
1838
  inset: var(--nook-bound-top,0px) var(--nook-bound-right,0px) var(--nook-bound-bottom,0px) var(--nook-bound-left,0px);
@@ -1829,10 +1842,9 @@ slot[part="app"] { display: contents; }
1829
1842
  }
1830
1843
  .swipe-dial::before {
1831
1844
  content: ""; position: absolute; inset: 0;
1832
- background: color-mix(in srgb,var(--nook-surface) 18%,transparent);
1833
- -webkit-backdrop-filter: blur(calc(var(--nook-dial-progress,0) * 3px));
1834
- backdrop-filter: blur(calc(var(--nook-dial-progress,0) * 3px));
1835
- mask-image: radial-gradient(circle at var(--nook-dial-origin-x) var(--nook-dial-origin-y), transparent 0 56px, black 76px);
1845
+ background: var(--nook-material-background);
1846
+ -webkit-backdrop-filter: blur(calc(var(--nook-dial-progress,0) * var(--nook-material-blur)));
1847
+ backdrop-filter: blur(calc(var(--nook-dial-progress,0) * var(--nook-material-blur)));
1836
1848
  }
1837
1849
  .swipe-dial-option {
1838
1850
  position: absolute; translate: -50% -50%; box-sizing: border-box; width: 88px; height: 72px; padding: 8px;
@@ -1841,23 +1853,23 @@ slot[part="app"] { display: contents; }
1841
1853
  box-shadow: var(--nook-shadow); opacity: .72; transition: transform 100ms ease,opacity 100ms ease,background 100ms ease;
1842
1854
  }
1843
1855
  .swipe-dial-option[data-selected] { transform: scale(1.08); opacity: 1; background: var(--nook-accent); color: var(--nook-on-accent); }
1844
- [part="swipe-dial-icon"] svg { display: block; width: 20px; height: 20px; }
1845
- [part="swipe-dial-label"] { font-size: var(--nook-text-xs); line-height: 1.2; text-align: center; overflow-wrap: anywhere; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; max-height: 2.4em; overflow: hidden; }
1846
- [part="settings-footer"] {
1856
+ [part~="swipe-dial-icon"] svg { display: block; width: 20px; height: 20px; }
1857
+ [part~="swipe-dial-label"] { font-size: var(--nook-text-xs); line-height: 1.2; text-align: center; overflow-wrap: anywhere; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; max-height: 2.4em; overflow: hidden; }
1858
+ [part~="settings-footer"] {
1847
1859
  padding-top: var(--nook-settings-footer-gap, 12px);
1848
1860
  margin-top: 4px;
1849
1861
  border-top: 1px solid var(--nook-border);
1850
1862
  }
1851
- [part="settings-footer"]:first-child { border-top: 0; margin-top: 0; padding-top: 0; }
1852
- [part="settings-link"] {
1863
+ [part~="settings-footer"]:first-child { border-top: 0; margin-top: 0; padding-top: 0; }
1864
+ [part~="settings-link"] {
1853
1865
  display: flex; align-items: center; min-height: 44px;
1854
1866
  padding: 8px 4px; border-radius: 8px;
1855
1867
  color: var(--nook-settings-link-color, var(--nook-accent));
1856
1868
  font-size: var(--nook-text-sm); font-weight: var(--nook-label-weight);
1857
1869
  line-height: var(--nook-line-height); text-decoration: none; overflow-wrap: anywhere;
1858
1870
  }
1859
- [part="settings-link"]:hover { text-decoration: underline; text-underline-offset: .2em; }
1860
- [part="settings-link"]:focus-visible { outline: 2px solid var(--nook-accent); outline-offset: 2px; }
1871
+ [part~="settings-link"]:hover { text-decoration: underline; text-underline-offset: .2em; }
1872
+ [part~="settings-link"]:focus-visible { outline: 2px solid var(--nook-accent); outline-offset: 2px; }
1861
1873
  /* Form surfaces get their own readable widths instead of the icon-menu width. */
1862
1874
  .surface[data-view="settings"][data-presentation="compact"] {
1863
1875
  width: min(var(--nook-settings-width, var(--nook-width, 420px)), calc(var(--nook-bound-width, 100vw) - 32px));
@@ -1873,4 +1885,76 @@ slot[part="app"] { display: contents; }
1873
1885
  width: min(var(--nook-feedback-width, var(--nook-width, 520px)), calc(var(--nook-bound-width, 100vw) - 32px));
1874
1886
  }
1875
1887
  }
1888
+ /* The root is the same persistent dial used by a held swipe. */
1889
+ .anchor .surface[data-view="root"] {
1890
+ position: fixed; inset: var(--nook-bound-top,0px) var(--nook-bound-right,0px) var(--nook-bound-bottom,0px) var(--nook-bound-left,0px);
1891
+ width: auto; height: auto; max-width: none; max-height: none;
1892
+ margin: 0; padding: 0; border: 0; border-radius: 0; background: transparent;
1893
+ box-shadow: none; overflow: visible; translate: none; transform: none;
1894
+ pointer-events: none; display: block; isolation: isolate;
1895
+ -webkit-backdrop-filter: none; backdrop-filter: none;
1896
+ opacity: var(--nook-dial-progress,1);
1897
+ }
1898
+ .anchor .surface[data-view="root"] > header { display: none; }
1899
+ .anchor .surface[data-view="root"] > [part~="body"],
1900
+ .anchor .surface[data-view="root"] .items {
1901
+ display: contents; pointer-events: none; padding: 0; margin: 0; max-width: none;
1902
+ }
1903
+ .anchor .surface[data-view="root"]::before {
1904
+ position: absolute; inset: 0; border: 0; border-radius: 0; box-shadow: none;
1905
+ background: var(--nook-material-background);
1906
+ -webkit-backdrop-filter: blur(var(--nook-material-blur)); backdrop-filter: blur(var(--nook-material-blur));
1907
+ }
1908
+ .anchor .surface[data-view="root"] .item {
1909
+ position: absolute; left: var(--nook-dial-x); top: var(--nook-dial-y);
1910
+ translate: -50% -50%; transform: none; width: 56px; height: 56px; min-height: 56px;
1911
+ flex: none; display: flex; align-items: center; justify-content: center; padding: 0; gap: 0;
1912
+ pointer-events: auto; touch-action: manipulation; user-select: none; -webkit-touch-callout: none; border: 1px solid var(--nook-border); border-radius: 50%;
1913
+ background: var(--nook-surface); box-shadow: var(--nook-shadow);
1914
+ }
1915
+ .anchor .surface[data-view="root"] .item[data-dial-hidden] { display: none !important; }
1916
+ .anchor .surface[data-view="root"] .dial-caption {
1917
+ position: absolute; left: calc(50% + var(--nook-caption-x, 0px)); top: calc(50% + var(--nook-caption-y, -64px));
1918
+ translate: -50% -50%; width: max-content; max-width: 96px;
1919
+ display: var(--nook-label-display,block); padding: 4px 8px; pointer-events: auto;
1920
+ border: 1px solid var(--nook-border); border-radius: 8px;
1921
+ color: var(--nook-text); background: var(--nook-surface); box-shadow: var(--nook-shadow);
1922
+ }
1923
+ .anchor .surface[data-view="root"] .item .item-label {
1924
+ position: static; display: -webkit-box; flex: none; width: auto; max-width: 100%; max-height: 2.8em;
1925
+ padding: 0; margin: 0; white-space: normal; text-align: center;
1926
+ font-size: var(--nook-text-xs); line-height: 1.4;
1927
+ -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; overflow-wrap: anywhere;
1928
+ }
1929
+ .anchor[data-numbering] .surface[data-view="root"] .dial-caption,
1930
+ .anchor .surface[data-view="root"][data-labels] .dial-caption,
1931
+ .anchor .surface[data-view="root"][data-preview] .dial-caption,
1932
+ .anchor .surface[data-view="root"] .item:active .dial-caption { display: block; }
1933
+ .anchor .surface[data-view="root"] .item .number {
1934
+ position: absolute; inset: -5px -5px auto auto; min-width: 22px; height: 22px;
1935
+ padding: 0 4px; font: var(--nook-text-xs)/20px var(--nook-font); border-radius: 6px;
1936
+ }
1937
+ .anchor .surface[data-view="root"] .item[data-selected] { transform: scale(1.08); background: var(--nook-accent); color: var(--nook-on-accent); }
1938
+ .anchor .surface[data-view="root"][data-preview] .tooltip,
1939
+ .anchor .surface[data-view="root"][data-labels] .tooltip { display: none; }
1940
+
1941
+ .anchor .surface[data-view="root"] .item:focus-visible { outline-offset: 1px; }
1942
+
1943
+ .anchor .surface[data-view="root"] { animation: reveal var(--nook-duration) ease-out; }
1944
+ .anchor .surface[data-view="root"][data-preview] { animation: none; }
1945
+ .tutorial-badge {
1946
+ position: absolute; top: 1px; right: 1px; width: 10px; height: 10px;
1947
+ border: 2px solid var(--nook-surface); border-radius: 50%; background: var(--nook-accent);
1948
+ box-shadow: 0 0 0 1px var(--nook-border); pointer-events: none;
1949
+ animation: tutorial-bead 900ms ease-out 2;
1950
+ }
1951
+ @keyframes tutorial-bead { 50% { box-shadow: 0 0 0 5px color-mix(in srgb,var(--nook-accent) 18%,transparent); } }
1952
+ .tutorial-shortcuts { margin: 0 0 16px; display: grid; gap: 8px; }
1953
+ .tutorial-shortcuts > div { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; }
1954
+ .tutorial-shortcuts dt { min-width: 0; font-size: var(--nook-text-sm); font-weight: var(--nook-label-weight); overflow-wrap: anywhere; }
1955
+ .tutorial-shortcuts dd { margin: 0; min-width: 0; text-align: end; }
1956
+ .tutorial-shortcuts kbd { font-size: var(--nook-text-xs); overflow-wrap: anywhere; white-space: normal; }
1957
+ ${tutorialGraphicsStyles}
1958
+
1959
+ .anchor .surface[data-view="root"] .item[data-caption-visible] .tooltip { display: none; }
1876
1960
  `;