@cossistant/react 0.0.7 → 0.0.8

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 (69) hide show
  1. package/api.d.ts +71 -0
  2. package/api.d.ts.map +1 -0
  3. package/checks.d.ts +189 -0
  4. package/checks.d.ts.map +1 -0
  5. package/clsx.d.ts +7 -0
  6. package/clsx.d.ts.map +1 -0
  7. package/coerce.d.ts +9 -0
  8. package/coerce.d.ts.map +1 -0
  9. package/conversation.d.ts +224 -220
  10. package/conversation.d.ts.map +1 -1
  11. package/core.d.ts +35 -0
  12. package/core.d.ts.map +1 -0
  13. package/errors.d.ts +121 -0
  14. package/errors.d.ts.map +1 -0
  15. package/errors2.d.ts +24 -0
  16. package/errors2.d.ts.map +1 -0
  17. package/hooks/private/use-grouped-messages.d.ts +1 -1
  18. package/hooks/use-conversation-seen.d.ts +1 -1
  19. package/hooks/use-create-conversation.d.ts +1 -1
  20. package/hooks/use-realtime-support.d.ts.map +1 -1
  21. package/index2.d.ts +4 -0
  22. package/index3.d.ts +1 -0
  23. package/index4.d.ts +18 -0
  24. package/index4.d.ts.map +1 -0
  25. package/index5.d.ts +999 -0
  26. package/index5.d.ts.map +1 -0
  27. package/index6.d.ts +6 -0
  28. package/metadata.d.ts +1 -0
  29. package/openapi-generator.d.ts +1 -0
  30. package/openapi-generator2.d.ts +1 -0
  31. package/openapi-generator3.d.ts +1 -0
  32. package/openapi30.d.ts +125 -0
  33. package/openapi30.d.ts.map +1 -0
  34. package/openapi31.d.ts +131 -0
  35. package/openapi31.d.ts.map +1 -0
  36. package/package.json +15 -3
  37. package/parse.d.ts +17 -0
  38. package/parse.d.ts.map +1 -0
  39. package/primitives/multimodal-input.d.ts +2 -2
  40. package/primitives/multimodal-input.d.ts.map +1 -1
  41. package/react.d.ts +4 -0
  42. package/realtime/seen-store.d.ts +1 -1
  43. package/realtime-events.d.ts +273 -271
  44. package/realtime-events.d.ts.map +1 -1
  45. package/registries.d.ts +32 -0
  46. package/registries.d.ts.map +1 -0
  47. package/schemas.d.ts +670 -93
  48. package/schemas.d.ts.map +1 -1
  49. package/schemas2.d.ts +320 -0
  50. package/schemas2.d.ts.map +1 -0
  51. package/schemas3.d.ts +98 -0
  52. package/schemas3.d.ts.map +1 -0
  53. package/specification-extension.d.ts +9 -0
  54. package/specification-extension.d.ts.map +1 -0
  55. package/standard-schema.d.ts +59 -0
  56. package/standard-schema.d.ts.map +1 -0
  57. package/support/components/text-effect.d.ts +2 -1
  58. package/support/components/text-effect.d.ts.map +1 -1
  59. package/support/utils/index.d.ts +1 -1
  60. package/timeline-item.d.ts +97 -93
  61. package/timeline-item.d.ts.map +1 -1
  62. package/types.d-BJcRxCew.d.ts +39 -0
  63. package/types.d-BJcRxCew.d.ts.map +1 -0
  64. package/util.d.ts +41 -0
  65. package/util.d.ts.map +1 -0
  66. package/versions.d.ts +9 -0
  67. package/versions.d.ts.map +1 -0
  68. package/zod-extensions.d.ts +39 -0
  69. package/zod-extensions.d.ts.map +1 -0
