@tenphi/cookbook 0.17.0 → 0.17.1

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.
@@ -350,13 +350,19 @@ theme: {
350
350
  surface: { tone: 98, saturation: 0.05 },
351
351
  text: {
352
352
  base: "surface",
353
- tone: "-10",
353
+ tone: 0,
354
+ saturation: 0,
355
+ contrast: { wcag: [7, 10] }
356
+ },
357
+ heading: {
358
+ base: "surface",
359
+ tone: [4, 0],
354
360
  saturation: 0,
355
361
  contrast: { wcag: [7, 10] }
356
362
  },
357
363
  textSoft: {
358
364
  base: "surface",
359
- tone: "-10",
365
+ tone: [25, 10],
360
366
  saturation: 0.05,
361
367
  contrast: { wcag: [4.5, 7] }
362
368
  }
@@ -404,8 +410,11 @@ flows. The default layout is capped at `87.5rem` (1400px), matching the
404
410
  Tasty site, with a `58rem` reading column and a `17.5rem` sidebar. `brand.from`
405
411
  supplies the color seed. `palette` supplies semantic Glaze declarations that
406
412
  inherit its hue and saturation unless a role supplies its own `from`. `tone` and
407
- a saturation factor set the surface; `base` and `contrast` express reading-color
408
- requirements against that surface. Glaze resolves light, dark, and both
413
+ a saturation factor set the surface. Reading text uses absolute tones: body
414
+ text starts at 0, and headings at 4. Glaze applies normal-mode tone boundaries
415
+ and adapts the values for dark mode; `base` and `contrast` provide minimum
416
+ contrast safeguards. `palette.heading` follows an explicit `palette.text`
417
+ declaration unless customized separately. Glaze resolves light, dark, and both
409
418
  high-contrast modes independently. Literal color shorthand and structured
410
419
  brand hue/saturation/tone remain supported. A requested APCA floor below 45 requires the explicit
411
420
  `unsafeContrast: true` escape hatch. Learn more in
@@ -72,13 +72,19 @@ theme: {
72
72
  surface: { tone: 98, saturation: 0.05 },
73
73
  text: {
74
74
  base: "surface",
75
- tone: "-10",
75
+ tone: 0,
76
+ saturation: 0,
77
+ contrast: { wcag: [7, 10] }
78
+ },
79
+ heading: {
80
+ base: "surface",
81
+ tone: [4, 0],
76
82
  saturation: 0,
77
83
  contrast: { wcag: [7, 10] }
78
84
  },
79
85
  textSoft: {
80
86
  base: "surface",
81
- tone: "-10",
87
+ tone: [25, 10],
82
88
  saturation: 0.05,
83
89
  contrast: { wcag: [4.5, 7] }
84
90
  }
@@ -88,8 +94,19 @@ theme: {
88
94
  ```
89
95
 
90
96
  Glaze resolves each declaration for light, dark, normal, and high-contrast
91
- modes. The first contrast value applies to normal mode; the second applies to
92
- high contrast. Palette declarations inherit the brand hue and saturation:
97
+ modes. In a tone or contrast pair, the first value applies to normal mode;
98
+ the second applies to high contrast. Use absolute tones for reading text:
99
+ `text` starts at tone 0 and `heading` at tone 4, giving headings only a slight
100
+ reduction in contrast. Glaze applies its tone boundaries in normal mode, so
101
+ body text is not pure black, then inverts the tones for dark mode. High-contrast
102
+ mode uses the full range. `textSoft` is reserved for secondary text.
103
+ `heading` follows an explicitly configured `text` declaration unless it has
104
+ its own declaration, preserving existing custom palettes.
105
+ Contrast requirements are minimum safeguards: Glaze preserves the authored
106
+ tone when it already meets the floor. A small relative tone step from the
107
+ surface would instead leave the solver to produce text at that minimum.
108
+
109
+ Palette declarations inherit the brand hue and saturation:
93
110
  `saturation` is a 0–1 factor of that seed, and `tone` is 0–100. They can set
94
111
  an absolute tone or a tone relative to `base`. Use `from` on a palette role
95
112
  when it needs its own color seed; otherwise relative declarations keep its
@@ -100,7 +117,7 @@ Cookbook keeps literal surface seeds desaturated in the dark scheme so a nearly
100
117
  white tint does not become vivid dark chrome when its tone is inverted.
101
118
 
102
119
  Components consume semantic colors consistently: `surface`, `header`, `surface-2`,
103
- `surface-3`, `text`, `text-soft`, `border`, `border-strong`, `accent-text`,
120
+ `surface-3`, `text`, `heading`, `text-soft`, `border`, `border-strong`, `accent-text`,
104
121
  `accent-surface`, `accent-surface-text`, and `focus`. Tasty components can use
105
122
  these as `#surface`, `#text`, `#border`, and so on; the Astro shell consumes the
106
123
  same resolved values. Glaze also generates hover and pressed states, subtle
@@ -370,6 +387,7 @@ sub-elements:
370
387
  | `SearchButton` | `Label`, `Shortcut`, `Hover`, `Active`, `NativeIcon`, `Icon` |
371
388
  | `Layout` | `LockedPage` |
372
389
  | `HeaderLinks` | `Desktop`, `Link`, `HoverLink`, `PrimaryLink`, `HoverPrimaryLink`, `Trigger`, `HoverTrigger`, `Panel`, `PanelNavigation`, `PanelLink`, `FirstPanelLink`, `Close`, `HoverClose` |
390
+ | `Heading` | `Level1`, `Level2`, `Level3`, `Level4`, `Level5`, `Level6`, `PageTitle` |
373
391
  | `HeaderFrame` | None |
374
392
  | `PageFrame` | `MainFrame`, `SidebarFrame`, `Columns` |
375
393
  | `Steps` | `Item`, `Marker` |
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tenphi/cookbook",
3
- "version": "0.17.0",
3
+ "version": "0.17.1",
4
4
  "description": "Repository-native static documentation for Astro",
5
5
  "type": "module",
6
6
  "keywords": [
@@ -64,8 +64,8 @@
64
64
  "author": "Andrey Yamanov",
65
65
  "license": "MIT",
66
66
  "dependencies": {
67
- "@tenphi/docs": "0.17.0",
68
- "@tenphi/starlight": "0.17.0"
67
+ "@tenphi/docs": "0.17.1",
68
+ "@tenphi/starlight": "0.17.1"
69
69
  },
70
70
  "peerDependencies": {
71
71
  "astro": "^7.3.2"