@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
@@ -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
  {
@@ -50672,7 +50672,8 @@ const SCREENS = runtimeSetting({
50672
50672
  "props": {
50673
50673
  "text": "$service:himiOwnerLiteManage.summary",
50674
50674
  "style": "caption",
50675
- "color": "textSecondary"
50675
+ "color": "textSecondary",
50676
+ "collapseWhenEmpty": true
50676
50677
  }
50677
50678
  }
50678
50679
  },
@@ -51267,6 +51268,9 @@ const SCREENS = runtimeSetting({
51267
51268
  }
51268
51269
  ]
51269
51270
  }
51271
+ },
51272
+ "modifiers": {
51273
+ "hiddenPath": "$service:himiOwnerLiteManage.noSections"
51270
51274
  }
51271
51275
  },
51272
51276
  {
@@ -56106,7 +56110,7 @@ const SCREENS = runtimeSetting({
56106
56110
  "package": "himalaya",
56107
56111
  "type": "HStack",
56108
56112
  "props": {
56109
- "spacing": 16,
56113
+ "spacing": 0,
56110
56114
  "children": [
56111
56115
  {
56112
56116
  "id": "",
@@ -56117,43 +56121,57 @@ const SCREENS = runtimeSetting({
56117
56121
  }
56118
56122
  },
56119
56123
  {
56120
- "id": "himi_owner_lite_aria.history",
56121
- "body": {
56122
- "package": "himalaya",
56123
- "type": "Text",
56124
- "props": {
56125
- "text": "History",
56126
- "style": "bodyEmphasis",
56127
- "color": "accentPrimary",
56128
- "maxLines": 1
56129
- }
56130
- },
56131
- "modifiers": {
56132
- "onTap": {
56133
- "actionId": "himi.open",
56134
- "params": {
56135
- "screenId": "himi_owner_lite_aria_history"
56136
- }
56137
- }
56138
- }
56139
- },
56140
- {
56141
- "id": "himi_owner_lite_aria.newchat",
56124
+ "id": "",
56142
56125
  "body": {
56143
56126
  "package": "himalaya",
56144
- "type": "Icon",
56127
+ "type": "HStack",
56145
56128
  "props": {
56146
- "name": "edit",
56147
- "size": 22,
56148
- "tint": "accentPrimary"
56129
+ "spacing": 16,
56130
+ "children": [
56131
+ {
56132
+ "id": "himi_owner_lite_aria.history",
56133
+ "body": {
56134
+ "package": "himalaya",
56135
+ "type": "Text",
56136
+ "props": {
56137
+ "text": "History",
56138
+ "style": "bodyEmphasis",
56139
+ "color": "accentPrimary",
56140
+ "maxLines": 1
56141
+ }
56142
+ },
56143
+ "modifiers": {
56144
+ "onTap": {
56145
+ "actionId": "himi.open",
56146
+ "params": {
56147
+ "screenId": "himi_owner_lite_aria_history"
56148
+ }
56149
+ }
56150
+ }
56151
+ },
56152
+ {
56153
+ "id": "himi_owner_lite_aria.newchat",
56154
+ "body": {
56155
+ "package": "himalaya",
56156
+ "type": "Icon",
56157
+ "props": {
56158
+ "name": "edit",
56159
+ "size": 22,
56160
+ "tint": "accentPrimary"
56161
+ }
56162
+ },
56163
+ "modifiers": {
56164
+ "onTap": {
56165
+ "actionId": "tier5.himiOwnerLiteAria.newChat"
56166
+ },
56167
+ "accessibilityLabel": "New chat",
56168
+ "accessibilityRole": "button",
56169
+ "width": 44,
56170
+ "height": 44
56171
+ }
56172
+ }
56173
+ ]
56149
56174
  }
56150
- },
56151
- "modifiers": {
56152
- "onTap": {
56153
- "actionId": "tier5.himiOwnerLiteAria.newChat"
56154
- },
56155
- "accessibilityLabel": "New chat",
56156
- "accessibilityRole": "button"
56157
56175
  }
56158
56176
  }
56159
56177
  ]
@@ -56514,6 +56532,9 @@ const SCREENS = runtimeSetting({
56514
56532
  }
56515
56533
  ]
56516
56534
  }
56535
+ },
56536
+ "modifiers": {
56537
+ "hiddenPath": "$service:himiOwnerLiteAria.messagesHidden"
56517
56538
  }
56518
56539
  },
56519
56540
  {
@@ -56812,7 +56833,8 @@ const SCREENS = runtimeSetting({
56812
56833
  "text": "$service:himiOwnerLiteAria.error",
56813
56834
  "style": "footnote",
56814
56835
  "color": "danger",
56815
- "maxLines": 3
56836
+ "maxLines": 3,
56837
+ "collapseWhenEmpty": true
56816
56838
  }
56817
56839
  },
56818
56840
  "modifiers": {
@@ -61049,6 +61071,9 @@ const SCREENS = runtimeSetting({
61049
61071
  }
61050
61072
  ]
61051
61073
  }
61074
+ },
61075
+ "modifiers": {
61076
+ "hiddenPath": "$service:himiOwnerLiteAriaHistory.itemsHidden"
61052
61077
  }
61053
61078
  }
61054
61079
  ]
