@maas/vue-equipment 1.0.0-beta.60 → 1.0.0-beta.62

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.
Files changed (35) hide show
  1. package/dist/nuxt/module.json +1 -1
  2. package/dist/nuxt/module.mjs +1 -1
  3. package/dist/plugins/MagicAccordion/src/components/MagicAccordionProvider.vue +8 -1
  4. package/dist/plugins/MagicCommand/index.d.ts +3 -1
  5. package/dist/plugins/MagicCommand/index.mjs +23 -1
  6. package/dist/plugins/MagicCommand/src/components/MagicCommandContent.vue +1 -3
  7. package/dist/plugins/MagicCommand/src/components/MagicCommandDrawer.d.vue.ts +4 -2
  8. package/dist/plugins/MagicCommand/src/components/MagicCommandDrawer.vue +12 -14
  9. package/dist/plugins/MagicCommand/src/components/MagicCommandDrawer.vue.d.ts +4 -2
  10. package/dist/plugins/MagicCommand/src/components/MagicCommandItem.vue +2 -4
  11. package/dist/plugins/MagicCommand/src/components/MagicCommandModal.d.vue.ts +4 -2
  12. package/dist/plugins/MagicCommand/src/components/MagicCommandModal.vue +11 -11
  13. package/dist/plugins/MagicCommand/src/components/MagicCommandModal.vue.d.ts +4 -2
  14. package/dist/plugins/MagicCommand/src/components/MagicCommandProvider.d.vue.ts +1 -1
  15. package/dist/plugins/MagicCommand/src/components/MagicCommandProvider.vue +7 -0
  16. package/dist/plugins/MagicCommand/src/components/MagicCommandProvider.vue.d.ts +1 -1
  17. package/dist/plugins/MagicCommand/src/components/MagicCommandRenderer.vue +2 -6
  18. package/dist/plugins/MagicCommand/src/components/MagicCommandTrigger.vue +2 -4
  19. package/dist/plugins/MagicCommand/src/components/MagicCommandView.vue +1 -3
  20. package/dist/plugins/MagicCommand/src/composables/private/useCommandCallback.d.ts +1 -1
  21. package/dist/plugins/MagicCommand/src/composables/private/useCommandItem.d.ts +1 -1
  22. package/dist/plugins/MagicCommand/src/composables/private/useCommandState.d.ts +1 -1
  23. package/dist/plugins/MagicCommand/src/composables/private/useCommandState.mjs +1 -1
  24. package/dist/plugins/MagicCommand/src/composables/private/useCommandTrigger.d.ts +1 -1
  25. package/dist/plugins/MagicCommand/src/composables/private/useCommandView.d.ts +1 -1
  26. package/dist/plugins/MagicCommand/src/composables/useMagicCommand.d.ts +1 -1
  27. package/dist/plugins/MagicCommand/src/types/index.d.ts +1 -1
  28. package/dist/plugins/MagicCookie/src/components/MagicCookieProvider.vue +8 -1
  29. package/dist/plugins/MagicDraggable/src/components/MagicDraggable.vue +8 -1
  30. package/dist/plugins/MagicDrawer/src/components/MagicDrawerProvider.vue +7 -0
  31. package/dist/plugins/MagicMarquee/src/components/MagicMarquee.vue +8 -1
  32. package/dist/plugins/MagicMenu/src/components/MagicMenuProvider.vue +7 -0
  33. package/dist/plugins/MagicModal/src/components/MagicModalProvider.vue +7 -0
  34. package/dist/plugins/MagicPlayer/src/components/MagicPlayerProvider.vue +7 -0
  35. package/package.json +1 -1
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@maas/vue-equipment/nuxt",
3
3
  "configKey": "vueEquipment",
