@wix/himalaya-cli 0.1748.0 → 0.1749.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 (170) hide show
  1. package/bin/himi +16 -0
  2. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/dev-server/src/builder.d.ts +3 -0
  3. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/ts/src/schema.d.ts +9 -0
  4. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/l10n.mjs +1 -1
  5. package/dist/browser-plane/assets.json +7 -7
  6. package/dist/browser-plane/preview-deferred/{63821bbb8f637899037252154a5587f0596e4b537173c7f50551f9e44f7c22c0.bin → b40ea5d0d6251898ff5617139fde8be008dd11e99a70b14c1052093685401700.bin} +1 -1
  7. package/dist/browser-plane/sw.js +6 -6
  8. package/dist/browser-plane/t5-frame.html +1 -1
  9. package/dist/browser-plane/t5-worker-frame.html +1 -1
  10. package/dist/cli.mjs +118 -67
  11. package/dist/preview-assets.generated.bin +0 -0
  12. package/guides/component-reference.json +1 -1
  13. package/guides/component-reference.md +9 -0
  14. package/package.json +2 -2
  15. package/template-icons/medical-services.png +0 -0
  16. package/templates/beauty-salon/dev/index.ts +1 -0
  17. package/templates/beauty-salon/l10n/en.json +6 -0
  18. package/templates/beauty-salon/l10n/fr.json +11 -0
  19. package/templates/beauty-salon/l10n/he.json +9 -0
  20. package/templates/beauty-salon/tier5-src/_shared/member-bookings.ts +17 -4
  21. package/templates/beauty-salon/tier5-src/_shared/staff-name.ts +18 -0
  22. package/templates/beauty-salon/tier5-src/himi-booking-bookings/index.ts +6 -2
  23. package/templates/beauty-salon/tier5-src/himi-booking-service/index.ts +7 -2
  24. package/templates/beauty-salon/tier5-src/himi-booking-time/index.ts +6 -4
  25. package/templates/beauty-salon-owner/dev/index.ts +54 -0
  26. package/templates/beauty-salon-owner/tier5-src/_shared/aria-chat.ts +30 -4
  27. package/templates/beauty-salon-owner/tier5-src/himi-owner-lite-aria/index.ts +29 -0
  28. package/templates/branded-lite/dev/index.ts +1 -0
  29. package/templates/branded-lite/l10n/fr.json +5 -0
  30. package/templates/branded-lite/l10n/he.json +4 -0
  31. package/templates/branded-lite/tier5-src/_shared/member-bookings.ts +17 -4
  32. package/templates/branded-lite/tier5-src/_shared/staff-name.ts +18 -0
  33. package/templates/branded-lite/tier5-src/himi-booking-bookings/index.ts +6 -2
  34. package/templates/branded-lite/tier5-src/himi-booking-service/index.ts +7 -2
  35. package/templates/branded-lite/tier5-src/himi-booking-time/index.ts +6 -4
  36. package/templates/community-club/dev/index.ts +1 -0
  37. package/templates/community-club/tier5-src/_shared/member-bookings.ts +17 -4
  38. package/templates/community-club-owner/dev/index.ts +54 -0
  39. package/templates/community-club-owner/tier5-src/_shared/aria-chat.ts +30 -4
  40. package/templates/community-club-owner/tier5-src/himi-owner-lite-aria/index.ts +29 -0
  41. package/templates/conference/dev/index.ts +1 -0
  42. package/templates/events-meetups/dev/index.ts +1 -0
  43. package/templates/events-meetups/tier5-src/_shared/member-bookings.ts +17 -4
  44. package/templates/events-meetups-owner/dev/index.ts +54 -0
  45. package/templates/events-meetups-owner/tier5-src/_shared/aria-chat.ts +30 -4
  46. package/templates/events-meetups-owner/tier5-src/himi-owner-lite-aria/index.ts +29 -0
  47. package/templates/gym-fitness/dev/index.ts +1 -0
  48. package/templates/gym-fitness/l10n/en.json +6 -0
  49. package/templates/gym-fitness/l10n/fr.json +11 -0
  50. package/templates/gym-fitness/l10n/he.json +9 -0
  51. package/templates/gym-fitness/tier5-src/_shared/member-bookings.ts +17 -4
  52. package/templates/gym-fitness/tier5-src/_shared/staff-name.ts +18 -0
  53. package/templates/gym-fitness/tier5-src/himi-booking-bookings/index.ts +6 -2
  54. package/templates/gym-fitness/tier5-src/himi-booking-service/index.ts +7 -2
  55. package/templates/gym-fitness/tier5-src/himi-booking-time/index.ts +6 -4
  56. package/templates/gym-fitness-owner/dev/index.ts +54 -0
  57. package/templates/gym-fitness-owner/tier5-src/_shared/aria-chat.ts +30 -4
  58. package/templates/gym-fitness-owner/tier5-src/himi-owner-lite-aria/index.ts +29 -0
  59. package/templates/medical-services/README.md +53 -0
  60. package/templates/medical-services/config.ts +320 -0
  61. package/templates/medical-services/dev/index.ts +17783 -0
  62. package/templates/medical-services/himalaya.content.json +46 -0
  63. package/templates/medical-services/himalaya.template.json +14 -0
  64. package/templates/medical-services/icon.png +0 -0
  65. package/templates/medical-services/platforms.json +1 -0
  66. package/templates/medical-services/tier5-src/_shared/app-locale.ts +61 -0
  67. package/templates/medical-services/tier5-src/_shared/booking-location.ts +147 -0
  68. package/templates/medical-services/tier5-src/_shared/booking-session.ts +222 -0
  69. package/templates/medical-services/tier5-src/_shared/branded-lite-hosted.ts +280 -0
  70. package/templates/medical-services/tier5-src/_shared/branded-load-state.ts +109 -0
  71. package/templates/medical-services/tier5-src/_shared/business-chat-copy.ts +40 -0
  72. package/templates/medical-services/tier5-src/_shared/business-chat-history.ts +51 -0
  73. package/templates/medical-services/tier5-src/_shared/business-chat-message-model.ts +177 -0
  74. package/templates/medical-services/tier5-src/_shared/business-chat-model.ts +56 -0
  75. package/templates/medical-services/tier5-src/_shared/business-chat-presenter.ts +576 -0
  76. package/templates/medical-services/tier5-src/_shared/business-chat-transport.ts +148 -0
  77. package/templates/medical-services/tier5-src/_shared/collection-contract.ts +228 -0
  78. package/templates/medical-services/tier5-src/_shared/collection-query.ts +193 -0
  79. package/templates/medical-services/tier5-src/_shared/collection-service.ts +400 -0
  80. package/templates/medical-services/tier5-src/_shared/engine-intl.ts +523 -0
  81. package/templates/medical-services/tier5-src/_shared/faq-list.ts +405 -0
  82. package/templates/medical-services/tier5-src/_shared/himi-account.ts +194 -0
  83. package/templates/medical-services/tier5-src/_shared/himi-booking-saved.ts +88 -0
  84. package/templates/medical-services/tier5-src/_shared/himi-bookings.ts +318 -0
  85. package/templates/medical-services/tier5-src/_shared/himi-copy.ts +116 -0
  86. package/templates/medical-services/tier5-src/_shared/himi-store.ts +7 -0
  87. package/templates/medical-services/tier5-src/_shared/himi-text.ts +24 -0
  88. package/templates/medical-services/tier5-src/_shared/host-events.ts +66 -0
  89. package/templates/medical-services/tier5-src/_shared/hosted-checkout.ts +70 -0
  90. package/templates/medical-services/tier5-src/_shared/iap-attendance-form.ts +106 -0
  91. package/templates/medical-services/tier5-src/_shared/iap-attendance-purchase.ts +216 -0
  92. package/templates/medical-services/tier5-src/_shared/iap-attendance.ts +38 -0
  93. package/templates/medical-services/tier5-src/_shared/iap-worker.ts +127 -0
  94. package/templates/medical-services/tier5-src/_shared/inbox-rooms.ts +68 -0
  95. package/templates/medical-services/tier5-src/_shared/local-preferences.ts +38 -0
  96. package/templates/medical-services/tier5-src/_shared/member-access.ts +52 -0
  97. package/templates/medical-services/tier5-src/_shared/member-account-routes.ts +52 -0
  98. package/templates/medical-services/tier5-src/_shared/member-bookings.ts +107 -0
  99. package/templates/medical-services/tier5-src/_shared/member-screen.ts +99 -0
  100. package/templates/medical-services/tier5-src/_shared/notification-target.ts +141 -0
  101. package/templates/medical-services/tier5-src/_shared/offset-page.ts +10 -0
  102. package/templates/medical-services/tier5-src/_shared/online-actions.ts +76 -0
  103. package/templates/medical-services/tier5-src/_shared/owner-load-error.ts +348 -0
  104. package/templates/medical-services/tier5-src/_shared/payment-setup.ts +6 -0
  105. package/templates/medical-services/tier5-src/_shared/rich-body.ts +78 -0
  106. package/templates/medical-services/tier5-src/_shared/rich-content-link.ts +34 -0
  107. package/templates/medical-services/tier5-src/_shared/sign-in-sheet.ts +18 -0
  108. package/templates/medical-services/tier5-src/_shared/staff-name.ts +18 -0
  109. package/templates/medical-services/tier5-src/_shared/weekly-goal.ts +107 -0
  110. package/templates/medical-services/tier5-src/_shared/wix-bi.ts +85 -0
  111. package/templates/medical-services/tier5-src/_shared/wix-member-links.ts +114 -0
  112. package/templates/medical-services/tier5-src/_shared/wix-service-price.ts +146 -0
  113. package/templates/medical-services/tier5-src/business-chat/index.ts +732 -0
  114. package/templates/medical-services/tier5-src/himi-booking-account/index.ts +252 -0
  115. package/templates/medical-services/tier5-src/himi-booking-bookings/index.ts +468 -0
  116. package/templates/medical-services/tier5-src/himi-booking-service/index.ts +1190 -0
  117. package/templates/medical-services/tier5-src/himi-booking-services/index.ts +791 -0
  118. package/templates/medical-services/tier5-src/himi-booking-time/index.ts +1729 -0
  119. package/templates/medical-services/tier5-src/himi-branded-lite-faq/index.ts +6 -0
  120. package/templates/medical-services/tier5-src/himi-branded-lite-notifications/index.ts +256 -0
  121. package/templates/medical-services/tier5-src/himi-clinic-home/index.ts +389 -0
  122. package/templates/medical-services/tier5-src/himi-store-account/index.ts +998 -0
  123. package/templates/medical-services/tokens.json +418 -0
  124. package/templates/nonprofit-cause/dev/index.ts +1 -0
  125. package/templates/nonprofit-cause/tier5-src/_shared/member-bookings.ts +17 -4
  126. package/templates/nonprofit-cause-owner/dev/index.ts +54 -0
  127. package/templates/nonprofit-cause-owner/tier5-src/_shared/aria-chat.ts +30 -4
  128. package/templates/nonprofit-cause-owner/tier5-src/himi-owner-lite-aria/index.ts +29 -0
  129. package/templates/owner-lite/dev/index.ts +54 -0
  130. package/templates/owner-lite/tier5-src/_shared/aria-chat.ts +30 -4
  131. package/templates/owner-lite/tier5-src/himi-owner-lite-aria/index.ts +29 -0
  132. package/templates/podcast-creator/dev/index.ts +1 -0
  133. package/templates/podcast-creator/tier5-src/_shared/member-bookings.ts +17 -4
  134. package/templates/podcast-creator-owner/dev/index.ts +54 -0
  135. package/templates/podcast-creator-owner/tier5-src/_shared/aria-chat.ts +30 -4
  136. package/templates/podcast-creator-owner/tier5-src/himi-owner-lite-aria/index.ts +29 -0
  137. package/templates/portfolio-creative/dev/index.ts +1 -0
  138. package/templates/portfolio-creative/tier5-src/_shared/member-bookings.ts +17 -4
  139. package/templates/portfolio-creative-owner/dev/index.ts +54 -0
  140. package/templates/portfolio-creative-owner/tier5-src/_shared/aria-chat.ts +30 -4
  141. package/templates/portfolio-creative-owner/tier5-src/himi-owner-lite-aria/index.ts +29 -0
  142. package/templates/restaurant/dev/index.ts +1 -0
  143. package/templates/restaurant/tier5-src/_shared/member-bookings.ts +17 -4
  144. package/templates/restaurant-owner/dev/index.ts +54 -0
  145. package/templates/restaurant-owner/tier5-src/_shared/aria-chat.ts +30 -4
  146. package/templates/restaurant-owner/tier5-src/himi-owner-lite-aria/index.ts +29 -0
  147. package/templates/retail-store/dev/index.ts +1 -0
  148. package/templates/retail-store/tier5-src/_shared/member-bookings.ts +17 -4
  149. package/templates/retail-store-owner/dev/index.ts +54 -0
  150. package/templates/retail-store-owner/tier5-src/_shared/aria-chat.ts +30 -4
  151. package/templates/retail-store-owner/tier5-src/himi-owner-lite-aria/index.ts +29 -0
  152. package/templates/salon-spa/dev/index.ts +1 -0
  153. package/templates/salon-spa/tier5-src/_shared/member-bookings.ts +17 -4
  154. package/templates/salon-spa/tier5-src/_shared/staff-name.ts +18 -0
  155. package/templates/salon-spa/tier5-src/himi-booking-bookings/index.ts +6 -2
  156. package/templates/salon-spa/tier5-src/himi-booking-service/index.ts +7 -2
  157. package/templates/salon-spa/tier5-src/himi-booking-time/index.ts +6 -4
  158. package/templates/wholesale-store/dev/index.ts +1 -0
  159. package/templates/yoga-studio/dev/index.ts +1 -0
  160. package/templates/yoga-studio/l10n/en.json +6 -0
  161. package/templates/yoga-studio/l10n/fr.json +11 -0
  162. package/templates/yoga-studio/l10n/he.json +9 -0
  163. package/templates/yoga-studio/tier5-src/_shared/member-bookings.ts +17 -4
  164. package/templates/yoga-studio/tier5-src/_shared/staff-name.ts +18 -0
  165. package/templates/yoga-studio/tier5-src/himi-booking-bookings/index.ts +6 -2
  166. package/templates/yoga-studio/tier5-src/himi-booking-service/index.ts +7 -2
  167. package/templates/yoga-studio/tier5-src/himi-booking-time/index.ts +6 -4
  168. package/templates/yoga-studio-owner/dev/index.ts +54 -0
  169. package/templates/yoga-studio-owner/tier5-src/_shared/aria-chat.ts +30 -4
  170. package/templates/yoga-studio-owner/tier5-src/himi-owner-lite-aria/index.ts +29 -0
