@vectoriox/iox-ui 5.196.0 → 5.198.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/composite-core/index.d.ts +19 -2
- package/data-core/index.d.ts +101 -2
- package/design-core/index.d.ts +183 -30
- package/fesm2022/vectoriox-iox-ui-composite-core.mjs +49 -10
- package/fesm2022/vectoriox-iox-ui-composite-core.mjs.map +1 -1
- package/fesm2022/vectoriox-iox-ui-data-core.mjs +192 -2
- package/fesm2022/vectoriox-iox-ui-data-core.mjs.map +1 -1
- package/fesm2022/vectoriox-iox-ui-design-core.mjs +299 -74
- package/fesm2022/vectoriox-iox-ui-design-core.mjs.map +1 -1
- package/fesm2022/vectoriox-iox-ui-generation-core.mjs +2287 -528
- package/fesm2022/vectoriox-iox-ui-generation-core.mjs.map +1 -1
- package/fesm2022/vectoriox-iox-ui-harness-core.mjs +3 -1
- package/fesm2022/vectoriox-iox-ui-harness-core.mjs.map +1 -1
- package/fesm2022/vectoriox-iox-ui.mjs +32 -2
- package/fesm2022/vectoriox-iox-ui.mjs.map +1 -1
- package/generation-core/index.d.ts +1454 -200
- package/harness-core/index.d.ts +1 -1
- package/package.json +1 -1
- package/src/composite-core/header.ts +34 -1
- package/src/composite-core/slider-runtime.ts +16 -8
- package/src/data-core/placeholder-rows.ts +220 -0
- package/src/data-core/public-api.ts +2 -1
- package/src/design-core/brand.ts +58 -5
- package/src/design-core/contrast-audit.ts +49 -22
- package/src/design-core/design-apply.ts +34 -3
- package/src/design-core/flavor-fixtures.generated.ts +123 -123
- package/src/design-core/flavor-spec.generated.ts +44 -4
- package/src/design-core/flavor-tokens.ts +1 -1
- package/src/design-core/header-behaviour.ts +82 -15
- package/src/design-core/motion-language.ts +5 -14
- package/src/design-core/node-links.ts +34 -0
- package/src/design-core/preloader.ts +4 -5
- package/src/generation-core/audit-site.ts +10 -1
- package/src/generation-core/audit-words.ts +5 -0
- package/src/generation-core/body-mix.ts +40 -102
- package/src/generation-core/check-free.ts +26 -5
- package/src/generation-core/check-layout.ts +10 -4
- package/src/generation-core/check-list.ts +3 -25
- package/src/generation-core/colour-mix.ts +296 -0
- package/src/generation-core/compose-free.ts +40 -18
- package/src/generation-core/compose-site.ts +124 -22
- package/src/generation-core/footer-mix.ts +102 -54
- package/src/generation-core/free-fallback.ts +6 -4
- package/src/generation-core/free-opening.ts +57 -0
- package/src/generation-core/free-parts.ts +87 -0
- package/src/generation-core/free-slot-words.ts +30 -0
- package/src/generation-core/generation-tier.ts +6 -17
- package/src/generation-core/header-mix.ts +125 -4
- package/src/generation-core/item-fill.ts +42 -0
- package/src/generation-core/layout-drawers.ts +3 -2
- package/src/generation-core/layout-wire.ts +10 -16
- package/src/generation-core/list-panel.ts +3 -3
- package/src/generation-core/list-table.ts +5 -14
- package/src/generation-core/list-words.ts +2 -1
- package/src/generation-core/nav-shape.ts +45 -16
- package/src/generation-core/node-baselines.generated.ts +1 -0
- package/src/generation-core/opening-mix.ts +16 -33
- package/src/generation-core/part-tier.ts +14 -0
- package/src/generation-core/plan-wire.ts +31 -43
- package/src/generation-core/public-api.ts +4 -0
- package/src/generation-core/site-build-run.ts +4 -0
- package/src/generation-core/site-spec.generated.ts +1127 -93
- package/src/generation-core/stock-search.ts +106 -18
- package/src/generation-core/type-led.ts +19 -4
- package/src/generation-core/validate-site-plan.ts +4 -5
- package/src/harness-core/run-compose-context.ts +3 -1
- package/styles/iox-design.css +139 -4
|
@@ -2,6 +2,7 @@ import { DesignChoices, elementStyleFace, resolveDesignChoices, textWidthEm } fr
|
|
|
2
2
|
|
|
3
3
|
import { LAYOUT_INSET } from './layout-column';
|
|
4
4
|
import { GenerationTier } from './site-plan.model';
|
|
5
|
+
import { tierOffers } from './part-tier';
|
|
5
6
|
import { PatternNode, PatternPlaceholder, PatternRecipe, SitePattern } from './patterns';
|
|
6
7
|
import { SerializedNode, walkSerialized } from './serialized-node';
|
|
7
8
|
import { SPEC_SITE_LAYOUT } from './site-spec.generated';
|
|
@@ -160,14 +161,14 @@ export function openingWordWaits(ingredient: `${OpeningIngredient}`, word: strin
|
|
|
160
161
|
return WAITS[`${ingredient}.${word}`]?.phase ?? null;
|
|
161
162
|
}
|
|
162
163
|
|
|
163
|
-
/**
|
|
164
|
+
/** The tier a word was first drawn for (`all`, or `pro` — the award tier's, AW-D23); since AW-D42 every tier wears both. */
|
|
164
165
|
export function openingWordTier(ingredient: `${OpeningIngredient}`, word: string): 'all' | 'pro' {
|
|
165
166
|
return O.tiers[`${ingredient}.${word}`] === 'pro' ? 'pro' : 'all';
|
|
166
167
|
}
|
|
167
168
|
|
|
168
|
-
/** May a build at `tier` wear this word? */
|
|
169
|
+
/** May a build at `tier` wear this word? Every tier wears every drawn word (AW-D42, `tierOffers`). */
|
|
169
170
|
export function openingWordOffered(ingredient: `${OpeningIngredient}`, word: string, tier: `${GenerationTier}`): boolean {
|
|
170
|
-
return openingWordTier(ingredient, word)
|
|
171
|
+
return tierOffers(openingWordTier(ingredient, word), tier);
|
|
171
172
|
}
|
|
172
173
|
|
|
173
174
|
const listOf = (v: string | ReadonlyArray<string> | undefined): string[] => (v === undefined ? [] : Array.isArray(v) ? [...v] : [v as string]);
|
|
@@ -424,7 +425,7 @@ export function typeLedGrounds(calm = false): OpeningGround[] {
|
|
|
424
425
|
}
|
|
425
426
|
|
|
426
427
|
/** Every `<ingredient>:<word>` the generator's wire may carry at `tier`: drawn words only (a waiting word is never
|
|
427
|
-
* offered)
|
|
428
|
+
* offered) — every tier's since AW-D42. */
|
|
428
429
|
export function openingWireWords(tier: `${GenerationTier}` = GenerationTier.Basic): string[] {
|
|
429
430
|
return ORDER.flatMap(k => openingWords(k).filter(w => openingWordDrawn(k, w) && openingWordOffered(k, w, tier)).map(w => `${k}:${w}`));
|
|
430
431
|
}
|
|
@@ -440,22 +441,17 @@ export function typeLedOpeningWays(): OpeningMix[] {
|
|
|
440
441
|
return (O.typeLed ?? []).map(w => openingMix({ frame: w.frame, words: w.words, media: OpeningMedia.None }));
|
|
441
442
|
}
|
|
442
443
|
|
|
443
|
-
/** AW-D23 amended (2026-11-24): a type-led first screen's frame and words are worn at every tier when they are one of
|
|
444
|
-
* the contract's type-led ways — with no picture they are all the screen has. */
|
|
445
|
-
function typeLedWayEveryTier(mix: OpeningMix): boolean {
|
|
446
|
-
return !!O.typeLedEveryTier && mix.media === OpeningMedia.None && (O.typeLed ?? []).some(w => w.frame === mix.frame && w.words === mix.words);
|
|
447
|
-
}
|
|
448
|
-
|
|
449
444
|
/** #129: is the mix a type-led first screen (nothing to show but its words)? */
|
|
450
445
|
export const openingIsTypeLed = (mix: Pick<OpeningMix, 'media'>): boolean => mix.media === OpeningMedia.None;
|
|
451
446
|
|
|
452
447
|
// ── The check: a mix judged against the site, mended where the site cannot carry it, each mend said ──────────────────
|
|
453
448
|
|
|
454
449
|
export enum OpeningRepairCode {
|
|
455
|
-
/** A word the award tier alone wears, on a site built below it. */
|
|
456
|
-
ProOnly = 'pro-only',
|
|
457
450
|
/** The name behind the subject needs a cut-out picture: the name, large. */
|
|
458
451
|
NeedsCutOut = 'needs-cut-out',
|
|
452
|
+
/** J10 lever (b): a looping film is the owner's own clip — a build with none draws a picture there, which the owner's
|
|
453
|
+
* photo, a made picture or stock can fill (an empty Video was never offered to any of them). */
|
|
454
|
+
FilmIsTheOwners = 'film-is-the-owners',
|
|
459
455
|
/** "The film is the message" needs a film or pictures that move: a heading. */
|
|
460
456
|
NoneNeedsFilm = 'none-needs-film',
|
|
461
457
|
/** Words placed apart need two or three of them. */
|
|
@@ -485,10 +481,14 @@ export interface OpeningContext {
|
|
|
485
481
|
/** The business name — the words of a display-size opening. */
|
|
486
482
|
readonly name: string;
|
|
487
483
|
readonly design?: DesignChoices | null;
|
|
488
|
-
/**
|
|
484
|
+
/** The tier the site is built at. Since AW-D42 it holds back no word (every tier wears every drawn word); kept so the
|
|
485
|
+
* callers that pass it still read. */
|
|
489
486
|
readonly tier?: `${GenerationTier}`;
|
|
490
487
|
/** The owner gives a cut-out picture (a transparent background) for the name behind the subject. */
|
|
491
488
|
readonly cutOut?: boolean;
|
|
489
|
+
/** J10 lever (b): the owner's own clip plays in the first screen. `false` = none (a build: its film is drawn as a
|
|
490
|
+
* picture, said), absent = a placeholder the owner fills (the builder). */
|
|
491
|
+
readonly film?: boolean;
|
|
492
492
|
/** The owner's own badge words; `null` = none given (the generator: left out), absent = a placeholder (the builder). */
|
|
493
493
|
readonly badge?: string | null;
|
|
494
494
|
}
|
|
@@ -523,11 +523,6 @@ function nameFits(ctx: OpeningContext, oneLine: boolean): boolean {
|
|
|
523
523
|
return laptopOk && (PHONE_PX - 2 * PHONE_SIDE_PX) / longest >= MIN_PHONE_DISPLAY_PX;
|
|
524
524
|
}
|
|
525
525
|
|
|
526
|
-
/** The stand-in for a word a tier may not wear: the one-word ingredients' defaults; a many-ingredient's word left out. */
|
|
527
|
-
function tierStandIn(k: OpeningIngredient): string {
|
|
528
|
-
return O.defaults[k] as string;
|
|
529
|
-
}
|
|
530
|
-
|
|
531
526
|
/**
|
|
532
527
|
* The ONE judge of an opening mix against the site: what the site cannot carry is mended to the nearest mix it can, and
|
|
533
528
|
* each mend is said. Judges the mix as DRAWN (`drawnOpeningMix` first). Never throws on a well-formed mix. Pure.
|
|
@@ -536,21 +531,9 @@ export function checkOpening(mix: OpeningMix, ctx: OpeningContext): { mix: Openi
|
|
|
536
531
|
const m: OpeningMix = { ...mix, extras: [...mix.extras], motion: [...mix.motion] };
|
|
537
532
|
const repairs: OpeningRepair[] = [];
|
|
538
533
|
const say = (code: OpeningRepairCode, said: string) => repairs.push({ code, said });
|
|
539
|
-
if (
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
if (everyTier && (k === OpeningIngredient.Frame || k === OpeningIngredient.Words)) continue;
|
|
543
|
-
if (isMany(k)) {
|
|
544
|
-
const kept = m[k].filter(w => openingWordTier(k, w) === 'all');
|
|
545
|
-
for (const w of m[k].filter(x => !kept.includes(x))) say(OpeningRepairCode.ProOnly, `"${openingMeaning(k, w)}" comes with the award plan: left out`);
|
|
546
|
-
m[k] = kept;
|
|
547
|
-
continue;
|
|
548
|
-
}
|
|
549
|
-
const word = (m as unknown as Record<string, string>)[k];
|
|
550
|
-
if (openingWordTier(k, word) === 'all') continue;
|
|
551
|
-
(m as unknown as Record<string, string>)[k] = tierStandIn(k);
|
|
552
|
-
say(OpeningRepairCode.ProOnly, `"${openingMeaning(k, word)}" comes with the award plan: ${openingMeaning(k, tierStandIn(k))} instead`);
|
|
553
|
-
}
|
|
534
|
+
if (m.media === OpeningMedia.Film && ctx.film === false) {
|
|
535
|
+
m.media = OpeningMedia.Photo;
|
|
536
|
+
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');
|
|
554
537
|
}
|
|
555
538
|
if (m.words === OpeningWords.Behind && !ctx.cutOut) {
|
|
556
539
|
m.words = OpeningWords.Wordmark;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* AW-D42 (Doron, 2026-11-28: "we don't need the award website for Pro" — AW-D23's word gate overturned): EVERY PART IS
|
|
3
|
+
* EVERY TIER'S. A word, a recipe, a table row or a wire key the contract once held for the award tier (its `tier: 'pro'`
|
|
4
|
+
* / `'award'`) is offered to a build at any tier. The tier now decides only HOW MUCH the model composes (AW-D24: which
|
|
5
|
+
* pages, `withComposedPages`) — never what a site may wear.
|
|
6
|
+
*
|
|
7
|
+
* This is the ONE predicate every part offer reads — the body, opening, list and footer words, the layout signatures,
|
|
8
|
+
* the plan wire's keys. The contract's `tier` column stays as each row's history (the tier it was first drawn for), so a
|
|
9
|
+
* price split, should one ever come back, comes back here and nowhere else. A leaf module (no imports): the mixes read it
|
|
10
|
+
* without reordering the generation-core load. Pure.
|
|
11
|
+
*/
|
|
12
|
+
export function tierOffers(_rowTier: string | null | undefined, _tier?: string | null): boolean {
|
|
13
|
+
return true;
|
|
14
|
+
}
|
|
@@ -5,8 +5,8 @@ import { describeShapeKey, jsonAnyOf, jsonBoolean, jsonInteger, jsonListOf, json
|
|
|
5
5
|
import { patternLinkSlots, patternOptionalParts, patternSlots, SITE_PATTERNS } from './patterns';
|
|
6
6
|
import { withDerivedSources } from './plan-derived';
|
|
7
7
|
import { DEFAULT_HEADER_PATTERN, HeaderIngredient, headerMeaning, headerMix, headerMixFromWords, headerMixOfPlan, headerMixWords, headerPatternIdOf, headerWireWords } from './header-mix';
|
|
8
|
-
import { DEFAULT_FOOTER_PATTERN, FooterIngredient, footerMeaning, footerMix, footerMixFromWords, footerMixOfPlan, footerMixWords, footerPatternIdOf, footerWireWords, footerWords
|
|
9
|
-
import { openingHarnessWord, OpeningIngredient, openingMeaning, openingWireWords
|
|
8
|
+
import { DEFAULT_FOOTER_PATTERN, FooterIngredient, footerMeaning, footerMix, footerMixFromWords, footerMixOfPlan, footerMixWords, footerPatternIdOf, footerWireWords, footerWords } from './footer-mix';
|
|
9
|
+
import { openingHarnessWord, OpeningIngredient, openingMeaning, openingWireWords } from './opening-mix';
|
|
10
10
|
import { BodyIngredient, bodyMeaning, bodyMix, bodyMixWords, bodyWireWords } from './body-mix';
|
|
11
11
|
import { POPUP_LINK_WORD, POPUP_WIRE_INGREDIENTS, popupMeaning, popupWireWords } from './popup-plan';
|
|
12
12
|
import { shopCategoriesOf } from './shop-plan';
|
|
@@ -93,8 +93,6 @@ interface WireKey {
|
|
|
93
93
|
none?: string;
|
|
94
94
|
/** The part a top-level key is written in. */
|
|
95
95
|
part?: PlanPart;
|
|
96
|
-
/** AW-D23 (AW6 wire): a key only the award tier's request carries — every other tier's wire is without it, byte for byte. */
|
|
97
|
-
tier?: GenerationTier.Award;
|
|
98
96
|
}
|
|
99
97
|
|
|
100
98
|
const PLAN_SHAPE = SPEC_SITE_PLAN_SHAPE as unknown as Readonly<Record<string, ShapeEntry>>;
|
|
@@ -108,22 +106,19 @@ const roleWords = ROLE_KEYS.map(role => `${role}: ${describeShapeKey(PLAN_SHAPE[
|
|
|
108
106
|
/** The footer's words as the model reads them (LI5): each ingredient, its words and their meanings, from the contract. */
|
|
109
107
|
const FOOTER_WIRE_TEXT = 'string[] — the footer as ONE list of <ingredient>:<word> words: one word per ingredient but "holds", which lists '
|
|
110
108
|
+ `each block it holds (holds:pages, holds:contact); an ingredient left out is the default (${footerMixWords(footerMix()).join(', ')}). `
|
|
111
|
-
//
|
|
112
|
-
|
|
113
|
-
+ 'A word marked (award) is worn by an award build only — elsewhere it is mended. '
|
|
114
|
-
+ Object.values(FooterIngredient).map(k => `${k}: ${footerWords(k).map(w => `${w} (${footerMeaning(k, w)})${footerWordTier(k, w) === 'pro' ? ' (award)' : ''}`).join(' | ')}`).join('; ');
|
|
109
|
+
// AW-D42: every word is every tier's — none is marked, none is mended for a tier.
|
|
110
|
+
+ Object.values(FooterIngredient).map(k => `${k}: ${footerWords(k).map(w => `${w} (${footerMeaning(k, w)})`).join(' | ')}`).join('; ');
|
|
115
111
|
|
|
116
112
|
/** The wire's `globals` key the home page's opening travels in (AW8) — a mix beside the header's and the footer's. */
|
|
117
113
|
const OPENING_WIRE_KEY = 'opening';
|
|
118
114
|
|
|
119
|
-
/** The opening's words as the model reads them (AW8): each ingredient, the words the product draws
|
|
120
|
-
*
|
|
115
|
+
/** The opening's words as the model reads them (AW8): each ingredient, the words the product draws and their meanings,
|
|
116
|
+
* from the contract's opening table (every tier's since AW-D42). */
|
|
121
117
|
const OPENING_WIRE_TEXT = "string[] — the home page's opening (its first screen) as ONE list of <ingredient>:<word> words: one word per "
|
|
122
118
|
+ `ingredient but extras and motion, which list each they take; an ingredient left out is the default; [] = the home page opens with its first `
|
|
123
119
|
+ "section as written. The opening takes the place of the home page's first section when that is a hero (its words and pictures carried in); "
|
|
124
|
-
+
|
|
125
|
-
|
|
126
|
-
.map(w => `${w} (${openingMeaning(k, w)}${openingWordTier(k, w) === 'pro' ? ', award' : ''}${openingHarnessWord(k, w) ? ', the build\'s own — keep it where the plan has it, never choose it' : ''})`).join(' | ')}`).join('; ');
|
|
120
|
+
+ Object.values(OpeningIngredient).map(k => `${k}: ${openingWireWords().filter(w => w.startsWith(`${k}:`)).map(w => w.slice(k.length + 1))
|
|
121
|
+
.map(w => `${w} (${openingMeaning(k, w)}${openingHarnessWord(k, w) ? ', the build\'s own — keep it where the plan has it, never choose it' : ''})`).join(' | ')}`).join('; ');
|
|
127
122
|
|
|
128
123
|
/** The header's words as the model reads them (HI1): each ingredient, the words the product draws and their meanings,
|
|
129
124
|
* from the contract's header table. */
|
|
@@ -132,16 +127,16 @@ const HEADER_WIRE_TEXT = 'string[] — the header as ONE list of <ingredient>:<w
|
|
|
132
127
|
+ 'beside the name, pages either side of the name need a short name, two actions need a shop. '
|
|
133
128
|
+ Object.values(HeaderIngredient).map(k => `${k}: ${headerWireWords().filter(w => w.startsWith(`${k}:`)).map(w => w.slice(k.length + 1)).map(w => `${w} (${headerMeaning(k, w)})`).join(' | ')}`).join('; ');
|
|
134
129
|
|
|
135
|
-
/** The wire's `globals` key the site's body travels in (AW6) —
|
|
130
|
+
/** The wire's `globals` key the site's body travels in (AW6) — every tier's since AW-D42. */
|
|
136
131
|
const BODY_WIRE_KEY = 'body';
|
|
137
132
|
|
|
138
|
-
/** The body's words as the model reads them (AW6): each ingredient, the words
|
|
139
|
-
*
|
|
133
|
+
/** The body's words as the model reads them (AW6): each ingredient, the words a build may wear today and their meanings,
|
|
134
|
+
* from the contract's body table. */
|
|
140
135
|
const BODY_WIRE_TEXT = "string[] — the site's body as ONE list of <ingredient>:<word> words: how its sections meet and how their grounds "
|
|
141
136
|
+ `follow one another; one word per ingredient but sections, which lists each extra kind it takes; an ingredient left out is the default `
|
|
142
137
|
+ `(${bodyMixWords(bodyMix()).join(', ')}); [] = straight edges, each section's ground its own. An edge shows only where two neighbouring `
|
|
143
138
|
+ 'sections wear different grounds; a calm business (care, advice) never wears a torn or dripping edge. '
|
|
144
|
-
+ Object.values(BodyIngredient).map(k => [k, bodyWireWords(
|
|
139
|
+
+ Object.values(BodyIngredient).map(k => [k, bodyWireWords().filter(w => w.startsWith(`${k}:`)).map(w => w.slice(k.length + 1))] as const)
|
|
145
140
|
.filter(([, words]) => words.length)
|
|
146
141
|
.map(([k, words]) => `${k}: ${words.map(w => `${w} (${bodyMeaning(k, w)})`).join(' | ')}`).join('; ');
|
|
147
142
|
|
|
@@ -262,9 +257,9 @@ const WIRE_KEYS: Readonly<Record<`${PlanWireEntry}`, Readonly<Record<string, Wir
|
|
|
262
257
|
footer: { refs: ['globals.footer', 'plan.mixes', 'mixes.footer'], text: FOOTER_WIRE_TEXT },
|
|
263
258
|
// AW8: the home page's opening travels as its MIX, ONE list of `<ingredient>:<word>` words (opening-mix.ts); [] = none.
|
|
264
259
|
opening: { refs: ['plan.mixes', 'mixes.opening'], text: OPENING_WIRE_TEXT },
|
|
265
|
-
// AW6: the site's body travels as its MIX, ONE list of `<ingredient>:<word>` words (body-mix.ts); [] = none.
|
|
266
|
-
// tier's request
|
|
267
|
-
body: { refs: ['plan.mixes', 'mixes.body'], text: BODY_WIRE_TEXT
|
|
260
|
+
// AW6: the site's body travels as its MIX, ONE list of `<ingredient>:<word>` words (body-mix.ts); [] = none. Every
|
|
261
|
+
// tier's request carries it since AW-D42 (it was the award tier's alone, AW-D23).
|
|
262
|
+
body: { refs: ['plan.mixes', 'mixes.body'], text: BODY_WIRE_TEXT },
|
|
268
263
|
// PU3: the popup travels as its words, ONE list (popup-plan.ts); [] = none. Stamped only from the owner's lines (plan.popup).
|
|
269
264
|
popup: { refs: ['plan.mixes', 'mixes.popup'], text: POPUP_WIRE_TEXT },
|
|
270
265
|
},
|
|
@@ -321,28 +316,21 @@ const wireText = (spec: WireKey): string => {
|
|
|
321
316
|
return spec.none === undefined ? base : `${base} — ${spec.none} = none`;
|
|
322
317
|
};
|
|
323
318
|
|
|
324
|
-
/** What a plan request is asked at: its generation's tier
|
|
319
|
+
/** What a plan request is asked at: its generation's tier. Since AW-D42 every tier reads the same wire (the award tier's,
|
|
320
|
+
* body included); the tier is kept so its callers still read. */
|
|
325
321
|
export interface PlanWireOptions {
|
|
326
322
|
tier?: `${GenerationTier}`;
|
|
327
323
|
}
|
|
328
324
|
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
const
|
|
332
|
-
|
|
333
|
-
const wireShapeAt = (options: PlanWireOptions): Record<`${PlanWireEntry}`, ShapeEntry> => Object.fromEntries(
|
|
334
|
-
Object.entries(WIRE_KEYS).map(([entry, keys]) => [entry, Object.fromEntries(Object.entries(keys).filter(([, spec]) => asked(spec, options)).map(([k, spec]) => [k, wireText(spec)]))]),
|
|
325
|
+
/** The wire's shape table, in the plan table's words — what the model reads, and what the format is built from. ONE for
|
|
326
|
+
* every tier since AW-D42. */
|
|
327
|
+
export const PLAN_WIRE_SHAPE: Readonly<Record<`${PlanWireEntry}`, ShapeEntry>> = Object.fromEntries(
|
|
328
|
+
Object.entries(WIRE_KEYS).map(([entry, keys]) => [entry, Object.fromEntries(Object.entries(keys).map(([k, spec]) => [k, wireText(spec)]))]),
|
|
335
329
|
) as Record<`${PlanWireEntry}`, ShapeEntry>;
|
|
336
330
|
|
|
337
|
-
/** The wire's shape table
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
const AWARD_WIRE_SHAPE: Readonly<Record<`${PlanWireEntry}`, ShapeEntry>> = wireShapeAt({ tier: GenerationTier.Award });
|
|
342
|
-
|
|
343
|
-
/** The wire's shape table a request at `options` reads (AW6: the award tier's carries the body). Basic = `PLAN_WIRE_SHAPE`. */
|
|
344
|
-
export function planWireShape(options: PlanWireOptions = {}): Readonly<Record<`${PlanWireEntry}`, ShapeEntry>> {
|
|
345
|
-
return isAward(options) ? AWARD_WIRE_SHAPE : PLAN_WIRE_SHAPE;
|
|
331
|
+
/** The wire's shape table a request at `options` reads — `PLAN_WIRE_SHAPE` at every tier (AW-D42). */
|
|
332
|
+
export function planWireShape(_options: PlanWireOptions = {}): Readonly<Record<`${PlanWireEntry}`, ShapeEntry>> {
|
|
333
|
+
return PLAN_WIRE_SHAPE;
|
|
346
334
|
}
|
|
347
335
|
|
|
348
336
|
/** Each part's top-level keys, from the ONE wire table. */
|
|
@@ -482,8 +470,8 @@ const PLAN_TOP_SCHEMAS: Readonly<Record<string, (options: PlanWireOptions) => Js
|
|
|
482
470
|
globals: options => jsonShapedObject(planWireShape(options).globals, {
|
|
483
471
|
[GlobalSlot.Header]: jsonListOf(jsonOneOf(headerWireWords())),
|
|
484
472
|
[GlobalSlot.Footer]: jsonListOf(jsonOneOf(footerWireWords())),
|
|
485
|
-
[OPENING_WIRE_KEY]: jsonListOf(jsonOneOf(openingWireWords(
|
|
486
|
-
|
|
473
|
+
[OPENING_WIRE_KEY]: jsonListOf(jsonOneOf(openingWireWords())),
|
|
474
|
+
[BODY_WIRE_KEY]: jsonListOf(jsonOneOf(bodyWireWords())),
|
|
487
475
|
[POPUP_WIRE_KEY]: jsonListOf(jsonText()),
|
|
488
476
|
}, `wire ${PlanWireEntry.Globals}`),
|
|
489
477
|
direction: () => shaped(PlanWireEntry.Direction, { idea: jsonText(), cliche: jsonText(), flip: jsonText(), rules: jsonListOf(jsonText()) }),
|
|
@@ -505,8 +493,8 @@ export function planWirePartShape(part: PlanPart, options: PlanWireOptions = {})
|
|
|
505
493
|
|
|
506
494
|
/**
|
|
507
495
|
* The format a model writes one part of a plan in — one request each (vectoriox/iox-cms#47). The same for every studio
|
|
508
|
-
* and run
|
|
509
|
-
*
|
|
496
|
+
* and run: nothing in it is pinned, so the provider compiles each part's grammar once (one wire for every tier since
|
|
497
|
+
* AW-D42 — the Pages part carries `globals.body`).
|
|
510
498
|
*/
|
|
511
499
|
export function planWirePartJsonSchema(part: PlanPart, options: PlanWireOptions = {}): JsonSchema {
|
|
512
500
|
const gaps = planWireGaps();
|
|
@@ -754,11 +742,11 @@ const PLAN_TO_WIRE: Readonly<Record<string, (plan: SitePlan, options: PlanWireOp
|
|
|
754
742
|
contentTypes: plan => plan.contentTypes.map(type => contentTypeToWire(type)),
|
|
755
743
|
dataSources: plan => plan.dataSources.map(dataSourceToWire),
|
|
756
744
|
pages: plan => plan.pages.map(page => pageToWire(page)),
|
|
757
|
-
globals:
|
|
745
|
+
globals: plan => ({
|
|
758
746
|
...plan.globals, [GlobalSlot.Header]: headerMixWords(headerMixOfPlan(plan)), [GlobalSlot.Footer]: footerMixWords(footerMixOfPlan(plan)),
|
|
759
747
|
[OPENING_WIRE_KEY]: [...(plan.mixes?.opening ?? [])],
|
|
760
|
-
// AW6: the
|
|
761
|
-
|
|
748
|
+
// AW6: the wire writes the body ([] = none) — at every tier since AW-D42.
|
|
749
|
+
[BODY_WIRE_KEY]: [...(plan.mixes?.body ?? [])],
|
|
762
750
|
[POPUP_WIRE_KEY]: [...(plan.mixes?.popup ?? [])],
|
|
763
751
|
}),
|
|
764
752
|
direction: plan => ({ idea: plan.direction?.idea ?? NONE, cliche: plan.direction?.cliche ?? NONE, flip: plan.direction?.flip ?? NONE, rules: [...(plan.direction?.rules ?? [])] }),
|
|
@@ -28,6 +28,7 @@ export * from './validate-site-plan';
|
|
|
28
28
|
export * from './compose-site';
|
|
29
29
|
export * from './contact-facts';
|
|
30
30
|
export * from './nav-shape';
|
|
31
|
+
export * from './item-fill';
|
|
31
32
|
export * from './entrances';
|
|
32
33
|
export * from './text-scroll';
|
|
33
34
|
export * from './plan-data';
|
|
@@ -70,7 +71,9 @@ export * from './check-free';
|
|
|
70
71
|
export * from './free-fallback';
|
|
71
72
|
export * from './free-slots';
|
|
72
73
|
export * from './compose-free';
|
|
74
|
+
export * from './free-parts';
|
|
73
75
|
export * from './free-render-check';
|
|
76
|
+
export * from './free-opening';
|
|
74
77
|
export * from './prompt-limits';
|
|
75
78
|
export * from './layout-photos';
|
|
76
79
|
export * from './photo-inventory';
|
|
@@ -88,6 +91,7 @@ export * from './header-mix';
|
|
|
88
91
|
export * from './header-edit';
|
|
89
92
|
export * from './opening-mix';
|
|
90
93
|
export * from './body-mix';
|
|
94
|
+
export * from './colour-mix';
|
|
91
95
|
export * from './popup-plan';
|
|
92
96
|
export * from './opening-edit';
|
|
93
97
|
export * from './footer-mix';
|
|
@@ -338,6 +338,10 @@ export interface BuildComposeDecisions {
|
|
|
338
338
|
legal?: LegalContext | null;
|
|
339
339
|
/** The reading's kind of business (harness-core id): calm (AW6), the footer's call word and what it never wears (AW12). */
|
|
340
340
|
businessType?: string | null;
|
|
341
|
+
/** HI3-D5: the preflight's judgement of the header's words at rest over the home opening's picture
|
|
342
|
+
* (`headerReadableOfSite`, where the picture's pixels are known) — every compose of the run takes the same answer.
|
|
343
|
+
* Absent or null: not judged. */
|
|
344
|
+
headerReadable?: boolean | null;
|
|
341
345
|
}
|
|
342
346
|
|
|
343
347
|
/** The run as `GET …/site-builds/:id` (and `?latest=1`) answers it. */
|