@wix/himalaya-cli 0.1628.0 → 0.1630.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.
@@ -192,6 +192,7 @@ export declare function text(text: string, style?: string, opts?: {
192
192
  textAlign?: "leading" | "center" | "trailing" | "justify";
193
193
  textDirection?: "auto" | "ltr" | "rtl";
194
194
  decoration?: "underline" | "strikethrough";
195
+ lineSpacing?: number;
195
196
  minimumScaleFactor?: number;
196
197
  monospacedDigits?: boolean;
197
198
  truncation?: "tail" | "head" | "middle";
@@ -280,6 +281,8 @@ export declare function image(props: {
280
281
  shape?: "rect" | "rounded" | "circle";
281
282
  aspectRatio?: number;
282
283
  placeholder?: string;
284
+ tint?: string;
285
+ renderingMode?: "template" | "original";
283
286
  }, opts?: {
284
287
  id?: string;
285
288
  }): Component;
@@ -547,6 +550,8 @@ export declare function button(props: {
547
550
  size?: "sm" | "md" | "lg";
548
551
  fullWidth?: boolean;
549
552
  iconOnly?: boolean;
553
+ cornerRadius?: number;
554
+ minHeight?: number;
550
555
  }, opts?: {
551
556
  id?: string;
552
557
  }): Component;
@@ -753,6 +758,11 @@ export declare function toggle(props: {
753
758
  value?: boolean;
754
759
  valuePath?: string;
755
760
  onChange?: ActionShape;
761
+ trackOn?: string;
762
+ trackOff?: string;
763
+ thumb?: string;
764
+ width?: number;
765
+ height?: number;
756
766
  }, opts?: {
757
767
  id?: string;
758
768
  }): Component;
@@ -964,7 +974,7 @@ export declare function progressBar(props: {
964
974
  trackColor?: string;
965
975
  /** Motion grammar — tween the fill on value change instead of snapping. */
966
976
  animated?: boolean;
967
- }, opts?: {
977
+ } & Pick<import("@wix/himalaya/core").ProgressBarProps, "tintPath" | "trackColorPath">, opts?: {
968
978
  id?: string;
969
979
  }): Component;
970
980
  /** A standardized list cell: leading slot · overline/title/subtitle · trailing
@@ -981,6 +991,9 @@ export declare function listItem(props: {
981
991
  titleStyle?: string;
982
992
  subtitleStyle?: string;
983
993
  markdown?: boolean;
994
+ titleColor?: string;
995
+ subtitleColor?: string;
996
+ overlineColor?: string;
984
997
  }, opts?: {
985
998
  id?: string;
986
999
  }): Component;
@@ -1108,7 +1121,7 @@ export declare function chip(props: {
1108
1121
  elevated?: boolean;
1109
1122
  token?: string;
1110
1123
  disabled?: boolean;
1111
- }, opts?: {
1124
+ } & Pick<import("@wix/himalaya/core").ChipProps, "selectedPath" | "tokenPath">, opts?: {
1112
1125
  id?: string;
1113
1126
  }): Component;
1114
1127
  /** A token/tag entry field holding removable value chips + a placeholder. */
@@ -1186,7 +1199,7 @@ export declare function gauge(props: {
1186
1199
  }>;
1187
1200
  /** Motion grammar — tween the gauge fill on value change instead of snapping. */
1188
1201
  animated?: boolean;
1189
- }, opts?: {
1202
+ } & Pick<import("@wix/himalaya/core").GaugeProps, "tintPath">, opts?: {
1190
1203
  id?: string;
1191
1204
  }): Component;
1192
1205
  /** A star/segment rating, display or interactive. */
@@ -1413,7 +1426,7 @@ export declare function otpInput(props: {
1413
1426
  onChange?: ActionShape;
1414
1427
  onComplete?: ActionShape;
1415
1428
  secure?: boolean;
1416
- }, opts?: {
1429
+ } & Pick<import("@wix/himalaya/core").OtpInputProps, "valuePath">, opts?: {
1417
1430
  id?: string;
1418
1431
  }): Component;
1419
1432
  /** A floating action button (icon, or extended with a label). */
@@ -1446,7 +1459,7 @@ export declare function map(props: {
1446
1459
  markersPath?: string;
1447
1460
  showUserLocation?: boolean;
1448
1461
  followUserLocation?: boolean;
1449
- }, opts?: {
1462
+ } & Pick<import("@wix/himalaya/core").MapProps, "routeMode" | "fitToContent" | "mapStyle" | "onMapTap" | "onMarkerTap" | "onRegionChange" | "routePath" | "cameraPath" | "shapes" | "shapesPath" | "onShapeTap" | "tileSource">, opts?: {
1450
1463
  id?: string;
1451
1464
  }): Component;
1452
1465
  /** An embedded video player. */
@@ -1548,7 +1561,7 @@ export declare function mediaPlayer(props: {
1548
1561
  onItemChange?: ActionShape;
1549
1562
  allowCellular?: boolean;
1550
1563
  preload?: boolean;
1551
- }, opts?: {
1564
+ } & Pick<import("@wix/himalaya/core").MediaPlayerProps, "itemsPath">, opts?: {
1552
1565
  id?: string;
1553
1566
  modifiers?: Component["modifiers"];
1554
1567
  }): Component;
@@ -1666,17 +1679,21 @@ export declare function snackbar(props: {
1666
1679
  action?: ActionShape;
1667
1680
  durationMs?: number;
1668
1681
  severity?: "info" | "success" | "warning" | "danger";
1669
- }, opts?: {
1682
+ } & Pick<import("@wix/himalaya/core").SnackbarProps, "actionLabel" | "imageUrl">, opts?: {
1670
1683
  id?: string;
1671
1684
  }): Component;
1672
1685
  export declare function alertDialog(props: {
1673
1686
  title: string;
1674
1687
  message?: string;
1675
- confirmAction: ActionShape;
1688
+ confirmAction?: ActionShape;
1676
1689
  cancelAction?: ActionShape;
1677
1690
  destructive?: boolean;
1678
1691
  /** RFC 0058 §4 — focus-trap tri-state; absent takes the AlertDialog default (modal). */
1679
1692
  modal?: boolean;
1693
+ } & Pick<import("@wix/himalaya/core").AlertDialogProps, "confirmLabel" | "cancelLabel"> & {
1694
+ buttons?: Array<Omit<NonNullable<import("@wix/himalaya/core").AlertDialogProps["buttons"]>[number], "action"> & {
1695
+ action?: ActionShape;
1696
+ }>;
1680
1697
  }, opts?: {
1681
1698
  id?: string;
1682
1699
  }): Component;
@@ -1717,6 +1734,9 @@ export declare function lazyList(props: {
1717
1734
  scrollToItemPath?: string;
1718
1735
  /** `{ id }` when the row at the top of the visible area changes by the user's scroll. */
1719
1736
  onTopItemChange?: ActionShape;
1737
+ reverseLayout?: boolean;
1738
+ contentInsetTop?: number;
1739
+ contentInsetBottom?: number;
1720
1740
  }, opts?: {
1721
1741
  id?: string;
1722
1742
  }): Component;
@@ -412,6 +412,55 @@ export interface Modifiers {
412
412
  * node's layout footprint. Stopped by reduced motion unless `respectReducedMotion`
413
413
  * is false. */
414
414
  ambientMotion?: AmbientMotion;
415
+ /** RFC 0037 amendment — BINDABLE TRANSFORMS. Each is a `"$service:<svc>.<field>"` /
416
+ * `"$item.<field>"` sentinel resolving to a NUMBER at render. A bound value overrides its
417
+ * static sibling (`scale`, `rotation`, `offsetX`, `offsetY`, `opacity`, `cornerRadius`); an
418
+ * unresolved or non-numeric value falls back to that sibling (or identity). A change animates
419
+ * with the node's `motion` token; reduced motion jumps. Render-only: transforms never affect
420
+ * layout, the origin is the centre, and hit-testing follows the transformed frame. `$env:` is
421
+ * rejected. Wire only: no renderer draws these yet, and a renderer that does not draw one ignores it. */
422
+ scalePath?: string;
423
+ /** Bound `rotation`, in DEGREES. See `scalePath`. */
424
+ rotationPath?: string;
425
+ /** Bound `offsetX`, in points. See `scalePath`. */
426
+ offsetXPath?: string;
427
+ /** Bound `offsetY`, in points. See `scalePath`. */
428
+ offsetYPath?: string;
429
+ /** Bound `opacity`, 0–1 (clamped). See `scalePath`. */
430
+ opacityPath?: string;
431
+ /** Bound `cornerRadius`, in points. See `scalePath`. */
432
+ cornerRadiusPath?: string;
433
+ /** RFC 0037 amendment — a declarative scroll offset → transform/opacity mapping,
434
+ * evaluated natively every frame (no worker round-trip). Wire only: no renderer draws it yet. */
435
+ scrollLinked?: ScrollLinked;
436
+ }
437
+ /** RFC 0037 amendment (#4663) — `Modifiers.scrollLinked`. Piecewise-linear interpolation of
438
+ * each output range over `inputRange`. Composition order: static → bound (`…Path`) →
439
+ * scrollLinked; `scale`/`opacity` multiply, `rotation`/`offsetX`/`offsetY`/`cornerRadius` add.
440
+ * Reduced motion pins every output to its value at scroll offset 0. */
441
+ export interface ScrollLinked {
442
+ /** `""`/absent = the screen's main scroll container; else the `id` of an ANCESTOR scroll
443
+ * container (LazyList, Grid, Carousel, Pager, CollapsingHeader). */
444
+ source?: string;
445
+ /** `"y"` (default) | `"x"`. Unknown ⇒ `"y"`. */
446
+ axis?: string;
447
+ /** ≥ 2 strictly ascending scroll offsets, in points. */
448
+ inputRange?: number[];
449
+ /** Scale multiplier per input stop (same length as `inputRange`). */
450
+ scale?: number[];
451
+ /** Rotation in degrees per input stop, added to the static/bound rotation. */
452
+ rotation?: number[];
453
+ /** Horizontal offset in points per input stop, added. */
454
+ offsetX?: number[];
455
+ /** Vertical offset in points per input stop, added. */
456
+ offsetY?: number[];
457
+ /** Opacity multiplier per input stop; the final opacity is clamped to 0–1. */
458
+ opacity?: number[];
459
+ /** Corner radius in points per input stop, added (the final value is floored at 0). */
460
+ cornerRadius?: number[];
461
+ /** `"clamp"` (default) holds the end values past the range; `"extend"` continues the end
462
+ * segments' slope. Unknown ⇒ `"clamp"`. */
463
+ extrapolate?: string;
415
464
  }
416
465
  /** RFC 0069 — `Modifiers.ambientMotion`. */
417
466
  export interface AmbientMotion {
@@ -1140,6 +1140,81 @@ export declare const screenDescriptorSchema: {
1140
1140
  };
1141
1141
  };
1142
1142
  };
