@cliquify.me/transitions 0.11.16 → 0.11.17

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 D, spring as ce, measureSpring as me, AbsoluteFill as c, Internals as Z, Sequence as M, useVideoConfig as de, useCurrentFrame as fe, Freeze as Y, random as B } from "remotion";
2
+ import { jsx as o, Fragment as ee, jsxs as W } from "react/jsx-runtime";
3
+ import C, { useMemo as h, Children as pe, useState as A } from "react";
4
+ import { getBoundingBox as he, translatePath as te } from "@remotion/paths";
5
+ import { makeStar as ge, makePie as ye } from "@remotion/shapes";
6
+ const T = (n) => ({
7
+ getDurationInFrames: () => n.durationInFrames,
8
+ getProgress: ({ frame: t }) => D(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
+ }), at = (n = {}) => ({
14
+ getDurationInFrames: ({ fps: t }) => n.durationInFrames ? n.durationInFrames : me({
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 ce({
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 $e = {
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
+ }, we = {
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
+ }, Te = {
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
+ }, be = {
418
144
  "style.backgroundColor": {
419
145
  type: "color",
420
146
  default: "transparent",
421
147
  description: "Color"
422
148
  }
423
- }, Oe = {
149
+ }, Se = {
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
+ }, Fe = {
168
+ ...Se
169
+ }, ve = {
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 = {
485
- ...qe,
486
- ...Ie,
487
- ...Ae,
488
- ...ke,
489
- ...Pe,
490
- ...Ce
491
- }, Ye = {
210
+ }, xe = ve, Ie = {
211
+ ...xe,
212
+ ...$e,
213
+ ...be,
214
+ ...we,
215
+ ...Te,
216
+ ...Fe
217
+ }, Ee = {
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": Ie,
498
224
  none: {}
499
225
  }
500
226
  }
501
227
  };
502
228
  ({
503
- ...Ye.layout
229
+ ...Ee.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 Pe(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 qe = {
245
+ validateDurationInFrames: Pe
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 ne = C.createContext(null), re = C.createContext(null), K = ({ presentationProgress: n, children: t }) => {
248
+ const e = h(() => ({
249
+ enteringProgress: n
250
+ }), [n]);
251
+ return /* @__PURE__ */ o(ne.Provider, { value: e, children: t });
252
+ }, G = ({ presentationProgress: n, children: t }) => {
253
+ const e = h(() => ({
254
+ exitingProgress: n
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(
259
+ r.props.children
534
260
  )
535
- ) : (e.push(o), e), []), De = 0.01, Ue = ({
536
- children: r,
261
+ ) : (e.push(r), e), []), Re = 0.01, ke = ({
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 - Re;
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,136 @@ 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) => ({
594
- component: Ue,
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,
595
321
  props: {}
596
- }), Be = We.validateDurationInFrames, J = function(r) {
322
+ }), Ce = qe.validateDurationInFrames, L = function(n) {
597
323
  return null;
598
- }, ae = ({ children: r }) => /* @__PURE__ */ s.jsx(s.Fragment, { children: r }), Xe = ({
599
- children: r
324
+ }, z = ({ children: n }) => /* @__PURE__ */ o(ee, { children: n }), Me = ({
325
+ children: n
600
326
  }) => {
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() === "")
327
+ const { fps: t } = de(), e = fe(), r = h(() => {
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() === "")
608
334
  return null;
609
335
  throw new TypeError(
610
- `The <TransitionSeries /> component only accepts a list of <TransitionSeries.Sequence /> components as its children, but you passed a string "${b}"`
336
+ `The <TransitionSeries /> component only accepts a list of <TransitionSeries.Sequence /> components as its children, but you passed a string "${f}"`
611
337
  );
612
338
  }
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)
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 (_)
616
342
  throw new TypeError(
617
- `A <TransitionSeries.Transition /> component must not be followed by another <TransitionSeries.Transition /> component (nth children = ${a - 1} and ${a})`
343
+ `A <TransitionSeries.Transition /> component must not be followed by another <TransitionSeries.Transition /> component (nth children = ${i - 1} and ${i})`
618
344
  );
619
345
  return null;
620
346
  }
621
- if (b.type !== ae)
347
+ if (f.type !== z)
622
348
  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`
349
+ `The <TransitionSeries /> component only accepts a list of <TransitionSeries.Sequence /> and <TransitionSeries.Transition /> components as its children, but got ${f} instead`
624
350
  );
625
- const O = b, _ = `index = ${a}, duration = ${O.props.durationInFrames}`;
626
- if (!(O != null && O.props.children))
351
+ const E = f, R = `index = ${i}, duration = ${E.props.durationInFrames}`;
352
+ if (!(E != null && E.props.children))
627
353
  throw new TypeError(
628
- `A <TransitionSeries.Sequence /> component (${_}) was detected to not have any children. Delete it to fix this error.`
354
+ `A <TransitionSeries.Sequence /> component (${R}) was detected to not have any children. Delete it to fix this error.`
629
355
  );
630
- const $ = O.props.durationInFrames, {
631
- durationInFrames: R,
632
- children: le,
633
- ...I
634
- } = O.props;
635
- Be($, {
356
+ const w = E.props.durationInFrames, {
357
+ durationInFrames: b,
358
+ children: tt,
359
+ ...F
360
+ } = E.props;
361
+ Ce(w, {
636
362
  component: "of a <TransitionSeries.Sequence /> component",
637
363
  allowFloats: !0
638
364
  });
639
- const C = O.props.offset ?? 0;
640
- if (Number.isNaN(C))
365
+ const P = E.props.offset ?? 0;
366
+ if (Number.isNaN(P))
641
367
  throw new TypeError(
642
- `The "offset" property of a <TransitionSeries.Sequence /> must not be NaN, but got NaN (${_}).`
368
+ `The "offset" property of a <TransitionSeries.Sequence /> must not be NaN, but got NaN (${R}).`
643
369
  );
644
- if (!Number.isFinite(C))
370
+ if (!Number.isFinite(P))
645
371
  throw new TypeError(
646
- `The "offset" property of a <TransitionSeries.Sequence /> must be finite, but got ${C} (${_}).`
372
+ `The "offset" property of a <TransitionSeries.Sequence /> must be finite, but got ${P} (${R}).`
647
373
  );
648
- if (C % 1 !== 0)
374
+ if (P % 1 !== 0)
649
375
  throw new TypeError(
650
- `The "offset" property of a <TransitionSeries.Sequence /> must be finite, but got ${C} (${_}).`
376
+ `The "offset" property of a <TransitionSeries.Sequence /> must be finite, but got ${P} (${R}).`
651
377
  );
652
- const ee = u + C;
653
- let D = 0;
654
- g && (D = g.props.timing.getDurationInFrames({
378
+ const ie = l + P;
379
+ let X = 0;
380
+ p && (X = p.props.timing.getDurationInFrames({
655
381
  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,
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,
661
387
  fps: t
662
- }) : null, N = g ? g.props.timing.getProgress({
663
- frame: e - h,
388
+ }) : null, k = p ? p.props.timing.getProgress({
389
+ frame: e - m,
664
390
  fps: t
665
- }) : null, te = g ? g.props.timing.getProgress({
666
- frame: e - (h + R),
391
+ }) : null, se = p ? p.props.timing.getProgress({
392
+ frame: e - (m + b),
667
393
  fps: t
668
394
  }) : null;
669
- if (p && $ < p.props.timing.getDurationInFrames({ fps: t }) / 2)
395
+ if (g && w < g.props.timing.getDurationInFrames({ fps: t }) / 2)
670
396
  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(
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(
672
398
  { fps: t }
673
- )} frames long, but the sequence is only ${$} frames long (${_})`
399
+ )} frames long, but the sequence is only ${w} frames long (${R})`
674
400
  );
675
- if (g && $ < g.props.timing.getDurationInFrames({ fps: t }) / 2)
401
+ if (p && w < p.props.timing.getDurationInFrames({ fps: t }) / 2)
676
402
  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(
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(
678
404
  { fps: t }
679
- )} frames long, but the sequence is only ${$} frames long (${_})`
405
+ )} frames long, but the sequence is only ${w} frames long (${R})`
680
406
  );
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({
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({
683
409
  fps: t
684
- }), S = p.props.timing.getDurationInFrames({
410
+ }), S = g.props.timing.getDurationInFrames({
685
411
  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),
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),
688
414
  fps: t
689
- }), m = e > h, y = e < h + R + S / 2 + k / 2;
690
- return /* @__PURE__ */ s.jsx(
691
- oe,
415
+ }), le = e > m, ue = e < m + b + S / 2 + I / 2;
416
+ return /* @__PURE__ */ o(
417
+ Y,
692
418
  {
693
- active: y && m && (U || B),
694
- frame: G,
695
- children: /* @__PURE__ */ s.jsx(
696
- V,
419
+ active: ue && le && (j || V),
420
+ frame: ae,
421
+ children: /* @__PURE__ */ o(
422
+ M,
697
423
  {
698
- from: n,
699
- durationInFrames: $ + S / 2,
700
- ...I,
701
- name: I.name || "<TS.Sequence>",
702
- children: /* @__PURE__ */ s.jsx(
703
- P,
424
+ from: H,
425
+ durationInFrames: w + S / 2,
426
+ ...F,
427
+ name: F.name || "<TS.Sequence>",
428
+ children: /* @__PURE__ */ o(
429
+ q,
704
430
  {
705
- passedProps: j.props ?? {},
431
+ passedProps: v.props ?? {},
706
432
  presentationDirection: "exiting",
707
- presentationProgress: l,
708
- presentationDurationInFrames: p.props.timing.getDurationInFrames(
433
+ presentationProgress: J,
434
+ presentationDurationInFrames: g.props.timing.getDurationInFrames(
709
435
  { fps: t }
710
436
  ),
711
437
  onElementImage: () => {
@@ -713,17 +439,17 @@ const ge = M.createContext(null), ye = M.createContext(null), fe = ({ presentati
713
439
  onUnmount: () => {
714
440
  },
715
441
  bothEnteringAndExiting: !1,
716
- children: /* @__PURE__ */ s.jsx(
717
- me,
442
+ children: /* @__PURE__ */ o(
443
+ G,
718
444
  {
719
- presentationProgress: l,
720
- children: /* @__PURE__ */ s.jsx(
721
- Y,
445
+ presentationProgress: J,
446
+ children: /* @__PURE__ */ o(
447
+ U,
722
448
  {
723
- passedProps: F.props ?? {},
449
+ passedProps: x.props ?? {},
724
450
  presentationDirection: "entering",
725
- presentationProgress: N,
726
- presentationDurationInFrames: g.props.timing.getDurationInFrames(
451
+ presentationProgress: k,
452
+ presentationDurationInFrames: p.props.timing.getDurationInFrames(
727
453
  { fps: t }
728
454
  ),
729
455
  onElementImage: () => {
@@ -731,11 +457,11 @@ const ge = M.createContext(null), ye = M.createContext(null), fe = ({ presentati
731
457
  onUnmount: () => {
732
458
  },
733
459
  bothEnteringAndExiting: !1,
734
- children: /* @__PURE__ */ s.jsx(
735
- fe,
460
+ children: /* @__PURE__ */ o(
461
+ K,
736
462
  {
737
- presentationProgress: N,
738
- children: c
463
+ presentationProgress: k,
464
+ children: a
739
465
  }
740
466
  )
741
467
  }
@@ -745,33 +471,33 @@ const ge = M.createContext(null), ye = M.createContext(null), fe = ({ presentati
745
471
  }
746
472
  )
747
473
  },
748
- a
474
+ i
749
475
  )
750
476
  },
751
- a
477
+ i
752
478
  );
753
479
  }
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,
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;
482
+ return /* @__PURE__ */ o(
483
+ Y,
758
484
  {
759
- active: Y && S,
760
- frame: P,
761
- children: /* @__PURE__ */ s.jsx(
762
- V,
485
+ active: U && S,
486
+ frame: q,
487
+ children: /* @__PURE__ */ o(
488
+ M,
763
489
  {
764
- from: P,
765
- durationInFrames: $,
766
- ...I,
767
- name: I.name || "<TS.Sequence>",
768
- children: /* @__PURE__ */ s.jsx(
769
- k,
490
+ from: q,
491
+ durationInFrames: w,
492
+ ...F,
493
+ name: F.name || "<TS.Sequence>",
494
+ children: /* @__PURE__ */ o(
495
+ I,
770
496
  {
771
- passedProps: F.props ?? {},
497
+ passedProps: x.props ?? {},
772
498
  presentationDirection: "entering",
773
- presentationProgress: N,
774
- presentationDurationInFrames: g.props.timing.getDurationInFrames(
499
+ presentationProgress: k,
500
+ presentationDurationInFrames: p.props.timing.getDurationInFrames(
775
501
  { fps: t }
776
502
  ),
777
503
  onElementImage: () => {
@@ -779,43 +505,43 @@ const ge = M.createContext(null), ye = M.createContext(null), fe = ({ presentati
779
505
  onUnmount: () => {
780
506
  },
781
507
  bothEnteringAndExiting: !1,
782
- children: /* @__PURE__ */ s.jsx(
783
- fe,
508
+ children: /* @__PURE__ */ o(
509
+ K,
784
510
  {
785
- presentationProgress: N,
786
- children: c
511
+ presentationProgress: k,
512
+ children: a
787
513
  }
788
514
  )
789
515
  }
790
516
  )
791
517
  },
792
- a
518
+ i
793
519
  )
794
520
  },
795
- a
521
+ i
796
522
  );
797
523
  }
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,
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;
526
+ return /* @__PURE__ */ o(
527
+ Y,
802
528
  {
803
- active: P && S,
804
- frame: Math.floor(R),
805
- children: /* @__PURE__ */ s.jsx(
806
- V,
529
+ active: q && S,
530
+ frame: Math.floor(b),
531
+ children: /* @__PURE__ */ o(
532
+ M,
807
533
  {
808
- from: Math.floor(h),
809
- durationInFrames: $ + j,
810
- ...I,
811
- name: I.name || "<TS.Sequence>",
812
- children: /* @__PURE__ */ s.jsx(
813
- k,
534
+ from: Math.floor(m),
535
+ durationInFrames: w + v,
536
+ ...F,
537
+ name: F.name || "<TS.Sequence>",
538
+ children: /* @__PURE__ */ o(
539
+ I,
814
540
  {
815
- passedProps: F.props ?? {},
541
+ passedProps: x.props ?? {},
816
542
  presentationDirection: "exiting",
817
- presentationProgress: q,
818
- presentationDurationInFrames: p.props.timing.getDurationInFrames(
543
+ presentationProgress: O,
544
+ presentationDurationInFrames: g.props.timing.getDurationInFrames(
819
545
  { fps: t }
820
546
  ),
821
547
  onElementImage: () => {
@@ -823,181 +549,178 @@ const ge = M.createContext(null), ye = M.createContext(null), fe = ({ presentati
823
549
  onUnmount: () => {
824
550
  },
825
551
  bothEnteringAndExiting: !1,
826
- children: /* @__PURE__ */ s.jsx(
827
- me,
552
+ children: /* @__PURE__ */ o(
553
+ G,
828
554
  {
829
- presentationProgress: q,
830
- children: c
555
+ presentationProgress: O,
556
+ children: a
831
557
  }
832
558
  )
833
559
  }
834
560
  )
835
561
  },
836
- a
562
+ i
837
563
  )
838
564
  },
839
- a
565
+ i
840
566
  );
841
567
  }
842
- return /* @__PURE__ */ s.jsx(
843
- V,
568
+ return /* @__PURE__ */ o(
569
+ M,
844
570
  {
845
- from: Math.floor(h),
846
- durationInFrames: $,
847
- ...I,
848
- name: I.name || "<TS.Sequence>",
849
- children: c
571
+ from: Math.floor(m),
572
+ durationInFrames: w,
573
+ ...F,
574
+ name: F.name || "<TS.Sequence>",
575
+ children: a
850
576
  },
851
- a
577
+ i
852
578
  );
853
579
  });
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 ? {
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 ? {
867
590
  isInTransitionSeries: !1,
868
591
  entering: 1,
869
592
  exiting: 0
870
593
  } : {
871
594
  isInTransitionSeries: !0,
872
- entering: (r == null ? void 0 : r.enteringProgress) ?? 1,
595
+ entering: (n == null ? void 0 : n.enteringProgress) ?? 1,
873
596
  exiting: (t == null ? void 0 : t.exitingProgress) ?? 0
874
597
  };
875
- }, ze = ({
876
- children: r,
598
+ }, Le = ({
599
+ children: n,
877
600
  presentationDirection: t,
878
601
  presentationProgress: e,
879
- passedProps: o
602
+ passedProps: r
880
603
  }) => {
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(() => ({
604
+ const l = Math.sqrt(r.width ** 2 + r.height ** 2) / 2 * e, u = Be(
605
+ r.width / 2,
606
+ r.height / 2,
607
+ l
608
+ ), [a] = A(() => String(B(null))), i = h(() => ({
886
609
  width: "100%",
887
610
  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" }) }) }) }) })
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" }) }) }) }) })
893
616
  ] });
894
- }, Ve = (r) => ({ component: ze, props: r }), Je = (r, t, e) => `M ${r}, ${t}
617
+ }, Ne = (n) => ({ component: Le, props: n }), Be = (n, t, e) => `M ${n}, ${t}
895
618
  m -${e}, 0
896
619
  a ${e},${e} 0 1,0 ${e * 2},0
897
- a ${e},${e} 0 1,0 -${e * 2},0`, Ge = ({
898
- children: r,
620
+ a ${e},${e} 0 1,0 -${e * 2},0`, We = ({
621
+ children: n,
899
622
  presentationDirection: t,
900
623
  presentationProgress: e,
901
- passedProps: o
624
+ passedProps: r
902
625
  }) => {
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(() => ({
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(() => ({
904
627
  width: "100%",
905
628
  height: "100%",
906
629
  clipPath: t === "exiting" ? void 0 : `url(#${d})`
907
630
  }), [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(
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(
911
634
  "rect",
912
635
  {
913
- x: a,
914
- y: b,
915
- width: f,
916
- height: c,
636
+ x: i,
637
+ y: f,
638
+ width: u,
639
+ height: a,
917
640
  fill: "black"
918
641
  }
919
642
  ) }) }) }) })
920
643
  ] });
