@master/internal-site 0.1.2 → 0.1.3

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 (183) hide show
  1. package/README.md +6 -0
  2. package/dist/astro.mjs +145 -10
  3. package/package.json +1 -1
  4. package/src/astro/index.ts +2 -0
  5. package/src/astro/routes.template.ts +1 -0
  6. package/src/astro/style-assets.ts +107 -0
  7. package/src/benchmarks/BenchmarkBarRows.astro +3 -2
  8. package/src/benchmarks/BenchmarkBars.astro +1 -1
  9. package/src/benchmarks/BenchmarkChart.astro +1 -0
  10. package/src/benchmarks/BenchmarkChartGroup.astro +1 -1
  11. package/src/benchmarks/BenchmarkDataTable.astro +1 -1
  12. package/src/benchmarks/BenchmarkFigure.astro +2 -1
  13. package/src/benchmarks/BenchmarkMetricTable.astro +1 -1
  14. package/src/benchmarks/BenchmarkMetrics.astro +1 -1
  15. package/src/benchmarks/BenchmarkSampleSummary.astro +1 -1
  16. package/src/benchmarks/BenchmarkScrollRegion.svelte +2 -1
  17. package/src/benchmarks/BenchmarkSource.astro +1 -1
  18. package/src/benchmarks/BenchmarkStackedBars.astro +2 -1
  19. package/src/benchmarks/types.ts +2 -0
  20. package/src/blog/article/BlogArticleContents.svelte +1 -1
  21. package/src/blog/article/BlogArticleMasthead.astro +12 -1
  22. package/src/css/NamespaceUtilityTable.astro +1 -1
  23. package/src/css/ThemeNumberVariableTable.astro +1 -1
  24. package/src/css/markdown.ts +14 -5
  25. package/src/demo/Demo.svelte +4 -0
  26. package/src/demo/DemoAsset.astro +1 -0
  27. package/src/demo/DemoCatalog.astro +1 -0
  28. package/src/demo/DemoComparison.svelte +3 -0
  29. package/src/demo/DemoContainer.svelte +3 -0
  30. package/src/demo/DemoControls.svelte +2 -0
  31. package/src/demo/DemoCopyButton.svelte +3 -0
  32. package/src/demo/DemoCopyGroup.svelte +2 -0
  33. package/src/demo/DemoFeatureSupport.svelte +2 -0
  34. package/src/demo/DemoGeneratedCSS.svelte +2 -0
  35. package/src/demo/DemoIndex.astro +1 -0
  36. package/src/demo/DemoMotion.svelte +1 -0
  37. package/src/demo/DemoScrollArea.svelte +2 -0
  38. package/src/demo/DemoStyleComparison.astro +1 -0
  39. package/src/demo/DemoSurface.svelte +2 -0
  40. package/src/demo/DemoThemeComparison.astro +1 -0
  41. package/src/demo/DemoTokenTable.astro +1 -1
  42. package/src/demo/DemoViewport.svelte +5 -0
  43. package/src/demo/DemoWaterfall.astro +1 -1
  44. package/src/demo/foundations/FoundationDialog.astro +1 -0
  45. package/src/demo/foundations/FoundationMedia.astro +1 -0
  46. package/src/demo/foundations/FoundationShrink.astro +1 -0
  47. package/src/demo/foundations/Palette.svelte +2 -0
  48. package/src/demo/illustration-materials.ts +1 -1
  49. package/src/demo/illustration.css +218 -0
  50. package/src/docs-shell/components/ArticleHeader.astro +2 -0
  51. package/src/docs-shell/components/Callout.astro +1 -0
  52. package/src/docs-shell/components/CodeCopyButton.astro +2 -0
  53. package/src/docs-shell/components/CodeTabBar.astro +2 -0
  54. package/src/docs-shell/components/CodeTabs.astro +2 -1
  55. package/src/docs-shell/components/CodeView.astro +1 -1
  56. package/src/docs-shell/components/DocHeader.svelte +10 -13
  57. package/src/docs-shell/components/DocMenuButton.svelte +126 -60
  58. package/src/docs-shell/components/DocSidebar.svelte +2 -0
  59. package/src/docs-shell/components/DocVersionSelect.svelte +2 -0
  60. package/src/docs-shell/components/DocumentAPIIndex.astro +1 -1
  61. package/src/docs-shell/components/DocumentChoices.astro +1 -1
  62. package/src/docs-shell/components/DocumentCodeExampleView.astro +3 -1
  63. package/src/docs-shell/components/DocumentCodeTable.astro +1 -1
  64. package/src/docs-shell/components/DocumentCopyButton.svelte +3 -0
  65. package/src/docs-shell/components/DocumentDisclosure.astro +2 -0
  66. package/src/docs-shell/components/DocumentFileTree.astro +3 -0
  67. package/src/docs-shell/components/DocumentFlow.astro +4 -1
  68. package/src/docs-shell/components/DocumentIllustration.astro +5 -11
  69. package/src/docs-shell/components/DocumentKeyList.astro +1 -1
  70. package/src/docs-shell/components/DocumentNamespaceTable.astro +1 -1
  71. package/src/docs-shell/components/DocumentOptionEntry.astro +0 -1
  72. package/src/docs-shell/components/DocumentOptionList.astro +1 -1
  73. package/src/docs-shell/components/DocumentOptions.astro +0 -1
  74. package/src/docs-shell/components/DocumentParameters.astro +1 -1
  75. package/src/docs-shell/components/DocumentPrompt.astro +2 -0
  76. package/src/docs-shell/components/DocumentValueList.astro +1 -1
  77. package/src/docs-shell/components/DocumentationIndex.svelte +2 -0
  78. package/src/docs-shell/components/ExpandContent.svelte +3 -0
  79. package/src/docs-shell/components/ExplorerView.astro +1 -0
  80. package/src/docs-shell/components/GeneratedCSS.astro +1 -0
  81. package/src/docs-shell/components/Header.svelte +1 -1
  82. package/src/docs-shell/components/InlineCode.astro +1 -0
  83. package/src/docs-shell/components/InteractingIndicator.astro +1 -0
  84. package/src/docs-shell/components/LanguageButton.svelte +1 -0
  85. package/src/docs-shell/components/LanguageSelect.svelte +2 -0
  86. package/src/docs-shell/components/NotFound.astro +3 -0
  87. package/src/docs-shell/components/PMAction.astro +1 -0
  88. package/src/docs-shell/components/PageContent.svelte +1 -1
  89. package/src/docs-shell/components/PageContentDisclosure.astro +2 -1
  90. package/src/docs-shell/components/PageContentList.svelte +2 -0
  91. package/src/docs-shell/components/PageNavs.astro +1 -0
  92. package/src/docs-shell/components/SearchButton.svelte +3 -0
  93. package/src/docs-shell/components/SearchDialog.svelte +6 -1
  94. package/src/docs-shell/components/Segments.svelte +2 -0
  95. package/src/docs-shell/components/StepSection.astro +1 -2
  96. package/src/docs-shell/components/Tabs.astro +1 -0
  97. package/src/docs-shell/components/ThemeSelect.svelte +2 -0
  98. package/src/docs-shell/components/markdown/Table.astro +1 -0
  99. package/src/docs-shell/components/markdown-components.ts +0 -1
  100. package/src/docs-shell/remark/markdown-components.js +28 -7
  101. package/src/docs-shell/scripts/document.ts +1 -1
  102. package/src/docs-shell/types/Metadata.ts +11 -0
  103. package/src/docs-shell/utils/generate-metadata.ts +3 -1
  104. package/src/docs-shell/utils/head.ts +5 -2
  105. package/src/examples/components/ArticleTransitionScene.svelte +4 -0
  106. package/src/examples/layout-system/page.astro +0 -1
  107. package/src/home/HomeBentoFrame.astro +1 -0
  108. package/src/home/HomeBentoGrid.astro +1 -0
  109. package/src/home/bento.css +167 -0
  110. package/src/home/design.css +1 -1
  111. package/src/home/home.css +4 -576
  112. package/src/home/segmented-control.css +94 -0
  113. package/src/layouts/Document.astro +3 -1
  114. package/src/public/icons/json.svg +1 -0
  115. package/src/scripts/atomic-class-authoring.ts +98 -0
  116. package/src/scripts/style-delivery.mjs +110 -0
  117. package/src/sections/blog.astro +1 -1
  118. package/src/sections/guide.astro +1 -2
  119. package/src/styles/blog-article.css +10 -7
  120. package/src/styles/blog-materials.css +13 -0
  121. package/src/styles/demo.css +0 -1
  122. package/src/styles/docs-shell/code.css +5 -61
  123. package/src/styles/docs-shell/documentation-search.css +1 -0
  124. package/src/styles/docs-shell/header.css +2 -73
  125. package/src/styles/docs-shell/menu.css +37 -17
  126. package/src/styles/docs-shell/page-content.css +2 -37
  127. package/src/styles/docs-shell/prose.css +18 -9
  128. package/src/styles/docs-shell/steps.css +2 -39
  129. package/src/styles/document-comparison.css +5 -2
  130. package/src/styles/documentation-illustration.css +1 -9
  131. package/src/styles/documentation-index.css +2 -1
  132. package/src/styles/documents.css +2 -4
  133. package/src/styles/interface.css +5 -3
  134. package/src/styles/system/DESIGN.md +34 -14
  135. package/src/styles/system/browser.css +21 -0
  136. package/src/styles/system/button-feedback.css +13 -0
  137. package/src/styles/system/callout.css +14 -0
  138. package/src/styles/system/chart.css +18 -0
  139. package/src/styles/system/checks.css +18 -0
  140. package/src/styles/system/code-panel.css +82 -0
  141. package/src/styles/system/code-tabs.css +40 -0
  142. package/src/styles/system/code.css +8 -85
  143. package/src/styles/system/compare.css +7 -0
  144. package/src/styles/system/controls.css +10 -109
  145. package/src/styles/system/copy.css +32 -0
  146. package/src/styles/system/data.css +10 -134
  147. package/src/styles/system/dialog.css +16 -0
  148. package/src/styles/system/disclosure.css +19 -0
  149. package/src/styles/system/expand.css +11 -0
  150. package/src/styles/system/fields.css +25 -0
  151. package/src/styles/system/header-core.css +101 -0
  152. package/src/styles/system/hint.css +5 -0
  153. package/src/styles/system/index.css +13 -0
  154. package/src/styles/system/inline-code.css +4 -0
  155. package/src/styles/system/kbd.css +4 -0
  156. package/src/styles/system/logos.css +10 -0
  157. package/src/styles/system/menu.css +14 -0
  158. package/src/styles/system/metrics.css +22 -0
  159. package/src/styles/system/pagehead.css +13 -0
  160. package/src/styles/system/pager.css +13 -0
  161. package/src/styles/system/parameters.css +17 -0
  162. package/src/styles/system/prompt.css +7 -0
  163. package/src/styles/system/prose.css +4 -75
  164. package/src/styles/system/range.css +12 -0
  165. package/src/styles/system/reading.css +44 -0
  166. package/src/styles/system/scroll.css +6 -0
  167. package/src/styles/system/search-trigger.css +10 -0
  168. package/src/styles/system/segmented.css +22 -0
  169. package/src/styles/system/sheet.css +8 -0
  170. package/src/styles/system/shell.css +8 -102
  171. package/src/styles/system/sidebar.css +14 -0
  172. package/src/styles/system/source.css +5 -0
  173. package/src/styles/system/specimens.css +3 -0
  174. package/src/styles/system/stage.css +18 -0
  175. package/src/styles/system/steps.css +51 -0
  176. package/src/styles/system/surfaces.css +8 -104
  177. package/src/styles/system/table.css +23 -0
  178. package/src/styles/system/toc.css +59 -0
  179. package/src/styles/system/tooltip.css +6 -0
  180. package/src/styles/system/tray-code.css +6 -0
  181. package/src/styles/system/tray.css +20 -0
  182. package/src/styles/system/tree.css +15 -0
  183. package/src/styles/system/waterfall.css +14 -0
