@vectoriox/iox-ui 5.135.0 → 5.137.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 (43) hide show
  1. package/composite-core/index.d.ts +15 -2
  2. package/design-core/index.d.ts +184 -9
  3. package/fesm2022/vectoriox-iox-ui-assist-core.mjs +6 -36
  4. package/fesm2022/vectoriox-iox-ui-assist-core.mjs.map +1 -1
  5. package/fesm2022/vectoriox-iox-ui-composite-core.mjs +28 -1
  6. package/fesm2022/vectoriox-iox-ui-composite-core.mjs.map +1 -1
  7. package/fesm2022/vectoriox-iox-ui-design-core.mjs +296 -48
  8. package/fesm2022/vectoriox-iox-ui-design-core.mjs.map +1 -1
  9. package/fesm2022/vectoriox-iox-ui-generation-core.mjs +1269 -154
  10. package/fesm2022/vectoriox-iox-ui-generation-core.mjs.map +1 -1
  11. package/fesm2022/vectoriox-iox-ui-harness-core.mjs +7 -3
  12. package/fesm2022/vectoriox-iox-ui-harness-core.mjs.map +1 -1
  13. package/fesm2022/vectoriox-iox-ui.mjs +355 -2
  14. package/fesm2022/vectoriox-iox-ui.mjs.map +1 -1
  15. package/generation-core/index.d.ts +481 -89
  16. package/harness-core/index.d.ts +4 -2
  17. package/index.d.ts +105 -3
  18. package/package.json +1 -1
  19. package/src/assist-core/page-sections.ts +4 -31
  20. package/src/composite-core/slider.ts +35 -0
  21. package/src/design-core/design-settings.ts +16 -3
  22. package/src/design-core/design-token.model.ts +3 -0
  23. package/src/design-core/flavor-spec.generated.ts +98 -25
  24. package/src/design-core/motion-language.ts +12 -9
  25. package/src/design-core/preloader-of.ts +26 -0
  26. package/src/design-core/preloader.ts +174 -0
  27. package/src/design-core/public-api.ts +2 -0
  28. package/src/design-core/style-presets.ts +3 -1
  29. package/src/generation-core/carry.ts +37 -0
  30. package/src/generation-core/compose-site.ts +222 -9
  31. package/src/generation-core/node-baselines.generated.ts +2 -1
  32. package/src/generation-core/opening-edit.ts +240 -0
  33. package/src/generation-core/opening-mix.ts +639 -0
  34. package/src/generation-core/patterns.ts +3 -0
  35. package/src/generation-core/plan-wire.ts +26 -4
  36. package/src/generation-core/public-api.ts +2 -0
  37. package/src/generation-core/redesign-run.ts +42 -2
  38. package/src/generation-core/site-build-run.ts +27 -1
  39. package/src/generation-core/site-plan.model.ts +3 -1
  40. package/src/generation-core/site-spec.generated.ts +137 -84
  41. package/src/generation-core/validate-site-plan.ts +5 -3
  42. package/src/harness-core/starting-design.ts +8 -4
  43. package/styles/iox-design.css +32 -0
@@ -6,9 +6,10 @@ import { patternLinkSlots, patternOptionalParts, patternSlots, SITE_PATTERNS } f
6
6
  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
+ import { OpeningIngredient, openingMeaning, openingWireWords, openingWordTier } from './opening-mix';
9
10
  import { shopCategoriesOf } from './shop-plan';
10
11
  import { ContentFieldControl, FIELD_TYPE_OF_CONTROL,
11
- ContentFieldPlan, ContentTypePlan, DataSourcePlan, FactKey, GlobalSlot, PAGE_ARCHETYPES, PagePlan, PageSectionPlan, PlanDataSourceMode, PlanDataSourceType,
12
+ ContentFieldPlan, ContentTypePlan, DataSourcePlan, FactKey, GenerationTier, GlobalSlot, PAGE_ARCHETYPES, PagePlan, PageSectionPlan, PlanDataSourceMode, PlanDataSourceType,
12
13
  RelativeOp, ShopProductPlan, SITE_NEED_IDS, SITE_PLAN_VERSION, SitePlan, SitePlanSource, SiteLocale,
13
14
  } from './site-plan.model';
14
15
  import { SPEC_SITE_PLAN_SHAPE } from './site-spec.generated';
@@ -104,6 +105,18 @@ const FOOTER_WIRE_TEXT = 'string[] — the footer as ONE list of <ingredient>:<w
104
105
  + `each block it holds (holds:pages, holds:contact); an ingredient left out is the default (${footerMixWords(footerMix()).join(', ')}). `
105
106
  + Object.values(FooterIngredient).map(k => `${k}: ${footerWords(k).map(w => `${w} (${footerMeaning(k, w)})`).join(' | ')}`).join('; ');
106
107
 
