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