@vuetify/v0 1.0.0-alpha.0 → 1.0.0-alpha.2

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 (160) hide show
  1. package/README.md +5 -1
  2. package/dist/{adapter-T7AedXkz.d.mts → adapter-58IvIfAZ.d.mts} +1 -1
  3. package/dist/{adapter-Drq1v5wV.mjs → adapter-Be9zUc-n.mjs} +6 -3
  4. package/dist/{adapter-CcHB7rs3.d.mts → adapter-BvWEd9w-.d.mts} +2 -2
  5. package/dist/{adapter-BZjmDNJF.d.mts → adapter-DlX3FA3A.d.mts} +2 -2
  6. package/dist/{adapter-CCIeOzqr.mjs → adapter-gQ2SNKZq.mjs} +31 -22
  7. package/dist/{adapters-D49L7m2R.mjs → adapters-BJ5n7rgh.mjs} +1 -1
  8. package/dist/adapters-BnKW0BF_.mjs +2 -0
  9. package/dist/adapters-CBrvizWb.mjs +4 -0
  10. package/dist/adapters-CMJGA1k7.mjs +2 -0
  11. package/dist/adapters-Dse4bPxk.mjs +5 -0
  12. package/dist/browser/index.js +4845 -3272
  13. package/dist/components/index.d.mts +3 -3
  14. package/dist/components/index.mjs +2 -2
  15. package/dist/{components-Dc7sUTsg.mjs → components-CqDewYTU.mjs} +1407 -411
  16. package/dist/composables/index.d.mts +19 -19
  17. package/dist/composables/index.mjs +28 -26
  18. package/dist/{consola-Byg0ybzh.d.mts → consola-BdgyPEfx.d.mts} +1 -1
  19. package/dist/constants/index.d.mts +2 -2
  20. package/dist/constants/index.mjs +3 -3
  21. package/dist/{createDataTable-BbUL9Vva.mjs → createDataTable-rXBqGglI.mjs} +105 -32
  22. package/dist/{createGroup-C2WCfYPB.mjs → createGroup-BU4olYtB.mjs} +29 -14
  23. package/dist/{createPagination-Tp4C4He8.mjs → createPagination-CHF7SmmK.mjs} +11 -7
  24. package/dist/{createTokens-qv02qq4_.mjs → createRegistry-Dl-bSSTr.mjs} +21 -302
  25. package/dist/{createSelection-AmMX6sjc.mjs → createSelection-Csaa-C8p.mjs} +28 -21
  26. package/dist/{createSingle-CffpxK__.mjs → createSingle-8xbHAIpY.mjs} +13 -17
  27. package/dist/createTokens-lNg2M_P_.mjs +302 -0
  28. package/dist/{createTrinity-vvXk0ARD.mjs → createTrinity-BTCs1pYx.mjs} +34 -31
  29. package/dist/data-table/adapters/client/index.d.mts +1 -1
  30. package/dist/data-table/adapters/client/index.mjs +1 -1
  31. package/dist/data-table/adapters/index.d.mts +4 -4
  32. package/dist/data-table/adapters/index.mjs +5 -5
  33. package/dist/data-table/adapters/server/index.d.mts +1 -1
  34. package/dist/data-table/adapters/server/index.mjs +1 -1
  35. package/dist/data-table/adapters/virtual/index.d.mts +1 -1
  36. package/dist/data-table/adapters/virtual/index.mjs +1 -1
  37. package/dist/data-table/index.d.mts +6 -6
  38. package/dist/data-table/index.mjs +6 -6
  39. package/dist/date/index.d.mts +2 -2
  40. package/dist/date/index.mjs +4 -4
  41. package/dist/features/adapters/flagsmith/index.d.mts +1 -1
  42. package/dist/features/adapters/flagsmith/index.mjs +1 -1
  43. package/dist/features/adapters/launchdarkly/index.d.mts +1 -1
  44. package/dist/features/adapters/launchdarkly/index.mjs +1 -1
  45. package/dist/features/adapters/posthog/index.d.mts +1 -1
  46. package/dist/features/adapters/posthog/index.mjs +1 -1
  47. package/dist/features/index.d.mts +2 -2
  48. package/dist/features/index.mjs +1 -1
  49. package/dist/{globals-CAv9vqkP.mjs → globals-CKdzjeLe.mjs} +1 -1
  50. package/dist/htmlElements-D4oMQZPJ.mjs +28 -0
  51. package/dist/{index-M8EpGjjA.d.mts → index-1XdASTjp.d.mts} +1 -1
  52. package/dist/{index-D26_u_WI.d.mts → index-B7cqgTBL.d.mts} +1599 -468
  53. package/dist/{index-DoGxDgdN.d.mts → index-BJGcVy7e.d.mts} +57 -6
  54. package/dist/index-BgCkepP_.d.mts +31 -0
  55. package/dist/{index-B_XLHftL.d.mts → index-BxKMMWnQ.d.mts} +301 -263
  56. package/dist/{index-tyzwWFHS.d.mts → index-BzFHTW59.d.mts} +1 -1
  57. package/dist/{index-CDcl4wPo.d.mts → index-CT5SCLzW.d.mts} +1 -1
  58. package/dist/{index-BUsrN1vL.d.mts → index-DE3bWw11.d.mts} +2 -2
  59. package/dist/{index-76fQGkkO.d.mts → index-DTvqw22G.d.mts} +8 -11
  60. package/dist/{index-F2Fmxnzi.d.mts → index-Dp1HjBxJ.d.mts} +1 -1
  61. package/dist/{index-B_AlCD7t.d.mts → index-DuddF-NR.d.mts} +2 -9
  62. package/dist/{index-Dxx0eMLi.d.mts → index-GOpjKzaJ.d.mts} +1 -1
  63. package/dist/index.d.mts +23 -23
  64. package/dist/index.mjs +31 -29
  65. package/dist/json/attributes.json +280 -4
  66. package/dist/json/importMap.json +60 -0
  67. package/dist/json/tags.json +136 -2
  68. package/dist/json/web-types.json +1186 -347
  69. package/dist/locale/adapters/index.d.mts +2 -2
  70. package/dist/locale/adapters/index.mjs +2 -2
  71. package/dist/locale/adapters/v0/index.d.mts +1 -1
  72. package/dist/locale/adapters/v0/index.mjs +1 -1
  73. package/dist/locale/adapters/vue-i18n/index.d.mts +1 -1
  74. package/dist/locale/index.d.mts +3 -3
  75. package/dist/locale/index.mjs +2 -2
  76. package/dist/logger/adapters/consola/index.d.mts +1 -1
  77. package/dist/logger/adapters/index.d.mts +4 -4
  78. package/dist/logger/adapters/index.mjs +2 -2
  79. package/dist/logger/adapters/pino/index.d.mts +1 -1
  80. package/dist/logger/adapters/v0/index.d.mts +1 -1
  81. package/dist/logger/adapters/v0/index.mjs +1 -1
  82. package/dist/logger/index.d.mts +5 -5
  83. package/dist/logger/index.mjs +2 -2
  84. package/dist/notifications/index.d.mts +2 -2
  85. package/dist/notifications/index.mjs +3 -54
  86. package/dist/palettes/ant/generate/index.mjs +1 -0
  87. package/dist/palettes/ant/index.d.mts +1 -1
  88. package/dist/palettes/index.d.mts +3 -3
  89. package/dist/palettes/leonardo/generate/index.mjs +1 -0
  90. package/dist/palettes/material/generate/index.mjs +1 -0
  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 -1
  97. package/dist/permissions/adapters/index.mjs +2 -2
  98. package/dist/permissions/adapters/v0/index.d.mts +1 -1
  99. package/dist/permissions/adapters/v0/index.mjs +1 -1
  100. package/dist/permissions/index.d.mts +1 -1
  101. package/dist/permissions/index.mjs +2 -2
  102. package/dist/{pino-BxddSW2l.d.mts → pino-DNfCEb0p.d.mts} +1 -1
  103. package/dist/{posthog-B8PEtlFr.mjs → posthog-DZNnPXxS.mjs} +1 -1
  104. package/dist/rules/index.d.mts +1 -1
  105. package/dist/rules/index.mjs +1 -1
  106. package/dist/{server-DNUTnISs.d.mts → server-3ilWFwqe.d.mts} +1 -1
  107. package/dist/{server-CIftA0pK.mjs → server-y7zLSCSx.mjs} +1 -1
  108. package/dist/storage/adapters/index.d.mts +2 -2
  109. package/dist/storage/adapters/index.mjs +1 -1
  110. package/dist/storage/adapters/memory/index.d.mts +1 -1
  111. package/dist/storage/adapters/memory/index.mjs +1 -1
  112. package/dist/storage/index.d.mts +3 -3
  113. package/dist/storage/index.mjs +2 -2
  114. package/dist/theme/adapters/index.d.mts +1 -1
  115. package/dist/theme/adapters/index.mjs +4 -4
  116. package/dist/theme/adapters/unhead/index.d.mts +1 -1
  117. package/dist/theme/adapters/unhead/index.mjs +1 -1
  118. package/dist/theme/adapters/v0/index.d.mts +1 -1
  119. package/dist/theme/adapters/v0/index.mjs +1 -1
  120. package/dist/theme/index.d.mts +1 -1
  121. package/dist/theme/index.mjs +3 -3
  122. package/dist/{toArray-doLQVI56.mjs → toArray-as9BWxBK.mjs} +10 -0
  123. package/dist/types/index.d.mts +2 -2
  124. package/dist/{unhead-BYw3a366.mjs → unhead-DZiD-4Tx.mjs} +2 -2
  125. package/dist/{useClickOutside-CnCQkh7M.mjs → useClickOutside-CmCUD_Pf.mjs} +577 -1024
  126. package/dist/{useFeatures-CMpkbU8Q.mjs → useFeatures-ZIvzzuEV.mjs} +16 -6
  127. package/dist/{useLocale-BYmoHpo6.mjs → useLocale-DTJx3aKR.mjs} +19 -7
  128. package/dist/{useLogger-BfaFH-Bi.mjs → useLogger-BBTcMN61.mjs} +33 -16
  129. package/dist/useNotifications-H4knpvNw.mjs +869 -0
  130. package/dist/{usePermissions-y3Uum3nO.mjs → usePermissions-B_G12Dwd.mjs} +14 -6
  131. package/dist/{useRules-eqSXpP9V.mjs → useRules--7Qoo60I.mjs} +15 -5
  132. package/dist/{useTheme-CFH6I91x.mjs → useTheme-Co05TEeD.mjs} +20 -8
  133. package/dist/utilities/index.d.mts +1 -1
  134. package/dist/utilities/index.mjs +14 -9
  135. package/dist/{v0-DXqYgj7J.mjs → v0-BrTEO5sv.mjs} +2 -2
  136. package/dist/{v0-BAG8p0si.d.mts → v0-CdusXjY_.d.mts} +1 -1
  137. package/dist/{v0-CFV8A5PF.mjs → v0-D0Mh3EVG.mjs} +1 -1
  138. package/dist/{v0-BpgPZ1qB.d.mts → v0-D7Fm2C3Y.d.mts} +1 -1
  139. package/dist/{v0-BqikIgl0.mjs → v0-DeiZuexg.mjs} +1 -1
  140. package/dist/{v0-DOq_Ia5H.mjs → v0-Dq3zhexO.mjs} +2 -2
  141. package/dist/{v0-C2UMaHUa.d.mts → v0-DrOub-e1.d.mts} +1 -1
  142. package/dist/{virtual-D1HwNBLS.mjs → virtual-C0yHf1DC.mjs} +2 -2
  143. package/dist/{virtual-BaQWQ9ji.d.mts → virtual-D4fckewC.d.mts} +1 -1
  144. package/package.json +10 -7
  145. package/SKILL.md +0 -95
  146. package/dist/adapters-BOVGPozf.mjs +0 -2
  147. package/dist/adapters-BbNfjyvY.mjs +0 -5
  148. package/dist/adapters-BhNTUuxE.mjs +0 -2
  149. package/dist/adapters-RwNU3wNj.mjs +0 -4
  150. package/dist/htmlElements-DcYtv0hg.mjs +0 -75
  151. package/dist/index-D6mQAEs2.d.mts +0 -79
  152. /package/dist/{adapter-DNKjooxI.d.mts → adapter-Dhq68tz0.d.mts} +0 -0
  153. /package/dist/{flagsmith-DQnnahG5.mjs → flagsmith-Dbh1h8WF.mjs} +0 -0
  154. /package/dist/{index-DxruGeVY.d.mts → index-C6rdXZ7j.d.mts} +0 -0
  155. /package/dist/{index-PWQavSPf.d.mts → index-CFhUdAHM.d.mts} +0 -0
  156. /package/dist/{index-c55Utzva.d.mts → index-CROz1VSV.d.mts} +0 -0
  157. /package/dist/{launchdarkly-2_48EJ1_.mjs → launchdarkly-BKtW-idu.mjs} +0 -0
  158. /package/dist/{memory-DUyWthic.d.mts → memory-CeSQE-QV.d.mts} +0 -0
  159. /package/dist/{memory-XCMtkld1.mjs → memory-oYBvtkgx.mjs} +0 -0
  160. /package/dist/{v0-4OQBCeda.mjs → v0-Bmow1q_x.mjs} +0 -0
