@vuetify/v0 0.1.13 → 0.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 (154) hide show
  1. package/README.md +124 -58
  2. package/dist/{adapter-DvT8lTup.d.mts → adapter-BZjmDNJF.d.mts} +7 -7
  3. package/dist/{adapter-DXRKF27V.mjs → adapter-CCIeOzqr.mjs} +10 -8
  4. package/dist/{adapter-D3dUnE__.d.mts → adapter-CcHB7rs3.d.mts} +2 -2
  5. package/dist/adapter-Drq1v5wV.mjs +27 -0
  6. package/dist/adapter-T7AedXkz.d.mts +96 -0
  7. package/dist/adapters-BbNfjyvY.mjs +5 -0
  8. package/dist/adapters-BhNTUuxE.mjs +2 -0
  9. package/dist/adapters-BzRMo72Y.mjs +4 -0
  10. package/dist/adapters-Cd8NDs18.mjs +3 -0
  11. package/dist/adapters-_DyP1X4U.mjs +2 -0
  12. package/dist/browser/index.js +13363 -9466
  13. package/dist/components/index.d.mts +3 -2
  14. package/dist/components/index.mjs +2 -34
  15. package/dist/{components-C6stt5NV.mjs → components-C142GPl_.mjs} +5676 -2942
  16. package/dist/composables/index.d.mts +19 -19
  17. package/dist/composables/index.mjs +26 -32
  18. package/dist/{consola-C1OjyZVf.d.mts → consola-Byg0ybzh.d.mts} +2 -2
  19. package/dist/constants/index.d.mts +1 -1
  20. package/dist/constants/index.mjs +1 -1
  21. package/dist/{createDataTable-DHxv--aj.mjs → createDataTable-DKE5QsMe.mjs} +7 -4
  22. package/dist/{createGroup-BqN4Ve83.mjs → createGroup-CzRZ9COh.mjs} +24 -22
  23. package/dist/{createPagination-CeGMgKCx.mjs → createPagination-Tp4C4He8.mjs} +6 -4
  24. package/dist/{createSelection-BsHsL_qW.mjs → createSelection-Dsb3I0zm.mjs} +17 -13
  25. package/dist/{createSingle-BBwE5j_k.mjs → createSingle-C7IGUjP6.mjs} +11 -9
  26. package/dist/{createTokens-CpapxkYX.mjs → createTokens-CHTawmud.mjs} +9 -8
  27. package/dist/{createTrinity-C_c8eedz.mjs → createTrinity-vvXk0ARD.mjs} +3 -3
  28. package/dist/data-table/adapters/client/index.d.mts +1 -1
  29. package/dist/data-table/adapters/client/index.mjs +1 -6
  30. package/dist/data-table/adapters/index.d.mts +4 -4
  31. package/dist/data-table/adapters/index.mjs +5 -9
  32. package/dist/data-table/adapters/server/index.d.mts +1 -1
  33. package/dist/data-table/adapters/server/index.mjs +1 -4
  34. package/dist/data-table/adapters/virtual/index.d.mts +1 -1
  35. package/dist/data-table/adapters/virtual/index.mjs +1 -6
  36. package/dist/data-table/index.d.mts +5 -5
  37. package/dist/data-table/index.mjs +5 -21
  38. package/dist/date/index.d.mts +2 -1
  39. package/dist/date/index.mjs +45 -6954
  40. package/dist/features/adapters/flagsmith/index.d.mts +1 -13
  41. package/dist/features/adapters/flagsmith/index.mjs +1 -1
  42. package/dist/features/adapters/launchdarkly/index.d.mts +1 -12
  43. package/dist/features/adapters/launchdarkly/index.mjs +1 -1
  44. package/dist/features/adapters/posthog/index.d.mts +1 -12
  45. package/dist/features/adapters/posthog/index.mjs +1 -2
  46. package/dist/features/index.d.mts +2 -2
  47. package/dist/features/index.mjs +1 -12
  48. package/dist/{flagsmith-CrWUeIhT.mjs → flagsmith-DQnnahG5.mjs} +9 -2
  49. package/dist/{globals-DCznFHqN.mjs → globals-BrRJkuSY.mjs} +1 -1
  50. package/dist/{index-CeNfBYuo.d.mts → index-76fQGkkO.d.mts} +1 -1
  51. package/dist/{index-vcUKp9YE.d.mts → index-BFuSOgUi.d.mts} +8768 -5372
  52. package/dist/{index-YyqYAay2.d.mts → index-BUsrN1vL.d.mts} +29 -29
  53. package/dist/{index-Dor6eAEc.d.mts → index-B_AlCD7t.d.mts} +1 -1
  54. package/dist/{index-CBER-Sxt.d.mts → index-B_XLHftL.d.mts} +4202 -3645
  55. package/dist/{index-dJKXAO5D.d.mts → index-CDcl4wPo.d.mts} +1 -1
  56. package/dist/{index-CdUIc68E.d.mts → index-DoGxDgdN.d.mts} +3 -3
  57. package/dist/{index-B_pScNDG.d.mts → index-Dxx0eMLi.d.mts} +40 -2
  58. package/dist/index-F2Fmxnzi.d.mts +13 -0
  59. package/dist/index-M8EpGjjA.d.mts +13 -0
  60. package/dist/index-PWQavSPf.d.mts +1 -0
  61. package/dist/index-c55Utzva.d.mts +1 -0
  62. package/dist/index-tyzwWFHS.d.mts +14 -0
  63. package/dist/index.d.mts +23 -23
  64. package/dist/index.mjs +29 -34
  65. package/dist/json/attributes.json +918 -82
  66. package/dist/json/importMap.json +210 -2
  67. package/dist/json/tags.json +448 -14
  68. package/dist/json/web-types.json +3670 -1052
  69. package/dist/{launchdarkly-DEqUn7qm.mjs → launchdarkly-2_48EJ1_.mjs} +8 -1
  70. package/dist/locale/adapters/index.d.mts +2 -2
  71. package/dist/locale/adapters/index.mjs +2 -3
  72. package/dist/locale/adapters/v0/index.d.mts +1 -1
  73. package/dist/locale/adapters/v0/index.mjs +1 -2
  74. package/dist/locale/adapters/vue-i18n/index.d.mts +1 -1
  75. package/dist/locale/adapters/vue-i18n/index.mjs +0 -1
  76. package/dist/locale/index.d.mts +3 -3
  77. package/dist/locale/index.mjs +2 -12
  78. package/dist/logger/adapters/consola/index.d.mts +1 -1
  79. package/dist/logger/adapters/index.d.mts +4 -4
  80. package/dist/logger/adapters/index.mjs +3 -4
  81. package/dist/logger/adapters/pino/index.d.mts +2 -2
  82. package/dist/logger/adapters/pino/index.mjs +1 -2
  83. package/dist/logger/adapters/v0/index.d.mts +1 -1
  84. package/dist/logger/adapters/v0/index.mjs +1 -2
  85. package/dist/logger/index.d.mts +5 -5
  86. package/dist/logger/index.mjs +3 -6
  87. package/dist/notifications/index.d.mts +1 -1
  88. package/dist/notifications/index.mjs +1 -1
  89. package/dist/palettes/ant/index.d.mts +1 -1
  90. package/dist/palettes/index.d.mts +3 -3
  91. package/dist/palettes/material/index.d.mts +1 -1
  92. package/dist/palettes/md1/index.d.mts +1 -1
  93. package/dist/palettes/md2/index.d.mts +1 -1
  94. package/dist/palettes/radix/index.d.mts +1 -1
  95. package/dist/palettes/tailwind/index.d.mts +1 -1
  96. package/dist/permissions/adapters/index.d.mts +1 -2
  97. package/dist/permissions/adapters/index.mjs +2 -3
  98. package/dist/permissions/adapters/v0/index.d.mts +1 -1
  99. package/dist/permissions/adapters/v0/index.mjs +1 -2
  100. package/dist/permissions/index.d.mts +1 -1
  101. package/dist/permissions/index.mjs +2 -11
  102. package/dist/{pino-B7tJ3m18.mjs → pino-9L79n6y6.mjs} +0 -7
  103. package/dist/{pino-CM1iLXmi.d.mts → pino-BxddSW2l.d.mts} +11 -3
  104. package/dist/{posthog-BugD9w3g.mjs → posthog-Ccm8FQfD.mjs} +8 -8
  105. package/dist/rules/index.d.mts +1 -1
  106. package/dist/rules/index.mjs +1 -13
  107. package/dist/{server-CYYGvVps.mjs → server-CIftA0pK.mjs} +1 -1
  108. package/dist/{server-CSLVeyyI.d.mts → server-DNUTnISs.d.mts} +1 -1
  109. package/dist/storage/adapters/index.d.mts +2 -2
  110. package/dist/storage/adapters/memory/index.d.mts +1 -1
  111. package/dist/storage/index.d.mts +3 -3
  112. package/dist/storage/index.mjs +1 -31
  113. package/dist/theme/adapters/index.d.mts +2 -2
  114. package/dist/theme/adapters/index.mjs +5 -4
  115. package/dist/theme/adapters/unhead/index.d.mts +2 -0
  116. package/dist/theme/adapters/unhead/index.mjs +2 -0
  117. package/dist/theme/adapters/v0/index.d.mts +2 -2
  118. package/dist/theme/adapters/v0/index.mjs +2 -3
  119. package/dist/theme/index.d.mts +2 -2
  120. package/dist/theme/index.mjs +4 -13
  121. package/dist/{toArray-VdROPpy-.mjs → toArray-doLQVI56.mjs} +2 -0
  122. package/dist/types/index.d.mts +1 -1
  123. package/dist/unhead--58lO3Z-.mjs +64 -0
  124. package/dist/{useClickOutside-CBsF7hh4.mjs → useClickOutside-BjO3Nty9.mjs} +5982 -4928
  125. package/dist/{useFeatures-CkIfpj7l.mjs → useFeatures-D9bGOvh4.mjs} +11 -9
  126. package/dist/{useLocale-D3btFSZv.mjs → useLocale-BRQTt3Ka.mjs} +15 -10
  127. package/dist/{useLogger-C3crtWEd.mjs → useLogger-Daz-Zr0z.mjs} +34 -10
  128. package/dist/{usePermissions-DmaYLhw5.mjs → usePermissions-Yp3guoLH.mjs} +6 -5
  129. package/dist/{useRules-Dkj_-0ay.mjs → useRules-BFPH7q8w.mjs} +5 -2
  130. package/dist/{useTheme-MJA1p7YK.mjs → useTheme-zRa0Nh_g.mjs} +16 -12
  131. package/dist/utilities/index.d.mts +2 -2
  132. package/dist/utilities/index.mjs +28 -13
  133. package/dist/{v0-CQ2qHo5-.d.mts → v0-BAG8p0si.d.mts} +1 -1
  134. package/dist/{v0-2IcFDTW5.mjs → v0-Bno8FQ_F.mjs} +1 -1
  135. package/dist/{v0-3zDdS4II.d.mts → v0-BpgPZ1qB.d.mts} +1 -1
  136. package/dist/{v0-JPf99NKg.d.mts → v0-C2UMaHUa.d.mts} +1 -1
  137. package/dist/{v0-pzmWhctY.mjs → v0-CcV0VwYd.mjs} +7 -32
  138. package/dist/{v0-CB-GCB-s.mjs → v0-D-AEQbvj.mjs} +1 -1
  139. package/dist/{v0-D87sooe0.mjs → v0-DOq_Ia5H.mjs} +2 -2
  140. package/dist/{virtual-Dg0Cm5Hn.d.mts → virtual-BaQWQ9ji.d.mts} +1 -1
  141. package/dist/{virtual-D75KhU6Q.mjs → virtual-D1HwNBLS.mjs} +2 -2
  142. package/package.json +11 -14
  143. package/dist/adapter-BWMm0JAQ.d.mts +0 -1087
  144. package/dist/adapters-BjeDmKc6.mjs +0 -1
  145. package/dist/adapters-Bv5aRv3l.mjs +0 -1
  146. package/dist/adapters-C66XaKkw.mjs +0 -1
  147. package/dist/adapters-DkVblyML.mjs +0 -1
  148. package/dist/adapters-uJLWGQJl.mjs +0 -1
  149. package/dist/v0-B6ILFiMN.d.mts +0 -10
  150. /package/dist/{adapter-CJQav2JB.d.mts → adapter-DNKjooxI.d.mts} +0 -0
  151. /package/dist/{index-BvTD7kU8.d.mts → index-D6mQAEs2.d.mts} +0 -0
  152. /package/dist/{index-DSao7i57.d.mts → index-DxruGeVY.d.mts} +0 -0
  153. /package/dist/{memory-DyBabFV1.d.mts → memory-DUyWthic.d.mts} +0 -0
  154. /package/dist/{v0-B1QQGE4O.mjs → v0-4OQBCeda.mjs} +0 -0
