@vectoriox/iox-ui 5.134.0 → 5.136.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 (38) hide show
  1. package/composite-core/index.d.ts +15 -2
  2. package/design-core/index.d.ts +153 -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 +241 -48
  8. package/fesm2022/vectoriox-iox-ui-design-core.mjs.map +1 -1
  9. package/fesm2022/vectoriox-iox-ui-generation-core.mjs +1291 -126
  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/generation-core/index.d.ts +485 -61
  14. package/harness-core/index.d.ts +4 -2
  15. package/package.json +1 -1
  16. package/src/assist-core/page-sections.ts +4 -31
  17. package/src/composite-core/slider.ts +35 -0
  18. package/src/design-core/design-settings.ts +16 -3
  19. package/src/design-core/design-token.model.ts +3 -0
  20. package/src/design-core/flavor-spec.generated.ts +98 -25
  21. package/src/design-core/motion-language.ts +12 -9
  22. package/src/design-core/preloader.ts +129 -0
  23. package/src/design-core/public-api.ts +1 -0
  24. package/src/design-core/style-presets.ts +3 -1
  25. package/src/generation-core/carry.ts +37 -0
  26. package/src/generation-core/compose-site.ts +222 -9
  27. package/src/generation-core/node-baselines.generated.ts +2 -1
  28. package/src/generation-core/opening-edit.ts +240 -0
  29. package/src/generation-core/opening-mix.ts +639 -0
  30. package/src/generation-core/patterns.ts +3 -0
  31. package/src/generation-core/plan-wire.ts +26 -4
  32. package/src/generation-core/public-api.ts +2 -0
  33. package/src/generation-core/site-build-run.ts +70 -1
  34. package/src/generation-core/site-plan.model.ts +3 -1
  35. package/src/generation-core/site-spec.generated.ts +137 -56
  36. package/src/generation-core/validate-site-plan.ts +5 -3
  37. package/src/harness-core/starting-design.ts +8 -4
  38. 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,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';
@@ -83,6 +83,9 @@ export enum CreatedKind {
83
83
  ShopProduct = 'shop-product',
84
84
  DataSource = 'data-source',
85
85
  Page = 'page',
86
+ /** RD3-D3 (a) Replace: a page an earlier Undo kept, moved aside (`/<route>-previous`, a draft) so the plan's page takes
87
+ * its address — Undo puts it back while it is as the move left it and its address is free (`CreatedRecord.from`). */
88
+ PageMoved = 'page-moved',
86
89
  Global = 'global',
87
90
  Look = 'look',
88
91
  }
@@ -124,6 +127,8 @@ export interface CreatedRecord {
124
127
  url?: string;
125
128
  /** `content-type-fields`: the fields the build added. */
126
129
  fields?: string[];
130
+ /** `page-moved`: where the page was and its status before the move — what Undo puts back. */
131
+ from?: { route: string; status: string };
127
132
  }
128
133
 
