@vuetify/v0 1.0.0-alpha.3 → 1.0.0-alpha.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (171) hide show
  1. package/README.md +5 -0
  2. package/dist/adapter-B6IrPwib.d.mts +98 -0
  3. package/dist/adapter-BEJXp-ie.d.mts +11 -0
  4. package/dist/adapter-BFSJsyv7.mjs +481 -0
  5. package/dist/{adapter-DlX3FA3A.d.mts → adapter-BO75n0Cn.d.mts} +10 -14
  6. package/dist/adapter-BSKx9WQ7.mjs +4 -0
  7. package/dist/adapter-Chznb9Ju.mjs +4 -0
  8. package/dist/{index-CT5SCLzW.d.mts → adapter-CspReV3g.d.mts} +6 -9
  9. package/dist/adapter-D8zizQVP.mjs +4 -0
  10. package/dist/adapter-DDJHLC8K.d.mts +17 -0
  11. package/dist/adapters-4t-NhR11.mjs +5 -0
  12. package/dist/adapters-BcoA0zCS.mjs +4 -0
  13. package/dist/adapters-BjaPK635.mjs +2 -0
  14. package/dist/adapters-D64TORDu.mjs +2 -0
  15. package/dist/adapters-DvG-9z9q.mjs +3 -0
  16. package/dist/browser/index.js +2074 -561
  17. package/dist/components/index.d.mts +2 -2
  18. package/dist/components/index.mjs +1 -1
  19. package/dist/{components-C4jI-78d.mjs → components-Dn4Kbi0i.mjs} +149 -101
  20. package/dist/composables/index.d.mts +20 -19
  21. package/dist/composables/index.mjs +31 -29
  22. package/dist/{consola-BdgyPEfx.d.mts → consola-CUNHyu8J.d.mts} +2 -2
  23. package/dist/{consola-Ceox8BWi.mjs → consola-DYvbPNbF.mjs} +3 -1
  24. package/dist/constants/index.d.mts +1 -1
  25. package/dist/constants/index.mjs +2 -2
  26. package/dist/{createDataTable-iODP6aKB.mjs → createDataTable-H-PuVigU.mjs} +216 -124
  27. package/dist/{createGroup-CGk6hY_Y.mjs → createGroup-aHt_kvtU.mjs} +3 -3
  28. package/dist/{createRegistry-BXzdXAjq.mjs → createRegistry-CWpvSbCe.mjs} +78 -41
  29. package/dist/{createSelection-B3HJEPNg.mjs → createSelection-MRyUZyW2.mjs} +3 -3
  30. package/dist/{createSingle-Dql8mRi-.mjs → createSingle-BSciC9EJ.mjs} +1 -1
  31. package/dist/{createTokens-DgFYsOrv.mjs → createTokens-CQ9C7GTV.mjs} +2 -2
  32. package/dist/data-table/adapters/client/index.d.mts +2 -2
  33. package/dist/data-table/adapters/client/index.mjs +2 -2
  34. package/dist/data-table/adapters/index.d.mts +5 -5
  35. package/dist/data-table/adapters/index.mjs +6 -6
  36. package/dist/data-table/adapters/server/index.d.mts +2 -2
  37. package/dist/data-table/adapters/server/index.mjs +2 -2
  38. package/dist/data-table/adapters/virtual/index.d.mts +2 -2
  39. package/dist/data-table/adapters/virtual/index.mjs +2 -2
  40. package/dist/data-table/index.d.mts +6 -6
  41. package/dist/data-table/index.mjs +6 -6
  42. package/dist/date/index.d.mts +3 -3
  43. package/dist/date/index.mjs +12 -5
  44. package/dist/features/adapters/flagsmith/index.d.mts +2 -2
  45. package/dist/features/adapters/flagsmith/index.mjs +2 -2
  46. package/dist/features/adapters/launchdarkly/index.d.mts +2 -2
  47. package/dist/features/adapters/launchdarkly/index.mjs +2 -2
  48. package/dist/features/adapters/posthog/index.d.mts +2 -2
  49. package/dist/features/adapters/posthog/index.mjs +2 -2
  50. package/dist/features/index.d.mts +3 -3
  51. package/dist/features/index.mjs +2 -1
  52. package/dist/{index-BzFHTW59.d.mts → flagsmith-Cd44vxff.d.mts} +4 -4
  53. package/dist/{flagsmith-Dbh1h8WF.mjs → flagsmith-Cu93hUIF.mjs} +6 -4
  54. package/dist/{globals-zEjWBKCr.mjs → globals-BRdxsC2M.mjs} +1 -1
  55. package/dist/{index-GOpjKzaJ.d.mts → index-BLaKZq0Y.d.mts} +25 -2
  56. package/dist/{index-BJGcVy7e.d.mts → index-BmEu85PI.d.mts} +126 -65
  57. package/dist/{index-DE3bWw11.d.mts → index-C0ewabdY.d.mts} +93 -215
  58. package/dist/index-C6NnIuDv.d.mts +4 -0
  59. package/dist/{index-DNDuacmH.d.mts → index-CJdG9yY1.d.mts} +116 -106
  60. package/dist/index-C_t6t0Z-.d.mts +170 -0
  61. package/dist/{index-B76iGRE3.d.mts → index-CyUCELZC.d.mts} +1149 -61
  62. package/dist/index.d.mts +24 -23
  63. package/dist/index.mjs +35 -33
  64. package/dist/json/attributes.json +1 -1
  65. package/dist/json/web-types.json +2 -2
  66. package/dist/{launchdarkly-BKtW-idu.mjs → launchdarkly-CLGtJCsI.mjs} +6 -4
  67. package/dist/launchdarkly-De701hkf.d.mts +13 -0
  68. package/dist/locale/adapters/index.d.mts +3 -3
  69. package/dist/locale/adapters/index.mjs +4 -3
  70. package/dist/locale/adapters/v0/index.d.mts +2 -2
  71. package/dist/locale/adapters/v0/index.mjs +2 -2
  72. package/dist/locale/adapters/vue-i18n/index.d.mts +3 -3
  73. package/dist/locale/adapters/vue-i18n/index.mjs +4 -2
  74. package/dist/locale/index.d.mts +4 -4
  75. package/dist/locale/index.mjs +4 -3
  76. package/dist/logger/adapters/consola/index.d.mts +1 -1
  77. package/dist/logger/adapters/consola/index.mjs +1 -1
  78. package/dist/logger/adapters/index.d.mts +5 -5
  79. package/dist/logger/adapters/index.mjs +6 -5
  80. package/dist/logger/adapters/pino/index.d.mts +1 -1
  81. package/dist/logger/adapters/pino/index.mjs +1 -1
  82. package/dist/logger/adapters/v0/index.d.mts +2 -2
  83. package/dist/logger/adapters/v0/index.mjs +2 -2
  84. package/dist/logger/index.d.mts +6 -6
  85. package/dist/logger/index.mjs +6 -5
  86. package/dist/{memory-oYBvtkgx.mjs → memory-BMpJcQjQ.mjs} +13 -3
  87. package/dist/{memory-CeSQE-QV.d.mts → memory-D-JbdKXg.d.mts} +9 -9
  88. package/dist/notifications/index.d.mts +30 -4
  89. package/dist/notifications/index.mjs +187 -126
  90. package/dist/palettes/ant/index.d.mts +1 -1
  91. package/dist/palettes/index.d.mts +3 -3
  92. package/dist/palettes/leonardo/generate/index.mjs +3 -0
  93. package/dist/palettes/material/index.d.mts +1 -1
  94. package/dist/palettes/md1/index.d.mts +1 -1
  95. package/dist/palettes/md2/index.d.mts +1 -1
  96. package/dist/palettes/radix/index.d.mts +1 -1
  97. package/dist/palettes/tailwind/index.d.mts +1 -1
  98. package/dist/permissions/adapters/index.d.mts +2 -2
  99. package/dist/permissions/adapters/index.mjs +3 -3
  100. package/dist/permissions/adapters/v0/index.d.mts +2 -2
  101. package/dist/permissions/adapters/v0/index.mjs +2 -2
  102. package/dist/permissions/index.d.mts +2 -2
  103. package/dist/permissions/index.mjs +3 -3
  104. package/dist/{pino-DNfCEb0p.d.mts → pino-BaYY_KIN.d.mts} +2 -2
  105. package/dist/{pino-9L79n6y6.mjs → pino-CIcYlW3u.mjs} +3 -1
  106. package/dist/{posthog-DmuyycaR.mjs → posthog-0umvvA48.mjs} +7 -5
  107. package/dist/posthog-CIrmvke4.d.mts +13 -0
  108. package/dist/rules/index.d.mts +1 -1
  109. package/dist/rules/index.mjs +1 -1
  110. package/dist/{server-3ilWFwqe.d.mts → server-7vjHxjNc.d.mts} +5 -5
  111. package/dist/{server-y7zLSCSx.mjs → server-BNSiVoMe.mjs} +4 -3
  112. package/dist/storage/adapters/index.d.mts +3 -3
  113. package/dist/storage/adapters/index.mjs +2 -2
  114. package/dist/storage/adapters/memory/index.d.mts +2 -2
  115. package/dist/storage/adapters/memory/index.mjs +2 -2
  116. package/dist/storage/index.d.mts +4 -4
  117. package/dist/storage/index.mjs +3 -3
  118. package/dist/theme/adapters/index.d.mts +2 -2
  119. package/dist/theme/adapters/index.mjs +4 -4
  120. package/dist/theme/adapters/unhead/index.d.mts +1 -1
  121. package/dist/theme/adapters/unhead/index.mjs +1 -1
  122. package/dist/theme/adapters/v0/index.d.mts +1 -1
  123. package/dist/theme/adapters/v0/index.mjs +1 -1
  124. package/dist/theme/index.d.mts +1 -1
  125. package/dist/theme/index.mjs +3 -3
  126. package/dist/types/index.d.mts +1 -1
  127. package/dist/{unhead-B-I2OS6i.mjs → unhead-_cXZcx0j.mjs} +2 -2
  128. package/dist/{useClickOutside-CY4U2J9W.mjs → useClickOutside-DbOLg1uw.mjs} +1483 -182
  129. package/dist/{useFeatures-BPOke6iP.mjs → useFeatures-Dhnr-Lg2.mjs} +7 -10
  130. package/dist/{useLocale-BV8e3imF.mjs → useLocale-Sh-2sNiG.mjs} +6 -6
  131. package/dist/{useLogger-DvdRTrqC.mjs → useLogger-1_ZeBY12.mjs} +5 -5
  132. package/dist/{useNotifications-vSJE6z6t.mjs → useNotifications-CAVQ7hK6.mjs} +6 -6
  133. package/dist/{usePermissions-D3zPwKQc.mjs → usePermissions-D9Oituwy.mjs} +6 -6
  134. package/dist/{useRules-BT6cgoTj.mjs → useRules-DK4AeNeC.mjs} +4 -3
  135. package/dist/{useTheme-cUZb2A9O.mjs → useTheme-FMDQC81h.mjs} +5 -5
  136. package/dist/utilities/index.d.mts +2 -2
  137. package/dist/utilities/index.mjs +26 -2
  138. package/dist/{v0-CHZpnMeP.mjs → v0-C42ssNIy.mjs} +6 -4
  139. package/dist/{v0-Dq3zhexO.mjs → v0-CEfbyyp2.mjs} +3 -4
  140. package/dist/{v0-C49OI_wc.mjs → v0-Ch-O6YVd.mjs} +5 -3
  141. package/dist/{v0-gpExNexS.mjs → v0-D0imQlSD.mjs} +2 -2
  142. package/dist/{v0-DrOub-e1.d.mts → v0-DWZ_N2GG.d.mts} +4 -4
  143. package/dist/{v0-Bmow1q_x.mjs → v0-Dvu8fMl3.mjs} +3 -3
  144. package/dist/v0-QIjffi4E.d.mts +8 -0
  145. package/dist/{v0-D7Fm2C3Y.d.mts → v0-aYLq6qmT.d.mts} +3 -3
  146. package/dist/{virtual-C0yHf1DC.mjs → virtual-Cq5aRp7m.mjs} +3 -4
  147. package/dist/virtual-CrgGA-o6.d.mts +8 -0
  148. package/package.json +1 -1
  149. package/dist/adapter-58IvIfAZ.d.mts +0 -96
  150. package/dist/adapter-BvWEd9w-.d.mts +0 -17
  151. package/dist/adapter-Dhq68tz0.d.mts +0 -11
  152. package/dist/adapter-gQ2SNKZq.mjs +0 -238
  153. package/dist/adapters-BSiqsTZN.mjs +0 -3
  154. package/dist/adapters-C3QXhf4I.mjs +0 -2
  155. package/dist/adapters-CMJGA1k7.mjs +0 -2
  156. package/dist/adapters-Dse4bPxk.mjs +0 -5
  157. package/dist/adapters-_ZqxCD8f.mjs +0 -4
  158. package/dist/createPagination-CHF7SmmK.mjs +0 -247
  159. package/dist/index-1XdASTjp.d.mts +0 -13
  160. package/dist/index-C6rdXZ7j.d.mts +0 -11
  161. package/dist/index-Dp1HjBxJ.d.mts +0 -13
  162. package/dist/v0-CdusXjY_.d.mts +0 -8
  163. package/dist/virtual-D4fckewC.d.mts +0 -8
  164. /package/dist/{adapter-Be9zUc-n.mjs → adapter-oM18AdUc.mjs} +0 -0
  165. /package/dist/{htmlElements-D4oMQZPJ.mjs → htmlElements-CHXZfsZu.mjs} +0 -0
  166. /package/dist/{index-CFhUdAHM.d.mts → index-BOn0AAue.d.mts} +0 -0
  167. /package/dist/{index-CROz1VSV.d.mts → index-CKKoxA9V.d.mts} +0 -0
  168. /package/dist/{index-DuddF-NR.d.mts → index-CLR1QMM3.d.mts} +0 -0
  169. /package/dist/{index-DTvqw22G.d.mts → index-H_hl6-4b.d.mts} +0 -0
  170. /package/dist/{index-BgCkepP_.d.mts → index-PvkxPev3.d.mts} +0 -0
  171. /package/dist/{toArray-as9BWxBK.mjs → toArray-CD2-OxAz.mjs} +0 -0
