@vuetify/v0 0.0.14 → 0.0.16

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.
@@ -0,0 +1,3159 @@
1
+ import { _ as range, d as isObject, h as isUndefined, i as isArray, l as isNullOrUndefined, m as isSymbol, o as isFunction, p as isString, r as genId, s as isNaN } from "./utilities-DQWf_4V_.mjs";
2
+ import { a as SUPPORTS_OBSERVER, s as __LOGGER_ENABLED__, t as IN_BROWSER } from "./globals-Rnihe4SF.mjs";
3
+ import { computed, getCurrentInstance, inject, isRef, onScopeDispose, provide, reactive, shallowReactive, shallowReadonly, shallowRef, toRef, toValue, watch } from "vue";
4
+
5
+ //#region src/composables/createContext/index.ts
6
+ /**
7
+ * @module createContext
8
+ *
9
+ * @see https://0.vuetifyjs.com/composables/foundation/create-context
10
+ *
11
+ * @remarks
12
+ * Factory for creating type-safe Vue dependency injection contexts.
13
+ *
14
+ * Provides a wrapper around Vue's provide/inject that throws errors when context is not found,
15
+ * eliminating silent failures and improving developer experience. Supports both app-level and
16
+ * component-level provision.
17
+ *
18
+ * Supports two modes:
19
+ * - **Static key**: `createContext('my-key')` - key is fixed at creation time
20
+ * - **Dynamic key**: `createContext()` or `createContext({ suffix: 'item' })` - key provided at runtime
21
+ */
22
+ /**
23
+ * Injects a context provided by an ancestor component.
24
+ *
25
+ * @param key The key of the context to inject.
26
+ * @param defaultValue Optional default value if context is not found.
27
+ * @template Z The type of the context.
28
+ * @returns The injected context.
29
+ * @throws An error if the context is not found and no default is provided.
30
+ *
31
+ * @see https://vuejs.org/api/composition-api-dependency-injection.html#inject
32
+ * @see https://0.vuetifyjs.com/composables/foundation/create-context#use-context
33
+ *
34
+ * @example
35
+ * ```ts
36
+ * // Without default value
37
+ * const context = useContext<MyContext>('my-context')
38
+ *
39
+ * // With default value
40
+ * const context = useContext<MyContext>('my-context', defaultContext)
41
+ * ```
42
+ */
43
+ function useContext(key, defaultValue) {
44
+ const context = inject(key, defaultValue);
45
+ if (/* @__PURE__ */ isUndefined(context)) throw new Error(`Context "${String(key)}" not found. Ensure it's provided by an ancestor.`);
46
+ return context;
47
+ }
48
+ /**
49
+ * Provides a context to all descendant components.
50
+ *
51
+ * @param key The key of the context to provide.
52
+ * @param context The context to provide.
53
+ * @param app Optional Vue app instance to provide the context at app level instead of component level.
54
+ * @template Z The type of the context.
55
+ * @returns The provided context.
56
+ *
57
+ * @remarks
58
+ * When `app` parameter is provided, the context is made available to all components in the app.
59
+ * When omitted, the context is provided at the current component level and available to descendants only.
60
+ *
61
+ * @see https://vuejs.org/api/composition-api-dependency-injection.html#provide
62
+ * @see https://0.vuetifyjs.com/composables/foundation/create-context#provide-context
63
+ *
64
+ * @example
65
+ * ```ts
66
+ * // Component-level provision
67
+ * provideContext<MyContext>('my-context', context)
68
+ *
69
+ * // App-level provision (typically used in plugins)
70
+ * const app = createApp()
71
+ * provideContext<MyContext>('my-context', context, app)
72
+ * ```
73
+ */
74
+ function provideContext(key, context, app) {
75
+ if (app) app.provide(key, context);
76
+ else provide(key, context);
77
+ return context;
78
+ }
79
+ function createContext(keyOrOptions, defaultValue) {
80
+ if (/* @__PURE__ */ isString(keyOrOptions) || /* @__PURE__ */ isSymbol(keyOrOptions)) {
81
+ const _key = keyOrOptions;
82
+ function _provideContext$1(context, app) {
83
+ return provideContext(_key, context, app);
84
+ }
85
+ function _useContext$1() {
86
+ return useContext(_key, defaultValue);
87
+ }
88
+ return [_useContext$1, _provideContext$1];
89
+ }
90
+ const suffix = /* @__PURE__ */ isObject(keyOrOptions) ? keyOrOptions.suffix : void 0;
91
+ function _provideContext(key, context, app) {
92
+ return provideContext(suffix ? `${key}:${suffix}` : key, context, app);
93
+ }
94
+ function _useContext(key, defaultValue$1) {
95
+ return useContext(suffix ? `${key}:${suffix}` : key, defaultValue$1);
96
+ }
97
+ return [_useContext, _provideContext];
98
+ }
99
+
100
+ //#endregion
101
+ //#region src/composables/createTrinity/index.ts
102
+ /**
103
+ * Creates a new trinity for a context composable and its provider.
104
+ *
105
+ * @param useContext The function that retrieves/uses the context (typically named `useContext`).
106
+ * @param provideContext The function that provides the context to descendants.
107
+ * @param context The default context instance to use when no custom context is provided.
108
+ * @template Z The type of the context.
109
+ * @returns A readonly tuple containing: [useContext function, provideContext wrapper function, default context instance].
110
+ *
111
+ * @remarks The trinity pattern is a foundational pattern used throughout the codebase for creating reusable context systems. It provides three related elements:
112
+ *
113
+ * 1. A function to retrieve/use the context
114
+ * 2. A function to provide the context (with default value support)
115
+ * 3. The default context instance
116
+ *
117
+ * The returned tuple is readonly (using `as const`) to ensure proper type inference.
118
+ *
119
+ * @see https://0.vuetifyjs.com/composables/foundation/create-trinity#create-trinity
120
+ *
121
+ * @example
122
+ * ```ts
123
+ * interface MyContext {
124
+ * foo: string
125
+ * bar: number
126
+ * }
127
+ *
128
+ * export function createMyFeature<E extends MyContext = MyContext>() {
129
+ * const [useContext, _provideContext] = createContext<E>('my-context')
130
+ *
131
+ * const context = { foo: 'hello', bar: 42 }
132
+ *
133
+ * function provideContext (_context: E = context, app?: App): E {
134
+ * return _provideContext(_context, app)
135
+ * }
136
+ *
137
+ * return createTrinity<E>(useContext, provideContext, context)
138
+ * }
139
+ * ```
140
+ */
141
+ function createTrinity(useContext$1, provideContext$1, context) {
142
+ return [
143
+ useContext$1,
144
+ (_context = context, app) => provideContext$1(_context, app),
145
+ context
146
+ ];
147
+ }
148
+
149
+ //#endregion
150
+ //#region src/composables/createPlugin/index.ts
151
+ /**
152
+ * Creates a new Vue plugin.
153
+ *
154
+ * @param options The plugin options.
155
+ * @returns A new Vue plugin.
156
+ *
157
+ * @see https://0.vuetifyjs.com/composables/foundation/create-plugin#create-plugin
158
+ *
159
+ * @example
160
+ * ```ts
161
+ * export const [useContext, provideContext] = createContext<MyContext>('my-plugin')
162
+ *
163
+ * const context = {}
164
+ *
165
+ * export const MyPlugin = createPlugin({
166
+ * namespace: 'my-plugin',
167
+ * provide: (app) => {
168
+ * provideContext(context, app)
169
+ * },
170
+ * setup: (app) => {
171
+ * // Optional setup logic
172
+ * },
173
+ * })
174
+ */
175
+ function createPlugin(options) {
176
+ return { install(app) {
177
+ app.runWithContext(() => {
178
+ options.provide(app);
179
+ options.setup?.(app);
180
+ });
181
+ } };
182
+ }
183
+
184
+ //#endregion
185
+ //#region src/composables/useLogger/adapters/consola.ts
186
+ var ConsolaLoggerAdapter = class {
187
+ consola;
188
+ constructor(consolaInstance) {
189
+ if (!consolaInstance) throw new Error("Consola instance is required for ConsolaLoggerAdapter");
190
+ this.consola = consolaInstance;
191
+ }
192
+ debug(message, ...args) {
193
+ this.consola.debug(message, ...args);
194
+ }
195
+ info(message, ...args) {
196
+ this.consola.info(message, ...args);
197
+ }
198
+ warn(message, ...args) {
199
+ this.consola.warn(message, ...args);
200
+ }
201
+ error(message, ...args) {
202
+ this.consola.error(message, ...args);
203
+ }
204
+ trace(message, ...args) {
205
+ if (this.consola.trace) this.consola.trace(message, ...args);
206
+ else this.consola.debug(message, ...args);
207
+ }
208
+ fatal(message, ...args) {
209
+ if (this.consola.fatal) this.consola.fatal(message, ...args);
210
+ else this.consola.error("[FATAL]", message, ...args);
211
+ }
212
+ };
213
+
214
+ //#endregion
215
+ //#region src/composables/useLogger/adapters/pino.ts
216
+ /**
217
+ * Pino logger adapter implementation
218
+ *
219
+ * This adapter integrates with the Pino logging library,
220
+ * providing high-performance structured logging optimized
221
+ * for Node.js applications with minimal overhead.
222
+ */
223
+ var PinoLoggerAdapter = class {
224
+ pino;
225
+ constructor(pinoInstance) {
226
+ if (!pinoInstance) throw new Error("Pino instance is required for PinoLoggerAdapter");
227
+ this.pino = pinoInstance;
228
+ }
229
+ debug(message, ...args) {
230
+ this.pino.debug(this.format(message, ...args));
231
+ }
232
+ info(message, ...args) {
233
+ this.pino.info(this.format(message, ...args));
234
+ }
235
+ warn(message, ...args) {
236
+ this.pino.warn(this.format(message, ...args));
237
+ }
238
+ error(message, ...args) {
239
+ this.pino.error(this.format(message, ...args));
240
+ }
241
+ trace(message, ...args) {
242
+ this.pino.trace(this.format(message, ...args));
243
+ }
244
+ fatal(message, ...args) {
245
+ this.pino.fatal(this.format(message, ...args));
246
+ }
247
+ format(message, ...args) {
248
+ if (args.length === 0) return { msg: message };
249
+ if (args.length === 1 && /* @__PURE__ */ isObject(args[0])) return {
250
+ ...args[0],
251
+ msg: message
252
+ };
253
+ return {
254
+ msg: message,
255
+ args
256
+ };
257
+ }
258
+ };
259
+
260
+ //#endregion
261
+ //#region src/composables/useLogger/adapters/v0.ts
262
+ /**
263
+ * Vuetify0.x logger adapter implementation
264
+ *
265
+ * This adapter provides console-based logging with proper formatting,
266
+ * color coding, timestamps, and log level filtering for development
267
+ * and production environments.
268
+ */
269
+ var Vuetify0LoggerAdapter = class {
270
+ prefix;
271
+ colors;
272
+ timestamps;
273
+ constructor(options = {}) {
274
+ this.prefix = options.prefix || "v0";
275
+ this.colors = options.colors !== false;
276
+ this.timestamps = options.timestamps !== false;
277
+ }
278
+ debug(message, ...args) {
279
+ this.log("debug", "debug", message, ...args);
280
+ }
281
+ info(message, ...args) {
282
+ this.log("info", "info", message, ...args);
283
+ }
284
+ warn(message, ...args) {
285
+ this.log("warn", "warn", message, ...args);
286
+ }
287
+ error(message, ...args) {
288
+ this.log("error", "error", message, ...args);
289
+ }
290
+ trace(message, ...args) {
291
+ this.log("trace", "trace", message, ...args);
292
+ }
293
+ fatal(message, ...args) {
294
+ this.log("fatal", "error", message, ...args);
295
+ }
296
+ format(level, message, ...args) {
297
+ return [[
298
+ this.timestamps ? this.timestamp() : "",
299
+ `[${this.prefix} ${level.toLowerCase()}]`,
300
+ message
301
+ ].filter(Boolean).join(" "), ...args];
302
+ }
303
+ timestamp() {
304
+ if (!IN_BROWSER) return (/* @__PURE__ */ new Date()).toISOString();
305
+ return (/* @__PURE__ */ new Date()).toTimeString().split(" ")[0] ?? "";
306
+ }
307
+ style(level) {
308
+ if (!this.colors || !IN_BROWSER) return "";
309
+ return {
310
+ trace: "color: #64748b",
311
+ debug: "color: #3b82f6",
312
+ info: "color: #10b981",
313
+ warn: "color: #f59e0b",
314
+ error: "color: #ef4444",
315
+ fatal: "color: #dc2626; font-weight: bold",
316
+ silent: ""
317
+ }[level] || "";
318
+ }
319
+ log(level, method, message, ...args) {
320
+ const [formattedMessage, ...restArgs] = this.format(level, message, ...args);
321
+ const style = this.style(level);
322
+ if (IN_BROWSER && style && /* @__PURE__ */ isFunction(console[method])) console[method](`%c${formattedMessage}`, style, ...restArgs);
323
+ else if (/* @__PURE__ */ isFunction(console[method])) console[method](formattedMessage, ...restArgs);
324
+ }
325
+ };
326
+
327
+ //#endregion
328
+ //#region src/composables/useLogger/index.ts
329
+ /**
330
+ * @module useLogger
331
+ *
332
+ * @see https://0.vuetifyjs.com/composables/plugins/use-logger
333
+ *
334
+ * @remarks
335
+ * Logging composable with adapter pattern supporting console, consola, and pino.
336
+ *
337
+ * Key features:
338
+ * - Multiple log levels (trace, debug, info, warn, error, fatal)
339
+ * - Adapter pattern for console/consola/pino integration
340
+ * - Enable/disable logging
341
+ * - Fallback logger for undefined loggers
342
+ * - Context logging support
343
+ *
344
+ * Uses adapter pattern to abstract logging implementation.
345
+ */
346
+ /**
347
+ * Creates a new logger instance.
348
+ *
349
+ * @param options The options for the logger instance.
350
+ * @returns A new logger instance.
351
+ *
352
+ * @see https://0.vuetifyjs.com/composables/plugins/use-logger
353
+ *
354
+ * @example
355
+ * ```ts
356
+ * import { createLogger } from '@vuetify/v0'
357
+ *
358
+ * const logger = createLogger({
359
+ * level: 'debug',
360
+ * prefix: '[MyApp]',
361
+ * })
362
+ *
363
+ * logger.info('This is an info message')
364
+ * logger.debug('This is a debug message')
365
+ * logger.error('This is an error message')
366
+ * logger.level('debug')
367
+ * logger.debug('This debug message will now be logged')
368
+ * ```
369
+ */
370
+ function createLogger(options = {}) {
371
+ const { adapter = new Vuetify0LoggerAdapter({ prefix: options.prefix }), level: initialLevel = "info", enabled: initialEnabled = __LOGGER_ENABLED__ } = options;
372
+ const currentLevel = shallowRef(initialLevel);
373
+ const isEnabled = shallowRef(initialEnabled);
374
+ function value(level$1) {
375
+ return {
376
+ trace: 0,
377
+ debug: 1,
378
+ info: 2,
379
+ warn: 3,
380
+ error: 4,
381
+ fatal: 5,
382
+ silent: 6
383
+ }[level$1] ?? 2;
384
+ }
385
+ function can(level$1) {
386
+ if (!isEnabled.value) return false;
387
+ return value(level$1) >= value(currentLevel.value);
388
+ }
389
+ function format(message) {
390
+ return message;
391
+ }
392
+ function debug(message, ...args) {
393
+ if (can("debug")) adapter.debug(format(message), ...args);
394
+ }
395
+ function info(message, ...args) {
396
+ if (can("info")) adapter.info(format(message), ...args);
397
+ }
398
+ function warn(message, ...args) {
399
+ if (can("warn")) adapter.warn(format(message), ...args);
400
+ }
401
+ function error(message, ...args) {
402
+ if (can("error")) adapter.error(format(message), ...args);
403
+ }
404
+ function trace(message, ...args) {
405
+ if (can("trace")) adapter.trace?.(format(message), ...args);
406
+ }
407
+ function fatal(message, ...args) {
408
+ if (can("fatal")) adapter.fatal?.(format(message), ...args);
409
+ }
410
+ function level(newLevel) {
411
+ currentLevel.value = newLevel;
412
+ }
413
+ function current() {
414
+ return currentLevel.value;
415
+ }
416
+ function enabled() {
417
+ return isEnabled.value;
418
+ }
419
+ function enable() {
420
+ isEnabled.value = true;
421
+ }
422
+ function disable() {
423
+ isEnabled.value = false;
424
+ }
425
+ return {
426
+ debug,
427
+ info,
428
+ warn,
429
+ error,
430
+ trace,
431
+ fatal,
432
+ level,
433
+ current,
434
+ enabled,
435
+ enable,
436
+ disable
437
+ };
438
+ }
439
+ function createFallbackLogger(namespace = "v0:logger") {
440
+ function format(message, type) {
441
+ return `[${namespace} ${type}] ${message}`;
442
+ }
443
+ return {
444
+ debug: (message, ...args) => console.log(format(message, "debug"), ...args),
445
+ info: (message, ...args) => console.log(format(message, "info"), ...args),
446
+ warn: (message, ...args) => console.log(format(message, "warn"), ...args),
447
+ error: (message, ...args) => console.log(format(message, "error"), ...args),
448
+ trace: (message, ...args) => console.log(format(message, "trace"), ...args),
449
+ fatal: (message, ...args) => console.log(format(message, "fatal"), ...args),
450
+ level: () => {},
451
+ current: () => "info",
452
+ enabled: () => true,
453
+ enable: () => {},
454
+ disable: () => {}
455
+ };
456
+ }
457
+ /**
458
+ * Creates a new logger context.
459
+ *
460
+ * @param options The options for the logger context.
461
+ * @template E The type of the logger context.
462
+ * @returns A new logger context.
463
+ *
464
+ * @see https://0.vuetifyjs.com/composables/plugins/use-logger
465
+ *
466
+ * @example
467
+ * ```ts
468
+ * import { createLoggerContext } from '@vuetify/v0'
469
+ *
470
+ * export const [useAppLogger, provideAppLogger, appLogger] = createLoggerContext({
471
+ * namespace: 'app:logger',
472
+ * level: 'debug',
473
+ * })
474
+ * ```
475
+ */
476
+ function createLoggerContext(_options = {}) {
477
+ const { namespace = "v0:logger",...options } = _options;
478
+ const [useLoggerContext, _provideLoggerContext] = createContext(namespace);
479
+ const context = createLogger(options);
480
+ function provideLoggerContext(_context = context, app) {
481
+ return _provideLoggerContext(_context, app);
482
+ }
483
+ return createTrinity(useLoggerContext, provideLoggerContext, context);
484
+ }
485
+ /**
486
+ * Creates a new logger plugin.
487
+ *
488
+ * @param options The options for the logger plugin.
489
+ * @returns A new logger plugin.
490
+ *
491
+ * @see https://0.vuetifyjs.com/composables/plugins/use-logger
492
+ *
493
+ * @example
494
+ * ```ts
495
+ * import { createApp } from 'vue'
496
+ * import { createLoggerPlugin } from '@vuetify/v0'
497
+ * import App from './App.vue'
498
+ *
499
+ * const app = createApp(App)
500
+ *
501
+ * app.use(
502
+ * createLoggerPlugin({
503
+ * level: 'debug',
504
+ * prefix: '[MyApp]',
505
+ * })
506
+ * )
507
+ *
508
+ * app.mount('#app')
509
+ * ```
510
+ */
511
+ function createLoggerPlugin(_options = {}) {
512
+ const { namespace = "v0:logger",...options } = _options;
513
+ const [, provideLoggerContext, context] = createLoggerContext({
514
+ ...options,
515
+ namespace
516
+ });
517
+ return createPlugin({
518
+ namespace,
519
+ provide: (app) => {
520
+ provideLoggerContext(context, app);
521
+ },
522
+ setup: (_app) => {
523
+ if (process.env.NODE_ENV !== "production" && IN_BROWSER) window.__v0Logger__ = context;
524
+ }
525
+ });
526
+ }
527
+ /**
528
+ * Uses an existing or creates a new logger instance.
529
+ *
530
+ * @param namespace The namespace for the logger context. Defaults to `'v0:logger'`.
531
+ * @returns The logger instance.
532
+ *
533
+ * @see https://0.vuetifyjs.com/composables/plugins/use-logger
534
+ *
535
+ * @example
536
+ * ```ts
537
+ * import { useLogger } from '@vuetify/v0'
538
+ *
539
+ * const logger = useLogger()
540
+ *
541
+ * logger.info('This is an info message')
542
+ * logger.debug('This is a debug message')
543
+ * logger.error('This is an error message')
544
+ * logger.level('debug')
545
+ * logger.debug('This debug message will now be logged')
546
+ * ```
547
+ */
548
+ function useLogger(namespace = "v0:logger") {
549
+ const fallback = createFallbackLogger(namespace);
550
+ if (!getCurrentInstance()) return fallback;
551
+ try {
552
+ return useContext(namespace, fallback);
553
+ } catch {
554
+ return fallback;
555
+ }
556
+ }
557
+
558
+ //#endregion
559
+ //#region src/composables/useRegistry/index.ts
560
+ /**
561
+ * @module useRegistry
562
+ *
563
+ * @remarks
564
+ * A foundational composable for managing collections of items (tickets) with:
565
+ * - Unique ID-based access
566
+ * - Index-based ordering
567
+ * - Value-based reverse lookup
568
+ * - Automatic reindexing
569
+ * - Optional event emission
570
+ * - Performance-optimized caching
571
+ *
572
+ * The registry serves as the base for many other composables in the system,
573
+ * including useSelection, useForm, useTimeline, and more.
574
+ */
575
+ /**
576
+ * Creates a new registry instance.
577
+ *
578
+ * @param options The options for the registry instance.
579
+ * @template Z The type of registry ticket that extends RegistryTicket. Use this to add custom properties to tickets.
580
+ * @template E The type of registry context that extends RegistryContext<Z>. Use this when extending the registry with additional methods.
581
+ * @returns A new registry instance.
582
+ *
583
+ * @see https://0.vuetifyjs.com/composables/registration/use-registry#use-registry
584
+ *
585
+ * @example
586
+ * ```ts
587
+ * import { useRegistry } from '@vuetify/v0'
588
+ *
589
+ * const registry = useRegistry()
590
+ *
591
+ * const ticket1 = registry.register({ id: 'user-1', value: { name: 'John' } })
592
+ * const ticket2 = registry.register({ id: 'user-2', value: { name: 'Jane' } })
593
+ *
594
+ * console.log(registry.size) // 2
595
+ * console.log(registry.get('user-1')) // { id: 'user-1', index: 0, value: { name: 'John' }, ... }
596
+ * ```
597
+ */
598
+ function useRegistry(options) {
599
+ const logger = useLogger();
600
+ const collection = /* @__PURE__ */ new Map();
601
+ const catalog = /* @__PURE__ */ new Map();
602
+ const directory = /* @__PURE__ */ new Map();
603
+ const cache = /* @__PURE__ */ new Map();
604
+ const listeners = /* @__PURE__ */ new Map();
605
+ const events = options?.events ?? false;
606
+ let indexDependentCount = 0;
607
+ let needsReindex = false;
608
+ let minDirtyIndex = Infinity;
609
+ function emit(event, data = void 0) {
610
+ if (!events) return;
611
+ const cbs = listeners.get(event);
612
+ if (!cbs) return;
613
+ for (const cb of cbs) cb(data);
614
+ }
615
+ function on(event, cb) {
616
+ if (!events) {
617
+ logger.warn(`Attempted to register event listener for "${event}" but events are disabled.`);
618
+ return;
619
+ }
620
+ if (!listeners.has(event)) listeners.set(event, /* @__PURE__ */ new Set());
621
+ listeners.get(event).add(cb);
622
+ }
623
+ function off(event, cb) {
624
+ listeners.get(event)?.delete(cb);
625
+ }
626
+ function dispose() {
627
+ if (listeners.size > 0) listeners.clear();
628
+ clear();
629
+ }
630
+ function get(id) {
631
+ return collection.get(id);
632
+ }
633
+ function upsert(id, patch = {}) {
634
+ const existing = get(id);
635
+ if (!existing) return register({
636
+ ...patch,
637
+ id
638
+ });
639
+ const hasValue = Object.prototype.hasOwnProperty.call(patch, "value");
640
+ let value = existing.value;
641
+ let valueIsIndex = existing.valueIsIndex;
642
+ if (hasValue) {
643
+ if (/* @__PURE__ */ isUndefined(patch.value)) {
644
+ value = existing.index;
645
+ valueIsIndex = true;
646
+ } else {
647
+ value = patch.value;
648
+ valueIsIndex = false;
649
+ }
650
+ if (valueIsIndex !== existing.valueIsIndex) if (valueIsIndex) indexDependentCount++;
651
+ else indexDependentCount--;
652
+ if (!Object.is(value, existing.value)) {
653
+ unassign(existing.value, id);
654
+ assign(value, id);
655
+ }
656
+ }
657
+ const updated = {
658
+ ...existing,
659
+ ...patch,
660
+ id,
661
+ index: existing.index,
662
+ value,
663
+ valueIsIndex
664
+ };
665
+ collection.set(id, updated);
666
+ invalidate();
667
+ emit("update:ticket", updated);
668
+ return updated;
669
+ }
670
+ function browse(value) {
671
+ if (indexDependentCount > 0 && needsReindex) reindex();
672
+ return catalog.get(value);
673
+ }
674
+ function lookup(index) {
675
+ if (needsReindex) reindex();
676
+ return directory.get(index);
677
+ }
678
+ function has(id) {
679
+ return collection.has(id);
680
+ }
681
+ function assign(value, id) {
682
+ const bucket = catalog.get(value);
683
+ if (bucket) {
684
+ if (/* @__PURE__ */ isArray(bucket)) {
685
+ if (!bucket.includes(id)) bucket.push(id);
686
+ } else if (bucket !== id) catalog.set(value, [bucket, id]);
687
+ } else catalog.set(value, id);
688
+ }
689
+ function unassign(value, id) {
690
+ const bucket = catalog.get(value);
691
+ if (!bucket) return;
692
+ if (/* @__PURE__ */ isArray(bucket)) {
693
+ const next = bucket.filter((v) => v !== id);
694
+ if (next.length === 0) catalog.delete(value);
695
+ else if (next.length === 1) catalog.set(value, next[0]);
696
+ else catalog.set(value, next);
697
+ } else if (bucket === id) catalog.delete(value);
698
+ }
699
+ function keys() {
700
+ const cached = cache.get("keys");
701
+ if (cached != void 0) return cached;
702
+ const keys$1 = Array.from(collection.keys());
703
+ cache.set("keys", keys$1);
704
+ return keys$1;
705
+ }
706
+ function values() {
707
+ const cached = cache.get("values");
708
+ if (!/* @__PURE__ */ isUndefined(cached)) return cached;
709
+ const values$1 = Array.from(collection.values());
710
+ cache.set("values", values$1);
711
+ return values$1;
712
+ }
713
+ function entries() {
714
+ const cached = cache.get("entries");
715
+ if (!/* @__PURE__ */ isUndefined(cached)) return cached;
716
+ const entries$1 = Array.from(collection.entries());
717
+ cache.set("entries", entries$1);
718
+ return entries$1;
719
+ }
720
+ function clear() {
721
+ if (collection.size > 0) collection.clear();
722
+ if (catalog.size > 0) catalog.clear();
723
+ if (directory.size > 0) directory.clear();
724
+ invalidate();
725
+ indexDependentCount = 0;
726
+ needsReindex = false;
727
+ minDirtyIndex = Infinity;
728
+ emit("clear:registry");
729
+ }
730
+ function invalidate() {
731
+ if (cache.size > 0) cache.clear();
732
+ }
733
+ function reindex() {
734
+ const startIndex = minDirtyIndex === Infinity ? 0 : minDirtyIndex;
735
+ if (startIndex === 0) {
736
+ if (catalog.size > 0) catalog.clear();
737
+ if (directory.size > 0) directory.clear();
738
+ }
739
+ invalidate();
740
+ let index = 0;
741
+ for (const ticket of collection.values()) {
742
+ if (index < startIndex) {
743
+ index++;
744
+ continue;
745
+ }
746
+ if (startIndex > 0) directory.delete(ticket.index);
747
+ if (ticket.valueIsIndex) {
748
+ if (startIndex > 0) unassign(ticket.value, ticket.id);
749
+ ticket.value = index;
750
+ assign(ticket.value, ticket.id);
751
+ } else if (startIndex === 0) assign(ticket.value, ticket.id);
752
+ ticket.index = index;
753
+ directory.set(index, ticket.id);
754
+ index++;
755
+ }
756
+ needsReindex = false;
757
+ minDirtyIndex = Infinity;
758
+ emit("reindex:registry");
759
+ }
760
+ function register(registration = {}) {
761
+ const size = collection.size;
762
+ const id = registration.id ?? /* @__PURE__ */ genId();
763
+ if (has(id)) {
764
+ logger.warn(`Ticket with id "${id}" already exists in the registry. Skipping registration.`);
765
+ return get(id);
766
+ }
767
+ const valueIsUndefined = /* @__PURE__ */ isUndefined(registration.value);
768
+ const index = registration.index ?? size;
769
+ const value = valueIsUndefined ? index : registration.value;
770
+ const valueIsIndex = valueIsUndefined;
771
+ if (valueIsIndex) indexDependentCount++;
772
+ const ticket = {
773
+ ...registration,
774
+ id,
775
+ index,
776
+ value,
777
+ valueIsIndex
778
+ };
779
+ collection.set(ticket.id, ticket);
780
+ directory.set(ticket.index, ticket.id);
781
+ assign(ticket.value, ticket.id);
782
+ invalidate();
783
+ emit("register:ticket", ticket);
784
+ return ticket;
785
+ }
786
+ function unregister(id) {
787
+ const ticket = collection.get(id);
788
+ if (!ticket) return;
789
+ if (ticket.valueIsIndex) indexDependentCount--;
790
+ collection.delete(ticket.id);
791
+ directory.delete(ticket.index);
792
+ unassign(ticket.value, ticket.id);
793
+ invalidate();
794
+ emit("unregister:ticket", ticket);
795
+ if (indexDependentCount > 0 && ticket.index < collection.size) {
796
+ minDirtyIndex = Math.min(minDirtyIndex, ticket.index);
797
+ reindex();
798
+ } else {
799
+ minDirtyIndex = Math.min(minDirtyIndex, ticket.index);
800
+ needsReindex = true;
801
+ }
802
+ }
803
+ function offboard(ids) {
804
+ const removed = [];
805
+ for (const id of ids) {
806
+ const ticket = collection.get(id);
807
+ if (!ticket) continue;
808
+ if (ticket.valueIsIndex) indexDependentCount--;
809
+ minDirtyIndex = Math.min(minDirtyIndex, ticket.index);
810
+ collection.delete(ticket.id);
811
+ directory.delete(ticket.index);
812
+ unassign(ticket.value, ticket.id);
813
+ removed.push(ticket);
814
+ }
815
+ if (removed.length === 0) return;
816
+ invalidate();
817
+ if (events) for (const ticket of removed) emit("unregister:ticket", ticket);
818
+ needsReindex = true;
819
+ }
820
+ function seek(direction = "first", from, predicate) {
821
+ if (collection.size === 0) return void 0;
822
+ if (needsReindex) reindex();
823
+ const tickets = values();
824
+ const index = /* @__PURE__ */ isUndefined(from) ? void 0 : Math.max(0, Math.min(from, tickets.length - 1));
825
+ if (direction === "last") {
826
+ const start = /* @__PURE__ */ isUndefined(index) ? tickets.length - 1 : index;
827
+ for (let i = start; i >= 0; i--) {
828
+ const ticket = tickets[i];
829
+ if (!predicate || predicate(ticket)) return ticket;
830
+ }
831
+ } else {
832
+ const start = /* @__PURE__ */ isUndefined(index) ? 0 : index;
833
+ for (let i = start; i < tickets.length; i++) {
834
+ const ticket = tickets[i];
835
+ if (!predicate || predicate(ticket)) return ticket;
836
+ }
837
+ }
838
+ }
839
+ return {
840
+ collection,
841
+ emit,
842
+ on,
843
+ off,
844
+ dispose,
845
+ has,
846
+ keys,
847
+ clear,
848
+ browse,
849
+ entries,
850
+ values,
851
+ lookup,
852
+ get,
853
+ upsert,
854
+ register,
855
+ unregister,
856
+ reindex,
857
+ seek,
858
+ onboard(registrations) {
859
+ return registrations.map((registration) => register(registration));
860
+ },
861
+ offboard,
862
+ get size() {
863
+ return collection.size;
864
+ }
865
+ };
866
+ }
867
+ /**
868
+ * Creates a new registry context.
869
+ *
870
+ * @param namespace The namespace for the registry context.
871
+ * @param options The options for the registry context.
872
+ * @template Z The type of registry ticket that extends RegistryTicket. Use this to add custom properties to tickets.
873
+ * @template E The type of registry context that extends RegistryContext<Z>. Use this when extending the registry with additional methods.
874
+ * @returns A new registry context.
875
+ *
876
+ * @see https://0.vuetifyjs.com/composables/registration/use-registry#create-registry-context
877
+ *
878
+ * @example
879
+ * ```ts
880
+ * import { createRegistryContext } from '@vuetify/v0'
881
+ *
882
+ * // With default namespace 'v0:registry'
883
+ * export const [useItems, provideItems, items] = createRegistryContext()
884
+ *
885
+ * // Or with custom namespace
886
+ * export const [useItems, provideItems, items] = createRegistryContext({ namespace: 'my-items' })
887
+ *
888
+ * // In a parent component:
889
+ * provideItems()
890
+ *
891
+ * // In a child component:
892
+ * const items = useItems()
893
+ * items.register({ id: 'item-1', value: 'Value 1' })
894
+ * ```
895
+ */
896
+ function createRegistryContext(_options = {}) {
897
+ const { namespace = "v0:registry",...options } = _options;
898
+ const [useRegistryContext, _provideRegistryContext] = createContext(namespace);
899
+ const context = useRegistry(options);
900
+ function provideRegistryContext(_context = context, app) {
901
+ return _provideRegistryContext(_context, app);
902
+ }
903
+ return createTrinity(useRegistryContext, provideRegistryContext, context);
904
+ }
905
+
906
+ //#endregion
907
+ //#region src/composables/useSelection/index.ts
908
+ /**
909
+ * @module useSelection
910
+ *
911
+ * @remarks
912
+ * Base composable for managing selected items in a collection with Set-based tracking.
913
+ *
914
+ * Key features:
915
+ * - Set-based selectedIds for O(1) selection checks
916
+ * - Mandatory selection mode (prevents deselecting last item)
917
+ * - Auto-enrollment option (selects non-disabled items on register)
918
+ * - Disabled item filtering
919
+ * - Computed selectedItems and selectedValues Sets
920
+ *
921
+ * Extends useRegistry and serves as the base for useSingle, useGroup, useStep, and useFeatures.
922
+ */
923
+ /**
924
+ * Creates a new selection instance for managing multiple selected items.
925
+ *
926
+ * Extends `useRegistry` with selection tracking via a reactive `Set` of selected IDs.
927
+ * Supports disabled items, mandatory selection enforcement, and auto-enrollment.
928
+ *
929
+ * @param options The options for the selection instance.
930
+ * @template Z The type of the selection ticket.
931
+ * @template E The type of the selection context.
932
+ * @returns A new selection instance with selection management methods.
933
+ *
934
+ * @remarks
935
+ * **Key Features:**
936
+ * - Multi-selection support (unlike `useSingle` which enforces single selection)
937
+ * - Set-based `selectedIds` tracking for efficient lookups
938
+ * - Computed `selectedItems` and `selectedValues` for reactive access
939
+ * - Each ticket gets `isSelected`, `select()`, `unselect()`, and `toggle()` methods
940
+ * - Disabled items cannot be selected
941
+ * - Mandatory mode prevents deselecting the last item
942
+ * - Force mode auto-selects first non-disabled item on registration
943
+ * - Enroll option auto-selects all non-disabled items on registration
944
+ *
945
+ * **Inheritance Chain:**
946
+ * `useRegistry` → `createSelection` → `createSingle`/`createGroup` → `createStep`
947
+ *
948
+ * @see https://0.vuetifyjs.com/composables/selection/use-selection
949
+ *
950
+ * @example
951
+ * ```ts
952
+ * import { createSelection } from '@vuetify/v0'
953
+ *
954
+ * const selection = createSelection({ 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
+ * console.log(Array.from(selection.selectedValues.value)) // ['Item 1', 'Item 3']
967
+ * ```
968
+ */
969
+ function createSelection(_options = {}) {
970
+ const { disabled = false, enroll = false, mandatory = false, multiple = false,...options } = _options;
971
+ const registry = useRegistry(options);
972
+ const selectedIds = shallowReactive(/* @__PURE__ */ new Set());
973
+ const selectedItems = computed(() => {
974
+ return new Set(Array.from(selectedIds).map((id) => registry.get(id)));
975
+ });
976
+ const selectedValues = computed(() => {
977
+ return new Set(Array.from(selectedItems.value).map((item) => item?.value));
978
+ });
979
+ function seek(direction = "first", from) {
980
+ return registry.seek(direction, from, (ticket) => !toValue(ticket.disabled));
981
+ }
982
+ function mandate() {
983
+ if (!mandatory || registry.size === 0 || selectedIds.size > 0) return;
984
+ const ticket = seek("first");
985
+ if (ticket) select(ticket.id);
986
+ }
987
+ function select(id) {
988
+ const item = registry.get(id);
989
+ if (!item || toValue(item.disabled)) return;
990
+ if (!multiple) selectedIds.clear();
991
+ selectedIds.add(id);
992
+ }
993
+ function unselect(id) {
994
+ if (mandatory && selectedIds.size === 1) return;
995
+ selectedIds.delete(id);
996
+ }
997
+ function toggle(id) {
998
+ if (selected(id)) unselect(id);
999
+ else select(id);
1000
+ }
1001
+ function selected(id) {
1002
+ return selectedIds.has(id);
1003
+ }
1004
+ function register(registration = {}) {
1005
+ const id = registration.id ?? /* @__PURE__ */ genId();
1006
+ const item = {
1007
+ disabled: false,
1008
+ select: () => select(id),
1009
+ unselect: () => unselect(id),
1010
+ toggle: () => toggle(id),
1011
+ isSelected: toRef(() => selected(id)),
1012
+ ...registration,
1013
+ id
1014
+ };
1015
+ const ticket = registry.register(item);
1016
+ if (enroll && !toValue(item.disabled)) selectedIds.add(ticket.id);
1017
+ if (mandatory === "force") mandate();
1018
+ return ticket;
1019
+ }
1020
+ function unregister(id) {
1021
+ selectedIds.delete(id);
1022
+ registry.unregister(id);
1023
+ }
1024
+ function offboard(ids) {
1025
+ for (const id of ids) selectedIds.delete(id);
1026
+ registry.offboard(ids);
1027
+ }
1028
+ function onboard(registrations) {
1029
+ return registrations.map((registration) => register(registration));
1030
+ }
1031
+ function reset() {
1032
+ registry.clear();
1033
+ selectedIds.clear();
1034
+ mandate();
1035
+ }
1036
+ return {
1037
+ ...registry,
1038
+ disabled,
1039
+ selectedIds,
1040
+ selectedItems,
1041
+ selectedValues,
1042
+ register,
1043
+ unregister,
1044
+ onboard,
1045
+ offboard,
1046
+ reset,
1047
+ mandate,
1048
+ seek,
1049
+ select,
1050
+ unselect,
1051
+ toggle,
1052
+ selected,
1053
+ get size() {
1054
+ return registry.size;
1055
+ }
1056
+ };
1057
+ }
1058
+ /**
1059
+ * Creates a new selection context.
1060
+ *
1061
+ * @param options The options for the selection context.
1062
+ * @template Z The type of the selection ticket.
1063
+ * @template E The type of the selection context.
1064
+ * @returns A new selection context.
1065
+ *
1066
+ * @see https://0.vuetifyjs.com/composables/selection/use-selection
1067
+ *
1068
+ * @example
1069
+ * ```ts
1070
+ * import { createSelectionContext } from '@vuetify/v0'
1071
+ *
1072
+ * // With default namespace 'v0:selection'
1073
+ * export const [useCheckboxes, provideCheckboxes, checkboxes] = createSelectionContext()
1074
+ *
1075
+ * // Or with custom namespace
1076
+ * export const [useCheckboxes, provideCheckboxes, checkboxes] = createSelectionContext({ namespace: 'checkboxes' })
1077
+ *
1078
+ * // In a parent component:
1079
+ * provideCheckboxes()
1080
+ *
1081
+ * // In a child component:
1082
+ * const checkboxes = useCheckboxes()
1083
+ * checkboxes.select('checkbox-1')
1084
+ * ```
1085
+ */
1086
+ function createSelectionContext(_options = {}) {
1087
+ const { namespace = "v0:selection",...options } = _options;
1088
+ const [useSelectionContext, _provideSelectionContext] = createContext(namespace);
1089
+ const context = createSelection(options);
1090
+ function provideSelectionContext(_context = context, app) {
1091
+ return _provideSelectionContext(_context, app);
1092
+ }
1093
+ return createTrinity(useSelectionContext, provideSelectionContext, context);
1094
+ }
1095
+ /**
1096
+ * Returns the current selection instance.
1097
+ *
1098
+ * @param namespace The namespace for the selection context. Defaults to `'v0:selection'`.
1099
+ * @returns The current selection instance.
1100
+ *
1101
+ * @see https://0.vuetifyjs.com/composables/selection/use-selection
1102
+ *
1103
+ * @example
1104
+ * ```vue
1105
+ * <script setup lang="ts">
1106
+ * import { useSelection } from '@vuetify/v0'
1107
+ *
1108
+ * const selection = useSelection()
1109
+ * <\/script>
1110
+ *
1111
+ * <template>
1112
+ * <div>
1113
+ * <p>Selected: {{ selection.selectedIds.size }}</p>
1114
+ * </div>
1115
+ * </template>
1116
+ * ```
1117
+ */
1118
+ function useSelection(namespace = "v0:selection") {
1119
+ return useContext(namespace);
1120
+ }
1121
+
1122
+ //#endregion
1123
+ //#region src/composables/toArray/index.ts
1124
+ /**
1125
+ * @module toArray
1126
+ *
1127
+ * @remarks
1128
+ * Utility function to normalize single values and arrays into arrays.
1129
+ *
1130
+ * Converts single values into single-element arrays, passes arrays through unchanged,
1131
+ * and handles null/undefined by returning empty arrays. Perfect for functions that
1132
+ * accept both single values and arrays as input (e.g., ID | ID[]).
1133
+ */
1134
+ /**
1135
+ * Converts a value to an array.
1136
+ *
1137
+ * @param value The value to convert.
1138
+ * @template Z The type of the value.
1139
+ * @returns The converted array.
1140
+ *
1141
+ * @see https://0.vuetifyjs.com/composables/transformers/to-array
1142
+ *
1143
+ * @example
1144
+ * ```ts
1145
+ * import { toArray } from '@vuetify/v0'
1146
+ *
1147
+ * const value = 'Example Value'
1148
+ * const valueAsArray = toArray(value)
1149
+ *
1150
+ * console.log(valueAsArray) // ['Example Value']
1151
+ * ```
1152
+ */
1153
+ function toArray(value) {
1154
+ return /* @__PURE__ */ isNullOrUndefined(value) ? [] : Array.isArray(value) ? value : [value];
1155
+ }
1156
+
1157
+ //#endregion
1158
+ //#region src/composables/useProxyModel/index.ts
1159
+ /**
1160
+ * @module useProxyModel
1161
+ *
1162
+ * @remarks
1163
+ * Proxy composable for bidirectional sync between selection registry and v-model.
1164
+ *
1165
+ * Key features:
1166
+ * - Bidirectional synchronization
1167
+ * - Array and single-value modes
1168
+ * - Automatic cleanup on scope disposal
1169
+ * - Perfect for form controls with selection backing
1170
+ *
1171
+ * Bridges the gap between selection composables and Vue's v-model.
1172
+ */
1173
+ /**
1174
+ * Syncs a ref with a selection registry bidirectionally.
1175
+ *
1176
+ * @param registry The selection registry to bind to.
1177
+ * @param model The ref to sync.
1178
+ * @param options The options for the proxy model.
1179
+ * @template Z The type of the selection ticket.
1180
+ * @returns A function to stop the sync.
1181
+ *
1182
+ * @see https://0.vuetifyjs.com/composables/forms/use-proxy-model
1183
+ *
1184
+ * @example
1185
+ * ```ts
1186
+ * import { createSelection, useProxyModel } from '@vuetify/v0'
1187
+ *
1188
+ * const model = ref()
1189
+ * const registry = createSelection({ events: true })
1190
+ * registry.onboard([
1191
+ * { id: 'item-1', value: 'Item 1' },
1192
+ * { id: 'item-2', value: 'Item 2' },
1193
+ * ])
1194
+ *
1195
+ * const stop = useProxyModel(registry, model)
1196
+ * ```
1197
+ */
1198
+ function useProxyModel(registry, model, options) {
1199
+ const multiple = options?.multiple ?? false;
1200
+ const _transformIn = options?.transformIn;
1201
+ const _transformOut = options?.transformOut;
1202
+ function transformIn(val) {
1203
+ const value = toValue(val);
1204
+ return toArray(/* @__PURE__ */ isFunction(_transformIn) ? _transformIn(value) : value);
1205
+ }
1206
+ function transformOut(val) {
1207
+ if (/* @__PURE__ */ isFunction(_transformOut)) return _transformOut(val);
1208
+ return multiple ? val : val[0];
1209
+ }
1210
+ const modelAsArray = transformIn(model);
1211
+ const pending = new Set(modelAsArray);
1212
+ for (const value of modelAsArray) {
1213
+ const ids = registry.browse(value);
1214
+ if (/* @__PURE__ */ isArray(ids)) {
1215
+ for (const id of ids) registry.select(id);
1216
+ pending.delete(value);
1217
+ } else if (ids) {
1218
+ registry.select(ids);
1219
+ pending.delete(value);
1220
+ }
1221
+ }
1222
+ const registryWatch = watch(registry.selectedValues, (val) => {
1223
+ modelWatch.pause();
1224
+ model.value = transformOut(Array.from(toValue(val)));
1225
+ modelWatch.resume();
1226
+ }, { flush: "sync" });
1227
+ const modelWatch = watch(model, (val) => {
1228
+ registryWatch.pause();
1229
+ const currentIds = new Set(toValue(registry.selectedIds));
1230
+ const targetIds = /* @__PURE__ */ new Set();
1231
+ for (const value of transformIn(val)) {
1232
+ const ids = registry.browse(value);
1233
+ if (/* @__PURE__ */ isArray(ids)) for (const single of ids) targetIds.add(single);
1234
+ else if (ids) targetIds.add(ids);
1235
+ }
1236
+ if (multiple) {
1237
+ for (const id of currentIds.difference(targetIds)) registry.selectedIds.delete(id);
1238
+ for (const id of targetIds.difference(currentIds)) registry.selectedIds.add(id);
1239
+ } else {
1240
+ const next = targetIds.values().next().value;
1241
+ const last = currentIds.values().next().value;
1242
+ if (!/* @__PURE__ */ isUndefined(last)) registry.unselect(last);
1243
+ if (!/* @__PURE__ */ isUndefined(next)) registry.select(next);
1244
+ }
1245
+ registryWatch.resume();
1246
+ }, {
1247
+ flush: "sync",
1248
+ deep: multiple
1249
+ });
1250
+ function onRegister(ticket) {
1251
+ if (!pending.has(ticket.value) || ticket.disabled) return;
1252
+ registryWatch.pause();
1253
+ modelWatch.pause();
1254
+ registry.select(ticket.id);
1255
+ pending.delete(ticket.value);
1256
+ modelWatch.resume();
1257
+ registryWatch.resume();
1258
+ }
1259
+ registry.on("register:ticket", onRegister);
1260
+ function stop() {
1261
+ registryWatch();
1262
+ modelWatch();
1263
+ registry.off("register:ticket", onRegister);
1264
+ }
1265
+ onScopeDispose(stop, true);
1266
+ return stop;
1267
+ }
1268
+
1269
+ //#endregion
1270
+ //#region src/composables/useProxyRegistry/index.ts
1271
+ /**
1272
+ * @module useProxyRegistry
1273
+ *
1274
+ * @remarks
1275
+ * Proxy composable for reactive registry keys, values, entries, and size.
1276
+ *
1277
+ * Key features:
1278
+ * - Reactive proxy for registry data
1279
+ * - Deep or shallow reactivity options
1280
+ * - Event-based updates
1281
+ * - Automatic cleanup on scope disposal
1282
+ * - Transforms Map-based registry into reactive refs
1283
+ *
1284
+ * Perfect for exposing registry data as reactive computed properties.
1285
+ */
1286
+ /**
1287
+ * Creates a proxy registry that provides reactive objects for registry data.
1288
+ *
1289
+ * @param registry The registry instance to proxy.
1290
+ * @param options The options for the proxy registry.
1291
+ * @template Z The type of the registry ticket.
1292
+ * @returns A proxy registry with reactive objects.
1293
+ *
1294
+ * @see https://0.vuetifyjs.com/composables/registration/use-proxy-registry
1295
+ *
1296
+ * @example
1297
+ * ```ts
1298
+ * import { useRegistry, useProxyRegistry } from '@vuetify/v0'
1299
+ *
1300
+ * const registry = useRegistry({ events: true })
1301
+ * const proxy = useProxyRegistry(registry)
1302
+ *
1303
+ * registry.register({ value: 'Item 1' })
1304
+ * console.log(proxy.size) // 1
1305
+ * ```
1306
+ */
1307
+ function useProxyRegistry(registry, options) {
1308
+ const state = (options?.deep ? reactive : shallowReactive)({
1309
+ keys: registry.keys(),
1310
+ values: registry.values(),
1311
+ entries: registry.entries(),
1312
+ size: registry.size
1313
+ });
1314
+ function update() {
1315
+ state.keys = registry.keys();
1316
+ state.values = registry.values();
1317
+ state.entries = registry.entries();
1318
+ state.size = registry.size;
1319
+ }
1320
+ registry.on("register:ticket", update);
1321
+ registry.on("unregister:ticket", update);
1322
+ registry.on("update:ticket", update);
1323
+ registry.on("clear:registry", update);
1324
+ onScopeDispose(() => {
1325
+ registry.off("register:ticket", update);
1326
+ registry.off("unregister:ticket", update);
1327
+ registry.off("update:ticket", update);
1328
+ registry.off("clear:registry", update);
1329
+ }, true);
1330
+ return state;
1331
+ }
1332
+
1333
+ //#endregion
1334
+ //#region src/composables/useGroup/index.ts
1335
+ /**
1336
+ * @module useGroup
1337
+ *
1338
+ * @remarks
1339
+ * Multi-selection composable that extends useSelection with batch operations and tri-state support.
1340
+ *
1341
+ * Key features:
1342
+ * - Batch operations (select/unselect/toggle accept ID | ID[])
1343
+ * - Tri-state support via mixed/indeterminate state (mix/unmix)
1344
+ * - selectedIndexes computed Set for position-based tracking
1345
+ * - Perfect for checkbox trees, multi-select dropdowns, filter panels
1346
+ *
1347
+ * Tri-state behavior:
1348
+ * - Items can be selected, mixed (indeterminate), or unselected
1349
+ * - select() clears mixed state, mix() clears selected state (mutually exclusive)
1350
+ * - toggle() on a mixed item selects it (resolves positively)
1351
+ *
1352
+ * Inheritance chain: useRegistry → useSelection → useGroup
1353
+ * Extended by: useFeatures
1354
+ */
1355
+ /**
1356
+ * Creates a new group instance with batch selection and tri-state support.
1357
+ *
1358
+ * Extends `createSelection` to support selecting, unselecting, and toggling multiple items
1359
+ * at once by passing an array of IDs. Adds tri-state (mixed/indeterminate) support for
1360
+ * checkbox trees and similar use cases.
1361
+ *
1362
+ * @param options The options for the group instance.
1363
+ * @template Z The type of the group ticket.
1364
+ * @template E The type of the group context.
1365
+ * @returns A new group instance with batch selection and tri-state support.
1366
+ *
1367
+ * @remarks
1368
+ * **Key Differences from `createSelection`:**
1369
+ * - `select()` accepts `ID | ID[]` for batch operations
1370
+ * - `unselect()` accepts `ID | ID[]` for batch operations
1371
+ * - `toggle()` accepts `ID | ID[]` for batch operations
1372
+ * - Adds `selectedIndexes` computed Set for getting selected item indexes
1373
+ * - Adds tri-state support via `mix()`, `unmix()`, `mixed()`, `mixedIds`, `mixedItems`
1374
+ * - Perfect for checkbox trees, multi-select dropdowns, and bulk operations
1375
+ *
1376
+ * **Tri-State Support:**
1377
+ * - Items can be in one of three states: selected, mixed (indeterminate), or unselected
1378
+ * - `mix(id)` sets item to mixed state (clears selected if set)
1379
+ * - `unmix(id)` clears mixed state
1380
+ * - `select(id)` clears mixed state before selecting
1381
+ * - `toggle(id)` on a mixed item selects it (resolves the indeterminate state positively)
1382
+ * - Mixed state works on disabled items (it's a computed state, not user action)
1383
+ *
1384
+ * **Batch Operations:**
1385
+ * - Single ID: `group.select('item-1')`
1386
+ * - Array of IDs: `group.select(['item-1', 'item-2', 'item-3'])`
1387
+ * - Uses `toArray()` utility internally to normalize input
1388
+ * - Disabled items are automatically skipped in select operations
1389
+ * - Non-existent IDs are silently ignored
1390
+ *
1391
+ * **Inheritance Chain:**
1392
+ * `useRegistry` → `createSelection` → `createGroup`
1393
+ *
1394
+ * **Used By:**
1395
+ * - `createFeatures` for feature flag management with multiple selections
1396
+ *
1397
+ * @see https://0.vuetifyjs.com/composables/selection/use-group
1398
+ *
1399
+ * @example
1400
+ * ```ts
1401
+ * import { createGroup } from '@vuetify/v0'
1402
+ *
1403
+ * const checkboxes = createGroup()
1404
+ *
1405
+ * checkboxes.onboard([
1406
+ * { id: 'option-a', value: 'Option A' },
1407
+ * { id: 'option-b', value: 'Option B' },
1408
+ * { id: 'option-c', value: 'Option C' },
1409
+ * ])
1410
+ *
1411
+ * // Select multiple items at once
1412
+ * checkboxes.select(['option-a', 'option-c'])
1413
+ *
1414
+ * console.log(checkboxes.selectedIds) // Set { 'option-a', 'option-c' }
1415
+ * console.log(Array.from(checkboxes.selectedIndexes.value)) // [0, 2]
1416
+ *
1417
+ * // Set item to mixed/indeterminate state
1418
+ * checkboxes.mix('option-a')
1419
+ * console.log(checkboxes.mixedIds) // Set { 'option-a' }
1420
+ * console.log(checkboxes.selectedIds) // Set { 'option-c' } (option-a removed)
1421
+ *
1422
+ * // Toggle a mixed item selects it
1423
+ * checkboxes.toggle('option-a')
1424
+ * console.log(checkboxes.selectedIds) // Set { 'option-a', 'option-c' }
1425
+ * console.log(checkboxes.mixedIds) // Set {} (cleared)
1426
+ * ```
1427
+ */
1428
+ function createGroup(_options = {}) {
1429
+ const { mandatory = false, multiple = true,...options } = _options;
1430
+ const selection = createSelection({
1431
+ ...options,
1432
+ mandatory,
1433
+ multiple,
1434
+ events: true
1435
+ });
1436
+ const proxy = useProxyRegistry(selection);
1437
+ const mixedIds = shallowReactive(/* @__PURE__ */ new Set());
1438
+ const selectedIndexes = computed(() => {
1439
+ return new Set(Array.from(selection.selectedItems.value).map((item) => item?.index));
1440
+ });
1441
+ const mixedItems = computed(() => {
1442
+ return new Set(Array.from(mixedIds).map((id) => selection.get(id)));
1443
+ });
1444
+ function mixed(id) {
1445
+ return mixedIds.has(id);
1446
+ }
1447
+ function mix(ids) {
1448
+ for (const id of toArray(ids)) {
1449
+ if (!selection.has(id)) continue;
1450
+ selection.selectedIds.delete(id);
1451
+ mixedIds.add(id);
1452
+ }
1453
+ }
1454
+ function unmix(ids) {
1455
+ for (const id of toArray(ids)) mixedIds.delete(id);
1456
+ }
1457
+ function select(ids) {
1458
+ for (const id of toArray(ids)) {
1459
+ mixedIds.delete(id);
1460
+ selection.select(id);
1461
+ }
1462
+ }
1463
+ function unselect(ids) {
1464
+ for (const id of toArray(ids)) selection.unselect(id);
1465
+ }
1466
+ function toggle(ids) {
1467
+ for (const id of toArray(ids)) if (mixed(id)) select(id);
1468
+ else selection.toggle(id);
1469
+ }
1470
+ function register(registration = {}) {
1471
+ const id = registration.id ?? /* @__PURE__ */ genId();
1472
+ const item = {
1473
+ ...registration,
1474
+ id,
1475
+ isMixed: toRef(() => mixed(id)),
1476
+ select: () => select(id),
1477
+ unselect: () => unselect(id),
1478
+ toggle: () => toggle(id),
1479
+ mix: () => mix(id),
1480
+ unmix: () => unmix(id)
1481
+ };
1482
+ const ticket = selection.register(item);
1483
+ if (toValue(registration.indeterminate)) mix(id);
1484
+ return ticket;
1485
+ }
1486
+ function unregister(id) {
1487
+ mixedIds.delete(id);
1488
+ selection.unregister(id);
1489
+ }
1490
+ function offboard(ids) {
1491
+ for (const id of ids) mixedIds.delete(id);
1492
+ selection.offboard(ids);
1493
+ }
1494
+ function onboard(registrations) {
1495
+ return registrations.map((registration) => register(registration));
1496
+ }
1497
+ function reset() {
1498
+ mixedIds.clear();
1499
+ selection.reset();
1500
+ }
1501
+ const selectableItems = computed(() => {
1502
+ return proxy.values.filter((item) => !toValue(item.disabled));
1503
+ });
1504
+ const isAllSelected = computed(() => {
1505
+ const items = selectableItems.value;
1506
+ if (items.length === 0) return false;
1507
+ return items.every((item) => selection.selectedIds.has(item.id));
1508
+ });
1509
+ const isMixed = toRef(() => {
1510
+ return mixedIds.size > 0 || !isNoneSelected.value && !isAllSelected.value;
1511
+ });
1512
+ const isNoneSelected = toRef(() => selection.selectedIds.size === 0);
1513
+ function selectAll() {
1514
+ for (const item of selectableItems.value) {
1515
+ mixedIds.delete(item.id);
1516
+ selection.select(item.id);
1517
+ }
1518
+ }
1519
+ function unselectAll() {
1520
+ const first = selection.selectedIds.values().next().value;
1521
+ selection.selectedIds.clear();
1522
+ if (!mandatory || !first) return;
1523
+ selection.select(first);
1524
+ }
1525
+ function toggleAll() {
1526
+ if (isAllSelected.value) unselectAll();
1527
+ else selectAll();
1528
+ }
1529
+ return {
1530
+ ...selection,
1531
+ mixed,
1532
+ mix,
1533
+ unmix,
1534
+ select,
1535
+ unselect,
1536
+ toggle,
1537
+ register,
1538
+ unregister,
1539
+ offboard,
1540
+ onboard,
1541
+ reset,
1542
+ selectAll,
1543
+ unselectAll,
1544
+ toggleAll,
1545
+ mixedIds,
1546
+ mixedItems,
1547
+ selectedIndexes,
1548
+ isNoneSelected,
1549
+ isAllSelected,
1550
+ isMixed,
1551
+ get size() {
1552
+ return selection.size;
1553
+ }
1554
+ };
1555
+ }
1556
+ /**
1557
+ * Creates a new group context.
1558
+ *
1559
+ * @param options The options for the group context.
1560
+ * @template Z The type of the group ticket.
1561
+ * @template E The type of the group context.
1562
+ * @returns A new group context.
1563
+ *
1564
+ * @see https://0.vuetifyjs.com/composables/selection/use-group
1565
+ *
1566
+ * @example
1567
+ * ```ts
1568
+ * import { createGroupContext } from '@vuetify/v0'
1569
+ *
1570
+ * // With default namespace 'v0:group'
1571
+ * export const [useMyGroup, provideMyGroup, myGroup] = createGroupContext()
1572
+ *
1573
+ * // Or with custom namespace
1574
+ * export const [useMyGroup, provideMyGroup, myGroup] = createGroupContext({ namespace: 'my-group' })
1575
+ *
1576
+ * // In a parent component:
1577
+ * provideMyGroup()
1578
+ *
1579
+ * // In a child component:
1580
+ * const group = useMyGroup()
1581
+ * ```
1582
+ */
1583
+ function createGroupContext(_options = {}) {
1584
+ const { namespace = "v0:group",...options } = _options;
1585
+ const [useGroupContext, _provideGroupContext] = createContext(namespace);
1586
+ const context = createGroup(options);
1587
+ function provideGroupContext(_context = context, app) {
1588
+ return _provideGroupContext(_context, app);
1589
+ }
1590
+ return createTrinity(useGroupContext, provideGroupContext, context);
1591
+ }
1592
+ /**
1593
+ * Returns the current group instance.
1594
+ *
1595
+ * @param namespace The namespace for the group context. Defaults to `'v0:group'`.
1596
+ * @returns The current group instance.
1597
+ *
1598
+ * @see https://0.vuetifyjs.com/composables/selection/use-group
1599
+ *
1600
+ * @example
1601
+ * ```vue
1602
+ * <script setup lang="ts">
1603
+ * import { useGroup } from '@vuetify/v0'
1604
+ *
1605
+ * const group = useGroup()
1606
+ * <\/script>
1607
+ *
1608
+ * <template>
1609
+ * <div>
1610
+ * <p>Selected: {{ group.selectedIds.size }}</p>
1611
+ * </div>
1612
+ * </template>
1613
+ * ```
1614
+ */
1615
+ function useGroup(namespace = "v0:group") {
1616
+ return useContext(namespace);
1617
+ }
1618
+
1619
+ //#endregion
1620
+ //#region src/composables/useHydration/index.ts
1621
+ /**
1622
+ * @module useHydration
1623
+ *
1624
+ * @see https://0.vuetifyjs.com/composables/plugins/use-hydration
1625
+ *
1626
+ * @remarks
1627
+ * SSR hydration state management composable.
1628
+ *
1629
+ * Key features:
1630
+ * - Hydration state detection (browser vs SSR)
1631
+ * - Root component detection
1632
+ * - Readonly hydration state refs
1633
+ * - Plugin installation support
1634
+ * - Perfect for hydration-safe rendering
1635
+ *
1636
+ * Essential for composables that need to behave differently during SSR vs client-side.
1637
+ */
1638
+ /**
1639
+ * Creates a new hydration instance.
1640
+ *
1641
+ * @returns A new hydration instance.
1642
+ *
1643
+ * @see https://0.vuetifyjs.com/composables/plugins/use-hydration
1644
+ *
1645
+ * @example
1646
+ * ```ts
1647
+ * import { createHydration } from '@vuetify/v0'
1648
+ *
1649
+ * const hydration = createHydration()
1650
+ * console.log(hydration.isHydrated.value) // false
1651
+ * hydration.hydrate()
1652
+ * console.log(hydration.isHydrated.value) // true
1653
+ * ```
1654
+ */
1655
+ function createHydration() {
1656
+ const isHydrated = shallowRef(false);
1657
+ function hydrate() {
1658
+ isHydrated.value = true;
1659
+ }
1660
+ return {
1661
+ isHydrated: shallowReadonly(isHydrated),
1662
+ hydrate
1663
+ };
1664
+ }
1665
+ function createFallbackHydration() {
1666
+ return {
1667
+ isHydrated: shallowReadonly(shallowRef(true)),
1668
+ hydrate: () => {}
1669
+ };
1670
+ }
1671
+ /**
1672
+ * Creates a new hydration context trinity.
1673
+ *
1674
+ * @param options Options for creating the hydration context.
1675
+ * @template E The type of the hydration context.
1676
+ * @returns A new hydration context trinity.
1677
+ *
1678
+ * @see https://0.vuetifyjs.com/composables/plugins/use-hydration
1679
+ *
1680
+ * @example
1681
+ * ```ts
1682
+ * import { createHydrationContext } from '@vuetify/v0'
1683
+ *
1684
+ * export const [useHydrationContext, provideHydrationContext, context] = createHydrationContext({
1685
+ * namespace: 'app:hydration',
1686
+ * })
1687
+ * ```
1688
+ */
1689
+ function createHydrationContext(_options = {}) {
1690
+ const { namespace = "v0:hydration" } = _options;
1691
+ const [useHydrationContext, _provideHydrationContext] = createContext(namespace);
1692
+ const context = createHydration();
1693
+ function provideHydrationContext(_context = context, app) {
1694
+ return _provideHydrationContext(_context, app);
1695
+ }
1696
+ return createTrinity(useHydrationContext, provideHydrationContext, context);
1697
+ }
1698
+ /**
1699
+ * Creates a new hydration plugin.
1700
+ *
1701
+ * @param options The options for the hydration plugin.
1702
+ * @template E The type of the hydration context.
1703
+ * @returns A new hydration plugin.
1704
+ *
1705
+ * @see https://0.vuetifyjs.com/composables/plugins/use-hydration
1706
+ *
1707
+ * @example
1708
+ * ```ts
1709
+ * import { createApp } from 'vue'
1710
+ * import { createHydrationPlugin } from '@vuetify/v0'
1711
+ * import App from './App.vue'
1712
+ *
1713
+ * const app = createApp(App)
1714
+ *
1715
+ * app.use(createHydrationPlugin())
1716
+ *
1717
+ * app.mount('#app')
1718
+ * ```
1719
+ */
1720
+ function createHydrationPlugin(_options = {}) {
1721
+ const { namespace = "v0:hydration",...options } = _options;
1722
+ const [, provideHydrationContext, context] = createHydrationContext({
1723
+ ...options,
1724
+ namespace
1725
+ });
1726
+ return createPlugin({
1727
+ namespace,
1728
+ provide: (app) => {
1729
+ provideHydrationContext(context, app);
1730
+ },
1731
+ setup: (app) => {
1732
+ app.mixin({ mounted() {
1733
+ if (this.$parent !== null) return;
1734
+ context.hydrate();
1735
+ } });
1736
+ }
1737
+ });
1738
+ }
1739
+ /**
1740
+ * Returns the current hydration instance.
1741
+ *
1742
+ * @param namespace The namespace for the hydration context. Defaults to `v0:hydration`.
1743
+ * @returns The current hydration instance.
1744
+ *
1745
+ * @see https://0.vuetifyjs.com/composables/plugins/use-hydration
1746
+ *
1747
+ * @example
1748
+ * ```vue
1749
+ * <script setup lang="ts">
1750
+ * import { useHydration } from '@vuetify/v0'
1751
+ *
1752
+ * const hydration = useHydration()
1753
+ * <\/script>
1754
+ *
1755
+ * <template>
1756
+ * <div>
1757
+ * <p>Is hydrated: {{ hydration.isHydrated.value }}</p>
1758
+ * </div>
1759
+ * </template>
1760
+ * ```
1761
+ */
1762
+ function useHydration(namespace = "v0:hydration") {
1763
+ const fallback = createFallbackHydration();
1764
+ if (!getCurrentInstance()) return fallback;
1765
+ try {
1766
+ return useContext(namespace, fallback);
1767
+ } catch {
1768
+ return fallback;
1769
+ }
1770
+ }
1771
+
1772
+ //#endregion
1773
+ //#region src/composables/useResizeObserver/index.ts
1774
+ /**
1775
+ * @module useResizeObserver
1776
+ *
1777
+ * @remarks
1778
+ * ResizeObserver composable with lifecycle management.
1779
+ *
1780
+ * Key features:
1781
+ * - ResizeObserver API wrapper
1782
+ * - Pause/resume/stop functionality
1783
+ * - Automatic cleanup on unmount
1784
+ * - SSR-safe (checks SUPPORTS_OBSERVER)
1785
+ * - Hydration-aware
1786
+ * - Box model options (content-box/border-box)
1787
+ *
1788
+ * Perfect for responsive components and size-based rendering.
1789
+ */
1790
+ /**
1791
+ * A composable that uses the Resize Observer API to detect when an element's
1792
+ * size changes.
1793
+ *
1794
+ * @param target The element to observe.
1795
+ * @param callback The callback to execute when the element's size changes.
1796
+ * @param options The options for the Resize Observer.
1797
+ * @returns An object with methods to control the observer.
1798
+ *
1799
+ * @see https://developer.mozilla.org/en-US/docs/Web/API/ResizeObserver
1800
+ * @see https://0.vuetifyjs.com/composables/system/use-resize-observer
1801
+ *
1802
+ * @example
1803
+ * ```ts
1804
+ * import { ref } from 'vue'
1805
+ * import { useResizeObserver } from '@vuetify/v0'
1806
+ *
1807
+ * const el = ref<HTMLElement>()
1808
+ * const width = ref(0)
1809
+ * const height = ref(0)
1810
+ *
1811
+ * const { pause, resume, isPaused } = useResizeObserver(
1812
+ * el,
1813
+ * (entries) => {
1814
+ * const entry = entries[0]
1815
+ * if (entry) {
1816
+ * width.value = entry.contentRect.width
1817
+ * height.value = entry.contentRect.height
1818
+ * console.log('Size changed:', width.value, 'x', height.value)
1819
+ * }
1820
+ * },
1821
+ * { immediate: true }
1822
+ * )
1823
+ *
1824
+ * // Pause observation
1825
+ * pause()
1826
+ *
1827
+ * // Resume observation
1828
+ * resume()
1829
+ * ```
1830
+ */
1831
+ function useResizeObserver(target, callback, options = {}) {
1832
+ const { isHydrated } = useHydration();
1833
+ const observer = shallowRef();
1834
+ const isPaused = shallowRef(false);
1835
+ const isActive = toRef(() => !!observer.value);
1836
+ function setup() {
1837
+ if (!isHydrated.value || !SUPPORTS_OBSERVER || !target.value || isPaused.value) return;
1838
+ observer.value = new ResizeObserver((entries) => {
1839
+ callback(entries.map((entry) => ({
1840
+ contentRect: {
1841
+ width: entry.contentRect.width,
1842
+ height: entry.contentRect.height,
1843
+ top: entry.contentRect.top,
1844
+ left: entry.contentRect.left
1845
+ },
1846
+ target: entry.target
1847
+ })));
1848
+ });
1849
+ observer.value.observe(target.value, { box: options.box || "content-box" });
1850
+ if (options.immediate) {
1851
+ const rect = target.value.getBoundingClientRect();
1852
+ callback([{
1853
+ contentRect: {
1854
+ width: rect.width,
1855
+ height: rect.height,
1856
+ top: rect.top,
1857
+ left: rect.left
1858
+ },
1859
+ target: target.value
1860
+ }]);
1861
+ }
1862
+ }
1863
+ watch([isHydrated, target], () => {
1864
+ cleanup();
1865
+ setup();
1866
+ }, { immediate: true });
1867
+ function cleanup() {
1868
+ if (observer.value) {
1869
+ observer.value.disconnect();
1870
+ observer.value = void 0;
1871
+ }
1872
+ }
1873
+ function pause() {
1874
+ isPaused.value = true;
1875
+ observer.value?.disconnect();
1876
+ }
1877
+ function resume() {
1878
+ isPaused.value = false;
1879
+ setup();
1880
+ }
1881
+ function stop() {
1882
+ cleanup();
1883
+ }
1884
+ onScopeDispose(stop, true);
1885
+ return {
1886
+ isActive: shallowReadonly(isActive),
1887
+ isPaused: shallowReadonly(isPaused),
1888
+ pause,
1889
+ resume,
1890
+ stop
1891
+ };
1892
+ }
1893
+ /**
1894
+ * A convenience composable that uses the Resize Observer API to track an
1895
+ * element's size.
1896
+ *
1897
+ * @param target The element to observe.
1898
+ * @returns An object with the element's width and height.
1899
+ *
1900
+ * @see https://0.vuetifyjs.com/composables/system/use-resize-observer#use-element-size
1901
+ *
1902
+ * @example
1903
+ * ```ts
1904
+ * import { ref, watchEffect } from 'vue'
1905
+ * import { useElementSize } from '@vuetify/v0'
1906
+ *
1907
+ * const box = ref<HTMLElement>()
1908
+ * const { width, height } = useElementSize(box)
1909
+ *
1910
+ * // Width and height are reactive refs
1911
+ * watchEffect(() => {
1912
+ * console.log('Box size:', width.value, 'x', height.value)
1913
+ * })
1914
+ * ```
1915
+ */
1916
+ function useElementSize(target) {
1917
+ const width = shallowRef(0);
1918
+ const height = shallowRef(0);
1919
+ const { pause: _pause, resume, stop, isActive, isPaused } = useResizeObserver(target, (entries) => {
1920
+ const entry = entries[0];
1921
+ if (entry) {
1922
+ width.value = entry.contentRect.width;
1923
+ height.value = entry.contentRect.height;
1924
+ }
1925
+ }, { immediate: true });
1926
+ function pause() {
1927
+ width.value = 0;
1928
+ height.value = 0;
1929
+ _pause();
1930
+ }
1931
+ return {
1932
+ width,
1933
+ height,
1934
+ isActive,
1935
+ isPaused,
1936
+ pause,
1937
+ resume,
1938
+ stop
1939
+ };
1940
+ }
1941
+
1942
+ //#endregion
1943
+ //#region src/composables/useOverflow/index.ts
1944
+ /**
1945
+ * @module useOverflow
1946
+ *
1947
+ * @remarks
1948
+ * Composable for computing how many items fit in a container based on available width.
1949
+ * Enables responsive truncation logic for Pagination, Breadcrumbs, and similar components.
1950
+ *
1951
+ * Key features:
1952
+ * - Container width tracking via ResizeObserver
1953
+ * - Two modes: variable-width (per-item) or uniform-width (sample-based)
1954
+ * - Computes capacity (how many items fit)
1955
+ * - SSR-safe with Infinity fallback
1956
+ * - Supports reserved space for nav buttons, ellipsis, etc.
1957
+ *
1958
+ * Use variable mode (default) for items with different widths like Breadcrumbs.
1959
+ * Use uniform mode (itemWidth option) for same-width items like Pagination buttons.
1960
+ */
1961
+ /**
1962
+ * Creates a new overflow context for computing how many items fit in a container.
1963
+ *
1964
+ * @param options Configuration options
1965
+ * @returns Overflow context with container ref, capacity, and measurement functions
1966
+ *
1967
+ * @example Variable-width mode (Breadcrumbs)
1968
+ * ```vue
1969
+ * <script lang="ts" setup>
1970
+ * import { useTemplateRef } from 'vue'
1971
+ * import { createOverflow } from '@vuetify/v0'
1972
+ *
1973
+ * const containerRef = useTemplateRef('container')
1974
+ * const overflow = createOverflow({
1975
+ * container: containerRef,
1976
+ * gap: 8,
1977
+ * reserved: 40,
1978
+ * })
1979
+ * <\/script>
1980
+ *
1981
+ * <template>
1982
+ * <div ref="container">
1983
+ * <span
1984
+ * v-for="(item, i) in items.slice(0, overflow.capacity.value)"
1985
+ * :key="i"
1986
+ * :ref="el => overflow.measure(i, el)"
1987
+ * >
1988
+ * {{ item }}
1989
+ * </span>
1990
+ * <span v-if="overflow.isOverflowing.value">...</span>
1991
+ * </div>
1992
+ * </template>
1993
+ * ```
1994
+ *
1995
+ * @example Uniform-width mode (Pagination)
1996
+ * ```ts
1997
+ * const overflow = createOverflow({
1998
+ * container: () => atom.value?.element,
1999
+ * itemWidth: buttonWidth,
2000
+ * reserved: () => buttonWidth.value * 4,
2001
+ * })
2002
+ * ```
2003
+ */
2004
+ function createOverflow(options = {}) {
2005
+ const { container: _container, gap = 0, reserved = 0, itemWidth, reverse } = options;
2006
+ const container = /* @__PURE__ */ isUndefined(_container) ? shallowRef() : toRef(_container);
2007
+ const widths = shallowRef(/* @__PURE__ */ new Map());
2008
+ const { width } = useElementSize(container);
2009
+ function measure(index, el) {
2010
+ if (!el) {
2011
+ if (widths.value.has(index)) {
2012
+ const next = new Map(widths.value);
2013
+ next.delete(index);
2014
+ widths.value = next;
2015
+ }
2016
+ return;
2017
+ }
2018
+ const style = getComputedStyle(el);
2019
+ const marginX = Number.parseFloat(style.marginLeft) + Number.parseFloat(style.marginRight);
2020
+ const w = el.offsetWidth + marginX;
2021
+ if (widths.value.get(index) !== w) widths.value = new Map(widths.value).set(index, w);
2022
+ }
2023
+ function reset() {
2024
+ widths.value = /* @__PURE__ */ new Map();
2025
+ }
2026
+ const total = computed(() => {
2027
+ const g = toValue(gap);
2028
+ let sum = 0;
2029
+ let count = 0;
2030
+ for (const w of widths.value.values()) {
2031
+ sum += w + (count > 0 ? g : 0);
2032
+ count++;
2033
+ }
2034
+ return sum;
2035
+ });
2036
+ return {
2037
+ container,
2038
+ width,
2039
+ capacity: computed(() => {
2040
+ const available = width.value - toValue(reserved);
2041
+ if (width.value === 0) return Infinity;
2042
+ if (available <= 0) return 0;
2043
+ const g = toValue(gap);
2044
+ const uniformWidth = toValue(itemWidth);
2045
+ if (uniformWidth && uniformWidth > 0) {
2046
+ const first = uniformWidth;
2047
+ const subsequent = uniformWidth + g;
2048
+ if (available < first) return 0;
2049
+ return Math.max(1, Math.floor((available - first) / subsequent) + 1);
2050
+ }
2051
+ const entries = [...widths.value.entries()].toSorted((a, b) => a[0] - b[0]);
2052
+ if (toValue(reverse)) entries.reverse();
2053
+ let sum = 0;
2054
+ let count = 0;
2055
+ for (const [, w] of entries) {
2056
+ const next = sum + w + (count > 0 ? g : 0);
2057
+ if (next > available) break;
2058
+ sum = next;
2059
+ count++;
2060
+ }
2061
+ return count;
2062
+ }),
2063
+ total,
2064
+ isOverflowing: toRef(() => {
2065
+ return total.value > width.value - toValue(reserved);
2066
+ }),
2067
+ measure,
2068
+ reset
2069
+ };
2070
+ }
2071
+ /**
2072
+ * Creates an overflow context with dependency injection support.
2073
+ *
2074
+ * @param options Configuration options including namespace
2075
+ * @returns Trinity tuple: [useContext, provideContext, defaultContext]
2076
+ *
2077
+ * @example
2078
+ * ```ts
2079
+ * // Create injectable context
2080
+ * const [useOverflow, provideOverflow, overflow] = createOverflowContext({
2081
+ * namespace: 'my-overflow',
2082
+ * gap: 8,
2083
+ * reserved: 160,
2084
+ * })
2085
+ *
2086
+ * // In parent component
2087
+ * provideOverflow()
2088
+ *
2089
+ * // In child component
2090
+ * const overflow = useOverflow()
2091
+ * ```
2092
+ */
2093
+ function createOverflowContext(_options = {}) {
2094
+ const { namespace = "v0:overflow",...options } = _options;
2095
+ const [useOverflowContext, _provideOverflowContext] = createContext(namespace);
2096
+ const context = createOverflow(options);
2097
+ function provideOverflowContext(_context = context, app) {
2098
+ return _provideOverflowContext(_context, app);
2099
+ }
2100
+ return createTrinity(useOverflowContext, provideOverflowContext, context);
2101
+ }
2102
+ /**
2103
+ * Returns the current overflow context from dependency injection.
2104
+ *
2105
+ * @param namespace The namespace for the overflow context. Defaults to `v0:overflow`.
2106
+ * @returns The current overflow context.
2107
+ *
2108
+ * @example
2109
+ * ```vue
2110
+ * <script lang="ts" setup>
2111
+ * import { useOverflow } from '@vuetify/v0'
2112
+ *
2113
+ * // Inject overflow context provided by parent
2114
+ * const overflow = useOverflow()
2115
+ * <\/script>
2116
+ *
2117
+ * <template>
2118
+ * <div>
2119
+ * <p>Capacity: {{ overflow.capacity.value }}</p>
2120
+ * </div>
2121
+ * </template>
2122
+ * ```
2123
+ */
2124
+ function useOverflow(namespace = "v0:overflow") {
2125
+ return useContext(namespace);
2126
+ }
2127
+
2128
+ //#endregion
2129
+ //#region src/composables/usePagination/index.ts
2130
+ /**
2131
+ * @module usePagination
2132
+ *
2133
+ * @remarks
2134
+ * Lightweight pagination composable for navigating through pages.
2135
+ *
2136
+ * Key features:
2137
+ * - No registry overhead - just a bounded integer
2138
+ * - Direct ref support for v-model compatibility
2139
+ * - Navigation methods: next, prev, first, last
2140
+ * - Computed visible items with ellipsis
2141
+ * - Trinity pattern for dependency injection
2142
+ *
2143
+ * Unlike registry-based composables, pagination tracks a single number
2144
+ * within a range, making it efficient for large page counts.
2145
+ */
2146
+ /**
2147
+ * Creates a pagination instance.
2148
+ *
2149
+ * @param options The options for the pagination instance.
2150
+ * @returns A pagination context with navigation methods.
2151
+ *
2152
+ * @example
2153
+ * ```ts
2154
+ * import { createPagination } from '@vuetify/v0'
2155
+ *
2156
+ * // Basic usage
2157
+ * const pagination = createPagination({ size: 100 })
2158
+ * pagination.next()
2159
+ * pagination.items.value // [{ type: 'page', value: 1 }, { type: 'page', value: 2 }, ...]
2160
+ *
2161
+ * // With v-model (pass a ref)
2162
+ * const page = ref(1)
2163
+ * const pagination = createPagination({ page, size: 100 })
2164
+ * // Mutating pagination.page or the passed ref syncs both
2165
+ * ```
2166
+ */
2167
+ function createPagination(_options = {}) {
2168
+ const { page: _page = 1, itemsPerPage: _itemsPerPage = 10, size: _size = 0, visible: _visible = 7, ellipsis = "..." } = _options;
2169
+ const page = isRef(_page) ? _page : shallowRef(_page);
2170
+ const pages = computed(() => {
2171
+ const size = toValue(_size);
2172
+ const perPage = toValue(_itemsPerPage);
2173
+ if (size <= 0 || /* @__PURE__ */ isNaN(size)) return 0;
2174
+ return Math.ceil(size / perPage);
2175
+ });
2176
+ function first() {
2177
+ page.value = 1;
2178
+ }
2179
+ function last() {
2180
+ page.value = Math.max(1, pages.value);
2181
+ }
2182
+ function next() {
2183
+ if (page.value < pages.value) page.value++;
2184
+ }
2185
+ function prev() {
2186
+ if (page.value > 1) page.value--;
2187
+ }
2188
+ function select(value) {
2189
+ if (value < 1) page.value = 1;
2190
+ else if (value > pages.value) page.value = Math.max(1, pages.value);
2191
+ else page.value = value;
2192
+ }
2193
+ const isFirst = computed(() => page.value <= 1);
2194
+ const isLast = computed(() => page.value >= pages.value);
2195
+ const pageStart = computed(() => (page.value - 1) * toValue(_itemsPerPage));
2196
+ const pageStop = computed(() => Math.min(pageStart.value + toValue(_itemsPerPage), toValue(_size)));
2197
+ function toPage(value) {
2198
+ return {
2199
+ type: "page",
2200
+ value
2201
+ };
2202
+ }
2203
+ function toEllipsis() {
2204
+ return ellipsis === false ? false : {
2205
+ type: "ellipsis",
2206
+ value: ellipsis
2207
+ };
2208
+ }
2209
+ function filter(array) {
2210
+ return array.filter(Boolean);
2211
+ }
2212
+ return {
2213
+ page,
2214
+ ellipsis,
2215
+ items: computed(() => {
2216
+ const pageCount = pages.value;
2217
+ const visible = toValue(_visible);
2218
+ const current = page.value;
2219
+ if (pageCount <= 0 || /* @__PURE__ */ isNaN(pageCount) || pageCount > Number.MAX_SAFE_INTEGER) return [];
2220
+ if (visible <= 0) return [];
2221
+ if (visible <= 2) return [toPage(current)];
2222
+ if (pageCount <= visible) return (/* @__PURE__ */ range(pageCount, 1)).map(toPage);
2223
+ if (visible === 3) {
2224
+ const mid = current <= 1 ? 2 : current >= pageCount ? pageCount - 1 : current;
2225
+ return [
2226
+ toPage(1),
2227
+ toPage(mid),
2228
+ toPage(pageCount)
2229
+ ];
2230
+ }
2231
+ const boundary = visible - 2;
2232
+ const middle = visible - 4;
2233
+ if (middle <= 0) {
2234
+ if (current <= boundary) return filter([
2235
+ ...(/* @__PURE__ */ range(boundary, 1)).map(toPage),
2236
+ toEllipsis(),
2237
+ toPage(pageCount)
2238
+ ]);
2239
+ if (current > pageCount - boundary) return filter([
2240
+ toPage(1),
2241
+ toEllipsis(),
2242
+ ...(/* @__PURE__ */ range(boundary, pageCount - boundary + 1)).map(toPage)
2243
+ ]);
2244
+ return current <= Math.ceil(pageCount / 2) ? filter([
2245
+ toPage(1),
2246
+ toPage(current),
2247
+ toEllipsis(),
2248
+ toPage(pageCount)
2249
+ ]) : filter([
2250
+ toPage(1),
2251
+ toEllipsis(),
2252
+ toPage(current),
2253
+ toPage(pageCount)
2254
+ ]);
2255
+ }
2256
+ const leftThreshold = boundary - 1;
2257
+ const rightThreshold = pageCount - boundary + 2;
2258
+ if (current <= leftThreshold) return filter([
2259
+ ...(/* @__PURE__ */ range(boundary, 1)).map(toPage),
2260
+ toEllipsis(),
2261
+ toPage(pageCount)
2262
+ ]);
2263
+ else if (current >= rightThreshold) return filter([
2264
+ toPage(1),
2265
+ toEllipsis(),
2266
+ ...(/* @__PURE__ */ range(boundary, pageCount - boundary + 1)).map(toPage)
2267
+ ]);
2268
+ else {
2269
+ const start = current - Math.floor(middle / 2);
2270
+ return filter([
2271
+ toPage(1),
2272
+ toEllipsis(),
2273
+ ...(/* @__PURE__ */ range(middle, start)).map(toPage),
2274
+ toEllipsis(),
2275
+ toPage(pageCount)
2276
+ ]);
2277
+ }
2278
+ }),
2279
+ pageStart,
2280
+ pageStop,
2281
+ isFirst,
2282
+ isLast,
2283
+ first,
2284
+ last,
2285
+ next,
2286
+ prev,
2287
+ select,
2288
+ get itemsPerPage() {
2289
+ return toValue(_itemsPerPage);
2290
+ },
2291
+ get size() {
2292
+ return toValue(_size);
2293
+ },
2294
+ get pages() {
2295
+ return pages.value;
2296
+ }
2297
+ };
2298
+ }
2299
+ /**
2300
+ * Creates a pagination context for dependency injection.
2301
+ *
2302
+ * @param options The options including namespace.
2303
+ * @returns A trinity: [usePagination, providePagination, defaultContext]
2304
+ *
2305
+ * @example
2306
+ * ```ts
2307
+ * // With default namespace 'v0:pagination'
2308
+ * const [usePagination, providePaginationContext] = createPaginationContext({ size: 50 })
2309
+ *
2310
+ * // Or with custom namespace
2311
+ * const [usePagination, providePaginationContext] = createPaginationContext({
2312
+ * namespace: 'my-pagination',
2313
+ * size: 50,
2314
+ * })
2315
+ *
2316
+ * // Parent component
2317
+ * providePaginationContext()
2318
+ *
2319
+ * // Child component
2320
+ * const pagination = usePagination()
2321
+ * pagination.next()
2322
+ * ```
2323
+ */
2324
+ function createPaginationContext(_options = {}) {
2325
+ const { namespace = "v0:pagination",...options } = _options;
2326
+ const [usePaginationContext, _providePaginationContext] = createContext(namespace);
2327
+ const context = createPagination(options);
2328
+ function providePaginationContext(_context = context, app) {
2329
+ return _providePaginationContext(_context, app);
2330
+ }
2331
+ return createTrinity(usePaginationContext, providePaginationContext, context);
2332
+ }
2333
+ /**
2334
+ * Returns the current pagination instance from context.
2335
+ *
2336
+ * @param namespace The namespace. @default 'v0:pagination'
2337
+ * @returns The pagination context.
2338
+ *
2339
+ * @example
2340
+ * ```vue
2341
+ * <script setup>
2342
+ * import { usePagination } from '@vuetify/v0'
2343
+ *
2344
+ * const pagination = usePagination()
2345
+ * <\/script>
2346
+ *
2347
+ * <template>
2348
+ * <button @click="pagination.prev()" :disabled="pagination.isFirst.value">Prev</button>
2349
+ * <button @click="pagination.next()" :disabled="pagination.isLast.value">Next</button>
2350
+ * </template>
2351
+ * ```
2352
+ */
2353
+ function usePagination(namespace = "v0:pagination") {
2354
+ return useContext(namespace);
2355
+ }
2356
+
2357
+ //#endregion
2358
+ //#region src/composables/useSingle/index.ts
2359
+ /**
2360
+ * @module useSingle
2361
+ *
2362
+ * @remarks
2363
+ * Single-selection composable that extends useSelection to enforce only one selected item.
2364
+ *
2365
+ * Key features:
2366
+ * - Auto-clears previous selection when selecting new item
2367
+ * - Singular computed properties (selectedId, selectedItem, selectedIndex, selectedValue)
2368
+ * - Perfect for tabs, radio buttons, theme selectors
2369
+ *
2370
+ * Inheritance chain: useRegistry → useSelection → useSingle
2371
+ */
2372
+ /**
2373
+ * Creates a new single selection instance that enforces only one selected item at a time.
2374
+ *
2375
+ * Extends `createSelection` by automatically clearing previous selections when a new item is selected.
2376
+ * Adds computed singular properties: `selectedId`, `selectedItem`, `selectedIndex`, `selectedValue`.
2377
+ *
2378
+ * @param options The options for the single selection instance.
2379
+ * @template Z The type of the single selection ticket.
2380
+ * @template E The type of the single selection context.
2381
+ * @returns A new single selection instance with single-selection enforcement.
2382
+ *
2383
+ * @remarks
2384
+ * **Key Differences from `createSelection`:**
2385
+ * - Automatically clears `selectedIds` before selecting a new item (enforces single selection)
2386
+ * - Provides singular computed properties instead of plural sets
2387
+ * - Perfect for tabs, radio buttons, theme selectors, and other single-choice UI components
2388
+ *
2389
+ * **Computed Properties:**
2390
+ * - `selectedId`: The ID of the selected item (undefined if none selected)
2391
+ * - `selectedItem`: The selected ticket object (undefined if none selected)
2392
+ * - `selectedIndex`: The index of the selected item (-1 if none selected)
2393
+ * - `selectedValue`: The value of the selected item (undefined if none selected)
2394
+ *
2395
+ * **Inheritance Chain:**
2396
+ * `useRegistry` → `createSelection` → `createSingle` → `createStep`
2397
+ *
2398
+ * @see https://0.vuetifyjs.com/composables/selection/use-single
2399
+ *
2400
+ * @example
2401
+ * ```ts
2402
+ * import { createSingle } from '@vuetify/v0'
2403
+ *
2404
+ * const tabs = createSingle({ mandatory: true })
2405
+ *
2406
+ * tabs.onboard([
2407
+ * { id: 'home', value: 'Home' },
2408
+ * { id: 'about', value: 'About' },
2409
+ * { id: 'contact', value: 'Contact' },
2410
+ * ])
2411
+ *
2412
+ * tabs.first() // Select first tab
2413
+ *
2414
+ * console.log(tabs.selectedId.value) // 'home'
2415
+ * console.log(tabs.selectedIndex.value) // 0
2416
+ *
2417
+ * tabs.select('about') // Switch to about tab
2418
+ * console.log(tabs.selectedId.value) // 'about'
2419
+ * console.log(tabs.selectedIds.size) // 1 (always enforces single selection)
2420
+ * ```
2421
+ */
2422
+ function createSingle(_options = {}) {
2423
+ const { mandatory = false, multiple = false,...options } = _options;
2424
+ const registry = createSelection({
2425
+ ...options,
2426
+ mandatory,
2427
+ multiple
2428
+ });
2429
+ const selectedId = computed(() => registry.selectedIds.values().next().value);
2430
+ const selectedItem = computed(() => registry.selectedItems.value.values().next().value);
2431
+ const selectedIndex = computed(() => selectedItem.value?.index ?? -1);
2432
+ const selectedValue = computed(() => selectedItem.value?.value);
2433
+ function unselect(id) {
2434
+ if (mandatory && registry.selectedIds.size === 1) return;
2435
+ registry.selectedIds.delete(id);
2436
+ }
2437
+ function toggle(id) {
2438
+ if (registry.selectedIds.has(id)) unselect(id);
2439
+ else registry.select(id);
2440
+ }
2441
+ return {
2442
+ ...registry,
2443
+ selectedId,
2444
+ selectedItem,
2445
+ selectedIndex,
2446
+ selectedValue,
2447
+ unselect,
2448
+ toggle,
2449
+ get size() {
2450
+ return registry.size;
2451
+ }
2452
+ };
2453
+ }
2454
+ /**
2455
+ * Creates a new single selection context.
2456
+ *
2457
+ * @param options The options for the single selection context.
2458
+ * @template Z The type of the single selection ticket.
2459
+ * @template E The type of the single selection context.
2460
+ * @returns A new single selection context.
2461
+ *
2462
+ * @see https://0.vuetifyjs.com/composables/selection/use-single
2463
+ *
2464
+ * @example
2465
+ * ```ts
2466
+ * import { createSingleContext } from '@vuetify/v0'
2467
+ *
2468
+ * // With default namespace 'v0:single'
2469
+ * export const [useSingle, provideSingle, context] = createSingleContext()
2470
+ *
2471
+ * // In a parent component:
2472
+ * provideSingle()
2473
+ *
2474
+ * // In a child component:
2475
+ * const single = useSingle()
2476
+ * single.select('tab-1')
2477
+ * ```
2478
+ */
2479
+ function createSingleContext(_options = {}) {
2480
+ const { namespace = "v0:single",...options } = _options;
2481
+ const [useSingleContext, _provideSingleContext] = createContext(namespace);
2482
+ const context = createSingle(options);
2483
+ function provideSingleContext(_context = context, app) {
2484
+ return _provideSingleContext(_context, app);
2485
+ }
2486
+ return createTrinity(useSingleContext, provideSingleContext, context);
2487
+ }
2488
+ /**
2489
+ * Returns the current single selection instance.
2490
+ *
2491
+ * @param namespace The namespace for the single selection context. Defaults to `'v0:single'`.
2492
+ * @returns The current single selection instance.
2493
+ *
2494
+ * @see https://0.vuetifyjs.com/composables/selection/use-single
2495
+ *
2496
+ * @example
2497
+ * ```vue
2498
+ * <script setup lang="ts">
2499
+ * import { useSingle } from '@vuetify/v0'
2500
+ *
2501
+ * const tabs = useSingle()
2502
+ * <\/script>
2503
+ *
2504
+ * <template>
2505
+ * <div>
2506
+ * <p>Selected: {{ tabs.selectedId }}</p>
2507
+ * </div>
2508
+ * </template>
2509
+ * ```
2510
+ */
2511
+ function useSingle(namespace = "v0:single") {
2512
+ return useContext(namespace);
2513
+ }
2514
+
2515
+ //#endregion
2516
+ //#region src/composables/useTokens/index.ts
2517
+ /**
2518
+ * @module useTokens
2519
+ *
2520
+ * @see https://0.vuetifyjs.com/composables/registration/use-tokens
2521
+ *
2522
+ * @remarks
2523
+ * Design token registry with alias resolution and W3C Design Tokens format support.
2524
+ *
2525
+ * Key features:
2526
+ * - Alias resolution with circular reference detection
2527
+ * - Nested token flattening with dot notation
2528
+ * - W3C Design Tokens format ($value, $type, $description, $extensions)
2529
+ * - Path-based resolution (e.g., {colors}.blue.500)
2530
+ * - Resolution caching for performance (~28,590 ops/sec)
2531
+ *
2532
+ * Used by useTheme, useLocale, and useFeatures for token-based configuration.
2533
+ */
2534
+ /**
2535
+ * Creates a new token instance.
2536
+ *
2537
+ * @param tokens The tokens to use.
2538
+ * @param options The options for the token instance.
2539
+ * @template Z The type of the token ticket.
2540
+ * @template E The type of the token context.
2541
+ * @returns A new token instance.
2542
+ *
2543
+ * @see https://www.designtokens.org/tr/drafts/format/
2544
+ * @see https://0.vuetifyjs.com/composables/registration/use-tokens
2545
+ *
2546
+ * @example
2547
+ * ```ts
2548
+ * import { useTokens } from '@vuetify/v0'
2549
+ *
2550
+ * const tokens = useTokens({
2551
+ * colors: {
2552
+ * primary: '#3b82f6',
2553
+ * secondary: '{colors.primary}', // Alias reference
2554
+ * },
2555
+ * })
2556
+ *
2557
+ * console.log(tokens.resolve('{colors.primary}')) // '#3b82f6'
2558
+ * console.log(tokens.resolve('{colors.secondary}')) // '#3b82f6'
2559
+ * ```
2560
+ */
2561
+ function createTokens(tokens = {}, options = {}) {
2562
+ const logger = useLogger();
2563
+ const registry = useRegistry(options);
2564
+ const cache = /* @__PURE__ */ new Map();
2565
+ registry.onboard(flatten(tokens, options.prefix, !!options.flat));
2566
+ function isAlias(token) {
2567
+ return /* @__PURE__ */ isString(token) && token.length > 2 && token[0] === "{" && token.at(-1) === "}";
2568
+ }
2569
+ function isTokenAlias(value) {
2570
+ return /* @__PURE__ */ isObject(value) && "$value" in value;
2571
+ }
2572
+ function resolve(token, visited = /* @__PURE__ */ new Set()) {
2573
+ const cacheKey = /* @__PURE__ */ isString(token) ? token : JSON.stringify(token);
2574
+ const cached = cache.get(cacheKey);
2575
+ if (!/* @__PURE__ */ isUndefined(cached)) return cached;
2576
+ const reference = isTokenAlias(token) ? token.$value : token;
2577
+ const isAliasReference = /* @__PURE__ */ isString(reference) && isAlias(reference);
2578
+ const clean = isAliasReference ? reference.slice(1, -1) : String(reference);
2579
+ if (visited.has(clean)) {
2580
+ logger.warn(`Circular alias detected for "${clean}"`);
2581
+ cache.set(cacheKey, void 0);
2582
+ return;
2583
+ }
2584
+ visited.add(clean);
2585
+ let found = registry.get(clean);
2586
+ let segments = [];
2587
+ if (!found && clean.includes(".")) {
2588
+ const parts = clean.split(".");
2589
+ for (let i = parts.length - 1; i > 0; i--) {
2590
+ const prefix = parts.slice(0, i).join(".");
2591
+ const suffix = parts.slice(i);
2592
+ const candidate = registry.get(prefix);
2593
+ if (!/* @__PURE__ */ isUndefined(candidate?.value)) {
2594
+ found = candidate;
2595
+ segments = suffix;
2596
+ break;
2597
+ }
2598
+ }
2599
+ }
2600
+ if (/* @__PURE__ */ isUndefined(found?.value)) {
2601
+ if (isAliasReference) logger.warn(`Alias not found for "${String(reference)}"`);
2602
+ cache.set(cacheKey, void 0);
2603
+ return;
2604
+ }
2605
+ let result;
2606
+ let current = found.value;
2607
+ if (segments.length > 0) {
2608
+ if (isTokenAlias(current)) current = current.$value;
2609
+ for (const segment of segments) {
2610
+ if (!/* @__PURE__ */ isObject(current) || !(segment in current)) {
2611
+ current = void 0;
2612
+ break;
2613
+ }
2614
+ current = current[segment];
2615
+ if (isTokenAlias(current)) current = current.$value;
2616
+ }
2617
+ if (/* @__PURE__ */ isUndefined(current)) {
2618
+ logger.warn(`Path not found inside "${clean}": ${segments.join(".")}`);
2619
+ cache.set(cacheKey, void 0);
2620
+ return;
2621
+ }
2622
+ result = current;
2623
+ } else if (isTokenAlias(current)) {
2624
+ const inner = current.$value;
2625
+ if (/* @__PURE__ */ isString(inner) && isAlias(inner)) return resolve(inner, visited);
2626
+ result = inner;
2627
+ } else if (/* @__PURE__ */ isString(current) && isAlias(current)) return resolve(current, visited);
2628
+ else result = current;
2629
+ cache.set(cacheKey, result);
2630
+ return result;
2631
+ }
2632
+ return {
2633
+ ...registry,
2634
+ resolve,
2635
+ isAlias,
2636
+ get size() {
2637
+ return registry.size;
2638
+ }
2639
+ };
2640
+ }
2641
+ /**
2642
+ * Creates a new token context.
2643
+ *
2644
+ * @param namespace The namespace for the token context.
2645
+ * @param tokens The tokens to use.
2646
+ * @template Z The type of the token ticket.
2647
+ * @template E The type of the token context.
2648
+ * @returns A new token context.
2649
+ *
2650
+ * @see https://0.vuetifyjs.com/composables/registration/use-tokens
2651
+ *
2652
+ * @example
2653
+ * ```ts
2654
+ * import { createTokensContext } from '@vuetify/v0'
2655
+ *
2656
+ * export const [useTokens, provideTokens, context] = createTokensContext({
2657
+ * namespace: 'v0:tokens',
2658
+ * tokens: {
2659
+ * colors: {
2660
+ * primary: '#3b82f6',
2661
+ * secondary: '{colors.primary}', // Alias reference
2662
+ * },
2663
+ * },
2664
+ * })
2665
+ * ```
2666
+ */
2667
+ function createTokensContext(_options) {
2668
+ const { namespace = "v0:tokens", tokens = {},...options } = _options;
2669
+ const [useTokensContext, _provideTokensContext] = createContext(namespace);
2670
+ const context = createTokens(tokens, options);
2671
+ function provideTokensContext(_context = context, app) {
2672
+ return _provideTokensContext(_context, app);
2673
+ }
2674
+ return createTrinity(useTokensContext, provideTokensContext, context);
2675
+ }
2676
+ /**
2677
+ * Returns the current tokens instance.
2678
+ *
2679
+ * @param namespace The namespace for the tokens context. Defaults to `'v0:tokens'`.
2680
+ * @returns The current tokens instance.
2681
+ *
2682
+ * @see https://0.vuetifyjs.com/composables/registration/use-tokens
2683
+ *
2684
+ * @example
2685
+ * ```vue
2686
+ * <script setup lang="ts">
2687
+ * import { useTokens } from '@vuetify/v0'
2688
+ *
2689
+ * const tokens = useTokens()
2690
+ * <\/script>
2691
+ * ```
2692
+ */
2693
+ function useTokens(namespace = "v0:tokens") {
2694
+ return useContext(namespace);
2695
+ }
2696
+ /**
2697
+ * Flattens a nested collection of tokens into a flat array of tokens.
2698
+ * Each token is represented by an object containing its ID & value.
2699
+ * @param tokens The collection of tokens to flatten.
2700
+ * @param prefix An optional prefix to prepend to each token ID.
2701
+ * @returns An array of flattened tokens, each with an ID and value.
2702
+ */
2703
+ function flatten(tokens, prefix = "", flat = false) {
2704
+ const flattened = [];
2705
+ const stack = [{
2706
+ tokens,
2707
+ prefix,
2708
+ flat
2709
+ }];
2710
+ while (stack.length > 0) {
2711
+ const { tokens: currentTokens, prefix: currentPrefix, flat: flat$1 } = stack.pop();
2712
+ const meta = {};
2713
+ for (const k in currentTokens) if (k.startsWith("$")) meta[k] = currentTokens[k];
2714
+ if (Object.keys(meta).length > 0 && currentPrefix) flattened.push({
2715
+ id: currentPrefix,
2716
+ value: meta
2717
+ });
2718
+ for (const key in currentTokens) {
2719
+ if (key.startsWith("$")) continue;
2720
+ const value = currentTokens[key];
2721
+ const id = currentPrefix ? `${currentPrefix}.${key}` : key;
2722
+ if (!/* @__PURE__ */ isObject(value)) {
2723
+ flattened.push({
2724
+ id,
2725
+ value
2726
+ });
2727
+ continue;
2728
+ }
2729
+ if ("$value" in value) {
2730
+ flattened.push({
2731
+ id,
2732
+ value
2733
+ });
2734
+ const inner = value.$value;
2735
+ if (/* @__PURE__ */ isObject(inner) && !flat$1) for (const innerKey in inner) {
2736
+ if (innerKey.startsWith("$")) continue;
2737
+ const child = inner[innerKey];
2738
+ const childId = `${id}.${innerKey}`;
2739
+ if (!/* @__PURE__ */ isObject(child)) flattened.push({
2740
+ id: childId,
2741
+ value: child
2742
+ });
2743
+ else if ("$value" in child) flattened.push({
2744
+ id: childId,
2745
+ value: child
2746
+ });
2747
+ else stack.push({
2748
+ tokens: child,
2749
+ prefix: childId,
2750
+ flat: flat$1
2751
+ });
2752
+ }
2753
+ continue;
2754
+ }
2755
+ if (flat$1) {
2756
+ flattened.push({
2757
+ id,
2758
+ value
2759
+ });
2760
+ continue;
2761
+ }
2762
+ stack.push({
2763
+ tokens: value,
2764
+ prefix: id,
2765
+ flat: flat$1
2766
+ });
2767
+ }
2768
+ }
2769
+ return flattened;
2770
+ }
2771
+
2772
+ //#endregion
2773
+ //#region src/composables/useLocale/adapters/v0.ts
2774
+ /**
2775
+ * Vuetify0.x locale adapter implementation
2776
+ *
2777
+ * This adapter provides translation and number formatting
2778
+ * capabilities using the Intl API and supports both
2779
+ * numbered ({0}, {1}) and named ({name}) variables in translation strings.
2780
+ */
2781
+ var Vuetify0LocaleAdapter = class {
2782
+ t(message, ...params) {
2783
+ let resolvedMessage = message;
2784
+ if (params.length > 0 && /* @__PURE__ */ isObject(params[0])) {
2785
+ const variables = params[0];
2786
+ resolvedMessage = resolvedMessage.replace(/{([a-zA-Z][a-zA-Z0-9_]*)}/g, (match, name) => {
2787
+ return /* @__PURE__ */ isUndefined(variables[name]) ? match : String(variables[name]);
2788
+ });
2789
+ params = params.slice(1);
2790
+ }
2791
+ resolvedMessage = resolvedMessage.replace(/\{(\d+)\}/g, (match, index) => {
2792
+ const idx = Number.parseInt(index, 10);
2793
+ if (!/* @__PURE__ */ isUndefined(params[idx])) return String(params[idx]);
2794
+ return match;
2795
+ });
2796
+ return resolvedMessage;
2797
+ }
2798
+ n(value, locale, ...params) {
2799
+ if (!IN_BROWSER || !locale) return value.toString();
2800
+ const options = params[0];
2801
+ return new Intl.NumberFormat(String(locale), options).format(value);
2802
+ }
2803
+ };
2804
+
2805
+ //#endregion
2806
+ //#region src/composables/useLocale/index.ts
2807
+ /**
2808
+ * @module useLocale
2809
+ *
2810
+ * @remarks
2811
+ * Internationalization (i18n) composable with adapter pattern for message translation.
2812
+ *
2813
+ * Key features:
2814
+ * - Locale selection with createSingle
2815
+ * - Token-based message storage with useTokens
2816
+ * - Numbered and named placeholder support ({0}, {name})
2817
+ * - Number formatting with Intl.NumberFormat
2818
+ * - Adapter pattern for integration with i18n providers
2819
+ *
2820
+ * Integrates with createSingle for locale selection and useTokens for message resolution.
2821
+ */
2822
+ /**
2823
+ * Creates a new locale instance.
2824
+ *
2825
+ * @param options The options for the locale instance.
2826
+ * @template Z The type of the locale ticket.
2827
+ * @template E The type of the locale context.
2828
+ * @returns A new locale instance.
2829
+ *
2830
+ * @see https://0.vuetifyjs.com/composables/plugins/use-locale
2831
+ */
2832
+ function createLocale(_options = {}) {
2833
+ const { adapter = new Vuetify0LocaleAdapter(), messages = {},...options } = _options;
2834
+ const tokens = createTokens(messages);
2835
+ const registry = createSingle(options);
2836
+ for (const id in messages) {
2837
+ registry.register({ id });
2838
+ if (id === options.default && !registry.selectedId.value) registry.select(id);
2839
+ }
2840
+ function t(key, params, fallback) {
2841
+ const locale = registry.selectedId.value;
2842
+ const args = toArray(params);
2843
+ if (!locale) return adapter.t(fallback ?? key, ...args);
2844
+ const path = `${locale}.${key}`;
2845
+ const message = tokens.get(path)?.value;
2846
+ const template = /* @__PURE__ */ isString(message) ? resolve(locale, message) : fallback ?? key;
2847
+ return adapter.t(template, ...args);
2848
+ }
2849
+ function n(value, ...params) {
2850
+ return adapter.n(value, registry.selectedId.value, ...params);
2851
+ }
2852
+ function resolve(locale, str) {
2853
+ return str.replace(/{([a-zA-Z0-9.-_]+)}/g, (match, key) => {
2854
+ const [prefix, ...rest] = key.split(".");
2855
+ const target = registry.has(prefix) ? prefix : locale;
2856
+ const path = `${target}.${registry.has(prefix) ? rest.join(".") : key}`;
2857
+ const resolved = tokens.get(path)?.value;
2858
+ if (/* @__PURE__ */ isString(resolved)) return resolve(target, resolved);
2859
+ return match;
2860
+ });
2861
+ }
2862
+ return {
2863
+ ...registry,
2864
+ t,
2865
+ n,
2866
+ get size() {
2867
+ return registry.size;
2868
+ }
2869
+ };
2870
+ }
2871
+ function createLocaleFallback() {
2872
+ return {
2873
+ size: 0,
2874
+ t: (key, _params, fallback) => fallback ?? key,
2875
+ n: String
2876
+ };
2877
+ }
2878
+ /**
2879
+ * Creates a new locale context.
2880
+ *
2881
+ * @param options The options for the locale context.
2882
+ * @template Z The type of the locale ticket.
2883
+ * @template E The type of the locale context.
2884
+ * @returns A new locale context.
2885
+ *
2886
+ * @see https://0.vuetifyjs.com/composables/plugins/use-locale
2887
+ *
2888
+ * @example
2889
+ * ```ts
2890
+ * import { createLocaleContext } from '@vuetify/v0'
2891
+ *
2892
+ * export const [useAppLocale, provideAppLocale, appLocale] = createLocaleContext({
2893
+ * namespace: 'app:locale',
2894
+ * messages: {
2895
+ * en: { hello: 'Hello' },
2896
+ * es: { hello: 'Hola' },
2897
+ * },
2898
+ * })
2899
+ *
2900
+ * // In a parent component:
2901
+ * provideAppLocale()
2902
+ *
2903
+ * // In a child component:
2904
+ * const locale = useAppLocale()
2905
+ * locale.select('es')
2906
+ * ```
2907
+ */
2908
+ function createLocaleContext(_options = {}) {
2909
+ const { namespace = "v0:locale",...options } = _options;
2910
+ const [useLocaleContext, _provideLocaleContext] = createContext(namespace);
2911
+ const context = createLocale(options);
2912
+ function provideLocaleContext(_context = context, app) {
2913
+ return _provideLocaleContext(_context, app);
2914
+ }
2915
+ return createTrinity(useLocaleContext, provideLocaleContext, context);
2916
+ }
2917
+ /**
2918
+ * Creates a new locale plugin.
2919
+ *
2920
+ * @param options The options for the locale plugin.
2921
+ * @template Z The type of the locale ticket.
2922
+ * @template E The type of the locale context.
2923
+ * @template R The type of the token ticket.
2924
+ * @template O The type of the token context.
2925
+ * @returns A new locale plugin.
2926
+ *
2927
+ * @see https://0.vuetifyjs.com/composables/plugins/use-locale
2928
+ */
2929
+ function createLocalePlugin(_options = {}) {
2930
+ const { namespace = "v0:locale", adapter = new Vuetify0LocaleAdapter(), messages = {},...options } = _options;
2931
+ const [, provideLocaleContext, context] = createLocaleContext({
2932
+ ...options,
2933
+ namespace,
2934
+ adapter,
2935
+ messages
2936
+ });
2937
+ return createPlugin({
2938
+ namespace,
2939
+ provide: (app) => {
2940
+ provideLocaleContext(context, app);
2941
+ }
2942
+ });
2943
+ }
2944
+ /**
2945
+ * Returns the current locale instance.
2946
+ *
2947
+ * @returns The current locale instance.
2948
+ *
2949
+ * @see https://0.vuetifyjs.com/composables/plugins/use-locale
2950
+ */
2951
+ function useLocale(namespace = "v0:locale") {
2952
+ const fallback = createLocaleFallback();
2953
+ if (!getCurrentInstance()) return fallback;
2954
+ try {
2955
+ return useContext(namespace, fallback);
2956
+ } catch {
2957
+ return fallback;
2958
+ }
2959
+ }
2960
+
2961
+ //#endregion
2962
+ //#region src/composables/useStep/index.ts
2963
+ /**
2964
+ * @module useStep
2965
+ *
2966
+ * @remarks
2967
+ * Navigation composable that extends useSingle with first/last/next/prev/step methods.
2968
+ *
2969
+ * Key features:
2970
+ * - Configurable circular or bounded navigation
2971
+ * - Automatic disabled item skipping
2972
+ * - Arbitrary step counts (positive/negative)
2973
+ * - Perfect for wizards, carousels, pagination, onboarding flows
2974
+ *
2975
+ * Inheritance chain: useRegistry → useSelection → useSingle → useStep
2976
+ */
2977
+ /**
2978
+ * Creates a new step instance with navigation through items.
2979
+ *
2980
+ * Extends `createSingle` with `first()`, `last()`, `next()`, `prev()`, and `step(count)` methods
2981
+ * for sequential navigation. Supports both circular (wrapping) and bounded (stopping at edges) modes.
2982
+ *
2983
+ * @param options The options for the step instance.
2984
+ * @template Z The type of the step ticket.
2985
+ * @template E The type of the step context.
2986
+ * @returns A new step instance with navigation methods.
2987
+ *
2988
+ * @remarks
2989
+ * **Key Features:**
2990
+ * - **Configurable Navigation**: `circular: true` for wrapping, `false` for bounded (default: false)
2991
+ * - **Disabled Item Skipping**: Automatically skips disabled items during navigation
2992
+ * - **Bidirectional**: Forward (`next`, positive `step`) and backward (`prev`, negative `step`)
2993
+ * - **Safe Edge Cases**: Handles empty registries and all-disabled scenarios gracefully
2994
+ *
2995
+ * **Navigation Methods:**
2996
+ * - `first()`: Select first non-disabled item
2997
+ * - `last()`: Select last non-disabled item
2998
+ * - `next()`: Move to next item (wraps if circular, stops at end if bounded)
2999
+ * - `prev()`: Move to previous item (wraps if circular, stops at start if bounded)
3000
+ * - `step(count)`: Move by `count` positions (negative for backward)
3001
+ *
3002
+ * **Circular Mode (`circular: true`):**
3003
+ * - Uses modulo arithmetic for wrapping: `((index % length) + length) % length`
3004
+ * - Works correctly with negative indexes and large step counts
3005
+ * - Perfect for carousels, theme switchers, infinite scrolling
3006
+ *
3007
+ * **Bounded Mode (`circular: false`, default):**
3008
+ * - Navigation stops at boundaries (no wrapping)
3009
+ * - `next()` on last item does nothing
3010
+ * - `prev()` on first item does nothing
3011
+ * - Perfect for pagination, wizards with explicit completion, forms
3012
+ *
3013
+ * **Inheritance Chain:**
3014
+ * `useRegistry` → `createSelection` → `createSingle` → `createStep`
3015
+ *
3016
+ * @see https://0.vuetifyjs.com/composables/selection/use-step
3017
+ *
3018
+ * @example
3019
+ * ```ts
3020
+ * import { createStep } from '@vuetify/v0'
3021
+ *
3022
+ * // Bounded navigation (default) - for pagination
3023
+ * const pagination = createStep({ circular: false })
3024
+ * pagination.onboard([
3025
+ * { id: 'page-1', value: 1 },
3026
+ * { id: 'page-2', value: 2 },
3027
+ * { id: 'page-3', value: 3 },
3028
+ * ])
3029
+ * pagination.first() // Select page 1
3030
+ * pagination.prev() // Does nothing (already at first)
3031
+ * pagination.next() // Select page 2
3032
+ *
3033
+ * // Circular navigation - for carousels
3034
+ * const carousel = createStep({ circular: true })
3035
+ * carousel.onboard([
3036
+ * { id: 'slide-1', value: 'First' },
3037
+ * { id: 'slide-2', value: 'Second' },
3038
+ * { id: 'slide-3', value: 'Third' },
3039
+ * ])
3040
+ * carousel.first()
3041
+ * carousel.prev() // Wraps to 'slide-3'
3042
+ * carousel.next() // Wraps to 'slide-1'
3043
+ * ```
3044
+ */
3045
+ function createStep(_options = {}) {
3046
+ const { circular = false,...options } = _options;
3047
+ const registry = createSingle(options);
3048
+ function first() {
3049
+ const ticket = registry.seek("first");
3050
+ if (ticket) registry.select(ticket.id);
3051
+ }
3052
+ function last() {
3053
+ const ticket = registry.seek("last");
3054
+ if (ticket) registry.select(ticket.id);
3055
+ }
3056
+ function next() {
3057
+ step(1);
3058
+ }
3059
+ function prev() {
3060
+ step(-1);
3061
+ }
3062
+ function wrapped(length, index) {
3063
+ return (index % length + length) % length;
3064
+ }
3065
+ function step(count = 1) {
3066
+ const length = registry.size;
3067
+ if (!length) return;
3068
+ const currentIndex = registry.selectedIndex.value;
3069
+ const direction = Math.sign(count || 1);
3070
+ let hops = 0;
3071
+ let index = circular ? wrapped(length, currentIndex + count) : currentIndex + count;
3072
+ if (!circular && (index < 0 || index >= length)) return;
3073
+ let id = registry.lookup(index);
3074
+ while (!/* @__PURE__ */ isUndefined(id) && toValue(registry.get(id)?.disabled) && hops < length) {
3075
+ index = circular ? wrapped(length, index + direction) : index + direction;
3076
+ if (!circular && (index < 0 || index >= length)) return;
3077
+ id = registry.lookup(index);
3078
+ hops++;
3079
+ }
3080
+ if (/* @__PURE__ */ isUndefined(id) || hops === length) return;
3081
+ registry.selectedIds.clear();
3082
+ registry.select(id);
3083
+ }
3084
+ return {
3085
+ ...registry,
3086
+ first,
3087
+ last,
3088
+ next,
3089
+ prev,
3090
+ step,
3091
+ get size() {
3092
+ return registry.size;
3093
+ }
3094
+ };
3095
+ }
3096
+ /**
3097
+ * Creates a new step context.
3098
+ *
3099
+ * @param options The options for the step context.
3100
+ * @template Z The type of the step ticket.
3101
+ * @template E The type of the step context.
3102
+ * @returns A new step context.
3103
+ *
3104
+ * @see https://0.vuetifyjs.com/composables/selection/use-step
3105
+ *
3106
+ * @example
3107
+ * ```ts
3108
+ * import { createStepContext } from '@vuetify/v0'
3109
+ *
3110
+ * // With default namespace 'v0:step'
3111
+ * export const [useStep, provideStep, context] = createStepContext()
3112
+ *
3113
+ * // In a parent component:
3114
+ * provideStep()
3115
+ *
3116
+ * // In a child component:
3117
+ * const context = useStep()
3118
+ * context.next() // Progress to next step
3119
+ * ```
3120
+ */
3121
+ function createStepContext(_options = {}) {
3122
+ const { namespace = "v0:step",...options } = _options;
3123
+ const [useStepContext, _provideStepContext] = createContext(namespace);
3124
+ const context = createStep(options);
3125
+ function provideStepContext(_context = context, app) {
3126
+ return _provideStepContext(_context, app);
3127
+ }
3128
+ return createTrinity(useStepContext, provideStepContext, context);
3129
+ }
3130
+ /**
3131
+ * Returns the current step instance.
3132
+ *
3133
+ * @param namespace The namespace for the step context. Defaults to `'v0:step'`.
3134
+ * @returns The current step instance.
3135
+ *
3136
+ * @see https://0.vuetifyjs.com/composables/selection/use-step
3137
+ *
3138
+ * @example
3139
+ * ```vue
3140
+ * <script setup lang="ts">
3141
+ * import { useStep } from '@vuetify/v0'
3142
+ *
3143
+ * const wizard = useStep()
3144
+ * <\/script>
3145
+ *
3146
+ * <template>
3147
+ * <div>
3148
+ * <p>Current step: {{ wizard.selectedIndex }}</p>
3149
+ * <button @click="wizard.next()">Next</button>
3150
+ * </div>
3151
+ * </template>
3152
+ * ```
3153
+ */
3154
+ function useStep(namespace = "v0:step") {
3155
+ return useContext(namespace);
3156
+ }
3157
+
3158
+ //#endregion
3159
+ export { createGroupContext as A, createLogger as B, useResizeObserver as C, createHydrationPlugin as D, createHydrationContext as E, createSelection as F, PinoLoggerAdapter as G, createLoggerPlugin as H, createSelectionContext as I, createTrinity as J, ConsolaLoggerAdapter as K, useSelection as L, useProxyRegistry as M, useProxyModel as N, useHydration as O, toArray as P, createRegistryContext as R, useElementSize as S, createHydration as T, useLogger as U, createLoggerContext as V, Vuetify0LoggerAdapter as W, provideContext as X, createContext as Y, useContext as Z, createPaginationContext as _, createLocaleContext as a, createOverflowContext as b, useLocale as c, createTokensContext as d, useTokens as f, createPagination as g, useSingle as h, createLocale as i, useGroup as j, createGroup as k, Vuetify0LocaleAdapter as l, createSingleContext as m, createStepContext as n, createLocaleFallback as o, createSingle as p, createPlugin as q, useStep as r, createLocalePlugin as s, createStep as t, createTokens as u, usePagination as v, createFallbackHydration as w, useOverflow as x, createOverflow as y, useRegistry as z };