@fusion.dev/helix-docs 0.130.0 → 0.132.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.
@@ -15,53 +15,60 @@ a theme from a few inputs, and the theme builder shows you the result.
15
15
 
16
16
  You enter the same inputs that `derive()` takes:
17
17
 
18
- - a brand color
19
- - a chroma ceiling
20
- - a radius
21
- - a density
22
- - a contrast target
23
- - a motion character
24
-
25
- The theme builder runs the full derivation. It shows you every token, and the
26
- components drawn with them.
27
-
28
- It shows light and dark at the same time. `[data-color-mode]` works on any
29
- element, so the two previews are two subtrees of one document. See
30
- [Color modes](./color-modes).
31
-
32
- ## The contrast column
33
-
34
- The contrast column lists every color pair Helix computed. Each pair shows its
35
- ratio, measured against the background it is painted on. A pair has one of
36
- three states:
37
-
38
- - **Met.** The pair reaches the target.
39
- - **Unverifiable.** The background is translucent, so there is no known color
40
- to measure against. The pair neither passes nor fails. This is the cost of a
41
- translucent material, and the theme builder reports it.
42
- - **Pinned.** You set the color yourself. The engine did not compute it, so its
43
- contrast is not guaranteed.
44
-
45
- A column of `unverifiable` pairs means your theme makes a trade. The column lets
46
- you see that you made it.
47
-
48
- ## What the theme builder exports
49
-
50
- The theme builder gives you the token block as CSS, to paste into your own
18
+ - **Color:** the brand, the color scheme, the contrast target, the saturation,
19
+ the accent angle, and the page's color in light and in dark
20
+ - **Shape and type:** the density, the corner radius, the three faces, the body
21
+ size, and the type scale
22
+ - **Status:** how far the status colors follow the palette, and how far their
23
+ hues may move
24
+ - **Motion, separation, and material:** the motion character, how surfaces are
25
+ set apart, and how floating surfaces are blurred and see-through
26
+
27
+ The theme builder runs the full derivation on every change. It shows a page
28
+ drawn with the theme, and the stylesheet the theme generates beside it.
29
+
30
+ The Color scheme field picks which half you see: light, dark, or the site's own
31
+ mode. See [Color modes](./color-modes).
32
+
33
+ ## A page of your own color
34
+
35
+ The Light page and Dark page fields give the page a color, such as a warm cream
36
+ or a deep teal. They start at pure white and pure black, the page Helix draws
37
+ without one. The surfaces keep the contrast with the page they keep with white
38
+ or black, the grays take its tint, and every text color is solved against it. A
39
+ page that no text color can reach the contrast target on is left out of the
40
+ preview, and a caption under the fields says so.
41
+
42
+ ## The audit
43
+
44
+ The audit lists every color pair Helix computed. Each pair shows its ratio,
45
+ measured against the background it is painted on, and either passes or fails
46
+ its target. Its three tabs are:
47
+
48
+ - **Contrast.** The pairs that fail, or a line saying that every pair passes.
49
+ - **Collisions.** Colors too close to each other to tell apart, such as the
50
+ primary color and a status color.
51
+ - **Unverifiable.** Pairs whose background is translucent, so there is no known
52
+ color to measure against. This is the cost of a translucent material, and
53
+ the theme builder reports it.
54
+
55
+ ## What the theme builder gives you
56
+
57
+ The generated stylesheet is the token block as CSS, to paste into your own
51
58
  stylesheet:
52
59
 
53
60
  ```css
54
- :root {
55
- --helix-color-primary: oklch(…);
61
+ [data-theme="preview"] {
62
+ --helix-color-background: #f7f2eb;
56
63
  …
57
64
  }
58
65
  ```
59
66
 
60
- It also gives you the intent object, to keep in your repository and derive the
61
- theme from again:
67
+ The page's link holds every input you changed, so a link is the theme. To derive
68
+ the theme in your own build, write the same inputs as an intent object:
62
69
 
63
70
  ```ts
64
- export const theme = { brand: '#2563eb', chroma: { ceiling: 0.1 }, radius: 2 }
71
+ export const theme = { background: { light: '#f7f2eb' }, brand: '#ff6200' }
65
72
  ```
66
73
 
67
74
  **Keep the intent object in your repository.** The tokens are the output of a