framer-motion 7.6.4 → 7.6.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 +789 -850
- package/dist/es/animation/use-animated-state.mjs +29 -17
- package/dist/es/gestures/drag/VisualElementDragControls.mjs +14 -10
- package/dist/es/gestures/use-focus-gesture.mjs +1 -1
- package/dist/es/gestures/use-tap-gesture.mjs +1 -1
- package/dist/es/index.mjs +1 -1
- package/dist/es/motion/features/viewport/use-viewport.mjs +2 -2
- package/dist/es/motion/utils/use-visual-element.mjs +3 -3
- package/dist/es/projection/node/create-projection-node.mjs +74 -60
- package/dist/es/render/VisualElement.mjs +480 -0
- package/dist/es/render/dom/DOMVisualElement.mjs +49 -0
- package/dist/es/render/dom/create-visual-element.mjs +4 -4
- package/dist/es/render/dom/utils/css-variables-conversion.mjs +2 -2
- package/dist/es/render/dom/utils/unit-conversion.mjs +4 -4
- package/dist/es/render/html/HTMLVisualElement.mjs +41 -0
- package/dist/es/render/svg/{visual-element.mjs → SVGVisualElement.mjs} +21 -15
- package/dist/es/render/utils/animation.mjs +4 -4
- package/dist/es/render/utils/motion-values.mjs +1 -1
- package/dist/es/render/utils/resolve-dynamic-variants.mjs +2 -2
- package/dist/es/render/utils/setters.mjs +2 -1
- package/dist/es/value/index.mjs +1 -1
- package/dist/framer-motion.dev.js +789 -850
- package/dist/framer-motion.js +1 -1
- package/dist/index.d.ts +2101 -1931
- package/dist/projection.dev.js +1053 -1136
- 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-assets.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 +1956 -1745
- package/package.json +8 -8
- package/dist/es/render/html/visual-element.mjs +0 -109
- package/dist/es/render/index.mjs +0 -515
- package/dist/es/render/utils/lifecycles.mjs +0 -43
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import { SubscriptionManager } from '../../utils/subscription-manager.mjs';
|
|
2
|
-
|
|
3
|
-
const names = [
|
|
4
|
-
"LayoutMeasure",
|
|
5
|
-
"BeforeLayoutMeasure",
|
|
6
|
-
"LayoutUpdate",
|
|
7
|
-
"ViewportBoxUpdate",
|
|
8
|
-
"Update",
|
|
9
|
-
"Render",
|
|
10
|
-
"AnimationComplete",
|
|
11
|
-
"LayoutAnimationComplete",
|
|
12
|
-
"AnimationStart",
|
|
13
|
-
"LayoutAnimationStart",
|
|
14
|
-
"SetAxisTarget",
|
|
15
|
-
"Unmount",
|
|
16
|
-
];
|
|
17
|
-
function createLifecycles() {
|
|
18
|
-
const managers = names.map(() => new SubscriptionManager());
|
|
19
|
-
const propSubscriptions = {};
|
|
20
|
-
const lifecycles = {
|
|
21
|
-
clearAllListeners: () => managers.forEach((manager) => manager.clear()),
|
|
22
|
-
updatePropListeners: (props) => {
|
|
23
|
-
names.forEach((name) => {
|
|
24
|
-
var _a;
|
|
25
|
-
const on = "on" + name;
|
|
26
|
-
const propListener = props[on];
|
|
27
|
-
// Unsubscribe existing subscription
|
|
28
|
-
(_a = propSubscriptions[name]) === null || _a === void 0 ? void 0 : _a.call(propSubscriptions);
|
|
29
|
-
// Add new subscription
|
|
30
|
-
if (propListener) {
|
|
31
|
-
propSubscriptions[name] = lifecycles[on](propListener);
|
|
32
|
-
}
|
|
33
|
-
});
|
|
34
|
-
},
|
|
35
|
-
};
|
|
36
|
-
managers.forEach((manager, i) => {
|
|
37
|
-
lifecycles["on" + names[i]] = (handler) => manager.add(handler);
|
|
38
|
-
lifecycles["notify" + names[i]] = (...args) => manager.notify(...args);
|
|
39
|
-
});
|
|
40
|
-
return lifecycles;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
export { createLifecycles };
|