@vectoriox/iox-ui 5.137.0 → 5.139.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 (64) hide show
  1. package/assist-core/index.d.ts +22 -4
  2. package/composite-core/index.d.ts +10 -2
  3. package/design-core/index.d.ts +225 -20
  4. package/fesm2022/vectoriox-iox-ui-actions-core.mjs +12 -2
  5. package/fesm2022/vectoriox-iox-ui-actions-core.mjs.map +1 -1
  6. package/fesm2022/vectoriox-iox-ui-assist-core.mjs +29 -5
  7. package/fesm2022/vectoriox-iox-ui-assist-core.mjs.map +1 -1
  8. package/fesm2022/vectoriox-iox-ui-composite-core.mjs +18 -2
  9. package/fesm2022/vectoriox-iox-ui-composite-core.mjs.map +1 -1
  10. package/fesm2022/vectoriox-iox-ui-design-core.mjs +376 -61
  11. package/fesm2022/vectoriox-iox-ui-design-core.mjs.map +1 -1
  12. package/fesm2022/vectoriox-iox-ui-generation-core.mjs +1038 -251
  13. package/fesm2022/vectoriox-iox-ui-generation-core.mjs.map +1 -1
  14. package/fesm2022/vectoriox-iox-ui-harness-core.mjs +16 -6
  15. package/fesm2022/vectoriox-iox-ui-harness-core.mjs.map +1 -1
  16. package/fesm2022/vectoriox-iox-ui-scene-core.mjs +197 -28
  17. package/fesm2022/vectoriox-iox-ui-scene-core.mjs.map +1 -1
  18. package/fesm2022/vectoriox-iox-ui.mjs +185 -11
  19. package/fesm2022/vectoriox-iox-ui.mjs.map +1 -1
  20. package/generation-core/index.d.ts +1124 -732
  21. package/harness-core/index.d.ts +8 -3
  22. package/index.d.ts +46 -2
  23. package/package.json +1 -1
  24. package/scene-core/index.d.ts +69 -13
  25. package/src/actions-core/element-actions.ts +14 -4
  26. package/src/assist-core/assist-turn.ts +3 -1
  27. package/src/assist-core/route-schema.ts +20 -5
  28. package/src/assist-core/surfaces.ts +12 -0
  29. package/src/composite-core/header.ts +18 -1
  30. package/src/design-core/design-settings.ts +14 -3
  31. package/src/design-core/design-token.model.ts +3 -0
  32. package/src/design-core/flavor-spec.generated.ts +64 -25
  33. package/src/design-core/graphemes.ts +16 -0
  34. package/src/design-core/header-behaviour.ts +20 -2
  35. package/src/design-core/motion-language.ts +11 -7
  36. package/src/design-core/node-classes.ts +10 -4
  37. package/src/design-core/preloader.ts +3 -4
  38. package/src/design-core/public-api.ts +3 -0
  39. package/src/design-core/scrub.ts +37 -0
  40. package/src/design-core/section-edge.ts +223 -0
  41. package/src/design-core/style-presets.ts +2 -0
  42. package/src/generation-core/body-mix.ts +443 -0
  43. package/src/generation-core/check-layout.ts +42 -4
  44. package/src/generation-core/compose-layout.ts +28 -6
  45. package/src/generation-core/compose-site.ts +34 -10
  46. package/src/generation-core/header-mix.ts +4 -0
  47. package/src/generation-core/layout-fingerprint.ts +19 -1
  48. package/src/generation-core/layout-language.ts +21 -1
  49. package/src/generation-core/layout-wire.ts +27 -2
  50. package/src/generation-core/node-baselines.generated.ts +7 -2
  51. package/src/generation-core/opening-mix.ts +32 -0
  52. package/src/generation-core/plan-wire.ts +67 -21
  53. package/src/generation-core/public-api.ts +2 -0
  54. package/src/generation-core/redesign-run.ts +27 -0
  55. package/src/generation-core/site-build-run.ts +24 -6
  56. package/src/generation-core/site-plan.model.ts +2 -0
  57. package/src/generation-core/site-spec.generated.ts +120 -58
  58. package/src/generation-core/text-scroll.ts +179 -0
  59. package/src/generation-core/validate-site-plan.ts +4 -2
  60. package/src/harness-core/motion.ts +12 -1
  61. package/src/harness-core/starting-design.ts +6 -5
  62. package/src/scene-core/scroll-range.ts +4 -0
  63. package/src/scene-core/split-text.ts +216 -28
  64. package/styles/iox-design.css +87 -0
@@ -7,6 +7,7 @@ import { withDerivedSources } from './plan-derived';
7
7
  import { DEFAULT_HEADER_PATTERN, HeaderIngredient, headerMeaning, headerMix, headerMixFromWords, headerMixOfPlan, headerMixWords, headerPatternIdOf, headerWireWords } from './header-mix';
8
8
  import { DEFAULT_FOOTER_PATTERN, FooterIngredient, footerMeaning, footerMix, footerMixFromWords, footerMixOfPlan, footerMixWords, footerPatternIdOf, footerWireWords, footerWords } from './footer-mix';
9
9
  import { OpeningIngredient, openingMeaning, openingWireWords, openingWordTier } from './opening-mix';
10
+ import { BodyIngredient, bodyMeaning, bodyMix, bodyMixWords, bodyWireWords } from './body-mix';
10
11
  import { shopCategoriesOf } from './shop-plan';
