react-awesome-reveal 4.0.1 → 4.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +13 -17
- package/dist/{types.d.ts → index.d.ts} +43 -32
- package/dist/index.js +2089 -0
- package/dist/index.js.map +1 -0
- package/dist/index.mjs +2055 -0
- package/dist/index.mjs.map +1 -0
- package/package.json +13 -15
- package/dist/main.js +0 -2125
- package/dist/main.js.map +0 -1
- package/dist/module.js +0 -2117
- package/dist/module.js.map +0 -1
- package/dist/types.d.ts.map +0 -1
package/dist/index.mjs
ADDED
|
@@ -0,0 +1,2055 @@
|
|
|
1
|
+
// src/components/AttentionSeeker.tsx
|
|
2
|
+
import { useMemo as useMemo2 } from "react";
|
|
3
|
+
|
|
4
|
+
// src/animations/attention_seekers/bounce.ts
|
|
5
|
+
import { keyframes } from "@emotion/react";
|
|
6
|
+
var bounce = keyframes`
|
|
7
|
+
from,
|
|
8
|
+
20%,
|
|
9
|
+
53%,
|
|
10
|
+
to {
|
|
11
|
+
animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1);
|
|
12
|
+
transform: translate3d(0, 0, 0);
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
40%,
|
|
16
|
+
43% {
|
|
17
|
+
animation-timing-function: cubic-bezier(0.755, 0.05, 0.855, 0.06);
|
|
18
|
+
transform: translate3d(0, -30px, 0) scaleY(1.1);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
70% {
|
|
22
|
+
animation-timing-function: cubic-bezier(0.755, 0.05, 0.855, 0.06);
|
|
23
|
+
transform: translate3d(0, -15px, 0) scaleY(1.05);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
80% {
|
|
27
|
+
transition-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1);
|
|
28
|
+
transform: translate3d(0, 0, 0) scaleY(0.95);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
90% {
|
|
32
|
+
transform: translate3d(0, -4px, 0) scaleY(1.02);
|
|
33
|
+
}
|
|
34
|
+
`;
|
|
35
|
+
|
|
36
|
+
// src/animations/attention_seekers/flash.ts
|
|
37
|
+
import { keyframes as keyframes2 } from "@emotion/react";
|
|
38
|
+
var flash = keyframes2`
|
|
39
|
+
from,
|
|
40
|
+
50%,
|
|
41
|
+
to {
|
|
42
|
+
opacity: 1;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
25%,
|
|
46
|
+
75% {
|
|
47
|
+
opacity: 0;
|
|
48
|
+
}
|
|
49
|
+
`;
|
|
50
|
+
|
|
51
|
+
// src/animations/attention_seekers/headShake.ts
|
|
52
|
+
import { keyframes as keyframes3 } from "@emotion/react";
|
|
53
|
+
var headShake = keyframes3`
|
|
54
|
+
0% {
|
|
55
|
+
transform: translateX(0);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
6.5% {
|
|
59
|
+
transform: translateX(-6px) rotateY(-9deg);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
18.5% {
|
|
63
|
+
transform: translateX(5px) rotateY(7deg);
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
31.5% {
|
|
67
|
+
transform: translateX(-3px) rotateY(-5deg);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
43.5% {
|
|
71
|
+
transform: translateX(2px) rotateY(3deg);
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
50% {
|
|
75
|
+
transform: translateX(0);
|
|
76
|
+
}
|
|
77
|
+
`;
|
|
78
|
+
|
|
79
|
+
// src/animations/attention_seekers/heartBeat.ts
|
|
80
|
+
import { keyframes as keyframes4 } from "@emotion/react";
|
|
81
|
+
var heartBeat = keyframes4`
|
|
82
|
+
0% {
|
|
83
|
+
transform: scale(1);
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
14% {
|
|
87
|
+
transform: scale(1.3);
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
28% {
|
|
91
|
+
transform: scale(1);
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
42% {
|
|
95
|
+
transform: scale(1.3);
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
70% {
|
|
99
|
+
transform: scale(1);
|
|
100
|
+
}
|
|
101
|
+
`;
|
|
102
|
+
|
|
103
|
+
// src/animations/attention_seekers/jello.ts
|
|
104
|
+
import { keyframes as keyframes5 } from "@emotion/react";
|
|
105
|
+
var jello = keyframes5`
|
|
106
|
+
from,
|
|
107
|
+
11.1%,
|
|
108
|
+
to {
|
|
109
|
+
transform: translate3d(0, 0, 0);
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
22.2% {
|
|
113
|
+
transform: skewX(-12.5deg) skewY(-12.5deg);
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
33.3% {
|
|
117
|
+
transform: skewX(6.25deg) skewY(6.25deg);
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
44.4% {
|
|
121
|
+
transform: skewX(-3.125deg) skewY(-3.125deg);
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
55.5% {
|
|
125
|
+
transform: skewX(1.5625deg) skewY(1.5625deg);
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
66.6% {
|
|
129
|
+
transform: skewX(-0.78125deg) skewY(-0.78125deg);
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
77.7% {
|
|
133
|
+
transform: skewX(0.390625deg) skewY(0.390625deg);
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
88.8% {
|
|
137
|
+
transform: skewX(-0.1953125deg) skewY(-0.1953125deg);
|
|
138
|
+
}
|
|
139
|
+
`;
|
|
140
|
+
|
|
141
|
+
// src/animations/attention_seekers/pulse.ts
|
|
142
|
+
import { keyframes as keyframes6 } from "@emotion/react";
|
|
143
|
+
var pulse = keyframes6`
|
|
144
|
+
from {
|
|
145
|
+
transform: scale3d(1, 1, 1);
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
50% {
|
|
149
|
+
transform: scale3d(1.05, 1.05, 1.05);
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
to {
|
|
153
|
+
transform: scale3d(1, 1, 1);
|
|
154
|
+
}
|
|
155
|
+
`;
|
|
156
|
+
|
|
157
|
+
// src/animations/attention_seekers/rubberBand.ts
|
|
158
|
+
import { keyframes as keyframes7 } from "@emotion/react";
|
|
159
|
+
var rubberBand = keyframes7`
|
|
160
|
+
from {
|
|
161
|
+
transform: scale3d(1, 1, 1);
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
30% {
|
|
165
|
+
transform: scale3d(1.25, 0.75, 1);
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
40% {
|
|
169
|
+
transform: scale3d(0.75, 1.25, 1);
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
50% {
|
|
173
|
+
transform: scale3d(1.15, 0.85, 1);
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
65% {
|
|
177
|
+
transform: scale3d(0.95, 1.05, 1);
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
75% {
|
|
181
|
+
transform: scale3d(1.05, 0.95, 1);
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
to {
|
|
185
|
+
transform: scale3d(1, 1, 1);
|
|
186
|
+
}
|
|
187
|
+
`;
|
|
188
|
+
|
|
189
|
+
// src/animations/attention_seekers/shake.ts
|
|
190
|
+
import { keyframes as keyframes8 } from "@emotion/react";
|
|
191
|
+
var shake = keyframes8`
|
|
192
|
+
from,
|
|
193
|
+
to {
|
|
194
|
+
transform: translate3d(0, 0, 0);
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
10%,
|
|
198
|
+
30%,
|
|
199
|
+
50%,
|
|
200
|
+
70%,
|
|
201
|
+
90% {
|
|
202
|
+
transform: translate3d(-10px, 0, 0);
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
20%,
|
|
206
|
+
40%,
|
|
207
|
+
60%,
|
|
208
|
+
80% {
|
|
209
|
+
transform: translate3d(10px, 0, 0);
|
|
210
|
+
}
|
|
211
|
+
`;
|
|
212
|
+
|
|
213
|
+
// src/animations/attention_seekers/shakeX.ts
|
|
214
|
+
import { keyframes as keyframes9 } from "@emotion/react";
|
|
215
|
+
var shakeX = keyframes9`
|
|
216
|
+
from,
|
|
217
|
+
to {
|
|
218
|
+
transform: translate3d(0, 0, 0);
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
10%,
|
|
222
|
+
30%,
|
|
223
|
+
50%,
|
|
224
|
+
70%,
|
|
225
|
+
90% {
|
|
226
|
+
transform: translate3d(-10px, 0, 0);
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
20%,
|
|
230
|
+
40%,
|
|
231
|
+
60%,
|
|
232
|
+
80% {
|
|
233
|
+
transform: translate3d(10px, 0, 0);
|
|
234
|
+
}
|
|
235
|
+
`;
|
|
236
|
+
|
|
237
|
+
// src/animations/attention_seekers/shakeY.ts
|
|
238
|
+
import { keyframes as keyframes10 } from "@emotion/react";
|
|
239
|
+
var shakeY = keyframes10`
|
|
240
|
+
from,
|
|
241
|
+
to {
|
|
242
|
+
transform: translate3d(0, 0, 0);
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
10%,
|
|
246
|
+
30%,
|
|
247
|
+
50%,
|
|
248
|
+
70%,
|
|
249
|
+
90% {
|
|
250
|
+
transform: translate3d(0, -10px, 0);
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
20%,
|
|
254
|
+
40%,
|
|
255
|
+
60%,
|
|
256
|
+
80% {
|
|
257
|
+
transform: translate3d(0, 10px, 0);
|
|
258
|
+
}
|
|
259
|
+
`;
|
|
260
|
+
|
|
261
|
+
// src/animations/attention_seekers/swing.ts
|
|
262
|
+
import { keyframes as keyframes11 } from "@emotion/react";
|
|
263
|
+
var swing = keyframes11`
|
|
264
|
+
20% {
|
|
265
|
+
transform: rotate3d(0, 0, 1, 15deg);
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
40% {
|
|
269
|
+
transform: rotate3d(0, 0, 1, -10deg);
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
60% {
|
|
273
|
+
transform: rotate3d(0, 0, 1, 5deg);
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
80% {
|
|
277
|
+
transform: rotate3d(0, 0, 1, -5deg);
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
to {
|
|
281
|
+
transform: rotate3d(0, 0, 1, 0deg);
|
|
282
|
+
}
|
|
283
|
+
`;
|
|
284
|
+
|
|
285
|
+
// src/animations/attention_seekers/tada.ts
|
|
286
|
+
import { keyframes as keyframes12 } from "@emotion/react";
|
|
287
|
+
var tada = keyframes12`
|
|
288
|
+
from {
|
|
289
|
+
transform: scale3d(1, 1, 1);
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
10%,
|
|
293
|
+
20% {
|
|
294
|
+
transform: scale3d(0.9, 0.9, 0.9) rotate3d(0, 0, 1, -3deg);
|
|
295
|
+
}
|
|
296
|
+
|
|
297
|
+
30%,
|
|
298
|
+
50%,
|
|
299
|
+
70%,
|
|
300
|
+
90% {
|
|
301
|
+
transform: scale3d(1.1, 1.1, 1.1) rotate3d(0, 0, 1, 3deg);
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
40%,
|
|
305
|
+
60%,
|
|
306
|
+
80% {
|
|
307
|
+
transform: scale3d(1.1, 1.1, 1.1) rotate3d(0, 0, 1, -3deg);
|
|
308
|
+
}
|
|
309
|
+
|
|
310
|
+
to {
|
|
311
|
+
transform: scale3d(1, 1, 1);
|
|
312
|
+
}
|
|
313
|
+
`;
|
|
314
|
+
|
|
315
|
+
// src/animations/attention_seekers/wobble.ts
|
|
316
|
+
import { keyframes as keyframes13 } from "@emotion/react";
|
|
317
|
+
var wobble = keyframes13`
|
|
318
|
+
from {
|
|
319
|
+
transform: translate3d(0, 0, 0);
|
|
320
|
+
}
|
|
321
|
+
|
|
322
|
+
15% {
|
|
323
|
+
transform: translate3d(-25%, 0, 0) rotate3d(0, 0, 1, -5deg);
|
|
324
|
+
}
|
|
325
|
+
|
|
326
|
+
30% {
|
|
327
|
+
transform: translate3d(20%, 0, 0) rotate3d(0, 0, 1, 3deg);
|
|
328
|
+
}
|
|
329
|
+
|
|
330
|
+
45% {
|
|
331
|
+
transform: translate3d(-15%, 0, 0) rotate3d(0, 0, 1, -3deg);
|
|
332
|
+
}
|
|
333
|
+
|
|
334
|
+
60% {
|
|
335
|
+
transform: translate3d(10%, 0, 0) rotate3d(0, 0, 1, 2deg);
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
75% {
|
|
339
|
+
transform: translate3d(-5%, 0, 0) rotate3d(0, 0, 1, -1deg);
|
|
340
|
+
}
|
|
341
|
+
|
|
342
|
+
to {
|
|
343
|
+
transform: translate3d(0, 0, 0);
|
|
344
|
+
}
|
|
345
|
+
`;
|
|
346
|
+
|
|
347
|
+
// src/Reveal.tsx
|
|
348
|
+
import {
|
|
349
|
+
ClassNames,
|
|
350
|
+
css as css2
|
|
351
|
+
} from "@emotion/react";
|
|
352
|
+
import { Children, isValidElement, useMemo } from "react";
|
|
353
|
+
import { InView, useInView } from "react-intersection-observer";
|
|
354
|
+
import { isFragment } from "react-is";
|
|
355
|
+
|
|
356
|
+
// src/animations/fading_entrances/fadeIn.ts
|
|
357
|
+
import { keyframes as keyframes14 } from "@emotion/react";
|
|
358
|
+
var fadeIn = keyframes14`
|
|
359
|
+
from {
|
|
360
|
+
opacity: 0;
|
|
361
|
+
}
|
|
362
|
+
|
|
363
|
+
to {
|
|
364
|
+
opacity: 1;
|
|
365
|
+
}
|
|
366
|
+
`;
|
|
367
|
+
|
|
368
|
+
// src/animations/fading_entrances/fadeInBottomLeft.ts
|
|
369
|
+
import { keyframes as keyframes15 } from "@emotion/react";
|
|
370
|
+
var fadeInBottomLeft = keyframes15`
|
|
371
|
+
from {
|
|
372
|
+
opacity: 0;
|
|
373
|
+
transform: translate3d(-100%, 100%, 0);
|
|
374
|
+
}
|
|
375
|
+
|
|
376
|
+
to {
|
|
377
|
+
opacity: 1;
|
|
378
|
+
transform: translate3d(0, 0, 0);
|
|
379
|
+
}
|
|
380
|
+
`;
|
|
381
|
+
|
|
382
|
+
// src/animations/fading_entrances/fadeInBottomRight.ts
|
|
383
|
+
import { keyframes as keyframes16 } from "@emotion/react";
|
|
384
|
+
var fadeInBottomRight = keyframes16`
|
|
385
|
+
from {
|
|
386
|
+
opacity: 0;
|
|
387
|
+
transform: translate3d(100%, 100%, 0);
|
|
388
|
+
}
|
|
389
|
+
|
|
390
|
+
to {
|
|
391
|
+
opacity: 1;
|
|
392
|
+
transform: translate3d(0, 0, 0);
|
|
393
|
+
}
|
|
394
|
+
`;
|
|
395
|
+
|
|
396
|
+
// src/animations/fading_entrances/fadeInDown.ts
|
|
397
|
+
import { keyframes as keyframes17 } from "@emotion/react";
|
|
398
|
+
var fadeInDown = keyframes17`
|
|
399
|
+
from {
|
|
400
|
+
opacity: 0;
|
|
401
|
+
transform: translate3d(0, -100%, 0);
|
|
402
|
+
}
|
|
403
|
+
|
|
404
|
+
to {
|
|
405
|
+
opacity: 1;
|
|
406
|
+
transform: translate3d(0, 0, 0);
|
|
407
|
+
}
|
|
408
|
+
`;
|
|
409
|
+
|
|
410
|
+
// src/animations/fading_entrances/fadeInDownBig.ts
|
|
411
|
+
import { keyframes as keyframes18 } from "@emotion/react";
|
|
412
|
+
var fadeInDownBig = keyframes18`
|
|
413
|
+
from {
|
|
414
|
+
opacity: 0;
|
|
415
|
+
transform: translate3d(0, -2000px, 0);
|
|
416
|
+
}
|
|
417
|
+
|
|
418
|
+
to {
|
|
419
|
+
opacity: 1;
|
|
420
|
+
transform: translate3d(0, 0, 0);
|
|
421
|
+
}
|
|
422
|
+
`;
|
|
423
|
+
|
|
424
|
+
// src/animations/fading_entrances/fadeInLeft.ts
|
|
425
|
+
import { keyframes as keyframes19 } from "@emotion/react";
|
|
426
|
+
var fadeInLeft = keyframes19`
|
|
427
|
+
from {
|
|
428
|
+
opacity: 0;
|
|
429
|
+
transform: translate3d(-100%, 0, 0);
|
|
430
|
+
}
|
|
431
|
+
|
|
432
|
+
to {
|
|
433
|
+
opacity: 1;
|
|
434
|
+
transform: translate3d(0, 0, 0);
|
|
435
|
+
}
|
|
436
|
+
`;
|
|
437
|
+
|
|
438
|
+
// src/animations/fading_entrances/fadeInLeftBig.ts
|
|
439
|
+
import { keyframes as keyframes20 } from "@emotion/react";
|
|
440
|
+
var fadeInLeftBig = keyframes20`
|
|
441
|
+
from {
|
|
442
|
+
opacity: 0;
|
|
443
|
+
transform: translate3d(-2000px, 0, 0);
|
|
444
|
+
}
|
|
445
|
+
|
|
446
|
+
to {
|
|
447
|
+
opacity: 1;
|
|
448
|
+
transform: translate3d(0, 0, 0);
|
|
449
|
+
}
|
|
450
|
+
`;
|
|
451
|
+
|
|
452
|
+
// src/animations/fading_entrances/fadeInRight.ts
|
|
453
|
+
import { keyframes as keyframes21 } from "@emotion/react";
|
|
454
|
+
var fadeInRight = keyframes21`
|
|
455
|
+
from {
|
|
456
|
+
opacity: 0;
|
|
457
|
+
transform: translate3d(100%, 0, 0);
|
|
458
|
+
}
|
|
459
|
+
|
|
460
|
+
to {
|
|
461
|
+
opacity: 1;
|
|
462
|
+
transform: translate3d(0, 0, 0);
|
|
463
|
+
}
|
|
464
|
+
`;
|
|
465
|
+
|
|
466
|
+
// src/animations/fading_entrances/fadeInRightBig.ts
|
|
467
|
+
import { keyframes as keyframes22 } from "@emotion/react";
|
|
468
|
+
var fadeInRightBig = keyframes22`
|
|
469
|
+
from {
|
|
470
|
+
opacity: 0;
|
|
471
|
+
transform: translate3d(2000px, 0, 0);
|
|
472
|
+
}
|
|
473
|
+
|
|
474
|
+
to {
|
|
475
|
+
opacity: 1;
|
|
476
|
+
transform: translate3d(0, 0, 0);
|
|
477
|
+
}
|
|
478
|
+
`;
|
|
479
|
+
|
|
480
|
+
// src/animations/fading_entrances/fadeInTopLeft.ts
|
|
481
|
+
import { keyframes as keyframes23 } from "@emotion/react";
|
|
482
|
+
var fadeInTopLeft = keyframes23`
|
|
483
|
+
from {
|
|
484
|
+
opacity: 0;
|
|
485
|
+
transform: translate3d(-100%, -100%, 0);
|
|
486
|
+
}
|
|
487
|
+
|
|
488
|
+
to {
|
|
489
|
+
opacity: 1;
|
|
490
|
+
transform: translate3d(0, 0, 0);
|
|
491
|
+
}
|
|
492
|
+
`;
|
|
493
|
+
|
|
494
|
+
// src/animations/fading_entrances/fadeInTopRight.ts
|
|
495
|
+
import { keyframes as keyframes24 } from "@emotion/react";
|
|
496
|
+
var fadeInTopRight = keyframes24`
|
|
497
|
+
from {
|
|
498
|
+
opacity: 0;
|
|
499
|
+
transform: translate3d(100%, -100%, 0);
|
|
500
|
+
}
|
|
501
|
+
|
|
502
|
+
to {
|
|
503
|
+
opacity: 1;
|
|
504
|
+
transform: translate3d(0, 0, 0);
|
|
505
|
+
}
|
|
506
|
+
`;
|
|
507
|
+
|
|
508
|
+
// src/animations/fading_entrances/fadeInUp.ts
|
|
509
|
+
import { keyframes as keyframes25 } from "@emotion/react";
|
|
510
|
+
var fadeInUp = keyframes25`
|
|
511
|
+
from {
|
|
512
|
+
opacity: 0;
|
|
513
|
+
transform: translate3d(0, 100%, 0);
|
|
514
|
+
}
|
|
515
|
+
|
|
516
|
+
to {
|
|
517
|
+
opacity: 1;
|
|
518
|
+
transform: translate3d(0, 0, 0);
|
|
519
|
+
}
|
|
520
|
+
`;
|
|
521
|
+
|
|
522
|
+
// src/animations/fading_entrances/fadeInUpBig.ts
|
|
523
|
+
import { keyframes as keyframes26 } from "@emotion/react";
|
|
524
|
+
var fadeInUpBig = keyframes26`
|
|
525
|
+
from {
|
|
526
|
+
opacity: 0;
|
|
527
|
+
transform: translate3d(0, 2000px, 0);
|
|
528
|
+
}
|
|
529
|
+
|
|
530
|
+
to {
|
|
531
|
+
opacity: 1;
|
|
532
|
+
transform: translate3d(0, 0, 0);
|
|
533
|
+
}
|
|
534
|
+
`;
|
|
535
|
+
|
|
536
|
+
// src/utils/animations.ts
|
|
537
|
+
import { css } from "@emotion/react";
|
|
538
|
+
function getAnimationCss({
|
|
539
|
+
duration = 1e3,
|
|
540
|
+
delay = 0,
|
|
541
|
+
timingFunction = "ease",
|
|
542
|
+
keyframes: keyframes87 = fadeInLeft,
|
|
543
|
+
iterationCount = 1
|
|
544
|
+
}) {
|
|
545
|
+
return css`
|
|
546
|
+
animation-duration: ${duration}ms;
|
|
547
|
+
animation-timing-function: ${timingFunction};
|
|
548
|
+
animation-delay: ${delay}ms;
|
|
549
|
+
animation-name: ${keyframes87};
|
|
550
|
+
animation-direction: normal;
|
|
551
|
+
animation-fill-mode: both;
|
|
552
|
+
animation-iteration-count: ${iterationCount};
|
|
553
|
+
`;
|
|
554
|
+
}
|
|
555
|
+
|
|
556
|
+
// src/utils/react.ts
|
|
557
|
+
function isNullable(a) {
|
|
558
|
+
return a == void 0;
|
|
559
|
+
}
|
|
560
|
+
function isStringLike(value) {
|
|
561
|
+
return typeof value === "string" || typeof value === "number" || typeof value === "boolean";
|
|
562
|
+
}
|
|
563
|
+
|
|
564
|
+
// src/Reveal.tsx
|
|
565
|
+
import { Fragment, jsx } from "@emotion/react/jsx-runtime";
|
|
566
|
+
var hiddenStyles = css2`
|
|
567
|
+
opacity: 0;
|
|
568
|
+
`;
|
|
569
|
+
var textBaseStyles = css2`
|
|
570
|
+
display: inline-block;
|
|
571
|
+
white-space: pre;
|
|
572
|
+
`;
|
|
573
|
+
var Reveal = (props) => {
|
|
574
|
+
const {
|
|
575
|
+
cascade = false,
|
|
576
|
+
damping = 0.5,
|
|
577
|
+
delay = 0,
|
|
578
|
+
duration = 1e3,
|
|
579
|
+
fraction = 0,
|
|
580
|
+
keyframes: keyframes87 = fadeInLeft,
|
|
581
|
+
triggerOnce = false,
|
|
582
|
+
css: revealCss,
|
|
583
|
+
className,
|
|
584
|
+
style,
|
|
585
|
+
childClassName,
|
|
586
|
+
childStyle,
|
|
587
|
+
children,
|
|
588
|
+
onVisibilityChange
|
|
589
|
+
} = props;
|
|
590
|
+
const animationStyles = useMemo(
|
|
591
|
+
() => getAnimationCss({
|
|
592
|
+
keyframes: keyframes87,
|
|
593
|
+
duration
|
|
594
|
+
}),
|
|
595
|
+
[duration, keyframes87]
|
|
596
|
+
);
|
|
597
|
+
if (isNullable(children)) {
|
|
598
|
+
return null;
|
|
599
|
+
}
|
|
600
|
+
if (isStringLike(children)) {
|
|
601
|
+
return /* @__PURE__ */ jsx(TextReveal, {
|
|
602
|
+
...props,
|
|
603
|
+
animationStyles,
|
|
604
|
+
children: String(children)
|
|
605
|
+
});
|
|
606
|
+
}
|
|
607
|
+
if (isFragment(children)) {
|
|
608
|
+
return /* @__PURE__ */ jsx(FragmentReveal, {
|
|
609
|
+
...props,
|
|
610
|
+
animationStyles
|
|
611
|
+
});
|
|
612
|
+
}
|
|
613
|
+
return /* @__PURE__ */ jsx(Fragment, {
|
|
614
|
+
children: Children.map(children, (node, index) => {
|
|
615
|
+
if (!isValidElement(node))
|
|
616
|
+
return null;
|
|
617
|
+
const inViewStyles = [revealCss, animationStyles];
|
|
618
|
+
const nodeDelay = delay + (cascade ? index * duration * damping : 0);
|
|
619
|
+
switch (node.type) {
|
|
620
|
+
case "ol":
|
|
621
|
+
case "ul":
|
|
622
|
+
return /* @__PURE__ */ jsx(ClassNames, {
|
|
623
|
+
children: ({ cx }) => /* @__PURE__ */ jsx(node.type, {
|
|
624
|
+
...node.props,
|
|
625
|
+
className: cx(className, node.props.className),
|
|
626
|
+
style: { ...style, ...node.props.style },
|
|
627
|
+
children: /* @__PURE__ */ jsx(Reveal, {
|
|
628
|
+
...props,
|
|
629
|
+
children: node.props.children
|
|
630
|
+
})
|
|
631
|
+
})
|
|
632
|
+
});
|
|
633
|
+
case "li":
|
|
634
|
+
return /* @__PURE__ */ jsx(InView, {
|
|
635
|
+
threshold: fraction,
|
|
636
|
+
triggerOnce,
|
|
637
|
+
onChange: onVisibilityChange,
|
|
638
|
+
children: ({ inView, ref }) => /* @__PURE__ */ jsx(ClassNames, {
|
|
639
|
+
children: ({ cx }) => /* @__PURE__ */ jsx(node.type, {
|
|
640
|
+
...node.props,
|
|
641
|
+
ref,
|
|
642
|
+
className: cx(childClassName, node.props.className),
|
|
643
|
+
css: inView ? inViewStyles : hiddenStyles,
|
|
644
|
+
style: {
|
|
645
|
+
...childStyle,
|
|
646
|
+
...node.props.style,
|
|
647
|
+
animationDelay: nodeDelay + "ms"
|
|
648
|
+
}
|
|
649
|
+
})
|
|
650
|
+
})
|
|
651
|
+
});
|
|
652
|
+
default:
|
|
653
|
+
return /* @__PURE__ */ jsx(InView, {
|
|
654
|
+
threshold: fraction,
|
|
655
|
+
triggerOnce,
|
|
656
|
+
onChange: onVisibilityChange,
|
|
657
|
+
children: ({ inView, ref }) => /* @__PURE__ */ jsx("div", {
|
|
658
|
+
ref,
|
|
659
|
+
className,
|
|
660
|
+
css: inView ? inViewStyles : hiddenStyles,
|
|
661
|
+
style: { ...style, animationDelay: nodeDelay + "ms" },
|
|
662
|
+
children: /* @__PURE__ */ jsx(ClassNames, {
|
|
663
|
+
children: ({ cx }) => /* @__PURE__ */ jsx(node.type, {
|
|
664
|
+
...node.props,
|
|
665
|
+
className: cx(childClassName, node.props.className),
|
|
666
|
+
style: { ...childStyle, ...node.props.style }
|
|
667
|
+
})
|
|
668
|
+
})
|
|
669
|
+
})
|
|
670
|
+
});
|
|
671
|
+
}
|
|
672
|
+
})
|
|
673
|
+
});
|
|
674
|
+
};
|
|
675
|
+
var TextReveal = (props) => {
|
|
676
|
+
const {
|
|
677
|
+
animationStyles,
|
|
678
|
+
cascade = false,
|
|
679
|
+
damping = 0.5,
|
|
680
|
+
delay = 0,
|
|
681
|
+
duration = 1e3,
|
|
682
|
+
fraction = 0,
|
|
683
|
+
triggerOnce = false,
|
|
684
|
+
css: revealCss,
|
|
685
|
+
className,
|
|
686
|
+
style,
|
|
687
|
+
children,
|
|
688
|
+
onVisibilityChange
|
|
689
|
+
} = props;
|
|
690
|
+
const { ref, inView } = useInView({
|
|
691
|
+
triggerOnce,
|
|
692
|
+
threshold: fraction,
|
|
693
|
+
onChange: onVisibilityChange
|
|
694
|
+
});
|
|
695
|
+
return cascade ? /* @__PURE__ */ jsx("div", {
|
|
696
|
+
ref,
|
|
697
|
+
className,
|
|
698
|
+
css: [revealCss, textBaseStyles],
|
|
699
|
+
style,
|
|
700
|
+
children: children.split("").map((char, index) => /* @__PURE__ */ jsx("span", {
|
|
701
|
+
css: inView ? animationStyles : hiddenStyles,
|
|
702
|
+
style: {
|
|
703
|
+
animationDelay: delay + index * duration * damping + "ms"
|
|
704
|
+
},
|
|
705
|
+
children: char
|
|
706
|
+
}, index))
|
|
707
|
+
}) : /* @__PURE__ */ jsx(FragmentReveal, {
|
|
708
|
+
...props,
|
|
709
|
+
children
|
|
710
|
+
});
|
|
711
|
+
};
|
|
712
|
+
var FragmentReveal = (props) => {
|
|
713
|
+
const {
|
|
714
|
+
animationStyles,
|
|
715
|
+
fraction = 0,
|
|
716
|
+
triggerOnce = false,
|
|
717
|
+
css: revealCss,
|
|
718
|
+
className,
|
|
719
|
+
style,
|
|
720
|
+
children,
|
|
721
|
+
onVisibilityChange
|
|
722
|
+
} = props;
|
|
723
|
+
const { ref, inView } = useInView({
|
|
724
|
+
triggerOnce,
|
|
725
|
+
threshold: fraction,
|
|
726
|
+
onChange: onVisibilityChange
|
|
727
|
+
});
|
|
728
|
+
const inViewStyles = [revealCss, animationStyles];
|
|
729
|
+
return /* @__PURE__ */ jsx("div", {
|
|
730
|
+
ref,
|
|
731
|
+
className,
|
|
732
|
+
css: inView ? inViewStyles : hiddenStyles,
|
|
733
|
+
style,
|
|
734
|
+
children
|
|
735
|
+
});
|
|
736
|
+
};
|
|
737
|
+
|
|
738
|
+
// src/components/AttentionSeeker.tsx
|
|
739
|
+
import { jsx as jsx2 } from "@emotion/react/jsx-runtime";
|
|
740
|
+
function getStyles(effect) {
|
|
741
|
+
switch (effect) {
|
|
742
|
+
case "flash":
|
|
743
|
+
return [flash];
|
|
744
|
+
case "headShake":
|
|
745
|
+
return [headShake, { animationTimingFunction: "ease-in-out" }];
|
|
746
|
+
case "heartBeat":
|
|
747
|
+
return [heartBeat, { animationTimingFunction: "ease-in-out" }];
|
|
748
|
+
case "jello":
|
|
749
|
+
return [jello, { transformOrigin: "center" }];
|
|
750
|
+
case "pulse":
|
|
751
|
+
return [pulse, { animationTimingFunction: "ease-in-out" }];
|
|
752
|
+
case "rubberBand":
|
|
753
|
+
return [rubberBand];
|
|
754
|
+
case "shake":
|
|
755
|
+
return [shake];
|
|
756
|
+
case "shakeX":
|
|
757
|
+
return [shakeX];
|
|
758
|
+
case "shakeY":
|
|
759
|
+
return [shakeY];
|
|
760
|
+
case "swing":
|
|
761
|
+
return [swing, { transformOrigin: "top center" }];
|
|
762
|
+
case "tada":
|
|
763
|
+
return [tada];
|
|
764
|
+
case "wobble":
|
|
765
|
+
return [wobble];
|
|
766
|
+
case "bounce":
|
|
767
|
+
default:
|
|
768
|
+
return [bounce, { transformOrigin: "center bottom" }];
|
|
769
|
+
}
|
|
770
|
+
}
|
|
771
|
+
var AttentionSeeker = (props) => {
|
|
772
|
+
const { effect = "bounce", ...rest } = props;
|
|
773
|
+
const [keyframes87, animationCss3] = useMemo2(() => getStyles(effect), [effect]);
|
|
774
|
+
return /* @__PURE__ */ jsx2(Reveal, {
|
|
775
|
+
keyframes: keyframes87,
|
|
776
|
+
css: animationCss3,
|
|
777
|
+
...rest
|
|
778
|
+
});
|
|
779
|
+
};
|
|
780
|
+
|
|
781
|
+
// src/components/Bounce.tsx
|
|
782
|
+
import { useMemo as useMemo3 } from "react";
|
|
783
|
+
|
|
784
|
+
// src/animations/bouncing_entrances/bounceIn.ts
|
|
785
|
+
import { keyframes as keyframes27 } from "@emotion/react";
|
|
786
|
+
var bounceIn = keyframes27`
|
|
787
|
+
from,
|
|
788
|
+
20%,
|
|
789
|
+
40%,
|
|
790
|
+
60%,
|
|
791
|
+
80%,
|
|
792
|
+
to {
|
|
793
|
+
animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1);
|
|
794
|
+
}
|
|
795
|
+
|
|
796
|
+
0% {
|
|
797
|
+
opacity: 0;
|
|
798
|
+
transform: scale3d(0.3, 0.3, 0.3);
|
|
799
|
+
}
|
|
800
|
+
|
|
801
|
+
20% {
|
|
802
|
+
transform: scale3d(1.1, 1.1, 1.1);
|
|
803
|
+
}
|
|
804
|
+
|
|
805
|
+
40% {
|
|
806
|
+
transform: scale3d(0.9, 0.9, 0.9);
|
|
807
|
+
}
|
|
808
|
+
|
|
809
|
+
60% {
|
|
810
|
+
opacity: 1;
|
|
811
|
+
transform: scale3d(1.03, 1.03, 1.03);
|
|
812
|
+
}
|
|
813
|
+
|
|
814
|
+
80% {
|
|
815
|
+
transform: scale3d(0.97, 0.97, 0.97);
|
|
816
|
+
}
|
|
817
|
+
|
|
818
|
+
to {
|
|
819
|
+
opacity: 1;
|
|
820
|
+
transform: scale3d(1, 1, 1);
|
|
821
|
+
}
|
|
822
|
+
`;
|
|
823
|
+
|
|
824
|
+
// src/animations/bouncing_entrances/bounceInDown.ts
|
|
825
|
+
import { keyframes as keyframes28 } from "@emotion/react";
|
|
826
|
+
var bounceInDown = keyframes28`
|
|
827
|
+
from,
|
|
828
|
+
60%,
|
|
829
|
+
75%,
|
|
830
|
+
90%,
|
|
831
|
+
to {
|
|
832
|
+
animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1);
|
|
833
|
+
}
|
|
834
|
+
|
|
835
|
+
0% {
|
|
836
|
+
opacity: 0;
|
|
837
|
+
transform: translate3d(0, -3000px, 0) scaleY(3);
|
|
838
|
+
}
|
|
839
|
+
|
|
840
|
+
60% {
|
|
841
|
+
opacity: 1;
|
|
842
|
+
transform: translate3d(0, 25px, 0) scaleY(0.9);
|
|
843
|
+
}
|
|
844
|
+
|
|
845
|
+
75% {
|
|
846
|
+
transform: translate3d(0, -10px, 0) scaleY(0.95);
|
|
847
|
+
}
|
|
848
|
+
|
|
849
|
+
90% {
|
|
850
|
+
transform: translate3d(0, 5px, 0) scaleY(0.985);
|
|
851
|
+
}
|
|
852
|
+
|
|
853
|
+
to {
|
|
854
|
+
transform: translate3d(0, 0, 0);
|
|
855
|
+
}
|
|
856
|
+
`;
|
|
857
|
+
|
|
858
|
+
// src/animations/bouncing_entrances/bounceInLeft.ts
|
|
859
|
+
import { keyframes as keyframes29 } from "@emotion/react";
|
|
860
|
+
var bounceInLeft = keyframes29`
|
|
861
|
+
from,
|
|
862
|
+
60%,
|
|
863
|
+
75%,
|
|
864
|
+
90%,
|
|
865
|
+
to {
|
|
866
|
+
animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1);
|
|
867
|
+
}
|
|
868
|
+
|
|
869
|
+
0% {
|
|
870
|
+
opacity: 0;
|
|
871
|
+
transform: translate3d(-3000px, 0, 0) scaleX(3);
|
|
872
|
+
}
|
|
873
|
+
|
|
874
|
+
60% {
|
|
875
|
+
opacity: 1;
|
|
876
|
+
transform: translate3d(25px, 0, 0) scaleX(1);
|
|
877
|
+
}
|
|
878
|
+
|
|
879
|
+
75% {
|
|
880
|
+
transform: translate3d(-10px, 0, 0) scaleX(0.98);
|
|
881
|
+
}
|
|
882
|
+
|
|
883
|
+
90% {
|
|
884
|
+
transform: translate3d(5px, 0, 0) scaleX(0.995);
|
|
885
|
+
}
|
|
886
|
+
|
|
887
|
+
to {
|
|
888
|
+
transform: translate3d(0, 0, 0);
|
|
889
|
+
}
|
|
890
|
+
`;
|
|
891
|
+
|
|
892
|
+
// src/animations/bouncing_entrances/bounceInRight.ts
|
|
893
|
+
import { keyframes as keyframes30 } from "@emotion/react";
|
|
894
|
+
var bounceInRight = keyframes30`
|
|
895
|
+
from,
|
|
896
|
+
60%,
|
|
897
|
+
75%,
|
|
898
|
+
90%,
|
|
899
|
+
to {
|
|
900
|
+
animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1);
|
|
901
|
+
}
|
|
902
|
+
|
|
903
|
+
from {
|
|
904
|
+
opacity: 0;
|
|
905
|
+
transform: translate3d(3000px, 0, 0) scaleX(3);
|
|
906
|
+
}
|
|
907
|
+
|
|
908
|
+
60% {
|
|
909
|
+
opacity: 1;
|
|
910
|
+
transform: translate3d(-25px, 0, 0) scaleX(1);
|
|
911
|
+
}
|
|
912
|
+
|
|
913
|
+
75% {
|
|
914
|
+
transform: translate3d(10px, 0, 0) scaleX(0.98);
|
|
915
|
+
}
|
|
916
|
+
|
|
917
|
+
90% {
|
|
918
|
+
transform: translate3d(-5px, 0, 0) scaleX(0.995);
|
|
919
|
+
}
|
|
920
|
+
|
|
921
|
+
to {
|
|
922
|
+
transform: translate3d(0, 0, 0);
|
|
923
|
+
}
|
|
924
|
+
`;
|
|
925
|
+
|
|
926
|
+
// src/animations/bouncing_entrances/bounceInUp.ts
|
|
927
|
+
import { keyframes as keyframes31 } from "@emotion/react";
|
|
928
|
+
var bounceInUp = keyframes31`
|
|
929
|
+
from,
|
|
930
|
+
60%,
|
|
931
|
+
75%,
|
|
932
|
+
90%,
|
|
933
|
+
to {
|
|
934
|
+
animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1);
|
|
935
|
+
}
|
|
936
|
+
|
|
937
|
+
from {
|
|
938
|
+
opacity: 0;
|
|
939
|
+
transform: translate3d(0, 3000px, 0) scaleY(5);
|
|
940
|
+
}
|
|
941
|
+
|
|
942
|
+
60% {
|
|
943
|
+
opacity: 1;
|
|
944
|
+
transform: translate3d(0, -20px, 0) scaleY(0.9);
|
|
945
|
+
}
|
|
946
|
+
|
|
947
|
+
75% {
|
|
948
|
+
transform: translate3d(0, 10px, 0) scaleY(0.95);
|
|
949
|
+
}
|
|
950
|
+
|
|
951
|
+
90% {
|
|
952
|
+
transform: translate3d(0, -5px, 0) scaleY(0.985);
|
|
953
|
+
}
|
|
954
|
+
|
|
955
|
+
to {
|
|
956
|
+
transform: translate3d(0, 0, 0);
|
|
957
|
+
}
|
|
958
|
+
`;
|
|
959
|
+
|
|
960
|
+
// src/animations/bouncing_exits/bounceOut.ts
|
|
961
|
+
import { keyframes as keyframes32 } from "@emotion/react";
|
|
962
|
+
var bounceOut = keyframes32`
|
|
963
|
+
20% {
|
|
964
|
+
transform: scale3d(0.9, 0.9, 0.9);
|
|
965
|
+
}
|
|
966
|
+
|
|
967
|
+
50%,
|
|
968
|
+
55% {
|
|
969
|
+
opacity: 1;
|
|
970
|
+
transform: scale3d(1.1, 1.1, 1.1);
|
|
971
|
+
}
|
|
972
|
+
|
|
973
|
+
to {
|
|
974
|
+
opacity: 0;
|
|
975
|
+
transform: scale3d(0.3, 0.3, 0.3);
|
|
976
|
+
}
|
|
977
|
+
`;
|
|
978
|
+
|
|
979
|
+
// src/animations/bouncing_exits/bounceOutDown.ts
|
|
980
|
+
import { keyframes as keyframes33 } from "@emotion/react";
|
|
981
|
+
var bounceOutDown = keyframes33`
|
|
982
|
+
20% {
|
|
983
|
+
transform: translate3d(0, 10px, 0) scaleY(0.985);
|
|
984
|
+
}
|
|
985
|
+
|
|
986
|
+
40%,
|
|
987
|
+
45% {
|
|
988
|
+
opacity: 1;
|
|
989
|
+
transform: translate3d(0, -20px, 0) scaleY(0.9);
|
|
990
|
+
}
|
|
991
|
+
|
|
992
|
+
to {
|
|
993
|
+
opacity: 0;
|
|
994
|
+
transform: translate3d(0, 2000px, 0) scaleY(3);
|
|
995
|
+
}
|
|
996
|
+
`;
|
|
997
|
+
|
|
998
|
+
// src/animations/bouncing_exits/bounceOutLeft.ts
|
|
999
|
+
import { keyframes as keyframes34 } from "@emotion/react";
|
|
1000
|
+
var bounceOutLeft = keyframes34`
|
|
1001
|
+
20% {
|
|
1002
|
+
opacity: 1;
|
|
1003
|
+
transform: translate3d(20px, 0, 0) scaleX(0.9);
|
|
1004
|
+
}
|
|
1005
|
+
|
|
1006
|
+
to {
|
|
1007
|
+
opacity: 0;
|
|
1008
|
+
transform: translate3d(-2000px, 0, 0) scaleX(2);
|
|
1009
|
+
}
|
|
1010
|
+
`;
|
|
1011
|
+
|
|
1012
|
+
// src/animations/bouncing_exits/bounceOutRight.ts
|
|
1013
|
+
import { keyframes as keyframes35 } from "@emotion/react";
|
|
1014
|
+
var bounceOutRight = keyframes35`
|
|
1015
|
+
20% {
|
|
1016
|
+
opacity: 1;
|
|
1017
|
+
transform: translate3d(-20px, 0, 0) scaleX(0.9);
|
|
1018
|
+
}
|
|
1019
|
+
|
|
1020
|
+
to {
|
|
1021
|
+
opacity: 0;
|
|
1022
|
+
transform: translate3d(2000px, 0, 0) scaleX(2);
|
|
1023
|
+
}
|
|
1024
|
+
`;
|
|
1025
|
+
|
|
1026
|
+
// src/animations/bouncing_exits/bounceOutUp.ts
|
|
1027
|
+
import { keyframes as keyframes36 } from "@emotion/react";
|
|
1028
|
+
var bounceOutUp = keyframes36`
|
|
1029
|
+
20% {
|
|
1030
|
+
transform: translate3d(0, -10px, 0) scaleY(0.985);
|
|
1031
|
+
}
|
|
1032
|
+
|
|
1033
|
+
40%,
|
|
1034
|
+
45% {
|
|
1035
|
+
opacity: 1;
|
|
1036
|
+
transform: translate3d(0, 20px, 0) scaleY(0.9);
|
|
1037
|
+
}
|
|
1038
|
+
|
|
1039
|
+
to {
|
|
1040
|
+
opacity: 0;
|
|
1041
|
+
transform: translate3d(0, -2000px, 0) scaleY(3);
|
|
1042
|
+
}
|
|
1043
|
+
`;
|
|
1044
|
+
|
|
1045
|
+
// src/components/Bounce.tsx
|
|
1046
|
+
import { jsx as jsx3 } from "@emotion/react/jsx-runtime";
|
|
1047
|
+
function getStyles2(reverse, direction) {
|
|
1048
|
+
switch (direction) {
|
|
1049
|
+
case "down":
|
|
1050
|
+
return reverse ? bounceOutDown : bounceInDown;
|
|
1051
|
+
case "left":
|
|
1052
|
+
return reverse ? bounceOutLeft : bounceInLeft;
|
|
1053
|
+
case "right":
|
|
1054
|
+
return reverse ? bounceOutRight : bounceInRight;
|
|
1055
|
+
case "up":
|
|
1056
|
+
return reverse ? bounceOutUp : bounceInUp;
|
|
1057
|
+
default:
|
|
1058
|
+
return reverse ? bounceOut : bounceIn;
|
|
1059
|
+
}
|
|
1060
|
+
}
|
|
1061
|
+
var Bounce = (props) => {
|
|
1062
|
+
const { direction, reverse = false, ...rest } = props;
|
|
1063
|
+
const keyframes87 = useMemo3(
|
|
1064
|
+
() => getStyles2(reverse, direction),
|
|
1065
|
+
[direction, reverse]
|
|
1066
|
+
);
|
|
1067
|
+
return /* @__PURE__ */ jsx3(Reveal, {
|
|
1068
|
+
keyframes: keyframes87,
|
|
1069
|
+
...rest
|
|
1070
|
+
});
|
|
1071
|
+
};
|
|
1072
|
+
|
|
1073
|
+
// src/components/Fade.tsx
|
|
1074
|
+
import { useMemo as useMemo4 } from "react";
|
|
1075
|
+
|
|
1076
|
+
// src/animations/fading_exits/fadeOut.ts
|
|
1077
|
+
import { keyframes as keyframes37 } from "@emotion/react";
|
|
1078
|
+
var fadeOut = keyframes37`
|
|
1079
|
+
from {
|
|
1080
|
+
opacity: 1;
|
|
1081
|
+
}
|
|
1082
|
+
|
|
1083
|
+
to {
|
|
1084
|
+
opacity: 0;
|
|
1085
|
+
}
|
|
1086
|
+
`;
|
|
1087
|
+
|
|
1088
|
+
// src/animations/fading_exits/fadeOutBottomLeft.ts
|
|
1089
|
+
import { keyframes as keyframes38 } from "@emotion/react";
|
|
1090
|
+
var fadeOutBottomLeft = keyframes38`
|
|
1091
|
+
from {
|
|
1092
|
+
opacity: 1;
|
|
1093
|
+
transform: translate3d(0, 0, 0);
|
|
1094
|
+
}
|
|
1095
|
+
|
|
1096
|
+
to {
|
|
1097
|
+
opacity: 0;
|
|
1098
|
+
transform: translate3d(-100%, 100%, 0);
|
|
1099
|
+
}
|
|
1100
|
+
`;
|
|
1101
|
+
|
|
1102
|
+
// src/animations/fading_exits/fadeOutBottomRight.ts
|
|
1103
|
+
import { keyframes as keyframes39 } from "@emotion/react";
|
|
1104
|
+
var fadeOutBottomRight = keyframes39`
|
|
1105
|
+
from {
|
|
1106
|
+
opacity: 1;
|
|
1107
|
+
transform: translate3d(0, 0, 0);
|
|
1108
|
+
}
|
|
1109
|
+
|
|
1110
|
+
to {
|
|
1111
|
+
opacity: 0;
|
|
1112
|
+
transform: translate3d(100%, 100%, 0);
|
|
1113
|
+
}
|
|
1114
|
+
`;
|
|
1115
|
+
|
|
1116
|
+
// src/animations/fading_exits/fadeOutDown.ts
|
|
1117
|
+
import { keyframes as keyframes40 } from "@emotion/react";
|
|
1118
|
+
var fadeOutDown = keyframes40`
|
|
1119
|
+
from {
|
|
1120
|
+
opacity: 1;
|
|
1121
|
+
}
|
|
1122
|
+
|
|
1123
|
+
to {
|
|
1124
|
+
opacity: 0;
|
|
1125
|
+
transform: translate3d(0, 100%, 0);
|
|
1126
|
+
}
|
|
1127
|
+
`;
|
|
1128
|
+
|
|
1129
|
+
// src/animations/fading_exits/fadeOutDownBig.ts
|
|
1130
|
+
import { keyframes as keyframes41 } from "@emotion/react";
|
|
1131
|
+
var fadeOutDownBig = keyframes41`
|
|
1132
|
+
from {
|
|
1133
|
+
opacity: 1;
|
|
1134
|
+
}
|
|
1135
|
+
|
|
1136
|
+
to {
|
|
1137
|
+
opacity: 0;
|
|
1138
|
+
transform: translate3d(0, 2000px, 0);
|
|
1139
|
+
}
|
|
1140
|
+
`;
|
|
1141
|
+
|
|
1142
|
+
// src/animations/fading_exits/fadeOutLeft.ts
|
|
1143
|
+
import { keyframes as keyframes42 } from "@emotion/react";
|
|
1144
|
+
var fadeOutLeft = keyframes42`
|
|
1145
|
+
from {
|
|
1146
|
+
opacity: 1;
|
|
1147
|
+
}
|
|
1148
|
+
|
|
1149
|
+
to {
|
|
1150
|
+
opacity: 0;
|
|
1151
|
+
transform: translate3d(-100%, 0, 0);
|
|
1152
|
+
}
|
|
1153
|
+
`;
|
|
1154
|
+
|
|
1155
|
+
// src/animations/fading_exits/fadeOutLeftBig.ts
|
|
1156
|
+
import { keyframes as keyframes43 } from "@emotion/react";
|
|
1157
|
+
var fadeOutLeftBig = keyframes43`
|
|
1158
|
+
from {
|
|
1159
|
+
opacity: 1;
|
|
1160
|
+
}
|
|
1161
|
+
|
|
1162
|
+
to {
|
|
1163
|
+
opacity: 0;
|
|
1164
|
+
transform: translate3d(-2000px, 0, 0);
|
|
1165
|
+
}
|
|
1166
|
+
`;
|
|
1167
|
+
|
|
1168
|
+
// src/animations/fading_exits/fadeOutRight.ts
|
|
1169
|
+
import { keyframes as keyframes44 } from "@emotion/react";
|
|
1170
|
+
var fadeOutRight = keyframes44`
|
|
1171
|
+
from {
|
|
1172
|
+
opacity: 1;
|
|
1173
|
+
}
|
|
1174
|
+
|
|
1175
|
+
to {
|
|
1176
|
+
opacity: 0;
|
|
1177
|
+
transform: translate3d(100%, 0, 0);
|
|
1178
|
+
}
|
|
1179
|
+
`;
|
|
1180
|
+
|
|
1181
|
+
// src/animations/fading_exits/fadeOutRightBig.ts
|
|
1182
|
+
import { keyframes as keyframes45 } from "@emotion/react";
|
|
1183
|
+
var fadeOutRightBig = keyframes45`
|
|
1184
|
+
from {
|
|
1185
|
+
opacity: 1;
|
|
1186
|
+
}
|
|
1187
|
+
|
|
1188
|
+
to {
|
|
1189
|
+
opacity: 0;
|
|
1190
|
+
transform: translate3d(2000px, 0, 0);
|
|
1191
|
+
}
|
|
1192
|
+
`;
|
|
1193
|
+
|
|
1194
|
+
// src/animations/fading_exits/fadeOutTopLeft.ts
|
|
1195
|
+
import { keyframes as keyframes46 } from "@emotion/react";
|
|
1196
|
+
var fadeOutTopLeft = keyframes46`
|
|
1197
|
+
from {
|
|
1198
|
+
opacity: 1;
|
|
1199
|
+
transform: translate3d(0, 0, 0);
|
|
1200
|
+
}
|
|
1201
|
+
|
|
1202
|
+
to {
|
|
1203
|
+
opacity: 0;
|
|
1204
|
+
transform: translate3d(-100%, -100%, 0);
|
|
1205
|
+
}
|
|
1206
|
+
`;
|
|
1207
|
+
|
|
1208
|
+
// src/animations/fading_exits/fadeOutTopRight.ts
|
|
1209
|
+
import { keyframes as keyframes47 } from "@emotion/react";
|
|
1210
|
+
var fadeOutTopRight = keyframes47`
|
|
1211
|
+
from {
|
|
1212
|
+
opacity: 1;
|
|
1213
|
+
transform: translate3d(0, 0, 0);
|
|
1214
|
+
}
|
|
1215
|
+
|
|
1216
|
+
to {
|
|
1217
|
+
opacity: 0;
|
|
1218
|
+
transform: translate3d(100%, -100%, 0);
|
|
1219
|
+
}
|
|
1220
|
+
`;
|
|
1221
|
+
|
|
1222
|
+
// src/animations/fading_exits/fadeOutUp.ts
|
|
1223
|
+
import { keyframes as keyframes48 } from "@emotion/react";
|
|
1224
|
+
var fadeOutUp = keyframes48`
|
|
1225
|
+
from {
|
|
1226
|
+
opacity: 1;
|
|
1227
|
+
}
|
|
1228
|
+
|
|
1229
|
+
to {
|
|
1230
|
+
opacity: 0;
|
|
1231
|
+
transform: translate3d(0, -100%, 0);
|
|
1232
|
+
}
|
|
1233
|
+
`;
|
|
1234
|
+
|
|
1235
|
+
// src/animations/fading_exits/fadeOutUpBig.ts
|
|
1236
|
+
import { keyframes as keyframes49 } from "@emotion/react";
|
|
1237
|
+
var fadeOutUpBig = keyframes49`
|
|
1238
|
+
from {
|
|
1239
|
+
opacity: 1;
|
|
1240
|
+
}
|
|
1241
|
+
|
|
1242
|
+
to {
|
|
1243
|
+
opacity: 0;
|
|
1244
|
+
transform: translate3d(0, -2000px, 0);
|
|
1245
|
+
}
|
|
1246
|
+
`;
|
|
1247
|
+
|
|
1248
|
+
// src/components/Fade.tsx
|
|
1249
|
+
import { jsx as jsx4 } from "@emotion/react/jsx-runtime";
|
|
1250
|
+
function getStyles3(big, reverse, direction) {
|
|
1251
|
+
switch (direction) {
|
|
1252
|
+
case "bottom-left":
|
|
1253
|
+
return reverse ? fadeOutBottomLeft : fadeInBottomLeft;
|
|
1254
|
+
case "bottom-right":
|
|
1255
|
+
return reverse ? fadeOutBottomRight : fadeInBottomRight;
|
|
1256
|
+
case "down":
|
|
1257
|
+
return big ? reverse ? fadeOutDownBig : fadeInDownBig : reverse ? fadeOutDown : fadeInDown;
|
|
1258
|
+
case "left":
|
|
1259
|
+
return big ? reverse ? fadeOutLeftBig : fadeInLeftBig : reverse ? fadeOutLeft : fadeInLeft;
|
|
1260
|
+
case "right":
|
|
1261
|
+
return big ? reverse ? fadeOutRightBig : fadeInRightBig : reverse ? fadeOutRight : fadeInRight;
|
|
1262
|
+
case "top-left":
|
|
1263
|
+
return reverse ? fadeOutTopLeft : fadeInTopLeft;
|
|
1264
|
+
case "top-right":
|
|
1265
|
+
return reverse ? fadeOutTopRight : fadeInTopRight;
|
|
1266
|
+
case "up":
|
|
1267
|
+
return big ? reverse ? fadeOutUpBig : fadeInUpBig : reverse ? fadeOutUp : fadeInUp;
|
|
1268
|
+
default:
|
|
1269
|
+
return reverse ? fadeOut : fadeIn;
|
|
1270
|
+
}
|
|
1271
|
+
}
|
|
1272
|
+
var Fade = (props) => {
|
|
1273
|
+
const { big = false, direction, reverse = false, ...rest } = props;
|
|
1274
|
+
const keyframes87 = useMemo4(
|
|
1275
|
+
() => getStyles3(big, reverse, direction),
|
|
1276
|
+
[big, direction, reverse]
|
|
1277
|
+
);
|
|
1278
|
+
return /* @__PURE__ */ jsx4(Reveal, {
|
|
1279
|
+
keyframes: keyframes87,
|
|
1280
|
+
...rest
|
|
1281
|
+
});
|
|
1282
|
+
};
|
|
1283
|
+
|
|
1284
|
+
// src/components/Flip.tsx
|
|
1285
|
+
import { css as css3 } from "@emotion/react";
|
|
1286
|
+
import { useMemo as useMemo5 } from "react";
|
|
1287
|
+
|
|
1288
|
+
// src/animations/flippers/flip.ts
|
|
1289
|
+
import { keyframes as keyframes50 } from "@emotion/react";
|
|
1290
|
+
var flip = keyframes50`
|
|
1291
|
+
from {
|
|
1292
|
+
transform: perspective(400px) scale3d(1, 1, 1) translate3d(0, 0, 0) rotate3d(0, 1, 0, -360deg);
|
|
1293
|
+
animation-timing-function: ease-out;
|
|
1294
|
+
}
|
|
1295
|
+
|
|
1296
|
+
40% {
|
|
1297
|
+
transform: perspective(400px) scale3d(1, 1, 1) translate3d(0, 0, 150px)
|
|
1298
|
+
rotate3d(0, 1, 0, -190deg);
|
|
1299
|
+
animation-timing-function: ease-out;
|
|
1300
|
+
}
|
|
1301
|
+
|
|
1302
|
+
50% {
|
|
1303
|
+
transform: perspective(400px) scale3d(1, 1, 1) translate3d(0, 0, 150px)
|
|
1304
|
+
rotate3d(0, 1, 0, -170deg);
|
|
1305
|
+
animation-timing-function: ease-in;
|
|
1306
|
+
}
|
|
1307
|
+
|
|
1308
|
+
80% {
|
|
1309
|
+
transform: perspective(400px) scale3d(0.95, 0.95, 0.95) translate3d(0, 0, 0)
|
|
1310
|
+
rotate3d(0, 1, 0, 0deg);
|
|
1311
|
+
animation-timing-function: ease-in;
|
|
1312
|
+
}
|
|
1313
|
+
|
|
1314
|
+
to {
|
|
1315
|
+
transform: perspective(400px) scale3d(1, 1, 1) translate3d(0, 0, 0) rotate3d(0, 1, 0, 0deg);
|
|
1316
|
+
animation-timing-function: ease-in;
|
|
1317
|
+
}
|
|
1318
|
+
`;
|
|
1319
|
+
|
|
1320
|
+
// src/animations/flippers/flipInX.ts
|
|
1321
|
+
import { keyframes as keyframes51 } from "@emotion/react";
|
|
1322
|
+
var flipInX = keyframes51`
|
|
1323
|
+
from {
|
|
1324
|
+
transform: perspective(400px) rotate3d(1, 0, 0, 90deg);
|
|
1325
|
+
animation-timing-function: ease-in;
|
|
1326
|
+
opacity: 0;
|
|
1327
|
+
}
|
|
1328
|
+
|
|
1329
|
+
40% {
|
|
1330
|
+
transform: perspective(400px) rotate3d(1, 0, 0, -20deg);
|
|
1331
|
+
animation-timing-function: ease-in;
|
|
1332
|
+
}
|
|
1333
|
+
|
|
1334
|
+
60% {
|
|
1335
|
+
transform: perspective(400px) rotate3d(1, 0, 0, 10deg);
|
|
1336
|
+
opacity: 1;
|
|
1337
|
+
}
|
|
1338
|
+
|
|
1339
|
+
80% {
|
|
1340
|
+
transform: perspective(400px) rotate3d(1, 0, 0, -5deg);
|
|
1341
|
+
}
|
|
1342
|
+
|
|
1343
|
+
to {
|
|
1344
|
+
transform: perspective(400px);
|
|
1345
|
+
}
|
|
1346
|
+
`;
|
|
1347
|
+
|
|
1348
|
+
// src/animations/flippers/flipInY.ts
|
|
1349
|
+
import { keyframes as keyframes52 } from "@emotion/react";
|
|
1350
|
+
var flipInY = keyframes52`
|
|
1351
|
+
from {
|
|
1352
|
+
transform: perspective(400px) rotate3d(0, 1, 0, 90deg);
|
|
1353
|
+
animation-timing-function: ease-in;
|
|
1354
|
+
opacity: 0;
|
|
1355
|
+
}
|
|
1356
|
+
|
|
1357
|
+
40% {
|
|
1358
|
+
transform: perspective(400px) rotate3d(0, 1, 0, -20deg);
|
|
1359
|
+
animation-timing-function: ease-in;
|
|
1360
|
+
}
|
|
1361
|
+
|
|
1362
|
+
60% {
|
|
1363
|
+
transform: perspective(400px) rotate3d(0, 1, 0, 10deg);
|
|
1364
|
+
opacity: 1;
|
|
1365
|
+
}
|
|
1366
|
+
|
|
1367
|
+
80% {
|
|
1368
|
+
transform: perspective(400px) rotate3d(0, 1, 0, -5deg);
|
|
1369
|
+
}
|
|
1370
|
+
|
|
1371
|
+
to {
|
|
1372
|
+
transform: perspective(400px);
|
|
1373
|
+
}
|
|
1374
|
+
`;
|
|
1375
|
+
|
|
1376
|
+
// src/animations/flippers/flipOutX.ts
|
|
1377
|
+
import { keyframes as keyframes53 } from "@emotion/react";
|
|
1378
|
+
var flipOutX = keyframes53`
|
|
1379
|
+
from {
|
|
1380
|
+
transform: perspective(400px);
|
|
1381
|
+
}
|
|
1382
|
+
|
|
1383
|
+
30% {
|
|
1384
|
+
transform: perspective(400px) rotate3d(1, 0, 0, -20deg);
|
|
1385
|
+
opacity: 1;
|
|
1386
|
+
}
|
|
1387
|
+
|
|
1388
|
+
to {
|
|
1389
|
+
transform: perspective(400px) rotate3d(1, 0, 0, 90deg);
|
|
1390
|
+
opacity: 0;
|
|
1391
|
+
}
|
|
1392
|
+
`;
|
|
1393
|
+
|
|
1394
|
+
// src/animations/flippers/flipOutY.ts
|
|
1395
|
+
import { keyframes as keyframes54 } from "@emotion/react";
|
|
1396
|
+
var flipOutY = keyframes54`
|
|
1397
|
+
from {
|
|
1398
|
+
transform: perspective(400px);
|
|
1399
|
+
}
|
|
1400
|
+
|
|
1401
|
+
30% {
|
|
1402
|
+
transform: perspective(400px) rotate3d(0, 1, 0, -15deg);
|
|
1403
|
+
opacity: 1;
|
|
1404
|
+
}
|
|
1405
|
+
|
|
1406
|
+
to {
|
|
1407
|
+
transform: perspective(400px) rotate3d(0, 1, 0, 90deg);
|
|
1408
|
+
opacity: 0;
|
|
1409
|
+
}
|
|
1410
|
+
`;
|
|
1411
|
+
|
|
1412
|
+
// src/components/Flip.tsx
|
|
1413
|
+
import { jsx as jsx5 } from "@emotion/react/jsx-runtime";
|
|
1414
|
+
function getStyles4(reverse, direction) {
|
|
1415
|
+
switch (direction) {
|
|
1416
|
+
case "horizontal":
|
|
1417
|
+
return reverse ? flipOutX : flipInX;
|
|
1418
|
+
case "vertical":
|
|
1419
|
+
return reverse ? flipOutY : flipInY;
|
|
1420
|
+
default:
|
|
1421
|
+
return flip;
|
|
1422
|
+
}
|
|
1423
|
+
}
|
|
1424
|
+
var animationCss = css3`
|
|
1425
|
+
backface-visibility: visible;
|
|
1426
|
+
`;
|
|
1427
|
+
var Flip = (props) => {
|
|
1428
|
+
const { direction, reverse = false, ...rest } = props;
|
|
1429
|
+
const keyframes87 = useMemo5(
|
|
1430
|
+
() => getStyles4(reverse, direction),
|
|
1431
|
+
[direction, reverse]
|
|
1432
|
+
);
|
|
1433
|
+
return /* @__PURE__ */ jsx5(Reveal, {
|
|
1434
|
+
css: animationCss,
|
|
1435
|
+
keyframes: keyframes87,
|
|
1436
|
+
...rest
|
|
1437
|
+
});
|
|
1438
|
+
};
|
|
1439
|
+
|
|
1440
|
+
// src/components/Hinge.tsx
|
|
1441
|
+
import { css as css4 } from "@emotion/react";
|
|
1442
|
+
|
|
1443
|
+
// src/animations/specials/hinge.ts
|
|
1444
|
+
import { keyframes as keyframes55 } from "@emotion/react";
|
|
1445
|
+
var hinge = keyframes55`
|
|
1446
|
+
0% {
|
|
1447
|
+
animation-timing-function: ease-in-out;
|
|
1448
|
+
}
|
|
1449
|
+
|
|
1450
|
+
20%,
|
|
1451
|
+
60% {
|
|
1452
|
+
transform: rotate3d(0, 0, 1, 80deg);
|
|
1453
|
+
animation-timing-function: ease-in-out;
|
|
1454
|
+
}
|
|
1455
|
+
|
|
1456
|
+
40%,
|
|
1457
|
+
80% {
|
|
1458
|
+
transform: rotate3d(0, 0, 1, 60deg);
|
|
1459
|
+
animation-timing-function: ease-in-out;
|
|
1460
|
+
opacity: 1;
|
|
1461
|
+
}
|
|
1462
|
+
|
|
1463
|
+
to {
|
|
1464
|
+
transform: translate3d(0, 700px, 0);
|
|
1465
|
+
opacity: 0;
|
|
1466
|
+
}
|
|
1467
|
+
`;
|
|
1468
|
+
|
|
1469
|
+
// src/animations/specials/jackInTheBox.ts
|
|
1470
|
+
import { keyframes as keyframes56 } from "@emotion/react";
|
|
1471
|
+
var jackInTheBox = keyframes56`
|
|
1472
|
+
from {
|
|
1473
|
+
opacity: 0;
|
|
1474
|
+
transform: scale(0.1) rotate(30deg);
|
|
1475
|
+
transform-origin: center bottom;
|
|
1476
|
+
}
|
|
1477
|
+
|
|
1478
|
+
50% {
|
|
1479
|
+
transform: rotate(-10deg);
|
|
1480
|
+
}
|
|
1481
|
+
|
|
1482
|
+
70% {
|
|
1483
|
+
transform: rotate(3deg);
|
|
1484
|
+
}
|
|
1485
|
+
|
|
1486
|
+
to {
|
|
1487
|
+
opacity: 1;
|
|
1488
|
+
transform: scale(1);
|
|
1489
|
+
}
|
|
1490
|
+
`;
|
|
1491
|
+
|
|
1492
|
+
// src/animations/specials/rollIn.ts
|
|
1493
|
+
import { keyframes as keyframes57 } from "@emotion/react";
|
|
1494
|
+
var rollIn = keyframes57`
|
|
1495
|
+
from {
|
|
1496
|
+
opacity: 0;
|
|
1497
|
+
transform: translate3d(-100%, 0, 0) rotate3d(0, 0, 1, -120deg);
|
|
1498
|
+
}
|
|
1499
|
+
|
|
1500
|
+
to {
|
|
1501
|
+
opacity: 1;
|
|
1502
|
+
transform: translate3d(0, 0, 0);
|
|
1503
|
+
}
|
|
1504
|
+
`;
|
|
1505
|
+
|
|
1506
|
+
// src/animations/specials/rollOut.ts
|
|
1507
|
+
import { keyframes as keyframes58 } from "@emotion/react";
|
|
1508
|
+
var rollOut = keyframes58`
|
|
1509
|
+
from {
|
|
1510
|
+
opacity: 1;
|
|
1511
|
+
}
|
|
1512
|
+
|
|
1513
|
+
to {
|
|
1514
|
+
opacity: 0;
|
|
1515
|
+
transform: translate3d(100%, 0, 0) rotate3d(0, 0, 1, 120deg);
|
|
1516
|
+
}
|
|
1517
|
+
`;
|
|
1518
|
+
|
|
1519
|
+
// src/components/Hinge.tsx
|
|
1520
|
+
import { jsx as jsx6 } from "@emotion/react/jsx-runtime";
|
|
1521
|
+
var animationCss2 = css4`
|
|
1522
|
+
transform-origin: top left;
|
|
1523
|
+
`;
|
|
1524
|
+
var Hinge = (props) => {
|
|
1525
|
+
return /* @__PURE__ */ jsx6(Reveal, {
|
|
1526
|
+
css: animationCss2,
|
|
1527
|
+
keyframes: hinge,
|
|
1528
|
+
...props
|
|
1529
|
+
});
|
|
1530
|
+
};
|
|
1531
|
+
|
|
1532
|
+
// src/components/JackInTheBox.tsx
|
|
1533
|
+
import { jsx as jsx7 } from "@emotion/react/jsx-runtime";
|
|
1534
|
+
var JackInTheBox = (props) => {
|
|
1535
|
+
return /* @__PURE__ */ jsx7(Reveal, {
|
|
1536
|
+
keyframes: jackInTheBox,
|
|
1537
|
+
...props
|
|
1538
|
+
});
|
|
1539
|
+
};
|
|
1540
|
+
|
|
1541
|
+
// src/components/Roll.tsx
|
|
1542
|
+
import { useMemo as useMemo6 } from "react";
|
|
1543
|
+
import { jsx as jsx8 } from "@emotion/react/jsx-runtime";
|
|
1544
|
+
function getStyles5(reverse) {
|
|
1545
|
+
return reverse ? rollOut : rollIn;
|
|
1546
|
+
}
|
|
1547
|
+
var Roll = (props) => {
|
|
1548
|
+
const { reverse = false, ...rest } = props;
|
|
1549
|
+
const keyframes87 = useMemo6(() => getStyles5(reverse), [reverse]);
|
|
1550
|
+
return /* @__PURE__ */ jsx8(Reveal, {
|
|
1551
|
+
keyframes: keyframes87,
|
|
1552
|
+
...rest
|
|
1553
|
+
});
|
|
1554
|
+
};
|
|
1555
|
+
|
|
1556
|
+
// src/components/Rotate.tsx
|
|
1557
|
+
import { useMemo as useMemo7 } from "react";
|
|
1558
|
+
|
|
1559
|
+
// src/animations/rotating_entrances/rotateIn.ts
|
|
1560
|
+
import { keyframes as keyframes59 } from "@emotion/react";
|
|
1561
|
+
var rotateIn = keyframes59`
|
|
1562
|
+
from {
|
|
1563
|
+
transform: rotate3d(0, 0, 1, -200deg);
|
|
1564
|
+
opacity: 0;
|
|
1565
|
+
}
|
|
1566
|
+
|
|
1567
|
+
to {
|
|
1568
|
+
transform: translate3d(0, 0, 0);
|
|
1569
|
+
opacity: 1;
|
|
1570
|
+
}
|
|
1571
|
+
`;
|
|
1572
|
+
|
|
1573
|
+
// src/animations/rotating_entrances/rotateInDownLeft.ts
|
|
1574
|
+
import { keyframes as keyframes60 } from "@emotion/react";
|
|
1575
|
+
var rotateInDownLeft = keyframes60`
|
|
1576
|
+
from {
|
|
1577
|
+
transform: rotate3d(0, 0, 1, -45deg);
|
|
1578
|
+
opacity: 0;
|
|
1579
|
+
}
|
|
1580
|
+
|
|
1581
|
+
to {
|
|
1582
|
+
transform: translate3d(0, 0, 0);
|
|
1583
|
+
opacity: 1;
|
|
1584
|
+
}
|
|
1585
|
+
`;
|
|
1586
|
+
|
|
1587
|
+
// src/animations/rotating_entrances/rotateInDownRight.ts
|
|
1588
|
+
import { keyframes as keyframes61 } from "@emotion/react";
|
|
1589
|
+
var rotateInDownRight = keyframes61`
|
|
1590
|
+
from {
|
|
1591
|
+
transform: rotate3d(0, 0, 1, 45deg);
|
|
1592
|
+
opacity: 0;
|
|
1593
|
+
}
|
|
1594
|
+
|
|
1595
|
+
to {
|
|
1596
|
+
transform: translate3d(0, 0, 0);
|
|
1597
|
+
opacity: 1;
|
|
1598
|
+
}
|
|
1599
|
+
`;
|
|
1600
|
+
|
|
1601
|
+
// src/animations/rotating_entrances/rotateInUpLeft.ts
|
|
1602
|
+
import { keyframes as keyframes62 } from "@emotion/react";
|
|
1603
|
+
var rotateInUpLeft = keyframes62`
|
|
1604
|
+
from {
|
|
1605
|
+
transform: rotate3d(0, 0, 1, 45deg);
|
|
1606
|
+
opacity: 0;
|
|
1607
|
+
}
|
|
1608
|
+
|
|
1609
|
+
to {
|
|
1610
|
+
transform: translate3d(0, 0, 0);
|
|
1611
|
+
opacity: 1;
|
|
1612
|
+
}
|
|
1613
|
+
`;
|
|
1614
|
+
|
|
1615
|
+
// src/animations/rotating_entrances/rotateInUpRight.ts
|
|
1616
|
+
import { keyframes as keyframes63 } from "@emotion/react";
|
|
1617
|
+
var rotateInUpRight = keyframes63`
|
|
1618
|
+
from {
|
|
1619
|
+
transform: rotate3d(0, 0, 1, -90deg);
|
|
1620
|
+
opacity: 0;
|
|
1621
|
+
}
|
|
1622
|
+
|
|
1623
|
+
to {
|
|
1624
|
+
transform: translate3d(0, 0, 0);
|
|
1625
|
+
opacity: 1;
|
|
1626
|
+
}
|
|
1627
|
+
`;
|
|
1628
|
+
|
|
1629
|
+
// src/animations/rotating_exits/rotateOut.ts
|
|
1630
|
+
import { keyframes as keyframes64 } from "@emotion/react";
|
|
1631
|
+
var rotateOut = keyframes64`
|
|
1632
|
+
from {
|
|
1633
|
+
opacity: 1;
|
|
1634
|
+
}
|
|
1635
|
+
|
|
1636
|
+
to {
|
|
1637
|
+
transform: rotate3d(0, 0, 1, 200deg);
|
|
1638
|
+
opacity: 0;
|
|
1639
|
+
}
|
|
1640
|
+
`;
|
|
1641
|
+
|
|
1642
|
+
// src/animations/rotating_exits/rotateOutDownLeft.ts
|
|
1643
|
+
import { keyframes as keyframes65 } from "@emotion/react";
|
|
1644
|
+
var rotateOutDownLeft = keyframes65`
|
|
1645
|
+
from {
|
|
1646
|
+
opacity: 1;
|
|
1647
|
+
}
|
|
1648
|
+
|
|
1649
|
+
to {
|
|
1650
|
+
transform: rotate3d(0, 0, 1, 45deg);
|
|
1651
|
+
opacity: 0;
|
|
1652
|
+
}
|
|
1653
|
+
`;
|
|
1654
|
+
|
|
1655
|
+
// src/animations/rotating_exits/rotateOutDownRight.ts
|
|
1656
|
+
import { keyframes as keyframes66 } from "@emotion/react";
|
|
1657
|
+
var rotateOutDownRight = keyframes66`
|
|
1658
|
+
from {
|
|
1659
|
+
opacity: 1;
|
|
1660
|
+
}
|
|
1661
|
+
|
|
1662
|
+
to {
|
|
1663
|
+
transform: rotate3d(0, 0, 1, -45deg);
|
|
1664
|
+
opacity: 0;
|
|
1665
|
+
}
|
|
1666
|
+
`;
|
|
1667
|
+
|
|
1668
|
+
// src/animations/rotating_exits/rotateOutUpLeft.ts
|
|
1669
|
+
import { keyframes as keyframes67 } from "@emotion/react";
|
|
1670
|
+
var rotateOutUpLeft = keyframes67`
|
|
1671
|
+
from {
|
|
1672
|
+
opacity: 1;
|
|
1673
|
+
}
|
|
1674
|
+
|
|
1675
|
+
to {
|
|
1676
|
+
transform: rotate3d(0, 0, 1, -45deg);
|
|
1677
|
+
opacity: 0;
|
|
1678
|
+
}
|
|
1679
|
+
`;
|
|
1680
|
+
|
|
1681
|
+
// src/animations/rotating_exits/rotateOutUpRight.ts
|
|
1682
|
+
import { keyframes as keyframes68 } from "@emotion/react";
|
|
1683
|
+
var rotateOutUpRight = keyframes68`
|
|
1684
|
+
from {
|
|
1685
|
+
opacity: 1;
|
|
1686
|
+
}
|
|
1687
|
+
|
|
1688
|
+
to {
|
|
1689
|
+
transform: rotate3d(0, 0, 1, 90deg);
|
|
1690
|
+
opacity: 0;
|
|
1691
|
+
}
|
|
1692
|
+
`;
|
|
1693
|
+
|
|
1694
|
+
// src/components/Rotate.tsx
|
|
1695
|
+
import { jsx as jsx9 } from "@emotion/react/jsx-runtime";
|
|
1696
|
+
function getStyles6(reverse, direction) {
|
|
1697
|
+
switch (direction) {
|
|
1698
|
+
case "bottom-left":
|
|
1699
|
+
return reverse ? [rotateOutDownLeft, { transformOrigin: "left bottom" }] : [rotateInDownLeft, { transformOrigin: "left bottom" }];
|
|
1700
|
+
case "bottom-right":
|
|
1701
|
+
return reverse ? [rotateOutDownRight, { transformOrigin: "right bottom" }] : [rotateInDownRight, { transformOrigin: "right bottom" }];
|
|
1702
|
+
case "top-left":
|
|
1703
|
+
return reverse ? [rotateOutUpLeft, { transformOrigin: "left bottom" }] : [rotateInUpLeft, { transformOrigin: "left bottom" }];
|
|
1704
|
+
case "top-right":
|
|
1705
|
+
return reverse ? [rotateOutUpRight, { transformOrigin: "right bottom" }] : [rotateInUpRight, { transformOrigin: "right bottom" }];
|
|
1706
|
+
default:
|
|
1707
|
+
return reverse ? [rotateOut, { transformOrigin: "center" }] : [rotateIn, { transformOrigin: "center" }];
|
|
1708
|
+
}
|
|
1709
|
+
}
|
|
1710
|
+
var Rotate = (props) => {
|
|
1711
|
+
const { direction, reverse = false, ...rest } = props;
|
|
1712
|
+
const [keyframes87, animationCss3] = useMemo7(
|
|
1713
|
+
() => getStyles6(reverse, direction),
|
|
1714
|
+
[direction, reverse]
|
|
1715
|
+
);
|
|
1716
|
+
return /* @__PURE__ */ jsx9(Reveal, {
|
|
1717
|
+
css: animationCss3,
|
|
1718
|
+
keyframes: keyframes87,
|
|
1719
|
+
...rest
|
|
1720
|
+
});
|
|
1721
|
+
};
|
|
1722
|
+
|
|
1723
|
+
// src/components/Slide.tsx
|
|
1724
|
+
import { useMemo as useMemo8 } from "react";
|
|
1725
|
+
|
|
1726
|
+
// src/animations/sliding_entrances/slideInDown.ts
|
|
1727
|
+
import { keyframes as keyframes69 } from "@emotion/react";
|
|
1728
|
+
var slideInDown = keyframes69`
|
|
1729
|
+
from {
|
|
1730
|
+
transform: translate3d(0, -100%, 0);
|
|
1731
|
+
visibility: visible;
|
|
1732
|
+
}
|
|
1733
|
+
|
|
1734
|
+
to {
|
|
1735
|
+
transform: translate3d(0, 0, 0);
|
|
1736
|
+
}
|
|
1737
|
+
`;
|
|
1738
|
+
|
|
1739
|
+
// src/animations/sliding_entrances/slideInLeft.ts
|
|
1740
|
+
import { keyframes as keyframes70 } from "@emotion/react";
|
|
1741
|
+
var slideInLeft = keyframes70`
|
|
1742
|
+
from {
|
|
1743
|
+
transform: translate3d(-100%, 0, 0);
|
|
1744
|
+
visibility: visible;
|
|
1745
|
+
}
|
|
1746
|
+
|
|
1747
|
+
to {
|
|
1748
|
+
transform: translate3d(0, 0, 0);
|
|
1749
|
+
}
|
|
1750
|
+
`;
|
|
1751
|
+
|
|
1752
|
+
// src/animations/sliding_entrances/slideInRight.ts
|
|
1753
|
+
import { keyframes as keyframes71 } from "@emotion/react";
|
|
1754
|
+
var slideInRight = keyframes71`
|
|
1755
|
+
from {
|
|
1756
|
+
transform: translate3d(100%, 0, 0);
|
|
1757
|
+
visibility: visible;
|
|
1758
|
+
}
|
|
1759
|
+
|
|
1760
|
+
to {
|
|
1761
|
+
transform: translate3d(0, 0, 0);
|
|
1762
|
+
}
|
|
1763
|
+
`;
|
|
1764
|
+
|
|
1765
|
+
// src/animations/sliding_entrances/slideInUp.ts
|
|
1766
|
+
import { keyframes as keyframes72 } from "@emotion/react";
|
|
1767
|
+
var slideInUp = keyframes72`
|
|
1768
|
+
from {
|
|
1769
|
+
transform: translate3d(0, 100%, 0);
|
|
1770
|
+
visibility: visible;
|
|
1771
|
+
}
|
|
1772
|
+
|
|
1773
|
+
to {
|
|
1774
|
+
transform: translate3d(0, 0, 0);
|
|
1775
|
+
}
|
|
1776
|
+
`;
|
|
1777
|
+
|
|
1778
|
+
// src/animations/sliding_exits/slideOutDown.ts
|
|
1779
|
+
import { keyframes as keyframes73 } from "@emotion/react";
|
|
1780
|
+
var slideOutDown = keyframes73`
|
|
1781
|
+
from {
|
|
1782
|
+
transform: translate3d(0, 0, 0);
|
|
1783
|
+
}
|
|
1784
|
+
|
|
1785
|
+
to {
|
|
1786
|
+
visibility: hidden;
|
|
1787
|
+
transform: translate3d(0, 100%, 0);
|
|
1788
|
+
}
|
|
1789
|
+
`;
|
|
1790
|
+
|
|
1791
|
+
// src/animations/sliding_exits/slideOutLeft.ts
|
|
1792
|
+
import { keyframes as keyframes74 } from "@emotion/react";
|
|
1793
|
+
var slideOutLeft = keyframes74`
|
|
1794
|
+
from {
|
|
1795
|
+
transform: translate3d(0, 0, 0);
|
|
1796
|
+
}
|
|
1797
|
+
|
|
1798
|
+
to {
|
|
1799
|
+
visibility: hidden;
|
|
1800
|
+
transform: translate3d(-100%, 0, 0);
|
|
1801
|
+
}
|
|
1802
|
+
`;
|
|
1803
|
+
|
|
1804
|
+
// src/animations/sliding_exits/slideOutRight.ts
|
|
1805
|
+
import { keyframes as keyframes75 } from "@emotion/react";
|
|
1806
|
+
var slideOutRight = keyframes75`
|
|
1807
|
+
from {
|
|
1808
|
+
transform: translate3d(0, 0, 0);
|
|
1809
|
+
}
|
|
1810
|
+
|
|
1811
|
+
to {
|
|
1812
|
+
visibility: hidden;
|
|
1813
|
+
transform: translate3d(100%, 0, 0);
|
|
1814
|
+
}
|
|
1815
|
+
`;
|
|
1816
|
+
|
|
1817
|
+
// src/animations/sliding_exits/slideOutUp.ts
|
|
1818
|
+
import { keyframes as keyframes76 } from "@emotion/react";
|
|
1819
|
+
var slideOutUp = keyframes76`
|
|
1820
|
+
from {
|
|
1821
|
+
transform: translate3d(0, 0, 0);
|
|
1822
|
+
}
|
|
1823
|
+
|
|
1824
|
+
to {
|
|
1825
|
+
visibility: hidden;
|
|
1826
|
+
transform: translate3d(0, -100%, 0);
|
|
1827
|
+
}
|
|
1828
|
+
`;
|
|
1829
|
+
|
|
1830
|
+
// src/components/Slide.tsx
|
|
1831
|
+
import { jsx as jsx10 } from "@emotion/react/jsx-runtime";
|
|
1832
|
+
function getStyles7(reverse, direction) {
|
|
1833
|
+
switch (direction) {
|
|
1834
|
+
case "down":
|
|
1835
|
+
return reverse ? slideOutDown : slideInDown;
|
|
1836
|
+
case "right":
|
|
1837
|
+
return reverse ? slideOutRight : slideInRight;
|
|
1838
|
+
case "up":
|
|
1839
|
+
return reverse ? slideOutUp : slideInUp;
|
|
1840
|
+
case "left":
|
|
1841
|
+
default:
|
|
1842
|
+
return reverse ? slideOutLeft : slideInLeft;
|
|
1843
|
+
}
|
|
1844
|
+
}
|
|
1845
|
+
var Slide = (props) => {
|
|
1846
|
+
const { direction, reverse = false, ...rest } = props;
|
|
1847
|
+
const keyframes87 = useMemo8(
|
|
1848
|
+
() => getStyles7(reverse, direction),
|
|
1849
|
+
[direction, reverse]
|
|
1850
|
+
);
|
|
1851
|
+
return /* @__PURE__ */ jsx10(Reveal, {
|
|
1852
|
+
keyframes: keyframes87,
|
|
1853
|
+
...rest
|
|
1854
|
+
});
|
|
1855
|
+
};
|
|
1856
|
+
|
|
1857
|
+
// src/components/Zoom.tsx
|
|
1858
|
+
import { useMemo as useMemo9 } from "react";
|
|
1859
|
+
|
|
1860
|
+
// src/animations/zooming_entrances/zoomIn.ts
|
|
1861
|
+
import { keyframes as keyframes77 } from "@emotion/react";
|
|
1862
|
+
var zoomIn = keyframes77`
|
|
1863
|
+
from {
|
|
1864
|
+
opacity: 0;
|
|
1865
|
+
transform: scale3d(0.3, 0.3, 0.3);
|
|
1866
|
+
}
|
|
1867
|
+
|
|
1868
|
+
50% {
|
|
1869
|
+
opacity: 1;
|
|
1870
|
+
}
|
|
1871
|
+
`;
|
|
1872
|
+
|
|
1873
|
+
// src/animations/zooming_entrances/zoomInDown.ts
|
|
1874
|
+
import { keyframes as keyframes78 } from "@emotion/react";
|
|
1875
|
+
var zoomInDown = keyframes78`
|
|
1876
|
+
from {
|
|
1877
|
+
opacity: 0;
|
|
1878
|
+
transform: scale3d(0.1, 0.1, 0.1) translate3d(0, -1000px, 0);
|
|
1879
|
+
animation-timing-function: cubic-bezier(0.55, 0.055, 0.675, 0.19);
|
|
1880
|
+
}
|
|
1881
|
+
|
|
1882
|
+
60% {
|
|
1883
|
+
opacity: 1;
|
|
1884
|
+
transform: scale3d(0.475, 0.475, 0.475) translate3d(0, 60px, 0);
|
|
1885
|
+
animation-timing-function: cubic-bezier(0.175, 0.885, 0.32, 1);
|
|
1886
|
+
}
|
|
1887
|
+
`;
|
|
1888
|
+
|
|
1889
|
+
// src/animations/zooming_entrances/zoomInLeft.ts
|
|
1890
|
+
import { keyframes as keyframes79 } from "@emotion/react";
|
|
1891
|
+
var zoomInLeft = keyframes79`
|
|
1892
|
+
from {
|
|
1893
|
+
opacity: 0;
|
|
1894
|
+
transform: scale3d(0.1, 0.1, 0.1) translate3d(-1000px, 0, 0);
|
|
1895
|
+
animation-timing-function: cubic-bezier(0.55, 0.055, 0.675, 0.19);
|
|
1896
|
+
}
|
|
1897
|
+
|
|
1898
|
+
60% {
|
|
1899
|
+
opacity: 1;
|
|
1900
|
+
transform: scale3d(0.475, 0.475, 0.475) translate3d(10px, 0, 0);
|
|
1901
|
+
animation-timing-function: cubic-bezier(0.175, 0.885, 0.32, 1);
|
|
1902
|
+
}
|
|
1903
|
+
`;
|
|
1904
|
+
|
|
1905
|
+
// src/animations/zooming_entrances/zoomInRight.ts
|
|
1906
|
+
import { keyframes as keyframes80 } from "@emotion/react";
|
|
1907
|
+
var zoomInRight = keyframes80`
|
|
1908
|
+
from {
|
|
1909
|
+
opacity: 0;
|
|
1910
|
+
transform: scale3d(0.1, 0.1, 0.1) translate3d(1000px, 0, 0);
|
|
1911
|
+
animation-timing-function: cubic-bezier(0.55, 0.055, 0.675, 0.19);
|
|
1912
|
+
}
|
|
1913
|
+
|
|
1914
|
+
60% {
|
|
1915
|
+
opacity: 1;
|
|
1916
|
+
transform: scale3d(0.475, 0.475, 0.475) translate3d(-10px, 0, 0);
|
|
1917
|
+
animation-timing-function: cubic-bezier(0.175, 0.885, 0.32, 1);
|
|
1918
|
+
}
|
|
1919
|
+
`;
|
|
1920
|
+
|
|
1921
|
+
// src/animations/zooming_entrances/zoomInUp.ts
|
|
1922
|
+
import { keyframes as keyframes81 } from "@emotion/react";
|
|
1923
|
+
var zoomInUp = keyframes81`
|
|
1924
|
+
from {
|
|
1925
|
+
opacity: 0;
|
|
1926
|
+
transform: scale3d(0.1, 0.1, 0.1) translate3d(0, 1000px, 0);
|
|
1927
|
+
animation-timing-function: cubic-bezier(0.55, 0.055, 0.675, 0.19);
|
|
1928
|
+
}
|
|
1929
|
+
|
|
1930
|
+
60% {
|
|
1931
|
+
opacity: 1;
|
|
1932
|
+
transform: scale3d(0.475, 0.475, 0.475) translate3d(0, -60px, 0);
|
|
1933
|
+
animation-timing-function: cubic-bezier(0.175, 0.885, 0.32, 1);
|
|
1934
|
+
}
|
|
1935
|
+
`;
|
|
1936
|
+
|
|
1937
|
+
// src/animations/zooming_exits/zoomOut.ts
|
|
1938
|
+
import { keyframes as keyframes82 } from "@emotion/react";
|
|
1939
|
+
var zoomOut = keyframes82`
|
|
1940
|
+
from {
|
|
1941
|
+
opacity: 1;
|
|
1942
|
+
}
|
|
1943
|
+
|
|
1944
|
+
50% {
|
|
1945
|
+
opacity: 0;
|
|
1946
|
+
transform: scale3d(0.3, 0.3, 0.3);
|
|
1947
|
+
}
|
|
1948
|
+
|
|
1949
|
+
to {
|
|
1950
|
+
opacity: 0;
|
|
1951
|
+
}
|
|
1952
|
+
`;
|
|
1953
|
+
|
|
1954
|
+
// src/animations/zooming_exits/zoomOutDown.ts
|
|
1955
|
+
import { keyframes as keyframes83 } from "@emotion/react";
|
|
1956
|
+
var zoomOutDown = keyframes83`
|
|
1957
|
+
40% {
|
|
1958
|
+
opacity: 1;
|
|
1959
|
+
transform: scale3d(0.475, 0.475, 0.475) translate3d(0, -60px, 0);
|
|
1960
|
+
animation-timing-function: cubic-bezier(0.55, 0.055, 0.675, 0.19);
|
|
1961
|
+
}
|
|
1962
|
+
|
|
1963
|
+
to {
|
|
1964
|
+
opacity: 0;
|
|
1965
|
+
transform: scale3d(0.1, 0.1, 0.1) translate3d(0, 2000px, 0);
|
|
1966
|
+
animation-timing-function: cubic-bezier(0.175, 0.885, 0.32, 1);
|
|
1967
|
+
}
|
|
1968
|
+
`;
|
|
1969
|
+
|
|
1970
|
+
// src/animations/zooming_exits/zoomOutLeft.ts
|
|
1971
|
+
import { keyframes as keyframes84 } from "@emotion/react";
|
|
1972
|
+
var zoomOutLeft = keyframes84`
|
|
1973
|
+
40% {
|
|
1974
|
+
opacity: 1;
|
|
1975
|
+
transform: scale3d(0.475, 0.475, 0.475) translate3d(42px, 0, 0);
|
|
1976
|
+
}
|
|
1977
|
+
|
|
1978
|
+
to {
|
|
1979
|
+
opacity: 0;
|
|
1980
|
+
transform: scale(0.1) translate3d(-2000px, 0, 0);
|
|
1981
|
+
}
|
|
1982
|
+
`;
|
|
1983
|
+
|
|
1984
|
+
// src/animations/zooming_exits/zoomOutRight.ts
|
|
1985
|
+
import { keyframes as keyframes85 } from "@emotion/react";
|
|
1986
|
+
var zoomOutRight = keyframes85`
|
|
1987
|
+
40% {
|
|
1988
|
+
opacity: 1;
|
|
1989
|
+
transform: scale3d(0.475, 0.475, 0.475) translate3d(-42px, 0, 0);
|
|
1990
|
+
}
|
|
1991
|
+
|
|
1992
|
+
to {
|
|
1993
|
+
opacity: 0;
|
|
1994
|
+
transform: scale(0.1) translate3d(2000px, 0, 0);
|
|
1995
|
+
}
|
|
1996
|
+
`;
|
|
1997
|
+
|
|
1998
|
+
// src/animations/zooming_exits/zoomOutUp.ts
|
|
1999
|
+
import { keyframes as keyframes86 } from "@emotion/react";
|
|
2000
|
+
var zoomOutUp = keyframes86`
|
|
2001
|
+
40% {
|
|
2002
|
+
opacity: 1;
|
|
2003
|
+
transform: scale3d(0.475, 0.475, 0.475) translate3d(0, 60px, 0);
|
|
2004
|
+
animation-timing-function: cubic-bezier(0.55, 0.055, 0.675, 0.19);
|
|
2005
|
+
}
|
|
2006
|
+
|
|
2007
|
+
to {
|
|
2008
|
+
opacity: 0;
|
|
2009
|
+
transform: scale3d(0.1, 0.1, 0.1) translate3d(0, -2000px, 0);
|
|
2010
|
+
animation-timing-function: cubic-bezier(0.175, 0.885, 0.32, 1);
|
|
2011
|
+
}
|
|
2012
|
+
`;
|
|
2013
|
+
|
|
2014
|
+
// src/components/Zoom.tsx
|
|
2015
|
+
import { jsx as jsx11 } from "@emotion/react/jsx-runtime";
|
|
2016
|
+
function getStyles8(reverse, direction) {
|
|
2017
|
+
switch (direction) {
|
|
2018
|
+
case "down":
|
|
2019
|
+
return reverse ? zoomOutDown : zoomInDown;
|
|
2020
|
+
case "left":
|
|
2021
|
+
return reverse ? zoomOutLeft : zoomInLeft;
|
|
2022
|
+
case "right":
|
|
2023
|
+
return reverse ? zoomOutRight : zoomInRight;
|
|
2024
|
+
case "up":
|
|
2025
|
+
return reverse ? zoomOutUp : zoomInUp;
|
|
2026
|
+
default:
|
|
2027
|
+
return reverse ? zoomOut : zoomIn;
|
|
2028
|
+
}
|
|
2029
|
+
}
|
|
2030
|
+
var Zoom = (props) => {
|
|
2031
|
+
const { direction, reverse = false, ...rest } = props;
|
|
2032
|
+
const keyframes87 = useMemo9(
|
|
2033
|
+
() => getStyles8(reverse, direction),
|
|
2034
|
+
[direction, reverse]
|
|
2035
|
+
);
|
|
2036
|
+
return /* @__PURE__ */ jsx11(Reveal, {
|
|
2037
|
+
keyframes: keyframes87,
|
|
2038
|
+
...rest
|
|
2039
|
+
});
|
|
2040
|
+
};
|
|
2041
|
+
export {
|
|
2042
|
+
AttentionSeeker,
|
|
2043
|
+
Bounce,
|
|
2044
|
+
Fade,
|
|
2045
|
+
Flip,
|
|
2046
|
+
Hinge,
|
|
2047
|
+
JackInTheBox,
|
|
2048
|
+
Reveal,
|
|
2049
|
+
Roll,
|
|
2050
|
+
Rotate,
|
|
2051
|
+
Slide,
|
|
2052
|
+
Zoom,
|
|
2053
|
+
Reveal as default
|
|
2054
|
+
};
|
|
2055
|
+
//# sourceMappingURL=index.mjs.map
|