@wix/himalaya-cli 0.1772.0 → 0.1774.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.
@@ -7,6 +7,8 @@ export interface OneAppPage {
7
7
  plainText: string;
8
8
  empty: boolean;
9
9
  normalizedWebsiteLinks: number;
10
+ /** What the document holds that the page leaves out, e.g. "video (2)": plugins the app cannot render yet. Empty when nothing is left out. */
11
+ gaps: string[];
10
12
  }
11
13
  export type OneAppPageContentError = Error & {
12
14
  code: "invalid" | "unsupported";
@@ -15,7 +17,8 @@ export type OneAppPageContentError = Error & {
15
17
  export declare function oneAppPageContentErrorCode(error: unknown): "invalid" | "unsupported" | undefined;
16
18
  /** Validate a UUID source page selector before constructing a Pages read. */
17
19
  export declare const isOneAppPageId: (value: unknown) => value is string;
18
- /** Decode the exact Pages response; malformed, mismatched and unsupported documents throw.
20
+ /** Decode the exact Pages response; malformed, mismatched and unsupported documents throw. A legacy draft plugin the
21
+ * app cannot render does not: the page keeps the rest and lists the plugin in `gaps`.
19
22
  * A real empty document succeeds with empty=true. Renderer media sizing and link sanitization
20
23
  * use the existing bounded RichContent encoder on every format. */
21
24
  export declare function decodeOneAppPage(response: unknown, expectedPageId: string): OneAppPage;
@@ -1599,7 +1599,20 @@ function normalizeWebsiteLinks(nodes) {
1599
1599
  }
1600
1600
  return changed;
1601
1601
  }
1602
- function draftDocument(value) {
1602
+ function draftImageSrc(data) {
1603
+ const src = data.src ?? data.url;
1604
+ if (typeof src === "string") return src ? { url: src } : void 0;
1605
+ const media = object(src);
1606
+ if (typeof media.url === "string" && media.url) return { url: media.url };
1607
+ const id2 = media.id ?? media.file_name;
1608
+ return typeof id2 === "string" && id2 ? { id: id2 } : void 0;
1609
+ }
1610
+ var DRAFT_PLUGIN_LABELS = {
1611
+ "wix-draft-plugin-video": "video",
1612
+ "wix-draft-plugin-file-upload": "file download",
1613
+ "wix-draft-plugin-gallery": "gallery"
1614
+ };
1615
+ function draftDocument(value, skipped) {
1603
1616
  const draft = object(value);
1604
1617
  if (!Array.isArray(draft.blocks) || draft.blocks.length > 5e3) return invalid();
1605
1618
  if (draft.entityMap !== void 0 && (!draft.entityMap || typeof draft.entityMap !== "object" || Array.isArray(draft.entityMap))) return invalid();
@@ -1621,10 +1634,22 @@ function draftDocument(value) {
1621
1634
  if (ranges.length !== 1) return unsupported();
1622
1635
  const entity = object(entities[String(object(ranges[0]).key)]);
1623
1636
  const data = object(entity.data);
1624
- if (entity.type !== "IMAGE" && entity.type !== "wix-draft-plugin-image") return unsupported();
1625
- const url = data.src ?? data.url;
1626
- if (typeof url !== "string" || !url) return invalid();
1627
- nodes.push({ type: "IMAGE", imageData: { image: { src: { url }, ...typeof data.width === "number" ? { width: data.width } : {}, ...typeof data.height === "number" ? { height: data.height } : {} }, ...typeof data.alt === "string" ? { altText: data.alt } : {} } });
1637
+ if (entity.type !== "IMAGE" && entity.type !== "wix-draft-plugin-image") {
1638
+ const label = DRAFT_PLUGIN_LABELS[String(entity.type)] ?? `plugin ${String(entity.type)}`;
1639
+ skipped.set(label, (skipped.get(label) ?? 0) + 1);
1640
+ continue;
1641
+ }
1642
+ const src = draftImageSrc(data);
1643
+ if (!src) return invalid();
1644
+ const size = (key) => [data[key], object(data.src)[key]].find((v) => typeof v === "number");
1645
+ const [width, height] = [size("width"), size("height")];
1646
+ const alt = data.alt ?? object(data.metadata).alt;
1647
+ const link = object(object(data.config).link).url;
1648
+ nodes.push({ type: "IMAGE", imageData: {
1649
+ image: { src, ...width !== void 0 ? { width } : {}, ...height !== void 0 ? { height } : {} },
1650
+ ...typeof alt === "string" ? { altText: alt } : {},
1651
+ ...typeof link === "string" && link ? { link: { url: link } } : {}
1652
+ } });
1628
1653
  continue;
1629
1654
  }
1630
1655
  const cuts = [.../* @__PURE__ */ new Set([0, text2.length, ...spans.flatMap((s2) => [Number(s2.offset), Number(s2.offset) + Number(s2.length)])])].sort((a, b) => a - b);
@@ -1651,6 +1676,8 @@ function draftDocument(value) {
1651
1676
  const list = last?.type === type ? last : { type, nodes: [] };
1652
1677
  if (last !== list) nodes.push(list);
1653
1678
  list.nodes?.push({ type: "LIST_ITEM", nodes: [paragraph] });
1679
+ } else if (block2.type === "blockquote") {
1680
+ nodes.push({ type: "BLOCKQUOTE", nodes: [paragraph] });
1654
1681
  } else if (/^header-(one|two|three|four|five|six)$/.test(String(block2.type))) {
1655
1682
  nodes.push({ type: "HEADING", headingData: { level: ["one", "two", "three", "four", "five", "six"].indexOf(String(block2.type).slice(7)) + 1 }, nodes: runs });
1656
1683
  } else if (block2.type === "unstyled" || block2.type === "paragraph" || block2.type === void 0) nodes.push(paragraph);
@@ -1664,6 +1691,7 @@ function decodeOneAppPage(response, expectedPageId) {
1664
1691
  const raw = body.content;
1665
1692
  if (richContentOverLimits(raw, null)) return invalid();
1666
1693
  let document;
1694
+ const skipped = /* @__PURE__ */ new Map();
1667
1695
  const contentType = body.contentType;
1668
1696
  if (contentType === "PLAIN_TEXT") document = plainTextToRicos(raw);
1669
1697
  else if (contentType === "RICH_CONTENT" || contentType === "DRAFTJS") {
@@ -1674,7 +1702,7 @@ function decodeOneAppPage(response, expectedPageId) {
1674
1702
  return invalid();
1675
1703
  }
1676
1704
  if (richContentOverLimits(raw, parsed)) return invalid();
1677
- if (contentType === "DRAFTJS") document = draftDocument(parsed);
1705
+ if (contentType === "DRAFTJS") document = draftDocument(parsed, skipped);
1678
1706
  else {
1679
1707
  if (!Array.isArray(object(parsed).nodes)) return invalid();
1680
1708
  document = parsed;
@@ -1685,6 +1713,8 @@ function decodeOneAppPage(response, expectedPageId) {
1685
1713
  return typeof n.type === "string" && n.type.length > 0 && (n.type !== "TEXT" || typeof object(n.textData).text === "string") && (n.nodes === void 0 || Array.isArray(n.nodes) && validNodes(n.nodes));
1686
1714
  });
1687
1715
  if (!validNodes(document.nodes)) return invalid();
1716
+ const authored = document.nodes.some((n) => n.type !== "PARAGRAPH" || (n.nodes ?? []).some((c) => c.type !== "TEXT" || !!c.textData?.text?.trim()));
1717
+ if (skipped.size && !authored) return unsupported();
1688
1718
  const normalizedWebsiteLinks = normalizeWebsiteLinks(document.nodes);
1689
1719
  let encoded;
1690
1720
  try {
@@ -1694,9 +1724,17 @@ function decodeOneAppPage(response, expectedPageId) {
1694
1724
  }
1695
1725
  if (encoded.rejected) return invalid();
1696
1726
  const plainText = ricosToPlainText(document);
1697
- const authored = document.nodes.some((n) => n.type !== "PARAGRAPH" || (n.nodes ?? []).some((c) => c.type !== "TEXT" || !!c.textData?.text?.trim()));
1698
1727
  if (!encoded.json && authored) return unsupported();
1699
- return { pageId: expectedPageId, title: typeof content.title === "string" ? content.title : "", contentType, documentJson: encoded.json, plainText, empty: !authored, normalizedWebsiteLinks };
1728
+ return {
1729
+ pageId: expectedPageId,
1730
+ title: typeof content.title === "string" ? content.title : "",
1731
+ contentType,
1732
+ documentJson: encoded.json,
1733
+ plainText,
1734
+ empty: !authored,
1735
+ normalizedWebsiteLinks,
1736
+ gaps: [...skipped].map(([label, count]) => `${label} (${count})`)
1737
+ };
1700
1738
  }
1701
1739
  function oneAppPageSection(page2, options) {
1702
1740
  if (!options.id) throw new Error("oneAppPageSection requires a stable placement id");
package/dist/cli.mjs CHANGED
@@ -185017,6 +185017,14 @@ var init_js_yaml = __esm({
185017
185017
  }
185018
185018
  });
185019
185019
 
185020
+ // ../mobile-dist/dist-contract-merge.ts
185021
+ var init_dist_contract_merge = __esm({
185022
+ "../mobile-dist/dist-contract-merge.ts"() {
185023
+ init_define_HHP_CATALOG();
185024
+ init_binding_spellings();
185025
+ }
185026
+ });
185027
+
185020
185028
  // ../auth-bake/release-auth.ts
185021
185029
  function effectiveAuthProvider(appConfig, capabilities) {
185022
185030
  const provider = appConfig.authConfig?.providerId;
@@ -185027,6 +185035,7 @@ var SHELL_PROVIDER;
185027
185035
  var init_release_auth = __esm({
185028
185036
  "../auth-bake/release-auth.ts"() {
185029
185037
  init_define_HHP_CATALOG();
185038
+ init_dist_contract_merge();
185030
185039
  SHELL_PROVIDER = "the shell's provider";
185031
185040
  }
185032
185041
  });
@@ -268517,7 +268526,15 @@ function normalizeWebsiteLinks(nodes2) {
268517
268526
  }
268518
268527
  return changed;
268519
268528
  }
268520
- function draftDocument(value2) {
268529
+ function draftImageSrc(data) {
268530
+ const src = data.src ?? data.url;
268531
+ if (typeof src === "string") return src ? { url: src } : void 0;
268532
+ const media = object13(src);
268533
+ if (typeof media.url === "string" && media.url) return { url: media.url };
268534
+ const id = media.id ?? media.file_name;
268535
+ return typeof id === "string" && id ? { id } : void 0;
268536
+ }
268537
+ function draftDocument(value2, skipped) {
268521
268538
  const draft = object13(value2);
268522
268539
  if (!Array.isArray(draft.blocks) || draft.blocks.length > 5e3) return invalid3();
268523
268540
  if (draft.entityMap !== void 0 && (!draft.entityMap || typeof draft.entityMap !== "object" || Array.isArray(draft.entityMap))) return invalid3();
@@ -268539,10 +268556,22 @@ function draftDocument(value2) {
268539
268556
  if (ranges.length !== 1) return unsupported();
268540
268557
  const entity = object13(entities[String(object13(ranges[0]).key)]);
268541
268558
  const data = object13(entity.data);
268542
- if (entity.type !== "IMAGE" && entity.type !== "wix-draft-plugin-image") return unsupported();
268543
- const url = data.src ?? data.url;
268544
- if (typeof url !== "string" || !url) return invalid3();
268545
- nodes2.push({ type: "IMAGE", imageData: { image: { src: { url }, ...typeof data.width === "number" ? { width: data.width } : {}, ...typeof data.height === "number" ? { height: data.height } : {} }, ...typeof data.alt === "string" ? { altText: data.alt } : {} } });
268559
+ if (entity.type !== "IMAGE" && entity.type !== "wix-draft-plugin-image") {
268560
+ const label4 = DRAFT_PLUGIN_LABELS[String(entity.type)] ?? `plugin ${String(entity.type)}`;
268561
+ skipped.set(label4, (skipped.get(label4) ?? 0) + 1);
268562
+ continue;
268563
+ }
268564
+ const src = draftImageSrc(data);
268565
+ if (!src) return invalid3();
268566
+ const size = (key4) => [data[key4], object13(data.src)[key4]].find((v2) => typeof v2 === "number");
268567
+ const [width, height] = [size("width"), size("height")];
268568
+ const alt = data.alt ?? object13(data.metadata).alt;
268569
+ const link4 = object13(object13(data.config).link).url;
268570
+ nodes2.push({ type: "IMAGE", imageData: {
268571
+ image: { src, ...width !== void 0 ? { width } : {}, ...height !== void 0 ? { height } : {} },
268572
+ ...typeof alt === "string" ? { altText: alt } : {},
268573
+ ...typeof link4 === "string" && link4 ? { link: { url: link4 } } : {}
268574
+ } });
268546
268575
  continue;
268547
268576
  }
268548
268577
  const cuts = [.../* @__PURE__ */ new Set([0, text32.length, ...spans.flatMap((s5) => [Number(s5.offset), Number(s5.offset) + Number(s5.length)])])].sort((a3, b3) => a3 - b3);
@@ -268569,6 +268598,8 @@ function draftDocument(value2) {
268569
268598
  const list5 = last?.type === type2 ? last : { type: type2, nodes: [] };
268570
268599
  if (last !== list5) nodes2.push(list5);
268571
268600
  list5.nodes?.push({ type: "LIST_ITEM", nodes: [paragraph] });
268601
+ } else if (block.type === "blockquote") {
268602
+ nodes2.push({ type: "BLOCKQUOTE", nodes: [paragraph] });
268572
268603
  } else if (/^header-(one|two|three|four|five|six)$/.test(String(block.type))) {
268573
268604
  nodes2.push({ type: "HEADING", headingData: { level: ["one", "two", "three", "four", "five", "six"].indexOf(String(block.type).slice(7)) + 1 }, nodes: runs });
268574
268605
  } else if (block.type === "unstyled" || block.type === "paragraph" || block.type === void 0) nodes2.push(paragraph);
@@ -268582,6 +268613,7 @@ function decodeOneAppPage(response, expectedPageId) {
268582
268613
  const raw = body.content;
268583
268614
  if (richContentOverLimits(raw, null)) return invalid3();
268584
268615
  let document2;
268616
+ const skipped = /* @__PURE__ */ new Map();
268585
268617
  const contentType = body.contentType;
268586
268618
  if (contentType === "PLAIN_TEXT") document2 = plainTextToRicos(raw);
268587
268619
  else if (contentType === "RICH_CONTENT" || contentType === "DRAFTJS") {
@@ -268592,7 +268624,7 @@ function decodeOneAppPage(response, expectedPageId) {
268592
268624
  return invalid3();
268593
268625
  }
268594
268626
  if (richContentOverLimits(raw, parsed)) return invalid3();
268595
- if (contentType === "DRAFTJS") document2 = draftDocument(parsed);
268627
+ if (contentType === "DRAFTJS") document2 = draftDocument(parsed, skipped);
268596
268628
  else {
268597
268629
  if (!Array.isArray(object13(parsed).nodes)) return invalid3();
268598
268630
  document2 = parsed;
@@ -268603,6 +268635,8 @@ function decodeOneAppPage(response, expectedPageId) {
268603
268635
  return typeof n2.type === "string" && n2.type.length > 0 && (n2.type !== "TEXT" || typeof object13(n2.textData).text === "string") && (n2.nodes === void 0 || Array.isArray(n2.nodes) && validNodes(n2.nodes));
268604
268636
  });
268605
268637
  if (!validNodes(document2.nodes)) return invalid3();
268638
+ const authored2 = document2.nodes.some((n2) => n2.type !== "PARAGRAPH" || (n2.nodes ?? []).some((c2) => c2.type !== "TEXT" || !!c2.textData?.text?.trim()));
268639
+ if (skipped.size && !authored2) return unsupported();
268606
268640
  const normalizedWebsiteLinks = normalizeWebsiteLinks(document2.nodes);
268607
268641
  let encoded3;
268608
268642
  try {
@@ -268612,9 +268646,17 @@ function decodeOneAppPage(response, expectedPageId) {
268612
268646
  }
268613
268647
  if (encoded3.rejected) return invalid3();
268614
268648
  const plainText3 = ricosToPlainText(document2);
268615
- const authored2 = document2.nodes.some((n2) => n2.type !== "PARAGRAPH" || (n2.nodes ?? []).some((c2) => c2.type !== "TEXT" || !!c2.textData?.text?.trim()));
268616
268649
  if (!encoded3.json && authored2) return unsupported();
268617
- return { pageId: expectedPageId, title: typeof content.title === "string" ? content.title : "", contentType, documentJson: encoded3.json, plainText: plainText3, empty: !authored2, normalizedWebsiteLinks };
268650
+ return {
268651
+ pageId: expectedPageId,
268652
+ title: typeof content.title === "string" ? content.title : "",
268653
+ contentType,
268654
+ documentJson: encoded3.json,
268655
+ plainText: plainText3,
268656
+ empty: !authored2,
268657
+ normalizedWebsiteLinks,
268658
+ gaps: [...skipped].map(([label4, count3]) => `${label4} (${count3})`)
268659
+ };
268618
268660
  }
268619
268661
  function oneAppPageSection(page, options2) {
268620
268662
  if (!options2.id) throw new Error("oneAppPageSection requires a stable placement id");
@@ -268626,7 +268668,7 @@ function oneAppPageSection(page, options2) {
268626
268668
  documentJson: page.documentJson
268627
268669
  } } };
268628
268670
  }
268629
- var failure2, object13, invalid3, unsupported, isOneAppPageId;
268671
+ var failure2, object13, invalid3, unsupported, isOneAppPageId, DRAFT_PLUGIN_LABELS;
268630
268672
  var init_one_app_page = __esm({
268631
268673
  "../../stdlib/flows/screens/src/one-app-page.ts"() {
268632
268674
  init_define_HHP_CATALOG();
@@ -268638,6 +268680,11 @@ var init_one_app_page = __esm({
268638
268680
  invalid3 = () => failure2("invalid", "The referenced page returned malformed content.");
268639
268681
  unsupported = () => failure2("unsupported", "The referenced page uses an unsupported content format.");
268640
268682
  isOneAppPageId = (value2) => typeof value2 === "string" && /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i.test(value2);
268683
+ DRAFT_PLUGIN_LABELS = {
268684
+ "wix-draft-plugin-video": "video",
268685
+ "wix-draft-plugin-file-upload": "file download",
268686
+ "wix-draft-plugin-gallery": "gallery"
268687
+ };
268641
268688
  }
268642
268689
  });
268643
268690
 
@@ -268692,7 +268739,10 @@ async function collectOneAppPages(raw, source2, read2) {
268692
268739
  }
268693
268740
  const captured = documents.get(pageId2);
268694
268741
  placement.state = captured.state;
268695
- if (captured.page) placement.component = oneAppPageSection(captured.page, { id: `one_app_page_${hash2(placement.sourcePointer).slice(0, 16)}` });
268742
+ if (captured.page) {
268743
+ placement.component = oneAppPageSection(captured.page, { id: `one_app_page_${hash2(placement.sourcePointer).slice(0, 16)}` });
268744
+ if (captured.page.gaps.length) placement.gaps = captured.page.gaps;
268745
+ }
268696
268746
  }
268697
268747
  return { version: 1, source: source2, placements, documents: [...documents.values()] };
268698
268748
  }
@@ -270050,7 +270100,8 @@ function generateScreens(input) {
270050
270100
  const hidden = obj11(obj11(layoutItems[layoutItemId ?? ""]).settings).hideFromNavigation === true;
270051
270101
  return layoutItemId && !hidden ? [{ layoutItemId, label: str16(tab.title).trim(), icon: str16(tab.icon) }] : [];
270052
270102
  }) : [];
270053
- addNavigation(out2, ownTabs.length ? { target: { tabs: ownTabs, overflow: ownTabs.length > BOTTOM_TABS_BEFORE_MORE + 1 } } : planned2, taken2);
270103
+ const pageIconOf = (layoutItemId) => arr(obj11(layoutItems[layoutItemId]).elements).map(obj11).map((element) => PAGE_TYPE_ICONS[str16(obj11(sections2[str16(element.elementId)]).sectionDefinitionId)]).find(Boolean);
270104
+ addNavigation(out2, ownTabs.length ? { target: { tabs: ownTabs, overflow: ownTabs.length > BOTTOM_TABS_BEFORE_MORE + 1 } } : planned2, taken2, pageIconOf);
270054
270105
  resolveRoutePlaceholders(out2, fellBack, slugs, hasTabBar, pageOfScreen, forumOnly);
270055
270106
  const navTitle = /* @__PURE__ */ new Map();
270056
270107
  for (const tab of ownTabs) if (!navTitle.has(tab.layoutItemId)) navTitle.set(tab.layoutItemId, tab.label);
@@ -270167,7 +270218,7 @@ function tabsFile(result, navigation) {
270167
270218
  pages: result.pages
270168
270219
  };
270169
270220
  }
270170
- function addNavigation(out2, plan, taken2) {
270221
+ function addNavigation(out2, plan, taken2, pageIconOf) {
270171
270222
  const plannedTabs = arr(obj11(plan.target).tabs).map(obj11);
270172
270223
  if (!plannedTabs.length) return;
270173
270224
  const routeOf = new Map(out2.routes.map((r3) => [r3.layoutItemId, r3]));
@@ -270187,10 +270238,11 @@ function addNavigation(out2, plan, taken2) {
270187
270238
  }
270188
270239
  const overflow = obj11(plan.target).overflow === true && tabs.length > BOTTOM_TABS_BEFORE_MORE + 1;
270189
270240
  const bottom = overflow ? tabs.slice(0, BOTTOM_TABS_BEFORE_MORE) : tabs;
270190
- for (const tab of bottom) {
270241
+ for (const [position, tab] of bottom.entries()) {
270191
270242
  const route = routeOf.get(str16(tab.layoutItemId));
270192
270243
  if (route?.screenId) {
270193
- out2.tabs.push({ layoutItemId: str16(tab.layoutItemId), label: str16(tab.label), ...str16(tab.icon) ? { icon: str16(tab.icon) } : {}, screenId: route.screenId });
270244
+ const pageIcon = position === 0 ? HOME_TAB_ICON : pageIconOf(str16(tab.layoutItemId));
270245
+ out2.tabs.push({ layoutItemId: str16(tab.layoutItemId), label: str16(tab.label), ...str16(tab.icon) ? { icon: str16(tab.icon) } : {}, ...pageIcon ? { pageIcon } : {}, screenId: route.screenId });
270194
270246
  if (route.openOnly) out2.gaps.push({ page: str16(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)` });
270195
270247
  } else out2.unmapped.push({ page: str16(tab.label), sectionId: "", sectionDefinitionId: "(navigation)", reason: "this tab's page has no screen to open" });
270196
270248
  }
@@ -270223,7 +270275,7 @@ function addNavigation(out2, plan, taken2) {
270223
270275
  out2.routes.push({ layoutItemId: "(more)", label: "More", screenId, kind: "generated" });
270224
270276
  out2.tabs.push({ layoutItemId: "(more)", label: "More", screenId });
270225
270277
  }
270226
- var TEMPLATE_HOME_SCREEN, TEMPLATE_SCREEN_PARAM_KEYS, SYSTEM_ALL_PRODUCTS_ID, collectionParams, TEMPLATE_PARAMS, countOf2, SCREEN_ADAPTATIONS, FALLBACK_TARGETS, NO_INLINE_SECTION, ROUTE_PLACEHOLDER, BOTTOM_TABS_BEFORE_MORE, TEMPLATE_VERTICALS, TEMPLATE_FALLBACKS, MODULES, obj11, arr, str16, node, text28, vstack, hstack, inset, openUrl2, youtubeIdOf, DIRECT_VIDEO_FILE, dialUrl, mailUrl, BUSINESS_CHAT_SCREEN, sourceTap, SUBSCRIPTIONS_MAX, selectedPlanIds, PROGRAMS_DEFAULT_LIMIT, PROGRAMS_INLINE_MAX, GALLERIES_INLINE_MAX, BLOG_HERO_MAX, BLOG_SEARCH_POSTS, SHOP_ALL, SERVICES_INLINE, UPCOMING_INLINE, PRODUCTS_INLINE, GROUP_FEED_POSTS_MAX, VIDEOS_INLINE_DEFAULT, VIDEOS_INLINE_MAX, SOCIAL_NETWORKS, HANDLERS, MERGED_PAGES_BUNDLE, chevron;
270278
+ var TEMPLATE_HOME_SCREEN, TEMPLATE_SCREEN_PARAM_KEYS, SYSTEM_ALL_PRODUCTS_ID, collectionParams, TEMPLATE_PARAMS, countOf2, SCREEN_ADAPTATIONS, FALLBACK_TARGETS, NO_INLINE_SECTION, ROUTE_PLACEHOLDER, BOTTOM_TABS_BEFORE_MORE, TEMPLATE_VERTICALS, PAGE_TYPE_ICONS, HOME_TAB_ICON, TEMPLATE_FALLBACKS, MODULES, obj11, arr, str16, node, text28, vstack, hstack, inset, openUrl2, youtubeIdOf, DIRECT_VIDEO_FILE, dialUrl, mailUrl, BUSINESS_CHAT_SCREEN, sourceTap, SUBSCRIPTIONS_MAX, selectedPlanIds, PROGRAMS_DEFAULT_LIMIT, PROGRAMS_INLINE_MAX, GALLERIES_INLINE_MAX, BLOG_HERO_MAX, BLOG_SEARCH_POSTS, SHOP_ALL, SERVICES_INLINE, UPCOMING_INLINE, PRODUCTS_INLINE, GROUP_FEED_POSTS_MAX, VIDEOS_INLINE_DEFAULT, VIDEOS_INLINE_MAX, SOCIAL_NETWORKS, HANDLERS, MERGED_PAGES_BUNDLE, chevron;
270227
270279
  var init_generate2 = __esm({
270228
270280
  "src/one-app/generate.ts"() {
270229
270281
  init_define_HHP_CATALOG();
@@ -270348,6 +270400,58 @@ var init_generate2 = __esm({
270348
270400
  vod_list_section: "himi_videos",
270349
270401
  bookings_agenda_section: "himi_agenda"
270350
270402
  };
270403
+ PAGE_TYPE_ICONS = {
270404
+ forum: "appEditor.outline.forum",
270405
+ groups_feed_section: "appEditor.outline.group",
270406
+ groups_list_section: "appEditor.outline.group",
270407
+ groups_cards_section: "appEditor.outline.group",
270408
+ events_carousel_section: "appEditor.outline.calendar",
270409
+ events_list_section: "appEditor.outline.calendar",
270410
+ events_schedule_section: "appEditor.outline.calendar",
270411
+ events_discussion_section: "appEditor.outline.calendar",
270412
+ events_guests_section: "appEditor.outline.calendar",
270413
+ newBlog_compact_post_list_vertical_section: "appEditor.outline.forum",
270414
+ newBlog_postlist_vertical_section: "appEditor.outline.forum",
270415
+ newBlog_postlist_carousel_full_section: "appEditor.outline.forum",
270416
+ newBlog_postlist_carousel_section: "appEditor.outline.forum",
270417
+ newBlog_category_list_vertical_section: "appEditor.outline.forum",
270418
+ newBlog_search_section: "appEditor.outline.forum",
270419
+ member_horizontal_list_section: "appEditor.outline.group",
270420
+ platform_general_members_section: "appEditor.outline.group",
270421
+ member_list_section: "appEditor.outline.group",
270422
+ memberships_plan_cards_carousel: "appEditor.outline.subscriptions",
270423
+ platform_paid_plans_section: "appEditor.outline.subscriptions",
270424
+ memberships_packages_section: "appEditor.outline.subscriptions",
270425
+ upcoming_bookings_section: "appEditor.outline.dates",
270426
+ bookings_agenda_section: "appEditor.outline.dates",
270427
+ bookings_services_list_section: "appEditor.outline.dates",
270428
+ platform_general_upcoming_section: "appEditor.outline.dates",
270429
+ performance_tracker_section: "appEditor.outline.lightning",
270430
+ stores_products_grid_section: "appEditor.outline.bag",
270431
+ stores_products_carousel_section: "appEditor.outline.bag",
270432
+ photoAlbums_list_section: "appEditor.outline.image",
270433
+ photoAlbums_carousel_section: "appEditor.outline.image",
270434
+ proGallery_gallery_list_section: "appEditor.outline.image",
270435
+ progallery_carousel_section: "appEditor.outline.image",
270436
+ achievements_list_section: "appEditor.outline.onlinePrograms",
270437
+ achievements_carousel_section: "appEditor.outline.onlinePrograms",
270438
+ achievements_participant_carousel_section: "appEditor.outline.onlinePrograms",
270439
+ woa_member_restaurants_order: "appEditor.outline.brochure",
270440
+ woa_member_restaurants_reservation: "appEditor.outline.reservations",
270441
+ reservations_section: "appEditor.outline.reservations",
270442
+ loyalty_status_section: "appEditor.outline.loyalty",
270443
+ loyalty_offering_section: "appEditor.outline.loyalty",
270444
+ vod_list_section: "appEditor.outline.video",
270445
+ vod_carousel_section: "appEditor.outline.video",
270446
+ platform_general_announcement_section: "appEditor.outline.home",
270447
+ podcasts_widget_section: "appEditor.outline.recording",
270448
+ forms_full_form_by_short_id: "appEditor.outline.forum",
270449
+ selections: "appEditor.outline.image",
270450
+ faq_list_section: "appEditor.outline.info",
270451
+ // Not in the One App's table (it would pick a random icon): a page of one group's feed is a groups page.
270452
+ single_group_feed_section: "appEditor.outline.group"
270453
+ };
270454
+ HOME_TAB_ICON = "appEditor.outline.home";
270351
270455
  TEMPLATE_FALLBACKS = { himi_groups_feed: "himi_groups" };
270352
270456
  MODULES = {
270353
270457
  programs: { file: "programs-section", register: "registerProgramsSection", capabilities: ["wix_api", "iap", "app_info"] },
@@ -270751,7 +270855,11 @@ var init_generate2 = __esm({
270751
270855
  },
270752
270856
  pages_section: (id, _s2, _st, index, ctx, elementId) => {
270753
270857
  const placement = ctx.placements.get(`${ctx.page.layoutItemId}:${elementId}:${index}`);
270754
- if (placement?.state === "ready" && placement.component) return vstack(`${id}.box`, [placement.component], 0, inset(8, 8));
270858
+ if (placement?.state === "ready" && placement.component) {
270859
+ const left = arr(placement.gaps).map(str16).filter(Boolean);
270860
+ if (left.length) ctx.gap(elementId, "pages_section", `the Pages document has content the section cannot show (${left.join(", ")}); its text and images are shown without it`);
270861
+ return vstack(`${id}.box`, [placement.component], 0, inset(8, 8));
270862
+ }
270755
270863
  return ctx.unsupported(elementId, "pages_section", placement ? `its Pages document is not ready in pages-content.json (state "${str16(placement.state)}")` : "its Pages document is not in pages-content.json: re-run `himi one-app migrate` to collect it");
270756
270864
  },
270757
270865
  // The site's services as rows that open the service, with a See All button to the services screen. The source section has no settings
@@ -271741,12 +271849,15 @@ function pagesWithoutScreen(plan, planned2) {
271741
271849
  for (const page of planned2) if (!have.get(page.layoutItemId)?.screenId && !omitted(page.layoutItemId)) missing4.set(page.layoutItemId, page.label);
271742
271850
  return [...missing4].map(([layoutItemId, page]) => ({ page, layoutItemId }));
271743
271851
  }
271744
- function tabIcon(source2) {
271852
+ function catalogIcon(source2) {
271745
271853
  const last = (source2 ?? "").split(".").pop() ?? "";
271746
271854
  const normalized2 = last.toLowerCase().replace(/[_.\s-]/g, "");
271747
271855
  const indexed2 = ICON_NORMALIZED_INDEX[normalized2];
271748
- const found = (indexed2 !== ICON_FALLBACK ? indexed2 : void 0) ?? SOURCE_ICON_ALIASES[normalized2];
271749
- const icon = found ?? FALLBACK_ICON;
271856
+ return (indexed2 !== ICON_FALLBACK ? indexed2 : void 0) ?? SOURCE_ICON_ALIASES[normalized2];
271857
+ }
271858
+ function tabIcon(source2, pageIcon) {
271859
+ const found = catalogIcon(source2);
271860
+ const icon = found ?? catalogIcon(pageIcon) ?? FALLBACK_ICON;
271750
271861
  const filled2 = `${icon}_fill`;
271751
271862
  return { icon, ...ICON_NAMES.includes(filled2) ? { selectedIcon: filled2 } : {}, resolved: !!found };
271752
271863
  }
@@ -271775,7 +271886,7 @@ function applyNavigationToConfig(source2, plan, fileName = "config.ts") {
271775
271886
  const tabs = plan.tabs.map((tab) => ({ tab, id: tabIdFor(tab, taken2) }));
271776
271887
  const moreId = tabs.find(({ tab }) => tab.layoutItemId === "(more)")?.id;
271777
271888
  const written = tabs.map(({ tab, id }) => {
271778
- const icon = tabIcon(tab.icon);
271889
+ const icon = tabIcon(tab.icon, tab.pageIcon);
271779
271890
  return { id, screenId: tab.screenId, label: tab.label.trim(), icon: icon.icon, ...icon.selectedIcon ? { selectedIcon: icon.selectedIcon } : {} };
271780
271891
  });
271781
271892
  const splices = [{ at: items.getStart(file2), end: items.end, text: indentedJson(written, file2, items) }];
@@ -271910,7 +272021,7 @@ async function runOneAppApplyNavigation(args, io2) {
271910
272021
  const edit = applyNavigationToConfig(readFileSync178(configPath, "utf8"), plan);
271911
272022
  if (edit.status === "kept") return report6(io2, false, { code: "config_unwritable", error: edit.reason, tabs: plan.tabs });
271912
272023
  if (edit.status === "set" && !options2.dryRun) writeFileAtomic(configPath, edit.source);
271913
- const icons = plan.tabs.filter((tab) => tab.layoutItemId !== "(more)").map((tab) => ({ tab: tab.label, source: tab.icon ?? null, ...tabIcon(tab.icon) }));
272024
+ const icons = plan.tabs.filter((tab) => tab.layoutItemId !== "(more)").map((tab) => ({ tab: tab.label, source: tab.icon ?? null, ...tabIcon(tab.icon, tab.pageIcon) }));
271914
272025
  const homeGap = screens.has(TEMPLATE_HOME_SCREEN) && plan.tabs[0] && plan.tabs[0].screenId !== TEMPLATE_HOME_SCREEN ? [`the first tab opens ${plan.tabs[0].screenId}, not ${TEMPLATE_HOME_SCREEN}: the Android app, the drawer's Home row and "Not available \u2192 Home" still open the template's Home (sample content)`] : [];
271915
272026
  return report6(io2, true, {
271916
272027
  navigation: edit.status,
@@ -271957,7 +272068,20 @@ var init_apply_navigation = __esm({
271957
272068
  stores: "bag",
271958
272069
  products: "bag",
271959
272070
  gallery: "photo",
271960
- gifts: "gift"
272071
+ gifts: "gift",
272072
+ // The rest of the One App's own tab icons (catalyst-server DefaultIcons.scala) and the glyphs it picks at random for a tab with
272073
+ // nothing to decide it: the nearest of ours, since a source app stores whichever it drew.
272074
+ subscriptions: "ticket",
272075
+ loyalty: "gift",
272076
+ video: "play_circle",
272077
+ recording: "mic",
272078
+ reservations: "clock",
272079
+ brochure: "doc",
272080
+ lightning: "star",
272081
+ lightbulb: "info",
272082
+ rocket: "paper_plane",
272083
+ contentcard: "doc",
272084
+ megaphone: "bell"
271961
272085
  };
271962
272086
  FALLBACK_ICON = "list";
271963
272087
  objectOf = (node3) => {
@@ -288196,6 +288320,17 @@ function distJobOutcome(record5, readAfterBuildEnded = true) {
288196
288320
  function distStatusExitCode(readOk, record5) {
288197
288321
  return readOk && distJobOutcome(record5, false) !== "failed" ? 0 : 1;
288198
288322
  }
288323
+ function distInstallPageUrl(origin, jobs) {
288324
+ const job = jobs.find((j2) => j2.status === "SUCCESS" && typeof j2.jobId === "string" && j2.jobId);
288325
+ if (!job) return void 0;
288326
+ try {
288327
+ const host = new URL(origin).hostname.toLowerCase().replace(/^\[|\]$/g, "");
288328
+ if (["localhost", "127.0.0.1", "::1", "bo.wix.com", "wix-bo.com"].includes(host)) return void 0;
288329
+ } catch {
288330
+ return void 0;
288331
+ }
288332
+ return `${origin.replace(/\/+$/, "")}/v1/dist/${encodeURIComponent(String(job.jobId))}/page`;
288333
+ }
288199
288334
  async function distCommand(ctx) {
288200
288335
  const { io: io2, pos, flags, print, targetName: targetName2, client: client4, serveBase } = ctx;
288201
288336
  const sub = pos[1];
@@ -288300,6 +288435,10 @@ ${label4}`);
288300
288435
  for (const job of jobsToPrint) {
288301
288436
  if (job.status === "SUCCESS") await printDistQrForJob(job, app2);
288302
288437
  }
288438
+ const pageUrl = distInstallPageUrl(serveBase(), jobsToPrint);
288439
+ if (pageUrl) io2.log(`
288440
+ Install page (iOS + Android, share this one)
288441
+ ${pageUrl}`);
288303
288442
  };
288304
288443
  const distTarget = targetName2();
288305
288444
  const distUnreachable = (e2) => {
@@ -896,8 +896,10 @@ or malformed selectors/content), `unsupported`, `forbidden`, `unauthorized`,
896
896
  `not_found` and `unavailable` remain distinct gaps. A failed document has no
897
897
  emitted component. Preserve the gap and resolve it before claiming its coverage;
898
898
  never substitute an empty paragraph, demo copy or owner read. Supported DraftJS
899
- text, styled links, flat lists, headings and images are converted; nested lists
900
- and unknown plugins remain explicit `unsupported` gaps.
899
+ text, styled links, flat lists, headings, quotes and images (including the image plugin's media object) are
900
+ converted. A plugin the app cannot render (file, video, gallery, unknown) is left out: the placement stays `ready`,
901
+ lists it in `gaps` (for example `video (2)`), and `generate` reports it as a `pages_section` gap. A document holding
902
+ only such plugins, and nested lists, remain explicit `unsupported` gaps.
901
903
 
902
904
  This reconstruction captures editorial presentation only. Changing catalogs,
903
905
  transactions and member records remain live. It uses the existing cross-platform
@@ -1548,8 +1550,32 @@ written: a bar that silently lacks a source page is not the source's navigation.
1548
1550
  `unmapped` and run it again. No placeholder screen is added for them.
1549
1551
 
1550
1552
  A tab for a screen the app does not define is refused with `screen_missing` and nothing is written: write the generated
1551
- screens first, and keep any template screen a tab opens when you trim. A source icon with no catalog match is reported
1552
- under `gaps` and gets a neutral icon; choose a better one in `config.ts`. The drawer is not touched.
1553
+ screens first, and keep any template screen a tab opens when you trim. The One App's own tab icon names
1554
+ resolve to the catalog (`subscriptions` is a ticket, `loyalty` a gift, `video` a play button, `recording` a microphone, `dates` a
1555
+ calendar ...). A tab whose source icon is missing or has no catalog match gets the One App's default for its page: the first tab is
1556
+ home, otherwise the first section on the page that has an entry below decides, and a page with none gets the neutral `list` icon.
1557
+ Each tab that did not keep its source icon is reported under `gaps` (`no catalog icon for <source>, using <icon>`); change one in
1558
+ `config.ts` when the source meant another.
1559
+
1560
+ | Icon | First section that decides |
1561
+ | --- | --- |
1562
+ | `calendar` | events (carousel, list, schedule, discussion, guests); bookings agenda, services list and upcoming bookings; the general upcoming section |
1563
+ | `ticket` | paid plans, plan cards, memberships and packages |
1564
+ | `people` | groups (list, cards, feed, a single group's feed), members (list, horizontal list, general) |
1565
+ | `chat` | blog (every list, carousel, category and search section), forms, forum |
1566
+ | `bag` | stores products grid and carousel |
1567
+ | `image` | photo albums, Pro Gallery lists and carousels, selections |
1568
+ | `book` | programs (list, carousel, participant carousel) |
1569
+ | `doc` | restaurant online ordering |
1570
+ | `clock` | restaurant reservations and the reservations section |
1571
+ | `gift` | loyalty status and offering |
1572
+ | `play_circle` | Wix Video lists and carousels |
1573
+ | `mic` | podcasts |
1574
+ | `info` | FAQ |
1575
+ | `home` | the announcement section (and every first tab) |
1576
+ | `star` | the performance tracker |
1577
+
1578
+ The drawer is not touched.
1553
1579
 
1554
1580
  Check `homeScreenId` and any `himi.open` target that still names a template screen (`"home"`, `"profile"`):
1555
1581
  it must be a screen your `SCREENS` map defines, and the first tab's screen is the one the app should open on. With the
@@ -363,6 +363,16 @@ immediately plus a Buildkite URL for the live log. Waiting is the right shape fo
363
363
  `--no-wait` is what makes fan-out cheap — the pool parallelises, so 31 templates dispatched together finished in about
364
364
  the same wall-clock as one (measured: ~11 min for 31, median 4.1 min each).
365
365
 
366
+ **One install page per run.** After the per-platform QR codes, an interactive `himi dist` also
367
+ prints a shareable **install page**, `<serve origin>/v1/dist/<jobId>/page`. Any job id from the run
368
+ opens it, and it shows the run's iOS and Android builds side by side: a one-tap install button, a QR
369
+ code, release, build time, size and link expiry for each, and a plain explanation instead of a button
370
+ when a platform is still building, failed, expired, is an App Store or Play-bundle build, or was not
371
+ part of the run. On a phone the reader's own platform comes first. The route is public, like the
372
+ `/v1/dist/<jobId>/install` redirect the terminal QR codes encode (the job id is the bearer link), and
373
+ it links only to the presigned URLs the JSON routes already return. It is not printed with `--json`,
374
+ or when the serve origin is local or BO, which a phone cannot reach.
375
+
366
376
  **Typical durations**, dispatch → installable artifact, measured 2026-08-22 on a warm pool:
367
377
  iOS **~4 min** (median 4.1 over 31 builds), Android **~3.6 min**. A cold checkout adds a few
368
378
  minutes. If an iOS leg dies in well under 4 minutes it never reached the archive — see the
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wix/himalaya-cli",
3
- "version": "0.1772.0",
3
+ "version": "0.1774.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": [
@@ -82,5 +82,5 @@
82
82
  "artifactId": "himalaya-cli"
83
83
  }
84
84
  },
85
- "falconPackageHash": "34c24f13e5a84869f63b5d5116175c72f45d5abaef41ffcd30c0e1ef"
85
+ "falconPackageHash": "5af2413e0e3de9fc421f9f546de0c7a55aa511713c79b318727b94a8"
86
86
  }