@vuetify/v0 0.0.3 → 0.0.7

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 (35) hide show
  1. package/dist/browser/index.js +2718 -1496
  2. package/dist/components/index.d.ts +4 -7
  3. package/dist/components/index.js +6 -7
  4. package/dist/{components-DVuB4lnH.js → components-ClYPFhaF.js} +164 -8
  5. package/dist/composables/index.d.ts +3 -7
  6. package/dist/composables/index.js +4 -7
  7. package/dist/composables-DkRocfS_.js +3753 -0
  8. package/dist/constants/index.d.ts +1 -1
  9. package/dist/constants/index.js +3 -3
  10. package/dist/{globals-DZvNEOB4.js → globals-BQnaatWT.js} +2 -2
  11. package/dist/{htmlElements-SjqYu0am.js → htmlElements-lF7PGahL.js} +1 -1
  12. package/dist/{index-DVKeyWc5.d.ts → index-BKc0YiL1.d.ts} +2 -2
  13. package/dist/index-BVouO8cc.d.ts +410 -0
  14. package/dist/index-BoDCUSPn.d.ts +2765 -0
  15. package/dist/{index-LBy5OPMu.d.ts → index-C_lAPFXS.d.ts} +1 -1
  16. package/dist/{index-BozA2pze.d.ts → index-DIX3zaZG.d.ts} +3 -10
  17. package/dist/index.d.ts +6 -7
  18. package/dist/index.js +7 -10
  19. package/dist/types/index.d.ts +1 -1
  20. package/dist/utilities/index.d.ts +3 -3
  21. package/dist/utilities/index.js +2 -2
  22. package/dist/{utilities-D9rWEgQK.js → utilities-rsKHgU2m.js} +5 -32
  23. package/package.json +1 -3
  24. package/dist/composables-yeVk-ULz.js +0 -1270
  25. package/dist/factories/index.d.ts +0 -2
  26. package/dist/factories/index.js +0 -3
  27. package/dist/factories-BEpawPUw.js +0 -96
  28. package/dist/index-Ckt12ON6.d.ts +0 -75
  29. package/dist/index-D0L_ydyW.d.ts +0 -1396
  30. package/dist/index-tUyghL98.d.ts +0 -19
  31. package/dist/transformers/index.d.ts +0 -2
  32. package/dist/transformers/index.js +0 -4
  33. package/dist/transformers-CWrxLIkw.js +0 -122
  34. package/dist/useTheme-DCXkw_kv.js +0 -1208
  35. /package/dist/{constants-DiTCgvMU.js → constants-De5c3_aB.js} +0 -0
