@vueuse/integrations 13.9.0 → 14.0.0-alpha.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.
Files changed (114) hide show
  1. package/dist/index.d.ts +473 -0
  2. package/dist/index.iife.js +772 -0
  3. package/dist/index.iife.min.js +1 -0
  4. package/dist/index.js +731 -0
  5. package/dist/useAsyncValidator/component.d.ts +19 -0
  6. package/dist/useAsyncValidator/component.js +20 -0
  7. package/dist/useAsyncValidator.d.ts +48 -0
  8. package/dist/useAsyncValidator.iife.js +99 -0
  9. package/dist/useAsyncValidator.iife.min.js +1 -0
  10. package/dist/useAsyncValidator.js +73 -0
  11. package/{useAxios.d.mts → dist/useAxios.d.ts} +86 -86
  12. package/dist/useAxios.iife.js +150 -0
  13. package/dist/useAxios.iife.min.js +1 -0
  14. package/dist/useAxios.js +124 -0
  15. package/{useChangeCase.d.mts → dist/useChangeCase.d.ts} +7 -9
  16. package/dist/useChangeCase.iife.js +61 -0
  17. package/dist/useChangeCase.iife.min.js +1 -0
  18. package/dist/useChangeCase.js +35 -0
  19. package/dist/useCookies.d.ts +64 -0
  20. package/dist/useCookies.iife.js +104 -0
  21. package/dist/useCookies.iife.min.js +1 -0
  22. package/dist/useCookies.js +77 -0
  23. package/dist/useDrauu.d.ts +33 -0
  24. package/dist/useDrauu.iife.js +146 -0
  25. package/dist/useDrauu.iife.min.js +1 -0
  26. package/dist/useDrauu.js +120 -0
  27. package/dist/useFocusTrap/component.d.ts +21 -0
  28. package/dist/useFocusTrap/component.js +17 -0
  29. package/dist/useFocusTrap.d.ts +55 -0
  30. package/dist/useFocusTrap.iife.js +97 -0
  31. package/dist/useFocusTrap.iife.min.js +1 -0
  32. package/dist/useFocusTrap.js +71 -0
  33. package/dist/useFuse.d.ts +33 -0
  34. package/dist/useFuse.iife.js +62 -0
  35. package/dist/useFuse.iife.min.js +1 -0
  36. package/dist/useFuse.js +36 -0
  37. package/dist/useIDBKeyval.d.ts +52 -0
  38. package/dist/useIDBKeyval.iife.js +93 -0
  39. package/dist/useIDBKeyval.iife.min.js +1 -0
  40. package/dist/useIDBKeyval.js +67 -0
  41. package/dist/useJwt.d.ts +28 -0
  42. package/dist/useJwt.iife.js +55 -0
  43. package/dist/useJwt.iife.min.js +1 -0
  44. package/dist/useJwt.js +29 -0
  45. package/dist/useNProgress.d.ts +21 -0
  46. package/dist/useNProgress.iife.js +66 -0
  47. package/dist/useNProgress.iife.min.js +1 -0
  48. package/dist/useNProgress.js +40 -0
  49. package/dist/useQRCode.d.ts +16 -0
  50. package/dist/useQRCode.iife.js +49 -0
  51. package/dist/useQRCode.iife.min.js +1 -0
  52. package/dist/useQRCode.js +23 -0
  53. package/dist/useSortable/component.d.ts +18 -0
  54. package/dist/useSortable/component.js +23 -0
  55. package/{useSortable.d.mts → dist/useSortable.d.ts} +20 -20
  56. package/dist/useSortable.iife.js +107 -0
  57. package/dist/useSortable.iife.min.js +1 -0
  58. package/dist/useSortable.js +78 -0
  59. package/package.json +27 -29
  60. package/index.d.mts +0 -458
  61. package/index.iife.js +0 -708
  62. package/index.iife.min.js +0 -1
  63. package/index.mjs +0 -685
  64. package/useAsyncValidator/component.d.mts +0 -27
  65. package/useAsyncValidator/component.mjs +0 -87
  66. package/useAsyncValidator.d.mts +0 -48
  67. package/useAsyncValidator.iife.js +0 -73
  68. package/useAsyncValidator.iife.min.js +0 -1
  69. package/useAsyncValidator.mjs +0 -72
  70. package/useAxios.iife.js +0 -124
  71. package/useAxios.iife.min.js +0 -1
  72. package/useAxios.mjs +0 -123
  73. package/useChangeCase.iife.js +0 -50
  74. package/useChangeCase.iife.min.js +0 -1
  75. package/useChangeCase.mjs +0 -29
  76. package/useCookies.d.mts +0 -56
  77. package/useCookies.iife.js +0 -64
  78. package/useCookies.iife.min.js +0 -1
  79. package/useCookies.mjs +0 -62
  80. package/useDrauu.d.mts +0 -33
  81. package/useDrauu.iife.js +0 -114
  82. package/useDrauu.iife.min.js +0 -1
  83. package/useDrauu.mjs +0 -114
  84. package/useFocusTrap/component.d.mts +0 -18
  85. package/useFocusTrap/component.mjs +0 -31
  86. package/useFocusTrap.d.mts +0 -55
  87. package/useFocusTrap.iife.js +0 -74
  88. package/useFocusTrap.iife.min.js +0 -1
  89. package/useFocusTrap.mjs +0 -74
  90. package/useFuse.d.mts +0 -33
  91. package/useFuse.iife.js +0 -45
  92. package/useFuse.iife.min.js +0 -1
  93. package/useFuse.mjs +0 -43
  94. package/useIDBKeyval.d.mts +0 -52
  95. package/useIDBKeyval.iife.js +0 -70
  96. package/useIDBKeyval.iife.min.js +0 -1
  97. package/useIDBKeyval.mjs +0 -69
  98. package/useJwt.d.mts +0 -28
  99. package/useJwt.iife.js +0 -27
  100. package/useJwt.iife.min.js +0 -1
  101. package/useJwt.mjs +0 -25
  102. package/useNProgress.d.mts +0 -21
  103. package/useNProgress.iife.js +0 -36
  104. package/useNProgress.iife.min.js +0 -1
  105. package/useNProgress.mjs +0 -35
  106. package/useQRCode.d.mts +0 -14
  107. package/useQRCode.iife.js +0 -20
  108. package/useQRCode.iife.min.js +0 -1
  109. package/useQRCode.mjs +0 -19
  110. package/useSortable/component.d.mts +0 -40
  111. package/useSortable/component.mjs +0 -89
  112. package/useSortable.iife.js +0 -66
  113. package/useSortable.iife.min.js +0 -1
  114. package/useSortable.mjs +0 -62