108
+ /** The wire's `globals` key the home page's opening travels in (AW8) — a mix beside the header's and the footer's. */
109
+ const OPENING_WIRE_KEY = 'opening';
110
+
111
+ /** The opening's words as the model reads them (AW8): each ingredient, the words the product draws, their meanings and
112
+ * which the award plan alone wears, from the contract's opening table. */
113
+ const OPENING_WIRE_TEXT = "string[] — the home page's opening (its first screen) as ONE list of <ingredient>:<word> words: one word per "
114
+ + `ingredient but extras and motion, which list each they take; an ingredient left out is the default; [] = the home page opens with its first `
115
+ + "section as written. The opening takes the place of the home page's first section when that is a hero (its words and pictures carried in); "
116
+ + 'a word marked (award) is worn by an award build only — elsewhere it is mended. '
117
+ + Object.values(OpeningIngredient).map(k => `${k}: ${openingWireWords(GenerationTier.Award).filter(w => w.startsWith(`${k}:`)).map(w => w.slice(k.length + 1))
118
+ .map(w => `${w} (${openingMeaning(k, w)}${openingWordTier(k, w) === 'pro' ? ', award' : ''})`).join(' | ')}`).join('; ');
119
+
107
120
  /** The header's words as the model reads them (HI1): each ingredient, the words the product draws and their meanings,
108
121
  * from the contract's header table. */
109
122
  const HEADER_WIRE_TEXT = 'string[] — the header as ONE list of <ingredient>:<word> words, one word per ingredient; an ingredient left out is the '
@@ -214,6 +227,8 @@ const WIRE_KEYS: Readonly<Record<`${PlanWireEntry}`, Readonly<Record<string, Wir
214
227
  // LI5: the footer travels as its MIX — ONE list of `<ingredient>:<word>` words (footer-mix.ts), every word with its
215
228
  // meaning from the contract's footer table; the plan keeps the pattern it reads as (`globals.footer`) and the mix.
216
229
  footer: { refs: ['globals.footer', 'plan.mixes', 'mixes.footer'], text: FOOTER_WIRE_TEXT },
230
+ // AW8: the home page's opening travels as its MIX, ONE list of `<ingredient>:<word>` words (opening-mix.ts); [] = none.
231
+ opening: { refs: ['plan.mixes', 'mixes.opening'], text: OPENING_WIRE_TEXT },
217
232
  },
218
233
  shopProduct: {
219
234
  name: key('shopProduct.name'),
@@ -397,6 +412,7 @@ const PLAN_TOP_SCHEMAS: Readonly<Record<string, () => JsonSchema>> = {
397
412
  globals: () => shaped(PlanWireEntry.Globals, {
398
413
  [GlobalSlot.Header]: jsonListOf(jsonOneOf(headerWireWords())),
399
414
  [GlobalSlot.Footer]: jsonListOf(jsonOneOf(footerWireWords())),
415
+ [OPENING_WIRE_KEY]: jsonListOf(jsonOneOf(openingWireWords(GenerationTier.Award))),
400
416
  }),
401
417
  direction: () => shaped(PlanWireEntry.Direction, { idea: jsonText(), cliche: jsonText(), flip: jsonText(), rules: jsonListOf(jsonText()) }),
402
418
  shop: () => jsonListOf(wireShopProductJsonSchema()),
@@ -584,8 +600,11 @@ export function expandPlanWire(parts: PlanWireParts, context: PlanWireContext):
584
600
  function expandWireGlobals(globals: unknown): PlainObject {
585
601
  if (globals === undefined) return {};
586
602
  if (!isPlainObject(globals)) return { globals };
587
- const out: PlainObject = { ...globals };
588
- const mixes: Record<string, string[]> = {};
603
+ const { [OPENING_WIRE_KEY]: opening, ...rest } = globals;
604
+ const out: PlainObject = { ...rest };
605
+ const mixes: Record<string, unknown> = {};
606
+ // 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;
589
608
  for (const [slot, readId, fallback] of [
590
609
  [GlobalSlot.Header, (w: string[]) => headerPatternIdOf(headerMixFromWords(w)), DEFAULT_HEADER_PATTERN],
591
610
  [GlobalSlot.Footer, (w: string[]) => footerPatternIdOf(footerMixFromWords(w)), DEFAULT_FOOTER_PATTERN],
@@ -654,7 +673,10 @@ const PLAN_TO_WIRE: Readonly<Record<string, (plan: SitePlan) => unknown>> = {
654
673
  contentTypes: plan => plan.contentTypes.map(type => contentTypeToWire(type)),
655
674
  dataSources: plan => plan.dataSources.map(dataSourceToWire),
656
675
  pages: plan => plan.pages.map(page => pageToWire(page)),
657
- globals: plan => ({ ...plan.globals, [GlobalSlot.Header]: headerMixWords(headerMixOfPlan(plan)), [GlobalSlot.Footer]: footerMixWords(footerMixOfPlan(plan)) }),
676
+ globals: plan => ({
677
+ ...plan.globals, [GlobalSlot.Header]: headerMixWords(headerMixOfPlan(plan)), [GlobalSlot.Footer]: footerMixWords(footerMixOfPlan(plan)),
678
+ [OPENING_WIRE_KEY]: [...(plan.mixes?.opening ?? [])],
679
+ }),
658
680
  direction: plan => ({ idea: plan.direction?.idea ?? NONE, cliche: plan.direction?.cliche ?? NONE, flip: plan.direction?.flip ?? NONE, rules: [...(plan.direction?.rules ?? [])] }),
659
681
  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] })) })),
