@vectoriox/iox-ui 5.197.0 → 5.198.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 (47) hide show
  1. package/composite-core/index.d.ts +16 -2
  2. package/design-core/index.d.ts +160 -28
  3. package/fesm2022/vectoriox-iox-ui-composite-core.mjs +34 -2
  4. package/fesm2022/vectoriox-iox-ui-composite-core.mjs.map +1 -1
  5. package/fesm2022/vectoriox-iox-ui-design-core.mjs +259 -72
  6. package/fesm2022/vectoriox-iox-ui-design-core.mjs.map +1 -1
  7. package/fesm2022/vectoriox-iox-ui-generation-core.mjs +1845 -396
  8. package/fesm2022/vectoriox-iox-ui-generation-core.mjs.map +1 -1
  9. package/fesm2022/vectoriox-iox-ui.mjs +2 -2
  10. package/fesm2022/vectoriox-iox-ui.mjs.map +1 -1
  11. package/generation-core/index.d.ts +1286 -184
  12. package/package.json +1 -1
  13. package/src/composite-core/header.ts +34 -1
  14. package/src/design-core/brand.ts +58 -5
  15. package/src/design-core/contrast-audit.ts +49 -22
  16. package/src/design-core/design-apply.ts +34 -3
  17. package/src/design-core/flavor-fixtures.generated.ts +123 -123
  18. package/src/design-core/flavor-spec.generated.ts +44 -4
  19. package/src/design-core/flavor-tokens.ts +1 -1
  20. package/src/design-core/header-behaviour.ts +72 -13
  21. package/src/design-core/motion-language.ts +5 -14
  22. package/src/design-core/preloader.ts +4 -5
  23. package/src/generation-core/body-mix.ts +40 -102
  24. package/src/generation-core/check-free.ts +5 -2
  25. package/src/generation-core/check-layout.ts +10 -4
  26. package/src/generation-core/check-list.ts +3 -25
  27. package/src/generation-core/colour-mix.ts +296 -0
  28. package/src/generation-core/compose-free.ts +40 -18
  29. package/src/generation-core/compose-site.ts +92 -13
  30. package/src/generation-core/footer-mix.ts +102 -54
  31. package/src/generation-core/free-fallback.ts +6 -4
  32. package/src/generation-core/free-parts.ts +87 -0
  33. package/src/generation-core/free-slot-words.ts +30 -0
  34. package/src/generation-core/generation-tier.ts +6 -17
  35. package/src/generation-core/header-mix.ts +42 -1
  36. package/src/generation-core/layout-drawers.ts +3 -2
  37. package/src/generation-core/layout-wire.ts +10 -16
  38. package/src/generation-core/list-panel.ts +3 -3
  39. package/src/generation-core/list-table.ts +5 -14
  40. package/src/generation-core/list-words.ts +2 -1
  41. package/src/generation-core/opening-mix.ts +7 -34
  42. package/src/generation-core/part-tier.ts +14 -0
  43. package/src/generation-core/plan-wire.ts +31 -43
  44. package/src/generation-core/public-api.ts +2 -0
  45. package/src/generation-core/site-spec.generated.ts +1127 -93
  46. package/src/generation-core/validate-site-plan.ts +4 -5
  47. package/styles/iox-design.css +137 -3
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vectoriox/iox-ui",
3
- "version": "5.197.0",
3
+ "version": "5.198.0",
4
4
  "peerDependencies": {
5
5
  "@angular/common": ">=20.0.0",
6
6
  "@angular/core": ">=20.0.0",
@@ -1,4 +1,4 @@
1
- import { HeaderBehaviour, HeaderEdge, headerBehaviourOf, headerEdgeOf, HeaderGround, headerGroundOf, HeaderInk, headerInkOf, headerStaysAtTop, HeaderTrait } from '@vectoriox/iox-ui/design-core';
1
+ import { HeaderBehaviour, HeaderBrand, headerBrandOf, HeaderEdge, headerBehaviourOf, headerEdgeOf, HeaderGround, headerGroundOf, HeaderInk, headerInkOf, HeaderShape, headerShapeFloats, headerShapeOf, headerStaysAtTop, HeaderTrait } from '@vectoriox/iox-ui/design-core';
2
2
 
3
3
  import { CompositeNode, readProp, readStyle, writeProp, writeStyles } from './composite-node';
4
4
 
@@ -62,3 +62,36 @@ export function setHeaderGround(node: CompositeNode, ground: HeaderGround | `${H
62
62
  export function headerGroundOfNode(node: CompositeNode | null | undefined): HeaderGround {
63
63
  return headerGroundOf(node ? readProp(node, HeaderTrait.Ground) : undefined);
64
64
  }
65
+
66
+ /**
67
+ * The header's outline (HI3 slice 2: bar · pill · islands) — ONE edit for the Header studio ▸ Bar and the composer. `bar`
68
+ * clears a stored word and writes nothing on a header that never had one (R-H4). A floating header draws its ground on
69
+ * the ground layer, so like a ground it is the containing block of it: a stored `static` becomes `relative`. False when
70
+ * nothing changed.
71
+ */
72
+ export function setHeaderShape(node: CompositeNode, shape: HeaderShape | `${HeaderShape}`): boolean {
73
+ const want = headerShapeOf(shape);
74
+ if (headerShapeOf(readProp(node, HeaderTrait.Shape)) === want) return false;
75
+ const changed = writeProp(node, HeaderTrait.Shape, want === HeaderShape.Bar ? '' : want);
76
+ const position = readStyle(node, 'position');
77
+ if (headerShapeFloats(want) && (position === undefined || position === null || position === '' || position === 'static')) writeStyles(node, { position: 'relative' });
78
+ return changed;
79
+ }
80
+
81
+ /** The header's outline as stored (Bar for a header that never chose). */
82
+ export function headerShapeOfNode(node: CompositeNode | null | undefined): HeaderShape {
83
+ return headerShapeOf(node ? readProp(node, HeaderTrait.Shape) : undefined);
84
+ }
85
+
86
+ /** How the header's name sits (HI3 slice 2: fits · hangs · later) — ONE edit for the studio and the composer; `fits`
87
+ * clears a stored word (R-H4). False when nothing changed. */
88
+ export function setHeaderBrand(node: CompositeNode, brand: HeaderBrand | `${HeaderBrand}`): boolean {
89
+ const want = headerBrandOf(brand);
90
+ if (headerBrandOf(readProp(node, HeaderTrait.Brand)) === want) return false;
91
+ return writeProp(node, HeaderTrait.Brand, want === HeaderBrand.Fits ? '' : want);
92
+ }
93
+
94
+ /** The header's brand as stored (Fits for a header that never chose). */
95
+ export function headerBrandOfNode(node: CompositeNode | null | undefined): HeaderBrand {
96
+ return headerBrandOf(node ? readProp(node, HeaderTrait.Brand) : undefined);
97
+ }
@@ -256,12 +256,64 @@ const passesText = (fg: string, bg: AccentGround) => groundList(bg).every(g => w
256
256
  const bestInkHex = (bg: string) =>
257
257
  (wcagContrastRatio(WHITE_HEX, bg) >= wcagContrastRatio(BLACK_HEX, bg) ? WHITE_HEX : BLACK_HEX);
258
258
 
259
+ /** How `deriveAccentTokens` derives. */
260
+ export interface AccentDerivationOptions {
261
+ /** CV-D1: the light accent is the seed itself (default). `false`: brand-500 with its ink and the next step as hover —
262
+ * what the contract wrote before colour v2 CV1, kept ONLY to recognise rows a machine wrote then (`legacyFlavorTokens`,
263
+ * `preKeptSeedDesignTokenRows`). */
264
+ keepSeed?: boolean;
265
+ }
266
+
267
+ /** CV-D1 (colour-v2-plan.md): the accent's hover sits at least this much OKLab L away from the kept accent (away from its ink). */
268
+ export const KEPT_HOVER_DL = 0.06;
269
+ /** CV-D1: how far the hover may walk on (0.02 a step) to keep the brand band's surfaces readable. */
270
+ export const KEPT_HOVER_DL_MAX = 0.3;
271
+ /**
272
+ * CV-D1: the strongest ink tint the contract lays on a Brand band's surface. Inside the accent scheme `surface` IS the
273
+ * accent's hover and the ink is the band's words (the contract's SCHEMES.accent); Bloom's secondary button is
274
+ * `color-mix(accent 22%, surface)` there — the ink mixed 22% into the hover. The hover keeps the ink at AA under it.
275
+ */
276
+ export const BAND_SURFACE_INK_TINT = 0.22;
277
+
278
+ const mixSrgb = (a: Rgb, b: Rgb, share: number): Rgb =>
279
+ ({ r: a.r * share + b.r * (1 - share), g: a.g * share + b.g * (1 - share), b: a.b * share + b.b * (1 - share) });
280
+
281
+ /**
282
+ * CV-D1 (colour-v2-plan.md §2 cause 1, §5a): the light accent IS the brand colour — a navy stays navy, a berry stays
283
+ * berry (it used to be brand-500 at L 0.62: a pastel with a black label). On every sRGB colour the better of a white and a
284
+ * black label reads at least √21 ≈ 4.58:1, so the seed always carries one (R-H-CV1). `ink` is that label. `hover` walks
285
+ * away from the ink (white ink: darker; black ink: lighter) at the seed's hue and chroma, from `KEPT_HOVER_DL` in 0.02
286
+ * steps, until the ink reads on it even with `BAND_SURFACE_INK_TINT` of the ink mixed in (the hover is the Brand band's
287
+ * surface); never past `KEPT_HOVER_DL_MAX`. Mirror of the contract's colour.mjs `keptAccent` (derivationFixtures hold
288
+ * them equal).
289
+ */
290
+ export function keptAccent(seed: string): { accent: string; ink: string; hover: string } {
291
+ const own = parseHexColor(seed);
292
+ if (!own) throw new TypeError(`keptAccent: not a colour: "${seed}"`);
293
+ const lab = rgbToOklab(own);
294
+ const chroma = Math.hypot(lab.a, lab.b);
295
+ const ua = chroma > 1e-6 ? lab.a : 0.0, ub = chroma > 1e-6 ? lab.b : 1e-6;
296
+ const ink = wcagContrastRatio(WHITE, own) >= wcagContrastRatio(BLACK, own) ? WHITE : BLACK;
297
+ const away = ink === WHITE ? -1 : 1;
298
+ const tinted = (c: Rgb) => mixSrgb(ink, c, BAND_SURFACE_INK_TINT);
299
+ // judged on the float mix and on the hex it rounds to, whichever is lower (the audit and a browser may round either way)
300
+ const reads = (c: Rgb) => wcagContrastRatio(ink, c) >= WCAG_AA_TEXT
301
+ && Math.min(wcagContrastRatio(ink, tinted(c)), wcagContrastRatio(ink, quant(tinted(c)))) >= WCAG_AA_TEXT;
302
+ let hover: Rgb | null = null;
303
+ for (let i = 0; !hover; i++) {
304
+ const dl = Math.min(KEPT_HOVER_DL + i * 0.02, KEPT_HOVER_DL_MAX);
305
+ const c = quant(atLightness(Math.min(1, Math.max(0, lab.L + away * dl)), ua, ub, chroma));
306
+ if (reads(c) || dl >= KEPT_HOVER_DL_MAX) hover = c;
307
+ }
308
+ return { accent: toHexColor(own), ink: toHexColor(ink), hover: toHexColor(wcagContrastRatio(ink, hover) >= WCAG_AA_TEXT ? hover : own) };
309
+ }
310
+
259
311
  /**
260
312
  * The quartet a seed different from the pack's own becomes, built ON `deriveBrandTokens` (its
261
313
  * ramp and its WCAG-gated `brandInk`) — never a second colour model:
262
314
  *
263
- * - `accent` = brand-500 (already nudged until `brandInk` clears 4.5:1 on it), `accent-ink` = brandInk
264
- * - `accent-hover` = the neighbouring step AWAY from the ink, so ink-on-hover only gains contrast
315
+ * - `accent` = the seed itself (CV-D1, `keptAccent`), `accent-ink` = the label that reads on it
316
+ * - `accent-hover` = `KEPT_HOVER_DL` away from the ink, so ink-on-hover only gains contrast
265
317
  * - `accent-text` = the first step from 500 toward the far end that clears 4.5:1 on `bg`
266
318
  * - dark: the first of brand-300/200/400 an ink clears 4.5:1 on, the same hover rule, and
267
319
  * `accent-text` = the first light step that clears 4.5:1 on `bgDark`
@@ -278,6 +330,7 @@ export function deriveAccentTokens(
278
330
  seed: string,
279
331
  against: AccentBackgrounds,
280
332
  pack: Pick<FlavorPack, 'accentHueDeg'> = {},
333
+ options: AccentDerivationOptions = {},
281
334
  ): FlavorTokenDef[] {
282
335
  const derived = deriveBrandTokens(seed, pack);
283
336
  const hexOf = (name: string) => derived.find(t => t.name === name)!.value;
@@ -291,10 +344,10 @@ export function deriveAccentTokens(
291
344
  const firstOn = (steps: number[], bg: AccentGround) => step(steps.find(n => passesText(step(n), bg)) ?? steps[steps.length - 1]);
292
345
 
293
346
  const ink = hexOf('brandInk');
347
+ // CV-D1: the light accent is the seed itself; words keep the ramp's text step. (`ink` — the ramp's brandInk — still
348
+ // decides the inverse accent's label below, as before.)
294
349
  const light = {
295
- accent: step(500),
296
- ink,
297
- hover: hoverFor(500, ink),
350
+ ...(options.keepSeed === false ? { accent: step(500), ink, hover: hoverFor(500, ink) } : keptAccent(seed)),
298
351
  text: firstOn([500, 600, 700, 800, 900], against.bg),
299
352
  };
300
353
 
@@ -384,37 +384,64 @@ export function colourTabChecks(rows: ReadonlyArray<DesignTokenLike>, mode: Reso
384
384
 
385
385
  // ── Floating grounds (HI3 slice 1, R-H16, vectoriox/iox-ui#173) ──────────────────────────────────────────────────────
386
386
 
387
- interface FloatingGround { readonly ground: string; readonly ink: string; }
387
+ /** Where a floating ground's ink is read: `header` = inside the header's ink scope (vectoriox/iox-ui#173 a). */
388
+ export enum FloatingInkScope { Header = 'header' }
389
+ export interface FloatingGround { readonly ground: string; readonly ink: string; readonly scope?: FloatingInkScope | string; }
390
+ /** What the header re-declares for its words (the contract's `contrastAudit.headerInkScope`; iox-design.css, verbatim). */
391
+ export interface HeaderInkScope { readonly selectors: ReadonlyArray<string>; readonly set: Readonly<Record<string, string>>; }
392
+ const AUDIT_TABLES = SPEC_CONTRAST_AUDIT as unknown as { floatingGrounds?: ReadonlyArray<FloatingGround>; headerInkScope?: HeaderInkScope };
388
393
  /** The translucent grounds that carry words over ANYTHING (the header's bar and glass while the page moves under them, the
389
394
  * bottom bar, a dialog, a popover, the strong glass) — the contract's table (`contrastAudit.floatingGrounds`). */
390
- const FLOATING_GROUNDS: ReadonlyArray<FloatingGround> =
391
- (SPEC_CONTRAST_AUDIT as unknown as { floatingGrounds?: ReadonlyArray<FloatingGround> }).floatingGrounds ?? [];
395
+ const FLOATING_GROUNDS: ReadonlyArray<FloatingGround> = AUDIT_TABLES.floatingGrounds ?? [];
396
+ /** The contract's header ink scope — null on a contract generated before vectoriox/iox-ui#173 (a). */
397
+ export const HEADER_INK_SCOPE: HeaderInkScope | null = AUDIT_TABLES.headerInkScope ?? null;
398
+ const CURRENT_COLOR = 'currentcolor';
399
+ const INHERITED_INK = 'text';
400
+
401
+ /**
402
+ * An ink's value as the words on a floating ground wear it — the contract's `floatingInk`, 1:1. A header ground's ink is
403
+ * read INSIDE the header's ink scope: `currentColor` is the bar's own ink (`text` — the bar is `color: inherit`), a token
404
+ * reference reads that token, anything else is the value itself. Outside a scope the ink is the token's own value.
405
+ */
406
+ export function floatingInkValue(values: Readonly<Record<string, string>>, ink: string, scope?: string, header: HeaderInkScope | null = HEADER_INK_SCOPE): string | undefined {
407
+ const set = scope === FloatingInkScope.Header ? header?.set[ink] : undefined;
408
+ if (set === undefined) return values[ink];
409
+ if (set.trim().toLowerCase() === CURRENT_COLOR) return values[INHERITED_INK];
410
+ const ref = /^var\(--iox-([\w-]+)\)$/.exec(set.trim());
411
+ return ref ? values[ref[1]] : set;
412
+ }
392
413
  const BLACK: Rgba = { r: 0, g: 0, b: 0, a: 1 };
393
414
  /** The two backdrops that bound every picture: each channel of a blend is monotone in its backdrop's. */
394
415
  export const FLOATING_BACKDROPS: Readonly<Record<string, Rgba>> = Object.freeze({ black: BLACK, white: WHITE });
395
416
 
396
417
  /**
397
- * HI3 slice 1 (R-H16): each translucent ground's words over pure black AND pure white, in the page's own scheme (the one a
398
- * header on a ground and a top-layer dialog wear), in one mode — nothing a blur can lay under the bar is darker or
399
- * lighter, so a ground that holds AA over both holds it over any picture (iox-ui#173: the Glass look's bar dropped to
400
- * 3.55:1 over a light picture in dark mode). An opaque ground is not judged here (the DS9 audit judges it where it stands).
401
- * The contract's gate, 1:1 (build-spec `floatingGroundFailures`).
418
+ * HI3 slice 1 (R-H16): each translucent ground's words over pure black AND pure white, in EVERY section scheme (the page's
419
+ * own, and any an author dresses the header or a dialog in — vectoriox/iox-ui#174), in one mode — nothing a blur can lay
420
+ * under the bar is darker or lighter, so a ground that holds AA over both holds it over any picture (iox-ui#173: the Glass
421
+ * look's bar dropped to 3.55:1 over a light picture in dark mode). An opaque ground is not judged here (the DS9 audit
422
+ * judges it where it stands). The contract's gate, 1:1 (build-spec `floatingGroundFailures`).
402
423
  */
403
- export function floatingGroundFindings(rows: ReadonlyArray<DesignTokenLike>, mode: ResolvedMode): ContrastFinding[] {
404
- const values = schemeTokenResolver(rows, mode)(DEFAULT_SCHEME);
424
+ export function floatingGroundFindings(
425
+ rows: ReadonlyArray<DesignTokenLike>, mode: ResolvedMode,
426
+ table: ReadonlyArray<FloatingGround> = FLOATING_GROUNDS, header: HeaderInkScope | null = HEADER_INK_SCOPE,
427
+ ): ContrastFinding[] {
428
+ const valuesIn = schemeTokenResolver(rows, mode);
405
429
  const out: ContrastFinding[] = [];
406
- for (const { ground, ink } of FLOATING_GROUNDS) {
407
- const fg = parseCssColour(values[ink]);
408
- const bg = parseCssColour(values[ground], fg);
409
- if (!fg || !bg || bg.a >= 1) continue;
410
- const fgHex = toHexColor(quantizeRgb(fg));
411
- for (const [name, under] of Object.entries(FLOATING_BACKDROPS)) {
412
- const shown = quantizeRgb(compositeOver(bg, under));
413
- const ratio = wcagContrastRatio(fgHex, shown);
414
- out.push({
415
- scheme: DEFAULT_SCHEME, container: `over ${name}`, element: ground, part: ink, fg: fgHex, bg: toHexColor(shown),
416
- ratio: Math.round(ratio * 100) / 100, min: WCAG_AA_TEXT, pass: ratio >= WCAG_AA_TEXT - 1e-9,
417
- });
430
+ for (const scheme of SCHEME_IDS) {
431
+ const values = valuesIn(scheme);
432
+ for (const { ground, ink, scope } of table) {
433
+ const fg = parseCssColour(floatingInkValue(values, ink, scope, header));
434
+ const bg = parseCssColour(values[ground], fg);
435
+ if (!fg || !bg || bg.a >= 1) continue;
436
+ const fgHex = toHexColor(quantizeRgb(fg));
437
+ for (const [name, under] of Object.entries(FLOATING_BACKDROPS)) {
438
+ const shown = quantizeRgb(compositeOver(bg, under));
439
+ const ratio = wcagContrastRatio(fgHex, shown);
440
+ out.push({
441
+ scheme, container: `over ${name}`, element: ground, part: ink, fg: fgHex, bg: toHexColor(shown),
442
+ ratio: Math.round(ratio * 100) / 100, min: WCAG_AA_TEXT, pass: ratio >= WCAG_AA_TEXT - 1e-9,
443
+ });
444
+ }
418
445
  }
419
446
  }
420
447
  return out;
@@ -1,4 +1,4 @@
1
- import { deriveBrandTokens } from './brand';
1
+ import { deriveAccentTokens, deriveBrandTokens } from './brand';
2
2
  import { FLAVOR_SPEC_VERSION, SPEC_LEGACY_ALIASES } from './flavor-spec.generated';
3
3
  import { SWISS_FLAVOR } from './flavor';
4
4
  import { buildFlavorTokens, legacyFlavorTokens } from './flavor-tokens';
@@ -36,6 +36,29 @@ export function legacyDesignTokenRows(choices: DesignChoices): DesignTokenRow[]
36
36
  return pack ? legacyFlavorTokens(pack, { ...choices, flavorId: pack.id }) : [];
37
37
  }
38
38
 
39
+ /** The accent rows colour v2 CV1 (CV-D1) changed: in light mode the accent is the seed itself now. */
40
+ const KEPT_SEED_ROWS: ReadonlyArray<string> = ['accent', 'accent-ink', 'accent-hover'];
41
+
42
+ /**
43
+ * What a design wrote BEFORE colour v2 CV1 (guidance 8f61581, CV-D1): today's rows, but a seed ≠ the pack's own wore
44
+ * brand-500 (L 0.62, a pastel with a black label) as its light accent, ink and hover. Those three do not depend on the
45
+ * grounds, so only their light values differ; the dark values and every other row are today's. A studio whose rows a
46
+ * machine wrote then is healed to the kept seed on the builder's load (`designTokenRepairs`) and by its next Apply
47
+ * (`designBaseline`); a row the author edited is kept. Empty for an unknown pack.
48
+ */
49
+ export function preKeptSeedDesignTokenRows(choices: DesignChoices): DesignTokenRow[] {
50
+ const rows = designTokenRows(choices);
51
+ const pack = flavorPackById(choices.flavorId);
52
+ if (!pack || !choices.seed || choices.seed.toLowerCase() === pack.seed.toLowerCase()) return rows;
53
+ let old: ReadonlyArray<{ name: string; value: string }>;
54
+ try { old = deriveAccentTokens(choices.seed, { bg: [] }, {}, { keepSeed: false }); } catch { return rows; }
55
+ for (const row of rows) {
56
+ const was = KEPT_SEED_ROWS.includes(row.name) ? old.find(t => t.name === row.name) : undefined;
57
+ if (was) row.value = was.value.toUpperCase();
58
+ }
59
+ return rows;
60
+ }
61
+
39
62
  /** What the F1/F2 Swiss seeding wrote: the four Swiss rows + the brand set derived from its seed. */
40
63
  function swissExpectations(seed: string | null): Map<string, SeedExpectation> {
41
64
  const rows: Array<Pick<DesignTokenRow, 'name' | 'value' | 'values'>> =
@@ -69,6 +92,10 @@ function packDefaultsLookup(): (packId: string) => ReadonlyArray<Map<string, See
69
92
  * - guidance `39135c7` (no underlines, Doron 2026-11-22): a link and a ghost (text) button draw no line — Linen's ghost
70
93
  * button and every look's link were seeded `underline`, the current page's link a 2px accent line (vectoriox/iox-ui#118:
71
94
  * idos and the store kept underlined text buttons from the stored row).
95
+ * - vectoriox/iox-ui#173 (b), decided 2026-11-28 — no migration: the Glass bar stood on `surface-glass` (3.55:1 over a
96
+ * light picture in dark mode; HI3 slice 1 moved it to `surface-glass-strong`), and the Glass tab bar on
97
+ * `surface-glass-strong` (3.74–4.19:1; #174 gave it its own 92% ground). A Glass studio applied before either kept the
98
+ * old ground (iox-test-fresh's J10 sites, 2026-11-28); the next Apply or builder load heals it.
72
99
  * A spec pins every entry as no flavor's current value. Add one with every contract change of a seeded token's value.
73
100
  */
74
101
  export const SUPERSEDED_TOKEN_VALUES: Readonly<Record<string, ReadonlyArray<string>>> = {
@@ -77,6 +104,8 @@ export const SUPERSEDED_TOKEN_VALUES: Readonly<Record<string, ReadonlyArray<stri
77
104
  'button-ghost-decoration': ['underline'],
78
105
  'link-decoration': ['underline'],
79
106
  'link-current-decoration': ['underline 2px var(--iox-accent-text)'],
107
+ 'nav-bg': ['var(--iox-surface-glass)'],
108
+ 'tabbar-bg': ['var(--iox-surface-glass-strong)'],
80
109
  };
81
110
 
82
111
  const supersededOf = (name: string): SeedExpectation[] => (SUPERSEDED_TOKEN_VALUES[name] ?? []).map(value => ({ value }));
@@ -110,13 +139,14 @@ export function designBaseline(previous: StoredDesign): SeedBaseline {
110
139
  const wrote = retired ? packDesignChoices(previous.choices.flavorId) : previous.choices;
111
140
  const current = expectations(designTokenRows(wrote));
112
141
  const beforeTint = expectations(legacyDesignTokenRows(wrote));
142
+ const beforeKeptSeed = expectations(preKeptSeedDesignTokenRows(wrote));
113
143
  const swiss = swissExpectations(retired ? previous.storedSeed : null);
114
144
  const packDefaults = packDefaultsLookup();
115
145
  return (row: StoredDesignTokenRow) => {
116
146
  const stampedBy = SEED_STAMP.exec(row.source ?? '')?.[1];
117
147
  if (stampedBy === SWISS_FLAVOR.id) return swiss.get(row.name);
118
148
  const ownDefaults = stampedBy ? packDefaults(stampedBy).map(m => m.get(row.name)) : [];
119
- const expected = [current.get(row.name), beforeTint.get(row.name), ...ownDefaults];
149
+ const expected = [current.get(row.name), beforeTint.get(row.name), beforeKeptSeed.get(row.name), ...ownDefaults];
120
150
  return present([...expected, ...expected.map(e => beforeScriptPartners(row.name, e)), ...(stampedBy ? supersededOf(row.name) : [])]);
121
151
  };
122
152
  }
@@ -246,6 +276,7 @@ export function designTokenRepairs(existing: ReadonlyArray<StoredDesignTokenRow>
246
276
  const stamp = flavorSourceStamp(pack.id);
247
277
  const desired = new Map(designTokenRows(choices).map(r => [r.name, r]));
248
278
  const beforeTint = expectations(legacyDesignTokenRows(choices));
279
+ const beforeKeptSeed = expectations(preKeptSeedDesignTokenRows(choices));
249
280
  const packDefaults = packDefaultsLookup();
250
281
  const out: FlavorSeedPlan['update'] = [];
251
282
  for (const row of existing ?? []) {
@@ -256,7 +287,7 @@ export function designTokenRepairs(existing: ReadonlyArray<StoredDesignTokenRow>
256
287
  const darkOnly = row.source === stamp && row.value === want.value;
257
288
  const machineWrote = present([
258
289
  ...(stampedBy ? packDefaults(stampedBy).map(m => m.get(row.name)) : []),
259
- ...(stampedBy === pack.id ? [beforeTint.get(row.name), beforeScriptPartners(row.name, want), beforeScriptPartners(row.name, beforeTint.get(row.name))] : []),
290
+ ...(stampedBy === pack.id ? [beforeTint.get(row.name), beforeKeptSeed.get(row.name), beforeScriptPartners(row.name, want), beforeScriptPartners(row.name, beforeTint.get(row.name))] : []),
260
291
  ...(stampedBy ? supersededOf(row.name) : []),
261
292
  ]);
262
293
  if (!darkOnly && !untouchedSeedRow(row, machineWrote)) continue;