@@ -0,0 +1,473 @@
1
+ import { ConfigurableFlush, RemovableRef } from "@vueuse/shared";
2
+ import { Rules, ValidateError, ValidateOption } from "async-validator";
3
+ import * as vue0 from "vue";
4
+ import { ComputedRef, MaybeRef, MaybeRefOrGetter, Ref, ShallowRef, WritableComputedRef } from "vue";
5
+ import { AxiosInstance, AxiosRequestConfig, AxiosResponse } from "axios";
6
+ import * as changeCase from "change-case";
7
+ import { Options } from "change-case";
8
+ import * as universal_cookie0 from "universal-cookie";
9
+ import Cookie from "universal-cookie";
10
+ import { Arrayable, ConfigurableDocument, EventHookOn, Fn, MaybeComputedElementRef, MaybeElement } from "@vueuse/core";
11
+ import { Brush, Drauu, Options as Options$1 } from "drauu";
12
+ import { ActivateOptions, DeactivateOptions, Options as Options$2 } from "focus-trap";
13
+ import * as fuse_js0 from "fuse.js";
14
+ import Fuse, { FuseResult, IFuseOptions } from "fuse.js";
15
+ import { JwtHeader, JwtPayload } from "jwt-decode";
16
+ import nprogress, { NProgressOptions } from "nprogress";
17
+ import QRCode from "qrcode";
18
+ import Sortable, { Options as Options$3 } from "sortablejs";
19
+ import { IncomingMessage } from "node:http";
20
+
21
+ //#region useAsyncValidator/index.d.ts
22
+ type AsyncValidatorError = Error & {
23
+ errors: ValidateError[];
24
+ fields: Record<string, ValidateError[]>;
25
+ };
26
+ interface UseAsyncValidatorExecuteReturn {
27
+ pass: boolean;
28
+ errors: AsyncValidatorError['errors'] | undefined;
29
+ errorInfo: AsyncValidatorError | null;
30
+ errorFields: AsyncValidatorError['fields'] | undefined;
31
+ }
32
+ interface UseAsyncValidatorReturn {
33
+ pass: ShallowRef<boolean>;
34
+ isFinished: ShallowRef<boolean>;
35
+ errors: ComputedRef<AsyncValidatorError['errors'] | undefined>;
36
+ errorInfo: ShallowRef<AsyncValidatorError | null>;
37
+ errorFields: ComputedRef<AsyncValidatorError['fields'] | undefined>;
38
+ execute: () => Promise<UseAsyncValidatorExecuteReturn>;
39
+ }
40
+ interface UseAsyncValidatorOptions {
41
+ /**
42
+ * @see https://github.com/yiminghe/async-validator#options
43
+ */
44
+ validateOption?: ValidateOption;
45
+ /**
46
+ * The validation will be triggered right away for the first time.
47
+ * Only works when `manual` is not set to true.
48
+ *
49
+ * @default true
50
+ */
51
+ immediate?: boolean;
52
+ /**
53
+ * If set to true, the validation will not be triggered automatically.
54
+ */
55
+ manual?: boolean;
56
+ }
57
+ /**
58
+ * Wrapper for async-validator.
59
+ *
60
+ * @see https://vueuse.org/useAsyncValidator
61
+ * @see https://github.com/yiminghe/async-validator
62
+ */
63
+ declare function useAsyncValidator(value: MaybeRefOrGetter<Record<string, any>>, rules: MaybeRefOrGetter<Rules>, options?: UseAsyncValidatorOptions): UseAsyncValidatorReturn & PromiseLike<UseAsyncValidatorReturn>;
64
+ //#endregion
65
+ //#region useAxios/index.d.ts
66
+ interface UseAxiosReturn<T, R = AxiosResponse<T>, _D = any, O extends UseAxiosOptions = UseAxiosOptions<T>> {
67
+ /**
68
+ * Axios Response
69
+ */
70
+ response: ShallowRef<R | undefined>;
71
+ /**
72
+ * Axios response data
73
+ */
74
+ data: O extends UseAxiosOptionsWithInitialData<T> ? Ref<T> : Ref<T | undefined>;
75
+ /**
76
+ * Indicates if the request has finished
77
+ */
78
+ isFinished: Ref<boolean>;
79
+ /**
80
+ * Indicates if the request is currently loading
81
+ */
82
+ isLoading: Ref<boolean>;
83
+ /**
84
+ * Indicates if the request was canceled
85
+ */
86
+ isAborted: Ref<boolean>;
87
+ /**
88
+ * Any errors that may have occurred
89
+ */
90
+ error: ShallowRef<unknown | undefined>;
91
+ /**
92
+ * Aborts the current request
93
+ */
94
+ abort: (message?: string | undefined) => void;
95
+ /**
96
+ * Alias to `abort`
97
+ */
98
+ cancel: (message?: string | undefined) => void;
99
+ /**
100
+ * Alias to `isAborted`
101
+ */
102
+ isCanceled: Ref<boolean>;
103
+ }
104
+ interface StrictUseAxiosReturn<T, R, D, O extends UseAxiosOptions = UseAxiosOptions<T>> extends UseAxiosReturn<T, R, D, O> {
105
+ /**
106
+ * Manually call the axios request
107
+ */
108
+ execute: (url?: string | AxiosRequestConfig<D>, config?: AxiosRequestConfig<D>) => Promise<StrictUseAxiosReturn<T, R, D, O>>;
109
+ }
110
+ interface EasyUseAxiosReturn<T, R, D> extends UseAxiosReturn<T, R, D> {
111
+ /**
112
+ * Manually call the axios request
113
+ */
114
+ execute: (url: string, config?: AxiosRequestConfig<D>) => Promise<EasyUseAxiosReturn<T, R, D>>;
115
+ }
116
+ interface UseAxiosOptionsBase<T = any> {
117
+ /**
118
+ * Will automatically run axios request when `useAxios` is used
119
+ *
120
+ */
121
+ immediate?: boolean;
122
+ /**
123
+ * Use shallowRef.
124
+ *
125
+ * @default true
126
+ */
127
+ shallow?: boolean;
128
+ /**
129
+ * Abort previous request when a new request is made.
130
+ *
131
+ * @default true
132
+ */
133
+ abortPrevious?: boolean;
134
+ /**
135
+ * Callback when error is caught.
136
+ */
137
+ onError?: (e: unknown) => void;
138
+ /**
139
+ * Callback when success is caught.
140
+ */
141
+ onSuccess?: (data: T) => void;
142
+ /**
143
+ * Sets the state to initialState before executing the promise.
144
+ */
145
+ resetOnExecute?: boolean;
146
+ /**
147
+ * Callback when request is finished.
148
+ */
149
+ onFinish?: () => void;
150
+ }
151
+ interface UseAxiosOptionsWithInitialData<T> extends UseAxiosOptionsBase<T> {
152
+ /**
153
+ * Initial data
154
+ */
155
+ initialData: T;
156
+ }
157
+ type UseAxiosOptions<T = any> = UseAxiosOptionsBase<T> | UseAxiosOptionsWithInitialData<T>;
158
+ declare function useAxios<T = any, R = AxiosResponse<T>, D = any, O extends UseAxiosOptionsWithInitialData<T> = UseAxiosOptionsWithInitialData<T>>(url: string, config?: AxiosRequestConfig<D>, options?: O): StrictUseAxiosReturn<T, R, D, O> & Promise<StrictUseAxiosReturn<T, R, D, O>>;
159
+ declare function useAxios<T = any, R = AxiosResponse<T>, D = any, O extends UseAxiosOptionsWithInitialData<T> = UseAxiosOptionsWithInitialData<T>>(url: string, instance?: AxiosInstance, options?: O): StrictUseAxiosReturn<T, R, D, O> & Promise<StrictUseAxiosReturn<T, R, D, O>>;
160
+ declare function useAxios<T = any, R = AxiosResponse<T>, D = any, O extends UseAxiosOptionsWithInitialData<T> = UseAxiosOptionsWithInitialData<T>>(url: string, config: AxiosRequestConfig<D>, instance: AxiosInstance, options?: O): StrictUseAxiosReturn<T, R, D, O> & Promise<StrictUseAxiosReturn<T, R, D, O>>;
161
+ declare function useAxios<T = any, R = AxiosResponse<T>, D = any, O extends UseAxiosOptionsBase<T> = UseAxiosOptionsBase<T>>(url: string, config?: AxiosRequestConfig<D>, options?: O): StrictUseAxiosReturn<T, R, D, O> & Promise<StrictUseAxiosReturn<T, R, D, O>>;
162
+ declare function useAxios<T = any, R = AxiosResponse<T>, D = any, O extends UseAxiosOptionsBase<T> = UseAxiosOptionsBase<T>>(url: string, instance?: AxiosInstance, options?: O): StrictUseAxiosReturn<T, R, D, O> & Promise<StrictUseAxiosReturn<T, R, D, O>>;
163
+ declare function useAxios<T = any, R = AxiosResponse<T>, D = any, O extends UseAxiosOptionsBase<T> = UseAxiosOptionsBase<T>>(url: string, config: AxiosRequestConfig<D>, instance: AxiosInstance, options?: O): StrictUseAxiosReturn<T, R, D, O> & Promise<StrictUseAxiosReturn<T, R, D, O>>;
164
+ declare function useAxios<T = any, R = AxiosResponse<T>, D = any>(config?: AxiosRequestConfig<D>): EasyUseAxiosReturn<T, R, D> & Promise<EasyUseAxiosReturn<T, R, D>>;
165
+ declare function useAxios<T = any, R = AxiosResponse<T>, D = any>(instance?: AxiosInstance): EasyUseAxiosReturn<T, R, D> & Promise<EasyUseAxiosReturn<T, R, D>>;
166
+ declare function useAxios<T = any, R = AxiosResponse<T>, D = any>(config?: AxiosRequestConfig<D>, instance?: AxiosInstance): EasyUseAxiosReturn<T, R, D> & Promise<EasyUseAxiosReturn<T, R, D>>;
167
+ //#endregion
168
+ //#region useChangeCase/index.d.ts
169
+ type EndsWithCase<T> = T extends `${infer _}Case` ? T : never;
170
+ type FilterKeys<T> = { [K in keyof T as K extends string ? K : never]: EndsWithCase<K> };
171
+ type ChangeCaseKeys = FilterKeys<typeof changeCase>;
172
+ type ChangeCaseType = ChangeCaseKeys[keyof ChangeCaseKeys];
173
+ declare function useChangeCase(input: MaybeRef<string>, type: MaybeRefOrGetter<ChangeCaseType>, options?: MaybeRefOrGetter<Options> | undefined): WritableComputedRef<string>;
174
+ declare function useChangeCase(input: MaybeRefOrGetter<string>, type: MaybeRefOrGetter<ChangeCaseType>, options?: MaybeRefOrGetter<Options> | undefined): ComputedRef<string>;
175
+ //#endregion
176
+ //#region useCookies/index.d.ts
177
+ /**
178
+ * Creates a new {@link useCookies} function
179
+ * @param req - incoming http request (for SSR)
180
+ * @see https://github.com/reactivestack/cookies/tree/master/packages/universal-cookie universal-cookie
181
+ * @description Creates universal-cookie instance using request (default is window.document.cookie) and returns {@link useCookies} function with provided universal-cookie instance
182
+ */
183
+ declare function createCookies(req?: IncomingMessage): (dependencies?: string[] | null, {
184
+ doNotParse,
185
+ autoUpdateDependencies
186
+ }?: {
187
+ doNotParse?: boolean | undefined;
188
+ autoUpdateDependencies?: boolean | undefined;
189
+ }) => {
190
+ /**
191
+ * Reactive get cookie by name. If **autoUpdateDependencies = true** then it will update watching dependencies
192
+ */
193
+ get: <T = any>(name: string, options?: universal_cookie0.CookieGetOptions | undefined) => T;
194
+ /**
195
+ * Reactive get all cookies
196
+ */
197
+ getAll: <T = any>(options?: universal_cookie0.CookieGetOptions | undefined) => T;
198
+ set: (name: string, value: any, options?: universal_cookie0.CookieSetOptions | undefined) => void;
199
+ remove: (name: string, options?: universal_cookie0.CookieSetOptions | undefined) => void;
200
+ addChangeListener: (callback: universal_cookie0.CookieChangeListener) => void;
201
+ removeChangeListener: (callback: universal_cookie0.CookieChangeListener) => void;
202
+ };
203
+ /**
204
+ * Reactive methods to work with cookies (use {@link createCookies} method instead if you are using SSR)
205
+ * @param dependencies - array of watching cookie's names. Pass empty array if don't want to watch cookies changes.
206
+ * @param options
207
+ * @param options.doNotParse - don't try parse value as JSON
208
+ * @param options.autoUpdateDependencies - automatically update watching dependencies
209
+ * @param cookies - universal-cookie instance
210
+ *
211
+ * @__NO_SIDE_EFFECTS__
212
+ */
213
+ declare function useCookies(dependencies?: string[] | null, {
214
+ doNotParse,
215
+ autoUpdateDependencies
216
+ }?: {
217
+ doNotParse?: boolean | undefined;
218
+ autoUpdateDependencies?: boolean | undefined;
219
+ }, cookies?: Cookie): {
220
+ /**
221
+ * Reactive get cookie by name. If **autoUpdateDependencies = true** then it will update watching dependencies
222
+ */
223
+ get: <T = any>(name: string, options?: universal_cookie0.CookieGetOptions | undefined) => T;
224
+ /**
225
+ * Reactive get all cookies
226
+ */
227
+ getAll: <T = any>(options?: universal_cookie0.CookieGetOptions | undefined) => T;
228
+ set: (name: string, value: any, options?: universal_cookie0.CookieSetOptions | undefined) => void;
229
+ remove: (name: string, options?: universal_cookie0.CookieSetOptions | undefined) => void;
230
+ addChangeListener: (callback: universal_cookie0.CookieChangeListener) => void;
231
+ removeChangeListener: (callback: universal_cookie0.CookieChangeListener) => void;
232
+ };
233
+ //#endregion
234
+ //#region useDrauu/index.d.ts
235
+ type UseDrauuOptions = Omit<Options$1, 'el'>;
236
+ interface UseDrauuReturn {
237
+ drauuInstance: Ref<Drauu | undefined>;
238
+ load: (svg: string) => void;
239
+ dump: () => string | undefined;
240
+ clear: () => void;
241
+ cancel: () => void;
242
+ undo: () => boolean | undefined;
243
+ redo: () => boolean | undefined;
244
+ canUndo: ShallowRef<boolean>;
245
+ canRedo: ShallowRef<boolean>;
246
+ brush: Ref<Brush>;
247
+ onChanged: EventHookOn;
248
+ onCommitted: EventHookOn;
249
+ onStart: EventHookOn;
250
+ onEnd: EventHookOn;
251
+ onCanceled: EventHookOn;
252
+ }
253
+ /**
254
+ * Reactive drauu
255
+ *
256
+ * @see https://vueuse.org/useDrauu
257
+ * @param target The target svg element
258
+ * @param options Drauu Options
259
+ */
260
+ declare function useDrauu(target: MaybeComputedElementRef, options?: UseDrauuOptions): UseDrauuReturn;
261
+ //#endregion
262
+ //#region useFocusTrap/index.d.ts
263
+ interface UseFocusTrapOptions extends Options$2 {
264
+ /**
265
+ * Immediately activate the trap
266
+ */
267
+ immediate?: boolean;
268
+ }
269
+ interface UseFocusTrapReturn {
270
+ /**
271
+ * Indicates if the focus trap is currently active
272
+ */
273
+ hasFocus: ShallowRef<boolean>;
274
+ /**
275
+ * Indicates if the focus trap is currently paused
276
+ */
277
+ isPaused: ShallowRef<boolean>;
278
+ /**
279
+ * Activate the focus trap
280
+ *
281
+ * @see https://github.com/focus-trap/focus-trap#trapactivateactivateoptions
282
+ * @param opts Activate focus trap options
283
+ */
284
+ activate: (opts?: ActivateOptions) => void;
285
+ /**
286
+ * Deactivate the focus trap
287
+ *
288
+ * @see https://github.com/focus-trap/focus-trap#trapdeactivatedeactivateoptions
289
+ * @param opts Deactivate focus trap options
290
+ */
291
+ deactivate: (opts?: DeactivateOptions) => void;
292
+ /**
293
+ * Pause the focus trap
294
+ *
295
+ * @see https://github.com/focus-trap/focus-trap#trappause
296
+ */
297
+ pause: Fn;
298
+ /**
299
+ * Unpauses the focus trap
300
+ *
301
+ * @see https://github.com/focus-trap/focus-trap#trapunpause
302
+ */
303
+ unpause: Fn;
304
+ }
305
+ /**
306
+ * Reactive focus-trap
307
+ *
308
+ * @see https://vueuse.org/useFocusTrap
309
+ */
310
+ declare function useFocusTrap(target: MaybeRefOrGetter<Arrayable<MaybeRefOrGetter<string> | MaybeComputedElementRef>>, options?: UseFocusTrapOptions): UseFocusTrapReturn;
311
+ //#endregion
312
+ //#region useFuse/index.d.ts
313
+ type FuseOptions<T> = IFuseOptions<T>;
314
+ interface UseFuseOptions<T> {
315
+ fuseOptions?: FuseOptions<T>;
316
+ resultLimit?: number;
317
+ matchAllWhenSearchEmpty?: boolean;
318
+ }
319
+ declare function useFuse<DataItem>(search: MaybeRefOrGetter<string>, data: MaybeRefOrGetter<DataItem[]>, options?: MaybeRefOrGetter<UseFuseOptions<DataItem>>): {
320
+ fuse: vue0.Ref<{
321
+ search: <R = DataItem>(pattern: string | fuse_js0.Expression, options?: fuse_js0.FuseSearchOptions) => FuseResult<R>[];
322
+ setCollection: (docs: readonly DataItem[], index?: fuse_js0.FuseIndex<DataItem> | undefined) => void;
323
+ add: (doc: DataItem) => void;
324
+ remove: (predicate: (doc: DataItem, idx: number) => boolean) => DataItem[];
325
+ removeAt: (idx: number) => void;
326
+ getIndex: () => fuse_js0.FuseIndex<DataItem>;
327
+ }, Fuse<DataItem> | {
328
+ search: <R = DataItem>(pattern: string | fuse_js0.Expression, options?: fuse_js0.FuseSearchOptions) => FuseResult<R>[];
329
+ setCollection: (docs: readonly DataItem[], index?: fuse_js0.FuseIndex<DataItem> | undefined) => void;
330
+ add: (doc: DataItem) => void;
331
+ remove: (predicate: (doc: DataItem, idx: number) => boolean) => DataItem[];
332
+ removeAt: (idx: number) => void;
333
+ getIndex: () => fuse_js0.FuseIndex<DataItem>;
334
+ }>;
335
+ results: ComputedRef<FuseResult<DataItem>[]>;
336
+ };
337
+ type UseFuseReturn = ReturnType<typeof useFuse>;
338
+ //#endregion
339
+ //#region useIDBKeyval/index.d.ts
340
+ interface Serializer<T> {
341
+ read: (raw: unknown) => T;
342
+ write: (value: T) => unknown;
343
+ }
344
+ interface UseIDBOptions<T> extends ConfigurableFlush {
345
+ /**
346
+ * Watch for deep changes
347
+ *
348
+ * @default true
349
+ */
350
+ deep?: boolean;
351
+ /**
352
+ * On error callback
353
+ *
354
+ * Default log error to `console.error`
355
+ */
356
+ onError?: (error: unknown) => void;
357
+ /**
358
+ * Use shallow ref as reference
359
+ *
360
+ * @default false
361
+ */
362
+ shallow?: boolean;
363
+ /**
364
+ * Write the default value to the storage when it does not exist
365
+ *
366
+ * @default true
367
+ */
368
+ writeDefaults?: boolean;
369
+ /**
370
+ * Custom data serialization
371
+ */
372
+ serializer?: Serializer<T>;
373
+ }
374
+ interface UseIDBKeyvalReturn<T> {
375
+ data: RemovableRef<T>;
376
+ isFinished: ShallowRef<boolean>;
377
+ set: (value: T) => Promise<void>;
378
+ }
379
+ /**
380
+ *
381
+ * @param key
382
+ * @param initialValue
383
+ * @param options
384
+ */
385
+ declare function useIDBKeyval<T>(key: IDBValidKey, initialValue: MaybeRefOrGetter<T>, options?: UseIDBOptions<T>): UseIDBKeyvalReturn<T>;
386
+ //#endregion
387
+ //#region useJwt/index.d.ts
388
+ interface UseJwtOptions<Fallback> {
389
+ /**
390
+ * Value returned when encounter error on decoding
391
+ *
392
+ * @default null
393
+ */
394
+ fallbackValue?: Fallback;
395
+ /**
396
+ * Error callback for decoding
397
+ */
398
+ onError?: (error: unknown) => void;
399
+ }
400
+ interface UseJwtReturn<Payload, Header, Fallback> {
401
+ header: ComputedRef<Header | Fallback>;
402
+ payload: ComputedRef<Payload | Fallback>;
403
+ }
404
+ /**
405
+ * Reactive decoded jwt token.
406
+ *
407
+ * @see https://vueuse.org/useJwt
408
+ */
409
+ declare function useJwt<Payload extends object = JwtPayload, Header extends object = JwtHeader, Fallback = null>(encodedJwt: MaybeRefOrGetter<string>, options?: UseJwtOptions<Fallback>): UseJwtReturn<Payload, Header, Fallback>;
410
+ //#endregion
411
+ //#region useNProgress/index.d.ts
412
+ type UseNProgressOptions = Partial<NProgressOptions>;
413
+ /**
414
+ * Reactive progress bar.
415
+ *
416
+ * @see https://vueuse.org/useNProgress
417
+ */
418
+ declare function useNProgress(currentProgress?: MaybeRefOrGetter<number | null | undefined>, options?: UseNProgressOptions): {
419
+ isLoading: vue0.WritableComputedRef<boolean, boolean>;
420
+ progress: vue0.Ref<number | null | undefined, number | null | undefined>;
421
+ start: () => nprogress.NProgress;
422
+ done: (force?: boolean) => nprogress.NProgress;
423
+ remove: () => void;
424
+ };
425
+ type UseNProgressReturn = ReturnType<typeof useNProgress>;
426
+ //#endregion
427
+ //#region useQRCode/index.d.ts
428
+ /**
429
+ * Wrapper for qrcode.
430
+ *
431
+ * @see https://vueuse.org/useQRCode
432
+ * @param text
433
+ * @param options
434
+ */
435
+ declare function useQRCode(text: MaybeRefOrGetter<string>, options?: QRCode.QRCodeToDataURLOptions): vue0.ShallowRef<string, string>;
436
+ //#endregion
437
+ //#region useSortable/index.d.ts
438
+ interface UseSortableReturn {
439
+ /**
440
+ * start sortable instance
441
+ */
442
+ start: () => void;
443
+ /**
444
+ * destroy sortable instance
445
+ */
446
+ stop: () => void;
447
+ /**
448
+ * Options getter/setter
449
+ * @param name a Sortable.Options property.
450
+ * @param value a value.
451
+ */
452
+ option: (<K extends keyof Sortable.Options>(name: K, value: Sortable.Options[K]) => void) & (<K extends keyof Sortable.Options>(name: K) => Sortable.Options[K]);
453
+ }
454
+ type UseSortableOptions = Options$3 & ConfigurableDocument;
455
+ declare function useSortable<T>(selector: string, list: MaybeRef<T[]>, options?: UseSortableOptions): UseSortableReturn;
456
+ declare function useSortable<T>(el: MaybeRefOrGetter<MaybeElement>, list: MaybeRef<T[]>, options?: UseSortableOptions): UseSortableReturn;
457
+ /**
458
+ * Inserts a element into the DOM at a given index.
459
+ * @param parentElement
460
+ * @param element
461
+ * @param {number} index
462
+ * @see https://github.com/Alfred-Skyblue/vue-draggable-plus/blob/a3829222095e1949bf2c9a20979d7b5930e66f14/src/utils/index.ts#L81C1-L94C2
463
+ */
464
+ declare function insertNodeAt(parentElement: Element, element: Element, index: number): void;
465
+ /**
466
+ * Removes a node from the DOM.
467
+ * @param {Node} node
468
+ * @see https://github.com/Alfred-Skyblue/vue-draggable-plus/blob/a3829222095e1949bf2c9a20979d7b5930e66f14/src/utils/index.ts#L96C1-L102C2
469
+ */
470
+ declare function removeNode(node: Node): void;
471
+ declare function moveArrayElement<T>(list: MaybeRef<T[]>, from: number, to: number, e?: Sortable.SortableEvent | null): void;
472
+ //#endregion
473
+ export { AsyncValidatorError, ChangeCaseType, EasyUseAxiosReturn, FuseOptions, StrictUseAxiosReturn, UseAsyncValidatorExecuteReturn, UseAsyncValidatorOptions, UseAsyncValidatorReturn, UseAxiosOptions, UseAxiosOptionsBase, UseAxiosOptionsWithInitialData, UseAxiosReturn, UseDrauuOptions, UseDrauuReturn, UseFocusTrapOptions, UseFocusTrapReturn, UseFuseOptions, UseFuseReturn, UseIDBKeyvalReturn, UseIDBOptions, UseJwtOptions, UseJwtReturn, UseNProgressOptions, UseNProgressReturn, UseSortableOptions, UseSortableReturn, createCookies, insertNodeAt, moveArrayElement, removeNode, useAsyncValidator, useAxios, useChangeCase, useCookies, useDrauu, useFocusTrap, useFuse, useIDBKeyval, useJwt, useNProgress, useQRCode, useSortable };