@vuetify/v0 1.0.0-beta.3 → 1.0.0-beta.4

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 (101) hide show
  1. package/README.md +1 -1
  2. package/dist/{adapter-D2ABPTpo.d.mts → adapter-BI-oyZCe.d.mts} +3 -2
  3. package/dist/{adapter-CQoi3rdC.d.mts → adapter-Butx_2UU.d.mts} +1 -1
  4. package/dist/{adapter-Cj7vxEdB.mjs → adapter-CJY6aQIS.mjs} +5 -1
  5. package/dist/browser/index.d.ts +25318 -0
  6. package/dist/browser/index.js +266 -161
  7. package/dist/components/index.d.mts +1 -1
  8. package/dist/components/index.mjs +1 -1
  9. package/dist/{components-Df1uIUcB.mjs → components-CQ570531.mjs} +114 -73
  10. package/dist/composables/index.d.mts +7 -7
  11. package/dist/composables/index.mjs +22 -22
  12. package/dist/{composables-C7MhsS5q.mjs → composables-Dp_S74ft.mjs} +11 -11
  13. package/dist/constants/index.mjs +1 -1
  14. package/dist/{createDataTable-DfggVqO1.mjs → createDataTable-xLtNGdr7.mjs} +3 -3
  15. package/dist/{createGroup-vfCXVfYV.mjs → createGroup-CBsJPLpN.mjs} +1 -1
  16. package/dist/{createRegistry-Ve2QNpZv.mjs → createRegistry-CRsG7t_g.mjs} +2 -2
  17. package/dist/{createSelection-CT2UG109.mjs → createSelection-DuaoHPSc.mjs} +8 -3
  18. package/dist/{createSingle-DTI4qvUd.mjs → createSingle-CiKU87Hj.mjs} +1 -1
  19. package/dist/{createTokens-C5bl_n6G.mjs → createTokens-4BZfgv9F.mjs} +6 -6
  20. package/dist/data-table/index.d.mts +1 -1
  21. package/dist/data-table/index.mjs +1 -1
  22. package/dist/date/index.mjs +1 -1
  23. package/dist/features/adapters/flagsmith/index.d.mts +1 -1
  24. package/dist/features/adapters/launchdarkly/index.d.mts +1 -1
  25. package/dist/features/adapters/posthog/index.d.mts +1 -1
  26. package/dist/features/adapters/posthog/index.mjs +1 -1
  27. package/dist/features/index.d.mts +2 -2
  28. package/dist/features/index.mjs +1 -1
  29. package/dist/{flagsmith-CXzNBqm3.d.mts → flagsmith-DA2GCyGv.d.mts} +1 -1
  30. package/dist/{globals-D78-6Zqq.mjs → globals-B0pQgO4u.mjs} +1 -1
  31. package/dist/{index-LMiCHwZl.d.mts → index-BBJnOUyA.d.mts} +2 -1
  32. package/dist/{index-Caq7DXRO.d.mts → index-BkTaCktP.d.mts} +7 -7
  33. package/dist/{index-B5OhvOR2.d.mts → index-CV7bOS7B.d.mts} +71 -14
  34. package/dist/{index-Bmz8PZMY.d.mts → index-CfHm03dg.d.mts} +1 -1
  35. package/dist/{index-B9YmdGZ3.d.mts → index-CyNk9FpR.d.mts} +3 -0
  36. package/dist/{index-DRrHHgE7.d.mts → index-DgPFPx_7.d.mts} +2 -2
  37. package/dist/{index-rJ_lhMYJ.d.mts → index-pM8UX1XI.d.mts} +2 -2
  38. package/dist/index.d.mts +10 -10
  39. package/dist/index.mjs +24 -24
  40. package/dist/json/attributes.json +4 -4
  41. package/dist/json/web-types.json +6 -6
  42. package/dist/{launchdarkly-DvhloBts.d.mts → launchdarkly-Bp8p9PMD.d.mts} +1 -1
  43. package/dist/locale/adapters/index.d.mts +2 -2
  44. package/dist/locale/adapters/index.mjs +1 -1
  45. package/dist/locale/adapters/v0/index.d.mts +1 -1
  46. package/dist/locale/adapters/v0/index.mjs +1 -1
  47. package/dist/locale/adapters/vue-i18n/index.d.mts +2 -1
  48. package/dist/locale/adapters/vue-i18n/index.mjs +3 -0
  49. package/dist/locale/index.d.mts +3 -3
  50. package/dist/locale/index.mjs +2 -2
  51. package/dist/locale/messages/en/index.d.mts +70 -0
  52. package/dist/locale/messages/en/index.mjs +56 -0
  53. package/dist/logger/adapters/index.mjs +1 -1
  54. package/dist/logger/adapters/v0/index.mjs +1 -1
  55. package/dist/logger/index.d.mts +1 -1
  56. package/dist/logger/index.mjs +2 -2
  57. package/dist/notifications/index.d.mts +1 -1
  58. package/dist/notifications/index.mjs +2 -2
  59. package/dist/palettes/ant/index.d.mts +1 -1
  60. package/dist/palettes/index.d.mts +3 -3
  61. package/dist/palettes/material/index.d.mts +1 -1
  62. package/dist/palettes/md1/index.d.mts +1 -1
  63. package/dist/palettes/md2/index.d.mts +1 -1
  64. package/dist/palettes/radix/index.d.mts +1 -1
  65. package/dist/palettes/tailwind/index.d.mts +1 -1
  66. package/dist/permissions/adapters/index.d.mts +1 -1
  67. package/dist/permissions/adapters/v0/index.d.mts +1 -1
  68. package/dist/permissions/index.d.mts +1 -1
  69. package/dist/permissions/index.mjs +1 -1
  70. package/dist/{posthog-BOT5W7Ds.d.mts → posthog-sFqk0bGy.d.mts} +1 -1
  71. package/dist/rules/index.d.mts +1 -1
  72. package/dist/rules/index.mjs +1 -1
  73. package/dist/storage/index.d.mts +1 -1
  74. package/dist/storage/index.mjs +1 -1
  75. package/dist/theme/adapters/index.d.mts +1 -1
  76. package/dist/theme/adapters/index.mjs +3 -3
  77. package/dist/theme/adapters/unhead/index.d.mts +1 -1
  78. package/dist/theme/adapters/unhead/index.mjs +1 -1
  79. package/dist/theme/adapters/v0/index.d.mts +1 -1
  80. package/dist/theme/adapters/v0/index.mjs +1 -1
  81. package/dist/theme/index.d.mts +1 -1
  82. package/dist/theme/index.mjs +4 -4
  83. package/dist/types/index.d.mts +1 -1
  84. package/dist/{unhead-t2_gsao2.mjs → unhead-Bn7eatWe.mjs} +10 -5
  85. package/dist/{useEventListener-BuETafFi.mjs → useEventListener-D1ETqQMm.mjs} +1 -1
  86. package/dist/{useFeatures-DyNG1_ge.mjs → useFeatures-D3DFBsYY.mjs} +3 -3
  87. package/dist/{useLocale-CYq4yT7b.mjs → useLocale-B44zLhFE.mjs} +9 -4
  88. package/dist/{useLogger-BEG9pAe8.mjs → useLogger-D7Fqcp_l.mjs} +2 -2
  89. package/dist/{useNotifications-BrZooK2S.mjs → useNotifications-DMHmr9C1.mjs} +4 -4
  90. package/dist/{usePermissions-BvaZwUe8.mjs → usePermissions-S0As54sf.mjs} +2 -2
  91. package/dist/{useRovingFocus-4F5-mWO7.mjs → useRovingFocus-u7uhPx2H.mjs} +106 -81
  92. package/dist/{useRules-B3vAa7tc.mjs → useRules-ByuxbMsA.mjs} +2 -2
  93. package/dist/{useStorage-lqTLed0e.mjs → useStorage-Fy5tWYkG.mjs} +3 -3
  94. package/dist/{useTheme-BGmROwu-.mjs → useTheme-DrR7HoLL.mjs} +4 -4
  95. package/dist/utilities/index.d.mts +1 -1
  96. package/dist/utilities/index.mjs +4 -3
  97. package/dist/{v0-4a_MJXIm.mjs → v0-BDdBMbzN.mjs} +1 -1
  98. package/dist/{v0-UJs1EiJ7.mjs → v0-BXjZknUK.mjs} +18 -5
  99. package/dist/{v0-D7NA38Vu.d.mts → v0-Cf5DZ4lw.d.mts} +3 -1
  100. package/dist/{v0-B08xQqj6.mjs → v0-DwKPTLJv.mjs} +16 -10
  101. package/package.json +4 -4
