@vectoriox/iox-ui 5.198.0 → 5.199.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/data-core/index.d.ts +11 -3
- package/design-core/index.d.ts +26 -1
- package/fesm2022/vectoriox-iox-ui-actions-core.mjs +6 -1
- package/fesm2022/vectoriox-iox-ui-actions-core.mjs.map +1 -1
- package/fesm2022/vectoriox-iox-ui-data-core.mjs +30 -4
- package/fesm2022/vectoriox-iox-ui-data-core.mjs.map +1 -1
- package/fesm2022/vectoriox-iox-ui-design-core.mjs +65 -1
- package/fesm2022/vectoriox-iox-ui-design-core.mjs.map +1 -1
- package/fesm2022/vectoriox-iox-ui-generation-core.mjs +10821 -10094
- package/fesm2022/vectoriox-iox-ui-generation-core.mjs.map +1 -1
- package/fesm2022/vectoriox-iox-ui-harness-core.mjs +243 -38
- package/fesm2022/vectoriox-iox-ui-harness-core.mjs.map +1 -1
- package/generation-core/index.d.ts +463 -126
- package/harness-core/index.d.ts +93 -6
- package/package.json +1 -1
- package/src/actions-core/element-actions.ts +6 -0
- package/src/data-core/placeholder-rows.ts +29 -4
- package/src/design-core/menu-look.ts +23 -0
- package/src/design-core/node-classes.ts +39 -0
- package/src/generation-core/check-free.ts +17 -9
- package/src/generation-core/compose-free.ts +7 -2
- package/src/generation-core/compose-site.ts +167 -46
- package/src/generation-core/footer-mix.ts +161 -15
- package/src/generation-core/free-opening.ts +13 -2
- package/src/generation-core/free-wire.ts +8 -0
- package/src/generation-core/header-mix.ts +31 -2
- package/src/generation-core/legal.ts +24 -0
- package/src/generation-core/menu-shelves.ts +138 -0
- package/src/generation-core/nav-shape.ts +138 -15
- package/src/generation-core/node-baselines.generated.ts +1 -0
- package/src/generation-core/patterns.ts +7 -0
- package/src/generation-core/plan-wire.ts +1 -0
- package/src/generation-core/public-api.ts +1 -0
- package/src/generation-core/site-build-run.ts +8 -0
- package/src/generation-core/site-plan.model.ts +3 -0
- package/src/generation-core/site-spec.generated.ts +230 -70
- package/src/generation-core/validate-site-plan.ts +2 -0
- package/src/harness-core/business-types.ts +4 -0
- package/src/harness-core/harness-spec.generated.ts +189 -30
- package/src/harness-core/popup-stance.ts +56 -3
- package/src/harness-core/run-compose-context.ts +25 -5
- package/styles/iox-design.css +25 -0
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { AccountRole, ShopRole } from '@vectoriox/iox-ui/composite-core';
|
|
2
2
|
import { commerceLanguage } from '@vectoriox/iox-ui/commerce-core';
|
|
3
|
-
import { LinkType, MenuButtonKind, menuButtonOf, menuButtonProps, menuDialogProps, MenuLook, MenuTrait } from '@vectoriox/iox-ui/design-core';
|
|
3
|
+
import { LinkType, MenuButtonKind, menuButtonOf, menuButtonProps, menuDialogProps, MenuLook, MenuShows, menuShowsOf, MenuTrait } from '@vectoriox/iox-ui/design-core';
|
|
4
4
|
|
|
5
5
|
import { PatternGlobalPosition } from './patterns';
|
|
6
6
|
import { createSerializedNode, SerializedNode, walkSerialized } from './serialized-node';
|
|
7
|
+
import { SPEC_SITE_LAYOUT } from './site-spec.generated';
|
|
7
8
|
|
|
8
9
|
/**
|
|
9
10
|
* The phone shapes of a navigation bar (complex-components plan CC1, §7a + R1; boards 1–3). ONE pure tree
|
|
@@ -54,6 +55,19 @@ export enum NavRole {
|
|
|
54
55
|
/** HI1: one of the two equal sides of a header whose name is centred (`between`, `centred` behind a menu): its parts
|
|
55
56
|
* are the header's own, hidden on a phone as the root's are. */
|
|
56
57
|
Cell = 'nav.cell',
|
|
58
|
+
/** HI2 shelves (`MenuShows`): the row holding the pictured cards and the page names side by side (`pictures`). */
|
|
59
|
+
DrawerShelf = 'nav.drawer-shelf',
|
|
60
|
+
/** HI2: the pictured cards of the site's main collections (`pictures`). */
|
|
61
|
+
DrawerPictures = 'nav.drawer-pictures',
|
|
62
|
+
/** HI2: one card — a Linked container to its page, holding its picture (and, on the shelf, its name). */
|
|
63
|
+
DrawerCard = 'nav.drawer-card',
|
|
64
|
+
/** HI2: a card's picture — empty when stamped; the build fills it from the site's own or stock pictures
|
|
65
|
+
* (`dressMenuPictures`), else the card is taken away. Never an invented picture. */
|
|
66
|
+
DrawerPicture = 'nav.drawer-picture',
|
|
67
|
+
/** HI2: the words-card's MORE row: the rest of the pages, small, and the card beside them. */
|
|
68
|
+
DrawerMore = 'nav.drawer-more',
|
|
69
|
+
/** HI2: the MORE row's caption and its small page names. */
|
|
70
|
+
DrawerMoreLinks = 'nav.drawer-more-links',
|
|
57
71
|
}
|
|
58
72
|
|
|
59
73
|
/** HI-D15: the side a header's menu button sits on. */
|
|
@@ -95,6 +109,10 @@ export interface NavShapeOptions {
|
|
|
95
109
|
* traits on the drawer, the menu button and the drawer's Close; a default writes nothing (R-H4). Absent: the parts
|
|
96
110
|
* keep what they have. */
|
|
97
111
|
look?: Partial<MenuLook>;
|
|
112
|
+
/** HI2 shelves: the site's main collections (a pictured content type's list page, the shop's), in the navigation's
|
|
113
|
+
* order — the pages a `pictures` shelf shows a card for and the `words-card` card links to. Their pictures are the
|
|
114
|
+
* build's to fill (`dressMenuPictures`). Absent: none (a `pictures` menu draws the page names). */
|
|
115
|
+
collections?: ReadonlyArray<NavPage>;
|
|
98
116
|
/** The site's language, for the words the menu's parts show and are named by (`menuWords`). Default English. */
|
|
99
117
|
locale?: string;
|
|
100
118
|
}
|
|
@@ -118,6 +136,7 @@ const BUTTON = 'ButtonBlock';
|
|
|
118
136
|
const ICON = 'Icon';
|
|
119
137
|
const TEXT = 'Text';
|
|
120
138
|
const HEADING = 'Heading';
|
|
139
|
+
const IMAGE = 'Image';
|
|
121
140
|
const NAV_STYLE = 'nav';
|
|
122
141
|
const DISPLAY = 'display';
|
|
123
142
|
const NONE = 'none';
|
|
@@ -195,6 +214,12 @@ export const NAV_PART_LABELS: Readonly<Record<string, string>> = {
|
|
|
195
214
|
[NavRole.Pinned]: 'Pinned pages',
|
|
196
215
|
[NavRole.Actions]: 'Actions',
|
|
197
216
|
[NavRole.Cell]: 'Side',
|
|
217
|
+
[NavRole.DrawerShelf]: 'Menu shelf',
|
|
218
|
+
[NavRole.DrawerPictures]: 'Menu pictures',
|
|
219
|
+
[NavRole.DrawerCard]: 'Menu card',
|
|
220
|
+
[NavRole.DrawerPicture]: 'Menu picture',
|
|
221
|
+
[NavRole.DrawerMore]: 'More pages',
|
|
222
|
+
[NavRole.DrawerMoreLinks]: 'More links',
|
|
198
223
|
};
|
|
199
224
|
|
|
200
225
|
/** Phosphor icons for the bar's items by route — there is no page icon field (Q6), so the bar starts here and
|
|
@@ -444,7 +469,7 @@ function pageLink(kit: Kit, suffix: string, page: NavPage, role: NavRole, lay: R
|
|
|
444
469
|
return part(kit, suffix, LINK, { label: page.label, linkType: LinkType.Page, pageRoute: page.route }, 'link', role, lay);
|
|
445
470
|
}
|
|
446
471
|
|
|
447
|
-
function drawer(kit: Kit, root: SerializedNode, pages: NavPage[], at: string, words: MenuWords): SerializedNode {
|
|
472
|
+
function drawer(kit: Kit, root: SerializedNode, pages: NavPage[], at: string, words: MenuWords, shows: MenuShows = MenuShows.Links, collections: ReadonlyArray<NavPage> = []): SerializedNode {
|
|
448
473
|
const dr = part(kit, 'drawer', DIALOG, {
|
|
449
474
|
placement: 'end', closeOnBackdrop: true, showCloseButton: false, ariaLabel: words.menu, closeAbove: at,
|
|
450
475
|
}, 'dialog', NavRole.Drawer, { width: '86vw', maxWidth: '360px', display: 'flex', flexDirection: 'column', gap: '20px' });
|
|
@@ -455,15 +480,7 @@ function drawer(kit: Kit, root: SerializedNode, pages: NavPage[], at: string, wo
|
|
|
455
480
|
close.children = [iconNode(kit, 'drawer-close-icon', CLOSE_ICON)];
|
|
456
481
|
close.interactions = [clickTo(kit, 'drawer-close', NavDialogAction.Close, dr.id)];
|
|
457
482
|
head.children = [part(kit, 'drawer-brand', HEADING, { content: brandWords, level: 'h3' }, 'h3'), close];
|
|
458
|
-
|
|
459
|
-
{ display: 'flex', flexDirection: 'column', gap: '4px' });
|
|
460
|
-
// Board 1: every page, Home first, at lead size (on each Link: a Link's own baseline font size would
|
|
461
|
-
// beat one inherited from the list). The links rest at the body weight and the CURRENT page reads by its ink and
|
|
462
|
-
// weight (no line since 2026-11-22) — the shared CSS keys that on the list's role (iox-design.css), so no Link holds
|
|
463
|
-
// a literal over its element style.
|
|
464
|
-
list.children = withHome(root, pages, words).map((p, i) => pageLink(kit, `drawer-link-${i}`, p, NavRole.DrawerLink,
|
|
465
|
-
{ display: 'flex', alignItems: 'center', minHeight: '48px', fontSize: 'var(--iox-size-lead)' }));
|
|
466
|
-
dr.children = [head, list];
|
|
483
|
+
dr.children = [head, ...menuShelf(kit, root, pages, shows, collections, words)];
|
|
467
484
|
const cta = find([root], NavRole.Cta);
|
|
468
485
|
if (cta) {
|
|
469
486
|
const copy = JSON.parse(JSON.stringify(cta)) as SerializedNode;
|
|
@@ -482,7 +499,7 @@ function drawer(kit: Kit, root: SerializedNode, pages: NavPage[], at: string, wo
|
|
|
482
499
|
|
|
483
500
|
/** The menu's own traits (on the drawer); its button's trait is on the menu button and the drawer's Close. */
|
|
484
501
|
const MENU_DIALOG_TRAITS: ReadonlyArray<[keyof MenuLook, MenuTrait]> = [
|
|
485
|
-
['form', MenuTrait.Form], ['reveal', MenuTrait.Reveal], ['hover', MenuTrait.Hover], ['phone', MenuTrait.Phone],
|
|
502
|
+
['form', MenuTrait.Form], ['reveal', MenuTrait.Reveal], ['hover', MenuTrait.Hover], ['phone', MenuTrait.Phone], ['shows', MenuTrait.Shows],
|
|
486
503
|
];
|
|
487
504
|
|
|
488
505
|
/** Write the look's menu traits on the drawer: each one the look names is replaced (a default writes nothing — R-H4);
|
|
@@ -493,6 +510,106 @@ function dressDrawer(dr: SerializedNode, look: Partial<MenuLook>): void {
|
|
|
493
510
|
dr.props = { ...props, ...menuDialogProps(look) };
|
|
494
511
|
}
|
|
495
512
|
|
|
513
|
+
// ── HI2: the menu's shelves (what it shows) ─────────────────────────────────────────────────
|
|
514
|
+
|
|
515
|
+
/** The contract's shelf rules (`HEADER.rules`): the least and most pictured cards a `pictures` menu shows, and how many
|
|
516
|
+
* page names a `words-card` menu shows large. */
|
|
517
|
+
export const MENU_SHELF_RULES = SPEC_SITE_LAYOUT.header.rules as unknown as Readonly<{ menuPicturesMin?: number; menuPicturesMax?: number; menuBigCount?: number }>;
|
|
518
|
+
const SHELF_RULES = MENU_SHELF_RULES;
|
|
519
|
+
|
|
520
|
+
/** What a menu draws for what it was asked to show: `pictures` needs the contract's least number of collections to show
|
|
521
|
+
* (`menuPicturesMin` — Vonder's two category tiles), else it is the page names (plan §6). ONE rule with `checkHeader`. */
|
|
522
|
+
export function drawnMenuShows(shows: MenuShows | `${MenuShows}` | undefined, collections: ReadonlyArray<NavPage> = [],
|
|
523
|
+
least = MENU_SHELF_RULES.menuPicturesMin ?? 1): MenuShows {
|
|
524
|
+
const asked = menuShowsOf(shows);
|
|
525
|
+
return asked === MenuShows.Pictures && collections.length < least ? MenuShows.Links : asked;
|
|
526
|
+
}
|
|
527
|
+
|
|
528
|
+
/** A page name in a shelf menu, LARGE: the look's display link (font, weight, leading, tracking — `link-display`); its
|
|
529
|
+
* size is the menu's form's (iox-design.css "the menu's shelves"), so no Link holds a literal size. */
|
|
530
|
+
function bigLink(kit: Kit, suffix: string, page: NavPage): SerializedNode {
|
|
531
|
+
return part(kit, suffix, LINK, { label: page.label, linkType: LinkType.Page, pageRoute: page.route }, 'link-display', NavRole.DrawerLink,
|
|
532
|
+
{ display: 'flex', alignItems: 'center', minHeight: '48px', width: 'auto' });
|
|
533
|
+
}
|
|
534
|
+
|
|
535
|
+
/** A card: a Linked container to its page holding its picture — empty until the build fills it (`dressMenuPictures`),
|
|
536
|
+
* decorative (`alt` empty) because the card is named by its page (its label, or its `ariaLabel`). */
|
|
537
|
+
function shelfCard(kit: Kit, suffix: string, page: NavPage, labelled: boolean, aspectRatio: string, lay: Record<string, unknown>): SerializedNode {
|
|
538
|
+
const card = part(kit, suffix, LINKED, { linkType: LinkType.Page, pageRoute: page.route, target: '_self', ...(labelled ? {} : { ariaLabel: page.label }) },
|
|
539
|
+
'box', NavRole.DrawerCard, { display: 'flex', flexDirection: 'column', gap: '8px', minWidth: '0px', textDecoration: 'none', ...lay });
|
|
540
|
+
const picture = part(kit, `${suffix}-picture`, IMAGE, { src: '', alt: '' }, 'media', NavRole.DrawerPicture, { aspectRatio, height: 'auto' });
|
|
541
|
+
card.children = [picture];
|
|
542
|
+
if (labelled) card.children.push(part(kit, `${suffix}-label`, TEXT, { content: page.label, tag: 'span' }, 'eyebrow', null));
|
|
543
|
+
return card;
|
|
544
|
+
}
|
|
545
|
+
|
|
546
|
+
/**
|
|
547
|
+
* Lay the drawer's pages out as the menu shows them (HI2, board v2 "menu contents"; the readings cited in the plan's "HI2
|
|
548
|
+
* as built"): `big` — every page name in the display face (Flyward, Hotel Aurelia); `words-card` — the first
|
|
549
|
+
* `menuBigCount` large, then a MORE row: its caption, the rest small, and one card (Savvia's "MÁS" row and reel tile);
|
|
550
|
+
* `pictures` — a shelf: the collections' pictured cards at the start, the page names at the end (Vonder's top panel).
|
|
551
|
+
* The pages arrive WITH the menu (D1 — one entrance per container): no part has its own entrance. Pure; the drawer's
|
|
552
|
+
* head and its call to action are kept as they are.
|
|
553
|
+
*/
|
|
554
|
+
function menuShelf(kit: Kit, root: SerializedNode, pages: NavPage[], shows: MenuShows, collections: ReadonlyArray<NavPage>, words: MenuWords): SerializedNode[] {
|
|
555
|
+
const all = withHome(root, pages, words);
|
|
556
|
+
const list = part(kit, 'drawer-links', CONTAINER, {}, 'box', NavRole.DrawerLinks, { display: 'flex', flexDirection: 'column', gap: '4px' });
|
|
557
|
+
const plain = (p: NavPage, i: number, lay: Record<string, unknown>) => pageLink(kit, `drawer-link-${i}`, p, NavRole.DrawerLink, lay);
|
|
558
|
+
if (shows === MenuShows.Links) {
|
|
559
|
+
// Board 1: every page, Home first, at lead size (on each Link: a Link's own baseline font size would
|
|
560
|
+
// beat one inherited from the list). The links rest at the body weight and the CURRENT page reads by its ink and
|
|
561
|
+
// weight (no line since 2026-11-22) — the shared CSS keys that on the list's role (iox-design.css), so no Link holds
|
|
562
|
+
// a literal over its element style.
|
|
563
|
+
list.children = all.map((p, i) => plain(p, i, { display: 'flex', alignItems: 'center', minHeight: '48px', fontSize: 'var(--iox-size-lead)' }));
|
|
564
|
+
return [list];
|
|
565
|
+
}
|
|
566
|
+
if (shows === MenuShows.Big) {
|
|
567
|
+
list.children = all.map((p, i) => bigLink(kit, `drawer-link-${i}`, p));
|
|
568
|
+
return [list];
|
|
569
|
+
}
|
|
570
|
+
if (shows === MenuShows.WordsCard) {
|
|
571
|
+
const count = SHELF_RULES.menuBigCount ?? all.length;
|
|
572
|
+
list.children = all.slice(0, count).map((p, i) => bigLink(kit, `drawer-link-${i}`, p));
|
|
573
|
+
const rest = all.slice(count);
|
|
574
|
+
const more = part(kit, 'drawer-more', CONTAINER, {}, 'box', NavRole.DrawerMore, {
|
|
575
|
+
display: 'flex', flexWrap: 'wrap', gap: '16px 24px', alignItems: 'flex-start',
|
|
576
|
+
borderWidth: 'var(--iox-border-width) 0 0', borderStyle: 'solid', borderColor: 'var(--iox-divider-color)', padding: '16px 0 0',
|
|
577
|
+
});
|
|
578
|
+
more.children = [];
|
|
579
|
+
if (rest.length) {
|
|
580
|
+
const column = part(kit, 'drawer-more-links', CONTAINER, {}, 'box', NavRole.DrawerMoreLinks,
|
|
581
|
+
{ display: 'flex', flexDirection: 'column', gap: '2px', flexGrow: '1', flexShrink: '1', flexBasis: '140px', minWidth: '0px' });
|
|
582
|
+
column.children = [
|
|
583
|
+
part(kit, 'drawer-more-caption', TEXT, { content: words.more, tag: 'span' }, 'eyebrow', null),
|
|
584
|
+
...rest.map((p, i) => plain(p, count + i, { display: 'flex', alignItems: 'center', minHeight: '32px', width: 'auto' })),
|
|
585
|
+
];
|
|
586
|
+
more.children.push(column);
|
|
587
|
+
}
|
|
588
|
+
if (collections.length) more.children.push(shelfCard(kit, 'drawer-card-0', collections[0], false, '16 / 9', { flexGrow: '1', flexShrink: '1', flexBasis: '160px' }));
|
|
589
|
+
return more.children.length ? [list, more] : [list];
|
|
590
|
+
}
|
|
591
|
+
list.children = all.map((p, i) => plain(p, i, { display: 'flex', alignItems: 'center', minHeight: '40px' }));
|
|
592
|
+
Object.assign(list.styleProps, { flexGrow: '1', flexShrink: '1', flexBasis: '200px', minWidth: '0px' });
|
|
593
|
+
const row = part(kit, 'drawer-shelf', CONTAINER, {}, 'box', NavRole.DrawerShelf, { display: 'flex', flexWrap: 'wrap', gap: '24px 40px', alignItems: 'flex-start' });
|
|
594
|
+
const cards = part(kit, 'drawer-pictures', CONTAINER, {}, 'box', NavRole.DrawerPictures,
|
|
595
|
+
{ display: 'flex', gap: '16px', flexGrow: '2', flexShrink: '1', flexBasis: '320px', minWidth: '0px' });
|
|
596
|
+
cards.children = collections.slice(0, SHELF_RULES.menuPicturesMax ?? collections.length)
|
|
597
|
+
.map((c, i) => shelfCard(kit, `drawer-card-${i}`, c, true, '4 / 3', { flexGrow: '1', flexShrink: '1', flexBasis: '0px' }));
|
|
598
|
+
row.children = [cards, list];
|
|
599
|
+
return [row];
|
|
600
|
+
}
|
|
601
|
+
|
|
602
|
+
/** What a menu shows, on a drawer that already exists (the Header studio's Apply): its pages laid out again, after its head;
|
|
603
|
+
* the rest of it (the head, the call to action) kept. */
|
|
604
|
+
function shelveMenu(kit: Kit, dr: SerializedNode, root: SerializedNode, pages: NavPage[], shows: MenuShows, collections: ReadonlyArray<NavPage>, words: MenuWords): void {
|
|
605
|
+
const kids = (dr.children ?? []).filter(c => !SHELF_ROLES.has(c.role as NavRole));
|
|
606
|
+
kids.splice(kids.findIndex(c => c.role === NavRole.DrawerHead) + 1, 0, ...menuShelf(kit, root, pages, shows, collections, words));
|
|
607
|
+
dr.children = kids;
|
|
608
|
+
}
|
|
609
|
+
|
|
610
|
+
/** The drawer's children a shelf lays out (what `shelveMenu` replaces). */
|
|
611
|
+
const SHELF_ROLES: ReadonlySet<NavRole> = new Set([NavRole.DrawerLinks, NavRole.DrawerShelf, NavRole.DrawerMore]);
|
|
612
|
+
|
|
496
613
|
/** A `word` button is as wide as its word (never narrower than the icon button it replaces). */
|
|
497
614
|
const WORD_BUTTON_LAY = { width: 'auto', minWidth: '48px' };
|
|
498
615
|
|
|
@@ -696,7 +813,10 @@ export function planNavShape(globals: ReadonlyArray<SerializedNode>, shape: NavS
|
|
|
696
813
|
const topIndex = out.findIndex(g => g.role === NavRole.Drawer);
|
|
697
814
|
if (!dr && topIndex >= 0) dr = out.splice(topIndex, 1)[0];
|
|
698
815
|
if (dr) { delete dr.isGlobal; delete dr.globalPosition; }
|
|
699
|
-
|
|
816
|
+
// HI2: what the menu shows, as the site can carry it (`drawnMenuShows`) — a drawer built now is laid out for it.
|
|
817
|
+
const shows = options.look?.shows !== undefined ? drawnMenuShows(options.look.shows, options.collections) : undefined;
|
|
818
|
+
const built = wantDrawer && !dr;
|
|
819
|
+
if (built) dr = drawer(kit, root, pages, at, words, shows, options.collections);
|
|
700
820
|
if (!wantDrawer) dr = null;
|
|
701
821
|
// A drawer reached at every width never closes itself above a breakpoint.
|
|
702
822
|
if (dr) dr.props = { ...dr.props, closeAbove: everyWidth ? '' : at };
|
|
@@ -731,8 +851,11 @@ export function planNavShape(globals: ReadonlyArray<SerializedNode>, shape: NavS
|
|
|
731
851
|
}
|
|
732
852
|
placeMenu(root, menu, (options.menuSide as MenuSide | undefined) ?? null, was);
|
|
733
853
|
}
|
|
734
|
-
// HI2a: the menu's look, when one is asked (the composer's header recipe; the Header studio later).
|
|
735
|
-
|
|
854
|
+
// HI2a: the menu's look, when one is asked (the composer's header recipe; the Header studio later). HI2: what it shows
|
|
855
|
+
// is drawn as the site can carry it (`drawnMenuShows`), and the drawer's pages are laid out for it.
|
|
856
|
+
const look = shows !== undefined ? { ...options.look, shows } : options.look;
|
|
857
|
+
if (look) dressMenu(kit, dr, menu, look, words);
|
|
858
|
+
if (dr && !built && shows !== undefined) shelveMenu(kit, dr, root, pages, shows, options.collections ?? [], words);
|
|
736
859
|
if (dr && shape === NavShape.Drawer) kids.push(dr);
|
|
737
860
|
if (dr && shape === NavShape.Both) {
|
|
738
861
|
dr.isGlobal = true;
|
|
@@ -76,6 +76,8 @@ export interface PatternNode {
|
|
|
76
76
|
readonly video?: string;
|
|
77
77
|
/** CC3: a click on this node opens the pattern's lightbox at the clicked row (`lightbox`). */
|
|
78
78
|
readonly opens?: string;
|
|
79
|
+
/** FV1b (footer `holds.top`): a click on this node scrolls the page to its top (`top`). */
|
|
80
|
+
readonly scrolls?: string;
|
|
79
81
|
/** CC3: a control's accessible name (`ariaLabel`). */
|
|
80
82
|
readonly name?: string;
|
|
81
83
|
/** CC4b: hidden at base, shown while the pattern's Segmented option with this key is on. */
|
|
@@ -221,6 +223,11 @@ export enum PatternOpens {
|
|
|
221
223
|
Lightbox = 'lightbox',
|
|
222
224
|
}
|
|
223
225
|
|
|
226
|
+
/** FV1b: where a button's or a link's click scrolls the page — its top (a scrollTo with no target, both renderers). */
|
|
227
|
+
export enum PatternScrolls {
|
|
228
|
+
Top = 'top',
|
|
229
|
+
}
|
|
230
|
+
|
|
224
231
|
/** The composer directives a pattern writes where a plan supplies the value. */
|
|
225
232
|
export enum PatternDirective {
|
|
226
233
|
/** A Repeater's source: the section's `binding`. */
|
|
@@ -283,6 +283,7 @@ export const PLAN_WIRE_DERIVED: Readonly<Record<string, string>> = {
|
|
|
283
283
|
'plan.locale': "the reading's language (the context)",
|
|
284
284
|
'plan.design': "the owner's pick (the context)",
|
|
285
285
|
'business.facts': "the owner's own facts, verbatim (the context)",
|
|
286
|
+
'business.social': "the owner's social links as the reading stated them (statedFacts.social, footer-v2 FV1b) — set by the server, never the model's",
|
|
286
287
|
'page.isHome': 'the page at "/"',
|
|
287
288
|
'page.required': "a template page's (the wizard's Pages step), never the AI's",
|
|
288
289
|
sourceTemplate: 'the AI never writes a template plan',
|
|
@@ -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 './menu-shelves';
|
|
31
32
|
export * from './item-fill';
|
|
32
33
|
export * from './entrances';
|
|
33
34
|
export * from './text-scroll';
|
|
@@ -8,6 +8,7 @@ import { SitePlanIssueCode } from './validate-site-plan';
|
|
|
8
8
|
import { planSells } from './shop-plan';
|
|
9
9
|
import { importedPicturesOf, importRedirects } from './import-plan';
|
|
10
10
|
import type { PictureSupply, TypeLed } from './type-led';
|
|
11
|
+
import type { PicturesRefused } from './free-opening';
|
|
11
12
|
import { isPopupNode, POPUP_GLOBAL_ID } from './popup-plan';
|
|
12
13
|
import { SerializedNode, walkSerialized } from './serialized-node';
|
|
13
14
|
|
|
@@ -342,6 +343,13 @@ export interface BuildComposeDecisions {
|
|
|
342
343
|
* (`headerReadableOfSite`, where the picture's pixels are known) — every compose of the run takes the same answer.
|
|
343
344
|
* Absent or null: not judged. */
|
|
344
345
|
headerReadable?: boolean | null;
|
|
346
|
+
/** Pictures first: the owner ruled pictures out — `all` ("no pictures", `PromptLimit.NoPictures`) or `stock` ("no stock
|
|
347
|
+
* photos", `refusesStock`) — read by the generation from the owner's words; the Home's opening is then never given a
|
|
348
|
+
* picture it did not ask for (`businessComposeContext`). Absent: nothing ruled out. */
|
|
349
|
+
picturesRefused?: `${PicturesRefused}` | null;
|
|
350
|
+
/** The owner's own photos (addresses) the build may place — their count lets a type whose work stock may not show open
|
|
351
|
+
* on a picture (pictures first). */
|
|
352
|
+
ownPhotos?: ReadonlyArray<string>;
|
|
345
353
|
}
|
|
346
354
|
|
|
347
355
|
/** The run as `GET …/site-builds/:id` (and `?latest=1`) answers it. */
|
|
@@ -44,6 +44,9 @@ export interface SiteBusiness {
|
|
|
44
44
|
readonly name: string;
|
|
45
45
|
readonly tagline?: string;
|
|
46
46
|
readonly facts?: Readonly<Partial<Record<FactKey, string>>>;
|
|
47
|
+
/** FV1b (footer-v2 FV-D10): the owner's social links as stated (harness `statedFacts.social`) — set by the server from
|
|
48
|
+
* the reading, never a model's. A footer holding `social` lists the ones on a network it can name. */
|
|
49
|
+
readonly social?: ReadonlyArray<string>;
|
|
47
50
|
}
|
|
48
51
|
|
|
49
52
|
/** How a content field is edited: the closed list a plan chooses from. */
|