@wix/himalaya-cli 0.992.0 → 0.994.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.
@@ -0,0 +1,58 @@
1
+ /** Which hosts a WIX-SCOPED dev-server request may be sent to.
2
+ *
3
+ * The dev-server does not merely forward these requests — it ATTACHES CREDENTIALS to them:
4
+ * a minted anonymous visitor token, a signed-in member token, the developer's `wixSession2`
5
+ * cookie. So the destination is not a detail. A wix-scoped request to any other host is those
6
+ * credentials leaving for that host, from a server that binds `0.0.0.0` (it has to, to serve
7
+ * simulators and physical devices) with no auth in front of it.
8
+ *
9
+ * The serve plane states the same rule for its own bridge — `core/serve-runtime/src/wix-bridge.ts`
10
+ * is "host-locked to www.wixapis.com — absolute URLs are rejected (no open proxy)". The
11
+ * dev-server needs the ALLOWLIST form rather than that outright rejection, because absolute
12
+ * URLs to other first-party hosts are a real, tested capability here: `users.wix.com` for
13
+ * identity, `apps`/`bo`/`manage`/`support`/`www`.wix.com elsewhere in this package, and
14
+ * `chat.nownia.com` for the Orion/Genie assistant — `orion-chat`'s `createConversation` sends
15
+ * an absolute url there through `wixApi.call`, whose own comment records the contract
16
+ * ("forwards this absolute, non-*.wix.com URL untouched"). Rejecting every absolute URL the way
17
+ * the serve plane does would break both that and
18
+ * "webWixCall preserves absolute Wix URLs for users.wix.com calls".
19
+ *
20
+ * THE LIST IS NOT INVENTED HERE. It mirrors `WixRequestPolicyRules.isFirstPartyWixHost`, which
21
+ * both natives already implement identically — `core/runtime/ios/HimalayaCore/Sources/
22
+ * HimalayaCore/WixRequestPolicy.swift` and the Kotlin twin under `core/runtime/android`. That is
23
+ * the platform's definition of "first party", so the web/dev arm has no business holding a
24
+ * narrower one: a host the device may call is a host this bridge may call. `wix-hosts.test.ts`
25
+ * pins the two together, so a root added natively cannot silently leave this arm behind — which
26
+ * is exactly how `nownia.com` was missed the first time (codebot review on #3120).
27
+ *
28
+ * PARSED, NEVER STRING-MATCHED. `apps/himi-owner-lite/dev/net-mocks.ts` records three spellings
29
+ * that defeated an earlier host parse in this repo, and all three are why this reads
30
+ * `new URL(...).hostname` instead of testing the raw text:
31
+ *
32
+ * `https://www.wixapis.com@evil.example/x` userinfo — the host is `evil.example`, and a
33
+ * `startsWith`/`includes` test says "wixapis".
34
+ * `https://www.wix.com\@evil.example/x` a backslash ENDS THE AUTHORITY for http(s), so
35
+ * the host really is `www.wix.com` and that is
36
+ * really where the request goes — a hand-rolled
37
+ * parser that splits on `/` disagrees.
38
+ * `https:///x` an empty authority yields no host at all.
39
+ *
40
+ * Judging the PARSED host cannot disagree with the connection that gets made, because `fetch`
41
+ * resolves the same string through the same WHATWG parser. A regex over the text can, and that
42
+ * divergence is the whole bug class.
43
+ *
44
+ * This is a destination check, NOT an SSRF guard in the `net-guard.ts` sense: it does not
45
+ * resolve the name or pin the address, so it does not close DNS rebinding. It does not need to
46
+ * — the property wanted here is "these credentials only ever go to Wix", and a name that
47
+ * resolves somewhere unexpected is still a name Wix controls. */
48
+ /** Registrable suffixes whose hosts may receive wix-scoped, credential-bearing traffic.
49
+ *
50
+ * Kept in lockstep with the natives' `isFirstPartyWixHost` roots — see the note above. */
51
+ export declare const WIX_HOST_SUFFIXES: readonly ["wix.com", "wixapis.com", "nownia.com"];
52
+ /** The host this url would actually be dialled on, lowercased — or `""` when it has none. */
53
+ export declare function targetHost(raw: string): string;
54
+ /** May a wix-scoped, credential-bearing request go to this url?
55
+ *
56
+ * `https:` only: every legitimate target in this package is https, and a downgrade to `http:`
57
+ * would put the very credentials this exists to protect on the wire in clear. */
58
+ export declare function isWixTarget(raw: string): boolean;
@@ -210,10 +210,25 @@ export interface SidebarStyle {
210
210
  motion?: string;
211
211
  }