@@ -0,0 +1,302 @@
1
+ import { isObject, isString, isUndefined } from "./utilities/index.mjs";
2
+ import { i as useContext, t as createTrinity } from "./createTrinity-BTCs1pYx.mjs";
3
+ import { i as useLogger } from "./useLogger-BBTcMN61.mjs";
4
+ import { t as createRegistry } from "./createRegistry-Dl-bSSTr.mjs";
5
+ //#region src/composables/createTokens/index.ts
6
+ /**
7
+ * @module createTokens
8
+ *
9
+ * @see https://0.vuetifyjs.com/composables/registration/create-tokens
10
+ *
11
+ * @remarks
12
+ * Design token registry with alias resolution and W3C Design Tokens format support.
13
+ *
14
+ * Key features:
15
+ * - Alias resolution with circular reference detection
16
+ * - Nested token flattening with dot notation
17
+ * - W3C Design Tokens format ($value, $type, $description, $extensions)
18
+ * - Path-based resolution (e.g., {colors}.blue.500)
19
+ * - Resolution caching for performance (~28,590 ops/sec)
20
+ *
21
+ * Used by useTheme, useLocale, and useFeatures for token-based configuration.
22
+ *
23
+ * @example
24
+ * ```ts
25
+ * import { createTokens } from '@vuetify/v0'
26
+ *
27
+ * const tokens = createTokens({
28
+ * colors: { primary: '#1976d2' },
29
+ * })
30
+ * console.log(tokens.resolve('{colors.primary}'))
31
+ * ```
32
+ */
33
+ /**
34
+ * Creates a new token instance.
35
+ *
36
+ * @param tokens The tokens to use.
37
+ * @param options The options for the token instance.
38
+ * @template Z The type of the token ticket.
39
+ * @template E The type of the token context.
40
+ * @returns A new token instance.
41
+ *
42
+ * @see https://www.designtokens.org/tr/drafts/format/
43
+ * @see https://0.vuetifyjs.com/composables/registration/create-tokens
44
+ *
45
+ * @example
46
+ * ```ts
47
+ * import { createTokens } from '@vuetify/v0'
48
+ *
49
+ * const tokens = createTokens({
50
+ * colors: {
51
+ * primary: '#3b82f6',
52
+ * secondary: '{colors.primary}', // Alias reference
53
+ * },
54
+ * })
55
+ *
56
+ * console.log(tokens.resolve('{colors.primary}')) // '#3b82f6'
57
+ * console.log(tokens.resolve('{colors.secondary}')) // '#3b82f6'
58
+ * ```
59
+ */
60
+ function createTokens(tokens = {}, options = {}) {
61
+ const logger = useLogger();
62
+ const registry = createRegistry(options);
63
+ const cache = /* @__PURE__ */ new Map();
64
+ registry.onboard(/* @__PURE__ */ flatten(tokens, options.prefix, !!options.flat));
65
+ function isAlias(token) {
66
+ return /* @__PURE__ */ isString(token) && token.length > 2 && token[0] === "{" && token.at(-1) === "}";
67
+ }
68
+ function isTokenAlias(value) {
69
+ return /* @__PURE__ */ isObject(value) && "$value" in value;
70
+ }
71
+ function resolve(token, visited = /* @__PURE__ */ new Set()) {
72
+ const cacheKey = /* @__PURE__ */ isString(token) ? token : JSON.stringify(token);
73
+ if (cache.has(cacheKey)) return cache.get(cacheKey);
74
+ const reference = isTokenAlias(token) ? token.$value : token;
75
+ const isAliasReference = /* @__PURE__ */ isString(reference) && isAlias(reference);
76
+ const clean = isAliasReference ? reference.slice(1, -1) : String(reference);
77
+ if (visited.has(clean)) {
78
+ logger.warn(`Circular alias detected for "${clean}"`);
79
+ cache.set(cacheKey, void 0);
80
+ return;
81
+ }
82
+ visited.add(clean);
83
+ let found = registry.get(clean);
84
+ let segments = [];
85
+ if (!found && clean.includes(".")) {
86
+ const parts = clean.split(".");
87
+ for (let i = parts.length - 1; i > 0; i--) {
88
+ const prefix = parts.slice(0, i).join(".");
89
+ const suffix = parts.slice(i);
90
+ const candidate = registry.get(prefix);
91
+ if (!/* @__PURE__ */ isUndefined(candidate?.value)) {
92
+ found = candidate;
93
+ segments = suffix;
94
+ break;
95
+ }
96
+ }
97
+ }
98
+ if (/* @__PURE__ */ isUndefined(found?.value)) {
99
+ if (isAliasReference) logger.warn(`Alias not found for "${String(reference)}"`);
100
+ cache.set(cacheKey, void 0);
101
+ return;
102
+ }
103
+ let result;
104
+ let current = found.value;
105
+ if (segments.length > 0) {
106
+ if (isTokenAlias(current)) current = current.$value;
107
+ for (const segment of segments) {
108
+ if (!/* @__PURE__ */ isObject(current) || !(segment in current)) {
109
+ current = void 0;
110
+ break;
111
+ }
112
+ current = current[segment];
113
+ if (isTokenAlias(current)) current = current.$value;
114
+ }
115
+ if (/* @__PURE__ */ isUndefined(current)) {
116
+ logger.warn(`Path not found inside "${clean}": ${segments.join(".")}`);
117
+ cache.set(cacheKey, void 0);
118
+ return;
119
+ }
120
+ result = current;
121
+ } else if (isTokenAlias(current)) {
122
+ const inner = current.$value;
123
+ if (/* @__PURE__ */ isString(inner) && isAlias(inner)) return resolve(inner, visited);
124
+ result = inner;
125
+ } else if (/* @__PURE__ */ isString(current) && isAlias(current)) return resolve(current, visited);
126
+ else result = current;
127
+ cache.set(cacheKey, result);
128
+ return result;
129
+ }
130
+ const { register: _register, upsert: _upsert, unregister: _unregister, onboard: _onboard, offboard: _offboard, move: _move, clear: _clear } = registry;
131
+ function register(registration) {
132
+ cache.clear();
133
+ return _register(registration);
134
+ }
135
+ function upsert(id, registration) {
136
+ cache.clear();
137
+ return _upsert(id, registration);
138
+ }
139
+ function unregister(id) {
140
+ cache.clear();
141
+ return _unregister(id);
142
+ }
143
+ function onboard(registrations) {
144
+ cache.clear();
145
+ return _onboard(registrations);
146
+ }
147
+ function offboard(ids) {
148
+ cache.clear();
149
+ return _offboard(ids);
150
+ }
151
+ function move(id, index) {
152
+ cache.clear();
153
+ return _move(id, index);
154
+ }
155
+ function clear() {
156
+ cache.clear();
157
+ return _clear();
158
+ }
159
+ return {
160
+ ...registry,
161
+ register,
162
+ upsert,
163
+ unregister,
164
+ onboard,
165
+ offboard,
166
+ move,
167
+ clear,
168
+ resolve,
169
+ isAlias,
170
+ get size() {
171
+ return registry.size;
172
+ }
173
+ };
174
+ }
175
+ /**
176
+ * Creates a new token context.
177
+ *
178
+ * @param namespace The namespace for the token context.
179
+ * @param tokens The tokens to use.
180
+ * @template Z The type of the token ticket.
181
+ * @template E The type of the token context.
182
+ * @returns A new token context.
183
+ *
184
+ * @see https://0.vuetifyjs.com/composables/registration/create-tokens
185
+ *
186
+ * @example
187
+ * ```ts
188
+ * import { createTokensContext } from '@vuetify/v0'
189
+ *
190
+ * export const [useTokens, provideTokens, context] = createTokensContext({
191
+ * namespace: 'v0:tokens',
192
+ * tokens: {
193
+ * colors: {
194
+ * primary: '#3b82f6',
195
+ * secondary: '{colors.primary}', // Alias reference
196
+ * },
197
+ * },
198
+ * })
199
+ * ```
200
+ */
201
+ function createTokensContext(_options) {
202
+ const { namespace = "v0:tokens", tokens = {}, ...options } = _options;
203
+ return createTrinity(namespace, createTokens(tokens, options));
204
+ }
205
+ /**
206
+ * Returns the current tokens instance.
207
+ *
208
+ * @param namespace The namespace for the tokens context. Defaults to `'v0:tokens'`.
209
+ * @returns The current tokens instance.
210
+ *
211
+ * @see https://0.vuetifyjs.com/composables/registration/create-tokens
212
+ *
213
+ * @example
214
+ * ```vue
215
+ * <script setup lang="ts">
216
+ * import { useTokens } from '@vuetify/v0'
217
+ *
218
+ * const tokens = useTokens()
219
+ * <\/script>
220
+ * ```
221
+ */
222
+ function useTokens(namespace = "v0:tokens") {
223
+ return useContext(namespace);
224
+ }
225
+ /**
226
+ * Flattens a nested collection of tokens into a flat array of tokens.
227
+ * Each token is represented by an object containing its ID & value.
228
+ * @param tokens The collection of tokens to flatten.
229
+ * @param prefix An optional prefix to prepend to each token ID.
230
+ * @returns An array of flattened tokens, each with an ID and value.
231
+ */
232
+ /* @__NO_SIDE_EFFECTS__ */
233
+ function flatten(tokens, prefix = "", flat = false) {
234
+ const flattened = [];
235
+ const stack = [{
236
+ tokens,
237
+ prefix,
238
+ flat
239
+ }];
240
+ while (stack.length > 0) {
241
+ const { tokens: currentTokens, prefix: currentPrefix, flat } = stack.pop();
242
+ const meta = {};
243
+ for (const k in currentTokens) if (k.startsWith("$")) meta[k] = currentTokens[k];
244
+ if (Object.keys(meta).length > 0 && currentPrefix) flattened.push({
245
+ id: currentPrefix,
246
+ value: meta
247
+ });
248
+ for (const key in currentTokens) {
249
+ if (key.startsWith("$")) continue;
250
+ const value = currentTokens[key];
251
+ const id = currentPrefix ? `${currentPrefix}.${key}` : key;
252
+ if (!/* @__PURE__ */ isObject(value)) {
253
+ flattened.push({
254
+ id,
255
+ value
256
+ });
257
+ continue;
258
+ }
259
+ if ("$value" in value) {
260
+ flattened.push({
261
+ id,
262
+ value
263
+ });
264
+ const inner = value.$value;
265
+ if (/* @__PURE__ */ isObject(inner) && !flat) for (const innerKey in inner) {
266
+ if (innerKey.startsWith("$")) continue;
267
+ const child = inner[innerKey];
268
+ const childId = `${id}.${innerKey}`;
269
+ if (!/* @__PURE__ */ isObject(child)) flattened.push({
270
+ id: childId,
271
+ value: child
272
+ });
273
+ else if ("$value" in child) flattened.push({
274
+ id: childId,
275
+ value: child
276
+ });
277
+ else stack.push({
278
+ tokens: child,
279
+ prefix: childId,
280
+ flat
281
+ });
282
+ }
283
+ continue;
284
+ }
285
+ if (flat) {
286
+ flattened.push({
287
+ id,
288
+ value
289
+ });
290
+ continue;
291
+ }
292
+ stack.push({
293
+ tokens: value,
294
+ prefix: id,
295
+ flat
296
+ });
297
+ }
298
+ }
299
+ return flattened;
300
+ }
301
+ //#endregion
302
+ export { useTokens as i, createTokensContext as n, flatten as r, createTokens as t };
@@ -16,6 +16,16 @@ import { inject, provide } from "vue";
16
16
  * Supports two modes:
