@vuetify/v0 0.1.6 → 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.
Files changed (159) hide show
  1. package/README.md +0 -1
  2. package/dist/{adapter-Bjs_Nx_J.mjs → adapter-B4zE-hA5.mjs} +5 -8
  3. package/dist/adapter-CqP9Z4JU.d.mts +1087 -0
  4. package/dist/{adapter-CLs-OrSN.d.mts → adapter-DIx4Rntl.d.mts} +5 -48
  5. package/dist/adapters-BjeDmKc6.mjs +1 -0
  6. package/dist/adapters-Bv5aRv3l.mjs +1 -0
  7. package/dist/adapters-C66XaKkw.mjs +1 -0
  8. package/dist/adapters-DkVblyML.mjs +1 -0
  9. package/dist/adapters-uJLWGQJl.mjs +1 -0
  10. package/dist/browser/index.js +712 -659
  11. package/dist/components/index.d.mts +1 -19
  12. package/dist/components/index.mjs +34 -39
  13. package/dist/{components-GiQh_RfQ.mjs → components-CACff-Lt.mjs} +145 -299
  14. package/dist/composables/index.d.mts +18 -17
  15. package/dist/composables/index.mjs +34 -37
  16. package/dist/{consola-DiUk9j3y.d.mts → consola-BVzYzeLH.d.mts} +1 -1
  17. package/dist/{consola-GBy8XRuL.mjs → consola-Ceox8BWi.mjs} +1 -2
  18. package/dist/constants/index.d.mts +1 -1
  19. package/dist/constants/index.mjs +3 -5
  20. package/dist/{createDataTable-lSofI5rU.mjs → createDataTable-CLI4TALE.mjs} +9 -11
  21. package/dist/{createGroup-CCb7Zfyw.mjs → createGroup-Cf6lK9BR.mjs} +5 -8
  22. package/dist/{createPagination-lagznd8i.mjs → createPagination-Bu8vE0JW.mjs} +3 -5
  23. package/dist/{createSelection-Zo4RQpYe.mjs → createSelection-DvOR2tKk.mjs} +9 -12
  24. package/dist/{createSingle-BH9wNDrS.mjs → createSingle-Bbcwcq4R.mjs} +3 -5
  25. package/dist/{createTokens-Cu1efg9Z.mjs → createTokens-CMRBDlzN.mjs} +23 -26
  26. package/dist/{createTrinity-Cii8-B2r.mjs → createTrinity-C_c8eedz.mjs} +10 -13
  27. package/dist/data-table/adapters/client/index.d.mts +1 -2
  28. package/dist/data-table/adapters/client/index.mjs +7 -9
  29. package/dist/data-table/adapters/index.d.mts +4 -4
  30. package/dist/data-table/adapters/index.mjs +10 -12
  31. package/dist/data-table/adapters/server/index.d.mts +1 -2
  32. package/dist/data-table/adapters/server/index.mjs +5 -7
  33. package/dist/data-table/adapters/virtual/index.d.mts +1 -2
  34. package/dist/data-table/adapters/virtual/index.mjs +7 -9
  35. package/dist/data-table/index.d.mts +5 -6
  36. package/dist/data-table/index.mjs +22 -25
  37. package/dist/date/index.d.mts +1 -3
  38. package/dist/date/index.mjs +3932 -3943
  39. package/dist/features/adapters/flagsmith/index.d.mts +2 -4
  40. package/dist/features/adapters/flagsmith/index.mjs +2 -3
  41. package/dist/features/adapters/launchdarkly/index.d.mts +1 -3
  42. package/dist/features/adapters/launchdarkly/index.mjs +2 -3
  43. package/dist/features/adapters/posthog/index.d.mts +1 -3
  44. package/dist/features/adapters/posthog/index.mjs +3 -4
  45. package/dist/features/index.d.mts +2 -16
  46. package/dist/features/index.mjs +13 -18
  47. package/dist/{flagsmith-CHmpPGR7.mjs → flagsmith-CrWUeIhT.mjs} +1 -2
  48. package/dist/{globals-D6FBsWDI.mjs → globals-BqRH_jdr.mjs} +2 -3
  49. package/dist/{htmlElements-d8iBCGpO.mjs → htmlElements-DcYtv0hg.mjs} +7 -10
  50. package/dist/index-8sflFIN8.d.mts +856 -0
  51. package/dist/{index-De0SQt1w.d.mts → index-BE848tZ2.d.mts} +277 -979
  52. package/dist/{index-DlUIZN-F.d.mts → index-CKbxWC4t.d.mts} +610 -546
  53. package/dist/index-CeNfBYuo.d.mts +46 -0
  54. package/dist/{index-DIK84tM4.d.mts → index-CmCMrlt3.d.mts} +3 -3
  55. package/dist/{index-BFBN5Zl3.d.mts → index-Dor6eAEc.d.mts} +0 -1
  56. package/dist/{index-UNwEBkQT.d.mts → index-MHkcqY_y.d.mts} +1 -2
  57. package/dist/{index-BuOz3Rgm.d.mts → index-dJKXAO5D.d.mts} +1 -2
  58. package/dist/index.d.mts +22 -20
  59. package/dist/index.mjs +38 -40
  60. package/dist/json/web-types.json +1 -1
  61. package/dist/{launchdarkly-W8t8ZANX.mjs → launchdarkly-jF2KZGoH.mjs} +1 -2
  62. package/dist/locale/adapters/index.d.mts +1 -2
  63. package/dist/locale/adapters/index.mjs +4 -6
  64. package/dist/locale/adapters/v0/index.d.mts +1 -2
  65. package/dist/locale/adapters/v0/index.mjs +3 -5
  66. package/dist/locale/index.d.mts +2 -16
  67. package/dist/locale/index.mjs +14 -17
  68. package/dist/logger/adapters/consola/index.d.mts +1 -2
  69. package/dist/logger/adapters/consola/index.mjs +2 -3
  70. package/dist/logger/adapters/index.d.mts +4 -4
  71. package/dist/logger/adapters/index.mjs +6 -8
  72. package/dist/logger/adapters/pino/index.d.mts +1 -2
  73. package/dist/logger/adapters/pino/index.mjs +3 -5
  74. package/dist/logger/adapters/v0/index.d.mts +1 -2
  75. package/dist/logger/adapters/v0/index.mjs +3 -5
  76. package/dist/logger/index.d.mts +5 -16
  77. package/dist/logger/index.mjs +8 -10
  78. package/dist/{memory-BsZGbGnG.mjs → memory-XCMtkld1.mjs} +1 -2
  79. package/dist/palettes/ant/generate/index.d.mts +9 -0
  80. package/dist/palettes/ant/generate/index.mjs +98 -0
  81. package/dist/palettes/ant/index.d.mts +6 -0
  82. package/dist/palettes/ant/index.mjs +149 -0
  83. package/dist/palettes/index.d.mts +12 -0
  84. package/dist/palettes/index.mjs +1 -0
  85. package/dist/palettes/leonardo/generate/index.d.mts +10 -0
  86. package/dist/palettes/leonardo/generate/index.mjs +120 -0
  87. package/dist/palettes/material/generate/index.d.mts +10 -0
  88. package/dist/palettes/material/generate/index.mjs +103 -0
  89. package/dist/palettes/material/index.d.mts +6 -0
  90. package/dist/palettes/material/index.mjs +173 -0
  91. package/dist/palettes/md1/index.d.mts +6 -0
  92. package/dist/palettes/md1/index.mjs +261 -0
  93. package/dist/palettes/md2/index.d.mts +6 -0
  94. package/dist/palettes/md2/index.mjs +297 -0
  95. package/dist/palettes/radix/index.d.mts +6 -0
  96. package/dist/palettes/radix/index.mjs +439 -0
  97. package/dist/palettes/tailwind/index.d.mts +6 -0
  98. package/dist/palettes/tailwind/index.mjs +291 -0
  99. package/dist/permissions/adapters/index.d.mts +2 -17
  100. package/dist/permissions/adapters/index.mjs +4 -6
  101. package/dist/permissions/adapters/v0/index.d.mts +1 -17
  102. package/dist/permissions/adapters/v0/index.mjs +3 -5
  103. package/dist/permissions/index.d.mts +1 -16
  104. package/dist/permissions/index.mjs +12 -15
  105. package/dist/{pino-BD5PCzAF.mjs → pino-B7tJ3m18.mjs} +2 -4
  106. package/dist/{pino-p-jDkNQd.d.mts → pino-Bzighnkd.d.mts} +1 -2
  107. package/dist/{posthog-BxaG8sYi.mjs → posthog-DbPqmaAp.mjs} +2 -4
  108. package/dist/rules/index.d.mts +2 -0
  109. package/dist/rules/index.mjs +15 -0
  110. package/dist/{server-DgOdFYMU.mjs → server-CZ6ahbEH.mjs} +2 -4
  111. package/dist/{server-CGAeOGPC.d.mts → server-Ch9J86tb.d.mts} +1 -2
  112. package/dist/storage/adapters/index.d.mts +2 -2
  113. package/dist/storage/adapters/index.mjs +2 -3
  114. package/dist/storage/adapters/memory/index.d.mts +1 -1
  115. package/dist/storage/adapters/memory/index.mjs +2 -3
  116. package/dist/storage/index.d.mts +3 -16
  117. package/dist/storage/index.mjs +33 -37
  118. package/dist/theme/adapters/index.d.mts +1 -16
  119. package/dist/theme/adapters/index.mjs +4 -6
  120. package/dist/theme/adapters/v0/index.d.mts +1 -16
  121. package/dist/theme/adapters/v0/index.mjs +3 -5
  122. package/dist/theme/index.d.mts +1 -16
  123. package/dist/theme/index.mjs +13 -16
  124. package/dist/{toArray-BBZH-G2X.mjs → toArray-VdROPpy-.mjs} +2 -4
  125. package/dist/types/index.d.mts +1 -1
  126. package/dist/types/index.mjs +1 -1
  127. package/dist/{useClickOutside-Bm_3mbcT.mjs → useClickOutside-YOGwKo7v.mjs} +314 -206
  128. package/dist/{useFeatures-BS4mit8z.mjs → useFeatures-BGDgUrdr.mjs} +5 -8
  129. package/dist/{useLocale-DJJmg-wv.mjs → useLocale-C8I_fNAS.mjs} +7 -9
  130. package/dist/{useLogger-C8G5jgNk.mjs → useLogger-B70T4SgK.mjs} +13 -16
  131. package/dist/{usePermissions-C5Mkotol.mjs → usePermissions-afVt2qR7.mjs} +5 -7
  132. package/dist/useRules-7C92Xzyt.mjs +144 -0
  133. package/dist/{useTheme-BBnASLr3.mjs → useTheme-jp2wL2FJ.mjs} +11 -13
  134. package/dist/utilities/index.d.mts +1 -2
  135. package/dist/utilities/index.mjs +426 -4
  136. package/dist/{v0-Bh8d1j_p.d.mts → v0-1bfmyZ5_.d.mts} +2 -2
  137. package/dist/{v0-BOxb3nD1.d.mts → v0-1xxC39wf.d.mts} +1 -2
  138. package/dist/{v0-DtO_ICXr.mjs → v0-B1QQGE4O.mjs} +2 -5
  139. package/dist/{v0-DHMoZ7dS.d.mts → v0-CAKa6tzG.d.mts} +1 -1
  140. package/dist/{v0-DzvhDU1W.mjs → v0-CGlkn5u7.mjs} +3 -6
  141. package/dist/{v0-BWBSVkew.mjs → v0-CHvU3jQE.mjs} +3 -5
  142. package/dist/{v0-CVr15VcY.d.mts → v0-CdUL2eOn.d.mts} +1 -2
  143. package/dist/{v0-lua6ffdk.mjs → v0-V-cQsuZD.mjs} +3 -5
  144. package/dist/{v0-CWUF_HqP.mjs → v0-YAqbXudL.mjs} +3 -5
  145. package/dist/{virtual-CVb9hRUU.d.mts → virtual-DwBiFA25.d.mts} +1 -2
  146. package/dist/{virtual-BEOqkQvm.mjs → virtual-eDNVH1fz.mjs} +3 -5
  147. package/package.json +39 -11
  148. package/dist/adapter-DcwxFryd.d.mts +0 -97
  149. package/dist/adapters-BGJKsBrw.mjs +0 -1
  150. package/dist/adapters-BQ-Lr3PW.mjs +0 -1
  151. package/dist/adapters-DEXpW9If.mjs +0 -1
  152. package/dist/adapters-Q9WaOsJp.mjs +0 -1
  153. package/dist/adapters-SSDVth5e.mjs +0 -1
  154. package/dist/constants-B8pMSkcW.mjs +0 -1
  155. package/dist/utilities-CcJtp9Gx.mjs +0 -429
  156. /package/dist/{adapter-CJIj5ySf.d.mts → adapter-JTFG3Jn8.d.mts} +0 -0
  157. /package/dist/{index-Bv1VN_j5.d.mts → index-B5ZDDkXv.d.mts} +0 -0
  158. /package/dist/{index-BDTbJClL.d.mts → index-NsE5nARK.d.mts} +0 -0
  159. /package/dist/{memory-DVjquu_v.d.mts → memory-BTtRdnNn.d.mts} +0 -0
