@vectoriox/iox-ui 5.142.0 → 5.143.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 (45) hide show
  1. package/composite-core/index.d.ts +40 -1
  2. package/design-core/index.d.ts +92 -27
  3. package/fesm2022/vectoriox-iox-ui-composite-core.mjs +155 -90
  4. package/fesm2022/vectoriox-iox-ui-composite-core.mjs.map +1 -1
  5. package/fesm2022/vectoriox-iox-ui-design-core.mjs +112 -27
  6. package/fesm2022/vectoriox-iox-ui-design-core.mjs.map +1 -1
  7. package/fesm2022/vectoriox-iox-ui-forms-core.mjs +61 -4
  8. package/fesm2022/vectoriox-iox-ui-forms-core.mjs.map +1 -1
  9. package/fesm2022/vectoriox-iox-ui-generation-core.mjs +346 -155
  10. package/fesm2022/vectoriox-iox-ui-generation-core.mjs.map +1 -1
  11. package/fesm2022/vectoriox-iox-ui-harness-core.mjs +461 -2
  12. package/fesm2022/vectoriox-iox-ui-harness-core.mjs.map +1 -1
  13. package/fesm2022/vectoriox-iox-ui.mjs +102 -19
  14. package/fesm2022/vectoriox-iox-ui.mjs.map +1 -1
  15. package/forms-core/index.d.ts +17 -3
  16. package/generation-core/index.d.ts +175 -5
  17. package/harness-core/index.d.ts +341 -2
  18. package/index.d.ts +24 -9
  19. package/package.json +1 -1
  20. package/src/composite-core/accordion.ts +16 -1
  21. package/src/composite-core/card.ts +22 -2
  22. package/src/composite-core/consent.ts +2 -2
  23. package/src/composite-core/recipe-parts.ts +7 -0
  24. package/src/composite-core/segmented.ts +17 -2
  25. package/src/composite-core/slider.ts +19 -3
  26. package/src/composite-core/tabs.ts +16 -1
  27. package/src/design-core/contrast-audit.ts +18 -0
  28. package/src/design-core/flavor-spec.generated.ts +71 -25
  29. package/src/design-core/locale-direction.ts +24 -0
  30. package/src/design-core/menu-look.ts +2 -1
  31. package/src/design-core/public-api.ts +1 -0
  32. package/src/forms-core/form-presets.ts +72 -3
  33. package/src/generation-core/compose-layout.ts +1 -1
  34. package/src/generation-core/compose-site.ts +50 -19
  35. package/src/generation-core/footer-mix.ts +8 -0
  36. package/src/generation-core/nav-shape.ts +3 -2
  37. package/src/generation-core/patterns.ts +4 -0
  38. package/src/generation-core/site-plan.model.ts +10 -2
  39. package/src/generation-core/site-spec.generated.ts +281 -131
  40. package/src/harness-core/business-types.ts +11 -0
  41. package/src/harness-core/film-idea.ts +178 -0
  42. package/src/harness-core/harness-spec.generated.ts +331 -0
  43. package/src/harness-core/intake.ts +8 -1
  44. package/src/harness-core/public-api.ts +1 -0
  45. package/styles/iox-design.css +44 -45
