@wix/himalaya-cli 0.1409.0 → 0.1410.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 (67) hide show
  1. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/dev-server/src/builder.d.ts +6 -0
  2. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/sdui/src/screen-kit.d.ts +10 -0
  3. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/ts/src/schema.d.ts +10 -1
  4. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/ts/src/tokens.d.ts +11 -0
  5. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/ts/src/validator.d.ts +50 -0
  6. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/core.mjs +14 -0
  7. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/sdui.mjs +25 -4
  8. package/dist/cli.mjs +392 -60
  9. package/dist/preview-assets.generated.bin +0 -0
  10. package/guides/component-reference.json +2 -2
  11. package/guides/component-reference.md +10 -1
  12. package/package.json +2 -2
  13. package/templates/beauty-salon/dev/index.ts +486 -328
  14. package/templates/beauty-salon/tokens.json +2 -1
  15. package/templates/beauty-salon-owner/config.ts +7 -1
  16. package/templates/beauty-salon-owner/dev/index.ts +1139 -509
  17. package/templates/beauty-salon-owner/tokens.json +16 -1
  18. package/templates/branded-lite/dev/index.ts +1394 -640
  19. package/templates/branded-lite/tokens.json +1 -1
  20. package/templates/community-club/dev/index.ts +315 -200
  21. package/templates/community-club/tokens.json +2 -1
  22. package/templates/community-club-owner/config.ts +7 -1
  23. package/templates/community-club-owner/dev/index.ts +1113 -467
  24. package/templates/community-club-owner/tokens.json +16 -1
  25. package/templates/events-meetups/dev/index.ts +274 -195
  26. package/templates/events-meetups/tokens.json +2 -1
  27. package/templates/events-meetups-owner/config.ts +7 -1
  28. package/templates/events-meetups-owner/dev/index.ts +962 -370
  29. package/templates/events-meetups-owner/tokens.json +16 -1
  30. package/templates/gym-fitness/dev/index.ts +624 -463
  31. package/templates/gym-fitness/tokens.json +2 -1
  32. package/templates/gym-fitness-owner/config.ts +7 -1
  33. package/templates/gym-fitness-owner/dev/index.ts +1213 -557
  34. package/templates/gym-fitness-owner/tokens.json +16 -1
  35. package/templates/nonprofit-cause/dev/index.ts +315 -200
  36. package/templates/nonprofit-cause/tokens.json +2 -1
  37. package/templates/nonprofit-cause-owner/config.ts +7 -1
  38. package/templates/nonprofit-cause-owner/dev/index.ts +1062 -460
  39. package/templates/nonprofit-cause-owner/tokens.json +16 -1
  40. package/templates/owner-lite/config.ts +7 -1
  41. package/templates/owner-lite/dev/index.ts +1223 -571
  42. package/templates/owner-lite/tokens.json +16 -1
  43. package/templates/podcast-creator/dev/index.ts +315 -200
  44. package/templates/podcast-creator/tokens.json +2 -1
  45. package/templates/podcast-creator-owner/config.ts +7 -1
  46. package/templates/podcast-creator-owner/dev/index.ts +1113 -467
  47. package/templates/podcast-creator-owner/tokens.json +16 -1
  48. package/templates/portfolio-creative/dev/index.ts +441 -304
  49. package/templates/portfolio-creative/tokens.json +2 -1
  50. package/templates/portfolio-creative-owner/config.ts +7 -1
  51. package/templates/portfolio-creative-owner/dev/index.ts +1139 -509
  52. package/templates/portfolio-creative-owner/tokens.json +16 -1
  53. package/templates/restaurant/dev/index.ts +269 -195
  54. package/templates/restaurant/tokens.json +2 -1
  55. package/templates/restaurant-owner/config.ts +7 -1
  56. package/templates/restaurant-owner/dev/index.ts +1213 -557
  57. package/templates/restaurant-owner/tokens.json +16 -1
  58. package/templates/retail-store/dev/index.ts +277 -194
  59. package/templates/retail-store/tokens.json +2 -1
  60. package/templates/retail-store-owner/config.ts +7 -1
  61. package/templates/retail-store-owner/dev/index.ts +1039 -419
  62. package/templates/retail-store-owner/tokens.json +16 -1
  63. package/templates/yoga-studio/dev/index.ts +483 -329
  64. package/templates/yoga-studio/tokens.json +2 -1
  65. package/templates/yoga-studio-owner/config.ts +7 -1
  66. package/templates/yoga-studio-owner/dev/index.ts +1062 -460
  67. package/templates/yoga-studio-owner/tokens.json +16 -1