@@ -73811,6 +73836,115 @@ const TEMPLATED: { pattern: string; display: string; liveSeed?: LiveSeed; static
73811
73836
  }
73812
73837
  }
73813
73838
  },
73839
+ {
73840
+ "id": "event_delete_confirmation",
73841
+ "body": {
73842
+ "package": "himalaya",
73843
+ "type": "VStack",
73844
+ "props": {
73845
+ "spacing": 10,
73846
+ "alignment": "leading",
73847
+ "children": [
73848
+ {
73849
+ "id": "event_delete_confirmation.title",
73850
+ "body": {
73851
+ "package": "himalaya",
73852
+ "type": "Text",
73853
+ "props": {
73854
+ "text": "Delete this workshop?",
73855
+ "style": "bodyEmphasis"
73856
+ }
73857
+ }
73858
+ },
73859
+ {
73860
+ "id": "event_delete_confirmation.record",
73861
+ "body": {
73862
+ "package": "himalaya",
73863
+ "type": "Text",
73864
+ "props": {
73865
+ "text": "$service:himiOwnerLiteEvent.title",
73866
+ "style": "body",
73867
+ "color": "textSecondary",
73868
+ "maxLines": 2
73869
+ }
73870
+ }
73871
+ },
73872
+ {
73873
+ "id": "",
73874
+ "body": {
73875
+ "package": "himalaya",
73876
+ "type": "Text",
73877
+ "props": {
73878
+ "text": "This cannot be undone.",
73879
+ "style": "footnote",
73880
+ "color": "textSecondary"
73881
+ }
73882
+ }
73883
+ },
73884
+ {
73885
+ "id": "",
73886
+ "body": {
73887
+ "package": "himalaya",
73888
+ "type": "HStack",
73889
+ "props": {
73890
+ "spacing": 8,
73891
+ "children": [
73892
+ {
73893
+ "id": "event_delete_cancel",
73894
+ "body": {
73895
+ "package": "himalaya",
73896
+ "type": "Button",
73897
+ "props": {
73898
+ "title": "Cancel",
73899
+ "style": "secondary",
73900
+ "action": {
73901
+ "actionId": "tier5.himiOwnerLiteEvent.cancelDelete"
73902
+ }
73903
+ }
73904
+ }
73905
+ },
73906
+ {
73907
+ "id": "event_delete_confirm",
73908
+ "body": {
73909
+ "package": "himalaya",
73910
+ "type": "Button",
73911
+ "props": {
73912
+ "title": "Delete",
73913
+ "style": "destructive",
73914
+ "action": {
73915
+ "actionId": "tier5.himiOwnerLiteEvent.confirmDelete"
73916
+ }
73917
+ }
73918
+ }
73919
+ }
73920
+ ]
73921
+ }
73922
+ }
73923
+ }
73924
+ ]
73925
+ }
73926
+ },
73927
+ "modifiers": {
73928
+ "background": {
73929
+ "token": "surfaceElevated"
73930
+ },
73931
+ "border": {
73932
+ "width": 1,
73933
+ "color": {
73934
+ "token": "danger"
73935
+ }
73936
+ },
73937
+ "cornerRadius": 12,
73938
+ "padding": {
73939
+ "leading": 14,
73940
+ "trailing": 14,
73941
+ "top": 14,
73942
+ "bottom": 14
73943
+ },
73944
+ "fillMaxWidth": true,
73945
+ "hiddenPath": "$service:himiOwnerLiteEvent.noDeleteConfirmation"
73946
+ }
73947
+ },
73814
73948
  {
73815
73949
  "id": "",
73816
73950
  "body": {
@@ -74672,6 +74806,115 @@ const TEMPLATED: { pattern: string; display: string; liveSeed?: LiveSeed; static
74672
74806
  }
74673
74807
  }
74674
74808
  },