@@ -1,7 +1,10 @@
1
1
  import { isArray, isBoolean, isFunction, isObject } from "./utilities/index.mjs";
2
- import { o as createPluginContext } from "./useLogger-C3crtWEd.mjs";
3
- import { t as createTokens } from "./createTokens-CpapxkYX.mjs";
4
- import { t as createGroup } from "./createGroup-BqN4Ve83.mjs";
2
+ import { o as createPluginContext } from "./useLogger-Daz-Zr0z.mjs";
3
+ import { t as createTokens } from "./createTokens-CHTawmud.mjs";
4
+ import { t as createGroup } from "./createGroup-CzRZ9COh.mjs";
5
+ import "./flagsmith-DQnnahG5.mjs";
6
+ import "./launchdarkly-2_48EJ1_.mjs";
7
+ import "./posthog-Ccm8FQfD.mjs";
5
8
  //#region src/composables/useFeatures/adapters/generic/index.ts
6
9
  var FeaturesAdapter = class {};
7
10
  //#endregion
@@ -20,17 +23,15 @@ var FeaturesAdapter = class {};
20
23
  * - Auto-selection of enabled features
21
24
  * - Multi-select support for feature combinations
22
25
  * - Perfect for A/B testing, progressive rollout, feature toggles
23
- * - Adapter pattern for external feature flag services
26
+ * - Adapter pattern for external feature flag services (Generic, LaunchDarkly, Flagsmith)
24
27
  *
