@vectoriox/iox-ui 5.141.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 (60) hide show
  1. package/composite-core/index.d.ts +40 -1
  2. package/design-core/index.d.ts +262 -28
  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 +539 -268
  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 +1547 -742
  10. package/fesm2022/vectoriox-iox-ui-generation-core.mjs.map +1 -1
  11. package/fesm2022/vectoriox-iox-ui-harness-core.mjs +510 -20
  12. package/fesm2022/vectoriox-iox-ui-harness-core.mjs.map +1 -1
  13. package/fesm2022/vectoriox-iox-ui.mjs +170 -22
  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 +638 -148
  17. package/harness-core/index.d.ts +359 -20
  18. package/index.d.ts +94 -10
  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 +212 -25
  29. package/src/design-core/ink-on-ground.ts +36 -0
  30. package/src/design-core/list-classes.ts +37 -0
  31. package/src/design-core/locale-direction.ts +24 -0
  32. package/src/design-core/menu-look.ts +2 -1
  33. package/src/design-core/node-classes.ts +3 -2
  34. package/src/design-core/public-api.ts +3 -0
  35. package/src/forms-core/form-presets.ts +72 -3
  36. package/src/generation-core/check-layout.ts +4 -1
  37. package/src/generation-core/check-list.ts +144 -5
  38. package/src/generation-core/compose-layout.ts +165 -20
  39. package/src/generation-core/compose-site.ts +58 -21
  40. package/src/generation-core/footer-mix.ts +8 -0
  41. package/src/generation-core/layout-fingerprint.ts +5 -1
  42. package/src/generation-core/layout-language.ts +5 -0
  43. package/src/generation-core/layout-wire.ts +64 -24
  44. package/src/generation-core/list-panel.ts +122 -0
  45. package/src/generation-core/list-space.ts +54 -1
  46. package/src/generation-core/list-table.ts +101 -0
  47. package/src/generation-core/nav-shape.ts +3 -2
  48. package/src/generation-core/node-baselines.generated.ts +3 -1
  49. package/src/generation-core/patterns.ts +4 -0
  50. package/src/generation-core/public-api.ts +1 -0
  51. package/src/generation-core/serialized-node.ts +2 -0
  52. package/src/generation-core/site-plan.model.ts +16 -2
  53. package/src/generation-core/site-spec.generated.ts +469 -201
  54. package/src/generation-core/validate-site-plan.ts +8 -4
  55. package/src/harness-core/business-types.ts +11 -0
  56. package/src/harness-core/film-idea.ts +178 -0
  57. package/src/harness-core/harness-spec.generated.ts +380 -18
  58. package/src/harness-core/intake.ts +8 -1
  59. package/src/harness-core/public-api.ts +1 -0
  60. package/styles/iox-design.css +420 -45