1143
+ readonly scalePath: {
1144
+ readonly type: "string";
1145
+ };
1146
+ readonly rotationPath: {
1147
+ readonly type: "string";
1148
+ };
1149
+ readonly offsetXPath: {
1150
+ readonly type: "string";
1151
+ };
1152
+ readonly offsetYPath: {
1153
+ readonly type: "string";
1154
+ };
1155
+ readonly opacityPath: {
1156
+ readonly type: "string";
1157
+ };
1158
+ readonly cornerRadiusPath: {
1159
+ readonly type: "string";
1160
+ };
1161
+ readonly scrollLinked: {
1162
+ readonly type: "object";
1163
+ readonly additionalProperties: false;
1164
+ readonly properties: {
1165
+ readonly source: {
1166
+ readonly type: "string";
1167
+ };
1168
+ readonly axis: {
1169
+ readonly type: "string";
1170
+ };
1171
+ readonly inputRange: {
1172
+ readonly type: "array";
1173
+ readonly items: {
1174
+ readonly type: "number";
1175
+ };
1176
+ };
1177
+ readonly scale: {
1178
+ readonly type: "array";
1179
+ readonly items: {
1180
+ readonly type: "number";
1181
+ };
1182
+ };
1183
+ readonly rotation: {
1184
+ readonly type: "array";
1185
+ readonly items: {
1186
+ readonly type: "number";
1187
+ };
1188
+ };
1189
+ readonly offsetX: {
1190
+ readonly type: "array";
1191
+ readonly items: {
1192
+ readonly type: "number";
1193
+ };
1194
+ };
1195
+ readonly offsetY: {
1196
+ readonly type: "array";
1197
+ readonly items: {
1198
+ readonly type: "number";
1199
+ };
1200
+ };
1201
+ readonly opacity: {
1202
+ readonly type: "array";
1203
+ readonly items: {
1204
+ readonly type: "number";
1205
+ };
1206
+ };
1207
+ readonly cornerRadius: {
1208
+ readonly type: "array";
1209
+ readonly items: {
1210
+ readonly type: "number";
1211
+ };
1212
+ };
1213
+ readonly extrapolate: {
1214
+ readonly type: "string";
1215
+ };
1216
+ };
1217
+ };
1143
1218
  readonly boxShadow: {
1144
1219
  readonly type: "object";
1145
1220
  readonly additionalProperties: false;
@@ -2578,6 +2653,81 @@ export declare const widgetSnapshotSchema: {
2578
2653
  };
2579
2654
  };
