@maas/vue-equipment 0.18.0 → 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.
@@ -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 };
@@ -6,4 +6,4 @@ interface ModuleOptions {
6
6
  }
7
7
  declare const _default: _nuxt_schema.NuxtModule<ModuleOptions>;
8
8
 
9
- export { ModuleOptions, _default as default };
9
+ export { type ModuleOptions, _default as default };
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@maas/vue-equipment/nuxt",
3
3
  "configKey": "vueEquipment",
4
- "version": "0.17.1"
4
+ "version": "0.18.0"
5
5
  }
@@ -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'
@@ -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
- createAnimation(progress.value)
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 { useScroll } from '@vueuse/core'
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.18.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",