@vectoriox/iox-ui 5.199.0 → 5.201.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 (51) hide show
  1. package/design-core/index.d.ts +454 -52
  2. package/fesm2022/vectoriox-iox-ui-design-core.mjs +640 -55
  3. package/fesm2022/vectoriox-iox-ui-design-core.mjs.map +1 -1
  4. package/fesm2022/vectoriox-iox-ui-forms-core.mjs +5 -2
  5. package/fesm2022/vectoriox-iox-ui-forms-core.mjs.map +1 -1
  6. package/fesm2022/vectoriox-iox-ui-generation-core.mjs +1062 -177
  7. package/fesm2022/vectoriox-iox-ui-generation-core.mjs.map +1 -1
  8. package/fesm2022/vectoriox-iox-ui-harness-core.mjs +441 -63
  9. package/fesm2022/vectoriox-iox-ui-harness-core.mjs.map +1 -1
  10. package/fesm2022/vectoriox-iox-ui.mjs +5 -2
  11. package/fesm2022/vectoriox-iox-ui.mjs.map +1 -1
  12. package/generation-core/index.d.ts +473 -124
  13. package/harness-core/index.d.ts +282 -6
  14. package/package.json +1 -1
  15. package/src/design-core/brand-neutrals.ts +125 -3
  16. package/src/design-core/colour-words.ts +48 -0
  17. package/src/design-core/design-settings.ts +24 -5
  18. package/src/design-core/design-token.model.ts +8 -0
  19. package/src/design-core/flavor-fixtures.generated.ts +272 -2
  20. package/src/design-core/flavor-spec.generated.ts +310 -40
  21. package/src/design-core/flavor-tokens.ts +5 -1
  22. package/src/design-core/public-api.ts +2 -0
  23. package/src/design-core/signature-move.ts +107 -0
  24. package/src/design-core/style-presets.ts +9 -3
  25. package/src/design-core/token-css.ts +59 -1
  26. package/src/forms-core/form-presets.ts +5 -2
  27. package/src/generation-core/body-mix.ts +41 -0
  28. package/src/generation-core/check-layout.ts +17 -7
  29. package/src/generation-core/colour-mix.ts +53 -3
  30. package/src/generation-core/compose-site.ts +136 -32
  31. package/src/generation-core/composition.ts +320 -0
  32. package/src/generation-core/footer-mix.ts +43 -3
  33. package/src/generation-core/footer-sign-up.ts +51 -0
  34. package/src/generation-core/header-edit.ts +15 -0
  35. package/src/generation-core/header-mix.ts +128 -19
  36. package/src/generation-core/opening-edit.ts +17 -3
  37. package/src/generation-core/opening-mix.ts +69 -5
  38. package/src/generation-core/plan-wire.ts +22 -5
  39. package/src/generation-core/public-api.ts +2 -0
  40. package/src/generation-core/site-build-run.ts +3 -0
  41. package/src/generation-core/site-plan.model.ts +3 -0
  42. package/src/generation-core/site-spec.generated.ts +250 -104
  43. package/src/generation-core/type-led.ts +4 -2
  44. package/src/generation-core/validate-site-plan.ts +2 -1
  45. package/src/harness-core/business-types.ts +27 -0
  46. package/src/harness-core/harness-spec.generated.ts +405 -56
  47. package/src/harness-core/motion.ts +19 -2
  48. package/src/harness-core/run-compose-context.ts +9 -3
  49. package/src/harness-core/starting-design.ts +15 -7
  50. package/styles/iox-design.css +10 -0
  51. package/styles/iox-forms.css +53 -0
@@ -1,6 +1,6 @@
1
- import { DesignMotion, MotionWordTier, motionWordTier, SPEC_AXES, STYLE_PRESETS, StylePreset } from '@vectoriox/iox-ui/design-core';
1
+ import { DesignMotion, MotionWordTier, motionWordTier, SignatureInput, SPEC_AXES, STYLE_PRESETS, StylePreset } from '@vectoriox/iox-ui/design-core';
2
2
 
3
- import { BUSINESS_TYPES, BusinessType } from './business-types';
3
+ import { BUSINESS_TYPES, BusinessType, businessTypeById } from './business-types';
4
4
  import { READ_ANIMATE, StyleRead } from './rank';
5
5
 