660
682
  };
@@ -65,6 +65,8 @@ export * from './layout-space';
65
65
  export * from './layout-fingerprint';
66
66
  export * from './header-mix';
67
67
  export * from './header-edit';
68
+ export * from './opening-mix';
69
+ export * from './opening-edit';
68
70
  export * from './footer-mix';
69
71
  export * from './layout-edits';
70
72
  export * from './adjustments';
@@ -1,3 +1,5 @@
1
+ import { DesignChoices, DesignConfigEntry, DesignRevertSnapshot, readDesignConfig } from '@vectoriox/iox-ui/design-core';
2
+
1
3
  import type { ComposedPlaceholder } from './compose-site';
2
4
  import type { LayoutIssue } from './layout-language';
3
5
  import type { SerializedNode } from './serialized-node';
@@ -264,6 +266,38 @@ export interface RedesignBack {
264
266
  error?: BuildStepError;
265
267
  }
266
268
 
269
+ /**
270
+ * The look a run replaced, as iox-cms takes it BEFORE any token is written — a site build's Look step (its Undo) and a
271
+ * redesign's Switch (its Back) store the same shape: the studio's `settings.design` row VERBATIM and the revert snapshot
272
+ * the Apply stores (design-core `designApplySnapshot`).
273
+ */
274
+ export interface LookBefore {
275
+ /** The org's `settings.design` row, or null when the studio had never stored a look. */
276
+ rowId: string | null;
277
+ /** That row's config VERBATIM (its own revert snapshot included), or null. */
278
+ config: DesignConfigEntry[] | null;
279
+ /** The pre-apply tokens and what the apply wrote into each row (null: nothing to revert). */
280
+ snapshot: DesignRevertSnapshot | null;
281
+ /** False when the look was already the one asked for: the apply wrote no token, so a revert reverts none. */
282
+ wroteTokens: boolean;
283
+ }
284
+
285
+ /** A redesign's look: the one the Switch replaced (stored before its first write) and the one it wrote. */
286
+ export interface RedesignLook {
287
+ before: LookBefore;
288
+ /** The identity fingerprint of the design row the Switch wrote (absent: its apply stopped part-way — Back reverts
289
+ * its token writes regardless). */
290
+ applied?: string;
291
+ }
292
+
293
+ /** The choices of the look a Switch replaced — what Back returns to ("Linen · Warm") — or null when the run does not
294
+ * say (not switched yet, or a run stored before the look was). A studio with no design row wore its defaults. */
295
+ export function redesignPreviousChoices(run: Pick<RedesignRun, 'look'> | null | undefined): DesignChoices | null {
296
+ const before = run?.look?.before;
297
+ if (!before) return null;
298
+ return readDesignConfig(before.config, !!before.config).choices;
299
+ }
300
+
267
301
  /** The run as `GET …/site-builds/:id` answers a redesign. */
268
302
  export interface RedesignRun {
269
303
  _id: string;
@@ -278,6 +312,8 @@ export interface RedesignRun {
278
312
  snapshot?: RedesignSnapshot;
279
313
  staged?: RedesignStaged;
280
314
  switch?: RedesignSwitch;
315
+ /** The look the Switch replaced and wrote (absent until the Switch reaches the look). */
316
+ look?: RedesignLook;
281
317
  back?: RedesignBack;
282
318
  requestedBy: string;
283
319
  startedAt: Date | string;
@@ -289,9 +325,13 @@ export interface RedesignBackPreview {
289
325
  open: boolean;
290
326
  until: string | null;
291
327
  restores: string[];
292
- /** Pages edited since the switch: Back leaves them unless the owner names them. */
293
- editedSince: Array<{ pageId: string; name: string }>;
328
+ /** Pages edited since the switch: Back leaves them unless the owner names them. `editedAt` = the page's last edit
329
+ * (ISO; null when the page does not say) — "Your changes from 23 Nov are lost". */
330
+ editedSince: Array<{ pageId: string; name: string; editedAt: string | null }>;
294
331
  revertsLook: boolean;
332
+ /** Look tokens the author edited since the switch that Back would keep (DS8.1) — said BEFORE Back, named. Empty when
333
+ * the look does not go back. */
334
+ keptTokens: string[];
295
335
  }
296
336
 
297
337
  /** `GET …/redesign/:id/switch` — what a Switch would do NOW, before the owner clicks it (RD3): each staged page's result as
@@ -1,4 +1,4 @@
1
- import { ComposedPlaceholder, ComposeIssue } from './compose-site';
1
+ import { ComposedPlaceholder, ComposeIssue, ComposeIssueCode } from './compose-site';
2
2
  import { GenerationTier, SitePlan, SitePlanSource } from './site-plan.model';
3
3
  import { SitePlanIssueCode } from './validate-site-plan';
4
4
  import { planSells } from './shop-plan';
@@ -176,6 +176,15 @@ export enum BuildNoticeCode {
176
176
  KeptPageSkipped = 'kept-page-skipped',
177
177
  /** RD3-D3 (a) Replace: that page moved aside as a draft (`/<route>-previous`) — Undo puts it back. */
178
178
  KeptPageMoved = 'kept-page-moved',
179
+ /** HI1a: the header the plan asked for could not be worn as asked (a long name between two menus, a part the site
180
+ * cannot carry) — the composer mended it, and the run says so; the owner changes it in the builder. */
181
+ HeaderMended = 'header-mended',
182
+ /** AW8: the opening the plan asked for was mended (an award word on a basic build, a part the site cannot carry) —
183
+ * said, so the owner knows the home page opens a little differently and where to change it. */
184
+ OpeningMended = 'opening-mended',
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
+ * holds only some parts) — said like the header's and the opening's. */
187
+ FooterMended = 'footer-mended',
179
188
  }
