@wix/himalaya-cli 0.1662.0 → 0.1664.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/ts/src/schema.d.ts +6 -2
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/ts/src/validator.d.ts +6 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/core.mjs +3 -2
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/sdui.mjs +3 -2
- package/dist/browser-plane/assets.json +5 -5
- package/dist/browser-plane/preview-deferred/{5fe817d61d13666ee8e6951d96a873f768ef305462735f6030cce105f1c21488.bin → 7700021a25a8d932331f2abf6ba6c2f13b2a18cabfc4ce8b02aa0ed1ae973ffc.bin} +1 -1
- package/dist/browser-plane/sw.js +8 -8
- package/dist/cli.mjs +308 -92
- package/dist/preview-assets.generated.bin +0 -0
- package/fixtures/wix-canned.json +3 -0
- package/guides/component-reference.json +1 -1
- package/guides/component-reference.md +1 -0
- package/guides/one-app-section-mappings.md +3 -4
- package/guides/one-app-to-himi-app.md +20 -1
- package/package.json +2 -2
- package/templates/beauty-salon/config.ts +1 -1
- package/templates/beauty-salon/l10n/en.json +1 -1
- package/templates/beauty-salon/recipes/announcement-card.json +72 -0
- package/templates/beauty-salon/tier5-src/_shared/announcement-section.ts +122 -0
- package/templates/beauty-salon/tier5-src/_shared/engine-intl.ts +3 -4
- package/templates/beauty-salon-owner/tier5-src/_shared/engine-intl.ts +3 -4
- package/templates/branded-lite/config.ts +1 -1
- package/templates/branded-lite/dev/index.ts +214 -122
- package/templates/branded-lite/l10n/en.json +18 -25
- package/templates/branded-lite/l10n/he.json +22 -17
- package/templates/branded-lite/recipes/announcement-card.json +72 -0
- package/templates/branded-lite/tier5-src/_shared/announcement-section.ts +122 -0
- package/templates/branded-lite/tier5-src/_shared/engine-intl.ts +3 -4
- package/templates/branded-lite/tier5-src/wix-spaces-member-detail/index.ts +144 -75
- package/templates/community-club/config.ts +1 -1
- package/templates/community-club/l10n/en.json +1 -1
- package/templates/community-club/recipes/announcement-card.json +72 -0
- package/templates/community-club/tier5-src/_shared/announcement-section.ts +122 -0
- package/templates/community-club/tier5-src/_shared/engine-intl.ts +3 -4
- package/templates/community-club-owner/tier5-src/_shared/engine-intl.ts +3 -4
- package/templates/conference/tier5-src/_shared/engine-intl.ts +3 -4
- package/templates/events-meetups/config.ts +1 -1
- package/templates/events-meetups/l10n/en.json +1 -1
- package/templates/events-meetups/recipes/announcement-card.json +72 -0
- package/templates/events-meetups/tier5-src/_shared/announcement-section.ts +122 -0
- package/templates/events-meetups/tier5-src/_shared/engine-intl.ts +3 -4
- package/templates/events-meetups-owner/tier5-src/_shared/engine-intl.ts +3 -4
- package/templates/gym-fitness/config.ts +1 -1
- package/templates/gym-fitness/l10n/en.json +1 -1
- package/templates/gym-fitness/recipes/announcement-card.json +72 -0
- package/templates/gym-fitness/tier5-src/_shared/announcement-section.ts +122 -0
- package/templates/gym-fitness/tier5-src/_shared/engine-intl.ts +3 -4
- package/templates/gym-fitness-owner/tier5-src/_shared/engine-intl.ts +3 -4
- package/templates/nonprofit-cause/config.ts +1 -1
- package/templates/nonprofit-cause/l10n/en.json +1 -1
- package/templates/nonprofit-cause/recipes/announcement-card.json +72 -0
- package/templates/nonprofit-cause/tier5-src/_shared/announcement-section.ts +122 -0
- package/templates/nonprofit-cause/tier5-src/_shared/engine-intl.ts +3 -4
- package/templates/nonprofit-cause-owner/tier5-src/_shared/engine-intl.ts +3 -4
- package/templates/owner-lite/tier5-src/_shared/engine-intl.ts +3 -4
- package/templates/podcast-creator/config.ts +1 -1
- package/templates/podcast-creator/l10n/en.json +1 -1
- package/templates/podcast-creator/recipes/announcement-card.json +72 -0
- package/templates/podcast-creator/tier5-src/_shared/announcement-section.ts +122 -0
- package/templates/podcast-creator/tier5-src/_shared/engine-intl.ts +3 -4
- package/templates/podcast-creator-owner/tier5-src/_shared/engine-intl.ts +3 -4
- package/templates/portfolio-creative/config.ts +1 -1
- package/templates/portfolio-creative/l10n/en.json +1 -1
- package/templates/portfolio-creative/recipes/announcement-card.json +72 -0
- package/templates/portfolio-creative/tier5-src/_shared/announcement-section.ts +122 -0
- package/templates/portfolio-creative/tier5-src/_shared/engine-intl.ts +3 -4
- package/templates/portfolio-creative-owner/tier5-src/_shared/engine-intl.ts +3 -4
- package/templates/restaurant/config.ts +1 -1
- package/templates/restaurant/l10n/en.json +1 -1
- package/templates/restaurant/recipes/announcement-card.json +72 -0
- package/templates/restaurant/tier5-src/_shared/announcement-section.ts +122 -0
- package/templates/restaurant/tier5-src/_shared/engine-intl.ts +3 -4
- package/templates/restaurant-owner/tier5-src/_shared/engine-intl.ts +3 -4
- package/templates/retail-store/config.ts +1 -1
- package/templates/retail-store/l10n/en.json +1 -1
- package/templates/retail-store/recipes/announcement-card.json +72 -0
- package/templates/retail-store/tier5-src/_shared/announcement-section.ts +122 -0
- package/templates/retail-store/tier5-src/_shared/engine-intl.ts +3 -4
- package/templates/retail-store-owner/tier5-src/_shared/engine-intl.ts +3 -4
- package/templates/salon-spa/tier5-src/_shared/engine-intl.ts +3 -4
- package/templates/wholesale-store/tier5-src/_shared/engine-intl.ts +3 -4
- package/templates/yoga-studio/config.ts +1 -1
- package/templates/yoga-studio/l10n/en.json +1 -1
- package/templates/yoga-studio/recipes/announcement-card.json +72 -0
- package/templates/yoga-studio/tier5-src/_shared/announcement-section.ts +122 -0
- package/templates/yoga-studio/tier5-src/_shared/engine-intl.ts +3 -4
- package/templates/yoga-studio-owner/tier5-src/_shared/engine-intl.ts +3 -4
package/dist/cli.mjs
CHANGED
|
@@ -13359,7 +13359,6 @@ function buttonVariant(style) {
|
|
|
13359
13359
|
var SYSTEM_FONT_FAMILY, TONAL_ELEVATION_ALPHA, BUTTON_SIZES, BUTTON_MIN_HIT_TARGET, nonNegative, nonEmpty2, own2, COLOR_TOKEN_PROPS, TYPOGRAPHY_TOKEN_PROPS, BUTTON_VARIANTS;
|
|
13360
13360
|
var init_tokens = __esm({
|
|
13361
13361
|
"../../core/ts/src/tokens.ts"() {
|
|
13362
|
-
"use strict";
|
|
13363
13362
|
init_define_HHP_CATALOG();
|
|
13364
13363
|
SYSTEM_FONT_FAMILY = "$system";
|
|
13365
13364
|
TONAL_ELEVATION_ALPHA = [0, 0.05, 0.08, 0.11, 0.12, 0.14];
|
|
@@ -14008,10 +14007,11 @@ var init_validator = __esm({
|
|
|
14008
14007
|
accessibilityLabel: { type: "string" },
|
|
14009
14008
|
onTap: { $ref: "#/$defs/action" },
|
|
14010
14009
|
badge: { $ref: "#/$defs/navBadge" },
|
|
14011
|
-
// RFC 0010 slot bindings
|
|
14010
|
+
// RFC 0010 slot bindings; hiddenPath opts into the screen worker with field 10.
|
|
14012
14011
|
hiddenPath: { type: "string" },
|
|
14013
14012
|
labelPath: { type: "string" },
|
|
14014
|
-
iconPath: { type: "string" }
|
|
14013
|
+
iconPath: { type: "string" },
|
|
14014
|
+
hiddenPathScope: { type: "string" }
|
|
14015
14015
|
}
|
|
14016
14016
|
},
|
|
14017
14017
|
navBadge: {
|
|
@@ -19685,6 +19685,7 @@ function validateScreenDescriptor(screenId, served, opts = {}) {
|
|
|
19685
19685
|
}
|
|
19686
19686
|
};
|
|
19687
19687
|
scanEmbedded(descriptor, "");
|
|
19688
|
+
const rowTemplateRoots = [];
|
|
19688
19689
|
const scanLiteralOnly = (node3, at2) => {
|
|
19689
19690
|
if (Array.isArray(node3)) {
|
|
19690
19691
|
node3.forEach((v3, i2) => scanLiteralOnly(v3, `${at2}[${i2}]`));
|
|
@@ -19693,6 +19694,10 @@ function validateScreenDescriptor(screenId, served, opts = {}) {
|
|
|
19693
19694
|
if (!node3 || typeof node3 !== "object") return;
|
|
19694
19695
|
const record3 = node3;
|
|
19695
19696
|
const body = record3.body;
|
|
19697
|
+
const rowProps = body?.props;
|
|
19698
|
+
if (typeof body?.type === "string" && ITEMS_PATH_HOST_TYPES.has(body.type) && typeof rowProps?.itemsPath === "string" && (rowProps.itemsPath.startsWith("$service:") || rowProps.itemsPath.startsWith("$app:")) && WHOLE_VALUE_BINDING.test(rowProps.itemsPath) && Array.isArray(rowProps.items)) {
|
|
19699
|
+
rowTemplateRoots.push(`${at2}.body.props.items[`);
|
|
19700
|
+
}
|
|
19696
19701
|
const svcOnly = typeof body?.type === "string" && Object.hasOwn(SERVICE_ONLY_BINDING_PROPS, body.type) ? SERVICE_ONLY_BINDING_PROPS[body.type] : void 0;
|
|
19697
19702
|
if (svcOnly && body?.props && typeof body.props === "object") {
|
|
19698
19703
|
for (const key3 of svcOnly) {
|
|
@@ -19710,7 +19715,7 @@ function validateScreenDescriptor(screenId, served, opts = {}) {
|
|
|
19710
19715
|
const litProps = typeof body?.type === "string" && Object.hasOwn(LITERAL_ONLY_PROPS, body.type) ? LITERAL_ONLY_PROPS[body.type] : void 0;
|
|
19711
19716
|
if (litProps && body?.props && typeof body.props === "object") {
|
|
19712
19717
|
for (const [k2, val] of Object.entries(body.props)) {
|
|
19713
|
-
if (litProps.has(k2) && typeof val === "string" && WHOLE_VALUE_BINDING.test(val)) {
|
|
19718
|
+
if (litProps.has(k2) && typeof val === "string" && WHOLE_VALUE_BINDING.test(val) && !(val.startsWith("$item.") && rowTemplateRoots.some((root) => at2.startsWith(root)))) {
|
|
19714
19719
|
issues.push({
|
|
19715
19720
|
severity: strict ? "error" : "warning",
|
|
19716
19721
|
pass: "bindings",
|
|
@@ -30966,7 +30971,6 @@ function resolveIdiom(tokens2, ctx = {}) {
|
|
|
30966
30971
|
var IDIOM_CONTEXTS, UNSAFE_KEYS;
|
|
30967
30972
|
var init_idiom = __esm({
|
|
30968
30973
|
"../../core/ts/src/idiom.ts"() {
|
|
30969
|
-
"use strict";
|
|
30970
30974
|
init_define_HHP_CATALOG();
|
|
30971
30975
|
IDIOM_CONTEXTS = {
|
|
30972
30976
|
ios: { native: ["ios"] },
|
|
@@ -35748,9 +35752,16 @@ function applyTopBarDefault(descriptor, config) {
|
|
|
35748
35752
|
const fallback = config?.navigation?.topBarDefault;
|
|
35749
35753
|
const own6 = descriptor?.topBar;
|
|
35750
35754
|
if (!fallback || own6) return descriptor;
|
|
35751
|
-
if (typeof fallback === "object"
|
|
35752
|
-
const
|
|
35753
|
-
|
|
35755
|
+
if (typeof fallback === "object") {
|
|
35756
|
+
const bar = fallback;
|
|
35757
|
+
const screenScoped = (action) => !!action && typeof action === "object" && action.hiddenPathScope === "screen";
|
|
35758
|
+
const resetActions = Array.isArray(bar.actions) && bar.actions.some(screenScoped);
|
|
35759
|
+
if ("searchable" in bar || resetActions) {
|
|
35760
|
+
const { searchable: _ignored, ...rest } = bar;
|
|
35761
|
+
return { ...descriptor, topBar: { ...rest, ...resetActions ? {
|
|
35762
|
+
actions: bar.actions.map((action) => screenScoped(action) ? { ...action, hiddenPathScope: "navigation" } : action)
|
|
35763
|
+
} : {} } };
|
|
35764
|
+
}
|
|
35754
35765
|
}
|
|
35755
35766
|
return { ...descriptor, topBar: fallback };
|
|
35756
35767
|
}
|
|
@@ -182628,6 +182639,7 @@ __export(coverage_exports, {
|
|
|
182628
182639
|
REQUIRED_CHECK: () => REQUIRED_CHECK,
|
|
182629
182640
|
SECTION_VISIBILITY_STATES: () => SECTION_VISIBILITY_STATES,
|
|
182630
182641
|
deriveRequirements: () => deriveRequirements,
|
|
182642
|
+
recordRouteTargets: () => recordRouteTargets,
|
|
182631
182643
|
requirementId: () => requirementId,
|
|
182632
182644
|
syncCoverage: () => syncCoverage,
|
|
182633
182645
|
verifiedEvidence: () => verifiedEvidence,
|
|
@@ -182893,6 +182905,29 @@ function syncCoverage(evidenceDir, contentDir2, write2 = true) {
|
|
|
182893
182905
|
if (write2 && removed.length === 0) writeFileSync37(path2, JSON.stringify(current, null, 2) + "\n");
|
|
182894
182906
|
return { coverage: current, added, removed, changed, hashesChanged, existed };
|
|
182895
182907
|
}
|
|
182908
|
+
function recordRouteTargets(evidenceDir, contentDir2, targets) {
|
|
182909
|
+
const { coverage, removed, hashesChanged } = syncCoverage(evidenceDir, contentDir2, false);
|
|
182910
|
+
if (hashesChanged) return { status: "skipped", rows: 0, reason: `the evidence changed since ${COVERAGE_FILE} was saved: run \`himi one-app coverage sync\` first, then \`generate\` again` };
|
|
182911
|
+
if (removed.length) return { status: "skipped", rows: 0, reason: `${COVERAGE_FILE} holds ${removed.length} saved row(s) that no longer match the evidence: run \`himi one-app coverage sync\` and decide them first` };
|
|
182912
|
+
const decided = new Map(targets.map((t2) => [t2.source, t2.screenId]));
|
|
182913
|
+
let rows = 0;
|
|
182914
|
+
for (const row2 of coverage.requirements) {
|
|
182915
|
+
if (row2.kind !== "route" || !decided.has(row2.source)) continue;
|
|
182916
|
+
const screenId = decided.get(row2.source);
|
|
182917
|
+
if (screenId) {
|
|
182918
|
+
if (row2.target?.screenId === screenId) continue;
|
|
182919
|
+
row2.target = { ...row2.target, screenId };
|
|
182920
|
+
} else if (row2.target) {
|
|
182921
|
+
delete row2.target;
|
|
182922
|
+
} else continue;
|
|
182923
|
+
rows++;
|
|
182924
|
+
}
|
|
182925
|
+
const path2 = join89(resolve68(contentDir2), COVERAGE_FILE);
|
|
182926
|
+
const next = JSON.stringify(coverage, null, 2) + "\n";
|
|
182927
|
+
if (existsSync88(path2) && readFileSync98(path2, "utf8") === next) return { status: "unchanged", rows: 0 };
|
|
182928
|
+
writeFileSync37(path2, next);
|
|
182929
|
+
return { status: "written", rows };
|
|
182930
|
+
}
|
|
182896
182931
|
function verifyCoverage(evidenceDir, contentDir2, releaseHash, builtScreenIds) {
|
|
182897
182932
|
const result = syncCoverage(evidenceDir, contentDir2, false);
|
|
182898
182933
|
const sourceSiteId = obj4(verifiedEvidence(resolve68(evidenceDir)).manifest.source).metaSiteId;
|
|
@@ -190825,48 +190860,48 @@ var init_preview_assets_generated = __esm({
|
|
|
190825
190860
|
init_define_HHP_CATALOG();
|
|
190826
190861
|
init_preview_assets_format();
|
|
190827
190862
|
PREVIEW_ASSET_MANIFEST = [
|
|
190828
|
-
{ key: "assets/DashboardHost-
|
|
190829
|
-
{ key: "assets/DevDrawer-
|
|
190830
|
-
{ key: "assets/IdiomCompare-
|
|
190831
|
-
{ key: "assets/LightboxViewer-
|
|
190832
|
-
{ key: "assets/OfflineReadingBar-
|
|
190833
|
-
{ key: "assets/PhonePreviewControl-
|
|
190834
|
-
{ key: "assets/SchemeCompare-
|
|
190835
|
-
{ key: "assets/WixFrogTelemetrySink-
|
|
190863
|
+
{ key: "assets/DashboardHost-CjnNHRQj.js", contentType: "application/javascript; charset=utf-8", offset: 8, length: 2984, sha256: "32ce5b0584a4c0279311cd7558ad6beb12d138e905c55caaf6a7eac4f75e556b" },
|
|
190864
|
+
{ key: "assets/DevDrawer-BU91rdBV.js", contentType: "application/javascript; charset=utf-8", offset: 2992, length: 16783, sha256: "f079d1c95ef43a5e1a75a06fc193c3e8255ca35643bbfc2c46976672230ec598" },
|
|
190865
|
+
{ key: "assets/IdiomCompare-R5gmHCzu.js", contentType: "application/javascript; charset=utf-8", offset: 19775, length: 1926, sha256: "d2b13a11ca2f547112c921c7cb23b6d931dc5a51849694a1cc1516ca2202b4be" },
|
|
190866
|
+
{ key: "assets/LightboxViewer-CSBS635o.js", contentType: "application/javascript; charset=utf-8", offset: 21701, length: 17379, sha256: "68626002ab308671ad9f0e4175a18ea937ae11a745e3ac663b939663e2c20fd4" },
|
|
190867
|
+
{ key: "assets/OfflineReadingBar-Bw8qzdF_.js", contentType: "application/javascript; charset=utf-8", offset: 39080, length: 1646, sha256: "e67fba7bf40dd74ec813c3a98b11bcc1de8c2207889654db8d03b1cb3495bc5e" },
|
|
190868
|
+
{ key: "assets/PhonePreviewControl-D5y6vCPn.js", contentType: "application/javascript; charset=utf-8", offset: 40726, length: 37851, sha256: "718d57259a7a955bf09cd8e3985ca897270058de6b1782bbd4e35940738be404" },
|
|
190869
|
+
{ key: "assets/SchemeCompare-Ba4Y9Lux.js", contentType: "application/javascript; charset=utf-8", offset: 78577, length: 1858, sha256: "0ec65caf1c3ffadbaf23c9bc8b61966e109bad57e27a4fac1b39522f973d954e" },
|
|
190870
|
+
{ key: "assets/WixFrogTelemetrySink-BMCNiZRJ.js", contentType: "application/javascript; charset=utf-8", offset: 80435, length: 4492, sha256: "15f5315db56849af7fe7b3e581e45eb6bd5fd668d7bbbaacc63542cffc00357a" },
|
|
190836
190871
|
{ key: "assets/calendar-ics-BvfIYWjG.js", contentType: "application/javascript; charset=utf-8", offset: 84927, length: 2192, sha256: "1636167041e9829ceccd3544297b86b8475c38bd2f759c4dbc17c813dc6e9254" },
|
|
190837
190872
|
{ key: "assets/catalog-CAoUWITw.js", contentType: "application/javascript; charset=utf-8", offset: 87119, length: 26046, sha256: "4c270ca3051f77d761aef1297125e02339d48493dd2b84a0cacf0faf41aa8cb3" },
|
|
190838
|
-
{ key: "assets/catalogFontFaces-
|
|
190873
|
+
{ key: "assets/catalogFontFaces-DHnnaE_4.js", contentType: "application/javascript; charset=utf-8", offset: 113165, length: 1111, sha256: "ffaf150198c1cb126944d945faecde8e66a6f95a17259e5a993c1c322312e6d2" },
|
|
190839
190874
|
{ key: "assets/contacts-vcard-BcohPQ0m.js", contentType: "application/javascript; charset=utf-8", offset: 114276, length: 2567, sha256: "c4ff75e96cd909bbb9182c5dc78794fcebc65139fbddef2537711d774fb33ad0" },
|
|
190840
|
-
{ key: "assets/files-transfer-
|
|
190841
|
-
{ key: "assets/frogApiRules-
|
|
190875
|
+
{ key: "assets/files-transfer-CSP_ucHI.js", contentType: "application/javascript; charset=utf-8", offset: 116843, length: 6446, sha256: "4c6e4cec37a19b8c6b76fb0b8d0eb0e82d5903b09ab26fe5e47ca6d65a1b9810" },
|
|
190876
|
+
{ key: "assets/frogApiRules-fMy6SKcy.js", contentType: "application/javascript; charset=utf-8", offset: 123289, length: 2207, sha256: "ec1ee4c036d8bff877e08bb04fd0a5bbbaa6a73daba524ddbcea503c645f8127" },
|
|
190842
190877
|
{ key: "assets/glassPreviewBrowser-DONaOehd.js", contentType: "application/javascript; charset=utf-8", offset: 125496, length: 6578, sha256: "4402c4cddd2a564e7466cdf1e12a0e0277c0400b288e1e5eda1d23e797599d31" },
|
|
190843
190878
|
{ key: "assets/image-preparation-Cj4gldm6.js", contentType: "application/javascript; charset=utf-8", offset: 132074, length: 2704, sha256: "32944ea587c2f3b84389b66b50a850437560238f1c8d33b6275973ee04eee865" },
|
|
190844
|
-
{ key: "assets/index-
|
|
190845
|
-
{ key: "assets/jsx-runtime-CdvZGgm7.js", contentType: "application/javascript; charset=utf-8", offset:
|
|
190846
|
-
{ key: "assets/pdf-
|
|
190847
|
-
{ key: "assets/pdf.worker.min-BGnVRhRG.js", contentType: "application/javascript; charset=utf-8", offset:
|
|
190848
|
-
{ key: "assets/pdf.worker.min-BmVo14Nb.mjs", contentType: "application/javascript; charset=utf-8", offset:
|
|
190849
|
-
{ key: "assets/pdfDocument-
|
|
190850
|
-
{ key: "assets/pdfFetch-Cc8i1I1h.js", contentType: "application/javascript; charset=utf-8", offset:
|
|
190851
|
-
{ key: "assets/webviewBridgeHost-
|
|
190852
|
-
{ key: "fonts/Roboto-LICENSE.txt", contentType: "application/octet-stream", offset:
|
|
190853
|
-
{ key: "fonts/Roboto-Variable.ttf", contentType: "font/ttf", offset:
|
|
190854
|
-
{ key: "fonts/WixMadeforDisplay-Bold.ttf", contentType: "font/ttf", offset:
|
|
190855
|
-
{ key: "fonts/WixMadeforDisplay-ExtraBold.ttf", contentType: "font/ttf", offset:
|
|
190856
|
-
{ key: "fonts/WixMadeforDisplay-Medium.ttf", contentType: "font/ttf", offset:
|
|
190857
|
-
{ key: "fonts/WixMadeforDisplay-Regular.ttf", contentType: "font/ttf", offset:
|
|
190858
|
-
{ key: "fonts/WixMadeforDisplay-SemiBold.ttf", contentType: "font/ttf", offset:
|
|
190859
|
-
{ key: "fonts/WixMadeforText-Bold.ttf", contentType: "font/ttf", offset:
|
|
190860
|
-
{ key: "fonts/WixMadeforText-ExtraBold.ttf", contentType: "font/ttf", offset:
|
|
190861
|
-
{ key: "fonts/WixMadeforText-Medium.ttf", contentType: "font/ttf", offset:
|
|
190862
|
-
{ key: "fonts/WixMadeforText-Regular.ttf", contentType: "font/ttf", offset:
|
|
190863
|
-
{ key: "fonts/WixMadeforText-SemiBold.ttf", contentType: "font/ttf", offset:
|
|
190864
|
-
{ key: "himi-sw.js", contentType: "application/javascript; charset=utf-8", offset:
|
|
190865
|
-
{ key: "index.html", contentType: "text/html; charset=utf-8", offset:
|
|
190866
|
-
{ key: "ios-glass-preview.css", contentType: "text/css; charset=utf-8", offset:
|
|
190867
|
-
{ key: "kit-tab-bar.css", contentType: "text/css; charset=utf-8", offset:
|
|
190868
|
-
{ key: "t5-frame.html", contentType: "text/html; charset=utf-8", offset:
|
|
190869
|
-
{ key: "t5-worker-frame.html", contentType: "text/html; charset=utf-8", offset:
|
|
190879
|
+
{ key: "assets/index-CIFNO_nG.js", contentType: "application/javascript; charset=utf-8", offset: 134778, length: 1560162, sha256: "368343375d43a9340bee35d3a3c126e04a855bef5bac889bc57a9c0c427fe74d" },
|
|
190880
|
+
{ key: "assets/jsx-runtime-CdvZGgm7.js", contentType: "application/javascript; charset=utf-8", offset: 1694940, length: 7751, sha256: "42a78b508d0f309f6a4a6efbb8669015211b3c26574c5b0929884c4d9d20b806" },
|
|
190881
|
+
{ key: "assets/pdf-N8fbtuvO.js", contentType: "application/javascript; charset=utf-8", offset: 1702691, length: 488215, sha256: "7700021a25a8d932331f2abf6ba6c2f13b2a18cabfc4ce8b02aa0ed1ae973ffc" },
|
|
190882
|
+
{ key: "assets/pdf.worker.min-BGnVRhRG.js", contentType: "application/javascript; charset=utf-8", offset: 2190906, length: 90, sha256: "521a0e528916d678d7588b2cddf3dadd3bb959a6d62426382f61c77a82017e35" },
|
|
190883
|
+
{ key: "assets/pdf.worker.min-BmVo14Nb.mjs", contentType: "application/javascript; charset=utf-8", offset: 2190996, length: 1317034, sha256: "a33cfe728c584fdba4fcc1fd54bcdc2f9f2f13889ddbb5b2bd1d0f8cbe49b84e" },
|
|
190884
|
+
{ key: "assets/pdfDocument-DSadN3zb.js", contentType: "application/javascript; charset=utf-8", offset: 3508030, length: 3470, sha256: "d0b93e8566c2b615d7c2b55602cc5ac5b106841240b634ae9bc9d8b2cddfef08" },
|
|
190885
|
+
{ key: "assets/pdfFetch-Cc8i1I1h.js", contentType: "application/javascript; charset=utf-8", offset: 3511500, length: 2266, sha256: "1d21ad008921942217c9eac0c35b1713773b9d89c71e3ab4412781f7bb88f463" },
|
|
190886
|
+
{ key: "assets/webviewBridgeHost-0znXiOYI.js", contentType: "application/javascript; charset=utf-8", offset: 3513766, length: 9888, sha256: "f61063ab6262c76086a8b67bc5d68e4f00040009d4bb234313fd0b6910ad7cb6" },
|
|
190887
|
+
{ key: "fonts/Roboto-LICENSE.txt", contentType: "application/octet-stream", offset: 3523654, length: 4610, sha256: "994062dd7af4186a739de55dd9e151c63b6301f8e2cbafc608d35c2e87da0cd2" },
|
|
190888
|
+
{ key: "fonts/Roboto-Variable.ttf", contentType: "font/ttf", offset: 3528264, length: 488584, sha256: "d7598e12c5dbef095ff8272cfc55da0250bd07fbdecbac8a530b9b277872a134" },
|
|
190889
|
+
{ key: "fonts/WixMadeforDisplay-Bold.ttf", contentType: "font/ttf", offset: 4016848, length: 90924, sha256: "ec4c7d63772d980d6e147b2df6215fd2737e4b04cebe0cf7e11dc695fb63cdcf" },
|
|
190890
|
+
{ key: "fonts/WixMadeforDisplay-ExtraBold.ttf", contentType: "font/ttf", offset: 4107772, length: 90984, sha256: "bf4c16a2774edd38a921edf3099469866cd74c094fd596f3fa4e81f54a04dfaa" },
|
|
190891
|
+
{ key: "fonts/WixMadeforDisplay-Medium.ttf", contentType: "font/ttf", offset: 4198756, length: 90980, sha256: "368faca44fb9f7207e4af784e94750b1ee59c1098b8689e0f4a918926f244fb5" },
|
|
190892
|
+
{ key: "fonts/WixMadeforDisplay-Regular.ttf", contentType: "font/ttf", offset: 4289736, length: 90872, sha256: "97ed8f1a6772abe26e3d8af5cecfc4b02faa94497d585b0398b5053b739a70c1" },
|
|
190893
|
+
{ key: "fonts/WixMadeforDisplay-SemiBold.ttf", contentType: "font/ttf", offset: 4380608, length: 90980, sha256: "642feab8a48ddf6c7a89d7c2a7c0edfa0e6e773f671287e460e222703563191e" },
|
|
190894
|
+
{ key: "fonts/WixMadeforText-Bold.ttf", contentType: "font/ttf", offset: 4471588, length: 108636, sha256: "37c179b4fefb63ea9637322b84583a2df53aa226c150294eea1675c14b1b8e29" },
|
|
190895
|
+
{ key: "fonts/WixMadeforText-ExtraBold.ttf", contentType: "font/ttf", offset: 4580224, length: 109084, sha256: "62e2fe4718129f36ecdb0ae4de385bd6b81ecc876146447167c6c140fad699a9" },
|
|
190896
|
+
{ key: "fonts/WixMadeforText-Medium.ttf", contentType: "font/ttf", offset: 4689308, length: 109048, sha256: "4ecf270136af928612c76fe4ebade91d8156975e5ea4c0cf9225501dd1788e02" },
|
|
190897
|
+
{ key: "fonts/WixMadeforText-Regular.ttf", contentType: "font/ttf", offset: 4798356, length: 107700, sha256: "dee56f09fd3efc127c1ea95557edc74110c1460a46287da36e0af25efd341ef5" },
|
|
190898
|
+
{ key: "fonts/WixMadeforText-SemiBold.ttf", contentType: "font/ttf", offset: 4906056, length: 88108, sha256: "dced97a77624bc5f8b1ae65850360908297f4588e09feb6f22792d29dc7e765b" },
|
|
190899
|
+
{ key: "himi-sw.js", contentType: "application/javascript; charset=utf-8", offset: 4994164, length: 6818, sha256: "835250c3d8004f27c2b67f9b471984351ba6df07b916d97e33b43c691200a18c" },
|
|
190900
|
+
{ key: "index.html", contentType: "text/html; charset=utf-8", offset: 5000982, length: 4924, sha256: "7a15078ef89b5a6f7b6135b7820c7f17a58b74e5945864a5f92a1d7953fcd976" },
|
|
190901
|
+
{ key: "ios-glass-preview.css", contentType: "text/css; charset=utf-8", offset: 5005906, length: 11457, sha256: "6cb2b75264fa5fa2b4d28851878a5eab0712900e8b3a6c2370cc661d6d820805" },
|
|
190902
|
+
{ key: "kit-tab-bar.css", contentType: "text/css; charset=utf-8", offset: 5017363, length: 1171, sha256: "9e2c3a0faaf05d5471badf167a4d3bdf1c4e6dd65c432eea6d254158bfd99585" },
|
|
190903
|
+
{ key: "t5-frame.html", contentType: "text/html; charset=utf-8", offset: 5018534, length: 23047, sha256: "20d1459e3f896f344e478e613d0c979a0de02e81a929a45d3a0ef6a53af36441" },
|
|
190904
|
+
{ key: "t5-worker-frame.html", contentType: "text/html; charset=utf-8", offset: 5041581, length: 23064, sha256: "8655cfe9c74212ec5dafecb49d2fdeb48b19f1bd8a710091e3e55631f9b4ab06" }
|
|
190870
190905
|
];
|
|
190871
190906
|
}
|
|
190872
190907
|
});
|
|
@@ -207482,6 +207517,8 @@ function generateScreens(input) {
|
|
|
207482
207517
|
gaps: [],
|
|
207483
207518
|
workers: {},
|
|
207484
207519
|
tabs: [],
|
|
207520
|
+
pages: [],
|
|
207521
|
+
routeRows: [],
|
|
207485
207522
|
evidence: { ...str11(raw.revision) ? { revision: str11(raw.revision) } : {}, ...str11(raw.publishedDate) ? { publishedDate: str11(raw.publishedDate) } : {} }
|
|
207486
207523
|
};
|
|
207487
207524
|
const assemble = (screenId, title, children2, uses) => {
|
|
@@ -207624,6 +207661,7 @@ function generateScreens(input) {
|
|
|
207624
207661
|
});
|
|
207625
207662
|
out2.unmapped.push(...unmapped);
|
|
207626
207663
|
if (!children2.length) {
|
|
207664
|
+
if (!unmapped.length) out2.unmapped.push({ page: label3, sectionId: "", sectionDefinitionId: "(page)", reason: "none of the page's sections produced anything to show (see the gaps), so the page has no screen" });
|
|
207627
207665
|
out2.routes.push({ layoutItemId, label: label3, kind: "unmapped" });
|
|
207628
207666
|
continue;
|
|
207629
207667
|
}
|
|
@@ -207631,7 +207669,48 @@ function generateScreens(input) {
|
|
|
207631
207669
|
for (const extra of extras) assemble(extra.screenId, extra.title, extra.children, extra.uses);
|
|
207632
207670
|
out2.routes.push({ layoutItemId, label: label3, screenId, kind: "generated" });
|
|
207633
207671
|
}
|
|
207672
|
+
const slugs = layoutSlugs(layoutItems);
|
|
207673
|
+
const hasTabBar = (str11(obj6(obj6(input.navigation).target).navKind) || "bottomTabs") === "bottomTabs";
|
|
207674
|
+
const pageOfScreen = new Map(sourceTabs.flatMap((tab) => {
|
|
207675
|
+
const first = pageItems(str11(tab.screenId))[0];
|
|
207676
|
+
return first ? [[str11(tab.screenId), first]] : [];
|
|
207677
|
+
}));
|
|
207678
|
+
for (; ; ) {
|
|
207679
|
+
const emptied = resolveRoutePlaceholders(out2, fellBack, slugs, hasTabBar, pageOfScreen, true);
|
|
207680
|
+
let demoted = 0;
|
|
207681
|
+
for (const { id: screenId, dropped } of emptied) {
|
|
207682
|
+
const route = out2.routes.find((r3) => r3.screenId === screenId && r3.kind === "generated");
|
|
207683
|
+
if (!route) continue;
|
|
207684
|
+
demoted++;
|
|
207685
|
+
for (const title of dropped) out2.gaps.push({ page: route.label, sectionId: "", sectionDefinitionId: "platform_elements_button_section", reason: `the button "${title}" links to a page that produced no screen, so the button is left out` });
|
|
207686
|
+
out2.unmapped.push({ page: route.label, sectionId: "", sectionDefinitionId: "platform_elements_button_section", reason: "its only content was a button linking to a page that produced no screen, so the page has nothing to show" });
|
|
207687
|
+
out2.routes[out2.routes.indexOf(route)] = { layoutItemId: route.layoutItemId, label: route.label, kind: "unmapped" };
|
|
207688
|
+
delete out2.screens[screenId];
|
|
207689
|
+
delete out2.workers[screenId];
|
|
207690
|
+
}
|
|
207691
|
+
if (!demoted) break;
|
|
207692
|
+
}
|
|
207634
207693
|
mergePageWorkers(out2);
|
|
207694
|
+
markSharedTemplateParams(out2);
|
|
207695
|
+
const pointerPart = (id) => id.replaceAll("~", "~0").replaceAll("/", "~1");
|
|
207696
|
+
const screenOfPage = new Map(out2.routes.filter((r3) => r3.screenId).map((r3) => [r3.layoutItemId, r3.screenId]));
|
|
207697
|
+
const mapRow = (source2, screenId) => {
|
|
207698
|
+
if (!out2.routeRows.some((row2) => row2.source === source2)) out2.routeRows.push({ source: source2, ...screenId ? { screenId } : {} });
|
|
207699
|
+
};
|
|
207700
|
+
const attempted = new Set(items);
|
|
207701
|
+
for (const sourceScreenId of Object.keys(screens0)) {
|
|
207702
|
+
const pages2 = pageItems(sourceScreenId);
|
|
207703
|
+
const first = pages2.find((id) => obj6(obj6(layoutItems[id]).settings).hideFromNavigation !== true) ?? pages2[0];
|
|
207704
|
+
if (first ? attempted.has(first) : tabScreenIds.includes(sourceScreenId)) mapRow(`/screens/${pointerPart(sourceScreenId)}`, first ? screenOfPage.get(first) : void 0);
|
|
207705
|
+
arr(obj6(obj6(screens0[sourceScreenId]).layout).items).forEach((item, index) => {
|
|
207706
|
+
const id = str11(obj6(item).layoutItemId);
|
|
207707
|
+
if (attempted.has(id)) mapRow(`/screens/${pointerPart(sourceScreenId)}/layout/items/${index}`, screenOfPage.get(id));
|
|
207708
|
+
});
|
|
207709
|
+
}
|
|
207710
|
+
for (const layoutItemId of items) {
|
|
207711
|
+
mapRow(`/screens/${pointerPart(layoutItemId)}`, screenOfPage.get(layoutItemId));
|
|
207712
|
+
mapRow(`/screens/${pointerPart(layoutItemId)}/layout/items/0`, screenOfPage.get(layoutItemId));
|
|
207713
|
+
}
|
|
207635
207714
|
const planned2 = obj6(input.navigation);
|
|
207636
207715
|
const ownTabs = sourceTabs.length > 1 && !arr(obj6(planned2.target).tabs).length ? sourceTabs.flatMap((tab) => {
|
|
207637
207716
|
const layoutItemId = pageItems(str11(tab.screenId))[0];
|
|
@@ -207643,12 +207722,22 @@ function generateScreens(input) {
|
|
|
207643
207722
|
return layoutItemId && !hidden ? [{ layoutItemId, label: str11(tab.title).trim(), icon: str11(tab.icon) }] : [];
|
|
207644
207723
|
}) : [];
|
|
207645
207724
|
addNavigation(out2, ownTabs.length ? { target: { tabs: ownTabs, overflow: ownTabs.length > BOTTOM_TABS_BEFORE_MORE + 1 } } : planned2, taken);
|
|
207646
|
-
resolveRoutePlaceholders(out2, fellBack,
|
|
207647
|
-
const first = pageItems(str11(tab.screenId))[0];
|
|
207648
|
-
return first ? [[str11(tab.screenId), first]] : [];
|
|
207649
|
-
})));
|
|
207725
|
+
resolveRoutePlaceholders(out2, fellBack, slugs, hasTabBar, pageOfScreen);
|
|
207650
207726
|
return out2;
|
|
207651
207727
|
}
|
|
207728
|
+
function markSharedTemplateParams(out2) {
|
|
207729
|
+
const users = /* @__PURE__ */ new Map();
|
|
207730
|
+
for (const route of out2.routes) if (route.kind === "template" && route.screenId) users.set(route.screenId, [...users.get(route.screenId) ?? [], route]);
|
|
207731
|
+
for (const routes of users.values()) {
|
|
207732
|
+
if (routes.length < 2) continue;
|
|
207733
|
+
for (const route of routes) {
|
|
207734
|
+
if (!route.params) continue;
|
|
207735
|
+
route.openOnly = true;
|
|
207736
|
+
const lost = Object.keys(route.params).filter((key3) => key3 !== "categoryId");
|
|
207737
|
+
if (lost.length) out2.gaps.push({ page: route.label, sectionId: "", sectionDefinitionId: "(navigation)", reason: `this page shares the ${route.screenId} screen with another page, so its ${lost.join(", ")} cannot be set on the screen and is not passed` });
|
|
207738
|
+
}
|
|
207739
|
+
}
|
|
207740
|
+
}
|
|
207652
207741
|
function layoutSlugs(layoutItems) {
|
|
207653
207742
|
const found = /* @__PURE__ */ new Map(), repeated = /* @__PURE__ */ new Set();
|
|
207654
207743
|
for (const [id, item] of Object.entries(layoutItems)) {
|
|
@@ -207660,7 +207749,7 @@ function layoutSlugs(layoutItems) {
|
|
|
207660
207749
|
for (const slug of repeated) found.delete(slug);
|
|
207661
207750
|
return found;
|
|
207662
207751
|
}
|
|
207663
|
-
function resolveRoutePlaceholders(out2, fellBack, slugs, hasTabBar, pageOfScreen) {
|
|
207752
|
+
function resolveRoutePlaceholders(out2, fellBack, slugs, hasTabBar, pageOfScreen, dryRun = false) {
|
|
207664
207753
|
const screenOf = new Map(out2.routes.filter((r3) => r3.screenId).map((r3) => [r3.layoutItemId, r3.screenId]));
|
|
207665
207754
|
const taken = /* @__PURE__ */ new Set();
|
|
207666
207755
|
const tabOfScreen = new Map((hasTabBar ? out2.tabs : []).map((tab) => [tab.screenId, tabIdFor(tab, taken)]));
|
|
@@ -207676,15 +207765,39 @@ function resolveRoutePlaceholders(out2, fellBack, slugs, hasTabBar, pageOfScreen
|
|
|
207676
207765
|
return tab ? { actionId: "himi.tab", params: { tab } } : { ...tap, params: { ...obj6(tap.params), screenId: target } };
|
|
207677
207766
|
};
|
|
207678
207767
|
const isPlaceholderTap = (v2) => !!v2 && typeof v2 === "object" && str11(obj6(obj6(v2).params).screenId).startsWith(ROUTE_PLACEHOLDER);
|
|
207679
|
-
const
|
|
207768
|
+
const isDeadButton = (v2) => {
|
|
207769
|
+
const body = obj6(obj6(v2).body);
|
|
207770
|
+
const action = obj6(body.props).action;
|
|
207771
|
+
return body.type === "Button" && isPlaceholderTap(action) && !resolve99(str11(obj6(obj6(action).params).screenId));
|
|
207772
|
+
};
|
|
207773
|
+
const DEAD = Symbol("dead");
|
|
207774
|
+
const walk2 = (value2, dropped) => {
|
|
207680
207775
|
if (typeof value2 === "string" && value2.startsWith(ROUTE_PLACEHOLDER)) return resolve99(value2);
|
|
207681
|
-
if (Array.isArray(value2)) return value2.map(walk2);
|
|
207776
|
+
if (Array.isArray(value2)) return value2.map((v2) => walk2(v2, dropped)).filter((v2) => v2 !== DEAD);
|
|
207682
207777
|
if (value2 && typeof value2 === "object") {
|
|
207683
|
-
|
|
207778
|
+
if (isDeadButton(value2)) {
|
|
207779
|
+
dropped.push(str11(obj6(obj6(obj6(value2).body).props).title));
|
|
207780
|
+
return DEAD;
|
|
207781
|
+
}
|
|
207782
|
+
const next = Object.fromEntries(Object.entries(value2).filter(([, v2]) => !(isPlaceholderTap(v2) && !resolve99(str11(obj6(obj6(v2).params).screenId)))).map(([k2, v2]) => [k2, isPlaceholderTap(v2) ? retarget(v2) : walk2(v2, dropped)]));
|
|
207783
|
+
const type2 = obj6(obj6(value2).body).type;
|
|
207784
|
+
const before = obj6(obj6(obj6(value2).body).props).children, after = obj6(obj6(next.body).props).children;
|
|
207785
|
+
if ((type2 === "VStack" || type2 === "HStack") && Array.isArray(before) && before.length && Array.isArray(after) && !after.length) return DEAD;
|
|
207786
|
+
return next;
|
|
207684
207787
|
}
|
|
207685
207788
|
return value2;
|
|
207686
207789
|
};
|
|
207687
|
-
|
|
207790
|
+
const emptied = [];
|
|
207791
|
+
for (const [id, screen] of Object.entries(out2.screens)) {
|
|
207792
|
+
const dropped = [];
|
|
207793
|
+
const walked = walk2(screen, dropped);
|
|
207794
|
+
if (walked.payload === DEAD) emptied.push({ id, dropped });
|
|
207795
|
+
if (dryRun) continue;
|
|
207796
|
+
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;
|
|
207797
|
+
if (walked.payload === DEAD) out2.unmapped.push({ page: str11(screen.title) || id, sectionId: "", sectionDefinitionId: "platform_elements_button_section", reason: "its only content was a button linking to a page that produced no screen, so the page has nothing to show" });
|
|
207798
|
+
for (const title of dropped) out2.gaps.push({ page: str11(screen.title) || id, sectionId: "", sectionDefinitionId: "platform_elements_button_section", reason: `the button "${title}" links to a page that produced no screen, so the button is left out` });
|
|
207799
|
+
}
|
|
207800
|
+
return emptied;
|
|
207688
207801
|
}
|
|
207689
207802
|
function openedScreens(node3, found = []) {
|
|
207690
207803
|
if (Array.isArray(node3)) {
|
|
@@ -207700,13 +207813,15 @@ function openedScreens(node3, found = []) {
|
|
|
207700
207813
|
return found;
|
|
207701
207814
|
}
|
|
207702
207815
|
function tabsFile(result, navigation) {
|
|
207703
|
-
if (!result.tabs.length) return void 0;
|
|
207816
|
+
if (!result.tabs.length && !result.pages.length) return void 0;
|
|
207704
207817
|
const more = result.tabs.find((tab) => tab.layoutItemId === "(more)");
|
|
207705
207818
|
return {
|
|
207706
207819
|
version: 1,
|
|
207707
207820
|
navKind: str11(obj6(obj6(navigation).target).navKind) || "bottomTabs",
|
|
207708
207821
|
tabs: result.tabs,
|
|
207709
|
-
moreRows: more ? openedScreens(result.screens[more.screenId]) : []
|
|
207822
|
+
moreRows: more ? openedScreens(result.screens[more.screenId]) : [],
|
|
207823
|
+
// `apply-navigation` compares these with the navigation plan: a page with no screen must not vanish from the bar without a word.
|
|
207824
|
+
pages: result.pages
|
|
207710
207825
|
};
|
|
207711
207826
|
}
|
|
207712
207827
|
function addNavigation(out2, plan, taken) {
|
|
@@ -207715,10 +207830,13 @@ function addNavigation(out2, plan, taken) {
|
|
|
207715
207830
|
const routeOf = new Map(out2.routes.map((r3) => [r3.layoutItemId, r3]));
|
|
207716
207831
|
const overflow = obj6(plan.target).overflow === true && tabs.length > BOTTOM_TABS_BEFORE_MORE + 1;
|
|
207717
207832
|
const bottom = overflow ? tabs.slice(0, BOTTOM_TABS_BEFORE_MORE) : tabs;
|
|
207833
|
+
for (const tab of tabs) out2.pages.push({ layoutItemId: str11(tab.layoutItemId), label: str11(tab.label), ...routeOf.get(str11(tab.layoutItemId))?.screenId ? { screenId: routeOf.get(str11(tab.layoutItemId)).screenId } : {} });
|
|
207718
207834
|
for (const tab of bottom) {
|
|
207719
207835
|
const route = routeOf.get(str11(tab.layoutItemId));
|
|
207720
|
-
if (route?.screenId)
|
|
207721
|
-
|
|
207836
|
+
if (route?.screenId) {
|
|
207837
|
+
out2.tabs.push({ layoutItemId: str11(tab.layoutItemId), label: str11(tab.label), ...str11(tab.icon) ? { icon: str11(tab.icon) } : {}, screenId: route.screenId });
|
|
207838
|
+
if (route.openOnly) out2.gaps.push({ page: str11(tab.label), sectionId: "", sectionDefinitionId: "(navigation)", reason: `this tab opens the shared ${route.screenId} screen, that another page also opens, so ${JSON.stringify(route.params)} cannot be set from a tab (a More row passes it with its tap)` });
|
|
207839
|
+
} else out2.unmapped.push({ page: str11(tab.label), sectionId: "", sectionDefinitionId: "(navigation)", reason: "this tab's page has no screen to open" });
|
|
207722
207840
|
}
|
|
207723
207841
|
if (!overflow) return;
|
|
207724
207842
|
const rows = [];
|
|
@@ -207733,7 +207851,7 @@ function addNavigation(out2, plan, taken) {
|
|
|
207733
207851
|
id,
|
|
207734
207852
|
[text13(`${id}.label`, str11(tab.label), "body", { maxLines: 1 }, { weight: 1 }), chevron(id)],
|
|
207735
207853
|
12,
|
|
207736
|
-
{ ...inset(14, 14), onTap: { actionId: "himi.open", params: { screenId: route.screenId } }, accessibilityLabel: str11(tab.label) }
|
|
207854
|
+
{ ...inset(14, 14), onTap: { actionId: "himi.open", params: { screenId: route.screenId, ...route.params?.categoryId !== void 0 ? { categoryId: route.params.categoryId } : {} } }, accessibilityLabel: str11(tab.label) }
|
|
207737
207855
|
));
|
|
207738
207856
|
});
|
|
207739
207857
|
if (!rows.length) return;
|
|
@@ -207749,19 +207867,31 @@ function addNavigation(out2, plan, taken) {
|
|
|
207749
207867
|
out2.routes.push({ layoutItemId: "(more)", label: "More", screenId, kind: "generated" });
|
|
207750
207868
|
out2.tabs.push({ layoutItemId: "(more)", label: "More", screenId });
|
|
207751
207869
|
}
|
|
207752
|
-
var TEMPLATE_PARAMS, FALLBACK_TARGETS, NO_INLINE_SECTION, ROUTE_PLACEHOLDER, BOTTOM_TABS_BEFORE_MORE, TEMPLATE_VERTICALS, TEMPLATE_FALLBACKS, MODULES, obj6, arr, str11, node, text13, vstack, hstack, inset, openUrl2, youtubeIdOf, DIRECT_VIDEO_FILE, dialUrl, sourceTap, HANDLERS, MERGED_PAGES_BUNDLE, chevron;
|
|
207870
|
+
var TEMPLATE_SCREEN_PARAM_KEYS, SYSTEM_ALL_PRODUCTS_ID, TEMPLATE_PARAMS, FALLBACK_TARGETS, NO_INLINE_SECTION, ROUTE_PLACEHOLDER, BOTTOM_TABS_BEFORE_MORE, TEMPLATE_VERTICALS, TEMPLATE_FALLBACKS, MODULES, obj6, arr, str11, node, text13, vstack, hstack, inset, openUrl2, youtubeIdOf, DIRECT_VIDEO_FILE, dialUrl, mailUrl, BUSINESS_CHAT_SCREEN, sourceTap, HANDLERS, MERGED_PAGES_BUNDLE, chevron;
|
|
207753
207871
|
var init_generate2 = __esm({
|
|
207754
207872
|
"src/one-app/generate.ts"() {
|
|
207755
207873
|
init_define_HHP_CATALOG();
|
|
207756
207874
|
init_recipes();
|
|
207757
207875
|
init_recipes();
|
|
207758
207876
|
init_tab_ids();
|
|
207877
|
+
TEMPLATE_SCREEN_PARAM_KEYS = {
|
|
207878
|
+
himi_shop: ["categoryId"],
|
|
207879
|
+
himi_groups_feed: ["title", "groupListLabel", "pageSize"],
|
|
207880
|
+
himi_groups: ["title", "groupListLabel", "pageSize"]
|
|
207881
|
+
};
|
|
207882
|
+
SYSTEM_ALL_PRODUCTS_ID = "00000000-000000-000000-000000000001";
|
|
207759
207883
|
TEMPLATE_PARAMS = {
|
|
207760
207884
|
groups_feed_section: (_section, st2) => ({
|
|
207761
207885
|
...str11(st2.sectionTitle).trim() ? { title: str11(st2.sectionTitle).trim() } : {},
|
|
207762
207886
|
...str11(st2.openGroupListButtonText).trim() ? { groupListLabel: str11(st2.openGroupListButtonText).trim() } : {},
|
|
207763
207887
|
...Number.isInteger(st2.postNumber) ? { pageSize: st2.postNumber } : {}
|
|
207764
|
-
})
|
|
207888
|
+
}),
|
|
207889
|
+
// The source's own collection: `himi_shop` reads it as `categoryId` (its load argument or the `himi.open` input) and opens
|
|
207890
|
+
// on that category's chip. Wix's "All Products" system collection is the shop's own All chip, so it passes nothing.
|
|
207891
|
+
stores_products_grid_section: (_section, st2) => {
|
|
207892
|
+
const id = str11(obj6(st2.collection).id).trim();
|
|
207893
|
+
return id && id !== SYSTEM_ALL_PRODUCTS_ID ? { categoryId: id } : {};
|
|
207894
|
+
}
|
|
207765
207895
|
};
|
|
207766
207896
|
FALLBACK_TARGETS = {
|
|
207767
207897
|
achievements_carousel_section: { sibling: "achievements_list_section", screen: "himi_programs" },
|
|
@@ -207796,6 +207926,8 @@ var init_generate2 = __esm({
|
|
|
207796
207926
|
members: { file: "members-directory", register: "registerMembersDirectory", capabilities: ["wix_api"] },
|
|
207797
207927
|
blog: { file: "blog-list", register: "registerBlogList", capabilities: ["wix_api"] },
|
|
207798
207928
|
plans: { file: "plans-section", register: "registerPlansSection", capabilities: ["wix_api"] },
|
|
207929
|
+
// A link tapped in the rich body opens through `capability.open_url`, which the page's screen must declare too.
|
|
207930
|
+
announcements: { file: "announcement-section", register: "registerAnnouncementSection", capabilities: ["wix_api", "open_url"] },
|
|
207799
207931
|
// The module shares an event through the OS share sheet, so a page that uses it declares `share` (as the groups feed bundle does).
|
|
207800
207932
|
events: { file: "events-inline", register: "registerEventsInline", capabilities: ["wix_api", "share"] }
|
|
207801
207933
|
};
|
|
@@ -207817,11 +207949,20 @@ var init_generate2 = __esm({
|
|
|
207817
207949
|
const compact = phone.trim().replace(/[\s().-]/g, "");
|
|
207818
207950
|
return /^\+?\d{2,}$/.test(compact) ? `tel:${compact}` : "";
|
|
207819
207951
|
};
|
|
207820
|
-
|
|
207952
|
+
mailUrl = (email) => {
|
|
207953
|
+
const address = email.trim();
|
|
207954
|
+
return /^[^\s@,;?<>:]+@[^\s@,;?<>:]+\.[^\s@,;?<>:]+$/.test(address) ? `mailto:${address}` : "";
|
|
207955
|
+
};
|
|
207956
|
+
BUSINESS_CHAT_SCREEN = "himi_business_chat";
|
|
207957
|
+
sourceTap = (action, hasScreen2 = () => true) => {
|
|
207821
207958
|
if (action.type === "url" && webUrl(str11(action.url))) return openUrl2(webUrl(str11(action.url)));
|
|
207822
207959
|
if (action.type === "goToScreen" && str11(action.screenId)) return { actionId: "himi.open", params: { screenId: `${ROUTE_PLACEHOLDER}${str11(action.screenId)}|` } };
|
|
207823
207960
|
const dial = action.type === "tel" ? dialUrl(str11(action.phoneNumber)) : "";
|
|
207824
|
-
|
|
207961
|
+
if (dial) return openUrl2(dial);
|
|
207962
|
+
const mail = action.type === "mailto" ? mailUrl(str11(action.email)) : "";
|
|
207963
|
+
if (mail) return openUrl2(mail);
|
|
207964
|
+
if (action.type === "vertical" && str11(action.ctaId).startsWith("chat.") && hasScreen2(BUSINESS_CHAT_SCREEN)) return { actionId: "himi.open", params: { screenId: BUSINESS_CHAT_SCREEN } };
|
|
207965
|
+
return void 0;
|
|
207825
207966
|
};
|
|
207826
207967
|
HANDLERS = {
|
|
207827
207968
|
platform_elements_title_section: (id, _s2, st2) => {
|
|
@@ -207840,7 +207981,7 @@ var init_generate2 = __esm({
|
|
|
207840
207981
|
if (st2.onPressType === "openAsModal") {
|
|
207841
207982
|
modifiers.onTap = { actionId: "himi.lightbox", args: { images: [{ url, alt: ctx.page.label }] } };
|
|
207842
207983
|
} else {
|
|
207843
|
-
const tap = sourceTap(action);
|
|
207984
|
+
const tap = sourceTap(action, ctx.hasScreen);
|
|
207844
207985
|
if (tap) modifiers.onTap = tap;
|
|
207845
207986
|
}
|
|
207846
207987
|
return vstack(`${id}.box`, [node(id, "Image", {
|
|
@@ -207851,19 +207992,28 @@ var init_generate2 = __esm({
|
|
|
207851
207992
|
contentDescription: ctx.page.label
|
|
207852
207993
|
}, Object.keys(modifiers).length ? modifiers : void 0)], 0, inset(16, 16));
|
|
207853
207994
|
},
|
|
207854
|
-
platform_elements_button_section: (id, _s2, st2) => {
|
|
207855
|
-
const button = (label3, action, style, i2) =>
|
|
207856
|
-
|
|
207857
|
-
|
|
207858
|
-
|
|
207859
|
-
|
|
207860
|
-
|
|
207861
|
-
|
|
207862
|
-
|
|
207995
|
+
platform_elements_button_section: (id, _s2, st2, _i2, ctx, elementId) => {
|
|
207996
|
+
const button = (label3, action, style, i2) => {
|
|
207997
|
+
const tap = sourceTap(action, ctx.hasScreen);
|
|
207998
|
+
if (!tap) {
|
|
207999
|
+
ctx.gap(elementId, "platform_elements_button_section", `the button "${label3.trim()}" has a source action (${str11(action.type) || "none"}) with no equivalent here, so the button is left out`);
|
|
208000
|
+
return null;
|
|
208001
|
+
}
|
|
208002
|
+
return node(`${id}.b${i2}`, "Button", {
|
|
208003
|
+
title: label3.trim(),
|
|
208004
|
+
style: style === "outline" ? "secondary" : "primary",
|
|
208005
|
+
size: "md",
|
|
208006
|
+
// A centered source button is a centered pill, not a full-width bar.
|
|
208007
|
+
fullWidth: st2.alignment !== "center",
|
|
208008
|
+
action: tap
|
|
208009
|
+
});
|
|
208010
|
+
};
|
|
207863
208011
|
const items = [button(str11(st2.text), obj6(st2.action), st2.style, 0)];
|
|
207864
208012
|
if (st2.layout === "double") items.push(button(str11(st2.textSecond), obj6(st2.actionSecond), st2.styleSecond, 1));
|
|
208013
|
+
const shown2 = items.filter((b2) => b2 !== null);
|
|
208014
|
+
if (!shown2.length) return null;
|
|
207865
208015
|
const align = st2.alignment === "center" ? "center" : "leading";
|
|
207866
|
-
return
|
|
208016
|
+
return shown2.length > 1 ? hstack(`${id}.box`, shown2, 12, inset(16, 16), align) : vstack(`${id}.box`, shown2, 0, inset(16, 16), align);
|
|
207867
208017
|
},
|
|
207868
208018
|
media_elements_video_section: (id, _s2, st2, _index, ctx, elementId) => {
|
|
207869
208019
|
let url = str11(st2.source);
|
|
@@ -207899,7 +208049,7 @@ var init_generate2 = __esm({
|
|
|
207899
208049
|
if (item.isHidden === true) return [];
|
|
207900
208050
|
const title = str11(item.title).trim();
|
|
207901
208051
|
const url = str11(item.imageUrl);
|
|
207902
|
-
const tap = sourceTap(obj6(item.actionData));
|
|
208052
|
+
const tap = sourceTap(obj6(item.actionData), ctx.hasScreen);
|
|
207903
208053
|
if (!title && !url) return [];
|
|
207904
208054
|
const parts = [];
|
|
207905
208055
|
if (url) parts.push(node(`${id}.i${i2}.img`, "Image", {
|
|
@@ -207918,9 +208068,9 @@ var init_generate2 = __esm({
|
|
|
207918
208068
|
// The source lays its texts over the picture. They sit on the picture here too, on a plain accent band (a translucent scrim is
|
|
207919
208069
|
// not used: a web renderer paints a band with an opacity above its sibling text) so they read on any photo; the button follows
|
|
207920
208070
|
// them over the picture. With no picture the texts and the button simply stack.
|
|
207921
|
-
platform_elements_interactive_banner_section: (id, _s2, st2, _i2, ctx) => {
|
|
208071
|
+
platform_elements_interactive_banner_section: (id, _s2, st2, _i2, ctx, elementId) => {
|
|
207922
208072
|
const url = str11(st2.imageUri);
|
|
207923
|
-
const tap = sourceTap(obj6(st2.action));
|
|
208073
|
+
const tap = sourceTap(obj6(st2.action), ctx.hasScreen);
|
|
207924
208074
|
const align = st2.horizontalAlign === "center" ? "center" : st2.horizontalAlign === "right" ? "trailing" : "leading";
|
|
207925
208075
|
const picture = url ? node(`${id}.img`, "Image", {
|
|
207926
208076
|
url,
|
|
@@ -207933,8 +208083,10 @@ var init_generate2 = __esm({
|
|
|
207933
208083
|
const buttons = [];
|
|
207934
208084
|
arr(st2.items).map(obj6).forEach((item, i2) => {
|
|
207935
208085
|
if (item.isHidden === true || !str11(item.text).trim()) return;
|
|
207936
|
-
if (item.type === "button")
|
|
207937
|
-
|
|
208086
|
+
if (item.type === "button") {
|
|
208087
|
+
if (tap) buttons.push(node(`${id}.b${i2}`, "Button", { title: str11(item.text).trim(), style: "primary", size: "md", fullWidth: false, action: tap }));
|
|
208088
|
+
else ctx.gap(elementId, "platform_elements_interactive_banner_section", `the banner button "${str11(item.text).trim()}" has a source action (${str11(obj6(st2.action).type) || "none"}) with no equivalent here, so the button is left out`);
|
|
208089
|
+
} else texts.push(text13(`${id}.t${i2}`, str11(item.text).trim(), item.type === "title" ? "title3" : "body", { textAlign: align, ...picture ? { color: "textOnAccent" } : {} }, { fillMaxWidth: true }));
|
|
207938
208090
|
});
|
|
207939
208091
|
const tapped = tap ? { onTap: tap } : {};
|
|
207940
208092
|
if (!picture) {
|
|
@@ -207953,6 +208105,14 @@ var init_generate2 = __esm({
|
|
|
207953
208105
|
if (st2.webViewHeightInDynamicLayout === "fit_to_content") ctx.gap(elementId, "platform_elements_web_view_section", "the source sizes the page to its content; the web view has a fixed 600 height");
|
|
207954
208106
|
return vstack(`${id}.box`, [node(id, "WebView", { url, height: fixed, scrollEnabled: true }, { fillMaxWidth: true, accessibilityLabel: ctx.page.label })], 0, inset(8, 8));
|
|
207955
208107
|
},
|
|
208108
|
+
// The business's latest announcement. The section has no settings: its content is read at RUNTIME, with the one read-only call the
|
|
208109
|
+
// native app makes (shared announcement module), never baked into the screen and never invented. A scaffold without the module or
|
|
208110
|
+
// the recipe reports the section as unmapped instead.
|
|
208111
|
+
platform_general_announcement_section: (id, s2, _st, index, ctx) => {
|
|
208112
|
+
const svc = ctx.uses("announcements", `announcement${index}`, {});
|
|
208113
|
+
const heading = s2.showTitle === true ? str11(s2.title).trim() : "";
|
|
208114
|
+
return vstack(`${id}.box`, [ctx.recipe("announcement-card", { svc, id, heading })], 0, { onAppear: { actionId: `tier5.${svc}.load`, params: {} } });
|
|
208115
|
+
},
|
|
207956
208116
|
// The data of these sections is shown by a template screen; the page keeps the source's title and a link to it.
|
|
207957
208117
|
vod_carousel_section: (_id, _s2, _st, _i2, ctx, elementId) => ctx.unsupported(elementId, "vod_carousel_section", NO_INLINE_SECTION),
|
|
207958
208118
|
// The selected plans as cards: name, pitch, price, validity, a details button and the benefits list (unless the source hides it).
|
|
@@ -208485,12 +208645,12 @@ function inboxEntriesInConfig(configSource) {
|
|
|
208485
208645
|
if (id === "drawer_inbox" && screenId) found.push({ site: "drawer Inbox", literal: screenId });
|
|
208486
208646
|
const parent = literalOf(node3, "parentScreenId");
|
|
208487
208647
|
if (screenId?.text === "himi_chat_thread" && parent) found.push({ site: "chat thread parent", literal: parent });
|
|
208488
|
-
if (screenId?.text ===
|
|
208648
|
+
if (screenId?.text === BUSINESS_CHAT_SCREEN2 && parent?.text === "") found.push({ site: "business chat parent", literal: parent });
|
|
208489
208649
|
}
|
|
208490
208650
|
ts19.forEachChild(node3, visit);
|
|
208491
208651
|
};
|
|
208492
208652
|
visit(file2);
|
|
208493
|
-
const stale = found.filter((f2) => f2.literal.text ===
|
|
208653
|
+
const stale = found.filter((f2) => f2.literal.text === BUSINESS_CHAT_SCREEN2 || f2.site === "business chat parent");
|
|
208494
208654
|
let fixed = configSource;
|
|
208495
208655
|
for (const f2 of [...stale].sort((x2, y2) => y2.literal.getStart(file2) - x2.literal.getStart(file2))) {
|
|
208496
208656
|
fixed = `${fixed.slice(0, f2.literal.getStart(file2))}${JSON.stringify(INBOX_SCREEN)}${fixed.slice(f2.literal.getEnd())}`;
|
|
@@ -208505,7 +208665,7 @@ function reopenAsInbox(node3) {
|
|
|
208505
208665
|
}
|
|
208506
208666
|
if (!node3 || typeof node3 !== "object") return false;
|
|
208507
208667
|
const record3 = node3;
|
|
208508
|
-
if (record3.actionId === "himi.open" && obj9(record3.params).screenId ===
|
|
208668
|
+
if (record3.actionId === "himi.open" && obj9(record3.params).screenId === BUSINESS_CHAT_SCREEN2) {
|
|
208509
208669
|
record3.params = { ...obj9(record3.params), screenId: INBOX_SCREEN };
|
|
208510
208670
|
changed = true;
|
|
208511
208671
|
}
|
|
@@ -208517,7 +208677,7 @@ function provisionChatTarget(dir, memberChat, dryRun = false) {
|
|
|
208517
208677
|
const sources = readAppSources(dir);
|
|
208518
208678
|
const app = parseApp(sources.dev, sources.config);
|
|
208519
208679
|
if (!app.routes.some((r3) => r3.kind === "screen" && r3.label === INBOX_SCREEN)) {
|
|
208520
|
-
return { status: "unverified", reason: `the source allows member chat, but this scaffold has no ${INBOX_SCREEN} screen; every chat door keeps opening ${
|
|
208680
|
+
return { status: "unverified", reason: `the source allows member chat, but this scaffold has no ${INBOX_SCREEN} screen; every chat door keeps opening ${BUSINESS_CHAT_SCREEN2}` };
|
|
208521
208681
|
}
|
|
208522
208682
|
const config = inboxEntriesInConfig(sources.config);
|
|
208523
208683
|
const screens = [];
|
|
@@ -208596,14 +208756,17 @@ function parseEntry(entryText, screenId) {
|
|
|
208596
208756
|
return void 0;
|
|
208597
208757
|
}
|
|
208598
208758
|
}
|
|
208599
|
-
function applyScreenParams(dir, screenId, params, dryRun = false) {
|
|
208759
|
+
function applyScreenParams(dir, screenId, params, dryRun = false, remove = []) {
|
|
208600
208760
|
const descriptor = readEntry(dir, screenId);
|
|
208601
208761
|
const appear = descriptor ? rootOnAppear2(descriptor) : void 0;
|
|
208602
208762
|
if (!descriptor || !appear) return "absent";
|
|
208603
208763
|
const current = obj9(appear.params);
|
|
208604
|
-
|
|
208764
|
+
const stale = remove.filter((key3) => key3 in current && !(key3 in params));
|
|
208765
|
+
if (!stale.length && Object.entries(params).every(([k2, v2]) => current[k2] === v2)) return "unchanged";
|
|
208605
208766
|
if (!dryRun) {
|
|
208606
|
-
|
|
208767
|
+
const next = { ...current, ...params };
|
|
208768
|
+
for (const key3 of stale) delete next[key3];
|
|
208769
|
+
appear.params = next;
|
|
208607
208770
|
replaceScreen(dir, screenId, screenEntry(screenId, descriptor));
|
|
208608
208771
|
}
|
|
208609
208772
|
return "set";
|
|
@@ -208723,7 +208886,7 @@ async function runOneAppProvision(args, io2) {
|
|
|
208723
208886
|
return report4(io2, false, { code: "content_invalid", error: error instanceof Error ? error.message : String(error) });
|
|
208724
208887
|
}
|
|
208725
208888
|
}
|
|
208726
|
-
var obj9, PROVISION_USAGE, PROVISIONED_PARAMS, propName6, propOf, GUID2, INBOX_SCREEN,
|
|
208889
|
+
var obj9, PROVISION_USAGE, PROVISIONED_PARAMS, propName6, propOf, GUID2, INBOX_SCREEN, BUSINESS_CHAT_SCREEN2, INBOX_DOOR_SCREENS, NAME_SLOTS;
|
|
208727
208890
|
var init_provision = __esm({
|
|
208728
208891
|
"src/one-app/provision.ts"() {
|
|
208729
208892
|
init_define_HHP_CATALOG();
|
|
@@ -208746,7 +208909,7 @@ var init_provision = __esm({
|
|
|
208746
208909
|
propOf = (o2, name) => o2.properties.find((p2) => propName6(p2) === name && ts19.isPropertyAssignment(p2));
|
|
208747
208910
|
GUID2 = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
|
|
208748
208911
|
INBOX_SCREEN = "himi_inbox";
|
|
208749
|
-
|
|
208912
|
+
BUSINESS_CHAT_SCREEN2 = "himi_business_chat";
|
|
208750
208913
|
INBOX_DOOR_SCREENS = ["himi_account", "himi_chat_thread"];
|
|
208751
208914
|
NAME_SLOTS = /* @__PURE__ */ new Set([...DISPLAY_KEYS, "title", "text", "displayName"]);
|
|
208752
208915
|
}
|
|
@@ -208756,6 +208919,13 @@ var init_provision = __esm({
|
|
|
208756
208919
|
import { existsSync as existsSync125, readFileSync as readFileSync143 } from "node:fs";
|
|
208757
208920
|
import { join as join133 } from "node:path";
|
|
208758
208921
|
import ts20 from "typescript";
|
|
208922
|
+
function pagesWithoutScreen(plan, planned2) {
|
|
208923
|
+
const have = new Map((plan.pages ?? []).map((page) => [page.layoutItemId, page]));
|
|
208924
|
+
const missing3 = /* @__PURE__ */ new Map();
|
|
208925
|
+
for (const page of plan.pages ?? []) if (!page.screenId) missing3.set(page.layoutItemId, page.label);
|
|
208926
|
+
for (const page of planned2) if (!have.get(page.layoutItemId)?.screenId) missing3.set(page.layoutItemId, page.label);
|
|
208927
|
+
return [...missing3].map(([layoutItemId, page]) => ({ page, layoutItemId }));
|
|
208928
|
+
}
|
|
208759
208929
|
function tabIcon(source2) {
|
|
208760
208930
|
const last = (source2 ?? "").split(".").pop() ?? "";
|
|
208761
208931
|
const normalized = last.toLowerCase().replace(/[_.\s-]/g, "");
|
|
@@ -208888,6 +209058,27 @@ async function runOneAppApplyNavigation(args, io2) {
|
|
|
208888
209058
|
} catch {
|
|
208889
209059
|
return report5(io2, false, { code: "tabs_unavailable", error: `${tabsPath} is missing or unreadable: run \`himi one-app generate\` first, and \`himi template screens --upsert\` with its screens.` });
|
|
208890
209060
|
}
|
|
209061
|
+
let planned2;
|
|
209062
|
+
let hasPlan;
|
|
209063
|
+
try {
|
|
209064
|
+
const navigationPlan = readHashedEvidenceJson(options.evidenceDir, "navigation-plan.json");
|
|
209065
|
+
hasPlan = navigationPlan !== void 0;
|
|
209066
|
+
const tabs = navigationPlan?.target?.tabs;
|
|
209067
|
+
planned2 = (Array.isArray(tabs) ? tabs : []).map((tab) => ({ layoutItemId: String(tab.layoutItemId ?? ""), label: String(tab.label ?? "") }));
|
|
209068
|
+
} catch (error) {
|
|
209069
|
+
return report5(io2, false, { code: "evidence_invalid", error: error instanceof Error ? error.message : String(error) });
|
|
209070
|
+
}
|
|
209071
|
+
if (hasPlan && !plan.pages) {
|
|
209072
|
+
return report5(io2, false, { code: "tabs_unavailable", error: `${tabsPath} does not list the pages the source navigation has (it came from an older \`himi one-app generate\`): run \`himi one-app generate\` again.` });
|
|
209073
|
+
}
|
|
209074
|
+
const lost = pagesWithoutScreen(plan, planned2);
|
|
209075
|
+
if (lost.length) {
|
|
209076
|
+
return report5(io2, false, {
|
|
209077
|
+
code: "pages_without_screen",
|
|
209078
|
+
pages: lost,
|
|
209079
|
+
error: `${lost.length} page(s) of the source navigation have no screen, so the tab bar would drop them: ${lost.map((p2) => p2.page).join(", ")}. Map their sections in \`himi one-app generate\` (see its unmapped list) and run it again; nothing was written.`
|
|
209080
|
+
});
|
|
209081
|
+
}
|
|
208891
209082
|
const screens = definedScreens(contentDir2);
|
|
208892
209083
|
if (!screens) return report5(io2, false, { code: "content_invalid", error: "himalaya.content.json not found or unreadable: --content must be a Himi content package." });
|
|
208893
209084
|
const missing3 = plan.tabs.filter((tab) => !screens.has(tab.screenId)).map((tab) => ({ tab: tab.label, screenId: tab.screenId }));
|
|
@@ -208921,6 +209112,7 @@ var init_apply_navigation = __esm({
|
|
|
208921
209112
|
init_icon_catalog_generated();
|
|
208922
209113
|
init_config_source_edit();
|
|
208923
209114
|
init_progress();
|
|
209115
|
+
init_validate_topbar();
|
|
208924
209116
|
init_tab_ids();
|
|
208925
209117
|
tabsFileOf = (out2) => `${out2}.tabs.json`;
|
|
208926
209118
|
APPLY_NAVIGATION_USAGE = "himi one-app apply-navigation --evidence-dir <.himi/one-app> --content <app-dir> [--tabs <tabs.json>] [--dry-run]";
|
|
@@ -209070,14 +209262,38 @@ async function runOneAppGenerate(args, io2) {
|
|
|
209070
209262
|
const templateParams = [];
|
|
209071
209263
|
try {
|
|
209072
209264
|
for (const route of result.routes) {
|
|
209073
|
-
if (route.kind
|
|
209074
|
-
|
|
209265
|
+
if (route.kind !== "template" || !route.screenId) continue;
|
|
209266
|
+
if (route.params && !route.openOnly) {
|
|
209267
|
+
templateParams.push({ screenId: route.screenId, params: route.params, status: applyScreenParams(options.contentDir, route.screenId, route.params, false, TEMPLATE_SCREEN_PARAM_KEYS[route.screenId] ?? []) });
|
|
209268
|
+
} else if (TEMPLATE_SCREEN_PARAM_KEYS[route.screenId]) {
|
|
209269
|
+
let cleared = "absent";
|
|
209270
|
+
try {
|
|
209271
|
+
cleared = applyScreenParams(options.contentDir, route.screenId, {}, false, TEMPLATE_SCREEN_PARAM_KEYS[route.screenId]);
|
|
209272
|
+
} catch {
|
|
209273
|
+
}
|
|
209274
|
+
if (cleared === "set") templateParams.push({ screenId: route.screenId, params: {}, status: cleared });
|
|
209275
|
+
}
|
|
209276
|
+
}
|
|
209277
|
+
const targeted = new Set(result.routes.flatMap((route) => route.kind === "template" && route.screenId ? [route.screenId] : []));
|
|
209278
|
+
for (const [screenId, keys] of Object.entries(TEMPLATE_SCREEN_PARAM_KEYS)) {
|
|
209279
|
+
if (targeted.has(screenId)) continue;
|
|
209280
|
+
let cleared = "absent";
|
|
209281
|
+
try {
|
|
209282
|
+
cleared = applyScreenParams(options.contentDir, screenId, {}, false, keys);
|
|
209283
|
+
} catch {
|
|
209075
209284
|
}
|
|
209285
|
+
if (cleared === "set") templateParams.push({ screenId, params: {}, status: "set" });
|
|
209076
209286
|
}
|
|
209077
209287
|
} catch (error) {
|
|
209078
209288
|
return report6(io2, false, { code: "content_invalid", error: error instanceof Error ? error.message : String(error) });
|
|
209079
209289
|
}
|
|
209080
|
-
|
|
209290
|
+
let coverage;
|
|
209291
|
+
try {
|
|
209292
|
+
coverage = recordRouteTargets(options.evidenceDir, options.contentDir, result.routeRows);
|
|
209293
|
+
} catch (error) {
|
|
209294
|
+
return report6(io2, false, { code: "output_unwritable", error: `Could not write the route rows of ONE-APP-COVERAGE.json: ${error instanceof Error ? error.message : String(error)}` });
|
|
209295
|
+
}
|
|
209296
|
+
const body = { coverage, templateParams, screens: Object.keys(result.screens), workers: Object.values(result.workers).map((w2) => `tier5-src/${w2.bundle}/index.ts`), routes: result.routes, tabs: result.tabs, unmapped: result.unmapped, gaps: result.gaps, evidence: { ...result.evidence, ...fetchedAt ? { fetchedAt } : {} }, out: options.out };
|
|
209081
209297
|
if (result.unmapped.length) {
|
|
209082
209298
|
return report6(io2, false, {
|
|
209083
209299
|
code: "sections_unmapped",
|
|
@@ -209095,6 +209311,7 @@ var init_generate_cli = __esm({
|
|
|
209095
209311
|
init_generate2();
|
|
209096
209312
|
init_recipes();
|
|
209097
209313
|
init_provision();
|
|
209314
|
+
init_coverage();
|
|
209098
209315
|
init_apply_navigation();
|
|
209099
209316
|
GENERATE_USAGE = "himi one-app generate --evidence-dir <.himi/one-app> --content <app-dir> [--out <screens.json>]";
|
|
209100
209317
|
GENERATED_WORKER_MARKER = "// Generated by `himi one-app generate`";
|
|
@@ -210736,7 +210953,6 @@ var init_spaces_host_manifest = __esm({
|
|
|
210736
210953
|
"presigned_upload",
|
|
210737
210954
|
"push",
|
|
210738
210955
|
"speaker_diarization",
|
|
210739
|
-
"ui",
|
|
210740
210956
|
"wix-native",
|
|
210741
210957
|
"wix_cashier"
|
|
210742
210958
|
],
|