2580
2655
  };
2656
+ readonly scalePath: {
2657
+ readonly type: "string";
2658
+ };
2659
+ readonly rotationPath: {
2660
+ readonly type: "string";
2661
+ };
2662
+ readonly offsetXPath: {
2663
+ readonly type: "string";
2664
+ };
2665
+ readonly offsetYPath: {
2666
+ readonly type: "string";
2667
+ };
2668
+ readonly opacityPath: {
2669
+ readonly type: "string";
2670
+ };
2671
+ readonly cornerRadiusPath: {
2672
+ readonly type: "string";
2673
+ };
2674
+ readonly scrollLinked: {
2675
+ readonly type: "object";
2676
+ readonly additionalProperties: false;
2677
+ readonly properties: {
2678
+ readonly source: {
2679
+ readonly type: "string";
2680
+ };
2681
+ readonly axis: {
2682
+ readonly type: "string";
2683
+ };
2684
+ readonly inputRange: {
2685
+ readonly type: "array";
2686
+ readonly items: {
2687
+ readonly type: "number";
2688
+ };
2689
+ };
2690
+ readonly scale: {
2691
+ readonly type: "array";
2692
+ readonly items: {
2693
+ readonly type: "number";
2694
+ };
2695
+ };
2696
+ readonly rotation: {
2697
+ readonly type: "array";
2698
+ readonly items: {
2699
+ readonly type: "number";
2700
+ };
2701
+ };
2702
+ readonly offsetX: {
2703
+ readonly type: "array";
2704
+ readonly items: {
2705
+ readonly type: "number";
2706
+ };
2707
+ };
2708
+ readonly offsetY: {
2709
+ readonly type: "array";
2710
+ readonly items: {
2711
+ readonly type: "number";
2712
+ };
2713
+ };
2714
+ readonly opacity: {
2715
+ readonly type: "array";
2716
+ readonly items: {
2717
+ readonly type: "number";
2718
+ };
2719
+ };
2720
+ readonly cornerRadius: {
2721
+ readonly type: "array";
2722
+ readonly items: {
2723
+ readonly type: "number";
2724
+ };
2725
+ };
2726
+ readonly extrapolate: {
2727
+ readonly type: "string";
2728
+ };
2729
+ };
2730
+ };
2581
2731
  readonly boxShadow: {
2582
2732
  readonly type: "object";
2583
2733
  readonly additionalProperties: false;
@@ -9460,6 +9460,35 @@ var screenDescriptorSchema = {
9460
9460
  maxGapMs: { type: "integer", minimum: 0 }
9461
9461
  }
9462
9462
  },
