@master/internal-site 0.1.1 → 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 (187) hide show
  1. package/README.md +17 -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/Footer.svelte +2 -2
  81. package/src/docs-shell/components/FooterLink.svelte +17 -0
  82. package/src/docs-shell/components/GeneratedCSS.astro +1 -0
  83. package/src/docs-shell/components/Header.svelte +1 -1
  84. package/src/docs-shell/components/InlineCode.astro +1 -0
  85. package/src/docs-shell/components/InteractingIndicator.astro +1 -0
  86. package/src/docs-shell/components/LanguageButton.svelte +1 -0
  87. package/src/docs-shell/components/LanguageSelect.svelte +2 -0
  88. package/src/docs-shell/components/NotFound.astro +3 -0
  89. package/src/docs-shell/components/PMAction.astro +1 -0
  90. package/src/docs-shell/components/PageContent.svelte +1 -1
  91. package/src/docs-shell/components/PageContentDisclosure.astro +2 -1
  92. package/src/docs-shell/components/PageContentList.svelte +2 -0
  93. package/src/docs-shell/components/PageNavs.astro +1 -0
  94. package/src/docs-shell/components/SearchButton.svelte +3 -0
  95. package/src/docs-shell/components/SearchDialog.svelte +6 -1
  96. package/src/docs-shell/components/Segments.svelte +2 -0
  97. package/src/docs-shell/components/StepSection.astro +1 -2
  98. package/src/docs-shell/components/Tabs.astro +1 -0
  99. package/src/docs-shell/components/ThemeSelect.svelte +2 -0
  100. package/src/docs-shell/components/markdown/Table.astro +1 -0
  101. package/src/docs-shell/components/markdown-components.ts +0 -1
  102. package/src/docs-shell/remark/markdown-components.js +28 -7
  103. package/src/docs-shell/scripts/document.ts +1 -1
  104. package/src/docs-shell/types/Metadata.ts +11 -0
  105. package/src/docs-shell/utils/generate-metadata.ts +3 -1
  106. package/src/docs-shell/utils/head.ts +5 -2
  107. package/src/examples/components/ArticleTransitionScene.svelte +4 -0
  108. package/src/examples/layout-system/page.astro +0 -1
  109. package/src/home/HomeBentoFrame.astro +1 -0
  110. package/src/home/HomeBentoGrid.astro +1 -0
  111. package/src/home/HomeFooter.svelte +2 -2
  112. package/src/home/bento.css +167 -0
  113. package/src/home/design.css +1 -1
  114. package/src/home/home.css +4 -576
  115. package/src/home/segmented-control.css +94 -0
  116. package/src/layouts/Document.astro +3 -1
  117. package/src/public/icons/json.svg +1 -0
  118. package/src/scripts/atomic-class-authoring.ts +98 -0
  119. package/src/scripts/style-delivery.mjs +110 -0
  120. package/src/sections/blog.astro +1 -1
  121. package/src/sections/guide.astro +1 -2
  122. package/src/styles/blog-article.css +10 -7
  123. package/src/styles/blog-materials.css +13 -0
  124. package/src/styles/demo.css +0 -1
  125. package/src/styles/docs-shell/code.css +5 -61
  126. package/src/styles/docs-shell/documentation-search.css +1 -0
  127. package/src/styles/docs-shell/footer-link.css +5 -0
  128. package/src/styles/docs-shell/header.css +2 -73
  129. package/src/styles/docs-shell/menu.css +37 -17
  130. package/src/styles/docs-shell/page-content.css +2 -37
  131. package/src/styles/docs-shell/prose.css +18 -9
  132. package/src/styles/docs-shell/steps.css +2 -39
  133. package/src/styles/document-comparison.css +5 -2
  134. package/src/styles/documentation-illustration.css +1 -9
  135. package/src/styles/documentation-index.css +2 -1
  136. package/src/styles/documents.css +2 -4
  137. package/src/styles/interface.css +5 -3
  138. package/src/styles/system/DESIGN.md +34 -14
  139. package/src/styles/system/browser.css +21 -0
  140. package/src/styles/system/button-feedback.css +13 -0
  141. package/src/styles/system/callout.css +14 -0
  142. package/src/styles/system/chart.css +18 -0
  143. package/src/styles/system/checks.css +18 -0
  144. package/src/styles/system/code-panel.css +82 -0
  145. package/src/styles/system/code-tabs.css +40 -0
  146. package/src/styles/system/code.css +8 -85
  147. package/src/styles/system/compare.css +7 -0
  148. package/src/styles/system/controls.css +10 -109
  149. package/src/styles/system/copy.css +32 -0
  150. package/src/styles/system/data.css +10 -134
  151. package/src/styles/system/dialog.css +16 -0
  152. package/src/styles/system/disclosure.css +19 -0
  153. package/src/styles/system/expand.css +11 -0
  154. package/src/styles/system/fields.css +25 -0
  155. package/src/styles/system/header-core.css +101 -0
  156. package/src/styles/system/hint.css +5 -0
  157. package/src/styles/system/index.css +13 -0
  158. package/src/styles/system/inline-code.css +4 -0
  159. package/src/styles/system/kbd.css +4 -0
  160. package/src/styles/system/logos.css +10 -0
  161. package/src/styles/system/menu.css +14 -0
  162. package/src/styles/system/metrics.css +22 -0
  163. package/src/styles/system/pagehead.css +13 -0
  164. package/src/styles/system/pager.css +13 -0
  165. package/src/styles/system/parameters.css +17 -0
  166. package/src/styles/system/prompt.css +7 -0
  167. package/src/styles/system/prose.css +4 -75
  168. package/src/styles/system/range.css +12 -0
  169. package/src/styles/system/reading.css +44 -0
  170. package/src/styles/system/scroll.css +6 -0
  171. package/src/styles/system/search-trigger.css +10 -0
  172. package/src/styles/system/segmented.css +22 -0
  173. package/src/styles/system/sheet.css +8 -0
  174. package/src/styles/system/shell.css +8 -102
  175. package/src/styles/system/sidebar.css +14 -0
  176. package/src/styles/system/source.css +5 -0
  177. package/src/styles/system/specimens.css +3 -0
  178. package/src/styles/system/stage.css +18 -0
  179. package/src/styles/system/steps.css +51 -0
  180. package/src/styles/system/surfaces.css +8 -104
  181. package/src/styles/system/table.css +23 -0
  182. package/src/styles/system/toc.css +59 -0
  183. package/src/styles/system/tooltip.css +6 -0
  184. package/src/styles/system/tray-code.css +6 -0
  185. package/src/styles/system/tray.css +20 -0
  186. package/src/styles/system/tree.css +15 -0
  187. package/src/styles/system/waterfall.css +14 -0
