@wix/himalaya-cli 0.1525.0 → 0.1527.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 (177) hide show
  1. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/dev-server/src/builder.d.ts +14 -0
  2. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/sdk/state/src/connectivity.d.ts +5 -0
  3. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/sdk/state/src/index.d.ts +1 -0
  4. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/ts/src/schema.d.ts +22 -0
  5. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/ts/src/worker-subtree-safe-types.generated.d.ts +4 -0
  6. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/core.mjs +7 -0
  7. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/sdui.mjs +13 -0
  8. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/state.mjs +14 -0
  9. package/dist/cli.mjs +157 -40
  10. package/dist/preview-assets.generated.bin +0 -0
  11. package/guides/designing-himi-screens.md +43 -18
  12. package/guides/himi-test.md +3 -3
  13. package/guides/recipe-dynamic-list.md +7 -7
  14. package/guides/recipe-four-state.md +47 -41
  15. package/guides/recipe-search.md +1 -1
  16. package/package.json +2 -2
  17. package/templates/beauty-salon/dev/index.ts +1943 -646
  18. package/templates/beauty-salon/tier5-src/_shared/collection-service.ts +5 -1
  19. package/templates/beauty-salon/tier5-src/_shared/online-actions.ts +76 -0
  20. package/templates/beauty-salon/tier5-src/himi-booking-bookings/index.ts +1 -0
  21. package/templates/beauty-salon/tier5-src/himi-booking-time/index.ts +803 -284
  22. package/templates/beauty-salon/tier5-src/himi-branded-lite-address/index.ts +3 -1
  23. package/templates/beauty-salon/tier5-src/himi-branded-lite-addresses/index.ts +3 -1
  24. package/templates/beauty-salon/tier5-src/himi-branded-lite-agenda/index.ts +9 -1
  25. package/templates/beauty-salon/tier5-src/himi-branded-lite-cart/index.ts +3 -0
  26. package/templates/beauty-salon/tier5-src/himi-branded-lite-order/index.ts +3 -1
  27. package/templates/beauty-salon/tier5-src/himi-branded-lite-place-summary/index.ts +12 -1
  28. package/templates/beauty-salon/tier5-src/himi-branded-lite-plans/index.ts +13 -1
  29. package/templates/beauty-salon/tier5-src/himi-branded-lite-wallet/index.ts +3 -1
  30. package/templates/beauty-salon/tier5-src/himi-store-account/index.ts +69 -10
  31. package/templates/beauty-salon/tier5-src/himi-store-product/index.ts +10 -4
  32. package/templates/beauty-salon-owner/tier5-src/_shared/collection-service.ts +5 -1
  33. package/templates/beauty-salon-owner/tier5-src/_shared/online-actions.ts +76 -0
  34. package/templates/branded-lite/dev/index.ts +2404 -1020
  35. package/templates/branded-lite/tier5-src/_shared/collection-service.ts +5 -1
  36. package/templates/branded-lite/tier5-src/_shared/online-actions.ts +76 -0
  37. package/templates/branded-lite/tier5-src/business-chat/index.ts +4 -0
  38. package/templates/branded-lite/tier5-src/himi-booking-bookings/index.ts +1 -0
  39. package/templates/branded-lite/tier5-src/himi-booking-time/index.ts +803 -284
  40. package/templates/branded-lite/tier5-src/himi-branded-lite-address/index.ts +3 -1
  41. package/templates/branded-lite/tier5-src/himi-branded-lite-addresses/index.ts +3 -1
  42. package/templates/branded-lite/tier5-src/himi-branded-lite-agenda/index.ts +9 -1
  43. package/templates/branded-lite/tier5-src/himi-branded-lite-cart/index.ts +3 -0
  44. package/templates/branded-lite/tier5-src/himi-branded-lite-feed/index.ts +3 -1
  45. package/templates/branded-lite/tier5-src/himi-branded-lite-group/index.ts +3 -1
  46. package/templates/branded-lite/tier5-src/himi-branded-lite-notifications/index.ts +6 -4
  47. package/templates/branded-lite/tier5-src/himi-branded-lite-notifsettings/index.ts +6 -4
  48. package/templates/branded-lite/tier5-src/himi-branded-lite-order/index.ts +3 -1
  49. package/templates/branded-lite/tier5-src/himi-branded-lite-place-summary/index.ts +12 -1
  50. package/templates/branded-lite/tier5-src/himi-branded-lite-plans/index.ts +13 -1
  51. package/templates/branded-lite/tier5-src/himi-branded-lite-program/index.ts +3 -1
  52. package/templates/branded-lite/tier5-src/himi-branded-lite-reservations/index.ts +6 -4
  53. package/templates/branded-lite/tier5-src/himi-branded-lite-reserve/index.ts +3 -1
  54. package/templates/branded-lite/tier5-src/himi-branded-lite-wallet/index.ts +3 -1
  55. package/templates/branded-lite/tier5-src/himi-events-detail/index.ts +8 -1
  56. package/templates/branded-lite/tier5-src/himi-events-rsvp/index.ts +7 -4
  57. package/templates/branded-lite/tier5-src/himi-store-account/index.ts +69 -10
  58. package/templates/branded-lite/tier5-src/himi-store-product/index.ts +10 -4
  59. package/templates/community-club/dev/index.ts +40 -21
  60. package/templates/community-club/tier5-src/_shared/collection-service.ts +5 -1
  61. package/templates/community-club/tier5-src/_shared/online-actions.ts +76 -0
  62. package/templates/community-club/tier5-src/himi-branded-lite-feed/index.ts +3 -1
  63. package/templates/community-club/tier5-src/himi-branded-lite-group/index.ts +3 -1
  64. package/templates/community-club/tier5-src/himi-events-detail/index.ts +8 -1
  65. package/templates/community-club/tier5-src/himi-events-rsvp/index.ts +7 -4
  66. package/templates/community-club/tier5-src/himi-store-account/index.ts +69 -10
  67. package/templates/community-club-owner/tier5-src/_shared/collection-service.ts +5 -1
  68. package/templates/community-club-owner/tier5-src/_shared/online-actions.ts +76 -0
  69. package/templates/events-meetups/dev/index.ts +36 -19
  70. package/templates/events-meetups/tier5-src/_shared/collection-service.ts +5 -1
  71. package/templates/events-meetups/tier5-src/_shared/online-actions.ts +76 -0
  72. package/templates/events-meetups/tier5-src/himi-branded-lite-feed/index.ts +3 -1
  73. package/templates/events-meetups/tier5-src/himi-branded-lite-group/index.ts +3 -1
  74. package/templates/events-meetups/tier5-src/himi-events-detail/index.ts +8 -1
  75. package/templates/events-meetups/tier5-src/himi-events-rsvp/index.ts +7 -4
  76. package/templates/events-meetups/tier5-src/himi-store-account/index.ts +69 -10
  77. package/templates/events-meetups-owner/tier5-src/_shared/collection-service.ts +5 -1
  78. package/templates/events-meetups-owner/tier5-src/_shared/online-actions.ts +76 -0
  79. package/templates/gym-fitness/dev/index.ts +1944 -645
  80. package/templates/gym-fitness/tier5-src/_shared/collection-service.ts +5 -1
  81. package/templates/gym-fitness/tier5-src/_shared/online-actions.ts +76 -0
  82. package/templates/gym-fitness/tier5-src/himi-booking-bookings/index.ts +1 -0
  83. package/templates/gym-fitness/tier5-src/himi-booking-time/index.ts +803 -284
  84. package/templates/gym-fitness/tier5-src/himi-branded-lite-address/index.ts +3 -1
  85. package/templates/gym-fitness/tier5-src/himi-branded-lite-addresses/index.ts +3 -1
  86. package/templates/gym-fitness/tier5-src/himi-branded-lite-agenda/index.ts +9 -1
  87. package/templates/gym-fitness/tier5-src/himi-branded-lite-cart/index.ts +3 -0
  88. package/templates/gym-fitness/tier5-src/himi-branded-lite-order/index.ts +3 -1
  89. package/templates/gym-fitness/tier5-src/himi-branded-lite-place-summary/index.ts +12 -1
  90. package/templates/gym-fitness/tier5-src/himi-branded-lite-plans/index.ts +13 -1
  91. package/templates/gym-fitness/tier5-src/himi-branded-lite-wallet/index.ts +3 -1
  92. package/templates/gym-fitness/tier5-src/himi-events-detail/index.ts +8 -1
  93. package/templates/gym-fitness/tier5-src/himi-events-rsvp/index.ts +7 -4
  94. package/templates/gym-fitness/tier5-src/himi-store-account/index.ts +69 -10
  95. package/templates/gym-fitness/tier5-src/himi-store-product/index.ts +10 -4
  96. package/templates/gym-fitness-owner/tier5-src/_shared/collection-service.ts +5 -1
  97. package/templates/gym-fitness-owner/tier5-src/_shared/online-actions.ts +76 -0
  98. package/templates/nonprofit-cause/dev/index.ts +47 -29
  99. package/templates/nonprofit-cause/tier5-src/_shared/collection-service.ts +5 -1
  100. package/templates/nonprofit-cause/tier5-src/_shared/online-actions.ts +76 -0
  101. package/templates/nonprofit-cause/tier5-src/himi-branded-lite-feed/index.ts +3 -1
  102. package/templates/nonprofit-cause/tier5-src/himi-branded-lite-group/index.ts +3 -1
  103. package/templates/nonprofit-cause/tier5-src/himi-branded-lite-place-summary/index.ts +12 -1
  104. package/templates/nonprofit-cause/tier5-src/himi-branded-lite-plans/index.ts +13 -1
  105. package/templates/nonprofit-cause/tier5-src/himi-branded-lite-wallet/index.ts +3 -1
  106. package/templates/nonprofit-cause/tier5-src/himi-events-detail/index.ts +8 -1
  107. package/templates/nonprofit-cause/tier5-src/himi-events-rsvp/index.ts +7 -4
  108. package/templates/nonprofit-cause/tier5-src/himi-store-account/index.ts +69 -10
  109. package/templates/nonprofit-cause-owner/tier5-src/_shared/collection-service.ts +5 -1
  110. package/templates/nonprofit-cause-owner/tier5-src/_shared/online-actions.ts +76 -0
  111. package/templates/owner-lite/tier5-src/_shared/collection-service.ts +5 -1
  112. package/templates/owner-lite/tier5-src/_shared/online-actions.ts +76 -0
  113. package/templates/podcast-creator/dev/index.ts +47 -29
  114. package/templates/podcast-creator/tier5-src/_shared/collection-service.ts +5 -1
  115. package/templates/podcast-creator/tier5-src/_shared/online-actions.ts +76 -0
  116. package/templates/podcast-creator/tier5-src/himi-branded-lite-feed/index.ts +3 -1
  117. package/templates/podcast-creator/tier5-src/himi-branded-lite-place-summary/index.ts +12 -1
  118. package/templates/podcast-creator/tier5-src/himi-branded-lite-plans/index.ts +13 -1
  119. package/templates/podcast-creator/tier5-src/himi-branded-lite-wallet/index.ts +3 -1
  120. package/templates/podcast-creator/tier5-src/himi-events-detail/index.ts +8 -1
  121. package/templates/podcast-creator/tier5-src/himi-events-rsvp/index.ts +7 -4
  122. package/templates/podcast-creator/tier5-src/himi-store-account/index.ts +69 -10
  123. package/templates/podcast-creator-owner/tier5-src/_shared/collection-service.ts +5 -1
  124. package/templates/podcast-creator-owner/tier5-src/_shared/online-actions.ts +76 -0
  125. package/templates/portfolio-creative/dev/index.ts +52 -27
  126. package/templates/portfolio-creative/tier5-src/_shared/collection-service.ts +5 -1
  127. package/templates/portfolio-creative/tier5-src/_shared/online-actions.ts +76 -0
  128. package/templates/portfolio-creative/tier5-src/himi-branded-lite-address/index.ts +3 -1
  129. package/templates/portfolio-creative/tier5-src/himi-branded-lite-addresses/index.ts +3 -1
  130. package/templates/portfolio-creative/tier5-src/himi-branded-lite-cart/index.ts +3 -0
  131. package/templates/portfolio-creative/tier5-src/himi-branded-lite-order/index.ts +3 -1
  132. package/templates/portfolio-creative/tier5-src/himi-branded-lite-wallet/index.ts +3 -1
  133. package/templates/portfolio-creative/tier5-src/himi-events-detail/index.ts +8 -1
  134. package/templates/portfolio-creative/tier5-src/himi-events-rsvp/index.ts +7 -4
  135. package/templates/portfolio-creative/tier5-src/himi-store-account/index.ts +69 -10
  136. package/templates/portfolio-creative/tier5-src/himi-store-product/index.ts +10 -4
  137. package/templates/portfolio-creative-owner/tier5-src/_shared/collection-service.ts +5 -1
  138. package/templates/portfolio-creative-owner/tier5-src/_shared/online-actions.ts +76 -0
  139. package/templates/restaurant/dev/index.ts +48 -25
  140. package/templates/restaurant/tier5-src/_shared/collection-service.ts +5 -1
  141. package/templates/restaurant/tier5-src/_shared/online-actions.ts +76 -0
  142. package/templates/restaurant/tier5-src/himi-branded-lite-address/index.ts +3 -1
  143. package/templates/restaurant/tier5-src/himi-branded-lite-addresses/index.ts +3 -1
  144. package/templates/restaurant/tier5-src/himi-branded-lite-reserve/index.ts +3 -1
  145. package/templates/restaurant/tier5-src/himi-branded-lite-wallet/index.ts +3 -1
  146. package/templates/restaurant/tier5-src/himi-events-detail/index.ts +8 -1
  147. package/templates/restaurant/tier5-src/himi-events-rsvp/index.ts +7 -4
  148. package/templates/restaurant/tier5-src/himi-store-account/index.ts +69 -10
  149. package/templates/restaurant-owner/tier5-src/_shared/collection-service.ts +5 -1
  150. package/templates/restaurant-owner/tier5-src/_shared/online-actions.ts +76 -0
  151. package/templates/retail-store/dev/index.ts +44 -23
  152. package/templates/retail-store/tier5-src/_shared/collection-service.ts +5 -1
  153. package/templates/retail-store/tier5-src/_shared/online-actions.ts +76 -0
  154. package/templates/retail-store/tier5-src/himi-branded-lite-address/index.ts +3 -1
  155. package/templates/retail-store/tier5-src/himi-branded-lite-addresses/index.ts +3 -1
  156. package/templates/retail-store/tier5-src/himi-branded-lite-cart/index.ts +3 -0
  157. package/templates/retail-store/tier5-src/himi-branded-lite-order/index.ts +3 -1
  158. package/templates/retail-store/tier5-src/himi-branded-lite-wallet/index.ts +3 -1
  159. package/templates/retail-store/tier5-src/himi-store-account/index.ts +69 -10
  160. package/templates/retail-store/tier5-src/himi-store-product/index.ts +10 -4
  161. package/templates/retail-store-owner/tier5-src/_shared/collection-service.ts +5 -1
  162. package/templates/retail-store-owner/tier5-src/_shared/online-actions.ts +76 -0
  163. package/templates/yoga-studio/dev/index.ts +2102 -811
  164. package/templates/yoga-studio/tier5-src/_shared/collection-service.ts +5 -1
  165. package/templates/yoga-studio/tier5-src/_shared/online-actions.ts +76 -0
  166. package/templates/yoga-studio/tier5-src/himi-booking-bookings/index.ts +1 -0
  167. package/templates/yoga-studio/tier5-src/himi-booking-time/index.ts +803 -284
  168. package/templates/yoga-studio/tier5-src/himi-branded-lite-agenda/index.ts +9 -1
  169. package/templates/yoga-studio/tier5-src/himi-branded-lite-place-summary/index.ts +12 -1
  170. package/templates/yoga-studio/tier5-src/himi-branded-lite-plans/index.ts +13 -1
  171. package/templates/yoga-studio/tier5-src/himi-branded-lite-program/index.ts +3 -1
  172. package/templates/yoga-studio/tier5-src/himi-branded-lite-wallet/index.ts +3 -1
  173. package/templates/yoga-studio/tier5-src/himi-events-detail/index.ts +8 -1
  174. package/templates/yoga-studio/tier5-src/himi-events-rsvp/index.ts +7 -4
  175. package/templates/yoga-studio/tier5-src/himi-store-account/index.ts +69 -10
  176. package/templates/yoga-studio-owner/tier5-src/_shared/collection-service.ts +5 -1
  177. package/templates/yoga-studio-owner/tier5-src/_shared/online-actions.ts +76 -0
