@readdy/anim 0.0.21 → 0.0.26

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.
Files changed (104) hide show
  1. package/animations/button/confetti-button/index.js +1 -1
  2. package/animations/button/confetti-button/react.tsx +5 -3
  3. package/animations/card/magic-ui-border-beam/index.js +26 -0
  4. package/animations/card/magic-ui-border-beam/react.tsx +8 -0
  5. package/animations/card/magic-ui-border-beam/style.css +1 -0
  6. package/animations/header/blur-to-sharp-rise/index.js +14 -0
  7. package/animations/header/blur-to-sharp-rise/react.tsx +6 -0
  8. package/animations/header/blur-to-sharp-rise/style.css +1 -0
  9. package/animations/header/gradient-text/index.js +36 -0
  10. package/animations/header/gradient-text/style.css +17 -5
  11. package/animations/header/shimmer-text/index.js +36 -0
  12. package/animations/header/shimmer-text/style.css +16 -5
  13. package/dist/button/3d-flip/react.js +3 -3
  14. package/dist/button/3d-flip.js +3 -3
  15. package/dist/button/blur-fade-in/react.js +1 -1
  16. package/dist/button/blur-fade-in.js +1 -1
  17. package/dist/button/border-beam/react.js +2 -2
  18. package/dist/button/border-beam.js +1 -1
  19. package/dist/button/bounce-elastic/react.js +1 -1
  20. package/dist/button/bounce-elastic.js +1 -1
  21. package/dist/button/bubble-button/react.js +2 -2
  22. package/dist/button/bubble-button.js +2 -2
  23. package/dist/button/confetti-button/react.js +6 -6
  24. package/dist/button/confetti-button.js +3 -3
  25. package/dist/button/glow-cta/react.js +3 -3
  26. package/dist/button/glow-cta.js +3 -3
  27. package/dist/button/magnetic-hover/react.js +3 -3
  28. package/dist/button/magnetic-hover.js +3 -3
  29. package/dist/button/pulse/react.js +1 -1
  30. package/dist/button/pulse.js +1 -1
  31. package/dist/button/rainbow-button/react.js +1 -1
  32. package/dist/button/rainbow-button.js +1 -1
  33. package/dist/button/shimmer-border/react.js +2 -2
  34. package/dist/button/shimmer-border.js +1 -1
  35. package/dist/button/sketch-button/react.js +2 -2
  36. package/dist/button/sketch-button.js +1 -1
  37. package/dist/card/blur-rise/react.js +1 -1
  38. package/dist/card/blur-rise.js +1 -1
  39. package/dist/card/bounce-in-bottom/react.js +1 -1
  40. package/dist/card/bounce-in-bottom.js +1 -1
  41. package/dist/card/card-fan-spread/react.js +2 -2
  42. package/dist/card/card-fan-spread.js +2 -2
  43. package/dist/card/float-idle/react.js +1 -1
  44. package/dist/card/float-idle.js +1 -1
  45. package/dist/card/image-magnifier/react.js +4 -4
  46. package/dist/card/image-magnifier.js +4 -4
  47. package/dist/card/image-zoom-rotate/react.js +3 -3
  48. package/dist/card/image-zoom-rotate.js +2 -2
  49. package/dist/card/pop-in-stack/react.js +2 -2
  50. package/dist/card/pop-in-stack.js +1 -1
  51. package/dist/card/reveal-from-top/react.js +1 -1
  52. package/dist/card/reveal-from-top.js +1 -1
  53. package/dist/card/rgb-split-glitch/react.js +2 -2
  54. package/dist/card/rgb-split-glitch.js +1 -1
  55. package/dist/card/tilted-card/react.js +3 -3
  56. package/dist/card/tilted-card.js +3 -3
  57. package/dist/chunks/{text-split-D02jltVh.js → text-split-6ct2SEme.js} +1 -1
  58. package/dist/chunks/{text-split-frOR4UpH.js → text-split-CdeSt_Fu.js} +1 -1
  59. package/dist/full.css +1 -1
  60. package/dist/full.js +383 -249
  61. package/dist/header/anime-splittext/react.js +2 -2
  62. package/dist/header/anime-splittext.js +1 -1
  63. package/dist/header/bounce-in-down/react.js +3 -3
  64. package/dist/header/bounce-in-down.js +3 -3
  65. package/dist/header/fly-in-chars/react.js +3 -3
  66. package/dist/header/fly-in-chars.js +3 -3
  67. package/dist/header/gradient-text/react.js +1 -1
  68. package/dist/header/gradient-text.js +37 -1
  69. package/dist/header/letter-bounce/react.js +3 -3
  70. package/dist/header/letter-bounce.js +2 -2
  71. package/dist/header/roll-in/react.js +3 -3
  72. package/dist/header/roll-in.js +3 -3
  73. package/dist/header/shimmer-text/react.js +2 -2
  74. package/dist/header/shimmer-text.js +37 -1
  75. package/dist/header/shuffle/react.js +3 -3
  76. package/dist/header/shuffle.js +3 -3
  77. package/dist/header/split-text/react.js +3 -3
  78. package/dist/header/split-text.js +3 -3
  79. package/dist/header/text-type/react.js +2 -2
  80. package/dist/header/text-type.js +2 -2
  81. package/dist/header/word-curtain-reveal/react.js +2 -2
  82. package/dist/header/word-curtain-reveal.js +2 -2
  83. package/dist/meta.json +2 -2
  84. package/dist/metadata.json +71 -107
  85. package/dist/react.css +1 -1
  86. package/dist/types/animations/button/confetti-button/react.d.ts +2 -1
  87. package/dist/types/animations/card/magic-ui-border-beam/index.d.ts +3 -0
  88. package/dist/types/animations/card/magic-ui-border-beam/react.d.ts +5 -0
  89. package/dist/types/animations/header/blur-to-sharp-rise/index.d.ts +3 -0
  90. package/dist/types/animations/header/blur-to-sharp-rise/react.d.ts +4 -0
  91. package/dist/types/react-barrel.d.ts +2 -0
  92. package/dist/types/scripts/bundle-all.d.ts +1 -172
  93. package/dist/types/stories/blur-to-sharp-rise-header.stories.d.ts +4 -4
  94. package/dist/types/stories/magic-ui-border-beam-card.stories.d.ts +4 -4
  95. package/package.json +7 -1
  96. package/react-barrel.js +2 -0
  97. /package/dist/chunks/{constants-EnH6-Pz4.js → constants-B4SUCot6.js} +0 -0
  98. /package/dist/chunks/{constants-ZTHic1pf.js → constants-Ckf5cPIt.js} +0 -0
  99. /package/dist/chunks/{pointer-follow-B3RFnn_q.js → pointer-follow-BM2eyAGD.js} +0 -0
  100. /package/dist/chunks/{pointer-follow-BETANySn.js → pointer-follow-p3-xoxQh.js} +0 -0
  101. /package/dist/chunks/{reduced-motion-BpQYuEzK.js → reduced-motion-Bay2Fxcs.js} +0 -0
  102. /package/dist/chunks/{reduced-motion-HX79Ac8G.js → reduced-motion-CZ_p2Mh_.js} +0 -0
  103. /package/dist/chunks/{resolve-card-media-Cj3V_oms.js → resolve-card-media-C0BoIACv.js} +0 -0
  104. /package/dist/chunks/{resolve-card-media-DBIU-duL.js → resolve-card-media-cXysS2d2.js} +0 -0