17
17
  * - **Static key**: `createContext('my-key')` - key is fixed at creation time
18
18
  * - **Dynamic key**: `createContext()` or `createContext({ suffix: 'item' })` - key provided at runtime
19
+ *
20
+ * @example
21
+ * ```ts
22
+ * import { createContext } from '@vuetify/v0'
23
+ *
24
+ * const [useTheme, provideTheme] = createContext<{ dark: boolean }>('theme')
25
+ *
26
+ * provideTheme({ dark: true })
27
+ * const theme = useTheme()
28
+ * ```
19
29
  */
20
30
  /**
21
31
  * Injects a context provided by an ancestor component.
@@ -76,6 +86,7 @@ function provideContext(key, context, app) {
76
86
  }
77
87
  function createContext(keyOrOptions, defaultValue) {
78
88
  if (/* @__PURE__ */ isString(keyOrOptions) || /* @__PURE__ */ isSymbol(keyOrOptions)) {
89
+ if (process.env.NODE_ENV !== "production" && /* @__PURE__ */ isString(keyOrOptions) && !keyOrOptions.includes(":")) console.warn(`[v0:context] String key "${keyOrOptions}" has no namespace separator. Use "namespace:key" format (e.g. "v0:theme") to prevent collisions.`);
79
90
  const _key = keyOrOptions;
80
91
  function _provideContext(context, app) {
81
92
  return provideContext(_key, context, app);
@@ -97,47 +108,39 @@ function createContext(keyOrOptions, defaultValue) {
97
108
  //#endregion
98
109
  //#region src/composables/createTrinity/index.ts
99
110
  /**
100
- * Creates a new trinity for a context composable and its provider.
101
- *
102
- * @param useContext The function that retrieves/uses the context (typically named `useContext`).
103
- * @param provideContext The function that provides the context to descendants.
104
- * @param context The default context instance to use when no custom context is provided.
105
- * @template Z The type of the context.
106
- * @returns A readonly tuple containing: [useContext function, provideContext wrapper function, default context instance].
111
+ * @module createTrinity
107
112
  *
108
- * @remarks The trinity pattern is a foundational pattern used throughout the codebase for creating reusable context systems. It provides three related elements:
109
- *
110
- * 1. A function to retrieve/use the context
111
- * 2. A function to provide the context (with default value support)
112
- * 3. The default context instance
113
+ * @see https://0.vuetifyjs.com/composables/foundation/create-trinity
113
114
  *
114
- * The returned tuple is readonly (using `as const`) to ensure proper type inference.
115
+ * @remarks
116
+ * Factory for creating the trinity pattern tuple used throughout the codebase.
115
117
  *
116
- * @see https://0.vuetifyjs.com/composables/foundation/create-trinity
118
+ * The trinity pattern returns a readonly tuple of [useContext, provideContext, defaultContext],
119
+ * enabling flexible dependency injection with sensible defaults. This pattern is fundamental
120
+ * to all registry-based composables.
117
121
  *
118
122
  * @example
119
123
  * ```ts
120
- * interface MyContext {
121
- * foo: string
122
- * bar: number
123
- * }
124
+ * import { createTrinity } from '@vuetify/v0'
124
125
  *
125
- * export function createMyFeature<E extends MyContext = MyContext>() {
126
- * const [useContext, _provideContext] = createContext<E>('my-context')
127
- *
128
- * const context = { foo: 'hello', bar: 42 }
129
- *
130
- * function provideContext (_context: E = context, app?: App): E {
131
- * return _provideContext(_context, app)
132
- * }
133
- *
134
- * return createTrinity<E>(useContext, provideContext, context)
135
- * }
126
+ * const [useMyContext, provideMyContext, defaultContext] =
127
+ * createTrinity('my-context', { foo: 'bar' })
136
128
  * ```
137
129
  */
138
- function createTrinity(useContext, provideContext, context) {
130
+ function createTrinity(keyOrUseContext, provideContextOrContext, maybeContext) {
131
+ if (/* @__PURE__ */ isString(keyOrUseContext)) {
132
+ const [useContext, provideContext] = createContext(keyOrUseContext);
133
+ const context = provideContextOrContext;
134
+ return [
135
+ useContext,
136
+ (_context = context, app) => provideContext(_context, app),
137
+ context
138
+ ];
139
+ }
140
+ const provideContext = provideContextOrContext;
141
+ const context = maybeContext;
139
142
  return [
140
- useContext,
143
+ keyOrUseContext,
141
144
  (_context = context, app) => provideContext(_context, app),
142
145
  context
143
146
  ];
@@ -1,2 +1,2 @@
1
- import { t as ClientAdapter } from "../../../v0-BAG8p0si.mjs";
1
+ import { t as ClientAdapter } from "../../../v0-CdusXjY_.mjs";
2
2
  export { ClientAdapter };
@@ -1,2 +1,2 @@
1
- import { t as ClientAdapter } from "../../../v0-DOq_Ia5H.mjs";
1
+ import { t as ClientAdapter } from "../../../v0-Dq3zhexO.mjs";
2
2
  export { ClientAdapter };
@@ -1,5 +1,5 @@
1
- import { a as SortDirection, i as DataTableAdapterResult, n as DataTableAdapterContext, o as SortEntry, r as DataTableAdapterInterface, t as DataTableAdapter } from "../../adapter-BZjmDNJF.mjs";
2
- import { n as ServerAdapterOptions, t as ServerAdapter } from "../../server-DNUTnISs.mjs";
3
- import { t as ClientAdapter } from "../../v0-BAG8p0si.mjs";
4
- import { t as VirtualAdapter } from "../../virtual-BaQWQ9ji.mjs";
1
+ import { a as SortDirection, i as DataTableAdapterResult, n as DataTableAdapterContext, o as SortEntry, r as DataTableAdapterInterface, t as DataTableAdapter } from "../../adapter-DlX3FA3A.mjs";
2
+ import { n as ServerAdapterOptions, t as ServerAdapter } from "../../server-3ilWFwqe.mjs";
3
+ import { t as ClientAdapter } from "../../v0-CdusXjY_.mjs";
4
+ import { t as VirtualAdapter } from "../../virtual-D4fckewC.mjs";
5
5
  export { ClientAdapter, DataTableAdapter, DataTableAdapterContext, DataTableAdapterInterface, DataTableAdapterResult, ServerAdapter, ServerAdapterOptions, SortDirection, SortEntry, VirtualAdapter };
@@ -1,6 +1,6 @@
1
- import { t as DataTableAdapter } from "../../adapter-CCIeOzqr.mjs";
2
- import { t as ClientAdapter } from "../../v0-DOq_Ia5H.mjs";
3
- import { t as ServerAdapter } from "../../server-CIftA0pK.mjs";
4
- import { t as VirtualAdapter } from "../../virtual-D1HwNBLS.mjs";
5
- import "../../adapters-BbNfjyvY.mjs";
1
+ import { t as DataTableAdapter } from "../../adapter-gQ2SNKZq.mjs";
2
+ import { t as ClientAdapter } from "../../v0-Dq3zhexO.mjs";
3
+ import { t as ServerAdapter } from "../../server-y7zLSCSx.mjs";
4
+ import { t as VirtualAdapter } from "../../virtual-C0yHf1DC.mjs";
5
+ import "../../adapters-Dse4bPxk.mjs";
6
6
  export { ClientAdapter, DataTableAdapter, ServerAdapter, VirtualAdapter };
@@ -1,2 +1,2 @@
1
- import { n as ServerAdapterOptions, t as ServerAdapter } from "../../../server-DNUTnISs.mjs";
1
+ import { n as ServerAdapterOptions, t as ServerAdapter } from "../../../server-3ilWFwqe.mjs";
2
2
  export { ServerAdapter, ServerAdapterOptions };
@@ -1,2 +1,2 @@
1
- import { t as ServerAdapter } from "../../../server-CIftA0pK.mjs";
1
+ import { t as ServerAdapter } from "../../../server-y7zLSCSx.mjs";
2
2
  export { ServerAdapter };
@@ -1,2 +1,2 @@
1
- import { t as VirtualAdapter } from "../../../virtual-BaQWQ9ji.mjs";
1
+ import { t as VirtualAdapter } from "../../../virtual-D4fckewC.mjs";
2
2
  export { VirtualAdapter };
@@ -1,2 +1,2 @@
1
- import { t as VirtualAdapter } from "../../../virtual-D1HwNBLS.mjs";
1
+ import { t as VirtualAdapter } from "../../../virtual-C0yHf1DC.mjs";
2
2
  export { VirtualAdapter };
@@ -1,6 +1,6 @@
1
- import { a as SortDirection, i as DataTableAdapterResult, n as DataTableAdapterContext, o as SortEntry, r as DataTableAdapterInterface, t as DataTableAdapter } from "../adapter-BZjmDNJF.mjs";
2
- import { n as ServerAdapterOptions, t as ServerAdapter } from "../server-DNUTnISs.mjs";
3
- import { t as ClientAdapter } from "../v0-BAG8p0si.mjs";
4
- import { t as VirtualAdapter } from "../virtual-BaQWQ9ji.mjs";
5
- import { a as DataTableGroup, c as DataTableSelection, d as createDataTable, f as createDataTableContext, i as DataTableExpansion, l as DataTableSort, n as DataTableContext, o as DataTableGrouping, p as useDataTable, r as DataTableContextOptions, s as DataTableOptions, t as DataTableColumn, u as SelectStrategy } from "../index-DoGxDgdN.mjs";
6
- export { ClientAdapter, DataTableAdapter, DataTableAdapterContext, DataTableAdapterInterface, DataTableAdapterResult, DataTableColumn, DataTableContext, DataTableContextOptions, DataTableExpansion, DataTableGroup, DataTableGrouping, DataTableOptions, DataTableSelection, DataTableSort, SelectStrategy, ServerAdapter, ServerAdapterOptions, SortDirection, SortEntry, VirtualAdapter, createDataTable, createDataTableContext, useDataTable };
1
+ import { a as SortDirection, i as DataTableAdapterResult, n as DataTableAdapterContext, o as SortEntry, r as DataTableAdapterInterface, t as DataTableAdapter } from "../adapter-DlX3FA3A.mjs";
2
+ import { _ as computeDepth, a as DataTableGroup, c as DataTableSelection, d as SelectStrategy, f as createDataTable, g as InternalHeader, h as ColumnNode, i as DataTableExpansion, l as DataTableSort, m as useDataTable, n as DataTableContext, o as DataTableGrouping, p as createDataTableContext, r as DataTableContextOptions, s as DataTableOptions, t as DataTableColumn, u as KeysOfType, v as extractLeaves, y as resolveHeaders } from "../index-BJGcVy7e.mjs";
3
+ import { n as ServerAdapterOptions, t as ServerAdapter } from "../server-3ilWFwqe.mjs";
4
+ import { t as ClientAdapter } from "../v0-CdusXjY_.mjs";
5
+ import { t as VirtualAdapter } from "../virtual-D4fckewC.mjs";
6
+ export { ClientAdapter, ColumnNode, DataTableAdapter, DataTableAdapterContext, DataTableAdapterInterface, DataTableAdapterResult, DataTableColumn, DataTableContext, DataTableContextOptions, DataTableExpansion, DataTableGroup, DataTableGrouping, DataTableOptions, DataTableSelection, DataTableSort, InternalHeader, KeysOfType, SelectStrategy, ServerAdapter, ServerAdapterOptions, SortDirection, SortEntry, VirtualAdapter, computeDepth, createDataTable, createDataTableContext, extractLeaves, resolveHeaders, useDataTable };
@@ -1,6 +1,6 @@
1
- import { t as DataTableAdapter } from "../adapter-CCIeOzqr.mjs";
2
- import { t as ClientAdapter } from "../v0-DOq_Ia5H.mjs";
3
- import { t as ServerAdapter } from "../server-CIftA0pK.mjs";
4
- import { t as VirtualAdapter } from "../virtual-D1HwNBLS.mjs";
5
- import { n as createDataTableContext, r as useDataTable, t as createDataTable } from "../createDataTable-BbUL9Vva.mjs";
6
- export { ClientAdapter, DataTableAdapter, ServerAdapter, VirtualAdapter, createDataTable, createDataTableContext, useDataTable };
1
+ import { t as DataTableAdapter } from "../adapter-gQ2SNKZq.mjs";
2
+ import { t as ClientAdapter } from "../v0-Dq3zhexO.mjs";
3
+ import { a as extractLeaves, i as computeDepth, n as createDataTableContext, o as resolveHeaders, r as useDataTable, t as createDataTable } from "../createDataTable-rXBqGglI.mjs";
4
+ import { t as ServerAdapter } from "../server-y7zLSCSx.mjs";
5
+ import { t as VirtualAdapter } from "../virtual-C0yHf1DC.mjs";
6
+ export { ClientAdapter, DataTableAdapter, ServerAdapter, VirtualAdapter, computeDepth, createDataTable, createDataTableContext, extractLeaves, resolveHeaders, useDataTable };
@@ -1,4 +1,4 @@
1
- import { t as DateAdapter } from "../adapter-T7AedXkz.mjs";
1
+ import { t as DateAdapter } from "../adapter-58IvIfAZ.mjs";
2
2
  import { Temporal } from "@js-temporal/polyfill";
3
3
 
4
4
  //#region src/composables/useDate/adapters/v0.d.ts
@@ -53,7 +53,7 @@ declare class Vuetify0DateAdapter implements DateAdapter<PlainDateTime> {
53
53
  */
54
54
  parse(value: string, _format: string): PlainDateTime | null;
55
55
  isValid(date: unknown): date is PlainDateTime;
56
- isNull(value: PlainDateTime | null): value is null;
56
+ isNullish(value: PlainDateTime | null): value is null;
57
57
  getCurrentLocaleCode(): string;
58
58
  is12HourCycleInCurrentLocale(): boolean;
59
59
  format(date: PlainDateTime, formatString: string): string;
@@ -1,5 +1,5 @@
1
- import { t as IN_BROWSER } from "../globals-CAv9vqkP.mjs";
2
- import { isNull, isNullOrUndefined, isNumber, isString } from "../utilities/index.mjs";
1
+ import { t as IN_BROWSER } from "../globals-CKdzjeLe.mjs";
2
+ import { isFunction, isNull, isNullOrUndefined, isNumber, isString } from "../utilities/index.mjs";
3
3
  import { Temporal } from "@js-temporal/polyfill";
4
4
  //#region src/composables/useDate/adapters/v0.ts
5
5
  /**
@@ -30,7 +30,7 @@ const MAX_CACHE_SIZE = 50;
30
30
  function deriveWeekInfo(locale) {
31
31
  try {
32
32
  const loc = new Intl.Locale(locale);
33
- const info = typeof loc.getWeekInfo === "function" ? loc.getWeekInfo() : loc.weekInfo;
33
+ const info = /* @__PURE__ */ isFunction(loc.getWeekInfo) ? loc.getWeekInfo() : loc.weekInfo;
34
34
  return {
35
35
  firstDay: info?.firstDay === 7 ? 0 : info?.firstDay ?? 0,
36
36
  minimalDays: info?.minimalDays ?? deriveMinimalDays(locale)
@@ -193,7 +193,7 @@ var Vuetify0DateAdapter = class {
193
193
  }
194
194
  return false;
195
195
  }
196
- isNull(value) {
196
+ isNullish(value) {
197
197
  return /* @__PURE__ */ isNullOrUndefined(value);
198
198
  }
199
199
  getCurrentLocaleCode() {
@@ -1,2 +1,2 @@
1
- import { t as FlagsmithFeatureAdapter } from "../../../index-tyzwWFHS.mjs";
1
+ import { t as FlagsmithFeatureAdapter } from "../../../index-BzFHTW59.mjs";
2
2
  export { FlagsmithFeatureAdapter };
@@ -1,2 +1,2 @@
1
- import { t as FlagsmithFeatureAdapter } from "../../../flagsmith-DQnnahG5.mjs";
1
+ import { t as FlagsmithFeatureAdapter } from "../../../flagsmith-Dbh1h8WF.mjs";
2
2
  export { FlagsmithFeatureAdapter };
@@ -1,2 +1,2 @@
1
- import { t as LaunchDarklyFeatureAdapter } from "../../../index-M8EpGjjA.mjs";
1
+ import { t as LaunchDarklyFeatureAdapter } from "../../../index-1XdASTjp.mjs";
2
2
  export { LaunchDarklyFeatureAdapter };
@@ -1,2 +1,2 @@
1
- import { t as LaunchDarklyFeatureAdapter } from "../../../launchdarkly-2_48EJ1_.mjs";
1
+ import { t as LaunchDarklyFeatureAdapter } from "../../../launchdarkly-BKtW-idu.mjs";
2
2
  export { LaunchDarklyFeatureAdapter };
@@ -1,2 +1,2 @@
1
- import { t as PostHogFeatureAdapter } from "../../../index-F2Fmxnzi.mjs";
1
+ import { t as PostHogFeatureAdapter } from "../../../index-Dp1HjBxJ.mjs";
2
2
  export { PostHogFeatureAdapter };
@@ -1,2 +1,2 @@
1
- import { t as PostHogFeatureAdapter } from "../../../posthog-B8PEtlFr.mjs";
1
+ import { t as PostHogFeatureAdapter } from "../../../posthog-DZNnPXxS.mjs";
2
2
  export { PostHogFeatureAdapter };
@@ -1,3 +1,3 @@
1
- import { $n as createFeaturesContext, Jn as FeatureOptions, Kn as FeatureContext, Qn as createFeatures, Xn as FeatureTicket, Yn as FeaturePluginOptions, Zn as FeatureTicketInput, er as createFeaturesPlugin, qn as FeatureContextOptions, tr as useFeatures } from "../index-B_XLHftL.mjs";
2
- import { i as FeaturesAdapterValue, n as FeaturesAdapterFlags, r as FeaturesAdapterInterface, t as FeaturesAdapter } from "../index-CDcl4wPo.mjs";
1
+ import { $n as createFeaturesContext, Jn as FeatureOptions, Kn as FeatureContext, Qn as createFeatures, Xn as FeatureTicket, Yn as FeaturePluginOptions, Zn as FeatureTicketInput, er as createFeaturesPlugin, qn as FeatureContextOptions, tr as useFeatures } from "../index-BxKMMWnQ.mjs";
2
+ import { i as FeaturesAdapterValue, n as FeaturesAdapterFlags, r as FeaturesAdapterInterface, t as FeaturesAdapter } from "../index-CT5SCLzW.mjs";
3
3
  export { FeatureContext, FeatureContextOptions, FeatureOptions, FeaturePluginOptions, FeatureTicket, FeatureTicketInput, FeaturesAdapter, FeaturesAdapterFlags, FeaturesAdapterInterface, FeaturesAdapterValue, createFeatures, createFeaturesContext, createFeaturesPlugin, useFeatures };
@@ -1,2 +1,2 @@
1
- import { a as FeaturesAdapter, i as useFeatures, n as createFeaturesContext, r as createFeaturesPlugin, t as createFeatures } from "../useFeatures-CMpkbU8Q.mjs";
1
+ import { a as FeaturesAdapter, i as useFeatures, n as createFeaturesContext, r as createFeaturesPlugin, t as createFeatures } from "../useFeatures-ZIvzzuEV.mjs";
2
2
  export { FeaturesAdapter, createFeatures, createFeaturesContext, createFeaturesPlugin, useFeatures };
@@ -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.0.0-alpha.0";
8
+ const version = "1.0.0-alpha.2";
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
@@ -0,0 +1,28 @@
1
+ /**
2
+ * Set of HTML elements that are self-closing (void elements)
3
+ * These elements cannot have children and don't need closing tags
4
+ */
5
+ const SELF_CLOSING_TAGS = /* @__PURE__ */ new Set([
6
+ "area",
7
+ "base",
8
+ "br",
9
+ "col",
10
+ "embed",
11
+ "hr",
12
+ "img",
13
+ "input",
14
+ "link",
15
+ "meta",
16
+ "source",
17
+ "track",
18
+ "wbr"
19
+ ]);
20
+ /**
21
+ * Check if an element is self-closing
22
+ */
23
+ /* @__NO_SIDE_EFFECTS__ */
24
+ function isSelfClosingTag(tag) {
25
+ return SELF_CLOSING_TAGS.has(tag.toLowerCase());
26
+ }
27
+ //#endregion
28
+ export { isSelfClosingTag as n, SELF_CLOSING_TAGS as t };
@@ -1,4 +1,4 @@
1
- import { n as FeaturesAdapterFlags, r as FeaturesAdapterInterface } from "./index-CDcl4wPo.mjs";
1
+ import { n as FeaturesAdapterFlags, r as FeaturesAdapterInterface } from "./index-CT5SCLzW.mjs";
2
2
  import { LDClient } from "launchdarkly-js-client-sdk";
3
3
 
4
4
  //#region src/composables/useFeatures/adapters/launchdarkly/index.d.ts