@@ -37,3 +37,104 @@ export function listBuiltWords(k: ListIngredient): string[] {
37
37
  export function listMeaning(k: ListIngredient, word: string): string {
38
38
  return MEANINGS[`${k}.${word}`] ?? word;
39
39
  }
40
+
41
+ // ── AW11 (award-ingredients-plan.md §7.1f, board award-lists): the award tier, the rhythms, what each word needs ─────
42
+
43
+ /** AW-D23: a word every plan wears (`all`) or the award tier's alone (`pro`). */
44
+ export function listWordTier(k: ListIngredient, word: string): 'all' | 'pro' {
45
+ return (LIST_TABLE.tiers as Readonly<Record<string, string>>)[`${k}.${word}`] === 'pro' ? 'pro' : 'all';
46
+ }
47
+
48
+ /** May a build at `tier` wear this word? (`award` wears every word; anything else the `all` ones.) */
49
+ export function listWordOffered(k: ListIngredient, word: string, tier?: string | null): boolean {
50
+ return listWordTier(k, word) === 'all' || tier === 'award';
51
+ }
52
+
53
+ /** The word a round-two word is drawn as below the award tier (null: left out), from the contract's `belowPro`. */
54
+ export function listBelowPro(k: ListIngredient, word: string): string | null | undefined {
55
+ const stand = (LIST_TABLE.belowPro as Readonly<Record<string, string | null>>)[`${k}.${word}`];
56
+ return stand === undefined ? undefined : stand;
57
+ }
58
+
59
+ /** One step of a gallery wall: its share of a 12-column row and how far it hangs below the row's line (px). */
60
+ /** One step of the gallery wall: its share of a 12-column row, the bare columns before it (`start`), the margin it hangs
61
+ * below its row's line by, and its picture's shape. */
62
+ export interface ListHangStep { span: number; start?: number; drop: number; ratio: string }
63
+
64
+ /** The numbers the round-two arrangements are drawn with (the contract's `rhythms`, AW11-D3) — never the model's. */
65
+ export const LIST_RHYTHMS = LIST_TABLE.rhythms as unknown as {
66
+ readonly hang: ReadonlyArray<ListHangStep>;
67
+ readonly bento: ReadonlyArray<number>;
68
+ readonly tilt: ReadonlyArray<number>;
69
+ readonly tiltMaxDeg: number;
70
+ readonly fanRadius: number;
71
+ readonly hoverTiltDeg: number;
72
+ readonly hoverSettle: number;
73
+ readonly clipUpRise: number;
74
+ readonly numberBehindInk: number;
75
+ readonly colourRamp: ReadonlyArray<{ readonly ground: string; readonly ink: string }>;
76
+ };
77
+
78
+ /** The rules `checkList` holds, typed (the contract's `rules`). */
79
+ export const LIST_RULES = LIST_TABLE.rules as unknown as {
80
+ readonly minItems: number;
81
+ readonly strips: readonly [number, number];
82
+ readonly onlyStrips: { readonly how: ReadonlyArray<string>; readonly hover: ReadonlyArray<string> };
83
+ readonly onlyRow: { readonly who: ReadonlyArray<string>; readonly move: ReadonlyArray<string> };
84
+ readonly moving: ReadonlyArray<string>;
85
+ readonly neverSwipe: ReadonlyArray<string>;
86
+ readonly alone: ReadonlyArray<string>;
87
+ readonly counts: Readonly<Record<string, readonly [number, number]>>;
88
+ readonly bento: ReadonlyArray<number>;
89
+ readonly fanDragFrom: number;
90
+ readonly leaning: ReadonlyArray<string>;
91
+ readonly pictured: Readonly<Partial<Record<ListIngredient, ReadonlyArray<string>>>>;
92
+ readonly secondPicture: Readonly<Partial<Record<ListIngredient, ReadonlyArray<string>>>>;
93
+ readonly still: Readonly<Partial<Record<ListIngredient, ReadonlyArray<string>>>>;
94
+ readonly titleOnPhotoWords: number;
95
+ readonly rowsStandout: { readonly who: string; readonly how: string };
96
+ readonly middle?: ReadonlyArray<string>;
97
+ readonly notFirstScreen: Readonly<Partial<Record<ListIngredient, ReadonlyArray<string>>>>;
98
+ readonly onlyPictures: Readonly<Partial<Record<ListIngredient, ReadonlyArray<string>>>>;
99
+ };
100
+
101
+ /** The largest bento fill a list of `items` can show without a hole (3, 5 or 7), or null under the smallest. */
102
+ export function bentoFill(items: number): number | null {
103
+ const fills = LIST_RULES.bento.filter(n => n <= items);
104
+ return fills.length ? fills[fills.length - 1] : null;
105
+ }
106
+
107
+ /** Why a list cannot carry a word (R-H-AW11-7 — ONE table for the wire, the judge and Bindings ▸ List). */
108
+ export enum ListWordRefusal {
109
+ /** The award tier's word, on a plan below it (AW-D23). */
110
+ ProOnly = 'pro-only',
111
+ /** The word shows a picture in every item, and the list has none. */
112
+ NoPictures = 'no-pictures',
113
+ /** The word shows a second picture (the gallery role), and the list has none (AW11-D12). */
114
+ NoSecondPicture = 'no-second-picture',
115
+ /** The business type's lists never take it (L-D12, AW11-D7). */
116
+ Never = 'never',
117
+ }
118
+
119
+ /** What a list holds, as the word table reads it: its roles. */
120
+ export interface ListWordShape { readonly roles: ReadonlyArray<string> }
121
+
122
+ /** What a business's lists never do, as the word table reads it (`LayoutListNever`). */
123
+ export interface ListWordNever { readonly arranges: ReadonlyArray<string>; readonly moves: ReadonlyArray<string> }
124
+
125
+ const inRule = (rule: Readonly<Partial<Record<ListIngredient, ReadonlyArray<string>>>>, k: ListIngredient, w: string) => !!rule[k]?.includes(w);
126
+
127
+ /**
128
+ * Can this list carry this word — and if not, why (R-H-AW11-7)? The ONE answer the wire's offer, `checkList` and
129
+ * Bindings ▸ List read: a word the list's data cannot carry is never offered, never picked. `shape` null: nothing is
130
+ * known of the list (any word its tier allows). `tier` absent: no tier is judged (the judge's own tier step, the owner's
131
+ * builder).
132
+ */
133
+ export function listWordRefusal(k: ListIngredient, word: string, shape: ListWordShape | null, tier?: string | null, never?: ListWordNever | null): ListWordRefusal | null {
134
+ if (tier !== undefined && tier !== null && !listWordOffered(k, word, tier)) return ListWordRefusal.ProOnly;
135
+ if (never && ((k === 'arrange' && never.arranges.includes(word)) || (k === 'move' && never.moves.includes(word)))) return ListWordRefusal.Never;
136
+ if (!shape) return null;
137
+ if (inRule(LIST_RULES.pictured, k, word) && !shape.roles.includes('image')) return ListWordRefusal.NoPictures;
138
+ if (inRule(LIST_RULES.secondPicture, k, word) && !shape.roles.includes('gallery')) return ListWordRefusal.NoSecondPicture;
139
+ return null;
140
+ }
@@ -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];
@@ -706,7 +706,8 @@ export const NODE_BASELINES: Readonly<Record<string, NodeBaseline>> = {
706
706
  "marqueeFade",
707
707
  "marqueePauseOnHover",
708
708
  "seam",
709
- "sectionShape"
709
+ "sectionShape",
710
+ "listMix"
710
711
  ],
