@cliquify.me/transitions 0.11.16 → 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,311 +1,37 @@
1
- import { interpolate as se, spring as Te, measureSpring as we, AbsoluteFill as x, Internals as pe, Sequence as V, useVideoConfig as ve, useCurrentFrame as Se, Freeze as oe, random as Q } from "remotion";
2
- import M, { useMemo as w, Children as Ee, useState as K } from "react";
3
- import { getBoundingBox as $e, translatePath as he } from "@remotion/paths";
4
- import { makeStar as je, makePie as Re } from "@remotion/shapes";
5
- const A = (r) => ({
6
- getDurationInFrames: () => r.durationInFrames,
7
- getProgress: ({ frame: t }) => se(t, [0, r.durationInFrames], [0, 1], {
8
- easing: r.easing,
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
+ getDurationInFrames: () => n.durationInFrames,
8
+ getProgress: ({ frame: t }) => _(t, [0, n.durationInFrames], [0, 1], {
9
+ easing: n.easing,
9
10
  extrapolateLeft: "clamp",
10
11
  extrapolateRight: "clamp"
11
12
  })
12
- }), yt = (r = {}) => ({
13
- getDurationInFrames: ({ fps: t }) => r.durationInFrames ? r.durationInFrames : we({
14
- config: r.config,
15
- threshold: r.durationRestThreshold,
13
+ }), St = (n = {}) => ({
14
+ getDurationInFrames: ({ fps: t }) => n.durationInFrames ? n.durationInFrames : we({
15
+ config: n.config,
16
+ threshold: n.durationRestThreshold,
16
17
  fps: t
17
18
  }),
18
19
  getProgress: ({ fps: t, frame: e }) => {
19
- const o = r.reverse ? 0 : 1, i = r.reverse ? 1 : 0;
20
- return Te({
20
+ const r = n.reverse ? 0 : 1, s = n.reverse ? 1 : 0;
21
+ return $e({
21
22
  fps: t,
22
23
  frame: e,
23
- to: o,
24
- from: i,
25
- config: r.config,
26
- durationInFrames: r.durationInFrames,
27
- durationRestThreshold: r.durationRestThreshold,
28
- reverse: r.reverse
24
+ to: r,
25
+ from: s,
26
+ config: n.config,
27
+ durationInFrames: n.durationInFrames,
28
+ durationRestThreshold: n.durationRestThreshold,
29
+ reverse: n.reverse
29
30
  });
30
31
  }
31
32
  });
32
- var ie = { exports: {} }, X = {};
33
- /**
34
- * @license React
35
- * react-jsx-runtime.production.js
36
- *
37
- * Copyright (c) Meta Platforms, Inc. and affiliates.
38
- *
39
- * This source code is licensed under the MIT license found in the
40
- * LICENSE file in the root directory of this source tree.
41
- */
42
- var ue;
43
- function Fe() {
44
- if (ue) return X;
45
- ue = 1;
46
- var r = Symbol.for("react.transitional.element"), t = Symbol.for("react.fragment");
47
- function e(o, i, u) {
48
- var f = null;
49
- if (u !== void 0 && (f = "" + u), i.key !== void 0 && (f = "" + i.key), "key" in i) {
50
- u = {};
51
- for (var c in i)
52
- c !== "key" && (u[c] = i[c]);
53
- } else u = i;
54
- return i = u.ref, {
55
- $$typeof: r,
56
- type: o,
57
- key: f,
58
- ref: i !== void 0 ? i : null,
59
- props: u
60
- };
61
- }
62
- return X.Fragment = t, X.jsx = e, X.jsxs = e, X;
63
- }
64
- var z = {};
65
- /**
66
- * @license React
67
- * react-jsx-runtime.development.js
68
- *
69
- * Copyright (c) Meta Platforms, Inc. and affiliates.
70
- *
71
- * This source code is licensed under the MIT license found in the
72
- * LICENSE file in the root directory of this source tree.
73
- */
74
- var ce;
75
- function _e() {
76
- return ce || (ce = 1, process.env.NODE_ENV !== "production" && function() {
77
- function r(n) {
78
- if (n == null) return null;
79
- if (typeof n == "function")
80
- return n.$$typeof === te ? null : n.displayName || n.name || null;
81
- if (typeof n == "string") return n;
82
- switch (n) {
83
- case _:
84
- return "Fragment";
85
- case R:
86
- return "Profiler";
87
- case $:
88
- return "StrictMode";
89
- case ee:
90
- return "Suspense";
91
- case D:
92
- return "SuspenseList";
93
- case N:
94
- return "Activity";
95
- }
96
- if (typeof n == "object")
97
- switch (typeof n.tag == "number" && console.error(
98
- "Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
99
- ), n.$$typeof) {
100
- case O:
101
- return "Portal";
102
- case I:
103
- return n.displayName || "Context";
104
- case le:
105
- return (n._context.displayName || "Context") + ".Consumer";
106
- case C:
107
- var l = n.render;
108
- return n = n.displayName, n || (n = l.displayName || l.name || "", n = n !== "" ? "ForwardRef(" + n + ")" : "ForwardRef"), n;
109
- case h:
110
- return l = n.displayName || null, l !== null ? l : r(n.type) || "Memo";
111
- case q:
112
- l = n._payload, n = n._init;
113
- try {
114
- return r(n(l));
115
- } catch {
116
- }
117
- }
118
- return null;
119
- }
120
- function t(n) {
121
- return "" + n;
122
- }
123
- function e(n) {
124
- try {
125
- t(n);
126
- var l = !1;
127
- } catch {
128
- l = !0;
129
- }
130
- if (l) {
131
- l = console;
132
- var m = l.error, y = typeof Symbol == "function" && Symbol.toStringTag && n[Symbol.toStringTag] || n.constructor.name || "Object";
133
- return m.call(
134
- l,
135
- "The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
136
- y
137
- ), t(n);
138
- }
139
- }
140
- function o(n) {
141
- if (n === _) return "<>";
142
- if (typeof n == "object" && n !== null && n.$$typeof === q)
143
- return "<...>";
144
- try {
145
- var l = r(n);
146
- return l ? "<" + l + ">" : "<...>";
147
- } catch {
148
- return "<...>";
149
- }
150
- }
151
- function i() {
152
- var n = j.A;
153
- return n === null ? null : n.getOwner();
154
- }
155
- function u() {
156
- return Error("react-stack-top-frame");
157
- }
158
- function f(n) {
159
- if (F.call(n, "key")) {
160
- var l = Object.getOwnPropertyDescriptor(n, "key").get;
161
- if (l && l.isReactWarning) return !1;
162
- }
163
- return n.key !== void 0;
164
- }
165
- function c(n, l) {
166
- function m() {
167
- P || (P = !0, console.error(
168
- "%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",
169
- l
170
- ));
171
- }
172
- m.isReactWarning = !0, Object.defineProperty(n, "key", {
173
- get: m,
174
- configurable: !0
175
- });
176
- }
177
- function a() {
178
- var n = r(this.type);
179
- return Y[n] || (Y[n] = !0, console.error(
180
- "Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
181
- )), n = this.props.ref, n !== void 0 ? n : null;
182
- }
183
- function b(n, l, m, y, H, re) {
184
- var T = m.ref;
185
- return n = {
186
- $$typeof: W,
187
- type: n,
188
- key: l,
189
- props: m,
190
- _owner: y
191
- }, (T !== void 0 ? T : null) !== null ? Object.defineProperty(n, "ref", {
192
- enumerable: !1,
193
- get: a
194
- }) : Object.defineProperty(n, "ref", { enumerable: !1, value: null }), n._store = {}, Object.defineProperty(n._store, "validated", {
195
- configurable: !1,
196
- enumerable: !1,
197
- writable: !0,
198
- value: 0
199
- }), Object.defineProperty(n, "_debugInfo", {
200
- configurable: !1,
201
- enumerable: !1,
202
- writable: !0,
203
- value: null
204
- }), Object.defineProperty(n, "_debugStack", {
205
- configurable: !1,
206
- enumerable: !1,
207
- writable: !0,
208
- value: H
209
- }), Object.defineProperty(n, "_debugTask", {
210
- configurable: !1,
211
- enumerable: !1,
212
- writable: !0,
213
- value: re
214
- }), Object.freeze && (Object.freeze(n.props), Object.freeze(n)), n;
215
- }
216
- function d(n, l, m, y, H, re) {
217
- var T = l.children;
218
- if (T !== void 0)
219
- if (y)
220
- if (k(T)) {
221
- for (y = 0; y < T.length; y++)
222
- v(T[y]);
223
- Object.freeze && Object.freeze(T);
224
- } else
225
- console.error(
226
- "React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
227
- );
228
- else v(T);
229
- if (F.call(l, "key")) {
230
- T = r(n);
231
- var L = Object.keys(l).filter(function(be) {
232
- return be !== "key";
233
- });
234
- y = 0 < L.length ? "{key: someKey, " + L.join(": ..., ") + ": ...}" : "{key: someKey}", G[T + y] || (L = 0 < L.length ? "{" + L.join(": ..., ") + ": ...}" : "{}", console.error(
235
- `A props object containing a "key" prop is being spread into JSX:
236
- let props = %s;
237
- <%s {...props} />
238
- React keys must be passed directly to JSX without using spread:
239
- let props = %s;
240
- <%s key={someKey} {...props} />`,
241
- y,
242
- T,
243
- L,
244
- T
245
- ), G[T + y] = !0);
246
- }
247
- if (T = null, m !== void 0 && (e(m), T = "" + m), f(l) && (e(l.key), T = "" + l.key), "key" in l) {
248
- m = {};
249
- for (var ne in l)
250
- ne !== "key" && (m[ne] = l[ne]);
251
- } else m = l;
252
- return T && c(
253
- m,
254
- typeof n == "function" ? n.displayName || n.name || "Unknown" : n
255
- ), b(
256
- n,
257
- T,
258
- m,
259
- i(),
260
- H,
261
- re
262
- );
263
- }
264
- function v(n) {
265
- g(n) ? n._store && (n._store.validated = 1) : typeof n == "object" && n !== null && n.$$typeof === q && (n._payload.status === "fulfilled" ? g(n._payload.value) && n._payload.value._store && (n._payload.value._store.validated = 1) : n._store && (n._store.validated = 1));
266
- }
267
- function g(n) {
268
- return typeof n == "object" && n !== null && n.$$typeof === W;
269
- }
270
- var p = M, W = Symbol.for("react.transitional.element"), O = Symbol.for("react.portal"), _ = Symbol.for("react.fragment"), $ = Symbol.for("react.strict_mode"), R = Symbol.for("react.profiler"), le = Symbol.for("react.consumer"), I = Symbol.for("react.context"), C = Symbol.for("react.forward_ref"), ee = Symbol.for("react.suspense"), D = Symbol.for("react.suspense_list"), h = Symbol.for("react.memo"), q = Symbol.for("react.lazy"), N = Symbol.for("react.activity"), te = Symbol.for("react.client.reference"), j = p.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, F = Object.prototype.hasOwnProperty, k = Array.isArray, S = console.createTask ? console.createTask : function() {
271
- return null;
272
- };
273
- p = {
274
- react_stack_bottom_frame: function(n) {
275
- return n();
276
- }
277
- };
278
- var P, Y = {}, U = p.react_stack_bottom_frame.bind(
279
- p,
280
- u
281
- )(), B = S(o(u)), G = {};
282
- z.Fragment = _, z.jsx = function(n, l, m) {
283
- var y = 1e4 > j.recentlyCreatedOwnerStacks++;
284
- return d(
285
- n,
286
- l,
287
- m,
288
- !1,
289
- y ? Error("react-stack-top-frame") : U,
290
- y ? S(o(n)) : B
291
- );
292
- }, z.jsxs = function(n, l, m) {
293
- var y = 1e4 > j.recentlyCreatedOwnerStacks++;
294
- return d(
295
- n,
296
- l,
297
- m,
298
- !0,
299
- y ? Error("react-stack-top-frame") : U,
300
- y ? S(o(n)) : B
301
- );
302
- };
303
- }()), z;
304
- }
305
- process.env.NODE_ENV === "production" ? ie.exports = Fe() : ie.exports = _e();
306
- var s = ie.exports;
307
33
  typeof window < "u" && (window.remotion_renderReady = !1, window.remotion_delayRenderTimeouts || (window.remotion_delayRenderTimeouts = {}), window.remotion_delayRenderHandles = []);
308
- var Ie = {
34
+ var qe = {
309
35
  "style.transformOrigin": {
310
36
  type: "transform-origin",
311
37
  step: 1,
@@ -341,7 +67,7 @@ var Ie = {
341
67
  description: "Opacity",
342
68
  hiddenFromList: !1
343
69
  }
344
- }, ke = {
70
+ }, Pe = {
345
71
  "style.borderWidth": {
346
72
  type: "number",
347
73
  default: void 0,
@@ -372,7 +98,7 @@ var Ie = {
372
98
  default: void 0,
373
99
  description: "Border color"
374
100
  }
375
- }, Pe = {
101
+ }, Ce = {
376
102
  "style.borderRadius": {
377
103
  type: "number",
378
104
  default: 0,
@@ -414,13 +140,13 @@ var Ie = {
414
140
  description: "Bottom left radius",
415
141
  hiddenFromList: !1
416
142
  }
417
- }, Ae = {
143
+ }, Re = {
418
144
  "style.backgroundColor": {
419
145
  type: "color",
420
146
  default: "transparent",
421
147
  description: "Color"
422
148
  }
423
- }, Oe = {
149
+ }, ke = {
424
150
  premountFor: {
425
151
  type: "number",
426
152
  default: 0,
@@ -438,9 +164,9 @@ var Ie = {
438
164
  hiddenFromList: !0,
439
165
  keyframable: !1
440
166
  }
441
- }, Ce = {
442
- ...Oe
443
- }, Ne = {
167
+ }, Me = {
168
+ ...ke
169
+ }, Le = {
444
170
  cropLeft: {
445
171
  type: "number",
446
172
  default: 0,
@@ -481,70 +207,70 @@ var Ie = {
481
207
  hiddenFromList: !1,
482
208
  keyframable: !0
483
209
  }
484
- }, qe = Ne, Me = {
210
+ }, Ne = Le, Be = {
211
+ ...Ne,
485
212
  ...qe,
486
- ...Ie,
487
- ...Ae,
488
- ...ke,
213
+ ...Re,
489
214
  ...Pe,
490
- ...Ce
491
- }, Ye = {
215
+ ...Ce,
216
+ ...Me
217
+ }, We = {
492
218
  layout: {
493
219
  type: "enum",
494
220
  default: "absolute-fill",
495
221
  description: "Layout",
496
222
  variants: {
497
- "absolute-fill": Me,
223
+ "absolute-fill": Be,
498
224
  none: {}
499
225
  }
500
226
  }
501
227
  };
502
228
  ({
503
- ...Ye.layout
229
+ ...We.layout
504
230
  });
505
- function Le(r, t) {
506
- const { allowFloats: e, component: o } = t;
507
- if (typeof r > "u")
508
- throw new Error(`The "durationInFrames" prop ${o} is missing.`);
509
- if (typeof r != "number")
510
- throw new Error(`The "durationInFrames" prop ${o} must be a number, but you passed a value of type ${typeof r}`);
511
- if (r <= 0)
512
- throw new TypeError(`The "durationInFrames" prop ${o} must be positive, but got ${r}.`);
513
- if (!e && r % 1 !== 0)
514
- throw new TypeError(`The "durationInFrames" prop ${o} must be an integer, but got ${r}.`);
515
- if (!Number.isFinite(r))
516
- throw new TypeError(`The "durationInFrames" prop ${o} must be finite, but got ${r}.`);
231
+ function Ae(n, t) {
232
+ const { allowFloats: e, component: r } = t;
233
+ if (typeof n > "u")
234
+ throw new Error(`The "durationInFrames" prop ${r} is missing.`);
235
+ if (typeof n != "number")
236
+ throw new Error(`The "durationInFrames" prop ${r} must be a number, but you passed a value of type ${typeof n}`);
237
+ if (n <= 0)
238
+ throw new TypeError(`The "durationInFrames" prop ${r} must be positive, but got ${n}.`);
239
+ if (!e && n % 1 !== 0)
240
+ throw new TypeError(`The "durationInFrames" prop ${r} must be an integer, but got ${n}.`);
241
+ if (!Number.isFinite(n))
242
+ throw new TypeError(`The "durationInFrames" prop ${r} must be finite, but got ${n}.`);
517
243
  }
518
- var We = {
519
- validateDurationInFrames: Le
244
+ var Xe = {
245
+ validateDurationInFrames: Ae
520
246
  };
521
- const ge = M.createContext(null), ye = M.createContext(null), fe = ({ presentationProgress: r, children: t }) => {
522
- const e = w(() => ({
523
- enteringProgress: r
524
- }), [r]);
525
- return /* @__PURE__ */ s.jsx(ge.Provider, { value: e, children: t });
526
- }, me = ({ presentationProgress: r, children: t }) => {
527
- const e = w(() => ({
528
- exitingProgress: r
529
- }), [r]);
530
- return /* @__PURE__ */ s.jsx(ye.Provider, { value: e, children: t });
531
- }, xe = (r) => M.Children.toArray(r).reduce((e, o) => o.type === M.Fragment ? e.concat(
532
- xe(
533
- o.props.children
247
+ const me = k.createContext(null), de = k.createContext(null), ie = ({ presentationProgress: n, children: t }) => {
248
+ const e = h(() => ({
249
+ enteringProgress: n
250
+ }), [n]);
251
+ return /* @__PURE__ */ o(me.Provider, { value: e, children: t });
252
+ }, se = ({ presentationProgress: n, children: t }) => {
253
+ const e = h(() => ({
254
+ exitingProgress: n
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(
259
+ r.props.children
534
260
  )
535
- ) : (e.push(o), e), []), De = 0.01, Ue = ({
536
- children: r,
261
+ ) : (e.push(r), e), []), Oe = 0.01, Ue = ({
262
+ children: n,
537
263
  presentationProgress: t,
538
264
  presentationDirection: e,
539
- passedProps: { direction: o = "from-left", enterStyle: i, exitStyle: u }
265
+ passedProps: { direction: r = "from-left", enterStyle: s, exitStyle: l }
540
266
  }) => {
541
- const f = w(() => {
542
- const a = t === 1 ? t * 100 : t * 100 - De;
267
+ const u = h(() => {
268
+ const i = t === 1 ? t * 100 : t * 100 - Oe;
543
269
  if (e === "exiting")
544
- switch (o) {
270
+ switch (r) {
545
271
  case "from-left":
546
272
  return {
547
- transform: `translateX(${a}%)`
273
+ transform: `translateX(${i}%)`
548
274
  };
549
275
  case "from-right":
550
276
  return {
@@ -552,23 +278,23 @@ const ge = M.createContext(null), ye = M.createContext(null), fe = ({ presentati
552
278
  };
553
279
  case "from-top":
554
280
  return {
555
- transform: `translateY(${a}%)`
281
+ transform: `translateY(${i}%)`
556
282
  };
557
283
  case "from-bottom":
558
284
  return {
559
285
  transform: `translateY(${-t * 100}%)`
560
286
  };
561
287
  default:
562
- throw new Error(`Invalid direction: ${o}`);
288
+ throw new Error(`Invalid direction: ${r}`);
563
289
  }
564
- switch (o) {
290
+ switch (r) {
565
291
  case "from-left":
566
292
  return {
567
293
  transform: `translateX(${-100 + t * 100}%)`
568
294
  };
569
295
  case "from-right":
570
296
  return {
571
- transform: `translateX(${100 - a}%)`
297
+ transform: `translateX(${100 - i}%)`
572
298
  };
573
299
  case "from-top":
574
300
  return {
@@ -576,136 +302,141 @@ const ge = M.createContext(null), ye = M.createContext(null), fe = ({ presentati
576
302
  };
577
303
  case "from-bottom":
578
304
  return {
579
- transform: `translateY(${100 - a}%)`
305
+ transform: `translateY(${100 - i}%)`
580
306
  };
581
307
  default:
582
- throw new Error(`Invalid direction: ${o}`);
308
+ throw new Error(`Invalid direction: ${r}`);
583
309
  }
584
- }, [e, t, o]), c = w(() => ({
310
+ }, [e, t, r]), a = h(() => ({
585
311
  width: "100%",
586
312
  height: "100%",
587
313
  justifyContent: "center",
588
314
  alignItems: "center",
589
- ...f,
590
- ...e === "entering" ? i : u
591
- }), [f, i, u, e]);
592
- return /* @__PURE__ */ s.jsx(x, { style: c, children: r });
593
- }, Z = (r) => ({
315
+ ...u,
316
+ ...e === "entering" ? s : l
317
+ }), [u, s, l, e]);
318
+ return /* @__PURE__ */ o(m, { style: a, children: n });
319
+ }, N = (n) => ({
594
320
  component: Ue,
595
321
  props: {}
596
- }), Be = We.validateDurationInFrames, J = function(r) {
322
+ }), Ye = Xe.validateDurationInFrames, L = function(n) {
597
323
  return null;
598
- }, ae = ({ children: r }) => /* @__PURE__ */ s.jsx(s.Fragment, { children: r }), Xe = ({
599
- children: r
324
+ };
325
+ L.isTransitionSeriesTransition = !0;
326
+ const X = ({ children: n }) => /* @__PURE__ */ o(ue, { children: n });
327
+ X.isSeriesSequence = !0;
328
+ const De = ({
329
+ children: n
600
330
  }) => {
601
- const { fps: t } = ve(), e = Se(), o = w(() => {
602
- let i = 0, u = 0;
603
- const f = xe(r);
604
- return Ee.map(f, (c, a) => {
605
- const b = c;
606
- if (typeof b == "string") {
607
- if (b.trim() === "")
331
+ const { fps: t } = be(), e = Fe(), r = h(() => {
332
+ 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() === "")
608
339
  return null;
609
340
  throw new TypeError(
610
- `The <TransitionSeries /> component only accepts a list of <TransitionSeries.Sequence /> components as its children, but you passed a string "${b}"`
341
+ `The <TransitionSeries /> component only accepts a list of <TransitionSeries.Sequence /> components as its children, but you passed a string "${c}"`
611
342
  );
612
343
  }
613
- const d = f[a - 1], v = f[a + 1], g = typeof d == "string" || typeof d > "u" ? null : d.type === J ? d : null, p = typeof v == "string" || typeof v > "u" ? null : v.type === J ? v : null, W = typeof d == "string" || typeof d > "u" ? !1 : d.type === J;
614
- if (b.type === J) {
615
- if (W)
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)
616
347
  throw new TypeError(
617
- `A <TransitionSeries.Transition /> component must not be followed by another <TransitionSeries.Transition /> component (nth children = ${a - 1} and ${a})`
348
+ `A <TransitionSeries.Transition /> component must not be followed by another <TransitionSeries.Transition /> component (nth children = ${i - 1} and ${i})`
618
349
  );
619
350
  return null;
620
351
  }
621
- if (b.type !== ae)
352
+ if (!(c.type === X || ((Z = c.type) == null ? void 0 : Z.isSeriesSequence) || ((ee = c.type) == null ? void 0 : ee.name) === "SeriesSequence"))
622
353
  throw new TypeError(
623
- `The <TransitionSeries /> component only accepts a list of <TransitionSeries.Sequence /> and <TransitionSeries.Transition /> components as its children, but got ${b} instead`
354
+ `The <TransitionSeries /> component only accepts a list of <TransitionSeries.Sequence /> and <TransitionSeries.Transition /> components as its children, but got ${c} instead`
624
355
  );
625
- const O = b, _ = `index = ${a}, duration = ${O.props.durationInFrames}`;
626
- if (!(O != null && O.props.children))
356
+ const E = c, C = `index = ${i}, duration = ${E.props.durationInFrames}`;
357
+ if (!(E != null && E.props.children))
627
358
  throw new TypeError(
628
- `A <TransitionSeries.Sequence /> component (${_}) 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.`
629
360
  );
630
- const $ = O.props.durationInFrames, {
631
- durationInFrames: R,
632
- children: le,
633
- ...I
634
- } = O.props;
635
- Be($, {
361
+ const S = E.props.durationInFrames, {
362
+ durationInFrames: w,
363
+ children: ft,
364
+ ...F
365
+ } = E.props;
366
+ Ye(S, {
636
367
  component: "of a <TransitionSeries.Sequence /> component",
637
368
  allowFloats: !0
638
369
  });
639
- const C = O.props.offset ?? 0;
640
- if (Number.isNaN(C))
370
+ const q = E.props.offset ?? 0;
371
+ if (Number.isNaN(q))
641
372
  throw new TypeError(
642
- `The "offset" property of a <TransitionSeries.Sequence /> must not be NaN, but got NaN (${_}).`
373
+ `The "offset" property of a <TransitionSeries.Sequence /> must not be NaN, but got NaN (${C}).`
643
374
  );
644
- if (!Number.isFinite(C))
375
+ if (!Number.isFinite(q))
645
376
  throw new TypeError(
646
- `The "offset" property of a <TransitionSeries.Sequence /> must be finite, but got ${C} (${_}).`
377
+ `The "offset" property of a <TransitionSeries.Sequence /> must be finite, but got ${q} (${C}).`
647
378
  );
648
- if (C % 1 !== 0)
379
+ if (q % 1 !== 0)
649
380
  throw new TypeError(
650
- `The "offset" property of a <TransitionSeries.Sequence /> must be finite, but got ${C} (${_}).`
381
+ `The "offset" property of a <TransitionSeries.Sequence /> must be finite, but got ${q} (${C}).`
651
382
  );
652
- const ee = u + C;
653
- let D = 0;
654
- g && (D = g.props.timing.getDurationInFrames({
383
+ const he = l + q;
384
+ let U = 0;
385
+ p && (U = p.props.timing.getDurationInFrames({
655
386
  fps: t
656
- }), i -= D / 2);
657
- let h = ee - D / 2;
658
- u += $ + C, h < 0 && (h = 0);
659
- const q = p ? p.props.timing.getProgress({
660
- frame: e - h - R + p.props.timing.getDurationInFrames({ fps: t }) / 2 + i,
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,
661
392
  fps: t
662
- }) : null, N = g ? g.props.timing.getProgress({
663
- frame: e - h,
393
+ }) : null, R = p ? p.props.timing.getProgress({
394
+ frame: e - f,
664
395
  fps: t
665
- }) : null, te = g ? g.props.timing.getProgress({
666
- frame: e - (h + R),
396
+ }) : null, ge = p ? p.props.timing.getProgress({
397
+ frame: e - (f + w),
667
398
  fps: t
668
399
  }) : null;
669
- if (p && $ < p.props.timing.getDurationInFrames({ fps: t }) / 2)
400
+ if (y && S < y.props.timing.getDurationInFrames({ fps: t }) / 2)
670
401
  throw new Error(
671
- `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(
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(
672
403
  { fps: t }
673
- )} frames long, but the sequence is only ${$} frames long (${_})`
404
+ )} frames long, but the sequence is only ${S} frames long (${C})`
674
405
  );
675
- if (g && $ < g.props.timing.getDurationInFrames({ fps: t }) / 2)
406
+ if (p && S < p.props.timing.getDurationInFrames({ fps: t }) / 2)
676
407
  throw new Error(
677
- `The duration of a <TransitionSeries.Sequence /> must not be shorter than the duration of the previous <TransitionSeries.Transition />. The transition is ${g.props.timing.getDurationInFrames(
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(
678
409
  { fps: t }
679
- )} frames long, but the sequence is only ${$} frames long (${_})`
410
+ )} frames long, but the sequence is only ${S} frames long (${C})`
680
411
  );
681
- if (p && g && te !== null && N !== null) {
682
- const j = p.props.presentation ?? Z(), F = g.props.presentation ?? Z(), k = g.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({
683
414
  fps: t
684
- }), S = p.props.timing.getDurationInFrames({
415
+ }), b = y.props.timing.getDurationInFrames({
685
416
  fps: t
686
- }), P = j.component, Y = F.component, U = e < +Math.floor(h) + k / 2, B = e > Math.floor(h) + Math.floor(R) + k / 2, G = B ? Math.floor(h) + Math.floor(R) + Math.floor(S / 2) : Math.floor(h), n = U ? Math.floor(h) : Math.floor(h) + k / 2, l = p.props.timing.getProgress({
687
- frame: e - (n + R - 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),
688
419
  fps: t
689
- }), m = e > h, y = e < h + R + S / 2 + k / 2;
690
- return /* @__PURE__ */ s.jsx(
691
- oe,
420
+ }), Te = e > f, Se = e < f + w + b / 2 + I / 2;
421
+ return /* @__PURE__ */ o(
422
+ z,
692
423
  {
693
- active: y && m && (U || B),
694
- frame: G,
695
- children: /* @__PURE__ */ s.jsx(
696
- V,
424
+ active: Se && Te && (te || ne),
425
+ frame: ye,
426
+ children: /* @__PURE__ */ o(
427
+ M,
697
428
  {
698
- from: n,
699
- durationInFrames: $ + S / 2,
700
- ...I,
701
- name: I.name || "<TS.Sequence>",
702
- children: /* @__PURE__ */ s.jsx(
429
+ from: re,
430
+ durationInFrames: S + b / 2,
431
+ ...F,
432
+ name: F.name || "<TS.Sequence>",
433
+ children: /* @__PURE__ */ o(
703
434
  P,
704
435
  {
705
- passedProps: j.props ?? {},
436
+ passedProps: v.props ?? {},
706
437
  presentationDirection: "exiting",
707
- presentationProgress: l,
708
- presentationDurationInFrames: p.props.timing.getDurationInFrames(
438
+ presentationProgress: oe,
439
+ presentationDurationInFrames: y.props.timing.getDurationInFrames(
709
440
  { fps: t }
710
441
  ),
711
442
  onElementImage: () => {
@@ -713,17 +444,17 @@ const ge = M.createContext(null), ye = M.createContext(null), fe = ({ presentati
713
444
  onUnmount: () => {
714
445
  },
715
446
  bothEnteringAndExiting: !1,
716
- children: /* @__PURE__ */ s.jsx(
717
- me,
447
+ children: /* @__PURE__ */ o(
448
+ se,
718
449
  {
719
- presentationProgress: l,
720
- children: /* @__PURE__ */ s.jsx(
721
- Y,
450
+ presentationProgress: oe,
451
+ children: /* @__PURE__ */ o(
452
+ D,
722
453
  {
723
- passedProps: F.props ?? {},
454
+ passedProps: x.props ?? {},
724
455
  presentationDirection: "entering",
725
- presentationProgress: N,
726
- presentationDurationInFrames: g.props.timing.getDurationInFrames(
456
+ presentationProgress: R,
457
+ presentationDurationInFrames: p.props.timing.getDurationInFrames(
727
458
  { fps: t }
728
459
  ),
729
460
  onElementImage: () => {
@@ -731,11 +462,11 @@ const ge = M.createContext(null), ye = M.createContext(null), fe = ({ presentati
731
462
  onUnmount: () => {
732
463
  },
733
464
  bothEnteringAndExiting: !1,
734
- children: /* @__PURE__ */ s.jsx(
735
- fe,
465
+ children: /* @__PURE__ */ o(
466
+ ie,
736
467
  {
737
- presentationProgress: N,
738
- children: c
468
+ presentationProgress: R,
469
+ children: a
739
470
  }
740
471
  )
741
472
  }
@@ -745,33 +476,33 @@ const ge = M.createContext(null), ye = M.createContext(null), fe = ({ presentati
745
476
  }
746
477
  )
747
478
  },
748
- a
479
+ i
749
480
  )
750
481
  },
751
- a
482
+ i
752
483
  );
753
484
  }
754
- if (N !== null && g) {
755
- const j = g.props.timing.getDurationInFrames({ fps: t }) / 2, F = g.props.presentation ?? Z(), k = F.component, S = e < h + j, P = S ? Math.floor(h) : Math.floor(h) + j, Y = e > P;
756
- return /* @__PURE__ */ s.jsx(
757
- oe,
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;
487
+ return /* @__PURE__ */ o(
488
+ z,
758
489
  {
759
- active: Y && S,
490
+ active: D && b,
760
491
  frame: P,
761
- children: /* @__PURE__ */ s.jsx(
762
- V,
492
+ children: /* @__PURE__ */ o(
493
+ M,
763
494
  {
764
495
  from: P,
765
- durationInFrames: $,
766
- ...I,
767
- name: I.name || "<TS.Sequence>",
768
- children: /* @__PURE__ */ s.jsx(
769
- k,
496
+ durationInFrames: S,
497
+ ...F,
498
+ name: F.name || "<TS.Sequence>",
499
+ children: /* @__PURE__ */ o(
500
+ I,
770
501
  {
771
- passedProps: F.props ?? {},
502
+ passedProps: x.props ?? {},
772
503
  presentationDirection: "entering",
773
- presentationProgress: N,
774
- presentationDurationInFrames: g.props.timing.getDurationInFrames(
504
+ presentationProgress: R,
505
+ presentationDurationInFrames: p.props.timing.getDurationInFrames(
775
506
  { fps: t }
776
507
  ),
777
508
  onElementImage: () => {
@@ -779,43 +510,43 @@ const ge = M.createContext(null), ye = M.createContext(null), fe = ({ presentati
779
510
  onUnmount: () => {
780
511
  },
781
512
  bothEnteringAndExiting: !1,
782
- children: /* @__PURE__ */ s.jsx(
783
- fe,
513
+ children: /* @__PURE__ */ o(
514
+ ie,
784
515
  {
785
- presentationProgress: N,
786
- children: c
516
+ presentationProgress: R,
517
+ children: a
787
518
  }
788
519
  )
789
520
  }
790
521
  )
791
522
  },
792
- a
523
+ i
793
524
  )
794
525
  },
795
- a
526
+ i
796
527
  );
797
528
  }
798
- if (q !== null && p) {
799
- const j = p.props.timing.getDurationInFrames({ fps: t }) / 2, F = p.props.presentation ?? Z(), k = F.component, S = e > Math.floor(R) + Math.floor(h), P = e < Math.floor(R) + Math.floor(h) + j;
800
- return /* @__PURE__ */ s.jsx(
801
- oe,
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;
531
+ return /* @__PURE__ */ o(
532
+ z,
802
533
  {
803
- active: P && S,
804
- frame: Math.floor(R),
805
- children: /* @__PURE__ */ s.jsx(
806
- V,
534
+ active: P && b,
535
+ frame: Math.floor(w),
536
+ children: /* @__PURE__ */ o(
537
+ M,
807
538
  {
808
- from: Math.floor(h),
809
- durationInFrames: $ + j,
810
- ...I,
811
- name: I.name || "<TS.Sequence>",
812
- children: /* @__PURE__ */ s.jsx(
813
- k,
539
+ from: Math.floor(f),
540
+ durationInFrames: S + v,
541
+ ...F,
542
+ name: F.name || "<TS.Sequence>",
543
+ children: /* @__PURE__ */ o(
544
+ I,
814
545
  {
815
- passedProps: F.props ?? {},
546
+ passedProps: x.props ?? {},
816
547
  presentationDirection: "exiting",
817
- presentationProgress: q,
818
- presentationDurationInFrames: p.props.timing.getDurationInFrames(
548
+ presentationProgress: Y,
549
+ presentationDurationInFrames: y.props.timing.getDurationInFrames(
819
550
  { fps: t }
820
551
  ),
821
552
  onElementImage: () => {
@@ -823,181 +554,178 @@ const ge = M.createContext(null), ye = M.createContext(null), fe = ({ presentati
823
554
  onUnmount: () => {
824
555
  },
825
556
  bothEnteringAndExiting: !1,
826
- children: /* @__PURE__ */ s.jsx(
827
- me,
557
+ children: /* @__PURE__ */ o(
558
+ se,
828
559
  {
829
- presentationProgress: q,
830
- children: c
560
+ presentationProgress: Y,
561
+ children: a
831
562
  }
832
563
  )
833
564
  }
834
565
  )
835
566
  },
836
- a
567
+ i
837
568
  )
838
569
  },
839
- a
570
+ i
840
571
  );
841
572
  }
842
- return /* @__PURE__ */ s.jsx(
843
- V,
573
+ return /* @__PURE__ */ o(
574
+ M,
844
575
  {
845
- from: Math.floor(h),
846
- durationInFrames: $,
847
- ...I,
848
- name: I.name || "<TS.Sequence>",
849
- children: c
576
+ from: Math.floor(f),
577
+ durationInFrames: S,
578
+ ...F,
579
+ name: F.name || "<TS.Sequence>",
580
+ children: a
850
581
  },
851
- a
582
+ i
852
583
  );
853
584
  });
854
- }, [r, t, e]);
855
- return /* @__PURE__ */ s.jsx(s.Fragment, { children: o });
856
- }, E = ({ children: r, name: t, layout: e, ...o }) => {
857
- const i = t ?? "<TransitionSeries>", u = e ?? "absolute-fill";
858
- return /* @__PURE__ */ s.jsx(V, { name: i, layout: u, ...o, children: /* @__PURE__ */ s.jsx(Xe, { children: r }) });
859
- };
860
- E.Sequence = ae;
861
- E.Transition = J;
862
- pe.addSequenceStackTraces(E);
863
- pe.addSequenceStackTraces(ae);
864
- const xt = () => {
865
- const r = M.useContext(ge), t = M.useContext(ye);
866
- return !r && !t ? {
585
+ }, [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);
594
+ return !n && !t ? {
867
595
  isInTransitionSeries: !1,
868
596
  entering: 1,
869
597
  exiting: 0
870
598
  } : {
871
599
  isInTransitionSeries: !0,
872
- entering: (r == null ? void 0 : r.enteringProgress) ?? 1,
600
+ entering: (n == null ? void 0 : n.enteringProgress) ?? 1,
873
601
  exiting: (t == null ? void 0 : t.exitingProgress) ?? 0
874
602
  };
875
603
  }, ze = ({
876
- children: r,
604
+ children: n,
877
605
  presentationDirection: t,
878
606
  presentationProgress: e,
879
- passedProps: o
607
+ passedProps: r
880
608
  }) => {
881
- const u = Math.sqrt(o.width ** 2 + o.height ** 2) / 2 * e, f = Je(
882
- o.width / 2,
883
- o.height / 2,
884
- u
885
- ), [c] = K(() => String(Q(null))), a = w(() => ({
609
+ const l = Math.sqrt(r.width ** 2 + r.height ** 2) / 2 * e, u = je(
610
+ r.width / 2,
611
+ r.height / 2,
612
+ l
613
+ ), [a] = A(() => String(B(null))), i = h(() => ({
886
614
  width: "100%",
887
615
  height: "100%",
888
- clipPath: t === "exiting" ? void 0 : `url(#${c})`
889
- }), [c, t]);
890
- return /* @__PURE__ */ s.jsxs(x, { children: [
891
- /* @__PURE__ */ s.jsx(x, { style: a, children: r }),
892
- t === "exiting" ? null : /* @__PURE__ */ s.jsx(x, { children: /* @__PURE__ */ s.jsx("svg", { width: o.width, height: o.height, children: /* @__PURE__ */ s.jsx("defs", { children: /* @__PURE__ */ s.jsx("clipPath", { id: c, children: /* @__PURE__ */ s.jsx("path", { d: f, fill: "black" }) }) }) }) })
616
+ clipPath: t === "exiting" ? void 0 : `url(#${a})`
617
+ }), [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" }) }) }) }) })
893
621
  ] });
894
- }, Ve = (r) => ({ component: ze, props: r }), Je = (r, t, e) => `M ${r}, ${t}
622
+ }, _e = (n) => ({ component: ze, props: n }), je = (n, t, e) => `M ${n}, ${t}
895
623
  m -${e}, 0
896
624
  a ${e},${e} 0 1,0 ${e * 2},0
897
- a ${e},${e} 0 1,0 -${e * 2},0`, Ge = ({
898
- children: r,
625
+ a ${e},${e} 0 1,0 -${e * 2},0`, Ve = ({
626
+ children: n,
899
627
  presentationDirection: t,
900
628
  presentationProgress: e,
901
- passedProps: o
629
+ passedProps: r
902
630
  }) => {
903
- const { width: i, height: u } = o, f = i * e, c = u * e, a = i / 2 - f / 2, b = u / 2 - c / 2, [d] = K(() => String(Q(null))), v = w(() => ({
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(() => ({
904
632
  width: "100%",
905
633
  height: "100%",
906
634
  clipPath: t === "exiting" ? void 0 : `url(#${d})`
907
635
  }), [d, t]);
908
- return /* @__PURE__ */ s.jsxs(x, { children: [
909
- /* @__PURE__ */ s.jsx(x, { style: v, children: r }),
910
- t === "exiting" ? null : /* @__PURE__ */ s.jsx(x, { children: /* @__PURE__ */ s.jsx("svg", { children: /* @__PURE__ */ s.jsx("defs", { children: /* @__PURE__ */ s.jsx("clipPath", { id: d, children: /* @__PURE__ */ s.jsx(
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(
911
639
  "rect",
912
640
  {
913
- x: a,
914
- y: b,
915
- width: f,
916
- height: c,
641
+ x: i,
642
+ y: c,
643
+ width: u,
644
+ height: a,
917
645
  fill: "black"
918
646
  }
919
647
  ) }) }) }) })
920
648
  ] });
921
- }, He = (r) => ({ component: Ge, props: r }), Ze = ({
922
- children: r,
649
+ }, He = (n) => ({ component: Ve, props: n }), Je = ({
650
+ children: n,
923
651
  presentationDirection: t,
924
652
  presentationProgress: e,
925
- passedProps: o
653
+ passedProps: r
926
654
  }) => {
927
- const i = Math.sqrt(o.width ** 2 + o.height ** 2) / 2, u = i * e, f = i * 2 * e, { path: c } = je({
928
- innerRadius: u,
929
- outerRadius: f,
655
+ const s = Math.sqrt(r.width ** 2 + r.height ** 2) / 2, l = s * e, u = s * 2 * e, { path: a } = Ie({
656
+ innerRadius: l,
657
+ outerRadius: u,
930
658
  points: 5
931
- }), a = $e(c), b = he(
932
- c,
933
- o.width / 2 - a.width / 2,
934
- o.height / 2 - a.height / 2
935
- ), [d] = K(() => String(Q(null))), v = w(() => ({
659
+ }), i = xe(a), c = ce(
660
+ a,
661
+ r.width / 2 - i.width / 2,
662
+ r.height / 2 - i.height / 2
663
+ ), [d] = A(() => String(B(null))), g = h(() => ({
936
664
  width: "100%",
937
665
  height: "100%",
938
666
  clipPath: t === "exiting" ? void 0 : `url(#${d})`
939
667
  }), [d, t]);
940
- return /* @__PURE__ */ s.jsxs(x, { children: [
941
- /* @__PURE__ */ s.jsx(x, { style: v, children: r }),
942
- t === "exiting" ? null : /* @__PURE__ */ s.jsx(x, { children: /* @__PURE__ */ s.jsx("svg", { children: /* @__PURE__ */ s.jsx("defs", { children: /* @__PURE__ */ s.jsx("clipPath", { id: d, children: /* @__PURE__ */ s.jsx("path", { d: b, 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" }) }) }) }) })
943
671
  ] });
944
- }, Qe = (r) => ({ component: Ze, props: r }), Ke = ({
945
- children: r,
672
+ }, Ke = (n) => ({ component: Je, props: n }), Ge = ({
673
+ children: n,
946
674
  presentationDirection: t,
947
675
  presentationProgress: e,
948
- passedProps: o
676
+ passedProps: r
949
677
  }) => {
950
- const { width: i, height: u } = o, f = i * e, c = i / 2 - f / 2, [a] = K(() => String(Q(null))), b = w(() => ({
678
+ const { width: s, height: l } = r, u = s * e, a = s / 2 - u / 2, [i] = A(() => String(B(null))), c = h(() => ({
951
679
  width: "100%",
952
680
  height: "100%",
953
- clipPath: t === "exiting" ? void 0 : `url(#${a})`
954
- }), [a, t]);
955
- return /* @__PURE__ */ s.jsxs(x, { children: [
956
- /* @__PURE__ */ s.jsx(x, { style: b, children: r }),
957
- t === "exiting" ? null : /* @__PURE__ */ s.jsx(x, { children: /* @__PURE__ */ s.jsx("svg", { children: /* @__PURE__ */ s.jsx("defs", { children: /* @__PURE__ */ s.jsx("clipPath", { id: a, children: /* @__PURE__ */ s.jsx(
681
+ clipPath: t === "exiting" ? void 0 : `url(#${i})`
682
+ }), [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(
958
686
  "rect",
959
687
  {
960
- x: c,
688
+ x: a,
961
689
  y: 0,
962
- width: f,
963
- height: u,
690
+ width: u,
691
+ height: l,
964
692
  fill: "black"
965
693
  }
966
694
  ) }) }) }) })
967
695
  ] });
968
- }, et = (r) => ({ component: Ke, props: r });
969
- var tt = ({ children: r, presentationDirection: t, presentationProgress: e, passedProps: o }) => {
970
- const i = t === "entering", u = w(() => ({
971
- opacity: i ? e : o.shouldFadeOutExitingScene ? 1 - e : 1,
972
- ...t === "entering" ? o.enterStyle : o.exitStyle
696
+ }, Qe = (n) => ({ component: Ge, props: n });
697
+ var Ze = ({ children: n, presentationDirection: t, presentationProgress: e, passedProps: r }) => {
698
+ const s = t === "entering", l = h(() => ({
699
+ opacity: s ? e : r.shouldFadeOutExitingScene ? 1 - e : 1,
700
+ ...t === "entering" ? r.enterStyle : r.exitStyle
973
701
  }), [
974
- i,
975
- o.enterStyle,
976
- o.exitStyle,
977
- o.shouldFadeOutExitingScene,
702
+ s,
703
+ r.enterStyle,
704
+ r.exitStyle,
705
+ r.shouldFadeOutExitingScene,
978
706
  t,
979
707
  e
980
708
  ]);
981
- return /* @__PURE__ */ s.jsx(x, {
982
- style: u,
983
- children: r
709
+ return /* @__PURE__ */ o(m, {
710
+ style: l,
711
+ children: n
984
712
  });
985
- }, de = (r) => ({
986
- component: tt,
987
- props: r ?? {}
988
- }), rt = 0.01, nt = ({
989
- children: r,
713
+ }, ae = (n) => ({
714
+ component: Ze,
715
+ props: n ?? {}
716
+ }), et = 0.01, tt = ({
717
+ children: n,
990
718
  presentationProgress: t,
991
719
  presentationDirection: e,
992
- passedProps: { direction: o = "from-left", enterStyle: i, exitStyle: u }
720
+ passedProps: { direction: r = "from-left", enterStyle: s, exitStyle: l }
993
721
  }) => {
994
- const f = w(() => {
995
- const a = t === 1 ? t * 100 : t * 100 - rt;
722
+ const u = h(() => {
723
+ const i = t === 1 ? t * 100 : t * 100 - et;
996
724
  if (e === "exiting")
997
- switch (o) {
725
+ switch (r) {
998
726
  case "from-left":
999
727
  return {
1000
- transform: `translateX(${a}%)`
728
+ transform: `translateX(${i}%)`
1001
729
  };
1002
730
  case "from-right":
1003
731
  return {
@@ -1005,23 +733,23 @@ var tt = ({ children: r, presentationDirection: t, presentationProgress: e, pass
1005
733
  };
1006
734
  case "from-top":
1007
735
  return {
1008
- transform: `translateY(${a}%)`
736
+ transform: `translateY(${i}%)`
1009
737
  };
1010
738
  case "from-bottom":
1011
739
  return {
1012
740
  transform: `translateY(${-t * 100}%)`
1013
741
  };
1014
742
  default:
1015
- throw new Error(`Invalid direction: ${o}`);
743
+ throw new Error(`Invalid direction: ${r}`);
1016
744
  }
1017
- switch (o) {
745
+ switch (r) {
1018
746
  case "from-left":
1019
747
  return {
1020
748
  transform: `translateX(${-100 + t * 100}%)`
1021
749
  };
1022
750
  case "from-right":
1023
751
  return {
1024
- transform: `translateX(${100 - a}%)`
752
+ transform: `translateX(${100 - i}%)`
1025
753
  };
1026
754
  case "from-top":
1027
755
  return {
@@ -1029,28 +757,28 @@ var tt = ({ children: r, presentationDirection: t, presentationProgress: e, pass
1029
757
  };
1030
758
  case "from-bottom":
1031
759
  return {
1032
- transform: `translateY(${100 - a}%)`
760
+ transform: `translateY(${100 - i}%)`
1033
761
  };
1034
762
  default:
1035
- throw new Error(`Invalid direction: ${o}`);
763
+ throw new Error(`Invalid direction: ${r}`);
1036
764
  }
1037
- }, [e, t, o]), c = w(() => ({
765
+ }, [e, t, r]), a = h(() => ({
1038
766
  width: "100%",
1039
767
  height: "100%",
1040
768
  justifyContent: "center",
1041
769
  alignItems: "center",
1042
- ...f,
1043
- ...e === "entering" ? i : u
1044
- }), [f, i, u, e]);
1045
- return /* @__PURE__ */ s.jsx(x, {
1046
- style: c,
1047
- children: r
770
+ ...u,
771
+ ...e === "entering" ? s : l
772
+ }), [u, s, l, e]);
773
+ return /* @__PURE__ */ o(m, {
774
+ style: a,
775
+ children: n
1048
776
  });
1049
- }, ot = (r) => ({
1050
- component: nt,
1051
- props: r ?? {}
1052
- }), st = (r, t) => {
1053
- const e = r * 100;
777
+ }, nt = (n) => ({
778
+ component: tt,
779
+ props: n ?? {}
780
+ }), rt = (n, t) => {
781
+ const e = n * 100;
1054
782
  switch (t) {
1055
783
  case "from-left":
1056
784
  return `polygon(0% 0%, ${e}% 0%, ${e}% 100%, 0% 100%)`;
@@ -1071,8 +799,8 @@ var tt = ({ children: r, presentationDirection: t, presentationProgress: e, pass
1071
799
  default:
1072
800
  throw new Error(`Unknown direction ${JSON.stringify(t)}`);
1073
801
  }
1074
- }, it = (r, t) => {
1075
- const e = r * 100;
802
+ }, ot = (n, t) => {
803
+ const e = n * 100;
1076
804
  switch (t) {
1077
805
  case "from-left":
1078
806
  return `polygon(100% 100%, ${100 - e}% 100%, ${100 - e}% 0%, 100% 0%)`;
@@ -1093,205 +821,205 @@ var tt = ({ children: r, presentationDirection: t, presentationProgress: e, pass
1093
821
  default:
1094
822
  throw new Error(`Unknown direction ${JSON.stringify(t)}`);
1095
823
  }
1096
- }, at = ({
1097
- children: r,
824
+ }, it = ({
825
+ children: n,
1098
826
  presentationProgress: t,
1099
827
  presentationDirection: e,
1100
828
  passedProps: {
1101
- direction: o = "from-left",
1102
- innerEnterStyle: i,
1103
- innerExitStyle: u,
1104
- outerEnterStyle: f,
1105
- outerExitStyle: c
829
+ direction: r = "from-left",
830
+ innerEnterStyle: s,
831
+ innerExitStyle: l,
832
+ outerEnterStyle: u,
833
+ outerExitStyle: a
1106
834
  }
1107
835
  }) => {
1108
- const a = e === "entering" ? t : 1 - t, b = e === "entering" ? st(a, o) : it(a, o), d = w(() => ({
836
+ const i = e === "entering" ? t : 1 - t, c = e === "entering" ? rt(i, r) : ot(i, r), d = h(() => ({
1109
837
  width: "100%",
1110
838
  height: "100%",
1111
839
  justifyContent: "center",
1112
840
  alignItems: "center",
1113
- clipPath: b,
1114
- ...e === "entering" ? i : u
1115
- }), [b, i, u, e]), v = w(() => e === "entering" ? f : c, [f, c, e]);
1116
- return /* @__PURE__ */ s.jsx(x, {
1117
- style: v,
1118
- children: /* @__PURE__ */ s.jsx(x, {
841
+ clipPath: c,
842
+ ...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, {
1119
847
  style: d,
1120
- children: r
848
+ children: n
1121
849
  })
1122
850
  });
1123
- }, lt = (r) => ({
1124
- component: at,
1125
- props: r ?? {}
1126
- }), ut = ({
1127
- children: r,
851
+ }, st = (n) => ({
852
+ component: it,
853
+ props: n ?? {}
854
+ }), at = ({
855
+ children: n,
1128
856
  presentationDirection: t,
1129
857
  presentationProgress: e,
1130
858
  passedProps: {
1131
- direction: o = "from-left",
1132
- perspective: i = 1e3,
1133
- innerEnterStyle: u,
1134
- innerExitStyle: f,
1135
- outerEnterStyle: c,
1136
- outerExitStyle: a
859
+ direction: r = "from-left",
860
+ perspective: s = 1e3,
861
+ innerEnterStyle: l,
862
+ innerExitStyle: u,
863
+ outerEnterStyle: a,
864
+ outerExitStyle: i
1137
865
  }
1138
866
  }) => {
1139
- const b = w(() => {
1140
- const p = t === "entering" ? se(e, [0, 1], [o === "from-right" || o === "from-top" ? 180 : -180, 0]) : se(e, [0, 1], [0, o === "from-right" || o === "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]);
1141
869
  return {
1142
870
  width: "100%",
1143
871
  height: "100%",
1144
- transform: `${o === "from-top" || o === "from-bottom" ? "rotateX" : "rotateY"}(${p}deg)`,
872
+ transform: `${r === "from-top" || r === "from-bottom" ? "rotateX" : "rotateY"}(${p}deg)`,
1145
873
  backfaceVisibility: "hidden",
1146
874
  WebkitBackfaceVisibility: "hidden",
1147
- ...t === "entering" ? u : f
875
+ ...t === "entering" ? l : u
1148
876
  };
1149
877
  }, [
1150
- o,
878
+ r,
879
+ l,
1151
880
  u,
1152
- f,
1153
881
  t,
1154
882
  e
1155
- ]), d = w(() => ({
1156
- perspective: i,
883
+ ]), d = h(() => ({
884
+ perspective: s,
1157
885
  transformStyle: "preserve-3d",
1158
- ...t === "entering" ? c : a
1159
- }), [c, a, i, t]);
1160
- return /* @__PURE__ */ s.jsx(x, {
886
+ ...t === "entering" ? a : i
887
+ }), [a, i, s, t]);
888
+ return /* @__PURE__ */ o(m, {
1161
889
  style: d,
1162
- children: /* @__PURE__ */ s.jsx(x, {
1163
- style: b,
1164
- children: r
890
+ children: /* @__PURE__ */ o(m, {
891
+ style: c,
892
+ children: n
1165
893
  })
1166
894
  });
1167
- }, ct = (r) => ({ component: ut, props: r ?? {} }), ft = ({ children: r, presentationDirection: t, presentationProgress: e, passedProps: o }) => {
1168
- const i = Math.sqrt(o.width ** 2 + o.height ** 2) / 2, { path: u } = Re({
1169
- radius: i,
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({
897
+ radius: s,
1170
898
  progress: e
1171
- }), f = he(u, -(i * 2 - o.width) / 2, -(i * 2 - o.height) / 2), c = w(() => ({
899
+ }), u = ce(l, -(s * 2 - r.width) / 2, -(s * 2 - r.height) / 2), a = h(() => ({
1172
900
  width: "100%",
1173
901
  height: "100%",
1174
- clipPath: t === "exiting" ? void 0 : `path("${f}")`,
1175
- ...t === "entering" ? o.innerEnterStyle : o.innerExitStyle
902
+ clipPath: t === "exiting" ? void 0 : `path("${u}")`,
903
+ ...t === "entering" ? r.innerEnterStyle : r.innerExitStyle
1176
904
  }), [
1177
- f,
1178
- o.innerEnterStyle,
1179
- o.innerExitStyle,
905
+ u,
906
+ r.innerEnterStyle,
907
+ r.innerExitStyle,
1180
908
  t
1181
- ]), a = w(() => t === "entering" ? o.outerEnterStyle : o.outerExitStyle, [
1182
- o.outerEnterStyle,
1183
- o.outerExitStyle,
909
+ ]), i = h(() => t === "entering" ? r.outerEnterStyle : r.outerExitStyle, [
910
+ r.outerEnterStyle,
911
+ r.outerExitStyle,
1184
912
  t
1185
913
  ]);
1186
- return /* @__PURE__ */ s.jsx(x, {
1187
- style: a,
1188
- children: /* @__PURE__ */ s.jsx(x, {
1189
- style: c,
1190
- children: r
914
+ return /* @__PURE__ */ o(m, {
915
+ style: i,
916
+ children: /* @__PURE__ */ o(m, {
917
+ style: a,
918
+ children: n
1191
919
  })
1192
920
  });
1193
- }, mt = (r) => ({ component: ft, props: r ?? {} });
1194
- const bt = {
1195
- none: ({ id: r }) => /* @__PURE__ */ s.jsx(
1196
- E.Transition,
921
+ }, ct = (n) => ({ component: ut, props: n ?? {} });
922
+ const wt = {
923
+ none: ({ id: n }) => /* @__PURE__ */ o(
924
+ T.Transition,
1197
925
  {
1198
- presentation: de(),
1199
- timing: A({ durationInFrames: 1 })
926
+ presentation: ae(),
927
+ timing: $({ durationInFrames: 1 })
1200
928
  },
1201
- r
929
+ n
1202
930
  ),
1203
- fade: ({ durationInFrames: r, id: t }) => /* @__PURE__ */ s.jsx(
1204
- E.Transition,
931
+ fade: ({ durationInFrames: n, id: t }) => /* @__PURE__ */ o(
932
+ T.Transition,
1205
933
  {
1206
- presentation: de(),
1207
- timing: A({ durationInFrames: r })
934
+ presentation: ae(),
935
+ timing: $({ durationInFrames: n })
1208
936
  },
1209
937
  t
1210
938
  ),
1211
- slide: ({ durationInFrames: r, id: t, direction: e }) => /* @__PURE__ */ s.jsx(
1212
- E.Transition,
939
+ slide: ({ durationInFrames: n, id: t, direction: e }) => /* @__PURE__ */ o(
940
+ T.Transition,
1213
941
  {
1214
- presentation: ot({ direction: e }),
1215
- timing: A({ durationInFrames: r })
942
+ presentation: nt({ direction: e }),
943
+ timing: $({ durationInFrames: n })
1216
944
  },
1217
945
  t
1218
946
  ),
1219
- wipe: ({ durationInFrames: r, id: t, direction: e }) => /* @__PURE__ */ s.jsx(
1220
- E.Transition,
947
+ wipe: ({ durationInFrames: n, id: t, direction: e }) => /* @__PURE__ */ o(
948
+ T.Transition,
1221
949
  {
1222
- presentation: lt({ direction: e }),
1223
- timing: A({ durationInFrames: r })
950
+ presentation: st({ direction: e }),
951
+ timing: $({ durationInFrames: n })
1224
952
  },
1225
953
  t
1226
954
  ),
1227
- flip: ({ durationInFrames: r, id: t }) => /* @__PURE__ */ s.jsx(
1228
- E.Transition,
955
+ flip: ({ durationInFrames: n, id: t }) => /* @__PURE__ */ o(
956
+ T.Transition,
1229
957
  {
1230
- presentation: ct(),
1231
- timing: A({ durationInFrames: r })
958
+ presentation: lt(),
959
+ timing: $({ durationInFrames: n })
1232
960
  },
1233
961
  t
1234
962
  ),
1235
- clockWipe: ({ width: r, height: t, durationInFrames: e, id: o }) => /* @__PURE__ */ s.jsx(
1236
- E.Transition,
963
+ clockWipe: ({ width: n, height: t, durationInFrames: e, id: r }) => /* @__PURE__ */ o(
964
+ T.Transition,
1237
965
  {
1238
- presentation: mt({ width: r, height: t }),
1239
- timing: A({ durationInFrames: e })
966
+ presentation: ct({ width: n, height: t }),
967
+ timing: $({ durationInFrames: e })
1240
968
  },
1241
- o
969
+ r
1242
970
  ),
1243
- star: ({ width: r, height: t, durationInFrames: e, id: o }) => /* @__PURE__ */ s.jsx(
1244
- E.Transition,
971
+ star: ({ width: n, height: t, durationInFrames: e, id: r }) => /* @__PURE__ */ o(
972
+ T.Transition,
1245
973
  {
1246
- presentation: Qe({ width: r, height: t }),
1247
- timing: A({ durationInFrames: e })
974
+ presentation: Ke({ width: n, height: t }),
975
+ timing: $({ durationInFrames: e })
1248
976
  },
1249
- o
977
+ r
1250
978
  ),
1251
- circle: ({ width: r, height: t, durationInFrames: e, id: o }) => /* @__PURE__ */ s.jsx(
1252
- E.Transition,
979
+ circle: ({ width: n, height: t, durationInFrames: e, id: r }) => /* @__PURE__ */ o(
980
+ T.Transition,
1253
981
  {
1254
- presentation: Ve({ width: r, height: t }),
1255
- timing: A({ durationInFrames: e })
982
+ presentation: _e({ width: n, height: t }),
983
+ timing: $({ durationInFrames: e })
1256
984
  },
1257
- o
985
+ r
1258
986
  ),
1259
- rectangle: ({ width: r, height: t, durationInFrames: e, id: o }) => /* @__PURE__ */ s.jsx(
1260
- E.Transition,
987
+ rectangle: ({ width: n, height: t, durationInFrames: e, id: r }) => /* @__PURE__ */ o(
988
+ T.Transition,
1261
989
  {
1262
- presentation: He({ width: r, height: t }),
1263
- timing: A({ durationInFrames: e })
990
+ presentation: He({ width: n, height: t }),
991
+ timing: $({ durationInFrames: e })
1264
992
  },
1265
- o
993
+ r
1266
994
  ),
1267
995
  slidingDoors: ({
1268
- width: r,
996
+ width: n,
1269
997
  height: t,
1270
998
  durationInFrames: e,
1271
- id: o
1272
- }) => /* @__PURE__ */ s.jsx(
1273
- E.Transition,
999
+ id: r
1000
+ }) => /* @__PURE__ */ o(
1001
+ T.Transition,
1274
1002
  {
1275
- presentation: et({ width: r, height: t }),
1276
- timing: A({ durationInFrames: e })
1003
+ presentation: Qe({ width: n, height: t }),
1004
+ timing: $({ durationInFrames: e })
1277
1005
  },
1278
- o
1006
+ r
1279
1007
  )
1280
1008
  };
1281
1009
  export {
1282
- E as TransitionSeries,
1283
- bt as Transitions,
1284
- Ve as circle,
1285
- mt as clockWipe,
1286
- de as fade,
1287
- ct as flip,
1288
- A as linearTiming,
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,
1289
1017
  He as rectangle,
1290
- ot as slide,
1291
- et as slidingDoors,
1292
- yt as springTiming,
1293
- Qe as star,
1294
- xt as useTransitionProgress,
1295
- lt as wipe
1018
+ nt as slide,
1019
+ Qe as slidingDoors,
1020
+ St as springTiming,
1021
+ Ke as star,
1022
+ $t as useTransitionProgress,
1023
+ st as wipe
1296
1024
  };
1297
1025
  //# sourceMappingURL=index.es.js.map