@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
@@ -15,25 +15,26 @@
15
15
  /* A surface hangs by up to 2rem but always leaves a 1rem gutter to the window. */
16
16
  @media (width >= 52rem) { .ui-prose.ui-docs-article { --prose-bleed: min(2rem, var(--docs-gutter) - 1rem); } }
17
17
 
18
- :is(.ui-tray, .ui-code, .ui-table, .ui-params, .ui-prompt, .ui-tree, figure, img, video, iframe, picture, p:has(> img:only-child, > video:only-child, > picture:only-child, > a:only-child > img:only-child)):is(
19
- .ui-prose > :is(div, section, site-island):not([class]) > *,
20
- .ui-prose > :is(div, section, site-island):not([class]) > :is(div, site-island):not([class]) > *
18
+ :is(.ui-tray, .ui-code, .ui-table, .document-comparison, .ui-params, .ui-prompt, .ui-tree, figure, img, video, iframe, picture, p:has(> img:only-child, > video:only-child, > picture:only-child, > a:only-child > img:only-child)):is(
19
+ .ui-prose > :is(div, section, astro-island, astro-slot):not([class], [role="region"]) > *,
20
+ .ui-prose > :is(div, section, astro-island, astro-slot):not([class], [role="region"]) > :is(div, section, astro-island, astro-slot):not([class], [role="region"]) > *
21
21
  ),
22
22
  :is(figure, img, video, iframe, picture, p:has(> img:only-child, > video:only-child, > picture:only-child, > a:only-child > img:only-child)):is(.ui-prose > *) {
23
23
  margin-inline: calc(var(--prose-bleed) * -1);
24
24
  }
25
25
  /* A component that wraps its surface in an unclassed element keeps the article's line of air around it, as a direct
26
26
  child would (the margins collapse through the wrapper). */
27
- :is(.ui-tray, .ui-code, .ui-table, .ui-params, .ui-prompt, .ui-tree):is(
28
- .ui-prose > :is(div, section, site-island):not([class]) > *,
29
- .ui-prose > :is(div, section, site-island):not([class]) > :is(div, site-island):not([class]) > *
27
+ :is(.ui-tray, .ui-code, .ui-table, .document-comparison, .ui-params, .ui-prompt, .ui-tree):is(
28
+ .ui-prose > :is(div, section, astro-island, astro-slot):not([class], [role="region"]) > *,
29
+ .ui-prose > :is(div, section, astro-island, astro-slot):not([class], [role="region"]) > :is(div, section, astro-island, astro-slot):not([class], [role="region"]) > *
30
30
  ) { margin-block: var(--line); }
31
31
  /* Document steps reach the hanging edge on the end side, so their code ends where every other surface ends. */
32
32
  .ui-docs-article > .ui-steps[data-variant="document"] { margin-right: calc(var(--prose-bleed) * -1); }
33
33
  /* A result shown after a step (a preview) hangs on both sides like any surface; the rail runs on into it. */
34
34
  .ui-docs-article > .ui-steps[data-variant="document"] > :not(li) { margin: 0 0 0 calc(var(--prose-bleed) * -1); }
35
- :is(img, video, iframe):is(.ui-prose > *, .ui-prose > :is(div, section, site-island):not([class]) > *) { width: calc(100% + var(--prose-bleed) * 2); max-width: none; }
36
- /* A table its author wrapped in a scroll region bleeds as the region. */
35
+ :is(img, video, iframe):is(.ui-prose > *, .ui-prose > :is(div, section, astro-island, astro-slot):not([class], [role="region"]) > *) { width: calc(100% + var(--prose-bleed) * 2); max-width: none; }
36
+ /* A table its author wrapped in a scroll region bleeds only as the region.
37
+ Region wrappers are excluded from the transparent-wrapper rules above. */
37
38
  .ui-prose > [role="region"]:has(> :is(.ui-table, table)) { margin: var(--ui-space-xl) calc(var(--prose-bleed) * -1); }
38
39
  .ui-prose > [role="region"][tabindex]:focus-visible { @apply --ui-focus-ring; outline-offset: 2px; border-radius: var(--ui-radius-xs); }
39
40
 
@@ -51,13 +52,21 @@
51
52
  /* In-page links move focus to their heading; its ring stands clear of the text. */
52
53
  .ui-prose > :is(h2, h3):focus-visible { @apply --ui-focus-ring; outline-offset: .25rem; border-radius: var(--ui-radius-xs); }
53
54
  /* A single token (`data-token`, set by the inline code renderer) moves to the next line whole. */
54
- .ui-prose > :is(p, ul, ol) code[data-token] { display: inline-block; max-width: 100%; line-height: 1.5; vertical-align: baseline; }
55
+ .ui-prose > :is(p, ul, ol) code[data-token],
56
+ .ui-prose > details:not([class]) > :is(p, ul, ol) code[data-token] { display: inline-block; max-width: 100%; line-height: 1.5; vertical-align: baseline; }
55
57
  /* A run of inline code that wraps keeps its chip on both lines instead of an open cut. */
56
58
  .ui-inline-code { -webkit-box-decoration-break: clone; box-decoration-break: clone; }
57
59
  .ui-prose > :is(p, ul, ol) del { text-decoration-color: var(--ui-status-danger); }
58
60
  .ui-prose > details:not([class]) { max-width: var(--measure); margin-block: var(--ui-space-xl); border-block: 1px solid var(--ui-line-hair); }
59
61
  .ui-prose > details:not([class]) > summary { padding: var(--ui-space-sm) 0; color: var(--ui-text-strong); font-weight: var(--ui-weight-strong); font-size: var(--ui-text-small); cursor: pointer; }
60
62
  .ui-prose > details:not([class]) > summary:focus-visible { @apply --ui-focus-ring; outline-offset: 2px; border-radius: var(--ui-radius-xs); }
63
+ /* Authored disclosures are part of the reading flow. Their contents need the same rhythm as the article,
64
+ with space above the closing rule; component disclosures keep their own body and frame contracts. */
65
+ .ui-prose > details:not([class])[open] { padding-bottom: calc(var(--line) * .75); }
66
+ .ui-prose > details:not([class]) > :is(p, ul, ol, blockquote) { margin-block: calc(var(--line) * .75); overflow-wrap: anywhere; text-wrap: pretty; }
67
+ .ui-prose > details:not([class]) > :where(.ui-table, .ui-code, .ui-tray, .ui-params, .ui-prompt, .ui-tree, figure) { margin-block: var(--line); }
68
+ .ui-prose > details:not([class]) > summary + * { margin-top: var(--ui-space-sm); }
69
+ .ui-prose > details:not([class]) > :last-child { margin-bottom: 0; }
61
70
 
62
71
  /* Han text keeps the body's double leading; its headings keep their natural spacing. */
63
72
  .ui-prose:lang(zh) { text-autospace: normal; }
@@ -1,39 +1,2 @@
1
- /*
2
- * Document steps (`StepSection`) on `ui-steps` (styles/system/data.css): a step's content holds an authored heading,
3
- * its text and, in a row step, the code beside it once the column has room.
4
- */
5
- @layer components {
6
- .ui-steps[data-variant="document"] { container-type: inline-size; margin-block: var(--ui-space-xl) var(--line, var(--ui-space-xl)); }
7
- .ui-steps-content, .ui-steps-text, .ui-steps-source { min-width: 0; }
8
- .ui-steps-content { display: grid; align-content: start; gap: var(--ui-space-md); }
9
- .ui-steps-content[data-columns] { gap: var(--ui-space-md) var(--ui-space-xl); }
10
- .ui-steps-content :is(h2, h3, h4) {
11
- position: static; width: auto; margin: .125rem 0 var(--ui-space-2xs);
12
- color: var(--ui-text-strong); font-size: var(--ui-text-base); font-weight: var(--ui-weight-medium); line-height: 1.5rem; letter-spacing: -.006em;
13
- }
14
- .ui-steps-content :is(h2, h3, h4) > .ui-anchor { display: none; }
15
- .ui-steps-content > :is(h2, h3, h4), .ui-steps-text > :is(h2, h3, h4) { margin-bottom: calc(var(--ui-space-md) * -1 + var(--ui-space-2xs)); }
16
- .ui-steps-content :is(h2, h3, h4) + p { margin-top: 0; }
17
- .ui-steps-content :is(p, li) { font-size: var(--ui-text-small); line-height: var(--ui-leading-small); }
18
- .ui-steps-content :is(p, ul, ol) { margin-block: 0; }
19
- .ui-steps-text { display: grid; align-content: start; gap: var(--ui-space-md); }
20
- /* Several files under one step part by a small gap, never contour against contour. */
21
- .ui-steps-source { display: grid; align-content: start; gap: var(--ui-space-sm); }
22
- /* A note inside a step is part of its text: the icon leads a muted paragraph, without a frame of its own in the narrow column. */
23
- .ui-steps-content .ui-callout { padding: 0; background: none; box-shadow: none; color: var(--ui-text-muted); }
24
- /* Only reset panels placed by the step grid; nested trays own their internal spacing. */
25
- :is(.ui-steps-content, .ui-steps-text, .ui-steps-source) > :is(.ui-code, .ui-tray) { margin: 0; }
26
- :is(.ui-steps-content, .ui-steps-text, .ui-steps-source) > :is(.ui-code, p):first-child { margin-top: 0; }
27
- :is(.ui-steps-content, .ui-steps-text, .ui-steps-source) > :is(.ui-code, p):last-child { margin-bottom: 0; }
28
-
29
- @container (width < 20rem) {
30
- .ui-steps[data-variant="document"] > li { grid-template-columns: minmax(0, 1fr); }
31
- .ui-steps[data-variant="document"] > li::before, .ui-steps[data-variant="document"] > li::after { display: none; }
32
- }
33
-
34
- /* A row step reads beside its code once the list has room for both (46rem): the text on two fifths, the code on three.
35
- Narrower, the code stacks under its text at full width rather than scrolling in a sliver. */
36
- @container (min-width: 46rem) {
37
- .ui-steps-content[data-columns] { grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); }
38
- }
39
- }
1
+ /* Compatibility entry; the component owns base and adaptation together. */
2
+ @import '../system/steps.css';
@@ -1,7 +1,10 @@
1
1
  /* A two-column reading comparison inside the shared table: fixed columns, long syntax wraps. */
2
2
  @layer components {
3
3
  .document-comparison table { table-layout: fixed; }
4
- .document-comparison :is(th, td) { white-space: normal; overflow-wrap: anywhere; }
4
+ .document-comparison :is(th, td),
5
+ .document-comparison .ui-table :is(th, td) { white-space: normal; overflow-wrap: anywhere; }
5
6
  .document-comparison :is(th, td):first-child { width: 40%; }
6
- .document-comparison code { white-space: normal; }
7
+ /* Reading comparisons also override the lookup table's intact first-column tokens. */
8
+ .document-comparison code,
9
+ .document-comparison .ui-table :is(td:first-child, tbody th) code { white-space: normal; overflow-wrap: anywhere; }
7
10
  }
@@ -3,12 +3,9 @@
3
3
  .document-illustration { overflow: hidden; border-radius: var(--ui-radius-xl); }
4
4
  .document-illustration img { display: block; width: 100%; height: auto; margin: 0; }
5
5
  .document-illustration img[data-scheme="dark"] { display: none; }
6
- .ui-tray[data-illustration-expandable] .ui-tray-title { flex: 1; }
7
- .document-illustration-expand { flex: none; }
8
- .document-illustration-expand[data-scheme="dark"] { display: none; }
9
6
  /* A quiet caption-level entry, independent of the demo's generated-code panel. */
10
7
  .ui-tray > .ui-disclosure[data-variant="text-description"] { margin-top: 0; padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
11
- .ui-tray > .ui-disclosure[data-variant="text-description"] > summary { width: fit-content; max-width: calc(100% - 2 * var(--ui-space-sm)); min-height: 2rem; margin-inline: var(--ui-space-sm); padding: 0; gap: var(--ui-space-2xs); color: var(--ui-text-muted); font-size: var(--ui-text-label); font-weight: var(--ui-weight-regular); }
8
+ .ui-tray > .ui-disclosure[data-variant="text-description"] > summary { width: fit-content; max-width: calc(100% - 2 * var(--ui-space-md)); min-height: 2rem; margin-inline: var(--ui-space-md); padding: 0; gap: var(--ui-space-2xs); color: var(--ui-text-muted); font-size: var(--ui-text-label); font-weight: var(--ui-weight-regular); }
12
9
  .ui-tray > .ui-disclosure[data-variant="text-description"] > summary::before { width: 12px; height: 12px; }
13
10
  .ui-tray > .ui-disclosure[data-variant="text-description"] > summary:hover { color: var(--ui-text-strong); }
14
11
  .ui-tray > .ui-disclosure[data-variant="text-description"] > .ui-disclosure-body { margin-inline: 0; padding-top: var(--ui-space-xs); }
@@ -18,17 +15,12 @@
18
15
  .ui-tray-caption strong { color: var(--ui-text-body); font-weight: var(--ui-weight-strong); }
19
16
  .dark .document-illustration img[data-scheme="light"] { display: none; }
20
17
  .dark .document-illustration img[data-scheme="dark"] { display: block; }
21
- .dark .document-illustration-expand[data-scheme="light"] { display: none; }
22
- .dark .document-illustration-expand[data-scheme="dark"] { display: inline-flex; }
23
18
  @media screen and (prefers-color-scheme: dark) {
24
19
  :root:not(.light, .dark) .document-illustration img[data-scheme="light"] { display: none; }
25
20
  :root:not(.light, .dark) .document-illustration img[data-scheme="dark"] { display: block; }
26
- :root:not(.light, .dark) .document-illustration-expand[data-scheme="light"] { display: none; }
27
- :root:not(.light, .dark) .document-illustration-expand[data-scheme="dark"] { display: inline-flex; }
28
21
  }
29
22
  @media print {
30
23
  .document-illustration img[data-scheme="light"] { display: block !important; }
31
24
  .document-illustration img[data-scheme="dark"] { display: none !important; }
32
- .document-illustration-expand { display: none !important; }
33
25
  }
34
26
  }
@@ -27,7 +27,8 @@
27
27
  .documentation-index-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0 var(--ui-space-md); margin-top: var(--ui-space-3xl); box-shadow: inset 0 -1px 0 var(--ui-line-divider); }
