@mkbabb/keyframes.js 5.1.0 → 5.2.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 (35) hide show
  1. package/README.md +83 -3
  2. package/dist/backward-color-BtbRcnna.js +108 -0
  3. package/dist/compile-BHCTPerD.js +30 -0
  4. package/dist/{delegation-DWwr4IXr.js → delegation-BQYCrP2p.js} +5 -9
  5. package/dist/{draw-svg-GURj9nin.js → draw-svg-CK9Qrly8.js} +13 -25
  6. package/dist/easing-serialize-D4LZCB6i.js +21 -0
  7. package/dist/engine/index.d.ts +422 -156
  8. package/dist/engine/index.js +16 -17
  9. package/dist/engine-CPK_udUQ.js +1172 -0
  10. package/dist/engine-DlpimZtM.js +3 -0
  11. package/dist/entry-D82NKUhP.js +148 -0
  12. package/dist/format-BdIvdLzG.js +114 -0
  13. package/dist/{group-vJcsHKN9.js → group-HM7N4uOE.js} +153 -123
  14. package/dist/handle-D4xrf_ya.js +21 -0
  15. package/dist/{ingest-S5hUe20K.js → ingest-_g6tfk2e.js} +2 -2
  16. package/dist/keyframes.d.ts +702 -178
  17. package/dist/keyframes.js +295 -74
  18. package/dist/morph-svg-KUrH9KnK.js +79 -0
  19. package/dist/motion-path-wM5tPfrY.js +26 -0
  20. package/dist/presets-DeDJYL4G.js +275 -0
  21. package/dist/{scheduler-CUtVnuoU.js → scheduler-CfGIC3GX.js} +1 -1
  22. package/dist/{scroll-CxpYFO4u.js → scroll-BEyCx0b_.js} +165 -58
  23. package/dist/{sequence-C_DCiOIQ.js → sequence-s0bL7Uul.js} +118 -90
  24. package/dist/{validate-DDeGnvSt.js → validate-xFZ_Ld1k.js} +7 -7
  25. package/dist/view-transition-BPJQxUTC.js +305 -0
  26. package/package.json +113 -83
  27. package/dist/animation-BGyzfzBq.js +0 -947
  28. package/dist/compile-CcSUwM8R.js +0 -276
  29. package/dist/engine-DEVgCTUy.js +0 -156
  30. package/dist/engine-DrBtsKaf.js +0 -4
  31. package/dist/format-C-Gi9r7L.js +0 -123
  32. package/dist/grammar-BLucehC4.js +0 -23
  33. package/dist/morph-svg-BToeumw5.js +0 -89
  34. package/dist/motion-path-pQVbamWT.js +0 -35
  35. package/dist/presets-BG2Fczzq.js +0 -275
@@ -204,8 +204,25 @@ var C = class {
204
204
  respectReducedMotion: !1
205
205
  };
206
206
  //#endregion
207
+ //#region src/animation/physics/spring/managed-play.ts
208
+ function D(e) {
209
+ e._playback.drive(e, () => e._onFrame?.(e.value, e.velocity));
210
+ }
211
+ function O(e, t) {
212
+ e.disposed || (e._onFrame = t, S(e.respectReducedMotion, () => e.snap(), () => {
213
+ if (e.settled) {
214
+ t?.(e.value, e.velocity);
215
+ return;
216
+ }
217
+ D(e);
218
+ }));
219
+ }
220
+ function k(e) {
221
+ e._onFrame = void 0, e._playback.stop();
222
+ }
223
+ //#endregion
207
224
  //#region src/animation/physics/spring/duration.ts
