@vuetify/v0 1.0.0-alpha.2 → 1.0.0-alpha.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (76) hide show
  1. package/README.md +3 -1
  2. package/dist/{adapters-BJ5n7rgh.mjs → adapters-BSiqsTZN.mjs} +1 -1
  3. package/dist/adapters-C3QXhf4I.mjs +2 -0
  4. package/dist/adapters-_ZqxCD8f.mjs +4 -0
  5. package/dist/browser/index.js +3660 -212
  6. package/dist/components/index.d.mts +3 -3
  7. package/dist/components/index.mjs +2 -2
  8. package/dist/{components-CqDewYTU.mjs → components-C4jI-78d.mjs} +3654 -339
  9. package/dist/composables/index.d.mts +2 -2
  10. package/dist/composables/index.mjs +19 -19
  11. package/dist/constants/index.mjs +1 -1
  12. package/dist/{createDataTable-rXBqGglI.mjs → createDataTable-iODP6aKB.mjs} +2 -2
  13. package/dist/{createGroup-BU4olYtB.mjs → createGroup-CGk6hY_Y.mjs} +1 -1
  14. package/dist/{createRegistry-Dl-bSSTr.mjs → createRegistry-BXzdXAjq.mjs} +1 -1
  15. package/dist/{createSelection-Csaa-C8p.mjs → createSelection-B3HJEPNg.mjs} +1 -1
  16. package/dist/{createSingle-8xbHAIpY.mjs → createSingle-Dql8mRi-.mjs} +1 -1
  17. package/dist/{createTokens-lNg2M_P_.mjs → createTokens-DgFYsOrv.mjs} +2 -2
  18. package/dist/data-table/index.mjs +1 -1
  19. package/dist/date/index.mjs +1 -1
  20. package/dist/features/adapters/posthog/index.mjs +1 -1
  21. package/dist/features/index.d.mts +1 -1
  22. package/dist/features/index.mjs +1 -1
  23. package/dist/{globals-CKdzjeLe.mjs → globals-zEjWBKCr.mjs} +1 -1
  24. package/dist/{index-BxKMMWnQ.d.mts → index-B76iGRE3.d.mts} +155 -6
  25. package/dist/{index-B7cqgTBL.d.mts → index-DNDuacmH.d.mts} +584 -359
  26. package/dist/index.d.mts +3 -3
  27. package/dist/index.mjs +21 -21
  28. package/dist/json/attributes.json +56 -0
  29. package/dist/json/importMap.json +16 -0
  30. package/dist/json/tags.json +29 -0
  31. package/dist/json/web-types.json +180 -2
  32. package/dist/locale/adapters/index.mjs +2 -2
  33. package/dist/locale/adapters/v0/index.mjs +1 -1
  34. package/dist/locale/index.d.mts +1 -1
  35. package/dist/locale/index.mjs +2 -2
  36. package/dist/logger/adapters/index.mjs +2 -2
  37. package/dist/logger/adapters/v0/index.mjs +1 -1
  38. package/dist/logger/index.d.mts +1 -1
  39. package/dist/logger/index.mjs +2 -2
  40. package/dist/notifications/index.d.mts +1 -1
  41. package/dist/notifications/index.mjs +2 -2
  42. package/dist/palettes/index.d.mts +1 -1
  43. package/dist/palettes/leonardo/generate/index.mjs +2 -1
  44. package/dist/permissions/adapters/index.d.mts +1 -1
  45. package/dist/permissions/adapters/v0/index.d.mts +1 -1
  46. package/dist/permissions/index.d.mts +1 -1
  47. package/dist/permissions/index.mjs +1 -1
  48. package/dist/{posthog-DZNnPXxS.mjs → posthog-DmuyycaR.mjs} +1 -1
  49. package/dist/rules/index.d.mts +1 -1
  50. package/dist/rules/index.mjs +1 -1
  51. package/dist/storage/index.d.mts +1 -1
  52. package/dist/storage/index.mjs +1 -1
  53. package/dist/theme/adapters/index.d.mts +1 -1
  54. package/dist/theme/adapters/index.mjs +3 -3
  55. package/dist/theme/adapters/unhead/index.d.mts +1 -1
  56. package/dist/theme/adapters/unhead/index.mjs +1 -1
  57. package/dist/theme/adapters/v0/index.d.mts +1 -1
  58. package/dist/theme/adapters/v0/index.mjs +1 -1
  59. package/dist/theme/index.d.mts +1 -1
  60. package/dist/theme/index.mjs +3 -3
  61. package/dist/{unhead-DZiD-4Tx.mjs → unhead-B-I2OS6i.mjs} +1 -1
  62. package/dist/{useClickOutside-CmCUD_Pf.mjs → useClickOutside-CY4U2J9W.mjs} +145 -24
  63. package/dist/{useFeatures-ZIvzzuEV.mjs → useFeatures-BPOke6iP.mjs} +4 -4
  64. package/dist/{useLocale-DTJx3aKR.mjs → useLocale-BV8e3imF.mjs} +5 -5
  65. package/dist/{useLogger-BBTcMN61.mjs → useLogger-DvdRTrqC.mjs} +3 -3
  66. package/dist/{useNotifications-H4knpvNw.mjs → useNotifications-vSJE6z6t.mjs} +21 -10
  67. package/dist/{usePermissions-B_G12Dwd.mjs → usePermissions-D3zPwKQc.mjs} +2 -2
  68. package/dist/{useRules--7Qoo60I.mjs → useRules-BT6cgoTj.mjs} +2 -2
  69. package/dist/{useTheme-Co05TEeD.mjs → useTheme-cUZb2A9O.mjs} +5 -5
  70. package/dist/utilities/index.mjs +2 -1
  71. package/dist/{v0-D0Mh3EVG.mjs → v0-C49OI_wc.mjs} +1 -1
  72. package/dist/{v0-DeiZuexg.mjs → v0-CHZpnMeP.mjs} +1 -1
  73. package/dist/{v0-BrTEO5sv.mjs → v0-gpExNexS.mjs} +1 -1
  74. package/package.json +10 -10
  75. package/dist/adapters-BnKW0BF_.mjs +0 -2
  76. package/dist/adapters-CBrvizWb.mjs +0 -4