180
189
 
181
190
  /** 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
@@ -201,6 +210,23 @@ export function previousRoute(route: string, taken: ReadonlyArray<string>): stri
201
210
  return candidate;
202
211
  }
203
212
 
213
+ /** The compose issues the run SAYS (header, opening, footer), each kind once (the wizard tracks a notice by its code): the words of every mend of
214
+ * that kind joined, for the log and the API; the screen shows the code's own sentence. An opening that only found no
215
+ * place for a word it carried is not a mend of the mix, so it is not said. */
216
+ const MEND_NOTICES: ReadonlyArray<readonly [ComposeIssueCode, BuildNoticeCode]> = [
217
+ [ComposeIssueCode.HeaderMended, BuildNoticeCode.HeaderMended],
218
+ [ComposeIssueCode.OpeningMended, BuildNoticeCode.OpeningMended],
219
+ [ComposeIssueCode.FooterMended, BuildNoticeCode.FooterMended],
220
+ ];
221
+ const CARRY_ONLY = /^the opening found no place for /;
222
+
223
+ export function mendNotices(issues: ReadonlyArray<ComposeIssue>): BuildNotice[] {
224
+ return MEND_NOTICES.flatMap(([issue, notice]) => {
225
+ const said = [...new Set(issues.filter(i => i.code === issue && !CARRY_ONLY.test(i.detail)).map(i => i.detail))];
226
+ return said.length ? [{ code: notice, detail: said.join('; ') }] : [];
227
+ });
228
+ }
229
+
204
230
  export interface BuildNotice {
205
231
  code: string;
206
232
  detail: string;
@@ -341,10 +341,12 @@ export interface SitePlan {
341
341
  }
342
342
 
343
343
  /** A part's mix as `<ingredient>:<word>` words (the contract's `site.layout.<part>`): the footer since list ingredients
344
- * LI5 (generation-core footer-mix.ts); the header joins at header ingredients HI1. */
344
+ * LI5 (generation-core footer-mix.ts); the header joins at header ingredients HI1; the home page's opening at AW8
345
+ * (opening-mix.ts — absent or empty: the home page opens with its sections as written). */
345
346
  export interface PlanMixes {
346
347
  readonly header?: ReadonlyArray<string>;
347
348
  readonly footer?: ReadonlyArray<string>;
349
+ readonly opening?: ReadonlyArray<string>;
348
350
  }
349
351
 
350
352
  /** M8 gate 2: the idea a site's composed pages serve — the usual site for the business, and what this one does instead. */
@@ -17,11 +17,12 @@ 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 and footer as mixes of ingredients (ingredients.md); a mix wins over its globals pattern"
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"
21
21
  },
22
22
  "mixes": {
23
23
  "header?": "string[] — the header as <ingredient>:<word> words (site.layout.header; header ingredients HI1)",
24
- "footer?": "string[] — the footer as <ingredient>:<word> words (site.layout.footer; list ingredients LI5)"
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
26
  },
