motion-v 0.7.1 → 0.8.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (134) hide show
  1. package/dist/cjs/index.js +38 -16
  2. package/dist/es/animation/hooks/animation-controls.mjs +11 -0
  3. package/dist/{src → es}/components/group.d.ts +0 -1
  4. package/dist/es/components/group.mjs +1 -5
  5. package/dist/{src → es}/features/gestures/drag/types.d.ts +1 -1
  6. package/dist/{src → es}/features/layout/layout.d.ts +1 -0
  7. package/dist/es/features/layout/layout.mjs +8 -7
  8. package/dist/es/features/layout/projection.mjs +16 -1
  9. package/dist/es/state/animate-updates.mjs +2 -2
  10. package/dist/es/state/motion-state.mjs +2 -1
  11. package/package.json +4 -4
  12. package/dist/src/animation/use-animate.d.ts +0 -8
  13. /package/dist/{src → es}/animation/hooks/animation-controls.d.ts +0 -0
  14. /package/dist/{src → es}/animation/hooks/use-animate.d.ts +0 -0
  15. /package/dist/{src → es}/animation/hooks/use-animation-controls.d.ts +0 -0
  16. /package/dist/{src → es}/animation/index.d.ts +0 -0
  17. /package/dist/{src → es}/animation/types.d.ts +0 -0
  18. /package/dist/{src → es}/animation/utils.d.ts +0 -0
  19. /package/dist/{src → es}/components/LayoutGroup.d.ts +0 -0
  20. /package/dist/{src → es}/components/animate-presence/AnimatePresence.d.ts +0 -0
  21. /package/dist/{src → es}/components/animate-presence/index.d.ts +0 -0
  22. /package/dist/{src → es}/components/animate-presence/types.d.ts +0 -0
  23. /package/dist/{src → es}/components/animate-presence/use-pop-layout.d.ts +0 -0
  24. /package/dist/{src → es}/components/animate-presence/use-presence.d.ts +0 -0
  25. /package/dist/{src → es}/components/animate-presence/utils.d.ts +0 -0
  26. /package/dist/{src → es}/components/context.d.ts +0 -0
  27. /package/dist/{src → es}/components/hooks/use-motion-elm.d.ts +0 -0
  28. /package/dist/{src → es}/components/index.d.ts +0 -0
  29. /package/dist/{src → es}/components/motion/Motion.d.ts +0 -0
  30. /package/dist/{src → es}/components/motion/NameSpace.d.ts +0 -0
  31. /package/dist/{src → es}/components/motion/Primitive.d.ts +0 -0
  32. /package/dist/{src → es}/components/motion/Slot.d.ts +0 -0
  33. /package/dist/{src → es}/components/motion/index.d.ts +0 -0
  34. /package/dist/{src → es}/components/motion/renderSlotFragments.d.ts +0 -0
  35. /package/dist/{src → es}/components/motion/utils.d.ts +0 -0
  36. /package/dist/{src → es}/components/motion-config/MotionConfig.d.ts +0 -0
  37. /package/dist/{src → es}/components/motion-config/context.d.ts +0 -0
  38. /package/dist/{src → es}/components/motion-config/index.d.ts +0 -0
  39. /package/dist/{src → es}/components/motion-config/types.d.ts +0 -0
  40. /package/dist/{src → es}/components/presence.d.ts +0 -0
  41. /package/dist/{src → es}/components/use-force-update.d.ts +0 -0
  42. /package/dist/{src → es}/components/use-layout-group.d.ts +0 -0
  43. /package/dist/{src → es}/components/use-slot-change-index.d.ts +0 -0
  44. /package/dist/{src → es}/constants/index.d.ts +0 -0
  45. /package/dist/{src → es}/events/add-dom-event.d.ts +0 -0
  46. /package/dist/{src → es}/events/add-pointer-event.d.ts +0 -0
  47. /package/dist/{src → es}/events/event-info.d.ts +0 -0
  48. /package/dist/{src → es}/events/index.d.ts +0 -0
  49. /package/dist/{src → es}/events/types.d.ts +0 -0
  50. /package/dist/{src → es}/events/utils/index.d.ts +0 -0
  51. /package/dist/{src → es}/events/utils/is-primary-pointer.d.ts +0 -0
  52. /package/dist/{src → es}/features/animation/animation.d.ts +0 -0
  53. /package/dist/{src → es}/features/feature-manager.d.ts +0 -0
  54. /package/dist/{src → es}/features/feature.d.ts +0 -0
  55. /package/dist/{src → es}/features/gestures/base.d.ts +0 -0
  56. /package/dist/{src → es}/features/gestures/drag/VisualElementDragControls.d.ts +0 -0
  57. /package/dist/{src → es}/features/gestures/drag/index.d.ts +0 -0
  58. /package/dist/{src → es}/features/gestures/drag/lock.d.ts +0 -0
  59. /package/dist/{src → es}/features/gestures/drag/use-drag-controls.d.ts +0 -0
  60. /package/dist/{src → es}/features/gestures/drag/utils/constraints.d.ts +0 -0
  61. /package/dist/{src → es}/features/gestures/drag/utils/is.d.ts +0 -0
  62. /package/dist/{src → es}/features/gestures/focus/index.d.ts +0 -0
  63. /package/dist/{src → es}/features/gestures/focus/types.d.ts +0 -0
  64. /package/dist/{src → es}/features/gestures/hover/index.d.ts +0 -0
  65. /package/dist/{src → es}/features/gestures/hover/types.d.ts +0 -0
  66. /package/dist/{src → es}/features/gestures/in-view/index.d.ts +0 -0
  67. /package/dist/{src → es}/features/gestures/in-view/types.d.ts +0 -0
  68. /package/dist/{src → es}/features/gestures/index.d.ts +0 -0
  69. /package/dist/{src → es}/features/gestures/pan/PanSession.d.ts +0 -0
  70. /package/dist/{src → es}/features/gestures/pan/index.d.ts +0 -0
  71. /package/dist/{src → es}/features/gestures/pan/types.d.ts +0 -0
  72. /package/dist/{src → es}/features/gestures/press/index.d.ts +0 -0
  73. /package/dist/{src → es}/features/gestures/press/types.d.ts +0 -0
  74. /package/dist/{src → es}/features/gestures/types.d.ts +0 -0
  75. /package/dist/{src → es}/features/index.d.ts +0 -0
  76. /package/dist/{src → es}/features/layout/config.d.ts +0 -0
  77. /package/dist/{src → es}/features/layout/projection.d.ts +0 -0
  78. /package/dist/{src → es}/features/layout/types.d.ts +0 -0
  79. /package/dist/{src → es}/features/layout/utils.d.ts +0 -0
  80. /package/dist/{src → es}/features/svg.d.ts +0 -0
  81. /package/dist/{src → es}/index.d.ts +0 -0
  82. /package/dist/{src → es}/projection/conversion.d.ts +0 -0
  83. /package/dist/{src → es}/projection/geometry/delta-apply.d.ts +0 -0
  84. /package/dist/{src → es}/projection/geometry/delta-calc.d.ts +0 -0
  85. /package/dist/{src → es}/projection/geometry/models.d.ts +0 -0
  86. /package/dist/{src → es}/projection/node/types.d.ts +0 -0
  87. /package/dist/{src → es}/projection/utils/each-axis.d.ts +0 -0
  88. /package/dist/{src → es}/projection/utils/measure.d.ts +0 -0
  89. /package/dist/{src → es}/render/utils/setters.d.ts +0 -0
  90. /package/dist/{src → es}/shared/index.d.ts +0 -0
  91. /package/dist/{src → es}/shared/test.d.ts +0 -0
  92. /package/dist/{src → es}/state/animate-updates.d.ts +0 -0
  93. /package/dist/{src → es}/state/animate-variants-children.d.ts +0 -0
  94. /package/dist/{src → es}/state/animation/index.d.ts +0 -0
  95. /package/dist/{src → es}/state/animation/types.d.ts +0 -0
  96. /package/dist/{src → es}/state/create-visual-element.d.ts +0 -0
  97. /package/dist/{src → es}/state/event.d.ts +0 -0
  98. /package/dist/{src → es}/state/index.d.ts +0 -0
  99. /package/dist/{src → es}/state/motion-state.d.ts +0 -0
  100. /package/dist/{src → es}/state/style.d.ts +0 -0
  101. /package/dist/{src → es}/state/transform.d.ts +0 -0
  102. /package/dist/{src → es}/state/utils/is-present.d.ts +0 -0
  103. /package/dist/{src → es}/state/utils.d.ts +0 -0
  104. /package/dist/{src → es}/types/framer-motion.d.ts +0 -0
  105. /package/dist/{src → es}/types/index.d.ts +0 -0
  106. /package/dist/{src → es}/types/motion-values.d.ts +0 -0
  107. /package/dist/{src → es}/types/state.d.ts +0 -0
  108. /package/dist/{src → es}/types/transform.d.ts +0 -0
  109. /package/dist/{src → es}/utils/clamp.d.ts +0 -0
  110. /package/dist/{src → es}/utils/createContext.d.ts +0 -0
  111. /package/dist/{src → es}/utils/get-context-window.d.ts +0 -0
  112. /package/dist/{src → es}/utils/index.d.ts +0 -0
  113. /package/dist/{src → es}/utils/mix/number.d.ts +0 -0
  114. /package/dist/{src → es}/utils/motion-value.d.ts +0 -0
  115. /package/dist/{src → es}/utils/noop.d.ts +0 -0
  116. /package/dist/{src → es}/utils/progress.d.ts +0 -0
  117. /package/dist/{src → es}/utils/time-conversion.d.ts +0 -0
  118. /package/dist/{src → es}/utils/use-animation-frame.d.ts +0 -0
  119. /package/dist/{src → es}/utils/use-dom-ref.d.ts +0 -0
  120. /package/dist/{src → es}/utils/use-in-view.d.ts +0 -0
  121. /package/dist/{src → es}/value/index.d.ts +0 -0
  122. /package/dist/{src → es}/value/types/numbers/units.d.ts +0 -0
  123. /package/dist/{src → es}/value/use-combine-values.d.ts +0 -0
  124. /package/dist/{src → es}/value/use-computed.d.ts +0 -0
  125. /package/dist/{src → es}/value/use-motion-template.d.ts +0 -0
  126. /package/dist/{src → es}/value/use-motion-value-event.d.ts +0 -0
  127. /package/dist/{src → es}/value/use-scroll.d.ts +0 -0
  128. /package/dist/{src → es}/value/use-spring.d.ts +0 -0
  129. /package/dist/{src → es}/value/use-time.d.ts +0 -0
  130. /package/dist/{src → es}/value/use-transform.d.ts +0 -0
  131. /package/dist/{src → es}/value/use-velocity.d.ts +0 -0
  132. /package/dist/{src → es}/value/use-will-change/add-will-change.d.ts +0 -0
  133. /package/dist/{src → es}/value/use-will-change/is.d.ts +0 -0
  134. /package/dist/{src → es}/value/use-will-change/types.d.ts +0 -0
