@maas/vue-equipment 0.17.1 → 0.18.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.
- package/dist/nuxt/module.d.mts +9 -0
- package/dist/nuxt/module.d.ts +1 -1
- package/dist/nuxt/module.json +1 -1
- package/dist/nuxt/types.d.mts +16 -0
- package/dist/nuxt/types.d.ts +3 -2
- package/dist/plugins/MagicScroll/src/components/MagicScrollMotion.vue +6 -2
- package/dist/plugins/MagicScroll/src/components/MagicScrollProvider.vue +8 -4
- package/dist/plugins/MagicScroll/src/components/MagicScrollProvider.vue.d.ts +2 -1
- package/package.json +2 -2
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import * as _nuxt_schema from '@nuxt/schema';
|
|
2
|
+
|
|
3
|
+
interface ModuleOptions {
|
|
4
|
+
plugins?: string[] | boolean;
|
|
5
|
+
composables?: string[] | boolean;
|
|
6
|
+
}
|
|
7
|
+
declare const _default: _nuxt_schema.NuxtModule<ModuleOptions>;
|
|
8
|
+
|
|
9
|
+
export { type ModuleOptions, _default as default };
|
package/dist/nuxt/module.d.ts
CHANGED
package/dist/nuxt/module.json
CHANGED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
|
|
2
|
+
import type { ModuleOptions } from './module.js'
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
declare module '@nuxt/schema' {
|
|
6
|
+
interface NuxtConfig { ['vueEquipment']?: Partial<ModuleOptions> }
|
|
7
|
+
interface NuxtOptions { ['vueEquipment']?: ModuleOptions }
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
declare module 'nuxt/schema' {
|
|
11
|
+
interface NuxtConfig { ['vueEquipment']?: Partial<ModuleOptions> }
|
|
12
|
+
interface NuxtOptions { ['vueEquipment']?: ModuleOptions }
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
export type { ModuleOptions, default } from './module.js'
|
package/dist/nuxt/types.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
|
|
2
|
-
import { ModuleOptions } from './module'
|
|
2
|
+
import type { ModuleOptions } from './module'
|
|
3
|
+
|
|
3
4
|
|
|
4
5
|
declare module '@nuxt/schema' {
|
|
5
6
|
interface NuxtConfig { ['vueEquipment']?: Partial<ModuleOptions> }
|
|
@@ -12,4 +13,4 @@ declare module 'nuxt/schema' {
|
|
|
12
13
|
}
|
|
13
14
|
|
|
14
15
|
|
|
15
|
-
export { ModuleOptions, default } from './module'
|
|
16
|
+
export type { ModuleOptions, default } from './module'
|
|
@@ -46,14 +46,18 @@ onMounted(() => {
|
|
|
46
46
|
})
|
|
47
47
|
|
|
48
48
|
watch(progress, (value) => {
|
|
49
|
-
if (!animation.value || !props.keyframes) return
|
|
49
|
+
if (!value || !animation.value || !props.keyframes) return
|
|
50
50
|
animation.value.currentTime = value
|
|
51
51
|
})
|
|
52
52
|
|
|
53
53
|
watch(
|
|
54
54
|
() => props.keyframes,
|
|
55
55
|
() => {
|
|
56
|
-
|
|
56
|
+
if (progress.value) {
|
|
57
|
+
createAnimation(progress.value)
|
|
58
|
+
} else {
|
|
59
|
+
createAnimation()
|
|
60
|
+
}
|
|
57
61
|
}
|
|
58
62
|
)
|
|
59
63
|
</script>
|
|
@@ -6,12 +6,16 @@
|
|
|
6
6
|
|
|
7
7
|
<script setup lang="ts">
|
|
8
8
|
import { provide, computed } from 'vue'
|
|
9
|
-
import {
|
|
9
|
+
import {
|
|
10
|
+
useScroll,
|
|
11
|
+
unrefElement,
|
|
12
|
+
type MaybeComputedElementRef,
|
|
13
|
+
} from '@vueuse/core'
|
|
10
14
|
import { ScrollPositionKey, ScrollParentKey } from '../symbols'
|
|
11
15
|
|
|
12
16
|
interface Props {
|
|
13
17
|
active?: Boolean
|
|
14
|
-
el?: HTMLElement
|
|
18
|
+
el?: MaybeComputedElementRef<HTMLElement>
|
|
15
19
|
}
|
|
16
20
|
const props = withDefaults(defineProps<Props>(), {
|
|
17
21
|
active: () => true,
|
|
@@ -19,13 +23,13 @@ const props = withDefaults(defineProps<Props>(), {
|
|
|
19
23
|
|
|
20
24
|
// computed is used to avoid reactivity issues
|
|
21
25
|
const mappedEl = computed(() => {
|
|
22
|
-
if (props.el) return props.el
|
|
26
|
+
if (props.el) return unrefElement(props.el)
|
|
23
27
|
if (typeof window === 'undefined') return undefined
|
|
24
28
|
return window
|
|
25
29
|
})
|
|
26
30
|
|
|
27
31
|
const mappedParent = computed(() => {
|
|
28
|
-
if (props.el) return props.el
|
|
32
|
+
if (props.el) return unrefElement(props.el)
|
|
29
33
|
return undefined
|
|
30
34
|
})
|
|
31
35
|
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
import { type MaybeComputedElementRef } from '@vueuse/core';
|
|
1
2
|
interface Props {
|
|
2
3
|
active?: Boolean;
|
|
3
|
-
el?: HTMLElement
|
|
4
|
+
el?: MaybeComputedElementRef<HTMLElement>;
|
|
4
5
|
}
|
|
5
6
|
declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<Props>, {
|
|
6
7
|
active: () => true;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@maas/vue-equipment",
|
|
3
3
|
"description": "A magic collection of Vue composables, plugins, components and directives",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.18.1",
|
|
5
5
|
"author": "Robin Scholz <https://github.com/robinscholz>, Christoph Jeworutzki <https://github.com/ChristophJeworutzki>",
|
|
6
6
|
"devDependencies": {
|
|
7
7
|
"@antfu/ni": "^0.21.12",
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
"mitt": "^3.0.1",
|
|
51
51
|
"motion": "^10.16.2",
|
|
52
52
|
"nuxt": "^3.5.1",
|
|
53
|
-
"universal-cookie": "
|
|
53
|
+
"universal-cookie": "^7.0.2"
|
|
54
54
|
},
|
|
55
55
|
"peerDependenciesMeta": {
|
|
56
56
|
"@maas/magic-timer": {
|