@wix/himalaya-cli 0.1686.0 → 0.1688.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/browser-plane/assets.json +5 -5
- package/dist/browser-plane/preview-deferred/{bec1da717e3068fe103380289a33fce4ddffc442c73a63172ee6cae51054ce62.bin → ecd0318450055d47467996fb81c979e6d067dafd7f726b0d5965625090eac3b1.bin} +1 -1
- package/dist/browser-plane/sw.js +6 -6
- package/dist/cli.mjs +588 -353
- package/dist/preview-assets.generated.bin +0 -0
- package/guides/android-ux.md +4 -4
- package/guides/designing-himi-screens.md +35 -3
- package/guides/getting-started.md +7 -3
- package/guides/hhp.md +1 -1
- package/guides/himi-skill.md +7 -3
- package/package.json +2 -2
package/dist/cli.mjs
CHANGED
|
@@ -1801,9 +1801,9 @@ function applyBase44AppId(dir, appId3, tenantUrl) {
|
|
|
1801
1801
|
const config = join2(dir, "config.ts");
|
|
1802
1802
|
if (!existsSync(config)) return false;
|
|
1803
1803
|
const body = readFileSync2(config, "utf8");
|
|
1804
|
-
const
|
|
1805
|
-
if (!body.includes(
|
|
1806
|
-
let configured = body.replaceAll(
|
|
1804
|
+
const literal3 = `"${BASE44_APP_ID_PLACEHOLDER}"`;
|
|
1805
|
+
if (!body.includes(literal3)) return false;
|
|
1806
|
+
let configured = body.replaceAll(literal3, `"${appId3}"`);
|
|
1807
1807
|
if (tenantUrl !== void 0) {
|
|
1808
1808
|
const host = base44TenantUrl(tenantUrl).hostname;
|
|
1809
1809
|
if (!/^\s*base44:\s*\{/m.test(configured) || /\bappLinkHosts\s*:/.test(configured)) {
|
|
@@ -1980,14 +1980,14 @@ function isBinaryTemplateFile(rel2) {
|
|
|
1980
1980
|
}
|
|
1981
1981
|
function readTemplateFiles(srcRoot) {
|
|
1982
1982
|
const files = {};
|
|
1983
|
-
const
|
|
1983
|
+
const walk3 = (relDir) => {
|
|
1984
1984
|
for (const entry of readdirSync(join2(srcRoot, relDir))) {
|
|
1985
1985
|
const rel2 = relDir ? join2(relDir, entry) : entry;
|
|
1986
1986
|
const src = join2(srcRoot, rel2);
|
|
1987
1987
|
const st2 = lstatSync(src);
|
|
1988
1988
|
if (st2.isSymbolicLink()) continue;
|
|
1989
1989
|
if (st2.isDirectory()) {
|
|
1990
|
-
if (!isDeniedSourceDir(entry, relDir))
|
|
1990
|
+
if (!isDeniedSourceDir(entry, relDir)) walk3(rel2);
|
|
1991
1991
|
continue;
|
|
1992
1992
|
}
|
|
1993
1993
|
if (isDeniedSourcePath(rel2)) continue;
|
|
@@ -1995,7 +1995,7 @@ function readTemplateFiles(srcRoot) {
|
|
|
1995
1995
|
files[rel2] = readFileSync2(src, "utf8");
|
|
1996
1996
|
}
|
|
1997
1997
|
};
|
|
1998
|
-
|
|
1998
|
+
walk3("");
|
|
1999
1999
|
return files;
|
|
2000
2000
|
}
|
|
2001
2001
|
function scaffoldFromTemplate(name, dir, template) {
|
|
@@ -2046,10 +2046,12 @@ console.log("[${name}] home worker booted");
|
|
|
2046
2046
|
type Payload = { value?: unknown; selectedId?: string } | undefined;
|
|
2047
2047
|
|
|
2048
2048
|
export default defineService("home", {
|
|
2049
|
-
state: { notifications: true, appearance: "auto", title: "Hello from ${name}" },
|
|
2049
|
+
state: { notifications: true, appearance: "auto", title: "Hello from ${name}", email: "you@example.com", plan: "Free" },
|
|
2050
2050
|
actions: {
|
|
2051
2051
|
setNotifications: (s, p: Payload) => ({ ...s, notifications: p?.value === undefined ? !s.notifications : p.value === true || p.value === "true" }),
|
|
2052
2052
|
setAppearance: (s, p: Payload) => ({ ...s, appearance: String(p?.selectedId ?? "auto") }),
|
|
2053
|
+
upgrade: (s) => ({ ...s, plan: "Pro" }),
|
|
2054
|
+
save: (s) => ({ ...s, title: "Saved" }),
|
|
2053
2055
|
},
|
|
2054
2056
|
});
|
|
2055
2057
|
`
|
|
@@ -2209,12 +2211,45 @@ function home() {
|
|
|
2209
2211
|
},
|
|
2210
2212
|
},
|
|
2211
2213
|
},
|
|
2214
|
+
{
|
|
2215
|
+
id: "account",
|
|
2216
|
+
body: {
|
|
2217
|
+
package: "himalaya",
|
|
2218
|
+
type: "Section",
|
|
2219
|
+
props: {
|
|
2220
|
+
inset: true,
|
|
2221
|
+
header: "Account",
|
|
2222
|
+
children: [
|
|
2223
|
+
{ id: "email_row", body: { package: "himalaya", type: "ListItem", props: { title: "Email", subtitle: "$service:home.email" } } },
|
|
2224
|
+
{
|
|
2225
|
+
id: "plan_row",
|
|
2226
|
+
body: {
|
|
2227
|
+
package: "himalaya",
|
|
2228
|
+
type: "ListItem",
|
|
2229
|
+
props: {
|
|
2230
|
+
title: "Plan",
|
|
2231
|
+
subtitle: "$service:home.plan",
|
|
2232
|
+
// A row's own action is tinted, never filled: the footer holds the one filled button.
|
|
2233
|
+
trailing: { id: "upgrade", body: { package: "himalaya", type: "Button", props: { title: "Upgrade", style: "tonal", size: "sm", action: { actionId: "tier5.home.upgrade" } } } },
|
|
2234
|
+
},
|
|
2235
|
+
},
|
|
2236
|
+
},
|
|
2237
|
+
],
|
|
2238
|
+
},
|
|
2239
|
+
},
|
|
2240
|
+
},
|
|
2212
2241
|
],
|
|
2213
2242
|
},
|
|
2214
2243
|
},
|
|
2215
2244
|
// The screen gutter: without it every inset section touches the device edge.
|
|
2216
2245
|
modifiers: { padding: { leading: 16, trailing: 16, top: 16, bottom: 40 }, background: { token: "surfacePrimary" } },
|
|
2217
2246
|
},
|
|
2247
|
+
// The step that finishes the task: one filled button, pinned above the home indicator.
|
|
2248
|
+
stickyFooter: {
|
|
2249
|
+
id: "save",
|
|
2250
|
+
body: { package: "himalaya", type: "Button", props: { title: "Save changes", style: "primary", fullWidth: true, action: { actionId: "tier5.home.save" } } },
|
|
2251
|
+
modifiers: { padding: { leading: 16, trailing: 16, top: 8, bottom: 8 } },
|
|
2252
|
+
},
|
|
2218
2253
|
};
|
|
2219
2254
|
}
|
|
2220
2255
|
|
|
@@ -2248,7 +2283,7 @@ Authored off-repo; shipped OTA via the remote dev loop.
|
|
|
2248
2283
|
|
|
2249
2284
|
- \`tier5-src/home/index.ts\` \u2014 the **worker** (\`defineService\`: state + actions).
|
|
2250
2285
|
- \`config.ts\` \u2014 the app config (\`defineApp\`).
|
|
2251
|
-
- \`dev/index.ts\` \u2014 the loadable **dev module**: a settings screen (inset
|
|
2286
|
+
- \`dev/index.ts\` \u2014 the loadable **dev module**: a settings screen (inset sections, the switch label is the row, a tinted row action, one filled button in the sticky footer, no repeated title) bound to the worker + a seed.
|
|
2252
2287
|
- \`tokens.json\` \u2014 design tokens.
|
|
2253
2288
|
|
|
2254
2289
|
The worker's \`@himalaya/state\` SDK alias resolves during \`himi build\` to the \`@wix/himalaya\`
|
|
@@ -4872,17 +4907,17 @@ var init_catalog_cache = __esm({
|
|
|
4872
4907
|
);
|
|
4873
4908
|
return u2.href;
|
|
4874
4909
|
}
|
|
4875
|
-
async download(url, limit,
|
|
4910
|
+
async download(url, limit, conditional2) {
|
|
4876
4911
|
const controller = new AbortController(), timer = setTimeout(() => controller.abort(), 15e3);
|
|
4877
4912
|
try {
|
|
4878
4913
|
const res = await this.fetcher(this.checkedUrl(url), {
|
|
4879
4914
|
redirect: "error",
|
|
4880
4915
|
signal: controller.signal,
|
|
4881
4916
|
credentials: "omit",
|
|
4882
|
-
...
|
|
4917
|
+
...conditional2?.etag ? { headers: { "If-None-Match": conditional2.etag } } : {}
|
|
4883
4918
|
});
|
|
4884
|
-
if (res.status === 304 &&
|
|
4885
|
-
|
|
4919
|
+
if (res.status === 304 && conditional2?.cached) return conditional2.cached;
|
|
4920
|
+
conditional2?.received(res.headers.get("etag"));
|
|
4886
4921
|
if (!res.ok || !res.body)
|
|
4887
4922
|
fail(
|
|
4888
4923
|
"catalog_download_failed",
|
|
@@ -5887,7 +5922,7 @@ function analyzeService(source2, forbidden2) {
|
|
|
5887
5922
|
if (mod.startsWith("@himalaya/")) info4.usedModules.add(mod);
|
|
5888
5923
|
}
|
|
5889
5924
|
}
|
|
5890
|
-
const
|
|
5925
|
+
const walk3 = (node3) => {
|
|
5891
5926
|
if (ts.isCallExpression(node3) && ts.isIdentifier(node3.expression) && node3.expression.text === "defineService") {
|
|
5892
5927
|
info4.hasDefineService = true;
|
|
5893
5928
|
info4.defineServiceCount++;
|
|
@@ -5930,9 +5965,9 @@ function analyzeService(source2, forbidden2) {
|
|
|
5930
5965
|
}
|
|
5931
5966
|
}
|
|
5932
5967
|
}
|
|
5933
|
-
ts.forEachChild(node3,
|
|
5968
|
+
ts.forEachChild(node3, walk3);
|
|
5934
5969
|
};
|
|
5935
|
-
|
|
5970
|
+
walk3(sf2);
|
|
5936
5971
|
return info4;
|
|
5937
5972
|
}
|
|
5938
5973
|
var propName;
|
|
@@ -5986,15 +6021,15 @@ import ts2 from "typescript";
|
|
|
5986
6021
|
function moduleCapabilities(source2, file2, profile) {
|
|
5987
6022
|
const sf2 = ts2.createSourceFile(file2, source2, ts2.ScriptTarget.Latest, true);
|
|
5988
6023
|
const required3 = /* @__PURE__ */ new Set();
|
|
5989
|
-
function
|
|
6024
|
+
function walk3(n2) {
|
|
5990
6025
|
if ((ts2.isImportDeclaration(n2) || ts2.isExportDeclaration(n2)) && n2.moduleSpecifier && ts2.isStringLiteral(n2.moduleSpecifier)) {
|
|
5991
6026
|
const typeOnly = ts2.isImportDeclaration(n2) ? n2.importClause?.isTypeOnly || !n2.importClause?.name && n2.importClause?.namedBindings && ts2.isNamedImports(n2.importClause.namedBindings) && n2.importClause.namedBindings.elements.every((e2) => e2.isTypeOnly) : n2.isTypeOnly || n2.exportClause && ts2.isNamedExports(n2.exportClause) && n2.exportClause.elements.every((e2) => e2.isTypeOnly);
|
|
5992
6027
|
if (!typeOnly) for (const cap of profile.imports[n2.moduleSpecifier.text]?.capabilities ?? []) required3.add(cap);
|
|
5993
6028
|
}
|
|
5994
6029
|
if (ts2.isCallExpression(n2) && ts2.isIdentifier(n2.expression) && n2.expression.text === "withStream") required3.add("stream");
|
|
5995
|
-
ts2.forEachChild(n2,
|
|
6030
|
+
ts2.forEachChild(n2, walk3);
|
|
5996
6031
|
}
|
|
5997
|
-
|
|
6032
|
+
walk3(sf2);
|
|
5998
6033
|
return [...required3].sort();
|
|
5999
6034
|
}
|
|
6000
6035
|
function inspectModule(source2, file2, profile, diagnostics) {
|
|
@@ -6009,7 +6044,7 @@ function inspectModule(source2, file2, profile, diagnostics) {
|
|
|
6009
6044
|
diagnostics.push({ code: "HHP-CAPABILITY-MISSING", severity: "error", file: file2, line: imp.line, column: 1, message: `${imp.module} requires declared capability ${cap}.`, hint: `Declare ${cap} in app configuration after checking its native prerequisites.` });
|
|
6010
6045
|
}
|
|
6011
6046
|
const sf2 = ts2.createSourceFile(file2, source2, ts2.ScriptTarget.Latest, true);
|
|
6012
|
-
function
|
|
6047
|
+
function walk3(n2) {
|
|
6013
6048
|
if (ts2.isImportDeclaration(n2) && ts2.isStringLiteral(n2.moduleSpecifier)) {
|
|
6014
6049
|
const entry = profile.imports[n2.moduleSpecifier.text];
|
|
6015
6050
|
if (entry) {
|
|
@@ -6040,9 +6075,9 @@ function inspectModule(source2, file2, profile, diagnostics) {
|
|
|
6040
6075
|
const pos = sf2.getLineAndCharacterOfPosition(n2.getStart(sf2));
|
|
6041
6076
|
diagnostics.push({ code: "HHP-WORKER-DYNAMIC-IMPORT", severity: "error", file: file2, line: pos.line + 1, column: pos.character + 1, message: "Use static imports in HHP workers." });
|
|
6042
6077
|
}
|
|
6043
|
-
ts2.forEachChild(n2,
|
|
6078
|
+
ts2.forEachChild(n2, walk3);
|
|
6044
6079
|
}
|
|
6045
|
-
|
|
6080
|
+
walk3(sf2);
|
|
6046
6081
|
}
|
|
6047
6082
|
function analyzeController(source2, file2, profile, diagnostics) {
|
|
6048
6083
|
inspectModule(source2, file2, profile, diagnostics);
|
|
@@ -6067,20 +6102,20 @@ function analyzeController(source2, file2, profile, diagnostics) {
|
|
|
6067
6102
|
error(object16, "initialState and handlers must be object literals.");
|
|
6068
6103
|
return;
|
|
6069
6104
|
}
|
|
6070
|
-
function
|
|
6071
|
-
if (ts2.isAsExpression(n2) || ts2.isSatisfiesExpression(n2) || ts2.isParenthesizedExpression(n2)) return
|
|
6105
|
+
function literal3(n2) {
|
|
6106
|
+
if (ts2.isAsExpression(n2) || ts2.isSatisfiesExpression(n2) || ts2.isParenthesizedExpression(n2)) return literal3(n2.expression);
|
|
6072
6107
|
if (ts2.isStringLiteral(n2) || ts2.isNoSubstitutionTemplateLiteral(n2)) return n2.text;
|
|
6073
6108
|
if (ts2.isNumericLiteral(n2)) return Number(n2.text);
|
|
6074
6109
|
if (n2.kind === ts2.SyntaxKind.TrueKeyword) return true;
|
|
6075
6110
|
if (n2.kind === ts2.SyntaxKind.FalseKeyword) return false;
|
|
6076
6111
|
if (n2.kind === ts2.SyntaxKind.NullKeyword) return null;
|
|
6077
6112
|
if (ts2.isPrefixUnaryExpression(n2) && n2.operator === ts2.SyntaxKind.MinusToken && ts2.isNumericLiteral(n2.operand)) return -Number(n2.operand.text);
|
|
6078
|
-
if (ts2.isArrayLiteralExpression(n2)) return n2.elements.map((e2) =>
|
|
6113
|
+
if (ts2.isArrayLiteralExpression(n2)) return n2.elements.map((e2) => literal3(e2));
|
|
6079
6114
|
if (ts2.isObjectLiteralExpression(n2)) return Object.fromEntries(n2.properties.map((p2) => {
|
|
6080
6115
|
if (!ts2.isPropertyAssignment(p2) || ts2.isComputedPropertyName(p2.name)) throw new Error("State must contain JSON literals; no spreads, calls, or computed keys.");
|
|
6081
6116
|
const key4 = p2.name.getText(sf2).replace(/^["']|["']$/g, "");
|
|
6082
6117
|
if (unsafe.has(key4) || key4.startsWith("__hhp")) throw new Error(`Unsafe or reserved state key ${key4}.`);
|
|
6083
|
-
return [key4,
|
|
6118
|
+
return [key4, literal3(p2.initializer)];
|
|
6084
6119
|
}));
|
|
6085
6120
|
throw new Error("State must contain JSON literals; no spreads, calls, or computed keys.");
|
|
6086
6121
|
}
|
|
@@ -6092,7 +6127,7 @@ function analyzeController(source2, file2, profile, diagnostics) {
|
|
|
6092
6127
|
if (v2 && typeof v2 === "object" && !Array.isArray(v2)) collect2(v2, path2);
|
|
6093
6128
|
}
|
|
6094
6129
|
};
|
|
6095
|
-
const initial =
|
|
6130
|
+
const initial = literal3(state.initializer);
|
|
6096
6131
|
if (!initial || typeof initial !== "object" || Array.isArray(initial)) throw new Error("initialState must be a JSON object.");
|
|
6097
6132
|
const paths2 = /* @__PURE__ */ new Map();
|
|
6098
6133
|
collect2(initial);
|
|
@@ -6116,11 +6151,11 @@ function analyzeDirectService(source2, file2, profile, diagnostics) {
|
|
|
6116
6151
|
inspectModule(source2, file2, profile, diagnostics);
|
|
6117
6152
|
const sf2 = ts2.createSourceFile(file2, source2, ts2.ScriptTarget.Latest, true);
|
|
6118
6153
|
const calls = [];
|
|
6119
|
-
function
|
|
6154
|
+
function walk3(node3) {
|
|
6120
6155
|
if (ts2.isCallExpression(node3) && ts2.isIdentifier(node3.expression) && node3.expression.text === "defineService") calls.push(node3);
|
|
6121
|
-
ts2.forEachChild(node3,
|
|
6156
|
+
ts2.forEachChild(node3, walk3);
|
|
6122
6157
|
}
|
|
6123
|
-
|
|
6158
|
+
walk3(sf2);
|
|
6124
6159
|
const call = calls[0], name = call?.arguments[0], definition = call?.arguments[1];
|
|
6125
6160
|
if (calls.length !== 1 || !name || !ts2.isStringLiteral(name) || !definition || !ts2.isObjectLiteralExpression(definition)) {
|
|
6126
6161
|
diagnostics.push({ code: "HHP-SERVICE", severity: "error", file: file2, line: 1, column: 1, message: "Use exactly one defineService with a literal name and state/actions object." });
|
|
@@ -6727,7 +6762,7 @@ function validateWorkerSubtree(raw, slotId, policy, actionCatalog) {
|
|
|
6727
6762
|
}
|
|
6728
6763
|
if (!catalog4.has(id)) rejection = "action_missing";
|
|
6729
6764
|
};
|
|
6730
|
-
const
|
|
6765
|
+
const walk3 = (node3, depth) => {
|
|
6731
6766
|
if (rejection) return;
|
|
6732
6767
|
nodeCount += 1;
|
|
6733
6768
|
maxDepth = Math.max(maxDepth, depth);
|
|
@@ -6778,18 +6813,18 @@ function validateWorkerSubtree(raw, slotId, policy, actionCatalog) {
|
|
|
6778
6813
|
rejection = "typed_decode";
|
|
6779
6814
|
return;
|
|
6780
6815
|
}
|
|
6781
|
-
|
|
6816
|
+
walk3(child3, depth + 1);
|
|
6782
6817
|
}
|
|
6783
6818
|
} else {
|
|
6784
6819
|
if (!componentShape(value2)) {
|
|
6785
6820
|
rejection = "typed_decode";
|
|
6786
6821
|
return;
|
|
6787
6822
|
}
|
|
6788
|
-
|
|
6823
|
+
walk3(value2, depth + 1);
|
|
6789
6824
|
}
|
|
6790
6825
|
}
|
|
6791
6826
|
};
|
|
6792
|
-
|
|
6827
|
+
walk3(parsed, 1);
|
|
6793
6828
|
if (rejection) return { ok: false, reason: rejection, treeHash };
|
|
6794
6829
|
return { ok: true, component: parsed, treeHash, nodeCount, depth: maxDepth };
|
|
6795
6830
|
}
|
|
@@ -10869,13 +10904,13 @@ function collectAssets(appDir3) {
|
|
|
10869
10904
|
if (!dir) return [];
|
|
10870
10905
|
const otaOnly = readOtaOnlyPatterns(appDir3);
|
|
10871
10906
|
const out2 = [];
|
|
10872
|
-
const
|
|
10907
|
+
const walk3 = (abs, prefix) => {
|
|
10873
10908
|
for (const entry of readdirSync10(abs, { withFileTypes: true })) {
|
|
10874
10909
|
if (entry.name.startsWith(".")) continue;
|
|
10875
10910
|
const child3 = join13(abs, entry.name);
|
|
10876
10911
|
const name = prefix ? `${prefix}/${entry.name}` : entry.name;
|
|
10877
10912
|
if (entry.isDirectory()) {
|
|
10878
|
-
|
|
10913
|
+
walk3(child3, name);
|
|
10879
10914
|
continue;
|
|
10880
10915
|
}
|
|
10881
10916
|
if (!entry.isFile()) continue;
|
|
@@ -10884,7 +10919,7 @@ function collectAssets(appDir3) {
|
|
|
10884
10919
|
out2.push({ name, path: child3, bytes: statSync4(child3).size, contentType: contentTypeFor(name), baked });
|
|
10885
10920
|
}
|
|
10886
10921
|
};
|
|
10887
|
-
|
|
10922
|
+
walk3(dir, "");
|
|
10888
10923
|
return out2.sort((a3, b3) => a3.name < b3.name ? -1 : a3.name > b3.name ? 1 : 0);
|
|
10889
10924
|
}
|
|
10890
10925
|
function collectBrandFonts(appDir3) {
|
|
@@ -12957,14 +12992,14 @@ function componentNodes(descriptor) {
|
|
|
12957
12992
|
{ value: descriptor, path: "", ancestors: [], conditional: false }
|
|
12958
12993
|
];
|
|
12959
12994
|
while (pending2.length) {
|
|
12960
|
-
const { value: value2, path: path2, ancestors, conditional } = pending2.pop();
|
|
12995
|
+
const { value: value2, path: path2, ancestors, conditional: conditional2 } = pending2.pop();
|
|
12961
12996
|
if (!value2 || typeof value2 !== "object") continue;
|
|
12962
12997
|
let childAncestors = ancestors;
|
|
12963
|
-
let childConditional =
|
|
12998
|
+
let childConditional = conditional2;
|
|
12964
12999
|
if (isRecord2(value2) && isRecord2(value2.body) && typeof value2.body.type === "string" && typeof value2.body.package === "string") {
|
|
12965
13000
|
const mods = isRecord2(value2.modifiers) ? value2.modifiers : void 0;
|
|
12966
13001
|
const hiddenHere = mods !== void 0 && (mods.hidden === true || typeof mods.hiddenPath === "string" && mods.hiddenPath !== "");
|
|
12967
|
-
const selfConditional =
|
|
13002
|
+
const selfConditional = conditional2 || hiddenHere;
|
|
12968
13003
|
out2.push({ node: value2, path: path2, ancestors, conditional: selfConditional });
|
|
12969
13004
|
childAncestors = [...ancestors, { id: value2.id, type: value2.body.type }];
|
|
12970
13005
|
childConditional = selfConditional || CONDITIONAL_CONTAINER_TYPES.has(value2.body.type);
|
|
@@ -13320,6 +13355,146 @@ var init_fast_screen_lint = __esm({
|
|
|
13320
13355
|
}
|
|
13321
13356
|
});
|
|
13322
13357
|
|
|
13358
|
+
// ../../core/dev-server/src/design-lint.ts
|
|
13359
|
+
function walk(descriptor) {
|
|
13360
|
+
const out2 = [];
|
|
13361
|
+
const rowTemplates = /* @__PURE__ */ new Set();
|
|
13362
|
+
const visit = (value2, at2, ctx) => {
|
|
13363
|
+
if (Array.isArray(value2)) {
|
|
13364
|
+
value2.forEach((v2, i2) => visit(v2, `${at2}[${i2}]`, ctx));
|
|
13365
|
+
return;
|
|
13366
|
+
}
|
|
13367
|
+
if (!value2 || typeof value2 !== "object") return;
|
|
13368
|
+
let here = ctx;
|
|
13369
|
+
if (isNode2(value2)) {
|
|
13370
|
+
here = { ...ctx, conditional: ctx.conditional || conditional(value2) };
|
|
13371
|
+
out2.push({ node: value2, at: at2, ...here });
|
|
13372
|
+
if (ROW_HOSTS2.has(String(value2.body?.type)) && typeof propsOf(value2).itemsPath === "string") rowTemplates.add(propsOf(value2).items);
|
|
13373
|
+
}
|
|
13374
|
+
for (const [key4, child3] of Object.entries(value2)) {
|
|
13375
|
+
if (DATA_KEYS.has(key4) || !child3 || typeof child3 !== "object") continue;
|
|
13376
|
+
visit(child3, at2 ? `${at2}.${key4}` : key4, {
|
|
13377
|
+
...here,
|
|
13378
|
+
inRow: here.inRow || rowTemplates.has(child3),
|
|
13379
|
+
alternative: here.alternative || ALTERNATIVE_KEYS.has(key4)
|
|
13380
|
+
});
|
|
13381
|
+
}
|
|
13382
|
+
};
|
|
13383
|
+
const screen = descriptor && typeof descriptor === "object" ? descriptor : {};
|
|
13384
|
+
const root = { inRow: false, alternative: false, conditional: false };
|
|
13385
|
+
if (screen.payload && typeof screen.payload === "object") visit(screen.payload, "payload", root);
|
|
13386
|
+
else if (isNode2(descriptor)) visit(descriptor, "", root);
|
|
13387
|
+
for (const key4 of ["stickyHeader", "stickyFooter"]) if (screen[key4]) visit(screen[key4], key4, root);
|
|
13388
|
+
return out2;
|
|
13389
|
+
}
|
|
13390
|
+
function prominentActionIssues(descriptor) {
|
|
13391
|
+
const filled = walk(descriptor).filter((v2) => !v2.alternative && !v2.conditional && filledButton(v2.node));
|
|
13392
|
+
const issues = [];
|
|
13393
|
+
const rowRepeats = new Set(filled.filter((v2) => v2.inRow));
|
|
13394
|
+
const byTitle = /* @__PURE__ */ new Map();
|
|
13395
|
+
for (const v2 of filled) {
|
|
13396
|
+
const title = titleOf(v2.node);
|
|
13397
|
+
if (title && !v2.inRow) byTitle.set(title, [...byTitle.get(title) ?? [], v2]);
|
|
13398
|
+
}
|
|
13399
|
+
for (const group of byTitle.values()) if (group.length >= 3) group.forEach((v2) => rowRepeats.add(v2));
|
|
13400
|
+
const reported = /* @__PURE__ */ new Set();
|
|
13401
|
+
for (const v2 of rowRepeats) {
|
|
13402
|
+
const key4 = v2.inRow ? v2.at : `title:${titleOf(v2.node)}`;
|
|
13403
|
+
if (reported.has(key4)) continue;
|
|
13404
|
+
reported.add(key4);
|
|
13405
|
+
const where = v2.inRow ? "in a list's row template, so every row draws it" : `on ${byTitle.get(titleOf(v2.node) ?? "")?.length} rows`;
|
|
13406
|
+
issues.push({
|
|
13407
|
+
severity: "warning",
|
|
13408
|
+
pass: "button-variants",
|
|
13409
|
+
code: "repeated_prominent_row_action",
|
|
13410
|
+
ruleCode: "repeated_prominent_row_action",
|
|
13411
|
+
path: `${v2.at}.body.props.style`,
|
|
13412
|
+
message: `repeated_prominent_row_action: a filled ${String(v2.node.body?.type)}${titleOf(v2.node) ? ` "${titleOf(v2.node)}"` : ""} sits ${where}. A filled button is the screen's one main step; repeated per row it reads as a wall of primary buttons. Give the row action \`style: "tonal"\` (and \`size: "sm"\`), or make the whole row the tap target. See \`himi docs designing-himi-screens\`, "A collection is rows, not a card per item".`
|
|
13413
|
+
});
|
|
13414
|
+
}
|
|
13415
|
+
const single3 = filled.filter((v2) => !rowRepeats.has(v2));
|
|
13416
|
+
if (single3.length > 1) {
|
|
13417
|
+
const names2 = single3.map((v2) => titleOf(v2.node) ? `"${titleOf(v2.node)}"` : String(v2.node.body?.type)).join(", ");
|
|
13418
|
+
issues.push({
|
|
13419
|
+
severity: "warning",
|
|
13420
|
+
pass: "button-variants",
|
|
13421
|
+
code: "multiple_prominent_actions",
|
|
13422
|
+
ruleCode: "multiple_prominent_actions",
|
|
13423
|
+
path: `${single3[1].at}.body.props.style`,
|
|
13424
|
+
message: `multiple_prominent_actions: ${single3.length} filled buttons are on screen together (${names2}). Keep one filled button for the step that finishes the task (in \`stickyFooter\`), and give the others \`style: "tonal"\`, \`"secondary"\` or \`"tertiary"\`. See \`himi docs designing-himi-screens\`, "the phone rules".`
|
|
13425
|
+
});
|
|
13426
|
+
}
|
|
13427
|
+
return issues;
|
|
13428
|
+
}
|
|
13429
|
+
function paddingOn(padding, axis) {
|
|
13430
|
+
if (typeof padding === "number" && Number.isFinite(padding)) return padding * 2;
|
|
13431
|
+
if (!padding || typeof padding !== "object") return 0;
|
|
13432
|
+
const p2 = padding;
|
|
13433
|
+
const [a3, b3] = axis === "x" ? [p2.leading ?? p2.start ?? p2.horizontal, p2.trailing ?? p2.end ?? p2.horizontal] : [p2.top ?? p2.vertical, p2.bottom ?? p2.vertical];
|
|
13434
|
+
return (literal(a3) ?? 0) + (literal(b3) ?? 0);
|
|
13435
|
+
}
|
|
13436
|
+
function touchTargetIssues(descriptor) {
|
|
13437
|
+
const issues = [];
|
|
13438
|
+
for (const { node: node3, at: at2 } of walk(descriptor)) {
|
|
13439
|
+
const m2 = modifiersOf2(node3);
|
|
13440
|
+
if (!TAP_MODIFIERS.some((k3) => m2[k3] != null) || m2.hitTestable === false || node3.body?.type === "Button") continue;
|
|
13441
|
+
const p2 = propsOf(node3);
|
|
13442
|
+
const own6 = node3.body?.type === "Icon" ? literal(p2.size) ?? 20 : node3.body?.type === "Image" ? literal(p2.size) : void 0;
|
|
13443
|
+
const extent = (frame, content, axis) => literal(frame) ?? (content === void 0 ? void 0 : content + paddingOn(m2.padding, axis));
|
|
13444
|
+
const width = extent(m2.width, literal(p2.width) ?? own6, "x");
|
|
13445
|
+
const height = extent(m2.height, literal(p2.height) ?? own6, "y");
|
|
13446
|
+
const small = [];
|
|
13447
|
+
if (width !== void 0 && m2.widthPath == null && width < MIN_TAP_TARGET) small.push(`${width} points wide`);
|
|
13448
|
+
if (height !== void 0 && m2.heightPath == null && height < MIN_TAP_TARGET) small.push(`${height} points tall`);
|
|
13449
|
+
if (!small.length) continue;
|
|
13450
|
+
issues.push({
|
|
13451
|
+
severity: "warning",
|
|
13452
|
+
pass: "touch-target",
|
|
13453
|
+
code: "touch_target_too_small",
|
|
13454
|
+
ruleCode: "touch_target_too_small",
|
|
13455
|
+
path: `${at2}.modifiers`,
|
|
13456
|
+
message: `touch_target_too_small: this tappable ${String(node3.body?.type)} is ${small.join(" and ")}, under the ${MIN_TAP_TARGET}-point target Apple and Material ask for (48 dp on Android). Add \`padding\` to its modifiers (or widen its \`width\` / \`height\` frame) until it reaches 44, or use a \`Button\` (\`iconOnly: true\` for a glyph), whose hit area every renderer grows to 44. See \`himi docs designing-himi-screens\`, "the phone rules".`
|
|
13457
|
+
});
|
|
13458
|
+
}
|
|
13459
|
+
return issues;
|
|
13460
|
+
}
|
|
13461
|
+
var MIN_TAP_TARGET, ROW_HOSTS2, ALTERNATIVE_KEYS, DATA_KEYS, TAP_MODIFIERS, FILLED_STYLES, isNode2, propsOf, modifiersOf2, conditional, filledButton, titleOf, literal;
|
|
13462
|
+
var init_design_lint = __esm({
|
|
13463
|
+
"../../core/dev-server/src/design-lint.ts"() {
|
|
13464
|
+
init_define_HHP_CATALOG();
|
|
13465
|
+
MIN_TAP_TARGET = 44;
|
|
13466
|
+
ROW_HOSTS2 = /* @__PURE__ */ new Set(["LazyList", "Grid", "Carousel"]);
|
|
13467
|
+
ALTERNATIVE_KEYS = /* @__PURE__ */ new Set(["loading", "empty", "error", "offline", "fallback", "placeholder", "fragments", "cases", "states", "skeleton"]);
|
|
13468
|
+
DATA_KEYS = /* @__PURE__ */ new Set(["args", "input", "params"]);
|
|
13469
|
+
TAP_MODIFIERS = ["onTap", "onLongPress", "onDoubleTap"];
|
|
13470
|
+
FILLED_STYLES = /* @__PURE__ */ new Set(["primary", "destructive", "filled", "prominent"]);
|
|
13471
|
+
isNode2 = (v2) => !!v2 && typeof v2 === "object" && !!v2.body && typeof v2.body?.type === "string";
|
|
13472
|
+
propsOf = (node3) => {
|
|
13473
|
+
const p2 = node3.body?.props;
|
|
13474
|
+
return p2 && typeof p2 === "object" && !Array.isArray(p2) ? p2 : {};
|
|
13475
|
+
};
|
|
13476
|
+
modifiersOf2 = (node3) => {
|
|
13477
|
+
const m2 = node3.modifiers;
|
|
13478
|
+
return m2 && typeof m2 === "object" && !Array.isArray(m2) ? m2 : {};
|
|
13479
|
+
};
|
|
13480
|
+
conditional = (node3) => {
|
|
13481
|
+
const m2 = modifiersOf2(node3);
|
|
13482
|
+
return m2.hidden === true || m2.hiddenPath != null;
|
|
13483
|
+
};
|
|
13484
|
+
filledButton = (node3) => {
|
|
13485
|
+
const p2 = propsOf(node3);
|
|
13486
|
+
if (node3.body?.type === "Fab") return true;
|
|
13487
|
+
if (node3.body?.type !== "Button" || p2.iconOnly === true) return false;
|
|
13488
|
+
return FILLED_STYLES.has(typeof p2.style === "string" ? p2.style : "primary");
|
|
13489
|
+
};
|
|
13490
|
+
titleOf = (node3) => {
|
|
13491
|
+
const t2 = propsOf(node3).title;
|
|
13492
|
+
return typeof t2 === "string" && t2.trim() !== "" ? t2.trim() : void 0;
|
|
13493
|
+
};
|
|
13494
|
+
literal = (v2) => typeof v2 === "number" && Number.isFinite(v2) ? v2 : void 0;
|
|
13495
|
+
}
|
|
13496
|
+
});
|
|
13497
|
+
|
|
13323
13498
|
// ../../core/ts/src/tokens.ts
|
|
13324
13499
|
function tonalElevationAlpha(level) {
|
|
13325
13500
|
if (typeof level !== "number" || !Number.isFinite(level)) return 0;
|
|
@@ -13364,13 +13539,13 @@ function buildTokenRegistry(tokens2) {
|
|
|
13364
13539
|
}
|
|
13365
13540
|
function findTokenViolations(payload, registry2, path2 = "$") {
|
|
13366
13541
|
const out2 = [];
|
|
13367
|
-
|
|
13542
|
+
walk2(payload, registry2, path2, out2);
|
|
13368
13543
|
return out2;
|
|
13369
13544
|
}
|
|
13370
|
-
function
|
|
13545
|
+
function walk2(node3, registry2, path2, out2) {
|
|
13371
13546
|
if (node3 === null || typeof node3 !== "object") return;
|
|
13372
13547
|
if (Array.isArray(node3)) {
|
|
13373
|
-
node3.forEach((item2, i2) =>
|
|
13548
|
+
node3.forEach((item2, i2) => walk2(item2, registry2, `${path2}[${i2}]`, out2));
|
|
13374
13549
|
return;
|
|
13375
13550
|
}
|
|
13376
13551
|
const obj13 = node3;
|
|
@@ -13414,7 +13589,7 @@ function walk(node3, registry2, path2, out2) {
|
|
|
13414
13589
|
for (const spec of typoProps ?? []) check(spec, "typography");
|
|
13415
13590
|
}
|
|
13416
13591
|
for (const [key4, value2] of Object.entries(obj13)) {
|
|
13417
|
-
|
|
13592
|
+
walk2(value2, registry2, `${path2}.${key4}`, out2);
|
|
13418
13593
|
}
|
|
13419
13594
|
}
|
|
13420
13595
|
function buttonVariant(style) {
|
|
@@ -15712,10 +15887,10 @@ function accessibleNameGaps(descriptor, options2 = {}) {
|
|
|
15712
15887
|
const out2 = [];
|
|
15713
15888
|
const interactiveOnly = options2.interactiveOnly === true;
|
|
15714
15889
|
const propHandlers = options2.propHandlers === true;
|
|
15715
|
-
const
|
|
15890
|
+
const walk3 = (node3, path2, key4, suppressed = false) => {
|
|
15716
15891
|
if (!node3 || typeof node3 !== "object") return;
|
|
15717
15892
|
if (Array.isArray(node3)) {
|
|
15718
|
-
node3.forEach((v2, i2) =>
|
|
15893
|
+
node3.forEach((v2, i2) => walk3(v2, `${path2}[${i2}]`, key4, suppressed));
|
|
15719
15894
|
return;
|
|
15720
15895
|
}
|
|
15721
15896
|
const n2 = node3;
|
|
@@ -15749,10 +15924,10 @@ function accessibleNameGaps(descriptor, options2 = {}) {
|
|
|
15749
15924
|
}
|
|
15750
15925
|
}
|
|
15751
15926
|
for (const [k3, v2] of Object.entries(n2)) {
|
|
15752
|
-
|
|
15927
|
+
walk3(v2, path2 ? `${path2}.${k3}` : k3, k3, k3 === "body" && viaBody && !deferToBody);
|
|
15753
15928
|
}
|
|
15754
15929
|
};
|
|
15755
|
-
|
|
15930
|
+
walk3(descriptor, "", "");
|
|
15756
15931
|
return out2;
|
|
15757
15932
|
}
|
|
15758
15933
|
var A11Y_CONTRACT, ACCESSIBLE_NAME_KEYS, CONTENT_ARM_KEYS, TAP_MODIFIER_KEYS, PROP_HANDLER_KEYS, RENDERED_NAME_PROPS;
|
|
@@ -16019,7 +16194,6 @@ function webViewOriginAllowed(url, origins) {
|
|
|
16019
16194
|
}
|
|
16020
16195
|
var init_webview_origin = __esm({
|
|
16021
16196
|
"../../core/ts/src/webview-origin.ts"() {
|
|
16022
|
-
"use strict";
|
|
16023
16197
|
init_define_HHP_CATALOG();
|
|
16024
16198
|
}
|
|
16025
16199
|
});
|
|
@@ -16080,7 +16254,7 @@ function childComponents(value2, path2, inTemplate, out2) {
|
|
|
16080
16254
|
for (const [k3, v2] of Object.entries(value2)) childComponents(v2, `${path2}.${k3}`, inTemplate || /Template$/.test(k3), out2);
|
|
16081
16255
|
}
|
|
16082
16256
|
function childrenOf(c2, path2, inTemplate) {
|
|
16083
|
-
const props2 =
|
|
16257
|
+
const props2 = propsOf2(c2);
|
|
16084
16258
|
const type2 = typeOf(c2);
|
|
16085
16259
|
const boundList = (type2 === "LazyList" || type2 === "Grid" || type2 === "Carousel") && hasItemsPath(props2);
|
|
16086
16260
|
const boundPages = type2 === "Pager" && hasPagesPath(props2);
|
|
@@ -16103,7 +16277,7 @@ function collectWebViews(descriptor) {
|
|
|
16103
16277
|
const sites = [];
|
|
16104
16278
|
const visit = (c2, path2, inTemplate) => {
|
|
16105
16279
|
if (typeOf(c2) === "WebView") {
|
|
16106
|
-
sites.push({ path: path2, id: typeof c2.id === "string" ? c2.id : "", props:
|
|
16280
|
+
sites.push({ path: path2, id: typeof c2.id === "string" ? c2.id : "", props: propsOf2(c2), inTemplate });
|
|
16107
16281
|
}
|
|
16108
16282
|
for (const child3 of childrenOf(c2, path2, inTemplate)) visit(child3.c, child3.path, child3.inTemplate);
|
|
16109
16283
|
};
|
|
@@ -16112,7 +16286,7 @@ function collectWebViews(descriptor) {
|
|
|
16112
16286
|
}
|
|
16113
16287
|
function mountable(c2, inTemplate = false) {
|
|
16114
16288
|
const type2 = typeOf(c2);
|
|
16115
|
-
const props2 =
|
|
16289
|
+
const props2 = propsOf2(c2);
|
|
16116
16290
|
const repeated = (n2) => inTemplate && n2 > 0 ? Infinity : n2;
|
|
16117
16291
|
if (type2 === "WebView") return repeated(isBridged(props2) ? 1 : 0);
|
|
16118
16292
|
if (type2 === "LazyList") {
|
|
@@ -16298,7 +16472,7 @@ function webViewEmbeddedAppFindings(screens) {
|
|
|
16298
16472
|
}
|
|
16299
16473
|
return out2;
|
|
16300
16474
|
}
|
|
16301
|
-
var MAX_SIMULTANEOUS_BRIDGED_WEBVIEWS, WEBVIEW_EMBEDDED_ENUMS, isRec, byCodeUnit, isComponent, typeOf,
|
|
16475
|
+
var MAX_SIMULTANEOUS_BRIDGED_WEBVIEWS, WEBVIEW_EMBEDDED_ENUMS, isRec, byCodeUnit, isComponent, typeOf, propsOf2, hasItemsPath, hasPagesPath, isBridged, configOf, isPerInstance, isLiteral, isItemDerived;
|
|
16302
16476
|
var init_webview_embedded = __esm({
|
|
16303
16477
|
"../../core/ts/src/webview-embedded.ts"() {
|
|
16304
16478
|
init_define_HHP_CATALOG();
|
|
@@ -16317,7 +16491,7 @@ var init_webview_embedded = __esm({
|
|
|
16317
16491
|
const body = c2.body;
|
|
16318
16492
|
return body.package === "himalaya" ? body.type : null;
|
|
16319
16493
|
};
|
|
16320
|
-
|
|
16494
|
+
propsOf2 = (c2) => {
|
|
16321
16495
|
const p2 = c2.body.props;
|
|
16322
16496
|
return isRec(p2) ? p2 : {};
|
|
16323
16497
|
};
|
|
@@ -18140,9 +18314,9 @@ function nativeRequiredFindings(descriptor) {
|
|
|
18140
18314
|
if (inner !== void 0 && (inner !== null || sub.endsWith("!"))) checkNested(inner, sub, `${path2}.${name}`, from);
|
|
18141
18315
|
}
|
|
18142
18316
|
};
|
|
18143
|
-
const
|
|
18317
|
+
const walk3 = (node3, at2) => {
|
|
18144
18318
|
if (Array.isArray(node3)) {
|
|
18145
|
-
node3.forEach((v2, i2) =>
|
|
18319
|
+
node3.forEach((v2, i2) => walk3(v2, `${at2}[${i2}]`));
|
|
18146
18320
|
return;
|
|
18147
18321
|
}
|
|
18148
18322
|
if (!node3 || typeof node3 !== "object") return;
|
|
@@ -18176,10 +18350,10 @@ function nativeRequiredFindings(descriptor) {
|
|
|
18176
18350
|
for (const [k3, v2] of Object.entries(record3)) {
|
|
18177
18351
|
if (isOpaqueAuthorJson(k3, v2, at2 === "")) continue;
|
|
18178
18352
|
if (isLenientTopBarSubtree(at2, k3)) continue;
|
|
18179
|
-
|
|
18353
|
+
walk3(v2, at2 ? `${at2}.${k3}` : k3);
|
|
18180
18354
|
}
|
|
18181
18355
|
};
|
|
18182
|
-
|
|
18356
|
+
walk3(descriptor, "");
|
|
18183
18357
|
if (descriptor && typeof descriptor === "object" && !Array.isArray(descriptor)) {
|
|
18184
18358
|
const root = descriptor;
|
|
18185
18359
|
for (const [field, cls] of Object.entries(NATIVE_DESCRIPTOR_NESTED)) {
|
|
@@ -18221,9 +18395,9 @@ function jsonPointer(dotted) {
|
|
|
18221
18395
|
}
|
|
18222
18396
|
function componentPropFindings(descriptor) {
|
|
18223
18397
|
const out2 = [];
|
|
18224
|
-
const
|
|
18398
|
+
const walk3 = (node3, at2) => {
|
|
18225
18399
|
if (Array.isArray(node3)) {
|
|
18226
|
-
node3.forEach((v2, i2) =>
|
|
18400
|
+
node3.forEach((v2, i2) => walk3(v2, `${at2}[${i2}]`));
|
|
18227
18401
|
return;
|
|
18228
18402
|
}
|
|
18229
18403
|
if (!node3 || typeof node3 !== "object") return;
|
|
@@ -18407,10 +18581,10 @@ function componentPropFindings(descriptor) {
|
|
|
18407
18581
|
}
|
|
18408
18582
|
for (const [k3, v2] of Object.entries(record3)) {
|
|
18409
18583
|
if (isOpaqueAuthorJson(k3, v2, at2 === "")) continue;
|
|
18410
|
-
|
|
18584
|
+
walk3(v2, at2 ? `${at2}.${k3}` : k3);
|
|
18411
18585
|
}
|
|
18412
18586
|
};
|
|
18413
|
-
|
|
18587
|
+
walk3(descriptor, "");
|
|
18414
18588
|
return out2;
|
|
18415
18589
|
}
|
|
18416
18590
|
function enumFieldNames(schema2 = screenDescriptorSchema) {
|
|
@@ -18672,8 +18846,8 @@ function richContentFindings(descriptor) {
|
|
|
18672
18846
|
if (body?.package === "himalaya" && body.type === "RichContent") {
|
|
18673
18847
|
const props2 = body.props ?? {};
|
|
18674
18848
|
const docPath = typeof props2.documentJsonPath === "string" && props2.documentJsonPath !== "" ? props2.documentJsonPath : void 0;
|
|
18675
|
-
const
|
|
18676
|
-
if (docPath === void 0 === (
|
|
18849
|
+
const literal3 = typeof props2.documentJson === "string" ? props2.documentJson : void 0;
|
|
18850
|
+
if (docPath === void 0 === (literal3 === void 0)) {
|
|
18677
18851
|
out2.push({ path: path2, message: "RichContent needs exactly one of documentJsonPath and documentJson" });
|
|
18678
18852
|
}
|
|
18679
18853
|
if (docPath !== void 0 && !docPath.startsWith("$service:") && !docPath.startsWith("$item.")) {
|
|
@@ -18681,8 +18855,8 @@ function richContentFindings(descriptor) {
|
|
|
18681
18855
|
} else if (docPath?.startsWith("$item.") && !/^\$item\.[A-Za-z0-9_]+$/.test(docPath)) {
|
|
18682
18856
|
out2.push({ path: path2, message: `RichContent.documentJsonPath "${docPath}" must name one row field: "$item.<letters, digits, _>"` });
|
|
18683
18857
|
}
|
|
18684
|
-
if (
|
|
18685
|
-
const laid = layoutRichContent(
|
|
18858
|
+
if (literal3 !== void 0) {
|
|
18859
|
+
const laid = layoutRichContent(literal3);
|
|
18686
18860
|
if ("rejected" in laid) {
|
|
18687
18861
|
out2.push({ path: path2, message: `RichContent.documentJson is rejected by the renderers (${laid.rejected}) \u2014 every surface would show the fallback` });
|
|
18688
18862
|
}
|
|
@@ -18710,13 +18884,13 @@ function richContentEditorFindings(descriptor) {
|
|
|
18710
18884
|
if (isHimalaya && body.type === "RichContentEditor") {
|
|
18711
18885
|
const p2 = body.props ?? {};
|
|
18712
18886
|
const docPath = typeof p2.documentPath === "string" && p2.documentPath !== "" ? p2.documentPath : void 0;
|
|
18713
|
-
const
|
|
18714
|
-
if (docPath !== void 0 &&
|
|
18887
|
+
const literal3 = typeof p2.documentJson === "string" ? p2.documentJson : void 0;
|
|
18888
|
+
if (docPath !== void 0 && literal3 !== void 0) out2.push({ path: path2, message: "RichContentEditor takes at most one of documentPath and documentJson" });
|
|
18715
18889
|
if (docPath !== void 0 && !docPath.startsWith("$service:")) out2.push({ path: path2, message: `RichContentEditor.documentPath must be a "$service:" binding, got "${docPath}"` });
|
|
18716
|
-
if (
|
|
18890
|
+
if (literal3 !== void 0) {
|
|
18717
18891
|
let doc;
|
|
18718
18892
|
try {
|
|
18719
|
-
doc = JSON.parse(
|
|
18893
|
+
doc = JSON.parse(literal3);
|
|
18720
18894
|
} catch {
|
|
18721
18895
|
doc = void 0;
|
|
18722
18896
|
}
|
|
@@ -19956,6 +20130,8 @@ function validateScreenDescriptor(screenId, served, opts = {}) {
|
|
|
19956
20130
|
issues.push(...manualPaginationIssues(descriptor));
|
|
19957
20131
|
issues.push(...motionBindingIssues(descriptor));
|
|
19958
20132
|
issues.push(...pagedListNestingIssues(descriptor));
|
|
20133
|
+
issues.push(...prominentActionIssues(descriptor));
|
|
20134
|
+
issues.push(...touchTargetIssues(descriptor));
|
|
19959
20135
|
issues.push(...webViewEmbeddedIssues(webViewEmbeddedFindings(descriptor)));
|
|
19960
20136
|
return {
|
|
19961
20137
|
screenId,
|
|
@@ -19984,6 +20160,7 @@ var init_validate_descriptor_core = __esm({
|
|
|
19984
20160
|
init_manual_pagination_lint();
|
|
19985
20161
|
init_motion_bindings_lint();
|
|
19986
20162
|
init_fast_screen_lint();
|
|
20163
|
+
init_design_lint();
|
|
19987
20164
|
init_validator();
|
|
19988
20165
|
init_declared_navigation_lint();
|
|
19989
20166
|
init_validator();
|
|
@@ -24659,6 +24836,17 @@ var init_hhp_command = __esm({
|
|
|
24659
24836
|
});
|
|
24660
24837
|
|
|
24661
24838
|
// src/hhp.ts
|
|
24839
|
+
var hhp_exports = {};
|
|
24840
|
+
__export(hhp_exports, {
|
|
24841
|
+
compileContentHhp: () => compileContentHhp,
|
|
24842
|
+
fidelityThresholds: () => fidelityThresholds,
|
|
24843
|
+
hhpEditorSettings: () => hhpEditorSettings,
|
|
24844
|
+
initHhpScreen: () => initHhpScreen,
|
|
24845
|
+
localPath: () => localPath,
|
|
24846
|
+
managedRegistry: () => managedRegistry,
|
|
24847
|
+
profileForContent: () => profileForContent,
|
|
24848
|
+
readHhpManifest: () => readHhpManifest
|
|
24849
|
+
});
|
|
24662
24850
|
import { existsSync as existsSync21, readFileSync as readFileSync22, writeFileSync as writeFileSync12, mkdirSync as mkdirSync14, renameSync as renameSync6, rmSync as rmSync8, lstatSync as lstatSync10, readdirSync as readdirSync15 } from "node:fs";
|
|
24663
24851
|
import { basename as basename8, dirname as dirname17, resolve as resolve22, relative as relative7, sep as sep10, join as join17 } from "node:path";
|
|
24664
24852
|
import { createHash as createHash7, randomUUID as randomUUID5 } from "node:crypto";
|
|
@@ -24921,16 +25109,16 @@ function pruneRasters(root, rasters) {
|
|
|
24921
25109
|
const assetsDir = findAssetsDir(root);
|
|
24922
25110
|
const dir = assetsDir && join17(assetsDir, RASTER_DIR);
|
|
24923
25111
|
if (!dir || !existsSync21(dir)) return;
|
|
24924
|
-
const
|
|
25112
|
+
const walk3 = (abs) => {
|
|
24925
25113
|
for (const entry of readdirSync15(abs, { withFileTypes: true })) {
|
|
24926
25114
|
const child3 = join17(abs, entry.name);
|
|
24927
25115
|
if (entry.isDirectory()) {
|
|
24928
|
-
|
|
25116
|
+
walk3(child3);
|
|
24929
25117
|
if (!readdirSync15(child3).length) rmSync8(child3, { recursive: true });
|
|
24930
25118
|
} else if (entry.isFile() && RASTER_FILE.test(entry.name) && !keep.has(child3)) rmSync8(child3);
|
|
24931
25119
|
}
|
|
24932
25120
|
};
|
|
24933
|
-
|
|
25121
|
+
walk3(dir);
|
|
24934
25122
|
if (!readdirSync15(dir).length) rmSync8(dir, { recursive: true });
|
|
24935
25123
|
}
|
|
24936
25124
|
async function initHhpScreen(root, id) {
|
|
@@ -25674,10 +25862,10 @@ function inferScreenDisplayName(screenId) {
|
|
|
25674
25862
|
return `${words || screenId}${opaque2 ? ` (${opaque2[1]})` : ""}`;
|
|
25675
25863
|
}
|
|
25676
25864
|
function screenDisplayName(screenId, displayName3, title, navigationLabel) {
|
|
25677
|
-
const
|
|
25678
|
-
if (
|
|
25679
|
-
if (
|
|
25680
|
-
if (
|
|
25865
|
+
const literal3 = (value2) => typeof value2 === "string" && !!value2.trim() && !value2.trim().startsWith("$") && !/^__[A-Z0-9_]+__$/.test(value2.trim());
|
|
25866
|
+
if (literal3(displayName3)) return displayName3.trim();
|
|
25867
|
+
if (literal3(title) && title.trim() !== screenId) return title.trim();
|
|
25868
|
+
if (literal3(navigationLabel)) return navigationLabel.trim();
|
|
25681
25869
|
return inferScreenDisplayName(screenId);
|
|
25682
25870
|
}
|
|
25683
25871
|
var ScreenViewValidationError, ID, object;
|
|
@@ -31541,6 +31729,7 @@ function resolveIdiom(tokens2, ctx = {}) {
|
|
|
31541
31729
|
var IDIOM_CONTEXTS, UNSAFE_KEYS;
|
|
31542
31730
|
var init_idiom = __esm({
|
|
31543
31731
|
"../../core/ts/src/idiom.ts"() {
|
|
31732
|
+
"use strict";
|
|
31544
31733
|
init_define_HHP_CATALOG();
|
|
31545
31734
|
IDIOM_CONTEXTS = {
|
|
31546
31735
|
ios: { native: ["ios"] },
|
|
@@ -31654,10 +31843,12 @@ var init_idiom_controls = __esm({
|
|
|
31654
31843
|
section: { headerCase: "none", headerColor: "accentPrimary", headerSize: 14, headerWeight: 500, headerLetterSpacing: 0.1, fill: ["surfaceSecondary", "surfacePrimary"], outline: 0, radius: 20 },
|
|
31655
31844
|
// ModalBottomSheet + BottomSheetDefaults.DragHandle: a 32×4 handle, 28dp top corners.
|
|
31656
31845
|
sheet: { cornerRadius: 28, grabberWidth: 32, grabberHeight: 4 },
|
|
31657
|
-
// HimalayaAppShell draws
|
|
31658
|
-
//
|
|
31659
|
-
//
|
|
31660
|
-
|
|
31846
|
+
// HimalayaAppShell draws a Material 3 small top app bar: the navigation icon (ArrowBack or the
|
|
31847
|
+
// menu), the screen's title start-aligned beside it in titleLarge (22sp, shellTopBarTitle), and
|
|
31848
|
+
// the trailing actions. A titled screen reserves the bar's band in the content's flow unless it
|
|
31849
|
+
// is immersive (ScreenView.kt `reservesBand`); a sticky header, `leading: "none"` or a bar search
|
|
31850
|
+
// keeps the bar untitled (shellTitleText).
|
|
31851
|
+
navBar: { rootTitle: "small", pushedTitle: "small", back: "arrow", inlineTitleSize: 22, largeTitleSize: 0, hideWithStickyChrome: false },
|
|
31661
31852
|
// M3 Buttons and `Modifier.clickable` (every `onTap`, SDUIRenderer.kt) ripple. The web draws
|
|
31662
31853
|
// the M3 pressed state layer (10% of the content colour), not the expanding circle.
|
|
31663
31854
|
press: { button: "ripple", tappable: "ripple", highlightOpacity: 1, stateLayerOpacity: 0.1 },
|
|
@@ -38369,14 +38560,14 @@ var init_images = __esm({
|
|
|
38369
38560
|
});
|
|
38370
38561
|
|
|
38371
38562
|
// ../../core/dev-server/src/stable-ids.ts
|
|
38372
|
-
function
|
|
38563
|
+
function isNode3(v2) {
|
|
38373
38564
|
if (typeof v2 !== "object" || v2 === null) return false;
|
|
38374
38565
|
const n2 = v2;
|
|
38375
38566
|
return typeof n2.id === "string" && typeof n2.body === "object" && n2.body !== null && typeof n2.body.type === "string";
|
|
38376
38567
|
}
|
|
38377
38568
|
function forEachChildComponent(node3, cb) {
|
|
38378
38569
|
const visit = (v2) => {
|
|
38379
|
-
if (
|
|
38570
|
+
if (isNode3(v2)) {
|
|
38380
38571
|
cb(v2);
|
|
38381
38572
|
return;
|
|
38382
38573
|
}
|
|
@@ -38392,7 +38583,7 @@ function forEachChildComponent(node3, cb) {
|
|
|
38392
38583
|
}
|
|
38393
38584
|
function visitComponents(root, cb) {
|
|
38394
38585
|
const visit = (value2) => {
|
|
38395
|
-
if (
|
|
38586
|
+
if (isNode3(value2)) {
|
|
38396
38587
|
cb(value2);
|
|
38397
38588
|
visit(value2.body.props);
|
|
38398
38589
|
return;
|
|
@@ -38432,9 +38623,9 @@ function assignStableIds(descriptor) {
|
|
|
38432
38623
|
assign2(child3, `${path2}/${seg2}`);
|
|
38433
38624
|
});
|
|
38434
38625
|
};
|
|
38435
|
-
if (
|
|
38436
|
-
if (
|
|
38437
|
-
if (
|
|
38626
|
+
if (isNode3(descriptor.payload)) assign2(descriptor.payload, descriptor.screenId);
|
|
38627
|
+
if (isNode3(descriptor.stickyHeader)) assign2(descriptor.stickyHeader, `${descriptor.screenId}/stickyHeader`);
|
|
38628
|
+
if (isNode3(descriptor.stickyFooter)) assign2(descriptor.stickyFooter, `${descriptor.screenId}/stickyFooter`);
|
|
38438
38629
|
}
|
|
38439
38630
|
var init_stable_ids = __esm({
|
|
38440
38631
|
"../../core/dev-server/src/stable-ids.ts"() {
|
|
@@ -40162,7 +40353,7 @@ function isBranchSelector(kind, key4) {
|
|
|
40162
40353
|
}
|
|
40163
40354
|
function unsupportedConstructs(pattern) {
|
|
40164
40355
|
const out2 = [];
|
|
40165
|
-
const
|
|
40356
|
+
const walk3 = (s5, inPlural) => {
|
|
40166
40357
|
let i2 = 0;
|
|
40167
40358
|
while (i2 < s5.length) {
|
|
40168
40359
|
const c2 = s5[i2];
|
|
@@ -40230,13 +40421,13 @@ function unsupportedConstructs(pattern) {
|
|
|
40230
40421
|
if (kind === "plural" && inPlural) {
|
|
40231
40422
|
out2.push(`plural "${name}" nested in a plural (the outer # replaces its own)`);
|
|
40232
40423
|
}
|
|
40233
|
-
for (const { body: body2 } of entries)
|
|
40424
|
+
for (const { body: body2 } of entries) walk3(body2, inPlural || kind === "plural");
|
|
40234
40425
|
continue;
|
|
40235
40426
|
}
|
|
40236
40427
|
out2.push(`${kind} argument "${name}"${spec !== void 0 && spec.trim() ? ` (${spec.trim()})` : ""}`);
|
|
40237
40428
|
}
|
|
40238
40429
|
};
|
|
40239
|
-
|
|
40430
|
+
walk3(pattern, false);
|
|
40240
40431
|
return out2;
|
|
40241
40432
|
}
|
|
40242
40433
|
var MAX_NESTING, PLURAL_SELECTOR, SELECT_SELECTOR;
|
|
@@ -40537,7 +40728,7 @@ var init_image_preview = __esm({
|
|
|
40537
40728
|
const mode = this.mode;
|
|
40538
40729
|
if (!mode) return [];
|
|
40539
40730
|
const result = [];
|
|
40540
|
-
const
|
|
40731
|
+
const walk3 = (entries, item2, rows, steps) => {
|
|
40541
40732
|
for (const e2 of entries) {
|
|
40542
40733
|
const trail = e2.pageIndex === void 0 ? steps : [...steps, { id: e2.nodeId, index: e2.pageIndex, rows }];
|
|
40543
40734
|
if (hiddenBool(resolve31(e2.hiddenPath, state, item2, false, env))) continue;
|
|
@@ -40547,10 +40738,10 @@ var init_image_preview = __esm({
|
|
|
40547
40738
|
const raw = resolve31(e2.type === "StatefulSection" ? e2.props.state : e2.props.casePath ?? e2.props.case_path, state, item2, false, env);
|
|
40548
40739
|
if (e2.type === "StatefulSection") {
|
|
40549
40740
|
const slot = shown2 ?? sectionSlot(raw);
|
|
40550
|
-
|
|
40741
|
+
walk3(e2.branches.find((b3) => b3.id === slot)?.entries ?? [], item2, rows, trail);
|
|
40551
40742
|
} else {
|
|
40552
40743
|
const selected = e2.branches.find((b3) => b3.id === (shown2 ?? raw)) ?? e2.branches.find((b3) => b3.id === (e2.props.defaultCase ?? e2.props.default_case)) ?? e2.branches[0];
|
|
40553
|
-
|
|
40744
|
+
walk3(selected?.entries ?? [], item2, rows, trail);
|
|
40554
40745
|
}
|
|
40555
40746
|
continue;
|
|
40556
40747
|
}
|
|
@@ -40586,11 +40777,11 @@ var init_image_preview = __esm({
|
|
|
40586
40777
|
const local = typeof e2.itemsPath === "string" && e2.itemsPath.startsWith("$item.");
|
|
40587
40778
|
const expanded = items.flatMap((raw, index) => raw && typeof raw === "object" && !Array.isArray(raw) ? [{ ...object2(raw), __index: index }] : local ? [{ value: raw, __index: index }] : []);
|
|
40588
40779
|
const keys2 = imagePreviewRowKeys(expanded, e2.templateId ?? "");
|
|
40589
|
-
expanded.forEach((next, index) =>
|
|
40590
|
-
} else
|
|
40780
|
+
expanded.forEach((next, index) => walk3(e2.children, next, [...rows, keys2[index]], [...trail, { id: e2.nodeId, index, rows }]));
|
|
40781
|
+
} else walk3(e2.children, item2, rows, trail);
|
|
40591
40782
|
}
|
|
40592
40783
|
};
|
|
40593
|
-
|
|
40784
|
+
walk3(this.entries, row2, [], []);
|
|
40594
40785
|
return result;
|
|
40595
40786
|
}
|
|
40596
40787
|
};
|
|
@@ -54276,7 +54467,7 @@ var init_pdf = __esm({
|
|
|
54276
54467
|
items,
|
|
54277
54468
|
styles: /* @__PURE__ */ Object.create(null)
|
|
54278
54469
|
};
|
|
54279
|
-
function
|
|
54470
|
+
function walk3(node3) {
|
|
54280
54471
|
if (!node3) {
|
|
54281
54472
|
return;
|
|
54282
54473
|
}
|
|
@@ -54300,10 +54491,10 @@ var init_pdf = __esm({
|
|
|
54300
54491
|
return;
|
|
54301
54492
|
}
|
|
54302
54493
|
for (const child3 of node3.children) {
|
|
54303
|
-
|
|
54494
|
+
walk3(child3);
|
|
54304
54495
|
}
|
|
54305
54496
|
}
|
|
54306
|
-
|
|
54497
|
+
walk3(xfa);
|
|
54307
54498
|
return output;
|
|
54308
54499
|
}
|
|
54309
54500
|
static shouldBuildText(name) {
|
|
@@ -129531,7 +129722,7 @@ function hasInteractiveDescendant(node3) {
|
|
|
129531
129722
|
}
|
|
129532
129723
|
function nameFromOwnContent(root) {
|
|
129533
129724
|
const parts = [];
|
|
129534
|
-
const
|
|
129725
|
+
const walk3 = (n2) => {
|
|
129535
129726
|
for (const child3 of Array.from(n2.childNodes)) {
|
|
129536
129727
|
if (child3.nodeType === 3) {
|
|
129537
129728
|
const t2 = child3.textContent?.trim();
|
|
@@ -129539,11 +129730,11 @@ function nameFromOwnContent(root) {
|
|
|
129539
129730
|
} else if (child3.nodeType === 1 && !child3.matches(NAME_SKIP_SELECTOR)) {
|
|
129540
129731
|
const own6 = child3.getAttribute("aria-label")?.trim() || (child3.tagName === "IMG" ? child3.getAttribute("alt")?.trim() : void 0);
|
|
129541
129732
|
if (own6) parts.push(own6);
|
|
129542
|
-
else
|
|
129733
|
+
else walk3(child3);
|
|
129543
129734
|
}
|
|
129544
129735
|
}
|
|
129545
129736
|
};
|
|
129546
|
-
|
|
129737
|
+
walk3(root);
|
|
129547
129738
|
return parts.join(" ").replace(/\s+/g, " ").trim();
|
|
129548
129739
|
}
|
|
129549
129740
|
function trackActivatorName(activator) {
|
|
@@ -134732,8 +134923,8 @@ var init_renderNode = __esm({
|
|
|
134732
134923
|
let countAttrs;
|
|
134733
134924
|
let countContent;
|
|
134734
134925
|
if (props2.animateValue === true && !ctx.reduceMotion()) {
|
|
134735
|
-
const
|
|
134736
|
-
const parsed =
|
|
134926
|
+
const literal3 = typeof props2.text === "string" && !isBinding(props2.text) ? props2.text : void 0;
|
|
134927
|
+
const parsed = literal3 != null ? parseCountUp(literal3) : null;
|
|
134737
134928
|
if (parsed) {
|
|
134738
134929
|
ensureCountUpRuntime();
|
|
134739
134930
|
countAttrs = {
|
|
@@ -135981,7 +136172,7 @@ var init_renderNode = __esm({
|
|
|
135981
136172
|
const gated2 = props2.presentedPath != null || props2.presented != null;
|
|
135982
136173
|
const gate = props2.presentedPath != null ? bound2 : props2.presented;
|
|
135983
136174
|
const gateOpen = gate === true || gate === "true";
|
|
135984
|
-
const
|
|
136175
|
+
const literal3 = props2.presentedPath == null && props2.presented != null;
|
|
135985
136176
|
const identity = { path: props2.presentedPath, presented: props2.presented, provider: ctx.provider };
|
|
135986
136177
|
const [local, setLocal] = React20.useState({ ...identity, opened: false, dismissed: false });
|
|
135987
136178
|
const sameGate = local.path === identity.path && local.presented === identity.presented && local.provider === identity.provider;
|
|
@@ -136035,7 +136226,7 @@ var init_renderNode = __esm({
|
|
|
136035
136226
|
}, [gated2, shown2, props2.presentedPath, props2.presented, ctx.provider]);
|
|
136036
136227
|
const floating = gated2 ? { position: "absolute", zIndex: 40, ...overlayEdgeStyle(placed, 6), translate: `${placement.x}px ${placement.y}px` } : {};
|
|
136037
136228
|
const inline = gated2 ? null : inlineEdgeFlex(resolveOverlayEdge("Popover", props2.edge));
|
|
136038
|
-
const openFromAnchor =
|
|
136229
|
+
const openFromAnchor = literal3 ? () => {
|
|
136039
136230
|
if (shown2) return;
|
|
136040
136231
|
setLocal({ ...identity, opened: true, dismissed: false });
|
|
136041
136232
|
} : void 0;
|
|
@@ -136043,9 +136234,9 @@ var init_renderNode = __esm({
|
|
|
136043
136234
|
const [needsSeparateOpener, setNeedsSeparateOpener] = React20.useState(false);
|
|
136044
136235
|
useIsomorphicLayoutEffect2(() => {
|
|
136045
136236
|
const el2 = anchorRef.current;
|
|
136046
|
-
const want =
|
|
136237
|
+
const want = literal3 && el2 != null && !hasTabStop(el2);
|
|
136047
136238
|
if (want !== anchorIsButton) setAnchorIsButton(want);
|
|
136048
|
-
const needsOpener =
|
|
136239
|
+
const needsOpener = literal3 && el2 != null && Array.from(el2.querySelectorAll(NATIVELY_TABBABLE)).some((control) => control.tabIndex >= 0 && !control.disabled && !control.matches('button,a[href],area[href],summary,input[type="button"],input[type="submit"],input[type="reset"],input[type="checkbox"],input[type="radio"],[role="button"],[role="link"]'));
|
|
136049
136240
|
if (needsOpener !== needsSeparateOpener) setNeedsSeparateOpener(needsOpener);
|
|
136050
136241
|
});
|
|
136051
136242
|
const anchorButtonProps = anchorIsButton ? {
|
|
@@ -136059,9 +136250,9 @@ var init_renderNode = __esm({
|
|
|
136059
136250
|
} : {};
|
|
136060
136251
|
return /* @__PURE__ */ jsxs10("div", { ref: boxRef, ...inline ? { "data-hm-popover-edge": inline.edge } : {}, style: { ...gated2 ? { position: "relative" } : {}, display: "inline-flex", flexDirection: inline?.flexDirection ?? "column", alignItems: inline?.alignItems ?? "flex-start", gap: 6, ...gated2 ? overlayAnchorFrame(wrap).host : wrap }, children: [
|
|
136061
136252
|
props2.anchor ? gated2 ? /* @__PURE__ */ jsx13("span", { ref: anchorRef, onClickCapture: needsSeparateOpener ? void 0 : openFromAnchor, ...anchorButtonProps, "data-hm-popover-anchor": "", style: { display: anchorIsButton ? "inline-flex" : "contents", ...wrap.overflow === "hidden" && wrap.width === "100%" ? { width: "100%" } : {} }, children: /* @__PURE__ */ jsxs10(OverlayAnchorClip, { wrap, style: { flexDirection: "column", alignItems: "flex-start", gap: 6 }, children: [
|
|
136062
|
-
renderNode(props2.anchor,
|
|
136253
|
+
renderNode(props2.anchor, literal3 ? { ...ctx, imagePreview: void 0, imagePreviewBlocked: true } : ctx),
|
|
136063
136254
|
needsSeparateOpener && /* @__PURE__ */ jsx13("button", { type: "button", "aria-haspopup": "dialog", "aria-expanded": shown2, onClick: openFromAnchor, children: "Show details" })
|
|
136064
|
-
] }) }) : renderNode(props2.anchor,
|
|
136255
|
+
] }) }) : renderNode(props2.anchor, literal3 ? { ...ctx, imagePreview: void 0, imagePreviewBlocked: true } : ctx) : null,
|
|
136065
136256
|
shown2 && /* @__PURE__ */ jsx13("div", { ref: dialogRef, role: "dialog", ...gated2 ? { [PRESENTED_OVERLAY_ATTR]: "", "data-hm-popover-edge": placed } : {}, "aria-modal": modal ? "true" : void 0, tabIndex: modal ? -1 : void 0, onKeyDown: modal ? trapTab : void 0, "aria-label": props2.title != null ? asBoundText(props2.title, ctx) : "Popover", style: { minWidth: Math.min(160, placement.maxWidth), maxWidth: Math.min(280, placement.maxWidth), overflowWrap: placement.maxWidth < 280 ? "anywhere" : void 0, background: C2("surfacePrimary", "#fff"), border: `1px solid ${C2("border", "#e3e3e3")}`, borderRadius: 12, boxShadow: "0 6px 20px rgba(0,0,0,.14)", padding: 12, ...floating }, children: props2.content ? renderNode(props2.content, ctx) : null })
|
|
136066
136257
|
] });
|
|
136067
136258
|
});
|
|
@@ -136646,8 +136837,8 @@ var init_renderNode = __esm({
|
|
|
136646
136837
|
const boundState = useResolvedScalar(props2.statePath, ctx);
|
|
136647
136838
|
const boundDelivery = useResolvedScalar(props2.deliveryPath, ctx);
|
|
136648
136839
|
const boundRate = useResolvedScalar(props2.ratePath, ctx);
|
|
136649
|
-
const num5 = (bound2,
|
|
136650
|
-
const v2 = bound2 !== void 0 && bound2 !== null ? bound2 :
|
|
136840
|
+
const num5 = (bound2, literal3, dflt) => {
|
|
136841
|
+
const v2 = bound2 !== void 0 && bound2 !== null ? bound2 : literal3;
|
|
136651
136842
|
const n2 = typeof v2 === "number" ? v2 : typeof v2 === "string" ? Number(v2) : NaN;
|
|
136652
136843
|
return Number.isFinite(n2) ? n2 : dflt;
|
|
136653
136844
|
};
|
|
@@ -138817,6 +139008,16 @@ function platformFrameElement(spec, ctx, content, text25) {
|
|
|
138817
139008
|
title != null && /* @__PURE__ */ jsx14("div", { role: "heading", "aria-level": 1, style: { position: "absolute", left: 80, right: 80, textAlign: "center", fontSize: nav.inlineTitleSize, fontWeight: 600, color: ink, whiteSpace: "nowrap", overflow: "hidden", textOverflow: "ellipsis" }, children: title }),
|
|
138818
139009
|
trailing
|
|
138819
139010
|
] });
|
|
139011
|
+
} else if (shape === "small") {
|
|
139012
|
+
const literalTitle = typeof spec.title === "string" && spec.title.trim() !== "" && (!spec.title.trim().startsWith("$") || spec.title.trim().startsWith("$t:"));
|
|
139013
|
+
const smallTitle = literalTitle && !spec.hasStickyHeader && !spec.leadingNone && !spec.immersive && !spec.searchable ? text25(spec.title) : null;
|
|
139014
|
+
if (smallTitle != null || leading || trailing) {
|
|
139015
|
+
navBar = /* @__PURE__ */ jsxs11("div", { "data-testid": "platform-nav-bar", "data-title": smallTitle != null ? "small" : "none", style: { fontFamily: font, height: 48, padding: "0 4px", display: "flex", alignItems: "center" }, children: [
|
|
139016
|
+
leading,
|
|
139017
|
+
smallTitle != null && /* @__PURE__ */ jsx14("div", { role: "heading", "aria-level": 1, style: { flex: 1, minWidth: 0, paddingInlineStart: leading ? 4 : 12, paddingInlineEnd: 12, fontSize: nav.inlineTitleSize, fontWeight: 400, lineHeight: "28px", color: ink, whiteSpace: "nowrap", overflow: "hidden", textOverflow: "ellipsis" }, children: smallTitle }),
|
|
139018
|
+
trailing
|
|
139019
|
+
] });
|
|
139020
|
+
}
|
|
138820
139021
|
} else if (!barGone && nav.back === "arrow" && (leading || trailing)) {
|
|
138821
139022
|
navBar = /* @__PURE__ */ jsxs11("div", { "data-testid": "platform-nav-bar", "data-title": "none", style: { height: 48, padding: "0 4px", display: "flex", alignItems: "center" }, children: [
|
|
138822
139023
|
leading,
|
|
@@ -139039,6 +139240,8 @@ __export(src_exports2, {
|
|
|
139039
139240
|
useBoundValue: () => useBoundValue,
|
|
139040
139241
|
useImageSource: () => useImageSource,
|
|
139041
139242
|
videoObjectFit: () => videoObjectFit,
|
|
139243
|
+
webViewOriginAllowed: () => webViewOriginAllowed,
|
|
139244
|
+
webViewWebConfig: () => webViewWebConfig,
|
|
139042
139245
|
webviewFrameSandbox: () => webviewFrameSandbox,
|
|
139043
139246
|
withAssetPin: () => withAssetPin
|
|
139044
139247
|
});
|
|
@@ -139088,16 +139291,16 @@ __export(render_descriptor_exports, {
|
|
|
139088
139291
|
});
|
|
139089
139292
|
function a11ySemantics(type2, props2, modifiers, ancestorHidden, resolve116) {
|
|
139090
139293
|
if (!A11Y_MODIFIER_KEYS.some((k3) => modifiers[k3] !== void 0)) return void 0;
|
|
139091
|
-
const
|
|
139294
|
+
const literal3 = (v2) => typeof v2 === "string" && v2.trim() !== "" && !isDynamicValue(v2) ? v2 : void 0;
|
|
139092
139295
|
const spoken = (v2) => {
|
|
139093
|
-
const lit =
|
|
139296
|
+
const lit = literal3(v2);
|
|
139094
139297
|
if (lit !== void 0 || !resolve116 || typeof v2 !== "string" || !isDynamicValue(v2)) return lit;
|
|
139095
139298
|
const r3 = resolve116(v2);
|
|
139096
139299
|
if (r3 === v2) return void 0;
|
|
139097
139300
|
return typeof r3 === "string" && r3.trim() !== "" ? r3 : typeof r3 === "number" ? String(r3) : void 0;
|
|
139098
139301
|
};
|
|
139099
139302
|
const exposure = ancestorHidden ? "hidden" : atExposureOf({ ...props2, modifiers });
|
|
139100
|
-
const declared =
|
|
139303
|
+
const declared = literal3(modifiers.accessibilityRole);
|
|
139101
139304
|
const inferred = (typeof modifiers.headingLevel === "number" ? "heading" : void 0) ?? (type2 === "SelectionControl" && props2.kind === "radio" ? "radio" : void 0) ?? (type2 === "BottomSheet" ? props2.modal === false ? "region" : "dialog" : void 0) ?? A11Y_CONTRACT[type2]?.role ?? "unspecified";
|
|
139102
139305
|
const role = declared === "decorative" && isInteractive({ ...props2, modifiers }) ? "button" : declared ?? inferred;
|
|
139103
139306
|
if (exposure === "hidden") return { role, exposure };
|
|
@@ -139120,9 +139323,9 @@ function a11ySemantics(type2, props2, modifiers, ancestorHidden, resolve116) {
|
|
|
139120
139323
|
if (announce && typeof announce === "object" && !Array.isArray(announce)) {
|
|
139121
139324
|
const a3 = announce;
|
|
139122
139325
|
out2.live = {
|
|
139123
|
-
politeness:
|
|
139124
|
-
trigger:
|
|
139125
|
-
...
|
|
139326
|
+
politeness: literal3(a3.politeness) ?? "polite",
|
|
139327
|
+
trigger: literal3(a3.trigger) ?? "on_change",
|
|
139328
|
+
...literal3(a3.text) !== void 0 ? { text: literal3(a3.text) } : {}
|
|
139126
139329
|
};
|
|
139127
139330
|
}
|
|
139128
139331
|
return out2;
|
|
@@ -139167,9 +139370,9 @@ function clientEnvFor(scheme, width, isRTL2) {
|
|
|
139167
139370
|
}
|
|
139168
139371
|
function nodeHidden(modifiers, provider, itemScope, env) {
|
|
139169
139372
|
const hp = modifiers.hiddenPath ?? modifiers.hidden_path;
|
|
139170
|
-
const
|
|
139373
|
+
const literal3 = modifiers.hidden === true;
|
|
139171
139374
|
const stateGate = typeof hp === "string" && (hp.startsWith("$service:") || hp.startsWith("$app:"));
|
|
139172
|
-
if (
|
|
139375
|
+
if (literal3 && !stateGate) return true;
|
|
139173
139376
|
if (typeof hp !== "string" || !hp) return false;
|
|
139174
139377
|
const low = hp.trim().toLowerCase();
|
|
139175
139378
|
if (low === "true" || low === "1") return true;
|
|
@@ -139177,7 +139380,7 @@ function nodeHidden(modifiers, provider, itemScope, env) {
|
|
|
139177
139380
|
if (isEnvExpr(hp)) return env ? envHidden(hp, env) === true : false;
|
|
139178
139381
|
if (hp.startsWith("$item") || stateGate) {
|
|
139179
139382
|
const v2 = hp.startsWith("$app:") ? provider.value(hp) ?? void 0 : resolveTreeScalar(hp, provider, itemScope);
|
|
139180
|
-
return
|
|
139383
|
+
return literal3 && (v2 === void 0 || v2 === null) ? true : hiddenBool2(v2);
|
|
139181
139384
|
}
|
|
139182
139385
|
return false;
|
|
139183
139386
|
}
|
|
@@ -139226,12 +139429,12 @@ function collectComponentMediaValues(type2, props2, context) {
|
|
|
139226
139429
|
}
|
|
139227
139430
|
function collectNativeOnly(node3) {
|
|
139228
139431
|
const found = /* @__PURE__ */ new Set();
|
|
139229
|
-
const
|
|
139432
|
+
const walk3 = (n2) => {
|
|
139230
139433
|
if (!n2) return;
|
|
139231
139434
|
if (NATIVE_ONLY_TYPES.has(n2.type)) found.add(n2.type);
|
|
139232
|
-
n2.children?.forEach(
|
|
139435
|
+
n2.children?.forEach(walk3);
|
|
139233
139436
|
};
|
|
139234
|
-
|
|
139437
|
+
walk3(node3);
|
|
139235
139438
|
return [...found].sort();
|
|
139236
139439
|
}
|
|
139237
139440
|
function buildRenderTree(node3, path2 = "$", provider = null, itemScope = void 0, includeRawProps = false, env = null, a11yHiddenAbove = false) {
|
|
@@ -139418,6 +139621,8 @@ function platformFrameFor(screenId, descriptor, navigation, homeScreenId, platfo
|
|
|
139418
139621
|
leading,
|
|
139419
139622
|
...cancel && leading === "cancel" ? { cancelLabel: cancel.label ?? cancel.id } : {},
|
|
139420
139623
|
leadingNone: bar.leading === "none",
|
|
139624
|
+
immersive: bar.style === "immersive" || bar.style === "transparent",
|
|
139625
|
+
searchable: bar.searchable != null,
|
|
139421
139626
|
barHidden: (boundVisibility === "visible" || boundVisibility === "hidden" ? boundVisibility : bar.visibility) === "hidden",
|
|
139422
139627
|
pushed,
|
|
139423
139628
|
hasStickyHeader: d2.stickyHeader != null,
|
|
@@ -145113,10 +145318,10 @@ function textCopyFor(workerSource, map2) {
|
|
|
145113
145318
|
return Object.keys(found).length ? JSON.stringify(found) : void 0;
|
|
145114
145319
|
}
|
|
145115
145320
|
function appearsAsLiteral(text25, value2) {
|
|
145116
|
-
const
|
|
145117
|
-
if (text25.includes(
|
|
145118
|
-
const escaped =
|
|
145119
|
-
return escaped !==
|
|
145321
|
+
const literal3 = JSON.stringify(value2);
|
|
145322
|
+
if (text25.includes(literal3)) return true;
|
|
145323
|
+
const escaped = literal3.replace(/[\u0080-\uffff]/g, (c2) => `\\u${c2.charCodeAt(0).toString(16).padStart(4, "0")}`);
|
|
145324
|
+
return escaped !== literal3 && text25.includes(escaped);
|
|
145120
145325
|
}
|
|
145121
145326
|
var ACCESSIBILITY_COPY;
|
|
145122
145327
|
var init_pinned_language = __esm({
|
|
@@ -145664,9 +145869,9 @@ function hasRowBinding(props2) {
|
|
|
145664
145869
|
});
|
|
145665
145870
|
}
|
|
145666
145871
|
function declaredOptionIds(props2, resolve116) {
|
|
145667
|
-
const
|
|
145872
|
+
const literal3 = props2.options ?? props2.tabs ?? props2.chips;
|
|
145668
145873
|
const bound2 = props2.optionsPath !== void 0 ? resolved2(props2.optionsPath, resolve116) : void 0;
|
|
145669
|
-
const raw = Array.isArray(bound2) ? bound2 :
|
|
145874
|
+
const raw = Array.isArray(bound2) ? bound2 : literal3;
|
|
145670
145875
|
if (!Array.isArray(raw)) return [];
|
|
145671
145876
|
const out2 = [];
|
|
145672
145877
|
for (const o2 of raw) {
|
|
@@ -145691,21 +145896,21 @@ function seedTokens(state, limit = 48) {
|
|
|
145691
145896
|
out2.push(tok);
|
|
145692
145897
|
}
|
|
145693
145898
|
};
|
|
145694
|
-
const
|
|
145899
|
+
const walk3 = (node3, depth) => {
|
|
145695
145900
|
if (out2.length >= limit || budget-- <= 0 || depth > 6) return;
|
|
145696
145901
|
if (typeof node3 === "string") {
|
|
145697
145902
|
if (node3.length <= 200 && !node3.includes("://") && !node3.startsWith("$")) take(node3);
|
|
145698
145903
|
return;
|
|
145699
145904
|
}
|
|
145700
145905
|
if (Array.isArray(node3)) {
|
|
145701
|
-
for (const el2 of node3)
|
|
145906
|
+
for (const el2 of node3) walk3(el2, depth + 1);
|
|
145702
145907
|
return;
|
|
145703
145908
|
}
|
|
145704
145909
|
if (node3 && typeof node3 === "object") {
|
|
145705
|
-
for (const v2 of Object.values(node3))
|
|
145910
|
+
for (const v2 of Object.values(node3)) walk3(v2, depth + 1);
|
|
145706
145911
|
}
|
|
145707
145912
|
};
|
|
145708
|
-
|
|
145913
|
+
walk3(state, 0);
|
|
145709
145914
|
return out2;
|
|
145710
145915
|
}
|
|
145711
145916
|
function synthesizeInput(control, resolve116, tokens2) {
|
|
@@ -145734,8 +145939,8 @@ function synthesizeInput(control, resolve116, tokens2) {
|
|
|
145734
145939
|
if (!acceptsWords(props2) || !acceptsWords(control.wrapper ?? {})) return null;
|
|
145735
145940
|
const binding2 = typeof props2.valuePath === "string" ? props2.valuePath : typeof props2.value === "string" && props2.value.startsWith("$service:") ? props2.value : void 0;
|
|
145736
145941
|
const bound2 = binding2 === void 0 ? void 0 : resolve116(binding2);
|
|
145737
|
-
const
|
|
145738
|
-
const current = typeof bound2 === "string" ? bound2 : typeof bound2 === "number" ? String(bound2) :
|
|
145942
|
+
const literal3 = typeof props2.value === "string" && !props2.value.startsWith("$") ? props2.value : void 0;
|
|
145943
|
+
const current = typeof bound2 === "string" ? bound2 : typeof bound2 === "number" ? String(bound2) : literal3 ?? "";
|
|
145739
145944
|
const max = typeof props2.maxLength === "number" && props2.maxLength > 0 ? props2.maxLength : void 0;
|
|
145740
145945
|
const pick4 = tokens2().find((t2) => t2 !== current && (max === void 0 || t2.length <= max));
|
|
145741
145946
|
if (pick4 === void 0) return null;
|
|
@@ -145825,17 +146030,17 @@ function relationalSignature(state) {
|
|
|
145825
146030
|
}
|
|
145826
146031
|
function listLengths(state, depth = 4) {
|
|
145827
146032
|
const out2 = {};
|
|
145828
|
-
const
|
|
146033
|
+
const walk3 = (node3, path2, left) => {
|
|
145829
146034
|
if (left < 0 || node3 === null || typeof node3 !== "object") return;
|
|
145830
146035
|
if (Array.isArray(node3)) {
|
|
145831
146036
|
out2[path2] = node3.length;
|
|
145832
146037
|
return;
|
|
145833
146038
|
}
|
|
145834
146039
|
for (const [k3, v2] of Object.entries(node3)) {
|
|
145835
|
-
|
|
146040
|
+
walk3(v2, path2 ? `${path2}.${k3}` : k3, left - 1);
|
|
145836
146041
|
}
|
|
145837
146042
|
};
|
|
145838
|
-
|
|
146043
|
+
walk3(state, "", depth);
|
|
145839
146044
|
return out2;
|
|
145840
146045
|
}
|
|
145841
146046
|
function summarizeDiff(aSig, bSig, limit = 3) {
|
|
@@ -145853,12 +146058,12 @@ function summarizeDiff(aSig, bSig, limit = 3) {
|
|
|
145853
146058
|
if (t2 === void 0) return "undefined";
|
|
145854
146059
|
return t2.length > 80 ? `${t2.slice(0, 77)}\u2026` : t2;
|
|
145855
146060
|
};
|
|
145856
|
-
const
|
|
146061
|
+
const walk3 = (x2, y2, path2) => {
|
|
145857
146062
|
if (diffs.length >= limit) return;
|
|
145858
146063
|
const bothObjects = x2 !== null && y2 !== null && typeof x2 === "object" && typeof y2 === "object" && !Array.isArray(x2) && !Array.isArray(y2);
|
|
145859
146064
|
if (bothObjects) {
|
|
145860
146065
|
for (const k3 of /* @__PURE__ */ new Set([...Object.keys(x2), ...Object.keys(y2)])) {
|
|
145861
|
-
|
|
146066
|
+
walk3(x2[k3], y2[k3], path2 ? `${path2}.${k3}` : k3);
|
|
145862
146067
|
}
|
|
145863
146068
|
return;
|
|
145864
146069
|
}
|
|
@@ -145867,14 +146072,14 @@ function summarizeDiff(aSig, bSig, limit = 3) {
|
|
|
145867
146072
|
diffs.push(`${path2 || "state"}: ${x2.length} \u2192 ${y2.length} items`);
|
|
145868
146073
|
return;
|
|
145869
146074
|
}
|
|
145870
|
-
for (let i2 = 0; i2 < x2.length && diffs.length < limit; i2++)
|
|
146075
|
+
for (let i2 = 0; i2 < x2.length && diffs.length < limit; i2++) walk3(x2[i2], y2[i2], `${path2}[${i2}]`);
|
|
145871
146076
|
return;
|
|
145872
146077
|
}
|
|
145873
146078
|
const xs2 = brief(x2);
|
|
145874
146079
|
const ys2 = brief(y2);
|
|
145875
146080
|
if (xs2 !== ys2) diffs.push(`${path2 || "state"}: ${xs2} \u2192 ${ys2}`);
|
|
145876
146081
|
};
|
|
145877
|
-
|
|
146082
|
+
walk3(a3, b3, "");
|
|
145878
146083
|
return diffs.slice(0, limit).join("; ");
|
|
145879
146084
|
}
|
|
145880
146085
|
var PREFIX_PAIRS, upperFirst, lowerFirst, REFRESH_ACTION, LOAD_MORE_ACTION, FILTER_ACTION, ANNOUNCEMENT_KEY, VOLATILE_KEY;
|
|
@@ -146548,7 +146753,7 @@ function missingItemFields(descriptor, state) {
|
|
|
146548
146753
|
if (!rawRows.length) return;
|
|
146549
146754
|
const rows = rawRows.map(rowScopeOf);
|
|
146550
146755
|
const seen = new Set(rows.flatMap((r3) => Object.keys(r3)).filter((k3) => k3 !== "__index"));
|
|
146551
|
-
const
|
|
146756
|
+
const walk3 = (v2, rel2, collapse) => {
|
|
146552
146757
|
if (typeof v2 === "string") {
|
|
146553
146758
|
for (const m2 of v2.matchAll(ITEM_PATH_RE)) {
|
|
146554
146759
|
const path2 = m2[1];
|
|
@@ -146562,7 +146767,7 @@ function missingItemFields(descriptor, state) {
|
|
|
146562
146767
|
}
|
|
146563
146768
|
return;
|
|
146564
146769
|
}
|
|
146565
|
-
if (Array.isArray(v2)) return v2.forEach((x2, i2) =>
|
|
146770
|
+
if (Array.isArray(v2)) return v2.forEach((x2, i2) => walk3(x2, `${rel2}[${i2}]`, collapse));
|
|
146566
146771
|
if (!v2 || typeof v2 !== "object") return;
|
|
146567
146772
|
const o2 = v2;
|
|
146568
146773
|
const hp = o2.modifiers?.hiddenPath;
|
|
@@ -146576,10 +146781,10 @@ function missingItemFields(descriptor, state) {
|
|
|
146576
146781
|
const at2 = rel2 ? `${rel2}.${k3}` : k3;
|
|
146577
146782
|
if (k3 === "id" && typeof x2 === "string") continue;
|
|
146578
146783
|
if (nested && k3 === "props") {
|
|
146579
|
-
for (const [pk, px] of Object.entries(x2)) if (pk !== nested.templateKey)
|
|
146784
|
+
for (const [pk, px] of Object.entries(x2)) if (pk !== nested.templateKey) walk3(px, `${at2}.${pk}`, c2);
|
|
146580
146785
|
continue;
|
|
146581
146786
|
}
|
|
146582
|
-
|
|
146787
|
+
walk3(x2, at2, c2);
|
|
146583
146788
|
}
|
|
146584
146789
|
if (nested && depth < A11Y_LIST_DEPTH) {
|
|
146585
146790
|
const innerAt = joinPath(templateAt, rel2 ? `${rel2}.props.${nested.templateKey}[0]` : `props.${nested.templateKey}[0]`);
|
|
@@ -146589,7 +146794,7 @@ function missingItemFields(descriptor, state) {
|
|
|
146589
146794
|
});
|
|
146590
146795
|
}
|
|
146591
146796
|
};
|
|
146592
|
-
|
|
146797
|
+
walk3(template, "", false);
|
|
146593
146798
|
};
|
|
146594
146799
|
const scan = (v2, at2) => {
|
|
146595
146800
|
if (Array.isArray(v2)) return v2.forEach((x2, i2) => scan(x2, `${at2}[${i2}]`));
|
|
@@ -146621,16 +146826,16 @@ function repeaterOf(o2) {
|
|
|
146621
146826
|
}
|
|
146622
146827
|
function collectObservations(descriptorOrPayload, state) {
|
|
146623
146828
|
const out2 = [];
|
|
146624
|
-
const
|
|
146829
|
+
const walk3 = (node3) => {
|
|
146625
146830
|
if (!node3) return;
|
|
146626
146831
|
if (node3.hidden) return;
|
|
146627
146832
|
for (const [field, value2] of Object.entries(node3.values ?? {})) {
|
|
146628
146833
|
const enc3 = value2 !== null && typeof value2 === "object" ? JSON.stringify(value2) : String(value2);
|
|
146629
146834
|
out2.push(`${node3.id}.${field}=${enc3}`);
|
|
146630
146835
|
}
|
|
146631
|
-
node3.children?.forEach(
|
|
146836
|
+
node3.children?.forEach(walk3);
|
|
146632
146837
|
};
|
|
146633
|
-
descriptorTrees(descriptorOrPayload, new FakeServiceProvider(state)).forEach(
|
|
146838
|
+
descriptorTrees(descriptorOrPayload, new FakeServiceProvider(state)).forEach(walk3);
|
|
146634
146839
|
return out2.sort();
|
|
146635
146840
|
}
|
|
146636
146841
|
function unobservedCopySites(descriptorOrPayload, state, expected) {
|
|
@@ -154026,16 +154231,16 @@ function blankComments(src) {
|
|
|
154026
154231
|
}
|
|
154027
154232
|
function parseStoreBlock(configTs) {
|
|
154028
154233
|
const text25 = blankComments(configTs);
|
|
154029
|
-
const
|
|
154030
|
-
if (
|
|
154031
|
-
if (
|
|
154234
|
+
const literal3 = [...text25.matchAll(/(?<![\w$.])store\s*:\s*(?=\{\s*["']?adopt["']?\s*:)/g)];
|
|
154235
|
+
if (literal3.length > 1) throw new Error("config.ts declares `store: { adopt }` more than once");
|
|
154236
|
+
if (literal3.length === 0) {
|
|
154032
154237
|
if (/(?<![\w$.])adopt\s*:/.test(text25) || /(?<![\w$.])store\s*:/.test(text25) && /(?<![\w$.])adopt\b/.test(text25)) {
|
|
154033
154238
|
throw new Error("config.ts mentions store.adopt but not as an inline `store: { adopt: { \u2026 } }` literal \u2014 write it inline so every tool reads the same identity");
|
|
154034
154239
|
}
|
|
154035
154240
|
return void 0;
|
|
154036
154241
|
}
|
|
154037
154242
|
const p2 = new LiteralParser(text25);
|
|
154038
|
-
p2.i =
|
|
154243
|
+
p2.i = literal3[0].index + literal3[0][0].length;
|
|
154039
154244
|
return p2.object();
|
|
154040
154245
|
}
|
|
154041
154246
|
function adoptedIdentityOfConfigTs(configTs) {
|
|
@@ -162003,7 +162208,7 @@ function isDeadStoreCta(node3) {
|
|
|
162003
162208
|
}
|
|
162004
162209
|
function pruneTree(root, isDead) {
|
|
162005
162210
|
const dropped = [];
|
|
162006
|
-
if (!
|
|
162211
|
+
if (!isNode4(root)) return { emptied: false, dropped };
|
|
162007
162212
|
return { emptied: !pruneNode(root, dropped, isDead), dropped };
|
|
162008
162213
|
}
|
|
162009
162214
|
function pruneNode(node3, dropped, isDead = isDeadStoreCta) {
|
|
@@ -162018,7 +162223,7 @@ function pruneNode(node3, dropped, isDead = isDeadStoreCta) {
|
|
|
162018
162223
|
dropped.push(typeof child3.id === "string" && child3.id ? child3.id : "(unnamed CTA)");
|
|
162019
162224
|
return false;
|
|
162020
162225
|
}
|
|
162021
|
-
if (!
|
|
162226
|
+
if (!isNode4(child3)) return true;
|
|
162022
162227
|
return pruneNode(child3, dropped, isDead);
|
|
162023
162228
|
});
|
|
162024
162229
|
if (kept.length === list4.length) continue;
|
|
@@ -162037,7 +162242,7 @@ function pruneWithin(value2, dropped, isDead) {
|
|
|
162037
162242
|
return;
|
|
162038
162243
|
}
|
|
162039
162244
|
if (!value2 || typeof value2 !== "object") return;
|
|
162040
|
-
if (
|
|
162245
|
+
if (isNode4(value2)) {
|
|
162041
162246
|
pruneNode(value2, dropped, isDead);
|
|
162042
162247
|
return;
|
|
162043
162248
|
}
|
|
@@ -162053,7 +162258,7 @@ function patchStoreCtas(src, verticals, homeActionId) {
|
|
|
162053
162258
|
} catch {
|
|
162054
162259
|
return { src, dropped: [] };
|
|
162055
162260
|
}
|
|
162056
|
-
if (!
|
|
162261
|
+
if (!isNode4(screen.payload)) return { src, dropped: [] };
|
|
162057
162262
|
const dropped = [];
|
|
162058
162263
|
if (!pruneNode(screen.payload, dropped) || !dropped.length) return { src, dropped: [] };
|
|
162059
162264
|
return {
|
|
@@ -162075,7 +162280,7 @@ function patchHomeForVerticals(src, verticals, homeActionId, opts = {}) {
|
|
|
162075
162280
|
patch.droppedCtas = ctas.dropped;
|
|
162076
162281
|
return patch;
|
|
162077
162282
|
}
|
|
162078
|
-
var EXPLORE_CARDS, EXPLORE_ORDER, EXPLORE_MAX_CELLS, MODULE_SOURCE_VERTICALS, isKnown, GRID_VERTICAL_LABELS, FAQ_CARD, escapeRe3, textProps, STORE_SCREENS, isStoreScreen, screenDeclarations,
|
|
162283
|
+
var EXPLORE_CARDS, EXPLORE_ORDER, EXPLORE_MAX_CELLS, MODULE_SOURCE_VERTICALS, isKnown, GRID_VERTICAL_LABELS, FAQ_CARD, escapeRe3, textProps, STORE_SCREENS, isStoreScreen, screenDeclarations, isNode4;
|
|
162079
162284
|
var init_home_descriptor = __esm({
|
|
162080
162285
|
"src/site-analyze/home-descriptor.ts"() {
|
|
162081
162286
|
init_define_HHP_CATALOG();
|
|
@@ -162161,7 +162366,7 @@ var init_home_descriptor = __esm({
|
|
|
162161
162366
|
]);
|
|
162162
162367
|
isStoreScreen = (id) => STORE_SCREENS.has(id) || /^himi_(?:product|order)[_/]/.test(id);
|
|
162163
162368
|
screenDeclarations = () => /"([A-Za-z_0-9]+)": \{\s*"screenId": "\1"/g;
|
|
162164
|
-
|
|
162369
|
+
isNode4 = (v2) => !!v2 && typeof v2 === "object" && !!v2.body && typeof v2.body === "object";
|
|
162165
162370
|
}
|
|
162166
162371
|
});
|
|
162167
162372
|
|
|
@@ -162217,15 +162422,15 @@ function linearSafePattern(pattern) {
|
|
|
162217
162422
|
}
|
|
162218
162423
|
function bundlesOf(block) {
|
|
162219
162424
|
const out2 = /* @__PURE__ */ new Set();
|
|
162220
|
-
const
|
|
162221
|
-
if (Array.isArray(v2)) return v2.forEach(
|
|
162425
|
+
const walk3 = (v2) => {
|
|
162426
|
+
if (Array.isArray(v2)) return v2.forEach(walk3);
|
|
162222
162427
|
if (!v2 || typeof v2 !== "object") return;
|
|
162223
162428
|
const lb = v2.logicBundle;
|
|
162224
162429
|
const name = bundleNameFromUrl(lb?.url);
|
|
162225
162430
|
if (name) out2.add(name);
|
|
162226
|
-
for (const child3 of Object.values(v2))
|
|
162431
|
+
for (const child3 of Object.values(v2)) walk3(child3);
|
|
162227
162432
|
};
|
|
162228
|
-
|
|
162433
|
+
walk3(block);
|
|
162229
162434
|
return [...out2];
|
|
162230
162435
|
}
|
|
162231
162436
|
function codeOnly(src) {
|
|
@@ -162293,8 +162498,8 @@ function trimCapabilities(config, keptBlocks) {
|
|
|
162293
162498
|
if (!Array.isArray(current) || current.some((id) => typeof id !== "string")) return unread;
|
|
162294
162499
|
const declared = /* @__PURE__ */ new Set();
|
|
162295
162500
|
const components2 = /* @__PURE__ */ new Set();
|
|
162296
|
-
const
|
|
162297
|
-
if (Array.isArray(v2)) return v2.forEach(
|
|
162501
|
+
const walk3 = (v2) => {
|
|
162502
|
+
if (Array.isArray(v2)) return v2.forEach(walk3);
|
|
162298
162503
|
if (!v2 || typeof v2 !== "object") return;
|
|
162299
162504
|
const { type: type2, logicBundle, logic_bundle } = v2;
|
|
162300
162505
|
if (typeof type2 === "string") components2.add(type2);
|
|
@@ -162303,9 +162508,9 @@ function trimCapabilities(config, keptBlocks) {
|
|
|
162303
162508
|
if (Array.isArray(ids2)) {
|
|
162304
162509
|
for (const id of ids2) if (typeof id === "string") declared.add(id);
|
|
162305
162510
|
}
|
|
162306
|
-
for (const child3 of Object.values(v2))
|
|
162511
|
+
for (const child3 of Object.values(v2)) walk3(child3);
|
|
162307
162512
|
};
|
|
162308
|
-
keptBlocks.forEach(
|
|
162513
|
+
keptBlocks.forEach(walk3);
|
|
162309
162514
|
for (const id of capabilityActionsIn(JSON.stringify(keptBlocks))) declared.add(id);
|
|
162310
162515
|
for (const m2 of code2.matchAll(/(?<![\w$.-])["']?(?:actionId|action_id|action)["']?\s*:\s*["'`]capability\.([a-z0-9_]+)\.[A-Za-z0-9_]+["'`]/g)) {
|
|
162311
162516
|
declared.add(m2[1]);
|
|
@@ -162317,10 +162522,10 @@ function trimCapabilities(config, keptBlocks) {
|
|
|
162317
162522
|
for (const block of objectLiteralsOf(code2, ["app", "navigation"])) if (block.includes("...")) return unread;
|
|
162318
162523
|
for (const m2 of code2.matchAll(/\b(?:declaredCapabilities|declared_capabilities)["']?\s*:\s*/g)) {
|
|
162319
162524
|
const rest = code2.slice(m2.index + m2[0].length);
|
|
162320
|
-
const
|
|
162525
|
+
const literal3 = /^(\[[^\]]*\])\s*(?=[,}])/.exec(rest)?.[1];
|
|
162321
162526
|
let ids2;
|
|
162322
162527
|
try {
|
|
162323
|
-
ids2 =
|
|
162528
|
+
ids2 = literal3 ? JSON.parse(literal3) : void 0;
|
|
162324
162529
|
} catch {
|
|
162325
162530
|
ids2 = void 0;
|
|
162326
162531
|
}
|
|
@@ -162357,11 +162562,11 @@ function configWithoutComments(text25) {
|
|
|
162357
162562
|
}
|
|
162358
162563
|
return parts.join("") + text25.slice(end2);
|
|
162359
162564
|
}
|
|
162360
|
-
function jsonString(
|
|
162565
|
+
function jsonString(literal3, what) {
|
|
162361
162566
|
try {
|
|
162362
|
-
return JSON.parse(
|
|
162567
|
+
return JSON.parse(literal3);
|
|
162363
162568
|
} catch (e2) {
|
|
162364
|
-
throw new TrimRefusal(`${what} ${
|
|
162569
|
+
throw new TrimRefusal(`${what} ${literal3} is not a valid JSON string (${e2.message}) \u2014 trim reads the shape \`himi init\` writes; fix the literal or trim by hand (\`himi docs trim-a-template\`)`);
|
|
162365
162570
|
}
|
|
162366
162571
|
}
|
|
162367
162572
|
function bracketEnd(src, open3) {
|
|
@@ -162513,15 +162718,15 @@ function openTarget(action) {
|
|
|
162513
162718
|
}
|
|
162514
162719
|
function linksOf(route) {
|
|
162515
162720
|
const out2 = [];
|
|
162516
|
-
const
|
|
162517
|
-
if (Array.isArray(v2)) return v2.forEach((c2) =>
|
|
162721
|
+
const walk3 = (v2, owner) => {
|
|
162722
|
+
if (Array.isArray(v2)) return v2.forEach((c2) => walk3(c2, owner));
|
|
162518
162723
|
if (!v2 || typeof v2 !== "object") return;
|
|
162519
162724
|
const here = typeof v2.id === "string" ? entryLabel(v2) : owner;
|
|
162520
162725
|
const to2 = openTarget(v2);
|
|
162521
162726
|
if (to2) out2.push({ from: route, node: here, to: to2 });
|
|
162522
|
-
for (const child3 of Object.values(v2))
|
|
162727
|
+
for (const child3 of Object.values(v2)) walk3(child3, here);
|
|
162523
162728
|
};
|
|
162524
|
-
|
|
162729
|
+
walk3(route.block, "(screen)");
|
|
162525
162730
|
return out2;
|
|
162526
162731
|
}
|
|
162527
162732
|
function tapTarget(entry) {
|
|
@@ -162533,7 +162738,7 @@ function tapTarget(entry) {
|
|
|
162533
162738
|
return void 0;
|
|
162534
162739
|
}
|
|
162535
162740
|
function rowTemplateTarget(entry, removed) {
|
|
162536
|
-
if (!
|
|
162741
|
+
if (!isNode5(entry)) return void 0;
|
|
162537
162742
|
const props2 = entry.body.props;
|
|
162538
162743
|
if (!props2?.itemsPath || !Array.isArray(props2.items)) return void 0;
|
|
162539
162744
|
for (const row2 of props2.items) {
|
|
@@ -162544,13 +162749,13 @@ function rowTemplateTarget(entry, removed) {
|
|
|
162544
162749
|
}
|
|
162545
162750
|
function emptyDeadCases(root, isDead) {
|
|
162546
162751
|
const out2 = [];
|
|
162547
|
-
const
|
|
162548
|
-
if (Array.isArray(v2)) return v2.forEach(
|
|
162752
|
+
const walk3 = (v2) => {
|
|
162753
|
+
if (Array.isArray(v2)) return v2.forEach(walk3);
|
|
162549
162754
|
if (!v2 || typeof v2 !== "object") return;
|
|
162550
|
-
for (const child3 of Object.values(v2))
|
|
162551
|
-
if (!
|
|
162755
|
+
for (const child3 of Object.values(v2)) walk3(child3);
|
|
162756
|
+
if (!isNode5(v2) || v2.body.type !== "FragmentSlot" || !Array.isArray(v2.body.props?.cases)) return;
|
|
162552
162757
|
for (const c2 of v2.body.props.cases) {
|
|
162553
|
-
if (!
|
|
162758
|
+
if (!isNode5(c2.content) || !pruneTree(c2.content, isDead).emptied) continue;
|
|
162554
162759
|
const props2 = c2.content.body.props ?? {};
|
|
162555
162760
|
for (const key4 of props2.itemsPath ? ["children"] : ["children", "items"]) {
|
|
162556
162761
|
if (Array.isArray(props2[key4]) && props2[key4].length) props2[key4] = [];
|
|
@@ -162558,13 +162763,13 @@ function emptyDeadCases(root, isDead) {
|
|
|
162558
162763
|
out2.push({ id: String(c2.id ?? ""), byModuleId: v2.body.props.casePath === "$item.id" });
|
|
162559
162764
|
}
|
|
162560
162765
|
};
|
|
162561
|
-
|
|
162766
|
+
walk3(root);
|
|
162562
162767
|
return out2;
|
|
162563
162768
|
}
|
|
162564
162769
|
function dropModules(block, ids2) {
|
|
162565
162770
|
const dropped = [];
|
|
162566
|
-
const
|
|
162567
|
-
if (Array.isArray(v2)) return v2.forEach(
|
|
162771
|
+
const walk3 = (v2) => {
|
|
162772
|
+
if (Array.isArray(v2)) return v2.forEach(walk3);
|
|
162568
162773
|
if (!v2 || typeof v2 !== "object") return;
|
|
162569
162774
|
const rec = v2;
|
|
162570
162775
|
if (typeof rec.homeModules === "string") {
|
|
@@ -162578,9 +162783,9 @@ function dropModules(block, ids2) {
|
|
|
162578
162783
|
} catch {
|
|
162579
162784
|
}
|
|
162580
162785
|
}
|
|
162581
|
-
for (const child3 of Object.values(rec))
|
|
162786
|
+
for (const child3 of Object.values(rec)) walk3(child3);
|
|
162582
162787
|
};
|
|
162583
|
-
|
|
162788
|
+
walk3(block);
|
|
162584
162789
|
return dropped;
|
|
162585
162790
|
}
|
|
162586
162791
|
function pruneChrome(items, removed, ledger) {
|
|
@@ -162756,8 +162961,8 @@ function rewriteNav(nav, removed, homeId) {
|
|
|
162756
162961
|
function leftoverNavRefs(nav, removedIds) {
|
|
162757
162962
|
const gone = new Set(removedIds);
|
|
162758
162963
|
const out2 = [];
|
|
162759
|
-
const
|
|
162760
|
-
if (Array.isArray(v2)) return v2.forEach((c2, i2) =>
|
|
162964
|
+
const walk3 = (v2, path2) => {
|
|
162965
|
+
if (Array.isArray(v2)) return v2.forEach((c2, i2) => walk3(c2, `${path2}[${i2}]`));
|
|
162761
162966
|
if (!v2 || typeof v2 !== "object") return;
|
|
162762
162967
|
for (const [k3, child3] of Object.entries(v2)) {
|
|
162763
162968
|
const here = path2 ? `${path2}.${k3}` : k3;
|
|
@@ -162765,10 +162970,10 @@ function leftoverNavRefs(nav, removedIds) {
|
|
|
162765
162970
|
if (gone.has(child3)) out2.push(`${here}=${child3}`);
|
|
162766
162971
|
} else if (k3 === "screenIds" && child3 && typeof child3 === "object" && !Array.isArray(child3)) {
|
|
162767
162972
|
for (const [dest, id] of Object.entries(child3)) if (typeof id === "string" && gone.has(id)) out2.push(`${here}.${dest}=${id}`);
|
|
162768
|
-
} else
|
|
162973
|
+
} else walk3(child3, here);
|
|
162769
162974
|
}
|
|
162770
162975
|
};
|
|
162771
|
-
|
|
162976
|
+
walk3(nav, "");
|
|
162772
162977
|
return out2;
|
|
162773
162978
|
}
|
|
162774
162979
|
function navPinnedScreens(nav) {
|
|
@@ -162788,16 +162993,16 @@ function navPinnedScreens(nav) {
|
|
|
162788
162993
|
}
|
|
162789
162994
|
function workerPinnedScreens(route) {
|
|
162790
162995
|
const out2 = [];
|
|
162791
|
-
const
|
|
162792
|
-
if (Array.isArray(v2)) return v2.forEach(
|
|
162996
|
+
const walk3 = (v2) => {
|
|
162997
|
+
if (Array.isArray(v2)) return v2.forEach(walk3);
|
|
162793
162998
|
if (!v2 || typeof v2 !== "object") return;
|
|
162794
162999
|
const params = v2.params;
|
|
162795
163000
|
if (params && typeof params === "object" && !Array.isArray(params)) {
|
|
162796
163001
|
for (const [k3, id] of Object.entries(params)) if (WORKER_SCREEN_PARAMS.has(k3) && isStatic(id)) out2.push(id);
|
|
162797
163002
|
}
|
|
162798
|
-
for (const child3 of Object.values(v2))
|
|
163003
|
+
for (const child3 of Object.values(v2)) walk3(child3);
|
|
162799
163004
|
};
|
|
162800
|
-
|
|
163005
|
+
walk3(route.block);
|
|
162801
163006
|
return out2;
|
|
162802
163007
|
}
|
|
162803
163008
|
function planTrim(src, keepIds, links) {
|
|
@@ -162976,13 +163181,13 @@ function planTrim(src, keepIds, links) {
|
|
|
162976
163181
|
const dirs = new Set(src.workerDirs);
|
|
162977
163182
|
const removedWorkers = sorted(removedRoutes.flatMap((r3) => r3.bundles).filter((b3) => dirs.has(b3) && !keptWorkers.has(b3)));
|
|
162978
163183
|
const workerRefs = [];
|
|
162979
|
-
const
|
|
163184
|
+
const literal3 = /(["'`])([A-Za-z_][A-Za-z0-9_]*[_/]?)(?=\1|\$\{)/g;
|
|
162980
163185
|
for (const rel2 of Object.keys(src.workerFiles).sort()) {
|
|
162981
163186
|
const dir = rel2.split("/")[1];
|
|
162982
163187
|
if (!keptWorkers.has(dir) || !dirs.has(dir)) continue;
|
|
162983
163188
|
const lines2 = src.workerFiles[rel2].split("\n");
|
|
162984
163189
|
lines2.forEach((line, i2) => {
|
|
162985
|
-
for (const m2 of line.matchAll(
|
|
163190
|
+
for (const m2 of line.matchAll(literal3)) {
|
|
162986
163191
|
const token = m2[2];
|
|
162987
163192
|
const prefix = /[_/]$/.test(token);
|
|
162988
163193
|
const route = prefix ? app2.templated.find((r3) => r3.re.test(`${token}x`)) : resolveIn(app2, token);
|
|
@@ -163075,16 +163280,16 @@ function listWorkers(dir) {
|
|
|
163075
163280
|
if (!existsSync48(root)) return { dirs: [], files: {} };
|
|
163076
163281
|
const dirs = readdirSync26(root).filter((n2) => statSync14(join40(root, n2)).isDirectory()).sort();
|
|
163077
163282
|
const files = {};
|
|
163078
|
-
const
|
|
163283
|
+
const walk3 = (abs, rel2) => {
|
|
163079
163284
|
for (const name of readdirSync26(abs)) {
|
|
163080
163285
|
if (name === "node_modules") continue;
|
|
163081
163286
|
const p2 = join40(abs, name);
|
|
163082
163287
|
const r3 = `${rel2}/${name}`;
|
|
163083
|
-
if (statSync14(p2).isDirectory())
|
|
163288
|
+
if (statSync14(p2).isDirectory()) walk3(p2, r3);
|
|
163084
163289
|
else if (/\.(?:[cm]?[jt]sx?|json)$/.test(name)) files[r3] = readFileSync53(p2, "utf8");
|
|
163085
163290
|
}
|
|
163086
163291
|
};
|
|
163087
|
-
for (const d2 of dirs)
|
|
163292
|
+
for (const d2 of dirs) walk3(join40(root, d2), `tier5-src/${d2}`);
|
|
163088
163293
|
return { dirs, files };
|
|
163089
163294
|
}
|
|
163090
163295
|
function csv(v2) {
|
|
@@ -163313,7 +163518,7 @@ function summarize2(errors) {
|
|
|
163313
163518
|
const shown2 = errors.slice(0, 5).map(one2).join("; ");
|
|
163314
163519
|
return errors.length > 5 ? `${shown2}; and ${errors.length - 5} more` : shown2;
|
|
163315
163520
|
}
|
|
163316
|
-
var TrimRefusal, LIT, ATOM, QUANT, CAP, SAFE_ROUTE_PATTERN, lineOf2, isStatic, WORKER_OPEN, entryLabel,
|
|
163521
|
+
var TrimRefusal, LIT, ATOM, QUANT, CAP, SAFE_ROUTE_PATTERN, lineOf2, isStatic, WORKER_OPEN, entryLabel, isNode5, asItems, NAV_SCREEN_KEYS, WORKER_SCREEN_PARAMS, sorted, refuse3, plural;
|
|
163317
163522
|
var init_template_trim = __esm({
|
|
163318
163523
|
"src/template-trim.ts"() {
|
|
163319
163524
|
init_define_HHP_CATALOG();
|
|
@@ -163346,7 +163551,7 @@ var init_template_trim = __esm({
|
|
|
163346
163551
|
const id = entry?.id;
|
|
163347
163552
|
return typeof id === "string" && id ? id : "(unnamed)";
|
|
163348
163553
|
};
|
|
163349
|
-
|
|
163554
|
+
isNode5 = (v2) => !!v2 && typeof v2 === "object" && !!v2.body && typeof v2.body === "object";
|
|
163350
163555
|
asItems = (block) => {
|
|
163351
163556
|
const items = block?.items;
|
|
163352
163557
|
return Array.isArray(items) ? items : void 0;
|
|
@@ -163530,16 +163735,16 @@ function readAppSources(dir) {
|
|
|
163530
163735
|
const abs = join41(root, name);
|
|
163531
163736
|
if (!statSync15(abs).isDirectory()) continue;
|
|
163532
163737
|
const files = {};
|
|
163533
|
-
const
|
|
163738
|
+
const walk3 = (a3, rel2) => {
|
|
163534
163739
|
for (const n2 of readdirSync27(a3).sort()) {
|
|
163535
163740
|
if (n2 === "node_modules") continue;
|
|
163536
163741
|
const p2 = join41(a3, n2);
|
|
163537
163742
|
const r3 = `${rel2}/${n2}`;
|
|
163538
|
-
if (statSync15(p2).isDirectory())
|
|
163743
|
+
if (statSync15(p2).isDirectory()) walk3(p2, r3);
|
|
163539
163744
|
else if (/\.(?:[cm]?[jt]sx?)$/.test(n2)) files[r3] = readFileSync54(p2, "utf8");
|
|
163540
163745
|
}
|
|
163541
163746
|
};
|
|
163542
|
-
|
|
163747
|
+
walk3(abs, `tier5-src/${name}`);
|
|
163543
163748
|
workers.set(name, files);
|
|
163544
163749
|
}
|
|
163545
163750
|
}
|
|
@@ -163654,8 +163859,8 @@ function classifyAction(action) {
|
|
|
163654
163859
|
function screenActions(block) {
|
|
163655
163860
|
const out2 = [];
|
|
163656
163861
|
const seen = /* @__PURE__ */ new Set();
|
|
163657
|
-
const
|
|
163658
|
-
if (Array.isArray(v2)) return v2.forEach((x2) =>
|
|
163862
|
+
const walk3 = (v2, component, type2) => {
|
|
163863
|
+
if (Array.isArray(v2)) return v2.forEach((x2) => walk3(x2, component, type2));
|
|
163659
163864
|
if (!v2 || typeof v2 !== "object") return;
|
|
163660
163865
|
const o2 = v2;
|
|
163661
163866
|
let comp = component;
|
|
@@ -163676,10 +163881,10 @@ function screenActions(block) {
|
|
|
163676
163881
|
out2.push({ actionId: id, action, trigger: key4, ...comp ? { component: comp } : {}, ...ty ? { type: ty } : {}, kind });
|
|
163677
163882
|
}
|
|
163678
163883
|
}
|
|
163679
|
-
|
|
163884
|
+
walk3(child3, comp, ty);
|
|
163680
163885
|
}
|
|
163681
163886
|
};
|
|
163682
|
-
|
|
163887
|
+
walk3(block);
|
|
163683
163888
|
return out2;
|
|
163684
163889
|
}
|
|
163685
163890
|
function walkPackage(dir, rel2 = "") {
|
|
@@ -163881,14 +164086,14 @@ function writeInventory(dir, inv, opts = {}) {
|
|
|
163881
164086
|
}
|
|
163882
164087
|
function primaryNodeIds(app2) {
|
|
163883
164088
|
const out2 = /* @__PURE__ */ new Set();
|
|
163884
|
-
const
|
|
163885
|
-
if (Array.isArray(v2)) return v2.forEach(
|
|
164089
|
+
const walk3 = (v2) => {
|
|
164090
|
+
if (Array.isArray(v2)) return v2.forEach(walk3);
|
|
163886
164091
|
if (!v2 || typeof v2 !== "object") return;
|
|
163887
164092
|
const o2 = v2;
|
|
163888
164093
|
if (typeof o2.id === "string" && o2.id && o2.body?.props?.style === "primary") out2.add(o2.id);
|
|
163889
|
-
for (const c2 of Object.values(v2))
|
|
164094
|
+
for (const c2 of Object.values(v2)) walk3(c2);
|
|
163890
164095
|
};
|
|
163891
|
-
for (const r3 of app2.routes)
|
|
164096
|
+
for (const r3 of app2.routes) walk3(r3.block);
|
|
163892
164097
|
return out2;
|
|
163893
164098
|
}
|
|
163894
164099
|
function findRoute(app2, id) {
|
|
@@ -164372,9 +164577,9 @@ function unwrap(node3) {
|
|
|
164372
164577
|
}
|
|
164373
164578
|
return current;
|
|
164374
164579
|
}
|
|
164375
|
-
function lookup3(
|
|
164580
|
+
function lookup3(literal3, name) {
|
|
164376
164581
|
let found = { kind: "absent" };
|
|
164377
|
-
for (const p2 of
|
|
164582
|
+
for (const p2 of literal3.properties) {
|
|
164378
164583
|
const key4 = p2.name && (ts7.isIdentifier(p2.name) || ts7.isStringLiteral(p2.name)) ? p2.name.text : void 0;
|
|
164379
164584
|
if (ts7.isPropertyAssignment(p2) && key4 === name) found = { kind: "written", node: p2 };
|
|
164380
164585
|
else if (ts7.isSpreadAssignment(p2) || p2.name && ts7.isComputedPropertyName(p2.name) || key4 === name) found = { kind: "opaque" };
|
|
@@ -164382,22 +164587,22 @@ function lookup3(literal2, name) {
|
|
|
164382
164587
|
return found;
|
|
164383
164588
|
}
|
|
164384
164589
|
function stringValue(node3, name) {
|
|
164385
|
-
const
|
|
164386
|
-
const found = ts7.isObjectLiteralExpression(
|
|
164590
|
+
const literal3 = unwrap(node3);
|
|
164591
|
+
const found = ts7.isObjectLiteralExpression(literal3) ? lookup3(literal3, name) : void 0;
|
|
164387
164592
|
const value2 = found?.kind === "written" ? found.node.initializer : void 0;
|
|
164388
164593
|
return value2 && ts7.isStringLiteralLike(value2) ? value2.text : void 0;
|
|
164389
164594
|
}
|
|
164390
|
-
function appendProperties(
|
|
164595
|
+
function appendProperties(literal3, file2, lines2) {
|
|
164391
164596
|
const inline = () => lines2.filter((line) => !line.trimStart().startsWith("//")).join(" ");
|
|
164392
|
-
if (
|
|
164393
|
-
const at3 =
|
|
164394
|
-
return { at: at3, end:
|
|
164597
|
+
if (literal3.properties.length === 0) {
|
|
164598
|
+
const at3 = literal3.getStart(file2) + 1;
|
|
164599
|
+
return { at: at3, end: literal3.end - 1, text: ` ${inline().replace(/,$/, "")} ` };
|
|
164395
164600
|
}
|
|
164396
|
-
const last =
|
|
164397
|
-
const trailing =
|
|
164398
|
-
const at2 = trailing ?
|
|
164601
|
+
const last = literal3.properties[literal3.properties.length - 1];
|
|
164602
|
+
const trailing = literal3.properties.hasTrailingComma;
|
|
164603
|
+
const at2 = trailing ? literal3.properties.end : last.end;
|
|
164399
164604
|
const lead = trailing ? "" : ",";
|
|
164400
|
-
if (onOneLine(
|
|
164605
|
+
if (onOneLine(literal3, file2)) {
|
|
164401
164606
|
const text25 = inline();
|
|
164402
164607
|
return { at: at2, end: at2, text: `${lead} ${trailing ? text25 : text25.replace(/,$/, "")}` };
|
|
164403
164608
|
}
|
|
@@ -164526,8 +164731,8 @@ function planPush(app2, pingAppName, plan) {
|
|
|
164526
164731
|
}
|
|
164527
164732
|
}
|
|
164528
164733
|
function planRetiredFamily(block, plan) {
|
|
164529
|
-
const
|
|
164530
|
-
const found = ts8.isObjectLiteralExpression(
|
|
164734
|
+
const literal3 = unwrap(block);
|
|
164735
|
+
const found = ts8.isObjectLiteralExpression(literal3) ? lookup3(literal3, "pingAppName") : void 0;
|
|
164531
164736
|
const value2 = found?.kind === "written" ? unwrap(found.node.initializer) : void 0;
|
|
164532
164737
|
const replacement = value2 && ts8.isStringLiteralLike(value2) ? replacementPingFamily(value2.text) : void 0;
|
|
164533
164738
|
if (!value2 || !replacement) return;
|
|
@@ -165222,17 +165427,17 @@ function openPackageFile(file2) {
|
|
|
165222
165427
|
function openPackageDir(dir) {
|
|
165223
165428
|
const root = resolve45(dir);
|
|
165224
165429
|
const entries = /* @__PURE__ */ new Map();
|
|
165225
|
-
const
|
|
165430
|
+
const walk3 = (rel2) => {
|
|
165226
165431
|
const abs = rel2 ? join44(root, rel2) : root;
|
|
165227
165432
|
for (const name of readdirSync28(abs)) {
|
|
165228
165433
|
const childRel = rel2 ? `${rel2}/${name}` : name;
|
|
165229
165434
|
const childAbs = join44(abs, name);
|
|
165230
|
-
if (statSync16(childAbs).isDirectory())
|
|
165435
|
+
if (statSync16(childAbs).isDirectory()) walk3(childRel);
|
|
165231
165436
|
else if (isSafeEntryName(childRel)) entries.set(childRel, readFileSync57(childAbs));
|
|
165232
165437
|
}
|
|
165233
165438
|
};
|
|
165234
165439
|
if (!existsSync51(root)) throw new Error(`no such package directory: ${root}`);
|
|
165235
|
-
|
|
165440
|
+
walk3("");
|
|
165236
165441
|
const manifestBytes = entries.get(HIMI_PACKAGE_MANIFEST_PATH);
|
|
165237
165442
|
if (manifestBytes) {
|
|
165238
165443
|
try {
|
|
@@ -165323,7 +165528,7 @@ import { createRequire as createRequire4 } from "node:module";
|
|
|
165323
165528
|
import { deflateRawSync as deflateRawSync2 } from "node:zlib";
|
|
165324
165529
|
function walkSourceTree(dir, file2, skip, enter = () => {
|
|
165325
165530
|
}) {
|
|
165326
|
-
const
|
|
165531
|
+
const walk3 = (relDir) => {
|
|
165327
165532
|
enter(relDir);
|
|
165328
165533
|
for (const name of readdirSync29(join45(dir, relDir))) {
|
|
165329
165534
|
const rel2 = relDir ? join45(relDir, name) : name;
|
|
@@ -165334,7 +165539,7 @@ function walkSourceTree(dir, file2, skip, enter = () => {
|
|
|
165334
165539
|
}
|
|
165335
165540
|
if (st2.isDirectory()) {
|
|
165336
165541
|
if (isDeniedSourceDir(name, relDir) || existsSync52(join45(dir, rel2, PACKAGE_DIR_MARKER))) skip(rel2);
|
|
165337
|
-
else
|
|
165542
|
+
else walk3(rel2);
|
|
165338
165543
|
continue;
|
|
165339
165544
|
}
|
|
165340
165545
|
if (isDeniedSourcePath(rel2)) {
|
|
@@ -165344,7 +165549,7 @@ function walkSourceTree(dir, file2, skip, enter = () => {
|
|
|
165344
165549
|
file2(rel2.split(sep15).join("/"), rel2);
|
|
165345
165550
|
}
|
|
165346
165551
|
};
|
|
165347
|
-
|
|
165552
|
+
walk3("");
|
|
165348
165553
|
}
|
|
165349
165554
|
function collectAppSource(dir) {
|
|
165350
165555
|
const entries = [];
|
|
@@ -166352,6 +166557,10 @@ var init_studio_reel = __esm({
|
|
|
166352
166557
|
});
|
|
166353
166558
|
|
|
166354
166559
|
// src/home-screen-id.ts
|
|
166560
|
+
var home_screen_id_exports = {};
|
|
166561
|
+
__export(home_screen_id_exports, {
|
|
166562
|
+
homeScreenIdOf: () => homeScreenIdOf
|
|
166563
|
+
});
|
|
166355
166564
|
import { readFileSync as readFileSync62 } from "node:fs";
|
|
166356
166565
|
import { join as join49 } from "node:path";
|
|
166357
166566
|
function homeScreenIdOf(dir) {
|
|
@@ -170043,8 +170252,8 @@ function rotateHue(hex2, deg) {
|
|
|
170043
170252
|
return "#" + rgb.map((v2) => Math.max(0, Math.min(255, v2)).toString(16).padStart(2, "0")).join("");
|
|
170044
170253
|
}
|
|
170045
170254
|
function resolveTokensPath(app2, configTs) {
|
|
170046
|
-
const
|
|
170047
|
-
if (
|
|
170255
|
+
const literal3 = /^ {2}designTokensPath\s*:\s*["']([^"']+)["']/m.exec(stripComments(configTs))?.[1];
|
|
170256
|
+
if (literal3) return { path: resolve50(appDir(app2), literal3), source: "declared" };
|
|
170048
170257
|
return { path: join59(appDir(app2), "tokens.json"), source: "assumed" };
|
|
170049
170258
|
}
|
|
170050
170259
|
function resolveToken(app2, token, tokensPathOverride) {
|
|
@@ -177547,14 +177756,14 @@ async function navEntryScreens(dir, homeScreenId) {
|
|
|
177547
177756
|
const nav = (await loadContentConfigQuietly(dir))?.navigation;
|
|
177548
177757
|
const out2 = /* @__PURE__ */ new Set();
|
|
177549
177758
|
if (homeScreenId) out2.add(homeScreenId);
|
|
177550
|
-
const
|
|
177759
|
+
const walk3 = (v2, depth) => {
|
|
177551
177760
|
if (depth > 6 || typeof v2 !== "object" || v2 === null) return;
|
|
177552
177761
|
for (const [k3, x2] of Object.entries(v2)) {
|
|
177553
177762
|
if ((k3 === "screenId" || k3 === "contentScreenId") && typeof x2 === "string" && x2) out2.add(x2);
|
|
177554
|
-
else
|
|
177763
|
+
else walk3(x2, depth + 1);
|
|
177555
177764
|
}
|
|
177556
177765
|
};
|
|
177557
|
-
for (const chrome of ["tabBar", "drawer", "sidebar", "topBarDefault"])
|
|
177766
|
+
for (const chrome of ["tabBar", "drawer", "sidebar", "topBarDefault"]) walk3(nav?.[chrome], 0);
|
|
177558
177767
|
return out2;
|
|
177559
177768
|
}
|
|
177560
177769
|
async function localDbEntities(dir) {
|
|
@@ -181669,14 +181878,14 @@ function writeNoFollow2(appDir3, abs, content) {
|
|
|
181669
181878
|
}
|
|
181670
181879
|
function listFiles(appDir3) {
|
|
181671
181880
|
const files = [];
|
|
181672
|
-
const
|
|
181881
|
+
const walk3 = (d2) => {
|
|
181673
181882
|
const parentRel = relative17(appDir3, d2);
|
|
181674
181883
|
for (const e2 of readdirSync36(d2, { withFileTypes: true }).sort((a3, b3) => a3.name.localeCompare(b3.name))) {
|
|
181675
181884
|
if (e2.isSymbolicLink()) continue;
|
|
181676
181885
|
const p2 = join81(d2, e2.name);
|
|
181677
181886
|
if (e2.isDirectory()) {
|
|
181678
181887
|
if (isDeniedSourceDir(e2.name, parentRel) || isDeniedSourceDir(e2.name.toLowerCase(), parentRel)) continue;
|
|
181679
|
-
if (!
|
|
181888
|
+
if (!walk3(p2)) return false;
|
|
181680
181889
|
} else if (e2.isFile()) {
|
|
181681
181890
|
const rel2 = relative17(appDir3, p2);
|
|
181682
181891
|
if (isDeniedSourcePath(rel2) || isDeniedSourcePath(rel2.toLowerCase())) continue;
|
|
@@ -181686,7 +181895,7 @@ function listFiles(appDir3) {
|
|
|
181686
181895
|
}
|
|
181687
181896
|
return true;
|
|
181688
181897
|
};
|
|
181689
|
-
const complete =
|
|
181898
|
+
const complete = walk3(appDir3);
|
|
181690
181899
|
return { files, truncated: !complete };
|
|
181691
181900
|
}
|
|
181692
181901
|
function fileTools() {
|
|
@@ -182862,9 +183071,9 @@ var init_readonly = __esm({
|
|
|
182862
183071
|
// ../../node_modules/@wix/asc-core/dist/scrub.js
|
|
182863
183072
|
function scrubSecrets(text25, literals = []) {
|
|
182864
183073
|
let out2 = text25;
|
|
182865
|
-
for (const
|
|
182866
|
-
if (
|
|
182867
|
-
out2 = out2.split(
|
|
183074
|
+
for (const literal3 of literals) {
|
|
183075
|
+
if (literal3 && literal3.length >= 4)
|
|
183076
|
+
out2 = out2.split(literal3).join("[redacted]");
|
|
182868
183077
|
}
|
|
182869
183078
|
for (const shape of SECRET_SHAPES2)
|
|
182870
183079
|
out2 = out2.replace(shape, "[redacted]");
|
|
@@ -216678,11 +216887,11 @@ var init_remote = __esm({
|
|
|
216678
216887
|
* no path on this machine reaches the worker. A file whose bytes no longer match its md5 is refused.
|
|
216679
216888
|
*/
|
|
216680
216889
|
async uploadLocalFiles(params) {
|
|
216681
|
-
const
|
|
216890
|
+
const walk3 = async (value2) => {
|
|
216682
216891
|
if (Array.isArray(value2)) {
|
|
216683
216892
|
const out2 = [];
|
|
216684
216893
|
for (const v2 of value2)
|
|
216685
|
-
out2.push(await
|
|
216894
|
+
out2.push(await walk3(v2));
|
|
216686
216895
|
return out2;
|
|
216687
216896
|
}
|
|
216688
216897
|
if (value2 && typeof value2 === "object") {
|
|
@@ -216696,12 +216905,12 @@ var init_remote = __esm({
|
|
|
216696
216905
|
}
|
|
216697
216906
|
const out2 = {};
|
|
216698
216907
|
for (const [k3, v2] of Object.entries(o2))
|
|
216699
|
-
out2[k3] = await
|
|
216908
|
+
out2[k3] = await walk3(v2);
|
|
216700
216909
|
return out2;
|
|
216701
216910
|
}
|
|
216702
216911
|
return value2;
|
|
216703
216912
|
};
|
|
216704
|
-
return await
|
|
216913
|
+
return await walk3(params);
|
|
216705
216914
|
}
|
|
216706
216915
|
/** An AscApi-shaped proxy: `api.builds.latest(id)` runs `builds.latest` on the worker. */
|
|
216707
216916
|
api() {
|
|
@@ -224108,7 +224317,7 @@ function collectWorkerSources(tier5SrcDir, bundleName) {
|
|
|
224108
224317
|
const root = join120(tier5SrcDir, bundleName);
|
|
224109
224318
|
const files = {};
|
|
224110
224319
|
const visitedDirs = /* @__PURE__ */ new Set();
|
|
224111
|
-
const
|
|
224320
|
+
const walk3 = (abs, rel2) => {
|
|
224112
224321
|
const real = realpathSync16(abs);
|
|
224113
224322
|
if (visitedDirs.has(real)) return;
|
|
224114
224323
|
visitedDirs.add(real);
|
|
@@ -224116,14 +224325,14 @@ function collectWorkerSources(tier5SrcDir, bundleName) {
|
|
|
224116
224325
|
const childAbs = join120(abs, name);
|
|
224117
224326
|
const childRel = posix3.join(rel2, name);
|
|
224118
224327
|
if (statSync36(childAbs).isDirectory()) {
|
|
224119
|
-
|
|
224328
|
+
walk3(childAbs, childRel);
|
|
224120
224329
|
} else if (/\.(ts|tsx|js|mjs|json)$/.test(name)) {
|
|
224121
224330
|
files[childRel] = readFileSync115(childAbs, "utf8");
|
|
224122
224331
|
}
|
|
224123
224332
|
}
|
|
224124
224333
|
};
|
|
224125
224334
|
if (!existsSync94(root)) return null;
|
|
224126
|
-
|
|
224335
|
+
walk3(root, `/tier5-src/${bundleName}`);
|
|
224127
224336
|
const entry = [`/tier5-src/${bundleName}/index.ts`, `/tier5-src/${bundleName}/index.js`].find((p2) => p2 in files);
|
|
224128
224337
|
if (!entry) return null;
|
|
224129
224338
|
collectRelativeSiblings(files, tier5SrcDir);
|
|
@@ -225442,12 +225651,12 @@ function appObject(source2) {
|
|
|
225442
225651
|
function patchConfig(configText, counters) {
|
|
225443
225652
|
const topBar = { actions: counters.map(headerBadgeAction) };
|
|
225444
225653
|
const bundle = headerBadgesBundleRef();
|
|
225445
|
-
const
|
|
225654
|
+
const literal3 = (value2, indent2) => JSON.stringify(value2, null, 2).replaceAll("\n", `
|
|
225446
225655
|
${indent2}`);
|
|
225447
225656
|
const source2 = ts13.createSourceFile("config.ts", configText, ts13.ScriptTarget.Latest, true, ts13.ScriptKind.TS);
|
|
225448
225657
|
const diagnostics = source2.parseDiagnostics;
|
|
225449
|
-
const snippetFor = (indent2) => `${indent2}"topBarDefault": ${
|
|
225450
|
-
${indent2}"navLogicBundle": ${
|
|
225658
|
+
const snippetFor = (indent2) => `${indent2}"topBarDefault": ${literal3(topBar, indent2)},
|
|
225659
|
+
${indent2}"navLogicBundle": ${literal3(bundle, indent2)},`;
|
|
225451
225660
|
if (diagnostics.length) return { status: "manual", reason: "config.ts could not be parsed", snippet: snippetFor(" ") };
|
|
225452
225661
|
const app2 = appObject(source2);
|
|
225453
225662
|
const navigationProperty = app2 && findProperty(app2, "navigation");
|
|
@@ -225469,7 +225678,7 @@ ${indent2}"navLogicBundle": ${literal2(bundle, indent2)},`;
|
|
|
225469
225678
|
const existingText = existingBar === void 0 ? void 0 : squash(existingBar.initializer.getText(source2));
|
|
225470
225679
|
const same5 = existingBar !== void 0 && sameBundle && (existingText === squash(JSON.stringify(topBar)) || existingText === squash(JSON.stringify(inboxBar)));
|
|
225471
225680
|
if (!existingBar && sameBundle) {
|
|
225472
|
-
const barOnly = `${indent}"topBarDefault": ${
|
|
225681
|
+
const barOnly = `${indent}"topBarDefault": ${literal3(topBar, indent)},`;
|
|
225473
225682
|
const at2 = navigation.getStart(source2) + 1;
|
|
225474
225683
|
return { status: "written", text: `${configText.slice(0, at2)}
|
|
225475
225684
|
${barOnly}${configText.slice(at2)}`, snippet: snippet4 };
|
|
@@ -233211,51 +233420,51 @@ var init_preview_assets_generated = __esm({
|
|
|
233211
233420
|
init_define_HHP_CATALOG();
|
|
233212
233421
|
init_preview_assets_format();
|
|
233213
233422
|
PREVIEW_ASSET_MANIFEST = [
|
|
233214
|
-
{ key: "assets/DashboardHost-
|
|
233215
|
-
{ key: "assets/DevDrawer-
|
|
233216
|
-
{ key: "assets/IdiomCompare-
|
|
233217
|
-
{ key: "assets/LightboxViewer-
|
|
233218
|
-
{ key: "assets/OfflineReadingBar-
|
|
233219
|
-
{ key: "assets/PhonePreviewControl-
|
|
233220
|
-
{ key: "assets/SchemeCompare-
|
|
233221
|
-
{ key: "assets/WixFrogTelemetrySink-
|
|
233423
|
+
{ key: "assets/DashboardHost-BTPAAl2m.js", contentType: "application/javascript; charset=utf-8", offset: 8, length: 2985, sha256: "a1aa4177400efc29d5e2219aecf6eb04af087c5a8536536922504018f1915689" },
|
|
233424
|
+
{ key: "assets/DevDrawer-Bw89CaVH.js", contentType: "application/javascript; charset=utf-8", offset: 2993, length: 16783, sha256: "5a73fd656f47dc18a27fbdfa37e7d733aa3b130d74d5ca6b768beb0a5871f3ff" },
|
|
233425
|
+
{ key: "assets/IdiomCompare-DuFE7uqc.js", contentType: "application/javascript; charset=utf-8", offset: 19776, length: 1926, sha256: "ff03724ab3d8e05137243c2769affb1c4bbe1f7f1f3a486828ebf969c6230432" },
|
|
233426
|
+
{ key: "assets/LightboxViewer-F7s5L8c3.js", contentType: "application/javascript; charset=utf-8", offset: 21702, length: 17382, sha256: "c5c11b3e204e5fec07826ab662568a2f3e0a8ea450a2375bcf1571c6f59ba4cf" },
|
|
233427
|
+
{ key: "assets/OfflineReadingBar-BdrSWpOl.js", contentType: "application/javascript; charset=utf-8", offset: 39084, length: 1646, sha256: "7816a708521ef3492cd589038fa22836cb52b3bc44983946bac81d47c13db96e" },
|
|
233428
|
+
{ key: "assets/PhonePreviewControl-BM9R6Ra4.js", contentType: "application/javascript; charset=utf-8", offset: 40730, length: 37851, sha256: "48cc7bc1c9961bbbdf00efea1190fc3c88bb48b6d4573eb724d83e9529732433" },
|
|
233429
|
+
{ key: "assets/SchemeCompare-u2oyrIiV.js", contentType: "application/javascript; charset=utf-8", offset: 78581, length: 1858, sha256: "356247b96e718bfb96deb8cbc44712ef9e3fa3308cb5ddb3d2c8749b937bcc40" },
|
|
233430
|
+
{ key: "assets/WixFrogTelemetrySink-DL8vZ7Mj.js", contentType: "application/javascript; charset=utf-8", offset: 80439, length: 3515, sha256: "94d0483d4661f6cb1e2c6dcd05f11bea5248e257e721b35572b4c7600afa53ab" },
|
|
233222
233431
|
{ key: "assets/calendar-ics-BvfIYWjG.js", contentType: "application/javascript; charset=utf-8", offset: 83954, length: 2192, sha256: "1636167041e9829ceccd3544297b86b8475c38bd2f759c4dbc17c813dc6e9254" },
|
|
233223
233432
|
{ key: "assets/catalog-CAoUWITw.js", contentType: "application/javascript; charset=utf-8", offset: 86146, length: 26046, sha256: "4c270ca3051f77d761aef1297125e02339d48493dd2b84a0cacf0faf41aa8cb3" },
|
|
233224
|
-
{ key: "assets/catalogFontFaces-
|
|
233433
|
+
{ key: "assets/catalogFontFaces-Cz_RHV0V.js", contentType: "application/javascript; charset=utf-8", offset: 112192, length: 1111, sha256: "4091936a4d776f446922c405e979e99828eedc65525894e3bfd3fa98066fd099" },
|
|
233225
233434
|
{ key: "assets/contacts-vcard-BcohPQ0m.js", contentType: "application/javascript; charset=utf-8", offset: 113303, length: 2567, sha256: "c4ff75e96cd909bbb9182c5dc78794fcebc65139fbddef2537711d774fb33ad0" },
|
|
233226
|
-
{ key: "assets/files-transfer-
|
|
233435
|
+
{ key: "assets/files-transfer-DCgsSBhl.js", contentType: "application/javascript; charset=utf-8", offset: 115870, length: 6446, sha256: "a83d6fc677f89d6d17f0bf8f8055daa2c88f7f02d5510a93838f5e88516f9d5c" },
|
|
233227
233436
|
{ key: "assets/frogActionMap-CTMe3Bz1.js", contentType: "application/javascript; charset=utf-8", offset: 122316, length: 1172, sha256: "9f1ce4c70a680dfb902949e1f482c7e47500b69c3350cd091b1b51d674032d53" },
|
|
233228
|
-
{ key: "assets/frogApiRules-
|
|
233437
|
+
{ key: "assets/frogApiRules-BTIaUm13.js", contentType: "application/javascript; charset=utf-8", offset: 123488, length: 2207, sha256: "6f6c6037d1dd4d212d145d5c8d91db82e3647a874b80068129dd5d0180f33768" },
|
|
233229
233438
|
{ key: "assets/frogScreenMap-S_IRnz20.js", contentType: "application/javascript; charset=utf-8", offset: 125695, length: 1067, sha256: "22b2f71e1b06df8f1e79b890d47fe42e983d37865c2cc9be753e4121764c91e1" },
|
|
233230
233439
|
{ key: "assets/glassPreviewBrowser-DONaOehd.js", contentType: "application/javascript; charset=utf-8", offset: 126762, length: 6578, sha256: "4402c4cddd2a564e7466cdf1e12a0e0277c0400b288e1e5eda1d23e797599d31" },
|
|
233231
233440
|
{ key: "assets/image-preparation-Cj4gldm6.js", contentType: "application/javascript; charset=utf-8", offset: 133340, length: 2704, sha256: "32944ea587c2f3b84389b66b50a850437560238f1c8d33b6275973ee04eee865" },
|
|
233232
|
-
{ key: "assets/index-
|
|
233233
|
-
{ key: "assets/jsx-runtime-CdvZGgm7.js", contentType: "application/javascript; charset=utf-8", offset:
|
|
233234
|
-
{ key: "assets/pdf-
|
|
233235
|
-
{ key: "assets/pdf.worker.min-BGnVRhRG.js", contentType: "application/javascript; charset=utf-8", offset:
|
|
233236
|
-
{ key: "assets/pdf.worker.min-BmVo14Nb.mjs", contentType: "application/javascript; charset=utf-8", offset:
|
|
233237
|
-
{ key: "assets/pdfDocument-
|
|
233238
|
-
{ key: "assets/pdfFetch-Cc8i1I1h.js", contentType: "application/javascript; charset=utf-8", offset:
|
|
233239
|
-
{ key: "assets/scrollLinkedRuntime-
|
|
233240
|
-
{ key: "assets/webviewBridgeHost-
|
|
233241
|
-
{ key: "fonts/Roboto-LICENSE.txt", contentType: "application/octet-stream", offset:
|
|
233242
|
-
{ key: "fonts/Roboto-Variable.ttf", contentType: "font/ttf", offset:
|
|
233243
|
-
{ key: "fonts/WixMadeforDisplay-Bold.ttf", contentType: "font/ttf", offset:
|
|
233244
|
-
{ key: "fonts/WixMadeforDisplay-ExtraBold.ttf", contentType: "font/ttf", offset:
|
|
233245
|
-
{ key: "fonts/WixMadeforDisplay-Medium.ttf", contentType: "font/ttf", offset:
|
|
233246
|
-
{ key: "fonts/WixMadeforDisplay-Regular.ttf", contentType: "font/ttf", offset:
|
|
233247
|
-
{ key: "fonts/WixMadeforDisplay-SemiBold.ttf", contentType: "font/ttf", offset:
|
|
233248
|
-
{ key: "fonts/WixMadeforText-Bold.ttf", contentType: "font/ttf", offset:
|
|
233249
|
-
{ key: "fonts/WixMadeforText-ExtraBold.ttf", contentType: "font/ttf", offset:
|
|
233250
|
-
{ key: "fonts/WixMadeforText-Medium.ttf", contentType: "font/ttf", offset:
|
|
233251
|
-
{ key: "fonts/WixMadeforText-Regular.ttf", contentType: "font/ttf", offset:
|
|
233252
|
-
{ key: "fonts/WixMadeforText-SemiBold.ttf", contentType: "font/ttf", offset:
|
|
233253
|
-
{ key: "himi-sw.js", contentType: "application/javascript; charset=utf-8", offset:
|
|
233254
|
-
{ key: "index.html", contentType: "text/html; charset=utf-8", offset:
|
|
233255
|
-
{ key: "ios-glass-preview.css", contentType: "text/css; charset=utf-8", offset:
|
|
233256
|
-
{ key: "kit-tab-bar.css", contentType: "text/css; charset=utf-8", offset:
|
|
233257
|
-
{ key: "t5-frame.html", contentType: "text/html; charset=utf-8", offset:
|
|
233258
|
-
{ key: "t5-worker-frame.html", contentType: "text/html; charset=utf-8", offset:
|
|
233441
|
+
{ key: "assets/index-1f_UDNEx.js", contentType: "application/javascript; charset=utf-8", offset: 136044, length: 1578133, sha256: "8db5252888571e27b507e8a23ae3f60f3cf7c091c2a79e28cc768b1f0921f502" },
|
|
233442
|
+
{ key: "assets/jsx-runtime-CdvZGgm7.js", contentType: "application/javascript; charset=utf-8", offset: 1714177, length: 7751, sha256: "42a78b508d0f309f6a4a6efbb8669015211b3c26574c5b0929884c4d9d20b806" },
|
|
233443
|
+
{ key: "assets/pdf-DLJpSIDx.js", contentType: "application/javascript; charset=utf-8", offset: 1721928, length: 488215, sha256: "ecd0318450055d47467996fb81c979e6d067dafd7f726b0d5965625090eac3b1" },
|
|
233444
|
+
{ key: "assets/pdf.worker.min-BGnVRhRG.js", contentType: "application/javascript; charset=utf-8", offset: 2210143, length: 90, sha256: "521a0e528916d678d7588b2cddf3dadd3bb959a6d62426382f61c77a82017e35" },
|
|
233445
|
+
{ key: "assets/pdf.worker.min-BmVo14Nb.mjs", contentType: "application/javascript; charset=utf-8", offset: 2210233, length: 1317034, sha256: "a33cfe728c584fdba4fcc1fd54bcdc2f9f2f13889ddbb5b2bd1d0f8cbe49b84e" },
|
|
233446
|
+
{ key: "assets/pdfDocument-BOua-q2i.js", contentType: "application/javascript; charset=utf-8", offset: 3527267, length: 3470, sha256: "d3272bf2739acfc2854f5cb7d60ad915d9409929025d9a3d8ed4b689ce6ae1b7" },
|
|
233447
|
+
{ key: "assets/pdfFetch-Cc8i1I1h.js", contentType: "application/javascript; charset=utf-8", offset: 3530737, length: 2266, sha256: "1d21ad008921942217c9eac0c35b1713773b9d89c71e3ab4412781f7bb88f463" },
|
|
233448
|
+
{ key: "assets/scrollLinkedRuntime-BjIquFo9.js", contentType: "application/javascript; charset=utf-8", offset: 3533003, length: 2278, sha256: "2664f593bd7bcd172426cc8de8f429516a45ca4ceef9b1f82fe1009dd9b542d0" },
|
|
233449
|
+
{ key: "assets/webviewBridgeHost-CBZaBeU-.js", contentType: "application/javascript; charset=utf-8", offset: 3535281, length: 9889, sha256: "da60fe8e749666f6da192727410c4c2c367aad3b5616b275144efb736f35a537" },
|
|
233450
|
+
{ key: "fonts/Roboto-LICENSE.txt", contentType: "application/octet-stream", offset: 3545170, length: 4610, sha256: "994062dd7af4186a739de55dd9e151c63b6301f8e2cbafc608d35c2e87da0cd2" },
|
|
233451
|
+
{ key: "fonts/Roboto-Variable.ttf", contentType: "font/ttf", offset: 3549780, length: 488584, sha256: "d7598e12c5dbef095ff8272cfc55da0250bd07fbdecbac8a530b9b277872a134" },
|
|
233452
|
+
{ key: "fonts/WixMadeforDisplay-Bold.ttf", contentType: "font/ttf", offset: 4038364, length: 90924, sha256: "ec4c7d63772d980d6e147b2df6215fd2737e4b04cebe0cf7e11dc695fb63cdcf" },
|
|
233453
|
+
{ key: "fonts/WixMadeforDisplay-ExtraBold.ttf", contentType: "font/ttf", offset: 4129288, length: 90984, sha256: "bf4c16a2774edd38a921edf3099469866cd74c094fd596f3fa4e81f54a04dfaa" },
|
|
233454
|
+
{ key: "fonts/WixMadeforDisplay-Medium.ttf", contentType: "font/ttf", offset: 4220272, length: 90980, sha256: "368faca44fb9f7207e4af784e94750b1ee59c1098b8689e0f4a918926f244fb5" },
|
|
233455
|
+
{ key: "fonts/WixMadeforDisplay-Regular.ttf", contentType: "font/ttf", offset: 4311252, length: 90872, sha256: "97ed8f1a6772abe26e3d8af5cecfc4b02faa94497d585b0398b5053b739a70c1" },
|
|
233456
|
+
{ key: "fonts/WixMadeforDisplay-SemiBold.ttf", contentType: "font/ttf", offset: 4402124, length: 90980, sha256: "642feab8a48ddf6c7a89d7c2a7c0edfa0e6e773f671287e460e222703563191e" },
|
|
233457
|
+
{ key: "fonts/WixMadeforText-Bold.ttf", contentType: "font/ttf", offset: 4493104, length: 108636, sha256: "37c179b4fefb63ea9637322b84583a2df53aa226c150294eea1675c14b1b8e29" },
|
|
233458
|
+
{ key: "fonts/WixMadeforText-ExtraBold.ttf", contentType: "font/ttf", offset: 4601740, length: 109084, sha256: "62e2fe4718129f36ecdb0ae4de385bd6b81ecc876146447167c6c140fad699a9" },
|
|
233459
|
+
{ key: "fonts/WixMadeforText-Medium.ttf", contentType: "font/ttf", offset: 4710824, length: 109048, sha256: "4ecf270136af928612c76fe4ebade91d8156975e5ea4c0cf9225501dd1788e02" },
|
|
233460
|
+
{ key: "fonts/WixMadeforText-Regular.ttf", contentType: "font/ttf", offset: 4819872, length: 107700, sha256: "dee56f09fd3efc127c1ea95557edc74110c1460a46287da36e0af25efd341ef5" },
|
|
233461
|
+
{ key: "fonts/WixMadeforText-SemiBold.ttf", contentType: "font/ttf", offset: 4927572, length: 88108, sha256: "dced97a77624bc5f8b1ae65850360908297f4588e09feb6f22792d29dc7e765b" },
|
|
233462
|
+
{ key: "himi-sw.js", contentType: "application/javascript; charset=utf-8", offset: 5015680, length: 6818, sha256: "835250c3d8004f27c2b67f9b471984351ba6df07b916d97e33b43c691200a18c" },
|
|
233463
|
+
{ key: "index.html", contentType: "text/html; charset=utf-8", offset: 5022498, length: 4924, sha256: "b4a917328bb4dab899498b09c17940ca27f8d8142743cf02613cc293720e90aa" },
|
|
233464
|
+
{ key: "ios-glass-preview.css", contentType: "text/css; charset=utf-8", offset: 5027422, length: 11457, sha256: "6cb2b75264fa5fa2b4d28851878a5eab0712900e8b3a6c2370cc661d6d820805" },
|
|
233465
|
+
{ key: "kit-tab-bar.css", contentType: "text/css; charset=utf-8", offset: 5038879, length: 1171, sha256: "9e2c3a0faaf05d5471badf167a4d3bdf1c4e6dd65c432eea6d254158bfd99585" },
|
|
233466
|
+
{ key: "t5-frame.html", contentType: "text/html; charset=utf-8", offset: 5040050, length: 23047, sha256: "20d1459e3f896f344e478e613d0c979a0de02e81a929a45d3a0ef6a53af36441" },
|
|
233467
|
+
{ key: "t5-worker-frame.html", contentType: "text/html; charset=utf-8", offset: 5063097, length: 23064, sha256: "8655cfe9c74212ec5dafecb49d2fdeb48b19f1bd8a710091e3e55631f9b4ab06" }
|
|
233259
233468
|
];
|
|
233260
233469
|
}
|
|
233261
233470
|
});
|
|
@@ -235973,8 +236182,8 @@ var init_iap_client = __esm({
|
|
|
235973
236182
|
scrub(text25) {
|
|
235974
236183
|
const { keyId, issuerId, privateKeyPem } = this.options.key;
|
|
235975
236184
|
let out2 = text25;
|
|
235976
|
-
for (const
|
|
235977
|
-
if (
|
|
236185
|
+
for (const literal3 of [this.token?.value, privateKeyPem, issuerId, keyId]) {
|
|
236186
|
+
if (literal3) out2 = out2.split(literal3).join("[redacted]");
|
|
235978
236187
|
}
|
|
235979
236188
|
for (const shape of SECRET_SHAPES3) out2 = out2.replace(shape, "[redacted]");
|
|
235980
236189
|
return out2;
|
|
@@ -238409,13 +238618,13 @@ function redactRow(row2) {
|
|
|
238409
238618
|
return out2;
|
|
238410
238619
|
}
|
|
238411
238620
|
function scrubBook(value2) {
|
|
238412
|
-
const
|
|
238621
|
+
const walk3 = (v2) => {
|
|
238413
238622
|
if (typeof v2 === "string") return scrubString(v2);
|
|
238414
|
-
if (Array.isArray(v2)) return v2.map(
|
|
238415
|
-
if (v2 && typeof v2 === "object") return Object.fromEntries(Object.entries(v2).map(([k3, x2]) => [k3,
|
|
238623
|
+
if (Array.isArray(v2)) return v2.map(walk3);
|
|
238624
|
+
if (v2 && typeof v2 === "object") return Object.fromEntries(Object.entries(v2).map(([k3, x2]) => [k3, walk3(x2)]));
|
|
238416
238625
|
return v2;
|
|
238417
238626
|
};
|
|
238418
|
-
return
|
|
238627
|
+
return walk3(value2);
|
|
238419
238628
|
}
|
|
238420
238629
|
function assertNoSecrets(serialized) {
|
|
238421
238630
|
const hits = secretFindings([{ path: "book.json", bytes: Buffer.from(serialized) }]);
|
|
@@ -238508,10 +238717,10 @@ function bundleFinding(app2, { bundleId, storeBundleId }, fileName) {
|
|
|
238508
238717
|
function bindingFinding(app2, file2, purchasesAppId, wanted, fileName) {
|
|
238509
238718
|
const wixIap = lookup3(app2, "wixIap");
|
|
238510
238719
|
if (wixIap.kind === "absent") return { splice: appendProperties(app2, file2, [`${wanted},`]), applied: "wixIap.purchasesAppId" };
|
|
238511
|
-
const
|
|
238512
|
-
if (!
|
|
238513
|
-
const current = lookup3(
|
|
238514
|
-
if (current.kind === "absent") return { splice: appendProperties(
|
|
238720
|
+
const literal3 = wixIap.kind === "written" ? unwrap(wixIap.node.initializer) : void 0;
|
|
238721
|
+
if (!literal3 || !ts17.isObjectLiteralExpression(literal3)) return { instruction: `${fileName} computes wixIap, so it was not edited: it must evaluate to ${wanted}.` };
|
|
238722
|
+
const current = lookup3(literal3, "purchasesAppId");
|
|
238723
|
+
if (current.kind === "absent") return { splice: appendProperties(literal3, file2, [`purchasesAppId: ${JSON.stringify(purchasesAppId)},`]), applied: "wixIap.purchasesAppId" };
|
|
238515
238724
|
const value2 = current.kind === "written" ? unwrap(current.node.initializer) : void 0;
|
|
238516
238725
|
if (!value2 || !ts17.isStringLiteralLike(value2)) return { instruction: `${fileName} computes wixIap.purchasesAppId, so it was not edited: it must evaluate to ${JSON.stringify(purchasesAppId)}.` };
|
|
238517
238726
|
if (value2.text === purchasesAppId) return {};
|
|
@@ -243166,7 +243375,7 @@ __export(import_oneapp_exports, {
|
|
|
243166
243375
|
function convertPlaceholders(pattern) {
|
|
243167
243376
|
const placeholders = [];
|
|
243168
243377
|
const unconverted = [];
|
|
243169
|
-
const
|
|
243378
|
+
const walk3 = (s5) => {
|
|
243170
243379
|
let out2 = "";
|
|
243171
243380
|
let i2 = 0;
|
|
243172
243381
|
while (i2 < s5.length) {
|
|
@@ -243232,7 +243441,7 @@ function convertPlaceholders(pattern) {
|
|
|
243232
243441
|
i2 = end2;
|
|
243233
243442
|
continue;
|
|
243234
243443
|
}
|
|
243235
|
-
const convertedBodies = entries.map((e2) =>
|
|
243444
|
+
const convertedBodies = entries.map((e2) => walk3(e2.body));
|
|
243236
243445
|
let rewritten = spec;
|
|
243237
243446
|
for (let k3 = entries.length - 1; k3 >= 0; k3--) {
|
|
243238
243447
|
const e2 = entries[k3];
|
|
@@ -243249,7 +243458,7 @@ function convertPlaceholders(pattern) {
|
|
|
243249
243458
|
}
|
|
243250
243459
|
return out2;
|
|
243251
243460
|
};
|
|
243252
|
-
return { text:
|
|
243461
|
+
return { text: walk3(pattern), placeholders, unconverted };
|
|
243253
243462
|
}
|
|
243254
243463
|
function analyzePattern(pattern) {
|
|
243255
243464
|
const { text: text25, placeholders, unconverted } = convertPlaceholders(pattern);
|
|
@@ -244984,7 +245193,7 @@ function toBase44Schema(spec, app2) {
|
|
|
244984
245193
|
...spec.rls !== void 0 ? { rls: spec.rls } : {}
|
|
244985
245194
|
};
|
|
244986
245195
|
}
|
|
244987
|
-
function
|
|
245196
|
+
function propsOf3(schema2) {
|
|
244988
245197
|
const p2 = schema2?.properties;
|
|
244989
245198
|
return p2 && typeof p2 === "object" && !Array.isArray(p2) ? p2 : {};
|
|
244990
245199
|
}
|
|
@@ -245010,8 +245219,8 @@ function keepRemotePermissions(desired, remote, spec) {
|
|
|
245010
245219
|
if (remote.rls === void 0) delete desired.rls;
|
|
245011
245220
|
else desired.rls = remote.rls;
|
|
245012
245221
|
}
|
|
245013
|
-
const remoteProps =
|
|
245014
|
-
const desiredProps =
|
|
245222
|
+
const remoteProps = propsOf3(remote);
|
|
245223
|
+
const desiredProps = propsOf3(desired);
|
|
245015
245224
|
for (const f2 of spec.fields ?? []) {
|
|
245016
245225
|
const live4 = remoteProps[f2.key];
|
|
245017
245226
|
if (!live4 || f2.rls === void 0) continue;
|
|
@@ -245024,8 +245233,8 @@ function keepRemotePermissions(desired, remote, spec) {
|
|
|
245024
245233
|
}
|
|
245025
245234
|
function inheritUndeclaredPermissions(desired, remote, spec) {
|
|
245026
245235
|
if (spec.rls === void 0 && remote.rls !== void 0) desired.rls = remote.rls;
|
|
245027
|
-
const remoteProps =
|
|
245028
|
-
const desiredProps =
|
|
245236
|
+
const remoteProps = propsOf3(remote);
|
|
245237
|
+
const desiredProps = propsOf3(desired);
|
|
245029
245238
|
for (const f2 of spec.fields ?? []) {
|
|
245030
245239
|
if (f2.rls === void 0 && remoteProps[f2.key]?.rls !== void 0) desiredProps[f2.key].rls = remoteProps[f2.key].rls;
|
|
245031
245240
|
}
|
|
@@ -245070,8 +245279,8 @@ function planEntitySync(declared, snapshot4, opts) {
|
|
|
245070
245279
|
}
|
|
245071
245280
|
const desired = toBase44Schema(spec, app2);
|
|
245072
245281
|
const drift = [];
|
|
245073
|
-
const remoteProps =
|
|
245074
|
-
const desiredProps =
|
|
245282
|
+
const remoteProps = propsOf3(e2.schema);
|
|
245283
|
+
const desiredProps = propsOf3(desired);
|
|
245075
245284
|
for (const [key4, p2] of Object.entries(desiredProps)) {
|
|
245076
245285
|
const r3 = remoteProps[key4];
|
|
245077
245286
|
if (!r3) drift.push({ kind: "add-field", detail: `field "${key4}" (${String(p2.type)}) is added` });
|
|
@@ -246649,7 +246858,7 @@ var require_cjs = __commonJS({
|
|
|
246649
246858
|
}
|
|
246650
246859
|
return -1;
|
|
246651
246860
|
}
|
|
246652
|
-
function
|
|
246861
|
+
function walk3(hostname6, root, allowedMask) {
|
|
246653
246862
|
let node3 = root;
|
|
246654
246863
|
let end2 = hostname6.length;
|
|
246655
246864
|
let hash3 = 5381;
|
|
@@ -246696,13 +246905,13 @@ var require_cjs = __commonJS({
|
|
|
246696
246905
|
return;
|
|
246697
246906
|
}
|
|
246698
246907
|
const allowedMask = (options2.allowPrivateDomains ? 2 : 0) | (options2.allowIcannDomains ? 1 : 0);
|
|
246699
|
-
if (
|
|
246908
|
+
if (walk3(hostname6, exceptionsRoot, allowedMask)) {
|
|
246700
246909
|
out2.isIcann = (nodeFlags[matchNode] & 1) !== 0;
|
|
246701
246910
|
out2.isPrivate = (nodeFlags[matchNode] & 2) !== 0;
|
|
246702
246911
|
out2.publicSuffix = hostname6.slice(matchEnd + 1);
|
|
246703
246912
|
return;
|
|
246704
246913
|
}
|
|
246705
|
-
if (
|
|
246914
|
+
if (walk3(hostname6, rulesRoot, allowedMask)) {
|
|
246706
246915
|
out2.isIcann = (nodeFlags[matchNode] & 1) !== 0;
|
|
246707
246916
|
out2.isPrivate = (nodeFlags[matchNode] & 2) !== 0;
|
|
246708
246917
|
out2.publicSuffix = hostname6.slice(matchStart);
|
|
@@ -251078,12 +251287,12 @@ function webUrl(value2) {
|
|
|
251078
251287
|
}
|
|
251079
251288
|
}
|
|
251080
251289
|
function withoutNode(node3, id) {
|
|
251081
|
-
const
|
|
251082
|
-
if (Array.isArray(value2)) return value2.filter((v2) => !(v2 && typeof v2 === "object" && v2.id === id)).map(
|
|
251083
|
-
if (value2 && typeof value2 === "object") return Object.fromEntries(Object.entries(value2).map(([k3, v2]) => [k3,
|
|
251290
|
+
const walk3 = (value2) => {
|
|
251291
|
+
if (Array.isArray(value2)) return value2.filter((v2) => !(v2 && typeof v2 === "object" && v2.id === id)).map(walk3);
|
|
251292
|
+
if (value2 && typeof value2 === "object") return Object.fromEntries(Object.entries(value2).map(([k3, v2]) => [k3, walk3(v2)]));
|
|
251084
251293
|
return value2;
|
|
251085
251294
|
};
|
|
251086
|
-
return
|
|
251295
|
+
return walk3(node3);
|
|
251087
251296
|
}
|
|
251088
251297
|
function textAlign(alignment) {
|
|
251089
251298
|
return alignment === "center" ? "center" : alignment === "right" || alignment === "end" ? "trailing" : "leading";
|
|
@@ -251457,15 +251666,15 @@ function resolveRoutePlaceholders(out2, fellBack, slugs, hasTabBar, pageOfScreen
|
|
|
251457
251666
|
return body.type === "Button" && isPlaceholderTap(action) && !resolve116(str13(obj6(obj6(action).params).screenId));
|
|
251458
251667
|
};
|
|
251459
251668
|
const DEAD = Symbol("dead");
|
|
251460
|
-
const
|
|
251669
|
+
const walk3 = (value2, dropped) => {
|
|
251461
251670
|
if (typeof value2 === "string" && value2.startsWith(ROUTE_PLACEHOLDER)) return resolve116(value2);
|
|
251462
|
-
if (Array.isArray(value2)) return value2.map((v2) =>
|
|
251671
|
+
if (Array.isArray(value2)) return value2.map((v2) => walk3(v2, dropped)).filter((v2) => v2 !== DEAD);
|
|
251463
251672
|
if (value2 && typeof value2 === "object") {
|
|
251464
251673
|
if (isDeadButton(value2)) {
|
|
251465
251674
|
dropped.push(str13(obj6(obj6(obj6(value2).body).props).title));
|
|
251466
251675
|
return DEAD;
|
|
251467
251676
|
}
|
|
251468
|
-
const next = Object.fromEntries(Object.entries(value2).filter(([, v2]) => !(isPlaceholderTap(v2) && !resolve116(str13(obj6(obj6(v2).params).screenId)))).map(([k3, v2]) => [k3, isPlaceholderTap(v2) ? retarget(v2) :
|
|
251677
|
+
const next = Object.fromEntries(Object.entries(value2).filter(([, v2]) => !(isPlaceholderTap(v2) && !resolve116(str13(obj6(obj6(v2).params).screenId)))).map(([k3, v2]) => [k3, isPlaceholderTap(v2) ? retarget(v2) : walk3(v2, dropped)]));
|
|
251469
251678
|
const type2 = obj6(obj6(value2).body).type;
|
|
251470
251679
|
const before = obj6(obj6(obj6(value2).body).props).children, after = obj6(obj6(next.body).props).children;
|
|
251471
251680
|
if ((type2 === "VStack" || type2 === "HStack") && Array.isArray(before) && before.length && Array.isArray(after) && !after.length) return DEAD;
|
|
@@ -251476,7 +251685,7 @@ function resolveRoutePlaceholders(out2, fellBack, slugs, hasTabBar, pageOfScreen
|
|
|
251476
251685
|
const emptied = [];
|
|
251477
251686
|
for (const [id, screen] of Object.entries(out2.screens)) {
|
|
251478
251687
|
const dropped = [];
|
|
251479
|
-
const walked =
|
|
251688
|
+
const walked = walk3(screen, dropped);
|
|
251480
251689
|
if (walked.payload === DEAD) emptied.push({ id, dropped });
|
|
251481
251690
|
if (dryRun) continue;
|
|
251482
251691
|
out2.screens[id] = walked.payload === DEAD ? { ...walked, payload: { ...obj6(screen.payload), body: { ...obj6(obj6(screen.payload).body), props: { ...obj6(obj6(obj6(screen.payload).body).props), children: [] } } } } : walked;
|
|
@@ -251940,30 +252149,30 @@ function ricosTexts(documentJson) {
|
|
|
251940
252149
|
return [];
|
|
251941
252150
|
}
|
|
251942
252151
|
const out2 = [];
|
|
251943
|
-
const
|
|
252152
|
+
const walk3 = (node3) => {
|
|
251944
252153
|
if (Array.isArray(node3)) {
|
|
251945
|
-
node3.forEach(
|
|
252154
|
+
node3.forEach(walk3);
|
|
251946
252155
|
return;
|
|
251947
252156
|
}
|
|
251948
252157
|
if (!node3 || typeof node3 !== "object") return;
|
|
251949
252158
|
const text25 = obj7(obj7(node3).textData).text;
|
|
251950
252159
|
if (typeof text25 === "string" && text25) out2.push(text25);
|
|
251951
|
-
|
|
252160
|
+
walk3(obj7(node3).nodes);
|
|
251952
252161
|
};
|
|
251953
|
-
|
|
252162
|
+
walk3(obj7(root).nodes ?? root);
|
|
251954
252163
|
return out2;
|
|
251955
252164
|
}
|
|
251956
252165
|
function literalSlugFindings(slug, displayName3, screens, authoredText = []) {
|
|
251957
252166
|
if (slug.toLowerCase() === displayName3.trim().toLowerCase()) return [];
|
|
251958
252167
|
const escaped = slug.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
251959
|
-
const
|
|
252168
|
+
const literal3 = new RegExp(`(^|[^\\p{L}\\p{N}_@/.-])${escaped}(?![\\p{L}\\p{N}_@/-]|\\.[\\p{L}\\p{N}])`, "iu");
|
|
251960
252169
|
const name = displayName3.trim().replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
251961
252170
|
const businessName = new RegExp(`(^|[^\\p{L}\\p{N}_-])${name}(?![\\p{L}\\p{N}_-])`, "giu");
|
|
251962
252171
|
const findings = [];
|
|
251963
252172
|
const authored2 = new Set(authoredText);
|
|
251964
252173
|
for (const { screenId, descriptor } of screens) {
|
|
251965
252174
|
const check = (value2, path2, allowAuthored = screenId !== "himi_business_chat") => {
|
|
251966
|
-
if (typeof value2 === "string" && !(allowAuthored && authored2.has(value2)) && !value2.startsWith("$service:") && !value2.startsWith("$item.") &&
|
|
252175
|
+
if (typeof value2 === "string" && !(allowAuthored && authored2.has(value2)) && !value2.startsWith("$service:") && !value2.startsWith("$item.") && literal3.test(value2.replace(businessName, "$1"))) {
|
|
251967
252176
|
findings.push({ screenId, path: path2, value: value2 });
|
|
251968
252177
|
}
|
|
251969
252178
|
};
|
|
@@ -252008,10 +252217,10 @@ function appNameLiteral(configSource) {
|
|
|
252008
252217
|
return found;
|
|
252009
252218
|
}
|
|
252010
252219
|
function fixAppName(configSource, slug, displayName3) {
|
|
252011
|
-
const
|
|
252012
|
-
if (!
|
|
252220
|
+
const literal3 = appNameLiteral(configSource);
|
|
252221
|
+
if (!literal3 || literal3.value.toLowerCase() !== slug.toLowerCase() || literal3.value === displayName3.trim()) return void 0;
|
|
252013
252222
|
if (slug.toLowerCase() === displayName3.trim().toLowerCase()) return void 0;
|
|
252014
|
-
return { current:
|
|
252223
|
+
return { current: literal3.value, fixed: configSource.slice(0, literal3.start) + JSON.stringify(displayName3.trim()) + configSource.slice(literal3.end) };
|
|
252015
252224
|
}
|
|
252016
252225
|
function sourceIdentity(evidenceDir) {
|
|
252017
252226
|
const { manifest: manifest2, raw } = verifiedEvidence(evidenceDir);
|
|
@@ -252173,17 +252382,17 @@ function applyInviteDrawer(configText, showsInvite) {
|
|
|
252173
252382
|
if (!itemsValue) return unchanged("absent", "the app has no side menu (navigation.drawer.items), so there is nowhere to add Invite");
|
|
252174
252383
|
if (!ts19.isArrayLiteralExpression(itemsValue)) return unchanged("manual", "navigation.drawer.items is not an array literal, so a row cannot be added safely");
|
|
252175
252384
|
const rows = itemsValue.elements.filter(ts19.isObjectLiteralExpression);
|
|
252176
|
-
const hasRow = rows.some((row2) =>
|
|
252385
|
+
const hasRow = rows.some((row2) => literal2(findProperty(row2, "id")?.initializer) === INVITE_DRAWER_ID || literal2(findProperty(row2, "screenId")?.initializer) === INVITE_SCREEN);
|
|
252177
252386
|
if (hasRow) return { ...unchanged("unchanged", "the side menu already has an Invite row"), rowPresent: true };
|
|
252178
252387
|
const linkValue = findProperty(navigationValue, "linkableScreens")?.initializer;
|
|
252179
|
-
const linked = linkValue && ts19.isArrayLiteralExpression(linkValue) && linkValue.elements.some((item2) => ts19.isObjectLiteralExpression(item2) &&
|
|
252388
|
+
const linked = linkValue && ts19.isArrayLiteralExpression(linkValue) && linkValue.elements.some((item2) => ts19.isObjectLiteralExpression(item2) && literal2(findProperty(item2, "screenId")?.initializer) === INVITE_SCREEN);
|
|
252180
252389
|
if (!linked) {
|
|
252181
252390
|
return unchanged("absent", `the source shows Invite, but config.ts does not declare ${INVITE_SCREEN} in navigation.linkableScreens: build the Invite flow first (himi docs one-app-to-himi-app, "Invite is behavior"), then provision again`);
|
|
252182
252391
|
}
|
|
252183
252392
|
const elements = itemsValue.elements;
|
|
252184
|
-
const firstSection = elements.findIndex((item2) => ts19.isObjectLiteralExpression(item2) &&
|
|
252393
|
+
const firstSection = elements.findIndex((item2) => ts19.isObjectLiteralExpression(item2) && literal2(findProperty(item2, "role")?.initializer) === "section");
|
|
252185
252394
|
const before = firstSection === -1 ? elements.length - 1 : firstSection - 1;
|
|
252186
|
-
const destination = elements.slice(0, before + 1).some((item2) => ts19.isObjectLiteralExpression(item2) && !!
|
|
252395
|
+
const destination = elements.slice(0, before + 1).some((item2) => ts19.isObjectLiteralExpression(item2) && !!literal2(findProperty(item2, "screenId")?.initializer) && !["section", "note"].includes(literal2(findProperty(item2, "role")?.initializer) ?? ""));
|
|
252187
252396
|
if (!destination) return unchanged("absent", "the side menu has no destination before where Invite would go, and Invite must not become the app's home screen");
|
|
252188
252397
|
const anchor = elements[before];
|
|
252189
252398
|
const indent = " ".repeat(file2.getLineAndCharacterOfPosition(anchor.getStart()).character);
|
|
@@ -252217,7 +252426,7 @@ function withInviteTranslation(catalogText, locale) {
|
|
|
252217
252426
|
return `${JSON.stringify({ ...catalog4, messages }, null, 2)}
|
|
252218
252427
|
`;
|
|
252219
252428
|
}
|
|
252220
|
-
var INVITE_SCREEN, INVITE_DRAWER_ID, INVITE_ACTION, INVITE_LABEL, obj8,
|
|
252429
|
+
var INVITE_SCREEN, INVITE_DRAWER_ID, INVITE_ACTION, INVITE_LABEL, obj8, literal2, INVITE_TRANSLATIONS;
|
|
252221
252430
|
var init_invite_drawer = __esm({
|
|
252222
252431
|
"src/one-app/invite-drawer.ts"() {
|
|
252223
252432
|
init_define_HHP_CATALOG();
|
|
@@ -252227,7 +252436,7 @@ var init_invite_drawer = __esm({
|
|
|
252227
252436
|
INVITE_ACTION = { icon: "share", hiddenPath: "$service:invite.hidden" };
|
|
252228
252437
|
INVITE_LABEL = "Invite";
|
|
252229
252438
|
obj8 = (v2) => v2 && typeof v2 === "object" && !Array.isArray(v2) ? v2 : {};
|
|
252230
|
-
|
|
252439
|
+
literal2 = (node3) => node3 && ts19.isStringLiteralLike(node3) ? node3.text : void 0;
|
|
252231
252440
|
INVITE_TRANSLATIONS = { he: "\u05D4\u05D6\u05DE\u05E0\u05EA \u05D7\u05D1\u05E8\u05D9\u05DD" };
|
|
252232
252441
|
}
|
|
252233
252442
|
});
|
|
@@ -252301,7 +252510,7 @@ function provisionSiteBinding(dir, binding2, dryRun = false) {
|
|
|
252301
252510
|
const placeholder3 = !clientId || clientId.getText(file2).includes("YOUR_WIX_CLIENT_ID");
|
|
252302
252511
|
if (!placeholder3) return { status: "unchanged", reason: "config.ts has its own clientId, which is the author's binding; it is not replaced" };
|
|
252303
252512
|
const indent = " ";
|
|
252304
|
-
const
|
|
252513
|
+
const literal3 = `{
|
|
252305
252514
|
${indent}${indent}// Bound to the source site through its One App visitor identity (guide "Same-site identity"): no OAuth client is
|
|
252306
252515
|
${indent}${indent}// created on the customer's site, and no environment variable can repoint the build.
|
|
252307
252516
|
${indent}${indent}visitorSource: "one-app",
|
|
@@ -252310,7 +252519,7 @@ ${indent}${indent}siteUrl: ${JSON.stringify(binding2.siteUrl)},
|
|
|
252310
252519
|
${indent}${indent}bootAsVisitor: true,
|
|
252311
252520
|
${indent}${indent}preserveVisitorOnSignOut: true,
|
|
252312
252521
|
${indent}}`;
|
|
252313
|
-
if (!dryRun) writeFileSync64(configPath, `${source2.slice(0, argument.getStart(file2))}${
|
|
252522
|
+
if (!dryRun) writeFileSync64(configPath, `${source2.slice(0, argument.getStart(file2))}${literal3}${source2.slice(argument.getEnd())}`, "utf8");
|
|
252314
252523
|
return { status: "set" };
|
|
252315
252524
|
}
|
|
252316
252525
|
function inboxEntriesInConfig(configSource) {
|
|
@@ -252620,8 +252829,8 @@ function tabIcon(source2) {
|
|
|
252620
252829
|
const filled = `${icon}_fill`;
|
|
252621
252830
|
return { icon, ...ICON_NAMES.includes(filled) ? { selectedIcon: filled } : {}, resolved: !!found };
|
|
252622
252831
|
}
|
|
252623
|
-
function property2(
|
|
252624
|
-
const found = lookup3(
|
|
252832
|
+
function property2(literal3, name) {
|
|
252833
|
+
const found = lookup3(literal3, name);
|
|
252625
252834
|
return found.kind === "written" ? found.node : void 0;
|
|
252626
252835
|
}
|
|
252627
252836
|
function indentedJson(value2, file2, at2) {
|
|
@@ -259739,10 +259948,28 @@ __export(run_exports2, {
|
|
|
259739
259948
|
rowStatus: () => rowStatus,
|
|
259740
259949
|
rtlVariant: () => rtlVariant,
|
|
259741
259950
|
runFidelity: () => runFidelity,
|
|
259742
|
-
runId: () => runId
|
|
259951
|
+
runId: () => runId,
|
|
259952
|
+
unlinkableScreens: () => unlinkableScreens
|
|
259743
259953
|
});
|
|
259744
259954
|
import { mkdirSync as mkdirSync64, writeFileSync as writeFileSync71 } from "node:fs";
|
|
259745
259955
|
import { basename as basename38, join as join178 } from "node:path";
|
|
259956
|
+
function unlinkableScreens(config, screens, home2) {
|
|
259957
|
+
const navigation = config?.navigation;
|
|
259958
|
+
const linkables = Array.isArray(navigation?.linkableScreens) ? navigation.linkableScreens : [];
|
|
259959
|
+
if (!linkables.length || home2 === null) return {};
|
|
259960
|
+
const items = Array.isArray(navigation?.tabBar?.items) ? navigation.tabBar.items : [];
|
|
259961
|
+
const opens = new Set([
|
|
259962
|
+
...items.map((i2) => i2?.screenId),
|
|
259963
|
+
...linkables.filter((l3) => l3?.isPublic === true).map((l3) => l3.screenId),
|
|
259964
|
+
home2
|
|
259965
|
+
].filter((id) => typeof id === "string"));
|
|
259966
|
+
const out2 = {};
|
|
259967
|
+
for (const screen of screens) {
|
|
259968
|
+
if (opens.has(screen)) continue;
|
|
259969
|
+
out2[screen] = `a link cannot open ${screen} in the Player: it is not a tab root, so it needs a linkableScreens entry with isPublic: true (config.ts navigation)`;
|
|
259970
|
+
}
|
|
259971
|
+
return out2;
|
|
259972
|
+
}
|
|
259746
259973
|
function rtlVariant(config) {
|
|
259747
259974
|
const locale = config?.locale;
|
|
259748
259975
|
const pinned = locale?.pin === true && typeof locale.default === "string" && coerceSupportedLocale(locale.default) !== void 0;
|
|
@@ -259824,7 +260051,9 @@ async function runFidelity(root, opts = {}) {
|
|
|
259824
260051
|
error = { code: e2.code, message: e2.message };
|
|
259825
260052
|
}
|
|
259826
260053
|
frames.push(webFrames.get(screen) ?? { surface: "web", screen, variant, skipped: { reason: "no web frame" } });
|
|
259827
|
-
|
|
260054
|
+
const unlinkable = native && opts.unlinkable && Object.hasOwn(opts.unlinkable, screen) ? opts.unlinkable[screen] : void 0;
|
|
260055
|
+
if (unlinkable) frames.push(...["ios", "android"].map((surface) => ({ surface, screen, variant, skipped: { reason: unlinkable } })));
|
|
260056
|
+
else if (native) frames.push(...await native(screen, entry, variant, framesDir));
|
|
259828
260057
|
const scores = [];
|
|
259829
260058
|
const m2 = frames.find((f2) => f2.surface === "mockup"), w2 = frames.find((f2) => f2.surface === "web");
|
|
259830
260059
|
if (m2?.file && w2?.file && !m2.noReference) scores.push(await score(m2.file, w2.file, { surfaces: ["mockup", "web"] }));
|
|
@@ -260330,13 +260559,19 @@ async function fidelityCommand(ctx) {
|
|
|
260330
260559
|
}
|
|
260331
260560
|
}
|
|
260332
260561
|
let rtl;
|
|
260333
|
-
|
|
260334
|
-
|
|
260562
|
+
let unlinkable;
|
|
260563
|
+
const wantsRtl = !variants.length || variants.includes("rtl");
|
|
260564
|
+
if (wantsRtl || named3.length) {
|
|
260565
|
+
const { rtlVariant: rtlVariant2, unlinkableScreens: unlinkableScreens2 } = await Promise.resolve().then(() => (init_run3(), run_exports2));
|
|
260335
260566
|
const { loadAppConfigModule: loadAppConfigModule2 } = await Promise.resolve().then(() => (init_app_config_loader(), app_config_loader_exports));
|
|
260567
|
+
const { readHhpManifest: readHhpManifest2 } = await Promise.resolve().then(() => (init_hhp(), hhp_exports));
|
|
260568
|
+
const { homeScreenIdOf: homeScreenIdOf2 } = await Promise.resolve().then(() => (init_home_screen_id(), home_screen_id_exports));
|
|
260336
260569
|
try {
|
|
260337
|
-
|
|
260570
|
+
const config = await loadAppConfigModule2(dir);
|
|
260571
|
+
if (wantsRtl) rtl = rtlVariant2(config);
|
|
260572
|
+
if (named3.length && servePort !== void 0) unlinkable = unlinkableScreens2(config, Object.keys(readHhpManifest2(dir)?.screens ?? {}), homeScreenIdOf2(dir));
|
|
260338
260573
|
} catch (e2) {
|
|
260339
|
-
rtl = { skipped: `config.ts did not load: ${e2.message.split("\n")[0]}` };
|
|
260574
|
+
if (wantsRtl) rtl = { skipped: `config.ts did not load: ${e2.message.split("\n")[0]}` };
|
|
260340
260575
|
}
|
|
260341
260576
|
}
|
|
260342
260577
|
let plane;
|
|
@@ -260370,7 +260605,7 @@ async function fidelityCommand(ctx) {
|
|
|
260370
260605
|
}
|
|
260371
260606
|
let report9;
|
|
260372
260607
|
try {
|
|
260373
|
-
report9 = await runFidelity2(dir, { judgeDir, screens: list3(flags.screen), variants, ...native !== void 0 ? { native } : {}, ...rtl ? { rtl } : {} });
|
|
260608
|
+
report9 = await runFidelity2(dir, { judgeDir, screens: list3(flags.screen), variants, ...native !== void 0 ? { native } : {}, ...rtl ? { rtl } : {}, ...unlinkable ? { unlinkable } : {} });
|
|
260374
260609
|
} catch (e2) {
|
|
260375
260610
|
const code2 = e2.code;
|
|
260376
260611
|
if (code2 === "fidelity_not_hhp" || code2 === "fidelity_unknown_screen") {
|
|
@@ -267321,7 +267556,7 @@ async function distCommand(ctx) {
|
|
|
267321
267556
|
const app3 = typeof job.app === "string" ? job.app : void 0;
|
|
267322
267557
|
const jobId = typeof job.jobId === "string" ? job.jobId : void 0;
|
|
267323
267558
|
if (!player || !app3 || !jobId) return;
|
|
267324
|
-
const render3 = (label4, payload,
|
|
267559
|
+
const render3 = (label4, payload, literal3) => {
|
|
267325
267560
|
io2.log(`
|
|
267326
267561
|
${label4}`);
|
|
267327
267562
|
try {
|
|
@@ -267332,7 +267567,7 @@ ${label4}`);
|
|
|
267332
267567
|
io2.log(" QR omitted (link is too long)");
|
|
267333
267568
|
}
|
|
267334
267569
|
io2.log(` ${payload}`);
|
|
267335
|
-
if (
|
|
267570
|
+
if (literal3 && literal3 !== payload) io2.log(` ${literal3}`);
|
|
267336
267571
|
};
|
|
267337
267572
|
render3(" Himi Player", player);
|
|
267338
267573
|
if (job.status !== "SUCCESS") return;
|