@wix/himalaya-cli 0.2007.0 → 0.2008.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 +34 -19
  2. package/package.json +2 -2
package/dist/cli.mjs CHANGED
@@ -3964,6 +3964,7 @@ var init_himi_package = __esm({
3964
3964
  var ICON_VIEW_BOX, ICON_STROKE_WIDTH, ICON_FALLBACK, ICON_CATALOG, ICON_NORMALIZED_INDEX, ICON_NAMES;
3965
3965
  var init_icon_catalog_generated = __esm({
3966
3966
  "../../core/ts/src/icon-catalog.generated.ts"() {
3967
+ "use strict";
3967
3968
  init_define_HHP_CATALOG();
3968
3969
  ICON_VIEW_BOX = 24;
3969
3970
  ICON_STROKE_WIDTH = 2;
@@ -47235,7 +47236,6 @@ function shouldRevealError(args) {
47235
47236
  var EMAIL_RE, URL_HOST_RE, INTEGER_RE, NUMBER_RE, AUTHORED_PATTERN_LIMIT, authoredPatterns;
47236
47237
  var init_validation = __esm({
47237
47238
  "../../core/ts/src/validation.ts"() {
47238
- "use strict";
47239
47239
  init_define_HHP_CATALOG();
47240
47240
  EMAIL_RE = /^[A-Za-z0-9._%+-]+@[A-Za-z0-9-]+(\.[A-Za-z0-9-]+)*\.[A-Za-z]{2,}$/;
47241
47241
  URL_HOST_RE = /^[A-Za-z0-9-]+(\.[A-Za-z0-9-]+)*(:[0-9]+)?$/;
@@ -214096,7 +214096,7 @@ function addNavigation(out2, plan, taken2, pageIconOf) {
214096
214096
  out2.routes.push({ layoutItemId: "(more)", label: "More", screenId, kind: "generated" });
214097
214097
  out2.tabs.push({ layoutItemId: "(more)", label: "More", screenId });
214098
214098
  }
214099
- var TEMPLATE_HOME_SCREEN, TEMPLATE_SCREEN_PARAM_KEYS, SYSTEM_ALL_PRODUCTS_ID, collectionParams, faqHiddenCategories, TEMPLATE_PARAMS, countOf2, SCREEN_ADAPTATIONS, FALLBACK_TARGETS, BOTTOM_TABS_BEFORE_MORE, TEMPLATE_VERTICALS, PAGE_TYPE_ICONS, HOME_TAB_ICON, TEMPLATE_FALLBACKS, MODULES, obj20, arr4, str16, node3, text10, vstack, hstack, inset, youtubeIdOf, DIRECT_VIDEO_FILE, UNREAD_IMAGE_RATIO, REPEATER_COLUMNS_MAX, BUSINESS_CHAT_SCREEN, SUBSCRIPTIONS_MAX, selectedPlanIds, MEMBERS_RAIL, PROGRAMS_DEFAULT_LIMIT, PROGRAMS_INLINE_MAX, PODCAST_INLINE, GALLERIES_INLINE_MAX, GALLERIES_LIST_INLINE, BLOG_HERO_MAX, BLOG_SEARCH_POSTS, EVENT_SCHEDULE_INLINE, SHOP_ALL, SERVICES_INLINE, UPCOMING_INLINE, CALENDAR_INLINE, UPCOMING_SESSIONS_INLINE, UPCOMING_INTERVALS, HISTORY_INLINE, PRODUCTS_INLINE, GROUP_FEED_POSTS_MAX, POST_ACTION_LABELS, postActionsGap, NEWSFEED_GROUPS_MAX, LOYALTY_TIERS_INLINE, VIDEOS_INLINE_DEFAULT, VIDEOS_INLINE_MAX, WISHLIST_INLINE, EVENTS_RAIL_INLINE, SOCIAL_NETWORKS, HANDLERS, memberActionService, MERGED_PAGES_BUNDLE, hasCtaButton, chevron;
214099
+ var TEMPLATE_HOME_SCREEN, TEMPLATE_SCREEN_PARAM_KEYS, SYSTEM_ALL_PRODUCTS_ID, collectionParams, faqHiddenCategories, TEMPLATE_PARAMS, countOf2, SCREEN_ADAPTATIONS, FALLBACK_TARGETS, BOTTOM_TABS_BEFORE_MORE, TEMPLATE_VERTICALS, PAGE_TYPE_ICONS, HOME_TAB_ICON, TEMPLATE_FALLBACKS, MODULES, obj20, arr4, str16, node3, text10, vstack, hstack, inset, youtubeIdOf, DIRECT_VIDEO_FILE, UNREAD_IMAGE_RATIO, REPEATER_COLUMNS_MAX, REPEATER_ON_IMAGE_INSET, REPEATER_ON_SHADE_THEME, REPEATER_ON_BARE_IMAGE_THEME, REPEATER_IMAGE_SHADE, BUSINESS_CHAT_SCREEN, SUBSCRIPTIONS_MAX, selectedPlanIds, MEMBERS_RAIL, PROGRAMS_DEFAULT_LIMIT, PROGRAMS_INLINE_MAX, PODCAST_INLINE, GALLERIES_INLINE_MAX, GALLERIES_LIST_INLINE, BLOG_HERO_MAX, BLOG_SEARCH_POSTS, EVENT_SCHEDULE_INLINE, SHOP_ALL, SERVICES_INLINE, UPCOMING_INLINE, CALENDAR_INLINE, UPCOMING_SESSIONS_INLINE, UPCOMING_INTERVALS, HISTORY_INLINE, PRODUCTS_INLINE, GROUP_FEED_POSTS_MAX, POST_ACTION_LABELS, postActionsGap, NEWSFEED_GROUPS_MAX, LOYALTY_TIERS_INLINE, VIDEOS_INLINE_DEFAULT, VIDEOS_INLINE_MAX, WISHLIST_INLINE, EVENTS_RAIL_INLINE, SOCIAL_NETWORKS, HANDLERS, memberActionService, MERGED_PAGES_BUNDLE, hasCtaButton, chevron;
214100
214100
  var init_generate = __esm({
214101
214101
  "src/one-app/generate.ts"() {
214102
214102
  init_define_HHP_CATALOG();
@@ -214374,6 +214374,10 @@ var init_generate = __esm({
214374
214374
  DIRECT_VIDEO_FILE = /\.(?:mp4|m4v|mov|webm|m3u8)(?:[?#]|$)/i;
214375
214375
  UNREAD_IMAGE_RATIO = 4 / 3;
214376
214376
  REPEATER_COLUMNS_MAX = 3;
214377
+ REPEATER_ON_IMAGE_INSET = { leading: 12, trailing: 12, top: 32, bottom: 12 };
214378
+ REPEATER_ON_SHADE_THEME = { colors: { textOnAccent: "#FFFFFF", repeaterImageShade: "#000000" } };
214379
+ REPEATER_ON_BARE_IMAGE_THEME = { colors: { textOnAccent: "#000000" } };
214380
+ REPEATER_IMAGE_SHADE = { kind: "linear", start: "top", end: "bottom", stops: [{ token: "repeaterImageShade@0", at: 0 }, { token: "repeaterImageShade@60", at: 1 }] };
214377
214381
  BUSINESS_CHAT_SCREEN = "himi_business_chat";
214378
214382
  SUBSCRIPTIONS_MAX = 5;
214379
214383
  selectedPlanIds = (st2) => arr4(st2.selectedPlanIds).filter((v2) => typeof v2 === "string" && !!v2);
@@ -214511,14 +214515,20 @@ var init_generate = __esm({
214511
214515
  autoplay: !!st2.autoplay
214512
214516
  }, { cornerRadius: 8, fillMaxWidth: true, accessibilityLabel: ctx.page.label })], 0, inset(8, 8));
214513
214517
  },
214514
- // Image cards, each with a title, a subtitle and the tap the source gave it, in the source's order. The source may lay the texts
214515
- // over the image (`imageOverlay`); here they sit under it, so the image stays clear and the texts stay readable. A `grid` repeater
214518
+ // Image cards, each with a title, a subtitle and the tap the source gave it, in the source's order. Where the source lays the texts
214519
+ // on the image (`textOptions.contentDisplay: "onImage"`), they sit at the bottom of the image: white over a black shade when
214520
+ // `imageOptions.imageOverlay` is on, black on the bare image when it is off or not set (the One App viewer's two colors).
214521
+ // Otherwise the texts sit under the image. A `grid` repeater
214516
214522
  // keeps its columns, at every width: on a narrow phone the cells shrink, the texts wrap to two lines and the whole card stays the tap.
214517
214523
  platform_elements_repeater_section: (id, _s2, st2, _i2, ctx, elementId) => {
214518
214524
  const options2 = obj20(st2.imageOptions);
214525
+ const textOptions = obj20(st2.textOptions);
214519
214526
  const grid = st2.type === "grid";
214520
214527
  const showText = st2.showText !== false;
214521
- const align = textAlign(obj20(st2.textOptions).textAlignment);
214528
+ const onImage = textOptions.contentDisplay === "onImage";
214529
+ const shaded = onImage && options2.imageOverlay === true;
214530
+ const align = textAlign(textOptions.textAlignment);
214531
+ const corner = typeof options2.cornerRadius === "number" ? { cornerRadius: options2.cornerRadius } : {};
214522
214532
  const gap = Math.min(24, Math.max(4, Number(st2.spaceBetweenItems) || 12));
214523
214533
  const ratio = sourceRatio(options2.aspectRatio);
214524
214534
  let unsized = false;
@@ -214529,23 +214539,28 @@ var init_generate = __esm({
214529
214539
  const url = str16(item2.imageUrl);
214530
214540
  if (!url && !(showText && (title || subtitle))) return [];
214531
214541
  const tap = controlTap(ctx, obj20(item2.action ?? item2.actionData), elementId, "platform_elements_repeater_section", `the item "${title || subtitle || url}"`);
214532
- const parts = [];
214533
- if (url) {
214534
- unsized ||= ratio === void 0;
214535
- parts.push(node3(`${id}.i${i2}.img`, "Image", {
214536
- url: ctx.imageUrl(url),
214537
- fillWidth: true,
214538
- aspectRatio: ratio ?? UNREAD_IMAGE_RATIO,
214539
- contentMode: options2.imageScale === "fit" ? "fit" : "fill",
214540
- contentDescription: title || ctx.page.label
214541
- }, typeof options2.cornerRadius === "number" ? { cornerRadius: options2.cornerRadius } : void 0));
214542
- }
214542
+ const tapped = tap ? { onTap: tap, fillMaxWidth: true } : { fillMaxWidth: true };
214543
+ const image = url ? node3(`${id}.i${i2}.img`, "Image", {
214544
+ url: ctx.imageUrl(url),
214545
+ fillWidth: true,
214546
+ aspectRatio: ratio ?? UNREAD_IMAGE_RATIO,
214547
+ contentMode: options2.imageScale === "fit" ? "fit" : "fill",
214548
+ contentDescription: title || ctx.page.label
214549
+ }, Object.keys(corner).length ? corner : void 0) : null;
214550
+ if (image) unsized ||= ratio === void 0;
214551
+ const over = onImage && image !== null;
214543
214552
  const lines2 = grid ? { maxLines: 2 } : {};
214544
214553
  const texts = [];
214545
- if (showText && title) texts.push(text10(`${id}.i${i2}.title`, title, "bodyEmphasis", { textAlign: align, ...lines2 }, { fillMaxWidth: true }));
214546
- if (showText && subtitle) texts.push(text10(`${id}.i${i2}.subtitle`, subtitle, "footnote", { textAlign: align, color: "textSecondary", ...lines2 }, { fillMaxWidth: true }));
214554
+ if (showText && title) texts.push(text10(`${id}.i${i2}.title`, title, "bodyEmphasis", { textAlign: align, ...lines2, ...over ? { color: "textOnAccent" } : {} }, { fillMaxWidth: true }));
214555
+ if (showText && subtitle) texts.push(text10(`${id}.i${i2}.subtitle`, subtitle, "footnote", { textAlign: align, color: over ? "textOnAccent" : "textSecondary", ...lines2 }, { fillMaxWidth: true }));
214556
+ if (over) {
214557
+ const layers3 = [image];
214558
+ if (texts.length) layers3.push(vstack(`${id}.i${i2}.texts`, texts, 2, { fillMaxWidth: true, padding: REPEATER_ON_IMAGE_INSET, ...corner, ...shaded ? { gradient: REPEATER_IMAGE_SHADE } : {} }, align));
214559
+ return [node3(`${id}.i${i2}`, "ZStack", { alignment: align, verticalAlignment: "bottom", children: layers3 }, { ...tapped, ...corner, theme: shaded ? REPEATER_ON_SHADE_THEME : REPEATER_ON_BARE_IMAGE_THEME })];
214560
+ }
214561
+ const parts = image ? [image] : [];
214547
214562
  if (texts.length) parts.push(vstack(`${id}.i${i2}.texts`, texts, 2, { fillMaxWidth: true }));
214548
- return [vstack(`${id}.i${i2}`, parts, 8, tap ? { onTap: tap, fillMaxWidth: true } : { fillMaxWidth: true })];
214563
+ return [vstack(`${id}.i${i2}`, parts, 8, tapped)];
214549
214564
  });
214550
214565
  if (!cards.length) return ctx.unsupported(elementId, "platform_elements_repeater_section", "the repeater has no item with an image or a text to show");
214551
214566
  if (unsized) ctx.gap(elementId, "platform_elements_repeater_section", "the source gives the cards' images no proportions; they are shown in a 4:3 box");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wix/himalaya-cli",
3
- "version": "0.2007.0",
3
+ "version": "0.2008.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": "827071ade3f7aa3a964b5f245c1cf54be533959668d6a64c8a3cbff3"
85
+ "falconPackageHash": "38f64ec4484d8a9f669900a29719165ed9cc8c4746199d472e14ab3a"
86
86
  }