@@ -226,6 +226,20 @@ export declare function emptyState(props: {
226
226
  actionStyle?: "primary" | "secondary" | "plain";
227
227
  actionSize?: "sm" | "md";
228
228
  }): Component;
229
+ /** #4349 — the ONE standard load-error layout. Every prop is optional: an absent
230
+ * title/body/ctaLabel falls back to the variant's default copy. */
231
+ export declare function errorState(props?: {
232
+ variant?: "server" | "offline" | "permission" | "signIn";
233
+ variantPath?: string;
234
+ title?: string;
235
+ body?: string;
236
+ cta?: {
237
+ actionId: string;
238
+ params?: Record<string, string>;
239
+ };
240
+ ctaLabel?: string;
241
+ placement?: "screen" | "section";
242
+ }): Component;
229
243
  export declare function appIntent(pkg: string, type: string, props: unknown, opts?: {
230
244
  id?: string;
231
245
  }): Component;
@@ -0,0 +1,5 @@
1
+ /** The host checks connectivity at submission time, before any reducer can change state. */
2
+ export declare function connectivity(): {
3
+ online: boolean;
4
+ };
5
+ export declare function requireConnectivity(): void;
@@ -300,3 +300,4 @@ export declare const app: {
300
300
  dispatch(action: string, args?: unknown): Promise<unknown>;
301
301
  };
