@vuetify/v0 0.1.9 → 0.1.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{adapter-CWp5eQ6R.d.mts → adapter-CN3E66HY.d.mts} +1 -1
- package/dist/{adapter-CqP9Z4JU.d.mts → adapter-Dv4TFNh9.d.mts} +7 -7
- package/dist/browser/index.js +4522 -3226
- package/dist/components/index.d.mts +2 -2
- package/dist/components/index.mjs +19 -19
- package/dist/{components-mSy9az8x.mjs → components-Cxi4P1uo.mjs} +1374 -277
- package/dist/composables/index.d.mts +14 -14
- package/dist/composables/index.mjs +18 -18
- package/dist/{consola-C1OjyZVf.d.mts → consola-mE3TUsie.d.mts} +1 -1
- package/dist/constants/index.d.mts +1 -1
- package/dist/constants/index.mjs +1 -1
- package/dist/{createDataTable-DIl09siC.mjs → createDataTable-DnaaoU_Q.mjs} +2 -2
- package/dist/{createGroup-PvzsLu9E.mjs → createGroup-BgDjEOXE.mjs} +1 -1
- package/dist/{createSelection-DbWP6c7H.mjs → createSelection-I3pID-Mh.mjs} +1 -1
- package/dist/{createSingle-CeAJpbXs.mjs → createSingle-CqX-KXFr.mjs} +1 -1
- package/dist/{createTokens-C1gIuKCK.mjs → createTokens-vyh3quuB.mjs} +2 -2
- package/dist/data-table/adapters/client/index.mjs +1 -1
- package/dist/data-table/adapters/index.mjs +1 -1
- package/dist/data-table/adapters/server/index.mjs +1 -1
- package/dist/data-table/adapters/virtual/index.mjs +1 -1
- package/dist/data-table/index.d.mts +1 -1
- package/dist/data-table/index.mjs +10 -10
- package/dist/date/index.d.mts +9 -6
- package/dist/date/index.mjs +22 -15
- package/dist/features/adapters/flagsmith/index.d.mts +1 -13
- package/dist/features/adapters/launchdarkly/index.d.mts +1 -12
- package/dist/features/adapters/posthog/index.d.mts +1 -12
- package/dist/features/adapters/posthog/index.mjs +2 -2
- package/dist/features/index.d.mts +2 -2
- package/dist/features/index.mjs +8 -8
- package/dist/{globals-3i9umzyz.mjs → globals-TLLuB8XQ.mjs} +1 -1
- package/dist/index-BTG8veDR.d.mts +13 -0
- package/dist/{index-C5XZRWlO.d.mts → index-Bz8iXBEX.d.mts} +2475 -960
- package/dist/index-CDGG7lCB.d.mts +1 -0
- package/dist/index-CrqJIYCP.d.mts +13 -0
- package/dist/index-D9G_YWS_.d.mts +14 -0
- package/dist/{index-BL4uTXWQ.d.mts → index-Dlz-FzrC.d.mts} +20 -21
- package/dist/index-LhFpnU-f.d.mts +1 -0
- package/dist/{index-BoK8Ln2f.d.mts → index-YyqYAay2.d.mts} +9 -1
- package/dist/{index-D0qnkRbl.d.mts → index-bMdAIUKN.d.mts} +86 -15
- package/dist/index.d.mts +17 -17
- package/dist/index.mjs +20 -20
- package/dist/json/attributes.json +329 -1
- package/dist/json/importMap.json +80 -0
- package/dist/json/tags.json +172 -0
- package/dist/json/web-types.json +2635 -1621
- package/dist/locale/adapters/index.d.mts +2 -2
- package/dist/locale/adapters/index.mjs +2 -2
- package/dist/locale/adapters/v0/index.d.mts +1 -1
- package/dist/locale/adapters/v0/index.mjs +2 -2
- package/dist/locale/adapters/vue-i18n/index.d.mts +1 -1
- package/dist/locale/adapters/vue-i18n/index.mjs +1 -1
- package/dist/locale/index.d.mts +3 -3
- package/dist/locale/index.mjs +8 -8
- package/dist/logger/adapters/consola/index.d.mts +1 -1
- package/dist/logger/adapters/index.d.mts +4 -4
- package/dist/logger/adapters/index.mjs +2 -2
- package/dist/logger/adapters/pino/index.d.mts +1 -1
- package/dist/logger/adapters/pino/index.mjs +1 -1
- package/dist/logger/adapters/v0/index.d.mts +1 -1
- package/dist/logger/adapters/v0/index.mjs +2 -2
- package/dist/logger/index.d.mts +5 -5
- package/dist/logger/index.mjs +3 -3
- package/dist/notifications/index.d.mts +1 -2
- package/dist/notifications/index.mjs +1 -1
- package/dist/palettes/ant/index.d.mts +1 -1
- package/dist/palettes/index.d.mts +2 -3
- package/dist/palettes/material/index.d.mts +1 -1
- package/dist/palettes/md1/index.d.mts +1 -1
- package/dist/palettes/md2/index.d.mts +1 -1
- package/dist/palettes/radix/index.d.mts +1 -1
- package/dist/palettes/tailwind/index.d.mts +1 -1
- package/dist/permissions/adapters/index.d.mts +1 -2
- package/dist/permissions/adapters/index.mjs +1 -1
- package/dist/permissions/adapters/v0/index.d.mts +1 -1
- package/dist/permissions/adapters/v0/index.mjs +1 -1
- package/dist/permissions/index.d.mts +1 -1
- package/dist/permissions/index.mjs +5 -5
- package/dist/{pino-CM1iLXmi.d.mts → pino-DUx_ooLa.d.mts} +1 -1
- package/dist/{posthog-CCQFQ5XD.mjs → posthog-0A_Ageii.mjs} +1 -1
- package/dist/rules/index.d.mts +1 -1
- package/dist/rules/index.mjs +9 -9
- package/dist/storage/adapters/index.d.mts +2 -2
- package/dist/storage/adapters/memory/index.d.mts +1 -1
- package/dist/storage/index.d.mts +3 -3
- package/dist/storage/index.mjs +17 -17
- package/dist/theme/adapters/index.d.mts +1 -1
- package/dist/theme/adapters/index.mjs +2 -2
- package/dist/theme/adapters/v0/index.d.mts +1 -1
- package/dist/theme/adapters/v0/index.mjs +2 -2
- package/dist/theme/index.d.mts +1 -1
- package/dist/theme/index.mjs +8 -8
- package/dist/{useClickOutside-hOhNk4eS.mjs → useClickOutside-R0S58NVr.mjs} +262 -151
- package/dist/{useFeatures-CXRQvucQ.mjs → useFeatures-Bn16wSHD.mjs} +3 -3
- package/dist/{useLocale-BaufqE5Z.mjs → useLocale-B8NaQT2b.mjs} +10 -4
- package/dist/{useLogger-cGK00Ywd.mjs → useLogger-xp_tiLJ5.mjs} +2 -2
- package/dist/{usePermissions-CR0HkjsF.mjs → usePermissions-nkU9OBB8.mjs} +2 -2
- package/dist/{useRules-LD-_-Hxt.mjs → useRules-RkVMgycJ.mjs} +2 -2
- package/dist/{useTheme-Cs79AFNR.mjs → useTheme-QFLbV6tH.mjs} +18 -8
- package/dist/utilities/index.d.mts +2 -2
- package/dist/utilities/index.mjs +120 -51
- package/dist/{v0-Zu7neOYg.mjs → v0-AoEx-7U5.mjs} +8 -3
- package/dist/{v0-JPf99NKg.d.mts → v0-BdhPBG_p.d.mts} +1 -1
- package/dist/{v0-BdD1F6JK.d.mts → v0-CItl0K-e.d.mts} +1 -1
- package/dist/{v0-CehUknHv.mjs → v0-CkxwC3wm.mjs} +1 -1
- package/dist/{v0-BJYwZgtp.mjs → v0-Di7YUWAH.mjs} +1 -1
- package/package.json +1 -1
- package/dist/v0-DFAgNbvC.d.mts +0 -10
- /package/dist/{adapter-CJQav2JB.d.mts → adapter-DcJbLnTC.d.mts} +0 -0
- /package/dist/{index-BvTD7kU8.d.mts → index-BAHMiB95.d.mts} +0 -0
- /package/dist/{index-dJKXAO5D.d.mts → index-BC1S8-8J.d.mts} +0 -0
- /package/dist/{index-CLDBngUs.d.mts → index-B_fIwnhR.d.mts} +0 -0
- /package/dist/{index-DSao7i57.d.mts → index-DiLStryt.d.mts} +0 -0
- /package/dist/{memory-DyBabFV1.d.mts → memory-CDrksYgA.d.mts} +0 -0
|
@@ -1,14 +1,14 @@
|
|
|
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-
|
|
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-TLLuB8XQ.mjs";
|
|
2
2
|
import { clamp, instanceExists, isElement, isFunction, isNull, isNullOrUndefined, isNumber, isObject, isString, isUndefined, mergeDeep, useId as useId$1 } from "./utilities/index.mjs";
|
|
3
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-
|
|
5
|
-
import {
|
|
6
|
-
import { i as createModel, t as createSelection } from "./createSelection-
|
|
7
|
-
import { t as createSingle } from "./createSingle-
|
|
8
|
-
import { t as createGroup } from "./createGroup-
|
|
4
|
+
import { a as createPlugin, i as useLogger, o as createPluginContext } from "./useLogger-xp_tiLJ5.mjs";
|
|
5
|
+
import { a as createRegistry } from "./createTokens-vyh3quuB.mjs";
|
|
6
|
+
import { i as createModel, t as createSelection } from "./createSelection-I3pID-Mh.mjs";
|
|
7
|
+
import { t as createSingle } from "./createSingle-CqX-KXFr.mjs";
|
|
8
|
+
import { t as createGroup } from "./createGroup-BgDjEOXE.mjs";
|
|
9
9
|
import { t as toArray } from "./toArray-VdROPpy-.mjs";
|
|
10
|
-
import { a as useLocale } from "./useLocale-
|
|
11
|
-
import { a as useRules, o as isStandardSchema } from "./useRules-
|
|
10
|
+
import { a as useLocale } from "./useLocale-B8NaQT2b.mjs";
|
|
11
|
+
import { a as useRules, o as isStandardSchema } from "./useRules-RkVMgycJ.mjs";
|
|
12
12
|
import { t as MemoryAdapter } from "./memory-XCMtkld1.mjs";
|
|
13
13
|
import { computed, effectScope, isRef, nextTick, onMounted, onScopeDispose, reactive, readonly, ref, shallowReactive, shallowReadonly, shallowRef, toRef, toValue, unref, watch, watchEffect } from "vue";
|
|
14
14
|
//#region src/composables/createBreadcrumbs/index.ts
|
|
@@ -782,6 +782,132 @@ function useProxyModel(context, model, options) {
|
|
|
782
782
|
return stop;
|
|
783
783
|
}
|
|
784
784
|
//#endregion
|
|
785
|
+
//#region src/composables/useTimer/index.ts
|
|
786
|
+
/**
|
|
787
|
+
* @module useTimer
|
|
788
|
+
*
|
|
789
|
+
* @remarks
|
|
790
|
+
* A reactive timer composable with pause/resume support.
|
|
791
|
+
*
|
|
792
|
+
* Key features:
|
|
793
|
+
* - Start/stop/pause/resume controls
|
|
794
|
+
* - Reactive remaining time tracking
|
|
795
|
+
* - One-shot (default) or repeating mode
|
|
796
|
+
* - Automatic cleanup on scope disposal
|
|
797
|
+
* - SSR-safe
|
|
798
|
+
*/
|
|
799
|
+
/**
|
|
800
|
+
* Creates a reactive timer with pause/resume support.
|
|
801
|
+
*
|
|
802
|
+
* @param handler Callback invoked when the timer fires.
|
|
803
|
+
* @param options Timer configuration.
|
|
804
|
+
* @returns Timer controls and reactive state.
|
|
805
|
+
*
|
|
806
|
+
* @see https://0.vuetifyjs.com/composables/system/use-timer
|
|
807
|
+
*
|
|
808
|
+
* @example
|
|
809
|
+
* ```ts
|
|
810
|
+
* const timer = useTimer(() => console.log('fired'), { duration: 5000 })
|
|
811
|
+
*
|
|
812
|
+
* timer.start()
|
|
813
|
+
* timer.pause()
|
|
814
|
+
* timer.resume()
|
|
815
|
+
* timer.stop()
|
|
816
|
+
* ```
|
|
817
|
+
*/
|
|
818
|
+
function useTimer(handler, options = {}) {
|
|
819
|
+
const { duration = 1e3, repeat = false } = options;
|
|
820
|
+
const remaining = shallowRef(duration);
|
|
821
|
+
const isActive = shallowRef(false);
|
|
822
|
+
const isPaused = shallowRef(false);
|
|
823
|
+
let timeoutId;
|
|
824
|
+
let trackingId;
|
|
825
|
+
let startedAt = 0;
|
|
826
|
+
let budget = duration;
|
|
827
|
+
function clearTimer() {
|
|
828
|
+
if (!/* @__PURE__ */ isUndefined(timeoutId)) {
|
|
829
|
+
globalThis.clearTimeout(timeoutId);
|
|
830
|
+
timeoutId = void 0;
|
|
831
|
+
}
|
|
832
|
+
}
|
|
833
|
+
function startTracking() {
|
|
834
|
+
stopTracking();
|
|
835
|
+
if (!IN_BROWSER) return;
|
|
836
|
+
trackingId = globalThis.setInterval(() => {
|
|
837
|
+
if (!isActive.value || isPaused.value) return;
|
|
838
|
+
const elapsed = Date.now() - startedAt;
|
|
839
|
+
remaining.value = Math.max(0, budget - elapsed);
|
|
840
|
+
}, 100);
|
|
841
|
+
}
|
|
842
|
+
function stopTracking() {
|
|
843
|
+
if (!/* @__PURE__ */ isUndefined(trackingId)) {
|
|
844
|
+
globalThis.clearInterval(trackingId);
|
|
845
|
+
trackingId = void 0;
|
|
846
|
+
}
|
|
847
|
+
}
|
|
848
|
+
function fire() {
|
|
849
|
+
clearTimer();
|
|
850
|
+
stopTracking();
|
|
851
|
+
handler();
|
|
852
|
+
if (repeat) begin(duration);
|
|
853
|
+
else {
|
|
854
|
+
isActive.value = false;
|
|
855
|
+
remaining.value = 0;
|
|
856
|
+
}
|
|
857
|
+
}
|
|
858
|
+
function begin(ms) {
|
|
859
|
+
clearTimer();
|
|
860
|
+
stopTracking();
|
|
861
|
+
budget = ms;
|
|
862
|
+
startedAt = Date.now();
|
|
863
|
+
remaining.value = ms;
|
|
864
|
+
isActive.value = true;
|
|
865
|
+
isPaused.value = false;
|
|
866
|
+
timeoutId = globalThis.setTimeout(fire, ms);
|
|
867
|
+
startTracking();
|
|
868
|
+
}
|
|
869
|
+
function start() {
|
|
870
|
+
if (duration < 0) return;
|
|
871
|
+
begin(duration);
|
|
872
|
+
}
|
|
873
|
+
function stop() {
|
|
874
|
+
clearTimer();
|
|
875
|
+
stopTracking();
|
|
876
|
+
isActive.value = false;
|
|
877
|
+
isPaused.value = false;
|
|
878
|
+
remaining.value = duration;
|
|
879
|
+
}
|
|
880
|
+
function pause() {
|
|
881
|
+
if (!isActive.value || isPaused.value) return;
|
|
882
|
+
const elapsed = Date.now() - startedAt;
|
|
883
|
+
budget = Math.max(0, budget - elapsed);
|
|
884
|
+
remaining.value = budget;
|
|
885
|
+
clearTimer();
|
|
886
|
+
stopTracking();
|
|
887
|
+
isPaused.value = true;
|
|
888
|
+
}
|
|
889
|
+
function resume() {
|
|
890
|
+
if (!isPaused.value) return;
|
|
891
|
+
isPaused.value = false;
|
|
892
|
+
startedAt = Date.now();
|
|
893
|
+
timeoutId = globalThis.setTimeout(fire, budget);
|
|
894
|
+
startTracking();
|
|
895
|
+
}
|
|
896
|
+
onScopeDispose(() => {
|
|
897
|
+
clearTimer();
|
|
898
|
+
stopTracking();
|
|
899
|
+
}, true);
|
|
900
|
+
return {
|
|
901
|
+
start,
|
|
902
|
+
stop,
|
|
903
|
+
pause,
|
|
904
|
+
resume,
|
|
905
|
+
remaining,
|
|
906
|
+
isActive,
|
|
907
|
+
isPaused
|
|
908
|
+
};
|
|
909
|
+
}
|
|
910
|
+
//#endregion
|
|
785
911
|
//#region src/composables/toReactive/index.ts
|
|
786
912
|
/**
|
|
787
913
|
* @module toReactive
|
|
@@ -1172,6 +1298,18 @@ const defaultLocales = {
|
|
|
1172
1298
|
ar: "ar-SA"
|
|
1173
1299
|
};
|
|
1174
1300
|
/**
|
|
1301
|
+
* Derive firstDayOfWeek from an Intl locale string.
|
|
1302
|
+
* Returns 0-6 (0=Sun) or 0 as fallback.
|
|
1303
|
+
*/
|
|
1304
|
+
function deriveFirstDayOfWeek(locale) {
|
|
1305
|
+
try {
|
|
1306
|
+
const info = new Intl.Locale(locale).getWeekInfo?.();
|
|
1307
|
+
return info ? info.firstDay % 7 : 0;
|
|
1308
|
+
} catch {
|
|
1309
|
+
return 0;
|
|
1310
|
+
}
|
|
1311
|
+
}
|
|
1312
|
+
/**
|
|
1175
1313
|
* Creates a new date context.
|
|
1176
1314
|
*
|
|
1177
1315
|
* @param options Adapter and locale configuration.
|
|
@@ -1196,7 +1334,7 @@ const defaultLocales = {
|
|
|
1196
1334
|
* ```
|
|
1197
1335
|
*/
|
|
1198
1336
|
function createDate(options) {
|
|
1199
|
-
const { locales = defaultLocales, adapter, locale: initialLocale } = options;
|
|
1337
|
+
const { locales = defaultLocales, adapter, locale: initialLocale, firstDayOfWeek: explicitFirstDay } = options;
|
|
1200
1338
|
let selectedId;
|
|
1201
1339
|
try {
|
|
1202
1340
|
if (instanceExists()) selectedId = useLocale().selectedId;
|
|
@@ -1210,17 +1348,27 @@ function createDate(options) {
|
|
|
1210
1348
|
const fallback = initialLocale ?? adapter.locale ?? "en-US";
|
|
1211
1349
|
return fallback.includes("-") ? fallback : locales[fallback] ?? fallback;
|
|
1212
1350
|
});
|
|
1351
|
+
const firstDayOfWeek = computed(() => {
|
|
1352
|
+
if (!/* @__PURE__ */ isUndefined(explicitFirstDay)) return explicitFirstDay;
|
|
1353
|
+
const loc = locale.value;
|
|
1354
|
+
return loc ? deriveFirstDayOfWeek(loc) : 0;
|
|
1355
|
+
});
|
|
1213
1356
|
if (instanceExists()) onScopeDispose(watchEffect(() => {
|
|
1214
1357
|
const loc = locale.value;
|
|
1215
1358
|
if (loc && adapter.locale !== loc) adapter.locale = loc;
|
|
1359
|
+
const fdow = firstDayOfWeek.value;
|
|
1360
|
+
if (adapter.firstDayOfWeek !== fdow) adapter.firstDayOfWeek = fdow;
|
|
1216
1361
|
}));
|
|
1217
1362
|
else {
|
|
1218
1363
|
const loc = locale.value;
|
|
1219
1364
|
if (loc && adapter.locale !== loc) adapter.locale = loc;
|
|
1365
|
+
const fdow = firstDayOfWeek.value;
|
|
1366
|
+
if (adapter.firstDayOfWeek !== fdow) adapter.firstDayOfWeek = fdow;
|
|
1220
1367
|
}
|
|
1221
1368
|
return {
|
|
1222
1369
|
adapter,
|
|
1223
|
-
locale
|
|
1370
|
+
locale,
|
|
1371
|
+
firstDayOfWeek
|
|
1224
1372
|
};
|
|
1225
1373
|
}
|
|
1226
1374
|
/**
|
|
@@ -2008,132 +2156,6 @@ function useElementIntersection(target, options = {}) {
|
|
|
2008
2156
|
};
|
|
2009
2157
|
}
|
|
2010
2158
|
//#endregion
|
|
2011
|
-
//#region src/composables/useTimer/index.ts
|
|
2012
|
-
/**
|
|
2013
|
-
* @module useTimer
|
|
2014
|
-
*
|
|
2015
|
-
* @remarks
|
|
2016
|
-
* A reactive timer composable with pause/resume support.
|
|
2017
|
-
*
|
|
2018
|
-
* Key features:
|
|
2019
|
-
* - Start/stop/pause/resume controls
|
|
2020
|
-
* - Reactive remaining time tracking
|
|
2021
|
-
* - One-shot (default) or repeating mode
|
|
2022
|
-
* - Automatic cleanup on scope disposal
|
|
2023
|
-
* - SSR-safe
|
|
2024
|
-
*/
|
|
2025
|
-
/**
|
|
2026
|
-
* Creates a reactive timer with pause/resume support.
|
|
2027
|
-
*
|
|
2028
|
-
* @param handler Callback invoked when the timer fires.
|
|
2029
|
-
* @param options Timer configuration.
|
|
2030
|
-
* @returns Timer controls and reactive state.
|
|
2031
|
-
*
|
|
2032
|
-
* @see https://0.vuetifyjs.com/composables/system/use-timer
|
|
2033
|
-
*
|
|
2034
|
-
* @example
|
|
2035
|
-
* ```ts
|
|
2036
|
-
* const timer = useTimer(() => console.log('fired'), { duration: 5000 })
|
|
2037
|
-
*
|
|
2038
|
-
* timer.start()
|
|
2039
|
-
* timer.pause()
|
|
2040
|
-
* timer.resume()
|
|
2041
|
-
* timer.stop()
|
|
2042
|
-
* ```
|
|
2043
|
-
*/
|
|
2044
|
-
function useTimer(handler, options = {}) {
|
|
2045
|
-
const { duration = 1e3, repeat = false } = options;
|
|
2046
|
-
const remaining = shallowRef(duration);
|
|
2047
|
-
const isActive = shallowRef(false);
|
|
2048
|
-
const isPaused = shallowRef(false);
|
|
2049
|
-
let timeoutId;
|
|
2050
|
-
let trackingId;
|
|
2051
|
-
let startedAt = 0;
|
|
2052
|
-
let budget = duration;
|
|
2053
|
-
function clearTimer() {
|
|
2054
|
-
if (!/* @__PURE__ */ isUndefined(timeoutId)) {
|
|
2055
|
-
globalThis.clearTimeout(timeoutId);
|
|
2056
|
-
timeoutId = void 0;
|
|
2057
|
-
}
|
|
2058
|
-
}
|
|
2059
|
-
function startTracking() {
|
|
2060
|
-
stopTracking();
|
|
2061
|
-
if (!IN_BROWSER) return;
|
|
2062
|
-
trackingId = globalThis.setInterval(() => {
|
|
2063
|
-
if (!isActive.value || isPaused.value) return;
|
|
2064
|
-
const elapsed = Date.now() - startedAt;
|
|
2065
|
-
remaining.value = Math.max(0, budget - elapsed);
|
|
2066
|
-
}, 100);
|
|
2067
|
-
}
|
|
2068
|
-
function stopTracking() {
|
|
2069
|
-
if (!/* @__PURE__ */ isUndefined(trackingId)) {
|
|
2070
|
-
globalThis.clearInterval(trackingId);
|
|
2071
|
-
trackingId = void 0;
|
|
2072
|
-
}
|
|
2073
|
-
}
|
|
2074
|
-
function fire() {
|
|
2075
|
-
clearTimer();
|
|
2076
|
-
stopTracking();
|
|
2077
|
-
handler();
|
|
2078
|
-
if (repeat) begin(duration);
|
|
2079
|
-
else {
|
|
2080
|
-
isActive.value = false;
|
|
2081
|
-
remaining.value = 0;
|
|
2082
|
-
}
|
|
2083
|
-
}
|
|
2084
|
-
function begin(ms) {
|
|
2085
|
-
clearTimer();
|
|
2086
|
-
stopTracking();
|
|
2087
|
-
budget = ms;
|
|
2088
|
-
startedAt = Date.now();
|
|
2089
|
-
remaining.value = ms;
|
|
2090
|
-
isActive.value = true;
|
|
2091
|
-
isPaused.value = false;
|
|
2092
|
-
timeoutId = globalThis.setTimeout(fire, ms);
|
|
2093
|
-
startTracking();
|
|
2094
|
-
}
|
|
2095
|
-
function start() {
|
|
2096
|
-
if (duration < 0) return;
|
|
2097
|
-
begin(duration);
|
|
2098
|
-
}
|
|
2099
|
-
function stop() {
|
|
2100
|
-
clearTimer();
|
|
2101
|
-
stopTracking();
|
|
2102
|
-
isActive.value = false;
|
|
2103
|
-
isPaused.value = false;
|
|
2104
|
-
remaining.value = duration;
|
|
2105
|
-
}
|
|
2106
|
-
function pause() {
|
|
2107
|
-
if (!isActive.value || isPaused.value) return;
|
|
2108
|
-
const elapsed = Date.now() - startedAt;
|
|
2109
|
-
budget = Math.max(0, budget - elapsed);
|
|
2110
|
-
remaining.value = budget;
|
|
2111
|
-
clearTimer();
|
|
2112
|
-
stopTracking();
|
|
2113
|
-
isPaused.value = true;
|
|
2114
|
-
}
|
|
2115
|
-
function resume() {
|
|
2116
|
-
if (!isPaused.value) return;
|
|
2117
|
-
isPaused.value = false;
|
|
2118
|
-
startedAt = Date.now();
|
|
2119
|
-
timeoutId = globalThis.setTimeout(fire, budget);
|
|
2120
|
-
startTracking();
|
|
2121
|
-
}
|
|
2122
|
-
onScopeDispose(() => {
|
|
2123
|
-
clearTimer();
|
|
2124
|
-
stopTracking();
|
|
2125
|
-
}, true);
|
|
2126
|
-
return {
|
|
2127
|
-
start,
|
|
2128
|
-
stop,
|
|
2129
|
-
pause,
|
|
2130
|
-
resume,
|
|
2131
|
-
remaining,
|
|
2132
|
-
isActive,
|
|
2133
|
-
isPaused
|
|
2134
|
-
};
|
|
2135
|
-
}
|
|
2136
|
-
//#endregion
|
|
2137
2159
|
//#region src/composables/useLazy/index.ts
|
|
2138
2160
|
/**
|
|
2139
2161
|
* @module useLazy
|
|
@@ -2485,7 +2507,8 @@ const multipleOpenStrategy = {
|
|
|
2485
2507
|
*/
|
|
2486
2508
|
const singleOpenStrategy = {
|
|
2487
2509
|
onOpen: (id, context) => {
|
|
2488
|
-
|
|
2510
|
+
const toClose = [...context.openedIds].filter((openedId) => openedId !== id);
|
|
2511
|
+
for (const openedId of toClose) context.openedIds.delete(openedId);
|
|
2489
2512
|
},
|
|
2490
2513
|
onClose: void 0
|
|
2491
2514
|
};
|
|
@@ -2587,8 +2610,13 @@ function createNested(_options = {}) {
|
|
|
2587
2610
|
return openedIds.has(id);
|
|
2588
2611
|
}
|
|
2589
2612
|
function open(ids) {
|
|
2613
|
+
if (toValue(group.disabled)) return;
|
|
2590
2614
|
for (const id of toArray(ids)) {
|
|
2591
2615
|
if (!group.has(id)) continue;
|
|
2616
|
+
const item = group.get(id);
|
|
2617
|
+
if (!item || toValue(item.disabled)) continue;
|
|
2618
|
+
openedIds.add(id);
|
|
2619
|
+
resolvedOpenStrategy.onOpen?.(id, context);
|
|
2592
2620
|
if (revealOnOpen) {
|
|
2593
2621
|
let parentId = parents.get(id);
|
|
2594
2622
|
while (!/* @__PURE__ */ isUndefined(parentId)) {
|
|
@@ -2596,20 +2624,24 @@ function createNested(_options = {}) {
|
|
|
2596
2624
|
parentId = parents.get(parentId);
|
|
2597
2625
|
}
|
|
2598
2626
|
}
|
|
2599
|
-
openedIds.add(id);
|
|
2600
|
-
resolvedOpenStrategy.onOpen?.(id, context);
|
|
2601
2627
|
}
|
|
2602
2628
|
}
|
|
2603
2629
|
function close(ids) {
|
|
2630
|
+
if (toValue(group.disabled)) return;
|
|
2604
2631
|
for (const id of toArray(ids)) {
|
|
2605
2632
|
if (!group.has(id)) continue;
|
|
2633
|
+
const item = group.get(id);
|
|
2634
|
+
if (!item || toValue(item.disabled)) continue;
|
|
2606
2635
|
openedIds.delete(id);
|
|
2607
2636
|
resolvedOpenStrategy.onClose?.(id, context);
|
|
2608
2637
|
}
|
|
2609
2638
|
}
|
|
2610
2639
|
function flip(ids) {
|
|
2640
|
+
if (toValue(group.disabled)) return;
|
|
2611
2641
|
for (const id of toArray(ids)) {
|
|
2612
2642
|
if (!group.has(id)) continue;
|
|
2643
|
+
const item = group.get(id);
|
|
2644
|
+
if (!item || toValue(item.disabled)) continue;
|
|
2613
2645
|
if (opened(id)) close(id);
|
|
2614
2646
|
else open(id);
|
|
2615
2647
|
}
|
|
@@ -2649,10 +2681,20 @@ function createNested(_options = {}) {
|
|
|
2649
2681
|
}
|
|
2650
2682
|
}
|
|
2651
2683
|
function expandAll() {
|
|
2652
|
-
|
|
2684
|
+
if (toValue(group.disabled)) return;
|
|
2685
|
+
for (const [id, childList] of children) if (childList.length > 0) {
|
|
2686
|
+
const item = group.get(id);
|
|
2687
|
+
if (item && toValue(item.disabled)) continue;
|
|
2688
|
+
openedIds.add(id);
|
|
2689
|
+
}
|
|
2653
2690
|
}
|
|
2654
2691
|
function collapseAll() {
|
|
2655
|
-
|
|
2692
|
+
if (toValue(group.disabled)) return;
|
|
2693
|
+
const toClose = [...openedIds].filter((id) => {
|
|
2694
|
+
const item = group.get(id);
|
|
2695
|
+
return !item || !toValue(item.disabled);
|
|
2696
|
+
});
|
|
2697
|
+
for (const id of toClose) openedIds.delete(id);
|
|
2656
2698
|
}
|
|
2657
2699
|
function activated(id) {
|
|
2658
2700
|
return activeIds.has(id);
|
|
@@ -2733,7 +2775,7 @@ function createNested(_options = {}) {
|
|
|
2733
2775
|
function siblings(id) {
|
|
2734
2776
|
if (!group.has(id)) return [];
|
|
2735
2777
|
const parentId = parents.get(id);
|
|
2736
|
-
if (/* @__PURE__ */ isUndefined(parentId)) return
|
|
2778
|
+
if (/* @__PURE__ */ isUndefined(parentId)) return Array.from(rootIds);
|
|
2737
2779
|
return children.get(parentId) ?? [];
|
|
2738
2780
|
}
|
|
2739
2781
|
/**
|
|
@@ -2744,6 +2786,28 @@ function createNested(_options = {}) {
|
|
|
2744
2786
|
const index = siblings(id).indexOf(id);
|
|
2745
2787
|
return index === -1 ? 0 : index + 1;
|
|
2746
2788
|
}
|
|
2789
|
+
/**
|
|
2790
|
+
* Returns depth-first traversal of visible (open) nodes.
|
|
2791
|
+
* A node is visible if all its ancestors are open.
|
|
2792
|
+
* Used by useRovingFocus to determine keyboard navigation order.
|
|
2793
|
+
*/
|
|
2794
|
+
function visibleItems() {
|
|
2795
|
+
const result = [];
|
|
2796
|
+
const rootItems = Array.from(rootIds);
|
|
2797
|
+
function walk(ids) {
|
|
2798
|
+
for (const id of ids) {
|
|
2799
|
+
const item = group.get(id);
|
|
2800
|
+
if (!item) continue;
|
|
2801
|
+
result.push(item);
|
|
2802
|
+
if (opened(id)) {
|
|
2803
|
+
const childIds = children.get(id);
|
|
2804
|
+
if (childIds?.length) walk(childIds);
|
|
2805
|
+
}
|
|
2806
|
+
}
|
|
2807
|
+
}
|
|
2808
|
+
walk(rootItems);
|
|
2809
|
+
return result;
|
|
2810
|
+
}
|
|
2747
2811
|
function updateAncestors(id) {
|
|
2748
2812
|
const { selectedIds, mixedIds } = group;
|
|
2749
2813
|
let parentId = parents.get(id);
|
|
@@ -2770,8 +2834,11 @@ function createNested(_options = {}) {
|
|
|
2770
2834
|
return getDescendants(id).filter((did) => isLeaf(did));
|
|
2771
2835
|
}
|
|
2772
2836
|
function select(ids) {
|
|
2837
|
+
if (toValue(group.disabled)) return;
|
|
2773
2838
|
for (const id of toArray(ids)) {
|
|
2774
2839
|
if (!group.has(id)) continue;
|
|
2840
|
+
const item = group.get(id);
|
|
2841
|
+
if (!item || toValue(item.disabled)) continue;
|
|
2775
2842
|
if (selectionMode === "independent") group.select(id);
|
|
2776
2843
|
else if (selectionMode === "leaf") if (isLeaf(id)) group.select(id);
|
|
2777
2844
|
else for (const lid of getLeafDescendants(id)) group.select(lid);
|
|
@@ -2784,6 +2851,8 @@ function createNested(_options = {}) {
|
|
|
2784
2851
|
mixedIds.delete(id);
|
|
2785
2852
|
selectedIds.add(id);
|
|
2786
2853
|
for (const did of getDescendants(id)) {
|
|
2854
|
+
const desc = group.get(did);
|
|
2855
|
+
if (desc && toValue(desc.disabled)) continue;
|
|
2787
2856
|
mixedIds.delete(did);
|
|
2788
2857
|
selectedIds.add(did);
|
|
2789
2858
|
}
|
|
@@ -2792,8 +2861,11 @@ function createNested(_options = {}) {
|
|
|
2792
2861
|
}
|
|
2793
2862
|
}
|
|
2794
2863
|
function unselect(ids) {
|
|
2864
|
+
if (toValue(group.disabled)) return;
|
|
2795
2865
|
for (const id of toArray(ids)) {
|
|
2796
2866
|
if (!group.has(id)) continue;
|
|
2867
|
+
const item = group.get(id);
|
|
2868
|
+
if (!item || toValue(item.disabled)) continue;
|
|
2797
2869
|
if (selectionMode === "independent") group.unselect(id);
|
|
2798
2870
|
else if (selectionMode === "leaf") if (isLeaf(id)) group.unselect(id);
|
|
2799
2871
|
else for (const lid of getLeafDescendants(id)) group.unselect(lid);
|
|
@@ -2806,6 +2878,8 @@ function createNested(_options = {}) {
|
|
|
2806
2878
|
mixedIds.delete(id);
|
|
2807
2879
|
selectedIds.delete(id);
|
|
2808
2880
|
for (const did of getDescendants(id)) {
|
|
2881
|
+
const desc = group.get(did);
|
|
2882
|
+
if (desc && toValue(desc.disabled)) continue;
|
|
2809
2883
|
mixedIds.delete(did);
|
|
2810
2884
|
selectedIds.delete(did);
|
|
2811
2885
|
}
|
|
@@ -2814,15 +2888,43 @@ function createNested(_options = {}) {
|
|
|
2814
2888
|
}
|
|
2815
2889
|
}
|
|
2816
2890
|
function toggle(ids) {
|
|
2817
|
-
|
|
2818
|
-
|
|
2819
|
-
|
|
2820
|
-
|
|
2821
|
-
if (
|
|
2822
|
-
else
|
|
2891
|
+
if (toValue(group.disabled)) return;
|
|
2892
|
+
for (const id of toArray(ids)) {
|
|
2893
|
+
const item = group.get(id);
|
|
2894
|
+
if (!item || toValue(item.disabled)) continue;
|
|
2895
|
+
if (selectionMode === "independent") group.toggle(id);
|
|
2896
|
+
else if (selectionMode === "leaf") if (isLeaf(id)) group.toggle(id);
|
|
2897
|
+
else {
|
|
2898
|
+
const leafIds = getLeafDescendants(id);
|
|
2899
|
+
if (leafIds.every((lid) => group.selected(lid))) for (const lid of leafIds) group.unselect(lid);
|
|
2900
|
+
else for (const lid of leafIds) group.select(lid);
|
|
2901
|
+
}
|
|
2902
|
+
else if (group.selected(id) || group.mixed(id)) unselect(id);
|
|
2903
|
+
else select(id);
|
|
2904
|
+
}
|
|
2905
|
+
}
|
|
2906
|
+
function selectAll() {
|
|
2907
|
+
if (toValue(group.disabled)) return;
|
|
2908
|
+
const { selectedIds, mixedIds } = group;
|
|
2909
|
+
for (const item of group.values()) {
|
|
2910
|
+
if (toValue(item.disabled)) continue;
|
|
2911
|
+
selectedIds.add(item.id);
|
|
2823
2912
|
}
|
|
2824
|
-
|
|
2825
|
-
|
|
2913
|
+
mixedIds.clear();
|
|
2914
|
+
}
|
|
2915
|
+
function unselectAll() {
|
|
2916
|
+
if (toValue(group.disabled)) return;
|
|
2917
|
+
const first = group.selectedIds.values().next().value;
|
|
2918
|
+
group.selectedIds.clear();
|
|
2919
|
+
group.mixedIds.clear();
|
|
2920
|
+
if (toValue(mandatoryOption) && first) {
|
|
2921
|
+
group.selectedIds.add(first);
|
|
2922
|
+
updateAncestors(first);
|
|
2923
|
+
}
|
|
2924
|
+
}
|
|
2925
|
+
function toggleAll() {
|
|
2926
|
+
if (group.isAllSelected.value) unselectAll();
|
|
2927
|
+
else selectAll();
|
|
2826
2928
|
}
|
|
2827
2929
|
/**
|
|
2828
2930
|
* Converts the tree to a flat array with parentId references.
|
|
@@ -2867,6 +2969,7 @@ function createNested(_options = {}) {
|
|
|
2867
2969
|
const item = {
|
|
2868
2970
|
...rest,
|
|
2869
2971
|
id,
|
|
2972
|
+
el: registration.el,
|
|
2870
2973
|
parentId: batching ? pendingParents.get(id) : parents.get(id),
|
|
2871
2974
|
isOpen: toRef(() => opened(id)),
|
|
2872
2975
|
isActive: toRef(() => activated(id)),
|
|
@@ -2887,6 +2990,9 @@ function createNested(_options = {}) {
|
|
|
2887
2990
|
position: () => position(id)
|
|
2888
2991
|
};
|
|
2889
2992
|
const ticket = group.register(item);
|
|
2993
|
+
ticket.select = () => select(id);
|
|
2994
|
+
ticket.unselect = () => unselect(id);
|
|
2995
|
+
ticket.toggle = () => toggle(id);
|
|
2890
2996
|
if (registration.active) activate(id);
|
|
2891
2997
|
if (nested?.length) for (const child of nested) register({
|
|
2892
2998
|
...child,
|
|
@@ -2981,6 +3087,7 @@ function createNested(_options = {}) {
|
|
|
2981
3087
|
activeIndexes,
|
|
2982
3088
|
roots,
|
|
2983
3089
|
leaves,
|
|
3090
|
+
visibleItems,
|
|
2984
3091
|
getPath,
|
|
2985
3092
|
getAncestors,
|
|
2986
3093
|
getDescendants,
|
|
@@ -3004,10 +3111,14 @@ function createNested(_options = {}) {
|
|
|
3004
3111
|
activated,
|
|
3005
3112
|
deactivateAll,
|
|
3006
3113
|
toFlat,
|
|
3114
|
+
multiple: toValue(multipleOption),
|
|
3007
3115
|
openStrategy: resolvedOpenStrategy,
|
|
3008
3116
|
select,
|
|
3009
3117
|
unselect,
|
|
3010
3118
|
toggle,
|
|
3119
|
+
selectAll,
|
|
3120
|
+
unselectAll,
|
|
3121
|
+
toggleAll,
|
|
3011
3122
|
register,
|
|
3012
3123
|
unregister,
|
|
3013
3124
|
offboard,
|
|
@@ -6115,4 +6226,4 @@ function useClickOutside(target, handler, options = {}) {
|
|
|
6115
6226
|
};
|
|
6116
6227
|
}
|
|
6117
6228
|
//#endregion
|
|
6118
|
-
export {
|
|
6229
|
+
export { useElementIntersection as $, useRtl as A, createQueueContext as B, createStackPlugin as C, createHydration as Ct, createRtlContext as D, createBreadcrumbs as Dt, createRtl as E, useHydration as Et, createNotifications as F, multipleOpenStrategy as G, createNested as H, createNotificationsContext as I, useMediaQuery as J, singleOpenStrategy as K, createNotificationsPlugin as L, useRovingFocus as M, useRaf as N, createRtlFallback as O, createBreadcrumbsContext as Ot, usePopover as P, useLazy as Q, useNotifications as R, createStackContext as S, createFallbackHydration as St, createSlider as T, createHydrationPlugin as Tt, createNestedContext as U, useQueue as V, useNested as W, usePrefersDark as X, usePrefersContrast as Y, usePrefersReducedMotion as Z, useStorage as _, createOverflowContext as _t, useVirtualFocus as a, createDate as at, useStep as b, useResizeObserver as bt, useVirtual as c, useDate as ct, createTimeline as d, createBreakpointsPlugin as dt, useIntersectionObserver as et, createTimelineContext as f, useBreakpoints as ft, createStoragePlugin as g, createOverflow as gt, createStorageContext as h, useProxyModel as ht, useWindowEventListener as i, useForm as it, Vuetify0RtlAdapter as j, createRtlPlugin as k, useBreadcrumbs as kt, useToggleScope as l, createBreakpoints as lt, createStorage as m, useTimer as mt, useDocumentEventListener as n, createForm as nt, createVirtual as o, createDateContext as ot, useTimeline as p, toReactive as pt, useMutationObserver as q, useEventListener as r, createFormContext as rt, createVirtualContext as s, createDatePlugin as st, useClickOutside as t, useHotkey as tt, createValidation as u, createBreakpointsContext as ut, createStep as v, useOverflow as vt, useStack as w, createHydrationContext as wt, createStack as x, toElement as xt, createStepContext as y, useElementSize as yt, createQueue as z };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { isArray, isBoolean, isFunction, isObject } from "./utilities/index.mjs";
|
|
2
|
-
import { o as createPluginContext } from "./useLogger-
|
|
3
|
-
import { t as createTokens } from "./createTokens-
|
|
4
|
-
import { t as createGroup } from "./createGroup-
|
|
2
|
+
import { o as createPluginContext } from "./useLogger-xp_tiLJ5.mjs";
|
|
3
|
+
import { t as createTokens } from "./createTokens-vyh3quuB.mjs";
|
|
4
|
+
import { t as createGroup } from "./createGroup-BgDjEOXE.mjs";
|
|
5
5
|
//#region src/composables/useFeatures/adapters/generic/index.ts
|
|
6
6
|
var FeaturesAdapter = class {};
|
|
7
7
|
//#endregion
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { o as createPluginContext } from "./useLogger-
|
|
2
|
-
import { t as createTokens } from "./createTokens-
|
|
3
|
-
import { t as createSingle } from "./createSingle-
|
|
4
|
-
import { t as Vuetify0LocaleAdapter } from "./v0-
|
|
1
|
+
import { o as createPluginContext } from "./useLogger-xp_tiLJ5.mjs";
|
|
2
|
+
import { r as flatten, t as createTokens } from "./createTokens-vyh3quuB.mjs";
|
|
3
|
+
import { t as createSingle } from "./createSingle-CqX-KXFr.mjs";
|
|
4
|
+
import { t as Vuetify0LocaleAdapter } from "./v0-CkxwC3wm.mjs";
|
|
5
5
|
//#region src/composables/useLocale/index.ts
|
|
6
6
|
/**
|
|
7
7
|
* @module useLocale
|
|
@@ -48,10 +48,16 @@ function createLocale(_options = {}) {
|
|
|
48
48
|
function n(value) {
|
|
49
49
|
return adapter.n(value);
|
|
50
50
|
}
|
|
51
|
+
function register(registration = {}) {
|
|
52
|
+
const { messages: msgs, ...rest } = registration;
|
|
53
|
+
if (msgs && rest.id && !registry.has(rest.id)) tokens.onboard(flatten({ [rest.id]: msgs }));
|
|
54
|
+
return registry.register(rest);
|
|
55
|
+
}
|
|
51
56
|
return {
|
|
52
57
|
...registry,
|
|
53
58
|
t,
|
|
54
59
|
n,
|
|
60
|
+
register,
|
|
55
61
|
get size() {
|
|
56
62
|
return registry.size;
|
|
57
63
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { s as __LOGGER_ENABLED__, t as IN_BROWSER } from "./globals-
|
|
1
|
+
import { s as __LOGGER_ENABLED__, t as IN_BROWSER } from "./globals-TLLuB8XQ.mjs";
|
|
2
2
|
import { isUndefined } from "./utilities/index.mjs";
|
|
3
3
|
import { i as useContext, n as createContext, t as createTrinity } from "./createTrinity-C_c8eedz.mjs";
|
|
4
|
-
import { t as Vuetify0LoggerAdapter } from "./v0-
|
|
4
|
+
import { t as Vuetify0LoggerAdapter } from "./v0-Di7YUWAH.mjs";
|
|
5
5
|
import { hasInjectionContext } from "vue";
|
|
6
6
|
//#region src/composables/createPlugin/index.ts
|
|
7
7
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { o as createPluginContext } from "./useLogger-
|
|
2
|
-
import { t as createTokens } from "./createTokens-
|
|
1
|
+
import { o as createPluginContext } from "./useLogger-xp_tiLJ5.mjs";
|
|
2
|
+
import { t as createTokens } from "./createTokens-vyh3quuB.mjs";
|
|
3
3
|
import { t as toArray } from "./toArray-VdROPpy-.mjs";
|
|
4
4
|
import { t as Vuetify0PermissionAdapter } from "./v0-B1QQGE4O.mjs";
|
|
5
5
|
//#region src/composables/usePermissions/index.ts
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { instanceExists, isFunction, isObject } from "./utilities/index.mjs";
|
|
2
|
-
import { o as createPluginContext } from "./useLogger-
|
|
3
|
-
import { a as useLocale } from "./useLocale-
|
|
2
|
+
import { o as createPluginContext } from "./useLogger-xp_tiLJ5.mjs";
|
|
3
|
+
import { a as useLocale } from "./useLocale-B8NaQT2b.mjs";
|
|
4
4
|
//#region src/composables/useRules/adapters/standard.ts
|
|
5
5
|
/**
|
|
6
6
|
* Type guard for Standard Schema objects.
|