6
6
  /**
@@ -108,3 +108,20 @@ export function motionFor(
108
108
  }
109
109
  return { ...out, why, basis };
110
110
  }
111
+
112
+ /**
113
+ * Motion reach (MR-D1): what a kind of business says about its generated site's signature move — its moves (harness
114
+ * SIGNATURE_MOVES), the Still floor, its ceiling and the preloaders its art direction refuses (ART_NEVER) — for design-core
115
+ * `withSignatureMove`. ONE reading for the wizard's start (`presetDesign`) and every compose of a plan
116
+ * (`businessComposeContext`). An unknown type, or one the contract gives no move: no moves (the look stays as it starts).
117
+ */
118
+ export function signatureInputOf(type: Pick<BusinessType, 'ceiling' | 'art' | 'signature'> | string | null | undefined, littleMovement = false): SignatureInput {
119
+ const t = typeof type === 'string' ? businessTypeById(type) : type ?? undefined;
120
+ return {
121
+ moves: t?.signature?.moves ?? [],
122
+ floor: t?.signature?.floor ?? null,
123
+ ceiling: t?.ceiling ?? null,
124
+ preloaderNever: t?.art?.preloader ?? [],
125
+ ...(littleMovement ? { littleMovement } : {}),
126
+ };
127
+ }
@@ -1,7 +1,7 @@
1
1
  import { BuildComposeDecisions, ComposeContext, composeContextOf, GenerationTier, PictureSupply, PicturesRefused } from '@vectoriox/iox-ui/generation-core';
2
2
 
3
3
  import { BusinessType, businessTypeById } from './business-types';
4
- import { isCalmBusinessType } from './motion';
4
+ import { isCalmBusinessType, signatureInputOf } from './motion';
5
5
 
6
6
  /**
7
7
  * What a site build's run holds that its compose context reads — the server's run and the builder's copy of it
@@ -23,11 +23,13 @@ export interface ComposeRun {
23
23
  * own ground and said by `checkHeader` (`type-never`);
24
24
  * - `opening` — pictures first: the Home opening the kind of business takes when its plan names none (harness
25
25
  * OPENING_PICTURE), given only when a picture can come (`pictureCanCome`).
26
+ * - `signature` — motion reach (MR-D1): the moves its site signs with (harness SIGNATURE_MOVES), the Still floor, its
27
+ * ceiling and the preloaders it refuses — design-core `withSignatureMove` signs the look (none under little movement).
26
28
  * An unknown or absent type gives nothing: the composer's defaults hold. (`calm` stays `composeContextOf`'s own argument.)
27
29
  */
28
30
  export function businessComposeContext(
29
- typeId: string | null | undefined, decisions?: Pick<BuildComposeDecisions, 'picturesRefused' | 'ownPhotos' | 'layoutPhotos'> | null,
30
- ): Pick<ComposeContext, 'businessType' | 'footerNever' | 'headerNever' | 'opening'> {
31
+ typeId: string | null | undefined, decisions?: Pick<BuildComposeDecisions, 'picturesRefused' | 'ownPhotos' | 'layoutPhotos' | 'littleMovement'> | null,
32
+ ): Pick<ComposeContext, 'businessType' | 'footerNever' | 'headerNever' | 'opening' | 'signature' | 'footerSignUp'> {
31
33
  const type = typeId ? businessTypeById(typeId) : undefined;
32
34
  if (!type) return {};
33
35
  const never = type.footer;
@@ -37,6 +39,10 @@ export function businessComposeContext(
37
39
  businessType: type.id, ...(refuses ? { footerNever: never } : {}),
38
40
  ...(header && header.grounds.length > 0 ? { headerNever: header } : {}),
39
41
  ...(type.opening?.length && pictureCanCome(type, decisions) ? { opening: [...type.opening] } : {}),
42
+ // Motion reach (MR-D1): the signature move its site signs with (none under little movement).
43
+ ...(type.signature?.moves.length ? { signature: signatureInputOf(type, !!decisions?.littleMovement) } : {}),
44
+ // AW12 newsletter: its references close with a sign-up (the composer still asks for a reason to write).
45
+ ...(type.signUp ? { footerSignUp: true } : {}),
40
46
  };
41
47
  }
42
48
 
@@ -1,6 +1,7 @@
1
- import { DesignChoices, presetChoices, PRELOADER_LEVELS, SCRUB_LEVELS } from '@vectoriox/iox-ui/design-core';
1
+ import { DesignChoices, presetChoices, PRELOADER_LEVELS, SCRUB_LEVELS, withSignatureMove } from '@vectoriox/iox-ui/design-core';
2
2
 
3
- import { motionFor, MotionInput } from './motion';
3
+ import { businessTypeById } from './business-types';
4
+ import { motionFor, MotionInput, signatureInputOf } from './motion';
4
5
  import { PresetFit, RankedPreset, RankInput, rankWithReferences, StyleRead } from './rank';
