@vuetify/v0 0.1.5 → 0.1.7
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 +0 -1
- package/dist/{adapter-Cmeg49W9.mjs → adapter-B4zE-hA5.mjs} +10 -15
- package/dist/adapter-CqP9Z4JU.d.mts +1087 -0
- package/dist/{adapter-D2JoR-4d.d.mts → adapter-DIx4Rntl.d.mts} +6 -49
- package/dist/adapters-BjeDmKc6.mjs +1 -0
- package/dist/adapters-Bv5aRv3l.mjs +1 -0
- package/dist/adapters-C66XaKkw.mjs +1 -0
- package/dist/adapters-DkVblyML.mjs +1 -0
- package/dist/adapters-uJLWGQJl.mjs +1 -0
- package/dist/browser/index.js +2251 -826
- package/dist/components/index.d.mts +2 -20
- package/dist/components/index.mjs +34 -39
- package/dist/{components-BbbGkTcN.mjs → components-CACff-Lt.mjs} +1154 -317
- package/dist/composables/index.d.mts +18 -17
- package/dist/composables/index.mjs +34 -37
- package/dist/{consola-DiUk9j3y.d.mts → consola-BVzYzeLH.d.mts} +1 -1
- package/dist/{consola-GBy8XRuL.mjs → consola-Ceox8BWi.mjs} +1 -2
- package/dist/constants/index.d.mts +1 -1
- package/dist/constants/index.mjs +3 -5
- package/dist/{createDataTable-cNf6DdHz.mjs → createDataTable-CLI4TALE.mjs} +9 -11
- package/dist/{createGroup-BrZPZudL.mjs → createGroup-Cf6lK9BR.mjs} +7 -9
- package/dist/{createPagination-Wc_vRGNQ.mjs → createPagination-Bu8vE0JW.mjs} +3 -5
- package/dist/{createSelection-BURpoE3p.mjs → createSelection-DvOR2tKk.mjs} +216 -63
- package/dist/{createSingle-BE1vHaZy.mjs → createSingle-Bbcwcq4R.mjs} +3 -5
- package/dist/{createTokens-jwf8-iGn.mjs → createTokens-CMRBDlzN.mjs} +41 -26
- package/dist/{createTrinity-DkwPrPRS.mjs → createTrinity-C_c8eedz.mjs} +10 -13
- package/dist/data-table/adapters/client/index.d.mts +1 -2
- package/dist/data-table/adapters/client/index.mjs +7 -9
- package/dist/data-table/adapters/index.d.mts +4 -4
- package/dist/data-table/adapters/index.mjs +10 -12
- package/dist/data-table/adapters/server/index.d.mts +1 -2
- package/dist/data-table/adapters/server/index.mjs +5 -7
- package/dist/data-table/adapters/virtual/index.d.mts +1 -2
- package/dist/data-table/adapters/virtual/index.mjs +7 -9
- package/dist/data-table/index.d.mts +5 -6
- package/dist/data-table/index.mjs +22 -25
- package/dist/date/index.d.mts +1 -3
- package/dist/date/index.mjs +3932 -3943
- package/dist/features/adapters/flagsmith/index.d.mts +2 -4
- package/dist/features/adapters/flagsmith/index.mjs +2 -3
- package/dist/features/adapters/launchdarkly/index.d.mts +1 -3
- package/dist/features/adapters/launchdarkly/index.mjs +2 -3
- package/dist/features/adapters/posthog/index.d.mts +1 -3
- package/dist/features/adapters/posthog/index.mjs +3 -4
- package/dist/features/index.d.mts +2 -16
- package/dist/features/index.mjs +13 -18
- package/dist/{flagsmith-CHmpPGR7.mjs → flagsmith-CrWUeIhT.mjs} +1 -2
- package/dist/{globals-vN-O052q.mjs → globals-BqRH_jdr.mjs} +2 -3
- package/dist/{htmlElements-d8iBCGpO.mjs → htmlElements-DcYtv0hg.mjs} +7 -10
- package/dist/index-8sflFIN8.d.mts +856 -0
- package/dist/{index-BTMzRHep.d.mts → index-BE848tZ2.d.mts} +938 -889
- package/dist/{index-DRax9EgT.d.mts → index-CKbxWC4t.d.mts} +1358 -542
- package/dist/index-CeNfBYuo.d.mts +46 -0
- package/dist/{index-DdWxDPX3.d.mts → index-CmCMrlt3.d.mts} +3 -3
- package/dist/{index-BFBN5Zl3.d.mts → index-Dor6eAEc.d.mts} +0 -1
- package/dist/{index-UNwEBkQT.d.mts → index-MHkcqY_y.d.mts} +1 -2
- package/dist/{index-BuOz3Rgm.d.mts → index-dJKXAO5D.d.mts} +1 -2
- package/dist/index.d.mts +22 -20
- package/dist/index.mjs +38 -40
- package/dist/json/attributes.json +196 -12
- package/dist/json/importMap.json +40 -0
- package/dist/json/tags.json +86 -0
- package/dist/json/web-types.json +605 -13
- package/dist/{launchdarkly-W8t8ZANX.mjs → launchdarkly-jF2KZGoH.mjs} +1 -2
- package/dist/locale/adapters/index.d.mts +1 -2
- package/dist/locale/adapters/index.mjs +4 -6
- package/dist/locale/adapters/v0/index.d.mts +1 -2
- package/dist/locale/adapters/v0/index.mjs +3 -5
- package/dist/locale/index.d.mts +2 -16
- package/dist/locale/index.mjs +14 -17
- package/dist/logger/adapters/consola/index.d.mts +1 -2
- package/dist/logger/adapters/consola/index.mjs +2 -3
- package/dist/logger/adapters/index.d.mts +4 -4
- package/dist/logger/adapters/index.mjs +6 -8
- package/dist/logger/adapters/pino/index.d.mts +1 -2
- package/dist/logger/adapters/pino/index.mjs +3 -5
- package/dist/logger/adapters/v0/index.d.mts +1 -2
- package/dist/logger/adapters/v0/index.mjs +3 -5
- package/dist/logger/index.d.mts +5 -16
- package/dist/logger/index.mjs +8 -10
- package/dist/{memory-BsZGbGnG.mjs → memory-XCMtkld1.mjs} +1 -2
- package/dist/palettes/ant/generate/index.d.mts +9 -0
- package/dist/palettes/ant/generate/index.mjs +98 -0
- package/dist/palettes/ant/index.d.mts +6 -0
- package/dist/palettes/ant/index.mjs +149 -0
- package/dist/palettes/index.d.mts +12 -0
- package/dist/palettes/index.mjs +1 -0
- package/dist/palettes/leonardo/generate/index.d.mts +10 -0
- package/dist/palettes/leonardo/generate/index.mjs +120 -0
- package/dist/palettes/material/generate/index.d.mts +10 -0
- package/dist/palettes/material/generate/index.mjs +103 -0
- package/dist/palettes/material/index.d.mts +6 -0
- package/dist/palettes/material/index.mjs +173 -0
- package/dist/palettes/md1/index.d.mts +6 -0
- package/dist/palettes/md1/index.mjs +261 -0
- package/dist/palettes/md2/index.d.mts +6 -0
- package/dist/palettes/md2/index.mjs +297 -0
- package/dist/palettes/radix/index.d.mts +6 -0
- package/dist/palettes/radix/index.mjs +439 -0
- package/dist/palettes/tailwind/index.d.mts +6 -0
- package/dist/palettes/tailwind/index.mjs +291 -0
- package/dist/permissions/adapters/index.d.mts +2 -17
- package/dist/permissions/adapters/index.mjs +4 -6
- package/dist/permissions/adapters/v0/index.d.mts +1 -17
- package/dist/permissions/adapters/v0/index.mjs +3 -5
- package/dist/permissions/index.d.mts +1 -16
- package/dist/permissions/index.mjs +12 -15
- package/dist/{pino-DFxkZLiu.mjs → pino-B7tJ3m18.mjs} +2 -4
- package/dist/{pino-p-jDkNQd.d.mts → pino-Bzighnkd.d.mts} +1 -2
- package/dist/{posthog-BOUoZTTf.mjs → posthog-DbPqmaAp.mjs} +2 -4
- package/dist/rules/index.d.mts +2 -0
- package/dist/rules/index.mjs +15 -0
- package/dist/{server-C2R2POGE.mjs → server-CZ6ahbEH.mjs} +2 -4
- package/dist/{server-B-HWxaTQ.d.mts → server-Ch9J86tb.d.mts} +1 -2
- package/dist/storage/adapters/index.d.mts +2 -2
- package/dist/storage/adapters/index.mjs +2 -3
- package/dist/storage/adapters/memory/index.d.mts +1 -1
- package/dist/storage/adapters/memory/index.mjs +2 -3
- package/dist/storage/index.d.mts +3 -16
- package/dist/storage/index.mjs +33 -37
- package/dist/theme/adapters/index.d.mts +1 -16
- package/dist/theme/adapters/index.mjs +4 -6
- package/dist/theme/adapters/v0/index.d.mts +1 -16
- package/dist/theme/adapters/v0/index.mjs +3 -5
- package/dist/theme/index.d.mts +1 -16
- package/dist/theme/index.mjs +13 -16
- package/dist/{toArray-VIn8vYt3.mjs → toArray-VdROPpy-.mjs} +2 -4
- package/dist/types/index.d.mts +1 -1
- package/dist/types/index.mjs +1 -1
- package/dist/{useClickOutside-DIi0kjN5.mjs → useClickOutside-YOGwKo7v.mjs} +603 -287
- package/dist/{useFeatures-6O7EPJUS.mjs → useFeatures-BGDgUrdr.mjs} +5 -8
- package/dist/{useLocale-DHjbekzS.mjs → useLocale-C8I_fNAS.mjs} +7 -9
- package/dist/{useLogger-BXqiUvt2.mjs → useLogger-B70T4SgK.mjs} +13 -16
- package/dist/{usePermissions-DFacFVqO.mjs → usePermissions-afVt2qR7.mjs} +5 -7
- package/dist/useRules-7C92Xzyt.mjs +144 -0
- package/dist/{useTheme-D0_1mjTw.mjs → useTheme-jp2wL2FJ.mjs} +11 -13
- package/dist/utilities/index.d.mts +1 -2
- package/dist/utilities/index.mjs +426 -4
- package/dist/{v0-BNXo1ecc.d.mts → v0-1bfmyZ5_.d.mts} +2 -2
- package/dist/{v0-BOxb3nD1.d.mts → v0-1xxC39wf.d.mts} +1 -2
- package/dist/{v0-BYqmw3qM.mjs → v0-B1QQGE4O.mjs} +2 -5
- package/dist/{v0-DHMoZ7dS.d.mts → v0-CAKa6tzG.d.mts} +1 -1
- package/dist/{v0-Dwufx8ae.mjs → v0-CGlkn5u7.mjs} +3 -6
- package/dist/{v0-CfSj99gF.mjs → v0-CHvU3jQE.mjs} +3 -5
- package/dist/{v0-BPzPP8C5.d.mts → v0-CdUL2eOn.d.mts} +1 -2
- package/dist/{v0-C8DBv9mh.mjs → v0-V-cQsuZD.mjs} +3 -5
- package/dist/{v0-Dc5mcpQs.mjs → v0-YAqbXudL.mjs} +3 -5
- package/dist/{virtual-A4e1yrdn.d.mts → virtual-DwBiFA25.d.mts} +1 -2
- package/dist/{virtual-BoTGK6HT.mjs → virtual-eDNVH1fz.mjs} +3 -5
- package/package.json +39 -11
- package/dist/adapter-DcwxFryd.d.mts +0 -97
- package/dist/adapters-BGJKsBrw.mjs +0 -1
- package/dist/adapters-BQ-Lr3PW.mjs +0 -1
- package/dist/adapters-DEXpW9If.mjs +0 -1
- package/dist/adapters-Q9WaOsJp.mjs +0 -1
- package/dist/adapters-SSDVth5e.mjs +0 -1
- package/dist/constants-B8pMSkcW.mjs +0 -1
- package/dist/utilities-Dx8wzGa5.mjs +0 -429
- /package/dist/{adapter-CJIj5ySf.d.mts → adapter-JTFG3Jn8.d.mts} +0 -0
- /package/dist/{index-Bv1VN_j5.d.mts → index-B5ZDDkXv.d.mts} +0 -0
- /package/dist/{index-BDTbJClL.d.mts → index-NsE5nARK.d.mts} +0 -0
- /package/dist/{memory-DVjquu_v.d.mts → memory-BTtRdnNn.d.mts} +0 -0
|
@@ -1,676 +1,327 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { n as
|
|
6
|
-
import {
|
|
7
|
-
import { t as
|
|
1
|
+
import { o as ID, s as MaybeArray } from "./index-Dor6eAEc.mjs";
|
|
2
|
+
import { t as ContextTrinity } from "./index-CeNfBYuo.mjs";
|
|
3
|
+
import { b as RegistryTicketInput, c as TokenTicket, i as TokenContext, o as TokenOptions, p as RegistryContext, r as TokenCollection, v as RegistryOptions, y as RegistryTicket } from "./index-8sflFIN8.mjs";
|
|
4
|
+
import { t as DateAdapter } from "./adapter-CqP9Z4JU.mjs";
|
|
5
|
+
import { n as FeaturesAdapterFlags, r as FeaturesAdapterInterface } from "./index-dJKXAO5D.mjs";
|
|
6
|
+
import { n as LocaleAdapter } from "./v0-CAKa6tzG.mjs";
|
|
7
|
+
import { t as LoggerAdapter } from "./adapter-JTFG3Jn8.mjs";
|
|
8
|
+
import { t as StorageAdapter } from "./index-NsE5nARK.mjs";
|
|
8
9
|
import { App, ComponentPublicInstance, ComputedRef, InjectionKey, MaybeRef, MaybeRefOrGetter, Reactive, Ref, ShallowRef, UnwrapNestedRefs, WatchSource } from "vue";
|
|
9
10
|
|
|
10
|
-
//#region src/composables/
|
|
11
|
-
|
|
11
|
+
//#region src/composables/createModel/index.d.ts
|
|
12
12
|
/**
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
* Extend this when defining custom ticket types passed to `register()` and `onboard()`.
|
|
16
|
-
* The registry adds the computed fields (`index`, `valueIsIndex`) automatically — those
|
|
17
|
-
* live on {@link RegistryTicket}, which is the output type returned by `get()` and `values()`.
|
|
13
|
+
* Input type for model tickets - what users provide to register().
|
|
18
14
|
*
|
|
19
15
|
* @template V The type of the ticket value.
|
|
20
16
|
*/
|
|
21
|
-
interface
|
|
22
|
-
/**
|
|
23
|
-
|
|
24
|
-
/** The value associated with the ticket. If not provided, it defaults to the index. */
|
|
25
|
-
value?: V;
|
|
26
|
-
}
|
|
27
|
-
interface RegistryTicket<V = unknown> {
|
|
28
|
-
/** The unique identifier. Is randomly generated if not provided. */
|
|
29
|
-
id: ID;
|
|
30
|
-
/**
|
|
31
|
-
* The index of the ticket in the registry.
|
|
32
|
-
*
|
|
33
|
-
* @remarks Automatically managed by the registry. Updated during reindexing. It's not recommended to manually set this.
|
|
34
|
-
*/
|
|
35
|
-
index: number;
|
|
36
|
-
/** The value associated with the ticket. If not provided, it defaults to the index. */
|
|
37
|
-
value: V;
|
|
38
|
-
/**
|
|
39
|
-
* Whether the value is derived from index.
|
|
40
|
-
*
|
|
41
|
-
* @remarks Set to true when no explicit value is provided during registration. It's not recommended to manually set this.
|
|
42
|
-
*/
|
|
43
|
-
valueIsIndex: boolean;
|
|
17
|
+
interface ModelTicketInput<V = unknown> extends RegistryTicketInput<V> {
|
|
18
|
+
/** Disabled state of the ticket (optional on input, defaults to false) */
|
|
19
|
+
disabled?: MaybeRefOrGetter<boolean>;
|
|
44
20
|
}
|
|
45
|
-
/**
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
'reindex:registry': undefined;
|
|
21
|
+
/**
|
|
22
|
+
* Output type for model tickets - what users receive from get().
|
|
23
|
+
*
|
|
24
|
+
* @template Z The input ticket type that extends ModelTicketInput.
|
|
25
|
+
*/
|
|
26
|
+
type ModelTicket<Z extends ModelTicketInput = ModelTicketInput> = RegistryTicket & Z & {
|
|
27
|
+
/** Disabled state of the ticket (guaranteed to exist on output) */disabled: MaybeRefOrGetter<boolean>; /** Whether the ticket is currently selected */
|
|
28
|
+
isSelected: Readonly<Ref<boolean, boolean>>;
|
|
54
29
|
};
|
|
55
|
-
/**
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
interface
|
|
62
|
-
/**
|
|
63
|
-
* The collection of tickets in the registry
|
|
64
|
-
*
|
|
65
|
-
* @template ID The type of the ticket ID.
|
|
66
|
-
* @template E The type of the registry ticket.
|
|
67
|
-
*
|
|
68
|
-
* @remarks Read-only view of the internal collection. Use `register`, `unregister`, `upsert`, and `clear` methods to modify.
|
|
69
|
-
*/
|
|
70
|
-
collection: ReadonlyMap<ID, E>;
|
|
30
|
+
/**
|
|
31
|
+
* Context returned by createModel.
|
|
32
|
+
*
|
|
33
|
+
* @template Z The input ticket type (what users provide to register).
|
|
34
|
+
* @template E The output ticket type (what users receive from get). Defaults to ModelTicket<Z>.
|
|
35
|
+
*/
|
|
36
|
+
interface ModelContext<Z extends ModelTicketInput = ModelTicketInput, E extends ModelTicket<Z> = ModelTicket<Z>> extends Omit<RegistryContext<Z, E>, 'register'> {
|
|
71
37
|
/**
|
|
72
|
-
*
|
|
73
|
-
*
|
|
74
|
-
* @remarks Removes all tickets from the registry. This operation invalidates cached results from `keys()`, `values()`, and `entries()`.
|
|
38
|
+
* Set of currently selected ticket IDs
|
|
75
39
|
*
|
|
76
|
-
* @
|
|
40
|
+
* @remarks Reactive via `shallowReactive(new Set())`. Mutating this Set directly is supported —
|
|
41
|
+
* `selectedItems` and `selectedValues` will update accordingly. Ghost IDs (IDs not in the registry)
|
|
42
|
+
* are silently filtered out by the computed properties.
|
|
77
43
|
*
|
|
78
44
|
* @example
|
|
79
45
|
* ```ts
|
|
80
|
-
*
|
|
81
|
-
*
|
|
82
|
-
*
|
|
83
|
-
*
|
|
84
|
-
* registry.register({ id: 'ticket-1' })
|
|
85
|
-
* registry.register({ id: 'ticket-2' })
|
|
86
|
-
*
|
|
87
|
-
* console.log(registry.size) // 2
|
|
88
|
-
*
|
|
89
|
-
* registry.clear()
|
|
90
|
-
*
|
|
91
|
-
* console.log(registry.size) // 0
|
|
46
|
+
* const model = createModel()
|
|
47
|
+
* model.register({ id: 'a', value: 'Apple' })
|
|
48
|
+
* console.log(model.selectedIds.has('a')) // true (enrolled on register)
|
|
92
49
|
* ```
|
|
93
50
|
*/
|
|
94
|
-
|
|
51
|
+
selectedIds: Reactive<Set<ID>>;
|
|
95
52
|
/**
|
|
96
|
-
*
|
|
53
|
+
* Computed Set of selected ticket instances
|
|
97
54
|
*
|
|
98
|
-
* @
|
|
99
|
-
*
|
|
100
|
-
*
|
|
101
|
-
* @see https://0.vuetifyjs.com/composables/registration/use-registry#has
|
|
55
|
+
* @remarks Derived from `selectedIds`. Maps each ID to its ticket via `registry.get()` and
|
|
56
|
+
* filters out any IDs that no longer exist in the registry.
|
|
102
57
|
*
|
|
103
58
|
* @example
|
|
104
59
|
* ```ts
|
|
105
|
-
*
|
|
106
|
-
*
|
|
107
|
-
*
|
|
108
|
-
*
|
|
109
|
-
*
|
|
110
|
-
*
|
|
111
|
-
* const exists = registry.has('ticket-id') // true
|
|
60
|
+
* const model = createModel()
|
|
61
|
+
* model.register({ id: 'a', value: 'Apple' })
|
|
62
|
+
* model.select('a')
|
|
63
|
+
* const items = Array.from(model.selectedItems.value)
|
|
64
|
+
* console.log(items[0].id) // 'a'
|
|
112
65
|
* ```
|
|
113
66
|
*/
|
|
114
|
-
|
|
67
|
+
selectedItems: ComputedRef<Set<E>>;
|
|
115
68
|
/**
|
|
116
|
-
*
|
|
69
|
+
* Computed Set of selected ticket values
|
|
117
70
|
*
|
|
118
|
-
* @remarks
|
|
119
|
-
*
|
|
120
|
-
* @see https://0.vuetifyjs.com/composables/registration/use-registry#keys
|
|
71
|
+
* @remarks Derived from `selectedItems`. Unwraps ref values via `toValue()` — if a ticket's
|
|
72
|
+
* value is `ref('Apple')`, the Set contains `'Apple'`, not the Ref wrapper.
|
|
121
73
|
*
|
|
122
74
|
* @example
|
|
123
75
|
* ```ts
|
|
124
|
-
* import {
|
|
125
|
-
*
|
|
126
|
-
* const registry = createRegistry()
|
|
127
|
-
*
|
|
128
|
-
* registry.register({ id: 'ticket-1' })
|
|
129
|
-
* registry.register({ id: 'ticket-2' })
|
|
76
|
+
* import { shallowRef } from 'vue'
|
|
77
|
+
* import { createModel } from '@vuetify/v0'
|
|
130
78
|
*
|
|
131
|
-
* const
|
|
79
|
+
* const model = createModel()
|
|
80
|
+
* model.register({ id: 'a', value: shallowRef('Apple') })
|
|
81
|
+
* model.select('a')
|
|
82
|
+
* console.log([...model.selectedValues.value]) // ['Apple']
|
|
132
83
|
* ```
|
|
133
84
|
*/
|
|
134
|
-
|
|
85
|
+
selectedValues: ComputedRef<Set<E['value'] extends Ref<infer U> ? U : E['value']>>;
|
|
135
86
|
/**
|
|
136
|
-
*
|
|
137
|
-
*
|
|
138
|
-
* @param value The value to browse for.
|
|
139
|
-
* @remarks Returns an array of IDs that share the given value, or undefined if no match is found.
|
|
140
|
-
*
|
|
141
|
-
* @see https://0.vuetifyjs.com/composables/registration/use-registry#browse
|
|
142
|
-
*
|
|
143
|
-
* @example
|
|
144
|
-
* ```ts
|
|
145
|
-
* import { createRegistry } from '@vuetify/v0'
|
|
146
|
-
*
|
|
147
|
-
* const registry = createRegistry()
|
|
87
|
+
* Disabled state for the entire model instance
|
|
148
88
|
*
|
|
149
|
-
*
|
|
150
|
-
*
|
|
151
|
-
* registry.register({ id: 'ticket-3', value: 'unique-value' })
|
|
89
|
+
* @remarks When truthy, all selection operations (`select`, `unselect`, `toggle`) are silently
|
|
90
|
+
* skipped. Accepts a static boolean, a ref, or a getter for reactive disabled state.
|
|
152
91
|
*
|
|
153
|
-
*
|
|
154
|
-
* const unique = registry.browse('unique-value') // ['ticket-3']
|
|
155
|
-
* ```
|
|
92
|
+
* @see https://0.vuetifyjs.com/composables/selection/create-model
|
|
156
93
|
*/
|
|
157
|
-
|
|
94
|
+
disabled: MaybeRefOrGetter<boolean>;
|
|
158
95
|
/**
|
|
159
|
-
*
|
|
160
|
-
*
|
|
161
|
-
* @param index The index number to lookup.
|
|
162
|
-
* @remarks Maps do not support indexing by default, this method provides a way to retrieve an ID based on its index in the registry.
|
|
96
|
+
* Reset selection state without destroying the registry
|
|
163
97
|
*
|
|
164
|
-
* @
|
|
98
|
+
* @remarks Clears `selectedIds` only — registered tickets are preserved.
|
|
99
|
+
* Use `clear()` to destroy both selection state and the registry.
|
|
165
100
|
*
|
|
166
101
|
* @example
|
|
167
102
|
* ```ts
|
|
168
|
-
* const
|
|
169
|
-
*
|
|
170
|
-
*
|
|
171
|
-
*
|
|
172
|
-
*
|
|
173
|
-
*
|
|
174
|
-
* const ticket2 = registry.lookup(1) // 'ticket-2'
|
|
103
|
+
* const model = createModel()
|
|
104
|
+
* model.register({ id: 'a', value: 'Apple' })
|
|
105
|
+
* model.select('a')
|
|
106
|
+
* model.reset()
|
|
107
|
+
* console.log(model.size) // 1 (tickets preserved)
|
|
108
|
+
* console.log(model.selectedIds.size) // 0
|
|
175
109
|
* ```
|
|
176
110
|
*/
|
|
177
|
-
|
|
111
|
+
reset: () => void;
|
|
178
112
|
/**
|
|
179
|
-
*
|
|
113
|
+
* Select a ticket by ID
|
|
180
114
|
*
|
|
181
|
-
* @param id The ID of the ticket to
|
|
182
|
-
* @remarks
|
|
115
|
+
* @param id The ID of the ticket to select.
|
|
116
|
+
* @remarks When `multiple` is `false` (default), clears `selectedIds` before adding the new ID.
|
|
117
|
+
* When `multiple` is `true`, accumulates without clearing.
|
|
118
|
+
* No-op if the model instance is disabled, the ticket doesn't exist, or the ticket is disabled.
|
|
183
119
|
*
|
|
184
|
-
* @see https://0.vuetifyjs.com/composables/
|
|
120
|
+
* @see https://0.vuetifyjs.com/composables/selection/create-model
|
|
185
121
|
*
|
|
186
122
|
* @example
|
|
187
123
|
* ```ts
|
|
188
|
-
*
|
|
189
|
-
*
|
|
190
|
-
*
|
|
191
|
-
*
|
|
192
|
-
*
|
|
193
|
-
*
|
|
194
|
-
* const ticket = registry.get('ticket-id') // { id: 'ticket-id', index: 0, value: 'some-value', ... }
|
|
124
|
+
* const model = createModel()
|
|
125
|
+
* model.register({ id: 'a', value: 'Apple' })
|
|
126
|
+
* model.register({ id: 'b', value: 'Banana' })
|
|
127
|
+
* model.select('a')
|
|
128
|
+
* model.select('b') // clears 'a', selects 'b'
|
|
129
|
+
* console.log(model.selectedIds.size) // 1
|
|
195
130
|
* ```
|
|
196
131
|
*/
|
|
197
|
-
|
|
198
|
-
/**
|
|
199
|
-
* Update or insert a ticket by ID
|
|
200
|
-
*
|
|
201
|
-
* @param id The ID of the ticket to upsert.
|
|
202
|
-
* @param ticket The partial ticket data to update or insert.
|
|
203
|
-
* @remarks If the ticket exists, it will be updated with the provided data. If it doesn't exist, a new ticket will be created with the given ID and data. This operation invalidates cached results from `keys()`, `values()`, and `entries()`.
|
|
204
|
-
*
|
|
205
|
-
* @see https://0.vuetifyjs.com/composables/registration/use-registry#upsert
|
|
206
|
-
*
|
|
207
|
-
* @example
|
|
208
|
-
* ```ts
|
|
209
|
-
* import { createRegistry } from '@vuetify/v0'
|
|
210
|
-
*
|
|
211
|
-
* const registry = createRegistry()
|
|
212
|
-
*
|
|
213
|
-
* // Insert a new ticket
|
|
214
|
-
* const ticket = registry.upsert('ticket-id', { value: 'initial-value' })
|
|
215
|
-
*
|
|
216
|
-
* // Update the existing ticket
|
|
217
|
-
* const patched = registry.upsert('ticket-id', { value: 'updated-value' })
|
|
218
|
-
* ```
|
|
219
|
-
*/
|
|
220
|
-
upsert: (id: ID, ticket?: Partial<Z>) => E;
|
|
132
|
+
select: (id: ID) => void;
|
|
221
133
|
/**
|
|
222
|
-
*
|
|
134
|
+
* Unselect a ticket by ID
|
|
223
135
|
*
|
|
224
|
-
* @
|
|
225
|
-
*
|
|
226
|
-
* @see https://0.vuetifyjs.com/composables/registration/use-registry#values
|
|
136
|
+
* @param id The ID of the ticket to unselect.
|
|
137
|
+
* @remarks Removes the ID from `selectedIds`. No-op if the model instance is disabled.
|
|
227
138
|
*
|
|
228
139
|
* @example
|
|
229
140
|
* ```ts
|
|
230
|
-
*
|
|
231
|
-
*
|
|
232
|
-
*
|
|
233
|
-
*
|
|
234
|
-
* registry.register({ id: 'ticket-1', value: 'value-1' })
|
|
235
|
-
* registry.register({ id: 'ticket-2', value: 'value-2' })
|
|
236
|
-
*
|
|
237
|
-
* const values = registry.values() // [{ id: 'ticket-1', ... }, { id: 'ticket-2', ... }]
|
|
141
|
+
* model.select('a')
|
|
142
|
+
* model.unselect('a')
|
|
143
|
+
* console.log(model.selectedIds.size) // 0
|
|
238
144
|
* ```
|
|
239
145
|
*/
|
|
240
|
-
|
|
241
|
-
/**
|
|
242
|
-
* Get all entries of registered tickets
|
|
243
|
-
*
|
|
244
|
-
* @remarks Calls `collection.entries` internally with caching. First call is O(n), subsequent calls are O(1) until cache invalidation.
|
|
245
|
-
*
|
|
246
|
-
* @see https://0.vuetifyjs.com/composables/registration/use-registry#entries
|
|
247
|
-
*
|
|
248
|
-
* @example
|
|
249
|
-
* ```ts
|
|
250
|
-
* import { createRegistry } from '@vuetify/v0'
|
|
251
|
-
*
|
|
252
|
-
* const registry = createRegistry()
|
|
253
|
-
*
|
|
254
|
-
* registry.register({ id: 'ticket-1', value: 'value-1' })
|
|
255
|
-
* registry.register({ id: 'ticket-2', value: 'value-2' })
|
|
256
|
-
*
|
|
257
|
-
* const entries = registry.entries() // [['ticket-1', { id: 'ticket-1', ... }], ['ticket-2', { id: 'ticket-2', ... }]]
|
|
258
|
-
* ```
|
|
259
|
-
*/
|
|
260
|
-
entries: () => readonly [ID, E][];
|
|
261
|
-
/**
|
|
262
|
-
* Register a new ticket
|
|
263
|
-
*
|
|
264
|
-
* @param ticket The partial ticket data to register.
|
|
265
|
-
* @remarks If no ID is provided, a unique ID will be generated automatically. If no value is provided, it defaults to the ticket's index. This operation invalidates cached results from `keys()`, `values()`, and `entries()`.
|
|
266
|
-
*
|
|
267
|
-
* @see https://0.vuetifyjs.com/composables/registration/use-registry#register
|
|
268
|
-
*
|
|
269
|
-
* @example
|
|
270
|
-
* ```ts
|
|
271
|
-
* import { createRegistry } from '@vuetify/v0'
|
|
272
|
-
*
|
|
273
|
-
* const registry = createRegistry()
|
|
274
|
-
*
|
|
275
|
-
* const ticket = registry.register()
|
|
276
|
-
*
|
|
277
|
-
* console.log(ticket) // { id: 'generated-id', index: 0, value: 0, valueIsIndex: true }
|
|
278
|
-
* ```
|
|
279
|
-
*/
|
|
280
|
-
register: (ticket?: Partial<Z & RegistryTicket>) => E;
|
|
281
|
-
/**
|
|
282
|
-
* Unregister a ticket by ID
|
|
283
|
-
*
|
|
284
|
-
* @param id The ID of the ticket to unregister.
|
|
285
|
-
* @remarks Removes the ticket from the registry and reindexes the remaining tickets. This operation invalidates cached results from `keys()`, `values()`, and `entries()`.
|
|
286
|
-
*
|
|
287
|
-
* @see https://0.vuetifyjs.com/composables/registration/use-registry#unregister
|
|
288
|
-
*
|
|
289
|
-
* @example
|
|
290
|
-
* ```ts
|
|
291
|
-
* import { createRegistry } from '@vuetify/v0'
|
|
292
|
-
*
|
|
293
|
-
* const registry = createRegistry()
|
|
294
|
-
*
|
|
295
|
-
* registry.register({ id: 'ticket-id' })
|
|
296
|
-
*
|
|
297
|
-
* registry.unregister('ticket-id')
|
|
298
|
-
* ```
|
|
299
|
-
*/
|
|
300
|
-
unregister: (id: ID) => void;
|
|
146
|
+
unselect: (id: ID) => void;
|
|
301
147
|
/**
|
|
302
|
-
*
|
|
303
|
-
*
|
|
304
|
-
* @remarks Rebuilds the internal index mapping and ensures all tickets have correct index values. This operation invalidates cached results from `keys()`, `values()`, and `entries()`.
|
|
148
|
+
* Toggle a ticket's selection state
|
|
305
149
|
*
|
|
306
|
-
* @
|
|
150
|
+
* @param id The ID of the ticket to toggle.
|
|
151
|
+
* @remarks Calls `select(id)` if not selected, `unselect(id)` if already selected.
|
|
152
|
+
* No-op if the model instance is disabled.
|
|
307
153
|
*
|
|
308
154
|
* @example
|
|
309
155
|
* ```ts
|
|
310
|
-
*
|
|
311
|
-
*
|
|
312
|
-
* const registry = createRegistry()
|
|
313
|
-
*
|
|
314
|
-
* registry.register({ id: 'ticket-1' })
|
|
315
|
-
* registry.register({ id: 'ticket-2' })
|
|
316
|
-
*
|
|
317
|
-
* // After some operations that may affect indexing
|
|
318
|
-
* registry.reindex()
|
|
156
|
+
* model.toggle('a') // selects
|
|
157
|
+
* model.toggle('a') // unselects
|
|
319
158
|
* ```
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
/**
|
|
323
|
-
* Seek for a ticket based on direction and optional predicate
|
|
324
|
-
*
|
|
325
|
-
* @param direction The direction to seek ('first' or 'last'). Defaults to 'first'.
|
|
326
|
-
* @param from The index to start seeking from. Defaults to the beginning or end based on direction.
|
|
327
|
-
* @param predicate An optional function to test each ticket. The first ticket that satisfies the predicate will be returned.
|
|
328
|
-
* @remarks This method allows for flexible searching within the registry, either from the start or end, and can filter tickets based on custom criteria.
|
|
329
|
-
*
|
|
330
|
-
* @see https://0.vuetifyjs.com/composables/registration/use-registry#seek
|
|
331
|
-
*
|
|
332
|
-
* @example
|
|
333
|
-
* ```ts
|
|
334
|
-
* import { createRegistry } from '@vuetify/v0'
|
|
335
|
-
*
|
|
336
|
-
* const registry = createRegistry()
|
|
337
|
-
*
|
|
338
|
-
* registry.register({ id: 'ticket-1', value: 'apple' })
|
|
339
|
-
* registry.register({ id: 'ticket-2', value: 'banana' })
|
|
340
|
-
* registry.register({ id: 'ticket-3', value: 'cherry' })
|
|
341
|
-
*
|
|
342
|
-
* // Seek the first ticket
|
|
343
|
-
* const first = registry.seek('first')
|
|
344
|
-
*
|
|
345
|
-
* // Seek the last ticket
|
|
346
|
-
* const last = registry.seek('last')
|
|
347
|
-
*
|
|
348
|
-
* // Seek the first ticket with value 'banana'
|
|
349
|
-
* const banana = registry.seek('first', undefined, ticket => ticket.value === 'banana')
|
|
350
|
-
*
|
|
351
|
-
* // Seek from index 1 to find the next ticket with value starting with 'c'
|
|
352
|
-
* const cherry = registry.seek('first', 1, ticket => (ticket.value as string).startsWith('c'))
|
|
353
|
-
* ```
|
|
354
|
-
*/
|
|
355
|
-
seek: (direction?: 'first' | 'last', from?: number, predicate?: (ticket: E) => boolean) => E | undefined;
|
|
159
|
+
*/
|
|
160
|
+
toggle: (id: ID) => void;
|
|
356
161
|
/**
|
|
357
|
-
*
|
|
162
|
+
* Check if a ticket is currently selected
|
|
358
163
|
*
|
|
359
|
-
* @param
|
|
360
|
-
* @
|
|
361
|
-
* @remarks Must be enabled via the `events` option when creating the registry.
|
|
362
|
-
* Supported events:
|
|
363
|
-
* - `register:ticket` - Emitted when a ticket is registered, receives the ticket as argument
|
|
364
|
-
* - `unregister:ticket` - Emitted when a ticket is unregistered, receives the ticket as argument
|
|
365
|
-
* - `update:ticket` - Emitted when a ticket is updated, receives the updated ticket as argument
|
|
366
|
-
* - `clear:registry` - Emitted when the registry is cleared
|
|
367
|
-
* - `reindex:registry` - Emitted when the registry is reindexed
|
|
368
|
-
*
|
|
369
|
-
* @see https://0.vuetifyjs.com/composables/registration/use-registry#on
|
|
164
|
+
* @param id The ID of the ticket to check.
|
|
165
|
+
* @returns `true` if the ID is in `selectedIds`.
|
|
370
166
|
*
|
|
371
167
|
* @example
|
|
372
168
|
* ```ts
|
|
373
|
-
*
|
|
374
|
-
*
|
|
375
|
-
*
|
|
376
|
-
*
|
|
377
|
-
* registry.on('register:ticket', (ticket) => {
|
|
378
|
-
* console.log('Ticket registered:', ticket)
|
|
379
|
-
* })
|
|
380
|
-
*
|
|
381
|
-
* registry.register({ id: 'ticket-id' }) // Console: Ticket registered: { id: 'ticket-id', ... }
|
|
169
|
+
* model.select('a')
|
|
170
|
+
* console.log(model.selected('a')) // true
|
|
171
|
+
* console.log(model.selected('b')) // false
|
|
382
172
|
* ```
|
|
383
|
-
|
|
384
|
-
|
|
173
|
+
*/
|
|
174
|
+
selected: (id: ID) => boolean;
|
|
385
175
|
/**
|
|
386
|
-
*
|
|
176
|
+
* Apply external values to the model
|
|
387
177
|
*
|
|
388
|
-
* @param
|
|
389
|
-
* @param
|
|
390
|
-
* @remarks
|
|
178
|
+
* @param values Array of values to apply. Only `values[0]` is used (single-value store).
|
|
179
|
+
* @param options Options for API compatibility with createSelection. The `multiple` field is accepted but ignored.
|
|
180
|
+
* @remarks Used internally by `useProxyModel` to sync a ref with the model. Executes two steps sequentially:
|
|
181
|
+
* 1. **Ref write**: Writes `values[0]` to any selected ticket whose value is a ref.
|
|
182
|
+
* 2. **Browse resolution**: Clears `selectedIds`, resolves `values[0]` via `registry.browse()`, and selects the match.
|
|
391
183
|
*
|
|
392
|
-
*
|
|
184
|
+
* For ref-valued tickets, browse typically finds no match (the catalog indexes by the ref object,
|
|
185
|
+
* not the unwrapped value), so `selectedIds` will be empty after apply.
|
|
393
186
|
*
|
|
394
|
-
* @
|
|
395
|
-
* ```ts
|
|
396
|
-
* import { onScopeDispose } from 'vue'
|
|
397
|
-
* import { createRegistry } from '@vuetify/v0'
|
|
398
|
-
*
|
|
399
|
-
* const registry = createRegistry({ events: true })
|
|
400
|
-
*
|
|
401
|
-
* function onRegister(ticket) {
|
|
402
|
-
* console.log('Ticket registered:', ticket)
|
|
403
|
-
* }
|
|
404
|
-
*
|
|
405
|
-
* registry.on('register:ticket', onRegister)
|
|
406
|
-
*
|
|
407
|
-
* registry.register({ id: 'ticket-id' }) // Console: Ticket registered: { id: 'ticket-id', ... }
|
|
408
|
-
*
|
|
409
|
-
* onScopeDispose(() => {
|
|
410
|
-
* registry.off('register:ticket', onRegister)
|
|
411
|
-
* })
|
|
412
|
-
* ```
|
|
413
|
-
*/
|
|
414
|
-
off: <K extends Extensible<RegistryEventName>>(event: K, cb: EventHandler$1<E, K>) => void;
|
|
415
|
-
/**
|
|
416
|
-
* Emit an event with data
|
|
417
|
-
*
|
|
418
|
-
* @param event The name of the event to emit.
|
|
419
|
-
* @param data The data to pass to event listeners.
|
|
420
|
-
* @remarks Must be enabled via the `events` option when creating the registry.
|
|
421
|
-
*
|
|
422
|
-
* @see https://0.vuetifyjs.com/composables/registration/use-registry#emit
|
|
187
|
+
* @see https://0.vuetifyjs.com/composables/selection/create-model
|
|
423
188
|
*
|
|
424
189
|
* @example
|
|
425
190
|
* ```ts
|
|
426
|
-
* import {
|
|
191
|
+
* import { shallowRef } from 'vue'
|
|
192
|
+
* import { createModel } from '@vuetify/v0'
|
|
427
193
|
*
|
|
428
|
-
* const
|
|
194
|
+
* const value = shallowRef('Apple')
|
|
195
|
+
* const model = createModel()
|
|
196
|
+
* model.register({ id: 'fruit', value }) // enrolled automatically
|
|
429
197
|
*
|
|
430
|
-
*
|
|
431
|
-
* console.log('Custom event received:', data)
|
|
432
|
-
* })
|
|
433
|
-
*
|
|
434
|
-
* registry.emit('custom-event', { message: 'Hello, World!' }) // Console: Custom event received: { message: 'Hello, World!' }
|
|
198
|
+
* model.apply(['Banana']) // value.value is now 'Banana'
|
|
435
199
|
* ```
|
|
436
|
-
|
|
437
|
-
|
|
200
|
+
*/
|
|
201
|
+
apply: (values: unknown[], options?: {
|
|
202
|
+
multiple?: boolean;
|
|
203
|
+
}) => void;
|
|
438
204
|
/**
|
|
439
|
-
*
|
|
205
|
+
* Register a new ticket
|
|
440
206
|
*
|
|
441
|
-
* @
|
|
207
|
+
* @param ticket Partial ticket data. ID is auto-generated if not provided. Disabled defaults to `false`.
|
|
208
|
+
* @returns The registered ticket with `isSelected` computed ref attached.
|
|
209
|
+
* @remarks Delegates to `registry.register()` after adding model-specific fields (`disabled`, `isSelected`).
|
|
442
210
|
*
|
|
443
|
-
* @see https://0.vuetifyjs.com/composables/
|
|
211
|
+
* @see https://0.vuetifyjs.com/composables/selection/create-model
|
|
444
212
|
*
|
|
445
213
|
* @example
|
|
446
214
|
* ```ts
|
|
447
|
-
* import {
|
|
448
|
-
* import {
|
|
449
|
-
*
|
|
450
|
-
* const registry = createRegistry({ events: true })
|
|
215
|
+
* import { shallowRef } from 'vue'
|
|
216
|
+
* import { createModel } from '@vuetify/v0'
|
|
451
217
|
*
|
|
452
|
-
*
|
|
218
|
+
* const model = createModel()
|
|
219
|
+
* const ticket = model.register({ id: 'fruit', value: shallowRef('Apple') })
|
|
453
220
|
*
|
|
454
|
-
*
|
|
455
|
-
*
|
|
456
|
-
*
|
|
221
|
+
* console.log(ticket.id) // 'fruit'
|
|
222
|
+
* console.log(ticket.isSelected.value) // true (enrolled by default)
|
|
223
|
+
* console.log(ticket.disabled) // false
|
|
457
224
|
* ```
|
|
458
|
-
|
|
459
|
-
|
|
225
|
+
*/
|
|
226
|
+
register: (registration?: Partial<Z>) => E;
|
|
460
227
|
/**
|
|
461
228
|
* Onboard multiple tickets at once
|
|
462
229
|
*
|
|
463
230
|
* @param registrations An array of partial ticket data to register.
|
|
464
|
-
* @
|
|
465
|
-
*
|
|
466
|
-
*
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
* ```ts
|
|
470
|
-
* import { createRegistry } from '@vuetify/v0'
|
|
471
|
-
*
|
|
472
|
-
* const registry = createRegistry()
|
|
473
|
-
*
|
|
474
|
-
* const tickets = registry.onboard([
|
|
475
|
-
* { id: 'ticket-1', value: 'value-1' },
|
|
476
|
-
* { id: 'ticket-2', value: 'value-2' },
|
|
477
|
-
* ])
|
|
478
|
-
*
|
|
479
|
-
* console.log(tickets) // [{ id: 'ticket-1', ... }, { id: 'ticket-2', ... }]
|
|
480
|
-
* ```
|
|
481
|
-
*/
|
|
482
|
-
onboard: (registrations: Partial<Z & RegistryTicket>[]) => E[];
|
|
483
|
-
/**
|
|
484
|
-
* Offboard multiple tickets at once
|
|
485
|
-
*
|
|
486
|
-
* @param ids An array of ticket IDs to unregister.
|
|
487
|
-
* @remarks Unregisters multiple tickets in a single operation with optimized reindexing.
|
|
488
|
-
*
|
|
489
|
-
* @see https://0.vuetifyjs.com/composables/registration/use-registry#offboard
|
|
490
|
-
*
|
|
491
|
-
* @example
|
|
492
|
-
* ```ts
|
|
493
|
-
* import { createRegistry } from '@vuetify/v0'
|
|
494
|
-
*
|
|
495
|
-
* const registry = createRegistry()
|
|
496
|
-
*
|
|
497
|
-
* registry.onboard([
|
|
498
|
-
* { id: 'ticket-1', value: 'value-1' },
|
|
499
|
-
* { id: 'ticket-2', value: 'value-2' },
|
|
500
|
-
* { id: 'ticket-3', value: 'value-3' },
|
|
501
|
-
* ])
|
|
502
|
-
*
|
|
503
|
-
* registry.offboard(['ticket-1', 'ticket-3'])
|
|
504
|
-
*
|
|
505
|
-
* console.log(registry.size) // 1
|
|
506
|
-
* ```
|
|
507
|
-
*/
|
|
508
|
-
offboard: (ids: ID[]) => void;
|
|
509
|
-
/**
|
|
510
|
-
* The number of tickets in the registry
|
|
511
|
-
*
|
|
512
|
-
* @remarks Reflects the current size of the internal ticket collection.
|
|
513
|
-
*
|
|
514
|
-
* @see https://0.vuetifyjs.com/composables/registration/use-registry#size
|
|
515
|
-
*
|
|
516
|
-
* @example
|
|
517
|
-
* ```ts
|
|
518
|
-
* import { createRegistry } from '@vuetify/v0'
|
|
519
|
-
*
|
|
520
|
-
* const registry = createRegistry()
|
|
521
|
-
*
|
|
522
|
-
* registry.register({ id: 'ticket-1' })
|
|
523
|
-
* registry.register({ id: 'ticket-2' })
|
|
524
|
-
*
|
|
525
|
-
* console.log(registry.size) // 2
|
|
526
|
-
* ```
|
|
527
|
-
*/
|
|
528
|
-
size: number;
|
|
529
|
-
/**
|
|
530
|
-
* Execute operations in a batch, deferring cache invalidation and event emission until complete
|
|
531
|
-
*
|
|
532
|
-
* @param fn The function containing batch operations.
|
|
533
|
-
* @returns The return value of the batch function.
|
|
534
|
-
* @remarks Useful for bulk operations like onboard(). Invalidation and events happen once at the end, not after each operation.
|
|
535
|
-
*
|
|
536
|
-
* @see https://0.vuetifyjs.com/composables/registration/use-registry#batch
|
|
537
|
-
*
|
|
538
|
-
* @example
|
|
539
|
-
* ```ts
|
|
540
|
-
* import { createRegistry } from '@vuetify/v0'
|
|
541
|
-
*
|
|
542
|
-
* const registry = createRegistry({ events: true })
|
|
543
|
-
*
|
|
544
|
-
* // Without batch: N invalidations + N events
|
|
545
|
-
* // With batch: 1 invalidation + N events (after all registrations)
|
|
546
|
-
* const tickets = registry.batch(() => {
|
|
547
|
-
* return [
|
|
548
|
-
* registry.register({ id: 'a' }),
|
|
549
|
-
* registry.register({ id: 'b' }),
|
|
550
|
-
* registry.register({ id: 'c' }),
|
|
551
|
-
* ]
|
|
552
|
-
* })
|
|
553
|
-
* ```
|
|
554
|
-
*/
|
|
555
|
-
batch: <R>(fn: () => R) => R;
|
|
231
|
+
* @returns The registered tickets with model-specific fields attached.
|
|
232
|
+
* @remarks Delegates to the model's `register` (not the registry's) so each ticket
|
|
233
|
+
* receives `disabled` and `isSelected`. Runs inside `registry.batch()` for performance.
|
|
234
|
+
*/
|
|
235
|
+
onboard: (registrations: Partial<Z>[]) => E[];
|
|
556
236
|
}
|
|
557
|
-
interface RegistryOptions {
|
|
237
|
+
interface ModelOptions extends RegistryOptions {
|
|
558
238
|
/**
|
|
559
|
-
*
|
|
239
|
+
* Disabled state for the entire model instance
|
|
560
240
|
*
|
|
561
241
|
* @default false
|
|
562
|
-
* @remarks When
|
|
242
|
+
* @remarks When truthy, all selection operations are silently skipped. Accepts a static
|
|
243
|
+
* boolean, a ref, or a getter for reactive disabled state.
|
|
563
244
|
*
|
|
564
245
|
* @example
|
|
565
246
|
* ```ts
|
|
566
|
-
* import {
|
|
567
|
-
*
|
|
568
|
-
* const registry = createRegistry({ events: true })
|
|
247
|
+
* import { createModel } from '@vuetify/v0'
|
|
569
248
|
*
|
|
570
|
-
*
|
|
571
|
-
*
|
|
572
|
-
* })
|
|
249
|
+
* // Static
|
|
250
|
+
* const model = createModel({ disabled: true })
|
|
573
251
|
*
|
|
574
|
-
*
|
|
252
|
+
* // Reactive
|
|
253
|
+
* const disabled = ref(false)
|
|
254
|
+
* const model = createModel({ disabled })
|
|
575
255
|
* ```
|
|
576
|
-
|
|
577
|
-
|
|
256
|
+
*/
|
|
257
|
+
disabled?: MaybeRefOrGetter<boolean>;
|
|
578
258
|
/**
|
|
579
|
-
*
|
|
259
|
+
* Auto-select tickets on registration
|
|
580
260
|
*
|
|
581
|
-
* @default
|
|
582
|
-
* @remarks When
|
|
583
|
-
*
|
|
584
|
-
*
|
|
585
|
-
* ```ts
|
|
586
|
-
* import { createRegistry } from '@vuetify/v0'
|
|
587
|
-
*
|
|
588
|
-
* const registry = createRegistry({ reactive: true })
|
|
261
|
+
* @default true
|
|
262
|
+
* @remarks When truthy, newly registered tickets are automatically selected via `select()`,
|
|
263
|
+
* subject to disabled guards (both instance-level and ticket-level). With single-value
|
|
264
|
+
* semantics, only the most recently registered ticket remains active.
|
|
589
265
|
*
|
|
590
|
-
*
|
|
266
|
+
* `createSelection` overrides this to `false` and handles enrollment with its own
|
|
267
|
+
* `multiple`-aware logic.
|
|
268
|
+
*/
|
|
269
|
+
enroll?: MaybeRefOrGetter<boolean>;
|
|
270
|
+
/**
|
|
271
|
+
* Allow multiple tickets to be selected simultaneously
|
|
591
272
|
*
|
|
592
|
-
*
|
|
593
|
-
*
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
interface RegistryContextOptions extends RegistryOptions {
|
|
598
|
-
namespace?: string;
|
|
273
|
+
* @default false
|
|
274
|
+
* @remarks When `true`, `select()` accumulates IDs instead of clearing before adding.
|
|
275
|
+
* Used by createSlider where all thumbs must stay selected.
|
|
276
|
+
*/
|
|
277
|
+
multiple?: MaybeRefOrGetter<boolean>;
|
|
599
278
|
}
|
|
600
279
|
/**
|
|
601
|
-
* Creates a new
|
|
602
|
-
*
|
|
603
|
-
* @param options The options for the registry instance.
|
|
604
|
-
* @template Z The type of registry ticket that extends RegistryTicket. Use this to add custom properties to tickets.
|
|
605
|
-
* @template E The type of registry context that extends RegistryContext<Z>. Use this when extending the registry with additional methods.
|
|
606
|
-
* @returns A new registry instance.
|
|
607
|
-
*
|
|
608
|
-
* @see https://0.vuetifyjs.com/composables/registration/create-registry#create-registry
|
|
609
|
-
*
|
|
610
|
-
* @example
|
|
611
|
-
* ```ts
|
|
612
|
-
* import { createRegistry } from '@vuetify/v0'
|
|
280
|
+
* Creates a new model instance for storing a single value.
|
|
613
281
|
*
|
|
614
|
-
*
|
|
282
|
+
* @param options The options for the model instance.
|
|
283
|
+
* @template Z The input ticket type. Extend {@link ModelTicketInput} to add custom properties.
|
|
284
|
+
* @template E The output ticket type. Automatically includes `disabled` and `isSelected`.
|
|
285
|
+
* @template R The context type. Defaults to {@link ModelContext}<Z, E>.
|
|
286
|
+
* @returns A new model instance with selection tracking and disabled guards.
|
|
615
287
|
*
|
|
616
|
-
*
|
|
617
|
-
*
|
|
288
|
+
* @remarks
|
|
289
|
+
* Extends createRegistry with value tracking via a reactive Set of selected IDs.
|
|
290
|
+
* Provides the shared model-value concept used by both Selection and Slider.
|
|
618
291
|
*
|
|
619
|
-
*
|
|
620
|
-
*
|
|
621
|
-
*
|
|
622
|
-
*/
|
|
623
|
-
declare function createRegistry<Z extends RegistryTicketInput = RegistryTicketInput, E extends RegistryTicket & Z = RegistryTicket & Z>(options?: RegistryOptions): RegistryContext<Z, E>;
|
|
624
|
-
/**
|
|
625
|
-
* Creates a new registry context.
|
|
292
|
+
* **Enrollment**: Tickets are auto-selected on registration by default (`enroll: true`).
|
|
293
|
+
* With single-value semantics, only the most recently registered ticket is active.
|
|
294
|
+
* Pass `enroll: false` to opt out. `createSelection` overrides this to `false`.
|
|
626
295
|
*
|
|
627
|
-
*
|
|
628
|
-
*
|
|
629
|
-
*
|
|
630
|
-
* @returns A new registry context.
|
|
296
|
+
* **Apply bridge**: `useProxyModel` calls `apply()` to sync a ref with the model.
|
|
297
|
+
* When the active ticket's value is a ref, `apply` writes to it directly. Otherwise,
|
|
298
|
+
* it resolves via `registry.browse()`.
|
|
631
299
|
*
|
|
632
|
-
* @see https://0.vuetifyjs.com/composables/
|
|
300
|
+
* @see https://0.vuetifyjs.com/composables/selection/create-model
|
|
633
301
|
*
|
|
634
302
|
* @example
|
|
635
303
|
* ```ts
|
|
636
|
-
* import {
|
|
637
|
-
*
|
|
638
|
-
* // With default namespace 'v0:registry'
|
|
639
|
-
* export const [useItems, provideItems, items] = createRegistryContext()
|
|
304
|
+
* import { shallowRef } from 'vue'
|
|
305
|
+
* import { createModel, useProxyModel } from '@vuetify/v0'
|
|
640
306
|
*
|
|
641
|
-
*
|
|
642
|
-
*
|
|
307
|
+
* const value = shallowRef('Apple')
|
|
308
|
+
* const model = createModel({ events: true })
|
|
643
309
|
*
|
|
644
|
-
*
|
|
645
|
-
*
|
|
310
|
+
* model.register({ id: 'fruit', value })
|
|
311
|
+
* useProxyModel(model, value)
|
|
646
312
|
*
|
|
647
|
-
* //
|
|
648
|
-
* const items = useItems()
|
|
649
|
-
* items.register({ id: 'item-1', value: 'Value 1' })
|
|
313
|
+
* // value and model stay in sync bidirectionally
|
|
650
314
|
* ```
|
|
651
|
-
*/
|
|
652
|
-
declare function createRegistryContext<Z extends RegistryTicketInput = RegistryTicketInput, E extends RegistryTicket & Z = RegistryTicket & Z>(_options?: RegistryContextOptions): ContextTrinity<RegistryContext<Z, E>>;
|
|
653
|
-
/**
|
|
654
|
-
* Uses an existing registry from context.
|
|
655
|
-
*
|
|
656
|
-
* @param namespace The namespace for the registry context. Defaults to `'v0:registry'`.
|
|
657
|
-
* @template Z The type of registry ticket that extends RegistryTicket.
|
|
658
|
-
* @template E The type of registry context that extends RegistryContext<Z>.
|
|
659
|
-
* @returns The registry instance.
|
|
660
|
-
*
|
|
661
|
-
* @see https://0.vuetifyjs.com/composables/registration/create-registry#use-registry
|
|
662
315
|
*
|
|
663
316
|
* @example
|
|
664
317
|
* ```ts
|
|
665
|
-
*
|
|
666
|
-
*
|
|
667
|
-
*
|
|
668
|
-
*
|
|
669
|
-
*
|
|
670
|
-
* registry.register({ id: 'item-1', value: 'Value 1' })
|
|
318
|
+
* // Disabled model — all selection operations are no-ops
|
|
319
|
+
* const model = createModel({ disabled: true })
|
|
320
|
+
* model.register({ id: 'a', value: shallowRef('Apple') })
|
|
321
|
+
* model.select('a') // no-op
|
|
671
322
|
* ```
|
|
672
323
|
*/
|
|
673
|
-
declare function
|
|
324
|
+
declare function createModel<Z extends ModelTicketInput = ModelTicketInput, E extends ModelTicket<Z> = ModelTicket<Z>, R extends ModelContext<Z, E> = ModelContext<Z, E>>(_options?: ModelOptions): R;
|
|
674
325
|
//#endregion
|
|
675
326
|
//#region src/composables/createSelection/index.d.ts
|
|
676
327
|
/**
|
|
@@ -691,10 +342,7 @@ declare function useRegistry<Z extends RegistryTicketInput = RegistryTicketInput
|
|
|
691
342
|
* selection.register({ label: 'Item 1' })
|
|
692
343
|
* ```
|
|
693
344
|
*/
|
|
694
|
-
interface SelectionTicketInput<V = unknown> extends
|
|
695
|
-
/** Disabled state of the ticket (optional on input, defaults to false) */
|
|
696
|
-
disabled?: MaybeRef<boolean>;
|
|
697
|
-
}
|
|
345
|
+
interface SelectionTicketInput<V = unknown> extends ModelTicketInput<V> {}
|
|
698
346
|
/**
|
|
699
347
|
* Output type for selection tickets - what users receive from get().
|
|
700
348
|
* Includes registry-added methods for self-selection.
|
|
@@ -709,16 +357,9 @@ interface SelectionTicketInput<V = unknown> extends RegistryTicketInput<V> {
|
|
|
709
357
|
* - `unselect()` - Method to unselect this ticket
|
|
710
358
|
* - `toggle()` - Method to toggle selection state
|
|
711
359
|
*/
|
|
712
|
-
type SelectionTicket<Z extends SelectionTicketInput = SelectionTicketInput> =
|
|
713
|
-
/**
|
|
714
|
-
|
|
715
|
-
/** Whether the ticket is currently selected */
|
|
716
|
-
isSelected: Readonly<Ref<boolean, boolean>>;
|
|
717
|
-
/** Select self */
|
|
718
|
-
select: () => void;
|
|
719
|
-
/** Unselect self */
|
|
720
|
-
unselect: () => void;
|
|
721
|
-
/** Toggle self on and off */
|
|
360
|
+
type SelectionTicket<Z extends SelectionTicketInput = SelectionTicketInput> = ModelTicket<Z> & {
|
|
361
|
+
/** Select self */select: () => void; /** Unselect self */
|
|
362
|
+
unselect: () => void; /** Toggle self on and off */
|
|
722
363
|
toggle: () => void;
|
|
723
364
|
};
|
|
724
365
|
/**
|
|
@@ -727,49 +368,36 @@ type SelectionTicket<Z extends SelectionTicketInput = SelectionTicketInput> = Re
|
|
|
727
368
|
* @template Z The input ticket type (what users provide to register).
|
|
728
369
|
* @template E The output ticket type (what users receive from get). Defaults to SelectionTicket<Z>.
|
|
729
370
|
*/
|
|
730
|
-
interface SelectionContext<Z extends SelectionTicketInput = SelectionTicketInput, E extends SelectionTicket<Z> = SelectionTicket<Z>> extends Omit<
|
|
731
|
-
/**
|
|
732
|
-
|
|
733
|
-
/** Set of selected ticket instances */
|
|
734
|
-
selectedItems: ComputedRef<Set<E>>;
|
|
735
|
-
/** Set of selected ticket values */
|
|
736
|
-
selectedValues: ComputedRef<Set<unknown>>;
|
|
737
|
-
/** Disable state for the entire selection instance */
|
|
738
|
-
disabled: MaybeRef<boolean>;
|
|
739
|
-
/** Clear all selected IDs and reindexes */
|
|
740
|
-
reset: () => void;
|
|
741
|
-
/** Select a ticket by ID (Toggle ON) */
|
|
742
|
-
select: (id: ID) => void;
|
|
743
|
-
/** Unselect a ticket by ID (Toggle OFF) */
|
|
744
|
-
unselect: (id: ID) => void;
|
|
745
|
-
/** Toggles a ticket ON and OFF by ID */
|
|
746
|
-
toggle: (id: ID) => void;
|
|
747
|
-
/** Check if a ticket is selected by ID */
|
|
748
|
-
selected: (id: ID) => boolean;
|
|
749
|
-
/** Mandates selected ID based on "mandatory" Option */
|
|
750
|
-
mandate: () => void;
|
|
371
|
+
interface SelectionContext<Z extends SelectionTicketInput = SelectionTicketInput, E extends SelectionTicket<Z> = SelectionTicket<Z>> extends Omit<ModelContext<Z, E>, 'register'> {
|
|
372
|
+
/** Whether the selection allows multiple selections */
|
|
373
|
+
multiple: MaybeRefOrGetter<boolean>;
|
|
751
374
|
/** Register a new ticket (accepts input type, returns output type) */
|
|
752
375
|
register: (ticket?: Partial<Z>) => E;
|
|
753
376
|
/** Onboard multiple tickets at once */
|
|
754
377
|
onboard: (registrations: Partial<Z>[]) => E[];
|
|
378
|
+
/** Mandate selected ID based on "mandatory" option */
|
|
379
|
+
mandate: () => void;
|
|
380
|
+
/** Seek for the first/last non-disabled ticket */
|
|
381
|
+
seek: (direction?: 'first' | 'last', from?: number) => E | undefined;
|
|
755
382
|
}
|
|
756
|
-
interface SelectionOptions extends
|
|
757
|
-
/** When true, the entire selection instance is disabled. */
|
|
758
|
-
disabled?: MaybeRefOrGetter<boolean>;
|
|
759
|
-
/**
|
|
760
|
-
* When true, newly registered items are automatically selected if not disabled.
|
|
761
|
-
* Useful for pre-selecting items in multi-select scenarios.
|
|
762
|
-
*/
|
|
763
|
-
enroll?: MaybeRefOrGetter<boolean>;
|
|
383
|
+
interface SelectionOptions extends ModelOptions {
|
|
764
384
|
/**
|
|
765
385
|
* Controls mandatory selection behavior:
|
|
766
386
|
* - `false` (default): No mandatory selection enforcement
|
|
767
|
-
* - `true`: Prevents deselecting the last selected item
|
|
387
|
+
* - `true`: Prevents deselecting the last selected item
|
|
768
388
|
* - `'force'`: Automatically selects the first non-disabled item on registration
|
|
769
389
|
*/
|
|
770
390
|
mandatory?: MaybeRefOrGetter<boolean | 'force'>;
|
|
771
391
|
/** When true, treats the selection as an array */
|
|
772
392
|
multiple?: MaybeRefOrGetter<boolean>;
|
|
393
|
+
/**
|
|
394
|
+
* Auto-select tickets on registration
|
|
395
|
+
*
|
|
396
|
+
* @default false
|
|
397
|
+
* @remarks Overrides createModel's default of `true`. When truthy, newly registered
|
|
398
|
+
* items are automatically selected if not disabled. Respects `multiple` mode.
|
|
399
|
+
*/
|
|
400
|
+
enroll?: MaybeRefOrGetter<boolean>;
|
|
773
401
|
}
|
|
774
402
|
interface SelectionContextOptions extends SelectionOptions {
|
|
775
403
|
namespace?: string;
|
|
@@ -777,7 +405,8 @@ interface SelectionContextOptions extends SelectionOptions {
|
|
|
777
405
|
/**
|
|
778
406
|
* Creates a new selection instance for managing multiple selected items.
|
|
779
407
|
*
|
|
780
|
-
* Extends `
|
|
408
|
+
* Extends `createModel` with multi-select, mandatory enforcement,
|
|
409
|
+
* auto-enrollment, and ticket self-methods.
|
|
781
410
|
* Supports disabled items, mandatory selection enforcement, and auto-enrollment.
|
|
782
411
|
*
|
|
783
412
|
* @param options The options for the selection instance.
|
|
@@ -798,7 +427,7 @@ interface SelectionContextOptions extends SelectionOptions {
|
|
|
798
427
|
* - Enroll option auto-selects all non-disabled items on registration
|
|
799
428
|
*
|
|
800
429
|
* **Inheritance Chain:**
|
|
801
|
-
* `
|
|
430
|
+
* `createRegistry` → `createModel` → `createSelection` → `createSingle`/`createGroup` → `createStep`
|
|
802
431
|
*
|
|
803
432
|
* @see https://0.vuetifyjs.com/composables/selection/use-selection
|
|
804
433
|
*
|
|
@@ -1165,18 +794,15 @@ declare function useBreadcrumbs<Z extends BreadcrumbTicketInput = BreadcrumbTick
|
|
|
1165
794
|
*/
|
|
1166
795
|
interface GroupTicketInput<V = unknown> extends SelectionTicketInput<V> {
|
|
1167
796
|
/** Whether the ticket should start in mixed/indeterminate state */
|
|
1168
|
-
indeterminate?:
|
|
797
|
+
indeterminate?: MaybeRefOrGetter<boolean>;
|
|
1169
798
|
}
|
|
1170
799
|
/**
|
|
1171
800
|
* Output type for group tickets.
|
|
1172
801
|
* Includes all input properties plus selection and tri-state methods.
|
|
1173
802
|
*/
|
|
1174
803
|
type GroupTicket<Z extends GroupTicketInput = GroupTicketInput> = SelectionTicket<Z> & {
|
|
1175
|
-
/** Whether the ticket is in a mixed/indeterminate state */
|
|
1176
|
-
|
|
1177
|
-
/** Set self to mixed/indeterminate state */
|
|
1178
|
-
mix: () => void;
|
|
1179
|
-
/** Clear mixed/indeterminate state from self */
|
|
804
|
+
/** Whether the ticket is in a mixed/indeterminate state */isMixed: Readonly<Ref<boolean>>; /** Set self to mixed/indeterminate state */
|
|
805
|
+
mix: () => void; /** Clear mixed/indeterminate state from self */
|
|
1180
806
|
unmix: () => void;
|
|
1181
807
|
};
|
|
1182
808
|
/**
|
|
@@ -1782,12 +1408,17 @@ interface BreakpointsContext {
|
|
|
1782
1408
|
lgAndDown: Readonly<ShallowRef<boolean>>;
|
|
1783
1409
|
xlAndDown: Readonly<ShallowRef<boolean>>;
|
|
1784
1410
|
xxlAndDown: Readonly<ShallowRef<boolean>>;
|
|
1411
|
+
ssr: boolean;
|
|
1785
1412
|
update: () => void;
|
|
1786
1413
|
}
|
|
1787
1414
|
interface BreakpointsOptions {
|
|
1788
1415
|
namespace?: string;
|
|
1789
1416
|
mobileBreakpoint?: BreakpointName | number;
|
|
1790
1417
|
breakpoints?: Partial<Record<BreakpointName, number>>;
|
|
1418
|
+
ssr?: {
|
|
1419
|
+
clientWidth: number;
|
|
1420
|
+
clientHeight?: number;
|
|
1421
|
+
};
|
|
1791
1422
|
}
|
|
1792
1423
|
interface BreakpointsPluginOptions extends BreakpointsOptions {}
|
|
1793
1424
|
interface BreakpointsContextOptions extends BreakpointsOptions {}
|
|
@@ -2164,164 +1795,6 @@ declare function useWindowEventListener<E extends keyof WindowEventMap>(event: M
|
|
|
2164
1795
|
*/
|
|
2165
1796
|
declare function useDocumentEventListener<E extends keyof DocumentEventMap>(event: MaybeRefOrGetter<MaybeArray<E>>, listener: MaybeRef<MaybeArray<(this: Document, event: DocumentEventMap[E]) => void>>, options?: MaybeRefOrGetter<boolean | AddEventListenerOptions>): CleanupFunction;
|
|
2166
1797
|
//#endregion
|
|
2167
|
-
//#region src/composables/createTokens/index.d.ts
|
|
2168
|
-
interface TokenAlias<T = unknown> {
|
|
2169
|
-
[key: string]: unknown;
|
|
2170
|
-
$value: T;
|
|
2171
|
-
$type?: string;
|
|
2172
|
-
$description?: string;
|
|
2173
|
-
$extensions?: Record<string, unknown>;
|
|
2174
|
-
$deprecated?: boolean | string;
|
|
2175
|
-
}
|
|
2176
|
-
type TokenPrimitive = string | number | boolean | null | Function;
|
|
2177
|
-
type TokenValue = TokenPrimitive | TokenAlias;
|
|
2178
|
-
interface TokenCollection {
|
|
2179
|
-
[key: string]: TokenValue | TokenCollection;
|
|
2180
|
-
}
|
|
2181
|
-
type FlatTokenCollection = {
|
|
2182
|
-
id: string;
|
|
2183
|
-
value: TokenValue;
|
|
2184
|
-
};
|
|
2185
|
-
interface TokenTicket<Z extends TokenValue = TokenValue> extends RegistryTicket<Z> {}
|
|
2186
|
-
interface TokenContext<Z extends TokenTicket> extends RegistryContext<Z> {
|
|
2187
|
-
/**
|
|
2188
|
-
* Checks if a token is an alias
|
|
2189
|
-
*
|
|
2190
|
-
* @param token The token to check.
|
|
2191
|
-
* @returns True if the token is an alias, false otherwise.
|
|
2192
|
-
* @remarks An alias is a string that starts with "{" and ends with "}".
|
|
2193
|
-
*
|
|
2194
|
-
* @see https://0.vuetifyjs.com/composables/registration/create-tokens#is-alias
|
|
2195
|
-
*
|
|
2196
|
-
* @example
|
|
2197
|
-
* ```ts
|
|
2198
|
-
* const tokens = createTokens({
|
|
2199
|
-
* colors: {
|
|
2200
|
-
* primary: '#3b82f6',
|
|
2201
|
-
* secondary: '{colors.primary}', // Alias reference
|
|
2202
|
-
* },
|
|
2203
|
-
* })
|
|
2204
|
-
*
|
|
2205
|
-
* console.log(tokens.isAlias('{colors.primary}')) // true
|
|
2206
|
-
* console.log(tokens.isAlias('#3b82f6')) // false
|
|
2207
|
-
* ```
|
|
2208
|
-
*/
|
|
2209
|
-
isAlias: (token: unknown) => token is string;
|
|
2210
|
-
/**
|
|
2211
|
-
* Resolves a token or alias to its value.
|
|
2212
|
-
*
|
|
2213
|
-
* @param token The token or alias to resolve.
|
|
2214
|
-
* @returns The resolved value of the token or alias, or undefined if not found.
|
|
2215
|
-
* @remarks This function can resolve nested aliases and supports token paths using dot notation.
|
|
2216
|
-
*
|
|
2217
|
-
* @see https://0.vuetifyjs.com/composables/registration/create-tokens#resolve
|
|
2218
|
-
*
|
|
2219
|
-
* @example
|
|
2220
|
-
* ```ts
|
|
2221
|
-
* const tokens = createTokens({
|
|
2222
|
-
* colors: {
|
|
2223
|
-
* primary: '#3b82f6',
|
|
2224
|
-
* secondary: '{colors.primary}', // Alias reference
|
|
2225
|
-
* },
|
|
2226
|
-
* })
|
|
2227
|
-
*
|
|
2228
|
-
* console.log(tokens.resolve('{colors.primary}')) // '#3b82f6'
|
|
2229
|
-
* console.log(tokens.resolve('{colors.secondary}')) // '#3b82f6'
|
|
2230
|
-
* ```
|
|
2231
|
-
*/
|
|
2232
|
-
resolve: (token: string | TokenAlias) => unknown | undefined;
|
|
2233
|
-
}
|
|
2234
|
-
interface TokenOptions extends RegistryOptions {
|
|
2235
|
-
/**
|
|
2236
|
-
* Whether to flatten nested token structures.
|
|
2237
|
-
*
|
|
2238
|
-
* @default false
|
|
2239
|
-
*/
|
|
2240
|
-
flat?: boolean;
|
|
2241
|
-
/**
|
|
2242
|
-
* An optional prefix to prepend to each token ID during registration.
|
|
2243
|
-
*
|
|
2244
|
-
* @remarks This is useful for namespacing tokens.
|
|
2245
|
-
*/
|
|
2246
|
-
prefix?: string;
|
|
2247
|
-
}
|
|
2248
|
-
interface TokenContextOptions extends TokenOptions, RegistryContextOptions {
|
|
2249
|
-
tokens?: TokenCollection;
|
|
2250
|
-
}
|
|
2251
|
-
/**
|
|
2252
|
-
* Creates a new token instance.
|
|
2253
|
-
*
|
|
2254
|
-
* @param tokens The tokens to use.
|
|
2255
|
-
* @param options The options for the token instance.
|
|
2256
|
-
* @template Z The type of the token ticket.
|
|
2257
|
-
* @template E The type of the token context.
|
|
2258
|
-
* @returns A new token instance.
|
|
2259
|
-
*
|
|
2260
|
-
* @see https://www.designtokens.org/tr/drafts/format/
|
|
2261
|
-
* @see https://0.vuetifyjs.com/composables/registration/create-tokens
|
|
2262
|
-
*
|
|
2263
|
-
* @example
|
|
2264
|
-
* ```ts
|
|
2265
|
-
* import { createTokens } from '@vuetify/v0'
|
|
2266
|
-
*
|
|
2267
|
-
* const tokens = createTokens({
|
|
2268
|
-
* colors: {
|
|
2269
|
-
* primary: '#3b82f6',
|
|
2270
|
-
* secondary: '{colors.primary}', // Alias reference
|
|
2271
|
-
* },
|
|
2272
|
-
* })
|
|
2273
|
-
*
|
|
2274
|
-
* console.log(tokens.resolve('{colors.primary}')) // '#3b82f6'
|
|
2275
|
-
* console.log(tokens.resolve('{colors.secondary}')) // '#3b82f6'
|
|
2276
|
-
* ```
|
|
2277
|
-
*/
|
|
2278
|
-
declare function createTokens<Z extends TokenTicket = TokenTicket, E extends TokenContext<Z> = TokenContext<Z>>(tokens?: TokenCollection, options?: TokenOptions): E;
|
|
2279
|
-
/**
|
|
2280
|
-
* Creates a new token context.
|
|
2281
|
-
*
|
|
2282
|
-
* @param namespace The namespace for the token context.
|
|
2283
|
-
* @param tokens The tokens to use.
|
|
2284
|
-
* @template Z The type of the token ticket.
|
|
2285
|
-
* @template E The type of the token context.
|
|
2286
|
-
* @returns A new token context.
|
|
2287
|
-
*
|
|
2288
|
-
* @see https://0.vuetifyjs.com/composables/registration/create-tokens
|
|
2289
|
-
*
|
|
2290
|
-
* @example
|
|
2291
|
-
* ```ts
|
|
2292
|
-
* import { createTokensContext } from '@vuetify/v0'
|
|
2293
|
-
*
|
|
2294
|
-
* export const [useTokens, provideTokens, context] = createTokensContext({
|
|
2295
|
-
* namespace: 'v0:tokens',
|
|
2296
|
-
* tokens: {
|
|
2297
|
-
* colors: {
|
|
2298
|
-
* primary: '#3b82f6',
|
|
2299
|
-
* secondary: '{colors.primary}', // Alias reference
|
|
2300
|
-
* },
|
|
2301
|
-
* },
|
|
2302
|
-
* })
|
|
2303
|
-
* ```
|
|
2304
|
-
*/
|
|
2305
|
-
declare function createTokensContext<Z extends TokenTicket = TokenTicket, E extends TokenContext<Z> = TokenContext<Z>>(_options: TokenContextOptions): ContextTrinity<E>;
|
|
2306
|
-
/**
|
|
2307
|
-
* Returns the current tokens instance.
|
|
2308
|
-
*
|
|
2309
|
-
* @param namespace The namespace for the tokens context. Defaults to `'v0:tokens'`.
|
|
2310
|
-
* @returns The current tokens instance.
|
|
2311
|
-
*
|
|
2312
|
-
* @see https://0.vuetifyjs.com/composables/registration/create-tokens
|
|
2313
|
-
*
|
|
2314
|
-
* @example
|
|
2315
|
-
* ```vue
|
|
2316
|
-
* <script setup lang="ts">
|
|
2317
|
-
* import { useTokens } from '@vuetify/v0'
|
|
2318
|
-
*
|
|
2319
|
-
* const tokens = useTokens()
|
|
2320
|
-
* </script>
|
|
2321
|
-
* ```
|
|
2322
|
-
*/
|
|
2323
|
-
declare function useTokens<Z extends TokenTicket = TokenTicket, E extends TokenContext<Z> = TokenContext<Z>>(namespace?: string): E;
|
|
2324
|
-
//#endregion
|
|
2325
1798
|
//#region src/composables/useFeatures/index.d.ts
|
|
2326
1799
|
/**
|
|
2327
1800
|
* Input type for feature tickets - what users provide to register().
|
|
@@ -2369,125 +1842,277 @@ interface FeaturePluginOptions extends FeatureContextOptions {
|
|
|
2369
1842
|
adapter?: MaybeArray<FeaturesAdapterInterface>;
|
|
2370
1843
|
}
|
|
2371
1844
|
/**
|
|
2372
|
-
* Creates a new features instance.
|
|
1845
|
+
* Creates a new features instance.
|
|
1846
|
+
*
|
|
1847
|
+
* @param options The options for the features instance.
|
|
1848
|
+
* @template Z The type of the feature ticket.
|
|
1849
|
+
* @template E The type of the feature context.
|
|
1850
|
+
* @returns A new features instance.
|
|
1851
|
+
*
|
|
1852
|
+
* @see https://0.vuetifyjs.com/composables/plugins/use-features
|
|
1853
|
+
*
|
|
1854
|
+
* @example
|
|
1855
|
+
* ```ts
|
|
1856
|
+
* import { createFeatures } from '@vuetify/v0'
|
|
1857
|
+
*
|
|
1858
|
+
* const [useFeatures, provideFeaturesContext, context] = createFeatures({
|
|
1859
|
+
* namespace: 'v0:features',
|
|
1860
|
+
* features: {
|
|
1861
|
+
* 'dark-mode': true,
|
|
1862
|
+
* 'theme-color': { $variation: 'blue' },
|
|
1863
|
+
* },
|
|
1864
|
+
* })
|
|
1865
|
+
* ```
|
|
1866
|
+
*/
|
|
1867
|
+
declare function createFeatures<Z extends FeatureTicketInput = FeatureTicketInput, E extends FeatureTicket<Z> = FeatureTicket<Z>, R extends FeatureContext<Z, E> = FeatureContext<Z, E>>(_options?: FeatureOptions): R;
|
|
1868
|
+
declare const createFeaturesContext: <_E extends FeatureContext<FeatureTicketInput, FeatureTicket<FeatureTicketInput>> = FeatureContext<FeatureTicketInput, FeatureTicket<FeatureTicketInput>>>(_options?: FeaturePluginOptions | undefined) => ContextTrinity<_E>, createFeaturesPlugin: (_options?: FeaturePluginOptions | undefined) => Plugin, useFeatures: <_E extends FeatureContext<FeatureTicketInput, FeatureTicket<FeatureTicketInput>> = FeatureContext<FeatureTicketInput, FeatureTicket<FeatureTicketInput>>>(namespace?: string) => _E;
|
|
1869
|
+
//#endregion
|
|
1870
|
+
//#region src/composables/useRules/adapters/standard.d.ts
|
|
1871
|
+
/**
|
|
1872
|
+
* Minimal duck-typed interface matching the Standard Schema spec (v1).
|
|
1873
|
+
* No npm dependency — structurally compatible with Zod (v3.24+), Valibot, ArkType, and others.
|
|
1874
|
+
*
|
|
1875
|
+
* @see https://standardschema.dev/
|
|
1876
|
+
*/
|
|
1877
|
+
interface StandardSchemaIssue {
|
|
1878
|
+
message: string;
|
|
1879
|
+
path?: ReadonlyArray<{
|
|
1880
|
+
key: PropertyKey;
|
|
1881
|
+
}>;
|
|
1882
|
+
}
|
|
1883
|
+
interface StandardSchemaResult {
|
|
1884
|
+
value?: unknown;
|
|
1885
|
+
issues?: ReadonlyArray<StandardSchemaIssue>;
|
|
1886
|
+
}
|
|
1887
|
+
interface StandardSchemaV1 {
|
|
1888
|
+
'~standard': {
|
|
1889
|
+
version: 1;
|
|
1890
|
+
vendor: string;
|
|
1891
|
+
validate: (value: unknown) => StandardSchemaResult | Promise<StandardSchemaResult>;
|
|
1892
|
+
};
|
|
1893
|
+
}
|
|
1894
|
+
/**
|
|
1895
|
+
* Type guard for Standard Schema objects.
|
|
1896
|
+
* Checks for the `~standard` property that all conforming libraries expose.
|
|
1897
|
+
*
|
|
1898
|
+
* @param value The value to check.
|
|
1899
|
+
* @returns `true` if the value conforms to the Standard Schema interface.
|
|
1900
|
+
*/
|
|
1901
|
+
declare function isStandardSchema(value: unknown): value is StandardSchemaV1;
|
|
1902
|
+
//#endregion
|
|
1903
|
+
//#region src/composables/useRules/index.d.ts
|
|
1904
|
+
/** A rule alias: a string name referencing a registered predicate. */
|
|
1905
|
+
type RuleAlias = string;
|
|
1906
|
+
/**
|
|
1907
|
+
* Input accepted by resolve(): alias strings, raw validation functions,
|
|
1908
|
+
* or Standard Schema objects (Zod v3.24+, Valibot, ArkType, etc.).
|
|
1909
|
+
*/
|
|
1910
|
+
type RuleInput = RuleAlias | FormValidationRule | StandardSchemaV1;
|
|
1911
|
+
/** A map of alias names to predicate functions. */
|
|
1912
|
+
interface RuleAliases {
|
|
1913
|
+
[name: string]: FormValidationRule;
|
|
1914
|
+
}
|
|
1915
|
+
interface RulesContext {
|
|
1916
|
+
/** Resolve aliases, functions, and Standard Schema objects to FormValidationRule[]. */
|
|
1917
|
+
resolve: (rules: RuleInput[]) => FormValidationRule[];
|
|
1918
|
+
/** The alias map (custom aliases registered via options). */
|
|
1919
|
+
aliases: RuleAliases;
|
|
1920
|
+
}
|
|
1921
|
+
interface RulesOptions {
|
|
1922
|
+
/** Custom aliases to register. Each alias is a predicate (FormValidationRule). */
|
|
1923
|
+
aliases?: Partial<RuleAliases>;
|
|
1924
|
+
}
|
|
1925
|
+
interface RulesContextOptions extends RulesOptions {
|
|
1926
|
+
namespace?: string;
|
|
1927
|
+
}
|
|
1928
|
+
/**
|
|
1929
|
+
* Creates a new rules instance.
|
|
1930
|
+
*
|
|
1931
|
+
* @param options The options for the rules instance.
|
|
1932
|
+
* @returns A new rules instance with resolve() and aliases.
|
|
1933
|
+
*
|
|
1934
|
+
* @see https://0.vuetifyjs.com/composables/plugins/use-rules
|
|
1935
|
+
*
|
|
1936
|
+
* @example
|
|
1937
|
+
* ```ts
|
|
1938
|
+
* import { createRules } from '@vuetify/v0'
|
|
1939
|
+
*
|
|
1940
|
+
* const rules = createRules({
|
|
1941
|
+
* aliases: {
|
|
1942
|
+
* required: (v) => !!v || false,
|
|
1943
|
+
* },
|
|
1944
|
+
* })
|
|
1945
|
+
*
|
|
1946
|
+
* // Resolve alias strings to validation functions
|
|
1947
|
+
* const resolved = rules.resolve(['required'])
|
|
1948
|
+
* ```
|
|
1949
|
+
*/
|
|
1950
|
+
declare function createRules(_options?: RulesOptions): RulesContext;
|
|
1951
|
+
/**
|
|
1952
|
+
* Creates a fallback rules instance for use outside component scope.
|
|
1953
|
+
* No locale lookup — `false` returns fall back to the alias name.
|
|
1954
|
+
*
|
|
1955
|
+
* @returns A standalone rules context with empty aliases.
|
|
1956
|
+
*/
|
|
1957
|
+
declare function createRulesFallback(): RulesContext;
|
|
1958
|
+
declare const createRulesContext: <_E extends RulesContext = RulesContext>(_options?: RulesContextOptions | undefined) => ContextTrinity<_E>, createRulesPlugin: (_options?: RulesContextOptions | undefined) => Plugin, useRules: <_E extends RulesContext = RulesContext>(namespace?: string) => _E;
|
|
1959
|
+
//#endregion
|
|
1960
|
+
//#region src/composables/createValidation/index.d.ts
|
|
1961
|
+
/**
|
|
1962
|
+
* Input type for validation tickets - what users provide to register().
|
|
1963
|
+
*
|
|
1964
|
+
* @template V The type of the field value.
|
|
1965
|
+
*/
|
|
1966
|
+
interface ValidationTicketInput<V = unknown> extends RegistryTicketInput<V> {
|
|
1967
|
+
/** Validation rules: functions, alias strings, or Standard Schema objects. */
|
|
1968
|
+
rules?: (FormValidationRule | RuleAlias | StandardSchemaV1)[];
|
|
1969
|
+
/** Whether this field is disabled. */
|
|
1970
|
+
disabled?: boolean;
|
|
1971
|
+
}
|
|
1972
|
+
/**
|
|
1973
|
+
* Output type for validation tickets - the full validation state for a field.
|
|
1974
|
+
*
|
|
1975
|
+
* @template Z The input ticket type.
|
|
1976
|
+
*/
|
|
1977
|
+
type ValidationTicket<Z extends ValidationTicketInput = ValidationTicketInput> = RegistryTicket & Z & {
|
|
1978
|
+
/** Run validation. Pass silent=true to check without updating state. */validate: (silent?: boolean) => Promise<boolean>; /** Reset value, errors, and validation state. */
|
|
1979
|
+
reset: () => void; /** Whether this field is disabled. */
|
|
1980
|
+
disabled: boolean; /** Current validation error messages. */
|
|
1981
|
+
errors: ShallowRef<string[]>; /** Resolved validation rules (FormValidationRule[]). */
|
|
1982
|
+
rules: FormValidationRule[]; /** Whether the field value has not been modified since registration or last reset. */
|
|
1983
|
+
isPristine: ShallowRef<boolean>; /** Tri-state: null (not validated), true (valid), false (invalid). */
|
|
1984
|
+
isValid: ShallowRef<boolean | null>; /** Whether async validation is in progress. */
|
|
1985
|
+
isValidating: ShallowRef<boolean>;
|
|
1986
|
+
};
|
|
1987
|
+
/**
|
|
1988
|
+
* Context for managing a collection of validation tickets.
|
|
1989
|
+
*
|
|
1990
|
+
* @template Z The input ticket type.
|
|
1991
|
+
* @template E The output ticket type.
|
|
1992
|
+
*/
|
|
1993
|
+
interface ValidationContext<Z extends ValidationTicketInput = ValidationTicketInput, E extends ValidationTicket<Z> = ValidationTicket<Z>> extends Omit<RegistryContext<E>, 'register' | 'onboard'> {
|
|
1994
|
+
register: (registration?: Partial<Z>) => E;
|
|
1995
|
+
onboard: (registrations: Partial<Z>[]) => E[];
|
|
1996
|
+
/** Aggregate: true if all tickets valid, false if any invalid, null if any unvalidated. */
|
|
1997
|
+
isValid: ComputedRef<boolean | null>;
|
|
1998
|
+
/** Aggregate: true if any ticket is validating. */
|
|
1999
|
+
isValidating: ComputedRef<boolean>;
|
|
2000
|
+
}
|
|
2001
|
+
interface ValidationOptions extends RegistryOptions {}
|
|
2002
|
+
/**
|
|
2003
|
+
* Creates a new validation instance.
|
|
2373
2004
|
*
|
|
2374
|
-
* @param options The options for the
|
|
2375
|
-
* @
|
|
2376
|
-
* @template E The type of the feature context.
|
|
2377
|
-
* @returns A new features instance.
|
|
2005
|
+
* @param options The options for the validation instance.
|
|
2006
|
+
* @returns A new validation context with register(), aggregate state, etc.
|
|
2378
2007
|
*
|
|
2379
|
-
* @see https://0.vuetifyjs.com/composables/
|
|
2008
|
+
* @see https://0.vuetifyjs.com/composables/forms/create-validation
|
|
2380
2009
|
*
|
|
2381
2010
|
* @example
|
|
2382
2011
|
* ```ts
|
|
2383
|
-
* import {
|
|
2012
|
+
* import { createValidation } from '@vuetify/v0'
|
|
2384
2013
|
*
|
|
2385
|
-
* const
|
|
2386
|
-
*
|
|
2387
|
-
*
|
|
2388
|
-
*
|
|
2389
|
-
*
|
|
2390
|
-
*
|
|
2014
|
+
* const validation = createValidation()
|
|
2015
|
+
*
|
|
2016
|
+
* const field = validation.register({
|
|
2017
|
+
* id: 'email',
|
|
2018
|
+
* value: '',
|
|
2019
|
+
* rules: [(v) => !!v || 'Required'],
|
|
2391
2020
|
* })
|
|
2021
|
+
*
|
|
2022
|
+
* await field.validate()
|
|
2023
|
+
*
|
|
2024
|
+
* console.log(field.errors.value) // ['Required']
|
|
2025
|
+
*
|
|
2026
|
+
* field.reset()
|
|
2392
2027
|
* ```
|
|
2393
2028
|
*/
|
|
2394
|
-
declare function
|
|
2395
|
-
declare const createFeaturesContext: <_E extends FeatureContext<FeatureTicketInput, FeatureTicket<FeatureTicketInput>> = FeatureContext<FeatureTicketInput, FeatureTicket<FeatureTicketInput>>>(_options?: FeaturePluginOptions | undefined) => ContextTrinity<_E>, createFeaturesPlugin: (_options?: FeaturePluginOptions | undefined) => Plugin, useFeatures: <_E extends FeatureContext<FeatureTicketInput, FeatureTicket<FeatureTicketInput>> = FeatureContext<FeatureTicketInput, FeatureTicket<FeatureTicketInput>>>(namespace?: string) => _E;
|
|
2029
|
+
declare function createValidation<Z extends ValidationTicketInput = ValidationTicketInput, E extends ValidationTicket<Z> = ValidationTicket<Z>, R extends ValidationContext<Z, E> = ValidationContext<Z, E>>(options?: ValidationOptions): R;
|
|
2396
2030
|
//#endregion
|
|
2397
2031
|
//#region src/composables/createForm/index.d.ts
|
|
2398
|
-
type FormValidationResult = string |
|
|
2032
|
+
type FormValidationResult = string | boolean | Promise<string | boolean>;
|
|
2399
2033
|
type FormValidationRule = (value: unknown) => FormValidationResult;
|
|
2400
|
-
type FormValue =
|
|
2034
|
+
type FormValue = ValidationContext;
|
|
2401
2035
|
/**
|
|
2402
|
-
*
|
|
2403
|
-
* Extend this interface to add custom properties.
|
|
2404
|
-
*
|
|
2405
|
-
* @template V The type of the field value.
|
|
2036
|
+
* User-facing input shape for form tickets.
|
|
2406
2037
|
*/
|
|
2407
|
-
interface FormTicketInput
|
|
2408
|
-
/** Validation rules for this field */
|
|
2409
|
-
rules?: FormValidationRule[];
|
|
2410
|
-
/** When validation should trigger (inherits from form if not set) */
|
|
2411
|
-
validateOn?: 'submit' | 'change' | string;
|
|
2412
|
-
/** Whether this field is disabled */
|
|
2413
|
-
disabled?: boolean;
|
|
2414
|
-
}
|
|
2038
|
+
interface FormTicketInput extends RegistryTicketInput<FormValue> {}
|
|
2415
2039
|
/**
|
|
2416
|
-
*
|
|
2417
|
-
* Includes all input properties plus validation state and methods.
|
|
2040
|
+
* A registered validation in the form registry.
|
|
2418
2041
|
*
|
|
2419
2042
|
* @template Z The input ticket type that extends FormTicketInput.
|
|
2420
2043
|
*/
|
|
2421
|
-
type FormTicket<Z extends FormTicketInput = FormTicketInput> = RegistryTicket & Z
|
|
2422
|
-
validate: (silent?: boolean) => Promise<boolean>;
|
|
2423
|
-
reset: () => void;
|
|
2424
|
-
validateOn: 'submit' | 'change' | string;
|
|
2425
|
-
disabled: boolean;
|
|
2426
|
-
errors: ShallowRef<string[]>;
|
|
2427
|
-
rules: FormValidationRule[];
|
|
2428
|
-
isPristine: ShallowRef<boolean>;
|
|
2429
|
-
isValid: ShallowRef<boolean | null>;
|
|
2430
|
-
isValidating: ShallowRef<boolean>;
|
|
2431
|
-
};
|
|
2044
|
+
type FormTicket<Z extends FormTicketInput = FormTicketInput> = RegistryTicket<FormValue> & Z;
|
|
2432
2045
|
/**
|
|
2433
|
-
* Context for
|
|
2046
|
+
* Context for coordinating validation across multiple fields.
|
|
2434
2047
|
*
|
|
2435
2048
|
* @template Z The input ticket type.
|
|
2436
2049
|
* @template E The output ticket type.
|
|
2437
2050
|
*/
|
|
2438
2051
|
interface FormContext<Z extends FormTicketInput = FormTicketInput, E extends FormTicket<Z> = FormTicket<Z>> extends Omit<RegistryContext<E>, 'register' | 'onboard'> {
|
|
2439
|
-
|
|
2440
|
-
|
|
2052
|
+
/** Register a validation context with the form. */
|
|
2053
|
+
register: (registration: Partial<Z> & {
|
|
2054
|
+
value: FormValue;
|
|
2055
|
+
}) => E;
|
|
2056
|
+
/** Submit: validate specific fields or all. */
|
|
2441
2057
|
submit: (id?: ID | ID[]) => Promise<boolean>;
|
|
2058
|
+
/** Reset all registered validations. */
|
|
2442
2059
|
reset: () => void;
|
|
2443
|
-
|
|
2060
|
+
/** Whether the form is disabled. Components can read this to conditionally disable inputs. */
|
|
2061
|
+
disabled: ShallowRef<boolean>;
|
|
2062
|
+
/** Whether the form is readonly. Components can read this to conditionally disable inputs. */
|
|
2063
|
+
readonly: ShallowRef<boolean>;
|
|
2064
|
+
/** Aggregate: true if all validations valid, false if any invalid, null if any unvalidated. */
|
|
2444
2065
|
isValid: ComputedRef<boolean | null>;
|
|
2066
|
+
/** Aggregate: true if any validation is in progress. */
|
|
2445
2067
|
isValidating: ComputedRef<boolean>;
|
|
2446
2068
|
}
|
|
2447
2069
|
interface FormOptions extends RegistryOptions {
|
|
2448
|
-
|
|
2070
|
+
/** Whether the form starts disabled. */
|
|
2071
|
+
disabled?: MaybeRefOrGetter<boolean>;
|
|
2072
|
+
/** Whether the form starts readonly. */
|
|
2073
|
+
readonly?: MaybeRefOrGetter<boolean>;
|
|
2449
2074
|
}
|
|
2450
|
-
interface FormContextOptions extends
|
|
2075
|
+
interface FormContextOptions extends FormOptions {
|
|
2451
2076
|
namespace?: string;
|
|
2452
|
-
validateOn?: 'submit' | 'change' | string;
|
|
2453
2077
|
}
|
|
2454
2078
|
/**
|
|
2455
2079
|
* Creates a new form instance.
|
|
2456
2080
|
*
|
|
2081
|
+
* A form is a pure registry of validation contexts. Validations register
|
|
2082
|
+
* themselves via `useForm()` injection. The form coordinates submit, reset,
|
|
2083
|
+
* and aggregate state across all registered validations.
|
|
2084
|
+
*
|
|
2457
2085
|
* @param options The options for the form instance.
|
|
2458
|
-
* @
|
|
2459
|
-
* @template E The type of the form context.
|
|
2460
|
-
* @returns A new form instance.
|
|
2086
|
+
* @returns A new form context.
|
|
2461
2087
|
*
|
|
2462
2088
|
* @see https://0.vuetifyjs.com/composables/forms/create-form
|
|
2463
2089
|
*
|
|
2464
2090
|
* @example
|
|
2465
2091
|
* ```ts
|
|
2466
|
-
* import { createForm } from '@vuetify/v0'
|
|
2092
|
+
* import { createForm, createValidation } from '@vuetify/v0'
|
|
2467
2093
|
*
|
|
2468
2094
|
* const form = createForm()
|
|
2469
2095
|
*
|
|
2470
|
-
*
|
|
2471
|
-
*
|
|
2096
|
+
* // Validations register themselves — form is just the coordinator
|
|
2097
|
+
* const validation = createValidation()
|
|
2098
|
+
* const email = validation.register({
|
|
2099
|
+
* id: 'email',
|
|
2472
2100
|
* value: '',
|
|
2473
|
-
* rules: [
|
|
2101
|
+
* rules: ['required', 'email'],
|
|
2474
2102
|
* })
|
|
2475
2103
|
*
|
|
2476
|
-
*
|
|
2477
|
-
*
|
|
2478
|
-
* console.log(username.errors.value) // ['Username is required']
|
|
2104
|
+
* form.register({ value: validation })
|
|
2479
2105
|
*
|
|
2106
|
+
* await form.submit()
|
|
2480
2107
|
* form.reset()
|
|
2481
2108
|
* ```
|
|
2482
2109
|
*/
|
|
2483
2110
|
declare function createForm<Z extends FormTicketInput = FormTicketInput, E extends FormTicket<Z> = FormTicket<Z>, R extends FormContext<Z, E> = FormContext<Z, E>>(options?: FormOptions): R;
|
|
2484
2111
|
/**
|
|
2485
|
-
* Creates a new form context.
|
|
2112
|
+
* Creates a new form context using the Trinity pattern.
|
|
2486
2113
|
*
|
|
2487
2114
|
* @param options The options for the form context.
|
|
2488
|
-
* @
|
|
2489
|
-
* @template E The type of the form context.
|
|
2490
|
-
* @returns A new form context.
|
|
2115
|
+
* @returns A Trinity tuple: [useFormContext, provideFormContext, formContext]
|
|
2491
2116
|
*
|
|
2492
2117
|
* @see https://0.vuetifyjs.com/composables/forms/create-form
|
|
2493
2118
|
*
|
|
@@ -2495,21 +2120,7 @@ declare function createForm<Z extends FormTicketInput = FormTicketInput, E exten
|
|
|
2495
2120
|
* ```ts
|
|
2496
2121
|
* import { createFormContext } from '@vuetify/v0'
|
|
2497
2122
|
*
|
|
2498
|
-
*
|
|
2499
|
-
* export const [useMyForm, provideMyForm, myForm] = createFormContext({ validateOn: 'change' })
|
|
2500
|
-
*
|
|
2501
|
-
* // Or with custom namespace
|
|
2502
|
-
* export const [useMyForm, provideMyForm, myForm] = createFormContext({
|
|
2503
|
-
* namespace: 'my-form',
|
|
2504
|
-
* validateOn: 'change',
|
|
2505
|
-
* })
|
|
2506
|
-
*
|
|
2507
|
-
* // In a parent component:
|
|
2508
|
-
* provideMyForm()
|
|
2509
|
-
*
|
|
2510
|
-
* // In a child component:
|
|
2511
|
-
* const form = useMyForm()
|
|
2512
|
-
* form.register({ id: 'field', value: ref(''), rules: [...] })
|
|
2123
|
+
* export const [useMyForm, provideMyForm, myForm] = createFormContext()
|
|
2513
2124
|
* ```
|
|
2514
2125
|
*/
|
|
2515
2126
|
declare function createFormContext<Z extends FormTicketInput = FormTicketInput, E extends FormTicket<Z> = FormTicket<Z>, R extends FormContext<Z, E> = FormContext<Z, E>>(_options?: FormContextOptions): ContextTrinity<R>;
|
|
@@ -2517,7 +2128,7 @@ declare function createFormContext<Z extends FormTicketInput = FormTicketInput,
|
|
|
2517
2128
|
* Returns the current form instance.
|
|
2518
2129
|
*
|
|
2519
2130
|
* @param namespace The namespace for the form context. Defaults to `'v0:form'`.
|
|
2520
|
-
* @returns The current form instance.
|
|
2131
|
+
* @returns The current form instance, or undefined if not provided.
|
|
2521
2132
|
*
|
|
2522
2133
|
* @see https://0.vuetifyjs.com/composables/forms/create-form
|
|
2523
2134
|
*
|
|
@@ -2528,15 +2139,9 @@ declare function createFormContext<Z extends FormTicketInput = FormTicketInput,
|
|
|
2528
2139
|
*
|
|
2529
2140
|
* const form = useForm()
|
|
2530
2141
|
* </script>
|
|
2531
|
-
*
|
|
2532
|
-
* <template>
|
|
2533
|
-
* <div>
|
|
2534
|
-
* <p>Form is {{ form.isValid.value ? 'valid' : 'invalid' }}</p>
|
|
2535
|
-
* </div>
|
|
2536
|
-
* </template>
|
|
2537
2142
|
* ```
|
|
2538
2143
|
*/
|
|
2539
|
-
declare function useForm<Z extends FormTicketInput = FormTicketInput, E extends FormTicket<Z> = FormTicket<Z>, R extends FormContext<Z, E> = FormContext<Z, E>>(namespace?: string): R;
|
|
2144
|
+
declare function useForm<Z extends FormTicketInput = FormTicketInput, E extends FormTicket<Z> = FormTicket<Z>, R extends FormContext<Z, E> = FormContext<Z, E>>(namespace?: string): R | undefined;
|
|
2540
2145
|
//#endregion
|
|
2541
2146
|
//#region src/composables/useHotkey/index.d.ts
|
|
2542
2147
|
interface UseHotkeyOptions {
|
|
@@ -3176,41 +2781,23 @@ interface NestedTicketInput<V = unknown> extends GroupTicketInput<V> {
|
|
|
3176
2781
|
* @template Z The input ticket type that extends NestedTicketInput.
|
|
3177
2782
|
*/
|
|
3178
2783
|
type NestedTicket<Z extends NestedTicketInput = NestedTicketInput> = GroupTicket<Z> & {
|
|
3179
|
-
/** ID of the parent ticket, or undefined if this is a root item */
|
|
3180
|
-
|
|
3181
|
-
/** Whether this ticket is
|
|
3182
|
-
|
|
3183
|
-
/**
|
|
3184
|
-
|
|
3185
|
-
|
|
3186
|
-
|
|
3187
|
-
|
|
3188
|
-
|
|
3189
|
-
/**
|
|
3190
|
-
|
|
3191
|
-
/**
|
|
3192
|
-
|
|
3193
|
-
/**
|
|
3194
|
-
|
|
3195
|
-
/**
|
|
3196
|
-
reveal: () => void;
|
|
3197
|
-
/** Activate/highlight this ticket */
|
|
3198
|
-
activate: () => void;
|
|
3199
|
-
/** Deactivate/unhighlight this ticket */
|
|
3200
|
-
deactivate: () => void;
|
|
3201
|
-
/** Get path from root to self (includes self) */
|
|
3202
|
-
getPath: () => ID[];
|
|
3203
|
-
/** Get ancestors excluding self */
|
|
3204
|
-
getAncestors: () => ID[];
|
|
3205
|
-
/** Get all descendants */
|
|
3206
|
-
getDescendants: () => ID[];
|
|
3207
|
-
/** Check if this ticket is an ancestor of the given ID */
|
|
3208
|
-
isAncestorOf: (descendantId: ID) => boolean;
|
|
3209
|
-
/** Check if this ticket has the given ID as an ancestor */
|
|
3210
|
-
hasAncestor: (ancestorId: ID) => boolean;
|
|
3211
|
-
/** Get sibling IDs (including self) */
|
|
3212
|
-
siblings: () => ID[];
|
|
3213
|
-
/** Get 1-indexed position among siblings (for aria-posinset) */
|
|
2784
|
+
/** ID of the parent ticket, or undefined if this is a root item */parentId: ID | undefined; /** Whether this ticket is currently open/expanded */
|
|
2785
|
+
isOpen: Readonly<Ref<boolean>>; /** Whether this ticket is currently active/highlighted */
|
|
2786
|
+
isActive: Readonly<Ref<boolean>>; /** Whether this ticket is a leaf node (has no children) */
|
|
2787
|
+
isLeaf: Readonly<Ref<boolean>>; /** Depth in tree (0 = root) */
|
|
2788
|
+
depth: Readonly<Ref<number>>; /** Open/expand this ticket */
|
|
2789
|
+
open: () => void; /** Close/collapse this ticket */
|
|
2790
|
+
close: () => void; /** Flip this ticket's open/closed state */
|
|
2791
|
+
flip: () => void; /** Reveal this ticket by opening all ancestors */
|
|
2792
|
+
reveal: () => void; /** Activate/highlight this ticket */
|
|
2793
|
+
activate: () => void; /** Deactivate/unhighlight this ticket */
|
|
2794
|
+
deactivate: () => void; /** Get path from root to self (includes self) */
|
|
2795
|
+
getPath: () => ID[]; /** Get ancestors excluding self */
|
|
2796
|
+
getAncestors: () => ID[]; /** Get all descendants */
|
|
2797
|
+
getDescendants: () => ID[]; /** Check if this ticket is an ancestor of the given ID */
|
|
2798
|
+
isAncestorOf: (descendantId: ID) => boolean; /** Check if this ticket has the given ID as an ancestor */
|
|
2799
|
+
hasAncestor: (ancestorId: ID) => boolean; /** Get sibling IDs (including self) */
|
|
2800
|
+
siblings: () => ID[]; /** Get 1-indexed position among siblings (for aria-posinset) */
|
|
3214
2801
|
position: () => number;
|
|
3215
2802
|
};
|
|
3216
2803
|
/**
|
|
@@ -3247,8 +2834,7 @@ interface OpenStrategy {
|
|
|
3247
2834
|
* @template Z The input ticket type that extends NestedTicketInput.
|
|
3248
2835
|
*/
|
|
3249
2836
|
type NestedRegistration<Z extends NestedTicketInput = NestedTicketInput> = Partial<Z> & {
|
|
3250
|
-
/** Inline children to register with this item as parent */
|
|
3251
|
-
children?: NestedRegistration<Z>[];
|
|
2837
|
+
/** Inline children to register with this item as parent */children?: NestedRegistration<Z>[];
|
|
3252
2838
|
};
|
|
3253
2839
|
/**
|
|
3254
2840
|
* Context for managing nested/hierarchical item collections.
|
|
@@ -3607,12 +3193,27 @@ interface ProxyModelOptions {
|
|
|
3607
3193
|
transformOut?: (val: unknown) => unknown;
|
|
3608
3194
|
}
|
|
3609
3195
|
/**
|
|
3610
|
-
*
|
|
3196
|
+
* Minimal interface for useProxyModel's context parameter.
|
|
3197
|
+
* Both ModelContext (Set-based) and SliderContext (Array-based) satisfy this.
|
|
3198
|
+
*/
|
|
3199
|
+
interface ProxyModelTarget {
|
|
3200
|
+
selectedValues: {
|
|
3201
|
+
readonly value: Iterable<unknown>;
|
|
3202
|
+
};
|
|
3203
|
+
apply: (values: unknown[], options?: {
|
|
3204
|
+
multiple?: boolean;
|
|
3205
|
+
}) => void;
|
|
3206
|
+
select?: (id: string | number) => void;
|
|
3207
|
+
multiple?: MaybeRefOrGetter<boolean>;
|
|
3208
|
+
on?: (event: string, cb: (data: unknown) => void) => void;
|
|
3209
|
+
off?: (event: string, cb: (data: unknown) => void) => void;
|
|
3210
|
+
}
|
|
3211
|
+
/**
|
|
3212
|
+
* Syncs a ref with a model context bidirectionally.
|
|
3611
3213
|
*
|
|
3612
|
-
* @param
|
|
3214
|
+
* @param context The model context to bind to.
|
|
3613
3215
|
* @param model The ref to sync.
|
|
3614
3216
|
* @param options The options for the proxy model.
|
|
3615
|
-
* @template Z The type of the selection ticket.
|
|
3616
3217
|
* @returns A function to stop the sync.
|
|
3617
3218
|
*
|
|
3618
3219
|
* @see https://0.vuetifyjs.com/composables/forms/use-proxy-model
|
|
@@ -3631,7 +3232,7 @@ interface ProxyModelOptions {
|
|
|
3631
3232
|
* const stop = useProxyModel(registry, model)
|
|
3632
3233
|
* ```
|
|
3633
3234
|
*/
|
|
3634
|
-
declare function useProxyModel
|
|
3235
|
+
declare function useProxyModel(context: ProxyModelTarget, model: Ref<unknown>, options?: ProxyModelOptions): () => void;
|
|
3635
3236
|
//#endregion
|
|
3636
3237
|
//#region src/composables/useProxyRegistry/index.d.ts
|
|
3637
3238
|
interface ProxyRegistryOptions {
|
|
@@ -3648,7 +3249,8 @@ interface ProxyRegistryContext<Z extends RegistryTicket = RegistryTicket> {
|
|
|
3648
3249
|
*
|
|
3649
3250
|
* @param registry The registry instance to proxy.
|
|
3650
3251
|
* @param options The options for the proxy registry.
|
|
3651
|
-
* @template Z The type
|
|
3252
|
+
* @template Z The input ticket type (what users provide to register).
|
|
3253
|
+
* @template E The output ticket type (what users receive from get/values).
|
|
3652
3254
|
* @returns A proxy registry with reactive objects.
|
|
3653
3255
|
*
|
|
3654
3256
|
* @see https://0.vuetifyjs.com/composables/registration/use-proxy-registry
|
|
@@ -3664,7 +3266,7 @@ interface ProxyRegistryContext<Z extends RegistryTicket = RegistryTicket> {
|
|
|
3664
3266
|
* console.log(proxy.size) // 1
|
|
3665
3267
|
* ```
|
|
3666
3268
|
*/
|
|
3667
|
-
declare function useProxyRegistry<Z extends RegistryTicket = RegistryTicket>(registry: RegistryContext<Z>, options?: ProxyRegistryOptions): ProxyRegistryContext<
|
|
3269
|
+
declare function useProxyRegistry<Z extends RegistryTicketInput = RegistryTicketInput, E extends RegistryTicket & Z = RegistryTicket & Z>(registry: RegistryContext<Z, E>, options?: ProxyRegistryOptions): ProxyRegistryContext<E>;
|
|
3668
3270
|
//#endregion
|
|
3669
3271
|
//#region src/composables/createQueue/index.d.ts
|
|
3670
3272
|
/**
|
|
@@ -4065,6 +3667,451 @@ interface UseElementSizeReturn extends UseResizeObserverReturn {
|
|
|
4065
3667
|
*/
|
|
4066
3668
|
declare function useElementSize(target: MaybeElementRef): UseElementSizeReturn;
|
|
4067
3669
|
//#endregion
|
|
3670
|
+
//#region src/composables/useRtl/adapters/adapter.d.ts
|
|
3671
|
+
interface RtlAdapterSetupContext {
|
|
3672
|
+
isRtl: Ref<boolean>;
|
|
3673
|
+
toggle: () => void;
|
|
3674
|
+
}
|
|
3675
|
+
interface RtlAdapter {
|
|
3676
|
+
setup: <T extends RtlAdapterSetupContext>(app: App, context: T, target?: string | HTMLElement | null) => void;
|
|
3677
|
+
}
|
|
3678
|
+
//#endregion
|
|
3679
|
+
//#region src/composables/useRtl/adapters/v0.d.ts
|
|
3680
|
+
declare class Vuetify0RtlAdapter implements RtlAdapter {
|
|
3681
|
+
setup<T extends RtlAdapterSetupContext>(app: App, context: T, target?: string | HTMLElement | null): void;
|
|
3682
|
+
}
|
|
3683
|
+
//#endregion
|
|
3684
|
+
//#region src/composables/useRtl/index.d.ts
|
|
3685
|
+
interface RtlContext {
|
|
3686
|
+
/** Writable ref — true = RTL, false = LTR */
|
|
3687
|
+
isRtl: Ref<boolean>;
|
|
3688
|
+
/** Convenience method to flip direction */
|
|
3689
|
+
toggle: () => void;
|
|
3690
|
+
}
|
|
3691
|
+
interface RtlOptions {
|
|
3692
|
+
/** Initial direction. Defaults to false (LTR). */
|
|
3693
|
+
default?: boolean;
|
|
3694
|
+
/** Adapter for framework-specific side-effects. */
|
|
3695
|
+
adapter?: RtlAdapter;
|
|
3696
|
+
/** Target element or selector for dir attribute. Defaults to documentElement. */
|
|
3697
|
+
target?: string | HTMLElement | null;
|
|
3698
|
+
}
|
|
3699
|
+
interface RtlContextOptions extends RtlOptions {
|
|
3700
|
+
namespace?: string;
|
|
3701
|
+
}
|
|
3702
|
+
interface RtlPluginOptions extends RtlContextOptions {}
|
|
3703
|
+
/**
|
|
3704
|
+
* Creates a new RTL direction instance.
|
|
3705
|
+
*
|
|
3706
|
+
* @param options The options for the RTL instance.
|
|
3707
|
+
* @returns A new RTL context with reactive direction state.
|
|
3708
|
+
*
|
|
3709
|
+
* @see https://0.vuetifyjs.com/composables/plugins/use-rtl
|
|
3710
|
+
*/
|
|
3711
|
+
declare function createRtl(options?: RtlOptions): RtlContext;
|
|
3712
|
+
declare function createRtlFallback(): RtlContext;
|
|
3713
|
+
declare const createRtlContext: <_E extends RtlContext = RtlContext>(_options?: RtlContextOptions | undefined) => ContextTrinity<_E>, createRtlPlugin: (_options?: RtlContextOptions | undefined) => Plugin, useRtl: <_E extends RtlContext = RtlContext>(namespace?: string) => _E;
|
|
3714
|
+
//#endregion
|
|
3715
|
+
//#region src/composables/createSlider/index.d.ts
|
|
3716
|
+
interface SliderTicketInput extends ModelTicketInput<ShallowRef<number>> {
|
|
3717
|
+
value: ShallowRef<number>;
|
|
3718
|
+
}
|
|
3719
|
+
/**
|
|
3720
|
+
* Configuration options for createSlider.
|
|
3721
|
+
*
|
|
3722
|
+
* @see https://0.vuetifyjs.com/composables/forms/create-slider
|
|
3723
|
+
*/
|
|
3724
|
+
interface SliderOptions {
|
|
3725
|
+
/**
|
|
3726
|
+
* Minimum value.
|
|
3727
|
+
* @default 0
|
|
3728
|
+
*/
|
|
3729
|
+
min?: number;
|
|
3730
|
+
/**
|
|
3731
|
+
* Maximum value.
|
|
3732
|
+
* @default 100
|
|
3733
|
+
*/
|
|
3734
|
+
max?: number;
|
|
3735
|
+
/**
|
|
3736
|
+
* Step increment. Values are snapped to the nearest multiple of `step` above `min`.
|
|
3737
|
+
*
|
|
3738
|
+
* @remarks Use decimal steps for fine-grained control (e.g., `0.1` for a media scrubber).
|
|
3739
|
+
* A step of `0` disables snapping — values are only clamped to min/max.
|
|
3740
|
+
*
|
|
3741
|
+
* @default 1
|
|
3742
|
+
*/
|
|
3743
|
+
step?: number;
|
|
3744
|
+
/**
|
|
3745
|
+
* Whether the slider is disabled.
|
|
3746
|
+
*
|
|
3747
|
+
* @remarks Accepts a reactive getter or ref. When disabled, all thumb operations (`set`, `up`, `down`) are no-ops.
|
|
3748
|
+
*/
|
|
3749
|
+
disabled?: MaybeRefOrGetter<boolean>;
|
|
3750
|
+
/**
|
|
3751
|
+
* Whether the slider is readonly (focusable but not editable).
|
|
3752
|
+
*
|
|
3753
|
+
* @remarks Thumbs can receive focus for accessibility, but `set`, `up`, `down`, `floor`, and `ceil` are no-ops.
|
|
3754
|
+
*/
|
|
3755
|
+
readonly?: MaybeRefOrGetter<boolean>;
|
|
3756
|
+
/**
|
|
3757
|
+
* Slider orientation.
|
|
3758
|
+
*
|
|
3759
|
+
* @remarks Affects `fromValue` and `fromPercent` axis mapping in Slider components.
|
|
3760
|
+
* When using createSlider standalone, orientation is informational only.
|
|
3761
|
+
*/
|
|
3762
|
+
orientation?: MaybeRefOrGetter<'horizontal' | 'vertical'>;
|
|
3763
|
+
/**
|
|
3764
|
+
* Flip the percent axis.
|
|
3765
|
+
*
|
|
3766
|
+
* @remarks When `true`, `fromValue(min)` returns `100` and `fromValue(max)` returns `0`.
|
|
3767
|
+
* Useful for vertical sliders where the visual bottom is the minimum.
|
|
3768
|
+
*/
|
|
3769
|
+
inverted?: MaybeRefOrGetter<boolean>;
|
|
3770
|
+
/**
|
|
3771
|
+
* Minimum steps required between adjacent thumbs.
|
|
3772
|
+
*
|
|
3773
|
+
* @remarks Enforced by `set` and `apply`. The gap in value units is `minStepsBetweenThumbs * step`.
|
|
3774
|
+
*
|
|
3775
|
+
* @default 0
|
|
3776
|
+
*
|
|
3777
|
+
* @example
|
|
3778
|
+
* ```ts
|
|
3779
|
+
* const slider = createSlider({ step: 5, minStepsBetweenThumbs: 2 })
|
|
3780
|
+
* // Thumbs must be at least 10 units apart (2 × 5)
|
|
3781
|
+
* ```
|
|
3782
|
+
*/
|
|
3783
|
+
minStepsBetweenThumbs?: number;
|
|
3784
|
+
/**
|
|
3785
|
+
* Allow thumbs to pass through each other.
|
|
3786
|
+
*
|
|
3787
|
+
* @remarks When `false` (default), `set` constrains values so thumbs maintain their order.
|
|
3788
|
+
* When `true`, thumbs can freely overlap and swap positions.
|
|
3789
|
+
*
|
|
3790
|
+
* @default false
|
|
3791
|
+
*/
|
|
3792
|
+
crossover?: boolean;
|
|
3793
|
+
/**
|
|
3794
|
+
* Range mode — expects two thumbs.
|
|
3795
|
+
*
|
|
3796
|
+
* @remarks Informational flag used by Slider components to adjust track/range rendering.
|
|
3797
|
+
* Does not enforce the number of registered thumbs.
|
|
3798
|
+
*
|
|
3799
|
+
* @default false
|
|
3800
|
+
*/
|
|
3801
|
+
range?: boolean;
|
|
3802
|
+
}
|
|
3803
|
+
/**
|
|
3804
|
+
* Context returned by {@link createSlider}.
|
|
3805
|
+
*
|
|
3806
|
+
* @remarks
|
|
3807
|
+
* Extends `createModel` with slider-specific math and thumb operations.
|
|
3808
|
+
*
|
|
3809
|
+
* **Inheritance chain:**
|
|
3810
|
+
* `createRegistry` → `createModel` → `createSlider`
|
|
3811
|
+
*
|
|
3812
|
+
* **Ticket-per-thumb model:**
|
|
3813
|
+
* Each thumb is a model ticket whose value is a `shallowRef<number>`.
|
|
3814
|
+
* `values` is derived from the ordered tickets, not a standalone ref.
|
|
3815
|
+
* Register/unregister thumbs to add/remove values dynamically.
|
|
3816
|
+
*
|
|
3817
|
+
* @see https://0.vuetifyjs.com/composables/forms/create-slider
|
|
3818
|
+
* @see {@link createModel} for the base model API (collection, selectedIds, etc.)
|
|
3819
|
+
*/
|
|
3820
|
+
interface SliderContext extends Omit<ModelContext<SliderTicketInput, ModelTicket<SliderTicketInput>>, 'values' | 'selectedValues' | 'apply' | 'disabled' | 'register'> {
|
|
3821
|
+
/**
|
|
3822
|
+
* Ordered thumb values derived from model tickets.
|
|
3823
|
+
*
|
|
3824
|
+
* @remarks Reactive — updates when any thumb's `shallowRef<number>` changes.
|
|
3825
|
+
* Order matches ticket registration order (sorted by index).
|
|
3826
|
+
*
|
|
3827
|
+
* @example
|
|
3828
|
+
* ```ts
|
|
3829
|
+
* const slider = createSlider()
|
|
3830
|
+
* slider.register({ value: 25 })
|
|
3831
|
+
* slider.register({ value: 75 })
|
|
3832
|
+
* console.log(slider.values.value) // [25, 75]
|
|
3833
|
+
* ```
|
|
3834
|
+
*/
|
|
3835
|
+
values: ComputedRef<number[]>;
|
|
3836
|
+
/**
|
|
3837
|
+
* Alias for `values` — provides useProxyModel compatibility.
|
|
3838
|
+
*
|
|
3839
|
+
* @remarks Returns an array (not a Set) to preserve duplicate values across thumbs.
|
|
3840
|
+
*
|
|
3841
|
+
* @see {@link values}
|
|
3842
|
+
*/
|
|
3843
|
+
selectedValues: ComputedRef<number[]>;
|
|
3844
|
+
/**
|
|
3845
|
+
* Apply external values — snaps, constrains, and writes to ticket refs.
|
|
3846
|
+
*
|
|
3847
|
+
* @param values Array of raw values (coerced to numbers).
|
|
3848
|
+
* @param options Options object (reserved for useProxyModel compatibility).
|
|
3849
|
+
*
|
|
3850
|
+
* @remarks
|
|
3851
|
+
* If no thumbs are registered yet, values are stored as pending and
|
|
3852
|
+
* consumed as thumbs register. Each value is snapped to step and
|
|
3853
|
+
* constrained by `minStepsBetweenThumbs`.
|
|
3854
|
+
*
|
|
3855
|
+
* @example
|
|
3856
|
+
* ```ts
|
|
3857
|
+
* const slider = createSlider({ step: 10 })
|
|
3858
|
+
* slider.register({ value: 0 })
|
|
3859
|
+
* slider.register({ value: 0 })
|
|
3860
|
+
* slider.apply([33, 67]) // values: [30, 70]
|
|
3861
|
+
* ```
|
|
3862
|
+
*/
|
|
3863
|
+
apply: (values: unknown[], options?: {
|
|
3864
|
+
multiple?: boolean;
|
|
3865
|
+
}) => void;
|
|
3866
|
+
/** Whether disabled. Reactive ref derived from the `disabled` option. */
|
|
3867
|
+
disabled: Readonly<Ref<boolean>>;
|
|
3868
|
+
/** Whether readonly. Reactive ref derived from the `readonly` option. */
|
|
3869
|
+
readonly: Readonly<Ref<boolean>>;
|
|
3870
|
+
/** Slider orientation. Reactive ref derived from the `orientation` option. */
|
|
3871
|
+
orientation: Readonly<Ref<'horizontal' | 'vertical'>>;
|
|
3872
|
+
/** Whether inverted. Reactive ref derived from the `inverted` option. */
|
|
3873
|
+
inverted: Readonly<Ref<boolean>>;
|
|
3874
|
+
/** Minimum value. */
|
|
3875
|
+
readonly min: number;
|
|
3876
|
+
/** Maximum value. */
|
|
3877
|
+
readonly max: number;
|
|
3878
|
+
/** Step increment. */
|
|
3879
|
+
readonly step: number;
|
|
3880
|
+
/** Minimum steps required between adjacent thumbs. */
|
|
3881
|
+
readonly minStepsBetweenThumbs: number;
|
|
3882
|
+
/** Whether thumbs can cross each other. */
|
|
3883
|
+
readonly crossover: boolean;
|
|
3884
|
+
/** Whether this is a range slider. */
|
|
3885
|
+
readonly range: boolean;
|
|
3886
|
+
/**
|
|
3887
|
+
* Register a new thumb and return its ticket.
|
|
3888
|
+
*
|
|
3889
|
+
* @param input Starting value as a number or `{ value }` object. Defaults to `min`.
|
|
3890
|
+
*
|
|
3891
|
+
* @remarks
|
|
3892
|
+
* The thumb is automatically selected in the model (all thumbs stay selected).
|
|
3893
|
+
* If `apply` was called before any thumbs registered, the pending value at this
|
|
3894
|
+
* thumb's index is used instead of the provided value.
|
|
3895
|
+
*
|
|
3896
|
+
* @see {@link unregister}
|
|
3897
|
+
*
|
|
3898
|
+
* @example
|
|
3899
|
+
* ```ts
|
|
3900
|
+
* const slider = createSlider({ min: 0, max: 100 })
|
|
3901
|
+
* const thumb = slider.register({ value: 50 })
|
|
3902
|
+
* console.log(thumb.index) // 0
|
|
3903
|
+
* console.log(slider.values.value) // [50]
|
|
3904
|
+
* ```
|
|
3905
|
+
*/
|
|
3906
|
+
register: (input?: number | {
|
|
3907
|
+
value: number;
|
|
3908
|
+
}) => ModelTicket<SliderTicketInput>;
|
|
3909
|
+
/**
|
|
3910
|
+
* Unregister a thumb by ticket ID.
|
|
3911
|
+
*
|
|
3912
|
+
* @param id The ticket ID returned from `register()`.
|
|
3913
|
+
*
|
|
3914
|
+
* @see {@link register}
|
|
3915
|
+
*
|
|
3916
|
+
* @example
|
|
3917
|
+
* ```ts
|
|
3918
|
+
* const slider = createSlider()
|
|
3919
|
+
* const thumb = slider.register({ value: 50 })
|
|
3920
|
+
* slider.unregister(thumb.id) // values: []
|
|
3921
|
+
* ```
|
|
3922
|
+
*/
|
|
3923
|
+
unregister: (id: ID) => void;
|
|
3924
|
+
/**
|
|
3925
|
+
* Round a value to the nearest step, clamped to min/max.
|
|
3926
|
+
*
|
|
3927
|
+
* @param value Raw value to snap.
|
|
3928
|
+
* @returns Snapped value.
|
|
3929
|
+
*
|
|
3930
|
+
* @remarks Pure function — does not modify slider state.
|
|
3931
|
+
* When `step` is `0`, only clamps without snapping.
|
|
3932
|
+
*
|
|
3933
|
+
* @example
|
|
3934
|
+
* ```ts
|
|
3935
|
+
* const slider = createSlider({ min: 0, max: 100, step: 5 })
|
|
3936
|
+
* slider.snap(47) // 45
|
|
3937
|
+
* slider.snap(48) // 50
|
|
3938
|
+
* slider.snap(-5) // 0 (clamped)
|
|
3939
|
+
* ```
|
|
3940
|
+
*/
|
|
3941
|
+
snap: (value: number) => number;
|
|
3942
|
+
/**
|
|
3943
|
+
* Convert a value to a 0–100 percentage.
|
|
3944
|
+
*
|
|
3945
|
+
* @param value The slider value to convert.
|
|
3946
|
+
* @returns Percentage between 0 and 100.
|
|
3947
|
+
*
|
|
3948
|
+
* @remarks Pure function. Respects `inverted` — when inverted,
|
|
3949
|
+
* `fromValue(min)` returns `100` and `fromValue(max)` returns `0`.
|
|
3950
|
+
*
|
|
3951
|
+
* @see {@link fromPercent} for the inverse operation.
|
|
3952
|
+
*
|
|
3953
|
+
* @example
|
|
3954
|
+
* ```ts
|
|
3955
|
+
* const slider = createSlider({ min: 0, max: 200 })
|
|
3956
|
+
* slider.fromValue(100) // 50
|
|
3957
|
+
* slider.fromValue(0) // 0
|
|
3958
|
+
* slider.fromValue(200) // 100
|
|
3959
|
+
* ```
|
|
3960
|
+
*/
|
|
3961
|
+
fromValue: (value: number) => number;
|
|
3962
|
+
/**
|
|
3963
|
+
* Convert a 0–100 percentage to a snapped value.
|
|
3964
|
+
*
|
|
3965
|
+
* @param percent Percentage between 0 and 100.
|
|
3966
|
+
* @returns Snapped slider value.
|
|
3967
|
+
*
|
|
3968
|
+
* @remarks Pure function. Respects `inverted`. The returned value
|
|
3969
|
+
* is snapped to the nearest step and clamped to min/max.
|
|
3970
|
+
*
|
|
3971
|
+
* @see {@link fromValue} for the inverse operation.
|
|
3972
|
+
*
|
|
3973
|
+
* @example
|
|
3974
|
+
* ```ts
|
|
3975
|
+
* const slider = createSlider({ min: 0, max: 100, step: 10 })
|
|
3976
|
+
* slider.fromPercent(33) // 30
|
|
3977
|
+
* slider.fromPercent(50) // 50
|
|
3978
|
+
* ```
|
|
3979
|
+
*/
|
|
3980
|
+
fromPercent: (percent: number) => number;
|
|
3981
|
+
/**
|
|
3982
|
+
* Set the value at a thumb index with step snapping and neighbor constraints.
|
|
3983
|
+
*
|
|
3984
|
+
* @param index Zero-based thumb index.
|
|
3985
|
+
* @param value Raw value to set.
|
|
3986
|
+
*
|
|
3987
|
+
* @remarks
|
|
3988
|
+
* No-op when `readonly` is `true`. The value is snapped to step, clamped to min/max,
|
|
3989
|
+
* and constrained by adjacent thumbs when `crossover` is `false`.
|
|
3990
|
+
*
|
|
3991
|
+
* @see {@link up} and {@link down} for relative adjustments.
|
|
3992
|
+
*
|
|
3993
|
+
* @example
|
|
3994
|
+
* ```ts
|
|
3995
|
+
* const slider = createSlider({ min: 0, max: 100, step: 5 })
|
|
3996
|
+
* slider.register({ value: 50 })
|
|
3997
|
+
* slider.set(0, 73) // values: [75] (snapped)
|
|
3998
|
+
* ```
|
|
3999
|
+
*/
|
|
4000
|
+
set: (index: number, value: number) => void;
|
|
4001
|
+
/**
|
|
4002
|
+
* Increment a thumb's value by `step × multiplier`.
|
|
4003
|
+
*
|
|
4004
|
+
* @param index Zero-based thumb index.
|
|
4005
|
+
* @param multiplier Number of steps to increment. Defaults to `1`.
|
|
4006
|
+
*
|
|
4007
|
+
* @see {@link down} for the inverse. {@link set} for absolute positioning.
|
|
4008
|
+
*
|
|
4009
|
+
* @example
|
|
4010
|
+
* ```ts
|
|
4011
|
+
* const slider = createSlider({ min: 0, max: 100, step: 5 })
|
|
4012
|
+
* slider.register({ value: 50 })
|
|
4013
|
+
* slider.up(0) // values: [55]
|
|
4014
|
+
* slider.up(0, 3) // values: [70]
|
|
4015
|
+
* ```
|
|
4016
|
+
*/
|
|
4017
|
+
up: (index: number, multiplier?: number) => void;
|
|
4018
|
+
/**
|
|
4019
|
+
* Decrement a thumb's value by `step × multiplier`.
|
|
4020
|
+
*
|
|
4021
|
+
* @param index Zero-based thumb index.
|
|
4022
|
+
* @param multiplier Number of steps to decrement. Defaults to `1`.
|
|
4023
|
+
*
|
|
4024
|
+
* @see {@link up} for the inverse. {@link set} for absolute positioning.
|
|
4025
|
+
*
|
|
4026
|
+
* @example
|
|
4027
|
+
* ```ts
|
|
4028
|
+
* const slider = createSlider({ min: 0, max: 100, step: 5 })
|
|
4029
|
+
* slider.register({ value: 50 })
|
|
4030
|
+
* slider.down(0) // values: [45]
|
|
4031
|
+
* slider.down(0, 3) // values: [30]
|
|
4032
|
+
* ```
|
|
4033
|
+
*/
|
|
4034
|
+
down: (index: number, multiplier?: number) => void;
|
|
4035
|
+
/**
|
|
4036
|
+
* Set a thumb to the minimum value.
|
|
4037
|
+
*
|
|
4038
|
+
* @param index Zero-based thumb index.
|
|
4039
|
+
*
|
|
4040
|
+
* @see {@link ceil} for the inverse.
|
|
4041
|
+
*
|
|
4042
|
+
* @example
|
|
4043
|
+
* ```ts
|
|
4044
|
+
* const slider = createSlider({ min: 10, max: 90 })
|
|
4045
|
+
* slider.register({ value: 50 })
|
|
4046
|
+
* slider.floor(0) // values: [10]
|
|
4047
|
+
* ```
|
|
4048
|
+
*/
|
|
4049
|
+
floor: (index: number) => void;
|
|
4050
|
+
/**
|
|
4051
|
+
* Set a thumb to the maximum value.
|
|
4052
|
+
*
|
|
4053
|
+
* @param index Zero-based thumb index.
|
|
4054
|
+
*
|
|
4055
|
+
* @see {@link floor} for the inverse.
|
|
4056
|
+
*
|
|
4057
|
+
* @example
|
|
4058
|
+
* ```ts
|
|
4059
|
+
* const slider = createSlider({ min: 10, max: 90 })
|
|
4060
|
+
* slider.register({ value: 50 })
|
|
4061
|
+
* slider.ceil(0) // values: [90]
|
|
4062
|
+
* ```
|
|
4063
|
+
*/
|
|
4064
|
+
ceil: (index: number) => void;
|
|
4065
|
+
}
|
|
4066
|
+
/**
|
|
4067
|
+
* Creates slider state with value math, step snapping, and multi-thumb support.
|
|
4068
|
+
*
|
|
4069
|
+
* Extends createModel for useProxyModel compatibility. Each thumb is a model
|
|
4070
|
+
* ticket with a shallowRef<number> value. Values are derived from the ordered
|
|
4071
|
+
* tickets, enabling proper registration/unregistration lifecycle.
|
|
4072
|
+
*
|
|
4073
|
+
* @param options Slider configuration.
|
|
4074
|
+
* @returns Slider context with values, math functions, and thumb operations.
|
|
4075
|
+
*
|
|
4076
|
+
* @see https://0.vuetifyjs.com/composables/forms/create-slider
|
|
4077
|
+
* @see {@link createModel} for the base model composable.
|
|
4078
|
+
*
|
|
4079
|
+
* @example Single thumb
|
|
4080
|
+
* ```ts
|
|
4081
|
+
* import { createSlider } from '@vuetify/v0'
|
|
4082
|
+
*
|
|
4083
|
+
* const slider = createSlider({ min: 0, max: 100, step: 5 })
|
|
4084
|
+
* const ticket = slider.register({ value: 50 })
|
|
4085
|
+
* slider.up(0) // values: [55]
|
|
4086
|
+
* slider.fromValue(50) // 50
|
|
4087
|
+
* ```
|
|
4088
|
+
*
|
|
4089
|
+
* @example Range slider
|
|
4090
|
+
* ```ts
|
|
4091
|
+
* import { createSlider } from '@vuetify/v0'
|
|
4092
|
+
*
|
|
4093
|
+
* const slider = createSlider({ min: 0, max: 100, step: 1, range: true })
|
|
4094
|
+
* slider.register({ value: 25 })
|
|
4095
|
+
* slider.register({ value: 75 })
|
|
4096
|
+
* slider.set(0, 30) // values: [30, 75]
|
|
4097
|
+
* slider.set(1, 60) // values: [30, 60]
|
|
4098
|
+
* ```
|
|
4099
|
+
*
|
|
4100
|
+
* @example Custom pointer interaction (media scrubber)
|
|
4101
|
+
* ```ts
|
|
4102
|
+
* import { createSlider } from '@vuetify/v0'
|
|
4103
|
+
*
|
|
4104
|
+
* const slider = createSlider({ min: 0, max: 217, step: 0.1 })
|
|
4105
|
+
* slider.register({ value: 0 })
|
|
4106
|
+
*
|
|
4107
|
+
* // pointer → fromPercent → set → fromValue → UI
|
|
4108
|
+
* const percent = (clientX - rect.left) / rect.width * 100
|
|
4109
|
+
* slider.set(0, slider.fromPercent(percent))
|
|
4110
|
+
* const position = slider.fromValue(slider.values.value[0])
|
|
4111
|
+
* ```
|
|
4112
|
+
*/
|
|
4113
|
+
declare function createSlider(options?: SliderOptions): SliderContext;
|
|
4114
|
+
//#endregion
|
|
4068
4115
|
//#region src/composables/useStack/index.d.ts
|
|
4069
4116
|
/**
|
|
4070
4117
|
* Input type for stack tickets - what users provide to register().
|
|
@@ -4493,6 +4540,8 @@ interface StorageOptions {
|
|
|
4493
4540
|
read: (value: string) => unknown;
|
|
4494
4541
|
write: (value: unknown) => string;
|
|
4495
4542
|
};
|
|
4543
|
+
/** Time-to-live in milliseconds. When set, expired entries return the default value on `get()` and `set()` automatically timestamps entries. */
|
|
4544
|
+
ttl?: number;
|
|
4496
4545
|
}
|
|
4497
4546
|
interface StorageContextOptions extends StorageOptions {
|
|
4498
4547
|
/** The namespace for the storage context. Defaults to `v0:storage` */
|
|
@@ -5320,4 +5369,4 @@ declare function createVirtualContext<T = unknown>(items: Ref<readonly T[]>, _op
|
|
|
5320
5369
|
*/
|
|
5321
5370
|
declare function useVirtual<T = unknown>(namespace?: string): VirtualContext<T>;
|
|
5322
5371
|
//#endregion
|
|
5323
|
-
export { useStep as $,
|
|
5372
|
+
export { useStep as $, GroupOptions as $i, IntersectionObserverEntry as $n, createFeatures as $r, createPermissionsPlugin as $t, createTheme as A, ModelOptions as Aa, useBreakpoints as Ai, LoggerContextOptions as An, ValidationOptions as Ar, useElementSize as At, StorageOptions as B, ContextKey as Bi, LocaleOptions as Bn, createRules as Br, ProxyRegistryContext as Bt, ThemeContext as C, SelectionOptions as Ca, BreakpointsContext as Ci, useMutationObserver as Cn, FormValidationResult as Cr, Vuetify0RtlAdapter as Ct, ThemeRecord as D, createSelectionContext as Da, createBreakpoints as Di, usePrefersDark as Dn, createFormContext as Dr, ResizeObserverOptions as Dt, ThemePluginOptions as E, createSelection as Ea, BreakpointsPluginOptions as Ei, usePrefersContrast as En, createForm as Er, ResizeObserverEntry as Et, Vuetify0ThemeOptions as F, Plugin as Fi, createLoggerPlugin as Fn, RuleAliases as Fr, QueueTicket as Ft, useStorage as G, OverflowContext as Gi, createLocale as Gn, StandardSchemaV1 as Gr, useProxyModel as Gt, createStorage as H, createContext as Hi, LocaleRecord as Hn, createRulesFallback as Hr, useProxyRegistry as Ht, ThemeAdapter as I, PluginContextConfig as Ii, useLogger as In, RuleInput as Ir, QueueTicketInput as It, StepOptions as J, createOverflow as Ji, createLocalePlugin as Jn, FeatureContextOptions as Jr, PermissionOptions as Jt, StepContext as K, OverflowContextOptions as Ki, createLocaleContext as Kn, isStandardSchema as Kr, PermissionContext as Kt, ThemeAdapterInterface as L, PluginOptions as Li, LogLevel as Ln, RulesContext as Lr, createQueue as Lt, createThemePlugin as M, ModelTicketInput as Ma, MaybeElementRef as Mi, LoggerPluginOptions as Mn, ValidationTicketInput as Mr, QueueContext as Mt, useTheme as N, createModel as Na, toElement as Ni, createLogger as Nn, createValidation as Nr, QueueContextOptions as Nt, ThemeTicket as O, useSelection as Oa, createBreakpointsContext as Oi, usePrefersReducedMotion as On, useForm as Or, UseElementSizeReturn as Ot, Vuetify0ThemeAdapter as P, toArray as Pi, createLoggerContext as Pn, RuleAlias as Pr, QueueOptions as Pt, createStepContext as Q, GroupContextOptions as Qi, useLazy as Qn, FeatureTicketInput as Qr, createPermissionsContext as Qt, StorageContext as R, createPlugin as Ri, LocaleContext as Rn, RulesContextOptions as Rr, createQueueContext as Rt, ThemeColors as S, SelectionContextOptions as Sa, BreakpointName as Si, UseMutationObserverReturn as Sn, FormTicketInput as Sr, useRtl as St, ThemeOptions as T, SelectionTicketInput as Ta, BreakpointsOptions as Ti, useMediaQuery as Tn, FormValue as Tr, RtlAdapterSetupContext as Tt, createStorageContext as U, provideContext as Ui, LocaleTicket as Un, createRulesPlugin as Ur, ProxyModelOptions as Ut, StoragePluginOptions as V, CreateContextOptions as Vi, LocalePluginOptions as Vn, createRulesContext as Vr, ProxyRegistryOptions as Vt, createStoragePlugin as W, useContext as Wi, LocaleTicketInput as Wn, useRules as Wr, ProxyModelTarget as Wt, StepTicketInput as X, useOverflow as Xi, LazyContext as Xn, FeaturePluginOptions as Xr, PermissionTicket as Xt, StepTicket as Y, createOverflowContext as Yi, useLocale as Yn, FeatureOptions as Yr, PermissionPluginOptions as Yt, createStep as Z, GroupContext as Zi, LazyOptions as Zn, FeatureTicket as Zr, createPermissions as Zt, TimelineTicket as _, SingleTicketInput as _a, ClickOutsideIgnoreTarget as _i, OpenStrategy as _n, useHotkey as _r, RtlPluginOptions as _t, VirtualDirection as a, BreadcrumbTicket as aa, useDocumentEventListener as ai, useNested as an, HydrationContext as ar, StackTicketInput as at, useTimeline as b, useSingle as ba, UseClickOutsideReturn as bi, ObservableNodeList as bn, FormOptions as br, createRtlFallback as bt, VirtualState as c, BreadcrumbsContextOptions as ca, DateContext as ci, NestedActiveMode as cn, HydrationPluginOptions as cr, createStackPlugin as ct, useVirtual as d, createBreadcrumbsContext as da, DatePluginOptions as di, NestedOpenMode as dn, createHydrationContext as dr, SliderOptions as dt, GroupTicket as ea, createFeaturesContext as ei, usePermissions as en, IntersectionObserverOptions as er, StackContext as et, ToggleScopeControls as f, useBreadcrumbs as fa, createDate as fi, NestedOptions as fn, createHydrationPlugin as fr, SliderTicketInput as ft, TimelineOptions as g, SingleTicket as ga, ClickOutsideElement as gi, NestedTicketInput as gn, UseHotkeyReturn as gr, RtlOptions as gt, TimelineContextOptions as h, SingleOptions as ha, useDate as hi, NestedTicket as hn, UseHotkeyOptions as hr, RtlContextOptions as ht, VirtualContextOptions as i, useGroup as ia, EventHandler as ii, createNestedContext as in, useIntersectionObserver as ir, StackTicket as it, createThemeContext as j, ModelTicket as ja, toReactive as ji, LoggerOptions as jn, ValidationTicket as jr, useResizeObserver as jt, ThemeTicketInput as k, ModelContext as ka, createBreakpointsPlugin as ki, LoggerContext as kn, ValidationContext as kr, UseResizeObserverReturn as kt, createVirtual as l, BreadcrumbsOptions as la, DateContextOptions as li, NestedContext as ln, createFallbackHydration as lr, useStack as lt, TimelineContext as m, SingleContextOptions as ma, createDatePlugin as mi, NestedSelectionMode as mn, PlatformContext as mr, RtlContext as mt, VirtualAnchor as n, createGroup as na, useFeatures as ni, PermissionAdapterInterface as nn, UseIntersectionObserverReturn as nr, StackOptions as nt, VirtualItem as o, BreadcrumbTicketInput as oa, useEventListener as oi, multipleOpenStrategy as on, HydrationContextOptions as or, createStack as ot, useToggleScope as p, SingleContext as pa, createDateContext as pi, NestedRegistration as pn, useHydration as pr, createSlider as pt, StepContextOptions as q, OverflowOptions as qi, createLocaleFallback as qn, FeatureContext as qr, PermissionContextOptions as qt, VirtualContext as r, createGroupContext as ra, CleanupFunction as ri, createNested as rn, useElementIntersection as rr, StackPluginOptions as rt, VirtualOptions as s, BreadcrumbsContext as sa, useWindowEventListener as si, singleOpenStrategy as sn, HydrationOptions as sr, createStackContext as st, ScrollToOptions as t, GroupTicketInput as ta, createFeaturesPlugin as ti, PermissionAdapter as tn, UseElementIntersectionReturn as tr, StackContextOptions as tt, createVirtualContext as u, createBreadcrumbs as ua, DateOptions as ui, NestedContextOptions as un, createHydration as ur, SliderContext as ut, createTimeline as v, createSingle as va, ClickOutsideTarget as vi, OpenStrategyContext as vn, FormContext as vr, createRtl as vt, ThemeContextOptions as w, SelectionTicket as wa, BreakpointsContextOptions as wi, MediaQueryContext as wn, FormValidationRule as wr, RtlAdapter as wt, Colors as x, SelectionContext as xa, useClickOutside as xi, UseMutationObserverOptions as xn, FormTicket as xr, createRtlPlugin as xt, createTimelineContext as y, createSingleContext as ya, UseClickOutsideOptions as yi, MutationObserverRecord as yn, FormContextOptions as yr, createRtlContext as yt, StorageContextOptions as z, createPluginContext as zi, LocaleContextOptions as zn, RulesOptions as zr, useQueue as zt };
|