@@ -1,16 +1,16 @@
1
- import { a as SUPPORTS_OBSERVER, i as SUPPORTS_MUTATION_OBSERVER, n as SUPPORTS_INTERSECTION_OBSERVER, r as SUPPORTS_MATCH_MEDIA, t as IN_BROWSER } from "./globals-D6FBsWDI.mjs";
2
- import { a as isElement, c as isNull, d as isObject, g as mergeDeep, h as isUndefined, l as isNullOrUndefined, o as isFunction, p as isString, t as clamp, u as isNumber, v as useId$1, y as instanceExists } from "./utilities-CcJtp9Gx.mjs";
3
- import { i as useContext, n as createContext, t as createTrinity } from "./createTrinity-Cii8-B2r.mjs";
4
- import { a as createPlugin, i as useLogger, o as createPluginContext } from "./useLogger-C8G5jgNk.mjs";
5
- import { i as createRegistry } from "./createTokens-Cu1efg9Z.mjs";
6
- import { i as createModel, t as createSelection } from "./createSelection-Zo4RQpYe.mjs";
7
- import { t as createSingle } from "./createSingle-BH9wNDrS.mjs";
8
- import { t as createGroup } from "./createGroup-CCb7Zfyw.mjs";
9
- import { t as toArray } from "./toArray-BBZH-G2X.mjs";
10
- import { a as useLocale } from "./useLocale-DJJmg-wv.mjs";
11
- import { t as MemoryAdapter } from "./memory-BsZGbGnG.mjs";
1
+ import { a as SUPPORTS_OBSERVER, i as SUPPORTS_MUTATION_OBSERVER, n as SUPPORTS_INTERSECTION_OBSERVER, r as SUPPORTS_MATCH_MEDIA, t as IN_BROWSER } from "./globals-BqRH_jdr.mjs";
2
+ import { clamp, instanceExists, isElement, isFunction, isNull, isNullOrUndefined, isNumber, isObject, isString, isUndefined, mergeDeep, useId as useId$1 } from "./utilities/index.mjs";
3
+ import { i as useContext, n as createContext, t as createTrinity } from "./createTrinity-C_c8eedz.mjs";
4
+ import { a as createPlugin, i as useLogger, o as createPluginContext } from "./useLogger-B70T4SgK.mjs";
5
+ import { i as createRegistry } from "./createTokens-CMRBDlzN.mjs";
6
+ import { i as createModel, t as createSelection } from "./createSelection-DvOR2tKk.mjs";
7
+ import { t as createSingle } from "./createSingle-Bbcwcq4R.mjs";
8
+ import { t as createGroup } from "./createGroup-Cf6lK9BR.mjs";
9
+ import { t as toArray } from "./toArray-VdROPpy-.mjs";
10
+ import { a as useLocale } from "./useLocale-C8I_fNAS.mjs";
11
+ import { a as useRules, o as isStandardSchema, s as toRule } from "./useRules-7C92Xzyt.mjs";
12
+ import { t as MemoryAdapter } from "./memory-XCMtkld1.mjs";
12
13
  import { computed, effectScope, isRef, nextTick, onScopeDispose, reactive, readonly, ref, shallowReactive, shallowReadonly, shallowRef, toRef, toValue, unref, watch, watchEffect } from "vue";