package/dist/cjs/index.js CHANGED
@@ -6398,8 +6398,12 @@ class LayoutFeature extends Feature {
6398
6398
  this.state.willUpdate("beforeUpdate");
6399
6399
  }
6400
6400
  update() {
6401
- var _a;
6402
- (_a = this.state.visualElement.projection) == null ? void 0 : _a.root.didUpdate();
6401
+ this.didUpdate();
6402
+ }
6403
+ didUpdate() {
6404
+ var _a, _b;
6405
+ if (this.state.options.layout || this.state.options.layoutId)
6406
+ (_b = (_a = this.state.visualElement.projection) == null ? void 0 : _a.root) == null ? void 0 : _b.didUpdate();
6403
6407
  }
6404
6408
  beforeMount() {
6405
6409
  }
@@ -6413,7 +6417,7 @@ class LayoutFeature extends Feature {
6413
6417
  (_a = layoutGroup == null ? void 0 : layoutGroup.group) == null ? void 0 : _a.add(projection);
6414
6418
  }
6415
6419
  globalProjectionState.hasEverUpdated = true;
6416
- projection == null ? void 0 : projection.root.didUpdate();
6420
+ this.didUpdate();
6417
6421
  }
6418
6422
  }
6419
6423
  beforeUnmount() {
@@ -6429,14 +6433,11 @@ class LayoutFeature extends Feature {
6429
6433
  }
6430
6434
  }