@@ -1,4 +1,7 @@
1
1
  <script lang="ts">
2
+ import '@master/internal-site/styles/interface.css'
3
+ import '@master/internal-site/styles/system/copy.css'
4
+
2
5
  import type { Snippet } from 'svelte'
3
6
  import type { HTMLButtonAttributes } from 'svelte/elements'
4
7
  import IconCopy from '@tabler/icons-svelte-runes/icons/copy'
@@ -1,4 +1,6 @@
1
1
  <script lang="ts">
2
+ import '@master/internal-site/styles/system/copy.css'
3
+
2
4
  import type { Snippet } from 'svelte'
3
5
  import { setCopyFeedback, type CopyResult } from '@master/internal-site/demo/copy-feedback.ts'
4
6
 
@@ -1,4 +1,6 @@
1
1
  <script lang="ts">
2
+ import '@master/internal-site/styles/system/inline-code.css'
3
+
2
4
  import '@master/internal-site/styles/system/specimens.css'
3
5
  import { onMount } from 'svelte'
4
6
 
@@ -1,4 +1,6 @@
1
1
  <script lang="ts">
2
+ import '@master/internal-site/styles/system/disclosure.css'
3
+
2
4
  import type { Snippet } from 'svelte'
3
5
 
4
6
  /** The complete generated stylesheet stays one native, closed disclosure under the source. */
@@ -1,4 +1,5 @@
1
1
  ---
2
+ import '@master/internal-site/styles/interface.css'
2
3
  import '@master/internal-site/styles/system/specimens.css'
3
4
 