208
- function D(t) {
225
+ function A(t) {
209
226
  let { visualDuration: n, duration: r, bounce: i = 0, ...a } = t, o = n ?? r ?? .5, s = 1 - e(i, -1, 1);
210
227
  return {
211
228
  ...a,
@@ -215,7 +232,7 @@ function D(t) {
215
232
  }
216
233
  //#endregion
217
234
  //#region src/animation/physics/spring/vector.ts
218
- var O = new Float64Array(), k = class {
235
+ var j = new Float64Array(), M = class {
219
236
  vecOrigin = null;
220
237
  vecOriginVel = null;
221
238
  vecTarget = null;
@@ -229,10 +246,10 @@ var O = new Float64Array(), k = class {
229
246
  this.vecOrigin.set(this.vecCurrent), this.vecOriginVel.set(this.vecVelocity), this.vecTarget.set(e), this.vecElapsed = 0;
230
247
  }
231
248
  get values() {
232
- return this.vecCurrent ?? O;
249
+ return this.vecCurrent ?? j;
233
250
  }
234
251
  get velocities() {
235
- return this.vecVelocity ?? O;
252
+ return this.vecVelocity ?? j;
236
253
  }
237
254
  get armed() {
238
255
  return this.vecTarget !== null;
@@ -264,7 +281,7 @@ var O = new Float64Array(), k = class {
264
281
  };
265
282
  //#endregion
266
283
  //#region src/animation/physics/spring/solver.ts
267
- function A(e, t, n, r, i, a) {
284
+ function N(e, t, n, r, i, a) {
268
285
  let o = n, s = r;
269
286
  if (s < 1) {
270
287
  let n = i, r = Math.exp(-s * o * a), c = e, l = (t + s * o * e) / n, u = Math.cos(n * a), d = Math.sin(n * a);
@@ -288,8 +305,11 @@ function A(e, t, n, r, i, a) {
288
305
  }
289
306
  //#endregion
290
307
  //#region src/animation/physics/spring/progress.ts
291
- var j = class e {
308
+ var P = class e {
292
309
  options;
310
+ get respectReducedMotion() {
311
+ return this.options.respectReducedMotion;
312
+ }
293
313
  targetValue;
294
314
  currentValue;
295
315
  currentVelocity;
@@ -313,7 +333,7 @@ var j = class e {
313
333
  }, this.targetValue = this.options.initial, this.currentValue = this.options.initial, this.currentVelocity = this.options.initialVelocity, this.isSettled = this.options.initialVelocity === 0, this.elapsed = 0, this.originValue = this.currentValue, this.originVelocity = this.currentVelocity, this.amplitudeScale = x(this.options.respectReducedMotion), this.omega = 2 * Math.PI / this.options.response, this.zeta = this.options.dampingFraction, this.omegaD = this.zeta < 1 ? this.omega * Math.sqrt(1 - this.zeta * this.zeta) : 0;
314
334
  }
315
335
  static fromDuration(t) {
316
- return new e(D(t ?? {}));
336
+ return new e(A(t ?? {}));
317
337
  }
318
338
  get target() {
319
339
  return this.targetValue;
@@ -332,7 +352,7 @@ var j = class e {
332
352
  }
333
353
  reseatTarget(e) {
334
354
  this.targetValue = e, S(this.options.respectReducedMotion, () => this._snapSettled(), () => {
335
- this.originValue = this.currentValue, this.originVelocity = this.currentVelocity, this.elapsed = 0, this.isSettled = !1, this.amplitudeScale = x(this.options.respectReducedMotion), this._onFrame && this._startLoop();
355
+ this.originValue = this.currentValue, this.originVelocity = this.currentVelocity, this.elapsed = 0, this.isSettled = !1, this.amplitudeScale = x(this.options.respectReducedMotion), this._onFrame && D(this);
336
356
  });
337
357
  }
338
358
  _snapSettled() {
@@ -348,7 +368,7 @@ var j = class e {
348
368
  return this.disposed || this.isSettled ? this.currentValue : (this.elapsed = Math.max(0, e), this.evaluateAt(this.elapsed), this.checkSettled(), this.emit(), this.currentValue);
349
369
  }
350
370
  evaluateAt(e) {
351
- let t = this.amplitudeScale, n = this.originValue + t * (this.targetValue - this.originValue), r = this.originValue - n, i = this.originVelocity, { x: a, v: o } = A(r, i, this.omega, this.zeta, this.omegaD, e);
371
+ let t = this.amplitudeScale, n = this.originValue + t * (this.targetValue - this.originValue), r = this.originValue - n, i = this.originVelocity, { x: a, v: o } = N(r, i, this.omega, this.zeta, this.omegaD, e);
352
372
  this.currentValue = n + a, this.currentVelocity = o;
353
373
  }
354
374
  checkSettled() {
@@ -363,13 +383,13 @@ var j = class e {
363
383
  this.targetValue = n, this.currentValue = n, this.currentVelocity = r, this.originValue = n, this.originVelocity = r, this.elapsed = 0, this.amplitudeScale = x(this.options.respectReducedMotion), this.isSettled = r === 0, this.emit(), this._playback.stop();
364
384
  }
365
385
  setTargets(e) {
366
- (this.vectorLanes ??= new k()).setTargets(e);
386
+ (this.vectorLanes ??= new M()).setTargets(e);
367
387
  }
368
388
  get values() {
369
- return this.vectorLanes?.values ?? O;
389
+ return this.vectorLanes?.values ?? j;
370
390
  }
371
391
  get velocities() {
372
- return this.vectorLanes?.velocities ?? O;
392
+ return this.vectorLanes?.velocities ?? j;
373
393
  }
374
394
  tickVector(e) {
375
395
  return this.disposed || this.vectorLanes === null || e <= 0 ? this.values : this.vectorLanes.tick(e, this.omega, this.zeta, this.omegaD);
@@ -386,25 +406,16 @@ var j = class e {
386
406
  this.disposed = !0, this._playback.stop(), this.subscribers.clear();
387
407
  }
388
408
  play(e) {
389
- this.disposed || (this._onFrame = e, S(this.options.respectReducedMotion, () => this._snapSettled(), () => {
390
- if (this.isSettled) {
391
- e?.(this.currentValue, this.currentVelocity);
392
- return;
393
- }
394
- this._startLoop();
395
- }));
409
+ O(this, e);
396
410
  }
397
411
  stop() {
398
- this._onFrame = void 0, this._playback.stop();
399
- }
400
- _startLoop() {
401
- this._playback.drive(this, () => this._onFrame?.(this.currentValue, this.currentVelocity));
412
+ k(this);
402
413
  }
403
414
  };
404
415
  //#endregion
405
416
  //#region src/animation/physics/spring/sample.ts
406
- function M(e) {
407
- let t = new j({
417
+ function F(e) {
418
+ let t = new P({
408
419
  response: e.response,
409
420
  dampingFraction: e.dampingFraction,
410
421
  initial: 0,
@@ -418,8 +429,8 @@ function M(e) {
418
429
  }
419
430
  //#endregion
420
431
  //#region src/animation/physics/spring/linear-stops.ts
421
- function N(e) {
422
- let t = e.sampleCount ?? 24, n = e.settleThreshold ?? .001, r = e.maxDuration ?? e.response * 4, i = M({
432
+ function I(e) {
433
+ let t = e.sampleCount ?? 24, n = e.settleThreshold ?? .001, r = e.maxDuration ?? e.response * 4, i = F({
423
434
  response: e.response,
424
435
  dampingFraction: e.dampingFraction,
425
436
  sampleCount: t,
@@ -434,8 +445,8 @@ function N(e) {
434
445
  }
435
446
  //#endregion
436
447
  //#region src/animation/physics/spring/timing-function.ts
437
- function P(e) {
438
- let t = e.sampleCount ?? 64, n = e.settleThreshold ?? .001, r = e.maxDuration ?? e.response * 4, i = M({
448
+ function L(e) {
449
+ let t = e.sampleCount ?? 64, n = e.settleThreshold ?? .001, r = e.maxDuration ?? e.response * 4, i = F({
439
450
  response: e.response,
440
451
  dampingFraction: e.dampingFraction,
441
452
  sampleCount: t,
@@ -456,12 +467,12 @@ function P(e) {
456
467
  };
457
468
  return e.settleThreshold !== void 0 && (s.settleThreshold = e.settleThreshold), e.maxDuration !== void 0 && (s.maxDuration = e.maxDuration), {
458
469
  fn: o,
459
- css: N(s)
470
+ css: I(s)
460
471
  };
461
472
  }
462
473
  //#endregion
463
474
  //#region src/animation/orchestration/timeline/native.ts
464
- function F(e) {
475
+ function R(e) {
465
476
  if (typeof window > "u") return null;
466
477
  if (e.kind === "scroll") {
467
478
  if (globalThis.ScrollTimeline === void 0) return null;
@@ -474,9 +485,9 @@ function F(e) {
474
485
  }
475
486
  //#endregion
476
487
  //#region src/animation/physics/decay.ts
477
- var I = 5;
478
- function L(e) {
479
- let t = e.initial ?? 0, n = e.velocity, r = e.friction ?? I;
488
+ var z = 5;
489
+ function B(e) {
490
+ let t = e.initial ?? 0, n = e.velocity, r = e.friction ?? z;
480
491
  if (r <= 0) throw Error("decay() requires a friction coefficient > 0.");
481
492
  let i = t + n / r;
482
493
  return (e) => {
@@ -491,23 +502,23 @@ function L(e) {
491
502
  };
492
503
  };
493
504
  }
494
- function R(e) {
495
- let t = e.friction ?? I;
505
+ function V(e) {
506
+ let t = e.friction ?? z;
496
507
  if (t <= 0) throw Error("decayRest() requires a friction coefficient > 0.");
497
508
  return (e.initial ?? 0) + e.velocity / t;
498
509
  }
499
510
  //#endregion
500
511
  //#region src/animation/orchestration/sequence/transport.ts
501
- function z(t, n) {
512
+ function H(t, n) {
502
513
  for (let { animation: r, at: i } of t) {
503
514
  let t = e(n - i, 0, r.options.duration);
504
515
  r.interpFrames(t, !0);
505
516
  }
506
517
  }
507
- function B(e, t, n, r) {
518
+ function U(e, t, n, r) {
508
519
  e.fire(t, n, r);
509
520
  }
510
- function V(e, t, n) {
521
+ function W(e, t, n) {
511
522
  if (e === void 0) return t;
512
523
  if (typeof e == "number") return e;
513
524
  let r = /^([+-])=(\d*\.?\d+)$/.exec(e);
@@ -516,50 +527,86 @@ function V(e, t, n) {
516
527
  if (i === void 0) throw Error(`Sequence: unknown position "${e}". Register it with .label("${e}", at) first, or pass a number / "+=n" / "-=n".`);
517
528
  return i;
518
529
  }
519
- function H(t, n, r, i) {
530
+ function G(t, n, r, i) {
520
531
  if (n <= 0) return 0;
521
532
  let a = e(t, 0, n * r), o = Math.floor(a / n), s = a - o * n;
522
533
  return s === 0 && o > 0 && (--o, s = n), i && o % 2 == 1 ? n - s : s;
523
534
  }
524
- function U(e, t, n) {
535
+ function K(e, t, n) {
525
536
  return n && (t - 1) % 2 == 1 ? 0 : e;
526
537
  }
527
- function W(e, t, n) {
538
+ function q(e, t, n) {
528
539
  return e === 1 && t === 1 && !n;
529
540
  }
530
- function G(e, t, n) {
541
+ function J(e, t, n) {
531
542
  return n === 0 ? e : e - t / n;
532
543
  }
533
- function K() {
534
- return typeof matchMedia == "function" && matchMedia("(prefers-reduced-motion: reduce)").matches;
535
- }
536
- async function q(e, t) {
537
- e._playOrigin === void 0 && (e._playOrigin = G(t, e._time, e._rate)), e._lastClock = t;
538
- let n = (t - e._playOrigin) * e._rate, r = e.duration * e._repeatCount, i = e._rate >= 0 ? n >= r : n <= 0, a = i ? e._rate >= 0 ? U(e.duration, e._repeatCount, e._yoyoOn) : 0 : H(n, e.duration, e._repeatCount, e._yoyoOn);
539
- if (e._time = a, W(e._rate, e._repeatCount, e._yoyoOn)) for (let { animation: t, at: n } of e.entries) a >= n && a - n < t.options.duration && await t.advanceTo(a);
540
- if (B(e.events, e.entries, e.labels, a), z(e.entries, a), i) {
541
- J(e);
544
+ async function Y(e, t) {
545
+ e._playOrigin === void 0 && (e._playOrigin = J(t, e._time, e._rate)), e._lastClock = t;
546
+ let n = (t - e._playOrigin) * e._rate, r = e.duration * e._repeatCount, i = e._rate >= 0 ? n >= r : n <= 0, a = i ? e._rate >= 0 ? K(e.duration, e._repeatCount, e._yoyoOn) : 0 : G(n, e.duration, e._repeatCount, e._yoyoOn);
547
+ if (e._time = a, q(e._rate, e._repeatCount, e._yoyoOn)) for (let { animation: t, at: n } of e.entries) a >= n && a - n < t.options.duration && await t.advanceTo(a);
548
+ if (U(e.events, e.entries, e.labels, a), H(e.entries, a), i) {
549
+ X(e);
542
550
  let t = e._resolvePlay;
543
551
  return e._resolvePlay = null, t?.(), !1;
544
552
  }
545
553
  return !0;
546
554
  }
547
- function J(e) {
555
+ function X(e) {
548
556
  for (let { animation: t } of e.entries) t.managed = !1, t.started = !1, t.startTime = void 0;
549
557
  e._playOrigin = void 0, e._lastClock = void 0, e._paused = !1;
550
558
  }
551
- function Y(e, t) {
559
+ function Z(e, t) {
552
560
  if (!t) return;
553
561
  let n = e._lastClock;
554
562
  if (n === void 0) {
555
563
  e._playOrigin = void 0;
556
564
  return;
557
565
  }
558
- e._playOrigin = G(n, e._time, e._rate);
566
+ e._playOrigin = J(n, e._time, e._rate);
567
+ }
568
+ //#endregion
569
+ //#region src/animation/orchestration/sequence/lifecycle.ts
570
+ function Q(e) {
571
+ if (e._playingPromise) return e._playingPromise;
572
+ if (e.respectReducedMotion && b()) return e.seek(e.duration), Promise.resolve();
573
+ for (let { animation: t, at: n } of e.entries) t.startTime = n, t.started = !0, t.managed = !0;
574
+ e._time = 0, e._paused = !1, e._playOrigin = void 0, e._lastClock = void 0;
575
+ let t = new Promise((t) => {
576
+ e._resolvePlay = t, e.playback.loop(e._boundFrame);
577
+ });
578
+ return e._playingPromise = t, t.finally(() => {
579
+ e._playingPromise = null;
580
+ }), t;
581
+ }
582
+ function $(e) {
583
+ e.playback.stop(), X(e);
584
+ let t = e._resolvePlay;
585
+ e._resolvePlay = null, t?.();
586
+ }
587
+ function ee(e) {
588
+ !e._playingPromise || e._paused || (e._paused = !0, e.playback.stop(), e._playOrigin = void 0);
589
+ }
590
+ function te(e) {
591
+ !e._playingPromise || !e._paused || (e._paused = !1, e._playOrigin = void 0, e._lastClock = void 0, e.playback.loop(e._boundFrame));
592
+ }
593
+ function ne(e, t) {
594
+ if (!Number.isFinite(t)) throw Error(`Sequence.timeScale(n): n must be a finite number, got ${t}.`);
595
+ e._rate = t, Z(e, e._playingPromise != null);
596
+ }
597
+ function re(e) {
598
+ e._rate = -e._rate, Z(e, e._playingPromise != null);
599
+ }
600
+ function ie(e, t) {
601
+ if (t !== Infinity && (!Number.isInteger(t) || t < 1)) throw Error(`Sequence.repeat(count): count must be a positive integer or Infinity, got ${t}.`);
602
+ e._repeatCount = t;
603
+ }
604
+ function ae(e, t) {
605
+ e._yoyoOn = t;
559
606
  }
560
607
  //#endregion
561
608
  //#region src/animation/orchestration/sequence/events.ts
562
- var X = class {
609
+ var oe = class {
563
610
  subscribers = new Map([
564
611
  ["segment:enter", /* @__PURE__ */ new Set()],
565
612
  ["segment:leave", /* @__PURE__ */ new Set()],
@@ -594,10 +641,10 @@ var X = class {
594
641
  }
595
642
  this._prevPhase = n;
596
643
  }
597
- }, Z = class {
644
+ }, se = class {
598
645
  entries = [];
599
646
  labels = /* @__PURE__ */ new Map();
600
- events = new X();
647
+ events = new oe();
601
648
  cursor = 0;
602
649
  _time = 0;
603
650
  respectReducedMotion;
@@ -635,20 +682,20 @@ var X = class {
635
682
  return this._rate;
636
683
  }
637
684
  label(e, t) {
638
- return this.labels.set(e, V(t, this.cursor, this.labels)), this;
685
+ return this.labels.set(e, W(t, this.cursor, this.labels)), this;
639
686
  }
640
687
  on(e, t) {
641
688
  return this.events.subscribe(e, t);
642
689
  }
643
690
  add(e, t) {
644
- let n = V(t, this.cursor, this.labels);
691
+ let n = W(t, this.cursor, this.labels);
645
692
  return this.entries.push({
646
693
  animation: e,
647
694
  at: n
648
695
  }), this.entries.sort((e, t) => e.at - t.at), this.cursor = n + e.options.duration, this;
649
696
  }
650
697
  seek(e) {
651
- return this._time = e, B(this.events, this.entries, this.labels, e), z(this.entries, e), this;
698
+ return this._time = e, U(this.events, this.entries, this.labels, e), H(this.entries, e), this;
652
699
  }
653
700
  setTargets(...e) {
654
701
  for (let { animation: t } of this.entries) t.setTargets(...e);
@@ -658,51 +705,32 @@ var X = class {
658
705
  return this._playingPromise ?? Promise.resolve();
659
706
  }
660
707
  play() {
661
- if (this._playingPromise) return this._playingPromise;
662
- if (this.respectReducedMotion && K()) return this.seek(this.duration), Promise.resolve();
663
- for (let { animation: e, at: t } of this.entries) e.startTime = t, e.started = !0, e.managed = !0;
664
- this._time = 0, this._paused = !1, this._playOrigin = void 0, this._lastClock = void 0;
665
- let e = new Promise((e) => {
666
- this._resolvePlay = e, this.playback.loop(this._boundFrame);
667
- });
668
- return this._playingPromise = e, e.finally(() => {
669
- this._playingPromise = null;
670
- }), e;
708
+ return Q(this);
671
709
  }
672
710
  async _frame(e) {
673
- return q(this, e);
674
- }
675
- _reanchor() {
676
- Y(this, this._playingPromise != null);
677
- }
678
- _settle() {
679
- J(this);
711
+ return Y(this, e);
680
712
  }
681
713
  stop() {
682
- this.playback.stop(), this._settle();
683
- let e = this._resolvePlay;
684
- return this._resolvePlay = null, e?.(), this;
714
+ return $(this), this;
685
715
  }
686
716
  pause() {
687
- return !this._playingPromise || this._paused ? this : (this._paused = !0, this.playback.stop(), this._playOrigin = void 0, this);
717
+ return ee(this), this;
688
718
  }
689
719
  resume() {
690
- return !this._playingPromise || !this._paused ? this : (this._paused = !1, this._playOrigin = void 0, this._lastClock = void 0, this.playback.loop(this._boundFrame), this);
720
+ return te(this), this;
691
721
  }
692
722
  timeScale(e) {
693
- if (!Number.isFinite(e)) throw Error(`Sequence.timeScale(n): n must be a finite number, got ${e}.`);
694
- return this._rate = e, this._reanchor(), this;
723
+ return ne(this, e), this;
695
724
  }
696
725
  reverse() {
697
- return this._rate = -this._rate, this._reanchor(), this;
726
+ return re(this), this;
698
727
  }
699
728
  repeat(e) {
700
- if (e !== Infinity && (!Number.isInteger(e) || e < 1)) throw Error(`Sequence.repeat(count): count must be a positive integer or Infinity, got ${e}.`);
701
- return this._repeatCount = e, this;
729
+ return ie(this, e), this;
702
730
  }
703
731
  yoyo(e = !0) {
704
- return this._yoyoOn = e, this;
732
+ return ae(this, e), this;
705
733
  }
706
734
  };
707
735
  //#endregion
708
- export { d as _, P as a, a as b, T as c, S as d, e as f, u as g, f as h, F as i, C as l, n as m, L as n, N as o, t as p, R as r, j as s, Z as t, x as u, s as v, o as x, i as y };
736
+ export { d as _, L as a, a as b, T as c, S as d, e as f, u as g, f as h, R as i, C as l, n as m, B as n, I as o, t as p, V as r, P as s, se as t, x as u, s as v, o as x, i as y };
@@ -1,15 +1,15 @@
1
- import { n as e } from "./presets-BG2Fczzq.js";
2
- import { r as t } from "./delegation-DWwr4IXr.js";
3
- import { t as n } from "./engine-DEVgCTUy.js";
4
- import { n as r } from "./compile-CcSUwM8R.js";
1
+ import { n as e } from "./presets-DeDJYL4G.js";
2
+ import { t } from "./engine-CPK_udUQ.js";
3
+ import { r as n } from "./delegation-BQYCrP2p.js";
4
+ import { a as r } from "./view-transition-BPJQxUTC.js";
5
5
  import { extractKeyframes as i, parseCSSStylesheet as a } from "@mkbabb/value.js";
6
6
  //#region src/animation/validate.ts
7
7
  var o = /* @__PURE__ */ e({
8
8
  explain: () => u,
9
9
  validate: () => c
10
- }), s = (e) => new n().fromString(e);
11
- async function c(e, n = {}) {
12
- let i = s(e), a = [...i.diagnostics], o = a.some((e) => e.code === "PARSE_ERROR" || e.code === "EMPTY_PARSE"), c = e.trim().length > 0 && !o, l = await r([i], n.compile ?? {}), u = t(i);
10
+ }), s = (e) => new t().fromString(e);
11
+ async function c(e, t = {}) {
12
+ let i = s(e), a = [...i.diagnostics], o = a.some((e) => e.code === "PARSE_ERROR" || e.code === "EMPTY_PARSE"), c = e.trim().length > 0 && !o, l = await r([i], t.compile ?? {}), u = n(i);
13
13
  return {
14
14
  parseable: c,
15
15
  eligible: l.eligible,