@vectoriox/iox-ui 5.165.0 → 5.167.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/actions-core/index.d.ts +7 -1
- package/design-core/index.d.ts +112 -1
- package/fesm2022/vectoriox-iox-ui-actions-core.mjs +9 -1
- package/fesm2022/vectoriox-iox-ui-actions-core.mjs.map +1 -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 +621 -98
- 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.mjs +49 -7
- package/fesm2022/vectoriox-iox-ui.mjs.map +1 -1
- package/generation-core/index.d.ts +1668 -1392
- package/harness-core/index.d.ts +192 -1
- package/index.d.ts +17 -3
- package/package.json +1 -1
- package/src/actions-core/element-actions.ts +9 -0
- 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/compose-site.ts +34 -6
- package/src/generation-core/footer-mix.ts +292 -34
- package/src/generation-core/layout-drift.ts +36 -3
- package/src/generation-core/layout-language.ts +3 -0
- package/src/generation-core/layout-wire.ts +1 -1
- package/src/generation-core/node-baselines.generated.ts +14 -1
- package/src/generation-core/opening-mix.ts +82 -6
- package/src/generation-core/patterns.ts +4 -1
- package/src/generation-core/public-api.ts +2 -0
- package/src/generation-core/site-spec.generated.ts +198 -49
- package/src/harness-core/business-types.ts +12 -0
- package/src/harness-core/harness-spec.generated.ts +261 -0
- package/styles/iox-design.css +99 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { DesignChoices, elementStyleFace, resolveDesignChoices, textWidthEm } from '@vectoriox/iox-ui/design-core';
|
|
1
|
+
import { DesignChoices, designTokenRows, elementStyleFace, FOOTER_MIX_PROP, resolveDesignChoices, SECTION_SHAPE_TRAIT, SectionShape, textWidthEm } from '@vectoriox/iox-ui/design-core';
|
|
2
2
|
|
|
3
3
|
import { layoutColumnPx, layoutGutterPx } from './layout-column';
|
|
4
|
-
import { screenFontSize, screenWordOverflowPx } from './layout-language';
|
|
4
|
+
import { layoutRoomPx, screenFontSize, screenWordOverflowPx } from './layout-language';
|
|
5
5
|
import { PatternGlobalPosition, PatternNode, SITE_PATTERNS, SitePattern } from './patterns';
|
|
6
6
|
import { SPEC_SITE_FOOTER_PARTS, SPEC_SITE_LAYOUT } from './site-spec.generated';
|
|
7
7
|
|
|
@@ -23,6 +23,8 @@ export enum FooterIngredient {
|
|
|
23
23
|
Holds = 'holds',
|
|
24
24
|
Closing = 'closing',
|
|
25
25
|
Ground = 'ground',
|
|
26
|
+
/** AW12 (AW12-D12): how the closing name is worn. Not in the fingerprint (AW12-D14). */
|
|
27
|
+
NameStyle = 'nameStyle',
|
|
26
28
|
}
|
|
27
29
|
|
|
28
30
|
/** The words, by the table (a word that waits for its phase too — `footerWords` offers only the drawn ones). */
|
|
@@ -69,20 +71,45 @@ export enum FooterGround {
|
|
|
69
71
|
Inset = 'inset',
|
|
70
72
|
}
|
|
71
73
|
|
|
74
|
+
export enum FooterNameStyle {
|
|
75
|
+
Plain = 'plain',
|
|
76
|
+
Gradient = 'gradient',
|
|
77
|
+
Emboss = 'emboss',
|
|
78
|
+
Offset = 'offset',
|
|
79
|
+
}
|
|
80
|
+
|
|
72
81
|
/** The roles a footer's parts carry — the contract's (`site.footerParts` and the stored footers), written to the node's
|
|
73
82
|
* `role`, a class `iox-role-<role>` both renderers emit. */
|
|
74
83
|
export enum FooterRole {
|
|
75
84
|
/** The footer's page list (the Pages block, or the page row of a line or centred footer): a navigation list — its
|
|
76
85
|
* links rest with no line (vectoriox/iox-ui#87/#97, iox-design.css), as a header's do. */
|
|
77
86
|
Links = 'footer.links',
|
|
87
|
+
/** The closing name (`closing.name`, `closing.name-and-action`): iox-design.css fits, cuts and wears it. */
|
|
88
|
+
Name = 'footer.name',
|
|
89
|
+
/** AW12-D12: a gradient or embossed closing name is a decorative COPY of the name the brand block already says — hidden
|
|
90
|
+
* from assistive technology (`nodeA11yAttributes`). */
|
|
91
|
+
NameCopy = 'footer.name-copy',
|
|
92
|
+
/** AW12 `closing.word`: the call word that is the contact link. */
|
|
93
|
+
Word = 'footer.word',
|
|
94
|
+
/** AW12 name-and-action: the row above the name, and its end block (the thank-you line, the action, the legal row). */
|
|
95
|
+
End = 'footer.end',
|
|
96
|
+
EndBlock = 'footer.endblock',
|
|
97
|
+
/** AW12 `arrange.ruled`: the grid whose cells are divided by hairlines. */
|
|
98
|
+
Ruled = 'footer.ruled',
|
|
99
|
+
/** AW12 `arrange.list-big`: the pages stacked large. */
|
|
100
|
+
ListBig = 'footer.list-big',
|
|
78
101
|
}
|
|
79
102
|
|
|
103
|
+
|
|
104
|
+
|
|
80
105
|
/** One word per ingredient; `holds` several, in the table's order. */
|
|
81
106
|
export interface FooterMix {
|
|
82
107
|
readonly arrange: string;
|
|
83
108
|
readonly holds: ReadonlyArray<string>;
|
|
84
109
|
readonly closing: string;
|
|
85
110
|
readonly ground: string;
|
|
111
|
+
/** AW12: absent = plain (a stored or hand-made mix written before the name had a style). */
|
|
112
|
+
readonly nameStyle?: string;
|
|
86
113
|
}
|
|
87
114
|
|
|
88
115
|
export class FooterMixError extends Error {}
|
|
@@ -144,16 +171,23 @@ export function namedFooterMix(patternId: string): FooterMix | null {
|
|
|
144
171
|
|
|
145
172
|
/** The stored footer pattern a mix is exactly, else null. */
|
|
146
173
|
export function footerPatternIdOf(mix: FooterMix): string | null {
|
|
147
|
-
const key = footerTokenOf(mix) + JSON.stringify(mix.holds);
|
|
174
|
+
const key = footerTokenOf(mix) + JSON.stringify(mix.holds) + nameStyleOf(mix);
|
|
148
175
|
return Object.keys(F.named).find(id => {
|
|
149
176
|
const m = namedFooterMix(id)!;
|
|
150
|
-
return footerTokenOf(m) + JSON.stringify(m.holds) === key;
|
|
177
|
+
return footerTokenOf(m) + JSON.stringify(m.holds) + nameStyleOf(m) === key;
|
|
151
178
|
}) ?? null;
|
|
152
179
|
}
|
|
153
180
|
|
|
154
|
-
/**
|
|
181
|
+
/** The name's style of a mix (absent = plain). */
|
|
182
|
+
export const nameStyleOf = (mix: Pick<FooterMix, 'nameStyle'>): string => mix.nameStyle ?? FooterNameStyle.Plain;
|
|
183
|
+
|
|
184
|
+
/** A mix on the wire: ONE list of `<ingredient>:<word>` words (the list wire's encoding), `holds` once per block. A plain
|
|
185
|
+
* name says nothing (`nameStyle:plain` is every mix's), so a mix stored before AW12 reads and writes the same words. */
|
|
155
186
|
export function footerMixWords(mix: FooterMix): string[] {
|
|
156
|
-
return Object.values(FooterIngredient).flatMap(k =>
|
|
187
|
+
return Object.values(FooterIngredient).flatMap(k => {
|
|
188
|
+
if (k === FooterIngredient.NameStyle) return nameStyleOf(mix) === FooterNameStyle.Plain ? [] : [`${k}:${nameStyleOf(mix)}`];
|
|
189
|
+
return (MANY.includes(k) ? mix[k] as ReadonlyArray<string> : [mix[k] as string]).map(w => `${k}:${w}`);
|
|
190
|
+
});
|
|
157
191
|
}
|
|
158
192
|
|
|
159
193
|
/** Every `<ingredient>:<word>` the wire may carry: the drawn words only. */
|
|
@@ -171,11 +205,12 @@ export function drawnFooterMix(mix: FooterMix): { mix: FooterMix; waited: Array<
|
|
|
171
205
|
waited.push({ ingredient: k, word: w, ...wait });
|
|
172
206
|
return wait.drawnAs;
|
|
173
207
|
};
|
|
174
|
-
const one = (k: FooterIngredient): string => drawn(k, mix[k
|
|
208
|
+
const one = (k: FooterIngredient): string => drawn(k, (mix[k as keyof FooterMix] ?? (F.defaults as unknown as FooterMix)[k as keyof FooterMix]) as string)
|
|
209
|
+
?? (F.defaults as unknown as FooterMix)[k as keyof FooterMix] as string;
|
|
175
210
|
// In the table's order, so the words that waited are said as the table reads.
|
|
176
211
|
const arrange = one(FooterIngredient.Arrange);
|
|
177
212
|
const holds = inOrder(FooterIngredient.Holds, mix.holds.map(h => drawn(FooterIngredient.Holds, h)).filter((h): h is string => !!h));
|
|
178
|
-
const out = { arrange, holds, closing: one(FooterIngredient.Closing), ground: one(FooterIngredient.Ground) };
|
|
213
|
+
const out = { arrange, holds, closing: one(FooterIngredient.Closing), ground: one(FooterIngredient.Ground), nameStyle: one(FooterIngredient.NameStyle) };
|
|
179
214
|
return { mix: waited.length ? out : mix, waited };
|
|
180
215
|
}
|
|
181
216
|
|
|
@@ -225,12 +260,32 @@ export enum FooterRepairCode {
|
|
|
225
260
|
LineHolds = 'line-holds',
|
|
226
261
|
/** A footer that holds nothing and closes with nothing: it holds the pages. */
|
|
227
262
|
Empty = 'empty',
|
|
228
|
-
/** The name is too long to stand across a phone's width at the smallest size: no closing name
|
|
263
|
+
/** The name is too long to stand across a phone's width at the smallest size: no closing name (name-and-action keeps
|
|
264
|
+
* its action and leaves the name out — AW12-D4). */
|
|
229
265
|
NameTooLong = 'name-too-long',
|
|
230
266
|
/** Another site already wears this footer: the nearest free one (`distinctFooter`). */
|
|
231
267
|
Worn = 'worn',
|
|
232
268
|
/** A word the product draws in a later phase: drawn as its stand-in meanwhile (the table's `waits`). */
|
|
233
269
|
Waits = 'waits',
|
|
270
|
+
/** AW12: a statement is the owner's tagline — none given, the footer closes with the call. */
|
|
271
|
+
StatementWithoutWords = 'statement-without-words',
|
|
272
|
+
/** AW12: the tagline stands more lines on a phone than a statement may: the call. */
|
|
273
|
+
StatementTooLong = 'statement-too-long',
|
|
274
|
+
/** AW12: the call word is too wide for a phone even on two lines: the call. */
|
|
275
|
+
WordTooLong = 'word-too-long',
|
|
276
|
+
/** AW12: a block name-and-action has no place for is left out (it keeps the pages and the legal row). */
|
|
277
|
+
LeftOut = 'left-out',
|
|
278
|
+
/** AW12: ruled cells need company — fewer blocks are drawn as columns. */
|
|
279
|
+
RuledFewBlocks = 'ruled-few-blocks',
|
|
280
|
+
/** AW12: more pages than a large list holds — the first ones large, the rest small. */
|
|
281
|
+
ListBigLong = 'list-big-long',
|
|
282
|
+
/** AW12: a name style with no closing name to wear it: plain. */
|
|
283
|
+
NameStyleWithoutName = 'name-style-without-name',
|
|
284
|
+
/** AW12-D12: an embossed or gradient name is a decorative copy — only beside the brand block that says the name. */
|
|
285
|
+
EmbossNeedsBrand = 'emboss-needs-brand',
|
|
286
|
+
/** AW12-D10 (H1): a word the kind of business never closes with or stands on (harness FOOTER_NEVER): the call · the
|
|
287
|
+
* dark band. */
|
|
288
|
+
TypeNever = 'type-never',
|
|
234
289
|
}
|
|
235
290
|
|
|
236
291
|
export interface FooterRepair {
|
|
@@ -239,6 +294,17 @@ export interface FooterRepair {
|
|
|
239
294
|
said: string;
|
|
240
295
|
}
|
|
241
296
|
|
|
297
|
+
/** AW12-D10: what a kind of business's footer never closes with or stands on (contract harness
|
|
298
|
+
* `businessTypes[].footer`, from harness.mjs FOOTER_NEVER; harness-core `BusinessType.footer`). */
|
|
299
|
+
export interface FooterNever {
|
|
300
|
+
readonly closings: ReadonlyArray<string>;
|
|
301
|
+
readonly grounds: ReadonlyArray<string>;
|
|
302
|
+
/** Why, in the owner's words — said with the mend. */
|
|
303
|
+
readonly say: ReadonlyArray<string>;
|
|
304
|
+
/** One Hebrew sentence for each English one. */
|
|
305
|
+
readonly sayHe?: ReadonlyArray<string>;
|
|
306
|
+
}
|
|
307
|
+
|
|
242
308
|
/** What the check needs of the site: the business name and the look it wears. */
|
|
243
309
|
export interface FooterContext {
|
|
244
310
|
name: string;
|
|
@@ -246,13 +312,67 @@ export interface FooterContext {
|
|
|
246
312
|
/** The business's tagline: absent or blank, the brand block holds the name alone — never the Text's default words
|
|
247
313
|
* (a copy placeholder never blocks publishing, so an empty one would go live as "Enter text here"). */
|
|
248
314
|
tagline?: string;
|
|
315
|
+
/** AW12: the kind of business (harness), which chooses the call word (`footerCallWord`); absent = everyone's word. */
|
|
316
|
+
type?: string;
|
|
317
|
+
/** AW12: how many pages the site's navigation lists (list-big holds a few large); absent = not judged. */
|
|
318
|
+
pages?: number;
|
|
319
|
+
/** AW12: the site's language — the call word's and the closed copy's. */
|
|
320
|
+
locale?: string;
|
|
321
|
+
/** AW12-D10: what this kind of business's footer never wears (absent = nothing refused). */
|
|
322
|
+
never?: FooterNever | null;
|
|
249
323
|
}
|
|
250
324
|
|
|
251
325
|
/** The phone the closing name must fit (the render check's). */
|
|
252
326
|
const PHONE_WIDTH = 390;
|
|
327
|
+
const RULES = F.rules as unknown as Readonly<Record<string, number | ReadonlyArray<string>>>;
|
|
328
|
+
const rule = (k: string): number => Number(RULES[k]);
|
|
253
329
|
|
|
330
|
+
/** How wide `text` stands at 1em in an element style's face. */
|
|
331
|
+
const widthEm = (text: string, ctx: FooterContext, style = 'display'): number => textWidthEm(text, elementStyleFace(ctx.design, style));
|
|
254
332
|
/** How wide the name stands at 1em in the look's display face. */
|
|
255
|
-
const nameWidthEm = (ctx: FooterContext): number =>
|
|
333
|
+
const nameWidthEm = (ctx: FooterContext): number => widthEm(ctx.name, ctx);
|
|
334
|
+
/** True when a word `em` wide runs past a phone's room at the smallest screen size. */
|
|
335
|
+
const overflowsPhone = (em: number, ctx: FooterContext): boolean =>
|
|
336
|
+
screenWordOverflowPx(em, 12, PHONE_WIDTH, true, { gutter: layoutGutterPx(ctx.design.density) }) > 0;
|
|
337
|
+
/** The closings that set the name large. */
|
|
338
|
+
const NAME_CLOSINGS: ReadonlyArray<string> = [FooterClosing.Name, FooterClosing.NameAndAction];
|
|
339
|
+
/** What name-and-action holds (the rest has no place — AW12-D3). */
|
|
340
|
+
const END_HOLDS: ReadonlyArray<string> = [FooterHold.Pages, FooterHold.Legal];
|
|
341
|
+
/** True when the footer's body says the business name in its brand block. */
|
|
342
|
+
const holdsBrand = (mix: FooterMix): boolean => mix.arrange !== FooterArrange.Line && mix.closing !== FooterClosing.NameAndAction;
|
|
343
|
+
|
|
344
|
+
/** AW12-D15: the call word for a kind of business — closed copy (the contract's `FOOTER.callWords`), in the site's
|
|
345
|
+
* language. */
|
|
346
|
+
export function footerCallWord(type?: string, locale?: string): string {
|
|
347
|
+
const rows = F.callWords as unknown as ReadonlyArray<{ text: string; he: string; types: ReadonlyArray<string> }>;
|
|
348
|
+
const row = rows.find(r => type && r.types.includes(type)) ?? rows[rows.length - 1];
|
|
349
|
+
return locale === 'he' ? row.he : row.text;
|
|
350
|
+
}
|
|
351
|
+
|
|
352
|
+
/** The smallest px a token's size reaches (`clamp(28px, …)` → 28, `40px` → 40), or null. */
|
|
353
|
+
function smallestPx(value: string | undefined): number | null {
|
|
354
|
+
const m = /^\s*(?:clamp\(\s*)?([\d.]+)px/.exec(value ?? '');
|
|
355
|
+
return m ? Number(m[1]) : null;
|
|
356
|
+
}
|
|
357
|
+
|
|
358
|
+
/** How many lines the tagline stands on a phone at the statement's size (the display size at its smallest). */
|
|
359
|
+
function statementPhoneLines(tagline: string, ctx: FooterContext): number {
|
|
360
|
+
const rows = new Map(designTokenRows(ctx.design).map(r => [r.name, r.value]));
|
|
361
|
+
const size = smallestPx(rows.get('size-display')) ?? 36;
|
|
362
|
+
const room = layoutRoomPx(12, PHONE_WIDTH, true, { gutter: layoutGutterPx(ctx.design.density) });
|
|
363
|
+
return Math.ceil((widthEm(tagline, ctx) * size) / room);
|
|
364
|
+
}
|
|
365
|
+
|
|
366
|
+
/** True when the call word cannot stand on a phone even split over two balanced lines. */
|
|
367
|
+
function wordTooWide(word: string, ctx: FooterContext): boolean {
|
|
368
|
+
const halves = word.split(/\s+/);
|
|
369
|
+
const longest = Math.max(widthEm(halves.slice(0, Math.ceil(halves.length / 2)).join(' '), ctx, 'link-display'),
|
|
370
|
+
widthEm(halves.slice(Math.ceil(halves.length / 2)).join(' '), ctx, 'link-display'));
|
|
371
|
+
return overflowsPhone(widthEm(word, ctx, 'link-display'), ctx) && overflowsPhone(longest, ctx);
|
|
372
|
+
}
|
|
373
|
+
|
|
374
|
+
/** True when the business name stands across a phone at the smallest screen size. */
|
|
375
|
+
export const footerNameFits = (ctx: FooterContext): boolean => !overflowsPhone(nameWidthEm(ctx), ctx);
|
|
256
376
|
|
|
257
377
|
/**
|
|
258
378
|
* 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
|
|
@@ -260,27 +380,76 @@ const nameWidthEm = (ctx: FooterContext): number => textWidthEm(ctx.name, elemen
|
|
|
260
380
|
*/
|
|
261
381
|
export function checkFooter(given: FooterMix, ctx: FooterContext): { mix: FooterMix; repairs: FooterRepair[] } {
|
|
262
382
|
const repairs: FooterRepair[] = [];
|
|
383
|
+
const say = (code: FooterRepairCode, said: string) => repairs.push({ code, said });
|
|
263
384
|
const { mix, waited } = drawnFooterMix(given);
|
|
264
385
|
if (waited.length) {
|
|
265
|
-
|
|
386
|
+
say(FooterRepairCode.Waits, waited.map(w => `the footer's ${w.ingredient} "${w.word}" is drawn in ${w.phase}: ${w.drawnAs ? `"${w.drawnAs}" meanwhile` : 'left out meanwhile'}`).join('; '));
|
|
266
387
|
}
|
|
267
388
|
let holds = inOrder(FooterIngredient.Holds, mix.holds);
|
|
268
389
|
let closing = mix.closing;
|
|
269
|
-
|
|
390
|
+
let arrange = mix.arrange;
|
|
391
|
+
let nameStyle = nameStyleOf(mix);
|
|
392
|
+
let ground = mix.ground;
|
|
393
|
+
const why = ctx.never?.say?.length ? ` — ${(ctx.locale === 'he' && ctx.never.sayHe?.length ? ctx.never.sayHe : ctx.never.say).join(' ')}` : '';
|
|
394
|
+
if (ctx.never?.closings.includes(closing)) {
|
|
395
|
+
say(FooterRepairCode.TypeNever, `this kind of business never closes its footer with a ${closing}: the call${why}`);
|
|
396
|
+
closing = FooterClosing.Call;
|
|
397
|
+
}
|
|
398
|
+
if (ctx.never?.grounds.includes(ground)) {
|
|
399
|
+
say(FooterRepairCode.TypeNever, `this kind of business never stands its footer on a ${ground}: the dark band${why}`);
|
|
400
|
+
ground = FooterGround.Inverse;
|
|
401
|
+
}
|
|
402
|
+
if (arrange === FooterArrange.Line) {
|
|
270
403
|
const kept = holds.filter(h => (F.rules.lineHolds as ReadonlyArray<string>).includes(h));
|
|
271
404
|
const left = holds.filter(h => !kept.includes(h));
|
|
272
|
-
if (left.length)
|
|
405
|
+
if (left.length) say(FooterRepairCode.LineHolds, `a one-line footer holds only ${F.rules.lineHolds.join(' and ')}: ${left.join(' and ')} left out`);
|
|
273
406
|
holds = kept;
|
|
274
407
|
}
|
|
275
|
-
if (closing === FooterClosing.
|
|
276
|
-
|
|
408
|
+
if (closing === FooterClosing.Statement) {
|
|
409
|
+
const tagline = ctx.tagline?.trim();
|
|
410
|
+
if (!tagline) {
|
|
411
|
+
say(FooterRepairCode.StatementWithoutWords, 'a statement is the business\'s own line and it has none yet: the footer closes with a call');
|
|
412
|
+
closing = FooterClosing.Call;
|
|
413
|
+
} else if (statementPhoneLines(tagline, ctx) > rule('statementPhoneLines')) {
|
|
414
|
+
say(FooterRepairCode.StatementTooLong, `"${tagline}" stands more than ${rule('statementPhoneLines')} lines on a phone: the footer closes with a call`);
|
|
415
|
+
closing = FooterClosing.Call;
|
|
416
|
+
}
|
|
417
|
+
}
|
|
418
|
+
if (closing === FooterClosing.Word && wordTooWide(footerCallWord(ctx.type, ctx.locale), ctx)) {
|
|
419
|
+
say(FooterRepairCode.WordTooLong, `"${footerCallWord(ctx.type, ctx.locale)}" is too wide for a phone even on two lines: the footer closes with a call`);
|
|
420
|
+
closing = FooterClosing.Call;
|
|
421
|
+
}
|
|
422
|
+
if (closing === FooterClosing.Name && !footerNameFits(ctx)) {
|
|
423
|
+
say(FooterRepairCode.NameTooLong, `"${ctx.name}" is too long to stand across a phone: the footer closes with nothing`);
|
|
277
424
|
closing = FooterClosing.None;
|
|
278
425
|
}
|
|
426
|
+
if (closing === FooterClosing.NameAndAction) {
|
|
427
|
+
const left = holds.filter(h => !END_HOLDS.includes(h));
|
|
428
|
+
if (left.length) say(FooterRepairCode.LeftOut, `a name-and-action footer holds the pages and the legal row: ${left.join(' and ')} left out`);
|
|
429
|
+
holds = holds.filter(h => END_HOLDS.includes(h));
|
|
430
|
+
if (!footerNameFits(ctx)) say(FooterRepairCode.NameTooLong, `"${ctx.name}" is too long to stand across a phone: the action stays, the name is left out`);
|
|
431
|
+
}
|
|
432
|
+
if (arrange === FooterArrange.Ruled && holds.length + 1 < rule('ruledMinBlocks')) {
|
|
433
|
+
say(FooterRepairCode.RuledFewBlocks, `ruled cells need company and the footer holds ${holds.length + 1} block${holds.length ? 's' : ''}: drawn as columns`);
|
|
434
|
+
arrange = FooterArrange.Columns;
|
|
435
|
+
}
|
|
436
|
+
if (arrange === FooterArrange.ListBig && ctx.pages !== undefined && ctx.pages > rule('listBigPages')) {
|
|
437
|
+
say(FooterRepairCode.ListBigLong, `${ctx.pages} pages are more than a large list holds: the first ${rule('listBigLarge')} large, the rest small`);
|
|
438
|
+
}
|
|
439
|
+
if (nameStyle !== FooterNameStyle.Plain && !NAME_CLOSINGS.includes(closing)) {
|
|
440
|
+
say(FooterRepairCode.NameStyleWithoutName, `the footer sets no name large, so it wears no "${nameStyle}" name`);
|
|
441
|
+
nameStyle = FooterNameStyle.Plain;
|
|
442
|
+
}
|
|
443
|
+
const kept = { ...mix, holds, closing, arrange, nameStyle, ground };
|
|
444
|
+
if ((nameStyle === FooterNameStyle.Gradient || nameStyle === FooterNameStyle.Emboss) && !holdsBrand(kept)) {
|
|
445
|
+
say(FooterRepairCode.EmbossNeedsBrand, `a ${nameStyle} name is a copy of the name the brand block says, and this footer has none: plain`);
|
|
446
|
+
nameStyle = FooterNameStyle.Plain;
|
|
447
|
+
}
|
|
279
448
|
if (holds.length < F.rules.minHolds && closing === FooterClosing.None) {
|
|
280
|
-
|
|
449
|
+
say(FooterRepairCode.Empty, 'a footer that holds nothing holds the pages');
|
|
281
450
|
holds = [FooterHold.Pages];
|
|
282
451
|
}
|
|
283
|
-
return { mix: { ...mix, holds, closing }, repairs };
|
|
452
|
+
return { mix: { ...mix, holds, closing, arrange, nameStyle, ground }, repairs };
|
|
284
453
|
}
|
|
285
454
|
|
|
286
455
|
// ── The recipe: the mix arranged from the contract's parts ─────────────────────────────────────────────────────────
|
|
@@ -298,10 +467,11 @@ const centred = (node: PatternNode): PatternNode => ({
|
|
|
298
467
|
...laid(node, WORDS.has(node.t) ? { textAlign: 'center' } : CENTRED),
|
|
299
468
|
...(node.c ? { c: node.c.map(centred) } : {}),
|
|
300
469
|
});
|
|
301
|
-
/** The brand block: the name, and the tagline only when the business has one. */
|
|
302
|
-
const brandPart = (ctx: FooterContext): PatternNode => {
|
|
470
|
+
/** The brand block: the name, and the tagline only when the business has one and no statement says it already. */
|
|
471
|
+
const brandPart = (ctx: FooterContext, mix?: FooterMix): PatternNode => {
|
|
303
472
|
const node = part('brand');
|
|
304
|
-
|
|
473
|
+
const tagline = ctx.tagline?.trim() && mix?.closing !== FooterClosing.Statement;
|
|
474
|
+
return tagline ? node : { ...node, c: (node.c ?? []).filter(n => n.fromBusiness !== 'tagline') };
|
|
305
475
|
};
|
|
306
476
|
|
|
307
477
|
/** The columns of a footer's grid: the name's block wider, one column per block it holds. */
|
|
@@ -313,14 +483,27 @@ function columnsOf(count: number): Pick<PatternNode, 'lay' | 'resp'> {
|
|
|
313
483
|
return { lay, resp };
|
|
314
484
|
}
|
|
315
485
|
|
|
316
|
-
/**
|
|
317
|
-
* screen word
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
486
|
+
/** A word fitted to the column as a layout's screen word is (`screenFontSize`, the 12-column room), never under the
|
|
487
|
+
* smallest or over the largest screen word. Award §0c CW2 / iox-ui#117: the column of the PAGE it is on (`content-cap`),
|
|
488
|
+
* the site's word only its fallback — a global footer fits a narrow page of a contained site. */
|
|
489
|
+
const columnSize = (em: number, ctx: FooterContext, cols = 12): string =>
|
|
490
|
+
screenFontSize(em, cols, 0, 0, 0, layoutColumnPx(ctx.design.column, ctx.design.density), true);
|
|
491
|
+
|
|
492
|
+
/** The closing name: the business name across the width, fitted to the name in the look's display face. A gradient or an
|
|
493
|
+
* embossed name is the decorative copy (AW12-D12). */
|
|
494
|
+
function closingName(ctx: FooterContext, mix: FooterMix): PatternNode {
|
|
495
|
+
const style = nameStyleOf(mix);
|
|
496
|
+
const copy = style === FooterNameStyle.Gradient || style === FooterNameStyle.Emboss;
|
|
497
|
+
// An offset name starts at the second of twelve columns (iox-design.css), so it is fitted to eleven.
|
|
498
|
+
const cols = style === FooterNameStyle.Offset ? 11 : 12;
|
|
499
|
+
return { ...laid(part('name'), { fontSize: columnSize(nameWidthEm(ctx), ctx, cols) }), ...(copy ? { role: FooterRole.NameCopy } : {}) };
|
|
500
|
+
}
|
|
501
|
+
|
|
502
|
+
/** The call word (AW12 `closing.word`): closed copy for the business, fitted to the column. */
|
|
503
|
+
function callWord(ctx: FooterContext): PatternNode {
|
|
504
|
+
const text = footerCallWord(ctx.type);
|
|
505
|
+
const node = part('word');
|
|
506
|
+
return { ...laid(node, { fontSize: columnSize(widthEm(text, ctx, 'link-display'), ctx) }), text, textHe: footerCallWord(ctx.type, 'he') };
|
|
324
507
|
}
|
|
325
508
|
|
|
326
509
|
/** A block it holds: how to reach the business leaves its city to the visit block when the footer holds both. */
|
|
@@ -330,6 +513,19 @@ function holdPart(hold: string, mix: FooterMix): PatternNode {
|
|
|
330
513
|
return { ...node, c: (node.c ?? []).filter(n => n.ph !== 'city') };
|
|
331
514
|
}
|
|
332
515
|
|
|
516
|
+
/** list-big's pages (AW12): stacked large in the display face; past `listBigPages` the first `listBigLarge` large and the
|
|
517
|
+
* rest in a small row. */
|
|
518
|
+
function bigPages(ctx: FooterContext): PatternNode[] {
|
|
519
|
+
const many = ctx.pages !== undefined && ctx.pages > rule('listBigPages');
|
|
520
|
+
const link = (part('pages').c ?? []).find(n => n.each)!;
|
|
521
|
+
const big: PatternNode = { t: 'Container', es: 'box', role: FooterRole.ListBig, lay: { display: 'flex', flexDirection: 'column', gap: '4px' }, c: [
|
|
522
|
+
{ ...link, es: 'link-display', lay: { fontSize: 'var(--iox-size-h1)', lineHeight: '1.1', width: 'auto' }, ...(many ? { limit: rule('listBigLarge') } : {}) },
|
|
523
|
+
] };
|
|
524
|
+
if (!many) return [big];
|
|
525
|
+
const rest = part('pageRow');
|
|
526
|
+
return [big, { ...rest, c: (rest.c ?? []).map(n => (n.each ? { ...n, skip: rule('listBigLarge') } : n)) }];
|
|
527
|
+
}
|
|
528
|
+
|
|
333
529
|
/** The body: the blocks it holds, arranged. */
|
|
334
530
|
function bodyOf(mix: FooterMix, ctx: FooterContext): PatternNode[] {
|
|
335
531
|
const holds = mix.holds.map(h => holdPart(h, mix));
|
|
@@ -344,26 +540,68 @@ function bodyOf(mix: FooterMix, ctx: FooterContext): PatternNode[] {
|
|
|
344
540
|
case FooterArrange.Centred: {
|
|
345
541
|
const blocks = mix.holds.map(h => (h === FooterHold.Pages ? laid(part('pageRow'), { justifyContent: 'center' }) : centred(holdPart(h, mix))));
|
|
346
542
|
return [
|
|
347
|
-
{ t: 'Container', es: 'box', lay: { display: 'flex', flexDirection: 'column', gap: '28px', ...CENTRED }, c: [centred(brandPart(ctx)), ...blocks] },
|
|
543
|
+
{ t: 'Container', es: 'box', lay: { display: 'flex', flexDirection: 'column', gap: '28px', ...CENTRED }, c: [centred(brandPart(ctx, mix)), ...blocks] },
|
|
348
544
|
part('rule'),
|
|
349
545
|
laid(part('copyright'), { textAlign: 'center' }),
|
|
350
546
|
];
|
|
351
547
|
}
|
|
548
|
+
case FooterArrange.Ruled: {
|
|
549
|
+
// Cells divided by hairlines (iox-design.css, `border-inline-start` — RTL mirrors): up to `ruledCells` in a row,
|
|
550
|
+
// a block past them under the row.
|
|
551
|
+
const cells = [brandPart(ctx, mix), ...holds];
|
|
552
|
+
const n = Math.min(cells.length, rule('ruledCells'));
|
|
553
|
+
return [{ t: 'Container', es: 'box', role: FooterRole.Ruled, lay: { display: 'grid', gridTemplateColumns: `repeat(${n}, minmax(0, 1fr))`, gap: `${GAP} 0px` },
|
|
554
|
+
resp: { tablet: { gridTemplateColumns: 'repeat(2, minmax(0, 1fr))' }, mobile: { gridTemplateColumns: 'minmax(0, 1fr)' } }, c: cells }, part('rule'), part('copyright')];
|
|
555
|
+
}
|
|
556
|
+
case FooterArrange.ListBig: {
|
|
557
|
+
const others = mix.holds.filter(h => h !== FooterHold.Pages).map(h => holdPart(h, mix));
|
|
558
|
+
const pages = mix.holds.includes(FooterHold.Pages) ? bigPages(ctx) : [];
|
|
559
|
+
return [{ t: 'Container', es: 'box', lay: { display: 'grid', gridTemplateColumns: 'minmax(0, 3fr) minmax(0, 2fr)', gap: GAP, alignItems: 'end' },
|
|
560
|
+
resp: { mobile: { gridTemplateColumns: 'minmax(0, 1fr)' } }, c: [
|
|
561
|
+
{ t: 'Container', es: 'box', lay: { display: 'flex', flexDirection: 'column', gap: GAP }, c: pages },
|
|
562
|
+
{ t: 'Container', es: 'box', lay: { display: 'flex', flexDirection: 'column', gap: GAP }, c: [brandPart(ctx, mix), ...others] },
|
|
563
|
+
] }, part('rule'), part('copyright')];
|
|
564
|
+
}
|
|
352
565
|
default:
|
|
353
|
-
return [{ t: 'Container', es: 'box', ...columnsOf(holds.length), c: [brandPart(ctx), ...holds] }, part('rule'), part('copyright')];
|
|
566
|
+
return [{ t: 'Container', es: 'box', ...columnsOf(holds.length), c: [brandPart(ctx, mix), ...holds] }, part('rule'), part('copyright')];
|
|
354
567
|
}
|
|
355
568
|
}
|
|
356
569
|
|
|
570
|
+
/** name-and-action (AW12-D3): the pages at the start and the end block (the copyright, the thank-you line, the action set
|
|
571
|
+
* large) above the name, which stands on the window's bottom; a name too long for a phone is left out (AW12-D4). */
|
|
572
|
+
function endOf(mix: FooterMix, ctx: FooterContext): PatternNode[] {
|
|
573
|
+
const end = part('name-and-action');
|
|
574
|
+
const kids = (end.c ?? []).map(n => {
|
|
575
|
+
if (n.role === FooterRole.Links) return mix.holds.includes(FooterHold.Pages) ? n : null;
|
|
576
|
+
if (n.role === FooterRole.EndBlock) return { ...n, c: [laid(part('copyright'), { textAlign: 'end' }), ...(n.c ?? [])] };
|
|
577
|
+
return n;
|
|
578
|
+
}).filter((n): n is PatternNode => !!n);
|
|
579
|
+
return [{ ...end, c: kids }, ...(footerNameFits(ctx) ? [closingName(ctx, mix)] : [])];
|
|
580
|
+
}
|
|
581
|
+
|
|
582
|
+
/** What a ground draws as the footer's scheme (an inset card is the inverse band, shaped — `stampFooterMix`). */
|
|
583
|
+
const GROUND_SCHEME: Readonly<Record<string, string | null>> = {
|
|
584
|
+
[FooterGround.Inverse]: 'inverse', [FooterGround.Subtle]: 'subtle', [FooterGround.Accent]: 'accent', [FooterGround.Plain]: null,
|
|
585
|
+
[FooterGround.Inset]: 'inverse',
|
|
586
|
+
};
|
|
587
|
+
|
|
357
588
|
/** A footer mix as a pattern: what the composer stamps as the site's footer (global, after the page). Check it first. */
|
|
358
589
|
export function footerPattern(given: FooterMix, ctx: FooterContext): SitePattern {
|
|
359
590
|
const mix = drawnFooterMix(given).mix;
|
|
360
591
|
const plain = mix.ground === FooterGround.Plain;
|
|
361
|
-
const
|
|
362
|
-
|
|
363
|
-
|
|
592
|
+
const opens = {
|
|
593
|
+
[FooterClosing.Call]: () => [mix.arrange === FooterArrange.Columns ? part('call') : centred(part('call'))],
|
|
594
|
+
[FooterClosing.Statement]: () => [part('statement')],
|
|
595
|
+
[FooterClosing.Word]: () => [callWord(ctx)],
|
|
596
|
+
} as Readonly<Record<string, () => PatternNode[]>>;
|
|
597
|
+
const before = opens[mix.closing]?.() ?? [];
|
|
598
|
+
const body = mix.closing === FooterClosing.NameAndAction ? endOf(mix, ctx) : bodyOf(mix, ctx);
|
|
599
|
+
const name = mix.closing === FooterClosing.Name ? [closingName(ctx, mix)] : [];
|
|
600
|
+
const c = [...(plain ? [part('rule')] : []), ...before, ...body, ...name];
|
|
364
601
|
// The contract's shell; a Section with one child does not stack it (the patterns' rule, build-spec "more than one child").
|
|
365
602
|
const { lay, ...shell } = part('section');
|
|
366
|
-
const
|
|
603
|
+
const scheme = GROUND_SCHEME[mix.ground] ?? null;
|
|
604
|
+
const node: PatternNode = { ...shell, ...(c.length > 1 && lay ? { lay } : {}), ...(scheme ? { scheme } : {}), c };
|
|
367
605
|
// A stored footer keeps its own name and intent (the composed root is labelled with it).
|
|
368
606
|
const stored = SITE_PATTERNS[footerPatternIdOf(mix) ?? ''];
|
|
369
607
|
return {
|
|
@@ -375,6 +613,26 @@ export function footerPattern(given: FooterMix, ctx: FooterContext): SitePattern
|
|
|
375
613
|
};
|
|
376
614
|
}
|
|
377
615
|
|
|
616
|
+
/** The margin an inset footer stands at (AW12-D11): a card's padding outside the column, never closer than half the gutter
|
|
617
|
+
* to the window; its words pad back onto the column (both resolve against the page). */
|
|
618
|
+
export const FOOTER_INSET_STYLES: Readonly<Record<string, string>> = {
|
|
619
|
+
margin: '0px max(calc(var(--iox-space-gutter) / 2), calc(var(--iox-space-inline) - var(--iox-card-pad))) var(--iox-space-gutter) max(calc(var(--iox-space-gutter) / 2), calc(var(--iox-space-inline) - var(--iox-card-pad)))',
|
|
620
|
+
paddingLeft: 'calc(var(--iox-space-inline) - max(calc(var(--iox-space-gutter) / 2), calc(var(--iox-space-inline) - var(--iox-card-pad))))',
|
|
621
|
+
paddingRight: 'calc(var(--iox-space-inline) - max(calc(var(--iox-space-gutter) / 2), calc(var(--iox-space-inline) - var(--iox-card-pad))))',
|
|
622
|
+
borderRadius: 'var(--iox-radius-xl)',
|
|
623
|
+
};
|
|
624
|
+
|
|
625
|
+
/**
|
|
626
|
+
* The composed footer's root says the mix it was composed as (`FOOTER_MIX_PROP` — the classes iox-design.css draws from),
|
|
627
|
+
* and an inset footer wears the card shape (AW6's trait) at the footer's own margin. Pure on the node it is given.
|
|
628
|
+
*/
|
|
629
|
+
export function stampFooterMix(root: { props: Record<string, unknown>; styleProps?: Record<string, unknown> }, mix: FooterMix): void {
|
|
630
|
+
root.props = { ...root.props, [FOOTER_MIX_PROP]: footerMixWords({ ...mix, holds: [] }).filter(w => !w.startsWith(`${FooterIngredient.Holds}:`)).join(' ') };
|
|
631
|
+
if (mix.ground !== FooterGround.Inset) return;
|
|
632
|
+
root.props = { ...root.props, [SECTION_SHAPE_TRAIT]: SectionShape.Card };
|
|
633
|
+
root.styleProps = { ...(root.styleProps ?? {}), ...FOOTER_INSET_STYLES };
|
|
634
|
+
}
|
|
635
|
+
|
|
378
636
|
// ── No sameness: another site's footer is never worn again ─────────────────────────────────────────────────────────
|
|
379
637
|
|
|
380
638
|
/** The ingredients `distinctFooter` may change, in the order it tries them: how it closes and what it stands on before the
|
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
normalizeParallaxPhone, parallaxOffset, parallaxRest, parallaxShift, ParallaxDepth, rangeDistance, rangeProgress, ScrollRange,
|
|
3
3
|
} from '@vectoriox/iox-ui/scene-core';
|
|
4
4
|
|
|
5
|
-
import { LAYOUT_DEPTH_ON_PHONE, LAYOUT_OPERATED, LayoutDepth, LayoutLayer, LayoutSection } from './layout-language';
|
|
5
|
+
import { LAYOUT_DEPTH_ON_PHONE, LAYOUT_OPERATED, LayoutDepth, LayoutLayer, LayoutRole, LayoutSection } from './layout-language';
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* Motion ON, judged without playing it (iox-ui#65). A layer at a depth glides against the page while it passes, so two
|
|
@@ -31,10 +31,43 @@ export interface DriftMeeting {
|
|
|
31
31
|
/** The scroll is replayed in steps this long (px). */
|
|
32
32
|
const STEP_PX = 4;
|
|
33
33
|
|
|
34
|
+
type GlideLayer = Pick<LayoutLayer, 'depth' | 'kind'> & Partial<Pick<LayoutLayer, 'col' | 'row' | 'role'>>;
|
|
35
|
+
|
|
36
|
+
const cellsMeet = (p: readonly number[] | undefined, q: readonly number[] | undefined) => !!p && !!q && p[0] < q[1] && q[0] < p[1];
|
|
37
|
+
const cellArea = (a: GlideLayer, b: GlideLayer) => {
|
|
38
|
+
const w = Math.min(a.col![1], b.col![1]) - Math.max(a.col![0], b.col![0]);
|
|
39
|
+
const h = Math.min(a.row![1], b.row![1]) - Math.max(a.row![0], b.row![0]);
|
|
40
|
+
return w * h;
|
|
41
|
+
};
|
|
42
|
+
/** A layer whose own depth is a direction — back or front, never counter — and which glides in this section. */
|
|
43
|
+
const ownDirection = (section: Pick<LayoutSection, 'pin'>, o: GlideLayer): `${ParallaxDepth}` | null =>
|
|
44
|
+
section.pin || LAYOUT_OPERATED.has(o.kind) || (o.depth !== LayoutDepth.Back && o.depth !== LayoutDepth.Front) ? null
|
|
45
|
+
: o.depth === LayoutDepth.Front ? ParallaxDepth.Front : ParallaxDepth.Back;
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* Where a `counter` layer glides (AW9, the montage): the other way from the gliding layer its cells overlap most — back
|
|
49
|
+
* under a front, front under a back — so the two cross as the page passes. With none, back (it still moves against the
|
|
50
|
+
* page). A decoration never runs ahead: under a back it stays back. Pure; ties go to the earlier layer.
|
|
51
|
+
*/
|
|
52
|
+
export function layoutCounterDepth(section: Pick<LayoutSection, 'pin'> & { layers?: ReadonlyArray<GlideLayer> }, layer: GlideLayer): `${ParallaxDepth}` {
|
|
53
|
+
let best: { area: number; dir: `${ParallaxDepth}` } | null = null;
|
|
54
|
+
for (const o of section.layers ?? []) {
|
|
55
|
+
if (o === layer || !cellsMeet(o.col, layer.col) || !cellsMeet(o.row, layer.row)) continue;
|
|
56
|
+
const dir = ownDirection(section, o);
|
|
57
|
+
if (!dir) continue;
|
|
58
|
+
const area = cellArea(o, layer);
|
|
59
|
+
if (!best || area > best.area) best = { area, dir };
|
|
60
|
+
}
|
|
61
|
+
if (best?.dir === ParallaxDepth.Back && layer.role !== LayoutRole.Decoration) return ParallaxDepth.Front;
|
|
62
|
+
return ParallaxDepth.Back;
|
|
63
|
+
}
|
|
64
|
+
|
|
34
65
|
/** The depth a layer glides at in a section, as the composer stamps it — or null (mid, a held section, what a visitor
|
|
35
|
-
* operates). ONE rule: `composeLayout` stamps by it, the render check and the depth mend replay by it.
|
|
36
|
-
|
|
66
|
+
* operates). ONE rule: `composeLayout` stamps by it, the render check and the depth mend replay by it. A `counter`
|
|
67
|
+
* layer reads its neighbours (`layoutCounterDepth`), so pass the section with its layers. */
|
|
68
|
+
export function layoutGlideDepth(section: Pick<LayoutSection, 'pin'> & { layers?: ReadonlyArray<GlideLayer> }, layer: GlideLayer): `${ParallaxDepth}` | null {
|
|
37
69
|
if (section.pin || !layer.depth || layer.depth === LayoutDepth.Mid || LAYOUT_OPERATED.has(layer.kind)) return null;
|
|
70
|
+
if (layer.depth === LayoutDepth.Counter) return layoutCounterDepth(section, layer);
|
|
38
71
|
return layer.depth === LayoutDepth.Front ? ParallaxDepth.Front : ParallaxDepth.Back;
|
|
39
72
|
}
|
|
40
73
|
|
|
@@ -69,6 +69,9 @@ export enum LayoutDepth {
|
|
|
69
69
|
Back = 'back',
|
|
70
70
|
Mid = 'mid',
|
|
71
71
|
Front = 'front',
|
|
72
|
+
/** AW9 (award plan "Reddottours", the montage): glides the other way from the picture it overlaps, so the two cross as
|
|
73
|
+
* the page passes; with nothing gliding under or over it, it glides back (`layoutGlideDepth`). */
|
|
74
|
+
Counter = 'counter',
|
|
72
75
|
}
|
|
73
76
|
|
|
74
77
|
export enum LayoutTransition {
|
|
@@ -215,7 +215,7 @@ export function layoutWireJsonSchema(options: LayoutWireOptions = {}): JsonSchem
|
|
|
215
215
|
enter: oneOf(layoutEntersOffered(options.scrub), scrubOffered(options.scrub)
|
|
216
216
|
? 'plays once as it arrives (time); clipReveal opens from that side; letters: a line of words rises letter by letter (a display line)'
|
|
217
217
|
: 'plays once as it arrives (time); clipReveal opens from that side'),
|
|
218
|
-
depth: oneOf([NONE, ...V.depths], 'the
|
|
218
|
+
depth: oneOf([NONE, ...V.depths], 'back slower than the page, front faster, mid with it; counter the other way from the picture it overlaps — two pictures crossing (not in held sections)'),
|
|
219
219
|
inner: integer('0..3: how far a photo drifts inside its frame'),
|
|
220
220
|
flags: listOf(jsonOneOf(layoutFlagsOffered(options.scrub)), `switches: scrim (a shadow under words on a photo) · kinetic (lit word by word, held only) · contain · gallery: centered, freeMode, loop, drift, scroll (held only: the scroll turns it), autoplay${scrubOffered(options.scrub) ? ` · scrub (its entrance follows the scroll instead of playing once — ${options.scrub === ScrubId.Words ? 'a mask rise or letters only' : 'any entrance'}; never in the first section)` : ''}; [] for none`),
|
|
221
221
|
perView: { type: 'number', description: 'gallery slides per view; 0 for none' },
|
|
@@ -1891,6 +1891,7 @@ export const NODE_BASELINES: Readonly<Record<string, NodeBaseline>> = {
|
|
|
1891
1891
|
"traits": [
|
|
1892
1892
|
"colorScheme",
|
|
1893
1893
|
"openingMix",
|
|
1894
|
+
"footerMix",
|
|
1894
1895
|
"seam",
|
|
1895
1896
|
"sectionShape"
|
|
1896
1897
|
],
|
|
@@ -4967,7 +4968,19 @@ export const NODE_BASELINES: Readonly<Record<string, NodeBaseline>> = {
|
|
|
4967
4968
|
"menuForm",
|
|
4968
4969
|
"menuReveal",
|
|
4969
4970
|
"menuHover",
|
|
4970
|
-
"menuPhone"
|
|
4971
|
+
"menuPhone",
|
|
4972
|
+
"popupKind",
|
|
4973
|
+
"popupForm",
|
|
4974
|
+
"popupArrive",
|
|
4975
|
+
"popupScreens",
|
|
4976
|
+
"popupPageShare",
|
|
4977
|
+
"popupSeconds",
|
|
4978
|
+
"popupAgain",
|
|
4979
|
+
"popupDays",
|
|
4980
|
+
"popupFrom",
|
|
4981
|
+
"popupUntil",
|
|
4982
|
+
"popupVersion",
|
|
4983
|
+
"modal"
|
|
4971
4984
|
],
|
|
4972
4985
|
"styleTraits": [
|
|
4973
4986
|
"position",
|