@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/README.md +2 -0
- package/index.cjs +409 -311
- package/index.d.ts +45 -5
- package/index.iife.js +408 -313
- package/index.iife.min.js +1 -1
- package/index.mjs +408 -313
- package/package.json +19 -5
- package/useAxios.cjs +69 -65
- package/useAxios.d.ts +1 -1
- package/useAxios.iife.js +70 -66
- package/useAxios.iife.min.js +1 -1
- package/useAxios.mjs +69 -65
- package/useCookies.cjs +59 -71
- package/useCookies.iife.js +60 -72
- package/useCookies.iife.min.js +1 -1
- package/useCookies.mjs +59 -71
- package/useDrauu.cjs +127 -0
- package/useDrauu.d.ts +32 -0
- package/useDrauu.iife.js +186 -0
- package/useDrauu.iife.min.js +1 -0
- package/useDrauu.mjs +123 -0
- package/useFocusTrap/component.cjs +31 -0
- package/useFocusTrap/component.d.ts +6 -0
- package/useFocusTrap/component.mjs +27 -0
- package/useFocusTrap.cjs +78 -104
- package/useFocusTrap.iife.js +83 -109
- package/useFocusTrap.iife.min.js +1 -1
- package/useFocusTrap.mjs +79 -105
- package/useFuse.cjs +41 -0
- package/useFuse.d.ts +16 -0
- package/useFuse.iife.js +102 -0
- package/useFuse.iife.min.js +1 -0
- package/useFuse.mjs +33 -0
- package/useJwt.cjs +20 -24
- package/useJwt.iife.js +21 -25
- package/useJwt.iife.min.js +1 -1
- package/useJwt.mjs +20 -24
- package/useNProgress.cjs +28 -37
- package/useNProgress.iife.js +29 -38
- package/useNProgress.iife.min.js +1 -1
- package/useNProgress.mjs +28 -37
- package/useQRCode.cjs +8 -15
- package/useQRCode.iife.js +9 -16
- package/useQRCode.iife.min.js +1 -1
- package/useQRCode.mjs +8 -15
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 {
|
|
8
|
-
import {
|
|
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
|
|
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
|
-
|
|
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 };
|