@vuetify/v0 1.1.0 → 1.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (162) hide show
  1. package/README.md +13 -0
  2. package/dist/{adapter-Butx_2UU.d.mts → adapter-BXunW_mw.d.mts} +1 -1
  3. package/dist/{createPagination-B5dfqY-a.mjs → adapter-BiQV5j8B.mjs} +98 -3
  4. package/dist/adapter-ClB-53_F.d.mts +62 -0
  5. package/dist/adapter-CrRJuxRk.mjs +21 -0
  6. package/dist/{adapter-hq9YlPOF.d.mts → adapter-FckJSz_o.d.mts} +2 -2
  7. package/dist/{adapter-_srNCBEi.d.mts → adapter-PDTe5nFT.d.mts} +6 -7
  8. package/dist/browser/index.d.ts +15918 -13714
  9. package/dist/browser/index.js +16708 -14105
  10. package/dist/components/index.d.mts +2 -2
  11. package/dist/components/index.mjs +2 -2
  12. package/dist/{components-B2BZ1B3K.mjs → components-MCFhfNlt.mjs} +8234 -6307
  13. package/dist/composables/index.d.mts +22 -20
  14. package/dist/composables/index.mjs +37 -34
  15. package/dist/{composables-DONBl_c9.mjs → composables-8xtFVviy.mjs} +32 -1061
  16. package/dist/{consola-BPGkJp_q.d.mts → consola-CdMU53rU.d.mts} +1 -1
  17. package/dist/constants/index.d.mts +1 -1
  18. package/dist/constants/index.mjs +1 -1
  19. package/dist/{createDataTable-DgyHBfAr.mjs → createDataTable-OCGnpy-N.mjs} +24 -8
  20. package/dist/{createGroup-BXKKcb9-.mjs → createGroup-DtVYu-VY.mjs} +14 -3
  21. package/dist/createPlugin-Oo6t-vBw.mjs +157 -0
  22. package/dist/{createRegistry-B9cOWny2.mjs → createRegistry-DSQiALGi.mjs} +3 -3
  23. package/dist/{createSelection-CWE554_g.mjs → createSelection-TB5oK1FG.mjs} +2 -1
  24. package/dist/{createSingle-Dz-1Iv7u.mjs → createSingle-CV1qigP2.mjs} +1 -1
  25. package/dist/{createTokens-C4qcW2Kv.mjs → createTokens-B0CqJEL6.mjs} +2 -2
  26. package/dist/data-table/adapters/client/index.d.mts +1 -1
  27. package/dist/data-table/adapters/client/index.mjs +1 -1
  28. package/dist/data-table/adapters/index.d.mts +4 -4
  29. package/dist/data-table/adapters/index.mjs +4 -4
  30. package/dist/data-table/adapters/server/index.d.mts +1 -1
  31. package/dist/data-table/adapters/server/index.mjs +1 -1
  32. package/dist/data-table/adapters/virtual/index.d.mts +1 -1
  33. package/dist/data-table/adapters/virtual/index.mjs +1 -1
  34. package/dist/data-table/index.d.mts +5 -5
  35. package/dist/data-table/index.mjs +5 -5
  36. package/dist/date/index.d.mts +1 -1
  37. package/dist/date/index.mjs +2 -2
  38. package/dist/features/adapters/flagsmith/index.d.mts +1 -1
  39. package/dist/features/adapters/flagsmith/index.mjs +1 -1
  40. package/dist/features/adapters/launchdarkly/index.d.mts +1 -1
  41. package/dist/features/adapters/launchdarkly/index.mjs +1 -1
  42. package/dist/features/adapters/posthog/index.d.mts +1 -1
  43. package/dist/features/adapters/posthog/index.mjs +2 -2
  44. package/dist/features/index.d.mts +2 -2
  45. package/dist/features/index.mjs +2 -2
  46. package/dist/{flagsmith-DA2GCyGv.d.mts → flagsmith-DcIDrI7_.d.mts} +1 -1
  47. package/dist/{globals-CtaXlEOI.mjs → globals-wvVdMRFF.mjs} +1 -1
  48. package/dist/{index-DCtHbY0a.d.mts → index-3bThcqCN.d.mts} +25 -20
  49. package/dist/{index-QnpcDsV7.d.mts → index-3vvA76pZ.d.mts} +2 -2
  50. package/dist/{index-RGiSdjYt.d.mts → index-4Z38WhA9.d.mts} +9 -3
  51. package/dist/{index-CTl0cGH6.d.mts → index-BTdCsSz0.d.mts} +7264 -5608
  52. package/dist/{index-DF0tMI2_.d.mts → index-CORslci7.d.mts} +121 -2
  53. package/dist/{index-Dc7lKT6q.d.mts → index-Dgkt7Ve9.d.mts} +494 -131
  54. package/dist/index.d.mts +25 -24
  55. package/dist/index.mjs +40 -37
  56. package/dist/json/attributes.json +500 -0
  57. package/dist/json/importMap.json +92 -0
  58. package/dist/json/tags.json +237 -0
  59. package/dist/json/web-types.json +1553 -97
  60. package/dist/{launchdarkly-Bp8p9PMD.d.mts → launchdarkly-CUzunYol.d.mts} +1 -1
  61. package/dist/locale/adapters/index.d.mts +2 -2
  62. package/dist/locale/adapters/index.mjs +2 -2
  63. package/dist/locale/adapters/v0/index.d.mts +1 -1
  64. package/dist/locale/adapters/v0/index.mjs +1 -1
  65. package/dist/locale/adapters/vue-i18n/index.d.mts +1 -1
  66. package/dist/locale/adapters/vue-i18n/index.mjs +1 -1
  67. package/dist/locale/index.d.mts +3 -3
  68. package/dist/locale/index.mjs +3 -3
  69. package/dist/locale/messages/en/index.d.mts +6 -0
  70. package/dist/locale/messages/en/index.mjs +2 -0
  71. package/dist/logger/adapters/consola/index.d.mts +1 -1
  72. package/dist/logger/adapters/index.d.mts +4 -4
  73. package/dist/logger/adapters/index.mjs +1 -1
  74. package/dist/logger/adapters/pino/index.d.mts +1 -1
  75. package/dist/logger/adapters/v0/index.d.mts +1 -1
  76. package/dist/logger/adapters/v0/index.mjs +1 -1
  77. package/dist/logger/index.d.mts +5 -5
  78. package/dist/logger/index.mjs +2 -2
  79. package/dist/notifications/index.d.mts +1 -1
  80. package/dist/notifications/index.mjs +2 -2
  81. package/dist/palettes/ant/index.d.mts +1 -1
  82. package/dist/palettes/index.d.mts +3 -3
  83. package/dist/palettes/material/index.d.mts +1 -1
  84. package/dist/palettes/md1/index.d.mts +1 -1
  85. package/dist/palettes/md2/index.d.mts +1 -1
  86. package/dist/palettes/radix/index.d.mts +1 -1
  87. package/dist/palettes/tailwind/index.d.mts +1 -1
  88. package/dist/permissions/adapters/index.d.mts +1 -1
  89. package/dist/permissions/adapters/index.mjs +1 -1
  90. package/dist/permissions/adapters/v0/index.d.mts +1 -1
  91. package/dist/permissions/adapters/v0/index.mjs +1 -1
  92. package/dist/permissions/index.d.mts +1 -1
  93. package/dist/permissions/index.mjs +2 -2
  94. package/dist/{pino-B6BI1AOK.d.mts → pino-DjeWBFnj.d.mts} +1 -1
  95. package/dist/popover/adapters/floating-ui/index.d.mts +25 -0
  96. package/dist/popover/adapters/floating-ui/index.mjs +98 -0
  97. package/dist/popover/index.d.mts +3 -0
  98. package/dist/popover/index.mjs +3 -0
  99. package/dist/{posthog-sFqk0bGy.d.mts → posthog-CJAYssdr.d.mts} +1 -1
  100. package/dist/rules/index.d.mts +1 -1
  101. package/dist/rules/index.mjs +1 -1
  102. package/dist/{server-DbtTGb67.d.mts → server-5vbJ7GGs.d.mts} +2 -2
  103. package/dist/{server-D5BJBjB0.mjs → server-m7iD1vOr.mjs} +1 -2
  104. package/dist/storage/adapters/index.d.mts +2 -2
  105. package/dist/storage/adapters/index.mjs +1 -1
  106. package/dist/storage/adapters/memory/index.d.mts +1 -1
  107. package/dist/storage/adapters/memory/index.mjs +1 -1
  108. package/dist/storage/index.d.mts +3 -3
  109. package/dist/storage/index.mjs +2 -2
  110. package/dist/theme/adapters/index.d.mts +1 -1
  111. package/dist/theme/adapters/index.mjs +3 -3
  112. package/dist/theme/adapters/unhead/index.d.mts +1 -1
  113. package/dist/theme/adapters/unhead/index.mjs +1 -1
  114. package/dist/theme/adapters/v0/index.d.mts +1 -1
  115. package/dist/theme/adapters/v0/index.mjs +1 -1
  116. package/dist/theme/index.d.mts +2 -2
  117. package/dist/theme/index.mjs +4 -4
  118. package/dist/types/index.d.mts +1 -1
  119. package/dist/{unhead-BAWCwNOF.mjs → unhead-SyU953Pt.mjs} +2 -2
  120. package/dist/{useEventListener-DSOeDtC-.mjs → useEventListener-hF6R2p6X.mjs} +2 -2
  121. package/dist/useFeatures-CTpkM6hV.mjs +221 -0
  122. package/dist/{useLocale-D-V0DENN.mjs → useLocale-D-iWu08b.mjs} +4 -4
  123. package/dist/{useLogger-CbvzXCWb.mjs → useLogger-CDsgHbzO.mjs} +5 -159
  124. package/dist/{useNotifications-Cqg3uDz0.mjs → useNotifications-DhNjvRt1.mjs} +57 -154
  125. package/dist/{usePermissions-BTdUVyQe.mjs → usePermissions-CKe8xcvz.mjs} +4 -4
  126. package/dist/usePopover-DyAdne_S.mjs +421 -0
  127. package/dist/{useRovingFocus-g6ifibLg.mjs → useRovingFocus-D0OOozbe.mjs} +1169 -553
  128. package/dist/{useRules-DEiHd_eY.mjs → useRules-DA8bNhNq.mjs} +3 -2
  129. package/dist/{useStorage-BSfQfDbg.mjs → useStorage-D9c6xx4N.mjs} +5 -4
  130. package/dist/useTheme-BrXA5VBp.mjs +445 -0
  131. package/dist/useTimer-DLtkRCHw.mjs +151 -0
  132. package/dist/utilities/index.d.mts +2 -2
  133. package/dist/utilities/index.mjs +204 -2
  134. package/dist/{v0-BnUwMaOv.d.mts → v0-C09lR5fc.d.mts} +1 -1
  135. package/dist/{v0-CveVV6On.mjs → v0-CaTmC7C4.mjs} +2 -2
  136. package/dist/{v0-rSxMW8FJ.d.mts → v0-DfFK-p4X.d.mts} +1 -1
  137. package/dist/{v0-CCWHeKJM.mjs → v0-DpFVF6pD.mjs} +1 -1
  138. package/dist/{v0-DotXXGXU.d.mts → v0-GI9U-rPA.d.mts} +2 -2
  139. package/dist/{v0-CZBkpQjr.mjs → v0-cC-WxCLd.mjs} +2 -2
  140. package/dist/{v0-A4GLojAr.mjs → v0-yZ2ZUtVF.mjs} +1 -2
  141. package/dist/{virtual-DFvOoeG6.mjs → virtual-Bbu26O_h.mjs} +1 -2
  142. package/dist/{virtual-C-NsLue0.d.mts → virtual-JIdFLpTQ.d.mts} +2 -2
  143. package/package.json +8 -1
  144. package/dist/adapter-CVoWg0sw.mjs +0 -99
  145. package/dist/useFeatures-YJmONiU7.mjs +0 -124
  146. package/dist/useTheme-C0_i__N6.mjs +0 -162
  147. /package/dist/{adapter-CTsckKAR.mjs → adapter-8UADsA3-.mjs} +0 -0
  148. /package/dist/{adapter-BCtceV3b.mjs → adapter-BuSfpxur.mjs} +0 -0
  149. /package/dist/{adapter-Bc0yPSfo.d.mts → adapter-D5nT3bLw.d.mts} +0 -0
  150. /package/dist/{adapter-bwZo7b5p.mjs → adapter-D8zizQVP.mjs} +0 -0
  151. /package/dist/{adapter-q1sRACUc.mjs → adapter-TiGrumDi.mjs} +0 -0
  152. /package/dist/{adapter-BYzU4Ey5.d.mts → adapter-ryk5H6YZ.d.mts} +0 -0
  153. /package/dist/{index-CROz1VSV.d.mts → index-CX869wwk.d.mts} +0 -0
  154. /package/dist/{index-FtE8MXJ_.d.mts → index-CsuikFeJ.d.mts} +0 -0
  155. /package/dist/{index-DidZKN6S.d.mts → index-Djhiy3nS.d.mts} +0 -0
  156. /package/dist/{index-CyNk9FpR.d.mts → index-DtiaWx5U.d.mts} +0 -0
  157. /package/dist/{index-DXMlYoiQ.d.mts → index-H_hl6-4b.d.mts} +0 -0
  158. /package/dist/{index-BgCkepP_.d.mts → index-u_qSc2xS.d.mts} +0 -0
  159. /package/dist/{memory-DbyZeNjg.d.mts → memory-B7z1RR9r.d.mts} +0 -0
  160. /package/dist/{memory-BJjkQzxs.mjs → memory-CR6zvuaP.mjs} +0 -0
  161. /package/dist/{toArray-C89ZaEuF.mjs → toArray-MY9Kb1Qy.mjs} +0 -0
  162. /package/dist/{v0-UNyykD27.mjs → v0-Ch0yBKEj.mjs} +0 -0