4
- "version": "1.0.0-beta.59",
4
+ "version": "1.0.0-beta.61",
5
5
  "builder": {
6
6
  "@nuxt/module-builder": "1.0.2",
7
7
  "unbuild": "unknown"
@@ -11,7 +11,7 @@ const functions$1 = [
11
11
  {
12
12
  name: "MagicCommand",
13
13
  "package": "plugins",
14
- lastUpdated: 1739184559000,
14
+ lastUpdated: 1780493065000,
15
15
  docs: "https://maas.egineering/vue-equipment/plugins/MagicCommand/",
16
16
  description: "MagicCommand is a flexible collection of components intended to build command palette style menus"
17
17
  },
@@ -9,7 +9,7 @@
9
9
  </template>
10
10
 
11
11
  <script setup>
12
- import { provide } from "vue";
12
+ import { provide, watch } from "vue";
13
13
  import { VuePrimitive } from "@maas/vue-primitive";
14
14
  import { useAccordionState } from "../composables/private/useAccordionState";
15
15
  import { MagicAccordionInstanceId } from "../symbols";
@@ -20,5 +20,12 @@ const { id, asChild, options } = defineProps({
20
20
  });
21
21
  const { initializeState } = useAccordionState(id);
22
22
  initializeState(options);
23
+ watch(
24
+ () => options,
25
+ (value) => {
26
+ initializeState(value);
27
+ },
28
+ { deep: true }
29
+ );
23
30
  provide(MagicAccordionInstanceId, id);
24
31
  </script>
@@ -1,7 +1,9 @@
1
+ import { MagicModalProvider, MagicModalTeleport, MagicModalContent } from '@maas/vue-equipment/plugins/MagicModal';
2
+ import { MagicDrawerProvider, MagicDrawerTeleport, MagicDrawerContent } from '@maas/vue-equipment/plugins/MagicDrawer';
1
3
  import { useMagicCommand } from './src/composables/useMagicCommand.js';
2
4
  import { MagicCommandInstanceId, MagicCommandProviderOptions } from './src/symbols/index.js';
3
5
  import type { Plugin } from 'vue';
4
6
  import type { MagicCommandOptions, MagicCommandDrawerOptions, MagicCommandModalOptions } from './src/types/index.js';
5
7
  declare const MagicCommandPlugin: Plugin;
6
- export { MagicCommandPlugin, useMagicCommand, MagicCommandInstanceId, MagicCommandProviderOptions, };
8
+ export { MagicCommandPlugin, useMagicCommand, MagicCommandInstanceId, MagicCommandProviderOptions, MagicModalProvider, MagicModalTeleport, MagicModalContent, MagicDrawerProvider, MagicDrawerTeleport, MagicDrawerContent, };
7
9
  export type { MagicCommandOptions, MagicCommandDrawerOptions, MagicCommandModalOptions, };
@@ -1,3 +1,13 @@
1
+ import {
2
+ MagicModalProvider,
3
+ MagicModalTeleport,
4
+ MagicModalContent
5
+ } from "@maas/vue-equipment/plugins/MagicModal";
6
+ import {
7
+ MagicDrawerProvider,
8
+ MagicDrawerTeleport,
9
+ MagicDrawerContent
10
+ } from "@maas/vue-equipment/plugins/MagicDrawer";
1
11
  import MagicCommandDrawer from "./src/components/MagicCommandDrawer.vue";
2
12
  import MagicCommandItem from "./src/components/MagicCommandItem.vue";
3
13
  import MagicCommandModal from "./src/components/MagicCommandModal.vue";
@@ -21,11 +31,23 @@ const MagicCommandPlugin = {
21
31
  app.component("MagicCommandItem", MagicCommandItem);
22
32
  app.component("MagicCommandDrawer", MagicCommandDrawer);
23
33
  app.component("MagicCommandModal", MagicCommandModal);
34
+ app.component("MagicModalProvider", MagicModalProvider);
35
+ app.component("MagicModalTeleport", MagicModalTeleport);
36
+ app.component("MagicModalContent", MagicModalContent);
37
+ app.component("MagicDrawerProvider", MagicDrawerProvider);
38
+ app.component("MagicDrawerTeleport", MagicDrawerTeleport);
39
+ app.component("MagicDrawerContent", MagicDrawerContent);
24
40
  }
25
41
  };
26
42
  export {
27
43
  MagicCommandPlugin,
28
44
  useMagicCommand,
29
45
  MagicCommandInstanceId,
30
- MagicCommandProviderOptions
46
+ MagicCommandProviderOptions,
47
+ MagicModalProvider,
48
+ MagicModalTeleport,
49
+ MagicModalContent,
50
+ MagicDrawerProvider,
51
+ MagicDrawerTeleport,
52
+ MagicDrawerContent
31
53
  };
@@ -36,9 +36,7 @@ import {
36
36
  useTemplateRef
37
37
  } from "vue";
38
38
  import { useMagicKeys } from "@vueuse/core";
39
- import {
40
- useMagicError
41
- } from "@maas/vue-equipment/plugins/MagicError";
39
+ import { useMagicError } from "@maas/vue-equipment/plugins/MagicError";
42
40
  import { useCommandItem } from "../composables/private/useCommandItem";
43
41
  import { useCommandScroll } from "../composables/private/useCommandScroll";
44
42
  import { useCommandCallback } from "../composables/private/useCommandCallback";
@@ -2,9 +2,11 @@ import type { MagicCommandDrawerOptions } from '../types/index.js';
2
2
  interface MagicCommandDrawerProps {
3
3
  options?: MagicCommandDrawerOptions;
4
4
  }
5
- declare var __VLS_7: {};
5
+ declare var __VLS_7: {}, __VLS_24: {};
6
6
  type __VLS_Slots = {} & {
7
- default?: (props: typeof __VLS_7) => any;
7
+ layout?: (props: typeof __VLS_7) => any;
8
+ } & {
9
+ default?: (props: typeof __VLS_24) => any;
8
10
  };
9
11
  declare const __VLS_base: import("vue").DefineComponent<MagicCommandDrawerProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<MagicCommandDrawerProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
10
12
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
@@ -1,23 +1,21 @@
1
1
  <template>
2
- <magic-drawer
3
- :id="instanceId"
4
- class="magic-command-drawer"
5
- :options="options"
6
- v-bind="$attrs"
7
- >
8
- <slot />
9
- </magic-drawer>
2
+ <magic-drawer-provider :id="instanceId" :options="options">
3
+ <slot name="layout">
4
+ <magic-drawer-teleport>
5
+ <magic-drawer-backdrop />
6
+ <magic-drawer-content v-bind="$attrs">
7
+ <slot />
8
+ </magic-drawer-content>
9
+ </magic-drawer-teleport>
10
+ </slot>
11
+ </magic-drawer-provider>
10
12
  </template>
11
13
 
12
14
  <script setup>
13
15
  import { inject, watch, onBeforeUnmount } from "vue";
14
16
  import { useMagicDrawer } from "@maas/vue-equipment/plugins/MagicDrawer";
15
- import {
16
- useMagicEmitter
17
- } from "@maas/vue-equipment/plugins/MagicEmitter";
18
- import {
19
- useMagicError
20
- } from "@maas/vue-equipment/plugins/MagicError";
17
+ import { useMagicEmitter } from "@maas/vue-equipment/plugins/MagicEmitter";
18
+ import { useMagicError } from "@maas/vue-equipment/plugins/MagicError";
21
19
  import { useMagicCommand } from "../composables/useMagicCommand";
22
20
  import { MagicCommandInstanceId } from "../symbols";
23
21
  defineOptions({
@@ -2,9 +2,11 @@ import type { MagicCommandDrawerOptions } from '../types/index.js';
2
2
  interface MagicCommandDrawerProps {
3
3
  options?: MagicCommandDrawerOptions;
4
4
  }
5
- declare var __VLS_7: {};
5
+ declare var __VLS_7: {}, __VLS_24: {};
6
6
  type __VLS_Slots = {} & {
7
- default?: (props: typeof __VLS_7) => any;
7
+ layout?: (props: typeof __VLS_7) => any;
8
+ } & {
9
+ default?: (props: typeof __VLS_24) => any;
8
10
  };
9
11
  declare const __VLS_base: import("vue").DefineComponent<MagicCommandDrawerProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<MagicCommandDrawerProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
10
12
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
@@ -24,9 +24,8 @@ import {
24
24
  useId,
25
25
  onMounted
26
26
  } from "vue";
27
- import {
28
- useMagicError
29
- } from "@maas/vue-equipment/plugins/MagicError";
27
+ import { onKeyStroke } from "@vueuse/core";
28
+ import { useMagicError } from "@maas/vue-equipment/plugins/MagicError";
30
29
  import { useCommandItem } from "../composables/private/useCommandItem";
31
30
  import { useCommandState } from "../composables/private/useCommandState";
32
31
  import {
@@ -37,7 +36,6 @@ import {
37
36
  MagicCommandItemActive,
38
37
  MagicCommandItemDisabled
39
38
  } from "../symbols";
40
- import { onKeyStroke } from "@vueuse/core";
41
39
  const {
42
40
  id,
43
41
  initial = false,
@@ -2,9 +2,11 @@ import type { MagicCommandModalOptions } from '../types/index.js';
2
2
  interface MagicCommandProps {
3
3
  options?: MagicCommandModalOptions;
4
4
  }
5
- declare var __VLS_7: {};
5
+ declare var __VLS_7: {}, __VLS_24: {};
6
6
  type __VLS_Slots = {} & {
7
- default?: (props: typeof __VLS_7) => any;
7
+ layout?: (props: typeof __VLS_7) => any;
8
+ } & {
9
+ default?: (props: typeof __VLS_24) => any;
8
10
  };
9
11
  declare const __VLS_base: import("vue").DefineComponent<MagicCommandProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<MagicCommandProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
10
12
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
@@ -1,20 +1,20 @@
1
1
  <template>
2
- <magic-modal
3
- :id="instanceId"
4
- class="magic-command-modal"
5
- :options="options"
6
- v-bind="$attrs"
7
- >
8
- <slot />
9
- </magic-modal>
2
+ <magic-modal-provider :id="instanceId" :options="options">
3
+ <slot name="layout">
4
+ <magic-modal-teleport>
5
+ <magic-modal-backdrop />
6
+ <magic-modal-content v-bind="$attrs">
7
+ <slot />
8
+ </magic-modal-content>
9
+ </magic-modal-teleport>
10
+ </slot>
11
+ </magic-modal-provider>
10
12
  </template>
11
13
 
12
14
  <script setup>
13
15
  import { inject, watch, onBeforeUnmount } from "vue";
14
16
  import { useMagicModal } from "@maas/vue-equipment/plugins/MagicModal";
15
- import {
16
- useMagicEmitter
17
- } from "@maas/vue-equipment/plugins/MagicEmitter";
17
+ import { useMagicEmitter } from "@maas/vue-equipment/plugins/MagicEmitter";
18
18
  import { useMagicCommand } from "../composables/useMagicCommand";
19
19
  import { MagicCommandInstanceId } from "../symbols";
20
20
  defineOptions({
@@ -2,9 +2,11 @@ import type { MagicCommandModalOptions } from '../types/index.js';
2
2
  interface MagicCommandProps {
3
3
  options?: MagicCommandModalOptions;
4
4
  }
5
- declare var __VLS_7: {};
5
+ declare var __VLS_7: {}, __VLS_24: {};
6
6
  type __VLS_Slots = {} & {
7
- default?: (props: typeof __VLS_7) => any;
7
+ layout?: (props: typeof __VLS_7) => any;
8
+ } & {
9
+ default?: (props: typeof __VLS_24) => any;
8
10
  };
9
11
  declare const __VLS_base: import("vue").DefineComponent<MagicCommandProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<MagicCommandProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
10
12
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
@@ -1,4 +1,4 @@
1
- import { type MaybeRef } from 'vue';
1
+ import type { MaybeRef } from 'vue';
2
2
  import type { MagicCommandOptions } from '../types/index.js';
3
3
  interface MagicCommandProviderProps {
4
4
  id: MaybeRef<string>;
@@ -23,6 +23,13 @@ const { id, options = {} } = defineProps({
23
23
  });
24
24
  const { initializeState } = useCommandState(id);
25
25
  const state = initializeState(options);
26
+ watch(
27
+ () => options,
28
+ (value) => {
29
+ initializeState(value);
30
+ },
31
+ { deep: true }
32
+ );
26
33
  const lastX = shallowRef(0);
27
34
  const lastY = shallowRef(0);
28
35
  const { x, y } = usePointer();
@@ -1,4 +1,4 @@
1
- import { type MaybeRef } from 'vue';
1
+ import type { MaybeRef } from 'vue';
2
2
  import type { MagicCommandOptions } from '../types/index.js';
3
3
  interface MagicCommandProviderProps {
4
4
  id: MaybeRef<string>;
@@ -4,12 +4,8 @@
4
4
 
5
5
  <script setup>
6
6
  import { inject, onBeforeUnmount, useTemplateRef } from "vue";
7
- import {
8
- useMagicError
9
- } from "@maas/vue-equipment/plugins/MagicError";
10
- import {
11
- useMagicEmitter
12
- } from "@maas/vue-equipment/plugins/MagicEmitter";
7
+ import { useMagicError } from "@maas/vue-equipment/plugins/MagicError";
8
+ import { useMagicEmitter } from "@maas/vue-equipment/plugins/MagicEmitter";
13
9
  import { MagicCommandInstanceId } from "./../symbols";
14
10
  import { useCommandState } from "../composables/private/useCommandState";
15
11
  const magicError = useMagicError({
@@ -16,9 +16,8 @@
16
16
  <script setup>
17
17
  import { computed, inject, useTemplateRef, toValue, watch } from "vue";
18
18
  import { VuePrimitive } from "@maas/vue-primitive";
19
- import {
20
- useMagicError
21
- } from "@maas/vue-equipment/plugins/MagicError";
19
+ import { useMagicKeys } from "@vueuse/core";
20
+ import { useMagicError } from "@maas/vue-equipment/plugins/MagicError";
22
21
  import { useCommandView } from "../composables/private/useCommandView";
23
22
  import { useCommandTrigger } from "../composables/private/useCommandTrigger";
24
23
  import {
@@ -28,7 +27,6 @@ import {
28
27
  MagicCommandItemDisabled,
29
28
  MagicCommandProviderOptions
30
29
  } from "../symbols";
31
- import { useMagicKeys } from "@vueuse/core";
32
30
  const {
33
31
  viewId,
34
32
  disabled = void 0,
@@ -6,9 +6,7 @@
6
6
 
7
7
  <script setup>
8
8
  import { computed, inject, onBeforeUnmount, provide, useId, watch } from "vue";
9
- import {
10
- useMagicError
11
- } from "@maas/vue-equipment/plugins/MagicError";
9
+ import { useMagicError } from "@maas/vue-equipment/plugins/MagicError";
12
10
  import { useCommandView } from "../composables/private/useCommandView";
13
11
  import {
14
12
  MagicCommandInstanceId,
@@ -1,4 +1,4 @@
1
- import { type MaybeRef } from 'vue';
1
+ import type { MaybeRef } from 'vue';
2
2
  type UseCommandCallbackArgs = {
3
3
  instanceId: MaybeRef<string>;
4
4
  viewId: string;
@@ -1,4 +1,4 @@
1
- import { type MaybeRef } from 'vue';
1
+ import type { MaybeRef } from 'vue';
2
2
  import type { CommandItem } from '../../types/index.js';
3
3
  type UseCommandItemArgs = {
4
4
  instanceId: MaybeRef<string>;
@@ -1,4 +1,4 @@
1
- import { type MaybeRef } from 'vue';
1
+ import type { MaybeRef } from 'vue';
2
2
  import type { CommandState, MagicCommandOptions } from '../../types/index.js';
3
3
  export declare function useCommandState(instanceId: MaybeRef<string>): {
4
4
  initializeState: (options?: MagicCommandOptions) => CommandState;
@@ -1,5 +1,5 @@
1
- import { reactive, toValue, onScopeDispose } from "vue";
2
1
  import { createDefu } from "defu";
2
+ import { reactive, toValue, onScopeDispose } from "vue";
3
3
  import { createStateStore } from "@maas/vue-equipment/utils";
4
4
  import { defaultOptions } from "../../utils/defaultOptions.mjs";
5
5
  const getCommandStateStore = createStateStore(
@@ -1,5 +1,5 @@
1
- import { type ComputedRef, type MaybeRef, type Ref } from 'vue';
2
1
  import { VuePrimitive } from '@maas/vue-primitive';
2
+ import type { ComputedRef, MaybeRef, Ref } from 'vue';
3
3
  import type { Action, Interaction } from '../../types/index.js';
4
4
  type UseCommandTriggerArgs = {
5
5
  instanceId: MaybeRef<string>;
@@ -1,4 +1,4 @@
1
- import { type MaybeRef } from 'vue';
1
+ import type { MaybeRef } from 'vue';
2
2
  import type { CommandView } from '../../types/index.js';
3
3
  type InitializeViewArgs = Pick<CommandView, 'id' | 'parent' | 'initial'>;
4
4
  export declare function useCommandView(id: MaybeRef<string>): {
@@ -1,4 +1,4 @@
1
- import { type MaybeRef } from 'vue';
1
+ import type { MaybeRef } from 'vue';
2
2
  interface SelectItemArgs {
3
3
  id: string;
4
4
  viewId: string;
@@ -1,6 +1,6 @@
1
+ import type { RequireAllNested } from '@maas/vue-equipment/utils';
1
2
  import type { MagicModalOptions } from '../../../MagicModal/index.js';
2
3
  import type { MagicDrawerOptions } from '../../../MagicDrawer/index.js';
3
- import type { RequireAllNested } from '@maas/vue-equipment/utils';
4
4
  export interface MagicCommandOptions {
5
5
  debug?: boolean;
6
6
  transition?: {
@@ -5,7 +5,7 @@
5
5
  </template>
6
6
 
7
7
  <script setup>
8
- import { provide } from "vue";
8
+ import { provide, watch } from "vue";
9
9
  import { useCookieState } from "../composables/private/useCookieState";
10
10
  import { MagicCookieInstanceId } from "../symbols";
11
11
  const { id, options } = defineProps({
@@ -14,5 +14,12 @@ const { id, options } = defineProps({
14
14
  });
15
15
  const { initializeState } = useCookieState(id);
16
16
  initializeState(options);
17
+ watch(
18
+ () => options,
19
+ (value) => {
20
+ initializeState(value);
21
+ },
22
+ { deep: true }
23
+ );
17
24
  provide(MagicCookieInstanceId, id);
18
25
  </script>
@@ -24,7 +24,7 @@
24
24
  </template>
25
25
 
26
26
  <script setup>
27
- import { useTemplateRef, computed, toValue, toRefs } from "vue";
27
+ import { useTemplateRef, computed, toValue, toRefs, watch } from "vue";
28
28
  import {
29
29
  useMagicError
30
30
  } from "@maas/vue-equipment/plugins/MagicError";
@@ -47,6 +47,13 @@ const elRef = useTemplateRef("el");
47
47
  const wrapperRef = useTemplateRef("wrapper");
48
48
  const { initializeState } = useDraggableState(id);
49
49
  const state = initializeState(options);
50
+ watch(
51
+ () => options,
52
+ (value) => {
53
+ initializeState(value);
54
+ },
55
+ { deep: true }
56
+ );
50
57
  if (!state.options.snapPoints.length) {
51
58
  magicError.throwError({
52
59
  message: "MagicDraggable must have at least one snap point set",
@@ -20,6 +20,13 @@ const { options = {}, id } = defineProps({
20
20
  });
21
21
  const { initializeState } = useDrawerState(id);
22
22
  const state = initializeState(options);
23
+ watch(
24
+ () => options,
25
+ (value) => {
26
+ initializeState(value);
27
+ },
28
+ { deep: true }
29
+ );
23
30
  function open() {
24
31
  state.active = true;
25
32
  }
@@ -17,7 +17,7 @@
17
17
  </template>
18
18
 
19
19
  <script setup>
20
- import { useTemplateRef, onMounted } from "vue";
20
+ import { useTemplateRef, onMounted, watch } from "vue";
21
21
  import { useMarqueeApi } from "../composables/private/useMarqueeApi";
22
22
  import { useMarqueeState } from "../composables/private/useMarqueeState";
23
23
  const { id, options } = defineProps({
@@ -26,6 +26,13 @@ const { id, options } = defineProps({
26
26
  });
27
27
  const { initializeState } = useMarqueeState(id);
28
28
  initializeState(options);
29
+ watch(
30
+ () => options,
31
+ (value) => {
32
+ initializeState(value);
33
+ },
34
+ { deep: true }
35
+ );
29
36
  const parentRef = useTemplateRef("parent");
30
37
  const childRef = useTemplateRef("child");
31
38
  const { duplicates, initialize } = useMarqueeApi({
@@ -31,6 +31,13 @@ const { id, options } = defineProps({
31
31
  const elRef = useTemplateRef("el");
32
32
  const { initializeState } = useMenuState(id);
33
33
  const state = initializeState(options);
34
+ watch(
35
+ () => options,
36
+ (value) => {
37
+ initializeState(value);
38
+ },
39
+ { deep: true }
40
+ );
34
41
  const lastX = shallowRef(0);
35
42
  const lastY = shallowRef(0);
36
43
  const { x, y } = usePointer();
@@ -19,6 +19,13 @@ const { options = {}, id } = defineProps({
19
19
  });
20
20
  const { initializeState } = useModalState(id);
21
21
  const state = initializeState(options);
22
+ watch(
23
+ () => options,
24
+ (value) => {
25
+ initializeState(value);
26
+ },
27
+ { deep: true }
28
+ );
22
29
  function close() {
23
30
  state.active = false;
24
31
  }
@@ -45,6 +45,13 @@ const { id, options } = defineProps({
45
45
  });
46
46
  const { initializeState } = usePlayerState(id);
47
47
  const state = initializeState(options);
48
+ watch(
49
+ () => options,
50
+ (value) => {
51
+ initializeState(value);
52
+ },
53
+ { deep: true }
54
+ );
48
55
  const {
49
56
  playing,
50
57
  paused,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@maas/vue-equipment",
3
3
  "description": "Our Frontend Toolkit, Free and Open Source",
4
- "version": "1.0.0-beta.60",
4
+ "version": "1.0.0-beta.62",
5
5
  "contributors": [
6
6
  {
7
7
  "name": "Robin Scholz",