302
302
  export { validate, isValid as isValidValue, validators, validateAll, type ValidationFailure, type ValidationFailureRule, } from "@wix/himalaya/core/validation";
303
+ export { connectivity, requireConnectivity } from './connectivity.js';
@@ -625,6 +625,24 @@ export interface EmptyStateProps {
625
625
  /** The CTA's Button `size`. Default `"sm"`. */
626
626
  actionSize?: "sm" | "md";
627
627
  }
628
+ /**
629
+ * The ONE standard load-error layout (#4349): a centred stack of a 20px glyph, title,
630
+ * body and one pill CTA. No icon tile, no card. Every prop is optional: an absent
631
+ * `title` / `body` / `ctaLabel` falls back to the variant's default copy.
632
+ */
633
+ export interface ErrorStateProps {
634
+ /** Default `"server"`. An unknown value is treated as `"server"`. */
635
+ variant?: "server" | "offline" | "permission" | "signIn";
636
+ /** `$service:` binding that selects the variant at runtime; wins over `variant`. */
637
+ variantPath?: string;
638
+ title?: string;
639
+ body?: string;
640
+ /** The CTA's action. Absent → no button. */
641
+ cta?: Action;
642
+ ctaLabel?: string;
643
+ /** `"screen"` (default, ~96px from the top) or `"section"` (~24px). */
644
+ placement?: "screen" | "section";
645
+ }
628
646
  export interface InterpolatedText {
629
647
  template: string;
630
648
  params?: Record<string, string>;
@@ -2417,6 +2435,10 @@ export type CoreComponentBody = {
2417
2435
  package: "himalaya";
2418
2436
  type: "EmptyState";
2419
2437
  props: EmptyStateProps;
2438
+ } | {
2439
+ package: "himalaya";
2440
+ type: "ErrorState";
2441
+ props: ErrorStateProps;
2420
2442
  } | {
2421
2443
  package: "himalaya";
2422
2444
  type: "Text";
@@ -83,6 +83,10 @@ export declare const WORKER_SUBTREE_SAFE_TYPE_RULES: {
83
83
  readonly children: readonly [];
84
84
  readonly actions: readonly ["action"];
85
85
  };
86
+ readonly ErrorState: {
87
+ readonly children: readonly [];
88
+ readonly actions: readonly ["cta"];
89
+ };
86
90
  readonly Banner: {
87
91
  readonly children: readonly [];
88
92
  readonly actions: readonly ["action"];
@@ -9313,6 +9313,7 @@ var CORE_COMPONENTS = /* @__PURE__ */ new Set([
9313
9313
  "himalaya.Divider",
9314
9314
  "himalaya.Spacer",
9315
9315
  "himalaya.EmptyState",
9316
+ "himalaya.ErrorState",
9316
9317
  "himalaya.Text",
9317
9318
  "himalaya.Image",
9318
9319
  "himalaya.Icon",
@@ -10744,6 +10745,12 @@ var WORKER_SUBTREE_SAFE_TYPE_RULES = {
10744
10745
  "action"
10745
10746
  ]
10746
10747
  },
10748
+ "ErrorState": {
10749
+ "children": [],
10750
+ "actions": [
10751
+ "cta"
10752
+ ]
10753
+ },
10747
10754
  "Banner": {
10748
10755
  "children": [],
10749
10756
  "actions": [
@@ -8206,6 +8206,12 @@ var WORKER_SUBTREE_SAFE_TYPE_RULES = {
8206
8206
  "action"
8207
8207
  ]
8208
8208
  },
8209
+ "ErrorState": {
8210
+ "children": [],
8211
+ "actions": [
8212
+ "cta"
8213
+ ]
8214
+ },
8209
8215
  "Banner": {
8210
8216
  "children": [],
8211
8217
  "actions": [
@@ -8743,6 +8749,12 @@ function emptyState(props) {
8743
8749
  body: { package: "himalaya", type: "EmptyState", props }
8744
8750
  };
8745
8751
  }
8752
+ function errorState(props = {}) {
8753
+ return {
8754
+ id: auto("error_state"),
8755
+ body: { package: "himalaya", type: "ErrorState", props }
8756
+ };
8757
+ }
8746
8758
  function appIntent(pkg, type, props, opts) {
8747
8759
  return {
8748
8760
  id: opts?.id ?? auto(type.toLowerCase()),
@@ -9414,6 +9426,7 @@ export {
9414
9426
  donutChart,
9415
9427
  emptyBlock,
9416
9428
  emptyState,
9429
+ errorState,
9417
9430
  fab,
9418
9431
  fieldError,
9419
9432
  filterChips,
@@ -181,6 +181,18 @@ function validateAll(rules, values, catalog) {
181
181
  return errors;
182
182
  }
183
183
 
184
+ // ../../core/sdk/state/src/connectivity.ts
185
+ function connectivity() {
186
+ const host = globalThis.himalaya;
187
+ if (!host?.connectivity?.current) throw new Error("CONNECTIVITY_UNSUPPORTED: update the Himalaya runtime before installing this screen");
188
+ const current = host.connectivity.current();
189
+ if (typeof current?.online !== "boolean") throw new Error("CONNECTIVITY_UNSUPPORTED: this host cannot report connectivity");
190
+ return current;
191
+ }
192
+ function requireConnectivity() {
193
+ if (!connectivity().online) throw new Error("You\u2019re offline \u2014 this change can\u2019t be saved right now. Connect and try again.");
194
+ }
195
+
184
196
  // ../../core/sdk/state/src/index.ts
185
197
  function withStream(state, directive) {
186
198
  return { ...state, _stream: directive };
@@ -328,11 +340,13 @@ var app = {
328
340
  };
329
341
  export {
330
342
  app,
343
+ connectivity,
331
344
  defineService,
332
345
  encodeSubtree,
333
346
  isAppServiceError,
334
347
  isValid as isValidValue,
335
348
  navigate,
349
+ requireConnectivity,
336
350
  validate,
337
351
  validateAll,
338
352
  validators,