@@ -1,4 +1,4 @@
1
- import { t as LoggerAdapter } from "./adapter-BYzU4Ey5.mjs";
1
+ import { t as LoggerAdapter } from "./adapter-ryk5H6YZ.mjs";
2
2
 
3
3
  //#region src/composables/useLogger/adapters/consola.d.ts
4
4
  declare class ConsolaLoggerAdapter extends LoggerAdapter {
@@ -1,2 +1,2 @@
1
- import { a as IN_BROWSER, c as SUPPORTS_MUTATION_OBSERVER, d as __LOGGER_ENABLED__, f as version, i as isSelfClosingTag, l as SUPPORTS_OBSERVER, n as SELF_CLOSING_TAGS, o as SUPPORTS_INTERSECTION_OBSERVER, r as SelfClosingElement, s as SUPPORTS_MATCH_MEDIA, t as HTMLElementName, u as SUPPORTS_TOUCH } from "../index-BgCkepP_.mjs";
1
+ import { a as IN_BROWSER, c as SUPPORTS_MUTATION_OBSERVER, d as __LOGGER_ENABLED__, f as version, i as isSelfClosingTag, l as SUPPORTS_OBSERVER, n as SELF_CLOSING_TAGS, o as SUPPORTS_INTERSECTION_OBSERVER, r as SelfClosingElement, s as SUPPORTS_MATCH_MEDIA, t as HTMLElementName, u as SUPPORTS_TOUCH } from "../index-u_qSc2xS.mjs";
2
2
  export { HTMLElementName, IN_BROWSER, SELF_CLOSING_TAGS, SUPPORTS_INTERSECTION_OBSERVER, SUPPORTS_MATCH_MEDIA, SUPPORTS_MUTATION_OBSERVER, SUPPORTS_OBSERVER, SUPPORTS_TOUCH, SelfClosingElement, __LOGGER_ENABLED__, isSelfClosingTag, version };
@@ -1,3 +1,3 @@
1
1
  import { n as isSelfClosingTag, t as SELF_CLOSING_TAGS } from "../htmlElements-CHXZfsZu.mjs";
2
- import { a as SUPPORTS_OBSERVER, c as version, i as SUPPORTS_MUTATION_OBSERVER, n as SUPPORTS_INTERSECTION_OBSERVER, o as SUPPORTS_TOUCH, r as SUPPORTS_MATCH_MEDIA, s as __LOGGER_ENABLED__, t as IN_BROWSER } from "../globals-CtaXlEOI.mjs";
2
+ import { a as SUPPORTS_OBSERVER, c as version, i as SUPPORTS_MUTATION_OBSERVER, n as SUPPORTS_INTERSECTION_OBSERVER, o as SUPPORTS_TOUCH, r as SUPPORTS_MATCH_MEDIA, s as __LOGGER_ENABLED__, t as IN_BROWSER } from "../globals-wvVdMRFF.mjs";
3
3
  export { IN_BROWSER, SELF_CLOSING_TAGS, SUPPORTS_INTERSECTION_OBSERVER, SUPPORTS_MATCH_MEDIA, SUPPORTS_MUTATION_OBSERVER, SUPPORTS_OBSERVER, SUPPORTS_TOUCH, __LOGGER_ENABLED__, isSelfClosingTag, version };
@@ -1,10 +1,10 @@
1
1
  import { isNullOrUndefined } from "./utilities/index.mjs";
2
2
  import { i as useContext, t as createTrinity } from "./createTrinity-z-3q9QWR.mjs";
3
- import { t as createRegistry } from "./createRegistry-B9cOWny2.mjs";
4
- import { a as useLocale } from "./useLocale-D-V0DENN.mjs";
5
- import { i as useProxyRegistry, t as createGroup } from "./createGroup-BXKKcb9-.mjs";
6
- import { t as ClientDataTableAdapter } from "./v0-A4GLojAr.mjs";
7
- import { computed, shallowReactive, shallowReadonly, shallowRef, toRef, watch } from "vue";
3
+ import { t as createRegistry } from "./createRegistry-DSQiALGi.mjs";
4
+ import { a as useLocale } from "./useLocale-D-iWu08b.mjs";
5
+ import { i as useProxyRegistry, t as createGroup } from "./createGroup-DtVYu-VY.mjs";
6
+ import { t as ClientDataTableAdapter } from "./v0-yZ2ZUtVF.mjs";
7
+ import { computed, shallowReactive, shallowReadonly, shallowRef, toRef, toValue, watch } from "vue";
8
8
  //#region src/composables/createDataTable/columns.ts
9
9
  /**
10
10
  * Recursively extract leaf columns (those without children).
@@ -117,6 +117,9 @@ function resolveHeaders(columns) {
117
117
  * table.sort.toggle('name')
118
118
  * ```
119
119
  */
120
+ function recordId(row) {
121
+ return row.id;
122
+ }
120
123
  /**
121
124
  * Creates a data table instance with sort controls, selection, and an
122
125
  * adapter-driven data pipeline.
@@ -175,13 +178,13 @@ function createDataTable(options = {}) {
175
178
  }
176
179
  const { selectedId: selectedLocale } = useLocale();
177
180
  const locale = toRef(() => {
181
+ if (!/* @__PURE__ */ isNullOrUndefined(initialLocale)) return initialLocale;
178
182
  const selected = selectedLocale?.value;