@@ -1127,7 +1127,12 @@ export const SPEC_TIERS = {
1127
1127
  {
1128
1128
  "name": "link-decoration",
1129
1129
  "type": "keyword",
1130
- "default": "underline"
1130
+ "default": "none"
1131
+ },
1132
+ {
1133
+ "name": "link-weight",
1134
+ "type": "number",
1135
+ "default": "var(--iox-weight-strong)"
1131
1136
  },
1132
1137
  {
1133
1138
  "name": "link-current-color",
@@ -1137,12 +1142,12 @@ export const SPEC_TIERS = {
1137
1142
  {
1138
1143
  "name": "link-current-decoration",
1139
1144
  "type": "keyword",
1140
- "default": "underline 2px var(--iox-accent-text)"
1145
+ "default": "none"
1141
1146
  },
1142
1147
  {
1143
1148
  "name": "link-underline-rest",
1144
1149
  "type": "number",
1145
- "default": "1"
1150
+ "default": "0"
1146
1151
  },
1147
1152
  {
1148
1153
  "name": "link-underline-thickness",
@@ -4310,6 +4315,7 @@ export const SPEC_ELEMENT_STYLES = [
4310
4315
  ],
4311
4316
  "base": {
4312
4317
  "fontFamily": "var(--iox-font-body)",
4318
+ "fontWeight": "var(--iox-link-weight)",
4313
4319
  "color": "var(--iox-link-color)",
4314
4320
  "textDecoration": "var(--iox-link-decoration)",
4315
4321
  "transitionDuration": "var(--iox-dur-fast)",
@@ -7650,7 +7656,14 @@ export const SPEC_FLAVOR_PACKS = [
7650
7656
  "tier": "component",
7651
7657
  "type": "keyword",
7652
7658
  "group": "components",
7653
- "value": "underline"
7659
+ "value": "none"
7660
+ },
7661
+ {
7662
+ "name": "link-weight",
7663
+ "tier": "component",
7664
+ "type": "number",
7665
+ "group": "components",
7666
+ "value": "var(--iox-weight-strong)"
7654
7667
  },
7655
7668
  {
7656
7669
  "name": "link-current-color",
@@ -7664,14 +7677,14 @@ export const SPEC_FLAVOR_PACKS = [
7664
7677
  "tier": "component",
7665
7678
  "type": "keyword",
7666
7679
  "group": "components",
7667
- "value": "underline 2px var(--iox-accent-text)"
7680
+ "value": "none"
7668
7681
  },
7669
7682
  {
7670
7683
  "name": "link-underline-rest",
7671
7684
  "tier": "component",
7672
7685
  "type": "number",
7673
7686
  "group": "components",
7674
- "value": "1"
7687
+ "value": "0"
7675
7688
  },
7676
7689
  {
7677
7690
  "name": "link-underline-thickness",
@@ -9454,16 +9467,14 @@ export const SPEC_FLAVOR_PACKS = [
9454
9467
  "tier": "component",
9455
9468
  "type": "color",
9456
9469
  "group": "components",
9457
- "value": "transparent",
9458
- "overridden": true
9470
+ "value": "var(--iox-surface-2)"
9459
9471
  },
9460
9472
  {
9461
9473
  "name": "button-ghost-decoration",
9462
9474
  "tier": "component",
9463
9475
  "type": "keyword",
9464
9476
  "group": "components",
9465
- "value": "underline",
9466
- "overridden": true
9477
+ "value": "none"
9467
9478
  },
9468
9479
  {
9469
9480
  "name": "card-bg",
@@ -10039,7 +10050,14 @@ export const SPEC_FLAVOR_PACKS = [
10039
10050
  "tier": "component",
10040
10051
  "type": "keyword",
10041
10052
  "group": "components",
10042
- "value": "underline"
10053
+ "value": "none"
10054
+ },
10055
+ {
10056
+ "name": "link-weight",
10057
+ "tier": "component",
10058
+ "type": "number",
10059
+ "group": "components",
10060
+ "value": "var(--iox-weight-strong)"
10043
10061
  },
10044
10062
  {
10045
10063
  "name": "link-current-color",
@@ -10053,14 +10071,14 @@ export const SPEC_FLAVOR_PACKS = [
10053
10071
  "tier": "component",
10054
10072
  "type": "keyword",
10055
10073
  "group": "components",
10056
- "value": "underline 2px var(--iox-accent-text)"
10074
+ "value": "none"
10057
10075
  },
10058
10076
  {
10059
10077
  "name": "link-underline-rest",
10060
10078
  "tier": "component",
10061
10079
  "type": "number",
10062
10080
  "group": "components",
10063
- "value": "1"
10081
+ "value": "0"
10064
10082
  },
10065
10083
  {
10066
10084
  "name": "link-underline-thickness",
@@ -12426,7 +12444,14 @@ export const SPEC_FLAVOR_PACKS = [
12426
12444
  "tier": "component",
12427
12445
  "type": "keyword",
12428
12446
  "group": "components",
12429
- "value": "underline"
12447
+ "value": "none"
12448
+ },
12449
+ {
12450
+ "name": "link-weight",
12451
+ "tier": "component",
12452
+ "type": "number",
12453
+ "group": "components",
12454
+ "value": "var(--iox-weight-strong)"
12430
12455
  },
12431
12456
  {
12432
12457
  "name": "link-current-color",
@@ -12440,14 +12465,14 @@ export const SPEC_FLAVOR_PACKS = [
12440
12465
  "tier": "component",
12441
12466
  "type": "keyword",
12442
12467
  "group": "components",
12443
- "value": "underline 2px var(--iox-accent-text)"
12468
+ "value": "none"
12444
12469
  },
12445
12470
  {
12446
12471
  "name": "link-underline-rest",
12447
12472
  "tier": "component",
12448
12473
  "type": "number",
12449
12474
  "group": "components",
12450
- "value": "1"
12475
+ "value": "0"
12451
12476
  },
12452
12477
  {
12453
12478
  "name": "link-underline-thickness",
@@ -14840,7 +14865,14 @@ export const SPEC_FLAVOR_PACKS = [
14840
14865
  "tier": "component",
14841
14866
  "type": "keyword",
14842
14867
  "group": "components",
14843
- "value": "underline"
14868
+ "value": "none"
14869
+ },
14870
+ {
14871
+ "name": "link-weight",
14872
+ "tier": "component",
14873
+ "type": "number",
14874
+ "group": "components",
14875
+ "value": "var(--iox-weight-strong)"
14844
14876
  },
14845
14877
  {
14846
14878
  "name": "link-current-color",
@@ -14854,14 +14886,14 @@ export const SPEC_FLAVOR_PACKS = [
14854
14886
  "tier": "component",
14855
14887
  "type": "keyword",
14856
14888
  "group": "components",
14857
- "value": "underline 2px var(--iox-accent-text)"
14889
+ "value": "none"
14858
14890
  },
14859
14891
  {
14860
14892
  "name": "link-underline-rest",
14861
14893
  "tier": "component",
14862
14894
  "type": "number",
14863
14895
  "group": "components",
14864
- "value": "1"
14896
+ "value": "0"
14865
14897
  },
14866
14898
  {
14867
14899
  "name": "link-underline-thickness",
@@ -17235,7 +17267,14 @@ export const SPEC_FLAVOR_PACKS = [
17235
17267
  "tier": "component",
17236
17268
  "type": "keyword",
17237
17269
  "group": "components",
17238
- "value": "underline"
17270
+ "value": "none"
17271
+ },
17272
+ {
17273
+ "name": "link-weight",
17274
+ "tier": "component",
17275
+ "type": "number",
17276
+ "group": "components",
17277
+ "value": "var(--iox-weight-strong)"
17239
17278
  },
17240
17279
  {
17241
17280
  "name": "link-current-color",
@@ -17249,14 +17288,14 @@ export const SPEC_FLAVOR_PACKS = [
17249
17288
  "tier": "component",
17250
17289
  "type": "keyword",
17251
17290
  "group": "components",
17252
- "value": "underline 2px var(--iox-accent-text)"
17291
+ "value": "none"
17253
17292
  },
17254
17293
  {
17255
17294
  "name": "link-underline-rest",
17256
17295
  "tier": "component",
17257
17296
  "type": "number",
17258
17297
  "group": "components",
17259
- "value": "1"
17298
+ "value": "0"
17260
17299
  },
17261
17300
  {
17262
17301
  "name": "link-underline-thickness",
@@ -19628,7 +19667,14 @@ export const SPEC_FLAVOR_PACKS = [
19628
19667
  "tier": "component",
19629
19668
  "type": "keyword",
19630
19669
  "group": "components",
19631
- "value": "underline"
19670
+ "value": "none"
19671
+ },
19672
+ {
19673
+ "name": "link-weight",
19674
+ "tier": "component",
19675
+ "type": "number",
19676
+ "group": "components",
19677
+ "value": "var(--iox-weight-strong)"
19632
19678
  },
19633
19679
  {
19634
19680
  "name": "link-current-color",
@@ -19642,14 +19688,14 @@ export const SPEC_FLAVOR_PACKS = [
19642
19688
  "tier": "component",
19643
19689
  "type": "keyword",
19644
19690
  "group": "components",
19645
- "value": "underline 2px var(--iox-accent-text)"
19691
+ "value": "none"
19646
19692
  },
19647
19693
  {
19648
19694
  "name": "link-underline-rest",
19649
19695
  "tier": "component",
19650
19696
  "type": "number",
19651
19697
  "group": "components",
19652
- "value": "1"
19698
+ "value": "0"
19653
19699
  },
19654
19700
  {
19655
19701
  "name": "link-underline-thickness",
@@ -0,0 +1,24 @@
1
+ /**
2
+ * Which way a language reads — ONE answer for the live document (`<html dir>`, vectoriox/iox-client-engine#17), the
3
+ * builder and the composer (generation-core `isRtlLocale`). A locale is read by its language subtag (`he-IL` → `he`),
4
+ * case-insensitively; anything else reads left to right. Framework-free, pure.
5
+ */
6
+
7
+ /** The direction a page's document is written in. */
8
+ export enum LocaleDirection {
9
+ Ltr = 'ltr',
10
+ Rtl = 'rtl',
11
+ }
12
+
13
+ /** The languages written right to left (their BCP 47 language subtags). */
14
+ export const RTL_LANGUAGES: ReadonlySet<string> = new Set(['ar', 'ckb', 'dv', 'fa', 'he', 'iw', 'ps', 'sd', 'ug', 'ur', 'yi']);
15
+
16
+ /** The language subtag of a locale (`he-IL` → `he`, `pt_BR` → `pt`), lower-cased; '' when there is none. */
17
+ export function languageOf(locale: string | null | undefined): string {
18
+ return String(locale ?? '').trim().split(/[-_]/)[0].toLowerCase();
19
+ }
20
+
21
+ /** The direction `locale` reads in — `rtl` for a right-to-left language, else `ltr` (an unknown or absent locale too). */
22
+ export function localeDirection(locale: string | null | undefined): LocaleDirection {
23
+ return RTL_LANGUAGES.has(languageOf(locale)) ? LocaleDirection.Rtl : LocaleDirection.Ltr;
24
+ }
@@ -44,7 +44,8 @@ export enum MenuButtonKind {
44
44
  }
45
45
 
46
46
  export enum MenuHover {
47
- /** A line draws under the page name (today's: the drawn underline of a navigation's links). */
47
+ /** The page name changes colour (the link style's own hover). It drew a line until 2026-11-22 — no link draws one now
48
+ * (Doron); the stored word stays. */
48
49
  Line = 'line',
49
50
  /** The other page names dim. */
50
51
  Dim = 'dim',
@@ -44,3 +44,4 @@ export * from './graphemes';
44
44
  export * from './preloader';
45
45
  export * from './preloader-of';
46
46
  export * from './scrub';
47
+ export * from './locale-direction';
@@ -160,9 +160,78 @@ export const FORM_PRESETS: readonly FormPresetDef[] = /* @__PURE__ */ Object.fre
160
160
  },
161
161
  ]);
162
162
 
163
- /** The preset with this id, or undefined. */
164
- export function formPresetById(id: string | null | undefined): FormPresetDef | undefined {
165
- return FORM_PRESETS.find(p => p.id === id);
163
+ /** The preset with this id, or undefined — in English, or in `lang` when it is Hebrew (iox-ui#112: a form on a Hebrew
164
+ * site asks, answers and fails in Hebrew). */
165
+ export function formPresetById(id: string | null | undefined, lang?: string | null): FormPresetDef | undefined {
166
+ const def = FORM_PRESETS.find(p => p.id === id);
167
+ return def ? formPresetIn(def, lang) : undefined;
168
+ }
169
+
170
+ /** A preset's words on a Hebrew site: per field (by order) its label, help, placeholder and choices; the submit, the
171
+ * messages, the channel's label, the inbox name. A choice's words ARE its value (`optionsText`). */
172
+ interface FormPresetWords {
173
+ formName: string;
174
+ fields: ReadonlyArray<Partial<Pick<FormPresetField, 'label' | 'help' | 'placeholder' | 'optionsText'>>>;
175
+ submitLabel: string;
176
+ successText: string;
177
+ errorText: string;
178
+ channel?: string;
179
+ }
180
+
181
+ export const FORM_PRESET_WORDS_HE: Readonly<Record<`${FormPresetId}`, FormPresetWords>> = /* @__PURE__ */ Object.freeze({
182
+ contact: {
183
+ formName: 'טופס יצירת קשר',
184
+ fields: [{ label: 'שם מלא' }, { label: 'אימייל' }, { label: 'הודעה' }],
185
+ submitLabel: 'שליחת הודעה',
186
+ successText: 'תודה — נחזור אליכם בקרוב.',
187
+ errorText: 'לא הצלחנו לשלוח את ההודעה. נסו שוב — התשובות שלכם עדיין כאן.',
188
+ },
189
+ newsletter: {
190
+ formName: 'הרשמה לניוזלטר',
191
+ fields: [{ label: 'אימייל', placeholder: 'you@company.com' }, { label: 'שלחו לי עדכונים מדי פעם' }],
192
+ submitLabel: 'הרשמה',
193
+ successText: 'נרשמתם לרשימה.',
194
+ errorText: 'לא הצלחנו לרשום אתכם. נסו שוב.',
195
+ },
196
+ application: {
197
+ formName: 'מועמדות',
198
+ fields: [{ label: 'שם מלא' }, { label: 'אימייל' }, { label: 'טלפון' }, { label: 'תפקיד', optionsText: 'עיצוב\nפיתוח\nאחר' },
199
+ { label: 'קורות חיים', help: 'PDF או Word, עד 5MB' }, { label: 'עוד משהו' }],
200
+ submitLabel: 'הגשת מועמדות',
201
+ successText: 'המועמדות התקבלה — נקרא אותה בעיון ונחזור אליכם.',
202
+ errorText: 'לא הצלחנו להגיש את המועמדות. נסו שוב.',
203
+ },
204
+ booking: {
205
+ formName: 'בקשת הזמנה',
206
+ fields: [{ label: 'שם' }, { label: 'אימייל' }, { label: 'תאריך' }, { label: 'מספר אנשים' },
207
+ { label: 'הערות', help: 'אלרגיות, צורכי נגישות, כל דבר שיעזור' }],
208
+ submitLabel: 'בקשת הזמנה',
209
+ successText: 'הבקשה התקבלה — נאשר באימייל.',
210
+ errorText: 'לא הצלחנו לשלוח את הבקשה. נסו שוב.',
211
+ },
212
+ lead: {
213
+ formName: 'טופס פנייה',
214
+ fields: [{ label: 'שם' }, { label: 'טלפון / וואטסאפ' }, { label: 'מה העסק שלכם?' },
215
+ { label: 'מה אתם צריכים?', optionsText: 'אתר\nמיתוג\nצילום ווידאו\nעוד לא בטוחים' },
216
+ { label: 'תקציב משוער', optionsText: 'פרויקט קטן\nבינוני\nגדול\nעוד לא בטוחים' }],
217
+ submitLabel: 'שליחה',
218
+ successText: 'תודה — נחזור אליכם בקרוב.',
219
+ errorText: 'לא הצלחנו לשלוח את הפרטים. נסו שוב — התשובות שלכם עדיין כאן.',
220
+ channel: 'שלחו לנו הודעה בוואטסאפ',
221
+ },
222
+ });
223
+
224
+ /** A preset in a language: Hebrew when `lang` is, else the preset as it is. Fresh objects; the shape never changes. */
225
+ export function formPresetIn(def: FormPresetDef, lang?: string | null): FormPresetDef {
226
+ const he = (lang ?? '').toLowerCase().startsWith('he') ? FORM_PRESET_WORDS_HE[def.id] : undefined;
227
+ if (!he) return def;
228
+ return {
229
+ ...def,
230
+ formName: he.formName,
231
+ fields: def.fields.map((f, i) => ({ ...f, ...(he.fields[i] ?? {}) })),
232
+ submitLabel: he.submitLabel, successText: he.successText, errorText: he.errorText,
233
+ ...(def.channel ? { channel: { ...def.channel, label: he.channel ?? def.channel.label } } : {}),
234
+ };
166
235
  }
167
236
 
168
237
  /** The config key of an email step that goes to the studio owner's account address (iox-cms#84). */
@@ -1238,7 +1238,7 @@ function formLayer(id: string, l: LayoutLayer, lc: LayerCtx, ctx: Ctx, path: str
1238
1238
  setStyleProps(intro, { margin: ZERO });
1239
1239
  parts.push(intro);
1240
1240
  }
1241
- const form = composePresetForm(`${id}-form`, f.preset, ctx.p);
1241
+ const form = composePresetForm(`${id}-form`, f.preset, ctx.p, ctx.site.locale);
1242
1242
  const afterSend = LAYOUT_FORM_AFTER_SEND[f.preset];
1243
1243
  if (afterSend) form.props[FORM_AFTER_SEND_TRAIT] = afterSend;
1244
1244
  walkSerialized([form], node => {
@@ -5,11 +5,11 @@ import {
5
5
  import { SEO_DESCRIPTION_MAX, SEO_TITLE_MAX, SeoRawDoc } from '@vectoriox/iox-ui/seo-core';
6
6
  import { channelOpensNewTab, FORM_ACTIONS_ROLE, FORM_CHANNEL_ROLE, FormPresetChannel, FormPresetDef, FormPresetField, formPresetById, presetFormActions } from '@vectoriox/iox-ui/forms-core';
7
7
  import {
8
- ACCORDION_BIND_PROP, ACCORDION_CONTENT_LIMIT, ACCORDION_WORDS, accordionAnswerOf, accordionItems, accordionQuestionOf, AccordionRole,
8
+ ACCORDION_BIND_PROP, ACCORDION_CONTENT_LIMIT, accordionWords, accordionAnswerOf, accordionItems, accordionQuestionOf, AccordionRole,
9
9
  buildAccordionRecipe, buildCardRecipe, buildCarouselRecipe, buildLightboxRecipe, buildSlideshowRecipe, CardLayout, CardPart, CardRole, CARD_LAYOUTS, CARD_PARTS, CompositeNode,
10
10
  AccordionAutoBinds, CompositeNodeSpec, findByRole, LIGHTBOX_LABEL, SLIDE_TO_ROW, SLIDE_TYPE, buildTabsRecipe, tabLabelNodeOf,
11
11
  tabPanelImageOf, tabPanelTextOf, tabsListOf, tabsPanels, tabsPanelsOf, tabsTriggers, TABS_CONTENT_LIMIT, TABS_IMAGE_BIND_PROP, TABS_LABEL_BIND_PROP,
12
- TABS_TEXT_BIND_PROP, TABS_WORDS, TabsAutoBinds, BadgeTone, BADGE_TONES, buildSegmentedRecipe, CardWords, ITEM_OPEN_STATE, segmentedOptions,
12
+ TABS_TEXT_BIND_PROP, tabsWords, TabsAutoBinds, BadgeTone, BADGE_TONES, buildSegmentedRecipe, CardWords, ITEM_OPEN_STATE, segmentedOptions,
13
13
  setHeaderBehaviour, setHeaderInk, SHOP_RECIPES, ShopRecipe, ShopRole, bindShopPart, ShopBindTarget, ACCOUNT_RECIPES, AccountRecipe, AccountRole,
14
14
  buildConsentRecipe, ConsentActionType,
15
15
  } from '@vectoriox/iox-ui/composite-core';
@@ -38,7 +38,7 @@ import { assertStyleSlots, ComposeError, createSerializedNode, SerializedBinding
38
38
  import { refreshSectionStamps, stampSection } from './section-stamp';
39
39
  import { SitePlanSourceKind, ContentFieldControl, ContentFieldPlan,
40
40
  ContentRole, ContentTypePlan, DataSourcePlan, DEFAULT_SITE_LOCALE, FactKey, FACT_KEYS, GlobalSlot, isRtlLocale, PagePlan, PageSectionPlan, PlanDataSourceMode,
41
- PlanDataSourceType, RelativeOp, roleField, SiteLocale, SitePlan, SitePlanSource, SITE_FACT_LABELS, SiteBusiness, GenerationTier,
41
+ PlanDataSourceType, RelativeOp, roleField, SiteLocale, SitePlan, SitePlanSource, siteFactLabel, SiteBusiness, GenerationTier,
42
42
  } from './site-plan.model';
43
43
  import { assertValidSitePlan, nextSourceOf, routeParams } from './validate-site-plan';
44
44
  import { MenuSide, NavRole, NavShape, planNavShape } from './nav-shape';
@@ -414,6 +414,15 @@ function ownWords(pn: PatternNode, locale: string | undefined): string {
414
414
  return locale === SiteLocale.He && pn.textHe ? pn.textHe : pn.text!;
415
415
  }
416
416
 
417
+ /** A recipe's words and a part's name in the site's language (iox-ui#112) — the contract's Hebrew on a Hebrew site. */
418
+ function ownRecipeWords(pn: PatternNode, locale: string | undefined): Readonly<Record<string, string>> | undefined {
419
+ return locale === SiteLocale.He && pn.wordsHe ? pn.wordsHe : pn.words as Readonly<Record<string, string>> | undefined;
420
+ }
421
+ function ownName(pn: PatternNode, locale: string | undefined): string | undefined {
422
+ return locale === SiteLocale.He && pn.nameHe ? pn.nameHe : pn.name;
423
+ }
424
+
425
+
417
426
  /** Where a node's words come from: the plan's slot → the business → the customer's fact → the pattern's
418
427
  * own text. A missing fact shows its label and is a placeholder; nothing is ever made up. */
419
428
  function chooseText(pn: PatternNode, ctx: Ctx): TextChoice {
@@ -426,7 +435,7 @@ function chooseText(pn: PatternNode, ctx: Ctx): TextChoice {
426
435
  }
427
436
  if (fact) {
428
437
  const given = ctx.plan.business.facts?.[fact];
429
- return nonEmpty(given) ? { value: given } : { value: SITE_FACT_LABELS[fact], placeholder: { kind: PlaceholderKind.Fact, fact } };
438
+ return nonEmpty(given) ? { value: given } : { value: siteFactLabel(fact, ctx.plan.locale), placeholder: { kind: PlaceholderKind.Fact, fact } };
430
439
  }
431
440
  const own = pn.text === undefined ? undefined : fillVariables(ownWords(pn, ctx.plan.locale), ctx);
432
441
  if (pn.ph === PatternPlaceholder.Copy) return { value: own, placeholder: { kind: PlaceholderKind.Copy } };
@@ -739,12 +748,13 @@ function composeForm(node: SerializedNode, pn: PatternNode, id: string, ctx: Ctx
739
748
  // A section may give the pattern's form another preset (`form`: Practice's contact page asks to book).
740
749
  const presetId = ctx.section?.form ?? pn.preset;
741
750
  if (pn.c?.length) throw new ComposeError(`${id}: a preset Form takes its fields from the preset, not the pattern`);
742
- stampPresetForm(node, presetId, id, ctx.owner);
751
+ stampPresetForm(node, presetId, id, ctx.owner, ctx.plan.locale);
743
752
  }
744
753
 
745
754
  /** A preset's name, stable form id, after-send steps (iox-cms#84: a contact form emails the owner) and children on a Form node — the ONE stamping `composeSite` and `composeLayout` share. */
746
- function stampPresetForm(node: SerializedNode, presetId: string, id: string, owner: string): void {
747
- const preset = formPresetById(presetId);
755
+ function stampPresetForm(node: SerializedNode, presetId: string, id: string, owner: string, locale?: string): void {
756
+ // iox-ui#112: the form asks, answers and fails in the site's language.
757
+ const preset = formPresetById(presetId, locale);
748
758
  if (!preset) throw new ComposeError(`${id}: no form preset "${presetId}" in forms-core`);
749
759
  setProp(node, 'name', preset.formName);
750
760
  setProp(node, 'formId', `${preset.id}-${stableHash(`${owner}/${id}`)}`);
@@ -754,9 +764,9 @@ function stampPresetForm(node: SerializedNode, presetId: string, id: string, own
754
764
  }
755
765
 
756
766
  /** A NEW Form stamped from a forms-core preset, exactly as a pattern's preset form is (premium M8: a layout's form layer). */
757
- export function composePresetForm(id: string, presetId: string, owner: string): SerializedNode {
767
+ export function composePresetForm(id: string, presetId: string, owner: string, locale?: string): SerializedNode {
758
768
  const node = create(id, FORM);
759
- stampPresetForm(node, presetId, id, owner);
769
+ stampPresetForm(node, presetId, id, owner, locale);
760
770
  return node;
761
771
  }
762
772
 
@@ -862,7 +872,7 @@ function composeNode(given: PatternNode, id: string, repeater: RepeaterScope | n
862
872
  setProp(node, 'src', '');
863
873
  ctx.placeholders.push({ nodeId: id, owner: ctx.owner, kind: PlaceholderKind.Video, text: '' });
864
874
  }
865
- if (pn.name) setProp(node, 'ariaLabel', pn.name);
875
+ if (pn.name) setProp(node, 'ariaLabel', ownName(pn, ctx.plan.locale)!);
866
876
  if (pn.icon) {
867
877
  if (type !== ICON) throw new ComposeError(`${id}: "icon" belongs on an Icon`);
868
878
  setProp(node, 'iconClass', pn.icon);
@@ -1005,7 +1015,7 @@ function composeRecipe(pn: PatternNode, id: string, repeater: RepeaterScope | nu
1005
1015
  if (pn.recipe === PatternRecipe.Carousel) return composeCarousel(pn, id, ctx);
1006
1016
  if (pn.recipe === PatternRecipe.Slideshow) return composeSlideshow(pn, id, ctx);
1007
1017
  if (pn.recipe === PatternRecipe.Lightbox) return composeLightbox(pn, id, repeater, ctx);
1008
- if (pn.recipe === PatternRecipe.Segmented) return composeSegmented(pn, id);
1018
+ if (pn.recipe === PatternRecipe.Segmented) return composeSegmented(pn, id, ctx);
1009
1019
  if (pn.recipe !== PatternRecipe.Card) throw new ComposeError(`${id}: no recipe "${pn.recipe}" in composite-core`);
1010
1020
  const layout = (pn.layout ?? CardLayout.Top) as CardLayout;
1011
1021
  if (!CARD_LAYOUTS.includes(layout)) throw new ComposeError(`${id}: a card has no layout "${pn.layout}"`);
@@ -1029,7 +1039,7 @@ function composeRecipe(pn: PatternNode, id: string, repeater: RepeaterScope | nu
1029
1039
  else throw new ComposeError(`${id}: a card's ${key} cannot be left out`);
1030
1040
  }
1031
1041
  const card = buildCardRecipe(factory, {
1032
- layout, parts, words: pn.words as Partial<CardWords> | undefined, badgeTone: tone,
1042
+ layout, parts, words: ownRecipeWords(pn, ctx.plan.locale) as Partial<CardWords> | undefined, badgeTone: tone, lang: ctx.plan.locale,
1033
1043
  ...(pn.icon ? { badgeIcon: pn.icon } : {}),
1034
1044
  }) as SerializedNode;
1035
1045
  markEntrance(pn, id, repeater, ctx);
@@ -1098,8 +1108,8 @@ function copyPlaceholders(card: SerializedNode, ctx: Ctx): void {
1098
1108
  }
1099
1109
 
1100
1110
  /** CC4b: the Segmented control — composite-core's recipe (Monthly · Yearly), named by the pattern, laid out by it. */
1101
- function composeSegmented(pn: PatternNode, id: string): SerializedNode {
1102
- const root = buildSegmentedRecipe(recipeFactory(id, 'segmented'), pn.name !== undefined ? { label: pn.name } : {}) as SerializedNode;
1111
+ function composeSegmented(pn: PatternNode, id: string, ctx: Ctx): SerializedNode {
1112
+ const root = buildSegmentedRecipe(recipeFactory(id, 'segmented'), { lang: ctx.plan.locale, ...(pn.name !== undefined ? { label: ownName(pn, ctx.plan.locale) } : {}) }) as SerializedNode;
1103
1113
  applyLayout(root, pn);
1104
1114
  return root;
1105
1115
  }
@@ -1128,7 +1138,7 @@ function composeAccordion(pn: PatternNode, id: string, ctx: Ctx): SerializedNode
1128
1138
  const type = isRoot && binding ? REPEATER : spec.type;
1129
1139
  return create(isRoot ? id : `${id}-${spec.key}`, type, { ...(spec.props ?? {}) }, spec.elementStyle ?? null) as CompositeNode;
1130
1140
  };
1131
- const root = buildAccordionRecipe(factory, binding ? { items: ACCORDION_WORDS.slice(0, 1) } : {}) as SerializedNode;
1141
+ const root = buildAccordionRecipe(factory, binding ? { items: accordionWords(ctx.plan.locale).slice(0, 1) } : { lang: ctx.plan.locale }) as SerializedNode;
1132
1142
  if (!binding) {
1133
1143
  if (pn.ph === PatternPlaceholder.Copy) {
1134
1144
  for (const item of accordionItems(root as CompositeNode)) {
@@ -1169,7 +1179,7 @@ function composeTabs(pn: PatternNode, id: string, ctx: Ctx): SerializedNode {
1169
1179
  const type = binding && TABS_HOLDER_KEYS.has(spec.key) ? REPEATER : spec.type;
1170
1180
  return create(spec.key === TABS_ROOT_KEY ? id : `${id}-${spec.key}`, type, { ...(spec.props ?? {}) }, spec.elementStyle ?? null) as CompositeNode;
1171
1181
  };
1172
- const root = buildTabsRecipe(factory, { tabs: binding ? TABS_WORDS.slice(0, 1) : undefined, label: pn.name }) as SerializedNode;
1182
+ const root = buildTabsRecipe(factory, { tabs: binding ? tabsWords(ctx.plan.locale).slice(0, 1) : undefined, label: ownName(pn, ctx.plan.locale), lang: ctx.plan.locale }) as SerializedNode;
1173
1183
  const tree = root as CompositeNode;
1174
1184
  if (!binding) {
1175
1185
  if (pn.ph === PatternPlaceholder.Copy) {
@@ -1386,7 +1396,7 @@ function recipeFactory(id: string, rootKey: string): (spec: CompositeNodeSpec) =
1386
1396
  * testimonials are facts, never invented.
1387
1397
  */
1388
1398
  function composeCarousel(pn: PatternNode, id: string, ctx: Ctx): SerializedNode {
1389
- const slider = buildCarouselRecipe(recipeFactory(id, 'carousel')) as SerializedNode;
1399
+ const slider = buildCarouselRecipe(recipeFactory(id, 'carousel'), { lang: ctx.plan.locale, ...(pn.name ? { name: ownName(pn, ctx.plan.locale) } : {}) }) as SerializedNode;
1390
1400
  if (pn.ph === PatternPlaceholder.Copy) {
1391
1401
  for (const slide of (slider.children ?? []).filter(c => c.type === SLIDE_TYPE)) {
1392
1402
  for (const text of slide.children ?? []) ctx.placeholders.push({ nodeId: text.id, owner: ctx.owner, kind: PlaceholderKind.Copy, text: String(text.props?.['content'] ?? '') });
@@ -1647,7 +1657,7 @@ function composeLayoutPage(
1647
1657
  const given = (facts as Record<string, string | undefined>)[key];
1648
1658
  if (nonEmpty(given)) return given.trim();
1649
1659
  missing.push(key as FactKey);
1650
- return SITE_FACT_LABELS[key as FactKey] ?? key;
1660
+ return siteFactLabel(key as FactKey, plan.locale) ?? key;
1651
1661
  });
1652
1662
  for (const fact of missing) placeholders.push({ nodeId: node.id, owner: page.key, kind: PlaceholderKind.Fact, fact, text: String(node.props[prop]) });
1653
1663
  }
@@ -2107,6 +2117,9 @@ export const PRICING_PATTERN = 'pricing.tiers';
2107
2117
  export interface SectionInput {
2108
2118
  readonly business?: SiteBusiness;
2109
2119
  readonly pages?: ReadonlyArray<SitePageRef>;
2120
+ /** The site's language (`SiteLocale`, iox-ui#112): the section's own words in it, as `composeSite` gives a page's.
2121
+ * English when not given. */
2122
+ readonly locale?: string;
2110
2123
  }
2111
2124
 
2112
2125
  export interface SectionOptions {
@@ -2133,7 +2146,7 @@ export function composeSection(patternId: string, input: SectionInput, options:
2133
2146
  if (pattern.global) throw new ComposeError(`"${patternId}" is a header or footer — composeNavHeader / composeSite stamp those`);
2134
2147
  const business: SiteBusiness = input.business ?? { name: '' } as SiteBusiness;
2135
2148
  const pages = navPagePlans(input.pages ?? []);
2136
- const plan = { business, pages, dataSources: [], contentTypes: [] } as unknown as SitePlan;
2149
+ const plan = { business, pages, dataSources: [], contentTypes: [], ...(input.locale ? { locale: input.locale } : {}) } as unknown as SitePlan;
2137
2150
  const email = nonEmpty(business.facts?.email) ? business.facts!.email!.trim() : null;
2138
2151
  const placeholders: ComposedPlaceholder[] = [];
2139
2152
  const issues: ComposeIssue[] = [];
@@ -2142,9 +2155,27 @@ export function composeSection(patternId: string, input: SectionInput, options:
2142
2155
  placeholders, issues, routes: new Set(pages.map(p => p.route)), keepButtons: true,
2143
2156
  };
2144
2157
  const section = composePattern(pattern, options.id, ctx);
2158
+ wearBaselineWords(section, input.locale);
2145
2159
  return { section, placeholders, issues };
2146
2160
  }
2147
2161
 
2162
+ /** iox-ui#112: a type's own placeholder words (its builder baseline — "Enter text here", "Heading", an Image's "Image", a
2163
+ * submit button's "Sending…") on a Hebrew page, where a fresh section's empty slot shows them until the author writes it. */
2164
+ export const BASELINE_WORDS_HE: Readonly<Record<string, Readonly<Record<string, string>>>> = {
2165
+ Text: { content: 'כתבו כאן טקסט' }, Heading: { content: 'כותרת' }, Image: { alt: 'תמונה' }, Button: { label: 'לחצו כאן' },
2166
+ Link: { label: 'לחצו כאן' }, Field: { label: 'תווית' }, SubmitButton: { label: 'שליחה', loadingLabel: 'שולחים…' },
2167
+ };
2168
+
2169
+ /** Every node still holding its type's English baseline words takes the language's (a word the composer wrote stays). */
2170
+ function wearBaselineWords(root: SerializedNode, locale: string | undefined): void {
2171
+ if (locale !== SiteLocale.He) return;
2172
+ walkSerialized([root], node => {
2173
+ for (const [prop, words] of Object.entries(BASELINE_WORDS_HE[node.type] ?? {})) {
2174
+ if (node.props[prop] === NODE_BASELINES[node.type]?.props[prop]) node.props[prop] = words;
2175
+ }
2176
+ });
2177
+ }
2178
+
2148
2179
  // ── The opening (AW8, board award-opening) ──────────────────────────────────────────────────────────────────────
2149
2180
 
2150
2181
  /** The colour scheme a page's first section wears — what the header over it follows (`pageSettings.opening`), or null. */
@@ -68,6 +68,14 @@ export enum FooterGround {
68
68
  Inset = 'inset',
69
69
  }
70
70
 
71
+ /** The roles a footer's parts carry — the contract's (`site.footerParts` and the stored footers), written to the node's
72
+ * `role`, a class `iox-role-<role>` both renderers emit. */
73
+ export enum FooterRole {
74
+ /** The footer's page list (the Pages block, or the page row of a line or centred footer): a navigation list — its
75
+ * links rest with no line (vectoriox/iox-ui#87/#97, iox-design.css), as a header's do. */
76
+ Links = 'footer.links',
77
+ }
78
+
71
79
  /** One word per ingredient; `holds` several, in the table's order. */
72
80
  export interface FooterMix {
73
81
  readonly arrange: string;
@@ -423,8 +423,9 @@ function drawer(kit: Kit, root: SerializedNode, pages: NavPage[], at: string): S
423
423
  const list = part(kit, 'drawer-links', CONTAINER, {}, 'box', NavRole.DrawerLinks,
424
424
  { display: 'flex', flexDirection: 'column', gap: '4px' });
425
425
  // Board 1: every page, Home first, at lead size (on each Link: a Link's own baseline font size would
426
- // beat one inherited from the list). Only the CURRENT page is underlined — the shared CSS keys that on
427
- // the list's role (iox-design.css), so no Link holds a literal over its element style.
426
+ // beat one inherited from the list). The links rest at the body weight and the CURRENT page reads by its ink and
427
+ // weight (no line since 2026-11-22) — the shared CSS keys that on the list's role (iox-design.css), so no Link holds
428
+ // a literal over its element style.
428
429
  list.children = withHome(root, pages).map((p, i) => pageLink(kit, `drawer-link-${i}`, p, NavRole.DrawerLink,
429
430
  { display: 'flex', alignItems: 'center', minHeight: '48px', fontSize: 'var(--iox-size-lead)' }));
430
431
  dr.children = [head, list];
@@ -49,6 +49,10 @@ export interface PatternNode {
49
49
  readonly text?: string;
50
50
  /** The pattern's own words on a Hebrew site (the contract's COPY_HE); `text` everywhere else. */
51
51
  readonly textHe?: string;
52
+ /** A recipe's `words` on a Hebrew site (iox-ui#112, COPY_HE). */
53
+ readonly wordsHe?: Readonly<Record<string, string>>;
54
+ /** A part's `name` on a Hebrew site (iox-ui#112, COPY_HE). */
55
+ readonly nameHe?: string;
52
56
  readonly ph?: string;
53
57
  readonly bind?: string;
54
58
  readonly alt?: string;