@vectoriox/iox-ui 5.197.0 → 5.199.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 (73) hide show
  1. package/actions-core/index.d.ts +7 -1
  2. package/composite-core/index.d.ts +16 -2
  3. package/data-core/index.d.ts +11 -3
  4. package/design-core/index.d.ts +185 -28
  5. package/fesm2022/vectoriox-iox-ui-actions-core.mjs +6 -1
  6. package/fesm2022/vectoriox-iox-ui-actions-core.mjs.map +1 -1
  7. package/fesm2022/vectoriox-iox-ui-composite-core.mjs +34 -2
  8. package/fesm2022/vectoriox-iox-ui-composite-core.mjs.map +1 -1
  9. package/fesm2022/vectoriox-iox-ui-data-core.mjs +30 -4
  10. package/fesm2022/vectoriox-iox-ui-data-core.mjs.map +1 -1
  11. package/fesm2022/vectoriox-iox-ui-design-core.mjs +323 -72
  12. package/fesm2022/vectoriox-iox-ui-design-core.mjs.map +1 -1
  13. package/fesm2022/vectoriox-iox-ui-generation-core.mjs +17351 -15175
  14. package/fesm2022/vectoriox-iox-ui-generation-core.mjs.map +1 -1
  15. package/fesm2022/vectoriox-iox-ui-harness-core.mjs +243 -38
  16. package/fesm2022/vectoriox-iox-ui-harness-core.mjs.map +1 -1
  17. package/fesm2022/vectoriox-iox-ui.mjs +2 -2
  18. package/fesm2022/vectoriox-iox-ui.mjs.map +1 -1
  19. package/generation-core/index.d.ts +1703 -264
  20. package/harness-core/index.d.ts +93 -6
  21. package/package.json +1 -1
  22. package/src/actions-core/element-actions.ts +6 -0
  23. package/src/composite-core/header.ts +34 -1
  24. package/src/data-core/placeholder-rows.ts +29 -4
  25. package/src/design-core/brand.ts +58 -5
  26. package/src/design-core/contrast-audit.ts +49 -22
  27. package/src/design-core/design-apply.ts +34 -3
  28. package/src/design-core/flavor-fixtures.generated.ts +123 -123
  29. package/src/design-core/flavor-spec.generated.ts +44 -4
  30. package/src/design-core/flavor-tokens.ts +1 -1
  31. package/src/design-core/header-behaviour.ts +72 -13
  32. package/src/design-core/menu-look.ts +23 -0
  33. package/src/design-core/motion-language.ts +5 -14
  34. package/src/design-core/node-classes.ts +39 -0
  35. package/src/design-core/preloader.ts +4 -5
  36. package/src/generation-core/body-mix.ts +40 -102
  37. package/src/generation-core/check-free.ts +22 -11
  38. package/src/generation-core/check-layout.ts +10 -4
  39. package/src/generation-core/check-list.ts +3 -25
  40. package/src/generation-core/colour-mix.ts +296 -0
  41. package/src/generation-core/compose-free.ts +47 -20
  42. package/src/generation-core/compose-site.ts +259 -59
  43. package/src/generation-core/footer-mix.ts +258 -64
  44. package/src/generation-core/free-fallback.ts +6 -4
  45. package/src/generation-core/free-opening.ts +13 -2
  46. package/src/generation-core/free-parts.ts +87 -0
  47. package/src/generation-core/free-slot-words.ts +30 -0
  48. package/src/generation-core/free-wire.ts +8 -0
  49. package/src/generation-core/generation-tier.ts +6 -17
  50. package/src/generation-core/header-mix.ts +73 -3
  51. package/src/generation-core/layout-drawers.ts +3 -2
  52. package/src/generation-core/layout-wire.ts +10 -16
  53. package/src/generation-core/legal.ts +24 -0
  54. package/src/generation-core/list-panel.ts +3 -3
  55. package/src/generation-core/list-table.ts +5 -14
  56. package/src/generation-core/list-words.ts +2 -1
  57. package/src/generation-core/menu-shelves.ts +138 -0
  58. package/src/generation-core/nav-shape.ts +138 -15
  59. package/src/generation-core/node-baselines.generated.ts +1 -0
  60. package/src/generation-core/opening-mix.ts +7 -34
  61. package/src/generation-core/part-tier.ts +14 -0
  62. package/src/generation-core/patterns.ts +7 -0
  63. package/src/generation-core/plan-wire.ts +32 -43
  64. package/src/generation-core/public-api.ts +3 -0
  65. package/src/generation-core/site-build-run.ts +8 -0
  66. package/src/generation-core/site-plan.model.ts +3 -0
  67. package/src/generation-core/site-spec.generated.ts +1383 -189
  68. package/src/generation-core/validate-site-plan.ts +6 -5
  69. package/src/harness-core/business-types.ts +4 -0
  70. package/src/harness-core/harness-spec.generated.ts +189 -30
  71. package/src/harness-core/popup-stance.ts +56 -3
  72. package/src/harness-core/run-compose-context.ts +25 -5
  73. package/styles/iox-design.css +162 -3