@@ -1,16 +1,16 @@
1
- import { a as SUPPORTS_OBSERVER, n as SUPPORTS_INTERSECTION_OBSERVER, t as IN_BROWSER } from "./globals-D78-6Zqq.mjs";
1
+ import { a as SUPPORTS_OBSERVER, n as SUPPORTS_INTERSECTION_OBSERVER, t as IN_BROWSER } from "./globals-B0pQgO4u.mjs";
2
2
  import { clamp, instanceExists, isArray, isElement, isFunction, isNull, isNullOrUndefined, isObject, isString, isUndefined, range, resolveIds, resolveIndexes, useId as useId$1 } from "./utilities/index.mjs";
3
3
  import { i as useContext, t as createTrinity } from "./createTrinity-z-3q9QWR.mjs";
4
- import { a as createPlugin, i as useLogger, o as createPluginContext } from "./useLogger-BEG9pAe8.mjs";
5
- import { t as createRegistry } from "./createRegistry-Ve2QNpZv.mjs";
6
- import { i as createModel, t as createSelection } from "./createSelection-CT2UG109.mjs";
7
- import { t as createSingle } from "./createSingle-DTI4qvUd.mjs";
4
+ import { a as createPlugin, i as useLogger, o as createPluginContext } from "./useLogger-D7Fqcp_l.mjs";
5
+ import { t as createRegistry } from "./createRegistry-CRsG7t_g.mjs";
6
+ import { i as createModel, t as createSelection } from "./createSelection-DuaoHPSc.mjs";
7
+ import { t as createSingle } from "./createSingle-CiKU87Hj.mjs";
8
8
  import { t as toArray } from "./toArray-C89ZaEuF.mjs";
