unframer 2.5.3 → 2.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.
package/dist/framer.d.ts CHANGED
@@ -1,21 +1,23 @@
1
1
  /// <reference types="react" />
2
2
 
3
3
  import type { AnimationPlaybackControls } from 'framer-motion';
4
- import { Component } from 'react';
5
4
  import { ComponentType } from 'react';
6
5
  import { ForwardRefExoticComponent } from 'react';
7
6
  import type { HTMLMotionProps } from 'framer-motion';
7
+ import { JSX as JSX_2 } from 'react/jsx-runtime';
8
8
  import { DeprecatedLayoutGroupContext as LayoutGroupContext } from 'framer-motion';
9
9
  import { MotionProps } from 'framer-motion';
10
10
  import type { MotionStyle } from 'framer-motion';
11
11
  import type { MotionTransform } from 'framer-motion';
12
12
  import type { MotionValue } from 'framer-motion';
13
13
  import { PanInfo } from 'framer-motion';
14
+ import type { PropsWithChildren } from 'react';
14
15
  import { PropsWithoutRef } from 'react';
15
16
  import { default as React_2 } from 'react';
16
17
  import type { ReactNode } from 'react';
17
18
  import { RefAttributes } from 'react';
18
19
  import type { SpringOptions as SpringOptions_2 } from 'framer-motion';
20
+ import type { TapHandlers } from 'framer-motion';
19
21
  import type { TargetAndTransition } from 'framer-motion';
20
22
  import type { Transition } from 'framer-motion';
21
23
  import { useDeprecatedAnimatedState as useAnimatedState } from 'framer-motion';
@@ -111,8 +113,8 @@ export declare type AnimatableObject<T> = {
111
113
  * @deprecated Use the {@link MotionProps.animate} prop on {@link Frame} instead.
112
114
  */
113
115
  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
+ <Value, Options>(from: DeprecatedAnimationTarget<Value>, to: Value, animator?: AnimatorClass<Value, Options>, options?: Partial<Options & DeprecatedAnimationOptions<Value>>): FramerAnimation<Value, Options>;
117
+ <V>(from: MotionValue<V> | V, to: V | V[], transition?: Transition & AnimationPlaybackLifecycles<V>): AnimationPlaybackControls;
116
118
  /**
117
119
  * Animate value with a spring curve
118
120
  * @remarks
@@ -295,7 +297,7 @@ export declare interface ArrayControlDescription<P = any> extends BaseControlDes
295
297
  * Array sub type
296
298
  * @public
297
299
  */
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">;
300
+ 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"> | Omit<CustomCursorControlDescription<P>, "hidden" | "description"> | Omit<BorderControlDescription<P>, "hidden" | "description"> | Omit<CursorControlDescription<P>, "hidden" | "description">;
299
301
 
300
302
  /**
301
303
  * Enable or disable the automatic generation of layout ids for canvas layers.
@@ -316,7 +318,7 @@ export declare type ArrayItemControlDescription<P = any> = Omit<NumberControlDes
316
318
  */
317
319
  export declare function AutomaticLayoutIds({ enabled, ...props }: React_2.PropsWithChildren<{
318
320
  enabled?: boolean;
319
- }>): JSX.Element;
321
+ }>): JSX_2.Element;
320
322
 
321
323
  /** @public */
322
324
  export declare type Background = Color | Gradient | BackgroundImage | MotionValue<string> | string;
@@ -344,9 +346,9 @@ export declare interface BackgroundImage {
344
346
  }
345
347
 
346
348
  /** @public */
347
- export declare namespace BackgroundImage {
348
- const isImageObject: (image: any) => image is object & BackgroundImage;
349
- }
349
+ export declare const BackgroundImage: {
350
+ isImageObject: (image: any) => image is object & BackgroundImage;
351
+ };
350
352
 
351
353
  /** @public */