28
28
  .documentation-index-toolbar > p { color: var(--ui-text-muted); @apply --ui-eyebrow-type; }
29
29
  .documentation-index-toolbar > p > .documentation-index-count { letter-spacing: .02em; }
30
- .documentation-index-toolbar > .ui-segmented { box-shadow: none; }
30
+ .documentation-index-toolbar > .ui-segmented,
31
+ .documentation-index-toolbar > .ui-segmented[data-variant="underline"] { box-shadow: none; }
31
32
 
32
33
  /* Section: a ruled spread. Below 44rem the head sits over its entries. */
33
34
  .documentation-index-section { display: grid; gap: var(--ui-space-lg); padding-block: var(--ui-space-xl) var(--ui-space-2xl); }
@@ -1,4 +1,2 @@
1
- /* Surfaces, code and prose: pages that render documents, examples or source. One local stylesheet emits its theme variables once. */
2
- @import './system/surfaces.css';
3
- @import './system/code.css';
4
- @import './system/prose.css';
1
+ /* Reading defaults only. Document components deliver their own native rules. */
2
+ @import './system/reading.css';
@@ -1,3 +1,5 @@
1
- /* Controls and shell: every page in the site shell renders them. One local stylesheet emits its theme variables once. */
2
- @import './system/controls.css';
3
- @import './system/shell.css';
1
+ /* Shared actions. Document navigation and feature controls belong to their components. */
2
+ @import './system/buttons.css';
3
+ @import './system/button-feedback.css';
4
+ @import './system/kbd.css';
5
+ @import './system/tooltip.css';
@@ -8,21 +8,30 @@ The site's interface vocabulary. Light mode is moonstone (a clean zinc pearl), d
8
8
  | --- | --- | --- |
