@wix/himalaya-cli 0.1159.0 → 0.1161.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/dist/cli.mjs +370 -181
- package/dist/preview-assets.generated.bin +0 -0
- package/guides/component-reference.json +2 -8
- package/guides/component-reference.md +1 -3
- package/package.json +2 -2
- package/templates/beauty-salon-owner/dev/index.ts +382 -194
- package/templates/beauty-salon-owner/tier5-src/_shared/owner-editor-value.ts +56 -0
- package/templates/beauty-salon-owner/tier5-src/himi-owner-lite-post-form/index.ts +132 -46
- package/templates/community-club-owner/dev/index.ts +382 -194
- package/templates/community-club-owner/tier5-src/_shared/owner-editor-value.ts +56 -0
- package/templates/community-club-owner/tier5-src/himi-owner-lite-post-form/index.ts +132 -46
- package/templates/events-meetups-owner/dev/index.ts +382 -194
- package/templates/events-meetups-owner/tier5-src/_shared/owner-editor-value.ts +56 -0
- package/templates/events-meetups-owner/tier5-src/himi-owner-lite-post-form/index.ts +132 -46
- package/templates/gym-fitness-owner/dev/index.ts +382 -194
- package/templates/gym-fitness-owner/tier5-src/_shared/owner-editor-value.ts +56 -0
- package/templates/gym-fitness-owner/tier5-src/himi-owner-lite-post-form/index.ts +132 -46
- package/templates/nonprofit-cause-owner/dev/index.ts +382 -194
- package/templates/nonprofit-cause-owner/tier5-src/_shared/owner-editor-value.ts +56 -0
- package/templates/nonprofit-cause-owner/tier5-src/himi-owner-lite-post-form/index.ts +132 -46
- package/templates/owner-lite/dev/index.ts +382 -194
- package/templates/owner-lite/tier5-src/_shared/owner-editor-value.ts +56 -0
- package/templates/owner-lite/tier5-src/himi-owner-lite-post-form/index.ts +132 -46
- package/templates/podcast-creator-owner/dev/index.ts +382 -194
- package/templates/podcast-creator-owner/tier5-src/_shared/owner-editor-value.ts +56 -0
- package/templates/podcast-creator-owner/tier5-src/himi-owner-lite-post-form/index.ts +132 -46
- package/templates/portfolio-creative-owner/dev/index.ts +382 -194
- package/templates/portfolio-creative-owner/tier5-src/_shared/owner-editor-value.ts +56 -0
- package/templates/portfolio-creative-owner/tier5-src/himi-owner-lite-post-form/index.ts +132 -46
- package/templates/restaurant-owner/dev/index.ts +382 -194
- package/templates/restaurant-owner/tier5-src/_shared/owner-editor-value.ts +56 -0
- package/templates/restaurant-owner/tier5-src/himi-owner-lite-post-form/index.ts +132 -46
- package/templates/retail-store-owner/dev/index.ts +382 -194
- package/templates/retail-store-owner/tier5-src/_shared/owner-editor-value.ts +56 -0
- package/templates/retail-store-owner/tier5-src/himi-owner-lite-post-form/index.ts +132 -46
- package/templates/yoga-studio-owner/dev/index.ts +382 -194
- package/templates/yoga-studio-owner/tier5-src/_shared/owner-editor-value.ts +56 -0
- package/templates/yoga-studio-owner/tier5-src/himi-owner-lite-post-form/index.ts +132 -46
package/dist/cli.mjs
CHANGED
|
@@ -505,8 +505,8 @@ async function readWip(store, app) {
|
|
|
505
505
|
if (!wipSupported(store)) return "unsupported";
|
|
506
506
|
const { wip, promoted } = normalizeWipRecord(await store.getWipRecord(app));
|
|
507
507
|
if (!wip || promoted.some((p) => p.id === wip.releaseId)) return null;
|
|
508
|
-
const
|
|
509
|
-
return
|
|
508
|
+
const live3 = await store.getManifest(app);
|
|
509
|
+
return live3?.releaseId === wip.releaseId ? null : wip;
|
|
510
510
|
}
|
|
511
511
|
var storedTime;
|
|
512
512
|
var init_wip_pointer = __esm({
|
|
@@ -6834,6 +6834,7 @@ function resolveTranslation(value, catalog, sourceCatalog) {
|
|
|
6834
6834
|
var BINDING_SIGILS, BINDING_SIGIL_RE, TRANSLATION_PREFIX, TRANSLATION_KEY_RE;
|
|
6835
6835
|
var init_bindings = __esm({
|
|
6836
6836
|
"../../core/ts/src/bindings.ts"() {
|
|
6837
|
+
"use strict";
|
|
6837
6838
|
BINDING_SIGILS = ["service", "flag", "item", "t"];
|
|
6838
6839
|
BINDING_SIGIL_RE = new RegExp(
|
|
6839
6840
|
`^\\$(?:${BINDING_SIGILS.filter((s) => s !== "t").join("|")})\\b|^\\$t:`
|
|
@@ -8254,7 +8255,10 @@ var init_a11y_contract = __esm({
|
|
|
8254
8255
|
ListItem: { role: "listitem", name: "required", state: ["selected", "disabled", "position"], decorative: false },
|
|
8255
8256
|
// ---- Navigation and progress structures ---------------------------------------------
|
|
8256
8257
|
DisclosureGroup: { role: "button", name: "required", state: ["expanded/collapsed"], decorative: false },
|
|
8257
|
-
|
|
8258
|
+
// NO state (#3433): the header collapses as the content under it scrolls, not because the user
|
|
8259
|
+
// toggled it — it is not a disclosure, and "collapsed" would describe a scroll offset as if it
|
|
8260
|
+
// were a control's setting. Every arm exposes the title as a heading and nothing more.
|
|
8261
|
+
CollapsingHeader: { role: "heading", name: "required", state: [], decorative: false },
|
|
8258
8262
|
Carousel: { role: "list", name: "required", state: ["item N of M"], decorative: false },
|
|
8259
8263
|
Pager: { role: "list", name: "required", state: ["item N of M"], decorative: false },
|
|
8260
8264
|
PageControl: { role: "adjustable", name: "required", state: ["page N of M"], decorative: false },
|
|
@@ -11896,7 +11900,7 @@ function inputJson(input) {
|
|
|
11896
11900
|
const json6 = JSON.stringify(input ?? {});
|
|
11897
11901
|
return json6 === void 0 ? "{}" : json6;
|
|
11898
11902
|
}
|
|
11899
|
-
function timerGlobals(hide,
|
|
11903
|
+
function timerGlobals(hide, live3) {
|
|
11900
11904
|
const hidden = new Set(hide ?? []);
|
|
11901
11905
|
const stubs = {
|
|
11902
11906
|
setTimeout: " globalThis.setTimeout = function () { return 0; };",
|
|
@@ -11922,7 +11926,7 @@ function timerGlobals(hide, live2) {
|
|
|
11922
11926
|
setInterval: " globalThis.setInterval = function () { return 0; };",
|
|
11923
11927
|
clearInterval: " globalThis.clearInterval = function () {};"
|
|
11924
11928
|
};
|
|
11925
|
-
const decls =
|
|
11929
|
+
const decls = live3 ? real : stubs;
|
|
11926
11930
|
return Object.entries(decls).filter(([name]) => !hidden.has(name)).map(([, src]) => src).join("\n");
|
|
11927
11931
|
}
|
|
11928
11932
|
function preludeFor(opts) {
|
|
@@ -13252,6 +13256,7 @@ function resolveIdiom(tokens2, ctx = {}) {
|
|
|
13252
13256
|
var IDIOM_CONTEXTS, UNSAFE_KEYS;
|
|
13253
13257
|
var init_idiom = __esm({
|
|
13254
13258
|
"../../core/ts/src/idiom.ts"() {
|
|
13259
|
+
"use strict";
|
|
13255
13260
|
IDIOM_CONTEXTS = {
|
|
13256
13261
|
ios: { native: ["ios"] },
|
|
13257
13262
|
android: { native: ["material"] },
|
|
@@ -18222,12 +18227,12 @@ function genNativeConfig(app, opts = {}) {
|
|
|
18222
18227
|
const embedManaged = hasMarkers(project, "yaml", LABEL_LIVE_EMBED);
|
|
18223
18228
|
if (targetManaged !== embedManaged) throw new Error(`${app}: Live Activity target and embedding markers must be installed together`);
|
|
18224
18229
|
const drainsWidgetActions = hostAppliesDeferredWidgetActions(app);
|
|
18225
|
-
const
|
|
18226
|
-
if (
|
|
18230
|
+
const live3 = targetManaged ? liveActivityPlan(project, ids.includes("live_activity"), drainsWidgetActions) : void 0;
|
|
18231
|
+
if (live3?.appGroupId) {
|
|
18227
18232
|
const key2 = "com.apple.security.application-groups";
|
|
18228
18233
|
const existing = ios.entitlements[key2];
|
|
18229
18234
|
const groups = Array.isArray(existing) ? [...existing] : existing === void 0 ? [] : [existing];
|
|
18230
|
-
if (!groups.includes(
|
|
18235
|
+
if (!groups.includes(live3.appGroupId)) groups.push(live3.appGroupId);
|
|
18231
18236
|
ios.entitlements[key2] = groups;
|
|
18232
18237
|
}
|
|
18233
18238
|
const files = [
|
|
@@ -18275,7 +18280,7 @@ function genNativeConfig(app, opts = {}) {
|
|
|
18275
18280
|
files.push(r);
|
|
18276
18281
|
}
|
|
18277
18282
|
if (targetManaged) {
|
|
18278
|
-
const plan =
|
|
18283
|
+
const plan = live3;
|
|
18279
18284
|
files.push(applyToFile(iosYml, "yaml", LABEL_LIVE_TARGET, (i) => plan.target.map((line) => i + line), check));
|
|
18280
18285
|
files.push(applyToFile(iosYml, "yaml", LABEL_LIVE_EMBED, (i) => plan.embed.map((line) => i + line), check));
|
|
18281
18286
|
const source = join29(dirname16(iosYml), LIVE_SOURCE_PATH);
|
|
@@ -24512,6 +24517,7 @@ function shouldRevealError(args) {
|
|
|
24512
24517
|
var EMAIL_RE, URL_HOST_RE, INTEGER_RE, NUMBER_RE;
|
|
24513
24518
|
var init_validation = __esm({
|
|
24514
24519
|
"../../core/ts/src/validation.ts"() {
|
|
24520
|
+
"use strict";
|
|
24515
24521
|
EMAIL_RE = /^[A-Za-z0-9._%+-]+@[A-Za-z0-9-]+(\.[A-Za-z0-9-]+)*\.[A-Za-z]{2,}$/;
|
|
24516
24522
|
URL_HOST_RE = /^[A-Za-z0-9-]+(\.[A-Za-z0-9-]+)*(:[0-9]+)?$/;
|
|
24517
24523
|
INTEGER_RE = /^[+-]?[0-9]+$/;
|
|
@@ -25171,6 +25177,7 @@ function validateWorkerSubtree(raw, slotId, policy, actionCatalog) {
|
|
|
25171
25177
|
var WORKER_SUBTREE_CEILINGS, ID_PART, ACTION_ID;
|
|
25172
25178
|
var init_worker_subtree = __esm({
|
|
25173
25179
|
"../../core/ts/src/worker-subtree.ts"() {
|
|
25180
|
+
"use strict";
|
|
25174
25181
|
init_worker_subtree_safe_types_generated();
|
|
25175
25182
|
WORKER_SUBTREE_CEILINGS = Object.freeze({
|
|
25176
25183
|
maxEncodedBytes: 65536,
|
|
@@ -31591,7 +31598,7 @@ function RichContentEditorView({ props, ctx, wrap, nodeId, renderChild, ...dom }
|
|
|
31591
31598
|
const C = ctx.color;
|
|
31592
31599
|
const name = typeof props.name === "string" && props.name ? props.name : void 0;
|
|
31593
31600
|
const bag = React3.useContext(FormValuesContext);
|
|
31594
|
-
const
|
|
31601
|
+
const live3 = !!ctx.onAction;
|
|
31595
31602
|
const toolsKey = JSON.stringify(props.tools ?? null);
|
|
31596
31603
|
const tools = React3.useMemo(() => effectiveTools(props.tools, props.uploadService), [toolsKey, props.uploadService]);
|
|
31597
31604
|
const seedMode = typeof props.documentJson === "string" ? "literal" : typeof props.documentPath === "string" && props.documentPath ? "binding" : "none";
|
|
@@ -31630,11 +31637,11 @@ function RichContentEditorView({ props, ctx, wrap, nodeId, renderChild, ...dom }
|
|
|
31630
31637
|
const fireOnChangeRef = React3.useRef(fireOnChange);
|
|
31631
31638
|
fireOnChangeRef.current = fireOnChange;
|
|
31632
31639
|
React3.useEffect(() => {
|
|
31633
|
-
if (
|
|
31634
|
-
}, [
|
|
31640
|
+
if (live3) setSrc(new URL(ENGINE_PAGE_PATH, document.baseURI).toString());
|
|
31641
|
+
}, [live3]);
|
|
31635
31642
|
React3.useEffect(() => {
|
|
31636
31643
|
const frame = iframeRef.current;
|
|
31637
|
-
if (!
|
|
31644
|
+
if (!live3 || !src || !frame) return;
|
|
31638
31645
|
const t = ricosEditorWebTimings;
|
|
31639
31646
|
const session = createRicosHostSession({
|
|
31640
31647
|
send: (msg) => frame.contentWindow?.postMessage({ ricos: 1, msg }, "*"),
|
|
@@ -31679,7 +31686,7 @@ function RichContentEditorView({ props, ctx, wrap, nodeId, renderChild, ...dom }
|
|
|
31679
31686
|
session.dispose();
|
|
31680
31687
|
sessionRef.current = null;
|
|
31681
31688
|
};
|
|
31682
|
-
}, [
|
|
31689
|
+
}, [live3, src]);
|
|
31683
31690
|
React3.useEffect(() => {
|
|
31684
31691
|
sessionRef.current?.setSeed(seedMode === "literal" ? props.documentJson : seedMode === "binding" ? boundSeed : "");
|
|
31685
31692
|
}, [seedMode, props.documentJson, boundSeed, src]);
|
|
@@ -31735,7 +31742,7 @@ function RichContentEditorView({ props, ctx, wrap, nodeId, renderChild, ...dom }
|
|
|
31735
31742
|
setLink(null);
|
|
31736
31743
|
};
|
|
31737
31744
|
const root = { position: "relative", display: "flex", flexDirection: "column", width: "100%", ...fill ? { flex: "1 1 auto", minHeight: 0 } : { minHeight }, ...wrap };
|
|
31738
|
-
if (!
|
|
31745
|
+
if (!live3) {
|
|
31739
31746
|
const { paddingTop: _t, paddingBottom: _b, paddingLeft: _l, paddingRight: _r, ...rootNoSides } = root;
|
|
31740
31747
|
const own3 = { ...rootNoSides, border: `1px solid ${C("border", "#e3e3e3")}`, borderRadius: 8, padding: 12, boxSizing: "border-box" };
|
|
31741
31748
|
return /* @__PURE__ */ jsx4("div", { ...dom, style: addIntrinsicPadding(own3, wrap) ?? own3, children: /* @__PURE__ */ jsx4("span", { style: { color: C("textSecondary", "#636B78") }, children: placeholder2 || "Rich text editor" }) });
|
|
@@ -31905,7 +31912,17 @@ function labelText(label2, ctx) {
|
|
|
31905
31912
|
}
|
|
31906
31913
|
return asText2(label2);
|
|
31907
31914
|
}
|
|
31908
|
-
|
|
31915
|
+
function resolveRowAction(action, ctx) {
|
|
31916
|
+
const resolved2 = resolveItemDeep(action, ctx);
|
|
31917
|
+
if (!resolved2 || typeof resolved2 !== "object" || Array.isArray(resolved2)) return resolved2;
|
|
31918
|
+
const params = resolved2.params;
|
|
31919
|
+
if (!params || typeof params !== "object" || Array.isArray(params)) return resolved2;
|
|
31920
|
+
return {
|
|
31921
|
+
...resolved2,
|
|
31922
|
+
params: Object.fromEntries(Object.entries(params).map(([k, v]) => [k, typeof v === "number" || typeof v === "boolean" ? String(v) : v]))
|
|
31923
|
+
};
|
|
31924
|
+
}
|
|
31925
|
+
var useResolvedId, FONT, rowShareFloor, A11ySwitch, A11Y_PART, A11ySlider, A11ySelectionControl, actOf, withSelection, resolveItemDeep, A11yTabs, A11ySegmented, disclosureSeq, A11yDisclosure;
|
|
31909
31926
|
var init_controls = __esm({
|
|
31910
31927
|
"../../core/web-renderer/src/a11y/controls.tsx"() {
|
|
31911
31928
|
"use strict";
|
|
@@ -31972,7 +31989,7 @@ var init_controls = __esm({
|
|
|
31972
31989
|
}
|
|
31973
31990
|
const toggleAct = act;
|
|
31974
31991
|
if (ctx.onAction && toggleAct) {
|
|
31975
|
-
const resolved3 =
|
|
31992
|
+
const resolved3 = resolveRowAction(toggleAct, ctx);
|
|
31976
31993
|
ctx.onAction({ ...resolved3, args: { ...resolved3.args ?? {}, value: next } });
|
|
31977
31994
|
}
|
|
31978
31995
|
} : void 0;
|
|
@@ -31994,6 +32011,7 @@ var init_controls = __esm({
|
|
|
31994
32011
|
)
|
|
31995
32012
|
] });
|
|
31996
32013
|
};
|
|
32014
|
+
A11Y_PART = "data-hm-a11y-part";
|
|
31997
32015
|
A11ySlider = ({ props, ctx, wrap }) => {
|
|
31998
32016
|
const C = ctx.color;
|
|
31999
32017
|
const min = props.min ?? 0, max = props.max ?? 1;
|
|
@@ -32007,13 +32025,72 @@ var init_controls = __esm({
|
|
|
32007
32025
|
React4.useEffect(() => {
|
|
32008
32026
|
setVal(bound);
|
|
32009
32027
|
}, [bound]);
|
|
32010
|
-
const
|
|
32028
|
+
const dragging = React4.useRef(false);
|
|
32029
|
+
const canFire = !!(ctx.onAction && props.onChange && !props.disabled);
|
|
32030
|
+
const commit = (nv) => {
|
|
32031
|
+
setVal(nv);
|
|
32032
|
+
if (!canFire) return;
|
|
32033
|
+
const act = resolveRowAction(props.onChange, ctx);
|
|
32034
|
+
ctx.onAction({ ...act, args: { ...act.args ?? {}, value: nv } });
|
|
32035
|
+
};
|
|
32011
32036
|
const clampPct = (n) => max > min ? Math.max(0, Math.min(1, (n - min) / (max - min))) : 0;
|
|
32037
|
+
const [pair, setPair] = React4.useState(() => [Math.min(bound, props.upperValue ?? bound), Math.max(bound, props.upperValue ?? bound)]);
|
|
32038
|
+
React4.useEffect(() => {
|
|
32039
|
+
if (range) setPair([Math.min(bound, props.upperValue), Math.max(bound, props.upperValue)]);
|
|
32040
|
+
}, [range, bound, props.upperValue]);
|
|
32012
32041
|
if (range) {
|
|
32013
|
-
const lo
|
|
32014
|
-
|
|
32042
|
+
const [lo, hi] = pair;
|
|
32043
|
+
const thumbKey = (which) => (e) => {
|
|
32044
|
+
if (props.disabled) return;
|
|
32045
|
+
const at2 = pair[which];
|
|
32046
|
+
const floor = which === 0 ? min : lo, ceil = which === 0 ? hi : max;
|
|
32047
|
+
let nv = at2;
|
|
32048
|
+
switch (e.key) {
|
|
32049
|
+
case "ArrowRight":
|
|
32050
|
+
case "ArrowUp":
|
|
32051
|
+
nv = Math.min(ceil, at2 + step);
|
|
32052
|
+
break;
|
|
32053
|
+
case "ArrowLeft":
|
|
32054
|
+
case "ArrowDown":
|
|
32055
|
+
nv = Math.max(floor, at2 - step);
|
|
32056
|
+
break;
|
|
32057
|
+
case "Home":
|
|
32058
|
+
nv = floor;
|
|
32059
|
+
break;
|
|
32060
|
+
case "End":
|
|
32061
|
+
nv = ceil;
|
|
32062
|
+
break;
|
|
32063
|
+
default:
|
|
32064
|
+
return;
|
|
32065
|
+
}
|
|
32066
|
+
e.preventDefault();
|
|
32067
|
+
const next = which === 0 ? [nv, hi] : [lo, nv];
|
|
32068
|
+
setPair(next);
|
|
32069
|
+
if (canFire) {
|
|
32070
|
+
const act = resolveRowAction(props.onChange, ctx);
|
|
32071
|
+
ctx.onAction({ ...act, args: { ...act.args ?? {}, value: next[0], upperValue: next[1] } });
|
|
32072
|
+
}
|
|
32073
|
+
};
|
|
32074
|
+
const groupName = labelText(props.label, ctx) || void 0;
|
|
32075
|
+
return /* @__PURE__ */ jsx5("div", { ...{ [A11Y_PART]: "root" }, role: "group", "aria-label": groupName, style: { width: "100%", padding: "12px 9px", boxSizing: "border-box", opacity: props.disabled ? 0.5 : 1, ...wrap }, children: /* @__PURE__ */ jsxs2("div", { style: { position: "relative", height: 4, borderRadius: 999, background: C("surfaceTertiary", "#e3e6ea") }, children: [
|
|
32015
32076
|
/* @__PURE__ */ jsx5("div", { style: { position: "absolute", left: `${clampPct(lo) * 100}%`, right: `${(1 - clampPct(hi)) * 100}%`, top: 0, bottom: 0, borderRadius: 999, background: tint } }),
|
|
32016
|
-
[lo, hi].map((p, i) => /* @__PURE__ */ jsx5(
|
|
32077
|
+
[lo, hi].map((p, i) => /* @__PURE__ */ jsx5(
|
|
32078
|
+
"span",
|
|
32079
|
+
{
|
|
32080
|
+
...i === 0 ? { [A11Y_PART]: "focus" } : {},
|
|
32081
|
+
role: "slider",
|
|
32082
|
+
tabIndex: props.disabled ? -1 : 0,
|
|
32083
|
+
"aria-label": i === 0 ? "Minimum" : "Maximum",
|
|
32084
|
+
"aria-valuenow": p,
|
|
32085
|
+
"aria-valuemin": i === 0 ? min : lo,
|
|
32086
|
+
"aria-valuemax": i === 0 ? hi : max,
|
|
32087
|
+
"aria-orientation": "horizontal",
|
|
32088
|
+
"aria-disabled": props.disabled ? true : void 0,
|
|
32089
|
+
onKeyDown: thumbKey(i),
|
|
32090
|
+
style: { position: "absolute", left: `${clampPct(p) * 100}%`, top: "50%", width: 18, height: 18, borderRadius: "50%", background: "#fff", border: `2px solid ${tint}`, transform: "translate(-50%, -50%)", boxShadow: "0 1px 3px rgba(0,0,0,.25)", outlineOffset: 3, cursor: props.disabled ? "default" : "pointer" }
|
|
32091
|
+
},
|
|
32092
|
+
i
|
|
32093
|
+
))
|
|
32017
32094
|
] }) });
|
|
32018
32095
|
}
|
|
32019
32096
|
const pct = clampPct(val);
|
|
@@ -32039,12 +32116,38 @@ var init_controls = __esm({
|
|
|
32039
32116
|
return;
|
|
32040
32117
|
}
|
|
32041
32118
|
e.preventDefault();
|
|
32119
|
+
commit(nv);
|
|
32120
|
+
};
|
|
32121
|
+
const valueAt = (e) => {
|
|
32122
|
+
const r = e.currentTarget.getBoundingClientRect();
|
|
32123
|
+
if (!(r.width > 0)) return void 0;
|
|
32124
|
+
const f = Math.max(0, Math.min(1, (e.clientX - r.left) / r.width));
|
|
32125
|
+
const raw2 = min + f * (max - min);
|
|
32126
|
+
const grid = Math.max(min, Math.min(max, Number((min + Math.round((raw2 - min) / step) * step).toFixed(10))));
|
|
32127
|
+
return Math.abs(max - raw2) < Math.abs(grid - raw2) ? max : grid;
|
|
32128
|
+
};
|
|
32129
|
+
const onPointerDown = (e) => {
|
|
32130
|
+
if (props.disabled) return;
|
|
32131
|
+
const nv = valueAt(e);
|
|
32132
|
+
if (nv === void 0) return;
|
|
32133
|
+
dragging.current = true;
|
|
32134
|
+
e.currentTarget.setPointerCapture?.(e.pointerId);
|
|
32042
32135
|
setVal(nv);
|
|
32043
|
-
if (fire) fire();
|
|
32044
32136
|
};
|
|
32045
|
-
|
|
32137
|
+
const onPointerMove = (e) => {
|
|
32138
|
+
if (!dragging.current) return;
|
|
32139
|
+
const nv = valueAt(e);
|
|
32140
|
+
if (nv !== void 0) setVal(nv);
|
|
32141
|
+
};
|
|
32142
|
+
const onPointerUp = (e) => {
|
|
32143
|
+
if (!dragging.current) return;
|
|
32144
|
+
dragging.current = false;
|
|
32145
|
+
commit(valueAt(e) ?? val);
|
|
32146
|
+
};
|
|
32147
|
+
return /* @__PURE__ */ jsx5("div", { ...{ [A11Y_PART]: "root" }, style: { width: "100%", padding: "12px 9px", boxSizing: "border-box", opacity: props.disabled ? 0.5 : 1, ...wrap }, children: /* @__PURE__ */ jsx5(
|
|
32046
32148
|
"div",
|
|
32047
32149
|
{
|
|
32150
|
+
...{ [A11Y_PART]: "node" },
|
|
32048
32151
|
role: "slider",
|
|
32049
32152
|
tabIndex: props.disabled ? -1 : 0,
|
|
32050
32153
|
"aria-valuenow": val,
|
|
@@ -32054,7 +32157,10 @@ var init_controls = __esm({
|
|
|
32054
32157
|
"aria-label": labelText(props.label, ctx) || void 0,
|
|
32055
32158
|
"aria-disabled": props.disabled ? true : void 0,
|
|
32056
32159
|
onKeyDown,
|
|
32057
|
-
|
|
32160
|
+
onPointerDown,
|
|
32161
|
+
onPointerMove,
|
|
32162
|
+
onPointerUp,
|
|
32163
|
+
style: { position: "relative", height: 18, display: "flex", alignItems: "center", outlineOffset: 4, cursor: props.disabled ? "default" : "pointer", touchAction: "pan-y" },
|
|
32058
32164
|
children: /* @__PURE__ */ jsxs2("div", { style: { position: "relative", height: 4, width: "100%", borderRadius: 999, background: C("surfaceTertiary", "#e3e6ea") }, children: [
|
|
32059
32165
|
/* @__PURE__ */ jsx5("div", { style: { position: "absolute", left: 0, width: `${pct * 100}%`, top: 0, bottom: 0, borderRadius: 999, background: tint } }),
|
|
32060
32166
|
/* @__PURE__ */ jsx5("span", { "aria-hidden": true, style: { position: "absolute", left: `${pct * 100}%`, top: "50%", width: 18, height: 18, borderRadius: "50%", background: "#fff", border: `2px solid ${tint}`, transform: "translate(-50%, -50%)", boxShadow: "0 1px 3px rgba(0,0,0,.25)" } })
|
|
@@ -32071,7 +32177,7 @@ var init_controls = __esm({
|
|
|
32071
32177
|
const accent = C("accentPrimary", "#116DFF");
|
|
32072
32178
|
const fire = ctx.onAction && props.onChange && !props.disabled ? (e) => {
|
|
32073
32179
|
e?.stopPropagation?.();
|
|
32074
|
-
const act =
|
|
32180
|
+
const act = resolveRowAction(props.onChange, ctx);
|
|
32075
32181
|
const next = isRadio ? true : !on3;
|
|
32076
32182
|
ctx.onAction({ ...act, args: { ...act.args ?? {}, value: next } });
|
|
32077
32183
|
} : void 0;
|
|
@@ -32211,7 +32317,7 @@ var init_controls = __esm({
|
|
|
32211
32317
|
const subtitle = useResolvedScalar(props.subtitle, ctx);
|
|
32212
32318
|
const expanded = useResolvedScalar(props.expandedPath ?? props.expanded, ctx);
|
|
32213
32319
|
const open = expanded === true;
|
|
32214
|
-
const fire = ctx.onAction && props.onToggle ? () => ctx.onAction(
|
|
32320
|
+
const fire = ctx.onAction && props.onToggle ? () => ctx.onAction(resolveRowAction(props.onToggle, ctx)) : void 0;
|
|
32215
32321
|
const regionId = React4.useMemo(() => `himi-disclosure-${++disclosureSeq}`, []);
|
|
32216
32322
|
return /* @__PURE__ */ jsxs2("div", { style: { width: "100%", ...wrap }, children: [
|
|
32217
32323
|
/* @__PURE__ */ jsxs2(
|
|
@@ -32238,12 +32344,15 @@ var init_controls = __esm({
|
|
|
32238
32344
|
});
|
|
32239
32345
|
|
|
32240
32346
|
// ../../core/web-renderer/src/a11y/modalStack.ts
|
|
32241
|
-
function pushModalLayer(el) {
|
|
32242
|
-
const layer = { el: typeof el === "function" ? el : () => el };
|
|
32347
|
+
function pushModalLayer(el, opts = {}) {
|
|
32348
|
+
const layer = { el: typeof el === "function" ? el : () => el, host: opts.host === true, seq: pushes++ };
|
|
32243
32349
|
layers.push(layer);
|
|
32244
32350
|
sync();
|
|
32245
32351
|
return {
|
|
32246
|
-
isTop: () =>
|
|
32352
|
+
isTop: () => {
|
|
32353
|
+
const own3 = layer.el();
|
|
32354
|
+
return own3 != null && own3.isConnected && topLayerOver(own3) === layer;
|
|
32355
|
+
},
|
|
32247
32356
|
release: () => {
|
|
32248
32357
|
const i = layers.indexOf(layer);
|
|
32249
32358
|
if (i < 0) return;
|
|
@@ -32253,43 +32362,75 @@ function pushModalLayer(el) {
|
|
|
32253
32362
|
};
|
|
32254
32363
|
}
|
|
32255
32364
|
function isWithinTopModal(el) {
|
|
32256
|
-
const top =
|
|
32257
|
-
return top == null || top.contains(el);
|
|
32365
|
+
const top = topOver(el);
|
|
32366
|
+
return top == null || top.el.contains(el);
|
|
32258
32367
|
}
|
|
32259
|
-
function
|
|
32260
|
-
|
|
32261
|
-
|
|
32262
|
-
|
|
32368
|
+
function live() {
|
|
32369
|
+
const out2 = [];
|
|
32370
|
+
for (const layer of layers) {
|
|
32371
|
+
const el = layer.el();
|
|
32372
|
+
if (el?.isConnected) out2.push({ layer, el, scope: el.parentElement?.closest(`[${MODAL_SCOPE_ATTR}]`) ?? el.ownerDocument.body });
|
|
32263
32373
|
}
|
|
32264
|
-
return
|
|
32374
|
+
return out2;
|
|
32375
|
+
}
|
|
32376
|
+
function rootOf(l, all) {
|
|
32377
|
+
for (let root = l; ; ) {
|
|
32378
|
+
const outer = all.find((o) => o.el !== root.el && o.el.contains(root.el));
|
|
32379
|
+
if (!outer) return root;
|
|
32380
|
+
root = outer;
|
|
32381
|
+
}
|
|
32382
|
+
}
|
|
32383
|
+
function above(a, b, all) {
|
|
32384
|
+
if (a.el !== b.el) {
|
|
32385
|
+
if (b.el.contains(a.el)) return true;
|
|
32386
|
+
if (a.el.contains(b.el)) return false;
|
|
32387
|
+
}
|
|
32388
|
+
const ra = rootOf(a, all);
|
|
32389
|
+
const rb = rootOf(b, all);
|
|
32390
|
+
if (ra !== rb) return ra.layer.host !== rb.layer.host ? ra.layer.host : ra.layer.seq > rb.layer.seq;
|
|
32391
|
+
return a.layer.seq > b.layer.seq;
|
|
32392
|
+
}
|
|
32393
|
+
function topOf(candidates, all) {
|
|
32394
|
+
let top = null;
|
|
32395
|
+
for (const c of candidates) if (!top || above(c, top, all)) top = c;
|
|
32396
|
+
return top;
|
|
32397
|
+
}
|
|
32398
|
+
function topOver(target) {
|
|
32399
|
+
const all = live();
|
|
32400
|
+
return topOf(all.filter((l) => l.scope.contains(target) || target.contains(l.el)), all);
|
|
32401
|
+
}
|
|
32402
|
+
function topLayerOver(target) {
|
|
32403
|
+
return topOver(target)?.layer ?? null;
|
|
32265
32404
|
}
|
|
32266
32405
|
function sync() {
|
|
32267
32406
|
watcher?.disconnect();
|
|
32268
32407
|
watcher = null;
|
|
32269
32408
|
for (const el of madeInert) el.removeAttribute("inert");
|
|
32270
32409
|
madeInert.clear();
|
|
32271
|
-
const
|
|
32272
|
-
if (!
|
|
32273
|
-
const
|
|
32274
|
-
const
|
|
32275
|
-
|
|
32276
|
-
|
|
32277
|
-
|
|
32278
|
-
|
|
32279
|
-
|
|
32280
|
-
|
|
32281
|
-
|
|
32282
|
-
|
|
32283
|
-
|
|
32284
|
-
|
|
32285
|
-
|
|
32286
|
-
|
|
32287
|
-
|
|
32410
|
+
const all = live();
|
|
32411
|
+
if (!all.length) return;
|
|
32412
|
+
const levels = /* @__PURE__ */ new Set();
|
|
32413
|
+
for (const scope of new Set(all.map((l) => l.scope))) {
|
|
32414
|
+
const top = topOf(all.filter((l) => l.scope === scope), all);
|
|
32415
|
+
let node = top.el;
|
|
32416
|
+
while (node !== scope && node.parentElement) {
|
|
32417
|
+
const parent = node.parentElement;
|
|
32418
|
+
levels.add(parent);
|
|
32419
|
+
for (const sibling of Array.from(parent.children)) {
|
|
32420
|
+
if (sibling === node || SKIP.has(sibling.tagName) || sibling.hasAttribute("inert")) continue;
|
|
32421
|
+
sibling.setAttribute("inert", "");
|
|
32422
|
+
madeInert.add(sibling);
|
|
32423
|
+
}
|
|
32424
|
+
node = parent;
|
|
32425
|
+
}
|
|
32426
|
+
}
|
|
32427
|
+
const Observer = all[0].el.ownerDocument.defaultView?.MutationObserver;
|
|
32428
|
+
if (Observer && levels.size) {
|
|
32288
32429
|
watcher = new Observer(() => sync());
|
|
32289
32430
|
for (const level of levels) watcher.observe(level, { childList: true });
|
|
32290
32431
|
}
|
|
32291
32432
|
}
|
|
32292
|
-
var MODAL_SCOPE_ATTR, SKIP, layers, madeInert, watcher;
|
|
32433
|
+
var MODAL_SCOPE_ATTR, SKIP, layers, madeInert, watcher, pushes;
|
|
32293
32434
|
var init_modalStack = __esm({
|
|
32294
32435
|
"../../core/web-renderer/src/a11y/modalStack.ts"() {
|
|
32295
32436
|
MODAL_SCOPE_ATTR = "data-himi-modal-scope";
|
|
@@ -32297,6 +32438,7 @@ var init_modalStack = __esm({
|
|
|
32297
32438
|
layers = [];
|
|
32298
32439
|
madeInert = /* @__PURE__ */ new Set();
|
|
32299
32440
|
watcher = null;
|
|
32441
|
+
pushes = 0;
|
|
32300
32442
|
}
|
|
32301
32443
|
});
|
|
32302
32444
|
|
|
@@ -33466,12 +33608,22 @@ function editA11yParts(node, edit) {
|
|
|
33466
33608
|
if (typeof part !== "string" && nextKids === kids3) return node;
|
|
33467
33609
|
return cloneWithKids(node, typeof part === "string" ? { ...edit(part, own3), [A11Y_PART]: void 0 } : {}, nextKids);
|
|
33468
33610
|
}
|
|
33469
|
-
function a11yPartEdit(routed, authoredName, onNode) {
|
|
33611
|
+
function a11yPartEdit(routed, authoredName, onNode, focus) {
|
|
33470
33612
|
return (part, own3) => {
|
|
33471
33613
|
if (part === "derived-name") return authoredName ? {} : { "aria-hidden": "true" };
|
|
33614
|
+
const focusable = typeof own3.tabIndex === "number" && own3.tabIndex >= 0;
|
|
33615
|
+
if (part === "focus") {
|
|
33616
|
+
if (!focus || !focusable) return {};
|
|
33617
|
+
focus.onRouted();
|
|
33618
|
+
return { ...focus.carried };
|
|
33619
|
+
}
|
|
33472
33620
|
if (part !== "node") return {};
|
|
33473
33621
|
onNode();
|
|
33474
33622
|
const patch = { ...routed };
|
|
33623
|
+
if (focus && focusable) {
|
|
33624
|
+
Object.assign(patch, focus.carried);
|
|
33625
|
+
focus.onRouted();
|
|
33626
|
+
}
|
|
33475
33627
|
if (typeof routed["aria-describedby"] === "string" && typeof own3["aria-describedby"] === "string") {
|
|
33476
33628
|
patch["aria-describedby"] = `${own3["aria-describedby"]} ${routed["aria-describedby"]}`;
|
|
33477
33629
|
}
|
|
@@ -33618,11 +33770,28 @@ function withExtras(name, render) {
|
|
|
33618
33770
|
for (const k of NODE_A11Y_ATTRS) if (next[k] !== void 0) routed[k] = next[k];
|
|
33619
33771
|
if (pass[AUTHORED_ROLE] === true || pass["aria-level"] != null) routed.role = next.role;
|
|
33620
33772
|
}
|
|
33773
|
+
const focus = {};
|
|
33774
|
+
if (!rootIsControl) {
|
|
33775
|
+
if (next.tabIndex !== void 0 && !tabIndexIsSynthetic) focus.tabIndex = next.tabIndex;
|
|
33776
|
+
if (next["data-himalaya-initial-focus"] !== void 0) focus["data-himalaya-initial-focus"] = next["data-himalaya-initial-focus"];
|
|
33777
|
+
}
|
|
33621
33778
|
let nodeFound = false;
|
|
33622
|
-
|
|
33623
|
-
|
|
33624
|
-
|
|
33779
|
+
let focusRouted = false;
|
|
33780
|
+
const kids3 = editA11yParts(prev.children, a11yPartEdit(
|
|
33781
|
+
routed,
|
|
33782
|
+
pass["aria-label"] != null,
|
|
33783
|
+
() => {
|
|
33784
|
+
nodeFound = true;
|
|
33785
|
+
},
|
|
33786
|
+
Object.keys(focus).length ? { carried: focus, onRouted: () => {
|
|
33787
|
+
focusRouted = true;
|
|
33788
|
+
} } : void 0
|
|
33789
|
+
));
|
|
33625
33790
|
if (nodeFound) for (const k of Object.keys(routed)) delete next[k];
|
|
33791
|
+
if (focusRouted) {
|
|
33792
|
+
delete next.tabIndex;
|
|
33793
|
+
delete next["data-himalaya-initial-focus"];
|
|
33794
|
+
}
|
|
33626
33795
|
return cloneWithKids(el, next, kids3);
|
|
33627
33796
|
}
|
|
33628
33797
|
return React7.cloneElement(el, next);
|
|
@@ -35133,13 +35302,15 @@ function renderInner(node, ctx) {
|
|
|
35133
35302
|
] });
|
|
35134
35303
|
}
|
|
35135
35304
|
// RFC 0058 §4 — an INLINE card, drawn where the descriptor puts it, as iOS (`AlertDialogPreview`)
|
|
35136
|
-
// and Android (`SDUIAlertDialogPreview`) draw it
|
|
35137
|
-
//
|
|
35138
|
-
//
|
|
35139
|
-
//
|
|
35140
|
-
//
|
|
35305
|
+
// and Android (`SDUIAlertDialogPreview`) draw it. It is not presented over the screen, so a
|
|
35306
|
+
// screen that shows one inline (a cart's high-value confirm, a component gallery) keeps the rest
|
|
35307
|
+
// of itself usable, tab bar included — and it is NOT modal, whatever `modal` says (#3428):
|
|
35308
|
+
// `modal` applies only while an alert is presented, and `aria-modal` on a card in the screen's
|
|
35309
|
+
// own flow told assistive technology that every sibling was unavailable, with no way to dismiss
|
|
35310
|
+
// it. A presented alert is `presentation: "alert"` on a navigating Action, which the web host
|
|
35311
|
+
// draws as its own modal dialog.
|
|
35141
35312
|
case "AlertDialog":
|
|
35142
|
-
return /* @__PURE__ */ jsxs5("div", { role: "alertdialog", "aria-
|
|
35313
|
+
return /* @__PURE__ */ jsxs5("div", { role: "alertdialog", "aria-label": props.title != null ? asBoundText(props.title, ctx) : "Alert", style: { background: C("surfacePrimary", "#fff"), borderRadius: ctx.radius("lg", 14), padding: 18, width: "100%", boxSizing: "border-box", border: `1px solid ${C("border", "#e3e3e3")}`, boxShadow: "0 12px 30px -12px rgba(0,0,0,.4)", ...wrap }, children: [
|
|
35143
35314
|
/* @__PURE__ */ jsx8("div", { style: { fontFamily: bodyFont(ctx), fontWeight: 700, fontSize: 17, color: C("textPrimary", "#111") }, children: txt(props.title, ctx) }),
|
|
35144
35315
|
/* @__PURE__ */ jsx8("div", { style: { fontFamily: bodyFont(ctx), fontSize: 14, lineHeight: 1.45, color: C("textSecondary", "#666"), margin: "6px 0 16px" }, children: txt(props.message, ctx) }),
|
|
35145
35316
|
/* @__PURE__ */ jsxs5("div", { style: { display: "flex", gap: 10 }, children: [
|
|
@@ -35162,7 +35333,7 @@ function renderInner(node, ctx) {
|
|
|
35162
35333
|
}
|
|
35163
35334
|
}
|
|
35164
35335
|
}
|
|
35165
|
-
var useIsomorphicLayoutEffect, ResponsiveGrid, SPLIT_EXPANDED_MIN_WIDTH, SPLIT_COLUMN_GAP, ResponsiveSplitView, ABSOLUTE_URL_RE, appearKeyframesInjected, pressStylesInjected, FOCUS_RING_CSS, focusStylesInjected, HLIST_CHILD_CSS, hListStylesInjected, listAnimateRuntimeInstalled, transitionKeyframesInjected, countUpRuntimeInjected, MEASURE_PREFIX, measureRuntimeInjected, revealRuntimeInjected, vectorAnimStylesInjected, scrollProgressRuntimeInjected, confettiRuntimeInjected, lottieRuntimeInjected, riveRuntimeInjected, gradientKeyframesInjected, parallaxRuntimeInjected, spinKeyframesInjected, marqueeKeyframesInjected, alignItems, zJustifyItems, hAlignItems, bodyFont, kids2, rowKidCtx, rowKids, staggeredKids, asTextL10n, asBoundText, useBoundString, InterpolatedTextView, txt, selectFragmentCase, fragmentValueHash, fragmentSlotContent, FragmentSlotNode, RichContentEditorNode, WorkerSubtreeNode, RichContentNode, resolveItemDeep2, resolveSwipeActions, resolveModBindings, resolvedComponentId, directServiceBindings, ReactiveDirectScalars, HiddenGate, KEYBOARD_INPUT_MODES, AUTOCAPITALIZE_VALUES, ENTER_KEY_HINTS, AUTOGROW_CEILING, EditableField, MenuNode, LoadMoreSentinel, FieldErrorNode, FormView, MediaSlotProvider, MEDIA_ITEM_BINDABLE, MediaPlayerView, VideoNode, PdfViewNode, WebViewNode, InteractivePicker, InteractiveDatePicker, InteractiveSearchField, InteractiveStepper, SYNTHETIC_TAP_ROLE, SYNTHETIC_TABINDEX, INFERRED_DECORATIVE, SELF_RENDERED_LEAF, ROLE_WHEN_NAMED, AUTHORED_ROLE, PENDING_RANGE, RANGE_ROLES,
|
|
35336
|
+
var useIsomorphicLayoutEffect, ResponsiveGrid, SPLIT_EXPANDED_MIN_WIDTH, SPLIT_COLUMN_GAP, ResponsiveSplitView, ABSOLUTE_URL_RE, appearKeyframesInjected, pressStylesInjected, FOCUS_RING_CSS, focusStylesInjected, HLIST_CHILD_CSS, hListStylesInjected, listAnimateRuntimeInstalled, transitionKeyframesInjected, countUpRuntimeInjected, MEASURE_PREFIX, measureRuntimeInjected, revealRuntimeInjected, vectorAnimStylesInjected, scrollProgressRuntimeInjected, confettiRuntimeInjected, lottieRuntimeInjected, riveRuntimeInjected, gradientKeyframesInjected, parallaxRuntimeInjected, spinKeyframesInjected, marqueeKeyframesInjected, alignItems, zJustifyItems, hAlignItems, bodyFont, kids2, rowKidCtx, rowKids, staggeredKids, asTextL10n, asBoundText, useBoundString, InterpolatedTextView, txt, selectFragmentCase, fragmentValueHash, fragmentSlotContent, FragmentSlotNode, RichContentEditorNode, WorkerSubtreeNode, RichContentNode, resolveItemDeep2, resolveSwipeActions, resolveModBindings, resolvedComponentId, directServiceBindings, ReactiveDirectScalars, HiddenGate, KEYBOARD_INPUT_MODES, AUTOCAPITALIZE_VALUES, ENTER_KEY_HINTS, AUTOGROW_CEILING, EditableField, MenuNode, LoadMoreSentinel, FieldErrorNode, FormView, MediaSlotProvider, MEDIA_ITEM_BINDABLE, MediaPlayerView, VideoNode, PdfViewNode, WebViewNode, InteractivePicker, InteractiveDatePicker, InteractiveSearchField, InteractiveStepper, SYNTHETIC_TAP_ROLE, SYNTHETIC_TABINDEX, INFERRED_DECORATIVE, SELF_RENDERED_LEAF, ROLE_WHEN_NAMED, AUTHORED_ROLE, PENDING_RANGE, RANGE_ROLES, NODE_A11Y_ATTRS, INTERACTIVE_ROLES, ALWAYS_INTERACTIVE_COMPONENT_TYPES, controlNode, ToggleNode, SliderNode, SelectionControlNode, TabsNode, SegmentedControlNode, DisclosureGroupNode, GridNode, SplitViewNode, TextNode, ImageNode, ANIMATION_LEAF, LottieNode, RiveNode, AvatarNode, IconNode, ButtonNode, OtpInputNode, ProgressBarNode, ActivityIndicatorNode, NATIVELY_TABBABLE, BottomSheetNode, PRESENTED_OVERLAY_ATTR, PopoverNode, ChipsInputNode, ChipNode, TableNode, GaugeRing, GaugeNode, RATING_METRICS, ratingMetrics, RatingNode, AvatarStripNode, CHART_STROKE_CYCLE, chartStrokeAt, chartBarCenter, ChartNode, donutSliceOpacity, DonutChartNode, LegendMarker, LegendNode, cellAlign, DataTableNode, voiceNoteState, voiceNoteDelivery, VOICE_NOTE_DEFAULT_BARS, clampBarCount, VoiceNoteNode, TimelineNode, WheelPickerNode, ColorPickerNode, FilterChipsNode, TILE_PX, MAX_MERCATOR_LAT, DEFAULT_TILE_MAX_ZOOM, CIRCLE_SEGMENTS, METRES_PER_DEG_LAT, MARKER_HIT_RADIUS, SHAPE_HIT_RADIUS, MapNode, CollapsingHeaderNode, UnsupportedOnSurface, CALENDAR_DATE_ONLY_RE, CAL_DEFAULT_MAX_DOTS, CAL_AGENDA_INITIAL_DAYS, CAL_AGENDA_PAGE_DAYS, CAL_DEFAULT_SNAP_MINUTES, CAL_UNASSIGNED_LANE_ID, MonthCalendarNode, TimeGridNode, AgendaNode, ARIA_ROLE, initialFocusScheduled, PRESENTED_SCOPE, focusRoots, A11yHintDescription, WebRenderer;
|
|
35166
35337
|
var init_renderNode = __esm({
|
|
35167
35338
|
"../../core/web-renderer/src/renderNode.tsx"() {
|
|
35168
35339
|
"use strict";
|
|
@@ -35325,7 +35496,7 @@ var init_renderNode = __esm({
|
|
|
35325
35496
|
const bound = Object.entries(params).filter(
|
|
35326
35497
|
([, v]) => typeof v === "string" && v.startsWith("$service:")
|
|
35327
35498
|
);
|
|
35328
|
-
const [
|
|
35499
|
+
const [live3, setLive] = React7.useState(() => {
|
|
35329
35500
|
const seed2 = {};
|
|
35330
35501
|
if (ctx.provider) for (const [k, p] of bound) seed2[k] = ctx.provider.value(servicePath(p));
|
|
35331
35502
|
return seed2;
|
|
@@ -35339,7 +35510,7 @@ var init_renderNode = __esm({
|
|
|
35339
35510
|
);
|
|
35340
35511
|
return () => unsubs.forEach((u) => u());
|
|
35341
35512
|
}, [ctx.provider, subKey]);
|
|
35342
|
-
const resolved2 = { ...
|
|
35513
|
+
const resolved2 = { ...live3 };
|
|
35343
35514
|
for (const [k, v] of Object.entries(params)) {
|
|
35344
35515
|
if (typeof v === "string" && v.startsWith("$item")) resolved2[k] = resolveScalarStatic(v, ctx);
|
|
35345
35516
|
}
|
|
@@ -35732,18 +35903,21 @@ var init_renderNode = __esm({
|
|
|
35732
35903
|
const C = ctx.color;
|
|
35733
35904
|
React7.useEffect(() => {
|
|
35734
35905
|
if (!open) return;
|
|
35906
|
+
const onTop = () => menuRef.current != null && isWithinTopModal(menuRef.current);
|
|
35735
35907
|
const onDown = (e) => {
|
|
35736
|
-
if (hostRef.current && !hostRef.current.contains(e.target)) setOpen(false);
|
|
35908
|
+
if (hostRef.current && !hostRef.current.contains(e.target) && onTop()) setOpen(false);
|
|
35737
35909
|
};
|
|
35738
35910
|
const onKey = (e) => {
|
|
35739
|
-
if (e.key
|
|
35911
|
+
if (e.key !== "Escape" || !onTop()) return;
|
|
35912
|
+
e.stopPropagation();
|
|
35913
|
+
setOpen(false);
|
|
35740
35914
|
};
|
|
35741
35915
|
const kinds = ["pointerdown", "touchstart", "mousedown"];
|
|
35742
|
-
for (const k of kinds) document.addEventListener(k, onDown);
|
|
35743
|
-
document.addEventListener("keydown", onKey);
|
|
35916
|
+
for (const k of kinds) document.addEventListener(k, onDown, true);
|
|
35917
|
+
document.addEventListener("keydown", onKey, true);
|
|
35744
35918
|
return () => {
|
|
35745
|
-
for (const k of kinds) document.removeEventListener(k, onDown);
|
|
35746
|
-
document.removeEventListener("keydown", onKey);
|
|
35919
|
+
for (const k of kinds) document.removeEventListener(k, onDown, true);
|
|
35920
|
+
document.removeEventListener("keydown", onKey, true);
|
|
35747
35921
|
};
|
|
35748
35922
|
}, [open]);
|
|
35749
35923
|
const modal = isOverlayModal("Menu", props.modal);
|
|
@@ -36401,11 +36575,11 @@ var init_renderNode = __esm({
|
|
|
36401
36575
|
const [retyped, setRetyped] = React7.useState(null);
|
|
36402
36576
|
React7.useEffect(() => {
|
|
36403
36577
|
if (!retypeSrc) return;
|
|
36404
|
-
let
|
|
36578
|
+
let live3 = true;
|
|
36405
36579
|
let made = null;
|
|
36406
36580
|
const settle = (u) => {
|
|
36407
36581
|
made = u;
|
|
36408
|
-
if (!
|
|
36582
|
+
if (!live3) {
|
|
36409
36583
|
if (u) URL.revokeObjectURL(u);
|
|
36410
36584
|
return;
|
|
36411
36585
|
}
|
|
@@ -36413,7 +36587,7 @@ var init_renderNode = __esm({
|
|
|
36413
36587
|
};
|
|
36414
36588
|
retypeAsPdf(retypeSrc).then(settle, () => settle(null));
|
|
36415
36589
|
return () => {
|
|
36416
|
-
|
|
36590
|
+
live3 = false;
|
|
36417
36591
|
if (made) URL.revokeObjectURL(made);
|
|
36418
36592
|
setRetyped((cur) => cur?.from === retypeSrc ? null : cur);
|
|
36419
36593
|
};
|
|
@@ -36713,12 +36887,18 @@ var init_renderNode = __esm({
|
|
|
36713
36887
|
};
|
|
36714
36888
|
const commit = (target) => {
|
|
36715
36889
|
const next = Math.min(max, Math.max(min, target));
|
|
36716
|
-
if (next === value) return;
|
|
36890
|
+
if (next === value) return void 0;
|
|
36717
36891
|
setValue(next);
|
|
36718
36892
|
setBagValue(encodeStepperFieldValue(next, { min, max }));
|
|
36719
36893
|
dispatch(next);
|
|
36894
|
+
return next;
|
|
36720
36895
|
};
|
|
36896
|
+
const [pressed, setPressed] = React7.useState({ text: "", count: 0 });
|
|
36721
36897
|
const bump = (delta) => commit(value + delta);
|
|
36898
|
+
const press = (delta) => {
|
|
36899
|
+
const next = bump(delta);
|
|
36900
|
+
if (next !== void 0) setPressed((p) => ({ text: String(next), count: p.count + 1 }));
|
|
36901
|
+
};
|
|
36722
36902
|
const onValueKeyDown = (e) => {
|
|
36723
36903
|
const target = e.key === "ArrowUp" ? value + step : e.key === "ArrowDown" ? value - step : e.key === "Home" && typeof props.min === "number" ? min : e.key === "End" && typeof props.max === "number" ? max : void 0;
|
|
36724
36904
|
if (target === void 0) return;
|
|
@@ -36764,9 +36944,10 @@ var init_renderNode = __esm({
|
|
|
36764
36944
|
] });
|
|
36765
36945
|
}
|
|
36766
36946
|
return /* @__PURE__ */ jsxs5("div", { ...root, style: box, children: [
|
|
36767
|
-
/* @__PURE__ */ jsx8("button", { type: "button", tabIndex: -1, "aria-label": "Decrease", disabled: disabled("min"), onClick: () =>
|
|
36947
|
+
/* @__PURE__ */ jsx8("button", { type: "button", tabIndex: -1, "aria-label": "Decrease", disabled: disabled("min"), onClick: () => press(-step), style: { ...btn("min"), font: "inherit" }, children: "\u2212" }),
|
|
36768
36948
|
/* @__PURE__ */ jsx8("b", { ...valueA11y, "aria-valuenow": value, tabIndex: 0, onKeyDown: onValueKeyDown, style: { fontSize: 16, minWidth: 24, textAlign: "center", color: C("textPrimary", "#111"), fontVariantNumeric: "tabular-nums" }, children: value }),
|
|
36769
|
-
/* @__PURE__ */ jsx8("button", { type: "button", tabIndex: -1, "aria-label": "Increase", disabled: disabled("max"), onClick: () =>
|
|
36949
|
+
/* @__PURE__ */ jsx8("button", { type: "button", tabIndex: -1, "aria-label": "Increase", disabled: disabled("max"), onClick: () => press(step), style: { ...btn("max"), font: "inherit" }, children: "+" }),
|
|
36950
|
+
/* @__PURE__ */ jsx8("span", { "aria-live": "polite", style: { position: "absolute", width: 1, height: 1, padding: 0, margin: -1, overflow: "hidden", clip: "rect(0, 0, 0, 0)", whiteSpace: "nowrap", border: 0 }, children: pressed.text + (pressed.count % 2 ? "\xA0" : "") })
|
|
36770
36951
|
] });
|
|
36771
36952
|
});
|
|
36772
36953
|
SYNTHETIC_TAP_ROLE = "data-hm-synthetic-role";
|
|
@@ -36777,7 +36958,6 @@ var init_renderNode = __esm({
|
|
|
36777
36958
|
AUTHORED_ROLE = "data-hm-authored-role";
|
|
36778
36959
|
PENDING_RANGE = "data-hm-pending-range";
|
|
36779
36960
|
RANGE_ROLES = /* @__PURE__ */ new Set(["progressbar", "slider", "scrollbar", "spinbutton", "meter"]);
|
|
36780
|
-
A11Y_PART = "data-hm-a11y-part";
|
|
36781
36961
|
NODE_A11Y_ATTRS = ["aria-label", "aria-valuetext", "aria-level", "aria-describedby", "aria-disabled", "aria-selected"];
|
|
36782
36962
|
INTERACTIVE_ROLES = /* @__PURE__ */ new Set([
|
|
36783
36963
|
"button",
|
|
@@ -37318,7 +37498,8 @@ var init_renderNode = __esm({
|
|
|
37318
37498
|
const C = ctx.color;
|
|
37319
37499
|
const min = props.min ?? 0, max = props.max ?? 1;
|
|
37320
37500
|
const bound = useResolvedScalar(props.valuePath, ctx);
|
|
37321
|
-
const
|
|
37501
|
+
const gSource = props.valuePath != null ? bound : props.value;
|
|
37502
|
+
const gRaw = typeof gSource === "string" && gSource.trim() !== "" && Number.isFinite(Number(gSource)) ? Number(gSource) : gSource;
|
|
37322
37503
|
const v = typeof gRaw === "number" ? gRaw : (min + max) / 2;
|
|
37323
37504
|
const pct = max > min ? Math.max(0, Math.min(1, (v - min) / (max - min))) : 0;
|
|
37324
37505
|
const tint = C(props.tint ?? "accentPrimary", "#116DFF");
|
|
@@ -37327,8 +37508,7 @@ var init_renderNode = __esm({
|
|
|
37327
37508
|
const labelName = useBoundString(props.label, ctx).trim();
|
|
37328
37509
|
const hasValue = typeof gRaw === "number" && Number.isFinite(gRaw);
|
|
37329
37510
|
const named = labelName ? { "aria-label": labelName } : hasValue && max > min ? { "aria-label": `${Math.round(pct * 100)}%` } : {};
|
|
37330
|
-
const
|
|
37331
|
-
const range = max > min ? { "aria-valuemin": min, "aria-valuemax": max, ...hasValue ? { "aria-valuenow": Math.max(min, Math.min(max, v)), ...fractionScale ? { "aria-valuetext": `${Math.round(pct * 100)}%` } : {} } : {} } : {};
|
|
37511
|
+
const range = max > min ? { "aria-valuemin": min, "aria-valuemax": max, ...hasValue ? { "aria-valuenow": Math.max(min, Math.min(max, v)), "aria-valuetext": `${Math.round(pct * 100)}%` } : {} } : {};
|
|
37332
37512
|
const a11y = labelName || hasValue && max > min ? { role: "progressbar", ...named, ...range, [SELF_RENDERED_LEAF]: true } : { "aria-hidden": "true", [INFERRED_DECORATIVE]: true, [ROLE_WHEN_NAMED]: "progressbar", [PENDING_RANGE]: range, [SELF_RENDERED_LEAF]: true };
|
|
37333
37513
|
if (Array.isArray(props.rings) && props.rings.length) {
|
|
37334
37514
|
const size = 96, thick = 9, step = 22;
|
|
@@ -37379,7 +37559,7 @@ var init_renderNode = __esm({
|
|
|
37379
37559
|
const size = props.size ?? 36;
|
|
37380
37560
|
const maxVisible = props.maxVisible ?? 4;
|
|
37381
37561
|
const shown2 = avatars.slice(0, maxVisible);
|
|
37382
|
-
const overflow = props.overflowCount || Math.max(0, avatars.length - maxVisible);
|
|
37562
|
+
const overflow = (props.showOverflow ?? props.show_overflow) === false ? 0 : props.overflowCount || Math.max(0, avatars.length - maxVisible);
|
|
37383
37563
|
const shift = Math.round(size * (1 - (props.overlapRatio ?? 0.67)));
|
|
37384
37564
|
const caption = useBoundString(props.caption, ctx).trim();
|
|
37385
37565
|
const count2 = shown2.length + overflow;
|
|
@@ -37391,7 +37571,16 @@ var init_renderNode = __esm({
|
|
|
37391
37571
|
const ring = props.ringGradient ? ctx.gradient(props.ringGradient) : void 0;
|
|
37392
37572
|
const wrapStyle = ring ? { marginLeft: i === 0 ? 0 : -(size - shift), background: ring, padding: 2.5, borderRadius: "50%" } : { marginLeft: i === 0 ? 0 : -(size - shift), border: `2px solid ${C("surfacePrimary", "#fff")}`, borderRadius: "50%" };
|
|
37393
37573
|
const who = asText2(a.initials).trim();
|
|
37394
|
-
const
|
|
37574
|
+
const initials = avatarCircle(who || "?", size, C, true, bodyFont(ctx));
|
|
37575
|
+
const photo = typeof a.imageUrl === "string" && a.imageUrl && !isBinding(a.imageUrl) ? a.imageUrl : "";
|
|
37576
|
+
const circle = photo ? React7.cloneElement(
|
|
37577
|
+
initials,
|
|
37578
|
+
{ style: { ...initials.props.style, position: "relative", overflow: "hidden" } },
|
|
37579
|
+
initials.props.children,
|
|
37580
|
+
/* @__PURE__ */ jsx8("img", { src: photo, alt: "", onError: (e) => {
|
|
37581
|
+
e.currentTarget.style.display = "none";
|
|
37582
|
+
}, style: { position: "absolute", inset: 0, width: "100%", height: "100%", objectFit: "cover" } })
|
|
37583
|
+
) : initials;
|
|
37395
37584
|
return who ? /* @__PURE__ */ jsx8("div", { role: "listitem", style: wrapStyle, children: React7.cloneElement(circle, { role: "img", "aria-label": who }) }, i) : /* @__PURE__ */ jsx8("div", { "aria-hidden": "true", style: wrapStyle, children: circle }, i);
|
|
37396
37585
|
}),
|
|
37397
37586
|
overflow > 0 && /* @__PURE__ */ jsx8("div", { role: "listitem", style: { marginLeft: -(size - shift), width: size, height: size, borderRadius: "50%", border: `2px solid ${C("surfacePrimary", "#fff")}`, background: C("surfaceTertiary", "#e6e6e6"), color: C("textPrimary", "#111"), display: "grid", placeItems: "center", fontSize: size * 0.32, fontWeight: 700, fontFamily: bodyFont(ctx) }, children: /* @__PURE__ */ jsxs5("span", { role: "img", "aria-label": `${overflow} more`, children: [
|
|
@@ -40977,9 +41166,9 @@ async function handleOwnerSitesRequest(req, res) {
|
|
|
40977
41166
|
try {
|
|
40978
41167
|
const { fetchLiveOwnerSites } = await import("./apps/wix-owner-clone-live.js");
|
|
40979
41168
|
const { buildWixOwnerCloneSites } = await import("./apps/wix-owner-clone-app.js");
|
|
40980
|
-
const
|
|
40981
|
-
if (
|
|
40982
|
-
payload = { sites:
|
|
41169
|
+
const live3 = await fetchLiveOwnerSites();
|
|
41170
|
+
if (live3) {
|
|
41171
|
+
payload = { sites: live3 };
|
|
40983
41172
|
} else {
|
|
40984
41173
|
source = "fallback";
|
|
40985
41174
|
payload = buildWixOwnerCloneSites();
|
|
@@ -47210,17 +47399,17 @@ async function buildFromLoaded(preloaded, dest, opts = {}) {
|
|
|
47210
47399
|
base2 = null;
|
|
47211
47400
|
} else {
|
|
47212
47401
|
const counting = countingWixCall(await ensureLiveWixCall());
|
|
47213
|
-
const
|
|
47402
|
+
const live3 = await liveRenderServices(bundleJs, {
|
|
47214
47403
|
wixCall: counting.call,
|
|
47215
47404
|
input,
|
|
47216
47405
|
budgetMs: collect2.render.loadBudgetMs ?? LIVE_LOAD_BUDGET_MS,
|
|
47217
47406
|
localDbSchema: appLocalDbSchema,
|
|
47218
47407
|
descriptor
|
|
47219
47408
|
});
|
|
47220
|
-
base2 =
|
|
47221
|
-
liveCalls = [...
|
|
47409
|
+
base2 = live3.services;
|
|
47410
|
+
liveCalls = [...live3.calls];
|
|
47222
47411
|
liveReturned = counting.returned();
|
|
47223
|
-
liveErrors =
|
|
47412
|
+
liveErrors = live3.errors;
|
|
47224
47413
|
}
|
|
47225
47414
|
} else if (collect2?.render?.mocks && collect2.render.hydrate !== false && bundleName && readBuiltBundle(tier5Dir, bundleName)) {
|
|
47226
47415
|
const calls = [];
|
|
@@ -49473,12 +49662,12 @@ function planFromPayload(payload, base, selectors) {
|
|
|
49473
49662
|
}
|
|
49474
49663
|
return { ok: true, plan: { patch, touched, included, rebound } };
|
|
49475
49664
|
}
|
|
49476
|
-
function regressionDiff(base,
|
|
49665
|
+
function regressionDiff(base, live3, touched) {
|
|
49477
49666
|
const moves = new Set(touched);
|
|
49478
49667
|
const rows = [];
|
|
49479
|
-
for (const id of /* @__PURE__ */ new Set([...Object.keys(
|
|
49668
|
+
for (const id of /* @__PURE__ */ new Set([...Object.keys(live3.screens ?? {}), ...Object.keys(base.screens ?? {})])) {
|
|
49480
49669
|
if (moves.has(`screen:${id}`)) continue;
|
|
49481
|
-
const l =
|
|
49670
|
+
const l = live3.screens?.[id];
|
|
49482
49671
|
const b = base.screens?.[id];
|
|
49483
49672
|
if (!b) {
|
|
49484
49673
|
rows.push({ item: `screen:${id}`, live: l?.descriptorHash ?? null, base: null, effect: `${id} DISAPPEARS \u2014 it was added after ${base.releaseId}` });
|
|
@@ -49492,13 +49681,13 @@ function regressionDiff(base, live2, touched) {
|
|
|
49492
49681
|
rows.push({ item: `screen:${id}`, live: l.descriptorHash, base: b.descriptorHash, effect: `${id} reverts to its ${base.releaseId} descriptor` });
|
|
49493
49682
|
continue;
|
|
49494
49683
|
}
|
|
49495
|
-
if (resolveBundleSha(
|
|
49496
|
-
rows.push({ item: `screen:${id}`, live: resolveBundleSha(
|
|
49684
|
+
if (resolveBundleSha(live3, l.bundle) !== resolveBundleSha(base, b.bundle)) {
|
|
49685
|
+
rows.push({ item: `screen:${id}`, live: resolveBundleSha(live3, l.bundle), base: resolveBundleSha(base, b.bundle), effect: `${id} rebinds to its ${base.releaseId} worker bundle` });
|
|
49497
49686
|
}
|
|
49498
49687
|
}
|
|
49499
49688
|
const scalar4 = (key2, item, what) => {
|
|
49500
49689
|
if (moves.has(item)) return;
|
|
49501
|
-
const l =
|
|
49690
|
+
const l = live3[key2] ?? null;
|
|
49502
49691
|
const b = base[key2] ?? null;
|
|
49503
49692
|
if (l !== b) rows.push({ item, live: l, base: b, effect: `${what} reverts to ${base.releaseId}` });
|
|
49504
49693
|
};
|
|
@@ -49506,8 +49695,8 @@ function regressionDiff(base, live2, touched) {
|
|
|
49506
49695
|
scalar4("appConfigHash", "app-config", "app-config");
|
|
49507
49696
|
scalar4("iconHash", "icon", "the launcher icon");
|
|
49508
49697
|
scalar4("minBinaryVersion", "minBinaryVersion", "the minimum binary version");
|
|
49509
|
-
for (const name of /* @__PURE__ */ new Set([...Object.keys(
|
|
49510
|
-
const l =
|
|
49698
|
+
for (const name of /* @__PURE__ */ new Set([...Object.keys(live3.assets ?? {}), ...Object.keys(base.assets ?? {})])) {
|
|
49699
|
+
const l = live3.assets?.[name]?.sha256 ?? null;
|
|
49511
49700
|
const b = base.assets?.[name]?.sha256 ?? null;
|
|
49512
49701
|
if (l === b) continue;
|
|
49513
49702
|
rows.push({
|
|
@@ -49517,16 +49706,16 @@ function regressionDiff(base, live2, touched) {
|
|
|
49517
49706
|
effect: b === null ? `asset:${name} record DISAPPEARS \u2014 references fall back to the baked copy or render empty` : `asset:${name} reverts to ${base.releaseId}`
|
|
49518
49707
|
});
|
|
49519
49708
|
}
|
|
49520
|
-
for (const name of /* @__PURE__ */ new Set([...Object.keys(
|
|
49521
|
-
const l =
|
|
49709
|
+
for (const name of /* @__PURE__ */ new Set([...Object.keys(live3.authoringDocs ?? {}), ...Object.keys(base.authoringDocs ?? {})])) {
|
|
49710
|
+
const l = live3.authoringDocs?.[name]?.sha256 ?? null;
|
|
49522
49711
|
const b = base.authoringDocs?.[name]?.sha256 ?? null;
|
|
49523
49712
|
if (l !== b) rows.push({ item: `doc:${name}`, live: l, base: b, effect: `${name} reverts to ${base.releaseId}` });
|
|
49524
49713
|
}
|
|
49525
49714
|
const PROVENANCE = /* @__PURE__ */ new Set(["releaseId", "gitSha", "shellSha", "label", "notes", "publishedAt", "publishedBy", "attestation", "forcedPastErrors"]);
|
|
49526
49715
|
const REPORTED_IN_DETAIL = /* @__PURE__ */ new Set(["app", "screens", "bundles", "tokensHash", "appConfigHash", "iconHash", "minBinaryVersion", "assets", "authoringDocs"]);
|
|
49527
|
-
for (const key2 of /* @__PURE__ */ new Set([...Object.keys(
|
|
49716
|
+
for (const key2 of /* @__PURE__ */ new Set([...Object.keys(live3), ...Object.keys(base)])) {
|
|
49528
49717
|
if (PROVENANCE.has(key2) || REPORTED_IN_DETAIL.has(key2) || moves.has(key2)) continue;
|
|
49529
|
-
const l =
|
|
49718
|
+
const l = live3[key2] ?? null;
|
|
49530
49719
|
const b = base[key2] ?? null;
|
|
49531
49720
|
const ls = JSON.stringify(l) ?? "null";
|
|
49532
49721
|
const bs = JSON.stringify(b) ?? "null";
|
|
@@ -50576,7 +50765,7 @@ async function runNotifySetup(pos, flags, io, deps = {}) {
|
|
|
50576
50765
|
if (ownership.state !== "owned") return refuse3(io, "app_ownership_unverified", void 0, 1);
|
|
50577
50766
|
input.app = ownership.slug;
|
|
50578
50767
|
const common = { target, wixToken, previewTag, fetchImpl: deps.fetchImpl };
|
|
50579
|
-
const readStatus = (
|
|
50768
|
+
const readStatus = (live3 = false) => pushSetupRequest({ ...common, operation: "status", query: { app: input.app, site: input.site, ...live3 ? { verify: "live" } : {} } });
|
|
50580
50769
|
if (operation === "status") return report(await readStatus(flags.refresh === true), flags, io, dir);
|
|
50581
50770
|
const previous = await readStatus();
|
|
50582
50771
|
if (!previous.ok || !STATES.has(String(previous.body?.state))) return report(previous, flags, io, dir);
|
|
@@ -52572,7 +52761,7 @@ function watchReminder(dir, opts = {}) {
|
|
|
52572
52761
|
try {
|
|
52573
52762
|
if (!existsSync50(join51(dir, "himalaya.content.json"))) return void 0;
|
|
52574
52763
|
const nowDate = opts.now ?? /* @__PURE__ */ new Date();
|
|
52575
|
-
const
|
|
52764
|
+
const live3 = liveWatch(dir, opts.isAlive, nowDate);
|
|
52576
52765
|
const now = nowDate.getTime();
|
|
52577
52766
|
const file = join51(dir, REMINDERS_FILE);
|
|
52578
52767
|
let last = Number.NaN;
|
|
@@ -52584,8 +52773,8 @@ function watchReminder(dir, opts = {}) {
|
|
|
52584
52773
|
if (!realDirIn(dir, ".himi")) return void 0;
|
|
52585
52774
|
writeFileAtomic(file, `${JSON.stringify({ watch: new Date(now).toISOString() })}
|
|
52586
52775
|
`);
|
|
52587
|
-
if (
|
|
52588
|
-
return `the live preview is running at ${
|
|
52776
|
+
if (live3) {
|
|
52777
|
+
return `the live preview is running at ${live3.url} (pid ${live3.pid}${live3.by === "init" ? ", started by himi init" : ""}) \u2014 it repaints on every save, and the build board is ${live3.board}; give the owner that link to click around while you work, and do not start another`;
|
|
52589
52778
|
}
|
|
52590
52779
|
const content = opts.content ?? displayPath(dir);
|
|
52591
52780
|
const remote = readInitSource(dir)?.source === "remote" ? "init did not start it because this template came off the serve plane \u2014 once you have read its code, " : "";
|
|
@@ -52632,9 +52821,9 @@ async function startWatchAtInit(dir, opts) {
|
|
|
52632
52821
|
const note = given.length ? { note: watchOptOutIgnoredNote(given) } : {};
|
|
52633
52822
|
const deps = { ...defaultStartWatchDeps, ...opts.deps };
|
|
52634
52823
|
const now = opts.now ?? /* @__PURE__ */ new Date();
|
|
52635
|
-
const
|
|
52636
|
-
if (
|
|
52637
|
-
return { skipped: `a live preview of this app is already running (pid ${
|
|
52824
|
+
const live3 = liveWatch(dir, deps.isAlive, now);
|
|
52825
|
+
if (live3 && (live3.by === "init" || await deps.previewRunning(dir))) {
|
|
52826
|
+
return { skipped: `a live preview of this app is already running (pid ${live3.pid})`, url: live3.url, board: live3.board, pid: live3.pid, ...note };
|
|
52638
52827
|
}
|
|
52639
52828
|
try {
|
|
52640
52829
|
const port = await deps.freePort(previewPortForDir(dir));
|
|
@@ -55973,9 +56162,9 @@ function makeFunctionsHandler(options) {
|
|
|
55973
56162
|
const target = resolveTarget3(new URL(request.url).pathname);
|
|
55974
56163
|
if (!target) return errorResponse(404, "not_found", "function route not found", id);
|
|
55975
56164
|
if (request.method === "OPTIONS") return new Response(null, { status: 204, headers: { "access-control-allow-origin": "*", "access-control-allow-methods": "GET,POST,PUT,PATCH,DELETE,OPTIONS", "access-control-allow-headers": "authorization,content-type,x-request-id,x-himalaya-release,x-himalaya-preview-token", "x-request-id": id } });
|
|
55976
|
-
const
|
|
56165
|
+
const live3 = await options.store.getManifest(target.app);
|
|
55977
56166
|
const pin = new URL(request.url).searchParams.get("release") || request.headers.get("x-himalaya-release");
|
|
55978
|
-
let selected =
|
|
56167
|
+
let selected = live3;
|
|
55979
56168
|
if (pin && !options.previewTokenSecret) return errorResponse(501, "preview_token_unavailable", "pinned release access requires preview token validation", id);
|
|
55980
56169
|
let previewClaims;
|
|
55981
56170
|
if (pin && options.previewTokenSecret) {
|
|
@@ -58355,19 +58544,19 @@ function publicRecord(value) {
|
|
|
58355
58544
|
const { archiveBase64: _archiveBase64, ...record2 } = value;
|
|
58356
58545
|
return record2;
|
|
58357
58546
|
}
|
|
58358
|
-
function
|
|
58547
|
+
function live2(value, now) {
|
|
58359
58548
|
if (!value || value.revokedAt) return null;
|
|
58360
58549
|
if (value.expiresAt && Date.parse(value.expiresAt) <= now.getTime()) return null;
|
|
58361
58550
|
return value;
|
|
58362
58551
|
}
|
|
58363
58552
|
async function resolvePackageShareMetadata(store, id, now = /* @__PURE__ */ new Date()) {
|
|
58364
58553
|
if (!PACKAGE_SHARE_ID_PATTERN2.test(id) || !store.getDoc) return null;
|
|
58365
|
-
const value =
|
|
58554
|
+
const value = live2(parseStored(await store.getDoc(PACKAGE_SHARE_NAMESPACE, id), id), now);
|
|
58366
58555
|
return value ? publicRecord(value) : null;
|
|
58367
58556
|
}
|
|
58368
58557
|
async function resolvePackageShare(store, id, now = /* @__PURE__ */ new Date()) {
|
|
58369
58558
|
if (!PACKAGE_SHARE_ID_PATTERN2.test(id) || !store.getDoc) return null;
|
|
58370
|
-
const value =
|
|
58559
|
+
const value = live2(parseStored(await store.getDoc(PACKAGE_SHARE_NAMESPACE, id), id), now);
|
|
58371
58560
|
if (!value) return null;
|
|
58372
58561
|
const archive = await decodeArchive(value, id);
|
|
58373
58562
|
return archive ? { share: publicRecord(value), archive } : null;
|
|
@@ -58725,8 +58914,8 @@ ${releaseId}`;
|
|
|
58725
58914
|
if (/^\/v1\/app-config\/[^/]+$/.test(url.pathname)) return drop();
|
|
58726
58915
|
let servable;
|
|
58727
58916
|
try {
|
|
58728
|
-
const
|
|
58729
|
-
const eligible =
|
|
58917
|
+
const live3 = await manifest(app);
|
|
58918
|
+
const eligible = live3?.releaseId === pin || await isRingRelease(app, pin);
|
|
58730
58919
|
const pinned = eligible ? await pinnedManifest(app, pin) : null;
|
|
58731
58920
|
servable = pinned !== null;
|
|
58732
58921
|
const screenId = /^\/v1\/screen\/([^/]+)$/.exec(url.pathname)?.[1];
|
|
@@ -59249,7 +59438,7 @@ ${releaseId}`;
|
|
|
59249
59438
|
if (!m) return json4(404, { error: "app_not_found", app });
|
|
59250
59439
|
}
|
|
59251
59440
|
const mm = m;
|
|
59252
|
-
const readDoc = (hash,
|
|
59441
|
+
const readDoc = (hash, live3) => pin ? hash ? pinnedBody(app, hash, live3) : Promise.resolve(null) : live3();
|
|
59253
59442
|
const ringPinned = pin !== null && request.headers.get(RELEASE_SOURCE_HEADER) === "ring";
|
|
59254
59443
|
const cfgBytes = ringPinned ? await store.getAppConfig(app) : await readDoc(mm.appConfigHash, () => store.getAppConfig(app));
|
|
59255
59444
|
if (!cfgBytes) return json4(404, { error: "app_config_not_found", app });
|
|
@@ -59279,9 +59468,9 @@ ${releaseId}`;
|
|
|
59279
59468
|
let homeFrom = mm;
|
|
59280
59469
|
let readHome = readDoc;
|
|
59281
59470
|
if (ringPinned && homeScreenId && !mm.screens[homeScreenId]) {
|
|
59282
|
-
const
|
|
59283
|
-
if (
|
|
59284
|
-
homeFrom =
|
|
59471
|
+
const live3 = await manifest(app);
|
|
59472
|
+
if (live3?.screens[homeScreenId]) {
|
|
59473
|
+
homeFrom = live3;
|
|
59285
59474
|
readHome = (_hash, liveSlot) => liveSlot();
|
|
59286
59475
|
}
|
|
59287
59476
|
}
|
|
@@ -59951,21 +60140,21 @@ var init_preview_assets_generated = __esm({
|
|
|
59951
60140
|
"../../packages/serve/src/preview-assets.generated.ts"() {
|
|
59952
60141
|
init_preview_assets_format();
|
|
59953
60142
|
PREVIEW_ASSET_MANIFEST = [
|
|
59954
|
-
{ key: "assets/index-
|
|
59955
|
-
{ key: "fonts/Roboto-LICENSE.txt", contentType: "application/octet-stream", offset:
|
|
59956
|
-
{ key: "fonts/Roboto-Variable.ttf", contentType: "font/ttf", offset:
|
|
59957
|
-
{ key: "fonts/WixMadeforDisplay-Bold.ttf", contentType: "font/ttf", offset:
|
|
59958
|
-
{ key: "fonts/WixMadeforDisplay-ExtraBold.ttf", contentType: "font/ttf", offset:
|
|
59959
|
-
{ key: "fonts/WixMadeforDisplay-Medium.ttf", contentType: "font/ttf", offset:
|
|
59960
|
-
{ key: "fonts/WixMadeforDisplay-Regular.ttf", contentType: "font/ttf", offset:
|
|
59961
|
-
{ key: "fonts/WixMadeforDisplay-SemiBold.ttf", contentType: "font/ttf", offset:
|
|
59962
|
-
{ key: "fonts/WixMadeforText-Bold.ttf", contentType: "font/ttf", offset:
|
|
59963
|
-
{ key: "fonts/WixMadeforText-ExtraBold.ttf", contentType: "font/ttf", offset:
|
|
59964
|
-
{ key: "fonts/WixMadeforText-Medium.ttf", contentType: "font/ttf", offset:
|
|
59965
|
-
{ key: "fonts/WixMadeforText-Regular.ttf", contentType: "font/ttf", offset:
|
|
59966
|
-
{ key: "fonts/WixMadeforText-SemiBold.ttf", contentType: "font/ttf", offset:
|
|
59967
|
-
{ key: "index.html", contentType: "text/html; charset=utf-8", offset:
|
|
59968
|
-
{ key: "t5-frame.html", contentType: "text/html; charset=utf-8", offset:
|
|
60143
|
+
{ key: "assets/index-C5pLAEVw.js", contentType: "application/javascript; charset=utf-8", offset: 8, length: 1131202, sha256: "227bc4e092810f75d1b156bbef6e9409b36bd0f92370b33864ff3f309f6fe771" },
|
|
60144
|
+
{ key: "fonts/Roboto-LICENSE.txt", contentType: "application/octet-stream", offset: 1131210, length: 4610, sha256: "994062dd7af4186a739de55dd9e151c63b6301f8e2cbafc608d35c2e87da0cd2" },
|
|
60145
|
+
{ key: "fonts/Roboto-Variable.ttf", contentType: "font/ttf", offset: 1135820, length: 488584, sha256: "d7598e12c5dbef095ff8272cfc55da0250bd07fbdecbac8a530b9b277872a134" },
|
|
60146
|
+
{ key: "fonts/WixMadeforDisplay-Bold.ttf", contentType: "font/ttf", offset: 1624404, length: 90924, sha256: "ec4c7d63772d980d6e147b2df6215fd2737e4b04cebe0cf7e11dc695fb63cdcf" },
|
|
60147
|
+
{ key: "fonts/WixMadeforDisplay-ExtraBold.ttf", contentType: "font/ttf", offset: 1715328, length: 90984, sha256: "bf4c16a2774edd38a921edf3099469866cd74c094fd596f3fa4e81f54a04dfaa" },
|
|
60148
|
+
{ key: "fonts/WixMadeforDisplay-Medium.ttf", contentType: "font/ttf", offset: 1806312, length: 90980, sha256: "368faca44fb9f7207e4af784e94750b1ee59c1098b8689e0f4a918926f244fb5" },
|
|
60149
|
+
{ key: "fonts/WixMadeforDisplay-Regular.ttf", contentType: "font/ttf", offset: 1897292, length: 90872, sha256: "97ed8f1a6772abe26e3d8af5cecfc4b02faa94497d585b0398b5053b739a70c1" },
|
|
60150
|
+
{ key: "fonts/WixMadeforDisplay-SemiBold.ttf", contentType: "font/ttf", offset: 1988164, length: 90980, sha256: "642feab8a48ddf6c7a89d7c2a7c0edfa0e6e773f671287e460e222703563191e" },
|
|
60151
|
+
{ key: "fonts/WixMadeforText-Bold.ttf", contentType: "font/ttf", offset: 2079144, length: 108636, sha256: "37c179b4fefb63ea9637322b84583a2df53aa226c150294eea1675c14b1b8e29" },
|
|
60152
|
+
{ key: "fonts/WixMadeforText-ExtraBold.ttf", contentType: "font/ttf", offset: 2187780, length: 109084, sha256: "62e2fe4718129f36ecdb0ae4de385bd6b81ecc876146447167c6c140fad699a9" },
|
|
60153
|
+
{ key: "fonts/WixMadeforText-Medium.ttf", contentType: "font/ttf", offset: 2296864, length: 109048, sha256: "4ecf270136af928612c76fe4ebade91d8156975e5ea4c0cf9225501dd1788e02" },
|
|
60154
|
+
{ key: "fonts/WixMadeforText-Regular.ttf", contentType: "font/ttf", offset: 2405912, length: 107700, sha256: "dee56f09fd3efc127c1ea95557edc74110c1460a46287da36e0af25efd341ef5" },
|
|
60155
|
+
{ key: "fonts/WixMadeforText-SemiBold.ttf", contentType: "font/ttf", offset: 2513612, length: 88108, sha256: "dced97a77624bc5f8b1ae65850360908297f4588e09feb6f22792d29dc7e765b" },
|
|
60156
|
+
{ key: "index.html", contentType: "text/html; charset=utf-8", offset: 2601720, length: 4947, sha256: "946631b440fc9601c829ef9cc7aa28a02a1ef6f0de48ac76f88cafdfcb04563c" },
|
|
60157
|
+
{ key: "t5-frame.html", contentType: "text/html; charset=utf-8", offset: 2606667, length: 17344, sha256: "d057298d75e7373e5e2c4d11b7d1bcbea88e03af555ba63d97641c78509c58e4" }
|
|
59969
60158
|
];
|
|
59970
60159
|
}
|
|
59971
60160
|
});
|
|
@@ -61677,14 +61866,14 @@ function assertSameAccount(planned, current) {
|
|
|
61677
61866
|
`the plan was made with profile "${planned.profile}" (team ${planned.team}, key ${planned.fingerprint}) but this run resolved profile "${current.profile}" (team ${current.team}, key ${current.fingerprint}). Make a new plan with the account you mean.`
|
|
61678
61867
|
);
|
|
61679
61868
|
}
|
|
61680
|
-
function driftOf(planned,
|
|
61869
|
+
function driftOf(planned, live3) {
|
|
61681
61870
|
if (planned.decision === "conflict") return void 0;
|
|
61682
|
-
if (
|
|
61683
|
-
const unplanned =
|
|
61684
|
-
return unplanned.length ? `${
|
|
61871
|
+
if (live3.decision === "conflict") return `${live3.productId} now conflicts: ${live3.conflicts.join("; ")}`;
|
|
61872
|
+
const unplanned = live3.ops.filter((op) => !planned.ops.some((p) => sameOp(p, op)));
|
|
61873
|
+
return unplanned.length ? `${live3.productId} now needs ${unplanned.map(describeOp).join(", ")}, which the plan did not list` : void 0;
|
|
61685
61874
|
}
|
|
61686
|
-
function assertNoDrift(plan,
|
|
61687
|
-
const drift = [...
|
|
61875
|
+
function assertNoDrift(plan, live3) {
|
|
61876
|
+
const drift = [...live3].map(([i, current]) => driftOf(plan.items[i], current)).filter((d) => d !== void 0);
|
|
61688
61877
|
if (!drift.length) return;
|
|
61689
61878
|
throw new IapProvisionError("drift", `App Store Connect changed since the plan was made \u2014 nothing was written:
|
|
61690
61879
|
- ${drift.join("\n - ")}
|
|
@@ -61854,27 +62043,27 @@ async function knownUnmetFor(item, planned, context) {
|
|
|
61854
62043
|
if (!planned.observed) return [];
|
|
61855
62044
|
return metadataDiffs(item, planned.observed, planned.targetPrice ?? await context.pricing.targetAmount(item.price));
|
|
61856
62045
|
}
|
|
61857
|
-
async function applyItem(item,
|
|
62046
|
+
async function applyItem(item, live3, context, manifest) {
|
|
61858
62047
|
const base = { target: manifest.target, item, readAt: context.now() };
|
|
61859
|
-
if (
|
|
61860
|
-
const unmet2 = await knownUnmetFor(item,
|
|
61861
|
-
return itemResult({ ...base, observed:
|
|
62048
|
+
if (live3.decision === "conflict") {
|
|
62049
|
+
const unmet2 = await knownUnmetFor(item, live3, context);
|
|
62050
|
+
return itemResult({ ...base, observed: live3.observed, outcome: "conflict", conflicts: live3.conflicts, unmet: unmet2 });
|
|
61862
62051
|
}
|
|
61863
62052
|
const run2 = {
|
|
61864
62053
|
item,
|
|
61865
|
-
resourceId:
|
|
61866
|
-
versionId:
|
|
61867
|
-
localizations:
|
|
62054
|
+
resourceId: live3.observed?.resourceId,
|
|
62055
|
+
versionId: live3.observed?.draftVersionId,
|
|
62056
|
+
localizations: live3.observed?.draftVersionId ? live3.observed.localizations : []
|
|
61868
62057
|
};
|
|
61869
|
-
const steps = await runOps(run2,
|
|
62058
|
+
const steps = await runOps(run2, live3.ops, context, manifest);
|
|
61870
62059
|
const { observed, failure } = await readBack(run2, context, manifest);
|
|
61871
62060
|
const unmet = failure ? [`could not read the product back: ${failure}`] : await unmetFor(item, observed, context);
|
|
61872
|
-
const outcome = outcomeOf(
|
|
62061
|
+
const outcome = outcomeOf(live3.ops, steps, unmet);
|
|
61873
62062
|
return itemResult({ ...base, readAt: context.now(), observed, outcome, steps, unmet, appleResourceId: run2.resourceId });
|
|
61874
62063
|
}
|
|
61875
|
-
function deferredResult(item,
|
|
61876
|
-
const steps =
|
|
61877
|
-
return itemResult({ target: manifest.target, item, observed:
|
|
62064
|
+
function deferredResult(item, live3, context, manifest) {
|
|
62065
|
+
const steps = live3.ops.map((op) => stepFor(op, "notRun"));
|
|
62066
|
+
return itemResult({ target: manifest.target, item, observed: live3.observed, outcome: "deferred", steps, requirements: [DEFERRED_REQUIREMENT], readAt: context.now() });
|
|
61878
62067
|
}
|
|
61879
62068
|
function needsRefresh(planned) {
|
|
61880
62069
|
return planned.decision !== "conflict" && planned.ops.length > 0;
|
|
@@ -61889,12 +62078,12 @@ async function applyIap(planDoc, applyContext) {
|
|
|
61889
62078
|
const context = { ...applyContext, pricing: applyContext.pricing ?? new PriceGrid(applyContext.api) };
|
|
61890
62079
|
const manifest = plan.manifest;
|
|
61891
62080
|
const refresh = plan.items.flatMap((planned, i) => needsRefresh(planned) ? [i] : []);
|
|
61892
|
-
const
|
|
61893
|
-
assertNoDrift(plan,
|
|
62081
|
+
const live3 = await planItemsAt(context, manifest, refresh);
|
|
62082
|
+
assertNoDrift(plan, live3);
|
|
61894
62083
|
const items = [];
|
|
61895
62084
|
let created = 0;
|
|
61896
62085
|
for (const [i, item] of manifest.items.entries()) {
|
|
61897
|
-
const itemPlan2 =
|
|
62086
|
+
const itemPlan2 = live3.get(i);
|
|
61898
62087
|
if (!itemPlan2) {
|
|
61899
62088
|
items.push(await plannedResult(item, plan.items[i], plan, context, manifest));
|
|
61900
62089
|
continue;
|
|
@@ -74035,13 +74224,13 @@ async function snapshotAndPublish(fetchImpl, token, msid, opts = {}) {
|
|
|
74035
74224
|
timeoutMs: 45e3,
|
|
74036
74225
|
body: { label: "WIX_CLI", useUniqueLabel: true }
|
|
74037
74226
|
});
|
|
74038
|
-
const
|
|
74227
|
+
const live3 = production ? await veloCall(fetchImpl, "POST", SITE_PUBLISH_URL, { token, msid, timeoutMs: 45e3, body: {} }) : void 0;
|
|
74039
74228
|
return {
|
|
74040
74229
|
revision: revisionFrom(rev.json),
|
|
74041
74230
|
codeAppId: codeAppIdFromRevision(rev.json),
|
|
74042
74231
|
rev,
|
|
74043
74232
|
rc,
|
|
74044
|
-
live:
|
|
74233
|
+
live: live3
|
|
74045
74234
|
};
|
|
74046
74235
|
}
|
|
74047
74236
|
function httpOk(r) {
|
|
@@ -80270,9 +80459,9 @@ himi v${cliVersion()} \u2014 run \`himi --version\`. If authoring commands fail
|
|
|
80270
80459
|
io.error(JSON.stringify(liveFound));
|
|
80271
80460
|
return 1;
|
|
80272
80461
|
}
|
|
80273
|
-
const
|
|
80274
|
-
if (
|
|
80275
|
-
regressions = regressionDiff2(base,
|
|
80462
|
+
const live3 = liveFound.manifest;
|
|
80463
|
+
if (live3 && live3.releaseId !== base.releaseId) {
|
|
80464
|
+
regressions = regressionDiff2(base, live3, plan.touched);
|
|
80276
80465
|
if (regressions.length > 0 && !opts.acceptRegressions) {
|
|
80277
80466
|
io.error(JSON.stringify({
|
|
80278
80467
|
ok: false,
|
|
@@ -80280,7 +80469,7 @@ himi v${cliVersion()} \u2014 run \`himi --version\`. If authoring commands fail
|
|
|
80280
80469
|
error: "would_regress",
|
|
80281
80470
|
app,
|
|
80282
80471
|
base: { releaseId: base.releaseId, publishedAt: base.publishedAt ?? null },
|
|
80283
|
-
live: { releaseId:
|
|
80472
|
+
live: { releaseId: live3.releaseId, publishedAt: live3.publishedAt ?? null },
|
|
80284
80473
|
message: `a branch does not merge. Activating a release derived from ${base.releaseId} reverts every item this patch does not move.`,
|
|
80285
80474
|
wouldRegress: regressions,
|
|
80286
80475
|
moves: plan.touched,
|
|
@@ -81961,9 +82150,9 @@ ${[...afterRun.next, ...testReminder ? [testReminder] : []].join("\n")}`);
|
|
|
81961
82150
|
const scheme = str9(flags.scheme) === "dark" ? "dark" : "light";
|
|
81962
82151
|
const wantPng = flags.png === true || typeof flags.png === "string";
|
|
81963
82152
|
const hydrate = flags.static !== true;
|
|
81964
|
-
const
|
|
82153
|
+
const live3 = flags.live === true;
|
|
81965
82154
|
const strict = flags.strict === true;
|
|
81966
|
-
if (
|
|
82155
|
+
if (live3 && flags.static === true) {
|
|
81967
82156
|
io.error(JSON.stringify({ error: "--static and --live are mutually exclusive: --static renders raw bindings, --live renders real Wix data" }));
|
|
81968
82157
|
return 2;
|
|
81969
82158
|
}
|
|
@@ -81971,8 +82160,8 @@ ${[...afterRun.next, ...testReminder ? [testReminder] : []].join("\n")}`);
|
|
|
81971
82160
|
io.error(JSON.stringify({ error: `--mocks takes no value (got "${String(flags.mocks)}") \u2014 pass it bare` }));
|
|
81972
82161
|
return 2;
|
|
81973
82162
|
}
|
|
81974
|
-
if (flags.mocks === true && (
|
|
81975
|
-
io.error(JSON.stringify({ error: `--mocks and ${
|
|
82163
|
+
if (flags.mocks === true && (live3 || flags.static === true)) {
|
|
82164
|
+
io.error(JSON.stringify({ error: `--mocks and ${live3 ? "--live" : "--static"} are mutually exclusive: --mocks loads the app's recorded data, ${live3 ? "--live real Wix data" : "--static no data at all"}` }));
|
|
81976
82165
|
return 2;
|
|
81977
82166
|
}
|
|
81978
82167
|
if (flags.mocks === true && flags["no-mocks"] === true) {
|
|
@@ -82051,7 +82240,7 @@ ${[...afterRun.next, ...testReminder ? [testReminder] : []].join("\n")}`);
|
|
|
82051
82240
|
}
|
|
82052
82241
|
let mocks;
|
|
82053
82242
|
let mocksNote;
|
|
82054
|
-
const mocksByDefault = flags.mocks !== true && flags["no-mocks"] !== true && !
|
|
82243
|
+
const mocksByDefault = flags.mocks !== true && flags["no-mocks"] !== true && !live3 && flags.static !== true && injectedState === void 0;
|
|
82055
82244
|
if (flags.mocks === true || mocksByDefault) {
|
|
82056
82245
|
let rules = null;
|
|
82057
82246
|
let bad2;
|
|
@@ -82074,7 +82263,7 @@ ${[...afterRun.next, ...testReminder ? [testReminder] : []].join("\n")}`);
|
|
|
82074
82263
|
...hasWorkers ? { tier5Dir: bundleOutDir2(dir) } : {},
|
|
82075
82264
|
// The settled state is always kept (printed only under --dump-state): it is what says whether
|
|
82076
82265
|
// the picture landed on the screen's content or on its error, loading or empty state.
|
|
82077
|
-
collect: { lint: true, strict, render: { screenId, scheme, png: wantPng, hydrate, dumpState: true, ...
|
|
82266
|
+
collect: { lint: true, strict, render: { screenId, scheme, png: wantPng, hydrate, dumpState: true, ...live3 ? { live: true } : {}, ...injectedState ? { state: injectedState } : {}, ...injectedInput ? { input: injectedInput } : {}, ...renderWidth ? { width: renderWidth } : {}, ...flags.rtl === true ? { rtl: true } : {}, ...loadBudgetMs ? { loadBudgetMs } : {}, ...mocks ? { mocks: { rules: mocks.rules, cmsSeed: mocks.cmsSeed } } : {} } }
|
|
82078
82267
|
});
|
|
82079
82268
|
const r = (outcome.renders ?? [])[0];
|
|
82080
82269
|
if (!r) {
|
|
@@ -82103,11 +82292,11 @@ ${[...afterRun.next, ...testReminder ? [testReminder] : []].join("\n")}`);
|
|
|
82103
82292
|
screenId,
|
|
82104
82293
|
scheme,
|
|
82105
82294
|
renderable: r.renderable,
|
|
82106
|
-
hydrated:
|
|
82107
|
-
dataSource: renderDataSource({ live:
|
|
82295
|
+
hydrated: live3 ? "live" : hydrate,
|
|
82296
|
+
dataSource: renderDataSource({ live: live3, hydrate, liveCalls: r.liveCalls, liveReturned: r.liveReturned, mocked: !!r.mockCalls }),
|
|
82108
82297
|
// What --mocks loaded from, how many requests the load made, and the ones no layer held.
|
|
82109
82298
|
...r.mockCalls && mocks ? { mocks: { used: true, from: mocks.from, calls: r.mockCalls.length, ...r.mockUnserved?.length ? { unserved: r.mockUnserved } : {}, ...mocks.ignored ? { ignored: mocks.ignored } : {}, ...mocksByDefault ? { default: true, hint: "the app's recorded data loaded by default; --no-mocks renders the offline initial state, --live the real site" } : {} } } : mocksNote ? { mocks: mocksNote } : mocks ? { mocks: { used: false, reason: r.mockBootFailed ? "the screen's worker failed to boot against the recorded data, so its initial state was rendered" : "the screen has no worker bundle to load data into", ...mocks.ignored ? { ignored: mocks.ignored } : {} } } : {},
|
|
82110
|
-
...
|
|
82299
|
+
...live3 ? {
|
|
82111
82300
|
liveCalls: r.liveCalls?.length ?? 0,
|
|
82112
82301
|
// Beside the attempt count, because the two coming apart IS the signal (#1883).
|
|
82113
82302
|
liveReturned: r.liveReturned ?? 0,
|
|
@@ -82159,7 +82348,7 @@ ${[...afterRun.next, ...testReminder ? [testReminder] : []].join("\n")}`);
|
|
|
82159
82348
|
if (pngFile && r.renderable) {
|
|
82160
82349
|
const { recordShotState: recordShotState2, screenStateOf: screenStateOf2 } = await Promise.resolve().then(() => (init_screen_state(), screen_state_exports));
|
|
82161
82350
|
const mocked = !!r.mockCalls;
|
|
82162
|
-
landed = screenStateOf2(r.serviceState, r.html, { initial: !
|
|
82351
|
+
landed = screenStateOf2(r.serviceState, r.html, { initial: !live3 && !mocked, offline: mocked && (r.mockUnserved?.length ?? 0) > 0 });
|
|
82163
82352
|
recordShotState2(dir, screenId, pngFile, landed);
|
|
82164
82353
|
}
|
|
82165
82354
|
const autoSkip = process.env.HIMI_AUTO_RENDER === "validate" && landed !== null && (landed.state === "loading" || landed.state === "empty" || landed.state === "error" && landed.offline === true) ? `the picture shows the home screen's ${landed.state} state${landed.initial || landed.offline ? " (an offline preview: the site's data is not loaded offline)" : ""}, so no postcard was journaled from it` : void 0;
|
|
@@ -83554,9 +83743,9 @@ default (no --glyph): ${DEFAULT_GLYPH2} \u2014 a mark that claims nothing, so th
|
|
|
83554
83743
|
await announce(running);
|
|
83555
83744
|
if (watchKit && bus) {
|
|
83556
83745
|
const { buildContentBundles: buildContentBundles2, buildReleaseFromContent: buildReleaseFromContent2, bundleOutDir: bundleOutDir2 } = await loadAuthoring();
|
|
83557
|
-
const
|
|
83746
|
+
const live3 = join74(running.releaseRoot, running.app);
|
|
83558
83747
|
const manifestOf = (tree) => JSON.parse(readFileSync90(join74(tree, "release-manifest.json"), "utf8"));
|
|
83559
|
-
let current = manifestOf(
|
|
83748
|
+
let current = manifestOf(live3);
|
|
83560
83749
|
const failed2 = async (message) => {
|
|
83561
83750
|
if (stopping) return;
|
|
83562
83751
|
bus.publish("build.failed", { message });
|
|
@@ -83586,13 +83775,13 @@ default (no --glyph): ${DEFAULT_GLYPH2} \u2014 a mark that claims nothing, so th
|
|
|
83586
83775
|
const fresh = manifestOf(join74(next, running.app));
|
|
83587
83776
|
const diff = watchKit.diffReleases(current, fresh);
|
|
83588
83777
|
const { describeChanges: describeChanges2, headline: headline2 } = await Promise.resolve().then(() => (init_build_changes(), build_changes_exports));
|
|
83589
|
-
const changes = describeChanges2(
|
|
83590
|
-
const retired = `${
|
|
83591
|
-
renameSync9(
|
|
83778
|
+
const changes = describeChanges2(live3, join74(next, running.app), diff);
|
|
83779
|
+
const retired = `${live3}.retired-${Date.now()}`;
|
|
83780
|
+
renameSync9(live3, retired);
|
|
83592
83781
|
try {
|
|
83593
|
-
renameSync9(join74(next, running.app),
|
|
83782
|
+
renameSync9(join74(next, running.app), live3);
|
|
83594
83783
|
} catch {
|
|
83595
|
-
cpSync3(join74(next, running.app),
|
|
83784
|
+
cpSync3(join74(next, running.app), live3, { recursive: true });
|
|
83596
83785
|
}
|
|
83597
83786
|
rmSync20(retired, { recursive: true, force: true });
|
|
83598
83787
|
current = fresh;
|