@vectoriox/iox-ui 5.201.0 → 5.202.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.
- package/design-core/index.d.ts +162 -5
- package/fesm2022/vectoriox-iox-ui-design-core.mjs +216 -12
- package/fesm2022/vectoriox-iox-ui-design-core.mjs.map +1 -1
- package/fesm2022/vectoriox-iox-ui-generation-core.mjs +2665 -1299
- package/fesm2022/vectoriox-iox-ui-generation-core.mjs.map +1 -1
- package/fesm2022/vectoriox-iox-ui-harness-core.mjs +28 -12
- package/fesm2022/vectoriox-iox-ui-harness-core.mjs.map +1 -1
- package/fesm2022/vectoriox-iox-ui.mjs +85 -1
- package/fesm2022/vectoriox-iox-ui.mjs.map +1 -1
- package/generation-core/index.d.ts +968 -263
- package/harness-core/index.d.ts +21 -13
- package/index.d.ts +50 -2
- package/package.json +1 -1
- package/src/design-core/brand-neutrals.ts +50 -7
- package/src/design-core/colour-words.ts +22 -5
- package/src/design-core/design-settings.ts +5 -0
- package/src/design-core/design-token.model.ts +3 -0
- package/src/design-core/flavor-fixtures.generated.ts +38 -2
- package/src/design-core/flavor-spec.generated.ts +143 -1
- package/src/design-core/flavor-tokens.ts +6 -2
- package/src/generation-core/check-free.ts +36 -16
- package/src/generation-core/colour-mix.ts +70 -14
- package/src/generation-core/compose-site.ts +139 -27
- package/src/generation-core/fallback-memory.ts +8 -5
- package/src/generation-core/footer-free.ts +439 -0
- package/src/generation-core/footer-mix.ts +130 -36
- package/src/generation-core/free-parts.ts +3 -0
- package/src/generation-core/free-slot-words.ts +3 -0
- package/src/generation-core/free-wire.ts +10 -2
- package/src/generation-core/layout-fingerprint.ts +6 -4
- package/src/generation-core/opening-mix.ts +61 -0
- package/src/generation-core/plan-wire.ts +1 -0
- package/src/generation-core/public-api.ts +1 -0
- package/src/generation-core/redesign-run.ts +45 -2
- package/src/generation-core/site-plan.model.ts +6 -0
- package/src/generation-core/site-spec.generated.ts +599 -22
- package/src/generation-core/validate-site-plan.ts +39 -1
- package/src/harness-core/business-types.ts +3 -1
- package/src/harness-core/harness-spec.generated.ts +24 -12
- package/src/harness-core/run-compose-context.ts +8 -1
- package/styles/iox-design.css +7 -4
|
@@ -24,7 +24,8 @@ import { colourMixFromWords } from './colour-mix';
|
|
|
24
24
|
import { popupMixFromWords } from './popup-plan';
|
|
25
25
|
import { patternListGap } from './recipe-fields';
|
|
26
26
|
import { freeSlotIssues } from './check-free';
|
|
27
|
-
import { FREE_ELEMENT_STYLES, FREE_HOLDERS, FREE_MOVES, FREE_WORD_TYPES, FreeLayer, FreeNode, FreeNodeType, FreeTrigger } from './free-wire';
|
|
27
|
+
import { FREE_ELEMENT_STYLES, FREE_HOLDERS, FREE_MOVES, FREE_WORD_TYPES, FreeLayer, FreeNode, FreeNodeType, FreePurpose, FreeTrigger } from './free-wire';
|
|
28
|
+
import { FreeFooterPart } from './footer-free';
|
|
28
29
|
import { SPEC_SITE_LAYOUT, SPEC_SITE_PLAN_SHAPE } from './site-spec.generated';
|
|
29
30
|
import {
|
|
30
31
|
isNonEmptyString, isPlainObject as isObject, PathIssue, PathIssueCollector, pathAt as at, PlainObject as Obj, requiredShapeKeys, ShapeEntry, shapeKeys,
|
|
@@ -847,9 +848,46 @@ export function validateSitePlan(plan: unknown, ctx: SitePlanContext = {}): Site
|
|
|
847
848
|
validateDirection(c, plan['direction']);
|
|
848
849
|
validateComposed(c, c.array(plan, 'pages', ''), ctx.tier);
|
|
849
850
|
validateFree(c, c.array(plan, 'pages', ''), sources);
|
|
851
|
+
validateFreeFooter(c, plan['freeFooter']);
|
|
850
852
|
return { valid: c.issues.length === 0, issues: c.issues };
|
|
851
853
|
}
|
|
852
854
|
|
|
855
|
+
/**
|
|
856
|
+
* FV2: the free footer is what the stamp (`expandFreeFooter`) can make as written — ONE Section `purpose: footer`, Containers
|
|
857
|
+
* and Slots only, each Slot a footer part (`footer:<part>`), ids unique, a style its type has a control for. Which parts
|
|
858
|
+
* this site may place, the facts, the phone and the ten hard rules are `checkFreeFooter`'s.
|
|
859
|
+
*/
|
|
860
|
+
function validateFreeFooter(c: Collector, footer: unknown): void {
|
|
861
|
+
if (footer === undefined) return;
|
|
862
|
+
const path = 'freeFooter';
|
|
863
|
+
if (!isObject(footer)) return c.add(SitePlanIssueCode.Shape, path, 'must be an object');
|
|
864
|
+
if (footer['type'] !== FreeNodeType.Section || footer['purpose'] !== FreePurpose.Footer) c.add(SitePlanIssueCode.Free, path, 'the free footer is ONE Section with purpose "footer"');
|
|
865
|
+
const used = new Set<string>();
|
|
866
|
+
const node = (raw: unknown, p: string, top: boolean) => {
|
|
867
|
+
if (!isObject(raw)) return c.add(SitePlanIssueCode.Shape, p, 'must be an object');
|
|
868
|
+
c.keys(raw, FREE_NODE_KEYS, p);
|
|
869
|
+
const id = c.string(raw, 'id', p);
|
|
870
|
+
if (id && used.has(id)) c.add(SitePlanIssueCode.Duplicate, `${p}.id`, `the id "${id}" is used twice`);
|
|
871
|
+
if (id) used.add(id);
|
|
872
|
+
const type = raw['type'];
|
|
873
|
+
if (!top && type !== FreeNodeType.Container && type !== FreeNodeType.Slot) c.add(SitePlanIssueCode.Free, `${p}.type`, 'a free footer holds Containers and footer parts only (FV-D4)');
|
|
874
|
+
if (type === FreeNodeType.Slot) {
|
|
875
|
+
const slot = freeSlotOf(String(raw['slot'] ?? ''));
|
|
876
|
+
if (slot?.kind !== FreeSlotKind.Footer || !(Object.values(FreeFooterPart) as string[]).includes(slot.ref)) c.add(SitePlanIssueCode.Free, `${p}.slot`, `footer:<${Object.values(FreeFooterPart).join(' | ')}>`);
|
|
877
|
+
}
|
|
878
|
+
if (!isObject(raw['styleProps'])) c.add(SitePlanIssueCode.Shape, `${p}.styleProps`, 'must be an object');
|
|
879
|
+
const responsive = raw['responsive'];
|
|
880
|
+
if (responsive !== undefined && (!isObject(responsive) || Object.keys(responsive).some(bp => !(Object.values(FreeLayer) as string[]).includes(bp)))) c.add(SitePlanIssueCode.Free, `${p}.responsive`, `a width is ${Object.values(FreeLayer).join(' or ')}`);
|
|
881
|
+
if (type === FreeNodeType.Section || type === FreeNodeType.Container || type === FreeNodeType.Slot) for (const i of freeSlotIssues(raw as unknown as FreeNode, p)) c.add(SitePlanIssueCode.Free, i.path, i.message);
|
|
882
|
+
const children = raw['children'];
|
|
883
|
+
if (children === undefined) return;
|
|
884
|
+
if (!Array.isArray(children)) return c.add(SitePlanIssueCode.Shape, `${p}.children`, 'must be an array');
|
|
885
|
+
if (children.length && type === FreeNodeType.Slot) c.add(SitePlanIssueCode.Free, `${p}.children`, 'a Slot holds no children');
|
|
886
|
+
children.forEach((child, k) => node(child, `${p}.children[${k}]`, false));
|
|
887
|
+
};
|
|
888
|
+
node(footer, path, true);
|
|
889
|
+
}
|
|
890
|
+
|
|
853
891
|
/** M8 gate 2: the direction is whole — three sentences and up to three rules — or absent. */
|
|
854
892
|
function validateDirection(c: Collector, direction: unknown): void {
|
|
855
893
|
if (direction === undefined) return;
|
|
@@ -183,7 +183,9 @@ export interface BusinessType {
|
|
|
183
183
|
readonly match: ReadonlyArray<string>;
|
|
184
184
|
/** The styles that suit it, best first, each with why. */
|
|
185
185
|
readonly good: ReadonlyArray<GoodFit>;
|
|
186
|
-
|
|
186
|
+
/** Colour v2 CV2: its mood and swatches, and (H1) the colour words its site NEVER wears (`<ingredient>.<word>`, harness
|
|
187
|
+
* `COLOUR_NEVER`) with the sentences saying why — told to the model and mended at build (`checkColour`, CV5). */
|
|
188
|
+
readonly colour: { readonly mood: string; readonly swatches: ReadonlyArray<string>; readonly never?: ReadonlyArray<string>; readonly say?: ReadonlyArray<string>; readonly sayHe?: ReadonlyArray<string> };
|
|
187
189
|
readonly fonts: string;
|
|
188
190
|
readonly tone: string;
|
|
189
191
|
/** The motion TIMING it suits (the design axis — hover lift, durations). */
|
|
@@ -2222,13 +2222,16 @@ export const SPEC_BUSINESS_TYPES = [
|
|
|
2222
2222
|
"never": [
|
|
2223
2223
|
"accent.flood",
|
|
2224
2224
|
"rhythm.flood",
|
|
2225
|
-
"rhythm.alternate"
|
|
2225
|
+
"rhythm.alternate",
|
|
2226
|
+
"rhythm.flow"
|
|
2226
2227
|
],
|
|
2227
2228
|
"say": [
|
|
2228
|
-
"People who come for care or advice need calm: no section after section in full colours, no grounds flipping dark and light."
|
|
2229
|
+
"People who come for care or advice need calm: no section after section in full colours, no grounds flipping dark and light.",
|
|
2230
|
+
"People who come for care or advice read in a still room: the page's ground never changes colour under them as they scroll."
|
|
2229
2231
|
],
|
|
2230
2232
|
"sayHe": [
|
|
2231
|
-
"מי שמגיע לטיפול או לייעוץ צריך שקט: בלי אזור אחרי אזור בצבעים מלאים, בלי רקעים שמתחלפים כהה ובהיר."
|
|
2233
|
+
"מי שמגיע לטיפול או לייעוץ צריך שקט: בלי אזור אחרי אזור בצבעים מלאים, בלי רקעים שמתחלפים כהה ובהיר.",
|
|
2234
|
+
"מי שמגיע לטיפול או לייעוץ קורא בחדר שקט: רקע הדף לא משנה את צבעו מתחתיו בזמן הגלילה."
|
|
2232
2235
|
]
|
|
2233
2236
|
},
|
|
2234
2237
|
"fonts": "calming, readable",
|
|
@@ -2453,13 +2456,16 @@ export const SPEC_BUSINESS_TYPES = [
|
|
|
2453
2456
|
"never": [
|
|
2454
2457
|
"accent.flood",
|
|
2455
2458
|
"rhythm.flood",
|
|
2456
|
-
"rhythm.alternate"
|
|
2459
|
+
"rhythm.alternate",
|
|
2460
|
+
"rhythm.flow"
|
|
2457
2461
|
],
|
|
2458
2462
|
"say": [
|
|
2459
|
-
"People who come for care or advice need calm: no section after section in full colours, no grounds flipping dark and light."
|
|
2463
|
+
"People who come for care or advice need calm: no section after section in full colours, no grounds flipping dark and light.",
|
|
2464
|
+
"People who come for care or advice read in a still room: the page's ground never changes colour under them as they scroll."
|
|
2460
2465
|
],
|
|
2461
2466
|
"sayHe": [
|
|
2462
|
-
"מי שמגיע לטיפול או לייעוץ צריך שקט: בלי אזור אחרי אזור בצבעים מלאים, בלי רקעים שמתחלפים כהה ובהיר."
|
|
2467
|
+
"מי שמגיע לטיפול או לייעוץ צריך שקט: בלי אזור אחרי אזור בצבעים מלאים, בלי רקעים שמתחלפים כהה ובהיר.",
|
|
2468
|
+
"מי שמגיע לטיפול או לייעוץ קורא בחדר שקט: רקע הדף לא משנה את צבעו מתחתיו בזמן הגלילה."
|
|
2463
2469
|
]
|
|
2464
2470
|
},
|
|
2465
2471
|
"fonts": "professional, readable",
|
|
@@ -2680,13 +2686,16 @@ export const SPEC_BUSINESS_TYPES = [
|
|
|
2680
2686
|
"never": [
|
|
2681
2687
|
"accent.flood",
|
|
2682
2688
|
"rhythm.flood",
|
|
2683
|
-
"rhythm.alternate"
|
|
2689
|
+
"rhythm.alternate",
|
|
2690
|
+
"rhythm.flow"
|
|
2684
2691
|
],
|
|
2685
2692
|
"say": [
|
|
2686
|
-
"People who come for care or advice need calm: no section after section in full colours, no grounds flipping dark and light."
|
|
2693
|
+
"People who come for care or advice need calm: no section after section in full colours, no grounds flipping dark and light.",
|
|
2694
|
+
"People who come for care or advice read in a still room: the page's ground never changes colour under them as they scroll."
|
|
2687
2695
|
],
|
|
2688
2696
|
"sayHe": [
|
|
2689
|
-
"מי שמגיע לטיפול או לייעוץ צריך שקט: בלי אזור אחרי אזור בצבעים מלאים, בלי רקעים שמתחלפים כהה ובהיר."
|
|
2697
|
+
"מי שמגיע לטיפול או לייעוץ צריך שקט: בלי אזור אחרי אזור בצבעים מלאים, בלי רקעים שמתחלפים כהה ובהיר.",
|
|
2698
|
+
"מי שמגיע לטיפול או לייעוץ קורא בחדר שקט: רקע הדף לא משנה את צבעו מתחתיו בזמן הגלילה."
|
|
2690
2699
|
]
|
|
2691
2700
|
},
|
|
2692
2701
|
"fonts": "friendly, professional",
|
|
@@ -4463,13 +4472,16 @@ export const SPEC_BUSINESS_TYPES = [
|
|
|
4463
4472
|
"never": [
|
|
4464
4473
|
"accent.flood",
|
|
4465
4474
|
"rhythm.flood",
|
|
4466
|
-
"rhythm.alternate"
|
|
4475
|
+
"rhythm.alternate",
|
|
4476
|
+
"rhythm.flow"
|
|
4467
4477
|
],
|
|
4468
4478
|
"say": [
|
|
4469
|
-
"People who come for care or advice need calm: no section after section in full colours, no grounds flipping dark and light."
|
|
4479
|
+
"People who come for care or advice need calm: no section after section in full colours, no grounds flipping dark and light.",
|
|
4480
|
+
"People who come for care or advice read in a still room: the page's ground never changes colour under them as they scroll."
|
|
4470
4481
|
],
|
|
4471
4482
|
"sayHe": [
|
|
4472
|
-
"מי שמגיע לטיפול או לייעוץ צריך שקט: בלי אזור אחרי אזור בצבעים מלאים, בלי רקעים שמתחלפים כהה ובהיר."
|
|
4483
|
+
"מי שמגיע לטיפול או לייעוץ צריך שקט: בלי אזור אחרי אזור בצבעים מלאים, בלי רקעים שמתחלפים כהה ובהיר.",
|
|
4484
|
+
"מי שמגיע לטיפול או לייעוץ קורא בחדר שקט: רקע הדף לא משנה את צבעו מתחתיו בזמן הגלילה."
|
|
4473
4485
|
]
|
|
4474
4486
|
},
|
|
4475
4487
|
"fonts": "professional, authoritative",
|
|
@@ -12,6 +12,9 @@ export interface ComposeRun {
|
|
|
12
12
|
tier?: `${GenerationTier}` | null;
|
|
13
13
|
decisions?: BuildComposeDecisions | null;
|
|
14
14
|
pictures?: PictureSupply | null;
|
|
15
|
+
/** iox-ui#192: the organization the site is built for — seeds the choices a site makes for itself (the way its picture
|
|
16
|
+
* Home opens). iox-cms passes the run's organization. */
|
|
17
|
+
seed?: string | null;
|
|
15
18
|
}
|
|
16
19
|
|
|
17
20
|
/**
|
|
@@ -29,7 +32,7 @@ export interface ComposeRun {
|
|
|
29
32
|
*/
|
|
30
33
|
export function businessComposeContext(
|
|
31
34
|
typeId: string | null | undefined, decisions?: Pick<BuildComposeDecisions, 'picturesRefused' | 'ownPhotos' | 'layoutPhotos' | 'littleMovement'> | null,
|
|
32
|
-
): Pick<ComposeContext, 'businessType' | 'footerNever' | 'headerNever' | 'opening' | 'signature' | 'footerSignUp'> {
|
|
35
|
+
): Pick<ComposeContext, 'businessType' | 'footerNever' | 'headerNever' | 'opening' | 'signature' | 'footerSignUp' | 'colourNever'> {
|
|
33
36
|
const type = typeId ? businessTypeById(typeId) : undefined;
|
|
34
37
|
if (!type) return {};
|
|
35
38
|
const never = type.footer;
|
|
@@ -43,6 +46,8 @@ export function businessComposeContext(
|
|
|
43
46
|
...(type.signature?.moves.length ? { signature: signatureInputOf(type, !!decisions?.littleMovement) } : {}),
|
|
44
47
|
// AW12 newsletter: its references close with a sign-up (the composer still asks for a reason to write).
|
|
45
48
|
...(type.signUp ? { footerSignUp: true } : {}),
|
|
49
|
+
// Colour v2 CV5 (H1): the colour words its site never wears are mended at build, not only told (`checkColour`).
|
|
50
|
+
...(type.colour?.never?.length ? { colourNever: [...type.colour.never] } : {}),
|
|
46
51
|
};
|
|
47
52
|
}
|
|
48
53
|
|
|
@@ -76,6 +81,8 @@ export function runComposeContext(run: ComposeRun): ComposeContext {
|
|
|
76
81
|
...businessComposeContext(decisions?.businessType, decisions),
|
|
77
82
|
// HI3-D5: the preflight judged the words at rest once, on the pixels it held; every step composes with that answer.
|
|
78
83
|
...(typeof decisions?.headerReadable === 'boolean' ? { headerReadable: decisions.headerReadable } : {}),
|
|
84
|
+
// iox-ui#192: the organization seeds the way the Home opens (`chooseOpeningWay`).
|
|
85
|
+
...(run.seed ? { seed: run.seed } : {}),
|
|
79
86
|
};
|
|
80
87
|
return run.pictures ? { ...context, pictures: run.pictures } : context;
|
|
81
88
|
}
|
package/styles/iox-design.css
CHANGED
|
@@ -2882,17 +2882,20 @@ dialog[data-iox-dialog].iox-es.iox-role-shop-cart-drawer:is([data-iox-closing],
|
|
|
2882
2882
|
margin-block-end: calc(-1 * var(--header-h, var(--hdr-h-fallback)));
|
|
2883
2883
|
}
|
|
2884
2884
|
/* …and the opening's words keep clear of it by that height (a transparent edge on the words' box: their own margin and
|
|
2885
|
-
padding — a bottom-set block's `auto` — stay theirs).
|
|
2886
|
-
|
|
2885
|
+
padding — a bottom-set block's `auto` — stay theirs). The line and action a name on the edge sets at the frame's TOP
|
|
2886
|
+
(`aside`) keep the same room (HI3-D27: a Pro header floats there, from y=0). A words panel paints its scrim inside its
|
|
2887
|
+
padding only, so the room above it stays the picture's. */
|
|
2888
|
+
:root:has([data-iox-header-ground]) [data-iox-opening-media="picture"] .iox-role-opening :is(.iox-role-opening-words, .iox-role-opening-aside) {
|
|
2887
2889
|
border-block-start: var(--header-h, 80px) solid transparent;
|
|
2890
|
+
background-clip: padding-box;
|
|
2888
2891
|
}
|
|
2889
2892
|
@media (max-width: 767px) {
|
|
2890
2893
|
[data-iox-header-ground] { --hdr-h-fallback: 64px; }
|
|
2891
|
-
:root:has([data-iox-header-ground]) [data-iox-opening-media="picture"] .iox-role-opening .iox-role-opening-words { border-block-start-width: var(--header-h, 64px); }
|
|
2894
|
+
:root:has([data-iox-header-ground]) [data-iox-opening-media="picture"] .iox-role-opening :is(.iox-role-opening-words, .iox-role-opening-aside) { border-block-start-width: var(--header-h, 64px); }
|
|
2892
2895
|
}
|
|
2893
2896
|
@container iox-canvas (max-width: 767px) {
|
|
2894
2897
|
[data-iox-header-ground] { --hdr-h-fallback: 64px; }
|
|
2895
|
-
:root:has([data-iox-header-ground]) [data-iox-opening-media="picture"] .iox-role-opening .iox-role-opening-words { border-block-start-width: var(--header-h, 64px); }
|
|
2898
|
+
:root:has([data-iox-header-ground]) [data-iox-opening-media="picture"] .iox-role-opening :is(.iox-role-opening-words, .iox-role-opening-aside) { border-block-start-width: var(--header-h, 64px); }
|
|
2896
2899
|
}
|
|
2897
2900
|
/* Emil 195: more contrast — the ground is the page's own, solid, with a defined edge in the ink (a scheme'd bar keeps its
|
|
2898
2901
|
own solid ground). Reduced transparency is the token sheet's (Emil 194): the glass turns into the page's ground and
|