13
-
14
14
  //#region src/composables/createBreadcrumbs/index.ts
15
15
  /**
16
16
  * @module createBreadcrumbs
@@ -154,7 +154,6 @@ function createBreadcrumbsContext(_options = {}) {
154
154
  function useBreadcrumbs(namespace = "v0:breadcrumbs") {
155
155
  return useContext(namespace);
156
156
  }
157
-
158
157
  //#endregion
159
158
  //#region src/composables/useHydration/index.ts
160
159
  /**
@@ -244,7 +243,6 @@ const [createHydrationContext, createHydrationPlugin, useHydration] = createPlug
244
243
  } });
245
244
  }
246
245
  });
247
-
248
246
  //#endregion
249
247
  //#region src/composables/toElement/index.ts
250
248
  /**
@@ -279,7 +277,6 @@ function toElement(target) {
279
277
  if (raw instanceof Element) return raw;
280
278
  if ("$el" in raw) return raw.$el;
281
279
  }
282
-
283
280
  //#endregion
284
281
  //#region src/composables/createObserver/index.ts
285
282
  /**
@@ -365,7 +362,6 @@ function createObserver(target, userCallback, config) {
365
362
  stop
366
363
  };
367
364
  }
368
-
369
365
  //#endregion
370
366
  //#region src/composables/useResizeObserver/index.ts
371
367
  /**
@@ -503,7 +499,6 @@ function useElementSize(target) {
503
499
  stop
504
500
  };
505
501
  }
506
-
507
502
  //#endregion
508
503
  //#region src/composables/createOverflow/index.ts
509
504
  /**
@@ -696,7 +691,6 @@ function createOverflowContext(_options = {}) {
696
691
  function useOverflow(namespace = "v0:overflow") {
697
692
  return useContext(namespace);
698
693
  }
699
-
700
694
  //#endregion
701
695
  //#region src/composables/useProxyModel/index.ts
702
696
  /**
@@ -786,7 +780,6 @@ function useProxyModel(context, model, options) {
786
780
  onScopeDispose(stop, true);
787
781
  return stop;
788
782
  }
789
-
790
783
  //#endregion
791
784
  //#region src/composables/toReactive/index.ts
792
785
  /**
@@ -921,7 +914,6 @@ function toReactive(objectRef) {
921
914
  }
922
915
  }));
923
916
  }
924
-
925
917
  //#endregion
926
918
  //#region src/composables/useBreakpoints/index.ts
927
919
  /**
@@ -1128,7 +1120,6 @@ const [createBreakpointsContext, createBreakpointsPlugin, useBreakpoints] = crea
1128
1120
  } });
1129
1121
  }
1130
1122
  });
1131
-
1132
1123
  //#endregion
1133
1124
  //#region src/composables/useDate/index.ts
1134
1125
  /**
@@ -1338,160 +1329,98 @@ function useDate(namespace = "v0:date") {
1338
1329
  if (!instanceExists()) throw new Error("[v0] useDate() must be called inside a Vue component with createDatePlugin installed.\n\nExample:\n import { Vuetify0DateAdapter } from '@vuetify/v0/date'\n import { createDatePlugin } from '@vuetify/v0'\n\n app.use(createDatePlugin({ adapter: new Vuetify0DateAdapter() }))");
1339
1330
  return useContext(namespace);
1340
1331
  }
1341
-
1342
1332
  //#endregion
1343
1333
  //#region src/composables/createForm/index.ts
1344
1334
  /**
1345
1335
  * @module createForm
1346
1336
  *
1347
1337
  * @remarks
1348
- * Form validation composable with async rule support and multiple validation modes.
1338
+ * Form composable that coordinates validation across multiple fields.
1349
1339
  *
1350
1340
  * Key features:
1351
- * - Sync and async validation rules
1352
- * - Multiple validation modes (submit, change, combined)
1353
- * - Tri-state isValid (null/true/false)
1354
- * - isPristine tracking
1355
- * - Silent validation mode
1356
- * - Form-level validation and reset
1357
- *
1358
- * Each field is registered with validation rules and tracks its own state independently.
1341
+ * - Pure registry of ValidationContext instances
1342
+ * - Validations auto-register via useForm() injection
1343
+ * - Form-level submit, reset, and aggregate state
1344
+ * - Exposes disabled/readonly refs for component consumption
1345
+ * - Trinity pattern for DI
1346
+ *
1347
+ * Per-field validation logic lives in createValidation.
1348
+ * createForm is the mothership it coordinates, not creates.
1359
1349
  */
1360
1350
  /**
1361
1351
  * Creates a new form instance.
1362
1352
  *
1353
+ * A form is a pure registry of validation contexts. Validations register
1354
+ * themselves via `useForm()` injection. The form coordinates submit, reset,
1355
+ * and aggregate state across all registered validations.
1356
+ *
1363
1357
  * @param options The options for the form instance.
1364
- * @template Z The type of the form ticket.
1365
- * @template E The type of the form context.
1366
- * @returns A new form instance.
1358
+ * @returns A new form context.
1367
1359
  *
1368
1360
  * @see https://0.vuetifyjs.com/composables/forms/create-form
1369
1361
  *
1370
1362
  * @example
1371
1363
  * ```ts
1372
- * import { createForm } from '@vuetify/v0'
1364
+ * import { createForm, createValidation } from '@vuetify/v0'
1373
1365
  *
1374
1366
  * const form = createForm()
1375
1367
  *
1376
- * const username = form.register({
1377
- * id: 'username',
1368
+ * // Validations register themselves — form is just the coordinator
1369
+ * const validation = createValidation()
1370
+ * const email = validation.register({
1371
+ * id: 'email',
1378
1372
  * value: '',
1379
- * rules: [(v) => v.length > 0 || 'Username is required'],
1373
+ * rules: ['required', 'email'],
1380
1374
  * })
1381
1375
  *
1382
- * await form.submit()
1383
- *
1384
- * console.log(username.errors.value) // ['Username is required']
1376
+ * form.register({ value: validation })
1385
1377
  *
1378
+ * await form.submit()
1386
1379
  * form.reset()
1387
1380
  * ```
1388
1381
  */