5
6
  import { referenceSeed } from './reference-colour';
6
7
 
@@ -16,8 +17,10 @@ import { referenceSeed } from './reference-colour';
16
17
  * A preset for this business: its choices, Motion from the business (`motionFor`), the references' colour as its seed
17
18
  * when that colour passes AA in every mode the preset offers (`referenceSeed` — judged as used), and what the owner
18
19
  * already set kept. The ONE rule for a Look pick and for Build with these. The style's first-visit preloader (AW5) is kept
19
- * only while the start is Lively or Expressive (PL-D6) — a calm business (its ceiling below Standard) or "little
20
- * movement" never opens with one. Its By the scroll (AW10) likewise, only on a Lively or Expressive start (AW10-D7).
20
+ * on a start that moves (MR-D2 — `PRELOADER_LEVELS`) unless the kind of business's art direction refuses it (ART_NEVER: a
21
+ * calm business never opens with one) or the owner asked for little movement (PL-D6); its By the scroll (AW10) on a start
22
+ * that moves (MR-D3 — `SCRUB_LEVELS`), never under little movement. Then the kind of business signs it (MR-D1,
23
+ * `withSignatureMove`) — the same rule every compose of the plan applies — and what the owner set is kept over all of it.
21
24
  */
22
25
  export function presetDesign(
23
26
  presetId: string,
@@ -31,9 +34,14 @@ export function presetDesign(
31
34
  const start = motionFor(motionInput, presetId, read);
32
35
  const seed = referenceSeed(read, presetId);
33
36
  const { preloader, scrub, ...rest } = base;
34
- const opens = preloader && PRELOADER_LEVELS.includes(start.animate) ? { preloader } : {};
35
- const scrubs = scrub && SCRUB_LEVELS.includes(start.animate) ? { scrub } : {};
36
- return { ...rest, ...opens, ...scrubs, ...(seed?.used ? { seed: seed.seed } : {}), scroll: start.scroll, animate: start.animate, between: start.between, ...kept };
37
+ const little = start.basis.littleMovement;
38
+ const refused = businessTypeById(motionInput.businessType)?.art?.preloader ?? [];
39
+ const opens = preloader && !little && !refused.includes(preloader) && PRELOADER_LEVELS.includes(start.animate) ? { preloader } : {};
40
+ const scrubs = scrub && !little && SCRUB_LEVELS.includes(start.animate) ? { scrub } : {};
41
+ const started: DesignChoices = { ...rest, ...opens, ...scrubs, ...(seed?.used ? { seed: seed.seed } : {}), scroll: start.scroll, animate: start.animate, between: start.between };
42
+ // The owner's own choices are signed WITH the start (a move they turned off, `none` / `never`, stays off — D12) and
43
+ // kept over it (their How animated is never lifted).
44
+ return { ...withSignatureMove({ ...started, ...kept }, signatureInputOf(motionInput.businessType, little)).design, ...kept };
37
45
  }
38
46
 
39
47
  export interface StartingDesign {
@@ -128,6 +128,16 @@ iox-gallery.iox-es-media[data-iox-empty] > .iox-gallery {
128
128
  z-index: 1;
129
129
  }
130
130
 
131
+ /* A row's card with no picture (vectoriox/iox-ui#191, the #129 rule decided per item): a card repeated from content keeps
132
+ its picture part, bound, and draws without it wherever its OWN item has none — so the owner's product photos, saved after
133
+ the build, show the moment the page renders, and an item with none is the type-led card, never an empty box. A row is
134
+ whatever carries `data-iox-row-idx` (a Repeater's or a bound Slider's, in the builder and both engine paths); the empty
135
+ picture is the marked Image's `data-iox-empty` (DS3). Only the FIRST image counts: a swap's second picture may be
136
+ missing while the first shows. A card that is not a row keeps its empty box — the author fills it. */
137
+ [data-iox-row-idx] .iox-role-card-media:has(> img[data-iox-empty]:first-child) {
138
+ display: none;
139
+ }
140
+
131
141
  /* LI1 (list-ingredients-plan.md): a card's Quote is someone's words — in the page language's own marks (`quotes`
132
142
  follows `lang`: “…” in English, „…“ in German), never marks typed into the words a list field holds. */
133
143
  .iox-role-card-quote::before { content: open-quote; }
@@ -69,6 +69,59 @@
69
69
  .iox-field__error { margin: 4px 0 0; }
70
70
  .iox-submit { font: inherit; border: none; cursor: pointer; }
71
71
 
72
+ /* ── The sign-up row (AW12 follow-up): a newsletter form — the forms-core `newsletter` preset, whose form id both stampers
73
+ write as `newsletter-<…>` (the composer's `stampPresetForm`, the tray's `buildFormPreset`) — lays its email box and its
74
+ button side by side on a laptop, the way 8pm / Vonder / Atticus Finch sign up. The preset puts the consent tick FIRST,
75
+ so every part is drawn in the DOM's order and the keyboard meets them as the eye does (WCAG 2.4.3): the tick, then the
76
+ row, then the legal line and the answer blocks. Nothing here sets `order`.
77
+ It STACKS on a phone, and in any column narrower than about 28ch: the email box and the button share the "albatross"
78
+ basis `(28ch - 100%) * 999` — negative (so 0, and they share the row) when the form is wider than 28ch, enormous (so
79
+ each takes a whole row) when it is narrower. No query on the form's own width is needed, so the footer column, the
80
+ popup and the builder's frame all get it from the one rule. Only an email box straight before the button makes the
81
+ row — a form saved in another order simply stacks.
82
+ The row is aligned to its TOP and the button drops by the email label's line (the label's size × 1.5, the line height
83
+ the label is given here), so its top meets the email box's and an error under the box never moves it.
84
+ The drop is the same albatross in reverse: the full line on the row, 0 when stacked; a hidden label drops nothing. A
85
+ Field wearing the look reads its label size from the spec (`field-label-size`, under the `.iox-es-field` marker); a
86
+ legacy Field's label inherits the form's size, as the button does (`1.5em`) — no unmarked rule reads a token (D5).
87
+ Flex follows the writing direction, so a Hebrew form mirrors with no rule of its own. Out-specifies `.iox-node-{id}`
88
+ (0,2,0 vs 0,1,0) — the row is the preset's, its gap stays the node's own. */
89
+ .iox-form[data-iox-form^="newsletter-"] {
90
+ flex-flow: row wrap;
91
+ align-items: flex-start;
92
+ }
93
+ .iox-form[data-iox-form^="newsletter-"] > * {
94
+ flex: 1 1 100%;
95
+ min-inline-size: 0;
96
+ }
97
+ .iox-form[data-iox-form^="newsletter-"] > .iox-field:has(input[type="email"]):has(+ .iox-submit) {
98
+ flex: 1 1 calc((28ch - 100%) * 999);
99
+ }
100
+ .iox-form[data-iox-form^="newsletter-"] > .iox-field:has(input[type="email"]) > .iox-field__label {
101
+ line-height: 1.5;
102
+ }
103
+ .iox-form[data-iox-form^="newsletter-"] > .iox-field:has(input[type="email"]) + .iox-submit {
104
+ flex: 0 1 calc((28ch - 100%) * 999);
105
+ min-inline-size: auto;
106
+ white-space: nowrap;
107
+ margin-block-start: clamp(0px, (100% - 28ch) * 999, 1.5em);
108
+ }
109
+ .iox-form[data-iox-form^="newsletter-"] > .iox-es-field:has(input[type="email"]) + .iox-submit {
110
+ margin-block-start: clamp(0px, (100% - 28ch) * 999, var(--iox-field-label-size) * 1.5);
111
+ }
112
+ .iox-form[data-iox-form^="newsletter-"] > .iox-field:has(input[type="email"]):has(> .iox-field__label--hidden) + .iox-submit {
113
+ margin-block-start: 0;
114
+ }
115
+ /* On a phone, every part is a row of its own (the engine by the screen, the builder's frame by the canvas). */
116
+ @media (max-width: 767px) {
117
+ .iox-form[data-iox-form^="newsletter-"] > .iox-field:has(input[type="email"]):has(+ .iox-submit),
118
+ .iox-form[data-iox-form^="newsletter-"] > .iox-field:has(input[type="email"]) + .iox-submit { flex: 1 1 100%; margin-block-start: 0; }
119
+ }
120
+ @container iox-canvas (max-width: 767px) {
121
+ .iox-form[data-iox-form^="newsletter-"] > .iox-field:has(input[type="email"]):has(+ .iox-submit),
122
+ .iox-form[data-iox-form^="newsletter-"] > .iox-field:has(input[type="email"]) + .iox-submit { flex: 1 1 100%; margin-block-start: 0; }
123
+ }
124
+
72
125
  /* ── Choices (premium N1): a fieldset whose legend is the label; chips or the look's radio / checkbox rows ── */
73
126
  .iox-field__choices { border: 0; margin: 0; padding: 0; min-inline-size: 0; }
74
127
  .iox-field__choices > legend { padding: 0; }