@@ -4099,6 +4099,7 @@ export const SPEC_SCHEMES = {
4099
4099
  "section-bg": "{{accent}}",
4100
4100
  "bg": "{{accent}}",
4101
4101
  "nav-bg": "{{accent}}",
4102
+ "nav-glass-bg": "{{accent}}",
4102
4103
  "surface": "{{accent-hover}}",
4103
4104
  "surface-2": "{{accent-hover}}",
4104
4105
  "surface-glass": "{{accent-hover}}",
@@ -4126,6 +4127,7 @@ export const SPEC_SCHEMES = {
4126
4127
  "section-bg": "{{text-muted}}",
4127
4128
  "bg": "{{text-muted}}",
4128
4129
  "nav-bg": "{{text-muted}}",
4130
+ "nav-glass-bg": "{{text-muted}}",
4129
4131
  "surface": "{{text-muted}}",
4130
4132
  "surface-2": "{{text-muted}}",
4131
4133
  "surface-glass": "{{text-muted}}",
@@ -6219,11 +6221,33 @@ export const SPEC_CONTRAST_AUDIT = {
6219
6221
  "floatingGrounds": [
6220
6222
  {
6221
6223
  "ground": "nav-bg",
6222
- "ink": "text"
6224
+ "ink": "text",
6225
+ "scope": "header"
6226
+ },
6227
+ {
6228
+ "ground": "nav-bg",
6229
+ "ink": "link-color",
6230
+ "scope": "header"
6231
+ },
6232
+ {
6233
+ "ground": "nav-bg",
6234
+ "ink": "link-current-color",
6235
+ "scope": "header"
6223
6236
  },
6224
6237
  {
6225
6238
  "ground": "nav-glass-bg",
6226
- "ink": "text"
6239
+ "ink": "text",
6240
+ "scope": "header"
6241
+ },
6242
+ {
6243
+ "ground": "nav-glass-bg",
6244
+ "ink": "link-color",
6245
+ "scope": "header"
6246
+ },
6247
+ {
6248
+ "ground": "nav-glass-bg",
6249
+ "ink": "link-current-color",
6250
+ "scope": "header"
6227
6251
  },
6228
6252
  {
6229
6253
  "ground": "dialog-bg",
@@ -6236,8 +6260,24 @@ export const SPEC_CONTRAST_AUDIT = {
6236
6260
  {
6237
6261
  "ground": "surface-glass-strong",
6238
6262
  "ink": "text"
6263
+ },
6264
+ {
6265
+ "ground": "tabbar-bg",
6266
+ "ink": "tabbar-item-ink"
6239
6267
  }
6240
- ]
6268
+ ],
6269
+ "headerInkScope": {
6270
+ "selectors": [
6271
+ ".iox-es-nav > *",
6272
+ "[data-iox-header] > *"
6273
+ ],
6274
+ "set": {
6275
+ "link-color": "currentColor",
6276
+ "link-current-color": "currentColor",
6277
+ "link-hover-color": "var(--iox-accent-text)",
6278
+ "button-ghost-ink": "currentColor"
6279
+ }
6280
+ }
6241
6281
  } as const;
6242
6282
 
6243
6283
  export const SPEC_LEGACY_ALIASES = {
@@ -15582,7 +15622,7 @@ export const SPEC_FLAVOR_PACKS = [
15582
15622
  "tier": "component",
15583
15623
  "type": "color",
15584
15624
  "group": "components",
15585
- "value": "var(--iox-surface-glass-strong)",
15625
+ "value": "color-mix(in srgb, var(--iox-surface) 92%, transparent)",
15586
15626
  "overridden": true
15587
15627
  },
15588
15628
  {
@@ -148,7 +148,7 @@ export function legacyFlavorTokens(pack: FlavorPackV2, choices: DesignChoices):
148
148
  else delete row.values;
149
149
  }
150
150
  if (choices.seed && choices.seed.toLowerCase() !== pack.seed.toLowerCase()) {
151
- for (const accent of deriveAccentTokens(choices.seed, preTintAccentGrounds(pack.palette))) {
151
+ for (const accent of deriveAccentTokens(choices.seed, preTintAccentGrounds(pack.palette), {}, { keepSeed: false })) {
152
152
  const row = byName.get(accent.name);
153
153
  if (!row) continue;
154
154
  row.value = accent.value;
@@ -39,6 +39,10 @@ export enum HeaderTrait {
39
39
  /** HI3 slice 1 (HI3-D1): what the header stands on — `glass` | `over` | `over-glass`. Absent / `solid`: its own ground,
40
40
  * as before. Written by the Header studio ▸ Around the bar and the composer (`ground:<word>`). */
41
41
  Ground = 'headerGround',
42
+ /** HI3 slice 2 (HI3-D16/D18): its outline — `pill` | `islands`. Absent / `bar`: a full-width bar, as before. */
43
+ Shape = 'headerShape',
44
+ /** HI3 slice 2 (HI3-D21/D22): how its name sits — `hangs` | `later`. Absent / `fits`: the name fits the bar. */
45
+ Brand = 'headerBrand',
42
46
  }
43
47
 
44
48
  /** Whose colours the header wears (contract HEADER `ink`): the page's opening, or every section as it passes under it. */
@@ -61,6 +65,11 @@ export enum HeaderAttribute {
61
65
  * CSS draws the ground on ONE `::before` faded by opacity, gives the bar's height back over a pictured opening and
62
66
  * lays the veil under its words at rest. Absent: the bar's own ground, as before. */
63
67
  Ground = 'data-iox-header-ground',
68
+ /** `pill` | `islands` on a header that floats (HI3 slice 2): the shared CSS draws its ground as one inset bar, or one
69
+ * pill per part, from the top. Absent: a full-width bar. */
70
+ Shape = 'data-iox-header-shape',
71
+ /** `hangs` | `later` (HI3 slice 2): a logo taller than the bar, or a name that arrives once the page moves. */
72
+ Brand = 'data-iox-header-brand',
64
73
  }
65
74
 
66
75
  /** What a composed header gets (the `nav.*` patterns' `header`, the palette's Navigation bar). */
@@ -93,19 +102,67 @@ export function headerInkOf(value: unknown): HeaderInk {
93
102
  }
94
103
 
95
104
  /** The attributes a header renders, from its trait values — `{}` for a header that keeps today's behaviour. A header on
96
- * glass draws no scroll edge (HI3-D9: its set carries its own hairline and shadow), whatever edge it stores. */
97
- export function headerAttributes(behaviour: unknown, edge: unknown, ink?: unknown, ground?: unknown): Record<string, string> {
105
+ * glass draws no scroll edge (HI3-D9: its set carries its own hairline and shadow), whatever edge it stores; nor does a
106
+ * floating one (HI3-D20: a pill has no edge under it). A floating header on `over` floats on the look's glass from the
107
+ * top (HI3-D17: never a clear pill), so it writes `over-glass`. */
108
+ export function headerAttributes(behaviour: unknown, edge: unknown, ink?: unknown, ground?: unknown, shape?: unknown, brand?: unknown): Record<string, string> {
98
109
  const out: Record<string, string> = {};
99
110
  if (headerInkOf(ink) === HeaderInk.Follows) out[HeaderAttribute.Ink] = HeaderInk.Follows;
100
111
  const b = headerBehaviourOf(behaviour);
101
112
  if (b !== HeaderBehaviour.Scrolls) out[HeaderAttribute.Behaviour] = b;
102
- const g = headerGroundOf(ground);
103
- if (g !== HeaderGround.Solid) out[HeaderAttribute.Ground] = g;
113
+ const sh = headerShapeOf(shape);
114
+ const floats = sh !== HeaderShape.Bar;
115
+ const stood = headerGroundOf(ground);
116
+ const g = floats && stood === HeaderGround.Over ? HeaderGround.OverGlass : stood;
117
+ // A floating header always draws its ground on the ground layer — a solid one too (`solid`: the look's own bar).
118
+ if (g !== HeaderGround.Solid || floats) out[HeaderAttribute.Ground] = g;
119
+ if (floats) out[HeaderAttribute.Shape] = sh;
120
+ const br = headerBrandOf(brand);
121
+ if (br !== HeaderBrand.Fits) out[HeaderAttribute.Brand] = br;
104
122
  const e = headerEdgeOf(edge);
105
- if (e && !headerGroundIsGlass(g)) out[HeaderAttribute.Edge] = e;
123
+ if (e && !headerGroundIsGlass(g) && !floats) out[HeaderAttribute.Edge] = e;
106
124
  return out;
107
125
  }
108
126
 
127
+ // ── Its outline and its name (HI3 slice 2: pill · islands · hangs · later, board hi3-shapes) ──────────────────────────
128
+
129
+ /** The header's outline (contract HEADER `shape`). */
130
+ export enum HeaderShape {
131
+ /** A full-width bar (every header before HI3 slice 2). */
132
+ Bar = 'bar',
133
+ /** One floating bar inset from the window, as wide as the content column, its corner the look's button corner. */
134
+ Pill = 'pill',
135
+ /** Each part of the bar (the name, the pages, the action) a floating pill of its own. */
136
+ Islands = 'islands',
137
+ }
138
+
139
+ /** How the header's name sits (contract HEADER `brand`). */
140
+ export enum HeaderBrand {
141
+ Fits = 'fits',
142
+ /** A logo picture taller than the bar, breaking its lower edge (only with a logo picture). */
143
+ Hangs = 'hangs',
144
+ /** No name at the top of the opening (which names the business); it arrives once the page moves or a menu opens. */
145
+ Later = 'later',
146
+ }
147
+
148
+ const SHAPES = new Set<string>(Object.values(HeaderShape));
149
+ const BRANDS = new Set<string>(Object.values(HeaderBrand));
150
+
151
+ /** A stored shape, or Bar for anything else. */
152
+ export function headerShapeOf(value: unknown): HeaderShape {
153
+ return typeof value === 'string' && SHAPES.has(value) ? value as HeaderShape : HeaderShape.Bar;
154
+ }
155
+
156
+ /** A stored brand, or Fits for anything else. */
157
+ export function headerBrandOf(value: unknown): HeaderBrand {
158
+ return typeof value === 'string' && BRANDS.has(value) ? value as HeaderBrand : HeaderBrand.Fits;
159
+ }
160
+
161
+ /** True for a shape that floats (pill, islands): its ground shows from the top, and it has no scroll edge. */
162
+ export function headerShapeFloats(shape: unknown): boolean {
163
+ return headerShapeOf(shape) !== HeaderShape.Bar;
164
+ }
165
+
109
166
  // ── What the header stands on (HI3 slice 1: over · over-glass · glass) ───────────────────────────────────────────────
110
167
 
111
168
  /**
@@ -223,15 +280,16 @@ export interface HeaderMoment {
223
280
  * shared CSS draws it through `HEADER_AT_REST_SELECTOR` (held equal to this by header-behaviour.spec), the canvas's
224
281
  * "At the top · Scrolled" pair asks it. Pure.
225
282
  */
226
- export function headerFirm(ground: unknown, moment: HeaderMoment = {}): boolean {
227
- if (!headerGroundIsOver(ground)) return true;
283
+ export function headerFirm(ground: unknown, moment: HeaderMoment = {}, shape?: unknown): boolean {
284
+ // HI3-D17: a floating shape wears its ground from the top — never a clear pill over the picture.
285
+ if (!headerGroundIsOver(ground) || headerShapeFloats(shape)) return true;
228
286
  return !(moment.openingMedia === OpeningMediaKind.Picture && !moment.scrolled && !moment.menuOpen);
229
287
  }
230
288
 
231
- /** Whether the header gives its height back to the page (HI3-D7): it does not stand on its own solid ground, over a page
232
- * that opens on a picture — the picture starts at the top of the page, under the bar. */
233
- export function headerGivesBack(ground: unknown, openingMedia: unknown): boolean {
234
- return headerGroundOf(ground) !== HeaderGround.Solid && openingMedia === OpeningMediaKind.Picture;
289
+ /** Whether the header gives its height back to the page (HI3-D7): it does not stand on its own solid ground (or it floats,
290
+ * HI3-D17), over a page that opens on a picture — the picture starts at the top of the page, under the bar. */
291
+ export function headerGivesBack(ground: unknown, openingMedia: unknown, shape?: unknown): boolean {
292
+ return (headerGroundOf(ground) !== HeaderGround.Solid || headerShapeFloats(shape)) && openingMedia === OpeningMediaKind.Picture;
235
293
  }
236
294
 
237
295
  /** The Page scrolled state's attribute (main entry `SCROLLED_ATTRIBUTE`; spelled here — design-core reads no Angular
@@ -255,10 +313,11 @@ const onPicture = `:is([${OPENING_MEDIA_ATTRIBUTE}="${OpeningMediaKind.Picture}"
255
313
 
256
314
  /**
257
315
  * The header AT REST (not firm), as a compound selector on the header's own element — `headerFirm`'s twin in CSS: an over
258
- * ground, inside a page that opens on a picture, not inside a scrolled page, holding no open menu.
316
+ * ground on a header that does not float (HI3-D17), inside a page that opens on a picture, not inside a scrolled page,
317
+ * holding no open menu.
259
318
  */
260
319
  export const HEADER_AT_REST_SELECTOR =
261
- `${groundIs(OVER_GROUNDS)}${onPicture}:not([${HEADER_SCROLLED_ATTRIBUTE}] *):not(:has(${HEADER_OPEN_MENU_SELECTOR}))`;
320
+ `${groundIs(OVER_GROUNDS)}:not([${HeaderAttribute.Shape}])${onPicture}:not([${HEADER_SCROLLED_ATTRIBUTE}] *):not(:has(${HEADER_OPEN_MENU_SELECTOR}))`;
262
321
 
263
322
  /** The header that gives its height back (`headerGivesBack`'s twin): any ground word, inside a page that opens on a picture. */
264
323
  export const HEADER_GIVES_BACK_SELECTOR = `[${HeaderAttribute.Ground}]${onPicture}`;
@@ -60,6 +60,18 @@ export enum MenuPhoneForm {
60
60
  Full = 'full',
61
61
  }
62
62
 
63
+ /** What the menu shows besides its own head (HI2 shelves, header-builder board v2 "menu contents"): the page names (today's),
64
+ * the page names LARGE in the look's display face (Flyward's and Hotel Aurelia's full-screen index), the first four large
65
+ * with a MORE row of the rest and a picture card (Savvia's card: four names at 48px, "MÁS", small links and a reel tile),
66
+ * or pictured cards for the site's main collections beside the page names (Vonder's top panel: two category photo tiles
67
+ * and the page list). `two-levels` waits for HI6 and is drawn as the page names. */
68
+ export enum MenuShows {
69
+ Links = 'links',
70
+ Big = 'big',
71
+ WordsCard = 'words-card',
72
+ Pictures = 'pictures',
73
+ }
74
+
63
75
  /** The traits, stored in the node's props (no default: a node saved before HI2 saves none). */
64
76
  export enum MenuTrait {
65
77
  /** On the menu (the Dialog). */
@@ -67,6 +79,8 @@ export enum MenuTrait {
67
79
  Reveal = 'menuReveal',
68
80
  Hover = 'menuHover',
69
81
  Phone = 'menuPhone',
82
+ /** HI2: what the menu shows (`MenuShows`) — the shelves' parts are its children; the trait sizes them. */
83
+ Shows = 'menuShows',
70
84
  /** On the menu button AND the menu's Close (the same button, open). */
71
85
  Button = 'menuButton',
72
86
  }
@@ -76,6 +90,7 @@ export enum MenuAttribute {
76
90
  Reveal = 'data-iox-reveal',
77
91
  Hover = 'data-iox-menu-hover',
78
92
  Phone = 'data-iox-menu-phone',
93
+ Shows = 'data-iox-menu-shows',
79
94
  Button = 'data-iox-menu-button',
80
95
  }
81
96
 
@@ -89,6 +104,8 @@ export interface MenuLook {
89
104
  button: MenuButtonKind;
90
105
  hover: MenuHover;
91
106
  phone: MenuPhoneForm;
107
+ /** HI2: what it shows. */
108
+ shows: MenuShows;
92
109
  }
93
110
 
94
111
  /** Today's menu, every default (R-H4: it writes nothing). */
@@ -98,6 +115,7 @@ export const DEFAULT_MENU_LOOK: Readonly<MenuLook> = Object.freeze({
98
115
  button: MenuButtonKind.Lines,
99
116
  hover: MenuHover.Line,
100
117
  phone: MenuPhoneForm.Drawer,
118
+ shows: MenuShows.Links,
101
119
  });
102
120
 
103
121
  const valueOf = <E extends string>(values: ReadonlyArray<E>, fallback: E) => (v: unknown): E =>
@@ -108,6 +126,8 @@ export const menuRevealOf = valueOf(Object.values(MenuReveal), DEFAULT_MENU_LOOK
108
126
  export const menuButtonOf = valueOf(Object.values(MenuButtonKind), DEFAULT_MENU_LOOK.button);
109
127
  export const menuHoverOf = valueOf(Object.values(MenuHover), DEFAULT_MENU_LOOK.hover);
110
128
  export const menuPhoneOf = valueOf(Object.values(MenuPhoneForm), DEFAULT_MENU_LOOK.phone);
129
+ /** A word the product does not draw (`two-levels`, HI6) reads as the page names. */
130
+ export const menuShowsOf = valueOf(Object.values(MenuShows), DEFAULT_MENU_LOOK.shows);
111
131
 
112
132
  /** Reads a trait (`props` on a serialized node). */
113
133
  export type MenuTraitReader = (name: MenuTrait) => unknown;
@@ -119,10 +139,12 @@ export function menuDialogAttributes(read: MenuTraitReader): Record<string, stri
119
139
  const reveal = menuRevealOf(read(MenuTrait.Reveal));
120
140
  const hover = menuHoverOf(read(MenuTrait.Hover));
121
141
  const phone = menuPhoneOf(read(MenuTrait.Phone));
142
+ const shows = menuShowsOf(read(MenuTrait.Shows));
122
143
  if (form !== DEFAULT_MENU_LOOK.form) out[MenuAttribute.Form] = form;
123
144
  if (reveal !== DEFAULT_MENU_LOOK.reveal) out[MenuAttribute.Reveal] = reveal;
124
145
  if (hover !== DEFAULT_MENU_LOOK.hover) out[MenuAttribute.Hover] = hover;
125
146
  if (phone !== DEFAULT_MENU_LOOK.phone) out[MenuAttribute.Phone] = phone;
147
+ if (shows !== DEFAULT_MENU_LOOK.shows) out[MenuAttribute.Shows] = shows;
126
148
  return out;
127
149
  }
128
150
 
@@ -139,6 +161,7 @@ export function menuDialogProps(look: Partial<MenuLook>): Record<string, string>
139
161
  if (look.reveal && look.reveal !== DEFAULT_MENU_LOOK.reveal) out[MenuTrait.Reveal] = look.reveal;
140
162
  if (look.hover && look.hover !== DEFAULT_MENU_LOOK.hover) out[MenuTrait.Hover] = look.hover;
141
163
  if (look.phone && look.phone !== DEFAULT_MENU_LOOK.phone) out[MenuTrait.Phone] = look.phone;
164
+ if (look.shows && look.shows !== DEFAULT_MENU_LOOK.shows) out[MenuTrait.Shows] = look.shows;
142
165
  return out;
143
166
  }
144
167
 
@@ -54,7 +54,6 @@ const LEAVE_FOR = L.leaveFor as Readonly<Record<ArriveId, LeaveId>>;
54
54
  * the first-visit preloader (AW5), By the scroll (AW10). */
55
55
  export type MotionWordKind = 'arrive' | 'leave' | 'move' | 'cover' | 'preloader' | 'scrub';
56
56
  const TIERS = L.tiers as Readonly<Record<MotionWordKind, Readonly<Record<string, `${MotionWordTier}`>>>>;
57
- const PLAN_FALLBACK = L.planFallback as Readonly<{ arrive: ArriveId; move: MoveId; cover: string; preloader: string; scrub: string }>;
58
57
 
59
58
  /** A style preset's own language (its Feel, Headings arrive and first-visit preloader with its exit) — undefined for an
60
59
  * unknown id. */
@@ -92,20 +91,12 @@ export function motionCurve(word: ArriveId | LeaveId, tokenValue: (name: string)
92
91
  }
93
92
 
94
93
  /**
95
- * What a lower plan wears of a language (AW-D23, MB-D6): a Pro word is drawn as the plan's own (the contract's
96
- * `planFallback`) — Feel today's arrival, a Pro move a fade, a Pro cover (AW4) a fade between pages, a preloader (AW5)
97
- * none, By the scroll (AW10) never. Applied where a look is CHOSEN (a Look pick, a build); a built site keeps its words.
94
+ * What a plan wears of a language: since AW-D42 (Doron, 2026-11-28 — the award parts are every tier's) EVERY plan wears
95
+ * the whole language — a Pro Feel, move, cover (AW4), preloader (AW5) and By the scroll (AW10) included. It once drew a
96
+ * lower plan's Pro words as the contract's `planFallback` (AW-D23, MB-D6); `pro` is kept so its callers still read.
98
97
  */
99
- export function motionLanguageForPlan<T extends Pick<DesignChoices, 'feel' | 'headings'> & { between?: DesignChoices['between']; preloader?: DesignChoices['preloader']; scrub?: DesignChoices['scrub'] }>(choices: T, pro: boolean): T {
100
- if (pro) return choices;
101
- const proWord = (kind: MotionWordKind, word: unknown) => typeof word === 'string' && motionWordTier(kind, word) === MotionWordTier.Pro;
102
- const feel = isArriveId(choices.feel) && proWord('arrive', choices.feel) ? PLAN_FALLBACK.arrive : choices.feel;
103
- const headings = isMoveId(choices.headings) && proWord('move', choices.headings) ? PLAN_FALLBACK.move : choices.headings;
104
- const out = { ...choices, feel, headings };
105
- if (proWord('cover', choices.between)) out.between = PLAN_FALLBACK.cover as DesignChoices['between'];
106
- if (proWord('preloader', choices.preloader)) out.preloader = PLAN_FALLBACK.preloader;
107
- if (proWord('scrub', choices.scrub)) out.scrub = PLAN_FALLBACK.scrub;
108
- return out;
98
+ export function motionLanguageForPlan<T extends Pick<DesignChoices, 'feel' | 'headings'> & { between?: DesignChoices['between']; preloader?: DesignChoices['preloader']; scrub?: DesignChoices['scrub'] }>(choices: T, _pro?: boolean): T {
99
+ return choices;
109
100
  }
110
101
 
111
102
  /** The reduced-motion floor (AW-D6): an entrance is a fade this long at most — gentler, never zero. */
@@ -50,6 +50,45 @@ const ROLE_PREFIX = 'iox-role-';
50
50
  const ROLE_SHAPE = /^[a-z][a-z0-9-]*(\.[a-z][a-z0-9-]*)*$/;
51
51
  const MARKER_PREFIX = `${ELEMENT_STYLE_MARKER_CLASS}-`;
52
52
 
53
+ /** The scheme rows that name a scheme's GROUND (what its band and its boxes are painted). */
54
+ const SCHEME_GROUND_ROWS: ReadonlyArray<string> = ['section-bg', 'bg', 'surface'];
55
+ /** The row a scheme re-declares when it changes the ink. */
56
+ const SCHEME_INK_ROW = 'text';
57
+ /** The one token a scheme row or a style value names: `var(--iox-x)` or the contract's `{{x}}` / `{{~x}}`. */
58
+ const ONE_GROUND_TOKEN = /^(?:var\(\s*--iox-([a-z0-9-]+)\s*\)|\{\{~?([a-z0-9-]+)\}\})$/;
59
+ const groundToken = (v: unknown): string | null => {
60
+ const m = ONE_GROUND_TOKEN.exec(String(v ?? '').trim());
61
+ return m ? (m[1] ?? m[2]) : null;
62
+ };
63
+ /**
64
+ * Ground token → the scheme it is the ground of, read from the contract (iox-ui#186): only a scheme that RE-DECLARES the
65
+ * ink (a dark band's words, buttons, lines) and whose ground tokens keep their meaning inside it — Inverse paints
66
+ * `inverse-bg` and never re-declares it, so a node painted `var(--iox-inverse-bg)` that wears Inverse looks the same and
67
+ * everything in it reads. Brand and Muted re-declare their own grounds (`accent`, `text-muted`), so a painted
68
+ * `var(--iox-accent)` cannot wear Brand without changing colour: those are never inferred.
69
+ */
70
+ const SCHEME_OF_GROUND: ReadonlyMap<string, ColorScheme> = (() => {
71
+ const out = new Map<string, ColorScheme>();
72
+ for (const [id, { set }] of Object.entries(SPEC_SCHEMES as Readonly<Record<string, { set: Readonly<Record<string, string>> }>>)) {
73
+ if (id === ColorScheme.Default || !(SCHEME_INK_ROW in set)) continue;
74
+ const grounds = SCHEME_GROUND_ROWS.map(row => groundToken(set[row])).filter((t): t is string => !!t);
75
+ if (!grounds.length || grounds.some(t => t in set)) continue;
76
+ for (const t of grounds) if (!out.has(t)) out.set(t, id as ColorScheme);
77
+ }
78
+ return out;
79
+ })();
80
+
81
+ /**
82
+ * The scheme a node's painted ground IS (iox-ui#186): a Section or Container whose `backgroundColor` is exactly a
83
+ * scheme's own ground token (`var(--iox-inverse-bg)`) — the free stamp gives it that scheme so every token the look
84
+ * reads inside (a button's ink and outline, a line, a link) is re-declared for the ground, not only the words someone
85
+ * coloured by hand. Null for any other value (a page token, a colour-mix, a ground a scheme re-declares).
86
+ */
87
+ export function schemeOfGround(backgroundColor: unknown): ColorScheme | null {
88
+ const token = groundToken(backgroundColor);
89
+ return token ? SCHEME_OF_GROUND.get(token) ?? null : null;
90
+ }
91
+
53
92
  /** `iox-scheme-<id>` for a known NON-default scheme, else null — an unknown id never reaches a class attribute. */
54
93
  export function colorSchemeClass(id: unknown): string | null {
55
94
  return typeof id === 'string' && id !== ColorScheme.Default && SCHEME_IDS.has(id) ? `${SCHEME_PREFIX}${id}` : null;
@@ -1,5 +1,5 @@
1
1
  import { SPEC_MOTION_LANGUAGE } from './flavor-spec.generated';
2
- import { MotionWordTier, motionWordTier, presetMotionLanguage } from './motion-language';
2
+ import { presetMotionLanguage } from './motion-language';
3
3
  import { graphemes } from './graphemes';
4
4
 
5
5
  /**
@@ -74,9 +74,9 @@ export interface PreloaderInput {
74
74
  readonly animate: string | null | undefined;
75
75
  /** The style preset the look came from — its exit (`MOTION.presets`); absent or exit-less → Fade. */
76
76
  readonly presetId?: string | null;
77
- /** The studio's plan carries the Pro words (`GenerationTier.Award`). A built site keeps its word (AW-D23): pass true
78
- * for a stored design — the clamp happens where a look is CHOSEN (`motionLanguageForPlan`). */
79
- readonly pro: boolean;
77
+ /** The studio's plan carries the Pro words. Since AW-D42 every plan opens on its preloader; optional, kept so its
78
+ * callers still read. */
79
+ readonly pro?: boolean;
80
80
  /** The visitor asked for reduced motion. */
81
81
  readonly reducedMotion: boolean;
82
82
  /** This is the session's first page in this tab, not reached from another page of the site (`isFirstVisit`). */
@@ -89,7 +89,6 @@ export function planPreloader(input: PreloaderInput): PreloaderPlan | null {
89
89
  if (!isPreloaderKind(kind) || kind === PreloaderKind.None) return null;
90
90
  if (input.reducedMotion || !input.firstVisit) return null;
91
91
  if (!PRELOADER_LEVELS.includes(String(input.animate ?? ''))) return null;
92
- if (!input.pro && motionWordTier('preloader', kind) === MotionWordTier.Pro) return null;
93
92
  return { kind: kind as PreloaderPlan['kind'], exit: preloaderExitOf(input.presetId), capMs: PRELOADER_CAP_MS };
94
93
  }
95
94