9
- import { n as useEventListener, r as useWindowEventListener, t as useDocumentEventListener } from "./useEventListener-BuETafFi.mjs";
10
- import { t as createGroup } from "./createGroup-vfCXVfYV.mjs";
11
- import { c as useTimer } from "./useNotifications-BrZooK2S.mjs";
9
+ import { n as useEventListener, r as useWindowEventListener, t as useDocumentEventListener } from "./useEventListener-D1ETqQMm.mjs";
10
+ import { t as createGroup } from "./createGroup-CBsJPLpN.mjs";
11
+ import { c as useTimer } from "./useNotifications-DMHmr9C1.mjs";
12
12
  import { i as createFilter } from "./createPagination-B5dfqY-a.mjs";
13
- import { a as useRules, o as isStandardSchema } from "./useRules-B3vAa7tc.mjs";
13
+ import { a as useRules, o as isStandardSchema } from "./useRules-ByuxbMsA.mjs";
14
14
  import { computed, effectScope, hasInjectionContext, isReadonly, isRef, nextTick, onMounted, onScopeDispose, ref, shallowReactive, shallowReadonly, shallowRef, toRef, toValue, watch } from "vue";
15
15
  //#region src/composables/useClickOutside/index.ts
16
16
  /**
@@ -192,6 +192,19 @@ function useClickOutside(target, handler, options = {}) {
192
192
  });
193
193
  }
194
194
  /**
195
+ * Check if the event target is a strict descendant of any target element.
196
+ *
197
+ * @remarks Used by bounds mode so content rendered *inside* the element but
198
+ * positioned outside its box (e.g. a top-layer overlay teleported into a
199
+ * native `<dialog>`) is not treated as an outside click. A backdrop click has
200
+ * `target === el`, so it is not a strict descendant and still counts as outside.
201
+ */
202
+ function isDescendant(eventTarget) {
203
+ /* v8 ignore next -- defensive guard, callers always pass an Element */
204
+ if (!(eventTarget instanceof Node)) return false;
205
+ return getTargets().some((el) => el !== eventTarget && el.contains(eventTarget));
206
+ }
207
+ /**
195
208
  * Validate that the target is still in the DOM.
196
209
  */
197
210
  function isValidTarget(eventTarget) {
@@ -231,7 +244,7 @@ function useClickOutside(target, handler, options = {}) {
231
244
  const dy = Math.abs(event.clientY - startPosition.y);
232
245
  if (dx >= touchScrollThreshold || dy >= touchScrollThreshold) return;
233
246
  }
234
- if ((bounds ? startedOutsideBounds && isOutsideBounds(event.clientX, event.clientY) : isOutside(pointerdownTarget) && isOutside(pointerupTarget)) && !shouldIgnore(path)) handler(event);
247
+ if ((bounds ? startedOutsideBounds && isOutsideBounds(event.clientX, event.clientY) && !isDescendant(pointerdownTarget) && !isDescendant(pointerupTarget) : isOutside(pointerdownTarget) && isOutside(pointerupTarget)) && !shouldIgnore(path)) handler(event);
235
248
  }
236
249
  /**
237
250
  * Handle window blur - detect focus moving to iframe.
@@ -288,6 +301,63 @@ function useClickOutside(target, handler, options = {}) {
288
301
  };
289
302
  }
290
303
  //#endregion
304
+ //#region src/composables/toElement/index.ts
305
+ /**
306
+ * @module toElement
307
+ *
308
+ * @see https://0.vuetifyjs.com/composables/transformers/to-element
309
+ *
310
+ * @remarks
311
+ * Resolves various element reference types to a DOM Element.
312
+ *
313
+ * Accepts refs, getters, raw DOM elements, or Vue component instances
314
+ * and normalizes them to a plain Element. Uses structural typing to
315
+ * avoid cross-version Vue Ref incompatibilities.
316
+ *
317
+ * @example
318
+ * ```ts
319
+ * import { shallowRef } from 'vue'
320
+ * import { toElement } from '@vuetify/v0'
321
+ *
322
+ * const el = shallowRef<HTMLElement | null>(null)
323
+ * const resolved = toElement(el) // HTMLElement | undefined
324
+ * ```
325
+ */
326
+ /**
327
+ * Resolves a {@link MaybeElementRef} to a DOM Element or undefined.
328
+ *
329
+ * Handles:
330
+ * - `Ref<Element>`, `ShallowRef<HTMLElement>`, getter functions
331
+ * - Vue component instances (extracts `$el`)
332
+ * - Raw DOM elements (pass-through)
333
+ * - null/undefined (returns undefined)
334
+ *
335
+ * @param target The element ref, getter, or raw value to resolve
336
+ * @returns The resolved DOM Element, or undefined if not available
337
+ *
338
+ * @see https://0.vuetifyjs.com/composables/transformers/to-element
339
+ *
340
+ * @example
341
+ * ```ts
342
+ * import { toElement } from '@vuetify/v0'
343
+ *
344
+ * const el = shallowRef<HTMLElement | null>(null)
345
+ * toElement(el) // HTMLElement | undefined
346
+ *
347
+ * const component = ref<ComponentPublicInstance>()
348
+ * toElement(component) // Element | undefined (from $el)
349
+ * ```
350
+ */
351
+ /* @__NO_SIDE_EFFECTS__ */
352
+ function toElement(target) {
353
+ if (!target) return void 0;
354
+ if (/* @__PURE__ */ isElement(target)) return target;
355
+ const raw = /* @__PURE__ */ isFunction(target) ? target() : /* @__PURE__ */ isObject(target) && "value" in target ? target.value : target;
356
+ if (!raw) return void 0;
357
+ if (/* @__PURE__ */ isElement(raw)) return raw;
358
+ if (/* @__PURE__ */ isObject(raw) && "$el" in raw) return raw.$el;
359
+ }
360
+ //#endregion
291
361
  //#region src/composables/useStack/index.ts