@@ -1,23 +1,23 @@
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-CKdzjeLe.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-zEjWBKCr.mjs";
2
2
  import { clamp, instanceExists, isArray, isElement, isFunction, isNull, isNullOrUndefined, isNumber, isObject, isString, isUndefined, mergeDeep, range, resolveIds, resolveIndexes, useId as useId$1 } from "./utilities/index.mjs";
3
3
  import { i as useContext, t as createTrinity } from "./createTrinity-BTCs1pYx.mjs";
4
- import { a as createPlugin, i as useLogger, o as createPluginContext } from "./useLogger-BBTcMN61.mjs";
5
- import { t as createRegistry } from "./createRegistry-Dl-bSSTr.mjs";
6
- import { i as createModel, t as createSelection } from "./createSelection-Csaa-C8p.mjs";
7
- import { t as createSingle } from "./createSingle-8xbHAIpY.mjs";
8
- import "./createTokens-lNg2M_P_.mjs";
9
- import { a as useLocale } from "./useLocale-DTJx3aKR.mjs";
10
- import { c as useTimer } from "./useNotifications-H4knpvNw.mjs";
4
+ import { a as createPlugin, i as useLogger, o as createPluginContext } from "./useLogger-DvdRTrqC.mjs";
5
+ import { t as createRegistry } from "./createRegistry-BXzdXAjq.mjs";
6
+ import { i as createModel, t as createSelection } from "./createSelection-B3HJEPNg.mjs";
7
+ import { t as createSingle } from "./createSingle-Dql8mRi-.mjs";
8
+ import "./createTokens-DgFYsOrv.mjs";
9
+ import { a as useLocale } from "./useLocale-BV8e3imF.mjs";
10
+ import { c as useTimer } from "./useNotifications-vSJE6z6t.mjs";
11
11
  import { t as toArray } from "./toArray-as9BWxBK.mjs";
12
12
  import { n as createFilter } from "./adapter-gQ2SNKZq.mjs";
13
- import { t as createGroup } from "./createGroup-BU4olYtB.mjs";
13
+ import { t as createGroup } from "./createGroup-CGk6hY_Y.mjs";
14
14
  import "./createPagination-CHF7SmmK.mjs";
15
- import "./createDataTable-rXBqGglI.mjs";
16
- import { a as useRules, o as isStandardSchema } from "./useRules--7Qoo60I.mjs";
17
- import "./useFeatures-ZIvzzuEV.mjs";
18
- import "./usePermissions-B_G12Dwd.mjs";
15
+ import "./createDataTable-iODP6aKB.mjs";
16
+ import { a as useRules, o as isStandardSchema } from "./useRules-BT6cgoTj.mjs";
17
+ import "./useFeatures-BPOke6iP.mjs";
18
+ import "./usePermissions-D3zPwKQc.mjs";
19
19
  import { t as MemoryAdapter } from "./memory-oYBvtkgx.mjs";
20
- import "./useTheme-Co05TEeD.mjs";
20
+ import "./useTheme-cUZb2A9O.mjs";
21
21
  import { computed, effectScope, hasInjectionContext, isRef, nextTick, onMounted, onScopeDispose, reactive, readonly, ref, shallowReactive, shallowReadonly, shallowRef, toRef, toValue, unref, watch, watchEffect } from "vue";
