@vectoriox/iox-ui 5.164.1 → 5.166.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 +112 -1
- package/fesm2022/vectoriox-iox-ui-design-core.mjs +133 -5
- package/fesm2022/vectoriox-iox-ui-design-core.mjs.map +1 -1
- package/fesm2022/vectoriox-iox-ui-generation-core.mjs +516 -95
- package/fesm2022/vectoriox-iox-ui-generation-core.mjs.map +1 -1
- package/fesm2022/vectoriox-iox-ui-harness-core.mjs +261 -0
- package/fesm2022/vectoriox-iox-ui-harness-core.mjs.map +1 -1
- package/fesm2022/vectoriox-iox-ui-scene-core.mjs +137 -10
- package/fesm2022/vectoriox-iox-ui-scene-core.mjs.map +1 -1
- package/fesm2022/vectoriox-iox-ui.mjs +25 -5
- package/fesm2022/vectoriox-iox-ui.mjs.map +1 -1
- package/generation-core/index.d.ts +412 -225
- package/harness-core/index.d.ts +192 -1
- package/index.d.ts +5 -1
- package/package.json +1 -1
- package/scene-core/index.d.ts +42 -6
- package/src/design-core/flavor-spec.generated.ts +98 -0
- package/src/design-core/footer-classes.ts +38 -0
- package/src/design-core/node-classes.ts +3 -2
- package/src/design-core/public-api.ts +1 -0
- package/src/generation-core/carry-fill.ts +1 -1
- package/src/generation-core/check-layout.ts +1 -1
- package/src/generation-core/compose-layout.ts +36 -5
- package/src/generation-core/compose-site.ts +34 -6
- package/src/generation-core/footer-mix.ts +292 -34
- package/src/generation-core/node-baselines.generated.ts +14 -1
- package/src/generation-core/patterns.ts +4 -1
- package/src/generation-core/site-spec.generated.ts +173 -45
- package/src/harness-core/business-types.ts +12 -0
- package/src/harness-core/harness-spec.generated.ts +261 -0
- package/src/scene-core/scene.ts +2 -0
- package/src/scene-core/scroll-driver.ts +121 -5
- package/src/scene-core/split-text.ts +17 -4
- 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';
|
|
@@ -16,7 +16,7 @@ import { SerializedNode } from './serialized-node';
|
|
|
16
16
|
export const LAYOUT_OWNED_PROPS: ReadonlySet<string> = new Set(['level']);
|
|
17
17
|
|
|
18
18
|
/** Triggers that are motion — the composer's, in the new look's pace. Every other trigger is what the element does. */
|
|
19
|
-
export const MOTION_TRIGGERS: ReadonlySet<string> = new Set(['viewportEnter', 'scrollProgress', 'pageEnter', 'pageLeave']);
|
|
19
|
+
export const MOTION_TRIGGERS: ReadonlySet<string> = new Set(['viewportEnter', 'scrollProgress', 'pageEnter', 'pageLeave', 'sceneLand']);
|
|
20
20
|
|
|
21
21
|
const triggerOf = (ix: unknown): string => String((ix as { trigger?: unknown } | null)?.trigger ?? '');
|
|
22
22
|
const idOf = (ix: unknown): string => String((ix as { id?: unknown } | null)?.id ?? '');
|
|
@@ -951,7 +951,7 @@ function uniqueIssues(issues: LayoutIssue[]): LayoutIssue[] {
|
|
|
951
951
|
export const LAYOUT_ENTRANCE_MAX_MS = 1200;
|
|
952
952
|
/** The scale an action starts from, where it is not 1 (iox-ui `buildInteractionKeyframes`; held equal by the spec). */
|
|
953
953
|
export const ACTION_START_SCALE: Readonly<Record<string, number>> = { scaleIn: 0.8 };
|
|
954
|
-
const ENTRANCE_TRIGGERS: ReadonlySet<string> = new Set(['viewportEnter', 'pageLoad']);
|
|
954
|
+
const ENTRANCE_TRIGGERS: ReadonlySet<string> = new Set(['viewportEnter', 'pageLoad', 'sceneLand']);
|
|
955
955
|
const EASE_IN = /(^|[\s,(])ease-in(?!-out)/;
|
|
956
956
|
const EASING_TOKEN = /^(cubic-bezier\(|linear(\(|$)|var\(--)/;
|
|
957
957
|
const TRANSITION_ALL = /(^|[\s,])all([\s,]|$)/;
|
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
} from '@vectoriox/iox-ui/composite-core';
|
|
6
6
|
|
|
7
7
|
import { ColorScheme, DesignChoices, LIST_MIX_PROP, LinkType, scrubOfChoices, setColorScheme, SPEC_AXES } from '@vectoriox/iox-ui/design-core';
|
|
8
|
-
import { SCENE_TRACK_EASE, SceneEase, SceneProp, SceneRange, SceneRevealFrom, TextRevealBy } from '@vectoriox/iox-ui/scene-core';
|
|
8
|
+
import { SCENE_LAND_TRIGGER, SCENE_TRACK_EASE, SceneEase, SceneProp, SceneRange, SceneRevealFrom, TextRevealBy } from '@vectoriox/iox-ui/scene-core';
|
|
9
9
|
import { FORM_AFTER_SEND_TRAIT, FormAfterSend, FormPresetId } from '@vectoriox/iox-ui/forms-core';
|
|
10
10
|
import { composeNavHeader, composePresetForm } from './compose-site';
|
|
11
11
|
import { drawnHeaderMix, headerMixOfNavKind } from './header-mix';
|
|
@@ -507,6 +507,35 @@ function onceEnterInteraction(nodeId: string, l: LayoutLayer, ctx: Ctx, path: st
|
|
|
507
507
|
};
|
|
508
508
|
}
|
|
509
509
|
|
|
510
|
+
/** AW10 (award plan "drawers" row, measured): a drawer's heading arrives letter by letter, ~20 ms apart… */
|
|
511
|
+
export const DRAWER_LETTER_MS = 20;
|
|
512
|
+
/** …its words line by line, ~150 ms apart… */
|
|
513
|
+
export const DRAWER_LINE_MS = 150;
|
|
514
|
+
/** …and each of its layers a beat after the one before (the heading first). */
|
|
515
|
+
export const DRAWER_BEAT_MS = 150;
|
|
516
|
+
/** The words that arrive letter by letter: a step's heading (a joined script or a long line falls to words by itself). */
|
|
517
|
+
const DRAWER_LETTER_KINDS: ReadonlySet<string> = new Set([LayoutLayerKind.Heading, LayoutLayerKind.Word]);
|
|
518
|
+
|
|
519
|
+
/**
|
|
520
|
+
* AW10: a drawer's words arrive AS ITS STEP LANDS (`sceneLand`, scene-core `onSceneLand`) — the heading letter by letter,
|
|
521
|
+
* the rest of its words line by line, anything else (a button) rising — never as the section enters, when the step is
|
|
522
|
+
* still waiting off the stage. Transform and opacity only (RT-D3: no blur); under reduced motion the runtimes' ONE floor
|
|
523
|
+
* makes it a fade. The first step, on the stage from the start, arrives as it comes into view.
|
|
524
|
+
*/
|
|
525
|
+
function drawerArrival(nodeId: string, l: LayoutLayer, ctx: Ctx, textual: boolean, order: number): unknown {
|
|
526
|
+
const role = (l.role ?? LayoutRole.Support) as LayoutRole;
|
|
527
|
+
const duration = role === LayoutRole.Lead ? ctx.pace.lead : ctx.pace.support;
|
|
528
|
+
const letters = textual && DRAWER_LETTER_KINDS.has(l.kind);
|
|
529
|
+
const action = textual
|
|
530
|
+
? { type: 'revealText', params: { by: letters ? TextRevealBy.Letter : TextRevealBy.Line, stagger: letters ? DRAWER_LETTER_MS : DRAWER_LINE_MS } }
|
|
531
|
+
: { type: 'moveUp', params: { distance: LAYOUT_RISE[role] ?? LAYOUT_RISE[LayoutRole.Support] } };
|
|
532
|
+
return {
|
|
533
|
+
id: `${nodeId}-enter`,
|
|
534
|
+
trigger: SCENE_LAND_TRIGGER,
|
|
535
|
+
actions: [{ ...action, target: 'self', duration, delay: order * DRAWER_BEAT_MS, easing: ctx.ease, once: true }],
|
|
536
|
+
};
|
|
537
|
+
}
|
|
538
|
+
|
|
510
539
|
/** A picture settling inside its frame as the frame wipes open (`clipReveal` on a photo). */
|
|
511
540
|
function zoomInteraction(nodeId: string, l: LayoutLayer, ctx: Ctx): unknown {
|
|
512
541
|
const role = (l.role ?? LayoutRole.Support) as LayoutRole;
|
|
@@ -608,6 +637,8 @@ interface LayerCtx {
|
|
|
608
637
|
order: number;
|
|
609
638
|
phoneGap: number;
|
|
610
639
|
phoneAlign: string;
|
|
640
|
+
/** A drawer's word: it arrives as its step lands (`drawerArrival`), never by the layout's own entrance. */
|
|
641
|
+
arrivesOnLanding?: boolean;
|
|
611
642
|
}
|
|
612
643
|
|
|
613
644
|
/** The node that sits on the grid: its cell, its stacking, its bleed and its tilt — and on a phone, its place in the stack. */
|
|
@@ -1570,7 +1601,7 @@ function composeLayer(l: LayoutLayer, lc: LayerCtx, ctx: Ctx): SerializedNode {
|
|
|
1570
1601
|
// A list's items arrive on their own (its mix's `arrive`): the frame never enters on top of them.
|
|
1571
1602
|
const itemsArrive = l.kind === LayoutLayerKind.Gallery && !!listOfLayer(l, ctx);
|
|
1572
1603
|
if (!(lc.held && l.kinetic && textual) && !itemsArrive) {
|
|
1573
|
-
const enter = enterInteraction(entering.id, l, ctx, lc.path, textual, 1, lc.si === 0);
|
|
1604
|
+
const enter = lc.arrivesOnLanding ? drawerArrival(entering.id, l, ctx, textual, lc.order) : enterInteraction(entering.id, l, ctx, lc.path, textual, 1, lc.si === 0);
|
|
1574
1605
|
if (enter) entering.interactions = [...entering.interactions, enter];
|
|
1575
1606
|
if (image && !image.sceneTracks?.length && l.enter === LayoutEnter.ClipReveal && l.role !== LayoutRole.Decoration) image.interactions = [...image.interactions, zoomInteraction(image.id, l, ctx)];
|
|
1576
1607
|
}
|
|
@@ -1795,7 +1826,7 @@ const drawerPaint = (scheme: ColorScheme): string => scheme === ColorScheme.Defa
|
|
|
1795
1826
|
* spines — while their grounds deepen through the look's schemes to the brand (`drawerRamp`, AA-gated as schemes are).
|
|
1796
1827
|
* A step is a panel on the stage: its spine (number and heading, decorative — the step's heading is read) and its body
|
|
1797
1828
|
* (the step's layers on the section's grid, still). On a phone it stacks, each spine a label above its step. A step's
|
|
1798
|
-
* words
|
|
1829
|
+
* words arrive AS IT LANDS (AW10, `drawerArrival`): the layout's own entrances on them are replaced and said.
|
|
1799
1830
|
*/
|
|
1800
1831
|
function composeDrawers(s: LayoutSection, si: number, ctx: Ctx): SerializedNode {
|
|
1801
1832
|
const id = `${ctx.p}-s${si}`;
|
|
@@ -1860,12 +1891,12 @@ function composeDrawers(s: LayoutSection, si: number, ctx: Ctx): SerializedNode
|
|
|
1860
1891
|
const phoneAlign = indices.every(li => s.layers[li].align === 'center') ? 'center' : 'start';
|
|
1861
1892
|
body.children = indices.map((li, at) => {
|
|
1862
1893
|
const l = s.layers[li];
|
|
1863
|
-
if (l.enter && l.enter !== LayoutEnter.None) gap(ctx, LayoutGapCode.DrawerWords, `sections[${si}].layers[${li}]`,
|
|
1894
|
+
if (l.enter && l.enter !== LayoutEnter.None) gap(ctx, LayoutGapCode.DrawerWords, `sections[${si}].layers[${li}]`, `arrives as its step lands (the drawers' own entrance), not by ${l.enter}`);
|
|
1864
1895
|
const still: LayoutLayer = { ...l, enter: LayoutEnter.None, motion: undefined, kinetic: undefined, depth: undefined, scrub: undefined };
|
|
1865
1896
|
const prev = at > 0 ? s.layers[indices[at - 1]] : null;
|
|
1866
1897
|
const lc: LayerCtx = {
|
|
1867
1898
|
section: s, si, li, path: `sections[${si}].layers[${li}]`, held: true, track: 1,
|
|
1868
|
-
order: at, phoneGap: phoneGapBefore(prev, l), phoneAlign,
|
|
1899
|
+
order: at, phoneGap: phoneGapBefore(prev, l), phoneAlign, arrivesOnLanding: l.role !== LayoutRole.Decoration,
|
|
1869
1900
|
};
|
|
1870
1901
|
return composeLayer(still, lc, ctx);
|
|
1871
1902
|
});
|
|
@@ -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
|
-
|
|
833
|
-
|
|
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
|
-
|
|
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,
|
|
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
|
-
|
|
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;
|