@@ -39,7 +39,7 @@ export function init(el, options = {}) {
39
39
  el.classList.add(CSS_CLASS)
40
40
 
41
41
  const onClick = () => {
42
- if (prefersReducedMotion()) {
42
+ if (options.respectReducedMotion !== false && prefersReducedMotion()) {
43
43
  return
44
44
  }
45
45
  const timeoutId = createBurst(el, options)
@@ -6,25 +6,27 @@ type AnimConfettiButtonProps = {
6
6
  children: React.ReactElement
7
7
  pieces?: number
8
8
  colors?: string[]
9
+ respectReducedMotion?: boolean
9
10
  }
10
11
 
11
12
  export function AnimConfettiButton({
12
13
  children,
13
14
  pieces,
14
15
  colors,
16
+ respectReducedMotion = true,
15
17
  }: AnimConfettiButtonProps) {
16
18
  const ref = useRef<HTMLElement>(null)
17
19
  const colorsKey = colors?.join('\u0001') ?? ''
18
20
 
19
21
  useEffect(() => {
20
22
  const el = ref.current
21
- if (!el || prefersReducedMotion()) return
23
+ if (!el || (respectReducedMotion && prefersReducedMotion())) return
22
24
 
23
- init(el, { pieces, colors })
25
+ init(el, { pieces, colors, respectReducedMotion })
24
26
  return () => {
25
27
  destroy(el)
26
28
  }
27
- }, [colorsKey, pieces])
29
+ }, [colorsKey, pieces, respectReducedMotion])
28
30
 
29
31
  return React.cloneElement(React.Children.only(children), { ref })
30
32
  }
@@ -0,0 +1,26 @@
1
+ import { buildAnimId } from '../../../shared/constants.js'
2
+ import { init as initBorderBeam, destroy as destroyBorderBeam } from '../../button/border-beam/index.js'
3
+
4
+ export const ANIMATION_ID = buildAnimId('magic-ui-border-beam')
5
+
6
+ import './style.css'
7
+
8
+ export function init(el, options = {}) {
9
+ initBorderBeam(el, {
10
+ duration: options.duration ?? 3000,
11
+ delay: options.delay ?? 0,
12
+ borderWidth: options.borderWidth ?? 1.35,
13
+ glowOpacity: options.glowOpacity ?? 0.28,
14
+ size: options.size,
15
+ initialOffset: options.initialOffset ?? 0,
16
+ colorFrom: options.colorFrom ?? '#ff6b6b',
17
+ colorTo: options.colorTo ?? '#ffb86b',
18
+ secondaryColorFrom: options.secondaryColorFrom ?? '#5ea0ff',
19
+ secondaryColorTo: options.secondaryColorTo ?? '#9ec5ff',
20
+ reverse: options.reverse ?? false,
21
+ })
22
+ }
23
+
24
+ export function destroy(el) {
25
+ destroyBorderBeam(el)
26
+ }
@@ -0,0 +1,8 @@
1
+ import React from 'react'
2
+ import { AnimBorderBeam } from '../../button/border-beam/react'
3
+
4
+ type AnimMagicUIBorderBeamProps = React.ComponentProps<typeof AnimBorderBeam>
5
+
6
+ export function AnimMagicUIBorderBeam(props: AnimMagicUIBorderBeamProps) {
7
+ return <AnimBorderBeam {...props} />
8
+ }
@@ -0,0 +1 @@
1
+ @import "../../button/border-beam/style.css";
@@ -0,0 +1,14 @@
1
+ import { buildAnimId } from '../../../shared/constants.js'
2
+ import { init as initBlurRise, destroy as destroyBlurRise } from '../../card/blur-rise/index.js'
3
+
4
+ export const ANIMATION_ID = buildAnimId('blur-to-sharp-rise')
5
+
6
+ import './style.css'
7
+
8
+ export function init(el, options = {}) {
9
+ initBlurRise(el, options)
10
+ }
11
+
12
+ export function destroy(el) {
13
+ destroyBlurRise(el)
14
+ }
@@ -0,0 +1,6 @@
1
+ import React from 'react'
2
+ import { AnimBlurRise } from '../../card/blur-rise/react'
3
+
4
+ export function AnimBlurToSharpRise({ children }: { children: React.ReactElement }) {
5
+ return <AnimBlurRise>{children}</AnimBlurRise>
6
+ }
@@ -0,0 +1 @@
1
+ @import "../../card/blur-rise/style.css";
@@ -9,13 +9,49 @@ export const ANIMATION_ID = buildAnimId('gradient-text')
9
9
  import './style.css'
10
10
 
11
11
  const CSS_CLASS = buildAnimClass('gradient-text')
12
+ const UNIT_CLASS = buildAnimClass('gradient-text-unit')
13
+
14
+ function wrapTextNodes(el) {
15
+ if (!el.dataset.originalText) {
16
+ el.dataset.originalText = el.innerHTML
17
+ }
18
+
19
+ const walker = document.createTreeWalker(el, NodeFilter.SHOW_TEXT)
20
+ const textNodes = []
21
+ let node = walker.nextNode()
22
+
23
+ while (node) {
24
+ textNodes.push(node)
25
+ node = walker.nextNode()
26
+ }
27
+
28
+ for (const textNode of textNodes) {
29
+ const text = textNode.textContent ?? ''
30
+ if (!text.trim()) {
31
+ continue
32
+ }
33
+
34
+ const span = document.createElement('span')
35
+ span.className = UNIT_CLASS
36
+ span.textContent = text
37
+ textNode.parentNode?.replaceChild(span, textNode)
38
+ }
39
+ }
12
40
 
13
41
  export function init(el, options = {}) {
42
+ destroy(el)
43
+
14
44
  if (!el.classList.contains(CSS_CLASS)) {
15
45
  el.classList.add(CSS_CLASS)
16
46
  }
47
+
48
+ wrapTextNodes(el)
17
49
  }
18
50
 
19
51
  export function destroy(el) {
20
52
  el.classList.remove(CSS_CLASS)
53
+ if (el.dataset.originalText) {
54
+ el.innerHTML = el.dataset.originalText
55
+ delete el.dataset.originalText
56
+ }
21
57
  }
@@ -11,17 +11,29 @@
11
11
  }