9463
+ // RFC 0037 amendment (#4663) — bindable transforms. `$service:`/`$item.` sentinels
9464
+ // resolving to a number; the motion lint (core/dev-server/src/motion-bindings-lint.ts)
9465
+ // rejects `$env:` and warns on a value that can never resolve to a number.
9466
+ scalePath: { type: "string" },
9467
+ rotationPath: { type: "string" },
9468
+ offsetXPath: { type: "string" },
9469
+ offsetYPath: { type: "string" },
9470
+ opacityPath: { type: "string" },
9471
+ cornerRadiusPath: { type: "string" },
9472
+ // RFC 0037 amendment (#4663) — scroll offset → transform mapping. Shape only here; the
9473
+ // range rules (≥ 2 ascending stops, equal lengths, ancestor source) live in the motion
9474
+ // lint, which can say WHICH range is wrong. `axis`/`extrapolate` stay open strings so an
9475
+ // older validator never rejects a value a newer renderer knows (unknown ⇒ the default).
9476
+ scrollLinked: {
9477
+ type: "object",
9478
+ additionalProperties: false,
9479
+ properties: {
9480
+ source: { type: "string" },
9481
+ axis: { type: "string" },
9482
+ inputRange: { type: "array", items: { type: "number" } },
9483
+ scale: { type: "array", items: { type: "number" } },
9484
+ rotation: { type: "array", items: { type: "number" } },
9485
+ offsetX: { type: "array", items: { type: "number" } },
9486
+ offsetY: { type: "array", items: { type: "number" } },
9487
+ opacity: { type: "array", items: { type: "number" } },
9488
+ cornerRadius: { type: "array", items: { type: "number" } },
9489
+ extrapolate: { type: "string" }
9490
+ }
9491
+ },
9463
9492
  // #1052 — explicit drop shadow (colour token + radius + offset), alongside the `shadow` token form.
