@baleada/vue-composition 0.10.2 → 0.10.6
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 +3 -2
- package/lib/index.js +56 -51
- package/package.json +4 -4
package/lib/index.d.ts
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { Ref } from 'vue';
|
|
2
|
-
import { AnimateableKeyframe, AnimateableOptions, Animateable, CompleteableOptions, Completeable, CopyableOptions, Copyable, DelayableEffect, DelayableOptions, Delayable, ListenableSupportedEventType, DispatchableOptions, Dispatchable, FetchableOptions, Fetchable, FullscreenableGetElement, FullscreenableOptions, Fullscreenable, GrantableOptions, Grantable, ListenableSupportedType, ListenableOptions, Listenable, NavigateableOptions, Navigateable, ListenEffectParam, RecognizeableOptions, Recognizeable, ResolveableGetPromise, ResolveableOptions, Resolveable, SanitizeableOptions, Sanitizeable, SearchableOptions, Searchable, StoreableOptions, Storeable } from '@baleada/logic';
|
|
2
|
+
import { AnimateableKeyframe, AnimateableOptions, Animateable, CompleteableOptions, Completeable, CopyableOptions, Copyable, DelayableEffect, DelayableOptions, Delayable, ListenableSupportedEventType, DispatchableOptions, Dispatchable, DrawableState, DrawableOptions, Drawable, FetchableOptions, Fetchable, FullscreenableGetElement, FullscreenableOptions, Fullscreenable, GrantableOptions, Grantable, ListenableSupportedType, ListenableOptions, Listenable, NavigateableOptions, Navigateable, ListenEffectParam, RecognizeableOptions, Recognizeable, ResolveableGetPromise, ResolveableOptions, Resolveable, SanitizeableOptions, Sanitizeable, SearchableOptions, Searchable, StoreableOptions, Storeable } from '@baleada/logic';
|
|
3
3
|
|
|
4
4
|
declare function useAnimateable(keyframes: AnimateableKeyframe[], options?: AnimateableOptions): Ref<Animateable>;
|
|
5
5
|
declare function useCompleteable(string: string, options?: CompleteableOptions): Ref<Completeable>;
|
|
6
6
|
declare function useCopyable(string: string, options?: CopyableOptions): Ref<Copyable>;
|
|
7
7
|
declare function useDelayable(effect: DelayableEffect, options?: DelayableOptions): Ref<Delayable>;
|
|
8
8
|
declare function useDispatchable<EventType extends ListenableSupportedEventType>(type: EventType, options?: DispatchableOptions): Ref<Dispatchable<EventType>>;
|
|
9
|
+
declare function useDrawable(stroke: DrawableState, options?: DrawableOptions): Ref<Drawable>;
|
|
9
10
|
declare function useFetchable(resource: string, options?: FetchableOptions): Ref<Fetchable>;
|
|
10
11
|
declare function useFullscreenable<ElementType extends Element>(getElement: FullscreenableGetElement<ElementType>, options?: FullscreenableOptions): Ref<Fullscreenable<ElementType>>;
|
|
11
12
|
declare function useGrantable<DescriptorType extends PermissionDescriptor>(descriptor: DescriptorType, options?: GrantableOptions): Ref<Grantable<DescriptorType>>;
|
|
@@ -17,4 +18,4 @@ declare function useSanitizeable(html: string, options?: SanitizeableOptions): R
|
|
|
17
18
|
declare function useSearchable<Item extends string | object>(candidates: Item[], options?: SearchableOptions<Item>): Ref<Searchable<Item>>;
|
|
18
19
|
declare function useStoreable(key: string, options?: StoreableOptions): Ref<Storeable>;
|
|
19
20
|
|
|
20
|
-
export { useAnimateable, useCompleteable, useCopyable, useDelayable, useDispatchable, useFetchable, useFullscreenable, useGrantable, useListenable, useNavigateable, useRecognizeable, useResolveable, useSanitizeable, useSearchable, useStoreable };
|
|
21
|
+
export { useAnimateable, useCompleteable, useCopyable, useDelayable, useDispatchable, useDrawable, useFetchable, useFullscreenable, useGrantable, useListenable, useNavigateable, useRecognizeable, useResolveable, useSanitizeable, useSearchable, useStoreable };
|
package/lib/index.js
CHANGED
|
@@ -1,84 +1,89 @@
|
|
|
1
1
|
import { ref, onBeforeUnmount } from 'vue';
|
|
2
|
-
import { Animateable, Completeable, Copyable, Delayable, Dispatchable, Fetchable, Fullscreenable, Grantable, Listenable, Navigateable, Recognizeable, Resolveable, Sanitizeable, Searchable, Storeable } from '@baleada/logic';
|
|
2
|
+
import { Animateable, Completeable, Copyable, Delayable, Dispatchable, Drawable, Fetchable, Fullscreenable, Grantable, Listenable, Navigateable, Recognizeable, Resolveable, Sanitizeable, Searchable, Storeable } from '@baleada/logic';
|
|
3
3
|
|
|
4
4
|
function useAnimateable(keyframes, options) {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
5
|
+
const instance = new Animateable(keyframes, options);
|
|
6
|
+
const reactiveInstance = ref(instance);
|
|
7
|
+
onBeforeUnmount(() => reactiveInstance.value.stop());
|
|
8
|
+
return reactiveInstance;
|
|
9
9
|
}
|
|
10
10
|
function useCompleteable(string, options) {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
11
|
+
const instance = new Completeable(string, options);
|
|
12
|
+
const reactiveInstance = ref(instance);
|
|
13
|
+
return reactiveInstance;
|
|
14
14
|
}
|
|
15
15
|
function useCopyable(string, options) {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
16
|
+
const instance = new Copyable(string, options);
|
|
17
|
+
const reactiveInstance = ref(instance);
|
|
18
|
+
onBeforeUnmount(() => reactiveInstance.value.stop());
|
|
19
|
+
return reactiveInstance;
|
|
20
20
|
}
|
|
21
21
|
function useDelayable(effect, options) {
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
22
|
+
const instance = new Delayable(effect, options);
|
|
23
|
+
const reactiveInstance = ref(instance);
|
|
24
|
+
onBeforeUnmount(() => reactiveInstance.value.stop());
|
|
25
|
+
return reactiveInstance;
|
|
26
26
|
}
|
|
27
27
|
function useDispatchable(type, options) {
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
28
|
+
const instance = new Dispatchable(type, options);
|
|
29
|
+
const reactiveInstance = ref(instance);
|
|
30
|
+
return reactiveInstance;
|
|
31
|
+
}
|
|
32
|
+
function useDrawable(stroke, options) {
|
|
33
|
+
const instance = new Drawable(stroke, options);
|
|
34
|
+
const reactiveInstance = ref(instance);
|
|
35
|
+
return reactiveInstance;
|
|
31
36
|
}
|
|
32
37
|
function useFetchable(resource, options) {
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
38
|
+
const instance = new Fetchable(resource, options);
|
|
39
|
+
const reactiveInstance = ref(instance);
|
|
40
|
+
return reactiveInstance;
|
|
36
41
|
}
|
|
37
42
|
function useFullscreenable(getElement, options) {
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
43
|
+
const instance = new Fullscreenable(getElement, options);
|
|
44
|
+
const reactiveInstance = ref(instance);
|
|
45
|
+
return reactiveInstance;
|
|
41
46
|
}
|
|
42
47
|
function useGrantable(descriptor, options) {
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
48
|
+
const instance = new Grantable(descriptor, options);
|
|
49
|
+
const reactiveInstance = ref(instance);
|
|
50
|
+
return reactiveInstance;
|
|
46
51
|
}
|
|
47
52
|
function useListenable(type, options) {
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
53
|
+
const instance = new Listenable(type, options);
|
|
54
|
+
const reactiveInstance = ref(instance);
|
|
55
|
+
onBeforeUnmount(() => reactiveInstance.value.stop());
|
|
56
|
+
return reactiveInstance;
|
|
52
57
|
}
|
|
53
58
|
function useNavigateable(array, options) {
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
59
|
+
const instance = new Navigateable(array, options);
|
|
60
|
+
const reactiveInstance = ref(instance);
|
|
61
|
+
return reactiveInstance;
|
|
57
62
|
}
|
|
58
63
|
function useRecognizeable(sequence, options) {
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
64
|
+
const instance = new Recognizeable(sequence, options);
|
|
65
|
+
const reactiveInstance = ref(instance);
|
|
66
|
+
return reactiveInstance;
|
|
62
67
|
}
|
|
63
68
|
function useResolveable(getPromise, options) {
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
69
|
+
const instance = new Resolveable(getPromise, options);
|
|
70
|
+
const reactiveInstance = ref(instance);
|
|
71
|
+
return reactiveInstance;
|
|
67
72
|
}
|
|
68
73
|
function useSanitizeable(html, options) {
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
74
|
+
const instance = new Sanitizeable(html, options);
|
|
75
|
+
const reactiveInstance = ref(instance);
|
|
76
|
+
return reactiveInstance;
|
|
72
77
|
}
|
|
73
78
|
function useSearchable(candidates, options) {
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
79
|
+
const instance = new Searchable(candidates, options);
|
|
80
|
+
const reactiveInstance = ref(instance);
|
|
81
|
+
return reactiveInstance;
|
|
77
82
|
}
|
|
78
83
|
function useStoreable(key, options) {
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
84
|
+
const instance = new Storeable(key, options);
|
|
85
|
+
const reactiveInstance = ref(instance);
|
|
86
|
+
return reactiveInstance;
|
|
82
87
|
}
|
|
83
88
|
|
|
84
|
-
export { useAnimateable, useCompleteable, useCopyable, useDelayable, useDispatchable, useFetchable, useFullscreenable, useGrantable, useListenable, useNavigateable, useRecognizeable, useResolveable, useSanitizeable, useSearchable, useStoreable };
|
|
89
|
+
export { useAnimateable, useCompleteable, useCopyable, useDelayable, useDispatchable, useDrawable, useFetchable, useFullscreenable, useGrantable, useListenable, useNavigateable, useRecognizeable, useResolveable, useSanitizeable, useSearchable, useStoreable };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@baleada/vue-composition",
|
|
3
|
-
"version": "0.10.
|
|
3
|
+
"version": "0.10.6",
|
|
4
4
|
"description": "Functions that expose Baleada Logic for composition in Vue.",
|
|
5
5
|
"main": "lib/index.cjs",
|
|
6
6
|
"module": "lib/index.js",
|
|
@@ -40,14 +40,14 @@
|
|
|
40
40
|
"dotenv": "^10.0.0",
|
|
41
41
|
"esbuild": "^0.12.19",
|
|
42
42
|
"esbuild-register": "^2.6.0",
|
|
43
|
-
"rollup": "^2.56.
|
|
44
|
-
"typescript": "^4.3
|
|
43
|
+
"rollup": "^2.56.3",
|
|
44
|
+
"typescript": "^4.4.3",
|
|
45
45
|
"uvu": "^0.5.1"
|
|
46
46
|
},
|
|
47
47
|
"sideEffects": false,
|
|
48
48
|
"dependencies": {
|
|
49
49
|
"@babel/runtime": "^7.13.17",
|
|
50
|
-
"@baleada/logic": "^0.20.
|
|
50
|
+
"@baleada/logic": "^0.20.13",
|
|
51
51
|
"vue": "^3.2.2"
|
|
52
52
|
}
|
|
53
53
|
}
|