@@ -1,5 +1,5 @@
1
- import { a as ID, i as Extensible } from "./index-DuddF-NR.mjs";
2
- import { t as ContextTrinity } from "./index-DTvqw22G.mjs";
1
+ import { a as ID, i as Extensible } from "./index-CLR1QMM3.mjs";
2
+ import { t as ContextTrinity } from "./index-H_hl6-4b.mjs";
3
3
 
4
4
  //#region src/composables/createRegistry/index.d.ts
5
5
  /**
@@ -47,10 +47,13 @@ type RegistryEventMap<Z extends RegistryTicket> = {
47
47
  'clear:registry': undefined;
48
48
  'reindex:registry': undefined;
49
49
  };
50
- /** Callback signature for registry event listeners */
51
- type RegistryEventCallback<Z extends RegistryTicket = RegistryTicket, K extends RegistryEventName = RegistryEventName> = (data: RegistryEventMap<Z>[K]) => void;
52
- /** Resolves callback type: typed for known events, unknown for custom events */
53
- type EventHandler<Z extends RegistryTicket, K extends string> = K extends RegistryEventName ? (data: RegistryEventMap<Z>[K]) => void : (data: unknown) => void;
50
+ /**
51
+ * Callback signature for registry event listeners.
52
+ *
53
+ * Resolves to a typed payload for known {@link RegistryEventName} keys, and
54
+ * `(data: unknown) => void` for custom events.
55
+ */
56
+ type RegistryEventCallback<Z extends RegistryTicket = RegistryTicket, K extends Extensible<RegistryEventName> = Extensible<RegistryEventName>> = K extends RegistryEventName ? (data: RegistryEventMap<Z>[K]) => void : (data: unknown) => void;
54
57
  /** Resolves payload type: typed for known events, unknown for custom events */