212
212
  /** RFC 0020 — a motion curve. `duration` in ms; `easing` is one of
213
- * "linear" | "easeIn" | "easeOut" | "easeInOut" | "spring". */
213
+ * "linear" | "easeIn" | "easeOut" | "easeInOut" | "spring" | "emphasized". */
214
214
  export interface MotionToken {
215
215
  duration: number;
216
- easing?: "linear" | "easeIn" | "easeOut" | "easeInOut" | "spring";
216
+ /** `emphasized` (#2930) is Material 3's emphasized easing, cubic-bezier(0.2, 0, 0, 1) — the
217
+ * curve an Android idiom overlay reaches for where iOS would spring. */
218
+ easing?: "linear" | "easeIn" | "easeOut" | "easeInOut" | "spring" | "emphasized";
219
+ /** RFC 0059 / #2930 — a DECLARED spring, honoured by iOS, Android and the web when `easing` is
220
+ * `"spring"` (React Native keeps its one entrance curve). SwiftUI's two parameters: `response`
221
+ * is the period in seconds; `dampingFraction` 1 settles without overshoot, below 1 overshoots,
222
+ * above 1 settles more slowly. Every renderer holds them to `response` 0.05–10 and
223
+ * `dampingFraction` 0.1–4 — a value outside is clamped, never an error. Either may be omitted:
224
+ * `response` then defaults to `duration`, `dampingFraction` to 0.8. Absent altogether ⇒ each
225
+ * renderer's own legacy spring, unchanged — so an app that declares none animates as before. */
226
+ spring?: SpringParams;
227
+ }
228
+ /** See `MotionToken.spring`. */
229
+ export interface SpringParams {
230
+ response?: number;
231
+ dampingFraction?: number;
217
232
  }
