@vectoriox/iox-ui 5.165.0 → 5.167.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 (34) hide show
  1. package/actions-core/index.d.ts +7 -1
  2. package/design-core/index.d.ts +112 -1
  3. package/fesm2022/vectoriox-iox-ui-actions-core.mjs +9 -1
  4. package/fesm2022/vectoriox-iox-ui-actions-core.mjs.map +1 -1
  5. package/fesm2022/vectoriox-iox-ui-design-core.mjs +133 -5
  6. package/fesm2022/vectoriox-iox-ui-design-core.mjs.map +1 -1
  7. package/fesm2022/vectoriox-iox-ui-generation-core.mjs +621 -98
  8. package/fesm2022/vectoriox-iox-ui-generation-core.mjs.map +1 -1
  9. package/fesm2022/vectoriox-iox-ui-harness-core.mjs +261 -0
  10. package/fesm2022/vectoriox-iox-ui-harness-core.mjs.map +1 -1
  11. package/fesm2022/vectoriox-iox-ui.mjs +49 -7
  12. package/fesm2022/vectoriox-iox-ui.mjs.map +1 -1
  13. package/generation-core/index.d.ts +1668 -1392
  14. package/harness-core/index.d.ts +192 -1
  15. package/index.d.ts +17 -3
  16. package/package.json +1 -1
  17. package/src/actions-core/element-actions.ts +9 -0
  18. package/src/design-core/flavor-spec.generated.ts +98 -0
  19. package/src/design-core/footer-classes.ts +38 -0
  20. package/src/design-core/node-classes.ts +3 -2
  21. package/src/design-core/public-api.ts +1 -0
  22. package/src/generation-core/compose-site.ts +34 -6
  23. package/src/generation-core/footer-mix.ts +292 -34
  24. package/src/generation-core/layout-drift.ts +36 -3
  25. package/src/generation-core/layout-language.ts +3 -0
  26. package/src/generation-core/layout-wire.ts +1 -1
  27. package/src/generation-core/node-baselines.generated.ts +14 -1
  28. package/src/generation-core/opening-mix.ts +82 -6
  29. package/src/generation-core/patterns.ts +4 -1
  30. package/src/generation-core/public-api.ts +2 -0
  31. package/src/generation-core/site-spec.generated.ts +198 -49
  32. package/src/harness-core/business-types.ts +12 -0
  33. package/src/harness-core/harness-spec.generated.ts +261 -0
  34. package/styles/iox-design.css +99 -0
@@ -840,6 +840,11 @@ export const SPEC_TIERS = {
840
840
  "type": "size",
841
841
  "default": "-10px"
842
842
  },
843
+ {
844
+ "name": "footer-name-cut",
845
+ "type": "size",
846
+ "default": "0.12em"
847
+ },
843
848
  {
844
849
  "name": "list-fan-step",
845
850
  "type": "number",
@@ -4419,6 +4424,57 @@ export const SPEC_ELEMENT_STYLES = [
4419
4424
  "fontWeight": "var(--iox-weight-strong)"
4420
4425
  }
4421
4426
  },