22
22
  //#region src/composables/createBreadcrumbs/index.ts
23
23
  /**
@@ -1069,7 +1069,7 @@ function createValidation(_options = {}) {
1069
1069
  if (!silent) isValidating.value = true;
1070
1070
  try {
1071
1071
  const results = await Promise.all(activeRules.map((rule) => rule(val)));
1072
- if (gen !== generation) return isValid.value ?? false;
1072
+ if (gen !== generation) return false;
1073
1073
  const errorMessages = results.filter((result) => /* @__PURE__ */ isString(result) || result === false).map((result) => result === false ? "Validation failed" : result);
1074
1074
  if (!silent) {
1075
1075
  errors.value = errorMessages;
@@ -1077,7 +1077,7 @@ function createValidation(_options = {}) {
1077
1077
  }
1078
1078
  return errorMessages.length === 0;
1079
1079
  } catch (error) {
1080
- if (gen !== generation) return isValid.value ?? false;
1080
+ if (gen !== generation) return false;
1081
1081
  if (!silent) {
1082
1082
  errors.value = [error instanceof Error ? error.message : "Validation error"];
1083
1083
  isValid.value = false;
@@ -2016,7 +2016,7 @@ function createNumberField(options = {}) {
2016
2016
  }
2017
2017
  function increment(multiplier) {
2018
2018
  if (isLocked()) return;
2019
- if (/* @__PURE__ */ isNull(value.value)) {
2019
+ if (/* @__PURE__ */ isNull(value.value) || !Number.isFinite(value.value)) {
2020
2020
  value.value = initialize();
2021
2021
  return;
2022
2022
  }
@@ -2024,7 +2024,7 @@ function createNumberField(options = {}) {
2024
2024
  }
2025
2025
  function decrement(multiplier) {
2026
2026
  if (isLocked()) return;
2027
- if (/* @__PURE__ */ isNull(value.value)) {
2027
+ if (/* @__PURE__ */ isNull(value.value) || !Number.isFinite(value.value)) {
2028
2028
  value.value = initialize();
2029
2029
  return;
2030
2030
  }
@@ -2231,10 +2231,12 @@ const [createHydrationContext, createHydrationPlugin, useHydration] = createPlug
2231
2231
  */
2232
2232
  /* @__NO_SIDE_EFFECTS__ */
2233
2233
  function toElement(target) {
2234
- const raw = /* @__PURE__ */ isFunction(target) ? target() : target && /* @__PURE__ */ isObject(target) && "value" in target ? target.value : target;
2234
+ if (!target) return void 0;
2235
+ if (/* @__PURE__ */ isElement(target)) return target;
2236
+ const raw = /* @__PURE__ */ isFunction(target) ? target() : /* @__PURE__ */ isObject(target) && "value" in target ? target.value : target;
2235
2237
  if (!raw) return void 0;
2236
2238
  if (/* @__PURE__ */ isElement(raw)) return raw;
2237
- if ("$el" in raw) return raw.$el;
2239
+ if (/* @__PURE__ */ isObject(raw) && "$el" in raw) return raw.$el;
2238
2240
  }
2239
2241
  //#endregion
2240
2242
  //#region src/composables/createObserver/index.ts
@@ -3071,8 +3073,8 @@ function createSlider(options = {}) {
3071
3073
  return inverted.value ? 100 - p : p;
3072
3074
  }
3073
3075
  function fromPercent(p) {
3074
- const adjusted = inverted.value ? 100 - p : p;
3075
- return numeric.fromPercent(adjusted);
3076
+ const value = numeric.fromPercent(p);
3077
+ return inverted.value ? numeric.max - (value - numeric.min) : value;
3076
3078
  }
3077
3079
  function register(input) {
3078
3080
  const initialValue = /* @__PURE__ */ isObject(input) ? input.value : input;
@@ -4496,6 +4498,123 @@ function useDate(namespace = "v0:date") {
4496
4498
  return useContext(namespace);
4497
4499
  }
4498
4500
  //#endregion
4501
+ //#region src/composables/useDelay/index.ts
4502
+ /**
4503
+ * @module useDelay
4504
+ *
4505
+ * @see https://0.vuetifyjs.com/composables/system/use-delay
4506
+ *
4507
+ * @remarks
4508
+ * Schedule open and close transitions with configurable delays.
4509
+ *
4510
+ * Composes `useTimer` for the underlying lifecycle (start / stop / pause / resume,
4511
+ * plus reactive `isActive`, `isPaused`, `remaining`) and adds direction tracking
4512
+ * (`isOpening`) and promise-based resolution.
4513
+ *
4514
+ * Key features:
4515
+ * - Reactive `openDelay` and `closeDelay` via `MaybeRefOrGetter`
4516
+ * - `start(isOpening)` returns a `Promise<boolean>` that resolves once the delay elapses
4517
+ * - Per-call `minDelay` floor enforces a minimum delay
4518
+ * - Automatic cleanup on scope disposal (timer cleared, pending promise settled with current direction)
4519
+ * - SSR-safe
4520
+ *
4521
+ * @example
4522
+ * ```ts
4523
+ * import { useDelay } from '@vuetify/v0'
4524
+ *
4525
+ * const delay = useDelay(isOpening => isVisible.value = isOpening, {
4526
+ * openDelay: 300,
4527
+ * closeDelay: 200,
4528
+ * })
4529
+ *
4530
+ * delay.start(true)
4531
+ * delay.start(false, { minDelay: 500 })
4532
+ * ```
4533
+ */
4534
+ /**
4535
+ * Schedule open and close transitions with configurable delays.
4536
+ *
4537
+ * Composes `useTimer` for the lifecycle (`start` / `stop` / `pause` / `resume` plus
4538
+ * reactive `isActive`, `isPaused`, `remaining`) and adds direction tracking
4539
+ * (`isOpening`) and promise-based resolution.
4540
+ *
4541
+ * @param callback Optional callback invoked once a started delay elapses; receives the resolved direction.
4542
+ * @param options Reactive delay settings.
4543
+ * @returns Lifecycle controls and reactive state.
4544
+ *
4545
+ * @see https://0.vuetifyjs.com/composables/system/use-delay
4546
+ *
4547
+ * @example
4548
+ * ```ts
4549
+ * const delay = useDelay(isOpening => isVisible.value = isOpening, {
4550
+ * openDelay: 300,
4551
+ * closeDelay: 200,
4552
+ * })
4553
+ *
4554
+ * delay.start(true)
4555
+ * delay.start(false, { minDelay: 500 })
4556
+ * delay.pause()
4557
+ * delay.resume()
4558
+ * delay.stop()
4559
+ * ```
4560
+ */
4561
+ function useDelay(callback, options = {}) {
4562
+ const { openDelay, closeDelay } = options;
4563
+ const isOpening = shallowRef(false);
4564
+ let minDelay = 0;
4565
+ let resolver;
4566
+ function fire() {
4567
+ const direction = isOpening.value;
4568
+ const resolve = resolver;
4569
+ resolver = void 0;
4570
+ resolve?.(direction);
4571
+ callback?.(direction);
4572
+ }
4573
+ function duration() {
4574
+ const raw = isOpening.value ? toValue(openDelay) : toValue(closeDelay);
4575
+ return Math.max(minDelay, raw ?? 0);
4576
+ }
4577
+ const timer = useTimer(fire, { duration });
4578
+ function start(direction, options = {}) {
4579
+ const previous = resolver;
4580
+ resolver = void 0;
4581
+ isOpening.value = direction;
4582
+ minDelay = options.minDelay ?? 0;
4583
+ previous?.(direction);
4584
+ const ms = duration();
4585
+ return new Promise((resolve) => {
4586
+ resolver = resolve;
4587
+ if (ms <= 0) {
4588
+ timer.stop();
4589
+ fire();
4590
+ return;
4591
+ }
4592
+ timer.start();
4593
+ });
4594
+ }
4595
+ function stop() {
4596
+ const resolve = resolver;
4597
+ resolver = void 0;
4598
+ timer.stop();
4599
+ resolve?.(isOpening.value);
4600
+ }
4601
+ onScopeDispose(() => {
4602
+ const resolve = resolver;
4603
+ resolver = void 0;
4604
+ resolve?.(isOpening.value);
4605
+ }, true);
4606
+ return {
4607
+ start,
4608
+ stop,
4609
+ pause: timer.pause,
4610
+ resume: timer.resume,
4611
+ isActive: shallowReadonly(timer.isActive),
4612
+ isPaused: shallowReadonly(timer.isPaused),
4613
+ remaining: shallowReadonly(timer.remaining),
4614
+ isOpening: shallowReadonly(isOpening)
4615
+ };
4616
+ }
4617
+ //#endregion
4499
4618
  //#region src/composables/useHotkey/aliases.ts
4500
4619
  /**
4501
4620
  * Key alias mapping for consistent key normalization across the hotkey system.
@@ -6675,6 +6794,7 @@ function useClickOutside(target, handler, options = {}) {
6675
6794
  x: 0,
6676
6795
  y: 0
6677
6796
  };
6797
+ let startedOutsideBounds = false;
6678
6798
  let cleanupPointerDown;
6679
6799
  let cleanupPointerUp;
6680
6800
  let cleanupBlur;
@@ -6765,6 +6885,7 @@ function useClickOutside(target, handler, options = {}) {
6765
6885
  x: event.clientX,
6766
6886
  y: event.clientY
6767
6887
  };
6888
+ startedOutsideBounds = bounds ? isOutsideBounds(event.clientX, event.clientY) : false;
6768
6889
  }
6769
6890
  /**
6770
6891
  * Handle pointerup - check if it's an outside click.
@@ -6783,7 +6904,7 @@ function useClickOutside(target, handler, options = {}) {
6783
6904
  const dy = Math.abs(event.clientY - startPosition.y);
6784
6905
  if (dx >= touchScrollThreshold || dy >= touchScrollThreshold) return;
6785
6906
  }
6786
- if ((bounds ? isOutsideBounds(startPosition.x, startPosition.y) && isOutsideBounds(event.clientX, event.clientY) : isOutside(pointerdownTarget) && isOutside(pointerupTarget)) && !shouldIgnore(path)) handler(event);
6907
+ if ((bounds ? startedOutsideBounds && isOutsideBounds(event.clientX, event.clientY) : isOutside(pointerdownTarget) && isOutside(pointerupTarget)) && !shouldIgnore(path)) handler(event);
6787
6908
  }
6788
6909
  /**
6789
6910
  * Handle window blur - detect focus moving to iframe.
@@ -6840,4 +6961,4 @@ function useClickOutside(target, handler, options = {}) {
6840
6961
  };
6841
6962
  }
6842
6963
  //#endregion
6843
- export { createRating as $, useElementIntersection as A, ClientAdapter as At, createBreakpointsPlugin as B, usePresence as C, createForm as Ct, usePrefersDark as D, createComboboxContext as Dt, usePrefersContrast as E, createCombobox as Et, createDateContext as F, useBreadcrumbs as Ft, useVirtual as G, toReactive as H, createDatePlugin as I, useTimeline as J, createTimeline as K, useDate as L, useImage as M, usePopover as Mt, useHotkey as N, createBreadcrumbs as Nt, usePrefersReducedMotion as O, useCombobox as Ot, createDate as P, createBreadcrumbsContext as Pt, createSlider as Q, createBreakpoints as R, useProxyModel as S, createValidation as St, useMediaQuery as T, useForm as Tt, createVirtual as U, useBreakpoints as V, createVirtualContext as W, createStepContext as X, createStep as Y, useStep as Z, createRtlPlugin as _, createNumeric as _t, useToggleScope as a, createOverflow as at, useRovingFocus as b, useNested as bt, createStoragePlugin as c, useElementSize as ct, createStackContext as d, createFallbackHydration as dt, createRatingContext as et, createStackPlugin as f, createHydration as ft, createRtlFallback as g, createNumberField as gt, createRtlContext as h, useHydration as ht, useWindowEventListener as i, useProgress as it, useIntersectionObserver as j, useVirtualFocus as jt, useLazy as k, ServerAdapter as kt, useStorage as l, useResizeObserver as lt, createRtl as m, createHydrationPlugin as mt, useDocumentEventListener as n, createProgress as nt, createStorage as o, createOverflowContext as ot, useStack as p, createHydrationContext as pt, createTimelineContext as q, useEventListener as r, createProgressContext as rt, createStorageContext as s, useOverflow as st, useClickOutside as t, useRating as tt, createStack as u, toElement as ut, useRtl as v, createNested as vt, useMutationObserver as w, createFormContext as wt, useRaf as x, createInput as xt, Vuetify0RtlAdapter as y, createNestedContext as yt, createBreakpointsContext as z };
6964
+ export { createSlider as $, useElementIntersection as A, ServerAdapter as At, createBreakpointsContext as B, usePresence as C, createValidation as Ct, usePrefersDark as D, createCombobox as Dt, usePrefersContrast as E, useForm as Et, createDate as F, createBreadcrumbsContext as Ft, createVirtualContext as G, useBreakpoints as H, createDateContext as I, useBreadcrumbs as It, createTimelineContext as J, useVirtual as K, createDatePlugin as L, useImage as M, useVirtualFocus as Mt, useHotkey as N, usePopover as Nt, usePrefersReducedMotion as O, createComboboxContext as Ot, useDelay as P, createBreadcrumbs as Pt, useStep as Q, useDate as R, useProxyModel as S, createInput as St, useMediaQuery as T, createFormContext as Tt, toReactive as U, createBreakpointsPlugin as V, createVirtual as W, createStep as X, useTimeline as Y, createStepContext as Z, createRtlPlugin as _, createNumberField as _t, useToggleScope as a, useProgress as at, useRovingFocus as b, createNestedContext as bt, createStoragePlugin as c, useOverflow as ct, createStackContext as d, toElement as dt, createRating as et, createStackPlugin as f, createFallbackHydration as ft, createRtlFallback as g, useHydration as gt, createRtlContext as h, createHydrationPlugin as ht, useWindowEventListener as i, createProgressContext as it, useIntersectionObserver as j, ClientAdapter as jt, useLazy as k, useCombobox as kt, useStorage as l, useElementSize as lt, createRtl as m, createHydrationContext as mt, useDocumentEventListener as n, useRating as nt, createStorage as o, createOverflow as ot, useStack as p, createHydration as pt, createTimeline as q, useEventListener as r, createProgress as rt, createStorageContext as s, createOverflowContext as st, useClickOutside as t, createRatingContext as tt, createStack as u, useResizeObserver as ut, useRtl as v, createNumeric as vt, useMutationObserver as w, createForm as wt, useRaf as x, useNested as xt, Vuetify0RtlAdapter as y, createNested as yt, createBreakpoints as z };
@@ -1,10 +1,10 @@
1
1
  import { isArray, isBoolean, isFunction, isObject } from "./utilities/index.mjs";
2
- import { o as createPluginContext } from "./useLogger-BBTcMN61.mjs";
3
- import { t as createTokens } from "./createTokens-lNg2M_P_.mjs";
4
- import { t as createGroup } from "./createGroup-BU4olYtB.mjs";
2
+ import { o as createPluginContext } from "./useLogger-DvdRTrqC.mjs";
3
+ import { t as createTokens } from "./createTokens-DgFYsOrv.mjs";
4
+ import { t as createGroup } from "./createGroup-CGk6hY_Y.mjs";
5
5
  import "./flagsmith-Dbh1h8WF.mjs";
6
6
  import "./launchdarkly-BKtW-idu.mjs";
7
- import "./posthog-DZNnPXxS.mjs";
7
+ import "./posthog-DmuyycaR.mjs";
8
8
  //#region src/composables/useFeatures/adapters/generic/index.ts
9
9
  var FeaturesAdapter = class {};
10
10
  //#endregion
@@ -1,8 +1,8 @@
1
- import { o as createPluginContext } from "./useLogger-BBTcMN61.mjs";
2
- import { t as createSingle } from "./createSingle-8xbHAIpY.mjs";
3
- import { r as flatten, t as createTokens } from "./createTokens-lNg2M_P_.mjs";
4
- import { t as Vuetify0LocaleAdapter } from "./v0-D0Mh3EVG.mjs";
5
- import "./adapters-BnKW0BF_.mjs";
1
+ import { o as createPluginContext } from "./useLogger-DvdRTrqC.mjs";
2
+ import { t as createSingle } from "./createSingle-Dql8mRi-.mjs";
3
+ import { r as flatten, t as createTokens } from "./createTokens-DgFYsOrv.mjs";
4
+ import { t as Vuetify0LocaleAdapter } from "./v0-C49OI_wc.mjs";
5
+ import "./adapters-C3QXhf4I.mjs";
6
6
  //#region src/composables/useLocale/index.ts
7
7
  /**
8
8
  * @module useLocale
@@ -1,8 +1,8 @@
1
- import { s as __LOGGER_ENABLED__, t as IN_BROWSER } from "./globals-CKdzjeLe.mjs";
1
+ import { s as __LOGGER_ENABLED__, t as IN_BROWSER } from "./globals-zEjWBKCr.mjs";
2
2
  import { isNullOrUndefined, isUndefined } from "./utilities/index.mjs";
3
3
  import { i as useContext, t as createTrinity } from "./createTrinity-BTCs1pYx.mjs";
4
- import { t as Vuetify0LoggerAdapter } from "./v0-DeiZuexg.mjs";
5
- import "./adapters-BJ5n7rgh.mjs";
4
+ import { t as Vuetify0LoggerAdapter } from "./v0-CHZpnMeP.mjs";
5
+ import "./adapters-BSiqsTZN.mjs";
6
6
  import { hasInjectionContext, inject, watch } from "vue";
7
7
  //#region src/composables/createPlugin/index.ts
8
8
  /**
@@ -1,9 +1,9 @@
1
- import { t as IN_BROWSER } from "./globals-CKdzjeLe.mjs";
1
+ import { t as IN_BROWSER } from "./globals-zEjWBKCr.mjs";
2
2
  import { isFunction, isNull, isUndefined, useId as useId$1 } from "./utilities/index.mjs";
3
3
  import { i as useContext, t as createTrinity } from "./createTrinity-BTCs1pYx.mjs";
4
- import { o as createPluginContext } from "./useLogger-BBTcMN61.mjs";
5
- import { t as createRegistry } from "./createRegistry-Dl-bSSTr.mjs";
6
- import { onScopeDispose, shallowRef } from "vue";
4
+ import { o as createPluginContext } from "./useLogger-DvdRTrqC.mjs";
5
+ import { t as createRegistry } from "./createRegistry-BXzdXAjq.mjs";
6
+ import { onScopeDispose, shallowRef, toValue } from "vue";
7
7
  //#region src/composables/useTimer/index.ts
8
8
  /**
9
9
  * @module useTimer
@@ -16,6 +16,7 @@ import { onScopeDispose, shallowRef } from "vue";
16
16
  * Key features:
17
17
  * - Start/stop/pause/resume controls
18
18
  * - Reactive remaining time tracking
19
+ * - Reactive `duration` via `MaybeRefOrGetter` — read fresh on each `start()`
19
20
  * - One-shot (default) or repeating mode
20
21
  * - Automatic cleanup on scope disposal
21
22
  * - SSR-safe
@@ -45,17 +46,26 @@ import { onScopeDispose, shallowRef } from "vue";
45
46
  * timer.pause()
46
47
  * timer.resume()
47
48
  * timer.stop()
49
+ *
50
+ * // Reactive duration — re-read on each start()
51
+ * const duration = shallowRef(1000)
52
+ * const reactive = useTimer(handler, { duration })
53
+ * duration.value = 2000
54
+ * reactive.start() // fires after 2000ms
48
55
  * ```
49
56
  */
50
57
  function useTimer(handler, options = {}) {
51
58
  const { duration = 1e3, repeat = false } = options;
52
- const remaining = shallowRef(duration);
59
+ function resolveDuration() {
60
+ return toValue(duration);
61
+ }
62
+ const remaining = shallowRef(resolveDuration());
53
63
  const isActive = shallowRef(false);
54
64
  const isPaused = shallowRef(false);
55
65
  let timeoutId;
56
66
  let trackingId;
57
67
  let startedAt = 0;
58
- let budget = duration;
68
+ let budget = remaining.value;
59
69
  function clearTimer() {
60
70
  if (!/* @__PURE__ */ isUndefined(timeoutId)) {
61
71
  globalThis.clearTimeout(timeoutId);
@@ -81,7 +91,7 @@ function useTimer(handler, options = {}) {
81
91
  clearTimer();
82
92
  stopTracking();
83
93
  handler();
84
- if (repeat) begin(duration);
94
+ if (repeat) begin(resolveDuration());
85
95
  else {
86
96
  isActive.value = false;
87
97
  remaining.value = 0;
@@ -99,15 +109,16 @@ function useTimer(handler, options = {}) {
99
109
  startTracking();
100
110
  }
101
111
  function start() {
102
- if (duration < 0) return;
103
- begin(duration);
112
+ const ms = resolveDuration();
113
+ if (ms < 0) return;
114
+ begin(ms);
104
115
  }
105
116
  function stop() {
106
117
  clearTimer();
107
118
  stopTracking();
108
119
  isActive.value = false;
109
120
  isPaused.value = false;
110
- remaining.value = duration;
121
+ remaining.value = resolveDuration();
111
122
  }
112
123
  function pause() {
113
124
  if (!isActive.value || isPaused.value) return;
@@ -1,5 +1,5 @@
1
- import { o as createPluginContext } from "./useLogger-BBTcMN61.mjs";
2
- import { t as createTokens } from "./createTokens-lNg2M_P_.mjs";
1
+ import { o as createPluginContext } from "./useLogger-DvdRTrqC.mjs";
2
+ import { t as createTokens } from "./createTokens-DgFYsOrv.mjs";
3
3
  import { t as toArray } from "./toArray-as9BWxBK.mjs";
4
4
  import { t as Vuetify0PermissionAdapter } from "./v0-Bmow1q_x.mjs";
5
5
  import "./adapters-CMJGA1k7.mjs";
@@ -1,6 +1,6 @@
1
1
  import { instanceExists, isFunction, isObject } from "./utilities/index.mjs";
2
- import { o as createPluginContext } from "./useLogger-BBTcMN61.mjs";
3
- import { a as useLocale } from "./useLocale-DTJx3aKR.mjs";
2
+ import { o as createPluginContext } from "./useLogger-DvdRTrqC.mjs";
3
+ import { a as useLocale } from "./useLocale-BV8e3imF.mjs";
4
4
  //#region src/composables/useRules/adapters/standard.ts
5
5
  /**
6
6
  * Type guard for Standard Schema objects.
@@ -1,9 +1,9 @@
1
1
  import { foreground } from "./utilities/index.mjs";
2
- import { o as createPluginContext } from "./useLogger-BBTcMN61.mjs";
3
- import { t as createSingle } from "./createSingle-8xbHAIpY.mjs";
4
- import { r as flatten, t as createTokens } from "./createTokens-lNg2M_P_.mjs";
5
- import { t as V0StyleSheetThemeAdapter } from "./v0-BrTEO5sv.mjs";
6
- import "./adapters-CBrvizWb.mjs";
2
+ import { o as createPluginContext } from "./useLogger-DvdRTrqC.mjs";
3
+ import { t as createSingle } from "./createSingle-Dql8mRi-.mjs";
4
+ import { r as flatten, t as createTokens } from "./createTokens-DgFYsOrv.mjs";
5
+ import { t as V0StyleSheetThemeAdapter } from "./v0-gpExNexS.mjs";
6
+ import "./adapters-_ZqxCD8f.mjs";
7
7
  import { computed, shallowRef, toRef } from "vue";
8
8
  //#region src/composables/useTheme/index.ts
9
9
  /**
@@ -1,4 +1,4 @@
1
- import { t as IN_BROWSER } from "../globals-CKdzjeLe.mjs";
1
+ import { t as IN_BROWSER } from "../globals-zEjWBKCr.mjs";
2
2
  import * as Vue from "vue";
3
3
  import { useId as useId$1 } from "vue";
4
4
  //#region src/utilities/color.ts
@@ -481,6 +481,7 @@ function useId() {
481
481
  */
482
482
  /* @__NO_SIDE_EFFECTS__ */
483
483
  function clamp(value, min = 0, max = 1) {
484
+ if (!Number.isFinite(value)) return min;
484
485
  return Math.max(min, Math.min(max, value));
485
486
  }
486
487
  /**
@@ -1,4 +1,4 @@
1
- import { t as IN_BROWSER } from "./globals-CKdzjeLe.mjs";
1
+ import { t as IN_BROWSER } from "./globals-zEjWBKCr.mjs";
2
2
  import { isObject, isString, isUndefined } from "./utilities/index.mjs";
3
3
  //#region src/composables/useLocale/adapters/v0.ts
4
4
  /**
@@ -1,4 +1,4 @@
1
- import { t as IN_BROWSER } from "./globals-CKdzjeLe.mjs";
1
+ import { t as IN_BROWSER } from "./globals-zEjWBKCr.mjs";
2
2
  import { isFunction } from "./utilities/index.mjs";
3
3
  //#region src/composables/useLogger/adapters/v0.ts
4
4
  /**
@@ -1,4 +1,4 @@
1
- import { t as IN_BROWSER } from "./globals-CKdzjeLe.mjs";
1
+ import { t as IN_BROWSER } from "./globals-zEjWBKCr.mjs";
2
2
  import { isNull, isString } from "./utilities/index.mjs";
3
3
  import { t as ThemeAdapter } from "./adapter-Be9zUc-n.mjs";
4
4
  import { onScopeDispose, watch } from "vue";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vuetify/v0",
3
- "version": "1.0.0-alpha.2",
3
+ "version": "1.0.0-alpha.3",
4
4
  "description": "A meta UI framework for building applications, component libraries, and design systems with Vue 3",
5
5
  "license": "MIT",
6
6
  "types": "./dist/index.d.mts",
@@ -52,18 +52,18 @@
52
52
  "@ant-design/colors": "^8.0.1",
53
53
  "@flagsmith/flagsmith": "^11.0.0",
54
54
  "@material/material-color-utilities": "^0.4.0",
55
- "@vue/compiler-dom": "^3.5.32",
56
- "@vue/test-utils": "^2.4.6",
55
+ "@vue/compiler-dom": "^3.5.33",
56
+ "@vue/test-utils": "^2.4.10",
57
57
  "concurrently": "^9.2.1",
58
58
  "launchdarkly-js-client-sdk": "^3.9.1",
59
- "posthog-js": "^1.365.0",
60
- "tsdown": "^0.21.7",
59
+ "posthog-js": "^1.372.6",
60
+ "tsdown": "^0.21.10",
61
61
  "tsx": "4.21.0",
62
- "typescript": "6.0.2",
63
- "unplugin-vue": "^7.1.1",
64
- "vue": "3.5.32",
65
- "vue-component-meta": "3.2.6",
66
- "vue-i18n": "^11.3.1"
62
+ "typescript": "6.0.3",
63
+ "unplugin-vue": "^7.2.0",
64
+ "vue": "3.5.33",
65
+ "vue-component-meta": "3.2.7",
66
+ "vue-i18n": "^11.4.0"
67
67
  },
68
68
  "imports": {
69
69
  "#v0/*": {
@@ -1,2 +0,0 @@
1
- import "./v0-D0Mh3EVG.mjs";
2
- export {};
@@ -1,4 +0,0 @@
1
- import "./adapter-Be9zUc-n.mjs";
2
- import "./v0-BrTEO5sv.mjs";
3
- import "./unhead-DZiD-4Tx.mjs";
4
- export {};