9
9
  | `mixins.css` | `--ui-sheet-face`, `--ui-focus-ring`, `--ui-label-type`, `--ui-eyebrow-type`: shared declarations the component files expand with `@apply` | foundation (Master CSS definitions) |
10
10
  | `tokens.css` | `--ui-*` roles: surfaces, lines, text, light, elevation, radius, rhythm, motion, tones, status, code | foundation |
11
- | `surfaces.css` | `ui-sheet`, `ui-well`, `ui-tray`, `ui-stage`, `ui-compare`, `ui-browser`, `ui-scroll`, `ui-expand` | documents |
12
- | `controls.css` | `ui-button`, `ui-segmented`, `ui-field`, `ui-input`, `ui-select`, `ui-range`, `ui-check`, `ui-switch`, `ui-copy`, `ui-kbd`, `ui-tooltip`, `ui-menu` | interface |
13
- | `code.css` | `ui-code`, `ui-tabs`, `ui-inline-code`, `ui-disclosure`, `ui-prompt`, `ui-tree` | documents |
14
- | `prose.css` | `ui-callout`, `ui-hint` and the article flow helpers | documents |
15
- | `shell.css` | `ui-header`, `ui-sidebar`, `ui-nav-group`, `ui-nav-link`, `ui-toc`, `ui-pagehead`, `ui-pager`, `ui-dialog`, `ui-results` | interface |
16
- | `specimens.css` | `ui-item`, `ui-badge`, `ui-label`, `ui-legend`, `ui-measure`, `ui-leader`, `ui-axes`, `ui-swatch`, `ui-palette`, `ui-spacing`, `ui-player` | imported by the components that use it |
17
- | `data.css` | `ui-table`, `ui-metrics`/`ui-metric`, `ui-bar`, `ui-source`, `ui-params`, `ui-steps`, `ui-index`, `ui-logos`, `ui-chart`, `ui-waterfall` | imported by the components that use it |
11
+ | `reading.css` | Article flow helpers | documents |
12
+ | `buttons.css`, `button-feedback.css`, `kbd.css`, `tooltip.css` | Common shell controls | interface |
13
+ | `header-core.css`, `sidebar.css`, `toc.css`, `pagehead.css`, `pager.css`, `dialog.css` | Navigation and search | owning component |
14
+ | `segmented.css`, `fields.css`, `range.css`, `checks.css`, `copy.css`, `menu.css` | Feature controls, including all interaction states | owning component |
15
+ | `code-panel.css`, `code-tabs.css`, `inline-code.css`, `disclosure.css`, `prompt.css`, `tree.css` | Document features | owning component |
16
+ | `table.css`, `parameters.css`, `steps.css`, `index.css`, `metrics.css`, `chart.css`, `waterfall.css` | Data presentation | owning component |
17
+ | `sheet.css`, `tray.css`, `stage.css`, `compare.css`, `browser.css`, `scroll.css`, `expand.css` | Surfaces and demos | owning component |
18
+ | `specimens.css` | Specimen parts | owning component |
19
+ | `controls.css`, `code.css`, `data.css`, `surfaces.css`, `shell.css`, `prose.css` | Compatibility aggregates importing the same leaves | explicit consumers only |
18
20
 
19
- Pages load the system in ordered asset boundaries (`site/routes.ts`), each one stylesheet:
21
+ Pages load foundation → interface → documents → component styles in that order:
20
22
 
21
- - **foundation**: `styles/globals.css`, the only Master CSS entry (`@import '@master/css'`). Every entry joins one project graph, so a second entry delivers the union of both; keep component files out of it.
22
- - **interface**: `styles/interface.css`, every page in the site shell.
23
- - **documents**: `styles/documents.css`, unless a page exports `documentStyles = false` because it renders no surfaces, code or prose (the Blog index, 404, the homepage icon handoff).
23
+ - **Foundation**: `styles/globals.css`, the only complete Master CSS entry (`@import '@master/css'`). Keep feature components out of its project-wide graph. Definitions and baseline rules belong here.
24
+ - **Interface**: common controls on every page in the site shell. Navigation, search and document rails import their styles themselves.
25
+ - **Documents**: article reading flow only. `documentStyles` remains a boolean; export `false` for pages without article typography, including the Master homepage. This no longer implicitly supplies code, tree, table or demo styles.
26
+ - **Component**: import the narrowest explicit `styles/system/*` subpath from its owner. Header, TOC, steps and code leaves contain their base rules followed by their former docs-shell overrides; the old adapter paths are compatibility imports. Preserve that effective declaration order. `DocArticle` and `BlogArticle` own prose layout. Bare `/examples` sections load foundation plus component dependencies. Owners that render `ui-button`, `ui-kbd` or `ui-tooltip` explicitly import the same small `interface.css` base-control module as the route boundary, so bare controls have their complete appearance and states without duplicated entry sources.
24
27
 