package/src/home/home.css CHANGED
@@ -92,21 +92,16 @@
92
92
  /* The compact header keeps the brand centred: GitHub takes the search button's end, as wide as the menu button. */
93
93
  .home-header[data-background="transparent"] .ui-header-end {
94
94
  justify-content: flex-end;
95
- width: 2.375rem;
95
+ width: var(--ui-header-target);
96
96
 
97
- @media (--md) {
97
+ @media (width >= 64rem) {
98
98
  width: auto;
99
99
  }
100
100
  }
101
101
 
102
102
  .home-header[data-background="transparent"] .ui-header-end > a[aria-label="GitHub"] {
103
103
  display: flex;
104
- margin-left: 0;
105
-
106
- @media (--md) {
107
- margin-left: auto;
108
- margin-right: -0.188rem;
109
- }
104
+ margin: 0;
110
105
  }
111
106
 
112
107
  .home-section-wrap {
@@ -406,401 +401,7 @@
406
401
  }
407
402
  }
408
403
 
409
- /*
410
- * Cards stand directly on the page ground: no shell around them, so every edge is the card's own 1px
411
- * contour. A card may hold its figure in a well, 12px in, and nothing deeper.
412
- */
413
- .home-bento-frame {
414
- position: relative;
415
- }
416
-
417
- .home-bento-grid {
418
- display: grid;
419
- gap: var(--home-gap);
420
-
421
- @media (--md) {
422
- gap: 1rem;
423
- }
424
- }
425
-
426
- .home-bento-card {
427
- position: relative;
428
- display: flex;
429
- flex-direction: column;
430
- min-width: 0;
431
- border-radius: var(--home-radius-sheet);
432
- background-color: var(--home-sheet);
433
- box-shadow: 0 0 0 1px var(--home-hairline), var(--home-elevation-1);
434
- transition: box-shadow var(--home-base) var(--home-ease);
435
-
436
- &:hover {
437
- box-shadow: 0 0 0 1px var(--home-rule), var(--home-elevation-1);
438
- }
439
- }
440
-
441
- /* The title and description stay together, with a separate illustration to their right. */
442
- .home-bento-card-header {
443
- /* Contain the header only: size containment on the subgrid card collapses auto-height code panes. */
444
- container: home-card / inline-size;
445
- padding: 1.75rem 1.5rem 2rem;
446
-
447
- @media (--sm) {
448
- padding: 2.25rem 2.25rem 2.5rem;
449
- }
450
-
451
- @media (--lg) {
452
- padding: 2.5rem 2.75rem 2.75rem;
453
- }
454
- }
455
-
456
- .home-bento-card-caption {
457
- display: grid;
458
- grid-template-columns: minmax(0, 44ch) 7rem;
459
- /* In a wide card the copy keeps its measure and the illustration rides the card's right edge. */
460
- justify-content: space-between;
461
- align-items: start;
462
- align-content: start;
463
- column-gap: 1.5rem;
464
- }
465
-
466
- .home-bento-card-copy { min-width: 0; }
467
-
468
- .home-bento-card-caption > .home-illustration {
469
- --home-illustration-size: 7rem;
470
- }
471
-
472
- /*
473
- * A narrow card cannot spare a 7rem column beside its copy: the title shares a row with a smaller
474
- * illustration and the description takes the full measure below, so neither wraps a word or two per line.
475
- */
476
- @container home-card (width < 28rem) {
477
- .home-bento-card-caption {
478
- grid-template-columns: minmax(0, 1fr) 4rem;
479
- align-items: center;
480
- gap: 0.75rem 1rem;
481
- }
482
- .home-bento-card-copy { display: contents; }
483
- .home-bento-card-title { grid-column: 1; grid-row: 1; }
484
- .home-bento-card-body { grid-column: 1 / -1; grid-row: 2; max-width: none; margin-top: 0; }
485
- .home-bento-card-hint { grid-column: 1 / -1; grid-row: 3; margin-top: 0; }
486
- .home-bento-card-caption > .home-illustration {
487
- --home-illustration-size: 4rem;
488
- grid-column: 2;
489
- grid-row: 1;
490
- margin-block: 0;
491
- }
492
- }
493
-
494
- @container home-card (width < 16rem) {
495
- .home-bento-card-caption { grid-template-columns: minmax(0, 1fr) 3rem; column-gap: 0.75rem; }
496
- .home-bento-card-caption > .home-illustration { --home-illustration-size: 3rem; }
497
- }
498
-
499
- @container home-card (width < 12rem) {
500
- .home-bento-card-caption { grid-template-columns: minmax(0, 1fr); }
501
- .home-bento-card-caption > .home-illustration { display: none; }
502
- }
503
-
504
- @container home-card (width >= 28rem) {
505
- .home-bento-card-caption { column-gap: 3rem; }
506
- }
507
-
508
- .home-bento-card-title {
509
- min-width: 0;
510
- margin: 0;
511
- font-size: var(--home-card-title);
512
- font-weight: var(--font-weight-regular);
513
- line-height: 1.25;
514
- letter-spacing: -0.025em;
515
- color: var(--home-text);
516
- text-wrap: balance;
517
- }
518
-
519
- .home-bento-card-body {
520
- min-width: 0;
521
- max-width: 44ch;
522
- margin: 0.75rem 0 0;
523
- font-size: var(--home-body);
524
- line-height: 1.6;
525
- color: var(--home-text-quiet);
526
- text-wrap: pretty;
527
- }
528
-
529
- .home-bento-card-hint {
530
- margin: 0.75rem 0 0;
531
- font-size: var(--home-caption);
532
- line-height: 1.5;
533
- color: var(--home-text-faint);
534
- }
535
-
536
- .home-heading-link {
537
- color: inherit;
538
- text-decoration: none;
539
- text-decoration-thickness: 1px;
540
- text-underline-offset: 0.2em;
541
-
542
- &:hover { text-decoration-line: underline; }
543
-
544
- &:focus-visible {
545
- border-radius: var(--radius-sm);
546
- outline: 2px solid var(--home-ink);
547
- outline-offset: 4px;
548
- }
549
- }
550
-
551
- /*
552
- * The well's contour is drawn above the figure, so a pane that fills the well never hides it and
553
- * a pane's own edge never doubles it: every well reads as one 1px line.
554
- */
555
- .home-bento-visual {
556
- position: relative;
557
- isolation: isolate;
558
- overflow: hidden;
559
- margin: auto var(--home-gap) var(--home-gap);
560
- border-radius: var(--home-radius-well);
561
- background-color: var(--home-well);
562
-
563
- &::after {
564
- position: absolute;
565
- inset: 0;
566
- z-index: 20;
567
- border-radius: inherit;
568
- box-shadow: var(--home-groove);
569
- pointer-events: none;
570
- content: '';
571
- }
572
- }
573
-
574
- .home-bento-visual-top {
575
- margin-top: 0;
576
- }
577
-
578
- .home-dot-grid {
579
- background-image: radial-gradient(var(--home-rule) 1px, transparent 1px);
580
- background-size: 16px 16px;
581
- background-position: 8px 8px;
582
- }
583
-
584
- /* A tag: mono caps inside a hairline, for states such as "Default". */
585
- .home-tag {
586
- display: inline-flex;
587
- align-items: center;
588
- height: 1.25rem;
589
- padding-inline: 0.4375rem;
590
- border-radius: var(--home-radius-chip);
591
- font-family: var(--home-mono);
592
- font-size: 0.625rem;
593
- letter-spacing: 0.08em;
594
- text-transform: uppercase;
595
- color: var(--home-text-quiet);
596
- box-shadow: inset 0 0 0 1px var(--home-rule);
597
- }
598
-
599
- /* Code sits straight in its well: the docs block border, fill and radius stay out of figures. */
600
- .home-code-window {
601
- position: relative;
602
- display: flex;
603
- flex-direction: column;
604
- overflow: hidden;
605
- tab-size: 2;
606
-
607
- .ui-code {
608
- border: 0;
609
- border-radius: 0;
610
- background: transparent;
611
- box-shadow: none;
612
- }
613
-
614
- .home-code-window-pre {
615
- overflow: hidden;
616
- padding: var(--spacing-lg) var(--spacing-sm);
617
- border-radius: 0;
618
- background-color: transparent;
619
- }
620
- }
621
-
622
- .home-code-window-has-fix {
623
- &:where(:hover, :active) .home-code-window-source {
624
- opacity: 0;
625
- }
626
-
627
- &:where(:hover, :active) .home-code-window-fix {
628
- opacity: 1;
629
- }
630
- }
631
-
632
- .home-code-window-dot {
633
- display: block;
634
- width: 0.625rem;
635
- height: 0.625rem;
636
- border-radius: calc(infinity * 1px);
637
- background-color: var(--home-rule);
638
- opacity: 0.56;
639
- }
640
-
641
- .home-code-window-stack {
642
- display: grid;
643
- flex: auto;
644
- min-height: 0;
645
- }
646
-
647
- .home-code-window-layer {
648
- grid-area: 1 / 1 / 2 / 2;
649
- min-width: 0;
650
- transition: opacity 0.16s ease-out;
651
- will-change: opacity;
652
- }
653
-
654
- .home-code-window-fix {
655
- opacity: 0;
656
- }
657
-
658
- .home-code-window-body {
659
- flex: auto;
660
- min-height: 0;
661
- }
662
-
663
- /* The scrollable code fills a clipped well, so its focus ring sits inside the well's edge. */
664
- .home-code-window-body :focus-visible {
665
- outline-offset: -2px;
666
- }
667
-
668
- .home-code-window-problem {
669
- display: flex;
670
- align-items: flex-start;
671
- gap: var(--spacing-sm);
672
- padding-inline: var(--spacing-md);
673
- }
674
-
675
- .home-code-window-problem-icon {
676
- flex: none;
677
- margin-top: 1px;
678
- }
679
-
680
- .home-code-window-problem-content {
681
- min-width: 0;
682
- }
683
-
684
- .home-code-window-problem-meta {
685
- overflow: hidden;
686
- text-overflow: ellipsis;
687
- white-space: nowrap;
688
- }
689
-
690
- /* Diagnostics wrap like an editor's problems panel instead of running out of the card. */
691
- .home-code-window-problem-message {
692
- display: -webkit-box;
693
- overflow: hidden;
694
- margin: 0;
695
- -webkit-box-orient: vertical;
696
- -webkit-line-clamp: 2;
697
- text-wrap: pretty;
698
- font-size: var(--text-sm);
699
- line-height: var(--text-sm--line-height);
700
- color: var(--home-text);
701
- }
702
-
703
- .home-code-window-problem-meta {
704
- margin: var(--spacing-3xs) 0 0;
705
- font-size: var(--text-2xs);
706
- line-height: var(--text-2xs--line-height);
707
- color: var(--home-text-quiet);
708
- }
709
-
710
- /* A recessed gray track holds a white selected segment that sits just above it. */
711
- /*
712
- * Segmented control: a soft pill track drawn with one 1px line, and a raised thumb that slides to the
713
- * chosen option and takes its width. Until the thumb is measured, the chosen option paints its own.
714
- */
715
- .home-segmented-control {
716
- --home-segment-pad: 3px;
717
- position: relative;
718
- isolation: isolate;
719
- display: inline-flex;
720
- align-items: center;
721
- width: fit-content;
722
- padding: var(--home-segment-pad);
723
- border-radius: calc(infinity * 1px);
724
- background-color: color-mix(in oklab, var(--home-text) 4%, var(--home-ground));
725
- box-shadow: inset 0 0 0 1px var(--home-hairline);
726
- }
727
-
728
- .home-segmented-control-thumb {
729
- position: absolute;
730
- top: var(--home-segment-pad);
731
- bottom: var(--home-segment-pad);
732
- left: 0;
733
- z-index: -1;
734
- width: var(--home-segment-width, 0);
735
- border-radius: calc(infinity * 1px);
736
- background-color: light-dark(var(--home-sheet), color-mix(in oklab, var(--home-sheet) 86%, white));
737
- /* The thumb is lit by the page lamp, like the hero's glass: its shadow falls away from the lamp. */
738
- box-shadow:
739
- 0 0 0 1px var(--home-hairline),
740
- 0 1px 2px light-dark(oklch(18% 0 none / 0.06), oklch(0% 0 none / 0.4)),
741
- calc(var(--cast-x, 1px) * 0.6) calc(var(--cast-y, 4px) * 0.6) 8px -3px light-dark(oklch(18% 0 none / 0.1), oklch(0% 0 none / 0.5)),
742
- inset 0 1px 0 var(--home-highlight);
743
- translate: var(--home-segment-x, 0) 0;
744
- opacity: 0;
745
-
746
- /* Both rims catch light: the near one from the lamp, the far one turned a little away from it. */
747
- &::before {
748
- position: absolute;
749
- inset: 0;
750
- padding: 1px;
751
- border-radius: inherit;
752
- background: linear-gradient(var(--lit-angle, -20deg), light-dark(oklch(0.2 0 none / 0.06), rgb(255 255 255 / 0.05)), transparent 35%, transparent 62%, light-dark(rgb(255 255 255 / 1), rgb(255 255 255 / 0.22)));
753
- mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
754
- pointer-events: none;
755
- content: '';
756
- }
757
-
758
- .home-segmented-control[data-ready] & {
759
- opacity: 1;
760
- transition: translate var(--home-base) var(--home-ease), width var(--home-base) var(--home-ease);
761
- }
762
- }
763
-
764
- .home-segmented-control-option {
765
- display: inline-flex;
766
- align-items: center;
767
- justify-content: center;
768
- height: 1.875rem;
769
- min-width: 3.75rem;
770
- padding-inline: 0.875rem;
771
- border: 0;
772
- border-radius: calc(infinity * 1px);
773
- font-size: 0.8125rem;
774
- font-weight: var(--font-weight-medium);
775
- line-height: 1;
776
- letter-spacing: -0.005em;
777
- white-space: nowrap;
778
- color: var(--home-text-quiet);
779
- background-color: transparent;
780
- cursor: pointer;
781
- transition: color var(--home-quick) var(--home-ease);
782
-
783
- &:hover,
784
- &[aria-pressed='true'] {
785
- color: var(--home-text);
786
- }
787
-
788
- /* Before the thumb is measured, the chosen option carries the raised look itself. */
789
- .home-segmented-control:not([data-ready]) &[aria-pressed='true'] {
790
- background-color: var(--home-sheet);
791
- box-shadow: 0 0 0 1px var(--home-hairline);
792
- }
793
-
794
- &:focus-visible {
795
- outline: 2px solid var(--home-ink);
796
- outline-offset: 1px;
797
- }
798
- }
799
-
800
404
  @media (--motion-reduce) {
801
- .home-segmented-control-thumb {
802
- transition: none !important;
803
- }
804
405
 
805
406
  /* Without motion, hover keeps its color cue but the arrow stays put instead of jumping. */
806
407
  .home-section-link:hover > svg,
@@ -808,135 +409,6 @@
808
409
  translate: none;
809
410
  }
