@master/internal-site 0.2.7 → 0.2.9

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 (119) hide show
  1. package/dist/astro.mjs +2 -1
  2. package/package.json +2 -2
  3. package/src/benchmarks/BenchmarkBars.astro +2 -1
  4. package/src/benchmarks/BenchmarkChart.astro +1 -1
  5. package/src/benchmarks/BenchmarkChartGroup.astro +2 -1
  6. package/src/benchmarks/BenchmarkDataTable.astro +3 -3
  7. package/src/benchmarks/BenchmarkFigure.astro +1 -1
  8. package/src/benchmarks/BenchmarkMetrics.astro +2 -1
  9. package/src/benchmarks/BenchmarkSampleSummary.astro +2 -1
  10. package/src/benchmarks/BenchmarkStackedBars.astro +2 -1
  11. package/src/demo/Demo.svelte +2 -2
  12. package/src/demo/DemoAsset.astro +1 -1
  13. package/src/demo/DemoCatalog.astro +3 -3
  14. package/src/demo/DemoComparison.svelte +2 -2
  15. package/src/demo/DemoContainer.svelte +1 -1
  16. package/src/demo/DemoCopyButton.svelte +2 -2
  17. package/src/demo/DemoFeatureSupport.svelte +2 -2
  18. package/src/demo/DemoGeneratedCSS.svelte +2 -2
  19. package/src/demo/DemoIndex.astro +1 -1
  20. package/src/demo/DemoMotion.svelte +1 -1
  21. package/src/demo/DemoViewport.svelte +5 -5
  22. package/src/demo/DemoWaterfall.astro +2 -1
  23. package/src/demo/foundations/FoundationDialog.astro +1 -1
  24. package/src/docs-shell/components/ArticleHeader.astro +2 -2
  25. package/src/docs-shell/components/Callout.astro +5 -4
  26. package/src/docs-shell/components/CodeCopyButton.astro +3 -3
  27. package/src/docs-shell/components/CodeTabBar.astro +7 -6
  28. package/src/docs-shell/components/CodeTabs.astro +4 -4
  29. package/src/docs-shell/components/CodeView.astro +2 -2
  30. package/src/docs-shell/components/DocHeader.svelte +5 -4
  31. package/src/docs-shell/components/DocMenuButton.svelte +4 -2
  32. package/src/docs-shell/components/DocumentAPIIndex.astro +4 -4
  33. package/src/docs-shell/components/DocumentChoices.astro +4 -4
  34. package/src/docs-shell/components/DocumentCodeExampleView.astro +5 -5
  35. package/src/docs-shell/components/DocumentCopyButton.svelte +2 -2
  36. package/src/docs-shell/components/DocumentDisclosure.astro +3 -3
  37. package/src/docs-shell/components/DocumentFileTree.astro +2 -1
  38. package/src/docs-shell/components/DocumentFlow.astro +2 -2
  39. package/src/docs-shell/components/DocumentIllustration.astro +4 -4
  40. package/src/docs-shell/components/DocumentKeyList.astro +3 -3
  41. package/src/docs-shell/components/DocumentOptionList.astro +2 -2
  42. package/src/docs-shell/components/DocumentParameters.astro +2 -2
  43. package/src/docs-shell/components/DocumentPrompt.astro +3 -3
  44. package/src/docs-shell/components/DocumentValueList.astro +3 -3
  45. package/src/docs-shell/components/DocumentationIndex.svelte +3 -3
  46. package/src/docs-shell/components/ExpandContent.svelte +2 -2
  47. package/src/docs-shell/components/ExplorerView.astro +3 -2
  48. package/src/docs-shell/components/GeneratedCSS.astro +3 -3
  49. package/src/docs-shell/components/InlineCode.astro +4 -3
  50. package/src/docs-shell/components/LanguageButton.svelte +1 -1
  51. package/src/docs-shell/components/NotFound.astro +1 -1
  52. package/src/docs-shell/components/PMAction.astro +1 -1
  53. package/src/docs-shell/components/PageContentDisclosure.astro +3 -3
  54. package/src/docs-shell/components/SearchButton.svelte +9 -7
  55. package/src/docs-shell/components/SearchDialogPanel.svelte +15 -14
  56. package/src/docs-shell/components/Tab.astro +2 -2
  57. package/src/docs-shell/components/Tabs.astro +2 -2
  58. package/src/docs-shell/remark/markdown-components.js +1 -1
  59. package/src/docs-shell/utils/documentation-search.ts +11 -1
  60. package/src/docs-shell/utils/highlight-code-core.ts +2 -2
  61. package/src/examples/components/ArticleTransitionScene.svelte +3 -3
  62. package/src/styles/blog-article.css +3 -1
  63. package/src/styles/demo.css +0 -3
  64. package/src/styles/docs-shell/documentation-search.css +4 -11
  65. package/src/styles/docs-shell/footer.css +2 -2
  66. package/src/styles/docs-shell/menu.css +1 -1
  67. package/src/styles/docs-shell/prose.css +0 -1
  68. package/src/styles/documentation-illustration.css +3 -3
  69. package/src/styles/documentation-index.css +0 -2
  70. package/src/styles/interface.css +0 -1
  71. package/src/styles/interface.ts +2 -1
  72. package/src/styles/site-contract.md +3 -3
  73. package/src/styles/system/browser.css +0 -1
  74. package/src/styles/system/buttons.ts +2 -0
  75. package/src/styles/system/callout.css +4 -12
  76. package/src/styles/system/callout.ts +4 -0
  77. package/src/styles/system/chart.css +1 -1
  78. package/src/styles/system/code-panel.css +23 -65
  79. package/src/styles/system/code-panel.ts +2 -0
  80. package/src/styles/system/code-tabs.css +4 -32
  81. package/src/styles/system/code-tabs.ts +2 -0
  82. package/src/styles/system/code-ui.ts +2 -0
  83. package/src/styles/system/copy.css +2 -24
  84. package/src/styles/system/dialog.css +10 -11
  85. package/src/styles/system/disclosure.css +3 -13
  86. package/src/styles/system/disclosure.ts +2 -0
  87. package/src/styles/system/header-core.css +8 -17
  88. package/src/styles/system/index.css +3 -7
  89. package/src/styles/system/index.ts +3 -0
  90. package/src/styles/system/inline-code.css +2 -2
  91. package/src/styles/system/inline-code.ts +2 -0
  92. package/src/styles/system/logos.css +1 -1
  93. package/src/styles/system/metrics.css +1 -1
  94. package/src/styles/system/parameters.css +2 -3
  95. package/src/styles/system/parameters.ts +4 -0
  96. package/src/styles/system/prompt.css +3 -5
  97. package/src/styles/system/reading.css +2 -4
  98. package/src/styles/system/search-trigger.css +2 -7
  99. package/src/styles/system/segmented.css +0 -6
  100. package/src/styles/system/sidebar.css +1 -1
  101. package/src/styles/system/stage.css +6 -12
  102. package/src/styles/system/stage.ts +2 -0
  103. package/src/styles/system/steps.css +1 -2
  104. package/src/styles/system/tabs.ts +1 -0
  105. package/src/styles/system/toc.css +3 -3
  106. package/src/styles/system/tray-code.css +2 -4
  107. package/src/styles/system/tray-layout.css +5 -5
  108. package/src/styles/system/tree.css +1 -1
  109. package/src/styles/system/waterfall.css +1 -1
  110. package/src/styles/docs-shell/code.css +0 -5
  111. package/src/styles/system/buttons.css +0 -1
  112. package/src/styles/system/code.css +0 -8
  113. package/src/styles/system/controls.css +0 -10
  114. package/src/styles/system/data.css +0 -10
  115. package/src/styles/system/sheet.css +0 -1
  116. package/src/styles/system/shell.css +0 -8
  117. package/src/styles/system/surfaces.css +0 -7
  118. package/src/styles/system/table.css +0 -3
  119. package/src/styles/system/tray.css +0 -2
