@motion-proto/live-tokens 0.40.1 → 0.42.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.
- package/CHANGELOG.md +160 -0
- package/dist-plugin/{chunk-D77VD4Z6.js → chunk-H4TRUINI.js} +102 -13
- package/dist-plugin/index.cjs +288 -67
- package/dist-plugin/index.js +171 -55
- package/dist-plugin/tokensCssMigrations/index.cjs +102 -13
- package/dist-plugin/tokensCssMigrations/index.js +1 -1
- package/package.json +3 -2
- package/src/app/site.css +97 -20
- package/src/editor/core/palettes/colorHarmony.ts +182 -0
- package/src/editor/core/palettes/contrast.ts +128 -0
- package/src/editor/core/palettes/oklch.ts +8 -0
- package/src/editor/core/palettes/paletteDerivation.ts +267 -72
- package/src/editor/core/palettes/recommendText.ts +216 -0
- package/src/editor/core/palettes/solveTextContrast.ts +251 -0
- package/src/editor/core/store/editorCore.ts +2 -1
- package/src/editor/core/store/editorPersistence.ts +28 -1
- package/src/editor/core/store/editorStore.ts +21 -1
- package/src/editor/core/store/editorTypes.ts +4 -0
- package/src/editor/core/store/editorViewStore.ts +7 -3
- package/src/editor/core/themes/migrations/2026-06-05-palette-unification.ts +11 -9
- package/src/editor/core/themes/migrations/2026-07-21-palette-oklch-basis.ts +51 -0
- package/src/editor/core/themes/migrations/2026-07-24-base-anchor-placement.ts +37 -0
- package/src/editor/core/themes/migrations/2026-07-25-background-spot-to-base.ts +40 -0
- package/src/editor/core/themes/migrations/2026-07-29-background-palette-to-canvas.ts +41 -0
- package/src/editor/core/themes/migrations/2026-07-29-place-base-anchors.ts +29 -0
- package/src/editor/core/themes/themeTypes.ts +18 -3
- package/src/editor/docs/CodeBlock.svelte +1 -1
- package/src/editor/docs/Docs.svelte +30 -13
- package/src/editor/pages/EditorShell.svelte +31 -3
- package/src/editor/ui/ColorEditPanel.svelte +22 -16
- package/src/editor/ui/EditorViewSwitcher.svelte +43 -9
- package/src/editor/ui/FontStackEditor.svelte +0 -1
- package/src/editor/ui/PaletteEditor.svelte +117 -155
- package/src/editor/ui/ProjectFontsSection.svelte +0 -3
- package/src/editor/ui/TextStylesSection.svelte +173 -0
- package/src/editor/ui/UILineHeightSelector.svelte +6 -5
- package/src/editor/ui/UIPaletteSelector.svelte +6 -1
- package/src/editor/ui/UITextTransformSelector.svelte +106 -0
- package/src/editor/ui/VariablesTab.svelte +23 -10
- package/src/editor/ui/colors/ColorReadouts.svelte +123 -0
- package/src/editor/ui/colors/ColorStory.svelte +375 -0
- package/src/editor/ui/colors/ColorWheel.svelte +740 -0
- package/src/editor/ui/colors/ColorsTab.svelte +530 -0
- package/src/editor/ui/colors/HarmonyAxesList.svelte +320 -0
- package/src/editor/ui/colors/LightnessBar.svelte +261 -0
- package/src/editor/ui/colors/PaletteStepStrip.svelte +142 -0
- package/src/editor/ui/colors/colorWheelMath.ts +9 -0
- package/src/editor/ui/colors/harmony-icons/analogous.svg +13 -0
- package/src/editor/ui/colors/harmony-icons/complementary.svg +10 -0
- package/src/editor/ui/colors/harmony-icons/compound.svg +15 -0
- package/src/editor/ui/colors/harmony-icons/custom.svg +10 -0
- package/src/editor/ui/colors/harmony-icons/monochromatic.svg +11 -0
- package/src/editor/ui/colors/harmony-icons/shades.svg +9 -0
- package/src/editor/ui/colors/harmony-icons/split-complementary.svg +13 -0
- package/src/editor/ui/colors/harmony-icons/square.svg +13 -0
- package/src/editor/ui/colors/harmony-icons/tetradic.svg +15 -0
- package/src/editor/ui/colors/harmony-icons/triadic.svg +13 -0
- package/src/editor/ui/colors/harmonyModeIcons.ts +23 -0
- package/src/editor/ui/colors/paletteBaseColor.ts +214 -0
- package/src/editor/ui/index.ts +0 -1
- package/src/editor/ui/palette/OverridesPanel.svelte +6 -3
- package/src/editor/ui/palette/PaletteBase.svelte +16 -8
- package/src/editor/ui/palette/dockMagnify.ts +22 -0
- package/src/editor/ui/palette/paletteEditorState.ts +5 -4
- package/src/editor/ui/palette/paletteMath.ts +93 -181
- package/src/editor/ui/sections/textStyles.ts +82 -0
- package/src/editor/ui/sections/tokenScales.ts +3 -3
- package/src/live-tokens/data/themes/default.json +4 -4
- package/src/live-tokens/data/tokens.generated.css +96 -95
- package/src/system/components/Badge.svelte +11 -11
- package/src/system/components/Button.svelte +7 -7
- package/src/system/components/Callout.svelte +8 -8
- package/src/system/components/Card.svelte +2 -2
- package/src/system/components/CodeSnippet.svelte +1 -1
- package/src/system/components/CollapsibleSection.svelte +7 -7
- package/src/system/components/CornerBadge.svelte +1 -1
- package/src/system/components/Dialog.svelte +2 -2
- package/src/system/components/FloatingTokenTags.css +5 -4
- package/src/system/components/Input.svelte +6 -6
- package/src/system/components/MenuSelect.svelte +4 -4
- package/src/system/components/Notification.svelte +8 -8
- package/src/system/components/ProgressBar.svelte +2 -2
- package/src/system/components/RadioButton.svelte +4 -4
- package/src/system/components/SectionDivider.svelte +6 -6
- package/src/system/components/SegmentedControl.svelte +5 -5
- package/src/system/components/SideNavigation.svelte +12 -12
- package/src/system/components/TabBar.svelte +4 -4
- package/src/system/components/Table.svelte +2 -2
- package/src/system/components/Tooltip.svelte +1 -1
- package/src/system/styles/tokens.css +59 -6
- package/src/editor/ui/TextTab.svelte +0 -203
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,165 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.42.0 — Canvas, and every ramp places its base color
|
|
4
|
+
|
|
5
|
+
### Changed (breaking)
|
|
6
|
+
|
|
7
|
+
- **The "Background" palette family is renamed to "Canvas".** Its CSS namespace
|
|
8
|
+
was always `canvas` (`--color-canvas-*`, `--surface-canvas-*`), and every other
|
|
9
|
+
surface that names the family already said Canvas: the token selector,
|
|
10
|
+
SectionDivider's variant families, the shadows backdrop picker. Only the
|
|
11
|
+
palette label said Background, so the label joins the namespace. **No token
|
|
12
|
+
names change**, so consumer CSS is unaffected. The label doubles as a storage
|
|
13
|
+
key, so theme migration `2026-07-29-background-palette-to-canvas` renames the
|
|
14
|
+
`editorConfigs` key and any `harmonyAxes` family binding. It applies
|
|
15
|
+
automatically both when a theme file loads and when a persisted editor session
|
|
16
|
+
hydrates, and it runs before the axes are sanitized, which would otherwise drop
|
|
17
|
+
the now-ineligible family and silently unbind the axis. The shipped
|
|
18
|
+
`default.json` is rewritten under the new key.
|
|
19
|
+
|
|
20
|
+
### Added
|
|
21
|
+
|
|
22
|
+
- **The Colors view's swatch rows read as ramps.** Both rows (core families and
|
|
23
|
+
functional families) order their swatches by base-color luminance, light to
|
|
24
|
+
dark, matching the palette ramps. The selected swatch dock-magnifies through
|
|
25
|
+
the same `dockGrow` policy the palette grid and the derived-scale strip already
|
|
26
|
+
share, and it animates to its new position as its lightness is dialed, so the
|
|
27
|
+
selection is legible while it walks the row.
|
|
28
|
+
|
|
29
|
+
### Removed
|
|
30
|
+
|
|
31
|
+
- `Theme.harmonyOrder` and its migration path. The field only ever existed
|
|
32
|
+
between v0.40.1 and v0.41.0, superseded by `harmonyAxes` inside the same
|
|
33
|
+
release cycle, so nothing on disk carries it: a 0.41.0-saved theme wrote both
|
|
34
|
+
fields and `harmonyAxes` was already authoritative on load. Themes with
|
|
35
|
+
neither field still resolve to the default axes, with the unbound Quaternary
|
|
36
|
+
offset from the anchor's own hue.
|
|
37
|
+
|
|
38
|
+
### Fixed
|
|
39
|
+
|
|
40
|
+
- **Palette ramps now show the enlarged slot for the step the base color sits
|
|
41
|
+
at.** The dock magnification keys off `anchorPlacement`, which the July 24
|
|
42
|
+
migration only wrote for configs carrying the legacy locked-500 curve anchor;
|
|
43
|
+
a palette whose `anchorToBase` was on but never re-edited had no placement, so
|
|
44
|
+
its ramp never magnified anything. Theme migration
|
|
45
|
+
`2026-07-29-place-base-anchors` places those configs up front by pinning the
|
|
46
|
+
base color at the step whose curve lightness is nearest the base L, the same
|
|
47
|
+
thing a base-color edit has always done. It applies on theme load and on
|
|
48
|
+
session hydrate, skips configs that are already placed or have `anchorToBase`
|
|
49
|
+
off, and self-sunsets once every theme has been resaved with a placement.
|
|
50
|
+
|
|
51
|
+
### Migration
|
|
52
|
+
|
|
53
|
+
- Both migrations in this release are **theme-file migrations**: they run
|
|
54
|
+
automatically when a theme loads and when a persisted editor session hydrates.
|
|
55
|
+
No token names changed, so `tokens.css` is untouched and there is nothing for
|
|
56
|
+
`npx live-tokens migrate` to do. Consumers upgrade by bumping the dependency.
|
|
57
|
+
|
|
58
|
+
## 0.41.0 — A Colors view, and semantic text styles
|
|
59
|
+
|
|
60
|
+
### Added
|
|
61
|
+
|
|
62
|
+
- **Colors: a third editor view, next to Tokens and Components.** It has two
|
|
63
|
+
sections. **Wheel** is a saturation-radial harmony wheel where every color
|
|
64
|
+
family that participates in harmony sits on a rail, with external rotation
|
|
65
|
+
handles per family plus one global rotation handle, a lightness bar under the
|
|
66
|
+
wheel, and an Absolute Chroma toggle that governs whether radius reads as
|
|
67
|
+
absolute or relative chroma. Nine harmony modes (complementary,
|
|
68
|
+
split-complementary, triadic, tetradic, compound, square, analogous,
|
|
69
|
+
monochromatic, custom) are picked from a row of geometry icons that draw the
|
|
70
|
+
mode's actual axis layout. Two one-shot actions sit alongside: "Tint neutrals
|
|
71
|
+
from anchor" re-hues Neutral and Alternate to the anchor color while keeping
|
|
72
|
+
their own chroma and lightness, and "Derive accessible text" solves each
|
|
73
|
+
family's Text lightness curve so the derived text clears WCAG AA against the
|
|
74
|
+
surfaces it sits on. Both are a single undo.
|
|
75
|
+
- **Color Story: a proportional preview of the theme, built from seeds.** It
|
|
76
|
+
paints the seed base colors in their intended proportions rather than the
|
|
77
|
+
derived `--surface-*` tokens, so it tracks the wheel one-to-one, and it renders
|
|
78
|
+
the neutral text ladder (primary / secondary / tertiary) on each band with live
|
|
79
|
+
contrast readouts.
|
|
80
|
+
- **Suggested neutral text hierarchy.** Color Story proposes a text ladder
|
|
81
|
+
anchored on the current primary, deriving secondary and tertiary as two even
|
|
82
|
+
OKLCH-lightness drops toward the background: hierarchy first, with AA (4.5) as
|
|
83
|
+
a floor rather than the driver. The floor is solved against the adverse extreme
|
|
84
|
+
of the neutral surface band, so a compliant suggestion holds AA on every band
|
|
85
|
+
surface; when the seed's reachable lightness window cannot span the band, it
|
|
86
|
+
falls back to the default surface and reports the reduced coverage. Coverage
|
|
87
|
+
alerts are informational and never block. "Use suggested" writes the Neutral
|
|
88
|
+
Text curve; "Use black and white" is available as the blunt alternative.
|
|
89
|
+
- **Harmony runs on four fixed axes.** Anchor, Secondary, Tertiary and
|
|
90
|
+
Quaternary each own a hue whether or not a family is bound to them, and a new
|
|
91
|
+
Harmony axes list binds and unbinds families per axis. Neutral and Alternate
|
|
92
|
+
join Brand, Accent, Background and Special in the harmony-eligible pool.
|
|
93
|
+
Harmony rotates hue only: each palette keeps its own chroma and lightness.
|
|
94
|
+
- **Semantic text styles: a role layer over the type primitives.** Eight named
|
|
95
|
+
style bundles ship in `tokens.css` (`heading-xl/lg/md/sm`, `body-md/sm`,
|
|
96
|
+
`code`, `eyebrow`), each a set of per-axis aliases (`--heading-xl-font-family`,
|
|
97
|
+
`--heading-xl-font-size`, `-font-weight`, `-line-height`, `-letter-spacing`,
|
|
98
|
+
plus `--eyebrow-text-transform`). Every value aliases an existing primitive
|
|
99
|
+
scale, so editing a style re-points an alias rather than minting a raw value,
|
|
100
|
+
and the responsive size shrink carries through for free. Additive migration
|
|
101
|
+
`2026-07-20-semantic-text-styles` (`kind: 'additive'`) inserts the bundle block
|
|
102
|
+
into a consumer's vendored `tokens.css`.
|
|
103
|
+
- **Text Styles table in the editor.** Tokens → Typography gains a row per style
|
|
104
|
+
with pickers for family, size, weight, line-height and letter-spacing, plus a
|
|
105
|
+
text-transform picker on `eyebrow`, the one style that carries that axis.
|
|
106
|
+
`site.css` and the first-party surfaces consume the style layer instead of
|
|
107
|
+
re-declaring the same per-element type rules.
|
|
108
|
+
|
|
109
|
+
### Changed (breaking)
|
|
110
|
+
|
|
111
|
+
- **The line-height scale is reshaped from size vocabulary to leading
|
|
112
|
+
vocabulary.** `--line-height-xs/sm/md/lg/xl` become
|
|
113
|
+
`--line-height-none/tightest/tighter/tight/normal/relaxed`
|
|
114
|
+
(1, 1.1, 1.25, 1.35, 1.5, 1.75). Old values map by ratio: `xs`→`none`,
|
|
115
|
+
`sm`→`tighter`, `md`→`normal`, `lg`→`relaxed`; `xl` (2) has no slot in the new
|
|
116
|
+
scale and is dropped. Line-height now names by effect, matching the
|
|
117
|
+
letter-spacing scale. Token names are public API, so this ships with the paired
|
|
118
|
+
migration `2026-07-20-line-height-rename` (`kind: 'breaking'`); a consumer
|
|
119
|
+
applies it via `npx live-tokens migrate`, which rewrites their vendored
|
|
120
|
+
`tokens.css` declarations and every `var()` reference.
|
|
121
|
+
- **Palette state is numeric OKLCH, not hex.** `PaletteConfig.baseColor` and
|
|
122
|
+
`overrides` change from hex strings to `{ l, c, h }`. The store holds the
|
|
123
|
+
user's unclamped intent and gamut clamping becomes projection-only, applied at
|
|
124
|
+
derivation output, canvas painting and CSS serialization. This removes the
|
|
125
|
+
hex round-trip that made wheel and slider gestures wobble. Theme migration
|
|
126
|
+
`2026-07-21-palette-oklch-basis` converts saved themes on load.
|
|
127
|
+
- **The base-color anchor can sit at any step.** The old "lock base color to
|
|
128
|
+
position 500" flag becomes `anchorPlacement`, which records the step it pins
|
|
129
|
+
and remembers the anchor it displaced, so moving or releasing the placement
|
|
130
|
+
restores what was there. Theme migration `2026-07-24-base-anchor-placement`
|
|
131
|
+
adopts the legacy locked-500 anchor.
|
|
132
|
+
- **The solid page background is the Background base color.** It used to be a
|
|
133
|
+
separately selected palette step (`emptyStep`), which is removed. Theme
|
|
134
|
+
migration `2026-07-25-background-spot-to-base` adopts the color the old spot
|
|
135
|
+
actually rendered, curves and overrides included, so a saved theme's page
|
|
136
|
+
renders identically. Gradient-mode configs are untouched.
|
|
137
|
+
- **`Theme.harmonyOrder` is superseded by `Theme.harmonyAxes`.** The old field is
|
|
138
|
+
still read when `harmonyAxes` is absent, and still written on save so older
|
|
139
|
+
builds keep loading the file.
|
|
140
|
+
- **Token names are otherwise unchanged.** The palette changes above are theme
|
|
141
|
+
schema changes, not `tokens.css` migrations, and every theme migration applies
|
|
142
|
+
automatically when a theme loads.
|
|
143
|
+
|
|
144
|
+
### Removed
|
|
145
|
+
|
|
146
|
+
- `TextTab` (`src/editor/ui/TextTab.svelte`) and its re-export. It was never
|
|
147
|
+
mounted; the Text Styles table supersedes it.
|
|
148
|
+
|
|
149
|
+
### Fixed
|
|
150
|
+
|
|
151
|
+
- The `2026-07-20-semantic-text-styles` migration set `--body-sm-line-height` to
|
|
152
|
+
`--line-height-normal` while the package default is `--line-height-tight`. A
|
|
153
|
+
migrating consumer now lands on the same value as a fresh install.
|
|
154
|
+
- Vitest snapshots (`**/__snapshots__/**`) are excluded from the published
|
|
155
|
+
tarball.
|
|
156
|
+
|
|
157
|
+
### Migration
|
|
158
|
+
|
|
159
|
+
- Run `npx live-tokens migrate` to apply the two `tokens.css` migrations. The
|
|
160
|
+
line-height rename is `breaking` and never auto-applies, so it rides that
|
|
161
|
+
explicit command. Both are idempotent.
|
|
162
|
+
|
|
3
163
|
## 0.40.1 — Floating token-tag labels follow the theme
|
|
4
164
|
|
|
5
165
|
### Fixed
|
|
@@ -107,20 +107,9 @@ function escapeRe(s) {
|
|
|
107
107
|
var tokensCssMigration_2026_05_29_typographyScaleAdditions = {
|
|
108
108
|
id: "2026-05-29-typography-scale-additions",
|
|
109
109
|
kind: "additive",
|
|
110
|
-
description: "Add --
|
|
110
|
+
description: "Add --letter-spacing-* and --ease-out-quart scales",
|
|
111
111
|
apply(css) {
|
|
112
112
|
let out = css;
|
|
113
|
-
out = ensureScale(out, {
|
|
114
|
-
sectionComment: "Line height (t-shirt scale)",
|
|
115
|
-
anchorPrefixes: ["--line-height-", "--font-size-", "--font-weight-", "--font-"],
|
|
116
|
-
entries: [
|
|
117
|
-
{ name: "--line-height-xs", value: "1" },
|
|
118
|
-
{ name: "--line-height-sm", value: "1.25" },
|
|
119
|
-
{ name: "--line-height-md", value: "1.5" },
|
|
120
|
-
{ name: "--line-height-lg", value: "1.75" },
|
|
121
|
-
{ name: "--line-height-xl", value: "2" }
|
|
122
|
-
]
|
|
123
|
-
});
|
|
124
113
|
out = ensureScale(out, {
|
|
125
114
|
sectionComment: "Letter spacing",
|
|
126
115
|
anchorPrefixes: ["--letter-spacing-", "--line-height-", "--font-size-", "--font-"],
|
|
@@ -263,6 +252,104 @@ var tokensCssMigration_2026_06_04_easingColorAndTypescaleAdditions = {
|
|
|
263
252
|
}
|
|
264
253
|
};
|
|
265
254
|
|
|
255
|
+
// vite-plugin/tokensCssMigrations/migrations/2026-07-20-line-height-rename.ts
|
|
256
|
+
var RENAMES = [
|
|
257
|
+
["--line-height-xs", "--line-height-none"],
|
|
258
|
+
["--line-height-sm", "--line-height-tighter"],
|
|
259
|
+
["--line-height-md", "--line-height-normal"],
|
|
260
|
+
["--line-height-lg", "--line-height-relaxed"]
|
|
261
|
+
];
|
|
262
|
+
var SCALE = [
|
|
263
|
+
{ name: "--line-height-none", value: "1" },
|
|
264
|
+
{ name: "--line-height-tightest", value: "1.1" },
|
|
265
|
+
{ name: "--line-height-tighter", value: "1.25" },
|
|
266
|
+
{ name: "--line-height-tight", value: "1.35" },
|
|
267
|
+
{ name: "--line-height-normal", value: "1.5" },
|
|
268
|
+
{ name: "--line-height-relaxed", value: "1.75" }
|
|
269
|
+
];
|
|
270
|
+
var tokensCssMigration_2026_07_20_lineHeightRename = {
|
|
271
|
+
id: "2026-07-20-line-height-rename",
|
|
272
|
+
kind: "breaking",
|
|
273
|
+
description: "Reshape --line-height-{xs..xl} to leading vocabulary (none/tightest/tighter/tight/normal/relaxed); retire the 2.0 slot",
|
|
274
|
+
apply(css) {
|
|
275
|
+
let out = css;
|
|
276
|
+
for (const [oldName, newName] of RENAMES) out = renameToken(out, oldName, newName);
|
|
277
|
+
out = removeToken(out, "--line-height-xl");
|
|
278
|
+
out = ensureScale(out, {
|
|
279
|
+
anchorPrefixes: ["--line-height-", "--font-size-", "--font-weight-", "--font-"],
|
|
280
|
+
entries: SCALE
|
|
281
|
+
});
|
|
282
|
+
return out;
|
|
283
|
+
}
|
|
284
|
+
};
|
|
285
|
+
|
|
286
|
+
// vite-plugin/tokensCssMigrations/migrations/2026-07-20-semantic-text-styles.ts
|
|
287
|
+
var BUNDLE = [
|
|
288
|
+
{ name: "--heading-xl-font-family", value: "var(--font-display)" },
|
|
289
|
+
{ name: "--heading-xl-font-size", value: "var(--font-size-4xl)" },
|
|
290
|
+
{ name: "--heading-xl-font-weight", value: "var(--font-weight-semibold)" },
|
|
291
|
+
{ name: "--heading-xl-line-height", value: "var(--line-height-tightest)" },
|
|
292
|
+
{ name: "--heading-xl-letter-spacing", value: "var(--letter-spacing-normal)" },
|
|
293
|
+
{ name: "--heading-lg-font-family", value: "var(--font-display)" },
|
|
294
|
+
{ name: "--heading-lg-font-size", value: "var(--font-size-2xl)" },
|
|
295
|
+
{ name: "--heading-lg-font-weight", value: "var(--font-weight-semibold)" },
|
|
296
|
+
{ name: "--heading-lg-line-height", value: "var(--line-height-tightest)" },
|
|
297
|
+
{ name: "--heading-lg-letter-spacing", value: "var(--letter-spacing-normal)" },
|
|
298
|
+
{ name: "--heading-md-font-family", value: "var(--font-display)" },
|
|
299
|
+
{ name: "--heading-md-font-size", value: "var(--font-size-xl)" },
|
|
300
|
+
{ name: "--heading-md-font-weight", value: "var(--font-weight-semibold)" },
|
|
301
|
+
{ name: "--heading-md-line-height", value: "var(--line-height-tighter)" },
|
|
302
|
+
{ name: "--heading-md-letter-spacing", value: "var(--letter-spacing-normal)" },
|
|
303
|
+
{ name: "--heading-sm-font-family", value: "var(--font-sans)" },
|
|
304
|
+
{ name: "--heading-sm-font-size", value: "var(--font-size-lg)" },
|
|
305
|
+
{ name: "--heading-sm-font-weight", value: "var(--font-weight-semibold)" },
|
|
306
|
+
{ name: "--heading-sm-line-height", value: "var(--line-height-tighter)" },
|
|
307
|
+
{ name: "--heading-sm-letter-spacing", value: "var(--letter-spacing-normal)" },
|
|
308
|
+
{ name: "--body-md-font-family", value: "var(--font-sans)" },
|
|
309
|
+
{ name: "--body-md-font-size", value: "var(--font-size-md)" },
|
|
310
|
+
{ name: "--body-md-font-weight", value: "var(--font-weight-normal)" },
|
|
311
|
+
{ name: "--body-md-line-height", value: "var(--line-height-normal)" },
|
|
312
|
+
{ name: "--body-md-letter-spacing", value: "var(--letter-spacing-normal)" },
|
|
313
|
+
{ name: "--body-sm-font-family", value: "var(--font-sans)" },
|
|
314
|
+
{ name: "--body-sm-font-size", value: "var(--font-size-sm)" },
|
|
315
|
+
{ name: "--body-sm-font-weight", value: "var(--font-weight-normal)" },
|
|
316
|
+
{ name: "--body-sm-line-height", value: "var(--line-height-tight)" },
|
|
317
|
+
{ name: "--body-sm-letter-spacing", value: "var(--letter-spacing-normal)" },
|
|
318
|
+
{ name: "--code-font-family", value: "var(--font-mono)" },
|
|
319
|
+
{ name: "--code-font-size", value: "var(--font-size-sm)" },
|
|
320
|
+
{ name: "--code-font-weight", value: "var(--font-weight-normal)" },
|
|
321
|
+
{ name: "--code-line-height", value: "var(--line-height-normal)" },
|
|
322
|
+
{ name: "--code-letter-spacing", value: "var(--letter-spacing-normal)" },
|
|
323
|
+
{ name: "--eyebrow-font-family", value: "var(--font-sans)" },
|
|
324
|
+
{ name: "--eyebrow-font-size", value: "var(--font-size-sm)" },
|
|
325
|
+
{ name: "--eyebrow-font-weight", value: "var(--font-weight-normal)" },
|
|
326
|
+
{ name: "--eyebrow-line-height", value: "var(--line-height-normal)" },
|
|
327
|
+
{ name: "--eyebrow-letter-spacing", value: "var(--letter-spacing-normal)" },
|
|
328
|
+
{ name: "--eyebrow-text-transform", value: "none" }
|
|
329
|
+
];
|
|
330
|
+
var tokensCssMigration_2026_07_20_semanticTextStyles = {
|
|
331
|
+
id: "2026-07-20-semantic-text-styles",
|
|
332
|
+
kind: "additive",
|
|
333
|
+
description: "Add the semantic text-style bundles (--heading-*/--body-*/--code-*/--eyebrow-*)",
|
|
334
|
+
apply(css) {
|
|
335
|
+
return ensureScale(css, {
|
|
336
|
+
sectionComment: "Text styles \u2014 semantic typography roles",
|
|
337
|
+
anchorPrefixes: [
|
|
338
|
+
"--eyebrow-",
|
|
339
|
+
"--code-",
|
|
340
|
+
"--body-",
|
|
341
|
+
"--heading-",
|
|
342
|
+
"--letter-spacing-",
|
|
343
|
+
"--line-height-",
|
|
344
|
+
"--font-weight-",
|
|
345
|
+
"--font-size-",
|
|
346
|
+
"--font-"
|
|
347
|
+
],
|
|
348
|
+
entries: BUNDLE
|
|
349
|
+
});
|
|
350
|
+
}
|
|
351
|
+
};
|
|
352
|
+
|
|
266
353
|
// vite-plugin/files/dataPaths.ts
|
|
267
354
|
import fs from "fs";
|
|
268
355
|
import path from "path";
|
|
@@ -315,7 +402,9 @@ var TOKENS_CSS_MIGRATIONS = [
|
|
|
315
402
|
tokensCssMigration_2026_05_29_sectiondividerLegacyAxisCleanup,
|
|
316
403
|
tokensCssMigration_2026_06_03_transformScaleAdditions,
|
|
317
404
|
tokensCssMigration_2026_06_04_removeDeadSizeIconScale,
|
|
318
|
-
tokensCssMigration_2026_06_04_easingColorAndTypescaleAdditions
|
|
405
|
+
tokensCssMigration_2026_06_04_easingColorAndTypescaleAdditions,
|
|
406
|
+
tokensCssMigration_2026_07_20_lineHeightRename,
|
|
407
|
+
tokensCssMigration_2026_07_20_semanticTextStyles
|
|
319
408
|
];
|
|
320
409
|
function runTokensCssMigrations(css) {
|
|
321
410
|
return foldMigrations(css, () => true);
|