@@ -744,6 +744,12 @@ export declare function statefulSection(props: {
744
744
  retry?: ActionShape;
745
745
  };
746
746
  data?: Component;
747
+ /** A loading state that settles inside this many ms never paints its skeleton. 0/absent ⇒
748
+ * the platform default (200) while `kit.motionDefaults` is on; negative ⇒ no grace. */
749
+ loadingGraceMs?: number;
750
+ /** Once painted, the skeleton is held at least this long. 0/absent ⇒ default (600);
751
+ * negative ⇒ no floor. */
752
+ loadingFloorMs?: number;
747
753
  }, opts?: {
748
754
  id?: string;
749
755
  }): Component;
@@ -5,6 +5,10 @@ import type { Component } from "../../dev-server/src/builder.js";
5
5
  * #2738 — `id` used to be emitted as `accessibilityLabel`, so a screen reader announced
6
6
  * "himi_branded_home.hero_skeleton" and read three shimmer boxes aloud during every load.
7
7
  * A skeleton is decorative: it carries an id for tests and no accessible name at all.
8
+ *
9
+ * S1 — it is a real `Skeleton` now, not a flat bordered ZStack, so every caller gets the
10
+ * renderers' shimmer (gated on `kit.motionDefaults` + reduce motion) for free. Same contract:
11
+ * full width, `height` tall, radius 8, the id on the node.
8
12
  */
9
13
  export declare function skRect(height: number, id: string): Component;
10
14
  /** Options for the standard empty-state block. */
