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