@wix/himalaya-cli 0.1210.0 → 0.1212.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 (118) hide show
  1. package/dist/cli.mjs +91 -1
  2. package/package.json +2 -2
  3. package/templates/beauty-salon/tier5-src/_shared/engine-intl.ts +57 -16
  4. package/templates/beauty-salon-owner/dev/index.ts +280 -37
  5. package/templates/beauty-salon-owner/tier5-src/_shared/aria-chat.ts +31 -16
  6. package/templates/beauty-salon-owner/tier5-src/_shared/engine-intl.ts +57 -16
  7. package/templates/beauty-salon-owner/tier5-src/_shared/owner-module-data.ts +105 -37
  8. package/templates/beauty-salon-owner/tier5-src/himi-owner-lite-aria-history/index.ts +1 -0
  9. package/templates/beauty-salon-owner/tier5-src/himi-owner-lite-home/index.ts +5 -0
  10. package/templates/beauty-salon-owner/tier5-src/himi-owner-lite-manage/index.ts +4 -2
  11. package/templates/beauty-salon-owner/tier5-src/himi-owner-lite-post/index.ts +63 -16
  12. package/templates/beauty-salon-owner/tier5-src/himi-owner-lite-product/index.ts +61 -16
  13. package/templates/branded-lite/tier5-src/_shared/engine-intl.ts +57 -16
  14. package/templates/community-club/tier5-src/_shared/engine-intl.ts +57 -16
  15. package/templates/community-club-owner/dev/index.ts +389 -37
  16. package/templates/community-club-owner/tier5-src/_shared/aria-chat.ts +31 -16
  17. package/templates/community-club-owner/tier5-src/_shared/engine-intl.ts +57 -16
  18. package/templates/community-club-owner/tier5-src/_shared/owner-module-data.ts +105 -37
  19. package/templates/community-club-owner/tier5-src/himi-owner-lite-aria-history/index.ts +1 -0
  20. package/templates/community-club-owner/tier5-src/himi-owner-lite-event/index.ts +59 -14
  21. package/templates/community-club-owner/tier5-src/himi-owner-lite-home/index.ts +5 -0
  22. package/templates/community-club-owner/tier5-src/himi-owner-lite-manage/index.ts +4 -2
  23. package/templates/community-club-owner/tier5-src/himi-owner-lite-post/index.ts +63 -16
  24. package/templates/community-club-owner/tier5-src/himi-owner-lite-product/index.ts +61 -16
  25. package/templates/events-meetups/tier5-src/_shared/engine-intl.ts +57 -16
  26. package/templates/events-meetups-owner/dev/index.ts +280 -37
  27. package/templates/events-meetups-owner/tier5-src/_shared/aria-chat.ts +31 -16
  28. package/templates/events-meetups-owner/tier5-src/_shared/engine-intl.ts +57 -16
  29. package/templates/events-meetups-owner/tier5-src/_shared/owner-module-data.ts +105 -37
  30. package/templates/events-meetups-owner/tier5-src/himi-owner-lite-aria-history/index.ts +1 -0
  31. package/templates/events-meetups-owner/tier5-src/himi-owner-lite-event/index.ts +59 -14
  32. package/templates/events-meetups-owner/tier5-src/himi-owner-lite-home/index.ts +5 -0
  33. package/templates/events-meetups-owner/tier5-src/himi-owner-lite-manage/index.ts +4 -2
  34. package/templates/events-meetups-owner/tier5-src/himi-owner-lite-post/index.ts +63 -16
  35. package/templates/gym-fitness/tier5-src/_shared/engine-intl.ts +57 -16
  36. package/templates/gym-fitness-owner/dev/index.ts +389 -37
  37. package/templates/gym-fitness-owner/tier5-src/_shared/aria-chat.ts +31 -16
  38. package/templates/gym-fitness-owner/tier5-src/_shared/engine-intl.ts +57 -16
  39. package/templates/gym-fitness-owner/tier5-src/_shared/owner-module-data.ts +105 -37
  40. package/templates/gym-fitness-owner/tier5-src/himi-owner-lite-aria-history/index.ts +1 -0
  41. package/templates/gym-fitness-owner/tier5-src/himi-owner-lite-event/index.ts +59 -14
  42. package/templates/gym-fitness-owner/tier5-src/himi-owner-lite-home/index.ts +5 -0
  43. package/templates/gym-fitness-owner/tier5-src/himi-owner-lite-manage/index.ts +4 -2
  44. package/templates/gym-fitness-owner/tier5-src/himi-owner-lite-post/index.ts +63 -16
  45. package/templates/gym-fitness-owner/tier5-src/himi-owner-lite-product/index.ts +61 -16
  46. package/templates/nonprofit-cause/tier5-src/_shared/engine-intl.ts +57 -16
  47. package/templates/nonprofit-cause-owner/dev/index.ts +280 -37
  48. package/templates/nonprofit-cause-owner/tier5-src/_shared/aria-chat.ts +31 -16
  49. package/templates/nonprofit-cause-owner/tier5-src/_shared/engine-intl.ts +57 -16
  50. package/templates/nonprofit-cause-owner/tier5-src/_shared/owner-module-data.ts +105 -37
  51. package/templates/nonprofit-cause-owner/tier5-src/himi-owner-lite-aria-history/index.ts +1 -0
  52. package/templates/nonprofit-cause-owner/tier5-src/himi-owner-lite-event/index.ts +59 -14
  53. package/templates/nonprofit-cause-owner/tier5-src/himi-owner-lite-home/index.ts +5 -0
  54. package/templates/nonprofit-cause-owner/tier5-src/himi-owner-lite-manage/index.ts +4 -2
  55. package/templates/nonprofit-cause-owner/tier5-src/himi-owner-lite-post/index.ts +63 -16
  56. package/templates/owner-lite/dev/index.ts +389 -37
  57. package/templates/owner-lite/tier5-src/_shared/aria-chat.ts +31 -16
  58. package/templates/owner-lite/tier5-src/_shared/engine-intl.ts +57 -16
  59. package/templates/owner-lite/tier5-src/_shared/owner-module-data.ts +105 -37
  60. package/templates/owner-lite/tier5-src/himi-owner-lite-aria-history/index.ts +1 -0
  61. package/templates/owner-lite/tier5-src/himi-owner-lite-event/index.ts +59 -14
  62. package/templates/owner-lite/tier5-src/himi-owner-lite-faq/index.ts +8 -2
  63. package/templates/owner-lite/tier5-src/himi-owner-lite-home/index.ts +5 -0
  64. package/templates/owner-lite/tier5-src/himi-owner-lite-manage/index.ts +4 -2
  65. package/templates/owner-lite/tier5-src/himi-owner-lite-post/index.ts +63 -16
  66. package/templates/owner-lite/tier5-src/himi-owner-lite-product/index.ts +61 -16
  67. package/templates/podcast-creator/tier5-src/_shared/engine-intl.ts +57 -16
  68. package/templates/podcast-creator-owner/dev/index.ts +389 -37
  69. package/templates/podcast-creator-owner/tier5-src/_shared/aria-chat.ts +31 -16
  70. package/templates/podcast-creator-owner/tier5-src/_shared/engine-intl.ts +57 -16
  71. package/templates/podcast-creator-owner/tier5-src/_shared/owner-module-data.ts +105 -37
  72. package/templates/podcast-creator-owner/tier5-src/himi-owner-lite-aria-history/index.ts +1 -0
  73. package/templates/podcast-creator-owner/tier5-src/himi-owner-lite-event/index.ts +59 -14
  74. package/templates/podcast-creator-owner/tier5-src/himi-owner-lite-home/index.ts +5 -0
  75. package/templates/podcast-creator-owner/tier5-src/himi-owner-lite-manage/index.ts +4 -2
  76. package/templates/podcast-creator-owner/tier5-src/himi-owner-lite-post/index.ts +63 -16
  77. package/templates/podcast-creator-owner/tier5-src/himi-owner-lite-product/index.ts +61 -16
  78. package/templates/portfolio-creative/tier5-src/_shared/engine-intl.ts +57 -16
  79. package/templates/portfolio-creative-owner/dev/index.ts +280 -37
  80. package/templates/portfolio-creative-owner/tier5-src/_shared/aria-chat.ts +31 -16
  81. package/templates/portfolio-creative-owner/tier5-src/_shared/engine-intl.ts +57 -16
  82. package/templates/portfolio-creative-owner/tier5-src/_shared/owner-module-data.ts +105 -37
  83. package/templates/portfolio-creative-owner/tier5-src/himi-owner-lite-aria-history/index.ts +1 -0
  84. package/templates/portfolio-creative-owner/tier5-src/himi-owner-lite-home/index.ts +5 -0
  85. package/templates/portfolio-creative-owner/tier5-src/himi-owner-lite-manage/index.ts +4 -2
  86. package/templates/portfolio-creative-owner/tier5-src/himi-owner-lite-post/index.ts +63 -16
  87. package/templates/portfolio-creative-owner/tier5-src/himi-owner-lite-product/index.ts +61 -16
  88. package/templates/restaurant/tier5-src/_shared/engine-intl.ts +57 -16
  89. package/templates/restaurant-owner/dev/index.ts +389 -37
  90. package/templates/restaurant-owner/tier5-src/_shared/aria-chat.ts +31 -16
  91. package/templates/restaurant-owner/tier5-src/_shared/engine-intl.ts +57 -16
  92. package/templates/restaurant-owner/tier5-src/_shared/owner-module-data.ts +105 -37
  93. package/templates/restaurant-owner/tier5-src/himi-owner-lite-aria-history/index.ts +1 -0
  94. package/templates/restaurant-owner/tier5-src/himi-owner-lite-event/index.ts +59 -14
  95. package/templates/restaurant-owner/tier5-src/himi-owner-lite-home/index.ts +5 -0
  96. package/templates/restaurant-owner/tier5-src/himi-owner-lite-manage/index.ts +4 -2
  97. package/templates/restaurant-owner/tier5-src/himi-owner-lite-post/index.ts +63 -16
  98. package/templates/restaurant-owner/tier5-src/himi-owner-lite-product/index.ts +61 -16
  99. package/templates/retail-store/tier5-src/_shared/engine-intl.ts +57 -16
  100. package/templates/retail-store-owner/dev/index.ts +280 -37
  101. package/templates/retail-store-owner/tier5-src/_shared/aria-chat.ts +31 -16
  102. package/templates/retail-store-owner/tier5-src/_shared/engine-intl.ts +57 -16
  103. package/templates/retail-store-owner/tier5-src/_shared/owner-module-data.ts +105 -37
  104. package/templates/retail-store-owner/tier5-src/himi-owner-lite-aria-history/index.ts +1 -0
  105. package/templates/retail-store-owner/tier5-src/himi-owner-lite-home/index.ts +5 -0
  106. package/templates/retail-store-owner/tier5-src/himi-owner-lite-manage/index.ts +4 -2
  107. package/templates/retail-store-owner/tier5-src/himi-owner-lite-post/index.ts +63 -16
  108. package/templates/retail-store-owner/tier5-src/himi-owner-lite-product/index.ts +61 -16
  109. package/templates/yoga-studio/tier5-src/_shared/engine-intl.ts +57 -16
  110. package/templates/yoga-studio-owner/dev/index.ts +280 -37
  111. package/templates/yoga-studio-owner/tier5-src/_shared/aria-chat.ts +31 -16
  112. package/templates/yoga-studio-owner/tier5-src/_shared/engine-intl.ts +57 -16
  113. package/templates/yoga-studio-owner/tier5-src/_shared/owner-module-data.ts +105 -37
  114. package/templates/yoga-studio-owner/tier5-src/himi-owner-lite-aria-history/index.ts +1 -0
  115. package/templates/yoga-studio-owner/tier5-src/himi-owner-lite-event/index.ts +59 -14
  116. package/templates/yoga-studio-owner/tier5-src/himi-owner-lite-home/index.ts +5 -0
  117. package/templates/yoga-studio-owner/tier5-src/himi-owner-lite-manage/index.ts +4 -2
  118. package/templates/yoga-studio-owner/tier5-src/himi-owner-lite-post/index.ts +63 -16