25
- * Inheritance chain: useRegistry → createSelection → createGroup → createFeatures
26
- * Integrates with useTokens for token-based features.
28
+ * Inheritance chain: createRegistry → createSelection → createGroup → createFeatures
29
+ * Integrates with createTokens for token-based features.
27
30
  */
28
31
  /**
29
32
  * Creates a new features instance.
30
33
  *
31
34
  * @param options The options for the features instance.
32
- * @template Z The type of the feature ticket.
33
- * @template E The type of the feature context.
34
35
  * @returns A new features instance.
35
36
  *
36
37
  * @see https://0.vuetifyjs.com/composables/plugins/use-features
@@ -102,7 +103,8 @@ function createFeaturesFallback() {
102
103
  return {
103
104
  size: 0,
104
105
  variation: (_id, fallback = null) => fallback,
105
- sync: () => {}
106
+ sync: () => {},
107
+ onboard: () => []
106
108
  };
107
109
  }
108
110
  const [createFeaturesContext, createFeaturesPlugin, useFeatures] = createPluginContext("v0:features", (options) => createFeatures(options), {
@@ -1,29 +1,30 @@
1
- import { o as createPluginContext } from "./useLogger-C3crtWEd.mjs";
2
- import { r as flatten, t as createTokens } from "./createTokens-CpapxkYX.mjs";
3
- import { t as createSingle } from "./createSingle-BBwE5j_k.mjs";
4
- import { t as Vuetify0LocaleAdapter } from "./v0-CB-GCB-s.mjs";
1
+ import { o as createPluginContext } from "./useLogger-Daz-Zr0z.mjs";
2
+ import { r as flatten, t as createTokens } from "./createTokens-CHTawmud.mjs";
3
+ import { t as createSingle } from "./createSingle-C7IGUjP6.mjs";
4
+ import { t as Vuetify0LocaleAdapter } from "./v0-D-AEQbvj.mjs";
5
+ import "./adapters-_DyP1X4U.mjs";
5
6
  //#region src/composables/useLocale/index.ts
6
7
  /**
7
8
  * @module useLocale
8
9
  *
10
+ * @see https://0.vuetifyjs.com/composables/plugins/use-locale
11
+ *
9
12
  * @remarks
10
13
  * Internationalization (i18n) composable with adapter pattern for message translation.
11
14
  *
12
15
  * Key features:
13
16
  * - Locale selection with createSingle
14
- * - Token-based message storage with useTokens
17
+ * - Token-based message storage with createTokens
15
18
  * - Numbered and named placeholder support ({0}, {name})
16
19
  * - Number formatting with Intl.NumberFormat
17
- * - Adapter pattern for integration with i18n providers
20
+ * - Adapter pattern for integration with i18n providers (VueI18nLocaleAdapter included)
18
21
  *
19
- * Integrates with createSingle for locale selection and useTokens for message resolution.
22
+ * Integrates with createSingle for locale selection and createTokens for message resolution.
20
23
  */