352
354
  declare interface BackgroundImageProps extends ImageAltProps {
@@ -411,7 +413,6 @@ export declare interface BaseFrameProps {
411
413
  name: string;
412
414
 
413
415
 
414
-
415
416
  }
416
417
 
417
418
  /**
@@ -454,6 +455,36 @@ export declare interface BooleanControlDescription<P = any> extends BaseControlD
454
455
  enabledTitle?: string;
455
456
  }
456
457
 
458
+ /**
459
+ * @public
460
+ * Represents a border style.
461
+ * Either borderWidth or the equivalent per-side
462
+ * values (e.g borderTopWidth, borderLeftWidth, borderRightWidth, borderBottomWidth)
463
+ * will be provided.
464
+ */
465
+ declare interface Border {
466
+ borderColor?: string;
467
+ borderStyle?: BorderStyle;
468
+ borderWidth?: number;
469
+ borderTopWidth?: number;
470
+ borderLeftWidth?: number;
471
+ borderRightWidth?: number;
472
+ borderBottomWidth?: number;
473
+ }
474
+
475
+ /**
476
+ * @public
477
+ */
478
+ export declare interface BorderControlDescription<P = any> extends BaseControlDescription<P> {
479
+ type: ControlType.Border;
480
+ defaultValue?: Border;
481
+ }
482
+
483
+ declare interface BorderRadiusControlDescription<P = any> extends BaseControlDescription<P> {
484
+ type: ControlType.BorderRadius;
485
+ defaultValue?: string;
486
+ }
487
+
457
488
  /** @public */
458
489
  export declare type BorderStyle = "solid" | "dashed" | "dotted" | "double";
459
490
 
@@ -476,6 +507,12 @@ export declare const BoxShadow: {
476
507
  toCSS: (shadow: BoxShadow) => string;
477
508
  };
478
509
 
510
+ /** @public */
511
+ export declare interface BoxShadowControlDescription<P = any> extends BaseControlDescription<P> {
512
+ type: ControlType.BoxShadow;
513
+ defaultValue?: string | readonly BoxShadow[];
514
+ }
515
+
479
516
  /** @public */
480
517
  export declare interface BoxShadowProperties {
481
518
  shadows: Readonly<BoxShadow[]>;
@@ -548,7 +585,7 @@ export declare interface Color {
548
585
  * @public
549
586
  */
550
587
  export declare const Color: {
551
- (color: number | IncomingColor | Color, r?: number, g?: number, b?: number): Color;
588
+ (color: IncomingColor | Color | number, r?: number, g?: number, b?: number): Color;
552
589
  /**
553
590
  * Formats a Color object into a readable string for debugging.
554
591
  *
@@ -879,7 +916,7 @@ export declare const Color: {
879
916
  * @param colorB - The final color
880
917
  * @param model - The model to use for the mix. One of {@link ColorMixModelType}
881
918
  */
882
- interpolate(colorA: Color, colorB: Color, model?: ColorMixModelType): (progress: number) => Color;
919
+ interpolate(colorA: Color, colorB: Color, model?: ColorMixModelType): ((progress: number) => Color);
883
920
  /**
884
921
  * Create a function that will mix two colors together and output the result as an rgb string.
885
922
  *
@@ -1241,7 +1278,7 @@ declare const ConstraintsContext: React_2.Context<{
1241
1278
  }>;
1242
1279
 
1243
1280
  /** @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>;
1281
+ 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> | BoxShadowControlDescription<P> | LinkControlDescription<P> | DateControlDescription<P> | ObjectControlDescription<P> | FontControlDescription<P> | PageScopeControlDescription<P> | ScrollSectionRefControlDescription<P> | CustomCursorControlDescription<P> | BorderControlDescription<P> | CursorControlDescription<P> | PaddingControlDescription<P> | BorderRadiusControlDescription<P>;
1245
1282
 
1246
1283
  declare type ControlPoints = [number, number, number, number];
1247
1284
 
@@ -1345,16 +1382,22 @@ export declare enum ControlType {
1345
1382
  String = "string",
1346
1383
 
1347
1384
  /**
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.
1385
+ * Deprecated, please use ControlType.Padding and ControlType.BorderRadius. You should be able
1386
+ * to switch to the new control type without data loss. Be aware that these new controls only
1387
+ * have a single value (e.g. `10px` or `10px 20px 30px 40px`).
1353
1388
  *
1354
- * You can also set the default value for each valueKey as well as the
1355
- * toggleKey by setting their values on `defaultProps`.
1389
+ * A control that can be used to take a single number or four distinct numeric input fields. The
1390
+ * typical use case for this control is for visual properties like border, padding or margin. It
1391
+ * will display an input field to accept a single value, alongside a segmented control allowing
1392
+ * four distinct values to be provided.
1356
1393
  *
1394
+ * You can also set the default value for each valueKey as well as the toggleKey by setting
1395
+ * their values on `defaultProps`.
1357
1396
  *
1397
+ * @deprecated Please use {@link ControlType.Padding} and ${@link ControlType.BorderRadius}. You
1398
+ * should be able to switch to the new control type without data loss. Be aware that these new controls only
1399
+ * have a single value (e.g. `10px` or `10px 20px 30px 40px`).
1400
+ * @remarks
1358
1401
  * ```javascript
1359
1402
  * export function MyComponent({
1360
1403
  * radius = 50,
@@ -1655,6 +1698,22 @@ export declare enum ControlType {
1655
1698
  * ```
1656
1699
  */
1657
1700
  Transition = "transition",
1701
+ /**
1702
+ * A control that allows for exposing shadows. The value will be provided as
1703
+ * a string with valid CSS box-shadow values.
1704
+ *
1705
+ * ```javascript
1706
+ * export function MyComponent(props) {
1707
+ * return <motion.div style={{boxShadow: props.shadow}} />
1708
+ * }
1709
+ *
1710
+ * addPropertyControls(MyComponent, {
1711
+ * shadow: {
1712
+ * type: ControlType.BoxShadow,
1713
+ * }
1714
+ * })
1715
+ */
1716
+ BoxShadow = "boxshadow",
1658
1717
  /**
1659
1718
  * A control that allows for exposing web links.
1660
1719
  *
@@ -1714,6 +1773,72 @@ export declare enum ControlType {
1714
1773
 
1715
1774
 
1716
1775
 
1776
+ /**
1777
+ * @public
1778
+ * A control that represents a border.
1779
+ *
1780
+ * @remarks
1781
+ * ```javascript
1782
+ * function MyComponent(props) {
1783
+ * return <div style={props.border} />
1784
+ * }
1785
+ *
1786
+ * addPropertyControls(MyComponent, {
1787
+ * border: {
1788
+ * type: ControlType.Border,
1789
+ * defaultValue: {
1790
+ * borderWidth: 1,
1791
+ * borderStyle: "solid",
1792
+ * borderColor: "rgba(0, 0, 0, 0.5)",
1793
+ * },
1794
+ * }
1795
+ * })
1796
+ * ```
1797
+ */
1798
+ Border = "border",
1799
+ /**
1800
+ * @public
1801
+ * A control that allows specifying a web cursor that should be shown
1802
+ * when mousing over the element assigned.
1803
+ */
1804
+ Cursor = "cursor",
1805
+ /**
1806
+ * @public
1807
+ * A control that represents CSS padding.
1808
+ *
1809
+ * @remarks
1810
+ * ```javascript
1811
+ * function MyComponent({ padding }) {
1812
+ * return <div style={{ padding }} />
1813
+ * }
1814
+ *
1815
+ * addPropertyControls(MyComponent, {
1816
+ * padding: {
1817
+ * type: ControlType.Padding,
1818
+ * defaultValue: "8px",
1819
+ * }
1820
+ * })
1821
+ */
1822
+ Padding = "padding",
1823
+ /**
1824
+ * @public
1825
+ * A control that represents CSS border radius.
1826
+ *
1827
+ * @remarks
1828
+ * ```javascript
1829
+ * function MyComponent({ borderRadius }) {
1830
+ * return <div style={{ borderRadius }} />
1831
+ * }
1832
+ *
1833
+ * addPropertyControls(MyComponent, {
1834
+ * borderRadius: {
1835
+ * type: ControlType.BorderRadius,
1836
+ * defaultValue: "16px",
1837
+ * title: "Radius",
1838
+ * }
1839
+ * })
1840
+ */
1841
+ BorderRadius = "borderradius"
1717
1842
  }
1718
1843
 
1719
1844
  /**
@@ -1876,6 +2001,14 @@ export declare interface CSSTransformProperties extends MotionTransform {
1876
2001
  perspective: number | string | MotionValue<number | string>;
1877
2002
  }
1878
2003
 
2004
+ /**
2005
+ * @public
2006
+ */
2007
+ declare interface CursorControlDescription<P = any> extends BaseControlDescription<P> {
2008
+ type: ControlType.Cursor;
2009
+ defaultValue?: string;
2010
+ }
2011
+
1879
2012
  declare type Curve = ControlPoints | Bezier;
1880
2013
 
1881
2014
  declare interface CustomConstraintProperties {
@@ -1929,7 +2062,7 @@ declare interface DampingDurationSpringOptions {
1929
2062
  }
1930
2063
 
1931
2064
  export declare const Data: {
1932
- <T extends object = object>(initial?: object | Partial<T>): T;
2065
+ <T extends object = object>(initial?: Partial<T> | object): T;
1933
2066
 
1934
2067
 
1935
2068
 
@@ -2075,7 +2208,6 @@ export declare interface DeprecatedFrameProperties extends ConstraintProperties,
2075
2208
  */
2076
2209
  className?: string;
2077
2210
 
2078
-
2079
2211
  }
2080
2212
 
2081
2213
  declare interface DeprecatedFrameState {
@@ -2221,7 +2353,7 @@ declare interface EffectStyleScrollTarget_2 extends EffectScrollTarget {
2221
2353
  target: Record<keyof FXValues, number>;
2222
2354
  }
2223
2355
 
2224
- declare const effectValuesKeys: readonly ["opacity", "x", "y", "scale", "rotate", "rotateX", "rotateY", "transformPerspective"];
2356
+ declare const effectValuesKeys: readonly ["opacity", "x", "y", "scale", "rotate", "rotateX", "rotateY", "skewX", "skewY", "transformPerspective"];
2225
2357
 
2226
2358
  declare interface EffectVariantScrollTarget extends EffectScrollTarget {
2227
2359
  target: string;
@@ -2343,7 +2475,7 @@ declare interface FontControlDescription<P = any> extends BaseControlDescription
2343
2475
  }
2344
2476
 
2345
2477
  /** @public */
2346
- declare type FontSourceName = "local" | "google" | "fontshare" | "custom";
2478
+ declare type FontSourceName = "local" | "google" | "framer" | "fontshare" | "custom";
2347
2479
 
2348
2480
  /** @public */
2349
2481
  export declare const Frame: React_2.ForwardRefExoticComponent<Partial<FrameProps> & React_2.RefAttributes<HTMLDivElement>>;
@@ -2492,6 +2624,7 @@ export declare interface FrameLayoutProperties extends PositionStickyProperties,
2492
2624
 
2493
2625
  /** @public */
2494
2626
  export declare interface FrameProps extends ImageAltProps, BackgroundProperties, VisualProperties, Omit<MotionDivProps, "color" | "children">, CSSTransformProperties, LayerProps, FrameLayoutProperties, ConstraintConfiguration, BaseFrameProps {
2627
+ componentType?: string;
2495
2628
  as?: keyof HTMLElementTagNameMap;
2496
2629
 
2497
2630
 
@@ -2607,7 +2740,10 @@ export declare class FramerEvent {
2607
2740
 
2608
2741
  }
2609
2742
 
2610
- /** @public */
2743
+ /**
2744
+ * @deprecated Please use {@link ControlType.Padding} and {@link ControlType.BorderRadius}.
2745
+ * @public
2746
+ */
2611
2747
  export declare interface FusedNumberControlDescription<P = any> extends BaseControlDescription<P> {
2612
2748
  type: ControlType.FusedNumber;
2613
2749
  defaultValue?: number;
@@ -2632,6 +2768,8 @@ declare type FXProps = Partial<Prefixed<ParallaxTransformOptions & StyleAppearEf
2632
2768
  */
2633
2769
  declare type FXValues = Record<(typeof effectValuesKeys)[number], MotionValue<number>>;
2634
2770
 
2771
+ declare type GestureHandlers = Pick<TapHandlers & React_2.DOMAttributes<HTMLDivElement>, "onTap" | "onTapStart" | "onTapCancel" | "onMouseEnter" | "onMouseLeave">;
2772
+
2635
2773
  declare type GestureState = Partial<{
2636
2774
  isHovered: boolean;
2637
2775
  isPressed: boolean;
@@ -2722,18 +2860,67 @@ declare interface InterpolationOptions {
2722
2860
  /** @public */
2723
2861
  export declare function isRelativeNumber(value: unknown): value is RelativeNumber;
2724
2862
 
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
-
2863
+ /** @public */
2864
+ export declare type Layer = InstanceType<typeof Layer>;
2735
2865
 
2736
- }
2866
+ /** @public */
2867
+ export declare const Layer: {
2868
+ new <P extends Partial<LayerProps>, S>(props: P): {
2869
+ /** @private (Just using `private` breaks compilation unless using `stripInternal`) */
2870
+ layerElement: HTMLElement | SVGElement | null;
2871
+ setLayerElement: (element: HTMLElement | SVGElement | null) => void;
2872
+
2873
+
2874
+ context: unknown;
2875
+ setState<K extends keyof S>(state: S | ((prevState: Readonly<S>, props: Readonly<P>) => S | Pick<S, K> | null) | Pick<S, K> | null, callback?: (() => void) | undefined): void;
2876
+ forceUpdate(callback?: (() => void) | undefined): void;
2877
+ render(): React_2.ReactNode;
2878
+ readonly props: Readonly<P>;
2879
+ state: Readonly<S>;
2880
+ refs: {
2881
+ [key: string]: React_2.ReactInstance;
2882
+ };
2883
+ componentDidMount?(): void;
2884
+ componentWillUnmount?(): void;
2885
+ componentDidCatch?(error: Error, errorInfo: React_2.ErrorInfo): void;
2886
+ getSnapshotBeforeUpdate?(prevProps: Readonly<P>, prevState: Readonly<S>): any;
2887
+ componentWillMount?(): void;
2888
+ UNSAFE_componentWillMount?(): void;
2889
+ componentWillReceiveProps?(nextProps: Readonly<P>, nextContext: any): void;
2890
+ UNSAFE_componentWillReceiveProps?(nextProps: Readonly<P>, nextContext: any): void;
2891
+ componentWillUpdate?(nextProps: Readonly<P>, nextState: Readonly<S>, nextContext: any): void;
2892
+ UNSAFE_componentWillUpdate?(nextProps: Readonly<P>, nextState: Readonly<S>, nextContext: any): void;
2893
+ };
2894
+ new <P extends Partial<LayerProps>, S>(props: P, context: any): {
2895
+ /** @private (Just using `private` breaks compilation unless using `stripInternal`) */
2896
+ layerElement: HTMLElement | SVGElement | null;
2897
+ setLayerElement: (element: HTMLElement | SVGElement | null) => void;
2898
+
2899
+
2900
+ context: unknown;
2901
+ setState<K extends keyof S>(state: S | ((prevState: Readonly<S>, props: Readonly<P>) => S | Pick<S, K> | null) | Pick<S, K> | null, callback?: (() => void) | undefined): void;
2902
+ forceUpdate(callback?: (() => void) | undefined): void;
2903
+ render(): React_2.ReactNode;
2904
+ readonly props: Readonly<P>;
2905
+ state: Readonly<S>;
2906
+ refs: {
2907
+ [key: string]: React_2.ReactInstance;
2908
+ };
2909
+ componentDidMount?(): void;
2910
+ componentWillUnmount?(): void;
2911
+ componentDidCatch?(error: Error, errorInfo: React_2.ErrorInfo): void;
2912
+ getSnapshotBeforeUpdate?(prevProps: Readonly<P>, prevState: Readonly<S>): any;
2913
+ componentWillMount?(): void;
2914
+ UNSAFE_componentWillMount?(): void;
2915
+ componentWillReceiveProps?(nextProps: Readonly<P>, nextContext: any): void;
2916
+ UNSAFE_componentWillReceiveProps?(nextProps: Readonly<P>, nextContext: any): void;
2917
+ componentWillUpdate?(nextProps: Readonly<P>, nextState: Readonly<S>, nextContext: any): void;
2918
+ UNSAFE_componentWillUpdate?(nextProps: Readonly<P>, nextState: Readonly<S>, nextContext: any): void;
2919
+ };
2920
+ readonly defaultProps: LayerProps;
2921
+ applyWillChange(props: WillChangeTransformProp, style: MotionStyle, usingMotionStyle: boolean): void;
2922
+ contextType?: React_2.Context<any> | undefined;
2923
+ };
2737
2924
 
2738
2925
  /** @public */
2739
2926
  export declare interface LayerProps extends IdentityProps, WillChangeTransformProp, DOMLayoutProps {
@@ -2773,7 +2960,7 @@ export declare interface LinearGradientBase {
2773
2960
  }
2774
2961
 
2775
2962
  /** @public */
2776
- export declare const Link: React_2.ForwardRefExoticComponent<Pick<Props, "key" | "children" | keyof LinkProps> & React_2.RefAttributes<unknown>>;
2963
+ export declare const Link: ForwardRefExoticComponent<Omit<Props, "ref"> & RefAttributes<unknown>>;
2777
2964
 
2778
2965
  /** @public */
2779
2966
  declare interface LinkControlDescription<P = any> extends BaseControlDescription<P> {
@@ -2850,7 +3037,7 @@ export declare interface ModalTransitionOptions extends NavigationTransitionAnim
2850
3037
  declare type MotionDivProps = HTMLMotionProps<"div">;
2851
3038
 
2852
3039
  /** @public */
2853
- export declare function MotionSetup({ children }: Props_2): JSX.Element;
3040
+ export declare function MotionSetup({ children }: Props_2): JSX_2.Element;
2854
3041
 
2855
3042
  /**
2856
3043
  * @public
@@ -3062,7 +3249,7 @@ declare type ObjectControlIcon = "object" | "effect" | "color" | "interaction" |
3062
3249
  * Currently not supported: component instance, and event handler.
3063
3250
  * @public
3064
3251
  */
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>;
3252
+ 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> | BoxShadowControlDescription<P> | LinkControlDescription<P> | DateControlDescription<P> | ArrayControlDescription<P> | ObjectControlDescription<P> | FusedNumberControlDescription<P> | FontControlDescription<P> | PageScopeControlDescription<P> | ScrollSectionRefControlDescription<P> | CustomCursorControlDescription<P> | BorderControlDescription<P> | CursorControlDescription<P> | PaddingControlDescription<P> | BorderRadiusControlDescription<P>;
3066
3253
 
3067
3254
  /**
3068
3255
  * @public
@@ -3095,6 +3282,11 @@ export declare type OverrideFunction<P extends object = any> = (props: P) => Par
3095
3282
  /** @public */
3096
3283
  export declare type OverrideObject<T extends object = any> = Partial<T>;
3097
3284
 
3285
+ declare interface PaddingControlDescription<P = any> extends BaseControlDescription<P> {
3286
+ type: ControlType.Padding;
3287
+ defaultValue?: string;
3288
+ }
3289
+
3098
3290
  export declare const Page: ForwardRefExoticComponent<Partial<PageProps> & RefAttributes<HTMLDivElement>>;
3099
3291
 
3100
3292
  /**
@@ -3457,11 +3649,15 @@ export declare type PageProps = Partial<PageProperties> & Partial<Omit<FrameProp
3457
3649
  * Webkit issue: https://bugs.webkit.org/show_bug.cgi?id=240653
3458
3650
  * */
3459
3651
  /** @public */
3460
- export declare function PageRoot({ RootComponent, isWebsite, routeId, pathVariables, routes, collectionUtils, notFoundPage, isReducedMotion, includeDataObserver, localeId, locales, preserveQueryParams, enableSuspenseThatPreservesDom, shouldMarkHydrationEnd, }: PageRootProps): JSX.Element;
3652
+ export declare function PageRoot({ RootComponent, isWebsite, routeId, framerSiteId, pathVariables, routes, collectionUtils, notFoundPage, isReducedMotion, includeDataObserver, localeId, locales, preserveQueryParams, enableImproveInpDuringHydration, addHydrationMarkers, }: PageRootProps): JSX_2.Element;
3461
3653
 
3462
3654
  declare interface PageRootProps {
3463
3655
  RootComponent: RouteComponent;
3464
3656
  isWebsite: boolean;
3657
+ /**
3658
+ * framerSiteId is used by forms to identify the source of the form.
3659
+ */
3660
+ framerSiteId: string;
3465
3661
  routeId: string;
3466
3662
  pathVariables?: Record<string, unknown>;
3467
3663
  routes: Routes;
@@ -3472,10 +3668,10 @@ declare interface PageRootProps {
3472
3668
  locales?: Locale[];
3473
3669
  localeId?: LocaleId;
3474
3670
  preserveQueryParams?: boolean;
3475
- /** Is `true` when the noWhiteFlashSuspense experiment is enabled. To be removed when the experiment is removed. */
3476
- enableSuspenseThatPreservesDom?: boolean;
3671
+ /** Is `true` when the improveInpDuringHydration experiment is enabled. To be removed when the experiment is removed. */
3672
+ enableImproveInpDuringHydration?: boolean;
3477
3673
  /** Is `true` when the page root is used at the live site and is being hydrated. */
3478
- shouldMarkHydrationEnd?: boolean;
3674
+ addHydrationMarkers?: boolean;
3479
3675
  }
3480
3676
 
3481
3677
  export declare interface PageScopeControlDescription<P = any> extends BaseControlDescription<P> {
@@ -3517,11 +3713,13 @@ export declare namespace Point {
3517
3713
 
3518
3714
 
3519
3715
 
3716
+
3520
3717
  /** @public */
3521
3718
  const isEqual: (a: Point, b: Point) => boolean;
3522
3719
 
3523
3720
 
3524
3721
 
3722
+
3525
3723
  }
3526
3724
 
3527
3725
  declare interface PositionAbsoluteProperties {
@@ -3570,7 +3768,7 @@ export declare type PropertyControls<ComponentProps = any, ArrayTypes = any> = {
3570
3768
  [K in keyof ComponentProps]?: ControlDescription<Partial<ComponentProps>>;
3571
3769
  };
3572
3770
 
3573
- declare type Props = React_2.PropsWithChildren<LinkProps> & React_2.RefAttributes<unknown>;
3771
+ declare type Props = PropsWithChildren<LinkProps> & RefAttributes<unknown>;
3574
3772
 
3575
3773
  declare interface Props_2 {
3576
3774
  children: React_2.ReactNode;
@@ -3634,7 +3832,7 @@ export declare interface Rect extends Point, Size {
3634
3832
  /**
3635
3833
  * @public
3636
3834
  */
3637
- export declare namespace Rect {
3835
+ export declare const Rect: {
3638
3836
  /**
3639
3837
  *
3640
3838
  * @param rect -
@@ -3642,7 +3840,9 @@ export declare namespace Rect {
3642
3840
  * @returns if the input rectangles are equal in size and position
3643
3841
  * @public
3644
3842
  */
3645
- export function equals(rect: Rect | null, other: Rect | null): boolean;
3843
+ equals: (rect: Rect | null, other: Rect | null) => boolean;
3844
+
3845
+
3646
3846
 
3647
3847
 
3648
3848
 
@@ -3670,7 +3870,7 @@ export declare namespace Rect {
3670
3870
  * @param matrix - matrix to transform by
3671
3871
  * @returns The bounding rectangle of the rotated and/or translated rect.
3672
3872
  */
3673
- const transform: (rect: Rect, matrix: DOMMatrixReadOnly) => Rect;
3873
+ transform: (rect: Rect, matrix: DOMMatrixReadOnly) => Rect;
3674
3874
 
3675
3875
  /**
3676
3876
  * Returns wether a rect contains another rect entirely
@@ -3678,7 +3878,7 @@ export declare namespace Rect {
3678
3878
  * @param rectB -
3679
3879
  * @returns true if rectA contains rectB
3680
3880
  */
3681
- const containsRect: (rectA: Rect, rectB: Rect) => boolean;
3881
+ containsRect: (rectA: Rect, rectB: Rect) => boolean;
3682
3882
 
3683
3883
 
3684
3884
 
@@ -3693,15 +3893,17 @@ export declare namespace Rect {
3693
3893
  * @public
3694
3894
  * @deprecated: please use Rect.equals instead
3695
3895
  */
3696
- const isEqual: (rectA: Rect | null, rectB: Rect | null) => boolean;
3896
+ isEqual: (rectA: Rect | null, rectB: Rect | null) => boolean;
3697
3897
 
3698
3898
 
3699
3899
 
3700
3900
 
3701
- const delta: (a: Rect, b: Rect) => Point;
3901
+ delta: (a: Rect, b: Rect) => Point;
3702
3902
 
3703
3903
 
3704
- }
3904
+
3905
+
3906
+ };
3705
3907
 
3706
3908
  /** @public */
3707
3909
  export declare type RelativeNumber = `${number}%`;
@@ -3719,9 +3921,15 @@ export declare type RelativeNumber = `${number}%`;
3719
3921
  * with a placeholder. The `RenderTarget.hasRestrictions()` method can be used
3720
3922
  * to check explicitly for this case.
3721
3923
  *
3924
+ * @privateRemarks
3925
+ * This is a read-only equivalent of RenderEnvironment.target that is exposed
3926
+ * to components for context-dependent rendering
3927
+ *
3722
3928
  * @public
3723
3929
  */
3724
- export declare enum RenderTarget {
3930
+ export declare type RenderTarget = RenderTargetName;
3931
+
3932
+ export declare const RenderTarget: {
3725
3933
  /**
3726
3934
  * The component is to be rendered for the Framer canvas.
3727
3935
  *
@@ -3735,7 +3943,7 @@ export declare enum RenderTarget {
3735
3943
  * }
3736
3944
  * ```
3737
3945
  */
3738
- canvas = "CANVAS",
3946
+ canvas: RenderTargetName;
3739
3947
  /**
3740
3948
  * The component is to be rendered for export.
3741
3949
  *
@@ -3749,7 +3957,7 @@ export declare enum RenderTarget {
3749
3957
  * }
3750
3958
  * ```
3751
3959
  */
3752
- export = "EXPORT",
3960
+ export: RenderTargetName;
3753
3961
  /**
3754
3962
  * The component is to be rendered as a preview thumbnail, for example in the
3755
3963
  * component panel.
@@ -3764,7 +3972,7 @@ export declare enum RenderTarget {
3764
3972
  * }
3765
3973
  * ```
3766
3974
  */
3767
- thumbnail = "THUMBNAIL",
3975
+ thumbnail: RenderTargetName;
3768
3976
  /**
3769
3977
  * The component is being rendered in the preview window.
3770
3978
  *
@@ -3780,16 +3988,7 @@ export declare enum RenderTarget {
3780
3988
  * }
3781
3989
  * ```
3782
3990
  */
3783
- preview = "PREVIEW"
3784
- }
3785
-
3786
- /**
3787
- * @privateRemarks
3788
- * This is a read-only equivalent of RenderEnvironment.target that is exposed
3789
- * to components for context-dependent rendering
3790
- * @public
3791
- */
3792
- export declare namespace RenderTarget {
3991
+ preview: RenderTargetName;
3793
3992
  /**
3794
3993
  * Returns the current `RenderTarget` allowing components to apply
3795
3994
  * different behaviors depending on the environment.
@@ -3804,7 +4003,7 @@ export declare namespace RenderTarget {
3804
4003
  * }
3805
4004
  * ```
3806
4005
  */
3807
- export function current(): RenderTarget;
4006
+ current: () => RenderTargetName;
3808
4007
  /**
3809
4008
  * Returns true if the current `RenderTarget` has performance restrictions.
3810
4009
  * Use this to avoid doing heavy work in these contexts because they may
@@ -3820,7 +4019,14 @@ export declare namespace RenderTarget {
3820
4019
  * }
3821
4020
  * ```
3822
4021
  */
3823
- export function hasRestrictions(): boolean;
4022
+ hasRestrictions: () => boolean;
4023
+ };
4024
+
4025
+ declare enum RenderTargetName {
4026
+ canvas = "CANVAS",
4027
+ export = "EXPORT",
4028
+ thumbnail = "THUMBNAIL",
4029
+ preview = "PREVIEW"
3824
4030
  }
3825
4031
 
3826
4032
  /** @public */
@@ -4586,6 +4792,7 @@ declare interface VariantState {
4586
4792
  gestureVariant: string | undefined;
4587
4793
  classNames: string;
4588
4794
  transition: Partial<Transition> | undefined;
4795
+ gestureHandlers: GestureHandlers;
4589
4796
  setVariant: (variant: string | typeof CycleVariantState) => void;
4590
4797
  setGestureState: (gestureState: GestureState) => void;
4591
4798
  addVariantProps?: (id: string) => Record<string, unknown>;
@@ -4748,7 +4955,7 @@ export declare const withFX: <T extends FXProps>(Component: React_2.ComponentTyp
4748
4955
  * immutable ids, and this remapped version of props can be consumed by all user
4749
4956
  * overrides.
4750
4957
  */
4751
- export declare function withMappedReactProps<T extends object>(Component: React_2.ComponentType<T>, info: Record<string, unknown>): (rawProps: T) => JSX.Element;
4958
+ export declare function withMappedReactProps<T extends object>(Component: React_2.ComponentType<T>, info: Record<string, unknown>): (rawProps: T) => JSX_2.Element;
4752
4959
 
4753
4960
  declare interface WithMouseHandlers {
4754
4961
  onMouseDown: EventHandler;