26
27
  "direction": {
27
28
  "idea": "string — one sentence: what this site is about and how it should feel",
@@ -74,7 +75,8 @@ export const SPEC_SITE_PLAN_SHAPE = {
74
75
  "animate?": "string — axes.animations: how much the sections move in as they scroll into view",
75
76
  "between?": "string — axes.betweens: what plays between pages",
76
77
  "feel?": "string — motionLanguage.arrive: the curve things arrive on, the leave follows it (AW3, MB-D5; absent = motionLanguage.defaults.arrive)",
77
- "headings?": "string — motionLanguage.move: how headings arrive (AW3; absent = each How animated level's own heading)"
78
+ "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)"
78
80
  },
79
81
  "contentType": {
80
82
  "name": "string — unique",
@@ -8697,67 +8699,40 @@ export const SPEC_SITE_LAYOUT = {
8697
8699
  "motion.copy-out": "the first screen's words fade as the page leaves it, following the scroll",
8698
8700
  "motion.pinned-covered": "the first screen holds while the next section slides over it"
8699
8701
  },
8702
+ "meaningsHe": {
8703
+ "frame.full": "מקצה לקצה",
8704
+ "frame.inset": "כרטיס מעוגל בתוך החלון, רקע הדף סביבו",
8705
+ "frame.shrinks": "מסך מלא בהתחלה, ומתיישב פעם אחת לכרטיס כשהדף נטען",
8706
+ "frame.grows": "חלון באמצע שגדל עד לקצוות כשהמסך הראשון מגיע",
8707
+ "media.photo": "תמונה",
8708
+ "media.film": "סרטון בלולאה, ותמונת השער שלו כשמבקשים פחות תנועה",
8709
+ "media.slideshow": "תמונות שמתחלפות לבד, עם כפתור עצירה",
8710
+ "media.object": "חפץ אחד במרכז (סרטון או תמונה שלו)",
8711
+ "media.diptych": "שתי תמונות בגובה מלא זו לצד זו; בטלפון נשארת הראשונה",
8712
+ "media.material": "רקע מהמראה של האתר (זוהר מאחורי פסים, רשת נקודות, אור איטי)",
8713
+ "media.live": "טופס אמיתי של האתר במסך הראשון (פנייה, הזמנה)",
8714
+ "words.headline": "כותרת, שורה ופעולה אחת",
8715
+ "words.on-edge": "שורה אחת בגודל המסך שיושבת על הקצה התחתון, חתוכה בו",
8716
+ "words.apart": "שתיים או שלוש מילים ענקיות, מפוזרות על המסך",
8717
+ "words.wordmark": "שם העסק לכל הרוחב, בחזית המסך הראשון",
8718
+ "words.behind": "השם מאחורי הנושא — תמונה גזורה לפני האותיות",
8719
+ "words.none": "הסרטון הוא המסר; שורה קטנה אחת",
8720
+ "extras.card": "כרטיס קטן שמרחף במסך הראשון (פריט, סרטון, הרשמה)",
8721
+ "extras.badge": "תג קטן (פרס, הצעה) — רק של בעל העסק",
8722
+ "extras.cue": "סימן גלילה שקט",
8723
+ "motion.slow-zoom": "התמונה מתקרבת לאט (15 שניות ויותר), ונשארת דוממת כשמבקשים פחות תנועה",
8724
+ "motion.copy-out": "המילים של המסך הראשון נמוגות כשהדף עוזב אותו, עם הגלילה",
8725
+ "motion.pinned-covered": "המסך הראשון נשאר במקומו והחלק הבא מחליק מעליו"
8726
+ },
8700
8727
  "waits": {
8701
- "frame.inset": {
8702
- "phase": "AW8",
8703
- "drawnAs": "full"
8704
- },
8705
- "frame.shrinks": {
8706
- "phase": "AW8",
8707
- "drawnAs": "full"
8708
- },
8709
8728
  "frame.grows": {
8710
8729
  "phase": "AW5",
8711
8730
  "drawnAs": "full"
8712
8731
  },
8713
- "media.diptych": {
8714
- "phase": "AW8",
8715
- "drawnAs": "photo"
8716
- },
8717
8732
  "media.material": {
8718
8733
  "phase": "AW7",
8719
8734
  "drawnAs": "photo"
8720
8735
  },
8721
- "media.live": {
8722
- "phase": "AW8",
8723
- "drawnAs": "photo"
8724
- },
8725
- "words.on-edge": {
8726
- "phase": "AW8",
8727
- "drawnAs": "headline"
8728
- },
8729
- "words.apart": {
8730
- "phase": "AW8",
8731
- "drawnAs": "headline"
8732
- },
8733
- "words.wordmark": {
8734
- "phase": "AW8",
8735
- "drawnAs": "headline"
8736
- },
8737
- "words.none": {
8738
- "phase": "AW8",
8739
- "drawnAs": "headline"
8740
- },
8741
- "words.behind": {
8742
- "phase": "AW8",
8743
- "drawnAs": "headline"
8744
- },
8745
- "extras.card": {
8746
- "phase": "AW8",
8747
- "drawnAs": null
8748
- },
8749
- "extras.badge": {
8750
- "phase": "AW8",
8751
- "drawnAs": null
8752
- },
8753
- "extras.cue": {
8754
- "phase": "AW8",
8755
- "drawnAs": null
8756
- },
8757
- "motion.slow-zoom": {
8758
- "phase": "AW8",
8759
- "drawnAs": null
8760
- },
8761
8736
  "motion.copy-out": {
8762
8737
  "phase": "AW10",
8763
8738
  "drawnAs": null
@@ -8783,6 +8758,111 @@ export const SPEC_SITE_LAYOUT = {
8783
8758
  "media": "object"
8784
8759
  }
8785
8760
  },
8761
+ "gallery": [
8762
+ {
8763
+ "id": "picture-words",
8764
+ "name": "Picture and words",
8765
+ "nameHe": "תמונה ומילים",
8766
+ "words": "Edge to edge · a heading, a line, one button",
8767
+ "wordsHe": "מקצה לקצה · כותרת, שורה, כפתור אחד",
8768
+ "mix": {}
8769
+ },
8770
+ {
8771
+ "id": "in-a-card",
8772
+ "name": "In a card",
8773
+ "nameHe": "בתוך כרטיס",
8774
+ "words": "Inset from the window · a small card inside",
8775
+ "wordsHe": "בתוך החלון · כרטיס קטן בפנים",
8776
+ "mix": {
8777
+ "frame": "inset",
8778
+ "extras": [
8779
+ "card"
8780
+ ]
8781
+ }
8782
+ },
8783
+ {
8784
+ "id": "name-on-edge",
8785
+ "name": "Name on the edge",
8786
+ "nameHe": "השם על הקצה",
8787
+ "words": "A slideshow · the name on the bottom edge",
8788
+ "wordsHe": "תמונות מתחלפות · השם על הקצה התחתון",
8789
+ "mix": {
8790
+ "media": "slideshow",
8791
+ "words": "on-edge"
8792
+ }
8793
+ },
8794
+ {
8795
+ "id": "two-pictures",
8796
+ "name": "Two pictures",
8797
+ "nameHe": "שתי תמונות",
8798
+ "words": "Side by side · a phone keeps the first",
8799
+ "wordsHe": "זו לצד זו · בטלפון נשארת הראשונה",
8800
+ "mix": {
8801
+ "media": "diptych",
8802
+ "words": "on-edge"
8803
+ }
8804
+ },
8805
+ {
8806
+ "id": "name-large",
8807
+ "name": "The name, large",
8808
+ "nameHe": "השם בגדול",
8809
+ "words": "The name full width · a scroll cue",
8810
+ "wordsHe": "השם לכל הרוחב · סימן גלילה",
8811
+ "mix": {
8812
+ "words": "wordmark",
8813
+ "extras": [
8814
+ "cue"
8815
+ ]
8816
+ }
8817
+ },
8818
+ {
8819
+ "id": "words-apart",
8820
+ "name": "Words apart",
8821
+ "nameHe": "מילים מפוזרות",
8822
+ "words": "A film · two or three words across it",
8823
+ "wordsHe": "סרטון · שתיים או שלוש מילים עליו",
8824
+ "mix": {
8825
+ "media": "film",
8826
+ "words": "apart"
8827
+ }
8828
+ },
8829
+ {
8830
+ "id": "film-alone",
8831
+ "name": "The film alone",
8832
+ "nameHe": "הסרטון לבדו",
8833
+ "words": "A looping film · one small line",
8834
+ "wordsHe": "סרטון בלולאה · שורה קטנה אחת",
8835
+ "mix": {
8836
+ "media": "film",
8837
+ "words": "none"
8838
+ }
8839
+ },
8840
+ {
8841
+ "id": "form-first",
8842
+ "name": "A form first",
8843
+ "nameHe": "טופס קודם",
8844
+ "words": "The lead form beside the words",
8845
+ "wordsHe": "טופס הפנייה ליד המילים",
8846
+ "mix": {
8847
+ "media": "live"
8848
+ }
8849
+ },
8850
+ {
8851
+ "id": "slow-zoom",
8852
+ "name": "Slow zoom",
8853
+ "nameHe": "זום איטי",
8854
+ "words": "A picture that slowly comes closer · a card",
8855
+ "wordsHe": "תמונה שמתקרבת לאט · כרטיס",
8856
+ "mix": {
8857
+ "extras": [
8858
+ "card"
8859
+ ],
8860
+ "motion": [
8861
+ "slow-zoom"
8862
+ ]
8863
+ }
8864
+ }
8865
+ ],
8786
8866
  "fingerprint": [
8787
8867
  "frame",
8788
8868
  "media",
@@ -10124,34 +10204,6 @@ export const SPEC_SITE_LAYOUT = {
10124
10204
  "micro.odometer": "a price's digits roll when the period changes"
10125
10205
  },
10126
10206
  "waits": {
10127
- "preloader.mark": {
10128
- "phase": "AW5",
10129
- "drawnAs": "none"
10130
- },
10131
- "preloader.counter": {
10132
- "phase": "AW5",
10133
- "drawnAs": "none"
10134
- },
10135
- "preloader.letters": {
10136
- "phase": "AW5",
10137
- "drawnAs": "none"
10138
- },
10139
- "preloaderExit.fade": {
10140
- "phase": "AW5",
10141
- "drawnAs": "none"
10142
- },
10143
- "preloaderExit.sweep": {
10144
- "phase": "AW5",
10145
- "drawnAs": "none"
10146
- },
10147
- "preloaderExit.window": {
10148
- "phase": "AW5",
10149
- "drawnAs": "none"
10150
- },
10151
- "preloaderExit.lift": {
10152
- "phase": "AW5",
10153
- "drawnAs": "none"
10154
- },
10155
10207
  "scrub.words": {
10156
10208
  "phase": "AW10",
10157
10209
  "drawnAs": "never"
@@ -10266,7 +10318,8 @@ export const SPEC_SITE_LAYOUT = {
10266
10318
  "planFallback": {
10267
10319
  "arrive": "enter",
10268
10320
  "move": "fade",
10269
- "cover": "fade"
10321
+ "cover": "fade",
10322
+ "preloader": "none"
10270
10323
  },
10271
10324
  "coverMaxMs": {
10272
10325
  "cover": 400,
@@ -1,4 +1,4 @@
1
- import { ARRIVE_IDS, flavorPackById, MOVE_IDS, parseHexColor, SPEC_AXES } from '@vectoriox/iox-ui/design-core';
1
+ import { ARRIVE_IDS, flavorPackById, MOVE_IDS, parseHexColor, PRELOADER_IDS, SPEC_AXES } from '@vectoriox/iox-ui/design-core';
2
2
  import { formPresetById } from '@vectoriox/iox-ui/forms-core';
3
3
  import { filmScreensFor, normalizeFrameSequence } from '@vectoriox/iox-ui/media-core';
4
4
  import { SEO_DESCRIPTION_MAX, SEO_TITLE_MAX } from '@vectoriox/iox-ui/seo-core';
@@ -17,6 +17,7 @@ import { LayoutPage } from './layout-language';
17
17
  import { artDirectionIssues } from './art-direction';
18
18
  import { footerMixFromWords } from './footer-mix';
19
19
  import { headerMixFromWords } from './header-mix';
20
+ import { openingMixFromWords } from './opening-mix';
20
21
  import { patternListGap } from './recipe-fields';
21
22
  import { SPEC_SITE_LAYOUT, SPEC_SITE_PLAN_SHAPE } from './site-spec.generated';
22
23
  import {
@@ -51,7 +52,7 @@ export enum SitePlanIssueCode {
51
52
  RouteSource = 'route-source',
52
53
  UnknownPattern = 'unknown-pattern',
53
54
  GlobalPattern = 'global-pattern',
54
- /** A header/footer mix (`mixes`) with a word its part's table lacks, or two words for a one-word ingredient. */
55
+ /** A header, footer or opening mix (`mixes`) with a word its part's table lacks, or two words for a one-word ingredient. */
55
56
  Mix = 'mix',
56
57
  UnknownSlot = 'unknown-slot',
57
58
  UnknownOptionalPart = 'unknown-optional-part',
@@ -254,6 +255,7 @@ function validateDesign(c: Collector, design: unknown): void {
254
255
  };
255
256
  word('feel', ARRIVE_IDS);
256
257
  word('headings', MOVE_IDS);
258
+ word('preloader', PRELOADER_IDS);
257
259
  if (design['mode'] !== undefined && !(SPEC_AXES.modes as ReadonlyArray<unknown>).includes(design['mode'])) bad('mode', `must be one of ${SPEC_AXES.modes.join(', ')}`);
258
260
  if (design['pillButtons'] !== undefined && typeof design['pillButtons'] !== 'boolean') bad('pillButtons', 'must be a boolean');
259
261
  if (design['fonts'] !== undefined && !isObject(design['fonts'])) bad('fonts', 'must be an object');
@@ -737,7 +739,7 @@ function validateGlobals(c: Collector, globals: unknown): void {
737
739
  }
738
740
 
739
741
  /** The parts a plan may carry as a mix, and how each reads its words (only the footer until header ingredients HI1). */
740
- const MIX_READERS: Readonly<Record<string, (words: ReadonlyArray<string>) => unknown>> = { header: headerMixFromWords, footer: footerMixFromWords };
742
+ const MIX_READERS: Readonly<Record<string, (words: ReadonlyArray<string>) => unknown>> = { header: headerMixFromWords, footer: footerMixFromWords, opening: openingMixFromWords };
741
743
 
742
744
  /** `mixes`: each part's words parse in its table (list ingredients LI5); absent is fine. */
743
745
  function validateMixes(c: Collector, mixes: unknown): void {
@@ -1,4 +1,4 @@
1
- import { DesignChoices, presetChoices } from '@vectoriox/iox-ui/design-core';
1
+ import { DesignChoices, presetChoices, PRELOADER_LEVELS } from '@vectoriox/iox-ui/design-core';
2
2
 
3
3
  import { motionFor, MotionInput } from './motion';
4
4
  import { RankInput, rankWithReferences, StyleRead } from './rank';
@@ -15,12 +15,14 @@ import { referenceSeed } from './reference-colour';
15
15
  /**
16
16
  * A preset for this business: its choices, Motion from the business (`motionFor`), the references' colour as its seed
17
17
  * when that colour passes AA in every mode the preset offers (`referenceSeed` — judged as used), and what the owner
18
- * already set kept. The ONE rule for a Look pick and for Build with these.
18
+ * already set kept. The ONE rule for a Look pick and for Build with these. The style's first-visit preloader (AW5) is kept
19
+ * only while the start is Lively or Expressive (PL-D6) — a calm business (its ceiling below Standard) or "little
20
+ * movement" never opens with one.
19
21
  */
20
22
  export function presetDesign(
21
23
  presetId: string,
22
24
  input: MotionInput | string | null,
23
- kept: Partial<Pick<DesignChoices, 'scroll' | 'animate' | 'between' | 'motion' | 'feel' | 'headings'>> = {},
25
+ kept: Partial<Pick<DesignChoices, 'scroll' | 'animate' | 'between' | 'motion' | 'feel' | 'headings' | 'preloader'>> = {},
24
26
  read: StyleRead | null = null,
25
27
  ): DesignChoices | null {
26
28
  const base = presetChoices(presetId);
@@ -28,7 +30,9 @@ export function presetDesign(
28
30
  const motionInput: MotionInput = typeof input === 'object' && input !== null ? input : { businessType: input as string | null };
29
31
  const start = motionFor(motionInput, presetId, read);
30
32
  const seed = referenceSeed(read, presetId);
31
- return { ...base, ...(seed?.used ? { seed: seed.seed } : {}), scroll: start.scroll, animate: start.animate, between: start.between, ...kept };
33
+ const { preloader, ...rest } = base;
34
+ const opens = preloader && PRELOADER_LEVELS.includes(start.animate) ? { preloader } : {};
35
+ return { ...rest, ...opens, ...(seed?.used ? { seed: seed.seed } : {}), scroll: start.scroll, animate: start.animate, between: start.between, ...kept };
32
36
  }
33
37
 
34
38
  export interface StartingDesign {
@@ -1741,3 +1741,35 @@ dialog[data-iox-dialog].iox-es.iox-role-shop-cart-drawer:is([data-iox-closing],
1741
1741
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden;
1742
1742
  clip-path: inset(50%); white-space: nowrap; border: 0;
1743
1743
  }
1744
+
1745
+ /* AW8 — THE OPENING (generation-core `opening-mix.ts`, board award-opening). The nodes hold what reads the same in both
1746
+ directions; the stylesheet holds the inline side and the two motions, in logical insets, so a Hebrew site mirrors.
1747
+ Two classes, so it holds over the parts' own rules (one class each). */
1748
+ .iox-role-opening :is(.iox-role-opening-badge, .iox-role-opening-card, .iox-role-opening-cue) { inset-inline-end: 4%; }
1749
+ /* A display line is one line on a laptop (sized by its measured width) and wraps between words on a phone — never inside
1750
+ a word, never cut by the screen (R-H6). */
1751
+ .iox-role-opening .iox-role-opening-words .iox-role-opening-title { text-wrap: balance; overflow-wrap: normal; }
1752
+ /* On a phone the card leaves the picture's corner and follows the words (board 4), and two pictures become one: the
1753
+ second leaves. The node holds that hide too (`resp.mobile`), but an Image's own component rule (`display: block`, one
1754
+ attribute) comes after the layout's styles on the engine and wins the tie — vectoriox/iox-ui#104 — so the two classes
1755
+ here hold it. The canvas sizes by its frame. */
1756
+ @media (max-width: 767px) {
1757
+ .iox-role-opening .iox-role-opening-card { inset: auto; }
1758
+ .iox-role-opening .iox-role-opening-second { display: none; }
1759
+ }
1760
+ @container iox-canvas (max-width: 767px) {
1761
+ .iox-role-opening .iox-role-opening-card { inset: auto; }
1762
+ .iox-role-opening .iox-role-opening-second { display: none; }
1763
+ }
1764
+ /* The frame settles once from the full screen into its inset card as the page loads (≤ 700 ms, never holding the
1765
+ scroll); a picture comes slowly closer (≥ 15 s, the contract's rules). Both only where motion is welcome — under
1766
+ reduced motion the card is simply inset and the picture still (Emil: gentler, the end state shown at once). */
1767
+ @keyframes iox-opening-settle { from { clip-path: inset(0px round 0px); } }
1768
+ @keyframes iox-opening-zoom { from { scale: 1; } to { scale: 1.08; } }
1769
+ @media (prefers-reduced-motion: no-preference) {
1770
+ .iox-role-opening .iox-role-opening-frame-settles { animation: iox-opening-settle min(var(--iox-dur-slow, 600ms), 700ms) var(--iox-ease-enter, ease-out) both; }
1771
+ /* vectoriox/iox-ui#103: the zoom follows the look's motion axis — under motion Off every duration token is 0ms, and
1772
+ min(dur-slow × 1000, 18s) is 0s there (18s at every other speed, the slowest being 240ms): the picture stands still
1773
+ at its resting crop from the first frame. */
1774
+ .iox-role-opening .iox-role-opening-media-zooms { animation: iox-opening-zoom min(calc(var(--iox-dur-slow, 320ms) * 1000), 18s) var(--iox-ease-enter, ease-out) both; }
1775
+ }