unframer 0.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,4829 @@
1
+ /// <reference types="react" />
2
+
3
+ import { AnimationPlaybackControls } from 'framer-motion';
4
+ import { Component } from 'react';
5
+ import { ComponentType } from 'react';
6
+ import { ForwardRefExoticComponent } from 'react';
7
+ import type { HTMLMotionProps } from 'framer-motion';
8
+ import { DeprecatedLayoutGroupContext as LayoutGroupContext } from 'framer-motion';
9
+ import { MotionProps } from 'framer-motion';
10
+ import type { MotionStyle } from 'framer-motion';
11
+ import type { MotionTransform } from 'framer-motion';
12
+ import { MotionValue } from 'framer-motion';
13
+ import { PanInfo } from 'framer-motion';
14
+ import { PropsWithoutRef } from 'react';
15
+ import { default as React_2 } from 'react';
16
+ import type { ReactNode } from 'react';
17
+ import { RefAttributes } from 'react';
18
+ import { SpringOptions as SpringOptions_2 } from 'framer-motion';
19
+ import { TargetAndTransition } from 'framer-motion';
20
+ import { Transition } from 'framer-motion';
21
+ import { useDeprecatedAnimatedState as useAnimatedState } from 'framer-motion';
22
+ import { useDeprecatedInvertedScale as useInvertedScale } from 'framer-motion';
23
+ import { ValueAnimationTransition } from 'framer-motion';
24
+ import { VariantLabels } from 'framer-motion';
25
+
26
+ /** @public */
27
+ export declare function addFonts(component: React_2.ComponentType<unknown>, passedFonts: (ComponentFontV1 | ComponentFontBundle)[], flags?: {
28
+ supportsExplicitInterCodegen?: boolean;
29
+ }): void;
30
+
31
+ /**
32
+ * Extends component with property controls
33
+ *
34
+ * ```typescript
35
+ * export const MyComponent = props => <h1>{props.header}</h1>
36
+ *
37
+ * addPropertyControls(MyComponent, {
38
+ * header: { type: ControlType.String, title: "Header" },
39
+ * })
40
+ *
41
+ * ```
42
+ * @public
43
+ */
44
+ export declare function addPropertyControls<Props = any>(component: React_2.ComponentType<Props> | React_2.ForwardRefExoticComponent<Props> | HigherOrderComponent<Props>, propertyControls: PropertyControls<Props>): void;
45
+
46
+ declare type Alignment = "start" | "center" | "end";
47
+
48
+ /**
49
+ * @public
50
+ * @deprecated Use {@link useMotionValue} instead
51
+ */
52
+ declare interface Animatable_2<Value> extends UpdateObserver<Value> {
53
+ /**
54
+ * Get the current value out of this Animatable object
55
+ * @remarks
56
+ * ```jsx
57
+ * const a = Animatable(0)
58
+ * a.get() // returns 0
59
+ * await animate(a, 42)
60
+ * a.get() // returns 42
61
+ * ```
62
+ * @returns Current value
63
+ * @public
64
+ */
65
+ get(): Value;
66
+ /**
67
+ * Set a new value to a animatable object
68
+ * @remarks
69
+ * The passed value can be an Animatable value too
70
+ * ```jsx
71
+ * const a = Animatable(0)
72
+ * const b = Animatable(100)
73
+ * a.set(42)
74
+ * a.get() // returns 42
75
+ * a.set(b)
76
+ * a.get() // returns 100
77
+ * ```
78
+ * @param value - New value to set to the animatable
79
+ * @public
80
+ */
81
+ set(value: Value | Animatable_2<Value>): void;
82
+ /**
83
+ * @public
84
+ */
85
+ set(value: Value | Animatable_2<Value>, transaction?: TransactionId): void;
86
+
87
+ }
88
+
89
+ /**
90
+ * @public
91
+ */
92
+ declare const Animatable_2: {
93
+ <Value>(value: Value | Animatable_2<Value>): Animatable_2<Value>;
94
+
95
+ /**
96
+ * @public
97
+ */
98
+ getNumber(value: number | Animatable_2<number> | null | undefined, defaultValue?: number): number;
99
+
100
+
101
+ };
102
+ export { Animatable_2 as Animatable }
103
+
104
+ /** @public */
105
+ export declare type AnimatableObject<T> = {
106
+ [K in keyof T]: ToAnimatableOrValue<T[K]>;
107
+ };
108
+
109
+ /**
110
+ * @public
111
+ * @deprecated Use the {@link MotionProps.animate} prop on {@link Frame} instead.
112
+ */
113
+ export declare const animate: {
114
+ <Value, Options>(from: DeprecatedAnimationTarget<Value>, to: Value, animator?: AnimatorClass<Value, Options> | undefined, options?: Partial<Options & DeprecatedAnimationOptions<Value>> | undefined): FramerAnimation<Value, Options>;
115
+ <V>(from: V | MotionValue<V>, to: V | V[], transition?: (Transition & AnimationPlaybackLifecycles<V>) | undefined): AnimationPlaybackControls;
116
+ /**
117
+ * Animate value with a spring curve
118
+ * @remarks
119
+ * ```jsx
120
+ * const value = Animatable(0)
121
+ * animate.spring(value, 100, {tension: 100, friction: 100})
122
+ *
123
+ * animate.spring(value, 100, {dampingRatio: 0.5, duration: 1})
124
+ * ```
125
+ * @param from - Value to animate
126
+ * @param to - Value to animate to
127
+ * @param options - Options for the spring
128
+ * These can be either `tension`, `friction`, `velocity` and `tolerance` _or_ `dampingRatio`, `duration`, `velocity` and `mass`
129
+ * @returns Instance of {@link FramerAnimation} that can be used to control the animation
130
+ * @deprecated Use {@link MotionProps.animate} on {@link Frame} instead.
131
+ */
132
+ spring<Value_1>(from: DeprecatedAnimationTarget<Value_1>, to: Value_1, options?: Partial<SpringOptions & DeprecatedAnimationOptions<Value_1>> | undefined): FramerAnimation<Value_1, SpringOptions>;
133
+ /**
134
+ * Animate value with a bezier curve
135
+ * @remarks
136
+ * ```jsx
137
+ * const value = Animatable(0)
138
+ * animate.bezier(value, 100, {duration: 1, curve: Bezier.EaseIn})
139
+ *
140
+ * animate.bezier(value, 100, {duration: 1, curve: [0.3, 0.1, 0.4, 1]})
141
+ * ```
142
+ * @param from - Value to animate
143
+ * @param to - Value to animate to
144
+ * @param options - Options for the bezier curve
145
+ *
146
+ * - `duration` Duration of the animation
147
+ * - `curve` One of the `Bezier` enum values or an array with 4 control points
148
+ *
149
+ * @returns Instance of {@link FramerAnimation} that can be used to control the animation
150
+ * @deprecated Use {@link MotionProps.animate} on {@link Frame} instead.
151
+ */
152
+ bezier<Value_2>(from: DeprecatedAnimationTarget<Value_2>, to: Value_2, options?: Partial<BezierOptions & DeprecatedAnimationOptions<Value_2>> | undefined): FramerAnimation<Value_2, BezierOptions>;
153
+ /**
154
+ * Animate value with a linear animation
155
+ * @remarks
156
+ * ```jsx
157
+ * const value = Animatable(0)
158
+ * animate.linear(value, 100)
159
+ *
160
+ * animate.linear(value, 100, {duration: 1})
161
+ * ```
162
+ * @param from - Value to animate
163
+ * @param to - Value to animate to
164
+ * @param options - The options for the animation
165
+ *
166
+ * - `duration` - Duration of the animation
167
+ *
168
+ * @returns Instance of {@link FramerAnimation} that can be used to control the animation
169
+ * @deprecated Use {@link MotionProps.animate} on {@link Frame} instead.
170
+ */
171
+ linear<Value_3>(from: DeprecatedAnimationTarget<Value_3>, to: Value_3, options?: Partial<EaseOptions & DeprecatedAnimationOptions<Value_3>> | undefined): FramerAnimation<Value_3, BezierOptions>;
172
+ /**
173
+ * Animate value with a ease animation
174
+ * @remarks
175
+ * ```jsx
176
+ * const value = Animatable(0)
177
+ * animate.ease(value, 100)
178
+ *
179
+ * animate.ease(value, 100, {duration: 1})
180
+ * ```
181
+ * @param from - Value to animate
182
+ * @param to - Value to animate to
183
+ * @param options - The options for the animation
184
+ *
185
+ * - `duration` - Duration of the animation
186
+ *
187
+ * @returns Instance of {@link FramerAnimation} that can be used to control the animation
188
+ * @deprecated Use {@link MotionProps.animate} on {@link Frame} instead.
189
+ */
190
+ ease<Value_4>(from: DeprecatedAnimationTarget<Value_4>, to: Value_4, options?: Partial<EaseOptions & DeprecatedAnimationOptions<Value_4>> | undefined): FramerAnimation<Value_4, BezierOptions>;
191
+ /**
192
+ * Animate value with a ease in animation
193
+ * @remarks
194
+ * ```jsx
195
+ * const value = Animatable(0)
196
+ * animate.easeIn(value, 100)
197
+ *
198
+ * animate.easeIn(value, 100, {duration: 1})
199
+ * ```
200
+ * @param from - Value to animate
201
+ * @param to - Value to animate to
202
+ * @param options - The options for the animation
203
+ *
204
+ * - `duration` - Duration of the animation
205
+ *
206
+ * @returns Instance of {@link FramerAnimation} that can be used to control the animation
207
+ * @deprecated Use {@link MotionProps.animate} on {@link Frame} instead.
208
+ */
209
+ easeIn<Value_5>(from: DeprecatedAnimationTarget<Value_5>, to: Value_5, options?: Partial<EaseOptions & DeprecatedAnimationOptions<Value_5>> | undefined): FramerAnimation<Value_5, BezierOptions>;
210
+ /**
211
+ * Animate value with a ease out animation
212
+ * @remarks
213
+ * ```jsx
214
+ * const value = Animatable(0)
215
+ * animate.easeOut(value, 100)
216
+ *
217
+ * animate.easeOUt(value, 100, {duration: 1})
218
+ * ```
219
+ * @param from - Value to animate
220
+ * @param to - Value to animate to
221
+ * @param options - The options for the animation
222
+ *
223
+ * - `duration` - Duration of the animation
224
+ *
225
+ * @returns Instance of {@link FramerAnimation} that can be used to control the animation
226
+ * @deprecated Use {@link MotionProps.animate} on {@link Frame} instead.
227
+ */
228
+ easeOut<Value_6>(from: DeprecatedAnimationTarget<Value_6>, to: Value_6, options?: Partial<EaseOptions & DeprecatedAnimationOptions<Value_6>> | undefined): FramerAnimation<Value_6, BezierOptions>;
229
+ /**
230
+ * Animate value with a ease in out animation
231
+ * @remarks
232
+ * ```jsx
233
+ * const value = Animatable(0)
234
+ * animate.easeInOut(value, 100)
235
+ *
236
+ * animate.easeInOut(value, 100, {duration: 1})
237
+ * ```
238
+ * @param from - Value to animate
239
+ * @param to - Value to animate to
240
+ * @param options - The options for the animation
241
+ *
242
+ * - `duration` - Duration of the animation
243
+ *
244
+ * @returns Instance of {@link FramerAnimation} that can be used to control the animation
245
+ * @deprecated Use {@link MotionProps.animate} on {@link Frame} instead.
246
+ */
247
+ easeInOut<Value_7>(from: DeprecatedAnimationTarget<Value_7>, to: Value_7, options?: Partial<EaseOptions & DeprecatedAnimationOptions<Value_7>> | undefined): FramerAnimation<Value_7, BezierOptions>;
248
+ };
249
+
250
+ /**
251
+ * @public
252
+ * @deprecated Since Framer Motion 5 AnimateSharedLayout is no longer required for shared layout transitions.
253
+ * You can use the `layoutId` prop and components will animate from one to another.
254
+ * If you need to group components that affect each other's layout or scope shared layout animation, consider using `LayoutGroup` instead.
255
+ */
256
+ export declare const AnimateSharedLayout: (props: any) => any;
257
+
258
+ /**
259
+ * @public
260
+ */
261
+ declare interface AnimationInterface {
262
+
263
+ cancel(): void;
264
+
265
+ isFinished(): boolean;
266
+ }
267
+
268
+ declare interface AnimationPlaybackLifecycles<V> {
269
+ onUpdate?: (latest: V) => void;
270
+ onPlay?: () => void;
271
+ onComplete?: () => void;
272
+ onRepeat?: () => void;
273
+ onStop?: () => void;
274
+ }
275
+
276
+ /**
277
+ * @public
278
+ * @deprecated Use the `transition` prop instead
279
+ */
280
+ declare interface AnimatorClass<Value, Options = any> {
281
+
282
+ }
283
+
284
+ /** @public */
285
+ export declare interface ArrayControlDescription<P = any> extends BaseControlDescription<P> {
286
+ type: ControlType.Array;
287
+ control: ArrayItemControlDescription<P>;
288
+ /** @deprecated This property has been renamed to control. */
289
+ propertyControl?: ArrayItemControlDescription<P>;
290
+ maxCount?: number;
291
+ defaultValue?: any[];
292
+ }
293
+
294
+ /**
295
+ * Array sub type
296
+ * @public
297
+ */
298
+ export declare type ArrayItemControlDescription<P = any> = Omit<NumberControlDescription<P>, "hidden" | "description"> | Omit<EnumControlDescription<P>, "hidden" | "description"> | Omit<BooleanControlDescription<P>, "hidden" | "description"> | Omit<StringControlDescription<P>, "hidden" | "description"> | Omit<RichTextControlDescription<P>, "hidden" | "description"> | Omit<ColorControlDescription<P>, "hidden" | "description" | "optional"> | Omit<SegmentedEnumControlDescription<P>, "hidden" | "description"> | Omit<ImageControlDescription<P>, "hidden" | "description"> | Omit<ResponsiveImageControlDescription<P>, "hidden" | "description"> | Omit<FileControlDescription<P>, "hidden" | "description"> | Omit<ComponentInstanceDescription<P>, "hidden" | "description"> | Omit<TransitionControlDescription<P>, "hidden" | "description"> | Omit<LinkControlDescription<P>, "hidden" | "description"> | Omit<DateControlDescription<P>, "hidden" | "description"> | Omit<ObjectControlDescription<P>, "hidden" | "description" | "optional"> | Omit<ScrollSectionRefControlDescription<P>, "hidden" | "description" | "optional"> | Omit<CustomCursorControlDescription<P>, "hidden" | "description" | "optional">;
299
+
300
+ /**
301
+ * Enable or disable the automatic generation of layout ids for canvas layers.
302
+ * By default layout ids are generated for all layers created on the Framer
303
+ * canvas. However, layout ids are not generated for any layer that is a
304
+ * descendant of a code component. Sometimes you will want to enable layout id
305
+ * generation for descendants of your code components when they use children,
306
+ * slots, or import design components, and you want those layers to animate with
307
+ * magic motion transitions.
308
+ *
309
+ * You can enable that behavior by wrapping your code component like this
310
+ * ```typescript
311
+ * <AutomaticLayoutIds enabled>
312
+ * <YourComponent/>
313
+ * </AutomaticLayoutIds>
314
+ * ```
315
+ * @public
316
+ */
317
+ export declare function AutomaticLayoutIds({ enabled, ...props }: React_2.PropsWithChildren<{
318
+ enabled?: boolean;
319
+ }>): JSX.Element;
320
+
321
+ /** @public */
322
+ export declare type Background = Color | Gradient | BackgroundImage | MotionValue<string> | string;
323
+
324
+ /** @public */
325
+ export declare interface BackgroundFilterProperties {
326
+ backgroundBlur: number;
327
+ }
328
+
329
+ /** @public */
330
+ export declare interface BackgroundImage {
331
+ src: string | undefined;
332
+ alt?: string;
333
+ srcSet?: string;
334
+ sizes?: string;
335
+ pixelWidth?: number;
336
+ pixelHeight?: number;
337
+ intrinsicWidth?: number;
338
+ intrinsicHeight?: number;
339
+ positionX?: "left" | "center" | "right" | RelativeNumber;
340
+ positionY?: "top" | "center" | "bottom" | RelativeNumber;
341
+ fit?: ImageFit;
342
+ backgroundSize?: number;
343
+ loading?: "lazy" | "eager";
344
+ }
345
+
346
+ /** @public */
347
+ export declare namespace BackgroundImage {
348
+ const isImageObject: (image: any) => image is object & BackgroundImage;
349
+ }
350
+
351
+ /** @public */
352
+ declare interface BackgroundImageProps extends ImageAltProps {
353
+ background: BackgroundImage;
354
+ }
355
+
356
+ /** @public */
357
+ export declare interface BackgroundProperties {
358
+ /**
359
+ * Set the background of a `Frame`. Supports color strings, color objects and images by using `src`. Set to a semi-transparent blue color by default.
360
+ * This will override the values set by the `image` property. To use a color and a image, use `backgroundColor` instead
361
+ * ```jsx
362
+ * <Frame background="#09F"/>
363
+ * <Frame background={Color({r: 255, g: 0, b: 102})} />
364
+ * <Frame background={{ alpha: 1, angle: 75, start: "#09F", end: "#F09"}} />
365
+ * <Frame background={{ src: "https://example.com/logo.png"}} />
366
+ * ```
367
+ * @public
368
+ */
369
+ background: Background | null;
370
+ /**
371
+ * Set the background color of a `Frame`. Supports color strings and objects. Use this property to set a background color alongside the `image` property.
372
+ * ```jsx
373
+ * <Frame backgroundColor="#09F"/>
374
+ * <Frame backgroundColor={Color({r: 255, g: 0, b: 102})} />
375
+ * ```
376
+ * @public
377
+ */
378
+ backgroundColor: string | Color;
379
+ /**
380
+ * Sets a background image of a `Frame`. Will wrap the passed value in a `url('')` if needed.
381
+ * @remarks
382
+ * ```jsx
383
+ * <Frame image="https://source.unsplash.com/random" />
384
+ * ```
385
+ * @public
386
+ */
387
+ image: string;
388
+ }
389
+
390
+ /** @public */
391
+ export declare interface BaseControlDescription<P = any> {
392
+ title?: string;
393
+ description?: string;
394
+ hidden?(props: P, rootProps: any): boolean;
395
+ }
396
+
397
+ /**
398
+ * @remarks do no use separately from FrameProps
399
+ * @public
400
+ * */
401
+ export declare interface BaseFrameProps {
402
+ /**
403
+ * Add a name to the Frame. This property does not change the behaviour of a Frame, but makes it easier to identify it in your code.
404
+ * @remarks
405
+ * The name will be rendered in the `data-framer-name` attribute of the outputted div, so the Frame is recognizable in the HTML DOM too.
406
+ * ```jsx
407
+ * <Frame name={"Button"} />
408
+ * ```
409
+ * @public
410
+ */
411
+ name: string;
412
+
413
+
414
+
415
+ }
416
+
417
+ /**
418
+ * @public
419
+ */
420
+ declare enum Bezier {
421
+ Linear = "linear",
422
+ Ease = "ease",
423
+ EaseIn = "ease-in",
424
+ EaseOut = "ease-out",
425
+ EaseInOut = "ease-in-out"
426
+ }
427
+
428
+ declare interface BezierOptions {
429
+ curve: Curve;
430
+ duration: number;
431
+ }
432
+
433
+ /** @public */
434
+ export declare type BlendingMode = "normal" | "multiply" | "screen" | "overlay" | "darken" | "lighten" | "color-dodge" | "color-burn" | "hard-light" | "soft-light" | "difference" | "exclusion" | "hue" | "saturation" | "color" | "luminosity";
435
+
436
+ /** @public */
437
+ export declare interface BlendingProperties {
438
+ blendingMode: BlendingMode;
439
+ }
440
+
441
+ /** @public */
442
+ export declare interface BooleanControlDescription<P = any> extends BaseControlDescription<P> {
443
+ type: ControlType.Boolean;
444
+ defaultValue?: boolean;
445
+ /**
446
+ * @deprecated No longer recommended because it should be clear what happens when assigning a
447
+ * boolean variable.
448
+ */
449
+ disabledTitle?: string;
450
+ /**
451
+ * @deprecated No longer recommended because it should be clear what happens when assigning a
452
+ * boolean variable.
453
+ */
454
+ enabledTitle?: string;
455
+ }
456
+
457
+ /** @public */
458
+ export declare type BorderStyle = "solid" | "dashed" | "dotted" | "double";
459
+
460
+ /** @public */
461
+ export declare interface BoxShadow {
462
+ type?: "box" | "realistic";
463
+ inset: boolean;
464
+ color: string;
465
+ x: number;
466
+ y: number;
467
+ blur: number;
468
+ spread: number;
469
+ diffusion: number;
470
+ focus: number;
471
+ }
472
+
473
+ /** @public */
474
+ export declare const BoxShadow: {
475
+ is: (shadow: any) => shadow is BoxShadow;
476
+ toCSS: (shadow: BoxShadow) => string;
477
+ };
478
+
479
+ /** @public */
480
+ export declare interface BoxShadowProperties {
481
+ shadows: Readonly<BoxShadow[]>;
482
+ }
483
+
484
+ declare interface BoxShadowProperties_2 {
485
+ shadows: Readonly<BoxShadow[]>;
486
+ }
487
+
488
+ declare type CallbackMap = Record<string, (() => void) | undefined>;
489
+
490
+ /** @public */
491
+ export declare type Cancel = () => void;
492
+
493
+ declare interface Change<Value> {
494
+ value: Value;
495
+ oldValue?: Value;
496
+ }
497
+
498
+ declare type ClassName = string | false | void | null | 0;
499
+
500
+ /**
501
+ * @public
502
+ */
503
+ declare interface CollectionUtils {
504
+ getSlugByRecordId: (id: string, locale: Locale | undefined) => Promise<string | undefined>;
505
+ getRecordIdBySlug: (slug: string, locale: Locale | undefined) => Promise<string | undefined>;
506
+ }
507
+
508
+ /**
509
+ * @public
510
+ */
511
+ export declare interface Color {
512
+ r: number;
513
+ g: number;
514
+ b: number;
515
+ h: number;
516
+ s: number;
517
+ l: number;
518
+ a: number;
519
+ roundA: number;
520
+ format: ColorFormat;
521
+ initialValue?: string;
522
+ isValid?: boolean;
523
+ mix: Mixer | MixerStateful;
524
+ toValue: () => string;
525
+ }
526
+
527
+ /**
528
+ * The Color function can be used to define colors, either as a string value or as an object. All colors
529
+ * are converted to a Color object with `r, g, b`, `h, s, l` and an `a` value.
530
+ * There are also various helpers on the Color function for working with,
531
+ * modifying and detecting colors.
532
+ *
533
+ * ```jsx
534
+ * // HEX
535
+ * const blue = Color("#0099FF")
536
+ *
537
+ * // RGB
538
+ * const blue = Color("rgb(0, 153, 255)")
539
+ * const blue = Color(0, 153, 255)
540
+ * const blue = Color({r: 0, g: 153, b: 255})
541
+ * const blue = Color({r: 0, g: 153, b: 255, a: 1})
542
+ *
543
+ * // HSL
544
+ * const blue = Color("hsl(204, 100%, 50%)")
545
+ * const blue = Color({h: 204, s: 1, l: 0.5})
546
+ * const blue = Color({h: 204, s: 1, l: 0.5, a: 1})
547
+ * ```
548
+ * @public
549
+ */
550
+ export declare const Color: {
551
+ (color: number | IncomingColor | Color, r?: number, g?: number, b?: number): Color;
552
+ /**
553
+ * Formats a Color object into a readable string for debugging.
554
+ *
555
+ * @remarks
556
+ * ```jsx
557
+ * const blue = Color("#0099FF")
558
+ *
559
+ * Color.inspect(blue)
560
+ * ```
561
+ *
562
+ * @param color - The Color object to format
563
+ * @param initialValue - A canonical hex string to be used instead of an rgba() value.
564
+ */
565
+ inspect(color: Color, initialValue?: string): string;
566
+ /**
567
+ * Checks if the value is a valid color object or color string. Returns true or false.
568
+ *
569
+ * @remarks
570
+ * ```jsx
571
+ * Color.isColor("#0099FF") // true
572
+ * Color.isColor(Color("#0099FF")) // true
573
+ * ```
574
+ *
575
+ * @param color - The potential color value to validate
576
+ */
577
+ isColor(color: string | Color): boolean;
578
+ /**
579
+ * Checks if the value is a valid color string. Returns true or false.
580
+ *
581
+ * @remarks
582
+ * ```jsx
583
+ * Color.isColorString("#0099FF") // true
584
+ * ```
585
+ *
586
+ * @param color - A string representing a color
587
+ */
588
+ isColorString(colorString: string | object): boolean;
589
+ /**
590
+ * Checks if the value is a valid Color object. Returns true or false.
591
+ *
592
+ * @remarks
593
+ * ```jsx
594
+ * const blue = Color("#0099FF")
595
+ *
596
+ * Color.isColorObject(blue) // true
597
+ * Color.isColorObject("#0099FF") // false
598
+ * ```
599
+ *
600
+ * @param color - An object representing a color.
601
+ */
602
+ isColorObject(color: any): color is object & Color;
603
+ /**
604
+ * Formats a Color instance into an RGB string.
605
+ *
606
+ * @remarks
607
+ * ```jsx
608
+ * const blue = Color("#0099FF")
609
+ *
610
+ * Color.toString(blue) // "rgb(0, 153, 255)"
611
+ * ```
612
+ *
613
+ * @param color - The color to format
614
+ */
615
+ toString(color: Color): string;
616
+ /**
617
+ * Formats a Color instance into an hexidecimal value.
618
+ *
619
+ * @remarks
620
+ * ```jsx
621
+ * const blue = Color("#0099FF")
622
+ *
623
+ * Color.toHex(blue) // "0099FF"
624
+ * Color.toHex(Color("#FFAAFF"), true) // "FAF"
625
+ * ```
626
+ *
627
+ * @param color - The color to format
628
+ * @param allow3Char - If true will return short hand colors if possible (defaults to false).
629
+ */
630
+ toHex(color: Color, allow3Char?: boolean): string;
631
+ /**
632
+ * Formats a Color instance into an hexidecimal string.
633
+ *
634
+ * @remarks
635
+ * ```jsx
636
+ * const blue = Color("#0099FF")
637
+ *
638
+ * Color.toHexString(blue) // "#0099FF"
639
+ * Color.toHexString(Color("#FFAAFF"), true) // "#FAF"
640
+ * ```
641
+ *
642
+ * @param color - The color to format
643
+ * @param allow3Char - If true will return short hand colors if possible (defaults to false).
644
+ */
645
+ toHexString(color: Color, allow3Char?: boolean): string;
646
+ /**
647
+ * Formats a Color instance into an RGB string.
648
+ *
649
+ * @remarks
650
+ * ```jsx
651
+ * const blue = Color("#0099FF")
652
+ *
653
+ * Color.toRgbString(blue) // "rgb(0, 153, 255)"
654
+ * ```
655
+ *
656
+ * @param color - The color to format
657
+ */
658
+ toRgbString(color: Color): string;
659
+ /**
660
+ * Formats a Color instance into an HUSL object.
661
+ *
662
+ * @remarks
663
+ * ```jsx
664
+ * const blue = Color("#0099FF")
665
+ *
666
+ * Color.toHusl(blue) // {h: 250, s: 100, l: 50, a: 1}
667
+ * ```
668
+ *
669
+ * @param color - The color to format
670
+ */
671
+ toHusl(color: Color): ColorHSLA;
672
+ /**
673
+ * Formats a Color instance into an HSL string.
674
+ *
675
+ * @remarks
676
+ * ```jsx
677
+ * const blue = Color("#0099FF")
678
+ *
679
+ * Color.toHslString(blue) // "hsl(204, 100%, 50%)"
680
+ * ```
681
+ *
682
+ * @param color - The color to format
683
+ */
684
+ toHslString(color: Color): string;
685
+ /**
686
+ * Formats a Color instance into an HSV object.
687
+ *
688
+ * @remarks
689
+ * ```jsx
690
+ * const blue = Color("#0099FF")
691
+ *
692
+ * Color.toHsv(blue) // {h: 204, s: 1, v: 1, a: 1}"
693
+ * ```
694
+ *
695
+ * @param color - The color to format
696
+ */
697
+ toHsv(color: Color): ColorHSVA;
698
+ /**
699
+ * Formats a Color instance into an HSV string.
700
+ *
701
+ * @remarks
702
+ * ```jsx
703
+ * const blue = Color("#0099FF")
704
+ *
705
+ * Color.toHslString(blue) // "hsv(204, 100%, 50%)"
706
+ * ```
707
+ *
708
+ * @param color - The color to format
709
+ */
710
+ toHsvString(color: Color): string;
711
+ /**
712
+ * Formats a Color instance into {@link https://css-tricks.com/snippets/css/named-colors-and-hex-equivalents/ | CSS name}
713
+ * or returns false if unspecified.
714
+ *
715
+ * @remarks
716
+ * ```jsx
717
+ * const green = Color("#8FBC8F")
718
+ *
719
+ * Color.toName(green) // "darkseagreen"
720
+ * ```
721
+ *
722
+ * @param color - The color to format
723
+ */
724
+ toName(color: Color): string | false;
725
+ /**
726
+ * Formats a color into an HSL object.
727
+ *
728
+ * @remarks
729
+ * ```jsx
730
+ * const blue = Color("#0099FF")
731
+ *
732
+ * Color.toHsl(blue) // {h: 204, s: 1, l: 0.5, a: 1}
733
+ * ```
734
+ *
735
+ * @param color - The color to format
736
+ */
737
+ toHsl(color: Color): ColorHSLA;
738
+ /**
739
+ * Formats a color into an RGB object.
740
+ *
741
+ * @remarks
742
+ * ```jsx
743
+ * const blue = Color("#0099FF")
744
+ *
745
+ * Color.toRgb(blue) // {r: 40, g: 175, b: 250, a: 1}
746
+ * ```
747
+ *
748
+ * @param color - The color to format
749
+ */
750
+ toRgb(color: Color): ColorRGBA;
751
+ /**
752
+ * Returns a brightened color.
753
+ *
754
+ * @remarks
755
+ * ```jsx
756
+ * const blue = Color("#0099FF")
757
+ * const brightblue = Color.lighten(blue, 20)
758
+ * ```
759
+ *
760
+ * @param color - The color to brighten
761
+ * @param amount - A number, from 0 to 100. Set to 10 by default.
762
+ */
763
+ brighten(color: Color, amount?: number): Color;
764
+ /**
765
+ * Add white and return a lightened color.
766
+ *
767
+ * @remarks
768
+ * ```jsx
769
+ * const blue = Color("#0099FF")
770
+ * const lightblue = Color.lighten(blue, 20)
771
+ * ```
772
+ *
773
+ * @param color - The color to lighten
774
+ * @param amount - A number, from 0 to 100. Set to 10 by default.
775
+ */
776
+ lighten(color: Color, amount?: number): Color;
777
+ /**
778
+ * Add black and return a darkened color.
779
+ *
780
+ * @remarks
781
+ * ```jsx
782
+ * const blue = Color("#0099FF")
783
+ * const darkblue = Color.darken(blue, 20)
784
+ * ```
785
+ * @param color - The color to darken.
786
+ * @param amount - A number, from 0 to 100. Set to 10 by default.
787
+ */
788
+ darken(color: Color, amount?: number): Color;
789
+ /**
790
+ * Increase the saturation of a color.
791
+ *
792
+ * @remarks
793
+ * ```jsx
794
+ * const blue = Color("#0099FF")
795
+ * const saturated = Color.saturate(blue, 100)
796
+ * ```
797
+ * @param color - The color to modify
798
+ * @param amount - A number from 0 to 100. Set to 10 by default.
799
+ */
800
+ saturate(color: Color, amount?: number): Color;
801
+ /**
802
+ * Decrease the saturation of a color.
803
+ *
804
+ * @remarks
805
+ * ```jsx
806
+ * const blue = Color("#0099FF")
807
+ * const desaturated = Color.desaturate(blue, 100)
808
+ * ```
809
+ * @param color - The color to modify
810
+ * @param amount - A number from 0 to 100. Set to 10 by default.
811
+ */
812
+ desaturate(color: Color, amount?: number): Color;
813
+ /**
814
+ * Return a fully desaturated color.
815
+ *
816
+ * @remarks
817
+ * ```jsx
818
+ * const blue = Color("#0099FF")
819
+ * const gray = Color.grayscale(blue)
820
+ * ```
821
+ * @param color - The color to convert.
822
+ */
823
+ grayscale(color: Color): Color;
824
+ /**
825
+ * Returns a new color for the rotated hue.
826
+ * @param color - The color to manipulate
827
+ * @param angle - The angle in degrees in which to rotate the hue.
828
+ */
829
+ hueRotate(color: Color, angle: number): Color;
830
+ /**
831
+ * Set the alpha value, also known as opacity, of the color.
832
+ *
833
+ * @remarks
834
+ * ```jsx
835
+ * const blue = Color("#0099FF")
836
+ *
837
+ * const transparent = Color.alpha(blue, 0.1)
838
+ * ```
839
+ * @param color - The original color to modify.
840
+ * @param alpha - A number from 1 to 0. Set to 1 by default.
841
+ */
842
+ alpha(color: Color, a?: number): Color;
843
+ /**
844
+ * Set the alpha value, also known as opacity, of the color to zero.
845
+ *
846
+ * @remarks
847
+ * ```jsx
848
+ * const blue = Color("#0099FF")
849
+ *
850
+ * const transparent = Color.alpha(blue)
851
+ * ```
852
+ * @param color - The original color to modify.
853
+ */
854
+ transparent(color: Color): Color;
855
+ /**
856
+ * Change the alpha value, also know as opacity, by a multiplier.
857
+ *
858
+ * @remarks
859
+ * ```jsx
860
+ * const blue = Color("#0099FF")
861
+ * const transparent = Color.multiplyAlpha(blue, 0.5)
862
+ * ```
863
+ * @param color - The original color to modify.
864
+ * @param alphaValue - A number between 1 and 0, defaults to 1,
865
+ */
866
+ multiplyAlpha(color: Color, alphaValue?: number): Color;
867
+ /**
868
+ * Returns a function that can be used to transition a color from one value
869
+ * to another. By default this will use the RGB `mix` model. Useful for providing to animation tools.
870
+ *
871
+ * ```jsx
872
+ * const blend = Color.interpolate(Color("red"), Color("blue"))
873
+ *
874
+ * blend(0) // Initial state (red)
875
+ * blend(0.5) // Mid state (purple)
876
+ * blend(1) // Final state (blue)
877
+ * ```
878
+ * @param colorA - The starting color
879
+ * @param colorB - The final color
880
+ * @param model - The model to use for the mix. One of {@link ColorMixModelType}
881
+ */
882
+ interpolate(colorA: Color, colorB: Color, model?: ColorMixModelType): (progress: number) => Color;
883
+ /**
884
+ * Create a function that will mix two colors together and output the result as an rgb string.
885
+ *
886
+ * @param colorA - The starting color
887
+ * @param colorB - The final color
888
+ * @param options - Options for the color mixer
889
+ *
890
+ * - `model`: The model to use for the mix. One of {@link ColorMixModelType}
891
+ *
892
+ * @public
893
+ */
894
+ mix(from: Color, toColor: Color, { model }?: {
895
+ model?: ColorMixModelType | undefined;
896
+ }): (p: number) => string;
897
+ /**
898
+ * Blend two colors together, optionally based on user input. The fraction defines the
899
+ * distribution between the two colors, and is set to 0.5 by default.
900
+ * The `limit` defines if the color can transition beyond its range.
901
+ * @remarks
902
+ * ```jsx
903
+ * // Mix red with yellow
904
+ * const orange = Color.mix("red", "yellow", 0.5)
905
+ * ```
906
+ *
907
+ * ```jsx
908
+ * Color.mix("red", "yellow", 0.5, true, "husl")
909
+ * ```
910
+ *
911
+ * @param colorA - A color, the first one.
912
+ * @param colorB - A color, the second one.
913
+ * @param fraction - An optional number, from 0 to 1, set to 0.5 by default.
914
+ * @param limit - An optional boolean, set to false by default.
915
+ * @param model - The model to use for the mix. One of {@link ColorMixModelType}
916
+ */
917
+ mixAsColor(colorA: Color, colorB: Color, fraction?: number, limit?: boolean, model?: ColorMixModelType): Color | null;
918
+ /**
919
+ * Returns a Color instance with a random color value set.
920
+ *
921
+ * @remarks
922
+ * ```jsx
923
+ * const random = Color.random()
924
+ * ```
925
+ *
926
+ * @param alphaValue - An optional alpha value, set to 1 by default.
927
+ */
928
+ random(alphaValue?: number): Color;
929
+ /**
930
+ * Creates a greyscale color.
931
+ *
932
+ * @remarks
933
+ * ```jsx
934
+ * const gray = Color.gray(0.5)
935
+ * ```
936
+ *
937
+ * @param amount - A number from 0 to 1 representing the amount of white.
938
+ * @param alphaValue - A number from 0 to 1 representing the alpha. Set to 1 by default.
939
+ */
940
+ grey(amount?: number, alphaValue?: number): Color;
941
+
942
+
943
+
944
+ /**
945
+ * Calculates the color difference using {@link https://en.wikipedia.org/wiki/Color_difference#Euclidean |
946
+ * Euclidean distance fitting human perception}. Returns a value between 0 and 765
947
+ * @param colorA - A first color.
948
+ * @param colorB - A second color.
949
+ */
950
+ difference(colorA: Color, colorB: Color): number;
951
+ /**
952
+ * Checks whether two Color objects are equal.
953
+ *
954
+ * @remarks
955
+ * ```jsx
956
+ * Color.equal(Color("red"), Color("red")) // true
957
+ * Color.equal(Color("red"), Color("blue")) // false
958
+ *
959
+ * Color.equal(Color("#0099FF"), Color("009AFF")) // false
960
+ * Color.equal(Color("#0099FF"), Color("009AFF"), 2) // true
961
+ * ```
962
+ *
963
+ * @param colorA - The first color
964
+ * @param colorB - The second color
965
+ * @param tolerance - A tolerance for the difference between rgba values. Set to 0.1 by default.
966
+ */
967
+ equal(colorA: Color, colorB: Color, tolerance?: number): boolean;
968
+ luminance(color: Color): number;
969
+ contrast(a: Color, b: Color): number;
970
+ };
971
+
972
+ /** @public */
973
+ export declare interface ColorControlDescription<P = any> extends BaseControlDescription<P> {
974
+ type: ControlType.Color;
975
+ defaultValue?: string;
976
+ optional?: boolean;
977
+ }
978
+
979
+ /** @public */
980
+ export declare enum ColorFormat {
981
+ RGB = "rgb",
982
+ HSL = "hsl",
983
+ HSV = "hsv",
984
+ HEX = "hex",
985
+ NAME = "name"
986
+ }
987
+
988
+ /** @public */
989
+ export declare interface ColorHSL {
990
+ h: number;
991
+ s: number;
992
+ l: number;
993
+ }
994
+
995
+ /** @public */
996
+ export declare type ColorHSLA = ColorHSL & {
997
+ a: number;
998
+ };
999
+
1000
+ /** @public */
1001
+ declare interface ColorHSV {
1002
+ h: number;
1003
+ s: number;
1004
+ v: number;
1005
+ }
1006
+
1007
+ /** @public */
1008
+ export declare type ColorHSVA = ColorHSV & {
1009
+ a: number;
1010
+ };
1011
+
1012
+ /**
1013
+ * Various Color functions, such as {@link (Color:namespace).mix} and {@link
1014
+ * (Color:namespace).interpolate}, take an optional color model that
1015
+ * determines how two colors are mixed together.
1016
+ *
1017
+ * @remarks
1018
+ *
1019
+ * ```javascript
1020
+ * const newColor = Color.mix(Color("red"), Color("blue"), {model: ColorMixModelType.HSL})
1021
+ * ```
1022
+ *
1023
+ * @public
1024
+ */
1025
+ export declare enum ColorMixModelType {
1026
+ /**
1027
+ * Use the {@link https://en.wikipedia.org/wiki/RGB_color_model | RGB color space} without an alpha value
1028
+ *
1029
+ * @remarks
1030
+ *
1031
+ * ```javascript
1032
+ * const newColor = Color.mix(Color("red"), Color("blue"), {model: ColorMixModelType.RGB})
1033
+ * ```
1034
+ *
1035
+ * @public
1036
+ */
1037
+ RGB = "rgb",
1038
+ /**
1039
+ * Use the {@link https://en.wikipedia.org/wiki/RGB_color_model | RGB color space} color space with an alpha value
1040
+ *
1041
+ * @remarks
1042
+ *
1043
+ * ```javascript
1044
+ * const newColor = Color.mix(Color("red"), Color("blue"), {model: ColorMixModelType.RGBA})
1045
+ * ```
1046
+ *
1047
+ * @public
1048
+ */
1049
+ RGBA = "rgba",
1050
+ /**
1051
+ * Use the {@link https://en.wikipedia.org/wiki/HSL_and_HSV | HSL} color space with an alpha value
1052
+ *
1053
+ * @remarks
1054
+ *
1055
+ * ```javascript
1056
+ * const newColor = Color.mix(Color("red"), Color("blue"), {model: ColorMixModelType.HSL})
1057
+ * ```
1058
+ *
1059
+ * @public
1060
+ */
1061
+ HSL = "hsl",
1062
+ /**
1063
+ * Use the {@link https://en.wikipedia.org/wiki/HSL_and_HSV | HSL} color space with an alpha value
1064
+ *
1065
+ * @remarks
1066
+ *
1067
+ * ```javascript
1068
+ * const newColor = Color.mix(Color("red"), Color("blue"), {model: ColorMixModelType.HSLA})
1069
+ * ```
1070
+ *
1071
+ * @public
1072
+ */
1073
+ HSLA = "hsla",
1074
+ /**
1075
+ * Use the {@link http://www.hsluv.org | HSLuv } human friendly color model
1076
+ *
1077
+ * @remarks
1078
+ *
1079
+ * ```javascript
1080
+ * const newColor = Color.mix(Color("red"), Color("blue"), {model: ColorMixModelType.HUSL})
1081
+ * ```
1082
+ *
1083
+ * @public
1084
+ */
1085
+ HUSL = "husl"
1086
+ }
1087
+
1088
+ /** @public */
1089
+ export declare interface ColorMixOptions {
1090
+ model?: ColorMixModelType;
1091
+ }
1092
+
1093
+ declare interface ColorRGB {
1094
+ r: number;
1095
+ g: number;
1096
+ b: number;
1097
+ }
1098
+
1099
+ /** @public */
1100
+ export declare type ColorRGBA = ColorRGB & {
1101
+ a: number;
1102
+ };
1103
+
1104
+ /**
1105
+ * Describes a single font used by a component.
1106
+ *
1107
+ * This should have enough data to construct a corresponding [FontFace] object
1108
+ * or a CSS `@font-face` rule.
1109
+ *
1110
+ * [FontFace]: https://drafts.csswg.org/css-font-loading/#fontface-interface
1111
+ *
1112
+ * @public
1113
+ */
1114
+ export declare interface ComponentFont extends ComponentFontV1 {
1115
+ source: FontSourceName;
1116
+ }
1117
+
1118
+ /**
1119
+ * Describes a bundle of fonts used by a single component, together with feature
1120
+ * flags to indicate which font features that component supported at the time of
1121
+ * codegen.
1122
+ */
1123
+ declare type ComponentFontBundle = {
1124
+ /**
1125
+ * This flag specifies whether the font bundle includes the specific font
1126
+ * weights of Framer’s Inter font that the component uses. New smart
1127
+ * components do that (which means we can emit CSS only for Inter fonts that
1128
+ * are actually used); older smart components don’t (which means some places
1129
+ * will emit CSS for all Inter fonts if this flag is not set).
1130
+ * https://www.notion.so/framer/RFC-ComponentFont-v2-d5fd3e822fb049ffb6971554ab0e4e42
1131
+ */
1132
+ explicitInter: boolean;
1133
+ fonts: ComponentFont[];
1134
+ };
1135
+
1136
+ /**
1137
+ * An older version of ComponentFont that doesn’t include the `source` field.
1138
+ * While this version of ComponentFont is not used internally, it may still be
1139
+ * passed into `addFonts()` by older versions of smart components.
1140
+ */
1141
+ declare interface ComponentFontV1 {
1142
+ url: string;
1143
+ family: string;
1144
+
1145
+ style?: string;
1146
+ weight?: string;
1147
+ stretch?: string;
1148
+ unicodeRange?: string;
1149
+ }
1150
+
1151
+ /** @public */
1152
+ export declare interface ComponentInstanceDescription<P = any> extends BaseControlDescription<P> {
1153
+ type: ControlType.ComponentInstance;
1154
+ }
1155
+
1156
+ /**
1157
+ * @public
1158
+ */
1159
+ declare type ComponentWithPreload<T extends React.ComponentType<any>> = T & {
1160
+ preload: () => Promise<T>;
1161
+ };
1162
+
1163
+ declare type ConstraintAuto = "auto";
1164
+
1165
+ declare interface ConstraintConfiguration {
1166
+
1167
+ }
1168
+
1169
+ /**
1170
+ * Dimensions can be numbers or strings: percentages, fractions of free space (fr), or auto
1171
+ * @public
1172
+ */
1173
+ declare type ConstraintDimension = Animatable_2<number> | number | ConstraintPercentage | ConstraintAuto | ConstraintFreespaceFraction;
1174
+
1175
+ declare type ConstraintFreespaceFraction = string;
1176
+
1177
+ /** @public */
1178
+ export declare type ConstraintPercentage = string;
1179
+
1180
+ /**
1181
+ * These properties are used to layout elements within Framer’s constraint system.
1182
+ * @privateRemarks Represents model property values for layout constraints. These may be internally inconsistent. Mask and Values are generated from these.
1183
+ * @public
1184
+ * */
1185
+ export declare interface ConstraintProperties extends Partial<WithFractionOfFreeSpace> {
1186
+
1187
+ /**
1188
+ * Pinned position from left
1189
+ * @public
1190
+ */
1191
+ left: Animatable_2<number> | number | null;
1192
+ /**
1193
+ * Pinned position from right
1194
+ * @public
1195
+ */
1196
+ right: Animatable_2<number> | number | null;
1197
+ /**
1198
+ * Pinned position from top
1199
+ * @public
1200
+ */
1201
+ top: Animatable_2<number> | number | null;
1202
+ /**
1203
+ * Pinned position from bottom
1204
+ * @public
1205
+ */
1206
+ bottom: Animatable_2<number> | number | null;
1207
+ /**
1208
+ * Center of horizontal position (X axis)
1209
+ * @public
1210
+ */
1211
+ centerX: ConstraintPercentage;
1212
+ /**
1213
+ * Center of vertical position (Y axis)
1214
+ * @public
1215
+ */
1216
+ centerY: ConstraintPercentage;
1217
+ /**
1218
+ * Element width
1219
+ * @public
1220
+ */
1221
+ width: ConstraintDimension;
1222
+ /**
1223
+ * Element height
1224
+ * @public
1225
+ */
1226
+ height: ConstraintDimension;
1227
+ /**
1228
+ * Aspect Ratio to keep when resizing
1229
+ * @public
1230
+ */
1231
+ aspectRatio: number | null;
1232
+ /**
1233
+ * //TODO What is autoSize for? Internal?
1234
+ * @public
1235
+ */
1236
+ autoSize?: boolean;
1237
+ }
1238
+
1239
+ declare const ConstraintsContext: React_2.Context<{
1240
+ parentSize: ParentSize;
1241
+ }>;
1242
+
1243
+ /** @public */
1244
+ export declare type ControlDescription<P = any> = NumberControlDescription<P> | EnumControlDescription<P> | BooleanControlDescription<P> | StringControlDescription<P> | RichTextControlDescription<P> | ColorControlDescription<P> | FusedNumberControlDescription<P> | SegmentedEnumControlDescription<P> | ImageControlDescription<P> | ResponsiveImageControlDescription<P> | FileControlDescription<P> | ComponentInstanceDescription<P> | ArrayControlDescription<P> | EventHandlerControlDescription<P> | TransitionControlDescription<P> | LinkControlDescription<P> | DateControlDescription<P> | ObjectControlDescription<P> | FontControlDescription<P> | PageScopeControlDescription<P> | ScrollSectionRefControlDescription<P> | CustomCursorControlDescription<P>;
1245
+
1246
+ declare type ControlPoints = [number, number, number, number];
1247
+
1248
+ /**
1249
+ * Used by the {@link PropertyControls} and specifies the type of user interface for receiving
1250
+ * input. Each field has a distinct set of properties though they all accept `title` and `hidden`
1251
+ * properties.
1252
+ *
1253
+ * @remarks
1254
+ * ```javascript
1255
+ * export function MyComponent({ title }) {
1256
+ * return <Frame size={"100%"}>{title}</Frame>
1257
+ * }
1258
+ *
1259
+ * addPropertyControls(MyComponent, {
1260
+ * title: {
1261
+ * type: ControlType.String,
1262
+ * title: "Title",
1263
+ * hidden: (props) => true
1264
+ * },
1265
+ * }
1266
+ * ```
1267
+ * @public
1268
+ */
1269
+ export declare enum ControlType {
1270
+ /**
1271
+ * A control that displays an on / off checkbox. The associated property will be `true` or `false`,
1272
+ * depending on the state of the checkbox. Includes an optional `defaultValue`, which is set to `true` by default. You can also customize the labels displayed in the property panel with the `enabledTitle` and `disabledTitle` properties.
1273
+ *
1274
+ * @remarks
1275
+ * ```javascript
1276
+ * export function MyComponent(props) {
1277
+ * return <Frame size={"100%"}>{props.showText ? "Hello World" : null}</Frame>
1278
+ * }
1279
+ *
1280
+ * addPropertyControls(MyComponent, {
1281
+ * showText: {
1282
+ * type: ControlType.Boolean,
1283
+ * title: "Show Text",
1284
+ * defaultValue: true,
1285
+ * enabledTitle: "On",
1286
+ * disabledTitle: "Off",
1287
+ * },
1288
+ * })
1289
+ * ```
1290
+ */
1291
+ Boolean = "boolean",
1292
+ /**
1293
+ * A control that accepts any numeric value. This will be provided directly as a property.
1294
+ * Will display an input field with a range slider by default. The
1295
+ * `displayStepper` option can be enabled to include a stepper control instead.
1296
+ *
1297
+ * @remarks
1298
+ * ```javascript
1299
+ * export function MyComponent(props) {
1300
+ * return <Frame rotateZ={props.rotation} size={"100%"}>{rotation}</Frame>
1301
+ * }
1302
+ *
1303
+ * addPropertyControls(MyComponent, {
1304
+ * rotation: {
1305
+ * type: ControlType.Number,
1306
+ * defaultValue: 0,
1307
+ * min: 0,
1308
+ * max: 360,
1309
+ * unit: "deg",
1310
+ * step: 0.1,
1311
+ * displayStepper: true,
1312
+ * },
1313
+ * })
1314
+ * ```
1315
+ */
1316
+ Number = "number",
1317
+ /**
1318
+ * A control that accepts plain text values. This will be provided directly as a property.
1319
+ * Will display an input field with an optional placeholder value.
1320
+ * If `obscured` attribute is set to true a password input field will be used instead of a regular text input
1321
+ * so that the value in the input will be visually obscured, yet still be available as plain text inside the component.
1322
+ * `displayTextArea` can be enabled to display a multi-line input area instead.
1323
+ *
1324
+ * @remarks
1325
+ * ```javascript
1326
+ * export function MyComponent(props) {
1327
+ * return <Frame>{props.title} — {props.body}</Frame>
1328
+ * }
1329
+ *
1330
+ * addPropertyControls(MyComponent, {
1331
+ * title: {
1332
+ * type: ControlType.String,
1333
+ * defaultValue: "Framer",
1334
+ * placeholder: "Type something…",
1335
+ * },
1336
+ * body: {
1337
+ * type: ControlType.String,
1338
+ * defaultValue: "Lorem ipsum dolor sit amet.",
1339
+ * placeholder: "Type something…",
1340
+ * displayTextArea: true,
1341
+ * },
1342
+ * })
1343
+ * ```
1344
+ */
1345
+ String = "string",
1346
+
1347
+ /**
1348
+ * A control that can be used to take a single number or four distinct
1349
+ * numeric input fields. The typical use case for this control is for visual
1350
+ * properties like border, padding or margin. It will display an input field
1351
+ * to accept a single value, alongside a segmented control allowing four
1352
+ * distinct values to be provided.
1353
+ *
1354
+ * You can also set the default value for each valueKey as well as the
1355
+ * toggleKey by setting their values on `defaultProps`.
1356
+ *
1357
+ *
1358
+ * ```javascript
1359
+ * export function MyComponent({
1360
+ * radius = 50,
1361
+ * topLeft,
1362
+ * topRight,
1363
+ * bottomRight,
1364
+ * bottomLeft,
1365
+ * isMixed = false,
1366
+ * }) {
1367
+ * const borderRadius = isMixed
1368
+ * ? `${topLeft}px ${topRight}px ${bottomRight}px ${bottomLeft}px`
1369
+ * : `${radius}px`
1370
+ * return <Frame background={"red"} borderRadius={borderRadius} size={"100%"}></Frame>
1371
+ * }
1372
+ *
1373
+ * addPropertyControls(MyComponent, {
1374
+ * radius: {
1375
+ * type: ControlType.FusedNumber,
1376
+ * title: "Radius",
1377
+ * defaultValue: 50,
1378
+ * toggleKey: "isMixed",
1379
+ * toggleTitles: ["All", "Individual"],
1380
+ * valueKeys: ["topLeft", "topRight", "bottomRight", "bottomLeft"],
1381
+ * valueLabels: ["NW", "NE", "SE", "SW"],
1382
+ * min: 0,
1383
+ * },
1384
+ * })
1385
+ *
1386
+ * // Set the default value for each valueKey as well as the toggleKey by setting their values on `defaultProps`:
1387
+ * MyComponent.defaultProps = {
1388
+ * radius: 10,
1389
+ * isMixed: true,
1390
+ * topLeft: 5,
1391
+ * topRight: 15,
1392
+ * bottomRight: 5,
1393
+ * bottomLeft: 15,
1394
+ * }
1395
+ * ```
1396
+ */
1397
+ FusedNumber = "fusednumber",
1398
+ /**
1399
+ * A property control that represents a list of options. The list contains primitive values and each
1400
+ * value has to be unique. The selected option will be provided as a property. This control is displayed
1401
+ * as a dropdown menu in which a user can select one of the items.
1402
+ * `displaySegmentedControl` can be enabled to display a segmented control instead.
1403
+ *
1404
+ * ```javascript
1405
+ * export function MyComponent(props) {
1406
+ * const value = props.value || "a"
1407
+ * const colors = { a: "red", b: "green", c: "blue" }
1408
+ * return <Frame background={colors[value]} size={"100%"}>{value}</Frame>
1409
+ * }
1410
+ *
1411
+ * addPropertyControls(MyComponent, {
1412
+ * value: {
1413
+ * type: ControlType.Enum,
1414
+ * defaultValue: "a",
1415
+ * options: ["a", "b", "c"],
1416
+ * optionTitles: ["Option A", "Option B", "Option C"],
1417
+ * },
1418
+ * })
1419
+ * ```
1420
+ */
1421
+ Enum = "enum",
1422
+ /**
1423
+ * Deprecated, please use {@link ControlType.Enum} and enable displaySegmentedControl.
1424
+ *
1425
+ * @deprecated Please use {@link ControlType.Enum} and enable displaySegmentedControl.
1426
+ * @remarks
1427
+ * ```javascript
1428
+ * export function MyComponent(props) {
1429
+ * const value = props.value || "a"
1430
+ * const colors = { a: "red", b: "green", c: "blue" }
1431
+ * return <Frame background={colors[value]} size={"100%"}>{value}</Frame>
1432
+ * }
1433
+ *
1434
+ * addPropertyControls(MyComponent, {
1435
+ * value: {
1436
+ * type: ControlType.SegmentedEnum,
1437
+ * defaultValue: "a",
1438
+ * options: ["a", "b", "c"],
1439
+ * optionTitles: ["A", "B", "C"],
1440
+ * },
1441
+ * })
1442
+ * ```
1443
+ */
1444
+ SegmentedEnum = "segmentedenum",
1445
+ /**
1446
+ * A control that represents a color value. It will be included in the component props as a string.
1447
+ * This control is displayed as a color field and will provide the selected color in either
1448
+ * HEX (`"#fff"`) or HSL (`hsla(203, 87%, 50%, 0.5)`) notation, depending on
1449
+ * whether there is an alpha channel.
1450
+ *
1451
+ * @remarks
1452
+ * ```javascript
1453
+ * function MyComponent(props) {
1454
+ * return <Frame background={props.background} size={"100%"} />
1455
+ * }
1456
+ *
1457
+ * addPropertyControls(MyComponent, {
1458
+ * background: {
1459
+ * type: ControlType.Color,
1460
+ * defaultValue: "#fff",
1461
+ * },
1462
+ * })
1463
+ * ```
1464
+ */
1465
+ Color = "color",
1466
+ /**
1467
+ * Deprecated, please use {@link ControlType.ResponsiveImage}’s `src` field instead.
1468
+ *
1469
+ * @deprecated Please use {@link ControlType.ResponsiveImage}’s `src` field instead.
1470
+ */
1471
+ Image = "image",
1472
+ /**
1473
+ * A control that allows the user to pick an image resource. Displayed as an image picker
1474
+ * with associated file picker.
1475
+ *
1476
+ * The chosen image will be provided in the component props as an object with `src` and `srcSet` properties:
1477
+ * - `src`: a string containing the URL of a full resolution image
1478
+ * - `srcSet`: an optional string with scaled down image variants. This is typically passed into [`<img srcSet>`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLImageElement/srcset)
1479
+ * and helps the browser to load a smaller image when a full-size one isn’t necessary.
1480
+ * - `alt`: an optional description of the image.
1481
+ *
1482
+ * @remarks
1483
+ * ```javascript
1484
+ * function MyComponent(props) {
1485
+ * return <img src={props.image.src} srcSet={props.image.srcSet} alt={props.image.alt} />
1486
+ * }
1487
+ *
1488
+ * addPropertyControls(MyComponent, {
1489
+ * image: {
1490
+ * type: ControlType.ResponsiveImage,
1491
+ * }
1492
+ * })
1493
+ * ```
1494
+ */
1495
+ ResponsiveImage = "responsiveimage",
1496
+ /**
1497
+ * A control that allows the user to pick a file resource. It will be
1498
+ * included in the component props as an URL string.
1499
+ * Displayed as an file picker that will open a native file browser. The
1500
+ * selected file will be provided as a fully qualified URL. The
1501
+ * `allowedFileTypes` property must be provided to specify acceptable file
1502
+ * types.
1503
+ *
1504
+ * @remarks
1505
+ * ```javascript
1506
+ * export function MyComponent(props) {
1507
+ * return (
1508
+ * <Frame size={"100%"}>
1509
+ * <video
1510
+ * style={{ objectFit: "contain", props.width, props.height }}
1511
+ * src={props.filepath}
1512
+ * controls
1513
+ * />
1514
+ * </Frame>
1515
+ * )
1516
+ * }
1517
+ *
1518
+ * addPropertyControls(MyComponent, {
1519
+ * filepath: {
1520
+ * type: ControlType.File,
1521
+ * allowedFileTypes: ["mov"],
1522
+ * },
1523
+ * })
1524
+ * ```
1525
+ */
1526
+ File = "file",
1527
+ /**
1528
+ * A control that references to another component on the canvas,
1529
+ * included in the component props as a React node.
1530
+ * The component will have an outlet to allow linking to other Frames.
1531
+ * Available Frames will also be displayed in a dropdown menu in the
1532
+ * properties panel. The component reference will be provided as a property.
1533
+ * As a convention, the name for the property is usually just `children`.
1534
+ *
1535
+ * Multiple components can be linked by combining the `ComponentInstance`
1536
+ * type with the {@link ControlType.Array}.
1537
+ *
1538
+ * ```javascript
1539
+ * export function MyComponent(props) {
1540
+ * return <Stack size={"100%"}>{props.children}</Stack>
1541
+ * }
1542
+ *
1543
+ * addPropertyControls(MyComponent, {
1544
+ * children: {
1545
+ * type: ControlType.ComponentInstance,
1546
+ * },
1547
+ * })
1548
+ * ```
1549
+ */
1550
+ ComponentInstance = "componentinstance",
1551
+ /**
1552
+ * A control that allows multiple values per `ControlType`, provided as an
1553
+ * array via properties. For most control types this will be displayed as an
1554
+ * additional section in the properties panel allowing as many fields to be
1555
+ * provided as required.
1556
+ *
1557
+ * For a {@link ControlType.ComponentInstance} the Frame will also gain an
1558
+ * additional outlet control on the Canvas that allows links to be created
1559
+ * between frames.
1560
+ *
1561
+ * Group properties together by using an object control.
1562
+ *
1563
+ * For multiple {@link ControlType.FusedNumber} values, you can pass in an
1564
+ * array of single values as the React default prop.
1565
+ *
1566
+ * ```javascript
1567
+ * export function MyComponent(props) {
1568
+ * const frames = props.images.map(image => <Frame image={image} width={"1fr"} height={"1fr"} />)
1569
+ * return <Stack size={"100%"}>{frames}</Stack>
1570
+ * }
1571
+ *
1572
+ * // Add a repeatable image property control
1573
+ * addPropertyControls(MyComponent, {
1574
+ * images: {
1575
+ * type: ControlType.Array,
1576
+ * control: {
1577
+ * type: ControlType.Image
1578
+ * }
1579
+ * },
1580
+ * // Allow up to five items
1581
+ * maxCount: 5,
1582
+ * })
1583
+ *
1584
+ * // Add a multi-connector to your component to connect components on the canvas
1585
+ * addPropertyControls(MyComponent, {
1586
+ * children: {
1587
+ * type: ControlType.Array,
1588
+ * control: {
1589
+ * type: ControlType.ComponentInstance
1590
+ * },
1591
+ * maxCount: 5,
1592
+ * },
1593
+ * })
1594
+ *
1595
+ * // Add a list of objects
1596
+ * addPropertyControls(MyComponent, {
1597
+ * myArray: {
1598
+ * type: ControlType.Array,
1599
+ * control: {
1600
+ * type: ControlType.Object,
1601
+ * controls: {
1602
+ * title: { type: ControlType.String, defaultValue: "Employee" },
1603
+ * avatar: { type: ControlType.Image },
1604
+ * },
1605
+ * },
1606
+ * defaultValue: [
1607
+ * { title: "Jorn" },
1608
+ * { title: "Koen" },
1609
+ * ],
1610
+ * },
1611
+ * })
1612
+ *
1613
+ * // For multiple values, you can pass in an array of single values as the React default prop.
1614
+ * MyComponent.defaultProps = {
1615
+ * paddings: [5, 10, 15],
1616
+ * }
1617
+ * ```
1618
+ *
1619
+ */
1620
+ Array = "array",
1621
+ /**
1622
+ * A control that exposes events in the prototyping panel within the Framer UI. When choosing an event from the prototyping panel, you can select from a list of actions to trigger.
1623
+ *
1624
+ * ```javascript
1625
+ * export function MyComponent(props) {
1626
+ * return <Frame onTap={props.onTap} size={"100%"} />
1627
+ * }
1628
+ *
1629
+ * addPropertyControls(MyComponent, {
1630
+ * onTap: {
1631
+ * type: ControlType.EventHandler,
1632
+ * },
1633
+ * })
1634
+ * ```
1635
+ */
1636
+ EventHandler = "eventhandler",
1637
+ /**
1638
+ * A control that allows for editing Framer Motion transition options within the Framer UI.
1639
+ *
1640
+ * ```javascript
1641
+ * export function MyComponent(props) {
1642
+ * return (
1643
+ * <Frame
1644
+ * animate={{ scale: 2 }}
1645
+ * transition={props.transition}
1646
+ * />
1647
+ * )
1648
+ * }
1649
+ *
1650
+ * addPropertyControls(MyComponent, {
1651
+ * transition: {
1652
+ * type: ControlType.Transition,
1653
+ * },
1654
+ * })
1655
+ * ```
1656
+ */
1657
+ Transition = "transition",
1658
+ /**
1659
+ * A control that allows for exposing web links.
1660
+ *
1661
+ * ```javascript
1662
+ * export function MyComponent(props) {
1663
+ * return <a href={props.link}>My Link</a>
1664
+ * }
1665
+ *
1666
+ * addPropertyControls(MyComponent, {
1667
+ * link: {
1668
+ * type: ControlType.Link,
1669
+ * }
1670
+ * })
1671
+ * ```
1672
+ */
1673
+ Link = "link",
1674
+ /**
1675
+ * A control that allows for exposing dates. The value will be provided in toJSON() string format.
1676
+ *
1677
+ * ```javascript
1678
+ * export function MyComponent(props) {
1679
+ * const formattedDate = React.useMemo(() => {
1680
+ * return new Date(props.date).toLocaleDateString()
1681
+ * }, [props.date])
1682
+ * return <div>{formattedDate}</div>
1683
+ * }
1684
+ *
1685
+ * addPropertyControls(MyComponent, {
1686
+ * date: {
1687
+ * type: ControlType.Date,
1688
+ * }
1689
+ * })
1690
+ * ```
1691
+ */
1692
+ Date = "date",
1693
+ /**
1694
+ * A control that allows for grouping multiple properties as an object.
1695
+ *
1696
+ * ```javascript
1697
+ * export function MyComponent(props) {
1698
+ * return <Frame opacity={props.myObject.opacity} background={props.myObject.tint} />
1699
+ * }
1700
+ *
1701
+ * addPropertyControls(MyComponent, {
1702
+ * myObject: {
1703
+ * type: ControlType.Object,
1704
+ * controls: {
1705
+ * opacity: { type: ControlType.Number },
1706
+ * tint: { type: ControlType.Color },
1707
+ * }
1708
+ * }
1709
+ * })
1710
+ * ```
1711
+ */
1712
+ Object = "object",
1713
+
1714
+
1715
+
1716
+
1717
+ }
1718
+
1719
+ /**
1720
+ * @privateRemarks do no use separately from FrameProps
1721
+ * @public
1722
+ * */
1723
+ export declare interface CSSTransformProperties extends MotionTransform {
1724
+ /**
1725
+ * Set the CSS transform `translateX` property.
1726
+ * @remarks
1727
+ * ```jsx
1728
+ * <Frame x={100} />
1729
+ * ```
1730
+ * @public
1731
+ */
1732
+ x: number | string | MotionValue<number | string>;
1733
+ /**
1734
+ * Set the CSS transform `translateY` property.
1735
+ * @remarks
1736
+ * ```jsx
1737
+ * <Frame y={100} />
1738
+ * ```
1739
+ * @public
1740
+ */
1741
+ y: number | string | MotionValue<number | string>;
1742
+ /**
1743
+ * Set the CSS transform `translateZ` property.
1744
+ * @remarks
1745
+ * ```jsx
1746
+ * <Frame z={100} />
1747
+ * ```
1748
+ * @public
1749
+ */
1750
+ z: number | string | MotionValue<number | string>;
1751
+ /**
1752
+ * Set the CSS transform `rotate` property in degrees.
1753
+ * @remarks
1754
+ * ```jsx
1755
+ * <Frame rotate={45}/>
1756
+ * ```
1757
+ * @public
1758
+ */
1759
+ rotate: number | string | MotionValue<number | string>;
1760
+ /**
1761
+ * Set the CSS transform `rotateX` property in degrees.
1762
+ * @remarks
1763
+ * ```jsx
1764
+ * <Frame rotateX={45}/>
1765
+ * ```
1766
+ * @public
1767
+ */
1768
+ rotateX: number | string | MotionValue<number | string>;
1769
+ /**
1770
+ * Set the CSS transform `rotateY` property in degrees.
1771
+ * @remarks
1772
+ * ```jsx
1773
+ * <Frame rotateY={45}/>
1774
+ * ```
1775
+ * @public
1776
+ */
1777
+ rotateY: number | string | MotionValue<number | string>;
1778
+ /**
1779
+ * Set the CSS transform `rotateZ` property in degrees.
1780
+ * @remarks
1781
+ * ```jsx
1782
+ * <Frame rotateZ={45}/>
1783
+ * ```
1784
+ * @public
1785
+ */
1786
+ rotateZ: number | string | MotionValue<number | string>;
1787
+ /**
1788
+ * Set the CSS transform `scale` property.
1789
+ * @remarks
1790
+ * ```jsx
1791
+ * <Frame scale={1.5} />
1792
+ * ```
1793
+ * @public
1794
+ */
1795
+ scale: number | string | MotionValue<number | string>;
1796
+ /**
1797
+ * Set the CSS transform `scaleX` property.
1798
+ * @remarks
1799
+ * ```jsx
1800
+ * <Frame scaleX={1.5} />
1801
+ * ```
1802
+ * @public
1803
+ */
1804
+ scaleX: number | string | MotionValue<number | string>;
1805
+ /**
1806
+ * Set the CSS transform `scaleY` property.
1807
+ * @remarks
1808
+ * ```jsx
1809
+ * <Frame scaleY={2} />
1810
+ * ```
1811
+ * @public
1812
+ */
1813
+ scaleY: number | string | MotionValue<number | string>;
1814
+ /**
1815
+ * Set the CSS transform `skew` property in degrees.
1816
+ * @remarks
1817
+ * ```jsx
1818
+ * <Frame skew={15} />
1819
+ * ```
1820
+ * @public
1821
+ */
1822
+ skew: number | string | MotionValue<number | string>;
1823
+ /**
1824
+ * Set the CSS transform `skewX` property in degrees.
1825
+ * @remarks
1826
+ * ```jsx
1827
+ * <Frame skewX={15} />
1828
+ * ```
1829
+ * @public
1830
+ */
1831
+ skewX: number | string | MotionValue<number | string>;
1832
+ /**
1833
+ * Set the CSS transform `skewY` property in degrees.
1834
+ * @remarks
1835
+ * ```jsx
1836
+ * <Frame skewY={15} />
1837
+ * ```
1838
+ * @public
1839
+ */
1840
+ skewY: number | string | MotionValue<number | string>;
1841
+ /**
1842
+ * Set the CSS transform `originX` property.
1843
+ * @remarks
1844
+ * ```jsx
1845
+ * <Frame originX={0.5} />
1846
+ * ```
1847
+ * @public
1848
+ */
1849
+ originX: number | string | MotionValue<number | string>;
1850
+ /**
1851
+ * Set the CSS transform `originY` property.
1852
+ * @remarks
1853
+ * ```jsx
1854
+ * <Frame originY={0.5} />
1855
+ * ```
1856
+ * @public
1857
+ */
1858
+ originY: number | string | MotionValue<number | string>;
1859
+ /**
1860
+ * Set the CSS transform `originZ` property. Defaults to `px` units.
1861
+ * @remarks
1862
+ * ```jsx
1863
+ * <Frame originZ={100} />
1864
+ * ```
1865
+ * @public
1866
+ */
1867
+ originZ: number | string | MotionValue<number | string>;
1868
+ /**
1869
+ * Set the CSS perspective property.
1870
+ * @remarks
1871
+ * ```jsx
1872
+ * <Frame perspective={500} />
1873
+ * ```
1874
+ * @public
1875
+ */
1876
+ perspective: number | string | MotionValue<number | string>;
1877
+ }
1878
+
1879
+ declare type Curve = ControlPoints | Bezier;
1880
+
1881
+ declare interface CustomConstraintProperties {
1882
+ /**
1883
+ * Aspect Ratio to keep when resizing
1884
+ * @public
1885
+ */
1886
+ aspectRatio?: number | null;
1887
+ /**
1888
+ * Used for Text and Graphics containers
1889
+ * @public
1890
+ */
1891
+ autoSize?: boolean;
1892
+ /**
1893
+ * Use Vekter constraint layout system, disable DOM layout
1894
+ * @public
1895
+ */
1896
+ enabled: boolean;
1897
+ intrinsicWidth?: number;
1898
+ intrinsicHeight?: number;
1899
+ }
1900
+
1901
+ declare interface CustomCursorControlDescription<P = any> extends BaseControlDescription<P> {
1902
+ type: ControlType.CustomCursor;
1903
+ }
1904
+
1905
+ /**
1906
+ * Combine values and create a className string. Falsy values are not included.
1907
+ *
1908
+ * This helper is commonly exported by css-in-js libraries like Linaria, or
1909
+ * Emotion as cx. This is the implementation from Linaria:
1910
+ * https://github.com/callstack/linaria/blob/master/packages/core/src/cx.ts.
1911
+ *
1912
+ * We need it here so we can use it in es-modules.
1913
+ *
1914
+ * @public
1915
+ */
1916
+ export declare function cx(...classNames: ClassName[]): string;
1917
+
1918
+ /**
1919
+ * Flag setVariantState as cycling variants.
1920
+ * @public
1921
+ */
1922
+ export declare const CycleVariantState: unique symbol;
1923
+
1924
+ declare interface DampingDurationSpringOptions {
1925
+ dampingRatio: number;
1926
+ duration: number;
1927
+ velocity: number;
1928
+ mass: number;
1929
+ }
1930
+
1931
+ export declare const Data: {
1932
+ <T extends object = object>(initial?: object | Partial<T>): T;
1933
+
1934
+
1935
+
1936
+
1937
+ };
1938
+
1939
+ /** @public */
1940
+ export declare interface DateControlDescription<P = any> extends BaseControlDescription<P> {
1941
+ type: ControlType.Date;
1942
+ defaultValue?: string;
1943
+ }
1944
+
1945
+ /**
1946
+ * @deprecated Use {@link FrameProps.transition} instead
1947
+ */
1948
+ declare interface DeprecatedAnimationOptions<Value> extends InterpolationOptions {
1949
+
1950
+
1951
+ }
1952
+
1953
+ /**
1954
+ * @public
1955
+ * @deprecated
1956
+ */
1957
+ export declare type DeprecatedAnimationTarget<Value> = Animatable_2<Value> | AnimatableObject<Value> | MotionValue<Value>;
1958
+
1959
+ /** @public */
1960
+ export declare interface DeprecatedCoreFrameProps extends DeprecatedFrameProperties, LayerProps {
1961
+ }
1962
+
1963
+ /**
1964
+ * @public
1965
+ */
1966
+ export declare const DeprecatedFrame: typeof DeprecatedFrameType;
1967
+
1968
+ /** @public */
1969
+ export declare interface DeprecatedFrameProperties extends ConstraintProperties, DeprecatedTransformProperties, DeprecatedVisualProperties {
1970
+ /**
1971
+ * Determines whether the Frame is current visible. Set to `true` by default.
1972
+ * @remarks
1973
+ * ```jsx
1974
+ * function App() {
1975
+ * return <Frame visible={false} />
1976
+ * }
1977
+ * ```
1978
+ */
1979
+ visible: boolean;
1980
+ /**
1981
+ * An optional name for the Frame.
1982
+ * @remarks
1983
+ * ```jsx
1984
+ * function App() {
1985
+ * return <Frame name="MyFrame" />
1986
+ * }
1987
+ * ```
1988
+ */
1989
+ name?: string;
1990
+ /**
1991
+ * Set to `true` to enable backface-visibility.
1992
+ * @remarks
1993
+ * ```jsx
1994
+ * function App() {
1995
+ * return <Frame backfaceVisibility={true} />
1996
+ * }
1997
+ * ```
1998
+ */
1999
+ backfaceVisible?: boolean | Animatable_2<boolean>;
2000
+ /**
2001
+ * Set the perspective on the z-plane.
2002
+ * @remarks
2003
+ * ```jsx
2004
+ * function App() {
2005
+ * return <Frame perspective={100px} />
2006
+ * }
2007
+ * ```
2008
+ */
2009
+ perspective?: number | Animatable_2<number>;
2010
+ /**
2011
+ * Set to `true` to preserve 3D.
2012
+ * @remarks
2013
+ * ```jsx
2014
+ * function App() {
2015
+ * return <Frame preserve3d={true} />
2016
+ * }
2017
+ * ```
2018
+ */
2019
+ preserve3d?: boolean | Animatable_2<boolean>;
2020
+ /**
2021
+ * A border width for the frame. Can be either a single number for all sides or
2022
+ * an object describing each side. Set to `0` by default.
2023
+ * @remarks
2024
+ * ```jsx
2025
+ * function App() {
2026
+ * return <Frame borderWidth={{top: 10, bottom: 10}} />
2027
+ * }
2028
+ * ```
2029
+ */
2030
+ borderWidth: number | Partial<{
2031
+ top: number;
2032
+ bottom: number;
2033
+ left: number;
2034
+ right: number;
2035
+ }>;
2036
+ /**
2037
+ * A border color for the Frame. Set to `"#222"` by default.
2038
+ * @remarks
2039
+ * ```jsx
2040
+ * function App() {
2041
+ * return <Frame borderColor="red" />
2042
+ * }
2043
+ * ```
2044
+ */
2045
+ borderColor: string;
2046
+ /**
2047
+ * A border style for the Frame. One of `"solid", "dashed", "dotted"` or `"double"`. Set to `"solid"` by default.
2048
+ * @remarks
2049
+ * ```jsx
2050
+ * function App() {
2051
+ * return <Frame borderStyle="dotted" />
2052
+ * }
2053
+ * ```
2054
+ */
2055
+ borderStyle: BorderStyle;
2056
+ /**
2057
+ * Additional CSSProperties to apply to the frame. Usage is exactly the same as with the
2058
+ * standard React style prop.
2059
+ * @remarks
2060
+ * ```jsx
2061
+ * function App() {
2062
+ * return <Frame style={{color: "red", backgroundColor: "blue"}} />
2063
+ * }
2064
+ * ```
2065
+ */
2066
+ style?: React_2.CSSProperties;
2067
+ /**
2068
+ * An optional className for the Frame.
2069
+ * @remarks
2070
+ * ```jsx
2071
+ * function App() {
2072
+ * return <Frame className="my-frame" />
2073
+ * }
2074
+ * ```
2075
+ */
2076
+ className?: string;
2077
+
2078
+
2079
+ }
2080
+
2081
+ declare interface DeprecatedFrameState {
2082
+ size: AnimatableObject<Size> | Size | null;
2083
+ }
2084
+
2085
+ declare class DeprecatedFrameType extends Layer<DeprecatedCoreFrameProps, DeprecatedFrameState> {
2086
+ context: React_2.ContextType<typeof ConstraintsContext>;
2087
+ static supportsConstraints: boolean;
2088
+ static defaultFrameSpecificProps: DeprecatedFrameProperties;
2089
+ static readonly defaultProps: DeprecatedCoreFrameProps;
2090
+ static rect(props: Partial<ConstraintProperties>): Rect;
2091
+ get rect(): Rect;
2092
+ element: HTMLDivElement | null;
2093
+ imageDidChange: boolean;
2094
+ state: DeprecatedFrameState;
2095
+ static getDerivedStateFromProps(nextProps: Partial<DeprecatedCoreFrameProps>, prevState: DeprecatedFrameState): DeprecatedFrameState | null;
2096
+ static updatedSize(props: Partial<DeprecatedCoreFrameProps>, state: DeprecatedFrameState): AnimatableObject<Size> | Size;
2097
+ getStyle(): React_2.CSSProperties;
2098
+ propsObserver: AnimatableObject<DeprecatedCoreFrameProps>;
2099
+ propsObserverCancel?: Cancel;
2100
+ sizeObserver: AnimatableObject<Size>;
2101
+ sizeObserverCancel?: Cancel;
2102
+ layoutChildren(): (React_2.ReactElement<any, string | React_2.JSXElementConstructor<any>> | React_2.FunctionComponentElement<{
2103
+ _forwardedOverrides: {
2104
+ [key: string]: any;
2105
+ };
2106
+ }>)[] | null | undefined;
2107
+ }
2108
+
2109
+ /** @public */
2110
+ export declare const DeprecatedFrameWithEvents: React_2.ComponentClass<Partial<DeprecatedFrameWithEventsProps>>;
2111
+
2112
+ /** @public */
2113
+ export declare type DeprecatedFrameWithEventsProps = DeprecatedCoreFrameProps & WithEventsProperties;
2114
+
2115
+ declare interface DeprecatedTransformProperties {
2116
+ z: Animatable_2<number> | number;
2117
+ rotation: Animatable_2<number> | number;
2118
+ rotationX: Animatable_2<number> | number;
2119
+ rotationY: Animatable_2<number> | number;
2120
+ rotationZ: Animatable_2<number> | number;
2121
+ scale: Animatable_2<number> | number;
2122
+ scaleX: Animatable_2<number> | number;
2123
+ scaleY: Animatable_2<number> | number;
2124
+ scaleZ: Animatable_2<number> | number;
2125
+ skew: Animatable_2<number> | number;
2126
+ skewX: Animatable_2<number> | number;
2127
+ skewY: Animatable_2<number> | number;
2128
+ originX: Animatable_2<number> | number;
2129
+ originY: Animatable_2<number> | number;
2130
+ originZ: Animatable_2<number> | number;
2131
+ }
2132
+
2133
+ /** @public */
2134
+ export declare type DeprecatedVisualProperties = Partial<BackgroundProperties & RadiusProperties & FilterProperties & BackgroundFilterProperties & BlendingProperties & OverflowProperties & BoxShadowProperties_2 & WithOpacity & TextColorProperties>;
2135
+
2136
+ /** @public */
2137
+ export declare interface DOMLayoutProps {
2138
+
2139
+
2140
+
2141
+ }
2142
+
2143
+ declare type DragEventHandler<Draggable> = (event: FramerEvent, draggable: Draggable) => void;
2144
+
2145
+ declare interface DragEvents<Draggable> {
2146
+ onMove: (point: Point, draggable: Draggable) => void;
2147
+
2148
+ onDragAnimationStart: (animation: {
2149
+ x: AnimationInterface;
2150
+ y: AnimationInterface;
2151
+ }, draggable: Draggable) => void;
2152
+ onDragAnimationEnd: (animation: {
2153
+ x: AnimationInterface;
2154
+ y: AnimationInterface;
2155
+ }, draggable: Draggable) => void;
2156
+ onDragSessionStart: DragEventHandler<Draggable>;
2157
+ onDragSessionMove: DragEventHandler<Draggable>;
2158
+ onDragSessionEnd: DragEventHandler<Draggable>;
2159
+ onDragStart: DragEventHandler<Draggable>;
2160
+ onDragWillMove: DragEventHandler<Draggable>;
2161
+ onDragDidMove: DragEventHandler<Draggable>;
2162
+ onDragEnd: DragEventHandler<Draggable>;
2163
+ }
2164
+
2165
+ /** @public */
2166
+ export declare const Draggable: React_2.ComponentClass<Partial<DeprecatedFrameWithEventsProps> & Partial<DraggableProps<typeof DeprecatedFrameWithEvents>>>;
2167
+
2168
+ declare interface DraggableProps<Draggable> extends DraggableSpecificProps<Draggable> {
2169
+ enabled: boolean;
2170
+ }
2171
+
2172
+ declare interface DraggableSpecificProps<Draggable> extends Partial<DragEvents<Draggable>> {
2173
+ momentum: boolean;
2174
+ momentumOptions: {
2175
+ friction: number;
2176
+ tolerance: number;
2177
+ };
2178
+ momentumVelocityMultiplier: number;
2179
+ speedX: number;
2180
+ speedY: number;
2181
+ bounce: boolean;
2182
+ bounceOptions: {
2183
+ friction: number;
2184
+ tension: number;
2185
+ tolerance: number;
2186
+ };
2187
+ directionLock: boolean;
2188
+ directionLockThreshold: {
2189
+ x: number;
2190
+ y: number;
2191
+ };
2192
+ overdrag: boolean;
2193
+ overdragScale: number;
2194
+ pixelAlign: boolean;
2195
+ velocityTimeout: number;
2196
+ velocityScale: number;
2197
+ horizontal: boolean;
2198
+ vertical: boolean;
2199
+ constraints: Partial<Rect>;
2200
+ mouseWheel: boolean;
2201
+ }
2202
+
2203
+ declare type EaseOptions = Omit<BezierOptions, "curve">;
2204
+
2205
+ declare type EffectOrMotionProp<T> = (Partial<Record<keyof FXValues, number>> & {
2206
+ transition: ValueAnimationTransition<number>;
2207
+ }) | T;
2208
+
2209
+ declare interface EffectScrollTarget {
2210
+ ref?: React_2.RefObject<HTMLElement>;
2211
+ offset?: number;
2212
+ direction?: ScrollDirection;
2213
+ target?: TargetAndTransition | VariantLabels;
2214
+ }
2215
+
2216
+ declare interface EffectStyleScrollTarget extends EffectScrollTarget {
2217
+ target: StyleEffect;
2218
+ }
2219
+
2220
+ declare interface EffectStyleScrollTarget_2 extends EffectScrollTarget {
2221
+ target: Record<keyof FXValues, number>;
2222
+ }
2223
+
2224
+ declare const effectValuesKeys: readonly ["opacity", "x", "y", "scale", "rotate", "rotateX", "rotateY", "transformPerspective"];
2225
+
2226
+ declare interface EffectVariantScrollTarget extends EffectScrollTarget {
2227
+ target: string;
2228
+ }
2229
+
2230
+ declare type ElementId = string;
2231
+
2232
+ /**
2233
+ * @public
2234
+ */
2235
+ declare type Elements = Record<ElementId, string>;
2236
+
2237
+ /**
2238
+ * @public
2239
+ */
2240
+ export declare type EmulatedScrollProps = {
2241
+ native?: false | undefined;
2242
+ } & Omit<Partial<FrameProps>, "onScroll" | "size" | "overflow"> & ScrollEvents & ScrollConfig;
2243
+
2244
+ declare interface EnabledGestures {
2245
+ hover: boolean;
2246
+ pressed: boolean;
2247
+ }
2248
+
2249
+ declare type EnabledVariantGestures = Record<string, EnabledGestures>;
2250
+
2251
+ /** @public */
2252
+ export declare interface EnumControlDescription<P = any> extends BaseControlDescription<P> {
2253
+ type: ControlType.Enum;
2254
+ defaultValue?: string | boolean | number | undefined | null;
2255
+ options: (string | boolean | number | undefined | null)[];
2256
+ optionTitles?: string[];
2257
+ displaySegmentedControl?: boolean;
2258
+ /** Used when displaySegmentedControl is enabled. If not given defaults to horizontal */
2259
+ segmentedControlDirection?: "horizontal" | "vertical";
2260
+
2261
+
2262
+ }
2263
+
2264
+ declare type EventDispatcher = (type: string, event: FramerEvent, target: EventTarget) => void;
2265
+
2266
+ declare type EventHandler = (event: FramerEvent) => void;
2267
+
2268
+ /** @public */
2269
+ export declare interface EventHandlerControlDescription<P = any> extends BaseControlDescription<P> {
2270
+ type: ControlType.EventHandler;
2271
+ }
2272
+
2273
+ /**
2274
+ * @public
2275
+ */
2276
+ export declare type FadeTransitionOptions = NavigationTransitionAnimation;
2277
+
2278
+ /** @public */
2279
+ export declare interface FileControlDescription<P = any> extends BaseControlDescription<P> {
2280
+ type: ControlType.File;
2281
+ allowedFileTypes: string[];
2282
+ }
2283
+
2284
+ /** @public */
2285
+ export declare interface FilterNumberProperties {
2286
+ brightness: number;
2287
+ contrast: number;
2288
+ grayscale: number;
2289
+ hueRotate: number;
2290
+ invert: number;
2291
+ saturate: number;
2292
+ sepia: number;
2293
+ blur: number;
2294
+ }
2295
+
2296
+ /** @public */
2297
+ export declare interface FilterProperties extends FilterNumberProperties {
2298
+ dropShadows: Readonly<Shadow[]>;
2299
+ }
2300
+
2301
+ /**
2302
+ * @public
2303
+ */
2304
+ declare type FinishFunction = (transaction: TransactionId) => void;
2305
+
2306
+ /**
2307
+ * @public
2308
+ */
2309
+ export declare interface FlipTransitionOptions extends NavigationTransitionAnimation, NavigationTransitionAppearsFrom {
2310
+ }
2311
+
2312
+ export declare function Floating({ alignment, placement, safeArea, offsetX, offsetY, anchorRef, className, children, portalSelector, zIndex, collisionDetection, collisionDetectionPadding, onDismiss, ...rest }: React_2.PropsWithChildren<FloatingProps>): React_2.ReactPortal;
2313
+
2314
+ declare interface FloatingProps {
2315
+ alignment: Alignment;
2316
+ placement: Placement;
2317
+ offsetX: number;
2318
+ offsetY: number;
2319
+ anchorRef: React_2.MutableRefObject<HTMLElement | null>;
2320
+ safeArea: boolean;
2321
+ className: string;
2322
+ portalSelector: string;
2323
+ zIndex: number | undefined;
2324
+ collisionDetection?: boolean;
2325
+ collisionDetectionPadding?: number;
2326
+ onDismiss: () => void;
2327
+ }
2328
+
2329
+ declare interface FontControlDefaultValue {
2330
+ textAlign?: "left" | "right" | "center";
2331
+ fontSize?: number;
2332
+ letterSpacing?: string | number;
2333
+ lineHeight?: string | number;
2334
+ }
2335
+
2336
+ declare interface FontControlDescription<P = any> extends BaseControlDescription<P> {
2337
+ type: ControlType.Font;
2338
+ controls?: "basic" | "extended";
2339
+ defaultFontType?: "monospace" | "sans-serif";
2340
+ defaultValue?: FontControlDefaultValue;
2341
+ displayTextAlignment?: boolean;
2342
+ displayFontSize?: boolean;
2343
+ }
2344
+
2345
+ /** @public */
2346
+ declare type FontSourceName = "local" | "google" | "fontshare" | "custom";
2347
+
2348
+ /** @public */
2349
+ export declare const Frame: React_2.ForwardRefExoticComponent<Partial<FrameProps> & React_2.RefAttributes<HTMLDivElement>>;
2350
+
2351
+ /**
2352
+ * @privateRemarks do no use separately from FrameProps
2353
+ * @public
2354
+ * */
2355
+ export declare interface FrameLayoutProperties extends PositionStickyProperties, PositionFixedProperties, PositionAbsoluteProperties {
2356
+ /**
2357
+ * Distance from the top in pixels. Set to `0` by default.
2358
+ * @remarks
2359
+ * ```jsx
2360
+ * <Frame top={100} />
2361
+ * ```
2362
+ * @public
2363
+ */
2364
+ top: number | string | MotionValue<number | string>;
2365
+ /**
2366
+ * Distance from the right in pixels. Set to `0` by default.
2367
+ * @remarks
2368
+ * ```jsx
2369
+ * <Frame right={100} />
2370
+ * ```
2371
+ * @public
2372
+ */
2373
+ right: number | string | MotionValue<number | string>;
2374
+ /**
2375
+ * Distance from the bottom in pixels. Set to `0` by default.
2376
+ * @remarks
2377
+ * ```jsx
2378
+ * <Frame bottom={100} />
2379
+ * ```
2380
+ * @public
2381
+ */
2382
+ bottom: number | string | MotionValue<number | string>;
2383
+ /**
2384
+ * Distance from the left in pixels. Set to `0` by default.
2385
+ * @remarks
2386
+ * ```jsx
2387
+ * <Frame left={100} />
2388
+ * ```
2389
+ * @public
2390
+ */
2391
+ left: number | string | MotionValue<number | string>;
2392
+ /**
2393
+ * Set the CSS `width` property. Set to `200` by default. Accepts all CSS value types (including pixels, percentages, keywords and more).
2394
+ * @remarks
2395
+ * ```jsx
2396
+ * // Pixels
2397
+ * <Frame width={100} />
2398
+ *
2399
+ * // Percentages
2400
+ * <Frame width={"100%"} />
2401
+ * ```
2402
+ * @public
2403
+ */
2404
+ width: number | string | MotionValue<number | string>;
2405
+ /**
2406
+ * Set the CSS `height` property. Set to `200` by default. Accepts all CSS value types (including pixels, percentages, keywords and more).
2407
+ * @remarks
2408
+ * ```jsx
2409
+ * // Pixels
2410
+ * <Frame height={100} />
2411
+ *
2412
+ * // Percentages
2413
+ * <Frame height={"100%"} />
2414
+ *
2415
+ * ```
2416
+ * @public
2417
+ */
2418
+ height: number | string | MotionValue<number | string>;
2419
+ /**
2420
+ * Set the CSS `position` property. Set to `"absolute"` by default.
2421
+ * @remarks
2422
+ * ```jsx
2423
+ * <Frame position={"relative"} />
2424
+ * ```
2425
+ * @public
2426
+ */
2427
+ position: React_2.CSSProperties["position"];
2428
+ /**
2429
+ * Shortcut for centering Frames.
2430
+ * @remarks
2431
+ * ```jsx
2432
+ * // Center
2433
+ * <Frame center />
2434
+ *
2435
+ * // Center horizontally
2436
+ * <Frame center="x" />
2437
+ *
2438
+ * // Center vertically
2439
+ * <Frame center="y" />
2440
+ * ```
2441
+ * @public
2442
+ */
2443
+ center: boolean | "x" | "y";
2444
+ /**
2445
+ * Shortcut for setting the width and height simultaneously.
2446
+ * @remarks
2447
+ * ```jsx
2448
+ * <Frame size={100} />
2449
+ * ```
2450
+ * @public
2451
+ */
2452
+ size: number | string;
2453
+ /**
2454
+ * Set the CSS `min-width` property. Unset by default.
2455
+ * @remarks
2456
+ * ```jsx
2457
+ * <Frame minWidth={200} />
2458
+ * ```
2459
+ * @public
2460
+ */
2461
+ minWidth: number | string | MotionValue<number | string>;
2462
+ /**
2463
+ * Set the CSS `min-height` property. Unset by default.
2464
+ * @remarks
2465
+ * ```jsx
2466
+ * <Frame minHeight={200} />
2467
+ * ```
2468
+ * @public
2469
+ */
2470
+ minHeight: number | string | MotionValue<number | string>;
2471
+ /**
2472
+ * Set the CSS `min-width` property. Unset by default.
2473
+ * @remarks
2474
+ * ```jsx
2475
+ * <Frame minWidth={200} />
2476
+ * ```
2477
+ * @public
2478
+ */
2479
+ maxWidth: number | string | MotionValue<number | string>;
2480
+ /**
2481
+ * Set the CSS `max-height` property. Unset by default.
2482
+ * @remarks
2483
+ * ```jsx
2484
+ * <Frame maxHeight={200} />
2485
+ * ```
2486
+ * @public
2487
+ */
2488
+ maxHeight: number | string | MotionValue<number | string>;
2489
+
2490
+
2491
+ }
2492
+
2493
+ /** @public */
2494
+ export declare interface FrameProps extends ImageAltProps, BackgroundProperties, VisualProperties, Omit<MotionDivProps, "color" | "children">, CSSTransformProperties, LayerProps, FrameLayoutProperties, ConstraintConfiguration, BaseFrameProps {
2495
+ as?: keyof HTMLElementTagNameMap;
2496
+
2497
+
2498
+
2499
+ }
2500
+
2501
+ /**
2502
+ * The animation object returned by the {@link (animate:function)} functions
2503
+ * @remarks
2504
+ * Can be used to control a animation or wait for it to finish. You never create a FramerAnimation yourself, but store the return type from the animate function.
2505
+ * ```jsx
2506
+ * const animation = animate.ease(value, 100)
2507
+ * await animation.finished()
2508
+ * const animation = animate.spring(value, 200)
2509
+ * animation.cancel()
2510
+ * ```
2511
+ * @privateRemarks
2512
+ * This could be called just Animation, but it's type would clash with
2513
+ * javascript's native Animation: https://developer.mozilla.org/en-US/docs/Web/API/Animation
2514
+ * So if you forget the import, you would get weird errors.
2515
+ *
2516
+ * Also, this class follows the native Animation as much as possible.
2517
+ * @public
2518
+ * @deprecated Use the {@link useAnimation} hook instead
2519
+ */
2520
+ export declare class FramerAnimation<Value, AnimatorOptions> {
2521
+
2522
+
2523
+
2524
+
2525
+
2526
+
2527
+
2528
+
2529
+
2530
+
2531
+
2532
+
2533
+ /**
2534
+ * Wait for the animation to be ready to play.
2535
+ * @remarks
2536
+ * ```jsx
2537
+ * const animation = animate.ease(value, 100)
2538
+ * animation.ready().then(() => {
2539
+ * // Animation is ready
2540
+ * })
2541
+
2542
+ * // async/await syntax
2543
+ * const animation = animate.ease(value, 100)
2544
+ * await animation.ready()
2545
+ * // Animation is ready
2546
+ * ```
2547
+ * @returns Promise that is resolved when the animation is ready to play
2548
+ * @public
2549
+ */
2550
+ get ready(): Promise<void>;
2551
+
2552
+
2553
+
2554
+
2555
+ /**
2556
+ * Wait for the animation to be finished.
2557
+ * @remarks
2558
+ * ```jsx
2559
+ * // async/await syntax
2560
+ * const animation = animate.ease(value, 100)
2561
+ * await animation.finished()
2562
+ * // Animation is finished
2563
+ *
2564
+ *
2565
+ * const animation = animate.ease(value, 100)
2566
+ * animation.ready().then(() => {
2567
+ * // Animation is finished
2568
+ * })
2569
+ * ```
2570
+ * @returns Promise that is resolved when the animation is ready to play
2571
+ * @public
2572
+ */
2573
+ get finished(): Promise<void>;
2574
+
2575
+ /**
2576
+ * Cancels the animation if it is still running.
2577
+ * @remarks
2578
+ * ```jsx
2579
+ * const animation = animate.ease(value, 100, {duration: 3})
2580
+ * setTimeout(() => animation.cancel(), 500)
2581
+ * ```
2582
+ * @public
2583
+ */
2584
+ cancel(): void;
2585
+
2586
+
2587
+ }
2588
+
2589
+ declare type FramerAnimationState = "idle" | "running" | "finished";
2590
+
2591
+ /**
2592
+ * @public
2593
+ */
2594
+ export declare class FramerEvent {
2595
+
2596
+
2597
+
2598
+
2599
+
2600
+
2601
+
2602
+
2603
+
2604
+ private static eventLikeFromOriginalEvent;
2605
+
2606
+
2607
+
2608
+ }
2609
+
2610
+ /** @public */
2611
+ export declare interface FusedNumberControlDescription<P = any> extends BaseControlDescription<P> {
2612
+ type: ControlType.FusedNumber;
2613
+ defaultValue?: number;
2614
+ toggleKey: keyof P;
2615
+ toggleTitles: [string, string];
2616
+ valueKeys: [keyof P, keyof P, keyof P, keyof P];
2617
+ valueLabels: [string, string, string, string];
2618
+ min?: number;
2619
+ }
2620
+
2621
+ declare type FXProps = Partial<Prefixed<ParallaxTransformOptions & StyleAppearEffectOptions & StyleTransformEffectOptions>> & Partial<MotionProps> & {
2622
+ __withFX?: boolean;
2623
+ __perspectiveFX?: boolean;
2624
+ __targetOpacity?: number;
2625
+ __smartComponentFX?: boolean;
2626
+ } & Record<string, unknown>;
2627
+
2628
+ /**
2629
+ * All effects that can be composed operate on a single set of motion values, by
2630
+ * adding or multiplying their values with other effect values. FXValues is the
2631
+ * shared interface that can be animated.
2632
+ */
2633
+ declare type FXValues = Record<(typeof effectValuesKeys)[number], MotionValue<number>>;
2634
+
2635
+ declare type GestureState = Partial<{
2636
+ isHovered: boolean;
2637
+ isPressed: boolean;
2638
+ }>;
2639
+
2640
+ /** @public */
2641
+ export declare function getFonts(component: React_2.ComponentType<unknown>): ComponentFontBundle[];
2642
+
2643
+ /**
2644
+ * @public
2645
+ */
2646
+ export declare type Gradient = LinearGradient | RadialGradient;
2647
+
2648
+ /**
2649
+ * @public
2650
+ */
2651
+ declare interface GradientColorStop {
2652
+ value: string;
2653
+ position: number;
2654
+ }
2655
+
2656
+ declare type Hash = ElementId | string;
2657
+
2658
+ declare type HigherOrderComponent<Props> = (Component: React_2.ComponentType<Props>, props?: Props) => React_2.ComponentType<Props>;
2659
+
2660
+ /** @public */
2661
+ export declare interface IdentityProps {
2662
+ /** An unique id for the layer */
2663
+ id?: string;
2664
+ duplicatedFrom?: string[];
2665
+ }
2666
+
2667
+ /** @public */
2668
+ declare const Image_2: React_2.ForwardRefExoticComponent<Partial<ImageProps> & React_2.RefAttributes<HTMLDivElement>>;
2669
+ export { Image_2 as Image }
2670
+
2671
+ declare interface ImageAltProps {
2672
+ /**
2673
+ * Previously, alt was set on the BackgroundImage object. This caused issues
2674
+ * where the entire object would need to be replaced in order to update the
2675
+ * alt attribute. Now we provide a specific prop for the alt attribute so it
2676
+ * can change even if the background object does not and vice versa. This
2677
+ * needs to be optional so that old sites and Smart Components generated
2678
+ * with alt in the BackgroundImage object do not error. Those sites and
2679
+ * Smart Components will correctly fallback to BackgroundImage.alt.
2680
+ */
2681
+ alt?: string;
2682
+ }
2683
+
2684
+ /**
2685
+ * @deprecated Use {@link ResponsiveImageControlDescription} instead.
2686
+ * @public
2687
+ */
2688
+ export declare interface ImageControlDescription<P = any> extends BaseControlDescription<P> {
2689
+ type: ControlType.Image;
2690
+ }
2691
+
2692
+ /** @public */
2693
+ export declare type ImageFit = "fill" | "fit" | "stretch" | "tile";
2694
+
2695
+ /** @public */
2696
+ declare interface ImageProps extends MotionDivProps, BackgroundImageProps {
2697
+ as?: keyof HTMLElementTagNameMap;
2698
+ }
2699
+
2700
+ /** @public */
2701
+ export declare type IncomingColor = ColorRGB | ColorHSL | ColorRGBA | ColorHSLA | string;
2702
+
2703
+ /**
2704
+ * @public
2705
+ */
2706
+ declare interface Interpolation<Value = any> {
2707
+
2708
+
2709
+ }
2710
+
2711
+ /**
2712
+ * @public
2713
+ */
2714
+ declare const Interpolation: {
2715
+
2716
+ };
2717
+
2718
+ declare interface InterpolationOptions {
2719
+ colorModel: ColorMixModelType;
2720
+ }
2721
+
2722
+ /** @public */
2723
+ export declare function isRelativeNumber(value: unknown): value is RelativeNumber;
2724
+
2725
+ /**
2726
+ * @public
2727
+ */
2728
+ export declare class Layer<P extends Partial<LayerProps>, S> extends Component<P, S> {
2729
+ static readonly defaultProps: LayerProps;
2730
+ static applyWillChange(props: WillChangeTransformProp, style: MotionStyle, usingMotionStyle: boolean): void;
2731
+ /** @private (Just using `private` breaks compilation unless using `stripInternal`) */
2732
+ layerElement: HTMLElement | SVGElement | null;
2733
+ setLayerElement: (element: HTMLElement | SVGElement | null) => void;
2734
+
2735
+
2736
+ }
2737
+
2738
+ /** @public */
2739
+ export declare interface LayerProps extends IdentityProps, WillChangeTransformProp, DOMLayoutProps {
2740
+ children?: ReactNode;
2741
+ key?: React_2.Key;
2742
+
2743
+
2744
+
2745
+
2746
+ }
2747
+
2748
+ export { LayoutGroupContext }
2749
+
2750
+ /**
2751
+ * @public
2752
+ */
2753
+ export declare type LinearGradient = LinearGradientBase & (SimpleGradient | MultiStopGradient);
2754
+
2755
+ /**
2756
+ * @public
2757
+ */
2758
+ export declare const LinearGradient: {
2759
+ /**
2760
+ * @param value -
2761
+ */
2762
+ isLinearGradient: (value: any) => value is LinearGradient;
2763
+
2764
+
2765
+ };
2766
+
2767
+ /**
2768
+ * @public
2769
+ */
2770
+ export declare interface LinearGradientBase {
2771
+ alpha: number;
2772
+ angle: number;
2773
+ }
2774
+
2775
+ /** @public */
2776
+ export declare const Link: React_2.ForwardRefExoticComponent<Pick<Props, "key" | "children" | keyof LinkProps> & React_2.RefAttributes<unknown>>;
2777
+
2778
+ /** @public */
2779
+ declare interface LinkControlDescription<P = any> extends BaseControlDescription<P> {
2780
+ type: ControlType.Link;
2781
+ defaultValue?: string;
2782
+ }
2783
+
2784
+ declare interface LinkProps {
2785
+ href: string | LinkToWebPage | undefined;
2786
+ /**
2787
+ * Which browsing context to display the linked URL. If not provided, the
2788
+ * Link component will only open the link in a new tab if the href is an
2789
+ * external URL.
2790
+ */
2791
+ openInNewTab?: boolean;
2792
+ smoothScroll?: boolean;
2793
+ }
2794
+
2795
+ declare interface LinkToWebPage {
2796
+ webPageId: string;
2797
+ hash?: string;
2798
+ pathVariables?: Record<string, string>;
2799
+ hashVariables?: Record<string, string>;
2800
+ unresolvedPathSlugs?: Record<string, UnresolvedSlug>;
2801
+ unresolvedHashSlugs?: Record<string, UnresolvedSlug>;
2802
+ }
2803
+
2804
+ /**
2805
+ * @public
2806
+ * A unique locale with an id, code (e.g. "en-US"), name, slug, and optional fallback.
2807
+ */
2808
+ export declare interface Locale {
2809
+ /** Unique id. */
2810
+ readonly id: LocaleId;
2811
+ /** Language and optional region code (e.g. "en-US"). */
2812
+ readonly code: string;
2813
+ /** Display name, for example used by the locale picker component. */
2814
+ readonly name: string;
2815
+ /** Locale slug is inserted as the first path segment when non empty. */
2816
+ readonly slug: string;
2817
+ /** Optional fallback locale, used when resolving localized values. */
2818
+ readonly fallback?: Locale;
2819
+ }
2820
+
2821
+ /**
2822
+ * @public
2823
+ * A unique id for a locale.
2824
+ */
2825
+ export declare type LocaleId = string;
2826
+
2827
+ /**
2828
+ * @public
2829
+ * The active locale, all of the available locales, and a way to change the active locale.
2830
+ */
2831
+ export declare interface LocaleInfo {
2832
+ /** The locale currently active. */
2833
+ readonly activeLocale: Locale | null;
2834
+ /** All of the available locales. */
2835
+ readonly locales: readonly Locale[];
2836
+ /** Update the active locale by passing in either a locale or locale id. */
2837
+ readonly setLocale: (locale: Locale | LocaleId) => Promise<void>;
2838
+ }
2839
+
2840
+ declare type Mixer = (from: string | Color, toColor: Color, options?: ColorMixOptions) => (p: number) => string;
2841
+
2842
+ declare type MixerStateful = (toColor: Color, options?: ColorMixOptions) => (p: number) => string;
2843
+
2844
+ /**
2845
+ * @public
2846
+ */
2847
+ export declare interface ModalTransitionOptions extends NavigationTransitionAnimation, NavigationTransitionBackdropColor {
2848
+ }
2849
+
2850
+ declare type MotionDivProps = HTMLMotionProps<"div">;
2851
+
2852
+ /** @public */
2853
+ export declare function MotionSetup({ children }: Props_2): JSX.Element;
2854
+
2855
+ /**
2856
+ * @public
2857
+ */
2858
+ declare interface MultiStopGradient {
2859
+ stops: readonly GradientColorStop[];
2860
+ }
2861
+
2862
+ /**
2863
+ * @public
2864
+ */
2865
+ export declare type NativeScrollProps = {
2866
+ native: true;
2867
+ } & Omit<Partial<FrameProps>, "size" | "overflow"> & Omit<ScrollEvents, "onScroll"> & ScrollConfig & {
2868
+ scrollBarVisible?: boolean;
2869
+ };
2870
+
2871
+ /**
2872
+ * Provides {@link NavigationInterface} that can be used to start transitions in Framer.
2873
+ * @public
2874
+ */
2875
+ export declare const NavigationConsumer: React_2.Consumer<NavigationInterface>;
2876
+
2877
+ /**
2878
+ * The navigator allows control over the built-in navigation component in Framer.
2879
+ * @public
2880
+ */
2881
+ export declare interface NavigationInterface {
2882
+ /**
2883
+ * Go back to the previous screen. If a stack of overlays is presented, all overlays are dismissed.
2884
+ * @public
2885
+ * */
2886
+ goBack: () => void;
2887
+ /**
2888
+ * Show new screen instantly.
2889
+ * @param component - The incoming component
2890
+ * @public
2891
+ */
2892
+ instant: (component: React_2.ReactNode) => void;
2893
+ /**
2894
+ * Fade in new screen.
2895
+ * @param component - The incoming component
2896
+ * @param options - {@link FadeTransitionOptions}
2897
+ * @public
2898
+ */
2899
+ fade: (component: React_2.ReactNode, options?: FadeTransitionOptions) => void;
2900
+ /**
2901
+ * Push new screen. Defaults from right to left, the direction can be changed using the {@link NavigationTransitionOptions}.
2902
+ * @param component - The incoming component
2903
+ * @param options - {@link PushTransitionOptions}
2904
+ * @public
2905
+ */
2906
+ push: (component: React_2.ReactNode, options?: PushTransitionOptions) => void;
2907
+ /**
2908
+ * Present modal overlay in the center.
2909
+ * @param component - The incoming component
2910
+ * @param options - {@link ModalTransitionOptions}
2911
+ * @public
2912
+ */
2913
+ modal: (component: React_2.ReactNode, options?: ModalTransitionOptions) => void;
2914
+ /**
2915
+ * Present overlay from one of four edges. The direction can be changed using the {@link NavigationTransitionOptions}.
2916
+ * @param component - The incoming component
2917
+ * @param options - {@link OverlayTransitionOptions}
2918
+ * @public
2919
+ */
2920
+ overlay: (component: React_2.ReactNode, options?: OverlayTransitionOptions) => void;
2921
+ /**
2922
+ * Flip incoming and outgoing screen in 3D. The flip direction can be changed using the {@link NavigationTransitionOptions}.
2923
+ * @param component - The incoming component
2924
+ * @param options - {@link FlipTransitionOptions}
2925
+ * @public
2926
+ */
2927
+ flip: (component: React_2.ReactNode, options?: FlipTransitionOptions) => void;
2928
+ /**
2929
+ * Present a screen using a custom {@link NavigationTransition}.
2930
+ * @param component - The incoming component
2931
+ * @param transition - {@link NavigationTransition}
2932
+ * @public
2933
+ */
2934
+ customTransition: (component: React_2.ReactNode, transition: NavigationTransition_2) => void;
2935
+ /**
2936
+ * Animate layers with matching magicIds between screens. Layers are assigned matching IDs if they share a name, or were copied from one another.
2937
+ * The transition can be changed using a custom {@link NavigationTransition}.
2938
+ * @param component - The incoming component
2939
+ * @param transition - {@link NavigationTransition}
2940
+ * @public
2941
+ */
2942
+ magicMotion: (component: React_2.ReactNode, transition: NavigationTransition_2) => void;
2943
+ }
2944
+
2945
+ /**
2946
+ * Can be used to define a custom navigation transition.
2947
+ * @public
2948
+ */
2949
+ declare interface NavigationTransition_2 extends NavigationTransitionAnimation, NavigationTransitionBackdropColor {
2950
+ /**
2951
+ * Defines the begin state of the incoming screen wrapper.
2952
+ */
2953
+ enter?: Partial<FrameProps>;
2954
+ /**
2955
+ * Defines the end state of the outgoing screen wrapper.
2956
+ */
2957
+ exit?: Partial<FrameProps>;
2958
+ /**
2959
+ * Defines the position and size of the incoming screen wrapper. Defaults to top, right, bottom, and left of 0.
2960
+ */
2961
+ position?: NavigationTransitionPosition;
2962
+ /**
2963
+ * Defines whether the incoming screen should render over the current context, like an overlay or modal. Defaults to false.
2964
+ */
2965
+ overCurrentContext?: boolean;
2966
+ /**
2967
+ * Defines whether a tap in the background should dismiss the screen presented over the current context. Defaults to true.
2968
+ */
2969
+ goBackOnTapOutside?: boolean;
2970
+ /**
2971
+ * Defines whether the backface of the incoming and outgoing screens should be visible, necessary for certain 3D transitions. Defaults to true.
2972
+ */
2973
+ backfaceVisible?: boolean;
2974
+ /**
2975
+ * Defines whether the incoming and outgoing screens should auto animate their children. Defaults to false.
2976
+ */
2977
+ withMagicMotion?: boolean;
2978
+ }
2979
+ export { NavigationTransition_2 as NavigationTransition }
2980
+
2981
+ /**
2982
+ * @public
2983
+ */
2984
+ export declare interface NavigationTransitionAnimation {
2985
+ /**
2986
+ * The animation defaults.
2987
+ */
2988
+ animation?: Transition;
2989
+ }
2990
+
2991
+ /**
2992
+ * @public
2993
+ */
2994
+ export declare interface NavigationTransitionAppearsFrom extends NavigationTransitionAnimation {
2995
+ /**
2996
+ * Defines which side the target will appear from.
2997
+ * @remarks
2998
+ *
2999
+ * - `"left"`
3000
+ * - `"right"`
3001
+ * - `"top"`
3002
+ * - `"bottom"`
3003
+ */
3004
+ appearsFrom?: NavigationTransitionSide;
3005
+ }
3006
+
3007
+ /**
3008
+ * @public
3009
+ */
3010
+ export declare interface NavigationTransitionBackdropColor {
3011
+ /**
3012
+ * Defines the backdrop color when the incoming screen is rendered over the current context. Defaults to the iOS dim color.
3013
+ */
3014
+ backdropColor?: string;
3015
+ }
3016
+
3017
+ /**
3018
+ * @public
3019
+ */
3020
+ export declare type NavigationTransitionPosition = Partial<Pick<FrameLayoutProperties, "top" | "right" | "bottom" | "left" | "center">>;
3021
+
3022
+ /**
3023
+ * @public
3024
+ */
3025
+ export declare type NavigationTransitionSide = "left" | "right" | "top" | "bottom";
3026
+
3027
+ /** @public */
3028
+ export declare interface NumberControlDescription<P = any> extends BaseControlDescription<P> {
3029
+ type: ControlType.Number;
3030
+ defaultValue?: number;
3031
+ max?: number;
3032
+ min?: number;
3033
+ unit?: string;
3034
+ step?: number;
3035
+ displayStepper?: boolean;
3036
+ }
3037
+
3038
+ /**
3039
+ * @remarks This feature is still in beta
3040
+ * @public
3041
+ */
3042
+ export declare interface ObjectControlDescription<P = any> extends BaseControlDescription<P> {
3043
+ type: ControlType.Object;
3044
+ controls: {
3045
+ [key: string]: ObjectPropertyControlDescription;
3046
+ };
3047
+ defaultValue?: {
3048
+ [key: string]: any;
3049
+ };
3050
+ buttonTitle?: string;
3051
+ optional?: boolean;
3052
+ icon?: ObjectControlIcon;
3053
+ }
3054
+
3055
+ /**
3056
+ * Object Control Icons provided by Framer
3057
+ */
3058
+ declare type ObjectControlIcon = "object" | "effect" | "color" | "interaction" | "boolean";
3059
+
3060
+ /**
3061
+ * Object sub type
3062
+ * Currently not supported: component instance, and event handler.
3063
+ * @public
3064
+ */
3065
+ export declare type ObjectPropertyControlDescription<P = any> = NumberControlDescription<P> | EnumControlDescription<P> | BooleanControlDescription<P> | StringControlDescription<P> | RichTextControlDescription<P> | ColorControlDescription<P> | SegmentedEnumControlDescription<P> | ImageControlDescription<P> | ResponsiveImageControlDescription<P> | FileControlDescription<P> | TransitionControlDescription<P> | LinkControlDescription<P> | DateControlDescription<P> | ArrayControlDescription<P> | ObjectControlDescription<P> | FusedNumberControlDescription<P> | FontControlDescription<P> | PageScopeControlDescription<P> | ScrollSectionRefControlDescription<P> | CustomCursorControlDescription<P>;
3066
+
3067
+ /**
3068
+ * @public
3069
+ */
3070
+ declare type Observer<Value> = {
3071
+ update: UpdateFunction<Value>;
3072
+ finish: FinishFunction;
3073
+ } | UpdateFunction<Value>;
3074
+
3075
+ declare type Overflow = "visible" | "hidden" | "scroll" | "auto";
3076
+
3077
+ declare interface OverflowProperties {
3078
+ overflow: Overflow;
3079
+ }
3080
+
3081
+ /**
3082
+ * @public
3083
+ */
3084
+ export declare interface OverlayTransitionOptions extends NavigationTransitionAnimation, NavigationTransitionAppearsFrom, NavigationTransitionBackdropColor {
3085
+ }
3086
+
3087
+ /** @public */
3088
+ export declare type Override<T extends object = FrameProps & {
3089
+ [key: string]: any;
3090
+ }> = OverrideObject<T> | OverrideFunction<T>;
3091
+
3092
+ /** @public */
3093
+ export declare type OverrideFunction<P extends object = any> = (props: P) => Partial<P>;
3094
+
3095
+ /** @public */
3096
+ export declare type OverrideObject<T extends object = any> = Partial<T>;
3097
+
3098
+ export declare const Page: ForwardRefExoticComponent<Partial<PageProps> & RefAttributes<HTMLDivElement>>;
3099
+
3100
+ /**
3101
+ * @public
3102
+ */
3103
+ export declare type PageAlignment = "start" | "center" | "end";
3104
+
3105
+ /**
3106
+ * @public
3107
+ */
3108
+ declare type PageContentDimension = "auto" | "stretch";
3109
+
3110
+ /**
3111
+ * @public
3112
+ */
3113
+ declare type PageDirection = "horizontal" | "vertical";
3114
+
3115
+ /**
3116
+ * Page effects change the behavior of the transition when swiping between pages.
3117
+ * By default there is no page effect applied.
3118
+ * @remarks
3119
+ * ```jsx
3120
+ * import React from "react"
3121
+ * import { Page, PageEffect } from "framer"
3122
+ *
3123
+ * export function MyComponent() {
3124
+ * return <Page defaultEffect={"cube"} />
3125
+ * }
3126
+ * ```
3127
+ *
3128
+ * `"none"` - No custom effect is applied. This is the default.
3129
+ * `"cube"` - Each page is positioned as a 3D cube, connected to the current page.
3130
+ * `"coverflow"` - Each page is positioned in 3D, behind the current page.
3131
+ * `"wheel"` - Each page is gently titled in 3D, like a wheel.
3132
+ * `"pile"` - Each page is stacked behind the current page.
3133
+ * @public
3134
+ */
3135
+ export declare type PageEffect = "none" | "cube" | "coverflow" | "wheel" | "pile";
3136
+
3137
+ /**
3138
+ * Information about the current effect.
3139
+ * @public
3140
+ */
3141
+ export declare interface PageEffectInfo {
3142
+ /**
3143
+ * The offset of this page, in pixels, measured from the left-most part of the container.
3144
+ * @public
3145
+ */
3146
+ offset: number;
3147
+ /**
3148
+ * The offset of this page, normalised to the page size.
3149
+ *
3150
+ * For instance, if each page is `200` pixels wide, and we're on page index `1`, the `normalizedOffset` of page index `0` will be `-1`.
3151
+ * @public
3152
+ */
3153
+ normalizedOffset: number;
3154
+ /**
3155
+ * The `width` and `height` of the page.
3156
+ * @public
3157
+ */
3158
+ size: Size;
3159
+ /**
3160
+ * The index of the current page. The first page is `0`, the second is `1` and so on.
3161
+ * @public
3162
+ */
3163
+ index: number;
3164
+ /**
3165
+ * The direction of page scrolling, `"horizontal"` or `"vertical"`
3166
+ * @public
3167
+ */
3168
+ direction: PageDirection;
3169
+ /**
3170
+ * The gap between each page, in pixels.
3171
+ * @public
3172
+ */
3173
+ gap: number;
3174
+ /**
3175
+ * The total number of pages.
3176
+ *
3177
+ * @public
3178
+ */
3179
+ pageCount: number;
3180
+ }
3181
+
3182
+ /**
3183
+ * Information about the current effect.
3184
+ * @public
3185
+ */
3186
+ declare interface PageEffectValues {
3187
+ [key: string]: string | number | boolean;
3188
+ }
3189
+
3190
+ /**
3191
+ * Event callbacks for the Page component, can be used to react to and co-ordinate
3192
+ * with other components.
3193
+ *
3194
+ * @public
3195
+ */
3196
+ export declare interface PageEvents {
3197
+ /**
3198
+ * A callback that will be invoked when changing the page.
3199
+ * @remarks
3200
+ * This will be invoked when the drag animation begins or when the page changes
3201
+ * programatically. It can be used to co-ordinate with other behaviors.
3202
+ *
3203
+ * @param currentIndex - The current page number
3204
+ * @param previousIndex - The index of the previous page
3205
+ * @public
3206
+ * @remarks
3207
+ * ```jsx
3208
+ * <Page
3209
+ * onChangePage={(current, previous) => {
3210
+ * console.log(current, previous)
3211
+ * }}
3212
+ * />
3213
+ * ```
3214
+ */
3215
+ onChangePage(currentIndex: number, previousIndex: number): void;
3216
+ }
3217
+
3218
+ /**
3219
+ * All properties that can be used with the {@link Page} component it also extends all {@link ScrollProps} properties.
3220
+ * ```jsx
3221
+ * <Page
3222
+ * direction={"horizontal"}
3223
+ * contentWidth={"stretch"}
3224
+ * contentHeight={"stretch"}
3225
+ * alignment={"center"}
3226
+ * currentPage={0}
3227
+ * animateCurrentPageUpdate={true}
3228
+ * gap={10}
3229
+ * padding={0}
3230
+ * paddingPerSide={true}
3231
+ * paddingTop={0}
3232
+ * paddingRight={0}
3233
+ * paddingBottom={0}
3234
+ * paddingLeft={0}
3235
+ * momentum={false}
3236
+ * dragEnabled={false}
3237
+ * defaultEffect={PageEffect.Cube}>
3238
+ * <Frame background="#19E" />
3239
+ * <Frame background="#5CF" />
3240
+ * <Frame background="#2CD" />
3241
+ * </Page>
3242
+ * ```
3243
+ * @public
3244
+ */
3245
+ export declare interface PageProperties {
3246
+ /**
3247
+ * Current swipe direction. Either "horizontal" or "vertical". Set to `"horizontal"` by
3248
+ * default.
3249
+ *
3250
+ * @remarks
3251
+ * ```jsx
3252
+ * <Page direction="horizontal" />
3253
+ * ```
3254
+ */
3255
+ direction: PageDirection;
3256
+ /**
3257
+ * Width of the pages within the component. Either "auto" or "stretch" or a numeric value. Set
3258
+ * to `"stretch"` by default.
3259
+ *
3260
+ * @remarks
3261
+ * ```jsx
3262
+ * <Page contentWidth="auto" />
3263
+ * ```
3264
+ */
3265
+ contentWidth: PageContentDimension | number;
3266
+ /**
3267
+ * Height of the pages within the component. Either "auto" or "stretch" or a numeric value. Set
3268
+ * to `"stretch"` by default.
3269
+ *
3270
+ * @remarks
3271
+ * ```jsx
3272
+ * <Page contentHeight="auto" />
3273
+ * ```
3274
+ */
3275
+ contentHeight: PageContentDimension | number;
3276
+ /**
3277
+ * Alignment of the pages within the component. Either "start", "center", or "end". Set to
3278
+ * `"start"` by default.
3279
+ *
3280
+ * @remarks
3281
+ * ```jsx
3282
+ * <Page alignment="center" />
3283
+ * ```
3284
+ */
3285
+ alignment: PageAlignment;
3286
+ /**
3287
+ * Index of the current page. Set to `0` by default.
3288
+ *
3289
+ * @remarks
3290
+ * ```jsx
3291
+ * <Page currentPage={5} />
3292
+ * ```
3293
+ */
3294
+ currentPage: number;
3295
+
3296
+ /**
3297
+ * If `true`, this will lock dragging to the initial direction.
3298
+ *
3299
+ * @public
3300
+ *
3301
+ * ```jsx
3302
+ * <Page direction="both" directionLock={true} />
3303
+ * ```
3304
+ */
3305
+ directionLock?: boolean;
3306
+ /**
3307
+ * Enable or disable dragging to scroll. Defaults to `true`.
3308
+ *
3309
+ * @public
3310
+ *
3311
+ * ```jsx
3312
+ * <Page dragEnabled={false} />
3313
+ * ```
3314
+ */
3315
+ dragEnabled?: boolean;
3316
+ /**
3317
+ * Enable or disable wheel scroll. Defaults to `false`.
3318
+ *
3319
+ * @public
3320
+ *
3321
+ * ```jsx
3322
+ * <Page wheelEnabled={true} />
3323
+ * ```
3324
+ */
3325
+ wheelEnabled?: boolean;
3326
+ /**
3327
+ * Horizontal offset of the scrollable content. Set to `0` by default
3328
+ *
3329
+ * @remarks
3330
+ * ```jsx
3331
+ * <Page contentOffsetX={20} />
3332
+ * ```
3333
+ */
3334
+ contentOffsetX?: MotionValue<number> | number;
3335
+ /**
3336
+ * Vertical offset of the scrollable content. Set to `0` by default.
3337
+ *
3338
+ * @remarks
3339
+ * ```jsx
3340
+ * <Page contentOffsetY={20} />
3341
+ * ```
3342
+ */
3343
+ contentOffsetY?: MotionValue<number> | number;
3344
+ /**
3345
+ * A number describing the gap between the page elements. Set to `10` by default. Can not be negative.
3346
+ *
3347
+ * @remarks
3348
+ * ```jsx
3349
+ * <Page gap={0} />
3350
+ * ```
3351
+ * */
3352
+ gap: number;
3353
+ /**
3354
+ * Padding to be applied to all sides. Set to `0` by default.
3355
+ * To specify different padding for each side, provide
3356
+ * individual `paddingTop`, `paddingLeft`, `paddingRight` and `paddingBottom` values.
3357
+ *
3358
+ * ```jsx
3359
+ * <Page padding={20} />
3360
+ * ```
3361
+ */
3362
+ padding: number;
3363
+ /**
3364
+ * Flag to tell the Page to ignore the `padding` prop and apply values per-side.
3365
+ *
3366
+ * @remarks
3367
+ *
3368
+ * ```jsx
3369
+ * <Page paddingLeft={20} />
3370
+ * ```
3371
+ */
3372
+ paddingPerSide?: boolean;
3373
+ /**
3374
+ * Value for the top padding of the container. Set to `0` by default.
3375
+ * ```jsx
3376
+ * <Page paddingTop={20} />
3377
+ * ```
3378
+ */
3379
+ paddingTop?: number;
3380
+ /**
3381
+ * ```jsx
3382
+ * <Page paddingRight={20} />
3383
+ * ```
3384
+ * Value for the right padding of the container. Set to `0` by default.
3385
+ */
3386
+ paddingRight?: number;
3387
+ /**
3388
+ * ```jsx
3389
+ * <Page paddingBottom={20} />
3390
+ * ```
3391
+ * Value for the bottom padding of the container. Set to `0` by default.
3392
+ */
3393
+ paddingBottom?: number;
3394
+ /**
3395
+ * ```jsx
3396
+ * <Page paddingLeft={20} />
3397
+ * ```
3398
+ * Value for the left padding of the container. Set to `0` by default.
3399
+ */
3400
+ paddingLeft?: number;
3401
+ /**
3402
+ * When enabled you can flick through multiple pages at once.
3403
+ * @remarks
3404
+ *
3405
+ * ```jsx
3406
+ * <Page momentum />
3407
+ * ```
3408
+ */
3409
+ momentum: boolean;
3410
+ /**
3411
+ * Pick one of the predefined effects. Either "none", "cube", "coverflow", "wheel" or "pile". Set to `"none"` by default.
3412
+ * @remarks
3413
+ *
3414
+ * ```jsx
3415
+ * <Page defaultEffect={"coverflow"} />
3416
+ * ```
3417
+ */
3418
+ defaultEffect: PageEffect;
3419
+ /**
3420
+ * Allows you to provide a custom transition effect for individual pages.
3421
+ *
3422
+ * This function is called once for every page, every time the scroll offset changes. It returns a new set of styles for this page.
3423
+ *
3424
+ * @param info - A {@link PageEffectInfo} object with information about the current effect.
3425
+ * @returns should return a new set of Frame properties.
3426
+ *
3427
+ * @remarks
3428
+ * ```jsx
3429
+ * function scaleEffect(info) {
3430
+ * const { normalizedOffset } = info
3431
+ * return {
3432
+ * scale: Math.max(0, 1 + Math.min(0, normalizedOffset * -1))
3433
+ * }
3434
+ * }
3435
+ *
3436
+ * return <Page effect={scaleEffect} />
3437
+ * ```
3438
+ * @public
3439
+ */
3440
+ effect?: (info: PageEffectInfo) => PageEffectValues;
3441
+
3442
+ }
3443
+
3444
+ /**
3445
+ * @public
3446
+ */
3447
+ export declare type PageProps = Partial<PageProperties> & Partial<Omit<FrameProps, "size" | "onScroll">> & LayerProps & Partial<PageEvents> & Partial<ScrollEvents>;
3448
+
3449
+ /**
3450
+ * @description Router Component
3451
+ * Safari iOS has a weird bug that will make `font-size` scale-up in the presence
3452
+ * of a unit width/height + `overflow: hidden` + an element in the DOM that has
3453
+ * opacity 0 and is set to opacity 1 in JS, just like in the case of our effects
3454
+ * with Motion. We set the width of published sites to auto to fix the issue. It
3455
+ * must explicitly be set on published sites because the same fix brakes the
3456
+ * preview.
3457
+ * Webkit issue: https://bugs.webkit.org/show_bug.cgi?id=240653
3458
+ * */
3459
+ /** @public */
3460
+ export declare function PageRoot({ RootComponent, isWebsite, routeId, pathVariables, routes, collectionUtils, notFoundPage, isReducedMotion, includeDataObserver, localeId, locales, preserveQueryParams, enableSuspenseThatPreservesDom, }: PageRootProps): JSX.Element;
3461
+
3462
+ declare interface PageRootProps {
3463
+ RootComponent: RouteComponent;
3464
+ isWebsite: boolean;
3465
+ routeId: string;
3466
+ pathVariables?: Record<string, unknown>;
3467
+ routes: Routes;
3468
+ collectionUtils: UtilsByCollectionId;
3469
+ notFoundPage?: React_2.ComponentType;
3470
+ isReducedMotion?: boolean;
3471
+ includeDataObserver?: boolean;
3472
+ locales?: Locale[];
3473
+ localeId?: LocaleId;
3474
+ preserveQueryParams?: boolean;
3475
+ enableSuspenseThatPreservesDom?: boolean;
3476
+ }
3477
+
3478
+ export declare interface PageScopeControlDescription<P = any> extends BaseControlDescription<P> {
3479
+ type: ControlType.PageScope;
3480
+ }
3481
+
3482
+ declare interface ParallaxTransformOptions {
3483
+ speed: number;
3484
+ adjustPosition: boolean;
3485
+ offset: number;
3486
+ parallaxTransformEnabled: boolean | undefined;
3487
+ }
3488
+
3489
+ declare type Placement = "top" | "right" | "bottom" | "left";
3490
+
3491
+ /**
3492
+ * @public
3493
+ */
3494
+ export declare function Point(x: number, y: number): Point;
3495
+
3496
+ /**
3497
+ * @public
3498
+ */
3499
+ export declare interface Point {
3500
+ x: number;
3501
+ y: number;
3502
+ }
3503
+
3504
+ /**
3505
+ * @public
3506
+ */
3507
+ export declare namespace Point {
3508
+
3509
+
3510
+
3511
+
3512
+
3513
+
3514
+
3515
+
3516
+
3517
+ /** @public */
3518
+ const isEqual: (a: Point, b: Point) => boolean;
3519
+
3520
+
3521
+
3522
+ }
3523
+
3524
+ declare interface PositionAbsoluteProperties {
3525
+
3526
+ }
3527
+
3528
+ declare interface PositionFixedProperties {
3529
+
3530
+ }
3531
+
3532
+ /** @public */
3533
+ export declare interface PositionStickyProperties {
3534
+
3535
+
3536
+
3537
+
3538
+
3539
+ }
3540
+
3541
+ declare const prefix = "__framer__";
3542
+
3543
+ declare type Prefixed<Type extends object> = {
3544
+ [Property in keyof Type as `${typeof prefix}${string & Property}`]: Type[Property];
3545
+ };
3546
+
3547
+ declare interface PresenceEffectOptions {
3548
+ initial?: EffectOrMotionProp<MotionProps["initial"]>;
3549
+ animate?: EffectOrMotionProp<MotionProps["animate"]>;
3550
+ exit?: EffectOrMotionProp<MotionProps["exit"]>;
3551
+ presenceInitial?: EffectOrMotionProp<MotionProps["initial"]>;
3552
+ presenceAnimate?: EffectOrMotionProp<MotionProps["animate"]>;
3553
+ presenceExit?: EffectOrMotionProp<MotionProps["exit"]>;
3554
+ }
3555
+
3556
+ /**
3557
+ * Prints to the console.
3558
+ *
3559
+ * @param args - Arguments to print
3560
+ * @public
3561
+ */
3562
+ declare function print_2(...args: any[]): void;
3563
+ export { print_2 as print }
3564
+
3565
+ /** @public */
3566
+ export declare type PropertyControls<ComponentProps = any, ArrayTypes = any> = {
3567
+ [K in keyof ComponentProps]?: ControlDescription<Partial<ComponentProps>>;
3568
+ };
3569
+
3570
+ declare type Props = React_2.PropsWithChildren<LinkProps> & React_2.RefAttributes<unknown>;
3571
+
3572
+ declare interface Props_2 {
3573
+ children: React_2.ReactNode;
3574
+ }
3575
+
3576
+ declare type Props_3<T> = Omit<T, "animate" | "initial" | "exit"> & Pick<PresenceEffectOptions, "animate" | "exit" | "initial">;
3577
+
3578
+ /**
3579
+ * @public
3580
+ */
3581
+ export declare interface PushTransitionOptions extends NavigationTransitionAnimation, NavigationTransitionAppearsFrom {
3582
+ }
3583
+
3584
+ /**
3585
+ * @public
3586
+ */
3587
+ export declare type RadialGradient = RadialGradientBase & (SimpleGradient | MultiStopGradient);
3588
+
3589
+ /**
3590
+ * @public
3591
+ */
3592
+ export declare const RadialGradient: {
3593
+ /**
3594
+ * @param value -
3595
+ * @public
3596
+ */
3597
+ isRadialGradient: (value: any) => value is RadialGradient;
3598
+
3599
+
3600
+ };
3601
+
3602
+ /**
3603
+ * @public
3604
+ */
3605
+ export declare interface RadialGradientBase {
3606
+ alpha: number;
3607
+ widthFactor: number;
3608
+ heightFactor: number;
3609
+ centerAnchorX: number;
3610
+ centerAnchorY: number;
3611
+ }
3612
+
3613
+ /** @public */
3614
+ export declare interface RadiusProperties {
3615
+ radius: RadiusValue | Partial<{
3616
+ topLeft: RadiusValue;
3617
+ topRight: RadiusValue;
3618
+ bottomLeft: RadiusValue;
3619
+ bottomRight: RadiusValue;
3620
+ }>;
3621
+ }
3622
+
3623
+ declare type RadiusValue = number | Animatable_2<number> | string;
3624
+
3625
+ /**
3626
+ * @public
3627
+ */
3628
+ export declare interface Rect extends Point, Size {
3629
+ }
3630
+
3631
+ /**
3632
+ * @public
3633
+ */
3634
+ export declare namespace Rect {
3635
+ /**
3636
+ *
3637
+ * @param rect -
3638
+ * @param other -
3639
+ * @returns if the input rectangles are equal in size and position
3640
+ * @public
3641
+ */
3642
+ export function equals(rect: Rect | null, other: Rect | null): boolean;
3643
+
3644
+
3645
+
3646
+
3647
+
3648
+
3649
+
3650
+
3651
+
3652
+
3653
+
3654
+
3655
+
3656
+
3657
+
3658
+
3659
+
3660
+
3661
+
3662
+
3663
+
3664
+ /** Takes a rect and transforms it by a matrix, resulting in the bounding rectangle of the
3665
+ * rotated and/or translated original.
3666
+ * @param rect - rectangle to transform
3667
+ * @param matrix - matrix to transform by
3668
+ * @returns The bounding rectangle of the rotated and/or translated rect.
3669
+ */
3670
+ const transform: (rect: Rect, matrix: DOMMatrixReadOnly) => Rect;
3671
+
3672
+ /**
3673
+ * Returns wether a rect contains another rect entirely
3674
+ * @param rectA -
3675
+ * @param rectB -
3676
+ * @returns true if rectA contains rectB
3677
+ */
3678
+ const containsRect: (rectA: Rect, rectB: Rect) => boolean;
3679
+
3680
+
3681
+
3682
+
3683
+
3684
+
3685
+ /**
3686
+ *
3687
+ * @param rectA -
3688
+ * @param rectB -
3689
+ * @returns if the input rectangles are equal in size and position
3690
+ * @public
3691
+ * @deprecated: please use Rect.equals instead
3692
+ */
3693
+ const isEqual: (rectA: Rect | null, rectB: Rect | null) => boolean;
3694
+
3695
+
3696
+
3697
+
3698
+ const delta: (a: Rect, b: Rect) => Point;
3699
+
3700
+
3701
+ }
3702
+
3703
+ /** @public */
3704
+ export declare type RelativeNumber = `${number}%`;
3705
+
3706
+ /**
3707
+ * The `RenderTarget` represents the current environment in which a component
3708
+ * is running. This is most commonly either the editor canvas in Framer or in
3709
+ * the generated preview window.
3710
+ *
3711
+ * @remarks
3712
+ * Code components can use the `RenderTarget.current()` method to check for
3713
+ * the environment within their components and vary rendering accordingly. The
3714
+ * most common case would be to improve performance while rendering in the
3715
+ * Framer canvas where components that take too long to render will be replaced
3716
+ * with a placeholder. The `RenderTarget.hasRestrictions()` method can be used
3717
+ * to check explicitly for this case.
3718
+ *
3719
+ * @public
3720
+ */
3721
+ export declare enum RenderTarget {
3722
+ /**
3723
+ * The component is to be rendered for the Framer canvas.
3724
+ *
3725
+ * @remarks
3726
+ * ```jsx
3727
+ * function App() {
3728
+ * if (RenderTarget.current() === RenderTarget.canvas) {
3729
+ * return <CanvasComponent />
3730
+ * }
3731
+ * return <DefaultComponent />
3732
+ * }
3733
+ * ```
3734
+ */
3735
+ canvas = "CANVAS",
3736
+ /**
3737
+ * The component is to be rendered for export.
3738
+ *
3739
+ * @remarks
3740
+ * ```jsx
3741
+ * function App() {
3742
+ * if (RenderTarget.current() === RenderTarget.export) {
3743
+ * return <ExportComponent />
3744
+ * }
3745
+ * return <DefaultComponent />
3746
+ * }
3747
+ * ```
3748
+ */
3749
+ export = "EXPORT",
3750
+ /**
3751
+ * The component is to be rendered as a preview thumbnail, for example in the
3752
+ * component panel.
3753
+ *
3754
+ * @remarks
3755
+ * ```jsx
3756
+ * function App() {
3757
+ * if (RenderTarget.current() === RenderTarget.thumbnail) {
3758
+ * return <Thumbnail />
3759
+ * }
3760
+ * return <DefaultComponent />
3761
+ * }
3762
+ * ```
3763
+ */
3764
+ thumbnail = "THUMBNAIL",
3765
+ /**
3766
+ * The component is being rendered in the preview window.
3767
+ *
3768
+ * @remarks
3769
+ * ```jsx
3770
+ * function App() {
3771
+ * React.useEffect(() => {
3772
+ * if (RenderTarget.current() === RenderTarget.preview) {
3773
+ * // Do something in preview.
3774
+ * }
3775
+ * })
3776
+ * return <DefaultComponent />
3777
+ * }
3778
+ * ```
3779
+ */
3780
+ preview = "PREVIEW"
3781
+ }
3782
+
3783
+ /**
3784
+ * @privateRemarks
3785
+ * This is a read-only equivalent of RenderEnvironment.target that is exposed
3786
+ * to components for context-dependent rendering
3787
+ * @public
3788
+ */
3789
+ export declare namespace RenderTarget {
3790
+ /**
3791
+ * Returns the current `RenderTarget` allowing components to apply
3792
+ * different behaviors depending on the environment.
3793
+ *
3794
+ * @remarks
3795
+ * ```jsx
3796
+ * function App() {
3797
+ * if (RenderTarget.current() === RenderTarget.thumbnail) {
3798
+ * return <PreviewIcon />
3799
+ * }
3800
+ * return <Frame>...</Frame>
3801
+ * }
3802
+ * ```
3803
+ */
3804
+ export function current(): RenderTarget;
3805
+ /**
3806
+ * Returns true if the current `RenderTarget` has performance restrictions.
3807
+ * Use this to avoid doing heavy work in these contexts because they may
3808
+ * bail on the rendering if the component takes too long.
3809
+ *
3810
+ * @remarks
3811
+ * ```jsx
3812
+ * function App() {
3813
+ * if (RenderTarget.hasRestrictions()) {
3814
+ * return <SomePlaceholder />
3815
+ * }
3816
+ * return <RichPreviewContent />
3817
+ * }
3818
+ * ```
3819
+ */
3820
+ export function hasRestrictions(): boolean;
3821
+ }
3822
+
3823
+ /** @public */
3824
+ export declare function resolveLink(href: LinkToWebPage | string | undefined, router: Partial<RouterAPI>, implicitPathVariables?: Record<string, unknown>): string | undefined;
3825
+
3826
+ /** @public */
3827
+ declare interface ResponsiveImageControlDescription<P = any> extends BaseControlDescription<P> {
3828
+ type: ControlType.ResponsiveImage;
3829
+ }
3830
+
3831
+ /** @public */
3832
+ declare interface RichTextControlDescription<P = any> extends BaseControlDescription<P> {
3833
+ type: ControlType.RichText;
3834
+ defaultValue?: string;
3835
+ placeholder?: string;
3836
+
3837
+ }
3838
+
3839
+ /**
3840
+ * @public
3841
+ */
3842
+ declare interface Route extends RouteInfo {
3843
+ page: RouteComponent;
3844
+ }
3845
+
3846
+ /**
3847
+ * @public
3848
+ */
3849
+ declare type RouteComponent<P = any> = React.ReactElement<P> | React.ComponentType<P> | ComponentWithPreload<React.ComponentType<P>>;
3850
+
3851
+ declare type RouteId = string;
3852
+
3853
+ /**
3854
+ * @public
3855
+ */
3856
+ declare interface RouteInfo {
3857
+ path?: RoutePath;
3858
+ elements?: Elements;
3859
+ collectionId?: string;
3860
+ includedLocales?: LocaleId[];
3861
+ }
3862
+
3863
+ declare type RoutePath = string;
3864
+
3865
+ /**
3866
+ * @public
3867
+ */
3868
+ declare type Routes = Record<RouteId, Route>;
3869
+
3870
+ /**
3871
+ * @public
3872
+ */
3873
+ export declare const Scroll: React_2.ForwardRefExoticComponent<ScrollProps & React_2.RefAttributes<HTMLDivElement>>;
3874
+
3875
+ /**
3876
+ * The properties for the {@link Scroll} component, which are also available within other components, like {@link Page}.
3877
+ * @public
3878
+ */
3879
+ export declare interface ScrollConfig {
3880
+ /**
3881
+ * Controls the axis of drag-scrolling.
3882
+ * Defaults to `"vertical"` for vertical scrolling.
3883
+ *
3884
+ * @remarks
3885
+ * Set `"horizontal"` or `"vertical"` to only drag in a specific direction.
3886
+ * Set `"both"` to drag both directions.
3887
+ *
3888
+ * ```jsx
3889
+ * // Horizontal
3890
+ * <Scroll direction="horizontal" />
3891
+ *
3892
+ * // Vertical
3893
+ * <Scroll direction="vertical" />
3894
+ *
3895
+ * // Locked
3896
+ * <Scroll direction="locked" />
3897
+ *
3898
+ * // Both directions
3899
+ * <Scroll direction="both" />
3900
+ * ```
3901
+ *
3902
+ * @public
3903
+ */
3904
+ direction?: "horizontal" | "vertical" | "both";
3905
+ /**
3906
+ * If `true`, this will lock dragging to the initial direction.
3907
+ *
3908
+ * @public
3909
+ *
3910
+ * ```jsx
3911
+ * <Scroll direction="both" directionLock={true} />
3912
+ * ```
3913
+ */
3914
+ directionLock?: boolean;
3915
+ /**
3916
+ * Enable or disable dragging to scroll. Defaults to `true`.
3917
+ *
3918
+ * @public
3919
+ *
3920
+ * ```jsx
3921
+ * <Scroll dragEnabled={false} />
3922
+ * ```
3923
+ */
3924
+ dragEnabled?: boolean;
3925
+ /**
3926
+ * Enable or disable wheel scroll. Defaults to `true`.
3927
+ *
3928
+ * @public
3929
+ *
3930
+ * ```jsx
3931
+ * <Scroll wheelEnabled={false} />
3932
+ * ```
3933
+ */
3934
+ wheelEnabled?: boolean;
3935
+ /**
3936
+ * Horizontal offset of the scrollable content. Set to `0` by default
3937
+ *
3938
+ * @remarks
3939
+ * ```jsx
3940
+ * <Scroll contentOffsetX={20} />
3941
+ * ```
3942
+ */
3943
+ contentOffsetX?: MotionValue<number> | number;
3944
+ /**
3945
+ * Vertical offset of the scrollable content. Set to `0` by default.
3946
+ *
3947
+ * @remarks
3948
+ * ```jsx
3949
+ * <Scroll contentOffsetY={20} />
3950
+ * ```
3951
+ */
3952
+ contentOffsetY?: MotionValue<number> | number;
3953
+ /**
3954
+ * Width of the scrollable content.
3955
+ *
3956
+ * @remarks
3957
+ * ```jsx
3958
+ * <Scroll contentWidth={500} />
3959
+ * ```
3960
+ */
3961
+ contentWidth?: number;
3962
+ /**
3963
+ * Height of the scrollable content.
3964
+ *
3965
+ * @remarks
3966
+ * ```jsx
3967
+ * <Scroll contentHeight={500} />
3968
+ * ```
3969
+ */
3970
+ contentHeight?: number;
3971
+ /**
3972
+ * Add a custom control for the scroll animation.
3973
+ * @remarks
3974
+ * ```jsx
3975
+ * const controls = useAnimation()
3976
+ * controls.start({ y: -50 })
3977
+ * <Scroll scrollAnimate={controls} />
3978
+ * ```
3979
+ * @public
3980
+ * */
3981
+ scrollAnimate?: FrameProps["animate"];
3982
+ /**
3983
+ * Flag the scroll component to reset it's scroll offset when it becomes
3984
+ * visible in Framer.
3985
+ *
3986
+ * @remarks
3987
+ * ```jsx
3988
+ * <Scroll resetOffset={true} />
3989
+ * ```
3990
+ * @public
3991
+ * */
3992
+ resetOffset?: boolean;
3993
+ /**
3994
+ * Flag the scroll component to emulate device overdrag.
3995
+ *
3996
+ * @remarks
3997
+ * ```jsx
3998
+ * <Scroll overdragEnabled={false} />
3999
+ * ```
4000
+ * @public
4001
+ * */
4002
+ overdragEnabled?: boolean;
4003
+
4004
+
4005
+ }
4006
+
4007
+ declare type ScrollDirection = "up" | "down";
4008
+
4009
+ /**
4010
+ * @public
4011
+ */
4012
+ export declare interface ScrollEvents {
4013
+ /**
4014
+ * Called when scrolling starts.
4015
+ *
4016
+ * @remarks
4017
+ * ```jsx
4018
+ * function onScrollStart(info) {
4019
+ * console.log(info.offset, info.velocity)
4020
+ * }
4021
+ *
4022
+ * <Scroll onScrollStart={onScrollStart} />
4023
+ * ```
4024
+ * @param info - An {@link PanInfo} object containing `x` and `y` values for:
4025
+ *
4026
+ * - `point`: Relative to the device or page.
4027
+ * - `delta`: Distance moved since the last event.
4028
+ * - `offset`: Offset from the original pan event.
4029
+ * - `velocity`: Current velocity of the pointer.
4030
+ * @public
4031
+ */
4032
+ onScrollStart?(info: PanInfo): void;
4033
+ /**
4034
+ * Called periodically during scrolling.
4035
+ *
4036
+ * @remarks
4037
+ * ```jsx
4038
+ * function onScroll(info) {
4039
+ * console.log(info.offset, info.velocity)
4040
+ * }
4041
+ *
4042
+ * <Scroll onScroll={onScroll} />
4043
+ * ```
4044
+ * @param info - An {@link PanInfo} object containing `x` and `y` values for:
4045
+ *
4046
+ * - `point`: Relative to the device or page.
4047
+ * - `delta`: Distance moved since the last event.
4048
+ * - `offset`: Offset from the original pan event.
4049
+ * - `velocity`: Current velocity of the pointer.
4050
+ * @public
4051
+ */
4052
+ onScroll?(info: PanInfo): void;
4053
+ /**
4054
+ * Called when scrolling ends.
4055
+ *
4056
+ * @remarks
4057
+ * ```jsx
4058
+ * function onScrollEnd(info) {
4059
+ * console.log(info.offset, info.velocity)
4060
+ * }
4061
+ *
4062
+ * <Scroll onScrollEnd={onScrollEnd} />
4063
+ * ```
4064
+ * @param info - An {@link PanInfo} object containing `x` and `y` values for:
4065
+ *
4066
+ * - `point`: Relative to the device or page.
4067
+ * - `delta`: Distance moved since the last event.
4068
+ * - `offset`: Offset from the original pan event.
4069
+ * - `velocity`: Current velocity of the pointer.
4070
+ * @public
4071
+ */
4072
+ onScrollEnd?(info: PanInfo): void;
4073
+ }
4074
+
4075
+ /**
4076
+ * @public
4077
+ */
4078
+ export declare type ScrollProps = EmulatedScrollProps | NativeScrollProps;
4079
+
4080
+ declare interface ScrollSectionRefControlDescription<P = any> extends BaseControlDescription<P> {
4081
+ type: ControlType.ScrollSectionRef;
4082
+ }
4083
+
4084
+ /**
4085
+ * @deprecated Use {@link EnumControlDescription} instead, and enable displaySegmentedControl.
4086
+ * @public
4087
+ */
4088
+ export declare interface SegmentedEnumControlDescription<P = any> extends BaseControlDescription<P> {
4089
+ type: ControlType.SegmentedEnum;
4090
+ defaultValue?: string;
4091
+ options: string[];
4092
+ optionTitles?: string[];
4093
+ }
4094
+
4095
+ /** @public */
4096
+ export declare interface Shadow {
4097
+ color: string;
4098
+ x: number;
4099
+ y: number;
4100
+ blur: number;
4101
+ }
4102
+
4103
+ /** @public */
4104
+ export declare const Shadow: {
4105
+ is: (shadow: any) => shadow is Shadow;
4106
+ };
4107
+
4108
+ /**
4109
+ * @public
4110
+ */
4111
+ declare interface SimpleGradient {
4112
+ start: string;
4113
+ end: string;
4114
+ }
4115
+
4116
+ /**
4117
+ * @public
4118
+ */
4119
+ export declare interface Size {
4120
+ width: number;
4121
+ height: number;
4122
+ }
4123
+
4124
+ export declare const Size: {
4125
+ (width: number, height: number): Size;
4126
+
4127
+
4128
+
4129
+ /**
4130
+ * @public
4131
+ */
4132
+ zero: Size;
4133
+ /**
4134
+ * Checks if the size has a zero width and zero height
4135
+ * @param size - size to check
4136
+ * @public
4137
+ */
4138
+ isZero(size: Size): boolean;
4139
+
4140
+ };
4141
+
4142
+ declare type SpringOptions = TensionFrictionSpringOptions | DampingDurationSpringOptions;
4143
+
4144
+ /**
4145
+ * @public
4146
+ * @deprecated The `Stack` component is being deprecated and will no longer be maintained in future releases. We recommend using flexbox instead for layout needs: {@link https://developer.mozilla.org/en-US/docs/Learn/CSS/CSS_layout/Flexbox}
4147
+ */
4148
+ export declare const Stack: React_2.ForwardRefExoticComponent<Partial<StackProperties> & React_2.RefAttributes<HTMLElement | HTMLDivElement>>;
4149
+
4150
+ /**
4151
+ * @public
4152
+ */
4153
+ export declare type StackAlignment = "start" | "center" | "end";
4154
+
4155
+ /**
4156
+ * @public
4157
+ */
4158
+ export declare type StackDirection = "horizontal" | "vertical";
4159
+
4160
+ /**
4161
+ * @public
4162
+ */
4163
+ export declare type StackDistribution = "start" | "center" | "end" | "space-between" | "space-around" | "space-evenly";
4164
+
4165
+ /**
4166
+ * The Stack component will automatically distribute its contents based on its
4167
+ * properties. The Stack component takes the same props as the {@link Frame} component
4168
+ * as well as a few additional interface defined below.
4169
+ *
4170
+ * @remarks
4171
+ * ```jsx
4172
+ * function MyComponent() {
4173
+ * return (
4174
+ * <Stack>
4175
+ * <Frame />
4176
+ * <Frame />
4177
+ * <Frame />
4178
+ * </Stack>
4179
+ * )
4180
+ * }
4181
+ * ```
4182
+ * @public
4183
+ * @deprecated
4184
+ */
4185
+ export declare interface StackProperties extends StackSpecificProps, FrameProps, WillChangeTransformProp {
4186
+ as?: keyof HTMLElementTagNameMap;
4187
+ children?: React_2.ReactNode;
4188
+
4189
+ className?: string;
4190
+ useFlexboxGap?: boolean;
4191
+ }
4192
+
4193
+ /**
4194
+ * @public
4195
+ */
4196
+ export declare interface StackSpecificProps {
4197
+ /**
4198
+ * Defines the flow direction of the stack contents, either `"vertical"` or `"horizontal"`. Set
4199
+ * to `"vertical"` by default.
4200
+ *
4201
+ * @remarks
4202
+ * ```jsx
4203
+ * // Vertical
4204
+ * <Stack direction="vertical" />
4205
+ *
4206
+ * // Horizontal
4207
+ * <Stack direction="horizontal" />
4208
+ * ```
4209
+ */
4210
+ direction: StackDirection;
4211
+ /**
4212
+ * Defines the distribution of the stack contents. Set to `"space-around"` by default, which makes the contents spread evenly across the container.
4213
+ * @remarks
4214
+ *
4215
+ * - `"start"` — from the leading edge of the container.
4216
+ * - `"center"` — centered within the container.
4217
+ * - `"end"` — from the trailing edge of the container.
4218
+ * - `"space-between"` — spread evenly in the container.
4219
+ * - `"space-around"` — spread evenly with excess applied at the start / end.
4220
+ * - `"space-evenly"` — spread with equal padding between contents.
4221
+ *
4222
+ * ```jsx
4223
+ * // Default
4224
+ * <Stack distribution="space-around" />
4225
+ *
4226
+ * // Start
4227
+ * <Stack distribution="start" />
4228
+ *
4229
+ * // Center
4230
+ * <Stack distribution="center" />
4231
+ *
4232
+ * // End
4233
+ * <Stack distribution="end" />
4234
+ *
4235
+ * // Space Between
4236
+ * <Stack distribution="space-between" />
4237
+ *
4238
+ * // Space Around
4239
+ * <Stack distribution="space-around" />
4240
+ *
4241
+ * // Space Evenly
4242
+ * <Stack distribution="space-evenly" />
4243
+ * ```
4244
+ */
4245
+ distribution: StackDistribution;
4246
+ /**
4247
+ * Defines the distribution of the stack contents on the alternative axis to the direction. Can
4248
+ * be one of `"start"`, `"end",` or `"center"`. Set to `"center"` by default.
4249
+ *
4250
+ * @remarks
4251
+ * ```jsx
4252
+ * <Stack alignment="end" />
4253
+ * ```
4254
+ */
4255
+ alignment: StackAlignment;
4256
+ /**
4257
+ * The gap between items in the stack. Set to `10` by default.
4258
+ * @remarks
4259
+ * ```jsx
4260
+ * <Stack gap={120} />
4261
+ * ```
4262
+ */
4263
+ gap: number;
4264
+ /**
4265
+ * Padding to be applied to all sides of container. Set to `0` by default.
4266
+ * @remarks
4267
+ * To specify different padding for each side you can provide
4268
+ * individual `paddingTop`, `paddingLeft`, `paddingRight` and `paddingBottom` values.
4269
+ *
4270
+ * ```jsx
4271
+ * <Stack padding={20} />
4272
+ * ```
4273
+ */
4274
+ padding: number;
4275
+ /**
4276
+ * Flag to tell the Stack to ignore the `padding` prop and apply values per-side.
4277
+ *
4278
+ * @remarks
4279
+ *
4280
+ * ```jsx
4281
+ * <Stack paddingPerSide paddingLeft={20} paddingBottom={20} />
4282
+ * ```
4283
+ */
4284
+ paddingPerSide: boolean;
4285
+ /**
4286
+ * Value for the top padding of the container. Set to `0` by default.
4287
+ *
4288
+ * @remarks
4289
+ *
4290
+ * ```jsx
4291
+ * <Stack paddingTop={20} />
4292
+ * ```
4293
+ */
4294
+ paddingTop: number;
4295
+ /**
4296
+ * Value for the right padding of the container. Set to `0` by default.
4297
+ * @remarks
4298
+ *
4299
+ * ```jsx
4300
+ * <Stack paddingRight={20} />
4301
+ * ```
4302
+ */
4303
+ paddingRight: number;
4304
+ /**
4305
+ * Value for the left padding of the container. Set to `0` by default.
4306
+ * @remarks
4307
+ *
4308
+ * ```jsx
4309
+ * <Stack paddingLeft={20} />
4310
+ * ```
4311
+ */
4312
+ paddingLeft: number;
4313
+ /**
4314
+ * Value for the bottom padding of the container. Set to `0` by default.
4315
+ * @remarks
4316
+ *
4317
+ * ```jsx
4318
+ * <Stack paddingBottom={20} />
4319
+ * ```
4320
+ */
4321
+ paddingBottom: number;
4322
+ /**
4323
+ * Value for wrapping items when they don't fit on the row / column.
4324
+ * @remarks
4325
+ *
4326
+ * ```jsx
4327
+ * <Stack wrap />
4328
+ * ```
4329
+ */
4330
+ wrap: boolean;
4331
+
4332
+
4333
+ }
4334
+
4335
+ /** @public */
4336
+ export declare interface StringControlDescription<P = any> extends BaseControlDescription<P> {
4337
+ type: ControlType.String;
4338
+ defaultValue?: string;
4339
+ placeholder?: string;
4340
+ obscured?: boolean;
4341
+ displayTextArea?: boolean;
4342
+
4343
+ }
4344
+
4345
+ declare interface StyleAppearEffectOptions {
4346
+ styleAppearEffectEnabled: boolean | undefined;
4347
+ threshold: number | undefined;
4348
+ animateOnce: boolean;
4349
+ /**
4350
+ * Because we are using framer-motion variants with an `initial` value to
4351
+ * allow us to avoid problems with static generation, we need to know what
4352
+ * the target opacity or rotate should be, since it may not always be 1, and can't be
4353
+ * read from the DOM. This is because the DOM will have already been written
4354
+ * with the above `opacity` value at mount.
4355
+ */
4356
+ targetOpacity: number | undefined;
4357
+ opacity: number | undefined;
4358
+ x: number | undefined;
4359
+ y: number | undefined;
4360
+ scale: number | undefined;
4361
+ transition: Transition | undefined;
4362
+ rotate: number | undefined;
4363
+ rotateX: number | undefined;
4364
+ rotateY: number | undefined;
4365
+ perspective: number | undefined;
4366
+ enter: Readonly<StyleEffect>;
4367
+ exit: Readonly<StyleEffect>;
4368
+ animate: Partial<Readonly<StyleEffect>>;
4369
+ targets?: EffectStyleScrollTarget[];
4370
+ scrollDirection?: EffectStyleScrollTarget;
4371
+ }
4372
+
4373
+ declare interface StyleEffect extends Record<keyof FXValues, number> {
4374
+ transition?: Transition;
4375
+ }
4376
+
4377
+ declare interface StyleTransformEffectOptions {
4378
+ styleTransformEffectEnabled: boolean | undefined;
4379
+ transformViewportThreshold: number | undefined;
4380
+ spring: SpringOptions_2;
4381
+ transformTrigger: "onScroll" | "onInView" | "onScrollTarget" | undefined;
4382
+ transformTargets: EffectStyleScrollTarget_2[] | undefined;
4383
+ }
4384
+
4385
+ declare interface TensionFrictionSpringOptions {
4386
+ tension: number;
4387
+ friction: number;
4388
+ tolerance: number;
4389
+ velocity: number;
4390
+ }
4391
+
4392
+ /** @public */
4393
+ export declare interface TextColorProperties {
4394
+ color: Color | string;
4395
+ }
4396
+
4397
+ declare type ToAnimatableOrValue<PossiblyAnimatable> = PossiblyAnimatable extends Animatable_2<infer Value> ? Value | Animatable_2<Value> : PossiblyAnimatable | Animatable_2<PossiblyAnimatable>;
4398
+
4399
+ /**
4400
+ * @public
4401
+ */
4402
+ declare type TransactionId = number;
4403
+
4404
+ /** @public */
4405
+ export declare function transformTemplate(center?: boolean | "x" | "y"): (_: any, generated: string) => string;
4406
+
4407
+ /** @public */
4408
+ export declare interface TransitionControlDescription<P = any> extends BaseControlDescription<P> {
4409
+ type: ControlType.Transition;
4410
+ defaultValue?: null | Transition;
4411
+ }
4412
+
4413
+ declare interface UnresolvedSlug {
4414
+ collectionId: string;
4415
+ collectionItemId: string;
4416
+ }
4417
+
4418
+ /**
4419
+ * @public
4420
+ */
4421
+ declare type UpdateFunction<Value> = (change: Change<Value> | undefined, transaction?: TransactionId) => void;
4422
+
4423
+ /**
4424
+ * @public
4425
+ */
4426
+ declare interface UpdateObserver<Value> {
4427
+ onUpdate(handler: Observer<Value>): Cancel;
4428
+ }
4429
+
4430
+ /**
4431
+ * Create callbacks that can be cancelled if the component is unmounted, the
4432
+ * active variant changes, or the component moves out of the target screen in a
4433
+ * Framer prototype.
4434
+ *
4435
+ * @public
4436
+ */
4437
+ export declare function useActiveVariantCallback(baseVariant: string | undefined): {
4438
+ /**
4439
+ * Create a callback that can be cancelled if the base variant changes.
4440
+ */
4441
+ activeVariantCallback: (callback: (...args: any[]) => Promise<boolean | void>) => (...args: any[]) => Promise<unknown>;
4442
+ /**
4443
+ * Execute a callback after a defined period of time. The callback will not
4444
+ * be called if pending events are cancelled because the timeout will be
4445
+ * cancelled.
4446
+ */
4447
+ delay: (callback: () => void, msDelay: number) => Promise<void>;
4448
+ };
4449
+
4450
+ /**
4451
+ * Returns combines React props from a hash map based on the active variants.
4452
+ *
4453
+ * @public
4454
+ */
4455
+ export declare function useAddVariantProps(baseVariant: string | undefined, gestureVariant: string | undefined, variantProps: VariantProps): (id: string) => Record<string, unknown>;
4456
+
4457
+ export { useAnimatedState }
4458
+
4459
+ export declare function useConstant<T>(init: () => T): T;
4460
+
4461
+ export declare function useDynamicRefs<T>(): (key: string) => React_2.RefObject<T>;
4462
+
4463
+ /**
4464
+ * Register a callback to be executed when a gamepad button is pressed and the
4465
+ * registering component is in the current Framer navigation target. Optionally
4466
+ * provide a specific gamepad mapping, or flag the hook to operate on keyup.
4467
+ *
4468
+ * @public
4469
+ */
4470
+ export declare function useGamepad(input: string, callback: () => void, { mapping, on }?: {
4471
+ mapping?: string;
4472
+ on?: "keyup" | "keydown";
4473
+ }): void;
4474
+
4475
+ export { useInvertedScale }
4476
+
4477
+ /**
4478
+ * Used to know if a code component is a child of the current screen.
4479
+ * This can be useful for resetting timers or interactions that need to trigger on every navigation.
4480
+ * @public
4481
+ */
4482
+ export declare function useIsInCurrentNavigationTarget(): boolean;
4483
+
4484
+ /**
4485
+ * Returns a constant value based on whether the caller is mounted in a Framer
4486
+ * Canvas environment.
4487
+ *
4488
+ * @public
4489
+ */
4490
+ export declare function useIsOnFramerCanvas(): boolean;
4491
+
4492
+ /**
4493
+ * @public
4494
+ * @returns The current locale code, which is a combination of the language and optional region,
4495
+ * e.g. "en-US".
4496
+ */
4497
+ export declare function useLocaleCode(): string;
4498
+
4499
+ /**
4500
+ * @public
4501
+ * @returns The active locale, all of the available locales, and a way to change the active locale.
4502
+ */
4503
+ export declare function useLocaleInfo(): LocaleInfo;
4504
+
4505
+ /**
4506
+ * @returns NavigationInterface {@link NavigationInterface}
4507
+ * @public
4508
+ */
4509
+ export declare function useNavigation(): NavigationInterface;
4510
+
4511
+ /**
4512
+ * Makes the component re-render when `Data` changes
4513
+ * @returns `true` if observing succeeds (context is provided), `false` when it fails
4514
+ * @public
4515
+ */
4516
+ export declare function useObserveData(): boolean;
4517
+
4518
+ /**
4519
+ * Executes a callback when the base variant changes. Events will not be
4520
+ * executed on the Framer canvas.
4521
+ *
4522
+ * @public
4523
+ */
4524
+ export declare function useOnVariantChange(variant: string, callbackMap: CallbackMap): void;
4525
+
4526
+ /**
4527
+ * When managing hiding/showing overlays, we want to prevent accidental body
4528
+ * scrolling beneath the overlay. This hook decorates a normal React useState
4529
+ * hook with solving this problem.
4530
+ *
4531
+ * @public
4532
+ */
4533
+ export declare function useOverlayState({ blockDocumentScrolling }?: {
4534
+ blockDocumentScrolling?: boolean;
4535
+ }): readonly [boolean, (show: boolean) => void];
4536
+
4537
+ /** @public */
4538
+ export declare const useProvidedWindow: () => (Window & typeof globalThis) | null | undefined;
4539
+
4540
+ /**
4541
+ * Handle stateful logic in Framer Canvas Components.
4542
+ *
4543
+ * @public
4544
+ */
4545
+ export declare function useVariantState({ variant, defaultVariant: externalDefaultVariant, transitions: externalTransitions, enabledGestures: externalEnabledGestures, cycleOrder: externalCycleOrder, variantProps, variantClassNames, }: {
4546
+ defaultVariant: string;
4547
+ cycleOrder: string[];
4548
+ variant?: string;
4549
+ transitions?: Record<string, Partial<Transition>>;
4550
+ enabledGestures?: EnabledVariantGestures;
4551
+ variantProps?: VariantProps;
4552
+ variantClassNames?: Record<string, string>;
4553
+ }): VariantState;
4554
+
4555
+ /**
4556
+ * @public
4557
+ */
4558
+ declare type UtilsByCollectionId = Record<string, () => Promise<CollectionUtils | undefined>>;
4559
+
4560
+ declare interface VariantAppearEffectOptions {
4561
+ visibleVariantId: string | undefined;
4562
+ obscuredVariantId: string | undefined;
4563
+ threshold: number | undefined;
4564
+ animateOnce: boolean;
4565
+ variantAppearEffectEnabled: true | undefined;
4566
+ targets?: EffectVariantScrollTarget[];
4567
+ exitTarget?: boolean;
4568
+ scrollDirection?: EffectVariantScrollTarget;
4569
+ }
4570
+
4571
+ declare type VariantNames = string[];
4572
+
4573
+ /**
4574
+ * Variant / Node Id / React Prop / Val
4575
+ *
4576
+ * @public
4577
+ */
4578
+ declare type VariantProps = Record<string, Record<string, Record<string, unknown>>>;
4579
+
4580
+ declare interface VariantState {
4581
+ variants: VariantNames;
4582
+ baseVariant: string | undefined;
4583
+ gestureVariant: string | undefined;
4584
+ classNames: string;
4585
+ transition: Partial<Transition> | undefined;
4586
+ setVariant: (variant: string | typeof CycleVariantState) => void;
4587
+ setGestureState: (gestureState: GestureState) => void;
4588
+ addVariantProps?: (id: string) => Record<string, unknown>;
4589
+ }
4590
+
4591
+ /**
4592
+ * @public
4593
+ */
4594
+ export declare const version: string;
4595
+
4596
+ /**
4597
+ * @privateRemarks do no use separately from FrameProps
4598
+ * @public
4599
+ * */
4600
+ export declare interface VisualProperties {
4601
+ /**
4602
+ * Defines whether or not the `Frame` is visible. Unlike `opacity`, this property cannot be animated. Set to `true` by default. Maps to CSS.
4603
+ * @remarks
4604
+ * ```jsx
4605
+ * <Frame visible={false} />
4606
+ * ```
4607
+ * @public
4608
+ */
4609
+ visible: boolean;
4610
+ /**
4611
+ * Set the opacity value, which allows you to make elements semi-transparent or entirely hidden. Useful for show-and-hide animations.
4612
+ * Set to `1` by default.
4613
+ * @remarks
4614
+ * ```jsx
4615
+ * <Frame opacity={0.5} />
4616
+ * ```
4617
+ * @public
4618
+ */
4619
+ opacity: number | MotionValue<number>;
4620
+ /**
4621
+ * Set the CSS border property, which accepts width, style and color.
4622
+ * Set to `"none"` by default.
4623
+ * @remarks
4624
+ * ```jsx
4625
+ * <Frame border="1px solid #09F" />
4626
+ * ```
4627
+ * @public
4628
+ */
4629
+ border: string | MotionValue<string>;
4630
+ /**
4631
+ * Set the CSS border-radius property, in pixels or percentages.
4632
+ * Set to `0` by default.
4633
+ * @remarks
4634
+ * ```jsx
4635
+ * // Radius with pixels
4636
+ * <Frame radius={10} />
4637
+ *
4638
+ * // Radius with percentages
4639
+ * <Frame radius="50%" />
4640
+ * ```
4641
+ * @public
4642
+ */
4643
+ radius: number | string | MotionValue<number | string>;
4644
+ /**
4645
+ * Set the CSS border-radius property, in pixels or percentages. Alias for `radius`
4646
+ * Set to `0` by default.
4647
+ * @remarks
4648
+ * ```jsx
4649
+ * // Radius with pixels
4650
+ * <Frame borderRadius={10} />
4651
+ *
4652
+ * // Radius with percentages
4653
+ * <Frame borderRadius="50%" />
4654
+ * ```
4655
+ * @public
4656
+ */
4657
+ borderRadius: number | string | MotionValue<number | string>;
4658
+ /**
4659
+ * Set the color for text elements inside of a `Frame`. By default, text within Frames will be rendered in black.
4660
+ * @remarks
4661
+ * ```jsx
4662
+ * <Frame color="#09F" />
4663
+ * ```
4664
+ * @public
4665
+ */
4666
+ color: string | MotionValue<string>;
4667
+ /**
4668
+ * Set the CSS overflow property. Set to `"visible"` by default.
4669
+ * @remarks
4670
+ * ```jsx
4671
+ * <Frame overflow="hidden" />
4672
+ * ```
4673
+ * @public
4674
+ */
4675
+ overflow: "visible" | "hidden" | "auto";
4676
+ /**
4677
+ * Set the CSS box-shadow property.
4678
+ * @remarks
4679
+ * ```jsx
4680
+ * <Frame shadow="10px 5px 5px black" />
4681
+ * ```
4682
+ * @public
4683
+ */
4684
+ shadow: string | MotionValue<string>;
4685
+ /**
4686
+ * Position the children of the frame in 3D space. Set to `false` by default.
4687
+ * @remarks
4688
+ * ```jsx
4689
+ * <Frame preserve3d={true} />
4690
+ * ```
4691
+ * @public
4692
+ */
4693
+ preserve3d: boolean;
4694
+ /**
4695
+ * Sets whether the back face is visible when turned towards the user. Set to `true` by default.
4696
+ * @remarks
4697
+ * ```jsx
4698
+ * <Frame backfaceVisible={true} />
4699
+ * ```
4700
+ * @public
4701
+ */
4702
+ backfaceVisible: boolean;
4703
+ }
4704
+
4705
+ declare interface WillChangeTransformProp {
4706
+ willChangeTransform?: boolean;
4707
+ }
4708
+
4709
+ /** @public */
4710
+ export declare const WindowContext: React_2.Context<(Window & typeof globalThis) | null | undefined>;
4711
+
4712
+ /**
4713
+ * Render a React component with css that will be injected into the document's
4714
+ * head when the component is first rendered. The escapedCSS argument can either
4715
+ * be a string where each line is a css rule, or an array of css rule strings.
4716
+ *
4717
+ * @public
4718
+ */
4719
+ export declare const withCSS: <T extends object>(Component: React_2.ComponentType<T>, escapedCSS: string | string[], componentSerializationId?: string) => React_2.ForwardRefExoticComponent<React_2.PropsWithoutRef<T> & React_2.RefAttributes<unknown>>;
4720
+
4721
+ declare interface WithEventsProperties extends WithPanHandlers, WithTapHandlers, WithMouseHandlers, WithMouseWheelHandler {
4722
+ }
4723
+
4724
+ /**
4725
+ * @public
4726
+ */
4727
+ export declare interface WithFractionOfFreeSpace {
4728
+
4729
+
4730
+ }
4731
+
4732
+ export declare const withFX: <T extends FXProps>(Component: React_2.ComponentType<T>) => React_2.ForwardRefExoticComponent<React_2.PropsWithoutRef<T> & React_2.RefAttributes<HTMLElement>>;
4733
+
4734
+ /**
4735
+ * Smart Component instances are code-generated with immutable react property
4736
+ * keys. This ensures that renaming or reordering variables in Framer, doesn't
4737
+ * cause dependents of the Smart Component to provide incorrect values to the
4738
+ * new component.
4739
+ *
4740
+ * However, when a user adds a code override to a smart component, they expect
4741
+ * to be able to reference the props by their human readable name. To allow
4742
+ * that, this HOC can be wrapped around all of the override HOCs, and when
4743
+ * provided an object with ids that map to the human readable property, will
4744
+ * remap the props so that those human readable keys are used instead of the
4745
+ * immutable ids, and this remapped version of props can be consumed by all user
4746
+ * overrides.
4747
+ */
4748
+ export declare function withMappedReactProps<T extends object>(Component: React_2.ComponentType<T>, info: Record<string, unknown>): (rawProps: T) => JSX.Element;
4749
+
4750
+ declare interface WithMouseHandlers {
4751
+ onMouseDown: EventHandler;
4752
+ onClick: EventHandler;
4753
+ onMouseUp: EventHandler;
4754
+ onMouseEnter: EventHandler;
4755
+ onMouseLeave: EventHandler;
4756
+ }
4757
+
4758
+ declare interface WithMouseWheelHandler {
4759
+ onMouseWheelStart: EventHandler;
4760
+ onMouseWheel: EventHandler;
4761
+ onMouseWheelEnd: EventHandler;
4762
+ }
4763
+
4764
+ /** @public */
4765
+ export declare interface WithOpacity {
4766
+ opacity: number | Animatable_2<number>;
4767
+ }
4768
+
4769
+ declare interface WithPanHandlers {
4770
+ onPanStart: EventHandler;
4771
+ onPan: EventHandler;
4772
+ onPanEnd: EventHandler;
4773
+ }
4774
+
4775
+ /**
4776
+ * @public
4777
+ * @deprecated
4778
+ */
4779
+ export declare const withParallaxTransform: <T extends Partial<Prefixed<ParallaxTransformOptions & StyleAppearEffectOptions & StyleTransformEffectOptions>> & Partial<MotionProps> & {
4780
+ __withFX?: boolean | undefined;
4781
+ __perspectiveFX?: boolean | undefined;
4782
+ __targetOpacity?: number | undefined;
4783
+ __smartComponentFX?: boolean | undefined;
4784
+ } & Record<string, unknown>>(Component: ComponentType<T>) => ForwardRefExoticComponent<PropsWithoutRef<T> & RefAttributes<HTMLElement>>;
4785
+
4786
+ /**
4787
+ * @public
4788
+ * @deprecated
4789
+ */
4790
+ export declare const withStyleAppearEffect: <T extends Partial<Prefixed<ParallaxTransformOptions & StyleAppearEffectOptions & StyleTransformEffectOptions>> & Partial<MotionProps> & {
4791
+ __withFX?: boolean | undefined;
4792
+ __perspectiveFX?: boolean | undefined;
4793
+ __targetOpacity?: number | undefined;
4794
+ __smartComponentFX?: boolean | undefined;
4795
+ } & Record<string, unknown>>(Component: ComponentType<T>) => ForwardRefExoticComponent<PropsWithoutRef<T> & RefAttributes<HTMLElement>>;
4796
+
4797
+ declare interface WithTapHandlers {
4798
+ onTapStart: EventHandler;
4799
+ onTap: EventHandler;
4800
+ onTapEnd: EventHandler;
4801
+ }
4802
+
4803
+ /**
4804
+ * @public
4805
+ */
4806
+ export declare const withVariantAppearEffect: <T extends {
4807
+ variant?: string | undefined;
4808
+ } & object>(Component: React_2.ComponentType<T>) => React_2.ForwardRefExoticComponent<React_2.PropsWithoutRef<Prefixed<VariantAppearEffectOptions> & T> & React_2.RefAttributes<HTMLElement>>;
4809
+
4810
+ /**
4811
+ * Allow motion elements inside of a Smart Component, which uses `animate`
4812
+ * inheritance to update visual variants, to perform presence animations without
4813
+ * breaking inheritance of the active variant for descendants.
4814
+ *
4815
+ * @deprecated - This component was used before we generally supported effects
4816
+ * in smart components, when we supported appear effects for relative overlays.
4817
+ * It is now no longer code-generated, and replaced with withFX. This does not
4818
+ * mean we can remove this code. Code generated by Framer may still import it.
4819
+ */
4820
+ export declare const withVariantFX: <T extends MotionProps>(Component: React_2.ComponentType<T>) => React_2.ForwardRefExoticComponent<React_2.PropsWithoutRef<Props_3<T>> & React_2.RefAttributes<HTMLElement>>;
4821
+
4822
+
4823
+ export * from "framer-motion";
4824
+
4825
+ export { }
4826
+
4827
+ export declare const combinedCSSRules: string[]
4828
+
4829
+