@cliquify.me/transitions 1.0.0 → 1.0.1

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,26 +1,26 @@
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 D, spring as ut, measureSpring as mt, AbsoluteFill as u, Internals as Z, Sequence as L, useVideoConfig as dt, useCurrentFrame as ft, Freeze as z, random as W } from "remotion";
2
+ import { jsx as o, Fragment as tt, jsxs as C } from "react/jsx-runtime";
3
+ import M, { useMemo as g, Children as ht, useState as B } from "react";
4
+ import { getBoundingBox as pt, translatePath as et } from "@remotion/paths";
5
+ import { makeStar as gt, makePie as yt } from "@remotion/shapes";
6
+ const b = (n) => ({
7
7
  getDurationInFrames: () => n.durationInFrames,
8
- getProgress: ({ frame: t }) => D(t, [0, n.durationInFrames], [0, 1], {
8
+ getProgress: ({ frame: e }) => D(e, [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
+ }), le = (n = {}) => ({
14
+ getDurationInFrames: ({ fps: e }) => n.durationInFrames ? n.durationInFrames : mt({
15
15
  config: n.config,
16
16
  threshold: n.durationRestThreshold,
17
- fps: t
17
+ fps: e
18
18
  }),
19
- getProgress: ({ fps: t, frame: e }) => {
19
+ getProgress: ({ fps: e, frame: t }) => {
20
20
  const r = n.reverse ? 0 : 1, s = n.reverse ? 1 : 0;
21
- return ce({
22
- fps: t,
23
- frame: e,
21
+ return ut({
22
+ fps: e,
23
+ frame: t,
24
24
  to: r,
25
25
  from: s,
26
26
  config: n.config,
@@ -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 wt = {
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
+ }, $t = {
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
+ }, bt = {
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
+ }, Tt = {
144
144
  "style.backgroundColor": {
145
145
  type: "color",
146
146
  default: "transparent",
147
147
  description: "Color"
148
148
  }
149
- }, Se = {
149
+ }, St = {
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
+ }, vt = {
168
+ ...St
169
+ }, Ft = {
170
170
  cropLeft: {
171
171
  type: "number",
172
172
  default: 0,
@@ -207,66 +207,66 @@ 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
+ }, xt = Ft, It = {
211
+ ...xt,
212
+ ...wt,
213
+ ...Tt,
214
+ ...$t,
215
+ ...bt,
216
+ ...vt
217
+ }, Et = {
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": It,
224
224
  none: {}
225
225
  }
226
226
  }
227
227
  };
228
228
  ({
229
- ...Ee.layout
229
+ ...Et.layout
230
230
  });
231
- function Pe(n, t) {
232
- const { allowFloats: e, component: r } = t;
231
+ function Pt(n, e) {
232
+ const { allowFloats: t, component: r } = e;
233
233
  if (typeof n > "u")
234
234
  throw new Error(`The "durationInFrames" prop ${r} is missing.`);
235
235
  if (typeof n != "number")
236
236
  throw new Error(`The "durationInFrames" prop ${r} must be a number, but you passed a value of type ${typeof n}`);
237
237
  if (n <= 0)
238
238
  throw new TypeError(`The "durationInFrames" prop ${r} must be positive, but got ${n}.`);
239
- if (!e && n % 1 !== 0)
239
+ if (!t && n % 1 !== 0)
240
240
  throw new TypeError(`The "durationInFrames" prop ${r} must be an integer, but got ${n}.`);
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 Rt = {
245
+ validateDurationInFrames: Pt
246
246
  };
247
- const ne = C.createContext(null), re = C.createContext(null), K = ({ presentationProgress: n, children: t }) => {
248
- const e = h(() => ({
247
+ const nt = M.createContext(null), rt = M.createContext(null), K = ({ presentationProgress: n, children: e }) => {
248
+ const t = g(() => ({
249
249
  enteringProgress: n
250
250
  }), [n]);
251
- return /* @__PURE__ */ o(ne.Provider, { value: e, children: t });
252
- }, G = ({ presentationProgress: n, children: t }) => {
253
- const e = h(() => ({
251
+ return /* @__PURE__ */ o(nt.Provider, { value: t, children: e });
252
+ }, G = ({ presentationProgress: n, children: e }) => {
253
+ const t = g(() => ({
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(rt.Provider, { value: t, children: e });
257
+ }, ot = (n) => M.Children.toArray(n).reduce((t, r) => r.type === M.Fragment ? t.concat(
258
+ ot(
259
259
  r.props.children
260
260
  )
261
- ) : (e.push(r), e), []), Re = 0.01, ke = ({
261
+ ) : (t.push(r), t), []), kt = 0.01, qt = ({
262
262
  children: n,
263
- presentationProgress: t,
264
- presentationDirection: e,
263
+ presentationProgress: e,
264
+ presentationDirection: t,
265
265
  passedProps: { direction: r = "from-left", enterStyle: s, exitStyle: l }
266
266
  }) => {
267
- const u = h(() => {
268
- const i = t === 1 ? t * 100 : t * 100 - Re;
269
- if (e === "exiting")
267
+ const c = g(() => {
268
+ const i = e === 1 ? e * 100 : e * 100 - kt;
269
+ if (t === "exiting")
270
270
  switch (r) {
271
271
  case "from-left":
272
272
  return {
@@ -274,7 +274,7 @@ const ne = C.createContext(null), re = C.createContext(null), K = ({ presentatio
274
274
  };
275
275
  case "from-right":
276
276
  return {
277
- transform: `translateX(${-t * 100}%)`
277
+ transform: `translateX(${-e * 100}%)`
278
278
  };
279
279
  case "from-top":
280
280
  return {
@@ -282,7 +282,7 @@ const ne = C.createContext(null), re = C.createContext(null), K = ({ presentatio
282
282
  };
283
283
  case "from-bottom":
284
284
  return {
285
- transform: `translateY(${-t * 100}%)`
285
+ transform: `translateY(${-e * 100}%)`
286
286
  };
287
287
  default:
288
288
  throw new Error(`Invalid direction: ${r}`);
@@ -290,7 +290,7 @@ const ne = C.createContext(null), re = C.createContext(null), K = ({ presentatio
290
290
  switch (r) {
291
291
  case "from-left":
292
292
  return {
293
- transform: `translateX(${-100 + t * 100}%)`
293
+ transform: `translateX(${-100 + e * 100}%)`
294
294
  };
295
295
  case "from-right":
296
296
  return {
@@ -298,7 +298,7 @@ const ne = C.createContext(null), re = C.createContext(null), K = ({ presentatio
298
298
  };
299
299
  case "from-top":
300
300
  return {
301
- transform: `translateY(${-100 + t * 100}%)`
301
+ transform: `translateY(${-100 + e * 100}%)`
302
302
  };
303
303
  case "from-bottom":
304
304
  return {
@@ -307,132 +307,132 @@ const ne = C.createContext(null), re = C.createContext(null), K = ({ presentatio
307
307
  default:
308
308
  throw new Error(`Invalid direction: ${r}`);
309
309
  }
310
- }, [e, t, r]), a = h(() => ({
310
+ }, [t, e, r]), a = g(() => ({
311
311
  width: "100%",
312
312
  height: "100%",
313
313
  justifyContent: "center",
314
314
  alignItems: "center",
315
- ...u,
316
- ...e === "entering" ? s : l
317
- }), [u, s, l, e]);
318
- return /* @__PURE__ */ o(c, { style: a, children: n });
319
- }, N = (n) => ({
320
- component: ke,
315
+ ...c,
316
+ ...t === "entering" ? s : l
317
+ }), [c, s, l, t]);
318
+ return /* @__PURE__ */ o(u, { style: a, children: n });
319
+ }, X = (n) => ({
320
+ component: qt,
321
321
  props: {}
322
- }), Ce = qe.validateDurationInFrames, L = function(n) {
322
+ }), Ct = Rt.validateDurationInFrames, N = function(n) {
323
323
  return null;
324
- }, z = ({ children: n }) => /* @__PURE__ */ o(ee, { children: n }), Me = ({
324
+ }, _ = ({ children: n }) => /* @__PURE__ */ o(tt, { children: n }), Mt = ({
325
325
  children: n
326
326
  }) => {
327
- const { fps: t } = de(), e = fe(), r = h(() => {
327
+ const { fps: e } = dt(), t = ft(), r = g(() => {
328
328
  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() === "")
329
+ const c = ot(n);
330
+ return ht.map(c, (a, i) => {
331
+ const d = a;
332
+ if (typeof d == "string") {
333
+ if (d.trim() === "")
334
334
  return null;
335
335
  throw new TypeError(
336
- `The <TransitionSeries /> component only accepts a list of <TransitionSeries.Sequence /> components as its children, but you passed a string "${f}"`
336
+ `The <TransitionSeries /> component only accepts a list of <TransitionSeries.Sequence /> components as its children, but you passed a string "${d}"`
337
337
  );
338
338
  }
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 (_)
339
+ const m = c[i - 1], y = c[i + 1], f = typeof m == "string" || typeof m > "u" ? null : m.type === N ? m : null, p = typeof y == "string" || typeof y > "u" ? null : y.type === N ? y : null, A = typeof m == "string" || typeof m > "u" ? !1 : m.type === N;
340
+ if (d.type === N) {
341
+ if (A)
342
342
  throw new TypeError(
343
343
  `A <TransitionSeries.Transition /> component must not be followed by another <TransitionSeries.Transition /> component (nth children = ${i - 1} and ${i})`
344
344
  );
345
345
  return null;
346
346
  }
347
- if (f.type !== z)
347
+ if (d.type !== _)
348
348
  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`
349
+ `The <TransitionSeries /> component only accepts a list of <TransitionSeries.Sequence /> and <TransitionSeries.Transition /> components as its children, but got ${d} instead`
350
350
  );
351
- const E = f, R = `index = ${i}, duration = ${E.props.durationInFrames}`;
351
+ const E = d, k = `index = ${i}, duration = ${E.props.durationInFrames}`;
352
352
  if (!(E != null && E.props.children))
353
353
  throw new TypeError(
354
- `A <TransitionSeries.Sequence /> component (${R}) was detected to not have any children. Delete it to fix this error.`
354
+ `A <TransitionSeries.Sequence /> component (${k}) was detected to not have any children. Delete it to fix this error.`
355
355
  );
356
- const w = E.props.durationInFrames, {
357
- durationInFrames: b,
358
- children: tt,
359
- ...F
356
+ const $ = E.props.durationInFrames, {
357
+ durationInFrames: T,
358
+ children: ne,
359
+ ...v
360
360
  } = E.props;
361
- Ce(w, {
361
+ Ct($, {
362
362
  component: "of a <TransitionSeries.Sequence /> component",
363
363
  allowFloats: !0
364
364
  });
365
365
  const P = E.props.offset ?? 0;
366
366
  if (Number.isNaN(P))
367
367
  throw new TypeError(
368
- `The "offset" property of a <TransitionSeries.Sequence /> must not be NaN, but got NaN (${R}).`
368
+ `The "offset" property of a <TransitionSeries.Sequence /> must not be NaN, but got NaN (${k}).`
369
369
  );
370
370
  if (!Number.isFinite(P))
371
371
  throw new TypeError(
372
- `The "offset" property of a <TransitionSeries.Sequence /> must be finite, but got ${P} (${R}).`
372
+ `The "offset" property of a <TransitionSeries.Sequence /> must be finite, but got ${P} (${k}).`
373
373
  );
374
374
  if (P % 1 !== 0)
375
375
  throw new TypeError(
376
- `The "offset" property of a <TransitionSeries.Sequence /> must be finite, but got ${P} (${R}).`
376
+ `The "offset" property of a <TransitionSeries.Sequence /> must be finite, but got ${P} (${k}).`
377
377
  );
378
- const ie = l + P;
379
- let X = 0;
380
- p && (X = p.props.timing.getDurationInFrames({
381
- 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
- fps: t
388
- }) : null, k = p ? p.props.timing.getProgress({
389
- frame: e - m,
390
- fps: t
391
- }) : null, se = p ? p.props.timing.getProgress({
392
- frame: e - (m + b),
393
- fps: t
378
+ const it = l + P;
379
+ let O = 0;
380
+ f && (O = f.props.timing.getDurationInFrames({
381
+ fps: e
382
+ }), s -= O / 2);
383
+ let h = it - O / 2;
384
+ l += $ + P, h < 0 && (h = 0);
385
+ const U = p ? p.props.timing.getProgress({
386
+ frame: t - h - T + p.props.timing.getDurationInFrames({ fps: e }) / 2 + s,
387
+ fps: e
388
+ }) : null, q = f ? f.props.timing.getProgress({
389
+ frame: t - h,
390
+ fps: e
391
+ }) : null, st = f ? f.props.timing.getProgress({
392
+ frame: t - (h + T),
393
+ fps: e
394
394
  }) : null;
395
- if (g && w < g.props.timing.getDurationInFrames({ fps: t }) / 2)
395
+ if (p && $ < p.props.timing.getDurationInFrames({ fps: e }) / 2)
396
396
  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(
398
- { fps: t }
399
- )} frames long, but the sequence is only ${w} frames long (${R})`
397
+ `The duration of a <TransitionSeries.Sequence /> must not be shorter than the duration of the next <TransitionSeries.Transition />. The transition is ${p.props.timing.getDurationInFrames(
398
+ { fps: e }
399
+ )} frames long, but the sequence is only ${$} frames long (${k})`
400
400
  );
401
- if (p && w < p.props.timing.getDurationInFrames({ fps: t }) / 2)
401
+ if (f && $ < f.props.timing.getDurationInFrames({ fps: e }) / 2)
402
402
  throw new Error(
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(
404
- { fps: t }
405
- )} frames long, but the sequence is only ${w} frames long (${R})`
403
+ `The duration of a <TransitionSeries.Sequence /> must not be shorter than the duration of the previous <TransitionSeries.Transition />. The transition is ${f.props.timing.getDurationInFrames(
404
+ { fps: e }
405
+ )} frames long, but the sequence is only ${$} frames long (${k})`
406
406
  );
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({
409
- fps: t
410
- }), S = g.props.timing.getDurationInFrames({
411
- 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),
414
- fps: t
415
- }), le = e > m, ue = e < m + b + S / 2 + I / 2;
407
+ if (p && f && st !== null && q !== null) {
408
+ const F = p.props.presentation ?? X(), x = f.props.presentation ?? X(), I = f.props.timing.getDurationInFrames({
409
+ fps: e
410
+ }), S = p.props.timing.getDurationInFrames({
411
+ fps: e
412
+ }), R = F.component, Y = x.component, j = t < +Math.floor(h) + I / 2, V = t > Math.floor(h) + Math.floor(T) + I / 2, at = V ? Math.floor(h) + Math.floor(T) + Math.floor(S / 2) : Math.floor(h), H = j ? Math.floor(h) : Math.floor(h) + I / 2, J = p.props.timing.getProgress({
413
+ frame: t - (H + T - S / 2),
414
+ fps: e
415
+ }), lt = t > h, ct = t < h + T + S / 2 + I / 2;
416
416
  return /* @__PURE__ */ o(
417
- Y,
417
+ z,
418
418
  {
419
- active: ue && le && (j || V),
420
- frame: ae,
419
+ active: ct && lt && (j || V),
420
+ frame: at,
421
421
  children: /* @__PURE__ */ o(
422
- M,
422
+ L,
423
423
  {
424
424
  from: H,
425
- durationInFrames: w + S / 2,
426
- ...F,
427
- name: F.name || "<TS.Sequence>",
425
+ durationInFrames: $ + S / 2,
426
+ ...v,
427
+ name: v.name || "<TS.Sequence>",
428
428
  children: /* @__PURE__ */ o(
429
- q,
429
+ R,
430
430
  {
431
- passedProps: v.props ?? {},
431
+ passedProps: F.props ?? {},
432
432
  presentationDirection: "exiting",
433
433
  presentationProgress: J,
434
- presentationDurationInFrames: g.props.timing.getDurationInFrames(
435
- { fps: t }
434
+ presentationDurationInFrames: p.props.timing.getDurationInFrames(
435
+ { fps: e }
436
436
  ),
437
437
  onElementImage: () => {
438
438
  },
@@ -444,13 +444,13 @@ const ne = C.createContext(null), re = C.createContext(null), K = ({ presentatio
444
444
  {
445
445
  presentationProgress: J,
446
446
  children: /* @__PURE__ */ o(
447
- U,
447
+ Y,
448
448
  {
449
449
  passedProps: x.props ?? {},
450
450
  presentationDirection: "entering",
451
- presentationProgress: k,
452
- presentationDurationInFrames: p.props.timing.getDurationInFrames(
453
- { fps: t }
451
+ presentationProgress: q,
452
+ presentationDurationInFrames: f.props.timing.getDurationInFrames(
453
+ { fps: e }
454
454
  ),
455
455
  onElementImage: () => {
456
456
  },
@@ -460,7 +460,7 @@ const ne = C.createContext(null), re = C.createContext(null), K = ({ presentatio
460
460
  children: /* @__PURE__ */ o(
461
461
  K,
462
462
  {
463
- presentationProgress: k,
463
+ presentationProgress: q,
464
464
  children: a
465
465
  }
466
466
  )
@@ -477,28 +477,28 @@ const ne = C.createContext(null), re = C.createContext(null), K = ({ presentatio
477
477
  i
478
478
  );
479
479
  }
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;
480
+ if (q !== null && f) {
481
+ const F = f.props.timing.getDurationInFrames({ fps: e }) / 2, x = f.props.presentation ?? X(), I = x.component, S = t < h + F, R = S ? Math.floor(h) : Math.floor(h) + F, Y = t > R;
482
482
  return /* @__PURE__ */ o(
483
- Y,
483
+ z,
484
484
  {
485
- active: U && S,
486
- frame: q,
485
+ active: Y && S,
486
+ frame: R,
487
487
  children: /* @__PURE__ */ o(
488
- M,
488
+ L,
489
489
  {
490
- from: q,
491
- durationInFrames: w,
492
- ...F,
493
- name: F.name || "<TS.Sequence>",
490
+ from: R,
491
+ durationInFrames: $,
492
+ ...v,
493
+ name: v.name || "<TS.Sequence>",
494
494
  children: /* @__PURE__ */ o(
495
495
  I,
496
496
  {
497
497
  passedProps: x.props ?? {},
498
498
  presentationDirection: "entering",
499
- presentationProgress: k,
500
- presentationDurationInFrames: p.props.timing.getDurationInFrames(
501
- { fps: t }
499
+ presentationProgress: q,
500
+ presentationDurationInFrames: f.props.timing.getDurationInFrames(
501
+ { fps: e }
502
502
  ),
503
503
  onElementImage: () => {
504
504
  },
@@ -508,7 +508,7 @@ const ne = C.createContext(null), re = C.createContext(null), K = ({ presentatio
508
508
  children: /* @__PURE__ */ o(
509
509
  K,
510
510
  {
511
- presentationProgress: k,
511
+ presentationProgress: q,
512
512
  children: a
513
513
  }
514
514
  )
@@ -521,28 +521,28 @@ const ne = C.createContext(null), re = C.createContext(null), K = ({ presentatio
521
521
  i
522
522
  );
523
523
  }
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;
524
+ if (U !== null && p) {
525
+ const F = p.props.timing.getDurationInFrames({ fps: e }) / 2, x = p.props.presentation ?? X(), I = x.component, S = t > Math.floor(T) + Math.floor(h), R = t < Math.floor(T) + Math.floor(h) + F;
526
526
  return /* @__PURE__ */ o(
527
- Y,
527
+ z,
528
528
  {
529
- active: q && S,
530
- frame: Math.floor(b),
529
+ active: R && S,
530
+ frame: Math.floor(T),
531
531
  children: /* @__PURE__ */ o(
532
- M,
532
+ L,
533
533
  {
534
- from: Math.floor(m),
535
- durationInFrames: w + v,
536
- ...F,
537
- name: F.name || "<TS.Sequence>",
534
+ from: Math.floor(h),
535
+ durationInFrames: $ + F,
536
+ ...v,
537
+ name: v.name || "<TS.Sequence>",
538
538
  children: /* @__PURE__ */ o(
539
539
  I,
540
540
  {
541
541
  passedProps: x.props ?? {},
542
542
  presentationDirection: "exiting",
543
- presentationProgress: O,
544
- presentationDurationInFrames: g.props.timing.getDurationInFrames(
545
- { fps: t }
543
+ presentationProgress: U,
544
+ presentationDurationInFrames: p.props.timing.getDurationInFrames(
545
+ { fps: e }
546
546
  ),
547
547
  onElementImage: () => {
548
548
  },
@@ -552,7 +552,7 @@ const ne = C.createContext(null), re = C.createContext(null), K = ({ presentatio
552
552
  children: /* @__PURE__ */ o(
553
553
  G,
554
554
  {
555
- presentationProgress: O,
555
+ presentationProgress: U,
556
556
  children: a
557
557
  }
558
558
  )
@@ -566,157 +566,196 @@ const ne = C.createContext(null), re = C.createContext(null), K = ({ presentatio
566
566
  );
567
567
  }
568
568
  return /* @__PURE__ */ o(
569
- M,
569
+ L,
570
570
  {
571
- from: Math.floor(m),
572
- durationInFrames: w,
573
- ...F,
574
- name: F.name || "<TS.Sequence>",
571
+ from: Math.floor(h),
572
+ durationInFrames: $,
573
+ ...v,
574
+ name: v.name || "<TS.Sequence>",
575
575
  children: a
576
576
  },
577
577
  i
578
578
  );
579
579
  });
580
- }, [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);
589
- return !n && !t ? {
580
+ }, [n, e, t]);
581
+ return /* @__PURE__ */ o(tt, { children: r });
582
+ }, w = ({ children: n, name: e, layout: t, ...r }) => /* @__PURE__ */ o(L, { name: e ?? "<TransitionSeries>", layout: t ?? "absolute-fill", ...r, children: /* @__PURE__ */ o(Mt, { children: n }) });
583
+ w.Sequence = _;
584
+ w.Transition = N;
585
+ Z.addSequenceStackTraces(w);
586
+ Z.addSequenceStackTraces(_);
587
+ const ce = () => {
588
+ const n = M.useContext(nt), e = M.useContext(rt);
589
+ return !n && !e ? {
590
590
  isInTransitionSeries: !1,
591
591
  entering: 1,
592
592
  exiting: 0
593
593
  } : {
594
594
  isInTransitionSeries: !0,
595
595
  entering: (n == null ? void 0 : n.enteringProgress) ?? 1,
596
- exiting: (t == null ? void 0 : t.exitingProgress) ?? 0
596
+ exiting: (e == null ? void 0 : e.exitingProgress) ?? 0
597
597
  };
598
- }, Le = ({
598
+ }, Lt = ({
599
599
  children: n,
600
- presentationDirection: t,
601
- presentationProgress: e,
600
+ presentationDirection: e,
601
+ presentationProgress: t,
602
602
  passedProps: r
603
603
  }) => {
604
- const l = Math.sqrt(r.width ** 2 + r.height ** 2) / 2 * e, u = Be(
604
+ const l = Math.sqrt(r.width ** 2 + r.height ** 2) / 2 * t, c = Wt(
605
605
  r.width / 2,
606
606
  r.height / 2,
607
607
  l
608
- ), [a] = A(() => String(B(null))), i = h(() => ({
608
+ ), [a] = B(() => String(W(null))), i = g(() => ({
609
609
  width: "100%",
610
610
  height: "100%",
611
- clipPath: t === "exiting" ? void 0 : `url(#${a})`
612
- }), [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" }) }) }) }) })
611
+ clipPath: e === "exiting" ? void 0 : `url(#${a})`
612
+ }), [a, e]);
613
+ return /* @__PURE__ */ C(u, { children: [
614
+ /* @__PURE__ */ o(u, { style: i, children: n }),
615
+ e === "exiting" ? null : /* @__PURE__ */ o(u, { 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: c, fill: "black" }) }) }) }) })
616
616
  ] });
617
- }, Ne = (n) => ({ component: Le, props: n }), Be = (n, t, e) => `M ${n}, ${t}
618
- m -${e}, 0
619
- a ${e},${e} 0 1,0 ${e * 2},0
620
- a ${e},${e} 0 1,0 -${e * 2},0`, We = ({
617
+ }, Nt = (n) => ({ component: Lt, props: n }), Wt = (n, e, t) => `M ${n}, ${e}
618
+ m -${t}, 0
619
+ a ${t},${t} 0 1,0 ${t * 2},0
620
+ a ${t},${t} 0 1,0 -${t * 2},0`, Bt = ({
621
621
  children: n,
622
- presentationDirection: t,
623
- presentationProgress: e,
622
+ presentationDirection: e,
623
+ presentationProgress: t,
624
+ passedProps: r
625
+ }) => {
626
+ const { width: s, height: l } = r, c = -s * 0.35, a = l * 0.52, i = Math.sqrt((s - c) ** 2 + Math.max(a, l - a) ** 2), d = s * 0.3, m = d + (i - d + s * 0.1) * t, [y] = B(() => String(W(null))), f = Math.max(3, Math.round(s * 7e-3)), p = Math.max(0, m - f / 2), A = g(() => ({
627
+ width: "100%",
628
+ height: "100%",
629
+ clipPath: e === "exiting" ? void 0 : `url(#${y})`
630
+ }), [y, e]);
631
+ return /* @__PURE__ */ C(u, { children: [
632
+ /* @__PURE__ */ o(u, { style: A, children: n }),
633
+ e === "exiting" ? null : /* @__PURE__ */ o(u, { style: { pointerEvents: "none" }, children: /* @__PURE__ */ C(
634
+ "svg",
635
+ {
636
+ width: s,
637
+ height: l,
638
+ style: { position: "absolute", inset: 0, width: "100%", height: "100%" },
639
+ children: [
640
+ /* @__PURE__ */ o("defs", { children: /* @__PURE__ */ o("clipPath", { id: y, children: /* @__PURE__ */ o("circle", { cx: c, cy: a, r: m, fill: "black" }) }) }),
641
+ t > 0 && t < 1 && /* @__PURE__ */ o(
642
+ "circle",
643
+ {
644
+ cx: c,
645
+ cy: a,
646
+ r: p,
647
+ fill: "none",
648
+ stroke: "#1e3a8a",
649
+ strokeWidth: f
650
+ }
651
+ )
652
+ ]
653
+ }
654
+ ) })
655
+ ] });
656
+ }, ue = (n) => ({
657
+ component: Bt,
658
+ props: n
659
+ }), At = ({
660
+ children: n,
661
+ presentationDirection: e,
662
+ presentationProgress: t,
624
663
  passedProps: r
625
664
  }) => {
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(() => ({
665
+ const { width: s, height: l } = r, c = s * t, a = l * t, i = s / 2 - c / 2, d = l / 2 - a / 2, [m] = B(() => String(W(null))), y = g(() => ({
627
666
  width: "100%",
628
667
  height: "100%",
629
- clipPath: t === "exiting" ? void 0 : `url(#${d})`
630
- }), [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(
668
+ clipPath: e === "exiting" ? void 0 : `url(#${m})`
669
+ }), [m, e]);
670
+ return /* @__PURE__ */ C(u, { children: [
671
+ /* @__PURE__ */ o(u, { style: y, children: n }),
672
+ e === "exiting" ? null : /* @__PURE__ */ o(u, { children: /* @__PURE__ */ o("svg", { children: /* @__PURE__ */ o("defs", { children: /* @__PURE__ */ o("clipPath", { id: m, children: /* @__PURE__ */ o(
634
673
  "rect",
635
674
  {
636
675
  x: i,
637
- y: f,
638
- width: u,
676
+ y: d,
677
+ width: c,
639
678
  height: a,
640
679
  fill: "black"
641
680
  }
642
681
  ) }) }) }) })
643
682
  ] });
644
- }, Ae = (n) => ({ component: We, props: n }), Xe = ({
683
+ }, Xt = (n) => ({ component: At, props: n }), Ot = ({
645
684
  children: n,
646
- presentationDirection: t,
647
- presentationProgress: e,
685
+ presentationDirection: e,
686
+ presentationProgress: t,
648
687
  passedProps: r
649
688
  }) => {
650
- const s = Math.sqrt(r.width ** 2 + r.height ** 2) / 2, l = s * e, u = s * 2 * e, { path: a } = ge({
689
+ const s = Math.sqrt(r.width ** 2 + r.height ** 2) / 2, l = s * t, c = s * 2 * t, { path: a } = gt({
651
690
  innerRadius: l,
652
- outerRadius: u,
691
+ outerRadius: c,
653
692
  points: 5
654
- }), i = he(a), f = te(
693
+ }), i = pt(a), d = et(
655
694
  a,
656
695
  r.width / 2 - i.width / 2,
657
696
  r.height / 2 - i.height / 2
658
- ), [d] = A(() => String(B(null))), $ = h(() => ({
697
+ ), [m] = B(() => String(W(null))), y = g(() => ({
659
698
  width: "100%",
660
699
  height: "100%",
661
- clipPath: t === "exiting" ? void 0 : `url(#${d})`
662
- }), [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" }) }) }) }) })
700
+ clipPath: e === "exiting" ? void 0 : `url(#${m})`
701
+ }), [m, e]);
702
+ return /* @__PURE__ */ C(u, { children: [
703
+ /* @__PURE__ */ o(u, { style: y, children: n }),
704
+ e === "exiting" ? null : /* @__PURE__ */ o(u, { children: /* @__PURE__ */ o("svg", { children: /* @__PURE__ */ o("defs", { children: /* @__PURE__ */ o("clipPath", { id: m, children: /* @__PURE__ */ o("path", { d, fill: "black" }) }) }) }) })
666
705
  ] });
667
- }, Oe = (n) => ({ component: Xe, props: n }), Ue = ({
706
+ }, Ut = (n) => ({ component: Ot, props: n }), Yt = ({
668
707
  children: n,
669
- presentationDirection: t,
670
- presentationProgress: e,
708
+ presentationDirection: e,
709
+ presentationProgress: t,
671
710
  passedProps: r
672
711
  }) => {
673
- const { width: s, height: l } = r, u = s * e, a = s / 2 - u / 2, [i] = A(() => String(B(null))), f = h(() => ({
712
+ const { width: s, height: l } = r, c = s * t, a = s / 2 - c / 2, [i] = B(() => String(W(null))), d = g(() => ({
674
713
  width: "100%",
675
714
  height: "100%",
676
- clipPath: t === "exiting" ? void 0 : `url(#${i})`
677
- }), [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(
715
+ clipPath: e === "exiting" ? void 0 : `url(#${i})`
716
+ }), [i, e]);
717
+ return /* @__PURE__ */ C(u, { children: [
718
+ /* @__PURE__ */ o(u, { style: d, children: n }),
719
+ e === "exiting" ? null : /* @__PURE__ */ o(u, { children: /* @__PURE__ */ o("svg", { children: /* @__PURE__ */ o("defs", { children: /* @__PURE__ */ o("clipPath", { id: i, children: /* @__PURE__ */ o(
681
720
  "rect",
682
721
  {
683
722
  x: a,
684
723
  y: 0,
685
- width: u,
724
+ width: c,
686
725
  height: l,
687
726
  fill: "black"
688
727
  }
689
728
  ) }) }) }) })
690
729
  ] });
691
- }, Ye = (n) => ({ component: Ue, props: n });
692
- var De = ({ children: n, presentationDirection: t, presentationProgress: e, passedProps: r }) => {
693
- const s = t === "entering", l = h(() => ({
694
- opacity: s ? e : r.shouldFadeOutExitingScene ? 1 - e : 1,
695
- ...t === "entering" ? r.enterStyle : r.exitStyle
730
+ }, zt = (n) => ({ component: Yt, props: n });
731
+ var Dt = ({ children: n, presentationDirection: e, presentationProgress: t, passedProps: r }) => {
732
+ const s = e === "entering", l = g(() => ({
733
+ opacity: s ? t : r.shouldFadeOutExitingScene ? 1 - t : 1,
734
+ ...e === "entering" ? r.enterStyle : r.exitStyle
696
735
  }), [
697
736
  s,
698
737
  r.enterStyle,
699
738
  r.exitStyle,
700
739
  r.shouldFadeOutExitingScene,
701
- t,
702
- e
740
+ e,
741
+ t
703
742
  ]);
704
- return /* @__PURE__ */ o(c, {
743
+ return /* @__PURE__ */ o(u, {
705
744
  style: l,
706
745
  children: n
707
746
  });
708
747
  }, Q = (n) => ({
709
- component: De,
748
+ component: Dt,
710
749
  props: n ?? {}
711
- }), ze = 0.01, _e = ({
750
+ }), _t = 0.01, jt = ({
712
751
  children: n,
713
- presentationProgress: t,
714
- presentationDirection: e,
752
+ presentationProgress: e,
753
+ presentationDirection: t,
715
754
  passedProps: { direction: r = "from-left", enterStyle: s, exitStyle: l }
716
755
  }) => {
717
- const u = h(() => {
718
- const i = t === 1 ? t * 100 : t * 100 - ze;
719
- if (e === "exiting")
756
+ const c = g(() => {
757
+ const i = e === 1 ? e * 100 : e * 100 - _t;
758
+ if (t === "exiting")
720
759
  switch (r) {
721
760
  case "from-left":
722
761
  return {
@@ -724,7 +763,7 @@ var De = ({ children: n, presentationDirection: t, presentationProgress: e, pass
724
763
  };
725
764
  case "from-right":
726
765
  return {
727
- transform: `translateX(${-t * 100}%)`
766
+ transform: `translateX(${-e * 100}%)`
728
767
  };
729
768
  case "from-top":
730
769
  return {
@@ -732,7 +771,7 @@ var De = ({ children: n, presentationDirection: t, presentationProgress: e, pass
732
771
  };
733
772
  case "from-bottom":
734
773
  return {
735
- transform: `translateY(${-t * 100}%)`
774
+ transform: `translateY(${-e * 100}%)`
736
775
  };
737
776
  default:
738
777
  throw new Error(`Invalid direction: ${r}`);
@@ -740,7 +779,7 @@ var De = ({ children: n, presentationDirection: t, presentationProgress: e, pass
740
779
  switch (r) {
741
780
  case "from-left":
742
781
  return {
743
- transform: `translateX(${-100 + t * 100}%)`
782
+ transform: `translateX(${-100 + e * 100}%)`
744
783
  };
745
784
  case "from-right":
746
785
  return {
@@ -748,7 +787,7 @@ var De = ({ children: n, presentationDirection: t, presentationProgress: e, pass
748
787
  };
749
788
  case "from-top":
750
789
  return {
751
- transform: `translateY(${-100 + t * 100}%)`
790
+ transform: `translateY(${-100 + e * 100}%)`
752
791
  };
753
792
  case "from-bottom":
754
793
  return {
@@ -757,264 +796,265 @@ var De = ({ children: n, presentationDirection: t, presentationProgress: e, pass
757
796
  default:
758
797
  throw new Error(`Invalid direction: ${r}`);
759
798
  }
760
- }, [e, t, r]), a = h(() => ({
799
+ }, [t, e, r]), a = g(() => ({
761
800
  width: "100%",
762
801
  height: "100%",
763
802
  justifyContent: "center",
764
803
  alignItems: "center",
765
- ...u,
766
- ...e === "entering" ? s : l
767
- }), [u, s, l, e]);
768
- return /* @__PURE__ */ o(c, {
804
+ ...c,
805
+ ...t === "entering" ? s : l
806
+ }), [c, s, l, t]);
807
+ return /* @__PURE__ */ o(u, {
769
808
  style: a,
770
809
  children: n
771
810
  });
772
- }, je = (n) => ({
773
- component: _e,
811
+ }, Vt = (n) => ({
812
+ component: jt,
774
813
  props: n ?? {}
775
- }), Ve = (n, t) => {
776
- const e = n * 100;
777
- switch (t) {
814
+ }), Ht = (n, e) => {
815
+ const t = n * 100;
816
+ switch (e) {
778
817
  case "from-left":
779
- return `polygon(0% 0%, ${e}% 0%, ${e}% 100%, 0% 100%)`;
818
+ return `polygon(0% 0%, ${t}% 0%, ${t}% 100%, 0% 100%)`;
780
819
  case "from-top-left":
781
- return `polygon(0% 0%, ${e * 2}% 0%, 0% ${e * 2}%)`;
820
+ return `polygon(0% 0%, ${t * 2}% 0%, 0% ${t * 2}%)`;
782
821
  case "from-top":
783
- return `polygon(0% 0%, 100% 0%, 100% ${e}%, 0% ${e}%)`;
822
+ return `polygon(0% 0%, 100% 0%, 100% ${t}%, 0% ${t}%)`;
784
823
  case "from-top-right":
785
- return `polygon(100% 0%, ${100 - e * 2}% 0%, 100% ${e * 2}%)`;
824
+ return `polygon(100% 0%, ${100 - t * 2}% 0%, 100% ${t * 2}%)`;
786
825
  case "from-right":
787
- return `polygon(100% 0%, 100% 100%, ${100 - e}% 100%, ${100 - e}% 0%)`;
826
+ return `polygon(100% 0%, 100% 100%, ${100 - t}% 100%, ${100 - t}% 0%)`;
788
827
  case "from-bottom-right":
789
- return `polygon(100% 100%, ${100 - e * 2}% 100%, 100% ${100 - e * 2}%)`;
828
+ return `polygon(100% 100%, ${100 - t * 2}% 100%, 100% ${100 - t * 2}%)`;
790
829
  case "from-bottom":
791
- return `polygon(0% 100%, 100% 100%, 100% ${100 - e}%, 0% ${100 - e}%)`;
830
+ return `polygon(0% 100%, 100% 100%, 100% ${100 - t}%, 0% ${100 - t}%)`;
792
831
  case "from-bottom-left":
793
- return `polygon(0% 100%, 0% ${100 - e * 2}%, ${e * 2}% 100%)`;
832
+ return `polygon(0% 100%, 0% ${100 - t * 2}%, ${t * 2}% 100%)`;
794
833
  default:
795
- throw new Error(`Unknown direction ${JSON.stringify(t)}`);
834
+ throw new Error(`Unknown direction ${JSON.stringify(e)}`);
796
835
  }
797
- }, He = (n, t) => {
798
- const e = n * 100;
799
- switch (t) {
836
+ }, Jt = (n, e) => {
837
+ const t = n * 100;
838
+ switch (e) {
800
839
  case "from-left":
801
- return `polygon(100% 100%, ${100 - e}% 100%, ${100 - e}% 0%, 100% 0%)`;
840
+ return `polygon(100% 100%, ${100 - t}% 100%, ${100 - t}% 0%, 100% 0%)`;
802
841
  case "from-top-left":
803
- return `polygon(100% 100%, ${100 - e * 2}% 100%, 100% ${100 - e * 2}%)`;
842
+ return `polygon(100% 100%, ${100 - t * 2}% 100%, 100% ${100 - t * 2}%)`;
804
843
  case "from-top":
805
- return `polygon(100% 100%, 0% 100%, 0% ${100 - e}%, 100% ${100 - e}%)`;
844
+ return `polygon(100% 100%, 0% 100%, 0% ${100 - t}%, 100% ${100 - t}%)`;
806
845
  case "from-top-right":
807
- return `polygon(0% 100%, ${e * 2}% 100%, 0% ${100 - e * 2}%)`;
846
+ return `polygon(0% 100%, ${t * 2}% 100%, 0% ${100 - t * 2}%)`;
808
847
  case "from-right":
809
- return `polygon(0% 0%, ${e}% 0%, ${e}% 100%, 0% 100%)`;
848
+ return `polygon(0% 0%, ${t}% 0%, ${t}% 100%, 0% 100%)`;
810
849
  case "from-bottom-right":
811
- return `polygon(0% 0%, ${e * 2}% 0%, 0% ${e * 2}%)`;
850
+ return `polygon(0% 0%, ${t * 2}% 0%, 0% ${t * 2}%)`;
812
851
  case "from-bottom":
813
- return `polygon(100% 0%, 0% 0%, 0% ${e}%, 100% ${e}%)`;
852
+ return `polygon(100% 0%, 0% 0%, 0% ${t}%, 100% ${t}%)`;
814
853
  case "from-bottom-left":
815
- return `polygon(100% 0%, ${100 - e * 2}% 0%, 100% ${e * 2}%)`;
854
+ return `polygon(100% 0%, ${100 - t * 2}% 0%, 100% ${t * 2}%)`;
816
855
  default:
817
- throw new Error(`Unknown direction ${JSON.stringify(t)}`);
856
+ throw new Error(`Unknown direction ${JSON.stringify(e)}`);
818
857
  }
819
- }, Je = ({
858
+ }, Kt = ({
820
859
  children: n,
821
- presentationProgress: t,
822
- presentationDirection: e,
860
+ presentationProgress: e,
861
+ presentationDirection: t,
823
862
  passedProps: {
824
863
  direction: r = "from-left",
825
864
  innerEnterStyle: s,
826
865
  innerExitStyle: l,
827
- outerEnterStyle: u,
866
+ outerEnterStyle: c,
828
867
  outerExitStyle: a
829
868
  }
830
869
  }) => {
831
- const i = e === "entering" ? t : 1 - t, f = e === "entering" ? Ve(i, r) : He(i, r), d = h(() => ({
870
+ const i = t === "entering" ? e : 1 - e, d = t === "entering" ? Ht(i, r) : Jt(i, r), m = g(() => ({
832
871
  width: "100%",
833
872
  height: "100%",
834
873
  justifyContent: "center",
835
874
  alignItems: "center",
836
- clipPath: f,
837
- ...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, {
842
- style: d,
875
+ clipPath: d,
876
+ ...t === "entering" ? s : l
877
+ }), [d, s, l, t]), y = g(() => t === "entering" ? c : a, [c, a, t]);
878
+ return /* @__PURE__ */ o(u, {
879
+ style: y,
880
+ children: /* @__PURE__ */ o(u, {
881
+ style: m,
843
882
  children: n
844
883
  })
845
884
  });
846
- }, Ke = (n) => ({
847
- component: Je,
885
+ }, Gt = (n) => ({
886
+ component: Kt,
848
887
  props: n ?? {}
849
- }), Ge = ({
888
+ }), Qt = ({
850
889
  children: n,
851
- presentationDirection: t,
852
- presentationProgress: e,
890
+ presentationDirection: e,
891
+ presentationProgress: t,
853
892
  passedProps: {
854
893
  direction: r = "from-left",
855
894
  perspective: s = 1e3,
856
895
  innerEnterStyle: l,
857
- innerExitStyle: u,
896
+ innerExitStyle: c,
858
897
  outerEnterStyle: a,
859
898
  outerExitStyle: i
860
899
  }
861
900
  }) => {
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]);
901
+ const d = g(() => {
902
+ const p = e === "entering" ? D(t, [0, 1], [r === "from-right" || r === "from-top" ? 180 : -180, 0]) : D(t, [0, 1], [0, r === "from-right" || r === "from-top" ? -180 : 180]);
864
903
  return {
865
904
  width: "100%",
866
905
  height: "100%",
867
- transform: `${r === "from-top" || r === "from-bottom" ? "rotateX" : "rotateY"}(${g}deg)`,
906
+ transform: `${r === "from-top" || r === "from-bottom" ? "rotateX" : "rotateY"}(${p}deg)`,
868
907
  backfaceVisibility: "hidden",
869
908
  WebkitBackfaceVisibility: "hidden",
870
- ...t === "entering" ? l : u
909
+ ...e === "entering" ? l : c
871
910
  };
872
911
  }, [
873
912
  r,
874
913
  l,
875
- u,
876
- t,
877
- e
878
- ]), d = h(() => ({
914
+ c,
915
+ e,
916
+ t
917
+ ]), m = g(() => ({
879
918
  perspective: s,
880
919
  transformStyle: "preserve-3d",
881
- ...t === "entering" ? a : i
882
- }), [a, i, s, t]);
883
- return /* @__PURE__ */ o(c, {
884
- style: d,
885
- children: /* @__PURE__ */ o(c, {
886
- style: f,
920
+ ...e === "entering" ? a : i
921
+ }), [a, i, s, e]);
922
+ return /* @__PURE__ */ o(u, {
923
+ style: m,
924
+ children: /* @__PURE__ */ o(u, {
925
+ style: d,
887
926
  children: n
888
927
  })
889
928
  });
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({
929
+ }, Zt = (n) => ({ component: Qt, props: n ?? {} }), te = ({ children: n, presentationDirection: e, presentationProgress: t, passedProps: r }) => {
930
+ const s = Math.sqrt(r.width ** 2 + r.height ** 2) / 2, { path: l } = yt({
892
931
  radius: s,
893
- progress: e
894
- }), u = te(l, -(s * 2 - r.width) / 2, -(s * 2 - r.height) / 2), a = h(() => ({
932
+ progress: t
933
+ }), c = et(l, -(s * 2 - r.width) / 2, -(s * 2 - r.height) / 2), a = g(() => ({
895
934
  width: "100%",
896
935
  height: "100%",
897
- clipPath: t === "exiting" ? void 0 : `path("${u}")`,
898
- ...t === "entering" ? r.innerEnterStyle : r.innerExitStyle
936
+ clipPath: e === "exiting" ? void 0 : `path("${c}")`,
937
+ ...e === "entering" ? r.innerEnterStyle : r.innerExitStyle
899
938
  }), [
900
- u,
939
+ c,
901
940
  r.innerEnterStyle,
902
941
  r.innerExitStyle,
903
- t
904
- ]), i = h(() => t === "entering" ? r.outerEnterStyle : r.outerExitStyle, [
942
+ e
943
+ ]), i = g(() => e === "entering" ? r.outerEnterStyle : r.outerExitStyle, [
905
944
  r.outerEnterStyle,
906
945
  r.outerExitStyle,
907
- t
946
+ e
908
947
  ]);
909
- return /* @__PURE__ */ o(c, {
948
+ return /* @__PURE__ */ o(u, {
910
949
  style: i,
911
- children: /* @__PURE__ */ o(c, {
950
+ children: /* @__PURE__ */ o(u, {
912
951
  style: a,
913
952
  children: n
914
953
  })
915
954
  });
916
- }, et = (n) => ({ component: Ze, props: n ?? {} });
917
- const ut = {
955
+ }, ee = (n) => ({ component: te, props: n ?? {} });
956
+ const me = {
918
957
  none: ({ id: n }) => /* @__PURE__ */ o(
919
- y.Transition,
958
+ w.Transition,
920
959
  {
921
960
  presentation: Q(),
922
- timing: T({ durationInFrames: 1 })
961
+ timing: b({ durationInFrames: 1 })
923
962
  },
924
963
  n
925
964
  ),
926
- fade: ({ durationInFrames: n, id: t }) => /* @__PURE__ */ o(
927
- y.Transition,
965
+ fade: ({ durationInFrames: n, id: e }) => /* @__PURE__ */ o(
966
+ w.Transition,
928
967
  {
929
968
  presentation: Q(),
930
- timing: T({ durationInFrames: n })
969
+ timing: b({ durationInFrames: n })
931
970
  },
932
- t
971
+ e
933
972
  ),
934
- slide: ({ durationInFrames: n, id: t, direction: e }) => /* @__PURE__ */ o(
935
- y.Transition,
973
+ slide: ({ durationInFrames: n, id: e, direction: t }) => /* @__PURE__ */ o(
974
+ w.Transition,
936
975
  {
937
- presentation: je({ direction: e }),
938
- timing: T({ durationInFrames: n })
976
+ presentation: Vt({ direction: t }),
977
+ timing: b({ durationInFrames: n })
939
978
  },
940
- t
979
+ e
941
980
  ),
942
- wipe: ({ durationInFrames: n, id: t, direction: e }) => /* @__PURE__ */ o(
943
- y.Transition,
981
+ wipe: ({ durationInFrames: n, id: e, direction: t }) => /* @__PURE__ */ o(
982
+ w.Transition,
944
983
  {
945
- presentation: Ke({ direction: e }),
946
- timing: T({ durationInFrames: n })
984
+ presentation: Gt({ direction: t }),
985
+ timing: b({ durationInFrames: n })
947
986
  },
948
- t
987
+ e
949
988
  ),
950
- flip: ({ durationInFrames: n, id: t }) => /* @__PURE__ */ o(
951
- y.Transition,
989
+ flip: ({ durationInFrames: n, id: e }) => /* @__PURE__ */ o(
990
+ w.Transition,
952
991
  {
953
- presentation: Qe(),
954
- timing: T({ durationInFrames: n })
992
+ presentation: Zt(),
993
+ timing: b({ durationInFrames: n })
955
994
  },
956
- t
995
+ e
957
996
  ),
958
- clockWipe: ({ width: n, height: t, durationInFrames: e, id: r }) => /* @__PURE__ */ o(
959
- y.Transition,
997
+ clockWipe: ({ width: n, height: e, durationInFrames: t, id: r }) => /* @__PURE__ */ o(
998
+ w.Transition,
960
999
  {
961
- presentation: et({ width: n, height: t }),
962
- timing: T({ durationInFrames: e })
1000
+ presentation: ee({ width: n, height: e }),
1001
+ timing: b({ durationInFrames: t })
963
1002
  },
964
1003
  r
965
1004
  ),
966
- star: ({ width: n, height: t, durationInFrames: e, id: r }) => /* @__PURE__ */ o(
967
- y.Transition,
1005
+ star: ({ width: n, height: e, durationInFrames: t, id: r }) => /* @__PURE__ */ o(
1006
+ w.Transition,
968
1007
  {
969
- presentation: Oe({ width: n, height: t }),
970
- timing: T({ durationInFrames: e })
1008
+ presentation: Ut({ width: n, height: e }),
1009
+ timing: b({ durationInFrames: t })
971
1010
  },
972
1011
  r
973
1012
  ),
974
- circle: ({ width: n, height: t, durationInFrames: e, id: r }) => /* @__PURE__ */ o(
975
- y.Transition,
1013
+ circle: ({ width: n, height: e, durationInFrames: t, id: r }) => /* @__PURE__ */ o(
1014
+ w.Transition,
976
1015
  {
977
- presentation: Ne({ width: n, height: t }),
978
- timing: T({ durationInFrames: e })
1016
+ presentation: Nt({ width: n, height: e }),
1017
+ timing: b({ durationInFrames: t })
979
1018
  },
980
1019
  r
981
1020
  ),
982
- rectangle: ({ width: n, height: t, durationInFrames: e, id: r }) => /* @__PURE__ */ o(
983
- y.Transition,
1021
+ rectangle: ({ width: n, height: e, durationInFrames: t, id: r }) => /* @__PURE__ */ o(
1022
+ w.Transition,
984
1023
  {
985
- presentation: Ae({ width: n, height: t }),
986
- timing: T({ durationInFrames: e })
1024
+ presentation: Xt({ width: n, height: e }),
1025
+ timing: b({ durationInFrames: t })
987
1026
  },
988
1027
  r
989
1028
  ),
990
1029
  slidingDoors: ({
991
1030
  width: n,
992
- height: t,
993
- durationInFrames: e,
1031
+ height: e,
1032
+ durationInFrames: t,
994
1033
  id: r
995
1034
  }) => /* @__PURE__ */ o(
996
- y.Transition,
1035
+ w.Transition,
997
1036
  {
998
- presentation: Ye({ width: n, height: t }),
999
- timing: T({ durationInFrames: e })
1037
+ presentation: zt({ width: n, height: e }),
1038
+ timing: b({ durationInFrames: t })
1000
1039
  },
1001
1040
  r
1002
1041
  )
1003
1042
  };
1004
1043
  export {
1005
- y as TransitionSeries,
1006
- ut as Transitions,
1007
- Ne as circle,
1008
- et as clockWipe,
1044
+ w as TransitionSeries,
1045
+ me as Transitions,
1046
+ Nt as circle,
1047
+ ue as circleReveal,
1048
+ ee as clockWipe,
1009
1049
  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
1050
+ Zt as flip,
1051
+ b as linearTiming,
1052
+ Xt as rectangle,
1053
+ Vt as slide,
1054
+ zt as slidingDoors,
1055
+ le as springTiming,
1056
+ Ut as star,
1057
+ ce as useTransitionProgress,
1058
+ Gt as wipe
1019
1059
  };
1020
1060
  //# sourceMappingURL=index.es.js.map