@tenphi/cookbook 0.18.1 → 0.18.2
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.
- package/docs/index.md +2 -2
- package/docs/theme-and-components.md +20 -9
- package/package.json +3 -3
package/docs/index.md
CHANGED
|
@@ -42,8 +42,8 @@ for GitHub Pages or any static host.
|
|
|
42
42
|
|
|
43
43
|
### Styling that fits your product
|
|
44
44
|
|
|
45
|
-
Glaze turns a brand and semantic palette into light, dark, and high-contrast
|
|
46
|
-
colors with contrast targets. Tasty applies those color roles alongside shared
|
|
45
|
+
[Glaze](./upstream/glaze/README.md) turns a brand and semantic palette into light, dark, and high-contrast
|
|
46
|
+
colors with contrast targets. [Tasty](./upstream/tasty/README.md) applies those color roles alongside shared
|
|
47
47
|
tokens and typography presets, so the docs can follow your design system.
|
|
48
48
|
State maps keep hover, focus, and responsive values beside the styles they
|
|
49
49
|
change. Partial `theme.styles` overrides merge before CSS extraction, letting
|
|
@@ -125,7 +125,7 @@ Cookbook keeps literal surface seeds desaturated in the dark scheme so a nearly
|
|
|
125
125
|
white tint does not become vivid dark chrome when its tone is inverted.
|
|
126
126
|
|
|
127
127
|
Components consume semantic colors consistently: `surface`, `header`, `surface-2`,
|
|
128
|
-
`surface-3`, `text`, `heading`, `text-soft`, `border`, `border-strong`, `accent-text`,
|
|
128
|
+
`surface-3`, `text`, `heading`, `text-soft`, `sidebar-text`, `border`, `border-strong`, `accent-text`,
|
|
129
129
|
`accent-surface`, `accent-surface-text`, `logo-surface`, `logo-mark`, and `focus`.
|
|
130
130
|
Tasty components can use these as `#surface`, `#text`, `#border`, and so on; the Astro shell consumes the
|
|
131
131
|
same resolved values. Glaze also generates hover and pressed states, subtle
|
|
@@ -159,9 +159,14 @@ Interactive controls step up exactly one surface level: a control on `surface`
|
|
|
159
159
|
uses `surface-2`, while a control on `surface-2` uses `surface-3`. Hover and
|
|
160
160
|
pressed states build on that elevated surface without changing the border.
|
|
161
161
|
Inputs stay on their surrounding surface so their border remains the visual
|
|
162
|
-
boundary.
|
|
163
|
-
paired `accent-surface-text
|
|
164
|
-
|
|
162
|
+
boundary. Primary buttons and selected navigation use the fixed-mode
|
|
163
|
+
`accent-surface` and its paired light `accent-surface-text`. The brand fill
|
|
164
|
+
keeps its polarity in dark mode while Glaze adjusts it to preserve label
|
|
165
|
+
contrast.
|
|
166
|
+
|
|
167
|
+
Page navigation keeps Next first in the keyboard order. It appears above
|
|
168
|
+
Previous on narrow screens; wider layouts show Previous at the start and Next
|
|
169
|
+
at the end.
|
|
165
170
|
|
|
166
171
|
## Design tokens
|
|
167
172
|
|
|
@@ -326,6 +331,10 @@ headings use a medium `610` weight and progressively gentle negative tracking.
|
|
|
326
331
|
The separate `720` heading bold weight keeps emphasized heading text distinct.
|
|
327
332
|
Navigation uses a lighter `450` weight with `580` for the current sidebar page,
|
|
328
333
|
while smaller group labels establish hierarchy without oversized bold text.
|
|
334
|
+
Inactive sidebar links use `sidebar-text`, a slightly softer blend of `text-soft`
|
|
335
|
+
and the surface. In high-contrast mode it matches `text-soft`. Set
|
|
336
|
+
`theme.palette['sidebar-text']` to adjust that color without changing other
|
|
337
|
+
secondary text, or `theme.styles.Sidebar.Control` to customize the control.
|
|
329
338
|
Top-level sidebar groups are always-visible section headings with their direct
|
|
330
339
|
links aligned beneath them. Deeper groups expand on click or keyboard activation;
|
|
331
340
|
the current group and its ancestors start open. Groups can have a parent-page
|
|
@@ -492,7 +501,7 @@ sub-elements:
|
|
|
492
501
|
| `Banner` | `Link` |
|
|
493
502
|
| `SkipLink` | `Focus` |
|
|
494
503
|
| `Search` | `Status`, `Dialog`, `CloseIcon`, `OpenDialog`, `Backdrop`, `Frame`, `Container`, `Close`, `HoverClose`, `ActiveClose` |
|
|
495
|
-
| `Pagination` | `Link`, `NextLink`, `NextIcon`, `NextLabel`, `HoverLink`, `ActiveLink`, `Title`, `LoneNextLink`, `
|
|
504
|
+
| `Pagination` | `Link`, `PreviousLink`, `NextLink`, `NextIcon`, `NextLabel`, `HoverLink`, `ActiveLink`, `Title`, `LoneNextLink`, `Icon`, `PreviousIconRtl`, `NextIconRtl` |
|
|
496
505
|
| `Markdown` | `Block`, `BlockSpacing`, `HeadingSpacing`, `List`, `CompactItem`, `ListItem`, `DefinitionTerm`, `DefinitionDescription`, `Link`, `HoverLink`, `Quote`, `Rule`, `Details`, `HoverDetails`, `Summary`, `OpenSummary`, `SummaryMarker`, `SummaryIcon`, `OpenSummaryIcon`, `Code` |
|
|
497
506
|
| `MermaidSource` | None |
|
|
498
507
|
| `StarlightAside` | `Note`, `Tip`, `Caution`, `Danger`, `Title`, `Icon`, `FirstContent` |
|
|
@@ -665,6 +674,7 @@ separately for square artwork; the default Cookbook icon set remains in place
|
|
|
665
674
|
until changed. `Logo` remains available as the standalone Cookbook book mark.
|
|
666
675
|
|
|
667
676
|
The built-in mark uses `theme.palette["logo-surface"]` and `theme.palette["logo-mark"]`.
|
|
677
|
+
The default homepage hero artwork also uses `logo-surface` for its brand fill.
|
|
668
678
|
Both default to Glaze `mode: "fixed"`: the brand background and light book keep
|
|
669
679
|
their polarity in dark mode while respecting Glaze's tone boundaries and
|
|
670
680
|
high-contrast settings. The mark-to-background contrast floor is 3:1 normally
|
|
@@ -1108,7 +1118,7 @@ directly to Tasty `#name` tokens. `COOKBOOK_PALETTE_NAMES`, exported from
|
|
|
1108
1118
|
| Area | Roles |
|
|
1109
1119
|
| ------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
1110
1120
|
| Surfaces | `surface`, `header`, `overlay`, `surface-2`, `surface-3`, `surface-2-hover`, `surface-2-pressed`, `surface-3-hover`, `surface-3-pressed` |
|
|
1111
|
-
| Reading | `text`, `heading`, `text-soft` (alias `textSoft`), `text-muted`
|
|
1121
|
+
| Reading | `text`, `heading`, `text-soft` (alias `textSoft`), `text-muted`, `sidebar-text` |
|
|
1112
1122
|
| Brand and focus | `accent-text`, `accent-surface`, `accent-surface-text`, `accent-surface-subtle`, `accent-surface-2-subtle`, `logo-surface`, `logo-mark`, `focus` |
|
|
1113
1123
|
| Borders and effects | `border`, `border-strong`, `shadow`, `clear` |
|
|
1114
1124
|
| Status | `info`, `success`, `warning`, `danger`, each with `-text` and `-surface` variants |
|
|
@@ -1134,9 +1144,10 @@ backgrounds, typography, or layout.
|
|
|
1134
1144
|
A `DOCS_SEMANTIC_CONTRAST_UNMET` or `DOCS_BRAND_CONTRAST_UNMET` error names the
|
|
1135
1145
|
pair, mode, and required target. Adjust that pair's `theme.palette` declarations:
|
|
1136
1146
|
use an absolute tone for reading text, reduce saturation when needed, and keep
|
|
1137
|
-
`autoFlip` enabled when the solver needs to cross its base.
|
|
1138
|
-
|
|
1139
|
-
|
|
1147
|
+
`autoFlip` enabled when the solver needs to cross its base. Cookbook's default
|
|
1148
|
+
fixed brand fill is anchored to a light label and darkens when needed to meet
|
|
1149
|
+
contrast, including for orange, yellow, and pale brands. A custom fixed
|
|
1150
|
+
middle-tone fill can make its label's contrast impossible.
|
|
1140
1151
|
Focus uses a WCAG 3:1 floor (4.5:1 in high contrast) against the surface ramp.
|
|
1141
1152
|
|
|
1142
1153
|
Keep contrast requirements when adjusting colors. Extreme custom tone windows,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tenphi/cookbook",
|
|
3
|
-
"version": "0.18.
|
|
3
|
+
"version": "0.18.2",
|
|
4
4
|
"description": "Repository-native static documentation for Astro",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"keywords": [
|
|
@@ -68,8 +68,8 @@
|
|
|
68
68
|
"author": "Andrey Yamanov",
|
|
69
69
|
"license": "MIT",
|
|
70
70
|
"dependencies": {
|
|
71
|
-
"@tenphi/docs": "0.18.
|
|
72
|
-
"@tenphi/starlight": "0.18.
|
|
71
|
+
"@tenphi/docs": "0.18.2",
|
|
72
|
+
"@tenphi/starlight": "0.18.2"
|
|
73
73
|
},
|
|
74
74
|
"peerDependencies": {
|
|
75
75
|
"astro": "^7.3.2"
|