@vectoriox/iox-ui 5.150.0 → 5.151.1

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.
@@ -165,6 +165,7 @@ declare const SPEC_BUSINESS_TYPES: readonly [{
165
165
  readonly arranges: readonly [];
166
166
  readonly moves: readonly [];
167
167
  readonly say: readonly [];
168
+ readonly sayHe: readonly [];
168
169
  };
169
170
  readonly column: {
170
171
  readonly never: readonly [];
@@ -252,6 +253,7 @@ declare const SPEC_BUSINESS_TYPES: readonly [{
252
253
  readonly arranges: readonly [];
253
254
  readonly moves: readonly [];
254
255
  readonly say: readonly [];
256
+ readonly sayHe: readonly [];
255
257
  };
256
258
  readonly column: {
257
259
  readonly never: readonly [];
@@ -340,6 +342,7 @@ declare const SPEC_BUSINESS_TYPES: readonly [{
340
342
  readonly arranges: readonly [];
341
343
  readonly moves: readonly [];
342
344
  readonly say: readonly [];
345
+ readonly sayHe: readonly [];
343
346
  };
344
347
  readonly column: {
345
348
  readonly never: readonly [];
@@ -429,6 +432,7 @@ declare const SPEC_BUSINESS_TYPES: readonly [{
429
432
  readonly arranges: readonly [];
430
433
  readonly moves: readonly [];
431
434
  readonly say: readonly [];
435
+ readonly sayHe: readonly [];
432
436
  };
433
437
  readonly column: {
434
438
  readonly never: readonly [];
@@ -508,6 +512,7 @@ declare const SPEC_BUSINESS_TYPES: readonly [{
508
512
  readonly arranges: readonly [];
509
513
  readonly moves: readonly [];
510
514
  readonly say: readonly [];
515
+ readonly sayHe: readonly [];
511
516
  };
512
517
  readonly column: {
513
518
  readonly never: readonly [];
@@ -589,6 +594,7 @@ declare const SPEC_BUSINESS_TYPES: readonly [{
589
594
  readonly arranges: readonly [];
590
595
  readonly moves: readonly [];
591
596
  readonly say: readonly [];
597
+ readonly sayHe: readonly [];
592
598
  };
593
599
  readonly column: {
594
600
  readonly never: readonly [];
@@ -669,6 +675,7 @@ declare const SPEC_BUSINESS_TYPES: readonly [{
669
675
  readonly arranges: readonly [];
670
676
  readonly moves: readonly [];
671
677
  readonly say: readonly [];
678
+ readonly sayHe: readonly [];
672
679
  };
673
680
  readonly column: {
674
681
  readonly never: readonly [];
@@ -750,6 +757,7 @@ declare const SPEC_BUSINESS_TYPES: readonly [{
750
757
  readonly arranges: readonly [];
751
758
  readonly moves: readonly [];
752
759
  readonly say: readonly [];
760
+ readonly sayHe: readonly [];
753
761
  };
754
762
  readonly column: {
755
763
  readonly never: readonly [];
@@ -830,6 +838,7 @@ declare const SPEC_BUSINESS_TYPES: readonly [{
830
838
  readonly arranges: readonly ["fan", "tilted"];
831
839
  readonly moves: readonly [];
832
840
  readonly say: readonly ["Trust and care are shown straight: nothing leans, nothing is fanned like a hand of cards."];
841
+ readonly sayHe: readonly ["אמון וטיפול מציגים ישר: שום דבר לא מוטה, שום דבר לא פרוש כמו קלפים ביד."];
833
842
  };
834
843
  readonly column: {
835
844
  readonly never: readonly ["wide"];
@@ -920,6 +929,7 @@ declare const SPEC_BUSINESS_TYPES: readonly [{
920
929
  readonly arranges: readonly [];
921
930
  readonly moves: readonly [];
922
931
  readonly say: readonly [];
932
+ readonly sayHe: readonly [];
923
933
  };
924
934
  readonly column: {
925
935
  readonly never: readonly [];
@@ -1004,6 +1014,7 @@ declare const SPEC_BUSINESS_TYPES: readonly [{
1004
1014
  readonly arranges: readonly [];
1005
1015
  readonly moves: readonly [];
1006
1016
  readonly say: readonly [];
1017
+ readonly sayHe: readonly [];
1007
1018
  };
1008
1019
  readonly column: {
1009
1020
  readonly never: readonly [];
@@ -1089,6 +1100,7 @@ declare const SPEC_BUSINESS_TYPES: readonly [{
1089
1100
  readonly arranges: readonly [];
1090
1101
  readonly moves: readonly [];
1091
1102
  readonly say: readonly [];
1103
+ readonly sayHe: readonly [];
1092
1104
  };
1093
1105
  readonly column: {
1094
1106
  readonly never: readonly [];
@@ -1170,6 +1182,7 @@ declare const SPEC_BUSINESS_TYPES: readonly [{
1170
1182
  readonly arranges: readonly ["deck", "fan", "tilted"];
1171
1183
  readonly moves: readonly ["auto", "page"];
1172
1184
  readonly say: readonly ["People who come for care or advice read at their own pace: nothing turns by itself, nothing to flick through.", "Trust and care are shown straight: nothing leans, nothing is fanned like a hand of cards."];
1185
+ readonly sayHe: readonly ["מי שמגיע לטיפול או לייעוץ קורא בקצב שלו: שום דבר לא מתחלף מעצמו, אין מה לדפדף.", "אמון וטיפול מציגים ישר: שום דבר לא מוטה, שום דבר לא פרוש כמו קלפים ביד."];
1173
1186
  };
1174
1187
  readonly column: {
1175
1188
  readonly never: readonly ["wide"];
@@ -1255,6 +1268,7 @@ declare const SPEC_BUSINESS_TYPES: readonly [{
1255
1268
  readonly arranges: readonly ["deck", "fan", "tilted"];
1256
1269
  readonly moves: readonly ["auto", "page"];
1257
1270
  readonly say: readonly ["People who come for care or advice read at their own pace: nothing turns by itself, nothing to flick through.", "Trust and care are shown straight: nothing leans, nothing is fanned like a hand of cards."];
1271
+ readonly sayHe: readonly ["מי שמגיע לטיפול או לייעוץ קורא בקצב שלו: שום דבר לא מתחלף מעצמו, אין מה לדפדף.", "אמון וטיפול מציגים ישר: שום דבר לא מוטה, שום דבר לא פרוש כמו קלפים ביד."];
1258
1272
  };
1259
1273
  readonly column: {
1260
1274
  readonly never: readonly ["wide"];
@@ -1341,6 +1355,7 @@ declare const SPEC_BUSINESS_TYPES: readonly [{
1341
1355
  readonly arranges: readonly ["deck", "fan", "tilted"];
1342
1356
  readonly moves: readonly ["auto", "page"];
1343
1357
  readonly say: readonly ["People who come for care or advice read at their own pace: nothing turns by itself, nothing to flick through.", "Trust and care are shown straight: nothing leans, nothing is fanned like a hand of cards."];
1358
+ readonly sayHe: readonly ["מי שמגיע לטיפול או לייעוץ קורא בקצב שלו: שום דבר לא מתחלף מעצמו, אין מה לדפדף.", "אמון וטיפול מציגים ישר: שום דבר לא מוטה, שום דבר לא פרוש כמו קלפים ביד."];
1344
1359
  };
1345
1360
  readonly column: {
1346
1361
  readonly never: readonly ["wide"];
@@ -1425,6 +1440,7 @@ declare const SPEC_BUSINESS_TYPES: readonly [{
1425
1440
  readonly arranges: readonly ["fan", "tilted"];
1426
1441
  readonly moves: readonly [];
1427
1442
  readonly say: readonly ["Trust and care are shown straight: nothing leans, nothing is fanned like a hand of cards."];
1443
+ readonly sayHe: readonly ["אמון וטיפול מציגים ישר: שום דבר לא מוטה, שום דבר לא פרוש כמו קלפים ביד."];
1428
1444
  };
1429
1445
  readonly column: {
1430
1446
  readonly never: readonly ["wide"];
@@ -1505,6 +1521,7 @@ declare const SPEC_BUSINESS_TYPES: readonly [{
1505
1521
  readonly arranges: readonly [];
1506
1522
  readonly moves: readonly [];
1507
1523
  readonly say: readonly [];
1524
+ readonly sayHe: readonly [];
1508
1525
  };
1509
1526
  readonly column: {
1510
1527
  readonly never: readonly [];
@@ -1592,6 +1609,7 @@ declare const SPEC_BUSINESS_TYPES: readonly [{
1592
1609
  readonly arranges: readonly [];
1593
1610
  readonly moves: readonly [];
1594
1611
  readonly say: readonly [];
1612
+ readonly sayHe: readonly [];
1595
1613
  };
1596
1614
  readonly column: {
1597
1615
  readonly never: readonly [];
@@ -1676,6 +1694,7 @@ declare const SPEC_BUSINESS_TYPES: readonly [{
1676
1694
  readonly arranges: readonly [];
1677
1695
  readonly moves: readonly [];
1678
1696
  readonly say: readonly [];
1697
+ readonly sayHe: readonly [];
1679
1698
  };
1680
1699
  readonly column: {
1681
1700
  readonly never: readonly [];
@@ -1760,6 +1779,7 @@ declare const SPEC_BUSINESS_TYPES: readonly [{
1760
1779
  readonly arranges: readonly [];
1761
1780
  readonly moves: readonly [];
1762
1781
  readonly say: readonly [];
1782
+ readonly sayHe: readonly [];
1763
1783
  };
1764
1784
  readonly column: {
1765
1785
  readonly never: readonly [];
@@ -1839,6 +1859,7 @@ declare const SPEC_BUSINESS_TYPES: readonly [{
1839
1859
  readonly arranges: readonly [];
1840
1860
  readonly moves: readonly [];
1841
1861
  readonly say: readonly [];
1862
+ readonly sayHe: readonly [];
1842
1863
  };
1843
1864
  readonly column: {
1844
1865
  readonly never: readonly [];
@@ -1919,6 +1940,7 @@ declare const SPEC_BUSINESS_TYPES: readonly [{
1919
1940
  readonly arranges: readonly [];
1920
1941
  readonly moves: readonly [];
1921
1942
  readonly say: readonly [];
1943
+ readonly sayHe: readonly [];
1922
1944
  };
1923
1945
  readonly column: {
1924
1946
  readonly never: readonly [];
@@ -1999,6 +2021,7 @@ declare const SPEC_BUSINESS_TYPES: readonly [{
1999
2021
  readonly arranges: readonly ["deck", "fan", "tilted"];
2000
2022
  readonly moves: readonly [];
2001
2023
  readonly say: readonly ["A deck reads as a game; advice and causes are read, not flicked.", "Trust and care are shown straight: nothing leans, nothing is fanned like a hand of cards."];
2024
+ readonly sayHe: readonly ["חפיסה נראית כמו משחק; על ייעוץ ועל מטרות קוראים, לא מדפדפים.", "אמון וטיפול מציגים ישר: שום דבר לא מוטה, שום דבר לא פרוש כמו קלפים ביד."];
2002
2025
  };
2003
2026
  readonly column: {
2004
2027
  readonly never: readonly ["wide"];
@@ -2081,6 +2104,7 @@ declare const SPEC_BUSINESS_TYPES: readonly [{
2081
2104
  readonly arranges: readonly ["deck", "fan", "tilted"];
2082
2105
  readonly moves: readonly [];
2083
2106
  readonly say: readonly ["A deck reads as a game; advice and causes are read, not flicked.", "Trust and care are shown straight: nothing leans, nothing is fanned like a hand of cards."];
2107
+ readonly sayHe: readonly ["חפיסה נראית כמו משחק; על ייעוץ ועל מטרות קוראים, לא מדפדפים.", "אמון וטיפול מציגים ישר: שום דבר לא מוטה, שום דבר לא פרוש כמו קלפים ביד."];
2084
2108
  };
2085
2109
  readonly column: {
2086
2110
  readonly never: readonly ["wide"];
@@ -2157,6 +2181,7 @@ declare const SPEC_BUSINESS_TYPES: readonly [{
2157
2181
  readonly arranges: readonly ["deck", "fan", "tilted"];
2158
2182
  readonly moves: readonly ["auto", "page"];
2159
2183
  readonly say: readonly ["People who come for care or advice read at their own pace: nothing turns by itself, nothing to flick through.", "Trust and care are shown straight: nothing leans, nothing is fanned like a hand of cards."];
2184
+ readonly sayHe: readonly ["מי שמגיע לטיפול או לייעוץ קורא בקצב שלו: שום דבר לא מתחלף מעצמו, אין מה לדפדף.", "אמון וטיפול מציגים ישר: שום דבר לא מוטה, שום דבר לא פרוש כמו קלפים ביד."];
2160
2185
  };
2161
2186
  readonly column: {
2162
2187
  readonly never: readonly ["wide"];
@@ -2244,6 +2269,7 @@ declare const SPEC_BUSINESS_TYPES: readonly [{
2244
2269
  readonly arranges: readonly [];
2245
2270
  readonly moves: readonly [];
2246
2271
  readonly say: readonly [];
2272
+ readonly sayHe: readonly [];
2247
2273
  };
2248
2274
  readonly column: {
2249
2275
  readonly never: readonly [];
@@ -2327,6 +2353,7 @@ declare const SPEC_BUSINESS_TYPES: readonly [{
2327
2353
  readonly arranges: readonly ["deck", "fan", "tilted"];
2328
2354
  readonly moves: readonly [];
2329
2355
  readonly say: readonly ["A deck reads as a game; advice and causes are read, not flicked.", "Trust and care are shown straight: nothing leans, nothing is fanned like a hand of cards."];
2356
+ readonly sayHe: readonly ["חפיסה נראית כמו משחק; על ייעוץ ועל מטרות קוראים, לא מדפדפים.", "אמון וטיפול מציגים ישר: שום דבר לא מוטה, שום דבר לא פרוש כמו קלפים ביד."];
2330
2357
  };
2331
2358
  readonly column: {
2332
2359
  readonly never: readonly ["wide"];
@@ -2403,6 +2430,7 @@ declare const SPEC_BUSINESS_TYPES: readonly [{
2403
2430
  readonly arranges: readonly [];
2404
2431
  readonly moves: readonly [];
2405
2432
  readonly say: readonly [];
2433
+ readonly sayHe: readonly [];
2406
2434
  };
2407
2435
  readonly column: {
2408
2436
  readonly never: readonly [];
@@ -2486,6 +2514,7 @@ declare const SPEC_BUSINESS_TYPES: readonly [{
2486
2514
  readonly arranges: readonly [];
2487
2515
  readonly moves: readonly [];
2488
2516
  readonly say: readonly [];
2517
+ readonly sayHe: readonly [];
2489
2518
  };
2490
2519
  readonly column: {
2491
2520
  readonly never: readonly [];
@@ -2569,6 +2598,7 @@ declare const SPEC_BUSINESS_TYPES: readonly [{
2569
2598
  readonly arranges: readonly [];
2570
2599
  readonly moves: readonly [];
2571
2600
  readonly say: readonly [];
2601
+ readonly sayHe: readonly [];
2572
2602
  };
2573
2603
  readonly column: {
2574
2604
  readonly never: readonly [];
@@ -3043,6 +3073,8 @@ interface BusinessTypeLists {
3043
3073
  readonly arranges: ReadonlyArray<string>;
3044
3074
  readonly moves: ReadonlyArray<string>;
3045
3075
  readonly say: ReadonlyArray<string>;
3076
+ /** One Hebrew sentence for each English one (vectoriox/iox-ui#123 — a mended list is said in the owner's words). */
3077
+ readonly sayHe: ReadonlyArray<string>;
3046
3078
  }
3047
3079
  /** Award §0c (AW-D34): the column words a type's pages are never offered (contract harness `businessTypes[].column`,
3048
3080
  * from harness.mjs COLUMN_NEVER) — the layout wire leaves them out and checkLayout mends them (`column-mended`). */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vectoriox/iox-ui",
3
- "version": "5.150.0",
3
+ "version": "5.151.1",
4
4
  "peerDependencies": {
5
5
  "@angular/common": ">=20.0.0",
6
6
  "@angular/core": ">=20.0.0",
@@ -128,11 +128,18 @@ export function contentCapOf(column: unknown, rowValue: (name: string) => string
128
128
  return width === WIDE_CONTENT_WIDTH ? WIDE_CONTENT_CAP : width;
129
129
  }
130
130
 
131
- /** The selector a column word's block is declared on, inside `scope` (the builder's token scope — the attribute sits on
132
- * the scope element itself) or anywhere (the engine's `<body>`). */
131
+ /**
132
+ * The selector a column word's block is declared on, inside `scope` (the builder's token scope — the attribute sits on
133
+ * the scope element itself) or anywhere (the engine's `<body>`).
134
+ *
135
+ * ⚠️ A token scope NESTED under the element carrying the word follows it too (`[word] scope`): the canvas's
136
+ * `<iox-page-component class="iox-token-scope" data-iox-column>` hands its `class` to its own `.iox-page-wrapper`, so the
137
+ * page sits in a second scope that re-declares the site's `content-width` — without this form a page's own word
138
+ * (Page ▸ Design ▸ Content width) moved the attribute and nothing on the canvas (award §0c CW3).
139
+ */
133
140
  export function columnSelector(word: string, scope?: string): string {
134
141
  const attr = `[${COLUMN_ATTRIBUTE}="${word}"]`;
135
- return scope ? `${scope}${attr}, ${scope} ${attr}` : attr;
142
+ return scope ? `${scope}${attr}, ${scope} ${attr}, ${attr} ${scope}` : attr;
136
143
  }
137
144
 
138
145
  /**
@@ -246,8 +246,9 @@ export function findingMessageOf(code: `${SiteFindingCode}`, params: FindingPara
246
246
  */
247
247
  export function findingSentence(f: Pick<SiteFinding, 'code' | 'message' | 'fact' | 'params'>, lang: string | null | undefined): string {
248
248
  if (f.fact) {
249
+ // A fact this table does not know (a newer server) keeps the server's own words — never the generic sentence.
249
250
  const rule = CHECKOUT_GATE_RULES.find(r => r.code === f.fact);
250
- if (rule) return labelIn(rule.label, lang);
251
+ return rule ? labelIn(rule.label, lang) : f.message;
251
252
  }
252
253
  const words = SITE_FINDING_WORDS[f.code as `${SiteFindingCode}`];
253
254
  const sentence = words ? sentenceOf(words, f.params?.['variant']) : null;
@@ -3,6 +3,7 @@ import {
3
3
  LayoutListMove, LayoutListPhone, LayoutListShape, LayoutListWho, LayoutMendKind, LayoutPage,
4
4
  } from './layout-language';
5
5
  import { LIST_RULES, bentoFill, listBelowPro, listBuiltWords, listMeaning, listWait, listWordRefusal, ListWordRefusal } from './list-table';
6
+ import { bentoFillsParams, listSaidSentence, ListSaid, ListSayCode, ListSayParams, listWordRef, listWordRefs } from './list-words';
6
7
  import { SPEC_SITE_LAYOUT } from './site-spec.generated';
7
8
 
8
9
  /**
@@ -25,6 +26,10 @@ const has = <T extends string>(list: ReadonlyArray<T>, v: string): boolean => (l
25
26
 
26
27
  /** The words a repaired mix is said in (the brief and the owner read them). */
27
28
  const say = (arrange: string) => listMeaning('arrange', arrange);
29
+ /** An arrangement, as a value a sentence names (list-words.ts says it in the owner's language). */
30
+ const arr = (arrange: string) => listWordRef('arrange', arrange);
31
+ /** One issue of the judge: its English sentence is the message, its code and values are what a screen says (#123). */
32
+ const wordedIssue = (code: LayoutIssueCode, path: string, said: ListSaid): LayoutIssue => ({ code, path, message: listSaidSentence(said, null), words: said });
28
33
 
29
34
  /**
30
35
  * What a business type's lists never do (L-D12, the contract's harness `businessTypes[].lists` — harness-core
@@ -35,6 +40,8 @@ export interface LayoutListNever {
35
40
  readonly moves: ReadonlyArray<string>;
36
41
  /** Why, in the owner's words — said with the repair. */
37
42
  readonly say: ReadonlyArray<string>;
43
+ /** The same, in Hebrew (vectoriox/iox-ui#123 — the contract's `lists.sayHe`, one sentence for each English one). */
44
+ readonly sayHe?: ReadonlyArray<string>;
38
45
  }
39
46
 
40
47
  /** AW11: what the judge knows of where the list sits and who it is built for. */
@@ -73,19 +80,19 @@ export function checkList(mix: LayoutListMix, shape: LayoutListShape | null, lay
73
80
  if (refused.length || !shape) return refused;
74
81
 
75
82
  if (shape.items !== null && shape.items < R.minItems) {
76
- return [{ code: LayoutIssueCode.Content, path: at, message: `a list section shows at least ${R.minItems} items — "${shape.alias}" has ${shape.items}; show it another way` }];
83
+ return [wordedIssue(LayoutIssueCode.Content, at, { code: ListSayCode.TooFewItems, params: { min: R.minItems, alias: shape.alias, items: shape.items } })];
77
84
  }
78
85
 
79
86
  const next: LayoutListMix = structuredClone(mix);
80
- const said: string[] = [];
81
- const repair = (message: string) => said.push(message);
87
+ const said: ListSaid[] = [];
88
+ const repair = (code: `${ListSayCode}`, params: ListSayParams = {}) => said.push({ code, params });
82
89
 
83
90
  // A word the product draws in a later phase (the contract's list table, award AW0): drawn as its stand-in meanwhile,
84
91
  // and said — first, so every rule below judges the mix the product will draw. The wire never offers one.
85
92
  const waiting = (k: 'item' | 'arrange' | 'arrive' | 'move' | 'hover', w: string): string | null | undefined => {
86
93
  const wait = listWait(k, w);
87
94
  if (!wait) return undefined;
88
- repair(`${k} "${w}" is drawn in ${wait.phase}: ${wait.drawnAs ? `"${wait.drawnAs}" meanwhile` : 'left out meanwhile'}`);
95
+ repair(ListSayCode.Waits, { k, word: listWordRef(k, w), phase: wait.phase, ...(wait.drawnAs ? { as: listWordRef(k, wait.drawnAs) } : {}) });
89
96
  return wait.drawnAs;
90
97
  };
91
98
  for (const k of ['item', 'arrange', 'arrive'] as const) {
@@ -101,7 +108,7 @@ export function checkList(mix: LayoutListMix, shape: LayoutListShape | null, lay
101
108
  const below = (k: 'item' | 'arrange' | 'arrive', fallback: string) => {
102
109
  const stand = listBelowPro(k, next[k]);
103
110
  if (stand === undefined) return;
104
- repair(`${k} "${next[k]}" comes with the award plan: "${stand ?? fallback}" instead`);
111
+ repair(ListSayCode.AwardOnly, { k, word: listWordRef(k, next[k]), as: listWordRef(k, stand ?? fallback) });
105
112
  (next as unknown as Record<string, string>)[k] = stand ?? fallback;
106
113
  };
107
114
  below('item', LayoutListItem.Card);
@@ -111,7 +118,7 @@ export function checkList(mix: LayoutListMix, shape: LayoutListShape | null, lay
111
118
  const kept = (next[k] as string[]).flatMap(w => {
112
119
  const stand = listBelowPro(k, w);
113
120
  if (stand === undefined) return [w];
114
- repair(`${k} "${w}" comes with the award plan: ${stand ? `"${stand}" instead` : 'left out'}`);
121
+ repair(ListSayCode.AwardOnly, { k, word: listWordRef(k, w), ...(stand ? { as: listWordRef(k, stand) } : {}) });
115
122
  return stand ? [stand] : [];
116
123
  });
117
124
  (next as unknown as Record<string, string[]>)[k] = [...new Set(kept)];
@@ -124,15 +131,15 @@ export function checkList(mix: LayoutListMix, shape: LayoutListShape | null, lay
124
131
  const unique = [...new Set(next.parts)];
125
132
  const foreign = unique.filter(p => !roles.includes(p));
126
133
  if (foreign.length || unique.length !== next.parts.length) {
127
- if (foreign.length) repair(`"${shape.alias}" holds no ${foreign.join(', ')} — left out`);
134
+ if (foreign.length) repair(ListSayCode.NoSuchParts, { alias: shape.alias, parts: foreign });
128
135
  next.parts = unique.filter(p => roles.includes(p));
129
136
  }
130
137
  if (next.item === LayoutListItem.Photo) {
131
138
  if (!pictured) {
132
- repair(`"${shape.alias}" has no pictures — its items are cards`);
139
+ repair(ListSayCode.PhotoNoPictures, { alias: shape.alias });
133
140
  next.item = LayoutListItem.Card;
134
141
  } else if (next.parts.length !== 1 || next.parts[0] !== IMAGE) {
135
- repair('a photo item shows its picture only');
142
+ repair(ListSayCode.PhotoPictureOnly);
136
143
  next.parts = [IMAGE];
137
144
  }
138
145
  }
@@ -140,21 +147,21 @@ export function checkList(mix: LayoutListMix, shape: LayoutListShape | null, lay
140
147
  // AW11: round-two items — each needs what it shows (one table: listWordRefusal).
141
148
  const itemRefusal = listWordRefusal('item', next.item, shape);
142
149
  if (itemRefusal === ListWordRefusal.NoPictures) {
143
- repair(`"${shape.alias}" has no pictures — ${listMeaning('item', next.item)} needs one: its items are cards`);
150
+ repair(ListSayCode.ItemNeedsPictures, { alias: shape.alias, item: listWordRef('item', next.item) });
144
151
  next.item = LayoutListItem.Card;
145
152
  }
146
153
  if (next.item === LayoutListItem.TitleOnPhoto && (shape.titleWords ?? 0) > LIST_RULES.titleOnPhotoWords) {
147
- repair(`"${shape.alias}" has names of ${shape.titleWords} words — more than ${LIST_RULES.titleOnPhotoWords} would cover the picture: its items are cards`);
154
+ repair(ListSayCode.TitleTooLong, { alias: shape.alias, words: shape.titleWords ?? 0, max: LIST_RULES.titleOnPhotoWords });
148
155
  next.item = LayoutListItem.Card;
149
156
  }
150
157
  if (next.item === LayoutListItem.Packshot && shape.plainPictures === false) {
151
- repair(`"${shape.alias}"'s pictures do not stand on a plain ground — a packshot needs one: its items are cards`);
158
+ repair(ListSayCode.PackshotNotPlain, { alias: shape.alias });
152
159
  next.item = LayoutListItem.Card;
153
160
  }
154
161
  if (next.item === LayoutListItem.TitleOnPhoto) {
155
162
  const words = next.parts.filter(p => p === IMAGE || TITLE_ON_PHOTO_PARTS.has(p));
156
163
  if (words.length !== next.parts.length) {
157
- repair('a name on its picture shows the picture, the name and a short detail only');
164
+ repair(ListSayCode.TitleOnPhotoParts);
158
165
  next.parts = words;
159
166
  }
160
167
  if (!next.parts.includes(IMAGE)) next.parts = [IMAGE, ...next.parts];
@@ -162,50 +169,50 @@ export function checkList(mix: LayoutListMix, shape: LayoutListShape | null, lay
162
169
 
163
170
  // The arrangement first: what follows is judged against the one the list ends with.
164
171
  if (next.arrange === LayoutListArrange.Strips && !pictured) {
165
- repair('strips need a picture in every item — a still grid instead');
172
+ repair(ListSayCode.StripsNeedPictures);
166
173
  next.arrange = LayoutListArrange.Grid;
167
174
  }
168
175
  if (next.arrange === LayoutListArrange.Strips && shape.items !== null && shape.items > R.strips[1]) {
169
- repair(`${R.strips[1]} strips fit at most — "${shape.alias}" has ${shape.items}: ${say(LayoutListArrange.Row)}`);
176
+ repair(ListSayCode.StripsAtMost, { max: R.strips[1], alias: shape.alias, items: shape.items, instead: arr(LayoutListArrange.Row) });
170
177
  next.arrange = LayoutListArrange.Row;
171
178
  }
172
179
  // L-D12: the business's art direction — an arrangement its lists never take becomes a row.
173
- const why = never?.say.join(' ') || 'this business never shows a list that way';
180
+ const why = { why: never?.say.join(' ') ?? '', whyHe: never?.sayHe?.join(' ') ?? '' };
174
181
  if (never && has(never.arranges, next.arrange)) {
175
- repair(`${why} — ${say(LayoutListArrange.Row)}`);
182
+ repair(ListSayCode.NeverArrange, { ...why, instead: arr(LayoutListArrange.Row) });
176
183
  next.arrange = LayoutListArrange.Row;
177
184
  }
178
185
  // AW11: round-two arrangements — pictures where they need them, the counts they are drawn at.
179
186
  const arrangeRefusal = listWordRefusal('arrange', next.arrange, shape);
180
187
  if (arrangeRefusal === ListWordRefusal.NoPictures) {
181
- return [{ code: LayoutIssueCode.Content, path: `${at}.arrange`, message: `${say(next.arrange)} needs a picture in every item — "${shape.alias}" has none; arrange it another way` }];
188
+ return [wordedIssue(LayoutIssueCode.Content, `${at}.arrange`, { code: ListSayCode.ArrangeNeedsPictures, params: { arrange: arr(next.arrange), alias: shape.alias } })];
182
189
  }
183
190
  const count = LIST_RULES.counts[next.arrange];
184
191
  if (count && shape.items !== null) {
185
192
  const [fewest, most] = count;
186
193
  if (shape.items < fewest) {
187
194
  const instead = next.arrange === LayoutListArrange.Hang ? LayoutListArrange.Masonry : LayoutListArrange.Grid;
188
- repair(`${say(next.arrange)} needs ${fewest} items — "${shape.alias}" has ${shape.items}: ${say(instead)}`);
195
+ repair(ListSayCode.TooFewFor, { arrange: arr(next.arrange), fewest, alias: shape.alias, items: shape.items, instead: arr(instead) });
189
196
  next.arrange = instead;
190
197
  } else if (shape.items > most) {
191
- repair(`${say(next.arrange)} shows the first ${most} of "${shape.alias}"'s ${shape.items}, then the link to all of them`);
198
+ repair(ListSayCode.ShowsFirst, { arrange: arr(next.arrange), most, alias: shape.alias, items: shape.items });
192
199
  }
193
200
  }
194
201
  if (next.arrange === LayoutListArrange.Bento && shape.items !== null) {
195
202
  const fill = bentoFill(shape.items);
196
203
  if (fill === null) {
197
- repair(`a bento needs ${LIST_RULES.bento[0]} items — ${say(LayoutListArrange.Grid)}`);
204
+ repair(ListSayCode.BentoTooFew, { fewest: LIST_RULES.bento[0], instead: arr(LayoutListArrange.Grid) });
198
205
  next.arrange = LayoutListArrange.Grid;
199
206
  } else if (fill < shape.items) {
200
- repair(`a bento fits ${LIST_RULES.bento.join(', ')} — "${shape.alias}" has ${shape.items}, so it shows ${fill} and the link to all of them`);
207
+ repair(ListSayCode.BentoTrim, { ...bentoFillsParams(LIST_RULES.bento), alias: shape.alias, items: shape.items, shows: fill });
201
208
  }
202
209
  }
203
210
  const tiltedText = next.arrange === LayoutListArrange.Tilted && next.item !== LayoutListItem.Photo ? shape.long.filter(role => next.parts.includes(role)) : [];
204
- if (tiltedText.length) repair(`its ${tiltedText.join(' and ')} run long — a turned card shows their first lines`);
211
+ if (tiltedText.length) repair(ListSayCode.TiltedLong, { roles: tiltedText });
205
212
 
206
213
  const longShown = shape.long.filter(role => next.parts.includes(role));
207
214
  if (longShown.length && next.arrange === LayoutListArrange.Grid) {
208
- repair(`its ${longShown.join(' and ')} run long — a grid would cut them: ${say(LayoutListArrange.Masonry)}`);
215
+ repair(ListSayCode.GridLong, { roles: longShown, instead: arr(LayoutListArrange.Masonry) });
209
216
  next.arrange = LayoutListArrange.Masonry;
210
217
  }
211
218
  const arrange = next.arrange;
@@ -216,120 +223,126 @@ export function checkList(mix: LayoutListMix, shape: LayoutListShape | null, lay
216
223
  if (strips) {
217
224
  const who = next.standout?.who;
218
225
  if (who !== LayoutListWho.First && who !== LayoutListWho.Pointed) {
219
- repair('one strip is always open — the first');
226
+ repair(ListSayCode.StripOpenFirst);
220
227
  next.standout = { who: LayoutListWho.First, how: LayoutListHow.Wider };
221
228
  } else if (next.standout!.how !== LayoutListHow.Wider) {
222
- repair('the open strip is the wider one');
229
+ repair(ListSayCode.StripWider);
223
230
  next.standout = { who, how: LayoutListHow.Wider };
224
231
  }
225
232
  } else if (next.standout) {
226
233
  if (next.standout.who === LayoutListWho.None) {
227
- if (next.standout.how) repair('nothing stands out — no way to stand out');
234
+ if (next.standout.how) repair(ListSayCode.NoneStandsOut);
228
235
  delete next.standout;
229
236
  } else {
230
237
  if (has(R.onlyRow.who, next.standout.who) && !row && !has(LIST_RULES.middle ?? [], arrange)) {
231
- repair(`"${next.standout.who}" is a row's — the first stands out`);
238
+ repair(ListSayCode.RowsOnlyWho, { who: listWordRef('who', next.standout.who) });
232
239
  next.standout.who = LayoutListWho.First;
233
240
  }
234
241
  if (next.standout.how && has(R.onlyStrips.how, next.standout.how)) {
235
- repair(`"${next.standout.how}" is a strip's — bigger instead`);
242
+ repair(ListSayCode.StripsOnlyHow, { how: listWordRef('how', next.standout.how) });
236
243
  next.standout.how = LayoutListHow.Bigger;
237
244
  }
238
245
  }
239
246
  }
240
247
 
241
248
  if (arrange === LayoutListArrange.Rows && next.standout && (next.standout.who !== LIST_RULES.rowsStandout.who || next.standout.how !== LIST_RULES.rowsStandout.how)) {
242
- repair('numbered rows stand out one way: the one pointed at, the rest dimmed');
249
+ repair(ListSayCode.RowsStandout);
243
250
  next.standout = { who: LIST_RULES.rowsStandout.who as `${LayoutListWho}`, how: LIST_RULES.rowsStandout.how as `${LayoutListHow}` };
244
251
  }
245
252
 
246
253
  // How the visitor moves through them — never a way the business's lists never move (L-D12).
247
254
  const banned = never ? next.move.filter(m => has(never.moves, m)) : [];
248
255
  if (banned.length) {
249
- repair(`${why} — no ${banned.join(', ')}`);
256
+ repair(ListSayCode.NeverMove, { ...why, moves: listWordRefs('move', banned) });
250
257
  next.move = next.move.filter(m => !banned.includes(m));
251
258
  }
252
259
  // AW11: a fan moves only by being dragged, and only with enough cards to drag.
253
260
  if (arrange === LayoutListArrange.Fan && next.move.length) {
254
261
  const dragged = next.move.includes(LayoutListMove.Drag) && (shape.items === null || shape.items >= LIST_RULES.fanDragFrom);
255
262
  const dropped = next.move.filter(m => m !== LayoutListMove.Drag || !dragged);
256
- if (dropped.length) repair(dragged || !next.move.includes(LayoutListMove.Drag) ? `a fan is only dragged — no ${dropped.join(', ')}` : `a fan of fewer than ${LIST_RULES.fanDragFrom} cards stays still`);
263
+ if (dropped.length) {
264
+ if (dragged || !next.move.includes(LayoutListMove.Drag)) repair(ListSayCode.FanDragOnly, { moves: listWordRefs('move', dropped) });
265
+ else repair(ListSayCode.FanTooFew, { fewest: LIST_RULES.fanDragFrom });
266
+ }
257
267
  next.move = dragged ? [LayoutListMove.Drag] : [];
258
268
  }
259
269
  if (next.move.includes(LayoutListMove.Rows) && !pictured) {
260
- repair(`"${shape.alias}" has no pictures — no drifting rows`);
270
+ repair(ListSayCode.DriftNeedsPictures, { alias: shape.alias });
261
271
  next.move = next.move.filter(m => m !== LayoutListMove.Rows);
262
272
  }
263
273
  const moving = has(R.moving, arrange) || (arrange === LayoutListArrange.Fan && next.move.length > 0);
264
274
  if (!moving && next.move.length) {
265
- repair(`${say(arrange)} does not move — no ${next.move.join(', ')}`);
275
+ repair(ListSayCode.StillNoMove, { arrange: arr(arrange), moves: listWordRefs('move', next.move) });
266
276
  next.move = [];
267
277
  }
268
278
  if (moving) {
269
279
  const onlyRow = next.move.filter(m => has(R.onlyRow.move, m));
270
280
  if (onlyRow.length && !row) {
271
- repair(`"${onlyRow.join(', ')}" carries a row only`);
281
+ repair(ListSayCode.RowOnlyMove, { moves: listWordRefs('move', onlyRow) });
272
282
  next.move = next.move.filter(m => !has(R.onlyRow.move, m));
273
283
  }
274
284
  if (next.move.includes(LayoutListMove.Page) && next.move.length > 1) {
275
- repair('the page\'s scroll carries the row alone');
285
+ repair(ListSayCode.PageAlone);
276
286
  next.move = [LayoutListMove.Page];
277
287
  }
278
288
  if (next.move.includes(LayoutListMove.Rows) && next.move.length > 1) {
279
- repair('drifting rows move by themselves alone');
289
+ repair(ListSayCode.DriftAlone);
280
290
  next.move = [LayoutListMove.Rows];
281
291
  }
282
292
  if (next.move.includes(LayoutListMove.Rows) && next.item !== LayoutListItem.Photo) {
283
- repair('drifting rows hold pictures only');
293
+ repair(ListSayCode.DriftPicturesOnly);
284
294
  next.item = LayoutListItem.Photo;
285
295
  next.parts = [IMAGE];
286
296
  }
287
297
  if (!next.move.length) {
288
- repair(`${say(arrange)} — the visitor drags it`);
298
+ repair(ListSayCode.DragDefault, { arrange: arr(arrange) });
289
299
  next.move = [LayoutListMove.Drag];
290
300
  }
291
301
  }
292
302
  const stripHovers = next.hover.filter(h => has(R.onlyStrips.hover, h));
293
303
  if (stripHovers.length && !strips) {
294
- repair(`"${stripHovers.join(', ')}" is a strip's`);
304
+ repair(ListSayCode.StripsOnlyHover, { hovers: listWordRefs('hover', stripHovers) });
295
305
  next.hover = next.hover.filter(h => !has(R.onlyStrips.hover, h));
296
306
  }
297
307
  // AW11: hover words that need what the list may not have (one table), and the hover tilt — a still card's.
298
308
  const unread = next.hover.filter(h => listWordRefusal('hover', h, shape) !== null && listWordRefusal('hover', h, shape) !== ListWordRefusal.ProOnly);
299
309
  if (unread.length) {
300
- repair(unread.map(h => listWordRefusal('hover', h, shape) === ListWordRefusal.NoSecondPicture
301
- ? `"${h}" needs a second picture — "${shape.alias}" has one per item`
302
- : `"${h}" needs a picture — "${shape.alias}" has none`).join('; '));
310
+ // One sentence each (#123: they were one joined line — a screen says each in the owner's words).
311
+ for (const h of unread) {
312
+ repair(listWordRefusal('hover', h, shape) === ListWordRefusal.NoSecondPicture ? ListSayCode.HoverSecondPicture : ListSayCode.HoverPicture,
313
+ { hover: listWordRef('hover', h), alias: shape.alias });
314
+ }
303
315
  next.hover = next.hover.filter(h => !unread.includes(h));
304
316
  }
305
317
  if (next.hover.includes(LayoutListHover.Tilt) && (moving || next.item !== LayoutListItem.Card && next.item !== LayoutListItem.Packshot && next.item !== LayoutListItem.ColourBlock && next.item !== LayoutListItem.Numbered)) {
306
- repair(moving ? `${say(arrange)} moves — its card rises instead of turning` : 'only a card turns its ground — it rises instead');
318
+ if (moving) repair(ListSayCode.TiltMoving, { arrange: arr(arrange) });
319
+ else repair(ListSayCode.TiltCardOnly);
307
320
  next.hover = [...new Set(next.hover.map(h => (h === LayoutListHover.Tilt ? LayoutListHover.Rise : h)))];
308
321
  }
309
322
  if (new Set(next.hover).size !== next.hover.length) next.hover = [...new Set(next.hover)];
310
323
 
311
324
  // AW11-D15: what is seen at once is there at once — no clip-up in the first screen.
312
325
  if (options.firstScreen && has(LIST_RULES.notFirstScreen.arrive ?? [], next.arrive)) {
313
- repair(`the first screen shows its items at once — "${next.arrive}" plays further down the page`);
326
+ repair(ListSayCode.FirstScreen, { arrive: listWordRef('arrive', next.arrive) });
314
327
  next.arrive = LayoutListArrive.Together;
315
328
  }
316
329
 
317
330
  // A phone.
318
331
  if (has(R.neverSwipe, arrange) && next.phone === LayoutListPhone.Swipe) {
319
- repair(`${say(arrange)} does not swipe on a phone — it stacks`);
332
+ repair(ListSayCode.NoSwipe, { arrange: arr(arrange) });
320
333
  next.phone = LayoutListPhone.Stack;
321
334
  }
322
335
  // AW11-D6: a stage is a row of cards you swipe on a phone; a fan swipes or stacks.
323
336
  if (arrange === LayoutListArrange.Stage && next.phone !== LayoutListPhone.Swipe) {
324
- repair('a stage is a row of cards you swipe on a phone');
337
+ repair(ListSayCode.StageSwipes);
325
338
  next.phone = LayoutListPhone.Swipe;
326
339
  }
327
340
  if (arrange === LayoutListArrange.Fan && next.phone === LayoutListPhone.TwoUp) {
328
- repair('a fan is a row you swipe on a phone');
341
+ repair(ListSayCode.FanSwipes);
329
342
  next.phone = LayoutListPhone.Swipe;
330
343
  }
331
344
 
332
- return said.map(message => ({ code: LayoutIssueCode.Structure, path: at, message, mend: { kind: LayoutMendKind.List, layer, mix: next } }));
345
+ return said.map(words => ({ ...wordedIssue(LayoutIssueCode.Structure, at, words), mend: { kind: LayoutMendKind.List, layer, mix: next } }));
333
346
  }
334
347
 
335
348
  /** Two list sections of one page never share an arrangement (list-ingredients §7), and never two lean (AW11-D7): the