292
362
  /**
293
363
  * @module useStack
@@ -345,7 +415,7 @@ function createStack(_options = {}) {
345
415
  multiple: true
346
416
  });
347
417
  function selectedScrims() {
348
- return Array.from(selection.selectedIds).map((id) => selection.get(id)).filter((ticket) => !!ticket && ticket.scrim !== false);
418
+ return Array.from(selection.selectedIds).map((id) => selection.get(id)).filter((ticket) => !!ticket && ticket.scrim.value !== false);
349
419
  }
350
420
  const isActive = toRef(() => selectedScrims().length > 0);
351
421
  const top = toRef(() => selectedScrims().at(-1));
@@ -353,14 +423,22 @@ function createStack(_options = {}) {
353
423
  const ticket = top.value;
354
424
  return ticket ? ticket.zIndex.value - 1 : 0;
355
425
  });
356
- const isBlocking = toRef(() => top.value?.blocking ?? false);
426
+ const isBlocking = toRef(() => toValue(top.value?.blocking) ?? false);
427
+ const topElement = toRef(() => {
428
+ const scrims = selectedScrims();
429
+ for (let i = scrims.length - 1; i >= 0; i--) {
430
+ const el = /* @__PURE__ */ toElement(toValue(scrims[i].el));
431
+ if (el) return el;
432
+ }
433
+ return null;
434
+ });
357
435
  function ids() {
358
436
  return Array.from(selection.selectedIds);
359
437
  }