1389
1382
  function createForm(options) {
1390
1383
  const registry = createRegistry(options);
1391
- const validateOn = options?.validateOn || "submit";
1392
- function parse(value) {
1393
- return value.toLowerCase().split(/\s+/);
1394
- }
1384
+ const disabled = shallowRef(false);
1385
+ const readonly = shallowRef(false);
1386
+ if (!/* @__PURE__ */ isNullOrUndefined(options?.disabled)) disabled.value = toValue(options.disabled) ?? false;
1387
+ if (!/* @__PURE__ */ isNullOrUndefined(options?.readonly)) readonly.value = toValue(options.readonly) ?? false;
1395
1388
  const isValidating = computed(() => {
1396
- for (const ticket of registry.values()) if (ticket.isValidating.value) return true;
1389
+ for (const ticket of registry.values()) if (ticket.value.isValidating.value) return true;
1397
1390
  return false;
1398
1391
  });
1399
1392
  const isValid = computed(() => {
1393
+ let hasNull = false;
1400
1394
  let hasFields = false;
1401
1395
  for (const ticket of registry.values()) {
1402
1396
  hasFields = true;
1403
- if (ticket.isValid.value === false) return false;
1404
- if (/* @__PURE__ */ isNull(ticket.isValid.value)) return null;
1397
+ if (ticket.value.isValid.value === false) return false;
1398
+ if (/* @__PURE__ */ isNull(ticket.value.isValid.value)) hasNull = true;
1405
1399
  }
1406
- return hasFields ? true : null;
1400
+ if (!hasFields) return null;
1401
+ return hasNull ? null : true;
1407
1402
  });
1408
- function reset() {
1409
- for (const ticket of registry.values()) ticket.reset();
1410
- }
1411
- async function submit() {
1412
- return validate([...registry.keys()]);
1413
- }
1414
- async function validate(id) {
1415
- const validating = toArray(id);
1416
- return (await Promise.all(validating.map(async (id$1) => await registry.get(id$1)?.validate() ?? true))).every(Boolean);
1417
- }
1418
1403
  function register(registration) {
1419
- const model = shallowRef(/* @__PURE__ */ isNullOrUndefined(registration.value) ? "" : toValue(registration.value));
1420
- const rules = registration.rules || [];
1421
- const errors = shallowRef([]);
1422
- const isValidating$1 = shallowRef(false);
1423
- const initialValue = model.value;
1424
- const triggers = registration.validateOn || validateOn;
1425
- const isPristine = shallowRef(true);
1426
- const isValid$1 = shallowRef(null);
1427
- function _validatesOn(event) {
1428
- return parse(triggers).includes(event);
1429
- }
1430
- function _reset() {
1431
- model.value = initialValue;
1432
- errors.value = [];
1433
- isPristine.value = true;
1434
- isValid$1.value = null;
1435
- isValidating$1.value = false;
1436
- validationGeneration++;
1437
- }
1438
- let validationGeneration = 0;
1439
- async function validate$1(silent = false) {
1440
- if (rules.length === 0) return isValid$1.value = true;
1441
- const generation = ++validationGeneration;
1442
- isValidating$1.value = true;
1443
- try {
1444
- const results = await Promise.all(rules.map((rule) => rule(model.value)));
1445
- if (generation !== validationGeneration) return isValid$1.value ?? false;
1446
- const errorMessages = results.filter((result) => /* @__PURE__ */ isString(result));
1447
- if (!silent) {
1448
- errors.value = errorMessages;
1449
- isValid$1.value = errorMessages.length === 0;
1450
- isPristine.value = toValue(model) === initialValue;
1451
- }
1452
- return errorMessages.length === 0;
1453
- } finally {
1454
- if (generation === validationGeneration) isValidating$1.value = false;
1455
- }
1456
- }
1457
- const item = {
1458
- ...registration,
1459
- rules,
1460
- errors,
1461
- disabled: registration.disabled || false,
1462
- validateOn: triggers,
1463
- isValidating: isValidating$1,
1464
- isPristine,
1465
- isValid: isValid$1,
1466
- reset: _reset,
1467
- validate: validate$1
1468
- };
1469
- const ticket = registry.register(item);
1470
- Object.defineProperty(ticket, "value", {
1471
- get() {
1472
- return model.value;
1473
- },
1474
- set(val) {
1475
- model.value = val;
1476
- isPristine.value = val === initialValue;
1477
- isValid$1.value = null;
1478
- if (_validatesOn("change")) validate$1();
1479
- },
1480
- enumerable: true,
1481
- configurable: true
1482
- });
1483
- return ticket;
1404
+ return registry.register(registration);
1484
1405
  }
1485
- function onboard(registrations) {
1486
- return registry.batch(() => registrations.map((r) => register(r)));
1406
+ function reset() {
1407
+ for (const ticket of registry.values()) for (const field of ticket.value.values()) field.reset();
1408
+ }
1409
+ async function submit(id) {
1410
+ const ids = id ? toArray(id) : [...registry.keys()];
1411
+ return (await Promise.all(ids.map(async (id) => {
1412
+ const ticket = registry.get(id);
1413
+ if (!ticket) return true;
1414
+ return (await Promise.all([...ticket.value.values()].map((field) => field.validate()))).every(Boolean);
1415
+ }))).every(Boolean);
1487
1416
  }
1488
1417
  return {
1489
1418
  ...registry,
1490
1419
  register,
1491
- onboard,
1492
- reset,
1493
1420
  submit,
1494
- validateOn,
1421
+ reset,
1422
+ disabled,
1423
+ readonly,
1495
1424
  isValid,
1496
1425
  isValidating,
1497
1426
  get size() {
@@ -1500,12 +1429,10 @@ function createForm(options) {
1500
1429
  };
1501
1430
  }
1502
1431
  /**
1503
- * Creates a new form context.
1432
+ * Creates a new form context using the Trinity pattern.
1504
1433
  *
1505
1434
  * @param options The options for the form context.
1506
- * @template Z The type of the form ticket.
1507
- * @template E The type of the form context.
1508
- * @returns A new form context.
1435
+ * @returns A Trinity tuple: [useFormContext, provideFormContext, formContext]
1509
1436
  *
1510
1437
  * @see https://0.vuetifyjs.com/composables/forms/create-form
1511
1438
  *
@@ -1513,21 +1440,7 @@ function createForm(options) {
1513
1440
  * ```ts
1514
1441
  * import { createFormContext } from '@vuetify/v0'
1515
1442
  *
1516
- * // With default namespace 'v0:form'
1517
- * export const [useMyForm, provideMyForm, myForm] = createFormContext({ validateOn: 'change' })
1518
- *
1519
- * // Or with custom namespace
1520
- * export const [useMyForm, provideMyForm, myForm] = createFormContext({
1521
- * namespace: 'my-form',
1522
- * validateOn: 'change',
1523
- * })
1524
- *
1525
- * // In a parent component:
1526
- * provideMyForm()
1527
- *
1528
- * // In a child component:
1529
- * const form = useMyForm()
1530
- * form.register({ id: 'field', value: ref(''), rules: [...] })
1443
+ * export const [useMyForm, provideMyForm, myForm] = createFormContext()
1531
1444
  * ```
1532
1445
  */
1533
1446
  function createFormContext(_options = {}) {
@@ -1543,7 +1456,7 @@ function createFormContext(_options = {}) {
1543
1456
  * Returns the current form instance.
1544
1457
  *
1545
1458
  * @param namespace The namespace for the form context. Defaults to `'v0:form'`.
1546
- * @returns The current form instance.
1459
+ * @returns The current form instance, or undefined if not provided.
1547
1460
  *
1548
1461
  * @see https://0.vuetifyjs.com/composables/forms/create-form
1549
1462
  *
@@ -1554,18 +1467,15 @@ function createFormContext(_options = {}) {
1554
1467
  *
1555
1468
  * const form = useForm()
1556
1469
  * <\/script>
1557
- *
1558
- * <template>
1559
- * <div>
1560
- * <p>Form is {{ form.isValid.value ? 'valid' : 'invalid' }}</p>
1561
- * </div>
1562
- * </template>
1563
1470
  * ```
1564
1471
  */
1565
1472
  function useForm(namespace = "v0:form") {
1566
- return useContext(namespace);
1473
+ try {
1474
+ return useContext(namespace);
1475
+ } catch {
1476
+ return;
1477
+ }
1567
1478
  }
1568
-
1569
1479
  //#endregion
1570
1480
  //#region src/composables/useHotkey/aliases.ts
1571
1481
  /**
@@ -1597,7 +1507,6 @@ function normalizeKey(key) {
1597
1507
  const lowerKey = key.toLowerCase();
1598
1508
  return keyAliasMap[lowerKey] ?? lowerKey;
1599
1509
  }
1600
-
1601
1510
  //#endregion
1602
1511
  //#region src/composables/useHotkey/parsing.ts
1603
1512
  const logger = useLogger();
@@ -1754,7 +1663,6 @@ function splitKeySequence(str) {
1754
1663
  /* v8 ignore stop */
1755
1664
  return collapsed;
1756
1665
  }
1757
-
1758
1666
  //#endregion
1759
1667
  //#region src/composables/useHotkey/index.ts
1760
1668
  /**
@@ -1945,7 +1853,6 @@ function matchesKeyGroup(e, group, platformIsMac) {
1945
1853
  if (/* @__PURE__ */ isUndefined(actualKey)) return modifiersMatch;
1946
1854
  return modifiersMatch && e.key.toLowerCase() === actualKey.toLowerCase();
1947
1855
  }
1948
-
1949
1856
  //#endregion
1950
1857
  //#region src/composables/useIntersectionObserver/index.ts
1951
1858
  /**
@@ -2104,7 +2011,6 @@ function useElementIntersection(target, options = {}) {
2104
2011
  stop
2105
2012
  };
2106
2013
  }
2107
-
2108
2014
  //#endregion
2109
2015
  //#region src/composables/useLazy/index.ts
2110
2016
  /**
@@ -2189,7 +2095,6 @@ function useLazy(active, options = {}) {
2189
2095
  onAfterLeave
2190
2096
  };
2191
2097
  }
2192
-
2193
2098
  //#endregion
2194
2099
  //#region src/composables/useMediaQuery/index.ts
2195
2100
  /**
@@ -2306,7 +2211,6 @@ function usePrefersReducedMotion() {
2306
2211
  function usePrefersContrast() {
2307
2212
  return useMediaQuery("(prefers-contrast: more)");
2308
2213
  }
2309
-
2310
2214
  //#endregion
2311
2215
  //#region src/composables/useMutationObserver/index.ts
2312
2216
  /**
@@ -2417,7 +2321,6 @@ function useMutationObserver(target, callback, options = {}) {
2417
2321
  onceIncludesImmediate: true
2418
2322
  });
2419
2323
  }
2420
-
2421
2324
  //#endregion
2422
2325
  //#region src/composables/createNested/strategies.ts
2423
2326
  /**
@@ -2459,7 +2362,6 @@ const singleOpenStrategy = {
2459
2362
  },
2460
2363
  onClose: void 0
2461
2364
  };
2462
-
2463
2365
  //#endregion
2464
2366
  //#region src/composables/createNested/index.ts
2465
2367
  /**
@@ -2526,7 +2428,7 @@ function createNested(_options = {}) {
2526
2428
  const multipleOption = _options.multiple ?? true;
2527
2429
  const resolvedOpenStrategy = openStrategy ?? resolveOpenStrategy(openMode);
2528
2430
  const group = createGroup(options);
2529
- const logger$1 = useLogger();
2431
+ const logger = useLogger();
2530
2432
  const children = shallowReactive(/* @__PURE__ */ new Map());
2531
2433
  const parents = shallowReactive(/* @__PURE__ */ new Map());
2532
2434
  const openedIds = shallowReactive(/* @__PURE__ */ new Set());
@@ -2810,7 +2712,7 @@ function createNested(_options = {}) {
2810
2712
  const id = registration.id ?? /* @__PURE__ */ useId$1();
2811
2713
  const parentId = registration.parentId;
2812
2714
  const nested = registration.children;
2813
- if (!/* @__PURE__ */ isUndefined(parentId) && !group.has(parentId)) logger$1.warn(`Parent with id "${parentId}" does not exist. Registering "${id}" without parent.`);
2715
+ if (!/* @__PURE__ */ isUndefined(parentId) && !group.has(parentId)) logger.warn(`Parent with id "${parentId}" does not exist. Registering "${id}" without parent.`);
2814
2716
  if (!/* @__PURE__ */ isUndefined(parentId) && group.has(parentId)) {
2815
2717
  if (batching) {
2816
2718
  pendingParents.set(id, parentId);
@@ -2869,9 +2771,9 @@ function createNested(_options = {}) {
2869
2771
  if (!group.has(id)) return;
2870
2772
  const parentId = parents.get(id);
2871
2773
  if (!/* @__PURE__ */ isUndefined(parentId)) {
2872
- const siblings$1 = children.get(parentId);
2873
- if (siblings$1) {
2874
- const filtered = siblings$1.filter((sid) => sid !== id);
2774
+ const siblings = children.get(parentId);
2775
+ if (siblings) {
2776
+ const filtered = siblings.filter((sid) => sid !== id);
2875
2777
  if (filtered.length === 0) children.delete(parentId);
2876
2778
  else children.set(parentId, filtered);
2877
2779
  }
@@ -3029,7 +2931,6 @@ function createNestedContext(_options = {}) {
3029
2931
  function useNested(namespace = "v0:nested") {
3030
2932
  return useContext(namespace);
3031
2933
  }
3032
-
3033
2934
  //#endregion
3034
2935
  //#region src/composables/createQueue/index.ts
3035
2936
  /**
@@ -3094,7 +2995,7 @@ function createQueue(_options = {}) {
3094
2995
  }, ticket.timeout);
3095
2996
  timeouts.set(ticket.id, timeout);
3096
2997
  }
3097
- function clearTimeout$1(id) {
2998
+ function clearTimeout(id) {
3098
2999
  const timeout = timeouts.get(id);
3099
3000
  if (timeout) {
3100
3001
  globalThis.clearTimeout(timeout);
@@ -3119,7 +3020,7 @@ function createQueue(_options = {}) {
3119
3020
  const ticket = /* @__PURE__ */ isUndefined(id) ? registry.seek("first") : registry.get(id);
3120
3021
  if (!ticket) return void 0;
3121
3022
  const wasFirst = ticket.index === 0;
3122
- clearTimeout$1(ticket.id);
3023
+ clearTimeout(ticket.id);
3123
3024
  registry.unregister(ticket.id);
3124
3025
  if (wasFirst) resume();
3125
3026
  return ticket;
@@ -3130,7 +3031,7 @@ function createQueue(_options = {}) {
3130
3031
  const ticket = registry.get(id);
3131
3032
  if (!ticket) continue;
3132
3033
  if (ticket.index === 0) hadFirst = true;
3133
- clearTimeout$1(ticket.id);
3034
+ clearTimeout(ticket.id);
3134
3035
  }
3135
3036
  registry.offboard(ids);
3136
3037
  if (hadFirst) resume();
@@ -3138,7 +3039,7 @@ function createQueue(_options = {}) {
3138
3039
  function pause() {
3139
3040
  const ticket = registry.seek("first");
3140
3041
  if (!ticket || ticket.isPaused) return void 0;
3141
- clearTimeout$1(ticket.id);
3042
+ clearTimeout(ticket.id);
3142
3043
  return registry.upsert(ticket.id, { isPaused: true });
3143
3044
  }
3144
3045
  function resume() {
@@ -3149,7 +3050,7 @@ function createQueue(_options = {}) {
3149
3050
  return updated;
3150
3051
  }
3151
3052
  function clear() {
3152
- for (const id of timeouts.keys()) clearTimeout$1(id);
3053
+ for (const id of timeouts.keys()) clearTimeout(id);
3153
3054
  registry.clear();
3154
3055
  }
3155
3056
  function dispose() {
@@ -3223,7 +3124,70 @@ function createQueueContext(_options = {}) {
3223
3124
  function useQueue(namespace = "v0:queue") {
3224
3125
  return useContext(namespace);
3225
3126
  }
3226
-
3127
+ //#endregion
3128
+ //#region src/composables/useRtl/adapters/v0.ts
3129
+ var Vuetify0RtlAdapter = class {
3130
+ setup(app, context, target) {
3131
+ if (IN_BROWSER) {
3132
+ if (/* @__PURE__ */ isNull(target)) return;
3133
+ const targetEl = target instanceof HTMLElement ? target : /* @__PURE__ */ isString(target) ? document.querySelector(target) : document.documentElement;
3134
+ if (!targetEl) return;
3135
+ targetEl.dir = context.isRtl.value ? "rtl" : "ltr";
3136
+ onScopeDispose(watch(context.isRtl, (value) => {
3137
+ targetEl.dir = value ? "rtl" : "ltr";
3138
+ }), true);
3139
+ } else {
3140
+ const head = app._context?.provides?.usehead ?? app._context?.provides?.head;
3141
+ if (head?.push) head.push({ htmlAttrs: { dir: context.isRtl.value ? "rtl" : "ltr" } });
3142
+ }
3143
+ }
3144
+ };
3145
+ //#endregion
3146
+ //#region src/composables/useRtl/index.ts
3147
+ /**
3148
+ * @module useRtl
3149
+ *
3150
+ * @remarks
3151
+ * RTL (right-to-left) direction composable with adapter pattern.
3152
+ *
3153
+ * Key features:
3154
+ * - Reactive boolean direction state
3155
+ * - Plugin trinity pattern (createRtlContext, createRtlPlugin, useRtl)
3156
+ * - Adapter pattern for DOM integration (dir attribute)
3157
+ * - Subtree overrides via context provision
3158
+ *
3159
+ * Independent from useLocale — Vuetify connects them via adapter.
3160
+ */
3161
+ /**
3162
+ * Creates a new RTL direction instance.
3163
+ *
3164
+ * @param options The options for the RTL instance.
3165
+ * @returns A new RTL context with reactive direction state.
3166
+ *
3167
+ * @see https://0.vuetifyjs.com/composables/plugins/use-rtl
3168
+ */
3169
+ function createRtl(options = {}) {
3170
+ const isRtl = shallowRef(options.default ?? false);
3171
+ function toggle() {
3172
+ isRtl.value = !isRtl.value;
3173
+ }
3174
+ return {
3175
+ isRtl,
3176
+ toggle
3177
+ };
3178
+ }
3179
+ function createRtlFallback() {
3180
+ return {
3181
+ isRtl: shallowRef(false),
3182
+ toggle: () => {}
3183
+ };
3184
+ }
3185
+ const [createRtlContext, createRtlPlugin, useRtl] = createPluginContext("v0:rtl", (options) => createRtl(options), {
3186
+ fallback: () => createRtlFallback(),
3187
+ setup: (context, app, { adapter = new Vuetify0RtlAdapter(), target }) => {
3188
+ adapter.setup(app, context, target);
3189
+ }
3190
+ });
3227
3191
  //#endregion
3228
3192
  //#region src/composables/createSlider/index.ts
3229
3193
  /**
@@ -3300,7 +3264,7 @@ function createSlider(options = {}) {
3300
3264
  events: true
3301
3265
  });
3302
3266
  const disabled = toRef(() => toValue(disabledProp));
3303
- const readonly$1 = toRef(() => toValue(readonlyProp));
3267
+ const readonly = toRef(() => toValue(readonlyProp));
3304
3268
  const orientation = toRef(() => toValue(orientationProp));
3305
3269
  const inverted = toRef(() => toValue(invertedProp));
3306
3270
  const extent = max - min;
@@ -3352,7 +3316,7 @@ function createSlider(options = {}) {
3352
3316
  }
3353
3317
  }
3354
3318
  function set(index, value) {
3355
- if (readonly$1.value) return;
3319
+ if (readonly.value) return;
3356
3320
  const snapped = snap(value);
3357
3321
  const current = values.value;
3358
3322
  let constrained = snapped;
@@ -3391,7 +3355,7 @@ function createSlider(options = {}) {
3391
3355
  minStepsBetweenThumbs,
3392
3356
  crossover,
3393
3357
  disabled,
3394
- readonly: readonly$1,
3358
+ readonly,
3395
3359
  orientation,
3396
3360
  inverted,
3397
3361
  register,
@@ -3408,7 +3372,6 @@ function createSlider(options = {}) {
3408
3372
  }
3409
3373
  };
3410
3374
  }
3411
-
3412
3375
  //#endregion
3413
3376
  //#region src/composables/useStack/index.ts
3414
3377
  /**
@@ -3459,9 +3422,9 @@ function createStack(_options = {}) {
3459
3422
  });
3460
3423
  const isActive = toRef(() => selection.selectedIds.size > 0);
3461
3424
  const top = toRef(() => {
3462
- const ids$1 = Array.from(selection.selectedIds);
3463
- if (ids$1.length === 0) return void 0;
3464
- return selection.get(ids$1.at(-1));
3425
+ const ids = Array.from(selection.selectedIds);
3426
+ if (ids.length === 0) return void 0;
3427
+ return selection.get(ids.at(-1));
3465
3428
  });
3466
3429
  const scrimZIndex = toRef(() => {
3467
3430
  const ticket = top.value;
@@ -3635,7 +3598,6 @@ function useStack(namespace = "v0:stack") {
3635
3598
  return fallback;
3636
3599
  }
3637
3600
  }
3638
-
3639
3601
  //#endregion
3640
3602
  //#region src/composables/createStep/index.ts
3641
3603
  /**
@@ -3836,7 +3798,6 @@ function createStepContext(_options = {}) {
3836
3798
  function useStep(namespace = "v0:step") {
3837
3799
  return useContext(namespace);
3838
3800
  }
3839
-
3840
3801
  //#endregion
3841
3802
  //#region src/composables/useStorage/index.ts
3842
3803
  /**
@@ -3894,7 +3855,7 @@ function createStorage(options = {}) {
3894
3855
  if (!raw) return void 0;
3895
3856
  try {
3896
3857
  const parsed = serializer.read(raw);
3897
- if (ttl && parsed && typeof parsed === "object" && "__ttl" in parsed && "__v" in parsed) {
3858
+ if (ttl && /* @__PURE__ */ isObject(parsed) && "__ttl" in parsed && "__v" in parsed) {
3898
3859
  if (Date.now() - parsed.__t > ttl) {
3899
3860
  adapter?.removeItem(prefixedKey);
3900
3861
  return;
@@ -3959,7 +3920,7 @@ function createStorage(options = {}) {
3959
3920
  const valueRef = cache.get(e.key);
3960
3921
  if (!valueRef) return;
3961
3922
  watchers.get(e.key)?.();
3962
- valueRef.value = e.newValue == null ? void 0 : readStored(e.key);
3923
+ valueRef.value = /* @__PURE__ */ isNullOrUndefined(e.newValue) ? void 0 : readStored(e.key);
3963
3924
  const stop = watch(valueRef, (newValue) => {
3964
3925
  if (/* @__PURE__ */ isNullOrUndefined(newValue)) adapter?.removeItem(e.key);
3965
3926
  else writeStored(e.key, newValue);
@@ -3978,7 +3939,6 @@ function createStorageFallback() {
3978
3939
  return createStorage({ adapter: new MemoryAdapter() });
3979
3940
  }
3980
3941
  const [createStorageContext, createStoragePlugin, useStorage] = createPluginContext("v0:storage", (options) => createStorage(options), { fallback: () => createStorageFallback() });
3981
-
3982
3942
  //#endregion
3983
3943
  //#region src/composables/createTimeline/index.ts
3984
3944
  /**
@@ -4127,7 +4087,159 @@ function createTimelineContext(_options = {}) {
4127
4087
  function useTimeline(namespace = "v0:timeline") {
4128
4088
  return useContext(namespace);
4129
4089
  }
4130
-
4090
+ //#endregion
4091
+ //#region src/composables/createValidation/index.ts
4092
+ /**
4093
+ * @module createValidation
4094
+ *
4095
+ * @remarks
4096
+ * Per-field validation lifecycle composable.
4097
+ *
4098
+ * Key features:
4099
+ * - Auto-register with parent form via useForm() injection
4100
+ * - Async rule support with generation-based race safety
4101
+ * - Silent validation mode
4102
+ * - Tri-state isValid (null/true/false)
4103
+ * - isPristine tracking
4104
+ *
4105
+ * Uses useRules() to resolve alias strings via shared context.
4106
+ */
4107
+ /**
4108
+ * Resolves raw rule inputs to FormValidationRule[].
4109
+ * Uses the provided RulesContext if available, otherwise handles
4110
+ * functions and Standard Schema objects directly.
4111
+ */
4112
+ function resolveRules(raw, context) {
4113
+ if (context) return context.resolve(raw);
4114
+ return raw.filter((r) => /* @__PURE__ */ isFunction(r) || isStandardSchema(r)).map((r) => isStandardSchema(r) ? toRule(r) : r);
4115
+ }
4116
+ /**
4117
+ * Creates a new validation instance.
4118
+ *
4119
+ * @param options The options for the validation instance.
4120
+ * @returns A new validation context with register(), aggregate state, etc.
4121
+ *
4122
+ * @see https://0.vuetifyjs.com/composables/forms/create-validation
4123
+ *
4124
+ * @example
4125
+ * ```ts
4126
+ * import { createValidation } from '@vuetify/v0'
4127
+ *
4128
+ * const validation = createValidation()
4129
+ *
4130
+ * const field = validation.register({
4131
+ * id: 'email',
4132
+ * value: '',
4133
+ * rules: [(v) => !!v || 'Required'],
4134
+ * })
4135
+ *
4136
+ * await field.validate()
4137
+ *
4138
+ * console.log(field.errors.value) // ['Required']
4139
+ *
4140
+ * field.reset()
4141
+ * ```
4142
+ */
4143
+ function createValidation(options = {}) {
4144
+ const registry = createRegistry(options);
4145
+ const rules = useRules();
4146
+ const isValidating = computed(() => {
4147
+ for (const ticket of registry.values()) if (ticket.isValidating.value) return true;
4148
+ return false;
4149
+ });
4150
+ const isValid = computed(() => {
4151
+ let hasNull = false;
4152
+ let hasFields = false;
4153
+ for (const ticket of registry.values()) {
4154
+ hasFields = true;
4155
+ if (ticket.isValid.value === false) return false;
4156
+ if (/* @__PURE__ */ isNull(ticket.isValid.value)) hasNull = true;
4157
+ }
4158
+ if (!hasFields) return null;
4159
+ return hasNull ? null : true;
4160
+ });
4161
+ function register(registration = {}) {
4162
+ const model = shallowRef(/* @__PURE__ */ isNullOrUndefined(registration.value) ? "" : toValue(registration.value));
4163
+ const resolved = resolveRules(registration.rules || [], rules);
4164
+ const errors = shallowRef([]);
4165
+ const isFieldValidating = shallowRef(false);
4166
+ const initialValue = model.value;
4167
+ const isPristine = shallowRef(true);
4168
+ const isFieldValid = shallowRef(null);
4169
+ function reset() {
4170
+ model.value = initialValue;
4171
+ errors.value = [];
4172
+ isPristine.value = true;
4173
+ isFieldValid.value = null;
4174
+ isFieldValidating.value = false;
4175
+ validationGeneration++;
4176
+ }
4177
+ let validationGeneration = 0;
4178
+ async function validate(silent = false) {
4179
+ if (resolved.length === 0) return isFieldValid.value = true;
4180
+ const generation = ++validationGeneration;
4181
+ isFieldValidating.value = true;
4182
+ try {
4183
+ const results = await Promise.all(resolved.map((rule) => rule(model.value)));
4184
+ if (generation !== validationGeneration) return isFieldValid.value ?? false;
4185
+ const errorMessages = results.filter((result) => /* @__PURE__ */ isString(result) || result === false).map((result) => result === false ? "Validation failed" : result);
4186
+ if (!silent) {
4187
+ errors.value = errorMessages;
4188
+ isFieldValid.value = errorMessages.length === 0;
4189
+ isPristine.value = model.value === initialValue;
4190
+ }
4191
+ return errorMessages.length === 0;
4192
+ } finally {
4193
+ if (generation === validationGeneration) isFieldValidating.value = false;
4194
+ }
4195
+ }
4196
+ const item = {
4197
+ ...registration,
4198
+ rules: resolved,
4199
+ errors,
4200
+ disabled: registration.disabled || false,
4201
+ isValidating: isFieldValidating,
4202
+ isPristine,
4203
+ isValid: isFieldValid,
4204
+ reset,
4205
+ validate
4206
+ };
4207
+ const ticket = registry.register(item);
4208
+ Object.defineProperty(ticket, "value", {
4209
+ get() {
4210
+ return model.value;
4211
+ },
4212
+ set(val) {
4213
+ model.value = val;
4214
+ isPristine.value = val === initialValue;
4215
+ isFieldValid.value = null;
4216
+ },
4217
+ enumerable: true,
4218
+ configurable: true
4219
+ });
4220
+ return ticket;
4221
+ }
4222
+ function onboard(registrations) {
4223
+ return registry.batch(() => registrations.map((r) => register(r)));
4224
+ }
4225
+ const context = {
4226
+ ...registry,
4227
+ register,
4228
+ onboard,
4229
+ isValid,
4230
+ isValidating,
4231
+ get size() {
4232
+ return registry.size;
4233
+ }
4234
+ };
4235
+ const form = useForm();
4236
+ const ticket = form?.register({ value: context });
4237
+ onScopeDispose(() => {
4238
+ if (!ticket || !form) return;
4239
+ form.unregister(ticket.id);
4240
+ }, true);
4241
+ return context;
4242
+ }
4131
4243
  //#endregion
4132
4244
  //#region src/composables/useToggleScope/index.ts
4133
4245
  /**
@@ -4224,7 +4336,6 @@ function useToggleScope(source, fn) {
4224
4336
  onScopeDispose(stop, true);
4225
4337
  return controls;
4226
4338
  }
4227
-
4228
4339
  //#endregion
4229
4340
  //#region src/composables/createVirtual/index.ts
4230
4341
  /**
@@ -4368,10 +4479,10 @@ function createVirtual(items, _options = {}) {
4368
4479
  function rebuild() {
4369
4480
  const length = items.value.length;
4370
4481
  const newOffsets = offsets.value.length === length ? offsets.value : Array.from({ length });
4371
- let offset$1 = 0;
4482
+ let offset = 0;
4372
4483
  for (let i = 0; i < length; i++) {
4373
- newOffsets[i] = offset$1;
4374
- offset$1 += heights.value[i] || itemHeight.value;
4484
+ newOffsets[i] = offset;
4485
+ offset += heights.value[i] || itemHeight.value;
4375
4486
  }
4376
4487
  if (offsets.value !== newOffsets) offsets.value = newOffsets;
4377
4488
  update();
@@ -4425,10 +4536,10 @@ function createVirtual(items, _options = {}) {
4425
4536
  }
4426
4537
  /* v8 ignore stop */
4427
4538
  }
4428
- function resize(index, height$1) {
4429
- if (heights.value[index] === height$1) return;
4430
- heights.value[index] = height$1;
4431
- if (!itemHeight.value) itemHeight.value = height$1;
4539
+ function resize(index, height) {
4540
+ if (heights.value[index] === height) return;
4541
+ heights.value[index] = height;
4542
+ if (!itemHeight.value) itemHeight.value = height;
4432
4543
  if (IN_BROWSER) {
4433
4544
  cancelAnimationFrame(rebuildRaf);
4434
4545
  rebuildRaf = requestAnimationFrame(rebuild);
@@ -4572,7 +4683,6 @@ function createVirtualContext(items, _options = {}) {
4572
4683
  function useVirtual(namespace = "v0:virtual") {
4573
4684
  return useContext(namespace);
4574
4685
  }
4575
-
4576
4686
  //#endregion
4577
4687
  //#region src/composables/useEventListener/index.ts
4578
4688
  /**
@@ -4607,9 +4717,9 @@ function useEventListener(target, event, listener, options) {
4607
4717
  for (const fn of cleanups) fn();
4608
4718
  cleanups.length = 0;
4609
4719
  }
4610
- function register(el, event$1, listener$1, options$1) {
4611
- el.addEventListener(event$1, listener$1, options$1);
4612
- return () => el.removeEventListener(event$1, listener$1, options$1);
4720
+ function register(el, event, listener, options) {
4721
+ el.addEventListener(event, listener, options);
4722
+ return () => el.removeEventListener(event, listener, options);
4613
4723
  }
4614
4724
  const stopWatcher = watch(() => [
4615
4725
  toValue(target),
@@ -4621,7 +4731,7 @@ function useEventListener(target, event, listener, options) {
4621
4731
  if (!el) return;
4622
4732
  const eventList = toArray(events);
4623
4733
  const listenerList = toArray(listeners);
4624
- for (const event$1 of eventList) for (const listenerFn of listenerList) cleanups.push(register(el, event$1, listenerFn, opts));
4734
+ for (const event of eventList) for (const listenerFn of listenerList) cleanups.push(register(el, event, listenerFn, opts));
4625
4735
  }, {
4626
4736
  immediate: true,
4627
4737
  flush: "post"
@@ -4661,7 +4771,6 @@ function useWindowEventListener(event, listener, options) {
4661
4771
  function useDocumentEventListener(event, listener, options) {
4662
4772
  return IN_BROWSER ? useEventListener(document, event, listener, options) : () => {};
4663
4773
  }
4664
-
4665
4774
  //#endregion
4666
4775
  //#region src/composables/useClickOutside/index.ts
4667
4776
  /**
@@ -4919,6 +5028,5 @@ function useClickOutside(target, handler, options = {}) {
4919
5028
  stop
4920
5029
  };
4921
5030
  }
4922
-
4923
5031
  //#endregion
4924
- export { useProxyModel as $, multipleOpenStrategy as A, useHotkey as B, createSlider as C, createNested as D, useQueue as E, usePrefersDark as F, createDateContext as G, createFormContext as H, usePrefersReducedMotion as I, createBreakpoints as J, createDatePlugin as K, useLazy as L, useMutationObserver as M, useMediaQuery as N, createNestedContext as O, usePrefersContrast as P, toReactive as Q, useElementIntersection as R, useStack as S, createQueueContext as T, useForm as U, createForm as V, createDate as W, createBreakpointsPlugin as X, createBreakpointsContext as Y, useBreakpoints as Z, createStepContext as _, createVirtual as a, toElement as at, createStackContext as b, useToggleScope as c, createHydrationContext as ct, useTimeline as d, createBreadcrumbs as dt, createOverflow as et, createStorage as f, createBreadcrumbsContext as ft, createStep as g, useStorage as h, useWindowEventListener as i, useResizeObserver as it, singleOpenStrategy as j, useNested as k, createTimeline as l, createHydrationPlugin as lt, createStoragePlugin as m, useDocumentEventListener as n, useOverflow as nt, createVirtualContext as o, createFallbackHydration as ot, createStorageContext as p, useBreadcrumbs as pt, useDate as q, useEventListener as r, useElementSize as rt, useVirtual as s, createHydration as st, useClickOutside as t, createOverflowContext as tt, createTimelineContext as u, useHydration as ut, useStep as v, createQueue as w, createStackPlugin as x, createStack as y, useIntersectionObserver as z };
5032
+ export { createDatePlugin as $, Vuetify0RtlAdapter as A, useMediaQuery as B, useStack as C, createRtlFallback as D, createRtlContext as E, createNestedContext as F, useElementIntersection as G, usePrefersDark as H, useNested as I, createForm as J, useIntersectionObserver as K, multipleOpenStrategy as L, createQueueContext as M, useQueue as N, createRtlPlugin as O, createNested as P, createDateContext as Q, singleOpenStrategy as R, createStackPlugin as S, createRtl as T, usePrefersReducedMotion as U, usePrefersContrast as V, useLazy as W, useForm as X, createFormContext as Y, createDate as Z, createStep as _, useHydration as _t, createVirtual as a, toReactive as at, createStack as b, useBreadcrumbs as bt, useToggleScope as c, createOverflowContext as ct, createTimelineContext as d, useResizeObserver as dt, useDate as et, useTimeline as f, toElement as ft, useStorage as g, createHydrationPlugin as gt, createStoragePlugin as h, createHydrationContext as ht, useWindowEventListener as i, useBreakpoints as it, createQueue as j, useRtl as k, createValidation as l, useOverflow as lt, createStorageContext as m, createHydration as mt, useDocumentEventListener as n, createBreakpointsContext as nt, createVirtualContext as o, useProxyModel as ot, createStorage as p, createFallbackHydration as pt, useHotkey as q, useEventListener as r, createBreakpointsPlugin as rt, useVirtual as s, createOverflow as st, useClickOutside as t, createBreakpoints as tt, createTimeline as u, useElementSize as ut, createStepContext as v, createBreadcrumbs as vt, createSlider as w, createStackContext as x, useStep as y, createBreadcrumbsContext as yt, useMutationObserver as z };