@fluentui/react-motion-components-preview 0.15.6 → 0.15.7

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 (118) hide show
  1. package/CHANGELOG.md +10 -1
  2. package/dist/index.d.cts +407 -0
  3. package/lib/atoms/blur-atom.js +1 -1
  4. package/lib/atoms/fade-atom.js +1 -1
  5. package/lib/atoms/rotate-atom.js +1 -1
  6. package/lib/atoms/scale-atom.js +1 -1
  7. package/lib/atoms/slide-atom.js +1 -1
  8. package/lib/choreography/Stagger/Stagger.js +3 -3
  9. package/lib/choreography/Stagger/Stagger.js.map +1 -1
  10. package/lib/choreography/Stagger/index.js +1 -1
  11. package/lib/choreography/Stagger/index.js.map +1 -1
  12. package/lib/choreography/Stagger/useStaggerItemsVisibility.js +3 -3
  13. package/lib/choreography/Stagger/useStaggerItemsVisibility.js.map +1 -1
  14. package/lib/choreography/Stagger/utils/constants.js +1 -1
  15. package/lib/choreography/Stagger/utils/getStaggerChildMapping.js +1 -1
  16. package/lib/choreography/Stagger/utils/index.js +4 -4
  17. package/lib/choreography/Stagger/utils/index.js.map +1 -1
  18. package/lib/choreography/Stagger/utils/stagger-calculations.js +1 -1
  19. package/lib/choreography/Stagger/utils/stagger-calculations.js.map +1 -1
  20. package/lib/components/Blur/Blur.js +3 -3
  21. package/lib/components/Blur/Blur.js.map +1 -1
  22. package/lib/components/Blur/index.js +1 -1
  23. package/lib/components/Blur/index.js.map +1 -1
  24. package/lib/components/Collapse/Collapse.js +3 -3
  25. package/lib/components/Collapse/Collapse.js.map +1 -1
  26. package/lib/components/Collapse/index.js +1 -1
  27. package/lib/components/Collapse/index.js.map +1 -1
  28. package/lib/components/Fade/Fade.js +2 -2
  29. package/lib/components/Fade/Fade.js.map +1 -1
  30. package/lib/components/Fade/index.js +1 -1
  31. package/lib/components/Fade/index.js.map +1 -1
  32. package/lib/components/Rotate/Rotate.js +3 -3
  33. package/lib/components/Rotate/Rotate.js.map +1 -1
  34. package/lib/components/Rotate/index.js +1 -1
  35. package/lib/components/Rotate/index.js.map +1 -1
  36. package/lib/components/Scale/Scale.js +3 -3
  37. package/lib/components/Scale/Scale.js.map +1 -1
  38. package/lib/components/Scale/index.js +1 -1
  39. package/lib/components/Scale/index.js.map +1 -1
  40. package/lib/components/Slide/Slide.js +3 -3
  41. package/lib/components/Slide/Slide.js.map +1 -1
  42. package/lib/components/Slide/index.js +1 -1
  43. package/lib/components/Slide/index.js.map +1 -1
  44. package/lib/index.js +12 -12
  45. package/lib/index.js.map +1 -1
  46. package/lib-commonjs/choreography/Stagger/{Stagger.js → Stagger.cjs} +2 -2
  47. package/lib-commonjs/choreography/Stagger/{index.js → index.cjs} +1 -1
  48. package/lib-commonjs/choreography/Stagger/{useStaggerItemsVisibility.js → useStaggerItemsVisibility.cjs} +1 -1
  49. package/lib-commonjs/choreography/Stagger/utils/{index.js → index.cjs} +4 -4
  50. package/lib-commonjs/choreography/Stagger/utils/{stagger-calculations.js → stagger-calculations.cjs} +1 -1
  51. package/lib-commonjs/components/Blur/{Blur.js → Blur.cjs} +2 -2
  52. package/lib-commonjs/components/Blur/{index.js → index.cjs} +1 -1
  53. package/lib-commonjs/components/Collapse/{Collapse.js → Collapse.cjs} +2 -2
  54. package/lib-commonjs/components/Collapse/{index.js → index.cjs} +1 -1
  55. package/lib-commonjs/components/Fade/{Fade.js → Fade.cjs} +1 -1
  56. package/lib-commonjs/components/Fade/{index.js → index.cjs} +1 -1
  57. package/lib-commonjs/components/Rotate/{Rotate.js → Rotate.cjs} +2 -2
  58. package/lib-commonjs/components/Rotate/{index.js → index.cjs} +1 -1
  59. package/lib-commonjs/components/Scale/{Scale.js → Scale.cjs} +2 -2
  60. package/lib-commonjs/components/Scale/{index.js → index.cjs} +1 -1
  61. package/lib-commonjs/components/Slide/{Slide.js → Slide.cjs} +2 -2
  62. package/lib-commonjs/components/Slide/{index.js → index.cjs} +1 -1
  63. package/lib-commonjs/{index.js → index.cjs} +12 -12
  64. package/package.json +13 -7
  65. /package/lib-commonjs/atoms/{blur-atom.js → blur-atom.cjs} +0 -0
  66. /package/lib-commonjs/atoms/{blur-atom.js.map → blur-atom.cjs.map} +0 -0
  67. /package/lib-commonjs/atoms/{fade-atom.js → fade-atom.cjs} +0 -0
  68. /package/lib-commonjs/atoms/{fade-atom.js.map → fade-atom.cjs.map} +0 -0
  69. /package/lib-commonjs/atoms/{rotate-atom.js → rotate-atom.cjs} +0 -0
  70. /package/lib-commonjs/atoms/{rotate-atom.js.map → rotate-atom.cjs.map} +0 -0
  71. /package/lib-commonjs/atoms/{scale-atom.js → scale-atom.cjs} +0 -0
  72. /package/lib-commonjs/atoms/{scale-atom.js.map → scale-atom.cjs.map} +0 -0
  73. /package/lib-commonjs/atoms/{slide-atom.js → slide-atom.cjs} +0 -0
  74. /package/lib-commonjs/atoms/{slide-atom.js.map → slide-atom.cjs.map} +0 -0
  75. /package/lib-commonjs/choreography/Stagger/{Stagger.js.map → Stagger.cjs.map} +0 -0
  76. /package/lib-commonjs/choreography/Stagger/{index.js.map → index.cjs.map} +0 -0
  77. /package/lib-commonjs/choreography/Stagger/{stagger-types.js → stagger-types.cjs} +0 -0
  78. /package/lib-commonjs/choreography/Stagger/{stagger-types.js.map → stagger-types.cjs.map} +0 -0
  79. /package/lib-commonjs/choreography/Stagger/{useStaggerItemsVisibility.js.map → useStaggerItemsVisibility.cjs.map} +0 -0
  80. /package/lib-commonjs/choreography/Stagger/utils/{constants.js → constants.cjs} +0 -0
  81. /package/lib-commonjs/choreography/Stagger/utils/{constants.js.map → constants.cjs.map} +0 -0
  82. /package/lib-commonjs/choreography/Stagger/utils/{getStaggerChildMapping.js → getStaggerChildMapping.cjs} +0 -0
  83. /package/lib-commonjs/choreography/Stagger/utils/{getStaggerChildMapping.js.map → getStaggerChildMapping.cjs.map} +0 -0
  84. /package/lib-commonjs/choreography/Stagger/utils/{index.js.map → index.cjs.map} +0 -0
  85. /package/lib-commonjs/choreography/Stagger/utils/{motionComponentDetection.js → motionComponentDetection.cjs} +0 -0
  86. /package/lib-commonjs/choreography/Stagger/utils/{motionComponentDetection.js.map → motionComponentDetection.cjs.map} +0 -0
  87. /package/lib-commonjs/choreography/Stagger/utils/{stagger-calculations.js.map → stagger-calculations.cjs.map} +0 -0
  88. /package/lib-commonjs/components/Blur/{Blur.js.map → Blur.cjs.map} +0 -0
  89. /package/lib-commonjs/components/Blur/{blur-types.js → blur-types.cjs} +0 -0
  90. /package/lib-commonjs/components/Blur/{blur-types.js.map → blur-types.cjs.map} +0 -0
  91. /package/lib-commonjs/components/Blur/{index.js.map → index.cjs.map} +0 -0
  92. /package/lib-commonjs/components/Collapse/{Collapse.js.map → Collapse.cjs.map} +0 -0
  93. /package/lib-commonjs/components/Collapse/{collapse-atoms.js → collapse-atoms.cjs} +0 -0
  94. /package/lib-commonjs/components/Collapse/{collapse-atoms.js.map → collapse-atoms.cjs.map} +0 -0
  95. /package/lib-commonjs/components/Collapse/{collapse-test-utils.js → collapse-test-utils.cjs} +0 -0
  96. /package/lib-commonjs/components/Collapse/{collapse-test-utils.js.map → collapse-test-utils.cjs.map} +0 -0
  97. /package/lib-commonjs/components/Collapse/{collapse-types.js → collapse-types.cjs} +0 -0
  98. /package/lib-commonjs/components/Collapse/{collapse-types.js.map → collapse-types.cjs.map} +0 -0
  99. /package/lib-commonjs/components/Collapse/{index.js.map → index.cjs.map} +0 -0
  100. /package/lib-commonjs/components/Fade/{Fade.js.map → Fade.cjs.map} +0 -0
  101. /package/lib-commonjs/components/Fade/{fade-types.js → fade-types.cjs} +0 -0
  102. /package/lib-commonjs/components/Fade/{fade-types.js.map → fade-types.cjs.map} +0 -0
  103. /package/lib-commonjs/components/Fade/{index.js.map → index.cjs.map} +0 -0
  104. /package/lib-commonjs/components/Rotate/{Rotate.js.map → Rotate.cjs.map} +0 -0
  105. /package/lib-commonjs/components/Rotate/{index.js.map → index.cjs.map} +0 -0
  106. /package/lib-commonjs/components/Rotate/{rotate-types.js → rotate-types.cjs} +0 -0
  107. /package/lib-commonjs/components/Rotate/{rotate-types.js.map → rotate-types.cjs.map} +0 -0
  108. /package/lib-commonjs/components/Scale/{Scale.js.map → Scale.cjs.map} +0 -0
  109. /package/lib-commonjs/components/Scale/{index.js.map → index.cjs.map} +0 -0
  110. /package/lib-commonjs/components/Scale/{scale-types.js → scale-types.cjs} +0 -0
  111. /package/lib-commonjs/components/Scale/{scale-types.js.map → scale-types.cjs.map} +0 -0
  112. /package/lib-commonjs/components/Slide/{Slide.js.map → Slide.cjs.map} +0 -0
  113. /package/lib-commonjs/components/Slide/{index.js.map → index.cjs.map} +0 -0
  114. /package/lib-commonjs/components/Slide/{slide-types.js → slide-types.cjs} +0 -0
  115. /package/lib-commonjs/components/Slide/{slide-types.js.map → slide-types.cjs.map} +0 -0
  116. /package/lib-commonjs/{index.js.map → index.cjs.map} +0 -0
  117. /package/lib-commonjs/{types.js → types.cjs} +0 -0
  118. /package/lib-commonjs/{types.js.map → types.cjs.map} +0 -0
