@vueuse/integrations 6.3.3 → 6.6.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.
package/index.d.ts CHANGED
@@ -4,8 +4,10 @@ import { AxiosResponse, AxiosError, AxiosRequestConfig, AxiosInstance } from 'ax
4
4
  import * as universal_cookie from 'universal-cookie';
5
5
  import universal_cookie__default from 'universal-cookie';
6
6
  import { IncomingMessage } from 'http';
7
- import { Fn, MaybeElementRef } from '@vueuse/core';
8
- import { Options, ActivateOptions, DeactivateOptions } from 'focus-trap';
7
+ import { Options, Drauu, Brush } from 'drauu';
8
+ import { EventHookOn, MaybeElementRef, Fn } from '@vueuse/core';
9
+ import { Options as Options$1, ActivateOptions, DeactivateOptions } from 'focus-trap';
10
+ import Fuse from 'fuse.js';
9
11
  import { MaybeRef } from '@vueuse/shared';
10
12
  import { JwtPayload, JwtHeader } from 'jwt-decode';
11
13
  import nprogress, { NProgressOptions } from 'nprogress';
@@ -33,7 +35,7 @@ interface UseAxiosReturn<T> {
33
35
  */
34
36
  aborted: Ref<boolean>;
35
37
  /**
36
- * Any erros that may have occurred
38
+ * Any errors that may have occurred
37
39
  */
38
40
  error: Ref<AxiosError<T> | undefined>;
39
41
  /**
@@ -94,7 +96,34 @@ declare function useCookies(dependencies?: string[] | null, { doNotParse, autoUp
94
96
  removeChangeListener: (callback: universal_cookie.CookieChangeListener) => void;
95
97
  };
96
98
 
97
- interface UseFocusTrapOptions extends Options {
99
+ declare type UseDrauuOptions = Omit<Options, 'el'>;
100
+ interface UseDrauuReturn {
101
+ drauuInstance: Ref<Drauu | undefined>;
102
+ load: (svg: string) => void;
103
+ dump: () => string | undefined;
104
+ clear: () => void;
105
+ cancel: () => void;
106
+ undo: () => boolean | undefined;
107
+ redo: () => boolean | undefined;
108
+ canUndo: Ref<boolean>;
109
+ canRedo: Ref<boolean>;
110
+ brush: Ref<Brush>;
111
+ onChanged: EventHookOn;
112
+ onCommitted: EventHookOn;
113
+ onStart: EventHookOn;
114
+ onEnd: EventHookOn;
115
+ onCanceled: EventHookOn;
116
+ }
117
+ /**
118
+ * Reactive drauu
119
+ *
120
+ * @see https://vueuse.org/useDrauu
121
+ * @param target The target svg element
122
+ * @param options Drauu Options
123
+ */
124
+ declare function useDrauu(target: MaybeElementRef, options?: UseDrauuOptions): UseDrauuReturn;
125
+
126
+ interface UseFocusTrapOptions extends Options$1 {
98
127
  /**
99
128
  * Immediately activate the trap
100
129
  */
@@ -146,6 +175,17 @@ interface UseFocusTrapReturn {
146
175
  */
147
176
  declare function useFocusTrap(target: MaybeElementRef, options?: UseFocusTrapOptions): UseFocusTrapReturn;
148
177
 
178
+ declare type FuseOptions<T> = Fuse.IFuseOptions<T>;
179
+ declare type UseFuseOptions<T> = {
180
+ fuseOptions?: FuseOptions<T>;
181
+ resultLimit?: number;
182
+ matchAllWhenSearchEmpty?: boolean;
183
+ };
184
+ declare function useFuse<DataItem>(search: MaybeRef<string>, data: MaybeRef<DataItem[]>, options?: MaybeRef<UseFuseOptions<DataItem>>): {
185
+ results: ComputedRef<Fuse.FuseResult<DataItem>[]>;
186
+ };
187
+ declare type UseFuseReturn = ReturnType<typeof useFuse>;
188
+
149
189
  interface JwtOptions<Fallback> {
150
190
  /**
151
191
  * Value returned when encounter error on decoding
@@ -194,4 +234,4 @@ declare function useNProgress(currentProgress?: MaybeRef<number | null | undefin
194
234
  */
195
235
  declare function useQRCode(text: MaybeRef<string>, options?: QRCode.QRCodeToDataURLOptions): vue_demi.Ref<string>;
196
236
 
197
- export { JwtOptions, JwtResult, UseAxiosReturn, UseFocusTrapOptions, UseFocusTrapReturn, createCookies, useAxios, useCookies, useFocusTrap, useJwt, useNProgress, useQRCode };
237
+ export { FuseOptions, JwtOptions, JwtResult, UseAxiosReturn, UseDrauuOptions, UseDrauuReturn, UseFocusTrapOptions, UseFocusTrapReturn, UseFuseOptions, UseFuseReturn, createCookies, useAxios, useCookies, useDrauu, useFocusTrap, useFuse, useJwt, useNProgress, useQRCode };