9464
9493
  boxShadow: {
9465
9494
  type: "object",
@@ -7653,6 +7653,35 @@ var screenDescriptorSchema = {
7653
7653
  maxGapMs: { type: "integer", minimum: 0 }
7654
7654
  }
7655
7655
  },
7656
+ // RFC 0037 amendment (#4663) — bindable transforms. `$service:`/`$item.` sentinels
7657
+ // resolving to a number; the motion lint (core/dev-server/src/motion-bindings-lint.ts)
7658
+ // rejects `$env:` and warns on a value that can never resolve to a number.
7659
+ scalePath: { type: "string" },
7660
+ rotationPath: { type: "string" },
7661
+ offsetXPath: { type: "string" },
7662
+ offsetYPath: { type: "string" },
7663
+ opacityPath: { type: "string" },
7664
+ cornerRadiusPath: { type: "string" },
7665
+ // RFC 0037 amendment (#4663) — scroll offset → transform mapping. Shape only here; the
7666
+ // range rules (≥ 2 ascending stops, equal lengths, ancestor source) live in the motion
7667
+ // lint, which can say WHICH range is wrong. `axis`/`extrapolate` stay open strings so an
7668
+ // older validator never rejects a value a newer renderer knows (unknown ⇒ the default).
7669
+ scrollLinked: {
7670
+ type: "object",
7671
+ additionalProperties: false,
7672
+ properties: {
7673
+ source: { type: "string" },
7674
+ axis: { type: "string" },
7675
+ inputRange: { type: "array", items: { type: "number" } },
7676
+ scale: { type: "array", items: { type: "number" } },
7677
+ rotation: { type: "array", items: { type: "number" } },
7678
+ offsetX: { type: "array", items: { type: "number" } },
7679
+ offsetY: { type: "array", items: { type: "number" } },
7680
+ opacity: { type: "array", items: { type: "number" } },
7681
+ cornerRadius: { type: "array", items: { type: "number" } },
7682
+ extrapolate: { type: "string" }
7683
+ }
7684
+ },
7656
7685
  // #1052 — explicit drop shadow (colour token + radius + offset), alongside the `shadow` token form.
7657
7686
  boxShadow: {
7658
7687
  type: "object",
@@ -8773,7 +8802,7 @@ function zstack(props) {
8773
8802
  function text(text2, style, opts) {
8774
8803
  return {
8775
8804
  id: opts?.id ?? auto("text"),
8776
- body: { package: "himalaya", type: "Text", props: { text: text2, style, color: opts?.color, maxLines: opts?.maxLines, collapseWhenEmpty: opts?.collapseWhenEmpty, animateValue: opts?.animateValue, animateReveal: opts?.animateReveal, markdown: opts?.markdown, textAlign: opts?.textAlign, textDirection: opts?.textDirection, decoration: opts?.decoration, minimumScaleFactor: opts?.minimumScaleFactor, monospacedDigits: opts?.monospacedDigits, truncation: opts?.truncation } }
8805
+ body: { package: "himalaya", type: "Text", props: { text: text2, style, color: opts?.color, maxLines: opts?.maxLines, collapseWhenEmpty: opts?.collapseWhenEmpty, animateValue: opts?.animateValue, animateReveal: opts?.animateReveal, markdown: opts?.markdown, textAlign: opts?.textAlign, textDirection: opts?.textDirection, decoration: opts?.decoration, lineSpacing: opts?.lineSpacing, minimumScaleFactor: opts?.minimumScaleFactor, monospacedDigits: opts?.monospacedDigits, truncation: opts?.truncation } }
8777
8806
  };
8778
8807
  }
8779
8808
  function card2(children, opts) {
@@ -9270,6 +9299,7 @@ function snackbar(props, opts) {
9270
9299
  };
9271
9300
  }
9272
9301
  function alertDialog(props, opts) {
9302
+ if (!props.confirmAction && !props.buttons?.length) throw new Error("alertDialog requires confirmAction or buttons");
9273
9303
  return {
9274
9304
  id: opts?.id ?? slugId("alert", props.confirmAction?.actionId),
9275
9305
  body: { package: "himalaya", type: "AlertDialog", props }