21
24
  /**
22
25
  * Creates a new locale instance.
23
26
  *
24
27
  * @param options The options for the locale instance.
25
- * @template Z The type of the locale ticket.
26
- * @template E The type of the locale context.
27
28
  * @returns A new locale instance.
28
29
  *
29
30
  * @see https://0.vuetifyjs.com/composables/plugins/use-locale
@@ -70,6 +71,10 @@ function createLocaleFallback() {
70
71
  n: String
71
72
  };
72
73
  }
73
- const [createLocaleContext, createLocalePlugin, useLocale] = createPluginContext("v0:locale", (options) => createLocale(options), { fallback: () => createLocaleFallback() });
74
+ const [createLocaleContext, createLocalePlugin, useLocale] = createPluginContext("v0:locale", (options) => createLocale(options), {
75
+ fallback: () => createLocaleFallback(),
76
+ persist: (ctx) => ctx.selectedId.value,
77
+ restore: (ctx, saved) => ctx.select(saved)
78
+ });
74
79
  //#endregion
75
80
  export { useLocale as a, createLocalePlugin as i, createLocaleContext as n, createLocaleFallback as r, createLocale as t };
@@ -1,8 +1,9 @@
1
- import { s as __LOGGER_ENABLED__, t as IN_BROWSER } from "./globals-DCznFHqN.mjs";
2
- import { isUndefined } from "./utilities/index.mjs";
3
- import { i as useContext, n as createContext, t as createTrinity } from "./createTrinity-C_c8eedz.mjs";
4
- import { t as Vuetify0LoggerAdapter } from "./v0-2IcFDTW5.mjs";
5
- import { hasInjectionContext } from "vue";
1
+ import { s as __LOGGER_ENABLED__, t as IN_BROWSER } from "./globals-BrRJkuSY.mjs";
2
+ import { isNullOrUndefined } from "./utilities/index.mjs";
3
+ import { i as useContext, n as createContext, t as createTrinity } from "./createTrinity-vvXk0ARD.mjs";
4
+ import { t as Vuetify0LoggerAdapter } from "./v0-Bno8FQ_F.mjs";
5
+ import "./adapters-Cd8NDs18.mjs";
6
+ import { hasInjectionContext, watch } from "vue";
6
7
  //#region src/composables/createPlugin/index.ts
7
8
  /**
8
9
  * @module createPlugin
@@ -18,6 +19,7 @@ import { hasInjectionContext } from "vue";
18
19
  *
19
20
  * Also exports `createPluginContext` — a higher-level factory that generates the standard
20
21
  * context/plugin/consumer triple for plugin composables, eliminating boilerplate.
22
+ * Supports `persist()` / `restore()` lifecycle hooks for saving and rehydrating plugin state.
21
23
  */
22
24
  const INSTALLED = Symbol.for("v0:installed-plugins");
