@vuetify/v0 0.0.23 → 0.0.24

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 (32) hide show
  1. package/dist/adapter-L4Php1_S.d.mts +97 -0
  2. package/dist/browser/index.js +1069 -809
  3. package/dist/components/index.d.mts +4 -4
  4. package/dist/components/index.mjs +6 -6
  5. package/dist/{components-BI9xdoz5.mjs → components-D_yAxHwn.mjs} +433 -113
  6. package/dist/composables/index.d.mts +5 -4
  7. package/dist/composables/index.mjs +4 -4
  8. package/dist/constants/index.d.mts +1 -1
  9. package/dist/constants/index.mjs +3 -3
  10. package/dist/date/index.d.mts +124 -0
  11. package/dist/date/index.mjs +7514 -0
  12. package/dist/{globals-WKdFmgwy.mjs → globals-BhNI7no7.mjs} +1 -1
  13. package/dist/{index-Bby5ljat.d.mts → index-DknfL2GU.d.mts} +1 -1
  14. package/dist/{index-_y91DmIS.d.mts → index-OghXharF.d.mts} +721 -359
  15. package/dist/{index-DYSwiS9k.d.mts → index-ZW2YLa57.d.mts} +21 -2
  16. package/dist/{index-rcTqb9U3.d.mts → index-isYKpbs6.d.mts} +426 -266
  17. package/dist/{index-C8YcMooA.d.mts → index-kvJsAOSg.d.mts} +13 -9
  18. package/dist/index.d.mts +8 -7
  19. package/dist/index.mjs +7 -7
  20. package/dist/json/attributes.json +100 -0
  21. package/dist/json/importMap.json +64 -0
  22. package/dist/json/tags.json +45 -0
  23. package/dist/json/web-types.json +1303 -392
  24. package/dist/types/index.d.mts +2 -2
  25. package/dist/{useClickOutside-B47X8X6-.mjs → useClickOutside-w-Y2QxHh.mjs} +591 -657
  26. package/dist/utilities/index.d.mts +3 -3
  27. package/dist/utilities/index.mjs +2 -2
  28. package/dist/{utilities-9i1hJnMd.mjs → utilities-B58TiS_S.mjs} +41 -34
  29. package/package.json +3 -2
  30. /package/dist/{constants-3l8TGg5J.mjs → constants-DHKqjdjH.mjs} +0 -0
  31. /package/dist/{htmlElements-CXObxj0V.mjs → htmlElements-DO9n35bD.mjs} +0 -0
  32. /package/dist/{index-DMQJJUrv.d.mts → index-cPmI99rd.d.mts} +0 -0
@@ -1,3 +1,3 @@
1
- import "../index-DYSwiS9k.mjs";
2
- import { _ as isUndefined, a as genId, c as isFunction, d as isNullOrUndefined, f as isNumber, g as isSymbol, h as isString, i as debounce, l as isNaN, m as isPrimitive, n as instanceName, o as isArray, p as isObject, r as clamp, s as isBoolean, t as instanceExists, u as isNull, v as mergeDeep, y as range } from "../index-C8YcMooA.mjs";
3
- export { clamp, debounce, genId, instanceExists, instanceName, isArray, isBoolean, isFunction, isNaN, isNull, isNullOrUndefined, isNumber, isObject, isPrimitive, isString, isSymbol, isUndefined, mergeDeep, range };
1
+ import "../index-ZW2YLa57.mjs";
2
+ import { _ as mergeDeep, a as isArray, c as isNaN, d as isNumber, f as isObject, g as isUndefined, h as isSymbol, i as debounce, l as isNull, m as isString, n as instanceName, o as isBoolean, p as isPrimitive, r as clamp, s as isFunction, t as instanceExists, u as isNullOrUndefined, v as range, y as useId } from "../index-kvJsAOSg.mjs";
3
+ export { clamp, debounce, instanceExists, instanceName, isArray, isBoolean, isFunction, isNaN, isNull, isNullOrUndefined, isNumber, isObject, isPrimitive, isString, isSymbol, isUndefined, mergeDeep, range, useId };
@@ -1,3 +1,3 @@
1
- import { _ as isUndefined, a as genId, c as isFunction, d as isNullOrUndefined, f as isNumber, g as isSymbol, h as isString, i as debounce, l as isNaN, m as isPrimitive, n as instanceName, o as isArray, p as isObject, r as clamp, s as isBoolean, t as instanceExists, u as isNull, v as mergeDeep, y as range } from "../utilities-9i1hJnMd.mjs";
1
+ import { _ as useId, a as isFunction, c as isNullOrUndefined, d as isPrimitive, f as isString, g as range, h as mergeDeep, i as isBoolean, l as isNumber, m as isUndefined, n as debounce, o as isNaN, p as isSymbol, r as isArray, s as isNull, t as clamp, u as isObject, v as instanceExists, y as instanceName } from "../utilities-B58TiS_S.mjs";
2
2
 
3
- export { clamp, debounce, genId, instanceExists, instanceName, isArray, isBoolean, isFunction, isNaN, isNull, isNullOrUndefined, isNumber, isObject, isPrimitive, isString, isSymbol, isUndefined, mergeDeep, range };
3
+ export { clamp, debounce, instanceExists, instanceName, isArray, isBoolean, isFunction, isNaN, isNull, isNullOrUndefined, isNumber, isObject, isPrimitive, isString, isSymbol, isUndefined, mergeDeep, range, useId };
@@ -1,5 +1,31 @@
1
1
  import * as Vue from "vue";
2
+ import { useId } from "vue";
2
3
 
