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