package/dist/cli.mjs CHANGED
@@ -6869,6 +6869,7 @@ function resolveTranslation(value, catalog, sourceCatalog) {
6869
6869
  var BINDING_SIGILS, BINDING_SIGIL_RE, TRANSLATION_PREFIX, TRANSLATION_KEY_RE;
6870
6870
  var init_bindings = __esm({
6871
6871
  "../../core/ts/src/bindings.ts"() {
6872
+ "use strict";
6872
6873
  BINDING_SIGILS = ["service", "flag", "item", "t"];
6873
6874
  BINDING_SIGIL_RE = new RegExp(
6874
6875
  `^\\$(?:${BINDING_SIGILS.filter((s) => s !== "t").join("|")})\\b|^\\$t:`
@@ -20351,6 +20352,89 @@ var init_agent_context = __esm({
20351
20352
  }
20352
20353
  });
20353
20354
 
20355
+ // ../../apps/himi-player/player-host-manifest.ts
20356
+ var PLAYER_HOST_MANIFEST;
20357
+ var init_player_host_manifest = __esm({
20358
+ "../../apps/himi-player/player-host-manifest.ts"() {
20359
+ PLAYER_HOST_MANIFEST = {
20360
+ "version": "1.2.0",
20361
+ "capabilities": [
20362
+ "app_info",
20363
+ "audio_record",
20364
+ "audio_record_background",
20365
+ "base44",
20366
+ "biometrics",
20367
+ "browser_auth",
20368
+ "calendar",
20369
+ "calls",
20370
+ "camera",
20371
+ "clipboard",
20372
+ "contacts",
20373
+ "file_picker",
20374
+ "files",
20375
+ "godot",
20376
+ "haptic",
20377
+ "haptics",
20378
+ "himi_apps",
20379
+ "iap",
20380
+ "keyboard",
20381
+ "live_activity",
20382
+ "local_database",
20383
+ "location",
20384
+ "media_playback",
20385
+ "motion",
20386
+ "on_device_ai",
20387
+ "open_url",
20388
+ "pdf",
20389
+ "photos",
20390
+ "presigned_upload",
20391
+ "push",
20392
+ "release_control",
20393
+ "secure_storage",
20394
+ "share",
20395
+ "speaker_diarization",
20396
+ "speech",
20397
+ "stream",
20398
+ "wix_api",
20399
+ "wix_cashier",
20400
+ "wix_platform"
20401
+ ],
20402
+ "unlinked": {
20403
+ "web": [],
20404
+ "ios": [
20405
+ "base44",
20406
+ "godot"
20407
+ ],
20408
+ "macos": [
20409
+ "base44",
20410
+ "godot"
20411
+ ],
20412
+ "android": [
20413
+ "base44",
20414
+ "godot"
20415
+ ]
20416
+ },
20417
+ "nativeComponents": [
20418
+ "template.HimiPlayerCard",
20419
+ "himi_player.HimiPlayerCard"
20420
+ ],
20421
+ "authProviders": [
20422
+ "generic-oauth",
20423
+ "wix-api-key",
20424
+ "wix-consumer",
20425
+ "wix-owner"
20426
+ ],
20427
+ "nativeActions": [
20428
+ "himi.signOut",
20429
+ "himi_player.clear_cache",
20430
+ "himi_player.diagnostics",
20431
+ "himi_player.sign_out",
20432
+ "template.greet"
20433
+ ]
20434
+ };
20435
+ }
20436
+ });
20437
+
20354
20438
  // ../../core/dev-server/src/validate-descriptor.ts
20355
20439
  var validate_descriptor_exports = {};
20356
20440
  __export(validate_descriptor_exports, {
@@ -20400,6 +20484,7 @@ __export(validate_descriptor_exports, {
20400
20484
  pinnedIntrinsicsSource: () => pinnedIntrinsicsSource,
20401
20485
  readBuiltBundle: () => readBuiltBundle,
20402
20486
  readBuiltBundleMap: () => readBuiltBundleMap,
20487
+ registeredActions: () => registeredActions,
20403
20488
  resolveActionEvaluator: () => resolveActionEvaluator,
20404
20489
  resolveBootEvaluator: () => resolveBootEvaluator,
20405
20490
  resolveEvaluator: () => resolveEvaluator,
@@ -20480,6 +20565,9 @@ function registeredActions(source) {
20480
20565
  }
20481
20566
  function discoverNativeActions(appDir3) {
20482
20567
  const roots = NATIVE_SOURCE_ROOTS.filter(({ directory }) => existsSync30(resolve22(appDir3, directory)));
20568
+ if (roots.length === 0 && existsSync30(resolve22(appDir3, "himalaya.content.json"))) {
20569
+ return { registered: new Set(PLAYER_HOST_MANIFEST.nativeActions), searched: [PLAYER_HOST_SEARCHED] };
20570
+ }
20483
20571
  const sources = roots.flatMap(({ directory, extension, buildDirMaxDepth }) => nativeSourceFiles(resolve22(appDir3, directory), extension, buildDirMaxDepth));
20484
20572
  const registered = sources.flatMap((source) => {
20485
20573
  let text8;
@@ -20496,9 +20584,10 @@ function discoverNativeActions(appDir3) {
20496
20584
  searched: roots.map(({ searched }) => searched)
20497
20585
  };
20498
20586
  }
20499
- var nodeVmEvaluator, navContractMemo, NATIVE_SCRATCH_DIRS, BUILD_OUTPUT_DIR, VANISHED, vanished, NATIVE_SOURCE_ROOTS;
20587
+ var nodeVmEvaluator, navContractMemo, NATIVE_SCRATCH_DIRS, BUILD_OUTPUT_DIR, VANISHED, vanished, NATIVE_SOURCE_ROOTS, PLAYER_HOST_SEARCHED;
20500
20588
  var init_validate_descriptor = __esm({
20501
20589
  "../../core/dev-server/src/validate-descriptor.ts"() {
20590
+ init_player_host_manifest();
20502
20591
  init_validate_descriptor_core();
20503
20592
  init_validate_descriptor_core();
20504
20593
  nodeVmEvaluator = {
@@ -20535,6 +20624,7 @@ var init_validate_descriptor = __esm({
20535
20624
  { directory: "android", extension: ".kt", searched: "android/**/*.kt", buildDirMaxDepth: 2 },
20536
20625
  { directory: "macos", extension: ".swift", searched: "macos/**/*.swift", buildDirMaxDepth: 1 }
20537
20626
  ];
20627
+ PLAYER_HOST_SEARCHED = "Himi Player host (iOS \u2229 Android boots)";
20538
20628
  }
20539
20629
  });
20540
20630
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wix/himalaya-cli",
3
- "version": "0.1210.0",
3
+ "version": "0.1212.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": [
@@ -67,5 +67,5 @@
67
67
  "artifactId": "himalaya-cli"
68
68
  }
69
69
  },
70
- "falconPackageHash": "506ed6e4b472a5634a05b0f8e7709afbd371c022b52be11874929da7"
70
+ "falconPackageHash": "cc41180b408b39e09143dfd0cc65da09b925e59332a1b76b7ea5483b"
71
71
  }
@@ -48,6 +48,36 @@ const MONTHS_LONG = [
48
48
  "July", "August", "September", "October", "November", "December",
49
49
  ] as const;
50
50
 
51
+ /**
52
+ * A DateTimeFormat for `timeZone` when one is given and this engine knows it. An unknown or
53
+ * malformed IANA id is a RangeError in ECMA-402; these helpers never throw, so it degrades to
54
+ * the device zone rather than killing the screen. Without Intl there is no zone database at all,
55
+ * and the fallbacks below render in the device zone for the same reason.
56
+ *
57
+ * Formatters are memoised per (locale, zone, options): a management page formats several dates
58
+ * per row, and building a DateTimeFormat (or throwing on a bad zone) each time is not free on
59
+ * JSC or QuickJS. Only call it where `hasIntl()` holds — every caller does.
60
+ */
61
+ const FORMATTERS = new Map<string, Intl.DateTimeFormat>();
62
+ function dateFormat(locale: string, options: Intl.DateTimeFormatOptions, timeZone?: string): Intl.DateTimeFormat {
63
+ const key = `${locale}|${timeZone ?? ""}|${JSON.stringify(options)}`;
64
+ let formatter = FORMATTERS.get(key);
65
+ if (!formatter) {
66
+ if (hasIntl()) {
67
+ if (timeZone) {
68
+ try {
69
+ formatter = new Intl.DateTimeFormat(locale, { ...options, timeZone });
70
+ } catch {
71
+ /* unknown zone: device zone below, remembered under this key */
72
+ }
73
+ }
74
+ formatter ??= new Intl.DateTimeFormat(locale, options);
75
+ FORMATTERS.set(key, formatter);
76
+ }
77
+ }
78
+ return formatter as Intl.DateTimeFormat;
79
+ }
80
+
51
81
  // The four shapes below are not invented — they are the option bags this corpus actually uses,
52
82
  // counted across every bundle: "Jan 5, 2026" (33 sites), "Jan 5" (11), "Mon, Jan 5, 3:07 PM" (8)
53
83
  // and "Jan 5, 3:07 PM" (4). Naming them means a conversion is a one-line swap rather than a
@@ -55,46 +85,46 @@ const MONTHS_LONG = [
55
85
  // ECMA-402 in engine-intl-fallback.test.ts.
56
86
 
57
87
  /** `{ month: "short", day: "numeric", year: "numeric" }` — "Jan 5, 2026". */
58
- export function formatDateMedium(date: Date, locale = "en-US"): string {
88
+ export function formatDateMedium(date: Date, locale = "en-US", timeZone?: string): string {
59
89
  if (hasIntl()) {
60
- return new Intl.DateTimeFormat(locale, { month: "short", day: "numeric", year: "numeric" }).format(date);
90
+ return dateFormat(locale, { month: "short", day: "numeric", year: "numeric" }, timeZone).format(date);
61
91
  }
62
92
  return `${MONTHS_SHORT[date.getMonth()]} ${date.getDate()}, ${date.getFullYear()}`;
63
93
  }
64
94
 
65
95
  /** `{ month: "short", day: "numeric" }` — "Jan 5". */
66
- export function formatMonthDay(date: Date, locale = "en-US"): string {
96
+ export function formatMonthDay(date: Date, locale = "en-US", timeZone?: string): string {
67
97
  if (hasIntl()) {
68
- return new Intl.DateTimeFormat(locale, { month: "short", day: "numeric" }).format(date);
98
+ return dateFormat(locale, { month: "short", day: "numeric" }, timeZone).format(date);
69
99
  }
70
100
  return `${MONTHS_SHORT[date.getMonth()]} ${date.getDate()}`;
71
101
  }
72
102
 
73
103
  /** `{ month: "long", day: "numeric" }` — "January 5". */
74
- export function formatMonthDayLong(date: Date, locale = "en-US"): string {
104
+ export function formatMonthDayLong(date: Date, locale = "en-US", timeZone?: string): string {
75
105
  if (hasIntl()) {
76
- return new Intl.DateTimeFormat(locale, { month: "long", day: "numeric" }).format(date);
106
+ return dateFormat(locale, { month: "long", day: "numeric" }, timeZone).format(date);
77
107
  }
78
108
  return `${MONTHS_LONG[date.getMonth()]} ${date.getDate()}`;
79
109
  }
80
110
 
81
111
  /** `{ weekday: "short", month: "short", day: "numeric", hour: "numeric", minute: "2-digit" }`
82
112
  * — "Mon, Jan 5, 3:07 PM". */
83
- export function formatWeekdayDateTime(date: Date, locale = "en-US"): string {
113
+ export function formatWeekdayDateTime(date: Date, locale = "en-US", timeZone?: string): string {
84
114
  if (hasIntl()) {
85
- return new Intl.DateTimeFormat(locale, {
115
+ return dateFormat(locale, {
86
116
  weekday: "short", month: "short", day: "numeric", hour: "numeric", minute: "2-digit",
87
- }).format(date);
117
+ }, timeZone).format(date);
88
118
  }
89
119
  return `${WEEKDAYS_SHORT[date.getDay()]}, ${MONTHS_SHORT[date.getMonth()]} ${date.getDate()}, ${clock12(date)}`;
90
120
  }
91
121
 
92
122
  /** `{ month: "short", day: "numeric", hour: "numeric", minute: "2-digit" }` — "Jan 5, 3:07 PM". */
93
- export function formatMonthDayTime(date: Date, locale = "en-US"): string {
123
+ export function formatMonthDayTime(date: Date, locale = "en-US", timeZone?: string): string {
94
124
  if (hasIntl()) {
95
- return new Intl.DateTimeFormat(locale, {
125
+ return dateFormat(locale, {
96
126
  month: "short", day: "numeric", hour: "numeric", minute: "2-digit",
97
- }).format(date);
127
+ }, timeZone).format(date);
98
128
  }
99
129
  return `${MONTHS_SHORT[date.getMonth()]} ${date.getDate()}, ${clock12(date)}`;
100
130
  }
@@ -380,9 +410,9 @@ export function normalizeFormattedPrice(formatted: string): string {
380
410
  return `${m[1]}${m[3]}${m[2]}`;
381
411
  }
382
412
 
383
- function clockParts(d: Date, locale: string): { time: string; meridiem: string } {
413
+ function clockParts(d: Date, locale: string, timeZone?: string): { time: string; meridiem: string } {
384
414
  const full = hasIntl()
385
- ? new Intl.DateTimeFormat(locale, { hour: "numeric", minute: "2-digit", hour12: true }).format(d)
415
+ ? dateFormat(locale, { hour: "numeric", minute: "2-digit", hour12: true }, timeZone).format(d)
386
416
  : clock12(d);
387
417
  // ICU puts a narrow no-break space before the meridiem; normalize so callers can split on it.
388
418
  const clean = full.replace(/[  ]/g, " ");
@@ -391,8 +421,8 @@ function clockParts(d: Date, locale: string): { time: string; meridiem: string }
391
421
  }
392
422
 
393
423
  /** "8:00 PM" — the one clock every customer screen uses (12-hour, en-US shape). */
394
- export function formatClock(date: Date, locale = "en-US"): string {
395
- const { time, meridiem } = clockParts(date, locale);
424
+ export function formatClock(date: Date, locale = "en-US", timeZone?: string): string {
425
+ const { time, meridiem } = clockParts(date, locale, timeZone);
396
426
  return meridiem ? `${time} ${meridiem}` : time;
397
427
  }
398
428
 
@@ -403,3 +433,14 @@ export function isPastDate(iso: string | undefined | null, now: number = Date.no
403
433
  const t = Date.parse(iso);
404
434
  return !Number.isNaN(t) && t < now;
405
435
  }
436
+
437
+ /** The calendar day `date` falls on in `timeZone` (device zone when absent, unknown, or when
438
+ * the engine has no Intl), as `YYYY-MM-DD`. For "is this today / this year" comparisons. */
439
+ export function calendarDay(date: Date, timeZone?: string): string {
440
+ if (hasIntl()) {
441
+ const parts = dateFormat("en-CA", { year: "numeric", month: "2-digit", day: "2-digit" }, timeZone).formatToParts(date);
442
+ const get = (type: string) => parts.find((p) => p.type === type)?.value ?? "";
443
+ return `${get("year")}-${get("month")}-${get("day")}`;
444
+ }
445
+ return `${date.getFullYear()}-${pad2(date.getMonth() + 1)}-${pad2(date.getDate())}`;
446
+ }
@@ -48953,7 +48953,7 @@ const SCREENS = runtimeSetting({
48953
48953
  }
48954
48954
  },
48955
48955
  "modifiers": {
48956
- "hiddenPath": "$service:himiOwnerLiteHome.hideContent"
48956
+ "hiddenPath": "$service:himiOwnerLiteHome.hideSourceFailures"
48957
48957
  }
48958
48958
  },
48959
48959
  {
@@ -50969,7 +50969,8 @@ const SCREENS = runtimeSetting({
50969
50969
  "props": {
50970
50970
  "text": "$service:himiOwnerLiteManage.summary",
50971
50971
  "style": "caption",
50972
- "color": "textSecondary"
50972
+ "color": "textSecondary",
50973
+ "collapseWhenEmpty": true
50973
50974
  }
50974
50975
  }
50975
50976
  },
@@ -51564,6 +51565,9 @@ const SCREENS = runtimeSetting({
51564
51565
  }
51565
51566
  ]
51566
51567
  }
51568
+ },
51569
+ "modifiers": {
51570
+ "hiddenPath": "$service:himiOwnerLiteManage.noSections"
51567
51571
  }
51568
51572
  },
51569
51573
  {
@@ -56403,7 +56407,7 @@ const SCREENS = runtimeSetting({
56403
56407
  "package": "himalaya",
56404
56408
  "type": "HStack",
56405
56409
  "props": {
56406
- "spacing": 16,
56410
+ "spacing": 0,
56407
56411
  "children": [
56408
56412
  {
56409
56413
  "id": "",
@@ -56414,43 +56418,57 @@ const SCREENS = runtimeSetting({
56414
56418
  }
56415
56419
  },
56416
56420
  {
56417
- "id": "himi_owner_lite_aria.history",
56418
- "body": {
56419
- "package": "himalaya",
56420
- "type": "Text",
56421
- "props": {
56422
- "text": "History",
56423
- "style": "bodyEmphasis",
56424
- "color": "accentPrimary",
56425
- "maxLines": 1
56426
- }
56427
- },
56428
- "modifiers": {
56429
- "onTap": {
56430
- "actionId": "himi.open",
56431
- "params": {
56432
- "screenId": "himi_owner_lite_aria_history"
56433
- }
56434
- }
56435
- }
56436
- },
56437
- {
56438
- "id": "himi_owner_lite_aria.newchat",
56421
+ "id": "",
56439
56422
  "body": {
56440
56423
  "package": "himalaya",
56441
- "type": "Icon",
56424
+ "type": "HStack",
56442
56425
  "props": {
56443
- "name": "edit",
56444
- "size": 22,
56445
- "tint": "accentPrimary"
56426
+ "spacing": 16,
56427
+ "children": [
56428
+ {
56429
+ "id": "himi_owner_lite_aria.history",
56430
+ "body": {
56431
+ "package": "himalaya",
56432
+ "type": "Text",
56433
+ "props": {
56434
+ "text": "History",
56435
+ "style": "bodyEmphasis",
56436
+ "color": "accentPrimary",
56437
+ "maxLines": 1
56438
+ }
56439
+ },
56440
+ "modifiers": {
56441
+ "onTap": {
56442
+ "actionId": "himi.open",
56443
+ "params": {
56444
+ "screenId": "himi_owner_lite_aria_history"
56445
+ }
56446
+ }
56447
+ }
56448
+ },
56449
+ {
56450
+ "id": "himi_owner_lite_aria.newchat",
56451
+ "body": {
56452
+ "package": "himalaya",
56453
+ "type": "Icon",
56454
+ "props": {
56455
+ "name": "edit",
56456
+ "size": 22,
56457
+ "tint": "accentPrimary"
56458
+ }
56459
+ },
56460
+ "modifiers": {
56461
+ "onTap": {
56462
+ "actionId": "tier5.himiOwnerLiteAria.newChat"
56463
+ },
56464
+ "accessibilityLabel": "New chat",
56465
+ "accessibilityRole": "button",
56466
+ "width": 44,
56467
+ "height": 44
56468
+ }
56469
+ }
56470
+ ]
56446
56471
  }
56447
- },
56448
- "modifiers": {
56449
- "onTap": {
56450
- "actionId": "tier5.himiOwnerLiteAria.newChat"
56451
- },
56452
- "accessibilityLabel": "New chat",
56453
- "accessibilityRole": "button"
56454
56472
  }
56455
56473
  }
56456
56474
  ]
@@ -56811,6 +56829,9 @@ const SCREENS = runtimeSetting({
56811
56829
  }
56812
56830
  ]
56813
56831
  }
56832
+ },
56833
+ "modifiers": {
56834
+ "hiddenPath": "$service:himiOwnerLiteAria.messagesHidden"
56814
56835
  }
56815
56836
  },
56816
56837
  {
@@ -57109,7 +57130,8 @@ const SCREENS = runtimeSetting({
57109
57130
  "text": "$service:himiOwnerLiteAria.error",
57110
57131
  "style": "footnote",
57111
57132
  "color": "danger",
57112
- "maxLines": 3
57133
+ "maxLines": 3,
57134
+ "collapseWhenEmpty": true
57113
57135
  }
57114
57136
  },
57115
57137
  "modifiers": {
@@ -61346,6 +61368,9 @@ const SCREENS = runtimeSetting({
61346
61368
  }
61347
61369
  ]
61348
61370
  }
61371
+ },
61372
+ "modifiers": {
61373
+ "hiddenPath": "$service:himiOwnerLiteAriaHistory.itemsHidden"
61349
61374
  }
61350
61375
  }
61351
61376
  ]
@@ -77484,6 +77509,115 @@ const TEMPLATED: { pattern: string; display: string; liveSeed?: LiveSeed; static
77484
77509
  }
77485
77510
  }
77486
77511
  },
77512
+ {
77513
+ "id": "product_delete_confirmation",
77514
+ "body": {
77515
+ "package": "himalaya",
77516
+ "type": "VStack",
77517
+ "props": {
77518
+ "spacing": 10,
77519
+ "alignment": "leading",
77520
+ "children": [
77521
+ {
77522
+ "id": "product_delete_confirmation.title",
77523
+ "body": {
77524
+ "package": "himalaya",
77525
+ "type": "Text",
77526
+ "props": {
77527
+ "text": "Delete this retail line?",
77528
+ "style": "bodyEmphasis"
77529
+ }
77530
+ }
77531
+ },
77532
+ {
77533
+ "id": "product_delete_confirmation.record",
77534
+ "body": {
77535
+ "package": "himalaya",
77536
+ "type": "Text",
77537
+ "props": {
77538
+ "text": "$service:himiOwnerLiteProduct.title",
77539
+ "style": "body",
77540
+ "color": "textSecondary",
77541
+ "maxLines": 2
77542
+ }
77543
+ }
77544
+ },
77545
+ {
77546
+ "id": "",
77547
+ "body": {
77548
+ "package": "himalaya",
77549
+ "type": "Text",
77550
+ "props": {
77551
+ "text": "This cannot be undone.",
77552
+ "style": "footnote",
77553
+ "color": "textSecondary"
77554
+ }
77555
+ }
77556
+ },
77557
+ {
77558
+ "id": "",
77559
+ "body": {
77560
+ "package": "himalaya",
77561
+ "type": "HStack",
77562
+ "props": {
77563
+ "spacing": 8,
77564
+ "children": [
77565
+ {
77566
+ "id": "product_delete_cancel",
77567
+ "body": {
77568
+ "package": "himalaya",
77569
+ "type": "Button",
77570
+ "props": {
77571
+ "title": "Cancel",
77572
+ "style": "secondary",
77573
+ "action": {
77574
+ "actionId": "tier5.himiOwnerLiteProduct.cancelDelete"
77575
+ }
77576
+ }
77577
+ }
77578
+ },
77579
+ {
77580
+ "id": "product_delete_confirm",
77581
+ "body": {
77582
+ "package": "himalaya",
77583
+ "type": "Button",
77584
+ "props": {
77585
+ "title": "Delete",
77586
+ "style": "destructive",
77587
+ "action": {
77588
+ "actionId": "tier5.himiOwnerLiteProduct.confirmDelete"
77589
+ }
77590
+ }
77591
+ }
77592
+ }
77593
+ ]
77594
+ }
77595
+ }
77596
+ }
77597
+ ]
77598
+ }
77599
+ },
77600
+ "modifiers": {
77601
+ "background": {
77602
+ "token": "surfaceElevated"
77603
+ },
77604
+ "border": {
77605
+ "width": 1,
77606
+ "color": {
77607
+ "token": "danger"
77608
+ }
77609
+ },
77610
+ "cornerRadius": 12,
77611
+ "padding": {
77612
+ "leading": 14,
77613
+ "trailing": 14,
77614
+ "top": 14,
77615
+ "bottom": 14
77616
+ },
77617
+ "fillMaxWidth": true,
77618
+ "hiddenPath": "$service:himiOwnerLiteProduct.noDeleteConfirmation"
77619
+ }
77620
+ },
77487
77621
  {
77488
77622
  "id": "",
77489
77623
  "body": {
@@ -79111,6 +79245,115 @@ const TEMPLATED: { pattern: string; display: string; liveSeed?: LiveSeed; static
79111
79245
  }
79112
79246
  }
79113
79247
  },
79248
+ {
79249
+ "id": "post_delete_confirmation",
79250
+ "body": {
79251
+ "package": "himalaya",
79252
+ "type": "VStack",
79253
+ "props": {
79254
+ "spacing": 10,
79255
+ "alignment": "leading",
79256
+ "children": [
79257
+ {
79258
+ "id": "post_delete_confirmation.title",
79259
+ "body": {
79260
+ "package": "himalaya",
79261
+ "type": "Text",
79262
+ "props": {
79263
+ "text": "Delete this post?",
79264
+ "style": "bodyEmphasis"
79265
+ }
79266
+ }
79267
+ },
79268
+ {
79269
+ "id": "post_delete_confirmation.record",
79270
+ "body": {
79271
+ "package": "himalaya",
79272
+ "type": "Text",
79273
+ "props": {
79274
+ "text": "$service:himiOwnerLitePost.title",
79275
+ "style": "body",
79276
+ "color": "textSecondary",
79277
+ "maxLines": 2
79278
+ }
79279
+ }
79280
+ },
79281
+ {
79282
+ "id": "",
79283
+ "body": {
79284
+ "package": "himalaya",
79285
+ "type": "Text",
79286
+ "props": {
79287
+ "text": "This cannot be undone.",
79288
+ "style": "footnote",
79289
+ "color": "textSecondary"
79290
+ }
79291
+ }
79292
+ },
79293
+ {
79294
+ "id": "",
79295
+ "body": {
79296
+ "package": "himalaya",
79297
+ "type": "HStack",
79298
+ "props": {
79299
+ "spacing": 8,
79300
+ "children": [
79301
+ {
79302
+ "id": "post_delete_cancel",
79303
+ "body": {
79304
+ "package": "himalaya",
79305
+ "type": "Button",
79306
+ "props": {
79307
+ "title": "Cancel",
79308
+ "style": "secondary",
79309
+ "action": {
79310
+ "actionId": "tier5.himiOwnerLitePost.cancelDelete"
79311
+ }
79312
+ }
79313
+ }
79314
+ },
79315
+ {
79316
+ "id": "post_delete_confirm",
79317
+ "body": {
79318
+ "package": "himalaya",
79319
+ "type": "Button",
79320
+ "props": {
79321
+ "title": "Delete",
79322
+ "style": "destructive",
79323
+ "action": {
79324
+ "actionId": "tier5.himiOwnerLitePost.confirmDelete"
79325
+ }
79326
+ }
79327
+ }
79328
+ }
79329
+ ]
79330
+ }
79331
+ }
79332
+ }
79333
+ ]
79334
+ }
79335
+ },
79336
+ "modifiers": {
79337
+ "background": {
79338
+ "token": "surfaceElevated"
79339
+ },
79340
+ "border": {
79341
+ "width": 1,
79342
+ "color": {
79343
+ "token": "danger"
79344
+ }
79345
+ },
79346
+ "cornerRadius": 12,
79347
+ "padding": {
79348
+ "leading": 14,
79349
+ "trailing": 14,
79350
+ "top": 14,
79351
+ "bottom": 14
79352
+ },
79353
+ "fillMaxWidth": true,
79354
+ "hiddenPath": "$service:himiOwnerLitePost.noDeleteConfirmation"
79355
+ }
79356
+ },
79114
79357
  {
79115
79358
  "id": "",
79116
79359
  "body": {