@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
|
@@ -159,6 +159,9 @@ export enum FooterRole {
|
|
|
159
159
|
Before = 'footer.before',
|
|
160
160
|
/** AW12 newsletter: the sign-up block, the band and the closing — the forms-core `newsletter` preset beside its words. */
|
|
161
161
|
Newsletter = 'footer.newsletter',
|
|
162
|
+
/** FV2 (footer-v2 §4 rule 1): where a free footer placed the legal row — compose-site `legalRow` fills it (never a part:
|
|
163
|
+
* the slot only says where the ONE legal row goes). */
|
|
164
|
+
LegalPlace = 'footer.legal-place',
|
|
162
165
|
}
|
|
163
166
|
|
|
164
167
|
|
|
@@ -181,6 +184,8 @@ export class FooterMixError extends Error {}
|
|
|
181
184
|
const INGREDIENTS = F.ingredients as unknown as Readonly<Record<string, ReadonlyArray<string>>>;
|
|
182
185
|
const MEANINGS = F.meanings as Readonly<Record<string, string>>;
|
|
183
186
|
const MANY: ReadonlyArray<string> = F.many;
|
|
187
|
+
/** Every hold word of the table (a free footer's `holds` hint is filtered to these). */
|
|
188
|
+
const FOOTER_TABLE_HOLDS: ReadonlyArray<string> = F.ingredients.holds as unknown as ReadonlyArray<string>;
|
|
184
189
|
/** A word the product does not draw yet (award-ingredients-plan.md AW0): the phase it waits for and the built word it is
|
|
185
190
|
* drawn as meanwhile (null: drawn without it). */
|
|
186
191
|
export interface FooterWait { phase: string; drawnAs: string | null }
|
|
@@ -212,9 +217,11 @@ const partHolds = (holds: ReadonlyArray<string>): string[] => holds.filter(h =>
|
|
|
212
217
|
|
|
213
218
|
/** The words an ingredient may take — the DRAWN ones, the only ones the wire, the brief and the mender offer
|
|
214
219
|
* (ingredients.md §3.3: offering a waiting word would put its stand-in on every site that asked for it). The legal row
|
|
215
|
-
* is drawn on every footer, so it is never offered as a choice (`FOOTER_ROW_HOLDS`).
|
|
220
|
+
* is drawn on every footer, so it is never offered as a choice (`FOOTER_ROW_HOLDS`); FV2's `arrange.free` is the free
|
|
221
|
+
* request's footer (footer-free.ts), never a mix word. */
|
|
216
222
|
export function footerWords(ingredient: `${FooterIngredient}`): ReadonlyArray<string> {
|
|
217
|
-
return footerTableWords(ingredient).filter(w => !footerWait(ingredient, w) && !(ingredient === FooterIngredient.Holds && FOOTER_ROW_HOLDS.has(w))
|
|
223
|
+
return footerTableWords(ingredient).filter(w => !footerWait(ingredient, w) && !(ingredient === FooterIngredient.Holds && FOOTER_ROW_HOLDS.has(w))
|
|
224
|
+
&& !(ingredient === FooterIngredient.Arrange && w === FooterArrange.Free));
|
|
218
225
|
}
|
|
219
226
|
|
|
220
227
|
/** What a word means, as the brief and the builder say it. */
|
|
@@ -352,10 +359,13 @@ export function footerWordOffered(ingredient: `${FooterIngredient}`, word: strin
|
|
|
352
359
|
/** A footer token in words: `footer:columns/none/inverse` → "columns · none · inverse". */
|
|
353
360
|
export const footerTokenWords = (token: string): string => token.replace(`${FOOTER_TOKEN}:`, '').split('/').join(' · ');
|
|
354
361
|
|
|
355
|
-
/**
|
|
356
|
-
export
|
|
357
|
-
|
|
358
|
-
|
|
362
|
+
/** A reference footer's arrangement in the free footer's flat wire (FV2, FV-D6): its nodes, a key not written empty. */
|
|
363
|
+
export type FooterReferenceLayout = ReadonlyArray<Readonly<Record<string, unknown>>>;
|
|
364
|
+
|
|
365
|
+
/** Doron's reference footers, each as a whole mix — and, since FV2, its layout when it has one (footer-free.ts). */
|
|
366
|
+
export function footerReferences(): ReadonlyArray<{ id: string; after: string; added: string; mix: FooterMix; layout?: FooterReferenceLayout }> {
|
|
367
|
+
return (F.references as unknown as ReadonlyArray<{ id: string; after: string; added: string; mix: Partial<FooterMix>; layout?: FooterReferenceLayout }>)
|
|
368
|
+
.map(r => ({ id: r.id, after: r.after, added: r.added, mix: footerMix(r.mix), ...(r.layout ? { layout: r.layout } : {}) }));
|
|
359
369
|
}
|
|
360
370
|
|
|
361
371
|
// ── The check: any mix, judged and mended ──────────────────────────────────────────────────────────────────────────
|
|
@@ -409,6 +419,12 @@ export enum FooterRepairCode {
|
|
|
409
419
|
SignUpTwice = 'sign-up-twice',
|
|
410
420
|
/** AW12 newsletter: the sign-up first on a phone needs a sign-up block — none held: the blocks stack. */
|
|
411
421
|
FirstWithoutSignUp = 'first-without-sign-up',
|
|
422
|
+
/** FV2: `arrange:free` is a footer the model laid on the free request — a mix that names it with no laid footer is drawn
|
|
423
|
+
* as columns. */
|
|
424
|
+
FreeWithoutLayout = 'free-without-layout',
|
|
425
|
+
/** FV2 (FV-D12, R-H-FV3): a free footer that still broke a hard rule after its one repair — the nearest mix footer stands
|
|
426
|
+
* (`footerMixFromFree`), said "Composed for you". */
|
|
427
|
+
ComposedForYou = 'footer-composed-for-you',
|
|
412
428
|
}
|
|
413
429
|
|
|
414
430
|
export interface FooterRepair {
|
|
@@ -447,6 +463,9 @@ export interface FooterContext {
|
|
|
447
463
|
email?: string;
|
|
448
464
|
/** FV1b `holds.social`: the owner's social links as stated (the plan's `business.social`) — none, no social block. */
|
|
449
465
|
social?: ReadonlyArray<string>;
|
|
466
|
+
/** FV2 (rule 3): the owner's facts (the plan's `business.facts`) — given, a free footer's facts block shows only the lines
|
|
467
|
+
* the owner gave (none: the block is left out, said); absent, every line stands as the mix footer's does. */
|
|
468
|
+
facts?: Readonly<Partial<Record<string, string>>>;
|
|
450
469
|
/** The tier the site is built at. Since AW-D42 it mends no word (every tier wears every drawn word); kept so its
|
|
451
470
|
* callers still read. */
|
|
452
471
|
tier?: `${GenerationTier}`;
|
|
@@ -570,6 +589,41 @@ export const footerNameFits = (ctx: FooterContext): boolean => !overflowsPhone(n
|
|
|
570
589
|
const an = (word: string): string => `${/^[aeiou]/.test(word) ? 'an' : 'a'} ${word}`;
|
|
571
590
|
const capital = (said: string): string => said.charAt(0).toUpperCase() + said.slice(1);
|
|
572
591
|
|
|
592
|
+
/**
|
|
593
|
+
* Why a closing cannot stand on this site, and what stands instead — the facts and the phone a closing needs: a statement
|
|
594
|
+
* is the owner's tagline (none, or too many lines on a phone: the call), the call word must stand on two lines at most
|
|
595
|
+
* (the call), the email is the owner's own address fitting a phone (none), the name must stand across a phone (none).
|
|
596
|
+
* Null: it stands. The mix judge (`checkFooter`) and the free footer (`footerPartNode`) ask this ONE rule. Pure.
|
|
597
|
+
*/
|
|
598
|
+
export function footerClosingRefusal(closing: string, ctx: FooterContext): { repair: FooterRepair; instead: string } | null {
|
|
599
|
+
const no = (code: FooterRepairCode, said: string, instead: string) => ({ repair: { code, said }, instead });
|
|
600
|
+
switch (closing) {
|
|
601
|
+
case FooterClosing.Statement: {
|
|
602
|
+
const tagline = ctx.tagline?.trim();
|
|
603
|
+
if (!tagline) return no(FooterRepairCode.StatementWithoutWords, 'a statement is the business\'s own line and it has none yet: the footer closes with a call', FooterClosing.Call);
|
|
604
|
+
if (statementPhoneLines(tagline, ctx) > rule('statementPhoneLines')) {
|
|
605
|
+
return no(FooterRepairCode.StatementTooLong, `"${tagline}" stands more than ${rule('statementPhoneLines')} lines on a phone: the footer closes with a call`, FooterClosing.Call);
|
|
606
|
+
}
|
|
607
|
+
return null;
|
|
608
|
+
}
|
|
609
|
+
case FooterClosing.Word:
|
|
610
|
+
return wordTooWide(footerCallWord(ctx.type, ctx.locale), ctx)
|
|
611
|
+
? no(FooterRepairCode.WordTooLong, `"${footerCallWord(ctx.type, ctx.locale)}" is too wide for a phone even on two lines: the footer closes with a call`, FooterClosing.Call)
|
|
612
|
+
: null;
|
|
613
|
+
case FooterClosing.Email: {
|
|
614
|
+
// FV1 (rule 3, footer-v2 §4): the address is the owner's fact, never made up and never a placeholder.
|
|
615
|
+
const email = ctx.email?.trim();
|
|
616
|
+
if (!email) return no(FooterRepairCode.EmailWithoutAddress, 'the email closing is the owner\'s own address and none was given: no closing', FooterClosing.None);
|
|
617
|
+
if (overflowsPhone(widthEm(email, ctx, 'link-display'), ctx)) return no(FooterRepairCode.EmailTooLong, `"${email}" does not fit a phone even at the smallest size: no closing`, FooterClosing.None);
|
|
618
|
+
return null;
|
|
619
|
+
}
|
|
620
|
+
case FooterClosing.Name:
|
|
621
|
+
return footerNameFits(ctx) ? null : no(FooterRepairCode.NameTooLong, `"${ctx.name}" is too long to stand across a phone: the footer closes with nothing`, FooterClosing.None);
|
|
622
|
+
default:
|
|
623
|
+
return null;
|
|
624
|
+
}
|
|
625
|
+
}
|
|
626
|
+
|
|
573
627
|
/**
|
|
574
628
|
* The ONE judge of a footer mix: what the table's rules refuse is mended to the nearest mix that keeps them, and each mend
|
|
575
629
|
* is said. Never throws on a well-formed mix. Pure.
|
|
@@ -596,40 +650,20 @@ export function checkFooter(given: FooterMix, ctx: FooterContext): { mix: Footer
|
|
|
596
650
|
say(FooterRepairCode.TypeNever, `this kind of business never stands its footer on ${an(ground)}: the dark band${why}`);
|
|
597
651
|
ground = FooterGround.Inverse;
|
|
598
652
|
}
|
|
653
|
+
if (arrange === FooterArrange.Free) {
|
|
654
|
+
say(FooterRepairCode.FreeWithoutLayout, 'a footer laid freely needs its layout and this one has none: drawn as columns');
|
|
655
|
+
arrange = FooterArrange.Columns;
|
|
656
|
+
}
|
|
599
657
|
if (arrange === FooterArrange.Line) {
|
|
600
658
|
const kept = holds.filter(h => (F.rules.lineHolds as ReadonlyArray<string>).includes(h) || BOTTOM_HOLDS.has(h));
|
|
601
659
|
const left = holds.filter(h => !kept.includes(h));
|
|
602
660
|
if (left.length) say(FooterRepairCode.LineHolds, `a one-line footer holds only ${F.rules.lineHolds.join(' and ')}: ${left.join(' and ')} left out`);
|
|
603
661
|
holds = kept;
|
|
604
662
|
}
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
closing = FooterClosing.Call;
|
|
610
|
-
} else if (statementPhoneLines(tagline, ctx) > rule('statementPhoneLines')) {
|
|
611
|
-
say(FooterRepairCode.StatementTooLong, `"${tagline}" stands more than ${rule('statementPhoneLines')} lines on a phone: the footer closes with a call`);
|
|
612
|
-
closing = FooterClosing.Call;
|
|
613
|
-
}
|
|
614
|
-
}
|
|
615
|
-
if (closing === FooterClosing.Word && wordTooWide(footerCallWord(ctx.type, ctx.locale), ctx)) {
|
|
616
|
-
say(FooterRepairCode.WordTooLong, `"${footerCallWord(ctx.type, ctx.locale)}" is too wide for a phone even on two lines: the footer closes with a call`);
|
|
617
|
-
closing = FooterClosing.Call;
|
|
618
|
-
}
|
|
619
|
-
if (closing === FooterClosing.Email) {
|
|
620
|
-
// FV1 (rule 3, footer-v2 §4): the address is the owner's fact, never made up and never a placeholder.
|
|
621
|
-
const email = ctx.email?.trim();
|
|
622
|
-
if (!email) {
|
|
623
|
-
say(FooterRepairCode.EmailWithoutAddress, 'the email closing is the owner\'s own address and none was given: no closing');
|
|
624
|
-
closing = FooterClosing.None;
|
|
625
|
-
} else if (overflowsPhone(widthEm(email, ctx, 'link-display'), ctx)) {
|
|
626
|
-
say(FooterRepairCode.EmailTooLong, `"${email}" does not fit a phone even at the smallest size: no closing`);
|
|
627
|
-
closing = FooterClosing.None;
|
|
628
|
-
}
|
|
629
|
-
}
|
|
630
|
-
if (closing === FooterClosing.Name && !footerNameFits(ctx)) {
|
|
631
|
-
say(FooterRepairCode.NameTooLong, `"${ctx.name}" is too long to stand across a phone: the footer closes with nothing`);
|
|
632
|
-
closing = FooterClosing.None;
|
|
663
|
+
const refused = footerClosingRefusal(closing, ctx);
|
|
664
|
+
if (refused) {
|
|
665
|
+
repairs.push(refused.repair);
|
|
666
|
+
closing = refused.instead;
|
|
633
667
|
}
|
|
634
668
|
if (closing === FooterClosing.NameAndAction) {
|
|
635
669
|
const left = holds.filter(h => !END_HOLDS.includes(h));
|
|
@@ -896,7 +930,7 @@ function endOf(mix: FooterMix, ctx: FooterContext): PatternNode[] {
|
|
|
896
930
|
}
|
|
897
931
|
|
|
898
932
|
/** What a ground draws as the footer's scheme (an inset card is the inverse band, shaped — `stampFooterMix`). */
|
|
899
|
-
const
|
|
933
|
+
export const FOOTER_GROUND_SCHEME: Readonly<Record<string, string | null>> = {
|
|
900
934
|
[FooterGround.Inverse]: 'inverse', [FooterGround.Subtle]: 'subtle', [FooterGround.Accent]: 'accent', [FooterGround.Plain]: null,
|
|
901
935
|
[FooterGround.Inset]: 'inverse',
|
|
902
936
|
// FV1: a framed footer stands on the page's own ground, in a ruled box (stampFooterMix + iox-design.css).
|
|
@@ -921,7 +955,7 @@ export function footerPattern(given: FooterMix, ctx: FooterContext): SitePattern
|
|
|
921
955
|
const c = [...(plain ? [part('rule')] : []), ...beforeBlock(mix, ctx), ...before, ...body, ...name];
|
|
922
956
|
// The contract's shell; a Section with one child does not stack it (the patterns' rule, build-spec "more than one child").
|
|
923
957
|
const { lay, ...shell } = part('section');
|
|
924
|
-
const scheme =
|
|
958
|
+
const scheme = FOOTER_GROUND_SCHEME[mix.ground] ?? null;
|
|
925
959
|
const node: PatternNode = { ...shell, ...(c.length > 1 && lay ? { lay } : {}), ...(scheme ? { scheme } : {}), c };
|
|
926
960
|
// A stored footer keeps its own name and intent (the composed root is labelled with it).
|
|
927
961
|
const stored = SITE_PATTERNS[footerPatternIdOf(mix) ?? ''];
|
|
@@ -934,6 +968,66 @@ export function footerPattern(given: FooterMix, ctx: FooterContext): SitePattern
|
|
|
934
968
|
};
|
|
935
969
|
}
|
|
936
970
|
|
|
971
|
+
// ── The parts one by one: what a free footer places (footer-free.ts) ────────────────────────────────────────────────
|
|
972
|
+
|
|
973
|
+
/** A part of the contract's `site.footerParts`, as it is (a fresh copy) — the free footer's shell, the © line. */
|
|
974
|
+
export const footerPart = (id: string): PatternNode => part(id);
|
|
975
|
+
|
|
976
|
+
/** How a free footer asks for one part (footer-free.ts reads the Slot's `opts` into this). */
|
|
977
|
+
export interface FooterPartAsk {
|
|
978
|
+
/** `closing.name`: how the name is worn (absent = plain). */
|
|
979
|
+
nameStyle?: string;
|
|
980
|
+
/** `holds.pages`: as one row of links (the line and centred footers' `pageRow`), not a labelled column. */
|
|
981
|
+
row?: boolean;
|
|
982
|
+
/** Centred through and through (every word node centred — a container's centring never reaches them). */
|
|
983
|
+
centred?: boolean;
|
|
984
|
+
/** The blocks the footer holds beside this one: how to reach the business leaves its city to the visit block. */
|
|
985
|
+
holds?: ReadonlyArray<string>;
|
|
986
|
+
}
|
|
987
|
+
|
|
988
|
+
/** A facts block's lines the owner never gave (rule 3): a `ph` line whose fact is missing, when the facts are given. */
|
|
989
|
+
const missingFact = (n: PatternNode, ctx: FooterContext): boolean => !!ctx.facts && !!n.ph && n.ph !== 'copy' && !String(ctx.facts[n.ph] ?? '').trim();
|
|
990
|
+
|
|
991
|
+
/**
|
|
992
|
+
* FV2 (footer-v2 §4): ONE part of the footer, as THE recipe makes it for the mix footer — the same brand block, columns,
|
|
993
|
+
* closings and facts — for a free footer to place where the model laid it. A part whose fact is missing, or that cannot
|
|
994
|
+
* stand on a phone, is left out with the reason (rule 3: never a placeholder in a live footer); the legal row is never a
|
|
995
|
+
* part (it is compose-site's, placed by `FooterRole.LegalPlace`), so `legal` makes no node. Pure.
|
|
996
|
+
*/
|
|
997
|
+
export function footerPartNode(id: string, ctx: FooterContext, ask: FooterPartAsk = {}): { node: PatternNode | null; leftOut?: FooterRepair } {
|
|
998
|
+
const centre = (node: PatternNode): PatternNode => (ask.centred ? centred(node) : node);
|
|
999
|
+
const out = (code: FooterRepairCode, said: string) => ({ node: null, leftOut: { code, said } });
|
|
1000
|
+
const closing = footerClosingRefusal(id, ctx);
|
|
1001
|
+
if (closing) return { node: null, leftOut: closing.repair };
|
|
1002
|
+
switch (id) {
|
|
1003
|
+
case 'brand': return { node: centre(brandPart(ctx)) };
|
|
1004
|
+
case FooterHold.Pages: return { node: ask.row ? laid(part('pageRow'), ask.centred ? { justifyContent: 'center' } : {}) : centre(part('pages')) };
|
|
1005
|
+
case FooterHold.Contact:
|
|
1006
|
+
case FooterHold.Visit: {
|
|
1007
|
+
const node = holdPart(id, footerMix({ holds: (ask.holds ?? []).filter(h => (FOOTER_TABLE_HOLDS as ReadonlyArray<string>).includes(h)) }), ctx);
|
|
1008
|
+
const kept = { ...node, c: (node.c ?? []).filter(n => !missingFact(n, ctx)) };
|
|
1009
|
+
if (!(kept.c ?? []).some(n => n.ph)) return out(FooterRepairCode.LeftOut, `the ${id} block shows the owner's own ${id === FooterHold.Visit ? 'address and hours' : 'email, phone and city'} and none was given: left out`);
|
|
1010
|
+
return { node: centre(kept) };
|
|
1011
|
+
}
|
|
1012
|
+
case FooterHold.Social:
|
|
1013
|
+
return footerSocialLinks(ctx.social).links.length ? { node: centre(socialPart(ctx)) } : out(FooterRepairCode.SocialWithoutLinks, 'the social block lists the owner\'s own links and none was stated: left out');
|
|
1014
|
+
case FooterHold.Top: return { node: part(FooterHold.Top) };
|
|
1015
|
+
// AW12 newsletter: the sign-up block — only with a reason to write (AW12-D6), else left out, said.
|
|
1016
|
+
case FooterHold.Newsletter:
|
|
1017
|
+
return ctx.writes === false
|
|
1018
|
+
? out(FooterRepairCode.NoReasonToWrite, 'a sign-up asks people to hear from the business, and this site has nothing to write about yet (no journal, events or shop): left out')
|
|
1019
|
+
: { node: centre(part(FooterHold.Newsletter)) };
|
|
1020
|
+
case FooterClosing.Call: return { node: ask.centred ? centred(callPart(ctx)) : callPart(ctx) };
|
|
1021
|
+
case FooterClosing.Name: return { node: closingName(ctx, footerMix({ closing: FooterClosing.Name, ...(ask.nameStyle ? { nameStyle: ask.nameStyle } : {}) })) };
|
|
1022
|
+
case FooterClosing.Statement: return { node: centre(part('statement')) };
|
|
1023
|
+
case FooterClosing.Word: return { node: callWord(ctx) };
|
|
1024
|
+
case FooterClosing.Email: return { node: emailLine(ctx.email!.trim(), ctx) };
|
|
1025
|
+
case FooterBefore.ContactForm: return { node: beforeBlock(footerMix({ before: FooterBefore.ContactForm }), ctx)[0] };
|
|
1026
|
+
case 'copyright': return { node: ask.centred ? laid(part('copyright'), { textAlign: 'center' }) : part('copyright') };
|
|
1027
|
+
default: return { node: null };
|
|
1028
|
+
}
|
|
1029
|
+
}
|
|
1030
|
+
|
|
937
1031
|
/** The margin an inset footer stands at (AW12-D11): a card's padding outside the column, never closer than half the gutter
|
|
938
1032
|
* to the window; its words pad back onto the column (both resolve against the page). */
|
|
939
1033
|
export const FOOTER_INSET_STYLES: Readonly<Record<string, string>> = {
|
|
@@ -7,6 +7,7 @@ import { PatternRecipe } from './patterns';
|
|
|
7
7
|
import { recipeListBinds } from './recipe-fields';
|
|
8
8
|
import { SitePlan } from './site-plan.model';
|
|
9
9
|
import { FREE_OPEN_LIGHTBOX, FREE_SLOT_SEPARATOR, FreeSlotKind, freeSlotWord } from './free-slot-words';
|
|
10
|
+
import { freeFooterPartMeaning } from './footer-free';
|
|
10
11
|
|
|
11
12
|
export * from './free-slot-words';
|
|
12
13
|
|
|
@@ -78,6 +79,8 @@ const SLOT_MEANING: Readonly<Record<FreeSlotKind, (ref: string) => string>> = {
|
|
|
78
79
|
[FreeSlotKind.Accordion]: ref => `the ${ref} list as an accordion — each item a question that opens its answer`,
|
|
79
80
|
[FreeSlotKind.Tabs]: ref => `the ${ref} list as tabs — one item shown at a time`,
|
|
80
81
|
[FreeSlotKind.Quotes]: ref => `the ${ref} list as a testimonial carousel — the owner's real quotes, one at a time`,
|
|
82
|
+
// FV2: a part of the footer, placed only in the free footer section (footer-free.ts).
|
|
83
|
+
[FreeSlotKind.Footer]: ref => `the footer's ${freeFooterPartMeaning(ref)}`,
|
|
81
84
|
};
|
|
82
85
|
|
|
83
86
|
/** One line of the free brief for an offered part: its slot word, what it places, and its options. */
|
|
@@ -9,6 +9,9 @@ export enum FreeSlotKind {
|
|
|
9
9
|
Accordion = 'accordion',
|
|
10
10
|
Tabs = 'tabs',
|
|
11
11
|
Quotes = 'quotes',
|
|
12
|
+
/** FV2 (footer-v2 §4): a part of the site's footer (`footer:brand`, `footer:legal` — where the legal row goes), placed in
|
|
13
|
+
* a free footer only (`footer-free.ts`). */
|
|
14
|
+
Footer = 'footer',
|
|
12
15
|
}
|
|
13
16
|
|
|
14
17
|
/** The separator between a slot's kind and what it names (`list:projects`). */
|
|
@@ -47,6 +47,12 @@ export enum FreePurpose {
|
|
|
47
47
|
Process = 'process',
|
|
48
48
|
Contact = 'contact',
|
|
49
49
|
Closing = 'closing',
|
|
50
|
+
/**
|
|
51
|
+
* FV2 (footer-v2 §4): the site's footer, laid freely from the FOOTER parts — the LAST section of a free request that asks
|
|
52
|
+
* for it, split off before the page is judged (`splitFreeFooter`) and judged by itself (`checkFreeFooter`). It holds only
|
|
53
|
+
* Containers and `footer:<part>` Slots, and says its ground as `opts: ['ground:<word>']`.
|
|
54
|
+
*/
|
|
55
|
+
Footer = 'footer',
|
|
50
56
|
}
|
|
51
57
|
|
|
52
58
|
/**
|
|
@@ -152,9 +158,9 @@ export interface FreeNode {
|
|
|
152
158
|
src?: string;
|
|
153
159
|
/** A Button: a page route of the site, or `#<section id>`. */
|
|
154
160
|
href?: string;
|
|
155
|
-
/** A Slot: what stands here (`list:<alias>`, `form:<preset>`). */
|
|
161
|
+
/** A Slot: what stands here (`list:<alias>`, `form:<preset>`, a free footer's `footer:<part>`). */
|
|
156
162
|
slot?: string;
|
|
157
|
-
/** A Slot's options (a list's mix words, `arrange:grid`). */
|
|
163
|
+
/** A Slot's options (a list's mix words, `arrange:grid`); a free footer Section's ground (`ground:inverse`, FV2). */
|
|
158
164
|
opts?: string[];
|
|
159
165
|
styleProps: FreeStyle;
|
|
160
166
|
responsive?: Partial<Record<FreeLayer, FreeStyle>>;
|
|
@@ -339,6 +345,8 @@ export function expandFreeWire(wire: unknown): ExpandedFreeWire {
|
|
|
339
345
|
node.slot = str(raw['slot']);
|
|
340
346
|
node.opts = list(raw['opts']);
|
|
341
347
|
}
|
|
348
|
+
// FV2: a footer Section says its ground as a word (`ground:inverse`), never as a painted colour.
|
|
349
|
+
if (type === FreeNodeType.Section && node.purpose === FreePurpose.Footer && list(raw['opts']).length) node.opts = list(raw['opts']);
|
|
342
350
|
const responsive: Partial<Record<FreeLayer, FreeStyle>> = {};
|
|
343
351
|
for (const [key, layer] of [['phone', FreeLayer.Phone], ['tablet', FreeLayer.Tablet]] as const) {
|
|
344
352
|
const style = styleOf(raw[key], `${at}.${key}`, faults);
|
|
@@ -3,7 +3,7 @@ import { parseCssColour, relativeLuminance } from '@vectoriox/iox-ui/design-core
|
|
|
3
3
|
import { layoutPresetColours, splitSide } from './check-layout';
|
|
4
4
|
import { LayoutColour, LayoutEnter, LayoutIssue, LayoutIssueCode, LayoutLayerKind, LayoutListMix, LayoutListWho, LayoutPage, LayoutRole, LayoutSection, LayoutSectionKind, LayoutSize, LayoutTrackProp } from './layout-language';
|
|
5
5
|
import { FooterMix, footerMixOfPlan, footerTokenOf } from './footer-mix';
|
|
6
|
-
import { HeaderMix, headerTokenOf, wornHeaderOfPlan } from './header-mix';
|
|
6
|
+
import { HeaderFacts, HeaderMix, headerTokenOf, wornHeaderOfPlan } from './header-mix';
|
|
7
7
|
import { checkPopup, popupTokenOf } from './popup-plan';
|
|
8
8
|
import { SitePlan } from './site-plan.model';
|
|
9
9
|
import { listWordTier } from './list-table';
|
|
@@ -205,11 +205,13 @@ export function fingerprintOf(page: LayoutPage, preset: string, mode: 'light' |
|
|
|
205
205
|
};
|
|
206
206
|
}
|
|
207
207
|
|
|
208
|
-
/** A composed page's fingerprint under its site plan's header and footer — the ONE call every reader of a plan makes.
|
|
209
|
-
|
|
208
|
+
/** A composed page's fingerprint under its site plan's header and footer — the ONE call every reader of a plan makes.
|
|
209
|
+
* `facts.tier` (HI-D Pro): the generation's tier — a Pro site is recorded wearing its floating header, as it is composed. */
|
|
210
|
+
export function fingerprintOfPlanPage(page: LayoutPage, preset: string, mode: 'light' | 'dark', plan: Parameters<typeof wornHeaderOfPlan>[0] & Parameters<typeof footerMixOfPlan>[0],
|
|
211
|
+
facts: Pick<HeaderFacts, 'tier'> = {}): LayoutFingerprint {
|
|
210
212
|
// PU3: the popup the plan makes (`checkPopup` reads a whole plan; a part-plan a caller builds has no popup lines).
|
|
211
213
|
const popup = 'pages' in plan && Array.isArray((plan as SitePlan).pages) ? popupTokenOf(checkPopup(plan as SitePlan).popup) : null;
|
|
212
|
-
return fingerprintOf(page, preset, mode, wornHeaderOfPlan(plan).mix, footerMixOfPlan(plan), popup);
|
|
214
|
+
return fingerprintOf(page, preset, mode, wornHeaderOfPlan(plan, facts).mix, footerMixOfPlan(plan), popup);
|
|
213
215
|
}
|
|
214
216
|
|
|
215
217
|
/** The longest common subsequence of two sequences. */
|
|
@@ -4,6 +4,7 @@ import { LAYOUT_INSET } from './layout-column';
|
|
|
4
4
|
import { GenerationTier } from './site-plan.model';
|
|
5
5
|
import { tierOffers } from './part-tier';
|
|
6
6
|
import { PatternNode, PatternPlaceholder, PatternRecipe, SitePattern } from './patterns';
|
|
7
|
+
import { hash53 } from './section-stamp';
|
|
7
8
|
import { SerializedNode, walkSerialized } from './serialized-node';
|
|
8
9
|
import { SPEC_SITE_LAYOUT } from './site-spec.generated';
|
|
9
10
|
import { ENTRANCE_ORIGIN_LOOK } from './entrances';
|
|
@@ -61,6 +62,8 @@ interface OpeningTable {
|
|
|
61
62
|
typeLedEveryTier?: boolean;
|
|
62
63
|
/** iox-ui#131: the grounds a type-led first screen may stand on, in the order tried (`inverse` first, no word). */
|
|
63
64
|
typeLedGrounds?: ReadonlyArray<string>;
|
|
65
|
+
/** iox-ui#192: the ways a Home on one still picture may open, per the frame its kind of business opens in. */
|
|
66
|
+
pictured?: Readonly<Record<string, ReadonlyArray<{ frame: string; words: string; after: string }>>>;
|
|
64
67
|
}
|
|
65
68
|
|
|
66
69
|
/** The ingredients, by the contract's keys (held equal to it by opening-mix.spec). */
|
|
@@ -443,6 +446,54 @@ export function typeLedOpeningWays(): OpeningMix[] {
|
|
|
443
446
|
return (O.typeLed ?? []).map(w => openingMix({ frame: w.frame, words: w.words, media: OpeningMedia.None }));
|
|
444
447
|
}
|
|
445
448
|
|
|
449
|
+
/** iox-ui#192: the ways a Home opening on one still picture may wear in a frame class (`full` · `inset`, harness
|
|
450
|
+
* OPENING_PICTURE), in the contract's order (`opening.pictured`) — empty for a class the contract names none for. */
|
|
451
|
+
export function picturedOpeningWays(frame: string): OpeningMix[] {
|
|
452
|
+
return (O.pictured?.[frame] ?? []).map(w => openingMix({ frame: w.frame, words: w.words }));
|
|
453
|
+
}
|
|
454
|
+
|
|
455
|
+
/** Where a seed lands in a list of `n` (the same seed, the same place). */
|
|
456
|
+
const seededStart = (seed: string, n: number): number => (n > 1 ? parseInt(hash53(seed).slice(-7), 36) % n : 0);
|
|
457
|
+
|
|
458
|
+
/**
|
|
459
|
+
* iox-ui#192 — a picture Home's way to open, chosen per site: the 11-29 re-score found seven Homes on a live-searched
|
|
460
|
+
* photo all wearing ONE arrangement (the picture edge to edge, a dark words card at the lower start), where the
|
|
461
|
+
* references open as the name over the picture, a framed card, a frame that settles. The kind of business's words
|
|
462
|
+
* (`given`, harness OPENING_PICTURE — `frame:full` or `frame:inset`, a still photo) name the frame class; its ways
|
|
463
|
+
* (`picturedOpeningWays`) the site carries unmended (`checkOpening`: the name's fit for a display-size name, the frame under
|
|
464
|
+
* a Pro float) are the choice, and the `seed` (the organization) picks among them — so two sites of one kind of business rarely
|
|
465
|
+
* open alike, and the same site always opens the same way (a rebuild of a kept plan, the pictures planned before the
|
|
466
|
+
* build). Every way keeps the picture as the frame's first child, so the picture's slot is the same. Anything but a still
|
|
467
|
+
* photo, or a class with no ways, is `given` as it is. Pure.
|
|
468
|
+
*/
|
|
469
|
+
export function chooseOpeningWay(given: OpeningMix, ctx: OpeningContext, seed: string): OpeningMix {
|
|
470
|
+
const ways = given.media === OpeningMedia.Photo ? picturedOpeningWays(given.frame) : [];
|
|
471
|
+
if (!ways.length) return given;
|
|
472
|
+
// The ways the site carries unmended, and the seed's place among THEM — so a way the site cannot wear (a long name's
|
|
473
|
+
// wordmark, an inset card under a Pro float) never hands its share to the way after it.
|
|
474
|
+
const carried = ways.map(way => ({ ...given, frame: way.frame, words: way.words }))
|
|
475
|
+
.filter(mix => !checkOpening(drawnOpeningMix(mix).drawn, ctx).repairs.length);
|
|
476
|
+
return carried.length ? carried[seededStart(seed, carried.length)] : given;
|
|
477
|
+
}
|
|
478
|
+
|
|
479
|
+
/**
|
|
480
|
+
* HI3-D27 (Doron 2026-11-29: the floating header over a full-bleed opening from y=0) — does this build's picture opening
|
|
481
|
+
* stand full? On the Pro tier, where the kind of business's own opening (harness OPENING_PICTURE, `typeWords`) is edge to
|
|
482
|
+
* edge: its floating header stands over the picture, which starts at the top of the page under it. A kind of business
|
|
483
|
+
* that opens on an inset card keeps its card (the header floats on the page's ground above it); Basic is unchanged.
|
|
484
|
+
* `checkOpening` mends an inset or settling frame to full when it holds (`OpeningContext.fullFrame`), said. Pure.
|
|
485
|
+
*/
|
|
486
|
+
export function opensFullUnderFloat(tier: `${GenerationTier}` | null | undefined, typeWords: ReadonlyArray<string> | null | undefined): boolean {
|
|
487
|
+
if (tier !== GenerationTier.Award || !typeWords?.length) return false;
|
|
488
|
+
try {
|
|
489
|
+
const mix = openingMixFromWords(typeWords);
|
|
490
|
+
return mix.frame === OpeningFrame.Full && mix.media !== OpeningMedia.None;
|
|
491
|
+
} catch (e) {
|
|
492
|
+
if (e instanceof OpeningMixError) return false;
|
|
493
|
+
throw e;
|
|
494
|
+
}
|
|
495
|
+
}
|
|
496
|
+
|
|
446
497
|
/** #129: is the mix a type-led first screen (nothing to show but its words)? */
|
|
447
498
|
export const openingIsTypeLed = (mix: Pick<OpeningMix, 'media'>): boolean => mix.media === OpeningMedia.None;
|
|
448
499
|
|
|
@@ -470,6 +521,9 @@ export enum OpeningRepairCode {
|
|
|
470
521
|
DissolveNeedsPicture = 'dissolve-needs-picture',
|
|
471
522
|
/** AW9: a dissolve grows the picture and fades the words itself — a slow zoom or copy-out beside it is left out. */
|
|
472
523
|
DissolveAlone = 'dissolve-alone',
|
|
524
|
+
/** HI3-D27: a Pro header floats over the first screen from the top, and this kind of business opens edge to edge — an
|
|
525
|
+
* inset or settling frame stands full, the header over its picture. */
|
|
526
|
+
FullUnderFloat = 'full-under-float',
|
|
473
527
|
}
|
|
474
528
|
|
|
475
529
|
export interface OpeningRepair {
|
|
@@ -493,6 +547,9 @@ export interface OpeningContext {
|
|
|
493
547
|
readonly film?: boolean;
|
|
494
548
|
/** The owner's own badge words; `null` = none given (the generator: left out), absent = a placeholder (the builder). */
|
|
495
549
|
readonly badge?: string | null;
|
|
550
|
+
/** HI3-D27 (`opensFullUnderFloat`): a Pro site whose kind of business opens edge to edge — its floating header stands
|
|
551
|
+
* over the first screen's picture from y=0, so a pictured frame is full. Absent: any frame (the builder, Basic). */
|
|
552
|
+
readonly fullFrame?: boolean;
|
|
496
553
|
}
|
|
497
554
|
|
|
498
555
|
/** A display word must stand this large on a 1440 laptop, and the longest word fit a 375 phone at this size (px). */
|
|
@@ -589,6 +646,10 @@ export function checkOpening(mix: OpeningMix, ctx: OpeningContext): { mix: Openi
|
|
|
589
646
|
const m: OpeningMix = { ...mix, extras: [...mix.extras], motion: [...mix.motion] };
|
|
590
647
|
const repairs: OpeningRepair[] = [];
|
|
591
648
|
const say = (code: OpeningRepairCode, said: string) => repairs.push({ code, said });
|
|
649
|
+
if (ctx.fullFrame && m.media !== OpeningMedia.None && (m.frame === OpeningFrame.Inset || m.frame === OpeningFrame.Shrinks)) {
|
|
650
|
+
m.frame = OpeningFrame.Full;
|
|
651
|
+
say(OpeningRepairCode.FullUnderFloat, 'a Pro header floats over the first screen from the top: the picture stands edge to edge under it, as this kind of business opens');
|
|
652
|
+
}
|
|
592
653
|
if (m.media === OpeningMedia.Film && ctx.film === false) {
|
|
593
654
|
m.media = OpeningMedia.Photo;
|
|
594
655
|
say(OpeningRepairCode.FilmIsTheOwners, 'a looping film is the owner\'s own clip, and there is none yet: a picture stands in, filled by their photo or one that fits the business');
|
|
@@ -319,6 +319,7 @@ export const PLAN_WIRE_DERIVED: Readonly<Record<string, string>> = {
|
|
|
319
319
|
freePage: 'the free step: a page the model writes free, on its own wire, set by the server (FS3)',
|
|
320
320
|
freeRead: 'the free step (FS3)',
|
|
321
321
|
freeNode: 'the free step (FS3)',
|
|
322
|
+
'plan.freeFooter': 'the free step: the footer laid freely on the free request, set by the server once it passed checkFreeFooter (footer-v2 FV2)',
|
|
322
323
|
'plan.popup': "the owner's popup lines: the reading's stated news and the Plan step's ticks (the context, popups PU3)",
|
|
323
324
|
popupLines: "the owner's popup lines (the context, popups PU3)",
|
|
324
325
|
statedFact: "the reading's stated fact (the context, popups PU3)",
|
|
@@ -98,6 +98,7 @@ export * from './popup-plan';
|
|
|
98
98
|
export * from './opening-edit';
|
|
99
99
|
export * from './footer-mix';
|
|
100
100
|
export * from './footer-sign-up';
|
|
101
|
+
export * from './footer-free';
|
|
101
102
|
export * from './layout-edits';
|
|
102
103
|
export * from './adjustments';
|
|
103
104
|
export * from './site-tree';
|
|
@@ -1,4 +1,8 @@
|
|
|
1
|
-
import { DesignChoices, DesignConfigEntry, DesignRevertSnapshot, readDesignConfig } from '@vectoriox/iox-ui/design-core';
|
|
1
|
+
import { ColourWordKey, DesignChoices, DesignConfigEntry, DesignRevertSnapshot, readDesignConfig, resolveColourWords } from '@vectoriox/iox-ui/design-core';
|
|
2
|
+
|
|
3
|
+
import { ColourIngredient, ColourRhythm, colourDesignWords, colourMixOfPlan, colourWordDrawn, colourWords, drawnColourMix } from './colour-mix';
|
|
4
|
+
import { shapeKeys } from './shape-check';
|
|
5
|
+
import { SPEC_SITE_PLAN_SHAPE } from './site-spec.generated';
|
|
2
6
|
|
|
3
7
|
import type { ComposedPlaceholder } from './compose-site';
|
|
4
8
|
import type { LayoutIssue } from './layout-language';
|
|
@@ -6,7 +10,7 @@ import type { SerializedNode } from './serialized-node';
|
|
|
6
10
|
import type { AdditionIssue, AdditionOrigin } from './redesign-additions';
|
|
7
11
|
import type { AiRefusal } from './ai-run';
|
|
8
12
|
import { BuildStepError, BuildStepRecord, CreatedRecord, SiteBuildKind, SiteBuildStatus, UndoKept } from './site-build-run';
|
|
9
|
-
import type { PagePlan } from './site-plan.model';
|
|
13
|
+
import type { PagePlan, SitePlan } from './site-plan.model';
|
|
10
14
|
|
|
11
15
|
/**
|
|
12
16
|
* A REDESIGN run's wire vocabulary (site-redesign plan §3c, RD2): a new design for a built site, with everything it holds
|
|
@@ -429,3 +433,42 @@ export function redesignDiscardable(run: Pick<RedesignRun, 'status' | 'switch'>)
|
|
|
429
433
|
export function isRedesignRun(run: { kind?: unknown } | null | undefined): boolean {
|
|
430
434
|
return run?.kind === SiteBuildKind.Redesign;
|
|
431
435
|
}
|
|
436
|
+
|
|
437
|
+
/** The keys a plan's design may carry (contract `site.planShape.design`). */
|
|
438
|
+
const PLAN_DESIGN_KEYS: ReadonlySet<string> = new Set(shapeKeys(SPEC_SITE_PLAN_SHAPE.design));
|
|
439
|
+
/** The colour WORDS a look carries as tokens (Colour v2 CV2 + CV3) — in a plan they live in `mixes.colour` under the same
|
|
440
|
+
* key. CV5's `flow` is a yes/no on the look and a RHYTHM word in the plan (`rhythm:flow`), so it is carried apart. */
|
|
441
|
+
type LookColourWordKey = Exclude<ColourWordKey, 'flow'>;
|
|
442
|
+
const LOOK_COLOUR_KEYS: ReadonlyArray<LookColourWordKey> = ['ground', 'dark', 'action', 'wash'];
|
|
443
|
+
|
|
444
|
+
/** The mix word a look's ABSENT colour word means (ground `look`, dark `ink`, button `accent`, wash `flat`): the first word
|
|
445
|
+
* of the contract's ingredient that is drawn and carries no token. */
|
|
446
|
+
function absentColourWord(key: LookColourWordKey): string {
|
|
447
|
+
return colourWords(key).find(w => colourWordDrawn(key, w) && resolveColourWords({ [key]: w })[key] === undefined) ?? colourWords(key)[0];
|
|
448
|
+
}
|
|
449
|
+
|
|
450
|
+
/**
|
|
451
|
+
* A look (`DesignChoices`, as a design row reads back) as a plan wears it (site-redesign onto a new look; Colour v2 CV2):
|
|
452
|
+
* `design` holds only the keys the plan shape names, and the look's colour words (ground · dark · button · wash) go into
|
|
453
|
+
* `mixes.colour`, so the plan is composed and judged by the words the live site will wear. The inverse of
|
|
454
|
+
* `planDesignChoices`: `planDesignChoices({ ...plan, ...designForPlan(plan, look) })` wears `look`'s colour words. A word
|
|
455
|
+
* the plan already wears (its own, else its new style's row) is left as it is; every other colour word of the plan is kept.
|
|
456
|
+
* Pure.
|
|
457
|
+
*/
|
|
458
|
+
export function designForPlan(plan: Pick<SitePlan, 'mixes' | 'design'>, look: Partial<DesignChoices> | Readonly<Record<string, unknown>>): Pick<SitePlan, 'design' | 'mixes'> {
|
|
459
|
+
const design = Object.fromEntries(Object.entries(look ?? {}).filter(([key]) => PLAN_DESIGN_KEYS.has(key))) as unknown as SitePlan['design'];
|
|
460
|
+
const mix = colourMixOfPlan({ mixes: plan.mixes, design });
|
|
461
|
+
const wanted = resolveColourWords(look as Partial<Record<ColourWordKey, unknown>>);
|
|
462
|
+
// A flowing plan wears no wash (`rules.flowWearsFlat`), so its own wash is hidden, not gone: a look that holds still is
|
|
463
|
+
// compared with the wash the plan WILL wear once it stops flowing (else a style row's glow comes back unasked).
|
|
464
|
+
const worn = wanted.flow ? colourDesignWords(mix) : { ...colourDesignWords(mix), wash: resolveColourWords({ wash: drawnColourMix(mix).drawn.wash }).wash };
|
|
465
|
+
const changed = LOOK_COLOUR_KEYS.filter(key => wanted[key] !== worn[key]);
|
|
466
|
+
// CV5: the look flows or holds still — the plan's rhythm says the same (a look that holds still stands on one ground,
|
|
467
|
+
// the word the colour check mends a flow to, so a style whose row flows does not flow again under it).
|
|
468
|
+
const flowChanged = !!wanted.flow !== !!worn.flow;
|
|
469
|
+
if (!changed.length && !flowChanged) return { design, ...(plan.mixes ? { mixes: plan.mixes } : {}) };
|
|
470
|
+
const replaced: ReadonlyArray<string> = [...changed, ...(flowChanged ? [ColourIngredient.Rhythm] : [])];
|
|
471
|
+
const kept = (plan.mixes?.colour ?? []).filter(word => !replaced.includes(String(word).split(':')[0]));
|
|
472
|
+
const rhythm = flowChanged ? [`${ColourIngredient.Rhythm}:${wanted.flow ? ColourRhythm.Flow : ColourRhythm.OneGround}`] : [];
|
|
473
|
+
return { design, mixes: { ...plan.mixes, colour: [...kept, ...changed.map(key => `${key}:${wanted[key] ?? absentColourWord(key)}`), ...rhythm] } };
|
|
474
|
+
}
|
|
@@ -389,6 +389,12 @@ export interface SitePlan {
|
|
|
389
389
|
/** Popups PU3: the owner's popup lines from the Plan step (the reading's stated news, the newsletter tick) — set by the
|
|
390
390
|
* server, never a model's. A generated site gets a popup only from one of them (R-H6, `checkPopup`). */
|
|
391
391
|
readonly popup?: PlanPopupLines;
|
|
392
|
+
/**
|
|
393
|
+
* FV2 (footer-v2 §4, FV-D1): the footer the model laid freely on the free request — ONE Section `purpose: footer` of
|
|
394
|
+
* Containers and `footer:<part>` Slots (footer-free.ts), set by the server once it passed `checkFreeFooter`, never by a
|
|
395
|
+
* model. When present the site's footer is stamped from it (`freeFooterOrMix`); `mixes.footer` stays its fall back.
|
|
396
|
+
*/
|
|
397
|
+
readonly freeFooter?: FreeNode;
|
|
392
398
|
}
|
|
393
399
|
|
|
394
400
|
/** A fact the owner STATED (harness `statedFacts`): its value and the owner's own words it was read from. */
|