@algorisys/tinyfly 0.74.0 → 0.75.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 +9 -6
- package/lib/addons/adapters.js +236 -121
- package/lib/addons/characters.js +323 -144
- package/lib/addons/{dom-adapter-ChrbtkLC.js → dom-adapter-CrNwoomd.js} +52 -52
- package/lib/addons/gsap-compat.js +1 -1
- package/lib/addons/sketch-CB6VNfnR.js +128 -0
- package/lib/browser/tinyfly.iife.js +4 -4
- package/lib/browser/tinyfly.js +3117 -2819
- package/lib/browser/tinyfly.umd.js +4 -4
- package/lib/cli/tools.js +2 -0
- package/lib/embed/tinyfly-embed.iife.js +4 -4
- package/lib/embed/tinyfly-embed.js +70 -70
- package/lib/headless/headless.js +300 -1
- package/lib/player/tinyfly-player.es.js +73 -73
- package/lib/player/tinyfly-player.iife.js +2 -2
- package/lib/player/tinyfly-player.umd.js +2 -2
- package/lib/types/adapters/canvas/canvas-adapter.d.ts +18 -0
- package/lib/types/adapters/canvas/index.d.ts +3 -0
- package/lib/types/adapters/canvas/outline.d.ts +26 -0
- package/lib/types/adapters/canvas/polyline.d.ts +12 -0
- package/lib/types/adapters/canvas/sketch.d.ts +54 -0
- package/lib/types/characters/erase.d.ts +31 -0
- package/lib/types/characters/hand.d.ts +81 -0
- package/lib/types/characters/index.d.ts +7 -1
- package/lib/types/characters/polyline.d.ts +12 -0
- package/lib/types/characters/sketch.d.ts +54 -0
- package/lib/types/characters/stick-figure.d.ts +42 -5
- package/package.json +1 -1
|
@@ -189,13 +189,13 @@ function be(i) {
|
|
|
189
189
|
const [t, e, s, n] = i, r = 3 * t, a = 3 * (s - t) - r, o = 1 - r - a, c = 3 * e, h = 3 * (n - e) - c, u = 1 - c - h, l = (p) => ((o * p + a) * p + r) * p, d = (p) => ((u * p + h) * p + c) * p, f = (p) => (3 * o * p + 2 * a) * p + r, b = (p) => {
|
|
190
190
|
let g = p;
|
|
191
191
|
for (let A = 0; A < 8; A++) {
|
|
192
|
-
const
|
|
193
|
-
if (Math.abs(
|
|
192
|
+
const _ = l(g) - p;
|
|
193
|
+
if (Math.abs(_) < 1e-7)
|
|
194
194
|
return g;
|
|
195
195
|
const m = f(g);
|
|
196
196
|
if (Math.abs(m) < 1e-7)
|
|
197
197
|
break;
|
|
198
|
-
g -=
|
|
198
|
+
g -= _ / m;
|
|
199
199
|
}
|
|
200
200
|
let y = 0, T = 1;
|
|
201
201
|
for (g = p; y < T; ) {
|
|
@@ -237,7 +237,7 @@ const Se = (i) => {
|
|
|
237
237
|
const s = i - 2.625 / 2.75;
|
|
238
238
|
return 7.5625 * s * s + 0.984375;
|
|
239
239
|
};
|
|
240
|
-
function
|
|
240
|
+
function _e(i = 1.70158) {
|
|
241
241
|
return (t) => {
|
|
242
242
|
if (t <= 0) return 0;
|
|
243
243
|
if (t >= 1) return 1;
|
|
@@ -245,7 +245,7 @@ function Me(i = 1.70158) {
|
|
|
245
245
|
return e * e * ((i + 1) * e + i) + 1;
|
|
246
246
|
};
|
|
247
247
|
}
|
|
248
|
-
function
|
|
248
|
+
function Me(i, t = "end") {
|
|
249
249
|
const e = Math.max(1, Math.floor(i));
|
|
250
250
|
return (s) => {
|
|
251
251
|
if (s >= 1) return 1;
|
|
@@ -263,22 +263,22 @@ function ke(i, t = "end") {
|
|
|
263
263
|
}
|
|
264
264
|
};
|
|
265
265
|
}
|
|
266
|
-
function
|
|
266
|
+
function ke(i) {
|
|
267
267
|
switch (i.type) {
|
|
268
268
|
case "steps":
|
|
269
|
-
return
|
|
269
|
+
return Me(i.count, i.position);
|
|
270
270
|
case "elastic":
|
|
271
271
|
return st(Ae(i.amplitude, i.period), i.mode);
|
|
272
272
|
case "bounce":
|
|
273
273
|
return st(Se, i.mode);
|
|
274
274
|
case "back":
|
|
275
|
-
return st(
|
|
275
|
+
return st(_e(i.overshoot), i.mode);
|
|
276
276
|
}
|
|
277
277
|
}
|
|
278
278
|
function we(i) {
|
|
279
|
-
return i === void 0 ? ft : ee(i) ? be(i.points) : ie(i) ?
|
|
279
|
+
return i === void 0 ? ft : ee(i) ? be(i.points) : ie(i) ? ke(i) : Te[i] ?? ft;
|
|
280
280
|
}
|
|
281
|
-
const
|
|
281
|
+
const _t = 32, Pe = 256, Y = /* @__PURE__ */ new Map(), xe = /[MmLlHhVvCcSsQqTtAaZz]/, ve = /^[-+]?(?:\d+\.?\d*|\.\d+)(?:[eE][-+]?\d+)?/, Ce = {
|
|
282
282
|
M: 2,
|
|
283
283
|
L: 2,
|
|
284
284
|
H: 1,
|
|
@@ -324,22 +324,22 @@ function Re(i, t, e, s, n, r, a, o, c) {
|
|
|
324
324
|
const w = Math.sqrt(T);
|
|
325
325
|
h *= w, u *= w;
|
|
326
326
|
}
|
|
327
|
-
const A = r === a ? -1 : 1,
|
|
328
|
-
const it = w * I + v *
|
|
329
|
-
return w *
|
|
327
|
+
const A = r === a ? -1 : 1, _ = h * h * u * u - h * h * y * y - u * u * g * g, m = h * h * y * y + u * u * g * g, M = A * Math.sqrt(Math.max(0, _ / m)), S = M * h * y / u, R = -M * u * g / h, Q = d * S - f * R + (i + o) / 2, k = f * S + d * R + (t + c) / 2, C = (w, v, I, $) => {
|
|
328
|
+
const it = w * I + v * $, z = Math.sqrt((w * w + v * v) * (I * I + $ * $)), q = Math.acos(Math.max(-1, Math.min(1, it / z)));
|
|
329
|
+
return w * $ - v * I < 0 ? -q : q;
|
|
330
330
|
}, P = C(1, 0, (g - S) / h, (y - R) / u);
|
|
331
331
|
let x = C((g - S) / h, (y - R) / u, (-g - S) / h, (-y - R) / u);
|
|
332
332
|
!a && x > 0 && (x -= 2 * Math.PI), a && x < 0 && (x += 2 * Math.PI);
|
|
333
333
|
const E = Math.max(1, Math.ceil(Math.abs(x) / (Math.PI / 2))), et = x / E, j = 4 / 3 * Math.tan(et / 4), yt = (w) => {
|
|
334
334
|
const v = h * Math.cos(w), I = u * Math.sin(w);
|
|
335
|
-
return [d * v - f * I + Q, f * v + d * I +
|
|
335
|
+
return [d * v - f * I + Q, f * v + d * I + k];
|
|
336
336
|
}, Tt = (w) => {
|
|
337
337
|
const v = -h * Math.sin(w), I = u * Math.cos(w);
|
|
338
338
|
return [d * v - f * I, f * v + d * I];
|
|
339
339
|
}, bt = [];
|
|
340
340
|
for (let w = 0; w < E; w++) {
|
|
341
|
-
const v = P + w * et, I = v + et, [
|
|
342
|
-
bt.push([
|
|
341
|
+
const v = P + w * et, I = v + et, [$, it] = yt(v), [z, q] = w === E - 1 ? [o, c] : yt(I), [Zt, Kt] = Tt(v), [Jt, te] = Tt(I);
|
|
342
|
+
bt.push([$ + j * Zt, it + j * Kt, z - j * Jt, q - j * te, z, q]);
|
|
343
343
|
}
|
|
344
344
|
return bt;
|
|
345
345
|
}
|
|
@@ -347,7 +347,7 @@ function B(i, t, e, s, n) {
|
|
|
347
347
|
const r = 1 - n;
|
|
348
348
|
return r * r * r * i + 3 * r * r * n * t + 3 * r * n * n * e + n * n * n * s;
|
|
349
349
|
}
|
|
350
|
-
function
|
|
350
|
+
function Mt(i, t, e, s, n) {
|
|
351
351
|
const r = 1 - n;
|
|
352
352
|
return 3 * r * r * (t - i) + 6 * r * n * (e - t) + 3 * n * n * (s - e);
|
|
353
353
|
}
|
|
@@ -366,8 +366,8 @@ function N(i, t, e, s) {
|
|
|
366
366
|
function Z(i, t, e) {
|
|
367
367
|
const [s, n, r, a, o, c] = e, h = [0];
|
|
368
368
|
let u = i, l = t, d = 0;
|
|
369
|
-
for (let f = 1; f <=
|
|
370
|
-
const b = f /
|
|
369
|
+
for (let f = 1; f <= _t; f++) {
|
|
370
|
+
const b = f / _t, p = B(i, s, r, o, b), g = B(t, n, a, c, b);
|
|
371
371
|
d += Math.hypot(p - u, g - l), h.push(d), u = p, l = g;
|
|
372
372
|
}
|
|
373
373
|
return {
|
|
@@ -396,55 +396,55 @@ function J(i) {
|
|
|
396
396
|
(s !== r || n !== a) && l(N(s, n, r, a)), h >= 0 && u.add(h), s = r, n = a, o = c = null;
|
|
397
397
|
continue;
|
|
398
398
|
}
|
|
399
|
-
for (let
|
|
400
|
-
const m = g.slice(
|
|
399
|
+
for (let _ = 0; _ + A <= g.length; _ += A) {
|
|
400
|
+
const m = g.slice(_, _ + A), M = T ? s : 0, S = T ? n : 0;
|
|
401
401
|
let R = null, Q = null;
|
|
402
402
|
switch (y) {
|
|
403
403
|
case "M":
|
|
404
|
-
|
|
404
|
+
_ === 0 ? (s = m[0] + M, n = m[1] + S, r = s, a = n, (h < 0 || e[e.length - 1]?.subpath === h) && h++) : (l(N(s, n, m[0] + M, m[1] + S)), s = m[0] + M, n = m[1] + S);
|
|
405
405
|
break;
|
|
406
406
|
case "L":
|
|
407
|
-
l(N(s, n, m[0] +
|
|
407
|
+
l(N(s, n, m[0] + M, m[1] + S)), s = m[0] + M, n = m[1] + S;
|
|
408
408
|
break;
|
|
409
409
|
case "H":
|
|
410
|
-
l(N(s, n, m[0] +
|
|
410
|
+
l(N(s, n, m[0] + M, n)), s = m[0] + M;
|
|
411
411
|
break;
|
|
412
412
|
case "V":
|
|
413
413
|
l(N(s, n, s, m[0] + S)), n = m[0] + S;
|
|
414
414
|
break;
|
|
415
415
|
case "C": {
|
|
416
|
-
const
|
|
417
|
-
l(Z(s, n,
|
|
416
|
+
const k = [m[0] + M, m[1] + S, m[2] + M, m[3] + S, m[4] + M, m[5] + S];
|
|
417
|
+
l(Z(s, n, k)), R = [k[2], k[3]], s = k[4], n = k[5];
|
|
418
418
|
break;
|
|
419
419
|
}
|
|
420
420
|
case "S": {
|
|
421
|
-
const [
|
|
421
|
+
const [k, C] = o ? [2 * s - o[0], 2 * n - o[1]] : [s, n], P = [k, C, m[0] + M, m[1] + S, m[2] + M, m[3] + S];
|
|
422
422
|
l(Z(s, n, P)), R = [P[2], P[3]], s = P[4], n = P[5];
|
|
423
423
|
break;
|
|
424
424
|
}
|
|
425
425
|
case "Q":
|
|
426
426
|
case "T": {
|
|
427
|
-
let
|
|
428
|
-
y === "Q" ? (
|
|
429
|
-
const P = y === "Q" ? m[2] +
|
|
427
|
+
let k = s, C = n;
|
|
428
|
+
y === "Q" ? (k = m[0] + M, C = m[1] + S) : c && (k = 2 * s - c[0], C = 2 * n - c[1]);
|
|
429
|
+
const P = y === "Q" ? m[2] + M : m[0] + M, x = y === "Q" ? m[3] + S : m[1] + S;
|
|
430
430
|
l(
|
|
431
431
|
Z(s, n, [
|
|
432
|
-
s + 2 / 3 * (
|
|
432
|
+
s + 2 / 3 * (k - s),
|
|
433
433
|
n + 2 / 3 * (C - n),
|
|
434
|
-
P + 2 / 3 * (
|
|
434
|
+
P + 2 / 3 * (k - P),
|
|
435
435
|
x + 2 / 3 * (C - x),
|
|
436
436
|
P,
|
|
437
437
|
x
|
|
438
438
|
])
|
|
439
|
-
), Q = [
|
|
439
|
+
), Q = [k, C], s = P, n = x;
|
|
440
440
|
break;
|
|
441
441
|
}
|
|
442
442
|
case "A": {
|
|
443
|
-
const
|
|
443
|
+
const k = m[5] + M, C = m[6] + S;
|
|
444
444
|
let P = s, x = n;
|
|
445
|
-
for (const E of Re(s, n, m[0], m[1], m[2], m[3], m[4],
|
|
445
|
+
for (const E of Re(s, n, m[0], m[1], m[2], m[3], m[4], k, C))
|
|
446
446
|
l(Z(P, x, E)), P = E[4], x = E[5];
|
|
447
|
-
s =
|
|
447
|
+
s = k, n = C;
|
|
448
448
|
break;
|
|
449
449
|
}
|
|
450
450
|
}
|
|
@@ -456,7 +456,7 @@ function J(i) {
|
|
|
456
456
|
const g = e[p].subpath;
|
|
457
457
|
let y = p, T = 0;
|
|
458
458
|
for (; y < e.length && e[y].subpath === g; ) T += e[y++].length;
|
|
459
|
-
const A = e[p],
|
|
459
|
+
const A = e[p], _ = e[y - 1], m = u.has(g) || Math.abs(_.endX - A.startX) < 1e-9 && Math.abs(_.endY - A.startY) < 1e-9;
|
|
460
460
|
f.push({ start: p, end: y, length: T, closed: m }), p = y;
|
|
461
461
|
}
|
|
462
462
|
const b = { segments: e, totalLength: d, subpaths: f };
|
|
@@ -484,7 +484,7 @@ function Be(i, t) {
|
|
|
484
484
|
};
|
|
485
485
|
}
|
|
486
486
|
const [e, s, n, r, a, o] = i.points, c = De(i, t);
|
|
487
|
-
let h =
|
|
487
|
+
let h = Mt(i.startX, e, n, a, c), u = Mt(i.startY, s, r, o, c);
|
|
488
488
|
if (Math.hypot(h, u) < 1e-9) {
|
|
489
489
|
const l = c < 0.5 ? Math.min(1, c + 1e-3) : Math.max(0, c - 1e-3), d = B(i.startX, e, n, a, l), f = B(i.startY, s, r, o, l), b = B(i.startX, e, n, a, c), p = B(i.startY, s, r, o, c);
|
|
490
490
|
h = c < 0.5 ? d - b : b - d, u = c < 0.5 ? f - p : p - f;
|
|
@@ -510,9 +510,9 @@ function Ee(i, t) {
|
|
|
510
510
|
const { segments: e, totalLength: s } = J(i);
|
|
511
511
|
return jt(e, Math.max(0, Math.min(1, t)) * s);
|
|
512
512
|
}
|
|
513
|
-
const Le = 24,
|
|
513
|
+
const Le = 24, Oe = 320, $e = 2.5, V = 72, Fe = 0.2, Xe = 128, K = /* @__PURE__ */ new Map();
|
|
514
514
|
let nt = 0, L;
|
|
515
|
-
const
|
|
515
|
+
const kt = (i) => Math.round(i * 100) / 100;
|
|
516
516
|
function wt(i, t) {
|
|
517
517
|
const { segments: e, subpaths: s, totalLength: n } = J(i);
|
|
518
518
|
if (e.length === 0) return [];
|
|
@@ -573,7 +573,7 @@ function Ne(i, t, e) {
|
|
|
573
573
|
function Ve(i, t, e) {
|
|
574
574
|
const s = i.closed && t.closed, n = qe(i, t, e.shapeIndex), r = Math.max(
|
|
575
575
|
Le,
|
|
576
|
-
Math.min(
|
|
576
|
+
Math.min(Oe, Math.ceil(Math.max(i.length, t.length) / $e))
|
|
577
577
|
), a = /* @__PURE__ */ new Set(), o = (l) => a.add(Math.round(l * 1e7) / 1e7);
|
|
578
578
|
for (let l = 0; l <= r; l++) o(l / r);
|
|
579
579
|
for (const l of Pt(i)) o(l);
|
|
@@ -635,7 +635,7 @@ function He(i, t, e, s = {}) {
|
|
|
635
635
|
let a = "";
|
|
636
636
|
for (const o of r.pairs) {
|
|
637
637
|
for (let c = 0; c < o.from.length; c += 2) {
|
|
638
|
-
const h =
|
|
638
|
+
const h = kt(o.from[c] + (o.to[c] - o.from[c]) * n), u = kt(o.from[c + 1] + (o.to[c + 1] - o.from[c + 1]) * n);
|
|
639
639
|
a += `${c === 0 ? a ? " M" : "M" : " L"}${h} ${u}`;
|
|
640
640
|
}
|
|
641
641
|
o.closed && (a += " Z");
|
|
@@ -699,7 +699,7 @@ function ti(i) {
|
|
|
699
699
|
keyframes: t
|
|
700
700
|
};
|
|
701
701
|
}
|
|
702
|
-
function
|
|
702
|
+
function O(i) {
|
|
703
703
|
return i.targets && i.targets.length > 0 ? i.targets : [i.target];
|
|
704
704
|
}
|
|
705
705
|
function X(i, t, e, s) {
|
|
@@ -710,7 +710,7 @@ class ct {
|
|
|
710
710
|
track;
|
|
711
711
|
targets;
|
|
712
712
|
constructor(t) {
|
|
713
|
-
this.track = t, this.targets =
|
|
713
|
+
this.track = t, this.targets = O(t);
|
|
714
714
|
}
|
|
715
715
|
/**
|
|
716
716
|
* Get the interpolated value at a specific time.
|
|
@@ -785,7 +785,7 @@ class ei {
|
|
|
785
785
|
targets;
|
|
786
786
|
sampler;
|
|
787
787
|
constructor(t) {
|
|
788
|
-
this.track = t, this.targets =
|
|
788
|
+
this.track = t, this.targets = O(t), this.sampler = new ae(t.spring);
|
|
789
789
|
}
|
|
790
790
|
getValueAtTime(t) {
|
|
791
791
|
return this.sampler.valueAt(t - X(0, this.targets.length, this.track.delay, this.track.stagger));
|
|
@@ -812,7 +812,7 @@ class ii {
|
|
|
812
812
|
targets;
|
|
813
813
|
duration;
|
|
814
814
|
constructor(t) {
|
|
815
|
-
this.track = t, this.targets =
|
|
815
|
+
this.track = t, this.targets = O(t), this.duration = Wt(t.inertia);
|
|
816
816
|
}
|
|
817
817
|
getValueAtTime(t) {
|
|
818
818
|
return St(this.track.inertia, t - X(0, this.targets.length, this.track.delay, this.track.stagger));
|
|
@@ -870,9 +870,9 @@ function oi(i, t, e = 0) {
|
|
|
870
870
|
const h = Math.max(0, Math.min(0.999, i.revealDelay ?? 0)), u = Math.max(0, (r - h) / (1 - h)), l = Math.floor(u * o.length), d = i.tweenLength === !1 ? o.length : Math.round(a.length + (o.length - a.length) * r), f = ri(i.chars), b = i.refreshRate ?? ni, p = b > 0 ? Math.floor(e * b / 1e3) : 0, g = i.seed ?? 1;
|
|
871
871
|
let y = "";
|
|
872
872
|
for (let T = 0; T < d; T++) {
|
|
873
|
-
const A = c ? T >= d - l : T < l,
|
|
874
|
-
A &&
|
|
875
|
-
` ? y +=
|
|
873
|
+
const A = c ? T >= d - l : T < l, _ = c ? o[o.length - (d - T)] : o[T];
|
|
874
|
+
A && _ !== void 0 || _ === " " || _ === `
|
|
875
|
+
` ? y += _ : y += f[ai(g, T, p) % f.length];
|
|
876
876
|
}
|
|
877
877
|
return y;
|
|
878
878
|
}
|
|
@@ -1092,7 +1092,7 @@ class ci {
|
|
|
1092
1092
|
const t = /* @__PURE__ */ new Set();
|
|
1093
1093
|
this._sharedWrites = !1;
|
|
1094
1094
|
t: for (const e of this._tracks)
|
|
1095
|
-
for (const s of
|
|
1095
|
+
for (const s of O(e)) {
|
|
1096
1096
|
const n = `${s}\0${e.property}`;
|
|
1097
1097
|
if (t.has(n)) {
|
|
1098
1098
|
this._sharedWrites = !0;
|
|
@@ -1203,7 +1203,7 @@ class ci {
|
|
|
1203
1203
|
for (let r = 0; r < e; r++) {
|
|
1204
1204
|
const a = this._tracks[r];
|
|
1205
1205
|
if (a.property !== s.property) continue;
|
|
1206
|
-
const o =
|
|
1206
|
+
const o = O(a).filter((l) => O(s).includes(l));
|
|
1207
1207
|
if (o.length === 0) continue;
|
|
1208
1208
|
const c = this.getTrackSpan(a.id);
|
|
1209
1209
|
if (!c || !(c.from <= n.to && n.from <= c.to)) continue;
|
|
@@ -1220,7 +1220,7 @@ class ci {
|
|
|
1220
1220
|
return t;
|
|
1221
1221
|
}
|
|
1222
1222
|
_matches(t, e) {
|
|
1223
|
-
if (e.id !== void 0 && t.id !== e.id || e.property !== void 0 && t.property !== e.property || e.target !== void 0 &&
|
|
1223
|
+
if (e.id !== void 0 && t.id !== e.id || e.property !== void 0 && t.property !== e.property || e.target !== void 0 && !O(t).includes(e.target)) return !1;
|
|
1224
1224
|
if (e.timeRange) {
|
|
1225
1225
|
const s = this.getTrackSpan(t.id);
|
|
1226
1226
|
if (!s || s.to < e.timeRange.from || s.from > e.timeRange.to) return !1;
|
|
@@ -1419,7 +1419,7 @@ function Ti(i) {
|
|
|
1419
1419
|
const t = i.style;
|
|
1420
1420
|
!t || t.transformBox || (t.transformBox = "fill-box", t.transformOrigin || (t.transformOrigin = "50% 50%"));
|
|
1421
1421
|
}
|
|
1422
|
-
const
|
|
1422
|
+
const Ot = /* @__PURE__ */ new Set([
|
|
1423
1423
|
"width",
|
|
1424
1424
|
"height",
|
|
1425
1425
|
"top",
|
|
@@ -1463,14 +1463,14 @@ const $t = /* @__PURE__ */ new Set([
|
|
|
1463
1463
|
"motionPathX",
|
|
1464
1464
|
"motionPathY",
|
|
1465
1465
|
"motionPathRotate"
|
|
1466
|
-
]), Ai = /* @__PURE__ */ new Set(["originX", "originY"]), Si = /* @__PURE__ */ new Set(["clipTop", "clipRight", "clipBottom", "clipLeft"]), Mi = {
|
|
1466
|
+
]), Ai = /* @__PURE__ */ new Set(["originX", "originY"]), Si = /* @__PURE__ */ new Set(["clipTop", "clipRight", "clipBottom", "clipLeft"]), _i = /* @__PURE__ */ new Set(["drawOn"]), Mi = {
|
|
1467
1467
|
fill: "backgroundColor",
|
|
1468
1468
|
stroke: "borderColor",
|
|
1469
1469
|
strokeWidth: "borderWidth",
|
|
1470
1470
|
color: "color",
|
|
1471
1471
|
backgroundColor: "backgroundColor",
|
|
1472
1472
|
borderColor: "borderColor"
|
|
1473
|
-
},
|
|
1473
|
+
}, $t = {
|
|
1474
1474
|
fill: "fill",
|
|
1475
1475
|
stroke: "stroke",
|
|
1476
1476
|
strokeWidth: "strokeWidth",
|
|
@@ -1522,7 +1522,7 @@ class H {
|
|
|
1522
1522
|
let n = null, r = null, a = null;
|
|
1523
1523
|
const o = e.has("motionPathX"), c = e.has("motionPathY"), h = e.has("motionPathRotate");
|
|
1524
1524
|
for (const [d, f] of e)
|
|
1525
|
-
if (!(d === "x" && o) && !(d === "y" && c) && !((d === "rotate" || d === "rotateZ") && h)) {
|
|
1525
|
+
if (!(d === "x" && o) && !(d === "y" && c) && !((d === "rotate" || d === "rotateZ") && h) && !_i.has(d)) {
|
|
1526
1526
|
if (bi.has(d)) {
|
|
1527
1527
|
const b = this.buildTransformPart(d, f);
|
|
1528
1528
|
b && s.push(b);
|
|
@@ -1614,13 +1614,13 @@ class H {
|
|
|
1614
1614
|
*/
|
|
1615
1615
|
applyStyleProperty(t, e, s) {
|
|
1616
1616
|
let n;
|
|
1617
|
-
if (t.namespaceURI === ki && e in
|
|
1617
|
+
if (t.namespaceURI === ki && e in $t) {
|
|
1618
1618
|
const o = Array.isArray(s) ? s.join(", ") : String(s);
|
|
1619
|
-
t.style[
|
|
1619
|
+
t.style[$t[e]] = o;
|
|
1620
1620
|
return;
|
|
1621
1621
|
} else e === "fill" && t.dataset?.elementType === "text" ? n = "color" : n = Mi[e] ?? e;
|
|
1622
1622
|
let a;
|
|
1623
|
-
typeof s == "number" ?
|
|
1623
|
+
typeof s == "number" ? Ot.has(e) || Ot.has(n) ? a = `${s}px` : a = String(s) : Array.isArray(s) ? a = s.join(", ") : a = s, t.style[n] = a;
|
|
1624
1624
|
}
|
|
1625
1625
|
}
|
|
1626
1626
|
class Ft {
|
|
@@ -1662,7 +1662,7 @@ class Ft {
|
|
|
1662
1662
|
});
|
|
1663
1663
|
}
|
|
1664
1664
|
}
|
|
1665
|
-
function
|
|
1665
|
+
function wi(i, t, e, s, n) {
|
|
1666
1666
|
const r = e - n;
|
|
1667
1667
|
if (r < 0) {
|
|
1668
1668
|
t.paused || t.pause(), t.currentTime = 0;
|
|
@@ -1908,7 +1908,7 @@ class Gt {
|
|
|
1908
1908
|
/** Sync all discovered media targets to a timeline time. */
|
|
1909
1909
|
syncAllMedia(t, e) {
|
|
1910
1910
|
for (const s of this.mediaTargets)
|
|
1911
|
-
|
|
1911
|
+
wi(s.sync, s.el, t, e, s.startTime);
|
|
1912
1912
|
}
|
|
1913
1913
|
/**
|
|
1914
1914
|
* Load animation from inline JSON string.
|
|
@@ -2099,14 +2099,14 @@ class Gt {
|
|
|
2099
2099
|
}
|
|
2100
2100
|
}
|
|
2101
2101
|
}
|
|
2102
|
-
async function
|
|
2102
|
+
async function xi(i, t, e = {}) {
|
|
2103
2103
|
const s = new Gt(i, { ...e, autoplay: !0 });
|
|
2104
2104
|
return await s.load(t), s;
|
|
2105
2105
|
}
|
|
2106
|
-
function
|
|
2106
|
+
function vi(i, t = {}) {
|
|
2107
2107
|
return new Gt(i, t);
|
|
2108
2108
|
}
|
|
2109
|
-
class
|
|
2109
|
+
class Pi {
|
|
2110
2110
|
container;
|
|
2111
2111
|
containerA;
|
|
2112
2112
|
containerB;
|
|
@@ -2375,18 +2375,18 @@ class wi {
|
|
|
2375
2375
|
this.animationFrameId !== void 0 && (cancelAnimationFrame(this.animationFrameId), this.animationFrameId = void 0);
|
|
2376
2376
|
}
|
|
2377
2377
|
}
|
|
2378
|
-
async function
|
|
2379
|
-
const s = new
|
|
2378
|
+
async function Ci(i, t, e = {}) {
|
|
2379
|
+
const s = new Pi(i, { ...e, autoplay: !0 });
|
|
2380
2380
|
return await s.load(t), s;
|
|
2381
2381
|
}
|
|
2382
|
-
const
|
|
2382
|
+
const Ii = { type: "none", duration: 0 };
|
|
2383
2383
|
export {
|
|
2384
|
-
|
|
2384
|
+
Ii as DEFAULT_TRANSITION,
|
|
2385
2385
|
Ft as MediaSync,
|
|
2386
2386
|
Gt as TinyflyPlayer,
|
|
2387
|
-
|
|
2388
|
-
|
|
2389
|
-
|
|
2390
|
-
|
|
2391
|
-
|
|
2387
|
+
Pi as TinyflySequencer,
|
|
2388
|
+
vi as create,
|
|
2389
|
+
xi as play,
|
|
2390
|
+
Ci as playSequence,
|
|
2391
|
+
wi as syncMediaElement
|
|
2392
2392
|
};
|