@vectoriox/iox-ui 5.88.0 → 5.89.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/fesm2022/vectoriox-iox-ui-composite-core.mjs +3 -2
- package/fesm2022/vectoriox-iox-ui-composite-core.mjs.map +1 -1
- package/fesm2022/vectoriox-iox-ui-generation-core.mjs +1077 -50
- package/fesm2022/vectoriox-iox-ui-generation-core.mjs.map +1 -1
- package/fesm2022/vectoriox-iox-ui-scene-core.mjs +14 -1
- package/fesm2022/vectoriox-iox-ui-scene-core.mjs.map +1 -1
- package/fesm2022/vectoriox-iox-ui.mjs +4 -3
- package/fesm2022/vectoriox-iox-ui.mjs.map +1 -1
- package/generation-core/index.d.ts +375 -2
- package/package.json +1 -1
- package/scene-core/index.d.ts +10 -1
- package/src/composite-core/slider.ts +3 -2
- package/src/generation-core/compose-layout.ts +821 -0
- package/src/generation-core/compose-site.ts +14 -2
- package/src/generation-core/layout-language.ts +354 -0
- package/src/generation-core/public-api.ts +2 -0
- package/src/scene-core/scroll-range.ts +14 -1
- package/styles/iox-design.css +17 -0
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { NEW_NODE_STYLE_DEFAULTS, defaultElementStyleFor, elementStyleById, ownedTraitsOf, applyElementStyle, parseHexColor, rgbToOklab, flavorPackById, SPEC_AXES, EntranceParam, staggerDelay, LinkType, COLOR_SCHEMES, setColorScheme, resolveDesignChoices, ANIMATE_IDS, auditDesignContrast, parseCssColour, compositeOver, wcagContrastRatio, relativeLuminance } from '@vectoriox/iox-ui/design-core';
|
|
2
|
-
import { formPresetById, FORM_ACTIONS_ROLE, channelOpensNewTab, FORM_CHANNEL_ROLE, planFormPresetIds, ControlType, FORM_NODE_TYPE, collectFormSpec, FIELD_NODE_TYPE, isChannelFilled } from '@vectoriox/iox-ui/forms-core';
|
|
2
|
+
import { formPresetById, FORM_ACTIONS_ROLE, channelOpensNewTab, FORM_CHANNEL_ROLE, planFormPresetIds, ControlType, FORM_NODE_TYPE, collectFormSpec, FIELD_NODE_TYPE, isChannelFilled, FormPresetId, FormAfterSend, FORM_AFTER_SEND_TRAIT } from '@vectoriox/iox-ui/forms-core';
|
|
3
3
|
import { normalizeFrameSequence, filmScreensFor, FILM_PREPARED_PICTURES, FrameExtension } from '@vectoriox/iox-ui/media-core';
|
|
4
4
|
import { SEO_DESCRIPTION_MAX, SEO_TITLE_MAX } from '@vectoriox/iox-ui/seo-core';
|
|
5
|
-
import { pickTabsAutoBinds, pickAccordionAutoBinds, segmentedOptions, ITEM_OPEN_STATE, CardPart, CardRole, CardLayout, CARD_LAYOUTS, CARD_PARTS, BADGE_TONES, buildCardRecipe, findByRole, buildSegmentedRecipe, AccordionRole, buildAccordionRecipe, ACCORDION_WORDS, accordionItems, accordionQuestionOf, accordionAnswerOf, ACCORDION_BIND_PROP, ACCORDION_CONTENT_LIMIT, buildTabsRecipe, TABS_WORDS, tabsTriggers, tabLabelNodeOf, TABS_LABEL_BIND_PROP, tabsPanels, tabPanelTextOf, TABS_TEXT_BIND_PROP, tabPanelImageOf, tabsListOf, tabsPanelsOf, TABS_CONTENT_LIMIT, TABS_IMAGE_BIND_PROP, buildCarouselRecipe, SLIDE_TYPE, buildLightboxRecipe, LIGHTBOX_LABEL, SLIDE_TO_ROW, setHeaderBehaviour } from '@vectoriox/iox-ui/composite-core';
|
|
5
|
+
import { pickTabsAutoBinds, pickAccordionAutoBinds, segmentedOptions, ITEM_OPEN_STATE, CardPart, CardRole, CardLayout, CARD_LAYOUTS, CARD_PARTS, BADGE_TONES, buildCardRecipe, findByRole, buildSegmentedRecipe, AccordionRole, buildAccordionRecipe, ACCORDION_WORDS, accordionItems, accordionQuestionOf, accordionAnswerOf, ACCORDION_BIND_PROP, ACCORDION_CONTENT_LIMIT, buildTabsRecipe, TABS_WORDS, tabsTriggers, tabLabelNodeOf, TABS_LABEL_BIND_PROP, tabsPanels, tabPanelTextOf, TABS_TEXT_BIND_PROP, tabPanelImageOf, tabsListOf, tabsPanelsOf, TABS_CONTENT_LIMIT, TABS_IMAGE_BIND_PROP, buildCarouselRecipe, SLIDE_TYPE, buildLightboxRecipe, LIGHTBOX_LABEL, SLIDE_TO_ROW, setHeaderBehaviour, NO_ELEMENT_STYLE, SLIDER_PLACEMENT_TRAIT, SliderPlacement, syncSliderParts, SliderRole, buildMarqueeRecipe, SceneRole } from '@vectoriox/iox-ui/composite-core';
|
|
6
6
|
import { ELEMENT_ACTION_DESCRIPTORS, resolveActionAvailability } from '@vectoriox/iox-ui/actions-core';
|
|
7
7
|
|
|
8
8
|
// GENERATED from iox-ai-guidance flavor-spec.v1.json — do not edit; re-run scripts/gen-flavor-spec.mjs
|
|
@@ -13035,7 +13035,7 @@ const DISPLAY = 'display';
|
|
|
13035
13035
|
const NONE$1 = 'none';
|
|
13036
13036
|
const CLICK = 'click';
|
|
13037
13037
|
const HOME_ROUTE = '/';
|
|
13038
|
-
const COMPOSED$
|
|
13038
|
+
const COMPOSED$2 = { releaseLayoutDefaults: true };
|
|
13039
13039
|
/** The words the parts carry — site copy, editable like any other (the composer writes English copy). */
|
|
13040
13040
|
const NAV_SHAPE_COPY = {
|
|
13041
13041
|
menu: 'Menu',
|
|
@@ -13195,7 +13195,7 @@ function asToggle(node) {
|
|
|
13195
13195
|
return node;
|
|
13196
13196
|
}
|
|
13197
13197
|
function part(kit, suffix, type, props, style, role, lay = {}) {
|
|
13198
|
-
const node = createSerializedNode(kit.id(suffix), type, props, style, COMPOSED$
|
|
13198
|
+
const node = createSerializedNode(kit.id(suffix), type, props, style, COMPOSED$2);
|
|
13199
13199
|
if (role)
|
|
13200
13200
|
node.role = role;
|
|
13201
13201
|
const label = role ? NAV_PART_LABELS[role] : undefined;
|
|
@@ -13664,7 +13664,7 @@ const MAILTO = 'mailto:';
|
|
|
13664
13664
|
/** A pattern's `alt: ''` — the image is decorative and its alt is written empty. */
|
|
13665
13665
|
const DECORATIVE_ALT = '';
|
|
13666
13666
|
/** What the composer writes for every node: the pattern owns the box (W1.1, Q1). */
|
|
13667
|
-
const COMPOSED = { releaseLayoutDefaults: true };
|
|
13667
|
+
const COMPOSED$1 = { releaseLayoutDefaults: true };
|
|
13668
13668
|
/** The words a pattern may leave for compose time: the year (`ComposeContext`) and the business name. */
|
|
13669
13669
|
const TEXT_VARIABLE = /\{(year|business\.name)\}/g;
|
|
13670
13670
|
/** What `page.*` may read on a node stamped for a navigation page. */
|
|
@@ -13679,7 +13679,7 @@ function stableHash(text) {
|
|
|
13679
13679
|
}
|
|
13680
13680
|
return h.toString(36).padStart(7, '0').slice(-6);
|
|
13681
13681
|
}
|
|
13682
|
-
const create = (id, type, props = {}, elementStyle) => createSerializedNode(id, type, props, elementStyle, COMPOSED);
|
|
13682
|
+
const create$1 = (id, type, props = {}, elementStyle) => createSerializedNode(id, type, props, elementStyle, COMPOSED$1);
|
|
13683
13683
|
function nonEmpty$1(v) {
|
|
13684
13684
|
return typeof v === 'string' && v.trim() !== '';
|
|
13685
13685
|
}
|
|
@@ -13799,7 +13799,7 @@ function assertTraits(type, names) {
|
|
|
13799
13799
|
if (!declared.includes(name))
|
|
13800
13800
|
throw new ComposeError(`${type} has no trait "${name}"`);
|
|
13801
13801
|
}
|
|
13802
|
-
function setProp(node, name, value) {
|
|
13802
|
+
function setProp$1(node, name, value) {
|
|
13803
13803
|
assertTraits(node.type, [name]);
|
|
13804
13804
|
node.props[name] = value;
|
|
13805
13805
|
}
|
|
@@ -13813,16 +13813,16 @@ function linkSlots(node) {
|
|
|
13813
13813
|
function writePageLink(node, route) {
|
|
13814
13814
|
const slots = linkSlots(node);
|
|
13815
13815
|
for (const [k, v] of Object.entries(slots.fixed ?? {}))
|
|
13816
|
-
setProp(node, k, v);
|
|
13817
|
-
setProp(node, 'linkType', LinkType.Page);
|
|
13818
|
-
setProp(node, 'pageRoute', route);
|
|
13816
|
+
setProp$1(node, k, v);
|
|
13817
|
+
setProp$1(node, 'linkType', LinkType.Page);
|
|
13818
|
+
setProp$1(node, 'pageRoute', route);
|
|
13819
13819
|
}
|
|
13820
13820
|
function writeExternalLink(node, url) {
|
|
13821
13821
|
const slots = linkSlots(node);
|
|
13822
13822
|
for (const [k, v] of Object.entries(slots.fixed ?? {}))
|
|
13823
|
-
setProp(node, k, v);
|
|
13824
|
-
setProp(node, 'linkType', LinkType.External);
|
|
13825
|
-
setProp(node, slots.url, url);
|
|
13823
|
+
setProp$1(node, k, v);
|
|
13824
|
+
setProp$1(node, 'linkType', LinkType.External);
|
|
13825
|
+
setProp$1(node, slots.url, url);
|
|
13826
13826
|
}
|
|
13827
13827
|
/** What happens to a node linking to a route the plan has no page for (W1.1, Q11) — the same rule for
|
|
13828
13828
|
* every pattern and every page: an email to the business when one is given; else a link or button is
|
|
@@ -13872,13 +13872,13 @@ function presetChildren(preset, id) {
|
|
|
13872
13872
|
const fields = preset.fields.map((f, i) => {
|
|
13873
13873
|
const props = Object.fromEntries(PRESET_FIELD_PROPS.filter(k => f[k] !== undefined).map(k => [k, f[k]]));
|
|
13874
13874
|
assertTraits(FIELD, Object.keys(props));
|
|
13875
|
-
return create(`${id}-${i}`, FIELD, props);
|
|
13875
|
+
return create$1(`${id}-${i}`, FIELD, props);
|
|
13876
13876
|
});
|
|
13877
13877
|
const n = fields.length;
|
|
13878
|
-
const submit = create(`${id}-${n}`, SUBMIT_BUTTON, { label: preset.submitLabel });
|
|
13878
|
+
const submit = create$1(`${id}-${n}`, SUBMIT_BUTTON, { label: preset.submitLabel });
|
|
13879
13879
|
const blocks = [[FORM_SUCCESS, preset.successText], [FORM_ERROR, preset.errorText]].map(([type, words], i) => {
|
|
13880
|
-
const block = create(`${id}-${n + 1 + i}`, type);
|
|
13881
|
-
block.children = [create(`${id}-${n + 1 + i}-0`, TEXT, { content: words })];
|
|
13880
|
+
const block = create$1(`${id}-${n + 1 + i}`, type);
|
|
13881
|
+
block.children = [create$1(`${id}-${n + 1 + i}-0`, TEXT, { content: words })];
|
|
13882
13882
|
return block;
|
|
13883
13883
|
});
|
|
13884
13884
|
return [...fields, preset.channel ? actionsRow(submit, preset.channel, `${id}-${n}`) : submit, ...blocks];
|
|
@@ -13889,12 +13889,12 @@ function presetChildren(preset, id) {
|
|
|
13889
13889
|
* blocks publishing until it is filled (`auditSite`, empty-channel). Never a number written for it.
|
|
13890
13890
|
*/
|
|
13891
13891
|
function actionsRow(submit, channel, id) {
|
|
13892
|
-
const row = create(`${id}-row`, FIELD_GROUP);
|
|
13892
|
+
const row = create$1(`${id}-row`, FIELD_GROUP);
|
|
13893
13893
|
row.role = FORM_ACTIONS_ROLE;
|
|
13894
13894
|
Object.assign(row.styleProps, { flexWrap: 'wrap', alignItems: 'center', gap: '12px' });
|
|
13895
|
-
const button = create(`${id}-channel`, BUTTON_BLOCK, { tag: 'a', linkType: LinkType.External, href: '', target: channelOpensNewTab(channel.kind) ? '_blank' : '_self' }, CHANNEL_STYLE);
|
|
13895
|
+
const button = create$1(`${id}-channel`, BUTTON_BLOCK, { tag: 'a', linkType: LinkType.External, href: '', target: channelOpensNewTab(channel.kind) ? '_blank' : '_self' }, CHANNEL_STYLE);
|
|
13896
13896
|
button.role = FORM_CHANNEL_ROLE;
|
|
13897
|
-
button.children = [create(`${id}-channel-0`, TEXT, { content: channel.label }, BUTTON_LABEL_STYLE)];
|
|
13897
|
+
button.children = [create$1(`${id}-channel-0`, TEXT, { content: channel.label }, BUTTON_LABEL_STYLE)];
|
|
13898
13898
|
row.children = [submit, button];
|
|
13899
13899
|
return row;
|
|
13900
13900
|
}
|
|
@@ -13902,20 +13902,30 @@ function actionsRow(submit, channel, id) {
|
|
|
13902
13902
|
* blocks — never optional (forms plan D7). */
|
|
13903
13903
|
function composeForm(node, pn, id, ctx) {
|
|
13904
13904
|
if (!pn.preset) {
|
|
13905
|
-
node.children = [...(node.children ?? []), ...FORM_STATE_BLOCKS.map((type, i) => create(`${id}-${(pn.c?.length ?? 0) + i}`, type))];
|
|
13905
|
+
node.children = [...(node.children ?? []), ...FORM_STATE_BLOCKS.map((type, i) => create$1(`${id}-${(pn.c?.length ?? 0) + i}`, type))];
|
|
13906
13906
|
return;
|
|
13907
13907
|
}
|
|
13908
13908
|
// A section may give the pattern's form another preset (`form`: Practice's contact page asks to book).
|
|
13909
13909
|
const presetId = ctx.section?.form ?? pn.preset;
|
|
13910
|
+
if (pn.c?.length)
|
|
13911
|
+
throw new ComposeError(`${id}: a preset Form takes its fields from the preset, not the pattern`);
|
|
13912
|
+
stampPresetForm(node, presetId, id, ctx.owner);
|
|
13913
|
+
}
|
|
13914
|
+
/** A preset's name, stable form id and children on a Form node — the ONE stamping `composeSite` and `composeLayout` share. */
|
|
13915
|
+
function stampPresetForm(node, presetId, id, owner) {
|
|
13910
13916
|
const preset = formPresetById(presetId);
|
|
13911
13917
|
if (!preset)
|
|
13912
13918
|
throw new ComposeError(`${id}: no form preset "${presetId}" in forms-core`);
|
|
13913
|
-
|
|
13914
|
-
|
|
13915
|
-
setProp(node, 'name', preset.formName);
|
|
13916
|
-
setProp(node, 'formId', `${preset.id}-${stableHash(`${ctx.owner}/${id}`)}`);
|
|
13919
|
+
setProp$1(node, 'name', preset.formName);
|
|
13920
|
+
setProp$1(node, 'formId', `${preset.id}-${stableHash(`${owner}/${id}`)}`);
|
|
13917
13921
|
node.children = presetChildren(preset, id);
|
|
13918
13922
|
}
|
|
13923
|
+
/** A NEW Form stamped from a forms-core preset, exactly as a pattern's preset form is (premium M8: a layout's form layer). */
|
|
13924
|
+
function composePresetForm(id, presetId, owner) {
|
|
13925
|
+
const node = create$1(id, FORM);
|
|
13926
|
+
stampPresetForm(node, presetId, id, owner);
|
|
13927
|
+
return node;
|
|
13928
|
+
}
|
|
13919
13929
|
/** A pattern node's children; an `each` child is stamped once per navigation page, its id carrying the
|
|
13920
13930
|
* page key so it survives a page being left out or reordered. */
|
|
13921
13931
|
function composeChildren(pn, id, repeater, ctx) {
|
|
@@ -13986,7 +13996,7 @@ function composeNode(given, id, repeater, ctx) {
|
|
|
13986
13996
|
props['required'] = pn.required;
|
|
13987
13997
|
assertTraits(type, Object.keys(props));
|
|
13988
13998
|
// Props first: a Heading with no `es` wears its LEVEL's default style.
|
|
13989
|
-
const node = create(id, type, props, pn.es ?? null);
|
|
13999
|
+
const node = create$1(id, type, props, pn.es ?? null);
|
|
13990
14000
|
if (pn.role)
|
|
13991
14001
|
node.role = pn.role;
|
|
13992
14002
|
if (pn.tracks?.length)
|
|
@@ -14004,21 +14014,21 @@ function composeNode(given, id, repeater, ctx) {
|
|
|
14004
14014
|
}
|
|
14005
14015
|
if (words.value !== undefined) {
|
|
14006
14016
|
if (type === BUTTON_BLOCK) {
|
|
14007
|
-
node.children = [create(`${id}-label`, TEXT, { content: words.value, tag: LABEL_TAG }, BUTTON_LABEL_STYLE)];
|
|
14017
|
+
node.children = [create$1(`${id}-label`, TEXT, { content: words.value, tag: LABEL_TAG }, BUTTON_LABEL_STYLE)];
|
|
14008
14018
|
}
|
|
14009
14019
|
else {
|
|
14010
14020
|
const prop = TEXT_PROP[type];
|
|
14011
14021
|
if (!prop)
|
|
14012
14022
|
throw new ComposeError(`${id}: ${type} cannot hold text`);
|
|
14013
|
-
setProp(node, prop, words.value);
|
|
14023
|
+
setProp$1(node, prop, words.value);
|
|
14014
14024
|
}
|
|
14015
14025
|
}
|
|
14016
14026
|
// CC3: a Video in background mode is an uploaded file's; its clip is the studio's own (a placeholder until then).
|
|
14017
14027
|
if (pn.video) {
|
|
14018
14028
|
if (type !== VIDEO)
|
|
14019
14029
|
throw new ComposeError(`${id}: "video" belongs on a Video`);
|
|
14020
|
-
setProp(node, VIDEO_SOURCE_PROP, 'file');
|
|
14021
|
-
setProp(node, 'mode', pn.video);
|
|
14030
|
+
setProp$1(node, VIDEO_SOURCE_PROP, 'file');
|
|
14031
|
+
setProp$1(node, 'mode', pn.video);
|
|
14022
14032
|
}
|
|
14023
14033
|
// SC6b: a film pattern's Video plays the owner's pictures (the build places the pattern only with a film).
|
|
14024
14034
|
if (pn.film) {
|
|
@@ -14027,18 +14037,18 @@ function composeNode(given, id, repeater, ctx) {
|
|
|
14027
14037
|
const film = filmOfPlan(ctx.plan);
|
|
14028
14038
|
if (!film)
|
|
14029
14039
|
throw new ComposeError(`${id}: a film's pattern on a plan with no film`);
|
|
14030
|
-
setProp(node, VIDEO_FRAMES_PROP, film.sequence);
|
|
14040
|
+
setProp$1(node, VIDEO_FRAMES_PROP, film.sequence);
|
|
14031
14041
|
}
|
|
14032
14042
|
if (pn.ph === PatternPlaceholder.Video) {
|
|
14033
|
-
setProp(node, 'src', '');
|
|
14043
|
+
setProp$1(node, 'src', '');
|
|
14034
14044
|
ctx.placeholders.push({ nodeId: id, owner: ctx.owner, kind: PlaceholderKind.Video, text: '' });
|
|
14035
14045
|
}
|
|
14036
14046
|
if (pn.name)
|
|
14037
|
-
setProp(node, 'ariaLabel', pn.name);
|
|
14047
|
+
setProp$1(node, 'ariaLabel', pn.name);
|
|
14038
14048
|
if (pn.icon) {
|
|
14039
14049
|
if (type !== ICON)
|
|
14040
14050
|
throw new ComposeError(`${id}: "icon" belongs on an Icon`);
|
|
14041
|
-
setProp(node, 'iconClass', pn.icon);
|
|
14051
|
+
setProp$1(node, 'iconClass', pn.icon);
|
|
14042
14052
|
}
|
|
14043
14053
|
if (pn.layer)
|
|
14044
14054
|
node.label = pn.layer;
|
|
@@ -14049,7 +14059,7 @@ function composeNode(given, id, repeater, ctx) {
|
|
|
14049
14059
|
}
|
|
14050
14060
|
// Images: an empty slot, or a bound one — both fall back to the DS3 empty image, never a stock URL.
|
|
14051
14061
|
if (pn.ph === PatternPlaceholder.Image) {
|
|
14052
|
-
setProp(node, 'src', '');
|
|
14062
|
+
setProp$1(node, 'src', '');
|
|
14053
14063
|
ctx.placeholders.push({ nodeId: id, owner: ctx.owner, kind: PlaceholderKind.Image, text: '' });
|
|
14054
14064
|
}
|
|
14055
14065
|
if (pn.aspect)
|
|
@@ -14081,14 +14091,14 @@ function composeNode(given, id, repeater, ctx) {
|
|
|
14081
14091
|
if (!prop)
|
|
14082
14092
|
throw new ComposeError(`${id}: ${type} has no bindable value`);
|
|
14083
14093
|
if (isPageScope(pn.bind))
|
|
14084
|
-
setProp(node, prop, stampedPageValue(pn.bind, ctx, id));
|
|
14094
|
+
setProp$1(node, prop, stampedPageValue(pn.bind, ctx, id));
|
|
14085
14095
|
else
|
|
14086
14096
|
addBinding(node, { prop, ...bound });
|
|
14087
14097
|
}
|
|
14088
14098
|
if (type === IMAGE && pn.bind && !isPageScope(pn.bind)) {
|
|
14089
|
-
setProp(node, 'src', '');
|
|
14099
|
+
setProp$1(node, 'src', '');
|
|
14090
14100
|
if (pn.alt === DECORATIVE_ALT)
|
|
14091
|
-
setProp(node, 'alt', DECORATIVE_ALT);
|
|
14101
|
+
setProp$1(node, 'alt', DECORATIVE_ALT);
|
|
14092
14102
|
else
|
|
14093
14103
|
addBinding(node, { prop: 'alt', ...altBinding(pn, repeater, ctx, id) });
|
|
14094
14104
|
}
|
|
@@ -14200,7 +14210,7 @@ function composeRecipe(pn, id, repeater, ctx) {
|
|
|
14200
14210
|
if (!CARD_PARTS.includes(part))
|
|
14201
14211
|
throw new ComposeError(`${id}: a card has no part "${part}"`);
|
|
14202
14212
|
}
|
|
14203
|
-
const factory = (spec) => create(spec.key === CardRole.Card ? id : `${id}-${spec.key}`, spec.type, { ...(spec.props ?? {}) }, spec.elementStyle ?? null);
|
|
14213
|
+
const factory = (spec) => create$1(spec.key === CardRole.Card ? id : `${id}-${spec.key}`, spec.type, { ...(spec.props ?? {}) }, spec.elementStyle ?? null);
|
|
14204
14214
|
const tone = pn.badge;
|
|
14205
14215
|
if (tone && !BADGE_TONES.includes(tone))
|
|
14206
14216
|
throw new ComposeError(`${id}: a badge has no tone "${pn.badge}"`);
|
|
@@ -14323,7 +14333,7 @@ function composeAccordion(pn, id, ctx) {
|
|
|
14323
14333
|
const factory = (spec) => {
|
|
14324
14334
|
const isRoot = spec.key === AccordionRole.Accordion;
|
|
14325
14335
|
const type = isRoot && binding ? REPEATER : spec.type;
|
|
14326
|
-
return create(isRoot ? id : `${id}-${spec.key}`, type, { ...(spec.props ?? {}) }, spec.elementStyle ?? null);
|
|
14336
|
+
return create$1(isRoot ? id : `${id}-${spec.key}`, type, { ...(spec.props ?? {}) }, spec.elementStyle ?? null);
|
|
14327
14337
|
};
|
|
14328
14338
|
const root = buildAccordionRecipe(factory, binding ? { items: ACCORDION_WORDS.slice(0, 1) } : {});
|
|
14329
14339
|
if (!binding) {
|
|
@@ -14341,7 +14351,7 @@ function composeAccordion(pn, id, ctx) {
|
|
|
14341
14351
|
if (gap)
|
|
14342
14352
|
throw new ComposeError(`${id}: "${binding}" has no ${gap}`);
|
|
14343
14353
|
addBinding(root, { prop: 'source', source: binding, path: '' });
|
|
14344
|
-
setProp(root, 'limit', ACCORDION_CONTENT_LIMIT);
|
|
14354
|
+
setProp$1(root, 'limit', ACCORDION_CONTENT_LIMIT);
|
|
14345
14355
|
const [template] = accordionItems(root);
|
|
14346
14356
|
delete template.itemKey;
|
|
14347
14357
|
addBinding(accordionQuestionOf(template), { prop: ACCORDION_BIND_PROP, source: binding, path: picks.question });
|
|
@@ -14364,7 +14374,7 @@ function composeTabs(pn, id, ctx) {
|
|
|
14364
14374
|
throw new ComposeError(`${id}: "$binding" with no section binding`);
|
|
14365
14375
|
const factory = (spec) => {
|
|
14366
14376
|
const type = binding && TABS_HOLDER_KEYS.has(spec.key) ? REPEATER : spec.type;
|
|
14367
|
-
return create(spec.key === TABS_ROOT_KEY ? id : `${id}-${spec.key}`, type, { ...(spec.props ?? {}) }, spec.elementStyle ?? null);
|
|
14377
|
+
return create$1(spec.key === TABS_ROOT_KEY ? id : `${id}-${spec.key}`, type, { ...(spec.props ?? {}) }, spec.elementStyle ?? null);
|
|
14368
14378
|
};
|
|
14369
14379
|
const root = buildTabsRecipe(factory, { tabs: binding ? TABS_WORDS.slice(0, 1) : undefined, label: pn.name });
|
|
14370
14380
|
const tree = root;
|
|
@@ -14391,7 +14401,7 @@ function composeTabs(pn, id, ctx) {
|
|
|
14391
14401
|
throw new ComposeError(`${id}: "${binding}" has no ${gap}`);
|
|
14392
14402
|
for (const holder of [tabsListOf(tree), tabsPanelsOf(tree)]) {
|
|
14393
14403
|
addBinding(holder, { prop: 'source', source: binding, path: '' });
|
|
14394
|
-
setProp(holder, 'limit', TABS_CONTENT_LIMIT);
|
|
14404
|
+
setProp$1(holder, 'limit', TABS_CONTENT_LIMIT);
|
|
14395
14405
|
}
|
|
14396
14406
|
const [tab] = tabsTriggers(tree);
|
|
14397
14407
|
const [panel] = tabsPanels(tree);
|
|
@@ -14408,7 +14418,7 @@ function composeTabs(pn, id, ctx) {
|
|
|
14408
14418
|
}
|
|
14409
14419
|
/** A recipe's node factory for this composer: ids derive from the recipe's keys (`<id>-<key>`, the root `<id>`). */
|
|
14410
14420
|
function recipeFactory(id, rootKey) {
|
|
14411
|
-
return spec => create(spec.key === rootKey ? id : `${id}-${spec.key}`, spec.type, { ...(spec.props ?? {}) }, spec.elementStyle ?? null);
|
|
14421
|
+
return spec => create$1(spec.key === rootKey ? id : `${id}-${spec.key}`, spec.type, { ...(spec.props ?? {}) }, spec.elementStyle ?? null);
|
|
14412
14422
|
}
|
|
14413
14423
|
/**
|
|
14414
14424
|
* CC3: the testimonial carousel — composite-core's recipe (the Slider with its control parts), stamped with this
|
|
@@ -14725,7 +14735,7 @@ const PRICING_PATTERN = 'pricing.tiers';
|
|
|
14725
14735
|
* its label, never a number) and the one dangling-link rule — except a button to a page the studio lacks keeps its
|
|
14726
14736
|
* words, unlinked, for the author to link. Pure.
|
|
14727
14737
|
*/
|
|
14728
|
-
function composeSection(patternId, input, options) {
|
|
14738
|
+
function composeSection$1(patternId, input, options) {
|
|
14729
14739
|
if (!nonEmpty$1(options?.id))
|
|
14730
14740
|
throw new ComposeError('composeSection needs the section id');
|
|
14731
14741
|
const pattern = patternById(patternId);
|
|
@@ -16549,7 +16559,7 @@ function writtenTexts(plan) {
|
|
|
16549
16559
|
});
|
|
16550
16560
|
return out;
|
|
16551
16561
|
}
|
|
16552
|
-
const HEBREW = /[-]/;
|
|
16562
|
+
const HEBREW$1 = /[-]/;
|
|
16553
16563
|
/** Hebrew joins up to two one-letter words (and, the, in, to, from, that, as) to the next: "והטוב" holds "טוב". The
|
|
16554
16564
|
* ONE rule — the intake's keyword match (harness-core) uses it too. */
|
|
16555
16565
|
const HEBREW_PREFIXES = '[והבלמשכ]{0,2}';
|
|
@@ -16558,7 +16568,7 @@ const normalise = (s) => s.normalize('NFKC').toLowerCase();
|
|
|
16558
16568
|
/** A word (or phrase) as a whole-word pattern; Hebrew allows its one-letter prefixes. */
|
|
16559
16569
|
function wordPattern(word) {
|
|
16560
16570
|
const w = escape(normalise(word.trim())).replace(/\s+/g, '\\s+');
|
|
16561
|
-
const prefix = HEBREW.test(word) ? HEBREW_PREFIXES : '';
|
|
16571
|
+
const prefix = HEBREW$1.test(word) ? HEBREW_PREFIXES : '';
|
|
16562
16572
|
return new RegExp(`(?<![\\p{L}\\p{N}])${prefix}${w}(?![\\p{L}\\p{N}])`, 'u');
|
|
16563
16573
|
}
|
|
16564
16574
|
/** What a fact looks like when a model writes one — each judged against the owner's facts. */
|
|
@@ -17497,7 +17507,7 @@ var WordsEdge;
|
|
|
17497
17507
|
const WORDS_AREA_DEFAULT_SHARE = 0.45;
|
|
17498
17508
|
const MEDIA_SCRIM_STYLE = 'media-scrim';
|
|
17499
17509
|
const ABSOLUTE = 'absolute';
|
|
17500
|
-
const ZERO = /^0(px|%)?$/;
|
|
17510
|
+
const ZERO$1 = /^0(px|%)?$/;
|
|
17501
17511
|
const PERCENT = /^(\d+(?:\.\d+)?)%$/;
|
|
17502
17512
|
/** The frames an image model is asked for (`image_config.aspect_ratio`), as width / height. */
|
|
17503
17513
|
const PICTURE_ASPECTS = {
|
|
@@ -17548,7 +17558,7 @@ function wordsOverPicture(node, parent) {
|
|
|
17548
17558
|
return null;
|
|
17549
17559
|
const top = String(scrim.styleProps['top'] ?? '');
|
|
17550
17560
|
const bottom = String(scrim.styleProps['bottom'] ?? '');
|
|
17551
|
-
const edge = ZERO.test(top) && !ZERO.test(bottom) ? WordsEdge.Top : WordsEdge.Bottom;
|
|
17561
|
+
const edge = ZERO$1.test(top) && !ZERO$1.test(bottom) ? WordsEdge.Top : WordsEdge.Bottom;
|
|
17552
17562
|
const height = PERCENT.exec(String(scrim.styleProps['height'] ?? ''));
|
|
17553
17563
|
const share = height ? Math.min(1, Number(height[1]) / 100) : WORDS_AREA_DEFAULT_SHARE;
|
|
17554
17564
|
return { area: { edge, share }, scrimNodeId: scrim.id };
|
|
@@ -17824,6 +17834,1023 @@ function luminanceOf(colour) {
|
|
|
17824
17834
|
return c ? relativeLuminance(c) : null;
|
|
17825
17835
|
}
|
|
17826
17836
|
|
|
17837
|
+
/**
|
|
17838
|
+
* The LAYOUT LANGUAGE (premium components M8 — the prototype's CL2 / CL2.1, premium-sites plan "Breaking limits"): a page
|
|
17839
|
+
* composed as layers of closed kinds placed on a 12-column grid, with closed sizes, the look's five colours, roles, time
|
|
17840
|
+
* entrances, a parallax depth, held sections whose layers move by tracks, sideways sections, galleries, forms and a phone
|
|
17841
|
+
* reading order. The model writes no CSS and no node tree; `composeLayout` stamps ordinary builder nodes from it.
|
|
17842
|
+
*
|
|
17843
|
+
* Gate 1 types the shape the three proof sites were saved in (iox-ai-guidance `prototypes/breaking-limits/round4|round3`).
|
|
17844
|
+
* The closed lists move into the contract in gate 2 (m8-proof-sites.md, M8-D1).
|
|
17845
|
+
*/
|
|
17846
|
+
var LayoutLayerKind;
|
|
17847
|
+
(function (LayoutLayerKind) {
|
|
17848
|
+
LayoutLayerKind["Word"] = "word";
|
|
17849
|
+
LayoutLayerKind["Heading"] = "heading";
|
|
17850
|
+
LayoutLayerKind["Text"] = "text";
|
|
17851
|
+
LayoutLayerKind["Photo"] = "photo";
|
|
17852
|
+
LayoutLayerKind["Gallery"] = "gallery";
|
|
17853
|
+
LayoutLayerKind["Button"] = "button";
|
|
17854
|
+
LayoutLayerKind["List"] = "list";
|
|
17855
|
+
LayoutLayerKind["Number"] = "number";
|
|
17856
|
+
LayoutLayerKind["Shape"] = "shape";
|
|
17857
|
+
LayoutLayerKind["Label"] = "label";
|
|
17858
|
+
LayoutLayerKind["Form"] = "form";
|
|
17859
|
+
LayoutLayerKind["Marquee"] = "marquee";
|
|
17860
|
+
})(LayoutLayerKind || (LayoutLayerKind = {}));
|
|
17861
|
+
var LayoutSize;
|
|
17862
|
+
(function (LayoutSize) {
|
|
17863
|
+
LayoutSize["Xs"] = "xs";
|
|
17864
|
+
LayoutSize["S"] = "s";
|
|
17865
|
+
LayoutSize["M"] = "m";
|
|
17866
|
+
LayoutSize["L"] = "l";
|
|
17867
|
+
LayoutSize["Xl"] = "xl";
|
|
17868
|
+
LayoutSize["Xxl"] = "xxl";
|
|
17869
|
+
/** As wide as its columns allow — a word, never a sentence. */
|
|
17870
|
+
LayoutSize["Screen"] = "screen";
|
|
17871
|
+
})(LayoutSize || (LayoutSize = {}));
|
|
17872
|
+
/** The look's five colours, by role. */
|
|
17873
|
+
var LayoutColour;
|
|
17874
|
+
(function (LayoutColour) {
|
|
17875
|
+
LayoutColour["Ground"] = "ground";
|
|
17876
|
+
LayoutColour["Ink"] = "ink";
|
|
17877
|
+
LayoutColour["Accent"] = "accent";
|
|
17878
|
+
LayoutColour["Soft"] = "soft";
|
|
17879
|
+
LayoutColour["Muted"] = "muted";
|
|
17880
|
+
})(LayoutColour || (LayoutColour = {}));
|
|
17881
|
+
var LayoutRole;
|
|
17882
|
+
(function (LayoutRole) {
|
|
17883
|
+
LayoutRole["Lead"] = "lead";
|
|
17884
|
+
LayoutRole["Support"] = "support";
|
|
17885
|
+
LayoutRole["Decoration"] = "decoration";
|
|
17886
|
+
LayoutRole["Static"] = "static";
|
|
17887
|
+
})(LayoutRole || (LayoutRole = {}));
|
|
17888
|
+
var LayoutEnter;
|
|
17889
|
+
(function (LayoutEnter) {
|
|
17890
|
+
LayoutEnter["None"] = "none";
|
|
17891
|
+
LayoutEnter["Fade"] = "fade";
|
|
17892
|
+
LayoutEnter["FadeRise"] = "fadeRise";
|
|
17893
|
+
LayoutEnter["ScaleIn"] = "scaleIn";
|
|
17894
|
+
LayoutEnter["ClipReveal"] = "clipReveal";
|
|
17895
|
+
LayoutEnter["MaskRise"] = "maskRise";
|
|
17896
|
+
LayoutEnter["BlurIn"] = "blurIn";
|
|
17897
|
+
LayoutEnter["Pop"] = "pop";
|
|
17898
|
+
})(LayoutEnter || (LayoutEnter = {}));
|
|
17899
|
+
var LayoutDepth;
|
|
17900
|
+
(function (LayoutDepth) {
|
|
17901
|
+
LayoutDepth["Back"] = "back";
|
|
17902
|
+
LayoutDepth["Mid"] = "mid";
|
|
17903
|
+
LayoutDepth["Front"] = "front";
|
|
17904
|
+
})(LayoutDepth || (LayoutDepth = {}));
|
|
17905
|
+
var LayoutTransition;
|
|
17906
|
+
(function (LayoutTransition) {
|
|
17907
|
+
LayoutTransition["Cut"] = "cut";
|
|
17908
|
+
LayoutTransition["Flood"] = "flood";
|
|
17909
|
+
LayoutTransition["WipeUp"] = "wipe-up";
|
|
17910
|
+
LayoutTransition["WipeDown"] = "wipe-down";
|
|
17911
|
+
LayoutTransition["WipeStart"] = "wipe-start";
|
|
17912
|
+
LayoutTransition["WipeEnd"] = "wipe-end";
|
|
17913
|
+
})(LayoutTransition || (LayoutTransition = {}));
|
|
17914
|
+
var LayoutEase;
|
|
17915
|
+
(function (LayoutEase) {
|
|
17916
|
+
LayoutEase["Out"] = "out";
|
|
17917
|
+
LayoutEase["InOut"] = "inOut";
|
|
17918
|
+
LayoutEase["Drawer"] = "drawer";
|
|
17919
|
+
LayoutEase["Linear"] = "linear";
|
|
17920
|
+
})(LayoutEase || (LayoutEase = {}));
|
|
17921
|
+
var LayoutPace;
|
|
17922
|
+
(function (LayoutPace) {
|
|
17923
|
+
LayoutPace["Slow"] = "slow";
|
|
17924
|
+
LayoutPace["Normal"] = "normal";
|
|
17925
|
+
LayoutPace["Quick"] = "quick";
|
|
17926
|
+
})(LayoutPace || (LayoutPace = {}));
|
|
17927
|
+
var LayoutSide;
|
|
17928
|
+
(function (LayoutSide) {
|
|
17929
|
+
LayoutSide["Bottom"] = "bottom";
|
|
17930
|
+
LayoutSide["Top"] = "top";
|
|
17931
|
+
LayoutSide["Start"] = "start";
|
|
17932
|
+
LayoutSide["End"] = "end";
|
|
17933
|
+
})(LayoutSide || (LayoutSide = {}));
|
|
17934
|
+
var LayoutTrackProp;
|
|
17935
|
+
(function (LayoutTrackProp) {
|
|
17936
|
+
LayoutTrackProp["X"] = "x";
|
|
17937
|
+
LayoutTrackProp["Y"] = "y";
|
|
17938
|
+
LayoutTrackProp["Scale"] = "scale";
|
|
17939
|
+
LayoutTrackProp["Opacity"] = "opacity";
|
|
17940
|
+
LayoutTrackProp["Rotate"] = "rotate";
|
|
17941
|
+
LayoutTrackProp["Clip"] = "clip";
|
|
17942
|
+
LayoutTrackProp["Blur"] = "blur";
|
|
17943
|
+
})(LayoutTrackProp || (LayoutTrackProp = {}));
|
|
17944
|
+
var LayoutAlign;
|
|
17945
|
+
(function (LayoutAlign) {
|
|
17946
|
+
LayoutAlign["Start"] = "start";
|
|
17947
|
+
LayoutAlign["Center"] = "center";
|
|
17948
|
+
LayoutAlign["End"] = "end";
|
|
17949
|
+
})(LayoutAlign || (LayoutAlign = {}));
|
|
17950
|
+
var LayoutBleed;
|
|
17951
|
+
(function (LayoutBleed) {
|
|
17952
|
+
LayoutBleed["None"] = "none";
|
|
17953
|
+
LayoutBleed["Start"] = "start";
|
|
17954
|
+
LayoutBleed["End"] = "end";
|
|
17955
|
+
LayoutBleed["Both"] = "both";
|
|
17956
|
+
})(LayoutBleed || (LayoutBleed = {}));
|
|
17957
|
+
/** A pool photo's shape (the inventory measures each one): what it keeps where nothing else gives it a height. */
|
|
17958
|
+
var LayoutPhotoShape;
|
|
17959
|
+
(function (LayoutPhotoShape) {
|
|
17960
|
+
LayoutPhotoShape["Wide"] = "wide";
|
|
17961
|
+
LayoutPhotoShape["Landscape"] = "landscape";
|
|
17962
|
+
LayoutPhotoShape["Square"] = "square";
|
|
17963
|
+
LayoutPhotoShape["Portrait"] = "portrait";
|
|
17964
|
+
LayoutPhotoShape["Tall"] = "tall";
|
|
17965
|
+
})(LayoutPhotoShape || (LayoutPhotoShape = {}));
|
|
17966
|
+
const LAYOUT_PHOTO_ASPECT = {
|
|
17967
|
+
[LayoutPhotoShape.Wide]: '16 / 9',
|
|
17968
|
+
[LayoutPhotoShape.Landscape]: '3 / 2',
|
|
17969
|
+
[LayoutPhotoShape.Square]: '1 / 1',
|
|
17970
|
+
[LayoutPhotoShape.Portrait]: '2 / 3',
|
|
17971
|
+
[LayoutPhotoShape.Tall]: '9 / 16',
|
|
17972
|
+
};
|
|
17973
|
+
var LayoutSectionKind;
|
|
17974
|
+
(function (LayoutSectionKind) {
|
|
17975
|
+
LayoutSectionKind["Content"] = "content";
|
|
17976
|
+
LayoutSectionKind["Inhale"] = "inhale";
|
|
17977
|
+
})(LayoutSectionKind || (LayoutSectionKind = {}));
|
|
17978
|
+
var LayoutButtonVariant;
|
|
17979
|
+
(function (LayoutButtonVariant) {
|
|
17980
|
+
LayoutButtonVariant["Primary"] = "primary";
|
|
17981
|
+
LayoutButtonVariant["Secondary"] = "secondary";
|
|
17982
|
+
LayoutButtonVariant["Ghost"] = "ghost";
|
|
17983
|
+
})(LayoutButtonVariant || (LayoutButtonVariant = {}));
|
|
17984
|
+
/** The product SliderContainer's own effects (iox-ui `slider-options.ts`). */
|
|
17985
|
+
var LayoutGalleryEffect;
|
|
17986
|
+
(function (LayoutGalleryEffect) {
|
|
17987
|
+
LayoutGalleryEffect["Slide"] = "slide";
|
|
17988
|
+
LayoutGalleryEffect["Fade"] = "fade";
|
|
17989
|
+
LayoutGalleryEffect["Cube"] = "cube";
|
|
17990
|
+
LayoutGalleryEffect["Flip"] = "flip";
|
|
17991
|
+
LayoutGalleryEffect["Coverflow"] = "coverflow";
|
|
17992
|
+
LayoutGalleryEffect["Cards"] = "cards";
|
|
17993
|
+
LayoutGalleryEffect["Creative"] = "creative";
|
|
17994
|
+
})(LayoutGalleryEffect || (LayoutGalleryEffect = {}));
|
|
17995
|
+
var LayoutNavKind;
|
|
17996
|
+
(function (LayoutNavKind) {
|
|
17997
|
+
LayoutNavKind["Bar"] = "bar";
|
|
17998
|
+
LayoutNavKind["Corner"] = "corner";
|
|
17999
|
+
LayoutNavKind["Index"] = "index";
|
|
18000
|
+
LayoutNavKind["Side"] = "side";
|
|
18001
|
+
})(LayoutNavKind || (LayoutNavKind = {}));
|
|
18002
|
+
// ── The tables the composer reads (the prototype renderer v4's values, `code/renderer-round4.src.html`) ──────────────
|
|
18003
|
+
/** A size as CSS — the prototype's `.s-*` rules. `screen` is computed per word (`screenFontSize`). */
|
|
18004
|
+
const LAYOUT_FONT_SIZE = {
|
|
18005
|
+
[LayoutSize.Xs]: '12px',
|
|
18006
|
+
[LayoutSize.S]: '15px',
|
|
18007
|
+
[LayoutSize.M]: '19px',
|
|
18008
|
+
[LayoutSize.L]: 'clamp(26px, 2.8vw, 44px)',
|
|
18009
|
+
[LayoutSize.Xl]: 'clamp(38px, 5vw, 82px)',
|
|
18010
|
+
[LayoutSize.Xxl]: 'clamp(54px, 8.5vw, 150px)',
|
|
18011
|
+
};
|
|
18012
|
+
/** A colour name as the look's token (what the prototype probed off the preset: `--iox-bg` … `--iox-text-muted`). */
|
|
18013
|
+
const LAYOUT_COLOUR_TOKEN = {
|
|
18014
|
+
[LayoutColour.Ground]: 'var(--iox-bg)',
|
|
18015
|
+
[LayoutColour.Ink]: 'var(--iox-text)',
|
|
18016
|
+
[LayoutColour.Accent]: 'var(--iox-accent)',
|
|
18017
|
+
[LayoutColour.Soft]: 'var(--iox-surface-2)',
|
|
18018
|
+
[LayoutColour.Muted]: 'var(--iox-text-muted)',
|
|
18019
|
+
};
|
|
18020
|
+
/** Words in the accent colour read the accent's text shade (round four: `accent-text`). */
|
|
18021
|
+
const LAYOUT_ACCENT_TEXT = 'var(--iox-accent-text)';
|
|
18022
|
+
/** Emil's easing tokens (never ease-in). */
|
|
18023
|
+
const LAYOUT_EASING = {
|
|
18024
|
+
[LayoutEase.Out]: 'cubic-bezier(0.23, 1, 0.32, 1)',
|
|
18025
|
+
[LayoutEase.InOut]: 'cubic-bezier(0.77, 0, 0.175, 1)',
|
|
18026
|
+
[LayoutEase.Drawer]: 'cubic-bezier(0.32, 0.72, 0, 1)',
|
|
18027
|
+
[LayoutEase.Linear]: 'linear',
|
|
18028
|
+
};
|
|
18029
|
+
/** How long an entrance takes, by the look's pace and the layer's role, and how far apart the beats are. */
|
|
18030
|
+
const LAYOUT_PACE = {
|
|
18031
|
+
[LayoutPace.Slow]: { lead: 1100, support: 900, decoration: 900, gap: 1.3 },
|
|
18032
|
+
[LayoutPace.Normal]: { lead: 800, support: 650, decoration: 600, gap: 1 },
|
|
18033
|
+
[LayoutPace.Quick]: { lead: 560, support: 460, decoration: 420, gap: 0.7 },
|
|
18034
|
+
};
|
|
18035
|
+
/** A stagger that shrinks as the beats go on, capped at the sixth — never a metronome. */
|
|
18036
|
+
const LAYOUT_BEAT_DELAY = [0, 120, 210, 275, 320, 350];
|
|
18037
|
+
/** How far a rise travels, by role (px). */
|
|
18038
|
+
const LAYOUT_RISE = {
|
|
18039
|
+
[LayoutRole.Lead]: 44,
|
|
18040
|
+
[LayoutRole.Support]: 22,
|
|
18041
|
+
[LayoutRole.Decoration]: 0,
|
|
18042
|
+
[LayoutRole.Static]: 0,
|
|
18043
|
+
};
|
|
18044
|
+
/** The kinds a visitor OPERATES: never moved for style (Emil gate 4). */
|
|
18045
|
+
const LAYOUT_OPERATED = new Set([LayoutLayerKind.Gallery, LayoutLayerKind.Button, LayoutLayerKind.Form, LayoutLayerKind.Marquee]);
|
|
18046
|
+
const LAYOUT_TEXT_KINDS = new Set([
|
|
18047
|
+
LayoutLayerKind.Word, LayoutLayerKind.Heading, LayoutLayerKind.Text, LayoutLayerKind.Label, LayoutLayerKind.Number, LayoutLayerKind.List,
|
|
18048
|
+
]);
|
|
18049
|
+
/** The grid's gutter and column gap (the prototype's `--gutter` and `.grid`). */
|
|
18050
|
+
const LAYOUT_GUTTER = 'max(4vw, 16px)';
|
|
18051
|
+
const LAYOUT_COLUMN_GAP = '1.2vw';
|
|
18052
|
+
/** A depth's `params.phone`: scene-core `ParallaxPhone.Rest` — stacked on a phone, a layer never glides into its neighbour.
|
|
18053
|
+
* Stamped verbatim and read where it plays (not imported, as `PatternTrack`); compose-layout.spec holds the two equal. */
|
|
18054
|
+
const LAYOUT_DEPTH_ON_PHONE = 'rest';
|
|
18055
|
+
/** A control's tooltip words: the main entry's `A11yTrait.Tooltip` (premium M5), held equal by compose-layout.spec. */
|
|
18056
|
+
const LAYOUT_TOOLTIP_TRAIT = 'tooltip';
|
|
18057
|
+
/** The phone: at or under this breakpoint a section stacks in its `phone` order (the `mobile` breakpoint, ≤ 767px). */
|
|
18058
|
+
const LAYOUT_PHONE_BREAKPOINT = 'mobile';
|
|
18059
|
+
/** A phone section's padding above and below (M1.3: 56). */
|
|
18060
|
+
const LAYOUT_PHONE_PADDING = '56px';
|
|
18061
|
+
/** The kind of layer, for the phone's rhythm: the space between two stacked layers says how they belong (M1.3). */
|
|
18062
|
+
function phoneGapBefore(prev, next) {
|
|
18063
|
+
if (!prev)
|
|
18064
|
+
return 0;
|
|
18065
|
+
const k = (l) => l.kind;
|
|
18066
|
+
if (k(prev) === LayoutLayerKind.Photo || k(prev) === LayoutLayerKind.Gallery || k(next) === LayoutLayerKind.Photo || k(next) === LayoutLayerKind.Gallery)
|
|
18067
|
+
return 32;
|
|
18068
|
+
if (k(next) === LayoutLayerKind.Button || k(next) === LayoutLayerKind.Form)
|
|
18069
|
+
return 28;
|
|
18070
|
+
if (k(prev) === LayoutLayerKind.Label || (k(prev) === LayoutLayerKind.Number && k(next) === LayoutLayerKind.Heading))
|
|
18071
|
+
return 10;
|
|
18072
|
+
if ((k(prev) === LayoutLayerKind.Heading && (k(next) === LayoutLayerKind.Text || k(next) === LayoutLayerKind.List)) || (k(prev) === LayoutLayerKind.Text && k(next) === LayoutLayerKind.Text))
|
|
18073
|
+
return 14;
|
|
18074
|
+
return 20;
|
|
18075
|
+
}
|
|
18076
|
+
/**
|
|
18077
|
+
* A `screen` word's size: its letters fill its columns' width (a display face runs about `advance` em a letter) and
|
|
18078
|
+
* never stand taller than its rows; never under 36px or over 560px (M8-G1: estimated, the product fits nothing in the
|
|
18079
|
+
* browser). `rows` 0 sizes by width alone (a phone's stacked word). Held sections are one screen tall.
|
|
18080
|
+
*/
|
|
18081
|
+
function screenFontSize(text, cols, rows, sectionRows, screens, advance = 0.6) {
|
|
18082
|
+
const letters = Math.max(1, Array.from(String(text ?? '').trim()).length);
|
|
18083
|
+
// The columns' share of the screen's width less its gutters (92vw for 12 columns), at 98% (the renderer's margin).
|
|
18084
|
+
const widthVw = Math.round(((92 * (cols / 12)) / (letters * advance)) * 0.98 * 100) / 100;
|
|
18085
|
+
if (!rows || !sectionRows)
|
|
18086
|
+
return `clamp(36px, ${widthVw}vw, 560px)`;
|
|
18087
|
+
const heightSvh = Math.round((((rows / sectionRows) * screens * 100) / 0.92) * 0.98 * 100) / 100;
|
|
18088
|
+
return `clamp(36px, min(${widthVw}vw, ${heightSvh}svh), 560px)`;
|
|
18089
|
+
}
|
|
18090
|
+
|
|
18091
|
+
/**
|
|
18092
|
+
* THE layout composer (premium components M8, gate 1): a page written in the layout language (`layout-language.ts`) in,
|
|
18093
|
+
* ordinary builder nodes out — the same `createSerializedNode` every composed page is made of, so the builder reloads it
|
|
18094
|
+
* and saves it unchanged and the engine renders it with nothing new to learn. No second renderer: a section is a Section
|
|
18095
|
+
* holding a 12-column grid, a held section is a Scene, a layer is a Heading / Text / Image / Slider / Form / Button
|
|
18096
|
+
* placed on the grid, its time entrance a `viewportEnter` interaction, its depth a `scrollProgress` parallax, its held
|
|
18097
|
+
* motion scene-core tracks. What the product cannot say yet is returned as a GAP (named in m8-proof-sites.md), never
|
|
18098
|
+
* worked around with CSS. Pure and deterministic.
|
|
18099
|
+
*/
|
|
18100
|
+
var LayoutGapCode;
|
|
18101
|
+
(function (LayoutGapCode) {
|
|
18102
|
+
/** M8-G1: a `screen` word is sized from an estimate of its letters, not fitted to its cell in the browser. */
|
|
18103
|
+
LayoutGapCode["ScreenFit"] = "screen-fit";
|
|
18104
|
+
/** M8-G2: no blur — a `blurIn` entrance rises without it, a `blur` track is dropped. */
|
|
18105
|
+
LayoutGapCode["Blur"] = "blur";
|
|
18106
|
+
/** M8-G3: `scaleIn` / `pop` start at the product's 0.8, not 0.95 / 0.9, and `pop` has no overshoot. */
|
|
18107
|
+
LayoutGapCode["ScaleIn"] = "scale-in";
|
|
18108
|
+
/** M8-G4: a held layer's keys ease one way (smoothstep), whatever the layout's ease. */
|
|
18109
|
+
LayoutGapCode["TrackEase"] = "track-ease";
|
|
18110
|
+
/** M8-G5: a depth glides at the product's one speed (no per-look scale), and a picture's own drift inside its frame
|
|
18111
|
+
* is a fixed over-scale. */
|
|
18112
|
+
LayoutGapCode["DepthSpeed"] = "depth-speed";
|
|
18113
|
+
/** M8-G6: the navigation is the product's bar — a corner, index or side menu is drawn as the bar. */
|
|
18114
|
+
LayoutGapCode["NavKind"] = "nav-kind";
|
|
18115
|
+
/** M8-G7: a link to a section scrolls by an action; it is no address (`#id`) a visitor can share. */
|
|
18116
|
+
LayoutGapCode["SectionLink"] = "section-link";
|
|
18117
|
+
/** M8-G9: a slider on a held section's stage is played by the scroll whether or not the layout asked. */
|
|
18118
|
+
LayoutGapCode["StageSlider"] = "stage-slider";
|
|
18119
|
+
/** M8-G10: a flood opens from the centre as an inset, not as a circle from the top edge. */
|
|
18120
|
+
LayoutGapCode["Flood"] = "flood";
|
|
18121
|
+
/** M8-G11: a held section stacks on a phone and its layers stand at rest (they cannot say "no motion here"). */
|
|
18122
|
+
LayoutGapCode["PhoneRest"] = "phone-rest";
|
|
18123
|
+
/** Motion or a sideways track on a section that is not held: the product moves layers by tracks only in a Scene. */
|
|
18124
|
+
LayoutGapCode["UnheldMotion"] = "unheld-motion";
|
|
18125
|
+
/** A form layer wears the product's preset: its fields are the preset's, the layout's options fill its choices. */
|
|
18126
|
+
LayoutGapCode["FormPreset"] = "form-preset";
|
|
18127
|
+
})(LayoutGapCode || (LayoutGapCode = {}));
|
|
18128
|
+
var LayoutColourMode;
|
|
18129
|
+
(function (LayoutColourMode) {
|
|
18130
|
+
LayoutColourMode["Light"] = "light";
|
|
18131
|
+
LayoutColourMode["Dark"] = "dark";
|
|
18132
|
+
})(LayoutColourMode || (LayoutColourMode = {}));
|
|
18133
|
+
const COMPOSED = { releaseLayoutDefaults: true };
|
|
18134
|
+
const create = (id, type, props = {}, elementStyle) => createSerializedNode(id, type, props, elementStyle, COMPOSED);
|
|
18135
|
+
var T;
|
|
18136
|
+
(function (T) {
|
|
18137
|
+
T["Section"] = "Section";
|
|
18138
|
+
T["Container"] = "Container";
|
|
18139
|
+
T["Heading"] = "Heading";
|
|
18140
|
+
T["Text"] = "Text";
|
|
18141
|
+
T["Image"] = "Image";
|
|
18142
|
+
T["ButtonBlock"] = "ButtonBlock";
|
|
18143
|
+
T["List"] = "List";
|
|
18144
|
+
T["ListItem"] = "ListItem";
|
|
18145
|
+
T["Slider"] = "SliderContainer";
|
|
18146
|
+
T["Slide"] = "SliderSlide";
|
|
18147
|
+
T["Link"] = "Link";
|
|
18148
|
+
T["Field"] = "Field";
|
|
18149
|
+
T["SubmitButton"] = "SubmitButton";
|
|
18150
|
+
T["FormSuccess"] = "FormSuccess";
|
|
18151
|
+
})(T || (T = {}));
|
|
18152
|
+
const GRID_COLUMNS = 12;
|
|
18153
|
+
const PHONE_FIRST_TOP = '84px';
|
|
18154
|
+
const SCREEN_ADVANCE = 0.6;
|
|
18155
|
+
const SCREEN_ADVANCE_HEBREW = 0.38;
|
|
18156
|
+
const HEBREW = /[-]/;
|
|
18157
|
+
const KINETIC_ALL_LIT = 0.8;
|
|
18158
|
+
const INNER_SCALE = 0.07;
|
|
18159
|
+
const CLIP_DURATION = 1.15;
|
|
18160
|
+
const ZOOM_DURATION = 1.6;
|
|
18161
|
+
const NUMBER_PHONE_SIZE = 'clamp(36px, 11vw, 52px)';
|
|
18162
|
+
const SLIDE_GAP = 18;
|
|
18163
|
+
const GALLERY_SPEED = 900;
|
|
18164
|
+
const GALLERY_STACKED_ASPECT = '4 / 5';
|
|
18165
|
+
const FULL = '100%';
|
|
18166
|
+
const ZERO = '0px';
|
|
18167
|
+
const PHONE_GROUND_BRIGHTNESS = '0.75';
|
|
18168
|
+
const GALLERY_BAR_TOP = '12px';
|
|
18169
|
+
const STRETCH_KINDS = new Set([LayoutLayerKind.Photo, LayoutLayerKind.Shape, LayoutLayerKind.Gallery, LayoutLayerKind.Form]);
|
|
18170
|
+
const STACKED_EFFECTS = new Set(['fade', 'cube', 'flip', 'cards']);
|
|
18171
|
+
const SHADOW_UNDER_LIGHT = '0 1px 2px rgba(0,0,0,.55), 0 6px 34px rgba(0,0,0,.6)';
|
|
18172
|
+
const HALO_UNDER_DARK = '0 1px 2px rgba(255,255,255,.5), 0 4px 26px rgba(255,255,255,.75), 0 0 60px rgba(255,255,255,.45)';
|
|
18173
|
+
const FORM_PRESET_CHOICE_LABEL = { guests: 'People', needs: 'What do you need?', budget: 'Estimated budget' };
|
|
18174
|
+
/** A form someone may send again says its Sent words in a toast and keeps its fields (premium M5, N3); the rest show the
|
|
18175
|
+
* success in place. */
|
|
18176
|
+
const LAYOUT_FORM_AFTER_SEND = { [FormPresetId.Newsletter]: FormAfterSend.Toast };
|
|
18177
|
+
const CHOICES = 'choices';
|
|
18178
|
+
/** The element style a layer wears, by kind, role and size (the round-four renderer's `elementStyleOf`). */
|
|
18179
|
+
function elementStyleOf(l) {
|
|
18180
|
+
switch (l.kind) {
|
|
18181
|
+
case LayoutLayerKind.Word: return 'display';
|
|
18182
|
+
case LayoutLayerKind.Heading: return l.role === LayoutRole.Lead ? 'h1' : 'h2';
|
|
18183
|
+
case LayoutLayerKind.Text: return l.size === 'm' || l.size === 'l' ? 'lead' : 'body';
|
|
18184
|
+
case LayoutLayerKind.List: return 'body';
|
|
18185
|
+
case LayoutLayerKind.Label: return !l.size || l.size === 'xs' || l.size === 's' ? 'eyebrow' : 'small';
|
|
18186
|
+
default: return NO_ELEMENT_STYLE;
|
|
18187
|
+
}
|
|
18188
|
+
}
|
|
18189
|
+
function gap(ctx, code, path, detail) {
|
|
18190
|
+
if (!ctx.gaps.some(g => g.code === code && g.path === path))
|
|
18191
|
+
ctx.gaps.push({ code, path, detail });
|
|
18192
|
+
}
|
|
18193
|
+
function phone(node, values) {
|
|
18194
|
+
assertStyleSlots(node.type, Object.keys(values));
|
|
18195
|
+
const layers = (node.responsive ??= {});
|
|
18196
|
+
const layer = (layers[LAYOUT_PHONE_BREAKPOINT] ??= { styleProps: {} });
|
|
18197
|
+
Object.assign((layer.styleProps ??= {}), values);
|
|
18198
|
+
}
|
|
18199
|
+
function setProp(node, name, value) {
|
|
18200
|
+
node.props[name] = value;
|
|
18201
|
+
}
|
|
18202
|
+
/** A colour name as the token the layer paints with: words in the accent read its text shade. */
|
|
18203
|
+
function colourOf(l) {
|
|
18204
|
+
const colour = (l.color ?? LayoutColour.Ink);
|
|
18205
|
+
if (colour === LayoutColour.Accent && LAYOUT_TEXT_KINDS.has(l.kind))
|
|
18206
|
+
return LAYOUT_ACCENT_TEXT;
|
|
18207
|
+
return LAYOUT_COLOUR_TOKEN[colour] ?? LAYOUT_COLOUR_TOKEN[LayoutColour.Ink];
|
|
18208
|
+
}
|
|
18209
|
+
/** A ground as paint: the page's own ground shows through (the round-four renderer leaves it transparent). */
|
|
18210
|
+
function groundPaint(ground) {
|
|
18211
|
+
if (ground === LayoutColour.Ground)
|
|
18212
|
+
return 'transparent';
|
|
18213
|
+
return LAYOUT_COLOUR_TOKEN[ground] ?? 'transparent';
|
|
18214
|
+
}
|
|
18215
|
+
/** A ground as the colour a transition paints (the page's own ground for `ground`). */
|
|
18216
|
+
function veilPaint(ground) {
|
|
18217
|
+
return ground === LayoutColour.Ground ? 'var(--iox-page-bg)' : LAYOUT_COLOUR_TOKEN[ground] ?? 'var(--iox-page-bg)';
|
|
18218
|
+
}
|
|
18219
|
+
/** Is this colour light in this mode — what a scrim under it must be dark for. */
|
|
18220
|
+
function isLight(colour, mode) {
|
|
18221
|
+
const name = (colour ?? LayoutColour.Ink);
|
|
18222
|
+
const ground = name === LayoutColour.Ground || name === LayoutColour.Soft;
|
|
18223
|
+
return mode === LayoutColourMode.Light ? ground : !ground;
|
|
18224
|
+
}
|
|
18225
|
+
const gridTemplate = (count) => `repeat(${count}, minmax(0, 1fr))`;
|
|
18226
|
+
/** The grid a section's layers are placed on: 12 columns per screen, its rows, the page's gutter. */
|
|
18227
|
+
function gridLayout(rows, track) {
|
|
18228
|
+
return {
|
|
18229
|
+
display: 'grid',
|
|
18230
|
+
gridTemplateColumns: gridTemplate(GRID_COLUMNS * track),
|
|
18231
|
+
gridTemplateRows: gridTemplate(rows),
|
|
18232
|
+
gap: `${ZERO} ${LAYOUT_COLUMN_GAP}`,
|
|
18233
|
+
padding: `${ZERO} ${LAYOUT_GUTTER}`,
|
|
18234
|
+
};
|
|
18235
|
+
}
|
|
18236
|
+
/** The same grid on a phone: one column, in the section's `phone` order, with the M1.3 padding. */
|
|
18237
|
+
function phoneStack(first) {
|
|
18238
|
+
return {
|
|
18239
|
+
display: 'flex',
|
|
18240
|
+
flexDirection: 'column',
|
|
18241
|
+
height: 'auto',
|
|
18242
|
+
gap: ZERO,
|
|
18243
|
+
padding: `${first ? PHONE_FIRST_TOP : LAYOUT_PHONE_PADDING} ${LAYOUT_GUTTER} ${LAYOUT_PHONE_PADDING} ${LAYOUT_GUTTER}`,
|
|
18244
|
+
};
|
|
18245
|
+
}
|
|
18246
|
+
/** A bleed's width: its cell and the gutters it runs into (a negative margin alone moves a box that holds its width). */
|
|
18247
|
+
function bleedWidth(bleed) {
|
|
18248
|
+
if (!bleed || bleed === LayoutBleed.None)
|
|
18249
|
+
return null;
|
|
18250
|
+
return bleed === LayoutBleed.Both ? `calc(100% + 2 * ${LAYOUT_GUTTER})` : `calc(100% + ${LAYOUT_GUTTER})`;
|
|
18251
|
+
}
|
|
18252
|
+
/** The physical sides a bleed runs into, from the page's direction. */
|
|
18253
|
+
function bleedSides(bleed, rtl) {
|
|
18254
|
+
if (!bleed || bleed === LayoutBleed.None)
|
|
18255
|
+
return null;
|
|
18256
|
+
const start = bleed === LayoutBleed.Start || bleed === LayoutBleed.Both;
|
|
18257
|
+
const end = bleed === LayoutBleed.End || bleed === LayoutBleed.Both;
|
|
18258
|
+
return rtl ? { left: end, right: start } : { left: start, right: end };
|
|
18259
|
+
}
|
|
18260
|
+
/** A bleed: the layer runs into the gutter on that side. */
|
|
18261
|
+
function bleedMargin(bleed, rtl) {
|
|
18262
|
+
const sides = bleedSides(bleed, rtl);
|
|
18263
|
+
if (!sides)
|
|
18264
|
+
return null;
|
|
18265
|
+
const out = `calc(-1 * ${LAYOUT_GUTTER})`;
|
|
18266
|
+
return `${ZERO} ${sides.right ? out : ZERO} ${ZERO} ${sides.left ? out : ZERO}`;
|
|
18267
|
+
}
|
|
18268
|
+
// ── Motion ──────────────────────────────────────────────────────────────────────────────────────────────
|
|
18269
|
+
const ENTER_TYPE = {
|
|
18270
|
+
[LayoutEnter.Fade]: 'fadeIn',
|
|
18271
|
+
[LayoutEnter.FadeRise]: 'moveUp',
|
|
18272
|
+
[LayoutEnter.ScaleIn]: 'scaleIn',
|
|
18273
|
+
[LayoutEnter.Pop]: 'scaleIn',
|
|
18274
|
+
[LayoutEnter.ClipReveal]: 'clipReveal',
|
|
18275
|
+
[LayoutEnter.MaskRise]: 'revealText',
|
|
18276
|
+
[LayoutEnter.BlurIn]: 'moveUp',
|
|
18277
|
+
};
|
|
18278
|
+
/** A time entrance: the round-four renderer's `playEnter` as a `viewportEnter` interaction on the node. */
|
|
18279
|
+
function enterInteraction(nodeId, l, ctx, path, textual, scale = 1) {
|
|
18280
|
+
const enter = l.enter ?? LayoutEnter.None;
|
|
18281
|
+
if (enter === LayoutEnter.None)
|
|
18282
|
+
return null;
|
|
18283
|
+
const role = (l.role ?? LayoutRole.Support);
|
|
18284
|
+
const recipe = role === LayoutRole.Decoration ? LayoutEnter.Fade : enter;
|
|
18285
|
+
const duration = Math.round((role === LayoutRole.Lead ? ctx.pace.lead : role === LayoutRole.Decoration ? ctx.pace.decoration : ctx.pace.support) * scale);
|
|
18286
|
+
const delay = Math.round(LAYOUT_BEAT_DELAY[Math.max(0, Math.min(5, l.beat ?? 0))] * ctx.pace.gap);
|
|
18287
|
+
let type = ENTER_TYPE[recipe] ?? 'fadeIn';
|
|
18288
|
+
const params = {};
|
|
18289
|
+
const rise = LAYOUT_RISE[role] ?? LAYOUT_RISE[LayoutRole.Support];
|
|
18290
|
+
if (recipe === LayoutEnter.FadeRise)
|
|
18291
|
+
params['distance'] = rise;
|
|
18292
|
+
if (recipe === LayoutEnter.BlurIn) {
|
|
18293
|
+
params['distance'] = Math.round(rise / 2);
|
|
18294
|
+
gap(ctx, LayoutGapCode.Blur, path, 'blurIn rises without its blur');
|
|
18295
|
+
}
|
|
18296
|
+
if (recipe === LayoutEnter.ScaleIn || recipe === LayoutEnter.Pop)
|
|
18297
|
+
gap(ctx, LayoutGapCode.ScaleIn, path, `${recipe} starts at 0.8`);
|
|
18298
|
+
if (recipe === LayoutEnter.ClipReveal)
|
|
18299
|
+
params['from'] = l.from ?? LayoutSide.Bottom;
|
|
18300
|
+
if (recipe === LayoutEnter.MaskRise) {
|
|
18301
|
+
if (textual)
|
|
18302
|
+
params['by'] = 'word';
|
|
18303
|
+
else {
|
|
18304
|
+
type = 'moveUp';
|
|
18305
|
+
params['distance'] = rise;
|
|
18306
|
+
}
|
|
18307
|
+
}
|
|
18308
|
+
return {
|
|
18309
|
+
id: `${nodeId}-enter`,
|
|
18310
|
+
trigger: 'viewportEnter',
|
|
18311
|
+
actions: [{ type, target: 'self', duration: recipe === LayoutEnter.ClipReveal ? Math.round(duration * CLIP_DURATION) : duration, delay, easing: ctx.ease, once: true, ...(Object.keys(params).length ? { params } : {}) }],
|
|
18312
|
+
};
|
|
18313
|
+
}
|
|
18314
|
+
/** A picture settling inside its frame as the frame wipes open (`clipReveal` on a photo). */
|
|
18315
|
+
function zoomInteraction(nodeId, l, ctx) {
|
|
18316
|
+
const role = (l.role ?? LayoutRole.Support);
|
|
18317
|
+
const duration = role === LayoutRole.Lead ? ctx.pace.lead : ctx.pace.support;
|
|
18318
|
+
return {
|
|
18319
|
+
id: `${nodeId}-settle`,
|
|
18320
|
+
trigger: 'viewportEnter',
|
|
18321
|
+
actions: [{ type: 'zoomOut', target: 'self', duration: Math.round(duration * ZOOM_DURATION), delay: Math.round(LAYOUT_BEAT_DELAY[Math.max(0, Math.min(5, l.beat ?? 0))] * ctx.pace.gap), easing: ctx.ease, once: true }],
|
|
18322
|
+
};
|
|
18323
|
+
}
|
|
18324
|
+
/** A depth: the layer glides against the page while it passes (`parallax`, the product's one speed). */
|
|
18325
|
+
function depthInteraction(nodeId, depth) {
|
|
18326
|
+
// Stacked on a phone, a layer never glides into its neighbour.
|
|
18327
|
+
return { id: `${nodeId}-depth`, trigger: 'scrollProgress', range: 'cover', actions: [{ type: 'parallax', target: 'self', duration: 1000, delay: 0, easing: 'linear', params: { depth, phone: LAYOUT_DEPTH_ON_PHONE } }] };
|
|
18328
|
+
}
|
|
18329
|
+
const TRACK_REST = { x: 0, y: 0, scale: 1, rotate: 0, opacity: 1, clip: 100, words: 100 };
|
|
18330
|
+
/** A layout track as a scene-core track: lengths move from the layer's own box to the stage's (cqw / cqh). */
|
|
18331
|
+
function sceneTrackOf(t, l, rows, ctx, path) {
|
|
18332
|
+
const [a, b] = t.at ?? [0, 1];
|
|
18333
|
+
if (t.prop === LayoutTrackProp.Blur) {
|
|
18334
|
+
gap(ctx, LayoutGapCode.Blur, path, 'a blur track is dropped');
|
|
18335
|
+
return null;
|
|
18336
|
+
}
|
|
18337
|
+
if (t.ease && t.ease !== LayoutEase.InOut)
|
|
18338
|
+
gap(ctx, LayoutGapCode.TrackEase, path, `${t.prop} eases (smoothstep), not ${t.ease}`);
|
|
18339
|
+
let scale = 1;
|
|
18340
|
+
if (t.prop === LayoutTrackProp.X)
|
|
18341
|
+
scale = (l.col[1] - l.col[0]) / GRID_COLUMNS;
|
|
18342
|
+
if (t.prop === LayoutTrackProp.Y)
|
|
18343
|
+
scale = (l.row[1] - l.row[0]) / rows;
|
|
18344
|
+
const round = (v) => Math.round(v * scale * 100) / 100;
|
|
18345
|
+
const track = { prop: t.prop, keys: [[a, round(Number(t.from))], [b, round(Number(t.to))]] };
|
|
18346
|
+
if (t.prop === LayoutTrackProp.Clip)
|
|
18347
|
+
track.from = LayoutSide.Bottom;
|
|
18348
|
+
return track;
|
|
18349
|
+
}
|
|
18350
|
+
/** On a phone a held section stacks: each of its tracks stands at rest. */
|
|
18351
|
+
function restingTracks(tracks) {
|
|
18352
|
+
return tracks.map(t => ({ prop: t.prop, keys: [[0, TRACK_REST[t.prop] ?? 0]], ...(t.from ? { from: t.from } : {}) }));
|
|
18353
|
+
}
|
|
18354
|
+
/** The node that sits on the grid: its cell, its stacking, its bleed and its tilt — and on a phone, its place in the stack. */
|
|
18355
|
+
function place(node, l, lc, ctx) {
|
|
18356
|
+
const stretch = STRETCH_KINDS.has(l.kind);
|
|
18357
|
+
const values = {
|
|
18358
|
+
gridColumn: `${l.col[0]} / ${l.col[1]}`,
|
|
18359
|
+
gridRow: `${l.row[0]} / ${l.row[1]}`,
|
|
18360
|
+
alignSelf: stretch ? 'stretch' : 'center',
|
|
18361
|
+
zIndex: String(1 + (l.z ?? 0)),
|
|
18362
|
+
position: 'relative',
|
|
18363
|
+
minWidth: ZERO,
|
|
18364
|
+
};
|
|
18365
|
+
const margin = bleedMargin(l.bleed, ctx.rtl);
|
|
18366
|
+
if (margin)
|
|
18367
|
+
values['margin'] = margin;
|
|
18368
|
+
const width = l.kind === LayoutLayerKind.Button ? null : bleedWidth(l.bleed);
|
|
18369
|
+
if (width)
|
|
18370
|
+
values['width'] = width;
|
|
18371
|
+
if (l.rotate)
|
|
18372
|
+
values['rotate'] = `${l.rotate}deg`;
|
|
18373
|
+
if (l.kind === LayoutLayerKind.Button)
|
|
18374
|
+
values['justifySelf'] = l.align === 'center' ? 'center' : l.align === 'end' ? 'end' : 'start';
|
|
18375
|
+
else if (l.kind !== LayoutLayerKind.Photo && l.kind !== LayoutLayerKind.Gallery && l.kind !== LayoutLayerKind.Shape)
|
|
18376
|
+
values['textAlign'] = l.align ?? 'start';
|
|
18377
|
+
setStyleProps(node, values);
|
|
18378
|
+
const onPhone = {
|
|
18379
|
+
gridColumn: 'auto', gridRow: 'auto', alignSelf: l.kind === LayoutLayerKind.Button ? 'flex-start' : 'stretch', order: String(lc.order),
|
|
18380
|
+
margin: `${lc.phoneGap}px ${ZERO} ${ZERO} ${ZERO}`,
|
|
18381
|
+
};
|
|
18382
|
+
if (width)
|
|
18383
|
+
onPhone['width'] = FULL;
|
|
18384
|
+
if (l.kind === LayoutLayerKind.Button && lc.phoneAlign === 'center')
|
|
18385
|
+
onPhone['alignSelf'] = 'center';
|
|
18386
|
+
if (values['textAlign'])
|
|
18387
|
+
onPhone['textAlign'] = lc.phoneAlign;
|
|
18388
|
+
if (l.kind === LayoutLayerKind.Shape)
|
|
18389
|
+
onPhone['display'] = 'none';
|
|
18390
|
+
phone(node, onPhone);
|
|
18391
|
+
}
|
|
18392
|
+
function textLayer(id, l, lc, ctx) {
|
|
18393
|
+
const style = elementStyleOf(l);
|
|
18394
|
+
let node;
|
|
18395
|
+
if (l.kind === LayoutLayerKind.Word || l.kind === LayoutLayerKind.Heading) {
|
|
18396
|
+
const level = !ctx.headingSeen && lc.si === 0 && l.role === LayoutRole.Lead ? 'h1' : 'h2';
|
|
18397
|
+
if (level === 'h1')
|
|
18398
|
+
ctx.headingSeen = true;
|
|
18399
|
+
node = create(id, T.Heading, { content: l.text ?? '', level }, style);
|
|
18400
|
+
}
|
|
18401
|
+
else if (l.kind === LayoutLayerKind.Number) {
|
|
18402
|
+
// A number is set in the display face, but it is no heading: a Text wearing the display tokens.
|
|
18403
|
+
node = create(id, T.Text, { content: l.text ?? '', tag: 'p' }, NO_ELEMENT_STYLE);
|
|
18404
|
+
setStyleProps(node, {
|
|
18405
|
+
fontFamily: 'var(--iox-font-display)', fontSize: 'var(--iox-size-display)', fontWeight: 'var(--iox-weight-display)',
|
|
18406
|
+
letterSpacing: 'var(--iox-tracking-display)', lineHeight: '1', fontVariantNumeric: 'tabular-nums',
|
|
18407
|
+
});
|
|
18408
|
+
phone(node, { fontSize: NUMBER_PHONE_SIZE });
|
|
18409
|
+
}
|
|
18410
|
+
else {
|
|
18411
|
+
node = create(id, T.Text, { content: l.text ?? '', tag: 'p' }, style);
|
|
18412
|
+
}
|
|
18413
|
+
setStyleProps(node, { color: colourOf(l), margin: ZERO });
|
|
18414
|
+
if (l.scrim)
|
|
18415
|
+
setStyleProps(node, { textShadow: isLight(l.color, ctx.mode) ? SHADOW_UNDER_LIGHT : HALO_UNDER_DARK });
|
|
18416
|
+
if (l.size === 'screen') {
|
|
18417
|
+
const rows = l.row[1] - l.row[0];
|
|
18418
|
+
const cols = l.col[1] - l.col[0] + (l.bleed && l.bleed !== LayoutBleed.None ? (l.bleed === LayoutBleed.Both ? 1 : 0.5) : 0);
|
|
18419
|
+
const advance = HEBREW.test(l.text ?? '') ? SCREEN_ADVANCE_HEBREW : SCREEN_ADVANCE;
|
|
18420
|
+
const screens = lc.held ? 1 : lc.section.screens;
|
|
18421
|
+
setStyleProps(node, { fontSize: screenFontSize(l.text ?? '', cols, rows, lc.section.rows, screens, advance) });
|
|
18422
|
+
phone(node, { fontSize: screenFontSize(l.text ?? '', GRID_COLUMNS, 0, 0, 0, advance) });
|
|
18423
|
+
gap(ctx, LayoutGapCode.ScreenFit, lc.path, 'sized from its letters, not fitted to its cell');
|
|
18424
|
+
}
|
|
18425
|
+
return node;
|
|
18426
|
+
}
|
|
18427
|
+
function listLayer(id, l, ctx) {
|
|
18428
|
+
const frame = create(id, T.Container, {}, NO_ELEMENT_STYLE);
|
|
18429
|
+
const list = create(`${id}-list`, T.List, { htmlTag: 'ul' }, NO_ELEMENT_STYLE);
|
|
18430
|
+
setStyleProps(list, { display: 'grid', gap: '0.5em', margin: ZERO, padding: ZERO, listStyleType: 'none', color: colourOf(l) });
|
|
18431
|
+
list.children = (l.items ?? []).map((item, i) => {
|
|
18432
|
+
const li = create(`${id}-i${i}`, T.ListItem, {}, NO_ELEMENT_STYLE);
|
|
18433
|
+
setStyleProps(li, { borderWidth: '1px 0px 0px 0px', borderStyle: 'solid', borderColor: 'currentColor', padding: '0.45em 0px 0px 0px', opacity: '0.9' });
|
|
18434
|
+
const text = create(`${id}-i${i}-t`, T.Text, { content: item, tag: 'span' }, elementStyleOf(l));
|
|
18435
|
+
setStyleProps(text, { color: 'inherit', margin: ZERO });
|
|
18436
|
+
li.children = [text];
|
|
18437
|
+
return li;
|
|
18438
|
+
});
|
|
18439
|
+
frame.children = [list];
|
|
18440
|
+
return frame;
|
|
18441
|
+
}
|
|
18442
|
+
function photoLayer(id, l, ctx, path) {
|
|
18443
|
+
const photoId = l.photo?.id ?? '';
|
|
18444
|
+
const frame = create(id, T.Container, {}, NO_ELEMENT_STYLE);
|
|
18445
|
+
// Its cell gives it both sides (the shape is ignored there); where it stacks, its width and its shape give it a height.
|
|
18446
|
+
const aspectRatio = ctx.photoAspect(photoId);
|
|
18447
|
+
setStyleProps(frame, { overflow: 'hidden', borderRadius: 'var(--iox-image-radius)', height: FULL, aspectRatio });
|
|
18448
|
+
phone(frame, { aspectRatio, height: 'auto' });
|
|
18449
|
+
const image = create(`${id}-img`, T.Image, { src: ctx.photoSrc(photoId), alt: ctx.photoAlt(photoId) }, 'media');
|
|
18450
|
+
setStyleProps(image, {
|
|
18451
|
+
display: 'block', width: FULL, height: FULL, aspectRatio: 'auto', objectFit: l.fit === 'contain' ? 'contain' : 'cover', borderRadius: ZERO,
|
|
18452
|
+
});
|
|
18453
|
+
// A picture with room to drift is over-scaled inside its frame (M8-G5: the drift itself has no speed of its own). The
|
|
18454
|
+
// scale sits on a box between them: an Image's own size is capped at its frame (vectoriox/iox-ui#8), and its
|
|
18455
|
+
// transform belongs to its entrance (zoomOut).
|
|
18456
|
+
const k = INNER_SCALE * Math.max(0, Math.min(3, l.inner ?? 0));
|
|
18457
|
+
if (!k) {
|
|
18458
|
+
frame.children = [image];
|
|
18459
|
+
return { frame, image };
|
|
18460
|
+
}
|
|
18461
|
+
const drift = create(`${id}-drift`, T.Container, {}, NO_ELEMENT_STYLE);
|
|
18462
|
+
const scale = String(Math.round((1 + k) * 1000) / 1000);
|
|
18463
|
+
setStyleProps(drift, { width: FULL, height: FULL, scaleX: scale, scaleY: scale });
|
|
18464
|
+
drift.children = [image];
|
|
18465
|
+
gap(ctx, LayoutGapCode.DepthSpeed, path, `inner ${l.inner}: over-scaled ×${(1 + k).toFixed(2)}, no drift`);
|
|
18466
|
+
frame.children = [drift];
|
|
18467
|
+
return { frame, image };
|
|
18468
|
+
}
|
|
18469
|
+
function galleryLayer(id, l, lc, ctx) {
|
|
18470
|
+
const g = l.gallery ?? { slides: [] };
|
|
18471
|
+
const frame = create(id, T.Container, {}, NO_ELEMENT_STYLE);
|
|
18472
|
+
setStyleProps(frame, { position: 'relative' });
|
|
18473
|
+
phone(frame, { height: 'auto' });
|
|
18474
|
+
const effect = g.effect ?? 'slide';
|
|
18475
|
+
const stacked = STACKED_EFFECTS.has(effect);
|
|
18476
|
+
const per = stacked ? 1 : g.perView === 'auto' ? 'auto' : Number(g.perView ?? 1);
|
|
18477
|
+
// On a held stage the Scene's own driver plays the gallery (scene-core `sliderOf`); "Scroll plays it" there would give
|
|
18478
|
+
// it a runway — a second Scene inside the first, two drivers on one slider. Off a stage, `scroll` is that runway.
|
|
18479
|
+
const scrollPlays = !!g.scroll && !lc.held;
|
|
18480
|
+
const played = scrollPlays || lc.held;
|
|
18481
|
+
const slider = create(`${id}-slider`, T.Slider, {
|
|
18482
|
+
dir: ctx.rtl ? 'rtl' : 'ltr', effect, slidesPerView: per, centeredSlides: !!g.centered, spaceBetween: per === 1 ? 0 : SLIDE_GAP,
|
|
18483
|
+
loop: g.loop && !played ? 'on' : 'off', freeMode: !!g.freeMode && !played, grabCursor: !played, speed: GALLERY_SPEED,
|
|
18484
|
+
enableParallax: !!g.drift, enableAutoplay: !!g.autoplay && !played, autoplayDelay: Math.max(1800, g.autoplay || 0),
|
|
18485
|
+
autoplayDisableOnInteraction: true, enableKeyboard: true, scrollPlays,
|
|
18486
|
+
enableCaption: g.slides.some(s => !!s.caption), enableCount: true, enableNavigation: !played && g.slides.length > 1,
|
|
18487
|
+
[SLIDER_PLACEMENT_TRAIT]: SliderPlacement.Under, ariaLabel: l.text ?? '',
|
|
18488
|
+
}, NO_ELEMENT_STYLE);
|
|
18489
|
+
// Bounded by its cell: the engine wraps a slider in a host of no height, so `height: 100%` alone would grow the
|
|
18490
|
+
// gallery to its picture and push the bar past the cell. On a phone it stacks at its own shape. A gallery the
|
|
18491
|
+
// scroll plays is held mid-screen by its runway (shared CSS) at its pictures' own height instead.
|
|
18492
|
+
setStyleProps(slider, scrollPlays ? { width: FULL, height: FULL, minHeight: ZERO } : {
|
|
18493
|
+
position: 'absolute', top: ZERO, right: ZERO, bottom: ZERO, left: ZERO, width: FULL, height: FULL, minHeight: ZERO,
|
|
18494
|
+
display: 'flex', flexDirection: 'column',
|
|
18495
|
+
});
|
|
18496
|
+
phone(slider, scrollPlays ? { height: 'auto', aspectRatio: GALLERY_STACKED_ASPECT } : { position: 'relative', height: 'auto', aspectRatio: GALLERY_STACKED_ASPECT });
|
|
18497
|
+
slider.children = g.slides.map((s, i) => {
|
|
18498
|
+
const slide = create(`${id}-slide${i}`, T.Slide, { caption: s.caption ?? '' }, 'media');
|
|
18499
|
+
setStyleProps(slide, { overflow: 'hidden', height: FULL, aspectRatio: 'auto' });
|
|
18500
|
+
const image = create(`${id}-slide${i}-img`, T.Image, { src: ctx.photoSrc(s.photo?.id ?? ''), alt: s.caption ?? ctx.photoAlt(s.photo?.id ?? '') }, 'media');
|
|
18501
|
+
setStyleProps(image, { display: 'block', width: FULL, height: FULL, maxWidth: 'none', aspectRatio: 'auto', objectFit: 'cover', borderRadius: ZERO });
|
|
18502
|
+
slide.children = [image];
|
|
18503
|
+
return slide;
|
|
18504
|
+
});
|
|
18505
|
+
syncSliderParts(slider, partFactory(`${id}-slider`));
|
|
18506
|
+
// Its arrows say what they do on hover and focus (premium M5): their own accessible names.
|
|
18507
|
+
walkSerialized([slider], node => {
|
|
18508
|
+
if (node.role === SliderRole.Prev || node.role === SliderRole.Next)
|
|
18509
|
+
node.props[LAYOUT_TOOLTIP_TRAIT] = node.props['ariaLabel'];
|
|
18510
|
+
});
|
|
18511
|
+
// A gallery that bleeds to the screen's edge keeps its bar inside the page's margin on that side (the bar's own
|
|
18512
|
+
// padding assumes a slider centred on the screen).
|
|
18513
|
+
const sides = bleedSides(l.bleed, ctx.rtl);
|
|
18514
|
+
const bar = (slider.children ?? []).find(c => c.role === SliderRole.Bar);
|
|
18515
|
+
if (sides && bar) {
|
|
18516
|
+
setStyleProps(bar, { padding: `${GALLERY_BAR_TOP} ${sides.right ? LAYOUT_GUTTER : ZERO} ${ZERO} ${sides.left ? LAYOUT_GUTTER : ZERO}` });
|
|
18517
|
+
phone(bar, { padding: `${GALLERY_BAR_TOP} ${ZERO} ${ZERO} ${ZERO}` });
|
|
18518
|
+
}
|
|
18519
|
+
if (lc.held)
|
|
18520
|
+
gap(ctx, LayoutGapCode.StageSlider, lc.path, 'played by the Scene\'s driver, which plays any slider on its stage (vectoriox/iox-ui#54)');
|
|
18521
|
+
frame.children = [slider];
|
|
18522
|
+
return frame;
|
|
18523
|
+
}
|
|
18524
|
+
/** Recipe parts stamped with this composer's ids (`<id>-<key>`). */
|
|
18525
|
+
function partFactory(id) {
|
|
18526
|
+
return spec => create(`${id}-${spec.key}`, spec.type, { ...(spec.props ?? {}) }, spec.elementStyle ?? null);
|
|
18527
|
+
}
|
|
18528
|
+
function buttonLayer(id, l, ctx) {
|
|
18529
|
+
const variant = l.variant === 'secondary' ? 'button-secondary' : l.variant === 'ghost' ? 'button-ghost' : 'button-primary';
|
|
18530
|
+
const button = create(id, T.ButtonBlock, { tag: 'button', type: 'button' }, variant);
|
|
18531
|
+
const label = create(`${id}-label`, T.Text, { content: l.text ?? '', tag: 'span' }, 'button-label');
|
|
18532
|
+
button.children = [label];
|
|
18533
|
+
if (l.to)
|
|
18534
|
+
ctx.links.push({ node: button, to: l.to });
|
|
18535
|
+
return button;
|
|
18536
|
+
}
|
|
18537
|
+
/** A form layer: its title and intro, and the product's preset form — the layout's options become the preset's choices. */
|
|
18538
|
+
function formLayer(id, l, ctx, path) {
|
|
18539
|
+
const f = l.form ?? { preset: 'contact' };
|
|
18540
|
+
const frame = create(id, T.Container, {}, NO_ELEMENT_STYLE);
|
|
18541
|
+
setStyleProps(frame, { display: 'flex', flexDirection: 'column', gap: '12px', color: 'var(--iox-text)' });
|
|
18542
|
+
const parts = [];
|
|
18543
|
+
if (f.title) {
|
|
18544
|
+
const title = create(`${id}-title`, T.Heading, { content: f.title, level: 'h3' }, 'h3');
|
|
18545
|
+
setStyleProps(title, { margin: ZERO });
|
|
18546
|
+
parts.push(title);
|
|
18547
|
+
}
|
|
18548
|
+
if (f.intro) {
|
|
18549
|
+
const intro = create(`${id}-intro`, T.Text, { content: f.intro, tag: 'p' }, 'body');
|
|
18550
|
+
setStyleProps(intro, { margin: ZERO });
|
|
18551
|
+
parts.push(intro);
|
|
18552
|
+
}
|
|
18553
|
+
const form = composePresetForm(`${id}-form`, f.preset, ctx.p);
|
|
18554
|
+
const afterSend = LAYOUT_FORM_AFTER_SEND[f.preset];
|
|
18555
|
+
if (afterSend)
|
|
18556
|
+
form.props[FORM_AFTER_SEND_TRAIT] = afterSend;
|
|
18557
|
+
walkSerialized([form], node => {
|
|
18558
|
+
if (node.type === T.Field) {
|
|
18559
|
+
for (const [key, options] of Object.entries(f.options ?? {})) {
|
|
18560
|
+
if (!options?.length || node.props['label'] !== FORM_PRESET_CHOICE_LABEL[key])
|
|
18561
|
+
continue;
|
|
18562
|
+
node.props['control'] = CHOICES;
|
|
18563
|
+
node.props['optionsText'] = options.join('\n');
|
|
18564
|
+
gap(ctx, LayoutGapCode.FormPreset, path, `the preset's "${node.props['label']}" takes the layout's ${key} as choices`);
|
|
18565
|
+
}
|
|
18566
|
+
}
|
|
18567
|
+
if (node.type === T.SubmitButton && f.submit)
|
|
18568
|
+
node.props['label'] = f.submit;
|
|
18569
|
+
if (node.type === T.FormSuccess && (f.successTitle || f.successText)) {
|
|
18570
|
+
const text = node.children?.[0];
|
|
18571
|
+
if (text)
|
|
18572
|
+
text.props['content'] = [f.successTitle, f.successText].filter(Boolean).join(' ');
|
|
18573
|
+
}
|
|
18574
|
+
});
|
|
18575
|
+
parts.push(form);
|
|
18576
|
+
frame.children = parts;
|
|
18577
|
+
return frame;
|
|
18578
|
+
}
|
|
18579
|
+
function marqueeLayer(id, l) {
|
|
18580
|
+
return buildMarqueeRecipe(partFactory(id), { words: l.items?.length ? l.items : l.text ? [l.text] : undefined });
|
|
18581
|
+
}
|
|
18582
|
+
function shapeLayer(id, l) {
|
|
18583
|
+
const shape = create(id, T.Container, {}, NO_ELEMENT_STYLE);
|
|
18584
|
+
setStyleProps(shape, { backgroundColor: LAYOUT_COLOUR_TOKEN[(l.color ?? LayoutColour.Accent)], borderRadius: 'var(--iox-image-radius)' });
|
|
18585
|
+
return shape;
|
|
18586
|
+
}
|
|
18587
|
+
/** One layer → its node(s), placed, with its entrance, depth and tracks. */
|
|
18588
|
+
function composeLayer(l, lc, ctx) {
|
|
18589
|
+
const id = `${ctx.p}-s${lc.si}-l${lc.li}`;
|
|
18590
|
+
let outer;
|
|
18591
|
+
let entering;
|
|
18592
|
+
let textual = false;
|
|
18593
|
+
let image = null;
|
|
18594
|
+
switch (l.kind) {
|
|
18595
|
+
case LayoutLayerKind.Photo: {
|
|
18596
|
+
const made = photoLayer(id, l, ctx, lc.path);
|
|
18597
|
+
outer = entering = made.frame;
|
|
18598
|
+
image = made.image;
|
|
18599
|
+
break;
|
|
18600
|
+
}
|
|
18601
|
+
case LayoutLayerKind.Gallery:
|
|
18602
|
+
outer = entering = galleryLayer(id, l, lc, ctx);
|
|
18603
|
+
break;
|
|
18604
|
+
case LayoutLayerKind.Button:
|
|
18605
|
+
outer = entering = buttonLayer(id, l, ctx);
|
|
18606
|
+
break;
|
|
18607
|
+
case LayoutLayerKind.List:
|
|
18608
|
+
outer = entering = listLayer(id, l, ctx);
|
|
18609
|
+
break;
|
|
18610
|
+
case LayoutLayerKind.Form:
|
|
18611
|
+
outer = entering = formLayer(id, l, ctx, lc.path);
|
|
18612
|
+
break;
|
|
18613
|
+
case LayoutLayerKind.Marquee:
|
|
18614
|
+
outer = entering = marqueeLayer(id, l);
|
|
18615
|
+
break;
|
|
18616
|
+
case LayoutLayerKind.Shape:
|
|
18617
|
+
outer = entering = shapeLayer(id, l);
|
|
18618
|
+
break;
|
|
18619
|
+
default:
|
|
18620
|
+
outer = entering = textLayer(id, l, lc, ctx);
|
|
18621
|
+
textual = true;
|
|
18622
|
+
}
|
|
18623
|
+
outer.label = `${lc.section.id} · ${l.kind}${l.role ? ` (${l.role})` : ''}`;
|
|
18624
|
+
place(outer, l, lc, ctx);
|
|
18625
|
+
// Held: the layer moves by tracks; a kinetic heading lights word by word as the section is read.
|
|
18626
|
+
const tracks = [];
|
|
18627
|
+
if (lc.held) {
|
|
18628
|
+
for (const t of l.motion ?? []) {
|
|
18629
|
+
const track = sceneTrackOf(t, l, lc.section.rows, ctx, lc.path);
|
|
18630
|
+
if (track)
|
|
18631
|
+
tracks.push(track);
|
|
18632
|
+
}
|
|
18633
|
+
if (l.kinetic && textual)
|
|
18634
|
+
tracks.push({ prop: 'words', keys: [[0, 0], [KINETIC_ALL_LIT, 100]] });
|
|
18635
|
+
if (tracks.length) {
|
|
18636
|
+
outer.sceneTracks = tracks;
|
|
18637
|
+
outer.scenePhoneTracks = restingTracks(tracks);
|
|
18638
|
+
gap(ctx, LayoutGapCode.PhoneRest, lc.path, 'stands at rest on a phone');
|
|
18639
|
+
}
|
|
18640
|
+
}
|
|
18641
|
+
else if (l.motion?.length) {
|
|
18642
|
+
gap(ctx, LayoutGapCode.UnheldMotion, lc.path, 'motion tracks on a section that is not held are dropped');
|
|
18643
|
+
}
|
|
18644
|
+
const interactions = [];
|
|
18645
|
+
if (!(lc.held && l.kinetic && textual)) {
|
|
18646
|
+
const enter = enterInteraction(entering.id, l, ctx, lc.path, textual);
|
|
18647
|
+
if (enter)
|
|
18648
|
+
entering.interactions = [...entering.interactions, enter];
|
|
18649
|
+
if (image && l.enter === LayoutEnter.ClipReveal && l.role !== LayoutRole.Decoration)
|
|
18650
|
+
image.interactions = [...image.interactions, zoomInteraction(image.id, l, ctx)];
|
|
18651
|
+
}
|
|
18652
|
+
const depth = l.depth;
|
|
18653
|
+
if (!lc.held && depth && depth !== LayoutDepth.Mid && !LAYOUT_OPERATED.has(l.kind)) {
|
|
18654
|
+
interactions.push(depthInteraction(outer.id, depth));
|
|
18655
|
+
gap(ctx, LayoutGapCode.DepthSpeed, lc.path, `${depth} glides at the product's one speed`);
|
|
18656
|
+
}
|
|
18657
|
+
if (interactions.length)
|
|
18658
|
+
outer.interactions = [...outer.interactions, ...interactions];
|
|
18659
|
+
return outer;
|
|
18660
|
+
}
|
|
18661
|
+
// ── Sections ────────────────────────────────────────────────────────────────────────────────────────────
|
|
18662
|
+
function transitionOf(s, prev, ctx, si) {
|
|
18663
|
+
const kind = s.transition ?? LayoutTransition.Cut;
|
|
18664
|
+
const ground = String(s.ground ?? LayoutColour.Ground);
|
|
18665
|
+
if (kind === LayoutTransition.Cut || !prev || ground.startsWith('photo:') || prev === ground)
|
|
18666
|
+
return [];
|
|
18667
|
+
const box = { position: 'absolute', top: ZERO, left: ZERO, width: FULL, height: 'min(100%, 100svh)', zIndex: '0', minHeight: ZERO };
|
|
18668
|
+
const under = create(`${ctx.p}-s${si}-under`, T.Container, {}, NO_ELEMENT_STYLE);
|
|
18669
|
+
setStyleProps(under, { ...box, backgroundColor: veilPaint(prev) });
|
|
18670
|
+
const veil = create(`${ctx.p}-s${si}-veil`, T.Container, {}, NO_ELEMENT_STYLE);
|
|
18671
|
+
setStyleProps(veil, { ...box, backgroundColor: veilPaint(ground) });
|
|
18672
|
+
for (const n of [under, veil]) {
|
|
18673
|
+
n.label = `${s.id} · ${kind}`;
|
|
18674
|
+
phone(n, { display: 'none' });
|
|
18675
|
+
}
|
|
18676
|
+
const from = {
|
|
18677
|
+
[LayoutTransition.Flood]: 'centre', [LayoutTransition.WipeUp]: LayoutSide.Bottom, [LayoutTransition.WipeDown]: LayoutSide.Top,
|
|
18678
|
+
[LayoutTransition.WipeStart]: LayoutSide.Start, [LayoutTransition.WipeEnd]: LayoutSide.End,
|
|
18679
|
+
};
|
|
18680
|
+
if (kind === LayoutTransition.Flood)
|
|
18681
|
+
gap(ctx, LayoutGapCode.Flood, `sections[${si}]`, 'the flood opens from the centre as an inset');
|
|
18682
|
+
veil.interactions = [{
|
|
18683
|
+
id: `${veil.id}-arrive`, trigger: 'scrollProgress', range: 'enter',
|
|
18684
|
+
actions: [{ type: 'clipReveal', target: 'self', duration: 1000, delay: 0, easing: 'linear', params: { from: from[kind] ?? LayoutSide.Bottom } }],
|
|
18685
|
+
}];
|
|
18686
|
+
return [under, veil];
|
|
18687
|
+
}
|
|
18688
|
+
function groundPhoto(s, si, ctx) {
|
|
18689
|
+
const ground = String(s.ground ?? '');
|
|
18690
|
+
if (!ground.startsWith('photo:'))
|
|
18691
|
+
return null;
|
|
18692
|
+
const id = ground.slice('photo:'.length);
|
|
18693
|
+
const image = create(`${ctx.p}-s${si}-ground`, T.Image, { src: ctx.photoSrc(id), alt: '' }, 'media');
|
|
18694
|
+
setStyleProps(image, {
|
|
18695
|
+
position: 'absolute', top: ZERO, left: ZERO, width: FULL, height: FULL, maxWidth: 'none', aspectRatio: 'auto', objectFit: 'cover', zIndex: '0', borderRadius: ZERO,
|
|
18696
|
+
});
|
|
18697
|
+
// On a phone the words span the picture's whole width, so they always sit on its detail: it is dimmed under them
|
|
18698
|
+
// (the section's words read light on a photo ground — its paint is ink).
|
|
18699
|
+
phone(image, { filterBrightness: PHONE_GROUND_BRIGHTNESS });
|
|
18700
|
+
image.label = `${s.id} · ground`;
|
|
18701
|
+
return image;
|
|
18702
|
+
}
|
|
18703
|
+
function composeSection(s, si, prevGround, ctx) {
|
|
18704
|
+
const id = `${ctx.p}-s${si}`;
|
|
18705
|
+
const held = !!s.pin;
|
|
18706
|
+
const track = Math.max(1, s.track ?? 1);
|
|
18707
|
+
const ground = String(s.ground ?? LayoutColour.Ground);
|
|
18708
|
+
ctx.sections[s.id] = id;
|
|
18709
|
+
if (track > 1 && !held)
|
|
18710
|
+
gap(ctx, LayoutGapCode.UnheldMotion, `sections[${si}]`, 'a sideways section that is not held cannot travel');
|
|
18711
|
+
const order = Array.isArray(s.phone) && s.phone.length ? s.phone : s.layers.map((_, i) => i);
|
|
18712
|
+
const textKinds = s.layers.filter(x => LAYOUT_TEXT_KINDS.has(x.kind) || x.kind === LayoutLayerKind.Button);
|
|
18713
|
+
const phoneAlign = textKinds.length && textKinds.every(x => x.align === 'center') ? 'center' : 'start';
|
|
18714
|
+
const layers = s.layers.map((l, li) => {
|
|
18715
|
+
const at = order.indexOf(li);
|
|
18716
|
+
const prevIdx = at > 0 ? order[at - 1] : -1;
|
|
18717
|
+
const visiblePrev = prevIdx >= 0 && s.layers[prevIdx]?.kind !== LayoutLayerKind.Shape ? s.layers[prevIdx] : null;
|
|
18718
|
+
const lc = {
|
|
18719
|
+
section: s, si, li, path: `sections[${si}].layers[${li}]`, held, track: held ? track : 1,
|
|
18720
|
+
order: at < 0 ? s.layers.length + li : at, phoneGap: phoneGapBefore(visiblePrev, l), phoneAlign,
|
|
18721
|
+
};
|
|
18722
|
+
return composeLayer(l, lc, ctx);
|
|
18723
|
+
});
|
|
18724
|
+
const root = create(id, T.Section, {}, NO_ELEMENT_STYLE);
|
|
18725
|
+
root.label = s.id;
|
|
18726
|
+
const paint = ground.startsWith('photo:') ? LAYOUT_COLOUR_TOKEN[LayoutColour.Ink] : groundPaint(ground);
|
|
18727
|
+
const base = {
|
|
18728
|
+
position: 'relative', width: FULL, minHeight: ZERO, height: `${s.screens * 100}svh`, backgroundColor: paint, color: 'var(--iox-text)', margin: ZERO,
|
|
18729
|
+
...(ctx.rtl ? { textDirection: 'rtl' } : {}),
|
|
18730
|
+
};
|
|
18731
|
+
const behind = [groundPhoto(s, si, ctx), ...transitionOf(s, prevGround, ctx, si)].filter((n) => !!n);
|
|
18732
|
+
if (!held) {
|
|
18733
|
+
setStyleProps(root, { ...base, ...gridLayout(s.rows, 1), overflow: 'clip' });
|
|
18734
|
+
phone(root, phoneStack(si === 0));
|
|
18735
|
+
root.children = [...behind, ...layers];
|
|
18736
|
+
return root;
|
|
18737
|
+
}
|
|
18738
|
+
// Held: a Scene — the section is how long it plays, its stage the screen that holds still (scene-core's recipe). On a
|
|
18739
|
+
// phone it stacks (M8-D5): the stage steps out of the layout (`contents`), because its size containment would give a
|
|
18740
|
+
// stage that flows no height at all, and its layers stand in the section's stack.
|
|
18741
|
+
root.role = SceneRole.Scene;
|
|
18742
|
+
setStyleProps(root, { ...base, display: 'block', padding: ZERO });
|
|
18743
|
+
const stage = create(`${id}-stage`, T.Container, {}, NO_ELEMENT_STYLE);
|
|
18744
|
+
stage.role = SceneRole.Stage;
|
|
18745
|
+
stage.label = `${s.id} · stage`;
|
|
18746
|
+
const stageBox = { position: 'sticky', top: ZERO, width: FULL, height: '100svh', minHeight: ZERO, overflow: 'hidden', zIndex: '1' };
|
|
18747
|
+
phone(stage, { display: 'contents' });
|
|
18748
|
+
if (track === 1) {
|
|
18749
|
+
setStyleProps(stage, { ...stageBox, ...gridLayout(s.rows, 1) });
|
|
18750
|
+
phone(root, phoneStack(si === 0));
|
|
18751
|
+
stage.children = layers;
|
|
18752
|
+
}
|
|
18753
|
+
else {
|
|
18754
|
+
setStyleProps(stage, { ...stageBox, display: 'block' });
|
|
18755
|
+
phone(root, { height: 'auto' });
|
|
18756
|
+
const wide = create(`${id}-track`, T.Container, {}, NO_ELEMENT_STYLE);
|
|
18757
|
+
wide.label = `${s.id} · ${track} screens wide`;
|
|
18758
|
+
setStyleProps(wide, { ...gridLayout(s.rows, track), width: `${track * 100}%`, height: FULL, minHeight: ZERO });
|
|
18759
|
+
phone(wide, { width: FULL, ...phoneStack(si === 0) });
|
|
18760
|
+
wide.sceneTracks = [{ prop: 'x', keys: [[0, 0], [1, -(track - 1) * 100]] }];
|
|
18761
|
+
wide.scenePhoneTracks = [{ prop: 'x', keys: [[0, 0]] }];
|
|
18762
|
+
gap(ctx, LayoutGapCode.TrackEase, `sections[${si}]`, 'the sideways travel eases (smoothstep), not linear');
|
|
18763
|
+
wide.children = layers;
|
|
18764
|
+
stage.children = [wide];
|
|
18765
|
+
}
|
|
18766
|
+
root.children = [...behind, stage];
|
|
18767
|
+
return root;
|
|
18768
|
+
}
|
|
18769
|
+
// ── The header ──────────────────────────────────────────────────────────────────────────────────────────
|
|
18770
|
+
const NAV_ROUTE = '/';
|
|
18771
|
+
/** The product's site header (composeNavHeader) with the layout's section links: each one scrolls to its section; in the
|
|
18772
|
+
* phone menu it closes the drawer first. */
|
|
18773
|
+
function composeHeader(ctx) {
|
|
18774
|
+
const links = ctx.site.nav?.links ?? [];
|
|
18775
|
+
if (!links.length)
|
|
18776
|
+
return null;
|
|
18777
|
+
const kind = ctx.site.nav?.kind ?? LayoutNavKind.Bar;
|
|
18778
|
+
if (kind !== LayoutNavKind.Bar)
|
|
18779
|
+
gap(ctx, LayoutGapCode.NavKind, 'nav', `a ${kind} menu is drawn as the product's bar`);
|
|
18780
|
+
gap(ctx, LayoutGapCode.SectionLink, 'nav', 'section links scroll by an action, with no #address');
|
|
18781
|
+
const pages = [{ name: ctx.site.name, route: NAV_ROUTE, isHome: true }, ...links.map(link => ({ name: link.label, route: `/${link.to}` }))];
|
|
18782
|
+
let n = 0;
|
|
18783
|
+
const { header } = composeNavHeader({ business: { name: ctx.site.name }, pages }, { id: `${ctx.p}-nav`, newId: suffix => `${ctx.p}-nav-${++n}-${suffix}` });
|
|
18784
|
+
if (ctx.rtl)
|
|
18785
|
+
setStyleProps(header, { textDirection: 'rtl' });
|
|
18786
|
+
let drawer;
|
|
18787
|
+
walkSerialized([header], node => { if (node.role === 'nav.drawer')
|
|
18788
|
+
drawer = node.id; });
|
|
18789
|
+
walkSerialized([header], (node, ancestors) => {
|
|
18790
|
+
if (node.type !== T.Link)
|
|
18791
|
+
return;
|
|
18792
|
+
const to = String(node.props['pageRoute'] ?? '').slice(1);
|
|
18793
|
+
if (!to || !links.some(l => l.to === to))
|
|
18794
|
+
return;
|
|
18795
|
+
node.props['linkType'] = 'external';
|
|
18796
|
+
node.props['url'] = `#${to}`;
|
|
18797
|
+
node.props['pageRoute'] = '';
|
|
18798
|
+
const inDrawer = ancestors.some(a => a.role === 'nav.drawer');
|
|
18799
|
+
ctx.links.push({ node, to, ...(inDrawer && drawer ? { closes: drawer } : {}) });
|
|
18800
|
+
});
|
|
18801
|
+
return header;
|
|
18802
|
+
}
|
|
18803
|
+
/** Every section link, now that each section's node id is known: a click scrolls to it. */
|
|
18804
|
+
function wireLinks(ctx) {
|
|
18805
|
+
for (const { node, to, closes } of ctx.links) {
|
|
18806
|
+
const target = ctx.sections[to];
|
|
18807
|
+
if (!target)
|
|
18808
|
+
throw new ComposeError(`${node.id}: links to a section "${to}" the layout does not have`);
|
|
18809
|
+
const actions = [];
|
|
18810
|
+
if (closes)
|
|
18811
|
+
actions.push({ type: 'closeDialog', target: closes, duration: 0, delay: 0, easing: 'ease' });
|
|
18812
|
+
actions.push({ type: 'scrollTo', target, duration: 0, delay: 0, easing: 'ease' });
|
|
18813
|
+
node.interactions = [...node.interactions, { id: `${node.id}-to`, trigger: 'click', actions }];
|
|
18814
|
+
}
|
|
18815
|
+
}
|
|
18816
|
+
/**
|
|
18817
|
+
* A layout-language page → its layout and header. Deterministic: the same layout composes to byte-identical nodes.
|
|
18818
|
+
* Refuses (ComposeError) a link to a section the layout does not have; everything the product cannot say comes back in
|
|
18819
|
+
* `gaps`.
|
|
18820
|
+
*/
|
|
18821
|
+
function composeLayout(site, options) {
|
|
18822
|
+
if (!site?.sections?.length)
|
|
18823
|
+
throw new ComposeError('a layout needs at least one section');
|
|
18824
|
+
const pace = LAYOUT_PACE[(site.motion?.pace ?? LayoutPace.Normal)] ?? LAYOUT_PACE[LayoutPace.Normal];
|
|
18825
|
+
const ctx = {
|
|
18826
|
+
p: options.id ?? 'cl',
|
|
18827
|
+
site,
|
|
18828
|
+
rtl: site.locale === 'he',
|
|
18829
|
+
mode: (options.mode ?? LayoutColourMode.Light),
|
|
18830
|
+
pace,
|
|
18831
|
+
ease: LAYOUT_EASING[(site.motion?.ease ?? LayoutEase.Out)] ?? LAYOUT_EASING[LayoutEase.Out],
|
|
18832
|
+
sections: {},
|
|
18833
|
+
gaps: [],
|
|
18834
|
+
photoSrc: options.photoSrc,
|
|
18835
|
+
photoAlt: options.photoAlt ?? (() => ''),
|
|
18836
|
+
photoAspect: id => LAYOUT_PHOTO_ASPECT[(options.photoShape?.(id) ?? LayoutPhotoShape.Landscape)] ?? LAYOUT_PHOTO_ASPECT[LayoutPhotoShape.Landscape],
|
|
18837
|
+
links: [],
|
|
18838
|
+
headingSeen: false,
|
|
18839
|
+
};
|
|
18840
|
+
let prev = null;
|
|
18841
|
+
const layout = site.sections.map((s, si) => {
|
|
18842
|
+
const node = composeSection(s, si, prev, ctx);
|
|
18843
|
+
const ground = String(s.ground ?? LayoutColour.Ground);
|
|
18844
|
+
prev = ground.startsWith('photo:') ? LayoutColour.Ink : ground;
|
|
18845
|
+
return node;
|
|
18846
|
+
});
|
|
18847
|
+
const header = composeHeader(ctx);
|
|
18848
|
+
if (ctx.links.some(l => !l.closes) && !site.nav?.links?.length)
|
|
18849
|
+
gap(ctx, LayoutGapCode.SectionLink, 'buttons', 'a button to a section scrolls by an action');
|
|
18850
|
+
wireLinks(ctx);
|
|
18851
|
+
return { layout, header, sections: ctx.sections, gaps: ctx.gaps };
|
|
18852
|
+
}
|
|
18853
|
+
|
|
17827
18854
|
/**
|
|
17828
18855
|
* @vectoriox/iox-ui/generation-core — the shared, FRAMEWORK-FREE site-plan core (design-system plan
|
|
17829
18856
|
* §6b, W1): the Site Plan shape + its validator, the pattern library, the page types and the three structures (Studio ·
|
|
@@ -17840,5 +18867,5 @@ function luminanceOf(colour) {
|
|
|
17840
18867
|
* Generated bundle index. Do not edit.
|
|
17841
18868
|
*/
|
|
17842
18869
|
|
|
17843
|
-
export { ACTIVE_BUILD_STATUSES, 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, MAX_SITE_PICTURES, NAV_PART_LABELS, NAV_SHAPE_COPY, NEUTRAL_STYLE_PROPS, NODE_BASELINES, NO_TOKENS, NavPagesSource, NavRole, NavShape, NavShapeError, PAGE_ARCHETYPES, 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, PUBLISH_BLOCKING_PLACEHOLDERS, PageDataKind, PathIssueCollector, PatternDirective, PatternGlobalPosition, PatternOpens, PatternPlaceholder, PatternRecipe, PhoneMenuBreakpoint, PictureRefusal, PictureWorld, PlaceholderKind, PlanChangeAction, PlanChangeKind, PlanDataSourceMode, PlanDataSourceType, PlanEditIssueCode, PlanEditOp, PlanEditsOutcome, PlanPart, PlanWireEntry, PlanWireShapeError, PlanWordIssueCode, PreflightRefusalCode, PublishRefusalCode, REQUIRED_CONTENT_ROLES, RelativeOp, SAMPLE_IMAGE_REF, SCENE_LEVEL, SCENE_OTHER_PAGES, SCRIM_BACKGROUND, SCRIM_COVER, SCRIM_LEVELS, SHOWCASE_FILM, 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_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, STRICT_SCHEMA_BUDGET, STRICT_SCHEMA_LIMITS, STUDIO_TEMPLATE, ScrimLevel, 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, aiStepParts, applyOwnPhotoGalleries, applyPictureScrims, applyPlanEdits, applyStockItemPhotos, applyStockPhotos, archetypeIssues, areaLuminance, artDirectionFor, artDirectionIssues, artDirectionPreamble, aspectRatioOf, assertStyleSlots, assertValidSitePlan, auditSite, barIconForRoute, blocksPublish, brandHueWord, buildKeys, buildStepFacts, builtHomePageId, chooseScrim, composeNavHeader, composeSection, composeSite, contentTypePreviewFields, contentTypeToWire, copyLengthOf, costUsd, createSerializedNode, creditsOfUsd, dataSourceToWire, derivedDataSources, describePlanData, describeShapeKey, emptyAreaPhrase, entranceAction, entranceInteraction, estimatePictures, estimateStepCredits, expandPlanWire, expandWireContentType, expandWireDataSource, expandWireEdit, expandWireField, expandWirePage, expandWireSection, failedBuildStep, fieldToWire, filmOfPlan, filmPlacement, findNavRoot, frameWords, isActiveBuild, isNonEmptyString, isPictureWorld, isPlainObject, isRtlLocale, jsonAnyOf, jsonBoolean, jsonClosedObject, jsonInteger, jsonListOf, jsonOneOf, jsonSchemaKeywords, jsonSchemaObjects, jsonShapedObject, jsonText, luminanceOf, modelCanDo, moveBarItem, navPages, navShapeBreakpoint, navShapeOf, nextSourceOf, nodeBindPaths, orientationOfRatio, pageToWire, parsePatternPath, parseSampleImageRef, pathAt, patternById, patternHasForm, patternLinkSlots, patternListGap, patternManifest, patternNeedsBinding, patternNodes, patternOptionalParts, patternRoleNeeds, patternScopes, patternSlotBudgets, patternSlots, patternTakesBinding, phoneMenuPages, pictureAspect, picturePrompt, pictureRefusalOf, pictureRerolls, pictureReviewIssues, pictureReviewJsonSchema, pictureReviewPasses, pictureSlotKey, pictureTargets, pictureTryFits, placeFilm, planEditOps, planEditToWire, planEditWireGaps, planEditWireKeys, planEditWireOps, planEditWireShape, planEditsFromWire, planEditsJsonSchema, planEditsToWire, planEntrances, planFromTemplate, planNavShape, planOwnPhotos, planPartOfPath, planPartToWire, planPictures, planStockPhotos, planToWire, planWireGaps, planWirePartJsonSchema, planWirePartShape, planWordIssues, publishRefusal, publishVerdict, recipeListBinds, releasedLayoutDefaults, removeBarItem, requiredAcknowledgements, requiredShapeKeys, roleField, routeMatches, routeParams, sampleImageRef, scoreStockPhoto, sectionEntrances, sectionPatternIds, sectionToWire, setStyleProps, shapeKeys, showcaseGlobals, showcasePages, showcasePlans, showcaseScenes, siteNavPages, slotBudget, stockCopyKey, stockCreditLine, stockCreditLines, stockCreditNode, stockCreditNodeId, stockFits, stockGroupOf, stockItemSlots, stockKept, stockPhotoRatio, stockPhotoSubject, stockPhotoUsable, stockPhotoWords, stockSlots, stockWord, stockWords, strictSchemaComplexity, strictSchemaRefusal, typicalStepTokens, validatePlanEdits, validateSitePlan, walkSerialized, wireContentTypeJsonSchema, wireDataSourceJsonSchema, wireFieldJsonSchema, wirePageJsonSchema, wireSectionJsonSchema, withDerivedSources, wordPattern, wordsOverPicture, writtenTexts };
|
|
18870
|
+
export { ACTIVE_BUILD_STATUSES, 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_COLOUR_TOKEN, LAYOUT_COLUMN_GAP, LAYOUT_DEPTH_ON_PHONE, LAYOUT_EASING, LAYOUT_FONT_SIZE, LAYOUT_GUTTER, LAYOUT_OPERATED, LAYOUT_PACE, LAYOUT_PHONE_BREAKPOINT, LAYOUT_PHONE_PADDING, LAYOUT_PHOTO_ASPECT, LAYOUT_RISE, LAYOUT_TEXT_KINDS, LAYOUT_TOOLTIP_TRAIT, LayoutAlign, LayoutBleed, LayoutButtonVariant, LayoutColour, LayoutColourMode, LayoutDepth, LayoutEase, LayoutEnter, LayoutGalleryEffect, LayoutGapCode, LayoutLayerKind, LayoutNavKind, LayoutPace, LayoutPhotoShape, LayoutRole, LayoutSectionKind, LayoutSide, LayoutSize, LayoutTrackProp, LayoutTransition, MAX_SITE_PICTURES, NAV_PART_LABELS, NAV_SHAPE_COPY, NEUTRAL_STYLE_PROPS, NODE_BASELINES, NO_TOKENS, NavPagesSource, NavRole, NavShape, NavShapeError, PAGE_ARCHETYPES, 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, PUBLISH_BLOCKING_PLACEHOLDERS, PageDataKind, PathIssueCollector, PatternDirective, PatternGlobalPosition, PatternOpens, PatternPlaceholder, PatternRecipe, PhoneMenuBreakpoint, PictureRefusal, PictureWorld, PlaceholderKind, PlanChangeAction, PlanChangeKind, PlanDataSourceMode, PlanDataSourceType, PlanEditIssueCode, PlanEditOp, PlanEditsOutcome, PlanPart, PlanWireEntry, PlanWireShapeError, PlanWordIssueCode, PreflightRefusalCode, PublishRefusalCode, REQUIRED_CONTENT_ROLES, RelativeOp, SAMPLE_IMAGE_REF, SCENE_LEVEL, SCENE_OTHER_PAGES, SCRIM_BACKGROUND, SCRIM_COVER, SCRIM_LEVELS, SHOWCASE_FILM, 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_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, STRICT_SCHEMA_BUDGET, STRICT_SCHEMA_LIMITS, STUDIO_TEMPLATE, ScrimLevel, 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, aiStepParts, applyOwnPhotoGalleries, applyPictureScrims, applyPlanEdits, applyStockItemPhotos, applyStockPhotos, archetypeIssues, areaLuminance, artDirectionFor, artDirectionIssues, artDirectionPreamble, aspectRatioOf, assertStyleSlots, assertValidSitePlan, auditSite, barIconForRoute, blocksPublish, brandHueWord, buildKeys, buildStepFacts, builtHomePageId, chooseScrim, composeLayout, composeNavHeader, composePresetForm, composeSection$1 as composeSection, composeSite, contentTypePreviewFields, contentTypeToWire, copyLengthOf, costUsd, createSerializedNode, creditsOfUsd, dataSourceToWire, derivedDataSources, describePlanData, describeShapeKey, emptyAreaPhrase, entranceAction, entranceInteraction, estimatePictures, estimateStepCredits, expandPlanWire, expandWireContentType, expandWireDataSource, expandWireEdit, expandWireField, expandWirePage, expandWireSection, failedBuildStep, fieldToWire, filmOfPlan, filmPlacement, findNavRoot, frameWords, isActiveBuild, isNonEmptyString, isPictureWorld, isPlainObject, isRtlLocale, jsonAnyOf, jsonBoolean, jsonClosedObject, jsonInteger, jsonListOf, jsonOneOf, jsonSchemaKeywords, jsonSchemaObjects, jsonShapedObject, jsonText, luminanceOf, modelCanDo, moveBarItem, navPages, navShapeBreakpoint, navShapeOf, nextSourceOf, nodeBindPaths, orientationOfRatio, pageToWire, parsePatternPath, parseSampleImageRef, pathAt, patternById, patternHasForm, patternLinkSlots, patternListGap, patternManifest, patternNeedsBinding, patternNodes, patternOptionalParts, patternRoleNeeds, patternScopes, patternSlotBudgets, patternSlots, patternTakesBinding, phoneGapBefore, phoneMenuPages, pictureAspect, picturePrompt, pictureRefusalOf, pictureRerolls, pictureReviewIssues, pictureReviewJsonSchema, pictureReviewPasses, pictureSlotKey, pictureTargets, pictureTryFits, placeFilm, planEditOps, planEditToWire, planEditWireGaps, planEditWireKeys, planEditWireOps, planEditWireShape, planEditsFromWire, planEditsJsonSchema, planEditsToWire, planEntrances, planFromTemplate, planNavShape, planOwnPhotos, planPartOfPath, planPartToWire, planPictures, planStockPhotos, planToWire, planWireGaps, planWirePartJsonSchema, planWirePartShape, planWordIssues, publishRefusal, publishVerdict, recipeListBinds, releasedLayoutDefaults, removeBarItem, requiredAcknowledgements, requiredShapeKeys, roleField, routeMatches, routeParams, sampleImageRef, scoreStockPhoto, screenFontSize, sectionEntrances, sectionPatternIds, sectionToWire, setStyleProps, shapeKeys, showcaseGlobals, showcasePages, showcasePlans, showcaseScenes, siteNavPages, slotBudget, stockCopyKey, stockCreditLine, stockCreditLines, stockCreditNode, stockCreditNodeId, stockFits, stockGroupOf, stockItemSlots, stockKept, stockPhotoRatio, stockPhotoSubject, stockPhotoUsable, stockPhotoWords, stockSlots, stockWord, stockWords, strictSchemaComplexity, strictSchemaRefusal, typicalStepTokens, validatePlanEdits, validateSitePlan, walkSerialized, wireContentTypeJsonSchema, wireDataSourceJsonSchema, wireFieldJsonSchema, wirePageJsonSchema, wireSectionJsonSchema, withDerivedSources, wordPattern, wordsOverPicture, writtenTexts };
|
|
17844
18871
|
//# sourceMappingURL=vectoriox-iox-ui-generation-core.mjs.map
|