6431
6435
  unmount() {
6432
- var _a, _b;
6433
6436
  const layoutGroup = this.state.options.layoutGroup;
6434
6437
  const projection = this.state.visualElement.projection;
6435
6438
  if ((layoutGroup == null ? void 0 : layoutGroup.group) && projection)
6436
6439
  layoutGroup.group.remove(projection);
6437
- if (this.state.options.layoutId || this.state.options.layout) {
6438
- (_b = (_a = this.state.visualElement.projection) == null ? void 0 : _a.root) == null ? void 0 : _b.didUpdate();
6439
- }
6440
+ this.didUpdate();
6440
6441
  }
6441
6442
  }
6442
6443
  function asyncHandler(handler) {
@@ -7932,7 +7933,21 @@ class ProjectionFeature extends Feature {
7932
7933
  // initialPromotionConfig
7933
7934
  layoutRoot: options.layoutRoot,
7934
7935
  layoutScroll: options.layoutScroll,
7935
- crossfade: options.crossfade
7936
+ crossfade: options.crossfade,
7937
+ onExitComplete: () => {
7938
+ var _a;
7939
+ if (!((_a = this.state.visualElement.projection) == null ? void 0 : _a.isPresent)) {
7940
+ const done = doneCallbacks.get(this.state.element);
7941
+ this.state.isSafeToRemove = true;
7942
+ if (done) {
7943
+ done({
7944
+ detail: {
7945
+ isExit: true
7946
+ }
7947
+ }, true);
7948
+ }
7949
+ }
7950
+ }
7936
7951
  });