711
712
  "styleTraits": [
712
713
  "position",
@@ -3251,6 +3252,7 @@ export const NODE_BASELINES: Readonly<Record<string, NodeBaseline>> = {
3251
3252
  "__effectsLabel",
3252
3253
  "effect",
3253
3254
  "speed",
3255
+ "creativePreset",
3254
3256
  "scrollPlays",
3255
3257
  "__navLabel",
3256
3258
  "controlsPlacement",
@@ -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;
@@ -64,6 +64,7 @@ export * from './check-list';
64
64
  export * from './list-table';
65
65
  export * from './layout-space';
66
66
  export * from './list-space';
67
+ export * from './list-panel';
67
68
  export * from './layout-fingerprint';
68
69
  export * from './header-mix';
69
70
  export * from './header-edit';
@@ -14,6 +14,8 @@ export interface SerializedBinding {
14
14
  prop: string;
15
15
  source: string;
16
16
  path: string;
17
+ /** Render-time transforms (iox-ui `applyBindingPipes`) — AW11's colour block writes its ground and ink pipes. */
18
+ pipes?: Array<{ name: string; args?: unknown[] }>;
17
19
  }
18
20
 
19
21
  /** Per breakpoint: the styles a width overrides, and the component inputs it overrides (a slider's slides per view —
@@ -1,5 +1,6 @@
1
1
  import type { FrameSequence } from '@vectoriox/iox-ui/media-core';
2
2
  import type { AnimateId, DesignChoices } from '@vectoriox/iox-ui/design-core';
3
+ import { LocaleDirection, localeDirection } from '@vectoriox/iox-ui/design-core';
3
4
  import type { ArtDirection } from './art-direction';
4
5
  import type { LayoutPage } from './layout-language';
5
6
 
@@ -29,6 +30,12 @@ export const FACT_KEYS = Object.keys(SPEC_SITE_FACTS) as ReadonlyArray<FactKey>;
29
30
  /** The label a missing fact shows, verbatim from the contract. */
30
31
  export const SITE_FACT_LABELS: Readonly<Record<FactKey, string>> = SPEC_SITE_FACTS;
31
32
 
33
+ /** A missing fact's label in the site's language (iox-ui#112): the contract's `locales.<lang>.facts`, else English. */
34
+ export function siteFactLabel(fact: FactKey, locale?: string | null): string {
35
+ const facts = (SPEC_SITE_LOCALES as unknown as Record<string, { facts?: Partial<Record<FactKey, string>> }>)[locale ?? '']?.facts;
36
+ return facts?.[fact] ?? SITE_FACT_LABELS[fact];
37
+ }
38
+
32
39
  export interface SiteBusiness {
33
40
  readonly name: string;
34
41
  readonly tagline?: string;
@@ -47,6 +54,9 @@ export enum ContentFieldControl {
47
54
  List = 'list',
48
55
  Number = 'number',
49
56
  Switch = 'switch',
57
+ /** AW11-D10: the item's own colour (a colour block's ground) — the admin's colour picker; a hex is drawn, a token or
58
+ * a gradient leaves the look's ramp in place. */
59
+ Colour = 'colorPicker',
50
60
  }
51
61
 
52
62
  /** How a field is stored. The schema editor's and the item editor's own list: anything else renders no input. */
@@ -66,6 +76,7 @@ export const FIELD_TYPE_OF_CONTROL: Readonly<Record<ContentFieldControl, Content
66
76
  [ContentFieldControl.List]: ContentFieldType.Array,
67
77
  [ContentFieldControl.Number]: ContentFieldType.Number,
68
78
  [ContentFieldControl.Switch]: ContentFieldType.Boolean,
79
+ [ContentFieldControl.Colour]: ContentFieldType.String,
69
80
  };
70
81
 
71
82
  export interface ContentFieldPlan {
@@ -106,6 +117,8 @@ export enum ContentRole {
106
117
  Person = 'person',
107
118
  /** LI0: where the item leads — its own page or an address. */
108
119
  Link = 'link',
120
+ /** AW11-D10: its own colour (a hex) — a colour block's ground; the ink on it is chosen when the page is drawn. */
121
+ Colour = 'colour',
109
122
  /** Commerce C-D21: the shop's own price — played only by the shop's fields (`SHOP_ROLES`), never a content type's. */
110
123
  Price = 'price',
111
124
  /** Commerce C-D21: the shop's earlier price, struck through. */
@@ -310,9 +323,10 @@ export enum SiteLocale {
310
323
  export const DEFAULT_SITE_LOCALE = SiteLocale.En;
311
324
  export const SITE_LOCALES: Readonly<Record<`${SiteLocale}`, { label: string; dir: 'ltr' | 'rtl' }>> = SPEC_SITE_LOCALES;
312
325
 
313
- /** True when `locale` reads right to left. */
326
+ /** True when `locale` reads right to left — design-core `localeDirection`, the ONE answer the live document's `dir`
327
+ * reads too (the contract's `site.locales` agree with it, site-plan.spec). */
314
328
  export function isRtlLocale(locale: string | null | undefined): boolean {
315
- return (SITE_LOCALES as Readonly<Record<string, { dir: string }>>)[locale ?? '']?.dir === 'rtl';
329
+ return localeDirection(locale) === LocaleDirection.Rtl;
316
330
  }
317
331
 
318
332
  export interface SitePlan {