motion-v 2.0.0-beta.2 → 2.0.0-beta.3

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.
@@ -25,6 +25,7 @@ var AnimatePresence_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ *
25
25
  return (_ctx, _cache) => {
26
26
  return openBlock(), createBlock(resolveDynamicComponent(_ctx.mode === "wait" ? Transition : TransitionGroup), mergeProps(transitionProps.value, {
27
27
  appear: "",
28
+ css: false,
28
29
  onLeave: unref(exit),
29
30
  onEnter: unref(enter)
30
31
  }), {
@@ -22,10 +22,7 @@ function cleanVNodeProps(el, vnodeProps) {
22
22
  for (const key in vnodeProps) {
23
23
  const value = vnodeProps[key];
24
24
  if (typeof value !== "function" && key in Element.prototype) delete el[key];
25
- if (value != null && typeof value === "object") {
26
- el.removeAttribute(key);
27
- el.removeAttribute(key.replace(/[A-Z]/g, (m) => `-${m.toLowerCase()}`));
28
- }
25
+ if (value != null && typeof value === "object" && key !== "style") el.removeAttribute(key);
29
26
  }
30
27
  }
31
28
  function resolveTag(source) {
@@ -114,6 +111,7 @@ function createMotionDirective(featureBundle, defaultOptions) {
114
111
  created(el, binding, vnode) {
115
112
  const provides = resolveProvides(vnode, binding);
116
113
  const { options, parentState } = buildMotionOptions(mergeMotionProps(vnode, binding.value), provides, resolveTag(el));
114
+ console.log("options", options);
117
115
  const state = new MotionState(options, parentState);
118
116
  state.initVisualElement(renderer);
119
117
  mountedStates.set(el, state);
@@ -134,6 +132,7 @@ function createMotionDirective(featureBundle, defaultOptions) {
134
132
  updated(el, binding, vnode) {
135
133
  const state = mountedStates.get(el);
136
134
  if (!state) return;
135
+ cleanVNodeProps(el, vnode.props);
137
136
  const provides = resolveProvides(vnode, binding);
138
137
  const { options } = buildMotionOptions(mergeMotionProps(vnode, binding.value), provides, resolveTag(el));
139
138
  state.update(options);
@@ -2,3 +2,4 @@ export * from './framer-motion';
2
2
  export * from './motion-values';
3
3
  export * from './state';
4
4
  export * from './common';
5
+ export * from './instance';
@@ -0,0 +1,5 @@
1
+ import { Options } from './state';
2
+ declare module '@vue/runtime-dom' {
3
+ interface HTMLAttributes extends Omit<Options, 'motionConfig' | 'layoutGroup'> {
4
+ }
5
+ }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "motion-v",
3
3
  "type": "module",
4
- "version": "2.0.0-beta.2",
4
+ "version": "2.0.0-beta.3",
5
5
  "description": "",
6
6
  "author": "",
7
7
  "license": "MIT",