@vectoriox/iox-ui 5.177.0 → 5.179.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-generation-core.mjs +919 -858
- package/fesm2022/vectoriox-iox-ui-generation-core.mjs.map +1 -1
- package/generation-core/index.d.ts +56 -20
- package/package.json +1 -1
- package/src/generation-core/import-plan.ts +25 -1
- package/src/generation-core/opening-mix.ts +16 -5
- package/src/generation-core/patterns.ts +12 -0
- package/src/generation-core/site-build-run.ts +22 -3
- package/src/generation-core/site-spec.generated.ts +3 -0
- package/src/generation-core/type-led.ts +111 -101
|
@@ -1944,6 +1944,7 @@ const SPEC_SITE_PATTERNS = {
|
|
|
1944
1944
|
"lay": {
|
|
1945
1945
|
"textAlign": "center"
|
|
1946
1946
|
},
|
|
1947
|
+
"optional": "eyebrow",
|
|
1947
1948
|
"textHe": "מה אתם עושים · איפה"
|
|
1948
1949
|
},
|
|
1949
1950
|
{
|
|
@@ -1995,6 +1996,7 @@ const SPEC_SITE_PATTERNS = {
|
|
|
1995
1996
|
"slot": "secondary",
|
|
1996
1997
|
"max": 24,
|
|
1997
1998
|
"text": "See our work",
|
|
1999
|
+
"optional": "secondary",
|
|
1998
2000
|
"textHe": "לעבודות שלנו"
|
|
1999
2001
|
}
|
|
2000
2002
|
]
|
|
@@ -3659,6 +3661,7 @@ const SPEC_SITE_PATTERNS = {
|
|
|
3659
3661
|
"ph": "copy",
|
|
3660
3662
|
"text": "Our story",
|
|
3661
3663
|
"enter": "heading",
|
|
3664
|
+
"optional": "eyebrow",
|
|
3662
3665
|
"textHe": "הסיפור שלנו"
|
|
3663
3666
|
},
|
|
3664
3667
|
{
|
|
@@ -17929,6 +17932,19 @@ function patternSlots(pattern) {
|
|
|
17929
17932
|
function patternOptionalParts(pattern) {
|
|
17930
17933
|
return [...new Set(patternNodes(pattern).map(n => n.optional).filter((s) => !!s))];
|
|
17931
17934
|
}
|
|
17935
|
+
/** Each optional part's slots — every slot the part holds, its own and its children's (a part inside a part is counted in
|
|
17936
|
+
* both). A part with no slot (a picture, a bound line) maps to `[]`. */
|
|
17937
|
+
function patternPartSlots(pattern) {
|
|
17938
|
+
const out = {};
|
|
17939
|
+
walk(pattern.node, n => {
|
|
17940
|
+
if (!n.optional)
|
|
17941
|
+
return;
|
|
17942
|
+
const slots = out[n.optional] ?? (out[n.optional] = []);
|
|
17943
|
+
walk(n, d => { if (d.slot && !slots.includes(d.slot))
|
|
17944
|
+
slots.push(d.slot); });
|
|
17945
|
+
});
|
|
17946
|
+
return out;
|
|
17947
|
+
}
|
|
17932
17948
|
/** True when the pattern has a Repeater iterating the section's `binding`. */
|
|
17933
17949
|
function patternNeedsBinding(pattern) {
|
|
17934
17950
|
return patternNodes(pattern).some(n => n.src === PatternDirective.Binding);
|
|
@@ -19073,7 +19089,7 @@ function phoneGapBefore(prev, next) {
|
|
|
19073
19089
|
* columns (`LAYOUT_COLUMN_GAP`), and 12 columns. */
|
|
19074
19090
|
const GRID_VW = 92;
|
|
19075
19091
|
const COLUMN_GAP_VW = 1.2;
|
|
19076
|
-
const GRID_COLUMNS$
|
|
19092
|
+
const GRID_COLUMNS$1 = 12;
|
|
19077
19093
|
/** A `screen` word's smallest and largest size (px), and the share of its room it fills (the renderer's margin). */
|
|
19078
19094
|
const LAYOUT_SCREEN_PX = [36, 560];
|
|
19079
19095
|
const SCREEN_FILL = 0.98;
|
|
@@ -19081,7 +19097,7 @@ const round2 = (n) => Math.round(n * 100) / 100;
|
|
|
19081
19097
|
const round4 = (n) => Math.round(n * 10000) / 10000;
|
|
19082
19098
|
/** How wide `cols` columns of the laptop grid stand, in vw (12 columns: 92vw). */
|
|
19083
19099
|
function layoutColumnsVw(cols) {
|
|
19084
|
-
const column = (GRID_VW - (GRID_COLUMNS$
|
|
19100
|
+
const column = (GRID_VW - (GRID_COLUMNS$1 - 1) * COLUMN_GAP_VW) / GRID_COLUMNS$1;
|
|
19085
19101
|
return cols * column + Math.max(0, cols - 1) * COLUMN_GAP_VW;
|
|
19086
19102
|
}
|
|
19087
19103
|
const LEGACY_GUTTER_PX = 16;
|
|
@@ -19099,7 +19115,7 @@ function layoutRoomPx(cols, width, phone, page = {}) {
|
|
|
19099
19115
|
return vw;
|
|
19100
19116
|
const gap = (COLUMN_GAP_VW / 100) * width;
|
|
19101
19117
|
const grid = Math.min(width - 2 * Math.max(0.04 * width, gutter), page.columnPx);
|
|
19102
|
-
return Math.min(vw, (cols * (grid - (GRID_COLUMNS$
|
|
19118
|
+
return Math.min(vw, (cols * (grid - (GRID_COLUMNS$1 - 1) * gap)) / GRID_COLUMNS$1 + Math.max(0, cols - 1) * gap);
|
|
19103
19119
|
}
|
|
19104
19120
|
/** A `screen` word's width term at a column `columnPx` wide: the px its `cols` columns stand where the column binds
|
|
19105
19121
|
* (12 columns of the column, 11 gaps of 1.2vw), at `fill / em` — `A px − B vw`. */
|
|
@@ -19107,8 +19123,8 @@ function layoutRoomPx(cols, width, phone, page = {}) {
|
|
|
19107
19123
|
* read — re-declared by the page's word, iox-ui#117), the stamped column (`fallback`) where a studio's rows lack it. */
|
|
19108
19124
|
function columnCapCss(cols, widthEm, fallback) {
|
|
19109
19125
|
const k = SCREEN_FILL / Math.max(widthEm, 0.01);
|
|
19110
|
-
const share = round4((cols / GRID_COLUMNS$
|
|
19111
|
-
const vw = round2(COLUMN_GAP_VW * (1 - cols / GRID_COLUMNS$
|
|
19126
|
+
const share = round4((cols / GRID_COLUMNS$1) * k);
|
|
19127
|
+
const vw = round2(COLUMN_GAP_VW * (1 - cols / GRID_COLUMNS$1) * k);
|
|
19112
19128
|
const cap = `var(--iox-content-cap, ${fallback})`;
|
|
19113
19129
|
return vw > 0 ? `calc(${cap} * ${share} - ${vw}vw)` : `calc(${cap} * ${share})`;
|
|
19114
19130
|
}
|
|
@@ -19129,7 +19145,7 @@ function screenFontSize(widthEm, cols, rows, sectionRows, screens, columnPx = nu
|
|
|
19129
19145
|
// in wide, so a page set narrower than the site never sees it run past its column.
|
|
19130
19146
|
// CW2: a word across all twelve columns also keeps inside the one gutter (`space-gutter` is a px token, so font-size
|
|
19131
19147
|
// may read it): on a phone and wherever the gutter is wider than 4% of the window, 92vw is more than the room.
|
|
19132
|
-
const room = cols >= GRID_COLUMNS$
|
|
19148
|
+
const room = cols >= GRID_COLUMNS$1 ? [`calc((100vw - 2 * var(--iox-space-gutter, ${LEGACY_GUTTER_PX}px)) * ${round4(SCREEN_FILL / Math.max(widthEm, 0.01))})`] : [];
|
|
19133
19149
|
const capFallback = columnPx ? `${columnPx}px` : capAlways ? WIDE_CAP : null;
|
|
19134
19150
|
const width = [`${widthVw}vw`, ...(capFallback ? [columnCapCss(cols, widthEm, capFallback)] : []), ...room];
|
|
19135
19151
|
if (!rows || !sectionRows)
|
|
@@ -21035,7 +21051,7 @@ function layoutJudgeColumnPx(word, density, width) {
|
|
|
21035
21051
|
|
|
21036
21052
|
/** The scroll is replayed in steps this long (px). */
|
|
21037
21053
|
const STEP_PX = 4;
|
|
21038
|
-
const cellsMeet$
|
|
21054
|
+
const cellsMeet$2 = (p, q) => !!p && !!q && p[0] < q[1] && q[0] < p[1];
|
|
21039
21055
|
const cellArea = (a, b) => {
|
|
21040
21056
|
const w = Math.min(a.col[1], b.col[1]) - Math.max(a.col[0], b.col[0]);
|
|
21041
21057
|
const h = Math.min(a.row[1], b.row[1]) - Math.max(a.row[0], b.row[0]);
|
|
@@ -21052,7 +21068,7 @@ const ownDirection = (section, o) => section.pin || LAYOUT_OPERATED.has(o.kind)
|
|
|
21052
21068
|
function layoutCounterDepth(section, layer) {
|
|
21053
21069
|
let best = null;
|
|
21054
21070
|
for (const o of section.layers ?? []) {
|
|
21055
|
-
if (o === layer || !cellsMeet$
|
|
21071
|
+
if (o === layer || !cellsMeet$2(o.col, layer.col) || !cellsMeet$2(o.row, layer.row))
|
|
21056
21072
|
continue;
|
|
21057
21073
|
const dir = ownDirection(section, o);
|
|
21058
21074
|
if (!dir)
|
|
@@ -23029,7 +23045,7 @@ const NUMBER_GIVEN = /\d[\d:.,]{2,}|[$₪€£]\s?\d+/g;
|
|
|
23029
23045
|
const CHIP_NUMBER = /\d{2,}|[$₪€£]/;
|
|
23030
23046
|
const BRACKET = /\[([^\]\n]{1,40})\]/g;
|
|
23031
23047
|
const FACT_TOKEN$1 = /\{fact:([^}]*)\}/g;
|
|
23032
|
-
const PHOTO_GROUND = 'photo:';
|
|
23048
|
+
const PHOTO_GROUND$1 = 'photo:';
|
|
23033
23049
|
/** An accent ground counts as this many accent uses (a band of colour weighs more than a word). */
|
|
23034
23050
|
const ACCENT_GROUND_USES = 2;
|
|
23035
23051
|
/** The entrance type that only fades (`entrances` levels): it does not count as a section entering. */
|
|
@@ -23042,7 +23058,7 @@ const overlaps = (a, b) => {
|
|
|
23042
23058
|
return ov(a.col ?? [0, 0], b.col ?? [0, 0]) && ov(a.row ?? [0, 0], b.row ?? [0, 0]);
|
|
23043
23059
|
};
|
|
23044
23060
|
const trackOf = (s) => s.track ?? 1;
|
|
23045
|
-
const groundPhotoOf = (s) => (String(s.ground ?? '').startsWith(PHOTO_GROUND) ? String(s.ground).slice(PHOTO_GROUND.length) : null);
|
|
23061
|
+
const groundPhotoOf = (s) => (String(s.ground ?? '').startsWith(PHOTO_GROUND$1) ? String(s.ground).slice(PHOTO_GROUND$1.length) : null);
|
|
23046
23062
|
const isText = (l) => LAYOUT_TEXT_KINDS.has(l.kind);
|
|
23047
23063
|
/** A line of words — what a text reveal splits (the composer's `textual`): every text kind but a list. */
|
|
23048
23064
|
const isLine = (l) => isText(l) && l.kind !== LayoutLayerKind.List;
|
|
@@ -26831,10 +26847,17 @@ function openingPhoneInset() {
|
|
|
26831
26847
|
return `clamp(${lo}px, 3vw, ${hi}px)`;
|
|
26832
26848
|
}
|
|
26833
26849
|
const insetClip = (inset) => `inset(${inset} round var(--iox-card-radius))`;
|
|
26834
|
-
/** A display size that keeps `em` of text within the width (`side` px kept per side), never above `cap`. */
|
|
26835
26850
|
/** The frame's padding on a phone: an inset frame adds its inset. */
|
|
26836
26851
|
const phoneFramePad = (mix) => (mix.frame === OpeningFrame.Inset || mix.frame === OpeningFrame.Shrinks ? `calc(${openingPhoneInset()} + 20px)` : FRAME_PAD);
|
|
26837
|
-
|
|
26852
|
+
/** A display size that keeps `em` of text within the width (`side` kept per side — px, or a CSS length), never above `cap`. */
|
|
26853
|
+
const sizedPx = (em, side, cap) => `min(calc((100vw - ${typeof side === 'number' ? `${2 * side}px` : `2 * ${side}`}) * ${FIT} / ${Math.max(em, 1).toFixed(3)}), ${cap})`;
|
|
26854
|
+
/**
|
|
26855
|
+
* The name standing on the bottom edge (`words:on-edge`): ONE display line on a laptop AND on a phone (iox-ui#150) — a
|
|
26856
|
+
* phone sizes it by the whole name across the room beside it (`phoneSide`), never by its longest word: sized by a word,
|
|
26857
|
+
* a long name wrapped to four lines at 80 px, its lines touching, and pushed the page a screen down. A phone's line
|
|
26858
|
+
* height leaves room should a face still break it.
|
|
26859
|
+
*/
|
|
26860
|
+
const edgeTitle = (line, phoneSide) => title({ fontSize: sizedPx(line, LAPTOP_SIDE_PX, '50svh'), lineHeight: '0.82', margin: '0px', translateY: '0.16em' }, { resp: { mobile: { fontSize: sizedPx(line, phoneSide, '22vw'), lineHeight: '0.9' } } });
|
|
26838
26861
|
function frameNode(mix, children) {
|
|
26839
26862
|
const inset = mix.frame === OpeningFrame.Inset || mix.frame === OpeningFrame.Shrinks;
|
|
26840
26863
|
const height = mix.media === OpeningMedia.None ? typeLedHeights(mix) : { laptop: OPENING_HEIGHT };
|
|
@@ -26971,7 +26994,8 @@ function typeLedWordsNodes(mix, ctx) {
|
|
|
26971
26994
|
t: 'Container', es: 'box', role: OpeningRole.Words,
|
|
26972
26995
|
lay: { position: 'absolute', left: '0px', bottom: '0px', width: '100%', zIndex: '1', padding: `0px ${LAPTOP_SIDE_PX}px`, overflow: 'visible' },
|
|
26973
26996
|
resp: { mobile: { position: 'relative', left: 'auto', bottom: 'auto', padding: '0px', margin: `auto 0px calc(-1 * ${phoneFramePad(mix)}) 0px` } },
|
|
26974
|
-
|
|
26997
|
+
// The words sit inside the frame's own padding on a phone: the line is sized across what it leaves.
|
|
26998
|
+
c: [edgeTitle(line, `max(${phoneFramePad(mix)}, ${LAYOUT_INSET})`)],
|
|
26975
26999
|
}];
|
|
26976
27000
|
case OpeningWords.Wordmark:
|
|
26977
27001
|
case OpeningWords.Behind:
|
|
@@ -27010,7 +27034,7 @@ function wordsNodes(mix, ctx) {
|
|
|
27010
27034
|
t: 'Container', es: 'box', role: OpeningRole.Words,
|
|
27011
27035
|
lay: { position: 'absolute', left: '0px', bottom: '0px', width: '100%', zIndex: '1', padding: `0px ${LAPTOP_SIDE_PX}px`, overflow: 'visible' },
|
|
27012
27036
|
resp: { mobile: { padding: `0px ${PHONE_SIDE_PX}px` } },
|
|
27013
|
-
c: [
|
|
27037
|
+
c: [edgeTitle(line, PHONE_SIDE_PX)],
|
|
27014
27038
|
}];
|
|
27015
27039
|
case OpeningWords.Wordmark:
|
|
27016
27040
|
case OpeningWords.Behind:
|
|
@@ -29895,220 +29919,6 @@ const PROOF_FINGERPRINTS = [
|
|
|
29895
29919
|
},
|
|
29896
29920
|
];
|
|
29897
29921
|
|
|
29898
|
-
/**
|
|
29899
|
-
* The words that carry no subject in the languages a site is written in (English, Hebrew): "the", "with", "our", "כמו",
|
|
29900
|
-
* "שלנו"… Shared by every comparison of meaning by words — a stock photo against a slot (`stockWords`), a model's section
|
|
29901
|
-
* against a ready-made one (silent section fallback). Lower case; only words of three letters or more (shorter ones never
|
|
29902
|
-
* count anywhere).
|
|
29903
|
-
*/
|
|
29904
|
-
const FUNCTION_WORDS = new Set([
|
|
29905
|
-
'the', 'and', 'with', 'for', 'your', 'our', 'you', 'from', 'into', 'this', 'that', 'here', 'there', 'about', 'how', 'what',
|
|
29906
|
-
'who', 'are', 'all', 'but', 'not', 'was', 'were', 'has', 'have', 'had', 'its', 'they', 'them', 'their', 'then', 'than',
|
|
29907
|
-
'when', 'where', 'which', 'will', 'can', 'just', 'out', 'over', 'under', 'onto', 'each', 'every', 'some', 'any', 'one', 'also',
|
|
29908
|
-
'too', 'very', 'more', 'most', 'less', 'only', 'own', 'yours', 'ours', 'these', 'those',
|
|
29909
|
-
'אנחנו', 'אני', 'הוא', 'היא', 'אתם', 'אתן', 'שלנו', 'שלכם', 'שלך', 'שלו', 'שלה', 'אצלנו', 'כמו', 'אבל', 'זאת', 'כאן', 'יותר',
|
|
29910
|
-
'מאוד', 'כבר', 'עוד', 'אחרי', 'לפני', 'בין', 'כדי', 'איך',
|
|
29911
|
-
]);
|
|
29912
|
-
|
|
29913
|
-
/**
|
|
29914
|
-
* SILENT SECTION FALLBACK (Doron, 2026-11-09: "for now we need to do silent section fallback and not fallback whole page").
|
|
29915
|
-
* A composed page that still fails after the mends and its one repair — or after the browser's check — no longer falls
|
|
29916
|
-
* back whole: each section an issue names is given to the plan's READY-MADE section for the same place (the pattern the
|
|
29917
|
-
* whole-page fallback would have stamped there, worn in the same look), or dropped where none fits and the page keeps its
|
|
29918
|
-
* opening and its close. Then the page is judged again, once, exactly like any composed page — its MINIMUMS on the model's
|
|
29919
|
-
* own remaining sections (the given-away ones ride on `page.givenAway`; iox-ui#67, Doron 2026-11-09), its maximums on the
|
|
29920
|
-
* whole page. A ready-made section that would say again what a section the model kept already says (its title, its text —
|
|
29921
|
-
* iox-ui#68) is never given a place: a page that repeats a paragraph is worse than the last resort. Only a page that still
|
|
29922
|
-
* fails — an issue that names no section, a place with nothing to give it, a swap that
|
|
29923
|
-
* breaks a section kept or a maximum of the page — falls back whole: the last resort, counted. A swap never leads to another swap. The owner sees a composed page; the swaps are recorded for us, the model's sections kept.
|
|
29924
|
-
* Pure: the service and `ai:replay` run this one function.
|
|
29925
|
-
*/
|
|
29926
|
-
/** What became of one place of the model's page. */
|
|
29927
|
-
var SectionSwapAction;
|
|
29928
|
-
(function (SectionSwapAction) {
|
|
29929
|
-
/** The plan's ready-made section stands there. */
|
|
29930
|
-
SectionSwapAction["Replaced"] = "replaced";
|
|
29931
|
-
/** Nothing fitted the place: the page goes on without it. */
|
|
29932
|
-
SectionSwapAction["Dropped"] = "dropped";
|
|
29933
|
-
})(SectionSwapAction || (SectionSwapAction = {}));
|
|
29934
|
-
/** Why a place was given away (and which ready-made section took it). */
|
|
29935
|
-
var SectionSwapRule;
|
|
29936
|
-
(function (SectionSwapRule) {
|
|
29937
|
-
/** The page's first section: always the plan's opening, never dropped. */
|
|
29938
|
-
SectionSwapRule["Opening"] = "opening";
|
|
29939
|
-
/** The page's last section: always the plan's close, never dropped. */
|
|
29940
|
-
SectionSwapRule["Close"] = "close";
|
|
29941
|
-
/** A middle section: the ready-made section that shows the same list, holds the form, or says most of its words. */
|
|
29942
|
-
SectionSwapRule["Fit"] = "fit";
|
|
29943
|
-
/** A middle section no ready-made section fits (or every one that does would repeat a kept section, iox-ui#68): dropped. */
|
|
29944
|
-
SectionSwapRule["NoFit"] = "no-fit";
|
|
29945
|
-
/**
|
|
29946
|
-
* A middle section no ready-made section fits by its words, given the plan's unused middle section nearest its place
|
|
29947
|
-
* — only when the caller keeps every place (`SectionFallbackOptions.keepPlace`: a free page, iox-ui#134).
|
|
29948
|
-
*/
|
|
29949
|
-
SectionSwapRule["Place"] = "place";
|
|
29950
|
-
})(SectionSwapRule || (SectionSwapRule = {}));
|
|
29951
|
-
/** Why a page fell back whole after all (the last resort). */
|
|
29952
|
-
var SectionFallbackLastResort;
|
|
29953
|
-
(function (SectionFallbackLastResort) {
|
|
29954
|
-
/** Nothing left names a section (a count, a share, the order of sections), or after the swaps only such an issue is. */
|
|
29955
|
-
SectionFallbackLastResort["PageWide"] = "page-wide";
|
|
29956
|
-
/** The place named is the opening or the close, and the plan has no ready-made section left for it — or only one that
|
|
29957
|
-
* would repeat what a kept section says (iox-ui#68). */
|
|
29958
|
-
SectionFallbackLastResort["NoReadyMade"] = "no-ready-made";
|
|
29959
|
-
/** It names a section already given to a ready-made one. */
|
|
29960
|
-
SectionFallbackLastResort["ReadyMadeNamed"] = "ready-made-named";
|
|
29961
|
-
/** After the swaps, the check names a section the model composed and kept (a neighbour the swap broke). */
|
|
29962
|
-
SectionFallbackLastResort["Neighbour"] = "neighbour";
|
|
29963
|
-
})(SectionFallbackLastResort || (SectionFallbackLastResort = {}));
|
|
29964
|
-
const NAMED = /sections\[(\d+)\]/g;
|
|
29965
|
-
/** The sections an issue names: its path's, and any its words name. */
|
|
29966
|
-
function sectionsNamed(issue) {
|
|
29967
|
-
const at = new Set();
|
|
29968
|
-
for (const text of [issue.path, issue.message])
|
|
29969
|
-
for (const m of String(text ?? '').matchAll(NAMED))
|
|
29970
|
-
at.add(Number(m[1]));
|
|
29971
|
-
return [...at].sort((a, b) => a - b);
|
|
29972
|
-
}
|
|
29973
|
-
const WORD = /[\p{L}\p{N}]{3,}/gu;
|
|
29974
|
-
/** The words that can make a fit: three letters or more, never a function word (iox-ui#68: "the" made one). */
|
|
29975
|
-
const wordsOf$2 = (text) => (String(text ?? '').toLowerCase().match(WORD) ?? []).filter(w => !FUNCTION_WORDS.has(w));
|
|
29976
|
-
const layerTexts = (l) => [l.text ?? '', ...(l.items ?? []), ...(l.gallery?.slides ?? []).map(s => s.caption ?? ''), l.form?.title ?? '', l.form?.intro ?? ''];
|
|
29977
|
-
const layerWords = (l) => layerTexts(l).flatMap(wordsOf$2);
|
|
29978
|
-
/** Every word of a text, in order, as a phrase that can be found inside another (` a small room kept slow `). */
|
|
29979
|
-
const PHRASE_WORD = /[\p{L}\p{N}]+/gu;
|
|
29980
|
-
const phraseOf = (text) => {
|
|
29981
|
-
const words = String(text ?? '').toLowerCase().match(PHRASE_WORD) ?? [];
|
|
29982
|
-
return { phrase: ` ${words.join(' ')} `, words: words.length };
|
|
29983
|
-
};
|
|
29984
|
-
/** The fewest words a text needs to count as said twice — a two-word label ("The room") may well appear twice. */
|
|
29985
|
-
const REPEAT_MIN_WORDS = 3;
|
|
29986
|
-
/** The share of the shorter text's words the longer one holds for the two to be the same sentence said twice: one word
|
|
29987
|
-
* changed is still a repeat (the café's quote, "…וחברים צריכים שולחן" and "…וחברים טובים צריכים שולחן"). */
|
|
29988
|
-
const REPEAT_SHARED = 0.8;
|
|
29989
|
-
/** Whether two texts say the same thing: one inside the other, or the shorter's words (function words aside) nearly all
|
|
29990
|
-
* in the longer. */
|
|
29991
|
-
function sameSaying(a, b) {
|
|
29992
|
-
if (a.phrase.includes(b.phrase) || b.phrase.includes(a.phrase))
|
|
29993
|
-
return true;
|
|
29994
|
-
const [short, long] = [new Set(wordsOf$2(a.text)), new Set(wordsOf$2(b.text))].sort((x, y) => x.size - y.size);
|
|
29995
|
-
if (short.size < REPEAT_MIN_WORDS)
|
|
29996
|
-
return false;
|
|
29997
|
-
return [...short].filter(w => long.has(w)).length / short.size >= REPEAT_SHARED;
|
|
29998
|
-
}
|
|
29999
|
-
/**
|
|
30000
|
-
* Whether the plan section would say again what the sections the model kept already say (iox-ui#68): a title or a text of
|
|
30001
|
-
* its slots found inside a kept layer's words, or a kept layer's words found inside it, or the two the same sentence
|
|
30002
|
-
* with a word changed — each of three words or more.
|
|
30003
|
-
*/
|
|
30004
|
-
function repeatsKept(plan, kept) {
|
|
30005
|
-
const long = (text) => ({ ...phraseOf(text), text });
|
|
30006
|
-
const said = kept.flatMap(s => (s.layers ?? []).flatMap(layerTexts)).map(long).filter(p => p.words >= REPEAT_MIN_WORDS);
|
|
30007
|
-
return Object.values(plan.slots ?? {}).map(long).filter(p => p.words >= REPEAT_MIN_WORDS)
|
|
30008
|
-
.some(slot => said.some(k => sameSaying(slot, k)));
|
|
30009
|
-
}
|
|
30010
|
-
/** How well a ready-made section stands for a model's section: the same list, the form, the words they share. */
|
|
30011
|
-
function fitScore(section, plan) {
|
|
30012
|
-
const layers = section.layers ?? [];
|
|
30013
|
-
let score = 0;
|
|
30014
|
-
if (plan.binding && layers.some(l => l.gallery?.source === plan.binding))
|
|
30015
|
-
score += 10;
|
|
30016
|
-
if ((plan.form || /^(contact|cta)\./.test(plan.pattern)) && layers.some(l => l.kind === 'form'))
|
|
30017
|
-
score += 5;
|
|
30018
|
-
const said = new Set(layers.flatMap(layerWords));
|
|
30019
|
-
score += new Set(Object.values(plan.slots ?? {}).flatMap(wordsOf$2).filter(w => said.has(w))).size;
|
|
30020
|
-
return score;
|
|
30021
|
-
}
|
|
30022
|
-
/** The least a middle section's fit scores to be given a ready-made section (two shared words, a form or a list). */
|
|
30023
|
-
const FIT_MIN = 2;
|
|
30024
|
-
/**
|
|
30025
|
-
* iox-ui#134: the plan's middle section (neither its opening nor its close) not yet used whose place is nearest the model's
|
|
30026
|
-
* section's — by their share of each page's length, the earlier one on a tie — and that repeats no kept section; else null.
|
|
30027
|
-
*/
|
|
30028
|
-
function nearestUnusedMiddle(plan, i, lastAt, used, kept) {
|
|
30029
|
-
const share = lastAt > 0 ? i / lastAt : 0;
|
|
30030
|
-
const planLast = plan.length - 1;
|
|
30031
|
-
const candidates = plan
|
|
30032
|
-
.map((p, at) => ({ at, p }))
|
|
30033
|
-
.filter(c => c.at > 0 && c.at < planLast && !used.has(c.at) && !repeatsKept(c.p, kept))
|
|
30034
|
-
.map(c => ({ at: c.at, off: Math.abs(c.at / planLast - share) }))
|
|
30035
|
-
.sort((a, b) => a.off - b.off || a.at - b.at);
|
|
30036
|
-
return candidates[0]?.at ?? null;
|
|
30037
|
-
}
|
|
30038
|
-
/** A ready-made stub at a place: no layers of its own — the composer stamps the plan section's pattern there. */
|
|
30039
|
-
function readyMadeSection$1(original, at, plan) {
|
|
30040
|
-
return { id: original.id, kind: 'content', screens: 1, rows: 1, layers: [], phone: [], readyMade: { at, pattern: plan.pattern } };
|
|
30041
|
-
}
|
|
30042
|
-
/**
|
|
30043
|
-
* Give every section the issues name to the plan's ready-made section for its place, or drop it, then judge the page once
|
|
30044
|
-
* more (a page-wide issue beside them may be cured by the swap — the judge says). `plan` is the page's ready-made
|
|
30045
|
-
* sections (`PagePlan.sections`), in order; `issues` what is left after the mends and the one repair.
|
|
30046
|
-
*/
|
|
30047
|
-
function fallBackBySection(page, plan, issues, judge, options = {}) {
|
|
30048
|
-
const current = structuredClone(page);
|
|
30049
|
-
const swaps = [];
|
|
30050
|
-
const last = (lastResort, left, at = current) => ({ page: at, swaps, left, lastResort });
|
|
30051
|
-
if (!issues.length)
|
|
30052
|
-
return { page: current, swaps, left: [] };
|
|
30053
|
-
const named = new Map();
|
|
30054
|
-
for (const issue of issues)
|
|
30055
|
-
for (const i of sectionsNamed(issue))
|
|
30056
|
-
if (i < current.sections.length)
|
|
30057
|
-
named.set(i, [...(named.get(i) ?? []), issue.message]);
|
|
30058
|
-
if (!named.size)
|
|
30059
|
-
return last(SectionFallbackLastResort.PageWide, [...issues]);
|
|
30060
|
-
if ([...named.keys()].some(i => current.sections[i].readyMade))
|
|
30061
|
-
return last(SectionFallbackLastResort.ReadyMadeNamed, [...issues]);
|
|
30062
|
-
const used = new Set(current.sections.map(s => s.readyMade?.at).filter((n) => n !== undefined));
|
|
30063
|
-
// The sections the model composed and keeps: a ready-made section must not say again what they say.
|
|
30064
|
-
const keptSections = current.sections.filter((s, i) => !s.readyMade && !named.has(i));
|
|
30065
|
-
const lastAt = current.sections.length - 1;
|
|
30066
|
-
const next = [...current.sections];
|
|
30067
|
-
const drop = new Set();
|
|
30068
|
-
for (const [i, why] of [...named.entries()].sort((a, b) => a[0] - b[0])) {
|
|
30069
|
-
const s = current.sections[i];
|
|
30070
|
-
const record = (action, rule, readyMade) => swaps.push({ id: s.id, at: i, action, rule, ...(readyMade ? { readyMade } : {}), why, original: structuredClone(s) });
|
|
30071
|
-
if (i === 0 || i === lastAt) {
|
|
30072
|
-
const at = i === 0 ? 0 : plan.length - 1;
|
|
30073
|
-
if (!plan[at] || used.has(at) || repeatsKept(plan[at], keptSections))
|
|
30074
|
-
return last(SectionFallbackLastResort.NoReadyMade, [...issues]);
|
|
30075
|
-
used.add(at);
|
|
30076
|
-
next[i] = readyMadeSection$1(s, at, plan[at]);
|
|
30077
|
-
record(SectionSwapAction.Replaced, i === 0 ? SectionSwapRule.Opening : SectionSwapRule.Close, { at, pattern: plan[at].pattern });
|
|
30078
|
-
continue;
|
|
30079
|
-
}
|
|
30080
|
-
const best = plan
|
|
30081
|
-
.map((p, at) => ({ at, score: at > 0 && at < plan.length - 1 && !used.has(at) && !repeatsKept(p, keptSections) ? fitScore(s, p) : -1 }))
|
|
30082
|
-
.filter(c => c.score >= FIT_MIN)
|
|
30083
|
-
.sort((a, b) => b.score - a.score || a.at - b.at)[0];
|
|
30084
|
-
const near = !best && options.keepPlace ? nearestUnusedMiddle(plan, i, lastAt, used, keptSections) : null;
|
|
30085
|
-
if (best) {
|
|
30086
|
-
used.add(best.at);
|
|
30087
|
-
next[i] = readyMadeSection$1(s, best.at, plan[best.at]);
|
|
30088
|
-
record(SectionSwapAction.Replaced, SectionSwapRule.Fit, { at: best.at, pattern: plan[best.at].pattern });
|
|
30089
|
-
}
|
|
30090
|
-
else if (near !== null) {
|
|
30091
|
-
used.add(near);
|
|
30092
|
-
next[i] = readyMadeSection$1(s, near, plan[near]);
|
|
30093
|
-
record(SectionSwapAction.Replaced, SectionSwapRule.Place, { at: near, pattern: plan[near].pattern });
|
|
30094
|
-
}
|
|
30095
|
-
else {
|
|
30096
|
-
drop.add(i);
|
|
30097
|
-
record(SectionSwapAction.Dropped, SectionSwapRule.NoFit);
|
|
30098
|
-
}
|
|
30099
|
-
}
|
|
30100
|
-
// What the given-away sections carried toward the page's minimums goes with the page (checkLayout forgives exactly
|
|
30101
|
-
// that, iox-ui#67); its maximums stay the whole page's.
|
|
30102
|
-
const givenAway = [...(current.givenAway ?? []), ...swaps.map(w => ({ at: w.at, section: w.original }))];
|
|
30103
|
-
const judged = judge({ ...current, sections: next.filter((_, i) => !drop.has(i)), givenAway });
|
|
30104
|
-
if (!judged.issues.length)
|
|
30105
|
-
return { page: judged.page, swaps, left: [] };
|
|
30106
|
-
const kept = judged.issues.flatMap(sectionsNamed).filter(i => !judged.page.sections[i]?.readyMade);
|
|
30107
|
-
const reason = kept.length ? SectionFallbackLastResort.Neighbour
|
|
30108
|
-
: judged.issues.some(i => sectionsNamed(i).length) ? SectionFallbackLastResort.ReadyMadeNamed : SectionFallbackLastResort.PageWide;
|
|
30109
|
-
return last(reason, judged.issues, judged.page);
|
|
30110
|
-
}
|
|
30111
|
-
|
|
30112
29922
|
/** The type-led patterns a picture-led one becomes, best first: the first whose budgets hold every carried word wins. */
|
|
30113
29923
|
const TYPE_LED_SWAPS = {
|
|
30114
29924
|
'hero.split': [{ pattern: 'hero.centered', slots: { eyebrow: 'eyebrow', headline: 'headline', lead: 'lead', primary: 'primary', secondary: 'secondary' } }],
|
|
@@ -30137,13 +29947,11 @@ var TypeLedChangeKind;
|
|
|
30137
29947
|
/** The home page's first screen had no picture to show: it opens type-led (`media:none`), a way no other site of the
|
|
30138
29948
|
* studio opens — or, when its first section cannot give its words slot by slot, on that section (the mix left out). */
|
|
30139
29949
|
TypeLedChangeKind["Opening"] = "opening";
|
|
30140
|
-
/** A model-laid section
|
|
30141
|
-
|
|
30142
|
-
|
|
30143
|
-
*
|
|
30144
|
-
TypeLedChangeKind["
|
|
30145
|
-
/** A model-laid page that could not give its empty photos away section by section is made from its plan sections. */
|
|
30146
|
-
TypeLedChangeKind["Layout"] = "layout";
|
|
29950
|
+
/** A model-laid section's empty photos (and an empty photo ground) are filled type-led in their own place: each a
|
|
29951
|
+
* ground plate of the look's colour at the same layer, cell and motion — the composition kept (2026-11-25). The
|
|
29952
|
+
* retired kinds `layout-section`, `layout-words` and `layout` handed composed sections or pages back to ready-made
|
|
29953
|
+
* sections; a stored run's words for them stay as they were said. */
|
|
29954
|
+
TypeLedChangeKind["Plate"] = "plate";
|
|
30147
29955
|
/** A list's items have no picture at all: its cards show no picture part. */
|
|
30148
29956
|
TypeLedChangeKind["List"] = "list";
|
|
30149
29957
|
})(TypeLedChangeKind || (TypeLedChangeKind = {}));
|
|
@@ -30197,7 +30005,12 @@ function typeLedSection(section, density) {
|
|
|
30197
30005
|
const linkSlots = new Set(patternLinkSlots(pattern));
|
|
30198
30006
|
const links = Object.fromEntries(Object.entries(section.links ?? {}).map(([slot, route]) => [target.slots[slot], route]).filter(([slot]) => !!slot && linkSlots.has(slot)));
|
|
30199
30007
|
const parts = new Set(patternOptionalParts(pattern));
|
|
30200
|
-
|
|
30008
|
+
// iox-ui#149: a part of the target that holds only slots the source has no place for would show the pattern's own
|
|
30009
|
+
// sample ("The one sentence a reader should remember.") on the live site, words the picture-led section never
|
|
30010
|
+
// showed — the swap leaves it out. (A slot the source has but left unsaid shows its sample either way.)
|
|
30011
|
+
const mapped = new Set(Object.values(target.slots));
|
|
30012
|
+
const unsaid = Object.entries(patternPartSlots(pattern)).filter(([, held]) => held.length && !held.some(s => mapped.has(s))).map(([part]) => part);
|
|
30013
|
+
const without = [...new Set([...(section.without ?? []).filter(w => parts.has(w)), ...unsaid])];
|
|
30201
30014
|
const next = {
|
|
30202
30015
|
pattern: target.pattern,
|
|
30203
30016
|
...(Object.keys(slots).length ? { slots } : {}),
|
|
@@ -30237,57 +30050,72 @@ function layerOf$1(nodeId) {
|
|
|
30237
30050
|
const m = /-s(\d+)-l(\d+)(?:-|$)/.exec(nodeId);
|
|
30238
30051
|
return m ? { section: Number(m[1]), layer: Number(m[2]) } : null;
|
|
30239
30052
|
}
|
|
30240
|
-
/**
|
|
30241
|
-
const
|
|
30242
|
-
|
|
30243
|
-
|
|
30244
|
-
]);
|
|
30245
|
-
|
|
30246
|
-
|
|
30247
|
-
|
|
30248
|
-
|
|
30249
|
-
const
|
|
30250
|
-
|
|
30251
|
-
|
|
30252
|
-
|
|
30253
|
-
|
|
30254
|
-
|
|
30255
|
-
|
|
30256
|
-
|
|
30257
|
-
|
|
30258
|
-
|
|
30259
|
-
|
|
30260
|
-
|
|
30261
|
-
|
|
30262
|
-
|
|
30263
|
-
|
|
30264
|
-
const
|
|
30265
|
-
|
|
30266
|
-
|
|
30267
|
-
const
|
|
30268
|
-
|
|
30269
|
-
|
|
30270
|
-
|
|
30271
|
-
|
|
30272
|
-
|
|
30273
|
-
|
|
30274
|
-
|
|
30275
|
-
|
|
30276
|
-
|
|
30277
|
-
|
|
30053
|
+
/** A composed section's photo ground (`<page>-s<section>-ground`). */
|
|
30054
|
+
const GROUND_NODE = /-s\d+-ground$/;
|
|
30055
|
+
const PHOTO_GROUND = 'photo:';
|
|
30056
|
+
/** The layer kinds whose picture a plate stands in for. */
|
|
30057
|
+
const PICTURE_LAYERS = new Set([LayoutLayerKind.Photo, LayoutLayerKind.Gallery]);
|
|
30058
|
+
/** Word colours that read on a dark plate (the rest read on a light one). */
|
|
30059
|
+
const LIGHT_WORDS$1 = new Set([LayoutColour.Ground, LayoutColour.Soft]);
|
|
30060
|
+
/** The plates a section's ground takes, in order — the n-th plate of a section the n-th colour, so plates stacked in one
|
|
30061
|
+
* cell still show their movement. Never the section's own ground. */
|
|
30062
|
+
const PLATE_COLOURS = {
|
|
30063
|
+
[LayoutColour.Ground]: [LayoutColour.Soft, LayoutColour.Accent, LayoutColour.Ink],
|
|
30064
|
+
[LayoutColour.Soft]: [LayoutColour.Ground, LayoutColour.Accent, LayoutColour.Ink],
|
|
30065
|
+
[LayoutColour.Ink]: [LayoutColour.Accent, LayoutColour.Soft, LayoutColour.Ground],
|
|
30066
|
+
[LayoutColour.Muted]: [LayoutColour.Soft, LayoutColour.Accent, LayoutColour.Ground],
|
|
30067
|
+
[LayoutColour.Accent]: [LayoutColour.Ink, LayoutColour.Soft, LayoutColour.Ground],
|
|
30068
|
+
};
|
|
30069
|
+
const cellsMeet$1 = (a, b) => a.col[0] < b.col[1] && b.col[0] < a.col[1] && a.row[0] < b.row[1] && b.row[0] < a.row[1];
|
|
30070
|
+
const lightWords = (l) => LIGHT_WORDS$1.has(String(l.color ?? LayoutColour.Ink));
|
|
30071
|
+
/**
|
|
30072
|
+
* The colour a ground plate stands in, in a section on `ground`: under words laid over it, the ground those words read
|
|
30073
|
+
* on (light words → the ink, dark words → the soft — the ground when the section is soft); else the `nth` of the
|
|
30074
|
+
* ground's rotation. A calm look never takes the accent. Pure.
|
|
30075
|
+
*/
|
|
30076
|
+
function typeLedPlateColour(section, ground, plate, nth, calm) {
|
|
30077
|
+
const over = section.layers.filter(o => o !== plate && LAYOUT_TEXT_KINDS.has(o.kind) && (o.z ?? 0) > (plate.z ?? 0) && cellsMeet$1(o, plate));
|
|
30078
|
+
if (over.length)
|
|
30079
|
+
return over.some(lightWords) ? LayoutColour.Ink : ground === LayoutColour.Soft ? LayoutColour.Ground : LayoutColour.Soft;
|
|
30080
|
+
const rotation = (PLATE_COLOURS[ground] ?? PLATE_COLOURS[LayoutColour.Ground]).filter(c => !calm || c !== LayoutColour.Accent);
|
|
30081
|
+
return rotation[nth % rotation.length];
|
|
30082
|
+
}
|
|
30083
|
+
/**
|
|
30084
|
+
* A model-laid section with its empty pictures filled type-led IN PLACE (2026-11-25, a composed page keeps its
|
|
30085
|
+
* composition): each layer in `plates` becomes a ground plate — a `shape` at the same index, cell, depth, entrance and
|
|
30086
|
+
* scroll motion (so every node id and the signature's mechanism stay), painted `typeLedPlateColour`; an empty photo
|
|
30087
|
+
* ground (`ground`) becomes a plain ground the section's words read on (the ink under light words, else the soft). On a
|
|
30088
|
+
* phone a shape is hidden, as every shape is: the words stack on the section's ground. Pure.
|
|
30089
|
+
*/
|
|
30090
|
+
function typeLedPlates(section, plates, ground, calm) {
|
|
30091
|
+
const words = section.layers.filter(l => LAYOUT_TEXT_KINDS.has(l.kind));
|
|
30092
|
+
const plain = words.some(lightWords) ? LayoutColour.Ink : LayoutColour.Soft;
|
|
30093
|
+
const swapped = ground && String(section.ground ?? '').startsWith(PHOTO_GROUND);
|
|
30094
|
+
const sectionGround = swapped ? plain : String(section.ground ?? LayoutColour.Ground);
|
|
30095
|
+
let nth = 0;
|
|
30096
|
+
const layers = section.layers.map((layer, i) => {
|
|
30097
|
+
if (!plates.has(i) || !PICTURE_LAYERS.has(layer.kind))
|
|
30098
|
+
return layer;
|
|
30099
|
+
const { photo: _photo, gallery: _gallery, fit: _fit, inner: _inner, ...kept } = layer;
|
|
30100
|
+
return { ...kept, kind: LayoutLayerKind.Shape, color: typeLedPlateColour(section, sectionGround, layer, nth++, calm) };
|
|
30278
30101
|
});
|
|
30279
|
-
|
|
30280
|
-
|
|
30281
|
-
|
|
30282
|
-
|
|
30283
|
-
|
|
30284
|
-
|
|
30285
|
-
|
|
30286
|
-
|
|
30287
|
-
|
|
30288
|
-
|
|
30289
|
-
|
|
30290
|
-
|
|
30102
|
+
return { ...section, ...(swapped ? { ground: sectionGround } : {}), layers };
|
|
30103
|
+
}
|
|
30104
|
+
/** How many picture placeholders each layer of a model-laid page holds (`<section>:<layer>`), filled or not. */
|
|
30105
|
+
function picturesByLayer(placeholders, owner, roots) {
|
|
30106
|
+
const out = new Map();
|
|
30107
|
+
for (const p of placeholders) {
|
|
30108
|
+
if (p.owner !== owner || !isPictureKind(p.kind))
|
|
30109
|
+
continue;
|
|
30110
|
+
const laid = roots.get(p.nodeId)?.laid ?? -1;
|
|
30111
|
+
const at = layerOf$1(p.nodeId);
|
|
30112
|
+
if (laid < 0 || !at || at.section !== laid)
|
|
30113
|
+
continue;
|
|
30114
|
+
const key = `${laid}:${at.layer}`;
|
|
30115
|
+
out.set(key, (out.get(key) ?? 0) + 1);
|
|
30116
|
+
}
|
|
30117
|
+
return out;
|
|
30118
|
+
}
|
|
30291
30119
|
/** The tier a build is at when none is said (GenerationTier.Basic — a value import of site-plan.model here reorders the
|
|
30292
30120
|
* generation-core load). */
|
|
30293
30121
|
const BASIC = 'basic';
|
|
@@ -30349,6 +30177,7 @@ function typeLedRound(plan, composed, filled, context = {}) {
|
|
|
30349
30177
|
changes.push({ kind: TypeLedChangeKind.Section, page: page.key, at: i, from: section.pattern, to: led.to, said: `${page.name}: ${section.pattern} has no picture — ${led.to} says its words` });
|
|
30350
30178
|
return true;
|
|
30351
30179
|
};
|
|
30180
|
+
const calm = CALM_ANIMATE.has(String(plan.design?.animate ?? ''));
|
|
30352
30181
|
const pages = plan.pages.map((page, p) => {
|
|
30353
30182
|
const made = composed.pages.find(c => c.key === page.key) ?? composed.pages[p];
|
|
30354
30183
|
const mine = empty.filter(e => e.owner === page.key);
|
|
@@ -30358,6 +30187,7 @@ function typeLedRound(plan, composed, filled, context = {}) {
|
|
|
30358
30187
|
const laid = new Map();
|
|
30359
30188
|
const planAt = new Set();
|
|
30360
30189
|
let first = false;
|
|
30190
|
+
const laidOf = (i) => laid.get(i) ?? laid.set(i, { layers: new Set(), ground: false }).get(i);
|
|
30361
30191
|
for (const e of mine) {
|
|
30362
30192
|
const where = roots.get(e.nodeId);
|
|
30363
30193
|
if (!where)
|
|
@@ -30368,10 +30198,10 @@ function typeLedRound(plan, composed, filled, context = {}) {
|
|
|
30368
30198
|
continue;
|
|
30369
30199
|
if (where.laid >= 0) {
|
|
30370
30200
|
const at = layerOf$1(e.nodeId);
|
|
30371
|
-
const layers = laid.get(where.laid) ?? new Set();
|
|
30372
30201
|
if (at && at.section === where.laid)
|
|
30373
|
-
layers.add(at.layer);
|
|
30374
|
-
|
|
30202
|
+
laidOf(where.laid).layers.add(at.layer);
|
|
30203
|
+
else if (GROUND_NODE.test(e.nodeId))
|
|
30204
|
+
laidOf(where.laid).ground = true;
|
|
30375
30205
|
}
|
|
30376
30206
|
else if (where.planAt >= 0)
|
|
30377
30207
|
planAt.add(where.planAt);
|
|
@@ -30386,52 +30216,30 @@ function typeLedRound(plan, composed, filled, context = {}) {
|
|
|
30386
30216
|
}
|
|
30387
30217
|
if (sections)
|
|
30388
30218
|
next = { ...next, sections };
|
|
30389
|
-
// A section the model laid with a
|
|
30390
|
-
//
|
|
30391
|
-
// whole page from its sections when no place can be given away.
|
|
30219
|
+
// A composed page KEEPS its composition (2026-11-25): a section the model laid with a picture nothing fills is
|
|
30220
|
+
// filled type-led in its own place — never handed to a ready-made section, the page never made from its sections.
|
|
30392
30221
|
if (page.layout && laid.size) {
|
|
30393
|
-
const
|
|
30394
|
-
const
|
|
30395
|
-
|
|
30396
|
-
|
|
30397
|
-
|
|
30398
|
-
|
|
30399
|
-
|
|
30400
|
-
|
|
30401
|
-
|
|
30402
|
-
|
|
30403
|
-
|
|
30404
|
-
|
|
30405
|
-
|
|
30406
|
-
|
|
30407
|
-
:
|
|
30408
|
-
|
|
30409
|
-
const { layout: _laid, ...rest } = next;
|
|
30410
|
-
next = rest;
|
|
30411
|
-
}
|
|
30412
|
-
else {
|
|
30413
|
-
for (const swap of fallback.swaps) {
|
|
30414
|
-
const kept = words.get(swap.at);
|
|
30415
|
-
changes.push({
|
|
30416
|
-
kind: kept ? TypeLedChangeKind.LayoutWords : TypeLedChangeKind.LayoutSection, page: page.key, at: swap.at, ...(swap.readyMade ? { to: swap.readyMade.pattern } : {}),
|
|
30417
|
-
said: `${page.name}: section ${swap.at + 1} ${SAID_LAYOUT} — ${swap.readyMade ? `the ready-made ${swap.readyMade.pattern} stands there` : kept ? 'its words stay, its photos left out' : 'left out (it says nothing without its photos)'}`,
|
|
30418
|
-
});
|
|
30419
|
-
}
|
|
30420
|
-
// The dropped places that keep their words go back where the model laid them.
|
|
30421
|
-
const swapped = new Set(fallback.swaps.filter(w => w.action === SectionSwapAction.Dropped).map(w => w.at));
|
|
30422
|
-
const left = [...fallback.page.sections];
|
|
30423
|
-
const sectionsBack = [];
|
|
30424
|
-
page.layout.sections.forEach((_, i) => {
|
|
30425
|
-
if (words.has(i))
|
|
30426
|
-
sectionsBack.push(words.get(i));
|
|
30427
|
-
else if (!swapped.has(i))
|
|
30428
|
-
sectionsBack.push(left.shift());
|
|
30222
|
+
const pictured = picturesByLayer(composed.placeholders, page.key, roots);
|
|
30223
|
+
const unfilled = picturesByLayer(mine, page.key, roots);
|
|
30224
|
+
let plated = false;
|
|
30225
|
+
const laidSections = page.layout.sections.map((section, i) => {
|
|
30226
|
+
const at = laid.get(i);
|
|
30227
|
+
if (!at)
|
|
30228
|
+
return section;
|
|
30229
|
+
// A layer becomes a plate only when no picture of it is filled (a gallery with one filled slide stays).
|
|
30230
|
+
const plates = new Set([...at.layers].filter(li => PICTURE_LAYERS.has(section.layers[li]?.kind) && pictured.get(`${i}:${li}`) === unfilled.get(`${i}:${li}`)));
|
|
30231
|
+
if (!plates.size && !at.ground)
|
|
30232
|
+
return section;
|
|
30233
|
+
plated = true;
|
|
30234
|
+
const n = plates.size;
|
|
30235
|
+
changes.push({
|
|
30236
|
+
kind: TypeLedChangeKind.Plate, page: page.key, at: i,
|
|
30237
|
+
said: `${page.name}: section ${i + 1} (${section.id}) ${n ? `holds ${n === 1 ? 'a photo' : `${n} photos`} nothing fills — ${n === 1 ? 'it stands' : 'each stands'} as a plate of the look's colour in its place` : 'stands on a photo nothing fills — it stands on a ground of the look'}${n && at.ground ? ', on a ground of the look' : ''}, the composition kept`,
|
|
30429
30238
|
});
|
|
30430
|
-
|
|
30431
|
-
|
|
30432
|
-
|
|
30433
|
-
|
|
30434
|
-
}
|
|
30239
|
+
return typeLedPlates(section, plates, at.ground, calm);
|
|
30240
|
+
});
|
|
30241
|
+
if (plated)
|
|
30242
|
+
next = { ...next, layout: { ...page.layout, sections: laidSections } };
|
|
30435
30243
|
}
|
|
30436
30244
|
if (first) {
|
|
30437
30245
|
firstScreen = next;
|
|
@@ -32914,7 +32722,7 @@ const idOf = (ctx, id) => freeNodeId(ctx.o.owner, id);
|
|
|
32914
32722
|
/** A free page's sections, one stamped root each (a ready-made place stamped with its pattern, the rest as model-laid). */
|
|
32915
32723
|
function composeFreePage(page, options) {
|
|
32916
32724
|
const ctx = contextOf(options, page.sections);
|
|
32917
|
-
const roots = page.sections.map(section => (section.readyMade ? readyMadeSection(section, ctx) : composeNode$1(section, ctx, 0)));
|
|
32725
|
+
const roots = page.sections.map(section => (section.readyMade ? readyMadeSection$1(section, ctx) : composeNode$1(section, ctx, 0)));
|
|
32918
32726
|
// The links are written once every node is made; the stamp's fingerprint is taken after them.
|
|
32919
32727
|
wireLinks(ctx);
|
|
32920
32728
|
return roots.map((root, i) => {
|
|
@@ -32943,7 +32751,7 @@ function contextOf(options, sections) {
|
|
|
32943
32751
|
ease: LAYOUT_EASING[(options.motion?.ease ?? LayoutEase.Out)] ?? LAYOUT_EASING[LayoutEase.Out],
|
|
32944
32752
|
};
|
|
32945
32753
|
}
|
|
32946
|
-
function readyMadeSection(section, ctx) {
|
|
32754
|
+
function readyMadeSection$1(section, ctx) {
|
|
32947
32755
|
if (!ctx.o.readyMade)
|
|
32948
32756
|
throw new ComposeError(`${section.id}: a ready-made place, and no plan section to compose it from`);
|
|
32949
32757
|
return ctx.o.readyMade(section.readyMade.at, idOf(ctx, section.id));
|
|
@@ -35727,212 +35535,571 @@ function showcasePlans(input) {
|
|
|
35727
35535
|
return [...Array.from({ length: count }, (_, i) => plan(i, pages, input.design)), ...scenes, store];
|
|
35728
35536
|
}
|
|
35729
35537
|
|
|
35538
|
+
function isImportPlan(plan) {
|
|
35539
|
+
return plan.source.kind === SitePlanSourceKind.Import;
|
|
35540
|
+
}
|
|
35541
|
+
const WEB_ADDRESS = /^https?:\/\//i;
|
|
35542
|
+
/** The fields of a type that hold pictures — a picture's address, or a list of them. */
|
|
35543
|
+
const PICTURE_CONTROLS = [ContentFieldControl.Media, ContentFieldControl.Gallery];
|
|
35730
35544
|
/**
|
|
35731
|
-
*
|
|
35732
|
-
*
|
|
35733
|
-
*
|
|
35734
|
-
* the website wizard (W3) polls it. Pure types, enums and helpers; no transport.
|
|
35545
|
+
* Bring my site X5: every picture an import plan's REAL items show — the old address in each picture or gallery field of
|
|
35546
|
+
* a type the site filled (`seed.importedFrom`), each once, in plan order. The build copies these into the studio's own
|
|
35547
|
+
* storage and the items show the copies (never hot-linked); the wizard counts them. A plan read from no site has none.
|
|
35735
35548
|
*/
|
|
35736
|
-
|
|
35737
|
-
(
|
|
35738
|
-
|
|
35739
|
-
|
|
35740
|
-
|
|
35741
|
-
|
|
35742
|
-
|
|
35743
|
-
|
|
35744
|
-
|
|
35745
|
-
|
|
35746
|
-
|
|
35747
|
-
|
|
35748
|
-
|
|
35749
|
-
|
|
35750
|
-
|
|
35751
|
-
|
|
35752
|
-
/** A redesign (RD2): its new design going onto the pages, header, footer and look — page by page. */
|
|
35753
|
-
SiteBuildStatus["Switching"] = "switching";
|
|
35754
|
-
/** A redesign switched: the site wears it; Back is open for `REDESIGN_BACK_DAYS`. */
|
|
35755
|
-
SiteBuildStatus["Switched"] = "switched";
|
|
35756
|
-
/** A redesign going Back: its snapshot restored, page by page. */
|
|
35757
|
-
SiteBuildStatus["Restoring"] = "restoring";
|
|
35758
|
-
/** A redesign gone Back: the site wears what it wore before the switch. */
|
|
35759
|
-
SiteBuildStatus["Restored"] = "restored";
|
|
35760
|
-
/** A staged (or failed, never switched) redesign let go — by the owner, or by a newer redesign: no page was written. */
|
|
35761
|
-
SiteBuildStatus["Discarded"] = "discarded";
|
|
35762
|
-
})(SiteBuildStatus || (SiteBuildStatus = {}));
|
|
35763
|
-
/** The statuses a runner advances — and the ones that hold the org's single-run slot. */
|
|
35764
|
-
const ACTIVE_BUILD_STATUSES = [SiteBuildStatus.Running, SiteBuildStatus.Undoing, SiteBuildStatus.Switching, SiteBuildStatus.Restoring];
|
|
35765
|
-
/** The steps of a build, in the order they run. */
|
|
35766
|
-
var BuildStep;
|
|
35767
|
-
(function (BuildStep) {
|
|
35768
|
-
BuildStep["Preflight"] = "preflight";
|
|
35769
|
-
BuildStep["ContentTypes"] = "content-types";
|
|
35770
|
-
BuildStep["SampleImages"] = "sample-images";
|
|
35771
|
-
/** I2: the curated stock photos the plan's empty picture slots take, copied into the studio (never hot-linked). */
|
|
35772
|
-
BuildStep["StockPhotos"] = "stock-photos";
|
|
35773
|
-
BuildStep["Items"] = "items";
|
|
35774
|
-
/** Commerce G1: what the business sells, into the studio's SHOP — its categories, then sample products (no price). */
|
|
35775
|
-
BuildStep["Shop"] = "shop";
|
|
35776
|
-
BuildStep["DataSources"] = "data-sources";
|
|
35777
|
-
BuildStep["Pages"] = "pages";
|
|
35778
|
-
BuildStep["Globals"] = "globals";
|
|
35779
|
-
BuildStep["Look"] = "look";
|
|
35780
|
-
})(BuildStep || (BuildStep = {}));
|
|
35781
|
-
const BUILD_STEPS = Object.values(BuildStep);
|
|
35782
|
-
/** The steps a build of `plan` takes, in order: every one, the shop's only when the plan sells (commerce G1). */
|
|
35783
|
-
function buildStepsOf(plan) {
|
|
35784
|
-
const sells = planSells(plan);
|
|
35785
|
-
return BUILD_STEPS.filter(step => step !== BuildStep.Shop || sells);
|
|
35786
|
-
}
|
|
35787
|
-
var StepState;
|
|
35788
|
-
(function (StepState) {
|
|
35789
|
-
StepState["Wait"] = "wait";
|
|
35790
|
-
StepState["Run"] = "run";
|
|
35791
|
-
StepState["Done"] = "done";
|
|
35792
|
-
StepState["Failed"] = "failed";
|
|
35793
|
-
})(StepState || (StepState = {}));
|
|
35794
|
-
/** What a build creates, as Undo walks it. */
|
|
35795
|
-
var CreatedKind;
|
|
35796
|
-
(function (CreatedKind) {
|
|
35797
|
-
CreatedKind["ContentType"] = "content-type";
|
|
35798
|
-
/** Fields the build added to a content type it found (types are shared by every organization of a studio). */
|
|
35799
|
-
CreatedKind["ContentTypeFields"] = "content-type-fields";
|
|
35800
|
-
CreatedKind["SampleImage"] = "sample-image";
|
|
35801
|
-
/** A stock photo copied into the studio's storage (`media/stock/…`), with its assets row. */
|
|
35802
|
-
CreatedKind["StockPhoto"] = "stock-photo";
|
|
35803
|
-
CreatedKind["Item"] = "item";
|
|
35804
|
-
/** Commerce G1: a shop category the build added (one the studio had is reused, never recorded). */
|
|
35805
|
-
CreatedKind["ShopCategory"] = "shop-category";
|
|
35806
|
-
/** Commerce G1: a sample product, written through the shop's own write path. */
|
|
35807
|
-
CreatedKind["ShopProduct"] = "shop-product";
|
|
35808
|
-
CreatedKind["DataSource"] = "data-source";
|
|
35809
|
-
CreatedKind["Page"] = "page";
|
|
35810
|
-
/** RD3-D3 (a) Replace: a page an earlier Undo kept, moved aside (`/<route>-previous`, a draft) so the plan's page takes
|
|
35811
|
-
* its address — Undo puts it back while it is as the move left it and its address is free (`CreatedRecord.from`). */
|
|
35812
|
-
CreatedKind["PageMoved"] = "page-moved";
|
|
35813
|
-
CreatedKind["Global"] = "global";
|
|
35814
|
-
CreatedKind["Look"] = "look";
|
|
35815
|
-
})(CreatedKind || (CreatedKind = {}));
|
|
35816
|
-
/** Why Undo left something in place. */
|
|
35817
|
-
var KeptReason;
|
|
35818
|
-
(function (KeptReason) {
|
|
35819
|
-
KeptReason["Edited"] = "edited";
|
|
35820
|
-
KeptReason["Published"] = "published";
|
|
35821
|
-
KeptReason["InUse"] = "in-use";
|
|
35822
|
-
/** Added to a content type every organization shares: removing a field is the studio owner's change. */
|
|
35823
|
-
KeptReason["Shared"] = "shared";
|
|
35824
|
-
})(KeptReason || (KeptReason = {}));
|
|
35825
|
-
var BuildNoticeCode;
|
|
35826
|
-
(function (BuildNoticeCode) {
|
|
35827
|
-
/** Storage is not configured: sample items get the empty image box, and the run says so. */
|
|
35828
|
-
BuildNoticeCode["NoStorage"] = "no-storage";
|
|
35829
|
-
/** A content type the build reuses is not public in this studio: the site will not show its items. */
|
|
35830
|
-
BuildNoticeCode["ContentTypeNotPublic"] = "content-type-not-public";
|
|
35831
|
-
/** The stock library could not be read: the picture slots keep the empty box, and the run says so. */
|
|
35832
|
-
BuildNoticeCode["StockUnavailable"] = "stock-unavailable";
|
|
35833
|
-
/** The stock library was read but holds no photo for this kind of business (never built, or reviewed down to
|
|
35834
|
-
* none): the picture slots keep the empty box, and the run says so (I2.1 — never silently). */
|
|
35835
|
-
BuildNoticeCode["StockMissing"] = "stock-missing";
|
|
35836
|
-
/** M7: a picture made for the site was refused by its review twice (or its second try did not fit the cost shown):
|
|
35837
|
-
* stock or the empty box stands in, and the run says so. */
|
|
35838
|
-
BuildNoticeCode["PictureFallback"] = "picture-fallback";
|
|
35839
|
-
/** Commerce G1 (shop-aware A-D9): the studio already sells products — the site shows them, and no sample is added. */
|
|
35840
|
-
BuildNoticeCode["ShopHasProducts"] = "shop-has-products";
|
|
35841
|
-
/** Commerce G1: the studio had never set its currency and VAT — the build stored the ones its language implies
|
|
35842
|
-
* (Hebrew: ILS and 18%), said here so the owner checks them in Settings ▸ General before setting prices. */
|
|
35843
|
-
BuildNoticeCode["ShopMoneyInferred"] = "shop-money-inferred";
|
|
35844
|
-
/** Commerce G2: the facts the owner gave (email, phone, address) became the shop's contact details where it had none
|
|
35845
|
-
* — said, so the owner adds what only they know (the legal name, the business number) in Shop ▸ Settings. */
|
|
35846
|
-
BuildNoticeCode["ShopBusinessFromFacts"] = "shop-business-from-facts";
|
|
35847
|
-
/** RD3-D3 (a) Keep mine: a page an earlier Undo kept stays at an address the plan builds — the plan's page there is
|
|
35848
|
-
* not built. */
|
|
35849
|
-
BuildNoticeCode["KeptPageSkipped"] = "kept-page-skipped";
|
|
35850
|
-
/** RD3-D3 (a) Replace: that page moved aside as a draft (`/<route>-previous`) — Undo puts it back. */
|
|
35851
|
-
BuildNoticeCode["KeptPageMoved"] = "kept-page-moved";
|
|
35852
|
-
/** HI1a: the header the plan asked for could not be worn as asked (a long name between two menus, a part the site
|
|
35853
|
-
* cannot carry) — the composer mended it, and the run says so; the owner changes it in the builder. */
|
|
35854
|
-
BuildNoticeCode["HeaderMended"] = "header-mended";
|
|
35855
|
-
/** AW8: the opening the plan asked for was mended (an award word on a basic build, a part the site cannot carry) —
|
|
35856
|
-
* said, so the owner knows the home page opens a little differently and where to change it. */
|
|
35857
|
-
BuildNoticeCode["OpeningMended"] = "opening-mended";
|
|
35858
|
-
/** LI5: the footer the plan asked for was mended (a word that waits drawn as its stand-in, a one-line footer that
|
|
35859
|
-
* holds only some parts) — said like the header's and the opening's. */
|
|
35860
|
-
BuildNoticeCode["FooterMended"] = "footer-mended";
|
|
35861
|
-
/** AW6: the body the plan asked for was mended (a section edge that comes with the award plan, on a basic build) —
|
|
35862
|
-
* said like the header's, the opening's and the footer's. */
|
|
35863
|
-
BuildNoticeCode["BodyMended"] = "body-mended";
|
|
35864
|
-
/** iox-ui#129: pictures nothing fills were not drawn as empty boxes — those sections were composed type-led (the home
|
|
35865
|
-
* page opening on its words, a list's cards without their picture). Said once, so the owner knows a photo of theirs
|
|
35866
|
-
* brings the picture-led section back (a Re-fit, or the next build). */
|
|
35867
|
-
BuildNoticeCode["TypeLed"] = "type-led";
|
|
35868
|
-
})(BuildNoticeCode || (BuildNoticeCode = {}));
|
|
35869
|
-
/** RD3-D3 (a): what a build does with a page an earlier Undo kept at an address its plan builds — the header and footer's
|
|
35870
|
-
* pair (`replaceGlobals`), for pages. */
|
|
35871
|
-
var KeptPagesChoice;
|
|
35872
|
-
(function (KeptPagesChoice) {
|
|
35873
|
-
/** Build every other page; leave these as they are. */
|
|
35874
|
-
KeptPagesChoice["Keep"] = "keep";
|
|
35875
|
-
/** Move each aside as a draft at `/<route>-previous` (`/shop-previous/:slug` for a per-item page) and build the plan's
|
|
35876
|
-
* page at its address. Nothing is deleted. */
|
|
35877
|
-
KeptPagesChoice["Replace"] = "replace";
|
|
35878
|
-
})(KeptPagesChoice || (KeptPagesChoice = {}));
|
|
35879
|
-
/** The suffix a replaced page's address takes. */
|
|
35880
|
-
const PREVIOUS_ROUTE_SUFFIX = '-previous';
|
|
35881
|
-
/** Where a page moved aside goes: `/<route>-previous`, then `-previous-2`… — never an address in `taken` (shapes
|
|
35882
|
-
* compared case-insensitively, trailing slash and parameter names ignored). The home page (`/`) goes to `/home-previous`.
|
|
35883
|
-
*
|
|
35884
|
-
* ⚠️ The suffix goes on the route's LAST STATIC segment, never on a `:param` (vectoriox/iox-ui#100): `/shop/:slug` moved
|
|
35885
|
-
* to `/shop/:slug-previous` still answered every `/shop/<item>` — a parameter matches the whole segment — and, older
|
|
35886
|
-
* and published by Publish site, the replaced product page was served instead of the new one. So `/shop/:slug` →
|
|
35887
|
-
* `/shop-previous/:slug`, and a route of parameters only (`/:slug`) → `/previous/:slug`. */
|
|
35888
|
-
function previousRoute(route, taken) {
|
|
35889
|
-
const key = (r) => (r.replace(/\/+$/, '') || '/').replace(/\/:[^/]+/g, '/:').toLowerCase();
|
|
35890
|
-
const held = new Set(taken.map(key));
|
|
35891
|
-
const segments = (route.replace(/\/+$/, '') || '/home').split('/').filter(Boolean);
|
|
35892
|
-
if (!segments.length)
|
|
35893
|
-
segments.push('home');
|
|
35894
|
-
const at = segments.map((seg, i) => (seg.startsWith(':') ? -1 : i)).filter(i => i >= 0).pop();
|
|
35895
|
-
const shaped = (suffix) => {
|
|
35896
|
-
const out = [...segments];
|
|
35897
|
-
if (at === undefined)
|
|
35898
|
-
out.unshift(`previous${suffix}`);
|
|
35899
|
-
else
|
|
35900
|
-
out[at] = `${out[at]}${PREVIOUS_ROUTE_SUFFIX}${suffix}`;
|
|
35901
|
-
return `/${out.join('/')}`;
|
|
35902
|
-
};
|
|
35903
|
-
let candidate = shaped('');
|
|
35904
|
-
for (let n = 2; held.has(key(candidate)); n++)
|
|
35905
|
-
candidate = shaped(`-${n}`);
|
|
35906
|
-
return candidate;
|
|
35549
|
+
function importedPicturesOf(plan) {
|
|
35550
|
+
if (plan?.source?.kind !== SitePlanSourceKind.Import)
|
|
35551
|
+
return [];
|
|
35552
|
+
const found = new Set();
|
|
35553
|
+
for (const type of plan.contentTypes ?? []) {
|
|
35554
|
+
if (!type.seed?.importedFrom?.length)
|
|
35555
|
+
continue;
|
|
35556
|
+
for (const field of type.fields.filter(f => PICTURE_CONTROLS.includes(f.controller))) {
|
|
35557
|
+
for (const value of type.seed.perItem?.[field.name] ?? []) {
|
|
35558
|
+
for (const address of typeof value === 'string' ? [value] : value)
|
|
35559
|
+
if (WEB_ADDRESS.test(address))
|
|
35560
|
+
found.add(address);
|
|
35561
|
+
}
|
|
35562
|
+
}
|
|
35563
|
+
}
|
|
35564
|
+
return [...found];
|
|
35907
35565
|
}
|
|
35908
|
-
/** The
|
|
35909
|
-
|
|
35910
|
-
|
|
35911
|
-
|
|
35912
|
-
[
|
|
35913
|
-
[
|
|
35914
|
-
[
|
|
35915
|
-
[
|
|
35566
|
+
/** The patterns an import places (contract `site.patterns`). */
|
|
35567
|
+
var ImportPattern;
|
|
35568
|
+
(function (ImportPattern) {
|
|
35569
|
+
ImportPattern["PageHeader"] = "page-header.simple";
|
|
35570
|
+
ImportPattern["LongForm"] = "story.long-form";
|
|
35571
|
+
ImportPattern["CardGrid"] = "collection.card-grid";
|
|
35572
|
+
ImportPattern["ItemHero"] = "project.hero";
|
|
35573
|
+
ImportPattern["ItemBody"] = "item.body";
|
|
35574
|
+
ImportPattern["ItemGallery"] = "project.gallery";
|
|
35575
|
+
ImportPattern["ItemNext"] = "project.next";
|
|
35576
|
+
})(ImportPattern || (ImportPattern = {}));
|
|
35577
|
+
/** The optional parts an import leaves out (each pattern's `optional`). */
|
|
35578
|
+
const WITHOUT = {
|
|
35579
|
+
pageHeader: ['eyebrow', 'lead'],
|
|
35580
|
+
longForm: ['heading', 'lead', 'more'],
|
|
35581
|
+
cardGridHeader: ['header'],
|
|
35582
|
+
};
|
|
35583
|
+
/** How many pages the header lists — the rest stay reachable from their lists and links. */
|
|
35584
|
+
const IMPORT_NAV_MAX = 6;
|
|
35585
|
+
/** A list's "latest" source on the home page. */
|
|
35586
|
+
const LATEST_LIMIT = 3;
|
|
35587
|
+
const ITEM_PARAM = 'slug';
|
|
35588
|
+
const SLUG_FIELD = 'slug';
|
|
35589
|
+
const HOME_ROUTE = '/';
|
|
35590
|
+
const CONTACT_ARCHETYPE = 'contact';
|
|
35591
|
+
const ABOUT_ARCHETYPE = 'about';
|
|
35592
|
+
const COLLECTION_ARCHETYPE = 'collection';
|
|
35593
|
+
const DETAIL_ARCHETYPE = 'detail';
|
|
35594
|
+
/**
|
|
35595
|
+
* The words that say a list is the template's own type (the Studio's projects are a portfolio, the Practice's services,
|
|
35596
|
+
* the Place's menu) — its items take the template type's place, pages and all (`/work/:slug`). One table, by type name.
|
|
35597
|
+
*/
|
|
35598
|
+
const TEMPLATE_TYPE_WORDS = {
|
|
35599
|
+
projects: /\b(projects?|portfolios?|works?|case[\s-]?stud(?:y|ies)|showcase)\b/i,
|
|
35600
|
+
services: /\b(services?|treatments?|offers?)\b/i,
|
|
35601
|
+
menu: /\b(menus?|dishes|drinks)\b/i,
|
|
35602
|
+
};
|
|
35603
|
+
/** The field each role of a list's own type is written to, in field order, and how it is edited. */
|
|
35604
|
+
const OWN_FIELDS = [
|
|
35605
|
+
{ role: ContentRole.Title, name: 'title', control: ContentFieldControl.Text, required: true },
|
|
35606
|
+
{ role: null, name: SLUG_FIELD, control: ContentFieldControl.Text, required: true },
|
|
35607
|
+
{ role: ContentRole.Summary, name: 'summary', control: ContentFieldControl.Textarea },
|
|
35608
|
+
{ role: ContentRole.Image, name: 'cover', control: ContentFieldControl.Media },
|
|
35609
|
+
{ role: ContentRole.Gallery, name: 'gallery', control: ContentFieldControl.Gallery },
|
|
35610
|
+
{ role: ContentRole.Date, name: 'date', control: ContentFieldControl.Text },
|
|
35611
|
+
{ role: ContentRole.Meta, name: 'category', control: ContentFieldControl.Text },
|
|
35612
|
+
{ role: ContentRole.Body, name: 'body', control: ContentFieldControl.Textarea },
|
|
35916
35613
|
];
|
|
35917
|
-
|
|
35918
|
-
function
|
|
35919
|
-
|
|
35920
|
-
|
|
35921
|
-
|
|
35922
|
-
|
|
35614
|
+
/** What an item gives each role (null: nothing). */
|
|
35615
|
+
function itemValue(item, role) {
|
|
35616
|
+
switch (role) {
|
|
35617
|
+
case ContentRole.Title: return item.title;
|
|
35618
|
+
case ContentRole.Summary: return item.summary || null;
|
|
35619
|
+
case ContentRole.Image: return item.picture || null;
|
|
35620
|
+
case ContentRole.Gallery: return item.pictures?.length ? item.pictures : null;
|
|
35621
|
+
case ContentRole.Date: return item.date || null;
|
|
35622
|
+
case ContentRole.Meta: return item.meta || null;
|
|
35623
|
+
case ContentRole.Body: return item.text?.trim() ? item.text.trim() : null;
|
|
35624
|
+
default: return null;
|
|
35625
|
+
}
|
|
35923
35626
|
}
|
|
35924
|
-
|
|
35925
|
-
|
|
35926
|
-
function
|
|
35927
|
-
|
|
35928
|
-
return said.length ? [{ code: BuildNoticeCode.TypeLed, detail: said.join('; ') }] : [];
|
|
35627
|
+
const has = (items, role) => items.some(item => itemValue(item, role) !== null);
|
|
35628
|
+
/** Lowercase words joined by hyphens — a route segment or a slug. */
|
|
35629
|
+
function importSlug(text) {
|
|
35630
|
+
return text.normalize('NFKD').replace(/[̀-ͯ]/g, '').toLowerCase().replace(/[^a-z0-9]+/g, '-').replace(/^-+|-+$/g, '');
|
|
35929
35631
|
}
|
|
35930
|
-
|
|
35931
|
-
|
|
35932
|
-
|
|
35933
|
-
|
|
35934
|
-
|
|
35935
|
-
|
|
35632
|
+
/** Makes names unique in order: the second `a` is `a-2`. */
|
|
35633
|
+
class Names {
|
|
35634
|
+
constructor(taken = []) {
|
|
35635
|
+
this.taken = new Set();
|
|
35636
|
+
for (const t of taken)
|
|
35637
|
+
this.taken.add(t);
|
|
35638
|
+
}
|
|
35639
|
+
has(name) { return this.taken.has(name); }
|
|
35640
|
+
claim(name, join = '-') {
|
|
35641
|
+
let out = name;
|
|
35642
|
+
for (let n = 2; this.taken.has(out); n++)
|
|
35643
|
+
out = `${name}${join}${n}`;
|
|
35644
|
+
this.taken.add(out);
|
|
35645
|
+
return out;
|
|
35646
|
+
}
|
|
35647
|
+
}
|
|
35648
|
+
const camel = (slug) => slug.replace(/-([a-z0-9])/g, (_m, c) => c.toUpperCase());
|
|
35649
|
+
/** A route the plan accepts from an old path: each segment as lowercase words; null when nothing is left. */
|
|
35650
|
+
function routeOfPath(path) {
|
|
35651
|
+
if (!path)
|
|
35652
|
+
return null;
|
|
35653
|
+
const segments = path.split(/[?#]/)[0].split('/').map(importSlug).filter(Boolean);
|
|
35654
|
+
return segments.length ? `/${segments.join('/')}` : null;
|
|
35655
|
+
}
|
|
35656
|
+
/** The template's pages and sources that show its content type (a list or an item of it). */
|
|
35657
|
+
function templateTypeParts(template, typeName) {
|
|
35658
|
+
const aliases = new Set(template.dataSources.filter(d => d.type === PlanDataSourceType.Relative ? false : 'contentType' in d && d.contentType === typeName).map(d => d.alias));
|
|
35659
|
+
for (const d of template.dataSources)
|
|
35660
|
+
if (d.type === PlanDataSourceType.Relative && (aliases.has(d.of) || aliases.has(d.within)))
|
|
35661
|
+
aliases.add(d.alias);
|
|
35662
|
+
const pages = new Set(template.pages.filter(p => p.template === typeName || (!p.isHome && p.sections.some(s => s.binding && aliases.has(s.binding)))).map(p => p.key));
|
|
35663
|
+
return { aliases, pages };
|
|
35664
|
+
}
|
|
35665
|
+
/** The list that takes the template type's place, if one reads as it. */
|
|
35666
|
+
function templateListOf(template, lists) {
|
|
35667
|
+
for (const type of template.contentTypes) {
|
|
35668
|
+
const words = TEMPLATE_TYPE_WORDS[type.name];
|
|
35669
|
+
const list = words ? lists.find(l => l.items.length && [l.key, l.label, l.path ?? ''].some(w => words.test(w.replace(/[-_/]+/g, ' ')))) : undefined;
|
|
35670
|
+
if (list)
|
|
35671
|
+
return { type, list };
|
|
35672
|
+
}
|
|
35673
|
+
return null;
|
|
35674
|
+
}
|
|
35675
|
+
/** The items' slugs: their own where the site gave one, else from the title; unique within the list. */
|
|
35676
|
+
function slugsOf(items) {
|
|
35677
|
+
const names = new Names();
|
|
35678
|
+
return items.map((item, i) => names.claim(importSlug(item.slug ?? '') || importSlug(item.title) || `item-${i + 1}`));
|
|
35679
|
+
}
|
|
35680
|
+
/** The real items as a seed: one value per item for each role the type plays, the slug, and each item's old address. */
|
|
35681
|
+
function seedOf(type, items) {
|
|
35682
|
+
const perItem = {};
|
|
35683
|
+
const slugField = type.fields.some(f => f.name === SLUG_FIELD) ? SLUG_FIELD : null;
|
|
35684
|
+
if (slugField)
|
|
35685
|
+
perItem[slugField] = slugsOf(items);
|
|
35686
|
+
for (const [role, field] of Object.entries(type.roles)) {
|
|
35687
|
+
const list = type.fields.find(f => f.name === field)?.controller === ContentFieldControl.Gallery;
|
|
35688
|
+
perItem[field] = items.map(item => {
|
|
35689
|
+
const value = itemValue(item, role);
|
|
35690
|
+
if (list)
|
|
35691
|
+
return Array.isArray(value) ? [...value] : [];
|
|
35692
|
+
return typeof value === 'string' ? value : '';
|
|
35693
|
+
});
|
|
35694
|
+
}
|
|
35695
|
+
return { count: items.length, sample: false, isPublished: true, perItem, importedFrom: items.map(i => i.from) };
|
|
35696
|
+
}
|
|
35697
|
+
const fieldOf = (name, control, required) => ({ name, type: FIELD_TYPE_OF_CONTROL[control], controller: control, ...(required ? { required: true } : {}) });
|
|
35698
|
+
/** A list's own type: the roles its items fill, each its field (`OWN_FIELDS`). */
|
|
35699
|
+
function ownType(name, list) {
|
|
35700
|
+
const fields = [];
|
|
35701
|
+
const roles = {};
|
|
35702
|
+
for (const f of OWN_FIELDS) {
|
|
35703
|
+
if (f.role && f.role !== ContentRole.Title && !has(list.items, f.role))
|
|
35704
|
+
continue;
|
|
35705
|
+
fields.push(fieldOf(f.name, f.control, f.required));
|
|
35706
|
+
if (f.role)
|
|
35707
|
+
roles[f.role] = f.name;
|
|
35708
|
+
}
|
|
35709
|
+
const type = { name, label: list.label, roles: roles, fields };
|
|
35710
|
+
return { ...type, seed: seedOf(type, list.items) };
|
|
35711
|
+
}
|
|
35712
|
+
/** The template's type with the list's items: its own fields, and its `body` (the items' own text) when they have one.
|
|
35713
|
+
* A role the template gives a field of its own meaning (the Studio's `meta` is a location) is not filled from the site. */
|
|
35714
|
+
const TEMPLATE_ROLES_FILLED = [ContentRole.Title, ContentRole.Summary, ContentRole.Image, ContentRole.Gallery, ContentRole.Date, ContentRole.Body];
|
|
35715
|
+
function templateType(type, list) {
|
|
35716
|
+
const withBody = has(list.items, ContentRole.Body) && !roleField(type, ContentRole.Body);
|
|
35717
|
+
const bodyName = new Names(type.fields.map(f => f.name)).claim('body');
|
|
35718
|
+
const fields = withBody ? [...type.fields, fieldOf(bodyName, ContentFieldControl.Textarea)] : [...type.fields];
|
|
35719
|
+
const roles = (withBody ? { ...type.roles, [ContentRole.Body]: bodyName } : { ...type.roles });
|
|
35720
|
+
const filled = Object.fromEntries(Object.entries(roles).filter(([role]) => TEMPLATE_ROLES_FILLED.includes(role)));
|
|
35721
|
+
const seed = seedOf({ roles: filled, fields }, list.items);
|
|
35722
|
+
// A field the site does not fill is written empty (never the template's sample words).
|
|
35723
|
+
const empty = Object.fromEntries(fields.filter(f => !(f.name in (seed.perItem ?? {}))).map(f => [f.name, f.controller === ContentFieldControl.Gallery ? [] : '']));
|
|
35724
|
+
return { name: type.name, label: list.label || type.label, roles, fields, seed: { ...seed, ...empty } };
|
|
35725
|
+
}
|
|
35726
|
+
/** The sources of a list's own type: all of it, the latest few, one by its slug, and the next one. */
|
|
35727
|
+
function ownSources(name) {
|
|
35728
|
+
const list = name, latest = `${name}Latest`, item = `${name}Item`, next = `${name}Next`;
|
|
35729
|
+
return {
|
|
35730
|
+
list, latest, item,
|
|
35731
|
+
sources: [
|
|
35732
|
+
{ alias: list, type: PlanDataSourceType.Cms, mode: PlanDataSourceMode.Query, contentType: name },
|
|
35733
|
+
{ alias: latest, type: PlanDataSourceType.Cms, mode: PlanDataSourceMode.Query, contentType: name, limit: LATEST_LIMIT },
|
|
35734
|
+
{ alias: item, type: PlanDataSourceType.Cms, mode: PlanDataSourceMode.Single, contentType: name, filterByRouteParam: { field: SLUG_FIELD, routeParam: ITEM_PARAM } },
|
|
35735
|
+
{ alias: next, type: PlanDataSourceType.Relative, of: item, op: RelativeOp.SiblingsNext, within: list },
|
|
35736
|
+
],
|
|
35737
|
+
};
|
|
35738
|
+
}
|
|
35739
|
+
/** The page of one item: its hero, its own text, its pictures, the next one (each only when the items have it). */
|
|
35740
|
+
function itemSections(type, nextLabel) {
|
|
35741
|
+
const sections = [{ pattern: ImportPattern.ItemHero }];
|
|
35742
|
+
if (roleField(type, ContentRole.Body))
|
|
35743
|
+
sections.push({ pattern: ImportPattern.ItemBody });
|
|
35744
|
+
if (roleField(type, ContentRole.Gallery))
|
|
35745
|
+
sections.push({ pattern: ImportPattern.ItemGallery });
|
|
35746
|
+
sections.push(nextLabel ? { pattern: ImportPattern.ItemNext, slots: { label: nextLabel } } : { pattern: ImportPattern.ItemNext });
|
|
35747
|
+
return sections;
|
|
35748
|
+
}
|
|
35749
|
+
const pageHeader = (title, lead) => lead
|
|
35750
|
+
? { pattern: ImportPattern.PageHeader, slots: { title, lead }, without: ['eyebrow'] }
|
|
35751
|
+
: { pattern: ImportPattern.PageHeader, slots: { title }, without: [...WITHOUT.pageHeader] };
|
|
35752
|
+
/**
|
|
35753
|
+
* The scan's reading → the plan. Every list with items becomes a content type (the one that reads as the template's own
|
|
35754
|
+
* takes its place, routes and all); every page with words becomes a page; nothing is invented — a page or a list the
|
|
35755
|
+
* site did not have is not added, and the template's own pages are kept only where they are the site's frame (the home
|
|
35756
|
+
* page, the contact page).
|
|
35757
|
+
*/
|
|
35758
|
+
function planImport(reading, input) {
|
|
35759
|
+
const template = input.template ?? STUDIO_TEMPLATE;
|
|
35760
|
+
const lists = reading.lists.filter(l => l.items.length > 0);
|
|
35761
|
+
const matched = templateListOf(template, lists);
|
|
35762
|
+
const dropped = new Set(); // the template types no list fills
|
|
35763
|
+
const contentTypes = [];
|
|
35764
|
+
const dataSources = [];
|
|
35765
|
+
const templateParts = new Map();
|
|
35766
|
+
for (const type of template.contentTypes) {
|
|
35767
|
+
const parts = templateTypeParts(template, type.name);
|
|
35768
|
+
templateParts.set(type.name, parts);
|
|
35769
|
+
if (matched?.type.name === type.name) {
|
|
35770
|
+
contentTypes.push(templateType(type, matched.list));
|
|
35771
|
+
dataSources.push(...template.dataSources.filter(d => parts.aliases.has(d.alias)));
|
|
35772
|
+
}
|
|
35773
|
+
else
|
|
35774
|
+
dropped.add(type.name);
|
|
35775
|
+
}
|
|
35776
|
+
const droppedAliases = new Set([...dropped].flatMap(t => [...templateParts.get(t).aliases]));
|
|
35777
|
+
const droppedPages = new Set([...dropped].flatMap(t => [...templateParts.get(t).pages]));
|
|
35778
|
+
// Routes and names: the template's frame first, then the lists, then the pages.
|
|
35779
|
+
const kept = template.pages.filter(p => p.isHome || p.archetype === CONTACT_ARCHETYPE || (!droppedPages.has(p.key) && matched && templateParts.get(matched.type.name).pages.has(p.key)));
|
|
35780
|
+
const routes = new Names(kept.map(p => p.route));
|
|
35781
|
+
const keys = new Names(kept.map(p => p.key));
|
|
35782
|
+
const typeNames = new Names(template.contentTypes.map(t => t.name));
|
|
35783
|
+
const aliases = new Names(template.dataSources.map(d => d.alias));
|
|
35784
|
+
const listPages = [];
|
|
35785
|
+
const firstLatest = [];
|
|
35786
|
+
if (matched) {
|
|
35787
|
+
const listPage = template.pages.find(p => templateParts.get(matched.type.name).pages.has(p.key) && !p.template);
|
|
35788
|
+
const latest = template.dataSources.find(d => templateParts.get(matched.type.name).aliases.has(d.alias) && d.type === PlanDataSourceType.Cms && d.mode === PlanDataSourceMode.Query && d.limit);
|
|
35789
|
+
if (listPage && latest)
|
|
35790
|
+
firstLatest.push({ alias: latest.alias, route: listPage.route });
|
|
35791
|
+
}
|
|
35792
|
+
const typeOfMatched = matched ? contentTypes[0] : null;
|
|
35793
|
+
for (const list of lists) {
|
|
35794
|
+
if (list === matched?.list)
|
|
35795
|
+
continue;
|
|
35796
|
+
const name = typeNames.claim(camel(importSlug(list.key) || importSlug(list.label) || 'items'), '');
|
|
35797
|
+
const type = ownType(name, list);
|
|
35798
|
+
const own = ownSources(name);
|
|
35799
|
+
if ([own.list, own.latest, own.item, `${name}Next`].some(a => aliases.has(a)))
|
|
35800
|
+
continue; // never shadow a source
|
|
35801
|
+
own.sources.forEach(s => aliases.claim(s.alias));
|
|
35802
|
+
contentTypes.push(type);
|
|
35803
|
+
dataSources.push(...own.sources);
|
|
35804
|
+
const base = routeOfPath(list.path);
|
|
35805
|
+
const route = routes.claim(base && !routes.has(base) && base !== HOME_ROUTE ? base : `/${importSlug(list.label) || name.toLowerCase()}`);
|
|
35806
|
+
routes.claim(`${route}/:${ITEM_PARAM}`);
|
|
35807
|
+
const key = keys.claim(importSlug(list.label) || name.toLowerCase());
|
|
35808
|
+
listPages.push({
|
|
35809
|
+
key, name: list.label, route, inNav: true, archetype: COLLECTION_ARCHETYPE,
|
|
35810
|
+
sections: [pageHeader(list.label), { pattern: ImportPattern.CardGrid, binding: own.list, without: [...WITHOUT.cardGridHeader] }],
|
|
35811
|
+
});
|
|
35812
|
+
listPages.push({
|
|
35813
|
+
key: keys.claim(`${key}-item`), name: list.label, route: `${route}/:${ITEM_PARAM}`, inNav: false,
|
|
35814
|
+
template: name, routeSource: own.item, archetype: DETAIL_ARCHETYPE, sections: itemSections(type, list.label),
|
|
35815
|
+
});
|
|
35816
|
+
firstLatest.push({ alias: own.latest, route });
|
|
35817
|
+
}
|
|
35818
|
+
// The template's frame: a section that showed a dropped type shows the first list instead, or goes.
|
|
35819
|
+
const frame = [];
|
|
35820
|
+
for (const page of kept) {
|
|
35821
|
+
const sections = [];
|
|
35822
|
+
for (const section of page.sections) {
|
|
35823
|
+
if (!section.binding || !droppedAliases.has(section.binding)) {
|
|
35824
|
+
sections.push(section);
|
|
35825
|
+
continue;
|
|
35826
|
+
}
|
|
35827
|
+
const first = firstLatest[0];
|
|
35828
|
+
if (first)
|
|
35829
|
+
sections.push({ ...section, binding: first.alias, links: { ...(section.links ?? {}), more: first.route } });
|
|
35830
|
+
}
|
|
35831
|
+
// The template type's item page shows the items' own text after its hero.
|
|
35832
|
+
const body = page.template && typeOfMatched && page.template === typeOfMatched.name && roleField(typeOfMatched, ContentRole.Body)
|
|
35833
|
+
&& !sections.some(s => s.pattern === ImportPattern.ItemBody);
|
|
35834
|
+
if (body)
|
|
35835
|
+
sections.splice(Math.max(1, sections.findIndex(s => s.pattern === ImportPattern.ItemHero) + 1), 0, { pattern: ImportPattern.ItemBody });
|
|
35836
|
+
frame.push({ ...page, sections });
|
|
35837
|
+
}
|
|
35838
|
+
// The owner's pages of words.
|
|
35839
|
+
const textPages = [];
|
|
35840
|
+
for (const page of reading.pages) {
|
|
35841
|
+
const text = page.text.trim();
|
|
35842
|
+
const title = page.title.trim();
|
|
35843
|
+
if (!text || !title)
|
|
35844
|
+
continue;
|
|
35845
|
+
const base = routeOfPath(page.path);
|
|
35846
|
+
if (!base || base === HOME_ROUTE)
|
|
35847
|
+
continue; // the home page is rebuilt from the template
|
|
35848
|
+
if (routes.has(base) && frame.some(p => p.route === base))
|
|
35849
|
+
continue; // the template's contact page stands for it
|
|
35850
|
+
const route = routes.claim(base);
|
|
35851
|
+
textPages.push({
|
|
35852
|
+
key: keys.claim(importSlug(base.slice(1)) || importSlug(title) || 'page'), name: title, route, inNav: route.split('/').length === 2,
|
|
35853
|
+
archetype: ABOUT_ARCHETYPE,
|
|
35854
|
+
sections: [pageHeader(title, page.description?.trim() || undefined), { pattern: ImportPattern.LongForm, slots: { body1: text }, without: [...WITHOUT.longForm] }],
|
|
35855
|
+
});
|
|
35856
|
+
}
|
|
35857
|
+
// The header lists the lists first, then the pages, the contact page last — at most IMPORT_NAV_MAX.
|
|
35858
|
+
const home = frame.filter(p => p.isHome);
|
|
35859
|
+
const contact = frame.filter(p => !p.isHome && p.archetype === CONTACT_ARCHETYPE);
|
|
35860
|
+
const rest = frame.filter(p => !p.isHome && p.archetype !== CONTACT_ARCHETYPE);
|
|
35861
|
+
let room = IMPORT_NAV_MAX - contact.filter(p => p.inNav).length;
|
|
35862
|
+
const nav = (page) => {
|
|
35863
|
+
if (!page.inNav)
|
|
35864
|
+
return page;
|
|
35865
|
+
if (room > 0) {
|
|
35866
|
+
room--;
|
|
35867
|
+
return page;
|
|
35868
|
+
}
|
|
35869
|
+
return { ...page, inNav: false };
|
|
35870
|
+
};
|
|
35871
|
+
const pages = [...home, ...rest.map(nav), ...listPages.map(nav), ...textPages.map(nav), ...contact];
|
|
35872
|
+
return {
|
|
35873
|
+
version: SITE_PLAN_VERSION,
|
|
35874
|
+
source: { kind: SitePlanSourceKind.Import, scanId: reading.scanId },
|
|
35875
|
+
business: JSON.parse(JSON.stringify(reading.business)),
|
|
35876
|
+
...(reading.locale ? { locale: reading.locale } : {}),
|
|
35877
|
+
design: JSON.parse(JSON.stringify(input.design)),
|
|
35878
|
+
contentTypes,
|
|
35879
|
+
dataSources: JSON.parse(JSON.stringify(dataSources)),
|
|
35880
|
+
pages: JSON.parse(JSON.stringify(pages)),
|
|
35881
|
+
globals: JSON.parse(JSON.stringify(template.globals)),
|
|
35882
|
+
};
|
|
35883
|
+
}
|
|
35884
|
+
|
|
35885
|
+
/**
|
|
35886
|
+
* A site build's WIRE vocabulary (AI plan §3b, W2): what iox-cms's `site-builds` API answers and what every
|
|
35887
|
+
* client of it reads — the run's statuses and steps, what it created, why Undo kept something, the preflight's
|
|
35888
|
+
* refusals, and the one spelling of each document's `buildKey`. ONE definition: iox-cms stores and answers it,
|
|
35889
|
+
* the website wizard (W3) polls it. Pure types, enums and helpers; no transport.
|
|
35890
|
+
*/
|
|
35891
|
+
var SiteBuildKind;
|
|
35892
|
+
(function (SiteBuildKind) {
|
|
35893
|
+
SiteBuildKind["Build"] = "build";
|
|
35894
|
+
/** A new design for a built site, everything it holds kept (site-redesign RD2) — `redesign-run.ts`. */
|
|
35895
|
+
SiteBuildKind["Redesign"] = "redesign";
|
|
35896
|
+
/** Bring my site X4 (W2-5's first kind): a plan read from the owner's own site (`planImport`) — its real items keep
|
|
35897
|
+
* their old addresses (`importedFrom`). */
|
|
35898
|
+
SiteBuildKind["Import"] = "import";
|
|
35899
|
+
})(SiteBuildKind || (SiteBuildKind = {}));
|
|
35900
|
+
var SiteBuildStatus;
|
|
35901
|
+
(function (SiteBuildStatus) {
|
|
35902
|
+
SiteBuildStatus["Running"] = "running";
|
|
35903
|
+
SiteBuildStatus["Done"] = "done";
|
|
35904
|
+
SiteBuildStatus["Failed"] = "failed";
|
|
35905
|
+
SiteBuildStatus["Undoing"] = "undoing";
|
|
35906
|
+
SiteBuildStatus["Undone"] = "undone";
|
|
35907
|
+
/** A redesign (RD2): its new design going onto the pages, header, footer and look — page by page. */
|
|
35908
|
+
SiteBuildStatus["Switching"] = "switching";
|
|
35909
|
+
/** A redesign switched: the site wears it; Back is open for `REDESIGN_BACK_DAYS`. */
|
|
35910
|
+
SiteBuildStatus["Switched"] = "switched";
|
|
35911
|
+
/** A redesign going Back: its snapshot restored, page by page. */
|
|
35912
|
+
SiteBuildStatus["Restoring"] = "restoring";
|
|
35913
|
+
/** A redesign gone Back: the site wears what it wore before the switch. */
|
|
35914
|
+
SiteBuildStatus["Restored"] = "restored";
|
|
35915
|
+
/** A staged (or failed, never switched) redesign let go — by the owner, or by a newer redesign: no page was written. */
|
|
35916
|
+
SiteBuildStatus["Discarded"] = "discarded";
|
|
35917
|
+
})(SiteBuildStatus || (SiteBuildStatus = {}));
|
|
35918
|
+
/** The statuses a runner advances — and the ones that hold the org's single-run slot. */
|
|
35919
|
+
const ACTIVE_BUILD_STATUSES = [SiteBuildStatus.Running, SiteBuildStatus.Undoing, SiteBuildStatus.Switching, SiteBuildStatus.Restoring];
|
|
35920
|
+
/** The steps of a build, in the order they run. */
|
|
35921
|
+
var BuildStep;
|
|
35922
|
+
(function (BuildStep) {
|
|
35923
|
+
BuildStep["Preflight"] = "preflight";
|
|
35924
|
+
BuildStep["ContentTypes"] = "content-types";
|
|
35925
|
+
BuildStep["SampleImages"] = "sample-images";
|
|
35926
|
+
/** Bring my site X5: the pictures of the owner's own site, copied into the studio (`media/imported/`, never hot-linked) —
|
|
35927
|
+
* only in a run whose plan was read from a site and holds pictures (`importedPicturesOf`). */
|
|
35928
|
+
BuildStep["ImportPictures"] = "import-pictures";
|
|
35929
|
+
/** I2: the curated stock photos the plan's empty picture slots take, copied into the studio (never hot-linked). */
|
|
35930
|
+
BuildStep["StockPhotos"] = "stock-photos";
|
|
35931
|
+
BuildStep["Items"] = "items";
|
|
35932
|
+
/** Commerce G1: what the business sells, into the studio's SHOP — its categories, then sample products (no price). */
|
|
35933
|
+
BuildStep["Shop"] = "shop";
|
|
35934
|
+
BuildStep["DataSources"] = "data-sources";
|
|
35935
|
+
BuildStep["Pages"] = "pages";
|
|
35936
|
+
BuildStep["Globals"] = "globals";
|
|
35937
|
+
BuildStep["Look"] = "look";
|
|
35938
|
+
})(BuildStep || (BuildStep = {}));
|
|
35939
|
+
const BUILD_STEPS = Object.values(BuildStep);
|
|
35940
|
+
/** The steps a build of `plan` takes, in order: every one, the shop's only when the plan sells (commerce G1), the imported
|
|
35941
|
+
* pictures' only when the plan was read from a site that has some (X5). */
|
|
35942
|
+
function buildStepsOf(plan) {
|
|
35943
|
+
const sells = planSells(plan);
|
|
35944
|
+
const pictures = importedPicturesOf(plan).length > 0;
|
|
35945
|
+
return BUILD_STEPS.filter(step => (step !== BuildStep.Shop || sells) && (step !== BuildStep.ImportPictures || pictures));
|
|
35946
|
+
}
|
|
35947
|
+
var StepState;
|
|
35948
|
+
(function (StepState) {
|
|
35949
|
+
StepState["Wait"] = "wait";
|
|
35950
|
+
StepState["Run"] = "run";
|
|
35951
|
+
StepState["Done"] = "done";
|
|
35952
|
+
StepState["Failed"] = "failed";
|
|
35953
|
+
})(StepState || (StepState = {}));
|
|
35954
|
+
/** What a build creates, as Undo walks it. */
|
|
35955
|
+
var CreatedKind;
|
|
35956
|
+
(function (CreatedKind) {
|
|
35957
|
+
CreatedKind["ContentType"] = "content-type";
|
|
35958
|
+
/** Fields the build added to a content type it found (types are shared by every organization of a studio). */
|
|
35959
|
+
CreatedKind["ContentTypeFields"] = "content-type-fields";
|
|
35960
|
+
CreatedKind["SampleImage"] = "sample-image";
|
|
35961
|
+
/** A stock photo copied into the studio's storage (`media/stock/…`), with its assets row. */
|
|
35962
|
+
CreatedKind["StockPhoto"] = "stock-photo";
|
|
35963
|
+
/** Bring my site X5: a picture of the owner's own site copied into the studio's storage (`media/imported/…`), with its
|
|
35964
|
+
* assets row (`source: 'import'`, its old address) — removed by Undo once nothing that stays shows it. */
|
|
35965
|
+
CreatedKind["ImportedPicture"] = "imported-picture";
|
|
35966
|
+
CreatedKind["Item"] = "item";
|
|
35967
|
+
/** Commerce G1: a shop category the build added (one the studio had is reused, never recorded). */
|
|
35968
|
+
CreatedKind["ShopCategory"] = "shop-category";
|
|
35969
|
+
/** Commerce G1: a sample product, written through the shop's own write path. */
|
|
35970
|
+
CreatedKind["ShopProduct"] = "shop-product";
|
|
35971
|
+
CreatedKind["DataSource"] = "data-source";
|
|
35972
|
+
CreatedKind["Page"] = "page";
|
|
35973
|
+
/** RD3-D3 (a) Replace: a page an earlier Undo kept, moved aside (`/<route>-previous`, a draft) so the plan's page takes
|
|
35974
|
+
* its address — Undo puts it back while it is as the move left it and its address is free (`CreatedRecord.from`). */
|
|
35975
|
+
CreatedKind["PageMoved"] = "page-moved";
|
|
35976
|
+
CreatedKind["Global"] = "global";
|
|
35977
|
+
CreatedKind["Look"] = "look";
|
|
35978
|
+
})(CreatedKind || (CreatedKind = {}));
|
|
35979
|
+
/** Why Undo left something in place. */
|
|
35980
|
+
var KeptReason;
|
|
35981
|
+
(function (KeptReason) {
|
|
35982
|
+
KeptReason["Edited"] = "edited";
|
|
35983
|
+
KeptReason["Published"] = "published";
|
|
35984
|
+
KeptReason["InUse"] = "in-use";
|
|
35985
|
+
/** Added to a content type every organization shares: removing a field is the studio owner's change. */
|
|
35986
|
+
KeptReason["Shared"] = "shared";
|
|
35987
|
+
})(KeptReason || (KeptReason = {}));
|
|
35988
|
+
var BuildNoticeCode;
|
|
35989
|
+
(function (BuildNoticeCode) {
|
|
35990
|
+
/** Storage is not configured: sample items get the empty image box, and the run says so. */
|
|
35991
|
+
BuildNoticeCode["NoStorage"] = "no-storage";
|
|
35992
|
+
/** A content type the build reuses is not public in this studio: the site will not show its items. */
|
|
35993
|
+
BuildNoticeCode["ContentTypeNotPublic"] = "content-type-not-public";
|
|
35994
|
+
/** The stock library could not be read: the picture slots keep the empty box, and the run says so. */
|
|
35995
|
+
BuildNoticeCode["StockUnavailable"] = "stock-unavailable";
|
|
35996
|
+
/** The stock library was read but holds no photo for this kind of business (never built, or reviewed down to
|
|
35997
|
+
* none): the picture slots keep the empty box, and the run says so (I2.1 — never silently). */
|
|
35998
|
+
BuildNoticeCode["StockMissing"] = "stock-missing";
|
|
35999
|
+
/** M7: a picture made for the site was refused by its review twice (or its second try did not fit the cost shown):
|
|
36000
|
+
* stock or the empty box stands in, and the run says so. */
|
|
36001
|
+
BuildNoticeCode["PictureFallback"] = "picture-fallback";
|
|
36002
|
+
/** Commerce G1 (shop-aware A-D9): the studio already sells products — the site shows them, and no sample is added. */
|
|
36003
|
+
BuildNoticeCode["ShopHasProducts"] = "shop-has-products";
|
|
36004
|
+
/** Commerce G1: the studio had never set its currency and VAT — the build stored the ones its language implies
|
|
36005
|
+
* (Hebrew: ILS and 18%), said here so the owner checks them in Settings ▸ General before setting prices. */
|
|
36006
|
+
BuildNoticeCode["ShopMoneyInferred"] = "shop-money-inferred";
|
|
36007
|
+
/** Commerce G2: the facts the owner gave (email, phone, address) became the shop's contact details where it had none
|
|
36008
|
+
* — said, so the owner adds what only they know (the legal name, the business number) in Shop ▸ Settings. */
|
|
36009
|
+
BuildNoticeCode["ShopBusinessFromFacts"] = "shop-business-from-facts";
|
|
36010
|
+
/** RD3-D3 (a) Keep mine: a page an earlier Undo kept stays at an address the plan builds — the plan's page there is
|
|
36011
|
+
* not built. */
|
|
36012
|
+
BuildNoticeCode["KeptPageSkipped"] = "kept-page-skipped";
|
|
36013
|
+
/** RD3-D3 (a) Replace: that page moved aside as a draft (`/<route>-previous`) — Undo puts it back. */
|
|
36014
|
+
BuildNoticeCode["KeptPageMoved"] = "kept-page-moved";
|
|
36015
|
+
/** HI1a: the header the plan asked for could not be worn as asked (a long name between two menus, a part the site
|
|
36016
|
+
* cannot carry) — the composer mended it, and the run says so; the owner changes it in the builder. */
|
|
36017
|
+
BuildNoticeCode["HeaderMended"] = "header-mended";
|
|
36018
|
+
/** AW8: the opening the plan asked for was mended (an award word on a basic build, a part the site cannot carry) —
|
|
36019
|
+
* said, so the owner knows the home page opens a little differently and where to change it. */
|
|
36020
|
+
BuildNoticeCode["OpeningMended"] = "opening-mended";
|
|
36021
|
+
/** LI5: the footer the plan asked for was mended (a word that waits drawn as its stand-in, a one-line footer that
|
|
36022
|
+
* holds only some parts) — said like the header's and the opening's. */
|
|
36023
|
+
BuildNoticeCode["FooterMended"] = "footer-mended";
|
|
36024
|
+
/** AW6: the body the plan asked for was mended (a section edge that comes with the award plan, on a basic build) —
|
|
36025
|
+
* said like the header's, the opening's and the footer's. */
|
|
36026
|
+
BuildNoticeCode["BodyMended"] = "body-mended";
|
|
36027
|
+
/** iox-ui#129: pictures nothing fills were not drawn as empty boxes — those sections were composed type-led (the home
|
|
36028
|
+
* page opening on its words, a list's cards without their picture). Said once, so the owner knows a photo of theirs
|
|
36029
|
+
* brings the picture-led section back (a Re-fit, or the next build). */
|
|
36030
|
+
BuildNoticeCode["TypeLed"] = "type-led";
|
|
36031
|
+
/** Bring my site X5: some pictures of the owner's site were not copied (not a picture we keep, too large, unreachable,
|
|
36032
|
+
* or past the plan's picture or size limit) — the items show none in their place (never the old site's), said once,
|
|
36033
|
+
* so the owner adds them in the builder. */
|
|
36034
|
+
BuildNoticeCode["ImportPicturesLeft"] = "import-pictures-left";
|
|
36035
|
+
})(BuildNoticeCode || (BuildNoticeCode = {}));
|
|
36036
|
+
/** RD3-D3 (a): what a build does with a page an earlier Undo kept at an address its plan builds — the header and footer's
|
|
36037
|
+
* pair (`replaceGlobals`), for pages. */
|
|
36038
|
+
var KeptPagesChoice;
|
|
36039
|
+
(function (KeptPagesChoice) {
|
|
36040
|
+
/** Build every other page; leave these as they are. */
|
|
36041
|
+
KeptPagesChoice["Keep"] = "keep";
|
|
36042
|
+
/** Move each aside as a draft at `/<route>-previous` (`/shop-previous/:slug` for a per-item page) and build the plan's
|
|
36043
|
+
* page at its address. Nothing is deleted. */
|
|
36044
|
+
KeptPagesChoice["Replace"] = "replace";
|
|
36045
|
+
})(KeptPagesChoice || (KeptPagesChoice = {}));
|
|
36046
|
+
/** The suffix a replaced page's address takes. */
|
|
36047
|
+
const PREVIOUS_ROUTE_SUFFIX = '-previous';
|
|
36048
|
+
/** Where a page moved aside goes: `/<route>-previous`, then `-previous-2`… — never an address in `taken` (shapes
|
|
36049
|
+
* compared case-insensitively, trailing slash and parameter names ignored). The home page (`/`) goes to `/home-previous`.
|
|
36050
|
+
*
|
|
36051
|
+
* ⚠️ The suffix goes on the route's LAST STATIC segment, never on a `:param` (vectoriox/iox-ui#100): `/shop/:slug` moved
|
|
36052
|
+
* to `/shop/:slug-previous` still answered every `/shop/<item>` — a parameter matches the whole segment — and, older
|
|
36053
|
+
* and published by Publish site, the replaced product page was served instead of the new one. So `/shop/:slug` →
|
|
36054
|
+
* `/shop-previous/:slug`, and a route of parameters only (`/:slug`) → `/previous/:slug`. */
|
|
36055
|
+
function previousRoute(route, taken) {
|
|
36056
|
+
const key = (r) => (r.replace(/\/+$/, '') || '/').replace(/\/:[^/]+/g, '/:').toLowerCase();
|
|
36057
|
+
const held = new Set(taken.map(key));
|
|
36058
|
+
const segments = (route.replace(/\/+$/, '') || '/home').split('/').filter(Boolean);
|
|
36059
|
+
if (!segments.length)
|
|
36060
|
+
segments.push('home');
|
|
36061
|
+
const at = segments.map((seg, i) => (seg.startsWith(':') ? -1 : i)).filter(i => i >= 0).pop();
|
|
36062
|
+
const shaped = (suffix) => {
|
|
36063
|
+
const out = [...segments];
|
|
36064
|
+
if (at === undefined)
|
|
36065
|
+
out.unshift(`previous${suffix}`);
|
|
36066
|
+
else
|
|
36067
|
+
out[at] = `${out[at]}${PREVIOUS_ROUTE_SUFFIX}${suffix}`;
|
|
36068
|
+
return `/${out.join('/')}`;
|
|
36069
|
+
};
|
|
36070
|
+
let candidate = shaped('');
|
|
36071
|
+
for (let n = 2; held.has(key(candidate)); n++)
|
|
36072
|
+
candidate = shaped(`-${n}`);
|
|
36073
|
+
return candidate;
|
|
36074
|
+
}
|
|
36075
|
+
/** The compose issues the run SAYS (header, opening, footer), each kind once (the wizard tracks a notice by its code): the words of every mend of
|
|
36076
|
+
* that kind joined, for the log and the API; the screen shows the code's own sentence. An opening that only found no
|
|
36077
|
+
* place for a word it carried is not a mend of the mix, so it is not said. */
|
|
36078
|
+
const MEND_NOTICES = [
|
|
36079
|
+
[ComposeIssueCode.HeaderMended, BuildNoticeCode.HeaderMended],
|
|
36080
|
+
[ComposeIssueCode.OpeningMended, BuildNoticeCode.OpeningMended],
|
|
36081
|
+
[ComposeIssueCode.FooterMended, BuildNoticeCode.FooterMended],
|
|
36082
|
+
[ComposeIssueCode.BodyMended, BuildNoticeCode.BodyMended],
|
|
36083
|
+
];
|
|
36084
|
+
const CARRY_ONLY = /^the opening found no place for /;
|
|
36085
|
+
function mendNotices(issues) {
|
|
36086
|
+
return MEND_NOTICES.flatMap(([issue, notice]) => {
|
|
36087
|
+
const said = [...new Set(issues.filter(i => i.code === issue && !CARRY_ONLY.test(i.detail)).map(i => i.detail))];
|
|
36088
|
+
return said.length ? [{ code: notice, detail: said.join('; ') }] : [];
|
|
36089
|
+
});
|
|
36090
|
+
}
|
|
36091
|
+
/** iox-ui#129: what a composition made type-led, said once (`BuildNoticeCode.TypeLed`) — every change's words joined,
|
|
36092
|
+
* for the log and the API; the screen shows the code's own sentence. Nothing type-led: nothing said. */
|
|
36093
|
+
function typeLedNotices(typeLed) {
|
|
36094
|
+
const said = [...new Set((typeLed?.changes ?? []).map(c => c.said))];
|
|
36095
|
+
return said.length ? [{ code: BuildNoticeCode.TypeLed, detail: said.join('; ') }] : [];
|
|
36096
|
+
}
|
|
36097
|
+
var PreflightRefusalCode;
|
|
36098
|
+
(function (PreflightRefusalCode) {
|
|
36099
|
+
/** The Site Plan itself is invalid (`validateSitePlan`); `issue` is the validator's code. */
|
|
36100
|
+
PreflightRefusalCode["InvalidPlan"] = "invalid-plan";
|
|
36101
|
+
/** A route the plan wants is already a page of this organization. */
|
|
36102
|
+
PreflightRefusalCode["RouteTaken"] = "route-taken";
|
|
35936
36103
|
/** The studio's content type of that name stores a field the plan needs differently (type or control) —
|
|
35937
36104
|
* types are shared by every organization, so the build reuses one it finds and adds what it lacks. */
|
|
35938
36105
|
PreflightRefusalCode["ContentTypeConflict"] = "content-type-conflict";
|
|
@@ -35963,6 +36130,7 @@ const buildKeys = {
|
|
|
35963
36130
|
shopProduct: (n) => `shop-product:${n}`,
|
|
35964
36131
|
sampleImage: (n) => `sample-image:${n}`,
|
|
35965
36132
|
stockPhoto: (libraryKey) => `stock-photo:${libraryKey}`,
|
|
36133
|
+
importedPicture: (originalUrl) => `imported-picture:${originalUrl}`,
|
|
35966
36134
|
dataSource: (alias) => `data-source:${alias}`,
|
|
35967
36135
|
page: (key) => `page:${key}`,
|
|
35968
36136
|
global: (nodeId) => `global:${nodeId}`,
|
|
@@ -36005,6 +36173,7 @@ function buildStepFacts(plan, actions = {}) {
|
|
|
36005
36173
|
contentTypes: plan.contentTypes.map(t => t.label),
|
|
36006
36174
|
contentTypeActions,
|
|
36007
36175
|
items: plan.contentTypes.reduce((n, t) => n + (t.seed?.count ?? 0), 0),
|
|
36176
|
+
pictures: importedPicturesOf(plan).length,
|
|
36008
36177
|
products: plan.shop?.products.length ?? 0,
|
|
36009
36178
|
categories: plan.shop?.categories.length ?? 0,
|
|
36010
36179
|
pages: plan.pages.length,
|
|
@@ -37075,328 +37244,6 @@ function withAdditions(plan, additions, only) {
|
|
|
37075
37244
|
return { ...plan, pages: [...plan.pages, ...pages], contentTypes: [...plan.contentTypes, ...types], dataSources: [...plan.dataSources, ...sources] };
|
|
37076
37245
|
}
|
|
37077
37246
|
|
|
37078
|
-
function isImportPlan(plan) {
|
|
37079
|
-
return plan.source.kind === SitePlanSourceKind.Import;
|
|
37080
|
-
}
|
|
37081
|
-
/** The patterns an import places (contract `site.patterns`). */
|
|
37082
|
-
var ImportPattern;
|
|
37083
|
-
(function (ImportPattern) {
|
|
37084
|
-
ImportPattern["PageHeader"] = "page-header.simple";
|
|
37085
|
-
ImportPattern["LongForm"] = "story.long-form";
|
|
37086
|
-
ImportPattern["CardGrid"] = "collection.card-grid";
|
|
37087
|
-
ImportPattern["ItemHero"] = "project.hero";
|
|
37088
|
-
ImportPattern["ItemBody"] = "item.body";
|
|
37089
|
-
ImportPattern["ItemGallery"] = "project.gallery";
|
|
37090
|
-
ImportPattern["ItemNext"] = "project.next";
|
|
37091
|
-
})(ImportPattern || (ImportPattern = {}));
|
|
37092
|
-
/** The optional parts an import leaves out (each pattern's `optional`). */
|
|
37093
|
-
const WITHOUT = {
|
|
37094
|
-
pageHeader: ['eyebrow', 'lead'],
|
|
37095
|
-
longForm: ['heading', 'lead', 'more'],
|
|
37096
|
-
cardGridHeader: ['header'],
|
|
37097
|
-
};
|
|
37098
|
-
/** How many pages the header lists — the rest stay reachable from their lists and links. */
|
|
37099
|
-
const IMPORT_NAV_MAX = 6;
|
|
37100
|
-
/** A list's "latest" source on the home page. */
|
|
37101
|
-
const LATEST_LIMIT = 3;
|
|
37102
|
-
const ITEM_PARAM = 'slug';
|
|
37103
|
-
const SLUG_FIELD = 'slug';
|
|
37104
|
-
const HOME_ROUTE = '/';
|
|
37105
|
-
const CONTACT_ARCHETYPE = 'contact';
|
|
37106
|
-
const ABOUT_ARCHETYPE = 'about';
|
|
37107
|
-
const COLLECTION_ARCHETYPE = 'collection';
|
|
37108
|
-
const DETAIL_ARCHETYPE = 'detail';
|
|
37109
|
-
/**
|
|
37110
|
-
* The words that say a list is the template's own type (the Studio's projects are a portfolio, the Practice's services,
|
|
37111
|
-
* the Place's menu) — its items take the template type's place, pages and all (`/work/:slug`). One table, by type name.
|
|
37112
|
-
*/
|
|
37113
|
-
const TEMPLATE_TYPE_WORDS = {
|
|
37114
|
-
projects: /\b(projects?|portfolios?|works?|case[\s-]?stud(?:y|ies)|showcase)\b/i,
|
|
37115
|
-
services: /\b(services?|treatments?|offers?)\b/i,
|
|
37116
|
-
menu: /\b(menus?|dishes|drinks)\b/i,
|
|
37117
|
-
};
|
|
37118
|
-
/** The field each role of a list's own type is written to, in field order, and how it is edited. */
|
|
37119
|
-
const OWN_FIELDS = [
|
|
37120
|
-
{ role: ContentRole.Title, name: 'title', control: ContentFieldControl.Text, required: true },
|
|
37121
|
-
{ role: null, name: SLUG_FIELD, control: ContentFieldControl.Text, required: true },
|
|
37122
|
-
{ role: ContentRole.Summary, name: 'summary', control: ContentFieldControl.Textarea },
|
|
37123
|
-
{ role: ContentRole.Image, name: 'cover', control: ContentFieldControl.Media },
|
|
37124
|
-
{ role: ContentRole.Gallery, name: 'gallery', control: ContentFieldControl.Gallery },
|
|
37125
|
-
{ role: ContentRole.Date, name: 'date', control: ContentFieldControl.Text },
|
|
37126
|
-
{ role: ContentRole.Meta, name: 'category', control: ContentFieldControl.Text },
|
|
37127
|
-
{ role: ContentRole.Body, name: 'body', control: ContentFieldControl.Textarea },
|
|
37128
|
-
];
|
|
37129
|
-
/** What an item gives each role (null: nothing). */
|
|
37130
|
-
function itemValue(item, role) {
|
|
37131
|
-
switch (role) {
|
|
37132
|
-
case ContentRole.Title: return item.title;
|
|
37133
|
-
case ContentRole.Summary: return item.summary || null;
|
|
37134
|
-
case ContentRole.Image: return item.picture || null;
|
|
37135
|
-
case ContentRole.Gallery: return item.pictures?.length ? item.pictures : null;
|
|
37136
|
-
case ContentRole.Date: return item.date || null;
|
|
37137
|
-
case ContentRole.Meta: return item.meta || null;
|
|
37138
|
-
case ContentRole.Body: return item.text?.trim() ? item.text.trim() : null;
|
|
37139
|
-
default: return null;
|
|
37140
|
-
}
|
|
37141
|
-
}
|
|
37142
|
-
const has = (items, role) => items.some(item => itemValue(item, role) !== null);
|
|
37143
|
-
/** Lowercase words joined by hyphens — a route segment or a slug. */
|
|
37144
|
-
function importSlug(text) {
|
|
37145
|
-
return text.normalize('NFKD').replace(/[̀-ͯ]/g, '').toLowerCase().replace(/[^a-z0-9]+/g, '-').replace(/^-+|-+$/g, '');
|
|
37146
|
-
}
|
|
37147
|
-
/** Makes names unique in order: the second `a` is `a-2`. */
|
|
37148
|
-
class Names {
|
|
37149
|
-
constructor(taken = []) {
|
|
37150
|
-
this.taken = new Set();
|
|
37151
|
-
for (const t of taken)
|
|
37152
|
-
this.taken.add(t);
|
|
37153
|
-
}
|
|
37154
|
-
has(name) { return this.taken.has(name); }
|
|
37155
|
-
claim(name, join = '-') {
|
|
37156
|
-
let out = name;
|
|
37157
|
-
for (let n = 2; this.taken.has(out); n++)
|
|
37158
|
-
out = `${name}${join}${n}`;
|
|
37159
|
-
this.taken.add(out);
|
|
37160
|
-
return out;
|
|
37161
|
-
}
|
|
37162
|
-
}
|
|
37163
|
-
const camel = (slug) => slug.replace(/-([a-z0-9])/g, (_m, c) => c.toUpperCase());
|
|
37164
|
-
/** A route the plan accepts from an old path: each segment as lowercase words; null when nothing is left. */
|
|
37165
|
-
function routeOfPath(path) {
|
|
37166
|
-
if (!path)
|
|
37167
|
-
return null;
|
|
37168
|
-
const segments = path.split(/[?#]/)[0].split('/').map(importSlug).filter(Boolean);
|
|
37169
|
-
return segments.length ? `/${segments.join('/')}` : null;
|
|
37170
|
-
}
|
|
37171
|
-
/** The template's pages and sources that show its content type (a list or an item of it). */
|
|
37172
|
-
function templateTypeParts(template, typeName) {
|
|
37173
|
-
const aliases = new Set(template.dataSources.filter(d => d.type === PlanDataSourceType.Relative ? false : 'contentType' in d && d.contentType === typeName).map(d => d.alias));
|
|
37174
|
-
for (const d of template.dataSources)
|
|
37175
|
-
if (d.type === PlanDataSourceType.Relative && (aliases.has(d.of) || aliases.has(d.within)))
|
|
37176
|
-
aliases.add(d.alias);
|
|
37177
|
-
const pages = new Set(template.pages.filter(p => p.template === typeName || (!p.isHome && p.sections.some(s => s.binding && aliases.has(s.binding)))).map(p => p.key));
|
|
37178
|
-
return { aliases, pages };
|
|
37179
|
-
}
|
|
37180
|
-
/** The list that takes the template type's place, if one reads as it. */
|
|
37181
|
-
function templateListOf(template, lists) {
|
|
37182
|
-
for (const type of template.contentTypes) {
|
|
37183
|
-
const words = TEMPLATE_TYPE_WORDS[type.name];
|
|
37184
|
-
const list = words ? lists.find(l => l.items.length && [l.key, l.label, l.path ?? ''].some(w => words.test(w.replace(/[-_/]+/g, ' ')))) : undefined;
|
|
37185
|
-
if (list)
|
|
37186
|
-
return { type, list };
|
|
37187
|
-
}
|
|
37188
|
-
return null;
|
|
37189
|
-
}
|
|
37190
|
-
/** The items' slugs: their own where the site gave one, else from the title; unique within the list. */
|
|
37191
|
-
function slugsOf(items) {
|
|
37192
|
-
const names = new Names();
|
|
37193
|
-
return items.map((item, i) => names.claim(importSlug(item.slug ?? '') || importSlug(item.title) || `item-${i + 1}`));
|
|
37194
|
-
}
|
|
37195
|
-
/** The real items as a seed: one value per item for each role the type plays, the slug, and each item's old address. */
|
|
37196
|
-
function seedOf(type, items) {
|
|
37197
|
-
const perItem = {};
|
|
37198
|
-
const slugField = type.fields.some(f => f.name === SLUG_FIELD) ? SLUG_FIELD : null;
|
|
37199
|
-
if (slugField)
|
|
37200
|
-
perItem[slugField] = slugsOf(items);
|
|
37201
|
-
for (const [role, field] of Object.entries(type.roles)) {
|
|
37202
|
-
const list = type.fields.find(f => f.name === field)?.controller === ContentFieldControl.Gallery;
|
|
37203
|
-
perItem[field] = items.map(item => {
|
|
37204
|
-
const value = itemValue(item, role);
|
|
37205
|
-
if (list)
|
|
37206
|
-
return Array.isArray(value) ? [...value] : [];
|
|
37207
|
-
return typeof value === 'string' ? value : '';
|
|
37208
|
-
});
|
|
37209
|
-
}
|
|
37210
|
-
return { count: items.length, sample: false, isPublished: true, perItem, importedFrom: items.map(i => i.from) };
|
|
37211
|
-
}
|
|
37212
|
-
const fieldOf = (name, control, required) => ({ name, type: FIELD_TYPE_OF_CONTROL[control], controller: control, ...(required ? { required: true } : {}) });
|
|
37213
|
-
/** A list's own type: the roles its items fill, each its field (`OWN_FIELDS`). */
|
|
37214
|
-
function ownType(name, list) {
|
|
37215
|
-
const fields = [];
|
|
37216
|
-
const roles = {};
|
|
37217
|
-
for (const f of OWN_FIELDS) {
|
|
37218
|
-
if (f.role && f.role !== ContentRole.Title && !has(list.items, f.role))
|
|
37219
|
-
continue;
|
|
37220
|
-
fields.push(fieldOf(f.name, f.control, f.required));
|
|
37221
|
-
if (f.role)
|
|
37222
|
-
roles[f.role] = f.name;
|
|
37223
|
-
}
|
|
37224
|
-
const type = { name, label: list.label, roles: roles, fields };
|
|
37225
|
-
return { ...type, seed: seedOf(type, list.items) };
|
|
37226
|
-
}
|
|
37227
|
-
/** The template's type with the list's items: its own fields, and its `body` (the items' own text) when they have one.
|
|
37228
|
-
* A role the template gives a field of its own meaning (the Studio's `meta` is a location) is not filled from the site. */
|
|
37229
|
-
const TEMPLATE_ROLES_FILLED = [ContentRole.Title, ContentRole.Summary, ContentRole.Image, ContentRole.Gallery, ContentRole.Date, ContentRole.Body];
|
|
37230
|
-
function templateType(type, list) {
|
|
37231
|
-
const withBody = has(list.items, ContentRole.Body) && !roleField(type, ContentRole.Body);
|
|
37232
|
-
const bodyName = new Names(type.fields.map(f => f.name)).claim('body');
|
|
37233
|
-
const fields = withBody ? [...type.fields, fieldOf(bodyName, ContentFieldControl.Textarea)] : [...type.fields];
|
|
37234
|
-
const roles = (withBody ? { ...type.roles, [ContentRole.Body]: bodyName } : { ...type.roles });
|
|
37235
|
-
const filled = Object.fromEntries(Object.entries(roles).filter(([role]) => TEMPLATE_ROLES_FILLED.includes(role)));
|
|
37236
|
-
const seed = seedOf({ roles: filled, fields }, list.items);
|
|
37237
|
-
// A field the site does not fill is written empty (never the template's sample words).
|
|
37238
|
-
const empty = Object.fromEntries(fields.filter(f => !(f.name in (seed.perItem ?? {}))).map(f => [f.name, f.controller === ContentFieldControl.Gallery ? [] : '']));
|
|
37239
|
-
return { name: type.name, label: list.label || type.label, roles, fields, seed: { ...seed, ...empty } };
|
|
37240
|
-
}
|
|
37241
|
-
/** The sources of a list's own type: all of it, the latest few, one by its slug, and the next one. */
|
|
37242
|
-
function ownSources(name) {
|
|
37243
|
-
const list = name, latest = `${name}Latest`, item = `${name}Item`, next = `${name}Next`;
|
|
37244
|
-
return {
|
|
37245
|
-
list, latest, item,
|
|
37246
|
-
sources: [
|
|
37247
|
-
{ alias: list, type: PlanDataSourceType.Cms, mode: PlanDataSourceMode.Query, contentType: name },
|
|
37248
|
-
{ alias: latest, type: PlanDataSourceType.Cms, mode: PlanDataSourceMode.Query, contentType: name, limit: LATEST_LIMIT },
|
|
37249
|
-
{ alias: item, type: PlanDataSourceType.Cms, mode: PlanDataSourceMode.Single, contentType: name, filterByRouteParam: { field: SLUG_FIELD, routeParam: ITEM_PARAM } },
|
|
37250
|
-
{ alias: next, type: PlanDataSourceType.Relative, of: item, op: RelativeOp.SiblingsNext, within: list },
|
|
37251
|
-
],
|
|
37252
|
-
};
|
|
37253
|
-
}
|
|
37254
|
-
/** The page of one item: its hero, its own text, its pictures, the next one (each only when the items have it). */
|
|
37255
|
-
function itemSections(type, nextLabel) {
|
|
37256
|
-
const sections = [{ pattern: ImportPattern.ItemHero }];
|
|
37257
|
-
if (roleField(type, ContentRole.Body))
|
|
37258
|
-
sections.push({ pattern: ImportPattern.ItemBody });
|
|
37259
|
-
if (roleField(type, ContentRole.Gallery))
|
|
37260
|
-
sections.push({ pattern: ImportPattern.ItemGallery });
|
|
37261
|
-
sections.push(nextLabel ? { pattern: ImportPattern.ItemNext, slots: { label: nextLabel } } : { pattern: ImportPattern.ItemNext });
|
|
37262
|
-
return sections;
|
|
37263
|
-
}
|
|
37264
|
-
const pageHeader = (title, lead) => lead
|
|
37265
|
-
? { pattern: ImportPattern.PageHeader, slots: { title, lead }, without: ['eyebrow'] }
|
|
37266
|
-
: { pattern: ImportPattern.PageHeader, slots: { title }, without: [...WITHOUT.pageHeader] };
|
|
37267
|
-
/**
|
|
37268
|
-
* The scan's reading → the plan. Every list with items becomes a content type (the one that reads as the template's own
|
|
37269
|
-
* takes its place, routes and all); every page with words becomes a page; nothing is invented — a page or a list the
|
|
37270
|
-
* site did not have is not added, and the template's own pages are kept only where they are the site's frame (the home
|
|
37271
|
-
* page, the contact page).
|
|
37272
|
-
*/
|
|
37273
|
-
function planImport(reading, input) {
|
|
37274
|
-
const template = input.template ?? STUDIO_TEMPLATE;
|
|
37275
|
-
const lists = reading.lists.filter(l => l.items.length > 0);
|
|
37276
|
-
const matched = templateListOf(template, lists);
|
|
37277
|
-
const dropped = new Set(); // the template types no list fills
|
|
37278
|
-
const contentTypes = [];
|
|
37279
|
-
const dataSources = [];
|
|
37280
|
-
const templateParts = new Map();
|
|
37281
|
-
for (const type of template.contentTypes) {
|
|
37282
|
-
const parts = templateTypeParts(template, type.name);
|
|
37283
|
-
templateParts.set(type.name, parts);
|
|
37284
|
-
if (matched?.type.name === type.name) {
|
|
37285
|
-
contentTypes.push(templateType(type, matched.list));
|
|
37286
|
-
dataSources.push(...template.dataSources.filter(d => parts.aliases.has(d.alias)));
|
|
37287
|
-
}
|
|
37288
|
-
else
|
|
37289
|
-
dropped.add(type.name);
|
|
37290
|
-
}
|
|
37291
|
-
const droppedAliases = new Set([...dropped].flatMap(t => [...templateParts.get(t).aliases]));
|
|
37292
|
-
const droppedPages = new Set([...dropped].flatMap(t => [...templateParts.get(t).pages]));
|
|
37293
|
-
// Routes and names: the template's frame first, then the lists, then the pages.
|
|
37294
|
-
const kept = template.pages.filter(p => p.isHome || p.archetype === CONTACT_ARCHETYPE || (!droppedPages.has(p.key) && matched && templateParts.get(matched.type.name).pages.has(p.key)));
|
|
37295
|
-
const routes = new Names(kept.map(p => p.route));
|
|
37296
|
-
const keys = new Names(kept.map(p => p.key));
|
|
37297
|
-
const typeNames = new Names(template.contentTypes.map(t => t.name));
|
|
37298
|
-
const aliases = new Names(template.dataSources.map(d => d.alias));
|
|
37299
|
-
const listPages = [];
|
|
37300
|
-
const firstLatest = [];
|
|
37301
|
-
if (matched) {
|
|
37302
|
-
const listPage = template.pages.find(p => templateParts.get(matched.type.name).pages.has(p.key) && !p.template);
|
|
37303
|
-
const latest = template.dataSources.find(d => templateParts.get(matched.type.name).aliases.has(d.alias) && d.type === PlanDataSourceType.Cms && d.mode === PlanDataSourceMode.Query && d.limit);
|
|
37304
|
-
if (listPage && latest)
|
|
37305
|
-
firstLatest.push({ alias: latest.alias, route: listPage.route });
|
|
37306
|
-
}
|
|
37307
|
-
const typeOfMatched = matched ? contentTypes[0] : null;
|
|
37308
|
-
for (const list of lists) {
|
|
37309
|
-
if (list === matched?.list)
|
|
37310
|
-
continue;
|
|
37311
|
-
const name = typeNames.claim(camel(importSlug(list.key) || importSlug(list.label) || 'items'), '');
|
|
37312
|
-
const type = ownType(name, list);
|
|
37313
|
-
const own = ownSources(name);
|
|
37314
|
-
if ([own.list, own.latest, own.item, `${name}Next`].some(a => aliases.has(a)))
|
|
37315
|
-
continue; // never shadow a source
|
|
37316
|
-
own.sources.forEach(s => aliases.claim(s.alias));
|
|
37317
|
-
contentTypes.push(type);
|
|
37318
|
-
dataSources.push(...own.sources);
|
|
37319
|
-
const base = routeOfPath(list.path);
|
|
37320
|
-
const route = routes.claim(base && !routes.has(base) && base !== HOME_ROUTE ? base : `/${importSlug(list.label) || name.toLowerCase()}`);
|
|
37321
|
-
routes.claim(`${route}/:${ITEM_PARAM}`);
|
|
37322
|
-
const key = keys.claim(importSlug(list.label) || name.toLowerCase());
|
|
37323
|
-
listPages.push({
|
|
37324
|
-
key, name: list.label, route, inNav: true, archetype: COLLECTION_ARCHETYPE,
|
|
37325
|
-
sections: [pageHeader(list.label), { pattern: ImportPattern.CardGrid, binding: own.list, without: [...WITHOUT.cardGridHeader] }],
|
|
37326
|
-
});
|
|
37327
|
-
listPages.push({
|
|
37328
|
-
key: keys.claim(`${key}-item`), name: list.label, route: `${route}/:${ITEM_PARAM}`, inNav: false,
|
|
37329
|
-
template: name, routeSource: own.item, archetype: DETAIL_ARCHETYPE, sections: itemSections(type, list.label),
|
|
37330
|
-
});
|
|
37331
|
-
firstLatest.push({ alias: own.latest, route });
|
|
37332
|
-
}
|
|
37333
|
-
// The template's frame: a section that showed a dropped type shows the first list instead, or goes.
|
|
37334
|
-
const frame = [];
|
|
37335
|
-
for (const page of kept) {
|
|
37336
|
-
const sections = [];
|
|
37337
|
-
for (const section of page.sections) {
|
|
37338
|
-
if (!section.binding || !droppedAliases.has(section.binding)) {
|
|
37339
|
-
sections.push(section);
|
|
37340
|
-
continue;
|
|
37341
|
-
}
|
|
37342
|
-
const first = firstLatest[0];
|
|
37343
|
-
if (first)
|
|
37344
|
-
sections.push({ ...section, binding: first.alias, links: { ...(section.links ?? {}), more: first.route } });
|
|
37345
|
-
}
|
|
37346
|
-
// The template type's item page shows the items' own text after its hero.
|
|
37347
|
-
const body = page.template && typeOfMatched && page.template === typeOfMatched.name && roleField(typeOfMatched, ContentRole.Body)
|
|
37348
|
-
&& !sections.some(s => s.pattern === ImportPattern.ItemBody);
|
|
37349
|
-
if (body)
|
|
37350
|
-
sections.splice(Math.max(1, sections.findIndex(s => s.pattern === ImportPattern.ItemHero) + 1), 0, { pattern: ImportPattern.ItemBody });
|
|
37351
|
-
frame.push({ ...page, sections });
|
|
37352
|
-
}
|
|
37353
|
-
// The owner's pages of words.
|
|
37354
|
-
const textPages = [];
|
|
37355
|
-
for (const page of reading.pages) {
|
|
37356
|
-
const text = page.text.trim();
|
|
37357
|
-
const title = page.title.trim();
|
|
37358
|
-
if (!text || !title)
|
|
37359
|
-
continue;
|
|
37360
|
-
const base = routeOfPath(page.path);
|
|
37361
|
-
if (!base || base === HOME_ROUTE)
|
|
37362
|
-
continue; // the home page is rebuilt from the template
|
|
37363
|
-
if (routes.has(base) && frame.some(p => p.route === base))
|
|
37364
|
-
continue; // the template's contact page stands for it
|
|
37365
|
-
const route = routes.claim(base);
|
|
37366
|
-
textPages.push({
|
|
37367
|
-
key: keys.claim(importSlug(base.slice(1)) || importSlug(title) || 'page'), name: title, route, inNav: route.split('/').length === 2,
|
|
37368
|
-
archetype: ABOUT_ARCHETYPE,
|
|
37369
|
-
sections: [pageHeader(title, page.description?.trim() || undefined), { pattern: ImportPattern.LongForm, slots: { body1: text }, without: [...WITHOUT.longForm] }],
|
|
37370
|
-
});
|
|
37371
|
-
}
|
|
37372
|
-
// The header lists the lists first, then the pages, the contact page last — at most IMPORT_NAV_MAX.
|
|
37373
|
-
const home = frame.filter(p => p.isHome);
|
|
37374
|
-
const contact = frame.filter(p => !p.isHome && p.archetype === CONTACT_ARCHETYPE);
|
|
37375
|
-
const rest = frame.filter(p => !p.isHome && p.archetype !== CONTACT_ARCHETYPE);
|
|
37376
|
-
let room = IMPORT_NAV_MAX - contact.filter(p => p.inNav).length;
|
|
37377
|
-
const nav = (page) => {
|
|
37378
|
-
if (!page.inNav)
|
|
37379
|
-
return page;
|
|
37380
|
-
if (room > 0) {
|
|
37381
|
-
room--;
|
|
37382
|
-
return page;
|
|
37383
|
-
}
|
|
37384
|
-
return { ...page, inNav: false };
|
|
37385
|
-
};
|
|
37386
|
-
const pages = [...home, ...rest.map(nav), ...listPages.map(nav), ...textPages.map(nav), ...contact];
|
|
37387
|
-
return {
|
|
37388
|
-
version: SITE_PLAN_VERSION,
|
|
37389
|
-
source: { kind: SitePlanSourceKind.Import, scanId: reading.scanId },
|
|
37390
|
-
business: JSON.parse(JSON.stringify(reading.business)),
|
|
37391
|
-
...(reading.locale ? { locale: reading.locale } : {}),
|
|
37392
|
-
design: JSON.parse(JSON.stringify(input.design)),
|
|
37393
|
-
contentTypes,
|
|
37394
|
-
dataSources: JSON.parse(JSON.stringify(dataSources)),
|
|
37395
|
-
pages: JSON.parse(JSON.stringify(pages)),
|
|
37396
|
-
globals: JSON.parse(JSON.stringify(template.globals)),
|
|
37397
|
-
};
|
|
37398
|
-
}
|
|
37399
|
-
|
|
37400
37247
|
/**
|
|
37401
37248
|
* The AI pipeline's WIRE vocabulary (AI plan §3c, §3n, M0): what iox-cms's `ai` API answers and what every client
|
|
37402
37249
|
* of it reads — the steps a model works on, who pays (IOX credits or the studio's own key), a model of the vetted
|
|
@@ -39572,6 +39419,21 @@ function publishVerdict(audit, acknowledged = []) {
|
|
|
39572
39419
|
return { ok: !blocked && missing.length === 0, blocked, missing };
|
|
39573
39420
|
}
|
|
39574
39421
|
|
|
39422
|
+
/**
|
|
39423
|
+
* The words that carry no subject in the languages a site is written in (English, Hebrew): "the", "with", "our", "כמו",
|
|
39424
|
+
* "שלנו"… Shared by every comparison of meaning by words — a stock photo against a slot (`stockWords`), a model's section
|
|
39425
|
+
* against a ready-made one (silent section fallback). Lower case; only words of three letters or more (shorter ones never
|
|
39426
|
+
* count anywhere).
|
|
39427
|
+
*/
|
|
39428
|
+
const FUNCTION_WORDS = new Set([
|
|
39429
|
+
'the', 'and', 'with', 'for', 'your', 'our', 'you', 'from', 'into', 'this', 'that', 'here', 'there', 'about', 'how', 'what',
|
|
39430
|
+
'who', 'are', 'all', 'but', 'not', 'was', 'were', 'has', 'have', 'had', 'its', 'they', 'them', 'their', 'then', 'than',
|
|
39431
|
+
'when', 'where', 'which', 'will', 'can', 'just', 'out', 'over', 'under', 'onto', 'each', 'every', 'some', 'any', 'one', 'also',
|
|
39432
|
+
'too', 'very', 'more', 'most', 'less', 'only', 'own', 'yours', 'ours', 'these', 'those',
|
|
39433
|
+
'אנחנו', 'אני', 'הוא', 'היא', 'אתם', 'אתן', 'שלנו', 'שלכם', 'שלך', 'שלו', 'שלה', 'אצלנו', 'כמו', 'אבל', 'זאת', 'כאן', 'יותר',
|
|
39434
|
+
'מאוד', 'כבר', 'עוד', 'אחרי', 'לפני', 'בין', 'כדי', 'איך',
|
|
39435
|
+
]);
|
|
39436
|
+
|
|
39575
39437
|
/**
|
|
39576
39438
|
* How a stock photo is judged against a picture slot (AI plan §3g, I2.1) — pure and deterministic, so the same plan and
|
|
39577
39439
|
* the same library always place the same photos. A photo is described by what the library's manifest carries (the
|
|
@@ -40485,6 +40347,205 @@ function luminanceOf(colour) {
|
|
|
40485
40347
|
return c ? relativeLuminance(c) : null;
|
|
40486
40348
|
}
|
|
40487
40349
|
|
|
40350
|
+
/**
|
|
40351
|
+
* SILENT SECTION FALLBACK (Doron, 2026-11-09: "for now we need to do silent section fallback and not fallback whole page").
|
|
40352
|
+
* A composed page that still fails after the mends and its one repair — or after the browser's check — no longer falls
|
|
40353
|
+
* back whole: each section an issue names is given to the plan's READY-MADE section for the same place (the pattern the
|
|
40354
|
+
* whole-page fallback would have stamped there, worn in the same look), or dropped where none fits and the page keeps its
|
|
40355
|
+
* opening and its close. Then the page is judged again, once, exactly like any composed page — its MINIMUMS on the model's
|
|
40356
|
+
* own remaining sections (the given-away ones ride on `page.givenAway`; iox-ui#67, Doron 2026-11-09), its maximums on the
|
|
40357
|
+
* whole page. A ready-made section that would say again what a section the model kept already says (its title, its text —
|
|
40358
|
+
* iox-ui#68) is never given a place: a page that repeats a paragraph is worse than the last resort. Only a page that still
|
|
40359
|
+
* fails — an issue that names no section, a place with nothing to give it, a swap that
|
|
40360
|
+
* breaks a section kept or a maximum of the page — falls back whole: the last resort, counted. A swap never leads to another swap. The owner sees a composed page; the swaps are recorded for us, the model's sections kept.
|
|
40361
|
+
* Pure: the service and `ai:replay` run this one function.
|
|
40362
|
+
*/
|
|
40363
|
+
/** What became of one place of the model's page. */
|
|
40364
|
+
var SectionSwapAction;
|
|
40365
|
+
(function (SectionSwapAction) {
|
|
40366
|
+
/** The plan's ready-made section stands there. */
|
|
40367
|
+
SectionSwapAction["Replaced"] = "replaced";
|
|
40368
|
+
/** Nothing fitted the place: the page goes on without it. */
|
|
40369
|
+
SectionSwapAction["Dropped"] = "dropped";
|
|
40370
|
+
})(SectionSwapAction || (SectionSwapAction = {}));
|
|
40371
|
+
/** Why a place was given away (and which ready-made section took it). */
|
|
40372
|
+
var SectionSwapRule;
|
|
40373
|
+
(function (SectionSwapRule) {
|
|
40374
|
+
/** The page's first section: always the plan's opening, never dropped. */
|
|
40375
|
+
SectionSwapRule["Opening"] = "opening";
|
|
40376
|
+
/** The page's last section: always the plan's close, never dropped. */
|
|
40377
|
+
SectionSwapRule["Close"] = "close";
|
|
40378
|
+
/** A middle section: the ready-made section that shows the same list, holds the form, or says most of its words. */
|
|
40379
|
+
SectionSwapRule["Fit"] = "fit";
|
|
40380
|
+
/** A middle section no ready-made section fits (or every one that does would repeat a kept section, iox-ui#68): dropped. */
|
|
40381
|
+
SectionSwapRule["NoFit"] = "no-fit";
|
|
40382
|
+
/**
|
|
40383
|
+
* A middle section no ready-made section fits by its words, given the plan's unused middle section nearest its place
|
|
40384
|
+
* — only when the caller keeps every place (`SectionFallbackOptions.keepPlace`: a free page, iox-ui#134).
|
|
40385
|
+
*/
|
|
40386
|
+
SectionSwapRule["Place"] = "place";
|
|
40387
|
+
})(SectionSwapRule || (SectionSwapRule = {}));
|
|
40388
|
+
/** Why a page fell back whole after all (the last resort). */
|
|
40389
|
+
var SectionFallbackLastResort;
|
|
40390
|
+
(function (SectionFallbackLastResort) {
|
|
40391
|
+
/** Nothing left names a section (a count, a share, the order of sections), or after the swaps only such an issue is. */
|
|
40392
|
+
SectionFallbackLastResort["PageWide"] = "page-wide";
|
|
40393
|
+
/** The place named is the opening or the close, and the plan has no ready-made section left for it — or only one that
|
|
40394
|
+
* would repeat what a kept section says (iox-ui#68). */
|
|
40395
|
+
SectionFallbackLastResort["NoReadyMade"] = "no-ready-made";
|
|
40396
|
+
/** It names a section already given to a ready-made one. */
|
|
40397
|
+
SectionFallbackLastResort["ReadyMadeNamed"] = "ready-made-named";
|
|
40398
|
+
/** After the swaps, the check names a section the model composed and kept (a neighbour the swap broke). */
|
|
40399
|
+
SectionFallbackLastResort["Neighbour"] = "neighbour";
|
|
40400
|
+
})(SectionFallbackLastResort || (SectionFallbackLastResort = {}));
|
|
40401
|
+
const NAMED = /sections\[(\d+)\]/g;
|
|
40402
|
+
/** The sections an issue names: its path's, and any its words name. */
|
|
40403
|
+
function sectionsNamed(issue) {
|
|
40404
|
+
const at = new Set();
|
|
40405
|
+
for (const text of [issue.path, issue.message])
|
|
40406
|
+
for (const m of String(text ?? '').matchAll(NAMED))
|
|
40407
|
+
at.add(Number(m[1]));
|
|
40408
|
+
return [...at].sort((a, b) => a - b);
|
|
40409
|
+
}
|
|
40410
|
+
const WORD = /[\p{L}\p{N}]{3,}/gu;
|
|
40411
|
+
/** The words that can make a fit: three letters or more, never a function word (iox-ui#68: "the" made one). */
|
|
40412
|
+
const wordsOf$2 = (text) => (String(text ?? '').toLowerCase().match(WORD) ?? []).filter(w => !FUNCTION_WORDS.has(w));
|
|
40413
|
+
const layerTexts = (l) => [l.text ?? '', ...(l.items ?? []), ...(l.gallery?.slides ?? []).map(s => s.caption ?? ''), l.form?.title ?? '', l.form?.intro ?? ''];
|
|
40414
|
+
const layerWords = (l) => layerTexts(l).flatMap(wordsOf$2);
|
|
40415
|
+
/** Every word of a text, in order, as a phrase that can be found inside another (` a small room kept slow `). */
|
|
40416
|
+
const PHRASE_WORD = /[\p{L}\p{N}]+/gu;
|
|
40417
|
+
const phraseOf = (text) => {
|
|
40418
|
+
const words = String(text ?? '').toLowerCase().match(PHRASE_WORD) ?? [];
|
|
40419
|
+
return { phrase: ` ${words.join(' ')} `, words: words.length };
|
|
40420
|
+
};
|
|
40421
|
+
/** The fewest words a text needs to count as said twice — a two-word label ("The room") may well appear twice. */
|
|
40422
|
+
const REPEAT_MIN_WORDS = 3;
|
|
40423
|
+
/** The share of the shorter text's words the longer one holds for the two to be the same sentence said twice: one word
|
|
40424
|
+
* changed is still a repeat (the café's quote, "…וחברים צריכים שולחן" and "…וחברים טובים צריכים שולחן"). */
|
|
40425
|
+
const REPEAT_SHARED = 0.8;
|
|
40426
|
+
/** Whether two texts say the same thing: one inside the other, or the shorter's words (function words aside) nearly all
|
|
40427
|
+
* in the longer. */
|
|
40428
|
+
function sameSaying(a, b) {
|
|
40429
|
+
if (a.phrase.includes(b.phrase) || b.phrase.includes(a.phrase))
|
|
40430
|
+
return true;
|
|
40431
|
+
const [short, long] = [new Set(wordsOf$2(a.text)), new Set(wordsOf$2(b.text))].sort((x, y) => x.size - y.size);
|
|
40432
|
+
if (short.size < REPEAT_MIN_WORDS)
|
|
40433
|
+
return false;
|
|
40434
|
+
return [...short].filter(w => long.has(w)).length / short.size >= REPEAT_SHARED;
|
|
40435
|
+
}
|
|
40436
|
+
/**
|
|
40437
|
+
* Whether the plan section would say again what the sections the model kept already say (iox-ui#68): a title or a text of
|
|
40438
|
+
* its slots found inside a kept layer's words, or a kept layer's words found inside it, or the two the same sentence
|
|
40439
|
+
* with a word changed — each of three words or more.
|
|
40440
|
+
*/
|
|
40441
|
+
function repeatsKept(plan, kept) {
|
|
40442
|
+
const long = (text) => ({ ...phraseOf(text), text });
|
|
40443
|
+
const said = kept.flatMap(s => (s.layers ?? []).flatMap(layerTexts)).map(long).filter(p => p.words >= REPEAT_MIN_WORDS);
|
|
40444
|
+
return Object.values(plan.slots ?? {}).map(long).filter(p => p.words >= REPEAT_MIN_WORDS)
|
|
40445
|
+
.some(slot => said.some(k => sameSaying(slot, k)));
|
|
40446
|
+
}
|
|
40447
|
+
/** How well a ready-made section stands for a model's section: the same list, the form, the words they share. */
|
|
40448
|
+
function fitScore(section, plan) {
|
|
40449
|
+
const layers = section.layers ?? [];
|
|
40450
|
+
let score = 0;
|
|
40451
|
+
if (plan.binding && layers.some(l => l.gallery?.source === plan.binding))
|
|
40452
|
+
score += 10;
|
|
40453
|
+
if ((plan.form || /^(contact|cta)\./.test(plan.pattern)) && layers.some(l => l.kind === 'form'))
|
|
40454
|
+
score += 5;
|
|
40455
|
+
const said = new Set(layers.flatMap(layerWords));
|
|
40456
|
+
score += new Set(Object.values(plan.slots ?? {}).flatMap(wordsOf$2).filter(w => said.has(w))).size;
|
|
40457
|
+
return score;
|
|
40458
|
+
}
|
|
40459
|
+
/** The least a middle section's fit scores to be given a ready-made section (two shared words, a form or a list). */
|
|
40460
|
+
const FIT_MIN = 2;
|
|
40461
|
+
/**
|
|
40462
|
+
* iox-ui#134: the plan's middle section (neither its opening nor its close) not yet used whose place is nearest the model's
|
|
40463
|
+
* section's — by their share of each page's length, the earlier one on a tie — and that repeats no kept section; else null.
|
|
40464
|
+
*/
|
|
40465
|
+
function nearestUnusedMiddle(plan, i, lastAt, used, kept) {
|
|
40466
|
+
const share = lastAt > 0 ? i / lastAt : 0;
|
|
40467
|
+
const planLast = plan.length - 1;
|
|
40468
|
+
const candidates = plan
|
|
40469
|
+
.map((p, at) => ({ at, p }))
|
|
40470
|
+
.filter(c => c.at > 0 && c.at < planLast && !used.has(c.at) && !repeatsKept(c.p, kept))
|
|
40471
|
+
.map(c => ({ at: c.at, off: Math.abs(c.at / planLast - share) }))
|
|
40472
|
+
.sort((a, b) => a.off - b.off || a.at - b.at);
|
|
40473
|
+
return candidates[0]?.at ?? null;
|
|
40474
|
+
}
|
|
40475
|
+
/** A ready-made stub at a place: no layers of its own — the composer stamps the plan section's pattern there. */
|
|
40476
|
+
function readyMadeSection(original, at, plan) {
|
|
40477
|
+
return { id: original.id, kind: 'content', screens: 1, rows: 1, layers: [], phone: [], readyMade: { at, pattern: plan.pattern } };
|
|
40478
|
+
}
|
|
40479
|
+
/**
|
|
40480
|
+
* Give every section the issues name to the plan's ready-made section for its place, or drop it, then judge the page once
|
|
40481
|
+
* more (a page-wide issue beside them may be cured by the swap — the judge says). `plan` is the page's ready-made
|
|
40482
|
+
* sections (`PagePlan.sections`), in order; `issues` what is left after the mends and the one repair.
|
|
40483
|
+
*/
|
|
40484
|
+
function fallBackBySection(page, plan, issues, judge, options = {}) {
|
|
40485
|
+
const current = structuredClone(page);
|
|
40486
|
+
const swaps = [];
|
|
40487
|
+
const last = (lastResort, left, at = current) => ({ page: at, swaps, left, lastResort });
|
|
40488
|
+
if (!issues.length)
|
|
40489
|
+
return { page: current, swaps, left: [] };
|
|
40490
|
+
const named = new Map();
|
|
40491
|
+
for (const issue of issues)
|
|
40492
|
+
for (const i of sectionsNamed(issue))
|
|
40493
|
+
if (i < current.sections.length)
|
|
40494
|
+
named.set(i, [...(named.get(i) ?? []), issue.message]);
|
|
40495
|
+
if (!named.size)
|
|
40496
|
+
return last(SectionFallbackLastResort.PageWide, [...issues]);
|
|
40497
|
+
if ([...named.keys()].some(i => current.sections[i].readyMade))
|
|
40498
|
+
return last(SectionFallbackLastResort.ReadyMadeNamed, [...issues]);
|
|
40499
|
+
const used = new Set(current.sections.map(s => s.readyMade?.at).filter((n) => n !== undefined));
|
|
40500
|
+
// The sections the model composed and keeps: a ready-made section must not say again what they say.
|
|
40501
|
+
const keptSections = current.sections.filter((s, i) => !s.readyMade && !named.has(i));
|
|
40502
|
+
const lastAt = current.sections.length - 1;
|
|
40503
|
+
const next = [...current.sections];
|
|
40504
|
+
const drop = new Set();
|
|
40505
|
+
for (const [i, why] of [...named.entries()].sort((a, b) => a[0] - b[0])) {
|
|
40506
|
+
const s = current.sections[i];
|
|
40507
|
+
const record = (action, rule, readyMade) => swaps.push({ id: s.id, at: i, action, rule, ...(readyMade ? { readyMade } : {}), why, original: structuredClone(s) });
|
|
40508
|
+
if (i === 0 || i === lastAt) {
|
|
40509
|
+
const at = i === 0 ? 0 : plan.length - 1;
|
|
40510
|
+
if (!plan[at] || used.has(at) || repeatsKept(plan[at], keptSections))
|
|
40511
|
+
return last(SectionFallbackLastResort.NoReadyMade, [...issues]);
|
|
40512
|
+
used.add(at);
|
|
40513
|
+
next[i] = readyMadeSection(s, at, plan[at]);
|
|
40514
|
+
record(SectionSwapAction.Replaced, i === 0 ? SectionSwapRule.Opening : SectionSwapRule.Close, { at, pattern: plan[at].pattern });
|
|
40515
|
+
continue;
|
|
40516
|
+
}
|
|
40517
|
+
const best = plan
|
|
40518
|
+
.map((p, at) => ({ at, score: at > 0 && at < plan.length - 1 && !used.has(at) && !repeatsKept(p, keptSections) ? fitScore(s, p) : -1 }))
|
|
40519
|
+
.filter(c => c.score >= FIT_MIN)
|
|
40520
|
+
.sort((a, b) => b.score - a.score || a.at - b.at)[0];
|
|
40521
|
+
const near = !best && options.keepPlace ? nearestUnusedMiddle(plan, i, lastAt, used, keptSections) : null;
|
|
40522
|
+
if (best) {
|
|
40523
|
+
used.add(best.at);
|
|
40524
|
+
next[i] = readyMadeSection(s, best.at, plan[best.at]);
|
|
40525
|
+
record(SectionSwapAction.Replaced, SectionSwapRule.Fit, { at: best.at, pattern: plan[best.at].pattern });
|
|
40526
|
+
}
|
|
40527
|
+
else if (near !== null) {
|
|
40528
|
+
used.add(near);
|
|
40529
|
+
next[i] = readyMadeSection(s, near, plan[near]);
|
|
40530
|
+
record(SectionSwapAction.Replaced, SectionSwapRule.Place, { at: near, pattern: plan[near].pattern });
|
|
40531
|
+
}
|
|
40532
|
+
else {
|
|
40533
|
+
drop.add(i);
|
|
40534
|
+
record(SectionSwapAction.Dropped, SectionSwapRule.NoFit);
|
|
40535
|
+
}
|
|
40536
|
+
}
|
|
40537
|
+
// What the given-away sections carried toward the page's minimums goes with the page (checkLayout forgives exactly
|
|
40538
|
+
// that, iox-ui#67); its maximums stay the whole page's.
|
|
40539
|
+
const givenAway = [...(current.givenAway ?? []), ...swaps.map(w => ({ at: w.at, section: w.original }))];
|
|
40540
|
+
const judged = judge({ ...current, sections: next.filter((_, i) => !drop.has(i)), givenAway });
|
|
40541
|
+
if (!judged.issues.length)
|
|
40542
|
+
return { page: judged.page, swaps, left: [] };
|
|
40543
|
+
const kept = judged.issues.flatMap(sectionsNamed).filter(i => !judged.page.sections[i]?.readyMade);
|
|
40544
|
+
const reason = kept.length ? SectionFallbackLastResort.Neighbour
|
|
40545
|
+
: judged.issues.some(i => sectionsNamed(i).length) ? SectionFallbackLastResort.ReadyMadeNamed : SectionFallbackLastResort.PageWide;
|
|
40546
|
+
return last(reason, judged.issues, judged.page);
|
|
40547
|
+
}
|
|
40548
|
+
|
|
40488
40549
|
/**
|
|
40489
40550
|
* WHAT THE OWNER'S PROMPT RULED OUT, AS A READY-MADE SECTION CAN BREAK IT (award plan FS-D47, R-H20). The reading keeps
|
|
40490
40551
|
* the owner's refused and asked words as they wrote them (§11.4a); a ready-made section can only break the few of them
|
|
@@ -41901,5 +41962,5 @@ function siteGlobalsOf(globals) {
|
|
|
41901
41962
|
* Generated bundle index. Do not edit.
|
|
41902
41963
|
*/
|
|
41903
41964
|
|
|
41904
|
-
export { ACCOUNT_ENTRY_ID, ACTION_START_SCALE, ACTIVE_BUILD_STATUSES, ADDITION_CAPS, ADDITION_ITEMS_KEY, ADDITION_ITEM_SOURCE_SUFFIX, ADDITION_KEY_PREFIX, ADDITION_SLUG, ADJUSTMENTS, ADJUST_AXIS_LABELS, ADJUST_LOOK, ADJUST_OWN, ADJUST_STEPS, ADJUST_STEP_IDS, AI_COMPOSED_PAGES_BY_TIER, AI_COMPOSED_PAGES_ESTIMATED, AI_COMPOSED_PAGE_LEAN_TOKENS, AI_MODEL_STEPS, AI_PICTURE_MAKERS, AI_PLAN_REASKED_PART, AI_REFUSAL_NEXT, AI_REFUSAL_STATUS, AI_STEPS, AI_STEP_FEATURE, AI_STEP_LABELS, AI_STEP_NEEDS, AI_STEP_PART_TOKENS, AI_STEP_RUNS_AS, AI_STEP_TYPICAL_TOKENS, ART_DIRECTION_PARTS, AWARD_COMPOSED_PAGES_ESTIMATED, AdditionHeldBack, AdditionIssueCode, AdditionOrigin, AdditionsPart, AdditionsSkipped, AdjustAxis, AdjustKind, AiCallStatus, AiCapability, AiFeature, AiGenerationStage, AiKeyMode, AiLimit, AiNextKind, AiPictureMaker, AiProviderId, AiRefusalCode, AiStep, BAR_ITEMS_MAX, BAR_ITEMS_MIN, BASELINE_ROLES, BASELINE_WORDS_HE, BODY_TOKEN, BUILD_STEPS, BUTTON_LINK_PROPS, BaselineRole, BindScope, BodyIngredient, BodyMixError, BodyRepairCode, BodyRhythm, BodySeam, BodySectionWord, BodyTexture, BuildNoticeCode, BuildStep, CARRIED_BUTTON_STYLES, CARRY_LAYER_KINDS, CARRY_PHOTO_KINDS, CARRY_PROMPT_QUOTE, CARRY_WHOLE_LAYER_KINDS, CONTENT_ROLE_MEANINGS, COPY_OUT, CREDITS_PER_USD, CardBindTarget, CarryBlockKind, CarryKeptReason, CarryKind, CarryReferenceVia, CheckSeverity, ComposeError, ComposeIssueCode, ContentFieldControl, ContentFieldType, ContentRole, ContentTypeAction, CreatedKind, DANGLING_LINK_CODES, DEFAULT_FOOTER_PATTERN, DEFAULT_GENERATION_TIER, DEFAULT_HEADER_PATTERN, DEFAULT_PHONE_MENU_BREAKPOINT, DEFAULT_SITE_LOCALE, DRAWER_BEAT_MS, DRAWER_KINDS, DRAWER_LETTER_MS, DRAWER_LINE_MS, DRAWER_SPINE, DRAWER_STEPS, ENTRANCE_EASING, ENTRANCE_ORIGIN_LOOK, ENTRANCE_TRIGGER, EntrancePart, EntranceSide, FACT_KEYS, FIELD_TYPE_OF_CONTROL, FILL_ASPECT, FILM_PATTERN, FINAL_GENERATION_STAGES, FINDING_SEVERITY, FOOTER_INSET_STYLES, FOOTER_LEGAL_ROLE, FOOTER_TOKEN, FORM_LEGAL_ROLE, FREE_BUILDER_TYPE, FREE_CONTRAST, FREE_ELEMENT_STYLES, FREE_HOLDERS, FREE_HOVER_PROPS, FREE_LEAD_ROLE, FREE_MOVES, FREE_PHONE_LAYERS, FREE_PHONE_LIMITS, FREE_SECTIONS, FREE_STYLE_PROPS, FREE_TOKEN_PROPS, FREE_TO_LAYOUT_CODE, FREE_WIRE_NODE_KEYS, FREE_WORD_TYPES, FallbackOpeningKept, FilmUnplaced, FindingGrouping, FooterArrange, FooterClosing, FooterGround, FooterHold, FooterIngredient, FooterMixError, FooterNameStyle, FooterRepairCode, FooterRole, FreeIssueCode, FreeLayer, FreeNodeType, FreePictures, FreePurpose, FreeTrigger, GRAMMAR_TOO_LARGE_MESSAGE, GenerationTier, GlobalSlot, GroundTone, HAND_PAGE_KEY_PREFIX, HEADER_TOKEN, HEBREW_PREFIXES, HeaderAction, HeaderArrange, HeaderIngredient, HeaderMixError, HeaderPages, HeaderRepairCode, HeaderReplacedKind, IMPORT_NAV_MAX, IMPRINT_COUNTRIES, ISRAEL, ITEM_PAGE_ONLY_ROLES, ImportPattern, JOINED_HEADER_PADDING, JSON_SCHEMA_BANNED_KEYWORDS, JsonSchemaShapeError, KeptPagesChoice, KeptReason, LAYOUT_ACCENT_TEXT, LAYOUT_BEAT_DELAY, LAYOUT_CHECK_VIEWPORT, LAYOUT_COLOUR_TOKEN, LAYOUT_COLUMN_GAP, LAYOUT_COLUMN_MENDED, LAYOUT_DEPTH_ON_PHONE, LAYOUT_DRIFT, LAYOUT_EASING, LAYOUT_ENTRANCE_MAX_MS, LAYOUT_FONT_SIZE, LAYOUT_HIDDEN_OPACITY, LAYOUT_KINETIC_KINDS, LAYOUT_LINE_HEIGHT, LAYOUT_LIST_TOKEN, LAYOUT_MIX_OFFERED, LAYOUT_MIX_OFFERED_AWARD, LAYOUT_MIX_WORDS, LAYOUT_NEAR_MISS, LAYOUT_OPERATED, LAYOUT_OWNED_PROPS, LAYOUT_PACE, LAYOUT_PHONE_BREAKPOINT, LAYOUT_PHONE_PADDING, LAYOUT_PHOTO_ASPECT, LAYOUT_READY_MADE_TOKEN, LAYOUT_RISE, LAYOUT_SCREEN_PX, LAYOUT_SETTLE_PASSES, LAYOUT_TEXT_KINDS, LAYOUT_TOOLTIP_TRAIT, LAYOUT_VIEWPORTS, LAYOUT_WIRE_AUTOPLAY_MS, LEGAL_KINDS, LEGAL_PAGE_SETTING, LIST_CARD_PART, LIST_DECK_MAX_PX, LIST_DECK_SHARE, LIST_FRAME_STYLE_KEYS, LIST_INGREDIENTS, LIST_ITEM_MIN_PX, LIST_LONG_WORDS, LIST_RHYTHMS, LIST_ROLE_WORDS, LIST_RULES, LIST_SAY_WORDS, LIST_TABLE, LIST_WORDS_BESIDE_RULE, LayoutAlign, LayoutBleed, LayoutButtonVariant, LayoutColour, LayoutColourMode, LayoutDepth, LayoutDial, LayoutEase, LayoutEditOp, LayoutEnter, LayoutGalleryEffect, LayoutGapCode, LayoutIssueCode, LayoutLayerKind, LayoutListArrange, LayoutListArrive, LayoutListHover, LayoutListHow, LayoutListItem, LayoutListMove, LayoutListPhone, LayoutListRole, LayoutListSide, LayoutListWho, LayoutMendKind, LayoutMixIngredient, LayoutNavKind, LayoutPace, LayoutPhotoShape, LayoutPhotoSource, LayoutRole, LayoutScrubRefusal, LayoutSectionKind, LayoutSequenceToken, LayoutSide, LayoutSignatureId, LayoutSize, LayoutSourceChoice, LayoutTrackProp, LayoutTransition, LayoutViewport, LegalBlocks, LegalFact, LegalKind, ListPartChange, ListPartOutcome, ListSayCode, ListWordRefusal, MAX_SITE_PICTURES, MOTION_TRIGGERS, MOVING_OPENING_MEDIA, MenuSide, NAV_PART_LABELS, NAV_SHAPE_COPY, NEUTRAL_STYLE_PROPS, NODE_BASELINES, NO_TOKENS, NavPagesSource, NavRole, NavShape, NavShapeError, ONCE_ENTRANCE_MS, OPENING_DISSOLVE, OPENING_HEIGHT, OPENING_MIX_PROP, OPENING_TOKEN, OpeningExtra, OpeningFrame, OpeningGround, OpeningIngredient, OpeningMedia, OpeningMixError, OpeningMotion, OpeningRepairCode, OpeningRole, OpeningWords, PAGE_ARCHETYPES, PERSONAL_CONTROLS, PHOTO_ANALYSIS_WIDTH, PHOTO_CALM_DETAIL, PHOTO_GRID, PHOTO_LIGHT_LUMINANCE, PICTURE_ASPECTS, PICTURE_NEVER, PICTURE_REAL_PLACE_FAMILIES, PICTURE_REROLL_EVERY, PICTURE_REVIEW_FORMAT, PICTURE_REVIEW_SHAPE, PICTURE_TEXT_CONTRAST, PICTURE_TOKENS_UNKNOWN_MAKER, 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, POPUP_GLOBAL_ID, POPUP_LINK_WORD, POPUP_WIRE_INGREDIENTS, PREVIOUS_ROUTE_SUFFIX, PRICING_PATTERN, PROOF_FINGERPRINTS, PUBLISH_BLOCKING_PLACEHOLDERS, PageDataKind, PathIssueCollector, PatternDirective, PatternGlobalPosition, PatternOpens, PatternPlaceholder, PatternRecipe, PhoneMenuBreakpoint, PhotoTone, PictureRefusal, PictureWorld, PlaceholderKind, PlanChangeAction, PlanChangeKind, PlanDataSourceMode, PlanDataSourceType, PlanEditIssueCode, PlanEditOp, PlanEditsOutcome, PlanPart, PlanWireEntry, PlanWireShapeError, PlanWordIssueCode, PopupMixError, PopupRefusal, PreflightRefusalCode, PriceBindTarget, PromptLimit, PublishRefusalCode, PublishScope, REDESIGN_ADDITIONS_SCHEMA_NAMES, REDESIGN_BACK_DAYS, REDESIGN_PARTS, REDESIGN_STEPS, RENDER_CHECK, REQUIRED_CONTENT_ROLES, RedesignPageResult, RedesignPart, RedesignRefusalCode, RedesignStep, RelativeOp, SAMPLE_IMAGE_REF, SCENE_LEVEL, SCENE_OTHER_PAGES, SCRIM_BACKGROUND, SCRIM_COVER, SCRIM_LEVELS, SCRUBBED_ENTRANCE, SCRUB_UNTIL, SHOP_CART_BUTTON_ID, SHOP_CART_DRAWER_ID, SHOP_FIELDS, SHOP_LATEST_LIMIT, SHOP_LIST_LIMIT, SHOP_NEED, SHOP_ONLY_CONTENT_ROLES, SHOP_PRODUCTS_MAX, SHOP_ROLES, SHOP_SLUG_FIELD, SHOWCASE_FILM, SHOWCASE_SHOP, SIGN_IN_DIALOG_ID, SITE_CHECKS, SITE_FACT_LABELS, SITE_FINDING_WORDS, SITE_HEADER_PATTERN, SITE_LIBRARY, SITE_LOCALES, SITE_NEED_IDS, SITE_PAGE_MOVED_ASIDE, SITE_PATTERNS, SITE_PLAN_VERSION, SITE_TEMPLATES, SPEC_SITE_ARCHETYPES, SPEC_SITE_COPY_LENGTHS, SPEC_SITE_DENSITY_COPY, SPEC_SITE_FACTS, SPEC_SITE_FOOTER_PARTS, SPEC_SITE_HEADER_PARTS, SPEC_SITE_LAYOUT, SPEC_SITE_LIBRARY, SPEC_SITE_LOCALES, SPEC_SITE_NEED_IDS, SPEC_SITE_PATTERNS, SPEC_SITE_PICTURE_NEVER, SPEC_SITE_PICTURE_WORLDS, SPEC_SITE_PLAN_SHAPE, SPEC_SITE_REQUIRED_ROLES, SPEC_SITE_ROLES, SPEC_SITE_TEMPLATES, STAMPED_PAGE_ARCHETYPES, START_QUOTE_STEPS, START_QUOTE_TOKENS, STOCK_FAMILIES, STOCK_FAMILY_INTENTS, STOCK_INTENT_ORDER, STOCK_INTENT_SUBJECTS, STOCK_ITEM_ASPECT, STOCK_MIN_KEPT, STOCK_PROVIDER_TERMS, STOCK_SEED_MARGIN, STOCK_SUBJECT_WORDS, STORE_CONTACT_CODES, STRICT_SCHEMA_BUDGET, STRICT_SCHEMA_LIMITS, STUDIO_TEMPLATE, SWAP_CARRY_KINDS, ScrimLevel, ScrubUntil, SectionFallbackLastResort, SectionMaker, SectionSwapAction, SectionSwapRule, ShopResource, ShopSourceRole, SiteBuildKind, SiteBuildStatus, SiteCheckId, SiteFindingCode, SiteLocale, SitePageMaker, SitePageStatus, SitePlanError, SitePlanIssueCode, SitePlanSourceKind, SiteTemplateError, SiteTemplateId, StagedPageReason, StagedPageWay, StepState, StockIntent, StockOrientation, StockProviderId, StockReviewFlag, StockReviewVerdict, StockSlotKind, StockSubject, TEMPLATE_TYPE_WORDS, TYPE_LED_KEPT, TYPE_LED_OPTIONAL_PARTS, TYPE_LED_SWAPS, TypeLedChangeKind, WORDS_AREA_DEFAULT_SHARE, WordsEdge, addBarItem, addStockCredits, additionKey, additionSourcesOf, additionsNeedContent, adjustStepLabel, adjustStepOf, adjustStyleProps, aiModelStep, aiRefusalNext, aiStepParts, applyHeaderMix, applyLayoutEdits, applyOpeningMix, applyOwnPhotoGalleries, applyPictureScrims, applyPlanEdits, applyStockItemPhotos, applyStockPhotos, archetypeIssues, areaLuminance, artDirectionFor, artDirectionIssues, artDirectionPreamble, aspectRatioOf, assertStyleSlots, assertValidSitePlan, auditLayoutMotion, auditSite, barIconForRoute, bentoFill, bentoFillsParams, blocksPublish, bodyMeaning, bodyMix, bodyMixFromWords, bodyMixOfPlan, bodyMixWords, bodySeamClass, bodySeamShape, bodyTokenOf, bodyWireWords, bodyWordDrawn, bodyWordOffered, bodyWordTier, bodyWordWaits, bodyWords, boxSides, brandHueWord, buildKeys, buildStepFacts, buildStepsOf, builtHomePageId, calmParts, calmUnder, canonicalNodeJson, canonicalValue, carryBlockOf, carryButtonLink, carryHandles, carryInto, carryKindOf, carryNotPlaced, carrySection, checkAdditions, checkBody, checkCarry, checkFooter, checkFree, checkFreeSection, checkHeader, checkLayout, checkList, checkOpening, checkPopup, chooseScrim, chooseTypeLedOpening, columnIssues, composablePage, composeContextOf, composeFreePage, composeFreeSection, composeLayout, composeListFrame, composeNavHeader, composeOpening, composePopup, composePresetForm, composeSection, composeSite, composedPagesMax, composedPagesShare, composerLeftovers, composingShare, contactFactsOf, contentTypeOfSource, contentTypePreviewFields, contentTypeToWire, copyLengthOf, copyOutInteraction, costUsd, countryLegalFacts, coverCrop, createSerializedNode, creditsOfUsd, dataSourceToWire, derivedBeats, derivedDataSources, derivedShopSources, describeCarryForPrompt, describeInventoryForPrompt, describeListShape, describePlanData, describeShapeKey, dissolveInteraction, distinctFallbackSections, distinctFooter, distinctHeader, drawerRamp, drawerRestX, drawerStepCount, drawerSteps, drawerWidth, drawersTiming, drawnBodyMix, drawnFooterMix, drawnHeaderMix, drawnOpeningMix, driftAt, driftOverlap, duplicateNodeIds, editedPageIds, emptyAreaPhrase, emptyPictures, entranceAction, entranceInteraction, estimatePictures, estimateStepCredits, expandAdditions, expandFreeWire, expandLayoutWire, expandPlanWire, expandWireContentType, expandWireDataSource, expandWireEdit, expandWireField, expandWirePage, expandWireSection, expandWireShop, factIssues, failedBuildStep, fallBackBySection, fallBackFree, fallbackFingerprintOf, fallbackFingerprintOfPlanPage, fieldToWire, figuresNotIn, fillContactFacts, filmOfPlan, filmPlacement, findNavRoot, findOpening, findingMessageOf, findingSentence, fingerprintOf, fingerprintOfPlanPage, followedAfter, followedIssues, footerCallWord, footerMeaning, footerMix, footerMixFromWords, footerMixOfPlan, footerMixWords, footerNameFits, footerPattern, footerPatternIdOf, footerReferences, footerTableWords, footerTokenOf, footerTokenWords, footerWait, footerWireWords, footerWords, formAsksPersonalData, formLegalFacts, frameWords, freeContrastIssues, freeControlsOf, freeMoveOf, freeMoveWord, freeMoveWords, freeNodeId, freeSectionAsLayout, freeSectionOwner, freeSignaturePage, freeSlotIssues, freeStampedId, freeStyleIssues, freeStyleToSlots, freeStyleWithoutSlot, freeToWire, freeWireJsonSchema, freeWirePath, generationTierOf, groundToneOf, groupSentence, groupSiteFindings, handPageKey, handPlanPage, harvestPage, hash53, headerAdvice, headerCompanions, headerContextOfPlan, headerGallery, headerGalleryIdOf, headerMeaning, headerMix, headerMixFromWords, headerMixOfNavKind, headerMixOfPlan, headerMixValue, headerMixWords, headerPatternIdOf, headerRecipe, headerReferences, headerShape, headerSiteFor, headerTokenOf, headerTokenWords, headerWireWords, headerWordDrawn, headerWords, importSlug, isActiveBuild, isAdditionKey, isDrawers, isHandPageKey, isImportPlan, isLayoutRule, isLegalKind, isNonEmptyString, isPerItemPage, isPictureWorld, isPlainObject, isRedesignRun, isRtlLocale, isScrubbedEntrance, isSectionCarryHandle, isSectionStamp, isShopResource, isTemplateRoute, joinPageHeader, jsonAnyOf, jsonBoolean, jsonClosedObject, jsonInteger, jsonListOf, jsonOneOf, jsonSchemaKeywords, jsonSchemaObjects, jsonShapedObject, jsonText, judgeLayoutRender, keepListParts, layerMetricsOf, layerShownSpans, layoutBandScheme, layoutBoxPx, layoutColumnsOffered, layoutColumnsVw, layoutCounterDepth, layoutDesignOf, layoutDialOf, layoutDriftPhoto, layoutElementStyle, layoutEntersOffered, layoutFlagsOffered, layoutGalleryLists, layoutGallerySources, layoutGlideDepth, layoutHeldStill, layoutListBare, layoutListBinding, layoutListDrawnCols, layoutListPair, layoutListShapes, layoutListsContext, layoutLookChanges, layoutLookOf, layoutMixOffered, layoutMotionOf, layoutNearMiss, layoutNodeClass, layoutOpeningDisplayMend, layoutOpeningDisplays, layoutPathSteps, layoutPhotoIds, layoutPresetColours, layoutPresetOf, layoutRepairJsonSchema, layoutRoomPx, layoutRuleEdge, layoutScrubTakes, layoutSectionKindsOffered, layoutShapeHasPurpose, layoutSignatureOffered, layoutSignaturesOffered, layoutStillLine, layoutTextFits, layoutTextWidthEm, layoutToWire, layoutVoidScreens, layoutVoids, layoutWireJsonSchema, layoutWirePartWords, legalFactsOf, legalFormLine, legalKindBlocks, legalKindOfPage, legalKindRow, legalKindsFor, legalLabel, legalPageOf, legalRoute, legalTitle, listBelowPro, listBindingOfType, listBuiltWords, listColumns, listDetailOf, listIngredientWords, listMeaning, listMixFromWords, listMixOfFrame, listMixValue, listMixWords, listNeverIsEmpty, listOverhang, listPanelRows, listSaidSentence, listSentence, listShapeOfType, listTokenOf, listTokensOf, listWait, listWordOffered, listWordRef, listWordRefs, listWordRefusal, listWordTier, listWords, luminanceOf, measureFree, measureLayout, mendCarry, mendLayout, mendNotices, menuAtEveryWidth, menuLookOf, menuWords, modelCanDo, moveBarItem, moveEntrance, nameStyleOf, namedFooterMix, namedHeaderMix, namedOpeningMix, navHeaderContext, navPages, navShapeBreakpoint, navShapeOf, nearestHeaderMix, nestSitePages, nextSourceOf, nodeBindPaths, offeredForTier, onceEntrance, openingAdvice, openingAdviceMix, openingContextOf, openingFromSection, openingGallery, openingGalleryIdOf, openingHarnessWord, openingIsTypeLed, openingMeaning, openingMix, openingMixFromWords, openingMixOfPlan, openingMixValue, openingMixWords, openingPatternIdOf, openingPhoneInset, openingRecipe, openingReferences, openingTokenOf, openingTokenParts, openingWireWords, openingWordDrawn, openingWordOffered, openingWordTier, openingWordWaits, openingWords$1 as openingWords, orientationOfRatio, outwardCredits, ownPhotoFit, ownerContentInto, paddingKeepingClear, pageBuildSource, pageListIssues, pageShowsShop, pageToWire, parseLayoutPhotoId, parsePatternPath, parseSampleImageRef, pathAt, patternById, patternHasForm, patternLinkSlots, patternListGap, patternManifest, patternNeedsBinding, patternNodes, patternOptionalParts, patternRoleNeeds, patternScopes, patternSlotBudgets, patternSlots, patternTakesBinding, phoneGapBefore, phoneMenuPages, phoneWordsColour, photoInventory, photoShapeOf, pickListWord, pictureAspect, pictureItemsOf, pictureMakerOf, picturePrompt, pictureRefusalOf, pictureRerolls, pictureReviewIssues, pictureReviewJsonSchema, pictureReviewPasses, pictureSlotKey, pictureTargets, pictureTokensFor, pictureTryFits, picturelessTypes, pinnedPagesOf, pixelsUnder, placeFilm, plainCarryText, planEditOps, planEditToWire, planEditWireGaps, planEditWireKeys, planEditWireOps, planEditWireShape, planEditsFromWire, planEditsJsonSchema, planEditsToWire, planEntrances, planFromTemplate, planHasShopSource, planHeader, planImport, planLayoutPhotos, planNavShape, planOwnPhotos, planPartOfPath, planPartToWire, planPictures, planSells, planStockPhotos, planToWire, planWireGaps, planWirePartJsonSchema, planWirePartShape, planWireShape, planWordIssues, popupMeaning, popupMixFromWords, popupMixOfPlan, popupTokenOf, popupWireWords, previousRoute, pricesIn, promptLimitsOf, publishRefusal, publishVerdict, quietMoveEntrance, quoteItemOf, quoteListOf, quotesIn, readHeader, readOpening, readyMadeColumn, readyMadeToken, recipeListBinds, recomposeAsks, redesignAdditionsJsonSchema, redesignBackOpen, redesignBackUntil, redesignDiscardable, redesignPreviousChoices, refitBuiltPage, refitPage, refreshSectionStamps, releasedLayoutDefaults, removeBarItem, requiredAcknowledgements, requiredShapeKeys, rewordStoreGlobal, rhythmIssues, roleField, routeMatches, routeParams, samenessIssues, sampleImageRef, scoreStockPhoto, screenFontSize, screenWordColumns, screenWordMisfit, screenWordOverflowPx, scrubEntranceStamps, scrubTokenOf, scrubUntilChoice, scrubbedEntrance, scrubsEntrance, sectionBreaks, sectionBuildKey, sectionEntrances, sectionFingerprint, sectionOrigin, sectionPatternIds, sectionToWire, sectionTokenOf, sectionUnchanged, sectionsNamed, sequenceRepeats, sequenceShare, sequenceTokenOf, setStyleProps, settleLayoutPage, shapeKeys, shopCategoriesOf, shopContentType, shopListAliases, shopListsShownOn, shopPageOfPlan, shopSourceAliases, showcaseGlobals, showcasePages, showcasePlans, showcaseScenes, showcaseStorePages, shownTogether, signatureOf, siteBuiltWithLaw, siteFactLabel, siteGlobalsOf, siteNavPages, sitePages, sitePagesOf, siteParentRoute, siteSells, siteTreeOf, siteTreeOfPlan, slotBudget, splitCssValue, splitSide, stampFooterMix, stampHeaderMix, stampOpeningMix, stampOpeningMotion, stampSection, startComposingShare, startQuote, stockCopyKey, stockCreditLine, stockCreditLines, stockCreditNode, stockCreditNodeId, stockFits, stockGroupOf, stockItemSlots, stockKept, stockPhotoRatio, stockPhotoSubject, stockPhotoUsable, stockPhotoWords, stockSlots, stockWord, stockWords, storedHeaderMix, storedOpeningMix, strictSchemaComplexity, strictSchemaRefusal, swapParts, tierOf, tierOffers, toneOf, typeLedGroundFor, typeLedGrounds, typeLedLayoutSection, typeLedNotices, typeLedOpeningSection, typeLedOpeningWays, typeLedRound, typeLedSection, typesOfAddition, typicalStepTokens, validatePlanEdits, validateSitePlan, variantNamesOf, walkFree, walkSerialized, wearBodyMix, wireContentTypeJsonSchema, wireDataSourceJsonSchema, wireFieldJsonSchema, wirePageJsonSchema, wireSectionJsonSchema, wireShopProductJsonSchema, withAdditions, withCarriedText, withComposedPages, withDerivedSources, withDistinctFooter, withDistinctHeader, withHeaderWord, withListWord, withOpeningWord, withShownList, withoutFreeOrphans, wordPattern, wordsOverPhotos, wordsOverPicture, wornHeaderOfPlan, wornOpenings, writtenTexts };
|
|
41965
|
+
export { ACCOUNT_ENTRY_ID, ACTION_START_SCALE, ACTIVE_BUILD_STATUSES, ADDITION_CAPS, ADDITION_ITEMS_KEY, ADDITION_ITEM_SOURCE_SUFFIX, ADDITION_KEY_PREFIX, ADDITION_SLUG, ADJUSTMENTS, ADJUST_AXIS_LABELS, ADJUST_LOOK, ADJUST_OWN, ADJUST_STEPS, ADJUST_STEP_IDS, AI_COMPOSED_PAGES_BY_TIER, AI_COMPOSED_PAGES_ESTIMATED, AI_COMPOSED_PAGE_LEAN_TOKENS, AI_MODEL_STEPS, AI_PICTURE_MAKERS, AI_PLAN_REASKED_PART, AI_REFUSAL_NEXT, AI_REFUSAL_STATUS, AI_STEPS, AI_STEP_FEATURE, AI_STEP_LABELS, AI_STEP_NEEDS, AI_STEP_PART_TOKENS, AI_STEP_RUNS_AS, AI_STEP_TYPICAL_TOKENS, ART_DIRECTION_PARTS, AWARD_COMPOSED_PAGES_ESTIMATED, AdditionHeldBack, AdditionIssueCode, AdditionOrigin, AdditionsPart, AdditionsSkipped, AdjustAxis, AdjustKind, AiCallStatus, AiCapability, AiFeature, AiGenerationStage, AiKeyMode, AiLimit, AiNextKind, AiPictureMaker, AiProviderId, AiRefusalCode, AiStep, BAR_ITEMS_MAX, BAR_ITEMS_MIN, BASELINE_ROLES, BASELINE_WORDS_HE, BODY_TOKEN, BUILD_STEPS, BUTTON_LINK_PROPS, BaselineRole, BindScope, BodyIngredient, BodyMixError, BodyRepairCode, BodyRhythm, BodySeam, BodySectionWord, BodyTexture, BuildNoticeCode, BuildStep, CARRIED_BUTTON_STYLES, CARRY_LAYER_KINDS, CARRY_PHOTO_KINDS, CARRY_PROMPT_QUOTE, CARRY_WHOLE_LAYER_KINDS, CONTENT_ROLE_MEANINGS, COPY_OUT, CREDITS_PER_USD, CardBindTarget, CarryBlockKind, CarryKeptReason, CarryKind, CarryReferenceVia, CheckSeverity, ComposeError, ComposeIssueCode, ContentFieldControl, ContentFieldType, ContentRole, ContentTypeAction, CreatedKind, DANGLING_LINK_CODES, DEFAULT_FOOTER_PATTERN, DEFAULT_GENERATION_TIER, DEFAULT_HEADER_PATTERN, DEFAULT_PHONE_MENU_BREAKPOINT, DEFAULT_SITE_LOCALE, DRAWER_BEAT_MS, DRAWER_KINDS, DRAWER_LETTER_MS, DRAWER_LINE_MS, DRAWER_SPINE, DRAWER_STEPS, ENTRANCE_EASING, ENTRANCE_ORIGIN_LOOK, ENTRANCE_TRIGGER, EntrancePart, EntranceSide, FACT_KEYS, FIELD_TYPE_OF_CONTROL, FILL_ASPECT, FILM_PATTERN, FINAL_GENERATION_STAGES, FINDING_SEVERITY, FOOTER_INSET_STYLES, FOOTER_LEGAL_ROLE, FOOTER_TOKEN, FORM_LEGAL_ROLE, FREE_BUILDER_TYPE, FREE_CONTRAST, FREE_ELEMENT_STYLES, FREE_HOLDERS, FREE_HOVER_PROPS, FREE_LEAD_ROLE, FREE_MOVES, FREE_PHONE_LAYERS, FREE_PHONE_LIMITS, FREE_SECTIONS, FREE_STYLE_PROPS, FREE_TOKEN_PROPS, FREE_TO_LAYOUT_CODE, FREE_WIRE_NODE_KEYS, FREE_WORD_TYPES, FallbackOpeningKept, FilmUnplaced, FindingGrouping, FooterArrange, FooterClosing, FooterGround, FooterHold, FooterIngredient, FooterMixError, FooterNameStyle, FooterRepairCode, FooterRole, FreeIssueCode, FreeLayer, FreeNodeType, FreePictures, FreePurpose, FreeTrigger, GRAMMAR_TOO_LARGE_MESSAGE, GenerationTier, GlobalSlot, GroundTone, HAND_PAGE_KEY_PREFIX, HEADER_TOKEN, HEBREW_PREFIXES, HeaderAction, HeaderArrange, HeaderIngredient, HeaderMixError, HeaderPages, HeaderRepairCode, HeaderReplacedKind, IMPORT_NAV_MAX, IMPRINT_COUNTRIES, ISRAEL, ITEM_PAGE_ONLY_ROLES, ImportPattern, JOINED_HEADER_PADDING, JSON_SCHEMA_BANNED_KEYWORDS, JsonSchemaShapeError, KeptPagesChoice, KeptReason, LAYOUT_ACCENT_TEXT, LAYOUT_BEAT_DELAY, LAYOUT_CHECK_VIEWPORT, LAYOUT_COLOUR_TOKEN, LAYOUT_COLUMN_GAP, LAYOUT_COLUMN_MENDED, LAYOUT_DEPTH_ON_PHONE, LAYOUT_DRIFT, LAYOUT_EASING, LAYOUT_ENTRANCE_MAX_MS, LAYOUT_FONT_SIZE, LAYOUT_HIDDEN_OPACITY, LAYOUT_KINETIC_KINDS, LAYOUT_LINE_HEIGHT, LAYOUT_LIST_TOKEN, LAYOUT_MIX_OFFERED, LAYOUT_MIX_OFFERED_AWARD, LAYOUT_MIX_WORDS, LAYOUT_NEAR_MISS, LAYOUT_OPERATED, LAYOUT_OWNED_PROPS, LAYOUT_PACE, LAYOUT_PHONE_BREAKPOINT, LAYOUT_PHONE_PADDING, LAYOUT_PHOTO_ASPECT, LAYOUT_READY_MADE_TOKEN, LAYOUT_RISE, LAYOUT_SCREEN_PX, LAYOUT_SETTLE_PASSES, LAYOUT_TEXT_KINDS, LAYOUT_TOOLTIP_TRAIT, LAYOUT_VIEWPORTS, LAYOUT_WIRE_AUTOPLAY_MS, LEGAL_KINDS, LEGAL_PAGE_SETTING, LIST_CARD_PART, LIST_DECK_MAX_PX, LIST_DECK_SHARE, LIST_FRAME_STYLE_KEYS, LIST_INGREDIENTS, LIST_ITEM_MIN_PX, LIST_LONG_WORDS, LIST_RHYTHMS, LIST_ROLE_WORDS, LIST_RULES, LIST_SAY_WORDS, LIST_TABLE, LIST_WORDS_BESIDE_RULE, LayoutAlign, LayoutBleed, LayoutButtonVariant, LayoutColour, LayoutColourMode, LayoutDepth, LayoutDial, LayoutEase, LayoutEditOp, LayoutEnter, LayoutGalleryEffect, LayoutGapCode, LayoutIssueCode, LayoutLayerKind, LayoutListArrange, LayoutListArrive, LayoutListHover, LayoutListHow, LayoutListItem, LayoutListMove, LayoutListPhone, LayoutListRole, LayoutListSide, LayoutListWho, LayoutMendKind, LayoutMixIngredient, LayoutNavKind, LayoutPace, LayoutPhotoShape, LayoutPhotoSource, LayoutRole, LayoutScrubRefusal, LayoutSectionKind, LayoutSequenceToken, LayoutSide, LayoutSignatureId, LayoutSize, LayoutSourceChoice, LayoutTrackProp, LayoutTransition, LayoutViewport, LegalBlocks, LegalFact, LegalKind, ListPartChange, ListPartOutcome, ListSayCode, ListWordRefusal, MAX_SITE_PICTURES, MOTION_TRIGGERS, MOVING_OPENING_MEDIA, MenuSide, NAV_PART_LABELS, NAV_SHAPE_COPY, NEUTRAL_STYLE_PROPS, NODE_BASELINES, NO_TOKENS, NavPagesSource, NavRole, NavShape, NavShapeError, ONCE_ENTRANCE_MS, OPENING_DISSOLVE, OPENING_HEIGHT, OPENING_MIX_PROP, OPENING_TOKEN, OpeningExtra, OpeningFrame, OpeningGround, OpeningIngredient, OpeningMedia, OpeningMixError, OpeningMotion, OpeningRepairCode, OpeningRole, OpeningWords, PAGE_ARCHETYPES, PERSONAL_CONTROLS, PHOTO_ANALYSIS_WIDTH, PHOTO_CALM_DETAIL, PHOTO_GRID, PHOTO_LIGHT_LUMINANCE, PICTURE_ASPECTS, PICTURE_NEVER, PICTURE_REAL_PLACE_FAMILIES, PICTURE_REROLL_EVERY, PICTURE_REVIEW_FORMAT, PICTURE_REVIEW_SHAPE, PICTURE_TEXT_CONTRAST, PICTURE_TOKENS_UNKNOWN_MAKER, 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, POPUP_GLOBAL_ID, POPUP_LINK_WORD, POPUP_WIRE_INGREDIENTS, PREVIOUS_ROUTE_SUFFIX, PRICING_PATTERN, PROOF_FINGERPRINTS, PUBLISH_BLOCKING_PLACEHOLDERS, PageDataKind, PathIssueCollector, PatternDirective, PatternGlobalPosition, PatternOpens, PatternPlaceholder, PatternRecipe, PhoneMenuBreakpoint, PhotoTone, PictureRefusal, PictureWorld, PlaceholderKind, PlanChangeAction, PlanChangeKind, PlanDataSourceMode, PlanDataSourceType, PlanEditIssueCode, PlanEditOp, PlanEditsOutcome, PlanPart, PlanWireEntry, PlanWireShapeError, PlanWordIssueCode, PopupMixError, PopupRefusal, PreflightRefusalCode, PriceBindTarget, PromptLimit, PublishRefusalCode, PublishScope, REDESIGN_ADDITIONS_SCHEMA_NAMES, REDESIGN_BACK_DAYS, REDESIGN_PARTS, REDESIGN_STEPS, RENDER_CHECK, REQUIRED_CONTENT_ROLES, RedesignPageResult, RedesignPart, RedesignRefusalCode, RedesignStep, RelativeOp, SAMPLE_IMAGE_REF, SCENE_LEVEL, SCENE_OTHER_PAGES, SCRIM_BACKGROUND, SCRIM_COVER, SCRIM_LEVELS, SCRUBBED_ENTRANCE, SCRUB_UNTIL, SHOP_CART_BUTTON_ID, SHOP_CART_DRAWER_ID, SHOP_FIELDS, SHOP_LATEST_LIMIT, SHOP_LIST_LIMIT, SHOP_NEED, SHOP_ONLY_CONTENT_ROLES, SHOP_PRODUCTS_MAX, SHOP_ROLES, SHOP_SLUG_FIELD, SHOWCASE_FILM, SHOWCASE_SHOP, SIGN_IN_DIALOG_ID, SITE_CHECKS, SITE_FACT_LABELS, SITE_FINDING_WORDS, SITE_HEADER_PATTERN, SITE_LIBRARY, SITE_LOCALES, SITE_NEED_IDS, SITE_PAGE_MOVED_ASIDE, SITE_PATTERNS, SITE_PLAN_VERSION, SITE_TEMPLATES, SPEC_SITE_ARCHETYPES, SPEC_SITE_COPY_LENGTHS, SPEC_SITE_DENSITY_COPY, SPEC_SITE_FACTS, SPEC_SITE_FOOTER_PARTS, SPEC_SITE_HEADER_PARTS, SPEC_SITE_LAYOUT, SPEC_SITE_LIBRARY, SPEC_SITE_LOCALES, SPEC_SITE_NEED_IDS, SPEC_SITE_PATTERNS, SPEC_SITE_PICTURE_NEVER, SPEC_SITE_PICTURE_WORLDS, SPEC_SITE_PLAN_SHAPE, SPEC_SITE_REQUIRED_ROLES, SPEC_SITE_ROLES, SPEC_SITE_TEMPLATES, STAMPED_PAGE_ARCHETYPES, START_QUOTE_STEPS, START_QUOTE_TOKENS, STOCK_FAMILIES, STOCK_FAMILY_INTENTS, STOCK_INTENT_ORDER, STOCK_INTENT_SUBJECTS, STOCK_ITEM_ASPECT, STOCK_MIN_KEPT, STOCK_PROVIDER_TERMS, STOCK_SEED_MARGIN, STOCK_SUBJECT_WORDS, STORE_CONTACT_CODES, STRICT_SCHEMA_BUDGET, STRICT_SCHEMA_LIMITS, STUDIO_TEMPLATE, SWAP_CARRY_KINDS, ScrimLevel, ScrubUntil, SectionFallbackLastResort, SectionMaker, SectionSwapAction, SectionSwapRule, ShopResource, ShopSourceRole, SiteBuildKind, SiteBuildStatus, SiteCheckId, SiteFindingCode, SiteLocale, SitePageMaker, SitePageStatus, SitePlanError, SitePlanIssueCode, SitePlanSourceKind, SiteTemplateError, SiteTemplateId, StagedPageReason, StagedPageWay, StepState, StockIntent, StockOrientation, StockProviderId, StockReviewFlag, StockReviewVerdict, StockSlotKind, StockSubject, TEMPLATE_TYPE_WORDS, TYPE_LED_KEPT, TYPE_LED_OPTIONAL_PARTS, TYPE_LED_SWAPS, TypeLedChangeKind, WORDS_AREA_DEFAULT_SHARE, WordsEdge, addBarItem, addStockCredits, additionKey, additionSourcesOf, additionsNeedContent, adjustStepLabel, adjustStepOf, adjustStyleProps, aiModelStep, aiRefusalNext, aiStepParts, applyHeaderMix, applyLayoutEdits, applyOpeningMix, applyOwnPhotoGalleries, applyPictureScrims, applyPlanEdits, applyStockItemPhotos, applyStockPhotos, archetypeIssues, areaLuminance, artDirectionFor, artDirectionIssues, artDirectionPreamble, aspectRatioOf, assertStyleSlots, assertValidSitePlan, auditLayoutMotion, auditSite, barIconForRoute, bentoFill, bentoFillsParams, blocksPublish, bodyMeaning, bodyMix, bodyMixFromWords, bodyMixOfPlan, bodyMixWords, bodySeamClass, bodySeamShape, bodyTokenOf, bodyWireWords, bodyWordDrawn, bodyWordOffered, bodyWordTier, bodyWordWaits, bodyWords, boxSides, brandHueWord, buildKeys, buildStepFacts, buildStepsOf, builtHomePageId, calmParts, calmUnder, canonicalNodeJson, canonicalValue, carryBlockOf, carryButtonLink, carryHandles, carryInto, carryKindOf, carryNotPlaced, carrySection, checkAdditions, checkBody, checkCarry, checkFooter, checkFree, checkFreeSection, checkHeader, checkLayout, checkList, checkOpening, checkPopup, chooseScrim, chooseTypeLedOpening, columnIssues, composablePage, composeContextOf, composeFreePage, composeFreeSection, composeLayout, composeListFrame, composeNavHeader, composeOpening, composePopup, composePresetForm, composeSection, composeSite, composedPagesMax, composedPagesShare, composerLeftovers, composingShare, contactFactsOf, contentTypeOfSource, contentTypePreviewFields, contentTypeToWire, copyLengthOf, copyOutInteraction, costUsd, countryLegalFacts, coverCrop, createSerializedNode, creditsOfUsd, dataSourceToWire, derivedBeats, derivedDataSources, derivedShopSources, describeCarryForPrompt, describeInventoryForPrompt, describeListShape, describePlanData, describeShapeKey, dissolveInteraction, distinctFallbackSections, distinctFooter, distinctHeader, drawerRamp, drawerRestX, drawerStepCount, drawerSteps, drawerWidth, drawersTiming, drawnBodyMix, drawnFooterMix, drawnHeaderMix, drawnOpeningMix, driftAt, driftOverlap, duplicateNodeIds, editedPageIds, emptyAreaPhrase, emptyPictures, entranceAction, entranceInteraction, estimatePictures, estimateStepCredits, expandAdditions, expandFreeWire, expandLayoutWire, expandPlanWire, expandWireContentType, expandWireDataSource, expandWireEdit, expandWireField, expandWirePage, expandWireSection, expandWireShop, factIssues, failedBuildStep, fallBackBySection, fallBackFree, fallbackFingerprintOf, fallbackFingerprintOfPlanPage, fieldToWire, figuresNotIn, fillContactFacts, filmOfPlan, filmPlacement, findNavRoot, findOpening, findingMessageOf, findingSentence, fingerprintOf, fingerprintOfPlanPage, followedAfter, followedIssues, footerCallWord, footerMeaning, footerMix, footerMixFromWords, footerMixOfPlan, footerMixWords, footerNameFits, footerPattern, footerPatternIdOf, footerReferences, footerTableWords, footerTokenOf, footerTokenWords, footerWait, footerWireWords, footerWords, formAsksPersonalData, formLegalFacts, frameWords, freeContrastIssues, freeControlsOf, freeMoveOf, freeMoveWord, freeMoveWords, freeNodeId, freeSectionAsLayout, freeSectionOwner, freeSignaturePage, freeSlotIssues, freeStampedId, freeStyleIssues, freeStyleToSlots, freeStyleWithoutSlot, freeToWire, freeWireJsonSchema, freeWirePath, generationTierOf, groundToneOf, groupSentence, groupSiteFindings, handPageKey, handPlanPage, harvestPage, hash53, headerAdvice, headerCompanions, headerContextOfPlan, headerGallery, headerGalleryIdOf, headerMeaning, headerMix, headerMixFromWords, headerMixOfNavKind, headerMixOfPlan, headerMixValue, headerMixWords, headerPatternIdOf, headerRecipe, headerReferences, headerShape, headerSiteFor, headerTokenOf, headerTokenWords, headerWireWords, headerWordDrawn, headerWords, importSlug, importedPicturesOf, isActiveBuild, isAdditionKey, isDrawers, isHandPageKey, isImportPlan, isLayoutRule, isLegalKind, isNonEmptyString, isPerItemPage, isPictureWorld, isPlainObject, isRedesignRun, isRtlLocale, isScrubbedEntrance, isSectionCarryHandle, isSectionStamp, isShopResource, isTemplateRoute, joinPageHeader, jsonAnyOf, jsonBoolean, jsonClosedObject, jsonInteger, jsonListOf, jsonOneOf, jsonSchemaKeywords, jsonSchemaObjects, jsonShapedObject, jsonText, judgeLayoutRender, keepListParts, layerMetricsOf, layerShownSpans, layoutBandScheme, layoutBoxPx, layoutColumnsOffered, layoutColumnsVw, layoutCounterDepth, layoutDesignOf, layoutDialOf, layoutDriftPhoto, layoutElementStyle, layoutEntersOffered, layoutFlagsOffered, layoutGalleryLists, layoutGallerySources, layoutGlideDepth, layoutHeldStill, layoutListBare, layoutListBinding, layoutListDrawnCols, layoutListPair, layoutListShapes, layoutListsContext, layoutLookChanges, layoutLookOf, layoutMixOffered, layoutMotionOf, layoutNearMiss, layoutNodeClass, layoutOpeningDisplayMend, layoutOpeningDisplays, layoutPathSteps, layoutPhotoIds, layoutPresetColours, layoutPresetOf, layoutRepairJsonSchema, layoutRoomPx, layoutRuleEdge, layoutScrubTakes, layoutSectionKindsOffered, layoutShapeHasPurpose, layoutSignatureOffered, layoutSignaturesOffered, layoutStillLine, layoutTextFits, layoutTextWidthEm, layoutToWire, layoutVoidScreens, layoutVoids, layoutWireJsonSchema, layoutWirePartWords, legalFactsOf, legalFormLine, legalKindBlocks, legalKindOfPage, legalKindRow, legalKindsFor, legalLabel, legalPageOf, legalRoute, legalTitle, listBelowPro, listBindingOfType, listBuiltWords, listColumns, listDetailOf, listIngredientWords, listMeaning, listMixFromWords, listMixOfFrame, listMixValue, listMixWords, listNeverIsEmpty, listOverhang, listPanelRows, listSaidSentence, listSentence, listShapeOfType, listTokenOf, listTokensOf, listWait, listWordOffered, listWordRef, listWordRefs, listWordRefusal, listWordTier, listWords, luminanceOf, measureFree, measureLayout, mendCarry, mendLayout, mendNotices, menuAtEveryWidth, menuLookOf, menuWords, modelCanDo, moveBarItem, moveEntrance, nameStyleOf, namedFooterMix, namedHeaderMix, namedOpeningMix, navHeaderContext, navPages, navShapeBreakpoint, navShapeOf, nearestHeaderMix, nestSitePages, nextSourceOf, nodeBindPaths, offeredForTier, onceEntrance, openingAdvice, openingAdviceMix, openingContextOf, openingFromSection, openingGallery, openingGalleryIdOf, openingHarnessWord, openingIsTypeLed, openingMeaning, openingMix, openingMixFromWords, openingMixOfPlan, openingMixValue, openingMixWords, openingPatternIdOf, openingPhoneInset, openingRecipe, openingReferences, openingTokenOf, openingTokenParts, openingWireWords, openingWordDrawn, openingWordOffered, openingWordTier, openingWordWaits, openingWords$1 as openingWords, orientationOfRatio, outwardCredits, ownPhotoFit, ownerContentInto, paddingKeepingClear, pageBuildSource, pageListIssues, pageShowsShop, pageToWire, parseLayoutPhotoId, parsePatternPath, parseSampleImageRef, pathAt, patternById, patternHasForm, patternLinkSlots, patternListGap, patternManifest, patternNeedsBinding, patternNodes, patternOptionalParts, patternPartSlots, patternRoleNeeds, patternScopes, patternSlotBudgets, patternSlots, patternTakesBinding, phoneGapBefore, phoneMenuPages, phoneWordsColour, photoInventory, photoShapeOf, pickListWord, pictureAspect, pictureItemsOf, pictureMakerOf, picturePrompt, pictureRefusalOf, pictureRerolls, pictureReviewIssues, pictureReviewJsonSchema, pictureReviewPasses, pictureSlotKey, pictureTargets, pictureTokensFor, pictureTryFits, picturelessTypes, pinnedPagesOf, pixelsUnder, placeFilm, plainCarryText, planEditOps, planEditToWire, planEditWireGaps, planEditWireKeys, planEditWireOps, planEditWireShape, planEditsFromWire, planEditsJsonSchema, planEditsToWire, planEntrances, planFromTemplate, planHasShopSource, planHeader, planImport, planLayoutPhotos, planNavShape, planOwnPhotos, planPartOfPath, planPartToWire, planPictures, planSells, planStockPhotos, planToWire, planWireGaps, planWirePartJsonSchema, planWirePartShape, planWireShape, planWordIssues, popupMeaning, popupMixFromWords, popupMixOfPlan, popupTokenOf, popupWireWords, previousRoute, pricesIn, promptLimitsOf, publishRefusal, publishVerdict, quietMoveEntrance, quoteItemOf, quoteListOf, quotesIn, readHeader, readOpening, readyMadeColumn, readyMadeToken, recipeListBinds, recomposeAsks, redesignAdditionsJsonSchema, redesignBackOpen, redesignBackUntil, redesignDiscardable, redesignPreviousChoices, refitBuiltPage, refitPage, refreshSectionStamps, releasedLayoutDefaults, removeBarItem, requiredAcknowledgements, requiredShapeKeys, rewordStoreGlobal, rhythmIssues, roleField, routeMatches, routeParams, samenessIssues, sampleImageRef, scoreStockPhoto, screenFontSize, screenWordColumns, screenWordMisfit, screenWordOverflowPx, scrubEntranceStamps, scrubTokenOf, scrubUntilChoice, scrubbedEntrance, scrubsEntrance, sectionBreaks, sectionBuildKey, sectionEntrances, sectionFingerprint, sectionOrigin, sectionPatternIds, sectionToWire, sectionTokenOf, sectionUnchanged, sectionsNamed, sequenceRepeats, sequenceShare, sequenceTokenOf, setStyleProps, settleLayoutPage, shapeKeys, shopCategoriesOf, shopContentType, shopListAliases, shopListsShownOn, shopPageOfPlan, shopSourceAliases, showcaseGlobals, showcasePages, showcasePlans, showcaseScenes, showcaseStorePages, shownTogether, signatureOf, siteBuiltWithLaw, siteFactLabel, siteGlobalsOf, siteNavPages, sitePages, sitePagesOf, siteParentRoute, siteSells, siteTreeOf, siteTreeOfPlan, slotBudget, splitCssValue, splitSide, stampFooterMix, stampHeaderMix, stampOpeningMix, stampOpeningMotion, stampSection, startComposingShare, startQuote, stockCopyKey, stockCreditLine, stockCreditLines, stockCreditNode, stockCreditNodeId, stockFits, stockGroupOf, stockItemSlots, stockKept, stockPhotoRatio, stockPhotoSubject, stockPhotoUsable, stockPhotoWords, stockSlots, stockWord, stockWords, storedHeaderMix, storedOpeningMix, strictSchemaComplexity, strictSchemaRefusal, swapParts, tierOf, tierOffers, toneOf, typeLedGroundFor, typeLedGrounds, typeLedNotices, typeLedOpeningSection, typeLedOpeningWays, typeLedPlateColour, typeLedPlates, typeLedRound, typeLedSection, typesOfAddition, typicalStepTokens, validatePlanEdits, validateSitePlan, variantNamesOf, walkFree, walkSerialized, wearBodyMix, wireContentTypeJsonSchema, wireDataSourceJsonSchema, wireFieldJsonSchema, wirePageJsonSchema, wireSectionJsonSchema, wireShopProductJsonSchema, withAdditions, withCarriedText, withComposedPages, withDerivedSources, withDistinctFooter, withDistinctHeader, withHeaderWord, withListWord, withOpeningWord, withShownList, withoutFreeOrphans, wordPattern, wordsOverPhotos, wordsOverPicture, wornHeaderOfPlan, wornOpenings, writtenTexts };
|
|
41905
41966
|
//# sourceMappingURL=vectoriox-iox-ui-generation-core.mjs.map
|