@@ -30,3 +34,9 @@ export interface EmptyBlockOptions {
30
34
  * Hidden while the worker reports `<service>.noEmpty`. `titlePath` is usually
31
35
  * a `$service:` path so the copy is worker-driven. */
32
36
  export declare function emptyBlock(service: string, titlePath: string, ctaTitle: string, ctaScreen: string, iconName: string, id: string, opts?: EmptyBlockOptions): Component;
37
+ /** S4 — the transition a state block (empty / retry) wears, so a loading → empty → error →
38
+ * content swap animates rather than cuts. Shared so every app's state blocks agree. */
39
+ export declare const STATE_SWAP_TRANSITION: {
40
+ readonly enter: "fade";
41
+ readonly exit: "fade";
42
+ };
@@ -26,7 +26,11 @@ export interface Action {
26
26
  actionId: string;
27
27
  /** Backwards-compatible string-only params. Prefer `args` for typed payloads. */
28
28
  params?: Record<string, string>;
29
- /** Typed action args; nested objects/arrays preserved end-to-end. */
29
+ /** Typed action args; nested objects/arrays preserved end-to-end. With `presentation: "sheet"`,
30
+ * `args.detents` (fractions of the height in (0, 1], e.g. `[0.5, 1]`) sizes the presented
31
+ * sheet; absent ⇒ the default sheet. Applies on iOS, Android and web; a macOS (and tvOS)
32
+ * screen sheet is a window-modal panel sized to its content, so there it is accepted and
33
+ * ignored, as for the BottomSheet component. */
30
34
  args?: Record<string, Value>;
31
35
  /** Navigation hint for the router; ignored for non-nav actions. */
32
36
  presentation?: Presentation;
@@ -1084,6 +1088,11 @@ export interface StatefulSectionProps {
1084
1088
  empty?: EmptyStateProps;
1085
1089
  error?: StatefulErrorProps;
1086
1090
  data?: Component;
1091
+ /** A loading state that settles inside this many ms never paints its skeleton. 0/absent ⇒ 200
1092
+ * while `kit.motionDefaults` is on; negative ⇒ no grace. */
1093
+ loadingGraceMs?: number;
1094
+ /** A painted skeleton is held at least this long. 0/absent ⇒ 600; negative ⇒ no floor. */
1095
+ loadingFloorMs?: number;
1087
1096
  }
1088
1097
  /** RFC 0045 — one named descriptor-shipped structural variant. */
1089
1098
  export interface FragmentSlotCase {
@@ -130,6 +130,17 @@ export interface KitBlock {
130
130
  * override and the OS high-contrast setting still win over it. Read from this top-level
131
131
  * block only — an idiom overlay cannot set it. Mirror of iOS/Android `KitBlock.colorScheme`. */
132
132
  colorScheme?: "system" | "light" | "dark";
133
+ /** Reduced-motion policy: "system" (default) follows the OS setting; "always" / "never" pin
134
+ * it. Every renderer funnels its motion through this gate. */
135
+ reduceMotion?: "system" | "always" | "never";
136
+ /** The motion the renderers add with no descriptor asking — StatefulSection loading grace
137
+ * (200 ms) / floor (600 ms) + cross-fade, skeleton shimmer, a remote image's first-load fade,
138
+ * value/icon content transitions, default exits, semantic haptics. "subtle" (or absent /
139
+ * unknown) is the default; "none" opts the app out (today's look); "expressive" lengthens the
140
+ * same motions a little. Visual motion still yields to reduce motion; haptics only to "none".
141
+ * Read from this top-level block only. Mirror of iOS `Tokens.motionDefaults` / Android
142
+ * `Tokens.activeMotionDefaults`. */
143
+ motionDefaults?: "none" | "subtle" | "expressive";
133
144
  }
134
145
  /** RFC 0021 (bottom-nav extension) — kit-driven tab bar styling. All fields
135
146
  * optional; a kit omitting `tabBar` falls back to the flat default bar. */
@@ -255,6 +255,31 @@ export declare const screenDescriptorSchema: {
255
255
  readonly enum: readonly ["push", "sheet", "replace", "dismiss", "back", "full_screen", "alert", "snackbar"];
256
256
  };
257
257
  };
258
+ readonly if: {
259
+ readonly properties: {
260
+ readonly presentation: {
261
+ readonly const: "sheet";
262
+ };
263
+ };
264
+ readonly required: readonly ["presentation"];
265
+ };
266
+ readonly then: {
267
+ readonly properties: {
268
+ readonly args: {
269
+ readonly properties: {
270
+ readonly detents: {
271
+ readonly type: "array";
272
+ readonly items: {
273
+ readonly type: "number";
274
+ readonly exclusiveMinimum: 0;
275
+ readonly maximum: 1;
276
+ };
277
+ readonly minItems: 1;
278
+ };
279
+ };
280
+ };
281
+ };
282
+ };
258
283
  };
259
284
  readonly topBarConfig: {
260
285
  readonly type: "object";
@@ -1418,6 +1443,31 @@ export declare const widgetSnapshotSchema: {
1418
1443
  readonly enum: readonly ["push", "sheet", "replace", "dismiss", "back", "full_screen", "alert", "snackbar"];
1419
1444
  };
1420
1445
  };
1446
+ readonly if: {
1447
+ readonly properties: {
1448
+ readonly presentation: {
1449
+ readonly const: "sheet";
1450
+ };
1451
+ };
1452
+ readonly required: readonly ["presentation"];
1453
+ };
1454
+ readonly then: {
1455
+ readonly properties: {
1456
+ readonly args: {
1457
+ readonly properties: {
1458
+ readonly detents: {
1459
+ readonly type: "array";
1460
+ readonly items: {
1461
+ readonly type: "number";
1462
+ readonly exclusiveMinimum: 0;
1463
+ readonly maximum: 1;
1464
+ };
1465
+ readonly minItems: 1;
1466
+ };
1467
+ };
1468
+ };
1469
+ };
1470
+ };
1421
1471
  };
1422
1472
  readonly topBarConfig: {
1423
1473
  readonly type: "object";
@@ -8260,6 +8260,20 @@ var screenDescriptorSchema = {
8260
8260
  "snackbar"
8261
8261
  ]
8262
8262
  }