package/index5.d.ts ADDED
@@ -0,0 +1,999 @@
1
+ import { Easing } from "./index4.js";
2
+
3
+ //#region ../../node_modules/.bun/motion-dom@12.23.23/node_modules/motion-dom/dist/index.d.ts
4
+ interface SVGAttributes {
5
+ accentHeight?: AnyResolvedKeyframe | undefined;
6
+ accumulate?: "none" | "sum" | undefined;
7
+ additive?: "replace" | "sum" | undefined;
8
+ alignmentBaseline?: "auto" | "baseline" | "before-edge" | "text-before-edge" | "middle" | "central" | "after-edge" | "text-after-edge" | "ideographic" | "alphabetic" | "hanging" | "mathematical" | "inherit" | undefined;
9
+ allowReorder?: "no" | "yes" | undefined;
10
+ alphabetic?: AnyResolvedKeyframe | undefined;
11
+ amplitude?: AnyResolvedKeyframe | undefined;
12
+ arabicForm?: "initial" | "medial" | "terminal" | "isolated" | undefined;
13
+ ascent?: AnyResolvedKeyframe | undefined;
14
+ attributeName?: string | undefined;
15
+ attributeType?: string | undefined;
16
+ autoReverse?: boolean | undefined;
17
+ azimuth?: AnyResolvedKeyframe | undefined;
18
+ baseFrequency?: AnyResolvedKeyframe | undefined;
19
+ baselineShift?: AnyResolvedKeyframe | undefined;
20
+ baseProfile?: AnyResolvedKeyframe | undefined;
21
+ bbox?: AnyResolvedKeyframe | undefined;
22
+ begin?: AnyResolvedKeyframe | undefined;
23
+ bias?: AnyResolvedKeyframe | undefined;
24
+ by?: AnyResolvedKeyframe | undefined;
25
+ calcMode?: AnyResolvedKeyframe | undefined;
26
+ capHeight?: AnyResolvedKeyframe | undefined;
27
+ clip?: AnyResolvedKeyframe | undefined;
28
+ clipPath?: string | undefined;
29
+ clipPathUnits?: AnyResolvedKeyframe | undefined;
30
+ clipRule?: AnyResolvedKeyframe | undefined;
31
+ colorInterpolation?: AnyResolvedKeyframe | undefined;
32
+ colorInterpolationFilters?: "auto" | "sRGB" | "linearRGB" | "inherit" | undefined;
33
+ colorProfile?: AnyResolvedKeyframe | undefined;
34
+ colorRendering?: AnyResolvedKeyframe | undefined;
35
+ contentScriptType?: AnyResolvedKeyframe | undefined;
36
+ contentStyleType?: AnyResolvedKeyframe | undefined;
37
+ cursor?: AnyResolvedKeyframe | undefined;
38
+ cx?: AnyResolvedKeyframe | undefined;
39
+ cy?: AnyResolvedKeyframe | undefined;
40
+ d?: string | undefined;
41
+ decelerate?: AnyResolvedKeyframe | undefined;
42
+ descent?: AnyResolvedKeyframe | undefined;
43
+ diffuseConstant?: AnyResolvedKeyframe | undefined;
44
+ direction?: AnyResolvedKeyframe | undefined;
45
+ display?: AnyResolvedKeyframe | undefined;
46
+ divisor?: AnyResolvedKeyframe | undefined;
47
+ dominantBaseline?: AnyResolvedKeyframe | undefined;
48
+ dur?: AnyResolvedKeyframe | undefined;
49
+ dx?: AnyResolvedKeyframe | undefined;
50
+ dy?: AnyResolvedKeyframe | undefined;
51
+ edgeMode?: AnyResolvedKeyframe | undefined;
52
+ elevation?: AnyResolvedKeyframe | undefined;
53
+ enableBackground?: AnyResolvedKeyframe | undefined;
54
+ end?: AnyResolvedKeyframe | undefined;
55
+ exponent?: AnyResolvedKeyframe | undefined;
56
+ externalResourcesRequired?: boolean | undefined;
57
+ fill?: string | undefined;
58
+ fillOpacity?: AnyResolvedKeyframe | undefined;
59
+ fillRule?: "nonzero" | "evenodd" | "inherit" | undefined;
60
+ filter?: string | undefined;
61
+ filterRes?: AnyResolvedKeyframe | undefined;
62
+ filterUnits?: AnyResolvedKeyframe | undefined;
63
+ floodColor?: AnyResolvedKeyframe | undefined;
64
+ floodOpacity?: AnyResolvedKeyframe | undefined;
65
+ focusable?: boolean | "auto" | undefined;
66
+ fontFamily?: string | undefined;
67
+ fontSize?: AnyResolvedKeyframe | undefined;
68
+ fontSizeAdjust?: AnyResolvedKeyframe | undefined;
69
+ fontStretch?: AnyResolvedKeyframe | undefined;
70
+ fontStyle?: AnyResolvedKeyframe | undefined;
71
+ fontVariant?: AnyResolvedKeyframe | undefined;
72
+ fontWeight?: AnyResolvedKeyframe | undefined;
73
+ format?: AnyResolvedKeyframe | undefined;
74
+ fr?: AnyResolvedKeyframe | undefined;
75
+ from?: AnyResolvedKeyframe | undefined;
76
+ fx?: AnyResolvedKeyframe | undefined;
77
+ fy?: AnyResolvedKeyframe | undefined;
78
+ g1?: AnyResolvedKeyframe | undefined;
79
+ g2?: AnyResolvedKeyframe | undefined;
80
+ glyphName?: AnyResolvedKeyframe | undefined;
81
+ glyphOrientationHorizontal?: AnyResolvedKeyframe | undefined;
82
+ glyphOrientationVertical?: AnyResolvedKeyframe | undefined;
83
+ glyphRef?: AnyResolvedKeyframe | undefined;
84
+ gradientTransform?: string | undefined;
85
+ gradientUnits?: string | undefined;
86
+ hanging?: AnyResolvedKeyframe | undefined;
87
+ horizAdvX?: AnyResolvedKeyframe | undefined;
88
+ horizOriginX?: AnyResolvedKeyframe | undefined;
89
+ href?: string | undefined;
90
+ ideographic?: AnyResolvedKeyframe | undefined;
91
+ imageRendering?: AnyResolvedKeyframe | undefined;
92
+ in2?: AnyResolvedKeyframe | undefined;
93
+ in?: string | undefined;
94
+ intercept?: AnyResolvedKeyframe | undefined;
95
+ k1?: AnyResolvedKeyframe | undefined;
96
+ k2?: AnyResolvedKeyframe | undefined;
97
+ k3?: AnyResolvedKeyframe | undefined;
98
+ k4?: AnyResolvedKeyframe | undefined;
99
+ k?: AnyResolvedKeyframe | undefined;
100
+ kernelMatrix?: AnyResolvedKeyframe | undefined;
101
+ kernelUnitLength?: AnyResolvedKeyframe | undefined;
102
+ kerning?: AnyResolvedKeyframe | undefined;
103
+ keyPoints?: AnyResolvedKeyframe | undefined;
104
+ keySplines?: AnyResolvedKeyframe | undefined;
105
+ keyTimes?: AnyResolvedKeyframe | undefined;
106
+ lengthAdjust?: AnyResolvedKeyframe | undefined;
107
+ letterSpacing?: AnyResolvedKeyframe | undefined;
108
+ lightingColor?: AnyResolvedKeyframe | undefined;
109
+ limitingConeAngle?: AnyResolvedKeyframe | undefined;
110
+ local?: AnyResolvedKeyframe | undefined;
111
+ markerEnd?: string | undefined;
112
+ markerHeight?: AnyResolvedKeyframe | undefined;
113
+ markerMid?: string | undefined;
114
+ markerStart?: string | undefined;
115
+ markerUnits?: AnyResolvedKeyframe | undefined;
116
+ markerWidth?: AnyResolvedKeyframe | undefined;
117
+ mask?: string | undefined;
118
+ maskContentUnits?: AnyResolvedKeyframe | undefined;
119
+ maskUnits?: AnyResolvedKeyframe | undefined;
120
+ mathematical?: AnyResolvedKeyframe | undefined;
121
+ mode?: AnyResolvedKeyframe | undefined;
122
+ numOctaves?: AnyResolvedKeyframe | undefined;
123
+ offset?: AnyResolvedKeyframe | undefined;
124
+ opacity?: AnyResolvedKeyframe | undefined;
125
+ operator?: AnyResolvedKeyframe | undefined;
126
+ order?: AnyResolvedKeyframe | undefined;
127
+ orient?: AnyResolvedKeyframe | undefined;
128
+ orientation?: AnyResolvedKeyframe | undefined;
129
+ origin?: AnyResolvedKeyframe | undefined;
130
+ overflow?: AnyResolvedKeyframe | undefined;
131
+ overlinePosition?: AnyResolvedKeyframe | undefined;
132
+ overlineThickness?: AnyResolvedKeyframe | undefined;
133
+ paintOrder?: AnyResolvedKeyframe | undefined;
134
+ panose1?: AnyResolvedKeyframe | undefined;
135
+ path?: string | undefined;
136
+ pathLength?: AnyResolvedKeyframe | undefined;
137
+ patternContentUnits?: string | undefined;
138
+ patternTransform?: AnyResolvedKeyframe | undefined;
139
+ patternUnits?: string | undefined;
140
+ pointerEvents?: AnyResolvedKeyframe | undefined;
141
+ points?: string | undefined;
142
+ pointsAtX?: AnyResolvedKeyframe | undefined;
143
+ pointsAtY?: AnyResolvedKeyframe | undefined;
144
+ pointsAtZ?: AnyResolvedKeyframe | undefined;
145
+ preserveAlpha?: boolean | undefined;
146
+ preserveAspectRatio?: string | undefined;
147
+ primitiveUnits?: AnyResolvedKeyframe | undefined;
148
+ r?: AnyResolvedKeyframe | undefined;
149
+ radius?: AnyResolvedKeyframe | undefined;
150
+ refX?: AnyResolvedKeyframe | undefined;
151
+ refY?: AnyResolvedKeyframe | undefined;
152
+ renderingIntent?: AnyResolvedKeyframe | undefined;
153
+ repeatCount?: AnyResolvedKeyframe | undefined;
154
+ repeatDur?: AnyResolvedKeyframe | undefined;
155
+ requiredExtensions?: AnyResolvedKeyframe | undefined;
156
+ requiredFeatures?: AnyResolvedKeyframe | undefined;
157
+ restart?: AnyResolvedKeyframe | undefined;
158
+ result?: string | undefined;
159
+ rotate?: AnyResolvedKeyframe | undefined;
160
+ rx?: AnyResolvedKeyframe | undefined;
161
+ ry?: AnyResolvedKeyframe | undefined;
162
+ scale?: AnyResolvedKeyframe | undefined;
163
+ seed?: AnyResolvedKeyframe | undefined;
164
+ shapeRendering?: AnyResolvedKeyframe | undefined;
165
+ slope?: AnyResolvedKeyframe | undefined;
166
+ spacing?: AnyResolvedKeyframe | undefined;
167
+ specularConstant?: AnyResolvedKeyframe | undefined;
168
+ specularExponent?: AnyResolvedKeyframe | undefined;
169
+ speed?: AnyResolvedKeyframe | undefined;
170
+ spreadMethod?: string | undefined;
171
+ startOffset?: AnyResolvedKeyframe | undefined;
172
+ stdDeviation?: AnyResolvedKeyframe | undefined;
173
+ stemh?: AnyResolvedKeyframe | undefined;
174
+ stemv?: AnyResolvedKeyframe | undefined;
175
+ stitchTiles?: AnyResolvedKeyframe | undefined;
176
+ stopColor?: string | undefined;
177
+ stopOpacity?: AnyResolvedKeyframe | undefined;
178
+ strikethroughPosition?: AnyResolvedKeyframe | undefined;
179
+ strikethroughThickness?: AnyResolvedKeyframe | undefined;
180
+ string?: AnyResolvedKeyframe | undefined;
181
+ stroke?: string | undefined;
182
+ strokeDasharray?: AnyResolvedKeyframe | undefined;
183
+ strokeDashoffset?: AnyResolvedKeyframe | undefined;
184
+ strokeLinecap?: "butt" | "round" | "square" | "inherit" | undefined;
185
+ strokeLinejoin?: "miter" | "round" | "bevel" | "inherit" | undefined;
186
+ strokeMiterlimit?: AnyResolvedKeyframe | undefined;
187
+ strokeOpacity?: AnyResolvedKeyframe | undefined;
188
+ strokeWidth?: AnyResolvedKeyframe | undefined;
189
+ surfaceScale?: AnyResolvedKeyframe | undefined;
190
+ systemLanguage?: AnyResolvedKeyframe | undefined;
191
+ tableValues?: AnyResolvedKeyframe | undefined;
192
+ targetX?: AnyResolvedKeyframe | undefined;
193
+ targetY?: AnyResolvedKeyframe | undefined;
194
+ textAnchor?: string | undefined;
195
+ textDecoration?: AnyResolvedKeyframe | undefined;
196
+ textLength?: AnyResolvedKeyframe | undefined;
197
+ textRendering?: AnyResolvedKeyframe | undefined;
198
+ to?: AnyResolvedKeyframe | undefined;
199
+ transform?: string | undefined;
200
+ u1?: AnyResolvedKeyframe | undefined;
201
+ u2?: AnyResolvedKeyframe | undefined;
202
+ underlinePosition?: AnyResolvedKeyframe | undefined;
203
+ underlineThickness?: AnyResolvedKeyframe | undefined;
204
+ unicode?: AnyResolvedKeyframe | undefined;
205
+ unicodeBidi?: AnyResolvedKeyframe | undefined;
206
+ unicodeRange?: AnyResolvedKeyframe | undefined;
207
+ unitsPerEm?: AnyResolvedKeyframe | undefined;
208
+ vAlphabetic?: AnyResolvedKeyframe | undefined;
209
+ values?: string | undefined;
210
+ vectorEffect?: AnyResolvedKeyframe | undefined;
211
+ version?: string | undefined;
212
+ vertAdvY?: AnyResolvedKeyframe | undefined;
213
+ vertOriginX?: AnyResolvedKeyframe | undefined;
214
+ vertOriginY?: AnyResolvedKeyframe | undefined;
215
+ vHanging?: AnyResolvedKeyframe | undefined;
216
+ vIdeographic?: AnyResolvedKeyframe | undefined;
217
+ viewBox?: string | undefined;
218
+ viewTarget?: AnyResolvedKeyframe | undefined;
219
+ visibility?: AnyResolvedKeyframe | undefined;
220
+ vMathematical?: AnyResolvedKeyframe | undefined;
221
+ widths?: AnyResolvedKeyframe | undefined;
222
+ wordSpacing?: AnyResolvedKeyframe | undefined;
223
+ writingMode?: AnyResolvedKeyframe | undefined;
224
+ x1?: AnyResolvedKeyframe | undefined;
225
+ x2?: AnyResolvedKeyframe | undefined;
226
+ x?: AnyResolvedKeyframe | undefined;
227
+ xChannelSelector?: string | undefined;
228
+ xHeight?: AnyResolvedKeyframe | undefined;
229
+ xlinkActuate?: string | undefined;
230
+ xlinkArcrole?: string | undefined;
231
+ xlinkHref?: string | undefined;
232
+ xlinkRole?: string | undefined;
233
+ xlinkShow?: string | undefined;
234
+ xlinkTitle?: string | undefined;
235
+ xlinkType?: string | undefined;
236
+ xmlBase?: string | undefined;
237
+ xmlLang?: string | undefined;
238
+ xmlns?: string | undefined;
239
+ xmlnsXlink?: string | undefined;
240
+ xmlSpace?: string | undefined;
241
+ y1?: AnyResolvedKeyframe | undefined;
242
+ y2?: AnyResolvedKeyframe | undefined;
243
+ y?: AnyResolvedKeyframe | undefined;
244
+ yChannelSelector?: string | undefined;
245
+ z?: AnyResolvedKeyframe | undefined;
246
+ zoomAndPan?: string | undefined;
247
+ }
248
+
249
+ /**
250
+ * An update function. It accepts a timestamp used to advance the animation.
251
+ */
252
+ type Update$1 = (timestamp: number) => void;
253
+ /**
254
+ * Drivers accept a update function and call it at an interval. This interval
255
+ * could be a synchronous loop, a setInterval, or tied to the device's framerate.
256
+ */
257
+ interface DriverControls {
258
+ start: (keepAlive?: boolean) => void;
259
+ stop: () => void;
260
+ now: () => number;
261
+ }
262
+ type Driver = (update: Update$1) => DriverControls;
263
+
264
+ /**
265
+ * Temporary subset of VisualElement until VisualElement is
266
+ * moved to motion-dom
267
+ */
268
+
269
+ type AnyResolvedKeyframe = string | number;
270
+ interface ProgressTimeline {
271
+ currentTime: null | {
272
+ value: number;
273
+ };
274
+ cancel?: VoidFunction;
275
+ }
276
+ interface TimelineWithFallback {
277
+ timeline?: ProgressTimeline;
278
+ observe: (animation: AnimationPlaybackControls) => VoidFunction;
279
+ }
280
+ /**
281
+ * Methods to control an animation.
282
+ */
283
+ interface AnimationPlaybackControls {
284
+ /**
285
+ * The current time of the animation, in seconds.
286
+ */
287
+ time: number;
288
+ /**
289
+ * The playback speed of the animation.
290
+ * 1 = normal speed, 2 = double speed, 0.5 = half speed.
291
+ */
292
+ speed: number;
293
+ /**
294
+ * The start time of the animation, in milliseconds.
295
+ */
296
+ startTime: number | null;
297
+ /**
298
+ * The state of the animation.
299
+ *
300
+ * This is currently for internal use only.
301
+ */
302
+ state: AnimationPlayState;
303
+ duration: number;
304
+ /**
305
+ * The duration of the animation, including any delay.
306
+ */
307
+ iterationDuration: number;
308
+ /**
309
+ * Stops the animation at its current state, and prevents it from
310
+ * resuming when the animation is played again.
311
+ */
312
+ stop: () => void;
313
+ /**
314
+ * Plays the animation.
315
+ */
316
+ play: () => void;
317
+ /**
318
+ * Pauses the animation.
319
+ */
320
+ pause: () => void;
321
+ /**
322
+ * Completes the animation and applies the final state.
323
+ */
324
+ complete: () => void;
325
+ /**
326
+ * Cancels the animation and applies the initial state.
327
+ */
328
+ cancel: () => void;
329
+ /**
330
+ * Attaches a timeline to the animation, for instance the `ScrollTimeline`.
331
+ *
332
+ * This is currently for internal use only.
333
+ */
334
+ attachTimeline: (timeline: TimelineWithFallback) => VoidFunction;
335
+ finished: Promise<any>;
336
+ }
337
+ type AnimationPlaybackControlsWithThen = AnimationPlaybackControls & {
338
+ then: (onResolve: VoidFunction, onReject?: VoidFunction) => Promise<void>;
339
+ };
340
+ interface AnimationState<V> {
341
+ value: V;
342
+ done: boolean;
343
+ }
344
+ interface KeyframeGenerator<V> {
345
+ calculatedDuration: null | number;
346
+ next: (t: number) => AnimationState<V>;
347
+ toString: () => string;
348
+ }
349
+ interface ValueAnimationOptions<V extends AnyResolvedKeyframe = number> extends ValueAnimationTransition {
350
+ keyframes: V[];
351
+ element?: any;
352
+ name?: string;
353
+ motionValue?: MotionValue<V>;
354
+ from?: any;
355
+ isHandoff?: boolean;
356
+ allowFlatten?: boolean;
357
+ finalKeyframe?: V;
358
+ }
359
+ type GeneratorFactoryFunction = (options: ValueAnimationOptions<any>) => KeyframeGenerator<any>;
360
+ interface GeneratorFactory extends GeneratorFactoryFunction {
361
+ applyToOptions?: (options: Transition) => Transition;
362
+ }
363
+ type AnimationGeneratorName = "decay" | "spring" | "keyframes" | "tween" | "inertia";
364
+ type AnimationGeneratorType = GeneratorFactory | AnimationGeneratorName | false;
365
+ interface AnimationPlaybackLifecycles<V> {
366
+ onUpdate?: (latest: V) => void;
367
+ onPlay?: () => void;
368
+ onComplete?: () => void;
369
+ onRepeat?: () => void;
370
+ onStop?: () => void;
371
+ }
372
+ interface ValueAnimationTransition<V = any> extends ValueTransition, AnimationPlaybackLifecycles<V> {
373
+ isSync?: boolean;
374
+ }
375
+ type RepeatType = "loop" | "reverse" | "mirror";
376
+ interface AnimationPlaybackOptions {
377
+ /**
378
+ * The number of times to repeat the transition. Set to `Infinity` for perpetual repeating.
379
+ *
380
+ * Without setting `repeatType`, this will loop the animation.
381
+ *
382
+ * @public
383
+ */
384
+ repeat?: number;
385
+ /**
386
+ * How to repeat the animation. This can be either:
387
+ *
388
+ * "loop": Repeats the animation from the start
389
+ *
390
+ * "reverse": Alternates between forward and backwards playback
391
+ *
392
+ * "mirror": Switches `from` and `to` alternately
393
+ *
394
+ * @public
395
+ */
396
+ repeatType?: RepeatType;
397
+ /**
398
+ * When repeating an animation, `repeatDelay` will set the
399
+ * duration of the time to wait, in seconds, between each repetition.
400
+ *
401
+ * @public
402
+ */
403
+ repeatDelay?: number;
404
+ }
405
+ interface VelocityOptions {
406
+ velocity?: number;
407
+ /**
408
+ * End animation if absolute speed (in units per second) drops below this
409
+ * value and delta is smaller than `restDelta`. Set to `0.01` by default.
410
+ *
411
+ * @public
412
+ */
413
+ restSpeed?: number;
414
+ /**
415
+ * End animation if distance is below this value and speed is below
416
+ * `restSpeed`. When animation ends, spring gets "snapped" to. Set to
417
+ * `0.01` by default.
418
+ *
419
+ * @public
420
+ */
421
+ restDelta?: number;
422
+ }
423
+ interface DurationSpringOptions {
424
+ /**
425
+ * The total duration of the animation. Set to `0.3` by default.
426
+ *
427
+ * @public
428
+ */
429
+ duration?: number;
430
+ /**
431
+ * If visualDuration is set, this will override duration.
432
+ *
433
+ * The visual duration is a time, set in seconds, that the animation will take to visually appear to reach its target.
434
+ *
435
+ * In other words, the bulk of the transition will occur before this time, and the "bouncy bit" will mostly happen after.
436
+ *
437
+ * This makes it easier to edit a spring, as well as visually coordinate it with other time-based animations.
438
+ *
439
+ * @public
440
+ */
441
+ visualDuration?: number;
442
+ /**
443
+ * `bounce` determines the "bounciness" of a spring animation.
444
+ *
445
+ * `0` is no bounce, and `1` is extremely bouncy.
446
+ *
447
+ * If `duration` is set, this defaults to `0.25`.
448
+ *
449
+ * Note: `bounce` and `duration` will be overridden if `stiffness`, `damping` or `mass` are set.
450
+ *
451
+ * @public
452
+ */
453
+ bounce?: number;
454
+ }
455
+ interface SpringOptions extends DurationSpringOptions, VelocityOptions {
456
+ /**
457
+ * Stiffness of the spring. Higher values will create more sudden movement.
458
+ * Set to `100` by default.
459
+ *
460
+ * @public
461
+ */
462
+ stiffness?: number;
463
+ /**
464
+ * Strength of opposing force. If set to 0, spring will oscillate
465
+ * indefinitely. Set to `10` by default.
466
+ *
467
+ * @public
468
+ */
469
+ damping?: number;
470
+ /**
471
+ * Mass of the moving object. Higher values will result in more lethargic
472
+ * movement. Set to `1` by default.
473
+ *
474
+ * @public
475
+ */
476
+ mass?: number;
477
+ }
478
+ /**
479
+ * @deprecated Use SpringOptions instead
480
+ */
481
+
482
+ interface DecayOptions extends VelocityOptions {
483
+ keyframes?: number[];
484
+ /**
485
+ * A higher power value equals a further target. Set to `0.8` by default.
486
+ *
487
+ * @public
488
+ */
489
+ power?: number;
490
+ /**
491
+ * Adjusting the time constant will change the duration of the
492
+ * deceleration, thereby affecting its feel. Set to `700` by default.
493
+ *
494
+ * @public
495
+ */
496
+ timeConstant?: number;
497
+ /**
498
+ * A function that receives the automatically-calculated target and returns a new one. Useful for snapping the target to a grid.
499
+ *
500
+ * @public
501
+ */
502
+ modifyTarget?: (v: number) => number;
503
+ }
504
+ interface InertiaOptions extends DecayOptions {
505
+ /**
506
+ * If `min` or `max` is set, this affects the stiffness of the bounce
507
+ * spring. Higher values will create more sudden movement. Set to `500` by
508
+ * default.
509
+ *
510
+ * @public
511
+ */
512
+ bounceStiffness?: number;
513
+ /**
514
+ * If `min` or `max` is set, this affects the damping of the bounce spring.
515
+ * If set to `0`, spring will oscillate indefinitely. Set to `10` by
516
+ * default.
517
+ *
518
+ * @public
519
+ */
520
+ bounceDamping?: number;
521
+ /**
522
+ * Minimum constraint. If set, the value will "bump" against this value (or immediately spring to it if the animation starts as less than this value).
523
+ *
524
+ * @public
525
+ */
526
+ min?: number;
527
+ /**
528
+ * Maximum constraint. If set, the value will "bump" against this value (or immediately snap to it, if the initial animation value exceeds this value).
529
+ *
530
+ * @public
531
+ */
532
+ max?: number;
533
+ }
534
+ interface AnimationOrchestrationOptions {
535
+ /**
536
+ * Delay the animation by this duration (in seconds). Defaults to `0`.
537
+ *
538
+ * @public
539
+ */
540
+ delay?: number;
541
+ /**
542
+ * Describes the relationship between the transition and its children. Set
543
+ * to `false` by default.
544
+ *
545
+ * @remarks
546
+ * When using variants, the transition can be scheduled in relation to its
547
+ * children with either `"beforeChildren"` to finish this transition before
548
+ * starting children transitions, `"afterChildren"` to finish children
549
+ * transitions before starting this transition.
550
+ *
551
+ * @public
552
+ */
553
+ when?: false | "beforeChildren" | "afterChildren" | string;
554
+ /**
555
+ * When using variants, children animations will start after this duration
556
+ * (in seconds). You can add the `transition` property to both the `motion.div` and the
557
+ * `variant` directly. Adding it to the `variant` generally offers more flexibility,
558
+ * as it allows you to customize the delay per visual state.
559
+ *
560
+ * @public
561
+ */
562
+ delayChildren?: number | DynamicOption<number>;
563
+ /**
564
+ * When using variants, animations of child components can be staggered by this
565
+ * duration (in seconds).
566
+ *
567
+ * For instance, if `staggerChildren` is `0.01`, the first child will be
568
+ * delayed by `0` seconds, the second by `0.01`, the third by `0.02` and so
569
+ * on.
570
+ *
571
+ * The calculated stagger delay will be added to `delayChildren`.
572
+ *
573
+ * @deprecated - Use `delayChildren: stagger(interval)` instead.
574
+ */
575
+ staggerChildren?: number;
576
+ /**
577
+ * The direction in which to stagger children.
578
+ *
579
+ * A value of `1` staggers from the first to the last while `-1`
580
+ * staggers from the last to the first.
581
+ *
582
+ * @deprecated - Use `delayChildren: stagger(interval, { from: "last" })` instead.
583
+ */
584
+ staggerDirection?: number;
585
+ }
586
+ interface KeyframeOptions {
587
+ /**
588
+ * The total duration of the animation. Set to `0.3` by default.
589
+ *
590
+ * @public
591
+ */
592
+ duration?: number;
593
+ ease?: Easing | Easing[];
594
+ times?: number[];
595
+ }
596
+ interface ValueTransition extends AnimationOrchestrationOptions, AnimationPlaybackOptions, Omit<SpringOptions, "keyframes">, Omit<InertiaOptions, "keyframes">, KeyframeOptions {
597
+ /**
598
+ * Delay the animation by this duration (in seconds). Defaults to `0`.
599
+ *
600
+ * @public
601
+ */
602
+ delay?: number;
603
+ /**
604
+ * The duration of time already elapsed in the animation. Set to `0` by
605
+ * default.
606
+ */
607
+ elapsed?: number;
608
+ driver?: Driver;
609
+ /**
610
+ * Type of animation to use.
611
+ *
612
+ * - "tween": Duration-based animation with ease curve
613
+ * - "spring": Physics or duration-based spring animation
614
+ * - false: Use an instant animation
615
+ */
616
+ type?: AnimationGeneratorType;
617
+ /**
618
+ * The duration of the tween animation. Set to `0.3` by default, 0r `0.8` if animating a series of keyframes.
619
+ *
620
+ * @public
621
+ */
622
+ duration?: number;
623
+ autoplay?: boolean;
624
+ startTime?: number;
625
+ from?: any;
626
+ }
627
+ /**
628
+ * @deprecated Use KeyframeOptions instead
629
+ */
630
+
631
+ type SVGForcedAttrTransitions = { [K in keyof SVGForcedAttrProperties]: ValueTransition };
632
+ type SVGPathTransitions = { [K in keyof SVGPathProperties]: ValueTransition };
633
+ type SVGTransitions = { [K in keyof Omit<SVGAttributes, "from">]: ValueTransition };
634
+ interface VariableTransitions {
635
+ [key: `--${string}`]: ValueTransition;
636
+ }
637
+ type StyleTransitions = { [K in keyof CSSStyleDeclarationWithTransform]?: ValueTransition };
638
+ type ValueKeyframe<T extends AnyResolvedKeyframe = AnyResolvedKeyframe> = T;
639
+ type UnresolvedValueKeyframe<T extends AnyResolvedKeyframe = AnyResolvedKeyframe> = ValueKeyframe<T> | null;
640
+ type ValueKeyframesDefinition = ValueKeyframe | ValueKeyframe[] | UnresolvedValueKeyframe[];
641
+ type StyleKeyframesDefinition = { [K in keyof CSSStyleDeclarationWithTransform]?: ValueKeyframesDefinition };
642
+ type SVGKeyframesDefinition = { [K in keyof Omit<SVGAttributes, "from">]?: ValueKeyframesDefinition };
643
+ interface VariableKeyframesDefinition {
644
+ [key: `--${string}`]: ValueKeyframesDefinition;
645
+ }
646
+ type SVGForcedAttrKeyframesDefinition = { [K in keyof SVGForcedAttrProperties]?: ValueKeyframesDefinition };
647
+ type SVGPathKeyframesDefinition = { [K in keyof SVGPathProperties]?: ValueKeyframesDefinition };
648
+ type DOMKeyframesDefinition = StyleKeyframesDefinition & SVGKeyframesDefinition & SVGPathKeyframesDefinition & SVGForcedAttrKeyframesDefinition & VariableKeyframesDefinition;
649
+ interface Target extends DOMKeyframesDefinition {}
650
+ type CSSPropertyKeys = { [K in keyof CSSStyleDeclaration as K extends string ? CSSStyleDeclaration[K] extends AnyResolvedKeyframe ? K : never : never]: CSSStyleDeclaration[K] };
651
+ interface CSSStyleDeclarationWithTransform extends Omit<CSSPropertyKeys, "direction" | "transition" | "x" | "y" | "z"> {
652
+ x: number | string;
653
+ y: number | string;
654
+ z: number | string;
655
+ originX: number;
656
+ originY: number;
657
+ originZ: number;
658
+ translateX: number | string;
659
+ translateY: number | string;
660
+ translateZ: number | string;
661
+ rotateX: number | string;
662
+ rotateY: number | string;
663
+ rotateZ: number | string;
664
+ scaleX: number;
665
+ scaleY: number;
666
+ scaleZ: number;
667
+ skewX: number | string;
668
+ skewY: number | string;
669
+ transformPerspective: number;
670
+ }
671
+ type TransitionWithValueOverrides<V> = ValueAnimationTransition<V> & StyleTransitions & SVGPathTransitions & SVGForcedAttrTransitions & SVGTransitions & VariableTransitions & {
672
+ default?: ValueTransition;
673
+ layout?: ValueTransition;
674
+ };
675
+ type Transition<V = any> = ValueAnimationTransition<V> | TransitionWithValueOverrides<V>;
676
+ type DynamicOption<T> = (i: number, total: number) => T;
677
+ interface TransformProperties {
678
+ x?: AnyResolvedKeyframe;
679
+ y?: AnyResolvedKeyframe;
680
+ z?: AnyResolvedKeyframe;
681
+ translateX?: AnyResolvedKeyframe;
682
+ translateY?: AnyResolvedKeyframe;
683
+ translateZ?: AnyResolvedKeyframe;
684
+ rotate?: AnyResolvedKeyframe;
685
+ rotateX?: AnyResolvedKeyframe;
686
+ rotateY?: AnyResolvedKeyframe;
687
+ rotateZ?: AnyResolvedKeyframe;
688
+ scale?: AnyResolvedKeyframe;
689
+ scaleX?: AnyResolvedKeyframe;
690
+ scaleY?: AnyResolvedKeyframe;
691
+ scaleZ?: AnyResolvedKeyframe;
692
+ skew?: AnyResolvedKeyframe;
693
+ skewX?: AnyResolvedKeyframe;
694
+ skewY?: AnyResolvedKeyframe;
695
+ originX?: AnyResolvedKeyframe;
696
+ originY?: AnyResolvedKeyframe;
697
+ originZ?: AnyResolvedKeyframe;
698
+ perspective?: AnyResolvedKeyframe;
699
+ transformPerspective?: AnyResolvedKeyframe;
700
+ }
701
+ interface SVGForcedAttrProperties {
702
+ attrX?: number;
703
+ attrY?: number;
704
+ attrScale?: number;
705
+ }
706
+ interface SVGPathProperties {
707
+ pathLength?: number;
708
+ pathOffset?: number;
709
+ pathSpacing?: number;
710
+ }
711
+
712
+ /**
713
+ * @public
714
+ */
715
+ type Subscriber<T> = (v: T) => void;
716
+ /**
717
+ * @public
718
+ */
719
+ type PassiveEffect<T> = (v: T, safeSetter: (v: T) => void) => void;
720
+ type StartAnimation = (complete: () => void) => AnimationPlaybackControlsWithThen | undefined;
721
+ interface MotionValueEventCallbacks<V> {
722
+ animationStart: () => void;
723
+ animationComplete: () => void;
724
+ animationCancel: () => void;
725
+ change: (latestValue: V) => void;
726
+ destroy: () => void;
727
+ }
728
+ interface ResolvedValues$1 {
729
+ [key: string]: AnyResolvedKeyframe;
730
+ }
731
+ interface Owner {
732
+ current: HTMLElement | unknown;
733
+ getProps: () => {
734
+ onUpdate?: (latest: ResolvedValues$1) => void;
735
+ transformTemplate?: (transform: TransformProperties, generatedTransform: string) => string;
736
+ };
737
+ }
738
+ interface MotionValueOptions {
739
+ owner?: Owner;
740
+ }
741
+ /**
742
+ * `MotionValue` is used to track the state and velocity of motion values.
743
+ *
744
+ * @public
745
+ */
746
+ declare class MotionValue<V = any> {
747
+ /**
748
+ * If a MotionValue has an owner, it was created internally within Motion
749
+ * and therefore has no external listeners. It is therefore safe to animate via WAAPI.
750
+ */
751
+ owner?: Owner;
752
+ /**
753
+ * The current state of the `MotionValue`.
754
+ */
755
+ private current;
756
+ /**
757
+ * The previous state of the `MotionValue`.
758
+ */
759
+ private prev;
760
+ /**
761
+ * The previous state of the `MotionValue` at the end of the previous frame.
762
+ */
763
+ private prevFrameValue;
764
+ /**
765
+ * The last time the `MotionValue` was updated.
766
+ */
767
+ updatedAt: number;
768
+ /**
769
+ * The time `prevFrameValue` was updated.
770
+ */
771
+ prevUpdatedAt: number | undefined;
772
+ private stopPassiveEffect?;
773
+ /**
774
+ * Whether the passive effect is active.
775
+ */
776
+ isEffectActive?: boolean;
777
+ /**
778
+ * A reference to the currently-controlling animation.
779
+ */
780
+ animation?: AnimationPlaybackControlsWithThen;
781
+ /**
782
+ * A list of MotionValues whose values are computed from this one.
783
+ * This is a rough start to a proper signal-like dirtying system.
784
+ */
785
+ private dependents;
786
+ /**
787
+ * Tracks whether this value should be removed
788
+ */
789
+ liveStyle?: boolean;
790
+ /**
791
+ * @param init - The initiating value
792
+ * @param config - Optional configuration options
793
+ *
794
+ * - `transformer`: A function to transform incoming values with.
795
+ */
796
+ constructor(init: V, options?: MotionValueOptions);
797
+ setCurrent(current: V): void;
798
+ setPrevFrameValue(prevFrameValue?: V | undefined): void;
799
+ /**
800
+ * Adds a function that will be notified when the `MotionValue` is updated.
801
+ *
802
+ * It returns a function that, when called, will cancel the subscription.
803
+ *
804
+ * When calling `onChange` inside a React component, it should be wrapped with the
805
+ * `useEffect` hook. As it returns an unsubscribe function, this should be returned
806
+ * from the `useEffect` function to ensure you don't add duplicate subscribers..
807
+ *
808
+ * ```jsx
809
+ * export const MyComponent = () => {
810
+ * const x = useMotionValue(0)
811
+ * const y = useMotionValue(0)
812
+ * const opacity = useMotionValue(1)
813
+ *
814
+ * useEffect(() => {
815
+ * function updateOpacity() {
816
+ * const maxXY = Math.max(x.get(), y.get())
817
+ * const newOpacity = transform(maxXY, [0, 100], [1, 0])
818
+ * opacity.set(newOpacity)
819
+ * }
820
+ *
821
+ * const unsubscribeX = x.on("change", updateOpacity)
822
+ * const unsubscribeY = y.on("change", updateOpacity)
823
+ *
824
+ * return () => {
825
+ * unsubscribeX()
826
+ * unsubscribeY()
827
+ * }
828
+ * }, [])
829
+ *
830
+ * return <motion.div style={{ x }} />
831
+ * }
832
+ * ```
833
+ *
834
+ * @param subscriber - A function that receives the latest value.
835
+ * @returns A function that, when called, will cancel this subscription.
836
+ *
837
+ * @deprecated
838
+ */
839
+ onChange(subscription: Subscriber<V>): () => void;
840
+ /**
841
+ * An object containing a SubscriptionManager for each active event.
842
+ */
843
+ private events;
844
+ on<EventName extends keyof MotionValueEventCallbacks<V>>(eventName: EventName, callback: MotionValueEventCallbacks<V>[EventName]): VoidFunction;
845
+ clearListeners(): void;
846
+ /**
847
+ * Attaches a passive effect to the `MotionValue`.
848
+ */
849
+ attach(passiveEffect: PassiveEffect<V>, stopPassiveEffect: VoidFunction): void;
850
+ /**
851
+ * Sets the state of the `MotionValue`.
852
+ *
853
+ * @remarks
854
+ *
855
+ * ```jsx
856
+ * const x = useMotionValue(0)
857
+ * x.set(10)
858
+ * ```
859
+ *
860
+ * @param latest - Latest value to set.
861
+ * @param render - Whether to notify render subscribers. Defaults to `true`
862
+ *
863
+ * @public
864
+ */
865
+ set(v: V): void;
866
+ setWithVelocity(prev: V, current: V, delta: number): void;
867
+ /**
868
+ * Set the state of the `MotionValue`, stopping any active animations,
869
+ * effects, and resets velocity to `0`.
870
+ */
871
+ jump(v: V, endAnimation?: boolean): void;
872
+ dirty(): void;
873
+ addDependent(dependent: MotionValue): void;
874
+ removeDependent(dependent: MotionValue): void;
875
+ updateAndNotify: (v: V) => void;
876
+ /**
877
+ * Returns the latest state of `MotionValue`
878
+ *
879
+ * @returns - The latest state of `MotionValue`
880
+ *
881
+ * @public
882
+ */
883
+ get(): NonNullable<V>;
884
+ /**
885
+ * @public
886
+ */
887
+ getPrevious(): V | undefined;
888
+ /**
889
+ * Returns the latest velocity of `MotionValue`
890
+ *
891
+ * @returns - The latest velocity of `MotionValue`. Returns `0` if the state is non-numerical.
892
+ *
893
+ * @public
894
+ */
895
+ getVelocity(): number;
896
+ hasAnimated: boolean;
897
+ /**
898
+ * Registers a new animation to control this `MotionValue`. Only one
899
+ * animation can drive a `MotionValue` at one time.
900
+ *
901
+ * ```jsx
902
+ * value.start()
903
+ * ```
904
+ *
905
+ * @param animation - A function that starts the provided animation
906
+ */
907
+ start(startAnimation: StartAnimation): Promise<void>;
908
+ /**
909
+ * Stop the currently active animation.
910
+ *
911
+ * @public
912
+ */
913
+ stop(): void;
914
+ /**
915
+ * Returns `true` if this value is currently animating.
916
+ *
917
+ * @public
918
+ */
919
+ isAnimating(): boolean;
920
+ private clearAnimation;
921
+ /**
922
+ * Destroy and clean up subscribers to this `MotionValue`.
923
+ *
924
+ * The `MotionValue` hooks like `useMotionValue` and `useTransform` automatically
925
+ * handle the lifecycle of the returned `MotionValue`, so this method is only necessary if you've manually
926
+ * created a `MotionValue` via the `motionValue` function.
927
+ *
928
+ * @public
929
+ */
930
+ destroy(): void;
931
+ }
932
+ type Process = (data: FrameData) => void;
933
+ type Schedule = (process: Process, keepAlive?: boolean, immediate?: boolean) => Process;
934
+ type StepId = "setup" | "read" | "resolveKeyframes" | "preUpdate" | "update" | "preRender" | "render" | "postRender";
935
+ type Batcher = { [key in StepId]: Schedule };
936
+ interface FrameData {
937
+ delta: number;
938
+ timestamp: number;
939
+ isProcessing: boolean;
940
+ }
941
+ /**
942
+ * A generic set of string/number values
943
+ */
944
+ interface ResolvedValues {
945
+ [key: string]: AnyResolvedKeyframe;
946
+ }
947
+ /**
948
+ * An object that specifies values to animate to. Each value may be set either as
949
+ * a single value, or an array of values.
950
+ *
951
+ * It may also option contain these properties:
952
+ *
953
+ * - `transition`: Specifies transitions for all or individual values.
954
+ * - `transitionEnd`: Specifies values to set when the animation finishes.
955
+ *
956
+ * ```jsx
957
+ * const target = {
958
+ * x: "0%",
959
+ * opacity: 0,
960
+ * transition: { duration: 1 },
961
+ * transitionEnd: { display: "none" }
962
+ * }
963
+ * ```
964
+ *
965
+ * @public
966
+ */
967
+ type TargetAndTransition = Target & {
968
+ transition?: Transition;
969
+ transitionEnd?: ResolvedValues;
970
+ };
971
+ type TargetResolver = (custom: any, current: ResolvedValues, velocity: ResolvedValues) => TargetAndTransition | string;
972
+ /**
973
+ * Either a string, or array of strings, that reference variants defined via the `variants` prop.
974
+ * @public
975
+ */
976
+
977
+ type Variant = TargetAndTransition | TargetResolver;
978
+ interface Variants {
979
+ [key: string]: Variant;
980
+ }
981
+ /**
982
+ * @deprecated
983
+ */
984
+
985
+ declare global {
986
+ interface Window {
987
+ ScrollTimeline: ScrollTimeline;
988
+ }
989
+ }
990
+ declare class ScrollTimeline implements ProgressTimeline {
991
+ constructor(options: ScrollOptions);
992
+ currentTime: null | {
993
+ value: number;
994
+ };
995
+ cancel?: VoidFunction;
996
+ }
997
+ //#endregion
998
+ export { type AnimationGeneratorName, type AnimationGeneratorType, type AnimationOrchestrationOptions, type AnimationPlaybackControls, type AnimationPlaybackControlsWithThen, type AnimationPlaybackLifecycles, type AnimationPlaybackOptions, type AnimationState, type AnyResolvedKeyframe, type Batcher, type CSSStyleDeclarationWithTransform, type DOMKeyframesDefinition, type DecayOptions, type DurationSpringOptions, type DynamicOption, type FrameData, type GeneratorFactory, type GeneratorFactoryFunction, type InertiaOptions, type KeyframeGenerator, type KeyframeOptions, MotionValue, type MotionValueEventCallbacks, type MotionValueOptions, type Owner, type PassiveEffect, type Process, type ProgressTimeline, type RepeatType, type SVGAttributes, type SVGForcedAttrKeyframesDefinition, type SVGForcedAttrProperties, type SVGForcedAttrTransitions, type SVGKeyframesDefinition, type SVGPathKeyframesDefinition, type SVGPathProperties, type SVGPathTransitions, type SVGTransitions, type Schedule, type SpringOptions, type StartAnimation, type StepId, type StyleKeyframesDefinition, type StyleTransitions, type Subscriber, type Target, type TargetAndTransition, type TargetResolver, type TimelineWithFallback, type TransformProperties, type Transition, type TransitionWithValueOverrides, type UnresolvedValueKeyframe, type ValueAnimationOptions, type ValueAnimationTransition, type ValueKeyframe, type ValueKeyframesDefinition, type ValueTransition, type VariableKeyframesDefinition, type VariableTransitions, type Variant, type Variants, type VelocityOptions };
999
+ //# sourceMappingURL=index5.d.ts.map