@pixerate/editor 0.28.0 → 0.30.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/README.md +20 -1
- package/dist/HistoryManager-DWSLd6Tf.d.ts +150 -0
- package/dist/HistoryManager-DeQQMBCj.d.cts +150 -0
- package/dist/agent/index.cjs +20 -427
- package/dist/agent/index.cjs.map +1 -1
- package/dist/agent/index.d.cts +4 -342
- package/dist/agent/index.d.ts +4 -342
- package/dist/agent/index.js +14 -421
- package/dist/agent/index.js.map +1 -1
- package/dist/animation/index.cjs +6 -2
- package/dist/animation/index.cjs.map +1 -1
- package/dist/animation/index.d.cts +3 -73
- package/dist/animation/index.d.ts +3 -73
- package/dist/animation/index.js +17 -13
- package/dist/{builtins-nMXh9sT3.d.cts → builtins-DxC3aUR2.d.cts} +2 -2
- package/dist/{builtins-haN82vjT.d.ts → builtins-NGxNxQfJ.d.ts} +2 -2
- package/dist/canvas/index.cjs +338 -28
- package/dist/canvas/index.cjs.map +1 -1
- package/dist/canvas/index.d.cts +109 -4
- package/dist/canvas/index.d.ts +109 -4
- package/dist/canvas/index.js +323 -13
- package/dist/canvas/index.js.map +1 -1
- package/dist/chunk-36BLROHV.js +438 -0
- package/dist/chunk-36BLROHV.js.map +1 -0
- package/dist/{chunk-OYEFRO3D.cjs → chunk-6MDQKHRH.cjs} +4 -4
- package/dist/{chunk-OYEFRO3D.cjs.map → chunk-6MDQKHRH.cjs.map} +1 -1
- package/dist/{chunk-ARRTP33I.js → chunk-D6S5M7HV.js} +2 -2
- package/dist/{chunk-ARRTP33I.js.map → chunk-D6S5M7HV.js.map} +1 -1
- package/dist/{chunk-MXZJ4PKN.js → chunk-DDADOHJW.js} +8 -8
- package/dist/{chunk-CPOKFNBG.cjs → chunk-I6BZB5ZH.cjs} +2 -2
- package/dist/{chunk-CPOKFNBG.cjs.map → chunk-I6BZB5ZH.cjs.map} +1 -1
- package/dist/chunk-PIIAZV3L.cjs +244 -0
- package/dist/chunk-PIIAZV3L.cjs.map +1 -0
- package/dist/{chunk-G2I4QJOT.cjs → chunk-QKLRAA4T.cjs} +3 -244
- package/dist/chunk-QKLRAA4T.cjs.map +1 -0
- package/dist/{chunk-2H7ZHPEJ.js → chunk-QVZZGT4X.js} +1 -242
- package/dist/chunk-QVZZGT4X.js.map +1 -0
- package/dist/chunk-UB2OY7FD.js +262 -0
- package/dist/chunk-UB2OY7FD.js.map +1 -0
- package/dist/chunk-V7CC7RZ6.cjs +438 -0
- package/dist/chunk-V7CC7RZ6.cjs.map +1 -0
- package/dist/{chunk-PWJARCI4.js → chunk-W7BOBWZD.js} +5 -196
- package/dist/chunk-W7BOBWZD.js.map +1 -0
- package/dist/{chunk-TTYCN6ZH.cjs → chunk-XHRZSB77.cjs} +8 -199
- package/dist/chunk-XHRZSB77.cjs.map +1 -0
- package/dist/chunk-XZ4L3R4K.cjs +262 -0
- package/dist/chunk-XZ4L3R4K.cjs.map +1 -0
- package/dist/chunk-YK57D7PW.js +244 -0
- package/dist/chunk-YK57D7PW.js.map +1 -0
- package/dist/commands/index.cjs +2 -2
- package/dist/commands/index.cjs.map +1 -1
- package/dist/commands/index.d.cts +2 -2
- package/dist/commands/index.d.ts +2 -2
- package/dist/commands/index.js +1 -1
- package/dist/commands/index.js.map +1 -1
- package/dist/easing-DTmX99QG.d.cts +88 -0
- package/dist/easing-DTmX99QG.d.ts +88 -0
- package/dist/extensions/index.cjs +5 -5
- package/dist/extensions/index.cjs.map +1 -1
- package/dist/extensions/index.js +9 -9
- package/dist/generation/index.cjs +2 -2
- package/dist/generation/index.cjs.map +1 -1
- package/dist/generation/index.js +1 -1
- package/dist/generation/index.js.map +1 -1
- package/dist/history/index.cjs +4 -2
- package/dist/history/index.cjs.map +1 -1
- package/dist/history/index.d.cts +3 -149
- package/dist/history/index.d.ts +3 -149
- package/dist/history/index.js +5 -3
- package/dist/image-editor/index.cjs.map +1 -1
- package/dist/image-editor/index.js.map +1 -1
- package/dist/index.cjs +15 -13
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +3 -2
- package/dist/index.d.ts +3 -2
- package/dist/index.js +22 -20
- package/dist/index.js.map +1 -1
- package/dist/parameters/index.cjs +1320 -0
- package/dist/parameters/index.cjs.map +1 -0
- package/dist/parameters/index.d.cts +625 -0
- package/dist/parameters/index.d.ts +625 -0
- package/dist/parameters/index.js +1320 -0
- package/dist/parameters/index.js.map +1 -0
- package/dist/tools/index.cjs +31 -0
- package/dist/tools/index.cjs.map +1 -0
- package/dist/tools/index.d.cts +343 -0
- package/dist/tools/index.d.ts +343 -0
- package/dist/tools/index.js +31 -0
- package/dist/tools/index.js.map +1 -0
- package/dist/{types-GT5a5YAX.d.cts → types-DsiXGmjo.d.cts} +1 -1
- package/dist/{types-GT5a5YAX.d.ts → types-DsiXGmjo.d.ts} +1 -1
- package/package.json +11 -1
- package/dist/chunk-2H7ZHPEJ.js.map +0 -1
- package/dist/chunk-G2I4QJOT.cjs.map +0 -1
- package/dist/chunk-PWJARCI4.js.map +0 -1
- package/dist/chunk-TTYCN6ZH.cjs.map +0 -1
- /package/dist/{chunk-MXZJ4PKN.js.map → chunk-DDADOHJW.js.map} +0 -0
|
@@ -0,0 +1,262 @@
|
|
|
1
|
+
// src/animation/easing.ts
|
|
2
|
+
var ANIMATION_EASING_PRESETS = [
|
|
3
|
+
"linear",
|
|
4
|
+
"ease",
|
|
5
|
+
"ease-in",
|
|
6
|
+
"ease-out",
|
|
7
|
+
"ease-in-out",
|
|
8
|
+
"ease-in-back",
|
|
9
|
+
"ease-out-back",
|
|
10
|
+
"ease-out-elastic",
|
|
11
|
+
"ease-in-elastic",
|
|
12
|
+
"ease-in-out-elastic",
|
|
13
|
+
"elastic",
|
|
14
|
+
"spring",
|
|
15
|
+
"hold"
|
|
16
|
+
];
|
|
17
|
+
var ANIMATION_EASING_LABELS = {
|
|
18
|
+
linear: "Linear",
|
|
19
|
+
hold: "Hold",
|
|
20
|
+
ease: "Ease",
|
|
21
|
+
"ease-in": "Ease in",
|
|
22
|
+
"ease-out": "Ease out",
|
|
23
|
+
"ease-in-out": "Ease in-out",
|
|
24
|
+
"ease-in-back": "Back in",
|
|
25
|
+
"ease-out-back": "Back out",
|
|
26
|
+
"ease-out-elastic": "Elastic out",
|
|
27
|
+
"ease-in-elastic": "Elastic in",
|
|
28
|
+
"ease-in-out-elastic": "Elastic in-out",
|
|
29
|
+
elastic: "Elastic",
|
|
30
|
+
spring: "Spring"
|
|
31
|
+
};
|
|
32
|
+
var CUBIC_BEZIER_PRESETS = {
|
|
33
|
+
linear: [0, 0, 1, 1],
|
|
34
|
+
ease: [0.25, 0.1, 0.25, 1],
|
|
35
|
+
"ease-in": [0.42, 0, 1, 1],
|
|
36
|
+
"ease-out": [0, 0, 0.58, 1],
|
|
37
|
+
"ease-in-out": [0.42, 0, 0.58, 1],
|
|
38
|
+
"ease-in-back": [0.36, 0, 0.66, -0.56],
|
|
39
|
+
"ease-out-back": [0.34, 1.56, 0.64, 1]
|
|
40
|
+
};
|
|
41
|
+
var DEFAULT_SPRING = { stiffness: 170, damping: 26, mass: 1, velocity: 0 };
|
|
42
|
+
var DEFAULT_ELASTIC = { amplitude: 1, period: 0.3, mode: "out" };
|
|
43
|
+
var clamp = (v, lo, hi) => Math.min(hi, Math.max(lo, v));
|
|
44
|
+
var finite = (v, fallback) => typeof v === "number" && Number.isFinite(v) ? v : fallback;
|
|
45
|
+
function elasticAt(elastic, t) {
|
|
46
|
+
if (t <= 0) return 0;
|
|
47
|
+
if (t >= 1) return 1;
|
|
48
|
+
const a = Math.max(1e-6, finite(elastic.amplitude, DEFAULT_ELASTIC.amplitude));
|
|
49
|
+
const p = Math.max(1e-6, finite(elastic.period, DEFAULT_ELASTIC.period));
|
|
50
|
+
const mode = elastic.mode ?? "out";
|
|
51
|
+
const TAU = 2 * Math.PI;
|
|
52
|
+
const solveOut = (u, amp, per) => {
|
|
53
|
+
const s = amp < 1 ? per / 4 : per / TAU * Math.asin(1 / amp);
|
|
54
|
+
return amp * Math.pow(2, -10 * u) * Math.sin((u - s) * TAU / per) + 1;
|
|
55
|
+
};
|
|
56
|
+
const solveIn = (u, amp, per) => {
|
|
57
|
+
const s = amp < 1 ? per / 4 : per / TAU * Math.asin(1 / amp);
|
|
58
|
+
const adjusted = u - 1;
|
|
59
|
+
return -(amp * Math.pow(2, 10 * adjusted) * Math.sin((adjusted - s) * TAU / per));
|
|
60
|
+
};
|
|
61
|
+
if (mode === "in") {
|
|
62
|
+
return solveIn(t, a, p);
|
|
63
|
+
}
|
|
64
|
+
if (mode === "in-out") {
|
|
65
|
+
if (t < 0.5) {
|
|
66
|
+
return 0.5 * solveIn(t * 2, a, p);
|
|
67
|
+
}
|
|
68
|
+
return 0.5 + 0.5 * solveOut((t - 0.5) * 2, a, p);
|
|
69
|
+
}
|
|
70
|
+
return solveOut(t, a, p);
|
|
71
|
+
}
|
|
72
|
+
function cubicBezierAt(x1, y1, x2, y2, x) {
|
|
73
|
+
if (x <= 0) return 0;
|
|
74
|
+
if (x >= 1) return 1;
|
|
75
|
+
x1 = clamp(x1, 0, 1);
|
|
76
|
+
x2 = clamp(x2, 0, 1);
|
|
77
|
+
const bx = (s2) => 3 * (1 - s2) * (1 - s2) * s2 * x1 + 3 * (1 - s2) * s2 * s2 * x2 + s2 * s2 * s2;
|
|
78
|
+
const by = (s2) => 3 * (1 - s2) * (1 - s2) * s2 * y1 + 3 * (1 - s2) * s2 * s2 * y2 + s2 * s2 * s2;
|
|
79
|
+
const dbx = (s2) => 3 * (1 - s2) * (1 - s2) * x1 + 6 * (1 - s2) * s2 * (x2 - x1) + 3 * s2 * s2 * (1 - x2);
|
|
80
|
+
let s = x;
|
|
81
|
+
for (let i = 0; i < 8; i++) {
|
|
82
|
+
const d = dbx(s);
|
|
83
|
+
if (Math.abs(d) < 1e-9) break;
|
|
84
|
+
const next = s - (bx(s) - x) / d;
|
|
85
|
+
if (!(next >= 0 && next <= 1)) break;
|
|
86
|
+
s = next;
|
|
87
|
+
}
|
|
88
|
+
if (Math.abs(bx(s) - x) > 1e-7) {
|
|
89
|
+
let lo = 0;
|
|
90
|
+
let hi = 1;
|
|
91
|
+
for (let i = 0; i < 60; i++) {
|
|
92
|
+
s = (lo + hi) / 2;
|
|
93
|
+
if (bx(s) < x) lo = s;
|
|
94
|
+
else hi = s;
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
return by(s);
|
|
98
|
+
}
|
|
99
|
+
function springAt(spring, seconds) {
|
|
100
|
+
const stiffness = Math.max(1e-6, finite(spring.stiffness, DEFAULT_SPRING.stiffness));
|
|
101
|
+
const damping = Math.max(0, finite(spring.damping, DEFAULT_SPRING.damping));
|
|
102
|
+
const mass = Math.max(1e-6, finite(spring.mass, DEFAULT_SPRING.mass));
|
|
103
|
+
const v0 = -finite(spring.velocity, DEFAULT_SPRING.velocity);
|
|
104
|
+
const t = Math.max(0, seconds);
|
|
105
|
+
const w0 = Math.sqrt(stiffness / mass);
|
|
106
|
+
const zeta = damping / (2 * Math.sqrt(stiffness * mass));
|
|
107
|
+
let x;
|
|
108
|
+
if (zeta < 1 - 1e-6) {
|
|
109
|
+
const wd = w0 * Math.sqrt(1 - zeta * zeta);
|
|
110
|
+
x = Math.exp(-zeta * w0 * t) * (Math.cos(wd * t) + (zeta * w0 + v0) / wd * Math.sin(wd * t));
|
|
111
|
+
} else if (zeta <= 1 + 1e-6) {
|
|
112
|
+
x = Math.exp(-w0 * t) * (1 + (w0 + v0) * t);
|
|
113
|
+
} else {
|
|
114
|
+
const r = Math.sqrt(zeta * zeta - 1);
|
|
115
|
+
const s1 = -w0 * (zeta - r);
|
|
116
|
+
const s2 = -w0 * (zeta + r);
|
|
117
|
+
const c2 = (v0 - s1) / (s2 - s1);
|
|
118
|
+
const c1 = 1 - c2;
|
|
119
|
+
x = c1 * Math.exp(s1 * t) + c2 * Math.exp(s2 * t);
|
|
120
|
+
}
|
|
121
|
+
return 1 - x;
|
|
122
|
+
}
|
|
123
|
+
function resolveEasing(easing) {
|
|
124
|
+
if (easing === "hold") return "hold";
|
|
125
|
+
if (easing === "spring") return { type: "spring", ...DEFAULT_SPRING };
|
|
126
|
+
if (easing === "elastic" || easing === "ease-out-elastic") {
|
|
127
|
+
return { type: "elastic", ...DEFAULT_ELASTIC, mode: "out" };
|
|
128
|
+
}
|
|
129
|
+
if (easing === "ease-in-elastic") {
|
|
130
|
+
return { type: "elastic", ...DEFAULT_ELASTIC, mode: "in" };
|
|
131
|
+
}
|
|
132
|
+
if (easing === "ease-in-out-elastic") {
|
|
133
|
+
return { type: "elastic", ...DEFAULT_ELASTIC, mode: "in-out" };
|
|
134
|
+
}
|
|
135
|
+
if (typeof easing === "string") {
|
|
136
|
+
const preset = CUBIC_BEZIER_PRESETS[easing];
|
|
137
|
+
if (preset) return { type: "cubic-bezier", x1: preset[0], y1: preset[1], x2: preset[2], y2: preset[3] };
|
|
138
|
+
const parsed = parseCssEasing(easing);
|
|
139
|
+
return parsed ? resolveEasing(parsed) : { type: "cubic-bezier", x1: 0, y1: 0, x2: 1, y2: 1 };
|
|
140
|
+
}
|
|
141
|
+
if (easing && typeof easing === "object") {
|
|
142
|
+
if (easing.type === "spring") {
|
|
143
|
+
return {
|
|
144
|
+
type: "spring",
|
|
145
|
+
stiffness: finite(easing.stiffness, DEFAULT_SPRING.stiffness),
|
|
146
|
+
damping: finite(easing.damping, DEFAULT_SPRING.damping),
|
|
147
|
+
mass: finite(easing.mass, DEFAULT_SPRING.mass),
|
|
148
|
+
velocity: finite(easing.velocity, DEFAULT_SPRING.velocity)
|
|
149
|
+
};
|
|
150
|
+
}
|
|
151
|
+
if (easing.type === "elastic") {
|
|
152
|
+
return {
|
|
153
|
+
type: "elastic",
|
|
154
|
+
amplitude: finite(easing.amplitude, DEFAULT_ELASTIC.amplitude),
|
|
155
|
+
period: finite(easing.period, DEFAULT_ELASTIC.period),
|
|
156
|
+
mode: easing.mode === "in" || easing.mode === "in-out" ? easing.mode : "out"
|
|
157
|
+
};
|
|
158
|
+
}
|
|
159
|
+
if (easing.type === "cubic-bezier") {
|
|
160
|
+
return {
|
|
161
|
+
type: "cubic-bezier",
|
|
162
|
+
x1: clamp(finite(easing.x1, 0), 0, 1),
|
|
163
|
+
y1: finite(easing.y1, 0),
|
|
164
|
+
x2: clamp(finite(easing.x2, 1), 0, 1),
|
|
165
|
+
y2: finite(easing.y2, 1)
|
|
166
|
+
};
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
return { type: "cubic-bezier", x1: 0, y1: 0, x2: 1, y2: 1 };
|
|
170
|
+
}
|
|
171
|
+
function evaluateEasing(easing, u, durationMs = 1e3) {
|
|
172
|
+
if (!(u > 0)) return 0;
|
|
173
|
+
if (u >= 1) return 1;
|
|
174
|
+
const resolved = resolveEasing(easing);
|
|
175
|
+
if (resolved === "hold") return 0;
|
|
176
|
+
if (resolved.type === "spring") return springAt(resolved, u * Math.max(0, durationMs) / 1e3);
|
|
177
|
+
if (resolved.type === "elastic") return elasticAt(resolved, u);
|
|
178
|
+
const { x1, y1, x2, y2 } = resolved;
|
|
179
|
+
if (x1 === y1 && x2 === y2) return u;
|
|
180
|
+
return cubicBezierAt(x1, y1, x2, y2, u);
|
|
181
|
+
}
|
|
182
|
+
function easingFromInfluence(outInfluence = 1 / 3, inInfluence = 1 / 3) {
|
|
183
|
+
return {
|
|
184
|
+
type: "cubic-bezier",
|
|
185
|
+
x1: clamp(outInfluence, 0.01, 1),
|
|
186
|
+
y1: 0,
|
|
187
|
+
x2: 1 - clamp(inInfluence, 0.01, 1),
|
|
188
|
+
y2: 1
|
|
189
|
+
};
|
|
190
|
+
}
|
|
191
|
+
var NUMBER = String.raw`\s*(-?(?:\d+\.?\d*|\.\d+)(?:e[-+]?\d+)?)\s*`;
|
|
192
|
+
var CUBIC_RE = new RegExp(`^cubic-bezier\\(${NUMBER},${NUMBER},${NUMBER},${NUMBER}\\)$`, "i");
|
|
193
|
+
function parseCssEasing(text) {
|
|
194
|
+
const value = text.trim().toLowerCase();
|
|
195
|
+
if (value.length > 200) return null;
|
|
196
|
+
if (ANIMATION_EASING_PRESETS.includes(value)) return value;
|
|
197
|
+
if (value === "step-end" || /^steps\(\s*1\s*(,\s*(end|jump-end)\s*)?\)$/.test(value)) return "hold";
|
|
198
|
+
const m = CUBIC_RE.exec(value);
|
|
199
|
+
if (!m) return null;
|
|
200
|
+
const [x1, y1, x2, y2] = m.slice(1).map(Number);
|
|
201
|
+
if (![x1, y1, x2, y2].every(Number.isFinite) || x1 < 0 || x1 > 1 || x2 < 0 || x2 > 1) return null;
|
|
202
|
+
return { type: "cubic-bezier", x1, y1, x2, y2 };
|
|
203
|
+
}
|
|
204
|
+
function isAnimationEasing(value) {
|
|
205
|
+
if (typeof value === "string") return parseCssEasing(value) !== null;
|
|
206
|
+
if (typeof value !== "object" || value === null) return false;
|
|
207
|
+
const e = value;
|
|
208
|
+
if (e.type === "spring") return true;
|
|
209
|
+
if (e.type === "elastic") return true;
|
|
210
|
+
return e.type === "cubic-bezier" && [e.x1, e.y1, e.x2, e.y2].every((v) => typeof v === "number" && Number.isFinite(v));
|
|
211
|
+
}
|
|
212
|
+
var round = (v, digits = 4) => {
|
|
213
|
+
const p = 10 ** digits;
|
|
214
|
+
return Math.round(v * p) / p;
|
|
215
|
+
};
|
|
216
|
+
function easingToCss(easing, durationMs = 1e3, samples = 24) {
|
|
217
|
+
const resolved = resolveEasing(easing);
|
|
218
|
+
if (resolved === "hold") return "steps(1, end)";
|
|
219
|
+
if (resolved.type === "spring") {
|
|
220
|
+
const n = Math.max(2, Math.floor(samples));
|
|
221
|
+
const points = [];
|
|
222
|
+
for (let i = 0; i <= n; i++) points.push(String(round(i === n ? 1 : springAt(resolved, i / n * durationMs / 1e3))));
|
|
223
|
+
return `linear(${points.join(", ")})`;
|
|
224
|
+
}
|
|
225
|
+
if (resolved.type === "elastic") {
|
|
226
|
+
const n = Math.max(2, Math.floor(samples));
|
|
227
|
+
const points = [];
|
|
228
|
+
for (let i = 0; i <= n; i++) points.push(String(round(i === n ? 1 : elasticAt(resolved, i / n))));
|
|
229
|
+
return `linear(${points.join(", ")})`;
|
|
230
|
+
}
|
|
231
|
+
const { x1, y1, x2, y2 } = resolved;
|
|
232
|
+
for (const [name, p] of Object.entries(CUBIC_BEZIER_PRESETS)) {
|
|
233
|
+
if (["linear", "ease", "ease-in", "ease-out", "ease-in-out"].includes(name) && p[0] === x1 && p[1] === y1 && p[2] === x2 && p[3] === y2) {
|
|
234
|
+
return name;
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
return `cubic-bezier(${round(x1)}, ${round(y1)}, ${round(x2)}, ${round(y2)})`;
|
|
238
|
+
}
|
|
239
|
+
function easingLabel(easing) {
|
|
240
|
+
if (easing === void 0 || easing === null) return ANIMATION_EASING_LABELS.linear;
|
|
241
|
+
if (typeof easing === "string") return ANIMATION_EASING_LABELS[easing] ?? easing;
|
|
242
|
+
if (easing.type === "spring") return "Spring";
|
|
243
|
+
if (easing.type === "elastic") return "Elastic";
|
|
244
|
+
return "Custom";
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
export {
|
|
248
|
+
ANIMATION_EASING_PRESETS,
|
|
249
|
+
ANIMATION_EASING_LABELS,
|
|
250
|
+
CUBIC_BEZIER_PRESETS,
|
|
251
|
+
elasticAt,
|
|
252
|
+
cubicBezierAt,
|
|
253
|
+
springAt,
|
|
254
|
+
resolveEasing,
|
|
255
|
+
evaluateEasing,
|
|
256
|
+
easingFromInfluence,
|
|
257
|
+
parseCssEasing,
|
|
258
|
+
isAnimationEasing,
|
|
259
|
+
easingToCss,
|
|
260
|
+
easingLabel
|
|
261
|
+
};
|
|
262
|
+
//# sourceMappingURL=chunk-UB2OY7FD.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/animation/easing.ts"],"sourcesContent":["// Portions ported from filmcraft-main/crates/project/src/keyframe.rs (MIT OR Apache-2.0, © ArtCraft Team and contributors). See THIRD_PARTY_NOTICES.md.\n\n/**\n * Keyframe easing: the curve a segment follows from one keyframe to the next.\n *\n * - `hold` keeps the first keyframe's value until the next one (a step).\n * - `linear` and the CSS presets (`ease`, `ease-in`, `ease-out`, `ease-in-out`) are\n * CSS-compatible `cubic-bezier()` curves; `{ type: 'cubic-bezier', x1, y1, x2, y2 }` is any\n * such curve (x1 / y1 is the leaving keyframe's out handle, x2 / y2 the next one's in handle).\n * - `spring` is a damped spring settling on the next value (it may overshoot).\n */\n\n/** Named easing presets. */\nexport type AnimationEasingPreset =\n\t| 'linear'\n\t| 'hold'\n\t| 'ease'\n\t| 'ease-in'\n\t| 'ease-out'\n\t| 'ease-in-out'\n\t| 'ease-in-back'\n\t| 'ease-out-back'\n\t| 'ease-out-elastic'\n\t| 'ease-in-elastic'\n\t| 'ease-in-out-elastic'\n\t| 'elastic'\n\t| 'spring';\n\nexport interface CubicBezierEasing {\n\ttype: 'cubic-bezier';\n\tx1: number;\n\ty1: number;\n\tx2: number;\n\ty2: number;\n}\n\nexport interface SpringEasing {\n\ttype: 'spring';\n\t/** Spring stiffness (default 170). */\n\tstiffness?: number;\n\t/** Damping (default 26). */\n\tdamping?: number;\n\t/** Mass (default 1). */\n\tmass?: number;\n\t/** Initial velocity in units of the segment's value change per second (default 0). */\n\tvelocity?: number;\n}\n\nexport interface ElasticEasing {\n\ttype: 'elastic';\n\t/** Amplitude / overshoot factor (default 1). */\n\tamplitude?: number;\n\t/** Period of oscillation as a fraction of duration (default 0.3). */\n\tperiod?: number;\n\t/** Mode of elastic oscillation ('out' | 'in' | 'in-out', default 'out'). */\n\tmode?: 'out' | 'in' | 'in-out';\n}\n\nexport type AnimationEasing = AnimationEasingPreset | CubicBezierEasing | SpringEasing | ElasticEasing;\n\n/** Preset names, in picker order. */\nexport const ANIMATION_EASING_PRESETS: readonly AnimationEasingPreset[] = [\n\t'linear',\n\t'ease',\n\t'ease-in',\n\t'ease-out',\n\t'ease-in-out',\n\t'ease-in-back',\n\t'ease-out-back',\n\t'ease-out-elastic',\n\t'ease-in-elastic',\n\t'ease-in-out-elastic',\n\t'elastic',\n\t'spring',\n\t'hold'\n];\n\n/** Picker labels for the presets. */\nexport const ANIMATION_EASING_LABELS: Readonly<Record<AnimationEasingPreset, string>> = {\n\tlinear: 'Linear',\n\thold: 'Hold',\n\tease: 'Ease',\n\t'ease-in': 'Ease in',\n\t'ease-out': 'Ease out',\n\t'ease-in-out': 'Ease in-out',\n\t'ease-in-back': 'Back in',\n\t'ease-out-back': 'Back out',\n\t'ease-out-elastic': 'Elastic out',\n\t'ease-in-elastic': 'Elastic in',\n\t'ease-in-out-elastic': 'Elastic in-out',\n\telastic: 'Elastic',\n\tspring: 'Spring'\n};\n\n/** The CSS control points of the bezier presets (CSS Easing Functions Level 1 values for the CSS keywords). */\nexport const CUBIC_BEZIER_PRESETS: Readonly<Record<string, readonly [number, number, number, number]>> = {\n\tlinear: [0, 0, 1, 1],\n\tease: [0.25, 0.1, 0.25, 1],\n\t'ease-in': [0.42, 0, 1, 1],\n\t'ease-out': [0, 0, 0.58, 1],\n\t'ease-in-out': [0.42, 0, 0.58, 1],\n\t'ease-in-back': [0.36, 0, 0.66, -0.56],\n\t'ease-out-back': [0.34, 1.56, 0.64, 1]\n};\n\nconst DEFAULT_SPRING = { stiffness: 170, damping: 26, mass: 1, velocity: 0 };\nconst DEFAULT_ELASTIC = { amplitude: 1, period: 0.3, mode: 'out' as const };\n\nconst clamp = (v: number, lo: number, hi: number) => Math.min(hi, Math.max(lo, v));\nconst finite = (v: unknown, fallback: number) => (typeof v === 'number' && Number.isFinite(v) ? v : fallback);\n\n/**\n * Normalised position for a parametric elastic oscillation curve (as used in Rive and Penner curves).\n * Amplitude controls the overshoot intensity; period controls the wave frequency across normalized progress `t` (0–1).\n */\nexport function elasticAt(elastic: Omit<ElasticEasing, 'type'>, t: number): number {\n\tif (t <= 0) return 0;\n\tif (t >= 1) return 1;\n\n\tconst a = Math.max(1e-6, finite(elastic.amplitude, DEFAULT_ELASTIC.amplitude));\n\tconst p = Math.max(1e-6, finite(elastic.period, DEFAULT_ELASTIC.period));\n\tconst mode = elastic.mode ?? 'out';\n\n\tconst TAU = 2 * Math.PI;\n\n\tconst solveOut = (u: number, amp: number, per: number) => {\n\t\tconst s = amp < 1 ? per / 4 : (per / TAU) * Math.asin(1 / amp);\n\t\treturn amp * Math.pow(2, -10 * u) * Math.sin(((u - s) * TAU) / per) + 1;\n\t};\n\n\tconst solveIn = (u: number, amp: number, per: number) => {\n\t\tconst s = amp < 1 ? per / 4 : (per / TAU) * Math.asin(1 / amp);\n\t\tconst adjusted = u - 1;\n\t\treturn -(amp * Math.pow(2, 10 * adjusted) * Math.sin(((adjusted - s) * TAU) / per));\n\t};\n\n\tif (mode === 'in') {\n\t\treturn solveIn(t, a, p);\n\t}\n\tif (mode === 'in-out') {\n\t\tif (t < 0.5) {\n\t\t\treturn 0.5 * solveIn(t * 2, a, p);\n\t\t}\n\t\treturn 0.5 + 0.5 * solveOut((t - 0.5) * 2, a, p);\n\t}\n\treturn solveOut(t, a, p);\n}\n\n/**\n * Solves a CSS `cubic-bezier(x1, y1, x2, y2)` for y at progress x (Newton steps with a\n * bisection fallback). x1 / x2 are clamped to 0–1 as CSS requires.\n */\nexport function cubicBezierAt(x1: number, y1: number, x2: number, y2: number, x: number): number {\n\tif (x <= 0) return 0;\n\tif (x >= 1) return 1;\n\tx1 = clamp(x1, 0, 1);\n\tx2 = clamp(x2, 0, 1);\n\tconst bx = (s: number) => 3 * (1 - s) * (1 - s) * s * x1 + 3 * (1 - s) * s * s * x2 + s * s * s;\n\tconst by = (s: number) => 3 * (1 - s) * (1 - s) * s * y1 + 3 * (1 - s) * s * s * y2 + s * s * s;\n\tconst dbx = (s: number) => 3 * (1 - s) * (1 - s) * x1 + 6 * (1 - s) * s * (x2 - x1) + 3 * s * s * (1 - x2);\n\tlet s = x;\n\tfor (let i = 0; i < 8; i++) {\n\t\tconst d = dbx(s);\n\t\tif (Math.abs(d) < 1e-9) break;\n\t\tconst next = s - (bx(s) - x) / d;\n\t\tif (!(next >= 0 && next <= 1)) break;\n\t\ts = next;\n\t}\n\tif (Math.abs(bx(s) - x) > 1e-7) {\n\t\tlet lo = 0;\n\t\tlet hi = 1;\n\t\tfor (let i = 0; i < 60; i++) {\n\t\t\ts = (lo + hi) / 2;\n\t\t\tif (bx(s) < x) lo = s;\n\t\t\telse hi = s;\n\t\t}\n\t}\n\treturn by(s);\n}\n\n/**\n * Normalised position of a damped spring released from 0 towards 1, `seconds` after release.\n * Closed form for under-, critically and over-damped springs.\n */\nexport function springAt(spring: Omit<SpringEasing, 'type'>, seconds: number): number {\n\tconst stiffness = Math.max(1e-6, finite(spring.stiffness, DEFAULT_SPRING.stiffness));\n\tconst damping = Math.max(0, finite(spring.damping, DEFAULT_SPRING.damping));\n\tconst mass = Math.max(1e-6, finite(spring.mass, DEFAULT_SPRING.mass));\n\tconst v0 = -finite(spring.velocity, DEFAULT_SPRING.velocity);\n\tconst t = Math.max(0, seconds);\n\tconst w0 = Math.sqrt(stiffness / mass);\n\tconst zeta = damping / (2 * Math.sqrt(stiffness * mass));\n\t// x(t) is the displacement from the target (starts at 1); progress = 1 - x.\n\tlet x: number;\n\tif (zeta < 1 - 1e-6) {\n\t\tconst wd = w0 * Math.sqrt(1 - zeta * zeta);\n\t\tx = Math.exp(-zeta * w0 * t) * (Math.cos(wd * t) + ((zeta * w0 + v0) / wd) * Math.sin(wd * t));\n\t} else if (zeta <= 1 + 1e-6) {\n\t\tx = Math.exp(-w0 * t) * (1 + (w0 + v0) * t);\n\t} else {\n\t\tconst r = Math.sqrt(zeta * zeta - 1);\n\t\tconst s1 = -w0 * (zeta - r);\n\t\tconst s2 = -w0 * (zeta + r);\n\t\tconst c2 = (v0 - s1) / (s2 - s1);\n\t\tconst c1 = 1 - c2;\n\t\tx = c1 * Math.exp(s1 * t) + c2 * Math.exp(s2 * t);\n\t}\n\treturn 1 - x;\n}\n\n/** Resolves an easing to a cubic-bezier, spring, elastic or hold descriptor (unknown input → linear). */\nexport function resolveEasing(\n\teasing: AnimationEasing | string | undefined | null\n): CubicBezierEasing | Required<SpringEasing> | Required<ElasticEasing> | 'hold' {\n\tif (easing === 'hold') return 'hold';\n\tif (easing === 'spring') return { type: 'spring', ...DEFAULT_SPRING };\n\tif (easing === 'elastic' || easing === 'ease-out-elastic') {\n\t\treturn { type: 'elastic', ...DEFAULT_ELASTIC, mode: 'out' };\n\t}\n\tif (easing === 'ease-in-elastic') {\n\t\treturn { type: 'elastic', ...DEFAULT_ELASTIC, mode: 'in' };\n\t}\n\tif (easing === 'ease-in-out-elastic') {\n\t\treturn { type: 'elastic', ...DEFAULT_ELASTIC, mode: 'in-out' };\n\t}\n\tif (typeof easing === 'string') {\n\t\tconst preset = CUBIC_BEZIER_PRESETS[easing];\n\t\tif (preset) return { type: 'cubic-bezier', x1: preset[0], y1: preset[1], x2: preset[2], y2: preset[3] };\n\t\tconst parsed = parseCssEasing(easing);\n\t\treturn parsed ? resolveEasing(parsed) : { type: 'cubic-bezier', x1: 0, y1: 0, x2: 1, y2: 1 };\n\t}\n\tif (easing && typeof easing === 'object') {\n\t\tif (easing.type === 'spring') {\n\t\t\treturn {\n\t\t\t\ttype: 'spring',\n\t\t\t\tstiffness: finite(easing.stiffness, DEFAULT_SPRING.stiffness),\n\t\t\t\tdamping: finite(easing.damping, DEFAULT_SPRING.damping),\n\t\t\t\tmass: finite(easing.mass, DEFAULT_SPRING.mass),\n\t\t\t\tvelocity: finite(easing.velocity, DEFAULT_SPRING.velocity)\n\t\t\t};\n\t\t}\n\t\tif (easing.type === 'elastic') {\n\t\t\treturn {\n\t\t\t\ttype: 'elastic',\n\t\t\t\tamplitude: finite(easing.amplitude, DEFAULT_ELASTIC.amplitude),\n\t\t\t\tperiod: finite(easing.period, DEFAULT_ELASTIC.period),\n\t\t\t\tmode: easing.mode === 'in' || easing.mode === 'in-out' ? easing.mode : 'out'\n\t\t\t};\n\t\t}\n\t\tif (easing.type === 'cubic-bezier') {\n\t\t\treturn {\n\t\t\t\ttype: 'cubic-bezier',\n\t\t\t\tx1: clamp(finite(easing.x1, 0), 0, 1),\n\t\t\t\ty1: finite(easing.y1, 0),\n\t\t\t\tx2: clamp(finite(easing.x2, 1), 0, 1),\n\t\t\t\ty2: finite(easing.y2, 1)\n\t\t\t};\n\t\t}\n\t}\n\treturn { type: 'cubic-bezier', x1: 0, y1: 0, x2: 1, y2: 1 };\n}\n\n/**\n * Eased progress for linear progress `u` (0–1) through a segment lasting `durationMs`\n * (springs depend on real time; other curves ignore it). `hold` returns 0 until `u` reaches 1.\n */\nexport function evaluateEasing(easing: AnimationEasing | string | undefined | null, u: number, durationMs = 1000): number {\n\tif (!(u > 0)) return 0;\n\tif (u >= 1) return 1;\n\tconst resolved = resolveEasing(easing);\n\tif (resolved === 'hold') return 0;\n\tif (resolved.type === 'spring') return springAt(resolved, (u * Math.max(0, durationMs)) / 1000);\n\tif (resolved.type === 'elastic') return elasticAt(resolved, u);\n\tconst { x1, y1, x2, y2 } = resolved;\n\tif (x1 === y1 && x2 === y2) return u; // linear\n\treturn cubicBezierAt(x1, y1, x2, y2, u);\n}\n\n/**\n * The easing filmcraft (and Premiere) derive from temporal \"influence\" handles: flat handles of\n * the given influences (0.01–1, default 1/3) on the leaving and arriving keyframe.\n */\nexport function easingFromInfluence(outInfluence = 1 / 3, inInfluence = 1 / 3): CubicBezierEasing {\n\treturn {\n\t\ttype: 'cubic-bezier',\n\t\tx1: clamp(outInfluence, 0.01, 1),\n\t\ty1: 0,\n\t\tx2: 1 - clamp(inInfluence, 0.01, 1),\n\t\ty2: 1\n\t};\n}\n\nconst NUMBER = String.raw`\\s*(-?(?:\\d+\\.?\\d*|\\.\\d+)(?:e[-+]?\\d+)?)\\s*`;\nconst CUBIC_RE = new RegExp(`^cubic-bezier\\\\(${NUMBER},${NUMBER},${NUMBER},${NUMBER}\\\\)$`, 'i');\n\n/**\n * Parses a CSS easing (`linear`, `ease…`, `cubic-bezier(…)`, `steps(1, end)` / `step-end` →\n * hold) or a preset name. Returns `null` for anything else.\n */\nexport function parseCssEasing(text: string): AnimationEasing | null {\n\tconst value = text.trim().toLowerCase();\n\tif (value.length > 200) return null;\n\tif ((ANIMATION_EASING_PRESETS as readonly string[]).includes(value)) return value as AnimationEasingPreset;\n\tif (value === 'step-end' || /^steps\\(\\s*1\\s*(,\\s*(end|jump-end)\\s*)?\\)$/.test(value)) return 'hold';\n\tconst m = CUBIC_RE.exec(value);\n\tif (!m) return null;\n\tconst [x1, y1, x2, y2] = m.slice(1).map(Number);\n\tif (![x1, y1, x2, y2].every(Number.isFinite) || x1 < 0 || x1 > 1 || x2 < 0 || x2 > 1) return null;\n\treturn { type: 'cubic-bezier', x1, y1, x2, y2 };\n}\n\n/** Whether a value is a usable easing (preset name, CSS easing string or descriptor). */\nexport function isAnimationEasing(value: unknown): value is AnimationEasing {\n\tif (typeof value === 'string') return parseCssEasing(value) !== null;\n\tif (typeof value !== 'object' || value === null) return false;\n\tconst e = value as Record<string, unknown>;\n\tif (e.type === 'spring') return true;\n\tif (e.type === 'elastic') return true;\n\treturn e.type === 'cubic-bezier' && [e.x1, e.y1, e.x2, e.y2].every((v) => typeof v === 'number' && Number.isFinite(v));\n}\n\nconst round = (v: number, digits = 4) => {\n\tconst p = 10 ** digits;\n\treturn Math.round(v * p) / p;\n};\n\n/**\n * The CSS `animation-timing-function` for an easing: a keyword or `cubic-bezier()`,\n * `steps(1, end)` for hold, and a sampled `linear(…)` for springs over `durationMs`.\n */\nexport function easingToCss(easing: AnimationEasing | string | undefined | null, durationMs = 1000, samples = 24): string {\n\tconst resolved = resolveEasing(easing);\n\tif (resolved === 'hold') return 'steps(1, end)';\n\tif (resolved.type === 'spring') {\n\t\tconst n = Math.max(2, Math.floor(samples));\n\t\tconst points: string[] = [];\n\t\tfor (let i = 0; i <= n; i++) points.push(String(round(i === n ? 1 : springAt(resolved, ((i / n) * durationMs) / 1000))));\n\t\treturn `linear(${points.join(', ')})`;\n\t}\n\tif (resolved.type === 'elastic') {\n\t\tconst n = Math.max(2, Math.floor(samples));\n\t\tconst points: string[] = [];\n\t\tfor (let i = 0; i <= n; i++) points.push(String(round(i === n ? 1 : elasticAt(resolved, i / n))));\n\t\treturn `linear(${points.join(', ')})`;\n\t}\n\tconst { x1, y1, x2, y2 } = resolved;\n\tfor (const [name, p] of Object.entries(CUBIC_BEZIER_PRESETS)) {\n\t\tif (['linear', 'ease', 'ease-in', 'ease-out', 'ease-in-out'].includes(name) && p[0] === x1 && p[1] === y1 && p[2] === x2 && p[3] === y2) {\n\t\t\treturn name;\n\t\t}\n\t}\n\treturn `cubic-bezier(${round(x1)}, ${round(y1)}, ${round(x2)}, ${round(y2)})`;\n}\n\n/** Short label for an easing (a preset's label, or `Custom` / `Spring` / `Elastic`). */\nexport function easingLabel(easing: AnimationEasing | undefined | null): string {\n\tif (easing === undefined || easing === null) return ANIMATION_EASING_LABELS.linear;\n\tif (typeof easing === 'string') return ANIMATION_EASING_LABELS[easing as AnimationEasingPreset] ?? easing;\n\tif (easing.type === 'spring') return 'Spring';\n\tif (easing.type === 'elastic') return 'Elastic';\n\treturn 'Custom';\n}\n"],"mappings":";AA6DO,IAAM,2BAA6D;AAAA,EACzE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACD;AAGO,IAAM,0BAA2E;AAAA,EACvF,QAAQ;AAAA,EACR,MAAM;AAAA,EACN,MAAM;AAAA,EACN,WAAW;AAAA,EACX,YAAY;AAAA,EACZ,eAAe;AAAA,EACf,gBAAgB;AAAA,EAChB,iBAAiB;AAAA,EACjB,oBAAoB;AAAA,EACpB,mBAAmB;AAAA,EACnB,uBAAuB;AAAA,EACvB,SAAS;AAAA,EACT,QAAQ;AACT;AAGO,IAAM,uBAA4F;AAAA,EACxG,QAAQ,CAAC,GAAG,GAAG,GAAG,CAAC;AAAA,EACnB,MAAM,CA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