4427
+ {
4428
+ "id": "link-large",
4429
+ "label": "Large link",
4430
+ "group": "Text",
4431
+ "appliesTo": [
4432
+ "Link"
4433
+ ],
4434
+ "base": {
4435
+ "fontFamily": "var(--iox-font-display)",
4436
+ "fontSize": "var(--iox-size-h3)",
4437
+ "fontWeight": "var(--iox-weight-heading)",
4438
+ "lineHeight": "var(--iox-leading-heading)",
4439
+ "letterSpacing": "var(--iox-tracking-display)",
4440
+ "color": "var(--iox-link-color)",
4441
+ "textDecoration": "none",
4442
+ "transitionDuration": "var(--iox-dur-fast)",
4443
+ "transitionTimingFunction": "var(--iox-ease-standard)"
4444
+ },
4445
+ "hover": {
4446
+ "color": "var(--iox-link-hover-color)"
4447
+ },
4448
+ "current": {
4449
+ "color": "var(--iox-link-current-color)",
4450
+ "textDecoration": "none"
4451
+ }
4452
+ },
4453
+ {
4454
+ "id": "link-display",
4455
+ "label": "Display link",
4456
+ "group": "Text",
4457
+ "appliesTo": [
4458
+ "Link"
4459
+ ],
4460
+ "base": {
4461
+ "fontFamily": "var(--iox-font-display)",
4462
+ "fontWeight": "var(--iox-weight-display)",
4463
+ "lineHeight": "var(--iox-leading-display)",
4464
+ "letterSpacing": "var(--iox-tracking-display)",
4465
+ "color": "var(--iox-link-color)",
4466
+ "textDecoration": "none",
4467
+ "transitionDuration": "var(--iox-dur-fast)",
4468
+ "transitionTimingFunction": "var(--iox-ease-standard)"
4469
+ },
4470
+ "hover": {
4471
+ "color": "var(--iox-link-hover-color)"
4472
+ },
4473
+ "current": {
4474
+ "color": "var(--iox-accent-text)",
4475
+ "textDecoration": "none"
4476
+ }
4477
+ },
4422
4478
  {
4423
4479
  "id": "button-label",
4424
4480
  "label": "Button label",
@@ -7339,6 +7395,13 @@ export const SPEC_FLAVOR_PACKS = [
7339
7395
  "group": "components",
7340
7396
  "value": "-10px"
7341
7397
  },
7398
+ {
7399
+ "name": "footer-name-cut",
7400
+ "tier": "component",
7401
+ "type": "size",
7402
+ "group": "components",
7403
+ "value": "0.12em"
7404
+ },
7342
7405
  {
7343
7406
  "name": "list-fan-step",
7344
7407
  "tier": "component",
@@ -9791,6 +9854,13 @@ export const SPEC_FLAVOR_PACKS = [
9791
9854
  "group": "components",
9792
9855
  "value": "-10px"
9793
9856
  },
9857
+ {
9858
+ "name": "footer-name-cut",
9859
+ "tier": "component",
9860
+ "type": "size",
9861
+ "group": "components",
9862
+ "value": "0.12em"
9863
+ },
9794
9864
  {
9795
9865
  "name": "list-fan-step",
9796
9866
  "tier": "component",
@@ -12253,6 +12323,13 @@ export const SPEC_FLAVOR_PACKS = [
12253
12323
  "group": "components",
12254
12324
  "value": "-10px"
12255
12325
  },
12326
+ {
12327
+ "name": "footer-name-cut",
12328
+ "tier": "component",
12329
+ "type": "size",
12330
+ "group": "components",
12331
+ "value": "0.12em"
12332
+ },
12256
12333
  {
12257
12334
  "name": "list-fan-step",
12258
12335
  "tier": "component",
@@ -14727,6 +14804,13 @@ export const SPEC_FLAVOR_PACKS = [
14727
14804
  "group": "components",
14728
14805
  "value": "-10px"
14729
14806
  },
14807
+ {
14808
+ "name": "footer-name-cut",
14809
+ "tier": "component",
14810
+ "type": "size",
14811
+ "group": "components",
14812
+ "value": "0.12em"
14813
+ },
14730
14814
  {
14731
14815
  "name": "list-fan-step",
14732
14816
  "tier": "component",
@@ -17204,6 +17288,13 @@ export const SPEC_FLAVOR_PACKS = [
17204
17288
  "group": "components",
17205
17289
  "value": "-10px"
17206
17290
  },
17291
+ {
17292
+ "name": "footer-name-cut",
17293
+ "tier": "component",
17294
+ "type": "size",
17295
+ "group": "components",
17296
+ "value": "0.12em"
17297
+ },
17207
17298
  {
17208
17299
  "name": "list-fan-step",
17209
17300
  "tier": "component",
@@ -19662,6 +19753,13 @@ export const SPEC_FLAVOR_PACKS = [
19662
19753
  "group": "components",
19663
19754
  "value": "-10px"
19664
19755
  },
19756
+ {
19757
+ "name": "footer-name-cut",
19758
+ "tier": "component",
19759
+ "type": "size",
19760
+ "group": "components",
19761
+ "value": "0.12em"
19762
+ },
19665
19763
  {
19666
19764
  "name": "list-fan-step",
19667
19765
  "tier": "component",
@@ -0,0 +1,38 @@
1
+ /**
2
+ * A COMPOSED FOOTER'S MIX ON ITS ROOT (award-ingredients-plan §7.1g AW12, board award-footer): the words a footer was
3
+ * composed as ride on its Section as ONE prop, `footerMix` (`arrange:ruled closing:name-and-action ground:inset
4
+ * nameStyle:gradient`, the wire's words — generation-core `stampFooterMix`), and become marker classes —
5
+ * `iox-footer-arrange-ruled`, `iox-footer-namestyle-gradient` — that the shared iox-design.css draws (the ruled cells'
6
+ * hairlines, the name's cut and style, the large links' arrow). The same decision in all three render paths
7
+ * (`nodeDesignClasses`), so the canvas, both engine paths and the raw SSR agree. Pure.
8
+ */
9
+
10
+ /** The prop (a Section's trait) the mix is stored under — generation-core `FOOTER_MIX_PROP`. */
11
+ export const FOOTER_MIX_PROP = 'footerMix';
12
+ /** Every class a mix writes starts with this — what a live re-sync removes. */
13
+ export const FOOTER_CLASS_PREFIX = 'iox-footer-';
14
+
15
+ const WORD = /^[a-zA-Z]+:[a-z0-9-]+$/;
16
+
17
+ interface FooterMixSource {
18
+ props?: Readonly<Record<string, unknown>> | null;
19
+ traits?: ReadonlyArray<{ name?: string; default?: unknown }> | null;
20
+ }
21
+
22
+ /** The stored mix's words (`arrange:ruled`), from `props` (saved) or the trait (builder); [] for none. */
23
+ export function footerMixWordsOf(node: FooterMixSource | null | undefined): string[] {
24
+ if (!node) return [];
25
+ const raw = node.props?.[FOOTER_MIX_PROP] ?? node.traits?.find(t => t?.name === FOOTER_MIX_PROP)?.default;
26
+ const words = Array.isArray(raw) ? raw : typeof raw === 'string' ? raw.split(/\s+/) : [];
27
+ return words.filter((w): w is string => typeof w === 'string' && WORD.test(w));
28
+ }
29
+
30
+ /** The marker classes a footer root renders (`iox-footer-arrange-ruled iox-footer-namestyle-gradient`), or ''. */
31
+ export function footerMixClasses(node: FooterMixSource | null | undefined): string {
32
+ return [...new Set(footerMixWordsOf(node))].map(w => `${FOOTER_CLASS_PREFIX}${w.replace(':', '-').toLowerCase()}`).join(' ');
33
+ }
34
+
35
+ /** True for a class this module writes. */
36
+ export function isFooterMixClass(c: string): boolean {
37
+ return c.startsWith(FOOTER_CLASS_PREFIX);
38
+ }
@@ -1,6 +1,7 @@
1
1
  import { ELEMENT_STYLE_MARKER_CLASS, elementStyleClass } from './element-styles';
2
2
  import { SPEC_AXES, SPEC_SCHEME_INK, SPEC_SCHEMES } from './flavor-spec.generated';
3
3
  import { isListMixClass, listMixClasses } from './list-classes';
4
+ import { footerMixClasses, isFooterMixClass } from './footer-classes';
4
5
  import { isSectionDesignClass, sectionDesignClasses } from './section-edge';
5
6
 
6
7
  /**
@@ -280,13 +281,13 @@ export function hasElementStyleMarker(node: { elementStyle?: string | null } | n
280
281
  export function nodeDesignClasses(node: DesignClassSource | null | undefined): string {
281
282
  const marker = elementStyleClass(node?.elementStyle);
282
283
  return [marker ? `${ELEMENT_STYLE_MARKER_CLASS} ${marker}` : '', colorSchemeClass(colorSchemeOf(node)) ?? '', roleClass(node?.role) ?? '', barReserveClass(node) ?? '',
283
- sectionDesignClasses(node), listMixClasses(node)]
284
+ sectionDesignClasses(node), listMixClasses(node), footerMixClasses(node)]
284
285
  .filter(Boolean).join(' ');
285
286
  }
286
287
 
287
288
  const isDesignClass = (c: string) =>
288
289
  c === ELEMENT_STYLE_MARKER_CLASS || c.startsWith(MARKER_PREFIX) || c.startsWith(SCHEME_PREFIX) || c.startsWith(ROLE_PREFIX) || c.startsWith(BAR_RESERVE_CLASS)
289
- || isSectionDesignClass(c) || isListMixClass(c);
290
+ || isSectionDesignClass(c) || isListMixClass(c) || isFooterMixClass(c);
290
291
 
291
292
  /** Make an element's design classes match the node — the live switch on the canvas and the
292
293
  * component path's one-time stamp. Removes stale ones; touches no other class. */
@@ -22,6 +22,7 @@ export * from './adopt';
22
22
  export * from './node-classes';
23
23
  export * from './section-edge';
24
24
  export * from './list-classes';
25
+ export * from './footer-classes';
25
26
  export * from './ink-on-ground';
26
27
  export * from './field-classes';
27
28
  export * from './empty-image';
@@ -19,7 +19,7 @@ import { ConsentCategory } from '@vectoriox/iox-ui/consent-core';
19
19
  import { EntranceMark, EntrancePart, planEntrances } from './entrances';
20
20
  import { scrubEntranceStamps } from './text-scroll';
21
21
  import { filmOfPlan } from './film';
22
- import { checkFooter, FooterArrange, footerMixOfPlan, footerPattern } from './footer-mix';
22
+ import { checkFooter, FooterArrange, footerMixOfPlan, FooterNever, footerPattern, FooterRole, stampFooterMix } from './footer-mix';
23
23
  import {
24
24
  countryLegalFacts, FOOTER_LEGAL_ROLE, FORM_LEGAL_ROLE, formAsksPersonalData, formLegalFacts, LEGAL_PAGE_SETTING, LegalContext, LegalFact, LegalFacts,
25
25
  legalFormLine, LegalKind, legalKindsFor, legalLabel, legalRoute, legalTitle,
@@ -164,6 +164,11 @@ export interface ComposeContext {
164
164
  * body never wears a torn or dripping edge (`checkBody` mends it to a wave, said). The business type is the
165
165
  * generation's (the reading), never the plan's — the caller knows it. Absent = not calm. */
166
166
  calm?: boolean;
167
+ /** AW12: the kind of business (the reading's, as `calm`) — it chooses the footer's call word (`footerCallWord`). */
168
+ businessType?: string;
169
+ /** AW12-D10: what that kind of business's footer never wears (harness-core `BusinessType.footer`) — `checkFooter`
170
+ * mends it, said. Absent = nothing refused. */
171
+ footerNever?: FooterNever;
167
172
  /** AW1: what the studio holds that decides its legal pages and banner (country, trackers, its own legal pages, its
168
173
  * routes, a banner it keeps). Absent = only what the plan and the composed pages say (no tracker, no country). */
169
174
  legal?: LegalContext;
@@ -829,8 +834,12 @@ function composeChildren(pn: PatternNode, id: string, repeater: RepeaterScope |
829
834
  return;
830
835
  }
831
836
  if (child.each !== PatternDirective.NavPages) throw new ComposeError(`${childId}: "each" stamps "${PatternDirective.NavPages}" only`);
832
- for (const page of ctx.plan.pages.filter(p => p.inNav)) {
833
- const node = composeNode(child, `${childId}-${page.key}`, repeater, { ...ctx, navPage: page });
837
+ // AW12: `skip` / `limit` choose a run of the navigation pages (name-and-action's two, list-big's large five);
838
+ // they belong to the stamping, not to the stamped Link.
839
+ const { skip, limit, ...each } = child;
840
+ const navPages = ctx.plan.pages.filter(p => p.inNav).slice(skip ?? 0, limit === undefined ? undefined : (skip ?? 0) + limit);
841
+ for (const page of navPages) {
842
+ const node = composeNode(each, `${childId}-${page.key}`, repeater, { ...ctx, navPage: page });
834
843
  if (node) out.push(node);
835
844
  }
836
845
  });
@@ -1895,14 +1904,20 @@ function composeSiteOnce(plan: SitePlan, context: ComposeContext, pictureless: R
1895
1904
 
1896
1905
  // LI5: the footer is the plan's footer MIX (a stored pattern id is read as one), checked and arranged from the
1897
1906
  // contract's footer parts; each mend is said.
1898
- const footer = checkFooter(footerMixOfPlan(plan), { name: plan.business.name, design });
1907
+ // AW12: the footer judges what it holds against the site — the tagline (a statement), the navigation's length (list-big).
1908
+ // AW12-D10/D15: the kind of business (the caller's reading) chooses the call word and what the footer never wears.
1909
+ const footerContext = {
1910
+ name: plan.business.name, design, tagline: plan.business.tagline, locale: plan.locale, pages: plan.pages.filter(p => p.inNav).length,
1911
+ ...(context?.businessType ? { type: context.businessType } : {}), ...(context?.footerNever ? { never: context.footerNever } : {}),
1912
+ };
1913
+ const footer = checkFooter(footerMixOfPlan(plan), footerContext);
1899
1914
  for (const r of footer.repairs) issues.push({ code: ComposeIssueCode.FooterMended, nodeId: GlobalSlot.Footer, owner: GlobalSlot.Footer, detail: r.said });
1900
1915
  // HI1: the header is the plan's header MIX (a stored pattern id is read as one), drawn as the product draws it, checked
1901
1916
  // against the site and arranged from the contract's header parts; each mend is said.
1902
1917
  const header = planHeader(plan);
1903
1918
  for (const said of header.said) issues.push({ code: ComposeIssueCode.HeaderMended, nodeId: GlobalSlot.Header, owner: GlobalSlot.Header, detail: said });
1904
1919
  const patternOf = (slot: GlobalSlot): SitePattern => slot === GlobalSlot.Footer
1905
- ? footerPattern(footer.mix, { name: plan.business.name, design, tagline: plan.business.tagline })
1920
+ ? footerPattern(footer.mix, footerContext)
1906
1921
  : header.recipe.pattern;
1907
1922
  const slotPatterns = Object.values(GlobalSlot).map(slot => [slot, patternOf(slot)] as const);
1908
1923
  let globals = slotPatterns.map(([slot, pattern]) => {
@@ -1928,6 +1943,9 @@ function composeSiteOnce(plan: SitePlan, context: ComposeContext, pictureless: R
1928
1943
  if (headerRoot) stampHeaderMix(headerRoot, header.recipe.mix);
1929
1944
  // AW6 (AW6-D10): a header whose ink follows the sections says so (the renderers' header ink runtime reads it).
1930
1945
  if (headerRoot) setHeaderInk(headerRoot as unknown as CompositeNode, headerInkOf(header.recipe.mix[HeaderIngredient.Ink]));
1946
+ // AW12: the footer root says the mix it was composed as (the classes iox-design.css draws from); an inset one is a card.
1947
+ const footerRoot = globals.find(g => g.id === GlobalSlot.Footer);
1948
+ if (footerRoot) stampFooterMix(footerRoot as unknown as { props: Record<string, unknown>; styleProps?: Record<string, unknown> }, footer.mix);
1931
1949
  if (planSells(plan)) globals = withStore(globals, plan.locale ?? DEFAULT_SITE_LOCALE);
1932
1950
  // AW1: the law, derived from facts and never asked — the legal pages, the banner when a tracker is connected, the
1933
1951
  // footer's legal row and the line beside every form that asks for personal details.
@@ -2107,7 +2125,17 @@ function composeLegal(plan: SitePlan, context: LegalContext, pages: ReadonlyArra
2107
2125
  }
2108
2126
  const footer = out.find(g => g.id === GlobalSlot.Footer);
2109
2127
  const row = footer ? legalRow(routes, settings, footerArrange, locale) : null;
2110
- if (footer && row) (footer.children ?? (footer.children = [])).push(row);
2128
+ // AW12-D3: a name-and-action footer keeps its legal row in its end block, above the thank-you line — the name stays last,
2129
+ // standing on the window's bottom.
2130
+ let endBlock: SerializedNode | null = null;
2131
+ if (footer) walkSerialized([footer], n => { if (!endBlock && n.role === FooterRole.EndBlock) endBlock = n; });
2132
+ if (footer && row) {
2133
+ if (endBlock) {
2134
+ row.styleProps['justifyContent'] = 'flex-end';
2135
+ ((endBlock as SerializedNode).children ?? ((endBlock as SerializedNode).children = [])).unshift(row);
2136
+ }
2137
+ else (footer.children ?? (footer.children = [])).push(row);
2138
+ }
2111
2139
 
2112
2140
  walkSerialized([...pages.flatMap(p => p.layout), ...out, ...stamped.flatMap(p => p.layout)], n => {
2113
2141
  if (n.type !== FORM || !formAsksPersonalData(n)) return;