@baleada/vue-composition 0.10.5 → 0.10.9

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,20 +1,22 @@
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, PickableOptions, Pickable, 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>>;
12
13
  declare function useListenable<Type extends ListenableSupportedType, RecognizeableMetadata extends Record<any, any> = Record<any, any>>(type: Type, options?: ListenableOptions<Type, RecognizeableMetadata>): Ref<Listenable<Type, RecognizeableMetadata>>;
13
14
  declare function useNavigateable<Item>(array: Item[], options?: NavigateableOptions): Ref<Navigateable<Item>>;
15
+ declare function usePickable<Item>(array: Item[], options?: PickableOptions): Ref<Pickable<Item>>;
14
16
  declare function useRecognizeable<Type extends ListenableSupportedType, Metadata extends Record<any, any>>(sequence: ListenEffectParam<Type>[], options?: RecognizeableOptions<Type, Metadata>): Ref<Recognizeable<Type, Metadata>>;
15
17
  declare function useResolveable<Value>(getPromise: ResolveableGetPromise<Value>, options?: ResolveableOptions): Ref<Resolveable<Value>>;
16
18
  declare function useSanitizeable(html: string, options?: SanitizeableOptions): Ref<Sanitizeable>;
17
19
  declare function useSearchable<Item extends string | object>(candidates: Item[], options?: SearchableOptions<Item>): Ref<Searchable<Item>>;
18
20
  declare function useStoreable(key: string, options?: StoreableOptions): Ref<Storeable>;
19
21
 
20
- export { useAnimateable, useCompleteable, useCopyable, useDelayable, useDispatchable, useFetchable, useFullscreenable, useGrantable, useListenable, useNavigateable, useRecognizeable, useResolveable, useSanitizeable, useSearchable, useStoreable };
22
+ export { useAnimateable, useCompleteable, useCopyable, useDelayable, useDispatchable, useDrawable, useFetchable, useFullscreenable, useGrantable, useListenable, useNavigateable, usePickable, useRecognizeable, useResolveable, useSanitizeable, useSearchable, useStoreable };
package/lib/index.js CHANGED
@@ -1,5 +1,5 @@
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, Pickable, Recognizeable, Resolveable, Sanitizeable, Searchable, Storeable } from '@baleada/logic';
3
3
 
4
4
  function useAnimateable(keyframes, options) {
5
5
  const instance = new Animateable(keyframes, options);
@@ -29,6 +29,11 @@ function useDispatchable(type, options) {
29
29
  const reactiveInstance = ref(instance);
30
30
  return reactiveInstance;
31
31
  }
32
+ function useDrawable(stroke, options) {
33
+ const instance = new Drawable(stroke, options);
34
+ const reactiveInstance = ref(instance);
35
+ return reactiveInstance;
36
+ }
32
37
  function useFetchable(resource, options) {
33
38
  const instance = new Fetchable(resource, options);
34
39
  const reactiveInstance = ref(instance);
@@ -55,6 +60,11 @@ function useNavigateable(array, options) {
55
60
  const reactiveInstance = ref(instance);
56
61
  return reactiveInstance;
57
62
  }
63
+ function usePickable(array, options) {
64
+ const instance = new Pickable(array, options);
65
+ const reactiveInstance = ref(instance);
66
+ return reactiveInstance;
67
+ }
58
68
  function useRecognizeable(sequence, options) {
59
69
  const instance = new Recognizeable(sequence, options);
60
70
  const reactiveInstance = ref(instance);
@@ -81,4 +91,4 @@ function useStoreable(key, options) {
81
91
  return reactiveInstance;
82
92
  }
83
93
 
84
- export { useAnimateable, useCompleteable, useCopyable, useDelayable, useDispatchable, useFetchable, useFullscreenable, useGrantable, useListenable, useNavigateable, useRecognizeable, useResolveable, useSanitizeable, useSearchable, useStoreable };
94
+ export { useAnimateable, useCompleteable, useCopyable, useDelayable, useDispatchable, useDrawable, useFetchable, useFullscreenable, useGrantable, useListenable, useNavigateable, usePickable, 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.5",
3
+ "version": "0.10.9",
4
4
  "description": "Functions that expose Baleada Logic for composition in Vue.",
5
5
  "main": "lib/index.cjs",
6
6
  "module": "lib/index.js",
@@ -35,7 +35,7 @@
35
35
  },
36
36
  "homepage": "https://baleada.netlify,com",
37
37
  "devDependencies": {
38
- "@baleada/prepare": "^0.5.6",
38
+ "@baleada/prepare": "^0.5.20",
39
39
  "@types/node": "^14.14.41",
40
40
  "dotenv": "^10.0.0",
41
41
  "esbuild": "^0.12.19",
@@ -47,7 +47,7 @@
47
47
  "sideEffects": false,
48
48
  "dependencies": {
49
49
  "@babel/runtime": "^7.13.17",
50
- "@baleada/logic": "^0.20.10",
50
+ "@baleada/logic": "^0.21.0",
51
51
  "vue": "^3.2.2"
52
52
  }
53
53
  }