@wix/himalaya-cli 0.940.0 → 0.941.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 (50) hide show
  1. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/genie-chat/src/index.d.ts +32 -0
  2. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-genie-chat.mjs +22 -1
  3. package/dist/cli.mjs +0 -2
  4. package/guides/sdk-reference.json +19 -1
  5. package/guides/tier-5-add-a-screen.md +113 -0
  6. package/package.json +2 -2
  7. package/templates/beauty-salon-owner/dev/index.ts +57 -0
  8. package/templates/beauty-salon-owner/tier5-src/_shared/aria-chat.ts +367 -16
  9. package/templates/beauty-salon-owner/tier5-src/_shared/aria-widgets.ts +45 -0
  10. package/templates/beauty-salon-owner/tier5-src/himi-owner-lite-aria/index.ts +15 -1
  11. package/templates/community-club-owner/dev/index.ts +57 -0
  12. package/templates/community-club-owner/tier5-src/_shared/aria-chat.ts +367 -16
  13. package/templates/community-club-owner/tier5-src/_shared/aria-widgets.ts +45 -0
  14. package/templates/community-club-owner/tier5-src/himi-owner-lite-aria/index.ts +15 -1
  15. package/templates/events-meetups-owner/dev/index.ts +57 -0
  16. package/templates/events-meetups-owner/tier5-src/_shared/aria-chat.ts +367 -16
  17. package/templates/events-meetups-owner/tier5-src/_shared/aria-widgets.ts +45 -0
  18. package/templates/events-meetups-owner/tier5-src/himi-owner-lite-aria/index.ts +15 -1
  19. package/templates/gym-fitness-owner/dev/index.ts +57 -0
  20. package/templates/gym-fitness-owner/tier5-src/_shared/aria-chat.ts +367 -16
  21. package/templates/gym-fitness-owner/tier5-src/_shared/aria-widgets.ts +45 -0
  22. package/templates/gym-fitness-owner/tier5-src/himi-owner-lite-aria/index.ts +15 -1
  23. package/templates/nonprofit-cause-owner/dev/index.ts +57 -0
  24. package/templates/nonprofit-cause-owner/tier5-src/_shared/aria-chat.ts +367 -16
  25. package/templates/nonprofit-cause-owner/tier5-src/_shared/aria-widgets.ts +45 -0
  26. package/templates/nonprofit-cause-owner/tier5-src/himi-owner-lite-aria/index.ts +15 -1
  27. package/templates/owner-lite/dev/index.ts +57 -0
  28. package/templates/owner-lite/tier5-src/_shared/aria-chat.ts +367 -16
  29. package/templates/owner-lite/tier5-src/_shared/aria-widgets.ts +45 -0
  30. package/templates/owner-lite/tier5-src/himi-owner-lite-aria/index.ts +15 -1
  31. package/templates/podcast-creator-owner/dev/index.ts +57 -0
  32. package/templates/podcast-creator-owner/tier5-src/_shared/aria-chat.ts +367 -16
  33. package/templates/podcast-creator-owner/tier5-src/_shared/aria-widgets.ts +45 -0
  34. package/templates/podcast-creator-owner/tier5-src/himi-owner-lite-aria/index.ts +15 -1
  35. package/templates/portfolio-creative-owner/dev/index.ts +57 -0
  36. package/templates/portfolio-creative-owner/tier5-src/_shared/aria-chat.ts +367 -16
  37. package/templates/portfolio-creative-owner/tier5-src/_shared/aria-widgets.ts +45 -0
  38. package/templates/portfolio-creative-owner/tier5-src/himi-owner-lite-aria/index.ts +15 -1
  39. package/templates/restaurant-owner/dev/index.ts +57 -0
  40. package/templates/restaurant-owner/tier5-src/_shared/aria-chat.ts +367 -16
  41. package/templates/restaurant-owner/tier5-src/_shared/aria-widgets.ts +45 -0
  42. package/templates/restaurant-owner/tier5-src/himi-owner-lite-aria/index.ts +15 -1
  43. package/templates/retail-store-owner/dev/index.ts +57 -0
  44. package/templates/retail-store-owner/tier5-src/_shared/aria-chat.ts +367 -16
  45. package/templates/retail-store-owner/tier5-src/_shared/aria-widgets.ts +45 -0
  46. package/templates/retail-store-owner/tier5-src/himi-owner-lite-aria/index.ts +15 -1
  47. package/templates/yoga-studio-owner/dev/index.ts +57 -0
  48. package/templates/yoga-studio-owner/tier5-src/_shared/aria-chat.ts +367 -16
  49. package/templates/yoga-studio-owner/tier5-src/_shared/aria-widgets.ts +45 -0
  50. package/templates/yoga-studio-owner/tier5-src/himi-owner-lite-aria/index.ts +15 -1
