motion-v 0.13.0 → 0.13.1-alpha.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/cjs/index.js +10 -11
- package/dist/es/components/motion/Motion.vue.mjs +6 -6
- package/dist/es/components/reorder/Group.d.ts +14 -32
- package/dist/es/components/reorder/Group.vue.mjs +2 -1
- package/dist/es/components/reorder/Item.vue.mjs +2 -1
- package/dist/es/components/reorder/index.d.ts +1686 -7512
- package/dist/es/state/style.mjs +0 -3
- package/package.json +1 -1
package/dist/cjs/index.js
CHANGED
|
@@ -4537,15 +4537,12 @@ const SVG_STYLE_TO_ATTRIBUTES = {
|
|
|
4537
4537
|
cy: true,
|
|
4538
4538
|
r: true,
|
|
4539
4539
|
d: true,
|
|
4540
|
-
x: true,
|
|
4541
|
-
y: true,
|
|
4542
4540
|
x1: true,
|
|
4543
4541
|
y1: true,
|
|
4544
4542
|
x2: true,
|
|
4545
4543
|
y2: true,
|
|
4546
4544
|
points: true,
|
|
4547
4545
|
pathLength: true,
|
|
4548
|
-
transform: true,
|
|
4549
4546
|
viewBox: true,
|
|
4550
4547
|
width: true,
|
|
4551
4548
|
height: true,
|
|
@@ -7952,9 +7949,12 @@ const _sfc_main$6 = /* @__PURE__ */ vue.defineComponent({
|
|
|
7952
7949
|
...isSVG ? {} : state2.visualElement.latestValues
|
|
7953
7950
|
};
|
|
7954
7951
|
if (isSVG) {
|
|
7955
|
-
const { attributes, style: style2 } = convertSvgStyleToAttributes(
|
|
7952
|
+
const { attributes, style: style2 } = convertSvgStyleToAttributes({
|
|
7953
|
+
...state2.isMounted() ? state2.target : state2.baseTarget,
|
|
7954
|
+
...styleProps
|
|
7955
|
+
});
|
|
7956
7956
|
Object.assign(attrsProps, attributes);
|
|
7957
|
-
|
|
7957
|
+
styleProps = style2;
|
|
7958
7958
|
}
|
|
7959
7959
|
if (props.drag && props.dragListener !== false) {
|
|
7960
7960
|
Object.assign(styleProps, {
|
|
@@ -7964,10 +7964,7 @@ const _sfc_main$6 = /* @__PURE__ */ vue.defineComponent({
|
|
|
7964
7964
|
touchAction: props.drag === true ? "none" : `pan-${props.drag === "x" ? "y" : "x"}`
|
|
7965
7965
|
});
|
|
7966
7966
|
}
|
|
7967
|
-
styleProps = createStyles(
|
|
7968
|
-
...styleProps,
|
|
7969
|
-
...props.style
|
|
7970
|
-
});
|
|
7967
|
+
styleProps = createStyles(styleProps);
|
|
7971
7968
|
attrsProps.style = styleProps;
|
|
7972
7969
|
return attrsProps;
|
|
7973
7970
|
}
|
|
@@ -8396,9 +8393,10 @@ const _sfc_main$3 = /* @__PURE__ */ vue.defineComponent({
|
|
|
8396
8393
|
});
|
|
8397
8394
|
const attrs = vue.useAttrs();
|
|
8398
8395
|
function bindProps() {
|
|
8396
|
+
const { axis: axis2, values, "onUpdate:values": onUpdateValues, ...rest } = props;
|
|
8399
8397
|
return {
|
|
8400
8398
|
...attrs,
|
|
8401
|
-
...
|
|
8399
|
+
...rest
|
|
8402
8400
|
};
|
|
8403
8401
|
}
|
|
8404
8402
|
return (_ctx, _cache) => {
|
|
@@ -8717,9 +8715,10 @@ const _sfc_main$2 = /* @__PURE__ */ vue.defineComponent({
|
|
|
8717
8715
|
const { axis, registerItem, updateOrder } = context || {};
|
|
8718
8716
|
const attrs = vue.useAttrs();
|
|
8719
8717
|
function bindProps() {
|
|
8718
|
+
const { value, ...rest } = props;
|
|
8720
8719
|
return {
|
|
8721
8720
|
...attrs,
|
|
8722
|
-
...
|
|
8721
|
+
...rest,
|
|
8723
8722
|
style: {
|
|
8724
8723
|
...style2.value,
|
|
8725
8724
|
x: point2.x,
|
|
@@ -190,9 +190,12 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
190
190
|
...isSVG ? {} : state.visualElement.latestValues
|
|
191
191
|
};
|
|
192
192
|
if (isSVG) {
|
|
193
|
-
const { attributes, style } = convertSvgStyleToAttributes(
|
|
193
|
+
const { attributes, style } = convertSvgStyleToAttributes({
|
|
194
|
+
...state.isMounted() ? state.target : state.baseTarget,
|
|
195
|
+
...styleProps
|
|
196
|
+
});
|
|
194
197
|
Object.assign(attrsProps, attributes);
|
|
195
|
-
|
|
198
|
+
styleProps = style;
|
|
196
199
|
}
|
|
197
200
|
if (props.drag && props.dragListener !== false) {
|
|
198
201
|
Object.assign(styleProps, {
|
|
@@ -202,10 +205,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
202
205
|
touchAction: props.drag === true ? "none" : `pan-${props.drag === "x" ? "y" : "x"}`
|
|
203
206
|
});
|
|
204
207
|
}
|
|
205
|
-
styleProps = createStyles(
|
|
206
|
-
...styleProps,
|
|
207
|
-
...props.style
|
|
208
|
-
});
|
|
208
|
+
styleProps = createStyles(styleProps);
|
|
209
209
|
attrsProps.style = styleProps;
|
|
210
210
|
return attrsProps;
|
|
211
211
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { MotionProps } from '../motion';
|
|
2
|
-
import {
|
|
3
|
-
export interface GroupProps<T extends
|
|
2
|
+
import { AsTag } from '../../types';
|
|
3
|
+
export interface GroupProps<T extends AsTag, K, V> extends MotionProps<T, K> {
|
|
4
4
|
/**
|
|
5
5
|
* The axis to reorder along. By default, items will be draggable on this axis.
|
|
6
6
|
* To make draggable on both axes, set `<Reorder.Item drag />`
|
|
@@ -34,38 +34,20 @@ export interface GroupProps<T extends ElementType, K = unknown, V = unknown> ext
|
|
|
34
34
|
*/
|
|
35
35
|
'values': V[];
|
|
36
36
|
}
|
|
37
|
-
declare const _default:
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
}>>>, {
|
|
44
|
-
as: keyof import('vue').IntrinsicElementAttributes;
|
|
45
|
-
axis: "x" | "y";
|
|
46
|
-
}, {}>, {
|
|
47
|
-
default?(_: {}): any;
|
|
48
|
-
}>;
|
|
49
|
-
export default _default;
|
|
50
|
-
type __VLS_WithDefaults<P, D> = {
|
|
51
|
-
[K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_PrettifyLocal<P[K] & {
|
|
52
|
-
default: D[K];
|
|
53
|
-
}> : P[K];
|
|
54
|
-
};
|
|
55
|
-
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
56
|
-
type __VLS_TypePropsToOption<T> = {
|
|
57
|
-
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
58
|
-
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
59
|
-
} : {
|
|
60
|
-
type: import('vue').PropType<T[K]>;
|
|
61
|
-
required: true;
|
|
62
|
-
};
|
|
63
|
-
};
|
|
64
|
-
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
65
|
-
new (): {
|
|
66
|
-
$slots: S;
|
|
37
|
+
declare const _default: <T, K, V>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
38
|
+
props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{} & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & Readonly<import('vue').ExtractPropTypes<{}>>, never>, never> & GroupProps<AsTag, K, V>> & import('vue').PublicProps;
|
|
39
|
+
expose(exposed: import('vue').ShallowUnwrapRef<{}>): void;
|
|
40
|
+
attrs: any;
|
|
41
|
+
slots: {
|
|
42
|
+
default?(_: {}): any;
|
|
67
43
|
};
|
|
44
|
+
emit: {};
|
|
45
|
+
}>) => import('vue').VNode<import('vue').RendererNode, import('vue').RendererElement, {
|
|
46
|
+
[key: string]: any;
|
|
47
|
+
}> & {
|
|
48
|
+
__ctx?: Awaited<typeof __VLS_setup>;
|
|
68
49
|
};
|
|
50
|
+
export default _default;
|
|
69
51
|
type __VLS_PrettifyLocal<T> = {
|
|
70
52
|
[K in keyof T]: T[K];
|
|
71
53
|
} & {};
|
|
@@ -119,9 +119,10 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
119
119
|
});
|
|
120
120
|
const attrs = useAttrs();
|
|
121
121
|
function bindProps() {
|
|
122
|
+
const { axis: axis2, values, "onUpdate:values": onUpdateValues, ...rest } = props;
|
|
122
123
|
return {
|
|
123
124
|
...attrs,
|
|
124
|
-
...
|
|
125
|
+
...rest
|
|
125
126
|
};
|
|
126
127
|
}
|
|
127
128
|
return (_ctx, _cache) => {
|
|
@@ -96,9 +96,10 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
96
96
|
const { axis, registerItem, updateOrder } = context || {};
|
|
97
97
|
const attrs = useAttrs();
|
|
98
98
|
function bindProps() {
|
|
99
|
+
const { value, ...rest } = props;
|
|
99
100
|
return {
|
|
100
101
|
...attrs,
|
|
101
|
-
...
|
|
102
|
+
...rest,
|
|
102
103
|
style: {
|
|
103
104
|
...style.value,
|
|
104
105
|
x: point.x,
|