@wix/himalaya-cli 0.1837.0 → 0.1838.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.
Files changed (2) hide show
  1. package/dist/cli.mjs +33 -8
  2. package/package.json +2 -2
package/dist/cli.mjs CHANGED
@@ -4445,6 +4445,7 @@ var init_himi_package = __esm({
4445
4445
  var ICON_VIEW_BOX, ICON_STROKE_WIDTH, ICON_FALLBACK, ICON_CATALOG, ICON_NORMALIZED_INDEX, ICON_NAMES;
4446
4446
  var init_icon_catalog_generated = __esm({
4447
4447
  "../../core/ts/src/icon-catalog.generated.ts"() {
4448
+ "use strict";
4448
4449
  init_define_HHP_CATALOG();
4449
4450
  ICON_VIEW_BOX = 24;
4450
4451
  ICON_STROKE_WIDTH = 2;
@@ -8453,7 +8454,6 @@ function assertExternalUrl(site, value2, where) {
8453
8454
  var WIX_FREE_SITE_HOST_SUFFIXES, SITE_KINDS, SITE_LAYOUTS, SITE_PAGE_TITLES, SITE_TOP_BAR_MAX_ACTIONS, SITE_BUILTIN_NATIVE_SCREENS, SITE_PRIVATE_NATIVE_SCREENS, SITE_SHELL_MAX_TABS, SITE_SCREEN_PREFIX, SITE_PAGE_SCREEN_ID, BASE44_ORIGINS, PAGE_ID, SITE_PAGE_NODE_ID, SITE_SCREEN_FORMS, SITE_NODE_SCREEN_RENDERER, PLACEMENTS, ICONS, SITE_MEMBER_PAGE_SCREENS, SITE_MEMBER_CART_SCREENS, SITE_MEMBER_ONLY_SCREENS;
8454
8455
  var init_site_shell = __esm({
8455
8456
  "../../core/ts/src/site-shell.ts"() {
8456
- "use strict";
8457
8457
  init_define_HHP_CATALOG();
8458
8458
  init_himi_package();
8459
8459
  init_icon_catalog_generated();
@@ -147751,26 +147751,26 @@ function buildRenderTree(node3, path2 = "$", provider = null, itemScope = void 0
147751
147751
  }
147752
147752
  }
147753
147753
  if (type2 === "EmptyState") {
147754
- const painted2 = (raw) => {
147754
+ const painted3 = (raw) => {
147755
147755
  if (typeof raw !== "string") return void 0;
147756
147756
  const r3 = resolveTreeScalar(raw, provider, itemScope);
147757
147757
  const s5 = typeof r3 === "string" ? r3 : typeof r3 === "number" ? String(r3) : void 0;
147758
147758
  return s5 !== void 0 && s5.trim() !== "" ? s5 : void 0;
147759
147759
  };
147760
- const subtitle = painted2(props2.subtitle);
147760
+ const subtitle = painted3(props2.subtitle);
147761
147761
  if (subtitle !== void 0) values.subtitle = subtitle;
147762
- const actionLabel = props2.action != null ? painted2(props2.actionLabel) : void 0;
147762
+ const actionLabel = props2.action != null ? painted3(props2.actionLabel) : void 0;
147763
147763
  if (actionLabel !== void 0) values.actionLabel = actionLabel;
147764
147764
  }
147765
147765
  if (type2 === "ErrorState") {
147766
- const painted2 = (raw) => {
147766
+ const painted3 = (raw) => {
147767
147767
  if (typeof raw !== "string") return void 0;
147768
147768
  const r3 = resolveTreeScalar(raw, provider, itemScope);
147769
147769
  return typeof r3 === "string" && r3.trim() !== "" ? r3 : void 0;
147770
147770
  };
147771
- const body2 = painted2(props2.body);
147771
+ const body2 = painted3(props2.body);
147772
147772
  if (body2 !== void 0) values.body = body2;
147773
- const ctaLabel = props2.cta != null ? painted2(props2.ctaLabel) : void 0;
147773
+ const ctaLabel = props2.cta != null ? painted3(props2.ctaLabel) : void 0;
147774
147774
  if (ctaLabel !== void 0) values.ctaLabel = ctaLabel;
147775
147775
  }
147776
147776
  const template = props2.template;
@@ -147839,10 +147839,35 @@ function buildRenderTree(node3, path2 = "$", provider = null, itemScope = void 0
147839
147839
  }
147840
147840
  }
147841
147841
  };
147842
- visit(props2, id);
147842
+ const painted2 = provider && type2 === "FragmentSlot" ? paintedFragmentCase(props2, provider, itemScope) : null;
147843
+ if (painted2 !== null) {
147844
+ for (const [key4, value2] of Object.entries(props2)) {
147845
+ if (key4 !== "cases") {
147846
+ visit(value2, `${id}.${key4}`);
147847
+ continue;
147848
+ }
147849
+ value2.forEach((fragment, i2) => {
147850
+ const content = fragment?.content;
147851
+ const child3 = isSduiNode(content) ? buildRenderTree(content, `${id}/${type2}`, provider, itemScope, includeRawProps, env, a11yHidden) : null;
147852
+ if (!child3) return;
147853
+ if (i2 !== painted2) child3.hidden = true;
147854
+ children2.push(child3);
147855
+ });
147856
+ }
147857
+ } else visit(props2, id);
147843
147858
  if (children2.length) out2.children = children2;
147844
147859
  return out2;
147845
147860
  }
147861
+ function paintedFragmentCase(props2, provider, itemScope) {
147862
+ const cases = props2.cases;
147863
+ const casePath = props2.casePath ?? props2.case_path;
147864
+ if (!Array.isArray(cases) || !cases.length || typeof casePath !== "string" || isEnvExpr(casePath)) return null;
147865
+ const idOf = (fragment) => fragment?.id;
147866
+ const answer = casePath.startsWith("$app:") ? provider.value(casePath) : resolveTreeScalar(casePath, provider, itemScope);
147867
+ const picked = cases.findIndex((fragment) => idOf(fragment) === answer);
147868
+ const fallback = cases.findIndex((fragment) => idOf(fragment) === (props2.defaultCase ?? props2.default_case));
147869
+ return picked >= 0 ? picked : Math.max(fallback, 0);
147870
+ }
147846
147871
  function isSduiNode(node3) {
147847
147872
  return !!node3 && typeof node3 === "object" && !!node3.body;
147848
147873
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wix/himalaya-cli",
3
- "version": "0.1837.0",
3
+ "version": "0.1838.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": "e3cba4e99a9fcf2c35c6cd45013d5c41029d8dac8eb03f7781050acc"
85
+ "falconPackageHash": "db6d51cd30959d45758c8f062432b7c9833e59662d6c59a33fd8e5b3"
86
86
  }