@mkbabb/keyframes.js 6.4.0 → 6.5.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.
@@ -3489,6 +3489,24 @@ export declare const serializeSelector: (selector: KeyframeSelector) => string;
3489
3489
 
3490
3490
  export declare const serializeTimingFunction: (value: NonNullable<CSSAnimationOptions["timingFunction"]>) => CssEasingLiteral;
3491
3491
 
3492
+ /**
3493
+ * Seconds on the spring's own clock until the normalised step response (from 0
3494
+ * to a target of 1, starting at `initialVelocity` travel/s) enters the rest
3495
+ * envelope `|x − 1| < settleThreshold ∧ |v| < velocitySettleThreshold` and stays
3496
+ * there: the LAST time it is outside. After it, the spring never leaves.
3497
+ *
3498
+ * Pass `velocitySettleThreshold: Infinity` for an envelope on position alone.
3499
+ * Returns `Infinity` when the solver's trajectory never settles: an undamped
3500
+ * spring (ζ = 0) that starts outside the envelope, or one damped so hard
3501
+ * (ζ ≳ 1e8) that the solver's slow root rounds to 0 in floating point and the
3502
+ * spring never moves. An exit is found down to `response / 2^32` s. Pure and
3503
+ * server-safe; reduced motion is not an input.
3504
+ *
3505
+ * @example
3506
+ * settleTime({ response: 0.5, dampingFraction: 0.45 }); // ≈ 1.6 (seconds)
3507
+ */
3508
+ export declare function settleTime(opts: SpringSettleOptions): number;
3509
+
3492
3510
  declare const shake: PresetFactory;
3493
3511
 
3494
3512
  declare const skeletonLoading: PresetFactory;
@@ -3786,9 +3804,20 @@ export declare interface SpringLinearStopsOptions {
3786
3804
  * Upper bound on the sampled time span in seconds. Default 4 ×
3787
3805
  * response (covers ~99% of the envelope for ζ ≥ 0.3). Increase
3788
3806
  * if a very-underdamped spring (ζ < 0.3) is being sampled and
3789
- * the tail keeps ringing past the default cap.
3807
+ * the tail keeps ringing past the default cap. `"settle"` spans
3808
+ * exactly `settleTime(opts)` (call it with the same options to read
3809
+ * the span), so the pinned end stop jumps by at most
3810
+ * `settleThreshold`; it throws a `RangeError` when that is `Infinity`
3811
+ * (ζ = 0, or ζ past floating-point range) or 0.
3790
3812
  */
3791
- maxDuration?: number;
3813
+ maxDuration?: number | "settle";
3814
+ /**
3815
+ * Starting velocity, travel/s on the spring's clock (travel = this
3816
+ * leg's distance, so the curve runs 0 → 1). `> 0` is already moving
3817
+ * toward the target; `< 0` is still heading away. Default 0 (the
3818
+ * unseeded curve).
3819
+ */
3820
+ initialVelocity?: number;
3792
3821
  }
3793
3822
 
3794
3823
  declare const springPop: PresetFactory;
@@ -3831,8 +3860,8 @@ export declare class SpringProgress {
3831
3860
  * active query); a numeric policy under an active `prefers-reduced-motion`
3832
3861
  * query yields the intensity. `evaluateAt` solves toward a SCALED target
3833
3862
  * `origin + s·(target − origin)`, so the spring still starts at the origin
3834
- * but travels only `s ×` the full distance — the peak overshoot scales while
3835
- * the envelope (curve + settle time) is preserved by construction. Re-resolved
3863
+ * but travels only `s ×` the full distance — the peak overshoot scales, the
3864
+ * normalised curve is kept (absolute thresholds: it settles sooner). Re-resolved
3836
3865
  * per re-seat (not per frame) so a live OS toggle is honored at the next
3837
3866
  * target change, and the per-frame `evaluateAt` stays a field read — zero
3838
3867
  * extra `matchMedia` cost in the hot path.
