@vectoriox/iox-ui 5.196.0 → 5.198.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 (67) hide show
  1. package/composite-core/index.d.ts +19 -2
  2. package/data-core/index.d.ts +101 -2
  3. package/design-core/index.d.ts +183 -30
  4. package/fesm2022/vectoriox-iox-ui-composite-core.mjs +49 -10
  5. package/fesm2022/vectoriox-iox-ui-composite-core.mjs.map +1 -1
  6. package/fesm2022/vectoriox-iox-ui-data-core.mjs +192 -2
  7. package/fesm2022/vectoriox-iox-ui-data-core.mjs.map +1 -1
  8. package/fesm2022/vectoriox-iox-ui-design-core.mjs +299 -74
  9. package/fesm2022/vectoriox-iox-ui-design-core.mjs.map +1 -1
  10. package/fesm2022/vectoriox-iox-ui-generation-core.mjs +2287 -528
  11. package/fesm2022/vectoriox-iox-ui-generation-core.mjs.map +1 -1
  12. package/fesm2022/vectoriox-iox-ui-harness-core.mjs +3 -1
  13. package/fesm2022/vectoriox-iox-ui-harness-core.mjs.map +1 -1
  14. package/fesm2022/vectoriox-iox-ui.mjs +32 -2
  15. package/fesm2022/vectoriox-iox-ui.mjs.map +1 -1
  16. package/generation-core/index.d.ts +1454 -200
  17. package/harness-core/index.d.ts +1 -1
  18. package/package.json +1 -1
  19. package/src/composite-core/header.ts +34 -1
  20. package/src/composite-core/slider-runtime.ts +16 -8
  21. package/src/data-core/placeholder-rows.ts +220 -0
  22. package/src/data-core/public-api.ts +2 -1
  23. package/src/design-core/brand.ts +58 -5
  24. package/src/design-core/contrast-audit.ts +49 -22
  25. package/src/design-core/design-apply.ts +34 -3
  26. package/src/design-core/flavor-fixtures.generated.ts +123 -123
  27. package/src/design-core/flavor-spec.generated.ts +44 -4
  28. package/src/design-core/flavor-tokens.ts +1 -1
  29. package/src/design-core/header-behaviour.ts +82 -15
  30. package/src/design-core/motion-language.ts +5 -14
  31. package/src/design-core/node-links.ts +34 -0
  32. package/src/design-core/preloader.ts +4 -5
  33. package/src/generation-core/audit-site.ts +10 -1
  34. package/src/generation-core/audit-words.ts +5 -0
  35. package/src/generation-core/body-mix.ts +40 -102
  36. package/src/generation-core/check-free.ts +26 -5
  37. package/src/generation-core/check-layout.ts +10 -4
  38. package/src/generation-core/check-list.ts +3 -25
  39. package/src/generation-core/colour-mix.ts +296 -0
  40. package/src/generation-core/compose-free.ts +40 -18
  41. package/src/generation-core/compose-site.ts +124 -22
  42. package/src/generation-core/footer-mix.ts +102 -54
  43. package/src/generation-core/free-fallback.ts +6 -4
  44. package/src/generation-core/free-opening.ts +57 -0
  45. package/src/generation-core/free-parts.ts +87 -0
  46. package/src/generation-core/free-slot-words.ts +30 -0
  47. package/src/generation-core/generation-tier.ts +6 -17
  48. package/src/generation-core/header-mix.ts +125 -4
  49. package/src/generation-core/item-fill.ts +42 -0
  50. package/src/generation-core/layout-drawers.ts +3 -2
  51. package/src/generation-core/layout-wire.ts +10 -16
  52. package/src/generation-core/list-panel.ts +3 -3
  53. package/src/generation-core/list-table.ts +5 -14
  54. package/src/generation-core/list-words.ts +2 -1
  55. package/src/generation-core/nav-shape.ts +45 -16
  56. package/src/generation-core/node-baselines.generated.ts +1 -0
  57. package/src/generation-core/opening-mix.ts +16 -33
  58. package/src/generation-core/part-tier.ts +14 -0
  59. package/src/generation-core/plan-wire.ts +31 -43
  60. package/src/generation-core/public-api.ts +4 -0
  61. package/src/generation-core/site-build-run.ts +4 -0
  62. package/src/generation-core/site-spec.generated.ts +1127 -93
  63. package/src/generation-core/stock-search.ts +106 -18
  64. package/src/generation-core/type-led.ts +19 -4
  65. package/src/generation-core/validate-site-plan.ts +4 -5
  66. package/src/harness-core/run-compose-context.ts +3 -1
  67. package/styles/iox-design.css +139 -4
@@ -14,11 +14,15 @@ import type { StockTarget } from './stock-photos';
14
14
  * picture; a stranger, or a street at night, under a person's name is a made-up fact about the business.
15
15
  * - WHAT is asked (`stockSearchQuery`): closed English words only (LS-D3) — the business type's own keyword and at most one
16
16
  * subject word for the place. Nothing the owner typed (a name, a phone, an address) ever reaches the provider.
