@baleada/vue-composition 0.11.2 → 0.11.3

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/lib/index.d.ts CHANGED
@@ -1,22 +1,24 @@
1
- import { ShallowReactive, Reactive } from 'vue';
2
- import { AnimateableKeyframe, AnimateableOptions, Animateable, BroadcastableOptions, Broadcastable, CompareableOptions, Compareable, CompleteableOptions, Completeable, CopyableOptions, Copyable, DelayableEffect, DelayableOptions, Delayable, DrawableStroke, DrawableOptions, Drawable, FetchableOptions, Fetchable, FullscreenableGetElement, FullscreenableOptions, Fullscreenable, GrantableOptions, Grantable, ListenableSupportedType, ListenableOptions, Listenable, NavigateableOptions, Navigateable, PickableOptions, Pickable, ListenEffectParam, RecognizeableOptions, Recognizeable, ResolveableOptions, Resolveable, ShareableOptions, Shareable, StoreableOptions, Storeable } from '@baleada/logic';
1
+ import { Reactive } from 'vue';
2
+ import { AnimateableKeyframe, AnimateableOptions, Animateable, BroadcastableOptions, Broadcastable, CompareableOptions, Compareable, CompleteableOptions, Completeable, CopyableOptions, Copyable, DelayableEffect, DelayableOptions, Delayable, DrawableStroke, DrawableOptions, Drawable, FetchableOptions, Fetchable, FullscreenableGetElement, FullscreenableOptions, Fullscreenable, GrantableOptions, Grantable, ListenableSupportedType, ListenableOptions, Listenable, NavigateableOptions, Navigateable, DefinedIDBObjectStore, OperateableOptions, Operateable, PickableOptions, Pickable, ListenEffectParam, RecognizeableOptions, Recognizeable, ResolveableOptions, Resolveable, ShareableOptions, Shareable, StoreableOptions, Storeable, TransactableOptions, Transactable } from '@baleada/logic';
3
3
 
4
- declare function useAnimateable<Value extends string | number | any[]>(keyframes: AnimateableKeyframe<Value>[], options?: AnimateableOptions): ShallowReactive<Animateable<Value>>;
5
- declare function useBroadcastable<State>(state: State, options?: BroadcastableOptions): ShallowReactive<Broadcastable<State>>;
6
- declare function useCompareable(string: string, options?: CompareableOptions): ShallowReactive<Compareable>;
7
- declare function useCompleteable(string: string, options?: CompleteableOptions): ShallowReactive<Completeable>;
8
- declare function useCopyable(string: string, options?: CopyableOptions): ShallowReactive<Copyable>;
9
- declare function useDelayable(effect: DelayableEffect, options?: DelayableOptions): ShallowReactive<Delayable>;
10
- declare function useDrawable(stroke: DrawableStroke, options?: DrawableOptions): ShallowReactive<Drawable>;
4
+ declare function useAnimateable<Value extends string | number | any[]>(keyframes: AnimateableKeyframe<Value>[], options?: AnimateableOptions): Reactive<Animateable<Value>>;
5
+ declare function useBroadcastable<State>(state: State, options?: BroadcastableOptions): Reactive<Broadcastable<State>>;
6
+ declare function useCompareable(string: string, options?: CompareableOptions): Reactive<Compareable>;
7
+ declare function useCompleteable(string: string, options?: CompleteableOptions): Reactive<Completeable>;
8
+ declare function useCopyable(string: string, options?: CopyableOptions): Reactive<Copyable>;
9
+ declare function useDelayable(effect: DelayableEffect, options?: DelayableOptions): Reactive<Delayable>;
10
+ declare function useDrawable(stroke: DrawableStroke, options?: DrawableOptions): Reactive<Drawable>;
11
11
  declare function useFetchable<ResolveableValue>(resource: string, options?: FetchableOptions): Reactive<Fetchable<ResolveableValue>>;