25
- Interface and documents are local stylesheets: each emits the theme variables it uses once, so add a component file to an existing boundary stylesheet rather than as another import. Bare sections (`/examples`) load the foundation and import only the system files their page renders.
28
+ MDX imports only the Markdown mappings and built-in JSX components used by its transformed AST. The legacy `markdownComponents` export remains available to explicit consumers. Do not restore its blanket style side effects or substitute a runtime registry. Nested MDX keeps its own static imports.
29
+
30
+ The shared Astro build integration flattens only unconditional same-directory compiler fragments, preserving order and repeated occurrences. Entries with unresolved imports stay intact. It combines adjacent plain stylesheet links only when their complete route usage is identical; foundation, interface and documents remain separate. Original assets remain available for JS references. This changes delivery, never progressive rendering, runtime or hydration.
31
+
32
+ Use native classes for roles, tokens for shared semantic values, mixins for repeated declarations, and utilities for local decisions. Keep global native pruning disabled. Explicit opt-in currently covers `menu`, `logos`, `scroll` and `checks`; their finite native classes are present in shared sources. Product homepage rules opt in in the product repository, with full literal class maps for dynamic states. Other files retain native rules until their states and dependency closure can be proven. A package must opt in at its own source. Coverage alone cannot justify removing a rule.
33
+
34
+ Product semantic highlighting belongs to the product article/reference/home owners. Shared homepage hero/action/footer sources stay here; product editor/lint/agent sections stay with the product site. Changes must pass full route budgets and packed-consumer checks; never trade a lower source file count for unrelated CSS delivery.
26
35
 
27
36
  The approved visual specification is the published "Master CSS Site Design System:Moonstone" artifact.
28
37
 
@@ -36,6 +45,16 @@ The approved visual specification is the published "Master CSS Site Design Syste
36
45
  6. **Small concentric radii.** 3 / 4 / 6 / 8 / 10 / 14 with a 4px tray inset: tray 14 → stage, code, table and sheet 10; menu 8 → item 4; segmented track 6 + its padding → thumb 6. Nothing rounder except pills and dots.
37
46
  7. **Light regular type.** English text runs at 350 (`:root:lang(en)` lowers `--ui-weight-regular`), Han text at 400. Headings are regular (400): size and ink carry the steps. Medium (460) marks a current entry, a control label or a small title; strong (500) is for `<strong>` and short emphasis only. Captions inside components (table heads, tray titles, metric names) are small sans in sentence case. Captions *over a group or a page* — sidebar groups, footer columns, the page kicker, "On this page", the pager's Previous/Next — are eyebrows (`--ui-eyebrow-type`): 11px sans capitals at medium weight, boldly tracked .14em, 16px line; Han text keeps 12px and .1em. A blog post's kicker (category · date) and its closing caption are eyebrows too. Never mono.
38
47
  8. **Two widths on one edge.** A documentation article starts every block on one edge. Running text — paragraphs, lists, headings, callouts, rules, disclosures — keeps the reading measure (`--docs-text`, 41rem; the 18px lead runs to 1.125× it). Steps, page tabs, the pager and framed surfaces take the wide column (`--docs-wide`, the measure plus the 252px contents rail). Framed surfaces (code, trays, previews, tables, chart figures, media) hang past both edges by the prose bleed (up to 2rem from 52rem, always leaving a 1rem gutter to the window) and keep their own padding: nothing inside a hanging surface is set back to the text's edge; document steps hang on the end side only, so a step's code ends where every surface ends. Index rows are links, not frames: they keep the column's edges. Where the rail shows (80rem up), a page with contents gives the rail the wide column's room; the article and rail centre together, so every page starts on the same x. Gutters: 20px, 40px from 52rem, then 40→80px beside the sidebar.
48
+
49
+ Table placement belongs to the outer surface: a direct `.ui-table`, a
50
+ `.document-comparison`, or an authored scroll region. A comparison carries the
51
+ same responsive bleed and vertical rhythm as an ordinary table; its inner
52
+ `.ui-table` must not bleed again. Transparent Astro wrappers (`astro-island` /
53
+ `astro-slot`) preserve these edges. Tables inside figures or trays keep their
54
+ enclosing frame. Validate both table edges against the prose column in
55
+ `site/tests/document-tables.e2e.mjs`; an overflow-only audit cannot detect a
56
+ table that is too narrow.
57
+
39
58
  9. **One reading rhythm.** Body 16/32 (line-height 2, `--line`), Han text too; paragraphs part by ¾ line, wide blocks by 1 line, h2 opens on 2 lines and closes on ½ — a section after the first opens on one hairline (`--ui-line-hair`) across the measure, ⅞ line above its heading, none under the page head or after a disclosure that already closes on a hairline — h3 on 1½ and ⅜, h4 on 1¼ and ¼; list items by ¼. Type scale: title 38/44 −.028em · h2 26/35 −.022em · h3 20/28 −.014em · h4 16/24 · lead 18/1.75 · small 14/1.8 · caption 13/1.65 · label 12. The documentation and the blog share it: a post's text is the documentation's measure and prose.
40
59
  10. **Converged shadows.** Every layer doubles offset and blur and pulls its spread in by half the offset. No single large blur.
41
60
  11. **Purposeful previews.** The stage's contents share the system's visual language, not just its outer frame. Controls that operate a preview use system components; self-contained teaching samples express the same restraint through public preset styles. Departures in color, size or material need a teaching purpose. Optional preview actions start absent: Theme is for a lesson about color schemes, resizing for a demonstrated viewport or container change, and replay for a motion sequence. Ordinary previews inherit the site theme. Source tabs, copying and Generated CSS remain useful inspection tools.
@@ -44,12 +63,13 @@ The approved visual specification is the published "Master CSS Site Design Syste
44
63
 
45
64
  The shell follows the original documentation layout, refined:
46
65
 
47
- - **Header** 60px, 32px gutters. Search leads the end group as a quiet hairline pill (glass + ⌘K, 30px tall, 11px / 13px insets — the round end takes a little more), 8px before the community icons; a plain glass in a full target on a phone; the homepage's wide header leaves it out. Section links are plain words (body ink, current one in strong ink at medium weight), no pill. The version is plain text with a chevron. End icons are 18px glyphs in 36px targets that only change ink on hover.
66
+ - **Header** 60px, 32px gutters. Community and language actions share square 36px desktop / 44px compact targets, centred 18px Tabler icons at 1.5 stroke, and an 8px gap. Desktop search retains its 30px hairline pill, 16px glass and visible ⌘K; compact search uses the same 44px target and 18px icon as its neighbours; the homepage's wide header leaves it out. Section links are plain words (body ink, current one in strong ink at medium weight), no pill. The version is plain text with a chevron. Version chevrons retain their original muted 12px size; external-link indicators remain small raised 10px marks. Text links/version controls share the target height with content-sized widths. Controls only change ink on hover. The separator has 4px margins plus the 8px control gap on each side.
48
67
  - **Sidebar** 276px with a 32px start gutter aligned with the logo; it starts with its first group, whose caption stands level with the page kicker and the contents caption (y = header + 56px). Group captions are muted eyebrows; entries are 14px muted on one hairline guide, 32px rows; the current entry inks a short 2px bar on the guide and takes medium weight.