921
- }, He = (r) => ({ component: Ge, props: r }), Ze = ({
922
- children: r,
644
+ }, Ae = (n) => ({ component: We, props: n }), Xe = ({
645
+ children: n,
923
646
  presentationDirection: t,
924
647
  presentationProgress: e,
925
- passedProps: o
648
+ passedProps: r
926
649
  }) => {
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,
650
+ const s = Math.sqrt(r.width ** 2 + r.height ** 2) / 2, l = s * e, u = s * 2 * e, { path: a } = ge({
651
+ innerRadius: l,
652
+ outerRadius: u,
930
653
  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(() => ({
654
+ }), i = he(a), f = te(
655
+ a,
656
+ r.width / 2 - i.width / 2,
657
+ r.height / 2 - i.height / 2
658
+ ), [d] = A(() => String(B(null))), $ = h(() => ({
936
659
  width: "100%",
937
660
  height: "100%",
938
661
  clipPath: t === "exiting" ? void 0 : `url(#${d})`
939
662
  }), [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" }) }) }) }) })
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" }) }) }) }) })
943
666
  ] });
944
- }, Qe = (r) => ({ component: Ze, props: r }), Ke = ({
945
- children: r,
667
+ }, Oe = (n) => ({ component: Xe, props: n }), Ue = ({
668
+ children: n,
946
669
  presentationDirection: t,
947
670
  presentationProgress: e,
948
- passedProps: o
671
+ passedProps: r
949
672
  }) => {
950
- const { width: i, height: u } = o, f = i * e, c = i / 2 - f / 2, [a] = K(() => String(Q(null))), b = w(() => ({
673
+ const { width: s, height: l } = r, u = s * e, a = s / 2 - u / 2, [i] = A(() => String(B(null))), f = h(() => ({
951
674
  width: "100%",
952
675
  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(
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(
958
681
  "rect",
959
682
  {
960
- x: c,
683
+ x: a,
961
684
  y: 0,
962
- width: f,
963
- height: u,
685
+ width: u,
686
+ height: l,
964
687
  fill: "black"
965
688
  }
966
689
  ) }) }) }) })
967
690
  ] });
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
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
973
696
  }), [
974
- i,
975
- o.enterStyle,
976
- o.exitStyle,
977
- o.shouldFadeOutExitingScene,
697
+ s,
698
+ r.enterStyle,
699
+ r.exitStyle,
700
+ r.shouldFadeOutExitingScene,
978
701
  t,
979
702
  e
980
703
  ]);