8263
+ },
8264
+ // A SHEET's `args.detents` (fractions of the screen height, (0, 1]) is the one typed args
8265
+ // key: every router reads it as numbers, so a string list would silently present the default
8266
+ // sheet. Only a sheet reads it — on any other action `detents` is opaque payload, like the
8267
+ // rest of `args`, and must not reject the descriptor.
8268
+ if: { properties: { presentation: { const: "sheet" } }, required: ["presentation"] },
8269
+ then: {
8270
+ properties: {
8271
+ args: {
8272
+ properties: {
8273
+ detents: { type: "array", items: { type: "number", exclusiveMinimum: 0, maximum: 1 }, minItems: 1 }
8274
+ }
8275
+ }
8276
+ }
8263
8277
  }
8264
8278
  },
8265
8279
  // RFC 0010 (top-bar amendment) — shell-owned top bar + its trailing actions.
@@ -7130,6 +7130,20 @@ var screenDescriptorSchema = {
7130
7130
  "snackbar"
7131
7131
  ]
7132
7132
  }
7133
+ },
7134
+ // A SHEET's `args.detents` (fractions of the screen height, (0, 1]) is the one typed args
7135
+ // key: every router reads it as numbers, so a string list would silently present the default
7136
+ // sheet. Only a sheet reads it — on any other action `detents` is opaque payload, like the
7137
+ // rest of `args`, and must not reject the descriptor.
7138
+ if: { properties: { presentation: { const: "sheet" } }, required: ["presentation"] },
7139
+ then: {
7140
+ properties: {
7141
+ args: {
7142
+ properties: {
7143
+ detents: { type: "array", items: { type: "number", exclusiveMinimum: 0, maximum: 1 }, minItems: 1 }
7144
+ }
7145
+ }
7146
+ }
7133
7147
  }
7134
7148
  },
7135
7149
  // RFC 0010 (top-bar amendment) — shell-owned top bar + its trailing actions.
@@ -9226,11 +9240,13 @@ function servedPush(push) {
9226
9240
 
9227
9241
  // ../../core/sdui/src/screen-kit.ts
9228
9242
  function skRect(height, id) {
9229
- return withId(withModifiers(zstack({ alignment: "center", children: [] }), {
9243
+ return withId(withModifiers(skeleton({ height, cornerRadius: 8 }), {
9230
9244
  height,
9245
+ // The box the shimmer sits on: it still paints its own surface, so a layout that keeps a
9246
+ // surface's inset (home's #3000 gap sibling) treats it as one.
9231
9247
  background: { token: "surfaceSecondary" },
9232
- border: { width: 1, color: { token: "border" } },
9233
- cornerRadius: 8
9248
+ cornerRadius: 8,
9249
+ accessibilityRole: "decorative"
9234
9250
  }), id);
9235
9251
  }
9236
9252
  function emptyBlock(service, titlePath, ctaTitle, ctaScreen, iconName, id, opts = {}) {
@@ -9246,12 +9262,17 @@ function emptyBlock(service, titlePath, ctaTitle, ctaScreen, iconName, id, opts
9246
9262
  );
9247
9263
  return hiddenWhen(
9248
9264
  withModifiers(vstack({ spacing: 12, alignment: "center", children }), {
9249
- padding: { leading: 24, trailing: 24, top: 24, bottom: 24 }
9265
+ padding: { leading: 24, trailing: 24, top: 24, bottom: 24 },
9266
+ // S4 — the swap content → empty (and back) fades instead of cutting; the renderers play
9267
+ // the exit through the same hidden gate (RFC 0037, gated on reduce motion).
9268
+ transition: STATE_SWAP_TRANSITION
9250
9269
  }),
9251
9270
  `$service:${service}.noEmpty`
9252
9271
  );
9253
9272
  }
9273
+ var STATE_SWAP_TRANSITION = { enter: "fade", exit: "fade" };
9254
9274
  export {
9275
+ STATE_SWAP_TRANSITION,
9255
9276
  activityIndicator,
9256
9277
  agenda,
9257
9278
  agendaList,