49
68
  - **Contents rail** (252px) is a ruler: h2 entries have 24px ticks and h3 entries have 12px ticks with their right ends aligned before the text; titles share a second edge without indentation. The current entry takes strong ink and medium weight without changing its tick length. 13px entries in 34px rows (44px touch targets); "On this page" is a muted eyebrow on the title edge, level with the page kicker. Long lists fold inactive subsections without adding icons; following the section opens them.
50
69
  - **Page head** a muted eyebrow kicker, a regular-weight title (fluid 30–38px), an 18px lead (a second lead line, such as a layout's subtitle, at reading size), then 48px of space — no rule — before the reading starts.
51
70
  - **Page tabs** between sibling documents (`Tabs`, `ui-segmented[data-variant="underline"]`) are words on one hairline, the current one underlined in ink — the original's tabs, not a raised segmented thumb.
52
- - **Search trigger** (`ui-search-trigger`, in the phone menu and on the 404) is a quiet row over one hairline with a flat `⌘K` hint; results in the dialog take a chip wash, never a raised frame.
71
+ - **Compact menu** below 64rem is a full-height modal: Tabler’s two-line menu at 18px / 1.5 stroke becomes a small close glyph in a 44px target, brand stays centred, search sits opposite. Primary links use fluid 36–56px medium-weight type and generous space; chapters belong to the section indexes. Community icons and native preferences sit beneath the navigation, at the bottom when space permits. External community icons carry the same raised 10px marker as header actions, anchored 11px right / 9px above the icon centre. The surface enters over 320ms, links follow at 40ms intervals, and closing takes 180ms; reduced motion removes transitions.
72
+ - **Search trigger** (`ui-search-trigger`, on the 404) is a quiet row over one hairline with a flat `⌘K` hint; results in the dialog take a chip wash, never a raised frame. The desktop dialog footer teaches “Search anytime” with ⌘ + K keycaps on Apple devices or Ctrl + K elsewhere.
53
73
  - **Pager** is one hairline over two links, 80px below the article: an eyebrow (Previous / Next) over a 16px title with a muted arrow; ink on hover, no boxes.
54
74
  - **Steps** hang on one hairline rail from flat 28px numbered rings (canvas face, strong contour, sans tabular figures) and take the wide column. A step title is 16px medium; its text is 14/1.8. A row step puts its text on two fifths and its code on three once the list is 46rem wide (narrower, the code stacks under its text). A preview after the steps hangs like any surface and the rail runs into it.
55
75
  - **Footer** in the documentation takes the article's wide column from the text's edge; elsewhere it is 72rem. Groups keep 11rem columns from the start (`auto-fill`), so a wide footer leaves the rest to the canvas. Link groups (Docs, Resources, Community, Legal — the license and the trademark policy) under strong-ink eyebrows, 14px links on a 32px pitch. One quiet base row under a hairline, every word 12px tracked .04em: the notice at the start, the theme and language preferences at the end, each an icon and its value with no "Theme:" or "Language:" label (the selects keep those names for assistive technology). No search field — the header carries search.
@@ -0,0 +1,21 @@
1
+ /* browser: owned component styles; shared definitions come from the foundation. */
2
+ @layer components {
3
+ .ui-browser { position: relative; overflow: hidden; border-radius: var(--ui-radius-xl); background: var(--ui-surface-stage); box-shadow: 0 1px 0 var(--ui-lip); }
4
+ .ui-browser::after { content: ""; position: absolute; inset: 0; z-index: 2; border-radius: inherit; box-shadow: inset 0 0 0 1px var(--ui-line-contour); pointer-events: none; }
5
+ .ui-browser-bar { display: flex; align-items: center; gap: var(--ui-space-sm); height: 2rem; padding: 0 var(--ui-space-sm); background: var(--ui-surface-tray); }
6
+ .ui-browser-dots { display: flex; gap: 6px; }
7
+ .ui-browser-dots > i { width: 9px; height: 9px; border-radius: 50%; background: var(--ui-line-divider); }
8
+ .ui-browser-body { position: relative; min-height: 12rem; }
9
+ .ui-browser-body:has(> .ui-browser-viewport) { min-height: 0; overflow-x: auto; scrollbar-width: thin; }
10
+ .ui-browser-viewport { position: relative; max-width: none; margin-inline: auto; }
11
+ .ui-browser-viewport > iframe { display: block; width: 100%; border: 0; background: transparent; }
12
+ .ui-browser-tools { display: flex; flex-wrap: wrap; align-items: center; gap: var(--ui-space-xs) var(--ui-space-sm); padding: var(--ui-space-sm) var(--ui-space-sm) var(--ui-space-xs); }
13
+ .ui-browser-tools > .ui-segmented > :is(button, a) { min-height: 1.625rem; }
14
+ .ui-browser-range { display: flex; flex: 1 1 14rem; align-items: center; gap: var(--ui-space-sm); min-width: 0; }
15
+ .ui-browser-range > .ui-range { flex: 1 1 6rem; min-width: 0; max-width: 12rem; }
16
+ .ui-browser-range > label { color: var(--ui-text-muted); @apply --ui-label-type; }
17
+ .ui-browser-tools > output, .ui-browser-range > output { flex: 1 1 100%; color: var(--ui-text-muted); font: var(--ui-weight-regular) .6875rem/1.5 var(--font-family-mono); overflow-wrap: anywhere; }
18
+ .ui-browser-range > .ui-browser-size { flex: none; font: var(--ui-weight-regular) .75rem/1.5 var(--font-family-sans); font-variant-numeric: tabular-nums; }
19
+ .ui-resize { position: absolute; top: 0; right: 0; bottom: 0; display: grid; place-items: center; width: 1rem; cursor: ew-resize; touch-action: none; }
20
+ .ui-resize::before { content: ""; width: 4px; height: 2.5rem; border-radius: var(--ui-radius-pill); background: var(--ui-line-strong); }
21
+ }
@@ -0,0 +1,13 @@
1
+ /* button-feedback: owned component styles; shared definitions come from the foundation. */
2
+ @layer components {
3
+
4
+ @media (pointer: coarse) {
5
+ .ui-button { min-height: 2.75rem; }
6
+ }
7
+ .ui-button[data-result] > svg:first-of-type { display: none; }
8
+ .ui-button:not([data-result]) > .ui-result-icon { display: none; }
9
+ .ui-button[data-result="success"] { color: var(--ui-status-success); }
10
+ .ui-button[data-result="error"] { color: var(--ui-status-danger); }
11
+ .ui-button[data-result="error"] > svg:first-of-type { display: block; }
12
+ .ui-button[data-result="error"] > .ui-result-icon { display: none; }
13
+ }
@@ -0,0 +1,14 @@
1
+ /* callout: owned component styles; shared definitions come from the foundation. */
2
+ @layer components {
3
+ .ui-callout code { padding: .125em .375em; border-radius: var(--ui-radius-xs); background: var(--ui-surface-chip); color: color-mix(in oklab, var(--ui-text-strong) 60%, var(--ui-text-body)); box-shadow: inset 0 0 0 1px var(--ui-line-hair); font: var(--ui-weight-regular) .84em/1 var(--font-family-mono); overflow-wrap: anywhere; }
4
+ .ui-callout { --tone: var(--ui-tone-neutral); display: grid; grid-template-columns: auto minmax(0, 1fr); gap: var(--ui-space-sm); padding: .875rem var(--ui-space-md); border-radius: var(--ui-radius-lg);
5
+ background: color-mix(in oklab, var(--tone) 2.5%, var(--ui-surface-canvas)); box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--tone) 12%, var(--ui-line-contour)); color: var(--ui-text-body); font-size: var(--ui-text-small); line-height: var(--ui-leading-small); }
6
+ .ui-callout > svg { width: 1rem; height: 1rem; margin-top: .21875rem; color: color-mix(in oklab, var(--tone) 80%, var(--ui-text-strong)); }
7
+ .ui-callout > div { min-width: 0; overflow-wrap: anywhere; }
8
+ .ui-callout > div > :first-child { margin-top: 0; } .ui-callout > div > :last-child { margin-bottom: 0; }
9
+ .ui-callout b { color: var(--ui-text-strong); font-weight: var(--ui-weight-strong); }
10
+ .ui-callout[data-tone="info"] { --tone: var(--ui-status-info); }
11
+ .ui-callout[data-tone="success"], .ui-callout[data-tone="do"] { --tone: var(--ui-status-success); }
12
+ .ui-callout[data-tone="warning"] { --tone: var(--ui-status-warning); }
13
+ .ui-callout[data-tone="danger"], .ui-callout[data-tone="dont"] { --tone: var(--ui-status-danger); }
14
+ }
@@ -0,0 +1,18 @@
1
+ /* chart: owned component styles; shared definitions come from the foundation. */
2
+ @layer components {
3
+ .ui-chart { display: grid; gap: var(--ui-space-md); padding: var(--ui-space-lg); border-radius: var(--ui-radius-xl); @apply --ui-sheet-face; box-shadow: var(--ui-elevation-rise-1); }
4
+ .ui-chart-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--ui-space-xs) var(--ui-space-md); }
5
+ .ui-chart-head b { color: var(--ui-text-strong); font-size: var(--ui-text-small); font-weight: var(--ui-weight-strong); }
6
+ .ui-chart-head small { display: block; color: var(--ui-text-muted); font: var(--ui-weight-regular) var(--ui-text-caption)/1.5 var(--font-family-sans); font-variant-numeric: tabular-nums; }
7
+ .ui-chart-row { display: grid; grid-template-columns: minmax(6.5rem, 12rem) minmax(0, 1fr) minmax(4.5rem, auto); align-items: center; gap: var(--ui-space-xs) var(--ui-space-sm); font-size: .8125rem; }
8
+ .ui-chart-row > span:first-child { display: flex; flex-wrap: wrap; align-items: center; gap: 2px var(--ui-space-xs); min-width: 0; color: var(--ui-text-strong); overflow-wrap: anywhere; }
9
+ .ui-chart-row > span:first-child > small { flex-basis: 100%; color: var(--ui-text-muted); font: var(--ui-weight-regular) .75rem/1.4 var(--font-family-sans); font-variant-numeric: tabular-nums; }
10
+ .ui-chart-row > output { color: var(--ui-text-body); font: var(--ui-weight-regular) .8125rem/1 var(--font-family-sans); text-align: end; white-space: nowrap; font-variant-numeric: tabular-nums; }
11
+ .ui-chart-row > .ui-legend { grid-column: 2 / -1; gap: 2px var(--ui-space-md); font-size: .75rem; }
12
+ .ui-chart-row > .ui-legend b { color: var(--ui-text-strong); font-weight: var(--ui-weight-medium); }
13
+ @media (width < 35rem) {
14
+ .ui-chart-row { grid-template-columns: minmax(0, 1fr) auto; }
15
+ .ui-chart-row > .ui-bar { grid-column: 1 / -1; grid-row: 2; }
16
+ .ui-chart-row > .ui-legend { grid-column: 1 / -1; }
17
+ }
18
+ }
@@ -0,0 +1,18 @@
1
+ @prune native;
2
+ /* checks: owned component styles; shared definitions come from the foundation. */
3
+ @layer components {
4
+ .ui-check { display: inline-flex; align-items: center; gap: var(--ui-space-xs); color: var(--ui-text-strong); font-size: var(--ui-text-small); cursor: pointer; }
5
+ .ui-check > input:not(.ui-switch) { appearance: none; display: grid; place-items: center; flex: none; width: 1.125rem; height: 1.125rem; margin: 0; border-radius: var(--ui-radius-sm); background: var(--ui-surface-well); box-shadow: var(--ui-elevation-sink); cursor: pointer; transition: background-color var(--ui-duration-quick), box-shadow var(--ui-duration-quick); }
6
+ .ui-check > input:not(.ui-switch):not(:checked) { box-shadow: var(--ui-elevation-sink), inset 0 0 0 1px var(--ui-line-divider); }
7
+ .ui-check > input:not(.ui-switch)::after { content: ""; width: 10px; height: 10px; opacity: 0; background: var(--ui-text-inverse); mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 10'%3E%3Cpath d='M2 5.2 4.1 7.3 8 2.8' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat; }
8
+ .ui-check > input:not(.ui-switch):checked { background: var(--ui-surface-ink); box-shadow: inset 0 1px 0 light-dark(oklch(100% 0 none / .16), oklch(100% 0 none)), 0 0 0 1px light-dark(oklch(14% .003 265), oklch(0% 0 none / .5)); }
9
+ .ui-check > input:not(.ui-switch):checked::after { opacity: 1; }
10
+ .ui-check > input[type="radio"] { border-radius: 50%; }
11
+ .ui-check > input[type="radio"]::after { width: 6px; height: 6px; border-radius: 50%; mask: none; }
12
+ .ui-check > input:focus-visible { @apply --ui-focus-ring; outline-offset: 2px; }
13
+ .ui-switch { position: relative; appearance: none; flex: none; width: 2.25rem; height: 1.375rem; margin: 0; border-radius: var(--ui-radius-pill); background: var(--ui-surface-well); box-shadow: var(--ui-elevation-sink); cursor: pointer; transition: background-color var(--ui-duration-base) var(--ui-ease); }
14
+ .ui-switch::before { content: ""; position: absolute; top: 3px; left: 3px; width: 1rem; height: 1rem; border-radius: 50%; background: linear-gradient(180deg, oklch(100% 0 none), oklch(96.5% .0011 265)); box-shadow: 0 0 0 1px var(--ui-line-contour), 0 1px 1px var(--ui-shade-1), 0 2px 3px -1px var(--ui-shade-2); transition: translate var(--ui-duration-base) var(--ui-ease); }
15
+ .ui-switch:checked { background: var(--ui-surface-ink); box-shadow: inset 0 1px 2px oklch(0% 0 none / .3); }
16
+ .ui-switch:checked::before { translate: .875rem 0; background: light-dark(linear-gradient(180deg, oklch(100% 0 none), oklch(96.5% .0011 265)), linear-gradient(180deg, oklch(26% .0024 265), oklch(20% .002 265))); }
17
+ .ui-switch:focus-visible { @apply --ui-focus-ring; outline-offset: 2px; }
18
+ }
@@ -0,0 +1,82 @@
1
+ /* code-panel: owned component styles; shared definitions come from the foundation. */
2
+ @layer components {
3
+ .ui-code { position: relative; min-width: 0; overflow: hidden; border-radius: var(--ui-radius-xl); background: var(--ui-surface-code); color: var(--ui-code-text); box-shadow: inset 0 0 0 1px var(--ui-line-contour), 0 1px 0 var(--ui-lip); }
4
+ .ui-code { --code-corner: calc(var(--ui-space-md) + var(--ui-text-code) * var(--ui-leading-code) / 2 - 1rem); }
5
+ .ui-code-bar { display: flex; align-items: center; gap: var(--ui-space-xs); min-height: calc(var(--code-corner) + 2rem); padding: var(--code-corner) var(--code-corner) 0 var(--ui-space-md); }
6
+ .ui-code-bar > .ui-tabs { flex: 1; min-width: 0; margin-left: calc(var(--code-corner) - var(--ui-space-md)); }
7
+ .ui-code-file { display: inline-flex; align-items: center; gap: var(--ui-space-xs); flex: 1; min-width: 0; color: var(--ui-text-muted); font: var(--ui-weight-regular) .75rem/1 var(--font-family-mono); }
8
+ .ui-code-file svg { flex: none; width: 14px; height: 14px; }
9
+ .ui-code pre { margin: 0; padding: var(--ui-space-md) 0; overflow-x: auto; font: var(--ui-weight-regular) var(--ui-text-code)/var(--ui-leading-code) var(--font-family-mono); tab-size: 2; scrollbar-width: thin; }
10
+ .ui-code pre:focus-visible { @apply --ui-focus-ring; outline-offset: -4px; border-radius: var(--ui-radius-md); }
11
+ .ui-code:has(> .ui-code-bar) pre { padding-top: var(--ui-space-2xs); }
12
+ .ui-code-line { display: block; padding: 0 var(--ui-space-lg) 0 calc(var(--ui-space-md) + var(--code-diff-gutter, 0px)); }
13
+ .ui-code-line { min-height: 1lh; }
14
+ .ui-code[data-numbers] { counter-reset: line; }
15
+ .ui-code[data-numbers] .ui-code-line::before { counter-increment: line; content: counter(line); display: inline-block; width: 1.75rem; margin-right: var(--ui-space-sm); color: var(--ui-text-disabled); text-align: right; user-select: none; }
16
+ .ui-code-line[data-mark="active"] { background: var(--ui-code-active); box-shadow: inset 2px 0 0 var(--ui-line-mark); }
17
+ .ui-code-line[data-mark="added"] { background: var(--ui-code-added); box-shadow: inset 2px 0 0 color-mix(in oklab, var(--ui-status-success) 70%, transparent); }
18
+ .ui-code-line[data-mark="removed"] { background: var(--ui-code-removed); box-shadow: inset 2px 0 0 color-mix(in oklab, var(--ui-status-danger) 70%, transparent); }
19
+ .ui-code pre:has(.ui-code-line:is([data-mark="added"], [data-mark="removed"])) { --code-diff-gutter: calc(1ch + var(--ui-space-sm)); }
20
+ .ui-code-line:is([data-mark="added"], [data-mark="removed"]) { position: relative; min-width: min-content; }
21
+ .ui-code-line[data-mark="added"]::after, .ui-code-line[data-mark="removed"]::after { position: absolute; top: 0; left: var(--ui-space-md); width: 1ch; text-indent: 0; text-align: center; color: var(--ui-text-disabled); user-select: none; }
22
+ .ui-code-line[data-mark="added"]::after { content: "+"; }
23
+ .ui-code-line[data-mark="removed"]::after { content: "−"; }
24
+ .ui-code-line mark { padding: 1px 2px; border-radius: 3px; background: light-dark(oklch(22% .002 265 / .08), oklch(100% 0 none / .1)); color: inherit; box-shadow: inset 0 -1px 0 var(--ui-line-mark); }
25
+ .ui-code .t { color: var(--ui-code-function); } .ui-code .a { color: var(--ui-code-property); } .ui-code .s { color: var(--ui-code-string); }
26
+ .ui-code .p { color: var(--ui-code-punctuation); } .ui-code .k { color: var(--ui-code-keyword); } .ui-code .c { color: var(--ui-code-comment); font-style: italic; } .ui-code .n { color: var(--ui-code-number); }
27
+ .ui-code > .ui-disclosure { border-top: 1px solid var(--ui-line-hair); }
28
+ .ui-code > .ui-disclosure > summary { padding-inline: var(--ui-space-md); }
29
+ .ui-code > .ui-disclosure > pre { padding-top: 0; }
30
+ }
31
+
32
+
33
+ /*
34
+ * Code panels (`ui-code`, styles/system/code.css) as the site renders them: Shiki lines are `ui-code-line` parts, the
35
+ * copy action sits in the bar or, without one, in the corner, and tab panels all show on paper and without scripts.
36
+ */
37
+ @layer components {
38
+ /* The file's name keeps its width; a long result wraps in the room left beside the copy button. */
39
+ .ui-code-bar > .ui-code-file { flex: 1 0 auto; }
40
+ .ui-code-bar > .ui-copy { flex: 0 1 auto; min-width: 0; margin-left: auto; }
41
+ /* Without a bar the copy takes the panel's corner (`--code-corner`, code.css). A long line scrolls under it: the panel's own face fades in behind the button and runs to the edge, so code never runs through it. */
42
+ .ui-code > .ui-copy { position: absolute; z-index: 1; top: var(--code-corner); right: var(--code-corner); padding-left: var(--ui-space-sm); border-radius: var(--ui-radius-md); background: linear-gradient(90deg, transparent, var(--ui-surface-code) var(--ui-space-sm));
43
+ /* The face runs on to the panel's contour (1px short of the edge), so a scrolled line never shows again past the button. */
44
+ box-shadow: calc(var(--code-corner) - 1px) 0 0 var(--ui-surface-code); }
45
+ .ui-code:has(> .ui-copy) .ui-code-line { padding-right: 3rem; }
46
+ /* A shell command is read whole: it wraps under a hanging indent instead of hiding its flags behind the copy button. */
47
+ :is(.ui-code, [role="tabpanel"])[data-lang="bash"] > pre, .ui-code[data-lang="sh"] > pre, .ui-code[data-lang="shell"] > pre { white-space: pre-wrap; overflow-wrap: anywhere; }
48
+ :is(.ui-code, [role="tabpanel"])[data-lang="bash"] > pre .ui-code-line, .ui-code:is([data-lang="sh"], [data-lang="shell"]) > pre .ui-code-line { padding-left: calc(var(--ui-space-md) + var(--code-diff-gutter, 0px) + 2ch); text-indent: -2ch; }
49
+ /* Flags wrap whole: a token never breaks at its own hyphen, so `--yes` cannot split into `-` and `-yes`. */
50
+ :is(.ui-code, [role="tabpanel"])[data-lang="bash"] > pre .ui-code-line > span, .ui-code:is([data-lang="sh"], [data-lang="shell"]) > pre .ui-code-line > span { display: inline-block; text-indent: 0; }
51
+ /* Plain text, such as a prompt for an agent, is prose set in mono: it wraps at the panel like prose. */
52
+ :is(.ui-code, [role="tabpanel"])[data-lang="text"] > pre { white-space: pre-wrap; overflow-wrap: break-word; }
53
+
54
+ /* A Generated CSS disclosure right after its source closes the same panel: one frame, the output under a hairline,
55
+ as in a demo tray. Alone (after a table or a paragraph) it stays a quiet disclosure. */
56
+ .ui-prose > .ui-code:has(+ .ui-disclosure[data-generated]) { margin-bottom: 0; border-end-start-radius: 0; border-end-end-radius: 0; box-shadow: inset 1px 0 0 var(--ui-line-contour), inset -1px 0 0 var(--ui-line-contour), inset 0 1px 0 var(--ui-line-contour); }
57
+ .ui-prose > .ui-code + .ui-disclosure[data-generated] {
58
+ max-width: none; margin-top: 0; margin-inline: calc(var(--bleed) * -1); padding-inline: var(--ui-space-md);
59
+ border-radius: 0 0 var(--ui-radius-xl) var(--ui-radius-xl); background: var(--ui-surface-code);
60
+ box-shadow: inset 0 0 0 1px var(--ui-line-contour), 0 1px 0 var(--ui-lip);
61
+ }
62
+ .ui-prose > .ui-code + .ui-disclosure[data-generated] > summary { margin-inline: calc(var(--ui-space-md) * -1); padding-inline: var(--ui-space-md); box-shadow: inset 0 1px 0 var(--ui-line-hair); }
63
+ .ui-prose > .ui-code + .ui-disclosure[data-generated] > .ui-code { margin-inline: calc(var(--ui-space-md) * -1); border-radius: 0 0 var(--ui-radius-xl) var(--ui-radius-xl); background: transparent; box-shadow: inset 0 1px 0 var(--ui-line-hair); }
64
+
65
+ /* @WARN and @ERROR marks: a wavy underline in the status tone instead of a wash. */
66
+ .ui-code-line mark[data-tone] { padding: 0; background: none; box-shadow: none; text-decoration: underline wavy 1px; text-underline-offset: 3px; }
67
+ .ui-code-line mark[data-tone="warning"] { text-decoration-color: var(--ui-status-warning); }
68
+ .ui-code-line mark[data-tone="danger"] { text-decoration-color: var(--ui-status-danger); }
69
+ /* [!code focus] blurs the other lines until the pointer reaches the code. */
70
+ .ui-code pre.has-focused .ui-code-line { transition: filter var(--ui-duration-base) var(--ui-ease); }
71
+ .ui-code pre.has-focused:not(:hover, :focus-visible) .ui-code-line:not(.focus) { filter: blur(3px); }
72
+ .ui-code ::selection { background: color-mix(in oklab, var(--ui-code-function) 22%, transparent); }
73
+ @media print {
74
+ .ui-code { break-inside: avoid; }
75
+ /* Paper cannot scroll: keep complete commands and long source lines readable. */
76
+ .ui-code pre { overflow: visible; white-space: pre-wrap; overflow-wrap: anywhere; }
77
+ .ui-code pre.has-focused .ui-code-line { filter: none; }
78
+ }
79
+ @media (prefers-reduced-motion: reduce) { .ui-code pre.has-focused .ui-code-line { transition: none; } }
80
+ @media (forced-colors: active) { .ui-code { border: 1px solid CanvasText; } }
81
+
82
+ }
@@ -0,0 +1,40 @@
1
+ /* code-tabs: owned component styles; shared definitions come from the foundation. */
2
+ @layer components {
3
+ .ui-tabs { display: flex; gap: 2px; min-width: 0; overflow-x: auto; scrollbar-width: none; }
4
+ .ui-tabs::-webkit-scrollbar { display: none; }
5
+ .ui-tabs > [role="tab"] {
6
+ appearance: none; display: inline-flex; flex: none; align-items: center; gap: 6px; min-height: 2rem; padding: 0 .625rem; border: 0; border-radius: var(--ui-radius-md);
7
+ background: transparent; color: var(--ui-text-muted); font: var(--ui-weight-regular) .75rem/1 var(--font-family-mono); cursor: pointer; transition: color var(--ui-duration-quick), background-color var(--ui-duration-quick), box-shadow var(--ui-duration-quick);
8
+ }
9
+ .ui-tabs > [role="tab"] svg { width: 14px; height: 14px; }
10
+ .ui-tabs > [role="tab"]:hover { color: var(--ui-text-strong); }
11
+ .ui-tabs > [role="tab"][aria-selected="true"] { background: var(--ui-surface-chip); color: var(--ui-text-strong); box-shadow: inset 0 0 0 1px var(--ui-line-hair); }
12
+ .ui-tabs > [role="tab"]:focus-visible { @apply --ui-focus-ring; outline-offset: -2px; }
13
+ }
14
+
15
+
16
+ /*
17
+ * Code panels (`ui-code`, styles/system/code.css) as the site renders them: Shiki lines are `ui-code-line` parts, the
18
+ * copy action sits in the bar or, without one, in the corner, and tab panels all show on paper and without scripts.
19
+ */
20
+ @layer components {
21
+ /* The file's name keeps its width; a long result wraps in the room left beside the copy button. */
22
+ /* Without a bar the copy takes the panel's corner (`--code-corner`, code.css). A long line scrolls under it: the panel's own face fades in behind the button and runs to the edge, so code never runs through it. */
23
+ /* A shell command is read whole: it wraps under a hanging indent instead of hiding its flags behind the copy button. */
24
+ /* Flags wrap whole: a token never breaks at its own hyphen, so `--yes` cannot split into `-` and `-yes`. */
25
+ /* Plain text, such as a prompt for an agent, is prose set in mono: it wraps at the panel like prose. */
26
+
27
+ /* A Generated CSS disclosure right after its source closes the same panel: one frame, the output under a hairline,
28
+ as in a demo tray. Alone (after a table or a paragraph) it stays a quiet disclosure. */
29
+
30
+ /* @WARN and @ERROR marks: a wavy underline in the status tone instead of a wash. */
31
+ /* [!code focus] blurs the other lines until the pointer reaches the code. */
32
+
33
+ [data-code-tabs] > [role="tabpanel"] > .ui-code-file { display: none; }
34
+ @media (scripting: none), print {
35
+ [data-code-tabs] > .ui-code-bar { display: none; }
36
+ [data-code-tabs] > [role="tabpanel"][hidden] { display: block; }
37
+ [data-code-tabs] > [role="tabpanel"] > .ui-code-file { display: flex; padding: var(--ui-space-sm) var(--ui-space-md) 0; }
38
+ }
39
+
40
+ }