@vuetify/v0 0.1.2 → 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.
- package/README.md +20 -3
- package/dist/browser/index.js +5645 -3968
- package/dist/components/index.d.mts +7 -4
- package/dist/components/index.mjs +5 -5
- package/dist/{components-z56rRlS4.mjs → components-C0zEvP7w.mjs} +580 -89
- package/dist/composables/index.d.mts +4 -5
- package/dist/composables/index.mjs +4 -4
- package/dist/constants/index.d.mts +1 -1
- package/dist/constants/index.mjs +1 -1
- package/dist/date/index.d.mts +1 -1
- package/dist/date/index.mjs +19 -15
- package/dist/{globals-VwjZ5i4B.mjs → globals-BwYsH-rt.mjs} +1 -1
- package/dist/{index-CLKfXGEQ.d.mts → index-2wh69fk5.d.mts} +2781 -459
- package/dist/{index-DlxrzbvZ.d.mts → index-BLK67J_-.d.mts} +41 -1
- package/dist/{index-CoO8LW8o.d.mts → index-DBZTizq2.d.mts} +1 -1
- package/dist/{index-PuLeBGZ3.d.mts → index-DFM5iBqh.d.mts} +899 -335
- package/dist/index.d.mts +7 -8
- package/dist/index.mjs +5 -5
- package/dist/json/attributes.json +140 -0
- package/dist/json/importMap.json +36 -0
- package/dist/json/tags.json +75 -0
- package/dist/json/web-types.json +440 -1
- package/dist/types/index.d.mts +2 -2
- package/dist/{useClickOutside-Dp1MHIjr.mjs → useClickOutside-DrkNYxDe.mjs} +4252 -3066
- package/dist/utilities/index.d.mts +2 -2
- package/dist/utilities/index.mjs +2 -1
- package/dist/{utilities-B58TiS_S.mjs → utilities-BbKjbXTx.mjs} +9 -0
- package/package.json +4 -3
- package/dist/index-qSuLpob3.d.mts +0 -1544
- /package/dist/{adapter-L4Php1_S.d.mts → adapter-D95FHAtt.d.mts} +0 -0
- /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 {
|
|
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 };
|