7937
7952
  }
7938
7953
  update() {
@@ -8104,9 +8119,9 @@ function resolveStateAnimation(controlActiveState, animationOptions) {
8104
8119
  }
8105
8120
  function createAnimationFactories(prevTarget, animationOptions, controlDelay) {
8106
8121
  const factories = [];
8107
- new Set(Object.keys(this.target)).forEach((key) => {
8122
+ Object.keys(this.target).forEach((key) => {
8108
8123
  var _a;
8109
- if (!hasChanged(this.visualElement.getValue(key), this.target[key]))
8124
+ if (!hasChanged(prevTarget[key], this.target[key]))
8110
8125
  return;
8111
8126
  (_a = this.baseTarget)[key] ?? (_a[key] = style.get(this.element, key));
8112
8127
  const keyValue = this.target[key] === "none" ? transformResetValue[key] : this.target[key];
@@ -8345,7 +8360,8 @@ class MotionState {
8345
8360
  }
8346
8361
  willUpdate(label) {
8347
8362
  var _a;
8348
- (_a = this.visualElement.projection) == null ? void 0 : _a.willUpdate();
8363
+ if (this.options.layout || this.options.layoutId)
8364
+ (_a = this.visualElement.projection) == null ? void 0 : _a.willUpdate();
8349
8365
  }
8350
8366
  }
8351
8367
  function getMotionElement(el) {
@@ -8802,11 +8818,7 @@ function nodeGroup() {
8802
8818
  subscriptions.delete(node);
8803
8819
  }
8804
8820
  },
8805
- dirty: dirtyAll,
8806
- didUpdate: () => {
8807
- var _a;
8808
- (_a = nodes[0]) == null ? void 0 : _a.didUpdate();
8809
- }
8821
+ dirty: dirtyAll
8810
8822
  };
8811
8823
  }
8812
8824
  function useLayoutGroupProvider(props) {
@@ -9109,6 +9121,14 @@ function useAnimate() {
9109
9121
  function stopAnimation(visualElement) {
9110
9122
  visualElement.values.forEach((value) => value.stop());
9111
9123
  }
9124
+ function setStateTarget(state2, definition) {
9125
+ const resolvedVariant = resolveVariant(definition, state2.options.variants, state2.options.custom);
9126
+ Object.entries(resolvedVariant).forEach(([key, value]) => {
9127
+ if (key === "transition")
9128
+ return;
9129
+ state2.target[key] = value;
9130
+ });
9131
+ }
9112
9132
  function animationControls() {
9113
9133
  let hasMounted = false;
9114
9134
  const subscribers = /* @__PURE__ */ new Set();
@@ -9161,6 +9181,7 @@ function setValues(state2, definition) {
9161
9181
  if (typeof definition === "string") {
9162
9182
  return setVariants(state2, [definition]);
9163
9183
  } else {
9184
+ setStateTarget(state2, definition);
9164
9185
  setTarget(state2.visualElement, definition);
9165
9186
  }
9166
9187
  }
@@ -9170,6 +9191,7 @@ function setVariants(state2, variantLabels) {
9170
9191
  reversedLabels.forEach((key) => {
9171
9192
  const variant = visualElement.getVariant(key);
9172
9193
  variant && setTarget(visualElement, variant);
9194
+ setStateTarget(state2, variant);
9173
9195
  if (visualElement.variantChildren) {
9174
9196
  visualElement.variantChildren.forEach((child) => {
9175
9197
  setVariants(mountedStates.get(child.current), variantLabels);
@@ -1,9 +1,18 @@
1
1
  import { mountedStates } from "../../state/motion-state.mjs";
2
2
  import { invariant } from "hey-listen";
3
3
  import { setTarget } from "../../external/.pnpm/framer-motion@11.16.6/external/framer-motion/dist/es/render/utils/setters.mjs";
4
+ import { resolveVariant } from "../../state/utils.mjs";
4
5
  function stopAnimation(visualElement) {
5
6
  visualElement.values.forEach((value) => value.stop());
6
7
  }
8
+ function setStateTarget(state, definition) {
9
+ const resolvedVariant = resolveVariant(definition, state.options.variants, state.options.custom);
10
+ Object.entries(resolvedVariant).forEach(([key, value]) => {
11
+ if (key === "transition")
12
+ return;
13
+ state.target[key] = value;
14
+ });
15
+ }
7
16
  function animationControls() {
8
17
  let hasMounted = false;
9
18
  const subscribers = /* @__PURE__ */ new Set();
@@ -56,6 +65,7 @@ function setValues(state, definition) {
56
65
  if (typeof definition === "string") {
57
66
  return setVariants(state, [definition]);
58
67
  } else {
68
+ setStateTarget(state, definition);
59
69
  setTarget(state.visualElement, definition);
60
70
  }
61
71
  }
@@ -65,6 +75,7 @@ function setVariants(state, variantLabels) {
65
75
  reversedLabels.forEach((key) => {
66
76
  const variant = visualElement.getVariant(key);
67
77
  variant && setTarget(visualElement, variant);
78
+ setStateTarget(state, variant);
68
79
  if (visualElement.variantChildren) {
69
80
  visualElement.variantChildren.forEach((child) => {
70
81
  setVariants(mountedStates.get(child.current), variantLabels);
@@ -3,6 +3,5 @@ export interface NodeGroup {
3
3
  add: (node: IProjectionNode) => void;
4
4
  remove: (node: IProjectionNode) => void;
5
5
  dirty: VoidFunction;
6
- didUpdate: VoidFunction;
7
6
  }
8
7
  export declare function nodeGroup(): NodeGroup;
@@ -21,11 +21,7 @@ function nodeGroup() {
21
21
  subscriptions.delete(node);
22
22
  }
23
23
  },
24
- dirty: dirtyAll,
25
- didUpdate: () => {
26
- var _a;
27
- (_a = nodes[0]) == null ? void 0 : _a.didUpdate();
28
- }
24
+ dirty: dirtyAll
29
25
  };
30
26
  }
31
27
  export {
@@ -82,7 +82,7 @@ export interface DragHandlers {
82
82
  */
83
83
  onDragTransitionEnd?: () => void;
84
84
  /**
85
- * If `dragConstraints` is set to a React ref, this callback will call with the measured drag constraints.
85
+ * If `dragConstraints` is set to a HTMLElement, this callback will call with the measured drag constraints.
86
86
  *
87
87
  * @public
88
88
  */
@@ -4,6 +4,7 @@ export declare class LayoutFeature extends Feature {
4
4
  constructor(state: MotionState);
5
5
  beforeUpdate(): void;
6
6
  update(): void;
7
+ didUpdate(): void;
7
8
  beforeMount(): void;
8
9
  mount(): void;
9
10
  beforeUnmount(): void;
@@ -11,8 +11,12 @@ class LayoutFeature extends Feature {
11
11
  this.state.willUpdate("beforeUpdate");
12
12
  }
13
13
  update() {
14
- var _a;
15
- (_a = this.state.visualElement.projection) == null ? void 0 : _a.root.didUpdate();
14
+ this.didUpdate();
15
+ }
16
+ didUpdate() {
17
+ var _a, _b;
18
+ if (this.state.options.layout || this.state.options.layoutId)
19
+ (_b = (_a = this.state.visualElement.projection) == null ? void 0 : _a.root) == null ? void 0 : _b.didUpdate();
16
20
  }
17
21
  beforeMount() {
18
22
  }
@@ -26,7 +30,7 @@ class LayoutFeature extends Feature {
26
30
  (_a = layoutGroup == null ? void 0 : layoutGroup.group) == null ? void 0 : _a.add(projection);
27
31
  }
28
32
  globalProjectionState.hasEverUpdated = true;
29
- projection == null ? void 0 : projection.root.didUpdate();
33
+ this.didUpdate();
30
34
  }
31
35
  }
32
36
  beforeUnmount() {
@@ -42,14 +46,11 @@ class LayoutFeature extends Feature {
42
46
  }
43
47
  }
44
48
  unmount() {
45
- var _a, _b;
46
49
  const layoutGroup = this.state.options.layoutGroup;
47
50
  const projection = this.state.visualElement.projection;
48
51
  if ((layoutGroup == null ? void 0 : layoutGroup.group) && projection)
49
52
  layoutGroup.group.remove(projection);
50
- if (this.state.options.layoutId || this.state.options.layout) {
51
- (_b = (_a = this.state.visualElement.projection) == null ? void 0 : _a.root) == null ? void 0 : _b.didUpdate();
52
- }
53
+ this.didUpdate();
53
54
  }
54
55
  }
55
56
  export {
@@ -4,6 +4,7 @@ import { getClosestProjectingNode } from "./utils.mjs";
4
4
  import { addScaleCorrector } from "../../external/.pnpm/framer-motion@11.16.6/external/framer-motion/dist/es/projection/styles/scale-correction.mjs";
5
5
  import { defaultScaleCorrector } from "./config.mjs";
6
6
  import { isHTMLElement } from "../gestures/drag/utils/is.mjs";
7
+ import { doneCallbacks } from "../../components/presence.mjs";
7
8
  class ProjectionFeature extends Feature {
8
9
  constructor(state) {
9
10
  super(state);
@@ -32,7 +33,21 @@ class ProjectionFeature extends Feature {
32
33
  // initialPromotionConfig
33
34
  layoutRoot: options.layoutRoot,
34
35
  layoutScroll: options.layoutScroll,
35
- crossfade: options.crossfade
36
+ crossfade: options.crossfade,
37
+ onExitComplete: () => {
38
+ var _a;
39
+ if (!((_a = this.state.visualElement.projection) == null ? void 0 : _a.isPresent)) {
40
+ const done = doneCallbacks.get(this.state.element);
41
+ this.state.isSafeToRemove = true;
42
+ if (done) {
43
+ done({
44
+ detail: {
45
+ isExit: true
46
+ }
47
+ }, true);
48
+ }
49
+ }
50
+ }
36
51
  });
37
52
  }
38
53
  update() {
@@ -60,9 +60,9 @@ function resolveStateAnimation(controlActiveState, animationOptions) {
60
60
  }
61
61
  function createAnimationFactories(prevTarget, animationOptions, controlDelay) {
62
62
  const factories = [];
63
- new Set(Object.keys(this.target)).forEach((key) => {
63
+ Object.keys(this.target).forEach((key) => {
64
64
  var _a;
65
- if (!hasChanged(this.visualElement.getValue(key), this.target[key]))
65
+ if (!hasChanged(prevTarget[key], this.target[key]))
66
66
  return;
67
67
  (_a = this.baseTarget)[key] ?? (_a[key] = style.get(this.element, key));
68
68
  const keyValue = this.target[key] === "none" ? transformResetValue[key] : this.target[key];
@@ -184,7 +184,8 @@ class MotionState {
184
184
  }
185
185
  willUpdate(label) {
186
186
  var _a;
187
- (_a = this.visualElement.projection) == null ? void 0 : _a.willUpdate();
187
+ if (this.options.layout || this.options.layoutId)
188
+ (_a = this.visualElement.projection) == null ? void 0 : _a.willUpdate();
188
189
  }
189
190
  }
190
191
  export {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "motion-v",
3
- "version": "0.7.1",
3
+ "version": "0.8.1",
4
4
  "description": "",
5
5
  "author": "",
6
6
  "license": "MIT",
@@ -17,7 +17,7 @@
17
17
  "sideEffects": false,
18
18
  "exports": {
19
19
  ".": {
20
- "types": "./dist/src/index.d.ts",
20
+ "types": "./dist/es/index.d.ts",
21
21
  "import": "./dist/es/index.mjs",
22
22
  "require": "./dist/cjs/index.js"
23
23
  },
@@ -34,12 +34,12 @@
34
34
  },
35
35
  "main": "./dist/cjs/index.js",
36
36
  "module": "./dist/es/index.mjs",
37
- "types": "./dist/src/index.d.ts",
37
+ "types": "./dist/es/index.d.ts",
38
38
  "typesVersions": {
39
39
  "*": {
40
40
  "*": [
41
41
  "./dist/*/index.d.ts",
42
- "./dist/src/index.d.ts"
42
+ "./dist/es/index.d.ts"
43
43
  ],
44
44
  "nuxt": [
45
45
  "./dist/nuxt/index.d.mts",
@@ -1,8 +0,0 @@
1
- import { AnimationPlaybackControls } from 'framer-motion';
2
- import { Ref, UnwrapRef } from 'vue';
3
- import { createScopedAnimate } from 'framer-motion/dom';
4
- type Scope = Ref<UnwrapRef<Element>> & {
5
- animations: AnimationPlaybackControls[];
6
- };
7
- export declare function useAnimate<T extends Element = any>(): [Scope, ReturnType<typeof createScopedAnimate>];
8
- export {};
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes