@fusion.dev/helix-templates 0.138.0 → 0.139.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (89) hide show
  1. package/README.md +18 -6
  2. package/dist/index.js +24 -0
  3. package/package.json +1 -1
  4. package/templates/angular/angular.json +57 -0
  5. package/templates/angular/package.json +28 -0
  6. package/templates/angular/src/app/app.config.ts +8 -0
  7. package/templates/angular/src/app/app.html +19 -0
  8. package/templates/angular/src/app/app.ts +29 -0
  9. package/templates/angular/src/app/data.ts +81 -0
  10. package/templates/angular/src/app/docs.ts +29 -0
  11. package/templates/angular/src/app/landing.html +112 -0
  12. package/templates/angular/src/app/landing.ts +31 -0
  13. package/templates/angular/src/app/overview.html +49 -0
  14. package/templates/angular/src/app/overview.ts +25 -0
  15. package/templates/angular/src/app/pathname.ts +24 -0
  16. package/templates/angular/src/app/signup-form.html +91 -0
  17. package/templates/angular/src/app/signup-form.ts +65 -0
  18. package/templates/angular/src/app/site-footer.html +10 -0
  19. package/templates/angular/src/app/site-footer.ts +22 -0
  20. package/templates/angular/src/app/site-header.html +30 -0
  21. package/templates/angular/src/app/site-header.ts +58 -0
  22. package/templates/angular/src/app.css +363 -0
  23. package/templates/angular/src/diagnostics.ts +24 -0
  24. package/templates/angular/src/index.html +12 -0
  25. package/templates/angular/src/main.ts +21 -0
  26. package/templates/angular/tsconfig.app.json +9 -0
  27. package/templates/angular/tsconfig.json +34 -0
  28. package/templates/react-nextjs/app/diagnostics.ts +19 -0
  29. package/templates/react-nextjs/app/landing.tsx +2 -2
  30. package/templates/react-nextjs/app/overview.tsx +1 -1
  31. package/templates/react-nextjs/instrumentation-client.ts +6 -0
  32. package/templates/react-nextjs/package.json +1 -0
  33. package/templates/react-nextjs/tsconfig.json +1 -0
  34. package/templates/react-vite/package.json +1 -0
  35. package/templates/react-vite/src/diagnostics.ts +24 -0
  36. package/templates/react-vite/src/main.tsx +6 -0
  37. package/templates/react-vite/tsconfig.json +1 -0
  38. package/templates/solid-vite/helix-solid.d.ts +14 -0
  39. package/templates/solid-vite/index.html +12 -0
  40. package/templates/solid-vite/package.json +22 -0
  41. package/templates/solid-vite/src/App.tsx +35 -0
  42. package/templates/solid-vite/src/app.css +363 -0
  43. package/templates/solid-vite/src/data.ts +81 -0
  44. package/templates/solid-vite/src/diagnostics.ts +24 -0
  45. package/templates/solid-vite/src/docs.ts +29 -0
  46. package/templates/solid-vite/src/landing.tsx +177 -0
  47. package/templates/solid-vite/src/main.tsx +23 -0
  48. package/templates/solid-vite/src/overview.tsx +78 -0
  49. package/templates/solid-vite/src/routes.ts +22 -0
  50. package/templates/solid-vite/src/signup-form.tsx +151 -0
  51. package/templates/solid-vite/src/site-footer.tsx +34 -0
  52. package/templates/solid-vite/src/site-header.tsx +77 -0
  53. package/templates/solid-vite/tsconfig.json +27 -0
  54. package/templates/solid-vite/vite.config.ts +7 -0
  55. package/templates/svelte-vite/helix-svelte.d.ts +9 -0
  56. package/templates/svelte-vite/index.html +12 -0
  57. package/templates/svelte-vite/package.json +23 -0
  58. package/templates/svelte-vite/src/App.svelte +35 -0
  59. package/templates/svelte-vite/src/Landing.svelte +137 -0
  60. package/templates/svelte-vite/src/Overview.svelte +67 -0
  61. package/templates/svelte-vite/src/SignupForm.svelte +148 -0
  62. package/templates/svelte-vite/src/SiteFooter.svelte +26 -0
  63. package/templates/svelte-vite/src/SiteHeader.svelte +72 -0
  64. package/templates/svelte-vite/src/app.css +363 -0
  65. package/templates/svelte-vite/src/data.ts +81 -0
  66. package/templates/svelte-vite/src/diagnostics.ts +24 -0
  67. package/templates/svelte-vite/src/docs.ts +29 -0
  68. package/templates/svelte-vite/src/main.ts +23 -0
  69. package/templates/svelte-vite/src/routes.svelte.ts +19 -0
  70. package/templates/svelte-vite/tsconfig.json +28 -0
  71. package/templates/svelte-vite/vite.config.ts +7 -0
  72. package/templates/vue-vite/helix-vue.d.ts +8 -0
  73. package/templates/vue-vite/index.html +12 -0
  74. package/templates/vue-vite/package.json +23 -0
  75. package/templates/vue-vite/src/App.vue +39 -0
  76. package/templates/vue-vite/src/LandingPage.vue +139 -0
  77. package/templates/vue-vite/src/OverviewPage.vue +69 -0
  78. package/templates/vue-vite/src/SignupForm.vue +149 -0
  79. package/templates/vue-vite/src/SiteFooter.vue +28 -0
  80. package/templates/vue-vite/src/SiteHeader.vue +72 -0
  81. package/templates/vue-vite/src/app.css +363 -0
  82. package/templates/vue-vite/src/data.ts +81 -0
  83. package/templates/vue-vite/src/diagnostics.ts +24 -0
  84. package/templates/vue-vite/src/docs.ts +29 -0
  85. package/templates/vue-vite/src/main.ts +23 -0
  86. package/templates/vue-vite/src/routes.ts +26 -0
  87. package/templates/vue-vite/tsconfig.json +26 -0
  88. package/templates/vue-vite/vite.config.ts +13 -0
  89. package/templates.json +41 -0
@@ -0,0 +1,21 @@
1
+ import { isDevMode } from '@angular/core'
2
+ import { bootstrapApplication } from '@angular/platform-browser'
3
+
4
+ /* A custom element registers as a side effect of being imported, so this line
5
+ makes every Helix tag in the app real. Import the whole library while you are
6
+ finding your feet. `@fusion.dev/helix/button` and its siblings are subpath
7
+ exports, for when you want to pay for only what you use. The stylesheets are
8
+ in `angular.json`, since Angular takes global styles there. */
9
+ import '@fusion.dev/helix'
10
+
11
+ import { App } from './app/app'
12
+ import { appConfig } from './app/app.config'
13
+
14
+ /* **Diagnostics in development only.** `ng serve` runs in development, and
15
+ `ng build` in production, where `isDevMode()` is false and the chunk this
16
+ imports is never requested. */
17
+ if (isDevMode()) {
18
+ void import('./diagnostics')
19
+ }
20
+
21
+ bootstrapApplication(App, appConfig).catch((error: unknown) => console.error(error))
@@ -0,0 +1,9 @@
1
+ {
2
+ "extends": "./tsconfig.json",
3
+ "compilerOptions": {
4
+ "types": []
5
+ },
6
+ "include": [
7
+ "src/**/*.ts"
8
+ ]
9
+ }
@@ -0,0 +1,34 @@
1
+ {
2
+ "compileOnSave": false,
3
+ "compilerOptions": {
4
+ "experimentalDecorators": true,
5
+ "importHelpers": true,
6
+ "isolatedModules": true,
7
+ "lib": [
8
+ "DOM",
9
+ "DOM.Iterable",
10
+ "ES2023"
11
+ ],
12
+ "module": "preserve",
13
+ "noFallthroughCasesInSwitch": true,
14
+ "noImplicitOverride": true,
15
+ "noImplicitReturns": true,
16
+ "noPropertyAccessFromIndexSignature": true,
17
+ "resolveJsonModule": true,
18
+ "skipLibCheck": true,
19
+ "strict": true,
20
+ "target": "ES2022"
21
+ },
22
+ "angularCompilerOptions": {
23
+ "enableI18nLegacyMessageIdFormat": false,
24
+ "strictInjectionParameters": true,
25
+ "strictInputAccessModifiers": true,
26
+ "strictTemplates": true
27
+ },
28
+ "files": [],
29
+ "references": [
30
+ {
31
+ "path": "./tsconfig.app.json"
32
+ }
33
+ ]
34
+ }
@@ -0,0 +1,19 @@
1
+ /**
2
+ * Helix diagnostics, which `instrumentation-client.ts` loads in development only.
3
+ *
4
+ * It finds the Helix mistakes that are valid CSS and therefore silent, such as
5
+ * a `::part()` naming a part nothing publishes, and an attribute value outside
6
+ * the set a component takes. Each finding prints once in DevTools, and a badge
7
+ * in the corner of the page lists them while there are any.
8
+ *
9
+ * **Checked against the Helix you installed**, from the lint data it ships, so
10
+ * nothing is loaded from the network.
11
+ *
12
+ * To print the findings in your terminal as well, run `npx helix diagnostics`
13
+ * from `@fusion.dev/helix-cli` beside the dev server, and add
14
+ * `sinks: { relay: true }` below.
15
+ */
16
+ import { initDiagnostics } from '@fusion.dev/helix-diagnostics'
17
+ import lint from '@fusion.dev/helix/lint.json'
18
+
19
+ initDiagnostics({ environment: 'development', tiers: [{ lint }] })
@@ -94,7 +94,7 @@ export function Landing() {
94
94
  </helix-text>
95
95
  <helix-text as="p" emphasis="muted" variant="body">
96
96
  They are custom elements, so you write the tags and there is no per-component import
97
- to keep in step. One line in <helix-code>src/main.tsx</helix-code> registers all of
97
+ to keep in step. One line in <helix-code>app/helix-elements.tsx</helix-code> registers all of
98
98
  them, and a subpath like <helix-code>@fusion.dev/helix/tabs</helix-code> registers
99
99
  one.
100
100
  </helix-text>
@@ -122,7 +122,7 @@ export function Landing() {
122
122
  A short stylesheet
123
123
  </helix-text>
124
124
  <helix-text as="p" emphasis="muted" variant="body">
125
- <helix-code>src/app.css</helix-code> holds this page's measure, the rhythm between its
125
+ <helix-code>app/app.css</helix-code> holds this page's measure, the rhythm between its
126
126
  blocks, and nothing a component already draws. Where a component leaves a decision
127
127
  open it names a part: the data view reaches one to paint the row you tick.
128
128
  </helix-text>
@@ -26,7 +26,7 @@ export function Overview() {
26
26
  </helix-text>
27
27
  <helix-text as="p" className="lede" emphasis="muted" variant="body">
28
28
  Twelve people from a local module. Sort a column, turn a page, or tick a row and watch the
29
- rule in <helix-code>src/app.css</helix-code> paint it.
29
+ rule in <helix-code>app/app.css</helix-code> paint it.
30
30
  </helix-text>
31
31
  </header>
32
32
 
@@ -0,0 +1,6 @@
1
+ /* **Diagnostics in development, and none of it in a build.** Next.js runs this
2
+ file in the browser before the app hydrates, and replaces
3
+ `process.env.NODE_ENV` when it builds, which drops the import with it. */
4
+ if (process.env.NODE_ENV === 'development') {
5
+ void import('./app/diagnostics')
6
+ }
@@ -16,6 +16,7 @@
16
16
  "react-dom": "^19.2.0"
17
17
  },
18
18
  "devDependencies": {
19
+ "@fusion.dev/helix-diagnostics": "^__HELIX_VERSION__",
19
20
  "@types/node": "^22.10.0",
20
21
  "@types/react": "^19.2.0",
21
22
  "@types/react-dom": "^19.2.0",
@@ -8,6 +8,7 @@
8
8
  ],
9
9
  "module": "ESNext",
10
10
  "moduleResolution": "bundler",
11
+ "resolveJsonModule": true,
11
12
  "skipLibCheck": true,
12
13
  "strict": true,
13
14
  "target": "ES2023",
@@ -15,6 +15,7 @@
15
15
  "react-dom": "^19.2.0"
16
16
  },
17
17
  "devDependencies": {
18
+ "@fusion.dev/helix-diagnostics": "^__HELIX_VERSION__",
18
19
  "@types/react": "^19.2.0",
19
20
  "@types/react-dom": "^19.2.0",
20
21
  "@vitejs/plugin-react": "^6.1.1",
@@ -0,0 +1,24 @@
1
+ /**
2
+ * Helix diagnostics, which `main.tsx` loads in development only.
3
+ *
4
+ * It finds the Helix mistakes that are valid CSS and therefore silent, such as
5
+ * a `::part()` naming a part nothing publishes, and an attribute value outside
6
+ * the set a component takes. Each finding prints once in DevTools, and a badge
7
+ * in the corner of the page lists them while there are any.
8
+ *
9
+ * **Checked against the Helix you installed**, from the lint data it ships, so
10
+ * nothing is loaded from the network.
11
+ *
12
+ * To print the findings in your terminal as well, run `npx helix diagnostics`
13
+ * from `@fusion.dev/helix-cli` beside the dev server, and add
14
+ * `sinks: { relay: true }` below.
15
+ */
16
+ import { initDiagnostics } from '@fusion.dev/helix-diagnostics'
17
+ import lint from '@fusion.dev/helix/lint.json'
18
+
19
+ initDiagnostics({
20
+ environment: 'development',
21
+ /* The route is in the hash, so each page's findings are kept apart. */
22
+ page: () => window.location.hash.slice(1) || '/',
23
+ tiers: [{ lint }],
24
+ })
@@ -15,6 +15,12 @@ import './app.css'
15
15
 
16
16
  import { App } from './App.js'
17
17
 
18
+ /* **Diagnostics in development, and none of it in a build.** `vite build`
19
+ replaces `import.meta.env.DEV` with `false` and drops the import with it. */
20
+ if (import.meta.env.DEV) {
21
+ void import('./diagnostics.js')
22
+ }
23
+
18
24
  createRoot(document.querySelector('#root') as HTMLElement).render(
19
25
  <StrictMode>
20
26
  <App />
@@ -8,6 +8,7 @@
8
8
  ],
9
9
  "module": "ESNext",
10
10
  "moduleResolution": "bundler",
11
+ "resolveJsonModule": true,
11
12
  "noEmit": true,
12
13
  "skipLibCheck": true,
13
14
  "strict": true,
@@ -0,0 +1,14 @@
1
+ /**
2
+ * Types for the Helix custom elements written directly in Solid's JSX.
3
+ *
4
+ * Generated from the same manifest the API pages read, so a wrong attribute or
5
+ * a wrong event detail is a compile error. The Solid flavor of the typings adds
6
+ * `prop:`, `attr:`, and `on:` to every tag, beside the plain props.
7
+ */
8
+ import type { CustomElementsSolidJs } from '@fusion.dev/helix/jsx'
9
+
10
+ declare module 'solid-js' {
11
+ namespace JSX {
12
+ interface IntrinsicElements extends CustomElementsSolidJs {}
13
+ }
14
+ }
@@ -0,0 +1,12 @@
1
+ <!doctype html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="utf-8" />
5
+ <meta name="viewport" content="width=device-width, initial-scale=1" />
6
+ <title>__PROJECT_NAME__</title>
7
+ </head>
8
+ <body>
9
+ <div id="root"></div>
10
+ <script type="module" src="/src/main.tsx"></script>
11
+ </body>
12
+ </html>
@@ -0,0 +1,22 @@
1
+ {
2
+ "name": "__PROJECT_NAME__",
3
+ "version": "0.0.0",
4
+ "private": true,
5
+ "type": "module",
6
+ "scripts": {
7
+ "build": "tsc && vite build",
8
+ "dev": "vite",
9
+ "preview": "vite preview"
10
+ },
11
+ "dependencies": {
12
+ "@fusion.dev/helix": "^__HELIX_VERSION__",
13
+ "@fusion.dev/helix-styles": "^__HELIX_VERSION__",
14
+ "solid-js": "^1.9.15"
15
+ },
16
+ "devDependencies": {
17
+ "@fusion.dev/helix-diagnostics": "^__HELIX_VERSION__",
18
+ "typescript": "^7.0.2",
19
+ "vite": "^8.3.0",
20
+ "vite-plugin-solid": "^2.11.14"
21
+ }
22
+ }
@@ -0,0 +1,35 @@
1
+ import { Dynamic } from 'solid-js/web'
2
+ import { Landing } from './landing.tsx'
3
+ import { Overview } from './overview.tsx'
4
+ import { pathname } from './routes.ts'
5
+ import { SignupForm } from './signup-form.tsx'
6
+ import { SiteFooter } from './site-footer.tsx'
7
+ import { SiteHeader } from './site-header.tsx'
8
+
9
+ /** The page for each path, in the order the bar offers them. */
10
+ const PAGES = {
11
+ '/': Landing,
12
+ '/join': SignupForm,
13
+ '/overview': Overview,
14
+ }
15
+
16
+ /**
17
+ * The shell, and the switch between the three pages.
18
+ *
19
+ * Helix components are custom elements, so you write the tags directly. There
20
+ * is no wrapper package and nothing to import per component: `src/main.tsx`
21
+ * registers them once, and every tag in the app is real from then on.
22
+ */
23
+ export function App() {
24
+ /* The bar, the route, and the footer, in a column the height of the window.
25
+ `app.css` says why the footer is worth having and why the column is flex. */
26
+ return (
27
+ <div class="shell">
28
+ <SiteHeader />
29
+ <main class="page">
30
+ <Dynamic component={PAGES[pathname() as keyof typeof PAGES] ?? Landing} />
31
+ </main>
32
+ <SiteFooter />
33
+ </div>
34
+ )
35
+ }
@@ -0,0 +1,363 @@
1
+ /*
2
+ * The page around the components.
3
+ *
4
+ * Helix draws its own insides, so what is left to an app stylesheet is the
5
+ * measure, the rhythm between blocks, and the few things a component
6
+ * deliberately leaves open. Everything below is a Helix token or a documented
7
+ * hook, so a theme moves it and both color modes follow without a second copy
8
+ * of anything.
9
+ *
10
+ * **Color appears twice and both places are named.** The wordmark takes
11
+ * `--helix-color-brand-mark`, which is the token for the brand as a graphic
12
+ * rather than as a word, and a chosen row takes `--helix-color-primary-subtle`
13
+ * through the parts the table publishes. Everywhere else this page is ink on the
14
+ * background and the components carry their own.
15
+ */
16
+
17
+ /*
18
+ * **The shell, and what stops a short route ending in a void.** The overview is
19
+ * a header, a table and a caption, which on a 1280 by 900 window left something
20
+ * like four hundred pixels of nothing under it: a page that stopped rather than
21
+ * a page that finished. A column the height of the window with the footer at the
22
+ * end of it puts a floor under every route.
23
+ *
24
+ * **Flex and not grid, because the bar is sticky.** A grid item's containing
25
+ * block is its own grid area, which is one row as tall as the bar, so a sticky
26
+ * header in a grid row sticks for nothing. A flex item's containing block is the
27
+ * flex container, which is the whole document.
28
+ */
29
+ .shell {
30
+ display: flex;
31
+ flex-direction: column;
32
+ min-block-size: 100dvh;
33
+ }
34
+
35
+ /*
36
+ * **56rem, which is a measure rather than a maximum.** A page is as wide as its
37
+ * widest block can be read at, and the widest block here is a four-column table:
38
+ * given the whole of a 1280 window its first column came out 448 pixels across
39
+ * to hold a name, which reads as a table that has been stretched rather than
40
+ * laid out. The bar and the footer are centered in the same width, so the
41
+ * wordmark sits over the first column of the page rather than near it.
42
+ *
43
+ * `flex-grow` is what hands the slack to the page rather than to the footer.
44
+ */
45
+ .page {
46
+ flex-grow: 1;
47
+ margin-inline: auto;
48
+ max-inline-size: 56rem;
49
+ padding-block: var(--helix-space-2xl) var(--helix-space-3xl);
50
+ padding-inline: var(--helix-space-lg);
51
+ }
52
+
53
+ /*
54
+ * Two documented hooks, and both are about agreeing with the page. The bar
55
+ * centers its row in the page's measure, so the wordmark sits over the first
56
+ * column rather than near it. And it draws no line under itself by default,
57
+ * because a header over a page that already has a surface does not need one:
58
+ * this page has no such surface, so it asks for one. A token rather than a
59
+ * color, so it follows the theme.
60
+ */
61
+ helix-app-header {
62
+ --app-header-border-color: var(--helix-color-border);
63
+ --app-header-max-inline-size: 56rem;
64
+ }
65
+
66
+ /* The mark beside the project's name, which is the one graphic on the page and
67
+ the reason `--helix-color-brand-mark` exists: a mark answers to the 3:1 WCAG
68
+ asks of a graphic rather than to the 4.5 a word does, so it may sit closer to
69
+ the brand a theme was seeded with than any text color can. Swap the glyph, or
70
+ replace the whole element with your own logo. */
71
+ .wordmark {
72
+ align-items: center;
73
+ display: inline-flex;
74
+ gap: var(--helix-space-xs);
75
+ }
76
+
77
+ .wordmark helix-icon {
78
+ color: var(--helix-color-brand-mark);
79
+ }
80
+
81
+ /*
82
+ * One rhythm between the blocks of a page, so no page states its own.
83
+ *
84
+ * **`minmax(0, 1fr)` and never a bare column, which is the trap in every grid
85
+ * here.** An implicit track is `auto`, and an `auto` track's minimum is its
86
+ * content's min-content size, so a child that would rather scroll itself widens
87
+ * the track instead and takes the page with it. Measured at 320: the table's
88
+ * columns floor at 344, the column it sits in should have been 288, and
89
+ * `documentElement.scrollWidth` came back 360 against a 320 viewport. The whole
90
+ * page scrolled sideways so that a table with its own scrollport would not have
91
+ * to. Zero as the minimum hands the overflow back to whoever is equipped for it.
92
+ */
93
+ .stack,
94
+ .section,
95
+ .hero,
96
+ .first-screen,
97
+ .fact,
98
+ .facts,
99
+ .notes,
100
+ .split {
101
+ grid-template-columns: minmax(0, 1fr);
102
+ }
103
+
104
+ /* One step between the blocks of a page and a smaller one inside them, which is
105
+ the whole of the rhythm: `3xl` here against the `md` a section puts between
106
+ its heading and its block, so a reader sees three groups rather than six
107
+ evenly spaced things. */
108
+ .stack {
109
+ display: grid;
110
+ gap: var(--helix-space-3xl);
111
+ }
112
+
113
+ /*
114
+ * **The first screen is two things at once**, which is what makes it a screen
115
+ * rather than a stack: what this is, on the left, and the library doing it, on
116
+ * the right. Below 60rem there is no room for two columns that are both worth
117
+ * reading, so they become one and the panel reads as the thing the words were
118
+ * about.
119
+ *
120
+ * `start`, because a grid column stretches to its tallest sibling: the panel
121
+ * beside a taller block of words would otherwise grow to match it and spread its
122
+ * own regions out to fill the difference.
123
+ */
124
+ .first-screen {
125
+ align-items: start;
126
+ display: grid;
127
+ gap: var(--helix-space-xl);
128
+ }
129
+
130
+ @media (width >= 60rem) {
131
+ .first-screen {
132
+ grid-template-columns: minmax(0, 1fr) minmax(0, 20rem);
133
+ }
134
+ }
135
+
136
+ /* A heading and the lines around it are one block, and the gap between them is
137
+ not the gap between blocks. Every route opens with one. */
138
+ .hero {
139
+ display: grid;
140
+ gap: var(--helix-space-xs);
141
+ justify-items: start;
142
+ }
143
+
144
+ /* **A measure for the lede, which the page's own is too wide to be.** A line of
145
+ prose across 56rem is around 110 characters, and the readable range tops out
146
+ near 75. The heading above it is exempt: a heading is scanned rather than
147
+ read along. */
148
+ .lede {
149
+ max-inline-size: 42rem;
150
+ }
151
+
152
+ .actions {
153
+ display: flex;
154
+ flex-wrap: wrap;
155
+ gap: var(--helix-space-sm);
156
+ padding-block-start: var(--helix-space-md);
157
+ }
158
+
159
+ /*
160
+ * **The panel is the library rather than a picture of it**, so the only thing it
161
+ * needs from here is room. Two documented hooks: the figures come down a step
162
+ * from the display size, which is set for a figure on its own and is too loud
163
+ * for three of them in a 20rem column, and the rule between them comes in from
164
+ * `2xl`, which `divided` doubles and which would leave no column to put a
165
+ * number in.
166
+ */
167
+ .specimen {
168
+ --stat-group-gap: var(--helix-space-md);
169
+ --stat-value-size: var(--helix-text-xl);
170
+ }
171
+
172
+ /* A section is its heading and its one block, closer together than two sections
173
+ are. */
174
+ .section {
175
+ display: grid;
176
+ gap: var(--helix-space-md);
177
+ }
178
+
179
+ /*
180
+ * **Three facts about the library, and deliberately not three cards.** A row of
181
+ * identical outlined boxes is the shape a generated page takes, and it is also a
182
+ * claim: a box says each of these is its own object, when they are three
183
+ * paragraphs about the same installed thing. A rule over each column groups them
184
+ * at a fraction of the weight, and leaves the cards below to mean something,
185
+ * which is that they go somewhere.
186
+ *
187
+ * `border-thick` in the foreground rather than a hairline in the border color:
188
+ * this is a heading device rather than a container edge, and it is the one place
189
+ * the page draws in ink.
190
+ */
191
+ .facts {
192
+ display: grid;
193
+ gap: var(--helix-space-lg);
194
+ }
195
+
196
+ @media (width >= 48rem) {
197
+ .facts {
198
+ grid-template-columns: repeat(3, minmax(0, 1fr));
199
+ }
200
+ }
201
+
202
+ .fact {
203
+ align-content: start;
204
+ border-block-start: var(--helix-border-thick) solid var(--helix-color-foreground);
205
+ display: grid;
206
+ gap: var(--helix-space-xs);
207
+ justify-items: start;
208
+ padding-block-start: var(--helix-space-sm);
209
+ }
210
+
211
+ /*
212
+ * **The one departure the grids state.** `helix-grid` takes a fixed count as
213
+ * plain CSS, which is what keeps a server-rendered row of cards correct before
214
+ * any JavaScript arrives. Below this width there is only ever room for one
215
+ * column, and `--grid-columns` is the documented way to say so from outside the
216
+ * shadow root.
217
+ */
218
+ @media (width < 48rem) {
219
+ helix-grid {
220
+ --grid-columns: minmax(0, 1fr);
221
+ }
222
+ }
223
+
224
+ /*
225
+ * **The cards keep `start`, which is `--card-align`'s resting value, and the
226
+ * alternative is worth naming because it looks right and is not.**
227
+ * `space-between` puts the last line of each card on its bottom edge, so a row
228
+ * of cards ends in a straight line. It gets there by sharing the slack out
229
+ * between every region, and the first thing that moves is the body: three cards
230
+ * of six, five and seven lines had their opening lines 50 pixels apart under
231
+ * headings that were level. A reader scans the first line of each, so that is
232
+ * the alignment worth keeping.
233
+ */
234
+
235
+ /* The card fills the link that wraps it, so a row of destinations ends level:
236
+ the anchor is the grid item and stretches, and the card inside it does not.
237
+ The regions stay packed at the top, per `--card-align` above. */
238
+ [data-card] > helix-card {
239
+ block-size: 100%;
240
+ }
241
+
242
+ /* A form is read straight down, and a field wider than about this stops being
243
+ scannable however much room the window has. */
244
+ .form {
245
+ align-content: start;
246
+ display: grid;
247
+ gap: var(--helix-space-lg);
248
+ justify-items: start;
249
+ max-inline-size: 28rem;
250
+ }
251
+
252
+ /* Every control fills the column; the submit is as wide as its own words. */
253
+ .form > :not(helix-button) {
254
+ inline-size: 100%;
255
+ }
256
+
257
+ /*
258
+ * **The form takes a column and the notes take the rest.** A 28rem form on a
259
+ * 1280 window is a third of a page and two thirds of nothing, which is what the
260
+ * measure above cannot fix on its own: the form has a right width and the page
261
+ * does not shrink to it. Narrow, the two stack and the notes read as a
262
+ * postscript, which is the order they are written in.
263
+ */
264
+ .split {
265
+ display: grid;
266
+ gap: var(--helix-space-2xl);
267
+ }
268
+
269
+ @media (width >= 60rem) {
270
+ .split {
271
+ grid-template-columns: minmax(0, 28rem) minmax(0, 1fr);
272
+ }
273
+ }
274
+
275
+ /* `start`, because a grid column stretches to its tallest sibling and a
276
+ stretched grid shares the difference out between its own rows: beside a form
277
+ half a page long, three paragraphs came out 140 pixels apart. */
278
+ .notes {
279
+ align-content: start;
280
+ display: grid;
281
+ gap: var(--helix-space-sm);
282
+ justify-items: start;
283
+ max-inline-size: 32rem;
284
+ }
285
+
286
+ /* The callout takes the column, which `start` above would otherwise size to its
287
+ own words: a notice narrower than the paragraph under it reads as a stray. The
288
+ link beside it is meant to be its own width. */
289
+ .notes > helix-callout {
290
+ inline-size: 100%;
291
+ }
292
+
293
+ /*
294
+ * **The counterpart to the bar, and the reason every route now ends rather than
295
+ * stops.** The rule runs the window while its contents keep the page's measure,
296
+ * which is what a footer under a centered page looks like; the shell above is
297
+ * what holds it to the bottom of a window a route does not fill.
298
+ */
299
+ .site-footer {
300
+ border-block-start: var(--helix-border-thin) solid var(--helix-color-border);
301
+ }
302
+
303
+ .footer-row {
304
+ display: flex;
305
+ flex-wrap: wrap;
306
+ gap: var(--helix-space-md);
307
+ justify-content: space-between;
308
+ margin-inline: auto;
309
+ max-inline-size: 56rem;
310
+ padding-block: var(--helix-space-lg);
311
+ padding-inline: var(--helix-space-lg);
312
+ }
313
+
314
+ .footer-links {
315
+ display: flex;
316
+ flex-wrap: wrap;
317
+ gap: var(--helix-space-md);
318
+ }
319
+
320
+ /*
321
+ * **Narrow, the gutter gives before the content does.** 24 pixels either side of
322
+ * a 390 window is 48 of 390 spent on margin, and the table needs 355 of what is
323
+ * left. At `md` it has 358 and fits; at `lg` it was 13 pixels short and the last
324
+ * column sat outside the box until the reader scrolled the table sideways.
325
+ */
326
+ @media (width < 40rem) {
327
+ .page {
328
+ padding-block: var(--helix-space-xl) var(--helix-space-2xl);
329
+ padding-inline: var(--helix-space-md);
330
+ }
331
+
332
+ .footer-row {
333
+ padding-inline: var(--helix-space-md);
334
+ }
335
+ }
336
+
337
+ /*
338
+ * **The escape hatch, and the reason a component names its parts.** The table
339
+ * washes a chosen row at the strength `Tag` rests at; this page wants a row
340
+ * somebody has ticked to be findable from across the screen, and there is no
341
+ * token for "more than that". `::part` reaches the boxes the component drew
342
+ * without forking it, and a rule written out here beats the component's own
343
+ * however specific that one is.
344
+ *
345
+ * **Two parts and not one, because a row has no box.** The row is
346
+ * `display: contents` so that one grid can align every column across every row,
347
+ * which leaves the cells as the only thing a selection can be painted on. The
348
+ * table names both: the data cells and the cell holding the checkbox. Naming
349
+ * only the first leaves a pale stripe down the left of every chosen row.
350
+ *
351
+ * The values are still the library's, so a theme carries them like everything
352
+ * else. `primary-subtle` and not `primary-surface`: the second is the solid
353
+ * accent a button stands on and expects white on top of it, so a row painted
354
+ * with it puts the table's own ink on a saturated fill.
355
+ */
356
+ helix-data-table::part(cell-selected),
357
+ helix-data-table::part(select-selected) {
358
+ background-color: var(--helix-color-primary-subtle);
359
+ }
360
+
361
+ helix-data-table::part(cell-selected) {
362
+ font-weight: var(--helix-weight-semibold);
363
+ }