@cliquify.me/transitions 0.11.17 → 0.11.18

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/index.es.js CHANGED
@@ -1,24 +1,24 @@
1
- import { interpolate as D, spring as ce, measureSpring as me, AbsoluteFill as c, Internals as Z, Sequence as M, useVideoConfig as de, useCurrentFrame as fe, Freeze as Y, random as B } from "remotion";
2
- import { jsx as o, Fragment as ee, jsxs as W } from "react/jsx-runtime";
3
- import C, { useMemo as h, Children as pe, useState as A } from "react";
4
- import { getBoundingBox as he, translatePath as te } from "@remotion/paths";
5
- import { makeStar as ge, makePie as ye } from "@remotion/shapes";
6
- const T = (n) => ({
1
+ import { interpolate as _, spring as $e, measureSpring as we, AbsoluteFill as m, Internals as le, Sequence as M, useVideoConfig as be, useCurrentFrame as Fe, Freeze as z, random as B } from "remotion";
2
+ import { jsx as o, Fragment as ue, jsxs as W } from "react/jsx-runtime";
3
+ import k, { useMemo as h, Children as ve, useState as A } from "react";
4
+ import { getBoundingBox as xe, translatePath as ce } from "@remotion/paths";
5
+ import { makeStar as Ie, makePie as Ee } from "@remotion/shapes";
6
+ const $ = (n) => ({
7
7
  getDurationInFrames: () => n.durationInFrames,
8
- getProgress: ({ frame: t }) => D(t, [0, n.durationInFrames], [0, 1], {
8
+ getProgress: ({ frame: t }) => _(t, [0, n.durationInFrames], [0, 1], {
9
9
  easing: n.easing,
10
10
  extrapolateLeft: "clamp",
11
11
  extrapolateRight: "clamp"
12
12
  })
13
- }), at = (n = {}) => ({
14
- getDurationInFrames: ({ fps: t }) => n.durationInFrames ? n.durationInFrames : me({
13
+ }), St = (n = {}) => ({
14
+ getDurationInFrames: ({ fps: t }) => n.durationInFrames ? n.durationInFrames : we({
15
15
  config: n.config,
16
16
  threshold: n.durationRestThreshold,
17
17
  fps: t
18
18
  }),
19
19
  getProgress: ({ fps: t, frame: e }) => {
20
20
  const r = n.reverse ? 0 : 1, s = n.reverse ? 1 : 0;
21
- return ce({
21
+ return $e({
22
22
  fps: t,
23
23
  frame: e,
24
24
  to: r,
@@ -31,7 +31,7 @@ const T = (n) => ({
31
31
  }
32
32
  });
33
33
  typeof window < "u" && (window.remotion_renderReady = !1, window.remotion_delayRenderTimeouts || (window.remotion_delayRenderTimeouts = {}), window.remotion_delayRenderHandles = []);
34
- var $e = {
34
+ var qe = {
35
35
  "style.transformOrigin": {
36
36
  type: "transform-origin",
37
37
  step: 1,
@@ -67,7 +67,7 @@ var $e = {
67
67
  description: "Opacity",
68
68
  hiddenFromList: !1
69
69
  }
70
- }, we = {
70
+ }, Pe = {
71
71
  "style.borderWidth": {
72
72
  type: "number",
73
73
  default: void 0,
@@ -98,7 +98,7 @@ var $e = {
98
98
  default: void 0,
99
99
  description: "Border color"
100
100
  }
101
- }, Te = {
101
+ }, Ce = {
102
102
  "style.borderRadius": {
103
103
  type: "number",
104
104
  default: 0,
@@ -140,13 +140,13 @@ var $e = {
140
140
  description: "Bottom left radius",
141
141
  hiddenFromList: !1
142
142
  }
143
- }, be = {
143
+ }, Re = {
144
144
  "style.backgroundColor": {
145
145
  type: "color",
146
146
  default: "transparent",
147
147
  description: "Color"
148
148
  }
149
- }, Se = {
149
+ }, ke = {
150
150
  premountFor: {
151
151
  type: "number",
152
152
  default: 0,
@@ -164,9 +164,9 @@ var $e = {
164
164
  hiddenFromList: !0,
165
165
  keyframable: !1
166
166
  }
167
- }, Fe = {
168
- ...Se
169
- }, ve = {
167
+ }, Me = {
168
+ ...ke
169
+ }, Le = {
170
170
  cropLeft: {
171
171
  type: "number",
172
172
  default: 0,
@@ -207,28 +207,28 @@ var $e = {
207
207
  hiddenFromList: !1,
208
208
  keyframable: !0
209
209
  }
210
- }, xe = ve, Ie = {
211
- ...xe,
212
- ...$e,
213
- ...be,
214
- ...we,
215
- ...Te,
216
- ...Fe
217
- }, Ee = {
210
+ }, Ne = Le, Be = {
211
+ ...Ne,
212
+ ...qe,
213
+ ...Re,
214
+ ...Pe,
215
+ ...Ce,
216
+ ...Me
217
+ }, We = {
218
218
  layout: {
219
219
  type: "enum",
220
220
  default: "absolute-fill",
221
221
  description: "Layout",
222
222
  variants: {
223
- "absolute-fill": Ie,
223
+ "absolute-fill": Be,
224
224
  none: {}
225
225
  }
226
226
  }
227
227
  };
228
228
  ({
229
- ...Ee.layout
229
+ ...We.layout
230
230
  });
231
- function Pe(n, t) {
231
+ function Ae(n, t) {
232
232
  const { allowFloats: e, component: r } = t;
233
233
  if (typeof n > "u")
234
234
  throw new Error(`The "durationInFrames" prop ${r} is missing.`);
@@ -241,31 +241,31 @@ function Pe(n, t) {
241
241
  if (!Number.isFinite(n))
242
242
  throw new TypeError(`The "durationInFrames" prop ${r} must be finite, but got ${n}.`);
243
243
  }
244
- var qe = {
245
- validateDurationInFrames: Pe
244
+ var Xe = {
245
+ validateDurationInFrames: Ae
246
246
  };
247
- const ne = C.createContext(null), re = C.createContext(null), K = ({ presentationProgress: n, children: t }) => {
247
+ const me = k.createContext(null), de = k.createContext(null), ie = ({ presentationProgress: n, children: t }) => {
248
248
  const e = h(() => ({
249
249
  enteringProgress: n
250
250
  }), [n]);
251
- return /* @__PURE__ */ o(ne.Provider, { value: e, children: t });
252
- }, G = ({ presentationProgress: n, children: t }) => {
251
+ return /* @__PURE__ */ o(me.Provider, { value: e, children: t });
252
+ }, se = ({ presentationProgress: n, children: t }) => {
253
253
  const e = h(() => ({
254
254
  exitingProgress: n
255
255
  }), [n]);
256
- return /* @__PURE__ */ o(re.Provider, { value: e, children: t });
257
- }, oe = (n) => C.Children.toArray(n).reduce((e, r) => r.type === C.Fragment ? e.concat(
258
- oe(
256
+ return /* @__PURE__ */ o(de.Provider, { value: e, children: t });
257
+ }, fe = (n) => k.Children.toArray(n).reduce((e, r) => r.type === k.Fragment ? e.concat(
258
+ fe(
259
259
  r.props.children
260
260
  )
261
- ) : (e.push(r), e), []), Re = 0.01, ke = ({
261
+ ) : (e.push(r), e), []), Oe = 0.01, Ue = ({
262
262
  children: n,
263
263
  presentationProgress: t,
264
264
  presentationDirection: e,
265
265
  passedProps: { direction: r = "from-left", enterStyle: s, exitStyle: l }
266
266
  }) => {
267
267
  const u = h(() => {
268
- const i = t === 1 ? t * 100 : t * 100 - Re;
268
+ const i = t === 1 ? t * 100 : t * 100 - Oe;
269
269
  if (e === "exiting")
270
270
  switch (r) {
271
271
  case "from-left":
@@ -315,123 +315,128 @@ const ne = C.createContext(null), re = C.createContext(null), K = ({ presentatio
315
315
  ...u,
316
316
  ...e === "entering" ? s : l
317
317
  }), [u, s, l, e]);
318
- return /* @__PURE__ */ o(c, { style: a, children: n });
318
+ return /* @__PURE__ */ o(m, { style: a, children: n });
319
319
  }, N = (n) => ({
320
- component: ke,
320
+ component: Ue,
321
321
  props: {}
322
- }), Ce = qe.validateDurationInFrames, L = function(n) {
322
+ }), Ye = Xe.validateDurationInFrames, L = function(n) {
323
323
  return null;
324
- }, z = ({ children: n }) => /* @__PURE__ */ o(ee, { children: n }), Me = ({
324
+ };
325
+ L.isTransitionSeriesTransition = !0;
326
+ const X = ({ children: n }) => /* @__PURE__ */ o(ue, { children: n });
327
+ X.isSeriesSequence = !0;
328
+ const De = ({
325
329
  children: n
326
330
  }) => {
327
- const { fps: t } = de(), e = fe(), r = h(() => {
331
+ const { fps: t } = be(), e = Fe(), r = h(() => {
328
332
  let s = 0, l = 0;
329
- const u = oe(n);
330
- return pe.map(u, (a, i) => {
331
- const f = a;
332
- if (typeof f == "string") {
333
- if (f.trim() === "")
333
+ const u = fe(n);
334
+ return ve.map(u, (a, i) => {
335
+ var V, H, J, K, G, Q, Z, ee;
336
+ const c = a;
337
+ if (typeof c == "string") {
338
+ if (c.trim() === "")
334
339
  return null;
335
340
  throw new TypeError(
336
- `The <TransitionSeries /> component only accepts a list of <TransitionSeries.Sequence /> components as its children, but you passed a string "${f}"`
341
+ `The <TransitionSeries /> component only accepts a list of <TransitionSeries.Sequence /> components as its children, but you passed a string "${c}"`
337
342
  );
338
343
  }
339
- const d = u[i - 1], $ = u[i + 1], p = typeof d == "string" || typeof d > "u" ? null : d.type === L ? d : null, g = typeof $ == "string" || typeof $ > "u" ? null : $.type === L ? $ : null, _ = typeof d == "string" || typeof d > "u" ? !1 : d.type === L;
340
- if (f.type === L) {
341
- if (_)
344
+ const d = u[i - 1], g = u[i + 1], O = typeof d != "string" && typeof d < "u" && (d.type === L || ((V = d.type) == null ? void 0 : V.isTransitionSeriesTransition) || ((H = d.type) == null ? void 0 : H.name) === "TransitionSeriesTransition"), p = typeof d == "string" || typeof d > "u" ? null : O ? d : null, j = typeof g != "string" && typeof g < "u" && (g.type === L || ((J = g.type) == null ? void 0 : J.isTransitionSeriesTransition) || ((K = g.type) == null ? void 0 : K.name) === "TransitionSeriesTransition"), y = typeof g == "string" || typeof g > "u" ? null : j ? g : null, pe = O;
345
+ if (c.type === L || ((G = c.type) == null ? void 0 : G.isTransitionSeriesTransition) || ((Q = c.type) == null ? void 0 : Q.name) === "TransitionSeriesTransition") {
346
+ if (pe)
342
347
  throw new TypeError(
343
348
  `A <TransitionSeries.Transition /> component must not be followed by another <TransitionSeries.Transition /> component (nth children = ${i - 1} and ${i})`
344
349
  );
345
350
  return null;
346
351
  }
347
- if (f.type !== z)
352
+ if (!(c.type === X || ((Z = c.type) == null ? void 0 : Z.isSeriesSequence) || ((ee = c.type) == null ? void 0 : ee.name) === "SeriesSequence"))
348
353
  throw new TypeError(
349
- `The <TransitionSeries /> component only accepts a list of <TransitionSeries.Sequence /> and <TransitionSeries.Transition /> components as its children, but got ${f} instead`
354
+ `The <TransitionSeries /> component only accepts a list of <TransitionSeries.Sequence /> and <TransitionSeries.Transition /> components as its children, but got ${c} instead`
350
355
  );
351
- const E = f, R = `index = ${i}, duration = ${E.props.durationInFrames}`;
356
+ const E = c, C = `index = ${i}, duration = ${E.props.durationInFrames}`;
352
357
  if (!(E != null && E.props.children))
353
358
  throw new TypeError(
354
- `A <TransitionSeries.Sequence /> component (${R}) was detected to not have any children. Delete it to fix this error.`
359
+ `A <TransitionSeries.Sequence /> component (${C}) was detected to not have any children. Delete it to fix this error.`
355
360
  );
356
- const w = E.props.durationInFrames, {
357
- durationInFrames: b,
358
- children: tt,
361
+ const S = E.props.durationInFrames, {
362
+ durationInFrames: w,
363
+ children: ft,
359
364
  ...F
360
365
  } = E.props;
361
- Ce(w, {
366
+ Ye(S, {
362
367
  component: "of a <TransitionSeries.Sequence /> component",
363
368
  allowFloats: !0
364
369
  });
365
- const P = E.props.offset ?? 0;
366
- if (Number.isNaN(P))
370
+ const q = E.props.offset ?? 0;
371
+ if (Number.isNaN(q))
367
372
  throw new TypeError(
368
- `The "offset" property of a <TransitionSeries.Sequence /> must not be NaN, but got NaN (${R}).`
373
+ `The "offset" property of a <TransitionSeries.Sequence /> must not be NaN, but got NaN (${C}).`
369
374
  );
370
- if (!Number.isFinite(P))
375
+ if (!Number.isFinite(q))
371
376
  throw new TypeError(
372
- `The "offset" property of a <TransitionSeries.Sequence /> must be finite, but got ${P} (${R}).`
377
+ `The "offset" property of a <TransitionSeries.Sequence /> must be finite, but got ${q} (${C}).`
373
378
  );
374
- if (P % 1 !== 0)
379
+ if (q % 1 !== 0)
375
380
  throw new TypeError(
376
- `The "offset" property of a <TransitionSeries.Sequence /> must be finite, but got ${P} (${R}).`
381
+ `The "offset" property of a <TransitionSeries.Sequence /> must be finite, but got ${q} (${C}).`
377
382
  );
378
- const ie = l + P;
379
- let X = 0;
380
- p && (X = p.props.timing.getDurationInFrames({
383
+ const he = l + q;
384
+ let U = 0;
385
+ p && (U = p.props.timing.getDurationInFrames({
381
386
  fps: t
382
- }), s -= X / 2);
383
- let m = ie - X / 2;
384
- l += w + P, m < 0 && (m = 0);
385
- const O = g ? g.props.timing.getProgress({
386
- frame: e - m - b + g.props.timing.getDurationInFrames({ fps: t }) / 2 + s,
387
+ }), s -= U / 2);
388
+ let f = he - U / 2;
389
+ l += S + q, f < 0 && (f = 0);
390
+ const Y = y ? y.props.timing.getProgress({
391
+ frame: e - f - w + y.props.timing.getDurationInFrames({ fps: t }) / 2 + s,
387
392
  fps: t
388
- }) : null, k = p ? p.props.timing.getProgress({
389
- frame: e - m,
393
+ }) : null, R = p ? p.props.timing.getProgress({
394
+ frame: e - f,
390
395
  fps: t
391
- }) : null, se = p ? p.props.timing.getProgress({
392
- frame: e - (m + b),
396
+ }) : null, ge = p ? p.props.timing.getProgress({
397
+ frame: e - (f + w),
393
398
  fps: t
394
399
  }) : null;
395
- if (g && w < g.props.timing.getDurationInFrames({ fps: t }) / 2)
400
+ if (y && S < y.props.timing.getDurationInFrames({ fps: t }) / 2)
396
401
  throw new Error(
397
- `The duration of a <TransitionSeries.Sequence /> must not be shorter than the duration of the next <TransitionSeries.Transition />. The transition is ${g.props.timing.getDurationInFrames(
402
+ `The duration of a <TransitionSeries.Sequence /> must not be shorter than the duration of the next <TransitionSeries.Transition />. The transition is ${y.props.timing.getDurationInFrames(
398
403
  { fps: t }
399
- )} frames long, but the sequence is only ${w} frames long (${R})`
404
+ )} frames long, but the sequence is only ${S} frames long (${C})`
400
405
  );
401
- if (p && w < p.props.timing.getDurationInFrames({ fps: t }) / 2)
406
+ if (p && S < p.props.timing.getDurationInFrames({ fps: t }) / 2)
402
407
  throw new Error(
403
408
  `The duration of a <TransitionSeries.Sequence /> must not be shorter than the duration of the previous <TransitionSeries.Transition />. The transition is ${p.props.timing.getDurationInFrames(
404
409
  { fps: t }
405
- )} frames long, but the sequence is only ${w} frames long (${R})`
410
+ )} frames long, but the sequence is only ${S} frames long (${C})`
406
411
  );
407
- if (g && p && se !== null && k !== null) {
408
- const v = g.props.presentation ?? N(), x = p.props.presentation ?? N(), I = p.props.timing.getDurationInFrames({
412
+ if (y && p && ge !== null && R !== null) {
413
+ const v = y.props.presentation ?? N(), x = p.props.presentation ?? N(), I = p.props.timing.getDurationInFrames({
409
414
  fps: t
410
- }), S = g.props.timing.getDurationInFrames({
415
+ }), b = y.props.timing.getDurationInFrames({
411
416
  fps: t
412
- }), q = v.component, U = x.component, j = e < +Math.floor(m) + I / 2, V = e > Math.floor(m) + Math.floor(b) + I / 2, ae = V ? Math.floor(m) + Math.floor(b) + Math.floor(S / 2) : Math.floor(m), H = j ? Math.floor(m) : Math.floor(m) + I / 2, J = g.props.timing.getProgress({
413
- frame: e - (H + b - S / 2),
417
+ }), P = v.component, D = x.component, te = e < +Math.floor(f) + I / 2, ne = e > Math.floor(f) + Math.floor(w) + I / 2, ye = ne ? Math.floor(f) + Math.floor(w) + Math.floor(b / 2) : Math.floor(f), re = te ? Math.floor(f) : Math.floor(f) + I / 2, oe = y.props.timing.getProgress({
418
+ frame: e - (re + w - b / 2),
414
419
  fps: t
415
- }), le = e > m, ue = e < m + b + S / 2 + I / 2;
420
+ }), Te = e > f, Se = e < f + w + b / 2 + I / 2;
416
421
  return /* @__PURE__ */ o(
417
- Y,
422
+ z,
418
423
  {
419
- active: ue && le && (j || V),
420
- frame: ae,
424
+ active: Se && Te && (te || ne),
425
+ frame: ye,
421
426
  children: /* @__PURE__ */ o(
422
427
  M,
423
428
  {
424
- from: H,
425
- durationInFrames: w + S / 2,
429
+ from: re,
430
+ durationInFrames: S + b / 2,
426
431
  ...F,
427
432
  name: F.name || "<TS.Sequence>",
428
433
  children: /* @__PURE__ */ o(
429
- q,
434
+ P,
430
435
  {
431
436
  passedProps: v.props ?? {},
432
437
  presentationDirection: "exiting",
433
- presentationProgress: J,
434
- presentationDurationInFrames: g.props.timing.getDurationInFrames(
438
+ presentationProgress: oe,
439
+ presentationDurationInFrames: y.props.timing.getDurationInFrames(
435
440
  { fps: t }
436
441
  ),
437
442
  onElementImage: () => {
@@ -440,15 +445,15 @@ const ne = C.createContext(null), re = C.createContext(null), K = ({ presentatio
440
445
  },
441
446
  bothEnteringAndExiting: !1,
442
447
  children: /* @__PURE__ */ o(
443
- G,
448
+ se,
444
449
  {
445
- presentationProgress: J,
450
+ presentationProgress: oe,
446
451
  children: /* @__PURE__ */ o(
447
- U,
452
+ D,
448
453
  {
449
454
  passedProps: x.props ?? {},
450
455
  presentationDirection: "entering",
451
- presentationProgress: k,
456
+ presentationProgress: R,
452
457
  presentationDurationInFrames: p.props.timing.getDurationInFrames(
453
458
  { fps: t }
454
459
  ),
@@ -458,9 +463,9 @@ const ne = C.createContext(null), re = C.createContext(null), K = ({ presentatio
458
463
  },
459
464
  bothEnteringAndExiting: !1,
460
465
  children: /* @__PURE__ */ o(
461
- K,
466
+ ie,
462
467
  {
463
- presentationProgress: k,
468
+ presentationProgress: R,
464
469
  children: a
465
470
  }
466
471
  )
@@ -477,18 +482,18 @@ const ne = C.createContext(null), re = C.createContext(null), K = ({ presentatio
477
482
  i
478
483
  );
479
484
  }
480
- if (k !== null && p) {
481
- const v = p.props.timing.getDurationInFrames({ fps: t }) / 2, x = p.props.presentation ?? N(), I = x.component, S = e < m + v, q = S ? Math.floor(m) : Math.floor(m) + v, U = e > q;
485
+ if (R !== null && p) {
486
+ const v = p.props.timing.getDurationInFrames({ fps: t }) / 2, x = p.props.presentation ?? N(), I = x.component, b = e < f + v, P = b ? Math.floor(f) : Math.floor(f) + v, D = e > P;
482
487
  return /* @__PURE__ */ o(
483
- Y,
488
+ z,
484
489
  {
485
- active: U && S,
486
- frame: q,
490
+ active: D && b,
491
+ frame: P,
487
492
  children: /* @__PURE__ */ o(
488
493
  M,
489
494
  {
490
- from: q,
491
- durationInFrames: w,
495
+ from: P,
496
+ durationInFrames: S,
492
497
  ...F,
493
498
  name: F.name || "<TS.Sequence>",
494
499
  children: /* @__PURE__ */ o(
@@ -496,7 +501,7 @@ const ne = C.createContext(null), re = C.createContext(null), K = ({ presentatio
496
501
  {
497
502
  passedProps: x.props ?? {},
498
503
  presentationDirection: "entering",
499
- presentationProgress: k,
504
+ presentationProgress: R,
500
505
  presentationDurationInFrames: p.props.timing.getDurationInFrames(
501
506
  { fps: t }
502
507
  ),
@@ -506,9 +511,9 @@ const ne = C.createContext(null), re = C.createContext(null), K = ({ presentatio
506
511
  },
507
512
  bothEnteringAndExiting: !1,
508
513
  children: /* @__PURE__ */ o(
509
- K,
514
+ ie,
510
515
  {
511
- presentationProgress: k,
516
+ presentationProgress: R,
512
517
  children: a
513
518
  }
514
519
  )
@@ -521,18 +526,18 @@ const ne = C.createContext(null), re = C.createContext(null), K = ({ presentatio
521
526
  i
522
527
  );
523
528
  }
524
- if (O !== null && g) {
525
- const v = g.props.timing.getDurationInFrames({ fps: t }) / 2, x = g.props.presentation ?? N(), I = x.component, S = e > Math.floor(b) + Math.floor(m), q = e < Math.floor(b) + Math.floor(m) + v;
529
+ if (Y !== null && y) {
530
+ const v = y.props.timing.getDurationInFrames({ fps: t }) / 2, x = y.props.presentation ?? N(), I = x.component, b = e > Math.floor(w) + Math.floor(f), P = e < Math.floor(w) + Math.floor(f) + v;
526
531
  return /* @__PURE__ */ o(
527
- Y,
532
+ z,
528
533
  {
529
- active: q && S,
530
- frame: Math.floor(b),
534
+ active: P && b,
535
+ frame: Math.floor(w),
531
536
  children: /* @__PURE__ */ o(
532
537
  M,
533
538
  {
534
- from: Math.floor(m),
535
- durationInFrames: w + v,
539
+ from: Math.floor(f),
540
+ durationInFrames: S + v,
536
541
  ...F,
537
542
  name: F.name || "<TS.Sequence>",
538
543
  children: /* @__PURE__ */ o(
@@ -540,8 +545,8 @@ const ne = C.createContext(null), re = C.createContext(null), K = ({ presentatio
540
545
  {
541
546
  passedProps: x.props ?? {},
542
547
  presentationDirection: "exiting",
543
- presentationProgress: O,
544
- presentationDurationInFrames: g.props.timing.getDurationInFrames(
548
+ presentationProgress: Y,
549
+ presentationDurationInFrames: y.props.timing.getDurationInFrames(
545
550
  { fps: t }
546
551
  ),
547
552
  onElementImage: () => {
@@ -550,9 +555,9 @@ const ne = C.createContext(null), re = C.createContext(null), K = ({ presentatio
550
555
  },
551
556
  bothEnteringAndExiting: !1,
552
557
  children: /* @__PURE__ */ o(
553
- G,
558
+ se,
554
559
  {
555
- presentationProgress: O,
560
+ presentationProgress: Y,
556
561
  children: a
557
562
  }
558
563
  )
@@ -568,8 +573,8 @@ const ne = C.createContext(null), re = C.createContext(null), K = ({ presentatio
568
573
  return /* @__PURE__ */ o(
569
574
  M,
570
575
  {
571
- from: Math.floor(m),
572
- durationInFrames: w,
576
+ from: Math.floor(f),
577
+ durationInFrames: S,
573
578
  ...F,
574
579
  name: F.name || "<TS.Sequence>",
575
580
  children: a
@@ -578,14 +583,14 @@ const ne = C.createContext(null), re = C.createContext(null), K = ({ presentatio
578
583
  );
579
584
  });
580
585
  }, [n, t, e]);
581
- return /* @__PURE__ */ o(ee, { children: r });
582
- }, y = ({ children: n, name: t, layout: e, ...r }) => /* @__PURE__ */ o(M, { name: t ?? "<TransitionSeries>", layout: e ?? "absolute-fill", ...r, children: /* @__PURE__ */ o(Me, { children: n }) });
583
- y.Sequence = z;
584
- y.Transition = L;
585
- Z.addSequenceStackTraces(y);
586
- Z.addSequenceStackTraces(z);
587
- const lt = () => {
588
- const n = C.useContext(ne), t = C.useContext(re);
586
+ return /* @__PURE__ */ o(ue, { children: r });
587
+ }, T = ({ children: n, name: t, layout: e, ...r }) => /* @__PURE__ */ o(M, { name: t ?? "<TransitionSeries>", layout: e ?? "absolute-fill", ...r, children: /* @__PURE__ */ o(De, { children: n }) });
588
+ T.Sequence = X;
589
+ T.Transition = L;
590
+ le.addSequenceStackTraces(T);
591
+ le.addSequenceStackTraces(X);
592
+ const $t = () => {
593
+ const n = k.useContext(me), t = k.useContext(de);
589
594
  return !n && !t ? {
590
595
  isInTransitionSeries: !1,
591
596
  entering: 1,
@@ -595,13 +600,13 @@ const lt = () => {
595
600
  entering: (n == null ? void 0 : n.enteringProgress) ?? 1,
596
601
  exiting: (t == null ? void 0 : t.exitingProgress) ?? 0
597
602
  };
598
- }, Le = ({
603
+ }, ze = ({
599
604
  children: n,
600
605
  presentationDirection: t,
601
606
  presentationProgress: e,
602
607
  passedProps: r
603
608
  }) => {
604
- const l = Math.sqrt(r.width ** 2 + r.height ** 2) / 2 * e, u = Be(
609
+ const l = Math.sqrt(r.width ** 2 + r.height ** 2) / 2 * e, u = je(
605
610
  r.width / 2,
606
611
  r.height / 2,
607
612
  l
@@ -610,74 +615,74 @@ const lt = () => {
610
615
  height: "100%",
611
616
  clipPath: t === "exiting" ? void 0 : `url(#${a})`
612
617
  }), [a, t]);
613
- return /* @__PURE__ */ W(c, { children: [
614
- /* @__PURE__ */ o(c, { style: i, children: n }),
615
- t === "exiting" ? null : /* @__PURE__ */ o(c, { children: /* @__PURE__ */ o("svg", { width: r.width, height: r.height, children: /* @__PURE__ */ o("defs", { children: /* @__PURE__ */ o("clipPath", { id: a, children: /* @__PURE__ */ o("path", { d: u, fill: "black" }) }) }) }) })
618
+ return /* @__PURE__ */ W(m, { children: [
619
+ /* @__PURE__ */ o(m, { style: i, children: n }),
620
+ t === "exiting" ? null : /* @__PURE__ */ o(m, { children: /* @__PURE__ */ o("svg", { width: r.width, height: r.height, children: /* @__PURE__ */ o("defs", { children: /* @__PURE__ */ o("clipPath", { id: a, children: /* @__PURE__ */ o("path", { d: u, fill: "black" }) }) }) }) })
616
621
  ] });
617
- }, Ne = (n) => ({ component: Le, props: n }), Be = (n, t, e) => `M ${n}, ${t}
622
+ }, _e = (n) => ({ component: ze, props: n }), je = (n, t, e) => `M ${n}, ${t}
618
623
  m -${e}, 0
619
624
  a ${e},${e} 0 1,0 ${e * 2},0
620
- a ${e},${e} 0 1,0 -${e * 2},0`, We = ({
625
+ a ${e},${e} 0 1,0 -${e * 2},0`, Ve = ({
621
626
  children: n,
622
627
  presentationDirection: t,
623
628
  presentationProgress: e,
624
629
  passedProps: r
625
630
  }) => {
626
- const { width: s, height: l } = r, u = s * e, a = l * e, i = s / 2 - u / 2, f = l / 2 - a / 2, [d] = A(() => String(B(null))), $ = h(() => ({
631
+ const { width: s, height: l } = r, u = s * e, a = l * e, i = s / 2 - u / 2, c = l / 2 - a / 2, [d] = A(() => String(B(null))), g = h(() => ({
627
632
  width: "100%",
628
633
  height: "100%",
629
634
  clipPath: t === "exiting" ? void 0 : `url(#${d})`
630
635
  }), [d, t]);
631
- return /* @__PURE__ */ W(c, { children: [
632
- /* @__PURE__ */ o(c, { style: $, children: n }),
633
- t === "exiting" ? null : /* @__PURE__ */ o(c, { children: /* @__PURE__ */ o("svg", { children: /* @__PURE__ */ o("defs", { children: /* @__PURE__ */ o("clipPath", { id: d, children: /* @__PURE__ */ o(
636
+ return /* @__PURE__ */ W(m, { children: [
637
+ /* @__PURE__ */ o(m, { style: g, children: n }),
638
+ t === "exiting" ? null : /* @__PURE__ */ o(m, { children: /* @__PURE__ */ o("svg", { children: /* @__PURE__ */ o("defs", { children: /* @__PURE__ */ o("clipPath", { id: d, children: /* @__PURE__ */ o(
634
639
  "rect",
635
640
  {
636
641
  x: i,
637
- y: f,
642
+ y: c,
638
643
  width: u,
639
644
  height: a,
640
645
  fill: "black"
641
646
  }
642
647
  ) }) }) }) })
643
648
  ] });
644
- }, Ae = (n) => ({ component: We, props: n }), Xe = ({
649
+ }, He = (n) => ({ component: Ve, props: n }), Je = ({
645
650
  children: n,
646
651
  presentationDirection: t,
647
652
  presentationProgress: e,
648
653
  passedProps: r
649
654
  }) => {
650
- const s = Math.sqrt(r.width ** 2 + r.height ** 2) / 2, l = s * e, u = s * 2 * e, { path: a } = ge({
655
+ const s = Math.sqrt(r.width ** 2 + r.height ** 2) / 2, l = s * e, u = s * 2 * e, { path: a } = Ie({
651
656
  innerRadius: l,
652
657
  outerRadius: u,
653
658
  points: 5
654
- }), i = he(a), f = te(
659
+ }), i = xe(a), c = ce(
655
660
  a,
656
661
  r.width / 2 - i.width / 2,
657
662
  r.height / 2 - i.height / 2
658
- ), [d] = A(() => String(B(null))), $ = h(() => ({
663
+ ), [d] = A(() => String(B(null))), g = h(() => ({
659
664
  width: "100%",
660
665
  height: "100%",
661
666
  clipPath: t === "exiting" ? void 0 : `url(#${d})`
662
667
  }), [d, t]);
663
- return /* @__PURE__ */ W(c, { children: [
664
- /* @__PURE__ */ o(c, { style: $, children: n }),
665
- t === "exiting" ? null : /* @__PURE__ */ o(c, { children: /* @__PURE__ */ o("svg", { children: /* @__PURE__ */ o("defs", { children: /* @__PURE__ */ o("clipPath", { id: d, children: /* @__PURE__ */ o("path", { d: f, fill: "black" }) }) }) }) })
668
+ return /* @__PURE__ */ W(m, { children: [
669
+ /* @__PURE__ */ o(m, { style: g, children: n }),
670
+ t === "exiting" ? null : /* @__PURE__ */ o(m, { children: /* @__PURE__ */ o("svg", { children: /* @__PURE__ */ o("defs", { children: /* @__PURE__ */ o("clipPath", { id: d, children: /* @__PURE__ */ o("path", { d: c, fill: "black" }) }) }) }) })
666
671
  ] });
667
- }, Oe = (n) => ({ component: Xe, props: n }), Ue = ({
672
+ }, Ke = (n) => ({ component: Je, props: n }), Ge = ({
668
673
  children: n,
669
674
  presentationDirection: t,
670
675
  presentationProgress: e,
671
676
  passedProps: r
672
677
  }) => {
673
- const { width: s, height: l } = r, u = s * e, a = s / 2 - u / 2, [i] = A(() => String(B(null))), f = h(() => ({
678
+ const { width: s, height: l } = r, u = s * e, a = s / 2 - u / 2, [i] = A(() => String(B(null))), c = h(() => ({
674
679
  width: "100%",
675
680
  height: "100%",
676
681
  clipPath: t === "exiting" ? void 0 : `url(#${i})`
677
682
  }), [i, t]);
678
- return /* @__PURE__ */ W(c, { children: [
679
- /* @__PURE__ */ o(c, { style: f, children: n }),
680
- t === "exiting" ? null : /* @__PURE__ */ o(c, { children: /* @__PURE__ */ o("svg", { children: /* @__PURE__ */ o("defs", { children: /* @__PURE__ */ o("clipPath", { id: i, children: /* @__PURE__ */ o(
683
+ return /* @__PURE__ */ W(m, { children: [
684
+ /* @__PURE__ */ o(m, { style: c, children: n }),
685
+ t === "exiting" ? null : /* @__PURE__ */ o(m, { children: /* @__PURE__ */ o("svg", { children: /* @__PURE__ */ o("defs", { children: /* @__PURE__ */ o("clipPath", { id: i, children: /* @__PURE__ */ o(
681
686
  "rect",
682
687
  {
683
688
  x: a,
@@ -688,8 +693,8 @@ const lt = () => {
688
693
  }
689
694
  ) }) }) }) })
690
695
  ] });
691
- }, Ye = (n) => ({ component: Ue, props: n });
692
- var De = ({ children: n, presentationDirection: t, presentationProgress: e, passedProps: r }) => {
696
+ }, Qe = (n) => ({ component: Ge, props: n });
697
+ var Ze = ({ children: n, presentationDirection: t, presentationProgress: e, passedProps: r }) => {
693
698
  const s = t === "entering", l = h(() => ({
694
699
  opacity: s ? e : r.shouldFadeOutExitingScene ? 1 - e : 1,
695
700
  ...t === "entering" ? r.enterStyle : r.exitStyle
@@ -701,21 +706,21 @@ var De = ({ children: n, presentationDirection: t, presentationProgress: e, pass
701
706
  t,
702
707
  e
703
708
  ]);
704
- return /* @__PURE__ */ o(c, {
709
+ return /* @__PURE__ */ o(m, {
705
710
  style: l,
706
711
  children: n
707
712
  });
708
- }, Q = (n) => ({
709
- component: De,
713
+ }, ae = (n) => ({
714
+ component: Ze,
710
715
  props: n ?? {}
711
- }), ze = 0.01, _e = ({
716
+ }), et = 0.01, tt = ({
712
717
  children: n,
713
718
  presentationProgress: t,
714
719
  presentationDirection: e,
715
720
  passedProps: { direction: r = "from-left", enterStyle: s, exitStyle: l }
716
721
  }) => {
717
722
  const u = h(() => {
718
- const i = t === 1 ? t * 100 : t * 100 - ze;
723
+ const i = t === 1 ? t * 100 : t * 100 - et;
719
724
  if (e === "exiting")
720
725
  switch (r) {
721
726
  case "from-left":
@@ -765,14 +770,14 @@ var De = ({ children: n, presentationDirection: t, presentationProgress: e, pass
765
770
  ...u,
766
771
  ...e === "entering" ? s : l
767
772
  }), [u, s, l, e]);
768
- return /* @__PURE__ */ o(c, {
773
+ return /* @__PURE__ */ o(m, {
769
774
  style: a,
770
775
  children: n
771
776
  });
772
- }, je = (n) => ({
773
- component: _e,
777
+ }, nt = (n) => ({
778
+ component: tt,
774
779
  props: n ?? {}
775
- }), Ve = (n, t) => {
780
+ }), rt = (n, t) => {
776
781
  const e = n * 100;
777
782
  switch (t) {
778
783
  case "from-left":
@@ -794,7 +799,7 @@ var De = ({ children: n, presentationDirection: t, presentationProgress: e, pass
794
799
  default:
795
800
  throw new Error(`Unknown direction ${JSON.stringify(t)}`);
796
801
  }
797
- }, He = (n, t) => {
802
+ }, ot = (n, t) => {
798
803
  const e = n * 100;
799
804
  switch (t) {
800
805
  case "from-left":
@@ -816,7 +821,7 @@ var De = ({ children: n, presentationDirection: t, presentationProgress: e, pass
816
821
  default:
817
822
  throw new Error(`Unknown direction ${JSON.stringify(t)}`);
818
823
  }
819
- }, Je = ({
824
+ }, it = ({
820
825
  children: n,
821
826
  presentationProgress: t,
822
827
  presentationDirection: e,
@@ -828,25 +833,25 @@ var De = ({ children: n, presentationDirection: t, presentationProgress: e, pass
828
833
  outerExitStyle: a
829
834
  }
830
835
  }) => {
831
- const i = e === "entering" ? t : 1 - t, f = e === "entering" ? Ve(i, r) : He(i, r), d = h(() => ({
836
+ const i = e === "entering" ? t : 1 - t, c = e === "entering" ? rt(i, r) : ot(i, r), d = h(() => ({
832
837
  width: "100%",
833
838
  height: "100%",
834
839
  justifyContent: "center",
835
840
  alignItems: "center",
836
- clipPath: f,
841
+ clipPath: c,
837
842
  ...e === "entering" ? s : l
838
- }), [f, s, l, e]), $ = h(() => e === "entering" ? u : a, [u, a, e]);
839
- return /* @__PURE__ */ o(c, {
840
- style: $,
841
- children: /* @__PURE__ */ o(c, {
843
+ }), [c, s, l, e]), g = h(() => e === "entering" ? u : a, [u, a, e]);
844
+ return /* @__PURE__ */ o(m, {
845
+ style: g,
846
+ children: /* @__PURE__ */ o(m, {
842
847
  style: d,
843
848
  children: n
844
849
  })
845
850
  });
846
- }, Ke = (n) => ({
847
- component: Je,
851
+ }, st = (n) => ({
852
+ component: it,
848
853
  props: n ?? {}
849
- }), Ge = ({
854
+ }), at = ({
850
855
  children: n,
851
856
  presentationDirection: t,
852
857
  presentationProgress: e,
@@ -859,12 +864,12 @@ var De = ({ children: n, presentationDirection: t, presentationProgress: e, pass
859
864
  outerExitStyle: i
860
865
  }
861
866
  }) => {
862
- const f = h(() => {
863
- const g = t === "entering" ? D(e, [0, 1], [r === "from-right" || r === "from-top" ? 180 : -180, 0]) : D(e, [0, 1], [0, r === "from-right" || r === "from-top" ? -180 : 180]);
867
+ const c = h(() => {
868
+ const p = t === "entering" ? _(e, [0, 1], [r === "from-right" || r === "from-top" ? 180 : -180, 0]) : _(e, [0, 1], [0, r === "from-right" || r === "from-top" ? -180 : 180]);
864
869
  return {
865
870
  width: "100%",
866
871
  height: "100%",
867
- transform: `${r === "from-top" || r === "from-bottom" ? "rotateX" : "rotateY"}(${g}deg)`,
872
+ transform: `${r === "from-top" || r === "from-bottom" ? "rotateX" : "rotateY"}(${p}deg)`,
868
873
  backfaceVisibility: "hidden",
869
874
  WebkitBackfaceVisibility: "hidden",
870
875
  ...t === "entering" ? l : u
@@ -880,18 +885,18 @@ var De = ({ children: n, presentationDirection: t, presentationProgress: e, pass
880
885
  transformStyle: "preserve-3d",
881
886
  ...t === "entering" ? a : i
882
887
  }), [a, i, s, t]);
883
- return /* @__PURE__ */ o(c, {
888
+ return /* @__PURE__ */ o(m, {
884
889
  style: d,
885
- children: /* @__PURE__ */ o(c, {
886
- style: f,
890
+ children: /* @__PURE__ */ o(m, {
891
+ style: c,
887
892
  children: n
888
893
  })
889
894
  });
890
- }, Qe = (n) => ({ component: Ge, props: n ?? {} }), Ze = ({ children: n, presentationDirection: t, presentationProgress: e, passedProps: r }) => {
891
- const s = Math.sqrt(r.width ** 2 + r.height ** 2) / 2, { path: l } = ye({
895
+ }, lt = (n) => ({ component: at, props: n ?? {} }), ut = ({ children: n, presentationDirection: t, presentationProgress: e, passedProps: r }) => {
896
+ const s = Math.sqrt(r.width ** 2 + r.height ** 2) / 2, { path: l } = Ee({
892
897
  radius: s,
893
898
  progress: e
894
- }), u = te(l, -(s * 2 - r.width) / 2, -(s * 2 - r.height) / 2), a = h(() => ({
899
+ }), u = ce(l, -(s * 2 - r.width) / 2, -(s * 2 - r.height) / 2), a = h(() => ({
895
900
  width: "100%",
896
901
  height: "100%",
897
902
  clipPath: t === "exiting" ? void 0 : `path("${u}")`,
@@ -906,84 +911,84 @@ var De = ({ children: n, presentationDirection: t, presentationProgress: e, pass
906
911
  r.outerExitStyle,
907
912
  t
908
913
  ]);
909
- return /* @__PURE__ */ o(c, {
914
+ return /* @__PURE__ */ o(m, {
910
915
  style: i,
911
- children: /* @__PURE__ */ o(c, {
916
+ children: /* @__PURE__ */ o(m, {
912
917
  style: a,
913
918
  children: n
914
919
  })
915
920
  });
916
- }, et = (n) => ({ component: Ze, props: n ?? {} });
917
- const ut = {
921
+ }, ct = (n) => ({ component: ut, props: n ?? {} });
922
+ const wt = {
918
923
  none: ({ id: n }) => /* @__PURE__ */ o(
919
- y.Transition,
924
+ T.Transition,
920
925
  {
921
- presentation: Q(),
922
- timing: T({ durationInFrames: 1 })
926
+ presentation: ae(),
927
+ timing: $({ durationInFrames: 1 })
923
928
  },
924
929
  n
925
930
  ),
926
931
  fade: ({ durationInFrames: n, id: t }) => /* @__PURE__ */ o(
927
- y.Transition,
932
+ T.Transition,
928
933
  {
929
- presentation: Q(),
930
- timing: T({ durationInFrames: n })
934
+ presentation: ae(),
935
+ timing: $({ durationInFrames: n })
931
936
  },
932
937
  t
933
938
  ),
934
939
  slide: ({ durationInFrames: n, id: t, direction: e }) => /* @__PURE__ */ o(
935
- y.Transition,
940
+ T.Transition,
936
941
  {
937
- presentation: je({ direction: e }),
938
- timing: T({ durationInFrames: n })
942
+ presentation: nt({ direction: e }),
943
+ timing: $({ durationInFrames: n })
939
944
  },
940
945
  t
941
946
  ),
942
947
  wipe: ({ durationInFrames: n, id: t, direction: e }) => /* @__PURE__ */ o(
943
- y.Transition,
948
+ T.Transition,
944
949
  {
945
- presentation: Ke({ direction: e }),
946
- timing: T({ durationInFrames: n })
950
+ presentation: st({ direction: e }),
951
+ timing: $({ durationInFrames: n })
947
952
  },
948
953
  t
949
954
  ),
950
955
  flip: ({ durationInFrames: n, id: t }) => /* @__PURE__ */ o(
951
- y.Transition,
956
+ T.Transition,
952
957
  {
953
- presentation: Qe(),
954
- timing: T({ durationInFrames: n })
958
+ presentation: lt(),
959
+ timing: $({ durationInFrames: n })
955
960
  },
956
961
  t
957
962
  ),
958
963
  clockWipe: ({ width: n, height: t, durationInFrames: e, id: r }) => /* @__PURE__ */ o(
959
- y.Transition,
964
+ T.Transition,
960
965
  {
961
- presentation: et({ width: n, height: t }),
962
- timing: T({ durationInFrames: e })
966
+ presentation: ct({ width: n, height: t }),
967
+ timing: $({ durationInFrames: e })
963
968
  },
964
969
  r
965
970
  ),
966
971
  star: ({ width: n, height: t, durationInFrames: e, id: r }) => /* @__PURE__ */ o(
967
- y.Transition,
972
+ T.Transition,
968
973
  {
969
- presentation: Oe({ width: n, height: t }),
970
- timing: T({ durationInFrames: e })
974
+ presentation: Ke({ width: n, height: t }),
975
+ timing: $({ durationInFrames: e })
971
976
  },
972
977
  r
973
978
  ),
974
979
  circle: ({ width: n, height: t, durationInFrames: e, id: r }) => /* @__PURE__ */ o(
975
- y.Transition,
980
+ T.Transition,
976
981
  {
977
- presentation: Ne({ width: n, height: t }),
978
- timing: T({ durationInFrames: e })
982
+ presentation: _e({ width: n, height: t }),
983
+ timing: $({ durationInFrames: e })
979
984
  },
980
985
  r
981
986
  ),
982
987
  rectangle: ({ width: n, height: t, durationInFrames: e, id: r }) => /* @__PURE__ */ o(
983
- y.Transition,
988
+ T.Transition,
984
989
  {
985
- presentation: Ae({ width: n, height: t }),
986
- timing: T({ durationInFrames: e })
990
+ presentation: He({ width: n, height: t }),
991
+ timing: $({ durationInFrames: e })
987
992
  },
988
993
  r
989
994
  ),
@@ -993,28 +998,28 @@ const ut = {
993
998
  durationInFrames: e,
994
999
  id: r
995
1000
  }) => /* @__PURE__ */ o(
996
- y.Transition,
1001
+ T.Transition,
997
1002
  {
998
- presentation: Ye({ width: n, height: t }),
999
- timing: T({ durationInFrames: e })
1003
+ presentation: Qe({ width: n, height: t }),
1004
+ timing: $({ durationInFrames: e })
1000
1005
  },
1001
1006
  r
1002
1007
  )
1003
1008
  };
1004
1009
  export {
1005
- y as TransitionSeries,
1006
- ut as Transitions,
1007
- Ne as circle,
1008
- et as clockWipe,
1009
- Q as fade,
1010
- Qe as flip,
1011
- T as linearTiming,
1012
- Ae as rectangle,
1013
- je as slide,
1014
- Ye as slidingDoors,
1015
- at as springTiming,
1016
- Oe as star,
1017
- lt as useTransitionProgress,
1018
- Ke as wipe
1010
+ T as TransitionSeries,
1011
+ wt as Transitions,
1012
+ _e as circle,
1013
+ ct as clockWipe,
1014
+ ae as fade,
1015
+ lt as flip,
1016
+ $ as linearTiming,
1017
+ He as rectangle,
1018
+ nt as slide,
1019
+ Qe as slidingDoors,
1020
+ St as springTiming,
1021
+ Ke as star,
1022
+ $t as useTransitionProgress,
1023
+ st as wipe
1019
1024
  };
1020
1025
  //# sourceMappingURL=index.es.js.map