@vueuse/integrations 10.2.1 → 10.4.0

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