@baleada/vue-composition 0.10.11 → 0.10.13
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 +6 -3
- package/lib/index.js +18 -2
- package/package.json +12 -11
package/lib/index.d.ts
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import { Ref } from 'vue';
|
|
2
|
-
import { AnimateableKeyframe, AnimateableOptions, Animateable, CompleteableOptions, Completeable, CopyableOptions, Copyable, DelayableEffect, DelayableOptions, Delayable, DrawableState, DrawableOptions, Drawable, FetchableOptions, Fetchable, FullscreenableGetElement, FullscreenableOptions, Fullscreenable, GrantableOptions, Grantable, ListenableSupportedType, ListenableOptions, Listenable, NavigateableOptions, Navigateable, PickableOptions, Pickable, ListenEffectParam, RecognizeableOptions, Recognizeable, ResolveableGetPromise, ResolveableOptions, Resolveable, SanitizeableOptions, Sanitizeable, SearchableOptions, Searchable, StoreableOptions, Storeable } from '@baleada/logic';
|
|
2
|
+
import { AnimateableKeyframe, AnimateableOptions, Animateable, BroadcastableOptions, Broadcastable, CompareableOptions, Compareable, CompleteableOptions, Completeable, CopyableOptions, Copyable, DelayableEffect, DelayableOptions, Delayable, DrawableState, DrawableOptions, Drawable, FetchableOptions, Fetchable, FullscreenableGetElement, FullscreenableOptions, Fullscreenable, GrantableOptions, Grantable, ListenableSupportedType, ListenableOptions, Listenable, NavigateableOptions, Navigateable, PickableOptions, Pickable, ListenEffectParam, RecognizeableOptions, Recognizeable, ResolveableGetPromise, ResolveableOptions, Resolveable, SanitizeableOptions, Sanitizeable, SearchableOptions, Searchable, ShareableOptions, Shareable, StoreableOptions, Storeable } from '@baleada/logic';
|
|
3
3
|
|
|
4
4
|
declare function useAnimateable(keyframes: AnimateableKeyframe[], options?: AnimateableOptions): Ref<Animateable>;
|
|
5
|
+
declare function useBroadcastable<State>(state: State, options?: BroadcastableOptions): Ref<Broadcastable<State>>;
|
|
6
|
+
declare function useCompareable(string: string, options?: CompareableOptions): Ref<Compareable>;
|
|
5
7
|
declare function useCompleteable(string: string, options?: CompleteableOptions): Ref<Completeable>;
|
|
6
8
|
declare function useCopyable(string: string, options?: CopyableOptions): Ref<Copyable>;
|
|
7
9
|
declare function useDelayable(effect: DelayableEffect, options?: DelayableOptions): Ref<Delayable>;
|
|
@@ -16,6 +18,7 @@ declare function useRecognizeable<Type extends ListenableSupportedType, Metadata
|
|
|
16
18
|
declare function useResolveable<Value>(getPromise: ResolveableGetPromise<Value>, options?: ResolveableOptions): Ref<Resolveable<Value>>;
|
|
17
19
|
declare function useSanitizeable(html: string, options?: SanitizeableOptions): Ref<Sanitizeable>;
|
|
18
20
|
declare function useSearchable<Item extends string | object>(candidates: Item[], options?: SearchableOptions<Item>): Ref<Searchable<Item>>;
|
|
19
|
-
declare function
|
|
21
|
+
declare function useShareable(state: ShareData, options?: ShareableOptions): Ref<Shareable>;
|
|
22
|
+
declare function useStoreable<String extends string>(key: string, options?: StoreableOptions): Ref<Storeable<String>>;
|
|
20
23
|
|
|
21
|
-
export { useAnimateable, useCompleteable, useCopyable, useDelayable, useDrawable, useFetchable, useFullscreenable, useGrantable, useListenable, useNavigateable, usePickable, useRecognizeable, useResolveable, useSanitizeable, useSearchable, useStoreable };
|
|
24
|
+
export { useAnimateable, useBroadcastable, useCompareable, useCompleteable, useCopyable, useDelayable, useDrawable, useFetchable, useFullscreenable, useGrantable, useListenable, useNavigateable, usePickable, useRecognizeable, useResolveable, useSanitizeable, useSearchable, useShareable, useStoreable };
|
package/lib/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ref, onBeforeUnmount } from 'vue';
|
|
2
|
-
import { Animateable, Completeable, Copyable, Delayable, Drawable, Fetchable, Fullscreenable, Grantable, Listenable, Navigateable, Pickable, Recognizeable, Resolveable, Sanitizeable, Searchable, Storeable } from '@baleada/logic';
|
|
2
|
+
import { Animateable, Broadcastable, Compareable, Completeable, Copyable, Delayable, Drawable, Fetchable, Fullscreenable, Grantable, Listenable, Navigateable, Pickable, Recognizeable, Resolveable, Sanitizeable, Searchable, Shareable, Storeable } from '@baleada/logic';
|
|
3
3
|
|
|
4
4
|
function useAnimateable(keyframes, options) {
|
|
5
5
|
const instance = new Animateable(keyframes, options);
|
|
@@ -7,6 +7,17 @@ function useAnimateable(keyframes, options) {
|
|
|
7
7
|
onBeforeUnmount(() => reactiveInstance.value.stop());
|
|
8
8
|
return reactiveInstance;
|
|
9
9
|
}
|
|
10
|
+
function useBroadcastable(state, options) {
|
|
11
|
+
const instance = new Broadcastable(state, options);
|
|
12
|
+
const reactiveInstance = ref(instance);
|
|
13
|
+
onBeforeUnmount(() => reactiveInstance.value.stop());
|
|
14
|
+
return reactiveInstance;
|
|
15
|
+
}
|
|
16
|
+
function useCompareable(string, options) {
|
|
17
|
+
const instance = new Compareable(string, options);
|
|
18
|
+
const reactiveInstance = ref(instance);
|
|
19
|
+
return reactiveInstance;
|
|
20
|
+
}
|
|
10
21
|
function useCompleteable(string, options) {
|
|
11
22
|
const instance = new Completeable(string, options);
|
|
12
23
|
const reactiveInstance = ref(instance);
|
|
@@ -80,10 +91,15 @@ function useSearchable(candidates, options) {
|
|
|
80
91
|
const reactiveInstance = ref(instance);
|
|
81
92
|
return reactiveInstance;
|
|
82
93
|
}
|
|
94
|
+
function useShareable(state, options) {
|
|
95
|
+
const instance = new Shareable(state, options);
|
|
96
|
+
const reactiveInstance = ref(instance);
|
|
97
|
+
return reactiveInstance;
|
|
98
|
+
}
|
|
83
99
|
function useStoreable(key, options) {
|
|
84
100
|
const instance = new Storeable(key, options);
|
|
85
101
|
const reactiveInstance = ref(instance);
|
|
86
102
|
return reactiveInstance;
|
|
87
103
|
}
|
|
88
104
|
|
|
89
|
-
export { useAnimateable, useCompleteable, useCopyable, useDelayable, useDrawable, useFetchable, useFullscreenable, useGrantable, useListenable, useNavigateable, usePickable, useRecognizeable, useResolveable, useSanitizeable, useSearchable, useStoreable };
|
|
105
|
+
export { useAnimateable, useBroadcastable, useCompareable, useCompleteable, useCopyable, useDelayable, useDrawable, useFetchable, useFullscreenable, useGrantable, useListenable, useNavigateable, usePickable, useRecognizeable, useResolveable, useSanitizeable, useSearchable, useShareable, 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.13",
|
|
4
4
|
"description": "Functions that expose Baleada Logic for composition in Vue.",
|
|
5
5
|
"main": "lib/index.cjs",
|
|
6
6
|
"module": "lib/index.js",
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
},
|
|
11
11
|
"scripts": {
|
|
12
12
|
"src": "node -r esbuild-register scripts/src.ts",
|
|
13
|
-
"prepare": "npm run src && tsc && rollup --config rollup.config.ts",
|
|
13
|
+
"prepare": "npm run src && tsc && rollup --config rollup.config.ts --configPlugin typescript --bundleConfigAsCjs",
|
|
14
14
|
"test:only": "run() { uvu -r esbuild-register tests/$2 $1.test.js$; }; run",
|
|
15
15
|
"test": "npm run test:only ."
|
|
16
16
|
},
|
|
@@ -35,19 +35,20 @@
|
|
|
35
35
|
},
|
|
36
36
|
"homepage": "https://baleada.netlify,com",
|
|
37
37
|
"devDependencies": {
|
|
38
|
-
"@baleada/prepare": "^0.5.
|
|
38
|
+
"@baleada/prepare": "^0.5.42",
|
|
39
39
|
"@types/node": "^14.14.41",
|
|
40
40
|
"dotenv": "^10.0.0",
|
|
41
|
-
"esbuild": "^0.
|
|
42
|
-
"esbuild-register": "^
|
|
43
|
-
"rollup": "^
|
|
44
|
-
"
|
|
45
|
-
"
|
|
41
|
+
"esbuild": "^0.18.2",
|
|
42
|
+
"esbuild-register": "^3.4.2",
|
|
43
|
+
"rollup": "^3.25.1",
|
|
44
|
+
"tslib": "^2.4.1",
|
|
45
|
+
"typescript": "^5.1.3",
|
|
46
|
+
"uvu": "^0.5.6"
|
|
46
47
|
},
|
|
47
48
|
"sideEffects": false,
|
|
48
49
|
"dependencies": {
|
|
49
|
-
"@babel/runtime": "^7.
|
|
50
|
-
"@baleada/logic": "^0.
|
|
51
|
-
"vue": "^3.
|
|
50
|
+
"@babel/runtime": "^7.22.5",
|
|
51
|
+
"@baleada/logic": "^0.23.0",
|
|
52
|
+
"vue": "^3.3.4"
|
|
52
53
|
}
|
|
53
54
|
}
|