@wix/himalaya-cli 0.1686.0 → 0.1687.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 → 57502d1ccdd006393a9208cfe9383df0fbe1e7b523c69c17c2e39eae20f1f6db.bin} +1 -1
- package/dist/browser-plane/sw.js +6 -6
- package/dist/cli.mjs +538 -345
- 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/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;
|
|
@@ -16080,7 +16255,7 @@ function childComponents(value2, path2, inTemplate, out2) {
|
|
|
16080
16255
|
for (const [k3, v2] of Object.entries(value2)) childComponents(v2, `${path2}.${k3}`, inTemplate || /Template$/.test(k3), out2);
|
|
16081
16256
|
}
|
|
16082
16257
|
function childrenOf(c2, path2, inTemplate) {
|
|
16083
|
-
const props2 =
|
|
16258
|
+
const props2 = propsOf2(c2);
|
|
16084
16259
|
const type2 = typeOf(c2);
|
|
16085
16260
|
const boundList = (type2 === "LazyList" || type2 === "Grid" || type2 === "Carousel") && hasItemsPath(props2);
|
|
16086
16261
|
const boundPages = type2 === "Pager" && hasPagesPath(props2);
|
|
@@ -16103,7 +16278,7 @@ function collectWebViews(descriptor) {
|
|
|
16103
16278
|
const sites = [];
|
|
16104
16279
|
const visit = (c2, path2, inTemplate) => {
|
|
16105
16280
|
if (typeOf(c2) === "WebView") {
|
|
16106
|
-
sites.push({ path: path2, id: typeof c2.id === "string" ? c2.id : "", props:
|
|
16281
|
+
sites.push({ path: path2, id: typeof c2.id === "string" ? c2.id : "", props: propsOf2(c2), inTemplate });
|
|
16107
16282
|
}
|
|
16108
16283
|
for (const child3 of childrenOf(c2, path2, inTemplate)) visit(child3.c, child3.path, child3.inTemplate);
|
|
16109
16284
|
};
|
|
@@ -16112,7 +16287,7 @@ function collectWebViews(descriptor) {
|
|
|
16112
16287
|
}
|
|
16113
16288
|
function mountable(c2, inTemplate = false) {
|
|
16114
16289
|
const type2 = typeOf(c2);
|
|
16115
|
-
const props2 =
|
|
16290
|
+
const props2 = propsOf2(c2);
|
|
16116
16291
|
const repeated = (n2) => inTemplate && n2 > 0 ? Infinity : n2;
|
|
16117
16292
|
if (type2 === "WebView") return repeated(isBridged(props2) ? 1 : 0);
|
|
16118
16293
|
if (type2 === "LazyList") {
|
|
@@ -16298,7 +16473,7 @@ function webViewEmbeddedAppFindings(screens) {
|
|
|
16298
16473
|
}
|
|
16299
16474
|
return out2;
|
|
16300
16475
|
}
|
|
16301
|
-
var MAX_SIMULTANEOUS_BRIDGED_WEBVIEWS, WEBVIEW_EMBEDDED_ENUMS, isRec, byCodeUnit, isComponent, typeOf,
|
|
16476
|
+
var MAX_SIMULTANEOUS_BRIDGED_WEBVIEWS, WEBVIEW_EMBEDDED_ENUMS, isRec, byCodeUnit, isComponent, typeOf, propsOf2, hasItemsPath, hasPagesPath, isBridged, configOf, isPerInstance, isLiteral, isItemDerived;
|
|
16302
16477
|
var init_webview_embedded = __esm({
|
|
16303
16478
|
"../../core/ts/src/webview-embedded.ts"() {
|
|
16304
16479
|
init_define_HHP_CATALOG();
|
|
@@ -16317,7 +16492,7 @@ var init_webview_embedded = __esm({
|
|
|
16317
16492
|
const body = c2.body;
|
|
16318
16493
|
return body.package === "himalaya" ? body.type : null;
|
|
16319
16494
|
};
|
|
16320
|
-
|
|
16495
|
+
propsOf2 = (c2) => {
|
|
16321
16496
|
const p2 = c2.body.props;
|
|
16322
16497
|
return isRec(p2) ? p2 : {};
|
|
16323
16498
|
};
|
|
@@ -18140,9 +18315,9 @@ function nativeRequiredFindings(descriptor) {
|
|
|
18140
18315
|
if (inner !== void 0 && (inner !== null || sub.endsWith("!"))) checkNested(inner, sub, `${path2}.${name}`, from);
|
|
18141
18316
|
}
|
|
18142
18317
|
};
|
|
18143
|
-
const
|
|
18318
|
+
const walk3 = (node3, at2) => {
|
|
18144
18319
|
if (Array.isArray(node3)) {
|
|
18145
|
-
node3.forEach((v2, i2) =>
|
|
18320
|
+
node3.forEach((v2, i2) => walk3(v2, `${at2}[${i2}]`));
|
|
18146
18321
|
return;
|
|
18147
18322
|
}
|
|
18148
18323
|
if (!node3 || typeof node3 !== "object") return;
|
|
@@ -18176,10 +18351,10 @@ function nativeRequiredFindings(descriptor) {
|
|
|
18176
18351
|
for (const [k3, v2] of Object.entries(record3)) {
|
|
18177
18352
|
if (isOpaqueAuthorJson(k3, v2, at2 === "")) continue;
|
|
18178
18353
|
if (isLenientTopBarSubtree(at2, k3)) continue;
|
|
18179
|
-
|
|
18354
|
+
walk3(v2, at2 ? `${at2}.${k3}` : k3);
|
|
18180
18355
|
}
|
|
18181
18356
|
};
|
|
18182
|
-
|
|
18357
|
+
walk3(descriptor, "");
|
|
18183
18358
|
if (descriptor && typeof descriptor === "object" && !Array.isArray(descriptor)) {
|
|
18184
18359
|
const root = descriptor;
|
|
18185
18360
|
for (const [field, cls] of Object.entries(NATIVE_DESCRIPTOR_NESTED)) {
|
|
@@ -18221,9 +18396,9 @@ function jsonPointer(dotted) {
|
|
|
18221
18396
|
}
|
|
18222
18397
|
function componentPropFindings(descriptor) {
|
|
18223
18398
|
const out2 = [];
|
|
18224
|
-
const
|
|
18399
|
+
const walk3 = (node3, at2) => {
|
|
18225
18400
|
if (Array.isArray(node3)) {
|
|
18226
|
-
node3.forEach((v2, i2) =>
|
|
18401
|
+
node3.forEach((v2, i2) => walk3(v2, `${at2}[${i2}]`));
|
|
18227
18402
|
return;
|
|
18228
18403
|
}
|
|
18229
18404
|
if (!node3 || typeof node3 !== "object") return;
|
|
@@ -18407,10 +18582,10 @@ function componentPropFindings(descriptor) {
|
|
|
18407
18582
|
}
|
|
18408
18583
|
for (const [k3, v2] of Object.entries(record3)) {
|
|
18409
18584
|
if (isOpaqueAuthorJson(k3, v2, at2 === "")) continue;
|
|
18410
|
-
|
|
18585
|
+
walk3(v2, at2 ? `${at2}.${k3}` : k3);
|
|
18411
18586
|
}
|
|
18412
18587
|
};
|
|
18413
|
-
|
|
18588
|
+
walk3(descriptor, "");
|
|
18414
18589
|
return out2;
|
|
18415
18590
|
}
|
|
18416
18591
|
function enumFieldNames(schema2 = screenDescriptorSchema) {
|
|
@@ -18672,8 +18847,8 @@ function richContentFindings(descriptor) {
|
|
|
18672
18847
|
if (body?.package === "himalaya" && body.type === "RichContent") {
|
|
18673
18848
|
const props2 = body.props ?? {};
|
|
18674
18849
|
const docPath = typeof props2.documentJsonPath === "string" && props2.documentJsonPath !== "" ? props2.documentJsonPath : void 0;
|
|
18675
|
-
const
|
|
18676
|
-
if (docPath === void 0 === (
|
|
18850
|
+
const literal3 = typeof props2.documentJson === "string" ? props2.documentJson : void 0;
|
|
18851
|
+
if (docPath === void 0 === (literal3 === void 0)) {
|
|
18677
18852
|
out2.push({ path: path2, message: "RichContent needs exactly one of documentJsonPath and documentJson" });
|
|
18678
18853
|
}
|
|
18679
18854
|
if (docPath !== void 0 && !docPath.startsWith("$service:") && !docPath.startsWith("$item.")) {
|
|
@@ -18681,8 +18856,8 @@ function richContentFindings(descriptor) {
|
|
|
18681
18856
|
} else if (docPath?.startsWith("$item.") && !/^\$item\.[A-Za-z0-9_]+$/.test(docPath)) {
|
|
18682
18857
|
out2.push({ path: path2, message: `RichContent.documentJsonPath "${docPath}" must name one row field: "$item.<letters, digits, _>"` });
|
|
18683
18858
|
}
|
|
18684
|
-
if (
|
|
18685
|
-
const laid = layoutRichContent(
|
|
18859
|
+
if (literal3 !== void 0) {
|
|
18860
|
+
const laid = layoutRichContent(literal3);
|
|
18686
18861
|
if ("rejected" in laid) {
|
|
18687
18862
|
out2.push({ path: path2, message: `RichContent.documentJson is rejected by the renderers (${laid.rejected}) \u2014 every surface would show the fallback` });
|
|
18688
18863
|
}
|
|
@@ -18710,13 +18885,13 @@ function richContentEditorFindings(descriptor) {
|
|
|
18710
18885
|
if (isHimalaya && body.type === "RichContentEditor") {
|
|
18711
18886
|
const p2 = body.props ?? {};
|
|
18712
18887
|
const docPath = typeof p2.documentPath === "string" && p2.documentPath !== "" ? p2.documentPath : void 0;
|
|
18713
|
-
const
|
|
18714
|
-
if (docPath !== void 0 &&
|
|
18888
|
+
const literal3 = typeof p2.documentJson === "string" ? p2.documentJson : void 0;
|
|
18889
|
+
if (docPath !== void 0 && literal3 !== void 0) out2.push({ path: path2, message: "RichContentEditor takes at most one of documentPath and documentJson" });
|
|
18715
18890
|
if (docPath !== void 0 && !docPath.startsWith("$service:")) out2.push({ path: path2, message: `RichContentEditor.documentPath must be a "$service:" binding, got "${docPath}"` });
|
|
18716
|
-
if (
|
|
18891
|
+
if (literal3 !== void 0) {
|
|
18717
18892
|
let doc;
|
|
18718
18893
|
try {
|
|
18719
|
-
doc = JSON.parse(
|
|
18894
|
+
doc = JSON.parse(literal3);
|
|
18720
18895
|
} catch {
|
|
18721
18896
|
doc = void 0;
|
|
18722
18897
|
}
|
|
@@ -19956,6 +20131,8 @@ function validateScreenDescriptor(screenId, served, opts = {}) {
|
|
|
19956
20131
|
issues.push(...manualPaginationIssues(descriptor));
|
|
19957
20132
|
issues.push(...motionBindingIssues(descriptor));
|
|
19958
20133
|
issues.push(...pagedListNestingIssues(descriptor));
|
|
20134
|
+
issues.push(...prominentActionIssues(descriptor));
|
|
20135
|
+
issues.push(...touchTargetIssues(descriptor));
|
|
19959
20136
|
issues.push(...webViewEmbeddedIssues(webViewEmbeddedFindings(descriptor)));
|
|
19960
20137
|
return {
|
|
19961
20138
|
screenId,
|
|
@@ -19984,6 +20161,7 @@ var init_validate_descriptor_core = __esm({
|
|
|
19984
20161
|
init_manual_pagination_lint();
|
|
19985
20162
|
init_motion_bindings_lint();
|
|
19986
20163
|
init_fast_screen_lint();
|
|
20164
|
+
init_design_lint();
|
|
19987
20165
|
init_validator();
|
|
19988
20166
|
init_declared_navigation_lint();
|
|
19989
20167
|
init_validator();
|
|
@@ -24921,16 +25099,16 @@ function pruneRasters(root, rasters) {
|
|
|
24921
25099
|
const assetsDir = findAssetsDir(root);
|
|
24922
25100
|
const dir = assetsDir && join17(assetsDir, RASTER_DIR);
|
|
24923
25101
|
if (!dir || !existsSync21(dir)) return;
|
|
24924
|
-
const
|
|
25102
|
+
const walk3 = (abs) => {
|
|
24925
25103
|
for (const entry of readdirSync15(abs, { withFileTypes: true })) {
|
|
24926
25104
|
const child3 = join17(abs, entry.name);
|
|
24927
25105
|
if (entry.isDirectory()) {
|
|
24928
|
-
|
|
25106
|
+
walk3(child3);
|
|
24929
25107
|
if (!readdirSync15(child3).length) rmSync8(child3, { recursive: true });
|
|
24930
25108
|
} else if (entry.isFile() && RASTER_FILE.test(entry.name) && !keep.has(child3)) rmSync8(child3);
|
|
24931
25109
|
}
|
|
24932
25110
|
};
|
|
24933
|
-
|
|
25111
|
+
walk3(dir);
|
|
24934
25112
|
if (!readdirSync15(dir).length) rmSync8(dir, { recursive: true });
|
|
24935
25113
|
}
|
|
24936
25114
|
async function initHhpScreen(root, id) {
|
|
@@ -25674,10 +25852,10 @@ function inferScreenDisplayName(screenId) {
|
|
|
25674
25852
|
return `${words || screenId}${opaque2 ? ` (${opaque2[1]})` : ""}`;
|
|
25675
25853
|
}
|
|
25676
25854
|
function screenDisplayName(screenId, displayName3, title, navigationLabel) {
|
|
25677
|
-
const
|
|
25678
|
-
if (
|
|
25679
|
-
if (
|
|
25680
|
-
if (
|
|
25855
|
+
const literal3 = (value2) => typeof value2 === "string" && !!value2.trim() && !value2.trim().startsWith("$") && !/^__[A-Z0-9_]+__$/.test(value2.trim());
|
|
25856
|
+
if (literal3(displayName3)) return displayName3.trim();
|
|
25857
|
+
if (literal3(title) && title.trim() !== screenId) return title.trim();
|
|
25858
|
+
if (literal3(navigationLabel)) return navigationLabel.trim();
|
|
25681
25859
|
return inferScreenDisplayName(screenId);
|
|
25682
25860
|
}
|
|
25683
25861
|
var ScreenViewValidationError, ID, object;
|
|
@@ -31654,10 +31832,12 @@ var init_idiom_controls = __esm({
|
|
|
31654
31832
|
section: { headerCase: "none", headerColor: "accentPrimary", headerSize: 14, headerWeight: 500, headerLetterSpacing: 0.1, fill: ["surfaceSecondary", "surfacePrimary"], outline: 0, radius: 20 },
|
|
31655
31833
|
// ModalBottomSheet + BottomSheetDefaults.DragHandle: a 32×4 handle, 28dp top corners.
|
|
31656
31834
|
sheet: { cornerRadius: 28, grabberWidth: 32, grabberHeight: 4 },
|
|
31657
|
-
// HimalayaAppShell draws
|
|
31658
|
-
//
|
|
31659
|
-
//
|
|
31660
|
-
|
|
31835
|
+
// HimalayaAppShell draws a Material 3 small top app bar: the navigation icon (ArrowBack or the
|
|
31836
|
+
// menu), the screen's title start-aligned beside it in titleLarge (22sp, shellTopBarTitle), and
|
|
31837
|
+
// the trailing actions. A titled screen reserves the bar's band in the content's flow unless it
|
|
31838
|
+
// is immersive (ScreenView.kt `reservesBand`); a sticky header, `leading: "none"` or a bar search
|
|
31839
|
+
// keeps the bar untitled (shellTitleText).
|
|
31840
|
+
navBar: { rootTitle: "small", pushedTitle: "small", back: "arrow", inlineTitleSize: 22, largeTitleSize: 0, hideWithStickyChrome: false },
|
|
31661
31841
|
// M3 Buttons and `Modifier.clickable` (every `onTap`, SDUIRenderer.kt) ripple. The web draws
|
|
31662
31842
|
// the M3 pressed state layer (10% of the content colour), not the expanding circle.
|
|
31663
31843
|
press: { button: "ripple", tappable: "ripple", highlightOpacity: 1, stateLayerOpacity: 0.1 },
|
|
@@ -33361,6 +33541,7 @@ function shouldRevealError(args) {
|
|
|
33361
33541
|
var EMAIL_RE, URL_HOST_RE, INTEGER_RE, NUMBER_RE, AUTHORED_PATTERN_LIMIT, authoredPatterns;
|
|
33362
33542
|
var init_validation = __esm({
|
|
33363
33543
|
"../../core/ts/src/validation.ts"() {
|
|
33544
|
+
"use strict";
|
|
33364
33545
|
init_define_HHP_CATALOG();
|
|
33365
33546
|
EMAIL_RE = /^[A-Za-z0-9._%+-]+@[A-Za-z0-9-]+(\.[A-Za-z0-9-]+)*\.[A-Za-z]{2,}$/;
|
|
33366
33547
|
URL_HOST_RE = /^[A-Za-z0-9-]+(\.[A-Za-z0-9-]+)*(:[0-9]+)?$/;
|
|
@@ -38369,14 +38550,14 @@ var init_images = __esm({
|
|
|
38369
38550
|
});
|
|
38370
38551
|
|
|
38371
38552
|
// ../../core/dev-server/src/stable-ids.ts
|
|
38372
|
-
function
|
|
38553
|
+
function isNode3(v2) {
|
|
38373
38554
|
if (typeof v2 !== "object" || v2 === null) return false;
|
|
38374
38555
|
const n2 = v2;
|
|
38375
38556
|
return typeof n2.id === "string" && typeof n2.body === "object" && n2.body !== null && typeof n2.body.type === "string";
|
|
38376
38557
|
}
|
|
38377
38558
|
function forEachChildComponent(node3, cb) {
|
|
38378
38559
|
const visit = (v2) => {
|
|
38379
|
-
if (
|
|
38560
|
+
if (isNode3(v2)) {
|
|
38380
38561
|
cb(v2);
|
|
38381
38562
|
return;
|
|
38382
38563
|
}
|
|
@@ -38392,7 +38573,7 @@ function forEachChildComponent(node3, cb) {
|
|
|
38392
38573
|
}
|
|
38393
38574
|
function visitComponents(root, cb) {
|
|
38394
38575
|
const visit = (value2) => {
|
|
38395
|
-
if (
|
|
38576
|
+
if (isNode3(value2)) {
|
|
38396
38577
|
cb(value2);
|
|
38397
38578
|
visit(value2.body.props);
|
|
38398
38579
|
return;
|
|
@@ -38432,9 +38613,9 @@ function assignStableIds(descriptor) {
|
|
|
38432
38613
|
assign2(child3, `${path2}/${seg2}`);
|
|
38433
38614
|
});
|
|
38434
38615
|
};
|
|
38435
|
-
if (
|
|
38436
|
-
if (
|
|
38437
|
-
if (
|
|
38616
|
+
if (isNode3(descriptor.payload)) assign2(descriptor.payload, descriptor.screenId);
|
|
38617
|
+
if (isNode3(descriptor.stickyHeader)) assign2(descriptor.stickyHeader, `${descriptor.screenId}/stickyHeader`);
|
|
38618
|
+
if (isNode3(descriptor.stickyFooter)) assign2(descriptor.stickyFooter, `${descriptor.screenId}/stickyFooter`);
|
|
38438
38619
|
}
|
|
38439
38620
|
var init_stable_ids = __esm({
|
|
38440
38621
|
"../../core/dev-server/src/stable-ids.ts"() {
|
|
@@ -40162,7 +40343,7 @@ function isBranchSelector(kind, key4) {
|
|
|
40162
40343
|
}
|
|
40163
40344
|
function unsupportedConstructs(pattern) {
|
|
40164
40345
|
const out2 = [];
|
|
40165
|
-
const
|
|
40346
|
+
const walk3 = (s5, inPlural) => {
|
|
40166
40347
|
let i2 = 0;
|
|
40167
40348
|
while (i2 < s5.length) {
|
|
40168
40349
|
const c2 = s5[i2];
|
|
@@ -40230,13 +40411,13 @@ function unsupportedConstructs(pattern) {
|
|
|
40230
40411
|
if (kind === "plural" && inPlural) {
|
|
40231
40412
|
out2.push(`plural "${name}" nested in a plural (the outer # replaces its own)`);
|
|
40232
40413
|
}
|
|
40233
|
-
for (const { body: body2 } of entries)
|
|
40414
|
+
for (const { body: body2 } of entries) walk3(body2, inPlural || kind === "plural");
|
|
40234
40415
|
continue;
|
|
40235
40416
|
}
|
|
40236
40417
|
out2.push(`${kind} argument "${name}"${spec !== void 0 && spec.trim() ? ` (${spec.trim()})` : ""}`);
|
|
40237
40418
|
}
|
|
40238
40419
|
};
|
|
40239
|
-
|
|
40420
|
+
walk3(pattern, false);
|
|
40240
40421
|
return out2;
|
|
40241
40422
|
}
|
|
40242
40423
|
var MAX_NESTING, PLURAL_SELECTOR, SELECT_SELECTOR;
|
|
@@ -40537,7 +40718,7 @@ var init_image_preview = __esm({
|
|
|
40537
40718
|
const mode = this.mode;
|
|
40538
40719
|
if (!mode) return [];
|
|
40539
40720
|
const result = [];
|
|
40540
|
-
const
|
|
40721
|
+
const walk3 = (entries, item2, rows, steps) => {
|
|
40541
40722
|
for (const e2 of entries) {
|
|
40542
40723
|
const trail = e2.pageIndex === void 0 ? steps : [...steps, { id: e2.nodeId, index: e2.pageIndex, rows }];
|
|
40543
40724
|
if (hiddenBool(resolve31(e2.hiddenPath, state, item2, false, env))) continue;
|
|
@@ -40547,10 +40728,10 @@ var init_image_preview = __esm({
|
|
|
40547
40728
|
const raw = resolve31(e2.type === "StatefulSection" ? e2.props.state : e2.props.casePath ?? e2.props.case_path, state, item2, false, env);
|
|
40548
40729
|
if (e2.type === "StatefulSection") {
|
|
40549
40730
|
const slot = shown2 ?? sectionSlot(raw);
|
|
40550
|
-
|
|
40731
|
+
walk3(e2.branches.find((b3) => b3.id === slot)?.entries ?? [], item2, rows, trail);
|
|
40551
40732
|
} else {
|
|
40552
40733
|
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
|
-
|
|
40734
|
+
walk3(selected?.entries ?? [], item2, rows, trail);
|
|
40554
40735
|
}
|
|
40555
40736
|
continue;
|
|
40556
40737
|
}
|
|
@@ -40586,11 +40767,11 @@ var init_image_preview = __esm({
|
|
|
40586
40767
|
const local = typeof e2.itemsPath === "string" && e2.itemsPath.startsWith("$item.");
|
|
40587
40768
|
const expanded = items.flatMap((raw, index) => raw && typeof raw === "object" && !Array.isArray(raw) ? [{ ...object2(raw), __index: index }] : local ? [{ value: raw, __index: index }] : []);
|
|
40588
40769
|
const keys2 = imagePreviewRowKeys(expanded, e2.templateId ?? "");
|
|
40589
|
-
expanded.forEach((next, index) =>
|
|
40590
|
-
} else
|
|
40770
|
+
expanded.forEach((next, index) => walk3(e2.children, next, [...rows, keys2[index]], [...trail, { id: e2.nodeId, index, rows }]));
|
|
40771
|
+
} else walk3(e2.children, item2, rows, trail);
|
|
40591
40772
|
}
|
|
40592
40773
|
};
|
|
40593
|
-
|
|
40774
|
+
walk3(this.entries, row2, [], []);
|
|
40594
40775
|
return result;
|
|
40595
40776
|
}
|
|
40596
40777
|
};
|
|
@@ -54276,7 +54457,7 @@ var init_pdf = __esm({
|
|
|
54276
54457
|
items,
|
|
54277
54458
|
styles: /* @__PURE__ */ Object.create(null)
|
|
54278
54459
|
};
|
|
54279
|
-
function
|
|
54460
|
+
function walk3(node3) {
|
|
54280
54461
|
if (!node3) {
|
|
54281
54462
|
return;
|
|
54282
54463
|
}
|
|
@@ -54300,10 +54481,10 @@ var init_pdf = __esm({
|
|
|
54300
54481
|
return;
|
|
54301
54482
|
}
|
|
54302
54483
|
for (const child3 of node3.children) {
|
|
54303
|
-
|
|
54484
|
+
walk3(child3);
|
|
54304
54485
|
}
|
|
54305
54486
|
}
|
|
54306
|
-
|
|
54487
|
+
walk3(xfa);
|
|
54307
54488
|
return output;
|
|
54308
54489
|
}
|
|
54309
54490
|
static shouldBuildText(name) {
|
|
@@ -129531,7 +129712,7 @@ function hasInteractiveDescendant(node3) {
|
|
|
129531
129712
|
}
|
|
129532
129713
|
function nameFromOwnContent(root) {
|
|
129533
129714
|
const parts = [];
|
|
129534
|
-
const
|
|
129715
|
+
const walk3 = (n2) => {
|
|
129535
129716
|
for (const child3 of Array.from(n2.childNodes)) {
|
|
129536
129717
|
if (child3.nodeType === 3) {
|
|
129537
129718
|
const t2 = child3.textContent?.trim();
|
|
@@ -129539,11 +129720,11 @@ function nameFromOwnContent(root) {
|
|
|
129539
129720
|
} else if (child3.nodeType === 1 && !child3.matches(NAME_SKIP_SELECTOR)) {
|
|
129540
129721
|
const own6 = child3.getAttribute("aria-label")?.trim() || (child3.tagName === "IMG" ? child3.getAttribute("alt")?.trim() : void 0);
|
|
129541
129722
|
if (own6) parts.push(own6);
|
|
129542
|
-
else
|
|
129723
|
+
else walk3(child3);
|
|
129543
129724
|
}
|
|
129544
129725
|
}
|
|
129545
129726
|
};
|
|
129546
|
-
|
|
129727
|
+
walk3(root);
|
|
129547
129728
|
return parts.join(" ").replace(/\s+/g, " ").trim();
|
|
129548
129729
|
}
|
|
129549
129730
|
function trackActivatorName(activator) {
|
|
@@ -134732,8 +134913,8 @@ var init_renderNode = __esm({
|
|
|
134732
134913
|
let countAttrs;
|
|
134733
134914
|
let countContent;
|
|
134734
134915
|
if (props2.animateValue === true && !ctx.reduceMotion()) {
|
|
134735
|
-
const
|
|
134736
|
-
const parsed =
|
|
134916
|
+
const literal3 = typeof props2.text === "string" && !isBinding(props2.text) ? props2.text : void 0;
|
|
134917
|
+
const parsed = literal3 != null ? parseCountUp(literal3) : null;
|
|
134737
134918
|
if (parsed) {
|
|
134738
134919
|
ensureCountUpRuntime();
|
|
134739
134920
|
countAttrs = {
|
|
@@ -135981,7 +136162,7 @@ var init_renderNode = __esm({
|
|
|
135981
136162
|
const gated2 = props2.presentedPath != null || props2.presented != null;
|
|
135982
136163
|
const gate = props2.presentedPath != null ? bound2 : props2.presented;
|
|
135983
136164
|
const gateOpen = gate === true || gate === "true";
|
|
135984
|
-
const
|
|
136165
|
+
const literal3 = props2.presentedPath == null && props2.presented != null;
|
|
135985
136166
|
const identity = { path: props2.presentedPath, presented: props2.presented, provider: ctx.provider };
|
|
135986
136167
|
const [local, setLocal] = React20.useState({ ...identity, opened: false, dismissed: false });
|
|
135987
136168
|
const sameGate = local.path === identity.path && local.presented === identity.presented && local.provider === identity.provider;
|
|
@@ -136035,7 +136216,7 @@ var init_renderNode = __esm({
|
|
|
136035
136216
|
}, [gated2, shown2, props2.presentedPath, props2.presented, ctx.provider]);
|
|
136036
136217
|
const floating = gated2 ? { position: "absolute", zIndex: 40, ...overlayEdgeStyle(placed, 6), translate: `${placement.x}px ${placement.y}px` } : {};
|
|
136037
136218
|
const inline = gated2 ? null : inlineEdgeFlex(resolveOverlayEdge("Popover", props2.edge));
|
|
136038
|
-
const openFromAnchor =
|
|
136219
|
+
const openFromAnchor = literal3 ? () => {
|
|
136039
136220
|
if (shown2) return;
|
|
136040
136221
|
setLocal({ ...identity, opened: true, dismissed: false });
|
|
136041
136222
|
} : void 0;
|
|
@@ -136043,9 +136224,9 @@ var init_renderNode = __esm({
|
|
|
136043
136224
|
const [needsSeparateOpener, setNeedsSeparateOpener] = React20.useState(false);
|
|
136044
136225
|
useIsomorphicLayoutEffect2(() => {
|
|
136045
136226
|
const el2 = anchorRef.current;
|
|
136046
|
-
const want =
|
|
136227
|
+
const want = literal3 && el2 != null && !hasTabStop(el2);
|
|
136047
136228
|
if (want !== anchorIsButton) setAnchorIsButton(want);
|
|
136048
|
-
const needsOpener =
|
|
136229
|
+
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
136230
|
if (needsOpener !== needsSeparateOpener) setNeedsSeparateOpener(needsOpener);
|
|
136050
136231
|
});
|
|
136051
136232
|
const anchorButtonProps = anchorIsButton ? {
|
|
@@ -136059,9 +136240,9 @@ var init_renderNode = __esm({
|
|
|
136059
136240
|
} : {};
|
|
136060
136241
|
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
136242
|
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,
|
|
136243
|
+
renderNode(props2.anchor, literal3 ? { ...ctx, imagePreview: void 0, imagePreviewBlocked: true } : ctx),
|
|
136063
136244
|
needsSeparateOpener && /* @__PURE__ */ jsx13("button", { type: "button", "aria-haspopup": "dialog", "aria-expanded": shown2, onClick: openFromAnchor, children: "Show details" })
|
|
136064
|
-
] }) }) : renderNode(props2.anchor,
|
|
136245
|
+
] }) }) : renderNode(props2.anchor, literal3 ? { ...ctx, imagePreview: void 0, imagePreviewBlocked: true } : ctx) : null,
|
|
136065
136246
|
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
136247
|
] });
|
|
136067
136248
|
});
|
|
@@ -136646,8 +136827,8 @@ var init_renderNode = __esm({
|
|
|
136646
136827
|
const boundState = useResolvedScalar(props2.statePath, ctx);
|
|
136647
136828
|
const boundDelivery = useResolvedScalar(props2.deliveryPath, ctx);
|
|
136648
136829
|
const boundRate = useResolvedScalar(props2.ratePath, ctx);
|
|
136649
|
-
const num5 = (bound2,
|
|
136650
|
-
const v2 = bound2 !== void 0 && bound2 !== null ? bound2 :
|
|
136830
|
+
const num5 = (bound2, literal3, dflt) => {
|
|
136831
|
+
const v2 = bound2 !== void 0 && bound2 !== null ? bound2 : literal3;
|
|
136651
136832
|
const n2 = typeof v2 === "number" ? v2 : typeof v2 === "string" ? Number(v2) : NaN;
|
|
136652
136833
|
return Number.isFinite(n2) ? n2 : dflt;
|
|
136653
136834
|
};
|
|
@@ -138817,6 +138998,16 @@ function platformFrameElement(spec, ctx, content, text25) {
|
|
|
138817
138998
|
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
138999
|
trailing
|
|
138819
139000
|
] });
|
|
139001
|
+
} else if (shape === "small") {
|
|
139002
|
+
const literalTitle = typeof spec.title === "string" && spec.title.trim() !== "" && (!spec.title.trim().startsWith("$") || spec.title.trim().startsWith("$t:"));
|
|
139003
|
+
const smallTitle = literalTitle && !spec.hasStickyHeader && !spec.leadingNone && !spec.immersive && !spec.searchable ? text25(spec.title) : null;
|
|
139004
|
+
if (smallTitle != null || leading || trailing) {
|
|
139005
|
+
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: [
|
|
139006
|
+
leading,
|
|
139007
|
+
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 }),
|
|
139008
|
+
trailing
|
|
139009
|
+
] });
|
|
139010
|
+
}
|
|
138820
139011
|
} else if (!barGone && nav.back === "arrow" && (leading || trailing)) {
|
|
138821
139012
|
navBar = /* @__PURE__ */ jsxs11("div", { "data-testid": "platform-nav-bar", "data-title": "none", style: { height: 48, padding: "0 4px", display: "flex", alignItems: "center" }, children: [
|
|
138822
139013
|
leading,
|
|
@@ -139088,16 +139279,16 @@ __export(render_descriptor_exports, {
|
|
|
139088
139279
|
});
|
|
139089
139280
|
function a11ySemantics(type2, props2, modifiers, ancestorHidden, resolve116) {
|
|
139090
139281
|
if (!A11Y_MODIFIER_KEYS.some((k3) => modifiers[k3] !== void 0)) return void 0;
|
|
139091
|
-
const
|
|
139282
|
+
const literal3 = (v2) => typeof v2 === "string" && v2.trim() !== "" && !isDynamicValue(v2) ? v2 : void 0;
|
|
139092
139283
|
const spoken = (v2) => {
|
|
139093
|
-
const lit =
|
|
139284
|
+
const lit = literal3(v2);
|
|
139094
139285
|
if (lit !== void 0 || !resolve116 || typeof v2 !== "string" || !isDynamicValue(v2)) return lit;
|
|
139095
139286
|
const r3 = resolve116(v2);
|
|
139096
139287
|
if (r3 === v2) return void 0;
|
|
139097
139288
|
return typeof r3 === "string" && r3.trim() !== "" ? r3 : typeof r3 === "number" ? String(r3) : void 0;
|
|
139098
139289
|
};
|
|
139099
139290
|
const exposure = ancestorHidden ? "hidden" : atExposureOf({ ...props2, modifiers });
|
|
139100
|
-
const declared =
|
|
139291
|
+
const declared = literal3(modifiers.accessibilityRole);
|
|
139101
139292
|
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
139293
|
const role = declared === "decorative" && isInteractive({ ...props2, modifiers }) ? "button" : declared ?? inferred;
|
|
139103
139294
|
if (exposure === "hidden") return { role, exposure };
|
|
@@ -139120,9 +139311,9 @@ function a11ySemantics(type2, props2, modifiers, ancestorHidden, resolve116) {
|
|
|
139120
139311
|
if (announce && typeof announce === "object" && !Array.isArray(announce)) {
|
|
139121
139312
|
const a3 = announce;
|
|
139122
139313
|
out2.live = {
|
|
139123
|
-
politeness:
|
|
139124
|
-
trigger:
|
|
139125
|
-
...
|
|
139314
|
+
politeness: literal3(a3.politeness) ?? "polite",
|
|
139315
|
+
trigger: literal3(a3.trigger) ?? "on_change",
|
|
139316
|
+
...literal3(a3.text) !== void 0 ? { text: literal3(a3.text) } : {}
|
|
139126
139317
|
};
|
|
139127
139318
|
}
|
|
139128
139319
|
return out2;
|
|
@@ -139167,9 +139358,9 @@ function clientEnvFor(scheme, width, isRTL2) {
|
|
|
139167
139358
|
}
|
|
139168
139359
|
function nodeHidden(modifiers, provider, itemScope, env) {
|
|
139169
139360
|
const hp = modifiers.hiddenPath ?? modifiers.hidden_path;
|
|
139170
|
-
const
|
|
139361
|
+
const literal3 = modifiers.hidden === true;
|
|
139171
139362
|
const stateGate = typeof hp === "string" && (hp.startsWith("$service:") || hp.startsWith("$app:"));
|
|
139172
|
-
if (
|
|
139363
|
+
if (literal3 && !stateGate) return true;
|
|
139173
139364
|
if (typeof hp !== "string" || !hp) return false;
|
|
139174
139365
|
const low = hp.trim().toLowerCase();
|
|
139175
139366
|
if (low === "true" || low === "1") return true;
|
|
@@ -139177,7 +139368,7 @@ function nodeHidden(modifiers, provider, itemScope, env) {
|
|
|
139177
139368
|
if (isEnvExpr(hp)) return env ? envHidden(hp, env) === true : false;
|
|
139178
139369
|
if (hp.startsWith("$item") || stateGate) {
|
|
139179
139370
|
const v2 = hp.startsWith("$app:") ? provider.value(hp) ?? void 0 : resolveTreeScalar(hp, provider, itemScope);
|
|
139180
|
-
return
|
|
139371
|
+
return literal3 && (v2 === void 0 || v2 === null) ? true : hiddenBool2(v2);
|
|
139181
139372
|
}
|
|
139182
139373
|
return false;
|
|
139183
139374
|
}
|
|
@@ -139226,12 +139417,12 @@ function collectComponentMediaValues(type2, props2, context) {
|
|
|
139226
139417
|
}
|
|
139227
139418
|
function collectNativeOnly(node3) {
|
|
139228
139419
|
const found = /* @__PURE__ */ new Set();
|
|
139229
|
-
const
|
|
139420
|
+
const walk3 = (n2) => {
|
|
139230
139421
|
if (!n2) return;
|
|
139231
139422
|
if (NATIVE_ONLY_TYPES.has(n2.type)) found.add(n2.type);
|
|
139232
|
-
n2.children?.forEach(
|
|
139423
|
+
n2.children?.forEach(walk3);
|
|
139233
139424
|
};
|
|
139234
|
-
|
|
139425
|
+
walk3(node3);
|
|
139235
139426
|
return [...found].sort();
|
|
139236
139427
|
}
|
|
139237
139428
|
function buildRenderTree(node3, path2 = "$", provider = null, itemScope = void 0, includeRawProps = false, env = null, a11yHiddenAbove = false) {
|
|
@@ -139418,6 +139609,8 @@ function platformFrameFor(screenId, descriptor, navigation, homeScreenId, platfo
|
|
|
139418
139609
|
leading,
|
|
139419
139610
|
...cancel && leading === "cancel" ? { cancelLabel: cancel.label ?? cancel.id } : {},
|
|
139420
139611
|
leadingNone: bar.leading === "none",
|
|
139612
|
+
immersive: bar.style === "immersive" || bar.style === "transparent",
|
|
139613
|
+
searchable: bar.searchable != null,
|
|
139421
139614
|
barHidden: (boundVisibility === "visible" || boundVisibility === "hidden" ? boundVisibility : bar.visibility) === "hidden",
|
|
139422
139615
|
pushed,
|
|
139423
139616
|
hasStickyHeader: d2.stickyHeader != null,
|
|
@@ -145113,10 +145306,10 @@ function textCopyFor(workerSource, map2) {
|
|
|
145113
145306
|
return Object.keys(found).length ? JSON.stringify(found) : void 0;
|
|
145114
145307
|
}
|
|
145115
145308
|
function appearsAsLiteral(text25, value2) {
|
|
145116
|
-
const
|
|
145117
|
-
if (text25.includes(
|
|
145118
|
-
const escaped =
|
|
145119
|
-
return escaped !==
|
|
145309
|
+
const literal3 = JSON.stringify(value2);
|
|
145310
|
+
if (text25.includes(literal3)) return true;
|
|
145311
|
+
const escaped = literal3.replace(/[\u0080-\uffff]/g, (c2) => `\\u${c2.charCodeAt(0).toString(16).padStart(4, "0")}`);
|
|
145312
|
+
return escaped !== literal3 && text25.includes(escaped);
|
|
145120
145313
|
}
|
|
145121
145314
|
var ACCESSIBILITY_COPY;
|
|
145122
145315
|
var init_pinned_language = __esm({
|
|
@@ -145664,9 +145857,9 @@ function hasRowBinding(props2) {
|
|
|
145664
145857
|
});
|
|
145665
145858
|
}
|
|
145666
145859
|
function declaredOptionIds(props2, resolve116) {
|
|
145667
|
-
const
|
|
145860
|
+
const literal3 = props2.options ?? props2.tabs ?? props2.chips;
|
|
145668
145861
|
const bound2 = props2.optionsPath !== void 0 ? resolved2(props2.optionsPath, resolve116) : void 0;
|
|
145669
|
-
const raw = Array.isArray(bound2) ? bound2 :
|
|
145862
|
+
const raw = Array.isArray(bound2) ? bound2 : literal3;
|
|
145670
145863
|
if (!Array.isArray(raw)) return [];
|
|
145671
145864
|
const out2 = [];
|
|
145672
145865
|
for (const o2 of raw) {
|
|
@@ -145691,21 +145884,21 @@ function seedTokens(state, limit = 48) {
|
|
|
145691
145884
|
out2.push(tok);
|
|
145692
145885
|
}
|
|
145693
145886
|
};
|
|
145694
|
-
const
|
|
145887
|
+
const walk3 = (node3, depth) => {
|
|
145695
145888
|
if (out2.length >= limit || budget-- <= 0 || depth > 6) return;
|
|
145696
145889
|
if (typeof node3 === "string") {
|
|
145697
145890
|
if (node3.length <= 200 && !node3.includes("://") && !node3.startsWith("$")) take(node3);
|
|
145698
145891
|
return;
|
|
145699
145892
|
}
|
|
145700
145893
|
if (Array.isArray(node3)) {
|
|
145701
|
-
for (const el2 of node3)
|
|
145894
|
+
for (const el2 of node3) walk3(el2, depth + 1);
|
|
145702
145895
|
return;
|
|
145703
145896
|
}
|
|
145704
145897
|
if (node3 && typeof node3 === "object") {
|
|
145705
|
-
for (const v2 of Object.values(node3))
|
|
145898
|
+
for (const v2 of Object.values(node3)) walk3(v2, depth + 1);
|
|
145706
145899
|
}
|
|
145707
145900
|
};
|
|
145708
|
-
|
|
145901
|
+
walk3(state, 0);
|
|
145709
145902
|
return out2;
|
|
145710
145903
|
}
|
|
145711
145904
|
function synthesizeInput(control, resolve116, tokens2) {
|
|
@@ -145734,8 +145927,8 @@ function synthesizeInput(control, resolve116, tokens2) {
|
|
|
145734
145927
|
if (!acceptsWords(props2) || !acceptsWords(control.wrapper ?? {})) return null;
|
|
145735
145928
|
const binding2 = typeof props2.valuePath === "string" ? props2.valuePath : typeof props2.value === "string" && props2.value.startsWith("$service:") ? props2.value : void 0;
|
|
145736
145929
|
const bound2 = binding2 === void 0 ? void 0 : resolve116(binding2);
|
|
145737
|
-
const
|
|
145738
|
-
const current = typeof bound2 === "string" ? bound2 : typeof bound2 === "number" ? String(bound2) :
|
|
145930
|
+
const literal3 = typeof props2.value === "string" && !props2.value.startsWith("$") ? props2.value : void 0;
|
|
145931
|
+
const current = typeof bound2 === "string" ? bound2 : typeof bound2 === "number" ? String(bound2) : literal3 ?? "";
|
|
145739
145932
|
const max = typeof props2.maxLength === "number" && props2.maxLength > 0 ? props2.maxLength : void 0;
|
|
145740
145933
|
const pick4 = tokens2().find((t2) => t2 !== current && (max === void 0 || t2.length <= max));
|
|
145741
145934
|
if (pick4 === void 0) return null;
|
|
@@ -145825,17 +146018,17 @@ function relationalSignature(state) {
|
|
|
145825
146018
|
}
|
|
145826
146019
|
function listLengths(state, depth = 4) {
|
|
145827
146020
|
const out2 = {};
|
|
145828
|
-
const
|
|
146021
|
+
const walk3 = (node3, path2, left) => {
|
|
145829
146022
|
if (left < 0 || node3 === null || typeof node3 !== "object") return;
|
|
145830
146023
|
if (Array.isArray(node3)) {
|
|
145831
146024
|
out2[path2] = node3.length;
|
|
145832
146025
|
return;
|
|
145833
146026
|
}
|
|
145834
146027
|
for (const [k3, v2] of Object.entries(node3)) {
|
|
145835
|
-
|
|
146028
|
+
walk3(v2, path2 ? `${path2}.${k3}` : k3, left - 1);
|
|
145836
146029
|
}
|
|
145837
146030
|
};
|
|
145838
|
-
|
|
146031
|
+
walk3(state, "", depth);
|
|
145839
146032
|
return out2;
|
|
145840
146033
|
}
|
|
145841
146034
|
function summarizeDiff(aSig, bSig, limit = 3) {
|
|
@@ -145853,12 +146046,12 @@ function summarizeDiff(aSig, bSig, limit = 3) {
|
|
|
145853
146046
|
if (t2 === void 0) return "undefined";
|
|
145854
146047
|
return t2.length > 80 ? `${t2.slice(0, 77)}\u2026` : t2;
|
|
145855
146048
|
};
|
|
145856
|
-
const
|
|
146049
|
+
const walk3 = (x2, y2, path2) => {
|
|
145857
146050
|
if (diffs.length >= limit) return;
|
|
145858
146051
|
const bothObjects = x2 !== null && y2 !== null && typeof x2 === "object" && typeof y2 === "object" && !Array.isArray(x2) && !Array.isArray(y2);
|
|
145859
146052
|
if (bothObjects) {
|
|
145860
146053
|
for (const k3 of /* @__PURE__ */ new Set([...Object.keys(x2), ...Object.keys(y2)])) {
|
|
145861
|
-
|
|
146054
|
+
walk3(x2[k3], y2[k3], path2 ? `${path2}.${k3}` : k3);
|
|
145862
146055
|
}
|
|
145863
146056
|
return;
|
|
145864
146057
|
}
|
|
@@ -145867,14 +146060,14 @@ function summarizeDiff(aSig, bSig, limit = 3) {
|
|
|
145867
146060
|
diffs.push(`${path2 || "state"}: ${x2.length} \u2192 ${y2.length} items`);
|
|
145868
146061
|
return;
|
|
145869
146062
|
}
|
|
145870
|
-
for (let i2 = 0; i2 < x2.length && diffs.length < limit; i2++)
|
|
146063
|
+
for (let i2 = 0; i2 < x2.length && diffs.length < limit; i2++) walk3(x2[i2], y2[i2], `${path2}[${i2}]`);
|
|
145871
146064
|
return;
|
|
145872
146065
|
}
|
|
145873
146066
|
const xs2 = brief(x2);
|
|
145874
146067
|
const ys2 = brief(y2);
|
|
145875
146068
|
if (xs2 !== ys2) diffs.push(`${path2 || "state"}: ${xs2} \u2192 ${ys2}`);
|
|
145876
146069
|
};
|
|
145877
|
-
|
|
146070
|
+
walk3(a3, b3, "");
|
|
145878
146071
|
return diffs.slice(0, limit).join("; ");
|
|
145879
146072
|
}
|
|
145880
146073
|
var PREFIX_PAIRS, upperFirst, lowerFirst, REFRESH_ACTION, LOAD_MORE_ACTION, FILTER_ACTION, ANNOUNCEMENT_KEY, VOLATILE_KEY;
|
|
@@ -146548,7 +146741,7 @@ function missingItemFields(descriptor, state) {
|
|
|
146548
146741
|
if (!rawRows.length) return;
|
|
146549
146742
|
const rows = rawRows.map(rowScopeOf);
|
|
146550
146743
|
const seen = new Set(rows.flatMap((r3) => Object.keys(r3)).filter((k3) => k3 !== "__index"));
|
|
146551
|
-
const
|
|
146744
|
+
const walk3 = (v2, rel2, collapse) => {
|
|
146552
146745
|
if (typeof v2 === "string") {
|
|
146553
146746
|
for (const m2 of v2.matchAll(ITEM_PATH_RE)) {
|
|
146554
146747
|
const path2 = m2[1];
|
|
@@ -146562,7 +146755,7 @@ function missingItemFields(descriptor, state) {
|
|
|
146562
146755
|
}
|
|
146563
146756
|
return;
|
|
146564
146757
|
}
|
|
146565
|
-
if (Array.isArray(v2)) return v2.forEach((x2, i2) =>
|
|
146758
|
+
if (Array.isArray(v2)) return v2.forEach((x2, i2) => walk3(x2, `${rel2}[${i2}]`, collapse));
|
|
146566
146759
|
if (!v2 || typeof v2 !== "object") return;
|
|
146567
146760
|
const o2 = v2;
|
|
146568
146761
|
const hp = o2.modifiers?.hiddenPath;
|
|
@@ -146576,10 +146769,10 @@ function missingItemFields(descriptor, state) {
|
|
|
146576
146769
|
const at2 = rel2 ? `${rel2}.${k3}` : k3;
|
|
146577
146770
|
if (k3 === "id" && typeof x2 === "string") continue;
|
|
146578
146771
|
if (nested && k3 === "props") {
|
|
146579
|
-
for (const [pk, px] of Object.entries(x2)) if (pk !== nested.templateKey)
|
|
146772
|
+
for (const [pk, px] of Object.entries(x2)) if (pk !== nested.templateKey) walk3(px, `${at2}.${pk}`, c2);
|
|
146580
146773
|
continue;
|
|
146581
146774
|
}
|
|
146582
|
-
|
|
146775
|
+
walk3(x2, at2, c2);
|
|
146583
146776
|
}
|
|
146584
146777
|
if (nested && depth < A11Y_LIST_DEPTH) {
|
|
146585
146778
|
const innerAt = joinPath(templateAt, rel2 ? `${rel2}.props.${nested.templateKey}[0]` : `props.${nested.templateKey}[0]`);
|
|
@@ -146589,7 +146782,7 @@ function missingItemFields(descriptor, state) {
|
|
|
146589
146782
|
});
|
|
146590
146783
|
}
|
|
146591
146784
|
};
|
|
146592
|
-
|
|
146785
|
+
walk3(template, "", false);
|
|
146593
146786
|
};
|
|
146594
146787
|
const scan = (v2, at2) => {
|
|
146595
146788
|
if (Array.isArray(v2)) return v2.forEach((x2, i2) => scan(x2, `${at2}[${i2}]`));
|
|
@@ -146621,16 +146814,16 @@ function repeaterOf(o2) {
|
|
|
146621
146814
|
}
|
|
146622
146815
|
function collectObservations(descriptorOrPayload, state) {
|
|
146623
146816
|
const out2 = [];
|
|
146624
|
-
const
|
|
146817
|
+
const walk3 = (node3) => {
|
|
146625
146818
|
if (!node3) return;
|
|
146626
146819
|
if (node3.hidden) return;
|
|
146627
146820
|
for (const [field, value2] of Object.entries(node3.values ?? {})) {
|
|
146628
146821
|
const enc3 = value2 !== null && typeof value2 === "object" ? JSON.stringify(value2) : String(value2);
|
|
146629
146822
|
out2.push(`${node3.id}.${field}=${enc3}`);
|
|
146630
146823
|
}
|
|
146631
|
-
node3.children?.forEach(
|
|
146824
|
+
node3.children?.forEach(walk3);
|
|
146632
146825
|
};
|
|
146633
|
-
descriptorTrees(descriptorOrPayload, new FakeServiceProvider(state)).forEach(
|
|
146826
|
+
descriptorTrees(descriptorOrPayload, new FakeServiceProvider(state)).forEach(walk3);
|
|
146634
146827
|
return out2.sort();
|
|
146635
146828
|
}
|
|
146636
146829
|
function unobservedCopySites(descriptorOrPayload, state, expected) {
|
|
@@ -154026,16 +154219,16 @@ function blankComments(src) {
|
|
|
154026
154219
|
}
|
|
154027
154220
|
function parseStoreBlock(configTs) {
|
|
154028
154221
|
const text25 = blankComments(configTs);
|
|
154029
|
-
const
|
|
154030
|
-
if (
|
|
154031
|
-
if (
|
|
154222
|
+
const literal3 = [...text25.matchAll(/(?<![\w$.])store\s*:\s*(?=\{\s*["']?adopt["']?\s*:)/g)];
|
|
154223
|
+
if (literal3.length > 1) throw new Error("config.ts declares `store: { adopt }` more than once");
|
|
154224
|
+
if (literal3.length === 0) {
|
|
154032
154225
|
if (/(?<![\w$.])adopt\s*:/.test(text25) || /(?<![\w$.])store\s*:/.test(text25) && /(?<![\w$.])adopt\b/.test(text25)) {
|
|
154033
154226
|
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
154227
|
}
|
|
154035
154228
|
return void 0;
|
|
154036
154229
|
}
|
|
154037
154230
|
const p2 = new LiteralParser(text25);
|
|
154038
|
-
p2.i =
|
|
154231
|
+
p2.i = literal3[0].index + literal3[0][0].length;
|
|
154039
154232
|
return p2.object();
|
|
154040
154233
|
}
|
|
154041
154234
|
function adoptedIdentityOfConfigTs(configTs) {
|
|
@@ -162003,7 +162196,7 @@ function isDeadStoreCta(node3) {
|
|
|
162003
162196
|
}
|
|
162004
162197
|
function pruneTree(root, isDead) {
|
|
162005
162198
|
const dropped = [];
|
|
162006
|
-
if (!
|
|
162199
|
+
if (!isNode4(root)) return { emptied: false, dropped };
|
|
162007
162200
|
return { emptied: !pruneNode(root, dropped, isDead), dropped };
|
|
162008
162201
|
}
|
|
162009
162202
|
function pruneNode(node3, dropped, isDead = isDeadStoreCta) {
|
|
@@ -162018,7 +162211,7 @@ function pruneNode(node3, dropped, isDead = isDeadStoreCta) {
|
|
|
162018
162211
|
dropped.push(typeof child3.id === "string" && child3.id ? child3.id : "(unnamed CTA)");
|
|
162019
162212
|
return false;
|
|
162020
162213
|
}
|
|
162021
|
-
if (!
|
|
162214
|
+
if (!isNode4(child3)) return true;
|
|
162022
162215
|
return pruneNode(child3, dropped, isDead);
|
|
162023
162216
|
});
|
|
162024
162217
|
if (kept.length === list4.length) continue;
|
|
@@ -162037,7 +162230,7 @@ function pruneWithin(value2, dropped, isDead) {
|
|
|
162037
162230
|
return;
|
|
162038
162231
|
}
|
|
162039
162232
|
if (!value2 || typeof value2 !== "object") return;
|
|
162040
|
-
if (
|
|
162233
|
+
if (isNode4(value2)) {
|
|
162041
162234
|
pruneNode(value2, dropped, isDead);
|
|
162042
162235
|
return;
|
|
162043
162236
|
}
|
|
@@ -162053,7 +162246,7 @@ function patchStoreCtas(src, verticals, homeActionId) {
|
|
|
162053
162246
|
} catch {
|
|
162054
162247
|
return { src, dropped: [] };
|
|
162055
162248
|
}
|
|
162056
|
-
if (!
|
|
162249
|
+
if (!isNode4(screen.payload)) return { src, dropped: [] };
|
|
162057
162250
|
const dropped = [];
|
|
162058
162251
|
if (!pruneNode(screen.payload, dropped) || !dropped.length) return { src, dropped: [] };
|
|
162059
162252
|
return {
|
|
@@ -162075,7 +162268,7 @@ function patchHomeForVerticals(src, verticals, homeActionId, opts = {}) {
|
|
|
162075
162268
|
patch.droppedCtas = ctas.dropped;
|
|
162076
162269
|
return patch;
|
|
162077
162270
|
}
|
|
162078
|
-
var EXPLORE_CARDS, EXPLORE_ORDER, EXPLORE_MAX_CELLS, MODULE_SOURCE_VERTICALS, isKnown, GRID_VERTICAL_LABELS, FAQ_CARD, escapeRe3, textProps, STORE_SCREENS, isStoreScreen, screenDeclarations,
|
|
162271
|
+
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
162272
|
var init_home_descriptor = __esm({
|
|
162080
162273
|
"src/site-analyze/home-descriptor.ts"() {
|
|
162081
162274
|
init_define_HHP_CATALOG();
|
|
@@ -162161,7 +162354,7 @@ var init_home_descriptor = __esm({
|
|
|
162161
162354
|
]);
|
|
162162
162355
|
isStoreScreen = (id) => STORE_SCREENS.has(id) || /^himi_(?:product|order)[_/]/.test(id);
|
|
162163
162356
|
screenDeclarations = () => /"([A-Za-z_0-9]+)": \{\s*"screenId": "\1"/g;
|
|
162164
|
-
|
|
162357
|
+
isNode4 = (v2) => !!v2 && typeof v2 === "object" && !!v2.body && typeof v2.body === "object";
|
|
162165
162358
|
}
|
|
162166
162359
|
});
|
|
162167
162360
|
|
|
@@ -162217,15 +162410,15 @@ function linearSafePattern(pattern) {
|
|
|
162217
162410
|
}
|
|
162218
162411
|
function bundlesOf(block) {
|
|
162219
162412
|
const out2 = /* @__PURE__ */ new Set();
|
|
162220
|
-
const
|
|
162221
|
-
if (Array.isArray(v2)) return v2.forEach(
|
|
162413
|
+
const walk3 = (v2) => {
|
|
162414
|
+
if (Array.isArray(v2)) return v2.forEach(walk3);
|
|
162222
162415
|
if (!v2 || typeof v2 !== "object") return;
|
|
162223
162416
|
const lb = v2.logicBundle;
|
|
162224
162417
|
const name = bundleNameFromUrl(lb?.url);
|
|
162225
162418
|
if (name) out2.add(name);
|
|
162226
|
-
for (const child3 of Object.values(v2))
|
|
162419
|
+
for (const child3 of Object.values(v2)) walk3(child3);
|
|
162227
162420
|
};
|
|
162228
|
-
|
|
162421
|
+
walk3(block);
|
|
162229
162422
|
return [...out2];
|
|
162230
162423
|
}
|
|
162231
162424
|
function codeOnly(src) {
|
|
@@ -162293,8 +162486,8 @@ function trimCapabilities(config, keptBlocks) {
|
|
|
162293
162486
|
if (!Array.isArray(current) || current.some((id) => typeof id !== "string")) return unread;
|
|
162294
162487
|
const declared = /* @__PURE__ */ new Set();
|
|
162295
162488
|
const components2 = /* @__PURE__ */ new Set();
|
|
162296
|
-
const
|
|
162297
|
-
if (Array.isArray(v2)) return v2.forEach(
|
|
162489
|
+
const walk3 = (v2) => {
|
|
162490
|
+
if (Array.isArray(v2)) return v2.forEach(walk3);
|
|
162298
162491
|
if (!v2 || typeof v2 !== "object") return;
|
|
162299
162492
|
const { type: type2, logicBundle, logic_bundle } = v2;
|
|
162300
162493
|
if (typeof type2 === "string") components2.add(type2);
|
|
@@ -162303,9 +162496,9 @@ function trimCapabilities(config, keptBlocks) {
|
|
|
162303
162496
|
if (Array.isArray(ids2)) {
|
|
162304
162497
|
for (const id of ids2) if (typeof id === "string") declared.add(id);
|
|
162305
162498
|
}
|
|
162306
|
-
for (const child3 of Object.values(v2))
|
|
162499
|
+
for (const child3 of Object.values(v2)) walk3(child3);
|
|
162307
162500
|
};
|
|
162308
|
-
keptBlocks.forEach(
|
|
162501
|
+
keptBlocks.forEach(walk3);
|
|
162309
162502
|
for (const id of capabilityActionsIn(JSON.stringify(keptBlocks))) declared.add(id);
|
|
162310
162503
|
for (const m2 of code2.matchAll(/(?<![\w$.-])["']?(?:actionId|action_id|action)["']?\s*:\s*["'`]capability\.([a-z0-9_]+)\.[A-Za-z0-9_]+["'`]/g)) {
|
|
162311
162504
|
declared.add(m2[1]);
|
|
@@ -162317,10 +162510,10 @@ function trimCapabilities(config, keptBlocks) {
|
|
|
162317
162510
|
for (const block of objectLiteralsOf(code2, ["app", "navigation"])) if (block.includes("...")) return unread;
|
|
162318
162511
|
for (const m2 of code2.matchAll(/\b(?:declaredCapabilities|declared_capabilities)["']?\s*:\s*/g)) {
|
|
162319
162512
|
const rest = code2.slice(m2.index + m2[0].length);
|
|
162320
|
-
const
|
|
162513
|
+
const literal3 = /^(\[[^\]]*\])\s*(?=[,}])/.exec(rest)?.[1];
|
|
162321
162514
|
let ids2;
|
|
162322
162515
|
try {
|
|
162323
|
-
ids2 =
|
|
162516
|
+
ids2 = literal3 ? JSON.parse(literal3) : void 0;
|
|
162324
162517
|
} catch {
|
|
162325
162518
|
ids2 = void 0;
|
|
162326
162519
|
}
|
|
@@ -162357,11 +162550,11 @@ function configWithoutComments(text25) {
|
|
|
162357
162550
|
}
|
|
162358
162551
|
return parts.join("") + text25.slice(end2);
|
|
162359
162552
|
}
|
|
162360
|
-
function jsonString(
|
|
162553
|
+
function jsonString(literal3, what) {
|
|
162361
162554
|
try {
|
|
162362
|
-
return JSON.parse(
|
|
162555
|
+
return JSON.parse(literal3);
|
|
162363
162556
|
} catch (e2) {
|
|
162364
|
-
throw new TrimRefusal(`${what} ${
|
|
162557
|
+
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
162558
|
}
|
|
162366
162559
|
}
|
|
162367
162560
|
function bracketEnd(src, open3) {
|
|
@@ -162513,15 +162706,15 @@ function openTarget(action) {
|
|
|
162513
162706
|
}
|
|
162514
162707
|
function linksOf(route) {
|
|
162515
162708
|
const out2 = [];
|
|
162516
|
-
const
|
|
162517
|
-
if (Array.isArray(v2)) return v2.forEach((c2) =>
|
|
162709
|
+
const walk3 = (v2, owner) => {
|
|
162710
|
+
if (Array.isArray(v2)) return v2.forEach((c2) => walk3(c2, owner));
|
|
162518
162711
|
if (!v2 || typeof v2 !== "object") return;
|
|
162519
162712
|
const here = typeof v2.id === "string" ? entryLabel(v2) : owner;
|
|
162520
162713
|
const to2 = openTarget(v2);
|
|
162521
162714
|
if (to2) out2.push({ from: route, node: here, to: to2 });
|
|
162522
|
-
for (const child3 of Object.values(v2))
|
|
162715
|
+
for (const child3 of Object.values(v2)) walk3(child3, here);
|
|
162523
162716
|
};
|
|
162524
|
-
|
|
162717
|
+
walk3(route.block, "(screen)");
|
|
162525
162718
|
return out2;
|
|
162526
162719
|
}
|
|
162527
162720
|
function tapTarget(entry) {
|
|
@@ -162533,7 +162726,7 @@ function tapTarget(entry) {
|
|
|
162533
162726
|
return void 0;
|
|
162534
162727
|
}
|
|
162535
162728
|
function rowTemplateTarget(entry, removed) {
|
|
162536
|
-
if (!
|
|
162729
|
+
if (!isNode5(entry)) return void 0;
|
|
162537
162730
|
const props2 = entry.body.props;
|
|
162538
162731
|
if (!props2?.itemsPath || !Array.isArray(props2.items)) return void 0;
|
|
162539
162732
|
for (const row2 of props2.items) {
|
|
@@ -162544,13 +162737,13 @@ function rowTemplateTarget(entry, removed) {
|
|
|
162544
162737
|
}
|
|
162545
162738
|
function emptyDeadCases(root, isDead) {
|
|
162546
162739
|
const out2 = [];
|
|
162547
|
-
const
|
|
162548
|
-
if (Array.isArray(v2)) return v2.forEach(
|
|
162740
|
+
const walk3 = (v2) => {
|
|
162741
|
+
if (Array.isArray(v2)) return v2.forEach(walk3);
|
|
162549
162742
|
if (!v2 || typeof v2 !== "object") return;
|
|
162550
|
-
for (const child3 of Object.values(v2))
|
|
162551
|
-
if (!
|
|
162743
|
+
for (const child3 of Object.values(v2)) walk3(child3);
|
|
162744
|
+
if (!isNode5(v2) || v2.body.type !== "FragmentSlot" || !Array.isArray(v2.body.props?.cases)) return;
|
|
162552
162745
|
for (const c2 of v2.body.props.cases) {
|
|
162553
|
-
if (!
|
|
162746
|
+
if (!isNode5(c2.content) || !pruneTree(c2.content, isDead).emptied) continue;
|
|
162554
162747
|
const props2 = c2.content.body.props ?? {};
|
|
162555
162748
|
for (const key4 of props2.itemsPath ? ["children"] : ["children", "items"]) {
|
|
162556
162749
|
if (Array.isArray(props2[key4]) && props2[key4].length) props2[key4] = [];
|
|
@@ -162558,13 +162751,13 @@ function emptyDeadCases(root, isDead) {
|
|
|
162558
162751
|
out2.push({ id: String(c2.id ?? ""), byModuleId: v2.body.props.casePath === "$item.id" });
|
|
162559
162752
|
}
|
|
162560
162753
|
};
|
|
162561
|
-
|
|
162754
|
+
walk3(root);
|
|
162562
162755
|
return out2;
|
|
162563
162756
|
}
|
|
162564
162757
|
function dropModules(block, ids2) {
|
|
162565
162758
|
const dropped = [];
|
|
162566
|
-
const
|
|
162567
|
-
if (Array.isArray(v2)) return v2.forEach(
|
|
162759
|
+
const walk3 = (v2) => {
|
|
162760
|
+
if (Array.isArray(v2)) return v2.forEach(walk3);
|
|
162568
162761
|
if (!v2 || typeof v2 !== "object") return;
|
|
162569
162762
|
const rec = v2;
|
|
162570
162763
|
if (typeof rec.homeModules === "string") {
|
|
@@ -162578,9 +162771,9 @@ function dropModules(block, ids2) {
|
|
|
162578
162771
|
} catch {
|
|
162579
162772
|
}
|
|
162580
162773
|
}
|
|
162581
|
-
for (const child3 of Object.values(rec))
|
|
162774
|
+
for (const child3 of Object.values(rec)) walk3(child3);
|
|
162582
162775
|
};
|
|
162583
|
-
|
|
162776
|
+
walk3(block);
|
|
162584
162777
|
return dropped;
|
|
162585
162778
|
}
|
|
162586
162779
|
function pruneChrome(items, removed, ledger) {
|
|
@@ -162756,8 +162949,8 @@ function rewriteNav(nav, removed, homeId) {
|
|
|
162756
162949
|
function leftoverNavRefs(nav, removedIds) {
|
|
162757
162950
|
const gone = new Set(removedIds);
|
|
162758
162951
|
const out2 = [];
|
|
162759
|
-
const
|
|
162760
|
-
if (Array.isArray(v2)) return v2.forEach((c2, i2) =>
|
|
162952
|
+
const walk3 = (v2, path2) => {
|
|
162953
|
+
if (Array.isArray(v2)) return v2.forEach((c2, i2) => walk3(c2, `${path2}[${i2}]`));
|
|
162761
162954
|
if (!v2 || typeof v2 !== "object") return;
|
|
162762
162955
|
for (const [k3, child3] of Object.entries(v2)) {
|
|
162763
162956
|
const here = path2 ? `${path2}.${k3}` : k3;
|
|
@@ -162765,10 +162958,10 @@ function leftoverNavRefs(nav, removedIds) {
|
|
|
162765
162958
|
if (gone.has(child3)) out2.push(`${here}=${child3}`);
|
|
162766
162959
|
} else if (k3 === "screenIds" && child3 && typeof child3 === "object" && !Array.isArray(child3)) {
|
|
162767
162960
|
for (const [dest, id] of Object.entries(child3)) if (typeof id === "string" && gone.has(id)) out2.push(`${here}.${dest}=${id}`);
|
|
162768
|
-
} else
|
|
162961
|
+
} else walk3(child3, here);
|
|
162769
162962
|
}
|
|
162770
162963
|
};
|
|
162771
|
-
|
|
162964
|
+
walk3(nav, "");
|
|
162772
162965
|
return out2;
|
|
162773
162966
|
}
|
|
162774
162967
|
function navPinnedScreens(nav) {
|
|
@@ -162788,16 +162981,16 @@ function navPinnedScreens(nav) {
|
|
|
162788
162981
|
}
|
|
162789
162982
|
function workerPinnedScreens(route) {
|
|
162790
162983
|
const out2 = [];
|
|
162791
|
-
const
|
|
162792
|
-
if (Array.isArray(v2)) return v2.forEach(
|
|
162984
|
+
const walk3 = (v2) => {
|
|
162985
|
+
if (Array.isArray(v2)) return v2.forEach(walk3);
|
|
162793
162986
|
if (!v2 || typeof v2 !== "object") return;
|
|
162794
162987
|
const params = v2.params;
|
|
162795
162988
|
if (params && typeof params === "object" && !Array.isArray(params)) {
|
|
162796
162989
|
for (const [k3, id] of Object.entries(params)) if (WORKER_SCREEN_PARAMS.has(k3) && isStatic(id)) out2.push(id);
|
|
162797
162990
|
}
|
|
162798
|
-
for (const child3 of Object.values(v2))
|
|
162991
|
+
for (const child3 of Object.values(v2)) walk3(child3);
|
|
162799
162992
|
};
|
|
162800
|
-
|
|
162993
|
+
walk3(route.block);
|
|
162801
162994
|
return out2;
|
|
162802
162995
|
}
|
|
162803
162996
|
function planTrim(src, keepIds, links) {
|
|
@@ -162976,13 +163169,13 @@ function planTrim(src, keepIds, links) {
|
|
|
162976
163169
|
const dirs = new Set(src.workerDirs);
|
|
162977
163170
|
const removedWorkers = sorted(removedRoutes.flatMap((r3) => r3.bundles).filter((b3) => dirs.has(b3) && !keptWorkers.has(b3)));
|
|
162978
163171
|
const workerRefs = [];
|
|
162979
|
-
const
|
|
163172
|
+
const literal3 = /(["'`])([A-Za-z_][A-Za-z0-9_]*[_/]?)(?=\1|\$\{)/g;
|
|
162980
163173
|
for (const rel2 of Object.keys(src.workerFiles).sort()) {
|
|
162981
163174
|
const dir = rel2.split("/")[1];
|
|
162982
163175
|
if (!keptWorkers.has(dir) || !dirs.has(dir)) continue;
|
|
162983
163176
|
const lines2 = src.workerFiles[rel2].split("\n");
|
|
162984
163177
|
lines2.forEach((line, i2) => {
|
|
162985
|
-
for (const m2 of line.matchAll(
|
|
163178
|
+
for (const m2 of line.matchAll(literal3)) {
|
|
162986
163179
|
const token = m2[2];
|
|
162987
163180
|
const prefix = /[_/]$/.test(token);
|
|
162988
163181
|
const route = prefix ? app2.templated.find((r3) => r3.re.test(`${token}x`)) : resolveIn(app2, token);
|
|
@@ -163075,16 +163268,16 @@ function listWorkers(dir) {
|
|
|
163075
163268
|
if (!existsSync48(root)) return { dirs: [], files: {} };
|
|
163076
163269
|
const dirs = readdirSync26(root).filter((n2) => statSync14(join40(root, n2)).isDirectory()).sort();
|
|
163077
163270
|
const files = {};
|
|
163078
|
-
const
|
|
163271
|
+
const walk3 = (abs, rel2) => {
|
|
163079
163272
|
for (const name of readdirSync26(abs)) {
|
|
163080
163273
|
if (name === "node_modules") continue;
|
|
163081
163274
|
const p2 = join40(abs, name);
|
|
163082
163275
|
const r3 = `${rel2}/${name}`;
|
|
163083
|
-
if (statSync14(p2).isDirectory())
|
|
163276
|
+
if (statSync14(p2).isDirectory()) walk3(p2, r3);
|
|
163084
163277
|
else if (/\.(?:[cm]?[jt]sx?|json)$/.test(name)) files[r3] = readFileSync53(p2, "utf8");
|
|
163085
163278
|
}
|
|
163086
163279
|
};
|
|
163087
|
-
for (const d2 of dirs)
|
|
163280
|
+
for (const d2 of dirs) walk3(join40(root, d2), `tier5-src/${d2}`);
|
|
163088
163281
|
return { dirs, files };
|
|
163089
163282
|
}
|
|
163090
163283
|
function csv(v2) {
|
|
@@ -163313,7 +163506,7 @@ function summarize2(errors) {
|
|
|
163313
163506
|
const shown2 = errors.slice(0, 5).map(one2).join("; ");
|
|
163314
163507
|
return errors.length > 5 ? `${shown2}; and ${errors.length - 5} more` : shown2;
|
|
163315
163508
|
}
|
|
163316
|
-
var TrimRefusal, LIT, ATOM, QUANT, CAP, SAFE_ROUTE_PATTERN, lineOf2, isStatic, WORKER_OPEN, entryLabel,
|
|
163509
|
+
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
163510
|
var init_template_trim = __esm({
|
|
163318
163511
|
"src/template-trim.ts"() {
|
|
163319
163512
|
init_define_HHP_CATALOG();
|
|
@@ -163346,7 +163539,7 @@ var init_template_trim = __esm({
|
|
|
163346
163539
|
const id = entry?.id;
|
|
163347
163540
|
return typeof id === "string" && id ? id : "(unnamed)";
|
|
163348
163541
|
};
|
|
163349
|
-
|
|
163542
|
+
isNode5 = (v2) => !!v2 && typeof v2 === "object" && !!v2.body && typeof v2.body === "object";
|
|
163350
163543
|
asItems = (block) => {
|
|
163351
163544
|
const items = block?.items;
|
|
163352
163545
|
return Array.isArray(items) ? items : void 0;
|
|
@@ -163530,16 +163723,16 @@ function readAppSources(dir) {
|
|
|
163530
163723
|
const abs = join41(root, name);
|
|
163531
163724
|
if (!statSync15(abs).isDirectory()) continue;
|
|
163532
163725
|
const files = {};
|
|
163533
|
-
const
|
|
163726
|
+
const walk3 = (a3, rel2) => {
|
|
163534
163727
|
for (const n2 of readdirSync27(a3).sort()) {
|
|
163535
163728
|
if (n2 === "node_modules") continue;
|
|
163536
163729
|
const p2 = join41(a3, n2);
|
|
163537
163730
|
const r3 = `${rel2}/${n2}`;
|
|
163538
|
-
if (statSync15(p2).isDirectory())
|
|
163731
|
+
if (statSync15(p2).isDirectory()) walk3(p2, r3);
|
|
163539
163732
|
else if (/\.(?:[cm]?[jt]sx?)$/.test(n2)) files[r3] = readFileSync54(p2, "utf8");
|
|
163540
163733
|
}
|
|
163541
163734
|
};
|
|
163542
|
-
|
|
163735
|
+
walk3(abs, `tier5-src/${name}`);
|
|
163543
163736
|
workers.set(name, files);
|
|
163544
163737
|
}
|
|
163545
163738
|
}
|
|
@@ -163654,8 +163847,8 @@ function classifyAction(action) {
|
|
|
163654
163847
|
function screenActions(block) {
|
|
163655
163848
|
const out2 = [];
|
|
163656
163849
|
const seen = /* @__PURE__ */ new Set();
|
|
163657
|
-
const
|
|
163658
|
-
if (Array.isArray(v2)) return v2.forEach((x2) =>
|
|
163850
|
+
const walk3 = (v2, component, type2) => {
|
|
163851
|
+
if (Array.isArray(v2)) return v2.forEach((x2) => walk3(x2, component, type2));
|
|
163659
163852
|
if (!v2 || typeof v2 !== "object") return;
|
|
163660
163853
|
const o2 = v2;
|
|
163661
163854
|
let comp = component;
|
|
@@ -163676,10 +163869,10 @@ function screenActions(block) {
|
|
|
163676
163869
|
out2.push({ actionId: id, action, trigger: key4, ...comp ? { component: comp } : {}, ...ty ? { type: ty } : {}, kind });
|
|
163677
163870
|
}
|
|
163678
163871
|
}
|
|
163679
|
-
|
|
163872
|
+
walk3(child3, comp, ty);
|
|
163680
163873
|
}
|
|
163681
163874
|
};
|
|
163682
|
-
|
|
163875
|
+
walk3(block);
|
|
163683
163876
|
return out2;
|
|
163684
163877
|
}
|
|
163685
163878
|
function walkPackage(dir, rel2 = "") {
|
|
@@ -163881,14 +164074,14 @@ function writeInventory(dir, inv, opts = {}) {
|
|
|
163881
164074
|
}
|
|
163882
164075
|
function primaryNodeIds(app2) {
|
|
163883
164076
|
const out2 = /* @__PURE__ */ new Set();
|
|
163884
|
-
const
|
|
163885
|
-
if (Array.isArray(v2)) return v2.forEach(
|
|
164077
|
+
const walk3 = (v2) => {
|
|
164078
|
+
if (Array.isArray(v2)) return v2.forEach(walk3);
|
|
163886
164079
|
if (!v2 || typeof v2 !== "object") return;
|
|
163887
164080
|
const o2 = v2;
|
|
163888
164081
|
if (typeof o2.id === "string" && o2.id && o2.body?.props?.style === "primary") out2.add(o2.id);
|
|
163889
|
-
for (const c2 of Object.values(v2))
|
|
164082
|
+
for (const c2 of Object.values(v2)) walk3(c2);
|
|
163890
164083
|
};
|
|
163891
|
-
for (const r3 of app2.routes)
|
|
164084
|
+
for (const r3 of app2.routes) walk3(r3.block);
|
|
163892
164085
|
return out2;
|
|
163893
164086
|
}
|
|
163894
164087
|
function findRoute(app2, id) {
|
|
@@ -164372,9 +164565,9 @@ function unwrap(node3) {
|
|
|
164372
164565
|
}
|
|
164373
164566
|
return current;
|
|
164374
164567
|
}
|
|
164375
|
-
function lookup3(
|
|
164568
|
+
function lookup3(literal3, name) {
|
|
164376
164569
|
let found = { kind: "absent" };
|
|
164377
|
-
for (const p2 of
|
|
164570
|
+
for (const p2 of literal3.properties) {
|
|
164378
164571
|
const key4 = p2.name && (ts7.isIdentifier(p2.name) || ts7.isStringLiteral(p2.name)) ? p2.name.text : void 0;
|
|
164379
164572
|
if (ts7.isPropertyAssignment(p2) && key4 === name) found = { kind: "written", node: p2 };
|
|
164380
164573
|
else if (ts7.isSpreadAssignment(p2) || p2.name && ts7.isComputedPropertyName(p2.name) || key4 === name) found = { kind: "opaque" };
|
|
@@ -164382,22 +164575,22 @@ function lookup3(literal2, name) {
|
|
|
164382
164575
|
return found;
|
|
164383
164576
|
}
|
|
164384
164577
|
function stringValue(node3, name) {
|
|
164385
|
-
const
|
|
164386
|
-
const found = ts7.isObjectLiteralExpression(
|
|
164578
|
+
const literal3 = unwrap(node3);
|
|
164579
|
+
const found = ts7.isObjectLiteralExpression(literal3) ? lookup3(literal3, name) : void 0;
|
|
164387
164580
|
const value2 = found?.kind === "written" ? found.node.initializer : void 0;
|
|
164388
164581
|
return value2 && ts7.isStringLiteralLike(value2) ? value2.text : void 0;
|
|
164389
164582
|
}
|
|
164390
|
-
function appendProperties(
|
|
164583
|
+
function appendProperties(literal3, file2, lines2) {
|
|
164391
164584
|
const inline = () => lines2.filter((line) => !line.trimStart().startsWith("//")).join(" ");
|
|
164392
|
-
if (
|
|
164393
|
-
const at3 =
|
|
164394
|
-
return { at: at3, end:
|
|
164585
|
+
if (literal3.properties.length === 0) {
|
|
164586
|
+
const at3 = literal3.getStart(file2) + 1;
|
|
164587
|
+
return { at: at3, end: literal3.end - 1, text: ` ${inline().replace(/,$/, "")} ` };
|
|
164395
164588
|
}
|
|
164396
|
-
const last =
|
|
164397
|
-
const trailing =
|
|
164398
|
-
const at2 = trailing ?
|
|
164589
|
+
const last = literal3.properties[literal3.properties.length - 1];
|
|
164590
|
+
const trailing = literal3.properties.hasTrailingComma;
|
|
164591
|
+
const at2 = trailing ? literal3.properties.end : last.end;
|
|
164399
164592
|
const lead = trailing ? "" : ",";
|
|
164400
|
-
if (onOneLine(
|
|
164593
|
+
if (onOneLine(literal3, file2)) {
|
|
164401
164594
|
const text25 = inline();
|
|
164402
164595
|
return { at: at2, end: at2, text: `${lead} ${trailing ? text25 : text25.replace(/,$/, "")}` };
|
|
164403
164596
|
}
|
|
@@ -164526,8 +164719,8 @@ function planPush(app2, pingAppName, plan) {
|
|
|
164526
164719
|
}
|
|
164527
164720
|
}
|
|
164528
164721
|
function planRetiredFamily(block, plan) {
|
|
164529
|
-
const
|
|
164530
|
-
const found = ts8.isObjectLiteralExpression(
|
|
164722
|
+
const literal3 = unwrap(block);
|
|
164723
|
+
const found = ts8.isObjectLiteralExpression(literal3) ? lookup3(literal3, "pingAppName") : void 0;
|
|
164531
164724
|
const value2 = found?.kind === "written" ? unwrap(found.node.initializer) : void 0;
|
|
164532
164725
|
const replacement = value2 && ts8.isStringLiteralLike(value2) ? replacementPingFamily(value2.text) : void 0;
|
|
164533
164726
|
if (!value2 || !replacement) return;
|
|
@@ -165222,17 +165415,17 @@ function openPackageFile(file2) {
|
|
|
165222
165415
|
function openPackageDir(dir) {
|
|
165223
165416
|
const root = resolve45(dir);
|
|
165224
165417
|
const entries = /* @__PURE__ */ new Map();
|
|
165225
|
-
const
|
|
165418
|
+
const walk3 = (rel2) => {
|
|
165226
165419
|
const abs = rel2 ? join44(root, rel2) : root;
|
|
165227
165420
|
for (const name of readdirSync28(abs)) {
|
|
165228
165421
|
const childRel = rel2 ? `${rel2}/${name}` : name;
|
|
165229
165422
|
const childAbs = join44(abs, name);
|
|
165230
|
-
if (statSync16(childAbs).isDirectory())
|
|
165423
|
+
if (statSync16(childAbs).isDirectory()) walk3(childRel);
|
|
165231
165424
|
else if (isSafeEntryName(childRel)) entries.set(childRel, readFileSync57(childAbs));
|
|
165232
165425
|
}
|
|
165233
165426
|
};
|
|
165234
165427
|
if (!existsSync51(root)) throw new Error(`no such package directory: ${root}`);
|
|
165235
|
-
|
|
165428
|
+
walk3("");
|
|
165236
165429
|
const manifestBytes = entries.get(HIMI_PACKAGE_MANIFEST_PATH);
|
|
165237
165430
|
if (manifestBytes) {
|
|
165238
165431
|
try {
|
|
@@ -165323,7 +165516,7 @@ import { createRequire as createRequire4 } from "node:module";
|
|
|
165323
165516
|
import { deflateRawSync as deflateRawSync2 } from "node:zlib";
|
|
165324
165517
|
function walkSourceTree(dir, file2, skip, enter = () => {
|
|
165325
165518
|
}) {
|
|
165326
|
-
const
|
|
165519
|
+
const walk3 = (relDir) => {
|
|
165327
165520
|
enter(relDir);
|
|
165328
165521
|
for (const name of readdirSync29(join45(dir, relDir))) {
|
|
165329
165522
|
const rel2 = relDir ? join45(relDir, name) : name;
|
|
@@ -165334,7 +165527,7 @@ function walkSourceTree(dir, file2, skip, enter = () => {
|
|
|
165334
165527
|
}
|
|
165335
165528
|
if (st2.isDirectory()) {
|
|
165336
165529
|
if (isDeniedSourceDir(name, relDir) || existsSync52(join45(dir, rel2, PACKAGE_DIR_MARKER))) skip(rel2);
|
|
165337
|
-
else
|
|
165530
|
+
else walk3(rel2);
|
|
165338
165531
|
continue;
|
|
165339
165532
|
}
|
|
165340
165533
|
if (isDeniedSourcePath(rel2)) {
|
|
@@ -165344,7 +165537,7 @@ function walkSourceTree(dir, file2, skip, enter = () => {
|
|
|
165344
165537
|
file2(rel2.split(sep15).join("/"), rel2);
|
|
165345
165538
|
}
|
|
165346
165539
|
};
|
|
165347
|
-
|
|
165540
|
+
walk3("");
|
|
165348
165541
|
}
|
|
165349
165542
|
function collectAppSource(dir) {
|
|
165350
165543
|
const entries = [];
|
|
@@ -170043,8 +170236,8 @@ function rotateHue(hex2, deg) {
|
|
|
170043
170236
|
return "#" + rgb.map((v2) => Math.max(0, Math.min(255, v2)).toString(16).padStart(2, "0")).join("");
|
|
170044
170237
|
}
|
|
170045
170238
|
function resolveTokensPath(app2, configTs) {
|
|
170046
|
-
const
|
|
170047
|
-
if (
|
|
170239
|
+
const literal3 = /^ {2}designTokensPath\s*:\s*["']([^"']+)["']/m.exec(stripComments(configTs))?.[1];
|
|
170240
|
+
if (literal3) return { path: resolve50(appDir(app2), literal3), source: "declared" };
|
|
170048
170241
|
return { path: join59(appDir(app2), "tokens.json"), source: "assumed" };
|
|
170049
170242
|
}
|
|
170050
170243
|
function resolveToken(app2, token, tokensPathOverride) {
|
|
@@ -177547,14 +177740,14 @@ async function navEntryScreens(dir, homeScreenId) {
|
|
|
177547
177740
|
const nav = (await loadContentConfigQuietly(dir))?.navigation;
|
|
177548
177741
|
const out2 = /* @__PURE__ */ new Set();
|
|
177549
177742
|
if (homeScreenId) out2.add(homeScreenId);
|
|
177550
|
-
const
|
|
177743
|
+
const walk3 = (v2, depth) => {
|
|
177551
177744
|
if (depth > 6 || typeof v2 !== "object" || v2 === null) return;
|
|
177552
177745
|
for (const [k3, x2] of Object.entries(v2)) {
|
|
177553
177746
|
if ((k3 === "screenId" || k3 === "contentScreenId") && typeof x2 === "string" && x2) out2.add(x2);
|
|
177554
|
-
else
|
|
177747
|
+
else walk3(x2, depth + 1);
|
|
177555
177748
|
}
|
|
177556
177749
|
};
|
|
177557
|
-
for (const chrome of ["tabBar", "drawer", "sidebar", "topBarDefault"])
|
|
177750
|
+
for (const chrome of ["tabBar", "drawer", "sidebar", "topBarDefault"]) walk3(nav?.[chrome], 0);
|
|
177558
177751
|
return out2;
|
|
177559
177752
|
}
|
|
177560
177753
|
async function localDbEntities(dir) {
|
|
@@ -181669,14 +181862,14 @@ function writeNoFollow2(appDir3, abs, content) {
|
|
|
181669
181862
|
}
|
|
181670
181863
|
function listFiles(appDir3) {
|
|
181671
181864
|
const files = [];
|
|
181672
|
-
const
|
|
181865
|
+
const walk3 = (d2) => {
|
|
181673
181866
|
const parentRel = relative17(appDir3, d2);
|
|
181674
181867
|
for (const e2 of readdirSync36(d2, { withFileTypes: true }).sort((a3, b3) => a3.name.localeCompare(b3.name))) {
|
|
181675
181868
|
if (e2.isSymbolicLink()) continue;
|
|
181676
181869
|
const p2 = join81(d2, e2.name);
|
|
181677
181870
|
if (e2.isDirectory()) {
|
|
181678
181871
|
if (isDeniedSourceDir(e2.name, parentRel) || isDeniedSourceDir(e2.name.toLowerCase(), parentRel)) continue;
|
|
181679
|
-
if (!
|
|
181872
|
+
if (!walk3(p2)) return false;
|
|
181680
181873
|
} else if (e2.isFile()) {
|
|
181681
181874
|
const rel2 = relative17(appDir3, p2);
|
|
181682
181875
|
if (isDeniedSourcePath(rel2) || isDeniedSourcePath(rel2.toLowerCase())) continue;
|
|
@@ -181686,7 +181879,7 @@ function listFiles(appDir3) {
|
|
|
181686
181879
|
}
|
|
181687
181880
|
return true;
|
|
181688
181881
|
};
|
|
181689
|
-
const complete =
|
|
181882
|
+
const complete = walk3(appDir3);
|
|
181690
181883
|
return { files, truncated: !complete };
|
|
181691
181884
|
}
|
|
181692
181885
|
function fileTools() {
|
|
@@ -182862,9 +183055,9 @@ var init_readonly = __esm({
|
|
|
182862
183055
|
// ../../node_modules/@wix/asc-core/dist/scrub.js
|
|
182863
183056
|
function scrubSecrets(text25, literals = []) {
|
|
182864
183057
|
let out2 = text25;
|
|
182865
|
-
for (const
|
|
182866
|
-
if (
|
|
182867
|
-
out2 = out2.split(
|
|
183058
|
+
for (const literal3 of literals) {
|
|
183059
|
+
if (literal3 && literal3.length >= 4)
|
|
183060
|
+
out2 = out2.split(literal3).join("[redacted]");
|
|
182868
183061
|
}
|
|
182869
183062
|
for (const shape of SECRET_SHAPES2)
|
|
182870
183063
|
out2 = out2.replace(shape, "[redacted]");
|
|
@@ -216678,11 +216871,11 @@ var init_remote = __esm({
|
|
|
216678
216871
|
* no path on this machine reaches the worker. A file whose bytes no longer match its md5 is refused.
|
|
216679
216872
|
*/
|
|
216680
216873
|
async uploadLocalFiles(params) {
|
|
216681
|
-
const
|
|
216874
|
+
const walk3 = async (value2) => {
|
|
216682
216875
|
if (Array.isArray(value2)) {
|
|
216683
216876
|
const out2 = [];
|
|
216684
216877
|
for (const v2 of value2)
|
|
216685
|
-
out2.push(await
|
|
216878
|
+
out2.push(await walk3(v2));
|
|
216686
216879
|
return out2;
|
|
216687
216880
|
}
|
|
216688
216881
|
if (value2 && typeof value2 === "object") {
|
|
@@ -216696,12 +216889,12 @@ var init_remote = __esm({
|
|
|
216696
216889
|
}
|
|
216697
216890
|
const out2 = {};
|
|
216698
216891
|
for (const [k3, v2] of Object.entries(o2))
|
|
216699
|
-
out2[k3] = await
|
|
216892
|
+
out2[k3] = await walk3(v2);
|
|
216700
216893
|
return out2;
|
|
216701
216894
|
}
|
|
216702
216895
|
return value2;
|
|
216703
216896
|
};
|
|
216704
|
-
return await
|
|
216897
|
+
return await walk3(params);
|
|
216705
216898
|
}
|
|
216706
216899
|
/** An AscApi-shaped proxy: `api.builds.latest(id)` runs `builds.latest` on the worker. */
|
|
216707
216900
|
api() {
|
|
@@ -224108,7 +224301,7 @@ function collectWorkerSources(tier5SrcDir, bundleName) {
|
|
|
224108
224301
|
const root = join120(tier5SrcDir, bundleName);
|
|
224109
224302
|
const files = {};
|
|
224110
224303
|
const visitedDirs = /* @__PURE__ */ new Set();
|
|
224111
|
-
const
|
|
224304
|
+
const walk3 = (abs, rel2) => {
|
|
224112
224305
|
const real = realpathSync16(abs);
|
|
224113
224306
|
if (visitedDirs.has(real)) return;
|
|
224114
224307
|
visitedDirs.add(real);
|
|
@@ -224116,14 +224309,14 @@ function collectWorkerSources(tier5SrcDir, bundleName) {
|
|
|
224116
224309
|
const childAbs = join120(abs, name);
|
|
224117
224310
|
const childRel = posix3.join(rel2, name);
|
|
224118
224311
|
if (statSync36(childAbs).isDirectory()) {
|
|
224119
|
-
|
|
224312
|
+
walk3(childAbs, childRel);
|
|
224120
224313
|
} else if (/\.(ts|tsx|js|mjs|json)$/.test(name)) {
|
|
224121
224314
|
files[childRel] = readFileSync115(childAbs, "utf8");
|
|
224122
224315
|
}
|
|
224123
224316
|
}
|
|
224124
224317
|
};
|
|
224125
224318
|
if (!existsSync94(root)) return null;
|
|
224126
|
-
|
|
224319
|
+
walk3(root, `/tier5-src/${bundleName}`);
|
|
224127
224320
|
const entry = [`/tier5-src/${bundleName}/index.ts`, `/tier5-src/${bundleName}/index.js`].find((p2) => p2 in files);
|
|
224128
224321
|
if (!entry) return null;
|
|
224129
224322
|
collectRelativeSiblings(files, tier5SrcDir);
|
|
@@ -225442,12 +225635,12 @@ function appObject(source2) {
|
|
|
225442
225635
|
function patchConfig(configText, counters) {
|
|
225443
225636
|
const topBar = { actions: counters.map(headerBadgeAction) };
|
|
225444
225637
|
const bundle = headerBadgesBundleRef();
|
|
225445
|
-
const
|
|
225638
|
+
const literal3 = (value2, indent2) => JSON.stringify(value2, null, 2).replaceAll("\n", `
|
|
225446
225639
|
${indent2}`);
|
|
225447
225640
|
const source2 = ts13.createSourceFile("config.ts", configText, ts13.ScriptTarget.Latest, true, ts13.ScriptKind.TS);
|
|
225448
225641
|
const diagnostics = source2.parseDiagnostics;
|
|
225449
|
-
const snippetFor = (indent2) => `${indent2}"topBarDefault": ${
|
|
225450
|
-
${indent2}"navLogicBundle": ${
|
|
225642
|
+
const snippetFor = (indent2) => `${indent2}"topBarDefault": ${literal3(topBar, indent2)},
|
|
225643
|
+
${indent2}"navLogicBundle": ${literal3(bundle, indent2)},`;
|
|
225451
225644
|
if (diagnostics.length) return { status: "manual", reason: "config.ts could not be parsed", snippet: snippetFor(" ") };
|
|
225452
225645
|
const app2 = appObject(source2);
|
|
225453
225646
|
const navigationProperty = app2 && findProperty(app2, "navigation");
|
|
@@ -225469,7 +225662,7 @@ ${indent2}"navLogicBundle": ${literal2(bundle, indent2)},`;
|
|
|
225469
225662
|
const existingText = existingBar === void 0 ? void 0 : squash(existingBar.initializer.getText(source2));
|
|
225470
225663
|
const same5 = existingBar !== void 0 && sameBundle && (existingText === squash(JSON.stringify(topBar)) || existingText === squash(JSON.stringify(inboxBar)));
|
|
225471
225664
|
if (!existingBar && sameBundle) {
|
|
225472
|
-
const barOnly = `${indent}"topBarDefault": ${
|
|
225665
|
+
const barOnly = `${indent}"topBarDefault": ${literal3(topBar, indent)},`;
|
|
225473
225666
|
const at2 = navigation.getStart(source2) + 1;
|
|
225474
225667
|
return { status: "written", text: `${configText.slice(0, at2)}
|
|
225475
225668
|
${barOnly}${configText.slice(at2)}`, snippet: snippet4 };
|
|
@@ -233211,51 +233404,51 @@ var init_preview_assets_generated = __esm({
|
|
|
233211
233404
|
init_define_HHP_CATALOG();
|
|
233212
233405
|
init_preview_assets_format();
|
|
233213
233406
|
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-
|
|
233407
|
+
{ key: "assets/DashboardHost-v9fmv0Et.js", contentType: "application/javascript; charset=utf-8", offset: 8, length: 2985, sha256: "15026004c8c4552639d3754548396dd9e40f5fc1a05f1f75c3101e7bebd8de34" },
|
|
233408
|
+
{ key: "assets/DevDrawer-DcyqtjWE.js", contentType: "application/javascript; charset=utf-8", offset: 2993, length: 16783, sha256: "5a030aa2bc58091486d51092a82bd8dd2bc362c80d6bb620abb9393adece22ed" },
|
|
233409
|
+
{ key: "assets/IdiomCompare-pFhSIGdT.js", contentType: "application/javascript; charset=utf-8", offset: 19776, length: 1926, sha256: "481094dcddad65310c34033fb1dc34c3a5cfa68285df3389c8b685b497106d0a" },
|
|
233410
|
+
{ key: "assets/LightboxViewer-CqyTJ1gZ.js", contentType: "application/javascript; charset=utf-8", offset: 21702, length: 17382, sha256: "fbe88897c52328683ae45b5c89b7dc878865db75240a5d5a9b612d9375394895" },
|
|
233411
|
+
{ key: "assets/OfflineReadingBar-BwR3446W.js", contentType: "application/javascript; charset=utf-8", offset: 39084, length: 1646, sha256: "cb7cd8fe39df5d4de23205ca5c89f78ddec85678d8a3ad1f394d361870625169" },
|
|
233412
|
+
{ key: "assets/PhonePreviewControl-CWICogy5.js", contentType: "application/javascript; charset=utf-8", offset: 40730, length: 37851, sha256: "7a35812af68bcedec8ef5bc7f97c16799e7df5a4feaabdbeff01c74655ed26fb" },
|
|
233413
|
+
{ key: "assets/SchemeCompare-RABtZO5D.js", contentType: "application/javascript; charset=utf-8", offset: 78581, length: 1858, sha256: "3120a4b904abb67c7141f89e141a2c05c51ab9cef73c7f3e8df9ca487bf86188" },
|
|
233414
|
+
{ key: "assets/WixFrogTelemetrySink-gJoGyDay.js", contentType: "application/javascript; charset=utf-8", offset: 80439, length: 3515, sha256: "36d51cff83174e1b90693514a0f08b628aaacf942d934fbe3e4ed2e89a3a980a" },
|
|
233222
233415
|
{ key: "assets/calendar-ics-BvfIYWjG.js", contentType: "application/javascript; charset=utf-8", offset: 83954, length: 2192, sha256: "1636167041e9829ceccd3544297b86b8475c38bd2f759c4dbc17c813dc6e9254" },
|
|
233223
233416
|
{ key: "assets/catalog-CAoUWITw.js", contentType: "application/javascript; charset=utf-8", offset: 86146, length: 26046, sha256: "4c270ca3051f77d761aef1297125e02339d48493dd2b84a0cacf0faf41aa8cb3" },
|
|
233224
|
-
{ key: "assets/catalogFontFaces-
|
|
233417
|
+
{ key: "assets/catalogFontFaces-DRI6Totp.js", contentType: "application/javascript; charset=utf-8", offset: 112192, length: 1111, sha256: "86e3b3b55855894986a2b0cacf5d4478a97333728e30bc27a0dca39ff17b6dc9" },
|
|
233225
233418
|
{ key: "assets/contacts-vcard-BcohPQ0m.js", contentType: "application/javascript; charset=utf-8", offset: 113303, length: 2567, sha256: "c4ff75e96cd909bbb9182c5dc78794fcebc65139fbddef2537711d774fb33ad0" },
|
|
233226
|
-
{ key: "assets/files-transfer-
|
|
233419
|
+
{ key: "assets/files-transfer-CgJ5TL7H.js", contentType: "application/javascript; charset=utf-8", offset: 115870, length: 6446, sha256: "f97c0dba60f886b2f26168e35ed26a465148ef1649b7851b4508043c817773ab" },
|
|
233227
233420
|
{ key: "assets/frogActionMap-CTMe3Bz1.js", contentType: "application/javascript; charset=utf-8", offset: 122316, length: 1172, sha256: "9f1ce4c70a680dfb902949e1f482c7e47500b69c3350cd091b1b51d674032d53" },
|
|
233228
|
-
{ key: "assets/frogApiRules-
|
|
233421
|
+
{ key: "assets/frogApiRules-E8MLZzyV.js", contentType: "application/javascript; charset=utf-8", offset: 123488, length: 2207, sha256: "84df9fe5e2b09f7686c46d489efe13ef4919a3c56a5cfe5d3b627cf1d6035108" },
|
|
233229
233422
|
{ key: "assets/frogScreenMap-S_IRnz20.js", contentType: "application/javascript; charset=utf-8", offset: 125695, length: 1067, sha256: "22b2f71e1b06df8f1e79b890d47fe42e983d37865c2cc9be753e4121764c91e1" },
|
|
233230
233423
|
{ key: "assets/glassPreviewBrowser-DONaOehd.js", contentType: "application/javascript; charset=utf-8", offset: 126762, length: 6578, sha256: "4402c4cddd2a564e7466cdf1e12a0e0277c0400b288e1e5eda1d23e797599d31" },
|
|
233231
233424
|
{ 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:
|
|
233425
|
+
{ key: "assets/index-bR6fpWk8.js", contentType: "application/javascript; charset=utf-8", offset: 136044, length: 1577217, sha256: "49447985156ef24ab9f67030617e374a62e600f72a7d45a3d23047753a997063" },
|
|
233426
|
+
{ key: "assets/jsx-runtime-CdvZGgm7.js", contentType: "application/javascript; charset=utf-8", offset: 1713261, length: 7751, sha256: "42a78b508d0f309f6a4a6efbb8669015211b3c26574c5b0929884c4d9d20b806" },
|
|
233427
|
+
{ key: "assets/pdf-OU8sfX9O.js", contentType: "application/javascript; charset=utf-8", offset: 1721012, length: 488215, sha256: "57502d1ccdd006393a9208cfe9383df0fbe1e7b523c69c17c2e39eae20f1f6db" },
|
|
233428
|
+
{ key: "assets/pdf.worker.min-BGnVRhRG.js", contentType: "application/javascript; charset=utf-8", offset: 2209227, length: 90, sha256: "521a0e528916d678d7588b2cddf3dadd3bb959a6d62426382f61c77a82017e35" },
|
|
233429
|
+
{ key: "assets/pdf.worker.min-BmVo14Nb.mjs", contentType: "application/javascript; charset=utf-8", offset: 2209317, length: 1317034, sha256: "a33cfe728c584fdba4fcc1fd54bcdc2f9f2f13889ddbb5b2bd1d0f8cbe49b84e" },
|
|
233430
|
+
{ key: "assets/pdfDocument-CyfStCZC.js", contentType: "application/javascript; charset=utf-8", offset: 3526351, length: 3470, sha256: "736632d4bdc00f819a3977c407116ddcc25aee7a272403f4eff68f5cbf348c8e" },
|
|
233431
|
+
{ key: "assets/pdfFetch-Cc8i1I1h.js", contentType: "application/javascript; charset=utf-8", offset: 3529821, length: 2266, sha256: "1d21ad008921942217c9eac0c35b1713773b9d89c71e3ab4412781f7bb88f463" },
|
|
233432
|
+
{ key: "assets/scrollLinkedRuntime-RLNqE6fq.js", contentType: "application/javascript; charset=utf-8", offset: 3532087, length: 2278, sha256: "b017f886a44a07e6c3c966d5f0100ef620a8e92287986b736f45ab2dfdae4ce6" },
|
|
233433
|
+
{ key: "assets/webviewBridgeHost-BzzqJ8mF.js", contentType: "application/javascript; charset=utf-8", offset: 3534365, length: 9889, sha256: "ab498a8a7574118a6acb8ddec5b6ca4733e604340ed0308f7cf931ba512b6b40" },
|
|
233434
|
+
{ key: "fonts/Roboto-LICENSE.txt", contentType: "application/octet-stream", offset: 3544254, length: 4610, sha256: "994062dd7af4186a739de55dd9e151c63b6301f8e2cbafc608d35c2e87da0cd2" },
|
|
233435
|
+
{ key: "fonts/Roboto-Variable.ttf", contentType: "font/ttf", offset: 3548864, length: 488584, sha256: "d7598e12c5dbef095ff8272cfc55da0250bd07fbdecbac8a530b9b277872a134" },
|
|
233436
|
+
{ key: "fonts/WixMadeforDisplay-Bold.ttf", contentType: "font/ttf", offset: 4037448, length: 90924, sha256: "ec4c7d63772d980d6e147b2df6215fd2737e4b04cebe0cf7e11dc695fb63cdcf" },
|
|
233437
|
+
{ key: "fonts/WixMadeforDisplay-ExtraBold.ttf", contentType: "font/ttf", offset: 4128372, length: 90984, sha256: "bf4c16a2774edd38a921edf3099469866cd74c094fd596f3fa4e81f54a04dfaa" },
|
|
233438
|
+
{ key: "fonts/WixMadeforDisplay-Medium.ttf", contentType: "font/ttf", offset: 4219356, length: 90980, sha256: "368faca44fb9f7207e4af784e94750b1ee59c1098b8689e0f4a918926f244fb5" },
|
|
233439
|
+
{ key: "fonts/WixMadeforDisplay-Regular.ttf", contentType: "font/ttf", offset: 4310336, length: 90872, sha256: "97ed8f1a6772abe26e3d8af5cecfc4b02faa94497d585b0398b5053b739a70c1" },
|
|
233440
|
+
{ key: "fonts/WixMadeforDisplay-SemiBold.ttf", contentType: "font/ttf", offset: 4401208, length: 90980, sha256: "642feab8a48ddf6c7a89d7c2a7c0edfa0e6e773f671287e460e222703563191e" },
|
|
233441
|
+
{ key: "fonts/WixMadeforText-Bold.ttf", contentType: "font/ttf", offset: 4492188, length: 108636, sha256: "37c179b4fefb63ea9637322b84583a2df53aa226c150294eea1675c14b1b8e29" },
|
|
233442
|
+
{ key: "fonts/WixMadeforText-ExtraBold.ttf", contentType: "font/ttf", offset: 4600824, length: 109084, sha256: "62e2fe4718129f36ecdb0ae4de385bd6b81ecc876146447167c6c140fad699a9" },
|
|
233443
|
+
{ key: "fonts/WixMadeforText-Medium.ttf", contentType: "font/ttf", offset: 4709908, length: 109048, sha256: "4ecf270136af928612c76fe4ebade91d8156975e5ea4c0cf9225501dd1788e02" },
|
|
233444
|
+
{ key: "fonts/WixMadeforText-Regular.ttf", contentType: "font/ttf", offset: 4818956, length: 107700, sha256: "dee56f09fd3efc127c1ea95557edc74110c1460a46287da36e0af25efd341ef5" },
|
|
233445
|
+
{ key: "fonts/WixMadeforText-SemiBold.ttf", contentType: "font/ttf", offset: 4926656, length: 88108, sha256: "dced97a77624bc5f8b1ae65850360908297f4588e09feb6f22792d29dc7e765b" },
|
|
233446
|
+
{ key: "himi-sw.js", contentType: "application/javascript; charset=utf-8", offset: 5014764, length: 6818, sha256: "835250c3d8004f27c2b67f9b471984351ba6df07b916d97e33b43c691200a18c" },
|
|
233447
|
+
{ key: "index.html", contentType: "text/html; charset=utf-8", offset: 5021582, length: 4924, sha256: "41a5f2c8f1dd625af105d6c23253968f394dbd02ef4cf1513cb9bbc07cfaf1b6" },
|
|
233448
|
+
{ key: "ios-glass-preview.css", contentType: "text/css; charset=utf-8", offset: 5026506, length: 11457, sha256: "6cb2b75264fa5fa2b4d28851878a5eab0712900e8b3a6c2370cc661d6d820805" },
|
|
233449
|
+
{ key: "kit-tab-bar.css", contentType: "text/css; charset=utf-8", offset: 5037963, length: 1171, sha256: "9e2c3a0faaf05d5471badf167a4d3bdf1c4e6dd65c432eea6d254158bfd99585" },
|
|
233450
|
+
{ key: "t5-frame.html", contentType: "text/html; charset=utf-8", offset: 5039134, length: 23047, sha256: "20d1459e3f896f344e478e613d0c979a0de02e81a929a45d3a0ef6a53af36441" },
|
|
233451
|
+
{ key: "t5-worker-frame.html", contentType: "text/html; charset=utf-8", offset: 5062181, length: 23064, sha256: "8655cfe9c74212ec5dafecb49d2fdeb48b19f1bd8a710091e3e55631f9b4ab06" }
|
|
233259
233452
|
];
|
|
233260
233453
|
}
|
|
233261
233454
|
});
|
|
@@ -235973,8 +236166,8 @@ var init_iap_client = __esm({
|
|
|
235973
236166
|
scrub(text25) {
|
|
235974
236167
|
const { keyId, issuerId, privateKeyPem } = this.options.key;
|
|
235975
236168
|
let out2 = text25;
|
|
235976
|
-
for (const
|
|
235977
|
-
if (
|
|
236169
|
+
for (const literal3 of [this.token?.value, privateKeyPem, issuerId, keyId]) {
|
|
236170
|
+
if (literal3) out2 = out2.split(literal3).join("[redacted]");
|
|
235978
236171
|
}
|
|
235979
236172
|
for (const shape of SECRET_SHAPES3) out2 = out2.replace(shape, "[redacted]");
|
|
235980
236173
|
return out2;
|
|
@@ -238409,13 +238602,13 @@ function redactRow(row2) {
|
|
|
238409
238602
|
return out2;
|
|
238410
238603
|
}
|
|
238411
238604
|
function scrubBook(value2) {
|
|
238412
|
-
const
|
|
238605
|
+
const walk3 = (v2) => {
|
|
238413
238606
|
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,
|
|
238607
|
+
if (Array.isArray(v2)) return v2.map(walk3);
|
|
238608
|
+
if (v2 && typeof v2 === "object") return Object.fromEntries(Object.entries(v2).map(([k3, x2]) => [k3, walk3(x2)]));
|
|
238416
238609
|
return v2;
|
|
238417
238610
|
};
|
|
238418
|
-
return
|
|
238611
|
+
return walk3(value2);
|
|
238419
238612
|
}
|
|
238420
238613
|
function assertNoSecrets(serialized) {
|
|
238421
238614
|
const hits = secretFindings([{ path: "book.json", bytes: Buffer.from(serialized) }]);
|
|
@@ -238508,10 +238701,10 @@ function bundleFinding(app2, { bundleId, storeBundleId }, fileName) {
|
|
|
238508
238701
|
function bindingFinding(app2, file2, purchasesAppId, wanted, fileName) {
|
|
238509
238702
|
const wixIap = lookup3(app2, "wixIap");
|
|
238510
238703
|
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(
|
|
238704
|
+
const literal3 = wixIap.kind === "written" ? unwrap(wixIap.node.initializer) : void 0;
|
|
238705
|
+
if (!literal3 || !ts17.isObjectLiteralExpression(literal3)) return { instruction: `${fileName} computes wixIap, so it was not edited: it must evaluate to ${wanted}.` };
|
|
238706
|
+
const current = lookup3(literal3, "purchasesAppId");
|
|
238707
|
+
if (current.kind === "absent") return { splice: appendProperties(literal3, file2, [`purchasesAppId: ${JSON.stringify(purchasesAppId)},`]), applied: "wixIap.purchasesAppId" };
|
|
238515
238708
|
const value2 = current.kind === "written" ? unwrap(current.node.initializer) : void 0;
|
|
238516
238709
|
if (!value2 || !ts17.isStringLiteralLike(value2)) return { instruction: `${fileName} computes wixIap.purchasesAppId, so it was not edited: it must evaluate to ${JSON.stringify(purchasesAppId)}.` };
|
|
238517
238710
|
if (value2.text === purchasesAppId) return {};
|
|
@@ -243166,7 +243359,7 @@ __export(import_oneapp_exports, {
|
|
|
243166
243359
|
function convertPlaceholders(pattern) {
|
|
243167
243360
|
const placeholders = [];
|
|
243168
243361
|
const unconverted = [];
|
|
243169
|
-
const
|
|
243362
|
+
const walk3 = (s5) => {
|
|
243170
243363
|
let out2 = "";
|
|
243171
243364
|
let i2 = 0;
|
|
243172
243365
|
while (i2 < s5.length) {
|
|
@@ -243232,7 +243425,7 @@ function convertPlaceholders(pattern) {
|
|
|
243232
243425
|
i2 = end2;
|
|
243233
243426
|
continue;
|
|
243234
243427
|
}
|
|
243235
|
-
const convertedBodies = entries.map((e2) =>
|
|
243428
|
+
const convertedBodies = entries.map((e2) => walk3(e2.body));
|
|
243236
243429
|
let rewritten = spec;
|
|
243237
243430
|
for (let k3 = entries.length - 1; k3 >= 0; k3--) {
|
|
243238
243431
|
const e2 = entries[k3];
|
|
@@ -243249,7 +243442,7 @@ function convertPlaceholders(pattern) {
|
|
|
243249
243442
|
}
|
|
243250
243443
|
return out2;
|
|
243251
243444
|
};
|
|
243252
|
-
return { text:
|
|
243445
|
+
return { text: walk3(pattern), placeholders, unconverted };
|
|
243253
243446
|
}
|
|
243254
243447
|
function analyzePattern(pattern) {
|
|
243255
243448
|
const { text: text25, placeholders, unconverted } = convertPlaceholders(pattern);
|
|
@@ -244984,7 +245177,7 @@ function toBase44Schema(spec, app2) {
|
|
|
244984
245177
|
...spec.rls !== void 0 ? { rls: spec.rls } : {}
|
|
244985
245178
|
};
|
|
244986
245179
|
}
|
|
244987
|
-
function
|
|
245180
|
+
function propsOf3(schema2) {
|
|
244988
245181
|
const p2 = schema2?.properties;
|
|
244989
245182
|
return p2 && typeof p2 === "object" && !Array.isArray(p2) ? p2 : {};
|
|
244990
245183
|
}
|
|
@@ -245010,8 +245203,8 @@ function keepRemotePermissions(desired, remote, spec) {
|
|
|
245010
245203
|
if (remote.rls === void 0) delete desired.rls;
|
|
245011
245204
|
else desired.rls = remote.rls;
|
|
245012
245205
|
}
|
|
245013
|
-
const remoteProps =
|
|
245014
|
-
const desiredProps =
|
|
245206
|
+
const remoteProps = propsOf3(remote);
|
|
245207
|
+
const desiredProps = propsOf3(desired);
|
|
245015
245208
|
for (const f2 of spec.fields ?? []) {
|
|
245016
245209
|
const live4 = remoteProps[f2.key];
|
|
245017
245210
|
if (!live4 || f2.rls === void 0) continue;
|
|
@@ -245024,8 +245217,8 @@ function keepRemotePermissions(desired, remote, spec) {
|
|
|
245024
245217
|
}
|
|
245025
245218
|
function inheritUndeclaredPermissions(desired, remote, spec) {
|
|
245026
245219
|
if (spec.rls === void 0 && remote.rls !== void 0) desired.rls = remote.rls;
|
|
245027
|
-
const remoteProps =
|
|
245028
|
-
const desiredProps =
|
|
245220
|
+
const remoteProps = propsOf3(remote);
|
|
245221
|
+
const desiredProps = propsOf3(desired);
|
|
245029
245222
|
for (const f2 of spec.fields ?? []) {
|
|
245030
245223
|
if (f2.rls === void 0 && remoteProps[f2.key]?.rls !== void 0) desiredProps[f2.key].rls = remoteProps[f2.key].rls;
|
|
245031
245224
|
}
|
|
@@ -245070,8 +245263,8 @@ function planEntitySync(declared, snapshot4, opts) {
|
|
|
245070
245263
|
}
|
|
245071
245264
|
const desired = toBase44Schema(spec, app2);
|
|
245072
245265
|
const drift = [];
|
|
245073
|
-
const remoteProps =
|
|
245074
|
-
const desiredProps =
|
|
245266
|
+
const remoteProps = propsOf3(e2.schema);
|
|
245267
|
+
const desiredProps = propsOf3(desired);
|
|
245075
245268
|
for (const [key4, p2] of Object.entries(desiredProps)) {
|
|
245076
245269
|
const r3 = remoteProps[key4];
|
|
245077
245270
|
if (!r3) drift.push({ kind: "add-field", detail: `field "${key4}" (${String(p2.type)}) is added` });
|
|
@@ -246649,7 +246842,7 @@ var require_cjs = __commonJS({
|
|
|
246649
246842
|
}
|
|
246650
246843
|
return -1;
|
|
246651
246844
|
}
|
|
246652
|
-
function
|
|
246845
|
+
function walk3(hostname6, root, allowedMask) {
|
|
246653
246846
|
let node3 = root;
|
|
246654
246847
|
let end2 = hostname6.length;
|
|
246655
246848
|
let hash3 = 5381;
|
|
@@ -246696,13 +246889,13 @@ var require_cjs = __commonJS({
|
|
|
246696
246889
|
return;
|
|
246697
246890
|
}
|
|
246698
246891
|
const allowedMask = (options2.allowPrivateDomains ? 2 : 0) | (options2.allowIcannDomains ? 1 : 0);
|
|
246699
|
-
if (
|
|
246892
|
+
if (walk3(hostname6, exceptionsRoot, allowedMask)) {
|
|
246700
246893
|
out2.isIcann = (nodeFlags[matchNode] & 1) !== 0;
|
|
246701
246894
|
out2.isPrivate = (nodeFlags[matchNode] & 2) !== 0;
|
|
246702
246895
|
out2.publicSuffix = hostname6.slice(matchEnd + 1);
|
|
246703
246896
|
return;
|
|
246704
246897
|
}
|
|
246705
|
-
if (
|
|
246898
|
+
if (walk3(hostname6, rulesRoot, allowedMask)) {
|
|
246706
246899
|
out2.isIcann = (nodeFlags[matchNode] & 1) !== 0;
|
|
246707
246900
|
out2.isPrivate = (nodeFlags[matchNode] & 2) !== 0;
|
|
246708
246901
|
out2.publicSuffix = hostname6.slice(matchStart);
|
|
@@ -251078,12 +251271,12 @@ function webUrl(value2) {
|
|
|
251078
251271
|
}
|
|
251079
251272
|
}
|
|
251080
251273
|
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,
|
|
251274
|
+
const walk3 = (value2) => {
|
|
251275
|
+
if (Array.isArray(value2)) return value2.filter((v2) => !(v2 && typeof v2 === "object" && v2.id === id)).map(walk3);
|
|
251276
|
+
if (value2 && typeof value2 === "object") return Object.fromEntries(Object.entries(value2).map(([k3, v2]) => [k3, walk3(v2)]));
|
|
251084
251277
|
return value2;
|
|
251085
251278
|
};
|
|
251086
|
-
return
|
|
251279
|
+
return walk3(node3);
|
|
251087
251280
|
}
|
|
251088
251281
|
function textAlign(alignment) {
|
|
251089
251282
|
return alignment === "center" ? "center" : alignment === "right" || alignment === "end" ? "trailing" : "leading";
|
|
@@ -251457,15 +251650,15 @@ function resolveRoutePlaceholders(out2, fellBack, slugs, hasTabBar, pageOfScreen
|
|
|
251457
251650
|
return body.type === "Button" && isPlaceholderTap(action) && !resolve116(str13(obj6(obj6(action).params).screenId));
|
|
251458
251651
|
};
|
|
251459
251652
|
const DEAD = Symbol("dead");
|
|
251460
|
-
const
|
|
251653
|
+
const walk3 = (value2, dropped) => {
|
|
251461
251654
|
if (typeof value2 === "string" && value2.startsWith(ROUTE_PLACEHOLDER)) return resolve116(value2);
|
|
251462
|
-
if (Array.isArray(value2)) return value2.map((v2) =>
|
|
251655
|
+
if (Array.isArray(value2)) return value2.map((v2) => walk3(v2, dropped)).filter((v2) => v2 !== DEAD);
|
|
251463
251656
|
if (value2 && typeof value2 === "object") {
|
|
251464
251657
|
if (isDeadButton(value2)) {
|
|
251465
251658
|
dropped.push(str13(obj6(obj6(obj6(value2).body).props).title));
|
|
251466
251659
|
return DEAD;
|
|
251467
251660
|
}
|
|
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) :
|
|
251661
|
+
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
251662
|
const type2 = obj6(obj6(value2).body).type;
|
|
251470
251663
|
const before = obj6(obj6(obj6(value2).body).props).children, after = obj6(obj6(next.body).props).children;
|
|
251471
251664
|
if ((type2 === "VStack" || type2 === "HStack") && Array.isArray(before) && before.length && Array.isArray(after) && !after.length) return DEAD;
|
|
@@ -251476,7 +251669,7 @@ function resolveRoutePlaceholders(out2, fellBack, slugs, hasTabBar, pageOfScreen
|
|
|
251476
251669
|
const emptied = [];
|
|
251477
251670
|
for (const [id, screen] of Object.entries(out2.screens)) {
|
|
251478
251671
|
const dropped = [];
|
|
251479
|
-
const walked =
|
|
251672
|
+
const walked = walk3(screen, dropped);
|
|
251480
251673
|
if (walked.payload === DEAD) emptied.push({ id, dropped });
|
|
251481
251674
|
if (dryRun) continue;
|
|
251482
251675
|
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 +252133,30 @@ function ricosTexts(documentJson) {
|
|
|
251940
252133
|
return [];
|
|
251941
252134
|
}
|
|
251942
252135
|
const out2 = [];
|
|
251943
|
-
const
|
|
252136
|
+
const walk3 = (node3) => {
|
|
251944
252137
|
if (Array.isArray(node3)) {
|
|
251945
|
-
node3.forEach(
|
|
252138
|
+
node3.forEach(walk3);
|
|
251946
252139
|
return;
|
|
251947
252140
|
}
|
|
251948
252141
|
if (!node3 || typeof node3 !== "object") return;
|
|
251949
252142
|
const text25 = obj7(obj7(node3).textData).text;
|
|
251950
252143
|
if (typeof text25 === "string" && text25) out2.push(text25);
|
|
251951
|
-
|
|
252144
|
+
walk3(obj7(node3).nodes);
|
|
251952
252145
|
};
|
|
251953
|
-
|
|
252146
|
+
walk3(obj7(root).nodes ?? root);
|
|
251954
252147
|
return out2;
|
|
251955
252148
|
}
|
|
251956
252149
|
function literalSlugFindings(slug, displayName3, screens, authoredText = []) {
|
|
251957
252150
|
if (slug.toLowerCase() === displayName3.trim().toLowerCase()) return [];
|
|
251958
252151
|
const escaped = slug.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
251959
|
-
const
|
|
252152
|
+
const literal3 = new RegExp(`(^|[^\\p{L}\\p{N}_@/.-])${escaped}(?![\\p{L}\\p{N}_@/-]|\\.[\\p{L}\\p{N}])`, "iu");
|
|
251960
252153
|
const name = displayName3.trim().replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
251961
252154
|
const businessName = new RegExp(`(^|[^\\p{L}\\p{N}_-])${name}(?![\\p{L}\\p{N}_-])`, "giu");
|
|
251962
252155
|
const findings = [];
|
|
251963
252156
|
const authored2 = new Set(authoredText);
|
|
251964
252157
|
for (const { screenId, descriptor } of screens) {
|
|
251965
252158
|
const check = (value2, path2, allowAuthored = screenId !== "himi_business_chat") => {
|
|
251966
|
-
if (typeof value2 === "string" && !(allowAuthored && authored2.has(value2)) && !value2.startsWith("$service:") && !value2.startsWith("$item.") &&
|
|
252159
|
+
if (typeof value2 === "string" && !(allowAuthored && authored2.has(value2)) && !value2.startsWith("$service:") && !value2.startsWith("$item.") && literal3.test(value2.replace(businessName, "$1"))) {
|
|
251967
252160
|
findings.push({ screenId, path: path2, value: value2 });
|
|
251968
252161
|
}
|
|
251969
252162
|
};
|
|
@@ -252008,10 +252201,10 @@ function appNameLiteral(configSource) {
|
|
|
252008
252201
|
return found;
|
|
252009
252202
|
}
|
|
252010
252203
|
function fixAppName(configSource, slug, displayName3) {
|
|
252011
|
-
const
|
|
252012
|
-
if (!
|
|
252204
|
+
const literal3 = appNameLiteral(configSource);
|
|
252205
|
+
if (!literal3 || literal3.value.toLowerCase() !== slug.toLowerCase() || literal3.value === displayName3.trim()) return void 0;
|
|
252013
252206
|
if (slug.toLowerCase() === displayName3.trim().toLowerCase()) return void 0;
|
|
252014
|
-
return { current:
|
|
252207
|
+
return { current: literal3.value, fixed: configSource.slice(0, literal3.start) + JSON.stringify(displayName3.trim()) + configSource.slice(literal3.end) };
|
|
252015
252208
|
}
|
|
252016
252209
|
function sourceIdentity(evidenceDir) {
|
|
252017
252210
|
const { manifest: manifest2, raw } = verifiedEvidence(evidenceDir);
|
|
@@ -252173,17 +252366,17 @@ function applyInviteDrawer(configText, showsInvite) {
|
|
|
252173
252366
|
if (!itemsValue) return unchanged("absent", "the app has no side menu (navigation.drawer.items), so there is nowhere to add Invite");
|
|
252174
252367
|
if (!ts19.isArrayLiteralExpression(itemsValue)) return unchanged("manual", "navigation.drawer.items is not an array literal, so a row cannot be added safely");
|
|
252175
252368
|
const rows = itemsValue.elements.filter(ts19.isObjectLiteralExpression);
|
|
252176
|
-
const hasRow = rows.some((row2) =>
|
|
252369
|
+
const hasRow = rows.some((row2) => literal2(findProperty(row2, "id")?.initializer) === INVITE_DRAWER_ID || literal2(findProperty(row2, "screenId")?.initializer) === INVITE_SCREEN);
|
|
252177
252370
|
if (hasRow) return { ...unchanged("unchanged", "the side menu already has an Invite row"), rowPresent: true };
|
|
252178
252371
|
const linkValue = findProperty(navigationValue, "linkableScreens")?.initializer;
|
|
252179
|
-
const linked = linkValue && ts19.isArrayLiteralExpression(linkValue) && linkValue.elements.some((item2) => ts19.isObjectLiteralExpression(item2) &&
|
|
252372
|
+
const linked = linkValue && ts19.isArrayLiteralExpression(linkValue) && linkValue.elements.some((item2) => ts19.isObjectLiteralExpression(item2) && literal2(findProperty(item2, "screenId")?.initializer) === INVITE_SCREEN);
|
|
252180
252373
|
if (!linked) {
|
|
252181
252374
|
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
252375
|
}
|
|
252183
252376
|
const elements = itemsValue.elements;
|
|
252184
|
-
const firstSection = elements.findIndex((item2) => ts19.isObjectLiteralExpression(item2) &&
|
|
252377
|
+
const firstSection = elements.findIndex((item2) => ts19.isObjectLiteralExpression(item2) && literal2(findProperty(item2, "role")?.initializer) === "section");
|
|
252185
252378
|
const before = firstSection === -1 ? elements.length - 1 : firstSection - 1;
|
|
252186
|
-
const destination = elements.slice(0, before + 1).some((item2) => ts19.isObjectLiteralExpression(item2) && !!
|
|
252379
|
+
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
252380
|
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
252381
|
const anchor = elements[before];
|
|
252189
252382
|
const indent = " ".repeat(file2.getLineAndCharacterOfPosition(anchor.getStart()).character);
|
|
@@ -252217,7 +252410,7 @@ function withInviteTranslation(catalogText, locale) {
|
|
|
252217
252410
|
return `${JSON.stringify({ ...catalog4, messages }, null, 2)}
|
|
252218
252411
|
`;
|
|
252219
252412
|
}
|
|
252220
|
-
var INVITE_SCREEN, INVITE_DRAWER_ID, INVITE_ACTION, INVITE_LABEL, obj8,
|
|
252413
|
+
var INVITE_SCREEN, INVITE_DRAWER_ID, INVITE_ACTION, INVITE_LABEL, obj8, literal2, INVITE_TRANSLATIONS;
|
|
252221
252414
|
var init_invite_drawer = __esm({
|
|
252222
252415
|
"src/one-app/invite-drawer.ts"() {
|
|
252223
252416
|
init_define_HHP_CATALOG();
|
|
@@ -252227,7 +252420,7 @@ var init_invite_drawer = __esm({
|
|
|
252227
252420
|
INVITE_ACTION = { icon: "share", hiddenPath: "$service:invite.hidden" };
|
|
252228
252421
|
INVITE_LABEL = "Invite";
|
|
252229
252422
|
obj8 = (v2) => v2 && typeof v2 === "object" && !Array.isArray(v2) ? v2 : {};
|
|
252230
|
-
|
|
252423
|
+
literal2 = (node3) => node3 && ts19.isStringLiteralLike(node3) ? node3.text : void 0;
|
|
252231
252424
|
INVITE_TRANSLATIONS = { he: "\u05D4\u05D6\u05DE\u05E0\u05EA \u05D7\u05D1\u05E8\u05D9\u05DD" };
|
|
252232
252425
|
}
|
|
252233
252426
|
});
|
|
@@ -252301,7 +252494,7 @@ function provisionSiteBinding(dir, binding2, dryRun = false) {
|
|
|
252301
252494
|
const placeholder3 = !clientId || clientId.getText(file2).includes("YOUR_WIX_CLIENT_ID");
|
|
252302
252495
|
if (!placeholder3) return { status: "unchanged", reason: "config.ts has its own clientId, which is the author's binding; it is not replaced" };
|
|
252303
252496
|
const indent = " ";
|
|
252304
|
-
const
|
|
252497
|
+
const literal3 = `{
|
|
252305
252498
|
${indent}${indent}// Bound to the source site through its One App visitor identity (guide "Same-site identity"): no OAuth client is
|
|
252306
252499
|
${indent}${indent}// created on the customer's site, and no environment variable can repoint the build.
|
|
252307
252500
|
${indent}${indent}visitorSource: "one-app",
|
|
@@ -252310,7 +252503,7 @@ ${indent}${indent}siteUrl: ${JSON.stringify(binding2.siteUrl)},
|
|
|
252310
252503
|
${indent}${indent}bootAsVisitor: true,
|
|
252311
252504
|
${indent}${indent}preserveVisitorOnSignOut: true,
|
|
252312
252505
|
${indent}}`;
|
|
252313
|
-
if (!dryRun) writeFileSync64(configPath, `${source2.slice(0, argument.getStart(file2))}${
|
|
252506
|
+
if (!dryRun) writeFileSync64(configPath, `${source2.slice(0, argument.getStart(file2))}${literal3}${source2.slice(argument.getEnd())}`, "utf8");
|
|
252314
252507
|
return { status: "set" };
|
|
252315
252508
|
}
|
|
252316
252509
|
function inboxEntriesInConfig(configSource) {
|
|
@@ -252620,8 +252813,8 @@ function tabIcon(source2) {
|
|
|
252620
252813
|
const filled = `${icon}_fill`;
|
|
252621
252814
|
return { icon, ...ICON_NAMES.includes(filled) ? { selectedIcon: filled } : {}, resolved: !!found };
|
|
252622
252815
|
}
|
|
252623
|
-
function property2(
|
|
252624
|
-
const found = lookup3(
|
|
252816
|
+
function property2(literal3, name) {
|
|
252817
|
+
const found = lookup3(literal3, name);
|
|
252625
252818
|
return found.kind === "written" ? found.node : void 0;
|
|
252626
252819
|
}
|
|
252627
252820
|
function indentedJson(value2, file2, at2) {
|
|
@@ -267321,7 +267514,7 @@ async function distCommand(ctx) {
|
|
|
267321
267514
|
const app3 = typeof job.app === "string" ? job.app : void 0;
|
|
267322
267515
|
const jobId = typeof job.jobId === "string" ? job.jobId : void 0;
|
|
267323
267516
|
if (!player || !app3 || !jobId) return;
|
|
267324
|
-
const render3 = (label4, payload,
|
|
267517
|
+
const render3 = (label4, payload, literal3) => {
|
|
267325
267518
|
io2.log(`
|
|
267326
267519
|
${label4}`);
|
|
267327
267520
|
try {
|
|
@@ -267332,7 +267525,7 @@ ${label4}`);
|
|
|
267332
267525
|
io2.log(" QR omitted (link is too long)");
|
|
267333
267526
|
}
|
|
267334
267527
|
io2.log(` ${payload}`);
|
|
267335
|
-
if (
|
|
267528
|
+
if (literal3 && literal3 !== payload) io2.log(` ${literal3}`);
|
|
267336
267529
|
};
|
|
267337
267530
|
render3(" Himi Player", player);
|
|
267338
267531
|
if (job.status !== "SUCCESS") return;
|