@vuetify/v0 0.1.1 → 0.1.3

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 (31) hide show
  1. package/README.md +20 -3
  2. package/dist/browser/index.js +5662 -3984
  3. package/dist/components/index.d.mts +7 -4
  4. package/dist/components/index.mjs +5 -5
  5. package/dist/{components-BOipMGkD.mjs → components-C0zEvP7w.mjs} +580 -89
  6. package/dist/composables/index.d.mts +4 -5
  7. package/dist/composables/index.mjs +4 -4
  8. package/dist/constants/index.d.mts +1 -1
  9. package/dist/constants/index.mjs +1 -1
  10. package/dist/date/index.d.mts +1 -1
  11. package/dist/date/index.mjs +19 -15
  12. package/dist/{globals-qE_M6ZhX.mjs → globals-BwYsH-rt.mjs} +1 -1
  13. package/dist/{index-DmNXO254.d.mts → index-2wh69fk5.d.mts} +2782 -460
  14. package/dist/{index-DlxrzbvZ.d.mts → index-BLK67J_-.d.mts} +41 -1
  15. package/dist/{index-CoO8LW8o.d.mts → index-DBZTizq2.d.mts} +1 -1
  16. package/dist/{index-Bx6Ke-u_.d.mts → index-DFM5iBqh.d.mts} +906 -342
  17. package/dist/index.d.mts +7 -8
  18. package/dist/index.mjs +5 -5
  19. package/dist/json/attributes.json +140 -0
  20. package/dist/json/importMap.json +36 -0
  21. package/dist/json/tags.json +75 -0
  22. package/dist/json/web-types.json +440 -1
  23. package/dist/types/index.d.mts +2 -2
  24. package/dist/{useClickOutside-DcrXfUVx.mjs → useClickOutside-DrkNYxDe.mjs} +4200 -3013
  25. package/dist/utilities/index.d.mts +2 -2
  26. package/dist/utilities/index.mjs +2 -1
  27. package/dist/{utilities-B58TiS_S.mjs → utilities-BbKjbXTx.mjs} +9 -0
  28. package/package.json +4 -3
  29. package/dist/index-qSuLpob3.d.mts +0 -1544
  30. /package/dist/{adapter-L4Php1_S.d.mts → adapter-D95FHAtt.d.mts} +0 -0
  31. /package/dist/{index-cPmI99rd.d.mts → index-Bmem4l8m.d.mts} +0 -0
@@ -69,6 +69,46 @@ type DeepPartial<T> = T extends object ? { [P in keyof T]?: DeepPartial<T[P]> }
69
69
  * ```
70
70
  */
71
71
  type MaybeArray<T> = T | T[];
72
+ /**
73
+ * Preserves string literal autocomplete while allowing arbitrary strings
74
+ *
75
+ * @template T The string literal union to preserve
76
+ *
77
+ * @remarks
78
+ * TypeScript normally collapses `'a' | 'b' | string` into just `string`,
79
+ * losing IDE autocomplete for the known values. This type uses the
80
+ * `string & {}` trick to prevent that collapse.
81
+ *
82
+ * Use for extensible APIs where you want autocomplete for known values
83
+ * but still accept custom strings: event names, theme tokens, CSS classes, etc.
84
+ *
85
+ * @example
86
+ * ```ts
87
+ * type Color = 'red' | 'blue' | 'green'
88
+ *
89
+ * // WITHOUT Extensible - autocomplete lost
90
+ * type BadColor = Color | string // collapses to just `string`
91
+ *
92
+ * // WITH Extensible - autocomplete preserved
93
+ * type GoodColor = Extensible<Color>
94
+ *
95
+ * function setColor(c: GoodColor) {}
96
+ * setColor('red') // autocomplete suggests 'red' | 'blue' | 'green'
97
+ * setColor('purple') // also OK - custom value accepted
98
+ * ```
99
+ *
100
+ * @example
101
+ * ```ts
102
+ * // Event system with typed + custom events
103
+ * type KnownEvent = 'click' | 'hover' | 'focus'
104
+ *
105
+ * function on<K extends Extensible<KnownEvent>>(event: K, cb: Callback<K>) {}
106
+ *
107
+ * on('click', ...) // autocomplete works
108
+ * on('custom', ...) // custom events allowed
109
+ * ```
110
+ */
111
+ type Extensible<T extends string> = T | (string & {});
72
112
  /**
73
113
  * Keyboard activation mode for navigable components
74
114
  *
@@ -90,4 +130,4 @@ type MaybeArray<T> = T | T[];
90
130
  */
91
131
  type Activation = 'automatic' | 'manual';
92
132
  //#endregion
93
- export { ID as a, GenericObject as i, DOMElement as n, MaybeArray as o, DeepPartial as r, UnknownObject as s, Activation as t };
133
+ export { GenericObject as a, UnknownObject as c, Extensible as i, DOMElement as n, ID as o, DeepPartial as r, MaybeArray as s, Activation as t };
@@ -1,4 +1,4 @@
1
- import { r as DeepPartial } from "./index-DlxrzbvZ.mjs";
1
+ import { r as DeepPartial } from "./index-BLK67J_-.mjs";
2
2
 
3
3
  //#region src/utilities/helpers.d.ts
4
4