23
25
  function getInstalled(app) {
@@ -30,7 +32,7 @@ function getInstalled(app) {
30
32
  * @param options The plugin options.
31
33
  * @returns A new Vue plugin.
32
34
  *
33
- * @see https://0.vuetifyjs.com/composables/foundation/create-plugin#create-plugin
35
+ * @see https://0.vuetifyjs.com/composables/foundation/create-plugin
34
36
  *
35
37
  * @example
36
38
  * ```ts
@@ -59,6 +61,12 @@ function createPlugin(options) {
59
61
  });
60
62
  } };
61
63
  }
64
+ function deriveKey(namespace) {
65
+ return namespace.startsWith("v0:") ? namespace.slice(3) : namespace;
66
+ }
67
+ function getPersistedStorage() {
68
+ return useContext("v0:storage");
69
+ }
62
70
  /**
63
71
  * Creates the three standard functions for a plugin composable.
64
72
  *
@@ -85,7 +93,7 @@ function createPlugin(options) {
85
93
  */
86
94
  function createPluginContext(defaultNamespace, factory, config) {
87
95
  function createXContext(_options = {}) {
88
- const { namespace = defaultNamespace, ...options } = _options;
96
+ const { namespace = defaultNamespace, persist: _persist, ...options } = _options;
89
97
  const [_use, _provide] = createContext(namespace);
90
98
  const context = factory(options);
91
99
  function provide(_context = context, app) {
@@ -94,7 +102,7 @@ function createPluginContext(defaultNamespace, factory, config) {
94
102
  return createTrinity(_use, provide, context);
95
103
  }
96
104
  function createXPlugin(_options = {}) {
97
- const { namespace = defaultNamespace, ...options } = _options;
105
+ const { namespace = defaultNamespace, persist: shouldPersist, ...options } = _options;
98
106
  const [, provide, context] = createXContext({
99
107
  ...options,
100
108
  namespace
@@ -103,8 +111,24 @@ function createPluginContext(defaultNamespace, factory, config) {
103
111
  namespace,
104
112
  provide: (app) => {
105
113
  provide(context, app);
114
+ if (shouldPersist && config?.restore) {
115
+ const storage = getPersistedStorage();
116
+ const key = deriveKey(namespace);
117
+ const saved = storage.get(key);
118
+ if (!/* @__PURE__ */ isNullOrUndefined(saved.value)) config.restore(context, saved.value);
119
+ }
106
120
  },
107
- setup: config?.setup ? (app) => config.setup(context, app, options) : void 0
121
+ setup: config?.setup || shouldPersist ? (app) => {
122
+ config?.setup?.(context, app, options);
123
+ if (shouldPersist && config?.persist) {
124
+ const storage = getPersistedStorage();
125
+ const key = deriveKey(namespace);
126
+ const stored = storage.get(key);
127
+ watch(() => config.persist(context), (val) => {
128
+ stored.value = val;
129
+ });
130
+ }
131
+ } : void 0
108
132
  });
109
133
  }
110
134
  function useX(namespace = defaultNamespace) {
@@ -273,7 +297,7 @@ function createFallbackLogger(namespace = "v0:logger") {
273
297
  const [createLoggerContext, createLoggerPlugin, useLogger] = createPluginContext("v0:logger", (options) => createLogger(options), {
274
298
  fallback: (ns) => createFallbackLogger(ns),
275
299
  setup: (context, _app, _options) => {
276
- if (!/* @__PURE__ */ isUndefined(process.env.NODE_ENV !== "production") && process.env.NODE_ENV !== "production" && IN_BROWSER) window.__v0Logger__ = context;
300
+ if (typeof (process.env.NODE_ENV !== "production") !== "undefined" && process.env.NODE_ENV !== "production" && IN_BROWSER) window.__v0Logger__ = context;
277
301
  }
278
302
  });
279
303
  //#endregion
@@ -1,7 +1,8 @@
1
- import { o as createPluginContext } from "./useLogger-C3crtWEd.mjs";
2
- import { t as createTokens } from "./createTokens-CpapxkYX.mjs";
3
- import { t as toArray } from "./toArray-VdROPpy-.mjs";
4
- import { t as Vuetify0PermissionAdapter } from "./v0-B1QQGE4O.mjs";
1
+ import { o as createPluginContext } from "./useLogger-Daz-Zr0z.mjs";
2
+ import { t as createTokens } from "./createTokens-CHTawmud.mjs";
3
+ import { t as toArray } from "./toArray-doLQVI56.mjs";
4
+ import { t as Vuetify0PermissionAdapter } from "./v0-4OQBCeda.mjs";
5
+ import "./adapters-BhNTUuxE.mjs";
5
6
  //#region src/composables/usePermissions/index.ts
6
7
  /**
7
8
  * @module usePermissions
@@ -18,7 +19,7 @@ import { t as Vuetify0PermissionAdapter } from "./v0-B1QQGE4O.mjs";
18
19
  * - Token-based permission storage
19
20
  * - Adapter pattern for custom permission systems
20
21
  *
21
- * Built on useTokens for flexible permission configuration.
22
+ * Built on createTokens for flexible permission configuration.
22
23
  */
23
24
  /**
24
25
  * Creates a new permissions instance.
@@ -1,6 +1,6 @@
1
1
  import { instanceExists, isFunction, isObject } from "./utilities/index.mjs";
2
- import { o as createPluginContext } from "./useLogger-C3crtWEd.mjs";
3
- import { a as useLocale } from "./useLocale-D3btFSZv.mjs";
2
+ import { o as createPluginContext } from "./useLogger-Daz-Zr0z.mjs";
3
+ import { a as useLocale } from "./useLocale-BRQTt3Ka.mjs";
4
4
  //#region src/composables/useRules/adapters/standard.ts
5
5
  /**
6
6
  * Type guard for Standard Schema objects.
@@ -36,6 +36,8 @@ function toRule(schema) {
36
36
  /**
37
37
  * @module useRules
38
38
  *
39
+ * @see https://0.vuetifyjs.com/composables/plugins/use-rules
40
+ *
39
41
  * @remarks
40
42
  * Validation rule composable with Standard Schema support.
41
43
  *
@@ -88,6 +90,7 @@ function createResolve(aliases, locale) {
88
90
  }
89
91
  const predicate = aliases[rule];
90
92
  if (predicate) result.push(resolveAlias(rule, predicate, locale));
93
+ else if (typeof (process.env.NODE_ENV !== "production") !== "undefined" && process.env.NODE_ENV !== "production") console.warn(`[v0 warn] Unknown validation rule alias "${rule}". Register it via rules.aliases or install a rules plugin.`);
91
94
  }
92
95
  return result;
93
96
  };
@@ -1,8 +1,9 @@
1
1
  import { foreground } from "./utilities/index.mjs";
2
- import { o as createPluginContext } from "./useLogger-C3crtWEd.mjs";
3
- import { r as flatten, t as createTokens } from "./createTokens-CpapxkYX.mjs";
4
- import { t as createSingle } from "./createSingle-BBwE5j_k.mjs";
5
- import { t as Vuetify0ThemeAdapter } from "./v0-pzmWhctY.mjs";
2
+ import { o as createPluginContext } from "./useLogger-Daz-Zr0z.mjs";
3
+ import { r as flatten, t as createTokens } from "./createTokens-CHTawmud.mjs";
4
+ import { t as createSingle } from "./createSingle-C7IGUjP6.mjs";
5
+ import { t as V0StyleSheetThemeAdapter } from "./v0-CcV0VwYd.mjs";
6
+ import "./adapters-BzRMo72Y.mjs";
6
7
  import { computed, shallowRef, toRef } from "vue";
7
8
  //#region src/composables/useTheme/index.ts
8
9
  /**
@@ -15,20 +16,19 @@ import { computed, shallowRef, toRef } from "vue";
15
16
  *
16
17
  * Key features:
17
18
  * - Single-selection theme switching (extends createSingle)
18
- * - Token alias resolution via useTokens
19
+ * - Token alias resolution via createTokens
19
20
  * - Lazy theme loading (compute colors only when selected)
20
21
  * - CSS variable generation via adapter pattern
22
+ * - `isDark` reactive flag on the theme context
21
23
  * - SSR support with head integration
22
24
  * - Theme cycling
23
25
  *
24
- * Integrates with createSingle for selection and useTokens for color resolution.
26
+ * Integrates with createSingle for selection and createTokens for color resolution.
25
27
  */
26
28
  /**
27
29
  * Creates a new theme instance.
28
30
  *
29
31
  * @param options The options for the theme instance.
30
- * @template Z The type of the theme ticket.
31
- * @template E The type of the theme context.
32
32
  * @returns A new theme instance.
33
33
  *
34
34
  * @see https://0.vuetifyjs.com/composables/plugins/use-theme
@@ -76,8 +76,9 @@ function createTheme(_options = {}) {
76
76
  const names = toRef(() => registry.keys());
77
77
  const colors = computed(() => {
78
78
  const resolved = {};
79
+ const currentId = registry.selectedId.value;
79
80
  for (const theme of registry.values()) {
80
- if (theme.lazy && theme.id !== registry.selectedId.value) continue;
81
+ if (theme.lazy && theme.id !== currentId) continue;
81
82
  const themeColors = resolve(theme.value);
82
83
  if (genForeground) for (const [key, value] of Object.entries(themeColors)) {
83
84
  const onKey = `on-${key}`;
@@ -129,15 +130,18 @@ function createThemeFallback() {
129
130
  size: 0,
130
131
  colors: computed(() => ({})),
131
132
  isDark: shallowRef(false),
132
- cycle: () => {}
133
+ cycle: () => {},
134
+ onboard: () => []
133
135
  };
134
136
  }
135
137
  const [createThemeContext, createThemePlugin, useTheme] = createPluginContext("v0:theme", (options) => createTheme(options), {
136
138
  fallback: () => createThemeFallback(),
137
- setup: (context, app, { adapter = new Vuetify0ThemeAdapter(), target, rgb }) => {
139
+ setup: (context, app, { adapter = new V0StyleSheetThemeAdapter(), target, rgb }) => {
138
140
  if (rgb) adapter.rgb = true;
139
141
  adapter.setup(app, context, target);
140
- }
142
+ },
143
+ persist: (ctx) => ctx.selectedId.value,
144
+ restore: (ctx, saved) => ctx.select(saved)
141
145
  });
142
146
  //#endregion
143
147
  export { useTheme as i, createThemeContext as n, createThemePlugin as r, createTheme as t };
@@ -1,2 +1,2 @@
1
- import { C as hexToRgb, S as RGB, _ as mergeDeep, a as isBoolean, b as apca, c as isNaN, d as isNumber, f as isObject, g as isUndefined, h as isSymbol, i as isArray, l as isNull, m as isString, n as instanceName, o as isElement, p as isPrimitive, r as clamp, s as isFunction, t as instanceExists, u as isNullOrUndefined, v as range, w as rgbToHex, x as foreground, y as useId } from "../index-B_pScNDG.mjs";
2
- export { RGB, apca, clamp, foreground, hexToRgb, instanceExists, instanceName, isArray, isBoolean, isElement, isFunction, isNaN, isNull, isNullOrUndefined, isNumber, isObject, isPrimitive, isString, isSymbol, isUndefined, mergeDeep, range, rgbToHex, useId };
1
+ import { C as foreground, E as rgbToHex, S as apca, T as hexToRgb, _ as mergeDeep, a as isBoolean, b as resolveIndexes, c as isNaN, d as isNumber, f as isObject, g as isUndefined, h as isSymbol, i as isArray, l as isNull, m as isString, n as instanceName, o as isElement, p as isPrimitive, r as clamp, s as isFunction, t as instanceExists, u as isNullOrUndefined, v as range, w as RGB, x as useId, y as resolveIds } from "../index-Dxx0eMLi.mjs";
2
+ export { RGB, apca, clamp, foreground, hexToRgb, instanceExists, instanceName, isArray, isBoolean, isElement, isFunction, isNaN, isNull, isNullOrUndefined, isNumber, isObject, isPrimitive, isString, isSymbol, isUndefined, mergeDeep, range, resolveIds, resolveIndexes, rgbToHex, useId };
@@ -1,4 +1,4 @@
1
- import { t as IN_BROWSER } from "../globals-DCznFHqN.mjs";
1
+ import { t as IN_BROWSER } from "../globals-BrRJkuSY.mjs";
2
2
  import * as Vue from "vue";
3
3
  import { useId as useId$1 } from "vue";
4
4
  //#region src/utilities/color.ts
@@ -379,6 +379,16 @@ function isSymbol(item) {
379
379
  function isNaN(item) {
380
380
  return /* @__PURE__ */ isNumber(item) && Number.isNaN(item);
381
381
  }
382
+ const UNSAFE_KEYS = new Set([
383
+ "__proto__",
384
+ "constructor",
385
+ "prototype"
386
+ ]);
387
+ function isPlainObject(value) {
388
+ if (typeof value !== "object" || value === null || Array.isArray(value)) return false;
389
+ const proto = Object.getPrototypeOf(value);
390
+ return proto === Object.prototype || proto === null;
391
+ }
382
392
  /**
383
393
  * Deeply merges source objects into a target object, returning a new object
384
394
  *
@@ -406,16 +416,6 @@ function isNaN(item) {
406
416
  * mergeDeep({ arr: [1, 2] }, { arr: [3] }) // { arr: [3] }
407
417
  * ```
408
418
  */
409
- const UNSAFE_KEYS = new Set([
410
- "__proto__",
411
- "constructor",
412
- "prototype"
413
- ]);
414
- function isPlainObject(value) {
415
- if (typeof value !== "object" || value === null || Array.isArray(value)) return false;
416
- const proto = Object.getPrototypeOf(value);
417
- return proto === Object.prototype || proto === null;
418
- }
419
419
  /* @__NO_SIDE_EFFECTS__ */
420
420
  function mergeDeep(target, ...sources) {
421
421
  const out = {};
@@ -456,7 +456,7 @@ let idCounter = 0;
456
456
  /* @__NO_SIDE_EFFECTS__ */
457
457
  function useId() {
458
458
  if (instanceExists()) return useId$1();
459
- if (!/* @__PURE__ */ isUndefined(process.env.NODE_ENV !== "production") && process.env.NODE_ENV !== "production" && !IN_BROWSER) console.warn("[v0 warn] useId() called outside component context during SSR. Provide explicit ID to avoid hydration mismatch.");
459
+ if (typeof (process.env.NODE_ENV !== "production") !== "undefined" && process.env.NODE_ENV !== "production" && !IN_BROWSER) console.warn("[v0 warn] useId() called outside component context during SSR. Provide explicit ID to avoid hydration mismatch.");
460
460
  return `v0-${idCounter++}`;
461
461
  }
462
462
  /**
@@ -497,5 +497,20 @@ function clamp(value, min = 0, max = 1) {
497
497
  function range(length, start = 0) {
498
498
  return Array.from({ length }, (_, index) => start + index);
499
499
  }
500
+ /**
501
+ * Resolves an iterable of IDs to their items via a getter,
502
+ * filtering out any that return undefined.
503
+ */
504
+ /* @__NO_SIDE_EFFECTS__ */
505
+ function resolveIds(ids, getter) {
506
+ return Array.from(ids).map((id) => getter(id)).filter((item) => !/* @__PURE__ */ isUndefined(item));
507
+ }
508
+ /**
509
+ * Extracts defined index values from an iterable of items.
510
+ */
511
+ /* @__NO_SIDE_EFFECTS__ */
512
+ function resolveIndexes(items) {
513
+ return Array.from(items).map((item) => item?.index).filter((index) => !/* @__PURE__ */ isUndefined(index));
514
+ }
500
515
  //#endregion
501
- export { apca, clamp, foreground, hexToRgb, instanceExists, instanceName, isArray, isBoolean, isElement, isFunction, isNaN, isNull, isNullOrUndefined, isNumber, isObject, isPrimitive, isString, isSymbol, isUndefined, mergeDeep, range, rgbToHex, useId };
516
+ export { apca, clamp, foreground, hexToRgb, instanceExists, instanceName, isArray, isBoolean, isElement, isFunction, isNaN, isNull, isNullOrUndefined, isNumber, isObject, isPrimitive, isString, isSymbol, isUndefined, mergeDeep, range, resolveIds, resolveIndexes, rgbToHex, useId };
@@ -1,4 +1,4 @@
1
- import { i as DataTableAdapterResult, n as DataTableAdapterContext, t as DataTableAdapter } from "./adapter-DvT8lTup.mjs";
1
+ import { i as DataTableAdapterResult, n as DataTableAdapterContext, t as DataTableAdapter } from "./adapter-BZjmDNJF.mjs";
2
2
 
3
3
  //#region src/composables/createDataTable/adapters/v0.d.ts
4
4
  declare class ClientAdapter<T extends Record<string, unknown>> extends DataTableAdapter<T> {
@@ -1,4 +1,4 @@
1
- import { t as IN_BROWSER } from "./globals-DCznFHqN.mjs";
1
+ import { t as IN_BROWSER } from "./globals-BrRJkuSY.mjs";
2
2
  import { isFunction } from "./utilities/index.mjs";
3
3
  //#region src/composables/useLogger/adapters/v0.ts
4
4
  /**
@@ -1,4 +1,4 @@
1
- import { n as LocaleAdapterContext, t as LocaleAdapter } from "./adapter-D3dUnE__.mjs";
1
+ import { n as LocaleAdapterContext, t as LocaleAdapter } from "./adapter-CcHB7rs3.mjs";
2
2
 
3
3
  //#region src/composables/useLocale/adapters/v0.d.ts
4
4
  /**
@@ -1,4 +1,4 @@
1
- import { t as LoggerAdapter } from "./adapter-CJQav2JB.mjs";
1
+ import { t as LoggerAdapter } from "./adapter-DNKjooxI.mjs";
2
2
 
3
3
  //#region src/composables/useLogger/adapters/v0.d.ts
4
4
  /**
@@ -1,38 +1,13 @@
1
- import { t as IN_BROWSER } from "./globals-DCznFHqN.mjs";
2
- import { hexToRgb, isNull, isString, isUndefined } from "./utilities/index.mjs";
1
+ import { t as IN_BROWSER } from "./globals-BrRJkuSY.mjs";
2
+ import { isNull, isString } from "./utilities/index.mjs";
3
+ import { t as ThemeAdapter } from "./adapter-Drq1v5wV.mjs";
3
4
  import { onScopeDispose, watch } from "vue";
4
- //#region src/composables/useTheme/adapters/adapter.ts
5
- var ThemeAdapter = class {
6
- stylesheetId = "v0-theme-stylesheet";
7
- prefix;
8
- rgb = false;
9
- constructor(prefix) {
10
- this.prefix = prefix;
11
- }
12
- generate(colors, isDark) {
13
- let css = "";
14
- for (const theme in colors) {
15
- const themeColors = colors[theme];
16
- if (!themeColors) continue;
17
- const vars = Object.entries(themeColors).map(([key, val]) => ` --${this.prefix}-${key}: ${this.rgb ? this.decompose(val) : val};`).join("\n");
18
- css += `[data-theme="${theme}"] {\n${vars}\n}\n`;
19
- }
20
- if (!/* @__PURE__ */ isUndefined(isDark)) css += `:root {\n color-scheme: ${isDark ? "dark" : "light"};\n}\n`;
21
- return css;
22
- }
23
- decompose(hex) {
24
- const { r, g, b, a } = hexToRgb(hex);
25
- return /* @__PURE__ */ isUndefined(a) ? `${r}, ${g}, ${b}` : `${r}, ${g}, ${b}, ${a}`;
26
- }
27
- };
28
- //#endregion
29
5
  //#region src/composables/useTheme/adapters/v0.ts
30
6
  /**
31
- * Theme adapter implementation for Vuetify v0 design system.
32
- * This adapter generates CSS custom properties and injects them into the DOM
33
- * as a stylesheet, allowing themes to be applied globally.
7
+ * Theme adapter that injects CSS custom properties via adoptedStyleSheets.
8
+ * Best for SPAs where SSR hydration is not a concern.
34
9
  */
35
- var Vuetify0ThemeAdapter = class extends ThemeAdapter {
10
+ var V0StyleSheetThemeAdapter = class extends ThemeAdapter {
36
11
  cspNonce;
37
12
  sheet;
38
13
  constructor(options = {}) {
@@ -82,4 +57,4 @@ var Vuetify0ThemeAdapter = class extends ThemeAdapter {
82
57
  }
83
58
  };
84
59
  //#endregion
85
- export { ThemeAdapter as n, Vuetify0ThemeAdapter as t };
60
+ export { V0StyleSheetThemeAdapter as t };
@@ -1,4 +1,4 @@
1
- import { t as IN_BROWSER } from "./globals-DCznFHqN.mjs";
1
+ import { t as IN_BROWSER } from "./globals-BrRJkuSY.mjs";
2
2
  import { isObject, isString, isUndefined } from "./utilities/index.mjs";
3
3
  //#region src/composables/useLocale/adapters/v0.ts
4
4
  /**
@@ -1,5 +1,5 @@
1
- import { t as createPagination } from "./createPagination-CeGMgKCx.mjs";
2
- import { t as DataTableAdapter } from "./adapter-DXRKF27V.mjs";
1
+ import { t as DataTableAdapter } from "./adapter-CCIeOzqr.mjs";
2
+ import { t as createPagination } from "./createPagination-Tp4C4He8.mjs";
3
3
  import { computed, toRef, watch } from "vue";
4
4
  //#region src/composables/createDataTable/adapters/v0.ts
5
5
  /**
@@ -1,4 +1,4 @@
1
- import { i as DataTableAdapterResult, n as DataTableAdapterContext, t as DataTableAdapter } from "./adapter-DvT8lTup.mjs";
1
+ import { i as DataTableAdapterResult, n as DataTableAdapterContext, t as DataTableAdapter } from "./adapter-BZjmDNJF.mjs";
2
2
 
3
3
  //#region src/composables/createDataTable/adapters/virtual.d.ts
4
4
  declare class VirtualAdapter<T extends Record<string, unknown>> extends DataTableAdapter<T> {
@@ -1,5 +1,5 @@
1
- import { t as createPagination } from "./createPagination-CeGMgKCx.mjs";
2
- import { t as DataTableAdapter } from "./adapter-DXRKF27V.mjs";
1
+ import { t as DataTableAdapter } from "./adapter-CCIeOzqr.mjs";
2
+ import { t as createPagination } from "./createPagination-Tp4C4He8.mjs";
3
3
  import { toRef, watch } from "vue";
4
4
  //#region src/composables/createDataTable/adapters/virtual.ts
5
5
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vuetify/v0",
3
- "version": "0.1.13",
3
+ "version": "0.2.1",
4
4
  "description": "A meta UI framework for building applications, component libraries, and design systems with Vue 3",
5
5
  "license": "MIT",
6
6
  "types": "./dist/index.d.mts",
@@ -48,21 +48,21 @@
48
48
  }
49
49
  },
50
50
  "devDependencies": {
51
- "@adobe/leonardo-contrast-colors": "^1.0.0",
52
- "@ant-design/colors": "^8.0.0",
51
+ "@adobe/leonardo-contrast-colors": "^1.1.0",
52
+ "@ant-design/colors": "^8.0.1",
53
53
  "@flagsmith/flagsmith": "^11.0.0",
54
54
  "@material/material-color-utilities": "^0.4.0",
55
- "@vue/compiler-dom": "^3.5.30",
55
+ "@vue/compiler-dom": "^3.5.31",
56
56
  "@vue/test-utils": "^2.4.6",
57
57
  "launchdarkly-js-client-sdk": "^3.9.0",
58
- "posthog-js": "^1.360.1",
59
- "tsdown": "^0.21.2",
58
+ "posthog-js": "^1.364.1",
59
+ "tsdown": "^0.21.7",
60
60
  "tsx": "4.21.0",
61
- "typescript": "5.9.3",
61
+ "typescript": "6.0.2",
62
62
  "unplugin-vue": "^7.1.1",
63
- "vue": "3.5.30",
64
- "vue-component-meta": "^3.2.5",
65
- "vue-i18n": "^10.0.0"
63
+ "vue": "3.5.31",
64
+ "vue-component-meta": "3.2.6",
65
+ "vue-i18n": "^11.3.0"
66
66
  },
67
67
  "imports": {
68
68
  "#v0/*": {
@@ -114,6 +114,7 @@
114
114
  "./storage/adapters/memory": "./dist/storage/adapters/memory/index.mjs",
115
115
  "./theme": "./dist/theme/index.mjs",
116
116
  "./theme/adapters": "./dist/theme/adapters/index.mjs",
117
+ "./theme/adapters/unhead": "./dist/theme/adapters/unhead/index.mjs",
117
118
  "./theme/adapters/v0": "./dist/theme/adapters/v0/index.mjs",
118
119
  "./types": "./dist/types/index.mjs",
119
120
  "./utilities": "./dist/utilities/index.mjs",
@@ -123,10 +124,6 @@
123
124
  "optionalDependencies": {
124
125
  "@js-temporal/polyfill": "0.5.1"
125
126
  },
126
- "inlinedDependencies": {
127
- "jsbi": "4.3.2",
128
- "@js-temporal/polyfill": "0.5.1"
129
- },
130
127
  "scripts": {
131
128
  "build": "tsdown && pnpm generate:web-types",
132
129
  "generate:web-types": "tsx scripts/generate-web-types.ts",