12
- declare function useFullscreenable<ElementType extends Element>(getElement: FullscreenableGetElement<ElementType>, options?: FullscreenableOptions): ShallowReactive<Fullscreenable<ElementType>>;
13
- declare function useGrantable(descriptor: PermissionDescriptor, options?: GrantableOptions): ShallowReactive<Grantable>;
14
- declare function useListenable<Type extends ListenableSupportedType, RecognizeableMetadata extends Record<any, any> = Record<any, any>>(type: Type, options?: ListenableOptions<Type, RecognizeableMetadata>): ShallowReactive<Listenable<Type, RecognizeableMetadata>>;
15
- declare function useNavigateable<Item>(array: Item[], options?: NavigateableOptions): ShallowReactive<Navigateable<Item>>;
16
- declare function usePickable<Item>(array: Item[], options?: PickableOptions): ShallowReactive<Pickable<Item>>;
17
- declare function useRecognizeable<Type extends ListenableSupportedType, Metadata extends Record<any, any>>(sequence: ListenEffectParam<Type>[], options?: RecognizeableOptions<Type, Metadata>): ShallowReactive<Recognizeable<Type, Metadata>>;
18
- declare function useResolveable<Value>(getPromise: () => Promise<Value>, options?: ResolveableOptions): ShallowReactive<Resolveable<Value>>;
19
- declare function useShareable(shareData: ShareData, options?: ShareableOptions): ShallowReactive<Shareable>;
20
- declare function useStoreable<String extends string>(key: string, options?: StoreableOptions): ShallowReactive<Storeable<String>>;
12
+ declare function useFullscreenable<ElementType extends Element>(getElement: FullscreenableGetElement<ElementType>, options?: FullscreenableOptions): Reactive<Fullscreenable<ElementType>>;
13
+ declare function useGrantable(descriptor: PermissionDescriptor, options?: GrantableOptions): Reactive<Grantable>;
14
+ declare function useListenable<Type extends ListenableSupportedType, RecognizeableMetadata extends Record<any, any> = Record<any, any>>(type: Type, options?: ListenableOptions<Type, RecognizeableMetadata>): Reactive<Listenable<Type, RecognizeableMetadata>>;
15
+ declare function useNavigateable<Item>(array: Item[], options?: NavigateableOptions): Reactive<Navigateable<Item>>;
16
+ declare function useOperateable<StoredObject extends Record<any, any>>(objectStore: DefinedIDBObjectStore<StoredObject>, options?: OperateableOptions): Reactive<Operateable<StoredObject>>;
17
+ declare function usePickable<Item>(array: Item[], options?: PickableOptions): Reactive<Pickable<Item>>;
18
+ declare function useRecognizeable<Type extends ListenableSupportedType, Metadata extends Record<any, any>>(sequence: ListenEffectParam<Type>[], options?: RecognizeableOptions<Type, Metadata>): Reactive<Recognizeable<Type, Metadata>>;
19
+ declare function useResolveable<Value>(getPromise: () => Promise<Value>, options?: ResolveableOptions): Reactive<Resolveable<Value>>;
20
+ declare function useShareable(shareData: ShareData, options?: ShareableOptions): Reactive<Shareable>;
21
+ declare function useStoreable<String extends string>(key: string, options?: StoreableOptions): Reactive<Storeable<String>>;
22
+ declare function useTransactable(name: string, options?: TransactableOptions): Reactive<Transactable>;
21
23
 
22
- export { useAnimateable, useBroadcastable, useCompareable, useCompleteable, useCopyable, useDelayable, useDrawable, useFetchable, useFullscreenable, useGrantable, useListenable, useNavigateable, usePickable, useRecognizeable, useResolveable, useShareable, useStoreable };
24
+ export { useAnimateable, useBroadcastable, useCompareable, useCompleteable, useCopyable, useDelayable, useDrawable, useFetchable, useFullscreenable, useGrantable, useListenable, useNavigateable, useOperateable, usePickable, useRecognizeable, useResolveable, useShareable, useStoreable, useTransactable };
package/lib/index.js CHANGED
@@ -1,43 +1,43 @@
1
- import { shallowReactive, onScopeDispose, reactive } from 'vue';
2
- import { Animateable, Broadcastable, Compareable, Completeable, Copyable, Delayable, Drawable, Fetchable, Fullscreenable, Grantable, Listenable, Navigateable, Pickable, Recognizeable, Resolveable, Shareable, Storeable } from '@baleada/logic';
1
+ import { reactive, onScopeDispose } from 'vue';
2
+ import { Animateable, Broadcastable, Compareable, Completeable, Copyable, Delayable, Drawable, Fetchable, Fullscreenable, Grantable, Listenable, Navigateable, Operateable, Pickable, Recognizeable, Resolveable, Shareable, Storeable, Transactable } from '@baleada/logic';
3
3
 
4
4
  function useAnimateable(keyframes, options) {
5
5
  const instance = new Animateable(keyframes, options);
6
- const reactiveInstance = shallowReactive(instance);
6
+ const reactiveInstance = reactive(instance);
7
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
- const reactiveInstance = shallowReactive(instance);
12
+ const reactiveInstance = reactive(instance);
13
13
  onScopeDispose(() => reactiveInstance.stop());
14
14
  return reactiveInstance;
15
15
  }
16
16
  function useCompareable(string, options) {
17
17
  const instance = new Compareable(string, options);
18
- const reactiveInstance = shallowReactive(instance);
18
+ const reactiveInstance = reactive(instance);
19
19
  return reactiveInstance;
20
20
  }
21
21
  function useCompleteable(string, options) {
22
22
  const instance = new Completeable(string, options);
23
- const reactiveInstance = shallowReactive(instance);
23
+ const reactiveInstance = reactive(instance);
24
24
  return reactiveInstance;
25
25
  }