@@ -141,6 +141,7 @@ const core = createAriaChat({
141
141
  you: () => copyParam("ownerAria.you", "You"),
142
142
  typing: () => copyParam("ownerAria.typing", "Aria is typing…"),
143
143
  slow: () => copyParam("ownerAria.slow", "Aria is taking a while…"),
144
+ stopped: () => copyParam("ownerAria.stopped", "Stopped."),
144
145
  // Shown when the HOST carries no Wix app binding, so no Wix call can leave
145
146
  // the browser (the web preview). Through copyParam like every other string
146
147
  // here — a default baked into the shared core cannot be localized by this
@@ -173,8 +174,17 @@ const svc = defineService<AriaChatState, {
173
174
  submitPrompt: (s: AriaChatState, arg?: AriaActionArg) => Promise<AriaChatState>;
174
175
  newChat: (s: AriaChatState) => Promise<AriaChatState>;
175
176
  typing: (s: AriaChatState, arg?: AriaActionArg) => AriaChatState;
176
- tick: (s: AriaChatState) => Promise<AriaChatState>;
177
+ // `undefined` is part of the contract, not sloppiness: a tick whose read was
178
+ // in flight across a turn boundary returns nothing, so the runtime merges
179
+ // nothing, rather than reinstating a pre-Stop snapshot over the stop. Other
180
+ // shipped workers declare the same shape (himi-chat, himi-branded-lite-order).
181
+ tick: (s: AriaChatState) => Promise<AriaChatState | undefined>;
177
182
  openLink: (s: AriaChatState, arg?: AriaActionArg) => Promise<AriaChatState>;
183
+ // `undefined` for the same reason `tick` has it, and it is the same race:
184
+ // a Stop whose abort was in flight across a turn boundary (a fresh send, a
185
+ // new chat) holds a pre-boundary snapshot, and committing it would end the
186
+ // turn the owner has since started.
187
+ stop: (s: AriaChatState) => Promise<AriaChatState | undefined>;
178
188
  }>(SERVICE, {
179
189
  state: core.initialState,
180
190
  actions: {
@@ -190,6 +200,10 @@ const svc = defineService<AriaChatState, {
190
200
  // a `poll-action-missing` error in `himi test --content`.
191
201
  tick: core.tick,
192
202
  openLink: core.openLink,
203
+ // The descriptor's Stop control, which is collapsed unless `stopHidden` is
204
+ // false — so this is only ever dispatched while a reply is outstanding and
205
+ // the worker is holding the handle that can abort it.
206
+ stop: core.stop,
193
207
  },
194
208
  });
195
209
 
@@ -55106,6 +55106,63 @@ const SCREENS = runtimeSetting({
55106
55106
  }
55107
55107
  }
55108
55108
  },
55109
+ {
55110
+ "id": "himi_owner_lite_aria.stop",
55111
+ "body": {
55112
+ "package": "himalaya",
55113
+ "type": "HStack",
55114
+ "props": {
55115
+ "spacing": 6,
55116
+ "children": [
55117
+ {
55118
+ "id": "",
55119
+ "body": {
55120
+ "package": "himalaya",
55121
+ "type": "Spacer",
55122
+ "props": {}
55123
+ }
55124
+ },
55125
+ {
55126
+ "id": "",
55127
+ "body": {
55128
+ "package": "himalaya",
55129
+ "type": "Icon",
55130
+ "props": {
55131
+ "name": "close",
55132
+ "size": 14,
55133
+ "tint": "accentPrimary"
55134
+ }
55135
+ }
55136
+ },
55137
+ {
55138
+ "id": "",
55139
+ "body": {
55140
+ "package": "himalaya",
55141
+ "type": "Text",
55142
+ "props": {
55143
+ "text": "Stop",
55144
+ "style": "footnote",
55145
+ "color": "accentPrimary",
55146
+ "maxLines": 1
55147
+ }
55148
+ }
55149
+ }
55150
+ ]
55151
+ }
55152
+ },
55153
+ "modifiers": {
55154
+ "padding": {
55155
+ "leading": 0,
55156
+ "trailing": 0,
55157
+ "top": 4,
55158
+ "bottom": 0
55159
+ },
55160
+ "onTap": {
55161
+ "actionId": "tier5.himiOwnerLiteAria.stop"
55162
+ },
55163
+ "hiddenPath": "$service:himiOwnerLiteAria.stopHidden"
55164
+ }
55165
+ },
55109
55166
  {
55110
55167
  "id": "",
55111
55168
  "body": {