179
183
  if (!/* @__PURE__ */ isNullOrUndefined(selected)) return String(selected);
180
- return initialLocale;
181
184
  });
182
185
  const leaves = computed(() => /* @__PURE__ */ extractLeaves(columns.values()));
183
186
  const headers = computed(() => /* @__PURE__ */ resolveHeaders(columns.values()));
184
- const sortable = computed(() => leaves.value.filter((col) => col.sortable === true));
187
+ const sortable = computed(() => leaves.value.filter((col) => toValue(col.sortable) === true));
185
188
  const group = createGroup({ multiple: sortMultiple });
186
189
  const order = shallowReactive([]);
187
190
  watch(sortable, (next) => {
@@ -273,7 +276,7 @@ function createDataTable(options = {}) {
273
276
  };
274
277
  const filterable = computed(() => {
275
278
  const ids = [];
276
- for (const col of leaves.value) if (col.filterable === true) ids.push(String(col.id));
279
+ for (const col of leaves.value) if (toValue(col.filterable) === true) ids.push(String(col.id));
277
280
  return ids;
278
281
  });
279
282
  const customSorts = computed(() => {
@@ -473,12 +476,25 @@ function createDataTable(options = {}) {
473
476
  opened.clear();
474
477
  }
475
478
  };
479
+ function rank(source) {
480
+ const ranked = sortedItems.value;
481
+ const positions = /* @__PURE__ */ new Map();
482
+ for (const [index, row] of ranked.entries()) {
483
+ positions.set(row, index);
484
+ const id = recordId(row);
485
+ if (!/* @__PURE__ */ isNullOrUndefined(id)) positions.set(id, index);
486
+ }
487
+ return [...source].toSorted((a, b) => {
488
+ return (positions.get(a) ?? positions.get(recordId(a)) ?? Infinity) - (positions.get(b) ?? positions.get(recordId(b)) ?? Infinity);
489
+ });
490
+ }
476
491
  return {
477
492
  ...registry,
478
493
  items: visible,
479
494
  allItems,
480
495
  filteredItems,
481
496
  sortedItems,
497
+ rank,
482
498
  columns,
483
499
  leaves,
484
500
  headers,
@@ -1,7 +1,7 @@
1
1
  import { resolveIds, resolveIndexes, useId as useId$1 } from "./utilities/index.mjs";
2
2
  import { i as useContext, t as createTrinity } from "./createTrinity-z-3q9QWR.mjs";
3
- import { t as createSelection } from "./createSelection-CWE554_g.mjs";
4
- import { t as toArray } from "./toArray-C89ZaEuF.mjs";
3
+ import { t as createSelection } from "./createSelection-TB5oK1FG.mjs";
4
+ import { t as toArray } from "./toArray-MY9Kb1Qy.mjs";
5
5
  import { computed, onScopeDispose, reactive, shallowReactive, shallowRef, toRef, toValue } from "vue";
6
6
  //#region src/composables/useProxyRegistry/index.ts
7
7
  /**
@@ -247,7 +247,8 @@ function createGroup(_options = {}) {
247
247
  unselect: () => unselect(id),
248
248
  toggle: () => toggle(id),
249
249
  mix: () => mix(id),
250
- unmix: () => unmix(id)
250
+ unmix: () => unmix(id),
251
+ unregister: () => unregister(id)
251
252
  };
252
253
  const ticket = selection.register(item);
253
254
  if (toValue(registration.indeterminate)) mix(id);
@@ -270,6 +271,14 @@ function createGroup(_options = {}) {
270
271
  mixedIds.clear();
271
272
  selection.reset();
272
273
  }
274
+ function clear() {
275
+ mixedIds.clear();
276
+ selection.clear();
277
+ }
278
+ function dispose() {
279
+ mixedIds.clear();
280
+ selection.dispose();
281
+ }
273
282
  const selectableItems = computed(() => {
274
283
  return proxy.values.filter((item) => !toValue(item.disabled));
275
284
  });
@@ -311,6 +320,8 @@ function createGroup(_options = {}) {
311
320
  offboard,
312
321
  onboard,
313
322
  reset,
323
+ clear,
324
+ dispose,
314
325
  selectAll,
315
326
  unselectAll,
316
327
  toggleAll,
@@ -0,0 +1,157 @@
1
+ import { isNullOrUndefined, isUndefined } from "./utilities/index.mjs";
2
+ import { i as useContext, t as createTrinity } from "./createTrinity-z-3q9QWR.mjs";
3
+ import { hasInjectionContext, inject, watch } from "vue";
4
+ //#region src/composables/createPlugin/index.ts
5
+ /**
6
+ * @module createPlugin
7
+ *
8
+ * @see https://vuejs.org/guide/reusability/plugins.html
9
+ * @see https://0.vuetifyjs.com/composables/foundation/create-plugin
10
+ *
11
+ * @remarks
12
+ * Factory for creating Vue plugins with proper context provision.
13
+ *
14
+ * Wraps the provide function in app.runWithContext() to ensure proper execution context,
15
+ * allowing plugins to safely provide dependency injection contexts at the application level.
16
+ *
17
+ * Also exports `createPluginContext` — a higher-level factory that generates the standard
18
+ * context/plugin/consumer triple for plugin composables, eliminating boilerplate.
19
+ * Supports `persist()` / `restore()` lifecycle hooks for saving and rehydrating plugin state.
20
+ *
21
+ * @example
22
+ * ```ts
23
+ * import { createPlugin } from '@vuetify/v0'
24
+ *
25
+ * const plugin = createPlugin({
26
+ * namespace: 'v0:my-plugin',
27
+ * provide: app => app.provide('my-key', { greet: () => 'hello' }),
28
+ * })
29
+ * // app.use(plugin)
30
+ * ```
31
+ */
32
+ const INSTALLED = Symbol.for("v0:installed-plugins");
33
+ function getInstalled(app) {
34
+ const ctx = app._context;
35
+ return ctx[INSTALLED] ??= /* @__PURE__ */ new Set();
36
+ }
37
+ /**
38
+ * Creates a new Vue plugin.
39
+ *
40
+ * @param options The plugin options.
41
+ * @returns A new Vue plugin.
42
+ *
43
+ * @see https://0.vuetifyjs.com/composables/foundation/create-plugin
44
+ *
45
+ * @example
46
+ * ```ts
47
+ * export const [useContext, provideContext] = createContext<MyContext>('my-plugin')
48
+ *
49
+ * const context = {}
50
+ *
51
+ * export const MyPlugin = createPlugin({
52
+ * namespace: 'my-plugin',
53
+ * provide: (app) => {
54
+ * provideContext(context, app)
55
+ * },
56
+ * setup: (app) => {
57
+ * // Optional setup logic
58
+ * },
59
+ * })
60
+ */
61
+ function createPlugin(options) {
62
+ return { install(app) {
63
+ app.runWithContext(() => {
64
+ const installed = getInstalled(app);
65
+ if (installed.has(options.namespace)) return;
66
+ installed.add(options.namespace);
67
+ options.provide(app);
68
+ options.setup?.(app);
69
+ });
70
+ } };
71
+ }
72
+ function deriveKey(namespace) {
73
+ return namespace.startsWith("v0:") ? namespace.slice(3) : namespace;
74
+ }
75
+ function getPersistedStorage() {
76
+ return useContext("v0:storage");
77
+ }
78
+ /**
79
+ * Creates the three standard functions for a plugin composable.
80
+ *
81
+ * @param defaultNamespace The default DI namespace string (e.g. `'v0:logger'`).
82
+ * @param factory Function that creates the composable context instance from options.
83
+ * @param config Optional setup callback and fallback factory.
84
+ * @returns A readonly tuple: `[createXContext, createXPlugin, useX]`.
85
+ *
86
+ * @example
87
+ * ```ts
88
+ * // Simple — no setup or fallback
89
+ * export const [createStorageContext, createStoragePlugin, useStorage] =
90
+ * createPluginContext('v0:storage', options => createStorage(options))
91
+ *
92
+ * // With fallback — safe outside component instances
93
+ * export const [createLoggerContext, createLoggerPlugin, useLogger] =
94
+ * createPluginContext('v0:logger', options => createLogger(options), {
95
+ * fallback: ns => createFallbackLogger(ns),
96
+ * setup: (context) => {
97
+ * if (__DEV__ && IN_BROWSER) (window as Window & { __v0Logger__?: typeof context }).__v0Logger__ = context
98
+ * },
99
+ * })
100
+ * ```
101
+ */
102
+ function createPluginContext(defaultNamespace, factory, config) {
103
+ function createXContext(_options = {}) {
104
+ const { namespace = defaultNamespace, persist: _persist, ...options } = _options;
105
+ return createTrinity(namespace, factory(options));
106
+ }
107
+ function createXPlugin(_options = {}) {
108
+ const { namespace = defaultNamespace, persist: shouldPersist, ...options } = _options;
109
+ let context;
110
+ return createPlugin({
111
+ namespace,
112
+ provide: (app) => {
113
+ const [, provide, ctx] = createXContext({
114
+ ...options,
115
+ namespace
116
+ });
117
+ context = ctx;
118
+ provide(context, app);
119
+ if (shouldPersist && config?.restore) {
120
+ const storage = getPersistedStorage();
121
+ const key = deriveKey(namespace);
122
+ const saved = storage.get(key);
123
+ if (!/* @__PURE__ */ isNullOrUndefined(saved.value)) config.restore(context, saved.value);
124
+ }
125
+ },
126
+ setup: config?.setup || shouldPersist ? (app) => {
127
+ const ctx = context;
128
+ config?.setup?.(ctx, app, options);
129
+ if (shouldPersist && config?.persist) {
130
+ const storage = getPersistedStorage();
131
+ const key = deriveKey(namespace);
132
+ const stored = storage.get(key);
133
+ const stop = watch(() => config.persist(ctx), (val) => {
134
+ stored.value = val;
135
+ });
136
+ app.onUnmount(stop);
137
+ }
138
+ } : void 0
139
+ });
140
+ }
141
+ function useX(namespace = defaultNamespace) {
142
+ if (config?.fallback) {
143
+ if (!hasInjectionContext()) return config.fallback(namespace);
144
+ const provided = inject(namespace, void 0);
145
+ if (!/* @__PURE__ */ isUndefined(provided)) return provided;
146
+ return config.fallback(namespace);
147
+ }
148
+ return useContext(namespace);
149
+ }
150
+ return [
151
+ createXContext,
152
+ createXPlugin,
153
+ useX
154
+ ];
155
+ }
156
+ //#endregion
157
+ export { createPluginContext as n, createPlugin as t };
@@ -1,6 +1,6 @@
1
1
  import { clamp, isNullOrUndefined, isUndefined, useId as useId$1 } from "./utilities/index.mjs";
2
2
  import { i as useContext, t as createTrinity } from "./createTrinity-z-3q9QWR.mjs";
3
- import { i as useLogger } from "./useLogger-CbvzXCWb.mjs";
3
+ import { i as useLogger } from "./useLogger-CDsgHbzO.mjs";
4
4
  import { shallowReactive, shallowRef } from "vue";
5
5
  //#region src/composables/createRegistry/index.ts
6
6
  /**
@@ -281,12 +281,12 @@ function createRegistry(options) {
281
281
  const valueIsIndex = registration.valueIsIndex ?? valueIsUndefined;
282
282
  if (valueIsIndex) indexDependentCount++;
283
283
  const input = {
284
+ unregister: () => unregister(id),
284
285
  ...registration,
285
286
  id,
286
287
  index,
287
288
  value,
288
- valueIsIndex,
289
- unregister: () => unregister(id)
289
+ valueIsIndex
290
290
  };
291
291
  const ticket = reactive ? shallowReactive(input) : input;
292
292
  if (auto) minted.add(ticket);
@@ -1,6 +1,6 @@
1
1
  import { isUndefined, resolveIds, useId as useId$1 } from "./utilities/index.mjs";
2
2
  import { i as useContext, t as createTrinity } from "./createTrinity-z-3q9QWR.mjs";
3
- import { t as createRegistry } from "./createRegistry-B9cOWny2.mjs";
3
+ import { t as createRegistry } from "./createRegistry-DSQiALGi.mjs";
4
4
  import { computed, isRef, shallowReactive, toRaw, toRef, toValue } from "vue";
5
5
  //#region src/composables/createModel/index.ts
6
6
  /**
@@ -126,6 +126,7 @@ function createModel(_options = {}) {
126
126
  const id = registration.id ?? /* @__PURE__ */ useId$1();
127
127
  const item = {
128
128
  disabled: false,
129
+ unregister: () => unregister(id),
129
130
  ...registration,
130
131
  isSelected: toRef(() => selected(id)),
131
132
  id
@@ -1,5 +1,5 @@
1
1
  import { i as useContext, t as createTrinity } from "./createTrinity-z-3q9QWR.mjs";
2
- import { t as createSelection } from "./createSelection-CWE554_g.mjs";
2
+ import { t as createSelection } from "./createSelection-TB5oK1FG.mjs";
3
3
  import { toRef } from "vue";
4
4
  //#region src/composables/createSingle/index.ts
5
5
  /**
@@ -1,7 +1,7 @@
1
1
  import { UNSAFE_KEYS, isObject, isString, isUndefined } from "./utilities/index.mjs";
2
2
  import { i as useContext, t as createTrinity } from "./createTrinity-z-3q9QWR.mjs";
3
- import { i as useLogger } from "./useLogger-CbvzXCWb.mjs";
4
- import { t as createRegistry } from "./createRegistry-B9cOWny2.mjs";
3
+ import { i as useLogger } from "./useLogger-CDsgHbzO.mjs";
4
+ import { t as createRegistry } from "./createRegistry-DSQiALGi.mjs";
5
5
  //#region src/composables/createTokens/index.ts
6
6
  /**
7
7
  * @module createTokens
@@ -1,2 +1,2 @@
1
- import { t as ClientDataTableAdapter } from "../../../v0-DotXXGXU.mjs";
1
+ import { t as ClientDataTableAdapter } from "../../../v0-GI9U-rPA.mjs";
2
2
  export { ClientDataTableAdapter };
@@ -1,2 +1,2 @@
1
- import { t as ClientDataTableAdapter } from "../../../v0-A4GLojAr.mjs";
1
+ import { t as ClientDataTableAdapter } from "../../../v0-yZ2ZUtVF.mjs";
2
2
  export { ClientDataTableAdapter };
@@ -1,5 +1,5 @@
1
- import { a as SortEntry, i as SortDirection, n as DataTableAdapterContext, r as DataTableAdapterResult, t as DataTableAdapter } from "../../adapter-_srNCBEi.mjs";
2
- import { n as ServerDataTableAdapterOptions, t as ServerDataTableAdapter } from "../../server-DbtTGb67.mjs";
3
- import { t as ClientDataTableAdapter } from "../../v0-DotXXGXU.mjs";
4
- import { t as VirtualDataTableAdapter } from "../../virtual-C-NsLue0.mjs";
1
+ import { a as SortEntry, i as SortDirection, n as DataTableAdapterContext, r as DataTableAdapterResult, t as DataTableAdapter } from "../../adapter-PDTe5nFT.mjs";
2
+ import { n as ServerDataTableAdapterOptions, t as ServerDataTableAdapter } from "../../server-5vbJ7GGs.mjs";
3
+ import { t as ClientDataTableAdapter } from "../../v0-GI9U-rPA.mjs";
4
+ import { t as VirtualDataTableAdapter } from "../../virtual-JIdFLpTQ.mjs";
5
5
  export { ClientDataTableAdapter, DataTableAdapter, DataTableAdapterContext, DataTableAdapterResult, ServerDataTableAdapter, ServerDataTableAdapterOptions, SortDirection, SortEntry, VirtualDataTableAdapter };
@@ -1,5 +1,5 @@
1
- import { t as DataTableAdapter } from "../../adapter-CVoWg0sw.mjs";
2
- import { t as ClientDataTableAdapter } from "../../v0-A4GLojAr.mjs";
3
- import { t as ServerDataTableAdapter } from "../../server-D5BJBjB0.mjs";
4
- import { t as VirtualDataTableAdapter } from "../../virtual-DFvOoeG6.mjs";
1
+ import { t as DataTableAdapter } from "../../adapter-BiQV5j8B.mjs";
2
+ import { t as ClientDataTableAdapter } from "../../v0-yZ2ZUtVF.mjs";
3
+ import { t as ServerDataTableAdapter } from "../../server-m7iD1vOr.mjs";
4
+ import { t as VirtualDataTableAdapter } from "../../virtual-Bbu26O_h.mjs";
5
5
  export { ClientDataTableAdapter, DataTableAdapter, ServerDataTableAdapter, VirtualDataTableAdapter };
@@ -1,2 +1,2 @@
1
- import { n as ServerDataTableAdapterOptions, t as ServerDataTableAdapter } from "../../../server-DbtTGb67.mjs";
1
+ import { n as ServerDataTableAdapterOptions, t as ServerDataTableAdapter } from "../../../server-5vbJ7GGs.mjs";
2
2
  export { ServerDataTableAdapter, ServerDataTableAdapterOptions };
@@ -1,2 +1,2 @@
1
- import { t as ServerDataTableAdapter } from "../../../server-D5BJBjB0.mjs";
1
+ import { t as ServerDataTableAdapter } from "../../../server-m7iD1vOr.mjs";
2
2
  export { ServerDataTableAdapter };
@@ -1,2 +1,2 @@
1
- import { t as VirtualDataTableAdapter } from "../../../virtual-C-NsLue0.mjs";
1
+ import { t as VirtualDataTableAdapter } from "../../../virtual-JIdFLpTQ.mjs";
2
2
  export { VirtualDataTableAdapter };
@@ -1,2 +1,2 @@
1
- import { t as VirtualDataTableAdapter } from "../../../virtual-DFvOoeG6.mjs";
1
+ import { t as VirtualDataTableAdapter } from "../../../virtual-Bbu26O_h.mjs";
2
2
  export { VirtualDataTableAdapter };
@@ -1,6 +1,6 @@
1
- import { a as SortEntry, i as SortDirection, n as DataTableAdapterContext, r as DataTableAdapterResult, t as DataTableAdapter } from "../adapter-_srNCBEi.mjs";
2
- import { _ as ColumnNode, a as DataTableExpansion, b as extractLeaves, c as DataTableOptions, d as DataTableTicket, f as DataTableTicketInput, g as useDataTable, h as createDataTableContext, i as DataTableContextOptions, l as DataTableSelection, m as createDataTable, n as DataTableColumnTicketInput, o as DataTableGroup, p as SelectStrategy, r as DataTableContext, s as DataTableGrouping, t as DataTableColumnTicket, u as DataTableSort, v as InternalHeader, x as resolveHeaders, y as computeDepth } from "../index-DCtHbY0a.mjs";
3
- import { n as ServerDataTableAdapterOptions, t as ServerDataTableAdapter } from "../server-DbtTGb67.mjs";
4
- import { t as ClientDataTableAdapter } from "../v0-DotXXGXU.mjs";
5
- import { t as VirtualDataTableAdapter } from "../virtual-C-NsLue0.mjs";
1
+ import { a as SortEntry, i as SortDirection, n as DataTableAdapterContext, r as DataTableAdapterResult, t as DataTableAdapter } from "../adapter-PDTe5nFT.mjs";
2
+ import { _ as ColumnNode, a as DataTableExpansion, b as extractLeaves, c as DataTableOptions, d as DataTableTicket, f as DataTableTicketInput, g as useDataTable, h as createDataTableContext, i as DataTableContextOptions, l as DataTableSelection, m as createDataTable, n as DataTableColumnTicketInput, o as DataTableGroup, p as SelectStrategy, r as DataTableContext, s as DataTableGrouping, t as DataTableColumnTicket, u as DataTableSort, v as InternalHeader, x as resolveHeaders, y as computeDepth } from "../index-3bThcqCN.mjs";
3
+ import { n as ServerDataTableAdapterOptions, t as ServerDataTableAdapter } from "../server-5vbJ7GGs.mjs";
4
+ import { t as ClientDataTableAdapter } from "../v0-GI9U-rPA.mjs";
5
+ import { t as VirtualDataTableAdapter } from "../virtual-JIdFLpTQ.mjs";
6
6
  export { ClientDataTableAdapter, ColumnNode, DataTableAdapter, DataTableAdapterContext, DataTableAdapterResult, DataTableColumnTicket, DataTableColumnTicketInput, DataTableContext, DataTableContextOptions, DataTableExpansion, DataTableGroup, DataTableGrouping, DataTableOptions, DataTableSelection, DataTableSort, DataTableTicket, DataTableTicketInput, InternalHeader, SelectStrategy, ServerDataTableAdapter, ServerDataTableAdapterOptions, SortDirection, SortEntry, VirtualDataTableAdapter, computeDepth, createDataTable, createDataTableContext, extractLeaves, resolveHeaders, useDataTable };
@@ -1,6 +1,6 @@
1
- import { t as DataTableAdapter } from "../adapter-CVoWg0sw.mjs";
2
- import { t as ClientDataTableAdapter } from "../v0-A4GLojAr.mjs";
3
- import { a as extractLeaves, i as computeDepth, n as createDataTableContext, o as resolveHeaders, r as useDataTable, t as createDataTable } from "../createDataTable-DgyHBfAr.mjs";
4
- import { t as ServerDataTableAdapter } from "../server-D5BJBjB0.mjs";
5
- import { t as VirtualDataTableAdapter } from "../virtual-DFvOoeG6.mjs";
1
+ import { t as DataTableAdapter } from "../adapter-BiQV5j8B.mjs";
2
+ import { t as ClientDataTableAdapter } from "../v0-yZ2ZUtVF.mjs";
3
+ import { a as extractLeaves, i as computeDepth, n as createDataTableContext, o as resolveHeaders, r as useDataTable, t as createDataTable } from "../createDataTable-OCGnpy-N.mjs";
4
+ import { t as ServerDataTableAdapter } from "../server-m7iD1vOr.mjs";
5
+ import { t as VirtualDataTableAdapter } from "../virtual-Bbu26O_h.mjs";
6
6
  export { ClientDataTableAdapter, DataTableAdapter, ServerDataTableAdapter, VirtualDataTableAdapter, computeDepth, createDataTable, createDataTableContext, extractLeaves, resolveHeaders, useDataTable };
@@ -1,4 +1,4 @@
1
- import { t as DateAdapter } from "../adapter-Bc0yPSfo.mjs";
1
+ import { t as DateAdapter } from "../adapter-D5nT3bLw.mjs";
2
2
  import { Temporal } from "@js-temporal/polyfill";
3
3
 
4
4
  //#region src/composables/useDate/adapters/v0.d.ts
@@ -1,6 +1,6 @@
1
- import { t as IN_BROWSER } from "../globals-CtaXlEOI.mjs";
1
+ import { t as IN_BROWSER } from "../globals-wvVdMRFF.mjs";
2
2
  import { isNull, isNullOrUndefined, isNumber, isString } from "../utilities/index.mjs";
3
- import { n as deriveWeekInfo, t as DateAdapter } from "../adapter-BCtceV3b.mjs";
3
+ import { n as deriveWeekInfo, t as DateAdapter } from "../adapter-BuSfpxur.mjs";
4
4
  import { Temporal } from "@js-temporal/polyfill";
5
5
  //#region src/composables/useDate/adapters/v0.ts
6
6
  /**
@@ -1,2 +1,2 @@
1
- import { t as FlagsmithFeaturesAdapter } from "../../../flagsmith-DA2GCyGv.mjs";
1
+ import { t as FlagsmithFeaturesAdapter } from "../../../flagsmith-DcIDrI7_.mjs";
2
2
  export { FlagsmithFeaturesAdapter };
@@ -1,5 +1,5 @@
1
1
  import { UNSAFE_KEYS, isNullOrUndefined } from "../../../utilities/index.mjs";
2
- import { t as FeaturesAdapter } from "../../../adapter-CTsckKAR.mjs";
2
+ import { t as FeaturesAdapter } from "../../../adapter-8UADsA3-.mjs";
3
3
  //#region src/composables/useFeatures/adapters/flagsmith.ts
4
4
  /**
5
5
  * @module FlagsmithFeaturesAdapter
@@ -1,2 +1,2 @@
1
- import { t as LaunchDarklyFeaturesAdapter } from "../../../launchdarkly-Bp8p9PMD.mjs";
1
+ import { t as LaunchDarklyFeaturesAdapter } from "../../../launchdarkly-CUzunYol.mjs";
2
2
  export { LaunchDarklyFeaturesAdapter };
@@ -1,5 +1,5 @@
1
1
  import { UNSAFE_KEYS, isBoolean } from "../../../utilities/index.mjs";
2
- import { t as FeaturesAdapter } from "../../../adapter-CTsckKAR.mjs";
2
+ import { t as FeaturesAdapter } from "../../../adapter-8UADsA3-.mjs";
3
3
  //#region src/composables/useFeatures/adapters/launchdarkly.ts
4
4
  /**
5
5
  * @module LaunchDarklyFeaturesAdapter
@@ -1,2 +1,2 @@
1
- import { t as PostHogFeaturesAdapter } from "../../../posthog-sFqk0bGy.mjs";
1
+ import { t as PostHogFeaturesAdapter } from "../../../posthog-CJAYssdr.mjs";
2
2
  export { PostHogFeaturesAdapter };
@@ -1,6 +1,6 @@
1
- import { t as IN_BROWSER } from "../../../globals-CtaXlEOI.mjs";
1
+ import { t as IN_BROWSER } from "../../../globals-wvVdMRFF.mjs";
2
2
  import { UNSAFE_KEYS, isBoolean, isNullOrUndefined } from "../../../utilities/index.mjs";
3
- import { t as FeaturesAdapter } from "../../../adapter-CTsckKAR.mjs";
3
+ import { t as FeaturesAdapter } from "../../../adapter-8UADsA3-.mjs";
4
4
  //#region src/composables/useFeatures/adapters/posthog.ts
5
5
  /**
6
6
  * @module PostHogFeaturesAdapter
@@ -1,3 +1,3 @@
1
- import { _r as createFeatures, br as useFeatures, dr as FeatureContext, fr as FeatureContextOptions, gr as FeatureTicketInput, hr as FeatureTicket, mr as FeaturePluginOptions, pr as FeatureOptions, vr as createFeaturesContext, yr as createFeaturesPlugin } from "../index-Dc7lKT6q.mjs";
2
- import { n as FeaturesAdapterFlags, r as FeaturesAdapterValue, t as FeaturesAdapter } from "../adapter-Butx_2UU.mjs";
1
+ import { _r as FeatureTicketInput, br as createFeaturesPlugin, fr as FeatureContext, gr as FeatureTicket, hr as FeaturePluginOptions, mr as FeatureOptions, pr as FeatureContextOptions, vr as createFeatures, xr as useFeatures, yr as createFeaturesContext } from "../index-Dgkt7Ve9.mjs";
2
+ import { n as FeaturesAdapterFlags, r as FeaturesAdapterValue, t as FeaturesAdapter } from "../adapter-BXunW_mw.mjs";
3
3
  export { FeatureContext, FeatureContextOptions, FeatureOptions, FeaturePluginOptions, FeatureTicket, FeatureTicketInput, FeaturesAdapter, FeaturesAdapterFlags, FeaturesAdapterValue, createFeatures, createFeaturesContext, createFeaturesPlugin, useFeatures };
@@ -1,3 +1,3 @@
1
- import { t as FeaturesAdapter } from "../adapter-CTsckKAR.mjs";
2
- import { i as useFeatures, n as createFeaturesContext, r as createFeaturesPlugin, t as createFeatures } from "../useFeatures-YJmONiU7.mjs";
1
+ import { t as FeaturesAdapter } from "../adapter-8UADsA3-.mjs";
2
+ import { i as useFeatures, n as createFeaturesContext, r as createFeaturesPlugin, t as createFeatures } from "../useFeatures-CTpkM6hV.mjs";
3
3
  export { FeaturesAdapter, createFeatures, createFeaturesContext, createFeaturesPlugin, useFeatures };
@@ -1,4 +1,4 @@
1
- import { n as FeaturesAdapterFlags, t as FeaturesAdapter } from "./adapter-Butx_2UU.mjs";
1
+ import { n as FeaturesAdapterFlags, t as FeaturesAdapter } from "./adapter-BXunW_mw.mjs";
2
2
  import { IFlagsmith, IInitConfig } from "@flagsmith/flagsmith";
3
3
 
4
4
  //#region src/composables/useFeatures/adapters/flagsmith.d.ts
@@ -5,7 +5,7 @@ const SUPPORTS_MATCH_MEDIA = IN_BROWSER && "matchMedia" in window && typeof wind
5
5
  const SUPPORTS_OBSERVER = IN_BROWSER && "ResizeObserver" in window;
6
6
  const SUPPORTS_INTERSECTION_OBSERVER = IN_BROWSER && "IntersectionObserver" in window;
7
7
  const SUPPORTS_MUTATION_OBSERVER = IN_BROWSER && "MutationObserver" in window;
8
- const version = "1.1.0";
8
+ const version = "1.2.1";
9
9
  /* v8 ignore next -- build-time constant, __DEV__ short-circuits in tests */
10
10
  const __LOGGER_ENABLED__ = typeof (process.env.NODE_ENV !== "production") !== "undefined" && process.env.NODE_ENV !== "production" || typeof process.env.VITE_LOGGER_ENABLED !== "undefined" && process.env.VITE_LOGGER_ENABLED === "true";
11
11
  //#endregion