@vectoriox/iox-ui 5.107.0 → 5.108.1
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 +20 -3
- package/design-core/index.d.ts +89 -0
- package/fesm2022/vectoriox-iox-ui-composite-core.mjs +52 -8
- package/fesm2022/vectoriox-iox-ui-composite-core.mjs.map +1 -1
- package/fesm2022/vectoriox-iox-ui-design-core.mjs +106 -0
- package/fesm2022/vectoriox-iox-ui-design-core.mjs.map +1 -1
- package/fesm2022/vectoriox-iox-ui-generation-core.mjs +411 -11
- package/fesm2022/vectoriox-iox-ui-generation-core.mjs.map +1 -1
- package/generation-core/index.d.ts +236 -105
- package/package.json +1 -1
- package/src/composite-core/card.ts +50 -7
- package/src/composite-core/structure.ts +4 -0
- package/src/design-core/flavor-spec.generated.ts +106 -0
- package/src/generation-core/compose-layout.ts +242 -2
- package/src/generation-core/compose-site.ts +23 -1
- package/src/generation-core/layout-language.ts +71 -0
- package/src/generation-core/layout-wire.ts +111 -3
- package/styles/iox-design.css +30 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { FrameSequence } from '@vectoriox/iox-ui/media-core';
|
|
2
2
|
import { DesignChoices, AnimateId, ColorScheme, DesignTokenLike, StylePreset } from '@vectoriox/iox-ui/design-core';
|
|
3
3
|
import { SeoRawDoc } from '@vectoriox/iox-ui/seo-core';
|
|
4
|
-
import { ContentFieldLike } from '@vectoriox/iox-ui/composite-core';
|
|
4
|
+
import { CardPart, ContentFieldLike } from '@vectoriox/iox-ui/composite-core';
|
|
5
5
|
import { CheckoutGateRefusal } from '@vectoriox/iox-ui/commerce-core';
|
|
6
6
|
import { ParallaxDepth } from '@vectoriox/iox-ui/scene-core';
|
|
7
7
|
|
|
@@ -5837,6 +5837,69 @@ declare enum LayoutNavKind {
|
|
|
5837
5837
|
Index = "index",
|
|
5838
5838
|
Side = "side"
|
|
5839
5839
|
}
|
|
5840
|
+
/** List ingredients (list-ingredients-plan.md §2): the seven choices a list section mixes. Held equal to the contract's
|
|
5841
|
+
* `site.layout.list` by layout-language.spec. */
|
|
5842
|
+
declare enum LayoutListItem {
|
|
5843
|
+
Photo = "photo",
|
|
5844
|
+
Card = "card"
|
|
5845
|
+
}
|
|
5846
|
+
declare enum LayoutListArrange {
|
|
5847
|
+
Row = "row",
|
|
5848
|
+
Grid = "grid",
|
|
5849
|
+
Masonry = "masonry",
|
|
5850
|
+
Strips = "strips",
|
|
5851
|
+
Deck = "deck"
|
|
5852
|
+
}
|
|
5853
|
+
declare enum LayoutListWho {
|
|
5854
|
+
None = "none",
|
|
5855
|
+
Middle = "middle",
|
|
5856
|
+
First = "first",
|
|
5857
|
+
Pointed = "pointed"
|
|
5858
|
+
}
|
|
5859
|
+
declare enum LayoutListHow {
|
|
5860
|
+
Bigger = "bigger",
|
|
5861
|
+
Wider = "wider",
|
|
5862
|
+
Raised = "raised",
|
|
5863
|
+
Brighter = "brighter"
|
|
5864
|
+
}
|
|
5865
|
+
declare enum LayoutListMove {
|
|
5866
|
+
Arrows = "arrows",
|
|
5867
|
+
Drag = "drag",
|
|
5868
|
+
Auto = "auto",
|
|
5869
|
+
Page = "page"
|
|
5870
|
+
}
|
|
5871
|
+
declare enum LayoutListHover {
|
|
5872
|
+
Rise = "rise",
|
|
5873
|
+
Open = "open",
|
|
5874
|
+
Zoom = "zoom",
|
|
5875
|
+
Dim = "dim"
|
|
5876
|
+
}
|
|
5877
|
+
declare enum LayoutListArrive {
|
|
5878
|
+
Together = "together",
|
|
5879
|
+
OneByOne = "one-by-one",
|
|
5880
|
+
SlideIn = "slide-in"
|
|
5881
|
+
}
|
|
5882
|
+
declare enum LayoutListPhone {
|
|
5883
|
+
Swipe = "swipe",
|
|
5884
|
+
Stack = "stack",
|
|
5885
|
+
TwoUp = "two-up"
|
|
5886
|
+
}
|
|
5887
|
+
/** One list section's mix: what each item holds (its `parts` — roles its list has), how the items sit, which stands out
|
|
5888
|
+
* and how, how you move through them, what a mouse does, how they arrive and what a phone shows. */
|
|
5889
|
+
interface LayoutListMix {
|
|
5890
|
+
item: `${LayoutListItem}`;
|
|
5891
|
+
/** The list's roles each item shows (`title`, `image`, `quote`…) — only roles the list has. */
|
|
5892
|
+
parts: string[];
|
|
5893
|
+
arrange: `${LayoutListArrange}`;
|
|
5894
|
+
standout?: {
|
|
5895
|
+
who: `${LayoutListWho}`;
|
|
5896
|
+
how?: `${LayoutListHow}`;
|
|
5897
|
+
};
|
|
5898
|
+
move: Array<`${LayoutListMove}`>;
|
|
5899
|
+
hover: Array<`${LayoutListHover}`>;
|
|
5900
|
+
arrive: `${LayoutListArrive}`;
|
|
5901
|
+
phone: `${LayoutListPhone}`;
|
|
5902
|
+
}
|
|
5840
5903
|
interface LayoutTrack {
|
|
5841
5904
|
prop: `${LayoutTrackProp}`;
|
|
5842
5905
|
from: number;
|
|
@@ -5865,6 +5928,8 @@ interface LayoutGallery {
|
|
|
5865
5928
|
scroll?: boolean;
|
|
5866
5929
|
/** Gate 2: a list data source of the plan whose items the slides show (their image role) instead of fixed photos. */
|
|
5867
5930
|
source?: string;
|
|
5931
|
+
/** List ingredients: how the `source` list's items are shown. Absent: today's gallery (a picture per slide). */
|
|
5932
|
+
list?: LayoutListMix;
|
|
5868
5933
|
}
|
|
5869
5934
|
interface LayoutForm {
|
|
5870
5935
|
preset: 'lead' | 'contact' | 'booking' | 'newsletter';
|
|
@@ -7177,6 +7242,139 @@ declare function assertValidSitePlan(plan: unknown): void;
|
|
|
7177
7242
|
*/
|
|
7178
7243
|
declare function archetypeIssues(plan: SitePlan): SitePlanIssue[];
|
|
7179
7244
|
|
|
7245
|
+
/**
|
|
7246
|
+
* THE layout composer (premium components M8, gate 1): a page written in the layout language (`layout-language.ts`) in,
|
|
7247
|
+
* ordinary builder nodes out — the same `createSerializedNode` every composed page is made of, so the builder reloads it
|
|
7248
|
+
* and saves it unchanged and the engine renders it with nothing new to learn. No second renderer: a section is a Section
|
|
7249
|
+
* holding a 12-column grid, a held section is a Scene, a layer is a Heading / Text / Image / Slider / Form / Button
|
|
7250
|
+
* placed on the grid, its time entrance a `viewportEnter` interaction, its depth a `scrollProgress` parallax, its held
|
|
7251
|
+
* motion scene-core tracks. What the product cannot say yet is returned as a GAP (named in m8-proof-sites.md), never
|
|
7252
|
+
* worked around with CSS. Pure and deterministic.
|
|
7253
|
+
*/
|
|
7254
|
+
declare enum LayoutGapCode {
|
|
7255
|
+
/** M8-G1: a `screen` word is sized from its face's measured letters (iox-ui#46), not fitted to its cell in the browser. */
|
|
7256
|
+
ScreenFit = "screen-fit",
|
|
7257
|
+
/** M8-G2: no blur — a `blurIn` entrance rises without it, a `blur` track is dropped. */
|
|
7258
|
+
Blur = "blur",
|
|
7259
|
+
/** M8-G3: `scaleIn` / `pop` start at the product's 0.8, not 0.95 / 0.9, and `pop` has no overshoot. */
|
|
7260
|
+
ScaleIn = "scale-in",
|
|
7261
|
+
/** M8-G4: a held layer's keys ease one way (smoothstep), whatever the layout's ease. */
|
|
7262
|
+
TrackEase = "track-ease",
|
|
7263
|
+
/** M8-G5: a depth glides at the product's one speed (no per-look scale), and a picture's own drift inside its frame
|
|
7264
|
+
* is a fixed over-scale. */
|
|
7265
|
+
DepthSpeed = "depth-speed",
|
|
7266
|
+
/** M8-G6: the navigation is the product's bar — a corner, index or side menu is drawn as the bar. */
|
|
7267
|
+
NavKind = "nav-kind",
|
|
7268
|
+
/** M8-G7: a link to a section scrolls by an action; it is no address (`#id`) a visitor can share. */
|
|
7269
|
+
SectionLink = "section-link",
|
|
7270
|
+
/** M8-G9: a slider on a held section's stage is played by the scroll whether or not the layout asked. */
|
|
7271
|
+
StageSlider = "stage-slider",
|
|
7272
|
+
/** M8-G10: a flood opens from the centre as an inset, not as a circle from the top edge. */
|
|
7273
|
+
Flood = "flood",
|
|
7274
|
+
/** M8-G11: a held section stacks on a phone and its layers stand at rest (they cannot say "no motion here"). */
|
|
7275
|
+
PhoneRest = "phone-rest",
|
|
7276
|
+
/** Motion or a sideways track on a section that is not held: the product moves layers by tracks only in a Scene. */
|
|
7277
|
+
UnheldMotion = "unheld-motion",
|
|
7278
|
+
/** A form layer wears the product's preset: its fields are the preset's, the layout's options fill its choices. */
|
|
7279
|
+
FormPreset = "form-preset",
|
|
7280
|
+
/** A gallery naming a list with no pictures and no slides of its own shows photo boxes (iox-ui#59). */
|
|
7281
|
+
GalleryNoPictures = "gallery-no-pictures",
|
|
7282
|
+
/** List ingredients: an arrangement or a feel the product draws in a later phase (strips LI3, deck and standing out
|
|
7283
|
+
* LI4) — the list is laid out as the nearest one it has. */
|
|
7284
|
+
ListLater = "list-later",
|
|
7285
|
+
/** A list item that rises or zooms under the mouse links somewhere (decision D3): this one has nowhere to go. */
|
|
7286
|
+
ListUnlinked = "list-unlinked",
|
|
7287
|
+
/** A list section naming a list the composer was not told how to read (no `listOf`): today's gallery instead. */
|
|
7288
|
+
ListUnbound = "list-unbound"
|
|
7289
|
+
}
|
|
7290
|
+
interface LayoutGap {
|
|
7291
|
+
code: LayoutGapCode;
|
|
7292
|
+
/** `sections[i].layers[j]`, `sections[i]` or `nav`. */
|
|
7293
|
+
path: string;
|
|
7294
|
+
detail: string;
|
|
7295
|
+
}
|
|
7296
|
+
declare enum LayoutColourMode {
|
|
7297
|
+
Light = "light",
|
|
7298
|
+
Dark = "dark"
|
|
7299
|
+
}
|
|
7300
|
+
interface ComposeLayoutOptions {
|
|
7301
|
+
/** Prefix of every node id (`<id>-s0-l1`). */
|
|
7302
|
+
id?: string;
|
|
7303
|
+
/** The look's colour mode: which colour names are light (a scrim under light words is dark, and the other way). */
|
|
7304
|
+
mode?: `${LayoutColourMode}`;
|
|
7305
|
+
/** Where the studio keeps each photo (its media URL). */
|
|
7306
|
+
photoSrc: (photoId: string) => string;
|
|
7307
|
+
/** A photo's description; '' (decorative) when not given. */
|
|
7308
|
+
photoAlt?: (photoId: string) => string;
|
|
7309
|
+
/** A photo's shape: the height its frame keeps where it stacks (a phone, a Scene with no scroll). Landscape when not given. */
|
|
7310
|
+
photoShape?: (photoId: string) => `${LayoutPhotoShape}` | undefined;
|
|
7311
|
+
/** Silent section fallback: the node a place given to the plan's ready-made section stands as (`LayoutSection.readyMade`),
|
|
7312
|
+
* stamped by the caller from that plan section's pattern with `id` as its root id. A layout with such a place and no
|
|
7313
|
+
* stamper is refused. */
|
|
7314
|
+
readyMade?: (section: LayoutSection, id: string) => SerializedNode;
|
|
7315
|
+
/** The design the page wears (its fonts size a `screen` word, iox-ui#46). Default: the look's preset in `mode`. */
|
|
7316
|
+
design?: DesignChoices;
|
|
7317
|
+
/** Gate 2: a list data source's picture and name fields — a gallery naming the source shows its items. Null when the
|
|
7318
|
+
* source has no picture field (the gallery keeps its own slides). */
|
|
7319
|
+
sourceFields?: (alias: string) => {
|
|
7320
|
+
image: string;
|
|
7321
|
+
title?: string;
|
|
7322
|
+
} | null;
|
|
7323
|
+
/** List ingredients (LI1): how a list's items are read — the field that plays each role and the item's own page. Null
|
|
7324
|
+
* when the alias is no list. A gallery with a `list` mix needs it; without it the gallery is today's. */
|
|
7325
|
+
listOf?: (alias: string) => LayoutListBinding | null;
|
|
7326
|
+
}
|
|
7327
|
+
/** A list as the list composer reads it (`ComposeLayoutOptions.listOf`). */
|
|
7328
|
+
interface LayoutListBinding {
|
|
7329
|
+
/** Role → the field that plays it (`title` → `name`). */
|
|
7330
|
+
roles: Readonly<Record<string, string>>;
|
|
7331
|
+
/** The page that shows one item, when the plan has one: its route, its param and the item's field that fills it. */
|
|
7332
|
+
detail?: {
|
|
7333
|
+
route: string;
|
|
7334
|
+
param: string;
|
|
7335
|
+
field: string;
|
|
7336
|
+
};
|
|
7337
|
+
}
|
|
7338
|
+
/** List ingredients (LI1): the roles a composed list's nodes play — read by the shared CSS (iox-design.css), never by a
|
|
7339
|
+
* renderer: the list's frame (`list.dim` when the others dim under the mouse), a masonry wall's Repeater, and an item
|
|
7340
|
+
* that is a picture (a card item is a Card v2, `card`). */
|
|
7341
|
+
declare enum LayoutListRole {
|
|
7342
|
+
List = "list",
|
|
7343
|
+
Dim = "list.dim",
|
|
7344
|
+
Masonry = "list.masonry",
|
|
7345
|
+
MasonryTwo = "list.masonry-two",
|
|
7346
|
+
Item = "list.item"
|
|
7347
|
+
}
|
|
7348
|
+
/** A list role → the Card v2 part that shows it (the title is the card's locked title; `link` links the card). */
|
|
7349
|
+
declare const LIST_CARD_PART: Readonly<Record<string, CardPart>>;
|
|
7350
|
+
interface ComposedLayout {
|
|
7351
|
+
/** The page's layout: one root per section. */
|
|
7352
|
+
layout: SerializedNode[];
|
|
7353
|
+
/** The site header (a global BEFORE element) with the layout's section links, or null when the layout has no nav. */
|
|
7354
|
+
header: SerializedNode | null;
|
|
7355
|
+
/** The node id each section's id became (what its links scroll to). */
|
|
7356
|
+
sections: Record<string, string>;
|
|
7357
|
+
gaps: LayoutGap[];
|
|
7358
|
+
}
|
|
7359
|
+
/**
|
|
7360
|
+
* Words drawn on a shape or a photo at a laptop's width lose it on a phone: the shape is hidden and every layer stacks,
|
|
7361
|
+
* so they read on the section's own ground there. When their colour would vanish into that ground (the live clinic's
|
|
7362
|
+
* "What we treat", white on its shape, and the bar's label on its photo — 1:1 on the phone), the phone gives them the
|
|
7363
|
+
* colour the ground's words take; otherwise null (M8 gate 2, fix first part 3).
|
|
7364
|
+
*/
|
|
7365
|
+
declare function phoneWordsColour(l: LayoutLayer, li: number, s: Pick<LayoutSection, 'layers' | 'ground'>): string | null;
|
|
7366
|
+
/** The scheme a form, a gallery, a button or a ready-made section's content on this section ground wears, or null on the page's own ground. */
|
|
7367
|
+
declare function layoutBandScheme(ground: string | undefined): ColorScheme | null;
|
|
7368
|
+
/** The column a ready-made section's words start on: where its neighbour's words start (their first column), so the two
|
|
7369
|
+
* share an edge; at most READY_MADE_MAX_COLUMN; 1 (the gutter) when the neighbour has no words. */
|
|
7370
|
+
declare function readyMadeColumn(neighbour: LayoutSection | null): number;
|
|
7371
|
+
/**
|
|
7372
|
+
* A layout-language page → its layout and header. Deterministic: the same layout composes to byte-identical nodes.
|
|
7373
|
+
* Refuses (ComposeError) a link to a section the layout does not have; everything the product cannot say comes back in
|
|
7374
|
+
* `gaps`.
|
|
7375
|
+
*/
|
|
7376
|
+
declare function composeLayout(site: LayoutSite, options: ComposeLayoutOptions): ComposedLayout;
|
|
7377
|
+
|
|
7180
7378
|
/**
|
|
7181
7379
|
* THE composer — a Site Plan in, ordinary IOX data out (design-system plan §6b, W1). Deterministic and
|
|
7182
7380
|
* pure: the same plan composes to byte-identical output, with no clock, no randomness and no transport.
|
|
@@ -7386,6 +7584,12 @@ interface LayoutListShape {
|
|
|
7386
7584
|
}
|
|
7387
7585
|
/** The shape of every list a list section could show (the plan's query sources, as `layoutGalleryLists`). */
|
|
7388
7586
|
declare function layoutListShapes(plan: SitePlan): LayoutListShape[];
|
|
7587
|
+
/**
|
|
7588
|
+
* How the list composer reads one list (LI1, `ComposeLayoutOptions.listOf`): the field that plays each role, and the
|
|
7589
|
+
* plan's page that shows one item — its route, its param and the item's field that fills it. Null for an alias that is
|
|
7590
|
+
* no list (the plan's query sources, as `layoutListShapes`).
|
|
7591
|
+
*/
|
|
7592
|
+
declare function layoutListBinding(alias: string, plan: SitePlan): LayoutListBinding | null;
|
|
7389
7593
|
/** One line of the brief: `works (Works): 6 items · name, picture, detail, quote (long)`. */
|
|
7390
7594
|
declare function describeListShape(shape: LayoutListShape): string;
|
|
7391
7595
|
/** The list sources a composed gallery may show (`gallery.source`): the plan's query sources whose items have a picture.
|
|
@@ -9440,106 +9644,6 @@ declare function applyPictureScrims(trees: ReadonlyArray<SerializedNode>, chosen
|
|
|
9440
9644
|
/** The relative luminance of a CSS colour (for a review sheet or a log), or null. */
|
|
9441
9645
|
declare function luminanceOf(colour: string): number | null;
|
|
9442
9646
|
|
|
9443
|
-
/**
|
|
9444
|
-
* THE layout composer (premium components M8, gate 1): a page written in the layout language (`layout-language.ts`) in,
|
|
9445
|
-
* ordinary builder nodes out — the same `createSerializedNode` every composed page is made of, so the builder reloads it
|
|
9446
|
-
* and saves it unchanged and the engine renders it with nothing new to learn. No second renderer: a section is a Section
|
|
9447
|
-
* holding a 12-column grid, a held section is a Scene, a layer is a Heading / Text / Image / Slider / Form / Button
|
|
9448
|
-
* placed on the grid, its time entrance a `viewportEnter` interaction, its depth a `scrollProgress` parallax, its held
|
|
9449
|
-
* motion scene-core tracks. What the product cannot say yet is returned as a GAP (named in m8-proof-sites.md), never
|
|
9450
|
-
* worked around with CSS. Pure and deterministic.
|
|
9451
|
-
*/
|
|
9452
|
-
declare enum LayoutGapCode {
|
|
9453
|
-
/** M8-G1: a `screen` word is sized from its face's measured letters (iox-ui#46), not fitted to its cell in the browser. */
|
|
9454
|
-
ScreenFit = "screen-fit",
|
|
9455
|
-
/** M8-G2: no blur — a `blurIn` entrance rises without it, a `blur` track is dropped. */
|
|
9456
|
-
Blur = "blur",
|
|
9457
|
-
/** M8-G3: `scaleIn` / `pop` start at the product's 0.8, not 0.95 / 0.9, and `pop` has no overshoot. */
|
|
9458
|
-
ScaleIn = "scale-in",
|
|
9459
|
-
/** M8-G4: a held layer's keys ease one way (smoothstep), whatever the layout's ease. */
|
|
9460
|
-
TrackEase = "track-ease",
|
|
9461
|
-
/** M8-G5: a depth glides at the product's one speed (no per-look scale), and a picture's own drift inside its frame
|
|
9462
|
-
* is a fixed over-scale. */
|
|
9463
|
-
DepthSpeed = "depth-speed",
|
|
9464
|
-
/** M8-G6: the navigation is the product's bar — a corner, index or side menu is drawn as the bar. */
|
|
9465
|
-
NavKind = "nav-kind",
|
|
9466
|
-
/** M8-G7: a link to a section scrolls by an action; it is no address (`#id`) a visitor can share. */
|
|
9467
|
-
SectionLink = "section-link",
|
|
9468
|
-
/** M8-G9: a slider on a held section's stage is played by the scroll whether or not the layout asked. */
|
|
9469
|
-
StageSlider = "stage-slider",
|
|
9470
|
-
/** M8-G10: a flood opens from the centre as an inset, not as a circle from the top edge. */
|
|
9471
|
-
Flood = "flood",
|
|
9472
|
-
/** M8-G11: a held section stacks on a phone and its layers stand at rest (they cannot say "no motion here"). */
|
|
9473
|
-
PhoneRest = "phone-rest",
|
|
9474
|
-
/** Motion or a sideways track on a section that is not held: the product moves layers by tracks only in a Scene. */
|
|
9475
|
-
UnheldMotion = "unheld-motion",
|
|
9476
|
-
/** A form layer wears the product's preset: its fields are the preset's, the layout's options fill its choices. */
|
|
9477
|
-
FormPreset = "form-preset",
|
|
9478
|
-
/** A gallery naming a list with no pictures and no slides of its own shows photo boxes (iox-ui#59). */
|
|
9479
|
-
GalleryNoPictures = "gallery-no-pictures"
|
|
9480
|
-
}
|
|
9481
|
-
interface LayoutGap {
|
|
9482
|
-
code: LayoutGapCode;
|
|
9483
|
-
/** `sections[i].layers[j]`, `sections[i]` or `nav`. */
|
|
9484
|
-
path: string;
|
|
9485
|
-
detail: string;
|
|
9486
|
-
}
|
|
9487
|
-
declare enum LayoutColourMode {
|
|
9488
|
-
Light = "light",
|
|
9489
|
-
Dark = "dark"
|
|
9490
|
-
}
|
|
9491
|
-
interface ComposeLayoutOptions {
|
|
9492
|
-
/** Prefix of every node id (`<id>-s0-l1`). */
|
|
9493
|
-
id?: string;
|
|
9494
|
-
/** The look's colour mode: which colour names are light (a scrim under light words is dark, and the other way). */
|
|
9495
|
-
mode?: `${LayoutColourMode}`;
|
|
9496
|
-
/** Where the studio keeps each photo (its media URL). */
|
|
9497
|
-
photoSrc: (photoId: string) => string;
|
|
9498
|
-
/** A photo's description; '' (decorative) when not given. */
|
|
9499
|
-
photoAlt?: (photoId: string) => string;
|
|
9500
|
-
/** A photo's shape: the height its frame keeps where it stacks (a phone, a Scene with no scroll). Landscape when not given. */
|
|
9501
|
-
photoShape?: (photoId: string) => `${LayoutPhotoShape}` | undefined;
|
|
9502
|
-
/** Silent section fallback: the node a place given to the plan's ready-made section stands as (`LayoutSection.readyMade`),
|
|
9503
|
-
* stamped by the caller from that plan section's pattern with `id` as its root id. A layout with such a place and no
|
|
9504
|
-
* stamper is refused. */
|
|
9505
|
-
readyMade?: (section: LayoutSection, id: string) => SerializedNode;
|
|
9506
|
-
/** The design the page wears (its fonts size a `screen` word, iox-ui#46). Default: the look's preset in `mode`. */
|
|
9507
|
-
design?: DesignChoices;
|
|
9508
|
-
/** Gate 2: a list data source's picture and name fields — a gallery naming the source shows its items. Null when the
|
|
9509
|
-
* source has no picture field (the gallery keeps its own slides). */
|
|
9510
|
-
sourceFields?: (alias: string) => {
|
|
9511
|
-
image: string;
|
|
9512
|
-
title?: string;
|
|
9513
|
-
} | null;
|
|
9514
|
-
}
|
|
9515
|
-
interface ComposedLayout {
|
|
9516
|
-
/** The page's layout: one root per section. */
|
|
9517
|
-
layout: SerializedNode[];
|
|
9518
|
-
/** The site header (a global BEFORE element) with the layout's section links, or null when the layout has no nav. */
|
|
9519
|
-
header: SerializedNode | null;
|
|
9520
|
-
/** The node id each section's id became (what its links scroll to). */
|
|
9521
|
-
sections: Record<string, string>;
|
|
9522
|
-
gaps: LayoutGap[];
|
|
9523
|
-
}
|
|
9524
|
-
/**
|
|
9525
|
-
* Words drawn on a shape or a photo at a laptop's width lose it on a phone: the shape is hidden and every layer stacks,
|
|
9526
|
-
* so they read on the section's own ground there. When their colour would vanish into that ground (the live clinic's
|
|
9527
|
-
* "What we treat", white on its shape, and the bar's label on its photo — 1:1 on the phone), the phone gives them the
|
|
9528
|
-
* colour the ground's words take; otherwise null (M8 gate 2, fix first part 3).
|
|
9529
|
-
*/
|
|
9530
|
-
declare function phoneWordsColour(l: LayoutLayer, li: number, s: Pick<LayoutSection, 'layers' | 'ground'>): string | null;
|
|
9531
|
-
/** The scheme a form, a gallery, a button or a ready-made section's content on this section ground wears, or null on the page's own ground. */
|
|
9532
|
-
declare function layoutBandScheme(ground: string | undefined): ColorScheme | null;
|
|
9533
|
-
/** The column a ready-made section's words start on: where its neighbour's words start (their first column), so the two
|
|
9534
|
-
* share an edge; at most READY_MADE_MAX_COLUMN; 1 (the gutter) when the neighbour has no words. */
|
|
9535
|
-
declare function readyMadeColumn(neighbour: LayoutSection | null): number;
|
|
9536
|
-
/**
|
|
9537
|
-
* A layout-language page → its layout and header. Deterministic: the same layout composes to byte-identical nodes.
|
|
9538
|
-
* Refuses (ComposeError) a link to a section the layout does not have; everything the product cannot say comes back in
|
|
9539
|
-
* `gaps`.
|
|
9540
|
-
*/
|
|
9541
|
-
declare function composeLayout(site: LayoutSite, options: ComposeLayoutOptions): ComposedLayout;
|
|
9542
|
-
|
|
9543
9647
|
/** A look's composition notes (contract `site.layout.looks`): what a composed page in that look keeps to. */
|
|
9544
9648
|
type LayoutLook = (typeof SPEC_SITE_LAYOUT.looks)[number];
|
|
9545
9649
|
/**
|
|
@@ -9565,6 +9669,30 @@ declare function layoutDialOf(animate: string | null | undefined, ceiling: strin
|
|
|
9565
9669
|
|
|
9566
9670
|
/** A gallery the wire marks `autoplay` turns every 5 s — what the proof sites' autoplaying galleries do. */
|
|
9567
9671
|
declare const LAYOUT_WIRE_AUTOPLAY_MS = 5000;
|
|
9672
|
+
declare enum LayoutMixIngredient {
|
|
9673
|
+
Item = "item",
|
|
9674
|
+
Arrange = "arrange",
|
|
9675
|
+
Who = "who",
|
|
9676
|
+
How = "how",
|
|
9677
|
+
Move = "move",
|
|
9678
|
+
Hover = "hover",
|
|
9679
|
+
Arrive = "arrive",
|
|
9680
|
+
Phone = "phone"
|
|
9681
|
+
}
|
|
9682
|
+
/** Every word the wire's `mix` may hold, ingredient by ingredient. */
|
|
9683
|
+
declare const LAYOUT_MIX_WORDS: ReadonlyArray<string>;
|
|
9684
|
+
/** A list a composed page may show, as the wire's parts enum needs it (`layoutListShapes` gives these). */
|
|
9685
|
+
interface LayoutWireList {
|
|
9686
|
+
alias: string;
|
|
9687
|
+
roles: ReadonlyArray<string>;
|
|
9688
|
+
}
|
|
9689
|
+
interface LayoutWireOptions {
|
|
9690
|
+
/** The plan's lists: given, every layer carries `mix` and `parts` (LI1 — the list ingredients); absent, the wire is
|
|
9691
|
+
* the gate-2 one (37 properties). */
|
|
9692
|
+
lists?: ReadonlyArray<LayoutWireList>;
|
|
9693
|
+
}
|
|
9694
|
+
/** `<list>.<role>` for every role of every list — what a list section's `parts` may name. */
|
|
9695
|
+
declare function layoutWirePartWords(lists: ReadonlyArray<LayoutWireList>): string[];
|
|
9568
9696
|
interface LayoutWireSlot {
|
|
9569
9697
|
slot: string;
|
|
9570
9698
|
text: string;
|
|
@@ -9597,6 +9725,9 @@ interface LayoutWireLayer {
|
|
|
9597
9725
|
perView: number;
|
|
9598
9726
|
slots: LayoutWireSlot[];
|
|
9599
9727
|
motion: LayoutWireTrack[];
|
|
9728
|
+
/** LI1, with `LayoutWireOptions.lists`: a list section's mix (`arrange:grid`…) and its parts (`stories.quote`…). */
|
|
9729
|
+
mix?: string[];
|
|
9730
|
+
parts?: string[];
|
|
9600
9731
|
}
|
|
9601
9732
|
interface LayoutWireSection {
|
|
9602
9733
|
id: string;
|
|
@@ -9612,8 +9743,8 @@ interface LayoutWireSection {
|
|
|
9612
9743
|
interface LayoutWire {
|
|
9613
9744
|
sections: LayoutWireSection[];
|
|
9614
9745
|
}
|
|
9615
|
-
/** The strict format for one composed page. */
|
|
9616
|
-
declare function layoutWireJsonSchema(): JsonSchema;
|
|
9746
|
+
/** The strict format for one composed page — with the list ingredients when `options.lists` is given. */
|
|
9747
|
+
declare function layoutWireJsonSchema(options?: LayoutWireOptions): JsonSchema;
|
|
9617
9748
|
/**
|
|
9618
9749
|
* A section's beats, never asked: the lead enters first; every other entering layer takes the next beat in the order it
|
|
9619
9750
|
* was written, held at the stagger's last (Emil's shrinking stagger reads the beat and stops shrinking at the sixth; the
|
|
@@ -10223,5 +10354,5 @@ declare function applyLayoutEdits(page: LayoutPage, edits: ReadonlyArray<LayoutE
|
|
|
10223
10354
|
/** The strict format a repair is asked in: `{ edits: [{ op, path, value }] }`, every key required. */
|
|
10224
10355
|
declare function layoutRepairJsonSchema(): JsonSchema;
|
|
10225
10356
|
|
|
10226
|
-
export { ACCOUNT_ENTRY_ID, ACTION_START_SCALE, ACTIVE_BUILD_STATUSES, AI_COMPOSED_PAGES_ESTIMATED, AI_PLAN_REASKED_PART, AI_REFUSAL_NEXT, AI_REFUSAL_STATUS, AI_STEPS, AI_STEP_LABELS, AI_STEP_NEEDS, AI_STEP_PART_TOKENS, AI_STEP_TYPICAL_TOKENS, ART_DIRECTION_PARTS, AiCallStatus, AiCapability, AiFeature, AiGenerationStage, AiKeyMode, AiLimit, AiNextKind, AiProviderId, AiRefusalCode, AiStep, BAR_ITEMS_MAX, BAR_ITEMS_MIN, BASELINE_ROLES, BUILD_STEPS, BaselineRole, BindScope, BuildNoticeCode, BuildStep, CONTENT_ROLE_MEANINGS, CREDITS_PER_USD, CardBindTarget, CheckSeverity, ComposeError, ComposeIssueCode, ContentFieldControl, ContentFieldType, ContentRole, ContentTypeAction, CreatedKind, DANGLING_LINK_CODES, DEFAULT_PHONE_MENU_BREAKPOINT, DEFAULT_SITE_LOCALE, ENTRANCE_EASING, ENTRANCE_ORIGIN_LOOK, ENTRANCE_TRIGGER, EntrancePart, EntranceSide, FACT_KEYS, FIELD_TYPE_OF_CONTROL, FILL_ASPECT, FILM_PATTERN, FINAL_GENERATION_STAGES, FINDING_SEVERITY, FilmUnplaced, GRAMMAR_TOO_LARGE_MESSAGE, GlobalSlot, HEBREW_PREFIXES, JSON_SCHEMA_BANNED_KEYWORDS, JsonSchemaShapeError, KeptReason, LAYOUT_ACCENT_TEXT, LAYOUT_BEAT_DELAY, LAYOUT_CHECK_VIEWPORT, LAYOUT_COLOUR_TOKEN, LAYOUT_COLUMN_GAP, LAYOUT_DEPTH_ON_PHONE, LAYOUT_DRIFT, LAYOUT_EASING, LAYOUT_ENTRANCE_MAX_MS, LAYOUT_FONT_SIZE, LAYOUT_GUTTER, LAYOUT_HIDDEN_OPACITY, LAYOUT_KINETIC_KINDS, LAYOUT_LINE_HEIGHT, LAYOUT_OPERATED, LAYOUT_PACE, LAYOUT_PHONE_BREAKPOINT, LAYOUT_PHONE_PADDING, LAYOUT_PHOTO_ASPECT, LAYOUT_READY_MADE_TOKEN, LAYOUT_RISE, LAYOUT_SCREEN_PX, LAYOUT_TEXT_KINDS, LAYOUT_TOOLTIP_TRAIT, LAYOUT_VIEWPORTS, LAYOUT_WIRE_AUTOPLAY_MS, LIST_LONG_WORDS, LIST_ROLE_WORDS, LayoutAlign, LayoutBleed, LayoutButtonVariant, LayoutColour, LayoutColourMode, LayoutDepth, LayoutDial, LayoutEase, LayoutEditOp, LayoutEnter, LayoutGalleryEffect, LayoutGapCode, LayoutIssueCode, LayoutLayerKind, LayoutMendKind, LayoutNavKind, LayoutPace, LayoutPhotoShape, LayoutPhotoSource, LayoutRole, LayoutSectionKind, LayoutSequenceToken, LayoutSide, LayoutSignatureId, LayoutSize, LayoutSourceChoice, LayoutTrackProp, LayoutTransition, LayoutViewport, MAX_SITE_PICTURES, NAV_PART_LABELS, NAV_SHAPE_COPY, NEUTRAL_STYLE_PROPS, NODE_BASELINES, NO_TOKENS, NavPagesSource, NavRole, NavShape, NavShapeError, PAGE_ARCHETYPES, PHOTO_ANALYSIS_WIDTH, PHOTO_CALM_DETAIL, PHOTO_GRID, PHOTO_LIGHT_LUMINANCE, PICTURE_ASPECTS, PICTURE_NEVER, PICTURE_REAL_PLACE_FAMILIES, PICTURE_REROLL_EVERY, PICTURE_REVIEW_FORMAT, PICTURE_REVIEW_SHAPE, PICTURE_TEXT_CONTRAST, PICTURE_WORLDS, PICTURE_WORLD_IDS, PLAN_EDITS_ANSWER_SHAPES, PLAN_EDITS_PART_SCHEMA_NAMES, PLAN_EDIT_OP_PART, PLAN_EDIT_SHAPE, PLAN_EDIT_WIRE_KEYS, PLAN_PARTS, PLAN_PART_KEYS, PLAN_WIRE_DERIVED, PLAN_WIRE_PART_SCHEMA_NAMES, PLAN_WIRE_SHAPE, PRICING_PATTERN, PROOF_FINGERPRINTS, PUBLISH_BLOCKING_PLACEHOLDERS, PageDataKind, PathIssueCollector, PatternDirective, PatternGlobalPosition, PatternOpens, PatternPlaceholder, PatternRecipe, PhoneMenuBreakpoint, PhotoTone, PictureRefusal, PictureWorld, PlaceholderKind, PlanChangeAction, PlanChangeKind, PlanDataSourceMode, PlanDataSourceType, PlanEditIssueCode, PlanEditOp, PlanEditsOutcome, PlanPart, PlanWireEntry, PlanWireShapeError, PlanWordIssueCode, PreflightRefusalCode, PriceBindTarget, PublishRefusalCode, PublishScope, RENDER_CHECK, REQUIRED_CONTENT_ROLES, RelativeOp, SAMPLE_IMAGE_REF, SCENE_LEVEL, SCENE_OTHER_PAGES, SCRIM_BACKGROUND, SCRIM_COVER, SCRIM_LEVELS, SHOP_CART_BUTTON_ID, SHOP_CART_DRAWER_ID, SHOP_FIELDS, SHOP_LATEST_LIMIT, SHOP_LIST_LIMIT, SHOP_NEED, SHOP_ONLY_CONTENT_ROLES, SHOP_PRODUCTS_MAX, SHOP_ROLES, SHOP_SLUG_FIELD, SHOWCASE_FILM, SHOWCASE_SHOP, SIGN_IN_DIALOG_ID, SITE_CHECKS, SITE_FACT_LABELS, SITE_HEADER_PATTERN, SITE_LIBRARY, SITE_LOCALES, SITE_NEED_IDS, SITE_PATTERNS, SITE_PLAN_VERSION, SITE_TEMPLATES, SPEC_SITE_ARCHETYPES, SPEC_SITE_COPY_LENGTHS, SPEC_SITE_DENSITY_COPY, SPEC_SITE_FACTS, SPEC_SITE_LAYOUT, SPEC_SITE_LIBRARY, SPEC_SITE_LOCALES, SPEC_SITE_NEED_IDS, SPEC_SITE_PATTERNS, SPEC_SITE_PICTURE_NEVER, SPEC_SITE_PICTURE_WORLDS, SPEC_SITE_PLAN_SHAPE, SPEC_SITE_REQUIRED_ROLES, SPEC_SITE_ROLES, SPEC_SITE_TEMPLATES, STOCK_FAMILIES, STOCK_FAMILY_INTENTS, STOCK_INTENT_ORDER, STOCK_INTENT_SUBJECTS, STOCK_ITEM_ASPECT, STOCK_MIN_KEPT, STOCK_PROVIDER_TERMS, STOCK_SEED_MARGIN, STOCK_SUBJECT_WORDS, STORE_CONTACT_CODES, STRICT_SCHEMA_BUDGET, STRICT_SCHEMA_LIMITS, STUDIO_TEMPLATE, ScrimLevel, SectionFallbackLastResort, SectionSwapAction, SectionSwapRule, ShopResource, ShopSourceRole, SiteBuildKind, SiteBuildStatus, SiteCheckId, SiteFindingCode, SiteLocale, SitePlanError, SitePlanIssueCode, SitePlanSourceKind, SiteTemplateError, SiteTemplateId, StepState, StockIntent, StockOrientation, StockProviderId, StockReviewFlag, StockReviewVerdict, StockSlotKind, StockSubject, WORDS_AREA_DEFAULT_SHARE, WordsEdge, addBarItem, addStockCredits, aiRefusalNext, aiStepParts, applyLayoutEdits, applyOwnPhotoGalleries, applyPictureScrims, applyPlanEdits, applyStockItemPhotos, applyStockPhotos, archetypeIssues, areaLuminance, artDirectionFor, artDirectionIssues, artDirectionPreamble, aspectRatioOf, assertStyleSlots, assertValidSitePlan, auditLayoutMotion, auditSite, barIconForRoute, blocksPublish, brandHueWord, buildKeys, buildStepFacts, buildStepsOf, builtHomePageId, calmParts, calmUnder, checkLayout, chooseScrim, composeContextOf, composeLayout, composeNavHeader, composePresetForm, composeSection, composeSite, contentTypeOfSource, contentTypePreviewFields, contentTypeToWire, copyLengthOf, costUsd, coverCrop, createSerializedNode, creditsOfUsd, dataSourceToWire, derivedBeats, derivedDataSources, derivedShopSources, describeInventoryForPrompt, describeListShape, describePlanData, describeShapeKey, driftAt, driftOverlap, emptyAreaPhrase, entranceAction, entranceInteraction, estimatePictures, estimateStepCredits, expandLayoutWire, expandPlanWire, expandWireContentType, expandWireDataSource, expandWireEdit, expandWireField, expandWirePage, expandWireSection, expandWireShop, failedBuildStep, fallBackBySection, fieldToWire, filmOfPlan, filmPlacement, findNavRoot, fingerprintOf, frameWords, isActiveBuild, isLayoutRule, isNonEmptyString, isPictureWorld, isPlainObject, isRtlLocale, isShopResource, jsonAnyOf, jsonBoolean, jsonClosedObject, jsonInteger, jsonListOf, jsonOneOf, jsonSchemaKeywords, jsonSchemaObjects, jsonShapedObject, jsonText, judgeLayoutRender, layerShownSpans, layoutBandScheme, layoutBoxPx, layoutColumnsVw, layoutDesignOf, layoutDialOf, layoutDriftPhoto, layoutElementStyle, layoutGalleryLists, layoutGallerySources, layoutGlideDepth, layoutHeldStill, layoutListShapes, layoutLookChanges, layoutLookOf, layoutMotionOf, layoutNodeClass, layoutOpeningDisplayMend, layoutOpeningDisplays, layoutPathSteps, layoutPhotoIds, layoutPresetColours, layoutPresetOf, layoutRepairJsonSchema, layoutRoomPx, layoutRuleEdge, layoutShapeHasPurpose, layoutStillLine, layoutTextFits, layoutTextWidthEm, layoutToWire, layoutVoidScreens, layoutVoids, layoutWireJsonSchema, luminanceOf, measureLayout, mendLayout, modelCanDo, moveBarItem, navPages, navShapeBreakpoint, navShapeOf, nextSourceOf, nodeBindPaths, orientationOfRatio, ownPhotoFit, pageToWire, parseLayoutPhotoId, parsePatternPath, parseSampleImageRef, pathAt, patternById, patternHasForm, patternLinkSlots, patternListGap, patternManifest, patternNeedsBinding, patternNodes, patternOptionalParts, patternRoleNeeds, patternScopes, patternSlotBudgets, patternSlots, patternTakesBinding, phoneGapBefore, phoneMenuPages, phoneWordsColour, photoInventory, photoShapeOf, pictureAspect, pictureItemsOf, picturePrompt, pictureRefusalOf, pictureRerolls, pictureReviewIssues, pictureReviewJsonSchema, pictureReviewPasses, pictureSlotKey, pictureTargets, pictureTryFits, pixelsUnder, placeFilm, planEditOps, planEditToWire, planEditWireGaps, planEditWireKeys, planEditWireOps, planEditWireShape, planEditsFromWire, planEditsJsonSchema, planEditsToWire, planEntrances, planFromTemplate, planHasShopSource, planLayoutPhotos, planNavShape, planOwnPhotos, planPartOfPath, planPartToWire, planPictures, planSells, planStockPhotos, planToWire, planWireGaps, planWirePartJsonSchema, planWirePartShape, planWordIssues, pricesIn, publishRefusal, publishVerdict, readyMadeColumn, recipeListBinds, recomposeAsks, releasedLayoutDefaults, removeBarItem, requiredAcknowledgements, requiredShapeKeys, roleField, routeMatches, routeParams, samenessIssues, sampleImageRef, scoreStockPhoto, screenFontSize, screenWordColumns, screenWordMisfit, screenWordOverflowPx, sectionEntrances, sectionPatternIds, sectionToWire, sectionsNamed, sequenceShare, sequenceTokenOf, setStyleProps, shapeKeys, shopCategoriesOf, shopContentType, shopSourceAliases, showcaseGlobals, showcasePages, showcasePlans, showcaseScenes, showcaseStorePages, shownTogether, signatureOf, siteNavPages, siteSells, slotBudget, splitSide, stockCopyKey, stockCreditLine, stockCreditLines, stockCreditNode, stockCreditNodeId, stockFits, stockGroupOf, stockItemSlots, stockKept, stockPhotoRatio, stockPhotoSubject, stockPhotoUsable, stockPhotoWords, stockSlots, stockWord, stockWords, strictSchemaComplexity, strictSchemaRefusal, toneOf, typicalStepTokens, validatePlanEdits, validateSitePlan, variantNamesOf, walkSerialized, wireContentTypeJsonSchema, wireDataSourceJsonSchema, wireFieldJsonSchema, wirePageJsonSchema, wireSectionJsonSchema, wireShopProductJsonSchema, withDerivedSources, wordPattern, wordsOverPhotos, wordsOverPicture, writtenTexts };
|
|
10227
|
-
export type { AddBarItemResult, AiBuyCredits, AiEntitlementsView, AiMeter, AiModelEntry, AiRefusal, AiTokenCounts, AiTokenPrice, AreaLuminance, ArtDirection, AuditPage, AuditPlaceholder, BarItemsEditResult, BuildNotice, BuildStepError, BuildStepFacts, BuildStepRecord, CalmReading, CheckLayoutContext, CmsDataSourcePlan, ComposeContext, ComposeIssue, ComposeLayoutOptions, ComposedDataSource, ComposedItem, ComposedLayout, ComposedNavHeader, ComposedPage, ComposedPlaceholder, ComposedProduct, ComposedRoute, ComposedSection, ComposedShop, ComposedSite, ContentFieldPlan, ContentRoles, ContentSeedPlan, ContentTypePlan, CreateNodeOptions, CreatedRecord, DataSourcePlan, DriftBox, DriftLayer, DriftMeeting, DynamicKeysAsList, EntranceAction, EntranceActionOptions, EntranceInteraction, EntranceMark, EntranceSpec, EntranceStamp, FactKey, FilmPlacement, FilmTarget, FingerprintedPage, FrameRegion, JsonSchema, LayoutBandMove, LayoutColours, LayoutEdit, LayoutFingerprint, LayoutForm, LayoutGallery, LayoutGalleryList, LayoutGap, LayoutGivenAway, LayoutIssue, LayoutLayer, LayoutListShape, LayoutLook, LayoutMend, LayoutPage, LayoutPhotoAddress, LayoutReadyMade, LayoutRect, LayoutSection, LayoutSite, LayoutTrack, LayoutVoid, LayoutWire, LayoutWireLayer, LayoutWireSection, LayoutWireSlot, LayoutWireTrack, MeasuredLayer, MeasuredLayout, NavHeaderInput, NavHeaderOptions, NavPage, NavShapeOptions, NavShapeResult, NodeBaseline, OwnPhoto, OwnPhotoPlacement, PageArchetype, PageArchetypeId, PageArchetypeSlot, PageData, PageDataLine, PagePlan, PageSectionPlan, PageSeoPlan, PathIssue, PatternManifestEntry, PatternManifestOptions, PatternNode, PatternPath, PatternRoleNeed, PatternTrack, PhotoInventory, PhotoWordsArea, PicturePlan, PicturePlanOptions, PicturePromptContext, PictureReview, PictureSlot, PictureTryBudget, PictureWorldSpec, PicturesEstimate, PixelReading, PlacedFilm, PlainObject, PlanChange, PlanDirection, PlanEdit, PlanEditIssue, PlanEditResult, PlanEditsAnswer, PlanEntrancesInput, PlanFilm, PlanWireContext, PlanWireParts, PlanWordContext, PlanWordIssue, PreflightRefusal, PublishRefusal, RecipeListBinds, RelativeDataSourcePlan, ScrimChoice, SectionEntrances, SectionFallback, SectionInput, SectionJudge, SectionOptions, SectionSwap, SerializedBinding, SerializedNode, SerializedResponsive, ShapeEntry, ShapeIssueCodes, ShopDataSourcePlan, ShopOptionPlan, ShopPlan, ShopProductPlan, ShowcaseInput, SiteAudit, SiteAuditOptions, SiteAuditSnapshot, SiteBuildRun, SiteBusiness, SiteCheck, SiteFinding, SiteNeedId, SitePageRef, SitePattern, SitePlan, SitePlanContext, SitePlanIssue, SitePlanSource, SitePlanValidation, SiteTemplate, StockCredit, StockItemSlot, StockLink, StockNeed, StockPhoto, StockPhotoTraits, StockPlacement, StockPlanOptions, StockProviderTerms, StockReview, StockSlot, StockTarget, StrictSchemaComplexity, StrictSchemaRefusal, TemplatePlanInput, UndoKept, UndoPreview, UndoRecord, WireOptions, WordsArea, WrittenText };
|
|
10357
|
+
export { ACCOUNT_ENTRY_ID, ACTION_START_SCALE, ACTIVE_BUILD_STATUSES, AI_COMPOSED_PAGES_ESTIMATED, AI_PLAN_REASKED_PART, AI_REFUSAL_NEXT, AI_REFUSAL_STATUS, AI_STEPS, AI_STEP_LABELS, AI_STEP_NEEDS, AI_STEP_PART_TOKENS, AI_STEP_TYPICAL_TOKENS, ART_DIRECTION_PARTS, AiCallStatus, AiCapability, AiFeature, AiGenerationStage, AiKeyMode, AiLimit, AiNextKind, AiProviderId, AiRefusalCode, AiStep, BAR_ITEMS_MAX, BAR_ITEMS_MIN, BASELINE_ROLES, BUILD_STEPS, BaselineRole, BindScope, BuildNoticeCode, BuildStep, CONTENT_ROLE_MEANINGS, CREDITS_PER_USD, CardBindTarget, CheckSeverity, ComposeError, ComposeIssueCode, ContentFieldControl, ContentFieldType, ContentRole, ContentTypeAction, CreatedKind, DANGLING_LINK_CODES, DEFAULT_PHONE_MENU_BREAKPOINT, DEFAULT_SITE_LOCALE, ENTRANCE_EASING, ENTRANCE_ORIGIN_LOOK, ENTRANCE_TRIGGER, EntrancePart, EntranceSide, FACT_KEYS, FIELD_TYPE_OF_CONTROL, FILL_ASPECT, FILM_PATTERN, FINAL_GENERATION_STAGES, FINDING_SEVERITY, FilmUnplaced, GRAMMAR_TOO_LARGE_MESSAGE, GlobalSlot, HEBREW_PREFIXES, JSON_SCHEMA_BANNED_KEYWORDS, JsonSchemaShapeError, KeptReason, LAYOUT_ACCENT_TEXT, LAYOUT_BEAT_DELAY, LAYOUT_CHECK_VIEWPORT, LAYOUT_COLOUR_TOKEN, LAYOUT_COLUMN_GAP, LAYOUT_DEPTH_ON_PHONE, LAYOUT_DRIFT, LAYOUT_EASING, LAYOUT_ENTRANCE_MAX_MS, LAYOUT_FONT_SIZE, LAYOUT_GUTTER, LAYOUT_HIDDEN_OPACITY, LAYOUT_KINETIC_KINDS, LAYOUT_LINE_HEIGHT, LAYOUT_MIX_WORDS, LAYOUT_OPERATED, LAYOUT_PACE, LAYOUT_PHONE_BREAKPOINT, LAYOUT_PHONE_PADDING, LAYOUT_PHOTO_ASPECT, LAYOUT_READY_MADE_TOKEN, LAYOUT_RISE, LAYOUT_SCREEN_PX, LAYOUT_TEXT_KINDS, LAYOUT_TOOLTIP_TRAIT, LAYOUT_VIEWPORTS, LAYOUT_WIRE_AUTOPLAY_MS, LIST_CARD_PART, LIST_LONG_WORDS, LIST_ROLE_WORDS, LayoutAlign, LayoutBleed, LayoutButtonVariant, LayoutColour, LayoutColourMode, LayoutDepth, LayoutDial, LayoutEase, LayoutEditOp, LayoutEnter, LayoutGalleryEffect, LayoutGapCode, LayoutIssueCode, LayoutLayerKind, LayoutListArrange, LayoutListArrive, LayoutListHover, LayoutListHow, LayoutListItem, LayoutListMove, LayoutListPhone, LayoutListRole, LayoutListWho, LayoutMendKind, LayoutMixIngredient, LayoutNavKind, LayoutPace, LayoutPhotoShape, LayoutPhotoSource, LayoutRole, LayoutSectionKind, LayoutSequenceToken, LayoutSide, LayoutSignatureId, LayoutSize, LayoutSourceChoice, LayoutTrackProp, LayoutTransition, LayoutViewport, MAX_SITE_PICTURES, NAV_PART_LABELS, NAV_SHAPE_COPY, NEUTRAL_STYLE_PROPS, NODE_BASELINES, NO_TOKENS, NavPagesSource, NavRole, NavShape, NavShapeError, PAGE_ARCHETYPES, PHOTO_ANALYSIS_WIDTH, PHOTO_CALM_DETAIL, PHOTO_GRID, PHOTO_LIGHT_LUMINANCE, PICTURE_ASPECTS, PICTURE_NEVER, PICTURE_REAL_PLACE_FAMILIES, PICTURE_REROLL_EVERY, PICTURE_REVIEW_FORMAT, PICTURE_REVIEW_SHAPE, PICTURE_TEXT_CONTRAST, PICTURE_WORLDS, PICTURE_WORLD_IDS, PLAN_EDITS_ANSWER_SHAPES, PLAN_EDITS_PART_SCHEMA_NAMES, PLAN_EDIT_OP_PART, PLAN_EDIT_SHAPE, PLAN_EDIT_WIRE_KEYS, PLAN_PARTS, PLAN_PART_KEYS, PLAN_WIRE_DERIVED, PLAN_WIRE_PART_SCHEMA_NAMES, PLAN_WIRE_SHAPE, PRICING_PATTERN, PROOF_FINGERPRINTS, PUBLISH_BLOCKING_PLACEHOLDERS, PageDataKind, PathIssueCollector, PatternDirective, PatternGlobalPosition, PatternOpens, PatternPlaceholder, PatternRecipe, PhoneMenuBreakpoint, PhotoTone, PictureRefusal, PictureWorld, PlaceholderKind, PlanChangeAction, PlanChangeKind, PlanDataSourceMode, PlanDataSourceType, PlanEditIssueCode, PlanEditOp, PlanEditsOutcome, PlanPart, PlanWireEntry, PlanWireShapeError, PlanWordIssueCode, PreflightRefusalCode, PriceBindTarget, PublishRefusalCode, PublishScope, RENDER_CHECK, REQUIRED_CONTENT_ROLES, RelativeOp, SAMPLE_IMAGE_REF, SCENE_LEVEL, SCENE_OTHER_PAGES, SCRIM_BACKGROUND, SCRIM_COVER, SCRIM_LEVELS, SHOP_CART_BUTTON_ID, SHOP_CART_DRAWER_ID, SHOP_FIELDS, SHOP_LATEST_LIMIT, SHOP_LIST_LIMIT, SHOP_NEED, SHOP_ONLY_CONTENT_ROLES, SHOP_PRODUCTS_MAX, SHOP_ROLES, SHOP_SLUG_FIELD, SHOWCASE_FILM, SHOWCASE_SHOP, SIGN_IN_DIALOG_ID, SITE_CHECKS, SITE_FACT_LABELS, SITE_HEADER_PATTERN, SITE_LIBRARY, SITE_LOCALES, SITE_NEED_IDS, SITE_PATTERNS, SITE_PLAN_VERSION, SITE_TEMPLATES, SPEC_SITE_ARCHETYPES, SPEC_SITE_COPY_LENGTHS, SPEC_SITE_DENSITY_COPY, SPEC_SITE_FACTS, SPEC_SITE_LAYOUT, SPEC_SITE_LIBRARY, SPEC_SITE_LOCALES, SPEC_SITE_NEED_IDS, SPEC_SITE_PATTERNS, SPEC_SITE_PICTURE_NEVER, SPEC_SITE_PICTURE_WORLDS, SPEC_SITE_PLAN_SHAPE, SPEC_SITE_REQUIRED_ROLES, SPEC_SITE_ROLES, SPEC_SITE_TEMPLATES, STOCK_FAMILIES, STOCK_FAMILY_INTENTS, STOCK_INTENT_ORDER, STOCK_INTENT_SUBJECTS, STOCK_ITEM_ASPECT, STOCK_MIN_KEPT, STOCK_PROVIDER_TERMS, STOCK_SEED_MARGIN, STOCK_SUBJECT_WORDS, STORE_CONTACT_CODES, STRICT_SCHEMA_BUDGET, STRICT_SCHEMA_LIMITS, STUDIO_TEMPLATE, ScrimLevel, SectionFallbackLastResort, SectionSwapAction, SectionSwapRule, ShopResource, ShopSourceRole, SiteBuildKind, SiteBuildStatus, SiteCheckId, SiteFindingCode, SiteLocale, SitePlanError, SitePlanIssueCode, SitePlanSourceKind, SiteTemplateError, SiteTemplateId, StepState, StockIntent, StockOrientation, StockProviderId, StockReviewFlag, StockReviewVerdict, StockSlotKind, StockSubject, WORDS_AREA_DEFAULT_SHARE, WordsEdge, addBarItem, addStockCredits, aiRefusalNext, aiStepParts, applyLayoutEdits, applyOwnPhotoGalleries, applyPictureScrims, applyPlanEdits, applyStockItemPhotos, applyStockPhotos, archetypeIssues, areaLuminance, artDirectionFor, artDirectionIssues, artDirectionPreamble, aspectRatioOf, assertStyleSlots, assertValidSitePlan, auditLayoutMotion, auditSite, barIconForRoute, blocksPublish, brandHueWord, buildKeys, buildStepFacts, buildStepsOf, builtHomePageId, calmParts, calmUnder, checkLayout, chooseScrim, composeContextOf, composeLayout, composeNavHeader, composePresetForm, composeSection, composeSite, contentTypeOfSource, contentTypePreviewFields, contentTypeToWire, copyLengthOf, costUsd, coverCrop, createSerializedNode, creditsOfUsd, dataSourceToWire, derivedBeats, derivedDataSources, derivedShopSources, describeInventoryForPrompt, describeListShape, describePlanData, describeShapeKey, driftAt, driftOverlap, emptyAreaPhrase, entranceAction, entranceInteraction, estimatePictures, estimateStepCredits, expandLayoutWire, expandPlanWire, expandWireContentType, expandWireDataSource, expandWireEdit, expandWireField, expandWirePage, expandWireSection, expandWireShop, failedBuildStep, fallBackBySection, fieldToWire, filmOfPlan, filmPlacement, findNavRoot, fingerprintOf, frameWords, isActiveBuild, isLayoutRule, isNonEmptyString, isPictureWorld, isPlainObject, isRtlLocale, isShopResource, jsonAnyOf, jsonBoolean, jsonClosedObject, jsonInteger, jsonListOf, jsonOneOf, jsonSchemaKeywords, jsonSchemaObjects, jsonShapedObject, jsonText, judgeLayoutRender, layerShownSpans, layoutBandScheme, layoutBoxPx, layoutColumnsVw, layoutDesignOf, layoutDialOf, layoutDriftPhoto, layoutElementStyle, layoutGalleryLists, layoutGallerySources, layoutGlideDepth, layoutHeldStill, layoutListBinding, layoutListShapes, layoutLookChanges, layoutLookOf, layoutMotionOf, layoutNodeClass, layoutOpeningDisplayMend, layoutOpeningDisplays, layoutPathSteps, layoutPhotoIds, layoutPresetColours, layoutPresetOf, layoutRepairJsonSchema, layoutRoomPx, layoutRuleEdge, layoutShapeHasPurpose, layoutStillLine, layoutTextFits, layoutTextWidthEm, layoutToWire, layoutVoidScreens, layoutVoids, layoutWireJsonSchema, layoutWirePartWords, luminanceOf, measureLayout, mendLayout, modelCanDo, moveBarItem, navPages, navShapeBreakpoint, navShapeOf, nextSourceOf, nodeBindPaths, orientationOfRatio, ownPhotoFit, pageToWire, parseLayoutPhotoId, parsePatternPath, parseSampleImageRef, pathAt, patternById, patternHasForm, patternLinkSlots, patternListGap, patternManifest, patternNeedsBinding, patternNodes, patternOptionalParts, patternRoleNeeds, patternScopes, patternSlotBudgets, patternSlots, patternTakesBinding, phoneGapBefore, phoneMenuPages, phoneWordsColour, photoInventory, photoShapeOf, pictureAspect, pictureItemsOf, picturePrompt, pictureRefusalOf, pictureRerolls, pictureReviewIssues, pictureReviewJsonSchema, pictureReviewPasses, pictureSlotKey, pictureTargets, pictureTryFits, pixelsUnder, placeFilm, planEditOps, planEditToWire, planEditWireGaps, planEditWireKeys, planEditWireOps, planEditWireShape, planEditsFromWire, planEditsJsonSchema, planEditsToWire, planEntrances, planFromTemplate, planHasShopSource, planLayoutPhotos, planNavShape, planOwnPhotos, planPartOfPath, planPartToWire, planPictures, planSells, planStockPhotos, planToWire, planWireGaps, planWirePartJsonSchema, planWirePartShape, planWordIssues, pricesIn, publishRefusal, publishVerdict, readyMadeColumn, recipeListBinds, recomposeAsks, releasedLayoutDefaults, removeBarItem, requiredAcknowledgements, requiredShapeKeys, roleField, routeMatches, routeParams, samenessIssues, sampleImageRef, scoreStockPhoto, screenFontSize, screenWordColumns, screenWordMisfit, screenWordOverflowPx, sectionEntrances, sectionPatternIds, sectionToWire, sectionsNamed, sequenceShare, sequenceTokenOf, setStyleProps, shapeKeys, shopCategoriesOf, shopContentType, shopSourceAliases, showcaseGlobals, showcasePages, showcasePlans, showcaseScenes, showcaseStorePages, shownTogether, signatureOf, siteNavPages, siteSells, slotBudget, splitSide, stockCopyKey, stockCreditLine, stockCreditLines, stockCreditNode, stockCreditNodeId, stockFits, stockGroupOf, stockItemSlots, stockKept, stockPhotoRatio, stockPhotoSubject, stockPhotoUsable, stockPhotoWords, stockSlots, stockWord, stockWords, strictSchemaComplexity, strictSchemaRefusal, toneOf, typicalStepTokens, validatePlanEdits, validateSitePlan, variantNamesOf, walkSerialized, wireContentTypeJsonSchema, wireDataSourceJsonSchema, wireFieldJsonSchema, wirePageJsonSchema, wireSectionJsonSchema, wireShopProductJsonSchema, withDerivedSources, wordPattern, wordsOverPhotos, wordsOverPicture, writtenTexts };
|
|
10358
|
+
export type { AddBarItemResult, AiBuyCredits, AiEntitlementsView, AiMeter, AiModelEntry, AiRefusal, AiTokenCounts, AiTokenPrice, AreaLuminance, ArtDirection, AuditPage, AuditPlaceholder, BarItemsEditResult, BuildNotice, BuildStepError, BuildStepFacts, BuildStepRecord, CalmReading, CheckLayoutContext, CmsDataSourcePlan, ComposeContext, ComposeIssue, ComposeLayoutOptions, ComposedDataSource, ComposedItem, ComposedLayout, ComposedNavHeader, ComposedPage, ComposedPlaceholder, ComposedProduct, ComposedRoute, ComposedSection, ComposedShop, ComposedSite, ContentFieldPlan, ContentRoles, ContentSeedPlan, ContentTypePlan, CreateNodeOptions, CreatedRecord, DataSourcePlan, DriftBox, DriftLayer, DriftMeeting, DynamicKeysAsList, EntranceAction, EntranceActionOptions, EntranceInteraction, EntranceMark, EntranceSpec, EntranceStamp, FactKey, FilmPlacement, FilmTarget, FingerprintedPage, FrameRegion, JsonSchema, LayoutBandMove, LayoutColours, LayoutEdit, LayoutFingerprint, LayoutForm, LayoutGallery, LayoutGalleryList, LayoutGap, LayoutGivenAway, LayoutIssue, LayoutLayer, LayoutListBinding, LayoutListMix, LayoutListShape, LayoutLook, LayoutMend, LayoutPage, LayoutPhotoAddress, LayoutReadyMade, LayoutRect, LayoutSection, LayoutSite, LayoutTrack, LayoutVoid, LayoutWire, LayoutWireLayer, LayoutWireList, LayoutWireOptions, LayoutWireSection, LayoutWireSlot, LayoutWireTrack, MeasuredLayer, MeasuredLayout, NavHeaderInput, NavHeaderOptions, NavPage, NavShapeOptions, NavShapeResult, NodeBaseline, OwnPhoto, OwnPhotoPlacement, PageArchetype, PageArchetypeId, PageArchetypeSlot, PageData, PageDataLine, PagePlan, PageSectionPlan, PageSeoPlan, PathIssue, PatternManifestEntry, PatternManifestOptions, PatternNode, PatternPath, PatternRoleNeed, PatternTrack, PhotoInventory, PhotoWordsArea, PicturePlan, PicturePlanOptions, PicturePromptContext, PictureReview, PictureSlot, PictureTryBudget, PictureWorldSpec, PicturesEstimate, PixelReading, PlacedFilm, PlainObject, PlanChange, PlanDirection, PlanEdit, PlanEditIssue, PlanEditResult, PlanEditsAnswer, PlanEntrancesInput, PlanFilm, PlanWireContext, PlanWireParts, PlanWordContext, PlanWordIssue, PreflightRefusal, PublishRefusal, RecipeListBinds, RelativeDataSourcePlan, ScrimChoice, SectionEntrances, SectionFallback, SectionInput, SectionJudge, SectionOptions, SectionSwap, SerializedBinding, SerializedNode, SerializedResponsive, ShapeEntry, ShapeIssueCodes, ShopDataSourcePlan, ShopOptionPlan, ShopPlan, ShopProductPlan, ShowcaseInput, SiteAudit, SiteAuditOptions, SiteAuditSnapshot, SiteBuildRun, SiteBusiness, SiteCheck, SiteFinding, SiteNeedId, SitePageRef, SitePattern, SitePlan, SitePlanContext, SitePlanIssue, SitePlanSource, SitePlanValidation, SiteTemplate, StockCredit, StockItemSlot, StockLink, StockNeed, StockPhoto, StockPhotoTraits, StockPlacement, StockPlanOptions, StockProviderTerms, StockReview, StockSlot, StockTarget, StrictSchemaComplexity, StrictSchemaRefusal, TemplatePlanInput, UndoKept, UndoPreview, UndoRecord, WireOptions, WordsArea, WrittenText };
|
package/package.json
CHANGED
|
@@ -19,7 +19,11 @@ import {
|
|
|
19
19
|
* └─ Container `box` role card.content (locked)
|
|
20
20
|
* ├─ Text `eyebrow` role card.eyebrow (optional)
|
|
21
21
|
* ├─ Heading h3 `h3` role card.title (locked — the card's link when linked)
|
|
22
|
+
* ├─ Image `card-logo` role card.logo (optional, off at start — LI1)
|
|
23
|
+
* ├─ Icon `icon` role card.icon (optional, off at start — LI1)
|
|
22
24
|
* ├─ Text `body` role card.text (optional)
|
|
25
|
+
* ├─ Text `lead` role card.quote (optional, off at start — LI1: in the language's own marks)
|
|
26
|
+
* ├─ Text `small` role card.person (optional, off at start — LI1: who said or made it)
|
|
23
27
|
* └─ Container `box` role card.actions (optional) › ButtonBlock primary + ghost
|
|
24
28
|
*
|
|
25
29
|
* One recipe for every consumer: the builder's palette (its `createConfig`), generation-core's composer
|
|
@@ -35,6 +39,10 @@ export enum CardRole {
|
|
|
35
39
|
Title = 'card.title',
|
|
36
40
|
Text = 'card.text',
|
|
37
41
|
Actions = 'card.actions',
|
|
42
|
+
Logo = 'card.logo',
|
|
43
|
+
Icon = 'card.icon',
|
|
44
|
+
Quote = 'card.quote',
|
|
45
|
+
Person = 'card.person',
|
|
38
46
|
}
|
|
39
47
|
|
|
40
48
|
/** The optional parts — Card ▸ Parts, one switch each, in the board's order. Title and Content are locked. */
|
|
@@ -44,9 +52,19 @@ export enum CardPart {
|
|
|
44
52
|
Eyebrow = 'eyebrow',
|
|
45
53
|
Text = 'text',
|
|
46
54
|
Actions = 'actions',
|
|
55
|
+
/** List ingredients LI1: a list item's mark (a client's or maker's logo), its symbol, someone's words and who said them. */
|
|
56
|
+
Logo = 'logo',
|
|
57
|
+
Icon = 'icon',
|
|
58
|
+
Quote = 'quote',
|
|
59
|
+
Person = 'person',
|
|
47
60
|
}
|
|
48
61
|
|
|
49
|
-
export const CARD_PARTS: ReadonlyArray<CardPart> = [
|
|
62
|
+
export const CARD_PARTS: ReadonlyArray<CardPart> = [
|
|
63
|
+
CardPart.Media, CardPart.Badge, CardPart.Logo, CardPart.Icon, CardPart.Eyebrow, CardPart.Text, CardPart.Quote, CardPart.Person, CardPart.Actions,
|
|
64
|
+
];
|
|
65
|
+
|
|
66
|
+
/** The parts a fresh card starts WITHOUT unless asked (LI1): the palette's card is the one it always was. */
|
|
67
|
+
export const CARD_PARTS_OFF_AT_START: ReadonlySet<CardPart> = new Set([CardPart.Logo, CardPart.Icon, CardPart.Quote, CardPart.Person]);
|
|
50
68
|
|
|
51
69
|
export const CARD_PART_ROLE: Readonly<Record<CardPart, CardRole>> = {
|
|
52
70
|
[CardPart.Media]: CardRole.Media,
|
|
@@ -54,6 +72,10 @@ export const CARD_PART_ROLE: Readonly<Record<CardPart, CardRole>> = {
|
|
|
54
72
|
[CardPart.Eyebrow]: CardRole.Eyebrow,
|
|
55
73
|
[CardPart.Text]: CardRole.Text,
|
|
56
74
|
[CardPart.Actions]: CardRole.Actions,
|
|
75
|
+
[CardPart.Logo]: CardRole.Logo,
|
|
76
|
+
[CardPart.Icon]: CardRole.Icon,
|
|
77
|
+
[CardPart.Quote]: CardRole.Quote,
|
|
78
|
+
[CardPart.Person]: CardRole.Person,
|
|
57
79
|
};
|
|
58
80
|
|
|
59
81
|
/** Card ▸ Layout — a preset, never a stored trait: `applyCardLayout` writes the card's layout styles. */
|
|
@@ -77,6 +99,8 @@ export interface CardWords {
|
|
|
77
99
|
primary: string;
|
|
78
100
|
secondary: string;
|
|
79
101
|
badge: string;
|
|
102
|
+
quote: string;
|
|
103
|
+
person: string;
|
|
80
104
|
}
|
|
81
105
|
|
|
82
106
|
export const CARD_WORDS: Readonly<CardWords> = {
|
|
@@ -86,6 +110,8 @@ export const CARD_WORDS: Readonly<CardWords> = {
|
|
|
86
110
|
primary: 'Learn more',
|
|
87
111
|
secondary: 'Save',
|
|
88
112
|
badge: 'New',
|
|
113
|
+
quote: 'Their words, as they said them.',
|
|
114
|
+
person: 'Their name',
|
|
89
115
|
};
|
|
90
116
|
|
|
91
117
|
/** The breakpoint whose layer stacks an "Image side" card (Breakpoint.Mobile, ≤767px). */
|
|
@@ -112,6 +138,9 @@ enum Style {
|
|
|
112
138
|
Ghost = 'button-ghost',
|
|
113
139
|
Icon = 'icon',
|
|
114
140
|
Scrim = 'media-scrim',
|
|
141
|
+
Logo = 'card-logo',
|
|
142
|
+
Quote = 'lead',
|
|
143
|
+
Person = 'small',
|
|
115
144
|
}
|
|
116
145
|
|
|
117
146
|
enum Scheme {
|
|
@@ -121,6 +150,8 @@ enum Scheme {
|
|
|
121
150
|
|
|
122
151
|
const LINK_TYPE = 'linkType';
|
|
123
152
|
const SAVE_ICON = 'ph ph-bookmark-simple';
|
|
153
|
+
/** A fresh card's symbol (Card ▸ Icon): the author's, or a list's icon field's, to replace. */
|
|
154
|
+
const CARD_ICON = 'ph ph-sparkle';
|
|
124
155
|
|
|
125
156
|
/** A value an element style writes — read from the contract, never retyped. */
|
|
126
157
|
const styleValue = (style: string, trait: string): string => String(elementStyleById(style)?.base[trait] ?? '');
|
|
@@ -142,6 +173,11 @@ const CARD_BASE: Readonly<Record<string, Readonly<Record<string, string>>>> = {
|
|
|
142
173
|
[CardRole.Text]: { margin: ZERO_BOX, padding: ZERO_BOX, minHeight: 'auto' },
|
|
143
174
|
// Buttons pinned to the bottom (board 8 Q: equal heights + buttons pinned): the content column grows,
|
|
144
175
|
// and the row's auto top margin takes the slack.
|
|
176
|
+
// The mark's height is the look's (card-logo); its width follows its own shape, never wider than the column.
|
|
177
|
+
[CardRole.Logo]: { display: 'block', width: 'auto', maxWidth: '100%', borderRadius: '0px', margin: ZERO_BOX, minHeight: 'auto' },
|
|
178
|
+
[CardRole.Icon]: { display: 'block', fontSize: '24px', lineHeight: '1', margin: ZERO_BOX, width: 'auto' },
|
|
179
|
+
[CardRole.Quote]: { margin: ZERO_BOX, padding: ZERO_BOX, minHeight: 'auto' },
|
|
180
|
+
[CardRole.Person]: { margin: ZERO_BOX, padding: ZERO_BOX, minHeight: 'auto' },
|
|
145
181
|
[CardRole.Actions]: { display: 'flex', flexWrap: 'wrap', alignItems: 'center', gap: '8px', margin: 'auto 0px 0px 0px', padding: '6px 0px 0px 0px', width: '100%', minHeight: 'auto' },
|
|
146
182
|
};
|
|
147
183
|
const IMAGE_BASE: Readonly<Record<string, string>> = { display: 'block', width: '100%', maxWidth: '100%' };
|
|
@@ -267,6 +303,11 @@ const PART_BUILDERS: Readonly<Record<CardPart, (create: CompositeNodeFactory, wo
|
|
|
267
303
|
},
|
|
268
304
|
[CardPart.Eyebrow]: (create, words) => make(create, 'eyebrow', Type.Text, CardRole.Eyebrow, Style.Eyebrow, { content: words.eyebrow, tag: 'p' }, 'Eyebrow'),
|
|
269
305
|
[CardPart.Text]: (create, words) => make(create, 'text', Type.Text, CardRole.Text, Style.Body, { content: words.text, tag: 'p' }, 'Text'),
|
|
306
|
+
[CardPart.Logo]: (create) => make(create, 'logo', Type.Image, CardRole.Logo, Style.Logo, { src: '', alt: '' }, 'Logo'),
|
|
307
|
+
[CardPart.Icon]: (create) => make(create, 'icon', Type.Icon, CardRole.Icon, Style.Icon, { iconClass: CARD_ICON }, 'Icon'),
|
|
308
|
+
// The marks are the page language's own (`quotes`, iox-design.css), never typed into the words.
|
|
309
|
+
[CardPart.Quote]: (create, words) => make(create, 'quote', Type.Text, CardRole.Quote, Style.Quote, { content: words.quote, tag: 'p' }, 'Quote'),
|
|
310
|
+
[CardPart.Person]: (create, words) => make(create, 'person', Type.Text, CardRole.Person, Style.Person, { content: words.person, tag: 'p' }, 'Person'),
|
|
270
311
|
[CardPart.Actions]: (create, words) => {
|
|
271
312
|
const actions = make(create, 'actions', Type.Container, CardRole.Actions, Style.Box, {}, 'Buttons');
|
|
272
313
|
const primary = make(create, 'primary', Type.ButtonBlock, null, Style.Primary);
|
|
@@ -288,14 +329,14 @@ function buildTitle(create: CompositeNodeFactory, words: CardWords): CompositeNo
|
|
|
288
329
|
export function buildCardRecipe(create: CompositeNodeFactory, options: CardOptions = {}): CompositeNode {
|
|
289
330
|
const words: CardWords = { ...CARD_WORDS, ...(options.words ?? {}) };
|
|
290
331
|
const tone = options.badgeTone ?? BadgeTone.Accent;
|
|
291
|
-
const on = (part: CardPart) => options.parts?.[part]
|
|
332
|
+
const on = (part: CardPart) => options.parts?.[part] ?? !CARD_PARTS_OFF_AT_START.has(part);
|
|
292
333
|
const card = make(create, 'card', Type.Container, CardRole.Card, Style.Card, {}, 'Card');
|
|
293
334
|
const content = make(create, 'content', Type.Container, CardRole.Content, Style.Box, {}, 'Content');
|
|
335
|
+
const parts = (list: ReadonlyArray<CardPart>) => list.filter(on).map(part => PART_BUILDERS[part](create, words, tone));
|
|
294
336
|
content.children = [
|
|
295
|
-
...(
|
|
337
|
+
...parts([CardPart.Logo, CardPart.Icon, CardPart.Eyebrow]),
|
|
296
338
|
buildTitle(create, words),
|
|
297
|
-
...(
|
|
298
|
-
...(on(CardPart.Actions) ? [PART_BUILDERS[CardPart.Actions](create, words, tone)] : []),
|
|
339
|
+
...parts([CardPart.Text, CardPart.Quote, CardPart.Person, CardPart.Actions]),
|
|
299
340
|
];
|
|
300
341
|
card.children = [...(on(CardPart.Media) ? [PART_BUILDERS[CardPart.Media](create, words, tone)] : []), content];
|
|
301
342
|
if (on(CardPart.Badge)) placeBadge(card, PART_BUILDERS[CardPart.Badge](create, words, tone, options.badgeIcon), true);
|
|
@@ -491,8 +532,10 @@ export function setCardPart(card: CompositeNode, part: CardPart, on: boolean, cr
|
|
|
491
532
|
return node;
|
|
492
533
|
}
|
|
493
534
|
|
|
494
|
-
/** The content column's order: [badge], eyebrow, title, text, buttons. */
|
|
495
|
-
const CONTENT_ORDER: ReadonlyArray<string> = [
|
|
535
|
+
/** The content column's order: [badge], logo, icon, eyebrow, title, text, quote, person, buttons. */
|
|
536
|
+
const CONTENT_ORDER: ReadonlyArray<string> = [
|
|
537
|
+
CardRole.Badge, CardRole.Logo, CardRole.Icon, CardRole.Eyebrow, CardRole.Title, CardRole.Text, CardRole.Quote, CardRole.Person, CardRole.Actions,
|
|
538
|
+
];
|
|
496
539
|
|
|
497
540
|
function insertInContent(content: CompositeNode, part: CardPart, node: CompositeNode): void {
|
|
498
541
|
const rank = (n: CompositeNode) => { const i = CONTENT_ORDER.indexOf(n.role ?? ''); return i < 0 ? CONTENT_ORDER.length : i; };
|
|
@@ -32,6 +32,10 @@ export const COMPOSITE_ROLE_SPECS: Readonly<Record<string, CompositeRoleSpec>> =
|
|
|
32
32
|
[CardRole.Title]: { parent: CardRole.Content, locked: true },
|
|
33
33
|
[CardRole.Text]: { parent: CardRole.Content, part: CardPart.Text },
|
|
34
34
|
[CardRole.Actions]: { parent: CardRole.Content, part: CardPart.Actions },
|
|
35
|
+
[CardRole.Logo]: { parent: CardRole.Content, part: CardPart.Logo },
|
|
36
|
+
[CardRole.Icon]: { parent: CardRole.Content, part: CardPart.Icon },
|
|
37
|
+
[CardRole.Quote]: { parent: CardRole.Content, part: CardPart.Quote },
|
|
38
|
+
[CardRole.Person]: { parent: CardRole.Content, part: CardPart.Person },
|
|
35
39
|
// CC2 — an item always keeps its header and its panel; the icon is Behaviour ▸ Icon's.
|
|
36
40
|
[AccordionRole.Accordion]: { parent: null },
|
|
37
41
|
[AccordionRole.Item]: { parent: AccordionRole.Accordion },
|