74809
+ {
74810
+ "id": "post_delete_confirmation",
74811
+ "body": {
74812
+ "package": "himalaya",
74813
+ "type": "VStack",
74814
+ "props": {
74815
+ "spacing": 10,
74816
+ "alignment": "leading",
74817
+ "children": [
74818
+ {
74819
+ "id": "post_delete_confirmation.title",
74820
+ "body": {
74821
+ "package": "himalaya",
74822
+ "type": "Text",
74823
+ "props": {
74824
+ "text": "Delete this journal entry?",
74825
+ "style": "bodyEmphasis"
74826
+ }
74827
+ }
74828
+ },
74829
+ {
74830
+ "id": "post_delete_confirmation.record",
74831
+ "body": {
74832
+ "package": "himalaya",
74833
+ "type": "Text",
74834
+ "props": {
74835
+ "text": "$service:himiOwnerLitePost.title",
74836
+ "style": "body",
74837
+ "color": "textSecondary",
74838
+ "maxLines": 2
74839
+ }
74840
+ }
74841
+ },
74842
+ {
74843
+ "id": "",
74844
+ "body": {
74845
+ "package": "himalaya",
74846
+ "type": "Text",
74847
+ "props": {
74848
+ "text": "This cannot be undone.",
74849
+ "style": "footnote",
74850
+ "color": "textSecondary"
74851
+ }
74852
+ }
74853
+ },
74854
+ {
74855
+ "id": "",
74856
+ "body": {
74857
+ "package": "himalaya",
74858
+ "type": "HStack",
74859
+ "props": {
74860
+ "spacing": 8,
74861
+ "children": [
74862
+ {
74863
+ "id": "post_delete_cancel",
74864
+ "body": {
74865
+ "package": "himalaya",
74866
+ "type": "Button",
74867
+ "props": {
74868
+ "title": "Cancel",
74869
+ "style": "secondary",
74870
+ "action": {
74871
+ "actionId": "tier5.himiOwnerLitePost.cancelDelete"
74872
+ }
74873
+ }
74874
+ }
74875
+ },
74876
+ {
74877
+ "id": "post_delete_confirm",
74878
+ "body": {
74879
+ "package": "himalaya",
74880
+ "type": "Button",
74881
+ "props": {
74882
+ "title": "Delete",
74883
+ "style": "destructive",
74884
+ "action": {
74885
+ "actionId": "tier5.himiOwnerLitePost.confirmDelete"
74886
+ }
74887
+ }
74888
+ }
74889
+ }
74890
+ ]
74891
+ }
74892
+ }
74893
+ }
74894
+ ]
74895
+ }
74896
+ },
74897
+ "modifiers": {
74898
+ "background": {
74899
+ "token": "surfaceElevated"
74900
+ },
74901
+ "border": {
74902
+ "width": 1,
74903
+ "color": {
74904
+ "token": "danger"
74905
+ }
74906
+ },
74907
+ "cornerRadius": 12,
74908
+ "padding": {
74909
+ "leading": 14,
74910
+ "trailing": 14,
74911
+ "top": 14,
74912
+ "bottom": 14
74913
+ },
74914
+ "fillMaxWidth": true,
74915
+ "hiddenPath": "$service:himiOwnerLitePost.noDeleteConfirmation"
74916
+ }
74917
+ },
74675
74918
  {
74676
74919
  "id": "",
74677
74920
  "body": {
@@ -79,6 +79,7 @@ import { MENTION_PAGE_SIZE, allowlisted, emptyMentionModel, mentionView,
79
79
  type MentionItemRow, type MentionLabels, type MentionModel, type MentionProvider, type MentionView } from "./aria-mentions.js";
80
80
  import { isTransportFailure, ownerTransportFailureText } from "./owner-load-error.js";
81
81
  import { LOCAL_ID_PREFIX, createRowMemo, mintLocalId, transcriptKeys, type RowMemo } from "./aria-hot-path.js";
82
+ import { calendarDay, formatClock, formatDateMedium, formatMonthDay } from "./engine-intl.js";
82
83
 
83
84
  // ---------------------------------------------------------------------------
84
85
  // Shapes
@@ -166,6 +167,9 @@ export interface AriaChatState {
166
167
  * is computed once in `gated` rather than maintained by every reducer. */
167
168
  replyActionsHidden: boolean;
168
169
  messages: AriaBubble[];
170
+ /** Collapses the transcript list while it is empty — an empty list still costs
171
+ * its parent stack a gap. Derived in `gated`, like `stopHidden`. */
172
+ messagesHidden: boolean;
169
173
  /** Non-empty ONLY on the greeting-only empty state. */
170
174
  prompts: AriaPromptChip[];
171
175
  _convId: string;
@@ -1499,7 +1503,7 @@ export function createAriaChat(o: AriaChatOptions): AriaChatCore {
1499
1503
 
1500
1504
  const initialState: AriaChatState = {
1501
1505
  status: "loading", statusText: "", error: "", input: "", copyNote: "", replyActionsHidden: true,
1502
- messages: [], prompts: [], _convId: "", _siteId: "", _pending: "", _pendingRefs: "", _pendingAttach: [],
1506
+ messages: [], messagesHidden: true, prompts: [], _convId: "", _siteId: "", _pending: "", _pendingRefs: "", _pendingAttach: [],
1503
1507
  _pendingAfter: 0, _pendingId: "", _replyAfter: 0, _srvUsers: 0, _srvAssistants: 0,
1504
1508
  _abortId: "", _turnId: "", stopHidden: true, ok: false,
1505
1509
  listening: false, micHidden: !o.dictation, listeningHidden: true,
@@ -2460,10 +2464,12 @@ export function createAriaChat(o: AriaChatOptions): AriaChatCore {
2460
2464
  const listening = s.listening === true;
2461
2465
  const micHidden = !o.dictation || dictationAvailable === false || listening;
2462
2466
  const listeningHidden = !listening;
2467
+ // And the transcript list: hidden while empty, so it costs its stack no gap.
2468
+ const messagesHidden = s.messages.length === 0;
2463
2469
  const actioned = s.stopHidden === hidden && s.replyActionsHidden === replyActionsHidden
2464
- && s.micHidden === micHidden && s.listeningHidden === listeningHidden
2470
+ && s.micHidden === micHidden && s.listeningHidden === listeningHidden && s.messagesHidden === messagesHidden
2465
2471
  ? s
2466
- : { ...s, stopHidden: hidden, replyActionsHidden, micHidden, listeningHidden };
2472
+ : { ...s, stopHidden: hidden, replyActionsHidden, micHidden, listeningHidden, messagesHidden };
2467
2473
  // The attachment projection rides the same exit, for the same reason: one
2468
2474
  // place that every action's result passes through, so no reducer can hand
2469
2475
  // back a stale copy of the chips. Seeded first, so the very first action of
@@ -3493,6 +3499,9 @@ export interface AriaHistoryState {
3493
3499
  items: AriaHistoryRow[];
3494
3500
  /** Non-empty ONLY when the list is empty (collapses otherwise). */
3495
3501
  emptyText: string;
3502
+ /** Collapses the (empty) row list, which would otherwise still cost its parent
3503
+ * stack a gap. True until a load lands rows. */
3504
+ itemsHidden: boolean;
3496
3505
  /** The business the rows in `items` belong to. A kept list is only safe to
3497
3506
  * keep while this still matches, so it is state rather than a closure — the
3498
3507
  * chat service tracks its own `_siteId` for the same reason. */
@@ -3512,6 +3521,8 @@ export interface AriaHistoryLabels {
3512
3521
  last7?: Resolvable<string>;
3513
3522
  last30?: Resolvable<string>;
3514
3523
  older?: Resolvable<string>;
3524
+ /** Prefix for a conversation from today: "Today · 9:12 AM". */
3525
+ today?: Resolvable<string>;
3515
3526
  }
3516
3527
 
3517
3528
  export interface AriaHistoryOptions {
@@ -3525,8 +3536,8 @@ export interface AriaHistoryOptions {
3525
3536
  localHistory?: boolean;
3526
3537
  }
3527
3538
 
3528
- interface BucketLabels { last7: string; last30: string; older: string; }
3529
- const STOCK_BUCKETS: BucketLabels = { last7: "Last 7 days", last30: "Last 30 days", older: "Older" };
3539
+ interface BucketLabels { last7: string; last30: string; older: string; today: string; }
3540
+ const STOCK_BUCKETS: BucketLabels = { last7: "Last 7 days", last30: "Last 30 days", older: "Older", today: "Today" };
3530
3541
 
3531
3542
  /** Parse an ISO-8601 string (serialized Timestamp) or epoch-ms into ms. 0 when
3532
3543
  * absent or unparseable. */
@@ -3539,15 +3550,17 @@ export function toMs(v: unknown): number {
3539
3550
  return 0;
3540
3551
  }
3541
3552
 
3542
- function formatTs(ms: number): string {
3553
+ /** A history card's date, through the shared engine-intl shapes: "Today · 9:12 AM" for today,
3554
+ * "Sep 21" earlier this year, "Sep 21, 2025" before that. It was `toLocaleString()` —
3555
+ * "9/24/2026, 9:12:00 AM", seconds and all. These are the owner's own
3556
+ * conversations, so the device's calendar is the right one. */
3557
+ function formatTs(ms: number, now: number, today: string): string {
3543
3558
  if (!ms) return "";
3544
- try {
3545
- const d = new Date(ms);
3546
- if (isNaN(d.getTime())) return "";
3547
- return d.toLocaleString();
3548
- } catch {
3549
- return "";
3550
- }
3559
+ const d = new Date(ms);
3560
+ if (isNaN(d.getTime())) return "";
3561
+ const day = calendarDay(d), current = calendarDay(new Date(now));
3562
+ if (day === current) return `${today} · ${formatClock(d)}`;
3563
+ return day.slice(0, 4) === current.slice(0, 4) ? formatMonthDay(d) : formatDateMedium(d);
3551
3564
  }
3552
3565
 
3553
3566
  const DAY = 24 * 60 * 60 * 1000;
@@ -3568,7 +3581,7 @@ export function bucketRows(entries: Array<{ id: string; title: string; ms: numbe
3568
3581
  const b = bucketOf(e.ms, now, labels);
3569
3582
  const section = b === lastBucket ? "" : b;
3570
3583
  lastBucket = b;
3571
- return { id: e.id, title: e.title, subtitle: formatTs(e.ms), section };
3584
+ return { id: e.id, title: e.title, subtitle: formatTs(e.ms, now, labels.today), section };
3572
3585
  });
3573
3586
  }
3574
3587
 
@@ -3601,9 +3614,10 @@ export function createAriaHistory(o: AriaHistoryOptions) {
3601
3614
  last7: res(o.labels?.last7 ?? STOCK_BUCKETS.last7),
3602
3615
  last30: res(o.labels?.last30 ?? STOCK_BUCKETS.last30),
3603
3616
  older: res(o.labels?.older ?? STOCK_BUCKETS.older),
3617
+ today: res(o.labels?.today ?? STOCK_BUCKETS.today),
3604
3618
  });
3605
3619
  const initialState: AriaHistoryState = {
3606
- status: "loading", items: [], emptyText: "", _siteId: "", failed: false,
3620
+ status: "loading", items: [], itemsHidden: true, emptyText: "", _siteId: "", failed: false,
3607
3621
  };
3608
3622
  return {
3609
3623
  initialState,
@@ -3631,7 +3645,7 @@ export function createAriaHistory(o: AriaHistoryOptions) {
3631
3645
  // owner the previous business's conversation titles, which is precisely
3632
3646
  // the leak `localHistory: false` is set to avoid.
3633
3647
  if (fetched === null && s.items.length && s._siteId === site) {
3634
- return { ...s, status: "ready", failed: true };
3648
+ return { ...s, status: "ready", itemsHidden: false, failed: true };
3635
3649
  }
3636
3650
 
3637
3651
  // A SUCCESSFUL empty answer is authoritative and DOES clear. The tempting
@@ -3651,6 +3665,7 @@ export function createAriaHistory(o: AriaHistoryOptions) {
3651
3665
  ...s,
3652
3666
  status: "ready",
3653
3667
  items,
3668
+ itemsHidden: items.length === 0,
3654
3669
  emptyText: items.length ? "" : emptyText(),
3655
3670
  _siteId: site,
3656
3671
  failed: fetched === null,