810
411
  }
811
-
812
- .home-chip {
813
- display: inline-flex;
814
- flex: none;
815
- align-items: center;
816
- padding: var(--spacing-4xs) var(--spacing-xs);
817
- border-radius: var(--home-radius-chip);
818
- outline: 1px solid var(--home-hairline);
819
- font-family: var(--home-mono);
820
- font-size: 0.75rem;
821
- line-height: 1.5;
822
- white-space: nowrap;
823
- color: var(--home-text-body);
824
- background-color: var(--home-sheet);
825
- }
826
-
827
- .home-terminal-line {
828
- display: block;
829
- overflow: hidden;
830
- padding: var(--spacing-xs) var(--spacing-sm);
831
- border-radius: var(--radius-lg);
832
- font-family: var(--home-mono);
833
- font-size: 0.75rem;
834
- line-height: 1.5;
835
- text-overflow: ellipsis;
836
- white-space: nowrap;
837
- color: var(--home-text);
838
- background-color: var(--home-sheet);
839
- box-shadow: inset 0 0 0 1px var(--home-hairline), var(--home-edge);
840
- }
841
-
842
- /* An endless row: the track holds two copies, so moving it by half its width loops seamlessly. */
843
- .home-marquee {
844
- overflow: hidden;
845
- mask-image: linear-gradient(90deg, transparent, black 8%, black 92%, transparent);
846
- }
847
-
848
- .home-marquee-track {
849
- display: flex;
850
- width: max-content;
851
- /* Longhands keep the keyframe name static; a variable inside the shorthand reads as a dynamic name. */
852
- animation-name: home-marquee;
853
- animation-duration: var(--home-marquee-duration, 32s);
854
- animation-timing-function: linear;
855
- animation-iteration-count: infinite;
856
-
857
- & > * {
858
- margin-right: var(--spacing-xs);
859
- }
860
-
861
- .home-marquee:hover & {
862
- animation-play-state: paused;
863
- }
864
- }
865
-
866
- .home-marquee-reverse .home-marquee-track {
867
- animation-direction: reverse;
868
- }
869
-
870
- /* Same height and corner as an action beside it; the copy button nests inside with a concentric corner. */
871
- .home-command {
872
- display: inline-flex;
873
- align-items: center;
874
- gap: var(--spacing-sm);
875
- box-sizing: border-box;
876
- max-width: 100%;
877
- height: 2.75rem;
878
- padding: 0 0.25rem 0 var(--spacing-md);
879
- border-radius: var(--home-radius-control);
880
- font-family: var(--home-mono);
881
- font-size: 0.875rem;
882
- color: var(--home-text);
883
- }
884
-
885
- /* The command fills the field and reads from the left, so the copy button sits at the far edge. */
886
- .home-command > code {
887
- flex: auto;
888
- text-align: left;
889
- }
890
-
891
- .home-command-copy {
892
- display: grid;
893
- flex: none;
894
- place-content: center;
895
- width: 2.25rem;
896
- height: 2.25rem;
897
- border-radius: calc(var(--home-radius-control) - 0.25rem);
898
- color: var(--home-text-quiet);
899
- cursor: pointer;
900
- transition: color var(--duration-fast) var(--easing-smooth), background-color var(--duration-fast) var(--easing-smooth);
901
-
902
- &:hover {
903
- color: var(--home-text);
904
- background-color: var(--home-well);
905
- }
906
-
907
- &:focus-visible {
908
- outline: 2px solid var(--home-ink);
909
- }
910
- }
911
-
912
- .home-code-tag {
913
- color: var(--home-code-tag);
914
- }
915
-
916
- /* Markup brackets and `=` are punctuation, as in the docs' highlighted code. */
917
- .home-code-punct {
918
- color: var(--home-text-faint);
919
- }
920
-
921
- .home-code-attr {
922
- color: var(--home-code-attr);
923
- }
924
-
925
- .home-code-string {
926
- color: var(--home-code-string);
927
- }
928
-
929
- .home-spin {
930
- animation: home-spin 0.9s linear infinite;
931
- }
932
-
933
- @media (--motion-reduce) {
934
- .home-marquee-track,
935
- .home-spin {
936
- animation: none;
937
- }
938
-
939
- }
940
412
  }
