@wix/himalaya-cli 0.1650.0 → 0.1652.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/cli.mjs CHANGED
@@ -30002,6 +30002,7 @@ function resolveIdiom(tokens2, ctx = {}) {
30002
30002
  var IDIOM_CONTEXTS, UNSAFE_KEYS;
30003
30003
  var init_idiom = __esm({
30004
30004
  "../../core/ts/src/idiom.ts"() {
30005
+ "use strict";
30005
30006
  init_define_HHP_CATALOG();
30006
30007
  IDIOM_CONTEXTS = {
30007
30008
  ios: { native: ["ios"] },
@@ -179690,12 +179691,12 @@ __export(input_evidence_isolation_exports, {
179690
179691
  runInputEvidenceChild: () => runInputEvidenceChild
179691
179692
  });
179692
179693
  async function installInputEvidenceIsolation(dir) {
179693
- const { lstatSync: lstatSync30, readdirSync: readdirSync48 } = await import("node:fs");
179694
+ const { lstatSync: lstatSync30, readdirSync: readdirSync49 } = await import("node:fs");
179694
179695
  const { join: join145 } = await import("node:path");
179695
179696
  const check = (path2) => {
179696
179697
  const stat2 = lstatSync30(path2);
179697
179698
  if (stat2.isSymbolicLink()) throw new Error("input evidence requires a content tree without symlinks");
179698
- if (stat2.isDirectory()) for (const name of readdirSync48(path2)) check(join145(path2, name));
179699
+ if (stat2.isDirectory()) for (const name of readdirSync49(path2)) check(join145(path2, name));
179699
179700
  };
179700
179701
  check(dir);
179701
179702
  const { requireBuildConfinement: requireBuildConfinement2 } = await Promise.resolve().then(() => (init_build_lib(), build_lib_exports));
@@ -205596,7 +205597,29 @@ var init_recipes = __esm({
205596
205597
  }
205597
205598
  });
205598
205599
 
205600
+ // src/one-app/tab-ids.ts
205601
+ function tabIdFor(tab, taken) {
205602
+ const base = (tab.screenId.toLowerCase().replace(/[^a-z0-9]+/g, "_").replace(/^_+|_+$/g, "") || "tab").slice(0, 32);
205603
+ let id = base, n2 = 2;
205604
+ while (taken.has(id)) id = `${base}_${n2++}`;
205605
+ taken.add(id);
205606
+ return id;
205607
+ }
205608
+ var init_tab_ids = __esm({
205609
+ "src/one-app/tab-ids.ts"() {
205610
+ init_define_HHP_CATALOG();
205611
+ }
205612
+ });
205613
+
205599
205614
  // src/one-app/generate.ts
205615
+ function webUrl(value2) {
205616
+ try {
205617
+ const url = new URL(value2.trim());
205618
+ return url.protocol === "https:" || url.protocol === "http:" ? url.href : "";
205619
+ } catch {
205620
+ return "";
205621
+ }
205622
+ }
205600
205623
  function withoutNode(node3, id) {
205601
205624
  const walk2 = (value2) => {
205602
205625
  if (Array.isArray(value2)) return value2.filter((v2) => !(v2 && typeof v2 === "object" && v2.id === id)).map(walk2);
@@ -205614,14 +205637,14 @@ function composed2(id, s2, svc, nodes2) {
205614
205637
  if (s2.showTitle === true && title) out2.push(vstack(`${id}.heading`, [text13(`${id}.title`, title, "title3")], 0, inset(8, 4)));
205615
205638
  out2.push(...nodes2);
205616
205639
  const at2 = out2.length - nodes2.length;
205617
- if (nodes2.length) out2[at2] = { ...out2[at2], modifiers: { ...obj6(out2[at2].modifiers), onAppear: { actionId: `tier5.${svc}.load`, params: { copy: {} } } } };
205640
+ if (nodes2.length) out2[at2] = { ...out2[at2], modifiers: { ...obj6(out2[at2].modifiers), onAppear: { actionId: `tier5.${svc}.load`, params: {} } } };
205618
205641
  return out2;
205619
205642
  }
205620
205643
  function blogSection(id, s2, st2, index, ctx, sectionId, type2) {
205621
205644
  const content = obj6(st2.contentSettings);
205622
205645
  const display = obj6(st2.displayOptions);
205623
205646
  if (content.featuredOnly === true) return ctx.unsupported(sectionId, type2, "a featured-posts-only list is not supported by the shared blog list");
205624
- if (st2.postsLayout !== void 0 && st2.postsLayout !== "list") return ctx.unsupported(sectionId, type2, `post layout "${String(st2.postsLayout)}" is not supported by the shared blog list`);
205647
+ if (st2.postsLayout !== void 0 && st2.postsLayout !== "list") ctx.gap(sectionId, type2, `post layout "${String(st2.postsLayout)}" is shown as the shared blog list`);
205625
205648
  const raw = content.postsPerCategory;
205626
205649
  const limit = typeof raw === "string" ? /^\d+$/.test(raw) ? Number(raw) : void 0 : Number.isSafeInteger(raw) ? raw : void 0;
205627
205650
  const base = {
@@ -205640,16 +205663,21 @@ function blogSection(id, s2, st2, index, ctx, sectionId, type2) {
205640
205663
  };
205641
205664
  const svc = ctx.uses("blog", `blog${index}`, { ...base, ...limit !== void 0 ? { limit } : {} });
205642
205665
  const nodes2 = ctx.recipeNodes("blog-list", { svc, id, detailScreen: "himi_blog_post" });
205643
- if (nodes2.length) nodes2[0] = { ...nodes2[0], modifiers: { ...obj6(nodes2[0].modifiers), onAppear: { actionId: `tier5.${svc}.load`, params: { copy: {} } } } };
205666
+ if (nodes2.length) nodes2[0] = { ...nodes2[0], modifiers: { ...obj6(nodes2[0].modifiers), onAppear: { actionId: `tier5.${svc}.load`, params: {} } } };
205644
205667
  const out2 = [];
205645
205668
  const title = str11(s2.title).trim();
205646
205669
  if (s2.showTitle === true && title) out2.push(vstack(`${id}.heading`, [text13(`${id}.title`, title, "title3")], 0, inset(8, 4)));
205670
+ if (obj6(st2.contributorSettings).showCreateNewPostBtn === true && !ctx.hasScreen("himi_create_post")) {
205671
+ ctx.gap(sectionId, type2, "the source offers a Create post button; this scaffold has no himi_create_post screen, so the button is left out");
205672
+ } else if (obj6(st2.contributorSettings).showCreateNewPostBtn === true) {
205673
+ out2.push(vstack(`${id}.create`, [node(`${id}.create.btn`, "Button", { title: "Create Post", style: "secondary", size: "md", leadingIcon: "plus", action: { actionId: "himi.open", params: { screenId: "himi_create_post" } } })], 0, inset(4, 4)));
205674
+ }
205647
205675
  out2.push(...nodes2);
205648
205676
  if (limit !== void 0) {
205649
205677
  const allId = screenIdFor(`${ctx.page.label} all posts`, ctx.taken);
205650
205678
  const allSvc = `himiPage_${allId}_blog0`;
205651
205679
  const allNodes = ctx.recipeNodes("blog-list", { svc: allSvc, id: allId, detailScreen: "himi_blog_post" });
205652
- if (allNodes.length) allNodes[0] = { ...allNodes[0], modifiers: { ...obj6(allNodes[0].modifiers), onAppear: { actionId: `tier5.${allSvc}.load`, params: { copy: {} } } } };
205680
+ if (allNodes.length) allNodes[0] = { ...allNodes[0], modifiers: { ...obj6(allNodes[0].modifiers), onAppear: { actionId: `tier5.${allSvc}.load`, params: {} } } };
205653
205681
  ctx.extraScreen(allId, ctx.page.label, allNodes, [{ module: "blog", svc: allSvc, opts: base }]);
205654
205682
  out2.push(ctx.recipe("blog-see-all", { svc, id, detailScreen: "himi_blog_post", seeAllScreen: allId }));
205655
205683
  }
@@ -205674,6 +205702,26 @@ function workerFor(screenId, uses) {
205674
205702
  source: [`// Generated by \`himi one-app generate\`: the services the "${screenId}" page's sections bind.`, ...imports, "", ...calls, ""].join("\n")
205675
205703
  };
205676
205704
  }
205705
+ function mergePageWorkers(out2) {
205706
+ const owners = Object.keys(out2.workers);
205707
+ if (owners.length < 2) return;
205708
+ const sources = owners.map((owner) => out2.workers[owner].source.split("\n"));
205709
+ const imports = [...new Set(sources.flatMap((lines) => lines.filter((line) => line.startsWith("import "))))];
205710
+ const calls = sources.flatMap((lines) => lines.filter((line) => line.trim() && !line.startsWith("import ") && !line.startsWith("//")));
205711
+ const capabilities = [...new Set(owners.flatMap((owner) => out2.workers[owner].capabilities))];
205712
+ for (const owner of owners) {
205713
+ const screen = obj6(out2.screens[owner]);
205714
+ const bundle = obj6(screen.logicBundle);
205715
+ out2.screens[owner] = { ...screen, logicBundle: { ...bundle, url: `http://localhost:8190/v1/bundles/${MERGED_PAGES_BUNDLE}?integrity=`, declaredCapabilities: capabilities } };
205716
+ }
205717
+ out2.workers = {
205718
+ [MERGED_PAGES_BUNDLE]: {
205719
+ bundle: MERGED_PAGES_BUNDLE,
205720
+ capabilities,
205721
+ source: [`// Generated by \`himi one-app generate\`: the services every generated page's sections bind, one per section, named after the page.`, ...imports, "", ...calls, ""].join("\n")
205722
+ }
205723
+ };
205724
+ }
205677
205725
  function generateScreens(input) {
205678
205726
  const raw = input.raw;
205679
205727
  const sections = obj6(raw.sections);
@@ -205766,7 +205814,9 @@ function generateScreens(input) {
205766
205814
  placements,
205767
205815
  page: { label: label3, screenId, layoutItemId },
205768
205816
  taken,
205817
+ hasScreen: (id) => !input.takenScreenIds || input.takenScreenIds.has(id),
205769
205818
  uses: (module, key3, opts) => {
205819
+ if (input.hasModule && !input.hasModule(MODULES[module].file)) throw new RecipeError(`tier5-src/_shared/${MODULES[module].file}.ts is missing: this scaffold does not ship that module, so the section keeps its title and a See All link.`);
205770
205820
  const svc = `himiPage_${screenId}_${key3}`;
205771
205821
  uses.push({ module, svc, opts });
205772
205822
  return svc;
@@ -205800,7 +205850,7 @@ function generateScreens(input) {
205800
205850
  unmapped.push({ page: label3, sectionId, sectionDefinitionId: type2 || "unknown", reason: "no generator mapping for this section type" });
205801
205851
  return;
205802
205852
  }
205803
- const registered = uses.length, extra = extras.length, reported = unmapped.length;
205853
+ const registered = uses.length, extra = extras.length, reported = unmapped.length, gapped = out2.gaps.length;
205804
205854
  const sectionNodeId = `${screenId}.s${sectionId.slice(0, 8)}${index}`;
205805
205855
  let built = null;
205806
205856
  try {
@@ -205817,6 +205867,7 @@ function generateScreens(input) {
205817
205867
  const reasons = unmapped.splice(reported).map((u2) => u2.reason);
205818
205868
  uses.length = registered;
205819
205869
  extras.length = extra;
205870
+ out2.gaps.length = gapped;
205820
205871
  const sibling = fallback.sibling ? items.find((other) => other !== layoutItemId && arr(obj6(layoutItems[other]).elements).some((e2) => str11(obj6(sections[str11(obj6(e2).elementId)]).sectionDefinitionId) === fallback.sibling)) : void 0;
205821
205872
  fellBack.add(`${layoutItemId}|${type2}`);
205822
205873
  const target = `${ROUTE_PLACEHOLDER}${sibling ?? ""}|${fallback.screen}|${fallback.sibling ?? ""}`;
@@ -205844,25 +205895,57 @@ function generateScreens(input) {
205844
205895
  for (const extra of extras) assemble(extra.screenId, extra.title, extra.children, extra.uses);
205845
205896
  out2.routes.push({ layoutItemId, label: label3, screenId, kind: "generated" });
205846
205897
  }
205898
+ mergePageWorkers(out2);
205847
205899
  const planned2 = obj6(input.navigation);
205848
205900
  const ownTabs = sourceTabs.length > 1 && !arr(obj6(planned2.target).tabs).length ? sourceTabs.flatMap((tab) => {
205849
205901
  const layoutItemId = pageItems(str11(tab.screenId))[0];
205850
- return layoutItemId ? [{ layoutItemId, label: str11(tab.title).trim(), icon: str11(tab.icon) }] : [];
205902
+ if (!layoutItemId) {
205903
+ out2.gaps.push({ page: str11(tab.title).trim() || str11(tab.screenId), sectionId: "", sectionDefinitionId: "(navigation)", reason: "this bottom tab's screen has no page, so the app has no tab for it" });
205904
+ return [];
205905
+ }
205906
+ const hidden = obj6(obj6(layoutItems[layoutItemId ?? ""]).settings).hideFromNavigation === true;
205907
+ return layoutItemId && !hidden ? [{ layoutItemId, label: str11(tab.title).trim(), icon: str11(tab.icon) }] : [];
205851
205908
  }) : [];
205852
205909
  addNavigation(out2, ownTabs.length ? { target: { tabs: ownTabs, overflow: ownTabs.length > BOTTOM_TABS_BEFORE_MORE + 1 } } : planned2, taken);
205853
- resolveRoutePlaceholders(out2, fellBack);
205910
+ resolveRoutePlaceholders(out2, fellBack, layoutSlugs(layoutItems), (str11(obj6(obj6(input.navigation).target).navKind) || "bottomTabs") === "bottomTabs", new Map(sourceTabs.flatMap((tab) => {
205911
+ const first = pageItems(str11(tab.screenId))[0];
205912
+ return first ? [[str11(tab.screenId), first]] : [];
205913
+ })));
205854
205914
  return out2;
205855
205915
  }
205856
- function resolveRoutePlaceholders(out2, fellBack) {
205916
+ function layoutSlugs(layoutItems) {
205917
+ const found = /* @__PURE__ */ new Map(), repeated = /* @__PURE__ */ new Set();
205918
+ for (const [id, item] of Object.entries(layoutItems)) {
205919
+ const slug = str11(obj6(item).slug);
205920
+ if (!slug) continue;
205921
+ if (found.has(slug)) repeated.add(slug);
205922
+ else found.set(slug, id);
205923
+ }
205924
+ for (const slug of repeated) found.delete(slug);
205925
+ return found;
205926
+ }
205927
+ function resolveRoutePlaceholders(out2, fellBack, slugs, hasTabBar, pageOfScreen) {
205857
205928
  const screenOf = new Map(out2.routes.filter((r3) => r3.screenId).map((r3) => [r3.layoutItemId, r3.screenId]));
205929
+ const taken = /* @__PURE__ */ new Set();
205930
+ const tabOfScreen = new Map((hasTabBar ? out2.tabs : []).map((tab) => [tab.screenId, tabIdFor(tab, taken)]));
205931
+ const resolve99 = (value2) => {
205932
+ const [named, fallback, siblingType] = value2.slice(ROUTE_PLACEHOLDER.length).split("|");
205933
+ const source = named && !screenOf.has(named) && !pageOfScreen.has(named) ? slugs.get(named) ?? named : named;
205934
+ const page = source && !fellBack.has(`${source}|${siblingType}`) ? screenOf.get(source) ?? screenOf.get(pageOfScreen.get(source) ?? "") : void 0;
205935
+ return page || fallback || "";
205936
+ };
205937
+ const retarget = (tap) => {
205938
+ const target = resolve99(str11(obj6(tap.params).screenId));
205939
+ const tab = tabOfScreen.get(target);
205940
+ return tab ? { actionId: "himi.tab", params: { tab } } : { ...tap, params: { ...obj6(tap.params), screenId: target } };
205941
+ };
205942
+ const isPlaceholderTap = (v2) => !!v2 && typeof v2 === "object" && str11(obj6(obj6(v2).params).screenId).startsWith(ROUTE_PLACEHOLDER);
205858
205943
  const walk2 = (value2) => {
205859
- if (typeof value2 === "string" && value2.startsWith(ROUTE_PLACEHOLDER)) {
205860
- const [layoutItemId, fallback, siblingType] = value2.slice(ROUTE_PLACEHOLDER.length).split("|");
205861
- const sibling = layoutItemId && !fellBack.has(`${layoutItemId}|${siblingType}`) ? screenOf.get(layoutItemId) : void 0;
205862
- return sibling || fallback;
205863
- }
205944
+ if (typeof value2 === "string" && value2.startsWith(ROUTE_PLACEHOLDER)) return resolve99(value2);
205864
205945
  if (Array.isArray(value2)) return value2.map(walk2);
205865
- if (value2 && typeof value2 === "object") return Object.fromEntries(Object.entries(value2).map(([k2, v2]) => [k2, walk2(v2)]));
205946
+ if (value2 && typeof value2 === "object") {
205947
+ return 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)]));
205948
+ }
205866
205949
  return value2;
205867
205950
  };
205868
205951
  for (const [id, screen] of Object.entries(out2.screens)) out2.screens[id] = walk2(screen);
@@ -205930,12 +206013,13 @@ function addNavigation(out2, plan, taken) {
205930
206013
  out2.routes.push({ layoutItemId: "(more)", label: "More", screenId, kind: "generated" });
205931
206014
  out2.tabs.push({ layoutItemId: "(more)", label: "More", screenId });
205932
206015
  }
205933
- var TEMPLATE_PARAMS, FALLBACK_TARGETS, 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, chevron;
206016
+ 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;
205934
206017
  var init_generate2 = __esm({
205935
206018
  "src/one-app/generate.ts"() {
205936
206019
  init_define_HHP_CATALOG();
205937
206020
  init_recipes();
205938
206021
  init_recipes();
206022
+ init_tab_ids();
205939
206023
  TEMPLATE_PARAMS = {
205940
206024
  groups_feed_section: (_section, st2) => ({
205941
206025
  ...str11(st2.sectionTitle).trim() ? { title: str11(st2.sectionTitle).trim() } : {},
@@ -205950,8 +206034,16 @@ var init_generate2 = __esm({
205950
206034
  newBlog_postlist_vertical_section: { screen: "himi_blog" },
205951
206035
  newBlog_compact_post_list_vertical_section: { screen: "himi_blog" },
205952
206036
  member_list_section: { sibling: "member_list_section", screen: "himi_members" },
205953
- bookings_services_list_section: { screen: "himi_services", needsScreen: true }
205954
- };
206037
+ bookings_services_list_section: { screen: "himi_services", needsScreen: true },
206038
+ // Sections whose data the template already shows on a screen of its own: the page keeps the source's title and a link to it.
206039
+ vod_carousel_section: { screen: "himi_videos", needsScreen: true },
206040
+ memberships_plan_cards_carousel: { screen: "himi_plans", needsScreen: true },
206041
+ progallery_carousel_section: { screen: "himi_galleries", needsScreen: true },
206042
+ achievements_participant_carousel_section: { screen: "himi_member_programs", needsScreen: true },
206043
+ groups_cards_section: { screen: "himi_groups", needsScreen: true },
206044
+ newBlog_search_section: { screen: "himi_blog", needsScreen: true }
206045
+ };
206046
+ NO_INLINE_SECTION = "its data has no inline section yet";
205955
206047
  ROUTE_PLACEHOLDER = "@route:";
205956
206048
  BOTTOM_TABS_BEFORE_MORE = 4;
205957
206049
  TEMPLATE_VERTICALS = {
@@ -205967,6 +206059,7 @@ var init_generate2 = __esm({
205967
206059
  programs: { file: "programs-section", register: "registerProgramsSection", capabilities: ["wix_api", "iap", "app_info"] },
205968
206060
  members: { file: "members-directory", register: "registerMembersDirectory", capabilities: ["wix_api"] },
205969
206061
  blog: { file: "blog-list", register: "registerBlogList", capabilities: ["wix_api"] },
206062
+ plans: { file: "plans-section", register: "registerPlansSection", capabilities: ["wix_api"] },
205970
206063
  // The module shares an event through the OS share sheet, so a page that uses it declares `share` (as the groups feed bundle does).
205971
206064
  events: { file: "events-inline", register: "registerEventsInline", capabilities: ["wix_api", "share"] }
205972
206065
  };
@@ -205989,7 +206082,8 @@ var init_generate2 = __esm({
205989
206082
  return /^\+?\d{2,}$/.test(compact) ? `tel:${compact}` : "";
205990
206083
  };
205991
206084
  sourceTap = (action) => {
205992
- if (action.type === "url" && str11(action.url)) return openUrl2(str11(action.url));
206085
+ if (action.type === "url" && webUrl(str11(action.url))) return openUrl2(webUrl(str11(action.url)));
206086
+ if (action.type === "goToScreen" && str11(action.screenId)) return { actionId: "himi.open", params: { screenId: `${ROUTE_PLACEHOLDER}${str11(action.screenId)}|` } };
205993
206087
  const dial = action.type === "tel" ? dialUrl(str11(action.phoneNumber)) : "";
205994
206088
  return dial ? openUrl2(dial) : void 0;
205995
206089
  };
@@ -206049,7 +206143,9 @@ var init_generate2 = __esm({
206049
206143
  }, { cornerRadius: 8, fillMaxWidth: true })], 0, inset(8, 8));
206050
206144
  }
206051
206145
  if (str11(st2.sourceType) !== "wixMedia" && !DIRECT_VIDEO_FILE.test(url)) {
206052
- return vstack(`${id}.box`, [node(`${id}.open`, "Button", { title: "Open video", style: "primary", size: "md", action: openUrl2(url) })], 0, inset(8, 8));
206146
+ const link = webUrl(url);
206147
+ if (!link) return ctx.unsupported(elementId, "media_elements_video_section", `its video link "${url}" is not an http(s) URL`);
206148
+ return vstack(`${id}.box`, [node(`${id}.open`, "Button", { title: "Open video", style: "primary", size: "md", action: openUrl2(link) })], 0, inset(8, 8));
206053
206149
  }
206054
206150
  if (!/^https?:\/\//i.test(url)) {
206055
206151
  const ref = url.trim().replace(/^\/+/, "").replace(/^video\//, "");
@@ -206058,6 +206154,98 @@ var init_generate2 = __esm({
206058
206154
  }
206059
206155
  return vstack(`${id}.box`, [node(id, "Video", { url, controls: true, ...aspect, loop: !!st2.loop, autoplay: !!st2.autoplay }, { cornerRadius: 8, fillMaxWidth: true, accessibilityLabel: ctx.page.label })], 0, inset(8, 8));
206060
206156
  },
206157
+ // A list of image cards, each with a title and the tap the source gave it. The source may lay the title over the image
206158
+ // (`imageOverlay`); here it sits under the image, so the image stays clear and the title stays readable.
206159
+ platform_elements_repeater_section: (id, _s2, st2, _i2, ctx, elementId) => {
206160
+ const options = obj6(st2.imageOptions);
206161
+ const gap = Math.min(24, Math.max(4, Number(st2.spaceBetweenItems) || 12));
206162
+ const cards = arr(st2.items).map(obj6).flatMap((item, i2) => {
206163
+ if (item.isHidden === true) return [];
206164
+ const title = str11(item.title).trim();
206165
+ const url = str11(item.imageUrl);
206166
+ const tap = sourceTap(obj6(item.actionData));
206167
+ if (!title && !url) return [];
206168
+ const parts = [];
206169
+ if (url) parts.push(node(`${id}.i${i2}.img`, "Image", {
206170
+ url,
206171
+ fillWidth: true,
206172
+ ...typeof options.aspectRatio === "number" ? { aspectRatio: options.aspectRatio } : {},
206173
+ contentMode: options.imageScale === "fit" ? "fit" : "fill",
206174
+ contentDescription: title || ctx.page.label
206175
+ }, typeof options.cornerRadius === "number" ? { cornerRadius: options.cornerRadius } : void 0));
206176
+ if (title) parts.push(text13(`${id}.i${i2}.title`, title, "bodyEmphasis", { textAlign: "leading" }, { fillMaxWidth: true }));
206177
+ return [vstack(`${id}.i${i2}`, parts, 8, tap ? { onTap: tap, fillMaxWidth: true } : { fillMaxWidth: true })];
206178
+ });
206179
+ if (!cards.length) return ctx.unsupported(elementId, "platform_elements_repeater_section", "the repeater has no item with a title or an image");
206180
+ return vstack(`${id}.box`, cards, gap, inset(8, 8));
206181
+ },
206182
+ // The source lays its texts over the picture. They sit on the picture here too, on a plain accent band (a translucent scrim is
206183
+ // not used: a web renderer paints a band with an opacity above its sibling text) so they read on any photo; the button follows
206184
+ // them over the picture. With no picture the texts and the button simply stack.
206185
+ platform_elements_interactive_banner_section: (id, _s2, st2, _i2, ctx) => {
206186
+ const url = str11(st2.imageUri);
206187
+ const tap = sourceTap(obj6(st2.action));
206188
+ const align = st2.horizontalAlign === "center" ? "center" : st2.horizontalAlign === "right" ? "trailing" : "leading";
206189
+ const picture = url ? node(`${id}.img`, "Image", {
206190
+ url,
206191
+ fillWidth: true,
206192
+ ...typeof st2.aspectRatio === "number" ? { aspectRatio: st2.aspectRatio } : {},
206193
+ contentMode: "fill",
206194
+ contentDescription: ctx.page.label
206195
+ }, typeof st2.cornerRadius === "number" ? { cornerRadius: st2.cornerRadius } : void 0) : null;
206196
+ const texts = [];
206197
+ const buttons = [];
206198
+ arr(st2.items).map(obj6).forEach((item, i2) => {
206199
+ if (item.isHidden === true || !str11(item.text).trim()) return;
206200
+ if (item.type === "button") buttons.push(node(`${id}.b${i2}`, "Button", { title: str11(item.text).trim(), style: "primary", size: "md", fullWidth: false, ...tap ? { action: tap } : {} }));
206201
+ else texts.push(text13(`${id}.t${i2}`, str11(item.text).trim(), item.type === "title" ? "title3" : "body", { textAlign: align, ...picture ? { color: "textOnAccent" } : {} }, { fillMaxWidth: true }));
206202
+ });
206203
+ const tapped = tap ? { onTap: tap } : {};
206204
+ if (!picture) {
206205
+ const parts = [...texts, ...buttons];
206206
+ return parts.length ? vstack(`${id}.box`, parts, 8, { ...inset(8, 8), ...tapped }, align === "center" ? "center" : "leading") : null;
206207
+ }
206208
+ const band = texts.length ? vstack(`${id}.band`, texts, 4, { background: { token: "accentPrimary" }, cornerRadius: 10, padding: { leading: 12, trailing: 12, top: 8, bottom: 8 } }, align) : null;
206209
+ const over = vstack(`${id}.over`, [...band ? [band] : [], ...buttons], 12, { fillMaxWidth: true, padding: { leading: 16, trailing: 16, top: 16, bottom: 16 } }, align === "center" ? "center" : "leading");
206210
+ return vstack(`${id}.box`, [node(`${id}.stack`, "ZStack", { alignment: align, children: [picture, over] }, { fillMaxWidth: true })], 0, { ...inset(8, 8), ...tapped });
206211
+ },
206212
+ // A web page inside the screen. The source sizes it to its content; a fixed height is the nearest fixed equivalent.
206213
+ platform_elements_web_view_section: (id, _s2, st2, _i2, ctx, elementId) => {
206214
+ const url = str11(st2.url);
206215
+ if (!/^https:\/\//i.test(url)) return ctx.unsupported(elementId, "platform_elements_web_view_section", "the web view has no https URL");
206216
+ const fixed = typeof st2.fixedHeight === "number" && st2.webViewHeightInDynamicLayout !== "fit_to_content" ? st2.fixedHeight : 600;
206217
+ 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");
206218
+ return vstack(`${id}.box`, [node(id, "WebView", { url, height: fixed, scrollEnabled: true }, { fillMaxWidth: true, accessibilityLabel: ctx.page.label })], 0, inset(8, 8));
206219
+ },
206220
+ // The data of these sections is shown by a template screen; the page keeps the source's title and a link to it.
206221
+ vod_carousel_section: (_id, _s2, _st, _i2, ctx, elementId) => ctx.unsupported(elementId, "vod_carousel_section", NO_INLINE_SECTION),
206222
+ // The selected plans as cards: name, pitch, price, validity, a details button and the benefits list (unless the source hides it).
206223
+ // A scaffold without the plans recipe keeps the title and a link to the template's plans screen, as every data section does.
206224
+ memberships_plan_cards_carousel: (id, s2, st2, index, ctx) => {
206225
+ const planIds = arr(st2.selectedPlanIds).filter((v2) => typeof v2 === "string" && !!v2);
206226
+ const svc = ctx.uses("plans", `plans${index}`, { planIds, showBenefits: st2.shouldDisplayBenefitsList !== false });
206227
+ const children2 = [];
206228
+ const title = str11(s2.title).trim();
206229
+ if (s2.showTitle === true && title) children2.push(text13(`${id}.title`, title, "title3", {}, inset(0, 0)));
206230
+ children2.push(ctx.recipe("plans-card", { svc, id, detailScreen: "himi_plan", detailsLabel: "View details" }));
206231
+ return vstack(`${id}.box`, children2, 12, { ...inset(16, 16), onAppear: { actionId: `tier5.${svc}.load`, params: {} } });
206232
+ },
206233
+ progallery_carousel_section: (_id, _s2, _st, _i2, ctx, elementId) => ctx.unsupported(elementId, "progallery_carousel_section", NO_INLINE_SECTION),
206234
+ achievements_participant_carousel_section: (_id, _s2, _st, _i2, ctx, elementId) => ctx.unsupported(elementId, "achievements_participant_carousel_section", NO_INLINE_SECTION),
206235
+ groups_cards_section: (_id, _s2, _st, _i2, ctx, elementId) => ctx.unsupported(elementId, "groups_cards_section", NO_INLINE_SECTION),
206236
+ newBlog_search_section: (_id, _s2, _st, _i2, ctx, elementId) => ctx.unsupported(elementId, "newBlog_search_section", NO_INLINE_SECTION),
206237
+ // One chosen group: the title and a button that opens that group (the template's group screen takes the id).
206238
+ single_group_feed_section: (id, s2, st2, _i2, ctx, elementId) => {
206239
+ const groupId = str11(st2.groupId);
206240
+ if (!groupId) return ctx.unsupported(elementId, "single_group_feed_section", "the section names no group");
206241
+ if (!ctx.hasScreen("himi_group")) return ctx.unsupported(elementId, "single_group_feed_section", "this scaffold has no himi_group screen to open the group in");
206242
+ ctx.gap(elementId, "single_group_feed_section", "the group's posts are not shown inline; the section opens the group");
206243
+ const title = str11(s2.title).trim();
206244
+ const children2 = [];
206245
+ if (s2.showTitle !== false && title) children2.push(text13(`${id}.title`, title, "title3"));
206246
+ children2.push(node(`${id}.open`, "Button", { title: str11(st2.seeAllButtonText).trim() || "Open group", style: "secondary", size: "md", fullWidth: true, action: { actionId: "himi.open", params: { screenId: "himi_group", id: groupId } } }));
206247
+ return vstack(`${id}.box`, children2, 12, inset(16, 16));
206248
+ },
206061
206249
  pages_section: (id, _s2, _st, index, ctx, elementId) => {
206062
206250
  const placement = ctx.placements.get(`${ctx.page.layoutItemId}:${elementId}:${index}`);
206063
206251
  if (placement?.state === "ready" && placement.component) return vstack(`${id}.box`, [placement.component], 0, inset(8, 8));
@@ -206081,7 +206269,7 @@ var init_generate2 = __esm({
206081
206269
  const title = str11(s2.title).trim();
206082
206270
  if (s2.showTitle !== false && title) children2.push(text13(`${id}.title`, title, "title3", {}, inset(0, 0)));
206083
206271
  children2.push(ctx.recipe("programs-carousel", { svc, id, detailScreen: "himi_program" }));
206084
- return vstack(`${id}.box`, children2, 12, { ...inset(16, 16), onAppear: { actionId: `tier5.${svc}.load`, params: { copy: {} } } });
206272
+ return vstack(`${id}.box`, children2, 12, { ...inset(16, 16), onAppear: { actionId: `tier5.${svc}.load`, params: {} } });
206085
206273
  },
206086
206274
  // The programs list: single-column full-width cards from the shared programs module (the list layout pages itself).
206087
206275
  achievements_list_section: (id, s2, st2, index, ctx, sectionId) => {
@@ -206118,7 +206306,7 @@ var init_generate2 = __esm({
206118
206306
  const title = str11(s2.title).trim();
206119
206307
  if (s2.showTitle === true && title) children2.push(text13(`${id}.title`, title, "title3", {}, inset(0, 0)));
206120
206308
  children2.push(card2);
206121
- return vstack(`${id}.box`, children2, 12, { ...inset(16, 16), onAppear: { actionId: `tier5.${svc}.load`, params: { copy: {} } } });
206309
+ return vstack(`${id}.box`, children2, 12, { ...inset(16, 16), onAppear: { actionId: `tier5.${svc}.load`, params: {} } });
206122
206310
  },
206123
206311
  // The business contact section: its own title and description, and only the rows the source switches on.
206124
206312
  platform_general_contact_section: (id, s2, st2, _i2, ctx) => {
@@ -206129,7 +206317,7 @@ var init_generate2 = __esm({
206129
206317
  if (s2.showTitle !== false && title) children2.push(text13(`${id}.title`, title, "title3"));
206130
206318
  const description = str11(profile.description).split("\n").map((l2) => l2.trim()).filter(Boolean).join("\n");
206131
206319
  if (st2.isDescriptionVisible === true && description) children2.push(text13(`${id}.description`, description, "body"));
206132
- const website = str11(obj6(ctx.business.website).publicUrl);
206320
+ const website = webUrl(str11(obj6(ctx.business.website).publicUrl));
206133
206321
  if (st2.isWebSiteLinkVisible === true && website) {
206134
206322
  children2.push(hstack(`${id}.web`, [
206135
206323
  node(`${id}.web.icon`, "Icon", { name: "globe" }),
@@ -206143,6 +206331,7 @@ var init_generate2 = __esm({
206143
206331
  return children2.length ? vstack(`${id}.box`, children2, 12, inset(16, 16)) : null;
206144
206332
  }
206145
206333
  };
206334
+ MERGED_PAGES_BUNDLE = "one-app-pages";
206146
206335
  chevron = (id) => node(`${id}.chevron`, "Icon", { name: "chevron_right" });
206147
206336
  }
206148
206337
  });
@@ -206839,13 +207028,6 @@ function tabIcon(source) {
206839
207028
  const filled = `${icon}_fill`;
206840
207029
  return { icon, ...ICON_NAMES.includes(filled) ? { selectedIcon: filled } : {}, resolved: !!found };
206841
207030
  }
206842
- function tabIdFor(tab, taken) {
206843
- const base = (tab.screenId.toLowerCase().replace(/[^a-z0-9]+/g, "_").replace(/^_+|_+$/g, "") || "tab").slice(0, 32);
206844
- let id = base, n2 = 2;
206845
- while (taken.has(id)) id = `${base}_${n2++}`;
206846
- taken.add(id);
206847
- return id;
206848
- }
206849
207031
  function property2(literal2, name) {
206850
207032
  const found = lookup3(literal2, name);
206851
207033
  return found.kind === "written" ? found.node : void 0;
@@ -206883,19 +207065,36 @@ function applyNavigationToConfig(source, plan, fileName = "config.ts") {
206883
207065
  const tabOfScreen = new Map(tabs.map(({ tab, id }) => [tab.screenId, id]));
206884
207066
  const moreRows = new Set(plan.moreRows);
206885
207067
  const valid = new Set(tabs.map(({ id }) => id));
207068
+ const newScreenOf = new Map(tabs.map(({ tab, id }) => [id, tab.screenId]));
207069
+ const reused = new Set(items.elements.flatMap((element) => {
207070
+ const entry = unwrap(element);
207071
+ if (!ts19.isObjectLiteralExpression(entry)) return [];
207072
+ const id = stringOf(property2(entry, "id")), screenId = stringOf(property2(entry, "screenId"));
207073
+ return id && newScreenOf.has(id) && newScreenOf.get(id) !== screenId ? [id] : [];
207074
+ }));
206886
207075
  let repointed = 0;
206887
207076
  const links = property2(navigation, "linkableScreens");
206888
207077
  const linkItems = links && unwrap(links.initializer);
206889
207078
  if (linkItems && ts19.isArrayLiteralExpression(linkItems)) {
207079
+ const parentOf = /* @__PURE__ */ new Map();
207080
+ for (const element of linkItems.elements) {
207081
+ const entry = unwrap(element);
207082
+ if (ts19.isObjectLiteralExpression(entry)) parentOf.set(stringOf(property2(entry, "screenId")), stringOf(property2(entry, "parentScreenId")));
207083
+ }
207084
+ const ownerOf = (screenId, seen = /* @__PURE__ */ new Set()) => {
207085
+ if (!screenId || seen.has(screenId)) return void 0;
207086
+ seen.add(screenId);
207087
+ return tabOfScreen.get(screenId) ?? ownerOf(parentOf.get(screenId) ?? "", seen) ?? (moreId && moreRows.has(screenId) ? moreId : void 0);
207088
+ };
206890
207089
  for (const element of linkItems.elements) {
206891
207090
  const entry = unwrap(element);
206892
207091
  if (!ts19.isObjectLiteralExpression(entry)) continue;
206893
207092
  const tabId = property2(entry, "tabId");
206894
207093
  const value2 = tabId && unwrap(tabId.initializer);
206895
- if (!value2 || !ts19.isStringLiteralLike(value2) || value2.text === "" || valid.has(value2.text)) continue;
206896
- const screenId = stringOf(property2(entry, "screenId"));
206897
- const parentId = stringOf(property2(entry, "parentScreenId"));
206898
- const owner = tabOfScreen.get(screenId) ?? tabOfScreen.get(parentId) ?? (moreId && moreRows.has(screenId) ? moreId : "");
207094
+ if (!value2 || !ts19.isStringLiteralLike(value2) || value2.text === "") continue;
207095
+ if (valid.has(value2.text) && !reused.has(value2.text)) continue;
207096
+ const owner = ownerOf(stringOf(property2(entry, "screenId"))) ?? "";
207097
+ if (owner === value2.text) continue;
206899
207098
  splices.push({ at: value2.getStart(file2), end: value2.end, text: JSON.stringify(owner) });
206900
207099
  repointed++;
206901
207100
  }
@@ -206986,6 +207185,7 @@ var init_apply_navigation = __esm({
206986
207185
  init_icon_catalog_generated();
206987
207186
  init_config_source_edit();
206988
207187
  init_progress();
207188
+ init_tab_ids();
206989
207189
  tabsFileOf = (out2) => `${out2}.tabs.json`;
206990
207190
  APPLY_NAVIGATION_USAGE = "himi one-app apply-navigation --evidence-dir <.himi/one-app> --content <app-dir> [--tabs <tabs.json>] [--dry-run]";
206991
207191
  SOURCE_ICON_ALIASES = {
@@ -207022,8 +207222,17 @@ var init_apply_navigation = __esm({
207022
207222
  });
207023
207223
 
207024
207224
  // src/one-app/generate-cli.ts
207025
- import { mkdirSync as mkdirSync52, readFileSync as readFileSync142, rmSync as rmSync37, writeFileSync as writeFileSync57 } from "node:fs";
207225
+ import { existsSync as existsSync124, mkdirSync as mkdirSync52, readdirSync as readdirSync48, readFileSync as readFileSync142, rmSync as rmSync37, writeFileSync as writeFileSync57 } from "node:fs";
207026
207226
  import { dirname as dirname64, join as join132, resolve as resolve91 } from "node:path";
207227
+ function removeStaleGeneratedWorkers(contentDir2, current) {
207228
+ const root = join132(contentDir2, "tier5-src");
207229
+ if (!existsSync124(root)) return;
207230
+ for (const name of readdirSync48(root)) {
207231
+ if (current.has(name) || name === "_shared") continue;
207232
+ const index = join132(root, name, "index.ts");
207233
+ if (existsSync124(index) && readFileSync142(index, "utf8").startsWith(GENERATED_WORKER_MARKER)) rmSync37(join132(root, name), { recursive: true, force: true });
207234
+ }
207235
+ }
207027
207236
  function parseArgs4(args) {
207028
207237
  let evidenceDir, contentDir2, out2;
207029
207238
  for (let i2 = 0; i2 < args.length; i2++) {
@@ -207100,7 +207309,7 @@ async function runOneAppGenerate(args, io2) {
207100
207309
  }
207101
207310
  let result;
207102
207311
  try {
207103
- result = generateScreens({ raw, pages: pages2, business, navigation, takenScreenIds: taken, recipe: (name, values) => readRecipe(options.contentDir, name, values), recipeNodes: (name, values) => readRecipeNodes(options.contentDir, name, values) });
207312
+ result = generateScreens({ raw, pages: pages2, business, navigation, takenScreenIds: taken, recipe: (name, values) => readRecipe(options.contentDir, name, values), recipeNodes: (name, values) => readRecipeNodes(options.contentDir, name, values), hasModule: (file2) => existsSync124(join132(options.contentDir, "tier5-src", "_shared", `${file2}.ts`)) });
207104
207313
  } catch (error) {
207105
207314
  if (error instanceof RecipeError) return report6(io2, false, { code: "recipe_unavailable", error: error.message });
207106
207315
  throw error;
@@ -207118,6 +207327,7 @@ async function runOneAppGenerate(args, io2) {
207118
207327
  mkdirSync52(dir, { recursive: true });
207119
207328
  writeFileSync57(join132(dir, "index.ts"), worker.source, "utf8");
207120
207329
  }
207330
+ removeStaleGeneratedWorkers(options.contentDir, new Set(Object.values(result.workers).map((w2) => w2.bundle)));
207121
207331
  } catch (error) {
207122
207332
  return report6(io2, false, { code: "output_unwritable", error: `Could not write ${options.out}: ${error instanceof Error ? error.message : String(error)}` });
207123
207333
  }
@@ -207141,7 +207351,7 @@ async function runOneAppGenerate(args, io2) {
207141
207351
  }
207142
207352
  return report6(io2, true, { ...body, next: `himi template screens --upsert --from ${shellArg(options.out)}` + (result.tabs.length ? ` && himi one-app apply-navigation --evidence-dir ${shellArg(options.evidenceDir)} --content ${shellArg(options.contentDir)} --tabs ${shellArg(tabsFileOf(options.out))}` : "") });
207143
207353
  }
207144
- var GENERATE_USAGE, idsFile, shellArg;
207354
+ var GENERATE_USAGE, GENERATED_WORKER_MARKER, idsFile, shellArg;
207145
207355
  var init_generate_cli = __esm({
207146
207356
  "src/one-app/generate-cli.ts"() {
207147
207357
  init_define_HHP_CATALOG();
@@ -207151,6 +207361,7 @@ var init_generate_cli = __esm({
207151
207361
  init_provision();
207152
207362
  init_apply_navigation();
207153
207363
  GENERATE_USAGE = "himi one-app generate --evidence-dir <.himi/one-app> --content <app-dir> [--out <screens.json>]";
207364
+ GENERATED_WORKER_MARKER = "// Generated by `himi one-app generate`";
207154
207365
  idsFile = (out2) => `${out2}.ids.json`;
207155
207366
  shellArg = (value2) => /^[\w@%+=:,./-]+$/.test(value2) ? value2 : `'${value2.replace(/'/g, `'\\''`)}'`;
207156
207367
  }
@@ -208073,6 +208284,14 @@ function paymentReviewIssues(value2, metaSiteId) {
208073
208284
  }
208074
208285
  return issues;
208075
208286
  }
208287
+ function checkoutClientOwnerStep(metaSiteId, flowIds) {
208288
+ return {
208289
+ code: "checkout_client_headless_oauth",
208290
+ flowIds,
208291
+ consent: "site owner",
208292
+ instruction: `The site's owner creates a Headless OAuth client for the app, in the dashboard (https://manage.wix.com/dashboard/${metaSiteId}/oauth-apps-settings) or by running \`himi site client ensure --site ${metaSiteId} --yes --write-provisioning\` with the owner's own account. Do not create it without the owner's consent. Until then, paid flows show that paying in the app is not available yet.`
208293
+ };
208294
+ }
208076
208295
  function runPaymentReview(args, io2) {
208077
208296
  if (args.includes("--help") || args.includes("-h")) {
208078
208297
  io2.log(PAYMENT_REVIEW_USAGE);
@@ -208101,7 +208320,9 @@ function runPaymentReview(args, io2) {
208101
208320
  flowId: flow.id,
208102
208321
  message: "Payment setup could not be verified. Preserve the existing purchase flow with its supported checkout; do not claim payments are disconnected."
208103
208322
  }));
208104
- io2.log(JSON.stringify({ ok: true, stage: "payment-decisions-reviewed", evidenceDir, warnings, verification: "Recorded evidence and decisions checked; merchant readiness is not independently verified by this command." }));
208323
+ const paidFlows = obj11(review).flows.map(obj11).filter((flow) => flow.payment === "online-paid").map((flow) => String(flow.id));
208324
+ const ownerSteps = paidFlows.length ? [checkoutClientOwnerStep(metaSiteId, paidFlows)] : [];
208325
+ io2.log(JSON.stringify({ ok: true, stage: "payment-decisions-reviewed", evidenceDir, warnings, ownerSteps, verification: "Recorded evidence and decisions checked; merchant readiness is not independently verified by this command." }));
208105
208326
  return 0;
208106
208327
  } catch {
208107
208328
  return fail8("payment_review_unreadable", ["Read the collected manifest and source evidence, then prepare payment-review.json for that site."], 1);
@@ -216761,12 +216982,12 @@ async function ejectCommand(ctx) {
216761
216982
  print({ ok: false, error: "eject needs a module", hint: `one of: ${EJECTABLE2.join(", ")}` });
216762
216983
  return 2;
216763
216984
  }
216764
- const { readdirSync: readdirSync48, existsSync: fileExists } = await import("node:fs");
216985
+ const { readdirSync: readdirSync49, existsSync: fileExists } = await import("node:fs");
216765
216986
  const { join: pathJoin3 } = await import("node:path");
216766
216987
  const targets = [];
216767
216988
  const t5 = pathJoin3(dir, "tier5-src");
216768
216989
  if (fileExists(t5)) {
216769
- for (const d2 of readdirSync48(t5, { withFileTypes: true })) {
216990
+ for (const d2 of readdirSync49(t5, { withFileTypes: true })) {
216770
216991
  if (d2.isDirectory()) targets.push(pathJoin3(t5, d2.name, "index.ts"));
216771
216992
  }
216772
216993
  }
@@ -870,10 +870,11 @@ A source with many top-tab pages (33 in one migration) converts to this arrangem
870
870
  - `appEditor.outline.*` icons with no Himi name (lightning, rocket, light bulb, megaphone,
871
871
  brochure, content card) need a fallback icon from `himi icons`, such as `star`,
872
872
  `bell` or `doc`. Record each fallback as an adaptation.
873
- - A source `goToScreen` to a page that is now a **tab** must select that tab. A descriptor
874
- `himi.open` pushes a second copy of the page instead, so give static pages a small nav
875
- worker whose action calls `navigate(s, { tab: "<tabId>" })`. A `goToScreen` to a page
876
- in More can use `himi.open`.
873
+ - A source `goToScreen` to a page that is now a **tab** must select that tab. `himi one-app generate`
874
+ writes it as a `himi.tab` action with the tab's id (the id `apply-navigation` gives the tab), because
875
+ `himi.open` would push a second copy of the page. Write the same `himi.tab` action (or a worker action that
876
+ calls `navigate(s, { tab: "<tabId>" })`) for a link you add by hand. A `goToScreen` to a page in More can use
877
+ `himi.open`. The link names its layout item by ID or by slug; a slug two items share names neither.
877
878
  - A `goToScreen` whose layout item does not exist does nothing in the source. Keep it a
878
879
  no-op (a worker action that returns the state unchanged) and list it as an unresolved
879
880
  route.
@@ -1039,6 +1040,14 @@ review and the hash-verified collected source, checks decisions and site binding
1039
1040
  and creates nothing. A passing check validates the recorded plan, not the truth
1040
1041
  of merchant readiness. The review's original manifest hash describes the initial
1041
1042
  template; edit the review without rewriting collected evidence or manifest hashes.
1043
+ When the review has an online-paid flow, `validate-payments` also reports an `ownerSteps`
1044
+ entry (`checkout_client_headless_oauth`): Wix opens its hosted checkout only for an OAuth
1045
+ client that is a Headless OAuth app, and the One App's own client is not one. Creating
1046
+ that client happens on the site owner's Wix account, so it is the owner's step (the
1047
+ dashboard OAuth settings, or `himi site client ensure --site <msid> --yes
1048
+ --write-provisioning` run with the owner's own account); the migration never creates it
1049
+ and an agent must not without the owner's consent. Until it exists a member who taps Join
1050
+ sees that paying in the app is not available yet, and no order is created on the site.
1042
1051
  Keep the decision, resulting target controls and controlled runtime evidence in
1043
1052
  the reconstruction plan and migration report. For all paid flows, handle the exact
1044
1053
  structured `SITE_NOT_ACCEPTING_PAYMENTS` failure with clear recovery; unrelated
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wix/himalaya-cli",
3
- "version": "0.1650.0",
3
+ "version": "0.1652.0",
4
4
  "type": "module",
5
5
  "description": "himi — the Himalaya authoring CLI. Build a Tier-5 content package on your own machine, push it to the production serve as a draft, preview it on web + Himi Player, and read worker logs back — the remote dev loop. Wraps @himalaya/serve-cli for transport.",
6
6
  "keywords": [
@@ -72,5 +72,5 @@
72
72
  "artifactId": "himalaya-cli"
73
73
  }
74
74
  },
75
- "falconPackageHash": "bcec9a95f0631d24c20e93c5c1060a682f95cdc769d989003b8e33ce"
75
+ "falconPackageHash": "c56d60a23b79f5da115aa04ba595990db3e2e1a72390c30d752fd66d"
76
76
  }