981
- return /* @__PURE__ */ s.jsx(x, {
982
- style: u,
983
- children: r
704
+ return /* @__PURE__ */ o(c, {
705
+ style: l,
706
+ children: n
984
707
  });
985
- }, de = (r) => ({
986
- component: tt,
987
- props: r ?? {}
988
- }), rt = 0.01, nt = ({
989
- children: r,
708
+ }, Q = (n) => ({
709
+ component: De,
710
+ props: n ?? {}
711
+ }), ze = 0.01, _e = ({
712
+ children: n,
990
713
  presentationProgress: t,
991
714
  presentationDirection: e,
992
- passedProps: { direction: o = "from-left", enterStyle: i, exitStyle: u }
715
+ passedProps: { direction: r = "from-left", enterStyle: s, exitStyle: l }
993
716
  }) => {
994
- const f = w(() => {
995
- const a = t === 1 ? t * 100 : t * 100 - rt;
717
+ const u = h(() => {
718
+ const i = t === 1 ? t * 100 : t * 100 - ze;
996
719
  if (e === "exiting")
997
- switch (o) {
720
+ switch (r) {
998
721
  case "from-left":
999
722
  return {
1000
- transform: `translateX(${a}%)`
723
+ transform: `translateX(${i}%)`
1001
724
  };
1002
725
  case "from-right":
1003
726
  return {
@@ -1005,23 +728,23 @@ var tt = ({ children: r, presentationDirection: t, presentationProgress: e, pass
1005
728
  };
1006
729
  case "from-top":
1007
730
  return {
1008
- transform: `translateY(${a}%)`
731
+ transform: `translateY(${i}%)`
1009
732
  };
1010
733
  case "from-bottom":
1011
734
  return {
1012
735
  transform: `translateY(${-t * 100}%)`
1013
736
  };
1014
737
  default:
1015
- throw new Error(`Invalid direction: ${o}`);
738
+ throw new Error(`Invalid direction: ${r}`);
1016
739
  }
1017
- switch (o) {
740
+ switch (r) {
1018
741
  case "from-left":
1019
742
  return {
1020
743
  transform: `translateX(${-100 + t * 100}%)`
1021
744
  };
1022
745
  case "from-right":
1023
746
  return {
1024
- transform: `translateX(${100 - a}%)`
747
+ transform: `translateX(${100 - i}%)`
1025
748
  };
1026
749
  case "from-top":
1027
750
  return {
@@ -1029,28 +752,28 @@ var tt = ({ children: r, presentationDirection: t, presentationProgress: e, pass
1029
752
  };
1030
753
  case "from-bottom":
1031
754
  return {
1032
- transform: `translateY(${100 - a}%)`
755
+ transform: `translateY(${100 - i}%)`
1033
756
  };
1034
757
  default:
1035
- throw new Error(`Invalid direction: ${o}`);
758
+ throw new Error(`Invalid direction: ${r}`);
1036
759
  }
1037
- }, [e, t, o]), c = w(() => ({
760
+ }, [e, t, r]), a = h(() => ({
1038
761
  width: "100%",
1039
762
  height: "100%",
1040
763
  justifyContent: "center",
1041
764
  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
765
+ ...u,
766
+ ...e === "entering" ? s : l
767
+ }), [u, s, l, e]);
768
+ return /* @__PURE__ */ o(c, {
769
+ style: a,
770
+ children: n
1048
771
  });
1049
- }, ot = (r) => ({
1050
- component: nt,
1051
- props: r ?? {}
1052
- }), st = (r, t) => {
1053
- const e = r * 100;
772
+ }, je = (n) => ({
773
+ component: _e,
774
+ props: n ?? {}
775
+ }), Ve = (n, t) => {
776
+ const e = n * 100;
1054
777
  switch (t) {
1055
778
  case "from-left":
1056
779
  return `polygon(0% 0%, ${e}% 0%, ${e}% 100%, 0% 100%)`;
@@ -1071,8 +794,8 @@ var tt = ({ children: r, presentationDirection: t, presentationProgress: e, pass
1071
794
  default:
1072
795
  throw new Error(`Unknown direction ${JSON.stringify(t)}`);
1073
796
  }
1074
- }, it = (r, t) => {
1075
- const e = r * 100;
797
+ }, He = (n, t) => {
798
+ const e = n * 100;
1076
799
  switch (t) {
1077
800
  case "from-left":
1078
801
  return `polygon(100% 100%, ${100 - e}% 100%, ${100 - e}% 0%, 100% 0%)`;
@@ -1093,205 +816,205 @@ var tt = ({ children: r, presentationDirection: t, presentationProgress: e, pass
1093
816
  default:
1094
817
  throw new Error(`Unknown direction ${JSON.stringify(t)}`);
1095
818
  }
1096
- }, at = ({
1097
- children: r,
819
+ }, Je = ({
820
+ children: n,
1098
821
  presentationProgress: t,
1099
822
  presentationDirection: e,
1100
823
  passedProps: {
1101
- direction: o = "from-left",
1102
- innerEnterStyle: i,
1103
- innerExitStyle: u,
1104
- outerEnterStyle: f,
1105
- outerExitStyle: c
824
+ direction: r = "from-left",
825
+ innerEnterStyle: s,
826
+ innerExitStyle: l,
827
+ outerEnterStyle: u,
828
+ outerExitStyle: a
1106
829
  }
1107
830
  }) => {
1108
- const a = e === "entering" ? t : 1 - t, b = e === "entering" ? st(a, o) : it(a, o), d = w(() => ({
831
+ const i = e === "entering" ? t : 1 - t, f = e === "entering" ? Ve(i, r) : He(i, r), d = h(() => ({
1109
832
  width: "100%",
1110
833
  height: "100%",
1111
834
  justifyContent: "center",
1112
835
  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, {
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, {
1119
842
  style: d,
1120
- children: r
843
+ children: n
1121
844
  })
1122
845
  });
1123
- }, lt = (r) => ({
1124
- component: at,
1125
- props: r ?? {}
1126
- }), ut = ({
1127
- children: r,
846
+ }, Ke = (n) => ({
847
+ component: Je,
848
+ props: n ?? {}
849
+ }), Ge = ({
850
+ children: n,
1128
851
  presentationDirection: t,
1129
852
  presentationProgress: e,
1130
853
  passedProps: {
1131
- direction: o = "from-left",
1132
- perspective: i = 1e3,
1133
- innerEnterStyle: u,
1134
- innerExitStyle: f,
1135
- outerEnterStyle: c,
1136
- outerExitStyle: a
854
+ direction: r = "from-left",
855
+ perspective: s = 1e3,
856
+ innerEnterStyle: l,
857
+ innerExitStyle: u,
858
+ outerEnterStyle: a,
859
+ outerExitStyle: i
1137
860
  }
1138
861
  }) => {
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]);
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]);
1141
864
  return {
1142
865
  width: "100%",
1143
866
  height: "100%",
1144
- transform: `${o === "from-top" || o === "from-bottom" ? "rotateX" : "rotateY"}(${p}deg)`,
867
+ transform: `${r === "from-top" || r === "from-bottom" ? "rotateX" : "rotateY"}(${g}deg)`,
1145
868
  backfaceVisibility: "hidden",
1146
869
  WebkitBackfaceVisibility: "hidden",
1147
- ...t === "entering" ? u : f
870
+ ...t === "entering" ? l : u
1148
871
  };
1149
872
  }, [
1150
- o,
873
+ r,
874
+ l,
1151
875
  u,
1152
- f,
1153
876
  t,
1154
877
  e
1155
- ]), d = w(() => ({
1156
- perspective: i,
878
+ ]), d = h(() => ({
879
+ perspective: s,
1157
880
  transformStyle: "preserve-3d",
1158
- ...t === "entering" ? c : a
1159
- }), [c, a, i, t]);
1160
- return /* @__PURE__ */ s.jsx(x, {
881
+ ...t === "entering" ? a : i
882
+ }), [a, i, s, t]);
883
+ return /* @__PURE__ */ o(c, {
1161
884
  style: d,
1162
- children: /* @__PURE__ */ s.jsx(x, {
1163
- style: b,
1164
- children: r
885
+ children: /* @__PURE__ */ o(c, {
886
+ style: f,
887
+ children: n
1165
888
  })
1166
889
  });
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,
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({
892
+ radius: s,
1170
893
  progress: e
1171
- }), f = he(u, -(i * 2 - o.width) / 2, -(i * 2 - o.height) / 2), c = w(() => ({
894
+ }), u = te(l, -(s * 2 - r.width) / 2, -(s * 2 - r.height) / 2), a = h(() => ({
1172
895
  width: "100%",
1173
896
  height: "100%",
1174
- clipPath: t === "exiting" ? void 0 : `path("${f}")`,
1175
- ...t === "entering" ? o.innerEnterStyle : o.innerExitStyle
897
+ clipPath: t === "exiting" ? void 0 : `path("${u}")`,
898
+ ...t === "entering" ? r.innerEnterStyle : r.innerExitStyle
1176
899
  }), [
1177
- f,
1178
- o.innerEnterStyle,
1179
- o.innerExitStyle,
900
+ u,
901
+ r.innerEnterStyle,
902
+ r.innerExitStyle,
1180
903
  t
1181
- ]), a = w(() => t === "entering" ? o.outerEnterStyle : o.outerExitStyle, [
1182
- o.outerEnterStyle,
1183
- o.outerExitStyle,
904
+ ]), i = h(() => t === "entering" ? r.outerEnterStyle : r.outerExitStyle, [
905
+ r.outerEnterStyle,
906
+ r.outerExitStyle,
1184
907
  t
1185
908
  ]);
1186
- return /* @__PURE__ */ s.jsx(x, {
1187
- style: a,
1188
- children: /* @__PURE__ */ s.jsx(x, {
1189
- style: c,
1190
- children: r
909
+ return /* @__PURE__ */ o(c, {
910
+ style: i,
911
+ children: /* @__PURE__ */ o(c, {
912
+ style: a,
913
+ children: n
1191
914
  })
1192
915
  });
1193
- }, mt = (r) => ({ component: ft, props: r ?? {} });
1194
- const bt = {
1195
- none: ({ id: r }) => /* @__PURE__ */ s.jsx(
1196
- E.Transition,
916
+ }, et = (n) => ({ component: Ze, props: n ?? {} });
917
+ const ut = {
918
+ none: ({ id: n }) => /* @__PURE__ */ o(
919
+ y.Transition,
1197
920
  {
1198
- presentation: de(),
1199
- timing: A({ durationInFrames: 1 })
921
+ presentation: Q(),
922
+ timing: T({ durationInFrames: 1 })
1200
923
  },
1201
- r
924
+ n
1202
925
  ),
1203
- fade: ({ durationInFrames: r, id: t }) => /* @__PURE__ */ s.jsx(
1204
- E.Transition,
926
+ fade: ({ durationInFrames: n, id: t }) => /* @__PURE__ */ o(
927
+ y.Transition,
1205
928
  {
1206
- presentation: de(),
1207
- timing: A({ durationInFrames: r })
929
+ presentation: Q(),
930
+ timing: T({ durationInFrames: n })
1208
931
  },
1209
932
  t
1210
933
  ),
1211
- slide: ({ durationInFrames: r, id: t, direction: e }) => /* @__PURE__ */ s.jsx(
1212
- E.Transition,
934
+ slide: ({ durationInFrames: n, id: t, direction: e }) => /* @__PURE__ */ o(
935
+ y.Transition,
1213
936
  {
1214
- presentation: ot({ direction: e }),
1215
- timing: A({ durationInFrames: r })
937
+ presentation: je({ direction: e }),
938
+ timing: T({ durationInFrames: n })
1216
939
  },
1217
940
  t
1218
941
  ),
1219
- wipe: ({ durationInFrames: r, id: t, direction: e }) => /* @__PURE__ */ s.jsx(
1220
- E.Transition,
942
+ wipe: ({ durationInFrames: n, id: t, direction: e }) => /* @__PURE__ */ o(
943
+ y.Transition,
1221
944
  {
1222
- presentation: lt({ direction: e }),
1223
- timing: A({ durationInFrames: r })
945
+ presentation: Ke({ direction: e }),
946
+ timing: T({ durationInFrames: n })
1224
947
  },
1225
948
  t
1226
949
  ),
1227
- flip: ({ durationInFrames: r, id: t }) => /* @__PURE__ */ s.jsx(
1228
- E.Transition,
950
+ flip: ({ durationInFrames: n, id: t }) => /* @__PURE__ */ o(
951
+ y.Transition,
1229
952
  {
1230
- presentation: ct(),
1231
- timing: A({ durationInFrames: r })
953
+ presentation: Qe(),
954
+ timing: T({ durationInFrames: n })
1232
955
  },
1233
956
  t
1234
957
  ),
1235
- clockWipe: ({ width: r, height: t, durationInFrames: e, id: o }) => /* @__PURE__ */ s.jsx(
1236
- E.Transition,
958
+ clockWipe: ({ width: n, height: t, durationInFrames: e, id: r }) => /* @__PURE__ */ o(
959
+ y.Transition,
1237
960
  {
1238
- presentation: mt({ width: r, height: t }),
1239
- timing: A({ durationInFrames: e })
961
+ presentation: et({ width: n, height: t }),
962
+ timing: T({ durationInFrames: e })
1240
963
  },
1241
- o
964
+ r
1242
965
  ),
1243
- star: ({ width: r, height: t, durationInFrames: e, id: o }) => /* @__PURE__ */ s.jsx(
1244
- E.Transition,
966
+ star: ({ width: n, height: t, durationInFrames: e, id: r }) => /* @__PURE__ */ o(
967
+ y.Transition,
1245
968
  {
1246
- presentation: Qe({ width: r, height: t }),
1247
- timing: A({ durationInFrames: e })
969
+ presentation: Oe({ width: n, height: t }),
970
+ timing: T({ durationInFrames: e })
1248
971
  },
1249
- o
972
+ r
1250
973
  ),
1251
- circle: ({ width: r, height: t, durationInFrames: e, id: o }) => /* @__PURE__ */ s.jsx(
1252
- E.Transition,
974
+ circle: ({ width: n, height: t, durationInFrames: e, id: r }) => /* @__PURE__ */ o(
975
+ y.Transition,
1253
976
  {
1254
- presentation: Ve({ width: r, height: t }),
1255
- timing: A({ durationInFrames: e })
977
+ presentation: Ne({ width: n, height: t }),
978
+ timing: T({ durationInFrames: e })
1256
979
  },
1257
- o
980
+ r
1258
981
  ),
1259
- rectangle: ({ width: r, height: t, durationInFrames: e, id: o }) => /* @__PURE__ */ s.jsx(
1260
- E.Transition,
982
+ rectangle: ({ width: n, height: t, durationInFrames: e, id: r }) => /* @__PURE__ */ o(
983
+ y.Transition,
1261
984
  {
1262
- presentation: He({ width: r, height: t }),
1263
- timing: A({ durationInFrames: e })
985
+ presentation: Ae({ width: n, height: t }),
986
+ timing: T({ durationInFrames: e })
1264
987
  },
1265
- o
988
+ r
1266
989
  ),
1267
990
  slidingDoors: ({
1268
- width: r,
991
+ width: n,
1269
992
  height: t,
1270
993
  durationInFrames: e,
1271
- id: o
1272
- }) => /* @__PURE__ */ s.jsx(
1273
- E.Transition,
994
+ id: r
995
+ }) => /* @__PURE__ */ o(
996
+ y.Transition,
1274
997
  {
1275
- presentation: et({ width: r, height: t }),
1276
- timing: A({ durationInFrames: e })
998
+ presentation: Ye({ width: n, height: t }),
999
+ timing: T({ durationInFrames: e })
1277
1000
  },
1278
- o
1001
+ r
1279
1002
  )
1280
1003
  };
1281
1004
  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,
1289
- 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
1005
+ y as TransitionSeries,
1006
+ ut as Transitions,
1007
+ Ne as circle,
1008
+ et as clockWipe,
1009
+ Q as fade,
1010
+ Qe as flip,
1011
+ T as linearTiming,
1012
+ Ae as rectangle,
1013
+ je as slide,
1014
+ Ye as slidingDoors,
1015
+ at as springTiming,
1016
+ Oe as star,
1017
+ lt as useTransitionProgress,
1018
+ Ke as wipe
1296
1019
  };
1297
1020
  //# sourceMappingURL=index.es.js.map