@@ -4011,11 +4040,13 @@ export declare interface SpringProgressOptions {
4011
4040
  * - `true` — the classic binary snap: under an active query the spring
4012
4041
  * jumps to target at zero velocity (amplitude scale `0`). SSR-safe.
4013
4042
  * - a `number` ∈ [0, 1] — the AMPLITUDE INTENSITY: under an active query
4014
- * the spring keeps its trajectory SHAPE (curve + settle time) but scales
4015
- * its displacement-from-rest (`originValue − targetValue`) to this
4016
- * fraction. At `0.3` the peak overshoot is 30 % of the full-intensity
4017
- * peak; the envelope is preserved by construction (the analytic form
4018
- * makes the scaling exact and free). `1` ≈ full motion, `0` ≡ the snap.
4043
+ * the spring keeps its trajectory SHAPE (the normalised curve) but
4044
+ * scales its displacement-from-rest (`originValue − targetValue`) to
4045
+ * this fraction. At `0.3` the peak overshoot is 30 % of the
4046
+ * full-intensity peak (the analytic form makes the scaling exact and
4047
+ * free). The thresholds are absolute, so the shorter travel settles
4048
+ * SOONER: `settleTime` over `s · D` (see `settleTime`). `1` ≈ full
4049
+ * motion, `0` ≡ the snap.
4019
4050
  *
4020
4051
  * The scale is the CONSUMER's policy (a settings slider, a per-animation
4021
4052
  * field) — the OS exposes only a binary signal; kf provides the mechanism.