@@ -0,0 +1,2765 @@
1
+ import { a as MaybeArray, i as ID } from "./index-C_lAPFXS.js";
2
+ import * as vue169 from "vue";
3
+ import { App, ComputedRef, InjectionKey, MaybeRef, MaybeRefOrGetter, Reactive, Ref, ShallowRef, UnwrapNestedRefs } from "vue";
4
+
5
+ //#region src/composables/createContext/index.d.ts
6
+ type ContextKey<Z> = InjectionKey<Z> | string;
7
+ /**
8
+ * Injects a context provided by an ancestor component.
9
+ *
10
+ * @param key The key of the context to inject.
11
+ * @template Z The type of the context.
12
+ * @returns The injected context.
13
+ * @throws An error if the context is not found.
14
+ *
15
+ * @see https://vuejs.org/api/composition-api-dependency-injection.html#inject
16
+ * @see https://0.vuetifyjs.com/composables/foundation/create-context
17
+ *
18
+ * @example
19
+ * ```ts
20
+ * const myContext = useContext<MyContext>('my-context')
21
+ * ```
22
+ */
23
+ declare function useContext<Z>(key: ContextKey<Z>): Z & ({} | null);
24
+ /**
25
+ * Provides a context to all descendant components.
26
+ *
27
+ * @param key The key of the context to provide.
28
+ * @param context The context to provide.
29
+ * @param app The Vue app instance to provide the context to.
30
+ * @template Z The type of the context.
31
+ * @returns The provided context.
32
+ *
33
+ * @see https://vuejs.org/api/composition-api-dependency-injection.html#provide
34
+ * @see https://0.vuetifyjs.com/composables/foundation/create-context
35
+ *
36
+ * @example
37
+ * ```ts
38
+ * provideContext<MyContext>('my-context', myContext)
39
+ * ```
40
+ */
41
+ declare function provideContext<Z>(key: ContextKey<Z>, context: Z, app?: App): Z;
42
+ /**
43
+ * Creates a new context for providing and injecting data.
44
+ *
45
+ * @param key The key of the context to create.
46
+ * @template Z The type of the context.
47
+ * @returns A tuple containing the `useContext` and `provideContext` functions.
48
+ *
49
+ * @see https://vuejs.org/api/composition-api-dependency-injection.html
50
+ * @see https://0.vuetifyjs.com/composables/foundation/create-context
51
+ *
52
+ * @example
53
+ * ```ts
54
+ * const [provideMyContext, useMyContext] = createContext<MyContext>('my-context')
55
+ * ```
56
+ */
57
+ declare function createContext<Z>(_key: ContextKey<Z>): readonly [(key?: ContextKey<Z>) => Z & ({} | null), (context: Z, app?: App) => Z];
58
+ //#endregion
59
+ //#region src/composables/createPlugin/index.d.ts
60
+ interface PluginOptions {
61
+ namespace: string;
62
+ provide: (app: App) => void;
63
+ setup?: (app: App) => void;
64
+ }
65
+ interface Plugin {
66
+ install: (app: App, ...options: any[]) => void;
67
+ }
68
+ /**
69
+ * Creates a new Vue plugin.
70
+ *
71
+ * @param options The plugin options.
72
+ * @returns A new Vue plugin.
73
+ *
74
+ * @see https://vuejs.org/guide/reusability/plugins.html
75
+ * @see https://0.vuetifyjs.com/composables/foundation/create-plugin
76
+ *
77
+ * @example
78
+ * ```ts
79
+ * export const [useContext, provideContext] = createContext<MyContext>('my-plugin')
80
+ *
81
+ * const context = {}
82
+ *
83
+ * export const MyPlugin = createPlugin({
84
+ * namespace: 'my-plugin',
85
+ * provide: (app) => {
86
+ * provideContext(context, app)
87
+ * },
88
+ * setup: (app) => {
89
+ * // Optional setup logic
90
+ * },
91
+ * })
92
+ */
93
+ declare function createPlugin<Z extends Plugin = Plugin>(options: PluginOptions): Z;
94
+ //#endregion
95
+ //#region src/composables/createTrinity/index.d.ts
96
+ type ContextTrinity<Z = unknown> = readonly [() => Z, (context?: Z, app?: App) => Z, Z];
97
+ /**
98
+ * Creates a new trinity for a context composable and its provider.
99
+ *
100
+ * @param createContext The function that creates the context.
101
+ * @param provideContext The function that provides the context.
102
+ * @param context The context to provide.
103
+ * @template Z The type of the context.
104
+ * @returns A new trinity.
105
+ *
106
+ * @see https://0.vuetifyjs.com/composables/foundation/create-trinity
107
+ *
108
+ * @example
109
+ * ```ts
110
+ * interface MyContext {
111
+ * foo: string
112
+ * bar: number
113
+ * }
114
+ *
115
+ * export function createMyFeature<E extends MyContext = MyContext>() {
116
+ * const [useContext, _provideContext] = createContext<E>('my-context')
117
+ *
118
+ * const context = { foo: 'hello', bar: 42 }
119
+ *
120
+ * function provideContext (_context: E = context, app?: App): E {
121
+ * return _provideContext(_context, app)
122
+ * }
123
+ *
124
+ * return createTrinity<E>(useContext, provideContext, context)
125
+ * }
126
+ */
127
+ declare function createTrinity<Z = unknown>(createContext: () => Z, provideContext: (_context?: Z, app?: App) => Z, context: Z): ContextTrinity<Z>;
128
+ //#endregion
129
+ //#region src/composables/toArray/index.d.ts
130
+ /**
131
+ * Converts a value to an array.
132
+ *
133
+ * @param value The value to convert.
134
+ * @template Z The type of the value.
135
+ * @returns The converted array.
136
+ *
137
+ * @see https://0.vuetifyjs.com/composables/transformers/to-array
138
+ *
139
+ * @example
140
+ * ```ts
141
+ * import { toArray } from '@vuetify/v0'
142
+ *
143
+ * const value = 'Example Value'
144
+ * const valueAsArray = toArray(value)
145
+ *
146
+ * console.log(valueAsArray) // ['Example Value']
147
+ * ```
148
+ */
149
+ declare function toArray<Z>(value: Z | Z[]): Z[];
150
+ //#endregion
151
+ //#region src/composables/toReactive/index.d.ts
152
+ /**
153
+ * Converts a `MaybeRef` to a `UnwrapNestedRefs`.
154
+ *
155
+ * @param objectRef The object to convert.
156
+ * @template Z The type of the object.
157
+ * @returns The converted object.
158
+ *
159
+ * @see https://vuejs.org/api/reactivity-utilities.html#toreactive
160
+ *
161
+ * @example
162
+ * ```ts
163
+ * import { ref } from 'vue'
164
+ * import { toReactive } from '@vuetify/v0'
165
+ *
166
+ * const state = ref({ name: 'John', age: 30 })
167
+ * const rstate = toReactive(state)
168
+ *
169
+ * console.log(rstate.name) // John
170
+ * ```
171
+ */
172
+ declare function toReactive<Z extends object>(objectRef: MaybeRef<Z>): UnwrapNestedRefs<Z>;
173
+ //#endregion
174
+ //#region src/composables/useBreakpoints/index.d.ts
175
+ type BreakpointName = 'xs' | 'sm' | 'md' | 'lg' | 'xl' | 'xxl';
176
+ interface BreakpointsContext {
177
+ breakpoints: Readonly<Record<BreakpointName, number>>;
178
+ name: Readonly<ShallowRef<BreakpointName>>;
179
+ width: Readonly<ShallowRef<number>>;
180
+ height: Readonly<ShallowRef<number>>;
181
+ isMobile: Readonly<ShallowRef<boolean>>;
182
+ xs: Readonly<ShallowRef<boolean>>;
183
+ sm: Readonly<ShallowRef<boolean>>;
184
+ md: Readonly<ShallowRef<boolean>>;
185
+ lg: Readonly<ShallowRef<boolean>>;
186
+ xl: Readonly<ShallowRef<boolean>>;
187
+ xxl: Readonly<ShallowRef<boolean>>;
188
+ smAndUp: Readonly<ShallowRef<boolean>>;
189
+ mdAndUp: Readonly<ShallowRef<boolean>>;
190
+ lgAndUp: Readonly<ShallowRef<boolean>>;
191
+ xlAndUp: Readonly<ShallowRef<boolean>>;
192
+ xxlAndUp: Readonly<ShallowRef<boolean>>;
193
+ smAndDown: Readonly<ShallowRef<boolean>>;
194
+ mdAndDown: Readonly<ShallowRef<boolean>>;
195
+ lgAndDown: Readonly<ShallowRef<boolean>>;
196
+ xlAndDown: Readonly<ShallowRef<boolean>>;
197
+ xxlAndDown: Readonly<ShallowRef<boolean>>;
198
+ update: () => void;
199
+ }
200
+ interface BreakpointsOptions extends BreakpointsPluginOptions {}
201
+ interface BreakpointsPluginOptions {
202
+ mobileBreakpoint?: BreakpointName | number;
203
+ breakpoints?: Partial<Record<BreakpointName, number>>;
204
+ }
205
+ /**
206
+ * Creates a new breakpoints instance.
207
+ *
208
+ * @param namespace The namespace to use for the breakpoints instance.
209
+ * @param options The options for the breakpoints instance.
210
+ * @template E The type of the breakpoints context.
211
+ * @returns A new breakpoints instance.
212
+ *
213
+ * @see https://0.vuetifyjs.com/composables/plugins/use-breakpoints
214
+ *
215
+ * @example
216
+ * ```ts
217
+ * import { createBreakpoints } from '@vuetify/v0'
218
+ *
219
+ * export const [useBreakpoints, provideBreakpoints] = createBreakpoints('v0:breakpoints', {
220
+ * mobileBreakpoint: 'sm',
221
+ * breakpoints: {
222
+ * xs: 0,
223
+ * sm: 680,
224
+ * md: 1024,
225
+ * lg: 1280,
226
+ * xl: 1920,
227
+ * xxl: 2560,
228
+ * },
229
+ * })
230
+ * ```
231
+ */
232
+ declare function createBreakpoints<E extends BreakpointsContext = BreakpointsContext>(namespace?: string, options?: BreakpointsOptions): ContextTrinity<E>;
233
+ /**
234
+ * Returns the current breakpoints instance.
235
+ *
236
+ * @returns The current breakpoints instance.
237
+ *
238
+ * @see https://0.vuetifyjs.com/composables/plugins/use-breakpoints
239
+ *
240
+ * @example
241
+ * ```vue
242
+ * <script setup lang="ts">
243
+ * import { useBreakpoints } from '@vuetify/v0'
244
+ *
245
+ * const { isMobile, mdAndUp } = useBreakpoints()
246
+ * </script>
247
+ *
248
+ * <template>
249
+ * <div class="pa-4">
250
+ * <p v-if="isMobile.value">Mobile layout active</p>
251
+ * <p v-else-if="mdAndUp.value">Medium and up layout active</p>
252
+ * </div>
253
+ * </template>
254
+ * ```
255
+ */
256
+ declare function useBreakpoints(): BreakpointsContext;
257
+ /**
258
+ * Creates a new breakpoints plugin.
259
+ *
260
+ * @param options The options for the breakpoints plugin.
261
+ * @template E The type of the breakpoints context.
262
+ * @returns A new breakpoints plugin.
263
+ *
264
+ * @see https://0.vuetifyjs.com/composables/plugins/use-breakpoints
265
+ *
266
+ * @example
267
+ * ```ts
268
+ * import { createApp } from 'vue'
269
+ * import { createBreakpointsPlugin } from '@vuetify/v0'
270
+ * import App from './App.vue'
271
+ *
272
+ * const app = createApp(App)
273
+ *
274
+ * app.use(
275
+ * createBreakpointsPlugin({
276
+ * mobileBreakpoint: 'sm',
277
+ * breakpoints: {
278
+ * xs: 0,
279
+ * sm: 680,
280
+ * md: 1024,
281
+ * lg: 1280,
282
+ * xl: 1920,
283
+ * xxl: 2560,
284
+ * },
285
+ * })
286
+ * )
287
+ *
288
+ * app.mount('#app')
289
+ * ```
290
+ */
291
+ declare function createBreakpointsPlugin<E extends BreakpointsContext = BreakpointsContext>(options?: BreakpointsPluginOptions): Plugin;
292
+ //#endregion
293
+ //#region src/composables/useEventListener/index.d.ts
294
+ type CleanupFunction = () => void;
295
+ type EventHandler<E = Event> = (event: E) => void;
296
+ /**
297
+ * Attaches an event listener to the window.
298
+ *
299
+ * @param target The window object.
300
+ * @param event The event to listen for.
301
+ * @param listener The event listener.
302
+ * @param options The event listener options.
303
+ * @template E The event type.
304
+ * @returns A function to remove the event listener.
305
+ *
306
+ * @see https://0.vuetifyjs.com/composables/system/use-event-listener
307
+ */
308
+ declare function useEventListener<E extends keyof WindowEventMap>(target: Window, event: MaybeRefOrGetter<MaybeArray<E>>, listener: MaybeRef<MaybeArray<(this: Window, event: WindowEventMap[E]) => any>>, options?: MaybeRefOrGetter<boolean | AddEventListenerOptions>): CleanupFunction;
309
+ /**
310
+ * Attaches an event listener to the document.
311
+ *
312
+ * @param target The document object.
313
+ * @param event The event to listen for.
314
+ * @param listener The event listener.
315
+ * @param options The event listener options.
316
+ * @template E The event type.
317
+ * @returns A function to remove the event listener.
318
+ *
319
+ * @see https://0.vuetifyjs.com/composables/system/use-event-listener
320
+ */
321
+ declare function useEventListener<E extends keyof DocumentEventMap>(target: Document, event: MaybeRefOrGetter<MaybeArray<E>>, listener: MaybeRef<MaybeArray<(this: Document, event: DocumentEventMap[E]) => any>>, options?: MaybeRefOrGetter<boolean | AddEventListenerOptions>): CleanupFunction;
322
+ /**
323
+ * Attaches an event listener to an HTML element.
324
+ *
325
+ * @param target The HTML element.
326
+ * @param event The event to listen for.
327
+ * @param listener The event listener.
328
+ * @param options The event listener options.
329
+ * @template E The event type.
330
+ * @returns A function to remove the event listener.
331
+ *
332
+ * @see https://0.vuetifyjs.com/composables/system/use-event-listener
333
+ */
334
+ declare function useEventListener<E extends keyof HTMLElementEventMap>(target: MaybeRefOrGetter<HTMLElement | null | undefined>, event: MaybeRefOrGetter<MaybeArray<E>>, listener: MaybeRef<MaybeArray<(this: HTMLElement, event: HTMLElementEventMap[E]) => any>>, options?: MaybeRefOrGetter<boolean | AddEventListenerOptions>): CleanupFunction;
335
+ /**
336
+ * Attaches an event listener to an event target.
337
+ *
338
+ * @param target The event target.
339
+ * @param event The event to listen for.
340
+ * @param listener The event listener.
341
+ * @param options The event listener options.
342
+ * @template EventType The event type.
343
+ * @returns A function to remove the event listener.
344
+ *
345
+ * @see https://0.vuetifyjs.com/composables/system/use-event-listener
346
+ */
347
+ declare function useEventListener<EventType = Event>(target: MaybeRefOrGetter<EventTarget | null | undefined>, event: MaybeRefOrGetter<MaybeArray<string>>, listener: MaybeRef<MaybeArray<EventHandler<EventType>>>, options?: MaybeRefOrGetter<boolean | AddEventListenerOptions>): CleanupFunction;
348
+ /**
349
+ * Attaches an event listener to the window.
350
+ *
351
+ * @param event The event to listen for.
352
+ * @param listener The event listener.
353
+ * @param options The event listener options.
354
+ * @template E The event type.
355
+ * @returns A function to remove the event listener.
356
+ *
357
+ * @see https://0.vuetifyjs.com/composables/system/use-event-listener
358
+ */
359
+ declare function useWindowEventListener<E extends keyof WindowEventMap>(event: MaybeRefOrGetter<MaybeArray<E>>, listener: MaybeRef<MaybeArray<(this: Window, event: WindowEventMap[E]) => any>>, options?: MaybeRefOrGetter<boolean | AddEventListenerOptions>): CleanupFunction;
360
+ /**
361
+ * Attaches an event listener to the document.
362
+ *
363
+ * @param event The event to listen for.
364
+ * @param listener The event listener.
365
+ * @param options The event listener options.
366
+ * @template E The event type.
367
+ * @returns A function to remove the event listener.
368
+ *
369
+ * @see https://0.vuetifyjs.com/composables/system/use-event-listener
370
+ */
371
+ declare function useDocumentEventListener<E extends keyof DocumentEventMap>(event: MaybeRefOrGetter<MaybeArray<E>>, listener: MaybeRef<MaybeArray<(this: Document, event: DocumentEventMap[E]) => any>>, options?: MaybeRefOrGetter<boolean | AddEventListenerOptions>): CleanupFunction;
372
+ //#endregion
373
+ //#region src/composables/useRegistry/index.d.ts
374
+ interface RegistryTicket {
375
+ /** The unique identifier. Is randomly generated if not provided. */
376
+ id: ID;
377
+ /**
378
+ * The index of the ticket in the registry.
379
+ *
380
+ * @remarks Automatically managed by the registry. Updated during reindexing. It's not recommended to manually set this.
381
+ */
382
+ index: number;
383
+ /** The value associated with the ticket. If not provided, it defaults to the index. */
384
+ value: unknown;
385
+ /**
386
+ * Whether the value is derived from index.
387
+ *
388
+ * @remarks Set to true when no explicit value is provided during registration. It's not recommended to manually set this.
389
+ */
390
+ valueIsIndex: boolean;
391
+ }
392
+ interface RegistryContext<Z extends RegistryTicket = RegistryTicket> {
393
+ /**
394
+ * The collection of tickets in the registry
395
+ *
396
+ * @template ID The type of the ticket ID.
397
+ * @template Z The type of the registry ticket.
398
+ *
399
+ * @remarks Exposed for read-only access and advanced use cases. **Warning:** Direct mutation may cause inconsistencies in indexes, catalogs, and caches. Always prefer using the provided methods (`register`, `unregister`, etc.) to maintain internal consistency.
400
+ */
401
+ collection: Map<ID, Z>;
402
+ /**
403
+ * Clear the entire registry
404
+ *
405
+ * @remarks Removes all tickets from the registry. This operation invalidates cached results from `keys()`, `values()`, and `entries()`.
406
+ *
407
+ * @see https://0.vuetifyjs.com/composables/registration/use-registry#clear
408
+ *
409
+ * @example
410
+ * ```ts
411
+ * import { useRegistry } from '@vuetify/v0'
412
+ *
413
+ * const registry = useRegistry()
414
+ *
415
+ * registry.register({ id: 'ticket-1' })
416
+ * registry.register({ id: 'ticket-2' })
417
+ *
418
+ * console.log(registry.size) // 2
419
+ *
420
+ * registry.clear()
421
+ *
422
+ * console.log(registry.size) // 0
423
+ * ```
424
+ */
425
+ clear: () => void;
426
+ /**
427
+ * Check if a ticket exists by ID
428
+ *
429
+ * @param id The ID of the ticket to check.
430
+ * @remarks Calls `collection.has` internally.
431
+ *
432
+ * @see https://0.vuetifyjs.com/composables/registration/use-registry#has
433
+ *
434
+ * @example
435
+ * ```ts
436
+ * import { useRegistry } from '@vuetify/v0'
437
+ *
438
+ * const registry = useRegistry()
439
+ *
440
+ * registry.register({ id: 'ticket-id' })
441
+ *
442
+ * const exists = registry.has('ticket-id') // true
443
+ * ```
444
+ */
445
+ has: (id: ID) => boolean;
446
+ /**
447
+ * Get all registered IDs
448
+ *
449
+ * @remarks Calls `collection.keys` internally with caching. First call is O(n), subsequent calls are O(1) until cache invalidation.
450
+ *
451
+ * @see https://0.vuetifyjs.com/composables/registration/use-registry#keys
452
+ *
453
+ * @example
454
+ * ```ts
455
+ * import { useRegistry } from '@vuetify/v0'
456
+ *
457
+ * const registry = useRegistry()
458
+ *
459
+ * registry.register({ id: 'ticket-1' })
460
+ * registry.register({ id: 'ticket-2' })
461
+ *
462
+ * const ids = registry.keys() // ['ticket-1', 'ticket-2']
463
+ * ```
464
+ */
465
+ keys: () => ID[];
466
+ /**
467
+ * Browse for an ID(s) by value
468
+ *
469
+ * @param value The value to browse for.
470
+ * @remarks Returns a single ID or an array of IDs if multiple tickets share the same value.
471
+ *
472
+ * @see https://0.vuetifyjs.com/composables/registration/use-registry#browse
473
+ *
474
+ * @example
475
+ * ```ts
476
+ * import { useRegistry } from '@vuetify/v0'
477
+ *
478
+ * const registry = useRegistry()
479
+ *
480
+ * registry.register({ id: 'ticket-1', value: 'common-value' })
481
+ * registry.register({ id: 'ticket-2', value: 'common-value' })
482
+ * registry.register({ id: 'ticket-3', value: 'unique-value' })
483
+ *
484
+ * const common = registry.browse('common-value') // ['ticket-1', 'ticket-2']
485
+ * const unique = registry.browse('unique-value') // 'ticket-3'
486
+ * ```
487
+ */
488
+ browse: (value: unknown) => ID | ID[] | undefined;
489
+ /**
490
+ * lookup a ticket by index number
491
+ *
492
+ * @param index The index number to lookup.
493
+ * @remarks Maps do not support indexing by default, this method provides a way to retrieve an ID based on its index in the registry.
494
+ *
495
+ * @see https://0.vuetifyjs.com/composables/registration/use-registry#lookup
496
+ *
497
+ * @example
498
+ * ```ts
499
+ * const registry = useRegistry()
500
+ *
501
+ * registry.register({ id: 'ticket-1' })
502
+ * registry.register({ id: 'ticket-2' })
503
+ *
504
+ * const ticket1 = registry.lookup(0) // 'ticket-1'
505
+ * const ticket2 = registry.lookup(1) // 'ticket-2'
506
+ * ```
507
+ */
508
+ lookup: (index: number) => ID | undefined;
509
+ /**
510
+ * Get a ticket by ID
511
+ *
512
+ * @param id The ID of the ticket to retrieve.
513
+ * @remarks Calls `collection.get` internally.
514
+ *
515
+ * @see https://0.vuetifyjs.com/composables/registration/use-registry#get
516
+ *
517
+ * @example
518
+ * ```ts
519
+ * import { useRegistry } from '@vuetify/v0'
520
+ *
521
+ * const registry = useRegistry()
522
+ *
523
+ * registry.register({ id: 'ticket-id', value: 'some-value' })
524
+ *
525
+ * const ticket = registry.get('ticket-id') // { id: 'ticket-id', index: 0, value: 'some-value', ... }
526
+ * ```
527
+ */
528
+ get: (id: ID) => Z | undefined;
529
+ /**
530
+ * Update or insert a ticket by ID
531
+ *
532
+ * @param id The ID of the ticket to upsert.
533
+ * @param ticket The partial ticket data to update or insert.
534
+ * @remarks If the ticket exists, it will be updated with the provided data. If it doesn't exist, a new ticket will be created with the given ID and data. This operation invalidates cached results from `keys()`, `values()`, and `entries()`.
535
+ *
536
+ * @see https://0.vuetifyjs.com/composables/registration/use-registry#upsert
537
+ *
538
+ * @example
539
+ * ```ts
540
+ * import { useRegistry } from '@vuetify/v0'
541
+ *
542
+ * const registry = useRegistry()
543
+ *
544
+ * // Insert a new ticket
545
+ * const ticket = registry.upsert('ticket-id', { value: 'initial-value' })
546
+ *
547
+ * // Update the existing ticket
548
+ * const patched = registry.upsert('ticket-id', { value: 'updated-value' })
549
+ * ```
550
+ */
551
+ upsert: (id: ID, ticket?: Partial<Z>) => Z;
552
+ /**
553
+ * Get all values of registered tickets
554
+ *
555
+ * @remarks Calls `collection.values` internally with caching. First call is O(n), subsequent calls are O(1) until cache invalidation.
556
+ *
557
+ * @see https://0.vuetifyjs.com/composables/registration/use-registry#values
558
+ *
559
+ * @example
560
+ * ```ts
561
+ * import { useRegistry } from '@vuetify/v0'
562
+ *
563
+ * const registry = useRegistry()
564
+ *
565
+ * registry.register({ id: 'ticket-1', value: 'value-1' })
566
+ * registry.register({ id: 'ticket-2', value: 'value-2' })
567
+ *
568
+ * const values = registry.values() // [{ id: 'ticket-1', ... }, { id: 'ticket-2', ... }]
569
+ * ```
570
+ */
571
+ values: () => Z[];
572
+ /**
573
+ * Get all entries of registered tickets
574
+ *
575
+ * @remarks Calls `collection.entries` internally with caching. First call is O(n), subsequent calls are O(1) until cache invalidation.
576
+ *
577
+ * @see https://0.vuetifyjs.com/composables/registration/use-registry#entries
578
+ *
579
+ * @example
580
+ * ```ts
581
+ * import { useRegistry } from '@vuetify/v0'
582
+ *
583
+ * const registry = useRegistry()
584
+ *
585
+ * registry.register({ id: 'ticket-1', value: 'value-1' })
586
+ * registry.register({ id: 'ticket-2', value: 'value-2' })
587
+ *
588
+ * const entries = registry.entries() // [['ticket-1', { id: 'ticket-1', ... }], ['ticket-2', { id: 'ticket-2', ... }]]
589
+ * ```
590
+ */
591
+ entries: () => [ID, Z][];
592
+ /**
593
+ * Register a new ticket
594
+ *
595
+ * @param ticket The partial ticket data to register.
596
+ * @remarks If no ID is provided, a unique ID will be generated automatically. If no value is provided, it defaults to the ticket's index. This operation invalidates cached results from `keys()`, `values()`, and `entries()`.
597
+ *
598
+ * @see https://0.vuetifyjs.com/composables/registration/use-registry#register
599
+ *
600
+ * @example
601
+ * ```ts
602
+ * import { useRegistry } from '@vuetify/v0'
603
+ *
604
+ * const registry = useRegistry()
605
+ *
606
+ * const ticket = registry.register()
607
+ *
608
+ * console.log(ticket) // { id: 'generated-id', index: 0, value: 0, valueIsIndex: true }
609
+ * ```
610
+ */
611
+ register: (ticket?: Partial<Z>) => Z;
612
+ /**
613
+ * Unregister an ticket by ID
614
+ *
615
+ * @param id The ID of the ticket to unregister.
616
+ * @remarks Removes the ticket from the registry and reindexes the remaining tickets. This operation invalidates cached results from `keys()`, `values()`, and `entries()`.
617
+ *
618
+ * @see https://0.vuetifyjs.com/composables/registration/use-registry#unregister
619
+ *
620
+ * @example
621
+ * ```ts
622
+ * import { useRegistry } from '@vuetify/v0'
623
+ *
624
+ * const registry = useRegistry()
625
+ *
626
+ * registry.register({ id: 'ticket-id' })
627
+ *
628
+ * registry.unregister('ticket-id')
629
+ * ```
630
+ */
631
+ unregister: (id: ID) => void;
632
+ /**
633
+ * Reset the index directory and update all tickets
634
+ *
635
+ * @remarks Rebuilds the internal index mapping and ensures all tickets have correct index values. This operation invalidates cached results from `keys()`, `values()`, and `entries()`.
636
+ *
637
+ * @see https://0.vuetifyjs.com/composables/registration/use-registry#reindex
638
+ *
639
+ * @example
640
+ * ```ts
641
+ * import { useRegistry } from '@vuetify/v0'
642
+ *
643
+ * const registry = useRegistry()
644
+ *
645
+ * registry.register({ id: 'ticket-1' })
646
+ * registry.register({ id: 'ticket-2' })
647
+ *
648
+ * // After some operations that may affect indexing
649
+ * registry.reindex()
650
+ * ```
651
+ */
652
+ reindex: () => void;
653
+ /**
654
+ * Seek for a ticket based on direction and optional predicate
655
+ *
656
+ * @param direction The direction to seek ('first' or 'last'). Defaults to 'first'.
657
+ * @param from The index to start seeking from. Defaults to the beginning or end based on direction.
658
+ * @param predicate An optional function to test each ticket. The first ticket that satisfies the predicate will be returned.
659
+ * @remarks This method allows for flexible searching within the registry, either from the start or end, and can filter tickets based on custom criteria.
660
+ *
661
+ * @see https://0.vuetifyjs.com/composables/registration/use-registry#seek
662
+ *
663
+ * @example
664
+ * ```ts
665
+ * import { useRegistry } from '@vuetify/v0'
666
+ *
667
+ * const registry = useRegistry()
668
+ *
669
+ * registry.register({ id: 'ticket-1', value: 'apple' })
670
+ * registry.register({ id: 'ticket-2', value: 'banana' })
671
+ * registry.register({ id: 'ticket-3', value: 'cherry' })
672
+ *
673
+ * // Seek the first ticket
674
+ * const first = registry.seek('first')
675
+ *
676
+ * // Seek the last ticket
677
+ * const last = registry.seek('last')
678
+ *
679
+ * // Seek the first ticket with value 'banana'
680
+ * const banana = registry.seek('first', undefined, ticket => ticket.value === 'banana')
681
+ *
682
+ * // Seek from index 1 to find the next ticket with value starting with 'c'
683
+ * const cherry = registry.seek('first', 1, ticket => (ticket.value as string).startsWith('c'))
684
+ * ```
685
+ */
686
+ seek: (direction?: 'first' | 'last', from?: number, predicate?: (ticket: Z) => boolean) => Z | undefined;
687
+ /**
688
+ * Listen for registry events
689
+ *
690
+ * @param event The name of the event to listen for.
691
+ * @param cb The callback function to invoke when the event is emitted.
692
+ * @remarks Must be enabled via the `events` option when creating the registry.
693
+ * Supported events:
694
+ * - `register:ticket` - Emitted when a ticket is registered, receives the ticket as argument
695
+ * - `unregister:ticket` - Emitted when a ticket is unregistered, receives the ticket as argument
696
+ * - `update:ticket` - Emitted when a ticket is updated, receives the updated ticket as argument
697
+ * - `clear:registry` - Emitted when the registry is cleared
698
+ *
699
+ * @see https://0.vuetifyjs.com/composables/registration/use-registry#on
700
+ *
701
+ * @example
702
+ * ```ts
703
+ * import { useRegistry } from '@vuetify/v0'
704
+ *
705
+ * const registry = useRegistry({ events: true })
706
+ *
707
+ * registry.on('register:ticket', (ticket) => {
708
+ * console.log('Ticket registered:', ticket)
709
+ * })
710
+ *
711
+ * registry.register({ id: 'ticket-id' }) // Console: Ticket registered: { id: 'ticket-id', ... }
712
+ * ```
713
+ */
714
+ on: (event: string, cb: Function) => void;
715
+ /**
716
+ * Stop listening for registry events
717
+ *
718
+ * @param event The name of the event to stop listening for.
719
+ * @param cb The callback function to remove.
720
+ * @remarks Must be enabled via the `events` option when creating the registry.
721
+ *
722
+ * @see https://0.vuetifyjs.com/composables/registration/use-registry#off
723
+ *
724
+ * @example
725
+ * ```ts
726
+ * import { onScopeDispose } from 'vue'
727
+ * import { useRegistry } from '@vuetify/v0'
728
+ *
729
+ * const registry = useRegistry({ events: true })
730
+ *
731
+ * function onRegister(ticket) {
732
+ * console.log('Ticket registered:', ticket)
733
+ * }
734
+ *
735
+ * registry.on('register:ticket', onRegister)
736
+ *
737
+ * registry.register({ id: 'ticket-id' }) // Console: Ticket registered: { id: 'ticket-id', ... }
738
+ *
739
+ * onScopeDispose(() => {
740
+ * registry.off('register:ticket', onRegister)
741
+ * })
742
+ * ```
743
+ */
744
+ off: (event: string, cb: Function) => void;
745
+ /**
746
+ * Emit an event with data
747
+ *
748
+ * @param event The name of the event to emit.
749
+ * @param data The data to pass to event listeners.
750
+ * @remarks Must be enabled via the `events` option when creating the registry.
751
+ *
752
+ * @see https://0.vuetifyjs.com/composables/registration/use-registry#emit
753
+ *
754
+ * @example
755
+ * ```ts
756
+ * import { useRegistry } from '@vuetify/v0'
757
+ *
758
+ * const registry = useRegistry({ events: true })
759
+ *
760
+ * registry.on('custom-event', (data) => {
761
+ * console.log('Custom event received:', data)
762
+ * })
763
+ *
764
+ * registry.emit('custom-event', { message: 'Hello, World!' }) // Console: Custom event received: { message: 'Hello, World!' }
765
+ * ```
766
+ */
767
+ emit: (event: string, data: any) => void;
768
+ /**
769
+ * Clears the registry and removes all listeners
770
+ *
771
+ * @remarks Disposes of the registry by clearing all tickets and removing all event listeners.
772
+ *
773
+ * @see https://0.vuetifyjs.com/composables/registration/use-registry#dispose
774
+ *
775
+ * @example
776
+ * ```ts
777
+ * import { onScopeDispose } from 'vue'
778
+ * import { useRegistry } from '@vuetify/v0'
779
+ *
780
+ * const registry = useRegistry({ events: true })
781
+ *
782
+ * registry.register({ id: 'ticket-id' })
783
+ *
784
+ * onScopeDispose(() => {
785
+ * registry.dispose()
786
+ * })
787
+ * ```
788
+ */
789
+ dispose: () => void;
790
+ /**
791
+ * Onboard multiple tickets at once
792
+ *
793
+ * @param registrations An array of partial ticket data to register.
794
+ * @remarks Registers multiple tickets in a single operation and returns the array of registered tickets.
795
+ *
796
+ * @see https://0.vuetifyjs.com/composables/registration/use-registry#onboard
797
+ *
798
+ * @example
799
+ * ```ts
800
+ * import { useRegistry } from '@vuetify/v0'
801
+ *
802
+ * const registry = useRegistry()
803
+ *
804
+ * const tickets = registry.onboard([
805
+ * { id: 'ticket-1', value: 'value-1' },
806
+ * { id: 'ticket-2', value: 'value-2' },
807
+ * ])
808
+ *
809
+ * console.log(tickets) // [{ id: 'ticket-1', ... }, { id: 'ticket-2', ... }]
810
+ * ```
811
+ */
812
+ onboard: (registrations: Partial<Z>[]) => Z[];
813
+ /**
814
+ * The number of tickets in the registry
815
+ *
816
+ * @remarks Reflects the current size of the internal ticket collection.
817
+ *
818
+ * @see https://0.vuetifyjs.com/composables/registration/use-registry#size
819
+ *
820
+ * @example
821
+ * ```ts
822
+ * import { useRegistry } from '@vuetify/v0'
823
+ *
824
+ * const registry = useRegistry()
825
+ *
826
+ * registry.register({ id: 'ticket-1' })
827
+ * registry.register({ id: 'ticket-2' })
828
+ *
829
+ * console.log(registry.size) // 2
830
+ * ```
831
+ */
832
+ size: number;
833
+ }
834
+ interface RegistryOptions {
835
+ /**
836
+ * Enable event emission for registry operations
837
+ *
838
+ * @default false
839
+ * @remarks When enabled, the registry will emit events for operations like registration and unregistration. Listeners can be added using the `on` method.
840
+ *
841
+ * @example
842
+ * ```ts
843
+ * import { useRegistry } from '@vuetify/v0'
844
+ *
845
+ * const registry = useRegistry({ events: true })
846
+ *
847
+ * registry.on('register:ticket', (ticket) => {
848
+ * console.log('Ticket registered:', ticket)
849
+ * })
850
+ *
851
+ * registry.register({ id: 'ticket-id' }) // Console: Ticket registered: { id: 'ticket-id', ... }
852
+ * ```
853
+ */
854
+ events?: boolean;
855
+ }
856
+ /**
857
+ * Creates a new registry instance.
858
+ *
859
+ * @param options The options for the registry instance.
860
+ * @template Z The type of registry ticket that extends RegistryTicket. Use this to add custom properties to tickets.
861
+ * @template E The type of registry context that extends RegistryContext<Z>. Use this when extending the registry with additional methods.
862
+ * @returns A new registry instance.
863
+ *
864
+ * @see https://0.vuetifyjs.com/composables/registration/use-registry
865
+ *
866
+ * @example
867
+ * ```ts
868
+ * import { useRegistry } from '@vuetify/v0'
869
+ *
870
+ * const registry = useRegistry()
871
+ *
872
+ * const ticket1 = registry.register({ id: 'user-1', value: { name: 'John' } })
873
+ * const ticket2 = registry.register({ id: 'user-2', value: { name: 'Jane' } })
874
+ *
875
+ * console.log(registry.size) // 2
876
+ * console.log(registry.get('user-1')) // { id: 'user-1', index: 0, value: { name: 'John' }, ... }
877
+ * ```
878
+ */
879
+ declare function useRegistry<Z extends RegistryTicket = RegistryTicket, E extends RegistryContext<Z> = RegistryContext<Z>>(options?: RegistryOptions): E;
880
+ /**
881
+ * Creates a new registry context.
882
+ *
883
+ * @param namespace The namespace for the registry context.
884
+ * @param options The options for the registry context.
885
+ *
886
+ * @template Z The type of registry ticket that extends RegistryTicket. Use this to add custom properties to tickets.
887
+ * @template E The type of registry context that extends RegistryContext<Z>. Use this when extending the registry with additional methods.
888
+ *
889
+ * @see https://0.vuetifyjs.com/composables/registration/use-registry
890
+ *
891
+ * @example
892
+ * ```ts
893
+ * import { createRegistryContext } from '@vuetify/v0'
894
+ *
895
+ * export const [useItems, provideItems, items] = createRegistryContext('items')
896
+ *
897
+ * // In a parent component:
898
+ * provideItems()
899
+ *
900
+ * // In a child component:
901
+ * const items = useItems()
902
+ * items.register({ id: 'item-1', value: 'Value 1' })
903
+ * ```
904
+ */
905
+ declare function createRegistryContext<Z extends RegistryTicket = RegistryTicket, E extends RegistryContext<Z> = RegistryContext<Z>>(namespace: string, options?: RegistryOptions): ContextTrinity<E>;
906
+ //#endregion
907
+ //#region src/composables/useSelection/index.d.ts
908
+ interface SelectionTicket extends RegistryTicket {
909
+ disabled: boolean;
910
+ isSelected: Readonly<Ref<boolean, boolean>>;
911
+ /** Select self */
912
+ select: () => void;
913
+ /** Unselect self */
914
+ unselect: () => void;
915
+ /** Toggle self on and off */
916
+ toggle: () => void;
917
+ }
918
+ interface SelectionContext<Z extends SelectionTicket> extends RegistryContext<Z> {
919
+ selectedIds: Reactive<Set<ID>>;
920
+ selectedItems: ComputedRef<Set<Z>>;
921
+ selectedValues: ComputedRef<Set<unknown>>;
922
+ /** Clear all selected IDs and reindexes */
923
+ reset: () => void;
924
+ /** Select a ticket by ID (Toggle ON) */
925
+ select: (id: ID) => void;
926
+ /** Unselect a ticket by ID (Toggle OFF) */
927
+ unselect: (id: ID) => void;
928
+ /** Toggles a ticket ON and OFF by ID */
929
+ toggle: (id: ID) => void;
930
+ /** Check if a ticket is selected by ID */
931
+ selected: (id: ID) => boolean;
932
+ /** Mandates selected ID based on "mandatory" Option */
933
+ mandate: () => void;
934
+ }
935
+ interface SelectionOptions extends RegistryOptions {
936
+ /** When true, newly registered items are automatically selected if not disabled */
937
+ enroll?: boolean;
938
+ mandatory?: boolean | 'force';
939
+ }
940
+ /**
941
+ * Creates a new selection instance.
942
+ *
943
+ * @param options The options for the selection instance.
944
+ * @template Z The type of the selection ticket.
945
+ * @template E The type of the selection context.
946
+ * @returns A new selection instance.
947
+ *
948
+ * @see https://0.vuetifyjs.com/composables/selection/use-selection
949
+ *
950
+ * @example
951
+ * ```ts
952
+ * import { useSelection } from '@vuetify/v0'
953
+ *
954
+ * const selection = useSelection({ mandatory: true })
955
+ *
956
+ * selection.onboard([
957
+ * { id: 'item-1', value: 'Item 1' },
958
+ * { id: 'item-2', value: 'Item 2', disabled: true },
959
+ * { id: 'item-3', value: 'Item 3' },
960
+ * ])
961
+ *
962
+ * selection.select('item-1')
963
+ * selection.select('item-3')
964
+ *
965
+ * console.log(selection.selectedIds) // Set { 'item-1', 'item-3' }
966
+ * ```
967
+ */
968
+ declare function useSelection<Z extends SelectionTicket = SelectionTicket, E extends SelectionContext<Z> = SelectionContext<Z>>(options?: SelectionOptions): E;
969
+ /**
970
+ * Creates a new selection context.
971
+ *
972
+ * @param namespace The namespace for the selection context.
973
+ * @param options The options for the selection context.
974
+ * @template Z The type of the selection ticket.
975
+ * @template E The type of the selection context.
976
+ * @returns A new selection context.
977
+ *
978
+ * @see https://0.vuetifyjs.com/composables/selection/use-selection
979
+ *
980
+ * @example
981
+ * ```ts
982
+ * import { createSelectionContext } from '@vuetify/v0'
983
+ *
984
+ * export const [useCheckboxes, provideCheckboxes, checkboxes] = createSelectionContext('checkboxes')
985
+ *
986
+ * // In a parent component:
987
+ * provideCheckboxes()
988
+ *
989
+ * // In a child component:
990
+ * const checkboxes = useCheckboxes()
991
+ * checkboxes.select('checkbox-1')
992
+ * ```
993
+ */
994
+ declare function createSelectionContext<Z extends SelectionTicket = SelectionTicket, E extends SelectionContext<Z> = SelectionContext<Z>>(namespace: string, options?: SelectionOptions): ContextTrinity<E>;
995
+ //#endregion
996
+ //#region src/composables/useGroup/index.d.ts
997
+ interface GroupTicket extends SelectionTicket {}
998
+ interface GroupContext<Z extends GroupTicket> extends SelectionContext<Z> {
999
+ selectedIndexes: ComputedRef<Set<number>>;
1000
+ /** Select one or more Tickets by ID */
1001
+ select: (ids: ID | ID[]) => void;
1002
+ /** Unselect one or more Tickets by ID */
1003
+ unselect: (ids: ID | ID[]) => void;
1004
+ /** Toggle one or more Tickets ON and OFF by ID */
1005
+ toggle: (ids: ID | ID[]) => void;
1006
+ }
1007
+ interface GroupOptions extends SelectionOptions {}
1008
+ /**
1009
+ * Creates a new group instance.
1010
+ *
1011
+ * @param options The options for the group instance.
1012
+ * @template Z The type of the group ticket.
1013
+ * @template E The type of the group context.
1014
+ * @returns A new group instance.
1015
+ *
1016
+ * @see https://0.vuetifyjs.com/composables/selection/use-group
1017
+ *
1018
+ * @example
1019
+ * ```ts
1020
+ * import { useGroup } from '@vuetify/v0'
1021
+ *
1022
+ * const group = useGroup()
1023
+ *
1024
+ * group.onboard([
1025
+ * { id: 'item-1', value: 'Item 1' },
1026
+ * { id: 'item-2', value: 'Item 2' },
1027
+ * { id: 'item-3', value: 'Item 3' },
1028
+ * ])
1029
+ *
1030
+ * group.select(['item-1', 'item-2'])
1031
+ *
1032
+ * console.log(group.selectedIds) // Set { 'item-1', 'item-2' }
1033
+ * ```
1034
+ */
1035
+ declare function useGroup<Z extends GroupTicket = GroupTicket, E extends GroupContext<Z> = GroupContext<Z>>(options?: GroupOptions): E;
1036
+ /**
1037
+ * Creates a new group context.
1038
+ *
1039
+ * @param namespace The namespace for the group context.
1040
+ * @param options The options for the group context.
1041
+ * @template Z The type of the group ticket.
1042
+ * @template E The type of the group context.
1043
+ * @returns A new group context.
1044
+ *
1045
+ * @see https://0.vuetifyjs.com/composables/selection/use-group
1046
+ *
1047
+ * @example
1048
+ * ```ts
1049
+ * import { createGroupContext } from '@vuetify/v0'
1050
+ *
1051
+ * export const [useMyGroup, provideMyGroup, myGroup] = createGroupContext('my-group')
1052
+ *
1053
+ * // In a parent component:
1054
+ * provideMyGroup()
1055
+ *
1056
+ * // In a child component:
1057
+ * const group = useMyGroup()
1058
+ * ```
1059
+ */
1060
+ declare function createGroupContext<Z extends GroupTicket = GroupTicket, E extends GroupContext<Z> = GroupContext<Z>>(namespace: string, options?: GroupOptions): ContextTrinity<E>;
1061
+ //#endregion
1062
+ //#region src/composables/useTokens/index.d.ts
1063
+ interface TokenAlias<T = unknown> {
1064
+ [key: string]: unknown;
1065
+ $value: T;
1066
+ $type?: string;
1067
+ $description?: string;
1068
+ $extensions?: Record<string, unknown>;
1069
+ $deprecated?: boolean | string;
1070
+ }
1071
+ type TokenPrimitive = string | number | boolean;
1072
+ type TokenValue = TokenPrimitive | TokenAlias;
1073
+ interface TokenCollection {
1074
+ [key: string]: TokenValue | TokenCollection;
1075
+ }
1076
+ type FlatTokenCollection = {
1077
+ id: string;
1078
+ value: TokenValue;
1079
+ };
1080
+ interface TokenTicket extends RegistryTicket {}
1081
+ interface TokenContext<Z extends TokenTicket> extends RegistryContext<Z> {
1082
+ isAlias: (token: unknown) => token is string;
1083
+ resolve: (token: string | TokenAlias) => unknown | undefined;
1084
+ }
1085
+ interface TokenOptions {
1086
+ flat?: boolean;
1087
+ prefix?: string;
1088
+ }
1089
+ /**
1090
+ * Creates a new token instance.
1091
+ *
1092
+ * @param tokens The tokens to use.
1093
+ * @param options The options for the token instance.
1094
+ * @template Z The type of the token ticket.
1095
+ * @template E The type of the token context.
1096
+ * @returns A new token instance.
1097
+ *
1098
+ * @see https://www.designtokens.org/tr/drafts/format/
1099
+ * @see https://0.vuetifyjs.com/composables/registration/use-tokens
1100
+ *
1101
+ * @example
1102
+ * ```ts
1103
+ * import { useTokens } from '@vuetify/v0'
1104
+ *
1105
+ * const tokens = useTokens({
1106
+ * colors: {
1107
+ * primary: '#3b82f6',
1108
+ * secondary: '{colors.primary}', // Alias reference
1109
+ * },
1110
+ * })
1111
+ *
1112
+ * console.log(tokens.resolve('{colors.primary}')) // '#3b82f6'
1113
+ * console.log(tokens.resolve('{colors.secondary}')) // '#3b82f6'
1114
+ * ```
1115
+ */
1116
+ declare function useTokens<Z extends TokenTicket = TokenTicket, E extends TokenContext<Z> = TokenContext<Z>>(tokens?: TokenCollection, options?: TokenOptions): E;
1117
+ /**
1118
+ * Creates a new token context.
1119
+ *
1120
+ * @param namespace The namespace for the token context.
1121
+ * @param tokens The tokens to use.
1122
+ * @template Z The type of the token ticket.
1123
+ * @template E The type of the token context.
1124
+ * @returns A new token context.
1125
+ *
1126
+ * @see https://0.vuetifyjs.com/composables/registration/use-tokens
1127
+ *
1128
+ * @example
1129
+ * ```ts
1130
+ * import { createTokensContext } from '@vuetify/v0'
1131
+ *
1132
+ * const myTokens = {
1133
+ * spacing: {
1134
+ * sm: '8px',
1135
+ * md: '16px',
1136
+ * lg: '24px',
1137
+ * },
1138
+ * }
1139
+ *
1140
+ * export const [useDesignTokens, provideDesignTokens, designTokens] = createTokensContext('design-tokens', myTokens)
1141
+ *
1142
+ * // In a parent component:
1143
+ * provideDesignTokens()
1144
+ *
1145
+ * // In a child component:
1146
+ * const tokens = useDesignTokens()
1147
+ *
1148
+ * console.log(tokens.resolve('{spacing.md}')) // '16px'
1149
+ * ```
1150
+ */
1151
+ declare function createTokensContext<Z extends TokenTicket = TokenTicket, E extends TokenContext<Z> = TokenContext<Z>>(namespace: string, tokens?: TokenCollection): ContextTrinity<E>;
1152
+ //#endregion
1153
+ //#region src/composables/useFeatures/index.d.ts
1154
+ interface FeatureTicket extends GroupTicket {
1155
+ value: TokenValue;
1156
+ }
1157
+ interface FeatureContext<Z extends FeatureTicket = FeatureTicket> extends GroupContext<Z> {
1158
+ variation: (id: ID, fallback?: any) => any;
1159
+ }
1160
+ interface FeatureOptions extends FeaturePluginOptions {}
1161
+ interface FeaturePluginOptions {
1162
+ features?: Record<ID, boolean | TokenCollection>;
1163
+ }
1164
+ /**
1165
+ * Creates a new features instance.
1166
+ *
1167
+ * @param namespace The namespace to use for the features instance.
1168
+ * @param options The options for the features instance.
1169
+ * @template Z The type of the feature ticket.
1170
+ * @template E The type of the feature context.
1171
+ * @returns A new features instance.
1172
+ *
1173
+ * @see https://0.vuetifyjs.com/composables/plugins/create-features
1174
+ *
1175
+ * @example
1176
+ * ```ts
1177
+ * import { createFeatures } from '@vuetify/v0'
1178
+ *
1179
+ * const [useFeatures, provideFeaturesContext] = createFeatures('v0:features', {
1180
+ * features: {
1181
+ * 'dark-mode': true,
1182
+ * 'theme-color': { $variation: 'blue' },
1183
+ * },
1184
+ * })
1185
+ * ```
1186
+ */
1187
+ declare function createFeatures<Z extends FeatureTicket = FeatureTicket, E extends FeatureContext<Z> = FeatureContext<Z>>(namespace?: string, options?: FeatureOptions): ContextTrinity<E>;
1188
+ /**
1189
+ * Returns the current features instance.
1190
+ *
1191
+ * @template Z The type of the feature ticket.
1192
+ * @returns The current features instance.
1193
+ *
1194
+ * @see https://0.vuetifyjs.com/composables/plugins/create-features
1195
+ *
1196
+ * @example
1197
+ * ```vue
1198
+ * <script setup lang="ts">
1199
+ * import { useFeatures } from '@vuetify/v0'
1200
+ *
1201
+ * const features = useFeatures()
1202
+ * </script>
1203
+ *
1204
+ * <template>
1205
+ * <div>
1206
+ * <p>Features: {{ features.get('dark-mode') }}</p>
1207
+ * <p>Theme Color: {{ features.variation('theme-color') }}</p>
1208
+ * </div>
1209
+ * </template>
1210
+ * ```
1211
+ */
1212
+ declare function useFeatures<Z extends FeatureTicket = FeatureTicket>(): FeatureContext<Z>;
1213
+ /**
1214
+ * Creates a new features plugin.
1215
+ *
1216
+ * @param options The options for the features plugin.
1217
+ * @template Z The type of the feature ticket.
1218
+ * @template E The type of the feature context.
1219
+ * @returns A new features plugin.
1220
+ *
1221
+ * @see https://0.vuetifyjs.com/composables/plugins/create-features
1222
+ *
1223
+ * @example
1224
+ * ```ts
1225
+ * import { createApp } from 'vue'
1226
+ * import { createFeaturesPlugin } from '@vuetify/v0'
1227
+ * import App from './App.vue'
1228
+ *
1229
+ * const app = createApp(App)
1230
+ *
1231
+ * app.use(
1232
+ * createFeaturesPlugin({
1233
+ * features: {
1234
+ * 'dark-mode': true,
1235
+ * 'theme-color': { $variation: 'blue' },
1236
+ * },
1237
+ * })
1238
+ * )
1239
+ *
1240
+ * app.mount('#app')
1241
+ * ```
1242
+ */
1243
+ declare function createFeaturesPlugin<Z extends FeatureTicket = FeatureTicket, E extends FeatureContext<Z> = FeatureContext<Z>>(options?: FeaturePluginOptions): Plugin;
1244
+ //#endregion
1245
+ //#region src/composables/useFilter/index.d.ts
1246
+ type Primitive = string | number | boolean;
1247
+ type FilterQuery = MaybeRefOrGetter<Primitive | Primitive[]>;
1248
+ type FilterItem = Primitive | Record<string, any>;
1249
+ type FilterMode = 'some' | 'every' | 'union' | 'intersection';
1250
+ type FilterFunction = (query: Primitive | Primitive[], item: FilterItem) => boolean;
1251
+ interface UseFilterOptions {
1252
+ customFilter?: FilterFunction;
1253
+ keys?: string[];
1254
+ mode?: FilterMode;
1255
+ }
1256
+ interface UseFilterResult<Z extends FilterItem = FilterItem> {
1257
+ items: ComputedRef<Z[]>;
1258
+ }
1259
+ /**
1260
+ * A reusable function for filtering an array of items.
1261
+ *
1262
+ * @param query The query to filter by.
1263
+ * @param items The items to filter.
1264
+ * @param options The filter options.
1265
+ * @template Z The type of the items.
1266
+ * @returns The filtered items.
1267
+ *
1268
+ * @see https://0.vuetifyjs.com/composables/selection/use-filter
1269
+ *
1270
+ * @example
1271
+ * ```ts
1272
+ * import { ref } from 'vue'
1273
+ * import { useFilter } from '@vuetify/v0'
1274
+ *
1275
+ * const items = ref([
1276
+ * { name: 'John Doe', age: 30 },
1277
+ * { name: 'Jane Doe', age: 25 },
1278
+ * { name: 'Peter Jones', age: 40 },
1279
+ * ])
1280
+ *
1281
+ * const query = ref('doe')
1282
+ * const { items: filtered } = useFilter(query, items, { keys: ['name'] })
1283
+ *
1284
+ * console.log(filtered.value) // [ { name: 'John Doe', age: 30 }, { name: 'Jane Doe', age: 25 } ]
1285
+ * ```
1286
+ */
1287
+ declare function useFilter<Z extends FilterItem>(query: FilterQuery, items: MaybeRef<Z[]>, options?: UseFilterOptions): UseFilterResult<Z>;
1288
+ //#endregion
1289
+ //#region src/composables/useForm/index.d.ts
1290
+ type FormValidationResult = string | true | Promise<string | true>;
1291
+ type FormValidationRule = (value: any) => FormValidationResult;
1292
+ type FormValue = Ref<any> | ShallowRef<any>;
1293
+ interface FormTicket extends RegistryTicket {
1294
+ validate: (silent?: boolean) => Promise<boolean>;
1295
+ reset: () => void;
1296
+ validateOn: 'submit' | 'change' | string;
1297
+ disabled: boolean;
1298
+ errors: ShallowRef<string[]>;
1299
+ rules: FormValidationRule[];
1300
+ isPristine: ShallowRef<boolean>;
1301
+ isValid: ShallowRef<boolean | null>;
1302
+ isValidating: ShallowRef<boolean>;
1303
+ }
1304
+ interface FormContext<Z extends FormTicket = FormTicket> extends RegistryContext<Z> {
1305
+ submit: (id?: ID | ID[]) => Promise<boolean>;
1306
+ reset: () => void;
1307
+ validateOn: 'submit' | 'change' | string;
1308
+ isValid: ComputedRef<boolean | null>;
1309
+ isValidating: ComputedRef<boolean>;
1310
+ }
1311
+ interface FormOptions extends RegistryOptions {
1312
+ validateOn?: 'submit' | 'change' | string;
1313
+ }
1314
+ /**
1315
+ * Creates a new form instance.
1316
+ *
1317
+ * @param options The options for the form instance.
1318
+ * @template Z The type of the form ticket.
1319
+ * @template E The type of the form context.
1320
+ * @returns A new form instance.
1321
+ *
1322
+ * @see https://0.vuetifyjs.com/composables/forms/use-form
1323
+ *
1324
+ * @example
1325
+ * ```ts
1326
+ * import { useForm } from '@vuetify/v0'
1327
+ *
1328
+ * const form = useForm()
1329
+ *
1330
+ * const username = form.register({
1331
+ * id: 'username',
1332
+ * value: '',
1333
+ * rules: [(v) => v.length > 0 || 'Username is required'],
1334
+ * })
1335
+ *
1336
+ * await form.submit()
1337
+ *
1338
+ * console.log(username.errors.value) // ['Username is required']
1339
+ *
1340
+ * form.reset()
1341
+ * ```
1342
+ */
1343
+ declare function useForm<Z extends FormTicket = FormTicket, E extends FormContext<Z> = FormContext<Z>>(options?: FormOptions): E;
1344
+ //#endregion
1345
+ //#region src/composables/useHydration/index.d.ts
1346
+ interface HydrationContext {
1347
+ isHydrated: Readonly<ShallowRef<boolean>>;
1348
+ hydrate: () => void;
1349
+ }
1350
+ declare const useHydrationContext: (key?: ContextKey<HydrationContext>) => HydrationContext, provideHydrationContext: (context: HydrationContext, app?: App) => HydrationContext;
1351
+ /**
1352
+ * Creates a new hydration instance.
1353
+ *
1354
+ * @returns A new hydration instance.
1355
+ *
1356
+ * @see https://0.vuetifyjs.com/composables/plugins/use-hydration
1357
+ *
1358
+ * @example
1359
+ * ```ts
1360
+ * import { createHydration } from '@vuetify/v0'
1361
+ *
1362
+ * const [useHydration, provideHydration] = createHydration()
1363
+ * ```
1364
+ */
1365
+ declare function createHydration(): HydrationContext;
1366
+ /**
1367
+ * Returns the current hydration instance.
1368
+ *
1369
+ * @returns The current hydration instance.
1370
+ *
1371
+ * @see https://0.vuetifyjs.com/composables/plugins/use-hydration
1372
+ *
1373
+ * @example
1374
+ * ```vue
1375
+ * <script setup lang="ts">
1376
+ * import { useHydration } from '@vuetify/v0'
1377
+ *
1378
+ * const hydration = useHydration()
1379
+ * </script>
1380
+ *
1381
+ * <template>
1382
+ * <div>
1383
+ * <p>Is hydrated: {{ hydration.isHydrated.value }}</p>
1384
+ * </div>
1385
+ * </template>
1386
+ * ```
1387
+ */
1388
+ declare function useHydration(): HydrationContext;
1389
+ /**
1390
+ * Creates a new hydration plugin.
1391
+ *
1392
+ * @returns A new hydration plugin.
1393
+ *
1394
+ * @see https://0.vuetifyjs.com/composables/plugins/use-hydration
1395
+ *
1396
+ * @example
1397
+ * ```ts
1398
+ * import { createApp } from 'vue'
1399
+ * import { createHydrationPlugin } from '@vuetify/v0'
1400
+ * import App from './App.vue'
1401
+ *
1402
+ * const plugin = createHydrationPlugin()
1403
+ *
1404
+ * const app = createApp(App)
1405
+ *
1406
+ * app.use(plugin)
1407
+ *
1408
+ * app.mount('#app')
1409
+ * ```
1410
+ */
1411
+ declare function createHydrationPlugin(): Plugin;
1412
+ //#endregion
1413
+ //#region src/composables/useIntersectionObserver/index.d.ts
1414
+ interface IntersectionObserverEntry {
1415
+ boundingClientRect: DOMRectReadOnly;
1416
+ intersectionRatio: number;
1417
+ intersectionRect: DOMRectReadOnly;
1418
+ isIntersecting: boolean;
1419
+ rootBounds: DOMRectReadOnly | null;
1420
+ target: Element;
1421
+ time: number;
1422
+ }
1423
+ interface IntersectionObserverOptions {
1424
+ immediate?: boolean;
1425
+ root?: Element | null;
1426
+ rootMargin?: string;
1427
+ threshold?: number | number[];
1428
+ }
1429
+ /**
1430
+ * A composable that uses the Intersection Observer API to detect when an element
1431
+ * is visible in the viewport.
1432
+ *
1433
+ * @param target The element to observe.
1434
+ * @param callback The callback to execute when the element's intersection changes.
1435
+ * @param options The options for the Intersection Observer.
1436
+ * @returns An object with methods to control the observer.
1437
+ *
1438
+ * @see https://developer.mozilla.org/en-US/docs/Web/API/IntersectionObserver
1439
+ * @see https://0.vuetifyjs.com/composables/system/use-intersection-observer
1440
+ *
1441
+ * @example
1442
+ * ```ts
1443
+ * import { ref } from 'vue'
1444
+ * import { useIntersectionObserver } from '@vuetify/v0'
1445
+ *
1446
+ * const target = ref<HTMLElement>()
1447
+ * const isVisible = ref(false)
1448
+ *
1449
+ * const { isIntersecting, pause, resume } = useIntersectionObserver(
1450
+ * target,
1451
+ * (entries) => {
1452
+ * const entry = entries[0]
1453
+ * if (entry) {
1454
+ * isVisible.value = entry.isIntersecting
1455
+ * console.log('Element is visible:', entry.isIntersecting)
1456
+ * }
1457
+ * },
1458
+ * { threshold: 0.5 }
1459
+ * )
1460
+ *
1461
+ * // Pause observation
1462
+ * pause()
1463
+ *
1464
+ * // Resume observation
1465
+ * resume()
1466
+ * ```
1467
+ */
1468
+ declare function useIntersectionObserver(target: Ref<Element | undefined>, callback: (entries: IntersectionObserverEntry[]) => void, options?: IntersectionObserverOptions): {
1469
+ isIntersecting: Readonly<Ref<boolean, boolean>>;
1470
+ isPaused: Readonly<Ref<boolean, boolean>>;
1471
+ pause: () => void;
1472
+ resume: () => void;
1473
+ stop: () => void;
1474
+ };
1475
+ /**
1476
+ * A convenience composable that uses the Intersection Observer API to detect
1477
+ * when an element is visible in the viewport.
1478
+ *
1479
+ * @param target The element to observe.
1480
+ * @param options The options for the Intersection Observer.
1481
+ * @returns An object with the intersection state.
1482
+ *
1483
+ * @see https://0.vuetifyjs.com/composables/system/use-intersection-observer
1484
+ *
1485
+ * @example
1486
+ * ```ts
1487
+ * import { ref } from 'vue'
1488
+ * import { useElementIntersection } from '@vuetify/v0'
1489
+ *
1490
+ * const myElement = ref<HTMLElement>()
1491
+ * const { isIntersecting, intersectionRatio } = useElementIntersection(myElement, {
1492
+ * threshold: 0.5
1493
+ * })
1494
+ *
1495
+ * // Use in template to conditionally render or animate
1496
+ * watchEffect(() => {
1497
+ * if (isIntersecting.value) {
1498
+ * console.log('Element is visible!', intersectionRatio.value)
1499
+ * }
1500
+ * })
1501
+ * ```
1502
+ */
1503
+ declare function useElementIntersection(target: Ref<Element | undefined>, options?: IntersectionObserverOptions): {
1504
+ isIntersecting: Readonly<Ref<boolean, boolean>>;
1505
+ intersectionRatio: Readonly<Ref<number, number>>;
1506
+ isPaused: Readonly<Ref<boolean, boolean>>;
1507
+ pause: () => void;
1508
+ resume: () => void;
1509
+ stop: () => void;
1510
+ };
1511
+ //#endregion
1512
+ //#region src/composables/useKeydown/index.d.ts
1513
+ interface KeyHandler {
1514
+ key: string;
1515
+ handler: (event: KeyboardEvent) => void;
1516
+ preventDefault?: boolean;
1517
+ stopPropagation?: boolean;
1518
+ }
1519
+ /**
1520
+ * A composable that adds a keydown event listener to the document.
1521
+ *
1522
+ * @param handlers The key handlers to add.
1523
+ * @returns An object with methods to start and stop listening.
1524
+ *
1525
+ * @see https://0.vuetifyjs.com/composables/system/use-keydown
1526
+ *
1527
+ * @example
1528
+ * ```ts
1529
+ * import { useKeydown } from '@vuetify/v0'
1530
+ *
1531
+ * const { startListening, stopListening } = useKeydown([
1532
+ * { key: 'Enter', handler: () => console.log('Enter pressed') },
1533
+ * { key: 'Escape', handler: () => console.log('Escape pressed'), preventDefault: true },
1534
+ * ])
1535
+ *
1536
+ * startListening()
1537
+ * stopListening()
1538
+ * ```
1539
+ */
1540
+ declare function useKeydown(handlers: KeyHandler[] | KeyHandler): {
1541
+ startListening: () => void;
1542
+ stopListening: () => void;
1543
+ };
1544
+ //#endregion
1545
+ //#region src/composables/useSingle/index.d.ts
1546
+ interface SingleTicket extends SelectionTicket {}
1547
+ interface SingleContext<Z extends SingleTicket> extends SelectionContext<Z> {
1548
+ selectedId: ComputedRef<ID | undefined>;
1549
+ selectedIndex: ComputedRef<number>;
1550
+ selectedItem: ComputedRef<Z | undefined>;
1551
+ selectedValue: ComputedRef<unknown>;
1552
+ }
1553
+ interface SingleOptions extends SelectionOptions {}
1554
+ /**
1555
+ * Creates a new single selection instance.
1556
+ *
1557
+ * @param options The options for the single selection instance.
1558
+ * @template Z The type of the single selection ticket.
1559
+ * @template E The type of the single selection context.
1560
+ * @returns A new single selection instance.
1561
+ *
1562
+ * @see https://0.vuetifyjs.com/composables/selection/use-single
1563
+ *
1564
+ * @example
1565
+ * ```ts
1566
+ * import { useSingle } from '@vuetify/v0'
1567
+ *
1568
+ * const single = useSingle()
1569
+ *
1570
+ * single.onboard([
1571
+ * { id: 'option-1', value: 'Option 1' },
1572
+ * { id: 'option-2', value: 'Option 2' },
1573
+ * ])
1574
+ *
1575
+ * single.select('option-1')
1576
+ *
1577
+ * console.log(single.selectedId.value) // 'option-1'
1578
+ * ```
1579
+ */
1580
+ declare function useSingle<Z extends SingleTicket = SingleTicket, E extends SingleContext<Z> = SingleContext<Z>>(options?: SingleOptions): E;
1581
+ /**
1582
+ * Creates a new single selection context.
1583
+ *
1584
+ * @param namespace The namespace for the single selection context.
1585
+ * @param options The options for the single selection context.
1586
+ * @template Z The type of the single selection ticket.
1587
+ * @template E The type of the single selection context.
1588
+ * @returns A new single selection context.
1589
+ *
1590
+ * @see https://0.vuetifyjs.com/composables/selection/use-single
1591
+ *
1592
+ * @example
1593
+ * ```ts
1594
+ * import { createSingleContext } from '@vuetify/v0'
1595
+ *
1596
+ * export const [useTabs, provideTabs, tabs] = createSingleContext('tabs', { mandatory: true })
1597
+ *
1598
+ * // In a parent component:
1599
+ * provideTabs()
1600
+ *
1601
+ * // In a child component:
1602
+ * const tabs = useTabs()
1603
+ * tabs.select('tab-1')
1604
+ * ```
1605
+ */
1606
+ declare function createSingleContext<Z extends SingleTicket = SingleTicket, E extends SingleContext<Z> = SingleContext<Z>>(namespace: string, options?: SingleOptions): ContextTrinity<E>;
1607
+ //#endregion
1608
+ //#region src/composables/useLocale/adapters/adapter.d.ts
1609
+ interface LocaleAdapter {
1610
+ t: (message: string, ...params: unknown[]) => string;
1611
+ n: (value: number, locale: ID | undefined, ...params: unknown[]) => string;
1612
+ }
1613
+ //#endregion
1614
+ //#region src/composables/useLocale/adapters/v0.d.ts
1615
+ /**
1616
+ * Vuetify0.x locale adapter implementation
1617
+ *
1618
+ * This adapter provides translation and number formatting
1619
+ * capabilities using the Intl API and supports both
1620
+ * numbered and named variables in translation strings.
1621
+ */
1622
+ declare class Vuetify0LocaleAdapter implements LocaleAdapter {
1623
+ t(message: string, ...params: unknown[]): string;
1624
+ n(value: number, locale: ID | undefined, ...params: unknown[]): string;
1625
+ }
1626
+ //#endregion
1627
+ //#region src/composables/useLocale/index.d.ts
1628
+ type LocaleRecord = TokenCollection;
1629
+ type LocaleTicket = SingleTicket;
1630
+ interface LocaleContext<Z extends LocaleTicket> extends SingleContext<Z> {
1631
+ t: (key: string, ...params: unknown[]) => string;
1632
+ n: (value: number) => string;
1633
+ }
1634
+ interface LocaleOptions extends LocalePluginOptions {}
1635
+ interface LocalePluginOptions<Z extends LocaleRecord = LocaleRecord> {
1636
+ adapter?: LocaleAdapter;
1637
+ default?: ID;
1638
+ fallback?: ID;
1639
+ messages?: Record<ID, Z>;
1640
+ }
1641
+ /**
1642
+ * Creates a new locale instance.
1643
+ *
1644
+ * @param namespace The namespace for the locale instance.
1645
+ * @param options The options for the locale instance.
1646
+ * @template Z The type of the locale ticket.
1647
+ * @template E The type of the locale context.
1648
+ * @returns A new locale instance.
1649
+ *
1650
+ * @see https://0.vuetifyjs.com/composables/plugins/use-locale
1651
+ */
1652
+ declare function createLocale<Z extends LocaleTicket = LocaleTicket, E extends LocaleContext<Z> = LocaleContext<Z>>(namespace?: string, options?: LocaleOptions): ContextTrinity<E>;
1653
+ /**
1654
+ * Returns the current locale instance.
1655
+ *
1656
+ * @returns The current locale instance.
1657
+ *
1658
+ * @see https://0.vuetifyjs.com/composables/plugins/use-locale
1659
+ */
1660
+ declare function useLocale(): LocaleContext<LocaleTicket>;
1661
+ /**
1662
+ * Creates a new locale plugin.
1663
+ *
1664
+ * @param options The options for the locale plugin.
1665
+ * @template Z The type of the locale ticket.
1666
+ * @template E The type of the locale context.
1667
+ * @template R The type of the token ticket.
1668
+ * @template O The type of the token context.
1669
+ * @returns A new locale plugin.
1670
+ *
1671
+ * @see https://0.vuetifyjs.com/composables/plugins/use-locale
1672
+ */
1673
+ declare function createLocalePlugin<Z extends LocaleTicket = LocaleTicket, E extends LocaleContext<Z> = LocaleContext<Z>>(_options?: LocalePluginOptions): Plugin;
1674
+ //#endregion
1675
+ //#region src/composables/useLogger/adapters/adapter.d.ts
1676
+ interface LoggerAdapter {
1677
+ debug: (message: string, ...args: unknown[]) => void;
1678
+ info: (message: string, ...args: unknown[]) => void;
1679
+ warn: (message: string, ...args: unknown[]) => void;
1680
+ error: (message: string, ...args: unknown[]) => void;
1681
+ trace?: (message: string, ...args: unknown[]) => void;
1682
+ fatal?: (message: string, ...args: unknown[]) => void;
1683
+ }
1684
+ //#endregion
1685
+ //#region src/composables/useLogger/adapters/consola.d.ts
1686
+ declare class ConsolaLoggerAdapter implements LoggerAdapter {
1687
+ private consola;
1688
+ constructor(consolaInstance: any);
1689
+ debug(message: string, ...args: unknown[]): void;
1690
+ info(message: string, ...args: unknown[]): void;
1691
+ warn(message: string, ...args: unknown[]): void;
1692
+ error(message: string, ...args: unknown[]): void;
1693
+ trace(message: string, ...args: unknown[]): void;
1694
+ fatal(message: string, ...args: unknown[]): void;
1695
+ }
1696
+ //#endregion
1697
+ //#region src/composables/useLogger/adapters/pino.d.ts
1698
+ /**
1699
+ * Pino logger adapter implementation
1700
+ *
1701
+ * This adapter integrates with the Pino logging library,
1702
+ * providing high-performance structured logging optimized
1703
+ * for Node.js applications with minimal overhead.
1704
+ */
1705
+ declare class PinoLoggerAdapter implements LoggerAdapter {
1706
+ private pino;
1707
+ constructor(pinoInstance: any);
1708
+ debug(message: string, ...args: unknown[]): void;
1709
+ info(message: string, ...args: unknown[]): void;
1710
+ warn(message: string, ...args: unknown[]): void;
1711
+ error(message: string, ...args: unknown[]): void;
1712
+ trace(message: string, ...args: unknown[]): void;
1713
+ fatal(message: string, ...args: unknown[]): void;
1714
+ private format;
1715
+ }
1716
+ //#endregion
1717
+ //#region src/composables/useLogger/adapters/v0.d.ts
1718
+ /**
1719
+ * Vuetify0.x logger adapter implementation
1720
+ *
1721
+ * This adapter provides console-based logging with proper formatting,
1722
+ * color coding, timestamps, and log level filtering for development
1723
+ * and production environments.
1724
+ */
1725
+ declare class Vuetify0LoggerAdapter implements LoggerAdapter {
1726
+ private prefix;
1727
+ private colors;
1728
+ private timestamps;
1729
+ constructor(options?: {
1730
+ prefix?: string;
1731
+ colors?: boolean;
1732
+ timestamps?: boolean;
1733
+ });
1734
+ debug(message: string, ...args: unknown[]): void;
1735
+ info(message: string, ...args: unknown[]): void;
1736
+ warn(message: string, ...args: unknown[]): void;
1737
+ error(message: string, ...args: unknown[]): void;
1738
+ trace(message: string, ...args: unknown[]): void;
1739
+ fatal(message: string, ...args: unknown[]): void;
1740
+ private format;
1741
+ private timestamp;
1742
+ private style;
1743
+ private log;
1744
+ }
1745
+ //#endregion
1746
+ //#region src/composables/useLogger/types.d.ts
1747
+ type LogLevel = 'trace' | 'debug' | 'info' | 'warn' | 'error' | 'fatal' | 'silent';
1748
+ //#endregion
1749
+ //#region src/composables/useLogger/index.d.ts
1750
+ interface LoggerContext {
1751
+ debug: (message: string, ...args: unknown[]) => void;
1752
+ info: (message: string, ...args: unknown[]) => void;
1753
+ warn: (message: string, ...args: unknown[]) => void;
1754
+ error: (message: string, ...args: unknown[]) => void;
1755
+ trace: (message: string, ...args: unknown[]) => void;
1756
+ fatal: (message: string, ...args: unknown[]) => void;
1757
+ level: (level: LogLevel) => void;
1758
+ current: () => LogLevel;
1759
+ enabled: () => boolean;
1760
+ enable: () => void;
1761
+ disable: () => void;
1762
+ }
1763
+ interface LoggerOptions {
1764
+ adapter?: LoggerAdapter;
1765
+ level?: LogLevel;
1766
+ prefix?: string;
1767
+ enabled?: boolean;
1768
+ }
1769
+ /**
1770
+ * Creates a new logger instance.
1771
+ *
1772
+ * @param options The options for the logger instance.
1773
+ * @returns A new logger instance.
1774
+ *
1775
+ * @see https://0.vuetifyjs.com/composables/plugins/use-logger
1776
+ */
1777
+ declare function createLogger(options?: LoggerOptions): LoggerContext;
1778
+ /**
1779
+ * Uses an existing or creates a new logger instance.
1780
+ *
1781
+ * @param namespace The namespace for the logger context.
1782
+ * @returns The logger instance.
1783
+ *
1784
+ * @see https://0.vuetifyjs.com/composables/plugins/use-logger
1785
+ */
1786
+ declare function useLogger(namespace?: string): LoggerContext;
1787
+ /**
1788
+ * Creates a new logger plugin.
1789
+ *
1790
+ * @param options The options for the logger plugin.
1791
+ * @returns A new logger plugin.
1792
+ *
1793
+ * @see https://0.vuetifyjs.com/composables/plugins/use-logger
1794
+ */
1795
+ declare function createLoggerPlugin(options?: LoggerOptions): Plugin;
1796
+ //#endregion
1797
+ //#region src/composables/useMutationObserver/index.d.ts
1798
+ interface MutationObserverRecord {
1799
+ type: 'attributes' | 'childList' | 'characterData';
1800
+ target: Node;
1801
+ addedNodes: NodeList;
1802
+ removedNodes: NodeList;
1803
+ previousSibling: Node | null;
1804
+ nextSibling: Node | null;
1805
+ attributeName: string | null;
1806
+ attributeNamespace: string | null;
1807
+ oldValue: string | null;
1808
+ }
1809
+ interface UseMutationObserverOptions {
1810
+ immediate?: boolean;
1811
+ childList?: boolean;
1812
+ attributes?: boolean;
1813
+ characterData?: boolean;
1814
+ subtree?: boolean;
1815
+ attributeOldValue?: boolean;
1816
+ characterDataOldValue?: boolean;
1817
+ attributeFilter?: string[];
1818
+ }
1819
+ /**
1820
+ * A composable that uses the Mutation Observer API to detect changes in the DOM.
1821
+ *
1822
+ * @param target The element to observe.
1823
+ * @param callback The callback to execute when a mutation is observed.
1824
+ * @param options The options for the Mutation Observer.
1825
+ * @returns An object with methods to control the observer.
1826
+ *
1827
+ * @see https://developer.mozilla.org/en-US/docs/Web/API/MutationObserver
1828
+ * @see https://0.vuetifyjs.com/composables/system/use-mutation-observer
1829
+ *
1830
+ * @example
1831
+ * ```ts
1832
+ * import { ref } from 'vue'
1833
+ * import { useMutationObserver } from '@vuetify/v0'
1834
+ *
1835
+ * const container = ref<HTMLElement>()
1836
+ *
1837
+ * const { pause, resume, isPaused } = useMutationObserver(
1838
+ * container,
1839
+ * (mutations) => {
1840
+ * mutations.forEach((mutation) => {
1841
+ * if (mutation.type === 'childList') {
1842
+ * console.log('Children changed:', mutation.addedNodes, mutation.removedNodes)
1843
+ * } else if (mutation.type === 'attributes') {
1844
+ * console.log('Attribute changed:', mutation.attributeName)
1845
+ * }
1846
+ * })
1847
+ * },
1848
+ * {
1849
+ * childList: true,
1850
+ * attributes: true,
1851
+ * subtree: true
1852
+ * }
1853
+ * )
1854
+ *
1855
+ * // Pause observation
1856
+ * pause()
1857
+ *
1858
+ * // Resume observation
1859
+ * resume()
1860
+ * ```
1861
+ */
1862
+ declare function useMutationObserver(target: Ref<Element | undefined>, callback: (entries: MutationObserverRecord[]) => void, options?: UseMutationObserverOptions): {
1863
+ isPaused: Readonly<Ref<boolean, boolean>>;
1864
+ pause: () => void;
1865
+ resume: () => void;
1866
+ stop: () => void;
1867
+ };
1868
+ //#endregion
1869
+ //#region src/composables/usePermissions/adapters/adapter.d.ts
1870
+ interface PermissionAdapterInterface {
1871
+ can: <Z extends PermissionTicket = PermissionTicket>(role: ID, action: string, subject: string, context: Record<string, any>, permissions: PermissionContext<Z>) => boolean;
1872
+ }
1873
+ declare abstract class PermissionAdapter implements PermissionAdapterInterface {
1874
+ abstract can<Z extends PermissionTicket = PermissionTicket>(role: ID, action: string, subject: string, context: Record<string, any>, permissions: PermissionContext<Z>): boolean;
1875
+ }
1876
+ //#endregion
1877
+ //#region src/composables/usePermissions/index.d.ts
1878
+ interface PermissionTicket extends TokenTicket {
1879
+ value: boolean | ((context: Record<string, any>) => boolean);
1880
+ }
1881
+ interface PermissionContext<Z extends PermissionTicket = PermissionTicket> extends TokenContext<Z> {
1882
+ can: (id: ID, action: string, subject: string, context?: Record<string, any>) => boolean;
1883
+ }
1884
+ interface PermissionOptions extends PermissionPluginOptions {}
1885
+ interface PermissionPluginOptions {
1886
+ adapter?: PermissionAdapter;
1887
+ permissions?: Record<ID, any>;
1888
+ }
1889
+ /**
1890
+ * Creates a new permissions instance.
1891
+ *
1892
+ * @param namespace The namespace for the permissions instance.
1893
+ * @param options The options for the permissions instance.
1894
+ * @template Z The type of the permission ticket.
1895
+ * @template E The type of the permission context.
1896
+ * @returns A new permissions instance.
1897
+ *
1898
+ * @see https://0.vuetifyjs.com/composables/plugins/create-permissions
1899
+ *
1900
+ * @example
1901
+ * ```ts
1902
+ * import { createPermissions } from '@vuetify/v0'
1903
+ *
1904
+ * const [usePermissions, providePermissions] = createPermissions('v0:permissions', {
1905
+ * permissions: {
1906
+ * admin: [['read', 'users']],
1907
+ * editor: [['edit', 'posts']],
1908
+ * },
1909
+ * })
1910
+ * ```
1911
+ */
1912
+ declare function createPermissions<Z extends PermissionTicket = PermissionTicket, E extends PermissionContext<Z> = PermissionContext<Z>>(namespace?: string, options?: PermissionOptions): ContextTrinity<E>;
1913
+ /**
1914
+ * Returns the current permissions instance.
1915
+ *
1916
+ * @template Z The type of the permission ticket.
1917
+ * @returns The current permissions instance.
1918
+ *
1919
+ * @see https://0.vuetifyjs.com/composables/plugins/use-permissions
1920
+ *
1921
+ * @example
1922
+ * ```vue
1923
+ * <script setup lang="ts">
1924
+ * import { usePermissions } from '@vuetify/v0'
1925
+ *
1926
+ * const { can } = usePermissions()
1927
+ * </script>
1928
+ *
1929
+ * <template>
1930
+ * <div>
1931
+ * <p v-if="can('admin', 'read', 'users')">Admin access</p>
1932
+ * </div>
1933
+ * </template>
1934
+ * ```
1935
+ */
1936
+ declare function usePermissions<Z extends PermissionTicket = PermissionTicket>(): PermissionContext<Z>;
1937
+ /**
1938
+ * Creates a new permissions plugin.
1939
+ *
1940
+ * @param options The options for the permissions plugin.
1941
+ * @template Z The type of the permission ticket.
1942
+ * @template E The type of the permission context.
1943
+ * @returns A new permissions plugin.
1944
+ *
1945
+ * @see https://0.vuetifyjs.com/composables/plugins/use-permissions
1946
+ *
1947
+ * @example
1948
+ * ```ts
1949
+ * import { createApp } from 'vue'
1950
+ * import { createPermissionsPlugin } from '@vuetify/v0'
1951
+ * import App from './App.vue'
1952
+ *
1953
+ * const app = createApp(App)
1954
+ *
1955
+ * app.use(
1956
+ * createPermissionsPlugin({
1957
+ * permissions: {
1958
+ * admin: [['read', 'users']],
1959
+ * editor: [['edit', 'posts']],
1960
+ * },
1961
+ * })
1962
+ * )
1963
+ *
1964
+ * app.mount('#app')
1965
+ * ```
1966
+ */
1967
+ declare function createPermissionsPlugin<Z extends PermissionTicket = PermissionTicket, E extends PermissionContext<Z> = PermissionContext<Z>>(options?: PermissionOptions): Plugin;
1968
+ //#endregion
1969
+ //#region src/composables/useProxyModel/index.d.ts
1970
+ interface ProxyModelOptions {
1971
+ /** Whether to use deep reactivity for the model */
1972
+ deep?: boolean;
1973
+ }
1974
+ /**
1975
+ * Creates a proxy model that can be used to bind to a selection.
1976
+ *
1977
+ * @param registry The selection registry to bind to.
1978
+ * @param initial The initial value of the model.
1979
+ * @param options The options for the proxy model.
1980
+ * @param transformIn A function to transform the value before setting it.
1981
+ * @param transformOut A function to transform the value before getting it.
1982
+ * @template Z The type of the selection ticket.
1983
+ * @returns A proxy model that can be used to bind to a selection.
1984
+ *
1985
+ * @see https://0.vuetifyjs.com/composables/forms/use-proxy-model
1986
+ *
1987
+ * @example
1988
+ * ```ts
1989
+ * import { useSelection, useProxyModel } from '@vuetify/v0'
1990
+ *
1991
+ * const registry = useSelection({ events: true })
1992
+ * registry.onboard([
1993
+ * { id: 'item-1', value: 'Item 1' },
1994
+ * { id: 'item-2', value: 'Item 2' },
1995
+ * ])
1996
+ *
1997
+ * const model = useProxyModel(registry, 'Item 1')
1998
+ * ```
1999
+ */
2000
+ declare function useProxyModel<Z extends SelectionTicket>(registry: SelectionContext<Z>, initial?: unknown | unknown[], options?: ProxyModelOptions, _transformIn?: (val: unknown[] | unknown) => unknown[], _transformOut?: (val: unknown[]) => unknown | unknown[]): vue169.WritableComputedRef<unknown, unknown>;
2001
+ //#endregion
2002
+ //#region src/composables/useProxyRegistry/index.d.ts
2003
+ interface ProxyRegistryOptions {
2004
+ deep?: boolean;
2005
+ }
2006
+ interface ProxyRegistryContext<Z extends RegistryTicket = RegistryTicket> {
2007
+ keys: ID[];
2008
+ values: Z[];
2009
+ entries: [ID, Z][];
2010
+ size: number;
2011
+ }
2012
+ /**
2013
+ * Creates a proxy registry that provides reactive objects for registry data.
2014
+ *
2015
+ * @param registry The registry instance to proxy.
2016
+ * @param options The options for the proxy registry.
2017
+ * @template Z The type of the registry ticket.
2018
+ * @returns A proxy registry with reactive objects.
2019
+ *
2020
+ * @see https://0.vuetifyjs.com/composables/registration/use-proxy-registry
2021
+ *
2022
+ * @example
2023
+ * ```ts
2024
+ * import { useRegistry, useProxyRegistry } from '@vuetify/v0'
2025
+ *
2026
+ * const registry = useRegistry({ events: true })
2027
+ * const proxy = useProxyRegistry(registry)
2028
+ *
2029
+ * registry.register({ value: 'Item 1' })
2030
+ * console.log(proxy.size) // 1
2031
+ * ```
2032
+ */
2033
+ declare function useProxyRegistry<Z extends RegistryTicket = RegistryTicket>(registry: RegistryContext<Z>, options?: ProxyRegistryOptions): ProxyRegistryContext<Z>;
2034
+ //#endregion
2035
+ //#region src/composables/useQueue/index.d.ts
2036
+ interface QueueTicket extends RegistryTicket {
2037
+ /**
2038
+ * Timeout in milliseconds
2039
+ *
2040
+ * @remarks
2041
+ * - If `undefined`: Uses the default timeout from queue options (default: 3000ms)
2042
+ * - If `-1`: Ticket persists indefinitely until manually dismissed
2043
+ * - If a number: Ticket will be automatically removed after the specified milliseconds
2044
+ */
2045
+ timeout?: number;
2046
+ /**
2047
+ * Whether the timeout is currently paused
2048
+ *
2049
+ * @remarks
2050
+ * - Set to `true` when the ticket is not the first in the queue or when manually paused
2051
+ * - When `true`, the timeout does not progress
2052
+ * - Automatically managed by the queue system
2053
+ */
2054
+ isPaused: boolean;
2055
+ /**
2056
+ * Convenience method to dismiss this ticket from the queue
2057
+ *
2058
+ * @remarks
2059
+ * Equivalent to calling `queue.unregister(ticket.id)`
2060
+ */
2061
+ dismiss: () => void;
2062
+ }
2063
+ interface QueueContext<Z extends QueueTicket = QueueTicket> extends RegistryContext<Z> {
2064
+ /**
2065
+ * Register a new ticket in the queue
2066
+ *
2067
+ * @param ticket The partial ticket data to register
2068
+ * @remarks
2069
+ * - If no ID is provided, a unique ID will be generated automatically
2070
+ * - If no timeout is provided, uses the default timeout from queue options (3000ms)
2071
+ * - First ticket in queue starts its timeout immediately
2072
+ * - Subsequent tickets are paused until they become first in queue
2073
+ * - Each ticket receives a `dismiss()` method for convenience
2074
+ *
2075
+ * @see https://0.vuetifyjs.com/composables/registration/use-queue#register
2076
+ *
2077
+ * @example
2078
+ * ```ts
2079
+ * import { useQueue } from '@vuetify/v0'
2080
+ *
2081
+ * const queue = useQueue()
2082
+ *
2083
+ * // Register with default timeout (3000ms)
2084
+ * const ticket1 = queue.register({ value: 'First' })
2085
+ *
2086
+ * // Register with custom timeout
2087
+ * const ticket2 = queue.register({ value: 'Second', timeout: 5000 })
2088
+ *
2089
+ * // Register persistent ticket (must be manually dismissed)
2090
+ * const ticket3 = queue.register({ value: 'Persistent', timeout: -1 })
2091
+ * ```
2092
+ */
2093
+ register: (ticket?: Partial<Z>) => Z;
2094
+ /**
2095
+ * Unregister a ticket from the queue
2096
+ *
2097
+ * @param id The ID of the ticket to unregister. If not provided, the first ticket in the queue will be unregistered.
2098
+ * @remarks
2099
+ * - Removes the ticket from the queue and clears its timeout
2100
+ * - If the removed ticket was first in queue, automatically resumes the next ticket
2101
+ * - Returns the unregistered ticket or `undefined` if not found
2102
+ *
2103
+ * @see https://0.vuetifyjs.com/composables/registration/use-queue#unregister
2104
+ *
2105
+ * @example
2106
+ * ```ts
2107
+ * import { useQueue } from '@vuetify/v0'
2108
+ *
2109
+ * const queue = useQueue()
2110
+ *
2111
+ * const ticket1 = queue.register({ value: 'First' })
2112
+ * const ticket2 = queue.register({ value: 'Second' })
2113
+ *
2114
+ * // Unregister specific ticket
2115
+ * queue.unregister(ticket2.id)
2116
+ *
2117
+ * // Unregister first ticket in queue
2118
+ * const removed = queue.unregister()
2119
+ * console.log(removed?.value) // 'First'
2120
+ * ```
2121
+ */
2122
+ unregister: (id?: ID) => Z | undefined;
2123
+ /**
2124
+ * Pause the timeout of the first ticket in the queue
2125
+ *
2126
+ * @remarks
2127
+ * - Pauses the timeout for the first ticket if it exists and is not already paused
2128
+ * - Returns the paused ticket or `undefined` if no pausable ticket exists
2129
+ * - The timeout will not progress while paused
2130
+ *
2131
+ * @see https://0.vuetifyjs.com/composables/registration/use-queue#pause
2132
+ *
2133
+ * @example
2134
+ * ```ts
2135
+ * import { useQueue } from '@vuetify/v0'
2136
+ *
2137
+ * const queue = useQueue({ timeout: 5000 })
2138
+ *
2139
+ * const ticket = queue.register({ value: 'Pausable ticket' })
2140
+ *
2141
+ * // Pause the first ticket's timeout
2142
+ * const paused = queue.pause()
2143
+ *
2144
+ * console.log(paused?.isPaused) // true
2145
+ * ```
2146
+ */
2147
+ pause: () => Z | undefined;
2148
+ /**
2149
+ * Resume the timeout of the first paused ticket in the queue
2150
+ *
2151
+ * @remarks
2152
+ * - Resumes the timeout for the first ticket if it exists, is at index 0, and is currently paused
2153
+ * - Returns the resumed ticket or `undefined` if no resumable ticket exists
2154
+ * - The timeout will continue from its full duration (not from where it was paused)
2155
+ *
2156
+ * @see https://0.vuetifyjs.com/composables/registration/use-queue#resume
2157
+ *
2158
+ * @example
2159
+ * ```ts
2160
+ * import { useQueue } from '@vuetify/v0'
2161
+ *
2162
+ * const queue = useQueue({ timeout: 5000 })
2163
+ *
2164
+ * const ticket = queue.register({ value: 'Ticket' })
2165
+ * queue.pause()
2166
+ *
2167
+ * // Later, resume the paused ticket
2168
+ * const resumed = queue.resume()
2169
+ *
2170
+ * console.log(resumed?.isPaused) // false
2171
+ * ```
2172
+ */
2173
+ resume: () => Z | undefined;
2174
+ /**
2175
+ * Clear the entire queue
2176
+ *
2177
+ * @remarks
2178
+ * - Removes all tickets from the queue
2179
+ * - Clears all active timeouts
2180
+ * - Resets the queue to an empty state
2181
+ *
2182
+ * @see https://0.vuetifyjs.com/composables/registration/use-queue#clear
2183
+ *
2184
+ * @example
2185
+ * ```ts
2186
+ * import { useQueue } from '@vuetify/v0'
2187
+ *
2188
+ * const queue = useQueue()
2189
+ *
2190
+ * queue.register({ value: 'First' })
2191
+ * queue.register({ value: 'Second' })
2192
+ *
2193
+ * console.log(queue.size) // 2
2194
+ *
2195
+ * queue.clear()
2196
+ *
2197
+ * console.log(queue.size) // 0
2198
+ * ```
2199
+ */
2200
+ clear: () => void;
2201
+ /**
2202
+ * Dispose of the queue and clean up resources
2203
+ *
2204
+ * @remarks
2205
+ * - Clears all tickets and timeouts
2206
+ * - Removes all event listeners
2207
+ * - Should be called when the queue is no longer needed
2208
+ * - Automatically called on scope disposal
2209
+ *
2210
+ * @see https://0.vuetifyjs.com/composables/registration/use-queue#dispose
2211
+ *
2212
+ * @example
2213
+ * ```ts
2214
+ * import { onScopeDispose } from 'vue'
2215
+ * import { useQueue } from '@vuetify/v0'
2216
+ *
2217
+ * const queue = useQueue()
2218
+ *
2219
+ * queue.register({ value: 'Ticket' })
2220
+ *
2221
+ * onScopeDispose(() => {
2222
+ * queue.dispose()
2223
+ * })
2224
+ * ```
2225
+ */
2226
+ dispose: () => void;
2227
+ }
2228
+ interface QueueOptions extends RegistryOptions {
2229
+ /**
2230
+ * Default timeout in milliseconds for tickets without explicit timeout
2231
+ *
2232
+ * @default 3000
2233
+ * @remarks
2234
+ * - Applied to tickets that don't specify their own timeout
2235
+ * - Can be overridden per ticket during registration
2236
+ */
2237
+ timeout?: number;
2238
+ }
2239
+ /**
2240
+ * Creates a new queue instance
2241
+ *
2242
+ * @param options The options for the queue instance
2243
+ * @template Z The type of queue ticket that extends QueueTicket. Use this to add custom properties to tickets.
2244
+ * @template E The type of queue context that extends QueueContext<Z>. Use this when extending the queue with additional methods.
2245
+ * @returns A new queue instance
2246
+ *
2247
+ * @see https://0.vuetifyjs.com/composables/registration/use-queue
2248
+ *
2249
+ * @example
2250
+ * ```ts
2251
+ * import { useQueue } from '@vuetify/v0'
2252
+ *
2253
+ * const queue = useQueue()
2254
+ *
2255
+ * // Register an ticket with default timeout (3000ms)
2256
+ * const ticket1 = queue.register({ value: 'Ticket 1' })
2257
+ *
2258
+ * // Register an ticket with custom timeout
2259
+ * const ticket2 = queue.register({ value: 'Ticket 2', timeout: 5000 })
2260
+ *
2261
+ * // Register a persistent ticket that must be manually dismissed
2262
+ * const ticket3 = queue.register({ value: 'Ticket 3', timeout: -1 })
2263
+ *
2264
+ * // Dismiss an ticket using the convenience method
2265
+ * ticket3.dismiss()
2266
+ *
2267
+ * console.log(queue.size) // 2
2268
+ * ```
2269
+ */
2270
+ declare function useQueue<Z extends QueueTicket = QueueTicket, E extends QueueContext<Z> = QueueContext<Z>>(_options?: QueueOptions): E;
2271
+ //#endregion
2272
+ //#region src/composables/useResizeObserver/index.d.ts
2273
+ interface ResizeObserverEntry {
2274
+ contentRect: {
2275
+ width: number;
2276
+ height: number;
2277
+ top: number;
2278
+ left: number;
2279
+ };
2280
+ target: Element;
2281
+ }
2282
+ interface ResizeObserverOptions {
2283
+ immediate?: boolean;
2284
+ box?: 'content-box' | 'border-box';
2285
+ }
2286
+ /**
2287
+ * A composable that uses the Resize Observer API to detect when an element's
2288
+ * size changes.
2289
+ *
2290
+ * @param target The element to observe.
2291
+ * @param callback The callback to execute when the element's size changes.
2292
+ * @param options The options for the Resize Observer.
2293
+ * @returns An object with methods to control the observer.
2294
+ *
2295
+ * @see https://developer.mozilla.org/en-US/docs/Web/API/ResizeObserver
2296
+ * @see https://0.vuetifyjs.com/composables/system/use-resize-observer
2297
+ *
2298
+ * @example
2299
+ * ```ts
2300
+ * import { ref } from 'vue'
2301
+ * import { useResizeObserver } from '@vuetify/v0'
2302
+ *
2303
+ * const el = ref<HTMLElement>()
2304
+ * const width = ref(0)
2305
+ * const height = ref(0)
2306
+ *
2307
+ * const { pause, resume, isPaused } = useResizeObserver(
2308
+ * el,
2309
+ * (entries) => {
2310
+ * const entry = entries[0]
2311
+ * if (entry) {
2312
+ * width.value = entry.contentRect.width
2313
+ * height.value = entry.contentRect.height
2314
+ * console.log('Size changed:', width.value, 'x', height.value)
2315
+ * }
2316
+ * },
2317
+ * { immediate: true }
2318
+ * )
2319
+ *
2320
+ * // Pause observation
2321
+ * pause()
2322
+ *
2323
+ * // Resume observation
2324
+ * resume()
2325
+ * ```
2326
+ */
2327
+ declare function useResizeObserver(target: Ref<Element | undefined>, callback: (entries: ResizeObserverEntry[]) => void, options?: ResizeObserverOptions): {
2328
+ isPaused: Readonly<Ref<boolean, boolean>>;
2329
+ pause: () => void;
2330
+ resume: () => void;
2331
+ stop: () => void;
2332
+ };
2333
+ /**
2334
+ * A convenience composable that uses the Resize Observer API to track an
2335
+ * element's size.
2336
+ *
2337
+ * @param target The element to observe.
2338
+ * @returns An object with the element's width and height.
2339
+ *
2340
+ * @see https://0.vuetifyjs.com/composables/system/use-resize-observer#use-element-size
2341
+ *
2342
+ * @example
2343
+ * ```ts
2344
+ * import { ref, watchEffect } from 'vue'
2345
+ * import { useElementSize } from '@vuetify/v0'
2346
+ *
2347
+ * const box = ref<HTMLElement>()
2348
+ * const { width, height } = useElementSize(box)
2349
+ *
2350
+ * // Width and height are reactive refs
2351
+ * watchEffect(() => {
2352
+ * console.log('Box size:', width.value, 'x', height.value)
2353
+ * })
2354
+ * ```
2355
+ */
2356
+ declare function useElementSize(target: Ref<Element | undefined>): {
2357
+ width: vue169.ShallowRef<number, number>;
2358
+ height: vue169.ShallowRef<number, number>;
2359
+ isPaused: Readonly<Ref<boolean, boolean>>;
2360
+ pause: () => void;
2361
+ resume: () => void;
2362
+ stop: () => void;
2363
+ };
2364
+ //#endregion
2365
+ //#region src/composables/useStep/index.d.ts
2366
+ interface StepTicket extends SingleTicket {}
2367
+ interface StepContext<Z extends StepTicket> extends SingleContext<Z> {
2368
+ /** Select the first Ticket in the collection */
2369
+ first: () => void;
2370
+ /** Select the last Ticket in the collection */
2371
+ last: () => void;
2372
+ /** Select the next Ticket based on current index */
2373
+ next: () => void;
2374
+ /** Select the previous Ticket based on current index */
2375
+ prev: () => void;
2376
+ /** Step through the collection by a given count */
2377
+ step: (count: number) => void;
2378
+ }
2379
+ interface StepOptions extends SingleOptions {}
2380
+ /**
2381
+ * Creates a new step instance.
2382
+ *
2383
+ * @param options The options for the step instance.
2384
+ * @template Z The type of the step ticket.
2385
+ * @template E The type of the step context.
2386
+ * @returns A new step instance.
2387
+ *
2388
+ * @see https://0.vuetifyjs.com/composables/selection/use-step
2389
+ *
2390
+ * @example
2391
+ * ```ts
2392
+ * import { useStep } from '@vuetify/v0'
2393
+ *
2394
+ * const stepper = useStep()
2395
+ *
2396
+ * stepper.onboard([
2397
+ * { id: 'step-1', value: 'Account Info' },
2398
+ * { id: 'step-2', value: 'Payment' },
2399
+ * { id: 'step-3', value: 'Confirmation' },
2400
+ * ])
2401
+ *
2402
+ * stepper.first()
2403
+ * stepper.next() // Move to step-2
2404
+ *
2405
+ * console.log(stepper.selectedIndex.value) // 1
2406
+ * ```
2407
+ */
2408
+ declare function useStep<Z extends StepTicket = StepTicket, E extends StepContext<Z> = StepContext<Z>>(options?: StepOptions): E;
2409
+ /**
2410
+ * Creates a new step context.
2411
+ *
2412
+ * @param namespace The namespace for the step context.
2413
+ * @param options The options for the step context.
2414
+ * @template Z The type of the step ticket.
2415
+ * @template E The type of the step context.
2416
+ * @returns A new step context.
2417
+ *
2418
+ * @see https://0.vuetifyjs.com/composables/selection/use-step
2419
+ *
2420
+ * @example
2421
+ * ```ts
2422
+ * import { createStepContext } from '@vuetify/v0'
2423
+ *
2424
+ * export const [useWizard, provideWizard, wizard] = createStepContext('wizard')
2425
+ *
2426
+ * // In a parent component:
2427
+ * provideWizard()
2428
+ *
2429
+ * // In a child component:
2430
+ * const wizard = useWizard()
2431
+ * wizard.next() // Progress to next step
2432
+ * ```
2433
+ */
2434
+ declare function createStepContext<Z extends StepTicket = StepTicket, E extends StepContext<Z> = StepContext<Z>>(namespace: string, options?: StepOptions): ContextTrinity<E>;
2435
+ //#endregion
2436
+ //#region src/composables/useStorage/adapters/adapter.d.ts
2437
+ interface StorageAdapter$1 {
2438
+ getItem: (key: string) => string | null;
2439
+ setItem: (key: string, value: string) => void;
2440
+ removeItem: (key: string) => void;
2441
+ readonly length?: number;
2442
+ key?: (index: number) => string | null;
2443
+ }
2444
+ //#endregion
2445
+ //#region src/composables/useStorage/adapters/memory.d.ts
2446
+ /**
2447
+ * In-memory storage adapter that implements the StorageAdapter interface.
2448
+ * This adapter provides temporary storage that persists only for the current
2449
+ * session and is useful for testing or when persistent storage is not available.
2450
+ */
2451
+ declare class MemoryAdapter implements StorageAdapter$1 {
2452
+ private store;
2453
+ get length(): number;
2454
+ getItem(key: string): string | null;
2455
+ setItem(key: string, value: string): void;
2456
+ removeItem(key: string): void;
2457
+ key(index: number): string;
2458
+ }
2459
+ //#endregion
2460
+ //#region src/composables/useStorage/adapters/index.d.ts
2461
+ type StorageType = 'localStorage' | 'sessionStorage' | 'memory';
2462
+ interface StorageAdapter {
2463
+ getItem: (key: string) => string | null;
2464
+ setItem: (key: string, value: string) => void;
2465
+ removeItem: (key: string) => void;
2466
+ readonly length?: number;
2467
+ key?: (index: number) => string | null;
2468
+ }
2469
+ //#endregion
2470
+ //#region src/composables/useStorage/index.d.ts
2471
+ interface StorageContext {
2472
+ /** Check if a key exists in storage */
2473
+ has: (key: string) => boolean;
2474
+ /** Get a reactive ref for a storage key */
2475
+ get: <T>(key: string, defaultValue?: T) => Ref<T>;
2476
+ /** Set a value for a storage key */
2477
+ set: <T>(key: string, value: T) => void;
2478
+ /** Remove a key from storage */
2479
+ remove: (key: string) => void;
2480
+ /** Clear all keys from storage */
2481
+ clear: () => void;
2482
+ }
2483
+ interface StorageOptions {
2484
+ /** The storage adapter to use. Defaults to localStorage in browser, MemoryAdapter otherwise */
2485
+ adapter?: StorageAdapter;
2486
+ /** The prefix to use for all storage keys. Defaults to 'v0:' */
2487
+ prefix?: string;
2488
+ /** Custom serializer for reading and writing values. Defaults to JSON.parse/stringify */
2489
+ serializer?: {
2490
+ read: (value: string) => any;
2491
+ write: (value: any) => string;
2492
+ };
2493
+ }
2494
+ declare const useStorageContext: (key?: ContextKey<StorageContext>) => StorageContext, provideStorageContext: (context: StorageContext, app?: App) => StorageContext;
2495
+ /**
2496
+ * Creates a new storage instance.
2497
+ *
2498
+ * @param options The options for the storage instance.
2499
+ * @template E The type of the storage context.
2500
+ * @returns A new storage instance.
2501
+ *
2502
+ * @see https://0.vuetifyjs.com/composables/plugins/use-storage
2503
+ *
2504
+ * @example
2505
+ * ```ts
2506
+ * import { createStorage } from '@vuetify/v0'
2507
+ *
2508
+ * const storage = createStorage()
2509
+ *
2510
+ * storage.set('username', 'MyUsername')
2511
+ *
2512
+ * const username = storage.get('username')
2513
+ *
2514
+ * console.log(username.value) // MyUsername
2515
+ *
2516
+ * storage.clear()
2517
+ * ```
2518
+ */
2519
+ declare function createStorage<E extends StorageContext>(options?: StorageOptions): E;
2520
+ /**
2521
+ * Returns the current storage instance.
2522
+ *
2523
+ * @returns The current storage instance.
2524
+ *
2525
+ * @see https://0.vuetifyjs.com/composables/plugins/use-storage
2526
+ *
2527
+ * @example
2528
+ * ```vue
2529
+ * <script setup lang="ts">
2530
+ * import { useStorage } from '@vuetify/v0'
2531
+ *
2532
+ * const storage = useStorage()
2533
+ * const username = storage.get('username', 'Guest')
2534
+ * </script>
2535
+ *
2536
+ * <template>
2537
+ * <div>
2538
+ * <p>Username: {{ username }}</p>
2539
+ * </div>
2540
+ * </template>
2541
+ * ```
2542
+ */
2543
+ declare function useStorage(): StorageContext;
2544
+ /**
2545
+ * Creates a new storage plugin.
2546
+ *
2547
+ * @param options The options for the storage plugin.
2548
+ * @returns A new storage plugin.
2549
+ *
2550
+ * @see https://0.vuetifyjs.com/composables/plugins/use-storage
2551
+ *
2552
+ * @example
2553
+ * ```ts
2554
+ * import { createApp } from 'vue'
2555
+ * import { createStoragePlugin } from '@vuetify/v0'
2556
+ * import App from './App.vue'
2557
+ *
2558
+ * const app = createApp(App)
2559
+ *
2560
+ * app.use(createStoragePlugin())
2561
+ *
2562
+ * app.mount('#app')
2563
+ * ```
2564
+ */
2565
+ declare function createStoragePlugin(options?: StorageOptions): Plugin;
2566
+ //#endregion
2567
+ //#region src/composables/useTheme/adapters/adapter.d.ts
2568
+ interface ThemeAdapterInterface {
2569
+ update: (colors: Record<string, Colors>) => void;
2570
+ }
2571
+ declare abstract class ThemeAdapter implements ThemeAdapterInterface {
2572
+ stylesheetId: string;
2573
+ prefix: string;
2574
+ constructor(prefix: string);
2575
+ generate(colors: Record<string, Colors>): string;
2576
+ abstract update(colors: Record<string, Colors>): void;
2577
+ }
2578
+ //#endregion
2579
+ //#region src/composables/useTheme/adapters/v0.d.ts
2580
+ interface Vuetify0ThemeOptions {
2581
+ cspNonce?: string;
2582
+ stylesheetId?: string;
2583
+ prefix?: string;
2584
+ }
2585
+ /**
2586
+ * Theme adapter implementation for Vuetify v0 design system.
2587
+ * This adapter generates CSS custom properties and injects them into the DOM
2588
+ * as a stylesheet, allowing themes to be applied globally.
2589
+ */
2590
+ declare class Vuetify0ThemeAdapter extends ThemeAdapter {
2591
+ cspNonce?: string;
2592
+ constructor(options?: Vuetify0ThemeOptions);
2593
+ update(colors: Record<ID, Colors>): void;
2594
+ upsert(styles: string): void;
2595
+ }
2596
+ //#endregion
2597
+ //#region src/composables/useTheme/index.d.ts
2598
+ type Colors = {
2599
+ [key: string]: string;
2600
+ };
2601
+ type ThemeColors = {
2602
+ [key: string]: Colors | string;
2603
+ };
2604
+ type ThemeRecord = {
2605
+ [key: string]: any;
2606
+ dark?: boolean;
2607
+ lazy?: boolean;
2608
+ colors: ThemeColors;
2609
+ };
2610
+ type ThemeTicket = SingleTicket & {
2611
+ lazy: boolean;
2612
+ dark: boolean;
2613
+ };
2614
+ interface ThemeContext<Z extends ThemeTicket> extends SingleContext<Z> {
2615
+ colors: ComputedRef<Record<string, Colors>>;
2616
+ cycle: (themes: ID[]) => void;
2617
+ }
2618
+ interface ThemeOptions extends ThemePluginOptions {}
2619
+ interface ThemePluginOptions<Z extends ThemeRecord = ThemeRecord> {
2620
+ adapter?: ThemeAdapter;
2621
+ default?: ID;
2622
+ palette?: TokenCollection;
2623
+ themes?: Record<ID, Z>;
2624
+ target?: string | HTMLElement | null;
2625
+ }
2626
+ /**
2627
+ * Creates a new theme instance.
2628
+ *
2629
+ * @param namespace The namespace for the theme instance.
2630
+ * @param options The options for the theme instance.
2631
+ * @template Z The type of the theme ticket.
2632
+ * @template E The type of the theme context.
2633
+ * @returns A new theme instance.
2634
+ *
2635
+ * @see https://0.vuetifyjs.com/composables/plugins/use-theme
2636
+ *
2637
+ * @example
2638
+ * ```ts
2639
+ * import { createTheme } from '@vuetify/v0'
2640
+ *
2641
+ * export const [useTheme, provideTheme] = createTheme('v0:theme', {
2642
+ * default: 'light',
2643
+ * themes: {
2644
+ * light: {
2645
+ * dark: false,
2646
+ * colors: {
2647
+ * primary: '#3b82f6',
2648
+ * },
2649
+ * },
2650
+ * dark: {
2651
+ * dark: true,
2652
+ * colors: {
2653
+ * primary: '#675496',
2654
+ * },
2655
+ * },
2656
+ * },
2657
+ * })
2658
+ * ```
2659
+ */
2660
+ declare function createTheme<Z extends ThemeTicket = ThemeTicket, E extends ThemeContext<Z> = ThemeContext<Z>>(namespace?: string, options?: ThemeOptions): ContextTrinity<E>;
2661
+ /**
2662
+ * Returns the current theme instance.
2663
+ *
2664
+ * @returns The current theme instance.
2665
+ *
2666
+ * @see https://0.vuetifyjs.com/composables/plugins/use-theme
2667
+ *
2668
+ * @example
2669
+ * ```vue
2670
+ * <script setup lang="ts">
2671
+ * import { useTheme } from '@vuetify/v0'
2672
+ *
2673
+ * const theme = useTheme()
2674
+ * </script>
2675
+ *
2676
+ * <template>
2677
+ * <div>
2678
+ * <p>Current theme: {{ theme.selected.value }}</p>
2679
+ * </div>
2680
+ * </template>
2681
+ * ```
2682
+ */
2683
+ declare function useTheme(): ThemeContext<ThemeTicket>;
2684
+ /**
2685
+ * Creates a new theme plugin.
2686
+ *
2687
+ * @param _options The options for the theme plugin.
2688
+ * @template Z The type of the theme ticket.
2689
+ * @template E The type of the theme context.
2690
+ * @returns A new theme plugin.
2691
+ *
2692
+ * @see https://0.vuetifyjs.com/composables/plugins/use-theme
2693
+ *
2694
+ * @example
2695
+ * ```ts
2696
+ * import { createApp } from 'vue'
2697
+ * import { createThemePlugin } from '@vuetify/v0'
2698
+ * import App from './App.vue'
2699
+ *
2700
+ * const app = createApp(App)
2701
+ *
2702
+ * app.use(
2703
+ * createThemePlugin({
2704
+ * default: 'light',
2705
+ * themes: {
2706
+ * light: {
2707
+ * dark: false,
2708
+ * colors: {
2709
+ * primary: '#3b82f6',
2710
+ * },
2711
+ * },
2712
+ * dark: {
2713
+ * dark: true,
2714
+ * colors: {
2715
+ * primary: '#675496',
2716
+ * },
2717
+ * },
2718
+ * },
2719
+ * })
2720
+ * )
2721
+ *
2722
+ * app.mount('#app')
2723
+ * ```
2724
+ */
2725
+ declare function createThemePlugin<Z extends ThemeTicket = ThemeTicket, E extends ThemeContext<Z> = ThemeContext<Z>>(_options?: ThemePluginOptions): Plugin;
2726
+ //#endregion
2727
+ //#region src/composables/useTimeline/index.d.ts
2728
+ interface TimelineContext<Z extends TimelineTicket> extends RegistryContext<Z> {
2729
+ undo: () => Z | undefined;
2730
+ redo: () => Z | undefined;
2731
+ }
2732
+ interface TimelineTicket extends RegistryTicket {}
2733
+ interface TimelineOptions extends RegistryOptions {
2734
+ size?: number;
2735
+ }
2736
+ /**
2737
+ * Creates a new timeline instance.
2738
+ *
2739
+ * @param _options The options for the timeline instance.
2740
+ * @template Z The type of the timeline ticket.
2741
+ * @template E The type of the timeline context.
2742
+ * @returns A new timeline instance.
2743
+ *
2744
+ * @see https://0.vuetifyjs.com/composables/registration/use-timeline
2745
+ *
2746
+ * @example
2747
+ * ```ts
2748
+ * import { useTimeline } from '@vuetify/v0'
2749
+ *
2750
+ * const timeline = useTimeline({ size: 3 })
2751
+ *
2752
+ * timeline.onboard([{ id: 'one' }, { id: 'two' }, { id: 'three' }])
2753
+ *
2754
+ * console.log(timeline.values()) // [{ id: 'one' }, { id: 'two' }, { id: 'three' }]
2755
+ *
2756
+ * timeline.undo()
2757
+ * console.log(timeline.values()) // [{ id: 'one' }, { id: 'two' }]
2758
+ *
2759
+ * timeline.redo()
2760
+ * console.log(timeline.values()) // [{ id: 'one' }, { id: 'two' }, { id: 'three' }]
2761
+ * ```
2762
+ */
2763
+ declare function useTimeline<Z extends TimelineTicket = TimelineTicket, E extends TimelineContext<Z> = TimelineContext<Z>>(_options?: TimelineOptions): E;
2764
+ //#endregion
2765
+ export { PermissionAdapterInterface as $, createContext as $n, UseFilterResult as $t, createStepContext as A, RegistryTicket as An, IntersectionObserverEntry as At, ProxyRegistryContext as B, BreakpointsOptions as Bn, FormContext as Bt, useStorageContext as C, SelectionContext as Cn, SingleContext as Ct, StepContext as D, useSelection as Dn, useSingle as Dt, MemoryAdapter as E, createSelectionContext as En, createSingleContext as Et, useResizeObserver as F, useDocumentEventListener as Fn, createHydration as Ft, PermissionContext as G, toReactive as Gn, FormValue as Gt, useProxyRegistry as H, createBreakpoints as Hn, FormTicket as Ht, QueueContext as I, useEventListener as In, createHydrationPlugin as It, PermissionTicket as J, createTrinity as Jn, FilterItem as Jt, PermissionOptions as K, toArray as Kn, useForm as Kt, QueueOptions as L, useWindowEventListener as Ln, provideHydrationContext as Lt, ResizeObserverEntry as M, useRegistry as Mn, useElementIntersection as Mt, ResizeObserverOptions as N, CleanupFunction as Nn, useIntersectionObserver as Nt, StepOptions as O, RegistryContext as On, KeyHandler as Ot, useElementSize as P, EventHandler as Pn, HydrationContext as Pt, PermissionAdapter as Q, ContextKey as Qn, UseFilterOptions as Qt, QueueTicket as R, BreakpointName as Rn, useHydration as Rt, useStorage as S, useGroup as Sn, LocaleAdapter as St, StorageType as T, SelectionTicket as Tn, SingleTicket as Tt, ProxyModelOptions as U, createBreakpointsPlugin as Un, FormValidationResult as Ut, ProxyRegistryOptions as V, BreakpointsPluginOptions as Vn, FormOptions as Vt, useProxyModel as W, useBreakpoints as Wn, FormValidationRule as Wt, createPermissionsPlugin as X, PluginOptions as Xn, FilterQuery as Xt, createPermissions as Y, Plugin as Yn, FilterMode as Yt, usePermissions as Z, createPlugin as Zn, Primitive as Zt, StorageContext as _, useTokens as _n, LocaleTicket as _t, Colors as a, createFeatures as an, createLogger as at, createStoragePlugin as b, GroupTicket as bn, useLocale as bt, ThemeOptions as c, FlatTokenCollection as cn, LogLevel as ct, ThemeTicket as d, TokenContext as dn, ConsolaLoggerAdapter as dt, useFilter as en, provideContext as er, MutationObserverRecord as et, createTheme as f, TokenOptions as fn, LoggerAdapter as ft, ThemeAdapter as g, createTokensContext as gn, LocaleRecord as gt, Vuetify0ThemeAdapter as h, TokenValue as hn, LocalePluginOptions as ht, useTimeline as i, FeatureTicket as in, LoggerOptions as it, useStep as j, createRegistryContext as jn, IntersectionObserverOptions as jt, StepTicket as k, RegistryOptions as kn, useKeydown as kt, ThemePluginOptions as l, TokenAlias as ln, Vuetify0LoggerAdapter as lt, useTheme as m, TokenTicket as mn, LocaleOptions as mt, TimelineOptions as n, FeatureOptions as nn, useMutationObserver as nt, ThemeColors as o, createFeaturesPlugin as on, createLoggerPlugin as ot, createThemePlugin as p, TokenPrimitive as pn, LocaleContext as pt, PermissionPluginOptions as q, ContextTrinity as qn, FilterFunction as qt, TimelineTicket as r, FeaturePluginOptions as rn, LoggerContext as rt, ThemeContext as s, useFeatures as sn, useLogger as st, TimelineContext as t, FeatureContext as tn, useContext as tr, UseMutationObserverOptions as tt, ThemeRecord as u, TokenCollection as un, PinoLoggerAdapter as ut, StorageOptions as v, GroupContext as vn, createLocale as vt, StorageAdapter as w, SelectionOptions as wn, SingleOptions as wt, provideStorageContext as x, createGroupContext as xn, Vuetify0LocaleAdapter as xt, createStorage as y, GroupOptions as yn, createLocalePlugin as yt, useQueue as z, BreakpointsContext as zn, useHydrationContext as zt };