@@ -55,6 +55,8 @@ import { copyParam, copyTemplate, stashCopy } from "../_shared/himi-copy.js";
55
55
  import { OWNER_MODULES, ownerModuleIds, ownerModuleScreen } from "../_shared/owner-modules.js";
56
56
 
57
57
  const SERVICE = "himiOwnerLiteAria";
58
+ /** The current turn's quick-reply row — this run's state only, never restored. */
59
+ const QUICK_REPLY_KEYS: Array<"quickReplies" | "quickRepliesHidden"> = ["quickReplies", "quickRepliesHidden"];
58
60
 
59
61
  // Cadence for the reply ladder. `fast` while a reply is outstanding; `idle`
60
62
  // afterwards, because a worker cannot CANCEL a poll — PollDirective has no stop
@@ -477,6 +479,7 @@ const svc = defineService<AriaChatState, {
477
479
  load: (s: AriaChatState, arg?: AriaActionArg) => Promise<AriaChatState>;
478
480
  submit: (s: AriaChatState, arg?: AriaActionArg) => Promise<AriaChatState>;
479
481
  submitPrompt: (s: AriaChatState, arg?: AriaActionArg) => Promise<AriaChatState>;
482
+ submitQuickReply: (s: AriaChatState, arg?: AriaActionArg) => Promise<AriaChatState>;
480
483
  newChat: (s: AriaChatState) => Promise<AriaChatState>;
481
484
  typing: (s: AriaChatState, arg?: AriaActionArg) => AriaChatState;
482
485
  // `undefined` is part of the contract, not sloppiness: a tick whose read was
@@ -527,6 +530,10 @@ const svc = defineService<AriaChatState, {
527
530
  suggestionsSettled: (s: AriaChatState, arg?: AriaActionArg) => AriaChatState | undefined;
528
531
  }>(SERVICE, {
529
532
  state: core.initialState,
533
+ // Quick replies belong to the turn that is live in THIS run's realtime model. A
534
+ // persisted row would paint (and announce) last session's offers before `load`,
535
+ // and every tap on them would be refused, because the live model starts empty.
536
+ notHydrated: QUICK_REPLY_KEYS,
530
537
  actions: {
531
538
  // `load` is the onAppear dispatch, so it is where the copy pack arrives.
532
539
  load: (s, arg) => { mentionDraftRevision += 1; mentionTriggerPrefixes = []; pendingMentionTrigger = null; previousMentionRaw = ""; adoptedMentionDraft = null; stashCopy(arg); stashTargets(arg); stashRealtimeUrl(arg); return core.load(s); },
@@ -552,6 +559,18 @@ const svc = defineService<AriaChatState, {
552
559
  }
553
560
  return next;
554
561
  },
562
+ // A server-offered quick reply sends through submitPrompt in the core, so it
563
+ // settles the mention draft exactly as a suggested-prompt tap does.
564
+ submitQuickReply: async (s, arg) => {
565
+ const previousPrefixes = mentionTriggerPrefixes; const previousTrigger = pendingMentionTrigger;
566
+ const revision = mentionDraftRevision;
567
+ const next = await core.submitQuickReply(s, arg);
568
+ if (revision === mentionDraftRevision) {
569
+ if (next.input && next.input === s.input) { mentionTriggerPrefixes = previousPrefixes; pendingMentionTrigger = previousTrigger; }
570
+ else { mentionTriggerPrefixes = []; pendingMentionTrigger = null; previousMentionRaw = ""; adoptedMentionDraft = null; }
571
+ }
572
+ return next;
573
+ },
555
574
  newChat: (s) => { mentionDraftRevision += 1; mentionTriggerPrefixes = []; pendingMentionTrigger = null; previousMentionRaw = ""; adoptedMentionDraft = null; return core.newChat(s); },
556
575
  // The composer's onChange. Mirrors the draft into state so `submit` can
557
576
  // empty it and the field actually clears.
@@ -648,6 +667,16 @@ const svc = defineService<AriaChatState, {
648
667
  },
649
668
  });
650
669
 
670
+ // A binary older than `notHydrated` restores the persisted row anyway; put those keys
671
+ // back to their declared values before any action runs (as iap-worker's
672
+ // resetUnhydratedKeysOnOlderRuntime does), so no host paints a previous run's offers.
673
+ if ((globalThis as { himalaya?: { hydrationOptOut?: unknown } }).himalaya?.hydrationOptOut !== true) {
674
+ const booted = svc.getState() as unknown as Record<string, unknown> | undefined;
675
+ if (booted && typeof booted === "object") {
676
+ for (const key of QUICK_REPLY_KEYS) booted[key] = (core.initialState as unknown as Record<string, unknown>)[key];
677
+ }
678
+ }
679
+
651
680
  // NO module-scope `svc.load()`, deliberately — the descriptor's `onAppear` is the
652
681
  // only entry point, and on Android the self-kick did not merely duplicate it, it
653
682
  // DISABLED the screen.