12
12
 
13
13
  .readdy-anim-gradient-text {
14
+ color: inherit;
15
+ }
16
+
17
+ .readdy-anim-gradient-text-unit {
18
+ color: #0f172a;
19
+ display: inline;
14
20
  background: linear-gradient(90deg, #22d3ee 0%, #a78bfa 35%, #f472b6 50%, #a78bfa 65%, #22d3ee 100%);
15
21
  background-size: 200% 100%;
16
- -webkit-background-clip: text;
17
- background-clip: text;
18
- -webkit-text-fill-color: transparent;
19
- color: transparent;
22
+ background-position: 0% center;
20
23
  animation: readdy-anim-gradient-flow 3s ease-in-out infinite alternate;
21
24
  }
22
25
 
26
+ @supports ((-webkit-background-clip: text) or (background-clip: text)) {
27
+ .readdy-anim-gradient-text-unit {
28
+ -webkit-background-clip: text;
29
+ background-clip: text;
30
+ -webkit-text-fill-color: transparent;
31
+ color: transparent;
32
+ }
33
+ }
34
+
23
35
  @media (prefers-reduced-motion: reduce) {
24
- .readdy-anim-gradient-text {
36
+ .readdy-anim-gradient-text-unit {
25
37
  animation: none;
26
38
  background-position: 0 0;
27
39
  }
@@ -4,13 +4,49 @@ import { buildAnimClass, buildAnimId } from '../../../shared/constants.js'
4
4
  export const ANIMATION_ID = buildAnimId('shimmer-text')
5
5
 
6
6
  const CSS_CLASS = buildAnimClass('shimmer-text')
7
+ const UNIT_CLASS = buildAnimClass('shimmer-text-unit')
8
+
9
+ function wrapTextNodes(el) {
10
+ if (!el.dataset.originalText) {
11
+ el.dataset.originalText = el.innerHTML
12
+ }
13
+
14
+ const walker = document.createTreeWalker(el, NodeFilter.SHOW_TEXT)
15
+ const textNodes = []
16
+ let node = walker.nextNode()
17
+
18
+ while (node) {
19
+ textNodes.push(node)
20
+ node = walker.nextNode()
21
+ }
22
+
23
+ for (const textNode of textNodes) {
24
+ const text = textNode.textContent ?? ''
25
+ if (!text.trim()) {
26
+ continue
27
+ }
28
+
29
+ const span = document.createElement('span')
30
+ span.className = UNIT_CLASS
31
+ span.textContent = text
32
+ textNode.parentNode?.replaceChild(span, textNode)
33
+ }
34
+ }
7
35
 
8
36
  export function init(el) {
37
+ destroy(el)
38
+
9
39
  if (!el.classList.contains(CSS_CLASS)) {
10
40
  el.classList.add(CSS_CLASS)
11
41
  }
42
+
43
+ wrapTextNodes(el)
12
44
  }
13
45
 
14
46
  export function destroy(el) {
15
47
  el.classList.remove(CSS_CLASS)
48
+ if (el.dataset.originalText) {
49
+ el.innerHTML = el.dataset.originalText
50
+ delete el.dataset.originalText
51
+ }
16
52
  }
@@ -5,6 +5,12 @@
5
5
  }
6
6
 
7
7
  .readdy-anim-shimmer-text {
8
+ color: inherit;
9
+ }
10
+
11
+ .readdy-anim-shimmer-text-unit {
12
+ color: #334155;
13
+ display: inline;
8
14
  background: linear-gradient(
9
15
  90deg,
10
16
  #334155 0%,
@@ -15,15 +21,20 @@
15
21
  );
16
22
  background-size: 200% 100%;
17
23
  background-position: 0% center;
18
- -webkit-background-clip: text;
19
- background-clip: text;
20
- color: transparent;
21
- -webkit-text-fill-color: transparent;
22
24
  animation: readdy-anim-shimmer-text 2.2s linear infinite;
23
25
  }
24
26
 
27
+ @supports ((-webkit-background-clip: text) or (background-clip: text)) {
28
+ .readdy-anim-shimmer-text-unit {
29
+ -webkit-background-clip: text;
30
+ background-clip: text;
31
+ color: transparent;
32
+ -webkit-text-fill-color: transparent;
33
+ }
34
+ }
35
+
25
36
  @media (prefers-reduced-motion: reduce) {
26
- .readdy-anim-shimmer-text {
37
+ .readdy-anim-shimmer-text-unit {
27
38
  animation: none;
28
39
  }
29
40
  }
@@ -1,8 +1,8 @@
1
1
  import React, { useRef, useEffect } from 'react';
2
2
  import { init, destroy } from '../3d-flip.js';
3
- import { p as prefersReducedMotion } from '../../chunks/reduced-motion-HX79Ac8G.js';
4
- import '../../chunks/pointer-follow-BETANySn.js';
5
- import '../../chunks/constants-EnH6-Pz4.js';
3
+ import { p as prefersReducedMotion } from '../../chunks/reduced-motion-Bay2Fxcs.js';
4
+ import '../../chunks/pointer-follow-p3-xoxQh.js';
5
+ import '../../chunks/constants-Ckf5cPIt.js';
6
6
 
7
7
  function Anim3DFlip({ children, maxTilt, translate, }) {
8
8
  const ref = useRef(null);
@@ -1,6 +1,6 @@
1
- import { p as prefersReducedMotion } from '../chunks/reduced-motion-HX79Ac8G.js';
2
- import { a as attachPointerFollow, g as getPointerMetrics } from '../chunks/pointer-follow-BETANySn.js';
3
- import { b as buildAnimId, a as buildAnimClass } from '../chunks/constants-EnH6-Pz4.js';
1
+ import { p as prefersReducedMotion } from '../chunks/reduced-motion-Bay2Fxcs.js';
2
+ import { a as attachPointerFollow, g as getPointerMetrics } from '../chunks/pointer-follow-p3-xoxQh.js';
3
+ import { b as buildAnimId, a as buildAnimClass } from '../chunks/constants-Ckf5cPIt.js';
4
4
 
5
5
  const ANIMATION_ID = buildAnimId('3d-flip');
6
6
 
@@ -1,6 +1,6 @@
1
1
  import React, { useRef, useEffect } from 'react';
2
2
  import { init, destroy } from '../blur-fade-in.js';
3
- import '../../chunks/constants-EnH6-Pz4.js';
3
+ import '../../chunks/constants-Ckf5cPIt.js';
4
4
 
5
5
  /**
6
6
  * Blur Fade In — 按钮模糊淡入
@@ -1,4 +1,4 @@
1
- import { b as buildAnimId, a as buildAnimClass } from '../chunks/constants-EnH6-Pz4.js';
1
+ import { b as buildAnimId, a as buildAnimClass } from '../chunks/constants-Ckf5cPIt.js';
2
2
 
3
3
  const ANIMATION_ID = buildAnimId('blur-fade-in');
4
4
 
@@ -1,7 +1,7 @@
1
1
  import React, { useRef, useEffect } from 'react';
2
- import { p as prefersReducedMotion } from '../../chunks/reduced-motion-HX79Ac8G.js';
2
+ import { p as prefersReducedMotion } from '../../chunks/reduced-motion-Bay2Fxcs.js';
3
3
  import { init, destroy } from '../border-beam.js';
4
- import '../../chunks/constants-EnH6-Pz4.js';
4
+ import '../../chunks/constants-Ckf5cPIt.js';
5
5
 
6
6
  function AnimBorderBeam({ children, duration, delay, borderWidth, glowOpacity, size, initialOffset, colorFrom, colorTo, reverse, respectReducedMotion = true, }) {
7
7
  const ref = useRef(null);
@@ -1,4 +1,4 @@
1
- import { b as buildAnimId, a as buildAnimClass } from '../chunks/constants-EnH6-Pz4.js';
1
+ import { b as buildAnimId, a as buildAnimClass } from '../chunks/constants-Ckf5cPIt.js';
2
2
 
3
3
  const ANIMATION_ID = buildAnimId('border-beam');
4
4
 
@@ -1,6 +1,6 @@
1
1
  import React, { useRef, useEffect } from 'react';
2
2
  import { init, destroy } from '../bounce-elastic.js';
3
- import '../../chunks/constants-EnH6-Pz4.js';
3
+ import '../../chunks/constants-Ckf5cPIt.js';
4
4
 
5
5
  /**
6
6
  * Bounce Elastic — 按钮弹性弹入
@@ -1,4 +1,4 @@
1
- import { b as buildAnimId, a as buildAnimClass } from '../chunks/constants-EnH6-Pz4.js';
1
+ import { b as buildAnimId, a as buildAnimClass } from '../chunks/constants-Ckf5cPIt.js';
2
2
 
3
3
  const ANIMATION_ID = buildAnimId('bounce-elastic');
4
4
 
@@ -1,7 +1,7 @@
1
1
  import React, { useRef, useEffect } from 'react';
2
2
  import { init, destroy } from '../bubble-button.js';
3
- import { p as prefersReducedMotion } from '../../chunks/reduced-motion-HX79Ac8G.js';
4
- import '../../chunks/constants-EnH6-Pz4.js';
3
+ import { p as prefersReducedMotion } from '../../chunks/reduced-motion-Bay2Fxcs.js';
4
+ import '../../chunks/constants-Ckf5cPIt.js';
5
5
 
6
6
  function AnimBubbleButton({ children }) {
7
7
  const ref = useRef(null);
@@ -1,5 +1,5 @@
1
- import { p as prefersReducedMotion } from '../chunks/reduced-motion-HX79Ac8G.js';
2
- import { b as buildAnimId, a as buildAnimClass, c as buildAnimDomId } from '../chunks/constants-EnH6-Pz4.js';
1
+ import { p as prefersReducedMotion } from '../chunks/reduced-motion-Bay2Fxcs.js';
2
+ import { b as buildAnimId, a as buildAnimClass, c as buildAnimDomId } from '../chunks/constants-Ckf5cPIt.js';
3
3
 
4
4
  const ANIMATION_ID = buildAnimId('bubble-button');
5
5
 
@@ -1,20 +1,20 @@
1
1
  import React, { useRef, useEffect } from 'react';
2
2
  import { init, destroy } from '../confetti-button.js';
3
- import { p as prefersReducedMotion } from '../../chunks/reduced-motion-HX79Ac8G.js';
4
- import '../../chunks/constants-EnH6-Pz4.js';
3
+ import { p as prefersReducedMotion } from '../../chunks/reduced-motion-Bay2Fxcs.js';
4
+ import '../../chunks/constants-Ckf5cPIt.js';
5
5
 
6
- function AnimConfettiButton({ children, pieces, colors, }) {
6
+ function AnimConfettiButton({ children, pieces, colors, respectReducedMotion = true, }) {
7
7
  const ref = useRef(null);
8
8
  const colorsKey = colors?.join('\u0001') ?? '';
9
9
  useEffect(() => {
10
10
  const el = ref.current;
11
- if (!el || prefersReducedMotion())
11
+ if (!el || (respectReducedMotion && prefersReducedMotion()))
12
12
  return;
13
- init(el, { pieces, colors });
13
+ init(el, { pieces, colors, respectReducedMotion });
14
14
  return () => {
15
15
  destroy(el);
16
16
  };
17
- }, [colorsKey, pieces]);
17
+ }, [colorsKey, pieces, respectReducedMotion]);
18
18
  return React.cloneElement(React.Children.only(children), { ref });
19
19
  }
20
20
 
@@ -1,5 +1,5 @@
1
- import { p as prefersReducedMotion } from '../chunks/reduced-motion-HX79Ac8G.js';
2
- import { b as buildAnimId, a as buildAnimClass } from '../chunks/constants-EnH6-Pz4.js';
1
+ import { p as prefersReducedMotion } from '../chunks/reduced-motion-Bay2Fxcs.js';
2
+ import { b as buildAnimId, a as buildAnimClass } from '../chunks/constants-Ckf5cPIt.js';
3
3
 
4
4
  const ANIMATION_ID = buildAnimId('confetti-button');
5
5
 
@@ -38,7 +38,7 @@ function init(el, options = {}) {
38
38
  el.classList.add(CSS_CLASS);
39
39
 
40
40
  const onClick = () => {
41
- if (prefersReducedMotion()) {
41
+ if (options.respectReducedMotion !== false && prefersReducedMotion()) {
42
42
  return
43
43
  }
44
44
  const timeoutId = createBurst(el, options);
@@ -1,8 +1,8 @@
1
1
  import React, { useRef, useEffect } from 'react';
2
2
  import { init, destroy } from '../glow-cta.js';
3
- import { p as prefersReducedMotion } from '../../chunks/reduced-motion-HX79Ac8G.js';
4
- import '../../chunks/constants-EnH6-Pz4.js';
5
- import '../../chunks/pointer-follow-BETANySn.js';
3
+ import { p as prefersReducedMotion } from '../../chunks/reduced-motion-Bay2Fxcs.js';
4
+ import '../../chunks/constants-Ckf5cPIt.js';
5
+ import '../../chunks/pointer-follow-p3-xoxQh.js';
6
6
 
7
7
  function AnimGlowCta({ children, scale, arrowPadding, idleOpacity, activeOpacity, inset, }) {
8
8
  const ref = useRef(null);
@@ -1,6 +1,6 @@
1
- import { b as buildAnimId, a as buildAnimClass } from '../chunks/constants-EnH6-Pz4.js';
2
- import { p as prefersReducedMotion } from '../chunks/reduced-motion-HX79Ac8G.js';
3
- import { a as attachPointerFollow } from '../chunks/pointer-follow-BETANySn.js';
1
+ import { b as buildAnimId, a as buildAnimClass } from '../chunks/constants-Ckf5cPIt.js';
2
+ import { p as prefersReducedMotion } from '../chunks/reduced-motion-Bay2Fxcs.js';
3
+ import { a as attachPointerFollow } from '../chunks/pointer-follow-p3-xoxQh.js';
4
4
 
5
5
  const ANIMATION_ID = buildAnimId('glow-cta');
6
6
 
@@ -1,8 +1,8 @@
1
1
  import React, { useRef, useEffect } from 'react';
2
2
  import { init, destroy } from '../magnetic-hover.js';
3
- import { p as prefersReducedMotion } from '../../chunks/reduced-motion-HX79Ac8G.js';
4
- import '../../chunks/pointer-follow-BETANySn.js';
5
- import '../../chunks/constants-EnH6-Pz4.js';
3
+ import { p as prefersReducedMotion } from '../../chunks/reduced-motion-Bay2Fxcs.js';
4
+ import '../../chunks/pointer-follow-p3-xoxQh.js';
5
+ import '../../chunks/constants-Ckf5cPIt.js';
6
6
 
7
7
  function AnimMagneticHover({ children, padding, strength, }) {
8
8
  const ref = useRef(null);
@@ -1,6 +1,6 @@
1
- import { p as prefersReducedMotion } from '../chunks/reduced-motion-HX79Ac8G.js';
2
- import { a as attachPointerFollow, g as getPointerMetrics } from '../chunks/pointer-follow-BETANySn.js';
3
- import { b as buildAnimId, a as buildAnimClass } from '../chunks/constants-EnH6-Pz4.js';
1
+ import { p as prefersReducedMotion } from '../chunks/reduced-motion-Bay2Fxcs.js';
2
+ import { a as attachPointerFollow, g as getPointerMetrics } from '../chunks/pointer-follow-p3-xoxQh.js';
3
+ import { b as buildAnimId, a as buildAnimClass } from '../chunks/constants-Ckf5cPIt.js';
4
4
 
5
5
  const ANIMATION_ID = buildAnimId('magnetic-hover');
6
6
 
@@ -1,6 +1,6 @@
1
1
  import React, { useRef, useEffect } from 'react';
2
2
  import { init, destroy } from '../pulse.js';
3
- import '../../chunks/constants-EnH6-Pz4.js';
3
+ import '../../chunks/constants-Ckf5cPIt.js';
4
4
 
5
5
  /**
6
6
  * Pulse — 按钮持续脉冲
@@ -1,4 +1,4 @@
1
- import { b as buildAnimId, a as buildAnimClass } from '../chunks/constants-EnH6-Pz4.js';
1
+ import { b as buildAnimId, a as buildAnimClass } from '../chunks/constants-Ckf5cPIt.js';
2
2
 
3
3
  const ANIMATION_ID = buildAnimId('pulse');
4
4
 
@@ -1,6 +1,6 @@
1
1
  import React, { useRef, useEffect } from 'react';
2
2
  import { init, destroy } from '../rainbow-button.js';
3
- import '../../chunks/constants-EnH6-Pz4.js';
3
+ import '../../chunks/constants-Ckf5cPIt.js';
4
4
 
5
5
  /**
6
6
  * Rainbow Button — 彩虹按钮
@@ -1,4 +1,4 @@
1
- import { b as buildAnimId, a as buildAnimClass } from '../chunks/constants-EnH6-Pz4.js';
1
+ import { b as buildAnimId, a as buildAnimClass } from '../chunks/constants-Ckf5cPIt.js';
2
2
 
3
3
  const ANIMATION_ID = buildAnimId('rainbow-button');
4
4
 
@@ -1,7 +1,7 @@
1
1
  import React, { useRef, useEffect } from 'react';
2
- import { p as prefersReducedMotion } from '../../chunks/reduced-motion-HX79Ac8G.js';
2
+ import { p as prefersReducedMotion } from '../../chunks/reduced-motion-Bay2Fxcs.js';
3
3
  import { init, destroy } from '../shimmer-border.js';
4
- import '../../chunks/constants-EnH6-Pz4.js';
4
+ import '../../chunks/constants-Ckf5cPIt.js';
5
5
 
6
6
  function AnimShimmerBorder({ children, duration, borderWidth, opacity, }) {
7
7
  const ref = useRef(null);
@@ -1,4 +1,4 @@
1
- import { b as buildAnimId, a as buildAnimClass } from '../chunks/constants-EnH6-Pz4.js';
1
+ import { b as buildAnimId, a as buildAnimClass } from '../chunks/constants-Ckf5cPIt.js';
2
2
 
3
3
  const ANIMATION_ID = buildAnimId('shimmer-border');
4
4
 
@@ -1,7 +1,7 @@
1
1
  import React, { useRef, useEffect } from 'react';
2
2
  import { init, destroy } from '../sketch-button.js';
3
- import { p as prefersReducedMotion } from '../../chunks/reduced-motion-HX79Ac8G.js';
4
- import '../../chunks/constants-EnH6-Pz4.js';
3
+ import { p as prefersReducedMotion } from '../../chunks/reduced-motion-Bay2Fxcs.js';
4
+ import '../../chunks/constants-Ckf5cPIt.js';
5
5
 
6
6
  function AnimSketchButton({ children }) {
7
7
  const ref = useRef(null);
@@ -1,4 +1,4 @@
1
- import { b as buildAnimId, a as buildAnimClass } from '../chunks/constants-EnH6-Pz4.js';
1
+ import { b as buildAnimId, a as buildAnimClass } from '../chunks/constants-Ckf5cPIt.js';
2
2
 
3
3
  const ANIMATION_ID = buildAnimId('sketch-button');
4
4
 
@@ -1,6 +1,6 @@
1
1
  import React, { useRef, useEffect } from 'react';
2
2
  import { init, destroy } from '../blur-rise.js';
3
- import '../../chunks/constants-EnH6-Pz4.js';
3
+ import '../../chunks/constants-Ckf5cPIt.js';
4
4
 
5
5
  /**
6
6
  * Blur Rise — 卡片从模糊中升起
@@ -1,4 +1,4 @@
1
- import { b as buildAnimId, a as buildAnimClass } from '../chunks/constants-EnH6-Pz4.js';
1
+ import { b as buildAnimId, a as buildAnimClass } from '../chunks/constants-Ckf5cPIt.js';
2
2
 
3
3
  const ANIMATION_ID = buildAnimId('blur-rise');
4
4
 
@@ -1,6 +1,6 @@
1
1
  import React, { useRef, useEffect } from 'react';
2
2
  import { init, destroy } from '../bounce-in-bottom.js';
3
- import '../../chunks/constants-EnH6-Pz4.js';
3
+ import '../../chunks/constants-Ckf5cPIt.js';
4
4
 
5
5
  /**
6
6
  * Bounce In Bottom — 卡片从底部弹入
@@ -1,4 +1,4 @@
1
- import { b as buildAnimId, a as buildAnimClass } from '../chunks/constants-EnH6-Pz4.js';
1
+ import { b as buildAnimId, a as buildAnimClass } from '../chunks/constants-Ckf5cPIt.js';
2
2
 
3
3
  const ANIMATION_ID = buildAnimId('bounce-in-bottom');
4
4
 
@@ -1,7 +1,7 @@
1
1
  import React, { useRef, useEffect } from 'react';
2
2
  import { init, destroy } from '../card-fan-spread.js';
3
- import { p as prefersReducedMotion } from '../../chunks/reduced-motion-HX79Ac8G.js';
4
- import '../../chunks/constants-EnH6-Pz4.js';
3
+ import { p as prefersReducedMotion } from '../../chunks/reduced-motion-Bay2Fxcs.js';
4
+ import '../../chunks/constants-Ckf5cPIt.js';
5
5
 
6
6
  function AnimCardFanSpread({ children, spreadDistance, spreadRotate, depthRotate, lift, duration, }) {
7
7
  const ref = useRef(null);
@@ -1,5 +1,5 @@
1
- import { p as prefersReducedMotion } from '../chunks/reduced-motion-HX79Ac8G.js';
2
- import { b as buildAnimId, a as buildAnimClass } from '../chunks/constants-EnH6-Pz4.js';
1
+ import { p as prefersReducedMotion } from '../chunks/reduced-motion-Bay2Fxcs.js';
2
+ import { b as buildAnimId, a as buildAnimClass } from '../chunks/constants-Ckf5cPIt.js';
3
3
 
4
4
  const ANIMATION_ID = buildAnimId('card-fan-spread');
5
5
 
@@ -1,6 +1,6 @@
1
1
  import React, { useRef, useEffect } from 'react';
2
2
  import { init, destroy } from '../float-idle.js';
3
- import '../../chunks/constants-EnH6-Pz4.js';
3
+ import '../../chunks/constants-Ckf5cPIt.js';
4
4
 
5
5
  /**
6
6
  * Float Idle — 卡片悬浮idle
@@ -1,4 +1,4 @@
1
- import { b as buildAnimId, a as buildAnimClass } from '../chunks/constants-EnH6-Pz4.js';
1
+ import { b as buildAnimId, a as buildAnimClass } from '../chunks/constants-Ckf5cPIt.js';
2
2
 
3
3
  const ANIMATION_ID = buildAnimId('float-idle');
4
4
 
@@ -1,9 +1,9 @@
1
1
  import React, { useRef, useEffect } from 'react';
2
2
  import { init, destroy } from '../image-magnifier.js';
3
- import { p as prefersReducedMotion } from '../../chunks/reduced-motion-HX79Ac8G.js';
4
- import '../../chunks/constants-EnH6-Pz4.js';
5
- import '../../chunks/pointer-follow-BETANySn.js';
6
- import '../../chunks/resolve-card-media-Cj3V_oms.js';
3
+ import { p as prefersReducedMotion } from '../../chunks/reduced-motion-Bay2Fxcs.js';
4
+ import '../../chunks/constants-Ckf5cPIt.js';
5
+ import '../../chunks/pointer-follow-p3-xoxQh.js';
6
+ import '../../chunks/resolve-card-media-C0BoIACv.js';
7
7
 
8
8
  function AnimImageMagnifier({ children, lensSize, zoom, fadeDuration, }) {
9
9
  const ref = useRef(null);