4
5
  export interface DemoIndexGroup {
@@ -1,4 +1,5 @@
1
1
  <script lang="ts">
2
+ import '@master/internal-site/styles/interface.css'
2
3
  import type { Snippet } from 'svelte'
3
4
  import { onMount } from 'svelte'
4
5
  import IconPlayerPause from '@tabler/icons-svelte-runes/icons/player-pause'
@@ -1,4 +1,6 @@
1
1
  <script lang="ts">
2
+ import '@master/internal-site/styles/system/scroll.css'
3
+
2
4
  import '@master/internal-site/styles/system/specimens.css'
3
5
  import type { Snippet } from 'svelte'
4
6
  import type { HTMLAttributes } from 'svelte/elements'
@@ -1,4 +1,5 @@
1
1
  ---
2
+ import '@master/internal-site/styles/system/compare.css'
2
3
  import Demo from '@master/internal-site/demo/Demo.svelte'
3
4
  import DemoViewport from '@master/internal-site/demo/DemoViewport.svelte'
4
5
 
@@ -1,4 +1,6 @@
1
1
  <script lang="ts">
2
+ import '@master/internal-site/styles/system/sheet.css'
3
+
2
4
  import '@master/internal-site/styles/system/specimens.css'
3
5
  import type { Snippet } from 'svelte'
4
6
  import type { HTMLAttributes } from 'svelte/elements'
@@ -1,4 +1,5 @@
1
1
  ---
2
+ import '@master/internal-site/styles/system/compare.css'
2
3
  import Demo from '@master/internal-site/demo/Demo.svelte'
3
4
  import DemoViewport from '@master/internal-site/demo/DemoViewport.svelte'
4
5
  import { demoDocument } from '@master/internal-site/demo/reference/document.ts'
@@ -1,5 +1,5 @@
1
1
  ---
2
- import '@master/internal-site/styles/system/data.css'
2
+ import '@master/internal-site/styles/system/table.css'
3
3
  import InlineCode from '@master/internal-site/components/InlineCode.astro'
4
4
  import RenderNode from '@master/internal-site/components/RenderNode.astro'
5
5
 
@@ -28,6 +28,11 @@
28
28
  </script>
29
29
 
30
30
  <script lang="ts">
31
+ import '@master/internal-site/styles/interface.css'
32
+ import '@master/internal-site/styles/system/browser.css'
33
+ import '@master/internal-site/styles/system/range.css'
34
+ import '@master/internal-site/styles/system/segmented.css'
35
+
31
36
  import { untrack } from 'svelte'
32
37
  import IconMoon from '@tabler/icons-svelte-runes/icons/moon'
33
38
  import IconPlayerPause from '@tabler/icons-svelte-runes/icons/player-pause'
@@ -1,5 +1,5 @@
1
1
  ---
2
- import '@master/internal-site/styles/system/data.css'
2
+ import '@master/internal-site/styles/system/waterfall.css'
3
3
  import Demo from '@master/internal-site/demo/Demo.svelte'
4
4
  import type { DemoWaterfallProps } from '@master/internal-site/demo/demo-waterfall.ts'
5
5
 
@@ -1,4 +1,5 @@
1
1
  ---
2
+ import '@master/internal-site/styles/interface.css'
2
3
  import FoundationSpecimen from '@master/internal-site/demo/foundations/FoundationSpecimen.astro'
3
4
  ---
4
5
 
@@ -1,4 +1,5 @@
1
1
  ---
2
+ import '@master/internal-site/styles/system/sheet.css'
2
3
  import DemoContainer from '@master/internal-site/demo/DemoContainer.svelte'
3
4
  import DemoLabel from '@master/internal-site/demo/DemoLabel.svelte'
4
5
  import DemoMedia from '@master/internal-site/demo/DemoMedia.svelte'
@@ -1,4 +1,5 @@
1
1
  ---
2
+ import '@master/internal-site/styles/system/sheet.css'
2
3
  import DemoContainer from '@master/internal-site/demo/DemoContainer.svelte'
3
4
  import DemoItem from '@master/internal-site/demo/DemoItem.svelte'
4
5
  ---
@@ -3,6 +3,8 @@
3
3
  </script>
4
4
 
5
5
  <script lang="ts">
6
+ import '@master/internal-site/styles/system/fields.css'
7
+
6
8
  import '@master/internal-site/styles/system/specimens.css'
7
9
  import '@master/internal-site/styles/demo.css'
8
10
  import DemoCopyButton from '@master/internal-site/demo/DemoCopyButton.svelte'
@@ -159,7 +159,7 @@ export function drawing(theme: Theme) {
159
159
  <head>
160
160
  <meta charset="utf-8">
161
161
  <title>${escapeHtml(title)}</title>
162
- <link rel="stylesheet" href="${asset('../../../../styles/system/tokens.css')}">
162
+ <link rel="stylesheet" href="${asset('../styles/system/tokens.css')}">
163
163
  <link rel="stylesheet" href="${asset('./illustration.css')}">
164
164
  </head>
165
165
  <body>
@@ -0,0 +1,218 @@
1
+ /*
2
+ * Illustration primitives drawn with the site's own tokens (`styles/system/tokens.css`), at 1:1 with the
3
+ * article: the 720px scene shows at the wide media width (712px on desktop), so a 14px label reads as 14px.
4
+ * Artifacts are sheets, operations are control-sized chips, groups are eyebrow captions over a hairline partition:
5
+ * the figure is a tray's stage, so nothing in it forms another nested frame. Nothing invents a colour.
6
+ */
7
+ @font-face { font-family: Geist; font-weight: 100 900; src: url("../public/fonts/GeistVariable.woff2") format("woff2"); }
8
+ @font-face { font-family: "IBM Plex Mono"; font-weight: 400; src: url("../public/fonts/IBMPlexMono-Regular.woff2") format("woff2"); }
9
+
10
+ :root { color-scheme: light; }
11
+ :root.dark { color-scheme: dark; }
12
+ * { box-sizing: border-box; }
13
+ body {
14
+ margin: 0; overflow: hidden;
15
+ background: var(--ui-stage-light), var(--ui-surface-stage);
16
+ color: var(--ui-text-body); font: var(--ui-weight-regular) 13px/20px Geist, sans-serif;
17
+ -webkit-font-smoothing: antialiased;
18
+ }
19
+ .scene { position: relative; overflow: hidden; }
20
+ .scene > * { position: absolute; }
21
+
22
+ /* Routes: one hairline ink, a chevron head, dashes only for a labelled condition */
23
+ .routes { inset: 0; overflow: visible; }
24
+ .routes path { fill: none; stroke: var(--ui-line-mark); stroke-width: 1; stroke-linecap: round; stroke-linejoin: round; }
25
+ .routes path[data-dashed] { stroke-dasharray: 3 4; }
26
+ .routes marker path { stroke: var(--ui-text-disabled); stroke-width: 1.25; }
27
+ .routes path[marker-end] { stroke: var(--ui-text-disabled); }
28
+
29
+ /* Type: the documentation's small sizes at its light regular weight */
30
+ .title { color: var(--ui-text-strong); font-size: 14px; font-weight: var(--ui-weight-medium); line-height: 20px; white-space: nowrap; }
31
+ .note { color: var(--ui-text-muted); font-size: 13px; line-height: 20px; white-space: nowrap; }
32
+ .body { color: var(--ui-text-body); font-size: 13px; line-height: 20px; white-space: nowrap; }
33
+ .edge { color: var(--ui-text-muted); font-size: 12px; line-height: 16px; white-space: nowrap; }
34
+ .code { color: var(--ui-text-body); font: 400 12.5px/20px "IBM Plex Mono", monospace; white-space: nowrap; }
35
+ .eyebrow { color: var(--ui-text-muted); font-size: 11px; font-weight: var(--ui-weight-medium); line-height: 16px; letter-spacing: .14em; text-transform: uppercase; white-space: nowrap; }
36
+ .center { translate: -50% 0; text-align: center; }
37
+ .end { translate: -100% 0; text-align: right; }
38
+ .icon { flex: none; width: 16px; height: 16px; color: var(--ui-text-muted); }
39
+ .icon svg { display: block; width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
40
+
41
+ /* An artifact: the sheet face at rise-1, the small card radius */
42
+ .sheet {
43
+ display: flex; flex-direction: column; width: max-content; gap: 4px; padding: 13px 16px 14px;
44
+ border-radius: var(--ui-radius-xl);
45
+ background: linear-gradient(180deg, var(--ui-surface-sheet), var(--ui-surface-sheet-lo));
46
+ box-shadow: var(--ui-elevation-rise-1);
47
+ }
48
+ .anchor-center { translate: -50% 0; }
49
+ .anchor-end { translate: -100% 0; }
50
+ .sheet > .row { display: flex; align-items: center; gap: 8px; min-height: 20px; }
51
+ .sheet > .rule { height: 1px; margin: 7px -16px 5px; background: var(--ui-line-hair); }
52
+ .sheet .bars { display: grid; gap: 9px; padding-top: 8px; }
53
+ .sheet .bars i { display: block; height: 5px; border-radius: 3px; background: var(--ui-line-divider); }
54
+
55
+ /* An operation: a control-sized chip, like a button at rest */
56
+ .chip {
57
+ display: flex; align-items: center; justify-content: center; gap: 8px; height: 32px; padding: 0 12px 0 10px;
58
+ border-radius: var(--ui-radius-md);
59
+ background: linear-gradient(180deg, var(--ui-surface-sheet), var(--ui-surface-sheet-lo));
60
+ box-shadow: var(--ui-elevation-rise-1);
61
+ color: var(--ui-text-strong); font-size: 13.5px; font-weight: var(--ui-weight-medium); white-space: nowrap;
62
+ }
63
+
64
+ /* A plain mark: an icon beside a title, with no frame */
65
+ .mark { display: flex; align-items: center; gap: 8px; }
66
+
67
+ /* A boundary between two places: one hairline partition, each side captioned by an eyebrow */
68
+ .divider { width: 1px; background: var(--ui-line-divider); }
69
+
70
+ /* A window: one contour, a tray-tone toolbar with its dots only */
71
+ .window { overflow: hidden; border-radius: var(--ui-radius-xl); background: var(--ui-surface-stage); box-shadow: var(--ui-elevation-rise-1); }
72
+ .window > .toolbar { display: flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; background: var(--ui-surface-tray); }
73
+ .window > .toolbar i { width: 7px; height: 7px; border-radius: 50%; background: var(--ui-line-strong); }
74
+ .window > .bars { display: grid; gap: 10px; padding: 18px 20px; }
75
+ .window > .bars i { display: block; height: 5px; border-radius: 3px; background: var(--ui-line-divider); }
76
+ .window > .bars i:first-child { height: 8px; border-radius: 4px; background: var(--ui-line-strong); }
77
+
78
+ /* Inspection guides expose a control's padding; they are annotations, not part of the taught button. */
79
+ .spacing-study { --sample-ink: var(--ui-text-muted); translate: -50% 0; }
80
+ .spacing-study.accented { --sample-ink: var(--ui-tone-blue); }
81
+ .spacing-control {
82
+ position: relative; display: flex; align-items: center; justify-content: center;
83
+ min-height: 38px; padding: 8px var(--sample-padding); border: 1px solid var(--ui-line-divider);
84
+ border-radius: var(--ui-radius-md); background: var(--ui-surface-sheet); box-shadow: var(--ui-elevation-rise-1);
85
+ }
86
+ .spacing-control > .body { color: var(--ui-text-strong); font-size: 14px; font-weight: 400; line-height: 1.2; }
87
+ .spacing-control > i { position: absolute; inset-block: 0; width: var(--sample-padding); background: color-mix(in oklch, var(--sample-ink) 10%, transparent); }
88
+ .spacing-control > .padding-start { left: 0; border-right: 1px dotted var(--sample-ink); border-radius: var(--ui-radius-md) 0 0 var(--ui-radius-md); }
89
+ .spacing-control > .padding-end { right: 0; border-left: 1px dotted var(--sample-ink); border-radius: 0 var(--ui-radius-md) var(--ui-radius-md) 0; }
90
+ .spacing-ruler { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin: 16px 1px 0; }
91
+ .spacing-ruler > .edge { color: var(--sample-ink); }
92
+ .spacing-ruler > i { flex: none; position: relative; width: var(--sample-padding); height: 7px; border-inline: 1px solid var(--sample-ink); }
93
+ .spacing-ruler > i::after { content: ''; position: absolute; top: 3px; inset-inline: 0; border-top: 1px solid var(--sample-ink); }
94
+
95
+ /* Equal-area swatches show real color. Only the target outline belongs to the annotation. */
96
+ .color-scale { display: flex; gap: 16px; width: max-content; }
97
+ .color-scale-step { display: grid; justify-items: center; gap: 10px; }
98
+ .color-scale-step > i { display: block; width: 40px; aspect-ratio: 1; border-radius: var(--ui-radius-sm); box-shadow: inset 0 0 0 1px var(--ui-line-hair); }
99
+ .color-scale-step > i[data-selected] { outline: 1px solid var(--annotation-ink); outline-offset: 5px; }
100
+ .role-selection { display: grid; justify-items: center; gap: 18px; width: max-content; }
101
+ .role-selection > .code { color: var(--annotation-ink); }
102
+ .role-selection-sample { padding: 20px 24px; border-radius: var(--ui-radius-lg); box-shadow: var(--ui-elevation-rise-1); }
103
+ .role-selection-sample > span { font: var(--ui-weight-regular) 14px/1.5 Geist, sans-serif; }
104
+ .spacing-sample { width: max-content; outline: 1px dashed var(--annotation-ink); }
105
+ .spacing-sample[data-kind="padding"] { background: color-mix(in oklch, var(--annotation-ink) 12%, var(--ui-surface-stage)); }
106
+ .spacing-item { position: relative; padding: 10px 12px; background: var(--ui-surface-sheet); box-shadow: inset 0 0 0 1px var(--ui-line-divider); }
107
+ .spacing-sample[data-kind="gap"] > .spacing-item + .spacing-item::before { content: ''; position: absolute; inset-inline: 0; bottom: 100%; height: var(--spacing-md); background: color-mix(in oklch, var(--annotation-ink) 12%, var(--ui-surface-stage)); }
108
+ .sizing-study { display: grid; gap: 16px; }
109
+ .sizing-parent { outline: 1px dashed var(--ui-text-muted); }
110
+ .sizing-child { display: flex; justify-content: space-between; gap: 16px; padding: 16px; background: var(--ui-surface-sheet); box-shadow: inset 0 0 0 1px var(--ui-line-divider); }
111
+ .radius-sample { width: 224px; background: var(--ui-surface-sheet); outline: 1px dashed var(--ui-text-muted); }
112
+ .radius-child { padding: 16px 20px; background: color-mix(in oklch, var(--ui-tone-blue) 16%, var(--ui-surface-sheet)); }
113
+ .radius-parent-content { padding: 24px 20px; }
114
+ .shadow-study { display: grid; gap: 16px; width: max-content; }
115
+ .shadow-sample { display: grid; gap: 8px; padding: 24px; border-radius: var(--ui-radius-lg); background: var(--ui-surface-sheet); }
116
+ .shadow-following { position: relative; padding: 10px 24px; box-shadow: inset 0 1px 0 var(--ui-line-divider); }
117
+ .shadow-gap { position: absolute; right: -24px; top: -16px; width: 0; height: 16px; border-inline-start: 1px solid var(--ui-tone-blue); }
118
+ .shadow-gap::before, .shadow-gap::after { content: ''; position: absolute; left: -3px; width: 5px; border-top: 1px solid var(--ui-tone-blue); }
119
+ .shadow-gap::before { top: 0; }
120
+ .shadow-gap::after { bottom: 0; }
121
+ .shadow-gap > .edge { display: block; width: max-content; margin-inline-start: 8px; color: var(--ui-tone-blue); line-height: 16px; }
122
+ .font-comparison { display: grid; grid-template-columns: repeat(3, max-content); align-items: baseline; gap: 24px 36px; }
123
+ .font-specimen { line-height: 1.5; color: var(--ui-text-strong); }
124
+ .leading-study { display: grid; grid-template-columns: repeat(2, max-content); gap: 72px; }
125
+ .leading-column { display: grid; align-content: start; gap: 16px; }
126
+ .leading-lines { width: 12rem; color: var(--ui-text-strong); }
127
+ .leading-lines > span { display: block; background: color-mix(in oklch, var(--annotation-ink) 8%, transparent); box-shadow: inset 0 -1px 0 color-mix(in oklch, var(--annotation-ink) 30%, transparent); }
128
+ .leading-column > .edge { color: var(--annotation-ink); }
129
+ .tracking-scope { display: grid; grid-template-columns: repeat(2, max-content); align-items: baseline; gap: 12px 28px; padding: 24px; border: 1px solid var(--ui-line-divider); border-radius: var(--ui-radius-lg); }
130
+ .tracking-row { display: contents; }
131
+ .tracking-row > .code { grid-column: 1 / -1; }
132
+ .tracking-row + .tracking-row > .code { margin-top: 20px; }
133
+ .tracking-row > :not(.tracking-sample) { letter-spacing: normal; }
134
+ .tracking-sample { width: max-content; line-height: 1.5; color: var(--ui-text-strong); box-shadow: inset 0 -1px 0 var(--annotation-ink); }
135
+ .tracking-row > .edge { color: var(--annotation-ink); }
136
+
137
+ /* Syntax anatomy: one intact string with exact ranges and nearby, directly attached explanations. */
138
+ [data-tone="blue"] { --annotation-ink: var(--ui-tone-blue); }
139
+ [data-tone="violet"] { --annotation-ink: var(--ui-tone-violet); }
140
+ [data-tone="amber"] { --annotation-ink: color-mix(in srgb, var(--ui-tone-amber) 75%, var(--ui-text-strong)); }
141
+ .annotated-code { display: flex; width: max-content; }
142
+ .code-part { position: relative; padding-block: 4px; background: color-mix(in oklch, var(--annotation-ink) 8%, transparent); }
143
+ .code-part > .code { color: var(--annotation-ink); }
144
+ .code-part:first-child { border-radius: var(--ui-radius-sm) 0 0 var(--ui-radius-sm); }
145
+ .code-part:last-child { border-radius: 0 var(--ui-radius-sm) var(--ui-radius-sm) 0; }
146
+ .code-bracket { position: absolute; inset-inline: 1px; bottom: -9px; height: 5px; border: 1px solid var(--annotation-ink); border-top: 0; }
147
+ .annotation { display: flex; flex-direction: column; align-items: center; gap: 6px; width: max-content; }
148
+ .annotation > .title { color: var(--annotation-ink); }
149
+ .routes path[data-from] { stroke: color-mix(in srgb, var(--annotation-ink) 65%, var(--ui-line-mark)); }
150
+
151
+ /* A shared stylesheet reaches every consumer; conversion and verification have different scopes. */
152
+ .migration-reach { left: 50%; top: 50%; translate: -50% -50%; display: flex; flex-direction: column; align-items: center; width: max-content; }
153
+ .migration-reach > .sheet { position: static; }
154
+ .migration-trunk { position: relative; height: 76px; border-left: 1px solid var(--ui-line-mark); }
155
+ .migration-trunk > .edge { position: absolute; left: 12px; top: 24px; }
156
+ .migration-consumers { display: grid; grid-template-columns: repeat(3, 1fr); column-gap: 28px; }
157
+ .migration-consumer { position: relative; display: flex; flex-direction: column; align-items: center; gap: 10px; padding-top: 42px; }
158
+ .migration-consumer::before { content: ''; position: absolute; top: 0; height: 26px; left: 50%; border-left: 1px solid var(--ui-line-mark); }
159
+ .migration-consumer::after { content: ''; position: absolute; top: 0; left: -14px; right: -14px; border-top: 1px solid var(--ui-line-mark); }
160
+ .migration-consumer:first-child::after { left: 50%; }
161
+ .migration-consumer:last-child::after { right: 50%; }
162
+ .migration-screen { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: var(--ui-radius-md); }
163
+ .migration-consumer.is-batch .migration-screen { background: color-mix(in oklch, var(--ui-tone-blue) 8%, transparent); outline: 1px solid color-mix(in oklch, var(--ui-tone-blue) 45%, transparent); }
164
+ .migration-consumer.is-batch .migration-screen > :is(.title, .icon) { color: var(--ui-tone-blue); }
165
+ .migration-verification { position: relative; align-self: stretch; display: flex; justify-content: center; margin-top: 28px; padding-top: 24px; }
166
+ .migration-verification::before { content: ''; position: absolute; top: 0; inset-inline: 0; height: 8px; border: 1px solid var(--ui-line-mark); border-top: 0; }
167
+
168
+ /* Same DOM and pointer state; only the suffix's test location changes. */
169
+ .selector-specimen > p { margin: 0 0 8px; }
170
+ .selector-specimen > a { position: relative; display: block; padding: 6px 26px 6px 0; border-radius: var(--ui-radius-xs); }
171
+ .selector-specimen[data-test="owner"] { outline: 1px dashed var(--ui-tone-blue); outline-offset: 3px; }
172
+ .selector-specimen[data-test="target"] > a:first-of-type { outline: 1px dashed var(--ui-tone-blue); outline-offset: 3px; }
173
+ .selector-specimen[data-test="owner"] > a > .body,
174
+ .selector-specimen[data-test="target"] > a:first-of-type > .body { text-decoration: underline; text-underline-offset: 3px; }
175
+ .selector-pointer { position: absolute; top: 15px; right: 4px; width: 20px; height: 20px; fill: var(--ui-surface-sheet); stroke: var(--ui-text-strong); stroke-width: 1.25; stroke-linejoin: round; }
176
+
177
+ /* Native code containment: an intrinsic block with indentation, braces and a measured scope guide. */
178
+ .code-scope { display: flex; flex-direction: column; width: max-content; }
179
+ .code-scope > .code { color: var(--annotation-ink, var(--ui-text-body)); }
180
+ .code-scope-body { padding-left: 16px; border-left: 1px solid color-mix(in srgb, var(--annotation-ink, var(--ui-text-muted)) 35%, transparent); }
181
+ .code-scope-body > .code-scope { --annotation-ink: var(--ui-text-body); }
182
+ .code-scope-body > .code-scope[data-tone="violet"] { --annotation-ink: var(--ui-tone-violet); }
183
+
184
+ /* Computed-variable comparison: nested boundaries mean DOM scopes; swatches are literal teaching results. */
185
+ .variable-scope { display: flex; flex-direction: column; gap: 4px; width: max-content; padding: 12px; border: 1px solid var(--ui-line-divider); border-radius: var(--ui-radius-lg); }
186
+ .variable-scope > .code:first-child { color: var(--ui-text-strong); margin-bottom: 3px; }
187
+ .variable-region { display: flex; flex-direction: column; gap: 4px; margin-top: 8px; padding: 10px; border-left: 1px solid var(--ui-line-strong); background: var(--ui-surface-tray); border-radius: 0 var(--ui-radius-sm) var(--ui-radius-sm) 0; }
188
+ .variable-sample { margin-top: 8px; padding: 8px 12px; border-radius: var(--ui-radius-sm); background: #1d4ed8; }
189
+ .variable-sample > .code { color: white; }
190
+ .variable-scope[data-inline="true"] .variable-sample { background: #86198f; }
191
+ .variable-scope .edge { line-height: 20px; }
192
+
193
+ /* Layer order is a ranked list. The final entry lies outside the five named layers. */
194
+ .priority-stack { display: flex; flex-direction: column; gap: 8px; width: max-content; }
195
+ .priority-stack > div { padding: 6px 28px; text-align: center; background: var(--ui-surface-sheet); border-radius: var(--ui-radius-sm); box-shadow: 0 0 0 1px var(--ui-line-hair); }
196
+ .priority-stack > .unlayered { position: relative; margin-top: 12px; background: none; box-shadow: none; }
197
+ .priority-stack > .unlayered::before { content: ''; position: absolute; top: -10px; inset-inline: 0; height: 1px; background: var(--ui-line-divider); }
198
+
199
+ .routes path[data-emphasis], .routes marker#arrow-emphasis path { stroke: var(--ui-text-muted); }
200
+
201
+ /* A removed input remains as context, with no live dependency edge. */
202
+ .source-contribution[data-removed] { background: none; box-shadow: none; outline: 1px dashed var(--ui-line-strong); }
203
+ .source-contribution[data-removed] .title { color: var(--ui-text-muted); text-decoration: line-through; }
204
+
205
+ /* A shared measured width scale distinguishes the viewport from a query container. */
206
+ .query-scopes { --query-ink: var(--ui-tone-blue); }
207
+ .query-ruler { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
208
+ .query-ruler::before, .query-ruler::after { content: ''; flex: 1; height: 8px; border-top: 1px solid var(--query-ink); }
209
+ .query-ruler::before { border-left: 1px solid var(--query-ink); }
210
+ .query-ruler::after { border-right: 1px solid var(--query-ink); }
211
+ .query-ruler > .code { color: var(--query-ink); }
212
+ .query-viewport { display: flex; flex-direction: column; align-items: center; gap: 22px; padding: 16px 0 22px; border: 1px solid var(--ui-line-strong); border-radius: var(--ui-radius-md); }
213
+ .query-scope-heading { display: flex; align-items: center; justify-content: space-between; width: 100%; padding-inline: 16px; }
214
+ .query-scope-heading > .code { color: var(--query-ink); }
215
+ .query-container-study { --query-ink: var(--ui-tone-violet); }
216
+ .query-container { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 14px 12px; border: 1px solid var(--ui-line-divider); border-radius: var(--ui-radius-sm); background: var(--ui-surface-sheet); }
217
+ .query-container > .code { color: var(--query-ink); }
218
+ .query-descendant { margin-top: 8px; padding: 8px 12px; border-radius: var(--ui-radius-sm); background: var(--ui-surface-tray); }
@@ -1,4 +1,6 @@
1
1
  ---
2
+ import '@master/internal-site/styles/system/callout.css'
3
+ import '@master/internal-site/styles/system/pagehead.css'
2
4
  import '../../styles/docs-shell/docs.css'
3
5
  import IconAlertTriangle from '@tabler/icons-svelte-runes/icons/alert-triangle'
4
6
  import ChevronLeftSvg from '../../public/images/chevron-left.svg'
@@ -1,4 +1,5 @@
1
1
  ---
2
+ import '@master/internal-site/styles/system/callout.css'
2
3
  import IconAlertTriangle from '@tabler/icons-svelte-runes/icons/alert-triangle'
3
4
  import IconCheck from '@tabler/icons-svelte-runes/icons/check'
4
5
  import IconInfoCircle from '@tabler/icons-svelte-runes/icons/info-circle'
@@ -1,4 +1,6 @@
1
1
  ---
2
+ import '@master/internal-site/styles/interface.css'
3
+ import '@master/internal-site/styles/system/copy.css'
2
4
  import IconCheck from '@tabler/icons-svelte-runes/icons/check'
3
5
  import IconCopy from '@tabler/icons-svelte-runes/icons/copy'
4
6
 
@@ -1,4 +1,6 @@
1
1
  ---
2
+ import '@master/internal-site/styles/system/code-panel.css'
3
+ import '@master/internal-site/styles/system/code-tabs.css'
2
4
  import CodeCopyButton from './CodeCopyButton.astro'
3
5
 
4
6
  type Tab = { name?: string, lang: string, ext?: string }
@@ -1,5 +1,6 @@
1
1
  ---
2
- import '../../styles/docs-shell/code.css'
2
+ import '@master/internal-site/styles/system/code-tabs.css'
3
+ import '../../styles/system/code-panel.css'
3
4
  import { toHtml } from 'hast-util-to-html'
4
5
  import highlightCode from '../utils/highlight-code'
5
6
  import { uniqueId } from '../utils/unique-id'
@@ -1,5 +1,5 @@
1
1
  ---
2
- import '../../styles/docs-shell/code.css'
2
+ import '../../styles/system/code-panel.css'
3
3
 
4
4
  import type { HTMLAttributes } from 'astro/types'
5
5
  import type { CodeProp } from './code-props'
@@ -1,20 +1,18 @@
1
1
  <script lang="ts" module>
2
- import type { DocSidebarProps } from './DocSidebar.svelte'
3
-
4
2
  export interface DocHeaderProps {
5
3
  class?: string
6
4
  /** See `Header`: overlays the page and slides away while reading down. */
7
5
  stickable?: boolean
8
6
  transitionAtTop?: boolean
9
- /** Chapters the compact menu lists. */
10
- documentNavigation?: DocSidebarProps['pageCategories']
11
- documentNavigationTitle?: string
12
7
  /** Accepted for section shells; the header always spans the page. */
13
8
  contained?: boolean
14
9
  }
15
10
  </script>
16
11
 
17
12
  <script lang="ts">
13
+ import '@master/internal-site/styles/interface.css'
14
+ import '@master/internal-site/styles/system/header-core.css'
15
+
18
16
  // `.app-wrapper` sets the homepage sections' column gutters; the homepage loads it through this header.
19
17
  import '../../styles/docs-shell/wrapper.css'
20
18
  import Header from './Header.svelte'
@@ -31,7 +29,7 @@
31
29
  import app from 'virtual:master-site/app'
32
30
  import { getSite } from '../site'
33
31
 
34
- let { class: className, stickable, transitionAtTop, documentNavigation, documentNavigationTitle }: DocHeaderProps = $props()
32
+ let { class: className, stickable, transitionAtTop }: DocHeaderProps = $props()
35
33
  const { t, locale, pathname, i18n } = getSite()
36
34
  const tw = locale === 'tw'
37
35
  const home = pathname === (tw ? '/tw' : '/')
@@ -41,7 +39,7 @@
41
39
  </script>
42
40
 
43
41
  <Header class={className} {stickable} {transitionAtTop}>
44
- <DocMenuButton class="ui-header-menu" {documentNavigation} {documentNavigationTitle} />
42
+ <DocMenuButton class="ui-header-menu ui-header-control" />
45
43
  <Link href="/" class="ui-header-brand" aria-label={`${app.name} ${tw ? '首頁' : 'home'}`} oncontextmenu={(event: MouseEvent) => {
46
44
  event.preventDefault()
47
45
  location.assign(app.brandURL)
@@ -64,19 +62,18 @@
64
62
  </HeaderNav>{/each}
65
63
  </nav>
66
64
  <div class="ui-header-end" data-home-controls={app.header?.searchOnHome ? 'full' : undefined}>
67
- <!-- Search leads the end group as a quiet pill: the glass and its shortcut. Homepages may opt into the same desktop search control. -->
68
- <SearchButton class="ui-header-search" data-compact={home && !app.header?.searchOnHome ? '' : undefined}>
69
- <IconSearch size={16} stroke={1.5} aria-hidden="true" />
65
+ <!-- Desktop keeps the search pill and shortcut; compact headers use a 44px icon target. -->
66
+ <SearchButton class="ui-header-control ui-header-search" data-compact={home && !app.header?.searchOnHome ? '' : undefined}>
67
+ <IconSearch size={18} stroke={1.5} aria-hidden="true" />
70
68
  <kbd class="ui-kbd" aria-hidden="true">⌘K</kbd>
71
69
  </SearchButton>
72
70
  {#each headerCommunityNavs as { Icon, disabled, fullName, ...eachLink } (eachLink.name)}
73
71
  <Link
74
72
  {...eachLink}
75
73
  aria-label={fullName || eachLink.name}
76
- class="ui-button"
74
+ class="ui-button ui-header-control"
77
75
  data-variant="quiet"
78
76
  data-shape="icon"
79
- data-size="sm"
80
77
  data-disabled={disabled || undefined}
81
78
  {disabled}
82
79
  >
@@ -87,7 +84,7 @@
87
84
  {/each}
88
85
  {#if showLanguage}
89
86
  {#if headerCommunityNavs.length}<span class="ui-header-divider" aria-hidden="true"></span>{/if}
90
- <LanguageButton />
87
+ <LanguageButton class="ui-header-control" />
91
88
  {/if}
92
89
  </div>
93
90
  </Header>