218
233
  /** RFC 0021 — a surface material. `style` is "flat" | "glass" | "frosted"
219
234
  * (unknown ⇒ treated as flat by renderers); `tint` names a color token;
package/dist/cli.mjs CHANGED
@@ -15163,6 +15163,33 @@ var init_derive_transport_capability = __esm({
15163
15163
  }
15164
15164
  });
15165
15165
 
15166
+ // ../../core/dev-server/src/wix-hosts.ts
15167
+ function targetHost(raw) {
15168
+ try {
15169
+ return new URL(raw).hostname.toLowerCase();
15170
+ } catch {
15171
+ return "";
15172
+ }
15173
+ }
15174
+ function isWixTarget(raw) {
15175
+ let url;
15176
+ try {
15177
+ url = new URL(raw);
15178
+ } catch {
15179
+ return false;
15180
+ }
15181
+ if (url.protocol !== "https:") return false;
15182
+ const host = url.hostname.toLowerCase();
15183
+ if (!host) return false;
15184
+ return WIX_HOST_SUFFIXES.some((suffix) => host === suffix || host.endsWith(`.${suffix}`));
15185
+ }
15186
+ var WIX_HOST_SUFFIXES;
15187
+ var init_wix_hosts = __esm({
15188
+ "../../core/dev-server/src/wix-hosts.ts"() {
15189
+ WIX_HOST_SUFFIXES = ["wix.com", "wixapis.com", "nownia.com"];
15190
+ }
15191
+ });
15192
+
15166
15193
  // ../../core/dev-server/src/wix-member-login.ts
15167
15194
  var wix_member_login_exports = {};
15168
15195
  __export(wix_member_login_exports, {
@@ -15287,6 +15314,9 @@ async function memberDirectRegister(clientId, redirectUri, email, password, firs
15287
15314
  }
15288
15315
  async function webWixCall(method, path, body, token, cookie, forwardedHeaders = {}) {
15289
15316
  const url = /^https?:\/\//i.test(path) ? path : `${API}${path.startsWith("/") ? path : "/" + path}`;
15317
+ if (!isWixTarget(url)) {
15318
+ throw new Error(`refusing to send Wix credentials to a non-Wix host (${targetHost(url) || "no host"})`);
15319
+ }
15290
15320
  const res = await fetch(url, {
15291
15321
  method,
15292
15322
  headers: {
@@ -15302,6 +15332,7 @@ async function webWixCall(method, path, body, token, cookie, forwardedHeaders =
15302
15332
  var API;
15303
15333
  var init_wix_member_login = __esm({
15304
15334
  "../../core/dev-server/src/wix-member-login.ts"() {
15335
+ init_wix_hosts();
15305
15336
  API = "https://www.wixapis.com";
15306
15337
  }
15307
15338
  });
@@ -17775,6 +17806,44 @@ function rgba(color, alpha2) {
17775
17806
  const rgb = hexToRgb2(color);
17776
17807
  return rgb ? `rgba(${rgb[0]}, ${rgb[1]}, ${rgb[2]}, ${clamp2(alpha2)})` : color;
17777
17808
  }
17809
+ function normalizeSpring(spring, durationMs) {
17810
+ return {
17811
+ response: clampTo(finite(spring.response) ?? durationMs / 1e3, SPRING_MIN_RESPONSE, SPRING_MAX_RESPONSE),
17812
+ dampingFraction: clampTo(finite(spring.dampingFraction) ?? 0.8, SPRING_MIN_DAMPING, SPRING_MAX_DAMPING)
17813
+ };
17814
+ }
17815
+ function springStep(response, zeta) {
17816
+ const w0 = 2 * Math.PI / response;
17817
+ if (zeta < 1) {
17818
+ const wd = w0 * Math.sqrt(1 - zeta * zeta);
17819
+ return (t) => 1 - Math.exp(-zeta * w0 * t) * (Math.cos(wd * t) + zeta * w0 / wd * Math.sin(wd * t));
17820
+ }
17821
+ if (zeta === 1) return (t) => 1 - Math.exp(-w0 * t) * (1 + w0 * t);
17822
+ const root = Math.sqrt(zeta * zeta - 1);
17823
+ const r1 = -w0 * (zeta - root), r2 = -w0 * (zeta + root);
17824
+ return (t) => 1 - (r2 * Math.exp(r1 * t) - r1 * Math.exp(r2 * t)) / (r2 - r1);
17825
+ }
17826
+ function springCurve(spring, durationMs) {
17827
+ const { response, dampingFraction: zeta } = normalizeSpring(spring, durationMs);
17828
+ const key2 = `${response}|${zeta}`;
17829
+ const cached3 = springCurves.get(key2);
17830
+ if (cached3) return cached3;
17831
+ const x = springStep(response, zeta);
17832
+ const step = response / 64;
17833
+ let settle = 0;
17834
+ for (let t = 0; t <= SPRING_MAX_SECS; t += step) if (Math.abs(1 - x(t)) > SPRING_SETTLE_TOLERANCE) settle = t;
17835
+ const secs = Math.min(settle + step, SPRING_MAX_SECS);
17836
+ const samples = Math.min(200, Math.max(24, Math.ceil(12 * secs / response)));
17837
+ const points = [];
17838
+ for (let i = 0; i <= samples; i++) points.push(i === 0 ? 0 : i === samples ? 1 : Number(x(secs * i / samples).toFixed(3)));
17839
+ const curve = { durationMs: Math.round(secs * 1e3), easing: `linear(${points.join(", ")})` };
17840
+ springCurves.set(key2, curve);
17841
+ return curve;
17842
+ }
17843
+ function linearEasingSupported() {
17844
+ const css = globalThis.CSS;
17845
+ return typeof css?.supports === "function" && css.supports("animation-timing-function", "linear(0, 1)");
17846
+ }
17778
17847
  function easingCss(e) {
17779
17848
  switch (e) {
17780
17849
  case "linear":
@@ -17785,10 +17854,17 @@ function easingCss(e) {
17785
17854
  return "cubic-bezier(0,0,0.2,1)";
17786
17855
  case "spring":
17787
17856
  return "cubic-bezier(0.34,1.56,0.64,1)";
17857
+ // Material 3's emphasized easing (#2930).
17858
+ case "emphasized":
17859
+ return "cubic-bezier(0.2,0,0,1)";
17788
17860
  default:
17789
17861
  return "cubic-bezier(0.4,0,0.2,1)";
17790
17862
  }
17791
17863
  }
17864
+ function motionCss(m) {
17865
+ if (m.easing === "spring" && m.spring && linearEasingSupported()) return springCurve(m.spring, m.duration);
17866
+ return { durationMs: m.duration, easing: easingCss(m.easing) };
17867
+ }
17792
17868
  function hexToHsl(hex2) {
17793
17869
  const m = /^#?([\da-f]{6})$/i.exec(hex2.trim());
17794
17870
  if (!m) return null;
@@ -17991,7 +18067,7 @@ function makeTokenResolvers(source, scheme, idiom = WEB_IDIOM_CONTEXT) {
17991
18067
  if (!name) return void 0;
17992
18068
  const m = tokens.motions?.[name];
17993
18069
  if (!m) return void 0;
17994
- return { durationMs: m.duration, easing: easingCss(m.easing) };
18070
+ return motionCss(m);
17995
18071
  };
17996
18072
  const reduceMotion = () => {
17997
18073
  const policy = tokens.kit?.reduceMotion ?? "system";
@@ -18017,7 +18093,7 @@ function makeTokenResolvers(source, scheme, idiom = WEB_IDIOM_CONTEXT) {
18017
18093
  scheme
18018
18094
  };
18019
18095
  }
18020
- var REM_ROOT_PX, pxToRem, DEFAULT_FONT_STACK, SERIF_FAMILY_RE, WEB_IDIOM_CONTEXT;
18096
+ var REM_ROOT_PX, pxToRem, DEFAULT_FONT_STACK, SERIF_FAMILY_RE, SPRING_MIN_RESPONSE, SPRING_MAX_RESPONSE, SPRING_MIN_DAMPING, SPRING_MAX_DAMPING, clampTo, finite, SPRING_SETTLE_TOLERANCE, SPRING_MAX_SECS, springCurves, WEB_IDIOM_CONTEXT;
18021
18097
  var init_tokens2 = __esm({
18022
18098
  "../../core/web-renderer/src/tokens.ts"() {
18023
18099
  init_idiom();
@@ -18025,6 +18101,15 @@ var init_tokens2 = __esm({
18025
18101
  pxToRem = (px) => `${px / REM_ROOT_PX}rem`;
18026
18102
  DEFAULT_FONT_STACK = '"Wix Madefor Text", system-ui';
18027
18103
  SERIF_FAMILY_RE = /\b(georgia|times|garamond|palatino|baskerville|didot|charter|bodoni|caslon|cambria|constantia|rockwell|playfair|merriweather|lora|literata|spectral|serif)\b/i;
18104
+ SPRING_MIN_RESPONSE = 0.05;
18105
+ SPRING_MAX_RESPONSE = 10;
18106
+ SPRING_MIN_DAMPING = 0.1;
18107
+ SPRING_MAX_DAMPING = 4;
18108
+ clampTo = (v, lo, hi) => Math.min(hi, Math.max(lo, v));
18109
+ finite = (v) => typeof v === "number" && Number.isFinite(v) ? v : void 0;
18110
+ SPRING_SETTLE_TOLERANCE = 1e-3;
18111
+ SPRING_MAX_SECS = 10;
18112
+ springCurves = /* @__PURE__ */ new Map();
18028
18113
  WEB_IDIOM_CONTEXT = { surface: "desktop" };