4
+ //#region src/utilities/instance.ts
5
+ /**
6
+ * Vue 3.6+ exposes `currentInstance` for Vapor mode compatibility.
7
+ * `getCurrentInstance()` returns null in Vapor components by design,
8
+ * so we access `currentInstance` directly when available.
9
+ *
10
+ * Uses dynamic key to avoid bundler static analysis warnings.
11
+ *
12
+ * @see https://github.com/orgs/vuejs/discussions/13629
13
+ * @internal
14
+ */
15
+ const INSTANCE_KEY = "currentInstance";
16
+ function getInstanceCompat() {
17
+ const vueExports = Vue;
18
+ if (INSTANCE_KEY in vueExports) return vueExports[INSTANCE_KEY];
19
+ return Vue.getCurrentInstance();
20
+ }
21
+ function instanceExists() {
22
+ return !/* @__PURE__ */ isNull(getInstanceCompat());
23
+ }
24
+ function instanceName() {
25
+ return getInstanceCompat()?.type?.name;
26
+ }
27
+
28
+ //#endregion
3
29
  //#region src/utilities/helpers.ts
4
30
  /**
5
31
  * Checks if a value is a function
@@ -279,24 +305,30 @@ function mergeDeep(target, ...sources) {
279
305
  }
280
306
  return /* @__PURE__ */ mergeDeep(target, ...sources);
281
307
  }
308
+ let idCounter = 0;
282
309
  /**
283
- * Generates a random 7-character alphanumeric ID
310
+ * Generates a unique ID, using Vue's useId when in component context
284
311
  *
285
- * @returns A random string of 7 characters (a-z, 0-9)
312
+ * @returns A unique string ID
286
313
  *
287
314
  * @remarks
288
- * Uses `Math.random()` converted to base-36. Not cryptographically secure.
289
- * Suitable for unique keys in UI components, not for security purposes.
315
+ * - In component setup/lifecycle: Uses Vue's `useId()` for SSR-safe hydration
316
+ * - Outside components: Falls back to sequential counter (`v0-0`, `v0-1`, ...)
317
+ * - Vapor mode compatible
290
318
  *
291
319
  * @example
292
320
  * ```ts
293
- * genId() // 'k7x9m2p'
294
- * genId() // 'a3b8c1d'
321
+ * // In component setup - SSR safe
322
+ * const id = useId() // 'v:0', 'v:1', etc. (Vue's format)
323
+ *
324
+ * // Outside component - counter fallback
325
+ * const id = useId() // 'v0-0', 'v0-1', etc.
295
326
  * ```
296
327
  */
297
328
  /* @__NO_SIDE_EFFECTS__ */
298
- function genId() {
299
- return Math.random().toString(36).slice(2, 9);
329
+ function useId$1() {
330
+ if (instanceExists()) return useId();
331
+ return `v0-${idCounter++}`;
300
332
  }
301
333
  /**
302
334
  * Clamps a value between a minimum and maximum
@@ -368,29 +400,4 @@ function debounce(fn, delay) {
368
400
  }
369
401
 
370
402
  //#endregion
371
- //#region src/utilities/instance.ts
372
- /**
373
- * Vue 3.6+ exposes `currentInstance` for Vapor mode compatibility.
374
- * `getCurrentInstance()` returns null in Vapor components by design,
375
- * so we access `currentInstance` directly when available.
376
- *
377
- * Uses dynamic key to avoid bundler static analysis warnings.
378
- *
379
- * @see https://github.com/orgs/vuejs/discussions/13629
380
- * @internal
381
- */
382
- const INSTANCE_KEY = "currentInstance";
383
- function getInstanceCompat() {
384
- const vueExports = Vue;
385
- if (INSTANCE_KEY in vueExports) return vueExports[INSTANCE_KEY];
386
- return Vue.getCurrentInstance();
387
- }
388
- function instanceExists() {
389
- return !/* @__PURE__ */ isNull(getInstanceCompat());
390
- }
391
- function instanceName() {
392
- return getInstanceCompat()?.type?.name;
393
- }
394
-
395
- //#endregion
396
- export { isUndefined as _, genId as a, isFunction as c, isNullOrUndefined as d, isNumber as f, isSymbol as g, isString as h, debounce as i, isNaN as l, isPrimitive as m, instanceName as n, isArray as o, isObject as p, clamp as r, isBoolean as s, instanceExists as t, isNull as u, mergeDeep as v, range as y };
403
+ export { useId$1 as _, isFunction as a, isNullOrUndefined as c, isPrimitive as d, isString as f, range as g, mergeDeep as h, isBoolean as i, isNumber as l, isUndefined as m, debounce as n, isNaN as o, isSymbol as p, isArray as r, isNull as s, clamp as t, isObject as u, instanceExists as v, instanceName as y };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vuetify/v0",
3
- "version": "0.0.23",
3
+ "version": "0.0.24",
4
4
  "description": "Vuetify0",
5
5
  "license": "MIT",
6
6
  "main": "./dist/index.mjs",
@@ -32,12 +32,13 @@
32
32
  "./components": "./dist/components/index.mjs",
33
33
  "./composables": "./dist/composables/index.mjs",
34
34
  "./constants": "./dist/constants/index.mjs",
35
+ "./date": "./dist/date/index.mjs",
35
36
  "./types": "./dist/types/index.mjs",
36
37
  "./utilities": "./dist/utilities/index.mjs",
37
38
  "./package.json": "./package.json",
38
39
  "./browser": "./dist/browser/index.js"
39
40
  },
40
- "dependencies": {
41
+ "optionalDependencies": {
41
42
  "@js-temporal/polyfill": "0.5.1"
42
43
  },
43
44
  "scripts": {