package/CHANGELOG.md CHANGED
@@ -1,9 +1,18 @@
1
1
  # Change Log - @fluentui/react-motion-components-preview
2
2
 
3
- This log was last generated on Thu, 22 Jan 2026 17:06:32 GMT and should not be manually modified.
3
+ <!-- This log was last generated on Tue, 11 Aug 2026 17:16:02 GMT and should not be manually modified. -->
4
4
 
5
5
  <!-- Start content -->
6
6
 
7
+ ## [0.15.7](https://github.com/microsoft/fluentui/tree/@fluentui/react-motion-components-preview_v0.15.7)
8
+
9
+ Tue, 11 Aug 2026 17:16:02 GMT
10
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-motion-components-preview_v0.15.5..@fluentui/react-motion-components-preview_v0.15.7)
11
+
12
+ ### Patches
13
+
14
+ - Ship ESM-first (type:module): valid ESM under lib/, CommonJS under lib-commonjs/*.cjs, and drop the `node` export condition - bare-Node `import` resolves ESM, `require` resolves CJS; node-targeted bundlers tree-shake. ([PR #36327](https://github.com/microsoft/fluentui/pull/36327) by martinhochel@microsoft.com)
15
+
7
16
  ## [0.15.0](https://github.com/microsoft/fluentui/tree/@fluentui/react-motion-components-preview_v0.15.0)
8
17
 
9
18
  Thu, 22 Jan 2026 17:06:32 GMT
@@ -0,0 +1,407 @@
1
+ import type { AtomMotion } from '@fluentui/react-motion';
2
+ import { PresenceComponent } from '@fluentui/react-motion';
3
+ import type { PresenceComponentProps } from '@fluentui/react-motion';
4
+ import type { PresenceDirection } from '@fluentui/react-motion';
5
+ import * as React_2 from 'react';
6
+
7
+ /**
8
+ * Common opacity animation parameter for motion components.
9
+ */
10
+ declare type AnimateOpacity = {
11
+ /** Whether to animate the opacity. Defaults to `true`. */
12
+ animateOpacity?: boolean;
13
+ };
14
+
15
+ declare type Axis3D = 'x' | 'y' | 'z';
16
+
17
+ declare type Axis3D_2 = NonNullable<RotateParams['axis']>;
18
+
19
+ /**
20
+ * Common parameters shared by all atom functions.
21
+ */
22
+ declare type BaseAtomParams = {
23
+ /** The functional direction of the motion: 'enter' or 'exit'. */
24
+ direction: PresenceDirection;
25
+ /** The duration of the motion in milliseconds. */
26
+ duration: number;
27
+ /** The easing curve for the motion. */
28
+ easing?: EffectTiming['easing'];
29
+ /** Time (ms) to delay the animation. */
30
+ delay?: EffectTiming['delay'];
31
+ };
32
+
33
+ /**
34
+ * Base presence parameters combining duration, easing, and delay for motion components.
35
+ */
36
+ declare type BasePresenceParams = PresenceDuration & PresenceEasing & PresenceDelay;
37
+
38
+ /** A React component that applies blur in/out transitions to its children. */
39
+ export declare const Blur: PresenceComponent<BlurParams>;
40
+
41
+ /**
42
+ * Generates a motion atom object for a blur-in or blur-out.
43
+ * @param direction - The functional direction of the motion: 'enter' or 'exit'.
44
+ * @param duration - The duration of the motion in milliseconds.
45
+ * @param easing - The easing curve for the motion. Defaults to `motionTokens.curveLinear`.
46
+ * @param outRadius - Blur radius for the out state (exited) with units (e.g., '20px', '1rem'). Defaults to '10px'.
47
+ * @param inRadius - Blur radius for the in state (entered) with units (e.g., '0px', '5px'). Defaults to '0px'.
48
+ * @param delay - Time (ms) to delay the animation. Defaults to 0.
49
+ * @returns A motion atom object with filter blur keyframes and the supplied duration and easing.
50
+ */
51
+ export declare const blurAtom: ({ direction, duration, easing, delay, outRadius, inRadius, }: BlurAtomParams) => AtomMotion;
52
+
53
+ declare interface BlurAtomParams extends BaseAtomParams {
54
+ /** Blur radius for the out state (exited). Defaults to '10px'. */
55
+ outRadius?: string;
56
+ /** Blur radius for the in state (entered). Defaults to '0px'. */
57
+ inRadius?: string;
58
+ }
59
+
60
+ export declare type BlurParams = BasePresenceParams & AnimateOpacity & {
61
+ /** Blur radius for the out state (exited). Defaults to '10px'. */
62
+ outRadius?: string;
63
+ /** Blur radius for the in state (entered). Defaults to '0px'. */
64
+ inRadius?: string;
65
+ };
66
+
67
+ /** A React component that applies collapse/expand transitions to its children. */
68
+ export declare const Collapse: PresenceComponent<CollapseParams>;
69
+
70
+ /** A React component that applies collapse/expand transitions with delayed fade to its children. */
71
+ export declare const CollapseDelayed: PresenceComponent<CollapseParams>;
72
+
73
+ /**
74
+ * Duration properties for granular timing control in Collapse animations.
75
+ */
76
+ export declare type CollapseDurations = {
77
+ /** Time (ms) for the size animation during enter. Defaults to `duration` for unified timing. */
78
+ sizeDuration?: number;
79
+ /** Time (ms) for the opacity animation during enter. Defaults to `sizeDuration` for synchronized timing. */
80
+ opacityDuration?: number;
81
+ /** Time (ms) for the size animation during exit. Defaults to `exitDuration` for unified timing. */
82
+ exitSizeDuration?: number;
83
+ /** Time (ms) for the opacity animation during exit. Defaults to `exitSizeDuration` for synchronized timing. */
84
+ exitOpacityDuration?: number;
85
+ };
86
+
87
+ declare type CollapseOrientation = 'horizontal' | 'vertical';
88
+
89
+ export declare type CollapseParams = BasePresenceParams & AnimateOpacity & CollapseDurations & {
90
+ /** The orientation of the size animation. Defaults to `'vertical'` to expand/collapse the height. */
91
+ orientation?: CollapseOrientation;
92
+ /** Size for the out state (collapsed). Defaults to `'0px'`. */
93
+ outSize?: string;
94
+ /**
95
+ * Time (ms) to delay the inner stagger between size and opacity animations.
96
+ * On enter this delays the opacity after size; on exit this delays the size after opacity.
97
+ * Defaults to 0.
98
+ */
99
+ staggerDelay?: number;
100
+ /**
101
+ * Time (ms) to delay the inner stagger during exit. Defaults to the `staggerDelay` param for symmetry.
102
+ */
103
+ exitStaggerDelay?: number;
104
+ };
105
+
106
+ export declare const CollapseRelaxed: PresenceComponent<CollapseParams>;
107
+
108
+ export declare const CollapseSnappy: PresenceComponent<CollapseParams>;
109
+
110
+ /** A React component that applies fade in/out transitions to its children. */
111
+ export declare const Fade: PresenceComponent<FadeParams>;
112
+
113
+ /**
114
+ * Generates a motion atom object for a fade-in or fade-out.
115
+ * @param direction - The functional direction of the motion: 'enter' or 'exit'.
116
+ * @param duration - The duration of the motion in milliseconds.
117
+ * @param easing - The easing curve for the motion. Defaults to `motionTokens.curveLinear`.
118
+ * @param delay - The delay before the motion starts. Defaults to 0.
119
+ * @param outOpacity - Opacity for the out state (exited). Defaults to 0.
120
+ * @param inOpacity - Opacity for the in state (entered). Defaults to 1.
121
+ * @returns A motion atom object with opacity keyframes and the supplied duration and easing.
122
+ */
123
+ export declare const fadeAtom: ({ direction, duration, easing, delay, outOpacity, inOpacity, }: FadeAtomParams) => AtomMotion;
124
+
125
+ declare interface FadeAtomParams extends BaseAtomParams {
126
+ /** Defines how values are applied before and after execution. Defaults to 'both'. */
127
+ fill?: FillMode;
128
+ /** Opacity for the out state (exited). Defaults to 0. */
129
+ outOpacity?: number;
130
+ /** Opacity for the in state (entered). Defaults to 1. */
131
+ inOpacity?: number;
132
+ }
133
+
134
+ export declare type FadeParams = BasePresenceParams & {
135
+ /** Opacity for the out state (exited). Defaults to 0. */
136
+ outOpacity?: number;
137
+ /** Opacity for the in state (entered). Defaults to 1. */
138
+ inOpacity?: number;
139
+ };
140
+
141
+ export declare const FadeRelaxed: PresenceComponent<FadeParams>;
142
+
143
+ export declare const FadeSnappy: PresenceComponent<FadeParams>;
144
+
145
+ /**
146
+ * Common delay parameters for presence motion components.
147
+ */
148
+ declare type PresenceDelay = {
149
+ /** Time (ms) to delay the enter transition. */
150
+ delay?: EffectTiming['delay'];
151
+ /** Time (ms) to delay the exit transition. Defaults to the `delay` param for symmetry. */
152
+ exitDelay?: EffectTiming['delay'];
153
+ };
154
+
155
+ /**
156
+ * Common duration parameters for presence motion components.
157
+ */
158
+ declare type PresenceDuration = {
159
+ /** Time (ms) for the enter transition. */
160
+ duration?: number;
161
+ /** Time (ms) for the exit transition. Defaults to the `duration` param for symmetry. */
162
+ exitDuration?: number;
163
+ };
164
+
165
+ /**
166
+ * Common easing parameters for presence motion components.
167
+ */
168
+ declare type PresenceEasing = {
169
+ /** Easing curve for the enter transition. */
170
+ easing?: string;
171
+ /** Easing curve for the exit transition. Defaults to the `easing` param for symmetry. */
172
+ exitEasing?: string;
173
+ };
174
+
175
+ export declare const Rotate: PresenceComponent<RotateParams>;
176
+
177
+ /**
178
+ * Generates a motion atom object for a rotation around a single axis.
179
+ * @param direction - The functional direction of the motion: 'enter' or 'exit'.
180
+ * @param duration - The duration of the motion in milliseconds.
181
+ * @param easing - The easing curve for the motion. Defaults to `motionTokens.curveLinear`.
182
+ * @param axis - The axis of rotation: 'x', 'y', or 'z'. Defaults to 'y'.
183
+ * @param outAngle - Rotation angle for the out state (exited) in degrees. Defaults to -90.
184
+ * @param inAngle - Rotation angle for the in state (entered) in degrees. Defaults to 0.
185
+ * @param delay - Time (ms) to delay the animation. Defaults to 0.
186
+ * @returns A motion atom object with rotate keyframes and the supplied duration and easing.
187
+ */
188
+ export declare const rotateAtom: ({ direction, duration, easing, delay, axis, outAngle, inAngle, }: RotateAtomParams) => AtomMotion;
189
+
190
+ declare interface RotateAtomParams extends BaseAtomParams {
191
+ axis?: Axis3D_2;
192
+ /** Rotation angle for the out state (exited) in degrees. Defaults to -90. */
193
+ outAngle?: number;
194
+ /** Rotation angle for the in state (entered) in degrees. Defaults to 0. */
195
+ inAngle?: number;
196
+ }
197
+
198
+ export declare type RotateParams = BasePresenceParams & AnimateOpacity & {
199
+ /**
200
+ * The axis of rotation: 'x', 'y', or 'z'.
201
+ * Defaults to 'z'.
202
+ */
203
+ axis?: Axis3D;
204
+ /**
205
+ * Rotation angle for the out state (exited) in degrees.
206
+ * Defaults to -90.
207
+ */
208
+ outAngle?: number;
209
+ /**
210
+ * Rotation angle for the in state (entered) in degrees.
211
+ * Defaults to 0.
212
+ */
213
+ inAngle?: number;
214
+ };
215
+
216
+ /** A React component that applies scale in/out transitions to its children. */
217
+ export declare const Scale: PresenceComponent<ScaleParams>;
218
+
219
+ /**
220
+ * Generates a motion atom object for a scale in or scale out.
221
+ * @param direction - The functional direction of the motion: 'enter' or 'exit'.
222
+ * @param duration - The duration of the motion in milliseconds.
223
+ * @param easing - The easing curve for the motion. Defaults to `motionTokens.curveLinear`.
224
+ * @param outScale - Scale for the out state (exited). Defaults to 0.9.
225
+ * @param inScale - Scale for the in state (entered). Defaults to 1.
226
+ * @param delay - Time (ms) to delay the animation. Defaults to 0.
227
+ * @returns A motion atom object with scale keyframes and the supplied duration and easing.
228
+ */
229
+ export declare const scaleAtom: ({ direction, duration, easing, delay, outScale, inScale, }: ScaleAtomParams) => AtomMotion;
230
+
231
+ declare interface ScaleAtomParams extends BaseAtomParams {
232
+ /** Scale for the out state (exited). Defaults to 0.9. */
233
+ outScale?: number;
234
+ /** Scale for the in state (entered). Defaults to 1. */
235
+ inScale?: number;
236
+ }
237
+
238
+ export declare type ScaleParams = BasePresenceParams & AnimateOpacity & {
239
+ /** Scale for the out state (exited). Defaults to `0.9`. */
240
+ outScale?: number;
241
+ /** Scale for the in state (entered). Defaults to `1`. */
242
+ inScale?: number;
243
+ };
244
+
245
+ export declare const ScaleRelaxed: PresenceComponent<ScaleParams>;
246
+
247
+ export declare const ScaleSnappy: PresenceComponent<ScaleParams>;
248
+
249
+ /** A React component that applies slide in/out transitions to its children. */
250
+ export declare const Slide: PresenceComponent<SlideParams>;
251
+
252
+ /**
253
+ * Generates a motion atom object for a slide-in or slide-out.
254
+ * @param direction - The functional direction of the motion: 'enter' or 'exit'.
255
+ * @param duration - The duration of the motion in milliseconds.
256
+ * @param easing - The easing curve for the motion. Defaults to `motionTokens.curveLinear`.
257
+ * @param outX - X translate for the out state (exited) with units (e.g., '50px', '100%'). Defaults to '0px'.
258
+ * @param outY - Y translate for the out state (exited) with units (e.g., '50px', '100%'). Defaults to '0px'.
259
+ * @param inX - X translate for the in state (entered) with units (e.g., '5px', '10%'). Defaults to '0px'.
260
+ * @param inY - Y translate for the in state (entered) with units (e.g., '5px', '10%'). Defaults to '0px'.
261
+ * @param delay - Time (ms) to delay the animation. Defaults to 0.
262
+ * @returns A motion atom object with translate keyframes and the supplied duration and easing.
263
+ */
264
+ export declare const slideAtom: ({ direction, duration, easing, delay, outX, outY, inX, inY, }: SlideAtomParams) => AtomMotion;
265
+
266
+ declare interface SlideAtomParams extends BaseAtomParams {
267
+ /** X translate for the out state (exited). Defaults to '0px'. */
268
+ outX?: string;
269
+ /** Y translate for the out state (exited). Defaults to '0px'. */
270
+ outY?: string;
271
+ /** X translate for the in state (entered). Defaults to '0px'. */
272
+ inX?: string;
273
+ /** Y translate for the in state (entered). Defaults to '0px'. */
274
+ inY?: string;
275
+ }
276
+
277
+ export declare type SlideParams = BasePresenceParams & AnimateOpacity & {
278
+ /** X translate for the out state (exited). Defaults to `'0px'`. */
279
+ outX?: string;
280
+ /** Y translate for the out state (exited). Defaults to `'0px'`. */
281
+ outY?: string;
282
+ /** X translate for the in state (entered). Defaults to `'0px'`. */
283
+ inX?: string;
284
+ /** Y translate for the in state (entered). Defaults to `'0px'`. */
285
+ inY?: string;
286
+ };
287
+
288
+ export declare const SlideRelaxed: PresenceComponent<SlideParams>;
289
+
290
+ export declare const SlideSnappy: PresenceComponent<SlideParams>;
291
+
292
+ /**
293
+ * Stagger is a component that manages the staggered entrance and exit of its children.
294
+ * Children are animated in sequence with configurable timing between each item.
295
+ * Stagger can be interactively toggled between entrance and exit animations using the `visible` prop.
296
+ *
297
+ * @param children - React elements to animate. Elements are cloned with animation props.
298
+ * @param visible - Controls animation direction. When `true`, the group is animating "enter" (items shown);
299
+ * when `false`, the group is animating "exit" (items hidden). Defaults to `false`.
300
+ * @param itemDelay - Milliseconds between each item's animation start.
301
+ * Defaults to the package's default delay (see `DEFAULT_ITEM_DELAY`).
302
+ * @param itemDuration - Milliseconds each item's animation lasts. Only used with `delayMode="timing"`.
303
+ * Defaults to the package's default item duration (see `DEFAULT_ITEM_DURATION`).
304
+ * @param reversed - Whether to reverse the stagger sequence (last item animates first). Defaults to `false`.
305
+ * @param hideMode - How children's visibility/mounting is managed. Auto-detects if not specified.
306
+ * @param delayMode - How staggering timing is implemented. Auto-detects if not specified.
307
+ * @param onMotionFinish - Callback invoked when the staggered animation sequence completes.
308
+ *
309
+ * **Auto-detection behavior:**
310
+ * - **hideMode**: Presence components use `'visibleProp'`, DOM elements use `'visibilityStyle'`
311
+ * - **delayMode**: Components with delay support use `'delayProp'` (most performant), others use `'timing'`
312
+ *
313
+ * **hideMode options:**
314
+ * - `'visibleProp'`: Children are presence components with `visible` prop (always rendered, visibility controlled via prop)
315
+ * - `'visibilityStyle'`: Children remain in DOM with inline style visibility: hidden/visible (preserves layout space)
316
+ * - `'unmount'`: Children are mounted/unmounted from DOM based on visibility
317
+ *
318
+ * **delayMode options:**
319
+ * - `'timing'`: Manages visibility over time using JavaScript timing
320
+ * - `'delayProp'`: Passes delay props to motion components to use native Web Animations API delays (most performant)
321
+ *
322
+ * **Static variants:**
323
+ * - `<Stagger.In>` - One-way stagger for entrance animations only (auto-detects optimal modes)
324
+ * - `<Stagger.Out>` - One-way stagger for exit animations only (auto-detects optimal modes)
325
+ *
326
+ * @example
327
+ * ```tsx
328
+ * import { Stagger, Fade, Scale, Rotate } from '@fluentui/react-motion-components-preview';
329
+ *
330
+ * // Auto-detects optimal modes for presence components (delayProp + visibleProp)
331
+ * <Stagger visible={isVisible} itemDelay={150}>
332
+ * <Fade><div>Item 2</div></Fade>
333
+ * <Scale><div>Item 1</div></Scale>
334
+ * <Rotate><div>Item 3</div></Rotate>
335
+ * </Stagger>
336
+ *
337
+ * // Auto-detects optimal modes for motion components (delayProp + unmount)
338
+ * <Stagger.In itemDelay={100}>
339
+ * <Scale.In><div>Item 1</div></Scale.In>
340
+ * <Fade.In><div>Item 2</div></Fade.In>
341
+ * </Stagger.In>
342
+ *
343
+ * // Auto-detects timing mode for DOM elements (timing + visibilityStyle)
344
+ * <Stagger visible={isVisible} itemDelay={150} onMotionFinish={handleComplete}>
345
+ * <div>Item 1</div>
346
+ * <div>Item 2</div>
347
+ * <div>Item 3</div>
348
+ * </Stagger>
349
+ *
350
+ * // Override auto-detection when needed
351
+ * <Stagger visible={isVisible} delayMode="timing" hideMode="unmount">
352
+ * <CustomComponent>Item 1</CustomComponent>
353
+ * </Stagger>
354
+ * ```
355
+ */
356
+ export declare const Stagger: React_2.FC<StaggerProps> & {
357
+ In: React_2.FC<Omit<StaggerProps, "visible">>;
358
+ Out: React_2.FC<Omit<StaggerProps, "visible">>;
359
+ };
360
+
361
+ /**
362
+ * Defines how Stagger implements the timing of staggered animations.
363
+ * - 'timing': Manages visibility over time using JavaScript timing (current behavior)
364
+ * - 'delayProp': Passes delay props to motion components to use native Web Animations API delays
365
+ */
366
+ declare type StaggerDelayMode = 'timing' | 'delayProp';
367
+
368
+ /**
369
+ * Defines how Stagger manages its children's visibility/mounting.
370
+ * - 'visibleProp': Children are components with a `visible` prop (e.g. motion components)
371
+ * - 'visibilityStyle': Children remain in DOM with inline style `visibility: hidden | visible`
372
+ * - 'unmount': Children are mounted/unmounted from DOM based on visibility
373
+ */
374
+ declare type StaggerHideMode = 'visibleProp' | 'visibilityStyle' | 'unmount';
375
+
376
+ /**
377
+ * Props for the Stagger component that manages staggered entrance and exit animations.
378
+ */
379
+ export declare interface StaggerProps {
380
+ /** React elements to animate. Elements are cloned with animation props. */
381
+ children: React_2.ReactNode;
382
+ /**
383
+ * Controls children animation direction. When `true`, the group is animating "enter" (items shown).
384
+ * When `false`, the group is animating "exit" (items hidden).
385
+ */
386
+ visible?: PresenceComponentProps['visible'];
387
+ /** Whether to reverse the stagger sequence (last item animates first). Defaults to `false`. */
388
+ reversed?: boolean;
389
+ /**
390
+ * Milliseconds between each child's animation start.
391
+ * Defaults to the package's default delay (see `DEFAULT_ITEM_DELAY`).
392
+ */
393
+ itemDelay?: number;
394
+ /**
395
+ * Milliseconds each child's animation lasts. Only used with `delayMode="timing"`.
396
+ * Defaults to the package's default duration (see `DEFAULT_ITEM_DURATION`).
397
+ */
398
+ itemDuration?: number;
399
+ /** How children's visibility/mounting is managed. Auto-detects if not specified. */
400
+ hideMode?: StaggerHideMode;
401
+ /** How staggering timing is implemented. Defaults to 'timing'. */
402
+ delayMode?: StaggerDelayMode;
403
+ /** Callback invoked when the staggered animation sequence completes. */
404
+ onMotionFinish?: () => void;
405
+ }
406
+
407
+ export { }
@@ -1,4 +1,4 @@
1
- import { motionTokens } from '@fluentui/react-motion';
1
+ import { motionTokens } from "@fluentui/react-motion";
2
2
  /**
3
3
  * Generates a motion atom object for a blur-in or blur-out.
4
4
  * @param direction - The functional direction of the motion: 'enter' or 'exit'.
@@ -1,4 +1,4 @@
1
- import { motionTokens } from '@fluentui/react-motion';
1
+ import { motionTokens } from "@fluentui/react-motion";
2
2
  /**
3
3
  * Generates a motion atom object for a fade-in or fade-out.
4
4
  * @param direction - The functional direction of the motion: 'enter' or 'exit'.
@@ -1,4 +1,4 @@
1
- import { motionTokens } from '@fluentui/react-motion';
1
+ import { motionTokens } from "@fluentui/react-motion";
2
2
  const createRotateValue = (axis, angle)=>{
3
3
  return `${axis.toLowerCase()} ${angle}deg`;
4
4
  };
@@ -1,4 +1,4 @@
1
- import { motionTokens } from '@fluentui/react-motion';
1
+ import { motionTokens } from "@fluentui/react-motion";
2
2
  /**
3
3
  * Generates a motion atom object for a scale in or scale out.
4
4
  * @param direction - The functional direction of the motion: 'enter' or 'exit'.
@@ -1,4 +1,4 @@
1
- import { motionTokens } from '@fluentui/react-motion';
1
+ import { motionTokens } from "@fluentui/react-motion";
2
2
  /**
3
3
  * Generates a motion atom object for a slide-in or slide-out.
4
4
  * @param direction - The functional direction of the motion: 'enter' or 'exit'.
@@ -1,7 +1,7 @@
1
1
  'use client';
2
- import * as React from 'react';
3
- import { useStaggerItemsVisibility } from './useStaggerItemsVisibility';
4
- import { DEFAULT_ITEM_DURATION, DEFAULT_ITEM_DELAY, acceptsVisibleProp, acceptsDelayProps, getStaggerChildMapping } from './utils';
2
+ import * as React from "react";
3
+ import { useStaggerItemsVisibility } from "./useStaggerItemsVisibility.js";
4
+ import { DEFAULT_ITEM_DURATION, DEFAULT_ITEM_DELAY, acceptsVisibleProp, acceptsDelayProps, getStaggerChildMapping } from "./utils/index.js";
5
5
  /**
6
6
  * Shared utility to detect optimal stagger modes based on children components.
7
7
  * Consolidates the auto-detection logic used by both StaggerMain and createStaggerDirection.
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/choreography/Stagger/Stagger.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { useStaggerItemsVisibility } from './useStaggerItemsVisibility';\nimport {\n DEFAULT_ITEM_DURATION,\n DEFAULT_ITEM_DELAY,\n acceptsVisibleProp,\n acceptsDelayProps,\n getStaggerChildMapping,\n} from './utils';\nimport type { StaggerOneWayProps, StaggerProps } from './stagger-types';\nimport { type StaggerHideMode, type StaggerDelayMode } from './stagger-types';\n\n/**\n * Shared utility to detect optimal stagger modes based on children components.\n * Consolidates the auto-detection logic used by both StaggerMain and createStaggerDirection.\n */\nconst detectStaggerModes = (\n children: React.ReactNode,\n options: {\n hideMode?: StaggerHideMode;\n delayMode?: StaggerDelayMode;\n fallbackHideMode?: StaggerHideMode;\n },\n): { hideMode: StaggerHideMode; delayMode: StaggerDelayMode } => {\n const { hideMode, delayMode, fallbackHideMode = 'visibilityStyle' } = options;\n\n const childMapping = getStaggerChildMapping(children);\n const elements = Object.values(childMapping).map(item => item.element);\n const hasVisiblePropSupport = elements.every(child => acceptsVisibleProp(child));\n const hasDelayPropSupport = elements.every(child => acceptsDelayProps(child));\n\n return {\n hideMode: hideMode ?? (hasVisiblePropSupport ? 'visibleProp' : fallbackHideMode),\n delayMode: delayMode ?? (hasDelayPropSupport ? 'delayProp' : 'timing'),\n };\n};\n\nconst StaggerOneWay: React.FC<StaggerOneWayProps> = ({\n children,\n direction,\n itemDelay = DEFAULT_ITEM_DELAY,\n itemDuration = DEFAULT_ITEM_DURATION,\n reversed = false,\n hideMode,\n delayMode = 'timing',\n onMotionFinish,\n}) => {\n const childMapping = React.useMemo(() => getStaggerChildMapping(children), [children]);\n\n // Always call hooks at the top level, regardless of delayMode\n const { itemsVisibility } = useStaggerItemsVisibility({\n childMapping,\n itemDelay,\n itemDuration,\n direction,\n reversed,\n onMotionFinish,\n hideMode,\n });\n\n // For delayProp mode, pass delay props directly to motion components\n if (delayMode === 'delayProp') {\n return (\n <>\n {Object.entries(childMapping).map(([key, { element, index }]) => {\n const staggerIndex = reversed ? Object.keys(childMapping).length - 1 - index : index;\n const delay = staggerIndex * itemDelay;\n\n // Clone element with delay prop (for enter direction) or exitDelay prop (for exit direction)\n const delayProp = direction === 'enter' ? { delay } : { exitDelay: delay };\n\n // Only set visible prop if the component supports it\n // Set visible based on direction: true for enter, false for exit\n const visibleProp = acceptsVisibleProp(element) ? { visible: direction === 'enter' } : {};\n\n return React.cloneElement(element, {\n key,\n ...visibleProp,\n ...delayProp,\n });\n })}\n </>\n );\n }\n\n // For timing mode, use the existing timing-based implementation\n\n return (\n <>\n {Object.entries(childMapping).map(([key, { element }]) => {\n if (hideMode === 'visibleProp') {\n // Use a generic record type for props to avoid `any` while still allowing unknown prop shapes.\n return React.cloneElement(element, {\n key,\n visible: itemsVisibility[key],\n } as Partial<Record<string, unknown>>);\n } else if (hideMode === 'visibilityStyle') {\n const childProps = element.props as Record<string, unknown> | undefined;\n const style = {\n ...(childProps?.style as Record<string, unknown> | undefined),\n visibility: itemsVisibility[key] ? 'visible' : 'hidden',\n };\n return React.cloneElement(element, { key, style } as Partial<Record<string, unknown>>);\n } else {\n // unmount mode\n return itemsVisibility[key] ? React.cloneElement(element, { key }) : null;\n }\n })}\n </>\n );\n};\n\n// Shared helper for StaggerIn and StaggerOut\nconst createStaggerDirection = (direction: 'enter' | 'exit') => {\n const StaggerDirection: React.FC<Omit<StaggerProps, 'visible'>> = ({ hideMode, delayMode, children, ...props }) => {\n // Auto-detect modes for better performance with motion components\n const { hideMode: resolvedHideMode, delayMode: resolvedDelayMode } = detectStaggerModes(children, {\n hideMode,\n delayMode,\n // One-way stagger falls back to visibilityStyle if it doesn't detect visibleProp support\n fallbackHideMode: 'visibilityStyle',\n });\n\n return (\n <StaggerOneWay\n {...props}\n children={children}\n direction={direction}\n hideMode={resolvedHideMode}\n delayMode={resolvedDelayMode}\n />\n );\n };\n\n return StaggerDirection;\n};\n\nconst StaggerIn = createStaggerDirection('enter');\nconst StaggerOut = createStaggerDirection('exit');\n\n// Main Stagger component with auto-detection or explicit modes\nconst StaggerMain: React.FC<StaggerProps> = props => {\n const { children, visible = false, hideMode, delayMode, ...rest } = props;\n\n // Auto-detect modes for bidirectional stagger\n const { hideMode: resolvedHideMode, delayMode: resolvedDelayMode } = detectStaggerModes(children, {\n hideMode,\n delayMode,\n // Bidirectional stagger falls back to visibilityStyle if it doesn't detect visibleProp support\n fallbackHideMode: 'visibilityStyle',\n });\n\n const direction = visible ? 'enter' : 'exit';\n\n return (\n <StaggerOneWay\n {...rest}\n children={children}\n hideMode={resolvedHideMode}\n delayMode={resolvedDelayMode}\n direction={direction}\n />\n );\n};\n\n/**\n * Stagger is a component that manages the staggered entrance and exit of its children.\n * Children are animated in sequence with configurable timing between each item.\n * Stagger can be interactively toggled between entrance and exit animations using the `visible` prop.\n *\n * @param children - React elements to animate. Elements are cloned with animation props.\n * @param visible - Controls animation direction. When `true`, the group is animating \"enter\" (items shown);\n * when `false`, the group is animating \"exit\" (items hidden). Defaults to `false`.\n * @param itemDelay - Milliseconds between each item's animation start.\n * Defaults to the package's default delay (see `DEFAULT_ITEM_DELAY`).\n * @param itemDuration - Milliseconds each item's animation lasts. Only used with `delayMode=\"timing\"`.\n * Defaults to the package's default item duration (see `DEFAULT_ITEM_DURATION`).\n * @param reversed - Whether to reverse the stagger sequence (last item animates first). Defaults to `false`.\n * @param hideMode - How children's visibility/mounting is managed. Auto-detects if not specified.\n * @param delayMode - How staggering timing is implemented. Auto-detects if not specified.\n * @param onMotionFinish - Callback invoked when the staggered animation sequence completes.\n *\n * **Auto-detection behavior:**\n * - **hideMode**: Presence components use `'visibleProp'`, DOM elements use `'visibilityStyle'`\n * - **delayMode**: Components with delay support use `'delayProp'` (most performant), others use `'timing'`\n *\n * **hideMode options:**\n * - `'visibleProp'`: Children are presence components with `visible` prop (always rendered, visibility controlled via prop)\n * - `'visibilityStyle'`: Children remain in DOM with inline style visibility: hidden/visible (preserves layout space)\n * - `'unmount'`: Children are mounted/unmounted from DOM based on visibility\n *\n * **delayMode options:**\n * - `'timing'`: Manages visibility over time using JavaScript timing\n * - `'delayProp'`: Passes delay props to motion components to use native Web Animations API delays (most performant)\n *\n * **Static variants:**\n * - `<Stagger.In>` - One-way stagger for entrance animations only (auto-detects optimal modes)\n * - `<Stagger.Out>` - One-way stagger for exit animations only (auto-detects optimal modes)\n *\n * @example\n * ```tsx\n * import { Stagger, Fade, Scale, Rotate } from '@fluentui/react-motion-components-preview';\n *\n * // Auto-detects optimal modes for presence components (delayProp + visibleProp)\n * <Stagger visible={isVisible} itemDelay={150}>\n * <Fade><div>Item 2</div></Fade>\n * <Scale><div>Item 1</div></Scale>\n * <Rotate><div>Item 3</div></Rotate>\n * </Stagger>\n *\n * // Auto-detects optimal modes for motion components (delayProp + unmount)\n * <Stagger.In itemDelay={100}>\n * <Scale.In><div>Item 1</div></Scale.In>\n * <Fade.In><div>Item 2</div></Fade.In>\n * </Stagger.In>\n *\n * // Auto-detects timing mode for DOM elements (timing + visibilityStyle)\n * <Stagger visible={isVisible} itemDelay={150} onMotionFinish={handleComplete}>\n * <div>Item 1</div>\n * <div>Item 2</div>\n * <div>Item 3</div>\n * </Stagger>\n *\n * // Override auto-detection when needed\n * <Stagger visible={isVisible} delayMode=\"timing\" hideMode=\"unmount\">\n * <CustomComponent>Item 1</CustomComponent>\n * </Stagger>\n * ```\n */\nexport const Stagger = Object.assign(StaggerMain, {\n In: StaggerIn,\n Out: StaggerOut,\n});\n"],"names":["React","useStaggerItemsVisibility","DEFAULT_ITEM_DURATION","DEFAULT_ITEM_DELAY","acceptsVisibleProp","acceptsDelayProps","getStaggerChildMapping","detectStaggerModes","children","options","hideMode","delayMode","fallbackHideMode","childMapping","elements","Object","values","map","item","element","hasVisiblePropSupport","every","child","hasDelayPropSupport","StaggerOneWay","direction","itemDelay","itemDuration","reversed","onMotionFinish","useMemo","itemsVisibility","entries","key","index","staggerIndex","keys","length","delay","delayProp","exitDelay","visibleProp","visible","cloneElement","childProps","props","style","visibility","createStaggerDirection","StaggerDirection","resolvedHideMode","resolvedDelayMode","StaggerIn","StaggerOut","StaggerMain","rest","Stagger","assign","In","Out"],"mappings":"AAAA;AAEA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,yBAAyB,QAAQ,8BAA8B;AACxE,SACEC,qBAAqB,EACrBC,kBAAkB,EAClBC,kBAAkB,EAClBC,iBAAiB,EACjBC,sBAAsB,QACjB,UAAU;AAIjB;;;CAGC,GACD,MAAMC,qBAAqB,CACzBC,UACAC;IAMA,MAAM,EAAEC,QAAQ,EAAEC,SAAS,EAAEC,mBAAmB,iBAAiB,EAAE,GAAGH;IAEtE,MAAMI,eAAeP,uBAAuBE;IAC5C,MAAMM,WAAWC,OAAOC,MAAM,CAACH,cAAcI,GAAG,CAACC,CAAAA,OAAQA,KAAKC,OAAO;IACrE,MAAMC,wBAAwBN,SAASO,KAAK,CAACC,CAAAA,QAASlB,mBAAmBkB;IACzE,MAAMC,sBAAsBT,SAASO,KAAK,CAACC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C,mBAAmBC,UAAU;QAChGE;QACAC;QACA,+FAA+F;QAC/FC,kBAAkB;IACpB;IAEA,MAAMa,YAAYiB,UAAU,UAAU;IAEtC,qBACE,oBAAClB;QACE,GAAG+B,IAAI;QACR/C,UAAUA;QACVE,UAAUwC;QACVvC,WAAWwC;QACX1B,WAAWA;;AAGjB;AAEA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+DC,GACD,OAAO,MAAM+B,UAAUzC,OAAO0C,MAAM,CAACH,aAAa;IAChDI,IAAIN;IACJO,KAAKN;AACP,GAAG"}
1
+ {"version":3,"sources":["../src/choreography/Stagger/Stagger.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { useStaggerItemsVisibility } from './useStaggerItemsVisibility';\nimport {\n DEFAULT_ITEM_DURATION,\n DEFAULT_ITEM_DELAY,\n acceptsVisibleProp,\n acceptsDelayProps,\n getStaggerChildMapping,\n} from './utils';\nimport type { StaggerOneWayProps, StaggerProps } from './stagger-types';\nimport { type StaggerHideMode, type StaggerDelayMode } from './stagger-types';\n\n/**\n * Shared utility to detect optimal stagger modes based on children components.\n * Consolidates the auto-detection logic used by both StaggerMain and createStaggerDirection.\n */\nconst detectStaggerModes = (\n children: React.ReactNode,\n options: {\n hideMode?: StaggerHideMode;\n delayMode?: StaggerDelayMode;\n fallbackHideMode?: StaggerHideMode;\n },\n): { hideMode: StaggerHideMode; delayMode: StaggerDelayMode } => {\n const { hideMode, delayMode, fallbackHideMode = 'visibilityStyle' } = options;\n\n const childMapping = getStaggerChildMapping(children);\n const elements = Object.values(childMapping).map(item => item.element);\n const hasVisiblePropSupport = elements.every(child => acceptsVisibleProp(child));\n const hasDelayPropSupport = elements.every(child => acceptsDelayProps(child));\n\n return {\n hideMode: hideMode ?? (hasVisiblePropSupport ? 'visibleProp' : fallbackHideMode),\n delayMode: delayMode ?? (hasDelayPropSupport ? 'delayProp' : 'timing'),\n };\n};\n\nconst StaggerOneWay: React.FC<StaggerOneWayProps> = ({\n children,\n direction,\n itemDelay = DEFAULT_ITEM_DELAY,\n itemDuration = DEFAULT_ITEM_DURATION,\n reversed = false,\n hideMode,\n delayMode = 'timing',\n onMotionFinish,\n}) => {\n const childMapping = React.useMemo(() => getStaggerChildMapping(children), [children]);\n\n // Always call hooks at the top level, regardless of delayMode\n const { itemsVisibility } = useStaggerItemsVisibility({\n childMapping,\n itemDelay,\n itemDuration,\n direction,\n reversed,\n onMotionFinish,\n hideMode,\n });\n\n // For delayProp mode, pass delay props directly to motion components\n if (delayMode === 'delayProp') {\n return (\n <>\n {Object.entries(childMapping).map(([key, { element, index }]) => {\n const staggerIndex = reversed ? Object.keys(childMapping).length - 1 - index : index;\n const delay = staggerIndex * itemDelay;\n\n // Clone element with delay prop (for enter direction) or exitDelay prop (for exit direction)\n const delayProp = direction === 'enter' ? { delay } : { exitDelay: delay };\n\n // Only set visible prop if the component supports it\n // Set visible based on direction: true for enter, false for exit\n const visibleProp = acceptsVisibleProp(element) ? { visible: direction === 'enter' } : {};\n\n return React.cloneElement(element, {\n key,\n ...visibleProp,\n ...delayProp,\n });\n })}\n </>\n );\n }\n\n // For timing mode, use the existing timing-based implementation\n\n return (\n <>\n {Object.entries(childMapping).map(([key, { element }]) => {\n if (hideMode === 'visibleProp') {\n // Use a generic record type for props to avoid `any` while still allowing unknown prop shapes.\n return React.cloneElement(element, {\n key,\n visible: itemsVisibility[key],\n } as Partial<Record<string, unknown>>);\n } else if (hideMode === 'visibilityStyle') {\n const childProps = element.props as Record<string, unknown> | undefined;\n const style = {\n ...(childProps?.style as Record<string, unknown> | undefined),\n visibility: itemsVisibility[key] ? 'visible' : 'hidden',\n };\n return React.cloneElement(element, { key, style } as Partial<Record<string, unknown>>);\n } else {\n // unmount mode\n return itemsVisibility[key] ? React.cloneElement(element, { key }) : null;\n }\n })}\n </>\n );\n};\n\n// Shared helper for StaggerIn and StaggerOut\nconst createStaggerDirection = (direction: 'enter' | 'exit') => {\n const StaggerDirection: React.FC<Omit<StaggerProps, 'visible'>> = ({ hideMode, delayMode, children, ...props }) => {\n // Auto-detect modes for better performance with motion components\n const { hideMode: resolvedHideMode, delayMode: resolvedDelayMode } = detectStaggerModes(children, {\n hideMode,\n delayMode,\n // One-way stagger falls back to visibilityStyle if it doesn't detect visibleProp support\n fallbackHideMode: 'visibilityStyle',\n });\n\n return (\n <StaggerOneWay\n {...props}\n children={children}\n direction={direction}\n hideMode={resolvedHideMode}\n delayMode={resolvedDelayMode}\n />\n );\n };\n\n return StaggerDirection;\n};\n\nconst StaggerIn = createStaggerDirection('enter');\nconst StaggerOut = createStaggerDirection('exit');\n\n// Main Stagger component with auto-detection or explicit modes\nconst StaggerMain: React.FC<StaggerProps> = props => {\n const { children, visible = false, hideMode, delayMode, ...rest } = props;\n\n // Auto-detect modes for bidirectional stagger\n const { hideMode: resolvedHideMode, delayMode: resolvedDelayMode } = detectStaggerModes(children, {\n hideMode,\n delayMode,\n // Bidirectional stagger falls back to visibilityStyle if it doesn't detect visibleProp support\n fallbackHideMode: 'visibilityStyle',\n });\n\n const direction = visible ? 'enter' : 'exit';\n\n return (\n <StaggerOneWay\n {...rest}\n children={children}\n hideMode={resolvedHideMode}\n delayMode={resolvedDelayMode}\n direction={direction}\n />\n );\n};\n\n/**\n * Stagger is a component that manages the staggered entrance and exit of its children.\n * Children are animated in sequence with configurable timing between each item.\n * Stagger can be interactively toggled between entrance and exit animations using the `visible` prop.\n *\n * @param children - React elements to animate. Elements are cloned with animation props.\n * @param visible - Controls animation direction. When `true`, the group is animating \"enter\" (items shown);\n * when `false`, the group is animating \"exit\" (items hidden). Defaults to `false`.\n * @param itemDelay - Milliseconds between each item's animation start.\n * Defaults to the package's default delay (see `DEFAULT_ITEM_DELAY`).\n * @param itemDuration - Milliseconds each item's animation lasts. Only used with `delayMode=\"timing\"`.\n * Defaults to the package's default item duration (see `DEFAULT_ITEM_DURATION`).\n * @param reversed - Whether to reverse the stagger sequence (last item animates first). Defaults to `false`.\n * @param hideMode - How children's visibility/mounting is managed. Auto-detects if not specified.\n * @param delayMode - How staggering timing is implemented. Auto-detects if not specified.\n * @param onMotionFinish - Callback invoked when the staggered animation sequence completes.\n *\n * **Auto-detection behavior:**\n * - **hideMode**: Presence components use `'visibleProp'`, DOM elements use `'visibilityStyle'`\n * - **delayMode**: Components with delay support use `'delayProp'` (most performant), others use `'timing'`\n *\n * **hideMode options:**\n * - `'visibleProp'`: Children are presence components with `visible` prop (always rendered, visibility controlled via prop)\n * - `'visibilityStyle'`: Children remain in DOM with inline style visibility: hidden/visible (preserves layout space)\n * - `'unmount'`: Children are mounted/unmounted from DOM based on visibility\n *\n * **delayMode options:**\n * - `'timing'`: Manages visibility over time using JavaScript timing\n * - `'delayProp'`: Passes delay props to motion components to use native Web Animations API delays (most performant)\n *\n * **Static variants:**\n * - `<Stagger.In>` - One-way stagger for entrance animations only (auto-detects optimal modes)\n * - `<Stagger.Out>` - One-way stagger for exit animations only (auto-detects optimal modes)\n *\n * @example\n * ```tsx\n * import { Stagger, Fade, Scale, Rotate } from '@fluentui/react-motion-components-preview';\n *\n * // Auto-detects optimal modes for presence components (delayProp + visibleProp)\n * <Stagger visible={isVisible} itemDelay={150}>\n * <Fade><div>Item 2</div></Fade>\n * <Scale><div>Item 1</div></Scale>\n * <Rotate><div>Item 3</div></Rotate>\n * </Stagger>\n *\n * // Auto-detects optimal modes for motion components (delayProp + unmount)\n * <Stagger.In itemDelay={100}>\n * <Scale.In><div>Item 1</div></Scale.In>\n * <Fade.In><div>Item 2</div></Fade.In>\n * </Stagger.In>\n *\n * // Auto-detects timing mode for DOM elements (timing + visibilityStyle)\n * <Stagger visible={isVisible} itemDelay={150} onMotionFinish={handleComplete}>\n * <div>Item 1</div>\n * <div>Item 2</div>\n * <div>Item 3</div>\n * </Stagger>\n *\n * // Override auto-detection when needed\n * <Stagger visible={isVisible} delayMode=\"timing\" hideMode=\"unmount\">\n * <CustomComponent>Item 1</CustomComponent>\n * </Stagger>\n * ```\n */\nexport const Stagger = Object.assign(StaggerMain, {\n In: StaggerIn,\n Out: StaggerOut,\n});\n"],"names":["React","useStaggerItemsVisibility","DEFAULT_ITEM_DURATION","DEFAULT_ITEM_DELAY","acceptsVisibleProp","acceptsDelayProps","getStaggerChildMapping","detectStaggerModes","children","options","hideMode","delayMode","fallbackHideMode","childMapping","elements","Object","values","map","item","element","hasVisiblePropSupport","every","child","hasDelayPropSupport","StaggerOneWay","direction","itemDelay","itemDuration","reversed","onMotionFinish","useMemo","itemsVisibility","entries","key","index","staggerIndex","keys","length","delay","delayProp","exitDelay","visibleProp","visible","cloneElement","childProps","props","style","visibility","createStaggerDirection","StaggerDirection","resolvedHideMode","resolvedDelayMode","StaggerIn","StaggerOut","StaggerMain","rest","Stagger","assign","In","Out"],"mappings":"AAAA;AAEA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,yBAAyB,QAAQ,iCAA8B;AACxE,SACEC,qBAAqB,EACrBC,kBAAkB,EAClBC,kBAAkB,EAClBC,iBAAiB,EACjBC,sBAAsB,QACjB,mBAAU;AAIjB;;;CAGC,GACD,MAAMC,qBAAqB,CACzBC,UACAC;IAMA,MAAM,EAAEC,QAAQ,EAAEC,SAAS,EAAEC,mBAAmB,iBAAiB,EAAE,GAAGH;IAEtE,MAAMI,eAAeP,uBAAuBE;IAC5C,MAAMM,WAAWC,OAAOC,MAAM,CAACH,cAAcI,GAAG,CAACC,CAAAA,OAAQA,KAAKC,OAAO;IACrE,MAAMC,wBAAwBN,SAASO,KAAK,CAACC,CAAAA,QAASlB,mBAAmBkB;IACzE,MAAMC,sBAAsBT,SAASO,KAAK,CAACC,CAAAA,QAASjB,kBAAkBiB;IAEtE,OAAO;QACLZ,UAAUA,qBAAAA,sBAAAA,WAAaU,wBAAwB,gBAAgBR;QAC/DD,WAAWA,sBAAAA,uBAAAA,YAAcY,sBAAsB,cAAc;IAC/D;AACF;AAEA,MAAMC,gBAA8C,CAAC,EACnDhB,QAAQ,E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B;AAEA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+DC,GACD,OAAO,MAAM+B,UAAUzC,OAAO0C,MAAM,CAACH,aAAa;IAChDI,IAAIN;IACJO,KAAKN;AACP,GAAG"}
@@ -1 +1 @@
1
- export { Stagger } from './Stagger';
1
+ export { Stagger } from "./Stagger.js";
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/choreography/Stagger/index.ts"],"sourcesContent":["export { Stagger } from './Stagger';\nexport type { StaggerProps } from './stagger-types';\n"],"names":["Stagger"],"mappings":"AAAA,SAASA,OAAO,QAAQ,YAAY"}
1
+ {"version":3,"sources":["../src/choreography/Stagger/index.ts"],"sourcesContent":["export { Stagger } from './Stagger';\nexport type { StaggerProps } from './stagger-types';\n"],"names":["Stagger"],"mappings":"AAAA,SAASA,OAAO,QAAQ,eAAY"}
@@ -1,7 +1,7 @@
1
1
  'use client';
2
- import * as React from 'react';
3
- import { useAnimationFrame, useEventCallback } from '@fluentui/react-utilities';
4
- import { staggerItemsVisibilityAtTime, DEFAULT_ITEM_DURATION } from './utils';
2
+ import * as React from "react";
3
+ import { useAnimationFrame, useEventCallback } from "@fluentui/react-utilities";
4
+ import { staggerItemsVisibilityAtTime, DEFAULT_ITEM_DURATION } from "./utils/index.js";
5
5
  /**
6
6
  * Hook that tracks the visibility of a staggered sequence of items as time progresses.
7
7
  *
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/choreography/Stagger/useStaggerItemsVisibility.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { useAnimationFrame, useEventCallback } from '@fluentui/react-utilities';\nimport type { StaggerProps } from './stagger-types';\nimport {\n staggerItemsVisibilityAtTime,\n type StaggerItemsVisibilityAtTimeParams,\n DEFAULT_ITEM_DURATION,\n type StaggerChildMapping,\n} from './utils';\n\nexport interface UseStaggerItemsVisibilityParams\n extends Pick<StaggerProps, 'onMotionFinish'>,\n Omit<StaggerItemsVisibilityAtTimeParams, 'elapsed' | 'itemCount'> {\n hideMode: StaggerProps['hideMode'];\n childMapping: StaggerChildMapping;\n}\n\n/**\n * Hook that tracks the visibility of a staggered sequence of items as time progresses.\n *\n * Behavior summary for all hide modes:\n * - On the first render, items are placed in their final state (enter => visible, exit => hidden)\n * and no animation runs.\n * - On subsequent renders when direction changes, items animate from the opposite state\n * to the final state over the stagger timeline.\n * - Changes to the `reversed` prop do not trigger re-animation; they only affect the order\n * during the next direction change animation.\n *\n * This hook uses child key mapping instead of item count to track individual items.\n * This allows it to correctly handle:\n * - Items being added and removed simultaneously (when count stays the same)\n * - Items being reordered\n * - Individual item identity across renders\n *\n * @param childMapping - Mapping of child keys to elements and indices\n * @param itemDelay - Milliseconds between the start of each item's animation\n * @param itemDuration - Milliseconds each item's animation lasts\n * @param direction - 'enter' (show items) or 'exit' (hide items)\n * @param reversed - Whether to reverse the stagger order (last item first)\n * @param onMotionFinish - Callback fired when the full stagger sequence completes\n * @param hideMode - How children's visibility is managed: 'visibleProp', 'visibilityStyle', or 'unmount'\n *\n * @returns An object with `itemsVisibility: Record<string, boolean>` indicating which items are currently visible by key\n */\nexport function useStaggerItemsVisibility({\n childMapping,\n itemDelay,\n itemDuration = DEFAULT_ITEM_DURATION,\n direction,\n reversed = false,\n onMotionFinish,\n hideMode = 'visibleProp',\n}: UseStaggerItemsVisibilityParams): { itemsVisibility: Record<string, boolean> } {\n const [requestAnimationFrame, cancelAnimationFrame] = useAnimationFrame();\n\n // Stabilize the callback reference to avoid re-triggering effects on every render\n const handleMotionFinish = useEventCallback(\n onMotionFinish ??\n (() => {\n return;\n }),\n );\n\n // Track animation state independently of child changes\n const [animationKey, setAnimationKey] = React.useState(0);\n const prevDirection = React.useRef(direction);\n\n // Only trigger new animation when direction actually changes, not when children change\n React.useEffect(() => {\n if (prevDirection.current !== direction) {\n setAnimationKey(prev => prev + 1);\n prevDirection.current = direction;\n }\n }, [direction]);\n\n // State: visibility mapping for all items by key\n const [itemsVisibility, setItemsVisibility] = React.useState<Record<string, boolean>>(() => {\n const initial: Record<string, boolean> = {};\n // All hide modes start in final state: visible for 'enter', hidden for 'exit'\n const initialState = direction === 'enter';\n Object.keys(childMapping).forEach(key => {\n initial[key] = initialState;\n });\n return initial;\n });\n\n // Update visibility mapping when childMapping changes\n React.useEffect(() => {\n // eslint-disable-next-line react-hooks/set-state-in-effect\n setItemsVisibility(prev => {\n const next: Record<string, boolean> = {};\n const targetState = direction === 'enter';\n\n // Add or update items from new mapping\n Object.keys(childMapping).forEach(key => {\n if (key in prev) {\n // Existing item - preserve its visibility state\n next[key] = prev[key];\n } else {\n // New item - set to target state\n next[key] = targetState;\n }\n });\n\n // Note: Items that were in prev but not in childMapping are automatically removed\n // because we only iterate over keys in childMapping\n\n return next;\n });\n }, [childMapping, direction]);\n\n // Refs: animation timing and control\n const startTimeRef = React.useRef<number | null>(null);\n const frameRef = React.useRef<number | null>(null);\n const finishedRef = React.useRef(false);\n const isFirstRender = React.useRef(true);\n\n // Use ref to avoid re-running the animation when child mapping changes\n const childMappingRef = React.useRef(childMapping);\n\n // Update childMapping ref whenever it changes\n React.useEffect(() => {\n childMappingRef.current = childMapping;\n }, [childMapping]);\n\n // Use ref for reversed to avoid re-running animation when it changes\n const reversedRef = React.useRef(reversed);\n\n // Update reversed ref whenever it changes\n React.useEffect(() => {\n reversedRef.current = reversed;\n }, [reversed]);\n\n // ====== ANIMATION EFFECT ======\n\n React.useEffect(() => {\n let cancelled = false;\n startTimeRef.current = null;\n finishedRef.current = false;\n\n // All hide modes skip animation on first render - items are already in their final state\n if (isFirstRender.current) {\n isFirstRender.current = false;\n // Items are already in their final state from useState, no animation needed\n handleMotionFinish();\n return; // No cleanup needed for first render\n }\n\n // For animations after first render, start from the opposite of the final state\n // - Enter animation: start hidden (false), animate to visible (true)\n // - Exit animation: start visible (true), animate to hidden (false)\n const startState = direction === 'exit';\n // Use childMappingRef.current to avoid adding childMapping to dependencies\n const initialVisibility: Record<string, boolean> = {};\n Object.keys(childMappingRef.current).forEach(key => {\n initialVisibility[key] = startState;\n });\n setItemsVisibility(initialVisibility);\n\n // Animation loop: update visibility on each frame until complete\n const tick = (now: number) => {\n if (cancelled) {\n return;\n }\n if (startTimeRef.current === null) {\n startTimeRef.current = now;\n }\n const elapsed = now - (startTimeRef.current as number);\n\n const childKeys = Object.keys(childMappingRef.current);\n const itemCount = childKeys.length;\n\n const result = staggerItemsVisibilityAtTime({\n itemCount,\n elapsed,\n itemDelay,\n itemDuration,\n direction,\n reversed: reversedRef.current,\n });\n\n // Convert boolean array to keyed object\n const nextVisibility: Record<string, boolean> = {};\n childKeys.forEach((key, idx) => {\n nextVisibility[key] = result.itemsVisibility[idx];\n });\n\n setItemsVisibility(nextVisibility);\n\n if (elapsed < result.totalDuration) {\n frameRef.current = requestAnimationFrame(tick);\n } else if (!finishedRef.current) {\n finishedRef.current = true;\n handleMotionFinish();\n }\n };\n\n frameRef.current = requestAnimationFrame(tick);\n return () => {\n cancelled = true;\n if (frameRef.current) {\n cancelAnimationFrame();\n }\n };\n }, [\n animationKey,\n itemDelay,\n itemDuration,\n direction,\n requestAnimationFrame,\n cancelAnimationFrame,\n handleMotionFinish,\n ]);\n\n return { itemsVisibility };\n}\n"],"names":["React","useAnimationFrame","useEventCallback","staggerItemsVisibilityAtTime","DEFAULT_ITEM_DURATION","useStaggerItemsVisibility","childMapping","itemDelay","itemDuration","direction","reversed","onMotionFinish","hideMode","requestAnimationFrame","cancelAnimationFrame","handleMotionFinish","animationKey","setAnimationKey","useState","prevDirection","useRef","useEffect","current","prev","itemsVisibility","setItemsVisibility","initial","initialState","Object","keys","forEach","key","next","targetState","startTimeRef","frameRef","finishedRef","isFirstRender","childMappingRef","reversedRef","cancelled","startState","initialVisibility","tick","now","elapsed","childKeys","itemCount","length","result","nextVisibility","idx","totalDuration"],"mappings":"AAAA;AAEA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,iBAAiB,EAAEC,gBAAgB,QAAQ,4BAA4B;AA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IN,aAAaZ,OAAO,KAAK,MAAM;gBACjCY,aAAaZ,OAAO,GAAGsB;YACzB;YACA,MAAMC,UAAUD,MAAOV,aAAaZ,OAAO;YAE3C,MAAMwB,YAAYlB,OAAOC,IAAI,CAACS,gBAAgBhB,OAAO;YACrD,MAAMyB,YAAYD,UAAUE,MAAM;YAElC,MAAMC,SAAS9C,6BAA6B;gBAC1C4C;gBACAF;gBACAtC;gBACAC;gBACAC;gBACAC,UAAU6B,YAAYjB,OAAO;YAC/B;YAEA,wCAAwC;YACxC,MAAM4B,iBAA0C,CAAC;YACjDJ,UAAUhB,OAAO,CAAC,CAACC,KAAKoB;gBACtBD,cAAc,CAACnB,IAAI,GAAGkB,OAAOzB,eAAe,CAAC2B,IAAI;YACnD;YAEA1B,mBAAmByB;YAEnB,IAAIL,UAAUI,OAAOG,aAAa,EAAE;gBAClCjB,SAASb,OAAO,GAAGT,sBAAsB8B;YAC3C,OAAO,IAAI,CAACP,YAAYd,OAAO,EAAE;gBAC/Bc,YAAYd,OAAO,GAAG;gBACtBP;YACF;QACF;QAEAoB,SAASb,OAAO,GAAGT,sBAAsB8B;QACzC,OAAO;YACLH,YAAY;YACZ,IAAIL,SAASb,OAAO,EAAE;gBACpBR;YACF;QACF;IACF,GAAG;QACDE;QACAT;QACAC;QACAC;QACAI;QACAC;QACAC;KACD;IAED,OAAO;QAAES;IAAgB;AAC3B"}
1
+ {"version":3,"sources":["../src/choreography/Stagger/useStaggerItemsVisibility.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { useAnimationFrame, useEventCallback } from '@fluentui/react-utilities';\nimport type { StaggerProps } from './stagger-types';\nimport {\n staggerItemsVisibilityAtTime,\n type StaggerItemsVisibilityAtTimeParams,\n DEFAULT_ITEM_DURATION,\n type StaggerChildMapping,\n} from './utils';\n\nexport interface UseStaggerItemsVisibilityParams\n extends Pick<StaggerProps, 'onMotionFinish'>,\n Omit<StaggerItemsVisibilityAtTimeParams, 'elapsed' | 'itemCount'> {\n hideMode: StaggerProps['hideMode'];\n childMapping: StaggerChildMapping;\n}\n\n/**\n * Hook that tracks the visibility of a staggered sequence of items as time progresses.\n *\n * Behavior summary for all hide modes:\n * - On the first render, items are placed in their final state (enter => visible, exit => hidden)\n * and no animation runs.\n * - On subsequent renders when direction changes, items animate from the opposite state\n * to the final state over the stagger timeline.\n * - Changes to the `reversed` prop do not trigger re-animation; they only affect the order\n * during the next direction change animation.\n *\n * This hook uses child key mapping instead of item count to track individual items.\n * This allows it to correctly handle:\n * - Items being added and removed simultaneously (when count stays the same)\n * - Items being reordered\n * - Individual item identity across renders\n *\n * @param childMapping - Mapping of child keys to elements and indices\n * @param itemDelay - Milliseconds between the start of each item's animation\n * @param itemDuration - Milliseconds each item's animation lasts\n * @param direction - 'enter' (show items) or 'exit' (hide items)\n * @param reversed - Whether to reverse the stagger order (last item first)\n * @param onMotionFinish - Callback fired when the full stagger sequence completes\n * @param hideMode - How children's visibility is managed: 'visibleProp', 'visibilityStyle', or 'unmount'\n *\n * @returns An object with `itemsVisibility: Record<string, boolean>` indicating which items are currently visible by key\n */\nexport function useStaggerItemsVisibility({\n childMapping,\n itemDelay,\n itemDuration = DEFAULT_ITEM_DURATION,\n direction,\n reversed = false,\n onMotionFinish,\n hideMode = 'visibleProp',\n}: UseStaggerItemsVisibilityParams): { itemsVisibility: Record<string, boolean> } {\n const [requestAnimationFrame, cancelAnimationFrame] = useAnimationFrame();\n\n // Stabilize the callback reference to avoid re-triggering effects on every render\n const handleMotionFinish = useEventCallback(\n onMotionFinish ??\n (() => {\n return;\n }),\n );\n\n // Track animation state independently of child changes\n const [animationKey, setAnimationKey] = React.useState(0);\n const prevDirection = React.useRef(direction);\n\n // Only trigger new animation when direction actually changes, not when children change\n React.useEffect(() => {\n if (prevDirection.current !== direction) {\n setAnimationKey(prev => prev + 1);\n prevDirection.current = direction;\n }\n }, [direction]);\n\n // State: visibility mapping for all items by key\n const [itemsVisibility, setItemsVisibility] = React.useState<Record<string, boolean>>(() => {\n const initial: Record<string, boolean> = {};\n // All hide modes start in final state: visible for 'enter', hidden for 'exit'\n const initialState = direction === 'enter';\n Object.keys(childMapping).forEach(key => {\n initial[key] = initialState;\n });\n return initial;\n });\n\n // Update visibility mapping when childMapping changes\n React.useEffect(() => {\n // eslint-disable-next-line react-hooks/set-state-in-effect\n setItemsVisibility(prev => {\n const next: Record<string, boolean> = {};\n const targetState = direction === 'enter';\n\n // Add or update items from new mapping\n Object.keys(childMapping).forEach(key => {\n if (key in prev) {\n // Existing item - preserve its visibility state\n next[key] = prev[key];\n } else {\n // New item - set to target state\n next[key] = targetState;\n }\n });\n\n // Note: Items that were in prev but not in childMapping are automatically removed\n // because we only iterate over keys in childMapping\n\n return next;\n });\n }, [childMapping, direction]);\n\n // Refs: animation timing and control\n const startTimeRef = React.useRef<number | null>(null);\n const frameRef = React.useRef<number | null>(null);\n const finishedRef = React.useRef(false);\n const isFirstRender = React.useRef(true);\n\n // Use ref to avoid re-running the animation when child mapping changes\n const childMappingRef = React.useRef(childMapping);\n\n // Update childMapping ref whenever it changes\n React.useEffect(() => {\n childMappingRef.current = childMapping;\n }, [childMapping]);\n\n // Use ref for reversed to avoid re-running animation when it changes\n const reversedRef = React.useRef(reversed);\n\n // Update reversed ref whenever it changes\n React.useEffect(() => {\n reversedRef.current = reversed;\n }, [reversed]);\n\n // ====== ANIMATION EFFECT ======\n\n React.useEffect(() => {\n let cancelled = false;\n startTimeRef.current = null;\n finishedRef.current = false;\n\n // All hide modes skip animation on first render - items are already in their final state\n if (isFirstRender.current) {\n isFirstRender.current = false;\n // Items are already in their final state from useState, no animation needed\n handleMotionFinish();\n return; // No cleanup needed for first render\n }\n\n // For animations after first render, start from the opposite of the final state\n // - Enter animation: start hidden (false), animate to visible (true)\n // - Exit animation: start visible (true), animate to hidden (false)\n const startState = direction === 'exit';\n // Use childMappingRef.current to avoid adding childMapping to dependencies\n const initialVisibility: Record<string, boolean> = {};\n Object.keys(childMappingRef.current).forEach(key => {\n initialVisibility[key] = startState;\n });\n setItemsVisibility(initialVisibility);\n\n // Animation loop: update visibility on each frame until complete\n const tick = (now: number) => {\n if (cancelled) {\n return;\n }\n if (startTimeRef.current === null) {\n startTimeRef.current = now;\n }\n const elapsed = now - (startTimeRef.current as number);\n\n const childKeys = Object.keys(childMappingRef.current);\n const itemCount = childKeys.length;\n\n const result = staggerItemsVisibilityAtTime({\n itemCount,\n elapsed,\n itemDelay,\n itemDuration,\n direction,\n reversed: reversedRef.current,\n });\n\n // Convert boolean array to keyed object\n const nextVisibility: Record<string, boolean> = {};\n childKeys.forEach((key, idx) => {\n nextVisibility[key] = result.itemsVisibility[idx];\n });\n\n setItemsVisibility(nextVisibility);\n\n if (elapsed < result.totalDuration) {\n frameRef.current = requestAnimationFrame(tick);\n } else if (!finishedRef.current) {\n finishedRef.current = true;\n handleMotionFinish();\n }\n };\n\n frameRef.current = requestAnimationFrame(tick);\n return () => {\n cancelled = true;\n if (frameRef.current) {\n cancelAnimationFrame();\n }\n };\n }, [\n animationKey,\n itemDelay,\n itemDuration,\n direction,\n requestAnimationFrame,\n cancelAnimationFrame,\n handleMotionFinish,\n ]);\n\n return { itemsVisibility };\n}\n"],"names":["React","useAnimationFrame","useEventCallback","staggerItemsVisibilityAtTime","DEFAULT_ITEM_DURATION","useStaggerItemsVisibility","childMapping","itemDelay","itemDuration","direction","reversed","onMotionFinish","hideMode","requestAnimationFrame","cancelAnimationFrame","handleMotionFinish","animationKey","setAnimationKey","useState","prevDirection","useRef","useEffect","current","prev","itemsVisibility","setItemsVisibility","initial","initialState","Object","keys","forEach","key","next","targetState","startTimeRef","frameRef","finishedRef","isFirstRender","childMappingRef","reversedRef","cancelled","startState","initialVisibility","tick","now","elapsed","childKeys","itemCount","length","result","nextVisibility","idx","totalDuration"],"mappings":"AAAA;AAEA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,iBAAiB,EAAEC,gBAAgB,QAAQ,4BAA4B;AAEhF,SACEC,4BAA4B,EAE5BC,qBAAq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ACjCY,aAAaZ,OAAO,GAAGsB;YACzB;YACA,MAAMC,UAAUD,MAAOV,aAAaZ,OAAO;YAE3C,MAAMwB,YAAYlB,OAAOC,IAAI,CAACS,gBAAgBhB,OAAO;YACrD,MAAMyB,YAAYD,UAAUE,MAAM;YAElC,MAAMC,SAAS9C,6BAA6B;gBAC1C4C;gBACAF;gBACAtC;gBACAC;gBACAC;gBACAC,UAAU6B,YAAYjB,OAAO;YAC/B;YAEA,wCAAwC;YACxC,MAAM4B,iBAA0C,CAAC;YACjDJ,UAAUhB,OAAO,CAAC,CAACC,KAAKoB;gBACtBD,cAAc,CAACnB,IAAI,GAAGkB,OAAOzB,eAAe,CAAC2B,IAAI;YACnD;YAEA1B,mBAAmByB;YAEnB,IAAIL,UAAUI,OAAOG,aAAa,EAAE;gBAClCjB,SAASb,OAAO,GAAGT,sBAAsB8B;YAC3C,OAAO,IAAI,CAACP,YAAYd,OAAO,EAAE;gBAC/Bc,YAAYd,OAAO,GAAG;gBACtBP;YACF;QACF;QAEAoB,SAASb,OAAO,GAAGT,sBAAsB8B;QACzC,OAAO;YACLH,YAAY;YACZ,IAAIL,SAASb,OAAO,EAAE;gBACpBR;YACF;QACF;IACF,GAAG;QACDE;QACAT;QACAC;QACAC;QACAI;QACAC;QACAC;KACD;IAED,OAAO;QAAES;IAAgB;AAC3B"}
@@ -1,5 +1,5 @@
1
1
  /**
2
2
  * Default timing constants for stagger animations (milliseconds).
3
- */ import { motionTokens } from '@fluentui/react-motion';
3
+ */ import { motionTokens } from "@fluentui/react-motion";
4
4
  /** Default delay in milliseconds between each item's animation start */ export const DEFAULT_ITEM_DELAY = motionTokens.durationFaster;
5
5
  /** Default duration in milliseconds for each item's animation */ export const DEFAULT_ITEM_DURATION = motionTokens.durationNormal;
@@ -1,4 +1,4 @@
1
- import * as React from 'react';
1
+ import * as React from "react";
2
2
  /**
3
3
  * Given `children`, return an object mapping key to child element and its index.
4
4
  * This allows tracking individual items by identity (via React keys) rather than by position.