360
438
  function register(input = {}) {
361
439
  const id = input.id ?? /* @__PURE__ */ useId$1();
362
- const blocking = input.blocking ?? false;
363
- const scrim = input.scrim ?? true;
440
+ const blocking = toRef(() => toValue(input.blocking) ?? false);
441
+ const scrim = toRef(() => toValue(input.scrim) ?? true);
364
442
  const onDismiss = input.onDismiss;
365
443
  const zIndex = toRef(() => {
366
444
  const position = ids().indexOf(id);
@@ -373,18 +451,18 @@ function createStack(_options = {}) {
373
451
  return list.at(-1) === id;
374
452
  });
375
453
  function dismiss() {
376
- if (blocking) return;
454
+ if (blocking.value) return;
377
455
  onDismiss?.();
378
456
  selection.unselect(id);
379
457
  }
380
458
  const ticket = selection.register({
459
+ ...input,
381
460
  blocking,
382
461
  scrim,
383
462
  onDismiss,
384
463
  zIndex,
385
464
  globalTop,
386
465
  dismiss,
387
- ...input,
388
466
  id
389
467
  });
390
468
  if (/* @__PURE__ */ instanceExists()) onScopeDispose(() => {
@@ -399,6 +477,7 @@ function createStack(_options = {}) {
399
477
  top,
400
478
  scrimZIndex,
401
479
  isBlocking,
480
+ topElement,
402
481
  get size() {
403
482
  return selection.size;
404
483
  }
@@ -465,6 +544,7 @@ function createStackPlugin(_options = {}) {
465
544
  }
466
545
  let fallbackStack;
467
546
  function getStackFallback() {
547
+ if (!IN_BROWSER) return createStack();
468
548
  if (!fallbackStack) fallbackStack = createStack();
469
549
  return fallbackStack;
470
550
  }
@@ -731,63 +811,6 @@ const [createHydrationContext, createHydrationPlugin, useHydration] = createPlug
731
811
  }
732
812
  });
733
813
  //#endregion
734
- //#region src/composables/toElement/index.ts
735
- /**
736
- * @module toElement
737
- *
738
- * @see https://0.vuetifyjs.com/composables/transformers/to-element
739
- *
740
- * @remarks
741
- * Resolves various element reference types to a DOM Element.
742
- *
743
- * Accepts refs, getters, raw DOM elements, or Vue component instances
744
- * and normalizes them to a plain Element. Uses structural typing to
745
- * avoid cross-version Vue Ref incompatibilities.
746
- *
747
- * @example
748
- * ```ts
749
- * import { shallowRef } from 'vue'
750
- * import { toElement } from '@vuetify/v0'
751
- *
752
- * const el = shallowRef<HTMLElement | null>(null)
753
- * const resolved = toElement(el) // HTMLElement | undefined
754
- * ```
755
- */
756
- /**
757
- * Resolves a {@link MaybeElementRef} to a DOM Element or undefined.
758
- *
759
- * Handles:
760
- * - `Ref<Element>`, `ShallowRef<HTMLElement>`, getter functions
761
- * - Vue component instances (extracts `$el`)
762
- * - Raw DOM elements (pass-through)
763
- * - null/undefined (returns undefined)
764
- *
765
- * @param target The element ref, getter, or raw value to resolve
766
- * @returns The resolved DOM Element, or undefined if not available
767
- *
768
- * @see https://0.vuetifyjs.com/composables/transformers/to-element
769
- *
770
- * @example
771
- * ```ts
772
- * import { toElement } from '@vuetify/v0'
773
- *
774
- * const el = shallowRef<HTMLElement | null>(null)
775
- * toElement(el) // HTMLElement | undefined
776
- *
777
- * const component = ref<ComponentPublicInstance>()
778
- * toElement(component) // Element | undefined (from $el)
779
- * ```
780
- */
781
- /* @__NO_SIDE_EFFECTS__ */
782
- function toElement(target) {
783
- if (!target) return void 0;
784
- if (/* @__PURE__ */ isElement(target)) return target;
785
- const raw = /* @__PURE__ */ isFunction(target) ? target() : /* @__PURE__ */ isObject(target) && "value" in target ? target.value : target;
786
- if (!raw) return void 0;
787
- if (/* @__PURE__ */ isElement(raw)) return raw;
788
- if (/* @__PURE__ */ isObject(raw) && "$el" in raw) return raw.$el;
789
- }
790
- //#endregion
791
814
  //#region src/composables/createObserver/index.ts
792
815
  /**
793
816
  * @module createObserver
@@ -1991,6 +2014,7 @@ function useDelay(callback, options = {}) {
1991
2014
  function usePopover(options = {}) {
1992
2015
  const { id: _id, positionArea = "bottom", positionTry = "most-width bottom", openDelay, closeDelay } = options;
1993
2016
  const id = _id ?? /* @__PURE__ */ useId$1();
2017
+ const anchor = `--${String(id).replace(/[^a-zA-Z0-9_-]/g, "")}`;
1994
2018
  const isOpen = options.isOpen ?? shallowRef(false);
1995
2019
  const delay = useDelay((direction) => {
1996
2020
  isOpen.value = direction;
@@ -2011,7 +2035,7 @@ function usePopover(options = {}) {
2011
2035
  function cancel() {
2012
2036
  delay.stop();
2013
2037
  }
2014
- const anchorStyles = toRef(() => ({ anchorName: `--${id}` }));
2038
+ const anchorStyles = toRef(() => ({ anchorName: anchor }));
2015
2039
  const contentAttrs = toRef(() => ({
2016
2040
  id,
2017
2041
  popover: ""
@@ -2021,7 +2045,7 @@ function usePopover(options = {}) {
2021
2045
  "margin": "unset",
2022
2046
  "inset-area": positionArea,
2023
2047
  "position-area": positionArea,
2024
- "position-anchor": `--${id}`,
2048
+ "position-anchor": anchor,
2025
2049
  "position-try-fallbacks": positionTry
2026
2050
  }));
2027
2051
  /* v8 ignore start -- browser popover API */
@@ -3445,16 +3469,17 @@ function createNumberField(options = {}) {
3445
3469
  const result = Number(cleaned);
3446
3470
  return Number.isNaN(result) ? null : result;
3447
3471
  }
3448
- function commit() {
3449
- if (/* @__PURE__ */ isNull(value.value)) return;
3450
- if (!shouldClamp && (value.value < numeric.min || value.value > numeric.max)) {
3472
+ function commit(next) {
3473
+ const val = arguments.length === 0 ? value.value : next;
3474
+ if (/* @__PURE__ */ isNull(val)) return;
3475
+ if (!shouldClamp && (val < numeric.min || val > numeric.max)) {
3451
3476
  if (numeric.step > 0 && Number.isFinite(numeric.min)) {
3452
- const steps = Math.round((value.value - numeric.min) / numeric.step);
3477
+ const steps = Math.round((val - numeric.min) / numeric.step);
3453
3478
  value.value = numeric.min + steps * numeric.step;
3454
3479
  }
3455
3480
  return;
3456
3481
  }
3457
- value.value = numeric.snap(value.value);
3482
+ value.value = numeric.snap(val);
3458
3483
  }
3459
3484
  return {
3460
3485
  value,
@@ -4981,4 +5006,4 @@ function useRovingFocus(items, options = {}) {
4981
5006
  };
4982
5007
  }
4983
5008
  //#endregion
4984
- export { createHydrationContext as $, useCombobox as A, createBreadcrumbs as B, useIntersectionObserver as C, useLazy as D, useForm as E, useDelay as F, createOverflowContext as G, useBreadcrumbs as H, createStep as I, useResizeObserver as J, useOverflow as K, createStepContext as L, ComboboxAdapter as M, useVirtualFocus as N, createCombobox as O, usePopover as P, createHydration as Q, useStep as R, useElementIntersection as S, createFormContext as T, useImage as U, createBreadcrumbsContext as V, createOverflow as W, toElement as X, createObserver as Y, createFallbackHydration as Z, useRaf as _, createTooltipContext as a, createStackPlugin as at, createInput as b, useTooltip as c, createRatingContext as d, createHydrationPlugin as et, useRating as f, usePresence as g, useProgress as h, useNested as i, createStackContext as it, ClientComboboxAdapter as j, createComboboxContext as k, createSlider as l, createProgressContext as m, createNested as n, useToggleScope as nt, createTooltipFallback as o, useStack as ot, createProgress as p, useElementSize as q, createNestedContext as r, createStack as rt, createTooltipPlugin as s, useClickOutside as st, useRovingFocus as t, useHydration as tt, createRating as u, createNumberField as v, createForm as w, createValidation as x, createNumeric as y, useProxyModel as z };
5009
+ export { createHydrationPlugin as $, useCombobox as A, createBreadcrumbs as B, useIntersectionObserver as C, useLazy as D, useForm as E, useDelay as F, createOverflowContext as G, useBreadcrumbs as H, createStep as I, useResizeObserver as J, useOverflow as K, createStepContext as L, ComboboxAdapter as M, useVirtualFocus as N, createCombobox as O, usePopover as P, createHydrationContext as Q, useStep as R, useElementIntersection as S, createFormContext as T, useImage as U, createBreadcrumbsContext as V, createOverflow as W, createFallbackHydration as X, createObserver as Y, createHydration as Z, useRaf as _, createTooltipContext as a, useStack as at, createInput as b, useTooltip as c, createRatingContext as d, useHydration as et, useRating as f, usePresence as g, useProgress as h, useNested as i, createStackPlugin as it, ClientComboboxAdapter as j, createComboboxContext as k, createSlider as l, createProgressContext as m, createNested as n, createStack as nt, createTooltipFallback as o, toElement as ot, createProgress as p, useElementSize as q, createNestedContext as r, createStackContext as rt, createTooltipPlugin as s, useClickOutside as st, useRovingFocus as t, useToggleScope as tt, createRating as u, createNumberField as v, createForm as w, createValidation as x, createNumeric as y, useProxyModel as z };
@@ -1,6 +1,6 @@
1
1
  import { instanceExists, isFunction, isObject } from "./utilities/index.mjs";
2
- import { i as useLogger, o as createPluginContext } from "./useLogger-BEG9pAe8.mjs";
3
- import { a as useLocale } from "./useLocale-CYq4yT7b.mjs";
2
+ import { i as useLogger, o as createPluginContext } from "./useLogger-D7Fqcp_l.mjs";
3
+ import { a as useLocale } from "./useLocale-B44zLhFE.mjs";
4
4
  //#region src/composables/useRules/adapters/standard.ts
5
5
  /**
6
6
  * Type guard for Standard Schema objects.
@@ -1,7 +1,7 @@
1
- import { t as IN_BROWSER } from "./globals-D78-6Zqq.mjs";
1
+ import { t as IN_BROWSER } from "./globals-B0pQgO4u.mjs";
2
2
  import { isArray, isNullOrUndefined, isObject } from "./utilities/index.mjs";
3
- import { i as useLogger, o as createPluginContext } from "./useLogger-BEG9pAe8.mjs";
4
- import { r as useWindowEventListener } from "./useEventListener-BuETafFi.mjs";
3
+ import { i as useLogger, o as createPluginContext } from "./useLogger-D7Fqcp_l.mjs";
4
+ import { r as useWindowEventListener } from "./useEventListener-D1ETqQMm.mjs";
5
5
  import { t as MemoryStorageAdapter } from "./memory-BJjkQzxs.mjs";
6
6
  import { ref, watch } from "vue";
7
7
  //#region src/composables/useStorage/index.ts
@@ -1,8 +1,8 @@
1
1
  import { foreground } from "./utilities/index.mjs";
2
- import { o as createPluginContext } from "./useLogger-BEG9pAe8.mjs";
3
- import { t as createSingle } from "./createSingle-DTI4qvUd.mjs";
4
- import { r as flatten, t as createTokens } from "./createTokens-C5bl_n6G.mjs";
5
- import { t as V0StyleSheetThemeAdapter } from "./v0-UJs1EiJ7.mjs";
2
+ import { o as createPluginContext } from "./useLogger-D7Fqcp_l.mjs";
3
+ import { t as createSingle } from "./createSingle-CiKU87Hj.mjs";
4
+ import { r as flatten, t as createTokens } from "./createTokens-4BZfgv9F.mjs";
5
+ import { t as V0StyleSheetThemeAdapter } from "./v0-BXjZknUK.mjs";
6
6
  import { computed, shallowRef, toRef } from "vue";
7
7
  //#region src/composables/useTheme/index.ts
8
8
  /**
@@ -1,2 +1,2 @@
1
- import { A as rgbToHex, C as useId, D as foreground, E as apca, O as RGB, S as resolveIndexes, T as isV0Error, _ as isThenable, a as isArray, b as range, c as isFunction, d as isNullOrUndefined, f as isNumber, g as isSymbol, h as isString, i as clamp, k as hexToRgb, l as isNaN, m as isPrimitive, n as instanceName, o as isBoolean, p as isObject, r as UNSAFE_KEYS, s as isElement, t as instanceExists, u as isNull, v as isUndefined, w as V0Error, x as resolveIds, y as mergeDeep } from "../index-LMiCHwZl.mjs";
1
+ import { A as rgbToHex, C as useId, D as foreground, E as apca, O as RGB, S as resolveIndexes, T as isV0Error, _ as isThenable, a as isArray, b as range, c as isFunction, d as isNullOrUndefined, f as isNumber, g as isSymbol, h as isString, i as clamp, k as hexToRgb, l as isNaN, m as isPrimitive, n as instanceName, o as isBoolean, p as isObject, r as UNSAFE_KEYS, s as isElement, t as instanceExists, u as isNull, v as isUndefined, w as V0Error, x as resolveIds, y as mergeDeep } from "../index-BBJnOUyA.mjs";
2
2
  export { RGB, UNSAFE_KEYS, V0Error, apca, clamp, foreground, hexToRgb, instanceExists, instanceName, isArray, isBoolean, isElement, isFunction, isNaN, isNull, isNullOrUndefined, isNumber, isObject, isPrimitive, isString, isSymbol, isThenable, isUndefined, isV0Error, mergeDeep, range, resolveIds, resolveIndexes, rgbToHex, useId };
@@ -1,4 +1,4 @@
1
- import { t as IN_BROWSER } from "../globals-D78-6Zqq.mjs";
1
+ import { t as IN_BROWSER } from "../globals-B0pQgO4u.mjs";
2
2
  import * as Vue from "vue";
3
3
  import { useId as useId$1 } from "vue";
4
4
  //#region src/utilities/color.ts
@@ -448,12 +448,12 @@ function isPlainObject(value) {
448
448
  /* @__NO_SIDE_EFFECTS__ */
449
449
  function mergeDeep(target, ...sources) {
450
450
  const out = {};
451
- for (const key in target) if (Object.prototype.hasOwnProperty.call(target, key)) out[key] = target[key];
451
+ for (const key in target) if (Object.hasOwn(target, key)) out[key] = target[key];
452
452
  for (const source of sources) {
453
453
  if (!/* @__PURE__ */ isObject(source)) continue;
454
454
  for (const key in source) {
455
455
  if (UNSAFE_KEYS.has(key)) continue;
456
- if (!Object.prototype.hasOwnProperty.call(source, key)) continue;
456
+ if (!Object.hasOwn(source, key)) continue;
457
457
  const sourceValue = source[key];
458
458
  if (/* @__PURE__ */ isUndefined(sourceValue)) continue;
459
459
  const targetValue = out[key];
@@ -620,6 +620,7 @@ var V0Error = class extends Error {
620
620
  seed;
621
621
  variant;
622
622
  adapter;
623
+ prefix;
623
624
  constructor(message, details) {
624
625
  const { cause, ...rest } = details;
625
626
  super(message, /* @__PURE__ */ isUndefined(cause) ? void 0 : { cause });
@@ -1,4 +1,4 @@
1
- import { t as IN_BROWSER } from "./globals-D78-6Zqq.mjs";
1
+ import { t as IN_BROWSER } from "./globals-B0pQgO4u.mjs";
2
2
  import { isFunction } from "./utilities/index.mjs";
3
3
  import { t as LoggerAdapter } from "./adapter-Chznb9Ju.mjs";
4
4
  //#region src/composables/useLogger/adapters/v0.ts
@@ -1,6 +1,6 @@
1
- import { t as IN_BROWSER } from "./globals-D78-6Zqq.mjs";
1
+ import { t as IN_BROWSER } from "./globals-B0pQgO4u.mjs";
2
2
  import { isNull, isString } from "./utilities/index.mjs";
3
- import { t as ThemeAdapter } from "./adapter-Cj7vxEdB.mjs";
3
+ import { t as ThemeAdapter } from "./adapter-CJY6aQIS.mjs";
4
4
  import { watch } from "vue";
5
5
  //#region src/composables/useTheme/adapters/v0.ts
6
6
  /**
@@ -22,12 +22,18 @@ var V0StyleSheetThemeAdapter = class extends ThemeAdapter {
22
22
  this.update(colors, isDark);
23
23
  });
24
24
  if (/* @__PURE__ */ isNull(target)) {
25
- this.dispose = stopWatch;
25
+ this.dispose = () => {
26
+ stopWatch();
27
+ this.detach();
28
+ };
26
29
  return;
27
30
  }
28
31
  const targetEl = target instanceof HTMLElement ? target : /* @__PURE__ */ isString(target) ? document.querySelector(target) : app._container || document.querySelector("#app") || document.body;
29
32
  if (!targetEl) {
30
- this.dispose = stopWatch;
33
+ this.dispose = () => {
34
+ stopWatch();
35
+ this.detach();
36
+ };
31
37
  return;
32
38
  }
33
39
  if (context.selectedId.value) targetEl.dataset.theme = String(context.selectedId.value);
@@ -38,6 +44,7 @@ var V0StyleSheetThemeAdapter = class extends ThemeAdapter {
38
44
  this.dispose = () => {
39
45
  stopWatch();
40
46
  stopTheme();
47
+ this.detach();
41
48
  };
42
49
  } else {
43
50
  const head = app._context?.provides?.usehead ?? app._context?.provides?.head;
@@ -47,7 +54,8 @@ var V0StyleSheetThemeAdapter = class extends ThemeAdapter {
47
54
  htmlAttrs: { "data-theme": id ? String(id) : "" },
48
55
  style: [{
49
56
  innerHTML: this.generate(context.colors.value, context.isDark.value),
50
- id: this.stylesheetId
57
+ id: this.stylesheetId,
58
+ ...this.cspNonce ? { nonce: this.cspNonce } : {}
51
59
  }]
52
60
  });
53
61
  if (entry?.dispose) this.dispose = entry.dispose;
@@ -66,6 +74,11 @@ var V0StyleSheetThemeAdapter = class extends ThemeAdapter {
66
74
  }
67
75
  this.sheet.replaceSync(styles);
68
76
  }
77
+ detach() {
78
+ if (!IN_BROWSER) return;
79
+ document.adoptedStyleSheets = document.adoptedStyleSheets.filter((s) => s !== this.sheet);
80
+ this.sheet = void 0;
81
+ }
69
82
  };
70
83
  //#endregion
71
84
  export { V0StyleSheetThemeAdapter as t };
@@ -1,4 +1,4 @@
1
- import { n as LocaleAdapterContext, t as LocaleAdapter } from "./adapter-D2ABPTpo.mjs";
1
+ import { n as LocaleAdapterContext, t as LocaleAdapter } from "./adapter-BI-oyZCe.mjs";
2
2
 
3
3
  //#region src/composables/useLocale/adapters/v0.d.ts
4
4
  /**
@@ -11,7 +11,9 @@ declare class V0LocaleAdapter extends LocaleAdapter {
11
11
  private context;
12
12
  constructor(context: LocaleAdapterContext);
13
13
  t(key: string, ...params: unknown[]): string;
14
+ ti(key: string, ...params: unknown[]): string | undefined;
14
15
  n(value: number): string;
16
+ private lookup;
15
17
  private resolve;
16
18
  private interpolate;
17
19
  }
@@ -1,4 +1,4 @@
1
- import { t as IN_BROWSER } from "./globals-D78-6Zqq.mjs";
1
+ import { t as IN_BROWSER } from "./globals-B0pQgO4u.mjs";
2
2
  import { isObject, isString, isUndefined } from "./utilities/index.mjs";
3
3
  import { t as LocaleAdapter } from "./adapter-bwZo7b5p.mjs";
4
4
  //#region src/composables/useLocale/adapters/v0.ts
@@ -15,21 +15,27 @@ var V0LocaleAdapter = class extends LocaleAdapter {
15
15
  this.context = context;
16
16
  }
17
17
  t(key, ...params) {
18
- const locale = this.context.selectedId.value;
19
- if (!locale) return this.interpolate(key, params);
20
- const message = this.context.tokens.get(`${locale}.${key}`)?.value;
21
- if (/* @__PURE__ */ isString(message)) return this.interpolate(this.resolve(locale, message), params);
22
- if (this.context.fallbackLocale) {
23
- const fbMessage = this.context.tokens.get(`${this.context.fallbackLocale}.${key}`)?.value;
24
- if (/* @__PURE__ */ isString(fbMessage)) return this.interpolate(this.resolve(this.context.fallbackLocale, fbMessage), params);
25
- }
26
- return this.interpolate(key, params);
18
+ const found = this.lookup(key, params);
19
+ return /* @__PURE__ */ isUndefined(found) ? this.interpolate(key, params) : found;
20
+ }
21
+ ti(key, ...params) {
22
+ return this.lookup(key, params);
27
23
  }
28
24
  n(value) {
29
25
  const locale = this.context.selectedId.value;
30
26
  if (!IN_BROWSER || !locale) return value.toString();
31
27
  return new Intl.NumberFormat(String(locale)).format(value);
32
28
  }
29
+ lookup(key, params) {
30
+ const locale = this.context.selectedId.value;
31
+ if (!locale) return void 0;
32
+ const message = this.context.tokens.get(`${locale}.${key}`)?.value;
33
+ if (/* @__PURE__ */ isString(message)) return this.interpolate(this.resolve(locale, message), params);
34
+ if (this.context.fallbackLocale) {
35
+ const fb = this.context.tokens.get(`${this.context.fallbackLocale}.${key}`)?.value;
36
+ if (/* @__PURE__ */ isString(fb)) return this.interpolate(this.resolve(this.context.fallbackLocale, fb), params);
37
+ }
38
+ }
33
39
  resolve(locale, str, visited = /* @__PURE__ */ new Set()) {
34
40
  return str.replace(/{([a-zA-Z0-9.\-_]+)}/g, (match, key) => {
35
41
  const [prefix, ...rest] = key.split(".");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vuetify/v0",
3
- "version": "1.0.0-beta.3",
3
+ "version": "1.0.0-beta.4",
4
4
  "description": "A meta UI framework for building applications, component libraries, and design systems with Vue 3",
5
5
  "license": "MIT",
6
6
  "funding": [
@@ -73,7 +73,6 @@
73
73
  "launchdarkly-js-client-sdk": "^3.9.1",
74
74
  "posthog-js": "^1.372.6",
75
75
  "tsdown": "^0.21.10",
76
- "tsx": "4.21.0",
77
76
  "typescript": "6.0.3",
78
77
  "unplugin-vue": "^7.2.0",
79
78
  "vue": "3.5.33",
@@ -105,6 +104,7 @@
105
104
  "./locale/adapters": "./dist/locale/adapters/index.mjs",
106
105
  "./locale/adapters/v0": "./dist/locale/adapters/v0/index.mjs",
107
106
  "./locale/adapters/vue-i18n": "./dist/locale/adapters/vue-i18n/index.mjs",
107
+ "./locale/messages/en": "./dist/locale/messages/en/index.mjs",
108
108
  "./logger": "./dist/logger/index.mjs",
109
109
  "./logger/adapters": "./dist/logger/adapters/index.mjs",
110
110
  "./logger/adapters/consola": "./dist/logger/adapters/consola/index.mjs",
@@ -140,8 +140,8 @@
140
140
  "scripts": {
141
141
  "build": "pnpm build:tsdown && pnpm build:web-types",
142
142
  "build:tsdown": "tsdown",
143
- "build:web-types": "tsx scripts/generate-web-types.ts",
144
- "generate:web-types": "tsx scripts/generate-web-types.ts",
143
+ "build:web-types": "node scripts/generate-web-types.ts",
144
+ "generate:web-types": "node scripts/generate-web-types.ts",
145
145
  "typecheck": "vue-tsc --noEmit --incremental"
146
146
  }
147
147
  }