17
- * - WHAT is never taken (`stockPhotoFits`): a photo whose words speak of crime, injury, ruin or a joke (`STOCK_NEVER_WORDS`,
18
- * `STOCK_NEVER_PHRASES`), or — for a trade people trust with their money, health or rights — of what that trade fears
19
- * (`STOCK_TRADE_NEVER_WORDS`); and an OPENING (an atmosphere place: a hero, a page header, a call to action) takes an
20
- * unreviewed photo only when its words name the business twice (`STOCK_OPENING_TYPE_WORDS` of the type's vocabulary):
21
- * "salon" alone is a drawing room, "salon" + "hair" is a hair salon.
17
+ * - WHAT is never taken (`stockPhotoFits`): a photo whose words speak of crime, injury, ruin, a joke or a state's emblem
18
+ * (`STOCK_NEVER_WORDS`, `STOCK_NEVER_PHRASES`), or — for a trade people trust with their money, health or rights — of what
19
+ * that trade fears (`STOCK_TRADE_NEVER_WORDS`); and an unreviewed photo that does not show the business: an OPENING (an
20
+ * atmosphere place: a hero, a page header, a call to action) names it twice (`STOCK_OPENING_TYPE_WORDS` of the type's
21
+ * vocabulary — "salon" alone is a drawing room, "salon" + "hair" is a hair salon), every other place at least once
22
+ * (`STOCK_PLACE_TYPE_WORDS`, iox-ui#175 — a law firm's About never shows a clothing boutique, a salon's service never a
23
+ * street at night). The vocabulary is the type's own words and what its photos are tagged with (`STOCK_TRADE_WORDS`); an
24
+ * item's own name vouches too. A word that names ANOTHER trade's place (`STOCK_TRADE_PLACE_WORDS`: a boutique, a bar) is
25
+ * never asked for and never vouches — "Boutique law firm" asked Pixabay for "law boutique" and got a clothes shop.
22
26
  *
23
27
  * The provider side (Pixabay) already asks `image_type=photo` and `safesearch=true` and drops people, brands and generated
24
28
  * pictures by their tags; this is what the PLATFORM decides on top, the same for every provider.
@@ -49,10 +53,12 @@ export const STOCK_NEVER_WORDS: ReadonlySet<string> = new Set([
49
53
  'cocaine', 'abandoned', 'derelict', 'ruin', 'decay', 'decayed', 'dilapidated', 'demolition', 'rotten', 'trash',
50
54
  'garbage', 'rubbish', 'dirty', 'homeless', 'riot', 'caricature', 'cartoon', 'figurine', 'clipart', 'illustration', 'vector',
51
55
  'meme', 'joke', 'funny', 'humor', 'humour', 'halloween', 'horror', 'creepy', 'zombie',
56
+ // iox-ui#175: a state's emblem says the business speaks for a state (the Pro law firm's "imperial eagle").
57
+ 'emblem', 'imperial',
52
58
  ].map(stockWord));
53
59
 
54
60
  /** Phrases that say the same where no one word does ("lost places" — the photography of abandoned buildings). */
55
- export const STOCK_NEVER_PHRASES: ReadonlyArray<string> = ['lost place', 'lost places', 'tax evasion', 'urban exploration', 'urbex'];
61
+ export const STOCK_NEVER_PHRASES: ReadonlyArray<string> = ['lost place', 'lost places', 'tax evasion', 'urban exploration', 'urbex', 'coat of arms'];
56
62
 
57
63
  /**
58
64
  * Per business type (harness-core id), what a trade people trust with their rights, money or health never shows on its
@@ -60,7 +66,8 @@ export const STOCK_NEVER_PHRASES: ReadonlyArray<string> = ['lost place', 'lost p
60
66
  * sells by (an accountant's tax, a lawyer's court) — the universal list already keeps the joke about it out.
61
67
  */
62
68
  export const STOCK_TRADE_NEVER_WORDS: Readonly<Record<string, ReadonlyArray<string>>> = {
63
- 'law-accounting': ['debt', 'bankruptcy', 'bankrupt', 'guilty', 'crisis', 'stress', 'eviction', 'divorce'],
69
+ // iox-ui#175: another country's law ("The basic law, germany") is not the law this firm practises.
70
+ 'law-accounting': ['debt', 'bankruptcy', 'bankrupt', 'guilty', 'crisis', 'stress', 'eviction', 'divorce', 'germany', 'german', 'constitution'],
64
71
  consultant: ['debt', 'bankruptcy', 'bankrupt', 'crisis', 'stress'],
65
72
  coach: ['crisis', 'stress', 'depression', 'sad', 'lonely'],
66
73
  therapist: ['depression', 'sad', 'lonely', 'suicide', 'crying', 'tear', 'anxiety', 'stress'],
@@ -69,8 +76,61 @@ export const STOCK_TRADE_NEVER_WORDS: Readonly<Record<string, ReadonlyArray<stri
69
76
  vet: ['sick', 'injured', 'pain', 'syringe', 'needle', 'injection', 'surgery', 'stray', 'cage'],
70
77
  };
71
78
 
79
+ /**
80
+ * iox-ui#175 — per business type (harness-core id), the words a stock photo of that trade is tagged with when it does not
81
+ * say the trade's own name: a hairdresser, a manicure, a barbershop are a salon's; a gavel, a contract, a notary a law
82
+ * firm's. With the type's label, keywords and imagery they are its VOCABULARY (`stockFitFor`) — what a photo must name to
83
+ * show the business. Every type that may show stock has a row (spec). English only (the provider's tags), compared as
84
+ * `stockWord`s, and a word of four letters or more counts in its longer forms (`hair` → `hairdressing`).
85
+ */
86
+ export const STOCK_TRADE_WORDS: Readonly<Record<string, ReadonlyArray<string>>> = {
87
+ spa: ['sauna', 'towel', 'aromatherapy', 'relaxation', 'relax', 'treatment', 'jacuzzi', 'hammam', 'pool', 'stones'],
88
+ salon: ['hairdresser', 'barber', 'barbershop', 'manicure', 'manicurist', 'pedicure', 'fingernail', 'beautician', 'cosmetic', 'cosmetics', 'makeup', 'lash', 'eyelash', 'shampoo', 'scissors', 'comb', 'polish'],
89
+ yoga: ['mat', 'asana', 'lotus', 'pose', 'stretching', 'zen', 'mindfulness'],
90
+ fitness: ['workout', 'exercise', 'dumbbell', 'barbell', 'kettlebell', 'treadmill', 'weights', 'sport', 'athlete'],
91
+ therapist: ['couch', 'armchair', 'counseling', 'counselling', 'psychotherapy', 'mindfulness'],
92
+ clinic: ['health', 'healthcare', 'medicine', 'stethoscope', 'rehabilitation', 'wellbeing'],
93
+ dental: ['tooth', 'teeth', 'dentistry', 'toothbrush', 'orthodontic', 'braces', 'smile'],
94
+ vet: ['cat', 'puppy', 'kitten', 'veterinarian', 'paw', 'animal'],
95
+ restaurant: ['dining', 'dinner', 'dish', 'meal', 'plate', 'cuisine', 'cooking', 'gourmet', 'table'],
96
+ 'cafe-bakery': ['espresso', 'cappuccino', 'latte', 'barista', 'croissant', 'pastry', 'cake', 'bread', 'muffin', 'dessert', 'breakfast', 'brunch', 'cookie'],
97
+ 'bar-winery': ['beer', 'whiskey', 'whisky', 'vineyard', 'grape', 'barrel', 'pub', 'bartender', 'glass'],
98
+ boutique: ['dress', 'apparel', 'garment', 'outfit', 'shoe', 'handbag', 'textile', 'wardrobe'],
99
+ florist: ['rose', 'tulip', 'blossom', 'floral', 'peony', 'orchid', 'succulent', 'greenery', 'vase'],
100
+ 'home-goods': ['sofa', 'chair', 'table', 'lamp', 'interior', 'cushion', 'armchair', 'shelf', 'vase'],
101
+ consultant: ['meeting', 'business', 'planning', 'presentation', 'chart', 'office', 'desk', 'teamwork'],
102
+ coach: ['meeting', 'conversation', 'notebook', 'goal', 'growth', 'motivation'],
103
+ 'law-accounting': ['justice', 'court', 'judge', 'gavel', 'contract', 'notary', 'tax', 'finance', 'paperwork', 'document', 'signature', 'desk', 'agreement'],
104
+ nonprofit: ['donation', 'solidarity', 'fundraising', 'charity'],
105
+ 'venue-events': ['banquet', 'ballroom', 'celebration', 'reception', 'ceremony', 'catering', 'party'],
106
+ 'hotel-bnb': ['bedroom', 'bed', 'suite', 'resort', 'hospitality', 'lobby', 'pillow', 'accommodation', 'villa', 'inn', 'hostel'],
107
+ classes: ['classroom', 'education', 'learning', 'student', 'study', 'piano', 'guitar', 'blackboard'],
108
+ };
109
+
110
+ /**
111
+ * iox-ui#175 — words that name a KIND of business by its place (compared as `stockWord`s). For a type whose vocabulary
112
+ * does not hold one, it is another trade: never the query's subject word (Pixabay answers "law boutique" with a clothes
113
+ * shop) and never a word that vouches for a photo.
114
+ */
115
+ export const STOCK_TRADE_PLACE_WORDS: ReadonlySet<string> = new Set([
116
+ 'salon', 'shop', 'store', 'boutique', 'restaurant', 'cafe', 'bar', 'pub', 'bistro', 'bakery', 'cellar', 'winery', 'brewery',
117
+ 'gym', 'clinic', 'spa', 'sauna', 'hotel', 'studio', 'workshop', 'market', 'vineyard', 'barbershop', 'office',
118
+ ].map(stockWord));
119
+
120
+ /** Words of an imagery line that say how a picture is TAKEN or who gives it, never what it shows ("Real people (with
121
+ * permission)", "never stock", "on plain grounds") — left out of the vocabulary (iox-ui#175). */
122
+ const IMAGERY_NOISE: ReadonlySet<string> = new Set([
123
+ 'real', 'people', 'permission', 'needed', 'stock', 'plain', 'ground', 'close', 'treat', 'help', 'working', 'before', 'after',
124
+ 'face', 'own', 'never', 'large', 'uncropped', 'clean', 'healed', 'true', 'flat', 'natural', 'light', 'daylight', 'calm',
125
+ 'portrait', 'good', 'piece', 'wearing', 'need',
126
+ ].map(stockWord));
127
+
72
128
  /** An opening's unreviewed photo names the business this many times (distinct words of the type's vocabulary). */
73
129
  export const STOCK_OPENING_TYPE_WORDS = 2;
130
+ /** iox-ui#175: every other place's unreviewed photo names it at least this many times. */
131
+ export const STOCK_PLACE_TYPE_WORDS = 1;
132
+ /** A vocabulary word this long counts in its longer forms (`hair` → `hairdresser`); a shorter one only whole (`law`). */
133
+ const STEM_MIN = 4;
74
134
 
75
135
  /** The intents an opening stands as — wide places the visitor reads as "this is the business". */
76
136
  const OPENING_INTENTS: ReadonlySet<string> = new Set([StockIntent.Atmosphere]);
@@ -140,8 +200,10 @@ const SUBJECT_VOCABULARY: ReadonlyMap<StockSubject, ReadonlyMap<string, string>>
140
200
  * first, then the words around the place, then the type's imagery line — the first that names a subject its intent takes,
141
201
  * its best subject first. None: the base query.
142
202
  */
143
- export function stockSearchFocus(slot: StockTarget, type: Pick<StockSearchType, 'imagery'>, term: string): string | null {
144
- const words = [...(slot.kind === 'item' ? slot.subject ?? [] : []), ...slot.words, ...stockWords(type.imagery)];
203
+ export function stockSearchFocus(slot: StockTarget, type: StockSearchType | Pick<StockSearchType, 'imagery'>, term: string): string | null {
204
+ // iox-ui#175: another trade's place word is never the subject ("Boutique law firm" → never "law boutique").
205
+ const vocabulary = 'label' in type ? stockFitFor(type).vocabulary : new Set<string>();
206
+ const words = [...(slot.kind === 'item' ? slot.subject ?? [] : []), ...slot.words, ...stockWords(type.imagery)].filter(w => !foreignTrade(w, vocabulary));
145
207
  const asked = new Set(term.split(' ').map(stockWord));
146
208
  for (const subject of STOCK_INTENT_SUBJECTS[slot.intent as StockIntent] ?? []) {
147
209
  const vocabulary = SUBJECT_VOCABULARY.get(subject)!;
@@ -173,32 +235,58 @@ export const STOCK_FIT_ANY: StockFit = { never: STOCK_NEVER_WORDS, vocabulary: n
173
235
  /** What a photo is held to on a site of `type`. */
174
236
  export function stockFitFor(type: StockSearchType | null | undefined): StockFit {
175
237
  if (!type) return STOCK_FIT_ANY;
176
- const trade = (type.id ? STOCK_TRADE_NEVER_WORDS[type.id] : undefined) ?? [];
238
+ const fears = (type.id ? STOCK_TRADE_NEVER_WORDS[type.id] : undefined) ?? [];
239
+ const tagged = (type.id ? STOCK_TRADE_WORDS[type.id] : undefined) ?? [];
177
240
  const latin = (type.match ?? []).map(plain).filter(k => LATIN_KEYWORD.test(k));
178
241
  return {
179
- never: new Set([...STOCK_NEVER_WORDS, ...trade.map(stockWord)]),
180
- vocabulary: new Set(stockWords(type.label, ...latin, type.imagery)),
242
+ never: new Set([...STOCK_NEVER_WORDS, ...fears.map(stockWord)]),
243
+ vocabulary: new Set([...stockWords(type.label, ...latin, ...tagged), ...stockWords(type.imagery).filter(w => !IMAGERY_NOISE.has(w))]),
181
244
  };
182
245
  }
183
246
 
247
+ /** Does `word` name one of `words` — whole, or in a longer form of a word of `STEM_MIN` letters or more? */
248
+ function namesOneOf(word: string, words: ReadonlySet<string>): boolean {
249
+ if (words.has(word)) return true;
250
+ for (const w of words) if (w.length >= STEM_MIN && word.length > w.length && word.startsWith(w)) return true;
251
+ return false;
252
+ }
253
+
254
+ /** A word that names another trade's place, for a type whose vocabulary is `vocabulary`. */
255
+ const foreignTrade = (word: string, vocabulary: ReadonlySet<string>) => STOCK_TRADE_PLACE_WORDS.has(word) && !namesOneOf(word, vocabulary);
256
+
184
257
  /** A photo's tags (else its alt, split at commas) and the reviewer's notes, each as plain words between spaces. */
185
258
  function photoPhrases(photo: Pick<StockPhotoTraits, 'alt' | 'tags' | 'review'>): string[] {
186
259
  const tags = photo.tags?.length ? photo.tags : String(photo.alt ?? '').split(',');
187
260
  return [...tags, photo.review?.notes ?? ''].map(t => ` ${plain(String(t ?? '')).replace(/[^\p{L}\p{N}]+/gu, ' ').trim()} `);
188
261
  }
189
262
 
263
+ /** What a place is, as the fit reads it: its intent, and — an item — its own name's words. */
264
+ export interface StockFitPlace {
265
+ readonly intent: string;
266
+ /** A sample item's own name (`StockItemSlot.subject`): a photo that names it shows the item. */
267
+ readonly subject?: ReadonlyArray<string>;
268
+ }
269
+
190
270
  /**
191
- * Whether a photo may stand in a place on a site held to `fit`: none of its words is a never-word or phrase, and — in an
192
- * opening — a photo no operator approved names the business at least `STOCK_OPENING_TYPE_WORDS` times. An approved library
193
- * photo was seen for its type and needs no second word.
271
+ * Whether a photo may stand in a place on a site held to `fit`: none of its words is a never-word or phrase, and a photo no
272
+ * operator approved SHOWS THE BUSINESS — it names the type's vocabulary `STOCK_OPENING_TYPE_WORDS` times in an opening and
273
+ * `STOCK_PLACE_TYPE_WORDS` times anywhere else (iox-ui#175); an item's own name counts as the business's there (a
274
+ * "Bridal makeup" service, a makeup photo). Another trade's place word never counts. An approved library photo was seen for
275
+ * its type and needs no word. No type known (`STOCK_FIT_ANY`): the never-words only.
194
276
  */
195
- export function stockPhotoFits(photo: Pick<StockPhotoTraits, 'alt' | 'tags' | 'review'>, slot: { readonly intent: string }, fit: StockFit = STOCK_FIT_ANY): boolean {
277
+ export function stockPhotoFits(photo: Pick<StockPhotoTraits, 'alt' | 'tags' | 'review'>, slot: StockFitPlace, fit: StockFit = STOCK_FIT_ANY): boolean {
196
278
  const words = stockPhotoWords(photo);
197
279
  if (words.some(w => fit.never.has(w))) return false;
198
280
  const phrases = photoPhrases(photo);
199
281
  if (STOCK_NEVER_PHRASES.some(phrase => phrases.some(p => p.includes(` ${phrase} `)))) return false;
200
- if (!OPENING_INTENTS.has(slot.intent) || photo.review?.verdict === StockReviewVerdict.Approved || !fit.vocabulary.size) return true;
201
- return words.filter(w => fit.vocabulary.has(w)).length >= STOCK_OPENING_TYPE_WORDS;
282
+ if (photo.review?.verdict === StockReviewVerdict.Approved || !fit.vocabulary.size) return true;
283
+ return businessWordsOf(words, slot, fit) >= (OPENING_INTENTS.has(slot.intent) ? STOCK_OPENING_TYPE_WORDS : STOCK_PLACE_TYPE_WORDS);
284
+ }
285
+
286
+ /** How many distinct words of a photo name the business (the opening: its vocabulary; elsewhere an item's name too). */
287
+ function businessWordsOf(words: ReadonlyArray<string>, slot: StockFitPlace, fit: StockFit): number {
288
+ const own = OPENING_INTENTS.has(slot.intent) ? null : new Set((slot.subject ?? []).filter(w => !foreignTrade(w, fit.vocabulary)));
289
+ return words.filter(w => !foreignTrade(w, fit.vocabulary) && (namesOneOf(w, fit.vocabulary) || (!!own && own.has(w)))).length;
202
290
  }
203
291
 
204
292
  const intentRank = (intent: string) => STOCK_INTENT_ORDER.indexOf(intent as StockIntent);
@@ -1,4 +1,5 @@
1
1
  import { ComposedItem, ComposedPlaceholder, ComposedSite, openingContextOf, PlaceholderKind } from './compose-site';
2
+ import { FreeNode, FreeNodeType } from './free-wire';
2
3
  import { FingerprintedPage, wornOpenings } from './layout-fingerprint';
3
4
  import { LAYOUT_TEXT_KINDS, LayoutColour, LayoutLayer, LayoutLayerKind, LayoutRole, LayoutSection, LayoutSize } from './layout-language';
4
5
  import {
@@ -423,13 +424,18 @@ const isHome = (page: PagePlan) => page.isHome === true || page.route === '/';
423
424
  /**
424
425
  * The type-led first screen for a home page: the plan's own frame and words first, then the contract's ways
425
426
  * (`typeLedOpeningWays`), the first the site carries unmended (its tier, the business name's fit) that no OTHER site of
426
- * the studio opens on — else the first it carries, said as worn. Pure.
427
+ * the studio opens on — else the first it carries, said as worn. J10 lever (b): the plan's own way is tried first only
428
+ * when it is a COMPOSED way — never the bare band (the contract's last way: a heading, a line and one action on a full
429
+ * plain ground), which stays every site's last resort. Pure.
427
430
  */
428
431
  export function chooseTypeLedOpening(plan: SitePlan, context: TypeLedRoundContext = {}): { mix: OpeningMix; token: string; worn: boolean; ground: OpeningGround } {
429
432
  const own = openingMixOfPlan(plan);
433
+ const contract = typeLedOpeningWays();
434
+ const bare = contract[contract.length - 1];
435
+ const isBare = (m: Pick<OpeningMix, 'frame' | 'words'>) => m.frame === bare.frame && m.words === bare.words;
430
436
  // The plan's own frame and words, on no picture (a slow zoom has nothing to move: it goes with the picture).
431
- const mine = own ? [{ ...own, media: OpeningMedia.None, extras: [...own.extras], motion: own.motion.filter(m => m !== OpeningMotion.SlowZoom) }] : [];
432
- const ways = [...mine, ...typeLedOpeningWays()];
437
+ const mine = own && !isBare(own) ? [{ ...own, media: OpeningMedia.None, extras: [...own.extras], motion: own.motion.filter(m => m !== OpeningMotion.SlowZoom) }] : [];
438
+ const ways = [...mine, ...contract];
433
439
  const site = openingContextOf({ business: plan.business, design: plan.design, tier: context.tier ?? BASIC, badge: null, cutOut: false });
434
440
  const carried = ways.map(m => drawnOpeningMix(m).drawn).filter(m => !checkOpening(m, site).repairs.length);
435
441
  const worn = [...wornOpenings(context.studio ?? [])].map(openingTokenParts);
@@ -543,6 +549,13 @@ export function typeLedRound(
543
549
  });
544
550
  if (plated) next = { ...next, layout: { ...page.layout, sections: laidSections } };
545
551
  }
552
+ // iox-ui#180: a free Home whose opening holds a picture nothing fills gives its opening back to the plan's (the
553
+ // ready-made place a fall back would give) — then it opens type-led below, like every Home; the rest stays free.
554
+ const opening = next.free?.sections[0];
555
+ if (first && opening && !opening.readyMade && next.sections[0]) {
556
+ const given: FreeNode = { id: opening.id, type: FreeNodeType.Section, styleProps: {}, readyMade: { at: 0, pattern: next.sections[0].pattern } };
557
+ next = { ...next, free: { ...next.free!, sections: [given, ...next.free!.sections.slice(1)] } };
558
+ }
546
559
  if (first) { firstScreen = next; homeAt = p; }
547
560
  return next;
548
561
  });
@@ -560,7 +573,9 @@ export function typeLedRound(
560
573
  const hero = at >= 0 ? sections[at] : undefined;
561
574
  const takes = !!hero && !!typeLedOpeningSection(chosen.mix, hero);
562
575
  const nextPages = [...pages];
563
- nextPages[homeAt] = { ...home, sections };
576
+ // A free Home's ready-made places name their plan section by its pattern — the swapped one when it was swapped.
577
+ const free = home.free ? { ...home.free, sections: home.free.sections.map(s => (s.readyMade && sections[s.readyMade.at] ? { ...s, readyMade: { ...s.readyMade, pattern: sections[s.readyMade.at].pattern } } : s)) } : undefined;
578
+ nextPages[homeAt] = { ...home, sections, ...(free ? { free } : {}) };
564
579
  next = { ...next, pages: nextPages };
565
580
  if (takes) {
566
581
  const words = openingMixWords(chosen.mix);
@@ -2,6 +2,7 @@ import { ARRIVE_IDS, flavorPackById, MOVE_IDS, parseHexColor, PRELOADER_IDS, SCR
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_ROBOTS_OPTIONS, SEO_TITLE_MAX } from '@vectoriox/iox-ui/seo-core';
5
+ import { freeSlotOf, FreeSlotKind } from './free-slot-words';
5
6
 
6
7
  import {
7
8
  BindScope, patternById, patternHasForm, patternLinkSlots, patternNeedsBinding, patternOptionalParts, patternRoleNeeds, patternTakesBinding, patternScopes,
@@ -940,8 +941,6 @@ interface FreeTreeContext {
940
941
  readyMade: boolean;
941
942
  }
942
943
 
943
- const FREE_LIST_SLOT = 'list:';
944
- const FREE_FORM_SLOT = 'form:';
945
944
 
946
945
  function validateFreeTree(c: Collector, roots: unknown[], path: string, ctx: FreeTreeContext, single = false): void {
947
946
  const ids = new Set<string>();
@@ -980,9 +979,9 @@ function validateFreeTree(c: Collector, roots: unknown[], path: string, ctx: Fre
980
979
  }
981
980
  if (type === FreeNodeType.Slot) {
982
981
  const slot = String(raw['slot'] ?? '');
983
- const ok = slot.startsWith(FREE_LIST_SLOT) ? isListSource(ctx.sources.get(slot.slice(FREE_LIST_SLOT.length)))
984
- : slot.startsWith(FREE_FORM_SLOT) ? !!formPresetById(slot.slice(FREE_FORM_SLOT.length)) : false;
985
- if (!ok) c.add(SitePlanIssueCode.Free, `${p}.slot`, `"${slot}" — list:<a list source of the plan> or form:<a form preset>`);
982
+ const placed = freeSlotOf(slot);
983
+ const ok = !placed ? false : placed.kind === FreeSlotKind.Form ? !!formPresetById(placed.ref) : isListSource(ctx.sources.get(placed.ref));
984
+ if (!ok) c.add(SitePlanIssueCode.Free, `${p}.slot`, `"${slot}" — form:<a form preset>, or list: / accordion: / tabs: / quotes: <a list source of the plan>`);
986
985
  }
987
986
  const move = raw['move'];
988
987
  if (move !== undefined && !(isObject(move) && FREE_MOVES[move['trigger'] as FreeTrigger]?.[String(move['action'])])) c.add(SitePlanIssueCode.Free, `${p}.move`, 'a move the product has (FREE_MOVES)');
@@ -40,7 +40,7 @@ export function businessComposeContext(typeId: string | null | undefined): Pick<
40
40
  * layouts' photos, its tier, the legal context its preflight read (AW1), whether its business is calm (AW6 — the body
41
41
  * takes no shaped edge), its kind of business for the footer (AW12), and — once the stock step has placed the pictures —
42
42
  * what fills them (iox-ui#129: a section nothing fills is composed type-led, an empty photo on a composed page a ground
43
- * plate). ONE reading, so every compose of a run's plan — each step, a resumed step, a redesign, the builder's Re-fit —
43
+ * plate), and whether the header's words read at rest over the home opening (HI3-D5, judged at preflight). ONE reading, so every compose of a run's plan — each step, a resumed step, a redesign, the builder's Re-fit —
44
44
  * composes the same site. Pure.
45
45
  */
46
46
  export function runComposeContext(run: ComposeRun): ComposeContext {
@@ -48,6 +48,8 @@ export function runComposeContext(run: ComposeRun): ComposeContext {
48
48
  const context: ComposeContext = {
49
49
  ...composeContextOf(run.year, decisions?.layoutPhotos, run.tier ?? undefined, decisions?.legal ?? null, isCalmBusinessType(decisions?.businessType)),
50
50
  ...businessComposeContext(decisions?.businessType),
51
+ // HI3-D5: the preflight judged the words at rest once, on the pixels it held; every step composes with that answer.
52
+ ...(typeof decisions?.headerReadable === 'boolean' ? { headerReadable: decisions.headerReadable } : {}),
51
53
  };
52
54
  return run.pictures ? { ...context, pictures: run.pictures } : context;
53
55
  }
@@ -540,6 +540,19 @@ dialog[data-iox-dialog]:has(> .iox-dialog-close),
540
540
  --iox-link-weight: var(--iox-weight-body);
541
541
  }
542
542
 
543
+ /* vectoriox/iox-ui#173 (a), decided 2026-11-28 — a header's words wear the BAR's ink: its pages, the drawer's pages and the
544
+ menu word (a text button) rest in the bar's own colour, never the look's accent link colour (the accent menu word on the
545
+ Glass bar measured 2.03:1 over a dark section). The current page reads by its weight (the roles above rest at the body
546
+ weight, the current link at weight-strong — no line), and the accent comes on hover only. The contract's
547
+ `contrastAudit.headerInkScope`, verbatim (pinned by token-names.spec); declared on the header's CHILDREN, so a scheme the
548
+ header root wears — which re-declares the link colour on the root itself — never ties with it. */
549
+ .iox-es-nav > *, [data-iox-header] > * {
550
+ --iox-link-color: currentColor;
551
+ --iox-link-current-color: currentColor;
552
+ --iox-link-hover-color: var(--iox-accent-text);
553
+ --iox-button-ghost-ink: currentColor;
554
+ }
555
+
543
556
  /* vectoriox/iox-ui#98 — a header on a PHONE is one row, and its name is held whole on one or two lines. The controls (the
544
557
  menu button, the bag, the account, a pinned page, the cells holding them) keep their size and sit at half the look's gap;
545
558
  the name takes the room the hidden pages leave and wraps balanced, a word too long for the room breaking rather than
@@ -2648,6 +2661,31 @@ dialog[data-iox-dialog].iox-es.iox-role-shop-cart-drawer:is([data-iox-closing],
2648
2661
  .iox-role-footer-ruled > :first-child { border-block-start: none; padding-block-start: 0; }
2649
2662
  }
2650
2663
 
2664
+ /* FV1 arrange:halves (footer-v2 §2, after thepopuphotel and allerstudio) — two zones, the brand at the start and the blocks
2665
+ at the end, divided by a vertical hairline in the divider's colour on the END zone's start side (logical: right-to-left
2666
+ mirrors by itself). The start zone keeps its words on the column; each zone pads the gap toward the hairline. On a
2667
+ phone the zones stack and the hairline lies across. `:nth-child(n)` as ruled's, so a zone's own node rule never wins. */
2668
+ .iox-role-footer-halves > :nth-child(n) { padding-inline-end: var(--iox-space-gap); }
2669
+ .iox-role-footer-halves > :nth-child(2) {
2670
+ border-inline-start: var(--iox-border-width, 1px) solid var(--iox-divider-color);
2671
+ padding-inline: var(--iox-space-gap) 0;
2672
+ }
2673
+ @media (max-width: 767px) {
2674
+ .iox-role-footer-halves > :nth-child(n) { padding-inline: 0; }
2675
+ .iox-role-footer-halves > :nth-child(2) { border-inline-start: none; border-block-start: var(--iox-border-width, 1px) solid var(--iox-divider-color); padding-block-start: var(--iox-space-gap); margin-block-start: var(--iox-space-gap); }
2676
+ }
2677
+ @container iox-canvas (max-width: 767px) {
2678
+ .iox-role-footer-halves > :nth-child(n) { padding-inline: 0; }
2679
+ .iox-role-footer-halves > :nth-child(2) { border-inline-start: none; border-block-start: var(--iox-border-width, 1px) solid var(--iox-divider-color); padding-block-start: var(--iox-space-gap); margin-block-start: var(--iox-space-gap); }
2680
+ }
2681
+
2682
+ /* FV1 ground:framed — the footer on the page's own ground, as a ruled box inside the page frame: its margin and the padding
2683
+ that brings its words back onto the column are the root's (generation-core `FOOTER_FRAMED_STYLES`, an inset footer's);
2684
+ the rule is drawn here in the divider's colour. Two classes, so the section's own node rule never wins. */
2685
+ .iox-es.iox-footer-ground-framed {
2686
+ border: var(--iox-border-width, 1px) solid var(--iox-divider-color);
2687
+ }
2688
+
2651
2689
  /* closing:name-and-action (AW12-D3) — the name stands on the window's bottom and loses its lowest `footer-name-cut`
2652
2690
  (0.12em, descenders included) to it: the footer ends where the name is cut, nothing under it. */
2653
2691
  .iox-es.iox-footer-closing-name-and-action {
@@ -2791,15 +2829,16 @@ dialog[data-iox-dialog].iox-es.iox-role-shop-cart-drawer:is([data-iox-closing],
2791
2829
  transition-duration: var(--iox-dur-ui, 200ms);
2792
2830
  transition-timing-function: var(--iox-ease-standard, ease-out);
2793
2831
  }
2794
- /* AT REST (headerFirm false): no ground, the veil under the words, and the way back faster than the way in. */
2795
- :root :is([data-iox-header-ground="over"], [data-iox-header-ground="over-glass"]):is([data-iox-opening-media="picture"] *):not([data-iox-scrolled] *):not(:has(dialog[open])) {
2832
+ /* AT REST (headerFirm false): no ground, the veil under the words, and the way back faster than the way in. An open menu
2833
+ is a real <dialog open> live, and the canvas stage's [data-iox-menu-open] in the builder (iox-ui#181). */
2834
+ :root :is([data-iox-header-ground="over"], [data-iox-header-ground="over-glass"]):not([data-iox-header-shape]):is([data-iox-opening-media="picture"] *):not([data-iox-scrolled] *):not(:has(:is(dialog[open], [data-iox-menu-open]))) {
2796
2835
  transition-duration: calc(var(--iox-dur-ui, 200ms) * 0.6);
2797
2836
  }
2798
- :root :is([data-iox-header-ground="over"], [data-iox-header-ground="over-glass"]):is([data-iox-opening-media="picture"] *):not([data-iox-scrolled] *):not(:has(dialog[open]))::before {
2837
+ :root :is([data-iox-header-ground="over"], [data-iox-header-ground="over-glass"]):not([data-iox-header-shape]):is([data-iox-opening-media="picture"] *):not([data-iox-scrolled] *):not(:has(:is(dialog[open], [data-iox-menu-open])))::before {
2799
2838
  opacity: 0;
2800
2839
  transition-duration: calc(var(--iox-dur-ui, 200ms) * 0.6);
2801
2840
  }
2802
- :root :is([data-iox-header-ground="over"], [data-iox-header-ground="over-glass"]):is([data-iox-opening-media="picture"] *):not([data-iox-scrolled] *):not(:has(dialog[open]))::after {
2841
+ :root :is([data-iox-header-ground="over"], [data-iox-header-ground="over-glass"]):not([data-iox-header-shape]):is([data-iox-opening-media="picture"] *):not([data-iox-scrolled] *):not(:has(:is(dialog[open], [data-iox-menu-open])))::after {
2803
2842
  opacity: 1;
2804
2843
  transition-duration: var(--iox-dur-ui, 200ms);
2805
2844
  }
@@ -2834,3 +2873,99 @@ dialog[data-iox-dialog].iox-es.iox-role-shop-cart-drawer:is([data-iox-closing],
2834
2873
  --iox-nav-over-veil: none;
2835
2874
  }
2836
2875
  }
2876
+
2877
+ /* ── HI3 slice 2 — the header's OUTLINE and its NAME (header-ingredients-plan HI3-D15…D26, board hi3-shapes) ──────────
2878
+ Keyed on design-core `headerAttributes`: `data-iox-header-shape` (pill · islands) and `data-iox-header-brand` (hangs ·
2879
+ later). A floating header always writes its ground word (a solid one writes `solid`: the look's own bar), so it lives on
2880
+ slice 1's ground layer and gives its height back over a pictured opening (HI3-D17); it is never at rest
2881
+ (`HEADER_AT_REST_SELECTOR` excludes it: a floating shape wears its ground from the top, never a clear pill) and has no
2882
+ scroll edge (HI3-D20, `headerAttributes` writes none). The pill is ONE inset bar as wide as the content column
2883
+ (`--iox-content-width`, award §0c) and never wider than the window less its insets (HI3-D16); islands put the ground on
2884
+ each part of the bar (HI3-D18); the corner is the look's button corner (HI3-D19). All logical properties (HI3-D24). */
2885
+ [data-iox-header-ground='solid'] {
2886
+ --hdr-bg: var(--iox-nav-bg);
2887
+ --hdr-backdrop: var(--iox-nav-backdrop);
2888
+ --hdr-border: var(--iox-nav-border);
2889
+ --hdr-shadow: var(--iox-nav-shadow);
2890
+ }
2891
+ [data-iox-header-shape] {
2892
+ --hdr-float-block: 8px;
2893
+ --hdr-float-inline: max(24px, calc((100% - var(--iox-content-width, 100%)) / 2));
2894
+ --hdr-float-pad: 28px;
2895
+ --hdr-float-radius: var(--iox-button-radius, 999px);
2896
+ padding-block: var(--hdr-float-block) !important;
2897
+ }
2898
+ [data-iox-header-shape='pill'] {
2899
+ padding-inline: calc(var(--hdr-float-inline) + var(--hdr-float-pad)) !important;
2900
+ }
2901
+ [data-iox-header-shape='pill']::before {
2902
+ inset: var(--hdr-float-block) var(--hdr-float-inline);
2903
+ border-width: var(--iox-border-width, 1px);
2904
+ border-radius: var(--hdr-float-radius);
2905
+ }
2906
+ [data-iox-header-shape='islands'] {
2907
+ padding-inline: var(--hdr-float-inline) !important;
2908
+ }
2909
+ [data-iox-header-shape='islands']::before {
2910
+ display: none;
2911
+ }
2912
+ [data-iox-header-shape='islands'] > :not(dialog, :empty) {
2913
+ align-self: stretch;
2914
+ display: flex;
2915
+ align-items: center;
2916
+ padding-inline: 20px;
2917
+ border: var(--iox-border-width, 1px) solid var(--hdr-border);
2918
+ border-radius: var(--hdr-float-radius);
2919
+ background-color: var(--hdr-bg);
2920
+ box-shadow: var(--hdr-shadow);
2921
+ -webkit-backdrop-filter: var(--hdr-backdrop);
2922
+ backdrop-filter: var(--hdr-backdrop);
2923
+ }
2924
+ /* A header that has stepped aside leaves nothing of itself in view — its shadow goes with it at once (T3, R-H11). */
2925
+ [data-iox-header-shape][data-iox-header-hidden] {
2926
+ --hdr-shadow: none;
2927
+ }
2928
+ /* HI3-D21 — the name HANGS: the logo picture is half again the bar's height (at most 48px below it); its negative end
2929
+ margin keeps the bar its own height, and the opening's words keep clear of the overhang (T6). */
2930
+ [data-iox-header-brand='hangs'] {
2931
+ --hdr-hang: min(calc(var(--header-h, var(--hdr-h-fallback, 80px)) / 2), 48px);
2932
+ overflow: visible;
2933
+ }
2934
+ [data-iox-header-brand='hangs'] .iox-role-nav-brand {
2935
+ align-self: flex-start;
2936
+ position: relative;
2937
+ z-index: 1;
2938
+ }
2939
+ [data-iox-header-brand='hangs'] .iox-role-nav-brand img {
2940
+ block-size: calc(var(--header-h, var(--hdr-h-fallback, 80px)) + var(--hdr-hang));
2941
+ inline-size: auto;
2942
+ max-inline-size: none;
2943
+ margin-block-end: calc(-1 * var(--hdr-hang));
2944
+ }
2945
+ :root:has([data-iox-header-brand='hangs']) .iox-role-opening .iox-role-opening-words {
2946
+ padding-block-start: min(calc(var(--header-h, 80px) / 2), 48px);
2947
+ }
2948
+ /* On a phone the name fits (HI3-D23): a hanging logo would cover the heading on a narrow screen. */
2949
+ @media (max-width: 767px) {
2950
+ [data-iox-header-shape] { --hdr-float-block: 6px; --hdr-float-inline: 10px; --hdr-float-pad: 16px; }
2951
+ [data-iox-header-brand='hangs'] .iox-role-nav-brand img { block-size: auto; max-block-size: 100%; margin-block-end: 0; }
2952
+ :root:has([data-iox-header-brand='hangs']) .iox-role-opening .iox-role-opening-words { padding-block-start: 0; }
2953
+ }
2954
+ @container iox-canvas (max-width: 767px) {
2955
+ [data-iox-header-shape] { --hdr-float-block: 6px; --hdr-float-inline: 10px; --hdr-float-pad: 16px; }
2956
+ [data-iox-header-brand='hangs'] .iox-role-nav-brand img { block-size: auto; max-block-size: 100%; margin-block-end: 0; }
2957
+ :root:has([data-iox-header-brand='hangs']) .iox-role-opening .iox-role-opening-words { padding-block-start: 0; }
2958
+ }
2959
+ /* HI3-D22 — the name arrives LATER: hidden by opacity only (the raw SSR and a screen reader keep it), shown once the page
2960
+ has moved, while a menu is open, or from the top on a page that opens without a picture. A transition on the look's
2961
+ dur-ui in and 0.6× out, so it turns around from the live value; reduced motion keeps the fade, motion Off is instant. */
2962
+ [data-iox-header-brand='later'] .iox-role-nav-brand {
2963
+ opacity: 0;
2964
+ transition: opacity calc(var(--iox-dur-ui, 200ms) * 0.6) var(--iox-ease-standard, ease-out);
2965
+ }
2966
+ :is([data-iox-scrolled] *)[data-iox-header-brand='later'] .iox-role-nav-brand,
2967
+ [data-iox-header-brand='later']:has(:is(dialog[open], [data-iox-menu-open])) .iox-role-nav-brand,
2968
+ [data-iox-header-brand='later']:not([data-iox-opening-media="picture"] *) .iox-role-nav-brand {
2969
+ opacity: 1;
2970
+ transition-duration: var(--iox-dur-ui, 200ms);
2971
+ }