@wix/himalaya-cli 0.1256.0 → 0.1257.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/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/dev-server/src/builder.d.ts +2 -0
- package/dist/cli.mjs +619 -59
- package/dist/preview-assets.generated.bin +0 -0
- package/guides/base44-app-to-himi-app.md +41 -5
- package/guides/component-reference.json +0 -84
- package/guides/component-reference.md +2 -23
- package/package.json +2 -2
package/dist/cli.mjs
CHANGED
|
@@ -1396,14 +1396,30 @@ function templateTakesBase44AppId(template) {
|
|
|
1396
1396
|
const config = join3(templateSourceDir(template), "config.ts");
|
|
1397
1397
|
return existsSync2(config) && readFileSync3(config, "utf8").includes(`"${BASE44_APP_ID_PLACEHOLDER}"`);
|
|
1398
1398
|
}
|
|
1399
|
-
function
|
|
1399
|
+
function base44TenantUrl(raw) {
|
|
1400
|
+
const url = new URL(raw);
|
|
1401
|
+
if (url.protocol !== "https:" || url.username || url.password || url.port || url.pathname !== "/" || url.search || url.hash || url.hostname === "localhost" || !/^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]*[a-z0-9])?)*\.[a-z]{2,}$/i.test(url.hostname)) {
|
|
1402
|
+
throw new Error("--base44-app-url must be the published tenant's HTTPS origin, without a path, port or credentials");
|
|
1403
|
+
}
|
|
1404
|
+
return url;
|
|
1405
|
+
}
|
|
1406
|
+
function applyBase44AppId(dir, appId2, tenantUrl) {
|
|
1400
1407
|
if (!BASE44_APP_ID_RE.test(appId2)) throw new Error(`"${appId2}" is not a Base44 app id (8\u201364 letters and digits)`);
|
|
1401
1408
|
const config = join3(dir, "config.ts");
|
|
1402
1409
|
if (!existsSync2(config)) return false;
|
|
1403
1410
|
const body = readFileSync3(config, "utf8");
|
|
1404
1411
|
const literal = `"${BASE44_APP_ID_PLACEHOLDER}"`;
|
|
1405
1412
|
if (!body.includes(literal)) return false;
|
|
1406
|
-
|
|
1413
|
+
let configured = body.replaceAll(literal, `"${appId2}"`);
|
|
1414
|
+
if (tenantUrl !== void 0) {
|
|
1415
|
+
const host = base44TenantUrl(tenantUrl).hostname;
|
|
1416
|
+
if (!/^\s*base44:\s*\{/m.test(configured) || /\bappLinkHosts\s*:/.test(configured)) {
|
|
1417
|
+
throw new Error("this template cannot accept --base44-app-url; set appLinkHosts in config.ts");
|
|
1418
|
+
}
|
|
1419
|
+
configured = configured.replace(/^(\s*)base44:/m, `$1appLinkHosts: [${JSON.stringify(host)}],
|
|
1420
|
+
$1base44:`);
|
|
1421
|
+
}
|
|
1422
|
+
writeFileSync3(config, configured);
|
|
1407
1423
|
return true;
|
|
1408
1424
|
}
|
|
1409
1425
|
function templateIconPath(name) {
|
|
@@ -17706,9 +17722,9 @@ function isKnownCapability(id) {
|
|
|
17706
17722
|
function needsNativeBuild(id) {
|
|
17707
17723
|
const req = CAPABILITY_NATIVE[catalogKey(id)];
|
|
17708
17724
|
if (!req) return false;
|
|
17709
|
-
const
|
|
17725
|
+
const nonEmpty3 = (v2) => Array.isArray(v2) ? v2.length > 0 : v2 != null && typeof v2 === "object" ? Object.keys(v2).length > 0 : false;
|
|
17710
17726
|
const { ios, android } = req;
|
|
17711
|
-
return
|
|
17727
|
+
return nonEmpty3(ios?.usageStrings) || nonEmpty3(ios?.infoPlist) || nonEmpty3(ios?.entitlements) || nonEmpty3(ios?.spmProducts) || nonEmpty3(android?.permissions) || nonEmpty3(android?.features) || nonEmpty3(android?.services) || nonEmpty3(android?.foregroundServiceTypes) || nonEmpty3(android?.gradleDeps);
|
|
17712
17728
|
}
|
|
17713
17729
|
function capabilitiesUsedBy(bundleJs) {
|
|
17714
17730
|
const out2 = /* @__PURE__ */ new Set();
|
|
@@ -32405,10 +32421,134 @@ function classifyEmbedUrl(url, pageOrigin = currentOrigin()) {
|
|
|
32405
32421
|
function isWebviewUrlAllowed(url) {
|
|
32406
32422
|
return webviewFrameSandbox(url, [], null) !== null;
|
|
32407
32423
|
}
|
|
32408
|
-
|
|
32424
|
+
function webViewWebConfig(raw) {
|
|
32425
|
+
const c2 = asRecord(raw);
|
|
32426
|
+
const media = asRecord(c2.media);
|
|
32427
|
+
const g2 = asRecord(c2.gestures);
|
|
32428
|
+
const all = g2.disableAll === true;
|
|
32429
|
+
const disabled = (flag) => typeof flag === "boolean" ? flag : all;
|
|
32430
|
+
const disableContextMenu = disabled(g2.disableContextMenu);
|
|
32431
|
+
const allow = [];
|
|
32432
|
+
if (c2.media && typeof c2.media === "object") {
|
|
32433
|
+
if (media.autoplay === true) allow.push("autoplay");
|
|
32434
|
+
if (media.allowFullscreen !== false) allow.push("fullscreen");
|
|
32435
|
+
if (media.allowPictureInPicture === true) allow.push("picture-in-picture");
|
|
32436
|
+
}
|
|
32437
|
+
const css = [];
|
|
32438
|
+
if (disabled(g2.disableTextSelection)) css.push("*{-webkit-user-select:none!important;user-select:none!important}input,textarea,[contenteditable]{-webkit-user-select:text!important;user-select:text!important}");
|
|
32439
|
+
if (disableContextMenu) css.push("*{-webkit-touch-callout:none!important}");
|
|
32440
|
+
if (disabled(g2.disableUserDrag)) css.push("*{-webkit-user-drag:none}");
|
|
32441
|
+
if (disabled(g2.disableTapHighlight)) css.push("*{-webkit-tap-highlight-color:transparent}");
|
|
32442
|
+
if (disabled(g2.disableScrollIndicators)) css.push("html,body{scrollbar-width:none}::-webkit-scrollbar{display:none}");
|
|
32443
|
+
if (disabled(g2.disablePinchZoom)) css.push("html{touch-action:pan-x pan-y}");
|
|
32444
|
+
if (disabled(g2.disableScrollBounce)) css.push("html,body{overscroll-behavior:none}");
|
|
32445
|
+
return {
|
|
32446
|
+
allowedOrigins: Array.isArray(c2.allowedOrigins) ? c2.allowedOrigins.filter((o2) => typeof o2 === "string" && o2.length > 0) : [],
|
|
32447
|
+
allow: allow.join("; "),
|
|
32448
|
+
injectStart: nonEmpty2(c2.injectJsDocumentStart),
|
|
32449
|
+
injectEnd: nonEmpty2(c2.injectJsDocumentEnd),
|
|
32450
|
+
gestureCss: css.join(""),
|
|
32451
|
+
disableContextMenu,
|
|
32452
|
+
loadingText: nonEmpty2(c2.loadingText),
|
|
32453
|
+
showProgressBar: c2.showProgressBar === true,
|
|
32454
|
+
coverBandColor: nonEmpty2(c2.coverBandColor)
|
|
32455
|
+
};
|
|
32456
|
+
}
|
|
32457
|
+
function maskInertHtml(html) {
|
|
32458
|
+
const blank = (m2) => " ".repeat(m2.length);
|
|
32459
|
+
return html.replace(/<!--[\s\S]*?(?:-->|$)/g, blank).replace(/(<(script|style|textarea|title)\b[^>]*>)([\s\S]*?)(<\/\2\s*>|$)/gi, (_m, open, _t2, body, close) => open + blank(body) + close);
|
|
32460
|
+
}
|
|
32461
|
+
function injectIntoInlineHtml(html, config, scrollEnabled = true) {
|
|
32462
|
+
let head = "";
|
|
32463
|
+
if (!scrollEnabled) head += `<style data-himalaya-scroll>html,body{overflow:hidden!important}</style><script data-himalaya-scroll>(function(){function f(){[document.documentElement,document.body].forEach(function(e){if(e)e.style.setProperty("overflow","hidden","important")})}f();document.addEventListener("DOMContentLoaded",f)})()</script>`;
|
|
32464
|
+
if (config.gestureCss) head += `<style data-himalaya-gestures>${config.gestureCss}</style>`;
|
|
32465
|
+
if (config.disableContextMenu) head += `<script>document.addEventListener("contextmenu",function(e){e.preventDefault()},true)</script>`;
|
|
32466
|
+
if (config.injectStart) head += `<script data-himalaya-inject="start">${scriptBody(config.injectStart)}</script>`;
|
|
32467
|
+
const tail = config.injectEnd ? `<script data-himalaya-inject="end">${scriptBody(config.injectEnd)}</script>` : "";
|
|
32468
|
+
if (!head && !tail) return html;
|
|
32469
|
+
let out2 = html;
|
|
32470
|
+
if (head) {
|
|
32471
|
+
const masked = maskInertHtml(out2);
|
|
32472
|
+
const anchor = /<head(?:\s[^>]*)?>/i.exec(masked) ?? /<html(?:\s[^>]*)?>/i.exec(masked) ?? /^\s*<!doctype[^>]*>/i.exec(masked);
|
|
32473
|
+
out2 = anchor ? out2.slice(0, anchor.index + anchor[0].length) + head + out2.slice(anchor.index + anchor[0].length) : head + out2;
|
|
32474
|
+
}
|
|
32475
|
+
if (tail) out2 += tail;
|
|
32476
|
+
return out2;
|
|
32477
|
+
}
|
|
32478
|
+
function hasDotSegment(absolute) {
|
|
32479
|
+
const schemeEnd = absolute.indexOf("://");
|
|
32480
|
+
if (schemeEnd < 0) return false;
|
|
32481
|
+
const hierarchical = absolute.slice(schemeEnd + 3).split(/[?#]/)[0];
|
|
32482
|
+
const pathStart = hierarchical.indexOf("/");
|
|
32483
|
+
if (pathStart < 0) return false;
|
|
32484
|
+
return hierarchical.slice(pathStart).replace(/%2e/g, ".").split("/").some((seg) => seg === "." || seg === "..");
|
|
32485
|
+
}
|
|
32486
|
+
function rawUrlParts(url) {
|
|
32487
|
+
const trimmed = url.replace(/^[\u0000- ]+|[\u0000- ]+$/g, "");
|
|
32488
|
+
if (/[\\\u0000-\u0020\u007f]/.test(trimmed)) return null;
|
|
32489
|
+
const raw = trimmed;
|
|
32490
|
+
const m2 = /^([a-z][a-z0-9+.-]*):\/\/([^/?#]*)/i.exec(raw);
|
|
32491
|
+
if (!m2) return null;
|
|
32492
|
+
const authority = m2[2].slice(m2[2].lastIndexOf("@") + 1);
|
|
32493
|
+
let host;
|
|
32494
|
+
let port = "";
|
|
32495
|
+
if (authority.startsWith("[")) {
|
|
32496
|
+
const close = authority.indexOf("]");
|
|
32497
|
+
if (close < 0) return null;
|
|
32498
|
+
host = authority.slice(1, close);
|
|
32499
|
+
const rest = authority.slice(close + 1);
|
|
32500
|
+
if (rest.startsWith(":")) port = rest.slice(1);
|
|
32501
|
+
} else {
|
|
32502
|
+
const colon = authority.lastIndexOf(":");
|
|
32503
|
+
host = colon >= 0 ? authority.slice(0, colon) : authority;
|
|
32504
|
+
port = colon >= 0 ? authority.slice(colon + 1) : "";
|
|
32505
|
+
}
|
|
32506
|
+
host = host.toLowerCase();
|
|
32507
|
+
if (!host) return null;
|
|
32508
|
+
if (port !== "" && !/^\d+$/.test(port)) return null;
|
|
32509
|
+
let parsed;
|
|
32510
|
+
try {
|
|
32511
|
+
parsed = new URL(raw);
|
|
32512
|
+
} catch {
|
|
32513
|
+
return null;
|
|
32514
|
+
}
|
|
32515
|
+
const scheme = m2[1].toLowerCase();
|
|
32516
|
+
const bracketless = parsed.hostname.replace(/^\[|\]$/g, "").toLowerCase();
|
|
32517
|
+
if (parsed.protocol !== `${scheme}:` || bracketless !== host) return null;
|
|
32518
|
+
if (parsed.port !== "" && parsed.port !== String(Number(port))) return null;
|
|
32519
|
+
return { absolute: raw.toLowerCase(), host, hostPort: port !== "" ? `${host}:${Number(port)}` : host };
|
|
32520
|
+
}
|
|
32521
|
+
function webViewOriginAllowed(url, origins) {
|
|
32522
|
+
const u2 = rawUrlParts(url);
|
|
32523
|
+
if (!u2) return false;
|
|
32524
|
+
const { absolute, host, hostPort } = u2;
|
|
32525
|
+
for (const o2 of origins) {
|
|
32526
|
+
const origin = o2.toLowerCase();
|
|
32527
|
+
if (origin.endsWith("/") && origin.includes("://")) {
|
|
32528
|
+
if (hasDotSegment(absolute)) continue;
|
|
32529
|
+
const base = origin.slice(0, -1);
|
|
32530
|
+
if (absolute.startsWith(origin) || absolute === base || absolute.startsWith(base + "?") || absolute.startsWith(base + "#")) return true;
|
|
32531
|
+
continue;
|
|
32532
|
+
}
|
|
32533
|
+
if (origin === host || origin === hostPort) return true;
|
|
32534
|
+
if (absolute.startsWith(origin)) {
|
|
32535
|
+
const next = absolute.charAt(origin.length);
|
|
32536
|
+
if (origin.endsWith("/") || next === "" || next === "/" || next === "?" || next === "#") return true;
|
|
32537
|
+
}
|
|
32538
|
+
if (origin.startsWith("*.") || origin.startsWith(".")) {
|
|
32539
|
+
const suffix = origin.startsWith("*.") ? origin.slice(2) : origin.slice(1);
|
|
32540
|
+
if (host === suffix || host.endsWith(`.${suffix}`)) return true;
|
|
32541
|
+
}
|
|
32542
|
+
}
|
|
32543
|
+
return false;
|
|
32544
|
+
}
|
|
32545
|
+
var NETWORK_SCHEMES, asRecord, nonEmpty2, scriptBody;
|
|
32409
32546
|
var init_webviewFrame = __esm({
|
|
32410
32547
|
"../../core/web-renderer/src/webviewFrame.ts"() {
|
|
32411
32548
|
NETWORK_SCHEMES = /* @__PURE__ */ new Set(["http:", "https:"]);
|
|
32549
|
+
asRecord = (v2) => v2 && typeof v2 === "object" ? v2 : {};
|
|
32550
|
+
nonEmpty2 = (v2) => typeof v2 === "string" && v2.length > 0 ? v2 : void 0;
|
|
32551
|
+
scriptBody = (js2) => js2.replace(/<\/(script)/gi, "<\\/$1");
|
|
32412
32552
|
}
|
|
32413
32553
|
});
|
|
32414
32554
|
|
|
@@ -116770,6 +116910,22 @@ function withExtras(name, render) {
|
|
|
116770
116910
|
Wrapped.displayName = name;
|
|
116771
116911
|
return Wrapped;
|
|
116772
116912
|
}
|
|
116913
|
+
function rememberReveal(text8, n2) {
|
|
116914
|
+
if (revealProgress.size > 500) revealProgress.clear();
|
|
116915
|
+
revealProgress.set(text8, n2);
|
|
116916
|
+
}
|
|
116917
|
+
function revealHtml(html, shown2, fade) {
|
|
116918
|
+
let w2 = 0;
|
|
116919
|
+
const out2 = html.split(/(<[^>]*>)/).map((part) => {
|
|
116920
|
+
if (part.startsWith("<")) return part;
|
|
116921
|
+
return part.split(/(\s+)/).map((t2) => {
|
|
116922
|
+
if (t2 === "" || /^\s+$/.test(t2)) return t2;
|
|
116923
|
+
const visible = w2++ < shown2;
|
|
116924
|
+
return `<span style="opacity:${visible ? 1 : 0}${fade ? `;transition:${fade}` : ""}">${t2}</span>`;
|
|
116925
|
+
}).join("");
|
|
116926
|
+
}).join("");
|
|
116927
|
+
return { html: out2, total: w2 };
|
|
116928
|
+
}
|
|
116773
116929
|
function spacingToken(ctx, [name, fallback]) {
|
|
116774
116930
|
const v2 = ctx.tokens?.spacing?.[name];
|
|
116775
116931
|
return typeof v2 === "number" && Number.isFinite(v2) ? Math.max(0, v2) : fallback;
|
|
@@ -117039,6 +117195,19 @@ function layoutScale(el2) {
|
|
|
117039
117195
|
ky: r2.height > 0 && el2.offsetHeight > 0 ? el2.offsetHeight / r2.height : 1
|
|
117040
117196
|
};
|
|
117041
117197
|
}
|
|
117198
|
+
function isWebAssetPath(name) {
|
|
117199
|
+
return name !== "" && (/[/:]/.test(name) || /\.[a-z0-9]{2,5}$/i.test(name));
|
|
117200
|
+
}
|
|
117201
|
+
function collapsingScrollPort(el2) {
|
|
117202
|
+
const doc = el2.ownerDocument;
|
|
117203
|
+
const win = doc.defaultView;
|
|
117204
|
+
if (!win) return null;
|
|
117205
|
+
for (let p2 = el2.parentElement; p2 && p2 !== doc.body && p2 !== doc.documentElement; p2 = p2.parentElement) {
|
|
117206
|
+
const oy = win.getComputedStyle(p2).overflowY;
|
|
117207
|
+
if ((oy === "auto" || oy === "scroll" || oy === "overlay") && p2.scrollHeight > p2.clientHeight) return p2;
|
|
117208
|
+
}
|
|
117209
|
+
return null;
|
|
117210
|
+
}
|
|
117042
117211
|
function parseLocalDate(when) {
|
|
117043
117212
|
if (when == null || when === "") return null;
|
|
117044
117213
|
if (typeof when === "string") {
|
|
@@ -118317,11 +118486,12 @@ function renderInner(node, ctx) {
|
|
|
118317
118486
|
if (carItemsPath && items[0] && ctx.provider) {
|
|
118318
118487
|
return /* @__PURE__ */ jsx9("div", { style: { width: "100%", ...wrap }, children: /* @__PURE__ */ jsx9("div", { style: { display: "flex", overflowX: "auto", gap: 12, width: "100%" }, children: /* @__PURE__ */ jsx9(BoundList, { ctx, itemsPath: carItemsPath, template: items[0], renderRow: (t2, ic) => /* @__PURE__ */ jsx9("div", { style: { flex: "0 0 auto" }, children: renderNode(t2, ic) }) }) }) });
|
|
118319
118488
|
}
|
|
118489
|
+
if (type === "Carousel") return /* @__PURE__ */ jsx9(CarouselNode, { props, ctx, wrap });
|
|
118320
118490
|
const pages = items.filter((p2) => isNodeLike(p2) || p2?.type);
|
|
118321
118491
|
const cur = props.currentIndex ?? 0;
|
|
118322
118492
|
return /* @__PURE__ */ jsxs6("div", { style: { width: "100%", ...wrap }, children: [
|
|
118323
118493
|
/* @__PURE__ */ jsx9("div", { style: { display: "flex", overflowX: "auto", scrollSnapType: "x mandatory", width: "100%" }, children: pages.map((pg, i2) => /* @__PURE__ */ jsx9("div", { style: { minWidth: "100%", scrollSnapAlign: "start" }, children: renderNode(pg, ctx) }, pg?.id ?? i2)) }),
|
|
118324
|
-
pages.length > 1 &&
|
|
118494
|
+
pages.length > 1 && props.showIndicator !== false && /* @__PURE__ */ jsx9("div", { style: { display: "flex", gap: 6, justifyContent: "center", marginTop: 10 }, children: pages.map((_2, i2) => /* @__PURE__ */ jsx9("span", { style: { width: i2 === cur ? 18 : 7, height: 7, borderRadius: 999, background: i2 === cur ? C2("accentPrimary", "#116DFF") : C2("border", "#ccc") } }, i2)) })
|
|
118325
118495
|
] });
|
|
118326
118496
|
}
|
|
118327
118497
|
case "StepIndicator": {
|
|
@@ -118334,17 +118504,8 @@ function renderInner(node, ctx) {
|
|
|
118334
118504
|
case "AvatarStrip":
|
|
118335
118505
|
return /* @__PURE__ */ jsx9(AvatarStripNode, { props, ctx, wrap });
|
|
118336
118506
|
// ───────────── feedback ─────────────
|
|
118337
|
-
case "Banner":
|
|
118338
|
-
|
|
118339
|
-
return /* @__PURE__ */ jsxs6("div", { style: { display: "flex", gap: 11, width: "100%", boxSizing: "border-box", borderRadius: ctx.radius("md", 10), padding: 13, background: `color-mix(in srgb, ${accent} 12%, ${C2("surfacePrimary", "#fff")})`, border: `1px solid color-mix(in srgb, ${accent} 32%, transparent)`, ...wrap }, children: [
|
|
118340
|
-
/* @__PURE__ */ jsx9("div", { style: { width: 3, borderRadius: 3, background: accent, flex: "none" } }),
|
|
118341
|
-
/* @__PURE__ */ jsxs6("div", { children: [
|
|
118342
|
-
/* @__PURE__ */ jsx9("div", { style: { fontFamily: bodyFont(ctx), fontWeight: 600, fontSize: pxToRem(14), color: C2("textPrimary", "#111") }, children: txt(props.title, ctx) }),
|
|
118343
|
-
props.message && /* @__PURE__ */ jsx9("div", { style: { fontFamily: bodyFont(ctx), fontSize: pxToRem(13), lineHeight: 1.4, color: C2("textSecondary", "#666"), marginTop: 2 }, children: txt(props.message, ctx) }),
|
|
118344
|
-
actionTextButton(ctx, props.action, asBoundText(props.actionLabel, ctx) || "Take action", C2("textPrimary", "#111"), { marginTop: 7, textDecoration: "underline" })
|
|
118345
|
-
] })
|
|
118346
|
-
] });
|
|
118347
|
-
}
|
|
118507
|
+
case "Banner":
|
|
118508
|
+
return /* @__PURE__ */ jsx9(BannerNode, { props, ctx, wrap });
|
|
118348
118509
|
case "Snackbar": {
|
|
118349
118510
|
const dot = sevColor(ctx, props.severity ?? "info");
|
|
118350
118511
|
return /* @__PURE__ */ jsxs6("div", { style: { display: "flex", alignItems: "center", gap: 10, background: "#1c1f26", color: "#fff", borderRadius: ctx.radius("md", 10), padding: "12px 14px", width: "100%", boxSizing: "border-box", fontFamily: bodyFont(ctx), fontWeight: 500, fontSize: pxToRem(14), ...wrap }, children: [
|
|
@@ -118385,7 +118546,7 @@ function renderInner(node, ctx) {
|
|
|
118385
118546
|
}
|
|
118386
118547
|
}
|
|
118387
118548
|
}
|
|
118388
|
-
var useIsomorphicLayoutEffect, ResponsiveGrid, SPLIT_EXPANDED_MIN_WIDTH, SPLIT_COLUMN_GAP, ResponsiveSplitView, ABSOLUTE_URL_RE, appearKeyframesInjected, pressStylesInjected, REVEAL_ON_FOCUS_ATTR, 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, asFinalTextL10n, asBoundText, useBoundString, InterpolatedTextView, txt, selectFragmentCase, fragmentValueHash, fragmentSlotContent, FragmentSlotNode, RichContentEditorNode, MediaFieldNode, WorkerSubtreeNode, RichContentNode, resolveItemDeep2, resolveRowAction2, resolveSwipeActions, resolveModBindings, resolvedComponentId, directServiceBindings, withRootStyle, ReactiveDirectScalars, HiddenGate, KEYBOARD_INPUT_MODES, AUTOCAPITALIZE_VALUES, ENTER_KEY_HINTS, AUTOGROW_CEILING, EditableField, MenuNode, LoadMoreSentinel, FieldErrorNode, FormView, MediaSlotProvider, MEDIA_ITEM_BINDABLE, MediaPlayerView, VideoNode, PdfDocumentCanvas, 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, TAP_ACTIVATOR_ATTR, TAP_GROUP_ATTR, VISUALLY_HIDDEN, NAME_SKIP_SELECTOR, activatorNameObservers, ACTIVATOR_STATE_ATTRS, controlNode, ToggleNode, SliderNode, SelectionControlNode, TabsNode, SegmentedControlNode, DisclosureGroupNode, GridNode, SplitViewNode, TextNode, ImageNode, ANIMATION_LEAF, LottieNode, RiveNode, AvatarNode, IconNode, EMPTY_STATE_SPACING, EmptyStateNode, ButtonNode, OtpInputNode, ProgressBarNode, ACTIVITY_DEFAULT_NAME, 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;
|
|
118549
|
+
var useIsomorphicLayoutEffect, ResponsiveGrid, SPLIT_EXPANDED_MIN_WIDTH, SPLIT_COLUMN_GAP, ResponsiveSplitView, ABSOLUTE_URL_RE, appearKeyframesInjected, pressStylesInjected, REVEAL_ON_FOCUS_ATTR, 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, asFinalTextL10n, asBoundText, useBoundString, InterpolatedTextView, txt, selectFragmentCase, fragmentValueHash, fragmentSlotContent, FragmentSlotNode, RichContentEditorNode, MediaFieldNode, WorkerSubtreeNode, RichContentNode, resolveItemDeep2, resolveRowAction2, resolveSwipeActions, resolveModBindings, resolvedComponentId, directServiceBindings, withRootStyle, ReactiveDirectScalars, HiddenGate, KEYBOARD_INPUT_MODES, AUTOCAPITALIZE_VALUES, ENTER_KEY_HINTS, AUTOGROW_CEILING, EditableField, MenuNode, LoadMoreSentinel, FieldErrorNode, FormView, MediaSlotProvider, MEDIA_ITEM_BINDABLE, MediaPlayerView, VideoNode, PdfDocumentCanvas, 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, TAP_ACTIVATOR_ATTR, TAP_GROUP_ATTR, VISUALLY_HIDDEN, NAME_SKIP_SELECTOR, activatorNameObservers, ACTIVATOR_STATE_ATTRS, controlNode, ToggleNode, SliderNode, SelectionControlNode, TabsNode, SegmentedControlNode, DisclosureGroupNode, GridNode, SplitViewNode, REVEAL_RELEASE_MS, REVEAL_FADE_MS, REVEAL_BUFFER, revealProgress, countWords, RevealText, TextNode, ImageNode, ANIMATION_LEAF, LottieNode, RiveNode, AvatarNode, IconNode, EMPTY_STATE_SPACING, EmptyStateNode, ButtonNode, OtpInputNode, ProgressBarNode, ACTIVITY_DEFAULT_NAME, 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, CAROUSEL_SETTLE_MS, scrollCarouselTo, CarouselNode, BannerNode, 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;
|
|
118389
118550
|
var init_renderNode = __esm({
|
|
118390
118551
|
"../../core/web-renderer/src/renderNode.tsx"() {
|
|
118391
118552
|
"use strict";
|
|
@@ -119882,15 +120043,36 @@ var init_renderNode = __esm({
|
|
|
119882
120043
|
const url = props.url != null && isBinding(props.url) ? boundUrl : props.url;
|
|
119883
120044
|
const inlineHtml = props.inlineHtml != null && isBinding(props.inlineHtml) ? boundHtml : props.inlineHtml;
|
|
119884
120045
|
const urlStr = typeof url === "string" && url.length > 0 && !isBinding(url) ? url : void 0;
|
|
119885
|
-
const
|
|
119886
|
-
const
|
|
120046
|
+
const rawHtml = typeof inlineHtml === "string" && inlineHtml.length > 0 && !isBinding(inlineHtml) ? inlineHtml : void 0;
|
|
120047
|
+
const config = webViewWebConfig(props.config);
|
|
120048
|
+
const scrollEnabled = props.scrollEnabled === true;
|
|
120049
|
+
const htmlStr = rawHtml != null ? injectIntoInlineHtml(rawHtml, config, scrollEnabled) : void 0;
|
|
120050
|
+
const urlAllowed = urlStr != null && (config.allowedOrigins.length === 0 || webViewOriginAllowed(urlStr, config.allowedOrigins));
|
|
120051
|
+
const urlFrame = urlStr && urlAllowed ? webviewFrameSandbox(urlStr) : null;
|
|
119887
120052
|
const h2 = typeof props.height === "number" && props.height > 0 ? props.height : void 0;
|
|
119888
120053
|
const ar2 = typeof props.aspectRatio === "number" && props.aspectRatio > 0 ? props.aspectRatio : void 0;
|
|
119889
|
-
const frameStyle = { width: "100%", boxSizing: "border-box", border: "none", borderRadius: ctx.radius("md", 8), background: "#fff", ...h2 ? { height: h2 } : ar2 ? { aspectRatio: String(ar2) } : { height: 200 } };
|
|
119890
|
-
const
|
|
120054
|
+
const frameStyle = { width: "100%", boxSizing: "border-box", border: "none", borderRadius: ctx.radius("md", 8), background: "#fff", ...scrollEnabled ? {} : { overflow: "hidden" }, ...h2 ? { height: h2 } : ar2 ? { aspectRatio: String(ar2) } : { height: 200 } };
|
|
120055
|
+
const frameKey = htmlStr ?? urlFrame?.src ?? null;
|
|
120056
|
+
const [loadedKey, setLoadedKey] = React8.useState(null);
|
|
120057
|
+
const loaded = loadedKey === frameKey;
|
|
120058
|
+
const frameProps = {
|
|
120059
|
+
title: "webview",
|
|
120060
|
+
scrolling: scrollEnabled ? void 0 : "no",
|
|
120061
|
+
"data-scroll-enabled": scrollEnabled ? "true" : "false",
|
|
120062
|
+
allow: config.allow || void 0,
|
|
120063
|
+
onLoad: () => setLoadedKey(frameKey),
|
|
120064
|
+
style: frameStyle
|
|
120065
|
+
};
|
|
120066
|
+
const showLoading = !loaded && (config.loadingText != null || config.showProgressBar) && (htmlStr != null || urlFrame != null);
|
|
120067
|
+
const rawBand = config.coverBandColor ?? props.coverBandColor;
|
|
120068
|
+
const bandColor = typeof rawBand === "string" && rawBand.length > 0 ? rawBand : void 0;
|
|
119891
120069
|
return /* @__PURE__ */ jsxs6("div", { style: { width: "100%", position: "relative", ...bandColor ? { background: bandColor, borderRadius: ctx.radius("md", 8), overflow: "hidden" } : {}, ...wrap }, children: [
|
|
119892
120070
|
bandColor ? /* @__PURE__ */ jsx9("div", { "data-testid": "webview-cover-band", style: { height: 8, background: bandColor } }) : null,
|
|
119893
|
-
htmlStr ? /* @__PURE__ */ jsx9("iframe", {
|
|
120071
|
+
htmlStr ? /* @__PURE__ */ jsx9("iframe", { ...frameProps, srcDoc: htmlStr, sandbox: "allow-scripts" }) : urlFrame ? /* @__PURE__ */ jsx9("iframe", { ...frameProps, src: urlFrame.src, sandbox: urlFrame.sandbox }) : /* @__PURE__ */ jsx9("div", { style: { ...frameStyle, display: "grid", placeItems: "center", color: "#999", fontFamily: "ui-monospace, monospace", fontSize: pxToRem(11), border: "1px dashed #ccc" }, children: urlStr ? "WebView (url not allowed)" : "WebView (no url)" }),
|
|
120072
|
+
showLoading ? /* @__PURE__ */ jsxs6("div", { "data-testid": "webview-loading", role: "status", "aria-live": "polite", "aria-label": config.loadingText ? void 0 : "Loading", style: { position: "absolute", left: 0, right: 0, top: bandColor ? 8 : 0, bottom: 0, display: "grid", placeItems: "center", pointerEvents: "none", fontFamily: bodyFont(ctx), fontSize: pxToRem(13), color: ctx.color("textSecondary", "#666") }, children: [
|
|
120073
|
+
config.showProgressBar ? /* @__PURE__ */ jsx9("div", { "aria-hidden": "true", style: { position: "absolute", left: 0, top: 0, height: 3, width: "40%", background: ctx.color("accentPrimary", "#116DFF") } }) : null,
|
|
120074
|
+
config.loadingText ?? null
|
|
120075
|
+
] }) : null
|
|
119894
120076
|
] });
|
|
119895
120077
|
});
|
|
119896
120078
|
InteractivePicker = withExtras("InteractivePicker", ({ props, ctx, wrap }) => {
|
|
@@ -120336,11 +120518,66 @@ var init_renderNode = __esm({
|
|
|
120336
120518
|
extra: wrap
|
|
120337
120519
|
});
|
|
120338
120520
|
});
|
|
120521
|
+
REVEAL_RELEASE_MS = 90;
|
|
120522
|
+
REVEAL_FADE_MS = 220;
|
|
120523
|
+
REVEAL_BUFFER = 12;
|
|
120524
|
+
revealProgress = /* @__PURE__ */ new Map();
|
|
120525
|
+
countWords = (s2) => s2.split(/\s+/).filter((t2) => t2 !== "").length;
|
|
120526
|
+
RevealText = ({ text: text8, reduce, markdownHtml }) => {
|
|
120527
|
+
const tokens2 = React8.useMemo(() => text8.split(/(\s+)/).filter((t2) => t2 !== ""), [text8]);
|
|
120528
|
+
const total = React8.useMemo(
|
|
120529
|
+
() => markdownHtml != null ? revealHtml(markdownHtml, 0, void 0).total : countWords(text8),
|
|
120530
|
+
[text8, markdownHtml]
|
|
120531
|
+
);
|
|
120532
|
+
const [shown2, setShown] = React8.useState(total);
|
|
120533
|
+
const prevRef = React8.useRef(null);
|
|
120534
|
+
useIsomorphicLayoutEffect(() => {
|
|
120535
|
+
const prev = prevRef.current;
|
|
120536
|
+
prevRef.current = text8;
|
|
120537
|
+
if (reduce) {
|
|
120538
|
+
rememberReveal(text8, total);
|
|
120539
|
+
setShown(total);
|
|
120540
|
+
return;
|
|
120541
|
+
}
|
|
120542
|
+
let start = revealProgress.get(text8);
|
|
120543
|
+
if (start == null) start = prev != null && text8.startsWith(prev) ? revealProgress.get(prev) ?? countWords(prev) : 0;
|
|
120544
|
+
start = Math.max(start, total - REVEAL_BUFFER);
|
|
120545
|
+
rememberReveal(text8, start);
|
|
120546
|
+
setShown(start);
|
|
120547
|
+
if (start >= total) return;
|
|
120548
|
+
let n2 = start;
|
|
120549
|
+
const id = setInterval(() => {
|
|
120550
|
+
n2 += 1;
|
|
120551
|
+
rememberReveal(text8, n2);
|
|
120552
|
+
setShown(n2);
|
|
120553
|
+
if (n2 >= total) clearInterval(id);
|
|
120554
|
+
}, REVEAL_RELEASE_MS);
|
|
120555
|
+
return () => clearInterval(id);
|
|
120556
|
+
}, [text8, reduce, total]);
|
|
120557
|
+
const fade = reduce ? void 0 : `opacity ${REVEAL_FADE_MS}ms ease-out`;
|
|
120558
|
+
if (markdownHtml != null) {
|
|
120559
|
+
return /* @__PURE__ */ jsx9(
|
|
120560
|
+
"span",
|
|
120561
|
+
{
|
|
120562
|
+
"data-himalaya-reveal": `${Math.min(shown2, total)}/${total}`,
|
|
120563
|
+
dangerouslySetInnerHTML: { __html: revealHtml(markdownHtml, shown2, fade).html }
|
|
120564
|
+
}
|
|
120565
|
+
);
|
|
120566
|
+
}
|
|
120567
|
+
let w2 = 0;
|
|
120568
|
+
return /* @__PURE__ */ jsx9("span", { "data-himalaya-reveal": `${Math.min(shown2, total)}/${total}`, children: tokens2.map((t2, i2) => {
|
|
120569
|
+
if (/^\s+$/.test(t2)) return t2;
|
|
120570
|
+
const visible = w2++ < shown2;
|
|
120571
|
+
return /* @__PURE__ */ jsx9("span", { style: { opacity: visible ? 1 : 0, transition: fade }, children: t2 }, i2);
|
|
120572
|
+
}) });
|
|
120573
|
+
};
|
|
120339
120574
|
TextNode = withExtras("TextNode", ({ props, ctx, wrap }) => {
|
|
120340
120575
|
const C2 = ctx.color;
|
|
120341
120576
|
const f2 = ctx.font(props.style);
|
|
120342
120577
|
const collapse = props.collapseWhenEmpty === true;
|
|
120343
120578
|
const resolvedForCollapse = useResolvedScalar(collapse && isBinding(props.text) ? props.text : void 0, ctx);
|
|
120579
|
+
const reveal = props.animateReveal === true;
|
|
120580
|
+
const resolvedForReveal = useResolvedScalar(reveal && isBinding(props.text) ? props.text : void 0, ctx);
|
|
120344
120581
|
let countAttrs;
|
|
120345
120582
|
let countContent;
|
|
120346
120583
|
if (props.animateValue === true && !ctx.reduceMotion()) {
|
|
@@ -120374,11 +120611,23 @@ var init_renderNode = __esm({
|
|
|
120374
120611
|
const resolved2 = resolveScalarStatic(props.text, ctx);
|
|
120375
120612
|
return resolved2 == null ? null : String(resolved2);
|
|
120376
120613
|
})();
|
|
120377
|
-
const
|
|
120378
|
-
|
|
120614
|
+
const revealSource = (() => {
|
|
120615
|
+
if (!reveal || countContent != null || icuPattern != null) return null;
|
|
120616
|
+
if (mdSource != null) return mdSource;
|
|
120617
|
+
const raw = props.text;
|
|
120618
|
+
if (typeof raw !== "string") return null;
|
|
120619
|
+
if (!isBinding(raw)) return raw;
|
|
120620
|
+
const v2 = raw.startsWith("$service:") ? ctx.provider ? resolvedForReveal : void 0 : resolveScalarStatic(raw, ctx);
|
|
120621
|
+
return v2 == null ? null : String(v2);
|
|
120622
|
+
})();
|
|
120623
|
+
const revealMarkdown = props.markdown === true && revealSource != null ? mdSource ?? revealSource : null;
|
|
120624
|
+
const content = countContent != null ? countContent : revealSource != null && revealSource !== "" ? /* @__PURE__ */ jsx9(RevealText, { text: revealSource, reduce: ctx.reduceMotion(), markdownHtml: revealMarkdown != null ? mdInline(revealMarkdown, accentTextColor(ctx)).__html : void 0 }) : icuPattern != null ? /* @__PURE__ */ jsx9(InterpolatedTextView, { pattern: icuPattern, params: props.template?.params ?? {}, ctx }) : mdSource != null ? /* @__PURE__ */ jsx9("span", { dangerouslySetInnerHTML: mdInline(mdSource, accentTextColor(ctx)) }) : txt(props.text, ctx);
|
|
120625
|
+
const authoredDirection = props.textDirection === "auto" || props.textDirection === "ltr" || props.textDirection === "rtl";
|
|
120626
|
+
const dir = authoredDirection ? props.textDirection : "auto";
|
|
120627
|
+
const tAlign = props.textAlign === "center" ? "center" : props.textAlign === "trailing" ? authoredDirection ? "end" : "right" : props.textAlign === "justify" ? "justify" : props.textAlign === "leading" ? authoredDirection ? "start" : "left" : void 0;
|
|
120379
120628
|
const tDecor = props.decoration === "strikethrough" ? "line-through" : props.decoration === "underline" ? "underline" : void 0;
|
|
120380
120629
|
const ln2 = typeof props.lineSpacing === "number" ? pxToRem((f2.line ?? 1.4) * f2.size + props.lineSpacing) : f2.line;
|
|
120381
|
-
return /* @__PURE__ */ jsx9("div", { ...countAttrs, style: { fontFamily: fontStack(f2.family, ctx.idiom), fontSize: f2.remSize, fontWeight: f2.weight, lineHeight: ln2, letterSpacing: f2.letterSpacing, color: C2(resolveScalarStatic(props.color, ctx) ?? "textPrimary", "#13171e"), whiteSpace: props.maxLines === 1 ? "nowrap" : "pre-wrap", overflowWrap: "anywhere", wordBreak: "break-word", minWidth: 0, ...tAlign ? { textAlign: tAlign } : {}, ...tDecor ? { textDecoration: tDecor } : {}, ...props.maxLines === 1 ? { overflow: "hidden", textOverflow: "ellipsis" } : props.maxLines ? { display: "-webkit-box", WebkitLineClamp: props.maxLines, WebkitBoxOrient: "vertical", overflow: "hidden" } : {}, ...wrap },
|
|
120630
|
+
return /* @__PURE__ */ jsx9("div", { ...countAttrs, dir, style: { fontFamily: fontStack(f2.family, ctx.idiom), fontSize: f2.remSize, fontWeight: f2.weight, lineHeight: ln2, letterSpacing: f2.letterSpacing, color: C2(resolveScalarStatic(props.color, ctx) ?? "textPrimary", "#13171e"), whiteSpace: props.maxLines === 1 ? "nowrap" : "pre-wrap", overflowWrap: "anywhere", wordBreak: "break-word", minWidth: 0, ...tAlign ? { textAlign: tAlign } : {}, ...tDecor ? { textDecoration: tDecor } : {}, ...props.maxLines === 1 ? { overflow: "hidden", textOverflow: "ellipsis" } : props.maxLines ? { display: "-webkit-box", WebkitLineClamp: props.maxLines, WebkitBoxOrient: "vertical", overflow: "hidden" } : {}, ...wrap }, children: content == null || content === "" ? collapse ? null : "\xA0" : content });
|
|
120382
120631
|
});
|
|
120383
120632
|
ImageNode = withExtras("ImageNode", ({ props, ctx, wrap }) => {
|
|
120384
120633
|
const C2 = ctx.color;
|
|
@@ -121613,9 +121862,32 @@ var init_renderNode = __esm({
|
|
|
121613
121862
|
}, [boxEl, h2]);
|
|
121614
121863
|
const hasMarkerFeed = typeof props.markersPath === "string" && props.markersPath !== "";
|
|
121615
121864
|
const hasStaticMarkers = markers.length > 0 && !hasMarkerFeed;
|
|
121616
|
-
const
|
|
121617
|
-
const
|
|
121865
|
+
const follow = props.followUserLocation === true;
|
|
121866
|
+
const observeUserLocation = props.showUserLocation === true || follow;
|
|
121867
|
+
const otherTileReason = route.length > 0 || shapes.length > 0 || hasEvents || props.cameraPath != null || props.showUserLocation === true || follow || props.fitToContent === true;
|
|
121868
|
+
const hasRouteContent = route.length > 0 || props.markersPath != null || props.routePath != null;
|
|
121869
|
+
const schematic = hasRouteContent && usesSchematicRoute(props);
|
|
121870
|
+
const explicitSchematic = schematic && props.routeMode?.toLowerCase() === "schematic";
|
|
121871
|
+
const usesTileArm = !explicitSchematic && (otherTileReason || hasStaticMarkers) && (follow || !schematic);
|
|
121618
121872
|
const pinsOnly = hasStaticMarkers && !otherTileReason;
|
|
121873
|
+
const [userFix, setUserFix] = React8.useState(null);
|
|
121874
|
+
const [followBroken, setFollowBroken] = React8.useState(false);
|
|
121875
|
+
React8.useEffect(() => {
|
|
121876
|
+
if (follow) setFollowBroken(false);
|
|
121877
|
+
}, [follow]);
|
|
121878
|
+
React8.useEffect(() => {
|
|
121879
|
+
if (!observeUserLocation || !usesTileArm) return;
|
|
121880
|
+
const geo = typeof navigator !== "undefined" ? navigator.geolocation : void 0;
|
|
121881
|
+
if (!geo || typeof geo.watchPosition !== "function") return;
|
|
121882
|
+
const id = geo.watchPosition(
|
|
121883
|
+
(p2) => setUserFix({ lat: p2.coords.latitude, lng: p2.coords.longitude }),
|
|
121884
|
+
() => {
|
|
121885
|
+
},
|
|
121886
|
+
{ enableHighAccuracy: true, maximumAge: 5e3 }
|
|
121887
|
+
);
|
|
121888
|
+
return () => geo.clearWatch(id);
|
|
121889
|
+
}, [observeUserLocation, usesTileArm]);
|
|
121890
|
+
const followActive = follow && !followBroken && userFix != null;
|
|
121619
121891
|
{
|
|
121620
121892
|
const all = [...route, ...markers, ...shapes.flatMap((sh) => sh.points)].filter((p2) => p2 && typeof p2.latitude === "number" && typeof p2.longitude === "number");
|
|
121621
121893
|
const declared = typeof props.zoom === "number" && props.zoom > 0 ? Math.max(1, Math.min(19, props.zoom)) : 13;
|
|
@@ -121628,11 +121900,12 @@ var init_renderNode = __esm({
|
|
|
121628
121900
|
const baseLat = all.length && shouldFit ? (Math.min(...all.map((p2) => p2.latitude)) + Math.max(...all.map((p2) => p2.latitude))) / 2 : typeof props.latitude === "number" ? props.latitude : 37.7749;
|
|
121629
121901
|
const baseLng = all.length && shouldFit ? (Math.min(...all.map((p2) => p2.longitude)) + Math.max(...all.map((p2) => p2.longitude))) / 2 : typeof props.longitude === "number" ? props.longitude : -122.4194;
|
|
121630
121902
|
const z4 = userCam?.z ?? fitted;
|
|
121631
|
-
const cLat = userCam?.lat ?? baseLat;
|
|
121632
|
-
const cLng = userCam?.lng ?? baseLng;
|
|
121903
|
+
const cLat = followActive ? userFix.lat : userCam?.lat ?? baseLat;
|
|
121904
|
+
const cLng = followActive ? userFix.lng : userCam?.lng ?? baseLng;
|
|
121633
121905
|
React8.useEffect(() => {
|
|
121634
121906
|
const resolved2 = resolveCamera(commandedCamera, cLat, cLng, z4);
|
|
121635
121907
|
if (!resolved2) return;
|
|
121908
|
+
setFollowBroken(true);
|
|
121636
121909
|
setUserCam({
|
|
121637
121910
|
lat: Math.max(-MAX_MERCATOR_LAT, Math.min(MAX_MERCATOR_LAT, resolved2.latitude)),
|
|
121638
121911
|
lng: resolved2.longitude,
|
|
@@ -121699,6 +121972,7 @@ var init_renderNode = __esm({
|
|
|
121699
121972
|
const dy = (e2.clientY - d3.y) * d3.ky;
|
|
121700
121973
|
if (Math.abs(dx) + Math.abs(dy) < 3) return;
|
|
121701
121974
|
dragMovedRef.current = true;
|
|
121975
|
+
if (follow) setFollowBroken(true);
|
|
121702
121976
|
const cx = mercatorX(d3.lng, d3.z) - dx;
|
|
121703
121977
|
const cy = mercatorY(d3.lat, d3.z) - dy;
|
|
121704
121978
|
setUserCam({
|
|
@@ -121807,7 +122081,11 @@ var init_renderNode = __esm({
|
|
|
121807
122081
|
/* @__PURE__ */ jsx9("circle", { cx: sx(m2), cy: sy(m2), r: typeof m2.icon === "string" && m2.icon ? 9 : 6, fill: typeof m2.tint === "string" && m2.tint ? C2(m2.tint, accent) : accent, stroke: "#fff", strokeWidth: 2 }),
|
|
121808
122082
|
typeof m2.icon === "string" && m2.icon ? /* @__PURE__ */ jsx9("text", { x: sx(m2), y: sy(m2), textAnchor: "middle", dominantBaseline: "central", fontSize: 9, fill: "#fff", children: iconGlyph(m2.icon) }) : null
|
|
121809
122083
|
] }, i2)
|
|
121810
|
-
))
|
|
122084
|
+
)),
|
|
122085
|
+
userFix && (props.showUserLocation === true || follow) ? /* @__PURE__ */ jsxs6("g", { "data-testid": "map-user-location", "data-following": followActive ? "true" : "false", children: [
|
|
122086
|
+
/* @__PURE__ */ jsx9("circle", { cx: sx({ latitude: userFix.lat, longitude: userFix.lng }), cy: sy({ latitude: userFix.lat, longitude: userFix.lng }), r: 14, fill: accent, fillOpacity: 0.18 }),
|
|
122087
|
+
/* @__PURE__ */ jsx9("circle", { cx: sx({ latitude: userFix.lat, longitude: userFix.lng }), cy: sy({ latitude: userFix.lat, longitude: userFix.lng }), r: 7, fill: accent, stroke: "#fff", strokeWidth: 2.5 })
|
|
122088
|
+
] }) : null
|
|
121811
122089
|
] }),
|
|
121812
122090
|
/* @__PURE__ */ jsx9("div", { style: { position: "absolute", right: 2, bottom: 1, font: "10px/12px system-ui", color: "#333", background: "rgba(255,255,255,.7)", padding: "0 3px", borderRadius: 2 }, children: resolvedTileSource?.attribution ?? "\xA9 OpenStreetMap" })
|
|
121813
122091
|
]
|
|
@@ -121836,21 +122114,185 @@ var init_renderNode = __esm({
|
|
|
121836
122114
|
const src = `https://www.openstreetmap.org/export/embed.html?bbox=${encodeURIComponent(bbox)}&layer=mapnik&marker=${lat},${lng}`;
|
|
121837
122115
|
return /* @__PURE__ */ jsx9("div", { style: { width: "100%", boxSizing: "border-box", height: h2, borderRadius: ctx.radius("md", 8), overflow: "hidden", border: `1px solid ${C2("border", "#e3e3e3")}`, position: "relative", ...wrap }, children: /* @__PURE__ */ jsx9("iframe", { title: "map", src, style: { width: "100%", height: "100%", border: "none", pointerEvents: props.interactive === false ? "none" : "auto" }, loading: "lazy" }) });
|
|
121838
122116
|
});
|
|
122117
|
+
CAROUSEL_SETTLE_MS = 1e3;
|
|
122118
|
+
scrollCarouselTo = (el2, page) => {
|
|
122119
|
+
if (!el2) return;
|
|
122120
|
+
const left = page * el2.clientWidth;
|
|
122121
|
+
if (typeof el2.scrollTo === "function") el2.scrollTo({ left, behavior: "smooth" });
|
|
122122
|
+
else el2.scrollLeft = left;
|
|
122123
|
+
};
|
|
122124
|
+
CarouselNode = withExtras("CarouselNode", ({ props, ctx, wrap }) => {
|
|
122125
|
+
const C2 = ctx.color;
|
|
122126
|
+
const items = Array.isArray(props.items) ? props.items : [];
|
|
122127
|
+
const pages = items.filter((p2) => isNodeLike(p2) || p2?.type);
|
|
122128
|
+
const count2 = pages.length;
|
|
122129
|
+
const [index, setIndex] = React8.useState(typeof props.currentIndex === "number" ? props.currentIndex : 0);
|
|
122130
|
+
const indexRef = React8.useRef(index);
|
|
122131
|
+
const trackRef = React8.useRef(null);
|
|
122132
|
+
const [hovered, setHovered] = React8.useState(false);
|
|
122133
|
+
const [focused, setFocused] = React8.useState(false);
|
|
122134
|
+
const paused = hovered || focused;
|
|
122135
|
+
const interval = typeof props.autoplayIntervalMs === "number" && props.autoplayIntervalMs > 0 ? props.autoplayIntervalMs : 0;
|
|
122136
|
+
const autoplay = interval > 0 && count2 > 1 && !ctx.reduceMotion();
|
|
122137
|
+
const onChange = props.onChange;
|
|
122138
|
+
const onChangeRef = React8.useRef(onChange);
|
|
122139
|
+
onChangeRef.current = onChange;
|
|
122140
|
+
const autoScrollRef = React8.useRef(null);
|
|
122141
|
+
const endAutoScroll = React8.useCallback(() => {
|
|
122142
|
+
if (autoScrollRef.current) clearTimeout(autoScrollRef.current.timer);
|
|
122143
|
+
autoScrollRef.current = null;
|
|
122144
|
+
}, []);
|
|
122145
|
+
React8.useEffect(() => {
|
|
122146
|
+
const el2 = trackRef.current;
|
|
122147
|
+
el2?.addEventListener("scrollend", endAutoScroll);
|
|
122148
|
+
return () => {
|
|
122149
|
+
el2?.removeEventListener("scrollend", endAutoScroll);
|
|
122150
|
+
endAutoScroll();
|
|
122151
|
+
};
|
|
122152
|
+
}, [endAutoScroll]);
|
|
122153
|
+
const pageTo = React8.useCallback((page) => {
|
|
122154
|
+
if (page === indexRef.current) return;
|
|
122155
|
+
indexRef.current = page;
|
|
122156
|
+
setIndex(page);
|
|
122157
|
+
const action = onChangeRef.current;
|
|
122158
|
+
if (action && ctx.onAction) ctx.onAction({ ...action, args: { ...action.args ?? {}, index: page } });
|
|
122159
|
+
}, [ctx]);
|
|
122160
|
+
React8.useEffect(() => {
|
|
122161
|
+
if (!autoplay || paused) return;
|
|
122162
|
+
const id = setInterval(() => {
|
|
122163
|
+
const next = (indexRef.current + 1) % count2;
|
|
122164
|
+
endAutoScroll();
|
|
122165
|
+
autoScrollRef.current = { target: next, timer: setTimeout(endAutoScroll, CAROUSEL_SETTLE_MS) };
|
|
122166
|
+
pageTo(next);
|
|
122167
|
+
scrollCarouselTo(trackRef.current, next);
|
|
122168
|
+
}, interval);
|
|
122169
|
+
return () => clearInterval(id);
|
|
122170
|
+
}, [autoplay, paused, interval, count2, pageTo, endAutoScroll]);
|
|
122171
|
+
const onScroll = (e2) => {
|
|
122172
|
+
const el2 = e2.currentTarget;
|
|
122173
|
+
if (el2.clientWidth <= 0) return;
|
|
122174
|
+
const page = Math.max(0, Math.min(count2 - 1, Math.round(el2.scrollLeft / el2.clientWidth)));
|
|
122175
|
+
if (autoScrollRef.current) {
|
|
122176
|
+
if (page === autoScrollRef.current.target) endAutoScroll();
|
|
122177
|
+
return;
|
|
122178
|
+
}
|
|
122179
|
+
pageTo(page);
|
|
122180
|
+
};
|
|
122181
|
+
const onPointerOver = () => setHovered(true);
|
|
122182
|
+
const onPointerOut = () => setHovered(false);
|
|
122183
|
+
const onFocusIn = () => setFocused(true);
|
|
122184
|
+
const onFocusOut = (e2) => {
|
|
122185
|
+
const next = e2.relatedTarget;
|
|
122186
|
+
if (next && e2.currentTarget.contains(next)) return;
|
|
122187
|
+
setFocused(false);
|
|
122188
|
+
};
|
|
122189
|
+
const userTakesOver = (event) => {
|
|
122190
|
+
const el2 = trackRef.current;
|
|
122191
|
+
if (autoScrollRef.current && el2 && typeof el2.scrollTo === "function") {
|
|
122192
|
+
el2.scrollTo({ left: el2.scrollLeft, behavior: "instant" });
|
|
122193
|
+
}
|
|
122194
|
+
endAutoScroll();
|
|
122195
|
+
if (event.type === "keydown") setFocused(true);
|
|
122196
|
+
else setHovered(true);
|
|
122197
|
+
};
|
|
122198
|
+
return /* @__PURE__ */ jsxs6(
|
|
122199
|
+
"div",
|
|
122200
|
+
{
|
|
122201
|
+
"data-carousel-index": index,
|
|
122202
|
+
"data-carousel-autoplay": autoplay ? paused ? "paused" : "on" : "off",
|
|
122203
|
+
onPointerEnter: onPointerOver,
|
|
122204
|
+
onPointerDown: onPointerOver,
|
|
122205
|
+
onPointerLeave: onPointerOut,
|
|
122206
|
+
onFocus: onFocusIn,
|
|
122207
|
+
onBlur: onFocusOut,
|
|
122208
|
+
style: { width: "100%", ...wrap },
|
|
122209
|
+
children: [
|
|
122210
|
+
/* @__PURE__ */ jsx9("div", { ref: trackRef, onScroll, onPointerDown: userTakesOver, onTouchStart: userTakesOver, onWheel: userTakesOver, onKeyDown: userTakesOver, style: { display: "flex", overflowX: "auto", scrollSnapType: "x mandatory", width: "100%" }, children: pages.map((pg, i2) => /* @__PURE__ */ jsx9("div", { style: { minWidth: "100%", scrollSnapAlign: "start" }, children: renderNode(pg, ctx) }, pg?.id ?? i2)) }),
|
|
122211
|
+
count2 > 1 && /* @__PURE__ */ jsx9("div", { style: { display: "flex", gap: 6, justifyContent: "center", marginTop: 10 }, children: pages.map((_2, i2) => /* @__PURE__ */ jsx9("span", { style: { width: i2 === index ? 18 : 7, height: 7, borderRadius: 999, background: i2 === index ? C2("accentPrimary", "#116DFF") : C2("border", "#ccc") } }, i2)) })
|
|
122212
|
+
]
|
|
122213
|
+
}
|
|
122214
|
+
);
|
|
122215
|
+
});
|
|
122216
|
+
BannerNode = withExtras("BannerNode", ({ props, ctx, wrap }) => {
|
|
122217
|
+
const C2 = ctx.color;
|
|
122218
|
+
const [dismissed, setDismissed] = React8.useState(false);
|
|
122219
|
+
if (dismissed) return null;
|
|
122220
|
+
const accent = sevColor(ctx, props.severity ?? "info");
|
|
122221
|
+
return /* @__PURE__ */ jsxs6("div", { style: { display: "flex", gap: 11, width: "100%", boxSizing: "border-box", borderRadius: ctx.radius("md", 10), padding: 13, background: `color-mix(in srgb, ${accent} 12%, ${C2("surfacePrimary", "#fff")})`, border: `1px solid color-mix(in srgb, ${accent} 32%, transparent)`, ...wrap }, children: [
|
|
122222
|
+
/* @__PURE__ */ jsx9("div", { style: { width: 3, borderRadius: 3, background: accent, flex: "none" } }),
|
|
122223
|
+
/* @__PURE__ */ jsxs6("div", { style: props.dismissible === true ? { flex: 1, minWidth: 0 } : void 0, children: [
|
|
122224
|
+
/* @__PURE__ */ jsx9("div", { style: { fontFamily: bodyFont(ctx), fontWeight: 600, fontSize: pxToRem(14), color: C2("textPrimary", "#111") }, children: txt(props.title, ctx) }),
|
|
122225
|
+
props.message && /* @__PURE__ */ jsx9("div", { style: { fontFamily: bodyFont(ctx), fontSize: pxToRem(13), lineHeight: 1.4, color: C2("textSecondary", "#666"), marginTop: 2 }, children: txt(props.message, ctx) }),
|
|
122226
|
+
actionTextButton(ctx, props.action, asBoundText(props.actionLabel, ctx) || "Take action", C2("textPrimary", "#111"), { marginTop: 7, textDecoration: "underline" })
|
|
122227
|
+
] }),
|
|
122228
|
+
props.dismissible === true && /* @__PURE__ */ jsx9(
|
|
122229
|
+
"button",
|
|
122230
|
+
{
|
|
122231
|
+
type: "button",
|
|
122232
|
+
"data-testid": "banner-dismiss",
|
|
122233
|
+
"aria-label": "Dismiss",
|
|
122234
|
+
onClick: (e2) => {
|
|
122235
|
+
e2.stopPropagation();
|
|
122236
|
+
setDismissed(true);
|
|
122237
|
+
},
|
|
122238
|
+
style: { flex: "none", alignSelf: "flex-start", appearance: "none", WebkitAppearance: "none", border: "none", background: "transparent", padding: 0, minWidth: 24, minHeight: 24, display: "grid", placeItems: "center", color: C2("textSecondary", "#666"), fontSize: pxToRem(16), lineHeight: 1, cursor: "pointer" },
|
|
122239
|
+
children: /* @__PURE__ */ jsx9("span", { "aria-hidden": "true", children: "\u2715" })
|
|
122240
|
+
}
|
|
122241
|
+
)
|
|
122242
|
+
] });
|
|
122243
|
+
});
|
|
121839
122244
|
CollapsingHeaderNode = withExtras("CollapsingHeaderNode", ({ props, ctx, wrap }) => {
|
|
121840
122245
|
const C2 = ctx.color;
|
|
121841
122246
|
const items = Array.isArray(props.children) ? props.children : [];
|
|
121842
122247
|
const boundImageUrl = useResolvedScalar(props.imageUrl != null && isBinding(props.imageUrl) ? props.imageUrl : void 0, ctx);
|
|
121843
122248
|
const rawImageUrl = props.imageUrl != null && isBinding(props.imageUrl) ? boundImageUrl : props.imageUrl;
|
|
121844
|
-
const
|
|
121845
|
-
|
|
121846
|
-
|
|
121847
|
-
|
|
121848
|
-
|
|
121849
|
-
|
|
122249
|
+
const heroSrc = typeof rawImageUrl === "string" && rawImageUrl !== "" ? rawImageUrl : typeof props.imageAsset === "string" && isWebAssetPath(props.imageAsset) ? props.imageAsset : void 0;
|
|
122250
|
+
const resolvedHero = heroSrc ? resolveAssetUrl(heroSrc, ctx.assetBaseUrl) : void 0;
|
|
122251
|
+
const [failedHero, setFailedHero] = React8.useState(null);
|
|
122252
|
+
const imageUrl = resolvedHero && resolvedHero !== failedHero ? resolvedHero : void 0;
|
|
122253
|
+
const expanded = Math.min(props.expandedHeight ?? 120, 160);
|
|
122254
|
+
const collapsed = Math.max(0, Math.min(expanded, typeof props.collapsedHeight === "number" && props.collapsedHeight > 0 ? props.collapsedHeight : 64));
|
|
122255
|
+
const parallax = typeof props.parallaxFactor === "number" && Number.isFinite(props.parallaxFactor) ? Math.max(0, Math.min(1, props.parallaxFactor)) : 0.5;
|
|
122256
|
+
const span = Math.max(1, expanded - collapsed);
|
|
122257
|
+
const rootRef = React8.useRef(null);
|
|
122258
|
+
const [offset, setOffset] = React8.useState(0);
|
|
122259
|
+
React8.useEffect(() => {
|
|
122260
|
+
const el2 = rootRef.current;
|
|
122261
|
+
const win = el2?.ownerDocument?.defaultView;
|
|
122262
|
+
if (!el2 || !win) return;
|
|
122263
|
+
let port = collapsingScrollPort(el2);
|
|
122264
|
+
const measure2 = () => {
|
|
122265
|
+
const top = port ? port.getBoundingClientRect().top : 0;
|
|
122266
|
+
const next = Math.max(0, Math.round(top - el2.getBoundingClientRect().top));
|
|
122267
|
+
setOffset((prev) => prev === next ? prev : next);
|
|
122268
|
+
};
|
|
122269
|
+
const onScroll = (e2) => {
|
|
122270
|
+
const t2 = e2.target;
|
|
122271
|
+
if (t2 && t2.nodeType === 1 && t2 !== el2 && t2.contains(el2)) port = t2;
|
|
122272
|
+
measure2();
|
|
122273
|
+
};
|
|
122274
|
+
measure2();
|
|
122275
|
+
win.addEventListener("scroll", onScroll, { capture: true, passive: true });
|
|
122276
|
+
win.addEventListener("resize", measure2);
|
|
122277
|
+
return () => {
|
|
122278
|
+
win.removeEventListener("scroll", onScroll, { capture: true });
|
|
122279
|
+
win.removeEventListener("resize", measure2);
|
|
122280
|
+
};
|
|
122281
|
+
}, []);
|
|
122282
|
+
const progress = Math.min(1, offset / span);
|
|
122283
|
+
const height = Math.round(expanded - (expanded - collapsed) * progress);
|
|
122284
|
+
const lost = expanded - height;
|
|
122285
|
+
const fade = 1 - progress * 0.7;
|
|
122286
|
+
return /* @__PURE__ */ jsxs6("div", { ref: rootRef, ...{ [A11Y_PART]: "root" }, style: { width: "100%", ...wrap }, children: [
|
|
122287
|
+
/* @__PURE__ */ jsxs6("div", { "data-collapse-progress": progress.toFixed(2), style: { position: "sticky", top: 0, zIndex: 1, height, borderRadius: ctx.radius("md", 10), overflow: "hidden", background: imageUrl ? C2("surfaceSecondary", "#eef1f5") : `linear-gradient(135deg, ${C2("accentPrimary", "#116DFF")}, ${C2("accentSecondary", "#0E5FE3")})` }, children: [
|
|
122288
|
+
imageUrl && /* @__PURE__ */ jsx9("img", { src: imageUrl, alt: "", "data-testid": "collapsing-header-image", onError: () => setFailedHero(imageUrl), style: { position: "absolute", left: 0, top: 0, width: "100%", height: expanded, objectFit: "cover", ...lost > 0 ? { transform: `translateY(${-Math.round(lost * (1 - parallax))}px)` } : {} } }),
|
|
122289
|
+
imageUrl && /* @__PURE__ */ jsx9("div", { "data-testid": "collapsing-header-scrim", "aria-hidden": "true", style: { position: "absolute", left: 0, right: 0, bottom: 0, height: "60%", background: "linear-gradient(to bottom, rgba(0,0,0,0), rgba(0,0,0,0.45))", pointerEvents: "none", ...progress > 0 ? { opacity: fade } : {} } }),
|
|
122290
|
+
/* @__PURE__ */ jsxs6("div", { style: { position: "absolute", left: 14, bottom: 12, color: "#fff", textShadow: "0 1px 4px rgba(0,0,0,.5)", ...progress > 0 ? { opacity: fade } : {} }, children: [
|
|
121850
122291
|
/* @__PURE__ */ jsx9("div", { ...{ [A11Y_PART]: "node" }, role: "heading", "aria-level": 2, style: { fontFamily: ctx.font("title1").family || ctx.idiom && ctx.idiom !== "base" ? fontStack(ctx.font("title1").family, ctx.idiom) : '"Wix Madefor Display", system-ui', fontWeight: 700, fontSize: pxToRem(20) }, children: txt(props.title, ctx) }),
|
|
121851
122292
|
props.subtitle && /* @__PURE__ */ jsx9("div", { style: { fontSize: pxToRem(13), opacity: 0.9 }, children: txt(props.subtitle, ctx) })
|
|
121852
122293
|
] })
|
|
121853
122294
|
] }),
|
|
122295
|
+
lost > 0 && /* @__PURE__ */ jsx9("div", { "aria-hidden": "true", style: { height: lost } }),
|
|
121854
122296
|
items.length > 0 && /* @__PURE__ */ jsx9("div", { style: { paddingTop: 12 }, children: kids2(items, ctx) })
|
|
121855
122297
|
] });
|
|
121856
122298
|
});
|
|
@@ -144075,23 +144517,23 @@ var init_preview_assets_generated = __esm({
|
|
|
144075
144517
|
"../../packages/serve/src/preview-assets.generated.ts"() {
|
|
144076
144518
|
init_preview_assets_format();
|
|
144077
144519
|
PREVIEW_ASSET_MANIFEST = [
|
|
144078
|
-
{ key: "assets/index-
|
|
144079
|
-
{ key: "assets/pdf.worker.min-BmVo14Nb.mjs", contentType: "application/octet-stream", offset:
|
|
144080
|
-
{ key: "assets/pdfDocument-
|
|
144081
|
-
{ key: "fonts/Roboto-LICENSE.txt", contentType: "application/octet-stream", offset:
|
|
144082
|
-
{ key: "fonts/Roboto-Variable.ttf", contentType: "font/ttf", offset:
|
|
144083
|
-
{ key: "fonts/WixMadeforDisplay-Bold.ttf", contentType: "font/ttf", offset:
|
|
144084
|
-
{ key: "fonts/WixMadeforDisplay-ExtraBold.ttf", contentType: "font/ttf", offset:
|
|
144085
|
-
{ key: "fonts/WixMadeforDisplay-Medium.ttf", contentType: "font/ttf", offset:
|
|
144086
|
-
{ key: "fonts/WixMadeforDisplay-Regular.ttf", contentType: "font/ttf", offset:
|
|
144087
|
-
{ key: "fonts/WixMadeforDisplay-SemiBold.ttf", contentType: "font/ttf", offset:
|
|
144088
|
-
{ key: "fonts/WixMadeforText-Bold.ttf", contentType: "font/ttf", offset:
|
|
144089
|
-
{ key: "fonts/WixMadeforText-ExtraBold.ttf", contentType: "font/ttf", offset:
|
|
144090
|
-
{ key: "fonts/WixMadeforText-Medium.ttf", contentType: "font/ttf", offset:
|
|
144091
|
-
{ key: "fonts/WixMadeforText-Regular.ttf", contentType: "font/ttf", offset:
|
|
144092
|
-
{ key: "fonts/WixMadeforText-SemiBold.ttf", contentType: "font/ttf", offset:
|
|
144093
|
-
{ key: "index.html", contentType: "text/html; charset=utf-8", offset:
|
|
144094
|
-
{ key: "t5-frame.html", contentType: "text/html; charset=utf-8", offset:
|
|
144520
|
+
{ key: "assets/index-2Jy1koGv.js", contentType: "application/javascript; charset=utf-8", offset: 8, length: 1212435, sha256: "6c6c56c9cd68ffb5a1510ec89e31b9cae20faada876179d6c481f0b7971ac213" },
|
|
144521
|
+
{ key: "assets/pdf.worker.min-BmVo14Nb.mjs", contentType: "application/octet-stream", offset: 1212443, length: 1317034, sha256: "a33cfe728c584fdba4fcc1fd54bcdc2f9f2f13889ddbb5b2bd1d0f8cbe49b84e" },
|
|
144522
|
+
{ key: "assets/pdfDocument-BBBfQkzv.js", contentType: "application/javascript; charset=utf-8", offset: 2529477, length: 489166, sha256: "8f6a97d134261b0cbc4547594c630f33af757331f25f2e10cff06928741dc198" },
|
|
144523
|
+
{ key: "fonts/Roboto-LICENSE.txt", contentType: "application/octet-stream", offset: 3018643, length: 4610, sha256: "994062dd7af4186a739de55dd9e151c63b6301f8e2cbafc608d35c2e87da0cd2" },
|
|
144524
|
+
{ key: "fonts/Roboto-Variable.ttf", contentType: "font/ttf", offset: 3023253, length: 488584, sha256: "d7598e12c5dbef095ff8272cfc55da0250bd07fbdecbac8a530b9b277872a134" },
|
|
144525
|
+
{ key: "fonts/WixMadeforDisplay-Bold.ttf", contentType: "font/ttf", offset: 3511837, length: 90924, sha256: "ec4c7d63772d980d6e147b2df6215fd2737e4b04cebe0cf7e11dc695fb63cdcf" },
|
|
144526
|
+
{ key: "fonts/WixMadeforDisplay-ExtraBold.ttf", contentType: "font/ttf", offset: 3602761, length: 90984, sha256: "bf4c16a2774edd38a921edf3099469866cd74c094fd596f3fa4e81f54a04dfaa" },
|
|
144527
|
+
{ key: "fonts/WixMadeforDisplay-Medium.ttf", contentType: "font/ttf", offset: 3693745, length: 90980, sha256: "368faca44fb9f7207e4af784e94750b1ee59c1098b8689e0f4a918926f244fb5" },
|
|
144528
|
+
{ key: "fonts/WixMadeforDisplay-Regular.ttf", contentType: "font/ttf", offset: 3784725, length: 90872, sha256: "97ed8f1a6772abe26e3d8af5cecfc4b02faa94497d585b0398b5053b739a70c1" },
|
|
144529
|
+
{ key: "fonts/WixMadeforDisplay-SemiBold.ttf", contentType: "font/ttf", offset: 3875597, length: 90980, sha256: "642feab8a48ddf6c7a89d7c2a7c0edfa0e6e773f671287e460e222703563191e" },
|
|
144530
|
+
{ key: "fonts/WixMadeforText-Bold.ttf", contentType: "font/ttf", offset: 3966577, length: 108636, sha256: "37c179b4fefb63ea9637322b84583a2df53aa226c150294eea1675c14b1b8e29" },
|
|
144531
|
+
{ key: "fonts/WixMadeforText-ExtraBold.ttf", contentType: "font/ttf", offset: 4075213, length: 109084, sha256: "62e2fe4718129f36ecdb0ae4de385bd6b81ecc876146447167c6c140fad699a9" },
|
|
144532
|
+
{ key: "fonts/WixMadeforText-Medium.ttf", contentType: "font/ttf", offset: 4184297, length: 109048, sha256: "4ecf270136af928612c76fe4ebade91d8156975e5ea4c0cf9225501dd1788e02" },
|
|
144533
|
+
{ key: "fonts/WixMadeforText-Regular.ttf", contentType: "font/ttf", offset: 4293345, length: 107700, sha256: "dee56f09fd3efc127c1ea95557edc74110c1460a46287da36e0af25efd341ef5" },
|
|
144534
|
+
{ key: "fonts/WixMadeforText-SemiBold.ttf", contentType: "font/ttf", offset: 4401045, length: 88108, sha256: "dced97a77624bc5f8b1ae65850360908297f4588e09feb6f22792d29dc7e765b" },
|
|
144535
|
+
{ key: "index.html", contentType: "text/html; charset=utf-8", offset: 4489153, length: 4947, sha256: "f4049083ac15256bb1621032f8b08be8cafcc608afb31472d86df1904237c455" },
|
|
144536
|
+
{ key: "t5-frame.html", contentType: "text/html; charset=utf-8", offset: 4494100, length: 17344, sha256: "d057298d75e7373e5e2c4d11b7d1bcbea88e03af555ba63d97641c78509c58e4" }
|
|
144095
144537
|
];
|
|
144096
144538
|
}
|
|
144097
144539
|
});
|
|
@@ -149040,6 +149482,96 @@ var init_notify = __esm({
|
|
|
149040
149482
|
}
|
|
149041
149483
|
});
|
|
149042
149484
|
|
|
149485
|
+
// src/base44-auth-check.ts
|
|
149486
|
+
var base44_auth_check_exports = {};
|
|
149487
|
+
__export(base44_auth_check_exports, {
|
|
149488
|
+
checkBase44NativeAuth: () => checkBase44NativeAuth
|
|
149489
|
+
});
|
|
149490
|
+
async function checkBase44NativeAuth(options) {
|
|
149491
|
+
const tenant = base44TenantUrl(options.url);
|
|
149492
|
+
const ios = options.iosAppId;
|
|
149493
|
+
const pkg = options.androidPackage;
|
|
149494
|
+
const fingerprint = options.androidSha256?.toUpperCase();
|
|
149495
|
+
if (!ios && !pkg) throw new Error("auth-check needs --ios-app-id <PREFIX.bundle.id> and/or --android-package <package> --android-sha256 <fingerprint>");
|
|
149496
|
+
if (ios && !/^[A-Z0-9]{10}\.[a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]+)+$/.test(ios)) throw new Error("--ios-app-id must be the signed app's application-identifier (PREFIX.bundle.id)");
|
|
149497
|
+
if (Boolean(pkg) !== Boolean(fingerprint)) throw new Error("--android-package and --android-sha256 must be supplied together");
|
|
149498
|
+
if (pkg && !/^[a-zA-Z][a-zA-Z0-9_]*(?:\.[a-zA-Z][a-zA-Z0-9_]*)+$/.test(pkg)) throw new Error("invalid --android-package");
|
|
149499
|
+
if (fingerprint && !/^(?:[A-F0-9]{2}:){31}[A-F0-9]{2}$/.test(fingerprint)) throw new Error("--android-sha256 must be the signing certificate's colon-separated SHA-256 fingerprint");
|
|
149500
|
+
const fetchImpl = options.fetchImpl ?? fetch;
|
|
149501
|
+
const requiredDocuments = {
|
|
149502
|
+
...ios ? { "apple-app-site-association": {
|
|
149503
|
+
webcredentials: { apps: [ios] },
|
|
149504
|
+
applinks: { apps: [], details: [{ appID: ios, paths: ["/"] }] }
|
|
149505
|
+
} } : {},
|
|
149506
|
+
...pkg ? { "assetlinks.json": [{
|
|
149507
|
+
relation: ["delegate_permission/common.handle_all_urls"],
|
|
149508
|
+
target: { namespace: "android_app", package_name: pkg, sha256_cert_fingerprints: [fingerprint] }
|
|
149509
|
+
}] } : {}
|
|
149510
|
+
};
|
|
149511
|
+
const checks = [];
|
|
149512
|
+
async function document2(name) {
|
|
149513
|
+
const url = new URL(`/.well-known/${name}`, tenant).href;
|
|
149514
|
+
const response = await fetchImpl(url, { redirect: "manual", signal: AbortSignal.timeout(15e3), headers: { Accept: "application/json" } });
|
|
149515
|
+
if (!response.ok) throw new Error(`HTTP ${response.status} (association files must be served directly)`);
|
|
149516
|
+
const body = await response.text();
|
|
149517
|
+
if (body.length > 1e6) throw new Error("association file is too large");
|
|
149518
|
+
return JSON.parse(body);
|
|
149519
|
+
}
|
|
149520
|
+
if (ios) {
|
|
149521
|
+
const missing = [];
|
|
149522
|
+
try {
|
|
149523
|
+
const aasa = await document2("apple-app-site-association");
|
|
149524
|
+
if (!Array.isArray(aasa?.webcredentials?.apps) || !aasa.webcredentials.apps.includes(ios)) missing.push(`webcredentials.apps must include ${ios}`);
|
|
149525
|
+
const details = aasa?.applinks?.details;
|
|
149526
|
+
const permitsRoot = (() => {
|
|
149527
|
+
for (const entry of Array.isArray(details) ? details : []) {
|
|
149528
|
+
if (entry?.appID !== ios && !(Array.isArray(entry?.appIDs) && entry.appIDs.includes(ios))) continue;
|
|
149529
|
+
if (Array.isArray(entry.components)) {
|
|
149530
|
+
const root2 = entry.components.find((c2) => c2 && typeof c2 === "object" && !Array.isArray(c2) && ["/", "/*", "*"].includes(c2["/"] ?? "*") && (c2["#"] === void 0 || typeof c2["#"] === "string" && /^\**$/.test(c2["#"])));
|
|
149531
|
+
if (!root2) continue;
|
|
149532
|
+
return root2.exclude !== true && root2["?"] === void 0;
|
|
149533
|
+
}
|
|
149534
|
+
const root = Array.isArray(entry.paths) && entry.paths.find((p2) => typeof p2 === "string" && ["/", "/*", "*", "NOT /", "NOT /*", "NOT *"].includes(p2));
|
|
149535
|
+
if (typeof root !== "string") continue;
|
|
149536
|
+
return !root.startsWith("NOT ");
|
|
149537
|
+
}
|
|
149538
|
+
return false;
|
|
149539
|
+
})();
|
|
149540
|
+
if (!permitsRoot) missing.push(`applinks.details must allow / for ${ios} (required by the older-iOS fallback)`);
|
|
149541
|
+
} catch (error) {
|
|
149542
|
+
missing.push(error instanceof Error ? error.message : String(error));
|
|
149543
|
+
}
|
|
149544
|
+
checks.push({ platform: "ios", url: new URL("/.well-known/apple-app-site-association", tenant).href, ok: missing.length === 0, missing });
|
|
149545
|
+
}
|
|
149546
|
+
if (pkg) {
|
|
149547
|
+
const missing = [];
|
|
149548
|
+
try {
|
|
149549
|
+
const links = await document2("assetlinks.json");
|
|
149550
|
+
const matches = Array.isArray(links) && links.some((entry) => Array.isArray(entry?.relation) && entry.relation.includes("delegate_permission/common.handle_all_urls") && entry?.target?.namespace === "android_app" && entry.target.package_name === pkg && Array.isArray(entry.target.sha256_cert_fingerprints) && entry.target.sha256_cert_fingerprints.some((f2) => typeof f2 === "string" && f2.toUpperCase() === fingerprint));
|
|
149551
|
+
if (!matches) missing.push(`assetlinks must authorize ${pkg} with the supplied signing certificate and common.handle_all_urls`);
|
|
149552
|
+
} catch (error) {
|
|
149553
|
+
missing.push(error instanceof Error ? error.message : String(error));
|
|
149554
|
+
}
|
|
149555
|
+
checks.push({ platform: "android", url: new URL("/.well-known/assetlinks.json", tenant).href, ok: missing.length === 0, missing });
|
|
149556
|
+
}
|
|
149557
|
+
const ok2 = checks.every((check) => check.ok);
|
|
149558
|
+
return {
|
|
149559
|
+
ok: ok2,
|
|
149560
|
+
...!ok2 ? { code: "base44_native_auth_not_ready" } : {},
|
|
149561
|
+
tenantUrl: tenant.origin,
|
|
149562
|
+
callbackHost: tenant.hostname,
|
|
149563
|
+
callbackPath: "/",
|
|
149564
|
+
checks,
|
|
149565
|
+
requiredDocuments,
|
|
149566
|
+
note: "Merge these entries into the tenant's existing association files using Base44's mobile-app configuration. This command is read-only. Passing proves domain configuration; validate Google sign-in and auth.me on the signed native app too."
|
|
149567
|
+
};
|
|
149568
|
+
}
|
|
149569
|
+
var init_base44_auth_check = __esm({
|
|
149570
|
+
"src/base44-auth-check.ts"() {
|
|
149571
|
+
init_scaffold();
|
|
149572
|
+
}
|
|
149573
|
+
});
|
|
149574
|
+
|
|
149043
149575
|
// src/base44-auth.ts
|
|
149044
149576
|
var base44_auth_exports = {};
|
|
149045
149577
|
__export(base44_auth_exports, {
|
|
@@ -162004,10 +162536,11 @@ var USAGE = `himi \u2014 the Himalaya authoring CLI (remote dev loop)
|
|
|
162004
162536
|
create/store or inspect CAPTCHA keys (not login tokens).
|
|
162005
162537
|
Setup needs final --ios-bundle-id / --android-package-name.
|
|
162006
162538
|
|
|
162007
|
-
himi init <name> [--dir <parent>] [--template <t>] [--remote] [--base44-app-id <id>] [--push-setup | --no-push-setup] [--no-agent] [--no-first-look]
|
|
162539
|
+
himi init <name> [--dir <parent>] [--template <t>] [--remote] [--base44-app-id <id>] [--base44-app-url <https://tenant>] [--push-setup | --no-push-setup] [--no-agent] [--no-first-look]
|
|
162008
162540
|
scaffold a starter content package (--template <t> starts
|
|
162009
162541
|
from a reference app; --remote fetches it off the serve plane;
|
|
162010
162542
|
--base44-app-id writes a Base44 app id into a Base44 template
|
|
162543
|
+
--base44-app-url sets the published tenant callback host
|
|
162011
162544
|
such as base44-starter \u2014 himi docs base44-app-to-himi-app),
|
|
162012
162545
|
with the agent files inside it (AGENTS.md, CLAUDE.md, the himalaya
|
|
162013
162546
|
skill, a session-start hook); --no-agent skips them. Also makes
|
|
@@ -162630,6 +163163,10 @@ var USAGE = `himi \u2014 the Himalaya authoring CLI (remote dev loop)
|
|
|
162630
163163
|
himi base44 login [--from-base44-cli] | whoami | logout
|
|
162631
163164
|
the Base44 session, in ~/.himi/base44/ (never the repo).
|
|
162632
163165
|
BASE44_ACCESS_TOKEN wins, for CI.
|
|
163166
|
+
himi base44 auth-check --url <https://tenant> [--ios-app-id <PREFIX.bundle.id>]
|
|
163167
|
+
[--android-package <package> --android-sha256 <fingerprint>]
|
|
163168
|
+
check the public tenant association files for native
|
|
163169
|
+
Google sign-in; print the required entries. READ-ONLY.
|
|
162633
163170
|
himi doctor [--target <t>] [--dpx] [--json]
|
|
162634
163171
|
off-VPN preflight: probe the PUBLIC data plane
|
|
162635
163172
|
(www.wixapis.com), the internal serve/control plane
|
|
@@ -162745,7 +163282,7 @@ WHAT A PATCH DOES NOT CARRY \u2014 all reported in the output, never silent
|
|
|
162745
163282
|
himi docs releasing-with-himi-serve`;
|
|
162746
163283
|
var COMMANDS2 = [
|
|
162747
163284
|
{ name: "captcha", summary: "create and store native CAPTCHA keys in Serve, or inspect setup status; customer setup verifies Wix site ownership; does not enable member CAPTCHA SDKs", required: "setup|status --app <app> [--content <dir>] [--site <msid>] [--ios-bundle-id <id>] [--android-package-name <id>] [--target <t>]" },
|
|
162748
|
-
{ name: "init", summary: "scaffold a starter content package (OTA-only; no native shells). --template <t> starts from a full reference app (branded-lite = consumer storefront over a Wix site; owner-lite = owner CRUD/management) instead of the minimal counter; --templates lists bundled ones; --remote fetches the template off the serve plane (falls back to the bundled copy offline). The new app also gets its agent files (the same set `himi agent-init` writes: AGENTS.md, CLAUDE.md, the himalaya skill, HIMALAYA.md, a SessionStart hook) so the next session started inside it picks the work up; --no-agent skips them. It also makes the build board (.himi/studio/, exactly as `himi studio --no-open` does \u2014 it never opens a browser), so every later render, test, validate, push and progress entry refreshes it; and, for a template bundled with this CLI, it makes the FIRST PICTURE itself (never for a --remote one: that is its publisher's code, and a render runs it on this machine, so next[] leaves the render to the agent after it has read the code): exactly `himi render <homeScreenId> --png --mocks --device iphone` (offline \u2014 no request; never --live; --mocks loads the app's recorded data when it has any), run as a child it kills after a time budget, writing .himi/shots/<home>.png and journaling it (by: himi) as the STARTING POINT (\"Starting point: the <template> template, before any of your changes\") so the board and the journal hold a picture when init returns. init also records the source it wrote (.himi/init-source.json: a content fingerprint, Markdown left out), and the first home PNG render after the source diverges from it is journaled once as \"First look at your app\" \u2014 reported as `firstLook: {image}` or `{skipped: <reason>}`, never a failed init; `--no-first-look` skips it (for scripts and CI that render themselves). For a bundled template (never a --remote one \u2014 the preview would build and serve its publisher's code) init also STARTS the live preview itself: `himi run --watch --content <dir> --port <p> --no-open --idle-exit 30`, detached in its own process group with its output in .himi/watch.log, never waited for (the url is chosen before it builds), recorded in .himi/watch.json, and reported as `watch: {started, pid, url, board, log}` \u2014 or `{skipped: <reason>}` for a `CI` environment, a test runner, a watch already running, or a start that failed (never a failed init). Nothing else skips it: outside CI it is started, and `watch.note` says an opt-out was ignored. The envelope LEADS with `doNow`: three lines to run now (the consent preflight, the live preview \u2014 its url and board when init started it, else `himi run --watch --content <dir> &` with the board's path \u2014 and the postcard line), and ENDS with the same lines as `doNowAgain`, so an agent that reads only the head or only the tail (`| tail`) gets them; at a terminal they are also printed as plain text on stderr, before the JSON and again after it. Its `next[]` LEADS with the steps for THIS session, in this order for every app \u2014 the offline first render and that picture's `himi progress` postcard (only when init could not make the picture), the skill's consent preflight (authorize or mock any Wix or external startup request; with none, go straight on), and only then the live preview (the running one's url, or `himi run --watch &` when init did not start it) \u2014 ahead of the next-session guidance", required: "<name> [--dir] [--template <t>] [--remote] [--base44-app-id <id>] [--no-agent] [--no-first-look] | --templates" },
|
|
163285
|
+
{ name: "init", summary: "scaffold a starter content package (OTA-only; no native shells). --template <t> starts from a full reference app (branded-lite = consumer storefront over a Wix site; owner-lite = owner CRUD/management) instead of the minimal counter; --templates lists bundled ones; --remote fetches the template off the serve plane (falls back to the bundled copy offline). The new app also gets its agent files (the same set `himi agent-init` writes: AGENTS.md, CLAUDE.md, the himalaya skill, HIMALAYA.md, a SessionStart hook) so the next session started inside it picks the work up; --no-agent skips them. It also makes the build board (.himi/studio/, exactly as `himi studio --no-open` does \u2014 it never opens a browser), so every later render, test, validate, push and progress entry refreshes it; and, for a template bundled with this CLI, it makes the FIRST PICTURE itself (never for a --remote one: that is its publisher's code, and a render runs it on this machine, so next[] leaves the render to the agent after it has read the code): exactly `himi render <homeScreenId> --png --mocks --device iphone` (offline \u2014 no request; never --live; --mocks loads the app's recorded data when it has any), run as a child it kills after a time budget, writing .himi/shots/<home>.png and journaling it (by: himi) as the STARTING POINT (\"Starting point: the <template> template, before any of your changes\") so the board and the journal hold a picture when init returns. init also records the source it wrote (.himi/init-source.json: a content fingerprint, Markdown left out), and the first home PNG render after the source diverges from it is journaled once as \"First look at your app\" \u2014 reported as `firstLook: {image}` or `{skipped: <reason>}`, never a failed init; `--no-first-look` skips it (for scripts and CI that render themselves). For a bundled template (never a --remote one \u2014 the preview would build and serve its publisher's code) init also STARTS the live preview itself: `himi run --watch --content <dir> --port <p> --no-open --idle-exit 30`, detached in its own process group with its output in .himi/watch.log, never waited for (the url is chosen before it builds), recorded in .himi/watch.json, and reported as `watch: {started, pid, url, board, log}` \u2014 or `{skipped: <reason>}` for a `CI` environment, a test runner, a watch already running, or a start that failed (never a failed init). Nothing else skips it: outside CI it is started, and `watch.note` says an opt-out was ignored. The envelope LEADS with `doNow`: three lines to run now (the consent preflight, the live preview \u2014 its url and board when init started it, else `himi run --watch --content <dir> &` with the board's path \u2014 and the postcard line), and ENDS with the same lines as `doNowAgain`, so an agent that reads only the head or only the tail (`| tail`) gets them; at a terminal they are also printed as plain text on stderr, before the JSON and again after it. Its `next[]` LEADS with the steps for THIS session, in this order for every app \u2014 the offline first render and that picture's `himi progress` postcard (only when init could not make the picture), the skill's consent preflight (authorize or mock any Wix or external startup request; with none, go straight on), and only then the live preview (the running one's url, or `himi run --watch &` when init did not start it) \u2014 ahead of the next-session guidance", required: "<name> [--dir] [--template <t>] [--remote] [--base44-app-id <id>] [--base44-app-url <https://tenant>] [--no-agent] [--no-first-look] | --templates" },
|
|
162749
163286
|
{ name: "template", summary: "starter-template catalog + publishing. Every template is a SHOWCASE APP \u2014 a real published release you can open running before you start from it. `list` prints available templates with metadata (title/description/tags) plus each one's start prompt \u2014 pass --remote to include the serve-plane catalog so an agent can pick one; `prompt <name>` prints just that sentence for one template (the skill URL is the public door, or the plane named by --target/--serve-url); `publish` publishes an app AS a `himi init --template` (needs a himalaya.template.json; builds a previewable release + attaches the scaffold source; --source-dir overrides which tree becomes the source, --name sets the template name; bakes a launcher icon \u2014 --icon <png>, or the committed template-icons/<name>.png \u2014 and extracts accent/palette gallery meta from the scaffold's tokens.json; --visibility unlisted keeps it out of the /v1/templates catalog \u2014 templates default to public); `trim --keep <ids>` cuts an app scaffolded from a template down to those screens (the home, and any screen the navigation pins such as a drawer body, always stays) \u2014 it deletes the other SCREENS/TEMPLATED entries whole, prunes navigation (linkableScreens, tabBar, drawer, deep links, surfaces) and drops tier5-src workers no kept screen uses, then runs validate --strict and rolls everything back if it fails (--force keeps it, --dry-run writes nothing). A kept screen that links to a removed one is refused unless --links follow (keep those too) or --links drop (remove the taps). Adopting one: `inspect` writes the adoption inventory (.himi/adopt.json: screens, workers, which screens can call Wix/network on appear \u2014 bootsOffline \u2014 placeholder and sample copy, proposed Data access rows, typed-journey stubs); `screens` lists, shows, rewrites or adds ONE dev/index.ts entry; `sweep` replaces sample identity/copy inside string literals; `recommend` ranks the catalog for a business description or a site's verticals; `trim --from-spec` takes the kept screens from SPEC.md's Screen catalogue", required: "list [--remote] | prompt <name> | publish [--dir <app>] [--source-dir <dir>] [--name <n>] [--icon <png>] [--visibility public|unlisted] [--target <t>] | trim --keep <id,id,\u2026>|--from-spec [SPEC.md] [--content <dir>] [--links follow|drop] [--dry-run] [--force] | inspect [--content <dir>] [--dry-run] | screens [--show <id>] [--write <id> --from <file>] [--add <id> --from <file>] | sweep --set 'Old=>New' | --map <file> [--dry-run] | recommend [--text <t>] [--verticals a,b] [--book <dir>] [--remote]" },
|
|
162750
163287
|
{ name: "build", summary: "compile tier5-src/<name>/index.ts -> dist/bundles/<name>.bundle.js with esbuild (--binary = resolve published @himalaya/*); semantic TypeScript checking belongs to himi validate", required: "[--content <dir>] [--binary]" },
|
|
162751
163288
|
{ name: "functions", summary: "inspect/invoke server functions and operate durable jobs or schedules", required: "list|describe|openapi|invoke | jobs list|get|cancel|retry|dlq | schedule describe|invoke [--app <a>] [--environment preview|production] [--release <id>]" },
|
|
@@ -162764,7 +163301,7 @@ var COMMANDS2 = [
|
|
|
162764
163301
|
{ name: "logout", summary: "remove the stored control token for a target", required: "[--target <t>]" },
|
|
162765
163302
|
{ name: "notify", summary: "Hosted --all-members requires --yes for a live send; --dry-run checks ownership/readiness and counts approved recipients without sending. `setup` optionally configures Branded/Ping from local customer key files; `status --refresh` reads live backend readiness. Setup may be deferred while building. These use serve-control and require owner plus Wix account authentication. `send`, `tokens`, `doctor`: send a REAL push notification to registered devices (RFC 0036 WS5) \u2014 APNs .p8 over HTTP/2 for iOS, FCM v1 for Android. `send` targets one device (--token / --device <registry id>) or fans out to the whole app (--all), reporting a per-device result; a token the provider says is uninstalled (APNs 410 Unregistered / FCM UNREGISTERED) is auto-disabled, while a merely wrong one (BadDeviceToken \u2014 usually a sandbox/production mismatch) is recorded and left enabled. `tokens` lists the registry. `doctor` reports which credentials resolve and which sender each platform picks. Talks to the admin-server via --admin-url/HIMALAYA_ADMIN_URL, authenticated with --admin-session/HIMALAYA_ADMIN_SESSION. `send --provider ping` is the hosted alternative: the serve plane sends to one site member (--member-email) or all approved members (--all-members) through Ping as Himalaya, with owner login instead of provider keys, and reports acceptance, never delivery. NOT `himi push`, which publishes a release.", required: "setup|status [--content <dir>] [--target <t>] [--refresh] [--yes] [--no-push-setup] | send --provider ping [--content <dir>] [--app <a>] [--site <msid>] (--member-email <email> | --all-members (--dry-run | --yes)) --title <s> [--body <s>] --link <url> [--request-id <uuid>] [--dry-run] [--json] | send|tokens|doctor [--app <a>] [--token <t> | --device <id> | --all] [--title <s>] [--body <s>] [--link <url>] [--platform ios|android] [--badge <n>] [--channel <id>] [--silent] [--dry-run] [--json]" },
|
|
162766
163303
|
{ name: "site", summary: "PROVISION a Wix project, then analyze or extend it. `create` is the one door that makes a site instead of adopting one: POST /funnel/projects/v1/create (a WIX site, a HEADLESS backend, a BRANDED_APP, or a VIBE site), and for headless it also mints the OAuth app whose id IS the `WIX_CLIENT_ID` \u2014 with --redirect-uri already registered, because an unregistered redirect makes native signInDirect fail at redirect-session. `--verticals` REQUIRES `--template` and reports only what Wix confirmed: measured, installing onto a project created from the BLANK template returns 200 while the vertical's API answers 428 forever, because there is no site for it to attach to (the install asks for CREATE_SITE). A real template ships its verticals installed and populated, and installing further ones onto it then works. It MUTATES your Wix account and needs --yes; without it you get the payload and nothing is sent. `list` is the read-only site inventory (with each site's premium flag, which is what explains an installed-but-428 vertical). Auth is the account-scoped `wix token` (no --site), falling back to WIX_API_KEY + WIX_ACCOUNT_ID. `client` is the same OAuth step for a site that ALREADY exists \u2014 the one himi adopts rather than makes \u2014 so a clientId no longer means a manual trip to the dashboard: `client ensure` reconciles rather than mints, because a site can already carry a client with NO registered redirect and shipping that one fails signInDirect at runtime; it reuses a client that carries --redirect-uri, PATCHes one that matches --name but lacks it (unioning, so another app's redirect survives), and creates only when there is nothing to reuse (--new forces a fresh one). --name IS the idempotency key. `client` auth is SITE-scoped (`wix token --site <msid>`) because minting is owner-of-that-site, and --yes gates every mutation: a site that already has a usable client resolves WITHOUT it, but --write-provisioning needs --yes even then because it rewrites a manifest on disk (the dry run's planned.provisioning names the file). That query endpoint IGNORES paging (measured: query.paging, cursorPaging and a top-level paging all return the full set at offset 0), so when pagingMetadata reports more clients than came back, `ensure` REFUSES EVERY outcome \u2014 create, patch AND reuse. Reuse is refused too because pickClient breaks ties on the OLDEST createdDate, so an omitted older same-named MOBILE client with the same redirect would win a later complete read and the resolved clientId would MOVE between runs \u2014 and it gets written into provisioning.json; convergence is what makes a stray duplicate untidy rather than harmful. --name cannot narrow the query (no filter is sent; the name is applied to the rows after they arrive), so the recovery is the dashboard; --new skips the query entirely. A `patched` result is verified against what Wix STORED \u2014 the redirect list is read off the PATCH response, and re-read via GET when the response omits it, because falling back to the list himi just sent would make the guard pass vacuously on exactly the silent no-op it exists to catch. `client list` is the read-only inventory of a site's clients: act on its `shippable` column rather than `hasRedirect`, because shippable ALSO requires a MOBILE applicationType and `ensure` refuses a WEB client \u2014 a WEB one carrying your redirect looks right and is not a candidate \u2014 and it sets truncated:true rather than presenting a partial inventory as the whole one. `analyze --read-only` returns API-only generation context as JSON (identity, access probes, CMS permissions and selected redacted Velo source); it needs no URL/browser and never uploads or applies anything. `analyze` reads a site into a business-book folder (REST + Playwright, GET-only); `--url` alone is the visitor-only pass over the published pages, and `--client-id` adds the vertical probes and the app binding `--apply` requires; `site function` list/get/put/publish/invokes that site's Velo HTTP functions and is not `himi functions` (serve-plane jobs). `--apply` bakes into a brandable shell (a site shell needs no `--client-id`: it is visitor-only and binds no client); `--shell` takes the same names `himi dist --shell` does and defaults to branded-lite, and a shell that ships no prepare:customer is refused by name rather than half-built. `--shell brandy` (the site shell, RFC 0062) also derives the site's page map from its published pages and header menu \u2014 Home first, up to four tabs for the pages a visitor returns to, the rest in the drawer \u2014 into the overlay's `site` block, so it can be edited before `--apply`; only a site shell ever receives that block. It never overwrites any shell's committed apps/<shell>/provisioning.json.", required: "create <name> [--type wix|headless|branded-app|vibe] [--template <guid>] [--verticals stores,bookings,\u2026] [--folder <guid>] [--redirect-uri <uri>] [--no-oauth-app] [--write-provisioning [path]] [--site-url <url>] [--json] --yes | list | client ensure|list --site <msid> [--name <name>] [--redirect-uri <uri>] [--new] [--write-provisioning [path]] [--site-url <url>] [--json] --yes | analyze --read-only [--site <msid>] [--client-id <id>] [--json] | analyze --url <https> [--client-id <id>] [--site <msid>] [--out <dir>] [--redirect-uri <uri>] [--apply] [--shell " + SHELL_ENUM + "] | function list|get|put|publish|invoke [--site <msid>] [--url <https>] [--method GET|POST|PUT|DELETE] [--source <file>] [--body <json>] [--publish] [--invoke]" },
|
|
162767
|
-
{ name: "base44", summary: "read a BASE44 app into an app book (book.json + BOOK.md) for the agent building a Himi app from it \u2014 the Base44 counterpart of `site analyze`, READ-ONLY. `analyze --url <published app>` is the VISITOR pass: the app id, name, favicon and colours from the published SPA, its router paths, and screenshots + look tokens from the Playwright crawl. `analyze --app-id <id>` adds the OWNER pass and needs a session: the project source under <out>/source/ (the read half of `base44 eject` \u2014 GET api/apps/<id>/eject \u2014 through the same deny-list and secret scan `himi push` uses, widened by the book's token shapes; `eject` itself is never run because it CREATES a copy of the app), every entity's JSON schema, required fields and RLS rules with up to --sample redacted rows (default 5, 0 = off), backend functions, agents, connectors (names and scopes only, never tokens), secret NAMES (never values), auth visibility + providers, and the route \u2192 component \u2192 entities map from the source router. Every chapter it could not read is listed in `gaps` rather than failing the run. `login` runs Base44's device sign-in and stores the session in ~/.himi/base44/session.json (never the repo; --from-base44-cli imports `npx base44 login`'s session instead); BASE44_ACCESS_TOKEN in the environment wins, for CI. `whoami` prints who is signed in (never the token); `logout` removes the stored session. --json prints the book itself. himi docs base44-app-context", required: "analyze (--url <https://\u2026> | --app-id <id>) [--out .himi/base44-book] [--sample <n>] [--json] | login [--from-base44-cli] | whoami | logout" },
|
|
163304
|
+
{ name: "base44", summary: "read a BASE44 app into an app book (book.json + BOOK.md) for the agent building a Himi app from it \u2014 the Base44 counterpart of `site analyze`, READ-ONLY. `analyze --url <published app>` is the VISITOR pass: the app id, name, favicon and colours from the published SPA, its router paths, and screenshots + look tokens from the Playwright crawl. `analyze --app-id <id>` adds the OWNER pass and needs a session: the project source under <out>/source/ (the read half of `base44 eject` \u2014 GET api/apps/<id>/eject \u2014 through the same deny-list and secret scan `himi push` uses, widened by the book's token shapes; `eject` itself is never run because it CREATES a copy of the app), every entity's JSON schema, required fields and RLS rules with up to --sample redacted rows (default 5, 0 = off), backend functions, agents, connectors (names and scopes only, never tokens), secret NAMES (never values), auth visibility + providers, and the route \u2192 component \u2192 entities map from the source router. Every chapter it could not read is listed in `gaps` rather than failing the run. `login` runs Base44's device sign-in and stores the session in ~/.himi/base44/session.json (never the repo; --from-base44-cli imports `npx base44 login`'s session instead); BASE44_ACCESS_TOKEN in the environment wins, for CI. `whoami` prints who is signed in (never the token); `logout` removes the stored session. `auth-check --url <tenant> --ios-app-id <PREFIX.bundle.id>` and/or `--android-package <package> --android-sha256 <fingerprint>` checks public native-login associations and prints missing entries; it never reads an owner token. --json prints the book itself. himi docs base44-app-context", required: "analyze (--url <https://\u2026> | --app-id <id>) [--out .himi/base44-book] [--sample <n>] [--json] | login [--from-base44-cli] | whoami | logout | auth-check --url <https://tenant> [--ios-app-id <PREFIX.bundle.id>] [--android-package <package> --android-sha256 <fingerprint>]" },
|
|
162768
163305
|
{ name: "doctor", summary: 'off-VPN preflight in one shot: probe the PUBLIC data plane (www.wixapis.com \u2014 reachable off-VPN), the INTERNAL serve/control plane for the selected target (VPN-gated), and report auth state (dpx session on disk + stored control token). --dpx additionally runs a live, EADDRINUSE-safe `dpx whoami`. Machine-readable with --json (an unreachable internal plane carries a stable code:"needs_vpn" so an agent branches on the code, not the prose); human-readable otherwise. Never loads the authoring runtime \u2014 works off-repo.', required: "[--target <t>] [--dpx] [--json] [--data-url <url>] [--timeout <ms>]" },
|
|
162769
163306
|
{ name: "upgrade", summary: "install the newest published CLI (`npm i -g @wix/himalaya-cli@latest`) and report what moved. This is the explicit door: himi also updates itself when the running build is more than a week old \u2014 unattended it just does it and re-runs your command, at a terminal it asks first \u2014 and `HIMI_NO_UPDATE_CHECK=1` turns that off, leaving this command as the way to catch up. Reports `unchanged` rather than claiming success when npm exits 0 without moving the version, which is what a registry mirror serving its own pinned copy looks like.", required: "[--json]" },
|
|
162770
163307
|
{ name: "push", summary: "lint + build + publish a release (default --draft: servable via ?release= but NOT live). REFUSES to publish on any error unless --force; --strict promotes warnings. Prints preview + agent-context links. A successful draft push also rebuilds the making-of (.himi/making-of.html, local and offline) and names it as `reel` \u2014 the file to hand the owner beside the preview link. Its postcard carries the home shot only when that shot is newer than the last source edit; a repeat draft's postcard adds what changed since the last one (\"Since the last draft: the home screen changed.\", from the release manifests' screen hashes, remembered in .himi/last-draft.json); otherwise the postcard says why and names `himi render <home> --png`, and the envelope's `postcardPicture: {skipped, render}` leads next[] with that render (the push never renders it itself). The published slug is NAMESPACED per owner \u2014 `<ownerPrefix>.<name>`, composed offline from the control token's ownerPrefix claim, so the CLI and the server derive the identical string and himalaya.content.json is NOT rewritten (a legacy token with no ownerPrefix publishes the declared name unchanged). An app claimed BEFORE namespacing is stored under its FLAT slug, so the claim route answers `alreadyYours` naming that slug and the push adopts it \u2014 reported as `adoptedSlug`, since it is the one case where the published `app` differs from what the declared name composes to. `--no-claim` skips the route that knows this, so a pre-namespacing app pushed with it still fails 403. --visibility public|unlisted decides whether /v1/apps + the Himi Player picker LIST the app (also declarable as `visibility` in himalaya.content.json; omitted, a brand-new app defaults to unlisted \u2014 share by link \u2014 and an existing setting is kept). --account-id names which account owns the app when your Wix session resolves to several (the auto-claim of a brand-new slug cannot guess \u2014 without it a multi-account caller is told to name one). An unforced push of a release that carries SCREENS also refuses when `.himi/ux-audit.json` holds no mobile-UX drive recorded against that release id, or holds one that FAILED (#2955) \u2014 a published draft IS the owner-private preview a customer is handed; `himi ux record` clears it and `--force` overrides it, which the success envelope then says out loud. `--only <selector>` publishes ONLY the named items as a release derived from the app's live release (or `--from-release <id>`), running the identical build + lint gate and simply publishing less; it requires an explicit `--draft` or `--live` because a partial publish has no safe default, never claims a slug, and carries neither attestation nor a source archive (both named in the output). Selectors are comma-separated in ONE `--only`: `changed` (every item whose bytes differ from the base), `screen:<id|glob>`, `bundle:<name>`, `tokens`, `app-config` \u2014 a selected screen drags its logic bundle and a selected bundle drags the screens that reference it, or the bytes land under a key nothing reads.", required: "[--content <dir>] [--draft] [--live] [--force] [--strict] [--label] [--notes] [--visibility public|unlisted] [--no-claim] [--account-id <id>] [--only <selector>] [--from-release <id>] [--accept-regressions] [--accept-partial] [--app <slug>] (--control-token)" },
|
|
@@ -164877,6 +165414,16 @@ himi v${cliVersion()} \u2014 run \`himi --version\`. If authoring commands fail
|
|
|
164877
165414
|
const template = str9(flags.template);
|
|
164878
165415
|
const parentDir = resolve56(str9(flags.dir) ?? process.cwd());
|
|
164879
165416
|
const base44AppId = flags["base44-app-id"] === void 0 ? void 0 : String(flags["base44-app-id"]);
|
|
165417
|
+
const base44AppUrl = flags["base44-app-url"] === void 0 ? void 0 : String(flags["base44-app-url"]);
|
|
165418
|
+
if (base44AppUrl !== void 0) {
|
|
165419
|
+
try {
|
|
165420
|
+
if (base44AppId === void 0) throw new Error("--base44-app-url needs --base44-app-id");
|
|
165421
|
+
base44TenantUrl(base44AppUrl);
|
|
165422
|
+
} catch (e2) {
|
|
165423
|
+
io2.error(JSON.stringify({ ok: false, code: "invalid_base44_app_url", error: e2 instanceof Error ? e2.message : String(e2) }));
|
|
165424
|
+
return 2;
|
|
165425
|
+
}
|
|
165426
|
+
}
|
|
164880
165427
|
if (base44AppId !== void 0) {
|
|
164881
165428
|
if (!BASE44_APP_ID_RE.test(base44AppId)) {
|
|
164882
165429
|
io2.error(JSON.stringify({ error: `--base44-app-id "${base44AppId}" is not a Base44 app id (8\u201364 letters and digits)`, hint: "it is the id in your app's URL: https://app.base44.com/apps/<id>" }));
|
|
@@ -164893,8 +165440,8 @@ himi v${cliVersion()} \u2014 run \`himi --version\`. If authoring commands fail
|
|
|
164893
165440
|
}
|
|
164894
165441
|
const base44Applied = (dir) => {
|
|
164895
165442
|
if (base44AppId === void 0) return {};
|
|
164896
|
-
if (!applyBase44AppId(dir, base44AppId)) throw new Error(`--base44-app-id: ${dir}/config.ts lost its Base44 app id placeholder`);
|
|
164897
|
-
return { base44: { appId: base44AppId } };
|
|
165443
|
+
if (!applyBase44AppId(dir, base44AppId, base44AppUrl)) throw new Error(`--base44-app-id: ${dir}/config.ts lost its Base44 app id placeholder`);
|
|
165444
|
+
return { base44: { appId: base44AppId, ...base44AppUrl ? { tenantUrl: base44TenantUrl(base44AppUrl).origin, callbackHost: base44TenantUrl(base44AppUrl).hostname } : {} } };
|
|
164898
165445
|
};
|
|
164899
165446
|
const withAgentFiles = async (dir) => {
|
|
164900
165447
|
const seeded = await seedAgentFilesFor(dir, flags);
|
|
@@ -170377,6 +170924,19 @@ ${report3.ok ? "OK \u2014 data + serve plane reachable." : typeof report3.hint =
|
|
|
170377
170924
|
return report3.ok ? 0 : 1;
|
|
170378
170925
|
}
|
|
170379
170926
|
case "base44": {
|
|
170927
|
+
if (pos[1] === "auth-check") {
|
|
170928
|
+
const { checkBase44NativeAuth: checkBase44NativeAuth2 } = await Promise.resolve().then(() => (init_base44_auth_check(), base44_auth_check_exports));
|
|
170929
|
+
try {
|
|
170930
|
+
const url = str9(flags.url);
|
|
170931
|
+
if (!url) throw new Error("auth-check needs --url <https://tenant>");
|
|
170932
|
+
const result = await checkBase44NativeAuth2({ url, iosAppId: str9(flags["ios-app-id"]), androidPackage: str9(flags["android-package"]), androidSha256: str9(flags["android-sha256"]) });
|
|
170933
|
+
print(result);
|
|
170934
|
+
return result.ok ? 0 : 1;
|
|
170935
|
+
} catch (e2) {
|
|
170936
|
+
io2.error(JSON.stringify({ ok: false, code: "invalid_base44_auth_check", error: e2 instanceof Error ? e2.message : String(e2) }));
|
|
170937
|
+
return 2;
|
|
170938
|
+
}
|
|
170939
|
+
}
|
|
170380
170940
|
const sub = pos[1];
|
|
170381
170941
|
const b44Usage = "himi base44 analyze (--url <https://\u2026> | --app-id <id>) [--out .himi/base44-book] [--sample <n>] [--json] | himi base44 login [--from-base44-cli] | himi base44 whoami | himi base44 logout";
|
|
170382
170942
|
const auth = await Promise.resolve().then(() => (init_base44_auth(), base44_auth_exports));
|