@@ -4025,6 +4056,10 @@ export declare interface SpringProgressOptions {
4025
4056
 
4026
4057
  declare const springScaleIn: PresetFactory;
4027
4058
 
4059
+ /** Options for {@link settleTime}: the spring, its starting velocity, its rest envelope. */
4060
+ export declare interface SpringSettleOptions extends Pick<SpringProgressOptions, "response" | "dampingFraction">, Partial<Pick<SpringProgressOptions, "initialVelocity" | "settleThreshold" | "velocitySettleThreshold">> {
4061
+ }
4062
+
4028
4063
  declare const springSlideIn: PresetFactory;
4029
4064
 
4030
4065
  /** Subscriber callback. Receives current position + velocity each emission. */
@@ -4085,8 +4120,22 @@ export declare interface SpringTimingFunctionOptions {
4085
4120
  * time that normalized `t = 1` maps to. Default 4 × response
4086
4121
  * (covers ~99% of the envelope for ζ ≥ 0.3). Increase for very
4087
4122
  * underdamped springs (ζ < 0.3) whose tail rings past the cap.
4088
- */
4089
- maxDuration?: number;
4123
+ * `"settle"` spans exactly `settleTime(opts)` (call it with the same
4124
+ * options to read the span), so the pinned `fn(1) = 1` jumps by at most
4125
+ * `settleThreshold`; it throws a `RangeError` when that is `Infinity`
4126
+ * (ζ = 0, or ζ past floating-point range) or 0.
4127
+ */
4128
+ maxDuration?: number | "settle";
4129
+ /**
4130
+ * Starting velocity, travel/s on the spring's clock (travel = this
4131
+ * leg's distance, so the curve runs 0 → 1). `> 0` is already moving
4132
+ * toward the target; `< 0` is still heading away. Default 0 (the
4133
+ * unseeded curve). Time on the curve is `u = t / maxDuration`, so the
4134
+ * slope at `u = 0` is `initialVelocity × maxDuration`; `.fn` and `.css`
4135
+ * add finer knots inside their first interval so their first segment
4136
+ * leaves at that slope (within 2 %) instead of a whole step's chord.
4137
+ */
4138
+ initialVelocity?: number;
4090
4139
  }
4091
4140
 
4092
4141
  /**
package/dist/keyframes.js CHANGED
@@ -1,4 +1,4 @@
1
- import { D as e, E as t, S as n, T as r, _ as i, a, b as o, c as s, d as c, f as l, g as u, h as d, l as f, m as p, o as m, p as h, s as g, t as _, u as v, w as y, x as b, y as x } from "./sequence-CPGHHEVM.js";
1
+ import { C as e, D as t, E as n, O as r, S as i, T as a, _ as o, a as s, b as c, c as l, d as u, f as d, g as f, h as p, l as m, m as h, o as g, p as _, s as v, t as y, u as b, v as x, x as ee } from "./sequence-BRhiigt1.js";
2
2
  //#region src/animation/physics/numeric.ts
3
3
  var S = class {
4
4
  _out = new Float64Array();
@@ -9,15 +9,15 @@ var S = class {
9
9
  _duration;
10
10
  _respectReducedMotion;
11
11
  _easingFn;
12
- _playback = new d();
13
- constructor(e, n) {
12
+ _playback = new f();
13
+ constructor(e, r) {
14
14
  if (e.length < 2) throw Error("NumericAnimation requires at least 2 keyframes.");
15
- this.keyframes = e.map((e) => ({ ...e })), this._duration = n?.duration ?? 0, this._respectReducedMotion = n?.respectReducedMotion ?? !1;
16
- let i = n?.timingFunction;
15
+ this.keyframes = e.map((e) => ({ ...e })), this._duration = r?.duration ?? 0, this._respectReducedMotion = r?.respectReducedMotion ?? !1;
16
+ let i = r?.timingFunction;
17
17
  if (typeof i == "string") throw new t("timingFunction", i, "NumericAnimation accepts a callable TimingFunction or a typed Easing; resolve a string name first via `await resolveEasing(name)`.");
18
- if (this._easingFn = i == null ? (e) => e : r(i).fn, n?.positions) {
19
- if (n.positions.length !== e.length) throw Error("positions length must match keyframes length.");
20
- this.positions = n.positions;
18
+ if (this._easingFn = i == null ? (e) => e : n(i).fn, r?.positions) {
19
+ if (r.positions.length !== e.length) throw Error("positions length must match keyframes length.");
20
+ this.positions = r.positions;
21
21
  } else this.positions = e.map((t, n) => n / (e.length - 1) * 100);
22
22
  this.result = { ...e[0] }, this.segments = this.buildSegments();
23
23
  }
@@ -41,13 +41,13 @@ var S = class {
41
41
  timingFunction: this._easingFn
42
42
  };
43
43
  }
44
- at(e) {
45
- let t = x(e, 0, 1) * 100, r = n(this.segments, t, (e) => e.startPos, (e) => e.stopPos);
44
+ at(t) {
45
+ let n = c(t, 0, 1) * 100, r = e(this.segments, n, (e) => e.startPos, (e) => e.stopPos);
46
46
  r === -1 && (r = this.segments.length - 1);
47
- let i = this.segments[r], a = b(x(t, i.startPos, i.stopPos), i.startPos, i.stopPos, 0, 1), s = i.timingFunction(a), c = i.keys.length;
48
- this._out.length < c && (this._out = new Float64Array(c)), o(i.from, i.to, s, this._out);
49
- let l = this.result;
50
- for (let e = 0; e < c; e++) l[i.keys[e]] = this._out[e];
47
+ let a = this.segments[r], o = i(c(n, a.startPos, a.stopPos), a.startPos, a.stopPos, 0, 1), s = a.timingFunction(o), l = a.keys.length;
48
+ this._out.length < l && (this._out = new Float64Array(l)), ee(a.from, a.to, s, this._out);
49
+ let u = this.result;
50
+ for (let e = 0; e < l; e++) u[a.keys[e]] = this._out[e];
51
51
  return this.result;
52
52
  }
53
53
  updateKeyframe(e, t) {
@@ -71,7 +71,7 @@ function C(e) {
71
71
  let t = e.curr.time - e.prev.time;
72
72
  return t <= 0 ? 0 : (e.curr.value - e.prev.value) / (t / 1e3);
73
73
  }
74
- function ee(e, t, n) {
74
+ function te(e, t, n) {
75
75
  let r = C(e), i = new h({
76
76
  ...n,
77
77
  initial: e.curr.value,
@@ -143,12 +143,12 @@ var w = (e) => {
143
143
  boundaryEpsilon;
144
144
  constructor(e) {
145
145
  this.boundaryEpsilon = e?.boundaryEpsilon ?? .005;
146
- let n = e?.easing;
147
- if (typeof n == "string") throw new t("easing", n, "Timeline accepts a callable TimingFunction or a typed Easing; resolve a string name first via `await resolveEasing(name)`.");
148
- this._easingFn = n == null ? (e) => e : r(n).fn, e?.smoothing === !1 ? this.smoother = null : this.smoother = new p(e?.smoothing);
146
+ let r = e?.easing;
147
+ if (typeof r == "string") throw new t("easing", r, "Timeline accepts a callable TimingFunction or a typed Easing; resolve a string name first via `await resolveEasing(name)`.");
148
+ this._easingFn = r == null ? (e) => e : n(r).fn, e?.smoothing === !1 ? this.smoother = null : this.smoother = new p(e?.smoothing);
149
149
  }
150
150
  applyPipeline() {
151
- let e = x(this.sample(), 0, 1);
151
+ let e = c(this.sample(), 0, 1);
152
152
  e = this._easingFn(e);
153
153
  let t = this.boundaryEpsilon;
154
154
  return e <= t ? e = 0 : e >= 1 - t && (e = 1), e;
@@ -187,7 +187,7 @@ var w = (e) => {
187
187
  let e = this.getViewportHeight() * this.threshold;
188
188
  return e <= 0 ? 0 : this.getScrollY() / e;
189
189
  }
190
- }, O = class extends E {
190
+ }, ne = class extends E {
191
191
  value = 0;
192
192
  constructor(e) {
193
193
  super({
@@ -201,17 +201,17 @@ var w = (e) => {
201
201
  sample() {
202
202
  return this.value;
203
203
  }
204
- }, te = 2 * Math.PI;
205
- function k(e, t) {
204
+ }, re = 2 * Math.PI;
205
+ function O(e, t) {
206
206
  let n = e - Math.floor(e);
207
207
  switch (t) {
208
- case "sine": return Math.sin(te * n);
208
+ case "sine": return Math.sin(re * n);
209
209
  case "triangle": return n < .5 ? 4 * n - 1 : 3 - 4 * n;
210
210
  case "square": return n < .5 ? 1 : -1;
211
211
  case "sawtooth": return 2 * n - 1;
212
212
  }
213
213
  }
214
- var A = class {
214
+ var ie = class {
215
215
  frequency;
216
216
  waveform;
217
217
  phase = 0;
@@ -223,43 +223,43 @@ var A = class {
223
223
  return this.phase = t - Math.floor(t), this.phase;
224
224
  }
225
225
  get value() {
226
- return k(this.phase, this.waveform);
226
+ return O(this.phase, this.waveform);
227
227
  }
228
228
  sample(e) {
229
- return k(e * this.frequency, this.waveform);
229
+ return O(e * this.frequency, this.waveform);
230
230
  }
231
231
  reset(e = 0) {
232
232
  this.phase = e - Math.floor(e);
233
233
  }
234
- }, j = (e, t) => {
235
- if (typeof e == "number") return x(e, 0, Math.max(0, t - 1));
234
+ }, k = (e, t) => {
235
+ if (typeof e == "number") return c(e, 0, Math.max(0, t - 1));
236
236
  switch (e) {
237
237
  case "first": return 0;
238
238
  case "last": return t - 1;
239
239
  case "center": return (t - 1) / 2;
240
240
  case "edges": return -1;
241
241
  }
242
- }, ne = (e, t, n) => n === "edges" ? Math.min(e, t - 1 - e) : Math.abs(e - j(n, t)), re = (e, t) => {
242
+ }, ae = (e, t, n) => n === "edges" ? Math.min(e, t - 1 - e) : Math.abs(e - k(n, t)), oe = (e, t) => {
243
243
  if (e <= 1) return 0;
244
244
  if (t === "edges") return Math.floor((e - 1) / 2);
245
- let n = j(t, e);
245
+ let n = k(t, e);
246
246
  return Math.max(n, e - 1 - n);
247
247
  };
248
- function M(e, n = {}) {
249
- let { each: i = 100, from: a = "first", ease: o } = n;
248
+ function A(e, r = {}) {
249
+ let { each: i = 100, from: a = "first", ease: o } = r;
250
250
  if (typeof o == "string") throw new t("ease", o, "stagger accepts a callable TimingFunction or a typed Easing; resolve a string name first via `await resolveEasing(name)`.");
251
- let s = o ? r(o).fn : void 0, c = typeof e == "number" ? e : e.length, l = (e, t) => {
251
+ let s = o ? n(o).fn : void 0, c = typeof e == "number" ? e : e.length, l = (e, t) => {
252
252
  if (t <= 1) return 0;
253
- let n = re(t, a);
253
+ let n = oe(t, a);
254
254
  if (n === 0) return 0;
255
- let r = ne(e, t, a);
255
+ let r = ae(e, t, a);
256
256
  return s ? s(r / n) * i * n : r * i;
257
257
  }, u = ((e, t = c) => l(e, t));
258
258
  return u.delays = (e = c) => Array.from({ length: e }, (t, n) => l(n, e)), u;
259
259
  }
260
260
  //#endregion
261
261
  //#region src/animation/orchestration/flip.ts
262
- var ie = 300, ae = "translate(0px, 0px) scale(1, 1)", N = (e) => {
262
+ var j = 300, M = "translate(0px, 0px) scale(1, 1)", N = (e) => {
263
263
  let t = e.getBoundingClientRect();
264
264
  return {
265
265
  x: t.x,
@@ -269,28 +269,28 @@ var ie = 300, ae = "translate(0px, 0px) scale(1, 1)", N = (e) => {
269
269
  };
270
270
  }, P = /* @__PURE__ */ new WeakMap(), F = (e) => {
271
271
  let t = P.get(e);
272
- return t === void 0 ? !1 : (t(), e.style.transform = ae, !0);
272
+ return t === void 0 ? !1 : (t(), e.style.transform = M, !0);
273
273
  }, I = (e, t, n, r) => {
274
274
  let { translateX: i, translateY: a, scaleX: o, scaleY: s } = e.at(r);
275
275
  return `translate(${t.x + i - n.x}px, ${t.y + a - n.y}px) scale(${n.width === 0 ? 1 : t.width * o / n.width}, ${n.height === 0 ? 1 : t.height * s / n.height})`;
276
276
  }, L = (e, t, n, r, i) => {
277
- let { duration: a = ie, timingFunction: o, transformOrigin: s = "top left" } = i, c = new T(t, r, {
277
+ let { duration: a = j, timingFunction: o, transformOrigin: s = "top left" } = i, c = new T(t, r, {
278
278
  ...o === void 0 ? {} : { timingFunction: o },
279
279
  transformOrigin: s
280
280
  });
281
281
  if (e.style.transformOrigin = s, e.style.transform = I(c, t, n, 0), a <= 0) return e.style.transform = I(c, t, n, 1), Object.assign(Promise.resolve(), { cancel: () => {} });
282
- let l = new d(), u = () => {
282
+ let l = new f(), u = () => {
283
283
  l.stop(), P.get(e) === u && P.delete(e);
284
284
  };
285
285
  P.set(e, u);
286
- let f = l.play(a, (r) => {
286
+ let d = l.play(a, (r) => {
287
287
  e.style.transform = I(c, t, n, r);
288
288
  }).then(() => {
289
289
  P.get(e) === u && P.delete(e);
290
290
  });
291
- return Object.assign(f, { cancel: u });
291
+ return Object.assign(d, { cancel: u });
292
292
  };
293
- function oe(e, t, n = {}) {
293
+ function se(e, t, n = {}) {
294
294
  let r = N(e);
295
295
  F(e), t();
296
296
  let i = N(e);
@@ -302,7 +302,7 @@ function R(e, t, n = {}) {
302
302
  }
303
303
  //#endregion
304
304
  //#region src/animation/orchestration/split-text/refuse.ts
305
- var se = {
305
+ var ce = {
306
306
  unmeasurable: "the container yielded no laid-out client rects (detached, display:none, or zero-area) — a line-split cannot group fragments without a measured line box. Use by:\"word\" (layout-independent), or split after the element is laid out.",
307
307
  unstable: "the line measurement could not converge — the container's size depends on its own content flow (a container-query / intrinsic-size feedback loop), so the line grouping oscillates on every reflow. Refused rather than latch a stale line map.",
308
308
  empty: "there is no text content to split into lines."
@@ -310,7 +310,7 @@ var se = {
310
310
  name = "SplitTextRefusalError";
311
311
  reason;
312
312
  constructor(t, n) {
313
- super(`splitText refused a by:"line" split (${t}): ` + (n ?? se[t])), this.reason = t, Object.setPrototypeOf(this, e.prototype);
313
+ super(`splitText refused a by:"line" split (${t}): ` + (n ?? ce[t])), this.reason = t, Object.setPrototypeOf(this, e.prototype);
314
314
  }
315
315
  }, B = (e) => e.length === 0 || /^\s+$/u.test(e), V = typeof Intl < "u" && typeof Intl.Segmenter == "function";
316
316
  function H(e, t) {
@@ -355,20 +355,20 @@ function U(e, t) {
355
355
  var W = (e) => Math.round(e), G = (e) => e.some((e) => {
356
356
  let t = e.getBoundingClientRect();
357
357
  return t.width > 0 || t.height > 0;
358
- }), ce = new Set(/* @__PURE__ */ "article.aside.blockquote.button.details.dialog.fieldset.figure.footer.form.h1.h2.h3.h4.h5.h6.header.hgroup.img.input.li.main.menu.meter.nav.ol.optgroup.option.output.progress.search.section.select.summary.table.td.textarea.th.tr.ul".split("."));
359
- function le(e) {
358
+ }), le = new Set(/* @__PURE__ */ "article.aside.blockquote.button.details.dialog.fieldset.figure.footer.form.h1.h2.h3.h4.h5.h6.header.hgroup.img.input.li.main.menu.meter.nav.ol.optgroup.option.output.progress.search.section.select.summary.table.td.textarea.th.tr.ul".split("."));
359
+ function ue(e) {
360
360
  if (e.hasAttribute("role")) return !0;
361
361
  let t = e.tagName.toLowerCase();
362
- return t === "a" || t === "area" ? e.hasAttribute("href") : ce.has(t);
362
+ return t === "a" || t === "area" ? e.hasAttribute("href") : le.has(t);
363
363
  }
364
- function ue(e) {
364
+ function de(e) {
365
365
  if (!e.isConnected || !G([e])) return !1;
366
366
  let t = e.ownerDocument.createElement("span");
367
367
  t.textContent = "x", t.style.cssText = "position:absolute;visibility:hidden", e.appendChild(t);
368
368
  let n = G([t]);
369
369
  return t.remove(), n;
370
370
  }
371
- function de(e, t, n, r) {
371
+ function fe(e, t, n, r) {
372
372
  let i = e.createDocumentFragment(), a = [];
373
373
  for (let o of t) {
374
374
  if (o.kind === "space") {
@@ -385,7 +385,7 @@ function de(e, t, n, r) {
385
385
  }
386
386
  function K(e, t, n, r, i) {
387
387
  if (t.trim().length === 0) throw new z("empty");
388
- if (!ue(e)) throw new z("unmeasurable");
388
+ if (!de(e)) throw new z("unmeasurable");
389
389
  let a = e.ownerDocument, o = H(t, n), s = [], c = [], l = /* @__PURE__ */ new Map();
390
390
  for (let e of o) {
391
391
  if (e.kind === "space") {
@@ -419,17 +419,17 @@ function K(e, t, n, r, i) {
419
419
  return e.replaceChildren(p), m;
420
420
  }
421
421
  function q(e, t, n) {
422
- return e.setAttribute("aria-label", t), n === null || le(e) ? !1 : (e.setAttribute("role", n), !0);
422
+ return e.setAttribute("aria-label", t), n === null || ue(e) ? !1 : (e.setAttribute("role", n), !0);
423
423
  }
424
- function fe(e, t = {}) {
424
+ function pe(e, t = {}) {
425
425
  let { by: n = "word", a11y: r = !0, role: i = "img", locale: a, stagger: o, fragmentClass: s = "kf-split", onRefuse: c } = t, l = e.ownerDocument, u = e.textContent ?? "", d = e.innerHTML, f = e.getAttribute("aria-label"), p;
426
426
  if (n === "line") p = K(e, u, a, s, r);
427
427
  else {
428
- let t = de(l, n === "grapheme" ? U(u, a) : H(u, a), s, r);
428
+ let t = fe(l, n === "grapheme" ? U(u, a) : H(u, a), s, r);
429
429
  e.replaceChildren(t.frag), p = t.fragments;
430
430
  }
431
- let m = r ? q(e, u, i) : !1, h = M(p.length, o), g = h.delays(p.length), _ = null, v = 0, y = 0, b = () => {
432
- n === "line" && (p = K(e, u, a, s, r), r && q(e, u, i), h = M(p.length, o), g = h.delays(p.length));
431
+ let m = r ? q(e, u, i) : !1, h = A(p.length, o), g = h.delays(p.length), _ = null, v = 0, y = 0, b = () => {
432
+ n === "line" && (p = K(e, u, a, s, r), r && q(e, u, i), h = A(p.length, o), g = h.delays(p.length));
433
433
  }, x = () => {
434
434
  _?.disconnect(), _ = null;
435
435
  };
@@ -471,7 +471,7 @@ function fe(e, t = {}) {
471
471
  }
472
472
  //#endregion
473
473
  //#region src/animation/orchestration/view-transition/view-transition.ts
474
- var pe = 300, me = () => typeof document < "u" && typeof document.startViewTransition == "function", J = (e) => e.then(() => void 0, () => void 0);
474
+ var me = 300, he = () => typeof document < "u" && typeof document.startViewTransition == "function", J = (e) => e.then(() => void 0, () => void 0);
475
475
  function Y(e) {
476
476
  let t = Promise.resolve(e()).then(() => void 0, () => void 0);
477
477
  return {
@@ -482,7 +482,7 @@ function Y(e) {
482
482
  backend: "immediate"
483
483
  };
484
484
  }
485
- function he(e, t, n, r) {
485
+ function ge(e, t, n, r) {
486
486
  if (t.length === 0) return Y(e);
487
487
  let i = {
488
488
  duration: n,
@@ -497,9 +497,9 @@ function he(e, t, n, r) {
497
497
  };
498
498
  }
499
499
  function X(e, t = {}) {
500
- let { types: n, duration: r = pe, timingFunction: a, shared: o = [], fallback: s = "flip", respectReducedMotion: c = !0 } = t, l = () => {
501
- if (typeof s == "function") {
502
- let t = s(e).then(() => void 0, () => void 0);
500
+ let { types: n, duration: r = me, timingFunction: i, shared: a = [], fallback: o = "flip", respectReducedMotion: s = !0 } = t, c = () => {
501
+ if (typeof o == "function") {
502
+ let t = o(e).then(() => void 0, () => void 0);
503
503
  return {
504
504
  ready: t,
505
505
  finished: t,
@@ -508,10 +508,10 @@ function X(e, t = {}) {
508
508
  backend: "flip"
509
509
  };
510
510
  }
511
- return s === "none" ? Y(e) : he(e, o, r, a);
511
+ return o === "none" ? Y(e) : ge(e, a, r, i);
512
512
  };
513
- return i(c, () => Y(e), () => {
514
- if (!me()) return l();
513
+ return x(s, () => Y(e), () => {
514
+ if (!he()) return c();
515
515
  let t = document, r = t.startViewTransition.bind(t), i;
516
516
  try {
517
517
  i = n && n.length > 0 ? r({
@@ -522,7 +522,7 @@ function X(e, t = {}) {
522
522
  try {
523
523
  i = r(e);
524
524
  } catch {
525
- return l();
525
+ return c();
526
526
  }
527
527
  }
528
528
  return {
@@ -536,7 +536,7 @@ function X(e, t = {}) {
536
536
  }
537
537
  //#endregion
538
538
  //#region src/animation/orchestration/drag/draggable.ts
539
- var ge = 100, _e = .4, ve = 5, Z = class {
539
+ var _e = 100, ve = .4, ye = 5, Z = class {
540
540
  spring;
541
541
  axis;
542
542
  transform;
@@ -553,7 +553,7 @@ var ge = 100, _e = .4, ve = 5, Z = class {
553
553
  onPointerMove = (e) => this.handleMove(e);
554
554
  onPointerUp = (e) => this.handleUp(e);
555
555
  constructor(e) {
556
- this.axis = e?.axis ?? "x", this.transform = e?.transform ?? ((e) => e), this.velocityWindow = e?.velocityWindow ?? ge, this.bounds = e?.bounds, this.rubberBand = e?.rubberBand ?? _e, this.snap = e?.snap !== void 0 && e.snap.length > 0 ? e.snap : void 0, this.spring = e?.spring ?? new h(e?.springOptions);
556
+ this.axis = e?.axis ?? "x", this.transform = e?.transform ?? ((e) => e), this.velocityWindow = e?.velocityWindow ?? _e, this.bounds = e?.bounds, this.rubberBand = e?.rubberBand ?? ve, this.snap = e?.snap !== void 0 && e.snap.length > 0 ? e.snap : void 0, this.spring = e?.spring ?? new h(e?.springOptions);
557
557
  }
558
558
  get dragging() {
559
559
  return this.capturedPointerId !== void 0;
@@ -613,17 +613,17 @@ var ge = 100, _e = .4, ve = 5, Z = class {
613
613
  this.pushSample(n, e.timeStamp);
614
614
  let r = this.estimateVelocity();
615
615
  if (t && this.endGesture(t), this.snap) {
616
- let e = m({
616
+ let e = g({
617
617
  initial: n,
618
618
  velocity: r,
619
- friction: ve
619
+ friction: ye
620
620
  }), t = this.nearestSnap(e);
621
- this.bounds && (t = x(t, this.bounds.min, this.bounds.max)), this.spring.reset(n, r), this.spring.target = t;
621
+ this.bounds && (t = c(t, this.bounds.min, this.bounds.max)), this.spring.reset(n, r), this.spring.target = t;
622
622
  return;
623
623
  }
624
624
  if (this.spring.reset(n, r), this.bounds) {
625
625
  let e = this.spring.value;
626
- (e < this.bounds.min || e > this.bounds.max) && (this.spring.target = x(e, this.bounds.min, this.bounds.max));
626
+ (e < this.bounds.min || e > this.bounds.max) && (this.spring.target = c(e, this.bounds.min, this.bounds.max));
627
627
  }
628
628
  }
629
629
  nearestSnap(e) {
@@ -653,13 +653,13 @@ var ge = 100, _e = .4, ve = 5, Z = class {
653
653
  return r <= 0 ? 0 : (n.value - t.value) / r * 1e3;
654
654
  }
655
655
  };
656
- function ye(e, t) {
656
+ function be(e, t) {
657
657
  let n = new Z(t);
658
658
  return n.attach(e), n;
659
659
  }
660
660
  //#endregion
661
661
  //#region src/animation/orchestration/drag/2d.ts
662
- function be(e, t) {
662
+ function xe(e, t) {
663
663
  let n = new Z({
664
664
  ...t?.x,
665
665
  axis: "x"
@@ -702,8 +702,8 @@ function be(e, t) {
702
702
  //#region src/animation/load-engine.ts
703
703
  var Q, $ = () => Q ??= import("./engine/index.js").catch((e) => {
704
704
  throw Q = void 0, e;
705
- }), xe = () => {
705
+ }), Se = () => {
706
706
  $();
707
707
  };
708
708
  //#endregion
709
- export { t as AnimationOptionError, Z as Draggable, T as ElementMorph, D as KeyframesScrollTimeline, O as ManualTimeline, S as NumericAnimation, A as Oscillator, d as RAFPlayback, _ as Sequence, p as SmoothProgress, z as SplitTextRefusalError, h as SpringProgress, E as Timeline, e as UnknownEasingError, g as createNativeTimeline, a as decay, m as decayRest, ye as drag, be as drag2D, oe as flip, R as flipShared, c as linearFromSamples, $ as loadAnimationEngine, C as probeVelocity, u as reducedMotionScale, ee as reseatToSpring, y as resolveEasing, s as serializeSelector, fe as splitText, l as springLinearStops, f as springTimingFunction, v as springTimingLUT, M as stagger, r as toEasing, X as viewTransition, xe as warmEngine, k as waveformValue };
709
+ export { t as AnimationOptionError, Z as Draggable, T as ElementMorph, D as KeyframesScrollTimeline, ne as ManualTimeline, S as NumericAnimation, ie as Oscillator, f as RAFPlayback, y as Sequence, p as SmoothProgress, z as SplitTextRefusalError, h as SpringProgress, E as Timeline, r as UnknownEasingError, v as createNativeTimeline, s as decay, g as decayRest, be as drag, xe as drag2D, se as flip, R as flipShared, u as linearFromSamples, $ as loadAnimationEngine, C as probeVelocity, o as reducedMotionScale, te as reseatToSpring, a as resolveEasing, l as serializeSelector, _ as settleTime, pe as splitText, d as springLinearStops, m as springTimingFunction, b as springTimingLUT, A as stagger, n as toEasing, X as viewTransition, Se as warmEngine, O as waveformValue };
@@ -1,2 +1,2 @@
1
- import { n as e, t } from "./registry-8bG0FhGi.js";
1
+ import { n as e, t } from "./registry-DIMQ5-f9.js";
2
2
  export { t as resolveTimingFunction, e as timingFunctionEntries };
@@ -1,4 +1,4 @@
1
- import { c as e } from "./sequence-CPGHHEVM.js";
1
+ import { c as e } from "./sequence-BRhiigt1.js";
2
2
  import { CubicBezier as t, bezierPresets as n, easing as r, linearEasing as i, steppedEase as a } from "@mkbabb/value.js/easing";
3
3
  import { collectAnimationOptions as o, collectCustomFunctions as s, collectKeyframes as c, collectPropertyDescriptors as l, collectStyleRules as u, collectTimelineOptions as d, parseAnimationRange as f, parseAnimationTimeline as p, parseCssScalar as m, parseCssValues as h, parseKeyframeSelector as g, parseStylesheet as _, parseTimingFunction as v, serializeCssValue as y, serializeTimelineOptions as b } from "@mkbabb/value.js/css";
4
4
  //#region src/animation/compile/emit/serialize-value.ts