941
413
 
942
414
  /* Capture only the header, keeping the scrolling page live underneath its transition. */
@@ -1010,18 +482,6 @@
1010
482
  }
1011
483
  }
1012
484
 
1013
- @keyframes home-marquee {
1014
- to {
1015
- translate: -50% 0;
1016
- }
1017
- }
1018
-
1019
- @keyframes home-spin {
1020
- to {
1021
- rotate: 1turn;
1022
- }
1023
- }
1024
-
1025
485
  @keyframes home-rise {
1026
486
  from {
1027
487
  opacity: 0;
@@ -1037,45 +497,13 @@
1037
497
  }
1038
498
 
1039
499
  /*
1040
- * Forced colors drop shadows and backgrounds: framed tools keep a system-color contour, the size chart keeps
1041
- * its measured bars, and the footer's engraved mark (decoration only) steps aside instead of covering the links.
500
+ The decorative footer mark steps aside in forced colors.
1042
501
  */
1043
502
  @layer components {
1044
503
  @media (forced-colors: active) {
1045
- :is(.home-bento-card, .home-editor-window, .home-agent, .home-code-window, .home-lint-pane) {
1046
- outline: 1px solid CanvasText;
1047
- }
1048
-
1049
- .home-bench-bar {
1050
- forced-color-adjust: none;
1051
- }
1052
504
 
1053
505
  .home-footer-mark {
1054
506
  display: none;
1055
507
  }
1056
-
1057
- /* The theme split keeps a visible line and handle where the two modes meet. */
1058
- .home-theme-divider {
1059
- forced-color-adjust: none;
1060
- background-color: CanvasText !important;
1061
- }
1062
-
1063
- .home-theme-knob {
1064
- outline: 1px solid CanvasText;
1065
- }
1066
-
1067
- /* The agent's steps keep a visible current step and progress without their fills. */
1068
- .home-agent-step[aria-current] {
1069
- outline: 1px solid Highlight;
1070
- }
1071
-
1072
- .home-agent-step-track {
1073
- outline: 1px solid CanvasText;
1074
- }
1075
-
1076
- .home-agent-step-fill {
1077
- background-color: Highlight;
1078
- forced-color-adjust: none;
1079
- }
1080
508
  }
1081
509
  }
@@ -0,0 +1,94 @@
1
+ /* * Segmented control: a soft pill track drawn with one 1px line, and a raised thumb that slides to the
2
+ * chosen option and takes its width. Until the thumb is measured, the chosen option paints its own. */
3
+ @layer components {
4
+ .home-segmented-control {
5
+ --home-segment-pad: 3px;
6
+ position: relative;
7
+ isolation: isolate;
8
+ display: inline-flex;
9
+ align-items: center;
10
+ width: fit-content;
11
+ padding: var(--home-segment-pad);
12
+ border-radius: calc(infinity * 1px);
13
+ background-color: color-mix(in oklab, var(--home-text) 4%, var(--home-ground));
14
+ box-shadow: inset 0 0 0 1px var(--home-hairline);
15
+ }
16
+
17
+ .home-segmented-control-thumb {
18
+ position: absolute;
19
+ top: var(--home-segment-pad);
20
+ bottom: var(--home-segment-pad);
21
+ left: 0;
22
+ z-index: -1;
23
+ width: var(--home-segment-width, 0);
24
+ border-radius: calc(infinity * 1px);
25
+ background-color: light-dark(var(--home-sheet), color-mix(in oklab, var(--home-sheet) 86%, white));
26
+ /* The thumb is lit by the page lamp, like the hero's glass: its shadow falls away from the lamp. */
27
+ box-shadow:
28
+ 0 0 0 1px var(--home-hairline),
29
+ 0 1px 2px light-dark(oklch(18% 0 none / 0.06), oklch(0% 0 none / 0.4)),
30
+ calc(var(--cast-x, 1px) * 0.6) calc(var(--cast-y, 4px) * 0.6) 8px -3px light-dark(oklch(18% 0 none / 0.1), oklch(0% 0 none / 0.5)),
31
+ inset 0 1px 0 var(--home-highlight);
32
+ translate: var(--home-segment-x, 0) 0;
33
+ opacity: 0;
34
+
35
+ /* Both rims catch light: the near one from the lamp, the far one turned a little away from it. */
36
+ &::before {
37
+ position: absolute;
38
+ inset: 0;
39
+ padding: 1px;
40
+ border-radius: inherit;
41
+ background: linear-gradient(var(--lit-angle, -20deg), light-dark(oklch(0.2 0 none / 0.06), rgb(255 255 255 / 0.05)), transparent 35%, transparent 62%, light-dark(rgb(255 255 255 / 1), rgb(255 255 255 / 0.22)));
42
+ mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
43
+ pointer-events: none;
44
+ content: '';
45
+ }
46
+
47
+ .home-segmented-control[data-ready] & {
48
+ opacity: 1;
49
+ transition: translate var(--home-base) var(--home-ease), width var(--home-base) var(--home-ease);
50
+ }
51
+ }
52
+
53
+ .home-segmented-control-option {
54
+ display: inline-flex;
55
+ align-items: center;
56
+ justify-content: center;
57
+ height: 1.875rem;
58
+ min-width: 3.75rem;
59
+ padding-inline: 0.875rem;
60
+ border: 0;
61
+ border-radius: calc(infinity * 1px);
62
+ font-size: 0.8125rem;
63
+ font-weight: var(--font-weight-medium);
64
+ line-height: 1;
65
+ letter-spacing: -0.005em;
66
+ white-space: nowrap;
67
+ color: var(--home-text-quiet);
68
+ background-color: transparent;
69
+ cursor: pointer;
70
+ transition: color var(--home-quick) var(--home-ease);
71
+
72
+ &:hover,
73
+ &[aria-pressed='true'] {
74
+ color: var(--home-text);
75
+ }
76
+
77
+ /* Before the thumb is measured, the chosen option carries the raised look itself. */
78
+ .home-segmented-control:not([data-ready]) &[aria-pressed='true'] {
79
+ background-color: var(--home-sheet);
80
+ box-shadow: 0 0 0 1px var(--home-hairline);
81
+ }
82
+
83
+ &:focus-visible {
84
+ outline: 2px solid var(--home-ink);
85
+ outline-offset: 1px;
86
+ }
87
+ }
88
+
89
+ @media (--motion-reduce) {
90
+ .home-segmented-control-thumb {
91
+ transition: none !important;
92
+ }
93
+ }
94
+ }