framer-motion 8.4.4 → 8.4.6
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/cjs/index.js +98 -45
- package/dist/es/animation/create-instant-animation.mjs +1 -2
- package/dist/es/animation/index.mjs +2 -4
- package/dist/es/animation/legacy-popmotion/index.mjs +19 -0
- package/dist/es/animation/optimized-appear/handoff.mjs +19 -2
- package/dist/es/animation/waapi/create-accelerated-animation.mjs +23 -15
- package/dist/es/gestures/use-hover-gesture.mjs +4 -4
- package/dist/es/gestures/use-tap-gesture.mjs +8 -4
- package/dist/es/motion/utils/use-visual-element.mjs +13 -5
- package/dist/es/render/utils/animation.mjs +1 -1
- package/dist/es/render/utils/motion-values.mjs +2 -2
- package/dist/es/value/index.mjs +7 -7
- package/dist/framer-motion.dev.js +98 -45
- package/dist/framer-motion.js +1 -1
- package/dist/index.d.ts +133 -133
- package/dist/projection.dev.js +54 -30
- package/dist/size-rollup-dom-animation-m.js +1 -1
- package/dist/size-rollup-dom-animation.js +1 -1
- package/dist/size-rollup-dom-max.js +1 -1
- package/dist/size-rollup-m.js +1 -1
- package/dist/size-rollup-motion.js +1 -1
- package/dist/size-webpack-dom-animation.js +1 -1
- package/dist/size-webpack-dom-max.js +1 -1
- package/dist/size-webpack-m.js +1 -1
- package/dist/three-entry.d.ts +62 -62
- package/package.json +9 -9
package/dist/three-entry.d.ts
CHANGED
|
@@ -1458,6 +1458,68 @@ declare abstract class VisualElement<Instance = unknown, RenderState = unknown,
|
|
|
1458
1458
|
notify<EventName extends keyof VisualElementEventCallbacks>(eventName: EventName, ...args: any): void;
|
|
1459
1459
|
}
|
|
1460
1460
|
|
|
1461
|
+
/**
|
|
1462
|
+
* @public
|
|
1463
|
+
*/
|
|
1464
|
+
declare type ControlsAnimationDefinition = string | string[] | TargetAndTransition | TargetResolver;
|
|
1465
|
+
/**
|
|
1466
|
+
* @public
|
|
1467
|
+
*/
|
|
1468
|
+
interface AnimationControls {
|
|
1469
|
+
/**
|
|
1470
|
+
* Starts an animation on all linked components.
|
|
1471
|
+
*
|
|
1472
|
+
* @remarks
|
|
1473
|
+
*
|
|
1474
|
+
* ```jsx
|
|
1475
|
+
* controls.start("variantLabel")
|
|
1476
|
+
* controls.start({
|
|
1477
|
+
* x: 0,
|
|
1478
|
+
* transition: { duration: 1 }
|
|
1479
|
+
* })
|
|
1480
|
+
* ```
|
|
1481
|
+
*
|
|
1482
|
+
* @param definition - Properties or variant label to animate to
|
|
1483
|
+
* @param transition - Optional `transtion` to apply to a variant
|
|
1484
|
+
* @returns - A `Promise` that resolves when all animations have completed.
|
|
1485
|
+
*
|
|
1486
|
+
* @public
|
|
1487
|
+
*/
|
|
1488
|
+
start(definition: ControlsAnimationDefinition, transitionOverride?: Transition): Promise<any>;
|
|
1489
|
+
/**
|
|
1490
|
+
* Instantly set to a set of properties or a variant.
|
|
1491
|
+
*
|
|
1492
|
+
* ```jsx
|
|
1493
|
+
* // With properties
|
|
1494
|
+
* controls.set({ opacity: 0 })
|
|
1495
|
+
*
|
|
1496
|
+
* // With variants
|
|
1497
|
+
* controls.set("hidden")
|
|
1498
|
+
* ```
|
|
1499
|
+
*
|
|
1500
|
+
* @privateRemarks
|
|
1501
|
+
* We could perform a similar trick to `.start` where this can be called before mount
|
|
1502
|
+
* and we maintain a list of of pending actions that get applied on mount. But the
|
|
1503
|
+
* expectation of `set` is that it happens synchronously and this would be difficult
|
|
1504
|
+
* to do before any children have even attached themselves. It's also poor practise
|
|
1505
|
+
* and we should discourage render-synchronous `.start` calls rather than lean into this.
|
|
1506
|
+
*
|
|
1507
|
+
* @public
|
|
1508
|
+
*/
|
|
1509
|
+
set(definition: ControlsAnimationDefinition): void;
|
|
1510
|
+
/**
|
|
1511
|
+
* Stops animations on all linked components.
|
|
1512
|
+
*
|
|
1513
|
+
* ```jsx
|
|
1514
|
+
* controls.stop()
|
|
1515
|
+
* ```
|
|
1516
|
+
*
|
|
1517
|
+
* @public
|
|
1518
|
+
*/
|
|
1519
|
+
stop(): void;
|
|
1520
|
+
mount(): () => void;
|
|
1521
|
+
}
|
|
1522
|
+
|
|
1461
1523
|
/**
|
|
1462
1524
|
* @public
|
|
1463
1525
|
*/
|
|
@@ -1603,68 +1665,6 @@ declare class MotionValue<V = any> {
|
|
|
1603
1665
|
destroy(): void;
|
|
1604
1666
|
}
|
|
1605
1667
|
|
|
1606
|
-
/**
|
|
1607
|
-
* @public
|
|
1608
|
-
*/
|
|
1609
|
-
declare type ControlsAnimationDefinition = string | string[] | TargetAndTransition | TargetResolver;
|
|
1610
|
-
/**
|
|
1611
|
-
* @public
|
|
1612
|
-
*/
|
|
1613
|
-
interface AnimationControls {
|
|
1614
|
-
/**
|
|
1615
|
-
* Starts an animation on all linked components.
|
|
1616
|
-
*
|
|
1617
|
-
* @remarks
|
|
1618
|
-
*
|
|
1619
|
-
* ```jsx
|
|
1620
|
-
* controls.start("variantLabel")
|
|
1621
|
-
* controls.start({
|
|
1622
|
-
* x: 0,
|
|
1623
|
-
* transition: { duration: 1 }
|
|
1624
|
-
* })
|
|
1625
|
-
* ```
|
|
1626
|
-
*
|
|
1627
|
-
* @param definition - Properties or variant label to animate to
|
|
1628
|
-
* @param transition - Optional `transtion` to apply to a variant
|
|
1629
|
-
* @returns - A `Promise` that resolves when all animations have completed.
|
|
1630
|
-
*
|
|
1631
|
-
* @public
|
|
1632
|
-
*/
|
|
1633
|
-
start(definition: ControlsAnimationDefinition, transitionOverride?: Transition): Promise<any>;
|
|
1634
|
-
/**
|
|
1635
|
-
* Instantly set to a set of properties or a variant.
|
|
1636
|
-
*
|
|
1637
|
-
* ```jsx
|
|
1638
|
-
* // With properties
|
|
1639
|
-
* controls.set({ opacity: 0 })
|
|
1640
|
-
*
|
|
1641
|
-
* // With variants
|
|
1642
|
-
* controls.set("hidden")
|
|
1643
|
-
* ```
|
|
1644
|
-
*
|
|
1645
|
-
* @privateRemarks
|
|
1646
|
-
* We could perform a similar trick to `.start` where this can be called before mount
|
|
1647
|
-
* and we maintain a list of of pending actions that get applied on mount. But the
|
|
1648
|
-
* expectation of `set` is that it happens synchronously and this would be difficult
|
|
1649
|
-
* to do before any children have even attached themselves. It's also poor practise
|
|
1650
|
-
* and we should discourage render-synchronous `.start` calls rather than lean into this.
|
|
1651
|
-
*
|
|
1652
|
-
* @public
|
|
1653
|
-
*/
|
|
1654
|
-
set(definition: ControlsAnimationDefinition): void;
|
|
1655
|
-
/**
|
|
1656
|
-
* Stops animations on all linked components.
|
|
1657
|
-
*
|
|
1658
|
-
* ```jsx
|
|
1659
|
-
* controls.stop()
|
|
1660
|
-
* ```
|
|
1661
|
-
*
|
|
1662
|
-
* @public
|
|
1663
|
-
*/
|
|
1664
|
-
stop(): void;
|
|
1665
|
-
mount(): () => void;
|
|
1666
|
-
}
|
|
1667
|
-
|
|
1668
1668
|
/**
|
|
1669
1669
|
* Passed in to pan event handlers like `onPan` the `PanInfo` object contains
|
|
1670
1670
|
* information about the current state of the tap gesture such as its
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "framer-motion",
|
|
3
|
-
"version": "8.4.
|
|
3
|
+
"version": "8.4.6",
|
|
4
4
|
"description": "A simple and powerful React animation library",
|
|
5
5
|
"main": "dist/cjs/index.js",
|
|
6
6
|
"module": "dist/es/index.mjs",
|
|
@@ -72,32 +72,32 @@
|
|
|
72
72
|
"bundlesize": [
|
|
73
73
|
{
|
|
74
74
|
"path": "./dist/size-rollup-motion.js",
|
|
75
|
-
"maxSize": "29.
|
|
75
|
+
"maxSize": "29.64 kB"
|
|
76
76
|
},
|
|
77
77
|
{
|
|
78
78
|
"path": "./dist/size-rollup-m.js",
|
|
79
|
-
"maxSize": "4.
|
|
79
|
+
"maxSize": "4.81 kB"
|
|
80
80
|
},
|
|
81
81
|
{
|
|
82
82
|
"path": "./dist/size-rollup-dom-animation.js",
|
|
83
|
-
"maxSize": "14.
|
|
83
|
+
"maxSize": "14.84 kB"
|
|
84
84
|
},
|
|
85
85
|
{
|
|
86
86
|
"path": "./dist/size-rollup-dom-max.js",
|
|
87
|
-
"maxSize": "25.
|
|
87
|
+
"maxSize": "25.58 kB"
|
|
88
88
|
},
|
|
89
89
|
{
|
|
90
90
|
"path": "./dist/size-webpack-m.js",
|
|
91
|
-
"maxSize": "
|
|
91
|
+
"maxSize": "5.02 kB"
|
|
92
92
|
},
|
|
93
93
|
{
|
|
94
94
|
"path": "./dist/size-webpack-dom-animation.js",
|
|
95
|
-
"maxSize": "18.
|
|
95
|
+
"maxSize": "18.9 kB"
|
|
96
96
|
},
|
|
97
97
|
{
|
|
98
98
|
"path": "./dist/size-webpack-dom-max.js",
|
|
99
|
-
"maxSize": "30.
|
|
99
|
+
"maxSize": "30.47 kB"
|
|
100
100
|
}
|
|
101
101
|
],
|
|
102
|
-
"gitHead": "
|
|
102
|
+
"gitHead": "e94262b86c05af151049204e90374c14ce6d4c00"
|
|
103
103
|
}
|