55
58
  type EventPayload<Z extends RegistryTicket, K extends string> = K extends RegistryEventName ? RegistryEventMap<Z>[K] : unknown;
56
59
  interface RegistryContext<Z extends RegistryTicketInput = RegistryTicketInput, E extends RegistryTicket & Z = RegistryTicket & Z> {
@@ -149,9 +152,9 @@ interface RegistryContext<Z extends RegistryTicketInput = RegistryTicketInput, E
149
152
  * const unique = registry.browse('unique-value') // ['ticket-3']
150
153
  * ```
151
154
  */
152
- browse: (value: E['value']) => ID[] | undefined;
155
+ browse: (value: E['value']) => readonly ID[] | undefined;
153
156
  /**
154
- * lookup a ticket by index number
157
+ * Lookup a ticket by index number
155
158
  *
156
159
  * @param index The index number to lookup.
157
160
  * @remarks Maps do not support indexing by default, this method provides a way to retrieve an ID based on its index in the registry.
@@ -195,7 +198,8 @@ interface RegistryContext<Z extends RegistryTicketInput = RegistryTicketInput, E
195
198
  *
196
199
  * @param id The ID of the ticket to upsert.
197
200
  * @param ticket The partial ticket data to update or insert.
198
- * @remarks If the ticket exists, it will be updated with the provided data. If it doesn't exist, a new ticket will be created with the given ID and data. This operation invalidates cached results from `keys()`, `values()`, and `entries()`.
201
+ * @param event Optional custom event name to emit alongside `update:ticket`. The patched ticket is dispatched as the event payload.
202
+ * @remarks If the ticket exists, it will be updated in place — the ticket reference returned by `register()` remains valid and reactive (when `reactive: true`). If it doesn't exist, a new ticket will be created with the given ID and data. This operation invalidates cached results from `keys()`, `values()`, and `entries()`.
199
203
  *
200
204
  * @see https://0.vuetifyjs.com/composables/registration/create-registry
201
205
  *
@@ -203,13 +207,16 @@ interface RegistryContext<Z extends RegistryTicketInput = RegistryTicketInput, E
203
207
  * ```ts
204
208
  * import { createRegistry } from '@vuetify/v0'
205
209
  *
206
- * const registry = createRegistry()
210
+ * const registry = createRegistry({ events: true })
207
211
  *
208
212
  * // Insert a new ticket
209
213
  * const ticket = registry.upsert('ticket-id', { value: 'initial-value' })
210
214
  *
211
215
  * // Update the existing ticket
212
216
  * const patched = registry.upsert('ticket-id', { value: 'updated-value' })
217
+ *
218
+ * // Emit a custom event with the patched ticket as payload
219
+ * registry.upsert('ticket-id', { value: 'final' }, 'ticket:final')
213
220
  * ```
214
221
  */
215
222
  upsert: (id: ID, ticket?: Partial<Z>, event?: string) => E;
@@ -315,12 +322,13 @@ interface RegistryContext<Z extends RegistryTicketInput = RegistryTicketInput, E
315
322
  */
316
323
  reindex: () => void;
317
324
  /**
318
- * Seek for a ticket based on direction and optional predicate
325
+ * Move a ticket to a new index position
319
326
  *
320
- * @param direction The direction to seek ('first' or 'last'). Defaults to 'first'.
321
- * @param from The index to start seeking from. Defaults to the beginning or end based on direction.
322
- * @param predicate An optional function to test each ticket. The first ticket that satisfies the predicate will be returned.
323
- * @remarks This method allows for flexible searching within the registry, either from the start or end, and can filter tickets based on custom criteria.
327
+ * @param id The ID of the ticket to move.
328
+ * @param toIndex The target index position. Clamped to valid range.
329
+ * @returns The moved ticket, or undefined if the ticket was not found.
330
+ *
331
+ * @remarks Rebuilds the internal collection order by removing and reinserting the entry at the target position. Triggers a full reindex after the move. This operation invalidates cached results from `keys()`, `values()`, and `entries()`.
324
332
  *
325
333
  * @see https://0.vuetifyjs.com/composables/registration/create-registry
326
334
  *
@@ -330,31 +338,49 @@ interface RegistryContext<Z extends RegistryTicketInput = RegistryTicketInput, E
330
338
  *
331
339
  * const registry = createRegistry()
332
340
  *
333
- * registry.register({ id: 'ticket-1', value: 'apple' })
334
- * registry.register({ id: 'ticket-2', value: 'banana' })
335
- * registry.register({ id: 'ticket-3', value: 'cherry' })
336
- *
337
- * // Seek the first ticket
338
- * const first = registry.seek('first')
339
- *
340
- * // Seek the last ticket
341
- * const last = registry.seek('last')
341
+ * registry.onboard([
342
+ * { id: 'a', value: 'alpha' },
343
+ * { id: 'b', value: 'beta' },
344
+ * { id: 'c', value: 'gamma' },
345
+ * ])
342
346
  *
343
- * // Seek the first ticket with value 'banana'
344
- * const banana = registry.seek('first', undefined, ticket => ticket.value === 'banana')
347
+ * // Move 'a' from index 0 to index 2
348
+ * registry.move('a', 2)
345
349
  *
346
- * // Seek from index 1 to find the next ticket with value starting with 'c'
347
- * const cherry = registry.seek('first', 1, ticket => (ticket.value as string).startsWith('c'))
350
+ * console.log(registry.keys()) // ['b', 'c', 'a']
348
351
  * ```
349
352
  */
353
+ move: (id: ID, toIndex: number) => E | undefined;
350
354
  /**
351
- * Move a ticket to a new index position
355
+ * Reorder the registry to match a canonical permutation of ids in one pass.
352
356
  *
353
- * @param id The ID of the ticket to move.
354
- * @param toIndex The target index position. Clamped to valid range.
355
- * @returns The moved ticket, or undefined if the ticket was not found.
357
+ * @param ids A full permutation of the currently-registered ticket ids.
356
358
  *
357
- * @remarks Rebuilds the internal collection order by removing and reinserting the entry at the target position. Triggers a full reindex after the move. This operation invalidates cached results from `keys()`, `values()`, and `entries()`.
359
+ * @remarks
360
+ * Bulk equivalent of calling `move` n times, but does the rebuild once
361
+ * (O(n) total rather than O(n²)). Silently no-ops when `ids.length !== size`,
362
+ * when any id is unknown, or when `ids` contains duplicates — caller is
363
+ * responsible for validation and warnings. Emits `reindex:registry` once on
364
+ * completion; does not emit per-ticket `update:ticket` events.
365
+ *
366
+ * @example
367
+ * ```ts
368
+ * const registry = createRegistry()
369
+ * registry.onboard([{ id: 'a' }, { id: 'b' }, { id: 'c' }])
370
+ *
371
+ * registry.reorder(['c', 'a', 'b'])
372
+ *
373
+ * console.log(registry.keys()) // ['c', 'a', 'b']
374
+ * ```
375
+ */
376
+ reorder: (ids: ID[]) => void;
377
+ /**
378
+ * Seek for a ticket based on direction and optional predicate
379
+ *
380
+ * @param direction The scan direction (`'first'` = forward, `'last'` = backward). Defaults to `'first'`.
381
+ * @param from The index to start scanning from. With `'first'` the scan moves forward from `from`; with `'last'` the scan moves backward from `from`. Defaults to `0` for `'first'` and `size - 1` for `'last'`.
382
+ * @param predicate An optional function to test each ticket. The first ticket reached in scan order that satisfies the predicate is returned.
383
+ * @remarks This method allows for flexible searching within the registry, either from the start or end, and can filter tickets based on custom criteria.
358
384
  *
359
385
  * @see https://0.vuetifyjs.com/composables/registration/create-registry
360
386
  *
@@ -364,19 +390,23 @@ interface RegistryContext<Z extends RegistryTicketInput = RegistryTicketInput, E
364
390
  *
365
391
  * const registry = createRegistry()
366
392
  *
367
- * registry.onboard([
368
- * { id: 'a', value: 'alpha' },
369
- * { id: 'b', value: 'beta' },
370
- * { id: 'c', value: 'gamma' },
371
- * ])
393
+ * registry.register({ id: 'ticket-1', value: 'apple' })
394
+ * registry.register({ id: 'ticket-2', value: 'banana' })
395
+ * registry.register({ id: 'ticket-3', value: 'cherry' })
372
396
  *
373
- * // Move 'a' from index 0 to index 2
374
- * registry.move('a', 2)
397
+ * // Seek the first ticket
398
+ * const first = registry.seek('first')
375
399
  *
376
- * console.log(registry.keys()) // ['b', 'c', 'a']
400
+ * // Seek the last ticket
401
+ * const last = registry.seek('last')
402
+ *
403
+ * // Seek the first ticket with value 'banana'
404
+ * const banana = registry.seek('first', undefined, ticket => ticket.value === 'banana')
405
+ *
406
+ * // Seek from index 1 to find the next ticket with value starting with 'c'
407
+ * const cherry = registry.seek('first', 1, ticket => (ticket.value as string).startsWith('c'))
377
408
  * ```
378
409
  */
379
- move: (id: ID, toIndex: number) => E | undefined;
380
410
  seek: (direction?: 'first' | 'last', from?: number, predicate?: (ticket: E) => boolean) => E | undefined;
381
411
  /**
382
412
  * Listen for registry events
@@ -406,7 +436,7 @@ interface RegistryContext<Z extends RegistryTicketInput = RegistryTicketInput, E
406
436
  * registry.register({ id: 'ticket-id' }) // Console: Ticket registered: { id: 'ticket-id', ... }
407
437
  * ```
408
438
  */
409
- on: <K extends Extensible<RegistryEventName>>(event: K, cb: EventHandler<E, K>) => void;
439
+ on: <K extends Extensible<RegistryEventName>>(event: K, cb: RegistryEventCallback<E, K>) => void;
410
440
  /**
411
441
  * Stop listening for registry events
412
442
  *
@@ -436,7 +466,7 @@ interface RegistryContext<Z extends RegistryTicketInput = RegistryTicketInput, E
436
466
  * })
437
467
  * ```
438
468
  */
439
- off: <K extends Extensible<RegistryEventName>>(event: K, cb: EventHandler<E, K>) => void;
469
+ off: <K extends Extensible<RegistryEventName>>(event: K, cb: RegistryEventCallback<E, K>) => void;
440
470
  /**
441
471
  * Emit an event with data
442
472
  *
@@ -506,10 +536,19 @@ interface RegistryContext<Z extends RegistryTicketInput = RegistryTicketInput, E
506
536
  */
507
537
  onboard: (registrations: Partial<Z & RegistryTicket>[]) => E[];
508
538
  /**
509
- * Offboard multiple tickets at once
539
+ * Offboard multiple tickets at once, returning the input shapes that were removed.
510
540
  *
511
541
  * @param ids An array of ticket IDs to unregister.
512
- * @remarks Unregisters multiple tickets in a single operation with optimized reindexing.
542
+ * @returns An array of `Partial<Z>` the inputs that were registered, with
543
+ * registry-managed fields (`index`, `valueIsIndex`, `unregister`) stripped.
544
+ * The `id` is preserved only when `valueIsIndex` was false (i.e. the user
545
+ * supplied a meaningful value); otherwise the id is stripped so the receiving
546
+ * registry can assign a fresh one. Order matches the input `ids` array. Missing
547
+ * ids are silently skipped — the returned array may be shorter than `ids`.
548
+ * @remarks Unregisters multiple tickets in a single operation with optimized
549
+ * reindexing. The inverse of `onboard`: onboard takes inputs and returns outputs;
550
+ * offboard takes ids and returns the inputs back. Pair with `onboard` on a
551
+ * different registry to move tickets across registries.
513
552
  *
514
553
  * @see https://0.vuetifyjs.com/composables/registration/create-registry
515
554
  *
@@ -525,12 +564,17 @@ interface RegistryContext<Z extends RegistryTicketInput = RegistryTicketInput, E
525
564
  * { id: 'ticket-3', value: 'value-3' },
526
565
  * ])
527
566
  *
528
- * registry.offboard(['ticket-1', 'ticket-3'])
567
+ * const removed = registry.offboard(['ticket-1', 'ticket-3'])
529
568
  *
530
569
  * console.log(registry.size) // 1
570
+ * console.log(removed) // [{ id: 'ticket-1', value: 'value-1' }, { id: 'ticket-3', value: 'value-3' }]
571
+ *
572
+ * // Move to another registry
573
+ * const other = createRegistry()
574
+ * other.onboard(removed)
531
575
  * ```
532
576
  */
533
- offboard: (ids: ID[]) => void;
577
+ offboard: (ids: ID[]) => Partial<Z>[];
534
578
  /**
535
579
  * The number of tickets in the registry
536
580
  *
@@ -697,170 +741,4 @@ declare function createRegistryContext<Z extends RegistryTicketInput = RegistryT
697
741
  */
698
742
  declare function useRegistry<Z extends RegistryTicketInput = RegistryTicketInput, E extends RegistryTicket & Z = RegistryTicket & Z>(namespace?: string): RegistryContext<Z, E>;
699
743
  //#endregion
700
- //#region src/composables/createTokens/index.d.ts
701
- interface TokenAlias<T = unknown> {
702
- [key: string]: unknown;
703
- $value: T;
704
- $type?: string;
705
- $description?: string;
706
- $extensions?: Record<string, unknown>;
707
- $deprecated?: boolean | string;
708
- }
709
- type TokenPrimitive = string | number | boolean | null | Function;
710
- type TokenValue = TokenPrimitive | TokenAlias;
711
- interface TokenCollection {
712
- [key: string]: TokenValue | TokenCollection;
713
- }
714
- type FlatTokenCollection = {
715
- id: string;
716
- value: TokenValue;
717
- };
718
- interface TokenTicket<Z extends TokenValue = TokenValue> extends RegistryTicket<Z> {}
719
- interface TokenContext<Z extends TokenTicket> extends RegistryContext<Z> {
720
- /**
721
- * Checks if a token is an alias
722
- *
723
- * @param token The token to check.
724
- * @returns True if the token is an alias, false otherwise.
725
- * @remarks An alias is a string that starts with "{" and ends with "}".
726
- *
727
- * @see https://0.vuetifyjs.com/composables/registration/create-tokens
728
- *
729
- * @example
730
- * ```ts
731
- * const tokens = createTokens({
732
- * colors: {
733
- * primary: '#3b82f6',
734
- * secondary: '{colors.primary}', // Alias reference
735
- * },
736
- * })
737
- *
738
- * console.log(tokens.isAlias('{colors.primary}')) // true
739
- * console.log(tokens.isAlias('#3b82f6')) // false
740
- * ```
741
- */
742
- isAlias: (token: unknown) => token is string;
743
- /**
744
- * Resolves a token or alias to its value.
745
- *
746
- * @param token The token or alias to resolve.
747
- * @returns The resolved value of the token or alias, or undefined if not found.
748
- * @remarks This function can resolve nested aliases and supports token paths using dot notation.
749
- *
750
- * @see https://0.vuetifyjs.com/composables/registration/create-tokens
751
- *
752
- * @example
753
- * ```ts
754
- * const tokens = createTokens({
755
- * colors: {
756
- * primary: '#3b82f6',
757
- * secondary: '{colors.primary}', // Alias reference
758
- * },
759
- * })
760
- *
761
- * console.log(tokens.resolve('{colors.primary}')) // '#3b82f6'
762
- * console.log(tokens.resolve('{colors.secondary}')) // '#3b82f6'
763
- * ```
764
- */
765
- resolve: (token: string | TokenAlias) => unknown | undefined;
766
- }
767
- interface TokenOptions extends RegistryOptions {
768
- /**
769
- * Whether to flatten nested token structures.
770
- *
771
- * @default false
772
- */
773
- flat?: boolean;
774
- /**
775
- * An optional prefix to prepend to each token ID during registration.
776
- *
777
- * @remarks This is useful for namespacing tokens.
778
- */
779
- prefix?: string;
780
- }
781
- interface TokenContextOptions extends TokenOptions, RegistryContextOptions {
782
- tokens?: TokenCollection;
783
- }
784
- /**
785
- * Creates a new token instance.
786
- *
787
- * @param tokens The tokens to use.
788
- * @param options The options for the token instance.
789
- * @template Z The type of the token ticket.
790
- * @template E The type of the token context.
791
- * @returns A new token instance.
792
- *
793
- * @see https://www.designtokens.org/tr/drafts/format/
794
- * @see https://0.vuetifyjs.com/composables/registration/create-tokens
795
- *
796
- * @example
797
- * ```ts
798
- * import { createTokens } from '@vuetify/v0'
799
- *
800
- * const tokens = createTokens({
801
- * colors: {
802
- * primary: '#3b82f6',
803
- * secondary: '{colors.primary}', // Alias reference
804
- * },
805
- * })
806
- *
807
- * console.log(tokens.resolve('{colors.primary}')) // '#3b82f6'
808
- * console.log(tokens.resolve('{colors.secondary}')) // '#3b82f6'
809
- * ```
810
- */
811
- declare function createTokens<Z extends TokenTicket = TokenTicket, E extends TokenContext<Z> = TokenContext<Z>>(tokens?: TokenCollection, options?: TokenOptions): E;
812
- /**
813
- * Creates a new token context.
814
- *
815
- * @param namespace The namespace for the token context.
816
- * @param tokens The tokens to use.
817
- * @template Z The type of the token ticket.
818
- * @template E The type of the token context.
819
- * @returns A new token context.
820
- *
821
- * @see https://0.vuetifyjs.com/composables/registration/create-tokens
822
- *
823
- * @example
824
- * ```ts
825
- * import { createTokensContext } from '@vuetify/v0'
826
- *
827
- * export const [useTokens, provideTokens, context] = createTokensContext({
828
- * namespace: 'v0:tokens',
829
- * tokens: {
830
- * colors: {
831
- * primary: '#3b82f6',
832
- * secondary: '{colors.primary}', // Alias reference
833
- * },
834
- * },
835
- * })
836
- * ```
837
- */
838
- declare function createTokensContext<Z extends TokenTicket = TokenTicket, E extends TokenContext<Z> = TokenContext<Z>>(_options: TokenContextOptions): ContextTrinity<E>;
839
- /**
840
- * Returns the current tokens instance.
841
- *
842
- * @param namespace The namespace for the tokens context. Defaults to `'v0:tokens'`.
843
- * @returns The current tokens instance.
844
- *
845
- * @see https://0.vuetifyjs.com/composables/registration/create-tokens
846
- *
847
- * @example
848
- * ```vue
849
- * <script setup lang="ts">
850
- * import { useTokens } from '@vuetify/v0'
851
- *
852
- * const tokens = useTokens()
853
- * </script>
854
- * ```
855
- */
856
- declare function useTokens<Z extends TokenTicket = TokenTicket, E extends TokenContext<Z> = TokenContext<Z>>(namespace?: string): E;
857
- /**
858
- * Flattens a nested collection of tokens into a flat array of tokens.
859
- * Each token is represented by an object containing its ID & value.
860
- * @param tokens The collection of tokens to flatten.
861
- * @param prefix An optional prefix to prepend to each token ID.
862
- * @returns An array of flattened tokens, each with an ID and value.
863
- */
864
- declare function flatten(tokens: TokenCollection, prefix?: string, flat?: boolean): FlatTokenCollection[];
865
- //#endregion
866
- export { createRegistryContext as C, createRegistry as S, RegistryEventMap as _, TokenContextOptions as a, RegistryTicket as b, TokenTicket as c, createTokensContext as d, flatten as f, RegistryEventCallback as g, RegistryContextOptions as h, TokenContext as i, TokenValue as l, RegistryContext as m, TokenAlias as n, TokenOptions as o, useTokens as p, TokenCollection as r, TokenPrimitive as s, FlatTokenCollection as t, createTokens as u, RegistryEventName as v, useRegistry as w, RegistryTicketInput as x, RegistryOptions as y };
744
+ export { RegistryEventName as a, RegistryTicketInput as c, useRegistry as d, RegistryEventMap as i, createRegistry as l, RegistryContextOptions as n, RegistryOptions as o, RegistryEventCallback as r, RegistryTicket as s, RegistryContext as t, createRegistryContext as u };
@@ -0,0 +1,4 @@
1
+ //#region src/composables/useStorage/adapters/index.d.ts
2
+ type StorageType = 'localStorage' | 'sessionStorage' | 'memory';
3
+ //#endregion
4
+ export { StorageType as t };