@mkbabb/keyframes.js 4.0.0 → 4.1.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.
- package/dist/{animate-DjKYCuyH.js → animate-12YQKwyY.js} +2 -2
- package/dist/{animations-CK1FLX_G.js → animations-CcAWdZlW.js} +2 -2
- package/dist/draw-svg-DwAa5cbU.js +41 -0
- package/dist/{engine-BZeJ58xD.js → engine-Cj0T6OIH.js} +29 -9
- package/dist/keyframes.d.ts +153 -5
- package/dist/keyframes.js +14 -8
- package/dist/{motion-path-723lMAlR.js → motion-path-683GcEZK.js} +1 -1
- package/dist/{springTimingFunction-BgkJPP-_.js → springTimingFunction-cMJnhbug.js} +1 -1
- package/dist/{timeline-5rnU0j6r.js → timeline-BHz0o8dZ.js} +1 -1
- package/package.json +146 -131
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { CSSKeyframesAnimation as e } from "./engine-
|
|
2
|
-
import { fromMotionPath as t } from "./motion-path-
|
|
1
|
+
import { CSSKeyframesAnimation as e } from "./engine-Cj0T6OIH.js";
|
|
2
|
+
import { fromMotionPath as t } from "./motion-path-683GcEZK.js";
|
|
3
3
|
//#region src/animation/animate.ts
|
|
4
4
|
var n = (e) => typeof e == "object" && !!e && !Array.isArray(e) && !(e instanceof Map) && typeof e.path == "string", r = (e) => e instanceof Map || typeof e == "object" && !!e && !Array.isArray(e);
|
|
5
5
|
function i(i, a, o) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { t as e } from "./springTimingFunction-
|
|
2
|
-
import { CSSKeyframesAnimation as t } from "./engine-
|
|
1
|
+
import { t as e } from "./springTimingFunction-cMJnhbug.js";
|
|
2
|
+
import { CSSKeyframesAnimation as t } from "./engine-Cj0T6OIH.js";
|
|
3
3
|
import { CSSCubicBezier as n, steppedEase as r } from "@mkbabb/value.js";
|
|
4
4
|
//#region src/animation/animations.ts
|
|
5
5
|
var ee = "\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n", i = (e) => new t({
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { CSSKeyframesAnimation as e } from "./engine-Cj0T6OIH.js";
|
|
2
|
+
//#region src/animation/draw-svg.ts
|
|
3
|
+
var t = (e) => {
|
|
4
|
+
if (typeof e == "number") {
|
|
5
|
+
if (!Number.isFinite(e) || e < 0 || e > 1) throw Error(`fromDrawSVG(): a numeric draw position is a 0..1 fraction, got ${JSON.stringify(e)} — pass a fraction in [0, 1] or a percent string ("0%".."100%").`);
|
|
6
|
+
return e;
|
|
7
|
+
}
|
|
8
|
+
if (!/^\s*\d*\.?\d+\s*%\s*$/.test(e)) throw Error(`fromDrawSVG(): invalid draw position ${JSON.stringify(e)} — pass a percent string ("0%".."100%") or a 0..1 number.`);
|
|
9
|
+
return parseFloat(e) / 100;
|
|
10
|
+
};
|
|
11
|
+
function n(n, r = {}) {
|
|
12
|
+
let { from: i = "0%", to: a = "100%", autoPlay: o = !0, ...s } = r;
|
|
13
|
+
if (n == null || typeof n.getTotalLength != "function") throw Error("fromDrawSVG(): `target` must be an SVG geometry element exposing getTotalLength() (a <path>/<line>/<circle>/<rect>/<polygon>/…).");
|
|
14
|
+
let c = t(i), l = t(a), u = n.getTotalLength();
|
|
15
|
+
n.style.strokeDasharray = `${u}`;
|
|
16
|
+
let d = {
|
|
17
|
+
"0%": { "stroke-dashoffset": u * (1 - c) },
|
|
18
|
+
"100%": { "stroke-dashoffset": u * (1 - l) }
|
|
19
|
+
}, f = new e(s).fromKeyframes(d);
|
|
20
|
+
return f.setTargets(n), o && f.play(), f;
|
|
21
|
+
}
|
|
22
|
+
var r = class {
|
|
23
|
+
animation;
|
|
24
|
+
constructor(e, t = {}) {
|
|
25
|
+
this.animation = n(e, t);
|
|
26
|
+
}
|
|
27
|
+
play() {
|
|
28
|
+
return this.animation.play();
|
|
29
|
+
}
|
|
30
|
+
pause() {
|
|
31
|
+
return this.animation.pause(), this;
|
|
32
|
+
}
|
|
33
|
+
stop() {
|
|
34
|
+
return this.animation.stop(), this;
|
|
35
|
+
}
|
|
36
|
+
get finished() {
|
|
37
|
+
return this.animation.finished;
|
|
38
|
+
}
|
|
39
|
+
};
|
|
40
|
+
//#endregion
|
|
41
|
+
export { r as DrawSVG, n as fromDrawSVG };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { _ as e, c as t, d as n, f as r, h as i, o as a, s as o } from "./timeline-
|
|
1
|
+
import { _ as e, c as t, d as n, f as r, h as i, o as a, s as o } from "./timeline-BHz0o8dZ.js";
|
|
2
2
|
import { COLOR_SPACE_RANGES as s, COMPUTED_UNITS as c, CSSCubicBezier as l, CSSFunction as u, CSSValues as d, FunctionValue as f, ValueArray as p, ValueUnit as m, clamp as h, convertToMs as g, cssLinear as _, easeInOutCubic as v, extractAnimationOptions as y, extractKeyframes as ee, extractProperties as te, flattenObject as b, isObject as ne, jumpTerms as re, lerp as ie, lerpValue as ae, normalizeValueUnits as oe, parseCSSStylesheet as x, parseCSSTime as S, parseCSSValueUnit as se, prepareInterpVar as ce, scale as le, seekPreviousValue as C, sleep as w, steppedEase as T, timingFunctions as E, tryParse as ue, unflattenObject as de, unflattenObjectToString as D } from "@mkbabb/value.js";
|
|
3
3
|
import { any as fe } from "@mkbabb/parse-that";
|
|
4
4
|
//#region src/animation/adapter.ts
|
|
@@ -172,16 +172,21 @@ var z = (e) => e instanceof m && typeof e.value == "number", B = class e {
|
|
|
172
172
|
let n = a[e];
|
|
173
173
|
if (n === void 0) continue;
|
|
174
174
|
let r = t[e];
|
|
175
|
-
|
|
175
|
+
if (Array.isArray(r) && Array.isArray(n)) {
|
|
176
|
+
let e = Math.min(r.length, n.length);
|
|
177
|
+
for (let t = 0; t < e; t++) z(r[t]) && z(n[t]) ? r[t].value += n[t].value : r[t] = n[t];
|
|
178
|
+
} else t[e] = n;
|
|
176
179
|
}
|
|
177
180
|
break;
|
|
178
181
|
case "weighted":
|
|
179
182
|
for (let e in a) {
|
|
180
183
|
if (o && !o.has(e)) continue;
|
|
181
184
|
let n = a[e];
|
|
182
|
-
if (n
|
|
183
|
-
|
|
184
|
-
|
|
185
|
+
if (n === void 0) continue;
|
|
186
|
+
let i = t[e];
|
|
187
|
+
if (Array.isArray(i) && Array.isArray(n)) {
|
|
188
|
+
let e = Math.min(i.length, n.length);
|
|
189
|
+
for (let t = 0; t < e; t++) z(i[t]) && z(n[t]) ? i[t].value = ie(i[t].value, n[t].value, r.weight) : i[t] = n[t];
|
|
185
190
|
} else t[e] = n;
|
|
186
191
|
}
|
|
187
192
|
break;
|
|
@@ -234,6 +239,9 @@ var z = (e) => e instanceof m && typeof e.value == "number", B = class e {
|
|
|
234
239
|
let e = this.resolvePromise;
|
|
235
240
|
this.resolvePromise = null, e?.();
|
|
236
241
|
}
|
|
242
|
+
get finished() {
|
|
243
|
+
return this._playingPromise ?? Promise.resolve();
|
|
244
|
+
}
|
|
237
245
|
async play() {
|
|
238
246
|
if (this._playingPromise) return this._playingPromise;
|
|
239
247
|
let e = o(this.respectReducedMotion, () => this._playReducedMotion(), () => new Promise((e) => {
|
|
@@ -435,13 +443,16 @@ var J = (e, t) => {
|
|
|
435
443
|
css: a
|
|
436
444
|
} : { fn: n };
|
|
437
445
|
}, xe = 1e6, Se = class {
|
|
438
|
-
|
|
446
|
+
_options;
|
|
439
447
|
templateFrames = [];
|
|
440
448
|
parsedVars = [];
|
|
441
449
|
frames = [];
|
|
442
450
|
frameId = 0;
|
|
443
451
|
constructor(e) {
|
|
444
|
-
this.
|
|
452
|
+
this._options = e;
|
|
453
|
+
}
|
|
454
|
+
get options() {
|
|
455
|
+
return this._options;
|
|
445
456
|
}
|
|
446
457
|
convertFrameStart(e) {
|
|
447
458
|
if (e.start.unit === "s" || e.start.unit === "ms" || !e.start.unit) {
|
|
@@ -686,7 +697,10 @@ var Z = (e) => {
|
|
|
686
697
|
superKey;
|
|
687
698
|
targets;
|
|
688
699
|
options;
|
|
689
|
-
|
|
700
|
+
_compiler;
|
|
701
|
+
get compiler() {
|
|
702
|
+
return this._compiler;
|
|
703
|
+
}
|
|
690
704
|
playback = new a();
|
|
691
705
|
_waAnimations = [];
|
|
692
706
|
startTime = void 0;
|
|
@@ -720,7 +734,7 @@ var Z = (e) => {
|
|
|
720
734
|
}));
|
|
721
735
|
}
|
|
722
736
|
constructor(e, t, n, r) {
|
|
723
|
-
this.options = {}, this.
|
|
737
|
+
this.options = {}, this._compiler = new Se(this.options), this._ctorOptions = e ?? {}, this.setOptions({
|
|
724
738
|
...P,
|
|
725
739
|
...this._ctorOptions
|
|
726
740
|
}), this.targets = t == null ? [] : Array.isArray(t) ? t : [t], this.name = n, this.superKey = r;
|
|
@@ -746,6 +760,9 @@ var Z = (e) => {
|
|
|
746
760
|
parse() {
|
|
747
761
|
return this.compiler.parse(this.targets), this.computeStableKeys(), this;
|
|
748
762
|
}
|
|
763
|
+
adoptCompiled(e) {
|
|
764
|
+
return this._compiler = e.compiler, this.options = this.compiler.options, this.unflatten = e.unflatten, this.computeStableKeys(), this;
|
|
765
|
+
}
|
|
749
766
|
computeStableKeys() {
|
|
750
767
|
let e = /* @__PURE__ */ new Set();
|
|
751
768
|
for (let t of this.frames) for (let n in t.flatVars) e.add(n);
|
|
@@ -913,6 +930,9 @@ var Z = (e) => {
|
|
|
913
930
|
async _snapToReducedMotion() {
|
|
914
931
|
this._cancelWAAPI(), this.fillForwards(), this.iteration = 0, this.done = !0, this.dispatchAnimationEvent("animationend"), this.settle(), this._resolvePlay();
|
|
915
932
|
}
|
|
933
|
+
get finished() {
|
|
934
|
+
return this._playingPromise ?? Promise.resolve();
|
|
935
|
+
}
|
|
916
936
|
async play() {
|
|
917
937
|
if (this.managed) throw Error("Animation.play() called on a managed animation — the AnimationGroup owns the rAF loop. Call group.play() instead.");
|
|
918
938
|
if (this._playingPromise) return this._playingPromise;
|
package/dist/keyframes.d.ts
CHANGED
|
@@ -74,8 +74,16 @@ declare class Animation_2<V extends Vars = any> {
|
|
|
74
74
|
* accessors (`templateFrames`/`parsedVars`/`frames`/`frameId`) to it.
|
|
75
75
|
* Assigned in the constructor once `options` exists (the compiler holds a
|
|
76
76
|
* live reference to that options object).
|
|
77
|
+
*
|
|
78
|
+
* READ-ONLY surface (G.W19): the backing `_compiler` is written ONLY by the
|
|
79
|
+
* constructor and {@link adoptCompiled}. An external `animation.compiler = …`
|
|
80
|
+
* write was the one cross-boundary reach-in vector that could desync the
|
|
81
|
+
* live-options reference (`this.options !== this.compiler.options`); making
|
|
82
|
+
* `compiler` a get-only accessor makes that reach-in a COMPILE error, not a
|
|
83
|
+
* convention. Adopt a compiled state via `adoptCompiled(source)`.
|
|
77
84
|
*/
|
|
78
|
-
|
|
85
|
+
private _compiler;
|
|
86
|
+
get compiler(): FrameCompiler<V>;
|
|
79
87
|
/**
|
|
80
88
|
* THE rAF owner for this animation — the standalone rAF play loop and
|
|
81
89
|
* the WAAPI shadow tick both ride it, so `stop()` halts either
|
|
@@ -168,6 +176,29 @@ declare class Animation_2<V extends Vars = any> {
|
|
|
168
176
|
addFrame<K extends V>(start: number | string | ValueUnit<number>, vars: Partial<K>, transform?: TransformFunction<K>, timingFunction?: InputAnimationOptions["timingFunction"]): Animation_2<K>;
|
|
169
177
|
/** Compile the template frames into the sampled `frames[]`. Chainable. */
|
|
170
178
|
parse(): this;
|
|
179
|
+
/**
|
|
180
|
+
* Adopt another animation's ALREADY-COMPILED state as ONE atomic motion
|
|
181
|
+
* (G.W19) — the first-class verb for the "single-compile, then transplant"
|
|
182
|
+
* pattern (E.W8 S0): a throwaway animation is built + compiled ONCE off the
|
|
183
|
+
* new keyframes, and the live animation adopts that compiled state without a
|
|
184
|
+
* second compile.
|
|
185
|
+
*
|
|
186
|
+
* The transplant moves the `{ compiler, options, unflatten }` triad together
|
|
187
|
+
* and re-binds the live-options reference BY CONSTRUCTION — `this.options` is
|
|
188
|
+
* read OFF the adopted compiler, so `this.options === this.compiler.options`
|
|
189
|
+
* holds without relying on the caller's assignment order. This is the
|
|
190
|
+
* invariant the demo formerly held by a comment + three ordered field writes;
|
|
191
|
+
* here it is the method's contract, enforced by `proof:adopt-compiled`. A
|
|
192
|
+
* `compiler` adopted WITHOUT re-binding `options` would leave the setters
|
|
193
|
+
* mutating one object while the compiler reads another — the exact desync
|
|
194
|
+
* the `6e29236` live-options lock guards against.
|
|
195
|
+
*
|
|
196
|
+
* Recomputes `_stableKeys` so `flatKeys` (the buffer-sizing contract)
|
|
197
|
+
* reflects the adopted compiled frames, not the pre-adopt key-set. Chainable.
|
|
198
|
+
*
|
|
199
|
+
* @param source an animation whose `compiler` is already compiled.
|
|
200
|
+
*/
|
|
201
|
+
adoptCompiled(source: Animation_2<V>): this;
|
|
171
202
|
/**
|
|
172
203
|
* Recompute `_stableKeys` — the union of every compiled frame's `flatVars`
|
|
173
204
|
* keys — after a (re)compile. The maximal key-set the `clearBuffer`
|
|
@@ -309,6 +340,17 @@ declare class Animation_2<V extends Vars = any> {
|
|
|
309
340
|
* WAAPI animation cancels the compositor handles before settling.
|
|
310
341
|
*/
|
|
311
342
|
private _snapToReducedMotion;
|
|
343
|
+
/**
|
|
344
|
+
* The completion front-door (G.W13) — `await anim.finished` resolves once
|
|
345
|
+
* the in-flight play settles. It exposes the ONE held `_playingPromise`
|
|
346
|
+
* `play()` already constructs (the re-entrant guard returns it; the
|
|
347
|
+
* `finally`-clear nulls it on settle) — NOT a second completion lifecycle.
|
|
348
|
+
* Two reads mid-play return the SAME promise. A settled (or never-played)
|
|
349
|
+
* animation reads `null` and resolves immediately: "not running" = "nothing
|
|
350
|
+
* to await" — the honest semantics for a getter that reports current
|
|
351
|
+
* settledness, not a pre-armed future run.
|
|
352
|
+
*/
|
|
353
|
+
get finished(): Promise<void>;
|
|
312
354
|
play(): Promise<void>;
|
|
313
355
|
/**
|
|
314
356
|
* Pause playback — idempotent. Pausing an already-paused (or
|
|
@@ -368,6 +410,9 @@ export declare interface AnimationEngine {
|
|
|
368
410
|
/** CSS-native MotionPath (F.W12) — offset-distance over an author offset-path. */
|
|
369
411
|
MotionPath: typeof MotionPath;
|
|
370
412
|
fromMotionPath: typeof fromMotionPath;
|
|
413
|
+
/** CSS-native DrawSVG (G.W13) — stroke-dashoffset sweep over the path length. */
|
|
414
|
+
DrawSVG: typeof DrawSVG;
|
|
415
|
+
fromDrawSVG: typeof fromDrawSVG;
|
|
371
416
|
/**
|
|
372
417
|
* The preset library (`fadeIn`, `bounce`, `shake`, …) — heavy (each returns
|
|
373
418
|
* a `CSSKeyframesAnimation`), so it rides the dynamic boundary as a namespace
|
|
@@ -541,6 +586,14 @@ export declare class AnimationGroup<V extends Vars> {
|
|
|
541
586
|
* query, snaps every child to its final frame in a single composite —
|
|
542
587
|
* no rAF draw loop — then settles exactly as a completed play would.
|
|
543
588
|
*/
|
|
589
|
+
/**
|
|
590
|
+
* The completion front-door (G.W13) — `await group.finished` resolves once
|
|
591
|
+
* the in-flight composite play settles. Exposes the ONE held
|
|
592
|
+
* `_playingPromise` `play()` constructs (the re-entrant guard returns it;
|
|
593
|
+
* the `finally`-clear nulls it on settle) — NOT a second completion
|
|
594
|
+
* lifecycle. A settled (or never-played) group resolves immediately.
|
|
595
|
+
*/
|
|
596
|
+
get finished(): Promise<void>;
|
|
544
597
|
play(): Promise<void>;
|
|
545
598
|
/**
|
|
546
599
|
* `prefers-reduced-motion` snap for the group: rest = final, paint it,
|
|
@@ -1030,6 +1083,45 @@ export declare interface DragOptions {
|
|
|
1030
1083
|
/** A drag emission: the spring's current position + velocity. */
|
|
1031
1084
|
export declare type DragSubscriber = (value: number, velocity: number) => void;
|
|
1032
1085
|
|
|
1086
|
+
/**
|
|
1087
|
+
* `DrawSVG` — the class form of {@link fromDrawSVG}, for callers who prefer a
|
|
1088
|
+
* named primitive alongside `CSSKeyframesAnimation` / `MotionPath`. Construction
|
|
1089
|
+
* is the factory: `new DrawSVG(target).animation` is the control handle. The
|
|
1090
|
+
* factory is the canonical entry; this is a thin ergonomic wrapper.
|
|
1091
|
+
*/
|
|
1092
|
+
declare class DrawSVG<V extends Record<string, any> = any> {
|
|
1093
|
+
/** The underlying stroke-dashoffset animation — the control handle. */
|
|
1094
|
+
readonly animation: CSSKeyframesAnimation<V>;
|
|
1095
|
+
constructor(target: SVGDrawTarget, options?: DrawSVGOptions);
|
|
1096
|
+
/** Start (or re-enter) the line-drawing play loop. */
|
|
1097
|
+
play(): Promise<void>;
|
|
1098
|
+
/** Pause the play loop, retaining the playhead. */
|
|
1099
|
+
pause(): this;
|
|
1100
|
+
/** Halt and rewind the play loop. */
|
|
1101
|
+
stop(): this;
|
|
1102
|
+
/** Resolve once the draw completes — the {@link Animation.finished} front-door. */
|
|
1103
|
+
get finished(): Promise<void>;
|
|
1104
|
+
}
|
|
1105
|
+
|
|
1106
|
+
export declare interface DrawSVGOptions extends Partial<InputAnimationOptions> {
|
|
1107
|
+
/**
|
|
1108
|
+
* Start of the draw sweep — a percent STRING (`"0%"` → `"100%"`) or a 0..1
|
|
1109
|
+
* NUMBER fraction (`0` → `1`), the two unambiguous forms. Default `"0%"` —
|
|
1110
|
+
* the stroke starts undrawn (full `stroke-dashoffset`) and draws IN; `"100%"`
|
|
1111
|
+
* → `"0%"` (or `1` → `0`) erases it. A number outside `[0, 1]` throws (a
|
|
1112
|
+
* percent must be a string — no silent `50`-means-5000% footgun).
|
|
1113
|
+
*/
|
|
1114
|
+
from?: string | number;
|
|
1115
|
+
/** End of the draw sweep — same `"100%"`/`1` two-form contract. Default `"100%"`. */
|
|
1116
|
+
to?: string | number;
|
|
1117
|
+
/**
|
|
1118
|
+
* Auto-start the play loop after construction + targeting. Default true.
|
|
1119
|
+
* `false` returns a constructed, targeted, NOT-yet-playing handle so the
|
|
1120
|
+
* caller can drive the returned animation (`.play()` / `.pause()` / `.stop()`).
|
|
1121
|
+
*/
|
|
1122
|
+
autoPlay?: boolean;
|
|
1123
|
+
}
|
|
1124
|
+
|
|
1033
1125
|
/**
|
|
1034
1126
|
* The typed easing value — a callable curve plus, when one exists, the CSS
|
|
1035
1127
|
* easing string that reproduces it (e.g. a spring's `linear()` stops).
|
|
@@ -1165,7 +1257,7 @@ export declare interface FlipOptions {
|
|
|
1165
1257
|
export declare function flipShared(a: HTMLElement, b: HTMLElement, options?: FlipOptions): Promise<void>;
|
|
1166
1258
|
|
|
1167
1259
|
declare class FrameCompiler<V extends Vars = any> {
|
|
1168
|
-
private
|
|
1260
|
+
private readonly _options;
|
|
1169
1261
|
templateFrames: TemplateAnimationFrame<V>[];
|
|
1170
1262
|
parsedVars: ParsedVarMap[];
|
|
1171
1263
|
frames: AnimationFrame<V>[];
|
|
@@ -1187,7 +1279,16 @@ declare class FrameCompiler<V extends Vars = any> {
|
|
|
1187
1279
|
* the only baked state that depends on them). No setter silently no-ops a
|
|
1188
1280
|
* change to compiled state.
|
|
1189
1281
|
*/
|
|
1190
|
-
constructor(
|
|
1282
|
+
constructor(_options: AnimationOptions);
|
|
1283
|
+
/**
|
|
1284
|
+
* The live options object the compiler reads (a REFERENCE to the owning
|
|
1285
|
+
* `Animation`'s `options` — the setters mutate it in place). Read-only:
|
|
1286
|
+
* the compiler never replaces it. Exposed so `Animation.adoptCompiled`
|
|
1287
|
+
* can re-bind `Animation.options` to the adopted compiler's options object
|
|
1288
|
+
* BY CONSTRUCTION (`this.options === this.compiler.options`, the live-options
|
|
1289
|
+
* invariant — G.W19 / the `6e29236` lock), without poking a private field.
|
|
1290
|
+
*/
|
|
1291
|
+
get options(): AnimationOptions;
|
|
1191
1292
|
convertFrameStart(frame: TemplateAnimationFrame<V>): TemplateAnimationFrame<V>;
|
|
1192
1293
|
addFrame<K extends V>(start: number | string | ValueUnit<number>, vars: Partial<K>, transform?: TransformFunction<K>, timingFunction?: InputAnimationOptions["timingFunction"]): void;
|
|
1193
1294
|
createFrame(startIx: number, endIx: number): AnimationFrame<V>;
|
|
@@ -1237,6 +1338,32 @@ declare class FrameCompiler<V extends Vars = any> {
|
|
|
1237
1338
|
renormalizeColors(): void;
|
|
1238
1339
|
}
|
|
1239
1340
|
|
|
1341
|
+
/**
|
|
1342
|
+
* Build a CSS-native SVG line-drawing animation: read the target's path length
|
|
1343
|
+
* ONCE, set `stroke-dasharray` to that length (one solid full-length dash), and
|
|
1344
|
+
* sweep `stroke-dashoffset` from → to (default `0% → 100%` ⇒ offset `L → 0`,
|
|
1345
|
+
* the line draws in). Returns the constructed {@link CSSKeyframesAnimation} as
|
|
1346
|
+
* the control handle (the `animate()` contract — `.play()` / `.pause()` /
|
|
1347
|
+
* `.stop()` / `.finished`), consistent with the `from*` factory family.
|
|
1348
|
+
*
|
|
1349
|
+
* The returned animation passes the EXISTING WAAPI eligibility gate
|
|
1350
|
+
* (`isWAAPIEligible`) for an SVG DOM target with a uniform CSS-twin easing, and
|
|
1351
|
+
* delegates compositor-thread via `playWAAPI` — no new eligibility predicate.
|
|
1352
|
+
*
|
|
1353
|
+
* The line length `L` is read a SINGLE time at construction (the
|
|
1354
|
+
* `motion-path.ts` "browser owns the geometry" pattern). A path mutated mid-draw
|
|
1355
|
+
* is a re-construct, not a per-frame re-measure — a per-frame `getTotalLength`
|
|
1356
|
+
* would be a layout round-trip the Mandate's measure-first forbids.
|
|
1357
|
+
*
|
|
1358
|
+
* @param target an SVG geometry element exposing `getTotalLength()`.
|
|
1359
|
+
* @param options `{ from?, to?, ...animationOptions }`.
|
|
1360
|
+
*
|
|
1361
|
+
* @example
|
|
1362
|
+
* // Draw a path stroke in over 2s:
|
|
1363
|
+
* fromDrawSVG(pathEl, { duration: 2000 });
|
|
1364
|
+
*/
|
|
1365
|
+
declare function fromDrawSVG<V extends Record<string, any> = any>(target: SVGDrawTarget, options?: DrawSVGOptions): CSSKeyframesAnimation<V>;
|
|
1366
|
+
|
|
1240
1367
|
/**
|
|
1241
1368
|
* Build a CSS-native path-motion animation: set the author `offset-path` (and
|
|
1242
1369
|
* optional `offset-rotate`) on the target(s), and sweep `offset-distance` from
|
|
@@ -1497,7 +1624,7 @@ export declare interface NumericAnimationOptions {
|
|
|
1497
1624
|
* When true, honor `prefers-reduced-motion: reduce` by snapping to the
|
|
1498
1625
|
* final keyframe values immediately rather than interpolating over
|
|
1499
1626
|
* `duration`. The play promise resolves on the next microtask. Default
|
|
1500
|
-
* false (
|
|
1627
|
+
* false (conservative default — opt in to the reduced-motion snap).
|
|
1501
1628
|
*
|
|
1502
1629
|
* The check uses `matchMedia` if available; on SSR / Node the option
|
|
1503
1630
|
* is a no-op (animations proceed normally).
|
|
@@ -1886,6 +2013,15 @@ export declare class Sequence<V extends Vars = any> {
|
|
|
1886
2013
|
* Under `respectReducedMotion` + an active query, snaps to the rest frame
|
|
1887
2014
|
* in one paint (a terminal `seek(duration)`), no draw loop.
|
|
1888
2015
|
*/
|
|
2016
|
+
/**
|
|
2017
|
+
* The completion front-door (G.W13) — `await sequence.finished` resolves
|
|
2018
|
+
* once the in-flight transport settles. Exposes the ONE held
|
|
2019
|
+
* `_playingPromise` `play()` constructs (the re-entrant guard returns it;
|
|
2020
|
+
* the `finally`-clear nulls it on settle) — NOT a second completion
|
|
2021
|
+
* lifecycle. A settled (or never-played, or reduced-motion-snapped)
|
|
2022
|
+
* sequence resolves immediately.
|
|
2023
|
+
*/
|
|
2024
|
+
get finished(): Promise<void>;
|
|
1889
2025
|
play(): Promise<void>;
|
|
1890
2026
|
private _frame;
|
|
1891
2027
|
/**
|
|
@@ -2086,7 +2222,8 @@ export declare interface SmoothProgressOptions {
|
|
|
2086
2222
|
* When true, honor `prefers-reduced-motion: reduce` by snapping to
|
|
2087
2223
|
* target immediately rather than damping. `setTarget` short-circuits
|
|
2088
2224
|
* the smooth-toward path; `play()` invokes `onFrame` once with the
|
|
2089
|
-
* target value. Default false (
|
|
2225
|
+
* target value. Default false (conservative default — opt in to the
|
|
2226
|
+
* reduced-motion snap).
|
|
2090
2227
|
*
|
|
2091
2228
|
* The check uses `matchMedia` if available; on SSR / Node the option
|
|
2092
2229
|
* is a no-op (animations proceed normally).
|
|
@@ -2473,6 +2610,17 @@ export declare interface StaggerOptions {
|
|
|
2473
2610
|
*/
|
|
2474
2611
|
export declare type StaggerOrigin = "first" | "last" | "center" | "edges" | number;
|
|
2475
2612
|
|
|
2613
|
+
/**
|
|
2614
|
+
* The minimal geometry contract DrawSVG needs: any SVG element that exposes
|
|
2615
|
+
* `getTotalLength()` (`SVGGeometryElement` — `<path>`, `<line>`, `<circle>`,
|
|
2616
|
+
* `<ellipse>`, `<rect>`, `<polygon>`, `<polyline>`). Narrower than `SVGElement`
|
|
2617
|
+
* so a non-geometry SVG node is a type error at the call site, not a runtime
|
|
2618
|
+
* surprise.
|
|
2619
|
+
*/
|
|
2620
|
+
export declare type SVGDrawTarget = SVGElement & {
|
|
2621
|
+
getTotalLength(): number;
|
|
2622
|
+
};
|
|
2623
|
+
|
|
2476
2624
|
export declare interface TemplateAnimationFrame<V extends Vars> {
|
|
2477
2625
|
id: number;
|
|
2478
2626
|
start: ValueUnit;
|
package/dist/keyframes.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { a as e, c as t, d as n, g as r, h as i, i as a, l as o, m as s, n as c, o as l, p as u, r as d, t as f, u as p } from "./timeline-
|
|
2
|
-
import { n as m, r as h, t as g } from "./springTimingFunction-
|
|
1
|
+
import { a as e, c as t, d as n, g as r, h as i, i as a, l as o, m as s, n as c, o as l, p as u, r as d, t as f, u as p } from "./timeline-BHz0o8dZ.js";
|
|
2
|
+
import { n as m, r as h, t as g } from "./springTimingFunction-cMJnhbug.js";
|
|
3
3
|
//#region src/animation/numeric.ts
|
|
4
4
|
var _ = class {
|
|
5
5
|
keyframes;
|
|
@@ -372,6 +372,9 @@ var I = class {
|
|
|
372
372
|
for (let { animation: t } of this.entries) t.setTargets(...e);
|
|
373
373
|
return this;
|
|
374
374
|
}
|
|
375
|
+
get finished() {
|
|
376
|
+
return this._playingPromise ?? Promise.resolve();
|
|
377
|
+
}
|
|
375
378
|
play() {
|
|
376
379
|
if (this._playingPromise) return this._playingPromise;
|
|
377
380
|
if (this.respectReducedMotion && L()) return this.seek(this.duration), Promise.resolve();
|
|
@@ -441,17 +444,20 @@ var I = class {
|
|
|
441
444
|
return this._yoyoOn = e, this;
|
|
442
445
|
}
|
|
443
446
|
}, L = () => typeof matchMedia == "function" && matchMedia("(prefers-reduced-motion: reduce)").matches, R = async () => {
|
|
444
|
-
let [e, t, n, r] = await Promise.all([
|
|
445
|
-
import("./engine-
|
|
446
|
-
import("./animate-
|
|
447
|
-
import("./motion-path-
|
|
448
|
-
import("./
|
|
447
|
+
let [e, t, n, r, i] = await Promise.all([
|
|
448
|
+
import("./engine-Cj0T6OIH.js"),
|
|
449
|
+
import("./animate-12YQKwyY.js"),
|
|
450
|
+
import("./motion-path-683GcEZK.js"),
|
|
451
|
+
import("./draw-svg-DwAa5cbU.js"),
|
|
452
|
+
import("./animations-CcAWdZlW.js")
|
|
449
453
|
]);
|
|
450
454
|
return Object.assign({
|
|
451
455
|
animate: t.animate,
|
|
452
456
|
MotionPath: n.MotionPath,
|
|
453
457
|
fromMotionPath: n.fromMotionPath,
|
|
454
|
-
|
|
458
|
+
DrawSVG: r.DrawSVG,
|
|
459
|
+
fromDrawSVG: r.fromDrawSVG,
|
|
460
|
+
presets: i
|
|
455
461
|
}, e);
|
|
456
462
|
};
|
|
457
463
|
//#endregion
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { c as e, o as t, s as n } from "./timeline-
|
|
1
|
+
import { c as e, o as t, s as n } from "./timeline-BHz0o8dZ.js";
|
|
2
2
|
//#region src/animation/spring.ts
|
|
3
3
|
function r(t) {
|
|
4
4
|
let { visualDuration: n, duration: r, bounce: a = 0, ...o } = t, s = n ?? r ?? i.response, c = 1 - e(a, -1, 1);
|
|
@@ -25,7 +25,7 @@ var i = (e) => typeof e == "function" ? { fn: e } : e, a = /^(linear|ease|ease-i
|
|
|
25
25
|
async function c(e) {
|
|
26
26
|
let t;
|
|
27
27
|
try {
|
|
28
|
-
t = await import("./engine-
|
|
28
|
+
t = await import("./engine-Cj0T6OIH.js");
|
|
29
29
|
} catch (t) {
|
|
30
30
|
throw Error(`keyframes: the engine chunk failed to load while resolving easing "${e}" — the easing registry is unreachable.`, { cause: t });
|
|
31
31
|
}
|
package/package.json
CHANGED
|
@@ -1,134 +1,149 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
2
|
+
"name": "@mkbabb/keyframes.js",
|
|
3
|
+
"version": "4.1.0",
|
|
4
|
+
"description": "Create keyframe animations for anything in JavaScript; specify your keyframes in standards-complaint CSS.",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"keywords": [
|
|
7
|
+
"keyframes",
|
|
8
|
+
"keyframes-library",
|
|
9
|
+
"animation",
|
|
10
|
+
"css",
|
|
11
|
+
"css-animations",
|
|
12
|
+
"typescript",
|
|
13
|
+
"web",
|
|
14
|
+
"browser",
|
|
15
|
+
"parsing"
|
|
16
|
+
],
|
|
17
|
+
"type": "module",
|
|
18
|
+
"sideEffects": false,
|
|
19
|
+
"main": "./dist/keyframes.js",
|
|
20
|
+
"types": "./dist/keyframes.d.ts",
|
|
21
|
+
"exports": {
|
|
22
|
+
".": {
|
|
23
|
+
"types": "./dist/keyframes.d.ts",
|
|
24
|
+
"import": "./dist/keyframes.js",
|
|
25
|
+
"default": "./dist/keyframes.js"
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
"files": [
|
|
29
|
+
"dist"
|
|
30
|
+
],
|
|
31
|
+
"scripts": {
|
|
32
|
+
"prepare": "npm run build:lib",
|
|
33
|
+
"check": "tsc --noEmit",
|
|
34
|
+
"check:lib": "tsc --noEmit -p tsconfig.lib.json",
|
|
35
|
+
"dev": "vite",
|
|
36
|
+
"dev:playground": "vite --mode playground",
|
|
37
|
+
"build": "npm run build:lib",
|
|
38
|
+
"build:lib": "vite build --mode production",
|
|
39
|
+
"build:watch": "vite build --watch --mode production",
|
|
40
|
+
"gh-pages": "vite build --mode gh-pages",
|
|
41
|
+
"proof:boundary": "node scripts/proof-boundary.mjs",
|
|
42
|
+
"proof:repin-safe": "node scripts/proof-repin-safe.mjs",
|
|
43
|
+
"proof:deps-current": "node scripts/proof-deps-current.mjs",
|
|
44
|
+
"proof:repin-witness": "node scripts/proof-repin-witness.mjs",
|
|
45
|
+
"proof:dogfood": "node scripts/proof-dogfood.mjs",
|
|
46
|
+
"proof:engine": "node scripts/proof-engine.mjs",
|
|
47
|
+
"proof:decomposition": "node scripts/proof-decomposition.mjs",
|
|
48
|
+
"proof:idioms": "node scripts/proof-idioms.mjs",
|
|
49
|
+
"proof:brittleness": "node scripts/proof-brittleness.mjs",
|
|
50
|
+
"proof:modern-web": "node scripts/proof-modern-web.mjs",
|
|
51
|
+
"proof:lighthouse-mobile": "node scripts/proof-lighthouse-mobile.mjs",
|
|
52
|
+
"proof:demo-elevate": "node scripts/proof-demo-elevate.mjs",
|
|
53
|
+
"proof:platform-adopt": "node scripts/proof-platform-adopt.mjs && vitest run test/platform-adopt.test.ts",
|
|
54
|
+
"proof:zero-alloc": "vitest run test/zero-alloc.test.ts test/snap-symmetry.test.ts test/frame-compiler.test.ts",
|
|
55
|
+
"proof:engine-correctness": "vitest run test/engine-correctness.test.ts",
|
|
56
|
+
"proof:standalone-zero-alloc": "vitest run test/standalone-zero-alloc.test.ts",
|
|
57
|
+
"proof:compile-deterministic": "vitest run test/compile-deterministic.test.ts",
|
|
58
|
+
"proof:bench-runs": "node scripts/proof-bench-runs.mjs",
|
|
59
|
+
"proof:orchestration": "node scripts/proof-orchestration.mjs",
|
|
60
|
+
"proof:interp-fastprops": "node --allow-natives-syntax scripts/proof-interp-fastprops.mjs && vitest run test/interp-fastprops.test.ts",
|
|
61
|
+
"proof:sync-step": "vitest run test/sync-step.test.ts",
|
|
62
|
+
"proof:roundtrip-easing": "vitest run test/roundtrip-easing.test.ts",
|
|
63
|
+
"proof:adapter-capture": "vitest run test/adapter-capture.test.ts",
|
|
64
|
+
"proof:motion-path": "node scripts/proof-motion-path.mjs && vitest run test/motion-path.test.ts",
|
|
65
|
+
"proof:blend": "node scripts/proof-blend.mjs && vitest run test/blend.test.ts",
|
|
66
|
+
"proof:drawsvg": "node scripts/proof-drawsvg.mjs && vitest run test/draw-svg.test.ts",
|
|
67
|
+
"proof:finished": "node scripts/proof-finished.mjs && vitest run test/finished.test.ts",
|
|
68
|
+
"proof:adopt-compiled": "node scripts/proof-adopt-compiled.mjs && vitest run test/adopt-compiled.test.ts",
|
|
69
|
+
"proof:interpolate-anything": "node scripts/proof-interpolate-anything.mjs && vitest run test/interpolate-anything.test.ts",
|
|
70
|
+
"proof:roundtrip-fidelity": "node scripts/proof-roundtrip-fidelity.mjs && vitest run test/roundtrip-fidelity.test.ts",
|
|
71
|
+
"proof:orbital-rotate3d": "node scripts/proof-orbital-rotate3d.mjs && vitest run test/orbital-rotate3d.test.ts",
|
|
72
|
+
"proof:asset-store-singleton": "vitest run test/asset-store-singleton.test.ts",
|
|
73
|
+
"proof:scene-raf-leak": "vitest run test/scene-raf-leak.test.ts",
|
|
74
|
+
"proof:resize-tracks": "vitest run test/resize-tracks.test.ts",
|
|
75
|
+
"proof:computed-real-dom": "node scripts/proof-computed-real-dom.mjs",
|
|
76
|
+
"proof:demo-usability": "node scripts/proof-demo-usability.mjs",
|
|
77
|
+
"proof:cohesion": "vitest run test/boundary-cohesion.test.ts",
|
|
78
|
+
"proof:ci-coverage": "node scripts/proof-ci-coverage.mjs",
|
|
79
|
+
"proof:all": "npm run proof:deps-current && npm run proof:repin-witness && npm run proof:boundary && npm run proof:dogfood && npm run proof:engine && npm run proof:decomposition && npm run proof:idioms && npm run proof:brittleness && npm run proof:demo-elevate && npm run proof:modern-web && npm run proof:zero-alloc && npm run proof:engine-correctness && npm run proof:standalone-zero-alloc && npm run proof:compile-deterministic && npm run proof:platform-adopt && npm run proof:orchestration && npm run proof:interp-fastprops && npm run proof:sync-step && npm run proof:roundtrip-easing && npm run proof:adapter-capture && npm run proof:motion-path && npm run proof:blend && npm run proof:drawsvg && npm run proof:finished && npm run proof:adopt-compiled && npm run proof:interpolate-anything && npm run proof:roundtrip-fidelity && npm run proof:orbital-rotate3d && npm run proof:asset-store-singleton && npm run proof:scene-raf-leak && npm run proof:resize-tracks && npm run proof:cohesion && npm run proof:bench-runs && npm run proof:ci-coverage && vitest run",
|
|
80
|
+
"test": "vitest",
|
|
81
|
+
"bench": "vitest bench"
|
|
82
|
+
},
|
|
83
|
+
"repository": {
|
|
84
|
+
"type": "git",
|
|
85
|
+
"url": "git+https://github.com/mkbabb/keyframes.js.git"
|
|
86
|
+
},
|
|
87
|
+
"author": "",
|
|
88
|
+
"engines": {
|
|
89
|
+
"node": ">=22"
|
|
90
|
+
},
|
|
91
|
+
"peerDependencies": {
|
|
92
|
+
"vue": "^3.5.0"
|
|
93
|
+
},
|
|
94
|
+
"bugs": {
|
|
95
|
+
"url": "https://github.com/mkbabb/keyframes.js/issues"
|
|
96
|
+
},
|
|
97
|
+
"homepage": "https://github.com/mkbabb/keyframes.js#readme",
|
|
98
|
+
"dependencies": {
|
|
99
|
+
"@mkbabb/parse-that": "^0.9.0",
|
|
100
|
+
"@mkbabb/value.js": "^0.11.1"
|
|
101
|
+
},
|
|
102
|
+
"optionalDependencies": {
|
|
103
|
+
"@mkbabb/glass-ui": "^3.3.0"
|
|
104
|
+
},
|
|
105
|
+
"devDependencies": {
|
|
106
|
+
"@iconify-json/radix-icons": "^1.2.6",
|
|
107
|
+
"@iconify/vue": "^5.0.1",
|
|
108
|
+
"@lucide/vue": "^1.17.0",
|
|
109
|
+
"@microsoft/api-extractor": "^7.58.7",
|
|
110
|
+
"@tailwindcss/postcss": "^4.3.0",
|
|
111
|
+
"@types/node": "^25.9.1",
|
|
112
|
+
"@types/three": "^0.184.1",
|
|
113
|
+
"@unovis/ts": "^1.6.5",
|
|
114
|
+
"@unovis/vue": "^1.6.5",
|
|
115
|
+
"@vee-validate/zod": "^4.15.1",
|
|
116
|
+
"@vitejs/plugin-vue": "^6.0.7",
|
|
117
|
+
"@vueuse/core": "^14.3.0",
|
|
118
|
+
"class-variance-authority": "^0.7.1",
|
|
119
|
+
"clsx": "^2.1.1",
|
|
120
|
+
"embla-carousel-vue": "^8.6.0",
|
|
121
|
+
"highlight.js": "^11.11.1",
|
|
122
|
+
"html2canvas": "^1.4.1",
|
|
123
|
+
"jsdom": "^29.1.1",
|
|
124
|
+
"monaco-editor": "^0.55.1",
|
|
125
|
+
"monaco-themes": "^0.4.8",
|
|
126
|
+
"prettier": "^3.8.3",
|
|
127
|
+
"prettier-plugin-classnames": "^0.10.2",
|
|
128
|
+
"prettier-plugin-merge": "^0.10.1",
|
|
129
|
+
"prettier-plugin-organize-imports": "^4.3.0",
|
|
130
|
+
"prettier-plugin-tailwindcss": "^0.8.0",
|
|
131
|
+
"reka-ui": "^2.9.9",
|
|
132
|
+
"rolldown": "^1.0.0",
|
|
133
|
+
"tailwind-merge": "^3.6.0",
|
|
134
|
+
"tailwindcss": "^4.3.0",
|
|
135
|
+
"three": "^0.184.0",
|
|
136
|
+
"tw-animate-css": "^1.4.0",
|
|
137
|
+
"typescript": "^6.0.3",
|
|
138
|
+
"v-calendar": "^3.1.2",
|
|
139
|
+
"vaul-vue": "^0.4.1",
|
|
140
|
+
"vee-validate": "^4.15.1",
|
|
141
|
+
"vite": "^8.0.16",
|
|
142
|
+
"vite-plugin-dts": "^5.0.2",
|
|
143
|
+
"vitest": "^4.1.8",
|
|
144
|
+
"vue": "^3.5.35",
|
|
145
|
+
"vue-router": "^5.1.0",
|
|
146
|
+
"vue-sonner": "^2.0.9",
|
|
147
|
+
"zod": "^3.25.76"
|
|
26
148
|
}
|
|
27
|
-
},
|
|
28
|
-
"files": [
|
|
29
|
-
"dist"
|
|
30
|
-
],
|
|
31
|
-
"scripts": {
|
|
32
|
-
"prepare": "npm run build:lib",
|
|
33
|
-
"check": "tsc --noEmit",
|
|
34
|
-
"check:lib": "tsc --noEmit -p tsconfig.lib.json",
|
|
35
|
-
"dev": "vite",
|
|
36
|
-
"dev:playground": "vite --mode playground",
|
|
37
|
-
"build": "npm run build:lib",
|
|
38
|
-
"build:lib": "vite build --mode production",
|
|
39
|
-
"build:watch": "vite build --watch --mode production",
|
|
40
|
-
"gh-pages": "vite build --mode gh-pages",
|
|
41
|
-
"proof:boundary": "node scripts/proof-boundary.mjs",
|
|
42
|
-
"proof:dogfood": "node scripts/proof-dogfood.mjs",
|
|
43
|
-
"proof:engine": "node scripts/proof-engine.mjs",
|
|
44
|
-
"proof:decomposition": "node scripts/proof-decomposition.mjs",
|
|
45
|
-
"proof:idioms": "node scripts/proof-idioms.mjs",
|
|
46
|
-
"proof:brittleness": "node scripts/proof-brittleness.mjs",
|
|
47
|
-
"proof:modern-web": "node scripts/proof-modern-web.mjs",
|
|
48
|
-
"proof:lighthouse-mobile": "node scripts/proof-lighthouse-mobile.mjs",
|
|
49
|
-
"proof:demo-elevate": "node scripts/proof-demo-elevate.mjs",
|
|
50
|
-
"proof:platform-adopt": "node scripts/proof-platform-adopt.mjs && vitest run test/platform-adopt.test.ts",
|
|
51
|
-
"proof:zero-alloc": "vitest run test/zero-alloc.test.ts test/snap-symmetry.test.ts test/frame-compiler.test.ts",
|
|
52
|
-
"proof:engine-correctness": "vitest run test/engine-correctness.test.ts",
|
|
53
|
-
"proof:standalone-zero-alloc": "vitest run test/standalone-zero-alloc.test.ts",
|
|
54
|
-
"proof:compile-deterministic": "vitest run test/compile-deterministic.test.ts",
|
|
55
|
-
"proof:bench-runs": "node scripts/proof-bench-runs.mjs",
|
|
56
|
-
"proof:orchestration": "node scripts/proof-orchestration.mjs",
|
|
57
|
-
"proof:interp-fastprops": "node --allow-natives-syntax scripts/proof-interp-fastprops.mjs && vitest run test/interp-fastprops.test.ts",
|
|
58
|
-
"proof:sync-step": "vitest run test/sync-step.test.ts",
|
|
59
|
-
"proof:roundtrip-easing": "vitest run test/roundtrip-easing.test.ts",
|
|
60
|
-
"proof:adapter-capture": "vitest run test/adapter-capture.test.ts",
|
|
61
|
-
"proof:motion-path": "node scripts/proof-motion-path.mjs && vitest run test/motion-path.test.ts",
|
|
62
|
-
"proof:cohesion": "vitest run test/boundary-cohesion.test.ts",
|
|
63
|
-
"proof:ci-coverage": "node scripts/proof-ci-coverage.mjs",
|
|
64
|
-
"proof:all": "npm run proof:boundary && npm run proof:dogfood && npm run proof:engine && npm run proof:decomposition && npm run proof:idioms && npm run proof:brittleness && npm run proof:demo-elevate && npm run proof:modern-web && npm run proof:zero-alloc && npm run proof:engine-correctness && npm run proof:standalone-zero-alloc && npm run proof:compile-deterministic && npm run proof:platform-adopt && npm run proof:orchestration && npm run proof:interp-fastprops && npm run proof:sync-step && npm run proof:roundtrip-easing && npm run proof:adapter-capture && npm run proof:motion-path && npm run proof:cohesion && npm run proof:bench-runs && npm run proof:ci-coverage && vitest run",
|
|
65
|
-
"test": "vitest",
|
|
66
|
-
"bench": "vitest bench"
|
|
67
|
-
},
|
|
68
|
-
"repository": {
|
|
69
|
-
"type": "git",
|
|
70
|
-
"url": "git+https://github.com/mkbabb/keyframes.js.git"
|
|
71
|
-
},
|
|
72
|
-
"author": "",
|
|
73
|
-
"engines": {
|
|
74
|
-
"node": ">=22"
|
|
75
|
-
},
|
|
76
|
-
"peerDependencies": {
|
|
77
|
-
"vue": "^3.5.0"
|
|
78
|
-
},
|
|
79
|
-
"bugs": {
|
|
80
|
-
"url": "https://github.com/mkbabb/keyframes.js/issues"
|
|
81
|
-
},
|
|
82
|
-
"homepage": "https://github.com/mkbabb/keyframes.js#readme",
|
|
83
|
-
"dependencies": {
|
|
84
|
-
"@mkbabb/parse-that": "^0.8.2",
|
|
85
|
-
"@mkbabb/value.js": "^0.10.0"
|
|
86
|
-
},
|
|
87
|
-
"optionalDependencies": {
|
|
88
|
-
"@mkbabb/glass-ui": "file:../glass-ui"
|
|
89
|
-
},
|
|
90
|
-
"devDependencies": {
|
|
91
|
-
"@iconify-json/radix-icons": "^1.2.6",
|
|
92
|
-
"@iconify/vue": "^5.0.1",
|
|
93
|
-
"@lucide/vue": "^1.17.0",
|
|
94
|
-
"@microsoft/api-extractor": "^7.58.7",
|
|
95
|
-
"@tailwindcss/postcss": "^4.3.0",
|
|
96
|
-
"@types/node": "^25.9.1",
|
|
97
|
-
"@types/three": "^0.184.1",
|
|
98
|
-
"@unovis/ts": "^1.6.5",
|
|
99
|
-
"@unovis/vue": "^1.6.5",
|
|
100
|
-
"@vee-validate/zod": "^4.15.1",
|
|
101
|
-
"@vitejs/plugin-vue": "^6.0.7",
|
|
102
|
-
"@vueuse/core": "^14.3.0",
|
|
103
|
-
"class-variance-authority": "^0.7.1",
|
|
104
|
-
"clsx": "^2.1.1",
|
|
105
|
-
"embla-carousel-vue": "^8.6.0",
|
|
106
|
-
"highlight.js": "^11.11.1",
|
|
107
|
-
"html2canvas": "^1.4.1",
|
|
108
|
-
"jsdom": "^29.1.1",
|
|
109
|
-
"monaco-editor": "^0.55.1",
|
|
110
|
-
"monaco-themes": "^0.4.8",
|
|
111
|
-
"prettier": "^3.8.3",
|
|
112
|
-
"prettier-plugin-classnames": "^0.10.2",
|
|
113
|
-
"prettier-plugin-merge": "^0.10.1",
|
|
114
|
-
"prettier-plugin-organize-imports": "^4.3.0",
|
|
115
|
-
"prettier-plugin-tailwindcss": "^0.8.0",
|
|
116
|
-
"reka-ui": "^2.9.9",
|
|
117
|
-
"rolldown": "^1.0.0",
|
|
118
|
-
"tailwind-merge": "^3.6.0",
|
|
119
|
-
"tailwindcss": "^4.3.0",
|
|
120
|
-
"three": "^0.184.0",
|
|
121
|
-
"tw-animate-css": "^1.4.0",
|
|
122
|
-
"typescript": "^6.0.3",
|
|
123
|
-
"v-calendar": "^3.1.2",
|
|
124
|
-
"vaul-vue": "^0.4.1",
|
|
125
|
-
"vee-validate": "^4.15.1",
|
|
126
|
-
"vite": "^8.0.16",
|
|
127
|
-
"vite-plugin-dts": "^5.0.2",
|
|
128
|
-
"vitest": "^4.1.8",
|
|
129
|
-
"vue": "^3.5.35",
|
|
130
|
-
"vue-router": "^5.1.0",
|
|
131
|
-
"vue-sonner": "^2.0.9",
|
|
132
|
-
"zod": "^3.25.76"
|
|
133
|
-
}
|
|
134
149
|
}
|