@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
@@ -2216,6 +2216,19 @@ const SPEC_MOTION_LANGUAGE = {
2216
2216
  "pop": "cubic-bezier(0.34, 1.56, 0.64, 1)",
2217
2217
  "exit": "cubic-bezier(0.25, 1, 0.5, 1)"
2218
2218
  },
2219
+ "preloader": [
2220
+ "none",
2221
+ "mark",
2222
+ "counter",
2223
+ "letters"
2224
+ ],
2225
+ "preloaderExit": [
2226
+ "none",
2227
+ "fade",
2228
+ "sweep",
2229
+ "window",
2230
+ "lift"
2231
+ ],
2219
2232
  "tiers": {
2220
2233
  "arrive": {
2221
2234
  "enter": "all",
@@ -2248,6 +2261,12 @@ const SPEC_MOTION_LANGUAGE = {
2248
2261
  "veil": "pro",
2249
2262
  "interstitial": "pro",
2250
2263
  "controls": "pro"
2264
+ },
2265
+ "preloader": {
2266
+ "none": "all",
2267
+ "mark": "pro",
2268
+ "counter": "pro",
2269
+ "letters": "pro"
2251
2270
  }
2252
2271
  },
2253
2272
  "meanings": {
@@ -2272,122 +2291,170 @@ const SPEC_MOTION_LANGUAGE = {
2272
2291
  "clear-care": {
2273
2292
  "arrive": "quart-out",
2274
2293
  "leave": "quart-out",
2275
- "move": "rise"
2294
+ "move": "rise",
2295
+ "preloader": "none",
2296
+ "preloaderExit": "none"
2276
2297
  },
2277
2298
  "swiss-grid": {
2278
2299
  "arrive": "quart-out",
2279
2300
  "leave": "quart-out",
2280
- "move": "clip"
2301
+ "move": "clip",
2302
+ "preloader": "none",
2303
+ "preloaderExit": "none"
2281
2304
  },
2282
2305
  "trusted-advisor": {
2283
2306
  "arrive": "quart-out",
2284
2307
  "leave": "quart-out",
2285
- "move": "rise"
2308
+ "move": "rise",
2309
+ "preloader": "none",
2310
+ "preloaderExit": "none"
2286
2311
  },
2287
2312
  "fresh-practice": {
2288
2313
  "arrive": "expo-out",
2289
2314
  "leave": "quart-out",
2290
- "move": "fade"
2315
+ "move": "fade",
2316
+ "preloader": "none",
2317
+ "preloaderExit": "none"
2291
2318
  },
2292
2319
  "gallery-minimal": {
2293
2320
  "arrive": "expo-out",
2294
2321
  "leave": "quart-out",
2295
- "move": "fade"
2322
+ "move": "fade",
2323
+ "preloader": "none",
2324
+ "preloaderExit": "none"
2296
2325
  },
2297
2326
  "warm-editorial": {
2298
2327
  "arrive": "quart-out",
2299
2328
  "leave": "quart-out",
2300
- "move": "mask-rise"
2329
+ "move": "mask-rise",
2330
+ "preloader": "none",
2331
+ "preloaderExit": "none"
2301
2332
  },
2302
2333
  "soft-spa": {
2303
2334
  "arrive": "expo-out",
2304
2335
  "leave": "quart-out",
2305
- "move": "blur-in"
2336
+ "move": "blur-in",
2337
+ "preloader": "none",
2338
+ "preloaderExit": "none"
2306
2339
  },
2307
2340
  "quiet-luxury": {
2308
2341
  "arrive": "expo-out",
2309
2342
  "leave": "expo-out",
2310
- "move": "fade"
2343
+ "move": "fade",
2344
+ "preloader": "none",
2345
+ "preloaderExit": "none"
2311
2346
  },
2312
2347
  "after-dark": {
2313
2348
  "arrive": "expo-out",
2314
2349
  "leave": "quart-out",
2315
- "move": "mask-rise"
2350
+ "move": "mask-rise",
2351
+ "preloader": "mark",
2352
+ "preloaderExit": "lift"
2316
2353
  },
2317
2354
  "ink-studio": {
2318
2355
  "arrive": "quart-out",
2319
2356
  "leave": "quart-out",
2320
- "move": "mask-rise"
2357
+ "move": "mask-rise",
2358
+ "preloader": "none",
2359
+ "preloaderExit": "none"
2321
2360
  },
2322
2361
  "night-gallery": {
2323
2362
  "arrive": "expo-out",
2324
2363
  "leave": "quart-out",
2325
- "move": "blur-in"
2364
+ "move": "blur-in",
2365
+ "preloader": "none",
2366
+ "preloaderExit": "none"
2326
2367
  },
2327
2368
  "tech-studio": {
2328
2369
  "arrive": "quart-out",
2329
2370
  "leave": "quart-out",
2330
- "move": "words-lit"
2371
+ "move": "words-lit",
2372
+ "preloader": "counter",
2373
+ "preloaderExit": "window"
2331
2374
  },
2332
2375
  "morning-glass": {
2333
2376
  "arrive": "expo-out",
2334
2377
  "leave": "quart-out",
2335
- "move": "blur-in"
2378
+ "move": "blur-in",
2379
+ "preloader": "none",
2380
+ "preloaderExit": "none"
2336
2381
  },
2337
2382
  "holiday-light": {
2338
2383
  "arrive": "spring",
2339
2384
  "leave": "quart-out",
2340
- "move": "rise"
2385
+ "move": "rise",
2386
+ "preloader": "none",
2387
+ "preloaderExit": "none"
2341
2388
  },
2342
2389
  "frosted-portfolio": {
2343
2390
  "arrive": "expo-out",
2344
2391
  "leave": "quart-out",
2345
- "move": "blur-in"
2392
+ "move": "blur-in",
2393
+ "preloader": "none",
2394
+ "preloaderExit": "none"
2346
2395
  },
2347
2396
  "coral-studio": {
2348
2397
  "arrive": "pop",
2349
2398
  "leave": "quart-out",
2350
- "move": "rise"
2399
+ "move": "rise",
2400
+ "preloader": "none",
2401
+ "preloaderExit": "none"
2351
2402
  },
2352
2403
  "corner-cafe": {
2353
2404
  "arrive": "spring",
2354
2405
  "leave": "quart-out",
2355
- "move": "rise"
2406
+ "move": "rise",
2407
+ "preloader": "mark",
2408
+ "preloaderExit": "fade"
2356
2409
  },
2357
2410
  "kind-community": {
2358
2411
  "arrive": "quart-out",
2359
2412
  "leave": "quart-out",
2360
- "move": "rise"
2413
+ "move": "rise",
2414
+ "preloader": "none",
2415
+ "preloaderExit": "none"
2361
2416
  },
2362
2417
  "little-ones": {
2363
2418
  "arrive": "pop",
2364
2419
  "leave": "quart-out",
2365
- "move": "rise"
2420
+ "move": "rise",
2421
+ "preloader": "none",
2422
+ "preloaderExit": "none"
2366
2423
  },
2367
2424
  "garden-party": {
2368
2425
  "arrive": "spring",
2369
2426
  "leave": "quart-out",
2370
- "move": "rise"
2427
+ "move": "rise",
2428
+ "preloader": "none",
2429
+ "preloaderExit": "none"
2371
2430
  },
2372
2431
  "bold-maker": {
2373
2432
  "arrive": "pop",
2374
2433
  "leave": "quart-out",
2375
- "move": "mask-rise"
2434
+ "move": "mask-rise",
2435
+ "preloader": "counter",
2436
+ "preloaderExit": "sweep"
2376
2437
  },
2377
2438
  "festival": {
2378
2439
  "arrive": "pop",
2379
2440
  "leave": "quart-out",
2380
- "move": "rise"
2441
+ "move": "rise",
2442
+ "preloader": "letters",
2443
+ "preloaderExit": "fade"
2381
2444
  },
2382
2445
  "zine": {
2383
2446
  "arrive": "quart-out",
2384
2447
  "leave": "quart-out",
2385
- "move": "clip"
2448
+ "move": "clip",
2449
+ "preloader": "letters",
2450
+ "preloaderExit": "sweep"
2386
2451
  },
2387
2452
  "fresh-market": {
2388
2453
  "arrive": "spring",
2389
2454
  "leave": "quart-out",
2390
- "move": "rise"
2455
+ "move": "rise",
2456
+ "preloader": "none",
2457
+ "preloaderExit": "none"
2391
2458
  }
2392
2459
  },
2393
2460
  "leaveFor": {
@@ -2413,13 +2480,19 @@ const SPEC_MOTION_LANGUAGE = {
2413
2480
  "planFallback": {
2414
2481
  "arrive": "enter",
2415
2482
  "move": "fade",
2416
- "cover": "fade"
2483
+ "cover": "fade",
2484
+ "preloader": "none"
2417
2485
  },
2418
2486
  "coverMaxMs": {
2419
2487
  "cover": 400,
2420
2488
  "hold": 120,
2421
2489
  "uncover": 500
2422
2490
  },
2491
+ "preloaderCapMs": 1500,
2492
+ "preloaderLevels": [
2493
+ "lively",
2494
+ "expressive"
2495
+ ],
2423
2496
  "reduced": {
2424
2497
  "enter": "fade",
2425
2498
  "enterMaxMs": 200
@@ -23378,10 +23451,10 @@ function missingFontRoles(tokens, uploaded) {
23378
23451
  * arrival, the fast ease-out leave of MB-D1) and NO move, so every level keeps its own heading entrance (MB-D8 — a
23379
23452
  * built page keeps what it was stamped with until a look is applied).
23380
23453
  */
23381
- const L = SPEC_MOTION_LANGUAGE;
23382
- const ARRIVE_IDS = L.arrive;
23383
- const LEAVE_IDS = L.leave;
23384
- const MOVE_IDS = L.move;
23454
+ const L$1 = SPEC_MOTION_LANGUAGE;
23455
+ const ARRIVE_IDS = L$1.arrive;
23456
+ const LEAVE_IDS = L$1.leave;
23457
+ const MOVE_IDS = L$1.move;
23385
23458
  /** The plan tier a word is offered on (AW-D23): `all` every plan, `pro` Pro and Studio. */
23386
23459
  var MotionWordTier;
23387
23460
  (function (MotionWordTier) {
@@ -23393,11 +23466,12 @@ const SPRING_CURVE_TOKEN = 'ease-spring';
23393
23466
  const SPRING_REF = /^\{\{([a-z0-9-]+)\}\}$/;
23394
23467
  const isArriveId = (v) => typeof v === 'string' && ARRIVE_IDS.includes(v);
23395
23468
  const isMoveId = (v) => typeof v === 'string' && MOVE_IDS.includes(v);
23396
- const PRESET_LANGUAGE = L.presets;
23397
- const LEAVE_FOR = L.leaveFor;
23398
- const TIERS = L.tiers;
23399
- const PLAN_FALLBACK = L.planFallback;
23400
- /** A style preset's own language (its Feel and Headings arrive) — undefined for an unknown id. */
23469
+ const PRESET_LANGUAGE = L$1.presets;
23470
+ const LEAVE_FOR = L$1.leaveFor;
23471
+ const TIERS = L$1.tiers;
23472
+ const PLAN_FALLBACK = L$1.planFallback;
23473
+ /** A style preset's own language (its Feel, Headings arrive and first-visit preloader with its exit) — undefined for an
23474
+ * unknown id. */
23401
23475
  function presetMotionLanguage(presetId) {
23402
23476
  return presetId ? PRESET_LANGUAGE[presetId] : undefined;
23403
23477
  }
@@ -23407,30 +23481,30 @@ function motionWordTier(kind, word) {
23407
23481
  }
23408
23482
  /** `pop` overshoots: only a Lively or Expressive look arrives on it (contract `popLevels`). */
23409
23483
  function popAllowed(animate) {
23410
- return L.popLevels.includes(String(animate ?? ''));
23484
+ return L$1.popLevels.includes(String(animate ?? ''));
23411
23485
  }
23412
23486
  /**
23413
23487
  * The language a set of choices wears. The leave follows Feel (MB-D5): the preset's own pair when Feel is still its
23414
23488
  * arrival, else the contract's `leaveFor`. A `pop` Feel on a level that may not overshoot settles as expo-out.
23415
23489
  */
23416
23490
  function motionLanguageOf(choices, presetId) {
23417
- let arrive = isArriveId(choices.feel) ? choices.feel : L.defaults.arrive;
23491
+ let arrive = isArriveId(choices.feel) ? choices.feel : L$1.defaults.arrive;
23418
23492
  if (arrive === 'pop' && choices.animate !== undefined && !popAllowed(choices.animate))
23419
23493
  arrive = 'expo-out';
23420
23494
  const own = presetMotionLanguage(presetId ?? null);
23421
- const leave = own && own.arrive === arrive ? own.leave : (LEAVE_FOR[arrive] ?? L.defaults.leave);
23495
+ const leave = own && own.arrive === arrive ? own.leave : (LEAVE_FOR[arrive] ?? L$1.defaults.leave);
23422
23496
  return { arrive, leave, move: isMoveId(choices.headings) ? choices.headings : null };
23423
23497
  }
23424
23498
  /** The CSS timing function of an arrive / leave word; `spring` reads the look's own spring row. */
23425
23499
  function motionCurve(word, tokenValue = () => undefined) {
23426
- const curve = L.curves[word] ?? '';
23500
+ const curve = L$1.curves[word] ?? '';
23427
23501
  const ref = SPRING_REF.exec(curve);
23428
23502
  return ref ? (tokenValue(ref[1]) ?? 'linear') : curve;
23429
23503
  }
23430
23504
  /**
23431
23505
  * What a lower plan wears of a language (AW-D23, MB-D6): a Pro word is drawn as the plan's own (the contract's
23432
- * `planFallback`) — Feel today's arrival, a Pro move a fade, a Pro cover (AW4) a fade between pages. Applied where a
23433
- * look is CHOSEN (a Look pick, a build); a built site keeps its words.
23506
+ * `planFallback`) — Feel today's arrival, a Pro move a fade, a Pro cover (AW4) a fade between pages, a preloader (AW5)
23507
+ * none. Applied where a look is CHOSEN (a Look pick, a build); a built site keeps its words.
23434
23508
  */
23435
23509
  function motionLanguageForPlan(choices, pro) {
23436
23510
  if (pro)
@@ -23441,18 +23515,123 @@ function motionLanguageForPlan(choices, pro) {
23441
23515
  const out = { ...choices, feel, headings };
23442
23516
  if (proWord('cover', choices.between))
23443
23517
  out.between = PLAN_FALLBACK.cover;
23518
+ if (proWord('preloader', choices.preloader))
23519
+ out.preloader = PLAN_FALLBACK.preloader;
23444
23520
  return out;
23445
23521
  }
23446
23522
  /** The reduced-motion floor (AW-D6): an entrance is a fade this long at most — gentler, never zero. */
23447
- const REDUCED_ENTRANCE_MAX_MS = L.reduced.enterMaxMs;
23523
+ const REDUCED_ENTRANCE_MAX_MS = L$1.reduced.enterMaxMs;
23448
23524
  /** MB-D7: a travelling move plays its quiet form on these levels (rise 8 px, mask lines together, clip from 85 %). */
23449
- const QUIET_LEVELS = L.quietLevels;
23450
- const QUIET_MOVE = L.quiet;
23525
+ const QUIET_LEVELS = L$1.quietLevels;
23526
+ const QUIET_MOVE = L$1.quiet;
23451
23527
  /** An exit takes about this share of its entrance's time (Emil: exits faster than entrances). */
23452
- const LEAVE_SHARE = L.leaveShare;
23528
+ const LEAVE_SHARE = L$1.leaveShare;
23453
23529
  /** Every preset id the contract gives a language to — all 24 (build-spec refuses one without). */
23454
23530
  const MOTION_LANGUAGE_PRESET_IDS = SPEC_STYLE_PRESETS.map(p => p.id).filter(id => id in PRESET_LANGUAGE);
23455
23531
 
23532
+ /**
23533
+ * THE FIRST-VISIT PRELOADER (award-ingredients-plan §5.3, AW5; Preloader board PL-D1…PL-D9) — pure, framework-free.
23534
+ *
23535
+ * A look may open a visitor's FIRST page of a session with a short preloader — the brand mark, a 0 → 100 count of real
23536
+ * loading, or the opening's first words letter by letter — that leaves by the look's own exit. ONE decision here
23537
+ * (`planPreloader`) for the engine's runtime, every builder preview and the generator; the rules are the contract's
23538
+ * (`layout.mjs` MOTION → `SPEC_MOTION_LANGUAGE`): ≤ `preloaderCapMs`, Lively / Expressive looks only, a Pro word, never
23539
+ * under reduced motion, never on a return visit. The page's words are always painted under it (T1); it never holds the
23540
+ * scroll — a scroll, key or tap ends it (PL-D4).
23541
+ */
23542
+ const L = SPEC_MOTION_LANGUAGE;
23543
+ /** What opens the first visit (`design.preloader`). */
23544
+ var PreloaderKind;
23545
+ (function (PreloaderKind) {
23546
+ PreloaderKind["None"] = "none";
23547
+ /** The header's brand — its logo, else the business name in the display face. */
23548
+ PreloaderKind["Mark"] = "mark";
23549
+ /** A 0 → 100 count of the first screen's real loading (pictures + fonts), in the display face. */
23550
+ PreloaderKind["Counter"] = "counter";
23551
+ /** The opening heading's first words, letter by letter. */
23552
+ PreloaderKind["Letters"] = "letters";
23553
+ })(PreloaderKind || (PreloaderKind = {}));
23554
+ /** How it leaves — the look's own, never a separate choice (PL-D3). */
23555
+ var PreloaderExit;
23556
+ (function (PreloaderExit) {
23557
+ PreloaderExit["None"] = "none";
23558
+ PreloaderExit["Fade"] = "fade";
23559
+ /** An accent panel leaves upward. */
23560
+ PreloaderExit["Sweep"] = "sweep";
23561
+ /** A frame grows from the centre. */
23562
+ PreloaderExit["Window"] = "window";
23563
+ /** The whole layer rises away. */
23564
+ PreloaderExit["Lift"] = "lift";
23565
+ })(PreloaderExit || (PreloaderExit = {}));
23566
+ const PRELOADER_IDS = L.preloader;
23567
+ const PRELOADER_EXIT_IDS = L.preloaderExit;
23568
+ /** AW-D7: a preloader leaves at the first screen's readiness or this many ms, whichever first. */
23569
+ const PRELOADER_CAP_MS = L.preloaderCapMs;
23570
+ /** The How animated levels a preloader is offered on. */
23571
+ const PRELOADER_LEVELS = L.preloaderLevels;
23572
+ /** A preloader's exit takes at most this long (Emil: exits are short; ≤ the covers' uncover). */
23573
+ const PRELOADER_EXIT_MAX_MS = 500;
23574
+ /** Letters shows the opening heading only while it is this short (PL-D2); a longer one shows the business name. */
23575
+ const PRELOADER_LETTERS_MAX = 24;
23576
+ const isPreloaderKind = (v) => typeof v === 'string' && PRELOADER_IDS.includes(v);
23577
+ /** The ONE decision: what opens this visit, or null for nothing (the page is simply there). */
23578
+ function planPreloader(input) {
23579
+ const kind = input.preloader;
23580
+ if (!isPreloaderKind(kind) || kind === PreloaderKind.None)
23581
+ return null;
23582
+ if (input.reducedMotion || !input.firstVisit)
23583
+ return null;
23584
+ if (!PRELOADER_LEVELS.includes(String(input.animate ?? '')))
23585
+ return null;
23586
+ if (!input.pro && motionWordTier('preloader', kind) === MotionWordTier.Pro)
23587
+ return null;
23588
+ return { kind: kind, exit: preloaderExitOf(input.presetId), capMs: PRELOADER_CAP_MS };
23589
+ }
23590
+ /** The look's exit (PL-D3): the preset's own, else a fade. */
23591
+ function preloaderExitOf(presetId) {
23592
+ const own = presetMotionLanguage(presetId ?? null)?.preloaderExit;
23593
+ return own && own !== PreloaderExit.None && PRELOADER_EXIT_IDS.includes(own) ? own : PreloaderExit.Fade;
23594
+ }
23595
+ /** When it leaves (PL-D4): at the page's readiness, never past the cap; a reading not yet known waits for the cap. */
23596
+ function preloaderLeaveAt(readyMs, capMs = PRELOADER_CAP_MS) {
23597
+ if (typeof readyMs !== 'number' || !Number.isFinite(readyMs) || readyMs < 0)
23598
+ return capMs;
23599
+ return Math.min(readyMs, capMs);
23600
+ }
23601
+ /**
23602
+ * PL-D5: a first visit is the session's first page in this tab AND not reached from another page of the same site
23603
+ * (a new tab opened from the site, a reload after Back). `seen` = the tab's session memory; `referrer` and `origin`
23604
+ * as the browser reports them.
23605
+ */
23606
+ function isFirstVisit(seen, referrer, origin) {
23607
+ if (seen)
23608
+ return false;
23609
+ if (!referrer || !origin)
23610
+ return true;
23611
+ try {
23612
+ return new URL(referrer).origin !== new URL(origin).origin;
23613
+ }
23614
+ catch {
23615
+ return true;
23616
+ }
23617
+ }
23618
+ /**
23619
+ * The counter's number (PL-D2): real loading only — `loaded` of `total` first-screen resources, a whole percent that
23620
+ * never goes back; nothing to load reads 100. Never a timer.
23621
+ */
23622
+ function preloaderPercent(loaded, total, previous = 0) {
23623
+ const t = Math.max(0, Math.floor(total));
23624
+ const raw = t === 0 ? 100 : Math.floor((100 * Math.min(Math.max(0, loaded), t)) / t);
23625
+ return Math.max(Math.min(100, Math.max(0, Math.floor(previous))), raw);
23626
+ }
23627
+ /** PL-D2: what Letters spells — the opening heading while it is short enough, else the business name. */
23628
+ function preloaderWords(heading, businessName) {
23629
+ const h = String(heading ?? '').replace(/\s+/g, ' ').trim();
23630
+ if (h && Array.from(h).length <= PRELOADER_LETTERS_MAX)
23631
+ return h;
23632
+ return String(businessName ?? '').replace(/\s+/g, ' ').trim() || Array.from(h).slice(0, PRELOADER_LETTERS_MAX).join('');
23633
+ }
23634
+
23456
23635
  /**
23457
23636
  * The `settings.design` row (design-system plan §3f), read and written by ONE pair of functions so
23458
23637
  * the builder, the server's public page read (the engine's mode) and the site build agree on what a
@@ -23480,6 +23659,8 @@ var DesignConfigKey;
23480
23659
  DesignConfigKey["Between"] = "between";
23481
23660
  DesignConfigKey["Feel"] = "feel";
23482
23661
  DesignConfigKey["Headings"] = "headings";
23662
+ /** AW5: the first-visit preloader (a `PreloaderKind`); absent = none. */
23663
+ DesignConfigKey["Preloader"] = "preloader";
23483
23664
  DesignConfigKey["Revert"] = "revert";
23484
23665
  })(DesignConfigKey || (DesignConfigKey = {}));
23485
23666
  const MODES = SPEC_AXES.modes;
@@ -23561,11 +23742,18 @@ function resolveDesignChoices(partial) {
23561
23742
  ...resolveMotionLanguageChoices(partial),
23562
23743
  };
23563
23744
  }
23564
- /** The look's motion language as stored: a known Feel / Headings word is kept, anything else is absent (AW3). */
23745
+ /** The look's motion language as stored: a known Feel / Headings word (AW3) or first-visit preloader (AW5) is kept,
23746
+ * anything else is absent. */
23565
23747
  function resolveMotionLanguageChoices(partial) {
23566
23748
  const feel = asString(partial?.feel);
23567
23749
  const headings = asString(partial?.headings);
23568
- return { ...(isArriveId(feel) ? { feel } : {}), ...(isMoveId(headings) ? { headings } : {}) };
23750
+ const preloader = asString(partial?.preloader);
23751
+ return {
23752
+ ...(isArriveId(feel) ? { feel } : {}),
23753
+ ...(isMoveId(headings) ? { headings } : {}),
23754
+ // AW5: a known kind other than none is kept; none, unknown or absent reads absent (= nothing opens the visit).
23755
+ ...(isPreloaderKind(preloader) && preloader !== PreloaderKind.None ? { preloader } : {}),
23756
+ };
23569
23757
  }
23570
23758
  /** The look's motion, completed: an absent or unknown choice reads `PRE_MOTION` — what the site already does. */
23571
23759
  function resolveDesignMotion(partial) {
@@ -23617,6 +23805,7 @@ function readDesignConfig(config, hasRow = !!config) {
23617
23805
  between: map.get(DesignConfigKey.Between),
23618
23806
  feel: asString(map.get(DesignConfigKey.Feel)) ?? undefined,
23619
23807
  headings: asString(map.get(DesignConfigKey.Headings)) ?? undefined,
23808
+ preloader: asString(map.get(DesignConfigKey.Preloader)) ?? undefined,
23620
23809
  });
23621
23810
  return {
23622
23811
  choices,
@@ -23654,6 +23843,7 @@ function designConfigEntries(choices, flavorVersion, revert) {
23654
23843
  { key: DesignConfigKey.Between, value: c.between },
23655
23844
  ...(c.feel ? [{ key: DesignConfigKey.Feel, value: c.feel }] : []),
23656
23845
  ...(c.headings ? [{ key: DesignConfigKey.Headings, value: c.headings }] : []),
23846
+ ...(c.preloader ? [{ key: DesignConfigKey.Preloader, value: c.preloader }] : []),
23657
23847
  ...(c.fonts ? [{ key: DesignConfigKey.Fonts, value: JSON.stringify(c.fonts) }] : []),
23658
23848
  ...(revert ? [{ key: DesignConfigKey.Revert, value: JSON.stringify(revert) }] : []),
23659
23849
  ];
@@ -23667,6 +23857,7 @@ function sameDesignChoices(a, b) {
23667
23857
  && x.pillButtons === y.pillButtons && x.mode === y.mode && x.tint === y.tint
23668
23858
  && x.scroll === y.scroll && x.animate === y.animate && x.between === y.between
23669
23859
  && (x.feel ?? '') === (y.feel ?? '') && (x.headings ?? '') === (y.headings ?? '')
23860
+ && (x.preloader ?? '') === (y.preloader ?? '')
23670
23861
  && JSON.stringify(x.fonts ?? {}) === JSON.stringify(y.fonts ?? {});
23671
23862
  }
23672
23863
 
@@ -23696,8 +23887,10 @@ function presetChoices(id, mode) {
23696
23887
  return resolveDesignChoices({
23697
23888
  flavorId: preset.flavorId, seed: preset.seed, pairId: preset.pairId, shape: preset.shape, density: preset.density,
23698
23889
  motion: preset.motion, pillButtons: preset.pillButtons, mode: wear, tint: preset.tint, ...preset.moves,
23699
- // AW3: the look's own motion language — its Feel and how its headings arrive (MB-D5).
23890
+ // AW3: the look's own motion language — its Feel and how its headings arrive (MB-D5); AW5: its first-visit
23891
+ // preloader (PL-D1 — the exit is the preset's, never stored).
23700
23892
  feel: presetMotionLanguage(preset.id)?.arrive, headings: presetMotionLanguage(preset.id)?.move,
23893
+ preloader: presetMotionLanguage(preset.id)?.preloader,
23701
23894
  });
23702
23895
  }
23703
23896
  /**
@@ -24473,5 +24666,5 @@ function elementStyleFace(choices, styleId) {
24473
24666
  * Generated bundle index. Do not edit.
24474
24667
  */
24475
24668
 
24476
- export { ACCENT_TOKEN_NAMES, ANIMATE_IDS, ARRIVE_IDS, AdoptOutcome, AdoptSkipReason, BAR_RESERVE_BREAKPOINTS, BAR_RESERVE_CLASS, BETWEEN_IDS, BOTTOM_BAR_STYLE, BRAND_NAME_ATTRIBUTE, BRAND_NAME_LONGER_AT, BRAND_NAME_LONG_AT, BRAND_ROLE, BUTTON_VARIANT_TO_STYLE, BrandNameLength, CANVAS_LINK_ATTRIBUTE, CARD_LINK_CLASS, COLOR_SCHEMES, COLOR_SCHEME_TRAIT, COLOR_SCHEME_TYPES, COMPOSED_HEADER, CONTRAST_AUDIT_MEMORY, ColorScheme, ColourCheckId, DEFAULT_FLAVOR_ID, DEFAULT_MENU_LOOK, DESIGN_TOKEN_GROUPS, DESIGN_TOKEN_TIERS, DESIGN_TOKEN_TYPES, DesignConfigKey, ELEMENT_STYLES, ELEMENT_STYLE_MARKER_CLASS, ELEMENT_STYLE_STATES, EMPTY_IMAGE_ATTRIBUTE, EMPTY_IMAGE_SRC, ElementStyleState, EntranceParam, FIELD_INVALID_CLASS, FLAVOR_SPEC_VERSION, FONT_CATALOG, FONT_FAMILY_TOKENS, FONT_FILE_ACCEPT, FONT_FILE_EXTENSIONS, FONT_FILE_FORMATS, FONT_STYLES, FONT_WEIGHTS, FieldClass, FontUploadError, GOOGLE_FONTS_CSS_ORIGIN, GOOGLE_FONTS_FILE_ORIGIN, HEADER_THEME_COLOR_TOKEN, HELD_CONTRAST, HeaderAttribute, HeaderBehaviour, HeaderEdge, HeaderTrait, INHERITED_TEXT, LEAVE_IDS, LEAVE_SHARE, LinkType, MARK_STYLES, MAX_FONT_FILE_BYTES, MENU_ATTRIBUTES, MENU_PHONE_MAX_WIDTH, MOOD_IDS, MOOD_LABELS, MOTION_LANGUAGE_PRESET_IDS, MOVE_IDS, MenuAttribute, MenuButtonKind, MenuForm, MenuHover, MenuPhoneForm, MenuReveal, MenuTrait, MotionWordTier, NEW_NODE_STYLE_DEFAULTS, OPENING_ATTRIBUTE, OPENING_FOLLOWER_ROLE, OPENING_SETTING, OwnedTraitLink, PALETTE_PRESETS, PRE_DS2_FLAVOR_DEFAULTS, PRE_MOTION, PRE_TINT_DEFAULT, QUIET_LEVELS, QUIET_MOVE, REDUCED_DESIGN_MOTION, REDUCED_ENTRANCE_MAX_MS, REDUCED_MOTION_OVERRIDES, REDUCED_TRANSPARENCY_OVERRIDES, REVERT_WINDOW_MS, ROW_INDEX_ATTRIBUTE, SCHEME_INK, SCROLL_IDS, SPEC_A11Y, SPEC_AXES, SPEC_BUTTON_VARIANT_TO_STYLE, SPEC_CONTRAST, SPEC_CONTRAST_AUDIT, SPEC_DEFAULT_ELEMENT_STYLE, SPEC_ELEMENT_STYLES, SPEC_FIELD_CLASS_BASELINE, SPEC_FLAVORS, SPEC_FLAVOR_PACKS, SPEC_FLOATING_BASELINE, SPEC_FONTS, SPEC_FONT_METRICS, SPEC_FONT_ROLES, SPEC_INK_SCOPES, SPEC_LEGACY_ALIASES, SPEC_MOODS, SPEC_MOTION_LANGUAGE, SPEC_PALETTE_PRESETS, SPEC_SCHEMES, SPEC_SCHEME_INK, SPEC_SCRIPTS, SPEC_SPRINGS, SPEC_STYLE_PRESETS, SPEC_TIERS, SPEC_TIER_IDS, SPEC_TOKEN_TYPES, SPRING_CURVE_TOKEN, STAGGER_MAX_ITEMS, STAGGER_SHRINK, STYLE_PRESETS, SUPERSEDED_STYLE_VALUES, SWISS_FLAVOR, THEME_COLOR_TOKEN, TINT_FULL_CHROMA, TINT_IDS, TINT_LEVELS, TINT_OWN_HUE_CHROMA, TINT_TURN_CHROMA, USER_TOKEN_SOURCE, WCAG_AA_TEXT, WCAG_AA_UI, adoptElementStyles, adoptionStyleFor, apcaLc, applyElementStyle, applyHeadingLevelRule, atLightness, atLightnessMaxChroma, auditDesignContrast, barReserveClass, brandNameAttributes, buildFlavorTokens, buildFontFaceCss, buttonBlockHref, catalogFontId, checkFontWeight, choicesForPack, colorSchemeClass, colorSchemeOf, colourTabChecks, compareFontWeights, compileSchemeCss, compileTokenCss, compileTokenCssBlocks, compositeOver, cssString, defaultDesignChoices, defaultElementStyleFor, deriveAccentTokens, deriveBrandTokens, designApplySnapshot, designBaseline, designConfigEntries, designModeOf, designMotionOf, designRevertConfig, designTokenRepairs, designTokenRows, drawsScript, elementStyleById, elementStyleClass, elementStyleFace, elementStylesFor, emptyImageLabelSrc, emptyImagePlaceholder, emptyImageSrc, ensureAlpha, ensureContrast, entranceDelay, flavorColours, flavorPackById, flavorSeedWrites, flavorSourceStamp, fontFamilyKey, fontFileName, fontFileStem, fontFormatOf, fontPreloads, fontRoleReferences, fontStackWithout, fontWeightCovers, fontWeightRange, fontWeightValue, fontsForTokens, formatFontFamilies, formatFontFamily, formatFontWeight, googleFontHref, groupFontFamilies, hasElementStyleMarker, headerAttributes, headerBehaviourOf, headerEdgeOf, headerStaysAtTop, headingHref, inSrgbGamut, isArriveId, isDesignTokenGroup, isDesignTokenTier, isDesignTokenType, isFontWeightRange, isMoveId, isRetiredFlavorId, legacyDesignTokenRows, legacyFlavorTokens, legacyRuleTokenReferences, matchFontWeight, menuButtonAttributes, menuButtonOf, menuButtonProps, menuDialogAttributes, menuDialogProps, menuFormOf, menuFormSwitchesOnPhone, menuHoverOf, menuPhoneOf, menuRevealOf, missingDesignRows, missingFontRoles, motionCurve, motionLanguageForPlan, motionLanguageOf, motionWordTier, nodeDesignClasses, normalizeFontStyle, normalizeFontWeight, normalizeFontWeightValue, oklabToRgb, openingFollowerSelector, ownedTraitStatus, ownedTraitsOf, packDesignChoices, pageOpeningScheme, paintColours, parseCssColour, parseFontFamilies, parseFontWeight, parseHexColor, planDesignApply, planDesignRevert, planFlavorRevert, planFlavorSeed, planFontFamilyRemoval, planSwissMigration, popAllowed, preTintAccentGrounds, presetChoices, presetModes, presetMotionLanguage, previewElementStyleAdoption, previewFontWeight, quantizeRgb, readDesignConfig, readOwnedTrait, relativeLuminance, releaseElementStyle, repeatedRowIndex, resolveDesignChoices, resolveDesignMotion, resolveMotionLanguageChoices, resolveSchemeTokenValues, resolveTokenReferences, resolveTokenValues, revertAvailable, rgbToOklab, ringColour, roleClass, sameDesignChoices, scriptsForLocale, setColorScheme, specTokenNames, splitTopLevel, springToLinear, stackNamesFamily, staggerDelay, styleKeyToKebab, stylePresetById, stylePresetOfChoices, switchElementStyle, syncNodeDesignClasses, textWidthEm, themeColors, toHexColor, tokenReferences, tokensToDarkVarMap, tokensToVarMap, unknownTokenReferences, untouchedSeedRow, userFontStack, validateFlavorPack, wcagContrastRatio, withSchemeInk, withoutScriptPartners, writeFieldError, writeOwnedTrait };
24669
+ export { ACCENT_TOKEN_NAMES, ANIMATE_IDS, ARRIVE_IDS, AdoptOutcome, AdoptSkipReason, BAR_RESERVE_BREAKPOINTS, BAR_RESERVE_CLASS, BETWEEN_IDS, BOTTOM_BAR_STYLE, BRAND_NAME_ATTRIBUTE, BRAND_NAME_LONGER_AT, BRAND_NAME_LONG_AT, BRAND_ROLE, BUTTON_VARIANT_TO_STYLE, BrandNameLength, CANVAS_LINK_ATTRIBUTE, CARD_LINK_CLASS, COLOR_SCHEMES, COLOR_SCHEME_TRAIT, COLOR_SCHEME_TYPES, COMPOSED_HEADER, CONTRAST_AUDIT_MEMORY, ColorScheme, ColourCheckId, DEFAULT_FLAVOR_ID, DEFAULT_MENU_LOOK, DESIGN_TOKEN_GROUPS, DESIGN_TOKEN_TIERS, DESIGN_TOKEN_TYPES, DesignConfigKey, ELEMENT_STYLES, ELEMENT_STYLE_MARKER_CLASS, ELEMENT_STYLE_STATES, EMPTY_IMAGE_ATTRIBUTE, EMPTY_IMAGE_SRC, ElementStyleState, EntranceParam, FIELD_INVALID_CLASS, FLAVOR_SPEC_VERSION, FONT_CATALOG, FONT_FAMILY_TOKENS, FONT_FILE_ACCEPT, FONT_FILE_EXTENSIONS, FONT_FILE_FORMATS, FONT_STYLES, FONT_WEIGHTS, FieldClass, FontUploadError, GOOGLE_FONTS_CSS_ORIGIN, GOOGLE_FONTS_FILE_ORIGIN, HEADER_THEME_COLOR_TOKEN, HELD_CONTRAST, HeaderAttribute, HeaderBehaviour, HeaderEdge, HeaderTrait, INHERITED_TEXT, LEAVE_IDS, LEAVE_SHARE, LinkType, MARK_STYLES, MAX_FONT_FILE_BYTES, MENU_ATTRIBUTES, MENU_PHONE_MAX_WIDTH, MOOD_IDS, MOOD_LABELS, MOTION_LANGUAGE_PRESET_IDS, MOVE_IDS, MenuAttribute, MenuButtonKind, MenuForm, MenuHover, MenuPhoneForm, MenuReveal, MenuTrait, MotionWordTier, NEW_NODE_STYLE_DEFAULTS, OPENING_ATTRIBUTE, OPENING_FOLLOWER_ROLE, OPENING_SETTING, OwnedTraitLink, PALETTE_PRESETS, PRELOADER_CAP_MS, PRELOADER_EXIT_IDS, PRELOADER_EXIT_MAX_MS, PRELOADER_IDS, PRELOADER_LETTERS_MAX, PRELOADER_LEVELS, PRE_DS2_FLAVOR_DEFAULTS, PRE_MOTION, PRE_TINT_DEFAULT, PreloaderExit, PreloaderKind, QUIET_LEVELS, QUIET_MOVE, REDUCED_DESIGN_MOTION, REDUCED_ENTRANCE_MAX_MS, REDUCED_MOTION_OVERRIDES, REDUCED_TRANSPARENCY_OVERRIDES, REVERT_WINDOW_MS, ROW_INDEX_ATTRIBUTE, SCHEME_INK, SCROLL_IDS, SPEC_A11Y, SPEC_AXES, SPEC_BUTTON_VARIANT_TO_STYLE, SPEC_CONTRAST, SPEC_CONTRAST_AUDIT, SPEC_DEFAULT_ELEMENT_STYLE, SPEC_ELEMENT_STYLES, SPEC_FIELD_CLASS_BASELINE, SPEC_FLAVORS, SPEC_FLAVOR_PACKS, SPEC_FLOATING_BASELINE, SPEC_FONTS, SPEC_FONT_METRICS, SPEC_FONT_ROLES, SPEC_INK_SCOPES, SPEC_LEGACY_ALIASES, SPEC_MOODS, SPEC_MOTION_LANGUAGE, SPEC_PALETTE_PRESETS, SPEC_SCHEMES, SPEC_SCHEME_INK, SPEC_SCRIPTS, SPEC_SPRINGS, SPEC_STYLE_PRESETS, SPEC_TIERS, SPEC_TIER_IDS, SPEC_TOKEN_TYPES, SPRING_CURVE_TOKEN, STAGGER_MAX_ITEMS, STAGGER_SHRINK, STYLE_PRESETS, SUPERSEDED_STYLE_VALUES, SWISS_FLAVOR, THEME_COLOR_TOKEN, TINT_FULL_CHROMA, TINT_IDS, TINT_LEVELS, TINT_OWN_HUE_CHROMA, TINT_TURN_CHROMA, USER_TOKEN_SOURCE, WCAG_AA_TEXT, WCAG_AA_UI, adoptElementStyles, adoptionStyleFor, apcaLc, applyElementStyle, applyHeadingLevelRule, atLightness, atLightnessMaxChroma, auditDesignContrast, barReserveClass, brandNameAttributes, buildFlavorTokens, buildFontFaceCss, buttonBlockHref, catalogFontId, checkFontWeight, choicesForPack, colorSchemeClass, colorSchemeOf, colourTabChecks, compareFontWeights, compileSchemeCss, compileTokenCss, compileTokenCssBlocks, compositeOver, cssString, defaultDesignChoices, defaultElementStyleFor, deriveAccentTokens, deriveBrandTokens, designApplySnapshot, designBaseline, designConfigEntries, designModeOf, designMotionOf, designRevertConfig, designTokenRepairs, designTokenRows, drawsScript, elementStyleById, elementStyleClass, elementStyleFace, elementStylesFor, emptyImageLabelSrc, emptyImagePlaceholder, emptyImageSrc, ensureAlpha, ensureContrast, entranceDelay, flavorColours, flavorPackById, flavorSeedWrites, flavorSourceStamp, fontFamilyKey, fontFileName, fontFileStem, fontFormatOf, fontPreloads, fontRoleReferences, fontStackWithout, fontWeightCovers, fontWeightRange, fontWeightValue, fontsForTokens, formatFontFamilies, formatFontFamily, formatFontWeight, googleFontHref, groupFontFamilies, hasElementStyleMarker, headerAttributes, headerBehaviourOf, headerEdgeOf, headerStaysAtTop, headingHref, inSrgbGamut, isArriveId, isDesignTokenGroup, isDesignTokenTier, isDesignTokenType, isFirstVisit, isFontWeightRange, isMoveId, isPreloaderKind, isRetiredFlavorId, legacyDesignTokenRows, legacyFlavorTokens, legacyRuleTokenReferences, matchFontWeight, menuButtonAttributes, menuButtonOf, menuButtonProps, menuDialogAttributes, menuDialogProps, menuFormOf, menuFormSwitchesOnPhone, menuHoverOf, menuPhoneOf, menuRevealOf, missingDesignRows, missingFontRoles, motionCurve, motionLanguageForPlan, motionLanguageOf, motionWordTier, nodeDesignClasses, normalizeFontStyle, normalizeFontWeight, normalizeFontWeightValue, oklabToRgb, openingFollowerSelector, ownedTraitStatus, ownedTraitsOf, packDesignChoices, pageOpeningScheme, paintColours, parseCssColour, parseFontFamilies, parseFontWeight, parseHexColor, planDesignApply, planDesignRevert, planFlavorRevert, planFlavorSeed, planFontFamilyRemoval, planPreloader, planSwissMigration, popAllowed, preTintAccentGrounds, preloaderExitOf, preloaderLeaveAt, preloaderPercent, preloaderWords, presetChoices, presetModes, presetMotionLanguage, previewElementStyleAdoption, previewFontWeight, quantizeRgb, readDesignConfig, readOwnedTrait, relativeLuminance, releaseElementStyle, repeatedRowIndex, resolveDesignChoices, resolveDesignMotion, resolveMotionLanguageChoices, resolveSchemeTokenValues, resolveTokenReferences, resolveTokenValues, revertAvailable, rgbToOklab, ringColour, roleClass, sameDesignChoices, scriptsForLocale, setColorScheme, specTokenNames, splitTopLevel, springToLinear, stackNamesFamily, staggerDelay, styleKeyToKebab, stylePresetById, stylePresetOfChoices, switchElementStyle, syncNodeDesignClasses, textWidthEm, themeColors, toHexColor, tokenReferences, tokensToDarkVarMap, tokensToVarMap, unknownTokenReferences, untouchedSeedRow, userFontStack, validateFlavorPack, wcagContrastRatio, withSchemeInk, withoutScriptPartners, writeFieldError, writeOwnedTrait };
24477
24670
  //# sourceMappingURL=vectoriox-iox-ui-design-core.mjs.map