@baleada/vue-composition 0.11.0 → 0.11.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.
Files changed (2) hide show
  1. package/lib/index.js +6 -6
  2. package/package.json +1 -1
package/lib/index.js CHANGED
@@ -1,16 +1,16 @@
1
- import { shallowReactive, onBeforeUnmount } from 'vue';
1
+ import { shallowReactive, onScopeDispose } from 'vue';
2
2
  import { Animateable, Broadcastable, Compareable, Completeable, Copyable, Delayable, Drawable, Fetchable, Fullscreenable, Grantable, Listenable, Navigateable, Pickable, Recognizeable, Resolveable, Shareable, Storeable } from '@baleada/logic';
3
3
 
4
4
  function useAnimateable(keyframes, options) {
5
5
  const instance = new Animateable(keyframes, options);
6
6
  const reactiveInstance = shallowReactive(instance);
7
- onBeforeUnmount(() => reactiveInstance.stop());
7
+ onScopeDispose(() => reactiveInstance.stop());
8
8
  return reactiveInstance;
9
9
  }
10
10
  function useBroadcastable(state, options) {
11
11
  const instance = new Broadcastable(state, options);
12
12
  const reactiveInstance = shallowReactive(instance);
13
- onBeforeUnmount(() => reactiveInstance.stop());
13
+ onScopeDispose(() => reactiveInstance.stop());
14
14
  return reactiveInstance;
15
15
  }
16
16
  function useCompareable(string, options) {
@@ -26,13 +26,13 @@ function useCompleteable(string, options) {
26
26
  function useCopyable(string, options) {
27
27
  const instance = new Copyable(string, options);
28
28
  const reactiveInstance = shallowReactive(instance);
29
- onBeforeUnmount(() => reactiveInstance.stop());
29
+ onScopeDispose(() => reactiveInstance.stop());
30
30
  return reactiveInstance;
31
31
  }
32
32
  function useDelayable(effect, options) {
33
33
  const instance = new Delayable(effect, options);
34
34
  const reactiveInstance = shallowReactive(instance);
35
- onBeforeUnmount(() => reactiveInstance.stop());
35
+ onScopeDispose(() => reactiveInstance.stop());
36
36
  return reactiveInstance;
37
37
  }
38
38
  function useDrawable(stroke, options) {
@@ -58,7 +58,7 @@ function useGrantable(descriptor, options) {
58
58
  function useListenable(type, options) {
59
59
  const instance = new Listenable(type, options);
60
60
  const reactiveInstance = shallowReactive(instance);
61
- onBeforeUnmount(() => reactiveInstance.stop());
61
+ onScopeDispose(() => reactiveInstance.stop());
62
62
  return reactiveInstance;
63
63
  }
64
64
  function useNavigateable(array, options) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@baleada/vue-composition",
3
- "version": "0.11.0",
3
+ "version": "0.11.1",
4
4
  "description": "Functions that expose Baleada Logic for composition in Vue.",
5
5
  "main": "lib/index.cjs",
6
6
  "module": "lib/index.js",