@maas/vue-equipment 0.24.7 → 0.25.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/nuxt/module.json +1 -1
- package/dist/plugins/MagicCommand/demo/DefaultView.vue.d.ts +2 -2
- package/dist/plugins/MagicCommand/demo/DemoItem.vue.d.ts +7 -7
- package/dist/plugins/MagicCommand/demo/ProjectView.vue.d.ts +2 -2
- package/dist/plugins/MagicCommand/src/components/MagicCommandDrawer.vue.d.ts +7 -7
- package/dist/plugins/MagicCommand/src/components/MagicCommandItem.vue.d.ts +11 -11
- package/dist/plugins/MagicCommand/src/components/MagicCommandModal.vue.d.ts +7 -7
- package/dist/plugins/MagicCommand/src/components/MagicCommandProvider.vue.d.ts +11 -11
- package/dist/plugins/MagicCommand/src/components/MagicCommandView.vue.d.ts +11 -11
- package/dist/plugins/MagicCookie/src/components/MagicCookie.vue.d.ts +11 -11
- package/dist/plugins/MagicDrawer/src/components/MagicDrawer.vue +28 -4
- package/dist/plugins/MagicDrawer/src/components/MagicDrawer.vue.d.ts +11 -11
- package/dist/plugins/MagicDrawer/src/composables/private/useDrawerDrag.d.ts +2 -5
- package/dist/plugins/MagicDrawer/src/composables/private/useDrawerDrag.mjs +49 -71
- package/dist/plugins/MagicDrawer/src/composables/private/useDrawerSnap.d.ts +39 -0
- package/dist/plugins/MagicDrawer/src/composables/private/useDrawerSnap.mjs +9 -6
- package/dist/plugins/MagicDrawer/src/composables/private/useDrawerState.d.ts +109 -0
- package/dist/plugins/MagicDrawer/src/composables/private/useDrawerState.mjs +50 -0
- package/dist/plugins/MagicDrawer/src/composables/private/useDrawerUtils.d.ts +10 -0
- package/dist/plugins/MagicDrawer/src/composables/private/useDrawerUtils.mjs +32 -0
- package/dist/plugins/MagicDrawer/src/composables/private/useDrawerWheel.d.ts +13 -0
- package/dist/plugins/MagicDrawer/src/composables/private/useDrawerWheel.mjs +98 -0
- package/dist/plugins/MagicDrawer/src/composables/useDrawerApi.d.ts +1 -1
- package/dist/plugins/MagicDrawer/src/composables/useDrawerApi.mjs +3 -0
- package/dist/plugins/MagicDrawer/src/types/index.d.ts +21 -0
- package/dist/plugins/MagicDrawer/src/utils/defaultOptions.mjs +2 -1
- package/dist/plugins/MagicMarquee/src/components/MagicMarquee.vue.d.ts +11 -11
- package/dist/plugins/MagicModal/src/components/MagicModal.vue.d.ts +11 -11
- package/dist/plugins/MagicNoise/src/components/MagicNoise.vue.d.ts +11 -11
- package/dist/plugins/MagicPlayer/src/components/MagicAudioPlayer.vue.d.ts +11 -11
- package/dist/plugins/MagicPlayer/src/components/MagicAudioPlayerControls.vue.d.ts +7 -7
- package/dist/plugins/MagicPlayer/src/components/MagicPlayer.vue.d.ts +13 -13
- package/dist/plugins/MagicPlayer/src/components/MagicPlayerControls.vue.d.ts +7 -7
- package/dist/plugins/MagicPlayer/src/components/MagicPlayerDisplayTime.vue.d.ts +12 -12
- package/dist/plugins/MagicPlayer/src/components/MagicPlayerMuxPopover.vue.d.ts +2 -2
- package/dist/plugins/MagicPlayer/src/components/MagicPlayerOverlay.vue.d.ts +7 -7
- package/dist/plugins/MagicPlayer/src/components/MagicPlayerPoster.vue.d.ts +7 -7
- package/dist/plugins/MagicPlayer/src/components/MagicPlayerTimeline.vue.d.ts +2 -2
- package/dist/plugins/MagicScroll/src/components/MagicScrollCollision.vue.d.ts +7 -7
- package/dist/plugins/MagicScroll/src/components/MagicScrollMotion.vue.d.ts +11 -11
- package/dist/plugins/MagicScroll/src/components/MagicScrollProvider.vue.d.ts +11 -11
- package/dist/plugins/MagicScroll/src/components/MagicScrollScene.vue.d.ts +11 -11
- package/dist/plugins/MagicScroll/src/components/MagicScrollTransform.vue.d.ts +12 -12
- package/dist/plugins/MagicToast/demo/DemoToast.vue.d.ts +3 -3
- package/dist/plugins/MagicToast/src/components/MagicToast.vue.d.ts +2 -2
- package/dist/plugins/MagicToast/src/components/MagicToastComponent.vue.d.ts +8 -8
- package/package.json +6 -2
package/dist/nuxt/module.json
CHANGED
|
@@ -2,10 +2,10 @@ interface Props {
|
|
|
2
2
|
hasDynamicItem?: boolean;
|
|
3
3
|
isModal?: boolean;
|
|
4
4
|
}
|
|
5
|
-
declare const _default: import("vue").DefineComponent<
|
|
5
|
+
declare const _default: import("vue").DefineComponent<__VLS_TypePropsToOption<Props>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToOption<Props>>>, {}, {}>;
|
|
6
6
|
export default _default;
|
|
7
7
|
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
8
|
-
type
|
|
8
|
+
type __VLS_TypePropsToOption<T> = {
|
|
9
9
|
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
10
10
|
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
11
11
|
} : {
|
|
@@ -1,12 +1,17 @@
|
|
|
1
1
|
interface Props {
|
|
2
2
|
isActive: boolean;
|
|
3
3
|
}
|
|
4
|
-
declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<
|
|
4
|
+
declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__VLS_TypePropsToOption<Props>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToOption<Props>>>, {}, {}>, {
|
|
5
5
|
default?(_: {}): any;
|
|
6
6
|
}>;
|
|
7
7
|
export default _default;
|
|
8
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
9
|
+
new (): {
|
|
10
|
+
$slots: S;
|
|
11
|
+
};
|
|
12
|
+
};
|
|
8
13
|
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
9
|
-
type
|
|
14
|
+
type __VLS_TypePropsToOption<T> = {
|
|
10
15
|
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
11
16
|
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
12
17
|
} : {
|
|
@@ -14,8 +19,3 @@ type __VLS_TypePropsToRuntimeProps<T> = {
|
|
|
14
19
|
required: true;
|
|
15
20
|
};
|
|
16
21
|
};
|
|
17
|
-
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
18
|
-
new (): {
|
|
19
|
-
$slots: S;
|
|
20
|
-
};
|
|
21
|
-
};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
interface Props {
|
|
2
2
|
isModal?: boolean;
|
|
3
3
|
}
|
|
4
|
-
declare const _default: import("vue").DefineComponent<
|
|
4
|
+
declare const _default: import("vue").DefineComponent<__VLS_TypePropsToOption<Props>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToOption<Props>>>, {}, {}>;
|
|
5
5
|
export default _default;
|
|
6
6
|
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
7
|
-
type
|
|
7
|
+
type __VLS_TypePropsToOption<T> = {
|
|
8
8
|
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
9
9
|
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
10
10
|
} : {
|
|
@@ -4,12 +4,17 @@ interface MagicCommandProps {
|
|
|
4
4
|
class?: MaybeRef<string>;
|
|
5
5
|
options?: CommandDrawerOptions;
|
|
6
6
|
}
|
|
7
|
-
declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<
|
|
7
|
+
declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__VLS_TypePropsToOption<MagicCommandProps>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToOption<MagicCommandProps>>>, {}, {}>, {
|
|
8
8
|
default?(_: {}): any;
|
|
9
9
|
}>;
|
|
10
10
|
export default _default;
|
|
11
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
12
|
+
new (): {
|
|
13
|
+
$slots: S;
|
|
14
|
+
};
|
|
15
|
+
};
|
|
11
16
|
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
12
|
-
type
|
|
17
|
+
type __VLS_TypePropsToOption<T> = {
|
|
13
18
|
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
14
19
|
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
15
20
|
} : {
|
|
@@ -17,8 +22,3 @@ type __VLS_TypePropsToRuntimeProps<T> = {
|
|
|
17
22
|
required: true;
|
|
18
23
|
};
|
|
19
24
|
};
|
|
20
|
-
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
21
|
-
new (): {
|
|
22
|
-
$slots: S;
|
|
23
|
-
};
|
|
24
|
-
};
|
|
@@ -5,10 +5,10 @@ interface Props {
|
|
|
5
5
|
listener?: ('click' | 'hover')[];
|
|
6
6
|
keys?: string[];
|
|
7
7
|
}
|
|
8
|
-
declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__VLS_WithDefaults<
|
|
8
|
+
declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToOption<Props>, {
|
|
9
9
|
listener: () => string[];
|
|
10
10
|
keys: () => string[];
|
|
11
|
-
}>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<
|
|
11
|
+
}>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<Props>, {
|
|
12
12
|
listener: () => string[];
|
|
13
13
|
keys: () => string[];
|
|
14
14
|
}>>>, {
|
|
@@ -20,15 +20,6 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
|
|
|
20
20
|
}): any;
|
|
21
21
|
}>;
|
|
22
22
|
export default _default;
|
|
23
|
-
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
24
|
-
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
25
|
-
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
26
|
-
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
27
|
-
} : {
|
|
28
|
-
type: import('vue').PropType<T[K]>;
|
|
29
|
-
required: true;
|
|
30
|
-
};
|
|
31
|
-
};
|
|
32
23
|
type __VLS_WithDefaults<P, D> = {
|
|
33
24
|
[K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
|
|
34
25
|
default: D[K];
|
|
@@ -42,3 +33,12 @@ type __VLS_WithTemplateSlots<T, S> = T & {
|
|
|
42
33
|
$slots: S;
|
|
43
34
|
};
|
|
44
35
|
};
|
|
36
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
37
|
+
type __VLS_TypePropsToOption<T> = {
|
|
38
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
39
|
+
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
40
|
+
} : {
|
|
41
|
+
type: import('vue').PropType<T[K]>;
|
|
42
|
+
required: true;
|
|
43
|
+
};
|
|
44
|
+
};
|
|
@@ -4,12 +4,17 @@ interface MagicCommandProps {
|
|
|
4
4
|
class?: MaybeRef<string>;
|
|
5
5
|
options?: CommandModalOptions;
|
|
6
6
|
}
|
|
7
|
-
declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<
|
|
7
|
+
declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__VLS_TypePropsToOption<MagicCommandProps>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToOption<MagicCommandProps>>>, {}, {}>, {
|
|
8
8
|
default?(_: {}): any;
|
|
9
9
|
}>;
|
|
10
10
|
export default _default;
|
|
11
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
12
|
+
new (): {
|
|
13
|
+
$slots: S;
|
|
14
|
+
};
|
|
15
|
+
};
|
|
11
16
|
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
12
|
-
type
|
|
17
|
+
type __VLS_TypePropsToOption<T> = {
|
|
13
18
|
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
14
19
|
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
15
20
|
} : {
|
|
@@ -17,8 +22,3 @@ type __VLS_TypePropsToRuntimeProps<T> = {
|
|
|
17
22
|
required: true;
|
|
18
23
|
};
|
|
19
24
|
};
|
|
20
|
-
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
21
|
-
new (): {
|
|
22
|
-
$slots: S;
|
|
23
|
-
};
|
|
24
|
-
};
|
|
@@ -6,9 +6,9 @@ interface MagicCommandProps {
|
|
|
6
6
|
id: MaybeRef<string>;
|
|
7
7
|
options?: CommandOptions;
|
|
8
8
|
}
|
|
9
|
-
declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__VLS_WithDefaults<
|
|
9
|
+
declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToOption<MagicCommandProps>, {
|
|
10
10
|
options: () => CommandOptions;
|
|
11
|
-
}>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<
|
|
11
|
+
}>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<MagicCommandProps>, {
|
|
12
12
|
options: () => CommandOptions;
|
|
13
13
|
}>>>, {
|
|
14
14
|
options: CommandOptions;
|
|
@@ -16,15 +16,6 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
|
|
|
16
16
|
default?(_: {}): any;
|
|
17
17
|
}>;
|
|
18
18
|
export default _default;
|
|
19
|
-
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
20
|
-
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
21
|
-
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
22
|
-
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
23
|
-
} : {
|
|
24
|
-
type: import('vue').PropType<T[K]>;
|
|
25
|
-
required: true;
|
|
26
|
-
};
|
|
27
|
-
};
|
|
28
19
|
type __VLS_WithDefaults<P, D> = {
|
|
29
20
|
[K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
|
|
30
21
|
default: D[K];
|
|
@@ -38,3 +29,12 @@ type __VLS_WithTemplateSlots<T, S> = T & {
|
|
|
38
29
|
$slots: S;
|
|
39
30
|
};
|
|
40
31
|
};
|
|
32
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
33
|
+
type __VLS_TypePropsToOption<T> = {
|
|
34
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
35
|
+
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
36
|
+
} : {
|
|
37
|
+
type: import('vue').PropType<T[K]>;
|
|
38
|
+
required: true;
|
|
39
|
+
};
|
|
40
|
+
};
|
|
@@ -2,9 +2,9 @@ interface Props {
|
|
|
2
2
|
id?: string;
|
|
3
3
|
default?: boolean;
|
|
4
4
|
}
|
|
5
|
-
declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__VLS_WithDefaults<
|
|
5
|
+
declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToOption<Props>, {
|
|
6
6
|
default: boolean;
|
|
7
|
-
}>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<
|
|
7
|
+
}>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<Props>, {
|
|
8
8
|
default: boolean;
|
|
9
9
|
}>>>, {
|
|
10
10
|
default: boolean;
|
|
@@ -12,15 +12,6 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
|
|
|
12
12
|
default?(_: {}): any;
|
|
13
13
|
}>;
|
|
14
14
|
export default _default;
|
|
15
|
-
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
16
|
-
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
17
|
-
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
18
|
-
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
19
|
-
} : {
|
|
20
|
-
type: import('vue').PropType<T[K]>;
|
|
21
|
-
required: true;
|
|
22
|
-
};
|
|
23
|
-
};
|
|
24
15
|
type __VLS_WithDefaults<P, D> = {
|
|
25
16
|
[K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
|
|
26
17
|
default: D[K];
|
|
@@ -34,3 +25,12 @@ type __VLS_WithTemplateSlots<T, S> = T & {
|
|
|
34
25
|
$slots: S;
|
|
35
26
|
};
|
|
36
27
|
};
|
|
28
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
29
|
+
type __VLS_TypePropsToOption<T> = {
|
|
30
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
31
|
+
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
32
|
+
} : {
|
|
33
|
+
type: import('vue').PropType<T[K]>;
|
|
34
|
+
required: true;
|
|
35
|
+
};
|
|
36
|
+
};
|
|
@@ -3,9 +3,9 @@ type Props = {
|
|
|
3
3
|
cookies: CookieRecord[];
|
|
4
4
|
maxAge?: number;
|
|
5
5
|
};
|
|
6
|
-
declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__VLS_WithDefaults<
|
|
6
|
+
declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToOption<Props>, {
|
|
7
7
|
maxAge: number;
|
|
8
|
-
}>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<
|
|
8
|
+
}>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<Props>, {
|
|
9
9
|
maxAge: number;
|
|
10
10
|
}>>>, {
|
|
11
11
|
maxAge: number;
|
|
@@ -16,15 +16,6 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
|
|
|
16
16
|
actions?(_: {}): any;
|
|
17
17
|
}>;
|
|
18
18
|
export default _default;
|
|
19
|
-
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
20
|
-
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
21
|
-
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
22
|
-
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
23
|
-
} : {
|
|
24
|
-
type: import('vue').PropType<T[K]>;
|
|
25
|
-
required: true;
|
|
26
|
-
};
|
|
27
|
-
};
|
|
28
19
|
type __VLS_WithDefaults<P, D> = {
|
|
29
20
|
[K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
|
|
30
21
|
default: D[K];
|
|
@@ -38,3 +29,12 @@ type __VLS_WithTemplateSlots<T, S> = T & {
|
|
|
38
29
|
$slots: S;
|
|
39
30
|
};
|
|
40
31
|
};
|
|
32
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
33
|
+
type __VLS_TypePropsToOption<T> = {
|
|
34
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
35
|
+
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
36
|
+
} : {
|
|
37
|
+
type: import('vue').PropType<T[K]>;
|
|
38
|
+
required: true;
|
|
39
|
+
};
|
|
40
|
+
};
|
|
@@ -12,7 +12,11 @@
|
|
|
12
12
|
:class="[
|
|
13
13
|
toValue(props.class),
|
|
14
14
|
`-${mappedOptions.position}`,
|
|
15
|
-
{
|
|
15
|
+
{
|
|
16
|
+
'-dragging': dragging,
|
|
17
|
+
'-wheeling': wheeling,
|
|
18
|
+
'-disabled': disabled,
|
|
19
|
+
},
|
|
16
20
|
]"
|
|
17
21
|
aria-modal="true"
|
|
18
22
|
>
|
|
@@ -68,6 +72,7 @@
|
|
|
68
72
|
<script setup lang="ts">
|
|
69
73
|
import {
|
|
70
74
|
ref,
|
|
75
|
+
toRefs,
|
|
71
76
|
watch,
|
|
72
77
|
computed,
|
|
73
78
|
nextTick,
|
|
@@ -84,6 +89,8 @@ import { useDrawerApi } from './../composables/useDrawerApi'
|
|
|
84
89
|
import { useDrawerCallback } from '../composables/private/useDrawerCallback'
|
|
85
90
|
import { useDrawerProgress } from '../composables/private/useDrawerProgress'
|
|
86
91
|
import { useDrawerDrag } from '../composables/private/useDrawerDrag'
|
|
92
|
+
import { useDrawerWheel } from '../composables/private/useDrawerWheel'
|
|
93
|
+
import { useDrawerState } from '../composables/private/useDrawerState'
|
|
87
94
|
|
|
88
95
|
import type { DrawerOptions } from './../types/index'
|
|
89
96
|
|
|
@@ -147,7 +154,7 @@ const {
|
|
|
147
154
|
removeScrollLockPadding,
|
|
148
155
|
} = drawerApi
|
|
149
156
|
|
|
150
|
-
const { onPointerdown, onClick,
|
|
157
|
+
const { onPointerdown, onClick, style, hasDragged } = useDrawerDrag({
|
|
151
158
|
id: props.id,
|
|
152
159
|
isActive,
|
|
153
160
|
elRef,
|
|
@@ -160,6 +167,16 @@ const { onPointerdown, onClick, dragging, hasDragged, style } = useDrawerDrag({
|
|
|
160
167
|
close,
|
|
161
168
|
})
|
|
162
169
|
|
|
170
|
+
const { initializeWheelListener, destroyWheelListener } = useDrawerWheel({
|
|
171
|
+
id: props.id,
|
|
172
|
+
elRef,
|
|
173
|
+
drawerRef,
|
|
174
|
+
position,
|
|
175
|
+
})
|
|
176
|
+
|
|
177
|
+
const { findState } = useDrawerState(props.id)
|
|
178
|
+
const { dragging, wheeling } = findState()
|
|
179
|
+
|
|
163
180
|
// Split isActive into two values to animate drawer smoothly
|
|
164
181
|
const innerActive = ref(false)
|
|
165
182
|
const wrapperActive = ref(false)
|
|
@@ -248,10 +265,17 @@ async function onOpen() {
|
|
|
248
265
|
wrapperActive.value = true
|
|
249
266
|
await nextTick()
|
|
250
267
|
innerActive.value = true
|
|
268
|
+
await nextTick()
|
|
269
|
+
if (mappedOptions.mousewheel) {
|
|
270
|
+
initializeWheelListener()
|
|
271
|
+
}
|
|
251
272
|
}
|
|
252
273
|
|
|
253
274
|
function onClose() {
|
|
254
275
|
innerActive.value = false
|
|
276
|
+
if (mappedOptions.mousewheel) {
|
|
277
|
+
destroyWheelListener()
|
|
278
|
+
}
|
|
255
279
|
}
|
|
256
280
|
|
|
257
281
|
// Public functions
|
|
@@ -299,7 +323,7 @@ watch(isActive, async (value) => {
|
|
|
299
323
|
}
|
|
300
324
|
})
|
|
301
325
|
|
|
302
|
-
// Save overshoot, as soon as drawer apepars in
|
|
326
|
+
// Save overshoot, as soon as drawer apepars in the DOM
|
|
303
327
|
watch(innerActive, () => {
|
|
304
328
|
saveOvershoot()
|
|
305
329
|
})
|
|
@@ -318,5 +342,5 @@ onBeforeUnmount(() => {
|
|
|
318
342
|
</script>
|
|
319
343
|
|
|
320
344
|
<style>
|
|
321
|
-
:root{--magic-drawer-height:75svh;--magic-drawer-width:100%;--magic-drawer-z-index:999;--magic-drawer-justify-content:center;--magic-drawer-align-items:flex-end;--magic-drawer-backdrop-color:rgba(0,0,0,.5);--magic-drawer-backdrop-filter:unset;--magic-drawer-content-overflow-x:hidden;--magic-drawer-content-overflow-y:hidden;--magic-drawer-enter-animation:slide-btt-in 300ms ease;--magic-drawer-leave-animation:slide-btt-out 300ms ease;--magic-drawer-drag-overshoot:4rem;--magic-drawer-padding:0px}.magic-drawer{--magic-drawer-drag-overshoot-x:0px;--magic-drawer-drag-overshoot-y:0px;align-items:var(--magic-drawer-align-items);background:transparent;border:none;color:inherit;display:flex;height:100%;inset:0;justify-content:var(--magic-drawer-justify-content);padding:0;pointer-events:none;position:fixed;width:100%;z-index:var(--magic-drawer-z-index)}.magic-drawer.-bottom{--magic-drawer-drag-overshoot-y:var(--magic-drawer-drag-overshoot);--magic-drawer-padding:0 0 var(--magic-drawer-drag-overshoot-y) 0}.magic-drawer.-bottom>.magic-drawer__wrapper{height:calc(var(--magic-drawer-height, 0px) + var(--magic-drawer-drag-overshoot, 0px))}.magic-drawer.-top{--magic-drawer-enter-animation:slide-ttb-in 300ms ease;--magic-drawer-leave-animation:slide-ttb-out 300ms ease;--magic-drawer-align-items:flex-start;--magic-drawer-drag-overshoot-y:calc(var(--magic-drawer-drag-overshoot)*-1);--magic-drawer-padding:var(--magic-drawer-drag-overshoot-y) 0 0 0}.magic-drawer.-top>.magic-drawer__wrapper{height:calc(var(--magic-drawer-height, 0px) + var(--magic-drawer-drag-overshoot, 0px))}.magic-drawer.-right{--magic-drawer-enter-animation:slide-rtl-in 300ms ease;--magic-drawer-leave-animation:slide-rtl-out 300ms ease;--magic-drawer-align-items:center;--magic-drawer-justify-content:flex-end;--magic-drawer-drag-overshoot-x:var(--magic-drawer-drag-overshoot);--magic-drawer-padding:0 var(--magic-drawer-drag-overshoot-x) 0 0}.magic-drawer.-right>.magic-drawer__wrapper{width:calc(var(--magic-drawer-width, 0px) + var(--magic-drawer-drag-overshoot, 0px))}.magic-drawer.-left{--magic-drawer-enter-animation:slide-ltr-in 300ms ease;--magic-drawer-leave-animation:slide-ltr-out 300ms ease;--magic-drawer-align-items:center;--magic-drawer-justify-content:flex-start;--magic-drawer-drag-overshoot-x:calc(var(--magic-drawer-drag-overshoot)*-1);--magic-drawer-padding:0 0 0 var(--magic-drawer-drag-overshoot-x)}.magic-drawer.-left>.magic-drawer__wrapper{width:calc(var(--magic-drawer-width, 0px) + var(--magic-drawer-drag-overshoot, 0px))}.magic-drawer__wrapper{height:var(--magic-drawer-height);pointer-events:none;transform:translate(var(--magic-drawer-drag-overshoot-x),var(--magic-drawer-drag-overshoot-y));width:var(--magic-drawer-width)}.magic-drawer__content{height:100%;max-height:100%;position:relative;width:100%}.magic-drawer__drag{-webkit-overflow-scrolling:touch;align-items:var(--magic-drawer-align-items);cursor:grab;display:flex;height:100%;justify-content:var(--magic-drawer-justify-content);overflow-x:var(--magic-drawer-content-overflow-x);overflow-y:var(--magic-drawer-content-overflow-y);pointer-events:auto;position:relative;scroll-behavior:smooth;width:100%}dialog.magic-drawer__drag{background:transparent;border:0;margin:0;outline:0;padding:0}dialog.magic-drawer__drag::backdrop{background-color:transparent}.magic-drawer.-dragging .magic-drawer__drag{cursor:grabbing;-webkit-user-select:none;-moz-user-select:none;user-select:none}.magic-drawer.-disabled .magic-drawer__drag{cursor:auto}.magic-drawer__drag>*{padding:var(--magic-drawer-padding)}.magic-drawer__overlay{inset:0;position:absolute;z-index:9999}.magic-drawer__backdrop{-webkit-backdrop-filter:var(--magic-drawer-backdrop-filter);backdrop-filter:var(--magic-drawer-backdrop-filter);background-color:var(--magic-drawer-backdrop-color);bottom:0;height:100%;left:0;pointer-events:auto;position:fixed;right:0;top:0;width:100%;z-index:-1}.magic-drawer.-disabled .magic-drawer__backdrop{pointer-events:none}.magic-drawer--content-enter-active{animation:var(--magic-drawer-enter-animation)}.magic-drawer--content-leave-active{animation:var(--magic-drawer-leave-animation)}.magic-drawer--backdrop-enter-active{animation:fade-in .3s ease}.magic-drawer--backdrop-leave-active{animation:fade-out .3s ease}
|
|
345
|
+
:root{--magic-drawer-height:75svh;--magic-drawer-width:100%;--magic-drawer-z-index:999;--magic-drawer-justify-content:center;--magic-drawer-align-items:flex-end;--magic-drawer-backdrop-color:rgba(0,0,0,.5);--magic-drawer-backdrop-filter:unset;--magic-drawer-content-overflow-x:hidden;--magic-drawer-content-overflow-y:hidden;--magic-drawer-enter-animation:slide-btt-in 300ms ease;--magic-drawer-leave-animation:slide-btt-out 300ms ease;--magic-drawer-drag-overshoot:4rem;--magic-drawer-padding:0px}.magic-drawer{--magic-drawer-drag-overshoot-x:0px;--magic-drawer-drag-overshoot-y:0px;align-items:var(--magic-drawer-align-items);background:transparent;border:none;color:inherit;display:flex;height:100%;inset:0;justify-content:var(--magic-drawer-justify-content);padding:0;pointer-events:none;position:fixed;width:100%;z-index:var(--magic-drawer-z-index)}.magic-drawer.-bottom{--magic-drawer-drag-overshoot-y:var(--magic-drawer-drag-overshoot);--magic-drawer-padding:0 0 var(--magic-drawer-drag-overshoot-y) 0}.magic-drawer.-bottom>.magic-drawer__wrapper{height:calc(var(--magic-drawer-height, 0px) + var(--magic-drawer-drag-overshoot, 0px))}.magic-drawer.-top{--magic-drawer-enter-animation:slide-ttb-in 300ms ease;--magic-drawer-leave-animation:slide-ttb-out 300ms ease;--magic-drawer-align-items:flex-start;--magic-drawer-drag-overshoot-y:calc(var(--magic-drawer-drag-overshoot)*-1);--magic-drawer-padding:var(--magic-drawer-drag-overshoot-y) 0 0 0}.magic-drawer.-top>.magic-drawer__wrapper{height:calc(var(--magic-drawer-height, 0px) + var(--magic-drawer-drag-overshoot, 0px))}.magic-drawer.-right{--magic-drawer-enter-animation:slide-rtl-in 300ms ease;--magic-drawer-leave-animation:slide-rtl-out 300ms ease;--magic-drawer-align-items:center;--magic-drawer-justify-content:flex-end;--magic-drawer-drag-overshoot-x:var(--magic-drawer-drag-overshoot);--magic-drawer-padding:0 var(--magic-drawer-drag-overshoot-x) 0 0}.magic-drawer.-right>.magic-drawer__wrapper{width:calc(var(--magic-drawer-width, 0px) + var(--magic-drawer-drag-overshoot, 0px))}.magic-drawer.-left{--magic-drawer-enter-animation:slide-ltr-in 300ms ease;--magic-drawer-leave-animation:slide-ltr-out 300ms ease;--magic-drawer-align-items:center;--magic-drawer-justify-content:flex-start;--magic-drawer-drag-overshoot-x:calc(var(--magic-drawer-drag-overshoot)*-1);--magic-drawer-padding:0 0 0 var(--magic-drawer-drag-overshoot-x)}.magic-drawer.-left>.magic-drawer__wrapper{width:calc(var(--magic-drawer-width, 0px) + var(--magic-drawer-drag-overshoot, 0px))}.magic-drawer__wrapper{height:var(--magic-drawer-height);pointer-events:none;transform:translate(var(--magic-drawer-drag-overshoot-x),var(--magic-drawer-drag-overshoot-y));width:var(--magic-drawer-width)}.magic-drawer__content{height:100%;max-height:100%;position:relative;width:100%}.magic-drawer__drag{-webkit-overflow-scrolling:touch;align-items:var(--magic-drawer-align-items);cursor:grab;display:flex;height:100%;justify-content:var(--magic-drawer-justify-content);overflow-x:var(--magic-drawer-content-overflow-x);overflow-y:var(--magic-drawer-content-overflow-y);pointer-events:auto;position:relative;scroll-behavior:smooth;width:100%}dialog.magic-drawer__drag{background:transparent;border:0;margin:0;outline:0;padding:0}dialog.magic-drawer__drag::backdrop{background-color:transparent}.magic-drawer.-dragging .magic-drawer__drag{cursor:grabbing;-webkit-user-select:none;-moz-user-select:none;user-select:none}.magic-drawer.-disabled .magic-drawer__drag,.magic-drawer.-wheeling .magic-drawer__drag{cursor:auto}.magic-drawer__drag>*{padding:var(--magic-drawer-padding)}.magic-drawer__overlay{inset:0;position:absolute;z-index:9999}.magic-drawer__backdrop{-webkit-backdrop-filter:var(--magic-drawer-backdrop-filter);backdrop-filter:var(--magic-drawer-backdrop-filter);background-color:var(--magic-drawer-backdrop-color);bottom:0;height:100%;left:0;pointer-events:auto;position:fixed;right:0;top:0;width:100%;z-index:-1}.magic-drawer.-disabled .magic-drawer__backdrop{pointer-events:none}.magic-drawer--content-enter-active{animation:var(--magic-drawer-enter-animation)}.magic-drawer--content-leave-active{animation:var(--magic-drawer-leave-animation)}.magic-drawer--backdrop-enter-active{animation:fade-in .3s ease}.magic-drawer--backdrop-leave-active{animation:fade-out .3s ease}
|
|
322
346
|
</style>
|
|
@@ -17,9 +17,9 @@ interface MagicDrawerProps {
|
|
|
17
17
|
props?: Record<string, unknown>;
|
|
18
18
|
options?: DrawerOptions;
|
|
19
19
|
}
|
|
20
|
-
declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__VLS_WithDefaults<
|
|
20
|
+
declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToOption<MagicDrawerProps>, {
|
|
21
21
|
options: () => any;
|
|
22
|
-
}>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<
|
|
22
|
+
}>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<MagicDrawerProps>, {
|
|
23
23
|
options: () => any;
|
|
24
24
|
}>>>, {
|
|
25
25
|
options: DrawerOptions;
|
|
@@ -28,15 +28,6 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
|
|
|
28
28
|
default?(_: {}): any;
|
|
29
29
|
}>;
|
|
30
30
|
export default _default;
|
|
31
|
-
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
32
|
-
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
33
|
-
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
34
|
-
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
35
|
-
} : {
|
|
36
|
-
type: import('vue').PropType<T[K]>;
|
|
37
|
-
required: true;
|
|
38
|
-
};
|
|
39
|
-
};
|
|
40
31
|
type __VLS_WithDefaults<P, D> = {
|
|
41
32
|
[K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
|
|
42
33
|
default: D[K];
|
|
@@ -50,3 +41,12 @@ type __VLS_WithTemplateSlots<T, S> = T & {
|
|
|
50
41
|
$slots: S;
|
|
51
42
|
};
|
|
52
43
|
};
|
|
44
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
45
|
+
type __VLS_TypePropsToOption<T> = {
|
|
46
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
47
|
+
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
48
|
+
} : {
|
|
49
|
+
type: import('vue').PropType<T[K]>;
|
|
50
|
+
required: true;
|
|
51
|
+
};
|
|
52
|
+
};
|
|
@@ -13,12 +13,9 @@ type UseDrawerDragArgs = {
|
|
|
13
13
|
close: () => void;
|
|
14
14
|
};
|
|
15
15
|
export declare function useDrawerDrag(args: UseDrawerDragArgs): {
|
|
16
|
+
onPointerdown: (e: PointerEvent) => void;
|
|
17
|
+
onClick: (e: MouseEvent) => void;
|
|
16
18
|
style: import("vue").ComputedRef<string>;
|
|
17
|
-
draggedX: Ref<number>;
|
|
18
|
-
draggedY: Ref<number>;
|
|
19
|
-
dragging: Ref<boolean>;
|
|
20
19
|
hasDragged: import("vue").ComputedRef<boolean>;
|
|
21
|
-
onPointerdown: (e: PointerEvent) => void;
|
|
22
|
-
onClick: (e: MouseEvent) => Promise<void>;
|
|
23
20
|
};
|
|
24
21
|
export {};
|