@wix/himalaya-cli 0.1439.0 → 0.1440.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 (31) hide show
  1. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/sdk/ui/src/index.d.ts +7 -4
  2. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/ui.mjs +2 -2
  3. package/dist/cli.mjs +91 -44
  4. package/dist/preview-assets.generated.bin +0 -0
  5. package/guides/designing-himi-screens.md +5 -1
  6. package/guides/hhp.md +13 -1
  7. package/guides/sdk-reference.json +3 -3
  8. package/guides/tier-5-add-a-screen.md +11 -0
  9. package/package.json +2 -2
  10. package/templates/beauty-salon/dev/index.ts +1 -90
  11. package/templates/beauty-salon/tier5-src/himi-branded-lite-account-settings/index.ts +4 -1
  12. package/templates/branded-lite/dev/index.ts +1 -90
  13. package/templates/branded-lite/tier5-src/himi-branded-lite-account-settings/index.ts +4 -1
  14. package/templates/community-club/dev/index.ts +1 -90
  15. package/templates/community-club/tier5-src/himi-branded-lite-account-settings/index.ts +4 -1
  16. package/templates/events-meetups/dev/index.ts +1 -90
  17. package/templates/events-meetups/tier5-src/himi-branded-lite-account-settings/index.ts +4 -1
  18. package/templates/gym-fitness/dev/index.ts +1 -90
  19. package/templates/gym-fitness/tier5-src/himi-branded-lite-account-settings/index.ts +4 -1
  20. package/templates/nonprofit-cause/dev/index.ts +1 -90
  21. package/templates/nonprofit-cause/tier5-src/himi-branded-lite-account-settings/index.ts +4 -1
  22. package/templates/podcast-creator/dev/index.ts +1 -90
  23. package/templates/podcast-creator/tier5-src/himi-branded-lite-account-settings/index.ts +4 -1
  24. package/templates/portfolio-creative/dev/index.ts +1 -90
  25. package/templates/portfolio-creative/tier5-src/himi-branded-lite-account-settings/index.ts +4 -1
  26. package/templates/restaurant/dev/index.ts +1 -90
  27. package/templates/restaurant/tier5-src/himi-branded-lite-account-settings/index.ts +4 -1
  28. package/templates/retail-store/dev/index.ts +1 -90
  29. package/templates/retail-store/tier5-src/himi-branded-lite-account-settings/index.ts +4 -1
  30. package/templates/yoga-studio/dev/index.ts +1 -90
  31. package/templates/yoga-studio/tier5-src/himi-branded-lite-account-settings/index.ts +4 -1
@@ -18,17 +18,20 @@ export interface AlertResult {
18
18
  * button. Rejects with `ui_busy` while another alert() is pending, and with
19
19
  * `no_ui_host` if the app has no presenter attached. */
20
20
  export declare function alert(options: AlertOptions): Promise<AlertResult>;
21
- /** Snackbar tone — maps to the app's tone background tokens. */
21
+ /** Snackbar tone — maps to the app's tone background tokens (`info` → textPrimary, `success`,
22
+ * `warning`, `danger`). Use `danger` for errors; the hosts also accept `error` as an alias of it. */
22
23
  export type SnackbarTone = "info" | "success" | "warning" | "danger";
23
24
  export interface SnackbarOptions {
24
25
  message: string;
25
26
  /** Default "info". */
26
27
  tone?: SnackbarTone;
27
- /** Auto-dismiss delay. Default 3000. Ignored on web (fixed-duration there). */
28
+ /** Auto-dismiss delay in ms, on every host. Default 3000; 0 or less also means 3000. */
28
29
  durationMs?: number;
29
30
  }
30
- /** Show a transient snackbar toast. Resolves once it is PRESENTED (not after it
31
- * auto-dismisses). Rejects with `no_ui_host` if no presenter is attached. */
31
+ /** Show a transient snackbar toast: it floats above the tab bar, slides and fades in and out
32
+ * (fades only under reduced motion), queues behind one that is already showing, and is read
33
+ * by VoiceOver / TalkBack. Resolves once it is PRESENTED (not after it auto-dismisses).
34
+ * Rejects with `no_ui_host` if no presenter is attached. */
32
35
  export declare function snackbar(options: SnackbarOptions): Promise<void>;
33
36
  /** Capability version, for bundles that gate on min binary version. */
34
37
  export declare const version = 1;
@@ -26,8 +26,8 @@ async function alert(options) {
26
26
  async function snackbar(options) {
27
27
  const params = { message: options.message ?? "" };
28
28
  if (options.tone) params.tone = options.tone;
29
- if (typeof options.durationMs === "number") {
30
- params.durationMs = Math.max(0, Math.trunc(options.durationMs));
29
+ if (typeof options.durationMs === "number" && Number.isFinite(options.durationMs)) {
30
+ params.durationMs = Math.min(2147483647, Math.max(0, Math.trunc(options.durationMs)));
31
31
  }
32
32
  await dispatch("capability.ui.snackbar", params);
33
33
  }