26
26
  function useCopyable(string, options) {
27
27
  const instance = new Copyable(string, options);
28
- const reactiveInstance = shallowReactive(instance);
28
+ const reactiveInstance = reactive(instance);
29
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
- const reactiveInstance = shallowReactive(instance);
34
+ const reactiveInstance = reactive(instance);
35
35
  onScopeDispose(() => reactiveInstance.stop());
36
36
  return reactiveInstance;
37
37
  }
38
38
  function useDrawable(stroke, options) {
39
39
  const instance = new Drawable(stroke, options);
40
- const reactiveInstance = shallowReactive(instance);
40
+ const reactiveInstance = reactive(instance);
41
41
  return reactiveInstance;
42
42
  }
43
43
  function useFetchable(resource, options) {
@@ -47,49 +47,61 @@ function useFetchable(resource, options) {
47
47
  }
48
48
  function useFullscreenable(getElement, options) {
49
49
  const instance = new Fullscreenable(getElement, options);
50
- const reactiveInstance = shallowReactive(instance);
50
+ const reactiveInstance = reactive(instance);
51
51
  return reactiveInstance;
52
52
  }
53
53
  function useGrantable(descriptor, options) {
54
54
  const instance = new Grantable(descriptor, options);
55
- const reactiveInstance = shallowReactive(instance);
55
+ const reactiveInstance = reactive(instance);
56
56
  return reactiveInstance;
57
57
  }
58
58
  function useListenable(type, options) {
59
59
  const instance = new Listenable(type, options);
60
- const reactiveInstance = shallowReactive(instance);
60
+ const reactiveInstance = reactive(instance);
61
61
  onScopeDispose(() => reactiveInstance.stop());
62
62
  return reactiveInstance;
63
63
  }
64
64
  function useNavigateable(array, options) {
65
65
  const instance = new Navigateable(array, options);
66
- const reactiveInstance = shallowReactive(instance);
66
+ const reactiveInstance = reactive(instance);
67
+ return reactiveInstance;
68
+ }
69
+ function useOperateable(objectStore, options) {
70
+ const instance = new Operateable(objectStore, options);
71
+ const reactiveInstance = reactive(instance);
72
+ onScopeDispose(() => reactiveInstance.stop());
67
73
  return reactiveInstance;
68
74
  }
69
75
  function usePickable(array, options) {
70
76
  const instance = new Pickable(array, options);
71
- const reactiveInstance = shallowReactive(instance);
77
+ const reactiveInstance = reactive(instance);
72
78
  return reactiveInstance;
73
79
  }
74
80
  function useRecognizeable(sequence, options) {
75
81
  const instance = new Recognizeable(sequence, options);
76
- const reactiveInstance = shallowReactive(instance);
82
+ const reactiveInstance = reactive(instance);
77
83
  return reactiveInstance;
78
84
  }
79
85
  function useResolveable(getPromise, options) {
80
86
  const instance = new Resolveable(getPromise, options);
81
- const reactiveInstance = shallowReactive(instance);
87
+ const reactiveInstance = reactive(instance);
82
88
  return reactiveInstance;
83
89
  }
84
90
  function useShareable(shareData, options) {
85
91
  const instance = new Shareable(shareData, options);
86
- const reactiveInstance = shallowReactive(instance);
92
+ const reactiveInstance = reactive(instance);
87
93
  return reactiveInstance;
88
94
  }
89
95
  function useStoreable(key, options) {
90
96
  const instance = new Storeable(key, options);
91
- const reactiveInstance = shallowReactive(instance);
97
+ const reactiveInstance = reactive(instance);
98
+ return reactiveInstance;
99
+ }
100
+ function useTransactable(name, options) {
101
+ const instance = new Transactable(name, options);
102
+ const reactiveInstance = reactive(instance);
103
+ onScopeDispose(() => reactiveInstance.stop());
92
104
  return reactiveInstance;
93
105
  }
94
106
 
95
- export { useAnimateable, useBroadcastable, useCompareable, useCompleteable, useCopyable, useDelayable, useDrawable, useFetchable, useFullscreenable, useGrantable, useListenable, useNavigateable, usePickable, useRecognizeable, useResolveable, useShareable, useStoreable };
107
+ export { useAnimateable, useBroadcastable, useCompareable, useCompleteable, useCopyable, useDelayable, useDrawable, useFetchable, useFullscreenable, useGrantable, useListenable, useNavigateable, useOperateable, usePickable, useRecognizeable, useResolveable, useShareable, useStoreable, useTransactable };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@baleada/vue-composition",
3
- "version": "0.11.2",
3
+ "version": "0.11.3",
4
4
  "description": "Functions that expose Baleada Logic for composition in Vue.",
5
5
  "main": "lib/index.cjs",
6
6
  "module": "lib/index.js",
@@ -49,7 +49,7 @@
49
49
  "sideEffects": false,
50
50
  "dependencies": {
51
51
  "@babel/runtime": "^7.22.5",
52
- "@baleada/logic": "^0.24.19",
52
+ "@baleada/logic": "^0.24.21",
53
53
  "vue": "^3.5.13"
54
54
  }
55
55
  }