11
12
  import { ContentFieldControl, FIELD_TYPE_OF_CONTROL,
12
13
  ContentFieldPlan, ContentTypePlan, DataSourcePlan, FactKey, GenerationTier, GlobalSlot, PAGE_ARCHETYPES, PagePlan, PageSectionPlan, PlanDataSourceMode, PlanDataSourceType,
@@ -91,6 +92,8 @@ interface WireKey {
91
92
  none?: string;
92
93
  /** The part a top-level key is written in. */
93
94
  part?: PlanPart;
95
+ /** AW-D23 (AW6 wire): a key only the award tier's request carries — every other tier's wire is without it, byte for byte. */
96
+ tier?: GenerationTier.Award;
94
97
  }
95
98
 
96
99
  const PLAN_SHAPE = SPEC_SITE_PLAN_SHAPE as unknown as Readonly<Record<string, ShapeEntry>>;
@@ -124,6 +127,19 @@ const HEADER_WIRE_TEXT = 'string[] — the header as ONE list of <ingredient>:<w
124
127
  + 'beside the name, pages either side of the name need a short name, two actions need a shop. '
125
128
  + Object.values(HeaderIngredient).map(k => `${k}: ${headerWireWords().filter(w => w.startsWith(`${k}:`)).map(w => w.slice(k.length + 1)).map(w => `${w} (${headerMeaning(k, w)})`).join(' | ')}`).join('; ');
126
129
 
130
+ /** The wire's `globals` key the site's body travels in (AW6) — the award tier's alone (AW-D23…D25). */
131
+ const BODY_WIRE_KEY = 'body';
132
+
133
+ /** The body's words as the model reads them (AW6): each ingredient, the words an award build may wear today and their
134
+ * meanings, from the contract's body table. */
135
+ const BODY_WIRE_TEXT = "string[] — the site's body as ONE list of <ingredient>:<word> words: how its sections meet and how their grounds "
136
+ + `follow one another; one word per ingredient but sections, which lists each extra kind it takes; an ingredient left out is the default `
137
+ + `(${bodyMixWords(bodyMix()).join(', ')}); [] = straight edges, each section's ground its own. An edge shows only where two neighbouring `
138
+ + 'sections wear different grounds; a calm business (care, advice) never wears a torn or dripping edge. '
139
+ + Object.values(BodyIngredient).map(k => [k, bodyWireWords(GenerationTier.Award).filter(w => w.startsWith(`${k}:`)).map(w => w.slice(k.length + 1))] as const)
140
+ .filter(([, words]) => words.length)
141
+ .map(([k, words]) => `${k}: ${words.map(w => `${w} (${bodyMeaning(k, w)})`).join(' | ')}`).join('; ');
142
+
127
143
  const WIRE_KEYS: Readonly<Record<`${PlanWireEntry}`, Readonly<Record<string, WireKey>>>> = {
128
144
  plan: {
129
145
  business: inPart(PlanPart.Structure, key('plan.business')),
@@ -229,6 +245,9 @@ const WIRE_KEYS: Readonly<Record<`${PlanWireEntry}`, Readonly<Record<string, Wir
229
245
  footer: { refs: ['globals.footer', 'plan.mixes', 'mixes.footer'], text: FOOTER_WIRE_TEXT },
230
246
  // AW8: the home page's opening travels as its MIX, ONE list of `<ingredient>:<word>` words (opening-mix.ts); [] = none.
231
247
  opening: { refs: ['plan.mixes', 'mixes.opening'], text: OPENING_WIRE_TEXT },
248
+ // AW6: the site's body travels as its MIX, ONE list of `<ingredient>:<word>` words (body-mix.ts); [] = none. The award
249
+ // tier's request alone carries it (AW-D23…D25): a Basic wire is without the key, so its grammar is the one it was.
250
+ body: { refs: ['plan.mixes', 'mixes.body'], text: BODY_WIRE_TEXT, tier: GenerationTier.Award },
232
251
  },
233
252
  shopProduct: {
234
253
  name: key('shopProduct.name'),
@@ -270,11 +289,30 @@ const wireText = (spec: WireKey): string => {
270
289
  return spec.none === undefined ? base : `${base} — ${spec.none} = none`;
271
290
  };
272
291
 
273
- /** The wire's shape table, in the plan table's words — what the model reads, and what the format is built from. */
274
- export const PLAN_WIRE_SHAPE: Readonly<Record<`${PlanWireEntry}`, ShapeEntry>> = Object.fromEntries(
275
- Object.entries(WIRE_KEYS).map(([entry, keys]) => [entry, Object.fromEntries(Object.entries(keys).map(([k, spec]) => [k, wireText(spec)]))]),
292
+ /** What a plan request is asked at: its generation's tier (AW-D23). Absent = Basic — the wire every tier but the award's reads. */
293
+ export interface PlanWireOptions {
294
+ tier?: `${GenerationTier}`;
295
+ }
296
+
297
+ const isAward = (options: PlanWireOptions) => options.tier === GenerationTier.Award;
298
+ /** Is a wire key on the request asked at `options`? (A key with no tier is on every request.) */
299
+ const asked = (spec: WireKey, options: PlanWireOptions) => !spec.tier || (spec.tier === GenerationTier.Award && isAward(options));
300
+
301
+ const wireShapeAt = (options: PlanWireOptions): Record<`${PlanWireEntry}`, ShapeEntry> => Object.fromEntries(
302
+ Object.entries(WIRE_KEYS).map(([entry, keys]) => [entry, Object.fromEntries(Object.entries(keys).filter(([, spec]) => asked(spec, options)).map(([k, spec]) => [k, wireText(spec)]))]),
276
303
  ) as Record<`${PlanWireEntry}`, ShapeEntry>;
277
304
 
305
+ /** The wire's shape table, in the plan table's words — what the model reads, and what the format is built from. The
306
+ * Basic tier's (every tier's but the award's); `planWireShape(options)` gives a tier's own. */
307
+ export const PLAN_WIRE_SHAPE: Readonly<Record<`${PlanWireEntry}`, ShapeEntry>> = wireShapeAt({});
308
+
309
+ const AWARD_WIRE_SHAPE: Readonly<Record<`${PlanWireEntry}`, ShapeEntry>> = wireShapeAt({ tier: GenerationTier.Award });
310
+
311
+ /** The wire's shape table a request at `options` reads (AW6: the award tier's carries the body). Basic = `PLAN_WIRE_SHAPE`. */
312
+ export function planWireShape(options: PlanWireOptions = {}): Readonly<Record<`${PlanWireEntry}`, ShapeEntry>> {
313
+ return isAward(options) ? AWARD_WIRE_SHAPE : PLAN_WIRE_SHAPE;
314
+ }
315
+
278
316
  /** Each part's top-level keys, from the ONE wire table. */
279
317
  export const PLAN_PART_KEYS: Readonly<Record<PlanPart, ReadonlyArray<string>>> = Object.fromEntries(
280
318
  PLAN_PARTS.map(part => [part, Object.entries(WIRE_KEYS.plan).filter(([, spec]) => spec.part === part).map(([k]) => k)]),
@@ -404,16 +442,17 @@ export function wirePageJsonSchema(options: WireOptions = {}): JsonSchema {
404
442
  });
405
443
  }
406
444
 
407
- const PLAN_TOP_SCHEMAS: Readonly<Record<string, () => JsonSchema>> = {
445
+ const PLAN_TOP_SCHEMAS: Readonly<Record<string, (options: PlanWireOptions) => JsonSchema>> = {
408
446
  business: () => shaped(PlanWireEntry.Business, { name: jsonText(), tagline: jsonText() }),
409
447
  contentTypes: () => jsonListOf(wireContentTypeJsonSchema()),
410
448
  dataSources: () => jsonListOf(wireDataSourceJsonSchema()),
411
449
  pages: () => jsonListOf(wirePageJsonSchema()),
412
- globals: () => shaped(PlanWireEntry.Globals, {
450
+ globals: options => jsonShapedObject(planWireShape(options).globals, {
413
451
  [GlobalSlot.Header]: jsonListOf(jsonOneOf(headerWireWords())),
414
452
  [GlobalSlot.Footer]: jsonListOf(jsonOneOf(footerWireWords())),
415
453
  [OPENING_WIRE_KEY]: jsonListOf(jsonOneOf(openingWireWords(GenerationTier.Award))),
416
- }),
454
+ ...(isAward(options) ? { [BODY_WIRE_KEY]: jsonListOf(jsonOneOf(bodyWireWords(GenerationTier.Award))) } : {}),
455
+ }, `wire ${PlanWireEntry.Globals}`),
417
456
  direction: () => shaped(PlanWireEntry.Direction, { idea: jsonText(), cliche: jsonText(), flip: jsonText(), rules: jsonListOf(jsonText()) }),
418
457
  shop: () => jsonListOf(wireShopProductJsonSchema()),
419
458
  };
@@ -427,20 +466,21 @@ export function wireShopProductJsonSchema(): JsonSchema {
427
466
  }
428
467
 
429
468
  /** The plan's top-level shape for one part (its keys only) — what that part's request shows and is built from. */
430
- export function planWirePartShape(part: PlanPart): ShapeEntry {
431
- return Object.fromEntries(Object.entries(PLAN_WIRE_SHAPE.plan).filter(([k]) => PLAN_PART_KEYS[part].includes(k)));
469
+ export function planWirePartShape(part: PlanPart, options: PlanWireOptions = {}): ShapeEntry {
470
+ return Object.fromEntries(Object.entries(planWireShape(options).plan).filter(([k]) => PLAN_PART_KEYS[part].includes(k)));
432
471
  }
433
472
 
434
473
  /**
435
474
  * The format a model writes one part of a plan in — one request each (vectoriox/iox-cms#47). The same for every studio
436
- * and run: nothing in it is pinned, so the provider compiles each part's grammar once.
475
+ * and run at a tier: nothing in it is pinned, so the provider compiles each part's grammar once per tier (AW6: the award
476
+ * tier's Pages part adds `globals.body`; every other tier's is the format it always was, byte for byte).
437
477
  */
438
- export function planWirePartJsonSchema(part: PlanPart): JsonSchema {
478
+ export function planWirePartJsonSchema(part: PlanPart, options: PlanWireOptions = {}): JsonSchema {
439
479
  const gaps = planWireGaps();
440
480
  if (gaps.length) throw new PlanWireShapeError(`the plan wire neither carries nor derives ${gaps.join(', ')}`);
441
481
  const missing = Object.keys(WIRE_KEYS.plan).filter(k => !PLAN_TOP_SCHEMAS[k] || !WIRE_KEYS.plan[k].part);
442
482
  if (missing.length) throw new PlanWireShapeError(`the plan wire's ${missing.join(', ')} has no part or no format`);
443
- return jsonShapedObject(planWirePartShape(part), Object.fromEntries(PLAN_PART_KEYS[part].map(k => [k, PLAN_TOP_SCHEMAS[k]()])), `wire plan ${part}`);
483
+ return jsonShapedObject(planWirePartShape(part, options), Object.fromEntries(PLAN_PART_KEYS[part].map(k => [k, PLAN_TOP_SCHEMAS[k](options)])), `wire plan ${part}`);
444
484
  }
445
485
 
446
486
  // ── The wire → the plan ────────────────────────────────────────────────────────────────────────────────────────────
@@ -600,11 +640,14 @@ export function expandPlanWire(parts: PlanWireParts, context: PlanWireContext):
600
640
  function expandWireGlobals(globals: unknown): PlainObject {
601
641
  if (globals === undefined) return {};
602
642
  if (!isPlainObject(globals)) return { globals };
603
- const { [OPENING_WIRE_KEY]: opening, ...rest } = globals;
643
+ const { [OPENING_WIRE_KEY]: opening, [BODY_WIRE_KEY]: body, ...rest } = globals;
604
644
  const out: PlainObject = { ...rest };
605
645
  const mixes: Record<string, unknown> = {};
606
646
  // AW8: the opening is a mix only (no stored pattern stands for it on the wire); [] = none. Not a list: the validator says so.
607
- if (opening !== undefined && (!Array.isArray(opening) || opening.length)) mixes[OPENING_WIRE_KEY] = Array.isArray(opening) ? [...opening] : opening;
647
+ // AW6: so is the body (the award tier's wire alone writes it); [] = none.
648
+ for (const [name, words] of [[OPENING_WIRE_KEY, opening], [BODY_WIRE_KEY, body]] as const) {
649
+ if (words !== undefined && (!Array.isArray(words) || words.length)) mixes[name] = Array.isArray(words) ? [...words] : words;
650
+ }
608
651
  for (const [slot, readId, fallback] of [
609
652
  [GlobalSlot.Header, (w: string[]) => headerPatternIdOf(headerMixFromWords(w)), DEFAULT_HEADER_PATTERN],
610
653
  [GlobalSlot.Footer, (w: string[]) => footerPatternIdOf(footerMixFromWords(w)), DEFAULT_FOOTER_PATTERN],
@@ -668,25 +711,28 @@ export function pageToWire(page: PagePlan, options: WireOptions = {}): PlainObje
668
711
  };
669
712
  }
670
713
 
671
- const PLAN_TO_WIRE: Readonly<Record<string, (plan: SitePlan) => unknown>> = {
714
+ const PLAN_TO_WIRE: Readonly<Record<string, (plan: SitePlan, options: PlanWireOptions) => unknown>> = {
672
715
  business: plan => ({ name: plan.business.name, tagline: plan.business.tagline ?? NONE }),
673
716
  contentTypes: plan => plan.contentTypes.map(type => contentTypeToWire(type)),
674
717
  dataSources: plan => plan.dataSources.map(dataSourceToWire),
675
718
  pages: plan => plan.pages.map(page => pageToWire(page)),
676
- globals: plan => ({
719
+ globals: (plan, options) => ({
677
720
  ...plan.globals, [GlobalSlot.Header]: headerMixWords(headerMixOfPlan(plan)), [GlobalSlot.Footer]: footerMixWords(footerMixOfPlan(plan)),
678
721
  [OPENING_WIRE_KEY]: [...(plan.mixes?.opening ?? [])],
722
+ // AW6: the award tier's wire writes the body ([] = none); every other tier's has no such key (its plan wears none).
723
+ ...(isAward(options) ? { [BODY_WIRE_KEY]: [...(plan.mixes?.body ?? [])] } : {}),
679
724
  }),
680
725
  direction: plan => ({ idea: plan.direction?.idea ?? NONE, cliche: plan.direction?.cliche ?? NONE, flip: plan.direction?.flip ?? NONE, rules: [...(plan.direction?.rules ?? [])] }),
681
726
  shop: plan => (plan.shop?.products ?? []).map(p => ({ name: p.name, category: p.category, description: p.description, options: p.options.map(o => ({ name: o.name, values: [...o.values] })) })),
682
727
  };
683
728
 
684
- /** One part of the plan on the wire: what that part's request would have answered. */
685
- export function planPartToWire(plan: SitePlan, part: PlanPart): PlainObject {
686
- return Object.fromEntries(PLAN_PART_KEYS[part].map(k => [k, PLAN_TO_WIRE[k](plan)]));
729
+ /** One part of the plan on the wire: what that part's request (asked at `options`' tier) would have answered. */
730
+ export function planPartToWire(plan: SitePlan, part: PlanPart, options: PlanWireOptions = {}): PlainObject {
731
+ return Object.fromEntries(PLAN_PART_KEYS[part].map(k => [k, PLAN_TO_WIRE[k](plan, options)]));
687
732
  }
688
733
 
689
- /** The plan → the wire, by part: what a model would have written (the change prompt shows it; fakes and evals write it). */
690
- export function planToWire(plan: SitePlan): Record<PlanPart, PlainObject> {
691
- return Object.fromEntries(PLAN_PARTS.map(part => [part, planPartToWire(plan, part)])) as Record<PlanPart, PlainObject>;
734
+ /** The plan → the wire, by part: what a model would have written (the change prompt shows it; fakes and evals write it).
735
+ * At the award tier the body travels too (AW6); below it, a plan's body is not on the wire. */
736
+ export function planToWire(plan: SitePlan, options: PlanWireOptions = {}): Record<PlanPart, PlainObject> {
737
+ return Object.fromEntries(PLAN_PARTS.map(part => [part, planPartToWire(plan, part, options)])) as Record<PlanPart, PlainObject>;
692
738
  }
@@ -28,6 +28,7 @@ export * from './validate-site-plan';
28
28
  export * from './compose-site';
29
29
  export * from './nav-shape';
30
30
  export * from './entrances';
31
+ export * from './text-scroll';
31
32
  export * from './plan-data';
32
33
  export * from './showcase';
33
34
  export * from './site-build-run';
@@ -66,6 +67,7 @@ export * from './layout-fingerprint';
66
67
  export * from './header-mix';
67
68
  export * from './header-edit';
68
69
  export * from './opening-mix';
70
+ export * from './body-mix';
69
71
  export * from './opening-edit';
70
72
  export * from './footer-mix';
71
73
  export * from './layout-edits';
@@ -4,6 +4,7 @@ import type { ComposedPlaceholder } from './compose-site';
4
4
  import type { LayoutIssue } from './layout-language';
5
5
  import type { SerializedNode } from './serialized-node';
6
6
  import type { AdditionIssue, AdditionOrigin } from './redesign-additions';
7
+ import type { AiRefusal } from './ai-run';
7
8
  import { BuildStepError, BuildStepRecord, CreatedRecord, SiteBuildKind, SiteBuildStatus, UndoKept } from './site-build-run';
8
9
  import type { PagePlan } from './site-plan.model';
9
10
 
@@ -80,6 +81,9 @@ export interface RedesignRequest {
80
81
  keep: Record<string, number[]>;
81
82
  /** A model the owner chose for the layouts (M8 D4), or none: the studio's choice for the step. */
82
83
  model?: string;
84
+ /** False: nothing is added — no page, type or item is suggested or asked for (RD3-D7, "Redesign this page" in the
85
+ * builder). Absent: the additions step runs as for a site (§3e). */
86
+ additions?: boolean;
83
87
  }
84
88
 
85
89
  /** A page as the Snapshot took it — what Back restores, and what Switch judges a page edited after the harvest by. */
@@ -360,6 +364,29 @@ export enum RedesignRefusalCode {
360
364
  NotRedesignable = 'not-redesignable',
361
365
  }
362
366
 
367
+ /** Why "Redesign this page" cannot start, said before any call (RD3 R-H6): the page keeps its layout (`not-redesignable`
368
+ * — a legal page, a hand-made page with no reading, a page with no source), nothing of the studio was built
369
+ * (`nothing-built`), or the AI refuses the layout request (credits, plan, key — the shared `AiRefusal`, board 11). */
370
+ export type RedesignPageRefusal =
371
+ | { code: RedesignRefusalCode.NotRedesignable; message: string; reason: StagedPageReason }
372
+ | { code: RedesignRefusalCode.NothingBuilt; message: string }
373
+ | AiRefusal;
374
+
375
+ /** `GET …/site-builds/redesign/pages/:pageId/preflight` — what "Redesign this page" says before it sends (RD3, board P1
376
+ * and P5): whether it may start, and what ONE layout request costs on the model it would run on. Writes nothing. */
377
+ export interface RedesignPagePreflight {
378
+ pageId: string;
379
+ refusal: RedesignPageRefusal | null;
380
+ /** The page is laid out by the model (false: it is re-fitted to the look — patterns, or no reading — and costs nothing). */
381
+ asksModel: boolean;
382
+ /** Why it is re-fitted instead (absent when the model lays it out). */
383
+ reason?: StagedPageReason;
384
+ /** About what the layout request costs, in credits (0 when no model is asked; null when the studio's plan is unknown). */
385
+ estimate: number | null;
386
+ /** The model it would run on (Auto resolved), or null. */
387
+ model: string | null;
388
+ }
389
+
363
390
  /** The day Back closes, or null (not switched). */
364
391
  export function redesignBackUntil(run: Pick<RedesignRun, 'switch'>): Date | null {
365
392
  const at = run.switch?.finishedAt ?? run.switch?.at;
@@ -185,6 +185,9 @@ export enum BuildNoticeCode {
185
185
  /** LI5: the footer the plan asked for was mended (a word that waits drawn as its stand-in, a one-line footer that
186
186
  * holds only some parts) — said like the header's and the opening's. */
187
187
  FooterMended = 'footer-mended',
188
+ /** AW6: the body the plan asked for was mended (a section edge that comes with the award plan, on a basic build) —
189
+ * said like the header's, the opening's and the footer's. */
190
+ BodyMended = 'body-mended',
188
191
  }
189
192
 
190
193
  /** RD3-D3 (a): what a build does with a page an earlier Undo kept at an address its plan builds — the header and footer's
@@ -192,7 +195,8 @@ export enum BuildNoticeCode {
192
195
  export enum KeptPagesChoice {
193
196
  /** Build every other page; leave these as they are. */
194
197
  Keep = 'keep',
195
- /** Move each aside as a draft at `/<route>-previous` and build the plan's page at its address. Nothing is deleted. */
198
+ /** Move each aside as a draft at `/<route>-previous` (`/shop-previous/:slug` for a per-item page) and build the plan's
199
+ * page at its address. Nothing is deleted. */
196
200
  Replace = 'replace',
197
201
  }
198
202
 
@@ -200,13 +204,26 @@ export enum KeptPagesChoice {
200
204
  export const PREVIOUS_ROUTE_SUFFIX = '-previous';
201
205
 
202
206
  /** Where a page moved aside goes: `/<route>-previous`, then `-previous-2`… — never an address in `taken` (shapes
203
- * compared case-insensitively, trailing slash ignored). The home page (`/`) goes to `/home-previous`. */
207
+ * compared case-insensitively, trailing slash and parameter names ignored). The home page (`/`) goes to `/home-previous`.
208
+ *
209
+ * ⚠️ The suffix goes on the route's LAST STATIC segment, never on a `:param` (vectoriox/iox-ui#100): `/shop/:slug` moved
210
+ * to `/shop/:slug-previous` still answered every `/shop/<item>` — a parameter matches the whole segment — and, older
211
+ * and published by Publish site, the replaced product page was served instead of the new one. So `/shop/:slug` →
212
+ * `/shop-previous/:slug`, and a route of parameters only (`/:slug`) → `/previous/:slug`. */
204
213
  export function previousRoute(route: string, taken: ReadonlyArray<string>): string {
205
- const key = (r: string) => (r.replace(/\/+$/, '') || '/').toLowerCase();
214
+ const key = (r: string) => (r.replace(/\/+$/, '') || '/').replace(/\/:[^/]+/g, '/:').toLowerCase();
206
215
  const held = new Set(taken.map(key));
207
- const base = `${route.replace(/\/+$/, '') || '/home'}${PREVIOUS_ROUTE_SUFFIX}`.replace(/^\/\//, '/');
208
- let candidate = base;
209
- for (let n = 2; held.has(key(candidate)); n++) candidate = `${base}-${n}`;
216
+ const segments = (route.replace(/\/+$/, '') || '/home').split('/').filter(Boolean);
217
+ if (!segments.length) segments.push('home');
218
+ const at = segments.map((seg, i) => (seg.startsWith(':') ? -1 : i)).filter(i => i >= 0).pop();
219
+ const shaped = (suffix: string) => {
220
+ const out = [...segments];
221
+ if (at === undefined) out.unshift(`previous${suffix}`);
222
+ else out[at] = `${out[at]}${PREVIOUS_ROUTE_SUFFIX}${suffix}`;
223
+ return `/${out.join('/')}`;
224
+ };
225
+ let candidate = shaped('');
226
+ for (let n = 2; held.has(key(candidate)); n++) candidate = shaped(`-${n}`);
210
227
  return candidate;
211
228
  }
212
229
 
@@ -217,6 +234,7 @@ const MEND_NOTICES: ReadonlyArray<readonly [ComposeIssueCode, BuildNoticeCode]>
217
234
  [ComposeIssueCode.HeaderMended, BuildNoticeCode.HeaderMended],
218
235
  [ComposeIssueCode.OpeningMended, BuildNoticeCode.OpeningMended],
219
236
  [ComposeIssueCode.FooterMended, BuildNoticeCode.FooterMended],
237
+ [ComposeIssueCode.BodyMended, BuildNoticeCode.BodyMended],
220
238
  ];
221
239
  const CARRY_ONLY = /^the opening found no place for /;
222
240
 
@@ -347,6 +347,8 @@ export interface PlanMixes {
347
347
  readonly header?: ReadonlyArray<string>;
348
348
  readonly footer?: ReadonlyArray<string>;
349
349
  readonly opening?: ReadonlyArray<string>;
350
+ /** AW6 (body-mix.ts): how sections meet, how their grounds follow one another, the texture and extra kinds of section. */
351
+ readonly body?: ReadonlyArray<string>;
350
352
  }
351
353
 
352
354
  /** M8 gate 2: the idea a site's composed pages serve — the usual site for the business, and what this one does instead. */
@@ -17,12 +17,13 @@ export const SPEC_SITE_PLAN_SHAPE = {
17
17
  "film?": "film — the owner's film as pictures (SC6b), set by the build and placed by placeFilm; never a model's",
18
18
  "artDirection?": "artDirection — what every picture made for the site shares (M7): set by the generation from the business type and the look (generation-core artDirectionFor); never a model's",
19
19
  "direction?": "direction — what the site is built around (M8 gate 2): written with the pages, shown on the Plan step; every composed page serves it",
20
- "mixes?": "mixes — the header, the footer and the home page's opening as mixes of ingredients (ingredients.md); a header or footer mix wins over its globals pattern"
20
+ "mixes?": "mixes — the header, the footer, the home page's opening and the body as mixes of ingredients (ingredients.md); a header or footer mix wins over its globals pattern"
21
21
  },
22
22
  "mixes": {
23
23
  "header?": "string[] — the header as <ingredient>:<word> words (site.layout.header; header ingredients HI1)",
24
24
  "footer?": "string[] — the footer as <ingredient>:<word> words (site.layout.footer; list ingredients LI5)",
25
- "opening?": "string[] — the home page's opening (its first screen) as <ingredient>:<word> words (site.layout.opening; award ingredients AW8): it takes the place of the home page's first section when that is a hero, the hero's words and pictures carried in; absent or empty = the home page opens with its sections as written"
25
+ "opening?": "string[] — the home page's opening (its first screen) as <ingredient>:<word> words (site.layout.opening; award ingredients AW8): it takes the place of the home page's first section when that is a hero, the hero's words and pictures carried in; absent or empty = the home page opens with its sections as written",
26
+ "body?": "string[] — the site's body as <ingredient>:<word> words (site.layout.body; award ingredients AW6): how sections meet (seam), how their grounds follow one another (rhythm), the texture and the extra kinds of section; absent or empty = straight seams, each section's ground its own"
26
27
  },
27
28
  "direction": {
28
29
  "idea": "string — one sentence: what this site is about and how it should feel",
@@ -76,7 +77,8 @@ export const SPEC_SITE_PLAN_SHAPE = {
76
77
  "between?": "string — axes.betweens: what plays between pages",
77
78
  "feel?": "string — motionLanguage.arrive: the curve things arrive on, the leave follows it (AW3, MB-D5; absent = motionLanguage.defaults.arrive)",
78
79
  "headings?": "string — motionLanguage.move: how headings arrive (AW3; absent = each How animated level's own heading)",
79
- "preloader?": "string — motionLanguage.preloader: what opens a visitor's first page (AW5; absent = none; the exit is the style's, never stored)"
80
+ "preloader?": "string — motionLanguage.preloader: what opens a visitor's first page (AW5; absent = none; the exit is the style's, never stored)",
81
+ "scrub?": "string — motionLanguage.scrub: what follows the scroll — never · words · entrances (AW10; absent = never; Lively and up, Pro)"
80
82
  },
81
83
  "contentType": {
82
84
  "name": "string — unique",
@@ -6643,7 +6645,8 @@ export const SPEC_SITE_LAYOUT = {
6643
6645
  "clipReveal",
6644
6646
  "maskRise",
6645
6647
  "blurIn",
6646
- "pop"
6648
+ "pop",
6649
+ "letters"
6647
6650
  ],
6648
6651
  "sides": [
6649
6652
  "bottom",
@@ -6755,7 +6758,8 @@ export const SPEC_SITE_LAYOUT = {
6755
6758
  "loop",
6756
6759
  "drift",
6757
6760
  "scroll",
6758
- "autoplay"
6761
+ "autoplay",
6762
+ "scrub"
6759
6763
  ],
6760
6764
  "dials": [
6761
6765
  "distinct",
@@ -7876,6 +7880,10 @@ export const SPEC_SITE_LAYOUT = {
7876
7880
  "none",
7877
7881
  "icons",
7878
7882
  "search"
7883
+ ],
7884
+ "ink": [
7885
+ "opening",
7886
+ "follows"
7879
7887
  ]
7880
7888
  },
7881
7889
  "meanings": {
@@ -7939,7 +7947,9 @@ export const SPEC_SITE_LAYOUT = {
7939
7947
  "above.marquee": "a moving band of the owner's words above the bar",
7940
7948
  "inBar.none": "nothing more in the bar",
7941
7949
  "inBar.icons": "small icons (sound, theme, chat) in the bar",
7942
- "inBar.search": "a search field in the bar"
7950
+ "inBar.search": "a search field in the bar",
7951
+ "ink.opening": "the header's colours follow the page's opening ground",
7952
+ "ink.follows": "the header's colours follow the ground of every section that passes under it"
7943
7953
  },
7944
7954
  "meaningsHe": {
7945
7955
  "arrange.split": "השם בתחילת הפס, הדפים בסופו",
@@ -8002,7 +8012,9 @@ export const SPEC_SITE_LAYOUT = {
8002
8012
  "above.marquee": "פס נע של מילים מעל הפס",
8003
8013
  "inBar.none": "שום דבר נוסף בפס",
8004
8014
  "inBar.icons": "אייקונים קטנים (צליל, ערכת צבע, צ׳אט) בפס",
8005
- "inBar.search": "שדה חיפוש בפס"
8015
+ "inBar.search": "שדה חיפוש בפס",
8016
+ "ink.opening": "צבעי הכותרת העליונה הולכים אחרי הרקע של פתיחת הדף",
8017
+ "ink.follows": "צבעי הכותרת העליונה הולכים אחרי הרקע של כל אזור שעובר מתחתיה"
8006
8018
  },
8007
8019
  "waits": {
8008
8020
  "menuShows.pictures": {
@@ -8083,7 +8095,8 @@ export const SPEC_SITE_LAYOUT = {
8083
8095
  "button": "lines",
8084
8096
  "menuHover": "line",
8085
8097
  "above": "none",
8086
- "inBar": "none"
8098
+ "inBar": "none",
8099
+ "ink": "opening"
8087
8100
  },
8088
8101
  "named": {
8089
8102
  "nav.inline-cta": {},
@@ -8733,10 +8746,6 @@ export const SPEC_SITE_LAYOUT = {
8733
8746
  "phase": "AW7",
8734
8747
  "drawnAs": "photo"
8735
8748
  },
8736
- "motion.copy-out": {
8737
- "phase": "AW10",
8738
- "drawnAs": null
8739
- },
8740
8749
  "motion.pinned-covered": {
8741
8750
  "phase": "AW9",
8742
8751
  "drawnAs": null
@@ -9110,23 +9119,92 @@ export const SPEC_SITE_LAYOUT = {
9110
9119
  "sections.timeline": "steps by time (weeks, the hours of a day)",
9111
9120
  "sections.hotspots": "points on a picture that open item cards"
9112
9121
  },
9113
- "waits": {
9114
- "seam.wave": {
9115
- "phase": "AW6",
9116
- "drawnAs": "straight"
9122
+ "meaningsHe": {
9123
+ "seam.straight": "קו ישר בין שני רקעים",
9124
+ "seam.wave": "גבעה רכה בין שני רקעים",
9125
+ "seam.drip": "קצה בצורת טיפות נוטפות",
9126
+ "seam.torn": "קצה קרוע ומשונן",
9127
+ "seam.rounded": "אזור עם פינות תחתונות מעוגלות שמונח מעל הבא",
9128
+ "rhythm.free": "הרקע של כל אזור כפי שערכת הצבע שלו בוחרת",
9129
+ "rhythm.alternate": "הרקעים מתחלפים כהה ובהיר, אזור אחרי אזור",
9130
+ "rhythm.loud-quiet": "אזור עם תמונה, ואחריו אזור מילים צר וממורכז, שוב ושוב",
9131
+ "rhythm.chapters": "הרקע מתחלף רק במקום שבו פרק מתחיל",
9132
+ "rhythm.tail": "האזורים האחרונים חולקים את הרקע של הכותרת התחתונה, כך שהסוף נקרא כגוש אחד",
9133
+ "texture.none": "בלי מרקם",
9134
+ "texture.pattern": "דוגמה מצבעי העיצוב: נקודות, רשת, קווקוו, קווי גובה או סמל חוזר",
9135
+ "texture.light": "תמונות צל רכות (תריסים, עלים) מעל רקע של נייר",
9136
+ "texture.material": "חומר שמצויר ב-CSS (צלעות מעל זוהר נע, קרן איטית)",
9137
+ "texture.grain": "גרעיניות של נייר על רקע",
9138
+ "texture.lanes": "קווי השיער של עמודת התוכן וסימני הצלב לאורך כל הדף",
9139
+ "sections.inset-card": "אזור ככרטיס מעוגל על רקע הדף",
9140
+ "sections.sticky-title": "הכותרת של אזור נשארת בזמן שהכרטיסים שלו עוברים",
9141
+ "sections.tabs-nav": "פס לשוניות קבוע בדף, שהקו שלו הולך אחרי האזור שבתצוגה",
9142
+ "sections.promises": "פס של שלוש או ארבע הבטחות קצרות (משלוח, החזרות, אחריות) — העובדות של בעל העסק",
9143
+ "sections.table": "שורות מפתח : ערך (מפרט, השוואה)",
9144
+ "sections.timeline": "שלבים לפי זמן (שבועות, שעות היום)",
9145
+ "sections.hotspots": "נקודות על תמונה שפותחות כרטיסי פריטים"
9146
+ },
9147
+ "seams": {
9148
+ "straight": {
9149
+ "depth": [
9150
+ 0,
9151
+ 0
9152
+ ],
9153
+ "mirrors": false
9117
9154
  },
9118
- "seam.drip": {
9119
- "phase": "AW6",
9120
- "drawnAs": "straight"
9155
+ "wave": {
9156
+ "depth": [
9157
+ 48,
9158
+ 24
9159
+ ],
9160
+ "mirrors": false
9121
9161
  },
9122
- "seam.torn": {
9123
- "phase": "AW6",
9124
- "drawnAs": "straight"
9162
+ "drip": {
9163
+ "depth": [
9164
+ 64,
9165
+ 32
9166
+ ],
9167
+ "mirrors": true
9125
9168
  },
9126
- "seam.rounded": {
9127
- "phase": "AW6",
9128
- "drawnAs": "straight"
9169
+ "torn": {
9170
+ "depth": [
9171
+ 20,
9172
+ 14
9173
+ ],
9174
+ "mirrors": true
9175
+ },
9176
+ "rounded": {
9177
+ "depth": [
9178
+ 0,
9179
+ 0
9180
+ ],
9181
+ "radius": [
9182
+ 48,
9183
+ 28
9184
+ ],
9185
+ "mirrors": false
9186
+ }
9187
+ },
9188
+ "rhythms": {
9189
+ "free": {},
9190
+ "alternate": {
9191
+ "neighbours": "differ"
9192
+ },
9193
+ "loud-quiet": {
9194
+ "pairs": 2,
9195
+ "quietCols": 8
9196
+ },
9197
+ "chapters": {
9198
+ "changesAt": [
9199
+ "inhale",
9200
+ "signature"
9201
+ ]
9129
9202
  },
9203
+ "tail": {
9204
+ "last": 2
9205
+ }
9206
+ },
9207
+ "waits": {
9130
9208
  "rhythm.alternate": {
9131
9209
  "phase": "AW6",
9132
9210
  "drawnAs": "free"
@@ -9163,10 +9241,6 @@ export const SPEC_SITE_LAYOUT = {
9163
9241
  "phase": "AW7",
9164
9242
  "drawnAs": "none"
9165
9243
  },
9166
- "sections.inset-card": {
9167
- "phase": "AW6",
9168
- "drawnAs": null
9169
- },
9170
9244
  "sections.sticky-title": {
9171
9245
  "phase": "AW9",
9172
9246
  "drawnAs": null
@@ -9206,7 +9280,8 @@ export const SPEC_SITE_LAYOUT = {
9206
9280
  "rules": {
9207
9281
  "seamAudited": true,
9208
9282
  "texturesClearUnderReducedTransparency": true,
9209
- "seamPaintsOnly": true
9283
+ "seamPaintsOnly": true,
9284
+ "seamKeepsClear": true
9210
9285
  },
9211
9286
  "tiers": {
9212
9287
  "seam.straight": "all",
@@ -9215,6 +9290,7 @@ export const SPEC_SITE_LAYOUT = {
9215
9290
  "rules.seamAudited": "all",
9216
9291
  "rules.texturesClearUnderReducedTransparency": "all",
9217
9292
  "rules.seamPaintsOnly": "all",
9293
+ "rules.seamKeepsClear": "all",
9218
9294
  "seam.wave": "pro",
9219
9295
  "seam.drip": "pro",
9220
9296
  "seam.torn": "pro",
@@ -9951,7 +10027,7 @@ export const SPEC_SITE_LAYOUT = {
9951
10027
  "drawnAs": "two"
9952
10028
  },
9953
10029
  "inline.media": {
9954
- "phase": "AW10",
10030
+ "phase": "AW13",
9955
10031
  "drawnAs": "none"
9956
10032
  },
9957
10033
  "gradient.accent": {
@@ -10204,14 +10280,6 @@ export const SPEC_SITE_LAYOUT = {
10204
10280
  "micro.odometer": "a price's digits roll when the period changes"
10205
10281
  },
10206
10282
  "waits": {
10207
- "scrub.words": {
10208
- "phase": "AW10",
10209
- "drawnAs": "never"
10210
- },
10211
- "scrub.entrances": {
10212
- "phase": "AW10",
10213
- "drawnAs": "never"
10214
- },
10215
10283
  "loops.drift": {
10216
10284
  "phase": "AW8",
10217
10285
  "drawnAs": "none"
@@ -10300,6 +10368,10 @@ export const SPEC_SITE_LAYOUT = {
10300
10368
  "lively",
10301
10369
  "expressive"
10302
10370
  ],
10371
+ "scrubLevels": [
10372
+ "lively",
10373
+ "expressive"
10374
+ ],
10303
10375
  "leaveFor": {
10304
10376
  "enter": "exit",
10305
10377
  "expo-out": "expo-out",
@@ -10319,7 +10391,8 @@ export const SPEC_SITE_LAYOUT = {
10319
10391
  "arrive": "enter",
10320
10392
  "move": "fade",
10321
10393
  "cover": "fade",
10322
- "preloader": "none"
10394
+ "preloader": "none",
10395
+ "scrub": "never"
10323
10396
  },
10324
10397
  "coverMaxMs": {
10325
10398
  "cover": 400,
@@ -10362,6 +10435,7 @@ export const SPEC_SITE_LAYOUT = {
10362
10435
  "rules.preloaderCapMs": "all",
10363
10436
  "rules.preloaderLevels": "all",
10364
10437
  "rules.popLevels": "all",
10438
+ "rules.scrubLevels": "all",
10365
10439
  "rules.leaveFor": "all",
10366
10440
  "rules.quietLevels": "all",
10367
10441
  "rules.quiet": "all",
@@ -10924,15 +10998,17 @@ export const SPEC_SITE_LAYOUT = {
10924
10998
  "revealBy": {
10925
10999
  "built": [
10926
11000
  "line",
10927
- "word"
11001
+ "word",
11002
+ "letter"
10928
11003
  ],
10929
- "where": "scene-core TextRevealBy"
11004
+ "where": "scene-core TextRevealBy (letter since AW10)"
10930
11005
  },
10931
11006
  "enterMode": {
10932
11007
  "built": [
10933
- "once"
11008
+ "once",
11009
+ "scrubbed"
10934
11010
  ],
10935
- "where": "every entrance plays once (viewportEnter, once)"
11011
+ "where": "an entrance plays once (viewportEnter, once), or by the scroll (AW10: scrollProgress, until 0.5)"
10936
11012
  },
10937
11013
  "phoneWalk": {
10938
11014
  "built": [],
@@ -10970,20 +11046,6 @@ export const SPEC_SITE_LAYOUT = {
10970
11046
  "tier": "pro",
10971
11047
  "meaning": "a word sits on the bottom edge, cropped by it"
10972
11048
  },
10973
- {
10974
- "key": "revealBy.letter",
10975
- "phase": "AW10",
10976
- "drawnAs": "word",
10977
- "tier": "pro",
10978
- "meaning": "words assemble or light letter by letter (split in the browser only, put back after)"
10979
- },
10980
- {
10981
- "key": "enterMode.scrubbed",
10982
- "phase": "AW10",
10983
- "drawnAs": "once",
10984
- "tier": "pro",
10985
- "meaning": "an entrance follows the scroll instead of playing once"
10986
- },
10987
11049
  {
10988
11050
  "key": "phoneWalk.zigzag",
10989
11051
  "phase": "AW9",