129
134
  export interface UndoKept {
@@ -166,6 +171,56 @@ export enum BuildNoticeCode {
166
171
  /** Commerce G2: the facts the owner gave (email, phone, address) became the shop's contact details where it had none
167
172
  * — said, so the owner adds what only they know (the legal name, the business number) in Shop ▸ Settings. */
168
173
  ShopBusinessFromFacts = 'shop-business-from-facts',
174
+ /** RD3-D3 (a) Keep mine: a page an earlier Undo kept stays at an address the plan builds — the plan's page there is
175
+ * not built. */
176
+ KeptPageSkipped = 'kept-page-skipped',
177
+ /** RD3-D3 (a) Replace: that page moved aside as a draft (`/<route>-previous`) — Undo puts it back. */
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
+ }
186
+
187
+ /** 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
188
+ * pair (`replaceGlobals`), for pages. */
189
+ export enum KeptPagesChoice {
190
+ /** Build every other page; leave these as they are. */
191
+ Keep = 'keep',
192
+ /** Move each aside as a draft at `/<route>-previous` and build the plan's page at its address. Nothing is deleted. */
193
+ Replace = 'replace',
194
+ }
195
+
196
+ /** The suffix a replaced page's address takes. */
197
+ export const PREVIOUS_ROUTE_SUFFIX = '-previous';
198
+
199
+ /** Where a page moved aside goes: `/<route>-previous`, then `-previous-2`… — never an address in `taken` (shapes
200
+ * compared case-insensitively, trailing slash ignored). The home page (`/`) goes to `/home-previous`. */
201
+ export function previousRoute(route: string, taken: ReadonlyArray<string>): string {
202
+ const key = (r: string) => (r.replace(/\/+$/, '') || '/').toLowerCase();
203
+ const held = new Set(taken.map(key));
204
+ const base = `${route.replace(/\/+$/, '') || '/home'}${PREVIOUS_ROUTE_SUFFIX}`.replace(/^\/\//, '/');
205
+ let candidate = base;
206
+ for (let n = 2; held.has(key(candidate)); n++) candidate = `${base}-${n}`;
207
+ return candidate;
208
+ }
209
+
210
+ /** The compose issues the run SAYS, each kind once (the wizard tracks a notice by its code): the words of every mend of
211
+ * that kind joined, for the log and the API; the screen shows the code's own sentence. An opening that only found no
212
+ * place for a word it carried is not a mend of the mix, so it is not said. */
213
+ const MEND_NOTICES: ReadonlyArray<readonly [ComposeIssueCode, BuildNoticeCode]> = [
214
+ [ComposeIssueCode.HeaderMended, BuildNoticeCode.HeaderMended],
215
+ [ComposeIssueCode.OpeningMended, BuildNoticeCode.OpeningMended],
216
+ ];
217
+ const CARRY_ONLY = /^the opening found no place for /;
218
+
219
+ export function mendNotices(issues: ReadonlyArray<ComposeIssue>): BuildNotice[] {
220
+ return MEND_NOTICES.flatMap(([issue, notice]) => {
221
+ const said = [...new Set(issues.filter(i => i.code === issue && !CARRY_ONLY.test(i.detail)).map(i => i.detail))];
222
+ return said.length ? [{ code: notice, detail: said.join('; ') }] : [];
223
+ });
169
224
  }
170
225
 
171
226
  export interface BuildNotice {
@@ -227,6 +282,9 @@ export enum PreflightRefusalCode {
227
282
  GlobalsNeedDecision = 'globals-need-decision',
228
283
  /** A global the plan adds has the id of one the studio keeps. */
229
284
  GlobalTaken = 'global-taken',
285
+ /** RD3-D3 (a): a page an earlier Undo kept (published or edited) sits at an address the plan builds — Keep mine or
286
+ * Replace them is the caller's choice (`KeptPagesChoice`). A page made by hand there stays a plain `route-taken`. */
287
+ KeptPageNeedsDecision = 'kept-page-needs-decision',
230
288
  }
231
289
 
232
290
  export interface PreflightRefusal {
@@ -236,6 +294,16 @@ export interface PreflightRefusal {
236
294
  detail: string;
237
295
  /** For `invalid-plan`: the validator's issue code. */
238
296
  issue?: SitePlanIssueCode;
297
+ /** For `kept-page-needs-decision` (RD3-D3): the kept page as the owner knows it — said in their language. */
298
+ kept?: KeptPageRefusal;
299
+ }
300
+
301
+ /** RD3-D3: a page an earlier build's Undo kept, standing at an address the plan needs. */
302
+ export interface KeptPageRefusal {
303
+ pageId: string;
304
+ name: string;
305
+ route: string;
306
+ reason: KeptReason;
239
307
  }
240
308
 
241
309
  /**
@@ -255,6 +323,7 @@ export const buildKeys = {
255
323
  page: (key: string) => `page:${key}`,
256
324
  global: (nodeId: string) => `global:${nodeId}`,
257
325
  look: () => 'look',
326
+ pageMoved: (pageId: string) => `page-moved:${pageId}`,
258
327
  } as const;
259
328
 
260
329
  /** The id of the page a run made for the plan's home page, or null (not made yet, or no home page). */
@@ -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",
@@ -10266,7 +10346,8 @@ export const SPEC_SITE_LAYOUT = {
10266
10346
  "planFallback": {
10267
10347
  "arrive": "enter",
10268
10348
  "move": "fade",
10269
- "cover": "fade"
10349
+ "cover": "fade",
10350
+ "preloader": "none"
10270
10351
  },
10271
10352
  "coverMaxMs": {
10272
10353
  "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
+ }