package/dist/astro.mjs CHANGED
@@ -2370,7 +2370,8 @@ function remarkMarkdownComponents() {
2370
2370
  const lang = rest.length && inlineLanguages.has(first) ? first : "";
2371
2371
  parent.children[index] = element("mdxJsxTextElement", "InlineCode", {
2372
2372
  lang,
2373
- code: lang ? rest.join(" ") : node.value
2373
+ code: lang ? rest.join(" ") : node.value,
2374
+ ...parent.type === "heading" ? { plain: true } : {}
2374
2375
  });
2375
2376
  return SKIP;
2376
2377
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@master/internal-site",
3
- "version": "0.2.7",
3
+ "version": "0.2.9",
4
4
  "type": "module",
5
5
  "description": "First-party Astro and Svelte website framework for Master sites.",
6
6
  "engines": {
@@ -316,7 +316,7 @@
316
316
  "@master/css-schema": "0.0.0 || >=0.0.0-site.1793646900.gdf48b35846c1 <0.0.1 || ^2.1.0",
317
317
  "@master/css-preset": "0.0.0 || >=0.0.0-site.1793646900.gdf48b35846c1 <0.0.1 || ^2.1.0",
318
318
  "@master/css-language-service": "0.0.0 || >=0.0.0-site.1793646900.gdf48b35846c1 <0.0.1 || ^2.1.0",
319
- "@master/ui": "^0.0.2"
319
+ "@master/ui": "^0.0.3"
320
320
  },
321
321
  "dependencies": {
322
322
  "@astrojs/svelte": "^9.1.2",
@@ -1,4 +1,5 @@
1
1
  ---
2
+ import '@master/internal-site/styles/system/sheet.ts'
2
3
  import '@master/internal-site/styles/system/chart.css'
3
4
  import '@master/internal-site/styles/benchmarks.css'
4
5
  import BenchmarkBarRows from '@master/internal-site/benchmarks/BenchmarkBarRows.astro'
@@ -11,4 +12,4 @@ interface Props extends BenchmarkBarsProps {
11
12
  const { class: className, ...props } = Astro.props
12
13
  ---
13
14
 
14
- <div class={className ? `ui-chart ${className}` : 'ui-chart'}><BenchmarkBarRows {...props} /></div>
15
+ <div class={className ? `sheet sheet-raised ui-chart ${className}` : 'sheet sheet-raised ui-chart'}><BenchmarkBarRows {...props} /></div>
@@ -46,7 +46,7 @@ const chart = localizeBenchmarkChart(Astro.props.chart, t)
46
46
  <tbody>
47
47
  {chart.rows.map(([rowHeader, ...cells]) => (
48
48
  <tr class="table-row">
49
- <th class="table-heading">{rowHeader}</th>
49
+ <th class="table-cell table-primary" scope="row">{rowHeader}</th>
50
50
  {cells.map((cell) => <td class="table-cell">{cell}</td>)}
51
51
  </tr>
52
52
  ))}
@@ -1,4 +1,5 @@
1
1
  ---
2
+ import '@master/internal-site/styles/system/sheet.ts'
2
3
  import '@master/internal-site/styles/system/chart.css'
3
4
  import { siteOf } from '@master/internal-site/astro/site-context'
4
5
  import BenchmarkBarRows from '@master/internal-site/benchmarks/BenchmarkBarRows.astro'
@@ -16,7 +17,7 @@ const { title, detail = 'Median', items, unit = 'ms' } = Astro.props
16
17
  const { t } = siteOf(Astro)
17
18
  ---
18
19
 
19
- <div class="ui-chart">
20
+ <div class="sheet sheet-raised ui-chart">
20
21
  <div class="ui-chart-head">
21
22
  <div><b>{t(title)}</b><small>{t(detail)} · {unit}</small></div>
22
23
  </div>
@@ -1,5 +1,5 @@
1
1
  ---
2
- import '@master/internal-site/styles/system/disclosure.css'
2
+ import '@master/internal-site/styles/system/disclosure.ts'
3
3
  import '@master/internal-site/styles/benchmarks.css'
4
4
  import { siteOf } from '@master/internal-site/astro/site-context'
5
5
  import BenchmarkScrollRegion from '@master/internal-site/benchmarks/BenchmarkScrollRegion.svelte'
@@ -13,8 +13,8 @@ const { title } = Astro.props
13
13
  const { t } = siteOf(Astro)
14
14
  ---
15
15
 
16
- <details class="ui-disclosure" data-variant="rule">
17
- <summary>
16
+ <details class="accordion-item ui-disclosure" data-variant="rule">
17
+ <summary class="accordion-trigger">
18
18
  {t(title)}
19
19
  <span class="ui-disclosure-meta">{t('Complete measurements')}</span>
20
20
  </summary>
@@ -17,7 +17,7 @@ const { t } = siteOf(Astro)
17
17
  const text = (node: unknown) => typeof node === 'string' ? t(node) : node
18
18
  ---
19
19
 
20
- <figure class={className ? `ui-tray ${className}` : 'ui-tray'}>
20
+ <figure class={className ? `tray ui-tray ${className}` : 'tray ui-tray'}>
21
21
  {(title || description) && (
22
22
  <div class="ui-tray-head">
23
23
  <div>
@@ -1,4 +1,5 @@
1
1
  ---
2
+ import '@master/internal-site/styles/system/sheet.ts'
2
3
  import '@master/internal-site/styles/system/metrics.css'
3
4
  import { siteOf } from '@master/internal-site/astro/site-context'
4
5
  import BenchmarkStatus from '@master/internal-site/benchmarks/BenchmarkStatus.astro'
@@ -14,7 +15,7 @@ const { t } = siteOf(Astro)
14
15
 
15
16
  <div class="ui-metrics">
16
17
  {metrics.map((metric) => (
17
- <div class="ui-metric">
18
+ <div class="sheet sheet-raised ui-metric">
18
19
  <small>{t(metric.label)}</small>
19
20
  <b>{metric.value}</b>
20
21
  {(metric.detail || (metric.tone && metric.tone !== 'neutral')) && <p><BenchmarkStatus tone={metric.tone} /> {metric.detail && t(metric.detail)}</p>}
@@ -1,4 +1,5 @@
1
1
  ---
2
+ import '@master/internal-site/styles/system/sheet.ts'
2
3
  import '@master/internal-site/styles/system/metrics.css'
3
4
  import { siteOf } from '@master/internal-site/astro/site-context'
4
5
  import type { BenchmarkSampleSummaryStats } from '@master/internal-site/benchmarks/types.ts'
@@ -22,7 +23,7 @@ const entries = [
22
23
 
23
24
  <div class="ui-metrics">
24
25
  {entries.map(([label, value]) => (
25
- <div class="ui-metric">
26
+ <div class="sheet sheet-raised ui-metric">
26
27
  <small>{t(label)}</small>
27
28
  <b>{value}</b>
28
29
  </div>
@@ -1,4 +1,5 @@
1
1
  ---
2
+ import '@master/internal-site/styles/system/sheet.ts'
2
3
  import '@master/internal-site/styles/system/chart.css'
3
4
  import '@master/internal-site/styles/system/metrics.css'
4
5
  import '@master/internal-site/styles/system/specimens.css'
@@ -18,7 +19,7 @@ const { t } = siteOf(Astro)
18
19
  const labelPrefix = uniqueId(Astro, 'benchmark-stacked-bars')
19
20
  ---
20
21
 
21
- <div class={className ? `ui-chart ${className}` : 'ui-chart'}>
22
+ <div class={className ? `sheet sheet-raised ui-chart ${className}` : 'sheet sheet-raised ui-chart'}>
22
23
  {items.map((item, index) => {
23
24
  const labelId = `${labelPrefix}-label-${index}`
24
25
  const valueId = `${labelPrefix}-value-${index}`
@@ -30,7 +30,7 @@
30
30
  </script>
31
31
 
32
32
  <script lang="ts">
33
- import '@master/internal-site/styles/system/stage.css'
33
+ import '@master/internal-site/styles/system/stage.ts'
34
34
  import '@master/internal-site/styles/system/tray.ts'
35
35
  import '@master/internal-site/styles/system/tray-code.css'
36
36
 
@@ -55,7 +55,7 @@
55
55
  {#if description}<p class="ui-tray-description">{@render node(description, true)}</p>{/if}
56
56
  </div>{/if}
57
57
  {#if controls}<div class="ui-tray-tools">{@render node(controls)}</div>{/if}
58
- </figcaption>{/if}{#if frame === 'none'}{@render children?.()}{:else}<div class={['ui-stage', className]} style={styleText(style)}
58
+ </figcaption>{/if}{#if frame === 'none'}{@render children?.()}{:else}<div class={['sheet sheet-flat ui-stage', className]} style={styleText(style)}
59
59
  data-background={background === 'plain' ? undefined : background}
60
60
  data-padding={padding === 'lg' ? undefined : padding}
61
61
  data-align={align === 'center' ? undefined : align}>{@render children?.()}</div>{/if}{#if source}{@render node(source)}{/if}{#if caption}{#if head}<div class="ui-tray-caption">{@render node(caption, true)}</div>{:else}<figcaption class="ui-tray-caption">{@render node(caption, true)}</figcaption>{/if}{/if}</figure>
@@ -1,5 +1,5 @@
1
1
  ---
2
- import '@master/internal-site/styles/interface.css'
2
+ import '@master/internal-site/styles/interface.ts'
3
3
  import '@master/ui/components/badge.css'
4
4
  import IconDownload from '@tabler/icons-svelte-runes/icons/download'
5
5
  import Demo from './Demo.svelte'
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  import { siteOf } from '@master/internal-site/astro/site-context.ts'
3
3
  const { t } = siteOf(Astro)
4
- import '@master/internal-site/styles/system/disclosure.css'
4
+ import '@master/internal-site/styles/system/disclosure.ts'
5
5
  import '@master/internal-site/styles/demo.css'
6
6
  import RenderNode from '@master/internal-site/components/RenderNode.astro'
7
7
  import DemoIndex from '@master/internal-site/demo/DemoIndex.astro'
@@ -28,8 +28,8 @@ const { groups } = Astro.props
28
28
  }]} />
29
29
  {groups.map(group => <section aria-labelledby={group.id}>
30
30
  <h3 id={group.id}>{t(group.title)}<small>{t('{count} recipes').replace('{count}', String(group.entries.length))}</small></h3>
31
- {group.entries.map(entry => <details class="ui-disclosure" data-variant="rule">
32
- <summary>{t(entry.title)}<span class="ui-disclosure-meta">{t(entry.label)}</span></summary>
31
+ {group.entries.map(entry => <details class="accordion-item ui-disclosure" data-variant="rule">
32
+ <summary class="accordion-trigger">{t(entry.title)}<span class="ui-disclosure-meta">{t(entry.label)}</span></summary>
33
33
  <div class="ui-catalog-entry">
34
34
  {entry.href && <a href={entry.href}>{t('Read related documentation')} ↗</a>}
35
35
  <RenderNode node={entry.children} />
@@ -11,7 +11,7 @@
11
11
 
12
12
  <script lang="ts">
13
13
  import '@master/internal-site/styles/system/compare.css'
14
- import '@master/internal-site/styles/system/stage.css'
14
+ import '@master/internal-site/styles/system/stage.ts'
15
15
 
16
16
  import '@master/internal-site/styles/system/specimens.css'
17
17
  import type { HTMLAttributes } from 'svelte/elements'
@@ -34,6 +34,6 @@
34
34
  <div {...attributes} class={['ui-compare', className]} style={styleText(style)}>
35
35
  {#each items as item, index (item.key ?? index)}<figure>
36
36
  <figcaption>{@render node(item.label)}</figcaption>
37
- <div class="ui-stage">{@render node(content(item))}</div>
37
+ <div class="sheet sheet-flat ui-stage">{@render node(content(item))}</div>
38
38
  </figure>{/each}
39
39
  </div>
@@ -1,7 +1,7 @@
1
1
  <script lang="ts">
2
2
  import { getSite } from '@master/internal-site/site'
3
3
  const { t } = getSite()
4
- import '@master/internal-site/styles/interface.css'
4
+ import '@master/internal-site/styles/interface.ts'
5
5
  import '@master/internal-site/styles/system/range.css'
6
6
 
7
7
  import '@master/internal-site/styles/system/specimens.css'
@@ -1,7 +1,7 @@
1
1
  <script lang="ts">
2
2
  import { getSite } from '@master/internal-site/site'
3
3
  const { t } = getSite()
4
- import '@master/internal-site/styles/interface.css'
4
+ import '@master/internal-site/styles/interface.ts'
5
5
  import '@master/internal-site/styles/system/copy.css'
6
6
 
7
7
  import type { Snippet } from 'svelte'
@@ -43,7 +43,7 @@
43
43
 
44
44
  {#snippet button()}
45
45
  <button data-size={className ? undefined : 'sm'} {...props} type="button" aria-label={t(label)} class={className ?? 'btn btn-sm'} style={styleText(style)} aria-busy={busy} onclick={copy}>
46
- {#if icon === undefined}<IconCopy aria-hidden="true" />{:else if icon}{@render icon()}{/if}{@render children?.()}
46
+ {#if icon === undefined}<IconCopy class="icon" aria-hidden="true" />{:else if icon}{@render icon()}{/if}{@render children?.()}
47
47
  </button>
48
48
  {/snippet}
49
49
 
@@ -1,5 +1,5 @@
1
1
  <script lang="ts">
2
- import '@master/internal-site/styles/system/inline-code.css'
2
+ import '@master/internal-site/styles/system/inline-code.ts'
3
3
 
4
4
  import '@master/ui/components/badge.css'
5
5
  import { getSite } from '@master/internal-site/site'
@@ -15,7 +15,7 @@
15
15
  </script>
16
16
 
17
17
  <p class="flex flex-wrap items-center gap-xs m(0)" data-supported={supported ?? 'unknown'}>
18
- <code class="ui-inline-code">{condition}</code>
18
+ <code class="code ui-inline-code">{condition}</code>
19
19
  <span hidden={supported !== true}><span class="badge badge-dot badge-success">{t('Supported')}</span></span>
20
20
  <span hidden={supported === true}><span class="badge badge-dot">{supported === null ? t('Checking…') : t('Not supported')}</span></span>
21
21
  </p>
@@ -1,5 +1,5 @@
1
1
  <script lang="ts">
2
- import '@master/internal-site/styles/system/disclosure.css'
2
+ import '@master/internal-site/styles/system/disclosure.ts'
3
3
 
4
4
  import type { Snippet } from 'svelte'
5
5
  import { getSite } from '@master/internal-site/site'
@@ -9,4 +9,4 @@
9
9
  const { t } = getSite()
10
10
  </script>
11
11
 
12
- <details class="ui-disclosure"><summary>{t('Generated CSS')}</summary>{@render children?.()}</details>
12
+ <details class="accordion-item ui-disclosure"><summary class="accordion-trigger">{t('Generated CSS')}</summary>{@render children?.()}</details>
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  import { siteOf } from '@master/internal-site/astro/site-context.ts'
3
3
  const { t } = siteOf(Astro)
4
- import '@master/internal-site/styles/interface.css'
4
+ import '@master/internal-site/styles/interface.ts'
5
5
  import '@master/internal-site/styles/system/specimens.css'
6
6
 
7
7
  export interface DemoIndexGroup {
@@ -1,7 +1,7 @@
1
1
  <script lang="ts">
2
2
  import { getSite } from '@master/internal-site/site'
3
3
  const { t } = getSite()
4
- import '@master/internal-site/styles/interface.css'
4
+ import '@master/internal-site/styles/interface.ts'
5
5
  import type { Snippet } from 'svelte'
6
6
  import { onMount } from 'svelte'
7
7
  import IconPlayerPause from '@tabler/icons-svelte-runes/icons/player-pause'
@@ -30,7 +30,7 @@
30
30
  <script lang="ts">
31
31
  import { getSite } from '@master/internal-site/site'
32
32
  const { t } = getSite()
33
- import '@master/internal-site/styles/interface.css'
33
+ import '@master/internal-site/styles/interface.ts'
34
34
  import '@master/internal-site/styles/system/browser.css'
35
35
  import '@master/internal-site/styles/system/range.css'
36
36
  import '@master/internal-site/styles/system/segmented.css'
@@ -317,15 +317,15 @@
317
317
  <button type="button" disabled={!ready} class="btn btn-sm" data-size="sm" onclick={() => { width = undefined }}>{t('Fit')}</button>
318
318
  {/if}
319
319
  {#if theme}<button type="button" disabled={!ready} class="btn btn-sm" data-size="sm" aria-pressed={isDark} title={t('Toggle dark theme')} onclick={() => { dark = !isDark }}>
320
- {#if isDark}<IconMoon aria-hidden="true" />{:else}<IconSun aria-hidden="true" />{/if}{t('Theme')}
320
+ {#if isDark}<IconMoon class="icon" aria-hidden="true" />{:else}<IconSun class="icon" aria-hidden="true" />{/if}{t('Theme')}
321
321
  </button>{/if}
322
322
  {#if motion}
323
323
  <button type="button" disabled={!ready} class="btn btn-sm" data-size="sm" onclick={() => animate(playing ? 'pause' : 'play')}>
324
- {#if playing}<IconPlayerPause aria-hidden="true" />{:else}<IconPlayerPlay aria-hidden="true" />{/if}{playing ? t('Pause') : t('Play')}
324
+ {#if playing}<IconPlayerPause class="icon" aria-hidden="true" />{:else}<IconPlayerPlay class="icon" aria-hidden="true" />{/if}{playing ? t('Pause') : t('Play')}
325
325
  </button>
326
- <button type="button" disabled={!ready} class="btn btn-sm btn-quiet" data-size="sm" data-variant="quiet" onclick={() => animate('restart')}><IconRefresh aria-hidden="true" />{t('Replay')}</button>
326
+ <button type="button" disabled={!ready} class="btn btn-sm btn-quiet" data-size="sm" data-variant="quiet" onclick={() => animate('restart')}><IconRefresh class="icon" aria-hidden="true" />{t('Replay')}</button>
327
327
  {/if}
328
- {#if print}<button type="button" disabled={!ready} class="btn btn-sm" data-size="sm" onclick={() => frame?.contentWindow?.print()}><IconPrinter aria-hidden="true" />{t('Print preview')}</button>{/if}
328
+ {#if print}<button type="button" disabled={!ready} class="btn btn-sm" data-size="sm" onclick={() => frame?.contentWindow?.print()}><IconPrinter class="icon" aria-hidden="true" />{t('Print preview')}</button>{/if}
329
329
  {#if properties}<output aria-live="polite">{properties}</output>{/if}
330
330
  </div>
331
331
  {/if}
@@ -1,4 +1,5 @@
1
1
  ---
2
+ import '@master/internal-site/styles/system/sheet.ts'
2
3
  import { siteOf } from '@master/internal-site/astro/site-context'
3
4
  const { t } = siteOf(Astro)
4
5
  import '@master/internal-site/styles/system/waterfall.css'
@@ -16,7 +17,7 @@ for (const { label, start, end } of rows) {
16
17
  ---
17
18
 
18
19
  <Demo title={title} description={description} caption={caption} padding="sm" aria-label={title}>
19
- <div class="w-full ui-waterfall">
20
+ <div class="sheet sheet-raised w-full ui-waterfall">
20
21
  <div class="ui-waterfall-axis" aria-hidden="true"><span /><div class="relative"><span>{t("Earlier")}</span>{marker && <span class="absolute font-medium fg-text-strong (translate:-50%)" style={{ left: `${marker.position}%` }}>{marker.label}</span>}<span>{t("Later")}</span></div></div>
21
22
  {/* Preserve WebKit list semantics without list markers. */}
22
23
  <ul role="list" class="grid gap-2xs m(0) p(0) (list-style:none)">
@@ -1,5 +1,5 @@
1
1
  ---
2
- import '@master/internal-site/styles/interface.css'
2
+ import '@master/internal-site/styles/interface.ts'
3
3
  import FoundationSpecimen from '@master/internal-site/demo/foundations/FoundationSpecimen.astro'
4
4
  import { dialogCopy } from './dialog-copy.js'
5
5
  interface Props { title?: string; caption?: string }
@@ -1,5 +1,5 @@
1
1
  ---
2
- import '@master/internal-site/styles/system/callout.css'
2
+ import '@master/internal-site/styles/system/callout.ts'
3
3
  import '@master/internal-site/styles/system/pagehead.css'
4
4
  import '../../styles/docs-shell/docs.css'
5
5
  import IconAlertTriangle from '@tabler/icons-svelte-runes/icons/alert-triangle'
@@ -62,6 +62,6 @@ const kickers = [
62
62
  {subtitle && <p lang={languageOf(subtitle)}>{$(subtitle)}</p>}
63
63
  {metadata.package && <PackageBadges {...metadata.package} translate={$} />}
64
64
  {(metadata.unfinished || metadata.disabled) &&
65
- <div class="ui-callout" data-tone="warning" role="note"><IconAlertTriangle aria-hidden="true" /><div>{$('This page is still under construction and some content may not be complete.')}</div></div>}
65
+ <div class="alert alert-warning ui-callout" data-tone="warning" role="note"><IconAlertTriangle class="icon alert-icon" aria-hidden="true" /><div class="alert-body">{$('This page is still under construction and some content may not be complete.')}</div></div>}
66
66
  </div>
67
67
  {!!toc?.length && <PageContentDisclosure items={toc.map((item: any) => ({ ...item, title: $(item.title), lang: languageOf(item.title) }))} label={$('On this page')} />}
@@ -1,5 +1,5 @@
1
1
  ---
2
- import '@master/internal-site/styles/system/callout.css'
2
+ import '@master/internal-site/styles/system/callout.ts'
3
3
  import IconAlertTriangle from '@tabler/icons-svelte-runes/icons/alert-triangle'
4
4
  import IconCheck from '@tabler/icons-svelte-runes/icons/check'
5
5
  import IconInfoCircle from '@tabler/icons-svelte-runes/icons/info-circle'
@@ -19,9 +19,10 @@ interface Props {
19
19
  /** A `ui-callout`: one icon and one status tint around a short note. Markdown writes it as `(i)`, `(!)`, `(o)` or `(x)`. */
20
20
  const { tone } = Astro.props
21
21
  const Icon = icons[tone]
22
+ const status = { info: 'info', warning: 'warning', do: 'success', dont: 'danger' }[tone]
22
23
  ---
23
24
 
24
- <div class="ui-callout" data-tone={tone} role="note">
25
- <Icon aria-hidden="true" stroke={1.5} />
26
- <div><p><slot /></p></div>
25
+ <div class:list={['alert', `alert-${status}`, 'ui-callout']} data-tone={tone} role="note">
26
+ <Icon class="icon alert-icon" aria-hidden="true" stroke={1.5} />
27
+ <div class="alert-body"><p><slot /></p></div>
27
28
  </div>
@@ -1,5 +1,5 @@
1
1
  ---
2
- import '@master/internal-site/styles/interface.css'
2
+ import '@master/internal-site/styles/interface.ts'
3
3
  import '@master/internal-site/styles/system/copy.css'
4
4
  import IconCheck from '@tabler/icons-svelte-runes/icons/check'
5
5
  import IconCopy from '@tabler/icons-svelte-runes/icons/copy'
@@ -23,7 +23,7 @@ const label = name ? t('Copy {name}').replace('{name}', t(name)) : t('Copy code'
23
23
  <span class:list={['ui-copy', className]}>
24
24
  <span class="ui-copy-status" role="status"></span>
25
25
  <button type="button" class="btn btn-sm btn-quiet btn-square" data-variant="quiet" data-shape="icon" data-size="sm" aria-label={label} title={label} data-code-copy={name ?? ''} data-code-copy-text={text}>
26
- <IconCopy size={16} stroke={1.5} aria-hidden="true" />
27
- <IconCheck size={16} stroke={1.6} aria-hidden="true" class="ui-result-icon" />
26
+ <IconCopy class="icon" size={16} stroke={1.5} aria-hidden="true" />
27
+ <IconCheck size={16} stroke={1.6} aria-hidden="true" class="icon ui-result-icon" />
28
28
  </button>
29
29
  </span>
@@ -1,6 +1,5 @@
1
1
  ---
2
- import '@master/internal-site/styles/system/code-panel.css'
3
- import '@master/internal-site/styles/system/code-tabs.css'
2
+ import '@master/internal-site/styles/system/code-panel.ts'
4
3
  import CodeCopyButton from './CodeCopyButton.astro'
5
4
  import { siteOf } from '../../astro/site-context'
6
5
 
@@ -17,18 +16,20 @@ interface Props {
17
16
  idPrefix?: string
18
17
  }
19
18
 
20
- /** The `ui-code-bar`: the file's name, or `ui-tabs` that switch panels, and the copy action. */
19
+ /** CodeTabs owns the tab stylesheet; a file-only CodeView does not load tabs.
20
+ * The `ui-code-bar`: the file's name, or `ui-tabs` that switch panels, and the copy action. */
21
21
  const { tabs, currentName, class: className, copyable = true, idPrefix } = Astro.props
22
22
  const { t } = siteOf(Astro)
23
23
  ---
24
24
 
25
- <div class={className ? `ui-code-bar ${className}` : 'ui-code-bar'}>
25
+ <div class={className ? `code-header ui-code-bar ${className}` : 'code-header ui-code-bar'}>
26
26
  {idPrefix
27
- ? <div class="ui-tabs" role="tablist" aria-label={t('Code examples')}>
27
+ ? <div class="tabs tabs-sm ui-tabs" role="tablist" aria-label={t('Code examples')}>
28
28
  {tabs.map(({ name, lang }, index) => {
29
29
  const tabName = name ?? lang
30
30
  const active = currentName === tabName
31
31
  return <button
32
+ class="tabs-item"
32
33
  type="button"
33
34
  role="tab"
34
35
  id={`${idPrefix}-tab-${index}`}
@@ -39,6 +40,6 @@ const { t } = siteOf(Astro)
39
40
  >{t(tabName)}</button>
40
41
  })}
41
42
  </div>
42
- : <span class="ui-code-file">{t(tabs[0]?.name)}</span>}
43
+ : <span class="code-title ui-code-file">{t(tabs[0]?.name)}</span>}
43
44
  {copyable && <CodeCopyButton name={currentName} />}
44
45
  </div>
@@ -1,6 +1,6 @@
1
1
  ---
2
- import '@master/internal-site/styles/system/code-tabs.css'
3
- import '../../styles/system/code-panel.css'
2
+ import '@master/internal-site/styles/system/code-tabs.ts'
3
+ import '../../styles/system/code-panel.ts'
4
4
  import { toHtml } from 'hast-util-to-html'
5
5
  import highlightCode from '../utils/highlight-code'
6
6
  import { uniqueId } from '../utils/unique-id'
@@ -30,7 +30,7 @@ const current = panels[0]
30
30
  ---
31
31
 
32
32
  <div
33
- class:list={['ui-code', className]}
33
+ class:list={['code-panel ui-code', panels.some(tab => tab.number) && 'code-numbered', className]}
34
34
  data-code-tabs=""
35
35
  data-code-tabs-current-name={current.name}
36
36
  data-code-tabs-storage-key={localStorageKey}
@@ -47,7 +47,7 @@ const current = panels[0]
47
47
  hidden={index !== 0}
48
48
  >
49
49
  {/* Paper and pages without scripts show every panel under its name. */}
50
- <span class="ui-code-file" aria-hidden="true">{tab.name}</span>
50
+ <span class="code-title ui-code-file" aria-hidden="true">{tab.name}</span>
51
51
  <Fragment set:html={tab.html} />
52
52
  </div>
53
53
  ))}
@@ -1,5 +1,5 @@
1
1
  ---
2
- import '../../styles/system/code-panel.css'
2
+ import '../../styles/system/code-panel.ts'
3
3
 
4
4
  import type { HTMLAttributes } from 'astro/types'
5
5
  import type { CodeProp } from './code-props'
@@ -16,7 +16,7 @@ type Props = CodeProp & Omit<HTMLAttributes<'div'>, 'class'>
16
16
  const { lang, class: className, name, tabbarClassName, copyable = true, number, ext } = Astro.props
17
17
  ---
18
18
 
19
- <div class:list={['ui-code', className]} data-lang={lang} data-numbers={number ? '' : undefined}>
19
+ <div class:list={['code-panel ui-code', number && 'code-numbered', className]} data-lang={lang} data-numbers={number ? '' : undefined}>
20
20
  {name && <CodeTabBar tabs={[{ name, lang, ext }]} currentName={name} class={tabbarClassName} copyable={copyable} />}
21
21
  {!name && copyable && <CodeCopyButton />}
22
22
  <slot />
@@ -10,8 +10,9 @@
10
10
  </script>
11
11
 
12
12
  <script lang="ts">
13
- import '@master/internal-site/styles/interface.css'
13
+ import '@master/internal-site/styles/interface.ts'
14
14
  import '@master/internal-site/styles/system/header-core.css'
15
+ import '@master/ui/components/badge.css'
15
16
 
16
17
  // `.app-wrapper` sets the homepage sections' column gutters; the homepage loads it through this header.
17
18
  import '../../styles/docs-shell/wrapper.css'
@@ -57,13 +58,13 @@
57
58
  <nav class="ui-header-nav" aria-label={t('Main navigation')}>
58
59
  {#each app.navs as { Icon: _Icon, fullName: _fullName, ...eachLink } (eachLink.name)}<HeaderNav {...eachLink}>
59
60
  {t(eachLink.name)}
60
- {#if eachLink.date && isDateWithinSevenDays(eachLink.date)}<small>{t('New')}</small>{/if}
61
+ {#if eachLink.date && isDateWithinSevenDays(eachLink.date)}<small class="badge">{t('New')}</small>{/if}
61
62
  </HeaderNav>{/each}
62
63
  </nav>
63
64
  <div class="ui-header-end" data-home-controls={app.header?.searchOnHome ? 'full' : undefined}>
64
65
  <!-- Desktop keeps the search pill and shortcut; compact headers use a 44px icon target. -->
65
- <SearchButton class="ui-header-control ui-header-search" data-compact={home && !app.header?.searchOnHome ? '' : undefined}>
66
- <IconSearch size={18} stroke={1.5} aria-hidden="true" />
66
+ <SearchButton class="btn btn-quiet ui-header-control ui-header-search" data-compact={home && !app.header?.searchOnHome ? '' : undefined}>
67
+ <IconSearch class="icon" size={18} stroke={1.5} aria-hidden="true" />
67
68
  <kbd class="kbd" aria-hidden="true">⌘K</kbd>
68
69
  </SearchButton>
69
70
  {#each headerCommunityNavs as { Icon, disabled, fullName, ...eachLink } (eachLink.name)}
@@ -9,7 +9,7 @@
9
9
  </script>
10
10
 
11
11
  <script lang="ts">
12
- import '@master/internal-site/styles/interface.css'
12
+ import '@master/internal-site/styles/interface.ts'
13
13
  import '@master/internal-site/styles/system/header-core.css'
14
14
 
15
15
  import '../../styles/docs-shell/menu.css'
@@ -32,6 +32,7 @@
32
32
  /** Primary destinations, with community and preferences kept in a quiet footer. */
33
33
  let { class: className }: Props = $props()
34
34
  let opened = $state(false)
35
+ let mounted = $state(false)
35
36
  const id = $props.id()
36
37
  let dialog: HTMLDialogElement
37
38
  let trigger: HTMLButtonElement
@@ -96,6 +97,7 @@
96
97
  }
97
98
 
98
99
  onMount(() => {
100
+ mounted = true
99
101
  const wide = matchMedia('(width >= 64rem)')
100
102
  const motion = matchMedia('(prefers-reduced-motion: reduce)')
101
103
  const resize = () => { if (wide.matches && dialog.open) finishClose() }
@@ -114,7 +116,7 @@
114
116
  <IconMenu class="ui-menu-glyph" size={18} stroke={1.5} data-open={opened} aria-hidden="true" />
115
117
  {/snippet}
116
118
 
117
- <button bind:this={trigger} type="button" class={clsx('btn btn-quiet btn-square ui-menu-toggle', className)} data-variant="quiet" data-shape="icon"
119
+ <button bind:this={trigger} type="button" disabled={!mounted} class={clsx('btn btn-quiet btn-square ui-menu-toggle', className)} data-variant="quiet" data-shape="icon"
118
120
  aria-label={t('Menu')} aria-expanded={opened} aria-haspopup="dialog" aria-controls={id} onclick={open}>
119
121
  {@render lines()}
120
122
  </button>
@@ -1,5 +1,5 @@
1
1
  ---
2
- import '@master/internal-site/styles/system/index.css'
2
+ import '@master/internal-site/styles/system/index.ts'
3
3
  import Link from '@master/internal-site/components/Link.svelte'
4
4
  import DocumentIdentifier from '@master/internal-site/components/DocumentIdentifier.astro'
5
5
  import type { DocumentAPIEntry } from '@master/internal-site/components/document-types.ts'
@@ -17,8 +17,8 @@ const { label, entries, compact = false } = Astro.props
17
17
  ---
18
18
 
19
19
  <nav class="ui-index" data-density={compact ? 'compact' : undefined} aria-label={label}>
20
- {entries.map(entry => <Link href={entry.href}>
21
- <b><code><DocumentIdentifier text={entry.name} /></code></b>
22
- <span>{entry.description}</span>
20
+ {entries.map(entry => <Link class="card card-flat card-interactive" href={entry.href}>
21
+ <b class="card-title"><code><DocumentIdentifier text={entry.name} /></code></b>
22
+ <span class="card-description">{entry.description}</span>
23
23
  </Link>)}
24
24
  </nav>
@@ -1,5 +1,5 @@
1
1
  ---
2
- import '@master/internal-site/styles/system/index.css'
2
+ import '@master/internal-site/styles/system/index.ts'
3
3
  import Link from '@master/internal-site/components/Link.svelte'
4
4
  import RenderNode from '@master/internal-site/components/RenderNode.astro'
5
5
  import type { DocumentChoice } from '@master/internal-site/components/document-types.ts'
@@ -16,9 +16,9 @@ const { label, entries } = Astro.props
16
16
  ---
17
17
 
18
18
  <nav aria-label={label} class="ui-index">
19
- {entries.map(entry => <Link href={entry.href}>
19
+ {entries.map(entry => <Link class="card card-flat card-interactive" href={entry.href}>
20
20
  {entry.icon != null && <RenderNode node={entry.icon} />}
21
- <b>{entry.title}</b>
22
- <span>{entry.description}</span>
21
+ <b class="card-title">{entry.title}</b>
22
+ <span class="card-description">{entry.description}</span>
23
23
  </Link>)}
24
24
  </nav>
@@ -1,5 +1,5 @@
1
1
  ---
2
- import '@master/internal-site/styles/system/callout.css'
2
+ import '@master/internal-site/styles/system/callout.ts'
3
3
  import '@master/internal-site/styles/system/tray.ts'
4
4
  import '@master/internal-site/styles/system/tray-code.css'
5
5
  import IconAlertTriangle from '@tabler/icons-svelte-runes/icons/alert-triangle'
@@ -24,10 +24,10 @@ const hasResult = resultCode != null || Astro.slots.has('resultCode')
24
24
  <figure class="tray ui-tray" aria-label={title}>
25
25
  <figcaption class="ui-tray-head"><p class="ui-tray-title">{title}</p></figcaption>
26
26
  {sourceCode != null ? <RenderNode node={sourceCode} /> : <slot name="sourceCode" />}
27
- {diagnostic && <div class="ui-callout" data-tone={diagnostic.severity === 'Error' ? 'danger' : 'warning'}>
28
- <DiagnosticIcon stroke={1.6} aria-hidden="true" />
29
- <div>
30
- <p><b>{diagnostic.severity}</b> · <code>{diagnostic.rule}</code></p>
27
+ {diagnostic && <div class:list={['alert', diagnostic.severity === 'Error' ? 'alert-danger' : 'alert-warning', 'ui-callout']} data-tone={diagnostic.severity === 'Error' ? 'danger' : 'warning'}>
28
+ <DiagnosticIcon class="icon alert-icon" stroke={1.6} aria-hidden="true" />
29
+ <div class="alert-body">
30
+ <p><b class="alert-title">{diagnostic.severity}</b> · <code class="code">{diagnostic.rule}</code></p>
31
31
  <p>{diagnostic.message}</p>
32
32
  </div>
33
33
  </div>}