18029
18114
  }
18030
18115
  });
@@ -18867,6 +18952,7 @@ function shouldRevealError(args) {
18867
18952
  var EMAIL_RE, URL_HOST_RE, INTEGER_RE, NUMBER_RE;
18868
18953
  var init_validation = __esm({
18869
18954
  "../../core/ts/src/validation.ts"() {
18955
+ "use strict";
18870
18956
  EMAIL_RE = /^[A-Za-z0-9._%+-]+@[A-Za-z0-9-]+(\.[A-Za-z0-9-]+)*\.[A-Za-z]{2,}$/;
18871
18957
  URL_HOST_RE = /^[A-Za-z0-9-]+(\.[A-Za-z0-9-]+)*(:[0-9]+)?$/;
18872
18958
  INTEGER_RE = /^[+-]?[0-9]+$/;
@@ -22291,6 +22377,7 @@ function validateWorkerSubtree(raw, slotId, policy, actionCatalog) {
22291
22377
  var WORKER_SUBTREE_CEILINGS, ID_PART, ACTION_ID;
22292
22378
  var init_worker_subtree = __esm({
22293
22379
  "../../core/ts/src/worker-subtree.ts"() {
22380
+ "use strict";
22294
22381
  init_worker_subtree_safe_types_generated();
22295
22382
  WORKER_SUBTREE_CEILINGS = Object.freeze({
22296
22383
  maxEncodedBytes: 65536,
@@ -23653,7 +23740,8 @@ function renderInner(node, ctx) {
23653
23740
  if (wp != null) wrap.width = wp;
23654
23741
  Object.assign(wrap, boundPaddingInsets(modifiers, ctx));
23655
23742
  }
23656
- const appear = ctx.appearMotion(modifiers?.appear);
23743
+ const ap = modifiers?.appear;
23744
+ const appear = ctx.appearMotion(typeof ap === "string" ? ap : ap?.token ?? ap?.name);
23657
23745
  if (appear && !ctx.reduceMotion()) {
23658
23746
  ensureAppearKeyframes();
23659
23747
  wrap.animation = `himalaya-appear ${appear.durationMs}ms ${appear.easing} both`;
@@ -43817,19 +43905,19 @@ var init_preview_assets_generated = __esm({
43817
43905
  "../../packages/serve/src/preview-assets.generated.ts"() {
43818
43906
  init_preview_assets_format();
43819
43907
  PREVIEW_ASSET_MANIFEST = [
43820
- { key: "assets/index-DKlP06hp.js", contentType: "application/javascript; charset=utf-8", offset: 8, length: 997374, sha256: "9dd7ca28e467c7715af80eb404682bcd75804fee6941c8ae30cacdb542385854" },
43821
- { key: "fonts/WixMadeforDisplay-Bold.ttf", contentType: "font/ttf", offset: 997382, length: 90924, sha256: "ec4c7d63772d980d6e147b2df6215fd2737e4b04cebe0cf7e11dc695fb63cdcf" },
43822
- { key: "fonts/WixMadeforDisplay-ExtraBold.ttf", contentType: "font/ttf", offset: 1088306, length: 90984, sha256: "bf4c16a2774edd38a921edf3099469866cd74c094fd596f3fa4e81f54a04dfaa" },
43823
- { key: "fonts/WixMadeforDisplay-Medium.ttf", contentType: "font/ttf", offset: 1179290, length: 90980, sha256: "368faca44fb9f7207e4af784e94750b1ee59c1098b8689e0f4a918926f244fb5" },
43824
- { key: "fonts/WixMadeforDisplay-Regular.ttf", contentType: "font/ttf", offset: 1270270, length: 90872, sha256: "97ed8f1a6772abe26e3d8af5cecfc4b02faa94497d585b0398b5053b739a70c1" },
43825
- { key: "fonts/WixMadeforDisplay-SemiBold.ttf", contentType: "font/ttf", offset: 1361142, length: 90980, sha256: "642feab8a48ddf6c7a89d7c2a7c0edfa0e6e773f671287e460e222703563191e" },
43826
- { key: "fonts/WixMadeforText-Bold.ttf", contentType: "font/ttf", offset: 1452122, length: 108636, sha256: "37c179b4fefb63ea9637322b84583a2df53aa226c150294eea1675c14b1b8e29" },
43827
- { key: "fonts/WixMadeforText-ExtraBold.ttf", contentType: "font/ttf", offset: 1560758, length: 109084, sha256: "62e2fe4718129f36ecdb0ae4de385bd6b81ecc876146447167c6c140fad699a9" },
43828
- { key: "fonts/WixMadeforText-Medium.ttf", contentType: "font/ttf", offset: 1669842, length: 109048, sha256: "4ecf270136af928612c76fe4ebade91d8156975e5ea4c0cf9225501dd1788e02" },
43829
- { key: "fonts/WixMadeforText-Regular.ttf", contentType: "font/ttf", offset: 1778890, length: 107700, sha256: "dee56f09fd3efc127c1ea95557edc74110c1460a46287da36e0af25efd341ef5" },
43830
- { key: "fonts/WixMadeforText-SemiBold.ttf", contentType: "font/ttf", offset: 1886590, length: 88108, sha256: "dced97a77624bc5f8b1ae65850360908297f4588e09feb6f22792d29dc7e765b" },
43831
- { key: "index.html", contentType: "text/html; charset=utf-8", offset: 1974698, length: 4448, sha256: "a21d7d8d7acdce79ccd442b4137814a17739998360e5b11fc74958c55b77ce30" },
43832
- { key: "t5-frame.html", contentType: "text/html; charset=utf-8", offset: 1979146, length: 13784, sha256: "cfb9465254fab84f0e084bb4542c282758ea29774b5f172840cc0b9e4194ef89" }
43908
+ { key: "assets/index-CeKHbRna.js", contentType: "application/javascript; charset=utf-8", offset: 8, length: 998645, sha256: "4e1a78d6443c5e1ccf0a16a87b5ca4ab1a62fb5b989182a5faa3f31b43932c47" },
43909
+ { key: "fonts/WixMadeforDisplay-Bold.ttf", contentType: "font/ttf", offset: 998653, length: 90924, sha256: "ec4c7d63772d980d6e147b2df6215fd2737e4b04cebe0cf7e11dc695fb63cdcf" },
43910
+ { key: "fonts/WixMadeforDisplay-ExtraBold.ttf", contentType: "font/ttf", offset: 1089577, length: 90984, sha256: "bf4c16a2774edd38a921edf3099469866cd74c094fd596f3fa4e81f54a04dfaa" },
43911
+ { key: "fonts/WixMadeforDisplay-Medium.ttf", contentType: "font/ttf", offset: 1180561, length: 90980, sha256: "368faca44fb9f7207e4af784e94750b1ee59c1098b8689e0f4a918926f244fb5" },
43912
+ { key: "fonts/WixMadeforDisplay-Regular.ttf", contentType: "font/ttf", offset: 1271541, length: 90872, sha256: "97ed8f1a6772abe26e3d8af5cecfc4b02faa94497d585b0398b5053b739a70c1" },
43913
+ { key: "fonts/WixMadeforDisplay-SemiBold.ttf", contentType: "font/ttf", offset: 1362413, length: 90980, sha256: "642feab8a48ddf6c7a89d7c2a7c0edfa0e6e773f671287e460e222703563191e" },
43914
+ { key: "fonts/WixMadeforText-Bold.ttf", contentType: "font/ttf", offset: 1453393, length: 108636, sha256: "37c179b4fefb63ea9637322b84583a2df53aa226c150294eea1675c14b1b8e29" },
43915
+ { key: "fonts/WixMadeforText-ExtraBold.ttf", contentType: "font/ttf", offset: 1562029, length: 109084, sha256: "62e2fe4718129f36ecdb0ae4de385bd6b81ecc876146447167c6c140fad699a9" },
43916
+ { key: "fonts/WixMadeforText-Medium.ttf", contentType: "font/ttf", offset: 1671113, length: 109048, sha256: "4ecf270136af928612c76fe4ebade91d8156975e5ea4c0cf9225501dd1788e02" },
43917
+ { key: "fonts/WixMadeforText-Regular.ttf", contentType: "font/ttf", offset: 1780161, length: 107700, sha256: "dee56f09fd3efc127c1ea95557edc74110c1460a46287da36e0af25efd341ef5" },
43918
+ { key: "fonts/WixMadeforText-SemiBold.ttf", contentType: "font/ttf", offset: 1887861, length: 88108, sha256: "dced97a77624bc5f8b1ae65850360908297f4588e09feb6f22792d29dc7e765b" },
43919
+ { key: "index.html", contentType: "text/html; charset=utf-8", offset: 1975969, length: 4448, sha256: "79979ee36bb97117452963ece8b9816095ddcec8cc95fa1798448d0c9fc6402b" },
43920
+ { key: "t5-frame.html", contentType: "text/html; charset=utf-8", offset: 1980417, length: 13784, sha256: "cfb9465254fab84f0e084bb4542c282758ea29774b5f172840cc0b9e4194ef89" }
43833
43921
  ];
43834
43922
  }
43835
43923
  });
Binary file
package/guides/tokens.md CHANGED
@@ -15,7 +15,7 @@ one registry, mirrored byte-for-byte by the iOS + Android decoders.
15
15
  | `radius` | name → number (px) | **required** |
16
16
  | `shadows` | name → { opacity, radius, color?, x?, y? } | optional |
17
17
  | `gradients` | name → { colors[], angle?, locations? } | optional (`colors` = token NAMES) |
18
- | `motions` | name → { duration, easing? } | optional |
18
+ | `motions` | name → { duration, easing?, spring? } | optional |
19
19
  | `materials` | name → { style, tint?, opacity?, blur? } | optional |
20
20
  | `tabBar` / `drawer` / `sidebar` | nav-chrome style blocks | optional |
21
21
  | `kit` | { material?, variant?, density?, motion? } | optional — the active design kit |
@@ -34,6 +34,15 @@ the missing field), so the bug passes web review and only breaks on device. CI g
34
34
  A color is a hex string, OR a per-scheme object `{ light, dark?, highContrast? }`. In the
35
35
  object form **`light` is required**; `dark`/`highContrast` fall back to it.
36
36
 
37
+ ## Motion
38
+
39
+ `easing` is `linear`, `easeIn`, `easeOut`, `easeInOut`, `spring` or `emphasized` (Material 3's
40
+ emphasized curve). A `spring` may declare its physics as SwiftUI's two parameters —
41
+ `"spring": { "response": 0.5, "dampingFraction": 0.6 }` (period in seconds; 1 = no overshoot) —
42
+ and iOS, Android and the web then draw that same spring until it settles (`duration` no longer
43
+ bounds it; React Native keeps its own fixed entrance curve). Values are held to `response` 0.05–10 and
44
+ `dampingFraction` 0.1–4. Declare none and each keeps its own default spring.
45
+
37
46
  ## Baseline — copy this, then extend
38
47
 
39
48
  The starter set `himi init` writes (complete, valid, minimal):
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wix/himalaya-cli",
3
- "version": "0.992.0",
3
+ "version": "0.994.0",
4
4
  "type": "module",
5
5
  "description": "himi — the Himalaya authoring CLI. Build a Tier-5 content package on your own machine, push it to the production serve as a draft, preview it on web + Himi Player, and read worker logs back — the remote dev loop. Wraps @himalaya/serve-cli for transport.",
6
6
  "keywords": [
@@ -65,5 +65,5 @@
65
65
  "artifactId": "himalaya-cli"
66
66
  }
67
67
  },
68
- "falconPackageHash": "cbd96ed65b504cab0c2d276b2a961b73f9bf6730d07259f3d334a43e"
68
+ "falconPackageHash": "77c7bb038c5bbcc5a5cc5e0542d7612e8dd1b55183ade401a587e064"
69
69
  }